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/2018-11-01/network"
33
34// AddressSpace addressSpace contains an array of IP address ranges that can be used by subnets of the
35// virtual network.
36type AddressSpace struct {
37	// AddressPrefixes - A list of address blocks reserved for this virtual network in CIDR notation.
38	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
39}
40
41// ApplicationGateway application gateway resource
42type ApplicationGateway struct {
43	autorest.Response                   `json:"-"`
44	*ApplicationGatewayPropertiesFormat `json:"properties,omitempty"`
45	// Etag - A unique read-only string that changes whenever the resource is updated.
46	Etag *string `json:"etag,omitempty"`
47	// Zones - A list of availability zones denoting where the resource needs to come from.
48	Zones *[]string `json:"zones,omitempty"`
49	// Identity - The identity of the application gateway, if configured.
50	Identity *ManagedServiceIdentity `json:"identity,omitempty"`
51	// ID - Resource ID.
52	ID *string `json:"id,omitempty"`
53	// Name - READ-ONLY; Resource name.
54	Name *string `json:"name,omitempty"`
55	// Type - READ-ONLY; Resource type.
56	Type *string `json:"type,omitempty"`
57	// Location - Resource location.
58	Location *string `json:"location,omitempty"`
59	// Tags - Resource tags.
60	Tags map[string]*string `json:"tags"`
61}
62
63// MarshalJSON is the custom marshaler for ApplicationGateway.
64func (ag ApplicationGateway) MarshalJSON() ([]byte, error) {
65	objectMap := make(map[string]interface{})
66	if ag.ApplicationGatewayPropertiesFormat != nil {
67		objectMap["properties"] = ag.ApplicationGatewayPropertiesFormat
68	}
69	if ag.Etag != nil {
70		objectMap["etag"] = ag.Etag
71	}
72	if ag.Zones != nil {
73		objectMap["zones"] = ag.Zones
74	}
75	if ag.Identity != nil {
76		objectMap["identity"] = ag.Identity
77	}
78	if ag.ID != nil {
79		objectMap["id"] = ag.ID
80	}
81	if ag.Location != nil {
82		objectMap["location"] = ag.Location
83	}
84	if ag.Tags != nil {
85		objectMap["tags"] = ag.Tags
86	}
87	return json.Marshal(objectMap)
88}
89
90// UnmarshalJSON is the custom unmarshaler for ApplicationGateway struct.
91func (ag *ApplicationGateway) UnmarshalJSON(body []byte) error {
92	var m map[string]*json.RawMessage
93	err := json.Unmarshal(body, &m)
94	if err != nil {
95		return err
96	}
97	for k, v := range m {
98		switch k {
99		case "properties":
100			if v != nil {
101				var applicationGatewayPropertiesFormat ApplicationGatewayPropertiesFormat
102				err = json.Unmarshal(*v, &applicationGatewayPropertiesFormat)
103				if err != nil {
104					return err
105				}
106				ag.ApplicationGatewayPropertiesFormat = &applicationGatewayPropertiesFormat
107			}
108		case "etag":
109			if v != nil {
110				var etag string
111				err = json.Unmarshal(*v, &etag)
112				if err != nil {
113					return err
114				}
115				ag.Etag = &etag
116			}
117		case "zones":
118			if v != nil {
119				var zones []string
120				err = json.Unmarshal(*v, &zones)
121				if err != nil {
122					return err
123				}
124				ag.Zones = &zones
125			}
126		case "identity":
127			if v != nil {
128				var identity ManagedServiceIdentity
129				err = json.Unmarshal(*v, &identity)
130				if err != nil {
131					return err
132				}
133				ag.Identity = &identity
134			}
135		case "id":
136			if v != nil {
137				var ID string
138				err = json.Unmarshal(*v, &ID)
139				if err != nil {
140					return err
141				}
142				ag.ID = &ID
143			}
144		case "name":
145			if v != nil {
146				var name string
147				err = json.Unmarshal(*v, &name)
148				if err != nil {
149					return err
150				}
151				ag.Name = &name
152			}
153		case "type":
154			if v != nil {
155				var typeVar string
156				err = json.Unmarshal(*v, &typeVar)
157				if err != nil {
158					return err
159				}
160				ag.Type = &typeVar
161			}
162		case "location":
163			if v != nil {
164				var location string
165				err = json.Unmarshal(*v, &location)
166				if err != nil {
167					return err
168				}
169				ag.Location = &location
170			}
171		case "tags":
172			if v != nil {
173				var tags map[string]*string
174				err = json.Unmarshal(*v, &tags)
175				if err != nil {
176					return err
177				}
178				ag.Tags = tags
179			}
180		}
181	}
182
183	return nil
184}
185
186// ApplicationGatewayAuthenticationCertificate authentication certificates of an application gateway.
187type ApplicationGatewayAuthenticationCertificate struct {
188	*ApplicationGatewayAuthenticationCertificatePropertiesFormat `json:"properties,omitempty"`
189	// Name - Name of the authentication certificate that is unique within an Application Gateway.
190	Name *string `json:"name,omitempty"`
191	// Etag - A unique read-only string that changes whenever the resource is updated.
192	Etag *string `json:"etag,omitempty"`
193	// Type - Type of the resource.
194	Type *string `json:"type,omitempty"`
195	// ID - Resource ID.
196	ID *string `json:"id,omitempty"`
197}
198
199// MarshalJSON is the custom marshaler for ApplicationGatewayAuthenticationCertificate.
200func (agac ApplicationGatewayAuthenticationCertificate) MarshalJSON() ([]byte, error) {
201	objectMap := make(map[string]interface{})
202	if agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat != nil {
203		objectMap["properties"] = agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat
204	}
205	if agac.Name != nil {
206		objectMap["name"] = agac.Name
207	}
208	if agac.Etag != nil {
209		objectMap["etag"] = agac.Etag
210	}
211	if agac.Type != nil {
212		objectMap["type"] = agac.Type
213	}
214	if agac.ID != nil {
215		objectMap["id"] = agac.ID
216	}
217	return json.Marshal(objectMap)
218}
219
220// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayAuthenticationCertificate struct.
221func (agac *ApplicationGatewayAuthenticationCertificate) UnmarshalJSON(body []byte) error {
222	var m map[string]*json.RawMessage
223	err := json.Unmarshal(body, &m)
224	if err != nil {
225		return err
226	}
227	for k, v := range m {
228		switch k {
229		case "properties":
230			if v != nil {
231				var applicationGatewayAuthenticationCertificatePropertiesFormat ApplicationGatewayAuthenticationCertificatePropertiesFormat
232				err = json.Unmarshal(*v, &applicationGatewayAuthenticationCertificatePropertiesFormat)
233				if err != nil {
234					return err
235				}
236				agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat = &applicationGatewayAuthenticationCertificatePropertiesFormat
237			}
238		case "name":
239			if v != nil {
240				var name string
241				err = json.Unmarshal(*v, &name)
242				if err != nil {
243					return err
244				}
245				agac.Name = &name
246			}
247		case "etag":
248			if v != nil {
249				var etag string
250				err = json.Unmarshal(*v, &etag)
251				if err != nil {
252					return err
253				}
254				agac.Etag = &etag
255			}
256		case "type":
257			if v != nil {
258				var typeVar string
259				err = json.Unmarshal(*v, &typeVar)
260				if err != nil {
261					return err
262				}
263				agac.Type = &typeVar
264			}
265		case "id":
266			if v != nil {
267				var ID string
268				err = json.Unmarshal(*v, &ID)
269				if err != nil {
270					return err
271				}
272				agac.ID = &ID
273			}
274		}
275	}
276
277	return nil
278}
279
280// ApplicationGatewayAuthenticationCertificatePropertiesFormat authentication certificates properties of an
281// application gateway.
282type ApplicationGatewayAuthenticationCertificatePropertiesFormat struct {
283	// Data - Certificate public data.
284	Data *string `json:"data,omitempty"`
285	// ProvisioningState - Provisioning state of the authentication certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
286	ProvisioningState *string `json:"provisioningState,omitempty"`
287}
288
289// ApplicationGatewayAutoscaleConfiguration application Gateway autoscale configuration.
290type ApplicationGatewayAutoscaleConfiguration struct {
291	// MinCapacity - Lower bound on number of Application Gateway capacity
292	MinCapacity *int32 `json:"minCapacity,omitempty"`
293	// MaxCapacity - Upper bound on number of Application Gateway capacity
294	MaxCapacity *int32 `json:"maxCapacity,omitempty"`
295}
296
297// ApplicationGatewayAvailableSslOptions response for ApplicationGatewayAvailableSslOptions API service
298// call.
299type ApplicationGatewayAvailableSslOptions struct {
300	autorest.Response                                      `json:"-"`
301	*ApplicationGatewayAvailableSslOptionsPropertiesFormat `json:"properties,omitempty"`
302	// ID - Resource ID.
303	ID *string `json:"id,omitempty"`
304	// Name - READ-ONLY; Resource name.
305	Name *string `json:"name,omitempty"`
306	// Type - READ-ONLY; Resource type.
307	Type *string `json:"type,omitempty"`
308	// Location - Resource location.
309	Location *string `json:"location,omitempty"`
310	// Tags - Resource tags.
311	Tags map[string]*string `json:"tags"`
312}
313
314// MarshalJSON is the custom marshaler for ApplicationGatewayAvailableSslOptions.
315func (agaso ApplicationGatewayAvailableSslOptions) MarshalJSON() ([]byte, error) {
316	objectMap := make(map[string]interface{})
317	if agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat != nil {
318		objectMap["properties"] = agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat
319	}
320	if agaso.ID != nil {
321		objectMap["id"] = agaso.ID
322	}
323	if agaso.Location != nil {
324		objectMap["location"] = agaso.Location
325	}
326	if agaso.Tags != nil {
327		objectMap["tags"] = agaso.Tags
328	}
329	return json.Marshal(objectMap)
330}
331
332// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayAvailableSslOptions struct.
333func (agaso *ApplicationGatewayAvailableSslOptions) UnmarshalJSON(body []byte) error {
334	var m map[string]*json.RawMessage
335	err := json.Unmarshal(body, &m)
336	if err != nil {
337		return err
338	}
339	for k, v := range m {
340		switch k {
341		case "properties":
342			if v != nil {
343				var applicationGatewayAvailableSslOptionsPropertiesFormat ApplicationGatewayAvailableSslOptionsPropertiesFormat
344				err = json.Unmarshal(*v, &applicationGatewayAvailableSslOptionsPropertiesFormat)
345				if err != nil {
346					return err
347				}
348				agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat = &applicationGatewayAvailableSslOptionsPropertiesFormat
349			}
350		case "id":
351			if v != nil {
352				var ID string
353				err = json.Unmarshal(*v, &ID)
354				if err != nil {
355					return err
356				}
357				agaso.ID = &ID
358			}
359		case "name":
360			if v != nil {
361				var name string
362				err = json.Unmarshal(*v, &name)
363				if err != nil {
364					return err
365				}
366				agaso.Name = &name
367			}
368		case "type":
369			if v != nil {
370				var typeVar string
371				err = json.Unmarshal(*v, &typeVar)
372				if err != nil {
373					return err
374				}
375				agaso.Type = &typeVar
376			}
377		case "location":
378			if v != nil {
379				var location string
380				err = json.Unmarshal(*v, &location)
381				if err != nil {
382					return err
383				}
384				agaso.Location = &location
385			}
386		case "tags":
387			if v != nil {
388				var tags map[string]*string
389				err = json.Unmarshal(*v, &tags)
390				if err != nil {
391					return err
392				}
393				agaso.Tags = tags
394			}
395		}
396	}
397
398	return nil
399}
400
401// ApplicationGatewayAvailableSslOptionsPropertiesFormat properties of
402// ApplicationGatewayAvailableSslOptions
403type ApplicationGatewayAvailableSslOptionsPropertiesFormat struct {
404	// PredefinedPolicies - List of available Ssl predefined policy.
405	PredefinedPolicies *[]SubResource `json:"predefinedPolicies,omitempty"`
406	// DefaultPolicy - Name of the Ssl predefined policy applied by default to application gateway. Possible values include: 'AppGwSslPolicy20150501', 'AppGwSslPolicy20170401', 'AppGwSslPolicy20170401S'
407	DefaultPolicy ApplicationGatewaySslPolicyName `json:"defaultPolicy,omitempty"`
408	// AvailableCipherSuites - List of available Ssl cipher suites.
409	AvailableCipherSuites *[]ApplicationGatewaySslCipherSuite `json:"availableCipherSuites,omitempty"`
410	// AvailableProtocols - List of available Ssl protocols.
411	AvailableProtocols *[]ApplicationGatewaySslProtocol `json:"availableProtocols,omitempty"`
412}
413
414// ApplicationGatewayAvailableSslPredefinedPolicies response for ApplicationGatewayAvailableSslOptions API
415// service call.
416type ApplicationGatewayAvailableSslPredefinedPolicies struct {
417	autorest.Response `json:"-"`
418	// Value - List of available Ssl predefined policy.
419	Value *[]ApplicationGatewaySslPredefinedPolicy `json:"value,omitempty"`
420	// NextLink - URL to get the next set of results.
421	NextLink *string `json:"nextLink,omitempty"`
422}
423
424// ApplicationGatewayAvailableSslPredefinedPoliciesIterator provides access to a complete listing of
425// ApplicationGatewaySslPredefinedPolicy values.
426type ApplicationGatewayAvailableSslPredefinedPoliciesIterator struct {
427	i    int
428	page ApplicationGatewayAvailableSslPredefinedPoliciesPage
429}
430
431// NextWithContext advances to the next value.  If there was an error making
432// the request the iterator does not advance and the error is returned.
433func (iter *ApplicationGatewayAvailableSslPredefinedPoliciesIterator) NextWithContext(ctx context.Context) (err error) {
434	if tracing.IsEnabled() {
435		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayAvailableSslPredefinedPoliciesIterator.NextWithContext")
436		defer func() {
437			sc := -1
438			if iter.Response().Response.Response != nil {
439				sc = iter.Response().Response.Response.StatusCode
440			}
441			tracing.EndSpan(ctx, sc, err)
442		}()
443	}
444	iter.i++
445	if iter.i < len(iter.page.Values()) {
446		return nil
447	}
448	err = iter.page.NextWithContext(ctx)
449	if err != nil {
450		iter.i--
451		return err
452	}
453	iter.i = 0
454	return nil
455}
456
457// Next advances to the next value.  If there was an error making
458// the request the iterator does not advance and the error is returned.
459// Deprecated: Use NextWithContext() instead.
460func (iter *ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Next() error {
461	return iter.NextWithContext(context.Background())
462}
463
464// NotDone returns true if the enumeration should be started or is not yet complete.
465func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) NotDone() bool {
466	return iter.page.NotDone() && iter.i < len(iter.page.Values())
467}
468
469// Response returns the raw server response from the last page request.
470func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Response() ApplicationGatewayAvailableSslPredefinedPolicies {
471	return iter.page.Response()
472}
473
474// Value returns the current value or a zero-initialized value if the
475// iterator has advanced beyond the end of the collection.
476func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Value() ApplicationGatewaySslPredefinedPolicy {
477	if !iter.page.NotDone() {
478		return ApplicationGatewaySslPredefinedPolicy{}
479	}
480	return iter.page.Values()[iter.i]
481}
482
483// Creates a new instance of the ApplicationGatewayAvailableSslPredefinedPoliciesIterator type.
484func NewApplicationGatewayAvailableSslPredefinedPoliciesIterator(page ApplicationGatewayAvailableSslPredefinedPoliciesPage) ApplicationGatewayAvailableSslPredefinedPoliciesIterator {
485	return ApplicationGatewayAvailableSslPredefinedPoliciesIterator{page: page}
486}
487
488// IsEmpty returns true if the ListResult contains no values.
489func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) IsEmpty() bool {
490	return agaspp.Value == nil || len(*agaspp.Value) == 0
491}
492
493// hasNextLink returns true if the NextLink is not empty.
494func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) hasNextLink() bool {
495	return agaspp.NextLink != nil && len(*agaspp.NextLink) != 0
496}
497
498// applicationGatewayAvailableSslPredefinedPoliciesPreparer prepares a request to retrieve the next set of results.
499// It returns nil if no more results exist.
500func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) applicationGatewayAvailableSslPredefinedPoliciesPreparer(ctx context.Context) (*http.Request, error) {
501	if !agaspp.hasNextLink() {
502		return nil, nil
503	}
504	return autorest.Prepare((&http.Request{}).WithContext(ctx),
505		autorest.AsJSON(),
506		autorest.AsGet(),
507		autorest.WithBaseURL(to.String(agaspp.NextLink)))
508}
509
510// ApplicationGatewayAvailableSslPredefinedPoliciesPage contains a page of
511// ApplicationGatewaySslPredefinedPolicy values.
512type ApplicationGatewayAvailableSslPredefinedPoliciesPage struct {
513	fn     func(context.Context, ApplicationGatewayAvailableSslPredefinedPolicies) (ApplicationGatewayAvailableSslPredefinedPolicies, error)
514	agaspp ApplicationGatewayAvailableSslPredefinedPolicies
515}
516
517// NextWithContext advances to the next page of values.  If there was an error making
518// the request the page does not advance and the error is returned.
519func (page *ApplicationGatewayAvailableSslPredefinedPoliciesPage) NextWithContext(ctx context.Context) (err error) {
520	if tracing.IsEnabled() {
521		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayAvailableSslPredefinedPoliciesPage.NextWithContext")
522		defer func() {
523			sc := -1
524			if page.Response().Response.Response != nil {
525				sc = page.Response().Response.Response.StatusCode
526			}
527			tracing.EndSpan(ctx, sc, err)
528		}()
529	}
530	for {
531		next, err := page.fn(ctx, page.agaspp)
532		if err != nil {
533			return err
534		}
535		page.agaspp = next
536		if !next.hasNextLink() || !next.IsEmpty() {
537			break
538		}
539	}
540	return nil
541}
542
543// Next advances to the next page of values.  If there was an error making
544// the request the page does not advance and the error is returned.
545// Deprecated: Use NextWithContext() instead.
546func (page *ApplicationGatewayAvailableSslPredefinedPoliciesPage) Next() error {
547	return page.NextWithContext(context.Background())
548}
549
550// NotDone returns true if the page enumeration should be started or is not yet complete.
551func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) NotDone() bool {
552	return !page.agaspp.IsEmpty()
553}
554
555// Response returns the raw server response from the last page request.
556func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) Response() ApplicationGatewayAvailableSslPredefinedPolicies {
557	return page.agaspp
558}
559
560// Values returns the slice of values for the current page or nil if there are no values.
561func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) Values() []ApplicationGatewaySslPredefinedPolicy {
562	if page.agaspp.IsEmpty() {
563		return nil
564	}
565	return *page.agaspp.Value
566}
567
568// Creates a new instance of the ApplicationGatewayAvailableSslPredefinedPoliciesPage type.
569func NewApplicationGatewayAvailableSslPredefinedPoliciesPage(cur ApplicationGatewayAvailableSslPredefinedPolicies, getNextPage func(context.Context, ApplicationGatewayAvailableSslPredefinedPolicies) (ApplicationGatewayAvailableSslPredefinedPolicies, error)) ApplicationGatewayAvailableSslPredefinedPoliciesPage {
570	return ApplicationGatewayAvailableSslPredefinedPoliciesPage{
571		fn:     getNextPage,
572		agaspp: cur,
573	}
574}
575
576// ApplicationGatewayAvailableWafRuleSetsResult response for ApplicationGatewayAvailableWafRuleSets API
577// service call.
578type ApplicationGatewayAvailableWafRuleSetsResult struct {
579	autorest.Response `json:"-"`
580	// Value - The list of application gateway rule sets.
581	Value *[]ApplicationGatewayFirewallRuleSet `json:"value,omitempty"`
582}
583
584// ApplicationGatewayBackendAddress backend address of an application gateway.
585type ApplicationGatewayBackendAddress struct {
586	// Fqdn - Fully qualified domain name (FQDN).
587	Fqdn *string `json:"fqdn,omitempty"`
588	// IPAddress - IP address
589	IPAddress *string `json:"ipAddress,omitempty"`
590}
591
592// ApplicationGatewayBackendAddressPool backend Address Pool of an application gateway.
593type ApplicationGatewayBackendAddressPool struct {
594	*ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"`
595	// Name - Name of the backend address pool that is unique within an Application Gateway.
596	Name *string `json:"name,omitempty"`
597	// Etag - A unique read-only string that changes whenever the resource is updated.
598	Etag *string `json:"etag,omitempty"`
599	// Type - Type of the resource.
600	Type *string `json:"type,omitempty"`
601	// ID - Resource ID.
602	ID *string `json:"id,omitempty"`
603}
604
605// MarshalJSON is the custom marshaler for ApplicationGatewayBackendAddressPool.
606func (agbap ApplicationGatewayBackendAddressPool) MarshalJSON() ([]byte, error) {
607	objectMap := make(map[string]interface{})
608	if agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat != nil {
609		objectMap["properties"] = agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat
610	}
611	if agbap.Name != nil {
612		objectMap["name"] = agbap.Name
613	}
614	if agbap.Etag != nil {
615		objectMap["etag"] = agbap.Etag
616	}
617	if agbap.Type != nil {
618		objectMap["type"] = agbap.Type
619	}
620	if agbap.ID != nil {
621		objectMap["id"] = agbap.ID
622	}
623	return json.Marshal(objectMap)
624}
625
626// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayBackendAddressPool struct.
627func (agbap *ApplicationGatewayBackendAddressPool) UnmarshalJSON(body []byte) error {
628	var m map[string]*json.RawMessage
629	err := json.Unmarshal(body, &m)
630	if err != nil {
631		return err
632	}
633	for k, v := range m {
634		switch k {
635		case "properties":
636			if v != nil {
637				var applicationGatewayBackendAddressPoolPropertiesFormat ApplicationGatewayBackendAddressPoolPropertiesFormat
638				err = json.Unmarshal(*v, &applicationGatewayBackendAddressPoolPropertiesFormat)
639				if err != nil {
640					return err
641				}
642				agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat = &applicationGatewayBackendAddressPoolPropertiesFormat
643			}
644		case "name":
645			if v != nil {
646				var name string
647				err = json.Unmarshal(*v, &name)
648				if err != nil {
649					return err
650				}
651				agbap.Name = &name
652			}
653		case "etag":
654			if v != nil {
655				var etag string
656				err = json.Unmarshal(*v, &etag)
657				if err != nil {
658					return err
659				}
660				agbap.Etag = &etag
661			}
662		case "type":
663			if v != nil {
664				var typeVar string
665				err = json.Unmarshal(*v, &typeVar)
666				if err != nil {
667					return err
668				}
669				agbap.Type = &typeVar
670			}
671		case "id":
672			if v != nil {
673				var ID string
674				err = json.Unmarshal(*v, &ID)
675				if err != nil {
676					return err
677				}
678				agbap.ID = &ID
679			}
680		}
681	}
682
683	return nil
684}
685
686// ApplicationGatewayBackendAddressPoolPropertiesFormat properties of Backend Address Pool of an
687// application gateway.
688type ApplicationGatewayBackendAddressPoolPropertiesFormat struct {
689	// BackendIPConfigurations - Collection of references to IPs defined in network interfaces.
690	BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"`
691	// BackendAddresses - Backend addresses
692	BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"`
693	// ProvisioningState - Provisioning state of the backend address pool resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
694	ProvisioningState *string `json:"provisioningState,omitempty"`
695}
696
697// ApplicationGatewayBackendHealth list of ApplicationGatewayBackendHealthPool resources.
698type ApplicationGatewayBackendHealth struct {
699	autorest.Response   `json:"-"`
700	BackendAddressPools *[]ApplicationGatewayBackendHealthPool `json:"backendAddressPools,omitempty"`
701}
702
703// ApplicationGatewayBackendHealthHTTPSettings application gateway BackendHealthHttp settings.
704type ApplicationGatewayBackendHealthHTTPSettings struct {
705	// BackendHTTPSettings - Reference of an ApplicationGatewayBackendHttpSettings resource.
706	BackendHTTPSettings *ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettings,omitempty"`
707	// Servers - List of ApplicationGatewayBackendHealthServer resources.
708	Servers *[]ApplicationGatewayBackendHealthServer `json:"servers,omitempty"`
709}
710
711// ApplicationGatewayBackendHealthPool application gateway BackendHealth pool.
712type ApplicationGatewayBackendHealthPool struct {
713	// BackendAddressPool - Reference of an ApplicationGatewayBackendAddressPool resource.
714	BackendAddressPool *ApplicationGatewayBackendAddressPool `json:"backendAddressPool,omitempty"`
715	// BackendHTTPSettingsCollection - List of ApplicationGatewayBackendHealthHttpSettings resources.
716	BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHealthHTTPSettings `json:"backendHttpSettingsCollection,omitempty"`
717}
718
719// ApplicationGatewayBackendHealthServer application gateway backendhealth http settings.
720type ApplicationGatewayBackendHealthServer struct {
721	// Address - IP address or FQDN of backend server.
722	Address *string `json:"address,omitempty"`
723	// IPConfiguration - Reference of IP configuration of backend server.
724	IPConfiguration *InterfaceIPConfiguration `json:"ipConfiguration,omitempty"`
725	// Health - Health of backend server. Possible values include: 'Unknown', 'Up', 'Down', 'Partial', 'Draining'
726	Health ApplicationGatewayBackendHealthServerHealth `json:"health,omitempty"`
727}
728
729// ApplicationGatewayBackendHTTPSettings backend address pool settings of an application gateway.
730type ApplicationGatewayBackendHTTPSettings struct {
731	*ApplicationGatewayBackendHTTPSettingsPropertiesFormat `json:"properties,omitempty"`
732	// Name - Name of the backend http settings that is unique within an Application Gateway.
733	Name *string `json:"name,omitempty"`
734	// Etag - A unique read-only string that changes whenever the resource is updated.
735	Etag *string `json:"etag,omitempty"`
736	// Type - Type of the resource.
737	Type *string `json:"type,omitempty"`
738	// ID - Resource ID.
739	ID *string `json:"id,omitempty"`
740}
741
742// MarshalJSON is the custom marshaler for ApplicationGatewayBackendHTTPSettings.
743func (agbhs ApplicationGatewayBackendHTTPSettings) MarshalJSON() ([]byte, error) {
744	objectMap := make(map[string]interface{})
745	if agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat != nil {
746		objectMap["properties"] = agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat
747	}
748	if agbhs.Name != nil {
749		objectMap["name"] = agbhs.Name
750	}
751	if agbhs.Etag != nil {
752		objectMap["etag"] = agbhs.Etag
753	}
754	if agbhs.Type != nil {
755		objectMap["type"] = agbhs.Type
756	}
757	if agbhs.ID != nil {
758		objectMap["id"] = agbhs.ID
759	}
760	return json.Marshal(objectMap)
761}
762
763// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayBackendHTTPSettings struct.
764func (agbhs *ApplicationGatewayBackendHTTPSettings) UnmarshalJSON(body []byte) error {
765	var m map[string]*json.RawMessage
766	err := json.Unmarshal(body, &m)
767	if err != nil {
768		return err
769	}
770	for k, v := range m {
771		switch k {
772		case "properties":
773			if v != nil {
774				var applicationGatewayBackendHTTPSettingsPropertiesFormat ApplicationGatewayBackendHTTPSettingsPropertiesFormat
775				err = json.Unmarshal(*v, &applicationGatewayBackendHTTPSettingsPropertiesFormat)
776				if err != nil {
777					return err
778				}
779				agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat = &applicationGatewayBackendHTTPSettingsPropertiesFormat
780			}
781		case "name":
782			if v != nil {
783				var name string
784				err = json.Unmarshal(*v, &name)
785				if err != nil {
786					return err
787				}
788				agbhs.Name = &name
789			}
790		case "etag":
791			if v != nil {
792				var etag string
793				err = json.Unmarshal(*v, &etag)
794				if err != nil {
795					return err
796				}
797				agbhs.Etag = &etag
798			}
799		case "type":
800			if v != nil {
801				var typeVar string
802				err = json.Unmarshal(*v, &typeVar)
803				if err != nil {
804					return err
805				}
806				agbhs.Type = &typeVar
807			}
808		case "id":
809			if v != nil {
810				var ID string
811				err = json.Unmarshal(*v, &ID)
812				if err != nil {
813					return err
814				}
815				agbhs.ID = &ID
816			}
817		}
818	}
819
820	return nil
821}
822
823// ApplicationGatewayBackendHTTPSettingsPropertiesFormat properties of Backend address pool settings of an
824// application gateway.
825type ApplicationGatewayBackendHTTPSettingsPropertiesFormat struct {
826	// Port - The destination port on the backend.
827	Port *int32 `json:"port,omitempty"`
828	// Protocol - The protocol used to communicate with the backend. Possible values are 'Http' and 'Https'. Possible values include: 'HTTP', 'HTTPS'
829	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
830	// CookieBasedAffinity - Cookie based affinity. Possible values include: 'Enabled', 'Disabled'
831	CookieBasedAffinity ApplicationGatewayCookieBasedAffinity `json:"cookieBasedAffinity,omitempty"`
832	// 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.
833	RequestTimeout *int32 `json:"requestTimeout,omitempty"`
834	// Probe - Probe resource of an application gateway.
835	Probe *SubResource `json:"probe,omitempty"`
836	// AuthenticationCertificates - Array of references to application gateway authentication certificates.
837	AuthenticationCertificates *[]SubResource `json:"authenticationCertificates,omitempty"`
838	// TrustedRootCertificates - Array of references to application gateway trusted root certificates.
839	TrustedRootCertificates *[]SubResource `json:"trustedRootCertificates,omitempty"`
840	// ConnectionDraining - Connection draining of the backend http settings resource.
841	ConnectionDraining *ApplicationGatewayConnectionDraining `json:"connectionDraining,omitempty"`
842	// HostName - Host header to be sent to the backend servers.
843	HostName *string `json:"hostName,omitempty"`
844	// PickHostNameFromBackendAddress - Whether to pick host header should be picked from the host name of the backend server. Default value is false.
845	PickHostNameFromBackendAddress *bool `json:"pickHostNameFromBackendAddress,omitempty"`
846	// AffinityCookieName - Cookie name to use for the affinity cookie.
847	AffinityCookieName *string `json:"affinityCookieName,omitempty"`
848	// ProbeEnabled - Whether the probe is enabled. Default value is false.
849	ProbeEnabled *bool `json:"probeEnabled,omitempty"`
850	// Path - Path which should be used as a prefix for all HTTP requests. Null means no path will be prefixed. Default value is null.
851	Path *string `json:"path,omitempty"`
852	// ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
853	ProvisioningState *string `json:"provisioningState,omitempty"`
854}
855
856// ApplicationGatewayConnectionDraining connection draining allows open connections to a backend server to
857// be active for a specified time after the backend server got removed from the configuration.
858type ApplicationGatewayConnectionDraining struct {
859	// Enabled - Whether connection draining is enabled or not.
860	Enabled *bool `json:"enabled,omitempty"`
861	// DrainTimeoutInSec - The number of seconds connection draining is active. Acceptable values are from 1 second to 3600 seconds.
862	DrainTimeoutInSec *int32 `json:"drainTimeoutInSec,omitempty"`
863}
864
865// ApplicationGatewayCustomError customer error of an application gateway.
866type ApplicationGatewayCustomError struct {
867	// StatusCode - Status code of the application gateway customer error. Possible values include: 'HTTPStatus403', 'HTTPStatus502'
868	StatusCode ApplicationGatewayCustomErrorStatusCode `json:"statusCode,omitempty"`
869	// CustomErrorPageURL - Error page URL of the application gateway customer error.
870	CustomErrorPageURL *string `json:"customErrorPageUrl,omitempty"`
871}
872
873// ApplicationGatewayFirewallDisabledRuleGroup allows to disable rules within a rule group or an entire
874// rule group.
875type ApplicationGatewayFirewallDisabledRuleGroup struct {
876	// RuleGroupName - The name of the rule group that will be disabled.
877	RuleGroupName *string `json:"ruleGroupName,omitempty"`
878	// Rules - The list of rules that will be disabled. If null, all rules of the rule group will be disabled.
879	Rules *[]int32 `json:"rules,omitempty"`
880}
881
882// ApplicationGatewayFirewallExclusion allow to exclude some variable satisfy the condition for the WAF
883// check
884type ApplicationGatewayFirewallExclusion struct {
885	// MatchVariable - The variable to be excluded.
886	MatchVariable *string `json:"matchVariable,omitempty"`
887	// SelectorMatchOperator - When matchVariable is a collection, operate on the selector to specify which elements in the collection this exclusion applies to.
888	SelectorMatchOperator *string `json:"selectorMatchOperator,omitempty"`
889	// Selector - When matchVariable is a collection, operator used to specify which elements in the collection this exclusion applies to.
890	Selector *string `json:"selector,omitempty"`
891}
892
893// ApplicationGatewayFirewallRule a web application firewall rule.
894type ApplicationGatewayFirewallRule struct {
895	// RuleID - The identifier of the web application firewall rule.
896	RuleID *int32 `json:"ruleId,omitempty"`
897	// Description - The description of the web application firewall rule.
898	Description *string `json:"description,omitempty"`
899}
900
901// ApplicationGatewayFirewallRuleGroup a web application firewall rule group.
902type ApplicationGatewayFirewallRuleGroup struct {
903	// RuleGroupName - The name of the web application firewall rule group.
904	RuleGroupName *string `json:"ruleGroupName,omitempty"`
905	// Description - The description of the web application firewall rule group.
906	Description *string `json:"description,omitempty"`
907	// Rules - The rules of the web application firewall rule group.
908	Rules *[]ApplicationGatewayFirewallRule `json:"rules,omitempty"`
909}
910
911// ApplicationGatewayFirewallRuleSet a web application firewall rule set.
912type ApplicationGatewayFirewallRuleSet struct {
913	*ApplicationGatewayFirewallRuleSetPropertiesFormat `json:"properties,omitempty"`
914	// ID - Resource ID.
915	ID *string `json:"id,omitempty"`
916	// Name - READ-ONLY; Resource name.
917	Name *string `json:"name,omitempty"`
918	// Type - READ-ONLY; Resource type.
919	Type *string `json:"type,omitempty"`
920	// Location - Resource location.
921	Location *string `json:"location,omitempty"`
922	// Tags - Resource tags.
923	Tags map[string]*string `json:"tags"`
924}
925
926// MarshalJSON is the custom marshaler for ApplicationGatewayFirewallRuleSet.
927func (agfrs ApplicationGatewayFirewallRuleSet) MarshalJSON() ([]byte, error) {
928	objectMap := make(map[string]interface{})
929	if agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat != nil {
930		objectMap["properties"] = agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat
931	}
932	if agfrs.ID != nil {
933		objectMap["id"] = agfrs.ID
934	}
935	if agfrs.Location != nil {
936		objectMap["location"] = agfrs.Location
937	}
938	if agfrs.Tags != nil {
939		objectMap["tags"] = agfrs.Tags
940	}
941	return json.Marshal(objectMap)
942}
943
944// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFirewallRuleSet struct.
945func (agfrs *ApplicationGatewayFirewallRuleSet) UnmarshalJSON(body []byte) error {
946	var m map[string]*json.RawMessage
947	err := json.Unmarshal(body, &m)
948	if err != nil {
949		return err
950	}
951	for k, v := range m {
952		switch k {
953		case "properties":
954			if v != nil {
955				var applicationGatewayFirewallRuleSetPropertiesFormat ApplicationGatewayFirewallRuleSetPropertiesFormat
956				err = json.Unmarshal(*v, &applicationGatewayFirewallRuleSetPropertiesFormat)
957				if err != nil {
958					return err
959				}
960				agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat = &applicationGatewayFirewallRuleSetPropertiesFormat
961			}
962		case "id":
963			if v != nil {
964				var ID string
965				err = json.Unmarshal(*v, &ID)
966				if err != nil {
967					return err
968				}
969				agfrs.ID = &ID
970			}
971		case "name":
972			if v != nil {
973				var name string
974				err = json.Unmarshal(*v, &name)
975				if err != nil {
976					return err
977				}
978				agfrs.Name = &name
979			}
980		case "type":
981			if v != nil {
982				var typeVar string
983				err = json.Unmarshal(*v, &typeVar)
984				if err != nil {
985					return err
986				}
987				agfrs.Type = &typeVar
988			}
989		case "location":
990			if v != nil {
991				var location string
992				err = json.Unmarshal(*v, &location)
993				if err != nil {
994					return err
995				}
996				agfrs.Location = &location
997			}
998		case "tags":
999			if v != nil {
1000				var tags map[string]*string
1001				err = json.Unmarshal(*v, &tags)
1002				if err != nil {
1003					return err
1004				}
1005				agfrs.Tags = tags
1006			}
1007		}
1008	}
1009
1010	return nil
1011}
1012
1013// ApplicationGatewayFirewallRuleSetPropertiesFormat properties of the web application firewall rule set.
1014type ApplicationGatewayFirewallRuleSetPropertiesFormat struct {
1015	// ProvisioningState - The provisioning state of the web application firewall rule set.
1016	ProvisioningState *string `json:"provisioningState,omitempty"`
1017	// RuleSetType - The type of the web application firewall rule set.
1018	RuleSetType *string `json:"ruleSetType,omitempty"`
1019	// RuleSetVersion - The version of the web application firewall rule set type.
1020	RuleSetVersion *string `json:"ruleSetVersion,omitempty"`
1021	// RuleGroups - The rule groups of the web application firewall rule set.
1022	RuleGroups *[]ApplicationGatewayFirewallRuleGroup `json:"ruleGroups,omitempty"`
1023}
1024
1025// ApplicationGatewayFrontendIPConfiguration frontend IP configuration of an application gateway.
1026type ApplicationGatewayFrontendIPConfiguration struct {
1027	*ApplicationGatewayFrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"`
1028	// Name - Name of the frontend IP configuration that is unique within an Application Gateway.
1029	Name *string `json:"name,omitempty"`
1030	// Etag - A unique read-only string that changes whenever the resource is updated.
1031	Etag *string `json:"etag,omitempty"`
1032	// Type - Type of the resource.
1033	Type *string `json:"type,omitempty"`
1034	// ID - Resource ID.
1035	ID *string `json:"id,omitempty"`
1036}
1037
1038// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendIPConfiguration.
1039func (agfic ApplicationGatewayFrontendIPConfiguration) MarshalJSON() ([]byte, error) {
1040	objectMap := make(map[string]interface{})
1041	if agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat != nil {
1042		objectMap["properties"] = agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat
1043	}
1044	if agfic.Name != nil {
1045		objectMap["name"] = agfic.Name
1046	}
1047	if agfic.Etag != nil {
1048		objectMap["etag"] = agfic.Etag
1049	}
1050	if agfic.Type != nil {
1051		objectMap["type"] = agfic.Type
1052	}
1053	if agfic.ID != nil {
1054		objectMap["id"] = agfic.ID
1055	}
1056	return json.Marshal(objectMap)
1057}
1058
1059// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFrontendIPConfiguration struct.
1060func (agfic *ApplicationGatewayFrontendIPConfiguration) UnmarshalJSON(body []byte) error {
1061	var m map[string]*json.RawMessage
1062	err := json.Unmarshal(body, &m)
1063	if err != nil {
1064		return err
1065	}
1066	for k, v := range m {
1067		switch k {
1068		case "properties":
1069			if v != nil {
1070				var applicationGatewayFrontendIPConfigurationPropertiesFormat ApplicationGatewayFrontendIPConfigurationPropertiesFormat
1071				err = json.Unmarshal(*v, &applicationGatewayFrontendIPConfigurationPropertiesFormat)
1072				if err != nil {
1073					return err
1074				}
1075				agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat = &applicationGatewayFrontendIPConfigurationPropertiesFormat
1076			}
1077		case "name":
1078			if v != nil {
1079				var name string
1080				err = json.Unmarshal(*v, &name)
1081				if err != nil {
1082					return err
1083				}
1084				agfic.Name = &name
1085			}
1086		case "etag":
1087			if v != nil {
1088				var etag string
1089				err = json.Unmarshal(*v, &etag)
1090				if err != nil {
1091					return err
1092				}
1093				agfic.Etag = &etag
1094			}
1095		case "type":
1096			if v != nil {
1097				var typeVar string
1098				err = json.Unmarshal(*v, &typeVar)
1099				if err != nil {
1100					return err
1101				}
1102				agfic.Type = &typeVar
1103			}
1104		case "id":
1105			if v != nil {
1106				var ID string
1107				err = json.Unmarshal(*v, &ID)
1108				if err != nil {
1109					return err
1110				}
1111				agfic.ID = &ID
1112			}
1113		}
1114	}
1115
1116	return nil
1117}
1118
1119// ApplicationGatewayFrontendIPConfigurationPropertiesFormat properties of Frontend IP configuration of an
1120// application gateway.
1121type ApplicationGatewayFrontendIPConfigurationPropertiesFormat struct {
1122	// PrivateIPAddress - PrivateIPAddress of the network interface IP Configuration.
1123	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
1124	// PrivateIPAllocationMethod - PrivateIP allocation method. Possible values include: 'Static', 'Dynamic'
1125	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
1126	// Subnet - Reference of the subnet resource.
1127	Subnet *SubResource `json:"subnet,omitempty"`
1128	// PublicIPAddress - Reference of the PublicIP resource.
1129	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
1130	// ProvisioningState - Provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1131	ProvisioningState *string `json:"provisioningState,omitempty"`
1132}
1133
1134// ApplicationGatewayFrontendPort frontend port of an application gateway.
1135type ApplicationGatewayFrontendPort struct {
1136	*ApplicationGatewayFrontendPortPropertiesFormat `json:"properties,omitempty"`
1137	// Name - Name of the frontend port that is unique within an Application Gateway
1138	Name *string `json:"name,omitempty"`
1139	// Etag - A unique read-only string that changes whenever the resource is updated.
1140	Etag *string `json:"etag,omitempty"`
1141	// Type - Type of the resource.
1142	Type *string `json:"type,omitempty"`
1143	// ID - Resource ID.
1144	ID *string `json:"id,omitempty"`
1145}
1146
1147// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendPort.
1148func (agfp ApplicationGatewayFrontendPort) MarshalJSON() ([]byte, error) {
1149	objectMap := make(map[string]interface{})
1150	if agfp.ApplicationGatewayFrontendPortPropertiesFormat != nil {
1151		objectMap["properties"] = agfp.ApplicationGatewayFrontendPortPropertiesFormat
1152	}
1153	if agfp.Name != nil {
1154		objectMap["name"] = agfp.Name
1155	}
1156	if agfp.Etag != nil {
1157		objectMap["etag"] = agfp.Etag
1158	}
1159	if agfp.Type != nil {
1160		objectMap["type"] = agfp.Type
1161	}
1162	if agfp.ID != nil {
1163		objectMap["id"] = agfp.ID
1164	}
1165	return json.Marshal(objectMap)
1166}
1167
1168// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFrontendPort struct.
1169func (agfp *ApplicationGatewayFrontendPort) UnmarshalJSON(body []byte) error {
1170	var m map[string]*json.RawMessage
1171	err := json.Unmarshal(body, &m)
1172	if err != nil {
1173		return err
1174	}
1175	for k, v := range m {
1176		switch k {
1177		case "properties":
1178			if v != nil {
1179				var applicationGatewayFrontendPortPropertiesFormat ApplicationGatewayFrontendPortPropertiesFormat
1180				err = json.Unmarshal(*v, &applicationGatewayFrontendPortPropertiesFormat)
1181				if err != nil {
1182					return err
1183				}
1184				agfp.ApplicationGatewayFrontendPortPropertiesFormat = &applicationGatewayFrontendPortPropertiesFormat
1185			}
1186		case "name":
1187			if v != nil {
1188				var name string
1189				err = json.Unmarshal(*v, &name)
1190				if err != nil {
1191					return err
1192				}
1193				agfp.Name = &name
1194			}
1195		case "etag":
1196			if v != nil {
1197				var etag string
1198				err = json.Unmarshal(*v, &etag)
1199				if err != nil {
1200					return err
1201				}
1202				agfp.Etag = &etag
1203			}
1204		case "type":
1205			if v != nil {
1206				var typeVar string
1207				err = json.Unmarshal(*v, &typeVar)
1208				if err != nil {
1209					return err
1210				}
1211				agfp.Type = &typeVar
1212			}
1213		case "id":
1214			if v != nil {
1215				var ID string
1216				err = json.Unmarshal(*v, &ID)
1217				if err != nil {
1218					return err
1219				}
1220				agfp.ID = &ID
1221			}
1222		}
1223	}
1224
1225	return nil
1226}
1227
1228// ApplicationGatewayFrontendPortPropertiesFormat properties of Frontend port of an application gateway.
1229type ApplicationGatewayFrontendPortPropertiesFormat struct {
1230	// Port - Frontend port
1231	Port *int32 `json:"port,omitempty"`
1232	// ProvisioningState - Provisioning state of the frontend port resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1233	ProvisioningState *string `json:"provisioningState,omitempty"`
1234}
1235
1236// ApplicationGatewayHeaderConfiguration header configuration of the Actions set in Application Gateway.
1237type ApplicationGatewayHeaderConfiguration struct {
1238	// HeaderName - Header name of the header configuration
1239	HeaderName *string `json:"headerName,omitempty"`
1240	// HeaderValue - Header value of the header configuration
1241	HeaderValue *string `json:"headerValue,omitempty"`
1242}
1243
1244// ApplicationGatewayHTTPListener http listener of an application gateway.
1245type ApplicationGatewayHTTPListener struct {
1246	*ApplicationGatewayHTTPListenerPropertiesFormat `json:"properties,omitempty"`
1247	// Name - Name of the HTTP listener that is unique within an Application Gateway.
1248	Name *string `json:"name,omitempty"`
1249	// Etag - A unique read-only string that changes whenever the resource is updated.
1250	Etag *string `json:"etag,omitempty"`
1251	// Type - 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 ApplicationGatewayHTTPListener.
1258func (aghl ApplicationGatewayHTTPListener) MarshalJSON() ([]byte, error) {
1259	objectMap := make(map[string]interface{})
1260	if aghl.ApplicationGatewayHTTPListenerPropertiesFormat != nil {
1261		objectMap["properties"] = aghl.ApplicationGatewayHTTPListenerPropertiesFormat
1262	}
1263	if aghl.Name != nil {
1264		objectMap["name"] = aghl.Name
1265	}
1266	if aghl.Etag != nil {
1267		objectMap["etag"] = aghl.Etag
1268	}
1269	if aghl.Type != nil {
1270		objectMap["type"] = aghl.Type
1271	}
1272	if aghl.ID != nil {
1273		objectMap["id"] = aghl.ID
1274	}
1275	return json.Marshal(objectMap)
1276}
1277
1278// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayHTTPListener struct.
1279func (aghl *ApplicationGatewayHTTPListener) UnmarshalJSON(body []byte) error {
1280	var m map[string]*json.RawMessage
1281	err := json.Unmarshal(body, &m)
1282	if err != nil {
1283		return err
1284	}
1285	for k, v := range m {
1286		switch k {
1287		case "properties":
1288			if v != nil {
1289				var applicationGatewayHTTPListenerPropertiesFormat ApplicationGatewayHTTPListenerPropertiesFormat
1290				err = json.Unmarshal(*v, &applicationGatewayHTTPListenerPropertiesFormat)
1291				if err != nil {
1292					return err
1293				}
1294				aghl.ApplicationGatewayHTTPListenerPropertiesFormat = &applicationGatewayHTTPListenerPropertiesFormat
1295			}
1296		case "name":
1297			if v != nil {
1298				var name string
1299				err = json.Unmarshal(*v, &name)
1300				if err != nil {
1301					return err
1302				}
1303				aghl.Name = &name
1304			}
1305		case "etag":
1306			if v != nil {
1307				var etag string
1308				err = json.Unmarshal(*v, &etag)
1309				if err != nil {
1310					return err
1311				}
1312				aghl.Etag = &etag
1313			}
1314		case "type":
1315			if v != nil {
1316				var typeVar string
1317				err = json.Unmarshal(*v, &typeVar)
1318				if err != nil {
1319					return err
1320				}
1321				aghl.Type = &typeVar
1322			}
1323		case "id":
1324			if v != nil {
1325				var ID string
1326				err = json.Unmarshal(*v, &ID)
1327				if err != nil {
1328					return err
1329				}
1330				aghl.ID = &ID
1331			}
1332		}
1333	}
1334
1335	return nil
1336}
1337
1338// ApplicationGatewayHTTPListenerPropertiesFormat properties of HTTP listener of an application gateway.
1339type ApplicationGatewayHTTPListenerPropertiesFormat struct {
1340	// FrontendIPConfiguration - Frontend IP configuration resource of an application gateway.
1341	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
1342	// FrontendPort - Frontend port resource of an application gateway.
1343	FrontendPort *SubResource `json:"frontendPort,omitempty"`
1344	// Protocol - Protocol of the HTTP listener. Possible values are 'Http' and 'Https'. Possible values include: 'HTTP', 'HTTPS'
1345	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
1346	// HostName - Host name of HTTP listener.
1347	HostName *string `json:"hostName,omitempty"`
1348	// SslCertificate - SSL certificate resource of an application gateway.
1349	SslCertificate *SubResource `json:"sslCertificate,omitempty"`
1350	// RequireServerNameIndication - Applicable only if protocol is https. Enables SNI for multi-hosting.
1351	RequireServerNameIndication *bool `json:"requireServerNameIndication,omitempty"`
1352	// ProvisioningState - Provisioning state of the HTTP listener resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1353	ProvisioningState *string `json:"provisioningState,omitempty"`
1354	// CustomErrorConfigurations - Custom error configurations of the HTTP listener.
1355	CustomErrorConfigurations *[]ApplicationGatewayCustomError `json:"customErrorConfigurations,omitempty"`
1356}
1357
1358// ApplicationGatewayIPConfiguration IP configuration of an application gateway. Currently 1 public and 1
1359// private IP configuration is allowed.
1360type ApplicationGatewayIPConfiguration struct {
1361	*ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"`
1362	// Name - Name of the IP configuration that is unique within an Application Gateway.
1363	Name *string `json:"name,omitempty"`
1364	// Etag - A unique read-only string that changes whenever the resource is updated.
1365	Etag *string `json:"etag,omitempty"`
1366	// Type - Type of the resource.
1367	Type *string `json:"type,omitempty"`
1368	// ID - Resource ID.
1369	ID *string `json:"id,omitempty"`
1370}
1371
1372// MarshalJSON is the custom marshaler for ApplicationGatewayIPConfiguration.
1373func (agic ApplicationGatewayIPConfiguration) MarshalJSON() ([]byte, error) {
1374	objectMap := make(map[string]interface{})
1375	if agic.ApplicationGatewayIPConfigurationPropertiesFormat != nil {
1376		objectMap["properties"] = agic.ApplicationGatewayIPConfigurationPropertiesFormat
1377	}
1378	if agic.Name != nil {
1379		objectMap["name"] = agic.Name
1380	}
1381	if agic.Etag != nil {
1382		objectMap["etag"] = agic.Etag
1383	}
1384	if agic.Type != nil {
1385		objectMap["type"] = agic.Type
1386	}
1387	if agic.ID != nil {
1388		objectMap["id"] = agic.ID
1389	}
1390	return json.Marshal(objectMap)
1391}
1392
1393// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayIPConfiguration struct.
1394func (agic *ApplicationGatewayIPConfiguration) UnmarshalJSON(body []byte) error {
1395	var m map[string]*json.RawMessage
1396	err := json.Unmarshal(body, &m)
1397	if err != nil {
1398		return err
1399	}
1400	for k, v := range m {
1401		switch k {
1402		case "properties":
1403			if v != nil {
1404				var applicationGatewayIPConfigurationPropertiesFormat ApplicationGatewayIPConfigurationPropertiesFormat
1405				err = json.Unmarshal(*v, &applicationGatewayIPConfigurationPropertiesFormat)
1406				if err != nil {
1407					return err
1408				}
1409				agic.ApplicationGatewayIPConfigurationPropertiesFormat = &applicationGatewayIPConfigurationPropertiesFormat
1410			}
1411		case "name":
1412			if v != nil {
1413				var name string
1414				err = json.Unmarshal(*v, &name)
1415				if err != nil {
1416					return err
1417				}
1418				agic.Name = &name
1419			}
1420		case "etag":
1421			if v != nil {
1422				var etag string
1423				err = json.Unmarshal(*v, &etag)
1424				if err != nil {
1425					return err
1426				}
1427				agic.Etag = &etag
1428			}
1429		case "type":
1430			if v != nil {
1431				var typeVar string
1432				err = json.Unmarshal(*v, &typeVar)
1433				if err != nil {
1434					return err
1435				}
1436				agic.Type = &typeVar
1437			}
1438		case "id":
1439			if v != nil {
1440				var ID string
1441				err = json.Unmarshal(*v, &ID)
1442				if err != nil {
1443					return err
1444				}
1445				agic.ID = &ID
1446			}
1447		}
1448	}
1449
1450	return nil
1451}
1452
1453// ApplicationGatewayIPConfigurationPropertiesFormat properties of IP configuration of an application
1454// gateway.
1455type ApplicationGatewayIPConfigurationPropertiesFormat struct {
1456	// Subnet - Reference of the subnet resource. A subnet from where application gateway gets its private address.
1457	Subnet *SubResource `json:"subnet,omitempty"`
1458	// ProvisioningState - Provisioning state of the application gateway subnet resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1459	ProvisioningState *string `json:"provisioningState,omitempty"`
1460}
1461
1462// ApplicationGatewayListResult response for ListApplicationGateways API service call.
1463type ApplicationGatewayListResult struct {
1464	autorest.Response `json:"-"`
1465	// Value - List of an application gateways in a resource group.
1466	Value *[]ApplicationGateway `json:"value,omitempty"`
1467	// NextLink - URL to get the next set of results.
1468	NextLink *string `json:"nextLink,omitempty"`
1469}
1470
1471// ApplicationGatewayListResultIterator provides access to a complete listing of ApplicationGateway values.
1472type ApplicationGatewayListResultIterator struct {
1473	i    int
1474	page ApplicationGatewayListResultPage
1475}
1476
1477// NextWithContext advances to the next value.  If there was an error making
1478// the request the iterator does not advance and the error is returned.
1479func (iter *ApplicationGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
1480	if tracing.IsEnabled() {
1481		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayListResultIterator.NextWithContext")
1482		defer func() {
1483			sc := -1
1484			if iter.Response().Response.Response != nil {
1485				sc = iter.Response().Response.Response.StatusCode
1486			}
1487			tracing.EndSpan(ctx, sc, err)
1488		}()
1489	}
1490	iter.i++
1491	if iter.i < len(iter.page.Values()) {
1492		return nil
1493	}
1494	err = iter.page.NextWithContext(ctx)
1495	if err != nil {
1496		iter.i--
1497		return err
1498	}
1499	iter.i = 0
1500	return nil
1501}
1502
1503// Next advances to the next value.  If there was an error making
1504// the request the iterator does not advance and the error is returned.
1505// Deprecated: Use NextWithContext() instead.
1506func (iter *ApplicationGatewayListResultIterator) Next() error {
1507	return iter.NextWithContext(context.Background())
1508}
1509
1510// NotDone returns true if the enumeration should be started or is not yet complete.
1511func (iter ApplicationGatewayListResultIterator) NotDone() bool {
1512	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1513}
1514
1515// Response returns the raw server response from the last page request.
1516func (iter ApplicationGatewayListResultIterator) Response() ApplicationGatewayListResult {
1517	return iter.page.Response()
1518}
1519
1520// Value returns the current value or a zero-initialized value if the
1521// iterator has advanced beyond the end of the collection.
1522func (iter ApplicationGatewayListResultIterator) Value() ApplicationGateway {
1523	if !iter.page.NotDone() {
1524		return ApplicationGateway{}
1525	}
1526	return iter.page.Values()[iter.i]
1527}
1528
1529// Creates a new instance of the ApplicationGatewayListResultIterator type.
1530func NewApplicationGatewayListResultIterator(page ApplicationGatewayListResultPage) ApplicationGatewayListResultIterator {
1531	return ApplicationGatewayListResultIterator{page: page}
1532}
1533
1534// IsEmpty returns true if the ListResult contains no values.
1535func (aglr ApplicationGatewayListResult) IsEmpty() bool {
1536	return aglr.Value == nil || len(*aglr.Value) == 0
1537}
1538
1539// hasNextLink returns true if the NextLink is not empty.
1540func (aglr ApplicationGatewayListResult) hasNextLink() bool {
1541	return aglr.NextLink != nil && len(*aglr.NextLink) != 0
1542}
1543
1544// applicationGatewayListResultPreparer prepares a request to retrieve the next set of results.
1545// It returns nil if no more results exist.
1546func (aglr ApplicationGatewayListResult) applicationGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
1547	if !aglr.hasNextLink() {
1548		return nil, nil
1549	}
1550	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1551		autorest.AsJSON(),
1552		autorest.AsGet(),
1553		autorest.WithBaseURL(to.String(aglr.NextLink)))
1554}
1555
1556// ApplicationGatewayListResultPage contains a page of ApplicationGateway values.
1557type ApplicationGatewayListResultPage struct {
1558	fn   func(context.Context, ApplicationGatewayListResult) (ApplicationGatewayListResult, error)
1559	aglr ApplicationGatewayListResult
1560}
1561
1562// NextWithContext advances to the next page of values.  If there was an error making
1563// the request the page does not advance and the error is returned.
1564func (page *ApplicationGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
1565	if tracing.IsEnabled() {
1566		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayListResultPage.NextWithContext")
1567		defer func() {
1568			sc := -1
1569			if page.Response().Response.Response != nil {
1570				sc = page.Response().Response.Response.StatusCode
1571			}
1572			tracing.EndSpan(ctx, sc, err)
1573		}()
1574	}
1575	for {
1576		next, err := page.fn(ctx, page.aglr)
1577		if err != nil {
1578			return err
1579		}
1580		page.aglr = next
1581		if !next.hasNextLink() || !next.IsEmpty() {
1582			break
1583		}
1584	}
1585	return nil
1586}
1587
1588// Next advances to the next page of values.  If there was an error making
1589// the request the page does not advance and the error is returned.
1590// Deprecated: Use NextWithContext() instead.
1591func (page *ApplicationGatewayListResultPage) Next() error {
1592	return page.NextWithContext(context.Background())
1593}
1594
1595// NotDone returns true if the page enumeration should be started or is not yet complete.
1596func (page ApplicationGatewayListResultPage) NotDone() bool {
1597	return !page.aglr.IsEmpty()
1598}
1599
1600// Response returns the raw server response from the last page request.
1601func (page ApplicationGatewayListResultPage) Response() ApplicationGatewayListResult {
1602	return page.aglr
1603}
1604
1605// Values returns the slice of values for the current page or nil if there are no values.
1606func (page ApplicationGatewayListResultPage) Values() []ApplicationGateway {
1607	if page.aglr.IsEmpty() {
1608		return nil
1609	}
1610	return *page.aglr.Value
1611}
1612
1613// Creates a new instance of the ApplicationGatewayListResultPage type.
1614func NewApplicationGatewayListResultPage(cur ApplicationGatewayListResult, getNextPage func(context.Context, ApplicationGatewayListResult) (ApplicationGatewayListResult, error)) ApplicationGatewayListResultPage {
1615	return ApplicationGatewayListResultPage{
1616		fn:   getNextPage,
1617		aglr: cur,
1618	}
1619}
1620
1621// ApplicationGatewayPathRule path rule of URL path map of an application gateway.
1622type ApplicationGatewayPathRule struct {
1623	*ApplicationGatewayPathRulePropertiesFormat `json:"properties,omitempty"`
1624	// Name - Name of the path rule that is unique within an Application Gateway.
1625	Name *string `json:"name,omitempty"`
1626	// Etag - A unique read-only string that changes whenever the resource is updated.
1627	Etag *string `json:"etag,omitempty"`
1628	// Type - Type of the resource.
1629	Type *string `json:"type,omitempty"`
1630	// ID - Resource ID.
1631	ID *string `json:"id,omitempty"`
1632}
1633
1634// MarshalJSON is the custom marshaler for ApplicationGatewayPathRule.
1635func (agpr ApplicationGatewayPathRule) MarshalJSON() ([]byte, error) {
1636	objectMap := make(map[string]interface{})
1637	if agpr.ApplicationGatewayPathRulePropertiesFormat != nil {
1638		objectMap["properties"] = agpr.ApplicationGatewayPathRulePropertiesFormat
1639	}
1640	if agpr.Name != nil {
1641		objectMap["name"] = agpr.Name
1642	}
1643	if agpr.Etag != nil {
1644		objectMap["etag"] = agpr.Etag
1645	}
1646	if agpr.Type != nil {
1647		objectMap["type"] = agpr.Type
1648	}
1649	if agpr.ID != nil {
1650		objectMap["id"] = agpr.ID
1651	}
1652	return json.Marshal(objectMap)
1653}
1654
1655// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayPathRule struct.
1656func (agpr *ApplicationGatewayPathRule) UnmarshalJSON(body []byte) error {
1657	var m map[string]*json.RawMessage
1658	err := json.Unmarshal(body, &m)
1659	if err != nil {
1660		return err
1661	}
1662	for k, v := range m {
1663		switch k {
1664		case "properties":
1665			if v != nil {
1666				var applicationGatewayPathRulePropertiesFormat ApplicationGatewayPathRulePropertiesFormat
1667				err = json.Unmarshal(*v, &applicationGatewayPathRulePropertiesFormat)
1668				if err != nil {
1669					return err
1670				}
1671				agpr.ApplicationGatewayPathRulePropertiesFormat = &applicationGatewayPathRulePropertiesFormat
1672			}
1673		case "name":
1674			if v != nil {
1675				var name string
1676				err = json.Unmarshal(*v, &name)
1677				if err != nil {
1678					return err
1679				}
1680				agpr.Name = &name
1681			}
1682		case "etag":
1683			if v != nil {
1684				var etag string
1685				err = json.Unmarshal(*v, &etag)
1686				if err != nil {
1687					return err
1688				}
1689				agpr.Etag = &etag
1690			}
1691		case "type":
1692			if v != nil {
1693				var typeVar string
1694				err = json.Unmarshal(*v, &typeVar)
1695				if err != nil {
1696					return err
1697				}
1698				agpr.Type = &typeVar
1699			}
1700		case "id":
1701			if v != nil {
1702				var ID string
1703				err = json.Unmarshal(*v, &ID)
1704				if err != nil {
1705					return err
1706				}
1707				agpr.ID = &ID
1708			}
1709		}
1710	}
1711
1712	return nil
1713}
1714
1715// ApplicationGatewayPathRulePropertiesFormat properties of path rule of an application gateway.
1716type ApplicationGatewayPathRulePropertiesFormat struct {
1717	// Paths - Path rules of URL path map.
1718	Paths *[]string `json:"paths,omitempty"`
1719	// BackendAddressPool - Backend address pool resource of URL path map path rule.
1720	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
1721	// BackendHTTPSettings - Backend http settings resource of URL path map path rule.
1722	BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"`
1723	// RedirectConfiguration - Redirect configuration resource of URL path map path rule.
1724	RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"`
1725	// RewriteRuleSet - Rewrite rule set resource of URL path map path rule.
1726	RewriteRuleSet *SubResource `json:"rewriteRuleSet,omitempty"`
1727	// ProvisioningState - Path rule of URL path map resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1728	ProvisioningState *string `json:"provisioningState,omitempty"`
1729}
1730
1731// ApplicationGatewayProbe probe of the application gateway.
1732type ApplicationGatewayProbe struct {
1733	*ApplicationGatewayProbePropertiesFormat `json:"properties,omitempty"`
1734	// Name - Name of the probe that is unique within an Application Gateway.
1735	Name *string `json:"name,omitempty"`
1736	// Etag - A unique read-only string that changes whenever the resource is updated.
1737	Etag *string `json:"etag,omitempty"`
1738	// Type - Type of the resource.
1739	Type *string `json:"type,omitempty"`
1740	// ID - Resource ID.
1741	ID *string `json:"id,omitempty"`
1742}
1743
1744// MarshalJSON is the custom marshaler for ApplicationGatewayProbe.
1745func (agp ApplicationGatewayProbe) MarshalJSON() ([]byte, error) {
1746	objectMap := make(map[string]interface{})
1747	if agp.ApplicationGatewayProbePropertiesFormat != nil {
1748		objectMap["properties"] = agp.ApplicationGatewayProbePropertiesFormat
1749	}
1750	if agp.Name != nil {
1751		objectMap["name"] = agp.Name
1752	}
1753	if agp.Etag != nil {
1754		objectMap["etag"] = agp.Etag
1755	}
1756	if agp.Type != nil {
1757		objectMap["type"] = agp.Type
1758	}
1759	if agp.ID != nil {
1760		objectMap["id"] = agp.ID
1761	}
1762	return json.Marshal(objectMap)
1763}
1764
1765// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayProbe struct.
1766func (agp *ApplicationGatewayProbe) UnmarshalJSON(body []byte) error {
1767	var m map[string]*json.RawMessage
1768	err := json.Unmarshal(body, &m)
1769	if err != nil {
1770		return err
1771	}
1772	for k, v := range m {
1773		switch k {
1774		case "properties":
1775			if v != nil {
1776				var applicationGatewayProbePropertiesFormat ApplicationGatewayProbePropertiesFormat
1777				err = json.Unmarshal(*v, &applicationGatewayProbePropertiesFormat)
1778				if err != nil {
1779					return err
1780				}
1781				agp.ApplicationGatewayProbePropertiesFormat = &applicationGatewayProbePropertiesFormat
1782			}
1783		case "name":
1784			if v != nil {
1785				var name string
1786				err = json.Unmarshal(*v, &name)
1787				if err != nil {
1788					return err
1789				}
1790				agp.Name = &name
1791			}
1792		case "etag":
1793			if v != nil {
1794				var etag string
1795				err = json.Unmarshal(*v, &etag)
1796				if err != nil {
1797					return err
1798				}
1799				agp.Etag = &etag
1800			}
1801		case "type":
1802			if v != nil {
1803				var typeVar string
1804				err = json.Unmarshal(*v, &typeVar)
1805				if err != nil {
1806					return err
1807				}
1808				agp.Type = &typeVar
1809			}
1810		case "id":
1811			if v != nil {
1812				var ID string
1813				err = json.Unmarshal(*v, &ID)
1814				if err != nil {
1815					return err
1816				}
1817				agp.ID = &ID
1818			}
1819		}
1820	}
1821
1822	return nil
1823}
1824
1825// ApplicationGatewayProbeHealthResponseMatch application gateway probe health response match
1826type ApplicationGatewayProbeHealthResponseMatch struct {
1827	// Body - Body that must be contained in the health response. Default value is empty.
1828	Body *string `json:"body,omitempty"`
1829	// StatusCodes - Allowed ranges of healthy status codes. Default range of healthy status codes is 200-399.
1830	StatusCodes *[]string `json:"statusCodes,omitempty"`
1831}
1832
1833// ApplicationGatewayProbePropertiesFormat properties of probe of an application gateway.
1834type ApplicationGatewayProbePropertiesFormat struct {
1835	// Protocol - The protocol used for the probe. Possible values are 'Http' and 'Https'. Possible values include: 'HTTP', 'HTTPS'
1836	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
1837	// Host - Host name to send the probe to.
1838	Host *string `json:"host,omitempty"`
1839	// Path - Relative path of probe. Valid path starts from '/'. Probe is sent to <Protocol>://<host>:<port><path>
1840	Path *string `json:"path,omitempty"`
1841	// Interval - The probing interval in seconds. This is the time interval between two consecutive probes. Acceptable values are from 1 second to 86400 seconds.
1842	Interval *int32 `json:"interval,omitempty"`
1843	// 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.
1844	Timeout *int32 `json:"timeout,omitempty"`
1845	// 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.
1846	UnhealthyThreshold *int32 `json:"unhealthyThreshold,omitempty"`
1847	// PickHostNameFromBackendHTTPSettings - Whether the host header should be picked from the backend http settings. Default value is false.
1848	PickHostNameFromBackendHTTPSettings *bool `json:"pickHostNameFromBackendHttpSettings,omitempty"`
1849	// MinServers - Minimum number of servers that are always marked healthy. Default value is 0.
1850	MinServers *int32 `json:"minServers,omitempty"`
1851	// Match - Criterion for classifying a healthy probe response.
1852	Match *ApplicationGatewayProbeHealthResponseMatch `json:"match,omitempty"`
1853	// ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1854	ProvisioningState *string `json:"provisioningState,omitempty"`
1855}
1856
1857// ApplicationGatewayPropertiesFormat properties of the application gateway.
1858type ApplicationGatewayPropertiesFormat struct {
1859	// Sku - SKU of the application gateway resource.
1860	Sku *ApplicationGatewaySku `json:"sku,omitempty"`
1861	// SslPolicy - SSL policy of the application gateway resource.
1862	SslPolicy *ApplicationGatewaySslPolicy `json:"sslPolicy,omitempty"`
1863	// OperationalState - READ-ONLY; Operational state of the application gateway resource. Possible values include: 'Stopped', 'Starting', 'Running', 'Stopping'
1864	OperationalState ApplicationGatewayOperationalState `json:"operationalState,omitempty"`
1865	// GatewayIPConfigurations - Subnets of application the gateway resource.
1866	GatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"gatewayIPConfigurations,omitempty"`
1867	// AuthenticationCertificates - Authentication certificates of the application gateway resource.
1868	AuthenticationCertificates *[]ApplicationGatewayAuthenticationCertificate `json:"authenticationCertificates,omitempty"`
1869	// TrustedRootCertificates - Trusted Root certificates of the application gateway resource.
1870	TrustedRootCertificates *[]ApplicationGatewayTrustedRootCertificate `json:"trustedRootCertificates,omitempty"`
1871	// SslCertificates - SSL certificates of the application gateway resource.
1872	SslCertificates *[]ApplicationGatewaySslCertificate `json:"sslCertificates,omitempty"`
1873	// FrontendIPConfigurations - Frontend IP addresses of the application gateway resource.
1874	FrontendIPConfigurations *[]ApplicationGatewayFrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"`
1875	// FrontendPorts - Frontend ports of the application gateway resource.
1876	FrontendPorts *[]ApplicationGatewayFrontendPort `json:"frontendPorts,omitempty"`
1877	// Probes - Probes of the application gateway resource.
1878	Probes *[]ApplicationGatewayProbe `json:"probes,omitempty"`
1879	// BackendAddressPools - Backend address pool of the application gateway resource.
1880	BackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"backendAddressPools,omitempty"`
1881	// BackendHTTPSettingsCollection - Backend http settings of the application gateway resource.
1882	BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettingsCollection,omitempty"`
1883	// HTTPListeners - Http listeners of the application gateway resource.
1884	HTTPListeners *[]ApplicationGatewayHTTPListener `json:"httpListeners,omitempty"`
1885	// URLPathMaps - URL path map of the application gateway resource.
1886	URLPathMaps *[]ApplicationGatewayURLPathMap `json:"urlPathMaps,omitempty"`
1887	// RequestRoutingRules - Request routing rules of the application gateway resource.
1888	RequestRoutingRules *[]ApplicationGatewayRequestRoutingRule `json:"requestRoutingRules,omitempty"`
1889	// RewriteRuleSets - Rewrite rules for the application gateway resource.
1890	RewriteRuleSets *[]ApplicationGatewayRewriteRuleSet `json:"rewriteRuleSets,omitempty"`
1891	// RedirectConfigurations - Redirect configurations of the application gateway resource.
1892	RedirectConfigurations *[]ApplicationGatewayRedirectConfiguration `json:"redirectConfigurations,omitempty"`
1893	// WebApplicationFirewallConfiguration - Web application firewall configuration.
1894	WebApplicationFirewallConfiguration *ApplicationGatewayWebApplicationFirewallConfiguration `json:"webApplicationFirewallConfiguration,omitempty"`
1895	// EnableHTTP2 - Whether HTTP2 is enabled on the application gateway resource.
1896	EnableHTTP2 *bool `json:"enableHttp2,omitempty"`
1897	// EnableFips - Whether FIPS is enabled on the application gateway resource.
1898	EnableFips *bool `json:"enableFips,omitempty"`
1899	// AutoscaleConfiguration - Autoscale Configuration.
1900	AutoscaleConfiguration *ApplicationGatewayAutoscaleConfiguration `json:"autoscaleConfiguration,omitempty"`
1901	// ResourceGUID - Resource GUID property of the application gateway resource.
1902	ResourceGUID *string `json:"resourceGuid,omitempty"`
1903	// ProvisioningState - Provisioning state of the application gateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1904	ProvisioningState *string `json:"provisioningState,omitempty"`
1905	// CustomErrorConfigurations - Custom error configurations of the application gateway resource.
1906	CustomErrorConfigurations *[]ApplicationGatewayCustomError `json:"customErrorConfigurations,omitempty"`
1907}
1908
1909// MarshalJSON is the custom marshaler for ApplicationGatewayPropertiesFormat.
1910func (agpf ApplicationGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
1911	objectMap := make(map[string]interface{})
1912	if agpf.Sku != nil {
1913		objectMap["sku"] = agpf.Sku
1914	}
1915	if agpf.SslPolicy != nil {
1916		objectMap["sslPolicy"] = agpf.SslPolicy
1917	}
1918	if agpf.GatewayIPConfigurations != nil {
1919		objectMap["gatewayIPConfigurations"] = agpf.GatewayIPConfigurations
1920	}
1921	if agpf.AuthenticationCertificates != nil {
1922		objectMap["authenticationCertificates"] = agpf.AuthenticationCertificates
1923	}
1924	if agpf.TrustedRootCertificates != nil {
1925		objectMap["trustedRootCertificates"] = agpf.TrustedRootCertificates
1926	}
1927	if agpf.SslCertificates != nil {
1928		objectMap["sslCertificates"] = agpf.SslCertificates
1929	}
1930	if agpf.FrontendIPConfigurations != nil {
1931		objectMap["frontendIPConfigurations"] = agpf.FrontendIPConfigurations
1932	}
1933	if agpf.FrontendPorts != nil {
1934		objectMap["frontendPorts"] = agpf.FrontendPorts
1935	}
1936	if agpf.Probes != nil {
1937		objectMap["probes"] = agpf.Probes
1938	}
1939	if agpf.BackendAddressPools != nil {
1940		objectMap["backendAddressPools"] = agpf.BackendAddressPools
1941	}
1942	if agpf.BackendHTTPSettingsCollection != nil {
1943		objectMap["backendHttpSettingsCollection"] = agpf.BackendHTTPSettingsCollection
1944	}
1945	if agpf.HTTPListeners != nil {
1946		objectMap["httpListeners"] = agpf.HTTPListeners
1947	}
1948	if agpf.URLPathMaps != nil {
1949		objectMap["urlPathMaps"] = agpf.URLPathMaps
1950	}
1951	if agpf.RequestRoutingRules != nil {
1952		objectMap["requestRoutingRules"] = agpf.RequestRoutingRules
1953	}
1954	if agpf.RewriteRuleSets != nil {
1955		objectMap["rewriteRuleSets"] = agpf.RewriteRuleSets
1956	}
1957	if agpf.RedirectConfigurations != nil {
1958		objectMap["redirectConfigurations"] = agpf.RedirectConfigurations
1959	}
1960	if agpf.WebApplicationFirewallConfiguration != nil {
1961		objectMap["webApplicationFirewallConfiguration"] = agpf.WebApplicationFirewallConfiguration
1962	}
1963	if agpf.EnableHTTP2 != nil {
1964		objectMap["enableHttp2"] = agpf.EnableHTTP2
1965	}
1966	if agpf.EnableFips != nil {
1967		objectMap["enableFips"] = agpf.EnableFips
1968	}
1969	if agpf.AutoscaleConfiguration != nil {
1970		objectMap["autoscaleConfiguration"] = agpf.AutoscaleConfiguration
1971	}
1972	if agpf.ResourceGUID != nil {
1973		objectMap["resourceGuid"] = agpf.ResourceGUID
1974	}
1975	if agpf.ProvisioningState != nil {
1976		objectMap["provisioningState"] = agpf.ProvisioningState
1977	}
1978	if agpf.CustomErrorConfigurations != nil {
1979		objectMap["customErrorConfigurations"] = agpf.CustomErrorConfigurations
1980	}
1981	return json.Marshal(objectMap)
1982}
1983
1984// ApplicationGatewayRedirectConfiguration redirect configuration of an application gateway.
1985type ApplicationGatewayRedirectConfiguration struct {
1986	*ApplicationGatewayRedirectConfigurationPropertiesFormat `json:"properties,omitempty"`
1987	// Name - Name of the redirect configuration that is unique within an Application Gateway.
1988	Name *string `json:"name,omitempty"`
1989	// Etag - A unique read-only string that changes whenever the resource is updated.
1990	Etag *string `json:"etag,omitempty"`
1991	// Type - Type of the resource.
1992	Type *string `json:"type,omitempty"`
1993	// ID - Resource ID.
1994	ID *string `json:"id,omitempty"`
1995}
1996
1997// MarshalJSON is the custom marshaler for ApplicationGatewayRedirectConfiguration.
1998func (agrc ApplicationGatewayRedirectConfiguration) MarshalJSON() ([]byte, error) {
1999	objectMap := make(map[string]interface{})
2000	if agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat != nil {
2001		objectMap["properties"] = agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat
2002	}
2003	if agrc.Name != nil {
2004		objectMap["name"] = agrc.Name
2005	}
2006	if agrc.Etag != nil {
2007		objectMap["etag"] = agrc.Etag
2008	}
2009	if agrc.Type != nil {
2010		objectMap["type"] = agrc.Type
2011	}
2012	if agrc.ID != nil {
2013		objectMap["id"] = agrc.ID
2014	}
2015	return json.Marshal(objectMap)
2016}
2017
2018// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRedirectConfiguration struct.
2019func (agrc *ApplicationGatewayRedirectConfiguration) UnmarshalJSON(body []byte) error {
2020	var m map[string]*json.RawMessage
2021	err := json.Unmarshal(body, &m)
2022	if err != nil {
2023		return err
2024	}
2025	for k, v := range m {
2026		switch k {
2027		case "properties":
2028			if v != nil {
2029				var applicationGatewayRedirectConfigurationPropertiesFormat ApplicationGatewayRedirectConfigurationPropertiesFormat
2030				err = json.Unmarshal(*v, &applicationGatewayRedirectConfigurationPropertiesFormat)
2031				if err != nil {
2032					return err
2033				}
2034				agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat = &applicationGatewayRedirectConfigurationPropertiesFormat
2035			}
2036		case "name":
2037			if v != nil {
2038				var name string
2039				err = json.Unmarshal(*v, &name)
2040				if err != nil {
2041					return err
2042				}
2043				agrc.Name = &name
2044			}
2045		case "etag":
2046			if v != nil {
2047				var etag string
2048				err = json.Unmarshal(*v, &etag)
2049				if err != nil {
2050					return err
2051				}
2052				agrc.Etag = &etag
2053			}
2054		case "type":
2055			if v != nil {
2056				var typeVar string
2057				err = json.Unmarshal(*v, &typeVar)
2058				if err != nil {
2059					return err
2060				}
2061				agrc.Type = &typeVar
2062			}
2063		case "id":
2064			if v != nil {
2065				var ID string
2066				err = json.Unmarshal(*v, &ID)
2067				if err != nil {
2068					return err
2069				}
2070				agrc.ID = &ID
2071			}
2072		}
2073	}
2074
2075	return nil
2076}
2077
2078// ApplicationGatewayRedirectConfigurationPropertiesFormat properties of redirect configuration of the
2079// application gateway.
2080type ApplicationGatewayRedirectConfigurationPropertiesFormat struct {
2081	// RedirectType - Supported http redirection types - Permanent, Temporary, Found, SeeOther. Possible values include: 'Permanent', 'Found', 'SeeOther', 'Temporary'
2082	RedirectType ApplicationGatewayRedirectType `json:"redirectType,omitempty"`
2083	// TargetListener - Reference to a listener to redirect the request to.
2084	TargetListener *SubResource `json:"targetListener,omitempty"`
2085	// TargetURL - Url to redirect the request to.
2086	TargetURL *string `json:"targetUrl,omitempty"`
2087	// IncludePath - Include path in the redirected url.
2088	IncludePath *bool `json:"includePath,omitempty"`
2089	// IncludeQueryString - Include query string in the redirected url.
2090	IncludeQueryString *bool `json:"includeQueryString,omitempty"`
2091	// RequestRoutingRules - Request routing specifying redirect configuration.
2092	RequestRoutingRules *[]SubResource `json:"requestRoutingRules,omitempty"`
2093	// URLPathMaps - Url path maps specifying default redirect configuration.
2094	URLPathMaps *[]SubResource `json:"urlPathMaps,omitempty"`
2095	// PathRules - Path rules specifying redirect configuration.
2096	PathRules *[]SubResource `json:"pathRules,omitempty"`
2097}
2098
2099// ApplicationGatewayRequestRoutingRule request routing rule of an application gateway.
2100type ApplicationGatewayRequestRoutingRule struct {
2101	*ApplicationGatewayRequestRoutingRulePropertiesFormat `json:"properties,omitempty"`
2102	// Name - Name of the request routing rule that is unique within an Application Gateway.
2103	Name *string `json:"name,omitempty"`
2104	// Etag - A unique read-only string that changes whenever the resource is updated.
2105	Etag *string `json:"etag,omitempty"`
2106	// Type - Type of the resource.
2107	Type *string `json:"type,omitempty"`
2108	// ID - Resource ID.
2109	ID *string `json:"id,omitempty"`
2110}
2111
2112// MarshalJSON is the custom marshaler for ApplicationGatewayRequestRoutingRule.
2113func (agrrr ApplicationGatewayRequestRoutingRule) MarshalJSON() ([]byte, error) {
2114	objectMap := make(map[string]interface{})
2115	if agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat != nil {
2116		objectMap["properties"] = agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat
2117	}
2118	if agrrr.Name != nil {
2119		objectMap["name"] = agrrr.Name
2120	}
2121	if agrrr.Etag != nil {
2122		objectMap["etag"] = agrrr.Etag
2123	}
2124	if agrrr.Type != nil {
2125		objectMap["type"] = agrrr.Type
2126	}
2127	if agrrr.ID != nil {
2128		objectMap["id"] = agrrr.ID
2129	}
2130	return json.Marshal(objectMap)
2131}
2132
2133// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRequestRoutingRule struct.
2134func (agrrr *ApplicationGatewayRequestRoutingRule) UnmarshalJSON(body []byte) error {
2135	var m map[string]*json.RawMessage
2136	err := json.Unmarshal(body, &m)
2137	if err != nil {
2138		return err
2139	}
2140	for k, v := range m {
2141		switch k {
2142		case "properties":
2143			if v != nil {
2144				var applicationGatewayRequestRoutingRulePropertiesFormat ApplicationGatewayRequestRoutingRulePropertiesFormat
2145				err = json.Unmarshal(*v, &applicationGatewayRequestRoutingRulePropertiesFormat)
2146				if err != nil {
2147					return err
2148				}
2149				agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat = &applicationGatewayRequestRoutingRulePropertiesFormat
2150			}
2151		case "name":
2152			if v != nil {
2153				var name string
2154				err = json.Unmarshal(*v, &name)
2155				if err != nil {
2156					return err
2157				}
2158				agrrr.Name = &name
2159			}
2160		case "etag":
2161			if v != nil {
2162				var etag string
2163				err = json.Unmarshal(*v, &etag)
2164				if err != nil {
2165					return err
2166				}
2167				agrrr.Etag = &etag
2168			}
2169		case "type":
2170			if v != nil {
2171				var typeVar string
2172				err = json.Unmarshal(*v, &typeVar)
2173				if err != nil {
2174					return err
2175				}
2176				agrrr.Type = &typeVar
2177			}
2178		case "id":
2179			if v != nil {
2180				var ID string
2181				err = json.Unmarshal(*v, &ID)
2182				if err != nil {
2183					return err
2184				}
2185				agrrr.ID = &ID
2186			}
2187		}
2188	}
2189
2190	return nil
2191}
2192
2193// ApplicationGatewayRequestRoutingRulePropertiesFormat properties of request routing rule of the
2194// application gateway.
2195type ApplicationGatewayRequestRoutingRulePropertiesFormat struct {
2196	// RuleType - Rule type. Possible values include: 'Basic', 'PathBasedRouting'
2197	RuleType ApplicationGatewayRequestRoutingRuleType `json:"ruleType,omitempty"`
2198	// BackendAddressPool - Backend address pool resource of the application gateway.
2199	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
2200	// BackendHTTPSettings - Backend http settings resource of the application gateway.
2201	BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"`
2202	// HTTPListener - Http listener resource of the application gateway.
2203	HTTPListener *SubResource `json:"httpListener,omitempty"`
2204	// URLPathMap - URL path map resource of the application gateway.
2205	URLPathMap *SubResource `json:"urlPathMap,omitempty"`
2206	// RewriteRuleSet - Rewrite Rule Set resource in Basic rule of the application gateway.
2207	RewriteRuleSet *SubResource `json:"rewriteRuleSet,omitempty"`
2208	// RedirectConfiguration - Redirect configuration resource of the application gateway.
2209	RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"`
2210	// ProvisioningState - Provisioning state of the request routing rule resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2211	ProvisioningState *string `json:"provisioningState,omitempty"`
2212}
2213
2214// ApplicationGatewayRewriteRule rewrite rule of an application gateway.
2215type ApplicationGatewayRewriteRule struct {
2216	// Name - Name of the rewrite rule that is unique within an Application Gateway.
2217	Name *string `json:"name,omitempty"`
2218	// ActionSet - Set of actions to be done as part of the rewrite Rule.
2219	ActionSet *ApplicationGatewayRewriteRuleActionSet `json:"actionSet,omitempty"`
2220}
2221
2222// ApplicationGatewayRewriteRuleActionSet set of actions in the Rewrite Rule in Application Gateway.
2223type ApplicationGatewayRewriteRuleActionSet struct {
2224	// RequestHeaderConfigurations - Request Header Actions in the Action Set
2225	RequestHeaderConfigurations *[]ApplicationGatewayHeaderConfiguration `json:"requestHeaderConfigurations,omitempty"`
2226	// ResponseHeaderConfigurations - Response Header Actions in the Action Set
2227	ResponseHeaderConfigurations *[]ApplicationGatewayHeaderConfiguration `json:"responseHeaderConfigurations,omitempty"`
2228}
2229
2230// ApplicationGatewayRewriteRuleSet rewrite rule set of an application gateway.
2231type ApplicationGatewayRewriteRuleSet struct {
2232	*ApplicationGatewayRewriteRuleSetPropertiesFormat `json:"properties,omitempty"`
2233	// Name - Name of the rewrite rule set that is unique within an Application Gateway.
2234	Name *string `json:"name,omitempty"`
2235	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
2236	Etag *string `json:"etag,omitempty"`
2237	// ID - Resource ID.
2238	ID *string `json:"id,omitempty"`
2239}
2240
2241// MarshalJSON is the custom marshaler for ApplicationGatewayRewriteRuleSet.
2242func (agrrs ApplicationGatewayRewriteRuleSet) MarshalJSON() ([]byte, error) {
2243	objectMap := make(map[string]interface{})
2244	if agrrs.ApplicationGatewayRewriteRuleSetPropertiesFormat != nil {
2245		objectMap["properties"] = agrrs.ApplicationGatewayRewriteRuleSetPropertiesFormat
2246	}
2247	if agrrs.Name != nil {
2248		objectMap["name"] = agrrs.Name
2249	}
2250	if agrrs.ID != nil {
2251		objectMap["id"] = agrrs.ID
2252	}
2253	return json.Marshal(objectMap)
2254}
2255
2256// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRewriteRuleSet struct.
2257func (agrrs *ApplicationGatewayRewriteRuleSet) UnmarshalJSON(body []byte) error {
2258	var m map[string]*json.RawMessage
2259	err := json.Unmarshal(body, &m)
2260	if err != nil {
2261		return err
2262	}
2263	for k, v := range m {
2264		switch k {
2265		case "properties":
2266			if v != nil {
2267				var applicationGatewayRewriteRuleSetPropertiesFormat ApplicationGatewayRewriteRuleSetPropertiesFormat
2268				err = json.Unmarshal(*v, &applicationGatewayRewriteRuleSetPropertiesFormat)
2269				if err != nil {
2270					return err
2271				}
2272				agrrs.ApplicationGatewayRewriteRuleSetPropertiesFormat = &applicationGatewayRewriteRuleSetPropertiesFormat
2273			}
2274		case "name":
2275			if v != nil {
2276				var name string
2277				err = json.Unmarshal(*v, &name)
2278				if err != nil {
2279					return err
2280				}
2281				agrrs.Name = &name
2282			}
2283		case "etag":
2284			if v != nil {
2285				var etag string
2286				err = json.Unmarshal(*v, &etag)
2287				if err != nil {
2288					return err
2289				}
2290				agrrs.Etag = &etag
2291			}
2292		case "id":
2293			if v != nil {
2294				var ID string
2295				err = json.Unmarshal(*v, &ID)
2296				if err != nil {
2297					return err
2298				}
2299				agrrs.ID = &ID
2300			}
2301		}
2302	}
2303
2304	return nil
2305}
2306
2307// ApplicationGatewayRewriteRuleSetPropertiesFormat properties of rewrite rule set of the application
2308// gateway.
2309type ApplicationGatewayRewriteRuleSetPropertiesFormat struct {
2310	// RewriteRules - Rewrite rules in the rewrite rule set.
2311	RewriteRules *[]ApplicationGatewayRewriteRule `json:"rewriteRules,omitempty"`
2312	// ProvisioningState - READ-ONLY; Provisioning state of the rewrite rule set resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2313	ProvisioningState *string `json:"provisioningState,omitempty"`
2314}
2315
2316// MarshalJSON is the custom marshaler for ApplicationGatewayRewriteRuleSetPropertiesFormat.
2317func (agrrspf ApplicationGatewayRewriteRuleSetPropertiesFormat) MarshalJSON() ([]byte, error) {
2318	objectMap := make(map[string]interface{})
2319	if agrrspf.RewriteRules != nil {
2320		objectMap["rewriteRules"] = agrrspf.RewriteRules
2321	}
2322	return json.Marshal(objectMap)
2323}
2324
2325// ApplicationGatewaysBackendHealthFuture an abstraction for monitoring and retrieving the results of a
2326// long-running operation.
2327type ApplicationGatewaysBackendHealthFuture struct {
2328	azure.FutureAPI
2329	// Result returns the result of the asynchronous operation.
2330	// If the operation has not completed it will return an error.
2331	Result func(ApplicationGatewaysClient) (ApplicationGatewayBackendHealth, error)
2332}
2333
2334// ApplicationGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
2335// long-running operation.
2336type ApplicationGatewaysCreateOrUpdateFuture struct {
2337	azure.FutureAPI
2338	// Result returns the result of the asynchronous operation.
2339	// If the operation has not completed it will return an error.
2340	Result func(ApplicationGatewaysClient) (ApplicationGateway, error)
2341}
2342
2343// ApplicationGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
2344// long-running operation.
2345type ApplicationGatewaysDeleteFuture struct {
2346	azure.FutureAPI
2347	// Result returns the result of the asynchronous operation.
2348	// If the operation has not completed it will return an error.
2349	Result func(ApplicationGatewaysClient) (autorest.Response, error)
2350}
2351
2352// ApplicationGatewaySku SKU of an application gateway
2353type ApplicationGatewaySku struct {
2354	// Name - Name of an application gateway SKU. Possible values include: 'StandardSmall', 'StandardMedium', 'StandardLarge', 'WAFMedium', 'WAFLarge', 'StandardV2', 'WAFV2'
2355	Name ApplicationGatewaySkuName `json:"name,omitempty"`
2356	// Tier - Tier of an application gateway. Possible values include: 'ApplicationGatewayTierStandard', 'ApplicationGatewayTierWAF', 'ApplicationGatewayTierStandardV2', 'ApplicationGatewayTierWAFV2'
2357	Tier ApplicationGatewayTier `json:"tier,omitempty"`
2358	// Capacity - Capacity (instance count) of an application gateway.
2359	Capacity *int32 `json:"capacity,omitempty"`
2360}
2361
2362// ApplicationGatewaySslCertificate SSL certificates of an application gateway.
2363type ApplicationGatewaySslCertificate struct {
2364	*ApplicationGatewaySslCertificatePropertiesFormat `json:"properties,omitempty"`
2365	// Name - Name of the SSL certificate that is unique within an Application Gateway.
2366	Name *string `json:"name,omitempty"`
2367	// Etag - A unique read-only string that changes whenever the resource is updated.
2368	Etag *string `json:"etag,omitempty"`
2369	// Type - Type of the resource.
2370	Type *string `json:"type,omitempty"`
2371	// ID - Resource ID.
2372	ID *string `json:"id,omitempty"`
2373}
2374
2375// MarshalJSON is the custom marshaler for ApplicationGatewaySslCertificate.
2376func (agsc ApplicationGatewaySslCertificate) MarshalJSON() ([]byte, error) {
2377	objectMap := make(map[string]interface{})
2378	if agsc.ApplicationGatewaySslCertificatePropertiesFormat != nil {
2379		objectMap["properties"] = agsc.ApplicationGatewaySslCertificatePropertiesFormat
2380	}
2381	if agsc.Name != nil {
2382		objectMap["name"] = agsc.Name
2383	}
2384	if agsc.Etag != nil {
2385		objectMap["etag"] = agsc.Etag
2386	}
2387	if agsc.Type != nil {
2388		objectMap["type"] = agsc.Type
2389	}
2390	if agsc.ID != nil {
2391		objectMap["id"] = agsc.ID
2392	}
2393	return json.Marshal(objectMap)
2394}
2395
2396// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslCertificate struct.
2397func (agsc *ApplicationGatewaySslCertificate) UnmarshalJSON(body []byte) error {
2398	var m map[string]*json.RawMessage
2399	err := json.Unmarshal(body, &m)
2400	if err != nil {
2401		return err
2402	}
2403	for k, v := range m {
2404		switch k {
2405		case "properties":
2406			if v != nil {
2407				var applicationGatewaySslCertificatePropertiesFormat ApplicationGatewaySslCertificatePropertiesFormat
2408				err = json.Unmarshal(*v, &applicationGatewaySslCertificatePropertiesFormat)
2409				if err != nil {
2410					return err
2411				}
2412				agsc.ApplicationGatewaySslCertificatePropertiesFormat = &applicationGatewaySslCertificatePropertiesFormat
2413			}
2414		case "name":
2415			if v != nil {
2416				var name string
2417				err = json.Unmarshal(*v, &name)
2418				if err != nil {
2419					return err
2420				}
2421				agsc.Name = &name
2422			}
2423		case "etag":
2424			if v != nil {
2425				var etag string
2426				err = json.Unmarshal(*v, &etag)
2427				if err != nil {
2428					return err
2429				}
2430				agsc.Etag = &etag
2431			}
2432		case "type":
2433			if v != nil {
2434				var typeVar string
2435				err = json.Unmarshal(*v, &typeVar)
2436				if err != nil {
2437					return err
2438				}
2439				agsc.Type = &typeVar
2440			}
2441		case "id":
2442			if v != nil {
2443				var ID string
2444				err = json.Unmarshal(*v, &ID)
2445				if err != nil {
2446					return err
2447				}
2448				agsc.ID = &ID
2449			}
2450		}
2451	}
2452
2453	return nil
2454}
2455
2456// ApplicationGatewaySslCertificatePropertiesFormat properties of SSL certificates of an application
2457// gateway.
2458type ApplicationGatewaySslCertificatePropertiesFormat struct {
2459	// Data - Base-64 encoded pfx certificate. Only applicable in PUT Request.
2460	Data *string `json:"data,omitempty"`
2461	// Password - Password for the pfx file specified in data. Only applicable in PUT request.
2462	Password *string `json:"password,omitempty"`
2463	// PublicCertData - Base-64 encoded Public cert data corresponding to pfx specified in data. Only applicable in GET request.
2464	PublicCertData *string `json:"publicCertData,omitempty"`
2465	// KeyVaultSecretID - Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault.
2466	KeyVaultSecretID *string `json:"keyVaultSecretId,omitempty"`
2467	// ProvisioningState - Provisioning state of the SSL certificate resource Possible values are: 'Updating', 'Deleting', and 'Failed'.
2468	ProvisioningState *string `json:"provisioningState,omitempty"`
2469}
2470
2471// ApplicationGatewaySslPolicy application Gateway Ssl policy.
2472type ApplicationGatewaySslPolicy struct {
2473	// DisabledSslProtocols - Ssl protocols to be disabled on application gateway.
2474	DisabledSslProtocols *[]ApplicationGatewaySslProtocol `json:"disabledSslProtocols,omitempty"`
2475	// PolicyType - Type of Ssl Policy. Possible values include: 'Predefined', 'Custom'
2476	PolicyType ApplicationGatewaySslPolicyType `json:"policyType,omitempty"`
2477	// PolicyName - Name of Ssl predefined policy. Possible values include: 'AppGwSslPolicy20150501', 'AppGwSslPolicy20170401', 'AppGwSslPolicy20170401S'
2478	PolicyName ApplicationGatewaySslPolicyName `json:"policyName,omitempty"`
2479	// CipherSuites - Ssl cipher suites to be enabled in the specified order to application gateway.
2480	CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"`
2481	// MinProtocolVersion - Minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'TLSv10', 'TLSv11', 'TLSv12'
2482	MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"`
2483}
2484
2485// ApplicationGatewaySslPredefinedPolicy an Ssl predefined policy
2486type ApplicationGatewaySslPredefinedPolicy struct {
2487	autorest.Response `json:"-"`
2488	// Name - Name of the Ssl predefined policy.
2489	Name                                                   *string `json:"name,omitempty"`
2490	*ApplicationGatewaySslPredefinedPolicyPropertiesFormat `json:"properties,omitempty"`
2491	// ID - Resource ID.
2492	ID *string `json:"id,omitempty"`
2493}
2494
2495// MarshalJSON is the custom marshaler for ApplicationGatewaySslPredefinedPolicy.
2496func (agspp ApplicationGatewaySslPredefinedPolicy) MarshalJSON() ([]byte, error) {
2497	objectMap := make(map[string]interface{})
2498	if agspp.Name != nil {
2499		objectMap["name"] = agspp.Name
2500	}
2501	if agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat != nil {
2502		objectMap["properties"] = agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat
2503	}
2504	if agspp.ID != nil {
2505		objectMap["id"] = agspp.ID
2506	}
2507	return json.Marshal(objectMap)
2508}
2509
2510// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslPredefinedPolicy struct.
2511func (agspp *ApplicationGatewaySslPredefinedPolicy) UnmarshalJSON(body []byte) error {
2512	var m map[string]*json.RawMessage
2513	err := json.Unmarshal(body, &m)
2514	if err != nil {
2515		return err
2516	}
2517	for k, v := range m {
2518		switch k {
2519		case "name":
2520			if v != nil {
2521				var name string
2522				err = json.Unmarshal(*v, &name)
2523				if err != nil {
2524					return err
2525				}
2526				agspp.Name = &name
2527			}
2528		case "properties":
2529			if v != nil {
2530				var applicationGatewaySslPredefinedPolicyPropertiesFormat ApplicationGatewaySslPredefinedPolicyPropertiesFormat
2531				err = json.Unmarshal(*v, &applicationGatewaySslPredefinedPolicyPropertiesFormat)
2532				if err != nil {
2533					return err
2534				}
2535				agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat = &applicationGatewaySslPredefinedPolicyPropertiesFormat
2536			}
2537		case "id":
2538			if v != nil {
2539				var ID string
2540				err = json.Unmarshal(*v, &ID)
2541				if err != nil {
2542					return err
2543				}
2544				agspp.ID = &ID
2545			}
2546		}
2547	}
2548
2549	return nil
2550}
2551
2552// ApplicationGatewaySslPredefinedPolicyPropertiesFormat properties of
2553// ApplicationGatewaySslPredefinedPolicy
2554type ApplicationGatewaySslPredefinedPolicyPropertiesFormat struct {
2555	// CipherSuites - Ssl cipher suites to be enabled in the specified order for application gateway.
2556	CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"`
2557	// MinProtocolVersion - Minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'TLSv10', 'TLSv11', 'TLSv12'
2558	MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"`
2559}
2560
2561// ApplicationGatewaysStartFuture an abstraction for monitoring and retrieving the results of a
2562// long-running operation.
2563type ApplicationGatewaysStartFuture struct {
2564	azure.FutureAPI
2565	// Result returns the result of the asynchronous operation.
2566	// If the operation has not completed it will return an error.
2567	Result func(ApplicationGatewaysClient) (autorest.Response, error)
2568}
2569
2570// ApplicationGatewaysStopFuture an abstraction for monitoring and retrieving the results of a long-running
2571// operation.
2572type ApplicationGatewaysStopFuture struct {
2573	azure.FutureAPI
2574	// Result returns the result of the asynchronous operation.
2575	// If the operation has not completed it will return an error.
2576	Result func(ApplicationGatewaysClient) (autorest.Response, error)
2577}
2578
2579// ApplicationGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
2580// long-running operation.
2581type ApplicationGatewaysUpdateTagsFuture struct {
2582	azure.FutureAPI
2583	// Result returns the result of the asynchronous operation.
2584	// If the operation has not completed it will return an error.
2585	Result func(ApplicationGatewaysClient) (ApplicationGateway, error)
2586}
2587
2588// ApplicationGatewayTrustedRootCertificate trusted Root certificates of an application gateway.
2589type ApplicationGatewayTrustedRootCertificate struct {
2590	*ApplicationGatewayTrustedRootCertificatePropertiesFormat `json:"properties,omitempty"`
2591	// Name - Name of the trusted root certificate that is unique within an Application Gateway.
2592	Name *string `json:"name,omitempty"`
2593	// Etag - A unique read-only string that changes whenever the resource is updated.
2594	Etag *string `json:"etag,omitempty"`
2595	// Type - Type of the resource.
2596	Type *string `json:"type,omitempty"`
2597	// ID - Resource ID.
2598	ID *string `json:"id,omitempty"`
2599}
2600
2601// MarshalJSON is the custom marshaler for ApplicationGatewayTrustedRootCertificate.
2602func (agtrc ApplicationGatewayTrustedRootCertificate) MarshalJSON() ([]byte, error) {
2603	objectMap := make(map[string]interface{})
2604	if agtrc.ApplicationGatewayTrustedRootCertificatePropertiesFormat != nil {
2605		objectMap["properties"] = agtrc.ApplicationGatewayTrustedRootCertificatePropertiesFormat
2606	}
2607	if agtrc.Name != nil {
2608		objectMap["name"] = agtrc.Name
2609	}
2610	if agtrc.Etag != nil {
2611		objectMap["etag"] = agtrc.Etag
2612	}
2613	if agtrc.Type != nil {
2614		objectMap["type"] = agtrc.Type
2615	}
2616	if agtrc.ID != nil {
2617		objectMap["id"] = agtrc.ID
2618	}
2619	return json.Marshal(objectMap)
2620}
2621
2622// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayTrustedRootCertificate struct.
2623func (agtrc *ApplicationGatewayTrustedRootCertificate) UnmarshalJSON(body []byte) error {
2624	var m map[string]*json.RawMessage
2625	err := json.Unmarshal(body, &m)
2626	if err != nil {
2627		return err
2628	}
2629	for k, v := range m {
2630		switch k {
2631		case "properties":
2632			if v != nil {
2633				var applicationGatewayTrustedRootCertificatePropertiesFormat ApplicationGatewayTrustedRootCertificatePropertiesFormat
2634				err = json.Unmarshal(*v, &applicationGatewayTrustedRootCertificatePropertiesFormat)
2635				if err != nil {
2636					return err
2637				}
2638				agtrc.ApplicationGatewayTrustedRootCertificatePropertiesFormat = &applicationGatewayTrustedRootCertificatePropertiesFormat
2639			}
2640		case "name":
2641			if v != nil {
2642				var name string
2643				err = json.Unmarshal(*v, &name)
2644				if err != nil {
2645					return err
2646				}
2647				agtrc.Name = &name
2648			}
2649		case "etag":
2650			if v != nil {
2651				var etag string
2652				err = json.Unmarshal(*v, &etag)
2653				if err != nil {
2654					return err
2655				}
2656				agtrc.Etag = &etag
2657			}
2658		case "type":
2659			if v != nil {
2660				var typeVar string
2661				err = json.Unmarshal(*v, &typeVar)
2662				if err != nil {
2663					return err
2664				}
2665				agtrc.Type = &typeVar
2666			}
2667		case "id":
2668			if v != nil {
2669				var ID string
2670				err = json.Unmarshal(*v, &ID)
2671				if err != nil {
2672					return err
2673				}
2674				agtrc.ID = &ID
2675			}
2676		}
2677	}
2678
2679	return nil
2680}
2681
2682// ApplicationGatewayTrustedRootCertificatePropertiesFormat trusted Root certificates properties of an
2683// application gateway.
2684type ApplicationGatewayTrustedRootCertificatePropertiesFormat struct {
2685	// Data - Certificate public data.
2686	Data *string `json:"data,omitempty"`
2687	// KeyVaultSecretID - Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault.
2688	KeyVaultSecretID *string `json:"keyVaultSecretId,omitempty"`
2689	// ProvisioningState - Provisioning state of the trusted root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2690	ProvisioningState *string `json:"provisioningState,omitempty"`
2691}
2692
2693// ApplicationGatewayURLPathMap urlPathMaps give a url path to the backend mapping information for
2694// PathBasedRouting.
2695type ApplicationGatewayURLPathMap struct {
2696	*ApplicationGatewayURLPathMapPropertiesFormat `json:"properties,omitempty"`
2697	// Name - Name of the URL path map that is unique within an Application Gateway.
2698	Name *string `json:"name,omitempty"`
2699	// Etag - A unique read-only string that changes whenever the resource is updated.
2700	Etag *string `json:"etag,omitempty"`
2701	// Type - Type of the resource.
2702	Type *string `json:"type,omitempty"`
2703	// ID - Resource ID.
2704	ID *string `json:"id,omitempty"`
2705}
2706
2707// MarshalJSON is the custom marshaler for ApplicationGatewayURLPathMap.
2708func (agupm ApplicationGatewayURLPathMap) MarshalJSON() ([]byte, error) {
2709	objectMap := make(map[string]interface{})
2710	if agupm.ApplicationGatewayURLPathMapPropertiesFormat != nil {
2711		objectMap["properties"] = agupm.ApplicationGatewayURLPathMapPropertiesFormat
2712	}
2713	if agupm.Name != nil {
2714		objectMap["name"] = agupm.Name
2715	}
2716	if agupm.Etag != nil {
2717		objectMap["etag"] = agupm.Etag
2718	}
2719	if agupm.Type != nil {
2720		objectMap["type"] = agupm.Type
2721	}
2722	if agupm.ID != nil {
2723		objectMap["id"] = agupm.ID
2724	}
2725	return json.Marshal(objectMap)
2726}
2727
2728// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayURLPathMap struct.
2729func (agupm *ApplicationGatewayURLPathMap) UnmarshalJSON(body []byte) error {
2730	var m map[string]*json.RawMessage
2731	err := json.Unmarshal(body, &m)
2732	if err != nil {
2733		return err
2734	}
2735	for k, v := range m {
2736		switch k {
2737		case "properties":
2738			if v != nil {
2739				var applicationGatewayURLPathMapPropertiesFormat ApplicationGatewayURLPathMapPropertiesFormat
2740				err = json.Unmarshal(*v, &applicationGatewayURLPathMapPropertiesFormat)
2741				if err != nil {
2742					return err
2743				}
2744				agupm.ApplicationGatewayURLPathMapPropertiesFormat = &applicationGatewayURLPathMapPropertiesFormat
2745			}
2746		case "name":
2747			if v != nil {
2748				var name string
2749				err = json.Unmarshal(*v, &name)
2750				if err != nil {
2751					return err
2752				}
2753				agupm.Name = &name
2754			}
2755		case "etag":
2756			if v != nil {
2757				var etag string
2758				err = json.Unmarshal(*v, &etag)
2759				if err != nil {
2760					return err
2761				}
2762				agupm.Etag = &etag
2763			}
2764		case "type":
2765			if v != nil {
2766				var typeVar string
2767				err = json.Unmarshal(*v, &typeVar)
2768				if err != nil {
2769					return err
2770				}
2771				agupm.Type = &typeVar
2772			}
2773		case "id":
2774			if v != nil {
2775				var ID string
2776				err = json.Unmarshal(*v, &ID)
2777				if err != nil {
2778					return err
2779				}
2780				agupm.ID = &ID
2781			}
2782		}
2783	}
2784
2785	return nil
2786}
2787
2788// ApplicationGatewayURLPathMapPropertiesFormat properties of UrlPathMap of the application gateway.
2789type ApplicationGatewayURLPathMapPropertiesFormat struct {
2790	// DefaultBackendAddressPool - Default backend address pool resource of URL path map.
2791	DefaultBackendAddressPool *SubResource `json:"defaultBackendAddressPool,omitempty"`
2792	// DefaultBackendHTTPSettings - Default backend http settings resource of URL path map.
2793	DefaultBackendHTTPSettings *SubResource `json:"defaultBackendHttpSettings,omitempty"`
2794	// DefaultRewriteRuleSet - Default Rewrite rule set resource of URL path map.
2795	DefaultRewriteRuleSet *SubResource `json:"defaultRewriteRuleSet,omitempty"`
2796	// DefaultRedirectConfiguration - Default redirect configuration resource of URL path map.
2797	DefaultRedirectConfiguration *SubResource `json:"defaultRedirectConfiguration,omitempty"`
2798	// PathRules - Path rule of URL path map resource.
2799	PathRules *[]ApplicationGatewayPathRule `json:"pathRules,omitempty"`
2800	// ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2801	ProvisioningState *string `json:"provisioningState,omitempty"`
2802}
2803
2804// ApplicationGatewayWebApplicationFirewallConfiguration application gateway web application firewall
2805// configuration.
2806type ApplicationGatewayWebApplicationFirewallConfiguration struct {
2807	// Enabled - Whether the web application firewall is enabled or not.
2808	Enabled *bool `json:"enabled,omitempty"`
2809	// FirewallMode - Web application firewall mode. Possible values include: 'Detection', 'Prevention'
2810	FirewallMode ApplicationGatewayFirewallMode `json:"firewallMode,omitempty"`
2811	// RuleSetType - The type of the web application firewall rule set. Possible values are: 'OWASP'.
2812	RuleSetType *string `json:"ruleSetType,omitempty"`
2813	// RuleSetVersion - The version of the rule set type.
2814	RuleSetVersion *string `json:"ruleSetVersion,omitempty"`
2815	// DisabledRuleGroups - The disabled rule groups.
2816	DisabledRuleGroups *[]ApplicationGatewayFirewallDisabledRuleGroup `json:"disabledRuleGroups,omitempty"`
2817	// RequestBodyCheck - Whether allow WAF to check request Body.
2818	RequestBodyCheck *bool `json:"requestBodyCheck,omitempty"`
2819	// MaxRequestBodySize - Maximum request body size for WAF.
2820	MaxRequestBodySize *int32 `json:"maxRequestBodySize,omitempty"`
2821	// MaxRequestBodySizeInKb - Maximum request body size in Kb for WAF.
2822	MaxRequestBodySizeInKb *int32 `json:"maxRequestBodySizeInKb,omitempty"`
2823	// FileUploadLimitInMb - Maximum file upload size in Mb for WAF.
2824	FileUploadLimitInMb *int32 `json:"fileUploadLimitInMb,omitempty"`
2825	// Exclusions - The exclusion list.
2826	Exclusions *[]ApplicationGatewayFirewallExclusion `json:"exclusions,omitempty"`
2827}
2828
2829// ApplicationSecurityGroup an application security group in a resource group.
2830type ApplicationSecurityGroup struct {
2831	autorest.Response `json:"-"`
2832	// ApplicationSecurityGroupPropertiesFormat - Properties of the application security group.
2833	*ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"`
2834	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
2835	Etag *string `json:"etag,omitempty"`
2836	// ID - Resource ID.
2837	ID *string `json:"id,omitempty"`
2838	// Name - READ-ONLY; Resource name.
2839	Name *string `json:"name,omitempty"`
2840	// Type - READ-ONLY; Resource type.
2841	Type *string `json:"type,omitempty"`
2842	// Location - Resource location.
2843	Location *string `json:"location,omitempty"`
2844	// Tags - Resource tags.
2845	Tags map[string]*string `json:"tags"`
2846}
2847
2848// MarshalJSON is the custom marshaler for ApplicationSecurityGroup.
2849func (asg ApplicationSecurityGroup) MarshalJSON() ([]byte, error) {
2850	objectMap := make(map[string]interface{})
2851	if asg.ApplicationSecurityGroupPropertiesFormat != nil {
2852		objectMap["properties"] = asg.ApplicationSecurityGroupPropertiesFormat
2853	}
2854	if asg.ID != nil {
2855		objectMap["id"] = asg.ID
2856	}
2857	if asg.Location != nil {
2858		objectMap["location"] = asg.Location
2859	}
2860	if asg.Tags != nil {
2861		objectMap["tags"] = asg.Tags
2862	}
2863	return json.Marshal(objectMap)
2864}
2865
2866// UnmarshalJSON is the custom unmarshaler for ApplicationSecurityGroup struct.
2867func (asg *ApplicationSecurityGroup) UnmarshalJSON(body []byte) error {
2868	var m map[string]*json.RawMessage
2869	err := json.Unmarshal(body, &m)
2870	if err != nil {
2871		return err
2872	}
2873	for k, v := range m {
2874		switch k {
2875		case "properties":
2876			if v != nil {
2877				var applicationSecurityGroupPropertiesFormat ApplicationSecurityGroupPropertiesFormat
2878				err = json.Unmarshal(*v, &applicationSecurityGroupPropertiesFormat)
2879				if err != nil {
2880					return err
2881				}
2882				asg.ApplicationSecurityGroupPropertiesFormat = &applicationSecurityGroupPropertiesFormat
2883			}
2884		case "etag":
2885			if v != nil {
2886				var etag string
2887				err = json.Unmarshal(*v, &etag)
2888				if err != nil {
2889					return err
2890				}
2891				asg.Etag = &etag
2892			}
2893		case "id":
2894			if v != nil {
2895				var ID string
2896				err = json.Unmarshal(*v, &ID)
2897				if err != nil {
2898					return err
2899				}
2900				asg.ID = &ID
2901			}
2902		case "name":
2903			if v != nil {
2904				var name string
2905				err = json.Unmarshal(*v, &name)
2906				if err != nil {
2907					return err
2908				}
2909				asg.Name = &name
2910			}
2911		case "type":
2912			if v != nil {
2913				var typeVar string
2914				err = json.Unmarshal(*v, &typeVar)
2915				if err != nil {
2916					return err
2917				}
2918				asg.Type = &typeVar
2919			}
2920		case "location":
2921			if v != nil {
2922				var location string
2923				err = json.Unmarshal(*v, &location)
2924				if err != nil {
2925					return err
2926				}
2927				asg.Location = &location
2928			}
2929		case "tags":
2930			if v != nil {
2931				var tags map[string]*string
2932				err = json.Unmarshal(*v, &tags)
2933				if err != nil {
2934					return err
2935				}
2936				asg.Tags = tags
2937			}
2938		}
2939	}
2940
2941	return nil
2942}
2943
2944// ApplicationSecurityGroupListResult a list of application security groups.
2945type ApplicationSecurityGroupListResult struct {
2946	autorest.Response `json:"-"`
2947	// Value - A list of application security groups.
2948	Value *[]ApplicationSecurityGroup `json:"value,omitempty"`
2949	// NextLink - READ-ONLY; The URL to get the next set of results.
2950	NextLink *string `json:"nextLink,omitempty"`
2951}
2952
2953// MarshalJSON is the custom marshaler for ApplicationSecurityGroupListResult.
2954func (asglr ApplicationSecurityGroupListResult) MarshalJSON() ([]byte, error) {
2955	objectMap := make(map[string]interface{})
2956	if asglr.Value != nil {
2957		objectMap["value"] = asglr.Value
2958	}
2959	return json.Marshal(objectMap)
2960}
2961
2962// ApplicationSecurityGroupListResultIterator provides access to a complete listing of
2963// ApplicationSecurityGroup values.
2964type ApplicationSecurityGroupListResultIterator struct {
2965	i    int
2966	page ApplicationSecurityGroupListResultPage
2967}
2968
2969// NextWithContext advances to the next value.  If there was an error making
2970// the request the iterator does not advance and the error is returned.
2971func (iter *ApplicationSecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
2972	if tracing.IsEnabled() {
2973		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupListResultIterator.NextWithContext")
2974		defer func() {
2975			sc := -1
2976			if iter.Response().Response.Response != nil {
2977				sc = iter.Response().Response.Response.StatusCode
2978			}
2979			tracing.EndSpan(ctx, sc, err)
2980		}()
2981	}
2982	iter.i++
2983	if iter.i < len(iter.page.Values()) {
2984		return nil
2985	}
2986	err = iter.page.NextWithContext(ctx)
2987	if err != nil {
2988		iter.i--
2989		return err
2990	}
2991	iter.i = 0
2992	return nil
2993}
2994
2995// Next advances to the next value.  If there was an error making
2996// the request the iterator does not advance and the error is returned.
2997// Deprecated: Use NextWithContext() instead.
2998func (iter *ApplicationSecurityGroupListResultIterator) Next() error {
2999	return iter.NextWithContext(context.Background())
3000}
3001
3002// NotDone returns true if the enumeration should be started or is not yet complete.
3003func (iter ApplicationSecurityGroupListResultIterator) NotDone() bool {
3004	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3005}
3006
3007// Response returns the raw server response from the last page request.
3008func (iter ApplicationSecurityGroupListResultIterator) Response() ApplicationSecurityGroupListResult {
3009	return iter.page.Response()
3010}
3011
3012// Value returns the current value or a zero-initialized value if the
3013// iterator has advanced beyond the end of the collection.
3014func (iter ApplicationSecurityGroupListResultIterator) Value() ApplicationSecurityGroup {
3015	if !iter.page.NotDone() {
3016		return ApplicationSecurityGroup{}
3017	}
3018	return iter.page.Values()[iter.i]
3019}
3020
3021// Creates a new instance of the ApplicationSecurityGroupListResultIterator type.
3022func NewApplicationSecurityGroupListResultIterator(page ApplicationSecurityGroupListResultPage) ApplicationSecurityGroupListResultIterator {
3023	return ApplicationSecurityGroupListResultIterator{page: page}
3024}
3025
3026// IsEmpty returns true if the ListResult contains no values.
3027func (asglr ApplicationSecurityGroupListResult) IsEmpty() bool {
3028	return asglr.Value == nil || len(*asglr.Value) == 0
3029}
3030
3031// hasNextLink returns true if the NextLink is not empty.
3032func (asglr ApplicationSecurityGroupListResult) hasNextLink() bool {
3033	return asglr.NextLink != nil && len(*asglr.NextLink) != 0
3034}
3035
3036// applicationSecurityGroupListResultPreparer prepares a request to retrieve the next set of results.
3037// It returns nil if no more results exist.
3038func (asglr ApplicationSecurityGroupListResult) applicationSecurityGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
3039	if !asglr.hasNextLink() {
3040		return nil, nil
3041	}
3042	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3043		autorest.AsJSON(),
3044		autorest.AsGet(),
3045		autorest.WithBaseURL(to.String(asglr.NextLink)))
3046}
3047
3048// ApplicationSecurityGroupListResultPage contains a page of ApplicationSecurityGroup values.
3049type ApplicationSecurityGroupListResultPage struct {
3050	fn    func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)
3051	asglr ApplicationSecurityGroupListResult
3052}
3053
3054// NextWithContext advances to the next page of values.  If there was an error making
3055// the request the page does not advance and the error is returned.
3056func (page *ApplicationSecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
3057	if tracing.IsEnabled() {
3058		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupListResultPage.NextWithContext")
3059		defer func() {
3060			sc := -1
3061			if page.Response().Response.Response != nil {
3062				sc = page.Response().Response.Response.StatusCode
3063			}
3064			tracing.EndSpan(ctx, sc, err)
3065		}()
3066	}
3067	for {
3068		next, err := page.fn(ctx, page.asglr)
3069		if err != nil {
3070			return err
3071		}
3072		page.asglr = next
3073		if !next.hasNextLink() || !next.IsEmpty() {
3074			break
3075		}
3076	}
3077	return nil
3078}
3079
3080// Next advances to the next page of values.  If there was an error making
3081// the request the page does not advance and the error is returned.
3082// Deprecated: Use NextWithContext() instead.
3083func (page *ApplicationSecurityGroupListResultPage) Next() error {
3084	return page.NextWithContext(context.Background())
3085}
3086
3087// NotDone returns true if the page enumeration should be started or is not yet complete.
3088func (page ApplicationSecurityGroupListResultPage) NotDone() bool {
3089	return !page.asglr.IsEmpty()
3090}
3091
3092// Response returns the raw server response from the last page request.
3093func (page ApplicationSecurityGroupListResultPage) Response() ApplicationSecurityGroupListResult {
3094	return page.asglr
3095}
3096
3097// Values returns the slice of values for the current page or nil if there are no values.
3098func (page ApplicationSecurityGroupListResultPage) Values() []ApplicationSecurityGroup {
3099	if page.asglr.IsEmpty() {
3100		return nil
3101	}
3102	return *page.asglr.Value
3103}
3104
3105// Creates a new instance of the ApplicationSecurityGroupListResultPage type.
3106func NewApplicationSecurityGroupListResultPage(cur ApplicationSecurityGroupListResult, getNextPage func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)) ApplicationSecurityGroupListResultPage {
3107	return ApplicationSecurityGroupListResultPage{
3108		fn:    getNextPage,
3109		asglr: cur,
3110	}
3111}
3112
3113// ApplicationSecurityGroupPropertiesFormat application security group properties.
3114type ApplicationSecurityGroupPropertiesFormat struct {
3115	// 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.
3116	ResourceGUID *string `json:"resourceGuid,omitempty"`
3117	// ProvisioningState - READ-ONLY; The provisioning state of the application security group resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
3118	ProvisioningState *string `json:"provisioningState,omitempty"`
3119}
3120
3121// ApplicationSecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
3122// of a long-running operation.
3123type ApplicationSecurityGroupsCreateOrUpdateFuture struct {
3124	azure.FutureAPI
3125	// Result returns the result of the asynchronous operation.
3126	// If the operation has not completed it will return an error.
3127	Result func(ApplicationSecurityGroupsClient) (ApplicationSecurityGroup, error)
3128}
3129
3130// ApplicationSecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a
3131// long-running operation.
3132type ApplicationSecurityGroupsDeleteFuture struct {
3133	azure.FutureAPI
3134	// Result returns the result of the asynchronous operation.
3135	// If the operation has not completed it will return an error.
3136	Result func(ApplicationSecurityGroupsClient) (autorest.Response, error)
3137}
3138
3139// ApplicationSecurityGroupsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
3140// long-running operation.
3141type ApplicationSecurityGroupsUpdateTagsFuture struct {
3142	azure.FutureAPI
3143	// Result returns the result of the asynchronous operation.
3144	// If the operation has not completed it will return an error.
3145	Result func(ApplicationSecurityGroupsClient) (ApplicationSecurityGroup, error)
3146}
3147
3148// AuthorizationListResult response for ListAuthorizations API service call retrieves all authorizations
3149// that belongs to an ExpressRouteCircuit.
3150type AuthorizationListResult struct {
3151	autorest.Response `json:"-"`
3152	// Value - The authorizations in an ExpressRoute Circuit.
3153	Value *[]ExpressRouteCircuitAuthorization `json:"value,omitempty"`
3154	// NextLink - The URL to get the next set of results.
3155	NextLink *string `json:"nextLink,omitempty"`
3156}
3157
3158// AuthorizationListResultIterator provides access to a complete listing of
3159// ExpressRouteCircuitAuthorization values.
3160type AuthorizationListResultIterator struct {
3161	i    int
3162	page AuthorizationListResultPage
3163}
3164
3165// NextWithContext advances to the next value.  If there was an error making
3166// the request the iterator does not advance and the error is returned.
3167func (iter *AuthorizationListResultIterator) NextWithContext(ctx context.Context) (err error) {
3168	if tracing.IsEnabled() {
3169		ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultIterator.NextWithContext")
3170		defer func() {
3171			sc := -1
3172			if iter.Response().Response.Response != nil {
3173				sc = iter.Response().Response.Response.StatusCode
3174			}
3175			tracing.EndSpan(ctx, sc, err)
3176		}()
3177	}
3178	iter.i++
3179	if iter.i < len(iter.page.Values()) {
3180		return nil
3181	}
3182	err = iter.page.NextWithContext(ctx)
3183	if err != nil {
3184		iter.i--
3185		return err
3186	}
3187	iter.i = 0
3188	return nil
3189}
3190
3191// Next advances to the next value.  If there was an error making
3192// the request the iterator does not advance and the error is returned.
3193// Deprecated: Use NextWithContext() instead.
3194func (iter *AuthorizationListResultIterator) Next() error {
3195	return iter.NextWithContext(context.Background())
3196}
3197
3198// NotDone returns true if the enumeration should be started or is not yet complete.
3199func (iter AuthorizationListResultIterator) NotDone() bool {
3200	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3201}
3202
3203// Response returns the raw server response from the last page request.
3204func (iter AuthorizationListResultIterator) Response() AuthorizationListResult {
3205	return iter.page.Response()
3206}
3207
3208// Value returns the current value or a zero-initialized value if the
3209// iterator has advanced beyond the end of the collection.
3210func (iter AuthorizationListResultIterator) Value() ExpressRouteCircuitAuthorization {
3211	if !iter.page.NotDone() {
3212		return ExpressRouteCircuitAuthorization{}
3213	}
3214	return iter.page.Values()[iter.i]
3215}
3216
3217// Creates a new instance of the AuthorizationListResultIterator type.
3218func NewAuthorizationListResultIterator(page AuthorizationListResultPage) AuthorizationListResultIterator {
3219	return AuthorizationListResultIterator{page: page}
3220}
3221
3222// IsEmpty returns true if the ListResult contains no values.
3223func (alr AuthorizationListResult) IsEmpty() bool {
3224	return alr.Value == nil || len(*alr.Value) == 0
3225}
3226
3227// hasNextLink returns true if the NextLink is not empty.
3228func (alr AuthorizationListResult) hasNextLink() bool {
3229	return alr.NextLink != nil && len(*alr.NextLink) != 0
3230}
3231
3232// authorizationListResultPreparer prepares a request to retrieve the next set of results.
3233// It returns nil if no more results exist.
3234func (alr AuthorizationListResult) authorizationListResultPreparer(ctx context.Context) (*http.Request, error) {
3235	if !alr.hasNextLink() {
3236		return nil, nil
3237	}
3238	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3239		autorest.AsJSON(),
3240		autorest.AsGet(),
3241		autorest.WithBaseURL(to.String(alr.NextLink)))
3242}
3243
3244// AuthorizationListResultPage contains a page of ExpressRouteCircuitAuthorization values.
3245type AuthorizationListResultPage struct {
3246	fn  func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)
3247	alr AuthorizationListResult
3248}
3249
3250// NextWithContext advances to the next page of values.  If there was an error making
3251// the request the page does not advance and the error is returned.
3252func (page *AuthorizationListResultPage) NextWithContext(ctx context.Context) (err error) {
3253	if tracing.IsEnabled() {
3254		ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultPage.NextWithContext")
3255		defer func() {
3256			sc := -1
3257			if page.Response().Response.Response != nil {
3258				sc = page.Response().Response.Response.StatusCode
3259			}
3260			tracing.EndSpan(ctx, sc, err)
3261		}()
3262	}
3263	for {
3264		next, err := page.fn(ctx, page.alr)
3265		if err != nil {
3266			return err
3267		}
3268		page.alr = next
3269		if !next.hasNextLink() || !next.IsEmpty() {
3270			break
3271		}
3272	}
3273	return nil
3274}
3275
3276// Next advances to the next page of values.  If there was an error making
3277// the request the page does not advance and the error is returned.
3278// Deprecated: Use NextWithContext() instead.
3279func (page *AuthorizationListResultPage) Next() error {
3280	return page.NextWithContext(context.Background())
3281}
3282
3283// NotDone returns true if the page enumeration should be started or is not yet complete.
3284func (page AuthorizationListResultPage) NotDone() bool {
3285	return !page.alr.IsEmpty()
3286}
3287
3288// Response returns the raw server response from the last page request.
3289func (page AuthorizationListResultPage) Response() AuthorizationListResult {
3290	return page.alr
3291}
3292
3293// Values returns the slice of values for the current page or nil if there are no values.
3294func (page AuthorizationListResultPage) Values() []ExpressRouteCircuitAuthorization {
3295	if page.alr.IsEmpty() {
3296		return nil
3297	}
3298	return *page.alr.Value
3299}
3300
3301// Creates a new instance of the AuthorizationListResultPage type.
3302func NewAuthorizationListResultPage(cur AuthorizationListResult, getNextPage func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)) AuthorizationListResultPage {
3303	return AuthorizationListResultPage{
3304		fn:  getNextPage,
3305		alr: cur,
3306	}
3307}
3308
3309// AuthorizationPropertiesFormat ...
3310type AuthorizationPropertiesFormat struct {
3311	// AuthorizationKey - The authorization key.
3312	AuthorizationKey *string `json:"authorizationKey,omitempty"`
3313	// AuthorizationUseStatus - AuthorizationUseStatus. Possible values are: 'Available' and 'InUse'. Possible values include: 'Available', 'InUse'
3314	AuthorizationUseStatus AuthorizationUseStatus `json:"authorizationUseStatus,omitempty"`
3315	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
3316	ProvisioningState *string `json:"provisioningState,omitempty"`
3317}
3318
3319// Availability availability of the metric.
3320type Availability struct {
3321	// TimeGrain - The time grain of the availability.
3322	TimeGrain *string `json:"timeGrain,omitempty"`
3323	// Retention - The retention of the availability.
3324	Retention *string `json:"retention,omitempty"`
3325	// BlobDuration - Duration of the availability blob.
3326	BlobDuration *string `json:"blobDuration,omitempty"`
3327}
3328
3329// AvailableDelegation the serviceName of an AvailableDelegation indicates a possible delegation for a
3330// subnet.
3331type AvailableDelegation struct {
3332	// Name - The name of the AvailableDelegation resource.
3333	Name *string `json:"name,omitempty"`
3334	// ID - A unique identifier of the AvailableDelegation resource.
3335	ID *string `json:"id,omitempty"`
3336	// Type - Resource type.
3337	Type *string `json:"type,omitempty"`
3338	// ServiceName - The name of the service and resource
3339	ServiceName *string `json:"serviceName,omitempty"`
3340	// Actions - Describes the actions permitted to the service upon delegation
3341	Actions *[]string `json:"actions,omitempty"`
3342}
3343
3344// AvailableDelegationsResult an array of available delegations.
3345type AvailableDelegationsResult struct {
3346	autorest.Response `json:"-"`
3347	// Value - An array of available delegations.
3348	Value *[]AvailableDelegation `json:"value,omitempty"`
3349	// NextLink - READ-ONLY; The URL to get the next set of results.
3350	NextLink *string `json:"nextLink,omitempty"`
3351}
3352
3353// MarshalJSON is the custom marshaler for AvailableDelegationsResult.
3354func (adr AvailableDelegationsResult) MarshalJSON() ([]byte, error) {
3355	objectMap := make(map[string]interface{})
3356	if adr.Value != nil {
3357		objectMap["value"] = adr.Value
3358	}
3359	return json.Marshal(objectMap)
3360}
3361
3362// AvailableDelegationsResultIterator provides access to a complete listing of AvailableDelegation values.
3363type AvailableDelegationsResultIterator struct {
3364	i    int
3365	page AvailableDelegationsResultPage
3366}
3367
3368// NextWithContext advances to the next value.  If there was an error making
3369// the request the iterator does not advance and the error is returned.
3370func (iter *AvailableDelegationsResultIterator) NextWithContext(ctx context.Context) (err error) {
3371	if tracing.IsEnabled() {
3372		ctx = tracing.StartSpan(ctx, fqdn+"/AvailableDelegationsResultIterator.NextWithContext")
3373		defer func() {
3374			sc := -1
3375			if iter.Response().Response.Response != nil {
3376				sc = iter.Response().Response.Response.StatusCode
3377			}
3378			tracing.EndSpan(ctx, sc, err)
3379		}()
3380	}
3381	iter.i++
3382	if iter.i < len(iter.page.Values()) {
3383		return nil
3384	}
3385	err = iter.page.NextWithContext(ctx)
3386	if err != nil {
3387		iter.i--
3388		return err
3389	}
3390	iter.i = 0
3391	return nil
3392}
3393
3394// Next advances to the next value.  If there was an error making
3395// the request the iterator does not advance and the error is returned.
3396// Deprecated: Use NextWithContext() instead.
3397func (iter *AvailableDelegationsResultIterator) Next() error {
3398	return iter.NextWithContext(context.Background())
3399}
3400
3401// NotDone returns true if the enumeration should be started or is not yet complete.
3402func (iter AvailableDelegationsResultIterator) NotDone() bool {
3403	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3404}
3405
3406// Response returns the raw server response from the last page request.
3407func (iter AvailableDelegationsResultIterator) Response() AvailableDelegationsResult {
3408	return iter.page.Response()
3409}
3410
3411// Value returns the current value or a zero-initialized value if the
3412// iterator has advanced beyond the end of the collection.
3413func (iter AvailableDelegationsResultIterator) Value() AvailableDelegation {
3414	if !iter.page.NotDone() {
3415		return AvailableDelegation{}
3416	}
3417	return iter.page.Values()[iter.i]
3418}
3419
3420// Creates a new instance of the AvailableDelegationsResultIterator type.
3421func NewAvailableDelegationsResultIterator(page AvailableDelegationsResultPage) AvailableDelegationsResultIterator {
3422	return AvailableDelegationsResultIterator{page: page}
3423}
3424
3425// IsEmpty returns true if the ListResult contains no values.
3426func (adr AvailableDelegationsResult) IsEmpty() bool {
3427	return adr.Value == nil || len(*adr.Value) == 0
3428}
3429
3430// hasNextLink returns true if the NextLink is not empty.
3431func (adr AvailableDelegationsResult) hasNextLink() bool {
3432	return adr.NextLink != nil && len(*adr.NextLink) != 0
3433}
3434
3435// availableDelegationsResultPreparer prepares a request to retrieve the next set of results.
3436// It returns nil if no more results exist.
3437func (adr AvailableDelegationsResult) availableDelegationsResultPreparer(ctx context.Context) (*http.Request, error) {
3438	if !adr.hasNextLink() {
3439		return nil, nil
3440	}
3441	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3442		autorest.AsJSON(),
3443		autorest.AsGet(),
3444		autorest.WithBaseURL(to.String(adr.NextLink)))
3445}
3446
3447// AvailableDelegationsResultPage contains a page of AvailableDelegation values.
3448type AvailableDelegationsResultPage struct {
3449	fn  func(context.Context, AvailableDelegationsResult) (AvailableDelegationsResult, error)
3450	adr AvailableDelegationsResult
3451}
3452
3453// NextWithContext advances to the next page of values.  If there was an error making
3454// the request the page does not advance and the error is returned.
3455func (page *AvailableDelegationsResultPage) NextWithContext(ctx context.Context) (err error) {
3456	if tracing.IsEnabled() {
3457		ctx = tracing.StartSpan(ctx, fqdn+"/AvailableDelegationsResultPage.NextWithContext")
3458		defer func() {
3459			sc := -1
3460			if page.Response().Response.Response != nil {
3461				sc = page.Response().Response.Response.StatusCode
3462			}
3463			tracing.EndSpan(ctx, sc, err)
3464		}()
3465	}
3466	for {
3467		next, err := page.fn(ctx, page.adr)
3468		if err != nil {
3469			return err
3470		}
3471		page.adr = next
3472		if !next.hasNextLink() || !next.IsEmpty() {
3473			break
3474		}
3475	}
3476	return nil
3477}
3478
3479// Next advances to the next page of values.  If there was an error making
3480// the request the page does not advance and the error is returned.
3481// Deprecated: Use NextWithContext() instead.
3482func (page *AvailableDelegationsResultPage) Next() error {
3483	return page.NextWithContext(context.Background())
3484}
3485
3486// NotDone returns true if the page enumeration should be started or is not yet complete.
3487func (page AvailableDelegationsResultPage) NotDone() bool {
3488	return !page.adr.IsEmpty()
3489}
3490
3491// Response returns the raw server response from the last page request.
3492func (page AvailableDelegationsResultPage) Response() AvailableDelegationsResult {
3493	return page.adr
3494}
3495
3496// Values returns the slice of values for the current page or nil if there are no values.
3497func (page AvailableDelegationsResultPage) Values() []AvailableDelegation {
3498	if page.adr.IsEmpty() {
3499		return nil
3500	}
3501	return *page.adr.Value
3502}
3503
3504// Creates a new instance of the AvailableDelegationsResultPage type.
3505func NewAvailableDelegationsResultPage(cur AvailableDelegationsResult, getNextPage func(context.Context, AvailableDelegationsResult) (AvailableDelegationsResult, error)) AvailableDelegationsResultPage {
3506	return AvailableDelegationsResultPage{
3507		fn:  getNextPage,
3508		adr: cur,
3509	}
3510}
3511
3512// AvailableProvidersList list of available countries with details.
3513type AvailableProvidersList struct {
3514	autorest.Response `json:"-"`
3515	// Countries - List of available countries.
3516	Countries *[]AvailableProvidersListCountry `json:"countries,omitempty"`
3517}
3518
3519// AvailableProvidersListCity city or town details.
3520type AvailableProvidersListCity struct {
3521	// CityName - The city or town name.
3522	CityName *string `json:"cityName,omitempty"`
3523	// Providers - A list of Internet service providers.
3524	Providers *[]string `json:"providers,omitempty"`
3525}
3526
3527// AvailableProvidersListCountry country details.
3528type AvailableProvidersListCountry struct {
3529	// CountryName - The country name.
3530	CountryName *string `json:"countryName,omitempty"`
3531	// Providers - A list of Internet service providers.
3532	Providers *[]string `json:"providers,omitempty"`
3533	// States - List of available states in the country.
3534	States *[]AvailableProvidersListState `json:"states,omitempty"`
3535}
3536
3537// AvailableProvidersListParameters constraints that determine the list of available Internet service
3538// providers.
3539type AvailableProvidersListParameters struct {
3540	// AzureLocations - A list of Azure regions.
3541	AzureLocations *[]string `json:"azureLocations,omitempty"`
3542	// Country - The country for available providers list.
3543	Country *string `json:"country,omitempty"`
3544	// State - The state for available providers list.
3545	State *string `json:"state,omitempty"`
3546	// City - The city or town for available providers list.
3547	City *string `json:"city,omitempty"`
3548}
3549
3550// AvailableProvidersListState state details.
3551type AvailableProvidersListState struct {
3552	// StateName - The state name.
3553	StateName *string `json:"stateName,omitempty"`
3554	// Providers - A list of Internet service providers.
3555	Providers *[]string `json:"providers,omitempty"`
3556	// Cities - List of available cities or towns in the state.
3557	Cities *[]AvailableProvidersListCity `json:"cities,omitempty"`
3558}
3559
3560// AzureAsyncOperationResult the response body contains the status of the specified asynchronous operation,
3561// indicating whether it has succeeded, is in progress, or has failed. Note that this status is distinct
3562// from the HTTP status code returned for the Get Operation Status operation itself. If the asynchronous
3563// operation succeeded, the response body includes the HTTP status code for the successful request. If the
3564// asynchronous operation failed, the response body includes the HTTP status code for the failed request
3565// and error information regarding the failure.
3566type AzureAsyncOperationResult struct {
3567	// Status - Status of the Azure async operation. Possible values are: 'InProgress', 'Succeeded', and 'Failed'. Possible values include: 'OperationStatusInProgress', 'OperationStatusSucceeded', 'OperationStatusFailed'
3568	Status OperationStatus `json:"status,omitempty"`
3569	Error  *Error          `json:"error,omitempty"`
3570}
3571
3572// AzureFirewall azure Firewall resource
3573type AzureFirewall struct {
3574	autorest.Response              `json:"-"`
3575	*AzureFirewallPropertiesFormat `json:"properties,omitempty"`
3576	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
3577	Etag *string `json:"etag,omitempty"`
3578	// ID - Resource ID.
3579	ID *string `json:"id,omitempty"`
3580	// Name - READ-ONLY; Resource name.
3581	Name *string `json:"name,omitempty"`
3582	// Type - READ-ONLY; Resource type.
3583	Type *string `json:"type,omitempty"`
3584	// Location - Resource location.
3585	Location *string `json:"location,omitempty"`
3586	// Tags - Resource tags.
3587	Tags map[string]*string `json:"tags"`
3588}
3589
3590// MarshalJSON is the custom marshaler for AzureFirewall.
3591func (af AzureFirewall) MarshalJSON() ([]byte, error) {
3592	objectMap := make(map[string]interface{})
3593	if af.AzureFirewallPropertiesFormat != nil {
3594		objectMap["properties"] = af.AzureFirewallPropertiesFormat
3595	}
3596	if af.ID != nil {
3597		objectMap["id"] = af.ID
3598	}
3599	if af.Location != nil {
3600		objectMap["location"] = af.Location
3601	}
3602	if af.Tags != nil {
3603		objectMap["tags"] = af.Tags
3604	}
3605	return json.Marshal(objectMap)
3606}
3607
3608// UnmarshalJSON is the custom unmarshaler for AzureFirewall struct.
3609func (af *AzureFirewall) UnmarshalJSON(body []byte) error {
3610	var m map[string]*json.RawMessage
3611	err := json.Unmarshal(body, &m)
3612	if err != nil {
3613		return err
3614	}
3615	for k, v := range m {
3616		switch k {
3617		case "properties":
3618			if v != nil {
3619				var azureFirewallPropertiesFormat AzureFirewallPropertiesFormat
3620				err = json.Unmarshal(*v, &azureFirewallPropertiesFormat)
3621				if err != nil {
3622					return err
3623				}
3624				af.AzureFirewallPropertiesFormat = &azureFirewallPropertiesFormat
3625			}
3626		case "etag":
3627			if v != nil {
3628				var etag string
3629				err = json.Unmarshal(*v, &etag)
3630				if err != nil {
3631					return err
3632				}
3633				af.Etag = &etag
3634			}
3635		case "id":
3636			if v != nil {
3637				var ID string
3638				err = json.Unmarshal(*v, &ID)
3639				if err != nil {
3640					return err
3641				}
3642				af.ID = &ID
3643			}
3644		case "name":
3645			if v != nil {
3646				var name string
3647				err = json.Unmarshal(*v, &name)
3648				if err != nil {
3649					return err
3650				}
3651				af.Name = &name
3652			}
3653		case "type":
3654			if v != nil {
3655				var typeVar string
3656				err = json.Unmarshal(*v, &typeVar)
3657				if err != nil {
3658					return err
3659				}
3660				af.Type = &typeVar
3661			}
3662		case "location":
3663			if v != nil {
3664				var location string
3665				err = json.Unmarshal(*v, &location)
3666				if err != nil {
3667					return err
3668				}
3669				af.Location = &location
3670			}
3671		case "tags":
3672			if v != nil {
3673				var tags map[string]*string
3674				err = json.Unmarshal(*v, &tags)
3675				if err != nil {
3676					return err
3677				}
3678				af.Tags = tags
3679			}
3680		}
3681	}
3682
3683	return nil
3684}
3685
3686// AzureFirewallApplicationRule properties of an application rule.
3687type AzureFirewallApplicationRule struct {
3688	// Name - Name of the application rule.
3689	Name *string `json:"name,omitempty"`
3690	// Description - Description of the rule.
3691	Description *string `json:"description,omitempty"`
3692	// SourceAddresses - List of source IP addresses for this rule.
3693	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
3694	// Protocols - Array of ApplicationRuleProtocols.
3695	Protocols *[]AzureFirewallApplicationRuleProtocol `json:"protocols,omitempty"`
3696	// TargetFqdns - List of FQDNs for this rule.
3697	TargetFqdns *[]string `json:"targetFqdns,omitempty"`
3698	// FqdnTags - List of FQDN Tags for this rule.
3699	FqdnTags *[]string `json:"fqdnTags,omitempty"`
3700}
3701
3702// AzureFirewallApplicationRuleCollection application rule collection resource
3703type AzureFirewallApplicationRuleCollection struct {
3704	*AzureFirewallApplicationRuleCollectionPropertiesFormat `json:"properties,omitempty"`
3705	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
3706	Name *string `json:"name,omitempty"`
3707	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
3708	Etag *string `json:"etag,omitempty"`
3709	// ID - Resource ID.
3710	ID *string `json:"id,omitempty"`
3711}
3712
3713// MarshalJSON is the custom marshaler for AzureFirewallApplicationRuleCollection.
3714func (afarc AzureFirewallApplicationRuleCollection) MarshalJSON() ([]byte, error) {
3715	objectMap := make(map[string]interface{})
3716	if afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat != nil {
3717		objectMap["properties"] = afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat
3718	}
3719	if afarc.Name != nil {
3720		objectMap["name"] = afarc.Name
3721	}
3722	if afarc.ID != nil {
3723		objectMap["id"] = afarc.ID
3724	}
3725	return json.Marshal(objectMap)
3726}
3727
3728// UnmarshalJSON is the custom unmarshaler for AzureFirewallApplicationRuleCollection struct.
3729func (afarc *AzureFirewallApplicationRuleCollection) UnmarshalJSON(body []byte) error {
3730	var m map[string]*json.RawMessage
3731	err := json.Unmarshal(body, &m)
3732	if err != nil {
3733		return err
3734	}
3735	for k, v := range m {
3736		switch k {
3737		case "properties":
3738			if v != nil {
3739				var azureFirewallApplicationRuleCollectionPropertiesFormat AzureFirewallApplicationRuleCollectionPropertiesFormat
3740				err = json.Unmarshal(*v, &azureFirewallApplicationRuleCollectionPropertiesFormat)
3741				if err != nil {
3742					return err
3743				}
3744				afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat = &azureFirewallApplicationRuleCollectionPropertiesFormat
3745			}
3746		case "name":
3747			if v != nil {
3748				var name string
3749				err = json.Unmarshal(*v, &name)
3750				if err != nil {
3751					return err
3752				}
3753				afarc.Name = &name
3754			}
3755		case "etag":
3756			if v != nil {
3757				var etag string
3758				err = json.Unmarshal(*v, &etag)
3759				if err != nil {
3760					return err
3761				}
3762				afarc.Etag = &etag
3763			}
3764		case "id":
3765			if v != nil {
3766				var ID string
3767				err = json.Unmarshal(*v, &ID)
3768				if err != nil {
3769					return err
3770				}
3771				afarc.ID = &ID
3772			}
3773		}
3774	}
3775
3776	return nil
3777}
3778
3779// AzureFirewallApplicationRuleCollectionPropertiesFormat properties of the application rule collection.
3780type AzureFirewallApplicationRuleCollectionPropertiesFormat struct {
3781	// Priority - Priority of the application rule collection resource.
3782	Priority *int32 `json:"priority,omitempty"`
3783	// Action - The action type of a rule collection
3784	Action *AzureFirewallRCAction `json:"action,omitempty"`
3785	// Rules - Collection of rules used by a application rule collection.
3786	Rules *[]AzureFirewallApplicationRule `json:"rules,omitempty"`
3787	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
3788	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
3789}
3790
3791// AzureFirewallApplicationRuleProtocol properties of the application rule protocol.
3792type AzureFirewallApplicationRuleProtocol struct {
3793	// ProtocolType - Protocol type. Possible values include: 'AzureFirewallApplicationRuleProtocolTypeHTTP', 'AzureFirewallApplicationRuleProtocolTypeHTTPS'
3794	ProtocolType AzureFirewallApplicationRuleProtocolType `json:"protocolType,omitempty"`
3795	// Port - Port number for the protocol, cannot be greater than 64000. This field is optional.
3796	Port *int32 `json:"port,omitempty"`
3797}
3798
3799// AzureFirewallFqdnTag azure Firewall FQDN Tag Resource
3800type AzureFirewallFqdnTag struct {
3801	*AzureFirewallFqdnTagPropertiesFormat `json:"properties,omitempty"`
3802	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
3803	Etag *string `json:"etag,omitempty"`
3804	// ID - Resource ID.
3805	ID *string `json:"id,omitempty"`
3806	// Name - READ-ONLY; Resource name.
3807	Name *string `json:"name,omitempty"`
3808	// Type - READ-ONLY; Resource type.
3809	Type *string `json:"type,omitempty"`
3810	// Location - Resource location.
3811	Location *string `json:"location,omitempty"`
3812	// Tags - Resource tags.
3813	Tags map[string]*string `json:"tags"`
3814}
3815
3816// MarshalJSON is the custom marshaler for AzureFirewallFqdnTag.
3817func (afft AzureFirewallFqdnTag) MarshalJSON() ([]byte, error) {
3818	objectMap := make(map[string]interface{})
3819	if afft.AzureFirewallFqdnTagPropertiesFormat != nil {
3820		objectMap["properties"] = afft.AzureFirewallFqdnTagPropertiesFormat
3821	}
3822	if afft.ID != nil {
3823		objectMap["id"] = afft.ID
3824	}
3825	if afft.Location != nil {
3826		objectMap["location"] = afft.Location
3827	}
3828	if afft.Tags != nil {
3829		objectMap["tags"] = afft.Tags
3830	}
3831	return json.Marshal(objectMap)
3832}
3833
3834// UnmarshalJSON is the custom unmarshaler for AzureFirewallFqdnTag struct.
3835func (afft *AzureFirewallFqdnTag) UnmarshalJSON(body []byte) error {
3836	var m map[string]*json.RawMessage
3837	err := json.Unmarshal(body, &m)
3838	if err != nil {
3839		return err
3840	}
3841	for k, v := range m {
3842		switch k {
3843		case "properties":
3844			if v != nil {
3845				var azureFirewallFqdnTagPropertiesFormat AzureFirewallFqdnTagPropertiesFormat
3846				err = json.Unmarshal(*v, &azureFirewallFqdnTagPropertiesFormat)
3847				if err != nil {
3848					return err
3849				}
3850				afft.AzureFirewallFqdnTagPropertiesFormat = &azureFirewallFqdnTagPropertiesFormat
3851			}
3852		case "etag":
3853			if v != nil {
3854				var etag string
3855				err = json.Unmarshal(*v, &etag)
3856				if err != nil {
3857					return err
3858				}
3859				afft.Etag = &etag
3860			}
3861		case "id":
3862			if v != nil {
3863				var ID string
3864				err = json.Unmarshal(*v, &ID)
3865				if err != nil {
3866					return err
3867				}
3868				afft.ID = &ID
3869			}
3870		case "name":
3871			if v != nil {
3872				var name string
3873				err = json.Unmarshal(*v, &name)
3874				if err != nil {
3875					return err
3876				}
3877				afft.Name = &name
3878			}
3879		case "type":
3880			if v != nil {
3881				var typeVar string
3882				err = json.Unmarshal(*v, &typeVar)
3883				if err != nil {
3884					return err
3885				}
3886				afft.Type = &typeVar
3887			}
3888		case "location":
3889			if v != nil {
3890				var location string
3891				err = json.Unmarshal(*v, &location)
3892				if err != nil {
3893					return err
3894				}
3895				afft.Location = &location
3896			}
3897		case "tags":
3898			if v != nil {
3899				var tags map[string]*string
3900				err = json.Unmarshal(*v, &tags)
3901				if err != nil {
3902					return err
3903				}
3904				afft.Tags = tags
3905			}
3906		}
3907	}
3908
3909	return nil
3910}
3911
3912// AzureFirewallFqdnTagListResult response for ListAzureFirewallFqdnTags API service call.
3913type AzureFirewallFqdnTagListResult struct {
3914	autorest.Response `json:"-"`
3915	// Value - List of Azure Firewall FQDN Tags in a resource group.
3916	Value *[]AzureFirewallFqdnTag `json:"value,omitempty"`
3917	// NextLink - URL to get the next set of results.
3918	NextLink *string `json:"nextLink,omitempty"`
3919}
3920
3921// AzureFirewallFqdnTagListResultIterator provides access to a complete listing of AzureFirewallFqdnTag
3922// values.
3923type AzureFirewallFqdnTagListResultIterator struct {
3924	i    int
3925	page AzureFirewallFqdnTagListResultPage
3926}
3927
3928// NextWithContext advances to the next value.  If there was an error making
3929// the request the iterator does not advance and the error is returned.
3930func (iter *AzureFirewallFqdnTagListResultIterator) NextWithContext(ctx context.Context) (err error) {
3931	if tracing.IsEnabled() {
3932		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallFqdnTagListResultIterator.NextWithContext")
3933		defer func() {
3934			sc := -1
3935			if iter.Response().Response.Response != nil {
3936				sc = iter.Response().Response.Response.StatusCode
3937			}
3938			tracing.EndSpan(ctx, sc, err)
3939		}()
3940	}
3941	iter.i++
3942	if iter.i < len(iter.page.Values()) {
3943		return nil
3944	}
3945	err = iter.page.NextWithContext(ctx)
3946	if err != nil {
3947		iter.i--
3948		return err
3949	}
3950	iter.i = 0
3951	return nil
3952}
3953
3954// Next advances to the next value.  If there was an error making
3955// the request the iterator does not advance and the error is returned.
3956// Deprecated: Use NextWithContext() instead.
3957func (iter *AzureFirewallFqdnTagListResultIterator) Next() error {
3958	return iter.NextWithContext(context.Background())
3959}
3960
3961// NotDone returns true if the enumeration should be started or is not yet complete.
3962func (iter AzureFirewallFqdnTagListResultIterator) NotDone() bool {
3963	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3964}
3965
3966// Response returns the raw server response from the last page request.
3967func (iter AzureFirewallFqdnTagListResultIterator) Response() AzureFirewallFqdnTagListResult {
3968	return iter.page.Response()
3969}
3970
3971// Value returns the current value or a zero-initialized value if the
3972// iterator has advanced beyond the end of the collection.
3973func (iter AzureFirewallFqdnTagListResultIterator) Value() AzureFirewallFqdnTag {
3974	if !iter.page.NotDone() {
3975		return AzureFirewallFqdnTag{}
3976	}
3977	return iter.page.Values()[iter.i]
3978}
3979
3980// Creates a new instance of the AzureFirewallFqdnTagListResultIterator type.
3981func NewAzureFirewallFqdnTagListResultIterator(page AzureFirewallFqdnTagListResultPage) AzureFirewallFqdnTagListResultIterator {
3982	return AzureFirewallFqdnTagListResultIterator{page: page}
3983}
3984
3985// IsEmpty returns true if the ListResult contains no values.
3986func (afftlr AzureFirewallFqdnTagListResult) IsEmpty() bool {
3987	return afftlr.Value == nil || len(*afftlr.Value) == 0
3988}
3989
3990// hasNextLink returns true if the NextLink is not empty.
3991func (afftlr AzureFirewallFqdnTagListResult) hasNextLink() bool {
3992	return afftlr.NextLink != nil && len(*afftlr.NextLink) != 0
3993}
3994
3995// azureFirewallFqdnTagListResultPreparer prepares a request to retrieve the next set of results.
3996// It returns nil if no more results exist.
3997func (afftlr AzureFirewallFqdnTagListResult) azureFirewallFqdnTagListResultPreparer(ctx context.Context) (*http.Request, error) {
3998	if !afftlr.hasNextLink() {
3999		return nil, nil
4000	}
4001	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4002		autorest.AsJSON(),
4003		autorest.AsGet(),
4004		autorest.WithBaseURL(to.String(afftlr.NextLink)))
4005}
4006
4007// AzureFirewallFqdnTagListResultPage contains a page of AzureFirewallFqdnTag values.
4008type AzureFirewallFqdnTagListResultPage struct {
4009	fn     func(context.Context, AzureFirewallFqdnTagListResult) (AzureFirewallFqdnTagListResult, error)
4010	afftlr AzureFirewallFqdnTagListResult
4011}
4012
4013// NextWithContext advances to the next page of values.  If there was an error making
4014// the request the page does not advance and the error is returned.
4015func (page *AzureFirewallFqdnTagListResultPage) NextWithContext(ctx context.Context) (err error) {
4016	if tracing.IsEnabled() {
4017		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallFqdnTagListResultPage.NextWithContext")
4018		defer func() {
4019			sc := -1
4020			if page.Response().Response.Response != nil {
4021				sc = page.Response().Response.Response.StatusCode
4022			}
4023			tracing.EndSpan(ctx, sc, err)
4024		}()
4025	}
4026	for {
4027		next, err := page.fn(ctx, page.afftlr)
4028		if err != nil {
4029			return err
4030		}
4031		page.afftlr = next
4032		if !next.hasNextLink() || !next.IsEmpty() {
4033			break
4034		}
4035	}
4036	return nil
4037}
4038
4039// Next advances to the next page of values.  If there was an error making
4040// the request the page does not advance and the error is returned.
4041// Deprecated: Use NextWithContext() instead.
4042func (page *AzureFirewallFqdnTagListResultPage) Next() error {
4043	return page.NextWithContext(context.Background())
4044}
4045
4046// NotDone returns true if the page enumeration should be started or is not yet complete.
4047func (page AzureFirewallFqdnTagListResultPage) NotDone() bool {
4048	return !page.afftlr.IsEmpty()
4049}
4050
4051// Response returns the raw server response from the last page request.
4052func (page AzureFirewallFqdnTagListResultPage) Response() AzureFirewallFqdnTagListResult {
4053	return page.afftlr
4054}
4055
4056// Values returns the slice of values for the current page or nil if there are no values.
4057func (page AzureFirewallFqdnTagListResultPage) Values() []AzureFirewallFqdnTag {
4058	if page.afftlr.IsEmpty() {
4059		return nil
4060	}
4061	return *page.afftlr.Value
4062}
4063
4064// Creates a new instance of the AzureFirewallFqdnTagListResultPage type.
4065func NewAzureFirewallFqdnTagListResultPage(cur AzureFirewallFqdnTagListResult, getNextPage func(context.Context, AzureFirewallFqdnTagListResult) (AzureFirewallFqdnTagListResult, error)) AzureFirewallFqdnTagListResultPage {
4066	return AzureFirewallFqdnTagListResultPage{
4067		fn:     getNextPage,
4068		afftlr: cur,
4069	}
4070}
4071
4072// AzureFirewallFqdnTagPropertiesFormat azure Firewall FQDN Tag Properties
4073type AzureFirewallFqdnTagPropertiesFormat struct {
4074	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
4075	ProvisioningState *string `json:"provisioningState,omitempty"`
4076	// FqdnTagName - READ-ONLY; The name of this FQDN Tag.
4077	FqdnTagName *string `json:"fqdnTagName,omitempty"`
4078}
4079
4080// AzureFirewallIPConfiguration IP configuration of an Azure Firewall.
4081type AzureFirewallIPConfiguration struct {
4082	*AzureFirewallIPConfigurationPropertiesFormat `json:"properties,omitempty"`
4083	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
4084	Name *string `json:"name,omitempty"`
4085	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
4086	Etag *string `json:"etag,omitempty"`
4087	// ID - Resource ID.
4088	ID *string `json:"id,omitempty"`
4089}
4090
4091// MarshalJSON is the custom marshaler for AzureFirewallIPConfiguration.
4092func (afic AzureFirewallIPConfiguration) MarshalJSON() ([]byte, error) {
4093	objectMap := make(map[string]interface{})
4094	if afic.AzureFirewallIPConfigurationPropertiesFormat != nil {
4095		objectMap["properties"] = afic.AzureFirewallIPConfigurationPropertiesFormat
4096	}
4097	if afic.Name != nil {
4098		objectMap["name"] = afic.Name
4099	}
4100	if afic.ID != nil {
4101		objectMap["id"] = afic.ID
4102	}
4103	return json.Marshal(objectMap)
4104}
4105
4106// UnmarshalJSON is the custom unmarshaler for AzureFirewallIPConfiguration struct.
4107func (afic *AzureFirewallIPConfiguration) UnmarshalJSON(body []byte) error {
4108	var m map[string]*json.RawMessage
4109	err := json.Unmarshal(body, &m)
4110	if err != nil {
4111		return err
4112	}
4113	for k, v := range m {
4114		switch k {
4115		case "properties":
4116			if v != nil {
4117				var azureFirewallIPConfigurationPropertiesFormat AzureFirewallIPConfigurationPropertiesFormat
4118				err = json.Unmarshal(*v, &azureFirewallIPConfigurationPropertiesFormat)
4119				if err != nil {
4120					return err
4121				}
4122				afic.AzureFirewallIPConfigurationPropertiesFormat = &azureFirewallIPConfigurationPropertiesFormat
4123			}
4124		case "name":
4125			if v != nil {
4126				var name string
4127				err = json.Unmarshal(*v, &name)
4128				if err != nil {
4129					return err
4130				}
4131				afic.Name = &name
4132			}
4133		case "etag":
4134			if v != nil {
4135				var etag string
4136				err = json.Unmarshal(*v, &etag)
4137				if err != nil {
4138					return err
4139				}
4140				afic.Etag = &etag
4141			}
4142		case "id":
4143			if v != nil {
4144				var ID string
4145				err = json.Unmarshal(*v, &ID)
4146				if err != nil {
4147					return err
4148				}
4149				afic.ID = &ID
4150			}
4151		}
4152	}
4153
4154	return nil
4155}
4156
4157// AzureFirewallIPConfigurationPropertiesFormat properties of IP configuration of an Azure Firewall.
4158type AzureFirewallIPConfigurationPropertiesFormat struct {
4159	// PrivateIPAddress - READ-ONLY; The Firewall Internal Load Balancer IP to be used as the next hop in User Defined Routes.
4160	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
4161	// Subnet - Reference of the subnet resource. This resource must be named 'AzureFirewallSubnet'.
4162	Subnet *SubResource `json:"subnet,omitempty"`
4163	// PublicIPAddress - Reference of the PublicIP resource. This field is a mandatory input if subnet is not null.
4164	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
4165	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
4166	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
4167}
4168
4169// MarshalJSON is the custom marshaler for AzureFirewallIPConfigurationPropertiesFormat.
4170func (aficpf AzureFirewallIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
4171	objectMap := make(map[string]interface{})
4172	if aficpf.Subnet != nil {
4173		objectMap["subnet"] = aficpf.Subnet
4174	}
4175	if aficpf.PublicIPAddress != nil {
4176		objectMap["publicIPAddress"] = aficpf.PublicIPAddress
4177	}
4178	if aficpf.ProvisioningState != "" {
4179		objectMap["provisioningState"] = aficpf.ProvisioningState
4180	}
4181	return json.Marshal(objectMap)
4182}
4183
4184// AzureFirewallListResult response for ListAzureFirewalls API service call.
4185type AzureFirewallListResult struct {
4186	autorest.Response `json:"-"`
4187	// Value - List of Azure Firewalls in a resource group.
4188	Value *[]AzureFirewall `json:"value,omitempty"`
4189	// NextLink - URL to get the next set of results.
4190	NextLink *string `json:"nextLink,omitempty"`
4191}
4192
4193// AzureFirewallListResultIterator provides access to a complete listing of AzureFirewall values.
4194type AzureFirewallListResultIterator struct {
4195	i    int
4196	page AzureFirewallListResultPage
4197}
4198
4199// NextWithContext advances to the next value.  If there was an error making
4200// the request the iterator does not advance and the error is returned.
4201func (iter *AzureFirewallListResultIterator) NextWithContext(ctx context.Context) (err error) {
4202	if tracing.IsEnabled() {
4203		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallListResultIterator.NextWithContext")
4204		defer func() {
4205			sc := -1
4206			if iter.Response().Response.Response != nil {
4207				sc = iter.Response().Response.Response.StatusCode
4208			}
4209			tracing.EndSpan(ctx, sc, err)
4210		}()
4211	}
4212	iter.i++
4213	if iter.i < len(iter.page.Values()) {
4214		return nil
4215	}
4216	err = iter.page.NextWithContext(ctx)
4217	if err != nil {
4218		iter.i--
4219		return err
4220	}
4221	iter.i = 0
4222	return nil
4223}
4224
4225// Next advances to the next value.  If there was an error making
4226// the request the iterator does not advance and the error is returned.
4227// Deprecated: Use NextWithContext() instead.
4228func (iter *AzureFirewallListResultIterator) Next() error {
4229	return iter.NextWithContext(context.Background())
4230}
4231
4232// NotDone returns true if the enumeration should be started or is not yet complete.
4233func (iter AzureFirewallListResultIterator) NotDone() bool {
4234	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4235}
4236
4237// Response returns the raw server response from the last page request.
4238func (iter AzureFirewallListResultIterator) Response() AzureFirewallListResult {
4239	return iter.page.Response()
4240}
4241
4242// Value returns the current value or a zero-initialized value if the
4243// iterator has advanced beyond the end of the collection.
4244func (iter AzureFirewallListResultIterator) Value() AzureFirewall {
4245	if !iter.page.NotDone() {
4246		return AzureFirewall{}
4247	}
4248	return iter.page.Values()[iter.i]
4249}
4250
4251// Creates a new instance of the AzureFirewallListResultIterator type.
4252func NewAzureFirewallListResultIterator(page AzureFirewallListResultPage) AzureFirewallListResultIterator {
4253	return AzureFirewallListResultIterator{page: page}
4254}
4255
4256// IsEmpty returns true if the ListResult contains no values.
4257func (aflr AzureFirewallListResult) IsEmpty() bool {
4258	return aflr.Value == nil || len(*aflr.Value) == 0
4259}
4260
4261// hasNextLink returns true if the NextLink is not empty.
4262func (aflr AzureFirewallListResult) hasNextLink() bool {
4263	return aflr.NextLink != nil && len(*aflr.NextLink) != 0
4264}
4265
4266// azureFirewallListResultPreparer prepares a request to retrieve the next set of results.
4267// It returns nil if no more results exist.
4268func (aflr AzureFirewallListResult) azureFirewallListResultPreparer(ctx context.Context) (*http.Request, error) {
4269	if !aflr.hasNextLink() {
4270		return nil, nil
4271	}
4272	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4273		autorest.AsJSON(),
4274		autorest.AsGet(),
4275		autorest.WithBaseURL(to.String(aflr.NextLink)))
4276}
4277
4278// AzureFirewallListResultPage contains a page of AzureFirewall values.
4279type AzureFirewallListResultPage struct {
4280	fn   func(context.Context, AzureFirewallListResult) (AzureFirewallListResult, error)
4281	aflr AzureFirewallListResult
4282}
4283
4284// NextWithContext advances to the next page of values.  If there was an error making
4285// the request the page does not advance and the error is returned.
4286func (page *AzureFirewallListResultPage) NextWithContext(ctx context.Context) (err error) {
4287	if tracing.IsEnabled() {
4288		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallListResultPage.NextWithContext")
4289		defer func() {
4290			sc := -1
4291			if page.Response().Response.Response != nil {
4292				sc = page.Response().Response.Response.StatusCode
4293			}
4294			tracing.EndSpan(ctx, sc, err)
4295		}()
4296	}
4297	for {
4298		next, err := page.fn(ctx, page.aflr)
4299		if err != nil {
4300			return err
4301		}
4302		page.aflr = next
4303		if !next.hasNextLink() || !next.IsEmpty() {
4304			break
4305		}
4306	}
4307	return nil
4308}
4309
4310// Next advances to the next page of values.  If there was an error making
4311// the request the page does not advance and the error is returned.
4312// Deprecated: Use NextWithContext() instead.
4313func (page *AzureFirewallListResultPage) Next() error {
4314	return page.NextWithContext(context.Background())
4315}
4316
4317// NotDone returns true if the page enumeration should be started or is not yet complete.
4318func (page AzureFirewallListResultPage) NotDone() bool {
4319	return !page.aflr.IsEmpty()
4320}
4321
4322// Response returns the raw server response from the last page request.
4323func (page AzureFirewallListResultPage) Response() AzureFirewallListResult {
4324	return page.aflr
4325}
4326
4327// Values returns the slice of values for the current page or nil if there are no values.
4328func (page AzureFirewallListResultPage) Values() []AzureFirewall {
4329	if page.aflr.IsEmpty() {
4330		return nil
4331	}
4332	return *page.aflr.Value
4333}
4334
4335// Creates a new instance of the AzureFirewallListResultPage type.
4336func NewAzureFirewallListResultPage(cur AzureFirewallListResult, getNextPage func(context.Context, AzureFirewallListResult) (AzureFirewallListResult, error)) AzureFirewallListResultPage {
4337	return AzureFirewallListResultPage{
4338		fn:   getNextPage,
4339		aflr: cur,
4340	}
4341}
4342
4343// AzureFirewallNatRCAction azureFirewall NAT Rule Collection Action.
4344type AzureFirewallNatRCAction struct {
4345	// Type - The type of action. Possible values include: 'Snat', 'Dnat'
4346	Type AzureFirewallNatRCActionType `json:"type,omitempty"`
4347}
4348
4349// AzureFirewallNatRule properties of a NAT rule.
4350type AzureFirewallNatRule struct {
4351	// Name - Name of the NAT rule.
4352	Name *string `json:"name,omitempty"`
4353	// Description - Description of the rule.
4354	Description *string `json:"description,omitempty"`
4355	// SourceAddresses - List of source IP addresses for this rule.
4356	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
4357	// DestinationAddresses - List of destination IP addresses for this rule.
4358	DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
4359	// DestinationPorts - List of destination ports.
4360	DestinationPorts *[]string `json:"destinationPorts,omitempty"`
4361	// Protocols - Array of AzureFirewallNetworkRuleProtocols applicable to this NAT rule.
4362	Protocols *[]AzureFirewallNetworkRuleProtocol `json:"protocols,omitempty"`
4363	// TranslatedAddress - The translated address for this NAT rule.
4364	TranslatedAddress *string `json:"translatedAddress,omitempty"`
4365	// TranslatedPort - The translated port for this NAT rule.
4366	TranslatedPort *string `json:"translatedPort,omitempty"`
4367}
4368
4369// AzureFirewallNatRuleCollection NAT rule collection resource
4370type AzureFirewallNatRuleCollection struct {
4371	*AzureFirewallNatRuleCollectionProperties `json:"properties,omitempty"`
4372	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
4373	Name *string `json:"name,omitempty"`
4374	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
4375	Etag *string `json:"etag,omitempty"`
4376	// ID - Resource ID.
4377	ID *string `json:"id,omitempty"`
4378}
4379
4380// MarshalJSON is the custom marshaler for AzureFirewallNatRuleCollection.
4381func (afnrc AzureFirewallNatRuleCollection) MarshalJSON() ([]byte, error) {
4382	objectMap := make(map[string]interface{})
4383	if afnrc.AzureFirewallNatRuleCollectionProperties != nil {
4384		objectMap["properties"] = afnrc.AzureFirewallNatRuleCollectionProperties
4385	}
4386	if afnrc.Name != nil {
4387		objectMap["name"] = afnrc.Name
4388	}
4389	if afnrc.ID != nil {
4390		objectMap["id"] = afnrc.ID
4391	}
4392	return json.Marshal(objectMap)
4393}
4394
4395// UnmarshalJSON is the custom unmarshaler for AzureFirewallNatRuleCollection struct.
4396func (afnrc *AzureFirewallNatRuleCollection) UnmarshalJSON(body []byte) error {
4397	var m map[string]*json.RawMessage
4398	err := json.Unmarshal(body, &m)
4399	if err != nil {
4400		return err
4401	}
4402	for k, v := range m {
4403		switch k {
4404		case "properties":
4405			if v != nil {
4406				var azureFirewallNatRuleCollectionProperties AzureFirewallNatRuleCollectionProperties
4407				err = json.Unmarshal(*v, &azureFirewallNatRuleCollectionProperties)
4408				if err != nil {
4409					return err
4410				}
4411				afnrc.AzureFirewallNatRuleCollectionProperties = &azureFirewallNatRuleCollectionProperties
4412			}
4413		case "name":
4414			if v != nil {
4415				var name string
4416				err = json.Unmarshal(*v, &name)
4417				if err != nil {
4418					return err
4419				}
4420				afnrc.Name = &name
4421			}
4422		case "etag":
4423			if v != nil {
4424				var etag string
4425				err = json.Unmarshal(*v, &etag)
4426				if err != nil {
4427					return err
4428				}
4429				afnrc.Etag = &etag
4430			}
4431		case "id":
4432			if v != nil {
4433				var ID string
4434				err = json.Unmarshal(*v, &ID)
4435				if err != nil {
4436					return err
4437				}
4438				afnrc.ID = &ID
4439			}
4440		}
4441	}
4442
4443	return nil
4444}
4445
4446// AzureFirewallNatRuleCollectionProperties properties of the NAT rule collection.
4447type AzureFirewallNatRuleCollectionProperties struct {
4448	// Priority - Priority of the NAT rule collection resource.
4449	Priority *int32 `json:"priority,omitempty"`
4450	// Action - The action type of a NAT rule collection
4451	Action *AzureFirewallNatRCAction `json:"action,omitempty"`
4452	// Rules - Collection of rules used by a NAT rule collection.
4453	Rules *[]AzureFirewallNatRule `json:"rules,omitempty"`
4454	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
4455	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
4456}
4457
4458// AzureFirewallNetworkRule properties of the network rule.
4459type AzureFirewallNetworkRule struct {
4460	// Name - Name of the network rule.
4461	Name *string `json:"name,omitempty"`
4462	// Description - Description of the rule.
4463	Description *string `json:"description,omitempty"`
4464	// Protocols - Array of AzureFirewallNetworkRuleProtocols.
4465	Protocols *[]AzureFirewallNetworkRuleProtocol `json:"protocols,omitempty"`
4466	// SourceAddresses - List of source IP addresses for this rule.
4467	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
4468	// DestinationAddresses - List of destination IP addresses.
4469	DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
4470	// DestinationPorts - List of destination ports.
4471	DestinationPorts *[]string `json:"destinationPorts,omitempty"`
4472}
4473
4474// AzureFirewallNetworkRuleCollection network rule collection resource
4475type AzureFirewallNetworkRuleCollection struct {
4476	*AzureFirewallNetworkRuleCollectionPropertiesFormat `json:"properties,omitempty"`
4477	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
4478	Name *string `json:"name,omitempty"`
4479	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
4480	Etag *string `json:"etag,omitempty"`
4481	// ID - Resource ID.
4482	ID *string `json:"id,omitempty"`
4483}
4484
4485// MarshalJSON is the custom marshaler for AzureFirewallNetworkRuleCollection.
4486func (afnrc AzureFirewallNetworkRuleCollection) MarshalJSON() ([]byte, error) {
4487	objectMap := make(map[string]interface{})
4488	if afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat != nil {
4489		objectMap["properties"] = afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat
4490	}
4491	if afnrc.Name != nil {
4492		objectMap["name"] = afnrc.Name
4493	}
4494	if afnrc.ID != nil {
4495		objectMap["id"] = afnrc.ID
4496	}
4497	return json.Marshal(objectMap)
4498}
4499
4500// UnmarshalJSON is the custom unmarshaler for AzureFirewallNetworkRuleCollection struct.
4501func (afnrc *AzureFirewallNetworkRuleCollection) UnmarshalJSON(body []byte) error {
4502	var m map[string]*json.RawMessage
4503	err := json.Unmarshal(body, &m)
4504	if err != nil {
4505		return err
4506	}
4507	for k, v := range m {
4508		switch k {
4509		case "properties":
4510			if v != nil {
4511				var azureFirewallNetworkRuleCollectionPropertiesFormat AzureFirewallNetworkRuleCollectionPropertiesFormat
4512				err = json.Unmarshal(*v, &azureFirewallNetworkRuleCollectionPropertiesFormat)
4513				if err != nil {
4514					return err
4515				}
4516				afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat = &azureFirewallNetworkRuleCollectionPropertiesFormat
4517			}
4518		case "name":
4519			if v != nil {
4520				var name string
4521				err = json.Unmarshal(*v, &name)
4522				if err != nil {
4523					return err
4524				}
4525				afnrc.Name = &name
4526			}
4527		case "etag":
4528			if v != nil {
4529				var etag string
4530				err = json.Unmarshal(*v, &etag)
4531				if err != nil {
4532					return err
4533				}
4534				afnrc.Etag = &etag
4535			}
4536		case "id":
4537			if v != nil {
4538				var ID string
4539				err = json.Unmarshal(*v, &ID)
4540				if err != nil {
4541					return err
4542				}
4543				afnrc.ID = &ID
4544			}
4545		}
4546	}
4547
4548	return nil
4549}
4550
4551// AzureFirewallNetworkRuleCollectionPropertiesFormat properties of the network rule collection.
4552type AzureFirewallNetworkRuleCollectionPropertiesFormat struct {
4553	// Priority - Priority of the network rule collection resource.
4554	Priority *int32 `json:"priority,omitempty"`
4555	// Action - The action type of a rule collection
4556	Action *AzureFirewallRCAction `json:"action,omitempty"`
4557	// Rules - Collection of rules used by a network rule collection.
4558	Rules *[]AzureFirewallNetworkRule `json:"rules,omitempty"`
4559	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
4560	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
4561}
4562
4563// AzureFirewallPropertiesFormat properties of the Azure Firewall.
4564type AzureFirewallPropertiesFormat struct {
4565	// ApplicationRuleCollections - Collection of application rule collections used by Azure Firewall.
4566	ApplicationRuleCollections *[]AzureFirewallApplicationRuleCollection `json:"applicationRuleCollections,omitempty"`
4567	// NatRuleCollections - Collection of NAT rule collections used by Azure Firewall.
4568	NatRuleCollections *[]AzureFirewallNatRuleCollection `json:"natRuleCollections,omitempty"`
4569	// NetworkRuleCollections - Collection of network rule collections used by Azure Firewall.
4570	NetworkRuleCollections *[]AzureFirewallNetworkRuleCollection `json:"networkRuleCollections,omitempty"`
4571	// IPConfigurations - IP configuration of the Azure Firewall resource.
4572	IPConfigurations *[]AzureFirewallIPConfiguration `json:"ipConfigurations,omitempty"`
4573	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
4574	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
4575}
4576
4577// AzureFirewallRCAction properties of the AzureFirewallRCAction.
4578type AzureFirewallRCAction struct {
4579	// Type - The type of action. Possible values include: 'AzureFirewallRCActionTypeAllow', 'AzureFirewallRCActionTypeDeny'
4580	Type AzureFirewallRCActionType `json:"type,omitempty"`
4581}
4582
4583// AzureFirewallsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
4584// long-running operation.
4585type AzureFirewallsCreateOrUpdateFuture struct {
4586	azure.FutureAPI
4587	// Result returns the result of the asynchronous operation.
4588	// If the operation has not completed it will return an error.
4589	Result func(AzureFirewallsClient) (AzureFirewall, error)
4590}
4591
4592// AzureFirewallsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
4593// operation.
4594type AzureFirewallsDeleteFuture struct {
4595	azure.FutureAPI
4596	// Result returns the result of the asynchronous operation.
4597	// If the operation has not completed it will return an error.
4598	Result func(AzureFirewallsClient) (autorest.Response, error)
4599}
4600
4601// AzureReachabilityReport azure reachability report details.
4602type AzureReachabilityReport struct {
4603	autorest.Response `json:"-"`
4604	// AggregationLevel - The aggregation level of Azure reachability report. Can be Country, State or City.
4605	AggregationLevel *string                          `json:"aggregationLevel,omitempty"`
4606	ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"`
4607	// ReachabilityReport - List of Azure reachability report items.
4608	ReachabilityReport *[]AzureReachabilityReportItem `json:"reachabilityReport,omitempty"`
4609}
4610
4611// AzureReachabilityReportItem azure reachability report details for a given provider location.
4612type AzureReachabilityReportItem struct {
4613	// Provider - The Internet service provider.
4614	Provider *string `json:"provider,omitempty"`
4615	// AzureLocation - The Azure region.
4616	AzureLocation *string `json:"azureLocation,omitempty"`
4617	// Latencies - List of latency details for each of the time series.
4618	Latencies *[]AzureReachabilityReportLatencyInfo `json:"latencies,omitempty"`
4619}
4620
4621// AzureReachabilityReportLatencyInfo details on latency for a time series.
4622type AzureReachabilityReportLatencyInfo struct {
4623	// TimeStamp - The time stamp.
4624	TimeStamp *date.Time `json:"timeStamp,omitempty"`
4625	// Score - The relative latency score between 1 and 100, higher values indicating a faster connection.
4626	Score *int32 `json:"score,omitempty"`
4627}
4628
4629// AzureReachabilityReportLocation parameters that define a geographic location.
4630type AzureReachabilityReportLocation struct {
4631	// Country - The name of the country.
4632	Country *string `json:"country,omitempty"`
4633	// State - The name of the state.
4634	State *string `json:"state,omitempty"`
4635	// City - The name of the city or town.
4636	City *string `json:"city,omitempty"`
4637}
4638
4639// AzureReachabilityReportParameters geographic and time constraints for Azure reachability report.
4640type AzureReachabilityReportParameters struct {
4641	ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"`
4642	// Providers - List of Internet service providers.
4643	Providers *[]string `json:"providers,omitempty"`
4644	// AzureLocations - Optional Azure regions to scope the query to.
4645	AzureLocations *[]string `json:"azureLocations,omitempty"`
4646	// StartTime - The start time for the Azure reachability report.
4647	StartTime *date.Time `json:"startTime,omitempty"`
4648	// EndTime - The end time for the Azure reachability report.
4649	EndTime *date.Time `json:"endTime,omitempty"`
4650}
4651
4652// BackendAddressPool pool of backend IP addresses.
4653type BackendAddressPool struct {
4654	autorest.Response `json:"-"`
4655	// BackendAddressPoolPropertiesFormat - Properties of load balancer backend address pool.
4656	*BackendAddressPoolPropertiesFormat `json:"properties,omitempty"`
4657	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
4658	Name *string `json:"name,omitempty"`
4659	// Etag - A unique read-only string that changes whenever the resource is updated.
4660	Etag *string `json:"etag,omitempty"`
4661	// ID - Resource ID.
4662	ID *string `json:"id,omitempty"`
4663}
4664
4665// MarshalJSON is the custom marshaler for BackendAddressPool.
4666func (bap BackendAddressPool) MarshalJSON() ([]byte, error) {
4667	objectMap := make(map[string]interface{})
4668	if bap.BackendAddressPoolPropertiesFormat != nil {
4669		objectMap["properties"] = bap.BackendAddressPoolPropertiesFormat
4670	}
4671	if bap.Name != nil {
4672		objectMap["name"] = bap.Name
4673	}
4674	if bap.Etag != nil {
4675		objectMap["etag"] = bap.Etag
4676	}
4677	if bap.ID != nil {
4678		objectMap["id"] = bap.ID
4679	}
4680	return json.Marshal(objectMap)
4681}
4682
4683// UnmarshalJSON is the custom unmarshaler for BackendAddressPool struct.
4684func (bap *BackendAddressPool) UnmarshalJSON(body []byte) error {
4685	var m map[string]*json.RawMessage
4686	err := json.Unmarshal(body, &m)
4687	if err != nil {
4688		return err
4689	}
4690	for k, v := range m {
4691		switch k {
4692		case "properties":
4693			if v != nil {
4694				var backendAddressPoolPropertiesFormat BackendAddressPoolPropertiesFormat
4695				err = json.Unmarshal(*v, &backendAddressPoolPropertiesFormat)
4696				if err != nil {
4697					return err
4698				}
4699				bap.BackendAddressPoolPropertiesFormat = &backendAddressPoolPropertiesFormat
4700			}
4701		case "name":
4702			if v != nil {
4703				var name string
4704				err = json.Unmarshal(*v, &name)
4705				if err != nil {
4706					return err
4707				}
4708				bap.Name = &name
4709			}
4710		case "etag":
4711			if v != nil {
4712				var etag string
4713				err = json.Unmarshal(*v, &etag)
4714				if err != nil {
4715					return err
4716				}
4717				bap.Etag = &etag
4718			}
4719		case "id":
4720			if v != nil {
4721				var ID string
4722				err = json.Unmarshal(*v, &ID)
4723				if err != nil {
4724					return err
4725				}
4726				bap.ID = &ID
4727			}
4728		}
4729	}
4730
4731	return nil
4732}
4733
4734// BackendAddressPoolPropertiesFormat properties of the backend address pool.
4735type BackendAddressPoolPropertiesFormat struct {
4736	// BackendIPConfigurations - READ-ONLY; Gets collection of references to IP addresses defined in network interfaces.
4737	BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"`
4738	// LoadBalancingRules - READ-ONLY; Gets load balancing rules that use this backend address pool.
4739	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
4740	// OutboundRule - READ-ONLY; Gets outbound rules that use this backend address pool.
4741	OutboundRule *SubResource `json:"outboundRule,omitempty"`
4742	// OutboundRules - READ-ONLY; Gets outbound rules that use this backend address pool.
4743	OutboundRules *[]SubResource `json:"outboundRules,omitempty"`
4744	// ProvisioningState - Get provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
4745	ProvisioningState *string `json:"provisioningState,omitempty"`
4746}
4747
4748// MarshalJSON is the custom marshaler for BackendAddressPoolPropertiesFormat.
4749func (bappf BackendAddressPoolPropertiesFormat) MarshalJSON() ([]byte, error) {
4750	objectMap := make(map[string]interface{})
4751	if bappf.ProvisioningState != nil {
4752		objectMap["provisioningState"] = bappf.ProvisioningState
4753	}
4754	return json.Marshal(objectMap)
4755}
4756
4757// BGPCommunity contains bgp community information offered in Service Community resources.
4758type BGPCommunity struct {
4759	// ServiceSupportedRegion - The region which the service support. e.g. For O365, region is Global.
4760	ServiceSupportedRegion *string `json:"serviceSupportedRegion,omitempty"`
4761	// CommunityName - The name of the bgp community. e.g. Skype.
4762	CommunityName *string `json:"communityName,omitempty"`
4763	// CommunityValue - The value of the bgp community. For more information: https://docs.microsoft.com/en-us/azure/expressroute/expressroute-routing.
4764	CommunityValue *string `json:"communityValue,omitempty"`
4765	// CommunityPrefixes - The prefixes that the bgp community contains.
4766	CommunityPrefixes *[]string `json:"communityPrefixes,omitempty"`
4767	// IsAuthorizedToUse - Customer is authorized to use bgp community or not.
4768	IsAuthorizedToUse *bool `json:"isAuthorizedToUse,omitempty"`
4769	// ServiceGroup - The service group of the bgp community contains.
4770	ServiceGroup *string `json:"serviceGroup,omitempty"`
4771}
4772
4773// BgpPeerStatus BGP peer status details
4774type BgpPeerStatus struct {
4775	// LocalAddress - READ-ONLY; The virtual network gateway's local address
4776	LocalAddress *string `json:"localAddress,omitempty"`
4777	// Neighbor - READ-ONLY; The remote BGP peer
4778	Neighbor *string `json:"neighbor,omitempty"`
4779	// Asn - READ-ONLY; The autonomous system number of the remote BGP peer
4780	Asn *int32 `json:"asn,omitempty"`
4781	// State - READ-ONLY; The BGP peer state. Possible values include: 'BgpPeerStateUnknown', 'BgpPeerStateStopped', 'BgpPeerStateIdle', 'BgpPeerStateConnecting', 'BgpPeerStateConnected'
4782	State BgpPeerState `json:"state,omitempty"`
4783	// ConnectedDuration - READ-ONLY; For how long the peering has been up
4784	ConnectedDuration *string `json:"connectedDuration,omitempty"`
4785	// RoutesReceived - READ-ONLY; The number of routes learned from this peer
4786	RoutesReceived *int64 `json:"routesReceived,omitempty"`
4787	// MessagesSent - READ-ONLY; The number of BGP messages sent
4788	MessagesSent *int64 `json:"messagesSent,omitempty"`
4789	// MessagesReceived - READ-ONLY; The number of BGP messages received
4790	MessagesReceived *int64 `json:"messagesReceived,omitempty"`
4791}
4792
4793// BgpPeerStatusListResult response for list BGP peer status API service call
4794type BgpPeerStatusListResult struct {
4795	autorest.Response `json:"-"`
4796	// Value - List of BGP peers
4797	Value *[]BgpPeerStatus `json:"value,omitempty"`
4798}
4799
4800// BgpServiceCommunity service Community Properties.
4801type BgpServiceCommunity struct {
4802	*BgpServiceCommunityPropertiesFormat `json:"properties,omitempty"`
4803	// ID - Resource ID.
4804	ID *string `json:"id,omitempty"`
4805	// Name - READ-ONLY; Resource name.
4806	Name *string `json:"name,omitempty"`
4807	// Type - READ-ONLY; Resource type.
4808	Type *string `json:"type,omitempty"`
4809	// Location - Resource location.
4810	Location *string `json:"location,omitempty"`
4811	// Tags - Resource tags.
4812	Tags map[string]*string `json:"tags"`
4813}
4814
4815// MarshalJSON is the custom marshaler for BgpServiceCommunity.
4816func (bsc BgpServiceCommunity) MarshalJSON() ([]byte, error) {
4817	objectMap := make(map[string]interface{})
4818	if bsc.BgpServiceCommunityPropertiesFormat != nil {
4819		objectMap["properties"] = bsc.BgpServiceCommunityPropertiesFormat
4820	}
4821	if bsc.ID != nil {
4822		objectMap["id"] = bsc.ID
4823	}
4824	if bsc.Location != nil {
4825		objectMap["location"] = bsc.Location
4826	}
4827	if bsc.Tags != nil {
4828		objectMap["tags"] = bsc.Tags
4829	}
4830	return json.Marshal(objectMap)
4831}
4832
4833// UnmarshalJSON is the custom unmarshaler for BgpServiceCommunity struct.
4834func (bsc *BgpServiceCommunity) UnmarshalJSON(body []byte) error {
4835	var m map[string]*json.RawMessage
4836	err := json.Unmarshal(body, &m)
4837	if err != nil {
4838		return err
4839	}
4840	for k, v := range m {
4841		switch k {
4842		case "properties":
4843			if v != nil {
4844				var bgpServiceCommunityPropertiesFormat BgpServiceCommunityPropertiesFormat
4845				err = json.Unmarshal(*v, &bgpServiceCommunityPropertiesFormat)
4846				if err != nil {
4847					return err
4848				}
4849				bsc.BgpServiceCommunityPropertiesFormat = &bgpServiceCommunityPropertiesFormat
4850			}
4851		case "id":
4852			if v != nil {
4853				var ID string
4854				err = json.Unmarshal(*v, &ID)
4855				if err != nil {
4856					return err
4857				}
4858				bsc.ID = &ID
4859			}
4860		case "name":
4861			if v != nil {
4862				var name string
4863				err = json.Unmarshal(*v, &name)
4864				if err != nil {
4865					return err
4866				}
4867				bsc.Name = &name
4868			}
4869		case "type":
4870			if v != nil {
4871				var typeVar string
4872				err = json.Unmarshal(*v, &typeVar)
4873				if err != nil {
4874					return err
4875				}
4876				bsc.Type = &typeVar
4877			}
4878		case "location":
4879			if v != nil {
4880				var location string
4881				err = json.Unmarshal(*v, &location)
4882				if err != nil {
4883					return err
4884				}
4885				bsc.Location = &location
4886			}
4887		case "tags":
4888			if v != nil {
4889				var tags map[string]*string
4890				err = json.Unmarshal(*v, &tags)
4891				if err != nil {
4892					return err
4893				}
4894				bsc.Tags = tags
4895			}
4896		}
4897	}
4898
4899	return nil
4900}
4901
4902// BgpServiceCommunityListResult response for the ListServiceCommunity API service call.
4903type BgpServiceCommunityListResult struct {
4904	autorest.Response `json:"-"`
4905	// Value - A list of service community resources.
4906	Value *[]BgpServiceCommunity `json:"value,omitempty"`
4907	// NextLink - The URL to get the next set of results.
4908	NextLink *string `json:"nextLink,omitempty"`
4909}
4910
4911// BgpServiceCommunityListResultIterator provides access to a complete listing of BgpServiceCommunity
4912// values.
4913type BgpServiceCommunityListResultIterator struct {
4914	i    int
4915	page BgpServiceCommunityListResultPage
4916}
4917
4918// NextWithContext advances to the next value.  If there was an error making
4919// the request the iterator does not advance and the error is returned.
4920func (iter *BgpServiceCommunityListResultIterator) NextWithContext(ctx context.Context) (err error) {
4921	if tracing.IsEnabled() {
4922		ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultIterator.NextWithContext")
4923		defer func() {
4924			sc := -1
4925			if iter.Response().Response.Response != nil {
4926				sc = iter.Response().Response.Response.StatusCode
4927			}
4928			tracing.EndSpan(ctx, sc, err)
4929		}()
4930	}
4931	iter.i++
4932	if iter.i < len(iter.page.Values()) {
4933		return nil
4934	}
4935	err = iter.page.NextWithContext(ctx)
4936	if err != nil {
4937		iter.i--
4938		return err
4939	}
4940	iter.i = 0
4941	return nil
4942}
4943
4944// Next advances to the next value.  If there was an error making
4945// the request the iterator does not advance and the error is returned.
4946// Deprecated: Use NextWithContext() instead.
4947func (iter *BgpServiceCommunityListResultIterator) Next() error {
4948	return iter.NextWithContext(context.Background())
4949}
4950
4951// NotDone returns true if the enumeration should be started or is not yet complete.
4952func (iter BgpServiceCommunityListResultIterator) NotDone() bool {
4953	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4954}
4955
4956// Response returns the raw server response from the last page request.
4957func (iter BgpServiceCommunityListResultIterator) Response() BgpServiceCommunityListResult {
4958	return iter.page.Response()
4959}
4960
4961// Value returns the current value or a zero-initialized value if the
4962// iterator has advanced beyond the end of the collection.
4963func (iter BgpServiceCommunityListResultIterator) Value() BgpServiceCommunity {
4964	if !iter.page.NotDone() {
4965		return BgpServiceCommunity{}
4966	}
4967	return iter.page.Values()[iter.i]
4968}
4969
4970// Creates a new instance of the BgpServiceCommunityListResultIterator type.
4971func NewBgpServiceCommunityListResultIterator(page BgpServiceCommunityListResultPage) BgpServiceCommunityListResultIterator {
4972	return BgpServiceCommunityListResultIterator{page: page}
4973}
4974
4975// IsEmpty returns true if the ListResult contains no values.
4976func (bsclr BgpServiceCommunityListResult) IsEmpty() bool {
4977	return bsclr.Value == nil || len(*bsclr.Value) == 0
4978}
4979
4980// hasNextLink returns true if the NextLink is not empty.
4981func (bsclr BgpServiceCommunityListResult) hasNextLink() bool {
4982	return bsclr.NextLink != nil && len(*bsclr.NextLink) != 0
4983}
4984
4985// bgpServiceCommunityListResultPreparer prepares a request to retrieve the next set of results.
4986// It returns nil if no more results exist.
4987func (bsclr BgpServiceCommunityListResult) bgpServiceCommunityListResultPreparer(ctx context.Context) (*http.Request, error) {
4988	if !bsclr.hasNextLink() {
4989		return nil, nil
4990	}
4991	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4992		autorest.AsJSON(),
4993		autorest.AsGet(),
4994		autorest.WithBaseURL(to.String(bsclr.NextLink)))
4995}
4996
4997// BgpServiceCommunityListResultPage contains a page of BgpServiceCommunity values.
4998type BgpServiceCommunityListResultPage struct {
4999	fn    func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)
5000	bsclr BgpServiceCommunityListResult
5001}
5002
5003// NextWithContext advances to the next page of values.  If there was an error making
5004// the request the page does not advance and the error is returned.
5005func (page *BgpServiceCommunityListResultPage) NextWithContext(ctx context.Context) (err error) {
5006	if tracing.IsEnabled() {
5007		ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultPage.NextWithContext")
5008		defer func() {
5009			sc := -1
5010			if page.Response().Response.Response != nil {
5011				sc = page.Response().Response.Response.StatusCode
5012			}
5013			tracing.EndSpan(ctx, sc, err)
5014		}()
5015	}
5016	for {
5017		next, err := page.fn(ctx, page.bsclr)
5018		if err != nil {
5019			return err
5020		}
5021		page.bsclr = next
5022		if !next.hasNextLink() || !next.IsEmpty() {
5023			break
5024		}
5025	}
5026	return nil
5027}
5028
5029// Next advances to the next page of values.  If there was an error making
5030// the request the page does not advance and the error is returned.
5031// Deprecated: Use NextWithContext() instead.
5032func (page *BgpServiceCommunityListResultPage) Next() error {
5033	return page.NextWithContext(context.Background())
5034}
5035
5036// NotDone returns true if the page enumeration should be started or is not yet complete.
5037func (page BgpServiceCommunityListResultPage) NotDone() bool {
5038	return !page.bsclr.IsEmpty()
5039}
5040
5041// Response returns the raw server response from the last page request.
5042func (page BgpServiceCommunityListResultPage) Response() BgpServiceCommunityListResult {
5043	return page.bsclr
5044}
5045
5046// Values returns the slice of values for the current page or nil if there are no values.
5047func (page BgpServiceCommunityListResultPage) Values() []BgpServiceCommunity {
5048	if page.bsclr.IsEmpty() {
5049		return nil
5050	}
5051	return *page.bsclr.Value
5052}
5053
5054// Creates a new instance of the BgpServiceCommunityListResultPage type.
5055func NewBgpServiceCommunityListResultPage(cur BgpServiceCommunityListResult, getNextPage func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)) BgpServiceCommunityListResultPage {
5056	return BgpServiceCommunityListResultPage{
5057		fn:    getNextPage,
5058		bsclr: cur,
5059	}
5060}
5061
5062// BgpServiceCommunityPropertiesFormat properties of Service Community.
5063type BgpServiceCommunityPropertiesFormat struct {
5064	// ServiceName - The name of the bgp community. e.g. Skype.
5065	ServiceName *string `json:"serviceName,omitempty"`
5066	// BgpCommunities - Get a list of bgp communities.
5067	BgpCommunities *[]BGPCommunity `json:"bgpCommunities,omitempty"`
5068}
5069
5070// BgpSettings BGP settings details
5071type BgpSettings struct {
5072	// Asn - The BGP speaker's ASN.
5073	Asn *int64 `json:"asn,omitempty"`
5074	// BgpPeeringAddress - The BGP peering address and BGP identifier of this BGP speaker.
5075	BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"`
5076	// PeerWeight - The weight added to routes learned from this BGP speaker.
5077	PeerWeight *int32 `json:"peerWeight,omitempty"`
5078}
5079
5080// CloudError an error response from the Batch service.
5081type CloudError struct {
5082	// Error - Cloud error body.
5083	Error *CloudErrorBody `json:"error,omitempty"`
5084}
5085
5086// CloudErrorBody an error response from the Batch service.
5087type CloudErrorBody struct {
5088	// Code - An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
5089	Code *string `json:"code,omitempty"`
5090	// Message - A message describing the error, intended to be suitable for display in a user interface.
5091	Message *string `json:"message,omitempty"`
5092	// Target - The target of the particular error. For example, the name of the property in error.
5093	Target *string `json:"target,omitempty"`
5094	// Details - A list of additional details about the error.
5095	Details *[]CloudErrorBody `json:"details,omitempty"`
5096}
5097
5098// ConfigurationDiagnosticParameters parameters to get network configuration diagnostic.
5099type ConfigurationDiagnosticParameters struct {
5100	// TargetResourceID - The ID of the target resource to perform network configuration diagnostic. Valid options are VM, NetworkInterface, VMSS/NetworkInterface and Application Gateway.
5101	TargetResourceID *string `json:"targetResourceId,omitempty"`
5102	// VerbosityLevel - Verbosity level. Accepted values are 'Normal', 'Minimum', 'Full'. Possible values include: 'Normal', 'Minimum', 'Full'
5103	VerbosityLevel VerbosityLevel `json:"verbosityLevel,omitempty"`
5104	// Profiles - List of network configuration diagnostic profiles.
5105	Profiles *[]ConfigurationDiagnosticProfile `json:"profiles,omitempty"`
5106}
5107
5108// ConfigurationDiagnosticProfile parameters to compare with network configuration.
5109type ConfigurationDiagnosticProfile struct {
5110	// Direction - The direction of the traffic. Accepted values are 'Inbound' and 'Outbound'. Possible values include: 'Inbound', 'Outbound'
5111	Direction Direction `json:"direction,omitempty"`
5112	// Protocol - Protocol to be verified on. Accepted values are '*', TCP, UDP.
5113	Protocol *string `json:"protocol,omitempty"`
5114	// Source - Traffic source. Accepted values are '*', IP Address/CIDR, Service Tag.
5115	Source *string `json:"source,omitempty"`
5116	// Destination - Traffic destination. Accepted values are: '*', IP Address/CIDR, Service Tag.
5117	Destination *string `json:"destination,omitempty"`
5118	// DestinationPort - Traffic destination port. Accepted values are '*', port (for example, 3389) and port range (for example, 80-100).
5119	DestinationPort *string `json:"destinationPort,omitempty"`
5120}
5121
5122// ConfigurationDiagnosticResponse results of network configuration diagnostic on the target resource.
5123type ConfigurationDiagnosticResponse struct {
5124	autorest.Response `json:"-"`
5125	// Results - READ-ONLY; List of network configuration diagnostic results.
5126	Results *[]ConfigurationDiagnosticResult `json:"results,omitempty"`
5127}
5128
5129// ConfigurationDiagnosticResult network configuration diagnostic result corresponded to provided traffic
5130// query.
5131type ConfigurationDiagnosticResult struct {
5132	Profile                    *ConfigurationDiagnosticProfile `json:"profile,omitempty"`
5133	NetworkSecurityGroupResult *SecurityGroupResult            `json:"networkSecurityGroupResult,omitempty"`
5134}
5135
5136// ConnectionMonitor parameters that define the operation to create a connection monitor.
5137type ConnectionMonitor struct {
5138	// Location - Connection monitor location.
5139	Location *string `json:"location,omitempty"`
5140	// Tags - Connection monitor tags.
5141	Tags                         map[string]*string `json:"tags"`
5142	*ConnectionMonitorParameters `json:"properties,omitempty"`
5143}
5144
5145// MarshalJSON is the custom marshaler for ConnectionMonitor.
5146func (cm ConnectionMonitor) MarshalJSON() ([]byte, error) {
5147	objectMap := make(map[string]interface{})
5148	if cm.Location != nil {
5149		objectMap["location"] = cm.Location
5150	}
5151	if cm.Tags != nil {
5152		objectMap["tags"] = cm.Tags
5153	}
5154	if cm.ConnectionMonitorParameters != nil {
5155		objectMap["properties"] = cm.ConnectionMonitorParameters
5156	}
5157	return json.Marshal(objectMap)
5158}
5159
5160// UnmarshalJSON is the custom unmarshaler for ConnectionMonitor struct.
5161func (cm *ConnectionMonitor) UnmarshalJSON(body []byte) error {
5162	var m map[string]*json.RawMessage
5163	err := json.Unmarshal(body, &m)
5164	if err != nil {
5165		return err
5166	}
5167	for k, v := range m {
5168		switch k {
5169		case "location":
5170			if v != nil {
5171				var location string
5172				err = json.Unmarshal(*v, &location)
5173				if err != nil {
5174					return err
5175				}
5176				cm.Location = &location
5177			}
5178		case "tags":
5179			if v != nil {
5180				var tags map[string]*string
5181				err = json.Unmarshal(*v, &tags)
5182				if err != nil {
5183					return err
5184				}
5185				cm.Tags = tags
5186			}
5187		case "properties":
5188			if v != nil {
5189				var connectionMonitorParameters ConnectionMonitorParameters
5190				err = json.Unmarshal(*v, &connectionMonitorParameters)
5191				if err != nil {
5192					return err
5193				}
5194				cm.ConnectionMonitorParameters = &connectionMonitorParameters
5195			}
5196		}
5197	}
5198
5199	return nil
5200}
5201
5202// ConnectionMonitorDestination describes the destination of connection monitor.
5203type ConnectionMonitorDestination struct {
5204	// ResourceID - The ID of the resource used as the destination by connection monitor.
5205	ResourceID *string `json:"resourceId,omitempty"`
5206	// Address - Address of the connection monitor destination (IP or domain name).
5207	Address *string `json:"address,omitempty"`
5208	// Port - The destination port used by connection monitor.
5209	Port *int32 `json:"port,omitempty"`
5210}
5211
5212// ConnectionMonitorListResult list of connection monitors.
5213type ConnectionMonitorListResult struct {
5214	autorest.Response `json:"-"`
5215	// Value - Information about connection monitors.
5216	Value *[]ConnectionMonitorResult `json:"value,omitempty"`
5217}
5218
5219// ConnectionMonitorParameters parameters that define the operation to create a connection monitor.
5220type ConnectionMonitorParameters struct {
5221	Source      *ConnectionMonitorSource      `json:"source,omitempty"`
5222	Destination *ConnectionMonitorDestination `json:"destination,omitempty"`
5223	// AutoStart - Determines if the connection monitor will start automatically once created.
5224	AutoStart *bool `json:"autoStart,omitempty"`
5225	// MonitoringIntervalInSeconds - Monitoring interval in seconds.
5226	MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"`
5227}
5228
5229// ConnectionMonitorQueryResult list of connection states snapshots.
5230type ConnectionMonitorQueryResult struct {
5231	autorest.Response `json:"-"`
5232	// SourceStatus - Status of connection monitor source. Possible values include: 'Uknown', 'Active', 'Inactive'
5233	SourceStatus ConnectionMonitorSourceStatus `json:"sourceStatus,omitempty"`
5234	// States - Information about connection states.
5235	States *[]ConnectionStateSnapshot `json:"states,omitempty"`
5236}
5237
5238// ConnectionMonitorResult information about the connection monitor.
5239type ConnectionMonitorResult struct {
5240	autorest.Response `json:"-"`
5241	// Name - READ-ONLY; Name of the connection monitor.
5242	Name *string `json:"name,omitempty"`
5243	// ID - READ-ONLY; ID of the connection monitor.
5244	ID   *string `json:"id,omitempty"`
5245	Etag *string `json:"etag,omitempty"`
5246	// Type - READ-ONLY; Connection monitor type.
5247	Type *string `json:"type,omitempty"`
5248	// Location - Connection monitor location.
5249	Location *string `json:"location,omitempty"`
5250	// Tags - Connection monitor tags.
5251	Tags                               map[string]*string `json:"tags"`
5252	*ConnectionMonitorResultProperties `json:"properties,omitempty"`
5253}
5254
5255// MarshalJSON is the custom marshaler for ConnectionMonitorResult.
5256func (cmr ConnectionMonitorResult) MarshalJSON() ([]byte, error) {
5257	objectMap := make(map[string]interface{})
5258	if cmr.Etag != nil {
5259		objectMap["etag"] = cmr.Etag
5260	}
5261	if cmr.Location != nil {
5262		objectMap["location"] = cmr.Location
5263	}
5264	if cmr.Tags != nil {
5265		objectMap["tags"] = cmr.Tags
5266	}
5267	if cmr.ConnectionMonitorResultProperties != nil {
5268		objectMap["properties"] = cmr.ConnectionMonitorResultProperties
5269	}
5270	return json.Marshal(objectMap)
5271}
5272
5273// UnmarshalJSON is the custom unmarshaler for ConnectionMonitorResult struct.
5274func (cmr *ConnectionMonitorResult) UnmarshalJSON(body []byte) error {
5275	var m map[string]*json.RawMessage
5276	err := json.Unmarshal(body, &m)
5277	if err != nil {
5278		return err
5279	}
5280	for k, v := range m {
5281		switch k {
5282		case "name":
5283			if v != nil {
5284				var name string
5285				err = json.Unmarshal(*v, &name)
5286				if err != nil {
5287					return err
5288				}
5289				cmr.Name = &name
5290			}
5291		case "id":
5292			if v != nil {
5293				var ID string
5294				err = json.Unmarshal(*v, &ID)
5295				if err != nil {
5296					return err
5297				}
5298				cmr.ID = &ID
5299			}
5300		case "etag":
5301			if v != nil {
5302				var etag string
5303				err = json.Unmarshal(*v, &etag)
5304				if err != nil {
5305					return err
5306				}
5307				cmr.Etag = &etag
5308			}
5309		case "type":
5310			if v != nil {
5311				var typeVar string
5312				err = json.Unmarshal(*v, &typeVar)
5313				if err != nil {
5314					return err
5315				}
5316				cmr.Type = &typeVar
5317			}
5318		case "location":
5319			if v != nil {
5320				var location string
5321				err = json.Unmarshal(*v, &location)
5322				if err != nil {
5323					return err
5324				}
5325				cmr.Location = &location
5326			}
5327		case "tags":
5328			if v != nil {
5329				var tags map[string]*string
5330				err = json.Unmarshal(*v, &tags)
5331				if err != nil {
5332					return err
5333				}
5334				cmr.Tags = tags
5335			}
5336		case "properties":
5337			if v != nil {
5338				var connectionMonitorResultProperties ConnectionMonitorResultProperties
5339				err = json.Unmarshal(*v, &connectionMonitorResultProperties)
5340				if err != nil {
5341					return err
5342				}
5343				cmr.ConnectionMonitorResultProperties = &connectionMonitorResultProperties
5344			}
5345		}
5346	}
5347
5348	return nil
5349}
5350
5351// ConnectionMonitorResultProperties describes the properties of a connection monitor.
5352type ConnectionMonitorResultProperties struct {
5353	// ProvisioningState - The provisioning state of the connection monitor. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
5354	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
5355	// StartTime - The date and time when the connection monitor was started.
5356	StartTime *date.Time `json:"startTime,omitempty"`
5357	// MonitoringStatus - The monitoring status of the connection monitor.
5358	MonitoringStatus *string                       `json:"monitoringStatus,omitempty"`
5359	Source           *ConnectionMonitorSource      `json:"source,omitempty"`
5360	Destination      *ConnectionMonitorDestination `json:"destination,omitempty"`
5361	// AutoStart - Determines if the connection monitor will start automatically once created.
5362	AutoStart *bool `json:"autoStart,omitempty"`
5363	// MonitoringIntervalInSeconds - Monitoring interval in seconds.
5364	MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"`
5365}
5366
5367// ConnectionMonitorsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
5368// long-running operation.
5369type ConnectionMonitorsCreateOrUpdateFuture struct {
5370	azure.FutureAPI
5371	// Result returns the result of the asynchronous operation.
5372	// If the operation has not completed it will return an error.
5373	Result func(ConnectionMonitorsClient) (ConnectionMonitorResult, error)
5374}
5375
5376// ConnectionMonitorsDeleteFuture an abstraction for monitoring and retrieving the results of a
5377// long-running operation.
5378type ConnectionMonitorsDeleteFuture struct {
5379	azure.FutureAPI
5380	// Result returns the result of the asynchronous operation.
5381	// If the operation has not completed it will return an error.
5382	Result func(ConnectionMonitorsClient) (autorest.Response, error)
5383}
5384
5385// ConnectionMonitorSource describes the source of connection monitor.
5386type ConnectionMonitorSource struct {
5387	// ResourceID - The ID of the resource used as the source by connection monitor.
5388	ResourceID *string `json:"resourceId,omitempty"`
5389	// Port - The source port used by connection monitor.
5390	Port *int32 `json:"port,omitempty"`
5391}
5392
5393// ConnectionMonitorsQueryFuture an abstraction for monitoring and retrieving the results of a long-running
5394// operation.
5395type ConnectionMonitorsQueryFuture struct {
5396	azure.FutureAPI
5397	// Result returns the result of the asynchronous operation.
5398	// If the operation has not completed it will return an error.
5399	Result func(ConnectionMonitorsClient) (ConnectionMonitorQueryResult, error)
5400}
5401
5402// ConnectionMonitorsStartFuture an abstraction for monitoring and retrieving the results of a long-running
5403// operation.
5404type ConnectionMonitorsStartFuture struct {
5405	azure.FutureAPI
5406	// Result returns the result of the asynchronous operation.
5407	// If the operation has not completed it will return an error.
5408	Result func(ConnectionMonitorsClient) (autorest.Response, error)
5409}
5410
5411// ConnectionMonitorsStopFuture an abstraction for monitoring and retrieving the results of a long-running
5412// operation.
5413type ConnectionMonitorsStopFuture struct {
5414	azure.FutureAPI
5415	// Result returns the result of the asynchronous operation.
5416	// If the operation has not completed it will return an error.
5417	Result func(ConnectionMonitorsClient) (autorest.Response, error)
5418}
5419
5420// ConnectionResetSharedKey the virtual network connection reset shared key
5421type ConnectionResetSharedKey struct {
5422	autorest.Response `json:"-"`
5423	// KeyLength - The virtual network connection reset shared key length, should between 1 and 128.
5424	KeyLength *int32 `json:"keyLength,omitempty"`
5425}
5426
5427// ConnectionSharedKey response for GetConnectionSharedKey API service call
5428type ConnectionSharedKey struct {
5429	autorest.Response `json:"-"`
5430	// Value - The virtual network connection shared key value.
5431	Value *string `json:"value,omitempty"`
5432	// ID - Resource ID.
5433	ID *string `json:"id,omitempty"`
5434}
5435
5436// ConnectionStateSnapshot connection state snapshot.
5437type ConnectionStateSnapshot struct {
5438	// ConnectionState - The connection state. Possible values include: 'ConnectionStateReachable', 'ConnectionStateUnreachable', 'ConnectionStateUnknown'
5439	ConnectionState ConnectionState `json:"connectionState,omitempty"`
5440	// StartTime - The start time of the connection snapshot.
5441	StartTime *date.Time `json:"startTime,omitempty"`
5442	// EndTime - The end time of the connection snapshot.
5443	EndTime *date.Time `json:"endTime,omitempty"`
5444	// EvaluationState - Connectivity analysis evaluation state. Possible values include: 'NotStarted', 'InProgress', 'Completed'
5445	EvaluationState EvaluationState `json:"evaluationState,omitempty"`
5446	// AvgLatencyInMs - Average latency in ms.
5447	AvgLatencyInMs *int32 `json:"avgLatencyInMs,omitempty"`
5448	// MinLatencyInMs - Minimum latency in ms.
5449	MinLatencyInMs *int32 `json:"minLatencyInMs,omitempty"`
5450	// MaxLatencyInMs - Maximum latency in ms.
5451	MaxLatencyInMs *int32 `json:"maxLatencyInMs,omitempty"`
5452	// ProbesSent - The number of sent probes.
5453	ProbesSent *int32 `json:"probesSent,omitempty"`
5454	// ProbesFailed - The number of failed probes.
5455	ProbesFailed *int32 `json:"probesFailed,omitempty"`
5456	// Hops - READ-ONLY; List of hops between the source and the destination.
5457	Hops *[]ConnectivityHop `json:"hops,omitempty"`
5458}
5459
5460// MarshalJSON is the custom marshaler for ConnectionStateSnapshot.
5461func (CSS ConnectionStateSnapshot) MarshalJSON() ([]byte, error) {
5462	objectMap := make(map[string]interface{})
5463	if CSS.ConnectionState != "" {
5464		objectMap["connectionState"] = CSS.ConnectionState
5465	}
5466	if CSS.StartTime != nil {
5467		objectMap["startTime"] = CSS.StartTime
5468	}
5469	if CSS.EndTime != nil {
5470		objectMap["endTime"] = CSS.EndTime
5471	}
5472	if CSS.EvaluationState != "" {
5473		objectMap["evaluationState"] = CSS.EvaluationState
5474	}
5475	if CSS.AvgLatencyInMs != nil {
5476		objectMap["avgLatencyInMs"] = CSS.AvgLatencyInMs
5477	}
5478	if CSS.MinLatencyInMs != nil {
5479		objectMap["minLatencyInMs"] = CSS.MinLatencyInMs
5480	}
5481	if CSS.MaxLatencyInMs != nil {
5482		objectMap["maxLatencyInMs"] = CSS.MaxLatencyInMs
5483	}
5484	if CSS.ProbesSent != nil {
5485		objectMap["probesSent"] = CSS.ProbesSent
5486	}
5487	if CSS.ProbesFailed != nil {
5488		objectMap["probesFailed"] = CSS.ProbesFailed
5489	}
5490	return json.Marshal(objectMap)
5491}
5492
5493// ConnectivityDestination parameters that define destination of connection.
5494type ConnectivityDestination struct {
5495	// ResourceID - The ID of the resource to which a connection attempt will be made.
5496	ResourceID *string `json:"resourceId,omitempty"`
5497	// Address - The IP address or URI the resource to which a connection attempt will be made.
5498	Address *string `json:"address,omitempty"`
5499	// Port - Port on which check connectivity will be performed.
5500	Port *int32 `json:"port,omitempty"`
5501}
5502
5503// ConnectivityHop information about a hop between the source and the destination.
5504type ConnectivityHop struct {
5505	// Type - READ-ONLY; The type of the hop.
5506	Type *string `json:"type,omitempty"`
5507	// ID - READ-ONLY; The ID of the hop.
5508	ID *string `json:"id,omitempty"`
5509	// Address - READ-ONLY; The IP address of the hop.
5510	Address *string `json:"address,omitempty"`
5511	// ResourceID - READ-ONLY; The ID of the resource corresponding to this hop.
5512	ResourceID *string `json:"resourceId,omitempty"`
5513	// NextHopIds - READ-ONLY; List of next hop identifiers.
5514	NextHopIds *[]string `json:"nextHopIds,omitempty"`
5515	// Issues - READ-ONLY; List of issues.
5516	Issues *[]ConnectivityIssue `json:"issues,omitempty"`
5517}
5518
5519// ConnectivityInformation information on the connectivity status.
5520type ConnectivityInformation struct {
5521	autorest.Response `json:"-"`
5522	// Hops - READ-ONLY; List of hops between the source and the destination.
5523	Hops *[]ConnectivityHop `json:"hops,omitempty"`
5524	// ConnectionStatus - READ-ONLY; The connection status. Possible values include: 'ConnectionStatusUnknown', 'ConnectionStatusConnected', 'ConnectionStatusDisconnected', 'ConnectionStatusDegraded'
5525	ConnectionStatus ConnectionStatus `json:"connectionStatus,omitempty"`
5526	// AvgLatencyInMs - READ-ONLY; Average latency in milliseconds.
5527	AvgLatencyInMs *int32 `json:"avgLatencyInMs,omitempty"`
5528	// MinLatencyInMs - READ-ONLY; Minimum latency in milliseconds.
5529	MinLatencyInMs *int32 `json:"minLatencyInMs,omitempty"`
5530	// MaxLatencyInMs - READ-ONLY; Maximum latency in milliseconds.
5531	MaxLatencyInMs *int32 `json:"maxLatencyInMs,omitempty"`
5532	// ProbesSent - READ-ONLY; Total number of probes sent.
5533	ProbesSent *int32 `json:"probesSent,omitempty"`
5534	// ProbesFailed - READ-ONLY; Number of failed probes.
5535	ProbesFailed *int32 `json:"probesFailed,omitempty"`
5536}
5537
5538// ConnectivityIssue information about an issue encountered in the process of checking for connectivity.
5539type ConnectivityIssue struct {
5540	// Origin - READ-ONLY; The origin of the issue. Possible values include: 'OriginLocal', 'OriginInbound', 'OriginOutbound'
5541	Origin Origin `json:"origin,omitempty"`
5542	// Severity - READ-ONLY; The severity of the issue. Possible values include: 'SeverityError', 'SeverityWarning'
5543	Severity Severity `json:"severity,omitempty"`
5544	// Type - READ-ONLY; The type of issue. Possible values include: 'IssueTypeUnknown', 'IssueTypeAgentStopped', 'IssueTypeGuestFirewall', 'IssueTypeDNSResolution', 'IssueTypeSocketBind', 'IssueTypeNetworkSecurityRule', 'IssueTypeUserDefinedRoute', 'IssueTypePortThrottled', 'IssueTypePlatform'
5545	Type IssueType `json:"type,omitempty"`
5546	// Context - READ-ONLY; Provides additional context on the issue.
5547	Context *[]map[string]*string `json:"context,omitempty"`
5548}
5549
5550// ConnectivityParameters parameters that determine how the connectivity check will be performed.
5551type ConnectivityParameters struct {
5552	Source      *ConnectivitySource      `json:"source,omitempty"`
5553	Destination *ConnectivityDestination `json:"destination,omitempty"`
5554	// Protocol - Network protocol. Possible values include: 'ProtocolTCP', 'ProtocolHTTP', 'ProtocolHTTPS', 'ProtocolIcmp'
5555	Protocol              Protocol               `json:"protocol,omitempty"`
5556	ProtocolConfiguration *ProtocolConfiguration `json:"protocolConfiguration,omitempty"`
5557}
5558
5559// ConnectivitySource parameters that define the source of the connection.
5560type ConnectivitySource struct {
5561	// ResourceID - The ID of the resource from which a connectivity check will be initiated.
5562	ResourceID *string `json:"resourceId,omitempty"`
5563	// Port - The source port from which a connectivity check will be performed.
5564	Port *int32 `json:"port,omitempty"`
5565}
5566
5567// Container reference to container resource in remote resource provider.
5568type Container struct {
5569	// ID - Resource ID.
5570	ID *string `json:"id,omitempty"`
5571}
5572
5573// ContainerNetworkInterface container network interface child resource.
5574type ContainerNetworkInterface struct {
5575	// ContainerNetworkInterfacePropertiesFormat - Container network interface properties.
5576	*ContainerNetworkInterfacePropertiesFormat `json:"properties,omitempty"`
5577	// Name - The name of the resource. This name can be used to access the resource.
5578	Name *string `json:"name,omitempty"`
5579	// Type - READ-ONLY; Sub Resource type.
5580	Type *string `json:"type,omitempty"`
5581	// Etag - A unique read-only string that changes whenever the resource is updated.
5582	Etag *string `json:"etag,omitempty"`
5583	// ID - Resource ID.
5584	ID *string `json:"id,omitempty"`
5585}
5586
5587// MarshalJSON is the custom marshaler for ContainerNetworkInterface.
5588func (cni ContainerNetworkInterface) MarshalJSON() ([]byte, error) {
5589	objectMap := make(map[string]interface{})
5590	if cni.ContainerNetworkInterfacePropertiesFormat != nil {
5591		objectMap["properties"] = cni.ContainerNetworkInterfacePropertiesFormat
5592	}
5593	if cni.Name != nil {
5594		objectMap["name"] = cni.Name
5595	}
5596	if cni.Etag != nil {
5597		objectMap["etag"] = cni.Etag
5598	}
5599	if cni.ID != nil {
5600		objectMap["id"] = cni.ID
5601	}
5602	return json.Marshal(objectMap)
5603}
5604
5605// UnmarshalJSON is the custom unmarshaler for ContainerNetworkInterface struct.
5606func (cni *ContainerNetworkInterface) UnmarshalJSON(body []byte) error {
5607	var m map[string]*json.RawMessage
5608	err := json.Unmarshal(body, &m)
5609	if err != nil {
5610		return err
5611	}
5612	for k, v := range m {
5613		switch k {
5614		case "properties":
5615			if v != nil {
5616				var containerNetworkInterfacePropertiesFormat ContainerNetworkInterfacePropertiesFormat
5617				err = json.Unmarshal(*v, &containerNetworkInterfacePropertiesFormat)
5618				if err != nil {
5619					return err
5620				}
5621				cni.ContainerNetworkInterfacePropertiesFormat = &containerNetworkInterfacePropertiesFormat
5622			}
5623		case "name":
5624			if v != nil {
5625				var name string
5626				err = json.Unmarshal(*v, &name)
5627				if err != nil {
5628					return err
5629				}
5630				cni.Name = &name
5631			}
5632		case "type":
5633			if v != nil {
5634				var typeVar string
5635				err = json.Unmarshal(*v, &typeVar)
5636				if err != nil {
5637					return err
5638				}
5639				cni.Type = &typeVar
5640			}
5641		case "etag":
5642			if v != nil {
5643				var etag string
5644				err = json.Unmarshal(*v, &etag)
5645				if err != nil {
5646					return err
5647				}
5648				cni.Etag = &etag
5649			}
5650		case "id":
5651			if v != nil {
5652				var ID string
5653				err = json.Unmarshal(*v, &ID)
5654				if err != nil {
5655					return err
5656				}
5657				cni.ID = &ID
5658			}
5659		}
5660	}
5661
5662	return nil
5663}
5664
5665// ContainerNetworkInterfaceConfiguration container network interface configuration child resource.
5666type ContainerNetworkInterfaceConfiguration struct {
5667	// ContainerNetworkInterfaceConfigurationPropertiesFormat - Container network interface configuration properties.
5668	*ContainerNetworkInterfaceConfigurationPropertiesFormat `json:"properties,omitempty"`
5669	// Name - The name of the resource. This name can be used to access the resource.
5670	Name *string `json:"name,omitempty"`
5671	// Type - READ-ONLY; Sub Resource type.
5672	Type *string `json:"type,omitempty"`
5673	// Etag - A unique read-only string that changes whenever the resource is updated.
5674	Etag *string `json:"etag,omitempty"`
5675	// ID - Resource ID.
5676	ID *string `json:"id,omitempty"`
5677}
5678
5679// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceConfiguration.
5680func (cnic ContainerNetworkInterfaceConfiguration) MarshalJSON() ([]byte, error) {
5681	objectMap := make(map[string]interface{})
5682	if cnic.ContainerNetworkInterfaceConfigurationPropertiesFormat != nil {
5683		objectMap["properties"] = cnic.ContainerNetworkInterfaceConfigurationPropertiesFormat
5684	}
5685	if cnic.Name != nil {
5686		objectMap["name"] = cnic.Name
5687	}
5688	if cnic.Etag != nil {
5689		objectMap["etag"] = cnic.Etag
5690	}
5691	if cnic.ID != nil {
5692		objectMap["id"] = cnic.ID
5693	}
5694	return json.Marshal(objectMap)
5695}
5696
5697// UnmarshalJSON is the custom unmarshaler for ContainerNetworkInterfaceConfiguration struct.
5698func (cnic *ContainerNetworkInterfaceConfiguration) UnmarshalJSON(body []byte) error {
5699	var m map[string]*json.RawMessage
5700	err := json.Unmarshal(body, &m)
5701	if err != nil {
5702		return err
5703	}
5704	for k, v := range m {
5705		switch k {
5706		case "properties":
5707			if v != nil {
5708				var containerNetworkInterfaceConfigurationPropertiesFormat ContainerNetworkInterfaceConfigurationPropertiesFormat
5709				err = json.Unmarshal(*v, &containerNetworkInterfaceConfigurationPropertiesFormat)
5710				if err != nil {
5711					return err
5712				}
5713				cnic.ContainerNetworkInterfaceConfigurationPropertiesFormat = &containerNetworkInterfaceConfigurationPropertiesFormat
5714			}
5715		case "name":
5716			if v != nil {
5717				var name string
5718				err = json.Unmarshal(*v, &name)
5719				if err != nil {
5720					return err
5721				}
5722				cnic.Name = &name
5723			}
5724		case "type":
5725			if v != nil {
5726				var typeVar string
5727				err = json.Unmarshal(*v, &typeVar)
5728				if err != nil {
5729					return err
5730				}
5731				cnic.Type = &typeVar
5732			}
5733		case "etag":
5734			if v != nil {
5735				var etag string
5736				err = json.Unmarshal(*v, &etag)
5737				if err != nil {
5738					return err
5739				}
5740				cnic.Etag = &etag
5741			}
5742		case "id":
5743			if v != nil {
5744				var ID string
5745				err = json.Unmarshal(*v, &ID)
5746				if err != nil {
5747					return err
5748				}
5749				cnic.ID = &ID
5750			}
5751		}
5752	}
5753
5754	return nil
5755}
5756
5757// ContainerNetworkInterfaceConfigurationPropertiesFormat container network interface configuration
5758// properties.
5759type ContainerNetworkInterfaceConfigurationPropertiesFormat struct {
5760	// IPConfigurations - A list of ip configurations of the container network interface configuration.
5761	IPConfigurations *[]IPConfigurationProfile `json:"ipConfigurations,omitempty"`
5762	// ContainerNetworkInterfaces - A list of container network interfaces created from this container network interface configuration.
5763	ContainerNetworkInterfaces *[]SubResource `json:"containerNetworkInterfaces,omitempty"`
5764	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
5765	ProvisioningState *string `json:"provisioningState,omitempty"`
5766}
5767
5768// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceConfigurationPropertiesFormat.
5769func (cnicpf ContainerNetworkInterfaceConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
5770	objectMap := make(map[string]interface{})
5771	if cnicpf.IPConfigurations != nil {
5772		objectMap["ipConfigurations"] = cnicpf.IPConfigurations
5773	}
5774	if cnicpf.ContainerNetworkInterfaces != nil {
5775		objectMap["containerNetworkInterfaces"] = cnicpf.ContainerNetworkInterfaces
5776	}
5777	return json.Marshal(objectMap)
5778}
5779
5780// ContainerNetworkInterfaceIPConfiguration the ip configuration for a container network interface.
5781type ContainerNetworkInterfaceIPConfiguration struct {
5782	// ContainerNetworkInterfaceIPConfigurationPropertiesFormat - Properties of the container network interface IP configuration.
5783	*ContainerNetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"`
5784	// Name - The name of the resource. This name can be used to access the resource.
5785	Name *string `json:"name,omitempty"`
5786	// Type - READ-ONLY; Sub Resource type.
5787	Type *string `json:"type,omitempty"`
5788	// Etag - A unique read-only string that changes whenever the resource is updated.
5789	Etag *string `json:"etag,omitempty"`
5790}
5791
5792// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceIPConfiguration.
5793func (cniic ContainerNetworkInterfaceIPConfiguration) MarshalJSON() ([]byte, error) {
5794	objectMap := make(map[string]interface{})
5795	if cniic.ContainerNetworkInterfaceIPConfigurationPropertiesFormat != nil {
5796		objectMap["properties"] = cniic.ContainerNetworkInterfaceIPConfigurationPropertiesFormat
5797	}
5798	if cniic.Name != nil {
5799		objectMap["name"] = cniic.Name
5800	}
5801	if cniic.Etag != nil {
5802		objectMap["etag"] = cniic.Etag
5803	}
5804	return json.Marshal(objectMap)
5805}
5806
5807// UnmarshalJSON is the custom unmarshaler for ContainerNetworkInterfaceIPConfiguration struct.
5808func (cniic *ContainerNetworkInterfaceIPConfiguration) UnmarshalJSON(body []byte) error {
5809	var m map[string]*json.RawMessage
5810	err := json.Unmarshal(body, &m)
5811	if err != nil {
5812		return err
5813	}
5814	for k, v := range m {
5815		switch k {
5816		case "properties":
5817			if v != nil {
5818				var containerNetworkInterfaceIPConfigurationPropertiesFormat ContainerNetworkInterfaceIPConfigurationPropertiesFormat
5819				err = json.Unmarshal(*v, &containerNetworkInterfaceIPConfigurationPropertiesFormat)
5820				if err != nil {
5821					return err
5822				}
5823				cniic.ContainerNetworkInterfaceIPConfigurationPropertiesFormat = &containerNetworkInterfaceIPConfigurationPropertiesFormat
5824			}
5825		case "name":
5826			if v != nil {
5827				var name string
5828				err = json.Unmarshal(*v, &name)
5829				if err != nil {
5830					return err
5831				}
5832				cniic.Name = &name
5833			}
5834		case "type":
5835			if v != nil {
5836				var typeVar string
5837				err = json.Unmarshal(*v, &typeVar)
5838				if err != nil {
5839					return err
5840				}
5841				cniic.Type = &typeVar
5842			}
5843		case "etag":
5844			if v != nil {
5845				var etag string
5846				err = json.Unmarshal(*v, &etag)
5847				if err != nil {
5848					return err
5849				}
5850				cniic.Etag = &etag
5851			}
5852		}
5853	}
5854
5855	return nil
5856}
5857
5858// ContainerNetworkInterfaceIPConfigurationPropertiesFormat properties of the container network interface
5859// IP configuration.
5860type ContainerNetworkInterfaceIPConfigurationPropertiesFormat struct {
5861	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
5862	ProvisioningState *string `json:"provisioningState,omitempty"`
5863}
5864
5865// ContainerNetworkInterfacePropertiesFormat ...
5866type ContainerNetworkInterfacePropertiesFormat struct {
5867	// ContainerNetworkInterfaceConfiguration - Container network interface configuration from which this container network interface is created.
5868	ContainerNetworkInterfaceConfiguration *ContainerNetworkInterfaceConfiguration `json:"containerNetworkInterfaceConfiguration,omitempty"`
5869	// Container - Reference to the container to which this container network interface is attached.
5870	Container *Container `json:"container,omitempty"`
5871	// IPConfigurations - Reference to the ip configuration on this container nic.
5872	IPConfigurations *[]ContainerNetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"`
5873	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
5874	ProvisioningState *string `json:"provisioningState,omitempty"`
5875}
5876
5877// MarshalJSON is the custom marshaler for ContainerNetworkInterfacePropertiesFormat.
5878func (cnipf ContainerNetworkInterfacePropertiesFormat) MarshalJSON() ([]byte, error) {
5879	objectMap := make(map[string]interface{})
5880	if cnipf.ContainerNetworkInterfaceConfiguration != nil {
5881		objectMap["containerNetworkInterfaceConfiguration"] = cnipf.ContainerNetworkInterfaceConfiguration
5882	}
5883	if cnipf.Container != nil {
5884		objectMap["container"] = cnipf.Container
5885	}
5886	if cnipf.IPConfigurations != nil {
5887		objectMap["ipConfigurations"] = cnipf.IPConfigurations
5888	}
5889	return json.Marshal(objectMap)
5890}
5891
5892// DdosCustomPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
5893// long-running operation.
5894type DdosCustomPoliciesCreateOrUpdateFuture struct {
5895	azure.FutureAPI
5896	// Result returns the result of the asynchronous operation.
5897	// If the operation has not completed it will return an error.
5898	Result func(DdosCustomPoliciesClient) (DdosCustomPolicy, error)
5899}
5900
5901// DdosCustomPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a
5902// long-running operation.
5903type DdosCustomPoliciesDeleteFuture struct {
5904	azure.FutureAPI
5905	// Result returns the result of the asynchronous operation.
5906	// If the operation has not completed it will return an error.
5907	Result func(DdosCustomPoliciesClient) (autorest.Response, error)
5908}
5909
5910// DdosCustomPoliciesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
5911// long-running operation.
5912type DdosCustomPoliciesUpdateTagsFuture struct {
5913	azure.FutureAPI
5914	// Result returns the result of the asynchronous operation.
5915	// If the operation has not completed it will return an error.
5916	Result func(DdosCustomPoliciesClient) (DdosCustomPolicy, error)
5917}
5918
5919// DdosCustomPolicy a DDoS custom policy in a resource group.
5920type DdosCustomPolicy struct {
5921	autorest.Response `json:"-"`
5922	// DdosCustomPolicyPropertiesFormat - Properties of the DDoS custom policy.
5923	*DdosCustomPolicyPropertiesFormat `json:"properties,omitempty"`
5924	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
5925	Etag *string `json:"etag,omitempty"`
5926	// ID - Resource ID.
5927	ID *string `json:"id,omitempty"`
5928	// Name - READ-ONLY; Resource name.
5929	Name *string `json:"name,omitempty"`
5930	// Type - READ-ONLY; Resource type.
5931	Type *string `json:"type,omitempty"`
5932	// Location - Resource location.
5933	Location *string `json:"location,omitempty"`
5934	// Tags - Resource tags.
5935	Tags map[string]*string `json:"tags"`
5936}
5937
5938// MarshalJSON is the custom marshaler for DdosCustomPolicy.
5939func (dcp DdosCustomPolicy) MarshalJSON() ([]byte, error) {
5940	objectMap := make(map[string]interface{})
5941	if dcp.DdosCustomPolicyPropertiesFormat != nil {
5942		objectMap["properties"] = dcp.DdosCustomPolicyPropertiesFormat
5943	}
5944	if dcp.ID != nil {
5945		objectMap["id"] = dcp.ID
5946	}
5947	if dcp.Location != nil {
5948		objectMap["location"] = dcp.Location
5949	}
5950	if dcp.Tags != nil {
5951		objectMap["tags"] = dcp.Tags
5952	}
5953	return json.Marshal(objectMap)
5954}
5955
5956// UnmarshalJSON is the custom unmarshaler for DdosCustomPolicy struct.
5957func (dcp *DdosCustomPolicy) UnmarshalJSON(body []byte) error {
5958	var m map[string]*json.RawMessage
5959	err := json.Unmarshal(body, &m)
5960	if err != nil {
5961		return err
5962	}
5963	for k, v := range m {
5964		switch k {
5965		case "properties":
5966			if v != nil {
5967				var ddosCustomPolicyPropertiesFormat DdosCustomPolicyPropertiesFormat
5968				err = json.Unmarshal(*v, &ddosCustomPolicyPropertiesFormat)
5969				if err != nil {
5970					return err
5971				}
5972				dcp.DdosCustomPolicyPropertiesFormat = &ddosCustomPolicyPropertiesFormat
5973			}
5974		case "etag":
5975			if v != nil {
5976				var etag string
5977				err = json.Unmarshal(*v, &etag)
5978				if err != nil {
5979					return err
5980				}
5981				dcp.Etag = &etag
5982			}
5983		case "id":
5984			if v != nil {
5985				var ID string
5986				err = json.Unmarshal(*v, &ID)
5987				if err != nil {
5988					return err
5989				}
5990				dcp.ID = &ID
5991			}
5992		case "name":
5993			if v != nil {
5994				var name string
5995				err = json.Unmarshal(*v, &name)
5996				if err != nil {
5997					return err
5998				}
5999				dcp.Name = &name
6000			}
6001		case "type":
6002			if v != nil {
6003				var typeVar string
6004				err = json.Unmarshal(*v, &typeVar)
6005				if err != nil {
6006					return err
6007				}
6008				dcp.Type = &typeVar
6009			}
6010		case "location":
6011			if v != nil {
6012				var location string
6013				err = json.Unmarshal(*v, &location)
6014				if err != nil {
6015					return err
6016				}
6017				dcp.Location = &location
6018			}
6019		case "tags":
6020			if v != nil {
6021				var tags map[string]*string
6022				err = json.Unmarshal(*v, &tags)
6023				if err != nil {
6024					return err
6025				}
6026				dcp.Tags = tags
6027			}
6028		}
6029	}
6030
6031	return nil
6032}
6033
6034// DdosCustomPolicyPropertiesFormat dDoS custom policy properties.
6035type DdosCustomPolicyPropertiesFormat struct {
6036	// 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.
6037	ResourceGUID *string `json:"resourceGuid,omitempty"`
6038	// ProvisioningState - READ-ONLY; The provisioning state of the DDoS custom policy resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
6039	ProvisioningState *string `json:"provisioningState,omitempty"`
6040	// PublicIPAddresses - READ-ONLY; The list of public IPs associated with the DDoS custom policy resource. This list is read-only.
6041	PublicIPAddresses *[]SubResource `json:"publicIPAddresses,omitempty"`
6042	// ProtocolCustomSettings - The protocol-specific DDoS policy customization parameters.
6043	ProtocolCustomSettings *[]ProtocolCustomSettingsFormat `json:"protocolCustomSettings,omitempty"`
6044}
6045
6046// MarshalJSON is the custom marshaler for DdosCustomPolicyPropertiesFormat.
6047func (dcppf DdosCustomPolicyPropertiesFormat) MarshalJSON() ([]byte, error) {
6048	objectMap := make(map[string]interface{})
6049	if dcppf.ProtocolCustomSettings != nil {
6050		objectMap["protocolCustomSettings"] = dcppf.ProtocolCustomSettings
6051	}
6052	return json.Marshal(objectMap)
6053}
6054
6055// DdosProtectionPlan a DDoS protection plan in a resource group.
6056type DdosProtectionPlan struct {
6057	autorest.Response `json:"-"`
6058	// ID - READ-ONLY; Resource ID.
6059	ID *string `json:"id,omitempty"`
6060	// Name - READ-ONLY; Resource name.
6061	Name *string `json:"name,omitempty"`
6062	// Type - READ-ONLY; Resource type.
6063	Type *string `json:"type,omitempty"`
6064	// Location - Resource location.
6065	Location *string `json:"location,omitempty"`
6066	// Tags - Resource tags.
6067	Tags map[string]*string `json:"tags"`
6068	// DdosProtectionPlanPropertiesFormat - Properties of the DDoS protection plan.
6069	*DdosProtectionPlanPropertiesFormat `json:"properties,omitempty"`
6070	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
6071	Etag *string `json:"etag,omitempty"`
6072}
6073
6074// MarshalJSON is the custom marshaler for DdosProtectionPlan.
6075func (dpp DdosProtectionPlan) MarshalJSON() ([]byte, error) {
6076	objectMap := make(map[string]interface{})
6077	if dpp.Location != nil {
6078		objectMap["location"] = dpp.Location
6079	}
6080	if dpp.Tags != nil {
6081		objectMap["tags"] = dpp.Tags
6082	}
6083	if dpp.DdosProtectionPlanPropertiesFormat != nil {
6084		objectMap["properties"] = dpp.DdosProtectionPlanPropertiesFormat
6085	}
6086	return json.Marshal(objectMap)
6087}
6088
6089// UnmarshalJSON is the custom unmarshaler for DdosProtectionPlan struct.
6090func (dpp *DdosProtectionPlan) UnmarshalJSON(body []byte) error {
6091	var m map[string]*json.RawMessage
6092	err := json.Unmarshal(body, &m)
6093	if err != nil {
6094		return err
6095	}
6096	for k, v := range m {
6097		switch k {
6098		case "id":
6099			if v != nil {
6100				var ID string
6101				err = json.Unmarshal(*v, &ID)
6102				if err != nil {
6103					return err
6104				}
6105				dpp.ID = &ID
6106			}
6107		case "name":
6108			if v != nil {
6109				var name string
6110				err = json.Unmarshal(*v, &name)
6111				if err != nil {
6112					return err
6113				}
6114				dpp.Name = &name
6115			}
6116		case "type":
6117			if v != nil {
6118				var typeVar string
6119				err = json.Unmarshal(*v, &typeVar)
6120				if err != nil {
6121					return err
6122				}
6123				dpp.Type = &typeVar
6124			}
6125		case "location":
6126			if v != nil {
6127				var location string
6128				err = json.Unmarshal(*v, &location)
6129				if err != nil {
6130					return err
6131				}
6132				dpp.Location = &location
6133			}
6134		case "tags":
6135			if v != nil {
6136				var tags map[string]*string
6137				err = json.Unmarshal(*v, &tags)
6138				if err != nil {
6139					return err
6140				}
6141				dpp.Tags = tags
6142			}
6143		case "properties":
6144			if v != nil {
6145				var ddosProtectionPlanPropertiesFormat DdosProtectionPlanPropertiesFormat
6146				err = json.Unmarshal(*v, &ddosProtectionPlanPropertiesFormat)
6147				if err != nil {
6148					return err
6149				}
6150				dpp.DdosProtectionPlanPropertiesFormat = &ddosProtectionPlanPropertiesFormat
6151			}
6152		case "etag":
6153			if v != nil {
6154				var etag string
6155				err = json.Unmarshal(*v, &etag)
6156				if err != nil {
6157					return err
6158				}
6159				dpp.Etag = &etag
6160			}
6161		}
6162	}
6163
6164	return nil
6165}
6166
6167// DdosProtectionPlanListResult a list of DDoS protection plans.
6168type DdosProtectionPlanListResult struct {
6169	autorest.Response `json:"-"`
6170	// Value - A list of DDoS protection plans.
6171	Value *[]DdosProtectionPlan `json:"value,omitempty"`
6172	// NextLink - READ-ONLY; The URL to get the next set of results.
6173	NextLink *string `json:"nextLink,omitempty"`
6174}
6175
6176// MarshalJSON is the custom marshaler for DdosProtectionPlanListResult.
6177func (dpplr DdosProtectionPlanListResult) MarshalJSON() ([]byte, error) {
6178	objectMap := make(map[string]interface{})
6179	if dpplr.Value != nil {
6180		objectMap["value"] = dpplr.Value
6181	}
6182	return json.Marshal(objectMap)
6183}
6184
6185// DdosProtectionPlanListResultIterator provides access to a complete listing of DdosProtectionPlan values.
6186type DdosProtectionPlanListResultIterator struct {
6187	i    int
6188	page DdosProtectionPlanListResultPage
6189}
6190
6191// NextWithContext advances to the next value.  If there was an error making
6192// the request the iterator does not advance and the error is returned.
6193func (iter *DdosProtectionPlanListResultIterator) NextWithContext(ctx context.Context) (err error) {
6194	if tracing.IsEnabled() {
6195		ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlanListResultIterator.NextWithContext")
6196		defer func() {
6197			sc := -1
6198			if iter.Response().Response.Response != nil {
6199				sc = iter.Response().Response.Response.StatusCode
6200			}
6201			tracing.EndSpan(ctx, sc, err)
6202		}()
6203	}
6204	iter.i++
6205	if iter.i < len(iter.page.Values()) {
6206		return nil
6207	}
6208	err = iter.page.NextWithContext(ctx)
6209	if err != nil {
6210		iter.i--
6211		return err
6212	}
6213	iter.i = 0
6214	return nil
6215}
6216
6217// Next advances to the next value.  If there was an error making
6218// the request the iterator does not advance and the error is returned.
6219// Deprecated: Use NextWithContext() instead.
6220func (iter *DdosProtectionPlanListResultIterator) Next() error {
6221	return iter.NextWithContext(context.Background())
6222}
6223
6224// NotDone returns true if the enumeration should be started or is not yet complete.
6225func (iter DdosProtectionPlanListResultIterator) NotDone() bool {
6226	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6227}
6228
6229// Response returns the raw server response from the last page request.
6230func (iter DdosProtectionPlanListResultIterator) Response() DdosProtectionPlanListResult {
6231	return iter.page.Response()
6232}
6233
6234// Value returns the current value or a zero-initialized value if the
6235// iterator has advanced beyond the end of the collection.
6236func (iter DdosProtectionPlanListResultIterator) Value() DdosProtectionPlan {
6237	if !iter.page.NotDone() {
6238		return DdosProtectionPlan{}
6239	}
6240	return iter.page.Values()[iter.i]
6241}
6242
6243// Creates a new instance of the DdosProtectionPlanListResultIterator type.
6244func NewDdosProtectionPlanListResultIterator(page DdosProtectionPlanListResultPage) DdosProtectionPlanListResultIterator {
6245	return DdosProtectionPlanListResultIterator{page: page}
6246}
6247
6248// IsEmpty returns true if the ListResult contains no values.
6249func (dpplr DdosProtectionPlanListResult) IsEmpty() bool {
6250	return dpplr.Value == nil || len(*dpplr.Value) == 0
6251}
6252
6253// hasNextLink returns true if the NextLink is not empty.
6254func (dpplr DdosProtectionPlanListResult) hasNextLink() bool {
6255	return dpplr.NextLink != nil && len(*dpplr.NextLink) != 0
6256}
6257
6258// ddosProtectionPlanListResultPreparer prepares a request to retrieve the next set of results.
6259// It returns nil if no more results exist.
6260func (dpplr DdosProtectionPlanListResult) ddosProtectionPlanListResultPreparer(ctx context.Context) (*http.Request, error) {
6261	if !dpplr.hasNextLink() {
6262		return nil, nil
6263	}
6264	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6265		autorest.AsJSON(),
6266		autorest.AsGet(),
6267		autorest.WithBaseURL(to.String(dpplr.NextLink)))
6268}
6269
6270// DdosProtectionPlanListResultPage contains a page of DdosProtectionPlan values.
6271type DdosProtectionPlanListResultPage struct {
6272	fn    func(context.Context, DdosProtectionPlanListResult) (DdosProtectionPlanListResult, error)
6273	dpplr DdosProtectionPlanListResult
6274}
6275
6276// NextWithContext advances to the next page of values.  If there was an error making
6277// the request the page does not advance and the error is returned.
6278func (page *DdosProtectionPlanListResultPage) NextWithContext(ctx context.Context) (err error) {
6279	if tracing.IsEnabled() {
6280		ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlanListResultPage.NextWithContext")
6281		defer func() {
6282			sc := -1
6283			if page.Response().Response.Response != nil {
6284				sc = page.Response().Response.Response.StatusCode
6285			}
6286			tracing.EndSpan(ctx, sc, err)
6287		}()
6288	}
6289	for {
6290		next, err := page.fn(ctx, page.dpplr)
6291		if err != nil {
6292			return err
6293		}
6294		page.dpplr = next
6295		if !next.hasNextLink() || !next.IsEmpty() {
6296			break
6297		}
6298	}
6299	return nil
6300}
6301
6302// Next advances to the next page of values.  If there was an error making
6303// the request the page does not advance and the error is returned.
6304// Deprecated: Use NextWithContext() instead.
6305func (page *DdosProtectionPlanListResultPage) Next() error {
6306	return page.NextWithContext(context.Background())
6307}
6308
6309// NotDone returns true if the page enumeration should be started or is not yet complete.
6310func (page DdosProtectionPlanListResultPage) NotDone() bool {
6311	return !page.dpplr.IsEmpty()
6312}
6313
6314// Response returns the raw server response from the last page request.
6315func (page DdosProtectionPlanListResultPage) Response() DdosProtectionPlanListResult {
6316	return page.dpplr
6317}
6318
6319// Values returns the slice of values for the current page or nil if there are no values.
6320func (page DdosProtectionPlanListResultPage) Values() []DdosProtectionPlan {
6321	if page.dpplr.IsEmpty() {
6322		return nil
6323	}
6324	return *page.dpplr.Value
6325}
6326
6327// Creates a new instance of the DdosProtectionPlanListResultPage type.
6328func NewDdosProtectionPlanListResultPage(cur DdosProtectionPlanListResult, getNextPage func(context.Context, DdosProtectionPlanListResult) (DdosProtectionPlanListResult, error)) DdosProtectionPlanListResultPage {
6329	return DdosProtectionPlanListResultPage{
6330		fn:    getNextPage,
6331		dpplr: cur,
6332	}
6333}
6334
6335// DdosProtectionPlanPropertiesFormat dDoS protection plan properties.
6336type DdosProtectionPlanPropertiesFormat struct {
6337	// 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.
6338	ResourceGUID *string `json:"resourceGuid,omitempty"`
6339	// ProvisioningState - READ-ONLY; The provisioning state of the DDoS protection plan resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
6340	ProvisioningState *string `json:"provisioningState,omitempty"`
6341	// VirtualNetworks - READ-ONLY; The list of virtual networks associated with the DDoS protection plan resource. This list is read-only.
6342	VirtualNetworks *[]SubResource `json:"virtualNetworks,omitempty"`
6343}
6344
6345// DdosProtectionPlansCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
6346// long-running operation.
6347type DdosProtectionPlansCreateOrUpdateFuture struct {
6348	azure.FutureAPI
6349	// Result returns the result of the asynchronous operation.
6350	// If the operation has not completed it will return an error.
6351	Result func(DdosProtectionPlansClient) (DdosProtectionPlan, error)
6352}
6353
6354// DdosProtectionPlansDeleteFuture an abstraction for monitoring and retrieving the results of a
6355// long-running operation.
6356type DdosProtectionPlansDeleteFuture struct {
6357	azure.FutureAPI
6358	// Result returns the result of the asynchronous operation.
6359	// If the operation has not completed it will return an error.
6360	Result func(DdosProtectionPlansClient) (autorest.Response, error)
6361}
6362
6363// DdosProtectionPlansUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
6364// long-running operation.
6365type DdosProtectionPlansUpdateTagsFuture struct {
6366	azure.FutureAPI
6367	// Result returns the result of the asynchronous operation.
6368	// If the operation has not completed it will return an error.
6369	Result func(DdosProtectionPlansClient) (DdosProtectionPlan, error)
6370}
6371
6372// DdosSettings contains the DDoS protection settings of the public IP.
6373type DdosSettings struct {
6374	// DdosCustomPolicy - The DDoS custom policy associated with the public IP.
6375	DdosCustomPolicy *SubResource `json:"ddosCustomPolicy,omitempty"`
6376	// ProtectionCoverage - The DDoS protection policy customizability of the public IP. Only standard coverage will have the ability to be customized. Possible values include: 'ProtectionCoverageBasic', 'ProtectionCoverageStandard'
6377	ProtectionCoverage ProtectionCoverage `json:"protectionCoverage,omitempty"`
6378}
6379
6380// Delegation details the service to which the subnet is delegated.
6381type Delegation struct {
6382	// ServiceDelegationPropertiesFormat - Properties of the subnet.
6383	*ServiceDelegationPropertiesFormat `json:"properties,omitempty"`
6384	// Name - The name of the resource that is unique within a subnet. This name can be used to access the resource.
6385	Name *string `json:"name,omitempty"`
6386	// Etag - A unique read-only string that changes whenever the resource is updated.
6387	Etag *string `json:"etag,omitempty"`
6388	// ID - Resource ID.
6389	ID *string `json:"id,omitempty"`
6390}
6391
6392// MarshalJSON is the custom marshaler for Delegation.
6393func (d Delegation) MarshalJSON() ([]byte, error) {
6394	objectMap := make(map[string]interface{})
6395	if d.ServiceDelegationPropertiesFormat != nil {
6396		objectMap["properties"] = d.ServiceDelegationPropertiesFormat
6397	}
6398	if d.Name != nil {
6399		objectMap["name"] = d.Name
6400	}
6401	if d.Etag != nil {
6402		objectMap["etag"] = d.Etag
6403	}
6404	if d.ID != nil {
6405		objectMap["id"] = d.ID
6406	}
6407	return json.Marshal(objectMap)
6408}
6409
6410// UnmarshalJSON is the custom unmarshaler for Delegation struct.
6411func (d *Delegation) UnmarshalJSON(body []byte) error {
6412	var m map[string]*json.RawMessage
6413	err := json.Unmarshal(body, &m)
6414	if err != nil {
6415		return err
6416	}
6417	for k, v := range m {
6418		switch k {
6419		case "properties":
6420			if v != nil {
6421				var serviceDelegationPropertiesFormat ServiceDelegationPropertiesFormat
6422				err = json.Unmarshal(*v, &serviceDelegationPropertiesFormat)
6423				if err != nil {
6424					return err
6425				}
6426				d.ServiceDelegationPropertiesFormat = &serviceDelegationPropertiesFormat
6427			}
6428		case "name":
6429			if v != nil {
6430				var name string
6431				err = json.Unmarshal(*v, &name)
6432				if err != nil {
6433					return err
6434				}
6435				d.Name = &name
6436			}
6437		case "etag":
6438			if v != nil {
6439				var etag string
6440				err = json.Unmarshal(*v, &etag)
6441				if err != nil {
6442					return err
6443				}
6444				d.Etag = &etag
6445			}
6446		case "id":
6447			if v != nil {
6448				var ID string
6449				err = json.Unmarshal(*v, &ID)
6450				if err != nil {
6451					return err
6452				}
6453				d.ID = &ID
6454			}
6455		}
6456	}
6457
6458	return nil
6459}
6460
6461// DeviceProperties list of properties of the device.
6462type DeviceProperties struct {
6463	// DeviceVendor - Name of the device Vendor.
6464	DeviceVendor *string `json:"deviceVendor,omitempty"`
6465	// DeviceModel - Model of the device.
6466	DeviceModel *string `json:"deviceModel,omitempty"`
6467	// LinkSpeedInMbps - Link speed.
6468	LinkSpeedInMbps *int32 `json:"linkSpeedInMbps,omitempty"`
6469}
6470
6471// DhcpOptions dhcpOptions contains an array of DNS servers available to VMs deployed in the virtual
6472// network. Standard DHCP option for a subnet overrides VNET DHCP options.
6473type DhcpOptions struct {
6474	// DNSServers - The list of DNS servers IP addresses.
6475	DNSServers *[]string `json:"dnsServers,omitempty"`
6476}
6477
6478// Dimension dimension of the metric.
6479type Dimension struct {
6480	// Name - The name of the dimension.
6481	Name *string `json:"name,omitempty"`
6482	// DisplayName - The display name of the dimension.
6483	DisplayName *string `json:"displayName,omitempty"`
6484	// InternalName - The internal name of the dimension.
6485	InternalName *string `json:"internalName,omitempty"`
6486}
6487
6488// DNSNameAvailabilityResult response for the CheckDnsNameAvailability API service call.
6489type DNSNameAvailabilityResult struct {
6490	autorest.Response `json:"-"`
6491	// Available - Domain availability (True/False).
6492	Available *bool `json:"available,omitempty"`
6493}
6494
6495// EffectiveNetworkSecurityGroup effective network security group.
6496type EffectiveNetworkSecurityGroup struct {
6497	// NetworkSecurityGroup - The ID of network security group that is applied.
6498	NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"`
6499	// Association - Associated resources.
6500	Association *EffectiveNetworkSecurityGroupAssociation `json:"association,omitempty"`
6501	// EffectiveSecurityRules - A collection of effective security rules.
6502	EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"`
6503	// TagMap - Mapping of tags to list of IP Addresses included within the tag.
6504	TagMap map[string][]string `json:"tagMap"`
6505}
6506
6507// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroup.
6508func (ensg EffectiveNetworkSecurityGroup) MarshalJSON() ([]byte, error) {
6509	objectMap := make(map[string]interface{})
6510	if ensg.NetworkSecurityGroup != nil {
6511		objectMap["networkSecurityGroup"] = ensg.NetworkSecurityGroup
6512	}
6513	if ensg.Association != nil {
6514		objectMap["association"] = ensg.Association
6515	}
6516	if ensg.EffectiveSecurityRules != nil {
6517		objectMap["effectiveSecurityRules"] = ensg.EffectiveSecurityRules
6518	}
6519	if ensg.TagMap != nil {
6520		objectMap["tagMap"] = ensg.TagMap
6521	}
6522	return json.Marshal(objectMap)
6523}
6524
6525// EffectiveNetworkSecurityGroupAssociation the effective network security group association.
6526type EffectiveNetworkSecurityGroupAssociation struct {
6527	// Subnet - The ID of the subnet if assigned.
6528	Subnet *SubResource `json:"subnet,omitempty"`
6529	// NetworkInterface - The ID of the network interface if assigned.
6530	NetworkInterface *SubResource `json:"networkInterface,omitempty"`
6531}
6532
6533// EffectiveNetworkSecurityGroupListResult response for list effective network security groups API service
6534// call.
6535type EffectiveNetworkSecurityGroupListResult struct {
6536	autorest.Response `json:"-"`
6537	// Value - A list of effective network security groups.
6538	Value *[]EffectiveNetworkSecurityGroup `json:"value,omitempty"`
6539	// NextLink - READ-ONLY; The URL to get the next set of results.
6540	NextLink *string `json:"nextLink,omitempty"`
6541}
6542
6543// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroupListResult.
6544func (ensglr EffectiveNetworkSecurityGroupListResult) MarshalJSON() ([]byte, error) {
6545	objectMap := make(map[string]interface{})
6546	if ensglr.Value != nil {
6547		objectMap["value"] = ensglr.Value
6548	}
6549	return json.Marshal(objectMap)
6550}
6551
6552// EffectiveNetworkSecurityRule effective network security rules.
6553type EffectiveNetworkSecurityRule struct {
6554	// Name - The name of the security rule specified by the user (if created by the user).
6555	Name *string `json:"name,omitempty"`
6556	// Protocol - The network protocol this rule applies to. Possible values are: 'Tcp', 'Udp', and 'All'. Possible values include: 'EffectiveSecurityRuleProtocolTCP', 'EffectiveSecurityRuleProtocolUDP', 'EffectiveSecurityRuleProtocolAll'
6557	Protocol EffectiveSecurityRuleProtocol `json:"protocol,omitempty"`
6558	// SourcePortRange - The source port or range.
6559	SourcePortRange *string `json:"sourcePortRange,omitempty"`
6560	// DestinationPortRange - The destination port or range.
6561	DestinationPortRange *string `json:"destinationPortRange,omitempty"`
6562	// 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 (*)
6563	SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"`
6564	// 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 (*)
6565	DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"`
6566	// SourceAddressPrefix - The source address prefix.
6567	SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
6568	// DestinationAddressPrefix - The destination address prefix.
6569	DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"`
6570	// SourceAddressPrefixes - The source address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*).
6571	SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"`
6572	// DestinationAddressPrefixes - The destination address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*).
6573	DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"`
6574	// ExpandedSourceAddressPrefix - The expanded source address prefix.
6575	ExpandedSourceAddressPrefix *[]string `json:"expandedSourceAddressPrefix,omitempty"`
6576	// ExpandedDestinationAddressPrefix - Expanded destination address prefix.
6577	ExpandedDestinationAddressPrefix *[]string `json:"expandedDestinationAddressPrefix,omitempty"`
6578	// Access - Whether network traffic is allowed or denied. Possible values are: 'Allow' and 'Deny'. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
6579	Access SecurityRuleAccess `json:"access,omitempty"`
6580	// Priority - The priority of the rule.
6581	Priority *int32 `json:"priority,omitempty"`
6582	// Direction - The direction of the rule. Possible values are: 'Inbound and Outbound'. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound'
6583	Direction SecurityRuleDirection `json:"direction,omitempty"`
6584}
6585
6586// EffectiveRoute effective Route
6587type EffectiveRoute struct {
6588	// Name - The name of the user defined route. This is optional.
6589	Name *string `json:"name,omitempty"`
6590	// Source - Who created the route. Possible values are: 'Unknown', 'User', 'VirtualNetworkGateway', and 'Default'. Possible values include: 'EffectiveRouteSourceUnknown', 'EffectiveRouteSourceUser', 'EffectiveRouteSourceVirtualNetworkGateway', 'EffectiveRouteSourceDefault'
6591	Source EffectiveRouteSource `json:"source,omitempty"`
6592	// State - The value of effective route. Possible values are: 'Active' and 'Invalid'. Possible values include: 'EffectiveRouteStateActive', 'EffectiveRouteStateInvalid'
6593	State EffectiveRouteState `json:"state,omitempty"`
6594	// AddressPrefix - The address prefixes of the effective routes in CIDR notation.
6595	AddressPrefix *[]string `json:"addressPrefix,omitempty"`
6596	// NextHopIPAddress - The IP address of the next hop of the effective route.
6597	NextHopIPAddress *[]string `json:"nextHopIpAddress,omitempty"`
6598	// NextHopType - The type of Azure hop the packet should be sent to. Possible values are: 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', and 'None'. Possible values include: 'RouteNextHopTypeVirtualNetworkGateway', 'RouteNextHopTypeVnetLocal', 'RouteNextHopTypeInternet', 'RouteNextHopTypeVirtualAppliance', 'RouteNextHopTypeNone'
6599	NextHopType RouteNextHopType `json:"nextHopType,omitempty"`
6600}
6601
6602// EffectiveRouteListResult response for list effective route API service call.
6603type EffectiveRouteListResult struct {
6604	autorest.Response `json:"-"`
6605	// Value - A list of effective routes.
6606	Value *[]EffectiveRoute `json:"value,omitempty"`
6607	// NextLink - READ-ONLY; The URL to get the next set of results.
6608	NextLink *string `json:"nextLink,omitempty"`
6609}
6610
6611// MarshalJSON is the custom marshaler for EffectiveRouteListResult.
6612func (erlr EffectiveRouteListResult) MarshalJSON() ([]byte, error) {
6613	objectMap := make(map[string]interface{})
6614	if erlr.Value != nil {
6615		objectMap["value"] = erlr.Value
6616	}
6617	return json.Marshal(objectMap)
6618}
6619
6620// EndpointService identifies the service being brought into the virtual network.
6621type EndpointService struct {
6622	// ID - A unique identifier of the service being referenced by the interface endpoint.
6623	ID *string `json:"id,omitempty"`
6624}
6625
6626// EndpointServiceResult endpoint service.
6627type EndpointServiceResult struct {
6628	// Name - READ-ONLY; Name of the endpoint service.
6629	Name *string `json:"name,omitempty"`
6630	// Type - READ-ONLY; Type of the endpoint service.
6631	Type *string `json:"type,omitempty"`
6632	// ID - Resource ID.
6633	ID *string `json:"id,omitempty"`
6634}
6635
6636// MarshalJSON is the custom marshaler for EndpointServiceResult.
6637func (esr EndpointServiceResult) MarshalJSON() ([]byte, error) {
6638	objectMap := make(map[string]interface{})
6639	if esr.ID != nil {
6640		objectMap["id"] = esr.ID
6641	}
6642	return json.Marshal(objectMap)
6643}
6644
6645// EndpointServicesListResult response for the ListAvailableEndpointServices API service call.
6646type EndpointServicesListResult struct {
6647	autorest.Response `json:"-"`
6648	// Value - List of available endpoint services in a region.
6649	Value *[]EndpointServiceResult `json:"value,omitempty"`
6650	// NextLink - The URL to get the next set of results.
6651	NextLink *string `json:"nextLink,omitempty"`
6652}
6653
6654// EndpointServicesListResultIterator provides access to a complete listing of EndpointServiceResult
6655// values.
6656type EndpointServicesListResultIterator struct {
6657	i    int
6658	page EndpointServicesListResultPage
6659}
6660
6661// NextWithContext advances to the next value.  If there was an error making
6662// the request the iterator does not advance and the error is returned.
6663func (iter *EndpointServicesListResultIterator) NextWithContext(ctx context.Context) (err error) {
6664	if tracing.IsEnabled() {
6665		ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultIterator.NextWithContext")
6666		defer func() {
6667			sc := -1
6668			if iter.Response().Response.Response != nil {
6669				sc = iter.Response().Response.Response.StatusCode
6670			}
6671			tracing.EndSpan(ctx, sc, err)
6672		}()
6673	}
6674	iter.i++
6675	if iter.i < len(iter.page.Values()) {
6676		return nil
6677	}
6678	err = iter.page.NextWithContext(ctx)
6679	if err != nil {
6680		iter.i--
6681		return err
6682	}
6683	iter.i = 0
6684	return nil
6685}
6686
6687// Next advances to the next value.  If there was an error making
6688// the request the iterator does not advance and the error is returned.
6689// Deprecated: Use NextWithContext() instead.
6690func (iter *EndpointServicesListResultIterator) Next() error {
6691	return iter.NextWithContext(context.Background())
6692}
6693
6694// NotDone returns true if the enumeration should be started or is not yet complete.
6695func (iter EndpointServicesListResultIterator) NotDone() bool {
6696	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6697}
6698
6699// Response returns the raw server response from the last page request.
6700func (iter EndpointServicesListResultIterator) Response() EndpointServicesListResult {
6701	return iter.page.Response()
6702}
6703
6704// Value returns the current value or a zero-initialized value if the
6705// iterator has advanced beyond the end of the collection.
6706func (iter EndpointServicesListResultIterator) Value() EndpointServiceResult {
6707	if !iter.page.NotDone() {
6708		return EndpointServiceResult{}
6709	}
6710	return iter.page.Values()[iter.i]
6711}
6712
6713// Creates a new instance of the EndpointServicesListResultIterator type.
6714func NewEndpointServicesListResultIterator(page EndpointServicesListResultPage) EndpointServicesListResultIterator {
6715	return EndpointServicesListResultIterator{page: page}
6716}
6717
6718// IsEmpty returns true if the ListResult contains no values.
6719func (eslr EndpointServicesListResult) IsEmpty() bool {
6720	return eslr.Value == nil || len(*eslr.Value) == 0
6721}
6722
6723// hasNextLink returns true if the NextLink is not empty.
6724func (eslr EndpointServicesListResult) hasNextLink() bool {
6725	return eslr.NextLink != nil && len(*eslr.NextLink) != 0
6726}
6727
6728// endpointServicesListResultPreparer prepares a request to retrieve the next set of results.
6729// It returns nil if no more results exist.
6730func (eslr EndpointServicesListResult) endpointServicesListResultPreparer(ctx context.Context) (*http.Request, error) {
6731	if !eslr.hasNextLink() {
6732		return nil, nil
6733	}
6734	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6735		autorest.AsJSON(),
6736		autorest.AsGet(),
6737		autorest.WithBaseURL(to.String(eslr.NextLink)))
6738}
6739
6740// EndpointServicesListResultPage contains a page of EndpointServiceResult values.
6741type EndpointServicesListResultPage struct {
6742	fn   func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)
6743	eslr EndpointServicesListResult
6744}
6745
6746// NextWithContext advances to the next page of values.  If there was an error making
6747// the request the page does not advance and the error is returned.
6748func (page *EndpointServicesListResultPage) NextWithContext(ctx context.Context) (err error) {
6749	if tracing.IsEnabled() {
6750		ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultPage.NextWithContext")
6751		defer func() {
6752			sc := -1
6753			if page.Response().Response.Response != nil {
6754				sc = page.Response().Response.Response.StatusCode
6755			}
6756			tracing.EndSpan(ctx, sc, err)
6757		}()
6758	}
6759	for {
6760		next, err := page.fn(ctx, page.eslr)
6761		if err != nil {
6762			return err
6763		}
6764		page.eslr = next
6765		if !next.hasNextLink() || !next.IsEmpty() {
6766			break
6767		}
6768	}
6769	return nil
6770}
6771
6772// Next advances to the next page of values.  If there was an error making
6773// the request the page does not advance and the error is returned.
6774// Deprecated: Use NextWithContext() instead.
6775func (page *EndpointServicesListResultPage) Next() error {
6776	return page.NextWithContext(context.Background())
6777}
6778
6779// NotDone returns true if the page enumeration should be started or is not yet complete.
6780func (page EndpointServicesListResultPage) NotDone() bool {
6781	return !page.eslr.IsEmpty()
6782}
6783
6784// Response returns the raw server response from the last page request.
6785func (page EndpointServicesListResultPage) Response() EndpointServicesListResult {
6786	return page.eslr
6787}
6788
6789// Values returns the slice of values for the current page or nil if there are no values.
6790func (page EndpointServicesListResultPage) Values() []EndpointServiceResult {
6791	if page.eslr.IsEmpty() {
6792		return nil
6793	}
6794	return *page.eslr.Value
6795}
6796
6797// Creates a new instance of the EndpointServicesListResultPage type.
6798func NewEndpointServicesListResultPage(cur EndpointServicesListResult, getNextPage func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)) EndpointServicesListResultPage {
6799	return EndpointServicesListResultPage{
6800		fn:   getNextPage,
6801		eslr: cur,
6802	}
6803}
6804
6805// Error ...
6806type Error struct {
6807	Code       *string         `json:"code,omitempty"`
6808	Message    *string         `json:"message,omitempty"`
6809	Target     *string         `json:"target,omitempty"`
6810	Details    *[]ErrorDetails `json:"details,omitempty"`
6811	InnerError *string         `json:"innerError,omitempty"`
6812}
6813
6814// ErrorDetails ...
6815type ErrorDetails struct {
6816	Code    *string `json:"code,omitempty"`
6817	Target  *string `json:"target,omitempty"`
6818	Message *string `json:"message,omitempty"`
6819}
6820
6821// ErrorResponse the error object.
6822type ErrorResponse struct {
6823	Error *ErrorDetails `json:"error,omitempty"`
6824}
6825
6826// EvaluatedNetworkSecurityGroup results of network security group evaluation.
6827type EvaluatedNetworkSecurityGroup struct {
6828	// NetworkSecurityGroupID - Network security group ID.
6829	NetworkSecurityGroupID *string `json:"networkSecurityGroupId,omitempty"`
6830	// AppliedTo - Resource ID of nic or subnet to which network security group is applied.
6831	AppliedTo   *string      `json:"appliedTo,omitempty"`
6832	MatchedRule *MatchedRule `json:"matchedRule,omitempty"`
6833	// RulesEvaluationResult - READ-ONLY; List of network security rules evaluation results.
6834	RulesEvaluationResult *[]SecurityRulesEvaluationResult `json:"rulesEvaluationResult,omitempty"`
6835}
6836
6837// MarshalJSON is the custom marshaler for EvaluatedNetworkSecurityGroup.
6838func (ensg EvaluatedNetworkSecurityGroup) MarshalJSON() ([]byte, error) {
6839	objectMap := make(map[string]interface{})
6840	if ensg.NetworkSecurityGroupID != nil {
6841		objectMap["networkSecurityGroupId"] = ensg.NetworkSecurityGroupID
6842	}
6843	if ensg.AppliedTo != nil {
6844		objectMap["appliedTo"] = ensg.AppliedTo
6845	}
6846	if ensg.MatchedRule != nil {
6847		objectMap["matchedRule"] = ensg.MatchedRule
6848	}
6849	return json.Marshal(objectMap)
6850}
6851
6852// ExpressRouteCircuit expressRouteCircuit resource
6853type ExpressRouteCircuit struct {
6854	autorest.Response `json:"-"`
6855	// Sku - The SKU.
6856	Sku                                  *ExpressRouteCircuitSku `json:"sku,omitempty"`
6857	*ExpressRouteCircuitPropertiesFormat `json:"properties,omitempty"`
6858	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
6859	Etag *string `json:"etag,omitempty"`
6860	// ID - Resource ID.
6861	ID *string `json:"id,omitempty"`
6862	// Name - READ-ONLY; Resource name.
6863	Name *string `json:"name,omitempty"`
6864	// Type - READ-ONLY; Resource type.
6865	Type *string `json:"type,omitempty"`
6866	// Location - Resource location.
6867	Location *string `json:"location,omitempty"`
6868	// Tags - Resource tags.
6869	Tags map[string]*string `json:"tags"`
6870}
6871
6872// MarshalJSON is the custom marshaler for ExpressRouteCircuit.
6873func (erc ExpressRouteCircuit) MarshalJSON() ([]byte, error) {
6874	objectMap := make(map[string]interface{})
6875	if erc.Sku != nil {
6876		objectMap["sku"] = erc.Sku
6877	}
6878	if erc.ExpressRouteCircuitPropertiesFormat != nil {
6879		objectMap["properties"] = erc.ExpressRouteCircuitPropertiesFormat
6880	}
6881	if erc.ID != nil {
6882		objectMap["id"] = erc.ID
6883	}
6884	if erc.Location != nil {
6885		objectMap["location"] = erc.Location
6886	}
6887	if erc.Tags != nil {
6888		objectMap["tags"] = erc.Tags
6889	}
6890	return json.Marshal(objectMap)
6891}
6892
6893// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuit struct.
6894func (erc *ExpressRouteCircuit) UnmarshalJSON(body []byte) error {
6895	var m map[string]*json.RawMessage
6896	err := json.Unmarshal(body, &m)
6897	if err != nil {
6898		return err
6899	}
6900	for k, v := range m {
6901		switch k {
6902		case "sku":
6903			if v != nil {
6904				var sku ExpressRouteCircuitSku
6905				err = json.Unmarshal(*v, &sku)
6906				if err != nil {
6907					return err
6908				}
6909				erc.Sku = &sku
6910			}
6911		case "properties":
6912			if v != nil {
6913				var expressRouteCircuitPropertiesFormat ExpressRouteCircuitPropertiesFormat
6914				err = json.Unmarshal(*v, &expressRouteCircuitPropertiesFormat)
6915				if err != nil {
6916					return err
6917				}
6918				erc.ExpressRouteCircuitPropertiesFormat = &expressRouteCircuitPropertiesFormat
6919			}
6920		case "etag":
6921			if v != nil {
6922				var etag string
6923				err = json.Unmarshal(*v, &etag)
6924				if err != nil {
6925					return err
6926				}
6927				erc.Etag = &etag
6928			}
6929		case "id":
6930			if v != nil {
6931				var ID string
6932				err = json.Unmarshal(*v, &ID)
6933				if err != nil {
6934					return err
6935				}
6936				erc.ID = &ID
6937			}
6938		case "name":
6939			if v != nil {
6940				var name string
6941				err = json.Unmarshal(*v, &name)
6942				if err != nil {
6943					return err
6944				}
6945				erc.Name = &name
6946			}
6947		case "type":
6948			if v != nil {
6949				var typeVar string
6950				err = json.Unmarshal(*v, &typeVar)
6951				if err != nil {
6952					return err
6953				}
6954				erc.Type = &typeVar
6955			}
6956		case "location":
6957			if v != nil {
6958				var location string
6959				err = json.Unmarshal(*v, &location)
6960				if err != nil {
6961					return err
6962				}
6963				erc.Location = &location
6964			}
6965		case "tags":
6966			if v != nil {
6967				var tags map[string]*string
6968				err = json.Unmarshal(*v, &tags)
6969				if err != nil {
6970					return err
6971				}
6972				erc.Tags = tags
6973			}
6974		}
6975	}
6976
6977	return nil
6978}
6979
6980// ExpressRouteCircuitArpTable the ARP table associated with the ExpressRouteCircuit.
6981type ExpressRouteCircuitArpTable struct {
6982	// Age - Entry age in minutes
6983	Age *int32 `json:"age,omitempty"`
6984	// Interface - Interface address
6985	Interface *string `json:"interface,omitempty"`
6986	// IPAddress - The IP address.
6987	IPAddress *string `json:"ipAddress,omitempty"`
6988	// MacAddress - The MAC address.
6989	MacAddress *string `json:"macAddress,omitempty"`
6990}
6991
6992// ExpressRouteCircuitAuthorization authorization in an ExpressRouteCircuit resource.
6993type ExpressRouteCircuitAuthorization struct {
6994	autorest.Response              `json:"-"`
6995	*AuthorizationPropertiesFormat `json:"properties,omitempty"`
6996	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
6997	Name *string `json:"name,omitempty"`
6998	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
6999	Etag *string `json:"etag,omitempty"`
7000	// ID - Resource ID.
7001	ID *string `json:"id,omitempty"`
7002}
7003
7004// MarshalJSON is the custom marshaler for ExpressRouteCircuitAuthorization.
7005func (erca ExpressRouteCircuitAuthorization) MarshalJSON() ([]byte, error) {
7006	objectMap := make(map[string]interface{})
7007	if erca.AuthorizationPropertiesFormat != nil {
7008		objectMap["properties"] = erca.AuthorizationPropertiesFormat
7009	}
7010	if erca.Name != nil {
7011		objectMap["name"] = erca.Name
7012	}
7013	if erca.ID != nil {
7014		objectMap["id"] = erca.ID
7015	}
7016	return json.Marshal(objectMap)
7017}
7018
7019// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitAuthorization struct.
7020func (erca *ExpressRouteCircuitAuthorization) UnmarshalJSON(body []byte) error {
7021	var m map[string]*json.RawMessage
7022	err := json.Unmarshal(body, &m)
7023	if err != nil {
7024		return err
7025	}
7026	for k, v := range m {
7027		switch k {
7028		case "properties":
7029			if v != nil {
7030				var authorizationPropertiesFormat AuthorizationPropertiesFormat
7031				err = json.Unmarshal(*v, &authorizationPropertiesFormat)
7032				if err != nil {
7033					return err
7034				}
7035				erca.AuthorizationPropertiesFormat = &authorizationPropertiesFormat
7036			}
7037		case "name":
7038			if v != nil {
7039				var name string
7040				err = json.Unmarshal(*v, &name)
7041				if err != nil {
7042					return err
7043				}
7044				erca.Name = &name
7045			}
7046		case "etag":
7047			if v != nil {
7048				var etag string
7049				err = json.Unmarshal(*v, &etag)
7050				if err != nil {
7051					return err
7052				}
7053				erca.Etag = &etag
7054			}
7055		case "id":
7056			if v != nil {
7057				var ID string
7058				err = json.Unmarshal(*v, &ID)
7059				if err != nil {
7060					return err
7061				}
7062				erca.ID = &ID
7063			}
7064		}
7065	}
7066
7067	return nil
7068}
7069
7070// ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
7071// results of a long-running operation.
7072type ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture struct {
7073	azure.FutureAPI
7074	// Result returns the result of the asynchronous operation.
7075	// If the operation has not completed it will return an error.
7076	Result func(ExpressRouteCircuitAuthorizationsClient) (ExpressRouteCircuitAuthorization, error)
7077}
7078
7079// ExpressRouteCircuitAuthorizationsDeleteFuture an abstraction for monitoring and retrieving the results
7080// of a long-running operation.
7081type ExpressRouteCircuitAuthorizationsDeleteFuture struct {
7082	azure.FutureAPI
7083	// Result returns the result of the asynchronous operation.
7084	// If the operation has not completed it will return an error.
7085	Result func(ExpressRouteCircuitAuthorizationsClient) (autorest.Response, error)
7086}
7087
7088// ExpressRouteCircuitConnection express Route Circuit Connection in an ExpressRouteCircuitPeering
7089// resource.
7090type ExpressRouteCircuitConnection struct {
7091	autorest.Response                              `json:"-"`
7092	*ExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"`
7093	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
7094	Name *string `json:"name,omitempty"`
7095	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
7096	Etag *string `json:"etag,omitempty"`
7097	// ID - Resource ID.
7098	ID *string `json:"id,omitempty"`
7099}
7100
7101// MarshalJSON is the custom marshaler for ExpressRouteCircuitConnection.
7102func (ercc ExpressRouteCircuitConnection) MarshalJSON() ([]byte, error) {
7103	objectMap := make(map[string]interface{})
7104	if ercc.ExpressRouteCircuitConnectionPropertiesFormat != nil {
7105		objectMap["properties"] = ercc.ExpressRouteCircuitConnectionPropertiesFormat
7106	}
7107	if ercc.Name != nil {
7108		objectMap["name"] = ercc.Name
7109	}
7110	if ercc.ID != nil {
7111		objectMap["id"] = ercc.ID
7112	}
7113	return json.Marshal(objectMap)
7114}
7115
7116// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitConnection struct.
7117func (ercc *ExpressRouteCircuitConnection) UnmarshalJSON(body []byte) error {
7118	var m map[string]*json.RawMessage
7119	err := json.Unmarshal(body, &m)
7120	if err != nil {
7121		return err
7122	}
7123	for k, v := range m {
7124		switch k {
7125		case "properties":
7126			if v != nil {
7127				var expressRouteCircuitConnectionPropertiesFormat ExpressRouteCircuitConnectionPropertiesFormat
7128				err = json.Unmarshal(*v, &expressRouteCircuitConnectionPropertiesFormat)
7129				if err != nil {
7130					return err
7131				}
7132				ercc.ExpressRouteCircuitConnectionPropertiesFormat = &expressRouteCircuitConnectionPropertiesFormat
7133			}
7134		case "name":
7135			if v != nil {
7136				var name string
7137				err = json.Unmarshal(*v, &name)
7138				if err != nil {
7139					return err
7140				}
7141				ercc.Name = &name
7142			}
7143		case "etag":
7144			if v != nil {
7145				var etag string
7146				err = json.Unmarshal(*v, &etag)
7147				if err != nil {
7148					return err
7149				}
7150				ercc.Etag = &etag
7151			}
7152		case "id":
7153			if v != nil {
7154				var ID string
7155				err = json.Unmarshal(*v, &ID)
7156				if err != nil {
7157					return err
7158				}
7159				ercc.ID = &ID
7160			}
7161		}
7162	}
7163
7164	return nil
7165}
7166
7167// ExpressRouteCircuitConnectionListResult response for ListConnections API service call retrieves all
7168// global reach connections that belongs to a Private Peering for an ExpressRouteCircuit.
7169type ExpressRouteCircuitConnectionListResult struct {
7170	autorest.Response `json:"-"`
7171	// Value - The global reach connection associated with Private Peering in an ExpressRoute Circuit.
7172	Value *[]ExpressRouteCircuitConnection `json:"value,omitempty"`
7173	// NextLink - The URL to get the next set of results.
7174	NextLink *string `json:"nextLink,omitempty"`
7175}
7176
7177// ExpressRouteCircuitConnectionListResultIterator provides access to a complete listing of
7178// ExpressRouteCircuitConnection values.
7179type ExpressRouteCircuitConnectionListResultIterator struct {
7180	i    int
7181	page ExpressRouteCircuitConnectionListResultPage
7182}
7183
7184// NextWithContext advances to the next value.  If there was an error making
7185// the request the iterator does not advance and the error is returned.
7186func (iter *ExpressRouteCircuitConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
7187	if tracing.IsEnabled() {
7188		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitConnectionListResultIterator.NextWithContext")
7189		defer func() {
7190			sc := -1
7191			if iter.Response().Response.Response != nil {
7192				sc = iter.Response().Response.Response.StatusCode
7193			}
7194			tracing.EndSpan(ctx, sc, err)
7195		}()
7196	}
7197	iter.i++
7198	if iter.i < len(iter.page.Values()) {
7199		return nil
7200	}
7201	err = iter.page.NextWithContext(ctx)
7202	if err != nil {
7203		iter.i--
7204		return err
7205	}
7206	iter.i = 0
7207	return nil
7208}
7209
7210// Next advances to the next value.  If there was an error making
7211// the request the iterator does not advance and the error is returned.
7212// Deprecated: Use NextWithContext() instead.
7213func (iter *ExpressRouteCircuitConnectionListResultIterator) Next() error {
7214	return iter.NextWithContext(context.Background())
7215}
7216
7217// NotDone returns true if the enumeration should be started or is not yet complete.
7218func (iter ExpressRouteCircuitConnectionListResultIterator) NotDone() bool {
7219	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7220}
7221
7222// Response returns the raw server response from the last page request.
7223func (iter ExpressRouteCircuitConnectionListResultIterator) Response() ExpressRouteCircuitConnectionListResult {
7224	return iter.page.Response()
7225}
7226
7227// Value returns the current value or a zero-initialized value if the
7228// iterator has advanced beyond the end of the collection.
7229func (iter ExpressRouteCircuitConnectionListResultIterator) Value() ExpressRouteCircuitConnection {
7230	if !iter.page.NotDone() {
7231		return ExpressRouteCircuitConnection{}
7232	}
7233	return iter.page.Values()[iter.i]
7234}
7235
7236// Creates a new instance of the ExpressRouteCircuitConnectionListResultIterator type.
7237func NewExpressRouteCircuitConnectionListResultIterator(page ExpressRouteCircuitConnectionListResultPage) ExpressRouteCircuitConnectionListResultIterator {
7238	return ExpressRouteCircuitConnectionListResultIterator{page: page}
7239}
7240
7241// IsEmpty returns true if the ListResult contains no values.
7242func (ercclr ExpressRouteCircuitConnectionListResult) IsEmpty() bool {
7243	return ercclr.Value == nil || len(*ercclr.Value) == 0
7244}
7245
7246// hasNextLink returns true if the NextLink is not empty.
7247func (ercclr ExpressRouteCircuitConnectionListResult) hasNextLink() bool {
7248	return ercclr.NextLink != nil && len(*ercclr.NextLink) != 0
7249}
7250
7251// expressRouteCircuitConnectionListResultPreparer prepares a request to retrieve the next set of results.
7252// It returns nil if no more results exist.
7253func (ercclr ExpressRouteCircuitConnectionListResult) expressRouteCircuitConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
7254	if !ercclr.hasNextLink() {
7255		return nil, nil
7256	}
7257	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7258		autorest.AsJSON(),
7259		autorest.AsGet(),
7260		autorest.WithBaseURL(to.String(ercclr.NextLink)))
7261}
7262
7263// ExpressRouteCircuitConnectionListResultPage contains a page of ExpressRouteCircuitConnection values.
7264type ExpressRouteCircuitConnectionListResultPage struct {
7265	fn     func(context.Context, ExpressRouteCircuitConnectionListResult) (ExpressRouteCircuitConnectionListResult, error)
7266	ercclr ExpressRouteCircuitConnectionListResult
7267}
7268
7269// NextWithContext advances to the next page of values.  If there was an error making
7270// the request the page does not advance and the error is returned.
7271func (page *ExpressRouteCircuitConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
7272	if tracing.IsEnabled() {
7273		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitConnectionListResultPage.NextWithContext")
7274		defer func() {
7275			sc := -1
7276			if page.Response().Response.Response != nil {
7277				sc = page.Response().Response.Response.StatusCode
7278			}
7279			tracing.EndSpan(ctx, sc, err)
7280		}()
7281	}
7282	for {
7283		next, err := page.fn(ctx, page.ercclr)
7284		if err != nil {
7285			return err
7286		}
7287		page.ercclr = next
7288		if !next.hasNextLink() || !next.IsEmpty() {
7289			break
7290		}
7291	}
7292	return nil
7293}
7294
7295// Next advances to the next page of values.  If there was an error making
7296// the request the page does not advance and the error is returned.
7297// Deprecated: Use NextWithContext() instead.
7298func (page *ExpressRouteCircuitConnectionListResultPage) Next() error {
7299	return page.NextWithContext(context.Background())
7300}
7301
7302// NotDone returns true if the page enumeration should be started or is not yet complete.
7303func (page ExpressRouteCircuitConnectionListResultPage) NotDone() bool {
7304	return !page.ercclr.IsEmpty()
7305}
7306
7307// Response returns the raw server response from the last page request.
7308func (page ExpressRouteCircuitConnectionListResultPage) Response() ExpressRouteCircuitConnectionListResult {
7309	return page.ercclr
7310}
7311
7312// Values returns the slice of values for the current page or nil if there are no values.
7313func (page ExpressRouteCircuitConnectionListResultPage) Values() []ExpressRouteCircuitConnection {
7314	if page.ercclr.IsEmpty() {
7315		return nil
7316	}
7317	return *page.ercclr.Value
7318}
7319
7320// Creates a new instance of the ExpressRouteCircuitConnectionListResultPage type.
7321func NewExpressRouteCircuitConnectionListResultPage(cur ExpressRouteCircuitConnectionListResult, getNextPage func(context.Context, ExpressRouteCircuitConnectionListResult) (ExpressRouteCircuitConnectionListResult, error)) ExpressRouteCircuitConnectionListResultPage {
7322	return ExpressRouteCircuitConnectionListResultPage{
7323		fn:     getNextPage,
7324		ercclr: cur,
7325	}
7326}
7327
7328// ExpressRouteCircuitConnectionPropertiesFormat ...
7329type ExpressRouteCircuitConnectionPropertiesFormat struct {
7330	// ExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the circuit initiating connection.
7331	ExpressRouteCircuitPeering *SubResource `json:"expressRouteCircuitPeering,omitempty"`
7332	// PeerExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the peered circuit.
7333	PeerExpressRouteCircuitPeering *SubResource `json:"peerExpressRouteCircuitPeering,omitempty"`
7334	// AddressPrefix - /29 IP address space to carve out Customer addresses for tunnels.
7335	AddressPrefix *string `json:"addressPrefix,omitempty"`
7336	// AuthorizationKey - The authorization key.
7337	AuthorizationKey *string `json:"authorizationKey,omitempty"`
7338	// CircuitConnectionStatus - READ-ONLY; Express Route Circuit Connection State. Possible values are: 'Connected' and 'Disconnected'. Possible values include: 'Connected', 'Connecting', 'Disconnected'
7339	CircuitConnectionStatus CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"`
7340	// ProvisioningState - READ-ONLY; Provisioning state of the circuit connection resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
7341	ProvisioningState *string `json:"provisioningState,omitempty"`
7342}
7343
7344// MarshalJSON is the custom marshaler for ExpressRouteCircuitConnectionPropertiesFormat.
7345func (erccpf ExpressRouteCircuitConnectionPropertiesFormat) MarshalJSON() ([]byte, error) {
7346	objectMap := make(map[string]interface{})
7347	if erccpf.ExpressRouteCircuitPeering != nil {
7348		objectMap["expressRouteCircuitPeering"] = erccpf.ExpressRouteCircuitPeering
7349	}
7350	if erccpf.PeerExpressRouteCircuitPeering != nil {
7351		objectMap["peerExpressRouteCircuitPeering"] = erccpf.PeerExpressRouteCircuitPeering
7352	}
7353	if erccpf.AddressPrefix != nil {
7354		objectMap["addressPrefix"] = erccpf.AddressPrefix
7355	}
7356	if erccpf.AuthorizationKey != nil {
7357		objectMap["authorizationKey"] = erccpf.AuthorizationKey
7358	}
7359	return json.Marshal(objectMap)
7360}
7361
7362// ExpressRouteCircuitConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
7363// results of a long-running operation.
7364type ExpressRouteCircuitConnectionsCreateOrUpdateFuture struct {
7365	azure.FutureAPI
7366	// Result returns the result of the asynchronous operation.
7367	// If the operation has not completed it will return an error.
7368	Result func(ExpressRouteCircuitConnectionsClient) (ExpressRouteCircuitConnection, error)
7369}
7370
7371// ExpressRouteCircuitConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a
7372// long-running operation.
7373type ExpressRouteCircuitConnectionsDeleteFuture struct {
7374	azure.FutureAPI
7375	// Result returns the result of the asynchronous operation.
7376	// If the operation has not completed it will return an error.
7377	Result func(ExpressRouteCircuitConnectionsClient) (autorest.Response, error)
7378}
7379
7380// ExpressRouteCircuitListResult response for ListExpressRouteCircuit API service call.
7381type ExpressRouteCircuitListResult struct {
7382	autorest.Response `json:"-"`
7383	// Value - A list of ExpressRouteCircuits in a resource group.
7384	Value *[]ExpressRouteCircuit `json:"value,omitempty"`
7385	// NextLink - The URL to get the next set of results.
7386	NextLink *string `json:"nextLink,omitempty"`
7387}
7388
7389// ExpressRouteCircuitListResultIterator provides access to a complete listing of ExpressRouteCircuit
7390// values.
7391type ExpressRouteCircuitListResultIterator struct {
7392	i    int
7393	page ExpressRouteCircuitListResultPage
7394}
7395
7396// NextWithContext advances to the next value.  If there was an error making
7397// the request the iterator does not advance and the error is returned.
7398func (iter *ExpressRouteCircuitListResultIterator) NextWithContext(ctx context.Context) (err error) {
7399	if tracing.IsEnabled() {
7400		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultIterator.NextWithContext")
7401		defer func() {
7402			sc := -1
7403			if iter.Response().Response.Response != nil {
7404				sc = iter.Response().Response.Response.StatusCode
7405			}
7406			tracing.EndSpan(ctx, sc, err)
7407		}()
7408	}
7409	iter.i++
7410	if iter.i < len(iter.page.Values()) {
7411		return nil
7412	}
7413	err = iter.page.NextWithContext(ctx)
7414	if err != nil {
7415		iter.i--
7416		return err
7417	}
7418	iter.i = 0
7419	return nil
7420}
7421
7422// Next advances to the next value.  If there was an error making
7423// the request the iterator does not advance and the error is returned.
7424// Deprecated: Use NextWithContext() instead.
7425func (iter *ExpressRouteCircuitListResultIterator) Next() error {
7426	return iter.NextWithContext(context.Background())
7427}
7428
7429// NotDone returns true if the enumeration should be started or is not yet complete.
7430func (iter ExpressRouteCircuitListResultIterator) NotDone() bool {
7431	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7432}
7433
7434// Response returns the raw server response from the last page request.
7435func (iter ExpressRouteCircuitListResultIterator) Response() ExpressRouteCircuitListResult {
7436	return iter.page.Response()
7437}
7438
7439// Value returns the current value or a zero-initialized value if the
7440// iterator has advanced beyond the end of the collection.
7441func (iter ExpressRouteCircuitListResultIterator) Value() ExpressRouteCircuit {
7442	if !iter.page.NotDone() {
7443		return ExpressRouteCircuit{}
7444	}
7445	return iter.page.Values()[iter.i]
7446}
7447
7448// Creates a new instance of the ExpressRouteCircuitListResultIterator type.
7449func NewExpressRouteCircuitListResultIterator(page ExpressRouteCircuitListResultPage) ExpressRouteCircuitListResultIterator {
7450	return ExpressRouteCircuitListResultIterator{page: page}
7451}
7452
7453// IsEmpty returns true if the ListResult contains no values.
7454func (erclr ExpressRouteCircuitListResult) IsEmpty() bool {
7455	return erclr.Value == nil || len(*erclr.Value) == 0
7456}
7457
7458// hasNextLink returns true if the NextLink is not empty.
7459func (erclr ExpressRouteCircuitListResult) hasNextLink() bool {
7460	return erclr.NextLink != nil && len(*erclr.NextLink) != 0
7461}
7462
7463// expressRouteCircuitListResultPreparer prepares a request to retrieve the next set of results.
7464// It returns nil if no more results exist.
7465func (erclr ExpressRouteCircuitListResult) expressRouteCircuitListResultPreparer(ctx context.Context) (*http.Request, error) {
7466	if !erclr.hasNextLink() {
7467		return nil, nil
7468	}
7469	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7470		autorest.AsJSON(),
7471		autorest.AsGet(),
7472		autorest.WithBaseURL(to.String(erclr.NextLink)))
7473}
7474
7475// ExpressRouteCircuitListResultPage contains a page of ExpressRouteCircuit values.
7476type ExpressRouteCircuitListResultPage struct {
7477	fn    func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)
7478	erclr ExpressRouteCircuitListResult
7479}
7480
7481// NextWithContext advances to the next page of values.  If there was an error making
7482// the request the page does not advance and the error is returned.
7483func (page *ExpressRouteCircuitListResultPage) NextWithContext(ctx context.Context) (err error) {
7484	if tracing.IsEnabled() {
7485		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultPage.NextWithContext")
7486		defer func() {
7487			sc := -1
7488			if page.Response().Response.Response != nil {
7489				sc = page.Response().Response.Response.StatusCode
7490			}
7491			tracing.EndSpan(ctx, sc, err)
7492		}()
7493	}
7494	for {
7495		next, err := page.fn(ctx, page.erclr)
7496		if err != nil {
7497			return err
7498		}
7499		page.erclr = next
7500		if !next.hasNextLink() || !next.IsEmpty() {
7501			break
7502		}
7503	}
7504	return nil
7505}
7506
7507// Next advances to the next page of values.  If there was an error making
7508// the request the page does not advance and the error is returned.
7509// Deprecated: Use NextWithContext() instead.
7510func (page *ExpressRouteCircuitListResultPage) Next() error {
7511	return page.NextWithContext(context.Background())
7512}
7513
7514// NotDone returns true if the page enumeration should be started or is not yet complete.
7515func (page ExpressRouteCircuitListResultPage) NotDone() bool {
7516	return !page.erclr.IsEmpty()
7517}
7518
7519// Response returns the raw server response from the last page request.
7520func (page ExpressRouteCircuitListResultPage) Response() ExpressRouteCircuitListResult {
7521	return page.erclr
7522}
7523
7524// Values returns the slice of values for the current page or nil if there are no values.
7525func (page ExpressRouteCircuitListResultPage) Values() []ExpressRouteCircuit {
7526	if page.erclr.IsEmpty() {
7527		return nil
7528	}
7529	return *page.erclr.Value
7530}
7531
7532// Creates a new instance of the ExpressRouteCircuitListResultPage type.
7533func NewExpressRouteCircuitListResultPage(cur ExpressRouteCircuitListResult, getNextPage func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)) ExpressRouteCircuitListResultPage {
7534	return ExpressRouteCircuitListResultPage{
7535		fn:    getNextPage,
7536		erclr: cur,
7537	}
7538}
7539
7540// ExpressRouteCircuitPeering peering in an ExpressRouteCircuit resource.
7541type ExpressRouteCircuitPeering struct {
7542	autorest.Response                           `json:"-"`
7543	*ExpressRouteCircuitPeeringPropertiesFormat `json:"properties,omitempty"`
7544	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
7545	Name *string `json:"name,omitempty"`
7546	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
7547	Etag *string `json:"etag,omitempty"`
7548	// ID - Resource ID.
7549	ID *string `json:"id,omitempty"`
7550}
7551
7552// MarshalJSON is the custom marshaler for ExpressRouteCircuitPeering.
7553func (ercp ExpressRouteCircuitPeering) MarshalJSON() ([]byte, error) {
7554	objectMap := make(map[string]interface{})
7555	if ercp.ExpressRouteCircuitPeeringPropertiesFormat != nil {
7556		objectMap["properties"] = ercp.ExpressRouteCircuitPeeringPropertiesFormat
7557	}
7558	if ercp.Name != nil {
7559		objectMap["name"] = ercp.Name
7560	}
7561	if ercp.ID != nil {
7562		objectMap["id"] = ercp.ID
7563	}
7564	return json.Marshal(objectMap)
7565}
7566
7567// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitPeering struct.
7568func (ercp *ExpressRouteCircuitPeering) UnmarshalJSON(body []byte) error {
7569	var m map[string]*json.RawMessage
7570	err := json.Unmarshal(body, &m)
7571	if err != nil {
7572		return err
7573	}
7574	for k, v := range m {
7575		switch k {
7576		case "properties":
7577			if v != nil {
7578				var expressRouteCircuitPeeringPropertiesFormat ExpressRouteCircuitPeeringPropertiesFormat
7579				err = json.Unmarshal(*v, &expressRouteCircuitPeeringPropertiesFormat)
7580				if err != nil {
7581					return err
7582				}
7583				ercp.ExpressRouteCircuitPeeringPropertiesFormat = &expressRouteCircuitPeeringPropertiesFormat
7584			}
7585		case "name":
7586			if v != nil {
7587				var name string
7588				err = json.Unmarshal(*v, &name)
7589				if err != nil {
7590					return err
7591				}
7592				ercp.Name = &name
7593			}
7594		case "etag":
7595			if v != nil {
7596				var etag string
7597				err = json.Unmarshal(*v, &etag)
7598				if err != nil {
7599					return err
7600				}
7601				ercp.Etag = &etag
7602			}
7603		case "id":
7604			if v != nil {
7605				var ID string
7606				err = json.Unmarshal(*v, &ID)
7607				if err != nil {
7608					return err
7609				}
7610				ercp.ID = &ID
7611			}
7612		}
7613	}
7614
7615	return nil
7616}
7617
7618// ExpressRouteCircuitPeeringConfig specifies the peering configuration.
7619type ExpressRouteCircuitPeeringConfig struct {
7620	// AdvertisedPublicPrefixes - The reference of AdvertisedPublicPrefixes.
7621	AdvertisedPublicPrefixes *[]string `json:"advertisedPublicPrefixes,omitempty"`
7622	// AdvertisedCommunities - The communities of bgp peering. Specified for microsoft peering
7623	AdvertisedCommunities *[]string `json:"advertisedCommunities,omitempty"`
7624	// AdvertisedPublicPrefixesState - AdvertisedPublicPrefixState of the Peering resource. Possible values are 'NotConfigured', 'Configuring', 'Configured', and 'ValidationNeeded'. Possible values include: 'NotConfigured', 'Configuring', 'Configured', 'ValidationNeeded'
7625	AdvertisedPublicPrefixesState ExpressRouteCircuitPeeringAdvertisedPublicPrefixState `json:"advertisedPublicPrefixesState,omitempty"`
7626	// LegacyMode - The legacy mode of the peering.
7627	LegacyMode *int32 `json:"legacyMode,omitempty"`
7628	// CustomerASN - The CustomerASN of the peering.
7629	CustomerASN *int32 `json:"customerASN,omitempty"`
7630	// RoutingRegistryName - The RoutingRegistryName of the configuration.
7631	RoutingRegistryName *string `json:"routingRegistryName,omitempty"`
7632}
7633
7634// ExpressRouteCircuitPeeringID expressRoute circuit peering identifier.
7635type ExpressRouteCircuitPeeringID struct {
7636	// ID - The ID of the ExpressRoute circuit peering.
7637	ID *string `json:"id,omitempty"`
7638}
7639
7640// ExpressRouteCircuitPeeringListResult response for ListPeering API service call retrieves all peerings
7641// that belong to an ExpressRouteCircuit.
7642type ExpressRouteCircuitPeeringListResult struct {
7643	autorest.Response `json:"-"`
7644	// Value - The peerings in an express route circuit.
7645	Value *[]ExpressRouteCircuitPeering `json:"value,omitempty"`
7646	// NextLink - The URL to get the next set of results.
7647	NextLink *string `json:"nextLink,omitempty"`
7648}
7649
7650// ExpressRouteCircuitPeeringListResultIterator provides access to a complete listing of
7651// ExpressRouteCircuitPeering values.
7652type ExpressRouteCircuitPeeringListResultIterator struct {
7653	i    int
7654	page ExpressRouteCircuitPeeringListResultPage
7655}
7656
7657// NextWithContext advances to the next value.  If there was an error making
7658// the request the iterator does not advance and the error is returned.
7659func (iter *ExpressRouteCircuitPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
7660	if tracing.IsEnabled() {
7661		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultIterator.NextWithContext")
7662		defer func() {
7663			sc := -1
7664			if iter.Response().Response.Response != nil {
7665				sc = iter.Response().Response.Response.StatusCode
7666			}
7667			tracing.EndSpan(ctx, sc, err)
7668		}()
7669	}
7670	iter.i++
7671	if iter.i < len(iter.page.Values()) {
7672		return nil
7673	}
7674	err = iter.page.NextWithContext(ctx)
7675	if err != nil {
7676		iter.i--
7677		return err
7678	}
7679	iter.i = 0
7680	return nil
7681}
7682
7683// Next advances to the next value.  If there was an error making
7684// the request the iterator does not advance and the error is returned.
7685// Deprecated: Use NextWithContext() instead.
7686func (iter *ExpressRouteCircuitPeeringListResultIterator) Next() error {
7687	return iter.NextWithContext(context.Background())
7688}
7689
7690// NotDone returns true if the enumeration should be started or is not yet complete.
7691func (iter ExpressRouteCircuitPeeringListResultIterator) NotDone() bool {
7692	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7693}
7694
7695// Response returns the raw server response from the last page request.
7696func (iter ExpressRouteCircuitPeeringListResultIterator) Response() ExpressRouteCircuitPeeringListResult {
7697	return iter.page.Response()
7698}
7699
7700// Value returns the current value or a zero-initialized value if the
7701// iterator has advanced beyond the end of the collection.
7702func (iter ExpressRouteCircuitPeeringListResultIterator) Value() ExpressRouteCircuitPeering {
7703	if !iter.page.NotDone() {
7704		return ExpressRouteCircuitPeering{}
7705	}
7706	return iter.page.Values()[iter.i]
7707}
7708
7709// Creates a new instance of the ExpressRouteCircuitPeeringListResultIterator type.
7710func NewExpressRouteCircuitPeeringListResultIterator(page ExpressRouteCircuitPeeringListResultPage) ExpressRouteCircuitPeeringListResultIterator {
7711	return ExpressRouteCircuitPeeringListResultIterator{page: page}
7712}
7713
7714// IsEmpty returns true if the ListResult contains no values.
7715func (ercplr ExpressRouteCircuitPeeringListResult) IsEmpty() bool {
7716	return ercplr.Value == nil || len(*ercplr.Value) == 0
7717}
7718
7719// hasNextLink returns true if the NextLink is not empty.
7720func (ercplr ExpressRouteCircuitPeeringListResult) hasNextLink() bool {
7721	return ercplr.NextLink != nil && len(*ercplr.NextLink) != 0
7722}
7723
7724// expressRouteCircuitPeeringListResultPreparer prepares a request to retrieve the next set of results.
7725// It returns nil if no more results exist.
7726func (ercplr ExpressRouteCircuitPeeringListResult) expressRouteCircuitPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
7727	if !ercplr.hasNextLink() {
7728		return nil, nil
7729	}
7730	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7731		autorest.AsJSON(),
7732		autorest.AsGet(),
7733		autorest.WithBaseURL(to.String(ercplr.NextLink)))
7734}
7735
7736// ExpressRouteCircuitPeeringListResultPage contains a page of ExpressRouteCircuitPeering values.
7737type ExpressRouteCircuitPeeringListResultPage struct {
7738	fn     func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)
7739	ercplr ExpressRouteCircuitPeeringListResult
7740}
7741
7742// NextWithContext advances to the next page of values.  If there was an error making
7743// the request the page does not advance and the error is returned.
7744func (page *ExpressRouteCircuitPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
7745	if tracing.IsEnabled() {
7746		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultPage.NextWithContext")
7747		defer func() {
7748			sc := -1
7749			if page.Response().Response.Response != nil {
7750				sc = page.Response().Response.Response.StatusCode
7751			}
7752			tracing.EndSpan(ctx, sc, err)
7753		}()
7754	}
7755	for {
7756		next, err := page.fn(ctx, page.ercplr)
7757		if err != nil {
7758			return err
7759		}
7760		page.ercplr = next
7761		if !next.hasNextLink() || !next.IsEmpty() {
7762			break
7763		}
7764	}
7765	return nil
7766}
7767
7768// Next advances to the next page of values.  If there was an error making
7769// the request the page does not advance and the error is returned.
7770// Deprecated: Use NextWithContext() instead.
7771func (page *ExpressRouteCircuitPeeringListResultPage) Next() error {
7772	return page.NextWithContext(context.Background())
7773}
7774
7775// NotDone returns true if the page enumeration should be started or is not yet complete.
7776func (page ExpressRouteCircuitPeeringListResultPage) NotDone() bool {
7777	return !page.ercplr.IsEmpty()
7778}
7779
7780// Response returns the raw server response from the last page request.
7781func (page ExpressRouteCircuitPeeringListResultPage) Response() ExpressRouteCircuitPeeringListResult {
7782	return page.ercplr
7783}
7784
7785// Values returns the slice of values for the current page or nil if there are no values.
7786func (page ExpressRouteCircuitPeeringListResultPage) Values() []ExpressRouteCircuitPeering {
7787	if page.ercplr.IsEmpty() {
7788		return nil
7789	}
7790	return *page.ercplr.Value
7791}
7792
7793// Creates a new instance of the ExpressRouteCircuitPeeringListResultPage type.
7794func NewExpressRouteCircuitPeeringListResultPage(cur ExpressRouteCircuitPeeringListResult, getNextPage func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)) ExpressRouteCircuitPeeringListResultPage {
7795	return ExpressRouteCircuitPeeringListResultPage{
7796		fn:     getNextPage,
7797		ercplr: cur,
7798	}
7799}
7800
7801// ExpressRouteCircuitPeeringPropertiesFormat ...
7802type ExpressRouteCircuitPeeringPropertiesFormat struct {
7803	// PeeringType - The peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'
7804	PeeringType ExpressRoutePeeringType `json:"peeringType,omitempty"`
7805	// State - The peering state. Possible values include: 'ExpressRoutePeeringStateDisabled', 'ExpressRoutePeeringStateEnabled'
7806	State ExpressRoutePeeringState `json:"state,omitempty"`
7807	// AzureASN - The Azure ASN.
7808	AzureASN *int32 `json:"azureASN,omitempty"`
7809	// PeerASN - The peer ASN.
7810	PeerASN *int64 `json:"peerASN,omitempty"`
7811	// PrimaryPeerAddressPrefix - The primary address prefix.
7812	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
7813	// SecondaryPeerAddressPrefix - The secondary address prefix.
7814	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
7815	// PrimaryAzurePort - The primary port.
7816	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
7817	// SecondaryAzurePort - The secondary port.
7818	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
7819	// SharedKey - The shared key.
7820	SharedKey *string `json:"sharedKey,omitempty"`
7821	// VlanID - The VLAN ID.
7822	VlanID *int32 `json:"vlanId,omitempty"`
7823	// MicrosoftPeeringConfig - The Microsoft peering configuration.
7824	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
7825	// Stats - Gets peering stats.
7826	Stats *ExpressRouteCircuitStats `json:"stats,omitempty"`
7827	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
7828	ProvisioningState *string `json:"provisioningState,omitempty"`
7829	// GatewayManagerEtag - The GatewayManager Etag.
7830	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
7831	// LastModifiedBy - Gets whether the provider or the customer last modified the peering.
7832	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
7833	// RouteFilter - The reference of the RouteFilter resource.
7834	RouteFilter *RouteFilter `json:"routeFilter,omitempty"`
7835	// Ipv6PeeringConfig - The IPv6 peering configuration.
7836	Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"`
7837	// ExpressRouteConnection - The ExpressRoute connection.
7838	ExpressRouteConnection *ExpressRouteConnectionID `json:"expressRouteConnection,omitempty"`
7839	// Connections - The list of circuit connections associated with Azure Private Peering for this circuit.
7840	Connections *[]ExpressRouteCircuitConnection `json:"connections,omitempty"`
7841}
7842
7843// ExpressRouteCircuitPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
7844// of a long-running operation.
7845type ExpressRouteCircuitPeeringsCreateOrUpdateFuture struct {
7846	azure.FutureAPI
7847	// Result returns the result of the asynchronous operation.
7848	// If the operation has not completed it will return an error.
7849	Result func(ExpressRouteCircuitPeeringsClient) (ExpressRouteCircuitPeering, error)
7850}
7851
7852// ExpressRouteCircuitPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
7853// long-running operation.
7854type ExpressRouteCircuitPeeringsDeleteFuture struct {
7855	azure.FutureAPI
7856	// Result returns the result of the asynchronous operation.
7857	// If the operation has not completed it will return an error.
7858	Result func(ExpressRouteCircuitPeeringsClient) (autorest.Response, error)
7859}
7860
7861// ExpressRouteCircuitPropertiesFormat properties of ExpressRouteCircuit.
7862type ExpressRouteCircuitPropertiesFormat struct {
7863	// AllowClassicOperations - Allow classic operations
7864	AllowClassicOperations *bool `json:"allowClassicOperations,omitempty"`
7865	// CircuitProvisioningState - The CircuitProvisioningState state of the resource.
7866	CircuitProvisioningState *string `json:"circuitProvisioningState,omitempty"`
7867	// ServiceProviderProvisioningState - The ServiceProviderProvisioningState state of the resource. Possible values are 'NotProvisioned', 'Provisioning', 'Provisioned', and 'Deprovisioning'. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning'
7868	ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"`
7869	// Authorizations - The list of authorizations.
7870	Authorizations *[]ExpressRouteCircuitAuthorization `json:"authorizations,omitempty"`
7871	// Peerings - The list of peerings.
7872	Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"`
7873	// ServiceKey - The ServiceKey.
7874	ServiceKey *string `json:"serviceKey,omitempty"`
7875	// ServiceProviderNotes - The ServiceProviderNotes.
7876	ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"`
7877	// ServiceProviderProperties - The ServiceProviderProperties.
7878	ServiceProviderProperties *ExpressRouteCircuitServiceProviderProperties `json:"serviceProviderProperties,omitempty"`
7879	// ExpressRoutePort - The reference to the ExpressRoutePort resource when the circuit is provisioned on an ExpressRoutePort resource.
7880	ExpressRoutePort *SubResource `json:"expressRoutePort,omitempty"`
7881	// BandwidthInGbps - The bandwidth of the circuit when the circuit is provisioned on an ExpressRoutePort resource.
7882	BandwidthInGbps *float64 `json:"bandwidthInGbps,omitempty"`
7883	// Stag - READ-ONLY; The identifier of the circuit traffic. Outer tag for QinQ encapsulation.
7884	Stag *int32 `json:"stag,omitempty"`
7885	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
7886	ProvisioningState *string `json:"provisioningState,omitempty"`
7887	// GatewayManagerEtag - The GatewayManager Etag.
7888	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
7889	// AllowGlobalReach - Flag to enable Global Reach on the circuit.
7890	AllowGlobalReach *bool `json:"allowGlobalReach,omitempty"`
7891}
7892
7893// MarshalJSON is the custom marshaler for ExpressRouteCircuitPropertiesFormat.
7894func (ercpf ExpressRouteCircuitPropertiesFormat) MarshalJSON() ([]byte, error) {
7895	objectMap := make(map[string]interface{})
7896	if ercpf.AllowClassicOperations != nil {
7897		objectMap["allowClassicOperations"] = ercpf.AllowClassicOperations
7898	}
7899	if ercpf.CircuitProvisioningState != nil {
7900		objectMap["circuitProvisioningState"] = ercpf.CircuitProvisioningState
7901	}
7902	if ercpf.ServiceProviderProvisioningState != "" {
7903		objectMap["serviceProviderProvisioningState"] = ercpf.ServiceProviderProvisioningState
7904	}
7905	if ercpf.Authorizations != nil {
7906		objectMap["authorizations"] = ercpf.Authorizations
7907	}
7908	if ercpf.Peerings != nil {
7909		objectMap["peerings"] = ercpf.Peerings
7910	}
7911	if ercpf.ServiceKey != nil {
7912		objectMap["serviceKey"] = ercpf.ServiceKey
7913	}
7914	if ercpf.ServiceProviderNotes != nil {
7915		objectMap["serviceProviderNotes"] = ercpf.ServiceProviderNotes
7916	}
7917	if ercpf.ServiceProviderProperties != nil {
7918		objectMap["serviceProviderProperties"] = ercpf.ServiceProviderProperties
7919	}
7920	if ercpf.ExpressRoutePort != nil {
7921		objectMap["expressRoutePort"] = ercpf.ExpressRoutePort
7922	}
7923	if ercpf.BandwidthInGbps != nil {
7924		objectMap["bandwidthInGbps"] = ercpf.BandwidthInGbps
7925	}
7926	if ercpf.ProvisioningState != nil {
7927		objectMap["provisioningState"] = ercpf.ProvisioningState
7928	}
7929	if ercpf.GatewayManagerEtag != nil {
7930		objectMap["gatewayManagerEtag"] = ercpf.GatewayManagerEtag
7931	}
7932	if ercpf.AllowGlobalReach != nil {
7933		objectMap["allowGlobalReach"] = ercpf.AllowGlobalReach
7934	}
7935	return json.Marshal(objectMap)
7936}
7937
7938// ExpressRouteCircuitReference ...
7939type ExpressRouteCircuitReference struct {
7940	// ID - Corresponding Express Route Circuit Id.
7941	ID *string `json:"id,omitempty"`
7942}
7943
7944// ExpressRouteCircuitRoutesTable the routes table associated with the ExpressRouteCircuit
7945type ExpressRouteCircuitRoutesTable struct {
7946	// NetworkProperty - IP address of a network entity
7947	NetworkProperty *string `json:"network,omitempty"`
7948	// NextHop - NextHop address
7949	NextHop *string `json:"nextHop,omitempty"`
7950	// LocPrf - Local preference value as set with the set local-preference route-map configuration command
7951	LocPrf *string `json:"locPrf,omitempty"`
7952	// Weight - Route Weight.
7953	Weight *int32 `json:"weight,omitempty"`
7954	// Path - Autonomous system paths to the destination network.
7955	Path *string `json:"path,omitempty"`
7956}
7957
7958// ExpressRouteCircuitRoutesTableSummary the routes table associated with the ExpressRouteCircuit.
7959type ExpressRouteCircuitRoutesTableSummary struct {
7960	// Neighbor - IP address of the neighbor.
7961	Neighbor *string `json:"neighbor,omitempty"`
7962	// V - BGP version number spoken to the neighbor.
7963	V *int32 `json:"v,omitempty"`
7964	// As - Autonomous system number.
7965	As *int32 `json:"as,omitempty"`
7966	// 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.
7967	UpDown *string `json:"upDown,omitempty"`
7968	// StatePfxRcd - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group.
7969	StatePfxRcd *string `json:"statePfxRcd,omitempty"`
7970}
7971
7972// ExpressRouteCircuitsArpTableListResult response for ListArpTable associated with the Express Route
7973// Circuits API.
7974type ExpressRouteCircuitsArpTableListResult struct {
7975	autorest.Response `json:"-"`
7976	// Value - Gets list of the ARP table.
7977	Value *[]ExpressRouteCircuitArpTable `json:"value,omitempty"`
7978	// NextLink - The URL to get the next set of results.
7979	NextLink *string `json:"nextLink,omitempty"`
7980}
7981
7982// ExpressRouteCircuitsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
7983// long-running operation.
7984type ExpressRouteCircuitsCreateOrUpdateFuture struct {
7985	azure.FutureAPI
7986	// Result returns the result of the asynchronous operation.
7987	// If the operation has not completed it will return an error.
7988	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuit, error)
7989}
7990
7991// ExpressRouteCircuitsDeleteFuture an abstraction for monitoring and retrieving the results of a
7992// long-running operation.
7993type ExpressRouteCircuitsDeleteFuture struct {
7994	azure.FutureAPI
7995	// Result returns the result of the asynchronous operation.
7996	// If the operation has not completed it will return an error.
7997	Result func(ExpressRouteCircuitsClient) (autorest.Response, error)
7998}
7999
8000// ExpressRouteCircuitServiceProviderProperties contains ServiceProviderProperties in an
8001// ExpressRouteCircuit.
8002type ExpressRouteCircuitServiceProviderProperties struct {
8003	// ServiceProviderName - The serviceProviderName.
8004	ServiceProviderName *string `json:"serviceProviderName,omitempty"`
8005	// PeeringLocation - The peering location.
8006	PeeringLocation *string `json:"peeringLocation,omitempty"`
8007	// BandwidthInMbps - The BandwidthInMbps.
8008	BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"`
8009}
8010
8011// ExpressRouteCircuitSku contains SKU in an ExpressRouteCircuit.
8012type ExpressRouteCircuitSku struct {
8013	// Name - The name of the SKU.
8014	Name *string `json:"name,omitempty"`
8015	// Tier - The tier of the SKU. Possible values are 'Standard', 'Premium' or 'Basic'. Possible values include: 'ExpressRouteCircuitSkuTierStandard', 'ExpressRouteCircuitSkuTierPremium', 'ExpressRouteCircuitSkuTierBasic'
8016	Tier ExpressRouteCircuitSkuTier `json:"tier,omitempty"`
8017	// Family - The family of the SKU. Possible values are: 'UnlimitedData' and 'MeteredData'. Possible values include: 'UnlimitedData', 'MeteredData'
8018	Family ExpressRouteCircuitSkuFamily `json:"family,omitempty"`
8019}
8020
8021// ExpressRouteCircuitsListArpTableFuture an abstraction for monitoring and retrieving the results of a
8022// long-running operation.
8023type ExpressRouteCircuitsListArpTableFuture struct {
8024	azure.FutureAPI
8025	// Result returns the result of the asynchronous operation.
8026	// If the operation has not completed it will return an error.
8027	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsArpTableListResult, error)
8028}
8029
8030// ExpressRouteCircuitsListRoutesTableFuture an abstraction for monitoring and retrieving the results of a
8031// long-running operation.
8032type ExpressRouteCircuitsListRoutesTableFuture struct {
8033	azure.FutureAPI
8034	// Result returns the result of the asynchronous operation.
8035	// If the operation has not completed it will return an error.
8036	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsRoutesTableListResult, error)
8037}
8038
8039// ExpressRouteCircuitsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving the
8040// results of a long-running operation.
8041type ExpressRouteCircuitsListRoutesTableSummaryFuture struct {
8042	azure.FutureAPI
8043	// Result returns the result of the asynchronous operation.
8044	// If the operation has not completed it will return an error.
8045	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsRoutesTableSummaryListResult, error)
8046}
8047
8048// ExpressRouteCircuitsRoutesTableListResult response for ListRoutesTable associated with the Express Route
8049// Circuits API.
8050type ExpressRouteCircuitsRoutesTableListResult struct {
8051	autorest.Response `json:"-"`
8052	// Value - The list of routes table.
8053	Value *[]ExpressRouteCircuitRoutesTable `json:"value,omitempty"`
8054	// NextLink - The URL to get the next set of results.
8055	NextLink *string `json:"nextLink,omitempty"`
8056}
8057
8058// ExpressRouteCircuitsRoutesTableSummaryListResult response for ListRoutesTable associated with the
8059// Express Route Circuits API.
8060type ExpressRouteCircuitsRoutesTableSummaryListResult struct {
8061	autorest.Response `json:"-"`
8062	// Value - A list of the routes table.
8063	Value *[]ExpressRouteCircuitRoutesTableSummary `json:"value,omitempty"`
8064	// NextLink - The URL to get the next set of results.
8065	NextLink *string `json:"nextLink,omitempty"`
8066}
8067
8068// ExpressRouteCircuitStats contains stats associated with the peering.
8069type ExpressRouteCircuitStats struct {
8070	autorest.Response `json:"-"`
8071	// PrimarybytesIn - Gets BytesIn of the peering.
8072	PrimarybytesIn *int64 `json:"primarybytesIn,omitempty"`
8073	// PrimarybytesOut - Gets BytesOut of the peering.
8074	PrimarybytesOut *int64 `json:"primarybytesOut,omitempty"`
8075	// SecondarybytesIn - Gets BytesIn of the peering.
8076	SecondarybytesIn *int64 `json:"secondarybytesIn,omitempty"`
8077	// SecondarybytesOut - Gets BytesOut of the peering.
8078	SecondarybytesOut *int64 `json:"secondarybytesOut,omitempty"`
8079}
8080
8081// ExpressRouteCircuitsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
8082// long-running operation.
8083type ExpressRouteCircuitsUpdateTagsFuture struct {
8084	azure.FutureAPI
8085	// Result returns the result of the asynchronous operation.
8086	// If the operation has not completed it will return an error.
8087	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuit, error)
8088}
8089
8090// ExpressRouteConnection expressRouteConnection resource.
8091type ExpressRouteConnection struct {
8092	autorest.Response                 `json:"-"`
8093	*ExpressRouteConnectionProperties `json:"properties,omitempty"`
8094	// Name - The name of the resource.
8095	Name *string `json:"name,omitempty"`
8096	// ID - Resource ID.
8097	ID *string `json:"id,omitempty"`
8098}
8099
8100// MarshalJSON is the custom marshaler for ExpressRouteConnection.
8101func (erc ExpressRouteConnection) MarshalJSON() ([]byte, error) {
8102	objectMap := make(map[string]interface{})
8103	if erc.ExpressRouteConnectionProperties != nil {
8104		objectMap["properties"] = erc.ExpressRouteConnectionProperties
8105	}
8106	if erc.Name != nil {
8107		objectMap["name"] = erc.Name
8108	}
8109	if erc.ID != nil {
8110		objectMap["id"] = erc.ID
8111	}
8112	return json.Marshal(objectMap)
8113}
8114
8115// UnmarshalJSON is the custom unmarshaler for ExpressRouteConnection struct.
8116func (erc *ExpressRouteConnection) UnmarshalJSON(body []byte) error {
8117	var m map[string]*json.RawMessage
8118	err := json.Unmarshal(body, &m)
8119	if err != nil {
8120		return err
8121	}
8122	for k, v := range m {
8123		switch k {
8124		case "properties":
8125			if v != nil {
8126				var expressRouteConnectionProperties ExpressRouteConnectionProperties
8127				err = json.Unmarshal(*v, &expressRouteConnectionProperties)
8128				if err != nil {
8129					return err
8130				}
8131				erc.ExpressRouteConnectionProperties = &expressRouteConnectionProperties
8132			}
8133		case "name":
8134			if v != nil {
8135				var name string
8136				err = json.Unmarshal(*v, &name)
8137				if err != nil {
8138					return err
8139				}
8140				erc.Name = &name
8141			}
8142		case "id":
8143			if v != nil {
8144				var ID string
8145				err = json.Unmarshal(*v, &ID)
8146				if err != nil {
8147					return err
8148				}
8149				erc.ID = &ID
8150			}
8151		}
8152	}
8153
8154	return nil
8155}
8156
8157// ExpressRouteConnectionID the ID of the ExpressRouteConnection.
8158type ExpressRouteConnectionID struct {
8159	// ID - READ-ONLY; The ID of the ExpressRouteConnection.
8160	ID *string `json:"id,omitempty"`
8161}
8162
8163// ExpressRouteConnectionList expressRouteConnection list
8164type ExpressRouteConnectionList struct {
8165	autorest.Response `json:"-"`
8166	// Value - The list of ExpressRoute connections
8167	Value *[]ExpressRouteConnection `json:"value,omitempty"`
8168}
8169
8170// ExpressRouteConnectionProperties properties of the ExpressRouteConnection subresource.
8171type ExpressRouteConnectionProperties struct {
8172	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
8173	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
8174	// ExpressRouteCircuitPeering - The ExpressRoute circuit peering.
8175	ExpressRouteCircuitPeering *ExpressRouteCircuitPeeringID `json:"expressRouteCircuitPeering,omitempty"`
8176	// AuthorizationKey - Authorization key to establish the connection.
8177	AuthorizationKey *string `json:"authorizationKey,omitempty"`
8178	// RoutingWeight - The routing weight associated to the connection.
8179	RoutingWeight *int32 `json:"routingWeight,omitempty"`
8180}
8181
8182// MarshalJSON is the custom marshaler for ExpressRouteConnectionProperties.
8183func (ercp ExpressRouteConnectionProperties) MarshalJSON() ([]byte, error) {
8184	objectMap := make(map[string]interface{})
8185	if ercp.ExpressRouteCircuitPeering != nil {
8186		objectMap["expressRouteCircuitPeering"] = ercp.ExpressRouteCircuitPeering
8187	}
8188	if ercp.AuthorizationKey != nil {
8189		objectMap["authorizationKey"] = ercp.AuthorizationKey
8190	}
8191	if ercp.RoutingWeight != nil {
8192		objectMap["routingWeight"] = ercp.RoutingWeight
8193	}
8194	return json.Marshal(objectMap)
8195}
8196
8197// ExpressRouteConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
8198// a long-running operation.
8199type ExpressRouteConnectionsCreateOrUpdateFuture struct {
8200	azure.FutureAPI
8201	// Result returns the result of the asynchronous operation.
8202	// If the operation has not completed it will return an error.
8203	Result func(ExpressRouteConnectionsClient) (ExpressRouteConnection, error)
8204}
8205
8206// ExpressRouteConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a
8207// long-running operation.
8208type ExpressRouteConnectionsDeleteFuture struct {
8209	azure.FutureAPI
8210	// Result returns the result of the asynchronous operation.
8211	// If the operation has not completed it will return an error.
8212	Result func(ExpressRouteConnectionsClient) (autorest.Response, error)
8213}
8214
8215// ExpressRouteCrossConnection expressRouteCrossConnection resource
8216type ExpressRouteCrossConnection struct {
8217	autorest.Response                      `json:"-"`
8218	*ExpressRouteCrossConnectionProperties `json:"properties,omitempty"`
8219	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
8220	Etag *string `json:"etag,omitempty"`
8221	// ID - Resource ID.
8222	ID *string `json:"id,omitempty"`
8223	// Name - READ-ONLY; Resource name.
8224	Name *string `json:"name,omitempty"`
8225	// Type - READ-ONLY; Resource type.
8226	Type *string `json:"type,omitempty"`
8227	// Location - Resource location.
8228	Location *string `json:"location,omitempty"`
8229	// Tags - Resource tags.
8230	Tags map[string]*string `json:"tags"`
8231}
8232
8233// MarshalJSON is the custom marshaler for ExpressRouteCrossConnection.
8234func (ercc ExpressRouteCrossConnection) MarshalJSON() ([]byte, error) {
8235	objectMap := make(map[string]interface{})
8236	if ercc.ExpressRouteCrossConnectionProperties != nil {
8237		objectMap["properties"] = ercc.ExpressRouteCrossConnectionProperties
8238	}
8239	if ercc.ID != nil {
8240		objectMap["id"] = ercc.ID
8241	}
8242	if ercc.Location != nil {
8243		objectMap["location"] = ercc.Location
8244	}
8245	if ercc.Tags != nil {
8246		objectMap["tags"] = ercc.Tags
8247	}
8248	return json.Marshal(objectMap)
8249}
8250
8251// UnmarshalJSON is the custom unmarshaler for ExpressRouteCrossConnection struct.
8252func (ercc *ExpressRouteCrossConnection) UnmarshalJSON(body []byte) error {
8253	var m map[string]*json.RawMessage
8254	err := json.Unmarshal(body, &m)
8255	if err != nil {
8256		return err
8257	}
8258	for k, v := range m {
8259		switch k {
8260		case "properties":
8261			if v != nil {
8262				var expressRouteCrossConnectionProperties ExpressRouteCrossConnectionProperties
8263				err = json.Unmarshal(*v, &expressRouteCrossConnectionProperties)
8264				if err != nil {
8265					return err
8266				}
8267				ercc.ExpressRouteCrossConnectionProperties = &expressRouteCrossConnectionProperties
8268			}
8269		case "etag":
8270			if v != nil {
8271				var etag string
8272				err = json.Unmarshal(*v, &etag)
8273				if err != nil {
8274					return err
8275				}
8276				ercc.Etag = &etag
8277			}
8278		case "id":
8279			if v != nil {
8280				var ID string
8281				err = json.Unmarshal(*v, &ID)
8282				if err != nil {
8283					return err
8284				}
8285				ercc.ID = &ID
8286			}
8287		case "name":
8288			if v != nil {
8289				var name string
8290				err = json.Unmarshal(*v, &name)
8291				if err != nil {
8292					return err
8293				}
8294				ercc.Name = &name
8295			}
8296		case "type":
8297			if v != nil {
8298				var typeVar string
8299				err = json.Unmarshal(*v, &typeVar)
8300				if err != nil {
8301					return err
8302				}
8303				ercc.Type = &typeVar
8304			}
8305		case "location":
8306			if v != nil {
8307				var location string
8308				err = json.Unmarshal(*v, &location)
8309				if err != nil {
8310					return err
8311				}
8312				ercc.Location = &location
8313			}
8314		case "tags":
8315			if v != nil {
8316				var tags map[string]*string
8317				err = json.Unmarshal(*v, &tags)
8318				if err != nil {
8319					return err
8320				}
8321				ercc.Tags = tags
8322			}
8323		}
8324	}
8325
8326	return nil
8327}
8328
8329// ExpressRouteCrossConnectionListResult response for ListExpressRouteCrossConnection API service call.
8330type ExpressRouteCrossConnectionListResult struct {
8331	autorest.Response `json:"-"`
8332	// Value - A list of ExpressRouteCrossConnection resources.
8333	Value *[]ExpressRouteCrossConnection `json:"value,omitempty"`
8334	// NextLink - READ-ONLY; The URL to get the next set of results.
8335	NextLink *string `json:"nextLink,omitempty"`
8336}
8337
8338// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionListResult.
8339func (ercclr ExpressRouteCrossConnectionListResult) MarshalJSON() ([]byte, error) {
8340	objectMap := make(map[string]interface{})
8341	if ercclr.Value != nil {
8342		objectMap["value"] = ercclr.Value
8343	}
8344	return json.Marshal(objectMap)
8345}
8346
8347// ExpressRouteCrossConnectionListResultIterator provides access to a complete listing of
8348// ExpressRouteCrossConnection values.
8349type ExpressRouteCrossConnectionListResultIterator struct {
8350	i    int
8351	page ExpressRouteCrossConnectionListResultPage
8352}
8353
8354// NextWithContext advances to the next value.  If there was an error making
8355// the request the iterator does not advance and the error is returned.
8356func (iter *ExpressRouteCrossConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
8357	if tracing.IsEnabled() {
8358		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionListResultIterator.NextWithContext")
8359		defer func() {
8360			sc := -1
8361			if iter.Response().Response.Response != nil {
8362				sc = iter.Response().Response.Response.StatusCode
8363			}
8364			tracing.EndSpan(ctx, sc, err)
8365		}()
8366	}
8367	iter.i++
8368	if iter.i < len(iter.page.Values()) {
8369		return nil
8370	}
8371	err = iter.page.NextWithContext(ctx)
8372	if err != nil {
8373		iter.i--
8374		return err
8375	}
8376	iter.i = 0
8377	return nil
8378}
8379
8380// Next advances to the next value.  If there was an error making
8381// the request the iterator does not advance and the error is returned.
8382// Deprecated: Use NextWithContext() instead.
8383func (iter *ExpressRouteCrossConnectionListResultIterator) Next() error {
8384	return iter.NextWithContext(context.Background())
8385}
8386
8387// NotDone returns true if the enumeration should be started or is not yet complete.
8388func (iter ExpressRouteCrossConnectionListResultIterator) NotDone() bool {
8389	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8390}
8391
8392// Response returns the raw server response from the last page request.
8393func (iter ExpressRouteCrossConnectionListResultIterator) Response() ExpressRouteCrossConnectionListResult {
8394	return iter.page.Response()
8395}
8396
8397// Value returns the current value or a zero-initialized value if the
8398// iterator has advanced beyond the end of the collection.
8399func (iter ExpressRouteCrossConnectionListResultIterator) Value() ExpressRouteCrossConnection {
8400	if !iter.page.NotDone() {
8401		return ExpressRouteCrossConnection{}
8402	}
8403	return iter.page.Values()[iter.i]
8404}
8405
8406// Creates a new instance of the ExpressRouteCrossConnectionListResultIterator type.
8407func NewExpressRouteCrossConnectionListResultIterator(page ExpressRouteCrossConnectionListResultPage) ExpressRouteCrossConnectionListResultIterator {
8408	return ExpressRouteCrossConnectionListResultIterator{page: page}
8409}
8410
8411// IsEmpty returns true if the ListResult contains no values.
8412func (ercclr ExpressRouteCrossConnectionListResult) IsEmpty() bool {
8413	return ercclr.Value == nil || len(*ercclr.Value) == 0
8414}
8415
8416// hasNextLink returns true if the NextLink is not empty.
8417func (ercclr ExpressRouteCrossConnectionListResult) hasNextLink() bool {
8418	return ercclr.NextLink != nil && len(*ercclr.NextLink) != 0
8419}
8420
8421// expressRouteCrossConnectionListResultPreparer prepares a request to retrieve the next set of results.
8422// It returns nil if no more results exist.
8423func (ercclr ExpressRouteCrossConnectionListResult) expressRouteCrossConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
8424	if !ercclr.hasNextLink() {
8425		return nil, nil
8426	}
8427	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8428		autorest.AsJSON(),
8429		autorest.AsGet(),
8430		autorest.WithBaseURL(to.String(ercclr.NextLink)))
8431}
8432
8433// ExpressRouteCrossConnectionListResultPage contains a page of ExpressRouteCrossConnection values.
8434type ExpressRouteCrossConnectionListResultPage struct {
8435	fn     func(context.Context, ExpressRouteCrossConnectionListResult) (ExpressRouteCrossConnectionListResult, error)
8436	ercclr ExpressRouteCrossConnectionListResult
8437}
8438
8439// NextWithContext advances to the next page of values.  If there was an error making
8440// the request the page does not advance and the error is returned.
8441func (page *ExpressRouteCrossConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
8442	if tracing.IsEnabled() {
8443		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionListResultPage.NextWithContext")
8444		defer func() {
8445			sc := -1
8446			if page.Response().Response.Response != nil {
8447				sc = page.Response().Response.Response.StatusCode
8448			}
8449			tracing.EndSpan(ctx, sc, err)
8450		}()
8451	}
8452	for {
8453		next, err := page.fn(ctx, page.ercclr)
8454		if err != nil {
8455			return err
8456		}
8457		page.ercclr = next
8458		if !next.hasNextLink() || !next.IsEmpty() {
8459			break
8460		}
8461	}
8462	return nil
8463}
8464
8465// Next advances to the next page of values.  If there was an error making
8466// the request the page does not advance and the error is returned.
8467// Deprecated: Use NextWithContext() instead.
8468func (page *ExpressRouteCrossConnectionListResultPage) Next() error {
8469	return page.NextWithContext(context.Background())
8470}
8471
8472// NotDone returns true if the page enumeration should be started or is not yet complete.
8473func (page ExpressRouteCrossConnectionListResultPage) NotDone() bool {
8474	return !page.ercclr.IsEmpty()
8475}
8476
8477// Response returns the raw server response from the last page request.
8478func (page ExpressRouteCrossConnectionListResultPage) Response() ExpressRouteCrossConnectionListResult {
8479	return page.ercclr
8480}
8481
8482// Values returns the slice of values for the current page or nil if there are no values.
8483func (page ExpressRouteCrossConnectionListResultPage) Values() []ExpressRouteCrossConnection {
8484	if page.ercclr.IsEmpty() {
8485		return nil
8486	}
8487	return *page.ercclr.Value
8488}
8489
8490// Creates a new instance of the ExpressRouteCrossConnectionListResultPage type.
8491func NewExpressRouteCrossConnectionListResultPage(cur ExpressRouteCrossConnectionListResult, getNextPage func(context.Context, ExpressRouteCrossConnectionListResult) (ExpressRouteCrossConnectionListResult, error)) ExpressRouteCrossConnectionListResultPage {
8492	return ExpressRouteCrossConnectionListResultPage{
8493		fn:     getNextPage,
8494		ercclr: cur,
8495	}
8496}
8497
8498// ExpressRouteCrossConnectionPeering peering in an ExpressRoute Cross Connection resource.
8499type ExpressRouteCrossConnectionPeering struct {
8500	autorest.Response                             `json:"-"`
8501	*ExpressRouteCrossConnectionPeeringProperties `json:"properties,omitempty"`
8502	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
8503	Name *string `json:"name,omitempty"`
8504	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
8505	Etag *string `json:"etag,omitempty"`
8506	// ID - Resource ID.
8507	ID *string `json:"id,omitempty"`
8508}
8509
8510// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeering.
8511func (erccp ExpressRouteCrossConnectionPeering) MarshalJSON() ([]byte, error) {
8512	objectMap := make(map[string]interface{})
8513	if erccp.ExpressRouteCrossConnectionPeeringProperties != nil {
8514		objectMap["properties"] = erccp.ExpressRouteCrossConnectionPeeringProperties
8515	}
8516	if erccp.Name != nil {
8517		objectMap["name"] = erccp.Name
8518	}
8519	if erccp.ID != nil {
8520		objectMap["id"] = erccp.ID
8521	}
8522	return json.Marshal(objectMap)
8523}
8524
8525// UnmarshalJSON is the custom unmarshaler for ExpressRouteCrossConnectionPeering struct.
8526func (erccp *ExpressRouteCrossConnectionPeering) UnmarshalJSON(body []byte) error {
8527	var m map[string]*json.RawMessage
8528	err := json.Unmarshal(body, &m)
8529	if err != nil {
8530		return err
8531	}
8532	for k, v := range m {
8533		switch k {
8534		case "properties":
8535			if v != nil {
8536				var expressRouteCrossConnectionPeeringProperties ExpressRouteCrossConnectionPeeringProperties
8537				err = json.Unmarshal(*v, &expressRouteCrossConnectionPeeringProperties)
8538				if err != nil {
8539					return err
8540				}
8541				erccp.ExpressRouteCrossConnectionPeeringProperties = &expressRouteCrossConnectionPeeringProperties
8542			}
8543		case "name":
8544			if v != nil {
8545				var name string
8546				err = json.Unmarshal(*v, &name)
8547				if err != nil {
8548					return err
8549				}
8550				erccp.Name = &name
8551			}
8552		case "etag":
8553			if v != nil {
8554				var etag string
8555				err = json.Unmarshal(*v, &etag)
8556				if err != nil {
8557					return err
8558				}
8559				erccp.Etag = &etag
8560			}
8561		case "id":
8562			if v != nil {
8563				var ID string
8564				err = json.Unmarshal(*v, &ID)
8565				if err != nil {
8566					return err
8567				}
8568				erccp.ID = &ID
8569			}
8570		}
8571	}
8572
8573	return nil
8574}
8575
8576// ExpressRouteCrossConnectionPeeringList response for ListPeering API service call retrieves all peerings
8577// that belong to an ExpressRouteCrossConnection.
8578type ExpressRouteCrossConnectionPeeringList struct {
8579	autorest.Response `json:"-"`
8580	// Value - The peerings in an express route cross connection.
8581	Value *[]ExpressRouteCrossConnectionPeering `json:"value,omitempty"`
8582	// NextLink - READ-ONLY; The URL to get the next set of results.
8583	NextLink *string `json:"nextLink,omitempty"`
8584}
8585
8586// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeeringList.
8587func (erccpl ExpressRouteCrossConnectionPeeringList) MarshalJSON() ([]byte, error) {
8588	objectMap := make(map[string]interface{})
8589	if erccpl.Value != nil {
8590		objectMap["value"] = erccpl.Value
8591	}
8592	return json.Marshal(objectMap)
8593}
8594
8595// ExpressRouteCrossConnectionPeeringListIterator provides access to a complete listing of
8596// ExpressRouteCrossConnectionPeering values.
8597type ExpressRouteCrossConnectionPeeringListIterator struct {
8598	i    int
8599	page ExpressRouteCrossConnectionPeeringListPage
8600}
8601
8602// NextWithContext advances to the next value.  If there was an error making
8603// the request the iterator does not advance and the error is returned.
8604func (iter *ExpressRouteCrossConnectionPeeringListIterator) NextWithContext(ctx context.Context) (err error) {
8605	if tracing.IsEnabled() {
8606		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringListIterator.NextWithContext")
8607		defer func() {
8608			sc := -1
8609			if iter.Response().Response.Response != nil {
8610				sc = iter.Response().Response.Response.StatusCode
8611			}
8612			tracing.EndSpan(ctx, sc, err)
8613		}()
8614	}
8615	iter.i++
8616	if iter.i < len(iter.page.Values()) {
8617		return nil
8618	}
8619	err = iter.page.NextWithContext(ctx)
8620	if err != nil {
8621		iter.i--
8622		return err
8623	}
8624	iter.i = 0
8625	return nil
8626}
8627
8628// Next advances to the next value.  If there was an error making
8629// the request the iterator does not advance and the error is returned.
8630// Deprecated: Use NextWithContext() instead.
8631func (iter *ExpressRouteCrossConnectionPeeringListIterator) Next() error {
8632	return iter.NextWithContext(context.Background())
8633}
8634
8635// NotDone returns true if the enumeration should be started or is not yet complete.
8636func (iter ExpressRouteCrossConnectionPeeringListIterator) NotDone() bool {
8637	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8638}
8639
8640// Response returns the raw server response from the last page request.
8641func (iter ExpressRouteCrossConnectionPeeringListIterator) Response() ExpressRouteCrossConnectionPeeringList {
8642	return iter.page.Response()
8643}
8644
8645// Value returns the current value or a zero-initialized value if the
8646// iterator has advanced beyond the end of the collection.
8647func (iter ExpressRouteCrossConnectionPeeringListIterator) Value() ExpressRouteCrossConnectionPeering {
8648	if !iter.page.NotDone() {
8649		return ExpressRouteCrossConnectionPeering{}
8650	}
8651	return iter.page.Values()[iter.i]
8652}
8653
8654// Creates a new instance of the ExpressRouteCrossConnectionPeeringListIterator type.
8655func NewExpressRouteCrossConnectionPeeringListIterator(page ExpressRouteCrossConnectionPeeringListPage) ExpressRouteCrossConnectionPeeringListIterator {
8656	return ExpressRouteCrossConnectionPeeringListIterator{page: page}
8657}
8658
8659// IsEmpty returns true if the ListResult contains no values.
8660func (erccpl ExpressRouteCrossConnectionPeeringList) IsEmpty() bool {
8661	return erccpl.Value == nil || len(*erccpl.Value) == 0
8662}
8663
8664// hasNextLink returns true if the NextLink is not empty.
8665func (erccpl ExpressRouteCrossConnectionPeeringList) hasNextLink() bool {
8666	return erccpl.NextLink != nil && len(*erccpl.NextLink) != 0
8667}
8668
8669// expressRouteCrossConnectionPeeringListPreparer prepares a request to retrieve the next set of results.
8670// It returns nil if no more results exist.
8671func (erccpl ExpressRouteCrossConnectionPeeringList) expressRouteCrossConnectionPeeringListPreparer(ctx context.Context) (*http.Request, error) {
8672	if !erccpl.hasNextLink() {
8673		return nil, nil
8674	}
8675	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8676		autorest.AsJSON(),
8677		autorest.AsGet(),
8678		autorest.WithBaseURL(to.String(erccpl.NextLink)))
8679}
8680
8681// ExpressRouteCrossConnectionPeeringListPage contains a page of ExpressRouteCrossConnectionPeering values.
8682type ExpressRouteCrossConnectionPeeringListPage struct {
8683	fn     func(context.Context, ExpressRouteCrossConnectionPeeringList) (ExpressRouteCrossConnectionPeeringList, error)
8684	erccpl ExpressRouteCrossConnectionPeeringList
8685}
8686
8687// NextWithContext advances to the next page of values.  If there was an error making
8688// the request the page does not advance and the error is returned.
8689func (page *ExpressRouteCrossConnectionPeeringListPage) NextWithContext(ctx context.Context) (err error) {
8690	if tracing.IsEnabled() {
8691		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringListPage.NextWithContext")
8692		defer func() {
8693			sc := -1
8694			if page.Response().Response.Response != nil {
8695				sc = page.Response().Response.Response.StatusCode
8696			}
8697			tracing.EndSpan(ctx, sc, err)
8698		}()
8699	}
8700	for {
8701		next, err := page.fn(ctx, page.erccpl)
8702		if err != nil {
8703			return err
8704		}
8705		page.erccpl = next
8706		if !next.hasNextLink() || !next.IsEmpty() {
8707			break
8708		}
8709	}
8710	return nil
8711}
8712
8713// Next advances to the next page of values.  If there was an error making
8714// the request the page does not advance and the error is returned.
8715// Deprecated: Use NextWithContext() instead.
8716func (page *ExpressRouteCrossConnectionPeeringListPage) Next() error {
8717	return page.NextWithContext(context.Background())
8718}
8719
8720// NotDone returns true if the page enumeration should be started or is not yet complete.
8721func (page ExpressRouteCrossConnectionPeeringListPage) NotDone() bool {
8722	return !page.erccpl.IsEmpty()
8723}
8724
8725// Response returns the raw server response from the last page request.
8726func (page ExpressRouteCrossConnectionPeeringListPage) Response() ExpressRouteCrossConnectionPeeringList {
8727	return page.erccpl
8728}
8729
8730// Values returns the slice of values for the current page or nil if there are no values.
8731func (page ExpressRouteCrossConnectionPeeringListPage) Values() []ExpressRouteCrossConnectionPeering {
8732	if page.erccpl.IsEmpty() {
8733		return nil
8734	}
8735	return *page.erccpl.Value
8736}
8737
8738// Creates a new instance of the ExpressRouteCrossConnectionPeeringListPage type.
8739func NewExpressRouteCrossConnectionPeeringListPage(cur ExpressRouteCrossConnectionPeeringList, getNextPage func(context.Context, ExpressRouteCrossConnectionPeeringList) (ExpressRouteCrossConnectionPeeringList, error)) ExpressRouteCrossConnectionPeeringListPage {
8740	return ExpressRouteCrossConnectionPeeringListPage{
8741		fn:     getNextPage,
8742		erccpl: cur,
8743	}
8744}
8745
8746// ExpressRouteCrossConnectionPeeringProperties ...
8747type ExpressRouteCrossConnectionPeeringProperties struct {
8748	// PeeringType - The peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'
8749	PeeringType ExpressRoutePeeringType `json:"peeringType,omitempty"`
8750	// State - The peering state. Possible values include: 'ExpressRoutePeeringStateDisabled', 'ExpressRoutePeeringStateEnabled'
8751	State ExpressRoutePeeringState `json:"state,omitempty"`
8752	// AzureASN - READ-ONLY; The Azure ASN.
8753	AzureASN *int32 `json:"azureASN,omitempty"`
8754	// PeerASN - The peer ASN.
8755	PeerASN *int64 `json:"peerASN,omitempty"`
8756	// PrimaryPeerAddressPrefix - The primary address prefix.
8757	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
8758	// SecondaryPeerAddressPrefix - The secondary address prefix.
8759	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
8760	// PrimaryAzurePort - READ-ONLY; The primary port.
8761	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
8762	// SecondaryAzurePort - READ-ONLY; The secondary port.
8763	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
8764	// SharedKey - The shared key.
8765	SharedKey *string `json:"sharedKey,omitempty"`
8766	// VlanID - The VLAN ID.
8767	VlanID *int32 `json:"vlanId,omitempty"`
8768	// MicrosoftPeeringConfig - The Microsoft peering configuration.
8769	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
8770	// ProvisioningState - READ-ONLY; Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
8771	ProvisioningState *string `json:"provisioningState,omitempty"`
8772	// GatewayManagerEtag - The GatewayManager Etag.
8773	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
8774	// LastModifiedBy - Gets whether the provider or the customer last modified the peering.
8775	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
8776	// Ipv6PeeringConfig - The IPv6 peering configuration.
8777	Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"`
8778}
8779
8780// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeeringProperties.
8781func (erccpp ExpressRouteCrossConnectionPeeringProperties) MarshalJSON() ([]byte, error) {
8782	objectMap := make(map[string]interface{})
8783	if erccpp.PeeringType != "" {
8784		objectMap["peeringType"] = erccpp.PeeringType
8785	}
8786	if erccpp.State != "" {
8787		objectMap["state"] = erccpp.State
8788	}
8789	if erccpp.PeerASN != nil {
8790		objectMap["peerASN"] = erccpp.PeerASN
8791	}
8792	if erccpp.PrimaryPeerAddressPrefix != nil {
8793		objectMap["primaryPeerAddressPrefix"] = erccpp.PrimaryPeerAddressPrefix
8794	}
8795	if erccpp.SecondaryPeerAddressPrefix != nil {
8796		objectMap["secondaryPeerAddressPrefix"] = erccpp.SecondaryPeerAddressPrefix
8797	}
8798	if erccpp.SharedKey != nil {
8799		objectMap["sharedKey"] = erccpp.SharedKey
8800	}
8801	if erccpp.VlanID != nil {
8802		objectMap["vlanId"] = erccpp.VlanID
8803	}
8804	if erccpp.MicrosoftPeeringConfig != nil {
8805		objectMap["microsoftPeeringConfig"] = erccpp.MicrosoftPeeringConfig
8806	}
8807	if erccpp.GatewayManagerEtag != nil {
8808		objectMap["gatewayManagerEtag"] = erccpp.GatewayManagerEtag
8809	}
8810	if erccpp.LastModifiedBy != nil {
8811		objectMap["lastModifiedBy"] = erccpp.LastModifiedBy
8812	}
8813	if erccpp.Ipv6PeeringConfig != nil {
8814		objectMap["ipv6PeeringConfig"] = erccpp.Ipv6PeeringConfig
8815	}
8816	return json.Marshal(objectMap)
8817}
8818
8819// ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
8820// results of a long-running operation.
8821type ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture struct {
8822	azure.FutureAPI
8823	// Result returns the result of the asynchronous operation.
8824	// If the operation has not completed it will return an error.
8825	Result func(ExpressRouteCrossConnectionPeeringsClient) (ExpressRouteCrossConnectionPeering, error)
8826}
8827
8828// ExpressRouteCrossConnectionPeeringsDeleteFuture an abstraction for monitoring and retrieving the results
8829// of a long-running operation.
8830type ExpressRouteCrossConnectionPeeringsDeleteFuture struct {
8831	azure.FutureAPI
8832	// Result returns the result of the asynchronous operation.
8833	// If the operation has not completed it will return an error.
8834	Result func(ExpressRouteCrossConnectionPeeringsClient) (autorest.Response, error)
8835}
8836
8837// ExpressRouteCrossConnectionProperties properties of ExpressRouteCrossConnection.
8838type ExpressRouteCrossConnectionProperties struct {
8839	// PrimaryAzurePort - READ-ONLY; The name of the primary  port.
8840	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
8841	// SecondaryAzurePort - READ-ONLY; The name of the secondary  port.
8842	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
8843	// STag - READ-ONLY; The identifier of the circuit traffic.
8844	STag *int32 `json:"sTag,omitempty"`
8845	// PeeringLocation - The peering location of the ExpressRoute circuit.
8846	PeeringLocation *string `json:"peeringLocation,omitempty"`
8847	// BandwidthInMbps - The circuit bandwidth In Mbps.
8848	BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"`
8849	// ExpressRouteCircuit - The ExpressRouteCircuit
8850	ExpressRouteCircuit *ExpressRouteCircuitReference `json:"expressRouteCircuit,omitempty"`
8851	// ServiceProviderProvisioningState - The provisioning state of the circuit in the connectivity provider system. Possible values are 'NotProvisioned', 'Provisioning', 'Provisioned'. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning'
8852	ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"`
8853	// ServiceProviderNotes - Additional read only notes set by the connectivity provider.
8854	ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"`
8855	// ProvisioningState - READ-ONLY; Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
8856	ProvisioningState *string `json:"provisioningState,omitempty"`
8857	// Peerings - The list of peerings.
8858	Peerings *[]ExpressRouteCrossConnectionPeering `json:"peerings,omitempty"`
8859}
8860
8861// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionProperties.
8862func (erccp ExpressRouteCrossConnectionProperties) MarshalJSON() ([]byte, error) {
8863	objectMap := make(map[string]interface{})
8864	if erccp.PeeringLocation != nil {
8865		objectMap["peeringLocation"] = erccp.PeeringLocation
8866	}
8867	if erccp.BandwidthInMbps != nil {
8868		objectMap["bandwidthInMbps"] = erccp.BandwidthInMbps
8869	}
8870	if erccp.ExpressRouteCircuit != nil {
8871		objectMap["expressRouteCircuit"] = erccp.ExpressRouteCircuit
8872	}
8873	if erccp.ServiceProviderProvisioningState != "" {
8874		objectMap["serviceProviderProvisioningState"] = erccp.ServiceProviderProvisioningState
8875	}
8876	if erccp.ServiceProviderNotes != nil {
8877		objectMap["serviceProviderNotes"] = erccp.ServiceProviderNotes
8878	}
8879	if erccp.Peerings != nil {
8880		objectMap["peerings"] = erccp.Peerings
8881	}
8882	return json.Marshal(objectMap)
8883}
8884
8885// ExpressRouteCrossConnectionRoutesTableSummary the routes table associated with the ExpressRouteCircuit.
8886type ExpressRouteCrossConnectionRoutesTableSummary struct {
8887	// Neighbor - IP address of Neighbor router
8888	Neighbor *string `json:"neighbor,omitempty"`
8889	// Asn - Autonomous system number.
8890	Asn *int32 `json:"asn,omitempty"`
8891	// 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.
8892	UpDown *string `json:"upDown,omitempty"`
8893	// StateOrPrefixesReceived - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group.
8894	StateOrPrefixesReceived *string `json:"stateOrPrefixesReceived,omitempty"`
8895}
8896
8897// ExpressRouteCrossConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
8898// results of a long-running operation.
8899type ExpressRouteCrossConnectionsCreateOrUpdateFuture struct {
8900	azure.FutureAPI
8901	// Result returns the result of the asynchronous operation.
8902	// If the operation has not completed it will return an error.
8903	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCrossConnection, error)
8904}
8905
8906// ExpressRouteCrossConnectionsListArpTableFuture an abstraction for monitoring and retrieving the results
8907// of a long-running operation.
8908type ExpressRouteCrossConnectionsListArpTableFuture struct {
8909	azure.FutureAPI
8910	// Result returns the result of the asynchronous operation.
8911	// If the operation has not completed it will return an error.
8912	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCircuitsArpTableListResult, error)
8913}
8914
8915// ExpressRouteCrossConnectionsListRoutesTableFuture an abstraction for monitoring and retrieving the
8916// results of a long-running operation.
8917type ExpressRouteCrossConnectionsListRoutesTableFuture struct {
8918	azure.FutureAPI
8919	// Result returns the result of the asynchronous operation.
8920	// If the operation has not completed it will return an error.
8921	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCircuitsRoutesTableListResult, error)
8922}
8923
8924// ExpressRouteCrossConnectionsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving
8925// the results of a long-running operation.
8926type ExpressRouteCrossConnectionsListRoutesTableSummaryFuture struct {
8927	azure.FutureAPI
8928	// Result returns the result of the asynchronous operation.
8929	// If the operation has not completed it will return an error.
8930	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCrossConnectionsRoutesTableSummaryListResult, error)
8931}
8932
8933// ExpressRouteCrossConnectionsRoutesTableSummaryListResult response for ListRoutesTable associated with
8934// the Express Route Cross Connections.
8935type ExpressRouteCrossConnectionsRoutesTableSummaryListResult struct {
8936	autorest.Response `json:"-"`
8937	// Value - A list of the routes table.
8938	Value *[]ExpressRouteCrossConnectionRoutesTableSummary `json:"value,omitempty"`
8939	// NextLink - READ-ONLY; The URL to get the next set of results.
8940	NextLink *string `json:"nextLink,omitempty"`
8941}
8942
8943// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionsRoutesTableSummaryListResult.
8944func (erccrtslr ExpressRouteCrossConnectionsRoutesTableSummaryListResult) MarshalJSON() ([]byte, error) {
8945	objectMap := make(map[string]interface{})
8946	if erccrtslr.Value != nil {
8947		objectMap["value"] = erccrtslr.Value
8948	}
8949	return json.Marshal(objectMap)
8950}
8951
8952// ExpressRouteCrossConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the results of
8953// a long-running operation.
8954type ExpressRouteCrossConnectionsUpdateTagsFuture struct {
8955	azure.FutureAPI
8956	// Result returns the result of the asynchronous operation.
8957	// If the operation has not completed it will return an error.
8958	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCrossConnection, error)
8959}
8960
8961// ExpressRouteGateway expressRoute gateway resource.
8962type ExpressRouteGateway struct {
8963	autorest.Response              `json:"-"`
8964	*ExpressRouteGatewayProperties `json:"properties,omitempty"`
8965	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
8966	Etag *string `json:"etag,omitempty"`
8967	// ID - Resource ID.
8968	ID *string `json:"id,omitempty"`
8969	// Name - READ-ONLY; Resource name.
8970	Name *string `json:"name,omitempty"`
8971	// Type - READ-ONLY; Resource type.
8972	Type *string `json:"type,omitempty"`
8973	// Location - Resource location.
8974	Location *string `json:"location,omitempty"`
8975	// Tags - Resource tags.
8976	Tags map[string]*string `json:"tags"`
8977}
8978
8979// MarshalJSON is the custom marshaler for ExpressRouteGateway.
8980func (erg ExpressRouteGateway) MarshalJSON() ([]byte, error) {
8981	objectMap := make(map[string]interface{})
8982	if erg.ExpressRouteGatewayProperties != nil {
8983		objectMap["properties"] = erg.ExpressRouteGatewayProperties
8984	}
8985	if erg.ID != nil {
8986		objectMap["id"] = erg.ID
8987	}
8988	if erg.Location != nil {
8989		objectMap["location"] = erg.Location
8990	}
8991	if erg.Tags != nil {
8992		objectMap["tags"] = erg.Tags
8993	}
8994	return json.Marshal(objectMap)
8995}
8996
8997// UnmarshalJSON is the custom unmarshaler for ExpressRouteGateway struct.
8998func (erg *ExpressRouteGateway) UnmarshalJSON(body []byte) error {
8999	var m map[string]*json.RawMessage
9000	err := json.Unmarshal(body, &m)
9001	if err != nil {
9002		return err
9003	}
9004	for k, v := range m {
9005		switch k {
9006		case "properties":
9007			if v != nil {
9008				var expressRouteGatewayProperties ExpressRouteGatewayProperties
9009				err = json.Unmarshal(*v, &expressRouteGatewayProperties)
9010				if err != nil {
9011					return err
9012				}
9013				erg.ExpressRouteGatewayProperties = &expressRouteGatewayProperties
9014			}
9015		case "etag":
9016			if v != nil {
9017				var etag string
9018				err = json.Unmarshal(*v, &etag)
9019				if err != nil {
9020					return err
9021				}
9022				erg.Etag = &etag
9023			}
9024		case "id":
9025			if v != nil {
9026				var ID string
9027				err = json.Unmarshal(*v, &ID)
9028				if err != nil {
9029					return err
9030				}
9031				erg.ID = &ID
9032			}
9033		case "name":
9034			if v != nil {
9035				var name string
9036				err = json.Unmarshal(*v, &name)
9037				if err != nil {
9038					return err
9039				}
9040				erg.Name = &name
9041			}
9042		case "type":
9043			if v != nil {
9044				var typeVar string
9045				err = json.Unmarshal(*v, &typeVar)
9046				if err != nil {
9047					return err
9048				}
9049				erg.Type = &typeVar
9050			}
9051		case "location":
9052			if v != nil {
9053				var location string
9054				err = json.Unmarshal(*v, &location)
9055				if err != nil {
9056					return err
9057				}
9058				erg.Location = &location
9059			}
9060		case "tags":
9061			if v != nil {
9062				var tags map[string]*string
9063				err = json.Unmarshal(*v, &tags)
9064				if err != nil {
9065					return err
9066				}
9067				erg.Tags = tags
9068			}
9069		}
9070	}
9071
9072	return nil
9073}
9074
9075// ExpressRouteGatewayList list of ExpressRoute gateways.
9076type ExpressRouteGatewayList struct {
9077	autorest.Response `json:"-"`
9078	// Value - List of ExpressRoute gateways.
9079	Value *[]ExpressRouteGateway `json:"value,omitempty"`
9080}
9081
9082// ExpressRouteGatewayProperties expressRoute gateway resource properties.
9083type ExpressRouteGatewayProperties struct {
9084	// AutoScaleConfiguration - Configuration for auto scaling.
9085	AutoScaleConfiguration *ExpressRouteGatewayPropertiesAutoScaleConfiguration `json:"autoScaleConfiguration,omitempty"`
9086	// ExpressRouteConnections - READ-ONLY; List of ExpressRoute connections to the ExpressRoute gateway.
9087	ExpressRouteConnections *[]ExpressRouteConnection `json:"expressRouteConnections,omitempty"`
9088	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
9089	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
9090	// VirtualHub - The Virtual Hub where the ExpressRoute gateway is or will be deployed.
9091	VirtualHub *VirtualHubID `json:"virtualHub,omitempty"`
9092}
9093
9094// MarshalJSON is the custom marshaler for ExpressRouteGatewayProperties.
9095func (ergp ExpressRouteGatewayProperties) MarshalJSON() ([]byte, error) {
9096	objectMap := make(map[string]interface{})
9097	if ergp.AutoScaleConfiguration != nil {
9098		objectMap["autoScaleConfiguration"] = ergp.AutoScaleConfiguration
9099	}
9100	if ergp.VirtualHub != nil {
9101		objectMap["virtualHub"] = ergp.VirtualHub
9102	}
9103	return json.Marshal(objectMap)
9104}
9105
9106// ExpressRouteGatewayPropertiesAutoScaleConfiguration configuration for auto scaling.
9107type ExpressRouteGatewayPropertiesAutoScaleConfiguration struct {
9108	// Bounds - Minimum and maximum number of scale units to deploy.
9109	Bounds *ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds `json:"bounds,omitempty"`
9110}
9111
9112// ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds minimum and maximum number of scale units to
9113// deploy.
9114type ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds struct {
9115	// Min - Minimum number of scale units deployed for ExpressRoute gateway.
9116	Min *int32 `json:"min,omitempty"`
9117	// Max - Maximum number of scale units deployed for ExpressRoute gateway.
9118	Max *int32 `json:"max,omitempty"`
9119}
9120
9121// ExpressRouteGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
9122// long-running operation.
9123type ExpressRouteGatewaysCreateOrUpdateFuture struct {
9124	azure.FutureAPI
9125	// Result returns the result of the asynchronous operation.
9126	// If the operation has not completed it will return an error.
9127	Result func(ExpressRouteGatewaysClient) (ExpressRouteGateway, error)
9128}
9129
9130// ExpressRouteGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
9131// long-running operation.
9132type ExpressRouteGatewaysDeleteFuture struct {
9133	azure.FutureAPI
9134	// Result returns the result of the asynchronous operation.
9135	// If the operation has not completed it will return an error.
9136	Result func(ExpressRouteGatewaysClient) (autorest.Response, error)
9137}
9138
9139// ExpressRouteLink expressRouteLink child resource definition.
9140type ExpressRouteLink struct {
9141	autorest.Response `json:"-"`
9142	// ExpressRouteLinkPropertiesFormat - ExpressRouteLink properties
9143	*ExpressRouteLinkPropertiesFormat `json:"properties,omitempty"`
9144	// Name - Name of child port resource that is unique among child port resources of the parent.
9145	Name *string `json:"name,omitempty"`
9146	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
9147	Etag *string `json:"etag,omitempty"`
9148	// ID - Resource ID.
9149	ID *string `json:"id,omitempty"`
9150}
9151
9152// MarshalJSON is the custom marshaler for ExpressRouteLink.
9153func (erl ExpressRouteLink) MarshalJSON() ([]byte, error) {
9154	objectMap := make(map[string]interface{})
9155	if erl.ExpressRouteLinkPropertiesFormat != nil {
9156		objectMap["properties"] = erl.ExpressRouteLinkPropertiesFormat
9157	}
9158	if erl.Name != nil {
9159		objectMap["name"] = erl.Name
9160	}
9161	if erl.ID != nil {
9162		objectMap["id"] = erl.ID
9163	}
9164	return json.Marshal(objectMap)
9165}
9166
9167// UnmarshalJSON is the custom unmarshaler for ExpressRouteLink struct.
9168func (erl *ExpressRouteLink) UnmarshalJSON(body []byte) error {
9169	var m map[string]*json.RawMessage
9170	err := json.Unmarshal(body, &m)
9171	if err != nil {
9172		return err
9173	}
9174	for k, v := range m {
9175		switch k {
9176		case "properties":
9177			if v != nil {
9178				var expressRouteLinkPropertiesFormat ExpressRouteLinkPropertiesFormat
9179				err = json.Unmarshal(*v, &expressRouteLinkPropertiesFormat)
9180				if err != nil {
9181					return err
9182				}
9183				erl.ExpressRouteLinkPropertiesFormat = &expressRouteLinkPropertiesFormat
9184			}
9185		case "name":
9186			if v != nil {
9187				var name string
9188				err = json.Unmarshal(*v, &name)
9189				if err != nil {
9190					return err
9191				}
9192				erl.Name = &name
9193			}
9194		case "etag":
9195			if v != nil {
9196				var etag string
9197				err = json.Unmarshal(*v, &etag)
9198				if err != nil {
9199					return err
9200				}
9201				erl.Etag = &etag
9202			}
9203		case "id":
9204			if v != nil {
9205				var ID string
9206				err = json.Unmarshal(*v, &ID)
9207				if err != nil {
9208					return err
9209				}
9210				erl.ID = &ID
9211			}
9212		}
9213	}
9214
9215	return nil
9216}
9217
9218// ExpressRouteLinkListResult response for ListExpressRouteLinks API service call.
9219type ExpressRouteLinkListResult struct {
9220	autorest.Response `json:"-"`
9221	// Value - The list of ExpressRouteLink sub-resources.
9222	Value *[]ExpressRouteLink `json:"value,omitempty"`
9223	// NextLink - The URL to get the next set of results.
9224	NextLink *string `json:"nextLink,omitempty"`
9225}
9226
9227// ExpressRouteLinkListResultIterator provides access to a complete listing of ExpressRouteLink values.
9228type ExpressRouteLinkListResultIterator struct {
9229	i    int
9230	page ExpressRouteLinkListResultPage
9231}
9232
9233// NextWithContext advances to the next value.  If there was an error making
9234// the request the iterator does not advance and the error is returned.
9235func (iter *ExpressRouteLinkListResultIterator) NextWithContext(ctx context.Context) (err error) {
9236	if tracing.IsEnabled() {
9237		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteLinkListResultIterator.NextWithContext")
9238		defer func() {
9239			sc := -1
9240			if iter.Response().Response.Response != nil {
9241				sc = iter.Response().Response.Response.StatusCode
9242			}
9243			tracing.EndSpan(ctx, sc, err)
9244		}()
9245	}
9246	iter.i++
9247	if iter.i < len(iter.page.Values()) {
9248		return nil
9249	}
9250	err = iter.page.NextWithContext(ctx)
9251	if err != nil {
9252		iter.i--
9253		return err
9254	}
9255	iter.i = 0
9256	return nil
9257}
9258
9259// Next advances to the next value.  If there was an error making
9260// the request the iterator does not advance and the error is returned.
9261// Deprecated: Use NextWithContext() instead.
9262func (iter *ExpressRouteLinkListResultIterator) Next() error {
9263	return iter.NextWithContext(context.Background())
9264}
9265
9266// NotDone returns true if the enumeration should be started or is not yet complete.
9267func (iter ExpressRouteLinkListResultIterator) NotDone() bool {
9268	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9269}
9270
9271// Response returns the raw server response from the last page request.
9272func (iter ExpressRouteLinkListResultIterator) Response() ExpressRouteLinkListResult {
9273	return iter.page.Response()
9274}
9275
9276// Value returns the current value or a zero-initialized value if the
9277// iterator has advanced beyond the end of the collection.
9278func (iter ExpressRouteLinkListResultIterator) Value() ExpressRouteLink {
9279	if !iter.page.NotDone() {
9280		return ExpressRouteLink{}
9281	}
9282	return iter.page.Values()[iter.i]
9283}
9284
9285// Creates a new instance of the ExpressRouteLinkListResultIterator type.
9286func NewExpressRouteLinkListResultIterator(page ExpressRouteLinkListResultPage) ExpressRouteLinkListResultIterator {
9287	return ExpressRouteLinkListResultIterator{page: page}
9288}
9289
9290// IsEmpty returns true if the ListResult contains no values.
9291func (erllr ExpressRouteLinkListResult) IsEmpty() bool {
9292	return erllr.Value == nil || len(*erllr.Value) == 0
9293}
9294
9295// hasNextLink returns true if the NextLink is not empty.
9296func (erllr ExpressRouteLinkListResult) hasNextLink() bool {
9297	return erllr.NextLink != nil && len(*erllr.NextLink) != 0
9298}
9299
9300// expressRouteLinkListResultPreparer prepares a request to retrieve the next set of results.
9301// It returns nil if no more results exist.
9302func (erllr ExpressRouteLinkListResult) expressRouteLinkListResultPreparer(ctx context.Context) (*http.Request, error) {
9303	if !erllr.hasNextLink() {
9304		return nil, nil
9305	}
9306	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9307		autorest.AsJSON(),
9308		autorest.AsGet(),
9309		autorest.WithBaseURL(to.String(erllr.NextLink)))
9310}
9311
9312// ExpressRouteLinkListResultPage contains a page of ExpressRouteLink values.
9313type ExpressRouteLinkListResultPage struct {
9314	fn    func(context.Context, ExpressRouteLinkListResult) (ExpressRouteLinkListResult, error)
9315	erllr ExpressRouteLinkListResult
9316}
9317
9318// NextWithContext advances to the next page of values.  If there was an error making
9319// the request the page does not advance and the error is returned.
9320func (page *ExpressRouteLinkListResultPage) NextWithContext(ctx context.Context) (err error) {
9321	if tracing.IsEnabled() {
9322		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteLinkListResultPage.NextWithContext")
9323		defer func() {
9324			sc := -1
9325			if page.Response().Response.Response != nil {
9326				sc = page.Response().Response.Response.StatusCode
9327			}
9328			tracing.EndSpan(ctx, sc, err)
9329		}()
9330	}
9331	for {
9332		next, err := page.fn(ctx, page.erllr)
9333		if err != nil {
9334			return err
9335		}
9336		page.erllr = next
9337		if !next.hasNextLink() || !next.IsEmpty() {
9338			break
9339		}
9340	}
9341	return nil
9342}
9343
9344// Next advances to the next page of values.  If there was an error making
9345// the request the page does not advance and the error is returned.
9346// Deprecated: Use NextWithContext() instead.
9347func (page *ExpressRouteLinkListResultPage) Next() error {
9348	return page.NextWithContext(context.Background())
9349}
9350
9351// NotDone returns true if the page enumeration should be started or is not yet complete.
9352func (page ExpressRouteLinkListResultPage) NotDone() bool {
9353	return !page.erllr.IsEmpty()
9354}
9355
9356// Response returns the raw server response from the last page request.
9357func (page ExpressRouteLinkListResultPage) Response() ExpressRouteLinkListResult {
9358	return page.erllr
9359}
9360
9361// Values returns the slice of values for the current page or nil if there are no values.
9362func (page ExpressRouteLinkListResultPage) Values() []ExpressRouteLink {
9363	if page.erllr.IsEmpty() {
9364		return nil
9365	}
9366	return *page.erllr.Value
9367}
9368
9369// Creates a new instance of the ExpressRouteLinkListResultPage type.
9370func NewExpressRouteLinkListResultPage(cur ExpressRouteLinkListResult, getNextPage func(context.Context, ExpressRouteLinkListResult) (ExpressRouteLinkListResult, error)) ExpressRouteLinkListResultPage {
9371	return ExpressRouteLinkListResultPage{
9372		fn:    getNextPage,
9373		erllr: cur,
9374	}
9375}
9376
9377// ExpressRouteLinkPropertiesFormat properties specific to ExpressRouteLink resources.
9378type ExpressRouteLinkPropertiesFormat struct {
9379	// RouterName - READ-ONLY; Name of Azure router associated with physical port.
9380	RouterName *string `json:"routerName,omitempty"`
9381	// InterfaceName - READ-ONLY; Name of Azure router interface.
9382	InterfaceName *string `json:"interfaceName,omitempty"`
9383	// PatchPanelID - READ-ONLY; Mapping between physical port to patch panel port.
9384	PatchPanelID *string `json:"patchPanelId,omitempty"`
9385	// RackID - READ-ONLY; Mapping of physical patch panel to rack.
9386	RackID *string `json:"rackId,omitempty"`
9387	// ConnectorType - READ-ONLY; Physical fiber port type. Possible values include: 'LC', 'SC'
9388	ConnectorType ExpressRouteLinkConnectorType `json:"connectorType,omitempty"`
9389	// AdminState - Administrative state of the physical port. Possible values include: 'ExpressRouteLinkAdminStateEnabled', 'ExpressRouteLinkAdminStateDisabled'
9390	AdminState ExpressRouteLinkAdminState `json:"adminState,omitempty"`
9391	// ProvisioningState - READ-ONLY; The provisioning state of the ExpressRouteLink resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
9392	ProvisioningState *string `json:"provisioningState,omitempty"`
9393}
9394
9395// MarshalJSON is the custom marshaler for ExpressRouteLinkPropertiesFormat.
9396func (erlpf ExpressRouteLinkPropertiesFormat) MarshalJSON() ([]byte, error) {
9397	objectMap := make(map[string]interface{})
9398	if erlpf.AdminState != "" {
9399		objectMap["adminState"] = erlpf.AdminState
9400	}
9401	return json.Marshal(objectMap)
9402}
9403
9404// ExpressRoutePort expressRoutePort resource definition.
9405type ExpressRoutePort struct {
9406	autorest.Response `json:"-"`
9407	// ExpressRoutePortPropertiesFormat - ExpressRoutePort properties
9408	*ExpressRoutePortPropertiesFormat `json:"properties,omitempty"`
9409	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
9410	Etag *string `json:"etag,omitempty"`
9411	// ID - Resource ID.
9412	ID *string `json:"id,omitempty"`
9413	// Name - READ-ONLY; Resource name.
9414	Name *string `json:"name,omitempty"`
9415	// Type - READ-ONLY; Resource type.
9416	Type *string `json:"type,omitempty"`
9417	// Location - Resource location.
9418	Location *string `json:"location,omitempty"`
9419	// Tags - Resource tags.
9420	Tags map[string]*string `json:"tags"`
9421}
9422
9423// MarshalJSON is the custom marshaler for ExpressRoutePort.
9424func (erp ExpressRoutePort) MarshalJSON() ([]byte, error) {
9425	objectMap := make(map[string]interface{})
9426	if erp.ExpressRoutePortPropertiesFormat != nil {
9427		objectMap["properties"] = erp.ExpressRoutePortPropertiesFormat
9428	}
9429	if erp.ID != nil {
9430		objectMap["id"] = erp.ID
9431	}
9432	if erp.Location != nil {
9433		objectMap["location"] = erp.Location
9434	}
9435	if erp.Tags != nil {
9436		objectMap["tags"] = erp.Tags
9437	}
9438	return json.Marshal(objectMap)
9439}
9440
9441// UnmarshalJSON is the custom unmarshaler for ExpressRoutePort struct.
9442func (erp *ExpressRoutePort) UnmarshalJSON(body []byte) error {
9443	var m map[string]*json.RawMessage
9444	err := json.Unmarshal(body, &m)
9445	if err != nil {
9446		return err
9447	}
9448	for k, v := range m {
9449		switch k {
9450		case "properties":
9451			if v != nil {
9452				var expressRoutePortPropertiesFormat ExpressRoutePortPropertiesFormat
9453				err = json.Unmarshal(*v, &expressRoutePortPropertiesFormat)
9454				if err != nil {
9455					return err
9456				}
9457				erp.ExpressRoutePortPropertiesFormat = &expressRoutePortPropertiesFormat
9458			}
9459		case "etag":
9460			if v != nil {
9461				var etag string
9462				err = json.Unmarshal(*v, &etag)
9463				if err != nil {
9464					return err
9465				}
9466				erp.Etag = &etag
9467			}
9468		case "id":
9469			if v != nil {
9470				var ID string
9471				err = json.Unmarshal(*v, &ID)
9472				if err != nil {
9473					return err
9474				}
9475				erp.ID = &ID
9476			}
9477		case "name":
9478			if v != nil {
9479				var name string
9480				err = json.Unmarshal(*v, &name)
9481				if err != nil {
9482					return err
9483				}
9484				erp.Name = &name
9485			}
9486		case "type":
9487			if v != nil {
9488				var typeVar string
9489				err = json.Unmarshal(*v, &typeVar)
9490				if err != nil {
9491					return err
9492				}
9493				erp.Type = &typeVar
9494			}
9495		case "location":
9496			if v != nil {
9497				var location string
9498				err = json.Unmarshal(*v, &location)
9499				if err != nil {
9500					return err
9501				}
9502				erp.Location = &location
9503			}
9504		case "tags":
9505			if v != nil {
9506				var tags map[string]*string
9507				err = json.Unmarshal(*v, &tags)
9508				if err != nil {
9509					return err
9510				}
9511				erp.Tags = tags
9512			}
9513		}
9514	}
9515
9516	return nil
9517}
9518
9519// ExpressRoutePortListResult response for ListExpressRoutePorts API service call.
9520type ExpressRoutePortListResult struct {
9521	autorest.Response `json:"-"`
9522	// Value - A list of ExpressRoutePort resources.
9523	Value *[]ExpressRoutePort `json:"value,omitempty"`
9524	// NextLink - The URL to get the next set of results.
9525	NextLink *string `json:"nextLink,omitempty"`
9526}
9527
9528// ExpressRoutePortListResultIterator provides access to a complete listing of ExpressRoutePort values.
9529type ExpressRoutePortListResultIterator struct {
9530	i    int
9531	page ExpressRoutePortListResultPage
9532}
9533
9534// NextWithContext advances to the next value.  If there was an error making
9535// the request the iterator does not advance and the error is returned.
9536func (iter *ExpressRoutePortListResultIterator) NextWithContext(ctx context.Context) (err error) {
9537	if tracing.IsEnabled() {
9538		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortListResultIterator.NextWithContext")
9539		defer func() {
9540			sc := -1
9541			if iter.Response().Response.Response != nil {
9542				sc = iter.Response().Response.Response.StatusCode
9543			}
9544			tracing.EndSpan(ctx, sc, err)
9545		}()
9546	}
9547	iter.i++
9548	if iter.i < len(iter.page.Values()) {
9549		return nil
9550	}
9551	err = iter.page.NextWithContext(ctx)
9552	if err != nil {
9553		iter.i--
9554		return err
9555	}
9556	iter.i = 0
9557	return nil
9558}
9559
9560// Next advances to the next value.  If there was an error making
9561// the request the iterator does not advance and the error is returned.
9562// Deprecated: Use NextWithContext() instead.
9563func (iter *ExpressRoutePortListResultIterator) Next() error {
9564	return iter.NextWithContext(context.Background())
9565}
9566
9567// NotDone returns true if the enumeration should be started or is not yet complete.
9568func (iter ExpressRoutePortListResultIterator) NotDone() bool {
9569	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9570}
9571
9572// Response returns the raw server response from the last page request.
9573func (iter ExpressRoutePortListResultIterator) Response() ExpressRoutePortListResult {
9574	return iter.page.Response()
9575}
9576
9577// Value returns the current value or a zero-initialized value if the
9578// iterator has advanced beyond the end of the collection.
9579func (iter ExpressRoutePortListResultIterator) Value() ExpressRoutePort {
9580	if !iter.page.NotDone() {
9581		return ExpressRoutePort{}
9582	}
9583	return iter.page.Values()[iter.i]
9584}
9585
9586// Creates a new instance of the ExpressRoutePortListResultIterator type.
9587func NewExpressRoutePortListResultIterator(page ExpressRoutePortListResultPage) ExpressRoutePortListResultIterator {
9588	return ExpressRoutePortListResultIterator{page: page}
9589}
9590
9591// IsEmpty returns true if the ListResult contains no values.
9592func (erplr ExpressRoutePortListResult) IsEmpty() bool {
9593	return erplr.Value == nil || len(*erplr.Value) == 0
9594}
9595
9596// hasNextLink returns true if the NextLink is not empty.
9597func (erplr ExpressRoutePortListResult) hasNextLink() bool {
9598	return erplr.NextLink != nil && len(*erplr.NextLink) != 0
9599}
9600
9601// expressRoutePortListResultPreparer prepares a request to retrieve the next set of results.
9602// It returns nil if no more results exist.
9603func (erplr ExpressRoutePortListResult) expressRoutePortListResultPreparer(ctx context.Context) (*http.Request, error) {
9604	if !erplr.hasNextLink() {
9605		return nil, nil
9606	}
9607	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9608		autorest.AsJSON(),
9609		autorest.AsGet(),
9610		autorest.WithBaseURL(to.String(erplr.NextLink)))
9611}
9612
9613// ExpressRoutePortListResultPage contains a page of ExpressRoutePort values.
9614type ExpressRoutePortListResultPage struct {
9615	fn    func(context.Context, ExpressRoutePortListResult) (ExpressRoutePortListResult, error)
9616	erplr ExpressRoutePortListResult
9617}
9618
9619// NextWithContext advances to the next page of values.  If there was an error making
9620// the request the page does not advance and the error is returned.
9621func (page *ExpressRoutePortListResultPage) NextWithContext(ctx context.Context) (err error) {
9622	if tracing.IsEnabled() {
9623		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortListResultPage.NextWithContext")
9624		defer func() {
9625			sc := -1
9626			if page.Response().Response.Response != nil {
9627				sc = page.Response().Response.Response.StatusCode
9628			}
9629			tracing.EndSpan(ctx, sc, err)
9630		}()
9631	}
9632	for {
9633		next, err := page.fn(ctx, page.erplr)
9634		if err != nil {
9635			return err
9636		}
9637		page.erplr = next
9638		if !next.hasNextLink() || !next.IsEmpty() {
9639			break
9640		}
9641	}
9642	return nil
9643}
9644
9645// Next advances to the next page of values.  If there was an error making
9646// the request the page does not advance and the error is returned.
9647// Deprecated: Use NextWithContext() instead.
9648func (page *ExpressRoutePortListResultPage) Next() error {
9649	return page.NextWithContext(context.Background())
9650}
9651
9652// NotDone returns true if the page enumeration should be started or is not yet complete.
9653func (page ExpressRoutePortListResultPage) NotDone() bool {
9654	return !page.erplr.IsEmpty()
9655}
9656
9657// Response returns the raw server response from the last page request.
9658func (page ExpressRoutePortListResultPage) Response() ExpressRoutePortListResult {
9659	return page.erplr
9660}
9661
9662// Values returns the slice of values for the current page or nil if there are no values.
9663func (page ExpressRoutePortListResultPage) Values() []ExpressRoutePort {
9664	if page.erplr.IsEmpty() {
9665		return nil
9666	}
9667	return *page.erplr.Value
9668}
9669
9670// Creates a new instance of the ExpressRoutePortListResultPage type.
9671func NewExpressRoutePortListResultPage(cur ExpressRoutePortListResult, getNextPage func(context.Context, ExpressRoutePortListResult) (ExpressRoutePortListResult, error)) ExpressRoutePortListResultPage {
9672	return ExpressRoutePortListResultPage{
9673		fn:    getNextPage,
9674		erplr: cur,
9675	}
9676}
9677
9678// ExpressRoutePortPropertiesFormat properties specific to ExpressRoutePort resources.
9679type ExpressRoutePortPropertiesFormat struct {
9680	// PeeringLocation - The name of the peering location that the ExpressRoutePort is mapped to physically.
9681	PeeringLocation *string `json:"peeringLocation,omitempty"`
9682	// BandwidthInGbps - Bandwidth of procured ports in Gbps
9683	BandwidthInGbps *int32 `json:"bandwidthInGbps,omitempty"`
9684	// ProvisionedBandwidthInGbps - READ-ONLY; Aggregate Gbps of associated circuit bandwidths.
9685	ProvisionedBandwidthInGbps *float64 `json:"provisionedBandwidthInGbps,omitempty"`
9686	// Mtu - READ-ONLY; Maximum transmission unit of the physical port pair(s)
9687	Mtu *string `json:"mtu,omitempty"`
9688	// Encapsulation - Encapsulation method on physical ports. Possible values include: 'Dot1Q', 'QinQ'
9689	Encapsulation ExpressRoutePortsEncapsulation `json:"encapsulation,omitempty"`
9690	// EtherType - READ-ONLY; Ether type of the physical port.
9691	EtherType *string `json:"etherType,omitempty"`
9692	// AllocationDate - READ-ONLY; Date of the physical port allocation to be used in Letter of Authorization.
9693	AllocationDate *string `json:"allocationDate,omitempty"`
9694	// Links - The set of physical links of the ExpressRoutePort resource
9695	Links *[]ExpressRouteLink `json:"links,omitempty"`
9696	// Circuits - READ-ONLY; Reference the ExpressRoute circuit(s) that are provisioned on this ExpressRoutePort resource.
9697	Circuits *[]SubResource `json:"circuits,omitempty"`
9698	// ProvisioningState - READ-ONLY; The provisioning state of the ExpressRoutePort resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
9699	ProvisioningState *string `json:"provisioningState,omitempty"`
9700	// ResourceGUID - The resource GUID property of the ExpressRoutePort resource.
9701	ResourceGUID *string `json:"resourceGuid,omitempty"`
9702}
9703
9704// MarshalJSON is the custom marshaler for ExpressRoutePortPropertiesFormat.
9705func (erppf ExpressRoutePortPropertiesFormat) MarshalJSON() ([]byte, error) {
9706	objectMap := make(map[string]interface{})
9707	if erppf.PeeringLocation != nil {
9708		objectMap["peeringLocation"] = erppf.PeeringLocation
9709	}
9710	if erppf.BandwidthInGbps != nil {
9711		objectMap["bandwidthInGbps"] = erppf.BandwidthInGbps
9712	}
9713	if erppf.Encapsulation != "" {
9714		objectMap["encapsulation"] = erppf.Encapsulation
9715	}
9716	if erppf.Links != nil {
9717		objectMap["links"] = erppf.Links
9718	}
9719	if erppf.ResourceGUID != nil {
9720		objectMap["resourceGuid"] = erppf.ResourceGUID
9721	}
9722	return json.Marshal(objectMap)
9723}
9724
9725// ExpressRoutePortsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
9726// long-running operation.
9727type ExpressRoutePortsCreateOrUpdateFuture struct {
9728	azure.FutureAPI
9729	// Result returns the result of the asynchronous operation.
9730	// If the operation has not completed it will return an error.
9731	Result func(ExpressRoutePortsClient) (ExpressRoutePort, error)
9732}
9733
9734// ExpressRoutePortsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
9735// operation.
9736type ExpressRoutePortsDeleteFuture struct {
9737	azure.FutureAPI
9738	// Result returns the result of the asynchronous operation.
9739	// If the operation has not completed it will return an error.
9740	Result func(ExpressRoutePortsClient) (autorest.Response, error)
9741}
9742
9743// ExpressRoutePortsLocation definition of the ExpressRoutePorts peering location resource.
9744type ExpressRoutePortsLocation struct {
9745	autorest.Response `json:"-"`
9746	// ExpressRoutePortsLocationPropertiesFormat - ExpressRoutePort peering location properties
9747	*ExpressRoutePortsLocationPropertiesFormat `json:"properties,omitempty"`
9748	// ID - Resource ID.
9749	ID *string `json:"id,omitempty"`
9750	// Name - READ-ONLY; Resource name.
9751	Name *string `json:"name,omitempty"`
9752	// Type - READ-ONLY; Resource type.
9753	Type *string `json:"type,omitempty"`
9754	// Location - Resource location.
9755	Location *string `json:"location,omitempty"`
9756	// Tags - Resource tags.
9757	Tags map[string]*string `json:"tags"`
9758}
9759
9760// MarshalJSON is the custom marshaler for ExpressRoutePortsLocation.
9761func (erpl ExpressRoutePortsLocation) MarshalJSON() ([]byte, error) {
9762	objectMap := make(map[string]interface{})
9763	if erpl.ExpressRoutePortsLocationPropertiesFormat != nil {
9764		objectMap["properties"] = erpl.ExpressRoutePortsLocationPropertiesFormat
9765	}
9766	if erpl.ID != nil {
9767		objectMap["id"] = erpl.ID
9768	}
9769	if erpl.Location != nil {
9770		objectMap["location"] = erpl.Location
9771	}
9772	if erpl.Tags != nil {
9773		objectMap["tags"] = erpl.Tags
9774	}
9775	return json.Marshal(objectMap)
9776}
9777
9778// UnmarshalJSON is the custom unmarshaler for ExpressRoutePortsLocation struct.
9779func (erpl *ExpressRoutePortsLocation) UnmarshalJSON(body []byte) error {
9780	var m map[string]*json.RawMessage
9781	err := json.Unmarshal(body, &m)
9782	if err != nil {
9783		return err
9784	}
9785	for k, v := range m {
9786		switch k {
9787		case "properties":
9788			if v != nil {
9789				var expressRoutePortsLocationPropertiesFormat ExpressRoutePortsLocationPropertiesFormat
9790				err = json.Unmarshal(*v, &expressRoutePortsLocationPropertiesFormat)
9791				if err != nil {
9792					return err
9793				}
9794				erpl.ExpressRoutePortsLocationPropertiesFormat = &expressRoutePortsLocationPropertiesFormat
9795			}
9796		case "id":
9797			if v != nil {
9798				var ID string
9799				err = json.Unmarshal(*v, &ID)
9800				if err != nil {
9801					return err
9802				}
9803				erpl.ID = &ID
9804			}
9805		case "name":
9806			if v != nil {
9807				var name string
9808				err = json.Unmarshal(*v, &name)
9809				if err != nil {
9810					return err
9811				}
9812				erpl.Name = &name
9813			}
9814		case "type":
9815			if v != nil {
9816				var typeVar string
9817				err = json.Unmarshal(*v, &typeVar)
9818				if err != nil {
9819					return err
9820				}
9821				erpl.Type = &typeVar
9822			}
9823		case "location":
9824			if v != nil {
9825				var location string
9826				err = json.Unmarshal(*v, &location)
9827				if err != nil {
9828					return err
9829				}
9830				erpl.Location = &location
9831			}
9832		case "tags":
9833			if v != nil {
9834				var tags map[string]*string
9835				err = json.Unmarshal(*v, &tags)
9836				if err != nil {
9837					return err
9838				}
9839				erpl.Tags = tags
9840			}
9841		}
9842	}
9843
9844	return nil
9845}
9846
9847// ExpressRoutePortsLocationBandwidths real-time inventory of available ExpressRoute port bandwidths.
9848type ExpressRoutePortsLocationBandwidths struct {
9849	// OfferName - READ-ONLY; Bandwidth descriptive name
9850	OfferName *string `json:"offerName,omitempty"`
9851	// ValueInGbps - READ-ONLY; Bandwidth value in Gbps
9852	ValueInGbps *int32 `json:"valueInGbps,omitempty"`
9853}
9854
9855// ExpressRoutePortsLocationListResult response for ListExpressRoutePortsLocations API service call.
9856type ExpressRoutePortsLocationListResult struct {
9857	autorest.Response `json:"-"`
9858	// Value - The list of all ExpressRoutePort peering locations.
9859	Value *[]ExpressRoutePortsLocation `json:"value,omitempty"`
9860	// NextLink - The URL to get the next set of results.
9861	NextLink *string `json:"nextLink,omitempty"`
9862}
9863
9864// ExpressRoutePortsLocationListResultIterator provides access to a complete listing of
9865// ExpressRoutePortsLocation values.
9866type ExpressRoutePortsLocationListResultIterator struct {
9867	i    int
9868	page ExpressRoutePortsLocationListResultPage
9869}
9870
9871// NextWithContext advances to the next value.  If there was an error making
9872// the request the iterator does not advance and the error is returned.
9873func (iter *ExpressRoutePortsLocationListResultIterator) NextWithContext(ctx context.Context) (err error) {
9874	if tracing.IsEnabled() {
9875		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsLocationListResultIterator.NextWithContext")
9876		defer func() {
9877			sc := -1
9878			if iter.Response().Response.Response != nil {
9879				sc = iter.Response().Response.Response.StatusCode
9880			}
9881			tracing.EndSpan(ctx, sc, err)
9882		}()
9883	}
9884	iter.i++
9885	if iter.i < len(iter.page.Values()) {
9886		return nil
9887	}
9888	err = iter.page.NextWithContext(ctx)
9889	if err != nil {
9890		iter.i--
9891		return err
9892	}
9893	iter.i = 0
9894	return nil
9895}
9896
9897// Next advances to the next value.  If there was an error making
9898// the request the iterator does not advance and the error is returned.
9899// Deprecated: Use NextWithContext() instead.
9900func (iter *ExpressRoutePortsLocationListResultIterator) Next() error {
9901	return iter.NextWithContext(context.Background())
9902}
9903
9904// NotDone returns true if the enumeration should be started or is not yet complete.
9905func (iter ExpressRoutePortsLocationListResultIterator) NotDone() bool {
9906	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9907}
9908
9909// Response returns the raw server response from the last page request.
9910func (iter ExpressRoutePortsLocationListResultIterator) Response() ExpressRoutePortsLocationListResult {
9911	return iter.page.Response()
9912}
9913
9914// Value returns the current value or a zero-initialized value if the
9915// iterator has advanced beyond the end of the collection.
9916func (iter ExpressRoutePortsLocationListResultIterator) Value() ExpressRoutePortsLocation {
9917	if !iter.page.NotDone() {
9918		return ExpressRoutePortsLocation{}
9919	}
9920	return iter.page.Values()[iter.i]
9921}
9922
9923// Creates a new instance of the ExpressRoutePortsLocationListResultIterator type.
9924func NewExpressRoutePortsLocationListResultIterator(page ExpressRoutePortsLocationListResultPage) ExpressRoutePortsLocationListResultIterator {
9925	return ExpressRoutePortsLocationListResultIterator{page: page}
9926}
9927
9928// IsEmpty returns true if the ListResult contains no values.
9929func (erpllr ExpressRoutePortsLocationListResult) IsEmpty() bool {
9930	return erpllr.Value == nil || len(*erpllr.Value) == 0
9931}
9932
9933// hasNextLink returns true if the NextLink is not empty.
9934func (erpllr ExpressRoutePortsLocationListResult) hasNextLink() bool {
9935	return erpllr.NextLink != nil && len(*erpllr.NextLink) != 0
9936}
9937
9938// expressRoutePortsLocationListResultPreparer prepares a request to retrieve the next set of results.
9939// It returns nil if no more results exist.
9940func (erpllr ExpressRoutePortsLocationListResult) expressRoutePortsLocationListResultPreparer(ctx context.Context) (*http.Request, error) {
9941	if !erpllr.hasNextLink() {
9942		return nil, nil
9943	}
9944	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9945		autorest.AsJSON(),
9946		autorest.AsGet(),
9947		autorest.WithBaseURL(to.String(erpllr.NextLink)))
9948}
9949
9950// ExpressRoutePortsLocationListResultPage contains a page of ExpressRoutePortsLocation values.
9951type ExpressRoutePortsLocationListResultPage struct {
9952	fn     func(context.Context, ExpressRoutePortsLocationListResult) (ExpressRoutePortsLocationListResult, error)
9953	erpllr ExpressRoutePortsLocationListResult
9954}
9955
9956// NextWithContext advances to the next page of values.  If there was an error making
9957// the request the page does not advance and the error is returned.
9958func (page *ExpressRoutePortsLocationListResultPage) NextWithContext(ctx context.Context) (err error) {
9959	if tracing.IsEnabled() {
9960		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsLocationListResultPage.NextWithContext")
9961		defer func() {
9962			sc := -1
9963			if page.Response().Response.Response != nil {
9964				sc = page.Response().Response.Response.StatusCode
9965			}
9966			tracing.EndSpan(ctx, sc, err)
9967		}()
9968	}
9969	for {
9970		next, err := page.fn(ctx, page.erpllr)
9971		if err != nil {
9972			return err
9973		}
9974		page.erpllr = next
9975		if !next.hasNextLink() || !next.IsEmpty() {
9976			break
9977		}
9978	}
9979	return nil
9980}
9981
9982// Next advances to the next page of values.  If there was an error making
9983// the request the page does not advance and the error is returned.
9984// Deprecated: Use NextWithContext() instead.
9985func (page *ExpressRoutePortsLocationListResultPage) Next() error {
9986	return page.NextWithContext(context.Background())
9987}
9988
9989// NotDone returns true if the page enumeration should be started or is not yet complete.
9990func (page ExpressRoutePortsLocationListResultPage) NotDone() bool {
9991	return !page.erpllr.IsEmpty()
9992}
9993
9994// Response returns the raw server response from the last page request.
9995func (page ExpressRoutePortsLocationListResultPage) Response() ExpressRoutePortsLocationListResult {
9996	return page.erpllr
9997}
9998
9999// Values returns the slice of values for the current page or nil if there are no values.
10000func (page ExpressRoutePortsLocationListResultPage) Values() []ExpressRoutePortsLocation {
10001	if page.erpllr.IsEmpty() {
10002		return nil
10003	}
10004	return *page.erpllr.Value
10005}
10006
10007// Creates a new instance of the ExpressRoutePortsLocationListResultPage type.
10008func NewExpressRoutePortsLocationListResultPage(cur ExpressRoutePortsLocationListResult, getNextPage func(context.Context, ExpressRoutePortsLocationListResult) (ExpressRoutePortsLocationListResult, error)) ExpressRoutePortsLocationListResultPage {
10009	return ExpressRoutePortsLocationListResultPage{
10010		fn:     getNextPage,
10011		erpllr: cur,
10012	}
10013}
10014
10015// ExpressRoutePortsLocationPropertiesFormat properties specific to ExpressRoutePorts peering location
10016// resources.
10017type ExpressRoutePortsLocationPropertiesFormat struct {
10018	// Address - READ-ONLY; Address of peering location.
10019	Address *string `json:"address,omitempty"`
10020	// Contact - READ-ONLY; Contact details of peering locations.
10021	Contact *string `json:"contact,omitempty"`
10022	// AvailableBandwidths - The inventory of available ExpressRoutePort bandwidths.
10023	AvailableBandwidths *[]ExpressRoutePortsLocationBandwidths `json:"availableBandwidths,omitempty"`
10024	// ProvisioningState - READ-ONLY; The provisioning state of the ExpressRoutePortLocation resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
10025	ProvisioningState *string `json:"provisioningState,omitempty"`
10026}
10027
10028// MarshalJSON is the custom marshaler for ExpressRoutePortsLocationPropertiesFormat.
10029func (erplpf ExpressRoutePortsLocationPropertiesFormat) MarshalJSON() ([]byte, error) {
10030	objectMap := make(map[string]interface{})
10031	if erplpf.AvailableBandwidths != nil {
10032		objectMap["availableBandwidths"] = erplpf.AvailableBandwidths
10033	}
10034	return json.Marshal(objectMap)
10035}
10036
10037// ExpressRoutePortsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
10038// long-running operation.
10039type ExpressRoutePortsUpdateTagsFuture struct {
10040	azure.FutureAPI
10041	// Result returns the result of the asynchronous operation.
10042	// If the operation has not completed it will return an error.
10043	Result func(ExpressRoutePortsClient) (ExpressRoutePort, error)
10044}
10045
10046// ExpressRouteServiceProvider a ExpressRouteResourceProvider object.
10047type ExpressRouteServiceProvider struct {
10048	*ExpressRouteServiceProviderPropertiesFormat `json:"properties,omitempty"`
10049	// ID - Resource ID.
10050	ID *string `json:"id,omitempty"`
10051	// Name - READ-ONLY; Resource name.
10052	Name *string `json:"name,omitempty"`
10053	// Type - READ-ONLY; Resource type.
10054	Type *string `json:"type,omitempty"`
10055	// Location - Resource location.
10056	Location *string `json:"location,omitempty"`
10057	// Tags - Resource tags.
10058	Tags map[string]*string `json:"tags"`
10059}
10060
10061// MarshalJSON is the custom marshaler for ExpressRouteServiceProvider.
10062func (ersp ExpressRouteServiceProvider) MarshalJSON() ([]byte, error) {
10063	objectMap := make(map[string]interface{})
10064	if ersp.ExpressRouteServiceProviderPropertiesFormat != nil {
10065		objectMap["properties"] = ersp.ExpressRouteServiceProviderPropertiesFormat
10066	}
10067	if ersp.ID != nil {
10068		objectMap["id"] = ersp.ID
10069	}
10070	if ersp.Location != nil {
10071		objectMap["location"] = ersp.Location
10072	}
10073	if ersp.Tags != nil {
10074		objectMap["tags"] = ersp.Tags
10075	}
10076	return json.Marshal(objectMap)
10077}
10078
10079// UnmarshalJSON is the custom unmarshaler for ExpressRouteServiceProvider struct.
10080func (ersp *ExpressRouteServiceProvider) UnmarshalJSON(body []byte) error {
10081	var m map[string]*json.RawMessage
10082	err := json.Unmarshal(body, &m)
10083	if err != nil {
10084		return err
10085	}
10086	for k, v := range m {
10087		switch k {
10088		case "properties":
10089			if v != nil {
10090				var expressRouteServiceProviderPropertiesFormat ExpressRouteServiceProviderPropertiesFormat
10091				err = json.Unmarshal(*v, &expressRouteServiceProviderPropertiesFormat)
10092				if err != nil {
10093					return err
10094				}
10095				ersp.ExpressRouteServiceProviderPropertiesFormat = &expressRouteServiceProviderPropertiesFormat
10096			}
10097		case "id":
10098			if v != nil {
10099				var ID string
10100				err = json.Unmarshal(*v, &ID)
10101				if err != nil {
10102					return err
10103				}
10104				ersp.ID = &ID
10105			}
10106		case "name":
10107			if v != nil {
10108				var name string
10109				err = json.Unmarshal(*v, &name)
10110				if err != nil {
10111					return err
10112				}
10113				ersp.Name = &name
10114			}
10115		case "type":
10116			if v != nil {
10117				var typeVar string
10118				err = json.Unmarshal(*v, &typeVar)
10119				if err != nil {
10120					return err
10121				}
10122				ersp.Type = &typeVar
10123			}
10124		case "location":
10125			if v != nil {
10126				var location string
10127				err = json.Unmarshal(*v, &location)
10128				if err != nil {
10129					return err
10130				}
10131				ersp.Location = &location
10132			}
10133		case "tags":
10134			if v != nil {
10135				var tags map[string]*string
10136				err = json.Unmarshal(*v, &tags)
10137				if err != nil {
10138					return err
10139				}
10140				ersp.Tags = tags
10141			}
10142		}
10143	}
10144
10145	return nil
10146}
10147
10148// ExpressRouteServiceProviderBandwidthsOffered contains bandwidths offered in ExpressRouteServiceProvider
10149// resources.
10150type ExpressRouteServiceProviderBandwidthsOffered struct {
10151	// OfferName - The OfferName.
10152	OfferName *string `json:"offerName,omitempty"`
10153	// ValueInMbps - The ValueInMbps.
10154	ValueInMbps *int32 `json:"valueInMbps,omitempty"`
10155}
10156
10157// ExpressRouteServiceProviderListResult response for the ListExpressRouteServiceProvider API service call.
10158type ExpressRouteServiceProviderListResult struct {
10159	autorest.Response `json:"-"`
10160	// Value - A list of ExpressRouteResourceProvider resources.
10161	Value *[]ExpressRouteServiceProvider `json:"value,omitempty"`
10162	// NextLink - The URL to get the next set of results.
10163	NextLink *string `json:"nextLink,omitempty"`
10164}
10165
10166// ExpressRouteServiceProviderListResultIterator provides access to a complete listing of
10167// ExpressRouteServiceProvider values.
10168type ExpressRouteServiceProviderListResultIterator struct {
10169	i    int
10170	page ExpressRouteServiceProviderListResultPage
10171}
10172
10173// NextWithContext advances to the next value.  If there was an error making
10174// the request the iterator does not advance and the error is returned.
10175func (iter *ExpressRouteServiceProviderListResultIterator) NextWithContext(ctx context.Context) (err error) {
10176	if tracing.IsEnabled() {
10177		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultIterator.NextWithContext")
10178		defer func() {
10179			sc := -1
10180			if iter.Response().Response.Response != nil {
10181				sc = iter.Response().Response.Response.StatusCode
10182			}
10183			tracing.EndSpan(ctx, sc, err)
10184		}()
10185	}
10186	iter.i++
10187	if iter.i < len(iter.page.Values()) {
10188		return nil
10189	}
10190	err = iter.page.NextWithContext(ctx)
10191	if err != nil {
10192		iter.i--
10193		return err
10194	}
10195	iter.i = 0
10196	return nil
10197}
10198
10199// Next advances to the next value.  If there was an error making
10200// the request the iterator does not advance and the error is returned.
10201// Deprecated: Use NextWithContext() instead.
10202func (iter *ExpressRouteServiceProviderListResultIterator) Next() error {
10203	return iter.NextWithContext(context.Background())
10204}
10205
10206// NotDone returns true if the enumeration should be started or is not yet complete.
10207func (iter ExpressRouteServiceProviderListResultIterator) NotDone() bool {
10208	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10209}
10210
10211// Response returns the raw server response from the last page request.
10212func (iter ExpressRouteServiceProviderListResultIterator) Response() ExpressRouteServiceProviderListResult {
10213	return iter.page.Response()
10214}
10215
10216// Value returns the current value or a zero-initialized value if the
10217// iterator has advanced beyond the end of the collection.
10218func (iter ExpressRouteServiceProviderListResultIterator) Value() ExpressRouteServiceProvider {
10219	if !iter.page.NotDone() {
10220		return ExpressRouteServiceProvider{}
10221	}
10222	return iter.page.Values()[iter.i]
10223}
10224
10225// Creates a new instance of the ExpressRouteServiceProviderListResultIterator type.
10226func NewExpressRouteServiceProviderListResultIterator(page ExpressRouteServiceProviderListResultPage) ExpressRouteServiceProviderListResultIterator {
10227	return ExpressRouteServiceProviderListResultIterator{page: page}
10228}
10229
10230// IsEmpty returns true if the ListResult contains no values.
10231func (ersplr ExpressRouteServiceProviderListResult) IsEmpty() bool {
10232	return ersplr.Value == nil || len(*ersplr.Value) == 0
10233}
10234
10235// hasNextLink returns true if the NextLink is not empty.
10236func (ersplr ExpressRouteServiceProviderListResult) hasNextLink() bool {
10237	return ersplr.NextLink != nil && len(*ersplr.NextLink) != 0
10238}
10239
10240// expressRouteServiceProviderListResultPreparer prepares a request to retrieve the next set of results.
10241// It returns nil if no more results exist.
10242func (ersplr ExpressRouteServiceProviderListResult) expressRouteServiceProviderListResultPreparer(ctx context.Context) (*http.Request, error) {
10243	if !ersplr.hasNextLink() {
10244		return nil, nil
10245	}
10246	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10247		autorest.AsJSON(),
10248		autorest.AsGet(),
10249		autorest.WithBaseURL(to.String(ersplr.NextLink)))
10250}
10251
10252// ExpressRouteServiceProviderListResultPage contains a page of ExpressRouteServiceProvider values.
10253type ExpressRouteServiceProviderListResultPage struct {
10254	fn     func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)
10255	ersplr ExpressRouteServiceProviderListResult
10256}
10257
10258// NextWithContext advances to the next page of values.  If there was an error making
10259// the request the page does not advance and the error is returned.
10260func (page *ExpressRouteServiceProviderListResultPage) NextWithContext(ctx context.Context) (err error) {
10261	if tracing.IsEnabled() {
10262		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultPage.NextWithContext")
10263		defer func() {
10264			sc := -1
10265			if page.Response().Response.Response != nil {
10266				sc = page.Response().Response.Response.StatusCode
10267			}
10268			tracing.EndSpan(ctx, sc, err)
10269		}()
10270	}
10271	for {
10272		next, err := page.fn(ctx, page.ersplr)
10273		if err != nil {
10274			return err
10275		}
10276		page.ersplr = next
10277		if !next.hasNextLink() || !next.IsEmpty() {
10278			break
10279		}
10280	}
10281	return nil
10282}
10283
10284// Next advances to the next page of values.  If there was an error making
10285// the request the page does not advance and the error is returned.
10286// Deprecated: Use NextWithContext() instead.
10287func (page *ExpressRouteServiceProviderListResultPage) Next() error {
10288	return page.NextWithContext(context.Background())
10289}
10290
10291// NotDone returns true if the page enumeration should be started or is not yet complete.
10292func (page ExpressRouteServiceProviderListResultPage) NotDone() bool {
10293	return !page.ersplr.IsEmpty()
10294}
10295
10296// Response returns the raw server response from the last page request.
10297func (page ExpressRouteServiceProviderListResultPage) Response() ExpressRouteServiceProviderListResult {
10298	return page.ersplr
10299}
10300
10301// Values returns the slice of values for the current page or nil if there are no values.
10302func (page ExpressRouteServiceProviderListResultPage) Values() []ExpressRouteServiceProvider {
10303	if page.ersplr.IsEmpty() {
10304		return nil
10305	}
10306	return *page.ersplr.Value
10307}
10308
10309// Creates a new instance of the ExpressRouteServiceProviderListResultPage type.
10310func NewExpressRouteServiceProviderListResultPage(cur ExpressRouteServiceProviderListResult, getNextPage func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)) ExpressRouteServiceProviderListResultPage {
10311	return ExpressRouteServiceProviderListResultPage{
10312		fn:     getNextPage,
10313		ersplr: cur,
10314	}
10315}
10316
10317// ExpressRouteServiceProviderPropertiesFormat properties of ExpressRouteServiceProvider.
10318type ExpressRouteServiceProviderPropertiesFormat struct {
10319	// PeeringLocations - Get a list of peering locations.
10320	PeeringLocations *[]string `json:"peeringLocations,omitempty"`
10321	// BandwidthsOffered - Gets bandwidths offered.
10322	BandwidthsOffered *[]ExpressRouteServiceProviderBandwidthsOffered `json:"bandwidthsOffered,omitempty"`
10323	// ProvisioningState - Gets the provisioning state of the resource.
10324	ProvisioningState *string `json:"provisioningState,omitempty"`
10325}
10326
10327// FlowLogFormatParameters parameters that define the flow log format.
10328type FlowLogFormatParameters struct {
10329	// Type - The file type of flow log. Possible values include: 'JSON'
10330	Type FlowLogFormatType `json:"type,omitempty"`
10331	// Version - The version (revision) of the flow log.
10332	Version *int32 `json:"version,omitempty"`
10333}
10334
10335// FlowLogInformation information on the configuration of flow log and traffic analytics (optional) .
10336type FlowLogInformation struct {
10337	autorest.Response `json:"-"`
10338	// TargetResourceID - The ID of the resource to configure for flow log and traffic analytics (optional) .
10339	TargetResourceID           *string `json:"targetResourceId,omitempty"`
10340	*FlowLogProperties         `json:"properties,omitempty"`
10341	FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"`
10342}
10343
10344// MarshalJSON is the custom marshaler for FlowLogInformation.
10345func (fli FlowLogInformation) MarshalJSON() ([]byte, error) {
10346	objectMap := make(map[string]interface{})
10347	if fli.TargetResourceID != nil {
10348		objectMap["targetResourceId"] = fli.TargetResourceID
10349	}
10350	if fli.FlowLogProperties != nil {
10351		objectMap["properties"] = fli.FlowLogProperties
10352	}
10353	if fli.FlowAnalyticsConfiguration != nil {
10354		objectMap["flowAnalyticsConfiguration"] = fli.FlowAnalyticsConfiguration
10355	}
10356	return json.Marshal(objectMap)
10357}
10358
10359// UnmarshalJSON is the custom unmarshaler for FlowLogInformation struct.
10360func (fli *FlowLogInformation) UnmarshalJSON(body []byte) error {
10361	var m map[string]*json.RawMessage
10362	err := json.Unmarshal(body, &m)
10363	if err != nil {
10364		return err
10365	}
10366	for k, v := range m {
10367		switch k {
10368		case "targetResourceId":
10369			if v != nil {
10370				var targetResourceID string
10371				err = json.Unmarshal(*v, &targetResourceID)
10372				if err != nil {
10373					return err
10374				}
10375				fli.TargetResourceID = &targetResourceID
10376			}
10377		case "properties":
10378			if v != nil {
10379				var flowLogProperties FlowLogProperties
10380				err = json.Unmarshal(*v, &flowLogProperties)
10381				if err != nil {
10382					return err
10383				}
10384				fli.FlowLogProperties = &flowLogProperties
10385			}
10386		case "flowAnalyticsConfiguration":
10387			if v != nil {
10388				var flowAnalyticsConfiguration TrafficAnalyticsProperties
10389				err = json.Unmarshal(*v, &flowAnalyticsConfiguration)
10390				if err != nil {
10391					return err
10392				}
10393				fli.FlowAnalyticsConfiguration = &flowAnalyticsConfiguration
10394			}
10395		}
10396	}
10397
10398	return nil
10399}
10400
10401// FlowLogProperties parameters that define the configuration of flow log.
10402type FlowLogProperties struct {
10403	// StorageID - ID of the storage account which is used to store the flow log.
10404	StorageID *string `json:"storageId,omitempty"`
10405	// Enabled - Flag to enable/disable flow logging.
10406	Enabled         *bool                      `json:"enabled,omitempty"`
10407	RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"`
10408	Format          *FlowLogFormatParameters   `json:"format,omitempty"`
10409}
10410
10411// FlowLogStatusParameters parameters that define a resource to query flow log and traffic analytics
10412// (optional) status.
10413type FlowLogStatusParameters struct {
10414	// TargetResourceID - The target resource where getting the flow log and traffic analytics (optional) status.
10415	TargetResourceID *string `json:"targetResourceId,omitempty"`
10416}
10417
10418// FrontendIPConfiguration frontend IP address of the load balancer.
10419type FrontendIPConfiguration struct {
10420	autorest.Response `json:"-"`
10421	// FrontendIPConfigurationPropertiesFormat - Properties of the load balancer probe.
10422	*FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"`
10423	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
10424	Name *string `json:"name,omitempty"`
10425	// Etag - A unique read-only string that changes whenever the resource is updated.
10426	Etag *string `json:"etag,omitempty"`
10427	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
10428	Zones *[]string `json:"zones,omitempty"`
10429	// ID - Resource ID.
10430	ID *string `json:"id,omitempty"`
10431}
10432
10433// MarshalJSON is the custom marshaler for FrontendIPConfiguration.
10434func (fic FrontendIPConfiguration) MarshalJSON() ([]byte, error) {
10435	objectMap := make(map[string]interface{})
10436	if fic.FrontendIPConfigurationPropertiesFormat != nil {
10437		objectMap["properties"] = fic.FrontendIPConfigurationPropertiesFormat
10438	}
10439	if fic.Name != nil {
10440		objectMap["name"] = fic.Name
10441	}
10442	if fic.Etag != nil {
10443		objectMap["etag"] = fic.Etag
10444	}
10445	if fic.Zones != nil {
10446		objectMap["zones"] = fic.Zones
10447	}
10448	if fic.ID != nil {
10449		objectMap["id"] = fic.ID
10450	}
10451	return json.Marshal(objectMap)
10452}
10453
10454// UnmarshalJSON is the custom unmarshaler for FrontendIPConfiguration struct.
10455func (fic *FrontendIPConfiguration) UnmarshalJSON(body []byte) error {
10456	var m map[string]*json.RawMessage
10457	err := json.Unmarshal(body, &m)
10458	if err != nil {
10459		return err
10460	}
10461	for k, v := range m {
10462		switch k {
10463		case "properties":
10464			if v != nil {
10465				var frontendIPConfigurationPropertiesFormat FrontendIPConfigurationPropertiesFormat
10466				err = json.Unmarshal(*v, &frontendIPConfigurationPropertiesFormat)
10467				if err != nil {
10468					return err
10469				}
10470				fic.FrontendIPConfigurationPropertiesFormat = &frontendIPConfigurationPropertiesFormat
10471			}
10472		case "name":
10473			if v != nil {
10474				var name string
10475				err = json.Unmarshal(*v, &name)
10476				if err != nil {
10477					return err
10478				}
10479				fic.Name = &name
10480			}
10481		case "etag":
10482			if v != nil {
10483				var etag string
10484				err = json.Unmarshal(*v, &etag)
10485				if err != nil {
10486					return err
10487				}
10488				fic.Etag = &etag
10489			}
10490		case "zones":
10491			if v != nil {
10492				var zones []string
10493				err = json.Unmarshal(*v, &zones)
10494				if err != nil {
10495					return err
10496				}
10497				fic.Zones = &zones
10498			}
10499		case "id":
10500			if v != nil {
10501				var ID string
10502				err = json.Unmarshal(*v, &ID)
10503				if err != nil {
10504					return err
10505				}
10506				fic.ID = &ID
10507			}
10508		}
10509	}
10510
10511	return nil
10512}
10513
10514// FrontendIPConfigurationPropertiesFormat properties of Frontend IP Configuration of the load balancer.
10515type FrontendIPConfigurationPropertiesFormat struct {
10516	// InboundNatRules - READ-ONLY; Read only. Inbound rules URIs that use this frontend IP.
10517	InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"`
10518	// InboundNatPools - READ-ONLY; Read only. Inbound pools URIs that use this frontend IP.
10519	InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"`
10520	// OutboundRules - READ-ONLY; Read only. Outbound rules URIs that use this frontend IP.
10521	OutboundRules *[]SubResource `json:"outboundRules,omitempty"`
10522	// LoadBalancingRules - READ-ONLY; Gets load balancing rules URIs that use this frontend IP.
10523	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
10524	// PrivateIPAddress - The private IP address of the IP configuration.
10525	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
10526	// PrivateIPAllocationMethod - The Private IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
10527	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
10528	// Subnet - The reference of the subnet resource.
10529	Subnet *Subnet `json:"subnet,omitempty"`
10530	// PublicIPAddress - The reference of the Public IP resource.
10531	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
10532	// PublicIPPrefix - The reference of the Public IP Prefix resource.
10533	PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"`
10534	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
10535	ProvisioningState *string `json:"provisioningState,omitempty"`
10536}
10537
10538// MarshalJSON is the custom marshaler for FrontendIPConfigurationPropertiesFormat.
10539func (ficpf FrontendIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
10540	objectMap := make(map[string]interface{})
10541	if ficpf.PrivateIPAddress != nil {
10542		objectMap["privateIPAddress"] = ficpf.PrivateIPAddress
10543	}
10544	if ficpf.PrivateIPAllocationMethod != "" {
10545		objectMap["privateIPAllocationMethod"] = ficpf.PrivateIPAllocationMethod
10546	}
10547	if ficpf.Subnet != nil {
10548		objectMap["subnet"] = ficpf.Subnet
10549	}
10550	if ficpf.PublicIPAddress != nil {
10551		objectMap["publicIPAddress"] = ficpf.PublicIPAddress
10552	}
10553	if ficpf.PublicIPPrefix != nil {
10554		objectMap["publicIPPrefix"] = ficpf.PublicIPPrefix
10555	}
10556	if ficpf.ProvisioningState != nil {
10557		objectMap["provisioningState"] = ficpf.ProvisioningState
10558	}
10559	return json.Marshal(objectMap)
10560}
10561
10562// GatewayRoute gateway routing details
10563type GatewayRoute struct {
10564	// LocalAddress - READ-ONLY; The gateway's local address
10565	LocalAddress *string `json:"localAddress,omitempty"`
10566	// NetworkProperty - READ-ONLY; The route's network prefix
10567	NetworkProperty *string `json:"network,omitempty"`
10568	// NextHop - READ-ONLY; The route's next hop
10569	NextHop *string `json:"nextHop,omitempty"`
10570	// SourcePeer - READ-ONLY; The peer this route was learned from
10571	SourcePeer *string `json:"sourcePeer,omitempty"`
10572	// Origin - READ-ONLY; The source this route was learned from
10573	Origin *string `json:"origin,omitempty"`
10574	// AsPath - READ-ONLY; The route's AS path sequence
10575	AsPath *string `json:"asPath,omitempty"`
10576	// Weight - READ-ONLY; The route's weight
10577	Weight *int32 `json:"weight,omitempty"`
10578}
10579
10580// GatewayRouteListResult list of virtual network gateway routes
10581type GatewayRouteListResult struct {
10582	autorest.Response `json:"-"`
10583	// Value - List of gateway routes
10584	Value *[]GatewayRoute `json:"value,omitempty"`
10585}
10586
10587// GetVpnSitesConfigurationRequest list of Vpn-Sites
10588type GetVpnSitesConfigurationRequest struct {
10589	// VpnSites - List of resource-ids of the vpn-sites for which config is to be downloaded.
10590	VpnSites *[]string `json:"vpnSites,omitempty"`
10591	// OutputBlobSasURL - The sas-url to download the configurations for vpn-sites
10592	OutputBlobSasURL *string `json:"outputBlobSasUrl,omitempty"`
10593}
10594
10595// HTTPConfiguration HTTP configuration of the connectivity check.
10596type HTTPConfiguration struct {
10597	// Method - HTTP method. Possible values include: 'Get'
10598	Method HTTPMethod `json:"method,omitempty"`
10599	// Headers - List of HTTP headers.
10600	Headers *[]HTTPHeader `json:"headers,omitempty"`
10601	// ValidStatusCodes - Valid status codes.
10602	ValidStatusCodes *[]int32 `json:"validStatusCodes,omitempty"`
10603}
10604
10605// HTTPHeader describes the HTTP header.
10606type HTTPHeader struct {
10607	// Name - The name in HTTP header.
10608	Name *string `json:"name,omitempty"`
10609	// Value - The value in HTTP header.
10610	Value *string `json:"value,omitempty"`
10611}
10612
10613// HubVirtualNetworkConnection hubVirtualNetworkConnection Resource.
10614type HubVirtualNetworkConnection struct {
10615	autorest.Response                      `json:"-"`
10616	*HubVirtualNetworkConnectionProperties `json:"properties,omitempty"`
10617	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
10618	Name *string `json:"name,omitempty"`
10619	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
10620	Etag *string `json:"etag,omitempty"`
10621	// ID - Resource ID.
10622	ID *string `json:"id,omitempty"`
10623}
10624
10625// MarshalJSON is the custom marshaler for HubVirtualNetworkConnection.
10626func (hvnc HubVirtualNetworkConnection) MarshalJSON() ([]byte, error) {
10627	objectMap := make(map[string]interface{})
10628	if hvnc.HubVirtualNetworkConnectionProperties != nil {
10629		objectMap["properties"] = hvnc.HubVirtualNetworkConnectionProperties
10630	}
10631	if hvnc.Name != nil {
10632		objectMap["name"] = hvnc.Name
10633	}
10634	if hvnc.ID != nil {
10635		objectMap["id"] = hvnc.ID
10636	}
10637	return json.Marshal(objectMap)
10638}
10639
10640// UnmarshalJSON is the custom unmarshaler for HubVirtualNetworkConnection struct.
10641func (hvnc *HubVirtualNetworkConnection) UnmarshalJSON(body []byte) error {
10642	var m map[string]*json.RawMessage
10643	err := json.Unmarshal(body, &m)
10644	if err != nil {
10645		return err
10646	}
10647	for k, v := range m {
10648		switch k {
10649		case "properties":
10650			if v != nil {
10651				var hubVirtualNetworkConnectionProperties HubVirtualNetworkConnectionProperties
10652				err = json.Unmarshal(*v, &hubVirtualNetworkConnectionProperties)
10653				if err != nil {
10654					return err
10655				}
10656				hvnc.HubVirtualNetworkConnectionProperties = &hubVirtualNetworkConnectionProperties
10657			}
10658		case "name":
10659			if v != nil {
10660				var name string
10661				err = json.Unmarshal(*v, &name)
10662				if err != nil {
10663					return err
10664				}
10665				hvnc.Name = &name
10666			}
10667		case "etag":
10668			if v != nil {
10669				var etag string
10670				err = json.Unmarshal(*v, &etag)
10671				if err != nil {
10672					return err
10673				}
10674				hvnc.Etag = &etag
10675			}
10676		case "id":
10677			if v != nil {
10678				var ID string
10679				err = json.Unmarshal(*v, &ID)
10680				if err != nil {
10681					return err
10682				}
10683				hvnc.ID = &ID
10684			}
10685		}
10686	}
10687
10688	return nil
10689}
10690
10691// HubVirtualNetworkConnectionProperties parameters for HubVirtualNetworkConnection
10692type HubVirtualNetworkConnectionProperties struct {
10693	// RemoteVirtualNetwork - Reference to the remote virtual network.
10694	RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"`
10695	// AllowHubToRemoteVnetTransit - VirtualHub to RemoteVnet transit to enabled or not.
10696	AllowHubToRemoteVnetTransit *bool `json:"allowHubToRemoteVnetTransit,omitempty"`
10697	// AllowRemoteVnetToUseHubVnetGateways - Allow RemoteVnet to use Virtual Hub's gateways.
10698	AllowRemoteVnetToUseHubVnetGateways *bool `json:"allowRemoteVnetToUseHubVnetGateways,omitempty"`
10699	// EnableInternetSecurity - Enable internet security
10700	EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"`
10701	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
10702	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
10703}
10704
10705// InboundNatPool inbound NAT pool of the load balancer.
10706type InboundNatPool struct {
10707	// InboundNatPoolPropertiesFormat - Properties of load balancer inbound nat pool.
10708	*InboundNatPoolPropertiesFormat `json:"properties,omitempty"`
10709	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
10710	Name *string `json:"name,omitempty"`
10711	// Etag - A unique read-only string that changes whenever the resource is updated.
10712	Etag *string `json:"etag,omitempty"`
10713	// ID - Resource ID.
10714	ID *string `json:"id,omitempty"`
10715}
10716
10717// MarshalJSON is the custom marshaler for InboundNatPool.
10718func (inp InboundNatPool) MarshalJSON() ([]byte, error) {
10719	objectMap := make(map[string]interface{})
10720	if inp.InboundNatPoolPropertiesFormat != nil {
10721		objectMap["properties"] = inp.InboundNatPoolPropertiesFormat
10722	}
10723	if inp.Name != nil {
10724		objectMap["name"] = inp.Name
10725	}
10726	if inp.Etag != nil {
10727		objectMap["etag"] = inp.Etag
10728	}
10729	if inp.ID != nil {
10730		objectMap["id"] = inp.ID
10731	}
10732	return json.Marshal(objectMap)
10733}
10734
10735// UnmarshalJSON is the custom unmarshaler for InboundNatPool struct.
10736func (inp *InboundNatPool) UnmarshalJSON(body []byte) error {
10737	var m map[string]*json.RawMessage
10738	err := json.Unmarshal(body, &m)
10739	if err != nil {
10740		return err
10741	}
10742	for k, v := range m {
10743		switch k {
10744		case "properties":
10745			if v != nil {
10746				var inboundNatPoolPropertiesFormat InboundNatPoolPropertiesFormat
10747				err = json.Unmarshal(*v, &inboundNatPoolPropertiesFormat)
10748				if err != nil {
10749					return err
10750				}
10751				inp.InboundNatPoolPropertiesFormat = &inboundNatPoolPropertiesFormat
10752			}
10753		case "name":
10754			if v != nil {
10755				var name string
10756				err = json.Unmarshal(*v, &name)
10757				if err != nil {
10758					return err
10759				}
10760				inp.Name = &name
10761			}
10762		case "etag":
10763			if v != nil {
10764				var etag string
10765				err = json.Unmarshal(*v, &etag)
10766				if err != nil {
10767					return err
10768				}
10769				inp.Etag = &etag
10770			}
10771		case "id":
10772			if v != nil {
10773				var ID string
10774				err = json.Unmarshal(*v, &ID)
10775				if err != nil {
10776					return err
10777				}
10778				inp.ID = &ID
10779			}
10780		}
10781	}
10782
10783	return nil
10784}
10785
10786// InboundNatPoolPropertiesFormat properties of Inbound NAT pool.
10787type InboundNatPoolPropertiesFormat struct {
10788	// FrontendIPConfiguration - A reference to frontend IP addresses.
10789	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
10790	// Protocol - Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
10791	Protocol TransportProtocol `json:"protocol,omitempty"`
10792	// 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.
10793	FrontendPortRangeStart *int32 `json:"frontendPortRangeStart,omitempty"`
10794	// 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.
10795	FrontendPortRangeEnd *int32 `json:"frontendPortRangeEnd,omitempty"`
10796	// BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 1 and 65535.
10797	BackendPort *int32 `json:"backendPort,omitempty"`
10798	// 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.
10799	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
10800	// 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.
10801	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
10802	// 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.
10803	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
10804	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
10805	ProvisioningState *string `json:"provisioningState,omitempty"`
10806}
10807
10808// InboundNatRule inbound NAT rule of the load balancer.
10809type InboundNatRule struct {
10810	autorest.Response `json:"-"`
10811	// InboundNatRulePropertiesFormat - Properties of load balancer inbound nat rule.
10812	*InboundNatRulePropertiesFormat `json:"properties,omitempty"`
10813	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
10814	Name *string `json:"name,omitempty"`
10815	// Etag - A unique read-only string that changes whenever the resource is updated.
10816	Etag *string `json:"etag,omitempty"`
10817	// ID - Resource ID.
10818	ID *string `json:"id,omitempty"`
10819}
10820
10821// MarshalJSON is the custom marshaler for InboundNatRule.
10822func (inr InboundNatRule) MarshalJSON() ([]byte, error) {
10823	objectMap := make(map[string]interface{})
10824	if inr.InboundNatRulePropertiesFormat != nil {
10825		objectMap["properties"] = inr.InboundNatRulePropertiesFormat
10826	}
10827	if inr.Name != nil {
10828		objectMap["name"] = inr.Name
10829	}
10830	if inr.Etag != nil {
10831		objectMap["etag"] = inr.Etag
10832	}
10833	if inr.ID != nil {
10834		objectMap["id"] = inr.ID
10835	}
10836	return json.Marshal(objectMap)
10837}
10838
10839// UnmarshalJSON is the custom unmarshaler for InboundNatRule struct.
10840func (inr *InboundNatRule) UnmarshalJSON(body []byte) error {
10841	var m map[string]*json.RawMessage
10842	err := json.Unmarshal(body, &m)
10843	if err != nil {
10844		return err
10845	}
10846	for k, v := range m {
10847		switch k {
10848		case "properties":
10849			if v != nil {
10850				var inboundNatRulePropertiesFormat InboundNatRulePropertiesFormat
10851				err = json.Unmarshal(*v, &inboundNatRulePropertiesFormat)
10852				if err != nil {
10853					return err
10854				}
10855				inr.InboundNatRulePropertiesFormat = &inboundNatRulePropertiesFormat
10856			}
10857		case "name":
10858			if v != nil {
10859				var name string
10860				err = json.Unmarshal(*v, &name)
10861				if err != nil {
10862					return err
10863				}
10864				inr.Name = &name
10865			}
10866		case "etag":
10867			if v != nil {
10868				var etag string
10869				err = json.Unmarshal(*v, &etag)
10870				if err != nil {
10871					return err
10872				}
10873				inr.Etag = &etag
10874			}
10875		case "id":
10876			if v != nil {
10877				var ID string
10878				err = json.Unmarshal(*v, &ID)
10879				if err != nil {
10880					return err
10881				}
10882				inr.ID = &ID
10883			}
10884		}
10885	}
10886
10887	return nil
10888}
10889
10890// InboundNatRuleListResult response for ListInboundNatRule API service call.
10891type InboundNatRuleListResult struct {
10892	autorest.Response `json:"-"`
10893	// Value - A list of inbound nat rules in a load balancer.
10894	Value *[]InboundNatRule `json:"value,omitempty"`
10895	// NextLink - READ-ONLY; The URL to get the next set of results.
10896	NextLink *string `json:"nextLink,omitempty"`
10897}
10898
10899// MarshalJSON is the custom marshaler for InboundNatRuleListResult.
10900func (inrlr InboundNatRuleListResult) MarshalJSON() ([]byte, error) {
10901	objectMap := make(map[string]interface{})
10902	if inrlr.Value != nil {
10903		objectMap["value"] = inrlr.Value
10904	}
10905	return json.Marshal(objectMap)
10906}
10907
10908// InboundNatRuleListResultIterator provides access to a complete listing of InboundNatRule values.
10909type InboundNatRuleListResultIterator struct {
10910	i    int
10911	page InboundNatRuleListResultPage
10912}
10913
10914// NextWithContext advances to the next value.  If there was an error making
10915// the request the iterator does not advance and the error is returned.
10916func (iter *InboundNatRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
10917	if tracing.IsEnabled() {
10918		ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultIterator.NextWithContext")
10919		defer func() {
10920			sc := -1
10921			if iter.Response().Response.Response != nil {
10922				sc = iter.Response().Response.Response.StatusCode
10923			}
10924			tracing.EndSpan(ctx, sc, err)
10925		}()
10926	}
10927	iter.i++
10928	if iter.i < len(iter.page.Values()) {
10929		return nil
10930	}
10931	err = iter.page.NextWithContext(ctx)
10932	if err != nil {
10933		iter.i--
10934		return err
10935	}
10936	iter.i = 0
10937	return nil
10938}
10939
10940// Next advances to the next value.  If there was an error making
10941// the request the iterator does not advance and the error is returned.
10942// Deprecated: Use NextWithContext() instead.
10943func (iter *InboundNatRuleListResultIterator) Next() error {
10944	return iter.NextWithContext(context.Background())
10945}
10946
10947// NotDone returns true if the enumeration should be started or is not yet complete.
10948func (iter InboundNatRuleListResultIterator) NotDone() bool {
10949	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10950}
10951
10952// Response returns the raw server response from the last page request.
10953func (iter InboundNatRuleListResultIterator) Response() InboundNatRuleListResult {
10954	return iter.page.Response()
10955}
10956
10957// Value returns the current value or a zero-initialized value if the
10958// iterator has advanced beyond the end of the collection.
10959func (iter InboundNatRuleListResultIterator) Value() InboundNatRule {
10960	if !iter.page.NotDone() {
10961		return InboundNatRule{}
10962	}
10963	return iter.page.Values()[iter.i]
10964}
10965
10966// Creates a new instance of the InboundNatRuleListResultIterator type.
10967func NewInboundNatRuleListResultIterator(page InboundNatRuleListResultPage) InboundNatRuleListResultIterator {
10968	return InboundNatRuleListResultIterator{page: page}
10969}
10970
10971// IsEmpty returns true if the ListResult contains no values.
10972func (inrlr InboundNatRuleListResult) IsEmpty() bool {
10973	return inrlr.Value == nil || len(*inrlr.Value) == 0
10974}
10975
10976// hasNextLink returns true if the NextLink is not empty.
10977func (inrlr InboundNatRuleListResult) hasNextLink() bool {
10978	return inrlr.NextLink != nil && len(*inrlr.NextLink) != 0
10979}
10980
10981// inboundNatRuleListResultPreparer prepares a request to retrieve the next set of results.
10982// It returns nil if no more results exist.
10983func (inrlr InboundNatRuleListResult) inboundNatRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
10984	if !inrlr.hasNextLink() {
10985		return nil, nil
10986	}
10987	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10988		autorest.AsJSON(),
10989		autorest.AsGet(),
10990		autorest.WithBaseURL(to.String(inrlr.NextLink)))
10991}
10992
10993// InboundNatRuleListResultPage contains a page of InboundNatRule values.
10994type InboundNatRuleListResultPage struct {
10995	fn    func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)
10996	inrlr InboundNatRuleListResult
10997}
10998
10999// NextWithContext advances to the next page of values.  If there was an error making
11000// the request the page does not advance and the error is returned.
11001func (page *InboundNatRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
11002	if tracing.IsEnabled() {
11003		ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultPage.NextWithContext")
11004		defer func() {
11005			sc := -1
11006			if page.Response().Response.Response != nil {
11007				sc = page.Response().Response.Response.StatusCode
11008			}
11009			tracing.EndSpan(ctx, sc, err)
11010		}()
11011	}
11012	for {
11013		next, err := page.fn(ctx, page.inrlr)
11014		if err != nil {
11015			return err
11016		}
11017		page.inrlr = next
11018		if !next.hasNextLink() || !next.IsEmpty() {
11019			break
11020		}
11021	}
11022	return nil
11023}
11024
11025// Next advances to the next page of values.  If there was an error making
11026// the request the page does not advance and the error is returned.
11027// Deprecated: Use NextWithContext() instead.
11028func (page *InboundNatRuleListResultPage) Next() error {
11029	return page.NextWithContext(context.Background())
11030}
11031
11032// NotDone returns true if the page enumeration should be started or is not yet complete.
11033func (page InboundNatRuleListResultPage) NotDone() bool {
11034	return !page.inrlr.IsEmpty()
11035}
11036
11037// Response returns the raw server response from the last page request.
11038func (page InboundNatRuleListResultPage) Response() InboundNatRuleListResult {
11039	return page.inrlr
11040}
11041
11042// Values returns the slice of values for the current page or nil if there are no values.
11043func (page InboundNatRuleListResultPage) Values() []InboundNatRule {
11044	if page.inrlr.IsEmpty() {
11045		return nil
11046	}
11047	return *page.inrlr.Value
11048}
11049
11050// Creates a new instance of the InboundNatRuleListResultPage type.
11051func NewInboundNatRuleListResultPage(cur InboundNatRuleListResult, getNextPage func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)) InboundNatRuleListResultPage {
11052	return InboundNatRuleListResultPage{
11053		fn:    getNextPage,
11054		inrlr: cur,
11055	}
11056}
11057
11058// InboundNatRulePropertiesFormat properties of the inbound NAT rule.
11059type InboundNatRulePropertiesFormat struct {
11060	// FrontendIPConfiguration - A reference to frontend IP addresses.
11061	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
11062	// 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.
11063	BackendIPConfiguration *InterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"`
11064	// Protocol - Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
11065	Protocol TransportProtocol `json:"protocol,omitempty"`
11066	// 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.
11067	FrontendPort *int32 `json:"frontendPort,omitempty"`
11068	// BackendPort - The port used for the internal endpoint. Acceptable values range from 1 to 65535.
11069	BackendPort *int32 `json:"backendPort,omitempty"`
11070	// 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.
11071	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
11072	// 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.
11073	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
11074	// 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.
11075	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
11076	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
11077	ProvisioningState *string `json:"provisioningState,omitempty"`
11078}
11079
11080// MarshalJSON is the custom marshaler for InboundNatRulePropertiesFormat.
11081func (inrpf InboundNatRulePropertiesFormat) MarshalJSON() ([]byte, error) {
11082	objectMap := make(map[string]interface{})
11083	if inrpf.FrontendIPConfiguration != nil {
11084		objectMap["frontendIPConfiguration"] = inrpf.FrontendIPConfiguration
11085	}
11086	if inrpf.Protocol != "" {
11087		objectMap["protocol"] = inrpf.Protocol
11088	}
11089	if inrpf.FrontendPort != nil {
11090		objectMap["frontendPort"] = inrpf.FrontendPort
11091	}
11092	if inrpf.BackendPort != nil {
11093		objectMap["backendPort"] = inrpf.BackendPort
11094	}
11095	if inrpf.IdleTimeoutInMinutes != nil {
11096		objectMap["idleTimeoutInMinutes"] = inrpf.IdleTimeoutInMinutes
11097	}
11098	if inrpf.EnableFloatingIP != nil {
11099		objectMap["enableFloatingIP"] = inrpf.EnableFloatingIP
11100	}
11101	if inrpf.EnableTCPReset != nil {
11102		objectMap["enableTcpReset"] = inrpf.EnableTCPReset
11103	}
11104	if inrpf.ProvisioningState != nil {
11105		objectMap["provisioningState"] = inrpf.ProvisioningState
11106	}
11107	return json.Marshal(objectMap)
11108}
11109
11110// InboundNatRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
11111// long-running operation.
11112type InboundNatRulesCreateOrUpdateFuture struct {
11113	azure.FutureAPI
11114	// Result returns the result of the asynchronous operation.
11115	// If the operation has not completed it will return an error.
11116	Result func(InboundNatRulesClient) (InboundNatRule, error)
11117}
11118
11119// InboundNatRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
11120// operation.
11121type InboundNatRulesDeleteFuture struct {
11122	azure.FutureAPI
11123	// Result returns the result of the asynchronous operation.
11124	// If the operation has not completed it will return an error.
11125	Result func(InboundNatRulesClient) (autorest.Response, error)
11126}
11127
11128// Interface a network interface in a resource group.
11129type Interface struct {
11130	autorest.Response `json:"-"`
11131	// InterfacePropertiesFormat - Properties of the network interface.
11132	*InterfacePropertiesFormat `json:"properties,omitempty"`
11133	// Etag - A unique read-only string that changes whenever the resource is updated.
11134	Etag *string `json:"etag,omitempty"`
11135	// ID - Resource ID.
11136	ID *string `json:"id,omitempty"`
11137	// Name - READ-ONLY; Resource name.
11138	Name *string `json:"name,omitempty"`
11139	// Type - READ-ONLY; Resource type.
11140	Type *string `json:"type,omitempty"`
11141	// Location - Resource location.
11142	Location *string `json:"location,omitempty"`
11143	// Tags - Resource tags.
11144	Tags map[string]*string `json:"tags"`
11145}
11146
11147// MarshalJSON is the custom marshaler for Interface.
11148func (i Interface) MarshalJSON() ([]byte, error) {
11149	objectMap := make(map[string]interface{})
11150	if i.InterfacePropertiesFormat != nil {
11151		objectMap["properties"] = i.InterfacePropertiesFormat
11152	}
11153	if i.Etag != nil {
11154		objectMap["etag"] = i.Etag
11155	}
11156	if i.ID != nil {
11157		objectMap["id"] = i.ID
11158	}
11159	if i.Location != nil {
11160		objectMap["location"] = i.Location
11161	}
11162	if i.Tags != nil {
11163		objectMap["tags"] = i.Tags
11164	}
11165	return json.Marshal(objectMap)
11166}
11167
11168// UnmarshalJSON is the custom unmarshaler for Interface struct.
11169func (i *Interface) UnmarshalJSON(body []byte) error {
11170	var m map[string]*json.RawMessage
11171	err := json.Unmarshal(body, &m)
11172	if err != nil {
11173		return err
11174	}
11175	for k, v := range m {
11176		switch k {
11177		case "properties":
11178			if v != nil {
11179				var interfacePropertiesFormat InterfacePropertiesFormat
11180				err = json.Unmarshal(*v, &interfacePropertiesFormat)
11181				if err != nil {
11182					return err
11183				}
11184				i.InterfacePropertiesFormat = &interfacePropertiesFormat
11185			}
11186		case "etag":
11187			if v != nil {
11188				var etag string
11189				err = json.Unmarshal(*v, &etag)
11190				if err != nil {
11191					return err
11192				}
11193				i.Etag = &etag
11194			}
11195		case "id":
11196			if v != nil {
11197				var ID string
11198				err = json.Unmarshal(*v, &ID)
11199				if err != nil {
11200					return err
11201				}
11202				i.ID = &ID
11203			}
11204		case "name":
11205			if v != nil {
11206				var name string
11207				err = json.Unmarshal(*v, &name)
11208				if err != nil {
11209					return err
11210				}
11211				i.Name = &name
11212			}
11213		case "type":
11214			if v != nil {
11215				var typeVar string
11216				err = json.Unmarshal(*v, &typeVar)
11217				if err != nil {
11218					return err
11219				}
11220				i.Type = &typeVar
11221			}
11222		case "location":
11223			if v != nil {
11224				var location string
11225				err = json.Unmarshal(*v, &location)
11226				if err != nil {
11227					return err
11228				}
11229				i.Location = &location
11230			}
11231		case "tags":
11232			if v != nil {
11233				var tags map[string]*string
11234				err = json.Unmarshal(*v, &tags)
11235				if err != nil {
11236					return err
11237				}
11238				i.Tags = tags
11239			}
11240		}
11241	}
11242
11243	return nil
11244}
11245
11246// InterfaceAssociation network interface and its custom security rules.
11247type InterfaceAssociation struct {
11248	// ID - READ-ONLY; Network interface ID.
11249	ID *string `json:"id,omitempty"`
11250	// SecurityRules - Collection of custom security rules.
11251	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
11252}
11253
11254// MarshalJSON is the custom marshaler for InterfaceAssociation.
11255func (ia InterfaceAssociation) MarshalJSON() ([]byte, error) {
11256	objectMap := make(map[string]interface{})
11257	if ia.SecurityRules != nil {
11258		objectMap["securityRules"] = ia.SecurityRules
11259	}
11260	return json.Marshal(objectMap)
11261}
11262
11263// InterfaceDNSSettings DNS settings of a network interface.
11264type InterfaceDNSSettings struct {
11265	// 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.
11266	DNSServers *[]string `json:"dnsServers,omitempty"`
11267	// AppliedDNSServers - 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.
11268	AppliedDNSServers *[]string `json:"appliedDnsServers,omitempty"`
11269	// InternalDNSNameLabel - Relative DNS name for this NIC used for internal communications between VMs in the same virtual network.
11270	InternalDNSNameLabel *string `json:"internalDnsNameLabel,omitempty"`
11271	// InternalFqdn - Fully qualified DNS name supporting internal communications between VMs in the same virtual network.
11272	InternalFqdn *string `json:"internalFqdn,omitempty"`
11273	// InternalDomainNameSuffix - 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.
11274	InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"`
11275}
11276
11277// InterfaceEndpoint interface endpoint resource.
11278type InterfaceEndpoint struct {
11279	autorest.Response `json:"-"`
11280	// InterfaceEndpointProperties - Properties of the interface endpoint.
11281	*InterfaceEndpointProperties `json:"properties,omitempty"`
11282	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
11283	Etag *string `json:"etag,omitempty"`
11284	// ID - Resource ID.
11285	ID *string `json:"id,omitempty"`
11286	// Name - READ-ONLY; Resource name.
11287	Name *string `json:"name,omitempty"`
11288	// Type - READ-ONLY; Resource type.
11289	Type *string `json:"type,omitempty"`
11290	// Location - Resource location.
11291	Location *string `json:"location,omitempty"`
11292	// Tags - Resource tags.
11293	Tags map[string]*string `json:"tags"`
11294}
11295
11296// MarshalJSON is the custom marshaler for InterfaceEndpoint.
11297func (ie InterfaceEndpoint) MarshalJSON() ([]byte, error) {
11298	objectMap := make(map[string]interface{})
11299	if ie.InterfaceEndpointProperties != nil {
11300		objectMap["properties"] = ie.InterfaceEndpointProperties
11301	}
11302	if ie.Etag != nil {
11303		objectMap["etag"] = ie.Etag
11304	}
11305	if ie.ID != nil {
11306		objectMap["id"] = ie.ID
11307	}
11308	if ie.Location != nil {
11309		objectMap["location"] = ie.Location
11310	}
11311	if ie.Tags != nil {
11312		objectMap["tags"] = ie.Tags
11313	}
11314	return json.Marshal(objectMap)
11315}
11316
11317// UnmarshalJSON is the custom unmarshaler for InterfaceEndpoint struct.
11318func (ie *InterfaceEndpoint) UnmarshalJSON(body []byte) error {
11319	var m map[string]*json.RawMessage
11320	err := json.Unmarshal(body, &m)
11321	if err != nil {
11322		return err
11323	}
11324	for k, v := range m {
11325		switch k {
11326		case "properties":
11327			if v != nil {
11328				var interfaceEndpointProperties InterfaceEndpointProperties
11329				err = json.Unmarshal(*v, &interfaceEndpointProperties)
11330				if err != nil {
11331					return err
11332				}
11333				ie.InterfaceEndpointProperties = &interfaceEndpointProperties
11334			}
11335		case "etag":
11336			if v != nil {
11337				var etag string
11338				err = json.Unmarshal(*v, &etag)
11339				if err != nil {
11340					return err
11341				}
11342				ie.Etag = &etag
11343			}
11344		case "id":
11345			if v != nil {
11346				var ID string
11347				err = json.Unmarshal(*v, &ID)
11348				if err != nil {
11349					return err
11350				}
11351				ie.ID = &ID
11352			}
11353		case "name":
11354			if v != nil {
11355				var name string
11356				err = json.Unmarshal(*v, &name)
11357				if err != nil {
11358					return err
11359				}
11360				ie.Name = &name
11361			}
11362		case "type":
11363			if v != nil {
11364				var typeVar string
11365				err = json.Unmarshal(*v, &typeVar)
11366				if err != nil {
11367					return err
11368				}
11369				ie.Type = &typeVar
11370			}
11371		case "location":
11372			if v != nil {
11373				var location string
11374				err = json.Unmarshal(*v, &location)
11375				if err != nil {
11376					return err
11377				}
11378				ie.Location = &location
11379			}
11380		case "tags":
11381			if v != nil {
11382				var tags map[string]*string
11383				err = json.Unmarshal(*v, &tags)
11384				if err != nil {
11385					return err
11386				}
11387				ie.Tags = tags
11388			}
11389		}
11390	}
11391
11392	return nil
11393}
11394
11395// InterfaceEndpointListResult response for the ListInterfaceEndpoints API service call.
11396type InterfaceEndpointListResult struct {
11397	autorest.Response `json:"-"`
11398	// Value - Gets a list of InterfaceEndpoint resources in a resource group.
11399	Value *[]InterfaceEndpoint `json:"value,omitempty"`
11400	// NextLink - READ-ONLY; The URL to get the next set of results.
11401	NextLink *string `json:"nextLink,omitempty"`
11402}
11403
11404// MarshalJSON is the custom marshaler for InterfaceEndpointListResult.
11405func (ielr InterfaceEndpointListResult) MarshalJSON() ([]byte, error) {
11406	objectMap := make(map[string]interface{})
11407	if ielr.Value != nil {
11408		objectMap["value"] = ielr.Value
11409	}
11410	return json.Marshal(objectMap)
11411}
11412
11413// InterfaceEndpointListResultIterator provides access to a complete listing of InterfaceEndpoint values.
11414type InterfaceEndpointListResultIterator struct {
11415	i    int
11416	page InterfaceEndpointListResultPage
11417}
11418
11419// NextWithContext advances to the next value.  If there was an error making
11420// the request the iterator does not advance and the error is returned.
11421func (iter *InterfaceEndpointListResultIterator) NextWithContext(ctx context.Context) (err error) {
11422	if tracing.IsEnabled() {
11423		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceEndpointListResultIterator.NextWithContext")
11424		defer func() {
11425			sc := -1
11426			if iter.Response().Response.Response != nil {
11427				sc = iter.Response().Response.Response.StatusCode
11428			}
11429			tracing.EndSpan(ctx, sc, err)
11430		}()
11431	}
11432	iter.i++
11433	if iter.i < len(iter.page.Values()) {
11434		return nil
11435	}
11436	err = iter.page.NextWithContext(ctx)
11437	if err != nil {
11438		iter.i--
11439		return err
11440	}
11441	iter.i = 0
11442	return nil
11443}
11444
11445// Next advances to the next value.  If there was an error making
11446// the request the iterator does not advance and the error is returned.
11447// Deprecated: Use NextWithContext() instead.
11448func (iter *InterfaceEndpointListResultIterator) Next() error {
11449	return iter.NextWithContext(context.Background())
11450}
11451
11452// NotDone returns true if the enumeration should be started or is not yet complete.
11453func (iter InterfaceEndpointListResultIterator) NotDone() bool {
11454	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11455}
11456
11457// Response returns the raw server response from the last page request.
11458func (iter InterfaceEndpointListResultIterator) Response() InterfaceEndpointListResult {
11459	return iter.page.Response()
11460}
11461
11462// Value returns the current value or a zero-initialized value if the
11463// iterator has advanced beyond the end of the collection.
11464func (iter InterfaceEndpointListResultIterator) Value() InterfaceEndpoint {
11465	if !iter.page.NotDone() {
11466		return InterfaceEndpoint{}
11467	}
11468	return iter.page.Values()[iter.i]
11469}
11470
11471// Creates a new instance of the InterfaceEndpointListResultIterator type.
11472func NewInterfaceEndpointListResultIterator(page InterfaceEndpointListResultPage) InterfaceEndpointListResultIterator {
11473	return InterfaceEndpointListResultIterator{page: page}
11474}
11475
11476// IsEmpty returns true if the ListResult contains no values.
11477func (ielr InterfaceEndpointListResult) IsEmpty() bool {
11478	return ielr.Value == nil || len(*ielr.Value) == 0
11479}
11480
11481// hasNextLink returns true if the NextLink is not empty.
11482func (ielr InterfaceEndpointListResult) hasNextLink() bool {
11483	return ielr.NextLink != nil && len(*ielr.NextLink) != 0
11484}
11485
11486// interfaceEndpointListResultPreparer prepares a request to retrieve the next set of results.
11487// It returns nil if no more results exist.
11488func (ielr InterfaceEndpointListResult) interfaceEndpointListResultPreparer(ctx context.Context) (*http.Request, error) {
11489	if !ielr.hasNextLink() {
11490		return nil, nil
11491	}
11492	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11493		autorest.AsJSON(),
11494		autorest.AsGet(),
11495		autorest.WithBaseURL(to.String(ielr.NextLink)))
11496}
11497
11498// InterfaceEndpointListResultPage contains a page of InterfaceEndpoint values.
11499type InterfaceEndpointListResultPage struct {
11500	fn   func(context.Context, InterfaceEndpointListResult) (InterfaceEndpointListResult, error)
11501	ielr InterfaceEndpointListResult
11502}
11503
11504// NextWithContext advances to the next page of values.  If there was an error making
11505// the request the page does not advance and the error is returned.
11506func (page *InterfaceEndpointListResultPage) NextWithContext(ctx context.Context) (err error) {
11507	if tracing.IsEnabled() {
11508		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceEndpointListResultPage.NextWithContext")
11509		defer func() {
11510			sc := -1
11511			if page.Response().Response.Response != nil {
11512				sc = page.Response().Response.Response.StatusCode
11513			}
11514			tracing.EndSpan(ctx, sc, err)
11515		}()
11516	}
11517	for {
11518		next, err := page.fn(ctx, page.ielr)
11519		if err != nil {
11520			return err
11521		}
11522		page.ielr = next
11523		if !next.hasNextLink() || !next.IsEmpty() {
11524			break
11525		}
11526	}
11527	return nil
11528}
11529
11530// Next advances to the next page of values.  If there was an error making
11531// the request the page does not advance and the error is returned.
11532// Deprecated: Use NextWithContext() instead.
11533func (page *InterfaceEndpointListResultPage) Next() error {
11534	return page.NextWithContext(context.Background())
11535}
11536
11537// NotDone returns true if the page enumeration should be started or is not yet complete.
11538func (page InterfaceEndpointListResultPage) NotDone() bool {
11539	return !page.ielr.IsEmpty()
11540}
11541
11542// Response returns the raw server response from the last page request.
11543func (page InterfaceEndpointListResultPage) Response() InterfaceEndpointListResult {
11544	return page.ielr
11545}
11546
11547// Values returns the slice of values for the current page or nil if there are no values.
11548func (page InterfaceEndpointListResultPage) Values() []InterfaceEndpoint {
11549	if page.ielr.IsEmpty() {
11550		return nil
11551	}
11552	return *page.ielr.Value
11553}
11554
11555// Creates a new instance of the InterfaceEndpointListResultPage type.
11556func NewInterfaceEndpointListResultPage(cur InterfaceEndpointListResult, getNextPage func(context.Context, InterfaceEndpointListResult) (InterfaceEndpointListResult, error)) InterfaceEndpointListResultPage {
11557	return InterfaceEndpointListResultPage{
11558		fn:   getNextPage,
11559		ielr: cur,
11560	}
11561}
11562
11563// InterfaceEndpointProperties properties of the interface endpoint.
11564type InterfaceEndpointProperties struct {
11565	// Fqdn - A first-party service's FQDN that is mapped to the private IP allocated via this interface endpoint.
11566	Fqdn *string `json:"fqdn,omitempty"`
11567	// EndpointService - A reference to the service being brought into the virtual network.
11568	EndpointService *EndpointService `json:"endpointService,omitempty"`
11569	// Subnet - The ID of the subnet from which the private IP will be allocated.
11570	Subnet *Subnet `json:"subnet,omitempty"`
11571	// NetworkInterfaces - READ-ONLY; Gets an array of references to the network interfaces created for this interface endpoint.
11572	NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"`
11573	// Owner - READ-ONLY; A read-only property that identifies who created this interface endpoint.
11574	Owner *string `json:"owner,omitempty"`
11575	// ProvisioningState - READ-ONLY; The provisioning state of the interface endpoint. Possible values are: 'Updating', 'Deleting', and 'Failed'.
11576	ProvisioningState *string `json:"provisioningState,omitempty"`
11577}
11578
11579// MarshalJSON is the custom marshaler for InterfaceEndpointProperties.
11580func (iep InterfaceEndpointProperties) MarshalJSON() ([]byte, error) {
11581	objectMap := make(map[string]interface{})
11582	if iep.Fqdn != nil {
11583		objectMap["fqdn"] = iep.Fqdn
11584	}
11585	if iep.EndpointService != nil {
11586		objectMap["endpointService"] = iep.EndpointService
11587	}
11588	if iep.Subnet != nil {
11589		objectMap["subnet"] = iep.Subnet
11590	}
11591	return json.Marshal(objectMap)
11592}
11593
11594// InterfaceEndpointsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
11595// long-running operation.
11596type InterfaceEndpointsCreateOrUpdateFuture struct {
11597	azure.FutureAPI
11598	// Result returns the result of the asynchronous operation.
11599	// If the operation has not completed it will return an error.
11600	Result func(InterfaceEndpointsClient) (InterfaceEndpoint, error)
11601}
11602
11603// InterfaceEndpointsDeleteFuture an abstraction for monitoring and retrieving the results of a
11604// long-running operation.
11605type InterfaceEndpointsDeleteFuture struct {
11606	azure.FutureAPI
11607	// Result returns the result of the asynchronous operation.
11608	// If the operation has not completed it will return an error.
11609	Result func(InterfaceEndpointsClient) (autorest.Response, error)
11610}
11611
11612// InterfaceIPConfiguration iPConfiguration in a network interface.
11613type InterfaceIPConfiguration struct {
11614	autorest.Response `json:"-"`
11615	// InterfaceIPConfigurationPropertiesFormat - Network interface IP configuration properties.
11616	*InterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"`
11617	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
11618	Name *string `json:"name,omitempty"`
11619	// Etag - A unique read-only string that changes whenever the resource is updated.
11620	Etag *string `json:"etag,omitempty"`
11621	// ID - Resource ID.
11622	ID *string `json:"id,omitempty"`
11623}
11624
11625// MarshalJSON is the custom marshaler for InterfaceIPConfiguration.
11626func (iic InterfaceIPConfiguration) MarshalJSON() ([]byte, error) {
11627	objectMap := make(map[string]interface{})
11628	if iic.InterfaceIPConfigurationPropertiesFormat != nil {
11629		objectMap["properties"] = iic.InterfaceIPConfigurationPropertiesFormat
11630	}
11631	if iic.Name != nil {
11632		objectMap["name"] = iic.Name
11633	}
11634	if iic.Etag != nil {
11635		objectMap["etag"] = iic.Etag
11636	}
11637	if iic.ID != nil {
11638		objectMap["id"] = iic.ID
11639	}
11640	return json.Marshal(objectMap)
11641}
11642
11643// UnmarshalJSON is the custom unmarshaler for InterfaceIPConfiguration struct.
11644func (iic *InterfaceIPConfiguration) UnmarshalJSON(body []byte) error {
11645	var m map[string]*json.RawMessage
11646	err := json.Unmarshal(body, &m)
11647	if err != nil {
11648		return err
11649	}
11650	for k, v := range m {
11651		switch k {
11652		case "properties":
11653			if v != nil {
11654				var interfaceIPConfigurationPropertiesFormat InterfaceIPConfigurationPropertiesFormat
11655				err = json.Unmarshal(*v, &interfaceIPConfigurationPropertiesFormat)
11656				if err != nil {
11657					return err
11658				}
11659				iic.InterfaceIPConfigurationPropertiesFormat = &interfaceIPConfigurationPropertiesFormat
11660			}
11661		case "name":
11662			if v != nil {
11663				var name string
11664				err = json.Unmarshal(*v, &name)
11665				if err != nil {
11666					return err
11667				}
11668				iic.Name = &name
11669			}
11670		case "etag":
11671			if v != nil {
11672				var etag string
11673				err = json.Unmarshal(*v, &etag)
11674				if err != nil {
11675					return err
11676				}
11677				iic.Etag = &etag
11678			}
11679		case "id":
11680			if v != nil {
11681				var ID string
11682				err = json.Unmarshal(*v, &ID)
11683				if err != nil {
11684					return err
11685				}
11686				iic.ID = &ID
11687			}
11688		}
11689	}
11690
11691	return nil
11692}
11693
11694// InterfaceIPConfigurationListResult response for list ip configurations API service call.
11695type InterfaceIPConfigurationListResult struct {
11696	autorest.Response `json:"-"`
11697	// Value - A list of ip configurations.
11698	Value *[]InterfaceIPConfiguration `json:"value,omitempty"`
11699	// NextLink - READ-ONLY; The URL to get the next set of results.
11700	NextLink *string `json:"nextLink,omitempty"`
11701}
11702
11703// MarshalJSON is the custom marshaler for InterfaceIPConfigurationListResult.
11704func (iiclr InterfaceIPConfigurationListResult) MarshalJSON() ([]byte, error) {
11705	objectMap := make(map[string]interface{})
11706	if iiclr.Value != nil {
11707		objectMap["value"] = iiclr.Value
11708	}
11709	return json.Marshal(objectMap)
11710}
11711
11712// InterfaceIPConfigurationListResultIterator provides access to a complete listing of
11713// InterfaceIPConfiguration values.
11714type InterfaceIPConfigurationListResultIterator struct {
11715	i    int
11716	page InterfaceIPConfigurationListResultPage
11717}
11718
11719// NextWithContext advances to the next value.  If there was an error making
11720// the request the iterator does not advance and the error is returned.
11721func (iter *InterfaceIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
11722	if tracing.IsEnabled() {
11723		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultIterator.NextWithContext")
11724		defer func() {
11725			sc := -1
11726			if iter.Response().Response.Response != nil {
11727				sc = iter.Response().Response.Response.StatusCode
11728			}
11729			tracing.EndSpan(ctx, sc, err)
11730		}()
11731	}
11732	iter.i++
11733	if iter.i < len(iter.page.Values()) {
11734		return nil
11735	}
11736	err = iter.page.NextWithContext(ctx)
11737	if err != nil {
11738		iter.i--
11739		return err
11740	}
11741	iter.i = 0
11742	return nil
11743}
11744
11745// Next advances to the next value.  If there was an error making
11746// the request the iterator does not advance and the error is returned.
11747// Deprecated: Use NextWithContext() instead.
11748func (iter *InterfaceIPConfigurationListResultIterator) Next() error {
11749	return iter.NextWithContext(context.Background())
11750}
11751
11752// NotDone returns true if the enumeration should be started or is not yet complete.
11753func (iter InterfaceIPConfigurationListResultIterator) NotDone() bool {
11754	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11755}
11756
11757// Response returns the raw server response from the last page request.
11758func (iter InterfaceIPConfigurationListResultIterator) Response() InterfaceIPConfigurationListResult {
11759	return iter.page.Response()
11760}
11761
11762// Value returns the current value or a zero-initialized value if the
11763// iterator has advanced beyond the end of the collection.
11764func (iter InterfaceIPConfigurationListResultIterator) Value() InterfaceIPConfiguration {
11765	if !iter.page.NotDone() {
11766		return InterfaceIPConfiguration{}
11767	}
11768	return iter.page.Values()[iter.i]
11769}
11770
11771// Creates a new instance of the InterfaceIPConfigurationListResultIterator type.
11772func NewInterfaceIPConfigurationListResultIterator(page InterfaceIPConfigurationListResultPage) InterfaceIPConfigurationListResultIterator {
11773	return InterfaceIPConfigurationListResultIterator{page: page}
11774}
11775
11776// IsEmpty returns true if the ListResult contains no values.
11777func (iiclr InterfaceIPConfigurationListResult) IsEmpty() bool {
11778	return iiclr.Value == nil || len(*iiclr.Value) == 0
11779}
11780
11781// hasNextLink returns true if the NextLink is not empty.
11782func (iiclr InterfaceIPConfigurationListResult) hasNextLink() bool {
11783	return iiclr.NextLink != nil && len(*iiclr.NextLink) != 0
11784}
11785
11786// interfaceIPConfigurationListResultPreparer prepares a request to retrieve the next set of results.
11787// It returns nil if no more results exist.
11788func (iiclr InterfaceIPConfigurationListResult) interfaceIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
11789	if !iiclr.hasNextLink() {
11790		return nil, nil
11791	}
11792	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11793		autorest.AsJSON(),
11794		autorest.AsGet(),
11795		autorest.WithBaseURL(to.String(iiclr.NextLink)))
11796}
11797
11798// InterfaceIPConfigurationListResultPage contains a page of InterfaceIPConfiguration values.
11799type InterfaceIPConfigurationListResultPage struct {
11800	fn    func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)
11801	iiclr InterfaceIPConfigurationListResult
11802}
11803
11804// NextWithContext advances to the next page of values.  If there was an error making
11805// the request the page does not advance and the error is returned.
11806func (page *InterfaceIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
11807	if tracing.IsEnabled() {
11808		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultPage.NextWithContext")
11809		defer func() {
11810			sc := -1
11811			if page.Response().Response.Response != nil {
11812				sc = page.Response().Response.Response.StatusCode
11813			}
11814			tracing.EndSpan(ctx, sc, err)
11815		}()
11816	}
11817	for {
11818		next, err := page.fn(ctx, page.iiclr)
11819		if err != nil {
11820			return err
11821		}
11822		page.iiclr = next
11823		if !next.hasNextLink() || !next.IsEmpty() {
11824			break
11825		}
11826	}
11827	return nil
11828}
11829
11830// Next advances to the next page of values.  If there was an error making
11831// the request the page does not advance and the error is returned.
11832// Deprecated: Use NextWithContext() instead.
11833func (page *InterfaceIPConfigurationListResultPage) Next() error {
11834	return page.NextWithContext(context.Background())
11835}
11836
11837// NotDone returns true if the page enumeration should be started or is not yet complete.
11838func (page InterfaceIPConfigurationListResultPage) NotDone() bool {
11839	return !page.iiclr.IsEmpty()
11840}
11841
11842// Response returns the raw server response from the last page request.
11843func (page InterfaceIPConfigurationListResultPage) Response() InterfaceIPConfigurationListResult {
11844	return page.iiclr
11845}
11846
11847// Values returns the slice of values for the current page or nil if there are no values.
11848func (page InterfaceIPConfigurationListResultPage) Values() []InterfaceIPConfiguration {
11849	if page.iiclr.IsEmpty() {
11850		return nil
11851	}
11852	return *page.iiclr.Value
11853}
11854
11855// Creates a new instance of the InterfaceIPConfigurationListResultPage type.
11856func NewInterfaceIPConfigurationListResultPage(cur InterfaceIPConfigurationListResult, getNextPage func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)) InterfaceIPConfigurationListResultPage {
11857	return InterfaceIPConfigurationListResultPage{
11858		fn:    getNextPage,
11859		iiclr: cur,
11860	}
11861}
11862
11863// InterfaceIPConfigurationPropertiesFormat properties of IP configuration.
11864type InterfaceIPConfigurationPropertiesFormat struct {
11865	// VirtualNetworkTaps - The reference to Virtual Network Taps.
11866	VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"`
11867	// ApplicationGatewayBackendAddressPools - The reference of ApplicationGatewayBackendAddressPool resource.
11868	ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"`
11869	// LoadBalancerBackendAddressPools - The reference of LoadBalancerBackendAddressPool resource.
11870	LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"`
11871	// LoadBalancerInboundNatRules - A list of references of LoadBalancerInboundNatRules.
11872	LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"`
11873	// PrivateIPAddress - Private IP address of the IP configuration.
11874	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
11875	// PrivateIPAllocationMethod - Defines how a private IP address is assigned. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
11876	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
11877	// PrivateIPAddressVersion - Available from Api-Version 2016-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4.  Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6'
11878	PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
11879	// Subnet - Subnet bound to the IP configuration.
11880	Subnet *Subnet `json:"subnet,omitempty"`
11881	// Primary - Gets whether this is a primary customer address on the network interface.
11882	Primary *bool `json:"primary,omitempty"`
11883	// PublicIPAddress - Public IP address bound to the IP configuration.
11884	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
11885	// ApplicationSecurityGroups - Application security groups in which the IP configuration is included.
11886	ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"`
11887	// ProvisioningState - The provisioning state of the network interface IP configuration. Possible values are: 'Updating', 'Deleting', and 'Failed'.
11888	ProvisioningState *string `json:"provisioningState,omitempty"`
11889}
11890
11891// InterfaceListResult response for the ListNetworkInterface API service call.
11892type InterfaceListResult struct {
11893	autorest.Response `json:"-"`
11894	// Value - A list of network interfaces in a resource group.
11895	Value *[]Interface `json:"value,omitempty"`
11896	// NextLink - READ-ONLY; The URL to get the next set of results.
11897	NextLink *string `json:"nextLink,omitempty"`
11898}
11899
11900// MarshalJSON is the custom marshaler for InterfaceListResult.
11901func (ilr InterfaceListResult) MarshalJSON() ([]byte, error) {
11902	objectMap := make(map[string]interface{})
11903	if ilr.Value != nil {
11904		objectMap["value"] = ilr.Value
11905	}
11906	return json.Marshal(objectMap)
11907}
11908
11909// InterfaceListResultIterator provides access to a complete listing of Interface values.
11910type InterfaceListResultIterator struct {
11911	i    int
11912	page InterfaceListResultPage
11913}
11914
11915// NextWithContext advances to the next value.  If there was an error making
11916// the request the iterator does not advance and the error is returned.
11917func (iter *InterfaceListResultIterator) NextWithContext(ctx context.Context) (err error) {
11918	if tracing.IsEnabled() {
11919		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultIterator.NextWithContext")
11920		defer func() {
11921			sc := -1
11922			if iter.Response().Response.Response != nil {
11923				sc = iter.Response().Response.Response.StatusCode
11924			}
11925			tracing.EndSpan(ctx, sc, err)
11926		}()
11927	}
11928	iter.i++
11929	if iter.i < len(iter.page.Values()) {
11930		return nil
11931	}
11932	err = iter.page.NextWithContext(ctx)
11933	if err != nil {
11934		iter.i--
11935		return err
11936	}
11937	iter.i = 0
11938	return nil
11939}
11940
11941// Next advances to the next value.  If there was an error making
11942// the request the iterator does not advance and the error is returned.
11943// Deprecated: Use NextWithContext() instead.
11944func (iter *InterfaceListResultIterator) Next() error {
11945	return iter.NextWithContext(context.Background())
11946}
11947
11948// NotDone returns true if the enumeration should be started or is not yet complete.
11949func (iter InterfaceListResultIterator) NotDone() bool {
11950	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11951}
11952
11953// Response returns the raw server response from the last page request.
11954func (iter InterfaceListResultIterator) Response() InterfaceListResult {
11955	return iter.page.Response()
11956}
11957
11958// Value returns the current value or a zero-initialized value if the
11959// iterator has advanced beyond the end of the collection.
11960func (iter InterfaceListResultIterator) Value() Interface {
11961	if !iter.page.NotDone() {
11962		return Interface{}
11963	}
11964	return iter.page.Values()[iter.i]
11965}
11966
11967// Creates a new instance of the InterfaceListResultIterator type.
11968func NewInterfaceListResultIterator(page InterfaceListResultPage) InterfaceListResultIterator {
11969	return InterfaceListResultIterator{page: page}
11970}
11971
11972// IsEmpty returns true if the ListResult contains no values.
11973func (ilr InterfaceListResult) IsEmpty() bool {
11974	return ilr.Value == nil || len(*ilr.Value) == 0
11975}
11976
11977// hasNextLink returns true if the NextLink is not empty.
11978func (ilr InterfaceListResult) hasNextLink() bool {
11979	return ilr.NextLink != nil && len(*ilr.NextLink) != 0
11980}
11981
11982// interfaceListResultPreparer prepares a request to retrieve the next set of results.
11983// It returns nil if no more results exist.
11984func (ilr InterfaceListResult) interfaceListResultPreparer(ctx context.Context) (*http.Request, error) {
11985	if !ilr.hasNextLink() {
11986		return nil, nil
11987	}
11988	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11989		autorest.AsJSON(),
11990		autorest.AsGet(),
11991		autorest.WithBaseURL(to.String(ilr.NextLink)))
11992}
11993
11994// InterfaceListResultPage contains a page of Interface values.
11995type InterfaceListResultPage struct {
11996	fn  func(context.Context, InterfaceListResult) (InterfaceListResult, error)
11997	ilr InterfaceListResult
11998}
11999
12000// NextWithContext advances to the next page of values.  If there was an error making
12001// the request the page does not advance and the error is returned.
12002func (page *InterfaceListResultPage) NextWithContext(ctx context.Context) (err error) {
12003	if tracing.IsEnabled() {
12004		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultPage.NextWithContext")
12005		defer func() {
12006			sc := -1
12007			if page.Response().Response.Response != nil {
12008				sc = page.Response().Response.Response.StatusCode
12009			}
12010			tracing.EndSpan(ctx, sc, err)
12011		}()
12012	}
12013	for {
12014		next, err := page.fn(ctx, page.ilr)
12015		if err != nil {
12016			return err
12017		}
12018		page.ilr = next
12019		if !next.hasNextLink() || !next.IsEmpty() {
12020			break
12021		}
12022	}
12023	return nil
12024}
12025
12026// Next advances to the next page of values.  If there was an error making
12027// the request the page does not advance and the error is returned.
12028// Deprecated: Use NextWithContext() instead.
12029func (page *InterfaceListResultPage) Next() error {
12030	return page.NextWithContext(context.Background())
12031}
12032
12033// NotDone returns true if the page enumeration should be started or is not yet complete.
12034func (page InterfaceListResultPage) NotDone() bool {
12035	return !page.ilr.IsEmpty()
12036}
12037
12038// Response returns the raw server response from the last page request.
12039func (page InterfaceListResultPage) Response() InterfaceListResult {
12040	return page.ilr
12041}
12042
12043// Values returns the slice of values for the current page or nil if there are no values.
12044func (page InterfaceListResultPage) Values() []Interface {
12045	if page.ilr.IsEmpty() {
12046		return nil
12047	}
12048	return *page.ilr.Value
12049}
12050
12051// Creates a new instance of the InterfaceListResultPage type.
12052func NewInterfaceListResultPage(cur InterfaceListResult, getNextPage func(context.Context, InterfaceListResult) (InterfaceListResult, error)) InterfaceListResultPage {
12053	return InterfaceListResultPage{
12054		fn:  getNextPage,
12055		ilr: cur,
12056	}
12057}
12058
12059// InterfaceLoadBalancerListResult response for list ip configurations API service call.
12060type InterfaceLoadBalancerListResult struct {
12061	autorest.Response `json:"-"`
12062	// Value - A list of load balancers.
12063	Value *[]LoadBalancer `json:"value,omitempty"`
12064	// NextLink - READ-ONLY; The URL to get the next set of results.
12065	NextLink *string `json:"nextLink,omitempty"`
12066}
12067
12068// MarshalJSON is the custom marshaler for InterfaceLoadBalancerListResult.
12069func (ilblr InterfaceLoadBalancerListResult) MarshalJSON() ([]byte, error) {
12070	objectMap := make(map[string]interface{})
12071	if ilblr.Value != nil {
12072		objectMap["value"] = ilblr.Value
12073	}
12074	return json.Marshal(objectMap)
12075}
12076
12077// InterfaceLoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values.
12078type InterfaceLoadBalancerListResultIterator struct {
12079	i    int
12080	page InterfaceLoadBalancerListResultPage
12081}
12082
12083// NextWithContext advances to the next value.  If there was an error making
12084// the request the iterator does not advance and the error is returned.
12085func (iter *InterfaceLoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) {
12086	if tracing.IsEnabled() {
12087		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultIterator.NextWithContext")
12088		defer func() {
12089			sc := -1
12090			if iter.Response().Response.Response != nil {
12091				sc = iter.Response().Response.Response.StatusCode
12092			}
12093			tracing.EndSpan(ctx, sc, err)
12094		}()
12095	}
12096	iter.i++
12097	if iter.i < len(iter.page.Values()) {
12098		return nil
12099	}
12100	err = iter.page.NextWithContext(ctx)
12101	if err != nil {
12102		iter.i--
12103		return err
12104	}
12105	iter.i = 0
12106	return nil
12107}
12108
12109// Next advances to the next value.  If there was an error making
12110// the request the iterator does not advance and the error is returned.
12111// Deprecated: Use NextWithContext() instead.
12112func (iter *InterfaceLoadBalancerListResultIterator) Next() error {
12113	return iter.NextWithContext(context.Background())
12114}
12115
12116// NotDone returns true if the enumeration should be started or is not yet complete.
12117func (iter InterfaceLoadBalancerListResultIterator) NotDone() bool {
12118	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12119}
12120
12121// Response returns the raw server response from the last page request.
12122func (iter InterfaceLoadBalancerListResultIterator) Response() InterfaceLoadBalancerListResult {
12123	return iter.page.Response()
12124}
12125
12126// Value returns the current value or a zero-initialized value if the
12127// iterator has advanced beyond the end of the collection.
12128func (iter InterfaceLoadBalancerListResultIterator) Value() LoadBalancer {
12129	if !iter.page.NotDone() {
12130		return LoadBalancer{}
12131	}
12132	return iter.page.Values()[iter.i]
12133}
12134
12135// Creates a new instance of the InterfaceLoadBalancerListResultIterator type.
12136func NewInterfaceLoadBalancerListResultIterator(page InterfaceLoadBalancerListResultPage) InterfaceLoadBalancerListResultIterator {
12137	return InterfaceLoadBalancerListResultIterator{page: page}
12138}
12139
12140// IsEmpty returns true if the ListResult contains no values.
12141func (ilblr InterfaceLoadBalancerListResult) IsEmpty() bool {
12142	return ilblr.Value == nil || len(*ilblr.Value) == 0
12143}
12144
12145// hasNextLink returns true if the NextLink is not empty.
12146func (ilblr InterfaceLoadBalancerListResult) hasNextLink() bool {
12147	return ilblr.NextLink != nil && len(*ilblr.NextLink) != 0
12148}
12149
12150// interfaceLoadBalancerListResultPreparer prepares a request to retrieve the next set of results.
12151// It returns nil if no more results exist.
12152func (ilblr InterfaceLoadBalancerListResult) interfaceLoadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) {
12153	if !ilblr.hasNextLink() {
12154		return nil, nil
12155	}
12156	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12157		autorest.AsJSON(),
12158		autorest.AsGet(),
12159		autorest.WithBaseURL(to.String(ilblr.NextLink)))
12160}
12161
12162// InterfaceLoadBalancerListResultPage contains a page of LoadBalancer values.
12163type InterfaceLoadBalancerListResultPage struct {
12164	fn    func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)
12165	ilblr InterfaceLoadBalancerListResult
12166}
12167
12168// NextWithContext advances to the next page of values.  If there was an error making
12169// the request the page does not advance and the error is returned.
12170func (page *InterfaceLoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) {
12171	if tracing.IsEnabled() {
12172		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultPage.NextWithContext")
12173		defer func() {
12174			sc := -1
12175			if page.Response().Response.Response != nil {
12176				sc = page.Response().Response.Response.StatusCode
12177			}
12178			tracing.EndSpan(ctx, sc, err)
12179		}()
12180	}
12181	for {
12182		next, err := page.fn(ctx, page.ilblr)
12183		if err != nil {
12184			return err
12185		}
12186		page.ilblr = next
12187		if !next.hasNextLink() || !next.IsEmpty() {
12188			break
12189		}
12190	}
12191	return nil
12192}
12193
12194// Next advances to the next page of values.  If there was an error making
12195// the request the page does not advance and the error is returned.
12196// Deprecated: Use NextWithContext() instead.
12197func (page *InterfaceLoadBalancerListResultPage) Next() error {
12198	return page.NextWithContext(context.Background())
12199}
12200
12201// NotDone returns true if the page enumeration should be started or is not yet complete.
12202func (page InterfaceLoadBalancerListResultPage) NotDone() bool {
12203	return !page.ilblr.IsEmpty()
12204}
12205
12206// Response returns the raw server response from the last page request.
12207func (page InterfaceLoadBalancerListResultPage) Response() InterfaceLoadBalancerListResult {
12208	return page.ilblr
12209}
12210
12211// Values returns the slice of values for the current page or nil if there are no values.
12212func (page InterfaceLoadBalancerListResultPage) Values() []LoadBalancer {
12213	if page.ilblr.IsEmpty() {
12214		return nil
12215	}
12216	return *page.ilblr.Value
12217}
12218
12219// Creates a new instance of the InterfaceLoadBalancerListResultPage type.
12220func NewInterfaceLoadBalancerListResultPage(cur InterfaceLoadBalancerListResult, getNextPage func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)) InterfaceLoadBalancerListResultPage {
12221	return InterfaceLoadBalancerListResultPage{
12222		fn:    getNextPage,
12223		ilblr: cur,
12224	}
12225}
12226
12227// InterfacePropertiesFormat networkInterface properties.
12228type InterfacePropertiesFormat struct {
12229	// VirtualMachine - READ-ONLY; The reference of a virtual machine.
12230	VirtualMachine *SubResource `json:"virtualMachine,omitempty"`
12231	// NetworkSecurityGroup - The reference of the NetworkSecurityGroup resource.
12232	NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"`
12233	// InterfaceEndpoint - READ-ONLY; A reference to the interface endpoint to which the network interface is linked.
12234	InterfaceEndpoint *InterfaceEndpoint `json:"interfaceEndpoint,omitempty"`
12235	// IPConfigurations - A list of IPConfigurations of the network interface.
12236	IPConfigurations *[]InterfaceIPConfiguration `json:"ipConfigurations,omitempty"`
12237	// TapConfigurations - A list of TapConfigurations of the network interface.
12238	TapConfigurations *[]InterfaceTapConfiguration `json:"tapConfigurations,omitempty"`
12239	// DNSSettings - The DNS settings in network interface.
12240	DNSSettings *InterfaceDNSSettings `json:"dnsSettings,omitempty"`
12241	// MacAddress - The MAC address of the network interface.
12242	MacAddress *string `json:"macAddress,omitempty"`
12243	// Primary - Gets whether this is a primary network interface on a virtual machine.
12244	Primary *bool `json:"primary,omitempty"`
12245	// EnableAcceleratedNetworking - If the network interface is accelerated networking enabled.
12246	EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"`
12247	// EnableIPForwarding - Indicates whether IP forwarding is enabled on this network interface.
12248	EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"`
12249	// HostedWorkloads - READ-ONLY; A list of references to linked BareMetal resources
12250	HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"`
12251	// ResourceGUID - The resource GUID property of the network interface resource.
12252	ResourceGUID *string `json:"resourceGuid,omitempty"`
12253	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
12254	ProvisioningState *string `json:"provisioningState,omitempty"`
12255}
12256
12257// MarshalJSON is the custom marshaler for InterfacePropertiesFormat.
12258func (ipf InterfacePropertiesFormat) MarshalJSON() ([]byte, error) {
12259	objectMap := make(map[string]interface{})
12260	if ipf.NetworkSecurityGroup != nil {
12261		objectMap["networkSecurityGroup"] = ipf.NetworkSecurityGroup
12262	}
12263	if ipf.IPConfigurations != nil {
12264		objectMap["ipConfigurations"] = ipf.IPConfigurations
12265	}
12266	if ipf.TapConfigurations != nil {
12267		objectMap["tapConfigurations"] = ipf.TapConfigurations
12268	}
12269	if ipf.DNSSettings != nil {
12270		objectMap["dnsSettings"] = ipf.DNSSettings
12271	}
12272	if ipf.MacAddress != nil {
12273		objectMap["macAddress"] = ipf.MacAddress
12274	}
12275	if ipf.Primary != nil {
12276		objectMap["primary"] = ipf.Primary
12277	}
12278	if ipf.EnableAcceleratedNetworking != nil {
12279		objectMap["enableAcceleratedNetworking"] = ipf.EnableAcceleratedNetworking
12280	}
12281	if ipf.EnableIPForwarding != nil {
12282		objectMap["enableIPForwarding"] = ipf.EnableIPForwarding
12283	}
12284	if ipf.ResourceGUID != nil {
12285		objectMap["resourceGuid"] = ipf.ResourceGUID
12286	}
12287	if ipf.ProvisioningState != nil {
12288		objectMap["provisioningState"] = ipf.ProvisioningState
12289	}
12290	return json.Marshal(objectMap)
12291}
12292
12293// InterfacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
12294// long-running operation.
12295type InterfacesCreateOrUpdateFuture struct {
12296	azure.FutureAPI
12297	// Result returns the result of the asynchronous operation.
12298	// If the operation has not completed it will return an error.
12299	Result func(InterfacesClient) (Interface, error)
12300}
12301
12302// InterfacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
12303// operation.
12304type InterfacesDeleteFuture struct {
12305	azure.FutureAPI
12306	// Result returns the result of the asynchronous operation.
12307	// If the operation has not completed it will return an error.
12308	Result func(InterfacesClient) (autorest.Response, error)
12309}
12310
12311// InterfacesGetEffectiveRouteTableFuture an abstraction for monitoring and retrieving the results of a
12312// long-running operation.
12313type InterfacesGetEffectiveRouteTableFuture struct {
12314	azure.FutureAPI
12315	// Result returns the result of the asynchronous operation.
12316	// If the operation has not completed it will return an error.
12317	Result func(InterfacesClient) (EffectiveRouteListResult, error)
12318}
12319
12320// InterfacesListEffectiveNetworkSecurityGroupsFuture an abstraction for monitoring and retrieving the
12321// results of a long-running operation.
12322type InterfacesListEffectiveNetworkSecurityGroupsFuture struct {
12323	azure.FutureAPI
12324	// Result returns the result of the asynchronous operation.
12325	// If the operation has not completed it will return an error.
12326	Result func(InterfacesClient) (EffectiveNetworkSecurityGroupListResult, error)
12327}
12328
12329// InterfacesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
12330// operation.
12331type InterfacesUpdateTagsFuture struct {
12332	azure.FutureAPI
12333	// Result returns the result of the asynchronous operation.
12334	// If the operation has not completed it will return an error.
12335	Result func(InterfacesClient) (Interface, error)
12336}
12337
12338// InterfaceTapConfiguration tap configuration in a Network Interface
12339type InterfaceTapConfiguration struct {
12340	autorest.Response `json:"-"`
12341	// InterfaceTapConfigurationPropertiesFormat - Properties of the Virtual Network Tap configuration
12342	*InterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"`
12343	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
12344	Name *string `json:"name,omitempty"`
12345	// Etag - A unique read-only string that changes whenever the resource is updated.
12346	Etag *string `json:"etag,omitempty"`
12347	// Type - READ-ONLY; Sub Resource type.
12348	Type *string `json:"type,omitempty"`
12349	// ID - Resource ID.
12350	ID *string `json:"id,omitempty"`
12351}
12352
12353// MarshalJSON is the custom marshaler for InterfaceTapConfiguration.
12354func (itc InterfaceTapConfiguration) MarshalJSON() ([]byte, error) {
12355	objectMap := make(map[string]interface{})
12356	if itc.InterfaceTapConfigurationPropertiesFormat != nil {
12357		objectMap["properties"] = itc.InterfaceTapConfigurationPropertiesFormat
12358	}
12359	if itc.Name != nil {
12360		objectMap["name"] = itc.Name
12361	}
12362	if itc.Etag != nil {
12363		objectMap["etag"] = itc.Etag
12364	}
12365	if itc.ID != nil {
12366		objectMap["id"] = itc.ID
12367	}
12368	return json.Marshal(objectMap)
12369}
12370
12371// UnmarshalJSON is the custom unmarshaler for InterfaceTapConfiguration struct.
12372func (itc *InterfaceTapConfiguration) UnmarshalJSON(body []byte) error {
12373	var m map[string]*json.RawMessage
12374	err := json.Unmarshal(body, &m)
12375	if err != nil {
12376		return err
12377	}
12378	for k, v := range m {
12379		switch k {
12380		case "properties":
12381			if v != nil {
12382				var interfaceTapConfigurationPropertiesFormat InterfaceTapConfigurationPropertiesFormat
12383				err = json.Unmarshal(*v, &interfaceTapConfigurationPropertiesFormat)
12384				if err != nil {
12385					return err
12386				}
12387				itc.InterfaceTapConfigurationPropertiesFormat = &interfaceTapConfigurationPropertiesFormat
12388			}
12389		case "name":
12390			if v != nil {
12391				var name string
12392				err = json.Unmarshal(*v, &name)
12393				if err != nil {
12394					return err
12395				}
12396				itc.Name = &name
12397			}
12398		case "etag":
12399			if v != nil {
12400				var etag string
12401				err = json.Unmarshal(*v, &etag)
12402				if err != nil {
12403					return err
12404				}
12405				itc.Etag = &etag
12406			}
12407		case "type":
12408			if v != nil {
12409				var typeVar string
12410				err = json.Unmarshal(*v, &typeVar)
12411				if err != nil {
12412					return err
12413				}
12414				itc.Type = &typeVar
12415			}
12416		case "id":
12417			if v != nil {
12418				var ID string
12419				err = json.Unmarshal(*v, &ID)
12420				if err != nil {
12421					return err
12422				}
12423				itc.ID = &ID
12424			}
12425		}
12426	}
12427
12428	return nil
12429}
12430
12431// InterfaceTapConfigurationListResult response for list tap configurations API service call.
12432type InterfaceTapConfigurationListResult struct {
12433	autorest.Response `json:"-"`
12434	// Value - A list of tap configurations.
12435	Value *[]InterfaceTapConfiguration `json:"value,omitempty"`
12436	// NextLink - READ-ONLY; The URL to get the next set of results.
12437	NextLink *string `json:"nextLink,omitempty"`
12438}
12439
12440// MarshalJSON is the custom marshaler for InterfaceTapConfigurationListResult.
12441func (itclr InterfaceTapConfigurationListResult) MarshalJSON() ([]byte, error) {
12442	objectMap := make(map[string]interface{})
12443	if itclr.Value != nil {
12444		objectMap["value"] = itclr.Value
12445	}
12446	return json.Marshal(objectMap)
12447}
12448
12449// InterfaceTapConfigurationListResultIterator provides access to a complete listing of
12450// InterfaceTapConfiguration values.
12451type InterfaceTapConfigurationListResultIterator struct {
12452	i    int
12453	page InterfaceTapConfigurationListResultPage
12454}
12455
12456// NextWithContext advances to the next value.  If there was an error making
12457// the request the iterator does not advance and the error is returned.
12458func (iter *InterfaceTapConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
12459	if tracing.IsEnabled() {
12460		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationListResultIterator.NextWithContext")
12461		defer func() {
12462			sc := -1
12463			if iter.Response().Response.Response != nil {
12464				sc = iter.Response().Response.Response.StatusCode
12465			}
12466			tracing.EndSpan(ctx, sc, err)
12467		}()
12468	}
12469	iter.i++
12470	if iter.i < len(iter.page.Values()) {
12471		return nil
12472	}
12473	err = iter.page.NextWithContext(ctx)
12474	if err != nil {
12475		iter.i--
12476		return err
12477	}
12478	iter.i = 0
12479	return nil
12480}
12481
12482// Next advances to the next value.  If there was an error making
12483// the request the iterator does not advance and the error is returned.
12484// Deprecated: Use NextWithContext() instead.
12485func (iter *InterfaceTapConfigurationListResultIterator) Next() error {
12486	return iter.NextWithContext(context.Background())
12487}
12488
12489// NotDone returns true if the enumeration should be started or is not yet complete.
12490func (iter InterfaceTapConfigurationListResultIterator) NotDone() bool {
12491	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12492}
12493
12494// Response returns the raw server response from the last page request.
12495func (iter InterfaceTapConfigurationListResultIterator) Response() InterfaceTapConfigurationListResult {
12496	return iter.page.Response()
12497}
12498
12499// Value returns the current value or a zero-initialized value if the
12500// iterator has advanced beyond the end of the collection.
12501func (iter InterfaceTapConfigurationListResultIterator) Value() InterfaceTapConfiguration {
12502	if !iter.page.NotDone() {
12503		return InterfaceTapConfiguration{}
12504	}
12505	return iter.page.Values()[iter.i]
12506}
12507
12508// Creates a new instance of the InterfaceTapConfigurationListResultIterator type.
12509func NewInterfaceTapConfigurationListResultIterator(page InterfaceTapConfigurationListResultPage) InterfaceTapConfigurationListResultIterator {
12510	return InterfaceTapConfigurationListResultIterator{page: page}
12511}
12512
12513// IsEmpty returns true if the ListResult contains no values.
12514func (itclr InterfaceTapConfigurationListResult) IsEmpty() bool {
12515	return itclr.Value == nil || len(*itclr.Value) == 0
12516}
12517
12518// hasNextLink returns true if the NextLink is not empty.
12519func (itclr InterfaceTapConfigurationListResult) hasNextLink() bool {
12520	return itclr.NextLink != nil && len(*itclr.NextLink) != 0
12521}
12522
12523// interfaceTapConfigurationListResultPreparer prepares a request to retrieve the next set of results.
12524// It returns nil if no more results exist.
12525func (itclr InterfaceTapConfigurationListResult) interfaceTapConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
12526	if !itclr.hasNextLink() {
12527		return nil, nil
12528	}
12529	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12530		autorest.AsJSON(),
12531		autorest.AsGet(),
12532		autorest.WithBaseURL(to.String(itclr.NextLink)))
12533}
12534
12535// InterfaceTapConfigurationListResultPage contains a page of InterfaceTapConfiguration values.
12536type InterfaceTapConfigurationListResultPage struct {
12537	fn    func(context.Context, InterfaceTapConfigurationListResult) (InterfaceTapConfigurationListResult, error)
12538	itclr InterfaceTapConfigurationListResult
12539}
12540
12541// NextWithContext advances to the next page of values.  If there was an error making
12542// the request the page does not advance and the error is returned.
12543func (page *InterfaceTapConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
12544	if tracing.IsEnabled() {
12545		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationListResultPage.NextWithContext")
12546		defer func() {
12547			sc := -1
12548			if page.Response().Response.Response != nil {
12549				sc = page.Response().Response.Response.StatusCode
12550			}
12551			tracing.EndSpan(ctx, sc, err)
12552		}()
12553	}
12554	for {
12555		next, err := page.fn(ctx, page.itclr)
12556		if err != nil {
12557			return err
12558		}
12559		page.itclr = next
12560		if !next.hasNextLink() || !next.IsEmpty() {
12561			break
12562		}
12563	}
12564	return nil
12565}
12566
12567// Next advances to the next page of values.  If there was an error making
12568// the request the page does not advance and the error is returned.
12569// Deprecated: Use NextWithContext() instead.
12570func (page *InterfaceTapConfigurationListResultPage) Next() error {
12571	return page.NextWithContext(context.Background())
12572}
12573
12574// NotDone returns true if the page enumeration should be started or is not yet complete.
12575func (page InterfaceTapConfigurationListResultPage) NotDone() bool {
12576	return !page.itclr.IsEmpty()
12577}
12578
12579// Response returns the raw server response from the last page request.
12580func (page InterfaceTapConfigurationListResultPage) Response() InterfaceTapConfigurationListResult {
12581	return page.itclr
12582}
12583
12584// Values returns the slice of values for the current page or nil if there are no values.
12585func (page InterfaceTapConfigurationListResultPage) Values() []InterfaceTapConfiguration {
12586	if page.itclr.IsEmpty() {
12587		return nil
12588	}
12589	return *page.itclr.Value
12590}
12591
12592// Creates a new instance of the InterfaceTapConfigurationListResultPage type.
12593func NewInterfaceTapConfigurationListResultPage(cur InterfaceTapConfigurationListResult, getNextPage func(context.Context, InterfaceTapConfigurationListResult) (InterfaceTapConfigurationListResult, error)) InterfaceTapConfigurationListResultPage {
12594	return InterfaceTapConfigurationListResultPage{
12595		fn:    getNextPage,
12596		itclr: cur,
12597	}
12598}
12599
12600// InterfaceTapConfigurationPropertiesFormat properties of Virtual Network Tap configuration.
12601type InterfaceTapConfigurationPropertiesFormat struct {
12602	// VirtualNetworkTap - The reference of the Virtual Network Tap resource.
12603	VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"`
12604	// ProvisioningState - READ-ONLY; The provisioning state of the network interface tap configuration. Possible values are: 'Updating', 'Deleting', and 'Failed'.
12605	ProvisioningState *string `json:"provisioningState,omitempty"`
12606}
12607
12608// MarshalJSON is the custom marshaler for InterfaceTapConfigurationPropertiesFormat.
12609func (itcpf InterfaceTapConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
12610	objectMap := make(map[string]interface{})
12611	if itcpf.VirtualNetworkTap != nil {
12612		objectMap["virtualNetworkTap"] = itcpf.VirtualNetworkTap
12613	}
12614	return json.Marshal(objectMap)
12615}
12616
12617// InterfaceTapConfigurationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
12618// of a long-running operation.
12619type InterfaceTapConfigurationsCreateOrUpdateFuture struct {
12620	azure.FutureAPI
12621	// Result returns the result of the asynchronous operation.
12622	// If the operation has not completed it will return an error.
12623	Result func(InterfaceTapConfigurationsClient) (InterfaceTapConfiguration, error)
12624}
12625
12626// InterfaceTapConfigurationsDeleteFuture an abstraction for monitoring and retrieving the results of a
12627// long-running operation.
12628type InterfaceTapConfigurationsDeleteFuture struct {
12629	azure.FutureAPI
12630	// Result returns the result of the asynchronous operation.
12631	// If the operation has not completed it will return an error.
12632	Result func(InterfaceTapConfigurationsClient) (autorest.Response, error)
12633}
12634
12635// IPAddressAvailabilityResult response for CheckIPAddressAvailability API service call
12636type IPAddressAvailabilityResult struct {
12637	autorest.Response `json:"-"`
12638	// Available - Private IP address availability.
12639	Available *bool `json:"available,omitempty"`
12640	// AvailableIPAddresses - Contains other available private IP addresses if the asked for address is taken.
12641	AvailableIPAddresses *[]string `json:"availableIPAddresses,omitempty"`
12642}
12643
12644// IPConfiguration IP configuration
12645type IPConfiguration struct {
12646	// IPConfigurationPropertiesFormat - Properties of the IP configuration
12647	*IPConfigurationPropertiesFormat `json:"properties,omitempty"`
12648	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
12649	Name *string `json:"name,omitempty"`
12650	// Etag - A unique read-only string that changes whenever the resource is updated.
12651	Etag *string `json:"etag,omitempty"`
12652	// ID - Resource ID.
12653	ID *string `json:"id,omitempty"`
12654}
12655
12656// MarshalJSON is the custom marshaler for IPConfiguration.
12657func (ic IPConfiguration) MarshalJSON() ([]byte, error) {
12658	objectMap := make(map[string]interface{})
12659	if ic.IPConfigurationPropertiesFormat != nil {
12660		objectMap["properties"] = ic.IPConfigurationPropertiesFormat
12661	}
12662	if ic.Name != nil {
12663		objectMap["name"] = ic.Name
12664	}
12665	if ic.Etag != nil {
12666		objectMap["etag"] = ic.Etag
12667	}
12668	if ic.ID != nil {
12669		objectMap["id"] = ic.ID
12670	}
12671	return json.Marshal(objectMap)
12672}
12673
12674// UnmarshalJSON is the custom unmarshaler for IPConfiguration struct.
12675func (ic *IPConfiguration) 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 IPConfigurationPropertiesFormat IPConfigurationPropertiesFormat
12686				err = json.Unmarshal(*v, &IPConfigurationPropertiesFormat)
12687				if err != nil {
12688					return err
12689				}
12690				ic.IPConfigurationPropertiesFormat = &IPConfigurationPropertiesFormat
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				ic.Name = &name
12700			}
12701		case "etag":
12702			if v != nil {
12703				var etag string
12704				err = json.Unmarshal(*v, &etag)
12705				if err != nil {
12706					return err
12707				}
12708				ic.Etag = &etag
12709			}
12710		case "id":
12711			if v != nil {
12712				var ID string
12713				err = json.Unmarshal(*v, &ID)
12714				if err != nil {
12715					return err
12716				}
12717				ic.ID = &ID
12718			}
12719		}
12720	}
12721
12722	return nil
12723}
12724
12725// IPConfigurationProfile IP configuration profile child resource.
12726type IPConfigurationProfile struct {
12727	// IPConfigurationProfilePropertiesFormat - Properties of the IP configuration profile.
12728	*IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"`
12729	// Name - The name of the resource. This name can be used to access the resource.
12730	Name *string `json:"name,omitempty"`
12731	// Type - READ-ONLY; Sub Resource type.
12732	Type *string `json:"type,omitempty"`
12733	// Etag - A unique read-only string that changes whenever the resource is updated.
12734	Etag *string `json:"etag,omitempty"`
12735	// ID - Resource ID.
12736	ID *string `json:"id,omitempty"`
12737}
12738
12739// MarshalJSON is the custom marshaler for IPConfigurationProfile.
12740func (icp IPConfigurationProfile) MarshalJSON() ([]byte, error) {
12741	objectMap := make(map[string]interface{})
12742	if icp.IPConfigurationProfilePropertiesFormat != nil {
12743		objectMap["properties"] = icp.IPConfigurationProfilePropertiesFormat
12744	}
12745	if icp.Name != nil {
12746		objectMap["name"] = icp.Name
12747	}
12748	if icp.Etag != nil {
12749		objectMap["etag"] = icp.Etag
12750	}
12751	if icp.ID != nil {
12752		objectMap["id"] = icp.ID
12753	}
12754	return json.Marshal(objectMap)
12755}
12756
12757// UnmarshalJSON is the custom unmarshaler for IPConfigurationProfile struct.
12758func (icp *IPConfigurationProfile) UnmarshalJSON(body []byte) error {
12759	var m map[string]*json.RawMessage
12760	err := json.Unmarshal(body, &m)
12761	if err != nil {
12762		return err
12763	}
12764	for k, v := range m {
12765		switch k {
12766		case "properties":
12767			if v != nil {
12768				var IPConfigurationProfilePropertiesFormat IPConfigurationProfilePropertiesFormat
12769				err = json.Unmarshal(*v, &IPConfigurationProfilePropertiesFormat)
12770				if err != nil {
12771					return err
12772				}
12773				icp.IPConfigurationProfilePropertiesFormat = &IPConfigurationProfilePropertiesFormat
12774			}
12775		case "name":
12776			if v != nil {
12777				var name string
12778				err = json.Unmarshal(*v, &name)
12779				if err != nil {
12780					return err
12781				}
12782				icp.Name = &name
12783			}
12784		case "type":
12785			if v != nil {
12786				var typeVar string
12787				err = json.Unmarshal(*v, &typeVar)
12788				if err != nil {
12789					return err
12790				}
12791				icp.Type = &typeVar
12792			}
12793		case "etag":
12794			if v != nil {
12795				var etag string
12796				err = json.Unmarshal(*v, &etag)
12797				if err != nil {
12798					return err
12799				}
12800				icp.Etag = &etag
12801			}
12802		case "id":
12803			if v != nil {
12804				var ID string
12805				err = json.Unmarshal(*v, &ID)
12806				if err != nil {
12807					return err
12808				}
12809				icp.ID = &ID
12810			}
12811		}
12812	}
12813
12814	return nil
12815}
12816
12817// IPConfigurationProfilePropertiesFormat IP configuration profile properties.
12818type IPConfigurationProfilePropertiesFormat struct {
12819	// Subnet - The reference of the subnet resource to create a container network interface ip configuration.
12820	Subnet *Subnet `json:"subnet,omitempty"`
12821	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
12822	ProvisioningState *string `json:"provisioningState,omitempty"`
12823}
12824
12825// MarshalJSON is the custom marshaler for IPConfigurationProfilePropertiesFormat.
12826func (icppf IPConfigurationProfilePropertiesFormat) MarshalJSON() ([]byte, error) {
12827	objectMap := make(map[string]interface{})
12828	if icppf.Subnet != nil {
12829		objectMap["subnet"] = icppf.Subnet
12830	}
12831	return json.Marshal(objectMap)
12832}
12833
12834// IPConfigurationPropertiesFormat properties of IP configuration.
12835type IPConfigurationPropertiesFormat struct {
12836	// PrivateIPAddress - The private IP address of the IP configuration.
12837	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
12838	// PrivateIPAllocationMethod - The private IP allocation method. Possible values are 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
12839	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
12840	// Subnet - The reference of the subnet resource.
12841	Subnet *Subnet `json:"subnet,omitempty"`
12842	// PublicIPAddress - The reference of the public IP resource.
12843	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
12844	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
12845	ProvisioningState *string `json:"provisioningState,omitempty"`
12846}
12847
12848// IpsecPolicy an IPSec Policy configuration for a virtual network gateway connection
12849type IpsecPolicy struct {
12850	// SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for a site to site VPN tunnel.
12851	SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"`
12852	// SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for a site to site VPN tunnel.
12853	SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"`
12854	// IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256'
12855	IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"`
12856	// IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256'
12857	IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"`
12858	// IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128'
12859	IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"`
12860	// IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'IkeIntegrityMD5', 'IkeIntegritySHA1', 'IkeIntegritySHA256', 'IkeIntegritySHA384', 'IkeIntegrityGCMAES256', 'IkeIntegrityGCMAES128'
12861	IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"`
12862	// DhGroup - The DH Groups used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24'
12863	DhGroup DhGroup `json:"dhGroup,omitempty"`
12864	// PfsGroup - The Pfs Groups used in IKE Phase 2 for new child SA. Possible values include: 'PfsGroupNone', 'PfsGroupPFS1', 'PfsGroupPFS2', 'PfsGroupPFS2048', 'PfsGroupECP256', 'PfsGroupECP384', 'PfsGroupPFS24', 'PfsGroupPFS14', 'PfsGroupPFSMM'
12865	PfsGroup PfsGroup `json:"pfsGroup,omitempty"`
12866}
12867
12868// IPTag contains the IpTag associated with the object
12869type IPTag struct {
12870	// IPTagType - Gets or sets the ipTag type: Example FirstPartyUsage.
12871	IPTagType *string `json:"ipTagType,omitempty"`
12872	// Tag - Gets or sets value of the IpTag associated with the public IP. Example SQL, Storage etc
12873	Tag *string `json:"tag,omitempty"`
12874}
12875
12876// Ipv6ExpressRouteCircuitPeeringConfig contains IPv6 peering config.
12877type Ipv6ExpressRouteCircuitPeeringConfig struct {
12878	// PrimaryPeerAddressPrefix - The primary address prefix.
12879	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
12880	// SecondaryPeerAddressPrefix - The secondary address prefix.
12881	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
12882	// MicrosoftPeeringConfig - The Microsoft peering configuration.
12883	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
12884	// RouteFilter - The reference of the RouteFilter resource.
12885	RouteFilter *RouteFilter `json:"routeFilter,omitempty"`
12886	// State - The state of peering. Possible values are: 'Disabled' and 'Enabled'. Possible values include: 'ExpressRouteCircuitPeeringStateDisabled', 'ExpressRouteCircuitPeeringStateEnabled'
12887	State ExpressRouteCircuitPeeringState `json:"state,omitempty"`
12888}
12889
12890// ListHubVirtualNetworkConnectionsResult list of HubVirtualNetworkConnections and a URL nextLink to get
12891// the next set of results.
12892type ListHubVirtualNetworkConnectionsResult struct {
12893	autorest.Response `json:"-"`
12894	// Value - List of HubVirtualNetworkConnections.
12895	Value *[]HubVirtualNetworkConnection `json:"value,omitempty"`
12896	// NextLink - URL to get the next set of operation list results if there are any.
12897	NextLink *string `json:"nextLink,omitempty"`
12898}
12899
12900// ListHubVirtualNetworkConnectionsResultIterator provides access to a complete listing of
12901// HubVirtualNetworkConnection values.
12902type ListHubVirtualNetworkConnectionsResultIterator struct {
12903	i    int
12904	page ListHubVirtualNetworkConnectionsResultPage
12905}
12906
12907// NextWithContext advances to the next value.  If there was an error making
12908// the request the iterator does not advance and the error is returned.
12909func (iter *ListHubVirtualNetworkConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
12910	if tracing.IsEnabled() {
12911		ctx = tracing.StartSpan(ctx, fqdn+"/ListHubVirtualNetworkConnectionsResultIterator.NextWithContext")
12912		defer func() {
12913			sc := -1
12914			if iter.Response().Response.Response != nil {
12915				sc = iter.Response().Response.Response.StatusCode
12916			}
12917			tracing.EndSpan(ctx, sc, err)
12918		}()
12919	}
12920	iter.i++
12921	if iter.i < len(iter.page.Values()) {
12922		return nil
12923	}
12924	err = iter.page.NextWithContext(ctx)
12925	if err != nil {
12926		iter.i--
12927		return err
12928	}
12929	iter.i = 0
12930	return nil
12931}
12932
12933// Next advances to the next value.  If there was an error making
12934// the request the iterator does not advance and the error is returned.
12935// Deprecated: Use NextWithContext() instead.
12936func (iter *ListHubVirtualNetworkConnectionsResultIterator) Next() error {
12937	return iter.NextWithContext(context.Background())
12938}
12939
12940// NotDone returns true if the enumeration should be started or is not yet complete.
12941func (iter ListHubVirtualNetworkConnectionsResultIterator) NotDone() bool {
12942	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12943}
12944
12945// Response returns the raw server response from the last page request.
12946func (iter ListHubVirtualNetworkConnectionsResultIterator) Response() ListHubVirtualNetworkConnectionsResult {
12947	return iter.page.Response()
12948}
12949
12950// Value returns the current value or a zero-initialized value if the
12951// iterator has advanced beyond the end of the collection.
12952func (iter ListHubVirtualNetworkConnectionsResultIterator) Value() HubVirtualNetworkConnection {
12953	if !iter.page.NotDone() {
12954		return HubVirtualNetworkConnection{}
12955	}
12956	return iter.page.Values()[iter.i]
12957}
12958
12959// Creates a new instance of the ListHubVirtualNetworkConnectionsResultIterator type.
12960func NewListHubVirtualNetworkConnectionsResultIterator(page ListHubVirtualNetworkConnectionsResultPage) ListHubVirtualNetworkConnectionsResultIterator {
12961	return ListHubVirtualNetworkConnectionsResultIterator{page: page}
12962}
12963
12964// IsEmpty returns true if the ListResult contains no values.
12965func (lhvncr ListHubVirtualNetworkConnectionsResult) IsEmpty() bool {
12966	return lhvncr.Value == nil || len(*lhvncr.Value) == 0
12967}
12968
12969// hasNextLink returns true if the NextLink is not empty.
12970func (lhvncr ListHubVirtualNetworkConnectionsResult) hasNextLink() bool {
12971	return lhvncr.NextLink != nil && len(*lhvncr.NextLink) != 0
12972}
12973
12974// listHubVirtualNetworkConnectionsResultPreparer prepares a request to retrieve the next set of results.
12975// It returns nil if no more results exist.
12976func (lhvncr ListHubVirtualNetworkConnectionsResult) listHubVirtualNetworkConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
12977	if !lhvncr.hasNextLink() {
12978		return nil, nil
12979	}
12980	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12981		autorest.AsJSON(),
12982		autorest.AsGet(),
12983		autorest.WithBaseURL(to.String(lhvncr.NextLink)))
12984}
12985
12986// ListHubVirtualNetworkConnectionsResultPage contains a page of HubVirtualNetworkConnection values.
12987type ListHubVirtualNetworkConnectionsResultPage struct {
12988	fn     func(context.Context, ListHubVirtualNetworkConnectionsResult) (ListHubVirtualNetworkConnectionsResult, error)
12989	lhvncr ListHubVirtualNetworkConnectionsResult
12990}
12991
12992// NextWithContext advances to the next page of values.  If there was an error making
12993// the request the page does not advance and the error is returned.
12994func (page *ListHubVirtualNetworkConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
12995	if tracing.IsEnabled() {
12996		ctx = tracing.StartSpan(ctx, fqdn+"/ListHubVirtualNetworkConnectionsResultPage.NextWithContext")
12997		defer func() {
12998			sc := -1
12999			if page.Response().Response.Response != nil {
13000				sc = page.Response().Response.Response.StatusCode
13001			}
13002			tracing.EndSpan(ctx, sc, err)
13003		}()
13004	}
13005	for {
13006		next, err := page.fn(ctx, page.lhvncr)
13007		if err != nil {
13008			return err
13009		}
13010		page.lhvncr = next
13011		if !next.hasNextLink() || !next.IsEmpty() {
13012			break
13013		}
13014	}
13015	return nil
13016}
13017
13018// Next advances to the next page of values.  If there was an error making
13019// the request the page does not advance and the error is returned.
13020// Deprecated: Use NextWithContext() instead.
13021func (page *ListHubVirtualNetworkConnectionsResultPage) Next() error {
13022	return page.NextWithContext(context.Background())
13023}
13024
13025// NotDone returns true if the page enumeration should be started or is not yet complete.
13026func (page ListHubVirtualNetworkConnectionsResultPage) NotDone() bool {
13027	return !page.lhvncr.IsEmpty()
13028}
13029
13030// Response returns the raw server response from the last page request.
13031func (page ListHubVirtualNetworkConnectionsResultPage) Response() ListHubVirtualNetworkConnectionsResult {
13032	return page.lhvncr
13033}
13034
13035// Values returns the slice of values for the current page or nil if there are no values.
13036func (page ListHubVirtualNetworkConnectionsResultPage) Values() []HubVirtualNetworkConnection {
13037	if page.lhvncr.IsEmpty() {
13038		return nil
13039	}
13040	return *page.lhvncr.Value
13041}
13042
13043// Creates a new instance of the ListHubVirtualNetworkConnectionsResultPage type.
13044func NewListHubVirtualNetworkConnectionsResultPage(cur ListHubVirtualNetworkConnectionsResult, getNextPage func(context.Context, ListHubVirtualNetworkConnectionsResult) (ListHubVirtualNetworkConnectionsResult, error)) ListHubVirtualNetworkConnectionsResultPage {
13045	return ListHubVirtualNetworkConnectionsResultPage{
13046		fn:     getNextPage,
13047		lhvncr: cur,
13048	}
13049}
13050
13051// ListP2SVpnGatewaysResult result of the request to list P2SVpnGateways. It contains a list of
13052// P2SVpnGateways and a URL nextLink to get the next set of results.
13053type ListP2SVpnGatewaysResult struct {
13054	autorest.Response `json:"-"`
13055	// Value - List of P2SVpnGateways.
13056	Value *[]P2SVpnGateway `json:"value,omitempty"`
13057	// NextLink - URL to get the next set of operation list results if there are any.
13058	NextLink *string `json:"nextLink,omitempty"`
13059}
13060
13061// ListP2SVpnGatewaysResultIterator provides access to a complete listing of P2SVpnGateway values.
13062type ListP2SVpnGatewaysResultIterator struct {
13063	i    int
13064	page ListP2SVpnGatewaysResultPage
13065}
13066
13067// NextWithContext advances to the next value.  If there was an error making
13068// the request the iterator does not advance and the error is returned.
13069func (iter *ListP2SVpnGatewaysResultIterator) NextWithContext(ctx context.Context) (err error) {
13070	if tracing.IsEnabled() {
13071		ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnGatewaysResultIterator.NextWithContext")
13072		defer func() {
13073			sc := -1
13074			if iter.Response().Response.Response != nil {
13075				sc = iter.Response().Response.Response.StatusCode
13076			}
13077			tracing.EndSpan(ctx, sc, err)
13078		}()
13079	}
13080	iter.i++
13081	if iter.i < len(iter.page.Values()) {
13082		return nil
13083	}
13084	err = iter.page.NextWithContext(ctx)
13085	if err != nil {
13086		iter.i--
13087		return err
13088	}
13089	iter.i = 0
13090	return nil
13091}
13092
13093// Next advances to the next value.  If there was an error making
13094// the request the iterator does not advance and the error is returned.
13095// Deprecated: Use NextWithContext() instead.
13096func (iter *ListP2SVpnGatewaysResultIterator) Next() error {
13097	return iter.NextWithContext(context.Background())
13098}
13099
13100// NotDone returns true if the enumeration should be started or is not yet complete.
13101func (iter ListP2SVpnGatewaysResultIterator) NotDone() bool {
13102	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13103}
13104
13105// Response returns the raw server response from the last page request.
13106func (iter ListP2SVpnGatewaysResultIterator) Response() ListP2SVpnGatewaysResult {
13107	return iter.page.Response()
13108}
13109
13110// Value returns the current value or a zero-initialized value if the
13111// iterator has advanced beyond the end of the collection.
13112func (iter ListP2SVpnGatewaysResultIterator) Value() P2SVpnGateway {
13113	if !iter.page.NotDone() {
13114		return P2SVpnGateway{}
13115	}
13116	return iter.page.Values()[iter.i]
13117}
13118
13119// Creates a new instance of the ListP2SVpnGatewaysResultIterator type.
13120func NewListP2SVpnGatewaysResultIterator(page ListP2SVpnGatewaysResultPage) ListP2SVpnGatewaysResultIterator {
13121	return ListP2SVpnGatewaysResultIterator{page: page}
13122}
13123
13124// IsEmpty returns true if the ListResult contains no values.
13125func (lpvgr ListP2SVpnGatewaysResult) IsEmpty() bool {
13126	return lpvgr.Value == nil || len(*lpvgr.Value) == 0
13127}
13128
13129// hasNextLink returns true if the NextLink is not empty.
13130func (lpvgr ListP2SVpnGatewaysResult) hasNextLink() bool {
13131	return lpvgr.NextLink != nil && len(*lpvgr.NextLink) != 0
13132}
13133
13134// listP2SVpnGatewaysResultPreparer prepares a request to retrieve the next set of results.
13135// It returns nil if no more results exist.
13136func (lpvgr ListP2SVpnGatewaysResult) listP2SVpnGatewaysResultPreparer(ctx context.Context) (*http.Request, error) {
13137	if !lpvgr.hasNextLink() {
13138		return nil, nil
13139	}
13140	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13141		autorest.AsJSON(),
13142		autorest.AsGet(),
13143		autorest.WithBaseURL(to.String(lpvgr.NextLink)))
13144}
13145
13146// ListP2SVpnGatewaysResultPage contains a page of P2SVpnGateway values.
13147type ListP2SVpnGatewaysResultPage struct {
13148	fn    func(context.Context, ListP2SVpnGatewaysResult) (ListP2SVpnGatewaysResult, error)
13149	lpvgr ListP2SVpnGatewaysResult
13150}
13151
13152// NextWithContext advances to the next page of values.  If there was an error making
13153// the request the page does not advance and the error is returned.
13154func (page *ListP2SVpnGatewaysResultPage) NextWithContext(ctx context.Context) (err error) {
13155	if tracing.IsEnabled() {
13156		ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnGatewaysResultPage.NextWithContext")
13157		defer func() {
13158			sc := -1
13159			if page.Response().Response.Response != nil {
13160				sc = page.Response().Response.Response.StatusCode
13161			}
13162			tracing.EndSpan(ctx, sc, err)
13163		}()
13164	}
13165	for {
13166		next, err := page.fn(ctx, page.lpvgr)
13167		if err != nil {
13168			return err
13169		}
13170		page.lpvgr = next
13171		if !next.hasNextLink() || !next.IsEmpty() {
13172			break
13173		}
13174	}
13175	return nil
13176}
13177
13178// Next advances to the next page of values.  If there was an error making
13179// the request the page does not advance and the error is returned.
13180// Deprecated: Use NextWithContext() instead.
13181func (page *ListP2SVpnGatewaysResultPage) Next() error {
13182	return page.NextWithContext(context.Background())
13183}
13184
13185// NotDone returns true if the page enumeration should be started or is not yet complete.
13186func (page ListP2SVpnGatewaysResultPage) NotDone() bool {
13187	return !page.lpvgr.IsEmpty()
13188}
13189
13190// Response returns the raw server response from the last page request.
13191func (page ListP2SVpnGatewaysResultPage) Response() ListP2SVpnGatewaysResult {
13192	return page.lpvgr
13193}
13194
13195// Values returns the slice of values for the current page or nil if there are no values.
13196func (page ListP2SVpnGatewaysResultPage) Values() []P2SVpnGateway {
13197	if page.lpvgr.IsEmpty() {
13198		return nil
13199	}
13200	return *page.lpvgr.Value
13201}
13202
13203// Creates a new instance of the ListP2SVpnGatewaysResultPage type.
13204func NewListP2SVpnGatewaysResultPage(cur ListP2SVpnGatewaysResult, getNextPage func(context.Context, ListP2SVpnGatewaysResult) (ListP2SVpnGatewaysResult, error)) ListP2SVpnGatewaysResultPage {
13205	return ListP2SVpnGatewaysResultPage{
13206		fn:    getNextPage,
13207		lpvgr: cur,
13208	}
13209}
13210
13211// ListP2SVpnServerConfigurationsResult result of the request to list all P2SVpnServerConfigurations
13212// associated to a VirtualWan. It contains a list of P2SVpnServerConfigurations and a URL nextLink to get
13213// the next set of results.
13214type ListP2SVpnServerConfigurationsResult struct {
13215	autorest.Response `json:"-"`
13216	// Value - List of P2SVpnServerConfigurations.
13217	Value *[]P2SVpnServerConfiguration `json:"value,omitempty"`
13218	// NextLink - URL to get the next set of operation list results if there are any.
13219	NextLink *string `json:"nextLink,omitempty"`
13220}
13221
13222// ListP2SVpnServerConfigurationsResultIterator provides access to a complete listing of
13223// P2SVpnServerConfiguration values.
13224type ListP2SVpnServerConfigurationsResultIterator struct {
13225	i    int
13226	page ListP2SVpnServerConfigurationsResultPage
13227}
13228
13229// NextWithContext advances to the next value.  If there was an error making
13230// the request the iterator does not advance and the error is returned.
13231func (iter *ListP2SVpnServerConfigurationsResultIterator) NextWithContext(ctx context.Context) (err error) {
13232	if tracing.IsEnabled() {
13233		ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnServerConfigurationsResultIterator.NextWithContext")
13234		defer func() {
13235			sc := -1
13236			if iter.Response().Response.Response != nil {
13237				sc = iter.Response().Response.Response.StatusCode
13238			}
13239			tracing.EndSpan(ctx, sc, err)
13240		}()
13241	}
13242	iter.i++
13243	if iter.i < len(iter.page.Values()) {
13244		return nil
13245	}
13246	err = iter.page.NextWithContext(ctx)
13247	if err != nil {
13248		iter.i--
13249		return err
13250	}
13251	iter.i = 0
13252	return nil
13253}
13254
13255// Next advances to the next value.  If there was an error making
13256// the request the iterator does not advance and the error is returned.
13257// Deprecated: Use NextWithContext() instead.
13258func (iter *ListP2SVpnServerConfigurationsResultIterator) Next() error {
13259	return iter.NextWithContext(context.Background())
13260}
13261
13262// NotDone returns true if the enumeration should be started or is not yet complete.
13263func (iter ListP2SVpnServerConfigurationsResultIterator) NotDone() bool {
13264	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13265}
13266
13267// Response returns the raw server response from the last page request.
13268func (iter ListP2SVpnServerConfigurationsResultIterator) Response() ListP2SVpnServerConfigurationsResult {
13269	return iter.page.Response()
13270}
13271
13272// Value returns the current value or a zero-initialized value if the
13273// iterator has advanced beyond the end of the collection.
13274func (iter ListP2SVpnServerConfigurationsResultIterator) Value() P2SVpnServerConfiguration {
13275	if !iter.page.NotDone() {
13276		return P2SVpnServerConfiguration{}
13277	}
13278	return iter.page.Values()[iter.i]
13279}
13280
13281// Creates a new instance of the ListP2SVpnServerConfigurationsResultIterator type.
13282func NewListP2SVpnServerConfigurationsResultIterator(page ListP2SVpnServerConfigurationsResultPage) ListP2SVpnServerConfigurationsResultIterator {
13283	return ListP2SVpnServerConfigurationsResultIterator{page: page}
13284}
13285
13286// IsEmpty returns true if the ListResult contains no values.
13287func (lpvscr ListP2SVpnServerConfigurationsResult) IsEmpty() bool {
13288	return lpvscr.Value == nil || len(*lpvscr.Value) == 0
13289}
13290
13291// hasNextLink returns true if the NextLink is not empty.
13292func (lpvscr ListP2SVpnServerConfigurationsResult) hasNextLink() bool {
13293	return lpvscr.NextLink != nil && len(*lpvscr.NextLink) != 0
13294}
13295
13296// listP2SVpnServerConfigurationsResultPreparer prepares a request to retrieve the next set of results.
13297// It returns nil if no more results exist.
13298func (lpvscr ListP2SVpnServerConfigurationsResult) listP2SVpnServerConfigurationsResultPreparer(ctx context.Context) (*http.Request, error) {
13299	if !lpvscr.hasNextLink() {
13300		return nil, nil
13301	}
13302	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13303		autorest.AsJSON(),
13304		autorest.AsGet(),
13305		autorest.WithBaseURL(to.String(lpvscr.NextLink)))
13306}
13307
13308// ListP2SVpnServerConfigurationsResultPage contains a page of P2SVpnServerConfiguration values.
13309type ListP2SVpnServerConfigurationsResultPage struct {
13310	fn     func(context.Context, ListP2SVpnServerConfigurationsResult) (ListP2SVpnServerConfigurationsResult, error)
13311	lpvscr ListP2SVpnServerConfigurationsResult
13312}
13313
13314// NextWithContext advances to the next page of values.  If there was an error making
13315// the request the page does not advance and the error is returned.
13316func (page *ListP2SVpnServerConfigurationsResultPage) NextWithContext(ctx context.Context) (err error) {
13317	if tracing.IsEnabled() {
13318		ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnServerConfigurationsResultPage.NextWithContext")
13319		defer func() {
13320			sc := -1
13321			if page.Response().Response.Response != nil {
13322				sc = page.Response().Response.Response.StatusCode
13323			}
13324			tracing.EndSpan(ctx, sc, err)
13325		}()
13326	}
13327	for {
13328		next, err := page.fn(ctx, page.lpvscr)
13329		if err != nil {
13330			return err
13331		}
13332		page.lpvscr = next
13333		if !next.hasNextLink() || !next.IsEmpty() {
13334			break
13335		}
13336	}
13337	return nil
13338}
13339
13340// Next advances to the next page of values.  If there was an error making
13341// the request the page does not advance and the error is returned.
13342// Deprecated: Use NextWithContext() instead.
13343func (page *ListP2SVpnServerConfigurationsResultPage) Next() error {
13344	return page.NextWithContext(context.Background())
13345}
13346
13347// NotDone returns true if the page enumeration should be started or is not yet complete.
13348func (page ListP2SVpnServerConfigurationsResultPage) NotDone() bool {
13349	return !page.lpvscr.IsEmpty()
13350}
13351
13352// Response returns the raw server response from the last page request.
13353func (page ListP2SVpnServerConfigurationsResultPage) Response() ListP2SVpnServerConfigurationsResult {
13354	return page.lpvscr
13355}
13356
13357// Values returns the slice of values for the current page or nil if there are no values.
13358func (page ListP2SVpnServerConfigurationsResultPage) Values() []P2SVpnServerConfiguration {
13359	if page.lpvscr.IsEmpty() {
13360		return nil
13361	}
13362	return *page.lpvscr.Value
13363}
13364
13365// Creates a new instance of the ListP2SVpnServerConfigurationsResultPage type.
13366func NewListP2SVpnServerConfigurationsResultPage(cur ListP2SVpnServerConfigurationsResult, getNextPage func(context.Context, ListP2SVpnServerConfigurationsResult) (ListP2SVpnServerConfigurationsResult, error)) ListP2SVpnServerConfigurationsResultPage {
13367	return ListP2SVpnServerConfigurationsResultPage{
13368		fn:     getNextPage,
13369		lpvscr: cur,
13370	}
13371}
13372
13373// ListString ...
13374type ListString struct {
13375	autorest.Response `json:"-"`
13376	Value             *[]string `json:"value,omitempty"`
13377}
13378
13379// ListVirtualHubsResult result of the request to list VirtualHubs. It contains a list of VirtualHubs and a
13380// URL nextLink to get the next set of results.
13381type ListVirtualHubsResult struct {
13382	autorest.Response `json:"-"`
13383	// Value - List of VirtualHubs.
13384	Value *[]VirtualHub `json:"value,omitempty"`
13385	// NextLink - URL to get the next set of operation list results if there are any.
13386	NextLink *string `json:"nextLink,omitempty"`
13387}
13388
13389// ListVirtualHubsResultIterator provides access to a complete listing of VirtualHub values.
13390type ListVirtualHubsResultIterator struct {
13391	i    int
13392	page ListVirtualHubsResultPage
13393}
13394
13395// NextWithContext advances to the next value.  If there was an error making
13396// the request the iterator does not advance and the error is returned.
13397func (iter *ListVirtualHubsResultIterator) NextWithContext(ctx context.Context) (err error) {
13398	if tracing.IsEnabled() {
13399		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubsResultIterator.NextWithContext")
13400		defer func() {
13401			sc := -1
13402			if iter.Response().Response.Response != nil {
13403				sc = iter.Response().Response.Response.StatusCode
13404			}
13405			tracing.EndSpan(ctx, sc, err)
13406		}()
13407	}
13408	iter.i++
13409	if iter.i < len(iter.page.Values()) {
13410		return nil
13411	}
13412	err = iter.page.NextWithContext(ctx)
13413	if err != nil {
13414		iter.i--
13415		return err
13416	}
13417	iter.i = 0
13418	return nil
13419}
13420
13421// Next advances to the next value.  If there was an error making
13422// the request the iterator does not advance and the error is returned.
13423// Deprecated: Use NextWithContext() instead.
13424func (iter *ListVirtualHubsResultIterator) Next() error {
13425	return iter.NextWithContext(context.Background())
13426}
13427
13428// NotDone returns true if the enumeration should be started or is not yet complete.
13429func (iter ListVirtualHubsResultIterator) NotDone() bool {
13430	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13431}
13432
13433// Response returns the raw server response from the last page request.
13434func (iter ListVirtualHubsResultIterator) Response() ListVirtualHubsResult {
13435	return iter.page.Response()
13436}
13437
13438// Value returns the current value or a zero-initialized value if the
13439// iterator has advanced beyond the end of the collection.
13440func (iter ListVirtualHubsResultIterator) Value() VirtualHub {
13441	if !iter.page.NotDone() {
13442		return VirtualHub{}
13443	}
13444	return iter.page.Values()[iter.i]
13445}
13446
13447// Creates a new instance of the ListVirtualHubsResultIterator type.
13448func NewListVirtualHubsResultIterator(page ListVirtualHubsResultPage) ListVirtualHubsResultIterator {
13449	return ListVirtualHubsResultIterator{page: page}
13450}
13451
13452// IsEmpty returns true if the ListResult contains no values.
13453func (lvhr ListVirtualHubsResult) IsEmpty() bool {
13454	return lvhr.Value == nil || len(*lvhr.Value) == 0
13455}
13456
13457// hasNextLink returns true if the NextLink is not empty.
13458func (lvhr ListVirtualHubsResult) hasNextLink() bool {
13459	return lvhr.NextLink != nil && len(*lvhr.NextLink) != 0
13460}
13461
13462// listVirtualHubsResultPreparer prepares a request to retrieve the next set of results.
13463// It returns nil if no more results exist.
13464func (lvhr ListVirtualHubsResult) listVirtualHubsResultPreparer(ctx context.Context) (*http.Request, error) {
13465	if !lvhr.hasNextLink() {
13466		return nil, nil
13467	}
13468	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13469		autorest.AsJSON(),
13470		autorest.AsGet(),
13471		autorest.WithBaseURL(to.String(lvhr.NextLink)))
13472}
13473
13474// ListVirtualHubsResultPage contains a page of VirtualHub values.
13475type ListVirtualHubsResultPage struct {
13476	fn   func(context.Context, ListVirtualHubsResult) (ListVirtualHubsResult, error)
13477	lvhr ListVirtualHubsResult
13478}
13479
13480// NextWithContext advances to the next page of values.  If there was an error making
13481// the request the page does not advance and the error is returned.
13482func (page *ListVirtualHubsResultPage) NextWithContext(ctx context.Context) (err error) {
13483	if tracing.IsEnabled() {
13484		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubsResultPage.NextWithContext")
13485		defer func() {
13486			sc := -1
13487			if page.Response().Response.Response != nil {
13488				sc = page.Response().Response.Response.StatusCode
13489			}
13490			tracing.EndSpan(ctx, sc, err)
13491		}()
13492	}
13493	for {
13494		next, err := page.fn(ctx, page.lvhr)
13495		if err != nil {
13496			return err
13497		}
13498		page.lvhr = next
13499		if !next.hasNextLink() || !next.IsEmpty() {
13500			break
13501		}
13502	}
13503	return nil
13504}
13505
13506// Next advances to the next page of values.  If there was an error making
13507// the request the page does not advance and the error is returned.
13508// Deprecated: Use NextWithContext() instead.
13509func (page *ListVirtualHubsResultPage) Next() error {
13510	return page.NextWithContext(context.Background())
13511}
13512
13513// NotDone returns true if the page enumeration should be started or is not yet complete.
13514func (page ListVirtualHubsResultPage) NotDone() bool {
13515	return !page.lvhr.IsEmpty()
13516}
13517
13518// Response returns the raw server response from the last page request.
13519func (page ListVirtualHubsResultPage) Response() ListVirtualHubsResult {
13520	return page.lvhr
13521}
13522
13523// Values returns the slice of values for the current page or nil if there are no values.
13524func (page ListVirtualHubsResultPage) Values() []VirtualHub {
13525	if page.lvhr.IsEmpty() {
13526		return nil
13527	}
13528	return *page.lvhr.Value
13529}
13530
13531// Creates a new instance of the ListVirtualHubsResultPage type.
13532func NewListVirtualHubsResultPage(cur ListVirtualHubsResult, getNextPage func(context.Context, ListVirtualHubsResult) (ListVirtualHubsResult, error)) ListVirtualHubsResultPage {
13533	return ListVirtualHubsResultPage{
13534		fn:   getNextPage,
13535		lvhr: cur,
13536	}
13537}
13538
13539// ListVirtualWANsResult result of the request to list VirtualWANs. It contains a list of VirtualWANs and a
13540// URL nextLink to get the next set of results.
13541type ListVirtualWANsResult struct {
13542	autorest.Response `json:"-"`
13543	// Value - List of VirtualWANs.
13544	Value *[]VirtualWAN `json:"value,omitempty"`
13545	// NextLink - URL to get the next set of operation list results if there are any.
13546	NextLink *string `json:"nextLink,omitempty"`
13547}
13548
13549// ListVirtualWANsResultIterator provides access to a complete listing of VirtualWAN values.
13550type ListVirtualWANsResultIterator struct {
13551	i    int
13552	page ListVirtualWANsResultPage
13553}
13554
13555// NextWithContext advances to the next value.  If there was an error making
13556// the request the iterator does not advance and the error is returned.
13557func (iter *ListVirtualWANsResultIterator) NextWithContext(ctx context.Context) (err error) {
13558	if tracing.IsEnabled() {
13559		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualWANsResultIterator.NextWithContext")
13560		defer func() {
13561			sc := -1
13562			if iter.Response().Response.Response != nil {
13563				sc = iter.Response().Response.Response.StatusCode
13564			}
13565			tracing.EndSpan(ctx, sc, err)
13566		}()
13567	}
13568	iter.i++
13569	if iter.i < len(iter.page.Values()) {
13570		return nil
13571	}
13572	err = iter.page.NextWithContext(ctx)
13573	if err != nil {
13574		iter.i--
13575		return err
13576	}
13577	iter.i = 0
13578	return nil
13579}
13580
13581// Next advances to the next value.  If there was an error making
13582// the request the iterator does not advance and the error is returned.
13583// Deprecated: Use NextWithContext() instead.
13584func (iter *ListVirtualWANsResultIterator) Next() error {
13585	return iter.NextWithContext(context.Background())
13586}
13587
13588// NotDone returns true if the enumeration should be started or is not yet complete.
13589func (iter ListVirtualWANsResultIterator) NotDone() bool {
13590	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13591}
13592
13593// Response returns the raw server response from the last page request.
13594func (iter ListVirtualWANsResultIterator) Response() ListVirtualWANsResult {
13595	return iter.page.Response()
13596}
13597
13598// Value returns the current value or a zero-initialized value if the
13599// iterator has advanced beyond the end of the collection.
13600func (iter ListVirtualWANsResultIterator) Value() VirtualWAN {
13601	if !iter.page.NotDone() {
13602		return VirtualWAN{}
13603	}
13604	return iter.page.Values()[iter.i]
13605}
13606
13607// Creates a new instance of the ListVirtualWANsResultIterator type.
13608func NewListVirtualWANsResultIterator(page ListVirtualWANsResultPage) ListVirtualWANsResultIterator {
13609	return ListVirtualWANsResultIterator{page: page}
13610}
13611
13612// IsEmpty returns true if the ListResult contains no values.
13613func (lvwnr ListVirtualWANsResult) IsEmpty() bool {
13614	return lvwnr.Value == nil || len(*lvwnr.Value) == 0
13615}
13616
13617// hasNextLink returns true if the NextLink is not empty.
13618func (lvwnr ListVirtualWANsResult) hasNextLink() bool {
13619	return lvwnr.NextLink != nil && len(*lvwnr.NextLink) != 0
13620}
13621
13622// listVirtualWANsResultPreparer prepares a request to retrieve the next set of results.
13623// It returns nil if no more results exist.
13624func (lvwnr ListVirtualWANsResult) listVirtualWANsResultPreparer(ctx context.Context) (*http.Request, error) {
13625	if !lvwnr.hasNextLink() {
13626		return nil, nil
13627	}
13628	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13629		autorest.AsJSON(),
13630		autorest.AsGet(),
13631		autorest.WithBaseURL(to.String(lvwnr.NextLink)))
13632}
13633
13634// ListVirtualWANsResultPage contains a page of VirtualWAN values.
13635type ListVirtualWANsResultPage struct {
13636	fn    func(context.Context, ListVirtualWANsResult) (ListVirtualWANsResult, error)
13637	lvwnr ListVirtualWANsResult
13638}
13639
13640// NextWithContext advances to the next page of values.  If there was an error making
13641// the request the page does not advance and the error is returned.
13642func (page *ListVirtualWANsResultPage) NextWithContext(ctx context.Context) (err error) {
13643	if tracing.IsEnabled() {
13644		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualWANsResultPage.NextWithContext")
13645		defer func() {
13646			sc := -1
13647			if page.Response().Response.Response != nil {
13648				sc = page.Response().Response.Response.StatusCode
13649			}
13650			tracing.EndSpan(ctx, sc, err)
13651		}()
13652	}
13653	for {
13654		next, err := page.fn(ctx, page.lvwnr)
13655		if err != nil {
13656			return err
13657		}
13658		page.lvwnr = next
13659		if !next.hasNextLink() || !next.IsEmpty() {
13660			break
13661		}
13662	}
13663	return nil
13664}
13665
13666// Next advances to the next page of values.  If there was an error making
13667// the request the page does not advance and the error is returned.
13668// Deprecated: Use NextWithContext() instead.
13669func (page *ListVirtualWANsResultPage) Next() error {
13670	return page.NextWithContext(context.Background())
13671}
13672
13673// NotDone returns true if the page enumeration should be started or is not yet complete.
13674func (page ListVirtualWANsResultPage) NotDone() bool {
13675	return !page.lvwnr.IsEmpty()
13676}
13677
13678// Response returns the raw server response from the last page request.
13679func (page ListVirtualWANsResultPage) Response() ListVirtualWANsResult {
13680	return page.lvwnr
13681}
13682
13683// Values returns the slice of values for the current page or nil if there are no values.
13684func (page ListVirtualWANsResultPage) Values() []VirtualWAN {
13685	if page.lvwnr.IsEmpty() {
13686		return nil
13687	}
13688	return *page.lvwnr.Value
13689}
13690
13691// Creates a new instance of the ListVirtualWANsResultPage type.
13692func NewListVirtualWANsResultPage(cur ListVirtualWANsResult, getNextPage func(context.Context, ListVirtualWANsResult) (ListVirtualWANsResult, error)) ListVirtualWANsResultPage {
13693	return ListVirtualWANsResultPage{
13694		fn:    getNextPage,
13695		lvwnr: cur,
13696	}
13697}
13698
13699// ListVpnConnectionsResult result of the request to list all vpn connections to a virtual wan vpn gateway.
13700// It contains a list of Vpn Connections and a URL nextLink to get the next set of results.
13701type ListVpnConnectionsResult struct {
13702	autorest.Response `json:"-"`
13703	// Value - List of Vpn Connections.
13704	Value *[]VpnConnection `json:"value,omitempty"`
13705	// NextLink - URL to get the next set of operation list results if there are any.
13706	NextLink *string `json:"nextLink,omitempty"`
13707}
13708
13709// ListVpnConnectionsResultIterator provides access to a complete listing of VpnConnection values.
13710type ListVpnConnectionsResultIterator struct {
13711	i    int
13712	page ListVpnConnectionsResultPage
13713}
13714
13715// NextWithContext advances to the next value.  If there was an error making
13716// the request the iterator does not advance and the error is returned.
13717func (iter *ListVpnConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
13718	if tracing.IsEnabled() {
13719		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnConnectionsResultIterator.NextWithContext")
13720		defer func() {
13721			sc := -1
13722			if iter.Response().Response.Response != nil {
13723				sc = iter.Response().Response.Response.StatusCode
13724			}
13725			tracing.EndSpan(ctx, sc, err)
13726		}()
13727	}
13728	iter.i++
13729	if iter.i < len(iter.page.Values()) {
13730		return nil
13731	}
13732	err = iter.page.NextWithContext(ctx)
13733	if err != nil {
13734		iter.i--
13735		return err
13736	}
13737	iter.i = 0
13738	return nil
13739}
13740
13741// Next advances to the next value.  If there was an error making
13742// the request the iterator does not advance and the error is returned.
13743// Deprecated: Use NextWithContext() instead.
13744func (iter *ListVpnConnectionsResultIterator) Next() error {
13745	return iter.NextWithContext(context.Background())
13746}
13747
13748// NotDone returns true if the enumeration should be started or is not yet complete.
13749func (iter ListVpnConnectionsResultIterator) NotDone() bool {
13750	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13751}
13752
13753// Response returns the raw server response from the last page request.
13754func (iter ListVpnConnectionsResultIterator) Response() ListVpnConnectionsResult {
13755	return iter.page.Response()
13756}
13757
13758// Value returns the current value or a zero-initialized value if the
13759// iterator has advanced beyond the end of the collection.
13760func (iter ListVpnConnectionsResultIterator) Value() VpnConnection {
13761	if !iter.page.NotDone() {
13762		return VpnConnection{}
13763	}
13764	return iter.page.Values()[iter.i]
13765}
13766
13767// Creates a new instance of the ListVpnConnectionsResultIterator type.
13768func NewListVpnConnectionsResultIterator(page ListVpnConnectionsResultPage) ListVpnConnectionsResultIterator {
13769	return ListVpnConnectionsResultIterator{page: page}
13770}
13771
13772// IsEmpty returns true if the ListResult contains no values.
13773func (lvcr ListVpnConnectionsResult) IsEmpty() bool {
13774	return lvcr.Value == nil || len(*lvcr.Value) == 0
13775}
13776
13777// hasNextLink returns true if the NextLink is not empty.
13778func (lvcr ListVpnConnectionsResult) hasNextLink() bool {
13779	return lvcr.NextLink != nil && len(*lvcr.NextLink) != 0
13780}
13781
13782// listVpnConnectionsResultPreparer prepares a request to retrieve the next set of results.
13783// It returns nil if no more results exist.
13784func (lvcr ListVpnConnectionsResult) listVpnConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
13785	if !lvcr.hasNextLink() {
13786		return nil, nil
13787	}
13788	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13789		autorest.AsJSON(),
13790		autorest.AsGet(),
13791		autorest.WithBaseURL(to.String(lvcr.NextLink)))
13792}
13793
13794// ListVpnConnectionsResultPage contains a page of VpnConnection values.
13795type ListVpnConnectionsResultPage struct {
13796	fn   func(context.Context, ListVpnConnectionsResult) (ListVpnConnectionsResult, error)
13797	lvcr ListVpnConnectionsResult
13798}
13799
13800// NextWithContext advances to the next page of values.  If there was an error making
13801// the request the page does not advance and the error is returned.
13802func (page *ListVpnConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
13803	if tracing.IsEnabled() {
13804		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnConnectionsResultPage.NextWithContext")
13805		defer func() {
13806			sc := -1
13807			if page.Response().Response.Response != nil {
13808				sc = page.Response().Response.Response.StatusCode
13809			}
13810			tracing.EndSpan(ctx, sc, err)
13811		}()
13812	}
13813	for {
13814		next, err := page.fn(ctx, page.lvcr)
13815		if err != nil {
13816			return err
13817		}
13818		page.lvcr = next
13819		if !next.hasNextLink() || !next.IsEmpty() {
13820			break
13821		}
13822	}
13823	return nil
13824}
13825
13826// Next advances to the next page of values.  If there was an error making
13827// the request the page does not advance and the error is returned.
13828// Deprecated: Use NextWithContext() instead.
13829func (page *ListVpnConnectionsResultPage) Next() error {
13830	return page.NextWithContext(context.Background())
13831}
13832
13833// NotDone returns true if the page enumeration should be started or is not yet complete.
13834func (page ListVpnConnectionsResultPage) NotDone() bool {
13835	return !page.lvcr.IsEmpty()
13836}
13837
13838// Response returns the raw server response from the last page request.
13839func (page ListVpnConnectionsResultPage) Response() ListVpnConnectionsResult {
13840	return page.lvcr
13841}
13842
13843// Values returns the slice of values for the current page or nil if there are no values.
13844func (page ListVpnConnectionsResultPage) Values() []VpnConnection {
13845	if page.lvcr.IsEmpty() {
13846		return nil
13847	}
13848	return *page.lvcr.Value
13849}
13850
13851// Creates a new instance of the ListVpnConnectionsResultPage type.
13852func NewListVpnConnectionsResultPage(cur ListVpnConnectionsResult, getNextPage func(context.Context, ListVpnConnectionsResult) (ListVpnConnectionsResult, error)) ListVpnConnectionsResultPage {
13853	return ListVpnConnectionsResultPage{
13854		fn:   getNextPage,
13855		lvcr: cur,
13856	}
13857}
13858
13859// ListVpnGatewaysResult result of the request to list VpnGateways. It contains a list of VpnGateways and a
13860// URL nextLink to get the next set of results.
13861type ListVpnGatewaysResult struct {
13862	autorest.Response `json:"-"`
13863	// Value - List of VpnGateways.
13864	Value *[]VpnGateway `json:"value,omitempty"`
13865	// NextLink - URL to get the next set of operation list results if there are any.
13866	NextLink *string `json:"nextLink,omitempty"`
13867}
13868
13869// ListVpnGatewaysResultIterator provides access to a complete listing of VpnGateway values.
13870type ListVpnGatewaysResultIterator struct {
13871	i    int
13872	page ListVpnGatewaysResultPage
13873}
13874
13875// NextWithContext advances to the next value.  If there was an error making
13876// the request the iterator does not advance and the error is returned.
13877func (iter *ListVpnGatewaysResultIterator) NextWithContext(ctx context.Context) (err error) {
13878	if tracing.IsEnabled() {
13879		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnGatewaysResultIterator.NextWithContext")
13880		defer func() {
13881			sc := -1
13882			if iter.Response().Response.Response != nil {
13883				sc = iter.Response().Response.Response.StatusCode
13884			}
13885			tracing.EndSpan(ctx, sc, err)
13886		}()
13887	}
13888	iter.i++
13889	if iter.i < len(iter.page.Values()) {
13890		return nil
13891	}
13892	err = iter.page.NextWithContext(ctx)
13893	if err != nil {
13894		iter.i--
13895		return err
13896	}
13897	iter.i = 0
13898	return nil
13899}
13900
13901// Next advances to the next value.  If there was an error making
13902// the request the iterator does not advance and the error is returned.
13903// Deprecated: Use NextWithContext() instead.
13904func (iter *ListVpnGatewaysResultIterator) Next() error {
13905	return iter.NextWithContext(context.Background())
13906}
13907
13908// NotDone returns true if the enumeration should be started or is not yet complete.
13909func (iter ListVpnGatewaysResultIterator) NotDone() bool {
13910	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13911}
13912
13913// Response returns the raw server response from the last page request.
13914func (iter ListVpnGatewaysResultIterator) Response() ListVpnGatewaysResult {
13915	return iter.page.Response()
13916}
13917
13918// Value returns the current value or a zero-initialized value if the
13919// iterator has advanced beyond the end of the collection.
13920func (iter ListVpnGatewaysResultIterator) Value() VpnGateway {
13921	if !iter.page.NotDone() {
13922		return VpnGateway{}
13923	}
13924	return iter.page.Values()[iter.i]
13925}
13926
13927// Creates a new instance of the ListVpnGatewaysResultIterator type.
13928func NewListVpnGatewaysResultIterator(page ListVpnGatewaysResultPage) ListVpnGatewaysResultIterator {
13929	return ListVpnGatewaysResultIterator{page: page}
13930}
13931
13932// IsEmpty returns true if the ListResult contains no values.
13933func (lvgr ListVpnGatewaysResult) IsEmpty() bool {
13934	return lvgr.Value == nil || len(*lvgr.Value) == 0
13935}
13936
13937// hasNextLink returns true if the NextLink is not empty.
13938func (lvgr ListVpnGatewaysResult) hasNextLink() bool {
13939	return lvgr.NextLink != nil && len(*lvgr.NextLink) != 0
13940}
13941
13942// listVpnGatewaysResultPreparer prepares a request to retrieve the next set of results.
13943// It returns nil if no more results exist.
13944func (lvgr ListVpnGatewaysResult) listVpnGatewaysResultPreparer(ctx context.Context) (*http.Request, error) {
13945	if !lvgr.hasNextLink() {
13946		return nil, nil
13947	}
13948	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13949		autorest.AsJSON(),
13950		autorest.AsGet(),
13951		autorest.WithBaseURL(to.String(lvgr.NextLink)))
13952}
13953
13954// ListVpnGatewaysResultPage contains a page of VpnGateway values.
13955type ListVpnGatewaysResultPage struct {
13956	fn   func(context.Context, ListVpnGatewaysResult) (ListVpnGatewaysResult, error)
13957	lvgr ListVpnGatewaysResult
13958}
13959
13960// NextWithContext advances to the next page of values.  If there was an error making
13961// the request the page does not advance and the error is returned.
13962func (page *ListVpnGatewaysResultPage) NextWithContext(ctx context.Context) (err error) {
13963	if tracing.IsEnabled() {
13964		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnGatewaysResultPage.NextWithContext")
13965		defer func() {
13966			sc := -1
13967			if page.Response().Response.Response != nil {
13968				sc = page.Response().Response.Response.StatusCode
13969			}
13970			tracing.EndSpan(ctx, sc, err)
13971		}()
13972	}
13973	for {
13974		next, err := page.fn(ctx, page.lvgr)
13975		if err != nil {
13976			return err
13977		}
13978		page.lvgr = next
13979		if !next.hasNextLink() || !next.IsEmpty() {
13980			break
13981		}
13982	}
13983	return nil
13984}
13985
13986// Next advances to the next page of values.  If there was an error making
13987// the request the page does not advance and the error is returned.
13988// Deprecated: Use NextWithContext() instead.
13989func (page *ListVpnGatewaysResultPage) Next() error {
13990	return page.NextWithContext(context.Background())
13991}
13992
13993// NotDone returns true if the page enumeration should be started or is not yet complete.
13994func (page ListVpnGatewaysResultPage) NotDone() bool {
13995	return !page.lvgr.IsEmpty()
13996}
13997
13998// Response returns the raw server response from the last page request.
13999func (page ListVpnGatewaysResultPage) Response() ListVpnGatewaysResult {
14000	return page.lvgr
14001}
14002
14003// Values returns the slice of values for the current page or nil if there are no values.
14004func (page ListVpnGatewaysResultPage) Values() []VpnGateway {
14005	if page.lvgr.IsEmpty() {
14006		return nil
14007	}
14008	return *page.lvgr.Value
14009}
14010
14011// Creates a new instance of the ListVpnGatewaysResultPage type.
14012func NewListVpnGatewaysResultPage(cur ListVpnGatewaysResult, getNextPage func(context.Context, ListVpnGatewaysResult) (ListVpnGatewaysResult, error)) ListVpnGatewaysResultPage {
14013	return ListVpnGatewaysResultPage{
14014		fn:   getNextPage,
14015		lvgr: cur,
14016	}
14017}
14018
14019// ListVpnSitesResult result of the request to list VpnSites. It contains a list of VpnSites and a URL
14020// nextLink to get the next set of results.
14021type ListVpnSitesResult struct {
14022	autorest.Response `json:"-"`
14023	// Value - List of VpnSites.
14024	Value *[]VpnSite `json:"value,omitempty"`
14025	// NextLink - URL to get the next set of operation list results if there are any.
14026	NextLink *string `json:"nextLink,omitempty"`
14027}
14028
14029// ListVpnSitesResultIterator provides access to a complete listing of VpnSite values.
14030type ListVpnSitesResultIterator struct {
14031	i    int
14032	page ListVpnSitesResultPage
14033}
14034
14035// NextWithContext advances to the next value.  If there was an error making
14036// the request the iterator does not advance and the error is returned.
14037func (iter *ListVpnSitesResultIterator) NextWithContext(ctx context.Context) (err error) {
14038	if tracing.IsEnabled() {
14039		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSitesResultIterator.NextWithContext")
14040		defer func() {
14041			sc := -1
14042			if iter.Response().Response.Response != nil {
14043				sc = iter.Response().Response.Response.StatusCode
14044			}
14045			tracing.EndSpan(ctx, sc, err)
14046		}()
14047	}
14048	iter.i++
14049	if iter.i < len(iter.page.Values()) {
14050		return nil
14051	}
14052	err = iter.page.NextWithContext(ctx)
14053	if err != nil {
14054		iter.i--
14055		return err
14056	}
14057	iter.i = 0
14058	return nil
14059}
14060
14061// Next advances to the next value.  If there was an error making
14062// the request the iterator does not advance and the error is returned.
14063// Deprecated: Use NextWithContext() instead.
14064func (iter *ListVpnSitesResultIterator) Next() error {
14065	return iter.NextWithContext(context.Background())
14066}
14067
14068// NotDone returns true if the enumeration should be started or is not yet complete.
14069func (iter ListVpnSitesResultIterator) NotDone() bool {
14070	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14071}
14072
14073// Response returns the raw server response from the last page request.
14074func (iter ListVpnSitesResultIterator) Response() ListVpnSitesResult {
14075	return iter.page.Response()
14076}
14077
14078// Value returns the current value or a zero-initialized value if the
14079// iterator has advanced beyond the end of the collection.
14080func (iter ListVpnSitesResultIterator) Value() VpnSite {
14081	if !iter.page.NotDone() {
14082		return VpnSite{}
14083	}
14084	return iter.page.Values()[iter.i]
14085}
14086
14087// Creates a new instance of the ListVpnSitesResultIterator type.
14088func NewListVpnSitesResultIterator(page ListVpnSitesResultPage) ListVpnSitesResultIterator {
14089	return ListVpnSitesResultIterator{page: page}
14090}
14091
14092// IsEmpty returns true if the ListResult contains no values.
14093func (lvsr ListVpnSitesResult) IsEmpty() bool {
14094	return lvsr.Value == nil || len(*lvsr.Value) == 0
14095}
14096
14097// hasNextLink returns true if the NextLink is not empty.
14098func (lvsr ListVpnSitesResult) hasNextLink() bool {
14099	return lvsr.NextLink != nil && len(*lvsr.NextLink) != 0
14100}
14101
14102// listVpnSitesResultPreparer prepares a request to retrieve the next set of results.
14103// It returns nil if no more results exist.
14104func (lvsr ListVpnSitesResult) listVpnSitesResultPreparer(ctx context.Context) (*http.Request, error) {
14105	if !lvsr.hasNextLink() {
14106		return nil, nil
14107	}
14108	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14109		autorest.AsJSON(),
14110		autorest.AsGet(),
14111		autorest.WithBaseURL(to.String(lvsr.NextLink)))
14112}
14113
14114// ListVpnSitesResultPage contains a page of VpnSite values.
14115type ListVpnSitesResultPage struct {
14116	fn   func(context.Context, ListVpnSitesResult) (ListVpnSitesResult, error)
14117	lvsr ListVpnSitesResult
14118}
14119
14120// NextWithContext advances to the next page of values.  If there was an error making
14121// the request the page does not advance and the error is returned.
14122func (page *ListVpnSitesResultPage) NextWithContext(ctx context.Context) (err error) {
14123	if tracing.IsEnabled() {
14124		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSitesResultPage.NextWithContext")
14125		defer func() {
14126			sc := -1
14127			if page.Response().Response.Response != nil {
14128				sc = page.Response().Response.Response.StatusCode
14129			}
14130			tracing.EndSpan(ctx, sc, err)
14131		}()
14132	}
14133	for {
14134		next, err := page.fn(ctx, page.lvsr)
14135		if err != nil {
14136			return err
14137		}
14138		page.lvsr = next
14139		if !next.hasNextLink() || !next.IsEmpty() {
14140			break
14141		}
14142	}
14143	return nil
14144}
14145
14146// Next advances to the next page of values.  If there was an error making
14147// the request the page does not advance and the error is returned.
14148// Deprecated: Use NextWithContext() instead.
14149func (page *ListVpnSitesResultPage) Next() error {
14150	return page.NextWithContext(context.Background())
14151}
14152
14153// NotDone returns true if the page enumeration should be started or is not yet complete.
14154func (page ListVpnSitesResultPage) NotDone() bool {
14155	return !page.lvsr.IsEmpty()
14156}
14157
14158// Response returns the raw server response from the last page request.
14159func (page ListVpnSitesResultPage) Response() ListVpnSitesResult {
14160	return page.lvsr
14161}
14162
14163// Values returns the slice of values for the current page or nil if there are no values.
14164func (page ListVpnSitesResultPage) Values() []VpnSite {
14165	if page.lvsr.IsEmpty() {
14166		return nil
14167	}
14168	return *page.lvsr.Value
14169}
14170
14171// Creates a new instance of the ListVpnSitesResultPage type.
14172func NewListVpnSitesResultPage(cur ListVpnSitesResult, getNextPage func(context.Context, ListVpnSitesResult) (ListVpnSitesResult, error)) ListVpnSitesResultPage {
14173	return ListVpnSitesResultPage{
14174		fn:   getNextPage,
14175		lvsr: cur,
14176	}
14177}
14178
14179// LoadBalancer loadBalancer resource
14180type LoadBalancer struct {
14181	autorest.Response `json:"-"`
14182	// Sku - The load balancer SKU.
14183	Sku *LoadBalancerSku `json:"sku,omitempty"`
14184	// LoadBalancerPropertiesFormat - Properties of load balancer.
14185	*LoadBalancerPropertiesFormat `json:"properties,omitempty"`
14186	// Etag - A unique read-only string that changes whenever the resource is updated.
14187	Etag *string `json:"etag,omitempty"`
14188	// ID - Resource ID.
14189	ID *string `json:"id,omitempty"`
14190	// Name - READ-ONLY; Resource name.
14191	Name *string `json:"name,omitempty"`
14192	// Type - READ-ONLY; Resource type.
14193	Type *string `json:"type,omitempty"`
14194	// Location - Resource location.
14195	Location *string `json:"location,omitempty"`
14196	// Tags - Resource tags.
14197	Tags map[string]*string `json:"tags"`
14198}
14199
14200// MarshalJSON is the custom marshaler for LoadBalancer.
14201func (lb LoadBalancer) MarshalJSON() ([]byte, error) {
14202	objectMap := make(map[string]interface{})
14203	if lb.Sku != nil {
14204		objectMap["sku"] = lb.Sku
14205	}
14206	if lb.LoadBalancerPropertiesFormat != nil {
14207		objectMap["properties"] = lb.LoadBalancerPropertiesFormat
14208	}
14209	if lb.Etag != nil {
14210		objectMap["etag"] = lb.Etag
14211	}
14212	if lb.ID != nil {
14213		objectMap["id"] = lb.ID
14214	}
14215	if lb.Location != nil {
14216		objectMap["location"] = lb.Location
14217	}
14218	if lb.Tags != nil {
14219		objectMap["tags"] = lb.Tags
14220	}
14221	return json.Marshal(objectMap)
14222}
14223
14224// UnmarshalJSON is the custom unmarshaler for LoadBalancer struct.
14225func (lb *LoadBalancer) UnmarshalJSON(body []byte) error {
14226	var m map[string]*json.RawMessage
14227	err := json.Unmarshal(body, &m)
14228	if err != nil {
14229		return err
14230	}
14231	for k, v := range m {
14232		switch k {
14233		case "sku":
14234			if v != nil {
14235				var sku LoadBalancerSku
14236				err = json.Unmarshal(*v, &sku)
14237				if err != nil {
14238					return err
14239				}
14240				lb.Sku = &sku
14241			}
14242		case "properties":
14243			if v != nil {
14244				var loadBalancerPropertiesFormat LoadBalancerPropertiesFormat
14245				err = json.Unmarshal(*v, &loadBalancerPropertiesFormat)
14246				if err != nil {
14247					return err
14248				}
14249				lb.LoadBalancerPropertiesFormat = &loadBalancerPropertiesFormat
14250			}
14251		case "etag":
14252			if v != nil {
14253				var etag string
14254				err = json.Unmarshal(*v, &etag)
14255				if err != nil {
14256					return err
14257				}
14258				lb.Etag = &etag
14259			}
14260		case "id":
14261			if v != nil {
14262				var ID string
14263				err = json.Unmarshal(*v, &ID)
14264				if err != nil {
14265					return err
14266				}
14267				lb.ID = &ID
14268			}
14269		case "name":
14270			if v != nil {
14271				var name string
14272				err = json.Unmarshal(*v, &name)
14273				if err != nil {
14274					return err
14275				}
14276				lb.Name = &name
14277			}
14278		case "type":
14279			if v != nil {
14280				var typeVar string
14281				err = json.Unmarshal(*v, &typeVar)
14282				if err != nil {
14283					return err
14284				}
14285				lb.Type = &typeVar
14286			}
14287		case "location":
14288			if v != nil {
14289				var location string
14290				err = json.Unmarshal(*v, &location)
14291				if err != nil {
14292					return err
14293				}
14294				lb.Location = &location
14295			}
14296		case "tags":
14297			if v != nil {
14298				var tags map[string]*string
14299				err = json.Unmarshal(*v, &tags)
14300				if err != nil {
14301					return err
14302				}
14303				lb.Tags = tags
14304			}
14305		}
14306	}
14307
14308	return nil
14309}
14310
14311// LoadBalancerBackendAddressPoolListResult response for ListBackendAddressPool API service call.
14312type LoadBalancerBackendAddressPoolListResult struct {
14313	autorest.Response `json:"-"`
14314	// Value - A list of backend address pools in a load balancer.
14315	Value *[]BackendAddressPool `json:"value,omitempty"`
14316	// NextLink - READ-ONLY; The URL to get the next set of results.
14317	NextLink *string `json:"nextLink,omitempty"`
14318}
14319
14320// MarshalJSON is the custom marshaler for LoadBalancerBackendAddressPoolListResult.
14321func (lbbaplr LoadBalancerBackendAddressPoolListResult) MarshalJSON() ([]byte, error) {
14322	objectMap := make(map[string]interface{})
14323	if lbbaplr.Value != nil {
14324		objectMap["value"] = lbbaplr.Value
14325	}
14326	return json.Marshal(objectMap)
14327}
14328
14329// LoadBalancerBackendAddressPoolListResultIterator provides access to a complete listing of
14330// BackendAddressPool values.
14331type LoadBalancerBackendAddressPoolListResultIterator struct {
14332	i    int
14333	page LoadBalancerBackendAddressPoolListResultPage
14334}
14335
14336// NextWithContext advances to the next value.  If there was an error making
14337// the request the iterator does not advance and the error is returned.
14338func (iter *LoadBalancerBackendAddressPoolListResultIterator) NextWithContext(ctx context.Context) (err error) {
14339	if tracing.IsEnabled() {
14340		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultIterator.NextWithContext")
14341		defer func() {
14342			sc := -1
14343			if iter.Response().Response.Response != nil {
14344				sc = iter.Response().Response.Response.StatusCode
14345			}
14346			tracing.EndSpan(ctx, sc, err)
14347		}()
14348	}
14349	iter.i++
14350	if iter.i < len(iter.page.Values()) {
14351		return nil
14352	}
14353	err = iter.page.NextWithContext(ctx)
14354	if err != nil {
14355		iter.i--
14356		return err
14357	}
14358	iter.i = 0
14359	return nil
14360}
14361
14362// Next advances to the next value.  If there was an error making
14363// the request the iterator does not advance and the error is returned.
14364// Deprecated: Use NextWithContext() instead.
14365func (iter *LoadBalancerBackendAddressPoolListResultIterator) Next() error {
14366	return iter.NextWithContext(context.Background())
14367}
14368
14369// NotDone returns true if the enumeration should be started or is not yet complete.
14370func (iter LoadBalancerBackendAddressPoolListResultIterator) NotDone() bool {
14371	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14372}
14373
14374// Response returns the raw server response from the last page request.
14375func (iter LoadBalancerBackendAddressPoolListResultIterator) Response() LoadBalancerBackendAddressPoolListResult {
14376	return iter.page.Response()
14377}
14378
14379// Value returns the current value or a zero-initialized value if the
14380// iterator has advanced beyond the end of the collection.
14381func (iter LoadBalancerBackendAddressPoolListResultIterator) Value() BackendAddressPool {
14382	if !iter.page.NotDone() {
14383		return BackendAddressPool{}
14384	}
14385	return iter.page.Values()[iter.i]
14386}
14387
14388// Creates a new instance of the LoadBalancerBackendAddressPoolListResultIterator type.
14389func NewLoadBalancerBackendAddressPoolListResultIterator(page LoadBalancerBackendAddressPoolListResultPage) LoadBalancerBackendAddressPoolListResultIterator {
14390	return LoadBalancerBackendAddressPoolListResultIterator{page: page}
14391}
14392
14393// IsEmpty returns true if the ListResult contains no values.
14394func (lbbaplr LoadBalancerBackendAddressPoolListResult) IsEmpty() bool {
14395	return lbbaplr.Value == nil || len(*lbbaplr.Value) == 0
14396}
14397
14398// hasNextLink returns true if the NextLink is not empty.
14399func (lbbaplr LoadBalancerBackendAddressPoolListResult) hasNextLink() bool {
14400	return lbbaplr.NextLink != nil && len(*lbbaplr.NextLink) != 0
14401}
14402
14403// loadBalancerBackendAddressPoolListResultPreparer prepares a request to retrieve the next set of results.
14404// It returns nil if no more results exist.
14405func (lbbaplr LoadBalancerBackendAddressPoolListResult) loadBalancerBackendAddressPoolListResultPreparer(ctx context.Context) (*http.Request, error) {
14406	if !lbbaplr.hasNextLink() {
14407		return nil, nil
14408	}
14409	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14410		autorest.AsJSON(),
14411		autorest.AsGet(),
14412		autorest.WithBaseURL(to.String(lbbaplr.NextLink)))
14413}
14414
14415// LoadBalancerBackendAddressPoolListResultPage contains a page of BackendAddressPool values.
14416type LoadBalancerBackendAddressPoolListResultPage struct {
14417	fn      func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)
14418	lbbaplr LoadBalancerBackendAddressPoolListResult
14419}
14420
14421// NextWithContext advances to the next page of values.  If there was an error making
14422// the request the page does not advance and the error is returned.
14423func (page *LoadBalancerBackendAddressPoolListResultPage) NextWithContext(ctx context.Context) (err error) {
14424	if tracing.IsEnabled() {
14425		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultPage.NextWithContext")
14426		defer func() {
14427			sc := -1
14428			if page.Response().Response.Response != nil {
14429				sc = page.Response().Response.Response.StatusCode
14430			}
14431			tracing.EndSpan(ctx, sc, err)
14432		}()
14433	}
14434	for {
14435		next, err := page.fn(ctx, page.lbbaplr)
14436		if err != nil {
14437			return err
14438		}
14439		page.lbbaplr = next
14440		if !next.hasNextLink() || !next.IsEmpty() {
14441			break
14442		}
14443	}
14444	return nil
14445}
14446
14447// Next advances to the next page of values.  If there was an error making
14448// the request the page does not advance and the error is returned.
14449// Deprecated: Use NextWithContext() instead.
14450func (page *LoadBalancerBackendAddressPoolListResultPage) Next() error {
14451	return page.NextWithContext(context.Background())
14452}
14453
14454// NotDone returns true if the page enumeration should be started or is not yet complete.
14455func (page LoadBalancerBackendAddressPoolListResultPage) NotDone() bool {
14456	return !page.lbbaplr.IsEmpty()
14457}
14458
14459// Response returns the raw server response from the last page request.
14460func (page LoadBalancerBackendAddressPoolListResultPage) Response() LoadBalancerBackendAddressPoolListResult {
14461	return page.lbbaplr
14462}
14463
14464// Values returns the slice of values for the current page or nil if there are no values.
14465func (page LoadBalancerBackendAddressPoolListResultPage) Values() []BackendAddressPool {
14466	if page.lbbaplr.IsEmpty() {
14467		return nil
14468	}
14469	return *page.lbbaplr.Value
14470}
14471
14472// Creates a new instance of the LoadBalancerBackendAddressPoolListResultPage type.
14473func NewLoadBalancerBackendAddressPoolListResultPage(cur LoadBalancerBackendAddressPoolListResult, getNextPage func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)) LoadBalancerBackendAddressPoolListResultPage {
14474	return LoadBalancerBackendAddressPoolListResultPage{
14475		fn:      getNextPage,
14476		lbbaplr: cur,
14477	}
14478}
14479
14480// LoadBalancerFrontendIPConfigurationListResult response for ListFrontendIPConfiguration API service call.
14481type LoadBalancerFrontendIPConfigurationListResult struct {
14482	autorest.Response `json:"-"`
14483	// Value - A list of frontend IP configurations in a load balancer.
14484	Value *[]FrontendIPConfiguration `json:"value,omitempty"`
14485	// NextLink - READ-ONLY; The URL to get the next set of results.
14486	NextLink *string `json:"nextLink,omitempty"`
14487}
14488
14489// MarshalJSON is the custom marshaler for LoadBalancerFrontendIPConfigurationListResult.
14490func (lbficlr LoadBalancerFrontendIPConfigurationListResult) MarshalJSON() ([]byte, error) {
14491	objectMap := make(map[string]interface{})
14492	if lbficlr.Value != nil {
14493		objectMap["value"] = lbficlr.Value
14494	}
14495	return json.Marshal(objectMap)
14496}
14497
14498// LoadBalancerFrontendIPConfigurationListResultIterator provides access to a complete listing of
14499// FrontendIPConfiguration values.
14500type LoadBalancerFrontendIPConfigurationListResultIterator struct {
14501	i    int
14502	page LoadBalancerFrontendIPConfigurationListResultPage
14503}
14504
14505// NextWithContext advances to the next value.  If there was an error making
14506// the request the iterator does not advance and the error is returned.
14507func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
14508	if tracing.IsEnabled() {
14509		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultIterator.NextWithContext")
14510		defer func() {
14511			sc := -1
14512			if iter.Response().Response.Response != nil {
14513				sc = iter.Response().Response.Response.StatusCode
14514			}
14515			tracing.EndSpan(ctx, sc, err)
14516		}()
14517	}
14518	iter.i++
14519	if iter.i < len(iter.page.Values()) {
14520		return nil
14521	}
14522	err = iter.page.NextWithContext(ctx)
14523	if err != nil {
14524		iter.i--
14525		return err
14526	}
14527	iter.i = 0
14528	return nil
14529}
14530
14531// Next advances to the next value.  If there was an error making
14532// the request the iterator does not advance and the error is returned.
14533// Deprecated: Use NextWithContext() instead.
14534func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) Next() error {
14535	return iter.NextWithContext(context.Background())
14536}
14537
14538// NotDone returns true if the enumeration should be started or is not yet complete.
14539func (iter LoadBalancerFrontendIPConfigurationListResultIterator) NotDone() bool {
14540	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14541}
14542
14543// Response returns the raw server response from the last page request.
14544func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Response() LoadBalancerFrontendIPConfigurationListResult {
14545	return iter.page.Response()
14546}
14547
14548// Value returns the current value or a zero-initialized value if the
14549// iterator has advanced beyond the end of the collection.
14550func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Value() FrontendIPConfiguration {
14551	if !iter.page.NotDone() {
14552		return FrontendIPConfiguration{}
14553	}
14554	return iter.page.Values()[iter.i]
14555}
14556
14557// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultIterator type.
14558func NewLoadBalancerFrontendIPConfigurationListResultIterator(page LoadBalancerFrontendIPConfigurationListResultPage) LoadBalancerFrontendIPConfigurationListResultIterator {
14559	return LoadBalancerFrontendIPConfigurationListResultIterator{page: page}
14560}
14561
14562// IsEmpty returns true if the ListResult contains no values.
14563func (lbficlr LoadBalancerFrontendIPConfigurationListResult) IsEmpty() bool {
14564	return lbficlr.Value == nil || len(*lbficlr.Value) == 0
14565}
14566
14567// hasNextLink returns true if the NextLink is not empty.
14568func (lbficlr LoadBalancerFrontendIPConfigurationListResult) hasNextLink() bool {
14569	return lbficlr.NextLink != nil && len(*lbficlr.NextLink) != 0
14570}
14571
14572// loadBalancerFrontendIPConfigurationListResultPreparer prepares a request to retrieve the next set of results.
14573// It returns nil if no more results exist.
14574func (lbficlr LoadBalancerFrontendIPConfigurationListResult) loadBalancerFrontendIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
14575	if !lbficlr.hasNextLink() {
14576		return nil, nil
14577	}
14578	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14579		autorest.AsJSON(),
14580		autorest.AsGet(),
14581		autorest.WithBaseURL(to.String(lbficlr.NextLink)))
14582}
14583
14584// LoadBalancerFrontendIPConfigurationListResultPage contains a page of FrontendIPConfiguration values.
14585type LoadBalancerFrontendIPConfigurationListResultPage struct {
14586	fn      func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)
14587	lbficlr LoadBalancerFrontendIPConfigurationListResult
14588}
14589
14590// NextWithContext advances to the next page of values.  If there was an error making
14591// the request the page does not advance and the error is returned.
14592func (page *LoadBalancerFrontendIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
14593	if tracing.IsEnabled() {
14594		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultPage.NextWithContext")
14595		defer func() {
14596			sc := -1
14597			if page.Response().Response.Response != nil {
14598				sc = page.Response().Response.Response.StatusCode
14599			}
14600			tracing.EndSpan(ctx, sc, err)
14601		}()
14602	}
14603	for {
14604		next, err := page.fn(ctx, page.lbficlr)
14605		if err != nil {
14606			return err
14607		}
14608		page.lbficlr = next
14609		if !next.hasNextLink() || !next.IsEmpty() {
14610			break
14611		}
14612	}
14613	return nil
14614}
14615
14616// Next advances to the next page of values.  If there was an error making
14617// the request the page does not advance and the error is returned.
14618// Deprecated: Use NextWithContext() instead.
14619func (page *LoadBalancerFrontendIPConfigurationListResultPage) Next() error {
14620	return page.NextWithContext(context.Background())
14621}
14622
14623// NotDone returns true if the page enumeration should be started or is not yet complete.
14624func (page LoadBalancerFrontendIPConfigurationListResultPage) NotDone() bool {
14625	return !page.lbficlr.IsEmpty()
14626}
14627
14628// Response returns the raw server response from the last page request.
14629func (page LoadBalancerFrontendIPConfigurationListResultPage) Response() LoadBalancerFrontendIPConfigurationListResult {
14630	return page.lbficlr
14631}
14632
14633// Values returns the slice of values for the current page or nil if there are no values.
14634func (page LoadBalancerFrontendIPConfigurationListResultPage) Values() []FrontendIPConfiguration {
14635	if page.lbficlr.IsEmpty() {
14636		return nil
14637	}
14638	return *page.lbficlr.Value
14639}
14640
14641// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultPage type.
14642func NewLoadBalancerFrontendIPConfigurationListResultPage(cur LoadBalancerFrontendIPConfigurationListResult, getNextPage func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)) LoadBalancerFrontendIPConfigurationListResultPage {
14643	return LoadBalancerFrontendIPConfigurationListResultPage{
14644		fn:      getNextPage,
14645		lbficlr: cur,
14646	}
14647}
14648
14649// LoadBalancerListResult response for ListLoadBalancers API service call.
14650type LoadBalancerListResult struct {
14651	autorest.Response `json:"-"`
14652	// Value - A list of load balancers in a resource group.
14653	Value *[]LoadBalancer `json:"value,omitempty"`
14654	// NextLink - READ-ONLY; The URL to get the next set of results.
14655	NextLink *string `json:"nextLink,omitempty"`
14656}
14657
14658// MarshalJSON is the custom marshaler for LoadBalancerListResult.
14659func (lblr LoadBalancerListResult) MarshalJSON() ([]byte, error) {
14660	objectMap := make(map[string]interface{})
14661	if lblr.Value != nil {
14662		objectMap["value"] = lblr.Value
14663	}
14664	return json.Marshal(objectMap)
14665}
14666
14667// LoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values.
14668type LoadBalancerListResultIterator struct {
14669	i    int
14670	page LoadBalancerListResultPage
14671}
14672
14673// NextWithContext advances to the next value.  If there was an error making
14674// the request the iterator does not advance and the error is returned.
14675func (iter *LoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) {
14676	if tracing.IsEnabled() {
14677		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultIterator.NextWithContext")
14678		defer func() {
14679			sc := -1
14680			if iter.Response().Response.Response != nil {
14681				sc = iter.Response().Response.Response.StatusCode
14682			}
14683			tracing.EndSpan(ctx, sc, err)
14684		}()
14685	}
14686	iter.i++
14687	if iter.i < len(iter.page.Values()) {
14688		return nil
14689	}
14690	err = iter.page.NextWithContext(ctx)
14691	if err != nil {
14692		iter.i--
14693		return err
14694	}
14695	iter.i = 0
14696	return nil
14697}
14698
14699// Next advances to the next value.  If there was an error making
14700// the request the iterator does not advance and the error is returned.
14701// Deprecated: Use NextWithContext() instead.
14702func (iter *LoadBalancerListResultIterator) Next() error {
14703	return iter.NextWithContext(context.Background())
14704}
14705
14706// NotDone returns true if the enumeration should be started or is not yet complete.
14707func (iter LoadBalancerListResultIterator) NotDone() bool {
14708	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14709}
14710
14711// Response returns the raw server response from the last page request.
14712func (iter LoadBalancerListResultIterator) Response() LoadBalancerListResult {
14713	return iter.page.Response()
14714}
14715
14716// Value returns the current value or a zero-initialized value if the
14717// iterator has advanced beyond the end of the collection.
14718func (iter LoadBalancerListResultIterator) Value() LoadBalancer {
14719	if !iter.page.NotDone() {
14720		return LoadBalancer{}
14721	}
14722	return iter.page.Values()[iter.i]
14723}
14724
14725// Creates a new instance of the LoadBalancerListResultIterator type.
14726func NewLoadBalancerListResultIterator(page LoadBalancerListResultPage) LoadBalancerListResultIterator {
14727	return LoadBalancerListResultIterator{page: page}
14728}
14729
14730// IsEmpty returns true if the ListResult contains no values.
14731func (lblr LoadBalancerListResult) IsEmpty() bool {
14732	return lblr.Value == nil || len(*lblr.Value) == 0
14733}
14734
14735// hasNextLink returns true if the NextLink is not empty.
14736func (lblr LoadBalancerListResult) hasNextLink() bool {
14737	return lblr.NextLink != nil && len(*lblr.NextLink) != 0
14738}
14739
14740// loadBalancerListResultPreparer prepares a request to retrieve the next set of results.
14741// It returns nil if no more results exist.
14742func (lblr LoadBalancerListResult) loadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) {
14743	if !lblr.hasNextLink() {
14744		return nil, nil
14745	}
14746	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14747		autorest.AsJSON(),
14748		autorest.AsGet(),
14749		autorest.WithBaseURL(to.String(lblr.NextLink)))
14750}
14751
14752// LoadBalancerListResultPage contains a page of LoadBalancer values.
14753type LoadBalancerListResultPage struct {
14754	fn   func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)
14755	lblr LoadBalancerListResult
14756}
14757
14758// NextWithContext advances to the next page of values.  If there was an error making
14759// the request the page does not advance and the error is returned.
14760func (page *LoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) {
14761	if tracing.IsEnabled() {
14762		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultPage.NextWithContext")
14763		defer func() {
14764			sc := -1
14765			if page.Response().Response.Response != nil {
14766				sc = page.Response().Response.Response.StatusCode
14767			}
14768			tracing.EndSpan(ctx, sc, err)
14769		}()
14770	}
14771	for {
14772		next, err := page.fn(ctx, page.lblr)
14773		if err != nil {
14774			return err
14775		}
14776		page.lblr = next
14777		if !next.hasNextLink() || !next.IsEmpty() {
14778			break
14779		}
14780	}
14781	return nil
14782}
14783
14784// Next advances to the next page of values.  If there was an error making
14785// the request the page does not advance and the error is returned.
14786// Deprecated: Use NextWithContext() instead.
14787func (page *LoadBalancerListResultPage) Next() error {
14788	return page.NextWithContext(context.Background())
14789}
14790
14791// NotDone returns true if the page enumeration should be started or is not yet complete.
14792func (page LoadBalancerListResultPage) NotDone() bool {
14793	return !page.lblr.IsEmpty()
14794}
14795
14796// Response returns the raw server response from the last page request.
14797func (page LoadBalancerListResultPage) Response() LoadBalancerListResult {
14798	return page.lblr
14799}
14800
14801// Values returns the slice of values for the current page or nil if there are no values.
14802func (page LoadBalancerListResultPage) Values() []LoadBalancer {
14803	if page.lblr.IsEmpty() {
14804		return nil
14805	}
14806	return *page.lblr.Value
14807}
14808
14809// Creates a new instance of the LoadBalancerListResultPage type.
14810func NewLoadBalancerListResultPage(cur LoadBalancerListResult, getNextPage func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)) LoadBalancerListResultPage {
14811	return LoadBalancerListResultPage{
14812		fn:   getNextPage,
14813		lblr: cur,
14814	}
14815}
14816
14817// LoadBalancerLoadBalancingRuleListResult response for ListLoadBalancingRule API service call.
14818type LoadBalancerLoadBalancingRuleListResult struct {
14819	autorest.Response `json:"-"`
14820	// Value - A list of load balancing rules in a load balancer.
14821	Value *[]LoadBalancingRule `json:"value,omitempty"`
14822	// NextLink - READ-ONLY; The URL to get the next set of results.
14823	NextLink *string `json:"nextLink,omitempty"`
14824}
14825
14826// MarshalJSON is the custom marshaler for LoadBalancerLoadBalancingRuleListResult.
14827func (lblbrlr LoadBalancerLoadBalancingRuleListResult) MarshalJSON() ([]byte, error) {
14828	objectMap := make(map[string]interface{})
14829	if lblbrlr.Value != nil {
14830		objectMap["value"] = lblbrlr.Value
14831	}
14832	return json.Marshal(objectMap)
14833}
14834
14835// LoadBalancerLoadBalancingRuleListResultIterator provides access to a complete listing of
14836// LoadBalancingRule values.
14837type LoadBalancerLoadBalancingRuleListResultIterator struct {
14838	i    int
14839	page LoadBalancerLoadBalancingRuleListResultPage
14840}
14841
14842// NextWithContext advances to the next value.  If there was an error making
14843// the request the iterator does not advance and the error is returned.
14844func (iter *LoadBalancerLoadBalancingRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
14845	if tracing.IsEnabled() {
14846		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultIterator.NextWithContext")
14847		defer func() {
14848			sc := -1
14849			if iter.Response().Response.Response != nil {
14850				sc = iter.Response().Response.Response.StatusCode
14851			}
14852			tracing.EndSpan(ctx, sc, err)
14853		}()
14854	}
14855	iter.i++
14856	if iter.i < len(iter.page.Values()) {
14857		return nil
14858	}
14859	err = iter.page.NextWithContext(ctx)
14860	if err != nil {
14861		iter.i--
14862		return err
14863	}
14864	iter.i = 0
14865	return nil
14866}
14867
14868// Next advances to the next value.  If there was an error making
14869// the request the iterator does not advance and the error is returned.
14870// Deprecated: Use NextWithContext() instead.
14871func (iter *LoadBalancerLoadBalancingRuleListResultIterator) Next() error {
14872	return iter.NextWithContext(context.Background())
14873}
14874
14875// NotDone returns true if the enumeration should be started or is not yet complete.
14876func (iter LoadBalancerLoadBalancingRuleListResultIterator) NotDone() bool {
14877	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14878}
14879
14880// Response returns the raw server response from the last page request.
14881func (iter LoadBalancerLoadBalancingRuleListResultIterator) Response() LoadBalancerLoadBalancingRuleListResult {
14882	return iter.page.Response()
14883}
14884
14885// Value returns the current value or a zero-initialized value if the
14886// iterator has advanced beyond the end of the collection.
14887func (iter LoadBalancerLoadBalancingRuleListResultIterator) Value() LoadBalancingRule {
14888	if !iter.page.NotDone() {
14889		return LoadBalancingRule{}
14890	}
14891	return iter.page.Values()[iter.i]
14892}
14893
14894// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultIterator type.
14895func NewLoadBalancerLoadBalancingRuleListResultIterator(page LoadBalancerLoadBalancingRuleListResultPage) LoadBalancerLoadBalancingRuleListResultIterator {
14896	return LoadBalancerLoadBalancingRuleListResultIterator{page: page}
14897}
14898
14899// IsEmpty returns true if the ListResult contains no values.
14900func (lblbrlr LoadBalancerLoadBalancingRuleListResult) IsEmpty() bool {
14901	return lblbrlr.Value == nil || len(*lblbrlr.Value) == 0
14902}
14903
14904// hasNextLink returns true if the NextLink is not empty.
14905func (lblbrlr LoadBalancerLoadBalancingRuleListResult) hasNextLink() bool {
14906	return lblbrlr.NextLink != nil && len(*lblbrlr.NextLink) != 0
14907}
14908
14909// loadBalancerLoadBalancingRuleListResultPreparer prepares a request to retrieve the next set of results.
14910// It returns nil if no more results exist.
14911func (lblbrlr LoadBalancerLoadBalancingRuleListResult) loadBalancerLoadBalancingRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
14912	if !lblbrlr.hasNextLink() {
14913		return nil, nil
14914	}
14915	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14916		autorest.AsJSON(),
14917		autorest.AsGet(),
14918		autorest.WithBaseURL(to.String(lblbrlr.NextLink)))
14919}
14920
14921// LoadBalancerLoadBalancingRuleListResultPage contains a page of LoadBalancingRule values.
14922type LoadBalancerLoadBalancingRuleListResultPage struct {
14923	fn      func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)
14924	lblbrlr LoadBalancerLoadBalancingRuleListResult
14925}
14926
14927// NextWithContext advances to the next page of values.  If there was an error making
14928// the request the page does not advance and the error is returned.
14929func (page *LoadBalancerLoadBalancingRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
14930	if tracing.IsEnabled() {
14931		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultPage.NextWithContext")
14932		defer func() {
14933			sc := -1
14934			if page.Response().Response.Response != nil {
14935				sc = page.Response().Response.Response.StatusCode
14936			}
14937			tracing.EndSpan(ctx, sc, err)
14938		}()
14939	}
14940	for {
14941		next, err := page.fn(ctx, page.lblbrlr)
14942		if err != nil {
14943			return err
14944		}
14945		page.lblbrlr = next
14946		if !next.hasNextLink() || !next.IsEmpty() {
14947			break
14948		}
14949	}
14950	return nil
14951}
14952
14953// Next advances to the next page of values.  If there was an error making
14954// the request the page does not advance and the error is returned.
14955// Deprecated: Use NextWithContext() instead.
14956func (page *LoadBalancerLoadBalancingRuleListResultPage) Next() error {
14957	return page.NextWithContext(context.Background())
14958}
14959
14960// NotDone returns true if the page enumeration should be started or is not yet complete.
14961func (page LoadBalancerLoadBalancingRuleListResultPage) NotDone() bool {
14962	return !page.lblbrlr.IsEmpty()
14963}
14964
14965// Response returns the raw server response from the last page request.
14966func (page LoadBalancerLoadBalancingRuleListResultPage) Response() LoadBalancerLoadBalancingRuleListResult {
14967	return page.lblbrlr
14968}
14969
14970// Values returns the slice of values for the current page or nil if there are no values.
14971func (page LoadBalancerLoadBalancingRuleListResultPage) Values() []LoadBalancingRule {
14972	if page.lblbrlr.IsEmpty() {
14973		return nil
14974	}
14975	return *page.lblbrlr.Value
14976}
14977
14978// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultPage type.
14979func NewLoadBalancerLoadBalancingRuleListResultPage(cur LoadBalancerLoadBalancingRuleListResult, getNextPage func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)) LoadBalancerLoadBalancingRuleListResultPage {
14980	return LoadBalancerLoadBalancingRuleListResultPage{
14981		fn:      getNextPage,
14982		lblbrlr: cur,
14983	}
14984}
14985
14986// LoadBalancerOutboundRuleListResult response for ListOutboundRule API service call.
14987type LoadBalancerOutboundRuleListResult struct {
14988	autorest.Response `json:"-"`
14989	// Value - A list of outbound rules in a load balancer.
14990	Value *[]OutboundRule `json:"value,omitempty"`
14991	// NextLink - READ-ONLY; The URL to get the next set of results.
14992	NextLink *string `json:"nextLink,omitempty"`
14993}
14994
14995// MarshalJSON is the custom marshaler for LoadBalancerOutboundRuleListResult.
14996func (lborlr LoadBalancerOutboundRuleListResult) MarshalJSON() ([]byte, error) {
14997	objectMap := make(map[string]interface{})
14998	if lborlr.Value != nil {
14999		objectMap["value"] = lborlr.Value
15000	}
15001	return json.Marshal(objectMap)
15002}
15003
15004// LoadBalancerOutboundRuleListResultIterator provides access to a complete listing of OutboundRule values.
15005type LoadBalancerOutboundRuleListResultIterator struct {
15006	i    int
15007	page LoadBalancerOutboundRuleListResultPage
15008}
15009
15010// NextWithContext advances to the next value.  If there was an error making
15011// the request the iterator does not advance and the error is returned.
15012func (iter *LoadBalancerOutboundRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
15013	if tracing.IsEnabled() {
15014		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerOutboundRuleListResultIterator.NextWithContext")
15015		defer func() {
15016			sc := -1
15017			if iter.Response().Response.Response != nil {
15018				sc = iter.Response().Response.Response.StatusCode
15019			}
15020			tracing.EndSpan(ctx, sc, err)
15021		}()
15022	}
15023	iter.i++
15024	if iter.i < len(iter.page.Values()) {
15025		return nil
15026	}
15027	err = iter.page.NextWithContext(ctx)
15028	if err != nil {
15029		iter.i--
15030		return err
15031	}
15032	iter.i = 0
15033	return nil
15034}
15035
15036// Next advances to the next value.  If there was an error making
15037// the request the iterator does not advance and the error is returned.
15038// Deprecated: Use NextWithContext() instead.
15039func (iter *LoadBalancerOutboundRuleListResultIterator) Next() error {
15040	return iter.NextWithContext(context.Background())
15041}
15042
15043// NotDone returns true if the enumeration should be started or is not yet complete.
15044func (iter LoadBalancerOutboundRuleListResultIterator) NotDone() bool {
15045	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15046}
15047
15048// Response returns the raw server response from the last page request.
15049func (iter LoadBalancerOutboundRuleListResultIterator) Response() LoadBalancerOutboundRuleListResult {
15050	return iter.page.Response()
15051}
15052
15053// Value returns the current value or a zero-initialized value if the
15054// iterator has advanced beyond the end of the collection.
15055func (iter LoadBalancerOutboundRuleListResultIterator) Value() OutboundRule {
15056	if !iter.page.NotDone() {
15057		return OutboundRule{}
15058	}
15059	return iter.page.Values()[iter.i]
15060}
15061
15062// Creates a new instance of the LoadBalancerOutboundRuleListResultIterator type.
15063func NewLoadBalancerOutboundRuleListResultIterator(page LoadBalancerOutboundRuleListResultPage) LoadBalancerOutboundRuleListResultIterator {
15064	return LoadBalancerOutboundRuleListResultIterator{page: page}
15065}
15066
15067// IsEmpty returns true if the ListResult contains no values.
15068func (lborlr LoadBalancerOutboundRuleListResult) IsEmpty() bool {
15069	return lborlr.Value == nil || len(*lborlr.Value) == 0
15070}
15071
15072// hasNextLink returns true if the NextLink is not empty.
15073func (lborlr LoadBalancerOutboundRuleListResult) hasNextLink() bool {
15074	return lborlr.NextLink != nil && len(*lborlr.NextLink) != 0
15075}
15076
15077// loadBalancerOutboundRuleListResultPreparer prepares a request to retrieve the next set of results.
15078// It returns nil if no more results exist.
15079func (lborlr LoadBalancerOutboundRuleListResult) loadBalancerOutboundRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
15080	if !lborlr.hasNextLink() {
15081		return nil, nil
15082	}
15083	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15084		autorest.AsJSON(),
15085		autorest.AsGet(),
15086		autorest.WithBaseURL(to.String(lborlr.NextLink)))
15087}
15088
15089// LoadBalancerOutboundRuleListResultPage contains a page of OutboundRule values.
15090type LoadBalancerOutboundRuleListResultPage struct {
15091	fn     func(context.Context, LoadBalancerOutboundRuleListResult) (LoadBalancerOutboundRuleListResult, error)
15092	lborlr LoadBalancerOutboundRuleListResult
15093}
15094
15095// NextWithContext advances to the next page of values.  If there was an error making
15096// the request the page does not advance and the error is returned.
15097func (page *LoadBalancerOutboundRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
15098	if tracing.IsEnabled() {
15099		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerOutboundRuleListResultPage.NextWithContext")
15100		defer func() {
15101			sc := -1
15102			if page.Response().Response.Response != nil {
15103				sc = page.Response().Response.Response.StatusCode
15104			}
15105			tracing.EndSpan(ctx, sc, err)
15106		}()
15107	}
15108	for {
15109		next, err := page.fn(ctx, page.lborlr)
15110		if err != nil {
15111			return err
15112		}
15113		page.lborlr = next
15114		if !next.hasNextLink() || !next.IsEmpty() {
15115			break
15116		}
15117	}
15118	return nil
15119}
15120
15121// Next advances to the next page of values.  If there was an error making
15122// the request the page does not advance and the error is returned.
15123// Deprecated: Use NextWithContext() instead.
15124func (page *LoadBalancerOutboundRuleListResultPage) Next() error {
15125	return page.NextWithContext(context.Background())
15126}
15127
15128// NotDone returns true if the page enumeration should be started or is not yet complete.
15129func (page LoadBalancerOutboundRuleListResultPage) NotDone() bool {
15130	return !page.lborlr.IsEmpty()
15131}
15132
15133// Response returns the raw server response from the last page request.
15134func (page LoadBalancerOutboundRuleListResultPage) Response() LoadBalancerOutboundRuleListResult {
15135	return page.lborlr
15136}
15137
15138// Values returns the slice of values for the current page or nil if there are no values.
15139func (page LoadBalancerOutboundRuleListResultPage) Values() []OutboundRule {
15140	if page.lborlr.IsEmpty() {
15141		return nil
15142	}
15143	return *page.lborlr.Value
15144}
15145
15146// Creates a new instance of the LoadBalancerOutboundRuleListResultPage type.
15147func NewLoadBalancerOutboundRuleListResultPage(cur LoadBalancerOutboundRuleListResult, getNextPage func(context.Context, LoadBalancerOutboundRuleListResult) (LoadBalancerOutboundRuleListResult, error)) LoadBalancerOutboundRuleListResultPage {
15148	return LoadBalancerOutboundRuleListResultPage{
15149		fn:     getNextPage,
15150		lborlr: cur,
15151	}
15152}
15153
15154// LoadBalancerProbeListResult response for ListProbe API service call.
15155type LoadBalancerProbeListResult struct {
15156	autorest.Response `json:"-"`
15157	// Value - A list of probes in a load balancer.
15158	Value *[]Probe `json:"value,omitempty"`
15159	// NextLink - READ-ONLY; The URL to get the next set of results.
15160	NextLink *string `json:"nextLink,omitempty"`
15161}
15162
15163// MarshalJSON is the custom marshaler for LoadBalancerProbeListResult.
15164func (lbplr LoadBalancerProbeListResult) MarshalJSON() ([]byte, error) {
15165	objectMap := make(map[string]interface{})
15166	if lbplr.Value != nil {
15167		objectMap["value"] = lbplr.Value
15168	}
15169	return json.Marshal(objectMap)
15170}
15171
15172// LoadBalancerProbeListResultIterator provides access to a complete listing of Probe values.
15173type LoadBalancerProbeListResultIterator struct {
15174	i    int
15175	page LoadBalancerProbeListResultPage
15176}
15177
15178// NextWithContext advances to the next value.  If there was an error making
15179// the request the iterator does not advance and the error is returned.
15180func (iter *LoadBalancerProbeListResultIterator) NextWithContext(ctx context.Context) (err error) {
15181	if tracing.IsEnabled() {
15182		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultIterator.NextWithContext")
15183		defer func() {
15184			sc := -1
15185			if iter.Response().Response.Response != nil {
15186				sc = iter.Response().Response.Response.StatusCode
15187			}
15188			tracing.EndSpan(ctx, sc, err)
15189		}()
15190	}
15191	iter.i++
15192	if iter.i < len(iter.page.Values()) {
15193		return nil
15194	}
15195	err = iter.page.NextWithContext(ctx)
15196	if err != nil {
15197		iter.i--
15198		return err
15199	}
15200	iter.i = 0
15201	return nil
15202}
15203
15204// Next advances to the next value.  If there was an error making
15205// the request the iterator does not advance and the error is returned.
15206// Deprecated: Use NextWithContext() instead.
15207func (iter *LoadBalancerProbeListResultIterator) Next() error {
15208	return iter.NextWithContext(context.Background())
15209}
15210
15211// NotDone returns true if the enumeration should be started or is not yet complete.
15212func (iter LoadBalancerProbeListResultIterator) NotDone() bool {
15213	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15214}
15215
15216// Response returns the raw server response from the last page request.
15217func (iter LoadBalancerProbeListResultIterator) Response() LoadBalancerProbeListResult {
15218	return iter.page.Response()
15219}
15220
15221// Value returns the current value or a zero-initialized value if the
15222// iterator has advanced beyond the end of the collection.
15223func (iter LoadBalancerProbeListResultIterator) Value() Probe {
15224	if !iter.page.NotDone() {
15225		return Probe{}
15226	}
15227	return iter.page.Values()[iter.i]
15228}
15229
15230// Creates a new instance of the LoadBalancerProbeListResultIterator type.
15231func NewLoadBalancerProbeListResultIterator(page LoadBalancerProbeListResultPage) LoadBalancerProbeListResultIterator {
15232	return LoadBalancerProbeListResultIterator{page: page}
15233}
15234
15235// IsEmpty returns true if the ListResult contains no values.
15236func (lbplr LoadBalancerProbeListResult) IsEmpty() bool {
15237	return lbplr.Value == nil || len(*lbplr.Value) == 0
15238}
15239
15240// hasNextLink returns true if the NextLink is not empty.
15241func (lbplr LoadBalancerProbeListResult) hasNextLink() bool {
15242	return lbplr.NextLink != nil && len(*lbplr.NextLink) != 0
15243}
15244
15245// loadBalancerProbeListResultPreparer prepares a request to retrieve the next set of results.
15246// It returns nil if no more results exist.
15247func (lbplr LoadBalancerProbeListResult) loadBalancerProbeListResultPreparer(ctx context.Context) (*http.Request, error) {
15248	if !lbplr.hasNextLink() {
15249		return nil, nil
15250	}
15251	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15252		autorest.AsJSON(),
15253		autorest.AsGet(),
15254		autorest.WithBaseURL(to.String(lbplr.NextLink)))
15255}
15256
15257// LoadBalancerProbeListResultPage contains a page of Probe values.
15258type LoadBalancerProbeListResultPage struct {
15259	fn    func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)
15260	lbplr LoadBalancerProbeListResult
15261}
15262
15263// NextWithContext advances to the next page of values.  If there was an error making
15264// the request the page does not advance and the error is returned.
15265func (page *LoadBalancerProbeListResultPage) NextWithContext(ctx context.Context) (err error) {
15266	if tracing.IsEnabled() {
15267		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultPage.NextWithContext")
15268		defer func() {
15269			sc := -1
15270			if page.Response().Response.Response != nil {
15271				sc = page.Response().Response.Response.StatusCode
15272			}
15273			tracing.EndSpan(ctx, sc, err)
15274		}()
15275	}
15276	for {
15277		next, err := page.fn(ctx, page.lbplr)
15278		if err != nil {
15279			return err
15280		}
15281		page.lbplr = next
15282		if !next.hasNextLink() || !next.IsEmpty() {
15283			break
15284		}
15285	}
15286	return nil
15287}
15288
15289// Next advances to the next page of values.  If there was an error making
15290// the request the page does not advance and the error is returned.
15291// Deprecated: Use NextWithContext() instead.
15292func (page *LoadBalancerProbeListResultPage) Next() error {
15293	return page.NextWithContext(context.Background())
15294}
15295
15296// NotDone returns true if the page enumeration should be started or is not yet complete.
15297func (page LoadBalancerProbeListResultPage) NotDone() bool {
15298	return !page.lbplr.IsEmpty()
15299}
15300
15301// Response returns the raw server response from the last page request.
15302func (page LoadBalancerProbeListResultPage) Response() LoadBalancerProbeListResult {
15303	return page.lbplr
15304}
15305
15306// Values returns the slice of values for the current page or nil if there are no values.
15307func (page LoadBalancerProbeListResultPage) Values() []Probe {
15308	if page.lbplr.IsEmpty() {
15309		return nil
15310	}
15311	return *page.lbplr.Value
15312}
15313
15314// Creates a new instance of the LoadBalancerProbeListResultPage type.
15315func NewLoadBalancerProbeListResultPage(cur LoadBalancerProbeListResult, getNextPage func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)) LoadBalancerProbeListResultPage {
15316	return LoadBalancerProbeListResultPage{
15317		fn:    getNextPage,
15318		lbplr: cur,
15319	}
15320}
15321
15322// LoadBalancerPropertiesFormat properties of the load balancer.
15323type LoadBalancerPropertiesFormat struct {
15324	// FrontendIPConfigurations - Object representing the frontend IPs to be used for the load balancer
15325	FrontendIPConfigurations *[]FrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"`
15326	// BackendAddressPools - Collection of backend address pools used by a load balancer
15327	BackendAddressPools *[]BackendAddressPool `json:"backendAddressPools,omitempty"`
15328	// LoadBalancingRules - Object collection representing the load balancing rules Gets the provisioning
15329	LoadBalancingRules *[]LoadBalancingRule `json:"loadBalancingRules,omitempty"`
15330	// Probes - Collection of probe objects used in the load balancer
15331	Probes *[]Probe `json:"probes,omitempty"`
15332	// 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.
15333	InboundNatRules *[]InboundNatRule `json:"inboundNatRules,omitempty"`
15334	// 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.
15335	InboundNatPools *[]InboundNatPool `json:"inboundNatPools,omitempty"`
15336	// OutboundRules - The outbound rules.
15337	OutboundRules *[]OutboundRule `json:"outboundRules,omitempty"`
15338	// ResourceGUID - The resource GUID property of the load balancer resource.
15339	ResourceGUID *string `json:"resourceGuid,omitempty"`
15340	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
15341	ProvisioningState *string `json:"provisioningState,omitempty"`
15342}
15343
15344// LoadBalancersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
15345// long-running operation.
15346type LoadBalancersCreateOrUpdateFuture struct {
15347	azure.FutureAPI
15348	// Result returns the result of the asynchronous operation.
15349	// If the operation has not completed it will return an error.
15350	Result func(LoadBalancersClient) (LoadBalancer, error)
15351}
15352
15353// LoadBalancersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
15354// operation.
15355type LoadBalancersDeleteFuture struct {
15356	azure.FutureAPI
15357	// Result returns the result of the asynchronous operation.
15358	// If the operation has not completed it will return an error.
15359	Result func(LoadBalancersClient) (autorest.Response, error)
15360}
15361
15362// LoadBalancerSku SKU of a load balancer
15363type LoadBalancerSku struct {
15364	// Name - Name of a load balancer SKU. Possible values include: 'LoadBalancerSkuNameBasic', 'LoadBalancerSkuNameStandard'
15365	Name LoadBalancerSkuName `json:"name,omitempty"`
15366}
15367
15368// LoadBalancersUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
15369// operation.
15370type LoadBalancersUpdateTagsFuture struct {
15371	azure.FutureAPI
15372	// Result returns the result of the asynchronous operation.
15373	// If the operation has not completed it will return an error.
15374	Result func(LoadBalancersClient) (LoadBalancer, error)
15375}
15376
15377// LoadBalancingRule a load balancing rule for a load balancer.
15378type LoadBalancingRule struct {
15379	autorest.Response `json:"-"`
15380	// LoadBalancingRulePropertiesFormat - Properties of load balancer load balancing rule.
15381	*LoadBalancingRulePropertiesFormat `json:"properties,omitempty"`
15382	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
15383	Name *string `json:"name,omitempty"`
15384	// Etag - A unique read-only string that changes whenever the resource is updated.
15385	Etag *string `json:"etag,omitempty"`
15386	// ID - Resource ID.
15387	ID *string `json:"id,omitempty"`
15388}
15389
15390// MarshalJSON is the custom marshaler for LoadBalancingRule.
15391func (lbr LoadBalancingRule) MarshalJSON() ([]byte, error) {
15392	objectMap := make(map[string]interface{})
15393	if lbr.LoadBalancingRulePropertiesFormat != nil {
15394		objectMap["properties"] = lbr.LoadBalancingRulePropertiesFormat
15395	}
15396	if lbr.Name != nil {
15397		objectMap["name"] = lbr.Name
15398	}
15399	if lbr.Etag != nil {
15400		objectMap["etag"] = lbr.Etag
15401	}
15402	if lbr.ID != nil {
15403		objectMap["id"] = lbr.ID
15404	}
15405	return json.Marshal(objectMap)
15406}
15407
15408// UnmarshalJSON is the custom unmarshaler for LoadBalancingRule struct.
15409func (lbr *LoadBalancingRule) UnmarshalJSON(body []byte) error {
15410	var m map[string]*json.RawMessage
15411	err := json.Unmarshal(body, &m)
15412	if err != nil {
15413		return err
15414	}
15415	for k, v := range m {
15416		switch k {
15417		case "properties":
15418			if v != nil {
15419				var loadBalancingRulePropertiesFormat LoadBalancingRulePropertiesFormat
15420				err = json.Unmarshal(*v, &loadBalancingRulePropertiesFormat)
15421				if err != nil {
15422					return err
15423				}
15424				lbr.LoadBalancingRulePropertiesFormat = &loadBalancingRulePropertiesFormat
15425			}
15426		case "name":
15427			if v != nil {
15428				var name string
15429				err = json.Unmarshal(*v, &name)
15430				if err != nil {
15431					return err
15432				}
15433				lbr.Name = &name
15434			}
15435		case "etag":
15436			if v != nil {
15437				var etag string
15438				err = json.Unmarshal(*v, &etag)
15439				if err != nil {
15440					return err
15441				}
15442				lbr.Etag = &etag
15443			}
15444		case "id":
15445			if v != nil {
15446				var ID string
15447				err = json.Unmarshal(*v, &ID)
15448				if err != nil {
15449					return err
15450				}
15451				lbr.ID = &ID
15452			}
15453		}
15454	}
15455
15456	return nil
15457}
15458
15459// LoadBalancingRulePropertiesFormat properties of the load balancer.
15460type LoadBalancingRulePropertiesFormat struct {
15461	// FrontendIPConfiguration - A reference to frontend IP addresses.
15462	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
15463	// BackendAddressPool - A reference to a pool of DIPs. Inbound traffic is randomly load balanced across IPs in the backend IPs.
15464	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
15465	// Probe - The reference of the load balancer probe used by the load balancing rule.
15466	Probe *SubResource `json:"probe,omitempty"`
15467	// Protocol - Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
15468	Protocol TransportProtocol `json:"protocol,omitempty"`
15469	// LoadDistribution - The load distribution policy for this rule. Possible values are 'Default', 'SourceIP', and 'SourceIPProtocol'. Possible values include: 'LoadDistributionDefault', 'LoadDistributionSourceIP', 'LoadDistributionSourceIPProtocol'
15470	LoadDistribution LoadDistribution `json:"loadDistribution,omitempty"`
15471	// 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"
15472	FrontendPort *int32 `json:"frontendPort,omitempty"`
15473	// BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 0 and 65535. Note that value 0 enables "Any Port"
15474	BackendPort *int32 `json:"backendPort,omitempty"`
15475	// 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.
15476	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
15477	// 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.
15478	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
15479	// 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.
15480	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
15481	// DisableOutboundSnat - Configures SNAT for the VMs in the backend pool to use the publicIP address specified in the frontend of the load balancing rule.
15482	DisableOutboundSnat *bool `json:"disableOutboundSnat,omitempty"`
15483	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
15484	ProvisioningState *string `json:"provisioningState,omitempty"`
15485}
15486
15487// LocalNetworkGateway a common class for general resource information
15488type LocalNetworkGateway struct {
15489	autorest.Response `json:"-"`
15490	// LocalNetworkGatewayPropertiesFormat - Properties of the local network gateway.
15491	*LocalNetworkGatewayPropertiesFormat `json:"properties,omitempty"`
15492	// Etag - A unique read-only string that changes whenever the resource is updated.
15493	Etag *string `json:"etag,omitempty"`
15494	// ID - Resource ID.
15495	ID *string `json:"id,omitempty"`
15496	// Name - READ-ONLY; Resource name.
15497	Name *string `json:"name,omitempty"`
15498	// Type - READ-ONLY; Resource type.
15499	Type *string `json:"type,omitempty"`
15500	// Location - Resource location.
15501	Location *string `json:"location,omitempty"`
15502	// Tags - Resource tags.
15503	Tags map[string]*string `json:"tags"`
15504}
15505
15506// MarshalJSON is the custom marshaler for LocalNetworkGateway.
15507func (lng LocalNetworkGateway) MarshalJSON() ([]byte, error) {
15508	objectMap := make(map[string]interface{})
15509	if lng.LocalNetworkGatewayPropertiesFormat != nil {
15510		objectMap["properties"] = lng.LocalNetworkGatewayPropertiesFormat
15511	}
15512	if lng.Etag != nil {
15513		objectMap["etag"] = lng.Etag
15514	}
15515	if lng.ID != nil {
15516		objectMap["id"] = lng.ID
15517	}
15518	if lng.Location != nil {
15519		objectMap["location"] = lng.Location
15520	}
15521	if lng.Tags != nil {
15522		objectMap["tags"] = lng.Tags
15523	}
15524	return json.Marshal(objectMap)
15525}
15526
15527// UnmarshalJSON is the custom unmarshaler for LocalNetworkGateway struct.
15528func (lng *LocalNetworkGateway) UnmarshalJSON(body []byte) error {
15529	var m map[string]*json.RawMessage
15530	err := json.Unmarshal(body, &m)
15531	if err != nil {
15532		return err
15533	}
15534	for k, v := range m {
15535		switch k {
15536		case "properties":
15537			if v != nil {
15538				var localNetworkGatewayPropertiesFormat LocalNetworkGatewayPropertiesFormat
15539				err = json.Unmarshal(*v, &localNetworkGatewayPropertiesFormat)
15540				if err != nil {
15541					return err
15542				}
15543				lng.LocalNetworkGatewayPropertiesFormat = &localNetworkGatewayPropertiesFormat
15544			}
15545		case "etag":
15546			if v != nil {
15547				var etag string
15548				err = json.Unmarshal(*v, &etag)
15549				if err != nil {
15550					return err
15551				}
15552				lng.Etag = &etag
15553			}
15554		case "id":
15555			if v != nil {
15556				var ID string
15557				err = json.Unmarshal(*v, &ID)
15558				if err != nil {
15559					return err
15560				}
15561				lng.ID = &ID
15562			}
15563		case "name":
15564			if v != nil {
15565				var name string
15566				err = json.Unmarshal(*v, &name)
15567				if err != nil {
15568					return err
15569				}
15570				lng.Name = &name
15571			}
15572		case "type":
15573			if v != nil {
15574				var typeVar string
15575				err = json.Unmarshal(*v, &typeVar)
15576				if err != nil {
15577					return err
15578				}
15579				lng.Type = &typeVar
15580			}
15581		case "location":
15582			if v != nil {
15583				var location string
15584				err = json.Unmarshal(*v, &location)
15585				if err != nil {
15586					return err
15587				}
15588				lng.Location = &location
15589			}
15590		case "tags":
15591			if v != nil {
15592				var tags map[string]*string
15593				err = json.Unmarshal(*v, &tags)
15594				if err != nil {
15595					return err
15596				}
15597				lng.Tags = tags
15598			}
15599		}
15600	}
15601
15602	return nil
15603}
15604
15605// LocalNetworkGatewayListResult response for ListLocalNetworkGateways API service call.
15606type LocalNetworkGatewayListResult struct {
15607	autorest.Response `json:"-"`
15608	// Value - A list of local network gateways that exists in a resource group.
15609	Value *[]LocalNetworkGateway `json:"value,omitempty"`
15610	// NextLink - READ-ONLY; The URL to get the next set of results.
15611	NextLink *string `json:"nextLink,omitempty"`
15612}
15613
15614// MarshalJSON is the custom marshaler for LocalNetworkGatewayListResult.
15615func (lnglr LocalNetworkGatewayListResult) MarshalJSON() ([]byte, error) {
15616	objectMap := make(map[string]interface{})
15617	if lnglr.Value != nil {
15618		objectMap["value"] = lnglr.Value
15619	}
15620	return json.Marshal(objectMap)
15621}
15622
15623// LocalNetworkGatewayListResultIterator provides access to a complete listing of LocalNetworkGateway
15624// values.
15625type LocalNetworkGatewayListResultIterator struct {
15626	i    int
15627	page LocalNetworkGatewayListResultPage
15628}
15629
15630// NextWithContext advances to the next value.  If there was an error making
15631// the request the iterator does not advance and the error is returned.
15632func (iter *LocalNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
15633	if tracing.IsEnabled() {
15634		ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultIterator.NextWithContext")
15635		defer func() {
15636			sc := -1
15637			if iter.Response().Response.Response != nil {
15638				sc = iter.Response().Response.Response.StatusCode
15639			}
15640			tracing.EndSpan(ctx, sc, err)
15641		}()
15642	}
15643	iter.i++
15644	if iter.i < len(iter.page.Values()) {
15645		return nil
15646	}
15647	err = iter.page.NextWithContext(ctx)
15648	if err != nil {
15649		iter.i--
15650		return err
15651	}
15652	iter.i = 0
15653	return nil
15654}
15655
15656// Next advances to the next value.  If there was an error making
15657// the request the iterator does not advance and the error is returned.
15658// Deprecated: Use NextWithContext() instead.
15659func (iter *LocalNetworkGatewayListResultIterator) Next() error {
15660	return iter.NextWithContext(context.Background())
15661}
15662
15663// NotDone returns true if the enumeration should be started or is not yet complete.
15664func (iter LocalNetworkGatewayListResultIterator) NotDone() bool {
15665	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15666}
15667
15668// Response returns the raw server response from the last page request.
15669func (iter LocalNetworkGatewayListResultIterator) Response() LocalNetworkGatewayListResult {
15670	return iter.page.Response()
15671}
15672
15673// Value returns the current value or a zero-initialized value if the
15674// iterator has advanced beyond the end of the collection.
15675func (iter LocalNetworkGatewayListResultIterator) Value() LocalNetworkGateway {
15676	if !iter.page.NotDone() {
15677		return LocalNetworkGateway{}
15678	}
15679	return iter.page.Values()[iter.i]
15680}
15681
15682// Creates a new instance of the LocalNetworkGatewayListResultIterator type.
15683func NewLocalNetworkGatewayListResultIterator(page LocalNetworkGatewayListResultPage) LocalNetworkGatewayListResultIterator {
15684	return LocalNetworkGatewayListResultIterator{page: page}
15685}
15686
15687// IsEmpty returns true if the ListResult contains no values.
15688func (lnglr LocalNetworkGatewayListResult) IsEmpty() bool {
15689	return lnglr.Value == nil || len(*lnglr.Value) == 0
15690}
15691
15692// hasNextLink returns true if the NextLink is not empty.
15693func (lnglr LocalNetworkGatewayListResult) hasNextLink() bool {
15694	return lnglr.NextLink != nil && len(*lnglr.NextLink) != 0
15695}
15696
15697// localNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results.
15698// It returns nil if no more results exist.
15699func (lnglr LocalNetworkGatewayListResult) localNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
15700	if !lnglr.hasNextLink() {
15701		return nil, nil
15702	}
15703	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15704		autorest.AsJSON(),
15705		autorest.AsGet(),
15706		autorest.WithBaseURL(to.String(lnglr.NextLink)))
15707}
15708
15709// LocalNetworkGatewayListResultPage contains a page of LocalNetworkGateway values.
15710type LocalNetworkGatewayListResultPage struct {
15711	fn    func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)
15712	lnglr LocalNetworkGatewayListResult
15713}
15714
15715// NextWithContext advances to the next page of values.  If there was an error making
15716// the request the page does not advance and the error is returned.
15717func (page *LocalNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
15718	if tracing.IsEnabled() {
15719		ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultPage.NextWithContext")
15720		defer func() {
15721			sc := -1
15722			if page.Response().Response.Response != nil {
15723				sc = page.Response().Response.Response.StatusCode
15724			}
15725			tracing.EndSpan(ctx, sc, err)
15726		}()
15727	}
15728	for {
15729		next, err := page.fn(ctx, page.lnglr)
15730		if err != nil {
15731			return err
15732		}
15733		page.lnglr = next
15734		if !next.hasNextLink() || !next.IsEmpty() {
15735			break
15736		}
15737	}
15738	return nil
15739}
15740
15741// Next advances to the next page of values.  If there was an error making
15742// the request the page does not advance and the error is returned.
15743// Deprecated: Use NextWithContext() instead.
15744func (page *LocalNetworkGatewayListResultPage) Next() error {
15745	return page.NextWithContext(context.Background())
15746}
15747
15748// NotDone returns true if the page enumeration should be started or is not yet complete.
15749func (page LocalNetworkGatewayListResultPage) NotDone() bool {
15750	return !page.lnglr.IsEmpty()
15751}
15752
15753// Response returns the raw server response from the last page request.
15754func (page LocalNetworkGatewayListResultPage) Response() LocalNetworkGatewayListResult {
15755	return page.lnglr
15756}
15757
15758// Values returns the slice of values for the current page or nil if there are no values.
15759func (page LocalNetworkGatewayListResultPage) Values() []LocalNetworkGateway {
15760	if page.lnglr.IsEmpty() {
15761		return nil
15762	}
15763	return *page.lnglr.Value
15764}
15765
15766// Creates a new instance of the LocalNetworkGatewayListResultPage type.
15767func NewLocalNetworkGatewayListResultPage(cur LocalNetworkGatewayListResult, getNextPage func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)) LocalNetworkGatewayListResultPage {
15768	return LocalNetworkGatewayListResultPage{
15769		fn:    getNextPage,
15770		lnglr: cur,
15771	}
15772}
15773
15774// LocalNetworkGatewayPropertiesFormat localNetworkGateway properties
15775type LocalNetworkGatewayPropertiesFormat struct {
15776	// LocalNetworkAddressSpace - Local network site address space.
15777	LocalNetworkAddressSpace *AddressSpace `json:"localNetworkAddressSpace,omitempty"`
15778	// GatewayIPAddress - IP address of local network gateway.
15779	GatewayIPAddress *string `json:"gatewayIpAddress,omitempty"`
15780	// BgpSettings - Local network gateway's BGP speaker settings.
15781	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
15782	// ResourceGUID - The resource GUID property of the LocalNetworkGateway resource.
15783	ResourceGUID *string `json:"resourceGuid,omitempty"`
15784	// ProvisioningState - READ-ONLY; The provisioning state of the LocalNetworkGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
15785	ProvisioningState *string `json:"provisioningState,omitempty"`
15786}
15787
15788// MarshalJSON is the custom marshaler for LocalNetworkGatewayPropertiesFormat.
15789func (lngpf LocalNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
15790	objectMap := make(map[string]interface{})
15791	if lngpf.LocalNetworkAddressSpace != nil {
15792		objectMap["localNetworkAddressSpace"] = lngpf.LocalNetworkAddressSpace
15793	}
15794	if lngpf.GatewayIPAddress != nil {
15795		objectMap["gatewayIpAddress"] = lngpf.GatewayIPAddress
15796	}
15797	if lngpf.BgpSettings != nil {
15798		objectMap["bgpSettings"] = lngpf.BgpSettings
15799	}
15800	if lngpf.ResourceGUID != nil {
15801		objectMap["resourceGuid"] = lngpf.ResourceGUID
15802	}
15803	return json.Marshal(objectMap)
15804}
15805
15806// LocalNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
15807// long-running operation.
15808type LocalNetworkGatewaysCreateOrUpdateFuture struct {
15809	azure.FutureAPI
15810	// Result returns the result of the asynchronous operation.
15811	// If the operation has not completed it will return an error.
15812	Result func(LocalNetworkGatewaysClient) (LocalNetworkGateway, error)
15813}
15814
15815// LocalNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
15816// long-running operation.
15817type LocalNetworkGatewaysDeleteFuture struct {
15818	azure.FutureAPI
15819	// Result returns the result of the asynchronous operation.
15820	// If the operation has not completed it will return an error.
15821	Result func(LocalNetworkGatewaysClient) (autorest.Response, error)
15822}
15823
15824// LocalNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
15825// long-running operation.
15826type LocalNetworkGatewaysUpdateTagsFuture struct {
15827	azure.FutureAPI
15828	// Result returns the result of the asynchronous operation.
15829	// If the operation has not completed it will return an error.
15830	Result func(LocalNetworkGatewaysClient) (LocalNetworkGateway, error)
15831}
15832
15833// LogSpecification description of logging specification.
15834type LogSpecification struct {
15835	// Name - The name of the specification.
15836	Name *string `json:"name,omitempty"`
15837	// DisplayName - The display name of the specification.
15838	DisplayName *string `json:"displayName,omitempty"`
15839	// BlobDuration - Duration of the blob.
15840	BlobDuration *string `json:"blobDuration,omitempty"`
15841}
15842
15843// ManagedServiceIdentity identity for the resource.
15844type ManagedServiceIdentity struct {
15845	// PrincipalID - READ-ONLY; The principal id of the system assigned identity. This property will only be provided for a system assigned identity.
15846	PrincipalID *string `json:"principalId,omitempty"`
15847	// TenantID - READ-ONLY; The tenant id of the system assigned identity. This property will only be provided for a system assigned identity.
15848	TenantID *string `json:"tenantId,omitempty"`
15849	// 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'
15850	Type ResourceIdentityType `json:"type,omitempty"`
15851	// 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}'.
15852	UserAssignedIdentities map[string]*ManagedServiceIdentityUserAssignedIdentitiesValue `json:"userAssignedIdentities"`
15853}
15854
15855// MarshalJSON is the custom marshaler for ManagedServiceIdentity.
15856func (msi ManagedServiceIdentity) MarshalJSON() ([]byte, error) {
15857	objectMap := make(map[string]interface{})
15858	if msi.Type != "" {
15859		objectMap["type"] = msi.Type
15860	}
15861	if msi.UserAssignedIdentities != nil {
15862		objectMap["userAssignedIdentities"] = msi.UserAssignedIdentities
15863	}
15864	return json.Marshal(objectMap)
15865}
15866
15867// ManagedServiceIdentityUserAssignedIdentitiesValue ...
15868type ManagedServiceIdentityUserAssignedIdentitiesValue struct {
15869	// PrincipalID - READ-ONLY; The principal id of user assigned identity.
15870	PrincipalID *string `json:"principalId,omitempty"`
15871	// ClientID - READ-ONLY; The client id of user assigned identity.
15872	ClientID *string `json:"clientId,omitempty"`
15873}
15874
15875// MatchedRule matched rule.
15876type MatchedRule struct {
15877	// RuleName - Name of the matched network security rule.
15878	RuleName *string `json:"ruleName,omitempty"`
15879	// Action - The network traffic is allowed or denied. Possible values are 'Allow' and 'Deny'.
15880	Action *string `json:"action,omitempty"`
15881}
15882
15883// MetricSpecification description of metrics specification.
15884type MetricSpecification struct {
15885	// Name - The name of the metric.
15886	Name *string `json:"name,omitempty"`
15887	// DisplayName - The display name of the metric.
15888	DisplayName *string `json:"displayName,omitempty"`
15889	// DisplayDescription - The description of the metric.
15890	DisplayDescription *string `json:"displayDescription,omitempty"`
15891	// Unit - Units the metric to be displayed in.
15892	Unit *string `json:"unit,omitempty"`
15893	// AggregationType - The aggregation type.
15894	AggregationType *string `json:"aggregationType,omitempty"`
15895	// Availabilities - List of availability.
15896	Availabilities *[]Availability `json:"availabilities,omitempty"`
15897	// EnableRegionalMdmAccount - Whether regional MDM account enabled.
15898	EnableRegionalMdmAccount *bool `json:"enableRegionalMdmAccount,omitempty"`
15899	// FillGapWithZero - Whether gaps would be filled with zeros.
15900	FillGapWithZero *bool `json:"fillGapWithZero,omitempty"`
15901	// MetricFilterPattern - Pattern for the filter of the metric.
15902	MetricFilterPattern *string `json:"metricFilterPattern,omitempty"`
15903	// Dimensions - List of dimensions.
15904	Dimensions *[]Dimension `json:"dimensions,omitempty"`
15905	// IsInternal - Whether the metric is internal.
15906	IsInternal *bool `json:"isInternal,omitempty"`
15907	// SourceMdmAccount - The source MDM account.
15908	SourceMdmAccount *string `json:"sourceMdmAccount,omitempty"`
15909	// SourceMdmNamespace - The source MDM namespace.
15910	SourceMdmNamespace *string `json:"sourceMdmNamespace,omitempty"`
15911	// ResourceIDDimensionNameOverride - The resource Id dimension name override.
15912	ResourceIDDimensionNameOverride *string `json:"resourceIdDimensionNameOverride,omitempty"`
15913}
15914
15915// NextHopParameters parameters that define the source and destination endpoint.
15916type NextHopParameters struct {
15917	// TargetResourceID - The resource identifier of the target resource against which the action is to be performed.
15918	TargetResourceID *string `json:"targetResourceId,omitempty"`
15919	// SourceIPAddress - The source IP address.
15920	SourceIPAddress *string `json:"sourceIPAddress,omitempty"`
15921	// DestinationIPAddress - The destination IP address.
15922	DestinationIPAddress *string `json:"destinationIPAddress,omitempty"`
15923	// 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).
15924	TargetNicResourceID *string `json:"targetNicResourceId,omitempty"`
15925}
15926
15927// NextHopResult the information about next hop from the specified VM.
15928type NextHopResult struct {
15929	autorest.Response `json:"-"`
15930	// NextHopType - Next hop type. Possible values include: 'NextHopTypeInternet', 'NextHopTypeVirtualAppliance', 'NextHopTypeVirtualNetworkGateway', 'NextHopTypeVnetLocal', 'NextHopTypeHyperNetGateway', 'NextHopTypeNone'
15931	NextHopType NextHopType `json:"nextHopType,omitempty"`
15932	// NextHopIPAddress - Next hop IP Address
15933	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
15934	// 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'.
15935	RouteTableID *string `json:"routeTableId,omitempty"`
15936}
15937
15938// Operation network REST API operation definition.
15939type Operation struct {
15940	// Name - Operation name: {provider}/{resource}/{operation}
15941	Name *string `json:"name,omitempty"`
15942	// Display - Display metadata associated with the operation.
15943	Display *OperationDisplay `json:"display,omitempty"`
15944	// Origin - Origin of the operation.
15945	Origin *string `json:"origin,omitempty"`
15946	// OperationPropertiesFormat - Operation properties format.
15947	*OperationPropertiesFormat `json:"properties,omitempty"`
15948}
15949
15950// MarshalJSON is the custom marshaler for Operation.
15951func (o Operation) MarshalJSON() ([]byte, error) {
15952	objectMap := make(map[string]interface{})
15953	if o.Name != nil {
15954		objectMap["name"] = o.Name
15955	}
15956	if o.Display != nil {
15957		objectMap["display"] = o.Display
15958	}
15959	if o.Origin != nil {
15960		objectMap["origin"] = o.Origin
15961	}
15962	if o.OperationPropertiesFormat != nil {
15963		objectMap["properties"] = o.OperationPropertiesFormat
15964	}
15965	return json.Marshal(objectMap)
15966}
15967
15968// UnmarshalJSON is the custom unmarshaler for Operation struct.
15969func (o *Operation) UnmarshalJSON(body []byte) error {
15970	var m map[string]*json.RawMessage
15971	err := json.Unmarshal(body, &m)
15972	if err != nil {
15973		return err
15974	}
15975	for k, v := range m {
15976		switch k {
15977		case "name":
15978			if v != nil {
15979				var name string
15980				err = json.Unmarshal(*v, &name)
15981				if err != nil {
15982					return err
15983				}
15984				o.Name = &name
15985			}
15986		case "display":
15987			if v != nil {
15988				var display OperationDisplay
15989				err = json.Unmarshal(*v, &display)
15990				if err != nil {
15991					return err
15992				}
15993				o.Display = &display
15994			}
15995		case "origin":
15996			if v != nil {
15997				var origin string
15998				err = json.Unmarshal(*v, &origin)
15999				if err != nil {
16000					return err
16001				}
16002				o.Origin = &origin
16003			}
16004		case "properties":
16005			if v != nil {
16006				var operationPropertiesFormat OperationPropertiesFormat
16007				err = json.Unmarshal(*v, &operationPropertiesFormat)
16008				if err != nil {
16009					return err
16010				}
16011				o.OperationPropertiesFormat = &operationPropertiesFormat
16012			}
16013		}
16014	}
16015
16016	return nil
16017}
16018
16019// OperationDisplay display metadata associated with the operation.
16020type OperationDisplay struct {
16021	// Provider - Service provider: Microsoft Network.
16022	Provider *string `json:"provider,omitempty"`
16023	// Resource - Resource on which the operation is performed.
16024	Resource *string `json:"resource,omitempty"`
16025	// Operation - Type of the operation: get, read, delete, etc.
16026	Operation *string `json:"operation,omitempty"`
16027	// Description - Description of the operation.
16028	Description *string `json:"description,omitempty"`
16029}
16030
16031// OperationListResult result of the request to list Network operations. It contains a list of operations
16032// and a URL link to get the next set of results.
16033type OperationListResult struct {
16034	autorest.Response `json:"-"`
16035	// Value - List of Network operations supported by the Network resource provider.
16036	Value *[]Operation `json:"value,omitempty"`
16037	// NextLink - URL to get the next set of operation list results if there are any.
16038	NextLink *string `json:"nextLink,omitempty"`
16039}
16040
16041// OperationListResultIterator provides access to a complete listing of Operation values.
16042type OperationListResultIterator struct {
16043	i    int
16044	page OperationListResultPage
16045}
16046
16047// NextWithContext advances to the next value.  If there was an error making
16048// the request the iterator does not advance and the error is returned.
16049func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) {
16050	if tracing.IsEnabled() {
16051		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext")
16052		defer func() {
16053			sc := -1
16054			if iter.Response().Response.Response != nil {
16055				sc = iter.Response().Response.Response.StatusCode
16056			}
16057			tracing.EndSpan(ctx, sc, err)
16058		}()
16059	}
16060	iter.i++
16061	if iter.i < len(iter.page.Values()) {
16062		return nil
16063	}
16064	err = iter.page.NextWithContext(ctx)
16065	if err != nil {
16066		iter.i--
16067		return err
16068	}
16069	iter.i = 0
16070	return nil
16071}
16072
16073// Next advances to the next value.  If there was an error making
16074// the request the iterator does not advance and the error is returned.
16075// Deprecated: Use NextWithContext() instead.
16076func (iter *OperationListResultIterator) Next() error {
16077	return iter.NextWithContext(context.Background())
16078}
16079
16080// NotDone returns true if the enumeration should be started or is not yet complete.
16081func (iter OperationListResultIterator) NotDone() bool {
16082	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16083}
16084
16085// Response returns the raw server response from the last page request.
16086func (iter OperationListResultIterator) Response() OperationListResult {
16087	return iter.page.Response()
16088}
16089
16090// Value returns the current value or a zero-initialized value if the
16091// iterator has advanced beyond the end of the collection.
16092func (iter OperationListResultIterator) Value() Operation {
16093	if !iter.page.NotDone() {
16094		return Operation{}
16095	}
16096	return iter.page.Values()[iter.i]
16097}
16098
16099// Creates a new instance of the OperationListResultIterator type.
16100func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator {
16101	return OperationListResultIterator{page: page}
16102}
16103
16104// IsEmpty returns true if the ListResult contains no values.
16105func (olr OperationListResult) IsEmpty() bool {
16106	return olr.Value == nil || len(*olr.Value) == 0
16107}
16108
16109// hasNextLink returns true if the NextLink is not empty.
16110func (olr OperationListResult) hasNextLink() bool {
16111	return olr.NextLink != nil && len(*olr.NextLink) != 0
16112}
16113
16114// operationListResultPreparer prepares a request to retrieve the next set of results.
16115// It returns nil if no more results exist.
16116func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) {
16117	if !olr.hasNextLink() {
16118		return nil, nil
16119	}
16120	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16121		autorest.AsJSON(),
16122		autorest.AsGet(),
16123		autorest.WithBaseURL(to.String(olr.NextLink)))
16124}
16125
16126// OperationListResultPage contains a page of Operation values.
16127type OperationListResultPage struct {
16128	fn  func(context.Context, OperationListResult) (OperationListResult, error)
16129	olr OperationListResult
16130}
16131
16132// NextWithContext advances to the next page of values.  If there was an error making
16133// the request the page does not advance and the error is returned.
16134func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) {
16135	if tracing.IsEnabled() {
16136		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext")
16137		defer func() {
16138			sc := -1
16139			if page.Response().Response.Response != nil {
16140				sc = page.Response().Response.Response.StatusCode
16141			}
16142			tracing.EndSpan(ctx, sc, err)
16143		}()
16144	}
16145	for {
16146		next, err := page.fn(ctx, page.olr)
16147		if err != nil {
16148			return err
16149		}
16150		page.olr = next
16151		if !next.hasNextLink() || !next.IsEmpty() {
16152			break
16153		}
16154	}
16155	return nil
16156}
16157
16158// Next advances to the next page of values.  If there was an error making
16159// the request the page does not advance and the error is returned.
16160// Deprecated: Use NextWithContext() instead.
16161func (page *OperationListResultPage) Next() error {
16162	return page.NextWithContext(context.Background())
16163}
16164
16165// NotDone returns true if the page enumeration should be started or is not yet complete.
16166func (page OperationListResultPage) NotDone() bool {
16167	return !page.olr.IsEmpty()
16168}
16169
16170// Response returns the raw server response from the last page request.
16171func (page OperationListResultPage) Response() OperationListResult {
16172	return page.olr
16173}
16174
16175// Values returns the slice of values for the current page or nil if there are no values.
16176func (page OperationListResultPage) Values() []Operation {
16177	if page.olr.IsEmpty() {
16178		return nil
16179	}
16180	return *page.olr.Value
16181}
16182
16183// Creates a new instance of the OperationListResultPage type.
16184func NewOperationListResultPage(cur OperationListResult, getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
16185	return OperationListResultPage{
16186		fn:  getNextPage,
16187		olr: cur,
16188	}
16189}
16190
16191// OperationPropertiesFormat description of operation properties format.
16192type OperationPropertiesFormat struct {
16193	// ServiceSpecification - Specification of the service.
16194	ServiceSpecification *OperationPropertiesFormatServiceSpecification `json:"serviceSpecification,omitempty"`
16195}
16196
16197// OperationPropertiesFormatServiceSpecification specification of the service.
16198type OperationPropertiesFormatServiceSpecification struct {
16199	// MetricSpecifications - Operation service specification.
16200	MetricSpecifications *[]MetricSpecification `json:"metricSpecifications,omitempty"`
16201	// LogSpecifications - Operation log specification.
16202	LogSpecifications *[]LogSpecification `json:"logSpecifications,omitempty"`
16203}
16204
16205// OutboundRule outbound rule of the load balancer.
16206type OutboundRule struct {
16207	autorest.Response `json:"-"`
16208	// OutboundRulePropertiesFormat - Properties of load balancer outbound rule.
16209	*OutboundRulePropertiesFormat `json:"properties,omitempty"`
16210	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
16211	Name *string `json:"name,omitempty"`
16212	// Etag - A unique read-only string that changes whenever the resource is updated.
16213	Etag *string `json:"etag,omitempty"`
16214	// ID - Resource ID.
16215	ID *string `json:"id,omitempty"`
16216}
16217
16218// MarshalJSON is the custom marshaler for OutboundRule.
16219func (or OutboundRule) MarshalJSON() ([]byte, error) {
16220	objectMap := make(map[string]interface{})
16221	if or.OutboundRulePropertiesFormat != nil {
16222		objectMap["properties"] = or.OutboundRulePropertiesFormat
16223	}
16224	if or.Name != nil {
16225		objectMap["name"] = or.Name
16226	}
16227	if or.Etag != nil {
16228		objectMap["etag"] = or.Etag
16229	}
16230	if or.ID != nil {
16231		objectMap["id"] = or.ID
16232	}
16233	return json.Marshal(objectMap)
16234}
16235
16236// UnmarshalJSON is the custom unmarshaler for OutboundRule struct.
16237func (or *OutboundRule) UnmarshalJSON(body []byte) error {
16238	var m map[string]*json.RawMessage
16239	err := json.Unmarshal(body, &m)
16240	if err != nil {
16241		return err
16242	}
16243	for k, v := range m {
16244		switch k {
16245		case "properties":
16246			if v != nil {
16247				var outboundRulePropertiesFormat OutboundRulePropertiesFormat
16248				err = json.Unmarshal(*v, &outboundRulePropertiesFormat)
16249				if err != nil {
16250					return err
16251				}
16252				or.OutboundRulePropertiesFormat = &outboundRulePropertiesFormat
16253			}
16254		case "name":
16255			if v != nil {
16256				var name string
16257				err = json.Unmarshal(*v, &name)
16258				if err != nil {
16259					return err
16260				}
16261				or.Name = &name
16262			}
16263		case "etag":
16264			if v != nil {
16265				var etag string
16266				err = json.Unmarshal(*v, &etag)
16267				if err != nil {
16268					return err
16269				}
16270				or.Etag = &etag
16271			}
16272		case "id":
16273			if v != nil {
16274				var ID string
16275				err = json.Unmarshal(*v, &ID)
16276				if err != nil {
16277					return err
16278				}
16279				or.ID = &ID
16280			}
16281		}
16282	}
16283
16284	return nil
16285}
16286
16287// OutboundRulePropertiesFormat outbound rule of the load balancer.
16288type OutboundRulePropertiesFormat struct {
16289	// AllocatedOutboundPorts - The number of outbound ports to be used for NAT.
16290	AllocatedOutboundPorts *int32 `json:"allocatedOutboundPorts,omitempty"`
16291	// FrontendIPConfigurations - The Frontend IP addresses of the load balancer.
16292	FrontendIPConfigurations *[]SubResource `json:"frontendIPConfigurations,omitempty"`
16293	// BackendAddressPool - A reference to a pool of DIPs. Outbound traffic is randomly load balanced across IPs in the backend IPs.
16294	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
16295	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
16296	ProvisioningState *string `json:"provisioningState,omitempty"`
16297	// Protocol - Protocol - TCP, UDP or All. Possible values include: 'Protocol1TCP', 'Protocol1UDP', 'Protocol1All'
16298	Protocol Protocol1 `json:"protocol,omitempty"`
16299	// 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.
16300	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
16301	// IdleTimeoutInMinutes - The timeout for the TCP idle connection
16302	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
16303}
16304
16305// P2SVpnGateway p2SVpnGateway Resource.
16306type P2SVpnGateway struct {
16307	autorest.Response        `json:"-"`
16308	*P2SVpnGatewayProperties `json:"properties,omitempty"`
16309	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
16310	Etag *string `json:"etag,omitempty"`
16311	// ID - Resource ID.
16312	ID *string `json:"id,omitempty"`
16313	// Name - READ-ONLY; Resource name.
16314	Name *string `json:"name,omitempty"`
16315	// Type - READ-ONLY; Resource type.
16316	Type *string `json:"type,omitempty"`
16317	// Location - Resource location.
16318	Location *string `json:"location,omitempty"`
16319	// Tags - Resource tags.
16320	Tags map[string]*string `json:"tags"`
16321}
16322
16323// MarshalJSON is the custom marshaler for P2SVpnGateway.
16324func (pvg P2SVpnGateway) MarshalJSON() ([]byte, error) {
16325	objectMap := make(map[string]interface{})
16326	if pvg.P2SVpnGatewayProperties != nil {
16327		objectMap["properties"] = pvg.P2SVpnGatewayProperties
16328	}
16329	if pvg.ID != nil {
16330		objectMap["id"] = pvg.ID
16331	}
16332	if pvg.Location != nil {
16333		objectMap["location"] = pvg.Location
16334	}
16335	if pvg.Tags != nil {
16336		objectMap["tags"] = pvg.Tags
16337	}
16338	return json.Marshal(objectMap)
16339}
16340
16341// UnmarshalJSON is the custom unmarshaler for P2SVpnGateway struct.
16342func (pvg *P2SVpnGateway) UnmarshalJSON(body []byte) error {
16343	var m map[string]*json.RawMessage
16344	err := json.Unmarshal(body, &m)
16345	if err != nil {
16346		return err
16347	}
16348	for k, v := range m {
16349		switch k {
16350		case "properties":
16351			if v != nil {
16352				var p2SVpnGatewayProperties P2SVpnGatewayProperties
16353				err = json.Unmarshal(*v, &p2SVpnGatewayProperties)
16354				if err != nil {
16355					return err
16356				}
16357				pvg.P2SVpnGatewayProperties = &p2SVpnGatewayProperties
16358			}
16359		case "etag":
16360			if v != nil {
16361				var etag string
16362				err = json.Unmarshal(*v, &etag)
16363				if err != nil {
16364					return err
16365				}
16366				pvg.Etag = &etag
16367			}
16368		case "id":
16369			if v != nil {
16370				var ID string
16371				err = json.Unmarshal(*v, &ID)
16372				if err != nil {
16373					return err
16374				}
16375				pvg.ID = &ID
16376			}
16377		case "name":
16378			if v != nil {
16379				var name string
16380				err = json.Unmarshal(*v, &name)
16381				if err != nil {
16382					return err
16383				}
16384				pvg.Name = &name
16385			}
16386		case "type":
16387			if v != nil {
16388				var typeVar string
16389				err = json.Unmarshal(*v, &typeVar)
16390				if err != nil {
16391					return err
16392				}
16393				pvg.Type = &typeVar
16394			}
16395		case "location":
16396			if v != nil {
16397				var location string
16398				err = json.Unmarshal(*v, &location)
16399				if err != nil {
16400					return err
16401				}
16402				pvg.Location = &location
16403			}
16404		case "tags":
16405			if v != nil {
16406				var tags map[string]*string
16407				err = json.Unmarshal(*v, &tags)
16408				if err != nil {
16409					return err
16410				}
16411				pvg.Tags = tags
16412			}
16413		}
16414	}
16415
16416	return nil
16417}
16418
16419// P2SVpnGatewayProperties parameters for P2SVpnGateway
16420type P2SVpnGatewayProperties struct {
16421	// VirtualHub - The VirtualHub to which the gateway belongs
16422	VirtualHub *SubResource `json:"virtualHub,omitempty"`
16423	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
16424	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
16425	// VpnGatewayScaleUnit - The scale unit for this p2s vpn gateway.
16426	VpnGatewayScaleUnit *int32 `json:"vpnGatewayScaleUnit,omitempty"`
16427	// P2SVpnServerConfiguration - The P2SVpnServerConfiguration to which the p2sVpnGateway is attached to.
16428	P2SVpnServerConfiguration *SubResource `json:"p2SVpnServerConfiguration,omitempty"`
16429	// VpnClientAddressPool - The reference of the address space resource which represents Address space for P2S VpnClient.
16430	VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"`
16431	// VpnClientConnectionHealth - READ-ONLY; All P2S VPN clients' connection health status.
16432	VpnClientConnectionHealth *VpnClientConnectionHealth `json:"vpnClientConnectionHealth,omitempty"`
16433}
16434
16435// MarshalJSON is the custom marshaler for P2SVpnGatewayProperties.
16436func (pvgp P2SVpnGatewayProperties) MarshalJSON() ([]byte, error) {
16437	objectMap := make(map[string]interface{})
16438	if pvgp.VirtualHub != nil {
16439		objectMap["virtualHub"] = pvgp.VirtualHub
16440	}
16441	if pvgp.ProvisioningState != "" {
16442		objectMap["provisioningState"] = pvgp.ProvisioningState
16443	}
16444	if pvgp.VpnGatewayScaleUnit != nil {
16445		objectMap["vpnGatewayScaleUnit"] = pvgp.VpnGatewayScaleUnit
16446	}
16447	if pvgp.P2SVpnServerConfiguration != nil {
16448		objectMap["p2SVpnServerConfiguration"] = pvgp.P2SVpnServerConfiguration
16449	}
16450	if pvgp.VpnClientAddressPool != nil {
16451		objectMap["vpnClientAddressPool"] = pvgp.VpnClientAddressPool
16452	}
16453	return json.Marshal(objectMap)
16454}
16455
16456// P2sVpnGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
16457// long-running operation.
16458type P2sVpnGatewaysCreateOrUpdateFuture struct {
16459	azure.FutureAPI
16460	// Result returns the result of the asynchronous operation.
16461	// If the operation has not completed it will return an error.
16462	Result func(P2sVpnGatewaysClient) (P2SVpnGateway, error)
16463}
16464
16465// P2sVpnGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
16466// operation.
16467type P2sVpnGatewaysDeleteFuture struct {
16468	azure.FutureAPI
16469	// Result returns the result of the asynchronous operation.
16470	// If the operation has not completed it will return an error.
16471	Result func(P2sVpnGatewaysClient) (autorest.Response, error)
16472}
16473
16474// P2sVpnGatewaysGenerateVpnProfileFuture an abstraction for monitoring and retrieving the results of a
16475// long-running operation.
16476type P2sVpnGatewaysGenerateVpnProfileFuture struct {
16477	azure.FutureAPI
16478	// Result returns the result of the asynchronous operation.
16479	// If the operation has not completed it will return an error.
16480	Result func(P2sVpnGatewaysClient) (VpnProfileResponse, error)
16481}
16482
16483// P2sVpnGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
16484// long-running operation.
16485type P2sVpnGatewaysUpdateTagsFuture struct {
16486	azure.FutureAPI
16487	// Result returns the result of the asynchronous operation.
16488	// If the operation has not completed it will return an error.
16489	Result func(P2sVpnGatewaysClient) (P2SVpnGateway, error)
16490}
16491
16492// P2SVpnProfileParameters vpn Client Parameters for package generation
16493type P2SVpnProfileParameters struct {
16494	// AuthenticationMethod - VPN client Authentication Method. Possible values are: 'EAPTLS' and 'EAPMSCHAPv2'. Possible values include: 'EAPTLS', 'EAPMSCHAPv2'
16495	AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"`
16496}
16497
16498// P2SVpnServerConfigRadiusClientRootCertificate radius client root certificate of
16499// P2SVpnServerConfiguration.
16500type P2SVpnServerConfigRadiusClientRootCertificate struct {
16501	// P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat - Properties of the Radius client root certificate.
16502	*P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat `json:"properties,omitempty"`
16503	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
16504	Name *string `json:"name,omitempty"`
16505	// Etag - A unique read-only string that changes whenever the resource is updated.
16506	Etag *string `json:"etag,omitempty"`
16507	// ID - Resource ID.
16508	ID *string `json:"id,omitempty"`
16509}
16510
16511// MarshalJSON is the custom marshaler for P2SVpnServerConfigRadiusClientRootCertificate.
16512func (pvscrcrc P2SVpnServerConfigRadiusClientRootCertificate) MarshalJSON() ([]byte, error) {
16513	objectMap := make(map[string]interface{})
16514	if pvscrcrc.P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat != nil {
16515		objectMap["properties"] = pvscrcrc.P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat
16516	}
16517	if pvscrcrc.Name != nil {
16518		objectMap["name"] = pvscrcrc.Name
16519	}
16520	if pvscrcrc.Etag != nil {
16521		objectMap["etag"] = pvscrcrc.Etag
16522	}
16523	if pvscrcrc.ID != nil {
16524		objectMap["id"] = pvscrcrc.ID
16525	}
16526	return json.Marshal(objectMap)
16527}
16528
16529// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfigRadiusClientRootCertificate struct.
16530func (pvscrcrc *P2SVpnServerConfigRadiusClientRootCertificate) UnmarshalJSON(body []byte) error {
16531	var m map[string]*json.RawMessage
16532	err := json.Unmarshal(body, &m)
16533	if err != nil {
16534		return err
16535	}
16536	for k, v := range m {
16537		switch k {
16538		case "properties":
16539			if v != nil {
16540				var p2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat
16541				err = json.Unmarshal(*v, &p2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat)
16542				if err != nil {
16543					return err
16544				}
16545				pvscrcrc.P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat = &p2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat
16546			}
16547		case "name":
16548			if v != nil {
16549				var name string
16550				err = json.Unmarshal(*v, &name)
16551				if err != nil {
16552					return err
16553				}
16554				pvscrcrc.Name = &name
16555			}
16556		case "etag":
16557			if v != nil {
16558				var etag string
16559				err = json.Unmarshal(*v, &etag)
16560				if err != nil {
16561					return err
16562				}
16563				pvscrcrc.Etag = &etag
16564			}
16565		case "id":
16566			if v != nil {
16567				var ID string
16568				err = json.Unmarshal(*v, &ID)
16569				if err != nil {
16570					return err
16571				}
16572				pvscrcrc.ID = &ID
16573			}
16574		}
16575	}
16576
16577	return nil
16578}
16579
16580// P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat properties of the Radius client root
16581// certificate of P2SVpnServerConfiguration.
16582type P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat struct {
16583	// Thumbprint - The Radius client root certificate thumbprint.
16584	Thumbprint *string `json:"thumbprint,omitempty"`
16585	// ProvisioningState - READ-ONLY; The provisioning state of the Radius client root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
16586	ProvisioningState *string `json:"provisioningState,omitempty"`
16587}
16588
16589// MarshalJSON is the custom marshaler for P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat.
16590func (pvscrcrcpf P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
16591	objectMap := make(map[string]interface{})
16592	if pvscrcrcpf.Thumbprint != nil {
16593		objectMap["thumbprint"] = pvscrcrcpf.Thumbprint
16594	}
16595	return json.Marshal(objectMap)
16596}
16597
16598// P2SVpnServerConfigRadiusServerRootCertificate radius Server root certificate of
16599// P2SVpnServerConfiguration.
16600type P2SVpnServerConfigRadiusServerRootCertificate struct {
16601	// P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat - Properties of the P2SVpnServerConfiguration Radius Server root certificate.
16602	*P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat `json:"properties,omitempty"`
16603	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
16604	Name *string `json:"name,omitempty"`
16605	// Etag - A unique read-only string that changes whenever the resource is updated.
16606	Etag *string `json:"etag,omitempty"`
16607	// ID - Resource ID.
16608	ID *string `json:"id,omitempty"`
16609}
16610
16611// MarshalJSON is the custom marshaler for P2SVpnServerConfigRadiusServerRootCertificate.
16612func (pvscrsrc P2SVpnServerConfigRadiusServerRootCertificate) MarshalJSON() ([]byte, error) {
16613	objectMap := make(map[string]interface{})
16614	if pvscrsrc.P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat != nil {
16615		objectMap["properties"] = pvscrsrc.P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat
16616	}
16617	if pvscrsrc.Name != nil {
16618		objectMap["name"] = pvscrsrc.Name
16619	}
16620	if pvscrsrc.Etag != nil {
16621		objectMap["etag"] = pvscrsrc.Etag
16622	}
16623	if pvscrsrc.ID != nil {
16624		objectMap["id"] = pvscrsrc.ID
16625	}
16626	return json.Marshal(objectMap)
16627}
16628
16629// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfigRadiusServerRootCertificate struct.
16630func (pvscrsrc *P2SVpnServerConfigRadiusServerRootCertificate) UnmarshalJSON(body []byte) error {
16631	var m map[string]*json.RawMessage
16632	err := json.Unmarshal(body, &m)
16633	if err != nil {
16634		return err
16635	}
16636	for k, v := range m {
16637		switch k {
16638		case "properties":
16639			if v != nil {
16640				var p2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat
16641				err = json.Unmarshal(*v, &p2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat)
16642				if err != nil {
16643					return err
16644				}
16645				pvscrsrc.P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat = &p2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat
16646			}
16647		case "name":
16648			if v != nil {
16649				var name string
16650				err = json.Unmarshal(*v, &name)
16651				if err != nil {
16652					return err
16653				}
16654				pvscrsrc.Name = &name
16655			}
16656		case "etag":
16657			if v != nil {
16658				var etag string
16659				err = json.Unmarshal(*v, &etag)
16660				if err != nil {
16661					return err
16662				}
16663				pvscrsrc.Etag = &etag
16664			}
16665		case "id":
16666			if v != nil {
16667				var ID string
16668				err = json.Unmarshal(*v, &ID)
16669				if err != nil {
16670					return err
16671				}
16672				pvscrsrc.ID = &ID
16673			}
16674		}
16675	}
16676
16677	return nil
16678}
16679
16680// P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat properties of Radius Server root
16681// certificate of P2SVpnServerConfiguration.
16682type P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat struct {
16683	// PublicCertData - The certificate public data.
16684	PublicCertData *string `json:"publicCertData,omitempty"`
16685	// ProvisioningState - READ-ONLY; The provisioning state of the P2SVpnServerConfiguration Radius Server root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
16686	ProvisioningState *string `json:"provisioningState,omitempty"`
16687}
16688
16689// MarshalJSON is the custom marshaler for P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat.
16690func (pvscrsrcpf P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
16691	objectMap := make(map[string]interface{})
16692	if pvscrsrcpf.PublicCertData != nil {
16693		objectMap["publicCertData"] = pvscrsrcpf.PublicCertData
16694	}
16695	return json.Marshal(objectMap)
16696}
16697
16698// P2SVpnServerConfiguration p2SVpnServerConfiguration Resource.
16699type P2SVpnServerConfiguration struct {
16700	autorest.Response                    `json:"-"`
16701	*P2SVpnServerConfigurationProperties `json:"properties,omitempty"`
16702	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
16703	Name *string `json:"name,omitempty"`
16704	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
16705	Etag *string `json:"etag,omitempty"`
16706	// ID - Resource ID.
16707	ID *string `json:"id,omitempty"`
16708}
16709
16710// MarshalJSON is the custom marshaler for P2SVpnServerConfiguration.
16711func (pvsc P2SVpnServerConfiguration) MarshalJSON() ([]byte, error) {
16712	objectMap := make(map[string]interface{})
16713	if pvsc.P2SVpnServerConfigurationProperties != nil {
16714		objectMap["properties"] = pvsc.P2SVpnServerConfigurationProperties
16715	}
16716	if pvsc.Name != nil {
16717		objectMap["name"] = pvsc.Name
16718	}
16719	if pvsc.ID != nil {
16720		objectMap["id"] = pvsc.ID
16721	}
16722	return json.Marshal(objectMap)
16723}
16724
16725// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfiguration struct.
16726func (pvsc *P2SVpnServerConfiguration) UnmarshalJSON(body []byte) error {
16727	var m map[string]*json.RawMessage
16728	err := json.Unmarshal(body, &m)
16729	if err != nil {
16730		return err
16731	}
16732	for k, v := range m {
16733		switch k {
16734		case "properties":
16735			if v != nil {
16736				var p2SVpnServerConfigurationProperties P2SVpnServerConfigurationProperties
16737				err = json.Unmarshal(*v, &p2SVpnServerConfigurationProperties)
16738				if err != nil {
16739					return err
16740				}
16741				pvsc.P2SVpnServerConfigurationProperties = &p2SVpnServerConfigurationProperties
16742			}
16743		case "name":
16744			if v != nil {
16745				var name string
16746				err = json.Unmarshal(*v, &name)
16747				if err != nil {
16748					return err
16749				}
16750				pvsc.Name = &name
16751			}
16752		case "etag":
16753			if v != nil {
16754				var etag string
16755				err = json.Unmarshal(*v, &etag)
16756				if err != nil {
16757					return err
16758				}
16759				pvsc.Etag = &etag
16760			}
16761		case "id":
16762			if v != nil {
16763				var ID string
16764				err = json.Unmarshal(*v, &ID)
16765				if err != nil {
16766					return err
16767				}
16768				pvsc.ID = &ID
16769			}
16770		}
16771	}
16772
16773	return nil
16774}
16775
16776// P2SVpnServerConfigurationProperties parameters for P2SVpnServerConfiguration
16777type P2SVpnServerConfigurationProperties struct {
16778	// Name - The name of the P2SVpnServerConfiguration that is unique within a VirtualWan in a resource group. This name can be used to access the resource along with Paren VirtualWan resource name.
16779	Name *string `json:"name,omitempty"`
16780	// VpnProtocols - vpnProtocols for the P2SVpnServerConfiguration.
16781	VpnProtocols *[]VpnGatewayTunnelingProtocol `json:"vpnProtocols,omitempty"`
16782	// P2SVpnServerConfigVpnClientRootCertificates - VPN client root certificate of P2SVpnServerConfiguration.
16783	P2SVpnServerConfigVpnClientRootCertificates *[]P2SVpnServerConfigVpnClientRootCertificate `json:"p2SVpnServerConfigVpnClientRootCertificates,omitempty"`
16784	// P2SVpnServerConfigVpnClientRevokedCertificates - VPN client revoked certificate of P2SVpnServerConfiguration.
16785	P2SVpnServerConfigVpnClientRevokedCertificates *[]P2SVpnServerConfigVpnClientRevokedCertificate `json:"p2SVpnServerConfigVpnClientRevokedCertificates,omitempty"`
16786	// P2SVpnServerConfigRadiusServerRootCertificates - Radius Server root certificate of P2SVpnServerConfiguration.
16787	P2SVpnServerConfigRadiusServerRootCertificates *[]P2SVpnServerConfigRadiusServerRootCertificate `json:"p2SVpnServerConfigRadiusServerRootCertificates,omitempty"`
16788	// P2SVpnServerConfigRadiusClientRootCertificates - Radius client root certificate of P2SVpnServerConfiguration.
16789	P2SVpnServerConfigRadiusClientRootCertificates *[]P2SVpnServerConfigRadiusClientRootCertificate `json:"p2SVpnServerConfigRadiusClientRootCertificates,omitempty"`
16790	// VpnClientIpsecPolicies - VpnClientIpsecPolicies for P2SVpnServerConfiguration.
16791	VpnClientIpsecPolicies *[]IpsecPolicy `json:"vpnClientIpsecPolicies,omitempty"`
16792	// RadiusServerAddress - The radius server address property of the P2SVpnServerConfiguration resource for point to site client connection.
16793	RadiusServerAddress *string `json:"radiusServerAddress,omitempty"`
16794	// RadiusServerSecret - The radius secret property of the P2SVpnServerConfiguration resource for point to site client connection.
16795	RadiusServerSecret *string `json:"radiusServerSecret,omitempty"`
16796	// ProvisioningState - READ-ONLY; The provisioning state of the P2SVpnServerConfiguration resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
16797	ProvisioningState *string `json:"provisioningState,omitempty"`
16798	// P2SVpnGateways - READ-ONLY
16799	P2SVpnGateways *[]SubResource `json:"p2SVpnGateways,omitempty"`
16800	// Etag - A unique read-only string that changes whenever the resource is updated.
16801	Etag *string `json:"etag,omitempty"`
16802}
16803
16804// MarshalJSON is the custom marshaler for P2SVpnServerConfigurationProperties.
16805func (pvscp P2SVpnServerConfigurationProperties) MarshalJSON() ([]byte, error) {
16806	objectMap := make(map[string]interface{})
16807	if pvscp.Name != nil {
16808		objectMap["name"] = pvscp.Name
16809	}
16810	if pvscp.VpnProtocols != nil {
16811		objectMap["vpnProtocols"] = pvscp.VpnProtocols
16812	}
16813	if pvscp.P2SVpnServerConfigVpnClientRootCertificates != nil {
16814		objectMap["p2SVpnServerConfigVpnClientRootCertificates"] = pvscp.P2SVpnServerConfigVpnClientRootCertificates
16815	}
16816	if pvscp.P2SVpnServerConfigVpnClientRevokedCertificates != nil {
16817		objectMap["p2SVpnServerConfigVpnClientRevokedCertificates"] = pvscp.P2SVpnServerConfigVpnClientRevokedCertificates
16818	}
16819	if pvscp.P2SVpnServerConfigRadiusServerRootCertificates != nil {
16820		objectMap["p2SVpnServerConfigRadiusServerRootCertificates"] = pvscp.P2SVpnServerConfigRadiusServerRootCertificates
16821	}
16822	if pvscp.P2SVpnServerConfigRadiusClientRootCertificates != nil {
16823		objectMap["p2SVpnServerConfigRadiusClientRootCertificates"] = pvscp.P2SVpnServerConfigRadiusClientRootCertificates
16824	}
16825	if pvscp.VpnClientIpsecPolicies != nil {
16826		objectMap["vpnClientIpsecPolicies"] = pvscp.VpnClientIpsecPolicies
16827	}
16828	if pvscp.RadiusServerAddress != nil {
16829		objectMap["radiusServerAddress"] = pvscp.RadiusServerAddress
16830	}
16831	if pvscp.RadiusServerSecret != nil {
16832		objectMap["radiusServerSecret"] = pvscp.RadiusServerSecret
16833	}
16834	if pvscp.Etag != nil {
16835		objectMap["etag"] = pvscp.Etag
16836	}
16837	return json.Marshal(objectMap)
16838}
16839
16840// P2sVpnServerConfigurationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
16841// of a long-running operation.
16842type P2sVpnServerConfigurationsCreateOrUpdateFuture struct {
16843	azure.FutureAPI
16844	// Result returns the result of the asynchronous operation.
16845	// If the operation has not completed it will return an error.
16846	Result func(P2sVpnServerConfigurationsClient) (P2SVpnServerConfiguration, error)
16847}
16848
16849// P2sVpnServerConfigurationsDeleteFuture an abstraction for monitoring and retrieving the results of a
16850// long-running operation.
16851type P2sVpnServerConfigurationsDeleteFuture struct {
16852	azure.FutureAPI
16853	// Result returns the result of the asynchronous operation.
16854	// If the operation has not completed it will return an error.
16855	Result func(P2sVpnServerConfigurationsClient) (autorest.Response, error)
16856}
16857
16858// P2SVpnServerConfigVpnClientRevokedCertificate VPN client revoked certificate of
16859// P2SVpnServerConfiguration.
16860type P2SVpnServerConfigVpnClientRevokedCertificate struct {
16861	// P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat - Properties of the vpn client revoked certificate.
16862	*P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat `json:"properties,omitempty"`
16863	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
16864	Name *string `json:"name,omitempty"`
16865	// Etag - A unique read-only string that changes whenever the resource is updated.
16866	Etag *string `json:"etag,omitempty"`
16867	// ID - Resource ID.
16868	ID *string `json:"id,omitempty"`
16869}
16870
16871// MarshalJSON is the custom marshaler for P2SVpnServerConfigVpnClientRevokedCertificate.
16872func (pvscvcrc P2SVpnServerConfigVpnClientRevokedCertificate) MarshalJSON() ([]byte, error) {
16873	objectMap := make(map[string]interface{})
16874	if pvscvcrc.P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat != nil {
16875		objectMap["properties"] = pvscvcrc.P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat
16876	}
16877	if pvscvcrc.Name != nil {
16878		objectMap["name"] = pvscvcrc.Name
16879	}
16880	if pvscvcrc.Etag != nil {
16881		objectMap["etag"] = pvscvcrc.Etag
16882	}
16883	if pvscvcrc.ID != nil {
16884		objectMap["id"] = pvscvcrc.ID
16885	}
16886	return json.Marshal(objectMap)
16887}
16888
16889// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfigVpnClientRevokedCertificate struct.
16890func (pvscvcrc *P2SVpnServerConfigVpnClientRevokedCertificate) UnmarshalJSON(body []byte) error {
16891	var m map[string]*json.RawMessage
16892	err := json.Unmarshal(body, &m)
16893	if err != nil {
16894		return err
16895	}
16896	for k, v := range m {
16897		switch k {
16898		case "properties":
16899			if v != nil {
16900				var p2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat
16901				err = json.Unmarshal(*v, &p2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat)
16902				if err != nil {
16903					return err
16904				}
16905				pvscvcrc.P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat = &p2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat
16906			}
16907		case "name":
16908			if v != nil {
16909				var name string
16910				err = json.Unmarshal(*v, &name)
16911				if err != nil {
16912					return err
16913				}
16914				pvscvcrc.Name = &name
16915			}
16916		case "etag":
16917			if v != nil {
16918				var etag string
16919				err = json.Unmarshal(*v, &etag)
16920				if err != nil {
16921					return err
16922				}
16923				pvscvcrc.Etag = &etag
16924			}
16925		case "id":
16926			if v != nil {
16927				var ID string
16928				err = json.Unmarshal(*v, &ID)
16929				if err != nil {
16930					return err
16931				}
16932				pvscvcrc.ID = &ID
16933			}
16934		}
16935	}
16936
16937	return nil
16938}
16939
16940// P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat properties of the revoked VPN client
16941// certificate of P2SVpnServerConfiguration.
16942type P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat struct {
16943	// Thumbprint - The revoked VPN client certificate thumbprint.
16944	Thumbprint *string `json:"thumbprint,omitempty"`
16945	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client revoked certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
16946	ProvisioningState *string `json:"provisioningState,omitempty"`
16947}
16948
16949// MarshalJSON is the custom marshaler for P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat.
16950func (pvscvcrcpf P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
16951	objectMap := make(map[string]interface{})
16952	if pvscvcrcpf.Thumbprint != nil {
16953		objectMap["thumbprint"] = pvscvcrcpf.Thumbprint
16954	}
16955	return json.Marshal(objectMap)
16956}
16957
16958// P2SVpnServerConfigVpnClientRootCertificate VPN client root certificate of P2SVpnServerConfiguration.
16959type P2SVpnServerConfigVpnClientRootCertificate struct {
16960	// P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat - Properties of the P2SVpnServerConfiguration VPN client root certificate.
16961	*P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat `json:"properties,omitempty"`
16962	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
16963	Name *string `json:"name,omitempty"`
16964	// Etag - A unique read-only string that changes whenever the resource is updated.
16965	Etag *string `json:"etag,omitempty"`
16966	// ID - Resource ID.
16967	ID *string `json:"id,omitempty"`
16968}
16969
16970// MarshalJSON is the custom marshaler for P2SVpnServerConfigVpnClientRootCertificate.
16971func (pvscvcrc P2SVpnServerConfigVpnClientRootCertificate) MarshalJSON() ([]byte, error) {
16972	objectMap := make(map[string]interface{})
16973	if pvscvcrc.P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat != nil {
16974		objectMap["properties"] = pvscvcrc.P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat
16975	}
16976	if pvscvcrc.Name != nil {
16977		objectMap["name"] = pvscvcrc.Name
16978	}
16979	if pvscvcrc.Etag != nil {
16980		objectMap["etag"] = pvscvcrc.Etag
16981	}
16982	if pvscvcrc.ID != nil {
16983		objectMap["id"] = pvscvcrc.ID
16984	}
16985	return json.Marshal(objectMap)
16986}
16987
16988// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfigVpnClientRootCertificate struct.
16989func (pvscvcrc *P2SVpnServerConfigVpnClientRootCertificate) UnmarshalJSON(body []byte) error {
16990	var m map[string]*json.RawMessage
16991	err := json.Unmarshal(body, &m)
16992	if err != nil {
16993		return err
16994	}
16995	for k, v := range m {
16996		switch k {
16997		case "properties":
16998			if v != nil {
16999				var p2SVpnServerConfigVpnClientRootCertificatePropertiesFormat P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat
17000				err = json.Unmarshal(*v, &p2SVpnServerConfigVpnClientRootCertificatePropertiesFormat)
17001				if err != nil {
17002					return err
17003				}
17004				pvscvcrc.P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat = &p2SVpnServerConfigVpnClientRootCertificatePropertiesFormat
17005			}
17006		case "name":
17007			if v != nil {
17008				var name string
17009				err = json.Unmarshal(*v, &name)
17010				if err != nil {
17011					return err
17012				}
17013				pvscvcrc.Name = &name
17014			}
17015		case "etag":
17016			if v != nil {
17017				var etag string
17018				err = json.Unmarshal(*v, &etag)
17019				if err != nil {
17020					return err
17021				}
17022				pvscvcrc.Etag = &etag
17023			}
17024		case "id":
17025			if v != nil {
17026				var ID string
17027				err = json.Unmarshal(*v, &ID)
17028				if err != nil {
17029					return err
17030				}
17031				pvscvcrc.ID = &ID
17032			}
17033		}
17034	}
17035
17036	return nil
17037}
17038
17039// P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat properties of VPN client root certificate of
17040// P2SVpnServerConfiguration.
17041type P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat struct {
17042	// PublicCertData - The certificate public data.
17043	PublicCertData *string `json:"publicCertData,omitempty"`
17044	// ProvisioningState - READ-ONLY; The provisioning state of the P2SVpnServerConfiguration VPN client root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
17045	ProvisioningState *string `json:"provisioningState,omitempty"`
17046}
17047
17048// MarshalJSON is the custom marshaler for P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat.
17049func (pvscvcrcpf P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
17050	objectMap := make(map[string]interface{})
17051	if pvscvcrcpf.PublicCertData != nil {
17052		objectMap["publicCertData"] = pvscvcrcpf.PublicCertData
17053	}
17054	return json.Marshal(objectMap)
17055}
17056
17057// PacketCapture parameters that define the create packet capture operation.
17058type PacketCapture struct {
17059	*PacketCaptureParameters `json:"properties,omitempty"`
17060}
17061
17062// MarshalJSON is the custom marshaler for PacketCapture.
17063func (pc PacketCapture) MarshalJSON() ([]byte, error) {
17064	objectMap := make(map[string]interface{})
17065	if pc.PacketCaptureParameters != nil {
17066		objectMap["properties"] = pc.PacketCaptureParameters
17067	}
17068	return json.Marshal(objectMap)
17069}
17070
17071// UnmarshalJSON is the custom unmarshaler for PacketCapture struct.
17072func (pc *PacketCapture) UnmarshalJSON(body []byte) error {
17073	var m map[string]*json.RawMessage
17074	err := json.Unmarshal(body, &m)
17075	if err != nil {
17076		return err
17077	}
17078	for k, v := range m {
17079		switch k {
17080		case "properties":
17081			if v != nil {
17082				var packetCaptureParameters PacketCaptureParameters
17083				err = json.Unmarshal(*v, &packetCaptureParameters)
17084				if err != nil {
17085					return err
17086				}
17087				pc.PacketCaptureParameters = &packetCaptureParameters
17088			}
17089		}
17090	}
17091
17092	return nil
17093}
17094
17095// PacketCaptureFilter filter that is applied to packet capture request. Multiple filters can be applied.
17096type PacketCaptureFilter struct {
17097	// Protocol - Protocol to be filtered on. Possible values include: 'PcProtocolTCP', 'PcProtocolUDP', 'PcProtocolAny'
17098	Protocol PcProtocol `json:"protocol,omitempty"`
17099	// 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.
17100	LocalIPAddress *string `json:"localIPAddress,omitempty"`
17101	// 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.
17102	RemoteIPAddress *string `json:"remoteIPAddress,omitempty"`
17103	// 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.
17104	LocalPort *string `json:"localPort,omitempty"`
17105	// 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.
17106	RemotePort *string `json:"remotePort,omitempty"`
17107}
17108
17109// PacketCaptureListResult list of packet capture sessions.
17110type PacketCaptureListResult struct {
17111	autorest.Response `json:"-"`
17112	// Value - Information about packet capture sessions.
17113	Value *[]PacketCaptureResult `json:"value,omitempty"`
17114}
17115
17116// PacketCaptureParameters parameters that define the create packet capture operation.
17117type PacketCaptureParameters struct {
17118	// Target - The ID of the targeted resource, only VM is currently supported.
17119	Target *string `json:"target,omitempty"`
17120	// BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated.
17121	BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"`
17122	// TotalBytesPerSession - Maximum size of the capture output.
17123	TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"`
17124	// TimeLimitInSeconds - Maximum duration of the capture session in seconds.
17125	TimeLimitInSeconds *int32                        `json:"timeLimitInSeconds,omitempty"`
17126	StorageLocation    *PacketCaptureStorageLocation `json:"storageLocation,omitempty"`
17127	Filters            *[]PacketCaptureFilter        `json:"filters,omitempty"`
17128}
17129
17130// PacketCaptureQueryStatusResult status of packet capture session.
17131type PacketCaptureQueryStatusResult struct {
17132	autorest.Response `json:"-"`
17133	// Name - The name of the packet capture resource.
17134	Name *string `json:"name,omitempty"`
17135	// ID - The ID of the packet capture resource.
17136	ID *string `json:"id,omitempty"`
17137	// CaptureStartTime - The start time of the packet capture session.
17138	CaptureStartTime *date.Time `json:"captureStartTime,omitempty"`
17139	// PacketCaptureStatus - The status of the packet capture session. Possible values include: 'PcStatusNotStarted', 'PcStatusRunning', 'PcStatusStopped', 'PcStatusError', 'PcStatusUnknown'
17140	PacketCaptureStatus PcStatus `json:"packetCaptureStatus,omitempty"`
17141	// StopReason - The reason the current packet capture session was stopped.
17142	StopReason *string `json:"stopReason,omitempty"`
17143	// PacketCaptureError - List of errors of packet capture session.
17144	PacketCaptureError *[]PcError `json:"packetCaptureError,omitempty"`
17145}
17146
17147// PacketCaptureResult information about packet capture session.
17148type PacketCaptureResult struct {
17149	autorest.Response `json:"-"`
17150	// Name - READ-ONLY; Name of the packet capture session.
17151	Name *string `json:"name,omitempty"`
17152	// ID - READ-ONLY; ID of the packet capture operation.
17153	ID                             *string `json:"id,omitempty"`
17154	Etag                           *string `json:"etag,omitempty"`
17155	*PacketCaptureResultProperties `json:"properties,omitempty"`
17156}
17157
17158// MarshalJSON is the custom marshaler for PacketCaptureResult.
17159func (pcr PacketCaptureResult) MarshalJSON() ([]byte, error) {
17160	objectMap := make(map[string]interface{})
17161	if pcr.Etag != nil {
17162		objectMap["etag"] = pcr.Etag
17163	}
17164	if pcr.PacketCaptureResultProperties != nil {
17165		objectMap["properties"] = pcr.PacketCaptureResultProperties
17166	}
17167	return json.Marshal(objectMap)
17168}
17169
17170// UnmarshalJSON is the custom unmarshaler for PacketCaptureResult struct.
17171func (pcr *PacketCaptureResult) UnmarshalJSON(body []byte) error {
17172	var m map[string]*json.RawMessage
17173	err := json.Unmarshal(body, &m)
17174	if err != nil {
17175		return err
17176	}
17177	for k, v := range m {
17178		switch k {
17179		case "name":
17180			if v != nil {
17181				var name string
17182				err = json.Unmarshal(*v, &name)
17183				if err != nil {
17184					return err
17185				}
17186				pcr.Name = &name
17187			}
17188		case "id":
17189			if v != nil {
17190				var ID string
17191				err = json.Unmarshal(*v, &ID)
17192				if err != nil {
17193					return err
17194				}
17195				pcr.ID = &ID
17196			}
17197		case "etag":
17198			if v != nil {
17199				var etag string
17200				err = json.Unmarshal(*v, &etag)
17201				if err != nil {
17202					return err
17203				}
17204				pcr.Etag = &etag
17205			}
17206		case "properties":
17207			if v != nil {
17208				var packetCaptureResultProperties PacketCaptureResultProperties
17209				err = json.Unmarshal(*v, &packetCaptureResultProperties)
17210				if err != nil {
17211					return err
17212				}
17213				pcr.PacketCaptureResultProperties = &packetCaptureResultProperties
17214			}
17215		}
17216	}
17217
17218	return nil
17219}
17220
17221// PacketCaptureResultProperties describes the properties of a packet capture session.
17222type PacketCaptureResultProperties struct {
17223	// ProvisioningState - The provisioning state of the packet capture session. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
17224	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
17225	// Target - The ID of the targeted resource, only VM is currently supported.
17226	Target *string `json:"target,omitempty"`
17227	// BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated.
17228	BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"`
17229	// TotalBytesPerSession - Maximum size of the capture output.
17230	TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"`
17231	// TimeLimitInSeconds - Maximum duration of the capture session in seconds.
17232	TimeLimitInSeconds *int32                        `json:"timeLimitInSeconds,omitempty"`
17233	StorageLocation    *PacketCaptureStorageLocation `json:"storageLocation,omitempty"`
17234	Filters            *[]PacketCaptureFilter        `json:"filters,omitempty"`
17235}
17236
17237// PacketCapturesCreateFuture an abstraction for monitoring and retrieving the results of a long-running
17238// operation.
17239type PacketCapturesCreateFuture struct {
17240	azure.FutureAPI
17241	// Result returns the result of the asynchronous operation.
17242	// If the operation has not completed it will return an error.
17243	Result func(PacketCapturesClient) (PacketCaptureResult, error)
17244}
17245
17246// PacketCapturesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
17247// operation.
17248type PacketCapturesDeleteFuture struct {
17249	azure.FutureAPI
17250	// Result returns the result of the asynchronous operation.
17251	// If the operation has not completed it will return an error.
17252	Result func(PacketCapturesClient) (autorest.Response, error)
17253}
17254
17255// PacketCapturesGetStatusFuture an abstraction for monitoring and retrieving the results of a long-running
17256// operation.
17257type PacketCapturesGetStatusFuture struct {
17258	azure.FutureAPI
17259	// Result returns the result of the asynchronous operation.
17260	// If the operation has not completed it will return an error.
17261	Result func(PacketCapturesClient) (PacketCaptureQueryStatusResult, error)
17262}
17263
17264// PacketCapturesStopFuture an abstraction for monitoring and retrieving the results of a long-running
17265// operation.
17266type PacketCapturesStopFuture struct {
17267	azure.FutureAPI
17268	// Result returns the result of the asynchronous operation.
17269	// If the operation has not completed it will return an error.
17270	Result func(PacketCapturesClient) (autorest.Response, error)
17271}
17272
17273// PacketCaptureStorageLocation describes the storage location for a packet capture session.
17274type PacketCaptureStorageLocation struct {
17275	// StorageID - The ID of the storage account to save the packet capture session. Required if no local file path is provided.
17276	StorageID *string `json:"storageId,omitempty"`
17277	// 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.
17278	StoragePath *string `json:"storagePath,omitempty"`
17279	// 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.
17280	FilePath *string `json:"filePath,omitempty"`
17281}
17282
17283// PatchRouteFilter route Filter Resource.
17284type PatchRouteFilter struct {
17285	*RouteFilterPropertiesFormat `json:"properties,omitempty"`
17286	// Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource.
17287	Name *string `json:"name,omitempty"`
17288	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
17289	Etag *string `json:"etag,omitempty"`
17290	// Type - READ-ONLY; Resource type.
17291	Type *string `json:"type,omitempty"`
17292	// Tags - Resource tags.
17293	Tags map[string]*string `json:"tags"`
17294	// ID - Resource ID.
17295	ID *string `json:"id,omitempty"`
17296}
17297
17298// MarshalJSON is the custom marshaler for PatchRouteFilter.
17299func (prf PatchRouteFilter) MarshalJSON() ([]byte, error) {
17300	objectMap := make(map[string]interface{})
17301	if prf.RouteFilterPropertiesFormat != nil {
17302		objectMap["properties"] = prf.RouteFilterPropertiesFormat
17303	}
17304	if prf.Tags != nil {
17305		objectMap["tags"] = prf.Tags
17306	}
17307	if prf.ID != nil {
17308		objectMap["id"] = prf.ID
17309	}
17310	return json.Marshal(objectMap)
17311}
17312
17313// UnmarshalJSON is the custom unmarshaler for PatchRouteFilter struct.
17314func (prf *PatchRouteFilter) UnmarshalJSON(body []byte) error {
17315	var m map[string]*json.RawMessage
17316	err := json.Unmarshal(body, &m)
17317	if err != nil {
17318		return err
17319	}
17320	for k, v := range m {
17321		switch k {
17322		case "properties":
17323			if v != nil {
17324				var routeFilterPropertiesFormat RouteFilterPropertiesFormat
17325				err = json.Unmarshal(*v, &routeFilterPropertiesFormat)
17326				if err != nil {
17327					return err
17328				}
17329				prf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat
17330			}
17331		case "name":
17332			if v != nil {
17333				var name string
17334				err = json.Unmarshal(*v, &name)
17335				if err != nil {
17336					return err
17337				}
17338				prf.Name = &name
17339			}
17340		case "etag":
17341			if v != nil {
17342				var etag string
17343				err = json.Unmarshal(*v, &etag)
17344				if err != nil {
17345					return err
17346				}
17347				prf.Etag = &etag
17348			}
17349		case "type":
17350			if v != nil {
17351				var typeVar string
17352				err = json.Unmarshal(*v, &typeVar)
17353				if err != nil {
17354					return err
17355				}
17356				prf.Type = &typeVar
17357			}
17358		case "tags":
17359			if v != nil {
17360				var tags map[string]*string
17361				err = json.Unmarshal(*v, &tags)
17362				if err != nil {
17363					return err
17364				}
17365				prf.Tags = tags
17366			}
17367		case "id":
17368			if v != nil {
17369				var ID string
17370				err = json.Unmarshal(*v, &ID)
17371				if err != nil {
17372					return err
17373				}
17374				prf.ID = &ID
17375			}
17376		}
17377	}
17378
17379	return nil
17380}
17381
17382// PatchRouteFilterRule route Filter Rule Resource
17383type PatchRouteFilterRule struct {
17384	*RouteFilterRulePropertiesFormat `json:"properties,omitempty"`
17385	// Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource.
17386	Name *string `json:"name,omitempty"`
17387	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
17388	Etag *string `json:"etag,omitempty"`
17389	// ID - Resource ID.
17390	ID *string `json:"id,omitempty"`
17391}
17392
17393// MarshalJSON is the custom marshaler for PatchRouteFilterRule.
17394func (prfr PatchRouteFilterRule) MarshalJSON() ([]byte, error) {
17395	objectMap := make(map[string]interface{})
17396	if prfr.RouteFilterRulePropertiesFormat != nil {
17397		objectMap["properties"] = prfr.RouteFilterRulePropertiesFormat
17398	}
17399	if prfr.ID != nil {
17400		objectMap["id"] = prfr.ID
17401	}
17402	return json.Marshal(objectMap)
17403}
17404
17405// UnmarshalJSON is the custom unmarshaler for PatchRouteFilterRule struct.
17406func (prfr *PatchRouteFilterRule) UnmarshalJSON(body []byte) error {
17407	var m map[string]*json.RawMessage
17408	err := json.Unmarshal(body, &m)
17409	if err != nil {
17410		return err
17411	}
17412	for k, v := range m {
17413		switch k {
17414		case "properties":
17415			if v != nil {
17416				var routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat
17417				err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat)
17418				if err != nil {
17419					return err
17420				}
17421				prfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat
17422			}
17423		case "name":
17424			if v != nil {
17425				var name string
17426				err = json.Unmarshal(*v, &name)
17427				if err != nil {
17428					return err
17429				}
17430				prfr.Name = &name
17431			}
17432		case "etag":
17433			if v != nil {
17434				var etag string
17435				err = json.Unmarshal(*v, &etag)
17436				if err != nil {
17437					return err
17438				}
17439				prfr.Etag = &etag
17440			}
17441		case "id":
17442			if v != nil {
17443				var ID string
17444				err = json.Unmarshal(*v, &ID)
17445				if err != nil {
17446					return err
17447				}
17448				prfr.ID = &ID
17449			}
17450		}
17451	}
17452
17453	return nil
17454}
17455
17456// Probe a load balancer probe.
17457type Probe struct {
17458	autorest.Response `json:"-"`
17459	// ProbePropertiesFormat - Properties of load balancer probe.
17460	*ProbePropertiesFormat `json:"properties,omitempty"`
17461	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
17462	Name *string `json:"name,omitempty"`
17463	// Etag - A unique read-only string that changes whenever the resource is updated.
17464	Etag *string `json:"etag,omitempty"`
17465	// ID - Resource ID.
17466	ID *string `json:"id,omitempty"`
17467}
17468
17469// MarshalJSON is the custom marshaler for Probe.
17470func (p Probe) MarshalJSON() ([]byte, error) {
17471	objectMap := make(map[string]interface{})
17472	if p.ProbePropertiesFormat != nil {
17473		objectMap["properties"] = p.ProbePropertiesFormat
17474	}
17475	if p.Name != nil {
17476		objectMap["name"] = p.Name
17477	}
17478	if p.Etag != nil {
17479		objectMap["etag"] = p.Etag
17480	}
17481	if p.ID != nil {
17482		objectMap["id"] = p.ID
17483	}
17484	return json.Marshal(objectMap)
17485}
17486
17487// UnmarshalJSON is the custom unmarshaler for Probe struct.
17488func (p *Probe) UnmarshalJSON(body []byte) error {
17489	var m map[string]*json.RawMessage
17490	err := json.Unmarshal(body, &m)
17491	if err != nil {
17492		return err
17493	}
17494	for k, v := range m {
17495		switch k {
17496		case "properties":
17497			if v != nil {
17498				var probePropertiesFormat ProbePropertiesFormat
17499				err = json.Unmarshal(*v, &probePropertiesFormat)
17500				if err != nil {
17501					return err
17502				}
17503				p.ProbePropertiesFormat = &probePropertiesFormat
17504			}
17505		case "name":
17506			if v != nil {
17507				var name string
17508				err = json.Unmarshal(*v, &name)
17509				if err != nil {
17510					return err
17511				}
17512				p.Name = &name
17513			}
17514		case "etag":
17515			if v != nil {
17516				var etag string
17517				err = json.Unmarshal(*v, &etag)
17518				if err != nil {
17519					return err
17520				}
17521				p.Etag = &etag
17522			}
17523		case "id":
17524			if v != nil {
17525				var ID string
17526				err = json.Unmarshal(*v, &ID)
17527				if err != nil {
17528					return err
17529				}
17530				p.ID = &ID
17531			}
17532		}
17533	}
17534
17535	return nil
17536}
17537
17538// ProbePropertiesFormat load balancer probe resource.
17539type ProbePropertiesFormat struct {
17540	// LoadBalancingRules - READ-ONLY; The load balancer rules that use this probe.
17541	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
17542	// Protocol - The protocol of the end point. Possible values are: 'Http', 'Tcp', or 'Https'. 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'
17543	Protocol ProbeProtocol `json:"protocol,omitempty"`
17544	// Port - The port for communicating the probe. Possible values range from 1 to 65535, inclusive.
17545	Port *int32 `json:"port,omitempty"`
17546	// 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.
17547	IntervalInSeconds *int32 `json:"intervalInSeconds,omitempty"`
17548	// 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.
17549	NumberOfProbes *int32 `json:"numberOfProbes,omitempty"`
17550	// 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.
17551	RequestPath *string `json:"requestPath,omitempty"`
17552	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
17553	ProvisioningState *string `json:"provisioningState,omitempty"`
17554}
17555
17556// MarshalJSON is the custom marshaler for ProbePropertiesFormat.
17557func (ppf ProbePropertiesFormat) MarshalJSON() ([]byte, error) {
17558	objectMap := make(map[string]interface{})
17559	if ppf.Protocol != "" {
17560		objectMap["protocol"] = ppf.Protocol
17561	}
17562	if ppf.Port != nil {
17563		objectMap["port"] = ppf.Port
17564	}
17565	if ppf.IntervalInSeconds != nil {
17566		objectMap["intervalInSeconds"] = ppf.IntervalInSeconds
17567	}
17568	if ppf.NumberOfProbes != nil {
17569		objectMap["numberOfProbes"] = ppf.NumberOfProbes
17570	}
17571	if ppf.RequestPath != nil {
17572		objectMap["requestPath"] = ppf.RequestPath
17573	}
17574	if ppf.ProvisioningState != nil {
17575		objectMap["provisioningState"] = ppf.ProvisioningState
17576	}
17577	return json.Marshal(objectMap)
17578}
17579
17580// Profile network profile resource.
17581type Profile struct {
17582	autorest.Response `json:"-"`
17583	// ProfilePropertiesFormat - Network profile properties.
17584	*ProfilePropertiesFormat `json:"properties,omitempty"`
17585	// Etag - A unique read-only string that changes whenever the resource is updated.
17586	Etag *string `json:"etag,omitempty"`
17587	// ID - Resource ID.
17588	ID *string `json:"id,omitempty"`
17589	// Name - READ-ONLY; Resource name.
17590	Name *string `json:"name,omitempty"`
17591	// Type - READ-ONLY; Resource type.
17592	Type *string `json:"type,omitempty"`
17593	// Location - Resource location.
17594	Location *string `json:"location,omitempty"`
17595	// Tags - Resource tags.
17596	Tags map[string]*string `json:"tags"`
17597}
17598
17599// MarshalJSON is the custom marshaler for Profile.
17600func (p Profile) MarshalJSON() ([]byte, error) {
17601	objectMap := make(map[string]interface{})
17602	if p.ProfilePropertiesFormat != nil {
17603		objectMap["properties"] = p.ProfilePropertiesFormat
17604	}
17605	if p.Etag != nil {
17606		objectMap["etag"] = p.Etag
17607	}
17608	if p.ID != nil {
17609		objectMap["id"] = p.ID
17610	}
17611	if p.Location != nil {
17612		objectMap["location"] = p.Location
17613	}
17614	if p.Tags != nil {
17615		objectMap["tags"] = p.Tags
17616	}
17617	return json.Marshal(objectMap)
17618}
17619
17620// UnmarshalJSON is the custom unmarshaler for Profile struct.
17621func (p *Profile) UnmarshalJSON(body []byte) error {
17622	var m map[string]*json.RawMessage
17623	err := json.Unmarshal(body, &m)
17624	if err != nil {
17625		return err
17626	}
17627	for k, v := range m {
17628		switch k {
17629		case "properties":
17630			if v != nil {
17631				var profilePropertiesFormat ProfilePropertiesFormat
17632				err = json.Unmarshal(*v, &profilePropertiesFormat)
17633				if err != nil {
17634					return err
17635				}
17636				p.ProfilePropertiesFormat = &profilePropertiesFormat
17637			}
17638		case "etag":
17639			if v != nil {
17640				var etag string
17641				err = json.Unmarshal(*v, &etag)
17642				if err != nil {
17643					return err
17644				}
17645				p.Etag = &etag
17646			}
17647		case "id":
17648			if v != nil {
17649				var ID string
17650				err = json.Unmarshal(*v, &ID)
17651				if err != nil {
17652					return err
17653				}
17654				p.ID = &ID
17655			}
17656		case "name":
17657			if v != nil {
17658				var name string
17659				err = json.Unmarshal(*v, &name)
17660				if err != nil {
17661					return err
17662				}
17663				p.Name = &name
17664			}
17665		case "type":
17666			if v != nil {
17667				var typeVar string
17668				err = json.Unmarshal(*v, &typeVar)
17669				if err != nil {
17670					return err
17671				}
17672				p.Type = &typeVar
17673			}
17674		case "location":
17675			if v != nil {
17676				var location string
17677				err = json.Unmarshal(*v, &location)
17678				if err != nil {
17679					return err
17680				}
17681				p.Location = &location
17682			}
17683		case "tags":
17684			if v != nil {
17685				var tags map[string]*string
17686				err = json.Unmarshal(*v, &tags)
17687				if err != nil {
17688					return err
17689				}
17690				p.Tags = tags
17691			}
17692		}
17693	}
17694
17695	return nil
17696}
17697
17698// ProfileListResult response for ListNetworkProfiles API service call.
17699type ProfileListResult struct {
17700	autorest.Response `json:"-"`
17701	// Value - A list of network profiles that exist in a resource group.
17702	Value *[]Profile `json:"value,omitempty"`
17703	// NextLink - The URL to get the next set of results.
17704	NextLink *string `json:"nextLink,omitempty"`
17705}
17706
17707// ProfileListResultIterator provides access to a complete listing of Profile values.
17708type ProfileListResultIterator struct {
17709	i    int
17710	page ProfileListResultPage
17711}
17712
17713// NextWithContext advances to the next value.  If there was an error making
17714// the request the iterator does not advance and the error is returned.
17715func (iter *ProfileListResultIterator) NextWithContext(ctx context.Context) (err error) {
17716	if tracing.IsEnabled() {
17717		ctx = tracing.StartSpan(ctx, fqdn+"/ProfileListResultIterator.NextWithContext")
17718		defer func() {
17719			sc := -1
17720			if iter.Response().Response.Response != nil {
17721				sc = iter.Response().Response.Response.StatusCode
17722			}
17723			tracing.EndSpan(ctx, sc, err)
17724		}()
17725	}
17726	iter.i++
17727	if iter.i < len(iter.page.Values()) {
17728		return nil
17729	}
17730	err = iter.page.NextWithContext(ctx)
17731	if err != nil {
17732		iter.i--
17733		return err
17734	}
17735	iter.i = 0
17736	return nil
17737}
17738
17739// Next advances to the next value.  If there was an error making
17740// the request the iterator does not advance and the error is returned.
17741// Deprecated: Use NextWithContext() instead.
17742func (iter *ProfileListResultIterator) Next() error {
17743	return iter.NextWithContext(context.Background())
17744}
17745
17746// NotDone returns true if the enumeration should be started or is not yet complete.
17747func (iter ProfileListResultIterator) NotDone() bool {
17748	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17749}
17750
17751// Response returns the raw server response from the last page request.
17752func (iter ProfileListResultIterator) Response() ProfileListResult {
17753	return iter.page.Response()
17754}
17755
17756// Value returns the current value or a zero-initialized value if the
17757// iterator has advanced beyond the end of the collection.
17758func (iter ProfileListResultIterator) Value() Profile {
17759	if !iter.page.NotDone() {
17760		return Profile{}
17761	}
17762	return iter.page.Values()[iter.i]
17763}
17764
17765// Creates a new instance of the ProfileListResultIterator type.
17766func NewProfileListResultIterator(page ProfileListResultPage) ProfileListResultIterator {
17767	return ProfileListResultIterator{page: page}
17768}
17769
17770// IsEmpty returns true if the ListResult contains no values.
17771func (plr ProfileListResult) IsEmpty() bool {
17772	return plr.Value == nil || len(*plr.Value) == 0
17773}
17774
17775// hasNextLink returns true if the NextLink is not empty.
17776func (plr ProfileListResult) hasNextLink() bool {
17777	return plr.NextLink != nil && len(*plr.NextLink) != 0
17778}
17779
17780// profileListResultPreparer prepares a request to retrieve the next set of results.
17781// It returns nil if no more results exist.
17782func (plr ProfileListResult) profileListResultPreparer(ctx context.Context) (*http.Request, error) {
17783	if !plr.hasNextLink() {
17784		return nil, nil
17785	}
17786	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17787		autorest.AsJSON(),
17788		autorest.AsGet(),
17789		autorest.WithBaseURL(to.String(plr.NextLink)))
17790}
17791
17792// ProfileListResultPage contains a page of Profile values.
17793type ProfileListResultPage struct {
17794	fn  func(context.Context, ProfileListResult) (ProfileListResult, error)
17795	plr ProfileListResult
17796}
17797
17798// NextWithContext advances to the next page of values.  If there was an error making
17799// the request the page does not advance and the error is returned.
17800func (page *ProfileListResultPage) NextWithContext(ctx context.Context) (err error) {
17801	if tracing.IsEnabled() {
17802		ctx = tracing.StartSpan(ctx, fqdn+"/ProfileListResultPage.NextWithContext")
17803		defer func() {
17804			sc := -1
17805			if page.Response().Response.Response != nil {
17806				sc = page.Response().Response.Response.StatusCode
17807			}
17808			tracing.EndSpan(ctx, sc, err)
17809		}()
17810	}
17811	for {
17812		next, err := page.fn(ctx, page.plr)
17813		if err != nil {
17814			return err
17815		}
17816		page.plr = next
17817		if !next.hasNextLink() || !next.IsEmpty() {
17818			break
17819		}
17820	}
17821	return nil
17822}
17823
17824// Next advances to the next page of values.  If there was an error making
17825// the request the page does not advance and the error is returned.
17826// Deprecated: Use NextWithContext() instead.
17827func (page *ProfileListResultPage) Next() error {
17828	return page.NextWithContext(context.Background())
17829}
17830
17831// NotDone returns true if the page enumeration should be started or is not yet complete.
17832func (page ProfileListResultPage) NotDone() bool {
17833	return !page.plr.IsEmpty()
17834}
17835
17836// Response returns the raw server response from the last page request.
17837func (page ProfileListResultPage) Response() ProfileListResult {
17838	return page.plr
17839}
17840
17841// Values returns the slice of values for the current page or nil if there are no values.
17842func (page ProfileListResultPage) Values() []Profile {
17843	if page.plr.IsEmpty() {
17844		return nil
17845	}
17846	return *page.plr.Value
17847}
17848
17849// Creates a new instance of the ProfileListResultPage type.
17850func NewProfileListResultPage(cur ProfileListResult, getNextPage func(context.Context, ProfileListResult) (ProfileListResult, error)) ProfileListResultPage {
17851	return ProfileListResultPage{
17852		fn:  getNextPage,
17853		plr: cur,
17854	}
17855}
17856
17857// ProfilePropertiesFormat network profile properties.
17858type ProfilePropertiesFormat struct {
17859	// ContainerNetworkInterfaces - List of child container network interfaces.
17860	ContainerNetworkInterfaces *[]ContainerNetworkInterface `json:"containerNetworkInterfaces,omitempty"`
17861	// ContainerNetworkInterfaceConfigurations - List of chid container network interface configurations.
17862	ContainerNetworkInterfaceConfigurations *[]ContainerNetworkInterfaceConfiguration `json:"containerNetworkInterfaceConfigurations,omitempty"`
17863	// ResourceGUID - READ-ONLY; The resource GUID property of the network interface resource.
17864	ResourceGUID *string `json:"resourceGuid,omitempty"`
17865	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
17866	ProvisioningState *string `json:"provisioningState,omitempty"`
17867}
17868
17869// MarshalJSON is the custom marshaler for ProfilePropertiesFormat.
17870func (ppf ProfilePropertiesFormat) MarshalJSON() ([]byte, error) {
17871	objectMap := make(map[string]interface{})
17872	if ppf.ContainerNetworkInterfaces != nil {
17873		objectMap["containerNetworkInterfaces"] = ppf.ContainerNetworkInterfaces
17874	}
17875	if ppf.ContainerNetworkInterfaceConfigurations != nil {
17876		objectMap["containerNetworkInterfaceConfigurations"] = ppf.ContainerNetworkInterfaceConfigurations
17877	}
17878	return json.Marshal(objectMap)
17879}
17880
17881// ProfilesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
17882// operation.
17883type ProfilesDeleteFuture struct {
17884	azure.FutureAPI
17885	// Result returns the result of the asynchronous operation.
17886	// If the operation has not completed it will return an error.
17887	Result func(ProfilesClient) (autorest.Response, error)
17888}
17889
17890// ProtocolConfiguration configuration of the protocol.
17891type ProtocolConfiguration struct {
17892	HTTPConfiguration *HTTPConfiguration `json:"HTTPConfiguration,omitempty"`
17893}
17894
17895// ProtocolCustomSettingsFormat dDoS custom policy properties.
17896type ProtocolCustomSettingsFormat struct {
17897	// Protocol - The protocol for which the DDoS protection policy is being customized. Possible values include: 'DdosCustomPolicyProtocolTCP', 'DdosCustomPolicyProtocolUDP', 'DdosCustomPolicyProtocolSyn'
17898	Protocol DdosCustomPolicyProtocol `json:"protocol,omitempty"`
17899	// TriggerRateOverride - The customized DDoS protection trigger rate.
17900	TriggerRateOverride *string `json:"triggerRateOverride,omitempty"`
17901	// SourceRateOverride - The customized DDoS protection source rate.
17902	SourceRateOverride *string `json:"sourceRateOverride,omitempty"`
17903	// TriggerSensitivityOverride - The customized DDoS protection trigger rate sensitivity degrees. High: Trigger rate set with most sensitivity w.r.t. normal traffic. Default: Trigger rate set with moderate sensitivity w.r.t. normal traffic. Low: Trigger rate set with less sensitivity w.r.t. normal traffic. Relaxed: Trigger rate set with least sensitivity w.r.t. normal traffic. Possible values include: 'Relaxed', 'Low', 'Default', 'High'
17904	TriggerSensitivityOverride DdosCustomPolicyTriggerSensitivityOverride `json:"triggerSensitivityOverride,omitempty"`
17905}
17906
17907// PublicIPAddress public IP address resource.
17908type PublicIPAddress struct {
17909	autorest.Response `json:"-"`
17910	// Sku - The public IP address SKU.
17911	Sku *PublicIPAddressSku `json:"sku,omitempty"`
17912	// PublicIPAddressPropertiesFormat - Public IP address properties.
17913	*PublicIPAddressPropertiesFormat `json:"properties,omitempty"`
17914	// Etag - A unique read-only string that changes whenever the resource is updated.
17915	Etag *string `json:"etag,omitempty"`
17916	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
17917	Zones *[]string `json:"zones,omitempty"`
17918	// ID - Resource ID.
17919	ID *string `json:"id,omitempty"`
17920	// Name - READ-ONLY; Resource name.
17921	Name *string `json:"name,omitempty"`
17922	// Type - READ-ONLY; Resource type.
17923	Type *string `json:"type,omitempty"`
17924	// Location - Resource location.
17925	Location *string `json:"location,omitempty"`
17926	// Tags - Resource tags.
17927	Tags map[string]*string `json:"tags"`
17928}
17929
17930// MarshalJSON is the custom marshaler for PublicIPAddress.
17931func (pia PublicIPAddress) MarshalJSON() ([]byte, error) {
17932	objectMap := make(map[string]interface{})
17933	if pia.Sku != nil {
17934		objectMap["sku"] = pia.Sku
17935	}
17936	if pia.PublicIPAddressPropertiesFormat != nil {
17937		objectMap["properties"] = pia.PublicIPAddressPropertiesFormat
17938	}
17939	if pia.Etag != nil {
17940		objectMap["etag"] = pia.Etag
17941	}
17942	if pia.Zones != nil {
17943		objectMap["zones"] = pia.Zones
17944	}
17945	if pia.ID != nil {
17946		objectMap["id"] = pia.ID
17947	}
17948	if pia.Location != nil {
17949		objectMap["location"] = pia.Location
17950	}
17951	if pia.Tags != nil {
17952		objectMap["tags"] = pia.Tags
17953	}
17954	return json.Marshal(objectMap)
17955}
17956
17957// UnmarshalJSON is the custom unmarshaler for PublicIPAddress struct.
17958func (pia *PublicIPAddress) UnmarshalJSON(body []byte) error {
17959	var m map[string]*json.RawMessage
17960	err := json.Unmarshal(body, &m)
17961	if err != nil {
17962		return err
17963	}
17964	for k, v := range m {
17965		switch k {
17966		case "sku":
17967			if v != nil {
17968				var sku PublicIPAddressSku
17969				err = json.Unmarshal(*v, &sku)
17970				if err != nil {
17971					return err
17972				}
17973				pia.Sku = &sku
17974			}
17975		case "properties":
17976			if v != nil {
17977				var publicIPAddressPropertiesFormat PublicIPAddressPropertiesFormat
17978				err = json.Unmarshal(*v, &publicIPAddressPropertiesFormat)
17979				if err != nil {
17980					return err
17981				}
17982				pia.PublicIPAddressPropertiesFormat = &publicIPAddressPropertiesFormat
17983			}
17984		case "etag":
17985			if v != nil {
17986				var etag string
17987				err = json.Unmarshal(*v, &etag)
17988				if err != nil {
17989					return err
17990				}
17991				pia.Etag = &etag
17992			}
17993		case "zones":
17994			if v != nil {
17995				var zones []string
17996				err = json.Unmarshal(*v, &zones)
17997				if err != nil {
17998					return err
17999				}
18000				pia.Zones = &zones
18001			}
18002		case "id":
18003			if v != nil {
18004				var ID string
18005				err = json.Unmarshal(*v, &ID)
18006				if err != nil {
18007					return err
18008				}
18009				pia.ID = &ID
18010			}
18011		case "name":
18012			if v != nil {
18013				var name string
18014				err = json.Unmarshal(*v, &name)
18015				if err != nil {
18016					return err
18017				}
18018				pia.Name = &name
18019			}
18020		case "type":
18021			if v != nil {
18022				var typeVar string
18023				err = json.Unmarshal(*v, &typeVar)
18024				if err != nil {
18025					return err
18026				}
18027				pia.Type = &typeVar
18028			}
18029		case "location":
18030			if v != nil {
18031				var location string
18032				err = json.Unmarshal(*v, &location)
18033				if err != nil {
18034					return err
18035				}
18036				pia.Location = &location
18037			}
18038		case "tags":
18039			if v != nil {
18040				var tags map[string]*string
18041				err = json.Unmarshal(*v, &tags)
18042				if err != nil {
18043					return err
18044				}
18045				pia.Tags = tags
18046			}
18047		}
18048	}
18049
18050	return nil
18051}
18052
18053// PublicIPAddressDNSSettings contains FQDN of the DNS record associated with the public IP address
18054type PublicIPAddressDNSSettings struct {
18055	// DomainNameLabel - Gets or sets 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.
18056	DomainNameLabel *string `json:"domainNameLabel,omitempty"`
18057	// Fqdn - Gets the FQDN, 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.
18058	Fqdn *string `json:"fqdn,omitempty"`
18059	// ReverseFqdn - Gets or Sets 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.
18060	ReverseFqdn *string `json:"reverseFqdn,omitempty"`
18061}
18062
18063// PublicIPAddressesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
18064// long-running operation.
18065type PublicIPAddressesCreateOrUpdateFuture struct {
18066	azure.FutureAPI
18067	// Result returns the result of the asynchronous operation.
18068	// If the operation has not completed it will return an error.
18069	Result func(PublicIPAddressesClient) (PublicIPAddress, error)
18070}
18071
18072// PublicIPAddressesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
18073// operation.
18074type PublicIPAddressesDeleteFuture struct {
18075	azure.FutureAPI
18076	// Result returns the result of the asynchronous operation.
18077	// If the operation has not completed it will return an error.
18078	Result func(PublicIPAddressesClient) (autorest.Response, error)
18079}
18080
18081// PublicIPAddressesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
18082// long-running operation.
18083type PublicIPAddressesUpdateTagsFuture struct {
18084	azure.FutureAPI
18085	// Result returns the result of the asynchronous operation.
18086	// If the operation has not completed it will return an error.
18087	Result func(PublicIPAddressesClient) (PublicIPAddress, error)
18088}
18089
18090// PublicIPAddressListResult response for ListPublicIpAddresses API service call.
18091type PublicIPAddressListResult struct {
18092	autorest.Response `json:"-"`
18093	// Value - A list of public IP addresses that exists in a resource group.
18094	Value *[]PublicIPAddress `json:"value,omitempty"`
18095	// NextLink - The URL to get the next set of results.
18096	NextLink *string `json:"nextLink,omitempty"`
18097}
18098
18099// PublicIPAddressListResultIterator provides access to a complete listing of PublicIPAddress values.
18100type PublicIPAddressListResultIterator struct {
18101	i    int
18102	page PublicIPAddressListResultPage
18103}
18104
18105// NextWithContext advances to the next value.  If there was an error making
18106// the request the iterator does not advance and the error is returned.
18107func (iter *PublicIPAddressListResultIterator) NextWithContext(ctx context.Context) (err error) {
18108	if tracing.IsEnabled() {
18109		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultIterator.NextWithContext")
18110		defer func() {
18111			sc := -1
18112			if iter.Response().Response.Response != nil {
18113				sc = iter.Response().Response.Response.StatusCode
18114			}
18115			tracing.EndSpan(ctx, sc, err)
18116		}()
18117	}
18118	iter.i++
18119	if iter.i < len(iter.page.Values()) {
18120		return nil
18121	}
18122	err = iter.page.NextWithContext(ctx)
18123	if err != nil {
18124		iter.i--
18125		return err
18126	}
18127	iter.i = 0
18128	return nil
18129}
18130
18131// Next advances to the next value.  If there was an error making
18132// the request the iterator does not advance and the error is returned.
18133// Deprecated: Use NextWithContext() instead.
18134func (iter *PublicIPAddressListResultIterator) Next() error {
18135	return iter.NextWithContext(context.Background())
18136}
18137
18138// NotDone returns true if the enumeration should be started or is not yet complete.
18139func (iter PublicIPAddressListResultIterator) NotDone() bool {
18140	return iter.page.NotDone() && iter.i < len(iter.page.Values())
18141}
18142
18143// Response returns the raw server response from the last page request.
18144func (iter PublicIPAddressListResultIterator) Response() PublicIPAddressListResult {
18145	return iter.page.Response()
18146}
18147
18148// Value returns the current value or a zero-initialized value if the
18149// iterator has advanced beyond the end of the collection.
18150func (iter PublicIPAddressListResultIterator) Value() PublicIPAddress {
18151	if !iter.page.NotDone() {
18152		return PublicIPAddress{}
18153	}
18154	return iter.page.Values()[iter.i]
18155}
18156
18157// Creates a new instance of the PublicIPAddressListResultIterator type.
18158func NewPublicIPAddressListResultIterator(page PublicIPAddressListResultPage) PublicIPAddressListResultIterator {
18159	return PublicIPAddressListResultIterator{page: page}
18160}
18161
18162// IsEmpty returns true if the ListResult contains no values.
18163func (pialr PublicIPAddressListResult) IsEmpty() bool {
18164	return pialr.Value == nil || len(*pialr.Value) == 0
18165}
18166
18167// hasNextLink returns true if the NextLink is not empty.
18168func (pialr PublicIPAddressListResult) hasNextLink() bool {
18169	return pialr.NextLink != nil && len(*pialr.NextLink) != 0
18170}
18171
18172// publicIPAddressListResultPreparer prepares a request to retrieve the next set of results.
18173// It returns nil if no more results exist.
18174func (pialr PublicIPAddressListResult) publicIPAddressListResultPreparer(ctx context.Context) (*http.Request, error) {
18175	if !pialr.hasNextLink() {
18176		return nil, nil
18177	}
18178	return autorest.Prepare((&http.Request{}).WithContext(ctx),
18179		autorest.AsJSON(),
18180		autorest.AsGet(),
18181		autorest.WithBaseURL(to.String(pialr.NextLink)))
18182}
18183
18184// PublicIPAddressListResultPage contains a page of PublicIPAddress values.
18185type PublicIPAddressListResultPage struct {
18186	fn    func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)
18187	pialr PublicIPAddressListResult
18188}
18189
18190// NextWithContext advances to the next page of values.  If there was an error making
18191// the request the page does not advance and the error is returned.
18192func (page *PublicIPAddressListResultPage) NextWithContext(ctx context.Context) (err error) {
18193	if tracing.IsEnabled() {
18194		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultPage.NextWithContext")
18195		defer func() {
18196			sc := -1
18197			if page.Response().Response.Response != nil {
18198				sc = page.Response().Response.Response.StatusCode
18199			}
18200			tracing.EndSpan(ctx, sc, err)
18201		}()
18202	}
18203	for {
18204		next, err := page.fn(ctx, page.pialr)
18205		if err != nil {
18206			return err
18207		}
18208		page.pialr = next
18209		if !next.hasNextLink() || !next.IsEmpty() {
18210			break
18211		}
18212	}
18213	return nil
18214}
18215
18216// Next advances to the next page of values.  If there was an error making
18217// the request the page does not advance and the error is returned.
18218// Deprecated: Use NextWithContext() instead.
18219func (page *PublicIPAddressListResultPage) Next() error {
18220	return page.NextWithContext(context.Background())
18221}
18222
18223// NotDone returns true if the page enumeration should be started or is not yet complete.
18224func (page PublicIPAddressListResultPage) NotDone() bool {
18225	return !page.pialr.IsEmpty()
18226}
18227
18228// Response returns the raw server response from the last page request.
18229func (page PublicIPAddressListResultPage) Response() PublicIPAddressListResult {
18230	return page.pialr
18231}
18232
18233// Values returns the slice of values for the current page or nil if there are no values.
18234func (page PublicIPAddressListResultPage) Values() []PublicIPAddress {
18235	if page.pialr.IsEmpty() {
18236		return nil
18237	}
18238	return *page.pialr.Value
18239}
18240
18241// Creates a new instance of the PublicIPAddressListResultPage type.
18242func NewPublicIPAddressListResultPage(cur PublicIPAddressListResult, getNextPage func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)) PublicIPAddressListResultPage {
18243	return PublicIPAddressListResultPage{
18244		fn:    getNextPage,
18245		pialr: cur,
18246	}
18247}
18248
18249// PublicIPAddressPropertiesFormat public IP address properties.
18250type PublicIPAddressPropertiesFormat struct {
18251	// PublicIPAllocationMethod - The public IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
18252	PublicIPAllocationMethod IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"`
18253	// PublicIPAddressVersion - The public IP address version. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6'
18254	PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"`
18255	// IPConfiguration - READ-ONLY; The IP configuration associated with the public IP address.
18256	IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"`
18257	// DNSSettings - The FQDN of the DNS record associated with the public IP address.
18258	DNSSettings *PublicIPAddressDNSSettings `json:"dnsSettings,omitempty"`
18259	// DdosSettings - The DDoS protection custom policy associated with the public IP address.
18260	DdosSettings *DdosSettings `json:"ddosSettings,omitempty"`
18261	// IPTags - The list of tags associated with the public IP address.
18262	IPTags *[]IPTag `json:"ipTags,omitempty"`
18263	// IPAddress - The IP address associated with the public IP address resource.
18264	IPAddress *string `json:"ipAddress,omitempty"`
18265	// PublicIPPrefix - The Public IP Prefix this Public IP Address should be allocated from.
18266	PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"`
18267	// IdleTimeoutInMinutes - The idle timeout of the public IP address.
18268	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
18269	// ResourceGUID - The resource GUID property of the public IP resource.
18270	ResourceGUID *string `json:"resourceGuid,omitempty"`
18271	// ProvisioningState - The provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
18272	ProvisioningState *string `json:"provisioningState,omitempty"`
18273}
18274
18275// MarshalJSON is the custom marshaler for PublicIPAddressPropertiesFormat.
18276func (piapf PublicIPAddressPropertiesFormat) MarshalJSON() ([]byte, error) {
18277	objectMap := make(map[string]interface{})
18278	if piapf.PublicIPAllocationMethod != "" {
18279		objectMap["publicIPAllocationMethod"] = piapf.PublicIPAllocationMethod
18280	}
18281	if piapf.PublicIPAddressVersion != "" {
18282		objectMap["publicIPAddressVersion"] = piapf.PublicIPAddressVersion
18283	}
18284	if piapf.DNSSettings != nil {
18285		objectMap["dnsSettings"] = piapf.DNSSettings
18286	}
18287	if piapf.DdosSettings != nil {
18288		objectMap["ddosSettings"] = piapf.DdosSettings
18289	}
18290	if piapf.IPTags != nil {
18291		objectMap["ipTags"] = piapf.IPTags
18292	}
18293	if piapf.IPAddress != nil {
18294		objectMap["ipAddress"] = piapf.IPAddress
18295	}
18296	if piapf.PublicIPPrefix != nil {
18297		objectMap["publicIPPrefix"] = piapf.PublicIPPrefix
18298	}
18299	if piapf.IdleTimeoutInMinutes != nil {
18300		objectMap["idleTimeoutInMinutes"] = piapf.IdleTimeoutInMinutes
18301	}
18302	if piapf.ResourceGUID != nil {
18303		objectMap["resourceGuid"] = piapf.ResourceGUID
18304	}
18305	if piapf.ProvisioningState != nil {
18306		objectMap["provisioningState"] = piapf.ProvisioningState
18307	}
18308	return json.Marshal(objectMap)
18309}
18310
18311// PublicIPAddressSku SKU of a public IP address
18312type PublicIPAddressSku struct {
18313	// Name - Name of a public IP address SKU. Possible values include: 'PublicIPAddressSkuNameBasic', 'PublicIPAddressSkuNameStandard'
18314	Name PublicIPAddressSkuName `json:"name,omitempty"`
18315}
18316
18317// PublicIPPrefix public IP prefix resource.
18318type PublicIPPrefix struct {
18319	autorest.Response `json:"-"`
18320	// Sku - The public IP prefix SKU.
18321	Sku *PublicIPPrefixSku `json:"sku,omitempty"`
18322	// PublicIPPrefixPropertiesFormat - Public IP prefix properties.
18323	*PublicIPPrefixPropertiesFormat `json:"properties,omitempty"`
18324	// Etag - A unique read-only string that changes whenever the resource is updated.
18325	Etag *string `json:"etag,omitempty"`
18326	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
18327	Zones *[]string `json:"zones,omitempty"`
18328	// ID - Resource ID.
18329	ID *string `json:"id,omitempty"`
18330	// Name - READ-ONLY; Resource name.
18331	Name *string `json:"name,omitempty"`
18332	// Type - READ-ONLY; Resource type.
18333	Type *string `json:"type,omitempty"`
18334	// Location - Resource location.
18335	Location *string `json:"location,omitempty"`
18336	// Tags - Resource tags.
18337	Tags map[string]*string `json:"tags"`
18338}
18339
18340// MarshalJSON is the custom marshaler for PublicIPPrefix.
18341func (pip PublicIPPrefix) MarshalJSON() ([]byte, error) {
18342	objectMap := make(map[string]interface{})
18343	if pip.Sku != nil {
18344		objectMap["sku"] = pip.Sku
18345	}
18346	if pip.PublicIPPrefixPropertiesFormat != nil {
18347		objectMap["properties"] = pip.PublicIPPrefixPropertiesFormat
18348	}
18349	if pip.Etag != nil {
18350		objectMap["etag"] = pip.Etag
18351	}
18352	if pip.Zones != nil {
18353		objectMap["zones"] = pip.Zones
18354	}
18355	if pip.ID != nil {
18356		objectMap["id"] = pip.ID
18357	}
18358	if pip.Location != nil {
18359		objectMap["location"] = pip.Location
18360	}
18361	if pip.Tags != nil {
18362		objectMap["tags"] = pip.Tags
18363	}
18364	return json.Marshal(objectMap)
18365}
18366
18367// UnmarshalJSON is the custom unmarshaler for PublicIPPrefix struct.
18368func (pip *PublicIPPrefix) UnmarshalJSON(body []byte) error {
18369	var m map[string]*json.RawMessage
18370	err := json.Unmarshal(body, &m)
18371	if err != nil {
18372		return err
18373	}
18374	for k, v := range m {
18375		switch k {
18376		case "sku":
18377			if v != nil {
18378				var sku PublicIPPrefixSku
18379				err = json.Unmarshal(*v, &sku)
18380				if err != nil {
18381					return err
18382				}
18383				pip.Sku = &sku
18384			}
18385		case "properties":
18386			if v != nil {
18387				var publicIPPrefixPropertiesFormat PublicIPPrefixPropertiesFormat
18388				err = json.Unmarshal(*v, &publicIPPrefixPropertiesFormat)
18389				if err != nil {
18390					return err
18391				}
18392				pip.PublicIPPrefixPropertiesFormat = &publicIPPrefixPropertiesFormat
18393			}
18394		case "etag":
18395			if v != nil {
18396				var etag string
18397				err = json.Unmarshal(*v, &etag)
18398				if err != nil {
18399					return err
18400				}
18401				pip.Etag = &etag
18402			}
18403		case "zones":
18404			if v != nil {
18405				var zones []string
18406				err = json.Unmarshal(*v, &zones)
18407				if err != nil {
18408					return err
18409				}
18410				pip.Zones = &zones
18411			}
18412		case "id":
18413			if v != nil {
18414				var ID string
18415				err = json.Unmarshal(*v, &ID)
18416				if err != nil {
18417					return err
18418				}
18419				pip.ID = &ID
18420			}
18421		case "name":
18422			if v != nil {
18423				var name string
18424				err = json.Unmarshal(*v, &name)
18425				if err != nil {
18426					return err
18427				}
18428				pip.Name = &name
18429			}
18430		case "type":
18431			if v != nil {
18432				var typeVar string
18433				err = json.Unmarshal(*v, &typeVar)
18434				if err != nil {
18435					return err
18436				}
18437				pip.Type = &typeVar
18438			}
18439		case "location":
18440			if v != nil {
18441				var location string
18442				err = json.Unmarshal(*v, &location)
18443				if err != nil {
18444					return err
18445				}
18446				pip.Location = &location
18447			}
18448		case "tags":
18449			if v != nil {
18450				var tags map[string]*string
18451				err = json.Unmarshal(*v, &tags)
18452				if err != nil {
18453					return err
18454				}
18455				pip.Tags = tags
18456			}
18457		}
18458	}
18459
18460	return nil
18461}
18462
18463// PublicIPPrefixesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
18464// long-running operation.
18465type PublicIPPrefixesCreateOrUpdateFuture struct {
18466	azure.FutureAPI
18467	// Result returns the result of the asynchronous operation.
18468	// If the operation has not completed it will return an error.
18469	Result func(PublicIPPrefixesClient) (PublicIPPrefix, error)
18470}
18471
18472// PublicIPPrefixesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
18473// operation.
18474type PublicIPPrefixesDeleteFuture struct {
18475	azure.FutureAPI
18476	// Result returns the result of the asynchronous operation.
18477	// If the operation has not completed it will return an error.
18478	Result func(PublicIPPrefixesClient) (autorest.Response, error)
18479}
18480
18481// PublicIPPrefixesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
18482// long-running operation.
18483type PublicIPPrefixesUpdateTagsFuture struct {
18484	azure.FutureAPI
18485	// Result returns the result of the asynchronous operation.
18486	// If the operation has not completed it will return an error.
18487	Result func(PublicIPPrefixesClient) (PublicIPPrefix, error)
18488}
18489
18490// PublicIPPrefixListResult response for ListPublicIpPrefixes API service call.
18491type PublicIPPrefixListResult struct {
18492	autorest.Response `json:"-"`
18493	// Value - A list of public IP prefixes that exists in a resource group.
18494	Value *[]PublicIPPrefix `json:"value,omitempty"`
18495	// NextLink - The URL to get the next set of results.
18496	NextLink *string `json:"nextLink,omitempty"`
18497}
18498
18499// PublicIPPrefixListResultIterator provides access to a complete listing of PublicIPPrefix values.
18500type PublicIPPrefixListResultIterator struct {
18501	i    int
18502	page PublicIPPrefixListResultPage
18503}
18504
18505// NextWithContext advances to the next value.  If there was an error making
18506// the request the iterator does not advance and the error is returned.
18507func (iter *PublicIPPrefixListResultIterator) NextWithContext(ctx context.Context) (err error) {
18508	if tracing.IsEnabled() {
18509		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixListResultIterator.NextWithContext")
18510		defer func() {
18511			sc := -1
18512			if iter.Response().Response.Response != nil {
18513				sc = iter.Response().Response.Response.StatusCode
18514			}
18515			tracing.EndSpan(ctx, sc, err)
18516		}()
18517	}
18518	iter.i++
18519	if iter.i < len(iter.page.Values()) {
18520		return nil
18521	}
18522	err = iter.page.NextWithContext(ctx)
18523	if err != nil {
18524		iter.i--
18525		return err
18526	}
18527	iter.i = 0
18528	return nil
18529}
18530
18531// Next advances to the next value.  If there was an error making
18532// the request the iterator does not advance and the error is returned.
18533// Deprecated: Use NextWithContext() instead.
18534func (iter *PublicIPPrefixListResultIterator) Next() error {
18535	return iter.NextWithContext(context.Background())
18536}
18537
18538// NotDone returns true if the enumeration should be started or is not yet complete.
18539func (iter PublicIPPrefixListResultIterator) NotDone() bool {
18540	return iter.page.NotDone() && iter.i < len(iter.page.Values())
18541}
18542
18543// Response returns the raw server response from the last page request.
18544func (iter PublicIPPrefixListResultIterator) Response() PublicIPPrefixListResult {
18545	return iter.page.Response()
18546}
18547
18548// Value returns the current value or a zero-initialized value if the
18549// iterator has advanced beyond the end of the collection.
18550func (iter PublicIPPrefixListResultIterator) Value() PublicIPPrefix {
18551	if !iter.page.NotDone() {
18552		return PublicIPPrefix{}
18553	}
18554	return iter.page.Values()[iter.i]
18555}
18556
18557// Creates a new instance of the PublicIPPrefixListResultIterator type.
18558func NewPublicIPPrefixListResultIterator(page PublicIPPrefixListResultPage) PublicIPPrefixListResultIterator {
18559	return PublicIPPrefixListResultIterator{page: page}
18560}
18561
18562// IsEmpty returns true if the ListResult contains no values.
18563func (piplr PublicIPPrefixListResult) IsEmpty() bool {
18564	return piplr.Value == nil || len(*piplr.Value) == 0
18565}
18566
18567// hasNextLink returns true if the NextLink is not empty.
18568func (piplr PublicIPPrefixListResult) hasNextLink() bool {
18569	return piplr.NextLink != nil && len(*piplr.NextLink) != 0
18570}
18571
18572// publicIPPrefixListResultPreparer prepares a request to retrieve the next set of results.
18573// It returns nil if no more results exist.
18574func (piplr PublicIPPrefixListResult) publicIPPrefixListResultPreparer(ctx context.Context) (*http.Request, error) {
18575	if !piplr.hasNextLink() {
18576		return nil, nil
18577	}
18578	return autorest.Prepare((&http.Request{}).WithContext(ctx),
18579		autorest.AsJSON(),
18580		autorest.AsGet(),
18581		autorest.WithBaseURL(to.String(piplr.NextLink)))
18582}
18583
18584// PublicIPPrefixListResultPage contains a page of PublicIPPrefix values.
18585type PublicIPPrefixListResultPage struct {
18586	fn    func(context.Context, PublicIPPrefixListResult) (PublicIPPrefixListResult, error)
18587	piplr PublicIPPrefixListResult
18588}
18589
18590// NextWithContext advances to the next page of values.  If there was an error making
18591// the request the page does not advance and the error is returned.
18592func (page *PublicIPPrefixListResultPage) NextWithContext(ctx context.Context) (err error) {
18593	if tracing.IsEnabled() {
18594		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixListResultPage.NextWithContext")
18595		defer func() {
18596			sc := -1
18597			if page.Response().Response.Response != nil {
18598				sc = page.Response().Response.Response.StatusCode
18599			}
18600			tracing.EndSpan(ctx, sc, err)
18601		}()
18602	}
18603	for {
18604		next, err := page.fn(ctx, page.piplr)
18605		if err != nil {
18606			return err
18607		}
18608		page.piplr = next
18609		if !next.hasNextLink() || !next.IsEmpty() {
18610			break
18611		}
18612	}
18613	return nil
18614}
18615
18616// Next advances to the next page of values.  If there was an error making
18617// the request the page does not advance and the error is returned.
18618// Deprecated: Use NextWithContext() instead.
18619func (page *PublicIPPrefixListResultPage) Next() error {
18620	return page.NextWithContext(context.Background())
18621}
18622
18623// NotDone returns true if the page enumeration should be started or is not yet complete.
18624func (page PublicIPPrefixListResultPage) NotDone() bool {
18625	return !page.piplr.IsEmpty()
18626}
18627
18628// Response returns the raw server response from the last page request.
18629func (page PublicIPPrefixListResultPage) Response() PublicIPPrefixListResult {
18630	return page.piplr
18631}
18632
18633// Values returns the slice of values for the current page or nil if there are no values.
18634func (page PublicIPPrefixListResultPage) Values() []PublicIPPrefix {
18635	if page.piplr.IsEmpty() {
18636		return nil
18637	}
18638	return *page.piplr.Value
18639}
18640
18641// Creates a new instance of the PublicIPPrefixListResultPage type.
18642func NewPublicIPPrefixListResultPage(cur PublicIPPrefixListResult, getNextPage func(context.Context, PublicIPPrefixListResult) (PublicIPPrefixListResult, error)) PublicIPPrefixListResultPage {
18643	return PublicIPPrefixListResultPage{
18644		fn:    getNextPage,
18645		piplr: cur,
18646	}
18647}
18648
18649// PublicIPPrefixPropertiesFormat public IP prefix properties.
18650type PublicIPPrefixPropertiesFormat struct {
18651	// PublicIPAddressVersion - The public IP address version. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6'
18652	PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"`
18653	// IPTags - The list of tags associated with the public IP prefix.
18654	IPTags *[]IPTag `json:"ipTags,omitempty"`
18655	// PrefixLength - The Length of the Public IP Prefix.
18656	PrefixLength *int32 `json:"prefixLength,omitempty"`
18657	// IPPrefix - The allocated Prefix
18658	IPPrefix *string `json:"ipPrefix,omitempty"`
18659	// PublicIPAddresses - The list of all referenced PublicIPAddresses
18660	PublicIPAddresses *[]ReferencedPublicIPAddress `json:"publicIPAddresses,omitempty"`
18661	// LoadBalancerFrontendIPConfiguration - READ-ONLY; The reference to load balancer frontend IP configuration associated with the public IP prefix.
18662	LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIpConfiguration,omitempty"`
18663	// ResourceGUID - The resource GUID property of the public IP prefix resource.
18664	ResourceGUID *string `json:"resourceGuid,omitempty"`
18665	// ProvisioningState - The provisioning state of the Public IP prefix resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
18666	ProvisioningState *string `json:"provisioningState,omitempty"`
18667}
18668
18669// MarshalJSON is the custom marshaler for PublicIPPrefixPropertiesFormat.
18670func (pippf PublicIPPrefixPropertiesFormat) MarshalJSON() ([]byte, error) {
18671	objectMap := make(map[string]interface{})
18672	if pippf.PublicIPAddressVersion != "" {
18673		objectMap["publicIPAddressVersion"] = pippf.PublicIPAddressVersion
18674	}
18675	if pippf.IPTags != nil {
18676		objectMap["ipTags"] = pippf.IPTags
18677	}
18678	if pippf.PrefixLength != nil {
18679		objectMap["prefixLength"] = pippf.PrefixLength
18680	}
18681	if pippf.IPPrefix != nil {
18682		objectMap["ipPrefix"] = pippf.IPPrefix
18683	}
18684	if pippf.PublicIPAddresses != nil {
18685		objectMap["publicIPAddresses"] = pippf.PublicIPAddresses
18686	}
18687	if pippf.ResourceGUID != nil {
18688		objectMap["resourceGuid"] = pippf.ResourceGUID
18689	}
18690	if pippf.ProvisioningState != nil {
18691		objectMap["provisioningState"] = pippf.ProvisioningState
18692	}
18693	return json.Marshal(objectMap)
18694}
18695
18696// PublicIPPrefixSku SKU of a public IP prefix
18697type PublicIPPrefixSku struct {
18698	// Name - Name of a public IP prefix SKU. Possible values include: 'Standard'
18699	Name PublicIPPrefixSkuName `json:"name,omitempty"`
18700}
18701
18702// QueryTroubleshootingParameters parameters that define the resource to query the troubleshooting result.
18703type QueryTroubleshootingParameters struct {
18704	// TargetResourceID - The target resource ID to query the troubleshooting result.
18705	TargetResourceID *string `json:"targetResourceId,omitempty"`
18706}
18707
18708// ReferencedPublicIPAddress ...
18709type ReferencedPublicIPAddress struct {
18710	// ID - The PublicIPAddress Reference
18711	ID *string `json:"id,omitempty"`
18712}
18713
18714// Resource common resource representation.
18715type Resource struct {
18716	// ID - Resource ID.
18717	ID *string `json:"id,omitempty"`
18718	// Name - READ-ONLY; Resource name.
18719	Name *string `json:"name,omitempty"`
18720	// Type - READ-ONLY; Resource type.
18721	Type *string `json:"type,omitempty"`
18722	// Location - Resource location.
18723	Location *string `json:"location,omitempty"`
18724	// Tags - Resource tags.
18725	Tags map[string]*string `json:"tags"`
18726}
18727
18728// MarshalJSON is the custom marshaler for Resource.
18729func (r Resource) MarshalJSON() ([]byte, error) {
18730	objectMap := make(map[string]interface{})
18731	if r.ID != nil {
18732		objectMap["id"] = r.ID
18733	}
18734	if r.Location != nil {
18735		objectMap["location"] = r.Location
18736	}
18737	if r.Tags != nil {
18738		objectMap["tags"] = r.Tags
18739	}
18740	return json.Marshal(objectMap)
18741}
18742
18743// ResourceNavigationLink resourceNavigationLink resource.
18744type ResourceNavigationLink struct {
18745	// ResourceNavigationLinkFormat - Resource navigation link properties format.
18746	*ResourceNavigationLinkFormat `json:"properties,omitempty"`
18747	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
18748	Name *string `json:"name,omitempty"`
18749	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
18750	Etag *string `json:"etag,omitempty"`
18751	// ID - Resource ID.
18752	ID *string `json:"id,omitempty"`
18753}
18754
18755// MarshalJSON is the custom marshaler for ResourceNavigationLink.
18756func (rnl ResourceNavigationLink) MarshalJSON() ([]byte, error) {
18757	objectMap := make(map[string]interface{})
18758	if rnl.ResourceNavigationLinkFormat != nil {
18759		objectMap["properties"] = rnl.ResourceNavigationLinkFormat
18760	}
18761	if rnl.Name != nil {
18762		objectMap["name"] = rnl.Name
18763	}
18764	if rnl.ID != nil {
18765		objectMap["id"] = rnl.ID
18766	}
18767	return json.Marshal(objectMap)
18768}
18769
18770// UnmarshalJSON is the custom unmarshaler for ResourceNavigationLink struct.
18771func (rnl *ResourceNavigationLink) UnmarshalJSON(body []byte) error {
18772	var m map[string]*json.RawMessage
18773	err := json.Unmarshal(body, &m)
18774	if err != nil {
18775		return err
18776	}
18777	for k, v := range m {
18778		switch k {
18779		case "properties":
18780			if v != nil {
18781				var resourceNavigationLinkFormat ResourceNavigationLinkFormat
18782				err = json.Unmarshal(*v, &resourceNavigationLinkFormat)
18783				if err != nil {
18784					return err
18785				}
18786				rnl.ResourceNavigationLinkFormat = &resourceNavigationLinkFormat
18787			}
18788		case "name":
18789			if v != nil {
18790				var name string
18791				err = json.Unmarshal(*v, &name)
18792				if err != nil {
18793					return err
18794				}
18795				rnl.Name = &name
18796			}
18797		case "etag":
18798			if v != nil {
18799				var etag string
18800				err = json.Unmarshal(*v, &etag)
18801				if err != nil {
18802					return err
18803				}
18804				rnl.Etag = &etag
18805			}
18806		case "id":
18807			if v != nil {
18808				var ID string
18809				err = json.Unmarshal(*v, &ID)
18810				if err != nil {
18811					return err
18812				}
18813				rnl.ID = &ID
18814			}
18815		}
18816	}
18817
18818	return nil
18819}
18820
18821// ResourceNavigationLinkFormat properties of ResourceNavigationLink.
18822type ResourceNavigationLinkFormat struct {
18823	// LinkedResourceType - Resource type of the linked resource.
18824	LinkedResourceType *string `json:"linkedResourceType,omitempty"`
18825	// Link - Link to the external resource
18826	Link *string `json:"link,omitempty"`
18827	// ProvisioningState - READ-ONLY; Provisioning state of the ResourceNavigationLink resource.
18828	ProvisioningState *string `json:"provisioningState,omitempty"`
18829}
18830
18831// MarshalJSON is the custom marshaler for ResourceNavigationLinkFormat.
18832func (rnlf ResourceNavigationLinkFormat) MarshalJSON() ([]byte, error) {
18833	objectMap := make(map[string]interface{})
18834	if rnlf.LinkedResourceType != nil {
18835		objectMap["linkedResourceType"] = rnlf.LinkedResourceType
18836	}
18837	if rnlf.Link != nil {
18838		objectMap["link"] = rnlf.Link
18839	}
18840	return json.Marshal(objectMap)
18841}
18842
18843// RetentionPolicyParameters parameters that define the retention policy for flow log.
18844type RetentionPolicyParameters struct {
18845	// Days - Number of days to retain flow log records.
18846	Days *int32 `json:"days,omitempty"`
18847	// Enabled - Flag to enable/disable retention.
18848	Enabled *bool `json:"enabled,omitempty"`
18849}
18850
18851// Route route resource
18852type Route struct {
18853	autorest.Response `json:"-"`
18854	// RoutePropertiesFormat - Properties of the route.
18855	*RoutePropertiesFormat `json:"properties,omitempty"`
18856	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
18857	Name *string `json:"name,omitempty"`
18858	// Etag - A unique read-only string that changes whenever the resource is updated.
18859	Etag *string `json:"etag,omitempty"`
18860	// ID - Resource ID.
18861	ID *string `json:"id,omitempty"`
18862}
18863
18864// MarshalJSON is the custom marshaler for Route.
18865func (r Route) MarshalJSON() ([]byte, error) {
18866	objectMap := make(map[string]interface{})
18867	if r.RoutePropertiesFormat != nil {
18868		objectMap["properties"] = r.RoutePropertiesFormat
18869	}
18870	if r.Name != nil {
18871		objectMap["name"] = r.Name
18872	}
18873	if r.Etag != nil {
18874		objectMap["etag"] = r.Etag
18875	}
18876	if r.ID != nil {
18877		objectMap["id"] = r.ID
18878	}
18879	return json.Marshal(objectMap)
18880}
18881
18882// UnmarshalJSON is the custom unmarshaler for Route struct.
18883func (r *Route) UnmarshalJSON(body []byte) error {
18884	var m map[string]*json.RawMessage
18885	err := json.Unmarshal(body, &m)
18886	if err != nil {
18887		return err
18888	}
18889	for k, v := range m {
18890		switch k {
18891		case "properties":
18892			if v != nil {
18893				var routePropertiesFormat RoutePropertiesFormat
18894				err = json.Unmarshal(*v, &routePropertiesFormat)
18895				if err != nil {
18896					return err
18897				}
18898				r.RoutePropertiesFormat = &routePropertiesFormat
18899			}
18900		case "name":
18901			if v != nil {
18902				var name string
18903				err = json.Unmarshal(*v, &name)
18904				if err != nil {
18905					return err
18906				}
18907				r.Name = &name
18908			}
18909		case "etag":
18910			if v != nil {
18911				var etag string
18912				err = json.Unmarshal(*v, &etag)
18913				if err != nil {
18914					return err
18915				}
18916				r.Etag = &etag
18917			}
18918		case "id":
18919			if v != nil {
18920				var ID string
18921				err = json.Unmarshal(*v, &ID)
18922				if err != nil {
18923					return err
18924				}
18925				r.ID = &ID
18926			}
18927		}
18928	}
18929
18930	return nil
18931}
18932
18933// RouteFilter route Filter Resource.
18934type RouteFilter struct {
18935	autorest.Response            `json:"-"`
18936	*RouteFilterPropertiesFormat `json:"properties,omitempty"`
18937	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
18938	Etag *string `json:"etag,omitempty"`
18939	// ID - Resource ID.
18940	ID *string `json:"id,omitempty"`
18941	// Name - READ-ONLY; Resource name.
18942	Name *string `json:"name,omitempty"`
18943	// Type - READ-ONLY; Resource type.
18944	Type *string `json:"type,omitempty"`
18945	// Location - Resource location.
18946	Location *string `json:"location,omitempty"`
18947	// Tags - Resource tags.
18948	Tags map[string]*string `json:"tags"`
18949}
18950
18951// MarshalJSON is the custom marshaler for RouteFilter.
18952func (rf RouteFilter) MarshalJSON() ([]byte, error) {
18953	objectMap := make(map[string]interface{})
18954	if rf.RouteFilterPropertiesFormat != nil {
18955		objectMap["properties"] = rf.RouteFilterPropertiesFormat
18956	}
18957	if rf.ID != nil {
18958		objectMap["id"] = rf.ID
18959	}
18960	if rf.Location != nil {
18961		objectMap["location"] = rf.Location
18962	}
18963	if rf.Tags != nil {
18964		objectMap["tags"] = rf.Tags
18965	}
18966	return json.Marshal(objectMap)
18967}
18968
18969// UnmarshalJSON is the custom unmarshaler for RouteFilter struct.
18970func (rf *RouteFilter) UnmarshalJSON(body []byte) error {
18971	var m map[string]*json.RawMessage
18972	err := json.Unmarshal(body, &m)
18973	if err != nil {
18974		return err
18975	}
18976	for k, v := range m {
18977		switch k {
18978		case "properties":
18979			if v != nil {
18980				var routeFilterPropertiesFormat RouteFilterPropertiesFormat
18981				err = json.Unmarshal(*v, &routeFilterPropertiesFormat)
18982				if err != nil {
18983					return err
18984				}
18985				rf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat
18986			}
18987		case "etag":
18988			if v != nil {
18989				var etag string
18990				err = json.Unmarshal(*v, &etag)
18991				if err != nil {
18992					return err
18993				}
18994				rf.Etag = &etag
18995			}
18996		case "id":
18997			if v != nil {
18998				var ID string
18999				err = json.Unmarshal(*v, &ID)
19000				if err != nil {
19001					return err
19002				}
19003				rf.ID = &ID
19004			}
19005		case "name":
19006			if v != nil {
19007				var name string
19008				err = json.Unmarshal(*v, &name)
19009				if err != nil {
19010					return err
19011				}
19012				rf.Name = &name
19013			}
19014		case "type":
19015			if v != nil {
19016				var typeVar string
19017				err = json.Unmarshal(*v, &typeVar)
19018				if err != nil {
19019					return err
19020				}
19021				rf.Type = &typeVar
19022			}
19023		case "location":
19024			if v != nil {
19025				var location string
19026				err = json.Unmarshal(*v, &location)
19027				if err != nil {
19028					return err
19029				}
19030				rf.Location = &location
19031			}
19032		case "tags":
19033			if v != nil {
19034				var tags map[string]*string
19035				err = json.Unmarshal(*v, &tags)
19036				if err != nil {
19037					return err
19038				}
19039				rf.Tags = tags
19040			}
19041		}
19042	}
19043
19044	return nil
19045}
19046
19047// RouteFilterListResult response for the ListRouteFilters API service call.
19048type RouteFilterListResult struct {
19049	autorest.Response `json:"-"`
19050	// Value - Gets a list of route filters in a resource group.
19051	Value *[]RouteFilter `json:"value,omitempty"`
19052	// NextLink - The URL to get the next set of results.
19053	NextLink *string `json:"nextLink,omitempty"`
19054}
19055
19056// RouteFilterListResultIterator provides access to a complete listing of RouteFilter values.
19057type RouteFilterListResultIterator struct {
19058	i    int
19059	page RouteFilterListResultPage
19060}
19061
19062// NextWithContext advances to the next value.  If there was an error making
19063// the request the iterator does not advance and the error is returned.
19064func (iter *RouteFilterListResultIterator) NextWithContext(ctx context.Context) (err error) {
19065	if tracing.IsEnabled() {
19066		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultIterator.NextWithContext")
19067		defer func() {
19068			sc := -1
19069			if iter.Response().Response.Response != nil {
19070				sc = iter.Response().Response.Response.StatusCode
19071			}
19072			tracing.EndSpan(ctx, sc, err)
19073		}()
19074	}
19075	iter.i++
19076	if iter.i < len(iter.page.Values()) {
19077		return nil
19078	}
19079	err = iter.page.NextWithContext(ctx)
19080	if err != nil {
19081		iter.i--
19082		return err
19083	}
19084	iter.i = 0
19085	return nil
19086}
19087
19088// Next advances to the next value.  If there was an error making
19089// the request the iterator does not advance and the error is returned.
19090// Deprecated: Use NextWithContext() instead.
19091func (iter *RouteFilterListResultIterator) Next() error {
19092	return iter.NextWithContext(context.Background())
19093}
19094
19095// NotDone returns true if the enumeration should be started or is not yet complete.
19096func (iter RouteFilterListResultIterator) NotDone() bool {
19097	return iter.page.NotDone() && iter.i < len(iter.page.Values())
19098}
19099
19100// Response returns the raw server response from the last page request.
19101func (iter RouteFilterListResultIterator) Response() RouteFilterListResult {
19102	return iter.page.Response()
19103}
19104
19105// Value returns the current value or a zero-initialized value if the
19106// iterator has advanced beyond the end of the collection.
19107func (iter RouteFilterListResultIterator) Value() RouteFilter {
19108	if !iter.page.NotDone() {
19109		return RouteFilter{}
19110	}
19111	return iter.page.Values()[iter.i]
19112}
19113
19114// Creates a new instance of the RouteFilterListResultIterator type.
19115func NewRouteFilterListResultIterator(page RouteFilterListResultPage) RouteFilterListResultIterator {
19116	return RouteFilterListResultIterator{page: page}
19117}
19118
19119// IsEmpty returns true if the ListResult contains no values.
19120func (rflr RouteFilterListResult) IsEmpty() bool {
19121	return rflr.Value == nil || len(*rflr.Value) == 0
19122}
19123
19124// hasNextLink returns true if the NextLink is not empty.
19125func (rflr RouteFilterListResult) hasNextLink() bool {
19126	return rflr.NextLink != nil && len(*rflr.NextLink) != 0
19127}
19128
19129// routeFilterListResultPreparer prepares a request to retrieve the next set of results.
19130// It returns nil if no more results exist.
19131func (rflr RouteFilterListResult) routeFilterListResultPreparer(ctx context.Context) (*http.Request, error) {
19132	if !rflr.hasNextLink() {
19133		return nil, nil
19134	}
19135	return autorest.Prepare((&http.Request{}).WithContext(ctx),
19136		autorest.AsJSON(),
19137		autorest.AsGet(),
19138		autorest.WithBaseURL(to.String(rflr.NextLink)))
19139}
19140
19141// RouteFilterListResultPage contains a page of RouteFilter values.
19142type RouteFilterListResultPage struct {
19143	fn   func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)
19144	rflr RouteFilterListResult
19145}
19146
19147// NextWithContext advances to the next page of values.  If there was an error making
19148// the request the page does not advance and the error is returned.
19149func (page *RouteFilterListResultPage) NextWithContext(ctx context.Context) (err error) {
19150	if tracing.IsEnabled() {
19151		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultPage.NextWithContext")
19152		defer func() {
19153			sc := -1
19154			if page.Response().Response.Response != nil {
19155				sc = page.Response().Response.Response.StatusCode
19156			}
19157			tracing.EndSpan(ctx, sc, err)
19158		}()
19159	}
19160	for {
19161		next, err := page.fn(ctx, page.rflr)
19162		if err != nil {
19163			return err
19164		}
19165		page.rflr = next
19166		if !next.hasNextLink() || !next.IsEmpty() {
19167			break
19168		}
19169	}
19170	return nil
19171}
19172
19173// Next advances to the next page of values.  If there was an error making
19174// the request the page does not advance and the error is returned.
19175// Deprecated: Use NextWithContext() instead.
19176func (page *RouteFilterListResultPage) Next() error {
19177	return page.NextWithContext(context.Background())
19178}
19179
19180// NotDone returns true if the page enumeration should be started or is not yet complete.
19181func (page RouteFilterListResultPage) NotDone() bool {
19182	return !page.rflr.IsEmpty()
19183}
19184
19185// Response returns the raw server response from the last page request.
19186func (page RouteFilterListResultPage) Response() RouteFilterListResult {
19187	return page.rflr
19188}
19189
19190// Values returns the slice of values for the current page or nil if there are no values.
19191func (page RouteFilterListResultPage) Values() []RouteFilter {
19192	if page.rflr.IsEmpty() {
19193		return nil
19194	}
19195	return *page.rflr.Value
19196}
19197
19198// Creates a new instance of the RouteFilterListResultPage type.
19199func NewRouteFilterListResultPage(cur RouteFilterListResult, getNextPage func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)) RouteFilterListResultPage {
19200	return RouteFilterListResultPage{
19201		fn:   getNextPage,
19202		rflr: cur,
19203	}
19204}
19205
19206// RouteFilterPropertiesFormat route Filter Resource
19207type RouteFilterPropertiesFormat struct {
19208	// Rules - Collection of RouteFilterRules contained within a route filter.
19209	Rules *[]RouteFilterRule `json:"rules,omitempty"`
19210	// Peerings - A collection of references to express route circuit peerings.
19211	Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"`
19212	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', 'Succeeded' and 'Failed'.
19213	ProvisioningState *string `json:"provisioningState,omitempty"`
19214}
19215
19216// MarshalJSON is the custom marshaler for RouteFilterPropertiesFormat.
19217func (rfpf RouteFilterPropertiesFormat) MarshalJSON() ([]byte, error) {
19218	objectMap := make(map[string]interface{})
19219	if rfpf.Rules != nil {
19220		objectMap["rules"] = rfpf.Rules
19221	}
19222	if rfpf.Peerings != nil {
19223		objectMap["peerings"] = rfpf.Peerings
19224	}
19225	return json.Marshal(objectMap)
19226}
19227
19228// RouteFilterRule route Filter Rule Resource
19229type RouteFilterRule struct {
19230	autorest.Response                `json:"-"`
19231	*RouteFilterRulePropertiesFormat `json:"properties,omitempty"`
19232	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
19233	Name *string `json:"name,omitempty"`
19234	// Location - Resource location.
19235	Location *string `json:"location,omitempty"`
19236	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
19237	Etag *string `json:"etag,omitempty"`
19238	// ID - Resource ID.
19239	ID *string `json:"id,omitempty"`
19240}
19241
19242// MarshalJSON is the custom marshaler for RouteFilterRule.
19243func (rfr RouteFilterRule) MarshalJSON() ([]byte, error) {
19244	objectMap := make(map[string]interface{})
19245	if rfr.RouteFilterRulePropertiesFormat != nil {
19246		objectMap["properties"] = rfr.RouteFilterRulePropertiesFormat
19247	}
19248	if rfr.Name != nil {
19249		objectMap["name"] = rfr.Name
19250	}
19251	if rfr.Location != nil {
19252		objectMap["location"] = rfr.Location
19253	}
19254	if rfr.ID != nil {
19255		objectMap["id"] = rfr.ID
19256	}
19257	return json.Marshal(objectMap)
19258}
19259
19260// UnmarshalJSON is the custom unmarshaler for RouteFilterRule struct.
19261func (rfr *RouteFilterRule) UnmarshalJSON(body []byte) error {
19262	var m map[string]*json.RawMessage
19263	err := json.Unmarshal(body, &m)
19264	if err != nil {
19265		return err
19266	}
19267	for k, v := range m {
19268		switch k {
19269		case "properties":
19270			if v != nil {
19271				var routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat
19272				err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat)
19273				if err != nil {
19274					return err
19275				}
19276				rfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat
19277			}
19278		case "name":
19279			if v != nil {
19280				var name string
19281				err = json.Unmarshal(*v, &name)
19282				if err != nil {
19283					return err
19284				}
19285				rfr.Name = &name
19286			}
19287		case "location":
19288			if v != nil {
19289				var location string
19290				err = json.Unmarshal(*v, &location)
19291				if err != nil {
19292					return err
19293				}
19294				rfr.Location = &location
19295			}
19296		case "etag":
19297			if v != nil {
19298				var etag string
19299				err = json.Unmarshal(*v, &etag)
19300				if err != nil {
19301					return err
19302				}
19303				rfr.Etag = &etag
19304			}
19305		case "id":
19306			if v != nil {
19307				var ID string
19308				err = json.Unmarshal(*v, &ID)
19309				if err != nil {
19310					return err
19311				}
19312				rfr.ID = &ID
19313			}
19314		}
19315	}
19316
19317	return nil
19318}
19319
19320// RouteFilterRuleListResult response for the ListRouteFilterRules API service call
19321type RouteFilterRuleListResult struct {
19322	autorest.Response `json:"-"`
19323	// Value - Gets a list of RouteFilterRules in a resource group.
19324	Value *[]RouteFilterRule `json:"value,omitempty"`
19325	// NextLink - The URL to get the next set of results.
19326	NextLink *string `json:"nextLink,omitempty"`
19327}
19328
19329// RouteFilterRuleListResultIterator provides access to a complete listing of RouteFilterRule values.
19330type RouteFilterRuleListResultIterator struct {
19331	i    int
19332	page RouteFilterRuleListResultPage
19333}
19334
19335// NextWithContext advances to the next value.  If there was an error making
19336// the request the iterator does not advance and the error is returned.
19337func (iter *RouteFilterRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
19338	if tracing.IsEnabled() {
19339		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultIterator.NextWithContext")
19340		defer func() {
19341			sc := -1
19342			if iter.Response().Response.Response != nil {
19343				sc = iter.Response().Response.Response.StatusCode
19344			}
19345			tracing.EndSpan(ctx, sc, err)
19346		}()
19347	}
19348	iter.i++
19349	if iter.i < len(iter.page.Values()) {
19350		return nil
19351	}
19352	err = iter.page.NextWithContext(ctx)
19353	if err != nil {
19354		iter.i--
19355		return err
19356	}
19357	iter.i = 0
19358	return nil
19359}
19360
19361// Next advances to the next value.  If there was an error making
19362// the request the iterator does not advance and the error is returned.
19363// Deprecated: Use NextWithContext() instead.
19364func (iter *RouteFilterRuleListResultIterator) Next() error {
19365	return iter.NextWithContext(context.Background())
19366}
19367
19368// NotDone returns true if the enumeration should be started or is not yet complete.
19369func (iter RouteFilterRuleListResultIterator) NotDone() bool {
19370	return iter.page.NotDone() && iter.i < len(iter.page.Values())
19371}
19372
19373// Response returns the raw server response from the last page request.
19374func (iter RouteFilterRuleListResultIterator) Response() RouteFilterRuleListResult {
19375	return iter.page.Response()
19376}
19377
19378// Value returns the current value or a zero-initialized value if the
19379// iterator has advanced beyond the end of the collection.
19380func (iter RouteFilterRuleListResultIterator) Value() RouteFilterRule {
19381	if !iter.page.NotDone() {
19382		return RouteFilterRule{}
19383	}
19384	return iter.page.Values()[iter.i]
19385}
19386
19387// Creates a new instance of the RouteFilterRuleListResultIterator type.
19388func NewRouteFilterRuleListResultIterator(page RouteFilterRuleListResultPage) RouteFilterRuleListResultIterator {
19389	return RouteFilterRuleListResultIterator{page: page}
19390}
19391
19392// IsEmpty returns true if the ListResult contains no values.
19393func (rfrlr RouteFilterRuleListResult) IsEmpty() bool {
19394	return rfrlr.Value == nil || len(*rfrlr.Value) == 0
19395}
19396
19397// hasNextLink returns true if the NextLink is not empty.
19398func (rfrlr RouteFilterRuleListResult) hasNextLink() bool {
19399	return rfrlr.NextLink != nil && len(*rfrlr.NextLink) != 0
19400}
19401
19402// routeFilterRuleListResultPreparer prepares a request to retrieve the next set of results.
19403// It returns nil if no more results exist.
19404func (rfrlr RouteFilterRuleListResult) routeFilterRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
19405	if !rfrlr.hasNextLink() {
19406		return nil, nil
19407	}
19408	return autorest.Prepare((&http.Request{}).WithContext(ctx),
19409		autorest.AsJSON(),
19410		autorest.AsGet(),
19411		autorest.WithBaseURL(to.String(rfrlr.NextLink)))
19412}
19413
19414// RouteFilterRuleListResultPage contains a page of RouteFilterRule values.
19415type RouteFilterRuleListResultPage struct {
19416	fn    func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)
19417	rfrlr RouteFilterRuleListResult
19418}
19419
19420// NextWithContext advances to the next page of values.  If there was an error making
19421// the request the page does not advance and the error is returned.
19422func (page *RouteFilterRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
19423	if tracing.IsEnabled() {
19424		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultPage.NextWithContext")
19425		defer func() {
19426			sc := -1
19427			if page.Response().Response.Response != nil {
19428				sc = page.Response().Response.Response.StatusCode
19429			}
19430			tracing.EndSpan(ctx, sc, err)
19431		}()
19432	}
19433	for {
19434		next, err := page.fn(ctx, page.rfrlr)
19435		if err != nil {
19436			return err
19437		}
19438		page.rfrlr = next
19439		if !next.hasNextLink() || !next.IsEmpty() {
19440			break
19441		}
19442	}
19443	return nil
19444}
19445
19446// Next advances to the next page of values.  If there was an error making
19447// the request the page does not advance and the error is returned.
19448// Deprecated: Use NextWithContext() instead.
19449func (page *RouteFilterRuleListResultPage) Next() error {
19450	return page.NextWithContext(context.Background())
19451}
19452
19453// NotDone returns true if the page enumeration should be started or is not yet complete.
19454func (page RouteFilterRuleListResultPage) NotDone() bool {
19455	return !page.rfrlr.IsEmpty()
19456}
19457
19458// Response returns the raw server response from the last page request.
19459func (page RouteFilterRuleListResultPage) Response() RouteFilterRuleListResult {
19460	return page.rfrlr
19461}
19462
19463// Values returns the slice of values for the current page or nil if there are no values.
19464func (page RouteFilterRuleListResultPage) Values() []RouteFilterRule {
19465	if page.rfrlr.IsEmpty() {
19466		return nil
19467	}
19468	return *page.rfrlr.Value
19469}
19470
19471// Creates a new instance of the RouteFilterRuleListResultPage type.
19472func NewRouteFilterRuleListResultPage(cur RouteFilterRuleListResult, getNextPage func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)) RouteFilterRuleListResultPage {
19473	return RouteFilterRuleListResultPage{
19474		fn:    getNextPage,
19475		rfrlr: cur,
19476	}
19477}
19478
19479// RouteFilterRulePropertiesFormat route Filter Rule Resource
19480type RouteFilterRulePropertiesFormat struct {
19481	// Access - The access type of the rule. Valid values are: 'Allow', 'Deny'. Possible values include: 'Allow', 'Deny'
19482	Access Access `json:"access,omitempty"`
19483	// RouteFilterRuleType - The rule type of the rule. Valid value is: 'Community'
19484	RouteFilterRuleType *string `json:"routeFilterRuleType,omitempty"`
19485	// Communities - The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020']
19486	Communities *[]string `json:"communities,omitempty"`
19487	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', 'Succeeded' and 'Failed'.
19488	ProvisioningState *string `json:"provisioningState,omitempty"`
19489}
19490
19491// MarshalJSON is the custom marshaler for RouteFilterRulePropertiesFormat.
19492func (rfrpf RouteFilterRulePropertiesFormat) MarshalJSON() ([]byte, error) {
19493	objectMap := make(map[string]interface{})
19494	if rfrpf.Access != "" {
19495		objectMap["access"] = rfrpf.Access
19496	}
19497	if rfrpf.RouteFilterRuleType != nil {
19498		objectMap["routeFilterRuleType"] = rfrpf.RouteFilterRuleType
19499	}
19500	if rfrpf.Communities != nil {
19501		objectMap["communities"] = rfrpf.Communities
19502	}
19503	return json.Marshal(objectMap)
19504}
19505
19506// RouteFilterRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
19507// long-running operation.
19508type RouteFilterRulesCreateOrUpdateFuture struct {
19509	azure.FutureAPI
19510	// Result returns the result of the asynchronous operation.
19511	// If the operation has not completed it will return an error.
19512	Result func(RouteFilterRulesClient) (RouteFilterRule, error)
19513}
19514
19515// RouteFilterRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
19516// operation.
19517type RouteFilterRulesDeleteFuture struct {
19518	azure.FutureAPI
19519	// Result returns the result of the asynchronous operation.
19520	// If the operation has not completed it will return an error.
19521	Result func(RouteFilterRulesClient) (autorest.Response, error)
19522}
19523
19524// RouteFilterRulesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
19525// operation.
19526type RouteFilterRulesUpdateFuture struct {
19527	azure.FutureAPI
19528	// Result returns the result of the asynchronous operation.
19529	// If the operation has not completed it will return an error.
19530	Result func(RouteFilterRulesClient) (RouteFilterRule, error)
19531}
19532
19533// RouteFiltersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
19534// long-running operation.
19535type RouteFiltersCreateOrUpdateFuture struct {
19536	azure.FutureAPI
19537	// Result returns the result of the asynchronous operation.
19538	// If the operation has not completed it will return an error.
19539	Result func(RouteFiltersClient) (RouteFilter, error)
19540}
19541
19542// RouteFiltersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
19543// operation.
19544type RouteFiltersDeleteFuture struct {
19545	azure.FutureAPI
19546	// Result returns the result of the asynchronous operation.
19547	// If the operation has not completed it will return an error.
19548	Result func(RouteFiltersClient) (autorest.Response, error)
19549}
19550
19551// RouteFiltersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
19552// operation.
19553type RouteFiltersUpdateFuture struct {
19554	azure.FutureAPI
19555	// Result returns the result of the asynchronous operation.
19556	// If the operation has not completed it will return an error.
19557	Result func(RouteFiltersClient) (RouteFilter, error)
19558}
19559
19560// RouteListResult response for the ListRoute API service call
19561type RouteListResult struct {
19562	autorest.Response `json:"-"`
19563	// Value - Gets a list of routes in a resource group.
19564	Value *[]Route `json:"value,omitempty"`
19565	// NextLink - The URL to get the next set of results.
19566	NextLink *string `json:"nextLink,omitempty"`
19567}
19568
19569// RouteListResultIterator provides access to a complete listing of Route values.
19570type RouteListResultIterator struct {
19571	i    int
19572	page RouteListResultPage
19573}
19574
19575// NextWithContext advances to the next value.  If there was an error making
19576// the request the iterator does not advance and the error is returned.
19577func (iter *RouteListResultIterator) NextWithContext(ctx context.Context) (err error) {
19578	if tracing.IsEnabled() {
19579		ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultIterator.NextWithContext")
19580		defer func() {
19581			sc := -1
19582			if iter.Response().Response.Response != nil {
19583				sc = iter.Response().Response.Response.StatusCode
19584			}
19585			tracing.EndSpan(ctx, sc, err)
19586		}()
19587	}
19588	iter.i++
19589	if iter.i < len(iter.page.Values()) {
19590		return nil
19591	}
19592	err = iter.page.NextWithContext(ctx)
19593	if err != nil {
19594		iter.i--
19595		return err
19596	}
19597	iter.i = 0
19598	return nil
19599}
19600
19601// Next advances to the next value.  If there was an error making
19602// the request the iterator does not advance and the error is returned.
19603// Deprecated: Use NextWithContext() instead.
19604func (iter *RouteListResultIterator) Next() error {
19605	return iter.NextWithContext(context.Background())
19606}
19607
19608// NotDone returns true if the enumeration should be started or is not yet complete.
19609func (iter RouteListResultIterator) NotDone() bool {
19610	return iter.page.NotDone() && iter.i < len(iter.page.Values())
19611}
19612
19613// Response returns the raw server response from the last page request.
19614func (iter RouteListResultIterator) Response() RouteListResult {
19615	return iter.page.Response()
19616}
19617
19618// Value returns the current value or a zero-initialized value if the
19619// iterator has advanced beyond the end of the collection.
19620func (iter RouteListResultIterator) Value() Route {
19621	if !iter.page.NotDone() {
19622		return Route{}
19623	}
19624	return iter.page.Values()[iter.i]
19625}
19626
19627// Creates a new instance of the RouteListResultIterator type.
19628func NewRouteListResultIterator(page RouteListResultPage) RouteListResultIterator {
19629	return RouteListResultIterator{page: page}
19630}
19631
19632// IsEmpty returns true if the ListResult contains no values.
19633func (rlr RouteListResult) IsEmpty() bool {
19634	return rlr.Value == nil || len(*rlr.Value) == 0
19635}
19636
19637// hasNextLink returns true if the NextLink is not empty.
19638func (rlr RouteListResult) hasNextLink() bool {
19639	return rlr.NextLink != nil && len(*rlr.NextLink) != 0
19640}
19641
19642// routeListResultPreparer prepares a request to retrieve the next set of results.
19643// It returns nil if no more results exist.
19644func (rlr RouteListResult) routeListResultPreparer(ctx context.Context) (*http.Request, error) {
19645	if !rlr.hasNextLink() {
19646		return nil, nil
19647	}
19648	return autorest.Prepare((&http.Request{}).WithContext(ctx),
19649		autorest.AsJSON(),
19650		autorest.AsGet(),
19651		autorest.WithBaseURL(to.String(rlr.NextLink)))
19652}
19653
19654// RouteListResultPage contains a page of Route values.
19655type RouteListResultPage struct {
19656	fn  func(context.Context, RouteListResult) (RouteListResult, error)
19657	rlr RouteListResult
19658}
19659
19660// NextWithContext advances to the next page of values.  If there was an error making
19661// the request the page does not advance and the error is returned.
19662func (page *RouteListResultPage) NextWithContext(ctx context.Context) (err error) {
19663	if tracing.IsEnabled() {
19664		ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultPage.NextWithContext")
19665		defer func() {
19666			sc := -1
19667			if page.Response().Response.Response != nil {
19668				sc = page.Response().Response.Response.StatusCode
19669			}
19670			tracing.EndSpan(ctx, sc, err)
19671		}()
19672	}
19673	for {
19674		next, err := page.fn(ctx, page.rlr)
19675		if err != nil {
19676			return err
19677		}
19678		page.rlr = next
19679		if !next.hasNextLink() || !next.IsEmpty() {
19680			break
19681		}
19682	}
19683	return nil
19684}
19685
19686// Next advances to the next page of values.  If there was an error making
19687// the request the page does not advance and the error is returned.
19688// Deprecated: Use NextWithContext() instead.
19689func (page *RouteListResultPage) Next() error {
19690	return page.NextWithContext(context.Background())
19691}
19692
19693// NotDone returns true if the page enumeration should be started or is not yet complete.
19694func (page RouteListResultPage) NotDone() bool {
19695	return !page.rlr.IsEmpty()
19696}
19697
19698// Response returns the raw server response from the last page request.
19699func (page RouteListResultPage) Response() RouteListResult {
19700	return page.rlr
19701}
19702
19703// Values returns the slice of values for the current page or nil if there are no values.
19704func (page RouteListResultPage) Values() []Route {
19705	if page.rlr.IsEmpty() {
19706		return nil
19707	}
19708	return *page.rlr.Value
19709}
19710
19711// Creates a new instance of the RouteListResultPage type.
19712func NewRouteListResultPage(cur RouteListResult, getNextPage func(context.Context, RouteListResult) (RouteListResult, error)) RouteListResultPage {
19713	return RouteListResultPage{
19714		fn:  getNextPage,
19715		rlr: cur,
19716	}
19717}
19718
19719// RoutePropertiesFormat route resource
19720type RoutePropertiesFormat struct {
19721	// AddressPrefix - The destination CIDR to which the route applies.
19722	AddressPrefix *string `json:"addressPrefix,omitempty"`
19723	// NextHopType - The type of Azure hop the packet should be sent to. Possible values are: 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', and 'None'. Possible values include: 'RouteNextHopTypeVirtualNetworkGateway', 'RouteNextHopTypeVnetLocal', 'RouteNextHopTypeInternet', 'RouteNextHopTypeVirtualAppliance', 'RouteNextHopTypeNone'
19724	NextHopType RouteNextHopType `json:"nextHopType,omitempty"`
19725	// NextHopIPAddress - The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance.
19726	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
19727	// ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
19728	ProvisioningState *string `json:"provisioningState,omitempty"`
19729}
19730
19731// RoutesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
19732// operation.
19733type RoutesCreateOrUpdateFuture struct {
19734	azure.FutureAPI
19735	// Result returns the result of the asynchronous operation.
19736	// If the operation has not completed it will return an error.
19737	Result func(RoutesClient) (Route, error)
19738}
19739
19740// RoutesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
19741type RoutesDeleteFuture struct {
19742	azure.FutureAPI
19743	// Result returns the result of the asynchronous operation.
19744	// If the operation has not completed it will return an error.
19745	Result func(RoutesClient) (autorest.Response, error)
19746}
19747
19748// RouteTable route table resource.
19749type RouteTable struct {
19750	autorest.Response `json:"-"`
19751	// RouteTablePropertiesFormat - Properties of the route table.
19752	*RouteTablePropertiesFormat `json:"properties,omitempty"`
19753	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
19754	Etag *string `json:"etag,omitempty"`
19755	// ID - Resource ID.
19756	ID *string `json:"id,omitempty"`
19757	// Name - READ-ONLY; Resource name.
19758	Name *string `json:"name,omitempty"`
19759	// Type - READ-ONLY; Resource type.
19760	Type *string `json:"type,omitempty"`
19761	// Location - Resource location.
19762	Location *string `json:"location,omitempty"`
19763	// Tags - Resource tags.
19764	Tags map[string]*string `json:"tags"`
19765}
19766
19767// MarshalJSON is the custom marshaler for RouteTable.
19768func (rt RouteTable) MarshalJSON() ([]byte, error) {
19769	objectMap := make(map[string]interface{})
19770	if rt.RouteTablePropertiesFormat != nil {
19771		objectMap["properties"] = rt.RouteTablePropertiesFormat
19772	}
19773	if rt.Etag != nil {
19774		objectMap["etag"] = rt.Etag
19775	}
19776	if rt.ID != nil {
19777		objectMap["id"] = rt.ID
19778	}
19779	if rt.Location != nil {
19780		objectMap["location"] = rt.Location
19781	}
19782	if rt.Tags != nil {
19783		objectMap["tags"] = rt.Tags
19784	}
19785	return json.Marshal(objectMap)
19786}
19787
19788// UnmarshalJSON is the custom unmarshaler for RouteTable struct.
19789func (rt *RouteTable) UnmarshalJSON(body []byte) error {
19790	var m map[string]*json.RawMessage
19791	err := json.Unmarshal(body, &m)
19792	if err != nil {
19793		return err
19794	}
19795	for k, v := range m {
19796		switch k {
19797		case "properties":
19798			if v != nil {
19799				var routeTablePropertiesFormat RouteTablePropertiesFormat
19800				err = json.Unmarshal(*v, &routeTablePropertiesFormat)
19801				if err != nil {
19802					return err
19803				}
19804				rt.RouteTablePropertiesFormat = &routeTablePropertiesFormat
19805			}
19806		case "etag":
19807			if v != nil {
19808				var etag string
19809				err = json.Unmarshal(*v, &etag)
19810				if err != nil {
19811					return err
19812				}
19813				rt.Etag = &etag
19814			}
19815		case "id":
19816			if v != nil {
19817				var ID string
19818				err = json.Unmarshal(*v, &ID)
19819				if err != nil {
19820					return err
19821				}
19822				rt.ID = &ID
19823			}
19824		case "name":
19825			if v != nil {
19826				var name string
19827				err = json.Unmarshal(*v, &name)
19828				if err != nil {
19829					return err
19830				}
19831				rt.Name = &name
19832			}
19833		case "type":
19834			if v != nil {
19835				var typeVar string
19836				err = json.Unmarshal(*v, &typeVar)
19837				if err != nil {
19838					return err
19839				}
19840				rt.Type = &typeVar
19841			}
19842		case "location":
19843			if v != nil {
19844				var location string
19845				err = json.Unmarshal(*v, &location)
19846				if err != nil {
19847					return err
19848				}
19849				rt.Location = &location
19850			}
19851		case "tags":
19852			if v != nil {
19853				var tags map[string]*string
19854				err = json.Unmarshal(*v, &tags)
19855				if err != nil {
19856					return err
19857				}
19858				rt.Tags = tags
19859			}
19860		}
19861	}
19862
19863	return nil
19864}
19865
19866// RouteTableListResult response for the ListRouteTable API service call.
19867type RouteTableListResult struct {
19868	autorest.Response `json:"-"`
19869	// Value - Gets a list of route tables in a resource group.
19870	Value *[]RouteTable `json:"value,omitempty"`
19871	// NextLink - The URL to get the next set of results.
19872	NextLink *string `json:"nextLink,omitempty"`
19873}
19874
19875// RouteTableListResultIterator provides access to a complete listing of RouteTable values.
19876type RouteTableListResultIterator struct {
19877	i    int
19878	page RouteTableListResultPage
19879}
19880
19881// NextWithContext advances to the next value.  If there was an error making
19882// the request the iterator does not advance and the error is returned.
19883func (iter *RouteTableListResultIterator) NextWithContext(ctx context.Context) (err error) {
19884	if tracing.IsEnabled() {
19885		ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultIterator.NextWithContext")
19886		defer func() {
19887			sc := -1
19888			if iter.Response().Response.Response != nil {
19889				sc = iter.Response().Response.Response.StatusCode
19890			}
19891			tracing.EndSpan(ctx, sc, err)
19892		}()
19893	}
19894	iter.i++
19895	if iter.i < len(iter.page.Values()) {
19896		return nil
19897	}
19898	err = iter.page.NextWithContext(ctx)
19899	if err != nil {
19900		iter.i--
19901		return err
19902	}
19903	iter.i = 0
19904	return nil
19905}
19906
19907// Next advances to the next value.  If there was an error making
19908// the request the iterator does not advance and the error is returned.
19909// Deprecated: Use NextWithContext() instead.
19910func (iter *RouteTableListResultIterator) Next() error {
19911	return iter.NextWithContext(context.Background())
19912}
19913
19914// NotDone returns true if the enumeration should be started or is not yet complete.
19915func (iter RouteTableListResultIterator) NotDone() bool {
19916	return iter.page.NotDone() && iter.i < len(iter.page.Values())
19917}
19918
19919// Response returns the raw server response from the last page request.
19920func (iter RouteTableListResultIterator) Response() RouteTableListResult {
19921	return iter.page.Response()
19922}
19923
19924// Value returns the current value or a zero-initialized value if the
19925// iterator has advanced beyond the end of the collection.
19926func (iter RouteTableListResultIterator) Value() RouteTable {
19927	if !iter.page.NotDone() {
19928		return RouteTable{}
19929	}
19930	return iter.page.Values()[iter.i]
19931}
19932
19933// Creates a new instance of the RouteTableListResultIterator type.
19934func NewRouteTableListResultIterator(page RouteTableListResultPage) RouteTableListResultIterator {
19935	return RouteTableListResultIterator{page: page}
19936}
19937
19938// IsEmpty returns true if the ListResult contains no values.
19939func (rtlr RouteTableListResult) IsEmpty() bool {
19940	return rtlr.Value == nil || len(*rtlr.Value) == 0
19941}
19942
19943// hasNextLink returns true if the NextLink is not empty.
19944func (rtlr RouteTableListResult) hasNextLink() bool {
19945	return rtlr.NextLink != nil && len(*rtlr.NextLink) != 0
19946}
19947
19948// routeTableListResultPreparer prepares a request to retrieve the next set of results.
19949// It returns nil if no more results exist.
19950func (rtlr RouteTableListResult) routeTableListResultPreparer(ctx context.Context) (*http.Request, error) {
19951	if !rtlr.hasNextLink() {
19952		return nil, nil
19953	}
19954	return autorest.Prepare((&http.Request{}).WithContext(ctx),
19955		autorest.AsJSON(),
19956		autorest.AsGet(),
19957		autorest.WithBaseURL(to.String(rtlr.NextLink)))
19958}
19959
19960// RouteTableListResultPage contains a page of RouteTable values.
19961type RouteTableListResultPage struct {
19962	fn   func(context.Context, RouteTableListResult) (RouteTableListResult, error)
19963	rtlr RouteTableListResult
19964}
19965
19966// NextWithContext advances to the next page of values.  If there was an error making
19967// the request the page does not advance and the error is returned.
19968func (page *RouteTableListResultPage) NextWithContext(ctx context.Context) (err error) {
19969	if tracing.IsEnabled() {
19970		ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultPage.NextWithContext")
19971		defer func() {
19972			sc := -1
19973			if page.Response().Response.Response != nil {
19974				sc = page.Response().Response.Response.StatusCode
19975			}
19976			tracing.EndSpan(ctx, sc, err)
19977		}()
19978	}
19979	for {
19980		next, err := page.fn(ctx, page.rtlr)
19981		if err != nil {
19982			return err
19983		}
19984		page.rtlr = next
19985		if !next.hasNextLink() || !next.IsEmpty() {
19986			break
19987		}
19988	}
19989	return nil
19990}
19991
19992// Next advances to the next page of values.  If there was an error making
19993// the request the page does not advance and the error is returned.
19994// Deprecated: Use NextWithContext() instead.
19995func (page *RouteTableListResultPage) Next() error {
19996	return page.NextWithContext(context.Background())
19997}
19998
19999// NotDone returns true if the page enumeration should be started or is not yet complete.
20000func (page RouteTableListResultPage) NotDone() bool {
20001	return !page.rtlr.IsEmpty()
20002}
20003
20004// Response returns the raw server response from the last page request.
20005func (page RouteTableListResultPage) Response() RouteTableListResult {
20006	return page.rtlr
20007}
20008
20009// Values returns the slice of values for the current page or nil if there are no values.
20010func (page RouteTableListResultPage) Values() []RouteTable {
20011	if page.rtlr.IsEmpty() {
20012		return nil
20013	}
20014	return *page.rtlr.Value
20015}
20016
20017// Creates a new instance of the RouteTableListResultPage type.
20018func NewRouteTableListResultPage(cur RouteTableListResult, getNextPage func(context.Context, RouteTableListResult) (RouteTableListResult, error)) RouteTableListResultPage {
20019	return RouteTableListResultPage{
20020		fn:   getNextPage,
20021		rtlr: cur,
20022	}
20023}
20024
20025// RouteTablePropertiesFormat route Table resource
20026type RouteTablePropertiesFormat struct {
20027	// Routes - Collection of routes contained within a route table.
20028	Routes *[]Route `json:"routes,omitempty"`
20029	// Subnets - READ-ONLY; A collection of references to subnets.
20030	Subnets *[]Subnet `json:"subnets,omitempty"`
20031	// DisableBgpRoutePropagation - Gets or sets whether to disable the routes learned by BGP on that route table. True means disable.
20032	DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"`
20033	// ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
20034	ProvisioningState *string `json:"provisioningState,omitempty"`
20035}
20036
20037// MarshalJSON is the custom marshaler for RouteTablePropertiesFormat.
20038func (rtpf RouteTablePropertiesFormat) MarshalJSON() ([]byte, error) {
20039	objectMap := make(map[string]interface{})
20040	if rtpf.Routes != nil {
20041		objectMap["routes"] = rtpf.Routes
20042	}
20043	if rtpf.DisableBgpRoutePropagation != nil {
20044		objectMap["disableBgpRoutePropagation"] = rtpf.DisableBgpRoutePropagation
20045	}
20046	if rtpf.ProvisioningState != nil {
20047		objectMap["provisioningState"] = rtpf.ProvisioningState
20048	}
20049	return json.Marshal(objectMap)
20050}
20051
20052// RouteTablesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
20053// long-running operation.
20054type RouteTablesCreateOrUpdateFuture struct {
20055	azure.FutureAPI
20056	// Result returns the result of the asynchronous operation.
20057	// If the operation has not completed it will return an error.
20058	Result func(RouteTablesClient) (RouteTable, error)
20059}
20060
20061// RouteTablesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
20062// operation.
20063type RouteTablesDeleteFuture struct {
20064	azure.FutureAPI
20065	// Result returns the result of the asynchronous operation.
20066	// If the operation has not completed it will return an error.
20067	Result func(RouteTablesClient) (autorest.Response, error)
20068}
20069
20070// RouteTablesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
20071// operation.
20072type RouteTablesUpdateTagsFuture struct {
20073	azure.FutureAPI
20074	// Result returns the result of the asynchronous operation.
20075	// If the operation has not completed it will return an error.
20076	Result func(RouteTablesClient) (RouteTable, error)
20077}
20078
20079// SecurityGroup networkSecurityGroup resource.
20080type SecurityGroup struct {
20081	autorest.Response `json:"-"`
20082	// SecurityGroupPropertiesFormat - Properties of the network security group
20083	*SecurityGroupPropertiesFormat `json:"properties,omitempty"`
20084	// Etag - A unique read-only string that changes whenever the resource is updated.
20085	Etag *string `json:"etag,omitempty"`
20086	// ID - Resource ID.
20087	ID *string `json:"id,omitempty"`
20088	// Name - READ-ONLY; Resource name.
20089	Name *string `json:"name,omitempty"`
20090	// Type - READ-ONLY; Resource type.
20091	Type *string `json:"type,omitempty"`
20092	// Location - Resource location.
20093	Location *string `json:"location,omitempty"`
20094	// Tags - Resource tags.
20095	Tags map[string]*string `json:"tags"`
20096}
20097
20098// MarshalJSON is the custom marshaler for SecurityGroup.
20099func (sg SecurityGroup) MarshalJSON() ([]byte, error) {
20100	objectMap := make(map[string]interface{})
20101	if sg.SecurityGroupPropertiesFormat != nil {
20102		objectMap["properties"] = sg.SecurityGroupPropertiesFormat
20103	}
20104	if sg.Etag != nil {
20105		objectMap["etag"] = sg.Etag
20106	}
20107	if sg.ID != nil {
20108		objectMap["id"] = sg.ID
20109	}
20110	if sg.Location != nil {
20111		objectMap["location"] = sg.Location
20112	}
20113	if sg.Tags != nil {
20114		objectMap["tags"] = sg.Tags
20115	}
20116	return json.Marshal(objectMap)
20117}
20118
20119// UnmarshalJSON is the custom unmarshaler for SecurityGroup struct.
20120func (sg *SecurityGroup) UnmarshalJSON(body []byte) error {
20121	var m map[string]*json.RawMessage
20122	err := json.Unmarshal(body, &m)
20123	if err != nil {
20124		return err
20125	}
20126	for k, v := range m {
20127		switch k {
20128		case "properties":
20129			if v != nil {
20130				var securityGroupPropertiesFormat SecurityGroupPropertiesFormat
20131				err = json.Unmarshal(*v, &securityGroupPropertiesFormat)
20132				if err != nil {
20133					return err
20134				}
20135				sg.SecurityGroupPropertiesFormat = &securityGroupPropertiesFormat
20136			}
20137		case "etag":
20138			if v != nil {
20139				var etag string
20140				err = json.Unmarshal(*v, &etag)
20141				if err != nil {
20142					return err
20143				}
20144				sg.Etag = &etag
20145			}
20146		case "id":
20147			if v != nil {
20148				var ID string
20149				err = json.Unmarshal(*v, &ID)
20150				if err != nil {
20151					return err
20152				}
20153				sg.ID = &ID
20154			}
20155		case "name":
20156			if v != nil {
20157				var name string
20158				err = json.Unmarshal(*v, &name)
20159				if err != nil {
20160					return err
20161				}
20162				sg.Name = &name
20163			}
20164		case "type":
20165			if v != nil {
20166				var typeVar string
20167				err = json.Unmarshal(*v, &typeVar)
20168				if err != nil {
20169					return err
20170				}
20171				sg.Type = &typeVar
20172			}
20173		case "location":
20174			if v != nil {
20175				var location string
20176				err = json.Unmarshal(*v, &location)
20177				if err != nil {
20178					return err
20179				}
20180				sg.Location = &location
20181			}
20182		case "tags":
20183			if v != nil {
20184				var tags map[string]*string
20185				err = json.Unmarshal(*v, &tags)
20186				if err != nil {
20187					return err
20188				}
20189				sg.Tags = tags
20190			}
20191		}
20192	}
20193
20194	return nil
20195}
20196
20197// SecurityGroupListResult response for ListNetworkSecurityGroups API service call.
20198type SecurityGroupListResult struct {
20199	autorest.Response `json:"-"`
20200	// Value - A list of NetworkSecurityGroup resources.
20201	Value *[]SecurityGroup `json:"value,omitempty"`
20202	// NextLink - The URL to get the next set of results.
20203	NextLink *string `json:"nextLink,omitempty"`
20204}
20205
20206// SecurityGroupListResultIterator provides access to a complete listing of SecurityGroup values.
20207type SecurityGroupListResultIterator struct {
20208	i    int
20209	page SecurityGroupListResultPage
20210}
20211
20212// NextWithContext advances to the next value.  If there was an error making
20213// the request the iterator does not advance and the error is returned.
20214func (iter *SecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
20215	if tracing.IsEnabled() {
20216		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultIterator.NextWithContext")
20217		defer func() {
20218			sc := -1
20219			if iter.Response().Response.Response != nil {
20220				sc = iter.Response().Response.Response.StatusCode
20221			}
20222			tracing.EndSpan(ctx, sc, err)
20223		}()
20224	}
20225	iter.i++
20226	if iter.i < len(iter.page.Values()) {
20227		return nil
20228	}
20229	err = iter.page.NextWithContext(ctx)
20230	if err != nil {
20231		iter.i--
20232		return err
20233	}
20234	iter.i = 0
20235	return nil
20236}
20237
20238// Next advances to the next value.  If there was an error making
20239// the request the iterator does not advance and the error is returned.
20240// Deprecated: Use NextWithContext() instead.
20241func (iter *SecurityGroupListResultIterator) Next() error {
20242	return iter.NextWithContext(context.Background())
20243}
20244
20245// NotDone returns true if the enumeration should be started or is not yet complete.
20246func (iter SecurityGroupListResultIterator) NotDone() bool {
20247	return iter.page.NotDone() && iter.i < len(iter.page.Values())
20248}
20249
20250// Response returns the raw server response from the last page request.
20251func (iter SecurityGroupListResultIterator) Response() SecurityGroupListResult {
20252	return iter.page.Response()
20253}
20254
20255// Value returns the current value or a zero-initialized value if the
20256// iterator has advanced beyond the end of the collection.
20257func (iter SecurityGroupListResultIterator) Value() SecurityGroup {
20258	if !iter.page.NotDone() {
20259		return SecurityGroup{}
20260	}
20261	return iter.page.Values()[iter.i]
20262}
20263
20264// Creates a new instance of the SecurityGroupListResultIterator type.
20265func NewSecurityGroupListResultIterator(page SecurityGroupListResultPage) SecurityGroupListResultIterator {
20266	return SecurityGroupListResultIterator{page: page}
20267}
20268
20269// IsEmpty returns true if the ListResult contains no values.
20270func (sglr SecurityGroupListResult) IsEmpty() bool {
20271	return sglr.Value == nil || len(*sglr.Value) == 0
20272}
20273
20274// hasNextLink returns true if the NextLink is not empty.
20275func (sglr SecurityGroupListResult) hasNextLink() bool {
20276	return sglr.NextLink != nil && len(*sglr.NextLink) != 0
20277}
20278
20279// securityGroupListResultPreparer prepares a request to retrieve the next set of results.
20280// It returns nil if no more results exist.
20281func (sglr SecurityGroupListResult) securityGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
20282	if !sglr.hasNextLink() {
20283		return nil, nil
20284	}
20285	return autorest.Prepare((&http.Request{}).WithContext(ctx),
20286		autorest.AsJSON(),
20287		autorest.AsGet(),
20288		autorest.WithBaseURL(to.String(sglr.NextLink)))
20289}
20290
20291// SecurityGroupListResultPage contains a page of SecurityGroup values.
20292type SecurityGroupListResultPage struct {
20293	fn   func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)
20294	sglr SecurityGroupListResult
20295}
20296
20297// NextWithContext advances to the next page of values.  If there was an error making
20298// the request the page does not advance and the error is returned.
20299func (page *SecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
20300	if tracing.IsEnabled() {
20301		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultPage.NextWithContext")
20302		defer func() {
20303			sc := -1
20304			if page.Response().Response.Response != nil {
20305				sc = page.Response().Response.Response.StatusCode
20306			}
20307			tracing.EndSpan(ctx, sc, err)
20308		}()
20309	}
20310	for {
20311		next, err := page.fn(ctx, page.sglr)
20312		if err != nil {
20313			return err
20314		}
20315		page.sglr = next
20316		if !next.hasNextLink() || !next.IsEmpty() {
20317			break
20318		}
20319	}
20320	return nil
20321}
20322
20323// Next advances to the next page of values.  If there was an error making
20324// the request the page does not advance and the error is returned.
20325// Deprecated: Use NextWithContext() instead.
20326func (page *SecurityGroupListResultPage) Next() error {
20327	return page.NextWithContext(context.Background())
20328}
20329
20330// NotDone returns true if the page enumeration should be started or is not yet complete.
20331func (page SecurityGroupListResultPage) NotDone() bool {
20332	return !page.sglr.IsEmpty()
20333}
20334
20335// Response returns the raw server response from the last page request.
20336func (page SecurityGroupListResultPage) Response() SecurityGroupListResult {
20337	return page.sglr
20338}
20339
20340// Values returns the slice of values for the current page or nil if there are no values.
20341func (page SecurityGroupListResultPage) Values() []SecurityGroup {
20342	if page.sglr.IsEmpty() {
20343		return nil
20344	}
20345	return *page.sglr.Value
20346}
20347
20348// Creates a new instance of the SecurityGroupListResultPage type.
20349func NewSecurityGroupListResultPage(cur SecurityGroupListResult, getNextPage func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)) SecurityGroupListResultPage {
20350	return SecurityGroupListResultPage{
20351		fn:   getNextPage,
20352		sglr: cur,
20353	}
20354}
20355
20356// SecurityGroupNetworkInterface network interface and all its associated security rules.
20357type SecurityGroupNetworkInterface struct {
20358	// ID - ID of the network interface.
20359	ID                       *string                   `json:"id,omitempty"`
20360	SecurityRuleAssociations *SecurityRuleAssociations `json:"securityRuleAssociations,omitempty"`
20361}
20362
20363// SecurityGroupPropertiesFormat network Security Group resource.
20364type SecurityGroupPropertiesFormat struct {
20365	// SecurityRules - A collection of security rules of the network security group.
20366	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
20367	// DefaultSecurityRules - The default security rules of network security group.
20368	DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"`
20369	// NetworkInterfaces - READ-ONLY; A collection of references to network interfaces.
20370	NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"`
20371	// Subnets - READ-ONLY; A collection of references to subnets.
20372	Subnets *[]Subnet `json:"subnets,omitempty"`
20373	// ResourceGUID - The resource GUID property of the network security group resource.
20374	ResourceGUID *string `json:"resourceGuid,omitempty"`
20375	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
20376	ProvisioningState *string `json:"provisioningState,omitempty"`
20377}
20378
20379// MarshalJSON is the custom marshaler for SecurityGroupPropertiesFormat.
20380func (sgpf SecurityGroupPropertiesFormat) MarshalJSON() ([]byte, error) {
20381	objectMap := make(map[string]interface{})
20382	if sgpf.SecurityRules != nil {
20383		objectMap["securityRules"] = sgpf.SecurityRules
20384	}
20385	if sgpf.DefaultSecurityRules != nil {
20386		objectMap["defaultSecurityRules"] = sgpf.DefaultSecurityRules
20387	}
20388	if sgpf.ResourceGUID != nil {
20389		objectMap["resourceGuid"] = sgpf.ResourceGUID
20390	}
20391	if sgpf.ProvisioningState != nil {
20392		objectMap["provisioningState"] = sgpf.ProvisioningState
20393	}
20394	return json.Marshal(objectMap)
20395}
20396
20397// SecurityGroupResult network configuration diagnostic result corresponded provided traffic query.
20398type SecurityGroupResult struct {
20399	// SecurityRuleAccessResult - The network traffic is allowed or denied. Possible values are 'Allow' and 'Deny'. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
20400	SecurityRuleAccessResult SecurityRuleAccess `json:"securityRuleAccessResult,omitempty"`
20401	// EvaluatedNetworkSecurityGroups - READ-ONLY; List of results network security groups diagnostic.
20402	EvaluatedNetworkSecurityGroups *[]EvaluatedNetworkSecurityGroup `json:"evaluatedNetworkSecurityGroups,omitempty"`
20403}
20404
20405// MarshalJSON is the custom marshaler for SecurityGroupResult.
20406func (sgr SecurityGroupResult) MarshalJSON() ([]byte, error) {
20407	objectMap := make(map[string]interface{})
20408	if sgr.SecurityRuleAccessResult != "" {
20409		objectMap["securityRuleAccessResult"] = sgr.SecurityRuleAccessResult
20410	}
20411	return json.Marshal(objectMap)
20412}
20413
20414// SecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
20415// long-running operation.
20416type SecurityGroupsCreateOrUpdateFuture struct {
20417	azure.FutureAPI
20418	// Result returns the result of the asynchronous operation.
20419	// If the operation has not completed it will return an error.
20420	Result func(SecurityGroupsClient) (SecurityGroup, error)
20421}
20422
20423// SecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
20424// operation.
20425type SecurityGroupsDeleteFuture struct {
20426	azure.FutureAPI
20427	// Result returns the result of the asynchronous operation.
20428	// If the operation has not completed it will return an error.
20429	Result func(SecurityGroupsClient) (autorest.Response, error)
20430}
20431
20432// SecurityGroupsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
20433// long-running operation.
20434type SecurityGroupsUpdateTagsFuture struct {
20435	azure.FutureAPI
20436	// Result returns the result of the asynchronous operation.
20437	// If the operation has not completed it will return an error.
20438	Result func(SecurityGroupsClient) (SecurityGroup, error)
20439}
20440
20441// SecurityGroupViewParameters parameters that define the VM to check security groups for.
20442type SecurityGroupViewParameters struct {
20443	// TargetResourceID - ID of the target VM.
20444	TargetResourceID *string `json:"targetResourceId,omitempty"`
20445}
20446
20447// SecurityGroupViewResult the information about security rules applied to the specified VM.
20448type SecurityGroupViewResult struct {
20449	autorest.Response `json:"-"`
20450	// NetworkInterfaces - List of network interfaces on the specified VM.
20451	NetworkInterfaces *[]SecurityGroupNetworkInterface `json:"networkInterfaces,omitempty"`
20452}
20453
20454// SecurityRule network security rule.
20455type SecurityRule struct {
20456	autorest.Response `json:"-"`
20457	// SecurityRulePropertiesFormat - Properties of the security rule
20458	*SecurityRulePropertiesFormat `json:"properties,omitempty"`
20459	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
20460	Name *string `json:"name,omitempty"`
20461	// Etag - A unique read-only string that changes whenever the resource is updated.
20462	Etag *string `json:"etag,omitempty"`
20463	// ID - Resource ID.
20464	ID *string `json:"id,omitempty"`
20465}
20466
20467// MarshalJSON is the custom marshaler for SecurityRule.
20468func (sr SecurityRule) MarshalJSON() ([]byte, error) {
20469	objectMap := make(map[string]interface{})
20470	if sr.SecurityRulePropertiesFormat != nil {
20471		objectMap["properties"] = sr.SecurityRulePropertiesFormat
20472	}
20473	if sr.Name != nil {
20474		objectMap["name"] = sr.Name
20475	}
20476	if sr.Etag != nil {
20477		objectMap["etag"] = sr.Etag
20478	}
20479	if sr.ID != nil {
20480		objectMap["id"] = sr.ID
20481	}
20482	return json.Marshal(objectMap)
20483}
20484
20485// UnmarshalJSON is the custom unmarshaler for SecurityRule struct.
20486func (sr *SecurityRule) UnmarshalJSON(body []byte) error {
20487	var m map[string]*json.RawMessage
20488	err := json.Unmarshal(body, &m)
20489	if err != nil {
20490		return err
20491	}
20492	for k, v := range m {
20493		switch k {
20494		case "properties":
20495			if v != nil {
20496				var securityRulePropertiesFormat SecurityRulePropertiesFormat
20497				err = json.Unmarshal(*v, &securityRulePropertiesFormat)
20498				if err != nil {
20499					return err
20500				}
20501				sr.SecurityRulePropertiesFormat = &securityRulePropertiesFormat
20502			}
20503		case "name":
20504			if v != nil {
20505				var name string
20506				err = json.Unmarshal(*v, &name)
20507				if err != nil {
20508					return err
20509				}
20510				sr.Name = &name
20511			}
20512		case "etag":
20513			if v != nil {
20514				var etag string
20515				err = json.Unmarshal(*v, &etag)
20516				if err != nil {
20517					return err
20518				}
20519				sr.Etag = &etag
20520			}
20521		case "id":
20522			if v != nil {
20523				var ID string
20524				err = json.Unmarshal(*v, &ID)
20525				if err != nil {
20526					return err
20527				}
20528				sr.ID = &ID
20529			}
20530		}
20531	}
20532
20533	return nil
20534}
20535
20536// SecurityRuleAssociations all security rules associated with the network interface.
20537type SecurityRuleAssociations struct {
20538	NetworkInterfaceAssociation *InterfaceAssociation `json:"networkInterfaceAssociation,omitempty"`
20539	SubnetAssociation           *SubnetAssociation    `json:"subnetAssociation,omitempty"`
20540	// DefaultSecurityRules - Collection of default security rules of the network security group.
20541	DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"`
20542	// EffectiveSecurityRules - Collection of effective security rules.
20543	EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"`
20544}
20545
20546// SecurityRuleListResult response for ListSecurityRule API service call. Retrieves all security rules that
20547// belongs to a network security group.
20548type SecurityRuleListResult struct {
20549	autorest.Response `json:"-"`
20550	// Value - The security rules in a network security group.
20551	Value *[]SecurityRule `json:"value,omitempty"`
20552	// NextLink - The URL to get the next set of results.
20553	NextLink *string `json:"nextLink,omitempty"`
20554}
20555
20556// SecurityRuleListResultIterator provides access to a complete listing of SecurityRule values.
20557type SecurityRuleListResultIterator struct {
20558	i    int
20559	page SecurityRuleListResultPage
20560}
20561
20562// NextWithContext advances to the next value.  If there was an error making
20563// the request the iterator does not advance and the error is returned.
20564func (iter *SecurityRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
20565	if tracing.IsEnabled() {
20566		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultIterator.NextWithContext")
20567		defer func() {
20568			sc := -1
20569			if iter.Response().Response.Response != nil {
20570				sc = iter.Response().Response.Response.StatusCode
20571			}
20572			tracing.EndSpan(ctx, sc, err)
20573		}()
20574	}
20575	iter.i++
20576	if iter.i < len(iter.page.Values()) {
20577		return nil
20578	}
20579	err = iter.page.NextWithContext(ctx)
20580	if err != nil {
20581		iter.i--
20582		return err
20583	}
20584	iter.i = 0
20585	return nil
20586}
20587
20588// Next advances to the next value.  If there was an error making
20589// the request the iterator does not advance and the error is returned.
20590// Deprecated: Use NextWithContext() instead.
20591func (iter *SecurityRuleListResultIterator) Next() error {
20592	return iter.NextWithContext(context.Background())
20593}
20594
20595// NotDone returns true if the enumeration should be started or is not yet complete.
20596func (iter SecurityRuleListResultIterator) NotDone() bool {
20597	return iter.page.NotDone() && iter.i < len(iter.page.Values())
20598}
20599
20600// Response returns the raw server response from the last page request.
20601func (iter SecurityRuleListResultIterator) Response() SecurityRuleListResult {
20602	return iter.page.Response()
20603}
20604
20605// Value returns the current value or a zero-initialized value if the
20606// iterator has advanced beyond the end of the collection.
20607func (iter SecurityRuleListResultIterator) Value() SecurityRule {
20608	if !iter.page.NotDone() {
20609		return SecurityRule{}
20610	}
20611	return iter.page.Values()[iter.i]
20612}
20613
20614// Creates a new instance of the SecurityRuleListResultIterator type.
20615func NewSecurityRuleListResultIterator(page SecurityRuleListResultPage) SecurityRuleListResultIterator {
20616	return SecurityRuleListResultIterator{page: page}
20617}
20618
20619// IsEmpty returns true if the ListResult contains no values.
20620func (srlr SecurityRuleListResult) IsEmpty() bool {
20621	return srlr.Value == nil || len(*srlr.Value) == 0
20622}
20623
20624// hasNextLink returns true if the NextLink is not empty.
20625func (srlr SecurityRuleListResult) hasNextLink() bool {
20626	return srlr.NextLink != nil && len(*srlr.NextLink) != 0
20627}
20628
20629// securityRuleListResultPreparer prepares a request to retrieve the next set of results.
20630// It returns nil if no more results exist.
20631func (srlr SecurityRuleListResult) securityRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
20632	if !srlr.hasNextLink() {
20633		return nil, nil
20634	}
20635	return autorest.Prepare((&http.Request{}).WithContext(ctx),
20636		autorest.AsJSON(),
20637		autorest.AsGet(),
20638		autorest.WithBaseURL(to.String(srlr.NextLink)))
20639}
20640
20641// SecurityRuleListResultPage contains a page of SecurityRule values.
20642type SecurityRuleListResultPage struct {
20643	fn   func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)
20644	srlr SecurityRuleListResult
20645}
20646
20647// NextWithContext advances to the next page of values.  If there was an error making
20648// the request the page does not advance and the error is returned.
20649func (page *SecurityRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
20650	if tracing.IsEnabled() {
20651		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultPage.NextWithContext")
20652		defer func() {
20653			sc := -1
20654			if page.Response().Response.Response != nil {
20655				sc = page.Response().Response.Response.StatusCode
20656			}
20657			tracing.EndSpan(ctx, sc, err)
20658		}()
20659	}
20660	for {
20661		next, err := page.fn(ctx, page.srlr)
20662		if err != nil {
20663			return err
20664		}
20665		page.srlr = next
20666		if !next.hasNextLink() || !next.IsEmpty() {
20667			break
20668		}
20669	}
20670	return nil
20671}
20672
20673// Next advances to the next page of values.  If there was an error making
20674// the request the page does not advance and the error is returned.
20675// Deprecated: Use NextWithContext() instead.
20676func (page *SecurityRuleListResultPage) Next() error {
20677	return page.NextWithContext(context.Background())
20678}
20679
20680// NotDone returns true if the page enumeration should be started or is not yet complete.
20681func (page SecurityRuleListResultPage) NotDone() bool {
20682	return !page.srlr.IsEmpty()
20683}
20684
20685// Response returns the raw server response from the last page request.
20686func (page SecurityRuleListResultPage) Response() SecurityRuleListResult {
20687	return page.srlr
20688}
20689
20690// Values returns the slice of values for the current page or nil if there are no values.
20691func (page SecurityRuleListResultPage) Values() []SecurityRule {
20692	if page.srlr.IsEmpty() {
20693		return nil
20694	}
20695	return *page.srlr.Value
20696}
20697
20698// Creates a new instance of the SecurityRuleListResultPage type.
20699func NewSecurityRuleListResultPage(cur SecurityRuleListResult, getNextPage func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)) SecurityRuleListResultPage {
20700	return SecurityRuleListResultPage{
20701		fn:   getNextPage,
20702		srlr: cur,
20703	}
20704}
20705
20706// SecurityRulePropertiesFormat security rule resource.
20707type SecurityRulePropertiesFormat struct {
20708	// Description - A description for this rule. Restricted to 140 chars.
20709	Description *string `json:"description,omitempty"`
20710	// Protocol - Network protocol this rule applies to. Possible values are 'Tcp', 'Udp', and '*'. Possible values include: 'SecurityRuleProtocolTCP', 'SecurityRuleProtocolUDP', 'SecurityRuleProtocolAsterisk'
20711	Protocol SecurityRuleProtocol `json:"protocol,omitempty"`
20712	// SourcePortRange - The source port or range. Integer or range between 0 and 65535. Asterisks '*' can also be used to match all ports.
20713	SourcePortRange *string `json:"sourcePortRange,omitempty"`
20714	// DestinationPortRange - The destination port or range. Integer or range between 0 and 65535. Asterisks '*' can also be used to match all ports.
20715	DestinationPortRange *string `json:"destinationPortRange,omitempty"`
20716	// SourceAddressPrefix - The CIDR or source IP range. Asterisks '*' 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.
20717	SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
20718	// SourceAddressPrefixes - The CIDR or source IP ranges.
20719	SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"`
20720	// SourceApplicationSecurityGroups - The application security group specified as source.
20721	SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"`
20722	// DestinationAddressPrefix - The destination address prefix. CIDR or destination IP range. Asterisks '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used.
20723	DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"`
20724	// DestinationAddressPrefixes - The destination address prefixes. CIDR or destination IP ranges.
20725	DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"`
20726	// DestinationApplicationSecurityGroups - The application security group specified as destination.
20727	DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"`
20728	// SourcePortRanges - The source port ranges.
20729	SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"`
20730	// DestinationPortRanges - The destination port ranges.
20731	DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"`
20732	// Access - The network traffic is allowed or denied. Possible values are: 'Allow' and 'Deny'. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
20733	Access SecurityRuleAccess `json:"access,omitempty"`
20734	// 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.
20735	Priority *int32 `json:"priority,omitempty"`
20736	// Direction - The direction of the rule. The direction specifies if rule will be evaluated on incoming or outgoing traffic. Possible values are: 'Inbound' and 'Outbound'. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound'
20737	Direction SecurityRuleDirection `json:"direction,omitempty"`
20738	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
20739	ProvisioningState *string `json:"provisioningState,omitempty"`
20740}
20741
20742// SecurityRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
20743// long-running operation.
20744type SecurityRulesCreateOrUpdateFuture struct {
20745	azure.FutureAPI
20746	// Result returns the result of the asynchronous operation.
20747	// If the operation has not completed it will return an error.
20748	Result func(SecurityRulesClient) (SecurityRule, error)
20749}
20750
20751// SecurityRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
20752// operation.
20753type SecurityRulesDeleteFuture struct {
20754	azure.FutureAPI
20755	// Result returns the result of the asynchronous operation.
20756	// If the operation has not completed it will return an error.
20757	Result func(SecurityRulesClient) (autorest.Response, error)
20758}
20759
20760// SecurityRulesEvaluationResult network security rules evaluation result.
20761type SecurityRulesEvaluationResult struct {
20762	// Name - Name of the network security rule.
20763	Name *string `json:"name,omitempty"`
20764	// ProtocolMatched - Value indicating whether protocol is matched.
20765	ProtocolMatched *bool `json:"protocolMatched,omitempty"`
20766	// SourceMatched - Value indicating whether source is matched.
20767	SourceMatched *bool `json:"sourceMatched,omitempty"`
20768	// SourcePortMatched - Value indicating whether source port is matched.
20769	SourcePortMatched *bool `json:"sourcePortMatched,omitempty"`
20770	// DestinationMatched - Value indicating whether destination is matched.
20771	DestinationMatched *bool `json:"destinationMatched,omitempty"`
20772	// DestinationPortMatched - Value indicating whether destination port is matched.
20773	DestinationPortMatched *bool `json:"destinationPortMatched,omitempty"`
20774}
20775
20776// ServiceAssociationLink serviceAssociationLink resource.
20777type ServiceAssociationLink struct {
20778	// ServiceAssociationLinkPropertiesFormat - Resource navigation link properties format.
20779	*ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"`
20780	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
20781	Name *string `json:"name,omitempty"`
20782	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
20783	Etag *string `json:"etag,omitempty"`
20784	// ID - Resource ID.
20785	ID *string `json:"id,omitempty"`
20786}
20787
20788// MarshalJSON is the custom marshaler for ServiceAssociationLink.
20789func (sal ServiceAssociationLink) MarshalJSON() ([]byte, error) {
20790	objectMap := make(map[string]interface{})
20791	if sal.ServiceAssociationLinkPropertiesFormat != nil {
20792		objectMap["properties"] = sal.ServiceAssociationLinkPropertiesFormat
20793	}
20794	if sal.Name != nil {
20795		objectMap["name"] = sal.Name
20796	}
20797	if sal.ID != nil {
20798		objectMap["id"] = sal.ID
20799	}
20800	return json.Marshal(objectMap)
20801}
20802
20803// UnmarshalJSON is the custom unmarshaler for ServiceAssociationLink struct.
20804func (sal *ServiceAssociationLink) UnmarshalJSON(body []byte) error {
20805	var m map[string]*json.RawMessage
20806	err := json.Unmarshal(body, &m)
20807	if err != nil {
20808		return err
20809	}
20810	for k, v := range m {
20811		switch k {
20812		case "properties":
20813			if v != nil {
20814				var serviceAssociationLinkPropertiesFormat ServiceAssociationLinkPropertiesFormat
20815				err = json.Unmarshal(*v, &serviceAssociationLinkPropertiesFormat)
20816				if err != nil {
20817					return err
20818				}
20819				sal.ServiceAssociationLinkPropertiesFormat = &serviceAssociationLinkPropertiesFormat
20820			}
20821		case "name":
20822			if v != nil {
20823				var name string
20824				err = json.Unmarshal(*v, &name)
20825				if err != nil {
20826					return err
20827				}
20828				sal.Name = &name
20829			}
20830		case "etag":
20831			if v != nil {
20832				var etag string
20833				err = json.Unmarshal(*v, &etag)
20834				if err != nil {
20835					return err
20836				}
20837				sal.Etag = &etag
20838			}
20839		case "id":
20840			if v != nil {
20841				var ID string
20842				err = json.Unmarshal(*v, &ID)
20843				if err != nil {
20844					return err
20845				}
20846				sal.ID = &ID
20847			}
20848		}
20849	}
20850
20851	return nil
20852}
20853
20854// ServiceAssociationLinkPropertiesFormat properties of ServiceAssociationLink.
20855type ServiceAssociationLinkPropertiesFormat struct {
20856	// LinkedResourceType - Resource type of the linked resource.
20857	LinkedResourceType *string `json:"linkedResourceType,omitempty"`
20858	// Link - Link to the external resource.
20859	Link *string `json:"link,omitempty"`
20860	// ProvisioningState - READ-ONLY; Provisioning state of the ServiceAssociationLink resource.
20861	ProvisioningState *string `json:"provisioningState,omitempty"`
20862}
20863
20864// MarshalJSON is the custom marshaler for ServiceAssociationLinkPropertiesFormat.
20865func (salpf ServiceAssociationLinkPropertiesFormat) MarshalJSON() ([]byte, error) {
20866	objectMap := make(map[string]interface{})
20867	if salpf.LinkedResourceType != nil {
20868		objectMap["linkedResourceType"] = salpf.LinkedResourceType
20869	}
20870	if salpf.Link != nil {
20871		objectMap["link"] = salpf.Link
20872	}
20873	return json.Marshal(objectMap)
20874}
20875
20876// ServiceDelegationPropertiesFormat properties of a service delegation.
20877type ServiceDelegationPropertiesFormat struct {
20878	// ServiceName - The name of the service to whom the subnet should be delegated (e.g. Microsoft.Sql/servers)
20879	ServiceName *string `json:"serviceName,omitempty"`
20880	// Actions - Describes the actions permitted to the service upon delegation
20881	Actions *[]string `json:"actions,omitempty"`
20882	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
20883	ProvisioningState *string `json:"provisioningState,omitempty"`
20884}
20885
20886// MarshalJSON is the custom marshaler for ServiceDelegationPropertiesFormat.
20887func (sdpf ServiceDelegationPropertiesFormat) MarshalJSON() ([]byte, error) {
20888	objectMap := make(map[string]interface{})
20889	if sdpf.ServiceName != nil {
20890		objectMap["serviceName"] = sdpf.ServiceName
20891	}
20892	if sdpf.Actions != nil {
20893		objectMap["actions"] = sdpf.Actions
20894	}
20895	return json.Marshal(objectMap)
20896}
20897
20898// ServiceEndpointPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
20899// a long-running operation.
20900type ServiceEndpointPoliciesCreateOrUpdateFuture struct {
20901	azure.FutureAPI
20902	// Result returns the result of the asynchronous operation.
20903	// If the operation has not completed it will return an error.
20904	Result func(ServiceEndpointPoliciesClient) (ServiceEndpointPolicy, error)
20905}
20906
20907// ServiceEndpointPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a
20908// long-running operation.
20909type ServiceEndpointPoliciesDeleteFuture struct {
20910	azure.FutureAPI
20911	// Result returns the result of the asynchronous operation.
20912	// If the operation has not completed it will return an error.
20913	Result func(ServiceEndpointPoliciesClient) (autorest.Response, error)
20914}
20915
20916// ServiceEndpointPoliciesUpdateFuture an abstraction for monitoring and retrieving the results of a
20917// long-running operation.
20918type ServiceEndpointPoliciesUpdateFuture struct {
20919	azure.FutureAPI
20920	// Result returns the result of the asynchronous operation.
20921	// If the operation has not completed it will return an error.
20922	Result func(ServiceEndpointPoliciesClient) (ServiceEndpointPolicy, error)
20923}
20924
20925// ServiceEndpointPolicy service End point policy resource.
20926type ServiceEndpointPolicy struct {
20927	autorest.Response `json:"-"`
20928	// ServiceEndpointPolicyPropertiesFormat - Properties of the service end point policy
20929	*ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"`
20930	// Etag - A unique read-only string that changes whenever the resource is updated.
20931	Etag *string `json:"etag,omitempty"`
20932	// ID - Resource ID.
20933	ID *string `json:"id,omitempty"`
20934	// Name - READ-ONLY; Resource name.
20935	Name *string `json:"name,omitempty"`
20936	// Type - READ-ONLY; Resource type.
20937	Type *string `json:"type,omitempty"`
20938	// Location - Resource location.
20939	Location *string `json:"location,omitempty"`
20940	// Tags - Resource tags.
20941	Tags map[string]*string `json:"tags"`
20942}
20943
20944// MarshalJSON is the custom marshaler for ServiceEndpointPolicy.
20945func (sep ServiceEndpointPolicy) MarshalJSON() ([]byte, error) {
20946	objectMap := make(map[string]interface{})
20947	if sep.ServiceEndpointPolicyPropertiesFormat != nil {
20948		objectMap["properties"] = sep.ServiceEndpointPolicyPropertiesFormat
20949	}
20950	if sep.Etag != nil {
20951		objectMap["etag"] = sep.Etag
20952	}
20953	if sep.ID != nil {
20954		objectMap["id"] = sep.ID
20955	}
20956	if sep.Location != nil {
20957		objectMap["location"] = sep.Location
20958	}
20959	if sep.Tags != nil {
20960		objectMap["tags"] = sep.Tags
20961	}
20962	return json.Marshal(objectMap)
20963}
20964
20965// UnmarshalJSON is the custom unmarshaler for ServiceEndpointPolicy struct.
20966func (sep *ServiceEndpointPolicy) UnmarshalJSON(body []byte) error {
20967	var m map[string]*json.RawMessage
20968	err := json.Unmarshal(body, &m)
20969	if err != nil {
20970		return err
20971	}
20972	for k, v := range m {
20973		switch k {
20974		case "properties":
20975			if v != nil {
20976				var serviceEndpointPolicyPropertiesFormat ServiceEndpointPolicyPropertiesFormat
20977				err = json.Unmarshal(*v, &serviceEndpointPolicyPropertiesFormat)
20978				if err != nil {
20979					return err
20980				}
20981				sep.ServiceEndpointPolicyPropertiesFormat = &serviceEndpointPolicyPropertiesFormat
20982			}
20983		case "etag":
20984			if v != nil {
20985				var etag string
20986				err = json.Unmarshal(*v, &etag)
20987				if err != nil {
20988					return err
20989				}
20990				sep.Etag = &etag
20991			}
20992		case "id":
20993			if v != nil {
20994				var ID string
20995				err = json.Unmarshal(*v, &ID)
20996				if err != nil {
20997					return err
20998				}
20999				sep.ID = &ID
21000			}
21001		case "name":
21002			if v != nil {
21003				var name string
21004				err = json.Unmarshal(*v, &name)
21005				if err != nil {
21006					return err
21007				}
21008				sep.Name = &name
21009			}
21010		case "type":
21011			if v != nil {
21012				var typeVar string
21013				err = json.Unmarshal(*v, &typeVar)
21014				if err != nil {
21015					return err
21016				}
21017				sep.Type = &typeVar
21018			}
21019		case "location":
21020			if v != nil {
21021				var location string
21022				err = json.Unmarshal(*v, &location)
21023				if err != nil {
21024					return err
21025				}
21026				sep.Location = &location
21027			}
21028		case "tags":
21029			if v != nil {
21030				var tags map[string]*string
21031				err = json.Unmarshal(*v, &tags)
21032				if err != nil {
21033					return err
21034				}
21035				sep.Tags = tags
21036			}
21037		}
21038	}
21039
21040	return nil
21041}
21042
21043// ServiceEndpointPolicyDefinition service Endpoint policy definitions.
21044type ServiceEndpointPolicyDefinition struct {
21045	autorest.Response `json:"-"`
21046	// ServiceEndpointPolicyDefinitionPropertiesFormat - Properties of the service endpoint policy definition
21047	*ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"`
21048	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
21049	Name *string `json:"name,omitempty"`
21050	// Etag - A unique read-only string that changes whenever the resource is updated.
21051	Etag *string `json:"etag,omitempty"`
21052	// ID - Resource ID.
21053	ID *string `json:"id,omitempty"`
21054}
21055
21056// MarshalJSON is the custom marshaler for ServiceEndpointPolicyDefinition.
21057func (sepd ServiceEndpointPolicyDefinition) MarshalJSON() ([]byte, error) {
21058	objectMap := make(map[string]interface{})
21059	if sepd.ServiceEndpointPolicyDefinitionPropertiesFormat != nil {
21060		objectMap["properties"] = sepd.ServiceEndpointPolicyDefinitionPropertiesFormat
21061	}
21062	if sepd.Name != nil {
21063		objectMap["name"] = sepd.Name
21064	}
21065	if sepd.Etag != nil {
21066		objectMap["etag"] = sepd.Etag
21067	}
21068	if sepd.ID != nil {
21069		objectMap["id"] = sepd.ID
21070	}
21071	return json.Marshal(objectMap)
21072}
21073
21074// UnmarshalJSON is the custom unmarshaler for ServiceEndpointPolicyDefinition struct.
21075func (sepd *ServiceEndpointPolicyDefinition) UnmarshalJSON(body []byte) error {
21076	var m map[string]*json.RawMessage
21077	err := json.Unmarshal(body, &m)
21078	if err != nil {
21079		return err
21080	}
21081	for k, v := range m {
21082		switch k {
21083		case "properties":
21084			if v != nil {
21085				var serviceEndpointPolicyDefinitionPropertiesFormat ServiceEndpointPolicyDefinitionPropertiesFormat
21086				err = json.Unmarshal(*v, &serviceEndpointPolicyDefinitionPropertiesFormat)
21087				if err != nil {
21088					return err
21089				}
21090				sepd.ServiceEndpointPolicyDefinitionPropertiesFormat = &serviceEndpointPolicyDefinitionPropertiesFormat
21091			}
21092		case "name":
21093			if v != nil {
21094				var name string
21095				err = json.Unmarshal(*v, &name)
21096				if err != nil {
21097					return err
21098				}
21099				sepd.Name = &name
21100			}
21101		case "etag":
21102			if v != nil {
21103				var etag string
21104				err = json.Unmarshal(*v, &etag)
21105				if err != nil {
21106					return err
21107				}
21108				sepd.Etag = &etag
21109			}
21110		case "id":
21111			if v != nil {
21112				var ID string
21113				err = json.Unmarshal(*v, &ID)
21114				if err != nil {
21115					return err
21116				}
21117				sepd.ID = &ID
21118			}
21119		}
21120	}
21121
21122	return nil
21123}
21124
21125// ServiceEndpointPolicyDefinitionListResult response for ListServiceEndpointPolicyDefinition API service
21126// call. Retrieves all service endpoint policy definition that belongs to a service endpoint policy.
21127type ServiceEndpointPolicyDefinitionListResult struct {
21128	autorest.Response `json:"-"`
21129	// Value - The service endpoint policy definition in a service endpoint policy.
21130	Value *[]ServiceEndpointPolicyDefinition `json:"value,omitempty"`
21131	// NextLink - The URL to get the next set of results.
21132	NextLink *string `json:"nextLink,omitempty"`
21133}
21134
21135// ServiceEndpointPolicyDefinitionListResultIterator provides access to a complete listing of
21136// ServiceEndpointPolicyDefinition values.
21137type ServiceEndpointPolicyDefinitionListResultIterator struct {
21138	i    int
21139	page ServiceEndpointPolicyDefinitionListResultPage
21140}
21141
21142// NextWithContext advances to the next value.  If there was an error making
21143// the request the iterator does not advance and the error is returned.
21144func (iter *ServiceEndpointPolicyDefinitionListResultIterator) NextWithContext(ctx context.Context) (err error) {
21145	if tracing.IsEnabled() {
21146		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyDefinitionListResultIterator.NextWithContext")
21147		defer func() {
21148			sc := -1
21149			if iter.Response().Response.Response != nil {
21150				sc = iter.Response().Response.Response.StatusCode
21151			}
21152			tracing.EndSpan(ctx, sc, err)
21153		}()
21154	}
21155	iter.i++
21156	if iter.i < len(iter.page.Values()) {
21157		return nil
21158	}
21159	err = iter.page.NextWithContext(ctx)
21160	if err != nil {
21161		iter.i--
21162		return err
21163	}
21164	iter.i = 0
21165	return nil
21166}
21167
21168// Next advances to the next value.  If there was an error making
21169// the request the iterator does not advance and the error is returned.
21170// Deprecated: Use NextWithContext() instead.
21171func (iter *ServiceEndpointPolicyDefinitionListResultIterator) Next() error {
21172	return iter.NextWithContext(context.Background())
21173}
21174
21175// NotDone returns true if the enumeration should be started or is not yet complete.
21176func (iter ServiceEndpointPolicyDefinitionListResultIterator) NotDone() bool {
21177	return iter.page.NotDone() && iter.i < len(iter.page.Values())
21178}
21179
21180// Response returns the raw server response from the last page request.
21181func (iter ServiceEndpointPolicyDefinitionListResultIterator) Response() ServiceEndpointPolicyDefinitionListResult {
21182	return iter.page.Response()
21183}
21184
21185// Value returns the current value or a zero-initialized value if the
21186// iterator has advanced beyond the end of the collection.
21187func (iter ServiceEndpointPolicyDefinitionListResultIterator) Value() ServiceEndpointPolicyDefinition {
21188	if !iter.page.NotDone() {
21189		return ServiceEndpointPolicyDefinition{}
21190	}
21191	return iter.page.Values()[iter.i]
21192}
21193
21194// Creates a new instance of the ServiceEndpointPolicyDefinitionListResultIterator type.
21195func NewServiceEndpointPolicyDefinitionListResultIterator(page ServiceEndpointPolicyDefinitionListResultPage) ServiceEndpointPolicyDefinitionListResultIterator {
21196	return ServiceEndpointPolicyDefinitionListResultIterator{page: page}
21197}
21198
21199// IsEmpty returns true if the ListResult contains no values.
21200func (sepdlr ServiceEndpointPolicyDefinitionListResult) IsEmpty() bool {
21201	return sepdlr.Value == nil || len(*sepdlr.Value) == 0
21202}
21203
21204// hasNextLink returns true if the NextLink is not empty.
21205func (sepdlr ServiceEndpointPolicyDefinitionListResult) hasNextLink() bool {
21206	return sepdlr.NextLink != nil && len(*sepdlr.NextLink) != 0
21207}
21208
21209// serviceEndpointPolicyDefinitionListResultPreparer prepares a request to retrieve the next set of results.
21210// It returns nil if no more results exist.
21211func (sepdlr ServiceEndpointPolicyDefinitionListResult) serviceEndpointPolicyDefinitionListResultPreparer(ctx context.Context) (*http.Request, error) {
21212	if !sepdlr.hasNextLink() {
21213		return nil, nil
21214	}
21215	return autorest.Prepare((&http.Request{}).WithContext(ctx),
21216		autorest.AsJSON(),
21217		autorest.AsGet(),
21218		autorest.WithBaseURL(to.String(sepdlr.NextLink)))
21219}
21220
21221// ServiceEndpointPolicyDefinitionListResultPage contains a page of ServiceEndpointPolicyDefinition values.
21222type ServiceEndpointPolicyDefinitionListResultPage struct {
21223	fn     func(context.Context, ServiceEndpointPolicyDefinitionListResult) (ServiceEndpointPolicyDefinitionListResult, error)
21224	sepdlr ServiceEndpointPolicyDefinitionListResult
21225}
21226
21227// NextWithContext advances to the next page of values.  If there was an error making
21228// the request the page does not advance and the error is returned.
21229func (page *ServiceEndpointPolicyDefinitionListResultPage) NextWithContext(ctx context.Context) (err error) {
21230	if tracing.IsEnabled() {
21231		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyDefinitionListResultPage.NextWithContext")
21232		defer func() {
21233			sc := -1
21234			if page.Response().Response.Response != nil {
21235				sc = page.Response().Response.Response.StatusCode
21236			}
21237			tracing.EndSpan(ctx, sc, err)
21238		}()
21239	}
21240	for {
21241		next, err := page.fn(ctx, page.sepdlr)
21242		if err != nil {
21243			return err
21244		}
21245		page.sepdlr = next
21246		if !next.hasNextLink() || !next.IsEmpty() {
21247			break
21248		}
21249	}
21250	return nil
21251}
21252
21253// Next advances to the next page of values.  If there was an error making
21254// the request the page does not advance and the error is returned.
21255// Deprecated: Use NextWithContext() instead.
21256func (page *ServiceEndpointPolicyDefinitionListResultPage) Next() error {
21257	return page.NextWithContext(context.Background())
21258}
21259
21260// NotDone returns true if the page enumeration should be started or is not yet complete.
21261func (page ServiceEndpointPolicyDefinitionListResultPage) NotDone() bool {
21262	return !page.sepdlr.IsEmpty()
21263}
21264
21265// Response returns the raw server response from the last page request.
21266func (page ServiceEndpointPolicyDefinitionListResultPage) Response() ServiceEndpointPolicyDefinitionListResult {
21267	return page.sepdlr
21268}
21269
21270// Values returns the slice of values for the current page or nil if there are no values.
21271func (page ServiceEndpointPolicyDefinitionListResultPage) Values() []ServiceEndpointPolicyDefinition {
21272	if page.sepdlr.IsEmpty() {
21273		return nil
21274	}
21275	return *page.sepdlr.Value
21276}
21277
21278// Creates a new instance of the ServiceEndpointPolicyDefinitionListResultPage type.
21279func NewServiceEndpointPolicyDefinitionListResultPage(cur ServiceEndpointPolicyDefinitionListResult, getNextPage func(context.Context, ServiceEndpointPolicyDefinitionListResult) (ServiceEndpointPolicyDefinitionListResult, error)) ServiceEndpointPolicyDefinitionListResultPage {
21280	return ServiceEndpointPolicyDefinitionListResultPage{
21281		fn:     getNextPage,
21282		sepdlr: cur,
21283	}
21284}
21285
21286// ServiceEndpointPolicyDefinitionPropertiesFormat service Endpoint policy definition resource.
21287type ServiceEndpointPolicyDefinitionPropertiesFormat struct {
21288	// Description - A description for this rule. Restricted to 140 chars.
21289	Description *string `json:"description,omitempty"`
21290	// Service - service endpoint name.
21291	Service *string `json:"service,omitempty"`
21292	// ServiceResources - A list of service resources.
21293	ServiceResources *[]string `json:"serviceResources,omitempty"`
21294	// ProvisioningState - READ-ONLY; The provisioning state of the service end point policy definition. Possible values are: 'Updating', 'Deleting', and 'Failed'.
21295	ProvisioningState *string `json:"provisioningState,omitempty"`
21296}
21297
21298// MarshalJSON is the custom marshaler for ServiceEndpointPolicyDefinitionPropertiesFormat.
21299func (sepdpf ServiceEndpointPolicyDefinitionPropertiesFormat) MarshalJSON() ([]byte, error) {
21300	objectMap := make(map[string]interface{})
21301	if sepdpf.Description != nil {
21302		objectMap["description"] = sepdpf.Description
21303	}
21304	if sepdpf.Service != nil {
21305		objectMap["service"] = sepdpf.Service
21306	}
21307	if sepdpf.ServiceResources != nil {
21308		objectMap["serviceResources"] = sepdpf.ServiceResources
21309	}
21310	return json.Marshal(objectMap)
21311}
21312
21313// ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
21314// results of a long-running operation.
21315type ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture struct {
21316	azure.FutureAPI
21317	// Result returns the result of the asynchronous operation.
21318	// If the operation has not completed it will return an error.
21319	Result func(ServiceEndpointPolicyDefinitionsClient) (ServiceEndpointPolicyDefinition, error)
21320}
21321
21322// ServiceEndpointPolicyDefinitionsDeleteFuture an abstraction for monitoring and retrieving the results of
21323// a long-running operation.
21324type ServiceEndpointPolicyDefinitionsDeleteFuture struct {
21325	azure.FutureAPI
21326	// Result returns the result of the asynchronous operation.
21327	// If the operation has not completed it will return an error.
21328	Result func(ServiceEndpointPolicyDefinitionsClient) (autorest.Response, error)
21329}
21330
21331// ServiceEndpointPolicyListResult response for ListServiceEndpointPolicies API service call.
21332type ServiceEndpointPolicyListResult struct {
21333	autorest.Response `json:"-"`
21334	// Value - A list of ServiceEndpointPolicy resources.
21335	Value *[]ServiceEndpointPolicy `json:"value,omitempty"`
21336	// NextLink - READ-ONLY; The URL to get the next set of results.
21337	NextLink *string `json:"nextLink,omitempty"`
21338}
21339
21340// MarshalJSON is the custom marshaler for ServiceEndpointPolicyListResult.
21341func (seplr ServiceEndpointPolicyListResult) MarshalJSON() ([]byte, error) {
21342	objectMap := make(map[string]interface{})
21343	if seplr.Value != nil {
21344		objectMap["value"] = seplr.Value
21345	}
21346	return json.Marshal(objectMap)
21347}
21348
21349// ServiceEndpointPolicyListResultIterator provides access to a complete listing of ServiceEndpointPolicy
21350// values.
21351type ServiceEndpointPolicyListResultIterator struct {
21352	i    int
21353	page ServiceEndpointPolicyListResultPage
21354}
21355
21356// NextWithContext advances to the next value.  If there was an error making
21357// the request the iterator does not advance and the error is returned.
21358func (iter *ServiceEndpointPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) {
21359	if tracing.IsEnabled() {
21360		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyListResultIterator.NextWithContext")
21361		defer func() {
21362			sc := -1
21363			if iter.Response().Response.Response != nil {
21364				sc = iter.Response().Response.Response.StatusCode
21365			}
21366			tracing.EndSpan(ctx, sc, err)
21367		}()
21368	}
21369	iter.i++
21370	if iter.i < len(iter.page.Values()) {
21371		return nil
21372	}
21373	err = iter.page.NextWithContext(ctx)
21374	if err != nil {
21375		iter.i--
21376		return err
21377	}
21378	iter.i = 0
21379	return nil
21380}
21381
21382// Next advances to the next value.  If there was an error making
21383// the request the iterator does not advance and the error is returned.
21384// Deprecated: Use NextWithContext() instead.
21385func (iter *ServiceEndpointPolicyListResultIterator) Next() error {
21386	return iter.NextWithContext(context.Background())
21387}
21388
21389// NotDone returns true if the enumeration should be started or is not yet complete.
21390func (iter ServiceEndpointPolicyListResultIterator) NotDone() bool {
21391	return iter.page.NotDone() && iter.i < len(iter.page.Values())
21392}
21393
21394// Response returns the raw server response from the last page request.
21395func (iter ServiceEndpointPolicyListResultIterator) Response() ServiceEndpointPolicyListResult {
21396	return iter.page.Response()
21397}
21398
21399// Value returns the current value or a zero-initialized value if the
21400// iterator has advanced beyond the end of the collection.
21401func (iter ServiceEndpointPolicyListResultIterator) Value() ServiceEndpointPolicy {
21402	if !iter.page.NotDone() {
21403		return ServiceEndpointPolicy{}
21404	}
21405	return iter.page.Values()[iter.i]
21406}
21407
21408// Creates a new instance of the ServiceEndpointPolicyListResultIterator type.
21409func NewServiceEndpointPolicyListResultIterator(page ServiceEndpointPolicyListResultPage) ServiceEndpointPolicyListResultIterator {
21410	return ServiceEndpointPolicyListResultIterator{page: page}
21411}
21412
21413// IsEmpty returns true if the ListResult contains no values.
21414func (seplr ServiceEndpointPolicyListResult) IsEmpty() bool {
21415	return seplr.Value == nil || len(*seplr.Value) == 0
21416}
21417
21418// hasNextLink returns true if the NextLink is not empty.
21419func (seplr ServiceEndpointPolicyListResult) hasNextLink() bool {
21420	return seplr.NextLink != nil && len(*seplr.NextLink) != 0
21421}
21422
21423// serviceEndpointPolicyListResultPreparer prepares a request to retrieve the next set of results.
21424// It returns nil if no more results exist.
21425func (seplr ServiceEndpointPolicyListResult) serviceEndpointPolicyListResultPreparer(ctx context.Context) (*http.Request, error) {
21426	if !seplr.hasNextLink() {
21427		return nil, nil
21428	}
21429	return autorest.Prepare((&http.Request{}).WithContext(ctx),
21430		autorest.AsJSON(),
21431		autorest.AsGet(),
21432		autorest.WithBaseURL(to.String(seplr.NextLink)))
21433}
21434
21435// ServiceEndpointPolicyListResultPage contains a page of ServiceEndpointPolicy values.
21436type ServiceEndpointPolicyListResultPage struct {
21437	fn    func(context.Context, ServiceEndpointPolicyListResult) (ServiceEndpointPolicyListResult, error)
21438	seplr ServiceEndpointPolicyListResult
21439}
21440
21441// NextWithContext advances to the next page of values.  If there was an error making
21442// the request the page does not advance and the error is returned.
21443func (page *ServiceEndpointPolicyListResultPage) NextWithContext(ctx context.Context) (err error) {
21444	if tracing.IsEnabled() {
21445		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyListResultPage.NextWithContext")
21446		defer func() {
21447			sc := -1
21448			if page.Response().Response.Response != nil {
21449				sc = page.Response().Response.Response.StatusCode
21450			}
21451			tracing.EndSpan(ctx, sc, err)
21452		}()
21453	}
21454	for {
21455		next, err := page.fn(ctx, page.seplr)
21456		if err != nil {
21457			return err
21458		}
21459		page.seplr = next
21460		if !next.hasNextLink() || !next.IsEmpty() {
21461			break
21462		}
21463	}
21464	return nil
21465}
21466
21467// Next advances to the next page of values.  If there was an error making
21468// the request the page does not advance and the error is returned.
21469// Deprecated: Use NextWithContext() instead.
21470func (page *ServiceEndpointPolicyListResultPage) Next() error {
21471	return page.NextWithContext(context.Background())
21472}
21473
21474// NotDone returns true if the page enumeration should be started or is not yet complete.
21475func (page ServiceEndpointPolicyListResultPage) NotDone() bool {
21476	return !page.seplr.IsEmpty()
21477}
21478
21479// Response returns the raw server response from the last page request.
21480func (page ServiceEndpointPolicyListResultPage) Response() ServiceEndpointPolicyListResult {
21481	return page.seplr
21482}
21483
21484// Values returns the slice of values for the current page or nil if there are no values.
21485func (page ServiceEndpointPolicyListResultPage) Values() []ServiceEndpointPolicy {
21486	if page.seplr.IsEmpty() {
21487		return nil
21488	}
21489	return *page.seplr.Value
21490}
21491
21492// Creates a new instance of the ServiceEndpointPolicyListResultPage type.
21493func NewServiceEndpointPolicyListResultPage(cur ServiceEndpointPolicyListResult, getNextPage func(context.Context, ServiceEndpointPolicyListResult) (ServiceEndpointPolicyListResult, error)) ServiceEndpointPolicyListResultPage {
21494	return ServiceEndpointPolicyListResultPage{
21495		fn:    getNextPage,
21496		seplr: cur,
21497	}
21498}
21499
21500// ServiceEndpointPolicyPropertiesFormat service Endpoint Policy resource.
21501type ServiceEndpointPolicyPropertiesFormat struct {
21502	// ServiceEndpointPolicyDefinitions - A collection of service endpoint policy definitions of the service endpoint policy.
21503	ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"`
21504	// Subnets - READ-ONLY; A collection of references to subnets.
21505	Subnets *[]Subnet `json:"subnets,omitempty"`
21506	// ResourceGUID - READ-ONLY; The resource GUID property of the service endpoint policy resource.
21507	ResourceGUID *string `json:"resourceGuid,omitempty"`
21508	// ProvisioningState - READ-ONLY; The provisioning state of the service endpoint policy. Possible values are: 'Updating', 'Deleting', and 'Failed'.
21509	ProvisioningState *string `json:"provisioningState,omitempty"`
21510}
21511
21512// MarshalJSON is the custom marshaler for ServiceEndpointPolicyPropertiesFormat.
21513func (seppf ServiceEndpointPolicyPropertiesFormat) MarshalJSON() ([]byte, error) {
21514	objectMap := make(map[string]interface{})
21515	if seppf.ServiceEndpointPolicyDefinitions != nil {
21516		objectMap["serviceEndpointPolicyDefinitions"] = seppf.ServiceEndpointPolicyDefinitions
21517	}
21518	return json.Marshal(objectMap)
21519}
21520
21521// ServiceEndpointPropertiesFormat the service endpoint properties.
21522type ServiceEndpointPropertiesFormat struct {
21523	// Service - The type of the endpoint service.
21524	Service *string `json:"service,omitempty"`
21525	// Locations - A list of locations.
21526	Locations *[]string `json:"locations,omitempty"`
21527	// ProvisioningState - The provisioning state of the resource.
21528	ProvisioningState *string `json:"provisioningState,omitempty"`
21529}
21530
21531// String ...
21532type String struct {
21533	autorest.Response `json:"-"`
21534	Value             *string `json:"value,omitempty"`
21535}
21536
21537// Subnet subnet in a virtual network resource.
21538type Subnet struct {
21539	autorest.Response `json:"-"`
21540	// SubnetPropertiesFormat - Properties of the subnet.
21541	*SubnetPropertiesFormat `json:"properties,omitempty"`
21542	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
21543	Name *string `json:"name,omitempty"`
21544	// Etag - A unique read-only string that changes whenever the resource is updated.
21545	Etag *string `json:"etag,omitempty"`
21546	// ID - Resource ID.
21547	ID *string `json:"id,omitempty"`
21548}
21549
21550// MarshalJSON is the custom marshaler for Subnet.
21551func (s Subnet) MarshalJSON() ([]byte, error) {
21552	objectMap := make(map[string]interface{})
21553	if s.SubnetPropertiesFormat != nil {
21554		objectMap["properties"] = s.SubnetPropertiesFormat
21555	}
21556	if s.Name != nil {
21557		objectMap["name"] = s.Name
21558	}
21559	if s.Etag != nil {
21560		objectMap["etag"] = s.Etag
21561	}
21562	if s.ID != nil {
21563		objectMap["id"] = s.ID
21564	}
21565	return json.Marshal(objectMap)
21566}
21567
21568// UnmarshalJSON is the custom unmarshaler for Subnet struct.
21569func (s *Subnet) UnmarshalJSON(body []byte) error {
21570	var m map[string]*json.RawMessage
21571	err := json.Unmarshal(body, &m)
21572	if err != nil {
21573		return err
21574	}
21575	for k, v := range m {
21576		switch k {
21577		case "properties":
21578			if v != nil {
21579				var subnetPropertiesFormat SubnetPropertiesFormat
21580				err = json.Unmarshal(*v, &subnetPropertiesFormat)
21581				if err != nil {
21582					return err
21583				}
21584				s.SubnetPropertiesFormat = &subnetPropertiesFormat
21585			}
21586		case "name":
21587			if v != nil {
21588				var name string
21589				err = json.Unmarshal(*v, &name)
21590				if err != nil {
21591					return err
21592				}
21593				s.Name = &name
21594			}
21595		case "etag":
21596			if v != nil {
21597				var etag string
21598				err = json.Unmarshal(*v, &etag)
21599				if err != nil {
21600					return err
21601				}
21602				s.Etag = &etag
21603			}
21604		case "id":
21605			if v != nil {
21606				var ID string
21607				err = json.Unmarshal(*v, &ID)
21608				if err != nil {
21609					return err
21610				}
21611				s.ID = &ID
21612			}
21613		}
21614	}
21615
21616	return nil
21617}
21618
21619// SubnetAssociation network interface and its custom security rules.
21620type SubnetAssociation struct {
21621	// ID - READ-ONLY; Subnet ID.
21622	ID *string `json:"id,omitempty"`
21623	// SecurityRules - Collection of custom security rules.
21624	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
21625}
21626
21627// MarshalJSON is the custom marshaler for SubnetAssociation.
21628func (sa SubnetAssociation) MarshalJSON() ([]byte, error) {
21629	objectMap := make(map[string]interface{})
21630	if sa.SecurityRules != nil {
21631		objectMap["securityRules"] = sa.SecurityRules
21632	}
21633	return json.Marshal(objectMap)
21634}
21635
21636// SubnetListResult response for ListSubnets API service callRetrieves all subnet that belongs to a virtual
21637// network
21638type SubnetListResult struct {
21639	autorest.Response `json:"-"`
21640	// Value - The subnets in a virtual network.
21641	Value *[]Subnet `json:"value,omitempty"`
21642	// NextLink - The URL to get the next set of results.
21643	NextLink *string `json:"nextLink,omitempty"`
21644}
21645
21646// SubnetListResultIterator provides access to a complete listing of Subnet values.
21647type SubnetListResultIterator struct {
21648	i    int
21649	page SubnetListResultPage
21650}
21651
21652// NextWithContext advances to the next value.  If there was an error making
21653// the request the iterator does not advance and the error is returned.
21654func (iter *SubnetListResultIterator) NextWithContext(ctx context.Context) (err error) {
21655	if tracing.IsEnabled() {
21656		ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultIterator.NextWithContext")
21657		defer func() {
21658			sc := -1
21659			if iter.Response().Response.Response != nil {
21660				sc = iter.Response().Response.Response.StatusCode
21661			}
21662			tracing.EndSpan(ctx, sc, err)
21663		}()
21664	}
21665	iter.i++
21666	if iter.i < len(iter.page.Values()) {
21667		return nil
21668	}
21669	err = iter.page.NextWithContext(ctx)
21670	if err != nil {
21671		iter.i--
21672		return err
21673	}
21674	iter.i = 0
21675	return nil
21676}
21677
21678// Next advances to the next value.  If there was an error making
21679// the request the iterator does not advance and the error is returned.
21680// Deprecated: Use NextWithContext() instead.
21681func (iter *SubnetListResultIterator) Next() error {
21682	return iter.NextWithContext(context.Background())
21683}
21684
21685// NotDone returns true if the enumeration should be started or is not yet complete.
21686func (iter SubnetListResultIterator) NotDone() bool {
21687	return iter.page.NotDone() && iter.i < len(iter.page.Values())
21688}
21689
21690// Response returns the raw server response from the last page request.
21691func (iter SubnetListResultIterator) Response() SubnetListResult {
21692	return iter.page.Response()
21693}
21694
21695// Value returns the current value or a zero-initialized value if the
21696// iterator has advanced beyond the end of the collection.
21697func (iter SubnetListResultIterator) Value() Subnet {
21698	if !iter.page.NotDone() {
21699		return Subnet{}
21700	}
21701	return iter.page.Values()[iter.i]
21702}
21703
21704// Creates a new instance of the SubnetListResultIterator type.
21705func NewSubnetListResultIterator(page SubnetListResultPage) SubnetListResultIterator {
21706	return SubnetListResultIterator{page: page}
21707}
21708
21709// IsEmpty returns true if the ListResult contains no values.
21710func (slr SubnetListResult) IsEmpty() bool {
21711	return slr.Value == nil || len(*slr.Value) == 0
21712}
21713
21714// hasNextLink returns true if the NextLink is not empty.
21715func (slr SubnetListResult) hasNextLink() bool {
21716	return slr.NextLink != nil && len(*slr.NextLink) != 0
21717}
21718
21719// subnetListResultPreparer prepares a request to retrieve the next set of results.
21720// It returns nil if no more results exist.
21721func (slr SubnetListResult) subnetListResultPreparer(ctx context.Context) (*http.Request, error) {
21722	if !slr.hasNextLink() {
21723		return nil, nil
21724	}
21725	return autorest.Prepare((&http.Request{}).WithContext(ctx),
21726		autorest.AsJSON(),
21727		autorest.AsGet(),
21728		autorest.WithBaseURL(to.String(slr.NextLink)))
21729}
21730
21731// SubnetListResultPage contains a page of Subnet values.
21732type SubnetListResultPage struct {
21733	fn  func(context.Context, SubnetListResult) (SubnetListResult, error)
21734	slr SubnetListResult
21735}
21736
21737// NextWithContext advances to the next page of values.  If there was an error making
21738// the request the page does not advance and the error is returned.
21739func (page *SubnetListResultPage) NextWithContext(ctx context.Context) (err error) {
21740	if tracing.IsEnabled() {
21741		ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultPage.NextWithContext")
21742		defer func() {
21743			sc := -1
21744			if page.Response().Response.Response != nil {
21745				sc = page.Response().Response.Response.StatusCode
21746			}
21747			tracing.EndSpan(ctx, sc, err)
21748		}()
21749	}
21750	for {
21751		next, err := page.fn(ctx, page.slr)
21752		if err != nil {
21753			return err
21754		}
21755		page.slr = next
21756		if !next.hasNextLink() || !next.IsEmpty() {
21757			break
21758		}
21759	}
21760	return nil
21761}
21762
21763// Next advances to the next page of values.  If there was an error making
21764// the request the page does not advance and the error is returned.
21765// Deprecated: Use NextWithContext() instead.
21766func (page *SubnetListResultPage) Next() error {
21767	return page.NextWithContext(context.Background())
21768}
21769
21770// NotDone returns true if the page enumeration should be started or is not yet complete.
21771func (page SubnetListResultPage) NotDone() bool {
21772	return !page.slr.IsEmpty()
21773}
21774
21775// Response returns the raw server response from the last page request.
21776func (page SubnetListResultPage) Response() SubnetListResult {
21777	return page.slr
21778}
21779
21780// Values returns the slice of values for the current page or nil if there are no values.
21781func (page SubnetListResultPage) Values() []Subnet {
21782	if page.slr.IsEmpty() {
21783		return nil
21784	}
21785	return *page.slr.Value
21786}
21787
21788// Creates a new instance of the SubnetListResultPage type.
21789func NewSubnetListResultPage(cur SubnetListResult, getNextPage func(context.Context, SubnetListResult) (SubnetListResult, error)) SubnetListResultPage {
21790	return SubnetListResultPage{
21791		fn:  getNextPage,
21792		slr: cur,
21793	}
21794}
21795
21796// SubnetPropertiesFormat properties of the subnet.
21797type SubnetPropertiesFormat struct {
21798	// AddressPrefix - The address prefix for the subnet.
21799	AddressPrefix *string `json:"addressPrefix,omitempty"`
21800	// AddressPrefixes - List of  address prefixes for the subnet.
21801	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
21802	// NetworkSecurityGroup - The reference of the NetworkSecurityGroup resource.
21803	NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"`
21804	// RouteTable - The reference of the RouteTable resource.
21805	RouteTable *RouteTable `json:"routeTable,omitempty"`
21806	// ServiceEndpoints - An array of service endpoints.
21807	ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"`
21808	// ServiceEndpointPolicies - An array of service endpoint policies.
21809	ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"`
21810	// InterfaceEndpoints - READ-ONLY; An array of references to interface endpoints
21811	InterfaceEndpoints *[]InterfaceEndpoint `json:"interfaceEndpoints,omitempty"`
21812	// IPConfigurations - READ-ONLY; Gets an array of references to the network interface IP configurations using subnet.
21813	IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"`
21814	// IPConfigurationProfiles - READ-ONLY; Array of IP configuration profiles which reference this subnet.
21815	IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"`
21816	// ResourceNavigationLinks - Gets an array of references to the external resources using subnet.
21817	ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"`
21818	// ServiceAssociationLinks - Gets an array of references to services injecting into this subnet.
21819	ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"`
21820	// Delegations - Gets an array of references to the delegations on the subnet.
21821	Delegations *[]Delegation `json:"delegations,omitempty"`
21822	// Purpose - READ-ONLY; A read-only string identifying the intention of use for this subnet based on delegations and other user-defined properties.
21823	Purpose *string `json:"purpose,omitempty"`
21824	// ProvisioningState - The provisioning state of the resource.
21825	ProvisioningState *string `json:"provisioningState,omitempty"`
21826}
21827
21828// MarshalJSON is the custom marshaler for SubnetPropertiesFormat.
21829func (spf SubnetPropertiesFormat) MarshalJSON() ([]byte, error) {
21830	objectMap := make(map[string]interface{})
21831	if spf.AddressPrefix != nil {
21832		objectMap["addressPrefix"] = spf.AddressPrefix
21833	}
21834	if spf.AddressPrefixes != nil {
21835		objectMap["addressPrefixes"] = spf.AddressPrefixes
21836	}
21837	if spf.NetworkSecurityGroup != nil {
21838		objectMap["networkSecurityGroup"] = spf.NetworkSecurityGroup
21839	}
21840	if spf.RouteTable != nil {
21841		objectMap["routeTable"] = spf.RouteTable
21842	}
21843	if spf.ServiceEndpoints != nil {
21844		objectMap["serviceEndpoints"] = spf.ServiceEndpoints
21845	}
21846	if spf.ServiceEndpointPolicies != nil {
21847		objectMap["serviceEndpointPolicies"] = spf.ServiceEndpointPolicies
21848	}
21849	if spf.ResourceNavigationLinks != nil {
21850		objectMap["resourceNavigationLinks"] = spf.ResourceNavigationLinks
21851	}
21852	if spf.ServiceAssociationLinks != nil {
21853		objectMap["serviceAssociationLinks"] = spf.ServiceAssociationLinks
21854	}
21855	if spf.Delegations != nil {
21856		objectMap["delegations"] = spf.Delegations
21857	}
21858	if spf.ProvisioningState != nil {
21859		objectMap["provisioningState"] = spf.ProvisioningState
21860	}
21861	return json.Marshal(objectMap)
21862}
21863
21864// SubnetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
21865// operation.
21866type SubnetsCreateOrUpdateFuture struct {
21867	azure.FutureAPI
21868	// Result returns the result of the asynchronous operation.
21869	// If the operation has not completed it will return an error.
21870	Result func(SubnetsClient) (Subnet, error)
21871}
21872
21873// SubnetsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
21874// operation.
21875type SubnetsDeleteFuture struct {
21876	azure.FutureAPI
21877	// Result returns the result of the asynchronous operation.
21878	// If the operation has not completed it will return an error.
21879	Result func(SubnetsClient) (autorest.Response, error)
21880}
21881
21882// SubResource reference to another subresource.
21883type SubResource struct {
21884	// ID - Resource ID.
21885	ID *string `json:"id,omitempty"`
21886}
21887
21888// TagsObject tags object for patch operations.
21889type TagsObject struct {
21890	// Tags - Resource tags.
21891	Tags map[string]*string `json:"tags"`
21892}
21893
21894// MarshalJSON is the custom marshaler for TagsObject.
21895func (toVar TagsObject) MarshalJSON() ([]byte, error) {
21896	objectMap := make(map[string]interface{})
21897	if toVar.Tags != nil {
21898		objectMap["tags"] = toVar.Tags
21899	}
21900	return json.Marshal(objectMap)
21901}
21902
21903// Topology topology of the specified resource group.
21904type Topology struct {
21905	autorest.Response `json:"-"`
21906	// ID - READ-ONLY; GUID representing the operation id.
21907	ID *string `json:"id,omitempty"`
21908	// CreatedDateTime - READ-ONLY; The datetime when the topology was initially created for the resource group.
21909	CreatedDateTime *date.Time `json:"createdDateTime,omitempty"`
21910	// LastModified - READ-ONLY; The datetime when the topology was last modified.
21911	LastModified *date.Time          `json:"lastModified,omitempty"`
21912	Resources    *[]TopologyResource `json:"resources,omitempty"`
21913}
21914
21915// MarshalJSON is the custom marshaler for Topology.
21916func (t Topology) MarshalJSON() ([]byte, error) {
21917	objectMap := make(map[string]interface{})
21918	if t.Resources != nil {
21919		objectMap["resources"] = t.Resources
21920	}
21921	return json.Marshal(objectMap)
21922}
21923
21924// TopologyAssociation resources that have an association with the parent resource.
21925type TopologyAssociation struct {
21926	// Name - The name of the resource that is associated with the parent resource.
21927	Name *string `json:"name,omitempty"`
21928	// ResourceID - The ID of the resource that is associated with the parent resource.
21929	ResourceID *string `json:"resourceId,omitempty"`
21930	// AssociationType - The association type of the child resource to the parent resource. Possible values include: 'Associated', 'Contains'
21931	AssociationType AssociationType `json:"associationType,omitempty"`
21932}
21933
21934// TopologyParameters parameters that define the representation of topology.
21935type TopologyParameters struct {
21936	// TargetResourceGroupName - The name of the target resource group to perform topology on.
21937	TargetResourceGroupName *string `json:"targetResourceGroupName,omitempty"`
21938	// TargetVirtualNetwork - The reference of the Virtual Network resource.
21939	TargetVirtualNetwork *SubResource `json:"targetVirtualNetwork,omitempty"`
21940	// TargetSubnet - The reference of the Subnet resource.
21941	TargetSubnet *SubResource `json:"targetSubnet,omitempty"`
21942}
21943
21944// TopologyResource the network resource topology information for the given resource group.
21945type TopologyResource struct {
21946	// Name - Name of the resource.
21947	Name *string `json:"name,omitempty"`
21948	// ID - ID of the resource.
21949	ID *string `json:"id,omitempty"`
21950	// Location - Resource location.
21951	Location *string `json:"location,omitempty"`
21952	// Associations - Holds the associations the resource has with other resources in the resource group.
21953	Associations *[]TopologyAssociation `json:"associations,omitempty"`
21954}
21955
21956// TrafficAnalyticsConfigurationProperties parameters that define the configuration of traffic analytics.
21957type TrafficAnalyticsConfigurationProperties struct {
21958	// Enabled - Flag to enable/disable traffic analytics.
21959	Enabled *bool `json:"enabled,omitempty"`
21960	// WorkspaceID - The resource guid of the attached workspace
21961	WorkspaceID *string `json:"workspaceId,omitempty"`
21962	// WorkspaceRegion - The location of the attached workspace
21963	WorkspaceRegion *string `json:"workspaceRegion,omitempty"`
21964	// WorkspaceResourceID - Resource Id of the attached workspace
21965	WorkspaceResourceID *string `json:"workspaceResourceId,omitempty"`
21966	// TrafficAnalyticsInterval - The interval in minutes which would decide how frequently TA service should do flow analytics
21967	TrafficAnalyticsInterval *int32 `json:"trafficAnalyticsInterval,omitempty"`
21968}
21969
21970// TrafficAnalyticsProperties parameters that define the configuration of traffic analytics.
21971type TrafficAnalyticsProperties struct {
21972	NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"`
21973}
21974
21975// TroubleshootingDetails information gained from troubleshooting of specified resource.
21976type TroubleshootingDetails struct {
21977	// ID - The id of the get troubleshoot operation.
21978	ID *string `json:"id,omitempty"`
21979	// ReasonType - Reason type of failure.
21980	ReasonType *string `json:"reasonType,omitempty"`
21981	// Summary - A summary of troubleshooting.
21982	Summary *string `json:"summary,omitempty"`
21983	// Detail - Details on troubleshooting results.
21984	Detail *string `json:"detail,omitempty"`
21985	// RecommendedActions - List of recommended actions.
21986	RecommendedActions *[]TroubleshootingRecommendedActions `json:"recommendedActions,omitempty"`
21987}
21988
21989// TroubleshootingParameters parameters that define the resource to troubleshoot.
21990type TroubleshootingParameters struct {
21991	// TargetResourceID - The target resource to troubleshoot.
21992	TargetResourceID           *string `json:"targetResourceId,omitempty"`
21993	*TroubleshootingProperties `json:"properties,omitempty"`
21994}
21995
21996// MarshalJSON is the custom marshaler for TroubleshootingParameters.
21997func (tp TroubleshootingParameters) MarshalJSON() ([]byte, error) {
21998	objectMap := make(map[string]interface{})
21999	if tp.TargetResourceID != nil {
22000		objectMap["targetResourceId"] = tp.TargetResourceID
22001	}
22002	if tp.TroubleshootingProperties != nil {
22003		objectMap["properties"] = tp.TroubleshootingProperties
22004	}
22005	return json.Marshal(objectMap)
22006}
22007
22008// UnmarshalJSON is the custom unmarshaler for TroubleshootingParameters struct.
22009func (tp *TroubleshootingParameters) UnmarshalJSON(body []byte) error {
22010	var m map[string]*json.RawMessage
22011	err := json.Unmarshal(body, &m)
22012	if err != nil {
22013		return err
22014	}
22015	for k, v := range m {
22016		switch k {
22017		case "targetResourceId":
22018			if v != nil {
22019				var targetResourceID string
22020				err = json.Unmarshal(*v, &targetResourceID)
22021				if err != nil {
22022					return err
22023				}
22024				tp.TargetResourceID = &targetResourceID
22025			}
22026		case "properties":
22027			if v != nil {
22028				var troubleshootingProperties TroubleshootingProperties
22029				err = json.Unmarshal(*v, &troubleshootingProperties)
22030				if err != nil {
22031					return err
22032				}
22033				tp.TroubleshootingProperties = &troubleshootingProperties
22034			}
22035		}
22036	}
22037
22038	return nil
22039}
22040
22041// TroubleshootingProperties storage location provided for troubleshoot.
22042type TroubleshootingProperties struct {
22043	// StorageID - The ID for the storage account to save the troubleshoot result.
22044	StorageID *string `json:"storageId,omitempty"`
22045	// StoragePath - The path to the blob to save the troubleshoot result in.
22046	StoragePath *string `json:"storagePath,omitempty"`
22047}
22048
22049// TroubleshootingRecommendedActions recommended actions based on discovered issues.
22050type TroubleshootingRecommendedActions struct {
22051	// ActionID - ID of the recommended action.
22052	ActionID *string `json:"actionId,omitempty"`
22053	// ActionText - Description of recommended actions.
22054	ActionText *string `json:"actionText,omitempty"`
22055	// ActionURI - The uri linking to a documentation for the recommended troubleshooting actions.
22056	ActionURI *string `json:"actionUri,omitempty"`
22057	// ActionURIText - The information from the URI for the recommended troubleshooting actions.
22058	ActionURIText *string `json:"actionUriText,omitempty"`
22059}
22060
22061// TroubleshootingResult troubleshooting information gained from specified resource.
22062type TroubleshootingResult struct {
22063	autorest.Response `json:"-"`
22064	// StartTime - The start time of the troubleshooting.
22065	StartTime *date.Time `json:"startTime,omitempty"`
22066	// EndTime - The end time of the troubleshooting.
22067	EndTime *date.Time `json:"endTime,omitempty"`
22068	// Code - The result code of the troubleshooting.
22069	Code *string `json:"code,omitempty"`
22070	// Results - Information from troubleshooting.
22071	Results *[]TroubleshootingDetails `json:"results,omitempty"`
22072}
22073
22074// TunnelConnectionHealth virtualNetworkGatewayConnection properties
22075type TunnelConnectionHealth struct {
22076	// Tunnel - READ-ONLY; Tunnel name.
22077	Tunnel *string `json:"tunnel,omitempty"`
22078	// ConnectionStatus - READ-ONLY; Virtual network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
22079	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
22080	// IngressBytesTransferred - READ-ONLY; The Ingress Bytes Transferred in this connection
22081	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
22082	// EgressBytesTransferred - READ-ONLY; The Egress Bytes Transferred in this connection
22083	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
22084	// LastConnectionEstablishedUtcTime - READ-ONLY; The time at which connection was established in Utc format.
22085	LastConnectionEstablishedUtcTime *string `json:"lastConnectionEstablishedUtcTime,omitempty"`
22086}
22087
22088// Usage describes network resource usage.
22089type Usage struct {
22090	// ID - READ-ONLY; Resource identifier.
22091	ID *string `json:"id,omitempty"`
22092	// Unit - An enum describing the unit of measurement.
22093	Unit *string `json:"unit,omitempty"`
22094	// CurrentValue - The current value of the usage.
22095	CurrentValue *int64 `json:"currentValue,omitempty"`
22096	// Limit - The limit of usage.
22097	Limit *int64 `json:"limit,omitempty"`
22098	// Name - The name of the type of usage.
22099	Name *UsageName `json:"name,omitempty"`
22100}
22101
22102// MarshalJSON is the custom marshaler for Usage.
22103func (u Usage) MarshalJSON() ([]byte, error) {
22104	objectMap := make(map[string]interface{})
22105	if u.Unit != nil {
22106		objectMap["unit"] = u.Unit
22107	}
22108	if u.CurrentValue != nil {
22109		objectMap["currentValue"] = u.CurrentValue
22110	}
22111	if u.Limit != nil {
22112		objectMap["limit"] = u.Limit
22113	}
22114	if u.Name != nil {
22115		objectMap["name"] = u.Name
22116	}
22117	return json.Marshal(objectMap)
22118}
22119
22120// UsageName the usage names.
22121type UsageName struct {
22122	// Value - A string describing the resource name.
22123	Value *string `json:"value,omitempty"`
22124	// LocalizedValue - A localized string describing the resource name.
22125	LocalizedValue *string `json:"localizedValue,omitempty"`
22126}
22127
22128// UsagesListResult the list usages operation response.
22129type UsagesListResult struct {
22130	autorest.Response `json:"-"`
22131	// Value - The list network resource usages.
22132	Value *[]Usage `json:"value,omitempty"`
22133	// NextLink - URL to get the next set of results.
22134	NextLink *string `json:"nextLink,omitempty"`
22135}
22136
22137// UsagesListResultIterator provides access to a complete listing of Usage values.
22138type UsagesListResultIterator struct {
22139	i    int
22140	page UsagesListResultPage
22141}
22142
22143// NextWithContext advances to the next value.  If there was an error making
22144// the request the iterator does not advance and the error is returned.
22145func (iter *UsagesListResultIterator) NextWithContext(ctx context.Context) (err error) {
22146	if tracing.IsEnabled() {
22147		ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultIterator.NextWithContext")
22148		defer func() {
22149			sc := -1
22150			if iter.Response().Response.Response != nil {
22151				sc = iter.Response().Response.Response.StatusCode
22152			}
22153			tracing.EndSpan(ctx, sc, err)
22154		}()
22155	}
22156	iter.i++
22157	if iter.i < len(iter.page.Values()) {
22158		return nil
22159	}
22160	err = iter.page.NextWithContext(ctx)
22161	if err != nil {
22162		iter.i--
22163		return err
22164	}
22165	iter.i = 0
22166	return nil
22167}
22168
22169// Next advances to the next value.  If there was an error making
22170// the request the iterator does not advance and the error is returned.
22171// Deprecated: Use NextWithContext() instead.
22172func (iter *UsagesListResultIterator) Next() error {
22173	return iter.NextWithContext(context.Background())
22174}
22175
22176// NotDone returns true if the enumeration should be started or is not yet complete.
22177func (iter UsagesListResultIterator) NotDone() bool {
22178	return iter.page.NotDone() && iter.i < len(iter.page.Values())
22179}
22180
22181// Response returns the raw server response from the last page request.
22182func (iter UsagesListResultIterator) Response() UsagesListResult {
22183	return iter.page.Response()
22184}
22185
22186// Value returns the current value or a zero-initialized value if the
22187// iterator has advanced beyond the end of the collection.
22188func (iter UsagesListResultIterator) Value() Usage {
22189	if !iter.page.NotDone() {
22190		return Usage{}
22191	}
22192	return iter.page.Values()[iter.i]
22193}
22194
22195// Creates a new instance of the UsagesListResultIterator type.
22196func NewUsagesListResultIterator(page UsagesListResultPage) UsagesListResultIterator {
22197	return UsagesListResultIterator{page: page}
22198}
22199
22200// IsEmpty returns true if the ListResult contains no values.
22201func (ulr UsagesListResult) IsEmpty() bool {
22202	return ulr.Value == nil || len(*ulr.Value) == 0
22203}
22204
22205// hasNextLink returns true if the NextLink is not empty.
22206func (ulr UsagesListResult) hasNextLink() bool {
22207	return ulr.NextLink != nil && len(*ulr.NextLink) != 0
22208}
22209
22210// usagesListResultPreparer prepares a request to retrieve the next set of results.
22211// It returns nil if no more results exist.
22212func (ulr UsagesListResult) usagesListResultPreparer(ctx context.Context) (*http.Request, error) {
22213	if !ulr.hasNextLink() {
22214		return nil, nil
22215	}
22216	return autorest.Prepare((&http.Request{}).WithContext(ctx),
22217		autorest.AsJSON(),
22218		autorest.AsGet(),
22219		autorest.WithBaseURL(to.String(ulr.NextLink)))
22220}
22221
22222// UsagesListResultPage contains a page of Usage values.
22223type UsagesListResultPage struct {
22224	fn  func(context.Context, UsagesListResult) (UsagesListResult, error)
22225	ulr UsagesListResult
22226}
22227
22228// NextWithContext advances to the next page of values.  If there was an error making
22229// the request the page does not advance and the error is returned.
22230func (page *UsagesListResultPage) NextWithContext(ctx context.Context) (err error) {
22231	if tracing.IsEnabled() {
22232		ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultPage.NextWithContext")
22233		defer func() {
22234			sc := -1
22235			if page.Response().Response.Response != nil {
22236				sc = page.Response().Response.Response.StatusCode
22237			}
22238			tracing.EndSpan(ctx, sc, err)
22239		}()
22240	}
22241	for {
22242		next, err := page.fn(ctx, page.ulr)
22243		if err != nil {
22244			return err
22245		}
22246		page.ulr = next
22247		if !next.hasNextLink() || !next.IsEmpty() {
22248			break
22249		}
22250	}
22251	return nil
22252}
22253
22254// Next advances to the next page of values.  If there was an error making
22255// the request the page does not advance and the error is returned.
22256// Deprecated: Use NextWithContext() instead.
22257func (page *UsagesListResultPage) Next() error {
22258	return page.NextWithContext(context.Background())
22259}
22260
22261// NotDone returns true if the page enumeration should be started or is not yet complete.
22262func (page UsagesListResultPage) NotDone() bool {
22263	return !page.ulr.IsEmpty()
22264}
22265
22266// Response returns the raw server response from the last page request.
22267func (page UsagesListResultPage) Response() UsagesListResult {
22268	return page.ulr
22269}
22270
22271// Values returns the slice of values for the current page or nil if there are no values.
22272func (page UsagesListResultPage) Values() []Usage {
22273	if page.ulr.IsEmpty() {
22274		return nil
22275	}
22276	return *page.ulr.Value
22277}
22278
22279// Creates a new instance of the UsagesListResultPage type.
22280func NewUsagesListResultPage(cur UsagesListResult, getNextPage func(context.Context, UsagesListResult) (UsagesListResult, error)) UsagesListResultPage {
22281	return UsagesListResultPage{
22282		fn:  getNextPage,
22283		ulr: cur,
22284	}
22285}
22286
22287// VerificationIPFlowParameters parameters that define the IP flow to be verified.
22288type VerificationIPFlowParameters struct {
22289	// TargetResourceID - The ID of the target resource to perform next-hop on.
22290	TargetResourceID *string `json:"targetResourceId,omitempty"`
22291	// Direction - The direction of the packet represented as a 5-tuple. Possible values include: 'Inbound', 'Outbound'
22292	Direction Direction `json:"direction,omitempty"`
22293	// Protocol - Protocol to be verified on. Possible values include: 'IPFlowProtocolTCP', 'IPFlowProtocolUDP'
22294	Protocol IPFlowProtocol `json:"protocol,omitempty"`
22295	// 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.
22296	LocalPort *string `json:"localPort,omitempty"`
22297	// 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.
22298	RemotePort *string `json:"remotePort,omitempty"`
22299	// LocalIPAddress - The local IP address. Acceptable values are valid IPv4 addresses.
22300	LocalIPAddress *string `json:"localIPAddress,omitempty"`
22301	// RemoteIPAddress - The remote IP address. Acceptable values are valid IPv4 addresses.
22302	RemoteIPAddress *string `json:"remoteIPAddress,omitempty"`
22303	// 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).
22304	TargetNicResourceID *string `json:"targetNicResourceId,omitempty"`
22305}
22306
22307// VerificationIPFlowResult results of IP flow verification on the target resource.
22308type VerificationIPFlowResult struct {
22309	autorest.Response `json:"-"`
22310	// Access - Indicates whether the traffic is allowed or denied. Possible values include: 'Allow', 'Deny'
22311	Access Access `json:"access,omitempty"`
22312	// RuleName - Name of the rule. If input is not matched against any security rule, it is not displayed.
22313	RuleName *string `json:"ruleName,omitempty"`
22314}
22315
22316// VirtualHub virtualHub Resource.
22317type VirtualHub struct {
22318	autorest.Response     `json:"-"`
22319	*VirtualHubProperties `json:"properties,omitempty"`
22320	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
22321	Etag *string `json:"etag,omitempty"`
22322	// ID - Resource ID.
22323	ID *string `json:"id,omitempty"`
22324	// Name - READ-ONLY; Resource name.
22325	Name *string `json:"name,omitempty"`
22326	// Type - READ-ONLY; Resource type.
22327	Type *string `json:"type,omitempty"`
22328	// Location - Resource location.
22329	Location *string `json:"location,omitempty"`
22330	// Tags - Resource tags.
22331	Tags map[string]*string `json:"tags"`
22332}
22333
22334// MarshalJSON is the custom marshaler for VirtualHub.
22335func (vh VirtualHub) MarshalJSON() ([]byte, error) {
22336	objectMap := make(map[string]interface{})
22337	if vh.VirtualHubProperties != nil {
22338		objectMap["properties"] = vh.VirtualHubProperties
22339	}
22340	if vh.ID != nil {
22341		objectMap["id"] = vh.ID
22342	}
22343	if vh.Location != nil {
22344		objectMap["location"] = vh.Location
22345	}
22346	if vh.Tags != nil {
22347		objectMap["tags"] = vh.Tags
22348	}
22349	return json.Marshal(objectMap)
22350}
22351
22352// UnmarshalJSON is the custom unmarshaler for VirtualHub struct.
22353func (vh *VirtualHub) UnmarshalJSON(body []byte) error {
22354	var m map[string]*json.RawMessage
22355	err := json.Unmarshal(body, &m)
22356	if err != nil {
22357		return err
22358	}
22359	for k, v := range m {
22360		switch k {
22361		case "properties":
22362			if v != nil {
22363				var virtualHubProperties VirtualHubProperties
22364				err = json.Unmarshal(*v, &virtualHubProperties)
22365				if err != nil {
22366					return err
22367				}
22368				vh.VirtualHubProperties = &virtualHubProperties
22369			}
22370		case "etag":
22371			if v != nil {
22372				var etag string
22373				err = json.Unmarshal(*v, &etag)
22374				if err != nil {
22375					return err
22376				}
22377				vh.Etag = &etag
22378			}
22379		case "id":
22380			if v != nil {
22381				var ID string
22382				err = json.Unmarshal(*v, &ID)
22383				if err != nil {
22384					return err
22385				}
22386				vh.ID = &ID
22387			}
22388		case "name":
22389			if v != nil {
22390				var name string
22391				err = json.Unmarshal(*v, &name)
22392				if err != nil {
22393					return err
22394				}
22395				vh.Name = &name
22396			}
22397		case "type":
22398			if v != nil {
22399				var typeVar string
22400				err = json.Unmarshal(*v, &typeVar)
22401				if err != nil {
22402					return err
22403				}
22404				vh.Type = &typeVar
22405			}
22406		case "location":
22407			if v != nil {
22408				var location string
22409				err = json.Unmarshal(*v, &location)
22410				if err != nil {
22411					return err
22412				}
22413				vh.Location = &location
22414			}
22415		case "tags":
22416			if v != nil {
22417				var tags map[string]*string
22418				err = json.Unmarshal(*v, &tags)
22419				if err != nil {
22420					return err
22421				}
22422				vh.Tags = tags
22423			}
22424		}
22425	}
22426
22427	return nil
22428}
22429
22430// VirtualHubID virtual Hub identifier.
22431type VirtualHubID struct {
22432	// 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.
22433	ID *string `json:"id,omitempty"`
22434}
22435
22436// VirtualHubProperties parameters for VirtualHub
22437type VirtualHubProperties struct {
22438	// VirtualWan - The VirtualWAN to which the VirtualHub belongs
22439	VirtualWan *SubResource `json:"virtualWan,omitempty"`
22440	// VpnGateway - The VpnGateway associated with this VirtualHub
22441	VpnGateway *SubResource `json:"vpnGateway,omitempty"`
22442	// P2SVpnGateway - The P2SVpnGateway associated with this VirtualHub
22443	P2SVpnGateway *SubResource `json:"p2SVpnGateway,omitempty"`
22444	// ExpressRouteGateway - The expressRouteGateway associated with this VirtualHub
22445	ExpressRouteGateway *SubResource `json:"expressRouteGateway,omitempty"`
22446	// VirtualNetworkConnections - list of all vnet connections with this VirtualHub.
22447	VirtualNetworkConnections *[]HubVirtualNetworkConnection `json:"virtualNetworkConnections,omitempty"`
22448	// AddressPrefix - Address-prefix for this VirtualHub.
22449	AddressPrefix *string `json:"addressPrefix,omitempty"`
22450	// RouteTable - The routeTable associated with this virtual hub.
22451	RouteTable *VirtualHubRouteTable `json:"routeTable,omitempty"`
22452	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
22453	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
22454}
22455
22456// VirtualHubRoute virtualHub route
22457type VirtualHubRoute struct {
22458	// AddressPrefixes - list of all addressPrefixes.
22459	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
22460	// NextHopIPAddress - NextHop ip address.
22461	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
22462}
22463
22464// VirtualHubRouteTable virtualHub route table
22465type VirtualHubRouteTable struct {
22466	// Routes - list of all routes.
22467	Routes *[]VirtualHubRoute `json:"routes,omitempty"`
22468}
22469
22470// VirtualHubsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
22471// long-running operation.
22472type VirtualHubsCreateOrUpdateFuture struct {
22473	azure.FutureAPI
22474	// Result returns the result of the asynchronous operation.
22475	// If the operation has not completed it will return an error.
22476	Result func(VirtualHubsClient) (VirtualHub, error)
22477}
22478
22479// VirtualHubsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
22480// operation.
22481type VirtualHubsDeleteFuture struct {
22482	azure.FutureAPI
22483	// Result returns the result of the asynchronous operation.
22484	// If the operation has not completed it will return an error.
22485	Result func(VirtualHubsClient) (autorest.Response, error)
22486}
22487
22488// VirtualHubsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
22489// operation.
22490type VirtualHubsUpdateTagsFuture struct {
22491	azure.FutureAPI
22492	// Result returns the result of the asynchronous operation.
22493	// If the operation has not completed it will return an error.
22494	Result func(VirtualHubsClient) (VirtualHub, error)
22495}
22496
22497// VirtualNetwork virtual Network resource.
22498type VirtualNetwork struct {
22499	autorest.Response `json:"-"`
22500	// VirtualNetworkPropertiesFormat - Properties of the virtual network.
22501	*VirtualNetworkPropertiesFormat `json:"properties,omitempty"`
22502	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
22503	Etag *string `json:"etag,omitempty"`
22504	// ID - Resource ID.
22505	ID *string `json:"id,omitempty"`
22506	// Name - READ-ONLY; Resource name.
22507	Name *string `json:"name,omitempty"`
22508	// Type - READ-ONLY; Resource type.
22509	Type *string `json:"type,omitempty"`
22510	// Location - Resource location.
22511	Location *string `json:"location,omitempty"`
22512	// Tags - Resource tags.
22513	Tags map[string]*string `json:"tags"`
22514}
22515
22516// MarshalJSON is the custom marshaler for VirtualNetwork.
22517func (vn VirtualNetwork) MarshalJSON() ([]byte, error) {
22518	objectMap := make(map[string]interface{})
22519	if vn.VirtualNetworkPropertiesFormat != nil {
22520		objectMap["properties"] = vn.VirtualNetworkPropertiesFormat
22521	}
22522	if vn.Etag != nil {
22523		objectMap["etag"] = vn.Etag
22524	}
22525	if vn.ID != nil {
22526		objectMap["id"] = vn.ID
22527	}
22528	if vn.Location != nil {
22529		objectMap["location"] = vn.Location
22530	}
22531	if vn.Tags != nil {
22532		objectMap["tags"] = vn.Tags
22533	}
22534	return json.Marshal(objectMap)
22535}
22536
22537// UnmarshalJSON is the custom unmarshaler for VirtualNetwork struct.
22538func (vn *VirtualNetwork) UnmarshalJSON(body []byte) error {
22539	var m map[string]*json.RawMessage
22540	err := json.Unmarshal(body, &m)
22541	if err != nil {
22542		return err
22543	}
22544	for k, v := range m {
22545		switch k {
22546		case "properties":
22547			if v != nil {
22548				var virtualNetworkPropertiesFormat VirtualNetworkPropertiesFormat
22549				err = json.Unmarshal(*v, &virtualNetworkPropertiesFormat)
22550				if err != nil {
22551					return err
22552				}
22553				vn.VirtualNetworkPropertiesFormat = &virtualNetworkPropertiesFormat
22554			}
22555		case "etag":
22556			if v != nil {
22557				var etag string
22558				err = json.Unmarshal(*v, &etag)
22559				if err != nil {
22560					return err
22561				}
22562				vn.Etag = &etag
22563			}
22564		case "id":
22565			if v != nil {
22566				var ID string
22567				err = json.Unmarshal(*v, &ID)
22568				if err != nil {
22569					return err
22570				}
22571				vn.ID = &ID
22572			}
22573		case "name":
22574			if v != nil {
22575				var name string
22576				err = json.Unmarshal(*v, &name)
22577				if err != nil {
22578					return err
22579				}
22580				vn.Name = &name
22581			}
22582		case "type":
22583			if v != nil {
22584				var typeVar string
22585				err = json.Unmarshal(*v, &typeVar)
22586				if err != nil {
22587					return err
22588				}
22589				vn.Type = &typeVar
22590			}
22591		case "location":
22592			if v != nil {
22593				var location string
22594				err = json.Unmarshal(*v, &location)
22595				if err != nil {
22596					return err
22597				}
22598				vn.Location = &location
22599			}
22600		case "tags":
22601			if v != nil {
22602				var tags map[string]*string
22603				err = json.Unmarshal(*v, &tags)
22604				if err != nil {
22605					return err
22606				}
22607				vn.Tags = tags
22608			}
22609		}
22610	}
22611
22612	return nil
22613}
22614
22615// VirtualNetworkConnectionGatewayReference a reference to VirtualNetworkGateway or LocalNetworkGateway
22616// resource.
22617type VirtualNetworkConnectionGatewayReference struct {
22618	// ID - The ID of VirtualNetworkGateway or LocalNetworkGateway resource.
22619	ID *string `json:"id,omitempty"`
22620}
22621
22622// VirtualNetworkGateway a common class for general resource information
22623type VirtualNetworkGateway struct {
22624	autorest.Response `json:"-"`
22625	// VirtualNetworkGatewayPropertiesFormat - Properties of the virtual network gateway.
22626	*VirtualNetworkGatewayPropertiesFormat `json:"properties,omitempty"`
22627	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
22628	Etag *string `json:"etag,omitempty"`
22629	// ID - Resource ID.
22630	ID *string `json:"id,omitempty"`
22631	// Name - READ-ONLY; Resource name.
22632	Name *string `json:"name,omitempty"`
22633	// Type - READ-ONLY; Resource type.
22634	Type *string `json:"type,omitempty"`
22635	// Location - Resource location.
22636	Location *string `json:"location,omitempty"`
22637	// Tags - Resource tags.
22638	Tags map[string]*string `json:"tags"`
22639}
22640
22641// MarshalJSON is the custom marshaler for VirtualNetworkGateway.
22642func (vng VirtualNetworkGateway) MarshalJSON() ([]byte, error) {
22643	objectMap := make(map[string]interface{})
22644	if vng.VirtualNetworkGatewayPropertiesFormat != nil {
22645		objectMap["properties"] = vng.VirtualNetworkGatewayPropertiesFormat
22646	}
22647	if vng.Etag != nil {
22648		objectMap["etag"] = vng.Etag
22649	}
22650	if vng.ID != nil {
22651		objectMap["id"] = vng.ID
22652	}
22653	if vng.Location != nil {
22654		objectMap["location"] = vng.Location
22655	}
22656	if vng.Tags != nil {
22657		objectMap["tags"] = vng.Tags
22658	}
22659	return json.Marshal(objectMap)
22660}
22661
22662// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGateway struct.
22663func (vng *VirtualNetworkGateway) UnmarshalJSON(body []byte) error {
22664	var m map[string]*json.RawMessage
22665	err := json.Unmarshal(body, &m)
22666	if err != nil {
22667		return err
22668	}
22669	for k, v := range m {
22670		switch k {
22671		case "properties":
22672			if v != nil {
22673				var virtualNetworkGatewayPropertiesFormat VirtualNetworkGatewayPropertiesFormat
22674				err = json.Unmarshal(*v, &virtualNetworkGatewayPropertiesFormat)
22675				if err != nil {
22676					return err
22677				}
22678				vng.VirtualNetworkGatewayPropertiesFormat = &virtualNetworkGatewayPropertiesFormat
22679			}
22680		case "etag":
22681			if v != nil {
22682				var etag string
22683				err = json.Unmarshal(*v, &etag)
22684				if err != nil {
22685					return err
22686				}
22687				vng.Etag = &etag
22688			}
22689		case "id":
22690			if v != nil {
22691				var ID string
22692				err = json.Unmarshal(*v, &ID)
22693				if err != nil {
22694					return err
22695				}
22696				vng.ID = &ID
22697			}
22698		case "name":
22699			if v != nil {
22700				var name string
22701				err = json.Unmarshal(*v, &name)
22702				if err != nil {
22703					return err
22704				}
22705				vng.Name = &name
22706			}
22707		case "type":
22708			if v != nil {
22709				var typeVar string
22710				err = json.Unmarshal(*v, &typeVar)
22711				if err != nil {
22712					return err
22713				}
22714				vng.Type = &typeVar
22715			}
22716		case "location":
22717			if v != nil {
22718				var location string
22719				err = json.Unmarshal(*v, &location)
22720				if err != nil {
22721					return err
22722				}
22723				vng.Location = &location
22724			}
22725		case "tags":
22726			if v != nil {
22727				var tags map[string]*string
22728				err = json.Unmarshal(*v, &tags)
22729				if err != nil {
22730					return err
22731				}
22732				vng.Tags = tags
22733			}
22734		}
22735	}
22736
22737	return nil
22738}
22739
22740// VirtualNetworkGatewayConnection a common class for general resource information
22741type VirtualNetworkGatewayConnection struct {
22742	autorest.Response `json:"-"`
22743	// VirtualNetworkGatewayConnectionPropertiesFormat - Properties of the virtual network gateway connection.
22744	*VirtualNetworkGatewayConnectionPropertiesFormat `json:"properties,omitempty"`
22745	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
22746	Etag *string `json:"etag,omitempty"`
22747	// ID - Resource ID.
22748	ID *string `json:"id,omitempty"`
22749	// Name - READ-ONLY; Resource name.
22750	Name *string `json:"name,omitempty"`
22751	// Type - READ-ONLY; Resource type.
22752	Type *string `json:"type,omitempty"`
22753	// Location - Resource location.
22754	Location *string `json:"location,omitempty"`
22755	// Tags - Resource tags.
22756	Tags map[string]*string `json:"tags"`
22757}
22758
22759// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnection.
22760func (vngc VirtualNetworkGatewayConnection) MarshalJSON() ([]byte, error) {
22761	objectMap := make(map[string]interface{})
22762	if vngc.VirtualNetworkGatewayConnectionPropertiesFormat != nil {
22763		objectMap["properties"] = vngc.VirtualNetworkGatewayConnectionPropertiesFormat
22764	}
22765	if vngc.Etag != nil {
22766		objectMap["etag"] = vngc.Etag
22767	}
22768	if vngc.ID != nil {
22769		objectMap["id"] = vngc.ID
22770	}
22771	if vngc.Location != nil {
22772		objectMap["location"] = vngc.Location
22773	}
22774	if vngc.Tags != nil {
22775		objectMap["tags"] = vngc.Tags
22776	}
22777	return json.Marshal(objectMap)
22778}
22779
22780// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnection struct.
22781func (vngc *VirtualNetworkGatewayConnection) UnmarshalJSON(body []byte) error {
22782	var m map[string]*json.RawMessage
22783	err := json.Unmarshal(body, &m)
22784	if err != nil {
22785		return err
22786	}
22787	for k, v := range m {
22788		switch k {
22789		case "properties":
22790			if v != nil {
22791				var virtualNetworkGatewayConnectionPropertiesFormat VirtualNetworkGatewayConnectionPropertiesFormat
22792				err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionPropertiesFormat)
22793				if err != nil {
22794					return err
22795				}
22796				vngc.VirtualNetworkGatewayConnectionPropertiesFormat = &virtualNetworkGatewayConnectionPropertiesFormat
22797			}
22798		case "etag":
22799			if v != nil {
22800				var etag string
22801				err = json.Unmarshal(*v, &etag)
22802				if err != nil {
22803					return err
22804				}
22805				vngc.Etag = &etag
22806			}
22807		case "id":
22808			if v != nil {
22809				var ID string
22810				err = json.Unmarshal(*v, &ID)
22811				if err != nil {
22812					return err
22813				}
22814				vngc.ID = &ID
22815			}
22816		case "name":
22817			if v != nil {
22818				var name string
22819				err = json.Unmarshal(*v, &name)
22820				if err != nil {
22821					return err
22822				}
22823				vngc.Name = &name
22824			}
22825		case "type":
22826			if v != nil {
22827				var typeVar string
22828				err = json.Unmarshal(*v, &typeVar)
22829				if err != nil {
22830					return err
22831				}
22832				vngc.Type = &typeVar
22833			}
22834		case "location":
22835			if v != nil {
22836				var location string
22837				err = json.Unmarshal(*v, &location)
22838				if err != nil {
22839					return err
22840				}
22841				vngc.Location = &location
22842			}
22843		case "tags":
22844			if v != nil {
22845				var tags map[string]*string
22846				err = json.Unmarshal(*v, &tags)
22847				if err != nil {
22848					return err
22849				}
22850				vngc.Tags = tags
22851			}
22852		}
22853	}
22854
22855	return nil
22856}
22857
22858// VirtualNetworkGatewayConnectionListEntity a common class for general resource information
22859type VirtualNetworkGatewayConnectionListEntity struct {
22860	// VirtualNetworkGatewayConnectionListEntityPropertiesFormat - Properties of the virtual network gateway connection.
22861	*VirtualNetworkGatewayConnectionListEntityPropertiesFormat `json:"properties,omitempty"`
22862	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
22863	Etag *string `json:"etag,omitempty"`
22864	// ID - Resource ID.
22865	ID *string `json:"id,omitempty"`
22866	// Name - READ-ONLY; Resource name.
22867	Name *string `json:"name,omitempty"`
22868	// Type - READ-ONLY; Resource type.
22869	Type *string `json:"type,omitempty"`
22870	// Location - Resource location.
22871	Location *string `json:"location,omitempty"`
22872	// Tags - Resource tags.
22873	Tags map[string]*string `json:"tags"`
22874}
22875
22876// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListEntity.
22877func (vngcle VirtualNetworkGatewayConnectionListEntity) MarshalJSON() ([]byte, error) {
22878	objectMap := make(map[string]interface{})
22879	if vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat != nil {
22880		objectMap["properties"] = vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat
22881	}
22882	if vngcle.Etag != nil {
22883		objectMap["etag"] = vngcle.Etag
22884	}
22885	if vngcle.ID != nil {
22886		objectMap["id"] = vngcle.ID
22887	}
22888	if vngcle.Location != nil {
22889		objectMap["location"] = vngcle.Location
22890	}
22891	if vngcle.Tags != nil {
22892		objectMap["tags"] = vngcle.Tags
22893	}
22894	return json.Marshal(objectMap)
22895}
22896
22897// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnectionListEntity struct.
22898func (vngcle *VirtualNetworkGatewayConnectionListEntity) UnmarshalJSON(body []byte) error {
22899	var m map[string]*json.RawMessage
22900	err := json.Unmarshal(body, &m)
22901	if err != nil {
22902		return err
22903	}
22904	for k, v := range m {
22905		switch k {
22906		case "properties":
22907			if v != nil {
22908				var virtualNetworkGatewayConnectionListEntityPropertiesFormat VirtualNetworkGatewayConnectionListEntityPropertiesFormat
22909				err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionListEntityPropertiesFormat)
22910				if err != nil {
22911					return err
22912				}
22913				vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat = &virtualNetworkGatewayConnectionListEntityPropertiesFormat
22914			}
22915		case "etag":
22916			if v != nil {
22917				var etag string
22918				err = json.Unmarshal(*v, &etag)
22919				if err != nil {
22920					return err
22921				}
22922				vngcle.Etag = &etag
22923			}
22924		case "id":
22925			if v != nil {
22926				var ID string
22927				err = json.Unmarshal(*v, &ID)
22928				if err != nil {
22929					return err
22930				}
22931				vngcle.ID = &ID
22932			}
22933		case "name":
22934			if v != nil {
22935				var name string
22936				err = json.Unmarshal(*v, &name)
22937				if err != nil {
22938					return err
22939				}
22940				vngcle.Name = &name
22941			}
22942		case "type":
22943			if v != nil {
22944				var typeVar string
22945				err = json.Unmarshal(*v, &typeVar)
22946				if err != nil {
22947					return err
22948				}
22949				vngcle.Type = &typeVar
22950			}
22951		case "location":
22952			if v != nil {
22953				var location string
22954				err = json.Unmarshal(*v, &location)
22955				if err != nil {
22956					return err
22957				}
22958				vngcle.Location = &location
22959			}
22960		case "tags":
22961			if v != nil {
22962				var tags map[string]*string
22963				err = json.Unmarshal(*v, &tags)
22964				if err != nil {
22965					return err
22966				}
22967				vngcle.Tags = tags
22968			}
22969		}
22970	}
22971
22972	return nil
22973}
22974
22975// VirtualNetworkGatewayConnectionListEntityPropertiesFormat virtualNetworkGatewayConnection properties
22976type VirtualNetworkGatewayConnectionListEntityPropertiesFormat struct {
22977	// AuthorizationKey - The authorizationKey.
22978	AuthorizationKey *string `json:"authorizationKey,omitempty"`
22979	// VirtualNetworkGateway1 - The reference to virtual network gateway resource.
22980	VirtualNetworkGateway1 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway1,omitempty"`
22981	// VirtualNetworkGateway2 - The reference to virtual network gateway resource.
22982	VirtualNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway2,omitempty"`
22983	// LocalNetworkGateway2 - The reference to local network gateway resource.
22984	LocalNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"localNetworkGateway2,omitempty"`
22985	// ConnectionType - Gateway connection type. Possible values are: 'Ipsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'
22986	ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"`
22987	// ConnectionProtocol - Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1'
22988	ConnectionProtocol VirtualNetworkGatewayConnectionProtocol `json:"connectionProtocol,omitempty"`
22989	// RoutingWeight - The routing weight.
22990	RoutingWeight *int32 `json:"routingWeight,omitempty"`
22991	// SharedKey - The IPSec shared key.
22992	SharedKey *string `json:"sharedKey,omitempty"`
22993	// ConnectionStatus - READ-ONLY; Virtual network Gateway connection status. Possible values are 'Unknown', 'Connecting', 'Connected' and 'NotConnected'. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
22994	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
22995	// TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status.
22996	TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"`
22997	// EgressBytesTransferred - READ-ONLY; The egress bytes transferred in this connection.
22998	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
22999	// IngressBytesTransferred - READ-ONLY; The ingress bytes transferred in this connection.
23000	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
23001	// Peer - The reference to peerings resource.
23002	Peer *SubResource `json:"peer,omitempty"`
23003	// EnableBgp - EnableBgp flag
23004	EnableBgp *bool `json:"enableBgp,omitempty"`
23005	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
23006	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
23007	// IpsecPolicies - The IPSec Policies to be considered by this connection.
23008	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
23009	// ResourceGUID - The resource GUID property of the VirtualNetworkGatewayConnection resource.
23010	ResourceGUID *string `json:"resourceGuid,omitempty"`
23011	// ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGatewayConnection resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
23012	ProvisioningState *string `json:"provisioningState,omitempty"`
23013	// ExpressRouteGatewayBypass - Bypass ExpressRoute Gateway for data forwarding
23014	ExpressRouteGatewayBypass *bool `json:"expressRouteGatewayBypass,omitempty"`
23015}
23016
23017// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListEntityPropertiesFormat.
23018func (vngclepf VirtualNetworkGatewayConnectionListEntityPropertiesFormat) MarshalJSON() ([]byte, error) {
23019	objectMap := make(map[string]interface{})
23020	if vngclepf.AuthorizationKey != nil {
23021		objectMap["authorizationKey"] = vngclepf.AuthorizationKey
23022	}
23023	if vngclepf.VirtualNetworkGateway1 != nil {
23024		objectMap["virtualNetworkGateway1"] = vngclepf.VirtualNetworkGateway1
23025	}
23026	if vngclepf.VirtualNetworkGateway2 != nil {
23027		objectMap["virtualNetworkGateway2"] = vngclepf.VirtualNetworkGateway2
23028	}
23029	if vngclepf.LocalNetworkGateway2 != nil {
23030		objectMap["localNetworkGateway2"] = vngclepf.LocalNetworkGateway2
23031	}
23032	if vngclepf.ConnectionType != "" {
23033		objectMap["connectionType"] = vngclepf.ConnectionType
23034	}
23035	if vngclepf.ConnectionProtocol != "" {
23036		objectMap["connectionProtocol"] = vngclepf.ConnectionProtocol
23037	}
23038	if vngclepf.RoutingWeight != nil {
23039		objectMap["routingWeight"] = vngclepf.RoutingWeight
23040	}
23041	if vngclepf.SharedKey != nil {
23042		objectMap["sharedKey"] = vngclepf.SharedKey
23043	}
23044	if vngclepf.Peer != nil {
23045		objectMap["peer"] = vngclepf.Peer
23046	}
23047	if vngclepf.EnableBgp != nil {
23048		objectMap["enableBgp"] = vngclepf.EnableBgp
23049	}
23050	if vngclepf.UsePolicyBasedTrafficSelectors != nil {
23051		objectMap["usePolicyBasedTrafficSelectors"] = vngclepf.UsePolicyBasedTrafficSelectors
23052	}
23053	if vngclepf.IpsecPolicies != nil {
23054		objectMap["ipsecPolicies"] = vngclepf.IpsecPolicies
23055	}
23056	if vngclepf.ResourceGUID != nil {
23057		objectMap["resourceGuid"] = vngclepf.ResourceGUID
23058	}
23059	if vngclepf.ExpressRouteGatewayBypass != nil {
23060		objectMap["expressRouteGatewayBypass"] = vngclepf.ExpressRouteGatewayBypass
23061	}
23062	return json.Marshal(objectMap)
23063}
23064
23065// VirtualNetworkGatewayConnectionListResult response for the ListVirtualNetworkGatewayConnections API
23066// service call
23067type VirtualNetworkGatewayConnectionListResult struct {
23068	autorest.Response `json:"-"`
23069	// Value - Gets a list of VirtualNetworkGatewayConnection resources that exists in a resource group.
23070	Value *[]VirtualNetworkGatewayConnection `json:"value,omitempty"`
23071	// NextLink - READ-ONLY; The URL to get the next set of results.
23072	NextLink *string `json:"nextLink,omitempty"`
23073}
23074
23075// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListResult.
23076func (vngclr VirtualNetworkGatewayConnectionListResult) MarshalJSON() ([]byte, error) {
23077	objectMap := make(map[string]interface{})
23078	if vngclr.Value != nil {
23079		objectMap["value"] = vngclr.Value
23080	}
23081	return json.Marshal(objectMap)
23082}
23083
23084// VirtualNetworkGatewayConnectionListResultIterator provides access to a complete listing of
23085// VirtualNetworkGatewayConnection values.
23086type VirtualNetworkGatewayConnectionListResultIterator struct {
23087	i    int
23088	page VirtualNetworkGatewayConnectionListResultPage
23089}
23090
23091// NextWithContext advances to the next value.  If there was an error making
23092// the request the iterator does not advance and the error is returned.
23093func (iter *VirtualNetworkGatewayConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
23094	if tracing.IsEnabled() {
23095		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultIterator.NextWithContext")
23096		defer func() {
23097			sc := -1
23098			if iter.Response().Response.Response != nil {
23099				sc = iter.Response().Response.Response.StatusCode
23100			}
23101			tracing.EndSpan(ctx, sc, err)
23102		}()
23103	}
23104	iter.i++
23105	if iter.i < len(iter.page.Values()) {
23106		return nil
23107	}
23108	err = iter.page.NextWithContext(ctx)
23109	if err != nil {
23110		iter.i--
23111		return err
23112	}
23113	iter.i = 0
23114	return nil
23115}
23116
23117// Next advances to the next value.  If there was an error making
23118// the request the iterator does not advance and the error is returned.
23119// Deprecated: Use NextWithContext() instead.
23120func (iter *VirtualNetworkGatewayConnectionListResultIterator) Next() error {
23121	return iter.NextWithContext(context.Background())
23122}
23123
23124// NotDone returns true if the enumeration should be started or is not yet complete.
23125func (iter VirtualNetworkGatewayConnectionListResultIterator) NotDone() bool {
23126	return iter.page.NotDone() && iter.i < len(iter.page.Values())
23127}
23128
23129// Response returns the raw server response from the last page request.
23130func (iter VirtualNetworkGatewayConnectionListResultIterator) Response() VirtualNetworkGatewayConnectionListResult {
23131	return iter.page.Response()
23132}
23133
23134// Value returns the current value or a zero-initialized value if the
23135// iterator has advanced beyond the end of the collection.
23136func (iter VirtualNetworkGatewayConnectionListResultIterator) Value() VirtualNetworkGatewayConnection {
23137	if !iter.page.NotDone() {
23138		return VirtualNetworkGatewayConnection{}
23139	}
23140	return iter.page.Values()[iter.i]
23141}
23142
23143// Creates a new instance of the VirtualNetworkGatewayConnectionListResultIterator type.
23144func NewVirtualNetworkGatewayConnectionListResultIterator(page VirtualNetworkGatewayConnectionListResultPage) VirtualNetworkGatewayConnectionListResultIterator {
23145	return VirtualNetworkGatewayConnectionListResultIterator{page: page}
23146}
23147
23148// IsEmpty returns true if the ListResult contains no values.
23149func (vngclr VirtualNetworkGatewayConnectionListResult) IsEmpty() bool {
23150	return vngclr.Value == nil || len(*vngclr.Value) == 0
23151}
23152
23153// hasNextLink returns true if the NextLink is not empty.
23154func (vngclr VirtualNetworkGatewayConnectionListResult) hasNextLink() bool {
23155	return vngclr.NextLink != nil && len(*vngclr.NextLink) != 0
23156}
23157
23158// virtualNetworkGatewayConnectionListResultPreparer prepares a request to retrieve the next set of results.
23159// It returns nil if no more results exist.
23160func (vngclr VirtualNetworkGatewayConnectionListResult) virtualNetworkGatewayConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
23161	if !vngclr.hasNextLink() {
23162		return nil, nil
23163	}
23164	return autorest.Prepare((&http.Request{}).WithContext(ctx),
23165		autorest.AsJSON(),
23166		autorest.AsGet(),
23167		autorest.WithBaseURL(to.String(vngclr.NextLink)))
23168}
23169
23170// VirtualNetworkGatewayConnectionListResultPage contains a page of VirtualNetworkGatewayConnection values.
23171type VirtualNetworkGatewayConnectionListResultPage struct {
23172	fn     func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)
23173	vngclr VirtualNetworkGatewayConnectionListResult
23174}
23175
23176// NextWithContext advances to the next page of values.  If there was an error making
23177// the request the page does not advance and the error is returned.
23178func (page *VirtualNetworkGatewayConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
23179	if tracing.IsEnabled() {
23180		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultPage.NextWithContext")
23181		defer func() {
23182			sc := -1
23183			if page.Response().Response.Response != nil {
23184				sc = page.Response().Response.Response.StatusCode
23185			}
23186			tracing.EndSpan(ctx, sc, err)
23187		}()
23188	}
23189	for {
23190		next, err := page.fn(ctx, page.vngclr)
23191		if err != nil {
23192			return err
23193		}
23194		page.vngclr = next
23195		if !next.hasNextLink() || !next.IsEmpty() {
23196			break
23197		}
23198	}
23199	return nil
23200}
23201
23202// Next advances to the next page of values.  If there was an error making
23203// the request the page does not advance and the error is returned.
23204// Deprecated: Use NextWithContext() instead.
23205func (page *VirtualNetworkGatewayConnectionListResultPage) Next() error {
23206	return page.NextWithContext(context.Background())
23207}
23208
23209// NotDone returns true if the page enumeration should be started or is not yet complete.
23210func (page VirtualNetworkGatewayConnectionListResultPage) NotDone() bool {
23211	return !page.vngclr.IsEmpty()
23212}
23213
23214// Response returns the raw server response from the last page request.
23215func (page VirtualNetworkGatewayConnectionListResultPage) Response() VirtualNetworkGatewayConnectionListResult {
23216	return page.vngclr
23217}
23218
23219// Values returns the slice of values for the current page or nil if there are no values.
23220func (page VirtualNetworkGatewayConnectionListResultPage) Values() []VirtualNetworkGatewayConnection {
23221	if page.vngclr.IsEmpty() {
23222		return nil
23223	}
23224	return *page.vngclr.Value
23225}
23226
23227// Creates a new instance of the VirtualNetworkGatewayConnectionListResultPage type.
23228func NewVirtualNetworkGatewayConnectionListResultPage(cur VirtualNetworkGatewayConnectionListResult, getNextPage func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)) VirtualNetworkGatewayConnectionListResultPage {
23229	return VirtualNetworkGatewayConnectionListResultPage{
23230		fn:     getNextPage,
23231		vngclr: cur,
23232	}
23233}
23234
23235// VirtualNetworkGatewayConnectionPropertiesFormat virtualNetworkGatewayConnection properties
23236type VirtualNetworkGatewayConnectionPropertiesFormat struct {
23237	// AuthorizationKey - The authorizationKey.
23238	AuthorizationKey *string `json:"authorizationKey,omitempty"`
23239	// VirtualNetworkGateway1 - The reference to virtual network gateway resource.
23240	VirtualNetworkGateway1 *VirtualNetworkGateway `json:"virtualNetworkGateway1,omitempty"`
23241	// VirtualNetworkGateway2 - The reference to virtual network gateway resource.
23242	VirtualNetworkGateway2 *VirtualNetworkGateway `json:"virtualNetworkGateway2,omitempty"`
23243	// LocalNetworkGateway2 - The reference to local network gateway resource.
23244	LocalNetworkGateway2 *LocalNetworkGateway `json:"localNetworkGateway2,omitempty"`
23245	// ConnectionType - Gateway connection type. Possible values are: 'Ipsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'
23246	ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"`
23247	// ConnectionProtocol - Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1'
23248	ConnectionProtocol VirtualNetworkGatewayConnectionProtocol `json:"connectionProtocol,omitempty"`
23249	// RoutingWeight - The routing weight.
23250	RoutingWeight *int32 `json:"routingWeight,omitempty"`
23251	// SharedKey - The IPSec shared key.
23252	SharedKey *string `json:"sharedKey,omitempty"`
23253	// ConnectionStatus - READ-ONLY; Virtual network Gateway connection status. Possible values are 'Unknown', 'Connecting', 'Connected' and 'NotConnected'. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
23254	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
23255	// TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status.
23256	TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"`
23257	// EgressBytesTransferred - READ-ONLY; The egress bytes transferred in this connection.
23258	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
23259	// IngressBytesTransferred - READ-ONLY; The ingress bytes transferred in this connection.
23260	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
23261	// Peer - The reference to peerings resource.
23262	Peer *SubResource `json:"peer,omitempty"`
23263	// EnableBgp - EnableBgp flag
23264	EnableBgp *bool `json:"enableBgp,omitempty"`
23265	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
23266	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
23267	// IpsecPolicies - The IPSec Policies to be considered by this connection.
23268	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
23269	// ResourceGUID - The resource GUID property of the VirtualNetworkGatewayConnection resource.
23270	ResourceGUID *string `json:"resourceGuid,omitempty"`
23271	// ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGatewayConnection resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
23272	ProvisioningState *string `json:"provisioningState,omitempty"`
23273	// ExpressRouteGatewayBypass - Bypass ExpressRoute Gateway for data forwarding
23274	ExpressRouteGatewayBypass *bool `json:"expressRouteGatewayBypass,omitempty"`
23275}
23276
23277// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionPropertiesFormat.
23278func (vngcpf VirtualNetworkGatewayConnectionPropertiesFormat) MarshalJSON() ([]byte, error) {
23279	objectMap := make(map[string]interface{})
23280	if vngcpf.AuthorizationKey != nil {
23281		objectMap["authorizationKey"] = vngcpf.AuthorizationKey
23282	}
23283	if vngcpf.VirtualNetworkGateway1 != nil {
23284		objectMap["virtualNetworkGateway1"] = vngcpf.VirtualNetworkGateway1
23285	}
23286	if vngcpf.VirtualNetworkGateway2 != nil {
23287		objectMap["virtualNetworkGateway2"] = vngcpf.VirtualNetworkGateway2
23288	}
23289	if vngcpf.LocalNetworkGateway2 != nil {
23290		objectMap["localNetworkGateway2"] = vngcpf.LocalNetworkGateway2
23291	}
23292	if vngcpf.ConnectionType != "" {
23293		objectMap["connectionType"] = vngcpf.ConnectionType
23294	}
23295	if vngcpf.ConnectionProtocol != "" {
23296		objectMap["connectionProtocol"] = vngcpf.ConnectionProtocol
23297	}
23298	if vngcpf.RoutingWeight != nil {
23299		objectMap["routingWeight"] = vngcpf.RoutingWeight
23300	}
23301	if vngcpf.SharedKey != nil {
23302		objectMap["sharedKey"] = vngcpf.SharedKey
23303	}
23304	if vngcpf.Peer != nil {
23305		objectMap["peer"] = vngcpf.Peer
23306	}
23307	if vngcpf.EnableBgp != nil {
23308		objectMap["enableBgp"] = vngcpf.EnableBgp
23309	}
23310	if vngcpf.UsePolicyBasedTrafficSelectors != nil {
23311		objectMap["usePolicyBasedTrafficSelectors"] = vngcpf.UsePolicyBasedTrafficSelectors
23312	}
23313	if vngcpf.IpsecPolicies != nil {
23314		objectMap["ipsecPolicies"] = vngcpf.IpsecPolicies
23315	}
23316	if vngcpf.ResourceGUID != nil {
23317		objectMap["resourceGuid"] = vngcpf.ResourceGUID
23318	}
23319	if vngcpf.ExpressRouteGatewayBypass != nil {
23320		objectMap["expressRouteGatewayBypass"] = vngcpf.ExpressRouteGatewayBypass
23321	}
23322	return json.Marshal(objectMap)
23323}
23324
23325// VirtualNetworkGatewayConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
23326// results of a long-running operation.
23327type VirtualNetworkGatewayConnectionsCreateOrUpdateFuture struct {
23328	azure.FutureAPI
23329	// Result returns the result of the asynchronous operation.
23330	// If the operation has not completed it will return an error.
23331	Result func(VirtualNetworkGatewayConnectionsClient) (VirtualNetworkGatewayConnection, error)
23332}
23333
23334// VirtualNetworkGatewayConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of
23335// a long-running operation.
23336type VirtualNetworkGatewayConnectionsDeleteFuture struct {
23337	azure.FutureAPI
23338	// Result returns the result of the asynchronous operation.
23339	// If the operation has not completed it will return an error.
23340	Result func(VirtualNetworkGatewayConnectionsClient) (autorest.Response, error)
23341}
23342
23343// VirtualNetworkGatewayConnectionsResetSharedKeyFuture an abstraction for monitoring and retrieving the
23344// results of a long-running operation.
23345type VirtualNetworkGatewayConnectionsResetSharedKeyFuture struct {
23346	azure.FutureAPI
23347	// Result returns the result of the asynchronous operation.
23348	// If the operation has not completed it will return an error.
23349	Result func(VirtualNetworkGatewayConnectionsClient) (ConnectionResetSharedKey, error)
23350}
23351
23352// VirtualNetworkGatewayConnectionsSetSharedKeyFuture an abstraction for monitoring and retrieving the
23353// results of a long-running operation.
23354type VirtualNetworkGatewayConnectionsSetSharedKeyFuture struct {
23355	azure.FutureAPI
23356	// Result returns the result of the asynchronous operation.
23357	// If the operation has not completed it will return an error.
23358	Result func(VirtualNetworkGatewayConnectionsClient) (ConnectionSharedKey, error)
23359}
23360
23361// VirtualNetworkGatewayConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the
23362// results of a long-running operation.
23363type VirtualNetworkGatewayConnectionsUpdateTagsFuture struct {
23364	azure.FutureAPI
23365	// Result returns the result of the asynchronous operation.
23366	// If the operation has not completed it will return an error.
23367	Result func(VirtualNetworkGatewayConnectionsClient) (VirtualNetworkGatewayConnection, error)
23368}
23369
23370// VirtualNetworkGatewayIPConfiguration IP configuration for virtual network gateway
23371type VirtualNetworkGatewayIPConfiguration struct {
23372	// VirtualNetworkGatewayIPConfigurationPropertiesFormat - Properties of the virtual network gateway ip configuration.
23373	*VirtualNetworkGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"`
23374	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
23375	Name *string `json:"name,omitempty"`
23376	// Etag - A unique read-only string that changes whenever the resource is updated.
23377	Etag *string `json:"etag,omitempty"`
23378	// ID - Resource ID.
23379	ID *string `json:"id,omitempty"`
23380}
23381
23382// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfiguration.
23383func (vngic VirtualNetworkGatewayIPConfiguration) MarshalJSON() ([]byte, error) {
23384	objectMap := make(map[string]interface{})
23385	if vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat != nil {
23386		objectMap["properties"] = vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat
23387	}
23388	if vngic.Name != nil {
23389		objectMap["name"] = vngic.Name
23390	}
23391	if vngic.Etag != nil {
23392		objectMap["etag"] = vngic.Etag
23393	}
23394	if vngic.ID != nil {
23395		objectMap["id"] = vngic.ID
23396	}
23397	return json.Marshal(objectMap)
23398}
23399
23400// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayIPConfiguration struct.
23401func (vngic *VirtualNetworkGatewayIPConfiguration) UnmarshalJSON(body []byte) error {
23402	var m map[string]*json.RawMessage
23403	err := json.Unmarshal(body, &m)
23404	if err != nil {
23405		return err
23406	}
23407	for k, v := range m {
23408		switch k {
23409		case "properties":
23410			if v != nil {
23411				var virtualNetworkGatewayIPConfigurationPropertiesFormat VirtualNetworkGatewayIPConfigurationPropertiesFormat
23412				err = json.Unmarshal(*v, &virtualNetworkGatewayIPConfigurationPropertiesFormat)
23413				if err != nil {
23414					return err
23415				}
23416				vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat = &virtualNetworkGatewayIPConfigurationPropertiesFormat
23417			}
23418		case "name":
23419			if v != nil {
23420				var name string
23421				err = json.Unmarshal(*v, &name)
23422				if err != nil {
23423					return err
23424				}
23425				vngic.Name = &name
23426			}
23427		case "etag":
23428			if v != nil {
23429				var etag string
23430				err = json.Unmarshal(*v, &etag)
23431				if err != nil {
23432					return err
23433				}
23434				vngic.Etag = &etag
23435			}
23436		case "id":
23437			if v != nil {
23438				var ID string
23439				err = json.Unmarshal(*v, &ID)
23440				if err != nil {
23441					return err
23442				}
23443				vngic.ID = &ID
23444			}
23445		}
23446	}
23447
23448	return nil
23449}
23450
23451// VirtualNetworkGatewayIPConfigurationPropertiesFormat properties of VirtualNetworkGatewayIPConfiguration
23452type VirtualNetworkGatewayIPConfigurationPropertiesFormat struct {
23453	// PrivateIPAllocationMethod - The private IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
23454	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
23455	// Subnet - The reference of the subnet resource.
23456	Subnet *SubResource `json:"subnet,omitempty"`
23457	// PublicIPAddress - The reference of the public IP resource.
23458	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
23459	// ProvisioningState - READ-ONLY; The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
23460	ProvisioningState *string `json:"provisioningState,omitempty"`
23461}
23462
23463// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfigurationPropertiesFormat.
23464func (vngicpf VirtualNetworkGatewayIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
23465	objectMap := make(map[string]interface{})
23466	if vngicpf.PrivateIPAllocationMethod != "" {
23467		objectMap["privateIPAllocationMethod"] = vngicpf.PrivateIPAllocationMethod
23468	}
23469	if vngicpf.Subnet != nil {
23470		objectMap["subnet"] = vngicpf.Subnet
23471	}
23472	if vngicpf.PublicIPAddress != nil {
23473		objectMap["publicIPAddress"] = vngicpf.PublicIPAddress
23474	}
23475	return json.Marshal(objectMap)
23476}
23477
23478// VirtualNetworkGatewayListConnectionsResult response for the VirtualNetworkGatewayListConnections API
23479// service call
23480type VirtualNetworkGatewayListConnectionsResult struct {
23481	autorest.Response `json:"-"`
23482	// Value - Gets a list of VirtualNetworkGatewayConnection resources that exists in a resource group.
23483	Value *[]VirtualNetworkGatewayConnectionListEntity `json:"value,omitempty"`
23484	// NextLink - READ-ONLY; The URL to get the next set of results.
23485	NextLink *string `json:"nextLink,omitempty"`
23486}
23487
23488// MarshalJSON is the custom marshaler for VirtualNetworkGatewayListConnectionsResult.
23489func (vnglcr VirtualNetworkGatewayListConnectionsResult) MarshalJSON() ([]byte, error) {
23490	objectMap := make(map[string]interface{})
23491	if vnglcr.Value != nil {
23492		objectMap["value"] = vnglcr.Value
23493	}
23494	return json.Marshal(objectMap)
23495}
23496
23497// VirtualNetworkGatewayListConnectionsResultIterator provides access to a complete listing of
23498// VirtualNetworkGatewayConnectionListEntity values.
23499type VirtualNetworkGatewayListConnectionsResultIterator struct {
23500	i    int
23501	page VirtualNetworkGatewayListConnectionsResultPage
23502}
23503
23504// NextWithContext advances to the next value.  If there was an error making
23505// the request the iterator does not advance and the error is returned.
23506func (iter *VirtualNetworkGatewayListConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
23507	if tracing.IsEnabled() {
23508		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultIterator.NextWithContext")
23509		defer func() {
23510			sc := -1
23511			if iter.Response().Response.Response != nil {
23512				sc = iter.Response().Response.Response.StatusCode
23513			}
23514			tracing.EndSpan(ctx, sc, err)
23515		}()
23516	}
23517	iter.i++
23518	if iter.i < len(iter.page.Values()) {
23519		return nil
23520	}
23521	err = iter.page.NextWithContext(ctx)
23522	if err != nil {
23523		iter.i--
23524		return err
23525	}
23526	iter.i = 0
23527	return nil
23528}
23529
23530// Next advances to the next value.  If there was an error making
23531// the request the iterator does not advance and the error is returned.
23532// Deprecated: Use NextWithContext() instead.
23533func (iter *VirtualNetworkGatewayListConnectionsResultIterator) Next() error {
23534	return iter.NextWithContext(context.Background())
23535}
23536
23537// NotDone returns true if the enumeration should be started or is not yet complete.
23538func (iter VirtualNetworkGatewayListConnectionsResultIterator) NotDone() bool {
23539	return iter.page.NotDone() && iter.i < len(iter.page.Values())
23540}
23541
23542// Response returns the raw server response from the last page request.
23543func (iter VirtualNetworkGatewayListConnectionsResultIterator) Response() VirtualNetworkGatewayListConnectionsResult {
23544	return iter.page.Response()
23545}
23546
23547// Value returns the current value or a zero-initialized value if the
23548// iterator has advanced beyond the end of the collection.
23549func (iter VirtualNetworkGatewayListConnectionsResultIterator) Value() VirtualNetworkGatewayConnectionListEntity {
23550	if !iter.page.NotDone() {
23551		return VirtualNetworkGatewayConnectionListEntity{}
23552	}
23553	return iter.page.Values()[iter.i]
23554}
23555
23556// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultIterator type.
23557func NewVirtualNetworkGatewayListConnectionsResultIterator(page VirtualNetworkGatewayListConnectionsResultPage) VirtualNetworkGatewayListConnectionsResultIterator {
23558	return VirtualNetworkGatewayListConnectionsResultIterator{page: page}
23559}
23560
23561// IsEmpty returns true if the ListResult contains no values.
23562func (vnglcr VirtualNetworkGatewayListConnectionsResult) IsEmpty() bool {
23563	return vnglcr.Value == nil || len(*vnglcr.Value) == 0
23564}
23565
23566// hasNextLink returns true if the NextLink is not empty.
23567func (vnglcr VirtualNetworkGatewayListConnectionsResult) hasNextLink() bool {
23568	return vnglcr.NextLink != nil && len(*vnglcr.NextLink) != 0
23569}
23570
23571// virtualNetworkGatewayListConnectionsResultPreparer prepares a request to retrieve the next set of results.
23572// It returns nil if no more results exist.
23573func (vnglcr VirtualNetworkGatewayListConnectionsResult) virtualNetworkGatewayListConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
23574	if !vnglcr.hasNextLink() {
23575		return nil, nil
23576	}
23577	return autorest.Prepare((&http.Request{}).WithContext(ctx),
23578		autorest.AsJSON(),
23579		autorest.AsGet(),
23580		autorest.WithBaseURL(to.String(vnglcr.NextLink)))
23581}
23582
23583// VirtualNetworkGatewayListConnectionsResultPage contains a page of
23584// VirtualNetworkGatewayConnectionListEntity values.
23585type VirtualNetworkGatewayListConnectionsResultPage struct {
23586	fn     func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)
23587	vnglcr VirtualNetworkGatewayListConnectionsResult
23588}
23589
23590// NextWithContext advances to the next page of values.  If there was an error making
23591// the request the page does not advance and the error is returned.
23592func (page *VirtualNetworkGatewayListConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
23593	if tracing.IsEnabled() {
23594		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultPage.NextWithContext")
23595		defer func() {
23596			sc := -1
23597			if page.Response().Response.Response != nil {
23598				sc = page.Response().Response.Response.StatusCode
23599			}
23600			tracing.EndSpan(ctx, sc, err)
23601		}()
23602	}
23603	for {
23604		next, err := page.fn(ctx, page.vnglcr)
23605		if err != nil {
23606			return err
23607		}
23608		page.vnglcr = next
23609		if !next.hasNextLink() || !next.IsEmpty() {
23610			break
23611		}
23612	}
23613	return nil
23614}
23615
23616// Next advances to the next page of values.  If there was an error making
23617// the request the page does not advance and the error is returned.
23618// Deprecated: Use NextWithContext() instead.
23619func (page *VirtualNetworkGatewayListConnectionsResultPage) Next() error {
23620	return page.NextWithContext(context.Background())
23621}
23622
23623// NotDone returns true if the page enumeration should be started or is not yet complete.
23624func (page VirtualNetworkGatewayListConnectionsResultPage) NotDone() bool {
23625	return !page.vnglcr.IsEmpty()
23626}
23627
23628// Response returns the raw server response from the last page request.
23629func (page VirtualNetworkGatewayListConnectionsResultPage) Response() VirtualNetworkGatewayListConnectionsResult {
23630	return page.vnglcr
23631}
23632
23633// Values returns the slice of values for the current page or nil if there are no values.
23634func (page VirtualNetworkGatewayListConnectionsResultPage) Values() []VirtualNetworkGatewayConnectionListEntity {
23635	if page.vnglcr.IsEmpty() {
23636		return nil
23637	}
23638	return *page.vnglcr.Value
23639}
23640
23641// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultPage type.
23642func NewVirtualNetworkGatewayListConnectionsResultPage(cur VirtualNetworkGatewayListConnectionsResult, getNextPage func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)) VirtualNetworkGatewayListConnectionsResultPage {
23643	return VirtualNetworkGatewayListConnectionsResultPage{
23644		fn:     getNextPage,
23645		vnglcr: cur,
23646	}
23647}
23648
23649// VirtualNetworkGatewayListResult response for the ListVirtualNetworkGateways API service call.
23650type VirtualNetworkGatewayListResult struct {
23651	autorest.Response `json:"-"`
23652	// Value - Gets a list of VirtualNetworkGateway resources that exists in a resource group.
23653	Value *[]VirtualNetworkGateway `json:"value,omitempty"`
23654	// NextLink - READ-ONLY; The URL to get the next set of results.
23655	NextLink *string `json:"nextLink,omitempty"`
23656}
23657
23658// MarshalJSON is the custom marshaler for VirtualNetworkGatewayListResult.
23659func (vnglr VirtualNetworkGatewayListResult) MarshalJSON() ([]byte, error) {
23660	objectMap := make(map[string]interface{})
23661	if vnglr.Value != nil {
23662		objectMap["value"] = vnglr.Value
23663	}
23664	return json.Marshal(objectMap)
23665}
23666
23667// VirtualNetworkGatewayListResultIterator provides access to a complete listing of VirtualNetworkGateway
23668// values.
23669type VirtualNetworkGatewayListResultIterator struct {
23670	i    int
23671	page VirtualNetworkGatewayListResultPage
23672}
23673
23674// NextWithContext advances to the next value.  If there was an error making
23675// the request the iterator does not advance and the error is returned.
23676func (iter *VirtualNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
23677	if tracing.IsEnabled() {
23678		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultIterator.NextWithContext")
23679		defer func() {
23680			sc := -1
23681			if iter.Response().Response.Response != nil {
23682				sc = iter.Response().Response.Response.StatusCode
23683			}
23684			tracing.EndSpan(ctx, sc, err)
23685		}()
23686	}
23687	iter.i++
23688	if iter.i < len(iter.page.Values()) {
23689		return nil
23690	}
23691	err = iter.page.NextWithContext(ctx)
23692	if err != nil {
23693		iter.i--
23694		return err
23695	}
23696	iter.i = 0
23697	return nil
23698}
23699
23700// Next advances to the next value.  If there was an error making
23701// the request the iterator does not advance and the error is returned.
23702// Deprecated: Use NextWithContext() instead.
23703func (iter *VirtualNetworkGatewayListResultIterator) Next() error {
23704	return iter.NextWithContext(context.Background())
23705}
23706
23707// NotDone returns true if the enumeration should be started or is not yet complete.
23708func (iter VirtualNetworkGatewayListResultIterator) NotDone() bool {
23709	return iter.page.NotDone() && iter.i < len(iter.page.Values())
23710}
23711
23712// Response returns the raw server response from the last page request.
23713func (iter VirtualNetworkGatewayListResultIterator) Response() VirtualNetworkGatewayListResult {
23714	return iter.page.Response()
23715}
23716
23717// Value returns the current value or a zero-initialized value if the
23718// iterator has advanced beyond the end of the collection.
23719func (iter VirtualNetworkGatewayListResultIterator) Value() VirtualNetworkGateway {
23720	if !iter.page.NotDone() {
23721		return VirtualNetworkGateway{}
23722	}
23723	return iter.page.Values()[iter.i]
23724}
23725
23726// Creates a new instance of the VirtualNetworkGatewayListResultIterator type.
23727func NewVirtualNetworkGatewayListResultIterator(page VirtualNetworkGatewayListResultPage) VirtualNetworkGatewayListResultIterator {
23728	return VirtualNetworkGatewayListResultIterator{page: page}
23729}
23730
23731// IsEmpty returns true if the ListResult contains no values.
23732func (vnglr VirtualNetworkGatewayListResult) IsEmpty() bool {
23733	return vnglr.Value == nil || len(*vnglr.Value) == 0
23734}
23735
23736// hasNextLink returns true if the NextLink is not empty.
23737func (vnglr VirtualNetworkGatewayListResult) hasNextLink() bool {
23738	return vnglr.NextLink != nil && len(*vnglr.NextLink) != 0
23739}
23740
23741// virtualNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results.
23742// It returns nil if no more results exist.
23743func (vnglr VirtualNetworkGatewayListResult) virtualNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
23744	if !vnglr.hasNextLink() {
23745		return nil, nil
23746	}
23747	return autorest.Prepare((&http.Request{}).WithContext(ctx),
23748		autorest.AsJSON(),
23749		autorest.AsGet(),
23750		autorest.WithBaseURL(to.String(vnglr.NextLink)))
23751}
23752
23753// VirtualNetworkGatewayListResultPage contains a page of VirtualNetworkGateway values.
23754type VirtualNetworkGatewayListResultPage struct {
23755	fn    func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)
23756	vnglr VirtualNetworkGatewayListResult
23757}
23758
23759// NextWithContext advances to the next page of values.  If there was an error making
23760// the request the page does not advance and the error is returned.
23761func (page *VirtualNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
23762	if tracing.IsEnabled() {
23763		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultPage.NextWithContext")
23764		defer func() {
23765			sc := -1
23766			if page.Response().Response.Response != nil {
23767				sc = page.Response().Response.Response.StatusCode
23768			}
23769			tracing.EndSpan(ctx, sc, err)
23770		}()
23771	}
23772	for {
23773		next, err := page.fn(ctx, page.vnglr)
23774		if err != nil {
23775			return err
23776		}
23777		page.vnglr = next
23778		if !next.hasNextLink() || !next.IsEmpty() {
23779			break
23780		}
23781	}
23782	return nil
23783}
23784
23785// Next advances to the next page of values.  If there was an error making
23786// the request the page does not advance and the error is returned.
23787// Deprecated: Use NextWithContext() instead.
23788func (page *VirtualNetworkGatewayListResultPage) Next() error {
23789	return page.NextWithContext(context.Background())
23790}
23791
23792// NotDone returns true if the page enumeration should be started or is not yet complete.
23793func (page VirtualNetworkGatewayListResultPage) NotDone() bool {
23794	return !page.vnglr.IsEmpty()
23795}
23796
23797// Response returns the raw server response from the last page request.
23798func (page VirtualNetworkGatewayListResultPage) Response() VirtualNetworkGatewayListResult {
23799	return page.vnglr
23800}
23801
23802// Values returns the slice of values for the current page or nil if there are no values.
23803func (page VirtualNetworkGatewayListResultPage) Values() []VirtualNetworkGateway {
23804	if page.vnglr.IsEmpty() {
23805		return nil
23806	}
23807	return *page.vnglr.Value
23808}
23809
23810// Creates a new instance of the VirtualNetworkGatewayListResultPage type.
23811func NewVirtualNetworkGatewayListResultPage(cur VirtualNetworkGatewayListResult, getNextPage func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)) VirtualNetworkGatewayListResultPage {
23812	return VirtualNetworkGatewayListResultPage{
23813		fn:    getNextPage,
23814		vnglr: cur,
23815	}
23816}
23817
23818// VirtualNetworkGatewayPropertiesFormat virtualNetworkGateway properties
23819type VirtualNetworkGatewayPropertiesFormat struct {
23820	// IPConfigurations - IP configurations for virtual network gateway.
23821	IPConfigurations *[]VirtualNetworkGatewayIPConfiguration `json:"ipConfigurations,omitempty"`
23822	// GatewayType - The type of this virtual network gateway. Possible values are: 'Vpn' and 'ExpressRoute'. Possible values include: 'VirtualNetworkGatewayTypeVpn', 'VirtualNetworkGatewayTypeExpressRoute'
23823	GatewayType VirtualNetworkGatewayType `json:"gatewayType,omitempty"`
23824	// VpnType - The type of this virtual network gateway. Possible values are: 'PolicyBased' and 'RouteBased'. Possible values include: 'PolicyBased', 'RouteBased'
23825	VpnType VpnType `json:"vpnType,omitempty"`
23826	// EnableBgp - Whether BGP is enabled for this virtual network gateway or not.
23827	EnableBgp *bool `json:"enableBgp,omitempty"`
23828	// ActiveActive - ActiveActive flag
23829	ActiveActive *bool `json:"activeActive,omitempty"`
23830	// GatewayDefaultSite - The reference of the LocalNetworkGateway resource which represents local network site having default routes. Assign Null value in case of removing existing default site setting.
23831	GatewayDefaultSite *SubResource `json:"gatewayDefaultSite,omitempty"`
23832	// Sku - The reference of the VirtualNetworkGatewaySku resource which represents the SKU selected for Virtual network gateway.
23833	Sku *VirtualNetworkGatewaySku `json:"sku,omitempty"`
23834	// VpnClientConfiguration - The reference of the VpnClientConfiguration resource which represents the P2S VpnClient configurations.
23835	VpnClientConfiguration *VpnClientConfiguration `json:"vpnClientConfiguration,omitempty"`
23836	// BgpSettings - Virtual network gateway's BGP speaker settings.
23837	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
23838	// ResourceGUID - The resource GUID property of the VirtualNetworkGateway resource.
23839	ResourceGUID *string `json:"resourceGuid,omitempty"`
23840	// ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
23841	ProvisioningState *string `json:"provisioningState,omitempty"`
23842}
23843
23844// MarshalJSON is the custom marshaler for VirtualNetworkGatewayPropertiesFormat.
23845func (vngpf VirtualNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
23846	objectMap := make(map[string]interface{})
23847	if vngpf.IPConfigurations != nil {
23848		objectMap["ipConfigurations"] = vngpf.IPConfigurations
23849	}
23850	if vngpf.GatewayType != "" {
23851		objectMap["gatewayType"] = vngpf.GatewayType
23852	}
23853	if vngpf.VpnType != "" {
23854		objectMap["vpnType"] = vngpf.VpnType
23855	}
23856	if vngpf.EnableBgp != nil {
23857		objectMap["enableBgp"] = vngpf.EnableBgp
23858	}
23859	if vngpf.ActiveActive != nil {
23860		objectMap["activeActive"] = vngpf.ActiveActive
23861	}
23862	if vngpf.GatewayDefaultSite != nil {
23863		objectMap["gatewayDefaultSite"] = vngpf.GatewayDefaultSite
23864	}
23865	if vngpf.Sku != nil {
23866		objectMap["sku"] = vngpf.Sku
23867	}
23868	if vngpf.VpnClientConfiguration != nil {
23869		objectMap["vpnClientConfiguration"] = vngpf.VpnClientConfiguration
23870	}
23871	if vngpf.BgpSettings != nil {
23872		objectMap["bgpSettings"] = vngpf.BgpSettings
23873	}
23874	if vngpf.ResourceGUID != nil {
23875		objectMap["resourceGuid"] = vngpf.ResourceGUID
23876	}
23877	return json.Marshal(objectMap)
23878}
23879
23880// VirtualNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
23881// long-running operation.
23882type VirtualNetworkGatewaysCreateOrUpdateFuture struct {
23883	azure.FutureAPI
23884	// Result returns the result of the asynchronous operation.
23885	// If the operation has not completed it will return an error.
23886	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
23887}
23888
23889// VirtualNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
23890// long-running operation.
23891type VirtualNetworkGatewaysDeleteFuture struct {
23892	azure.FutureAPI
23893	// Result returns the result of the asynchronous operation.
23894	// If the operation has not completed it will return an error.
23895	Result func(VirtualNetworkGatewaysClient) (autorest.Response, error)
23896}
23897
23898// VirtualNetworkGatewaysGeneratevpnclientpackageFuture an abstraction for monitoring and retrieving the
23899// results of a long-running operation.
23900type VirtualNetworkGatewaysGeneratevpnclientpackageFuture struct {
23901	azure.FutureAPI
23902	// Result returns the result of the asynchronous operation.
23903	// If the operation has not completed it will return an error.
23904	Result func(VirtualNetworkGatewaysClient) (String, error)
23905}
23906
23907// VirtualNetworkGatewaysGenerateVpnProfileFuture an abstraction for monitoring and retrieving the results
23908// of a long-running operation.
23909type VirtualNetworkGatewaysGenerateVpnProfileFuture struct {
23910	azure.FutureAPI
23911	// Result returns the result of the asynchronous operation.
23912	// If the operation has not completed it will return an error.
23913	Result func(VirtualNetworkGatewaysClient) (String, error)
23914}
23915
23916// VirtualNetworkGatewaysGetAdvertisedRoutesFuture an abstraction for monitoring and retrieving the results
23917// of a long-running operation.
23918type VirtualNetworkGatewaysGetAdvertisedRoutesFuture struct {
23919	azure.FutureAPI
23920	// Result returns the result of the asynchronous operation.
23921	// If the operation has not completed it will return an error.
23922	Result func(VirtualNetworkGatewaysClient) (GatewayRouteListResult, error)
23923}
23924
23925// VirtualNetworkGatewaysGetBgpPeerStatusFuture an abstraction for monitoring and retrieving the results of
23926// a long-running operation.
23927type VirtualNetworkGatewaysGetBgpPeerStatusFuture struct {
23928	azure.FutureAPI
23929	// Result returns the result of the asynchronous operation.
23930	// If the operation has not completed it will return an error.
23931	Result func(VirtualNetworkGatewaysClient) (BgpPeerStatusListResult, error)
23932}
23933
23934// VirtualNetworkGatewaysGetLearnedRoutesFuture an abstraction for monitoring and retrieving the results of
23935// a long-running operation.
23936type VirtualNetworkGatewaysGetLearnedRoutesFuture struct {
23937	azure.FutureAPI
23938	// Result returns the result of the asynchronous operation.
23939	// If the operation has not completed it will return an error.
23940	Result func(VirtualNetworkGatewaysClient) (GatewayRouteListResult, error)
23941}
23942
23943// VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture an abstraction for monitoring and retrieving the
23944// results of a long-running operation.
23945type VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture struct {
23946	azure.FutureAPI
23947	// Result returns the result of the asynchronous operation.
23948	// If the operation has not completed it will return an error.
23949	Result func(VirtualNetworkGatewaysClient) (VpnClientIPsecParameters, error)
23950}
23951
23952// VirtualNetworkGatewaysGetVpnProfilePackageURLFuture an abstraction for monitoring and retrieving the
23953// results of a long-running operation.
23954type VirtualNetworkGatewaysGetVpnProfilePackageURLFuture struct {
23955	azure.FutureAPI
23956	// Result returns the result of the asynchronous operation.
23957	// If the operation has not completed it will return an error.
23958	Result func(VirtualNetworkGatewaysClient) (String, error)
23959}
23960
23961// VirtualNetworkGatewaySku virtualNetworkGatewaySku details
23962type VirtualNetworkGatewaySku struct {
23963	// Name - Gateway SKU name. Possible values include: 'VirtualNetworkGatewaySkuNameBasic', 'VirtualNetworkGatewaySkuNameHighPerformance', 'VirtualNetworkGatewaySkuNameStandard', 'VirtualNetworkGatewaySkuNameUltraPerformance', 'VirtualNetworkGatewaySkuNameVpnGw1', 'VirtualNetworkGatewaySkuNameVpnGw2', 'VirtualNetworkGatewaySkuNameVpnGw3', 'VirtualNetworkGatewaySkuNameVpnGw1AZ', 'VirtualNetworkGatewaySkuNameVpnGw2AZ', 'VirtualNetworkGatewaySkuNameVpnGw3AZ', 'VirtualNetworkGatewaySkuNameErGw1AZ', 'VirtualNetworkGatewaySkuNameErGw2AZ', 'VirtualNetworkGatewaySkuNameErGw3AZ'
23964	Name VirtualNetworkGatewaySkuName `json:"name,omitempty"`
23965	// Tier - Gateway SKU tier. Possible values include: 'VirtualNetworkGatewaySkuTierBasic', 'VirtualNetworkGatewaySkuTierHighPerformance', 'VirtualNetworkGatewaySkuTierStandard', 'VirtualNetworkGatewaySkuTierUltraPerformance', 'VirtualNetworkGatewaySkuTierVpnGw1', 'VirtualNetworkGatewaySkuTierVpnGw2', 'VirtualNetworkGatewaySkuTierVpnGw3', 'VirtualNetworkGatewaySkuTierVpnGw1AZ', 'VirtualNetworkGatewaySkuTierVpnGw2AZ', 'VirtualNetworkGatewaySkuTierVpnGw3AZ', 'VirtualNetworkGatewaySkuTierErGw1AZ', 'VirtualNetworkGatewaySkuTierErGw2AZ', 'VirtualNetworkGatewaySkuTierErGw3AZ'
23966	Tier VirtualNetworkGatewaySkuTier `json:"tier,omitempty"`
23967	// Capacity - The capacity.
23968	Capacity *int32 `json:"capacity,omitempty"`
23969}
23970
23971// VirtualNetworkGatewaysResetFuture an abstraction for monitoring and retrieving the results of a
23972// long-running operation.
23973type VirtualNetworkGatewaysResetFuture struct {
23974	azure.FutureAPI
23975	// Result returns the result of the asynchronous operation.
23976	// If the operation has not completed it will return an error.
23977	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
23978}
23979
23980// VirtualNetworkGatewaysResetVpnClientSharedKeyFuture an abstraction for monitoring and retrieving the
23981// results of a long-running operation.
23982type VirtualNetworkGatewaysResetVpnClientSharedKeyFuture struct {
23983	azure.FutureAPI
23984	// Result returns the result of the asynchronous operation.
23985	// If the operation has not completed it will return an error.
23986	Result func(VirtualNetworkGatewaysClient) (autorest.Response, error)
23987}
23988
23989// VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture an abstraction for monitoring and retrieving the
23990// results of a long-running operation.
23991type VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture struct {
23992	azure.FutureAPI
23993	// Result returns the result of the asynchronous operation.
23994	// If the operation has not completed it will return an error.
23995	Result func(VirtualNetworkGatewaysClient) (VpnClientIPsecParameters, error)
23996}
23997
23998// VirtualNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
23999// long-running operation.
24000type VirtualNetworkGatewaysUpdateTagsFuture struct {
24001	azure.FutureAPI
24002	// Result returns the result of the asynchronous operation.
24003	// If the operation has not completed it will return an error.
24004	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
24005}
24006
24007// VirtualNetworkListResult response for the ListVirtualNetworks API service call.
24008type VirtualNetworkListResult struct {
24009	autorest.Response `json:"-"`
24010	// Value - Gets a list of VirtualNetwork resources in a resource group.
24011	Value *[]VirtualNetwork `json:"value,omitempty"`
24012	// NextLink - The URL to get the next set of results.
24013	NextLink *string `json:"nextLink,omitempty"`
24014}
24015
24016// VirtualNetworkListResultIterator provides access to a complete listing of VirtualNetwork values.
24017type VirtualNetworkListResultIterator struct {
24018	i    int
24019	page VirtualNetworkListResultPage
24020}
24021
24022// NextWithContext advances to the next value.  If there was an error making
24023// the request the iterator does not advance and the error is returned.
24024func (iter *VirtualNetworkListResultIterator) NextWithContext(ctx context.Context) (err error) {
24025	if tracing.IsEnabled() {
24026		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultIterator.NextWithContext")
24027		defer func() {
24028			sc := -1
24029			if iter.Response().Response.Response != nil {
24030				sc = iter.Response().Response.Response.StatusCode
24031			}
24032			tracing.EndSpan(ctx, sc, err)
24033		}()
24034	}
24035	iter.i++
24036	if iter.i < len(iter.page.Values()) {
24037		return nil
24038	}
24039	err = iter.page.NextWithContext(ctx)
24040	if err != nil {
24041		iter.i--
24042		return err
24043	}
24044	iter.i = 0
24045	return nil
24046}
24047
24048// Next advances to the next value.  If there was an error making
24049// the request the iterator does not advance and the error is returned.
24050// Deprecated: Use NextWithContext() instead.
24051func (iter *VirtualNetworkListResultIterator) Next() error {
24052	return iter.NextWithContext(context.Background())
24053}
24054
24055// NotDone returns true if the enumeration should be started or is not yet complete.
24056func (iter VirtualNetworkListResultIterator) NotDone() bool {
24057	return iter.page.NotDone() && iter.i < len(iter.page.Values())
24058}
24059
24060// Response returns the raw server response from the last page request.
24061func (iter VirtualNetworkListResultIterator) Response() VirtualNetworkListResult {
24062	return iter.page.Response()
24063}
24064
24065// Value returns the current value or a zero-initialized value if the
24066// iterator has advanced beyond the end of the collection.
24067func (iter VirtualNetworkListResultIterator) Value() VirtualNetwork {
24068	if !iter.page.NotDone() {
24069		return VirtualNetwork{}
24070	}
24071	return iter.page.Values()[iter.i]
24072}
24073
24074// Creates a new instance of the VirtualNetworkListResultIterator type.
24075func NewVirtualNetworkListResultIterator(page VirtualNetworkListResultPage) VirtualNetworkListResultIterator {
24076	return VirtualNetworkListResultIterator{page: page}
24077}
24078
24079// IsEmpty returns true if the ListResult contains no values.
24080func (vnlr VirtualNetworkListResult) IsEmpty() bool {
24081	return vnlr.Value == nil || len(*vnlr.Value) == 0
24082}
24083
24084// hasNextLink returns true if the NextLink is not empty.
24085func (vnlr VirtualNetworkListResult) hasNextLink() bool {
24086	return vnlr.NextLink != nil && len(*vnlr.NextLink) != 0
24087}
24088
24089// virtualNetworkListResultPreparer prepares a request to retrieve the next set of results.
24090// It returns nil if no more results exist.
24091func (vnlr VirtualNetworkListResult) virtualNetworkListResultPreparer(ctx context.Context) (*http.Request, error) {
24092	if !vnlr.hasNextLink() {
24093		return nil, nil
24094	}
24095	return autorest.Prepare((&http.Request{}).WithContext(ctx),
24096		autorest.AsJSON(),
24097		autorest.AsGet(),
24098		autorest.WithBaseURL(to.String(vnlr.NextLink)))
24099}
24100
24101// VirtualNetworkListResultPage contains a page of VirtualNetwork values.
24102type VirtualNetworkListResultPage struct {
24103	fn   func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)
24104	vnlr VirtualNetworkListResult
24105}
24106
24107// NextWithContext advances to the next page of values.  If there was an error making
24108// the request the page does not advance and the error is returned.
24109func (page *VirtualNetworkListResultPage) NextWithContext(ctx context.Context) (err error) {
24110	if tracing.IsEnabled() {
24111		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultPage.NextWithContext")
24112		defer func() {
24113			sc := -1
24114			if page.Response().Response.Response != nil {
24115				sc = page.Response().Response.Response.StatusCode
24116			}
24117			tracing.EndSpan(ctx, sc, err)
24118		}()
24119	}
24120	for {
24121		next, err := page.fn(ctx, page.vnlr)
24122		if err != nil {
24123			return err
24124		}
24125		page.vnlr = next
24126		if !next.hasNextLink() || !next.IsEmpty() {
24127			break
24128		}
24129	}
24130	return nil
24131}
24132
24133// Next advances to the next page of values.  If there was an error making
24134// the request the page does not advance and the error is returned.
24135// Deprecated: Use NextWithContext() instead.
24136func (page *VirtualNetworkListResultPage) Next() error {
24137	return page.NextWithContext(context.Background())
24138}
24139
24140// NotDone returns true if the page enumeration should be started or is not yet complete.
24141func (page VirtualNetworkListResultPage) NotDone() bool {
24142	return !page.vnlr.IsEmpty()
24143}
24144
24145// Response returns the raw server response from the last page request.
24146func (page VirtualNetworkListResultPage) Response() VirtualNetworkListResult {
24147	return page.vnlr
24148}
24149
24150// Values returns the slice of values for the current page or nil if there are no values.
24151func (page VirtualNetworkListResultPage) Values() []VirtualNetwork {
24152	if page.vnlr.IsEmpty() {
24153		return nil
24154	}
24155	return *page.vnlr.Value
24156}
24157
24158// Creates a new instance of the VirtualNetworkListResultPage type.
24159func NewVirtualNetworkListResultPage(cur VirtualNetworkListResult, getNextPage func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)) VirtualNetworkListResultPage {
24160	return VirtualNetworkListResultPage{
24161		fn:   getNextPage,
24162		vnlr: cur,
24163	}
24164}
24165
24166// VirtualNetworkListUsageResult response for the virtual networks GetUsage API service call.
24167type VirtualNetworkListUsageResult struct {
24168	autorest.Response `json:"-"`
24169	// Value - READ-ONLY; VirtualNetwork usage stats.
24170	Value *[]VirtualNetworkUsage `json:"value,omitempty"`
24171	// NextLink - The URL to get the next set of results.
24172	NextLink *string `json:"nextLink,omitempty"`
24173}
24174
24175// MarshalJSON is the custom marshaler for VirtualNetworkListUsageResult.
24176func (vnlur VirtualNetworkListUsageResult) MarshalJSON() ([]byte, error) {
24177	objectMap := make(map[string]interface{})
24178	if vnlur.NextLink != nil {
24179		objectMap["nextLink"] = vnlur.NextLink
24180	}
24181	return json.Marshal(objectMap)
24182}
24183
24184// VirtualNetworkListUsageResultIterator provides access to a complete listing of VirtualNetworkUsage
24185// values.
24186type VirtualNetworkListUsageResultIterator struct {
24187	i    int
24188	page VirtualNetworkListUsageResultPage
24189}
24190
24191// NextWithContext advances to the next value.  If there was an error making
24192// the request the iterator does not advance and the error is returned.
24193func (iter *VirtualNetworkListUsageResultIterator) NextWithContext(ctx context.Context) (err error) {
24194	if tracing.IsEnabled() {
24195		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultIterator.NextWithContext")
24196		defer func() {
24197			sc := -1
24198			if iter.Response().Response.Response != nil {
24199				sc = iter.Response().Response.Response.StatusCode
24200			}
24201			tracing.EndSpan(ctx, sc, err)
24202		}()
24203	}
24204	iter.i++
24205	if iter.i < len(iter.page.Values()) {
24206		return nil
24207	}
24208	err = iter.page.NextWithContext(ctx)
24209	if err != nil {
24210		iter.i--
24211		return err
24212	}
24213	iter.i = 0
24214	return nil
24215}
24216
24217// Next advances to the next value.  If there was an error making
24218// the request the iterator does not advance and the error is returned.
24219// Deprecated: Use NextWithContext() instead.
24220func (iter *VirtualNetworkListUsageResultIterator) Next() error {
24221	return iter.NextWithContext(context.Background())
24222}
24223
24224// NotDone returns true if the enumeration should be started or is not yet complete.
24225func (iter VirtualNetworkListUsageResultIterator) NotDone() bool {
24226	return iter.page.NotDone() && iter.i < len(iter.page.Values())
24227}
24228
24229// Response returns the raw server response from the last page request.
24230func (iter VirtualNetworkListUsageResultIterator) Response() VirtualNetworkListUsageResult {
24231	return iter.page.Response()
24232}
24233
24234// Value returns the current value or a zero-initialized value if the
24235// iterator has advanced beyond the end of the collection.
24236func (iter VirtualNetworkListUsageResultIterator) Value() VirtualNetworkUsage {
24237	if !iter.page.NotDone() {
24238		return VirtualNetworkUsage{}
24239	}
24240	return iter.page.Values()[iter.i]
24241}
24242
24243// Creates a new instance of the VirtualNetworkListUsageResultIterator type.
24244func NewVirtualNetworkListUsageResultIterator(page VirtualNetworkListUsageResultPage) VirtualNetworkListUsageResultIterator {
24245	return VirtualNetworkListUsageResultIterator{page: page}
24246}
24247
24248// IsEmpty returns true if the ListResult contains no values.
24249func (vnlur VirtualNetworkListUsageResult) IsEmpty() bool {
24250	return vnlur.Value == nil || len(*vnlur.Value) == 0
24251}
24252
24253// hasNextLink returns true if the NextLink is not empty.
24254func (vnlur VirtualNetworkListUsageResult) hasNextLink() bool {
24255	return vnlur.NextLink != nil && len(*vnlur.NextLink) != 0
24256}
24257
24258// virtualNetworkListUsageResultPreparer prepares a request to retrieve the next set of results.
24259// It returns nil if no more results exist.
24260func (vnlur VirtualNetworkListUsageResult) virtualNetworkListUsageResultPreparer(ctx context.Context) (*http.Request, error) {
24261	if !vnlur.hasNextLink() {
24262		return nil, nil
24263	}
24264	return autorest.Prepare((&http.Request{}).WithContext(ctx),
24265		autorest.AsJSON(),
24266		autorest.AsGet(),
24267		autorest.WithBaseURL(to.String(vnlur.NextLink)))
24268}
24269
24270// VirtualNetworkListUsageResultPage contains a page of VirtualNetworkUsage values.
24271type VirtualNetworkListUsageResultPage struct {
24272	fn    func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)
24273	vnlur VirtualNetworkListUsageResult
24274}
24275
24276// NextWithContext advances to the next page of values.  If there was an error making
24277// the request the page does not advance and the error is returned.
24278func (page *VirtualNetworkListUsageResultPage) NextWithContext(ctx context.Context) (err error) {
24279	if tracing.IsEnabled() {
24280		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultPage.NextWithContext")
24281		defer func() {
24282			sc := -1
24283			if page.Response().Response.Response != nil {
24284				sc = page.Response().Response.Response.StatusCode
24285			}
24286			tracing.EndSpan(ctx, sc, err)
24287		}()
24288	}
24289	for {
24290		next, err := page.fn(ctx, page.vnlur)
24291		if err != nil {
24292			return err
24293		}
24294		page.vnlur = next
24295		if !next.hasNextLink() || !next.IsEmpty() {
24296			break
24297		}
24298	}
24299	return nil
24300}
24301
24302// Next advances to the next page of values.  If there was an error making
24303// the request the page does not advance and the error is returned.
24304// Deprecated: Use NextWithContext() instead.
24305func (page *VirtualNetworkListUsageResultPage) Next() error {
24306	return page.NextWithContext(context.Background())
24307}
24308
24309// NotDone returns true if the page enumeration should be started or is not yet complete.
24310func (page VirtualNetworkListUsageResultPage) NotDone() bool {
24311	return !page.vnlur.IsEmpty()
24312}
24313
24314// Response returns the raw server response from the last page request.
24315func (page VirtualNetworkListUsageResultPage) Response() VirtualNetworkListUsageResult {
24316	return page.vnlur
24317}
24318
24319// Values returns the slice of values for the current page or nil if there are no values.
24320func (page VirtualNetworkListUsageResultPage) Values() []VirtualNetworkUsage {
24321	if page.vnlur.IsEmpty() {
24322		return nil
24323	}
24324	return *page.vnlur.Value
24325}
24326
24327// Creates a new instance of the VirtualNetworkListUsageResultPage type.
24328func NewVirtualNetworkListUsageResultPage(cur VirtualNetworkListUsageResult, getNextPage func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)) VirtualNetworkListUsageResultPage {
24329	return VirtualNetworkListUsageResultPage{
24330		fn:    getNextPage,
24331		vnlur: cur,
24332	}
24333}
24334
24335// VirtualNetworkPeering peerings in a virtual network resource.
24336type VirtualNetworkPeering struct {
24337	autorest.Response `json:"-"`
24338	// VirtualNetworkPeeringPropertiesFormat - Properties of the virtual network peering.
24339	*VirtualNetworkPeeringPropertiesFormat `json:"properties,omitempty"`
24340	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
24341	Name *string `json:"name,omitempty"`
24342	// Etag - A unique read-only string that changes whenever the resource is updated.
24343	Etag *string `json:"etag,omitempty"`
24344	// ID - Resource ID.
24345	ID *string `json:"id,omitempty"`
24346}
24347
24348// MarshalJSON is the custom marshaler for VirtualNetworkPeering.
24349func (vnp VirtualNetworkPeering) MarshalJSON() ([]byte, error) {
24350	objectMap := make(map[string]interface{})
24351	if vnp.VirtualNetworkPeeringPropertiesFormat != nil {
24352		objectMap["properties"] = vnp.VirtualNetworkPeeringPropertiesFormat
24353	}
24354	if vnp.Name != nil {
24355		objectMap["name"] = vnp.Name
24356	}
24357	if vnp.Etag != nil {
24358		objectMap["etag"] = vnp.Etag
24359	}
24360	if vnp.ID != nil {
24361		objectMap["id"] = vnp.ID
24362	}
24363	return json.Marshal(objectMap)
24364}
24365
24366// UnmarshalJSON is the custom unmarshaler for VirtualNetworkPeering struct.
24367func (vnp *VirtualNetworkPeering) UnmarshalJSON(body []byte) error {
24368	var m map[string]*json.RawMessage
24369	err := json.Unmarshal(body, &m)
24370	if err != nil {
24371		return err
24372	}
24373	for k, v := range m {
24374		switch k {
24375		case "properties":
24376			if v != nil {
24377				var virtualNetworkPeeringPropertiesFormat VirtualNetworkPeeringPropertiesFormat
24378				err = json.Unmarshal(*v, &virtualNetworkPeeringPropertiesFormat)
24379				if err != nil {
24380					return err
24381				}
24382				vnp.VirtualNetworkPeeringPropertiesFormat = &virtualNetworkPeeringPropertiesFormat
24383			}
24384		case "name":
24385			if v != nil {
24386				var name string
24387				err = json.Unmarshal(*v, &name)
24388				if err != nil {
24389					return err
24390				}
24391				vnp.Name = &name
24392			}
24393		case "etag":
24394			if v != nil {
24395				var etag string
24396				err = json.Unmarshal(*v, &etag)
24397				if err != nil {
24398					return err
24399				}
24400				vnp.Etag = &etag
24401			}
24402		case "id":
24403			if v != nil {
24404				var ID string
24405				err = json.Unmarshal(*v, &ID)
24406				if err != nil {
24407					return err
24408				}
24409				vnp.ID = &ID
24410			}
24411		}
24412	}
24413
24414	return nil
24415}
24416
24417// VirtualNetworkPeeringListResult response for ListSubnets API service call. Retrieves all subnets that
24418// belong to a virtual network.
24419type VirtualNetworkPeeringListResult struct {
24420	autorest.Response `json:"-"`
24421	// Value - The peerings in a virtual network.
24422	Value *[]VirtualNetworkPeering `json:"value,omitempty"`
24423	// NextLink - The URL to get the next set of results.
24424	NextLink *string `json:"nextLink,omitempty"`
24425}
24426
24427// VirtualNetworkPeeringListResultIterator provides access to a complete listing of VirtualNetworkPeering
24428// values.
24429type VirtualNetworkPeeringListResultIterator struct {
24430	i    int
24431	page VirtualNetworkPeeringListResultPage
24432}
24433
24434// NextWithContext advances to the next value.  If there was an error making
24435// the request the iterator does not advance and the error is returned.
24436func (iter *VirtualNetworkPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
24437	if tracing.IsEnabled() {
24438		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultIterator.NextWithContext")
24439		defer func() {
24440			sc := -1
24441			if iter.Response().Response.Response != nil {
24442				sc = iter.Response().Response.Response.StatusCode
24443			}
24444			tracing.EndSpan(ctx, sc, err)
24445		}()
24446	}
24447	iter.i++
24448	if iter.i < len(iter.page.Values()) {
24449		return nil
24450	}
24451	err = iter.page.NextWithContext(ctx)
24452	if err != nil {
24453		iter.i--
24454		return err
24455	}
24456	iter.i = 0
24457	return nil
24458}
24459
24460// Next advances to the next value.  If there was an error making
24461// the request the iterator does not advance and the error is returned.
24462// Deprecated: Use NextWithContext() instead.
24463func (iter *VirtualNetworkPeeringListResultIterator) Next() error {
24464	return iter.NextWithContext(context.Background())
24465}
24466
24467// NotDone returns true if the enumeration should be started or is not yet complete.
24468func (iter VirtualNetworkPeeringListResultIterator) NotDone() bool {
24469	return iter.page.NotDone() && iter.i < len(iter.page.Values())
24470}
24471
24472// Response returns the raw server response from the last page request.
24473func (iter VirtualNetworkPeeringListResultIterator) Response() VirtualNetworkPeeringListResult {
24474	return iter.page.Response()
24475}
24476
24477// Value returns the current value or a zero-initialized value if the
24478// iterator has advanced beyond the end of the collection.
24479func (iter VirtualNetworkPeeringListResultIterator) Value() VirtualNetworkPeering {
24480	if !iter.page.NotDone() {
24481		return VirtualNetworkPeering{}
24482	}
24483	return iter.page.Values()[iter.i]
24484}
24485
24486// Creates a new instance of the VirtualNetworkPeeringListResultIterator type.
24487func NewVirtualNetworkPeeringListResultIterator(page VirtualNetworkPeeringListResultPage) VirtualNetworkPeeringListResultIterator {
24488	return VirtualNetworkPeeringListResultIterator{page: page}
24489}
24490
24491// IsEmpty returns true if the ListResult contains no values.
24492func (vnplr VirtualNetworkPeeringListResult) IsEmpty() bool {
24493	return vnplr.Value == nil || len(*vnplr.Value) == 0
24494}
24495
24496// hasNextLink returns true if the NextLink is not empty.
24497func (vnplr VirtualNetworkPeeringListResult) hasNextLink() bool {
24498	return vnplr.NextLink != nil && len(*vnplr.NextLink) != 0
24499}
24500
24501// virtualNetworkPeeringListResultPreparer prepares a request to retrieve the next set of results.
24502// It returns nil if no more results exist.
24503func (vnplr VirtualNetworkPeeringListResult) virtualNetworkPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
24504	if !vnplr.hasNextLink() {
24505		return nil, nil
24506	}
24507	return autorest.Prepare((&http.Request{}).WithContext(ctx),
24508		autorest.AsJSON(),
24509		autorest.AsGet(),
24510		autorest.WithBaseURL(to.String(vnplr.NextLink)))
24511}
24512
24513// VirtualNetworkPeeringListResultPage contains a page of VirtualNetworkPeering values.
24514type VirtualNetworkPeeringListResultPage struct {
24515	fn    func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)
24516	vnplr VirtualNetworkPeeringListResult
24517}
24518
24519// NextWithContext advances to the next page of values.  If there was an error making
24520// the request the page does not advance and the error is returned.
24521func (page *VirtualNetworkPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
24522	if tracing.IsEnabled() {
24523		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultPage.NextWithContext")
24524		defer func() {
24525			sc := -1
24526			if page.Response().Response.Response != nil {
24527				sc = page.Response().Response.Response.StatusCode
24528			}
24529			tracing.EndSpan(ctx, sc, err)
24530		}()
24531	}
24532	for {
24533		next, err := page.fn(ctx, page.vnplr)
24534		if err != nil {
24535			return err
24536		}
24537		page.vnplr = next
24538		if !next.hasNextLink() || !next.IsEmpty() {
24539			break
24540		}
24541	}
24542	return nil
24543}
24544
24545// Next advances to the next page of values.  If there was an error making
24546// the request the page does not advance and the error is returned.
24547// Deprecated: Use NextWithContext() instead.
24548func (page *VirtualNetworkPeeringListResultPage) Next() error {
24549	return page.NextWithContext(context.Background())
24550}
24551
24552// NotDone returns true if the page enumeration should be started or is not yet complete.
24553func (page VirtualNetworkPeeringListResultPage) NotDone() bool {
24554	return !page.vnplr.IsEmpty()
24555}
24556
24557// Response returns the raw server response from the last page request.
24558func (page VirtualNetworkPeeringListResultPage) Response() VirtualNetworkPeeringListResult {
24559	return page.vnplr
24560}
24561
24562// Values returns the slice of values for the current page or nil if there are no values.
24563func (page VirtualNetworkPeeringListResultPage) Values() []VirtualNetworkPeering {
24564	if page.vnplr.IsEmpty() {
24565		return nil
24566	}
24567	return *page.vnplr.Value
24568}
24569
24570// Creates a new instance of the VirtualNetworkPeeringListResultPage type.
24571func NewVirtualNetworkPeeringListResultPage(cur VirtualNetworkPeeringListResult, getNextPage func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)) VirtualNetworkPeeringListResultPage {
24572	return VirtualNetworkPeeringListResultPage{
24573		fn:    getNextPage,
24574		vnplr: cur,
24575	}
24576}
24577
24578// VirtualNetworkPeeringPropertiesFormat properties of the virtual network peering.
24579type VirtualNetworkPeeringPropertiesFormat struct {
24580	// AllowVirtualNetworkAccess - Whether the VMs in the linked virtual network space would be able to access all the VMs in local Virtual network space.
24581	AllowVirtualNetworkAccess *bool `json:"allowVirtualNetworkAccess,omitempty"`
24582	// AllowForwardedTraffic - Whether the forwarded traffic from the VMs in the remote virtual network will be allowed/disallowed.
24583	AllowForwardedTraffic *bool `json:"allowForwardedTraffic,omitempty"`
24584	// AllowGatewayTransit - If gateway links can be used in remote virtual networking to link to this virtual network.
24585	AllowGatewayTransit *bool `json:"allowGatewayTransit,omitempty"`
24586	// 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.
24587	UseRemoteGateways *bool `json:"useRemoteGateways,omitempty"`
24588	// RemoteVirtualNetwork - The reference of 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).
24589	RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"`
24590	// RemoteAddressSpace - The reference of the remote virtual network address space.
24591	RemoteAddressSpace *AddressSpace `json:"remoteAddressSpace,omitempty"`
24592	// PeeringState - The status of the virtual network peering. Possible values are 'Initiated', 'Connected', and 'Disconnected'. Possible values include: 'VirtualNetworkPeeringStateInitiated', 'VirtualNetworkPeeringStateConnected', 'VirtualNetworkPeeringStateDisconnected'
24593	PeeringState VirtualNetworkPeeringState `json:"peeringState,omitempty"`
24594	// ProvisioningState - The provisioning state of the resource.
24595	ProvisioningState *string `json:"provisioningState,omitempty"`
24596}
24597
24598// VirtualNetworkPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
24599// long-running operation.
24600type VirtualNetworkPeeringsCreateOrUpdateFuture struct {
24601	azure.FutureAPI
24602	// Result returns the result of the asynchronous operation.
24603	// If the operation has not completed it will return an error.
24604	Result func(VirtualNetworkPeeringsClient) (VirtualNetworkPeering, error)
24605}
24606
24607// VirtualNetworkPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
24608// long-running operation.
24609type VirtualNetworkPeeringsDeleteFuture struct {
24610	azure.FutureAPI
24611	// Result returns the result of the asynchronous operation.
24612	// If the operation has not completed it will return an error.
24613	Result func(VirtualNetworkPeeringsClient) (autorest.Response, error)
24614}
24615
24616// VirtualNetworkPropertiesFormat properties of the virtual network.
24617type VirtualNetworkPropertiesFormat struct {
24618	// AddressSpace - The AddressSpace that contains an array of IP address ranges that can be used by subnets.
24619	AddressSpace *AddressSpace `json:"addressSpace,omitempty"`
24620	// DhcpOptions - The dhcpOptions that contains an array of DNS servers available to VMs deployed in the virtual network.
24621	DhcpOptions *DhcpOptions `json:"dhcpOptions,omitempty"`
24622	// Subnets - A list of subnets in a Virtual Network.
24623	Subnets *[]Subnet `json:"subnets,omitempty"`
24624	// VirtualNetworkPeerings - A list of peerings in a Virtual Network.
24625	VirtualNetworkPeerings *[]VirtualNetworkPeering `json:"virtualNetworkPeerings,omitempty"`
24626	// ResourceGUID - The resourceGuid property of the Virtual Network resource.
24627	ResourceGUID *string `json:"resourceGuid,omitempty"`
24628	// ProvisioningState - The provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
24629	ProvisioningState *string `json:"provisioningState,omitempty"`
24630	// 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.
24631	EnableDdosProtection *bool `json:"enableDdosProtection,omitempty"`
24632	// EnableVMProtection - Indicates if VM protection is enabled for all the subnets in the virtual network.
24633	EnableVMProtection *bool `json:"enableVmProtection,omitempty"`
24634	// DdosProtectionPlan - The DDoS protection plan associated with the virtual network.
24635	DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"`
24636}
24637
24638// VirtualNetworksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
24639// long-running operation.
24640type VirtualNetworksCreateOrUpdateFuture struct {
24641	azure.FutureAPI
24642	// Result returns the result of the asynchronous operation.
24643	// If the operation has not completed it will return an error.
24644	Result func(VirtualNetworksClient) (VirtualNetwork, error)
24645}
24646
24647// VirtualNetworksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
24648// operation.
24649type VirtualNetworksDeleteFuture struct {
24650	azure.FutureAPI
24651	// Result returns the result of the asynchronous operation.
24652	// If the operation has not completed it will return an error.
24653	Result func(VirtualNetworksClient) (autorest.Response, error)
24654}
24655
24656// VirtualNetworksUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
24657// long-running operation.
24658type VirtualNetworksUpdateTagsFuture struct {
24659	azure.FutureAPI
24660	// Result returns the result of the asynchronous operation.
24661	// If the operation has not completed it will return an error.
24662	Result func(VirtualNetworksClient) (VirtualNetwork, error)
24663}
24664
24665// VirtualNetworkTap virtual Network Tap resource
24666type VirtualNetworkTap struct {
24667	autorest.Response `json:"-"`
24668	// VirtualNetworkTapPropertiesFormat - Virtual Network Tap Properties.
24669	*VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"`
24670	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
24671	Etag *string `json:"etag,omitempty"`
24672	// ID - Resource ID.
24673	ID *string `json:"id,omitempty"`
24674	// Name - READ-ONLY; Resource name.
24675	Name *string `json:"name,omitempty"`
24676	// Type - READ-ONLY; Resource type.
24677	Type *string `json:"type,omitempty"`
24678	// Location - Resource location.
24679	Location *string `json:"location,omitempty"`
24680	// Tags - Resource tags.
24681	Tags map[string]*string `json:"tags"`
24682}
24683
24684// MarshalJSON is the custom marshaler for VirtualNetworkTap.
24685func (vnt VirtualNetworkTap) MarshalJSON() ([]byte, error) {
24686	objectMap := make(map[string]interface{})
24687	if vnt.VirtualNetworkTapPropertiesFormat != nil {
24688		objectMap["properties"] = vnt.VirtualNetworkTapPropertiesFormat
24689	}
24690	if vnt.Etag != nil {
24691		objectMap["etag"] = vnt.Etag
24692	}
24693	if vnt.ID != nil {
24694		objectMap["id"] = vnt.ID
24695	}
24696	if vnt.Location != nil {
24697		objectMap["location"] = vnt.Location
24698	}
24699	if vnt.Tags != nil {
24700		objectMap["tags"] = vnt.Tags
24701	}
24702	return json.Marshal(objectMap)
24703}
24704
24705// UnmarshalJSON is the custom unmarshaler for VirtualNetworkTap struct.
24706func (vnt *VirtualNetworkTap) UnmarshalJSON(body []byte) error {
24707	var m map[string]*json.RawMessage
24708	err := json.Unmarshal(body, &m)
24709	if err != nil {
24710		return err
24711	}
24712	for k, v := range m {
24713		switch k {
24714		case "properties":
24715			if v != nil {
24716				var virtualNetworkTapPropertiesFormat VirtualNetworkTapPropertiesFormat
24717				err = json.Unmarshal(*v, &virtualNetworkTapPropertiesFormat)
24718				if err != nil {
24719					return err
24720				}
24721				vnt.VirtualNetworkTapPropertiesFormat = &virtualNetworkTapPropertiesFormat
24722			}
24723		case "etag":
24724			if v != nil {
24725				var etag string
24726				err = json.Unmarshal(*v, &etag)
24727				if err != nil {
24728					return err
24729				}
24730				vnt.Etag = &etag
24731			}
24732		case "id":
24733			if v != nil {
24734				var ID string
24735				err = json.Unmarshal(*v, &ID)
24736				if err != nil {
24737					return err
24738				}
24739				vnt.ID = &ID
24740			}
24741		case "name":
24742			if v != nil {
24743				var name string
24744				err = json.Unmarshal(*v, &name)
24745				if err != nil {
24746					return err
24747				}
24748				vnt.Name = &name
24749			}
24750		case "type":
24751			if v != nil {
24752				var typeVar string
24753				err = json.Unmarshal(*v, &typeVar)
24754				if err != nil {
24755					return err
24756				}
24757				vnt.Type = &typeVar
24758			}
24759		case "location":
24760			if v != nil {
24761				var location string
24762				err = json.Unmarshal(*v, &location)
24763				if err != nil {
24764					return err
24765				}
24766				vnt.Location = &location
24767			}
24768		case "tags":
24769			if v != nil {
24770				var tags map[string]*string
24771				err = json.Unmarshal(*v, &tags)
24772				if err != nil {
24773					return err
24774				}
24775				vnt.Tags = tags
24776			}
24777		}
24778	}
24779
24780	return nil
24781}
24782
24783// VirtualNetworkTapListResult response for ListVirtualNetworkTap API service call.
24784type VirtualNetworkTapListResult struct {
24785	autorest.Response `json:"-"`
24786	// Value - A list of VirtualNetworkTaps in a resource group.
24787	Value *[]VirtualNetworkTap `json:"value,omitempty"`
24788	// NextLink - The URL to get the next set of results.
24789	NextLink *string `json:"nextLink,omitempty"`
24790}
24791
24792// VirtualNetworkTapListResultIterator provides access to a complete listing of VirtualNetworkTap values.
24793type VirtualNetworkTapListResultIterator struct {
24794	i    int
24795	page VirtualNetworkTapListResultPage
24796}
24797
24798// NextWithContext advances to the next value.  If there was an error making
24799// the request the iterator does not advance and the error is returned.
24800func (iter *VirtualNetworkTapListResultIterator) NextWithContext(ctx context.Context) (err error) {
24801	if tracing.IsEnabled() {
24802		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapListResultIterator.NextWithContext")
24803		defer func() {
24804			sc := -1
24805			if iter.Response().Response.Response != nil {
24806				sc = iter.Response().Response.Response.StatusCode
24807			}
24808			tracing.EndSpan(ctx, sc, err)
24809		}()
24810	}
24811	iter.i++
24812	if iter.i < len(iter.page.Values()) {
24813		return nil
24814	}
24815	err = iter.page.NextWithContext(ctx)
24816	if err != nil {
24817		iter.i--
24818		return err
24819	}
24820	iter.i = 0
24821	return nil
24822}
24823
24824// Next advances to the next value.  If there was an error making
24825// the request the iterator does not advance and the error is returned.
24826// Deprecated: Use NextWithContext() instead.
24827func (iter *VirtualNetworkTapListResultIterator) Next() error {
24828	return iter.NextWithContext(context.Background())
24829}
24830
24831// NotDone returns true if the enumeration should be started or is not yet complete.
24832func (iter VirtualNetworkTapListResultIterator) NotDone() bool {
24833	return iter.page.NotDone() && iter.i < len(iter.page.Values())
24834}
24835
24836// Response returns the raw server response from the last page request.
24837func (iter VirtualNetworkTapListResultIterator) Response() VirtualNetworkTapListResult {
24838	return iter.page.Response()
24839}
24840
24841// Value returns the current value or a zero-initialized value if the
24842// iterator has advanced beyond the end of the collection.
24843func (iter VirtualNetworkTapListResultIterator) Value() VirtualNetworkTap {
24844	if !iter.page.NotDone() {
24845		return VirtualNetworkTap{}
24846	}
24847	return iter.page.Values()[iter.i]
24848}
24849
24850// Creates a new instance of the VirtualNetworkTapListResultIterator type.
24851func NewVirtualNetworkTapListResultIterator(page VirtualNetworkTapListResultPage) VirtualNetworkTapListResultIterator {
24852	return VirtualNetworkTapListResultIterator{page: page}
24853}
24854
24855// IsEmpty returns true if the ListResult contains no values.
24856func (vntlr VirtualNetworkTapListResult) IsEmpty() bool {
24857	return vntlr.Value == nil || len(*vntlr.Value) == 0
24858}
24859
24860// hasNextLink returns true if the NextLink is not empty.
24861func (vntlr VirtualNetworkTapListResult) hasNextLink() bool {
24862	return vntlr.NextLink != nil && len(*vntlr.NextLink) != 0
24863}
24864
24865// virtualNetworkTapListResultPreparer prepares a request to retrieve the next set of results.
24866// It returns nil if no more results exist.
24867func (vntlr VirtualNetworkTapListResult) virtualNetworkTapListResultPreparer(ctx context.Context) (*http.Request, error) {
24868	if !vntlr.hasNextLink() {
24869		return nil, nil
24870	}
24871	return autorest.Prepare((&http.Request{}).WithContext(ctx),
24872		autorest.AsJSON(),
24873		autorest.AsGet(),
24874		autorest.WithBaseURL(to.String(vntlr.NextLink)))
24875}
24876
24877// VirtualNetworkTapListResultPage contains a page of VirtualNetworkTap values.
24878type VirtualNetworkTapListResultPage struct {
24879	fn    func(context.Context, VirtualNetworkTapListResult) (VirtualNetworkTapListResult, error)
24880	vntlr VirtualNetworkTapListResult
24881}
24882
24883// NextWithContext advances to the next page of values.  If there was an error making
24884// the request the page does not advance and the error is returned.
24885func (page *VirtualNetworkTapListResultPage) NextWithContext(ctx context.Context) (err error) {
24886	if tracing.IsEnabled() {
24887		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapListResultPage.NextWithContext")
24888		defer func() {
24889			sc := -1
24890			if page.Response().Response.Response != nil {
24891				sc = page.Response().Response.Response.StatusCode
24892			}
24893			tracing.EndSpan(ctx, sc, err)
24894		}()
24895	}
24896	for {
24897		next, err := page.fn(ctx, page.vntlr)
24898		if err != nil {
24899			return err
24900		}
24901		page.vntlr = next
24902		if !next.hasNextLink() || !next.IsEmpty() {
24903			break
24904		}
24905	}
24906	return nil
24907}
24908
24909// Next advances to the next page of values.  If there was an error making
24910// the request the page does not advance and the error is returned.
24911// Deprecated: Use NextWithContext() instead.
24912func (page *VirtualNetworkTapListResultPage) Next() error {
24913	return page.NextWithContext(context.Background())
24914}
24915
24916// NotDone returns true if the page enumeration should be started or is not yet complete.
24917func (page VirtualNetworkTapListResultPage) NotDone() bool {
24918	return !page.vntlr.IsEmpty()
24919}
24920
24921// Response returns the raw server response from the last page request.
24922func (page VirtualNetworkTapListResultPage) Response() VirtualNetworkTapListResult {
24923	return page.vntlr
24924}
24925
24926// Values returns the slice of values for the current page or nil if there are no values.
24927func (page VirtualNetworkTapListResultPage) Values() []VirtualNetworkTap {
24928	if page.vntlr.IsEmpty() {
24929		return nil
24930	}
24931	return *page.vntlr.Value
24932}
24933
24934// Creates a new instance of the VirtualNetworkTapListResultPage type.
24935func NewVirtualNetworkTapListResultPage(cur VirtualNetworkTapListResult, getNextPage func(context.Context, VirtualNetworkTapListResult) (VirtualNetworkTapListResult, error)) VirtualNetworkTapListResultPage {
24936	return VirtualNetworkTapListResultPage{
24937		fn:    getNextPage,
24938		vntlr: cur,
24939	}
24940}
24941
24942// VirtualNetworkTapPropertiesFormat virtual Network Tap properties.
24943type VirtualNetworkTapPropertiesFormat struct {
24944	// NetworkInterfaceTapConfigurations - READ-ONLY; Specifies the list of resource IDs for the network interface IP configuration that needs to be tapped.
24945	NetworkInterfaceTapConfigurations *[]InterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"`
24946	// ResourceGUID - READ-ONLY; The resourceGuid property of the virtual network tap.
24947	ResourceGUID *string `json:"resourceGuid,omitempty"`
24948	// ProvisioningState - READ-ONLY; The provisioning state of the virtual network tap. Possible values are: 'Updating', 'Deleting', and 'Failed'.
24949	ProvisioningState *string `json:"provisioningState,omitempty"`
24950	// DestinationNetworkInterfaceIPConfiguration - The reference to the private IP Address of the collector nic that will receive the tap
24951	DestinationNetworkInterfaceIPConfiguration *InterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"`
24952	// DestinationLoadBalancerFrontEndIPConfiguration - The reference to the private IP address on the internal Load Balancer that will receive the tap
24953	DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"`
24954	// DestinationPort - The VXLAN destination port that will receive the tapped traffic.
24955	DestinationPort *int32 `json:"destinationPort,omitempty"`
24956}
24957
24958// MarshalJSON is the custom marshaler for VirtualNetworkTapPropertiesFormat.
24959func (vntpf VirtualNetworkTapPropertiesFormat) MarshalJSON() ([]byte, error) {
24960	objectMap := make(map[string]interface{})
24961	if vntpf.DestinationNetworkInterfaceIPConfiguration != nil {
24962		objectMap["destinationNetworkInterfaceIPConfiguration"] = vntpf.DestinationNetworkInterfaceIPConfiguration
24963	}
24964	if vntpf.DestinationLoadBalancerFrontEndIPConfiguration != nil {
24965		objectMap["destinationLoadBalancerFrontEndIPConfiguration"] = vntpf.DestinationLoadBalancerFrontEndIPConfiguration
24966	}
24967	if vntpf.DestinationPort != nil {
24968		objectMap["destinationPort"] = vntpf.DestinationPort
24969	}
24970	return json.Marshal(objectMap)
24971}
24972
24973// VirtualNetworkTapsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
24974// long-running operation.
24975type VirtualNetworkTapsCreateOrUpdateFuture struct {
24976	azure.FutureAPI
24977	// Result returns the result of the asynchronous operation.
24978	// If the operation has not completed it will return an error.
24979	Result func(VirtualNetworkTapsClient) (VirtualNetworkTap, error)
24980}
24981
24982// VirtualNetworkTapsDeleteFuture an abstraction for monitoring and retrieving the results of a
24983// long-running operation.
24984type VirtualNetworkTapsDeleteFuture struct {
24985	azure.FutureAPI
24986	// Result returns the result of the asynchronous operation.
24987	// If the operation has not completed it will return an error.
24988	Result func(VirtualNetworkTapsClient) (autorest.Response, error)
24989}
24990
24991// VirtualNetworkTapsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
24992// long-running operation.
24993type VirtualNetworkTapsUpdateTagsFuture struct {
24994	azure.FutureAPI
24995	// Result returns the result of the asynchronous operation.
24996	// If the operation has not completed it will return an error.
24997	Result func(VirtualNetworkTapsClient) (VirtualNetworkTap, error)
24998}
24999
25000// VirtualNetworkUsage usage details for subnet.
25001type VirtualNetworkUsage struct {
25002	// CurrentValue - READ-ONLY; Indicates number of IPs used from the Subnet.
25003	CurrentValue *float64 `json:"currentValue,omitempty"`
25004	// ID - READ-ONLY; Subnet identifier.
25005	ID *string `json:"id,omitempty"`
25006	// Limit - READ-ONLY; Indicates the size of the subnet.
25007	Limit *float64 `json:"limit,omitempty"`
25008	// Name - READ-ONLY; The name containing common and localized value for usage.
25009	Name *VirtualNetworkUsageName `json:"name,omitempty"`
25010	// Unit - READ-ONLY; Usage units. Returns 'Count'
25011	Unit *string `json:"unit,omitempty"`
25012}
25013
25014// VirtualNetworkUsageName usage strings container.
25015type VirtualNetworkUsageName struct {
25016	// LocalizedValue - READ-ONLY; Localized subnet size and usage string.
25017	LocalizedValue *string `json:"localizedValue,omitempty"`
25018	// Value - READ-ONLY; Subnet size and usage string.
25019	Value *string `json:"value,omitempty"`
25020}
25021
25022// VirtualWAN virtualWAN Resource.
25023type VirtualWAN struct {
25024	autorest.Response     `json:"-"`
25025	*VirtualWanProperties `json:"properties,omitempty"`
25026	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
25027	Etag *string `json:"etag,omitempty"`
25028	// ID - Resource ID.
25029	ID *string `json:"id,omitempty"`
25030	// Name - READ-ONLY; Resource name.
25031	Name *string `json:"name,omitempty"`
25032	// Type - READ-ONLY; Resource type.
25033	Type *string `json:"type,omitempty"`
25034	// Location - Resource location.
25035	Location *string `json:"location,omitempty"`
25036	// Tags - Resource tags.
25037	Tags map[string]*string `json:"tags"`
25038}
25039
25040// MarshalJSON is the custom marshaler for VirtualWAN.
25041func (vw VirtualWAN) MarshalJSON() ([]byte, error) {
25042	objectMap := make(map[string]interface{})
25043	if vw.VirtualWanProperties != nil {
25044		objectMap["properties"] = vw.VirtualWanProperties
25045	}
25046	if vw.ID != nil {
25047		objectMap["id"] = vw.ID
25048	}
25049	if vw.Location != nil {
25050		objectMap["location"] = vw.Location
25051	}
25052	if vw.Tags != nil {
25053		objectMap["tags"] = vw.Tags
25054	}
25055	return json.Marshal(objectMap)
25056}
25057
25058// UnmarshalJSON is the custom unmarshaler for VirtualWAN struct.
25059func (vw *VirtualWAN) UnmarshalJSON(body []byte) error {
25060	var m map[string]*json.RawMessage
25061	err := json.Unmarshal(body, &m)
25062	if err != nil {
25063		return err
25064	}
25065	for k, v := range m {
25066		switch k {
25067		case "properties":
25068			if v != nil {
25069				var virtualWanProperties VirtualWanProperties
25070				err = json.Unmarshal(*v, &virtualWanProperties)
25071				if err != nil {
25072					return err
25073				}
25074				vw.VirtualWanProperties = &virtualWanProperties
25075			}
25076		case "etag":
25077			if v != nil {
25078				var etag string
25079				err = json.Unmarshal(*v, &etag)
25080				if err != nil {
25081					return err
25082				}
25083				vw.Etag = &etag
25084			}
25085		case "id":
25086			if v != nil {
25087				var ID string
25088				err = json.Unmarshal(*v, &ID)
25089				if err != nil {
25090					return err
25091				}
25092				vw.ID = &ID
25093			}
25094		case "name":
25095			if v != nil {
25096				var name string
25097				err = json.Unmarshal(*v, &name)
25098				if err != nil {
25099					return err
25100				}
25101				vw.Name = &name
25102			}
25103		case "type":
25104			if v != nil {
25105				var typeVar string
25106				err = json.Unmarshal(*v, &typeVar)
25107				if err != nil {
25108					return err
25109				}
25110				vw.Type = &typeVar
25111			}
25112		case "location":
25113			if v != nil {
25114				var location string
25115				err = json.Unmarshal(*v, &location)
25116				if err != nil {
25117					return err
25118				}
25119				vw.Location = &location
25120			}
25121		case "tags":
25122			if v != nil {
25123				var tags map[string]*string
25124				err = json.Unmarshal(*v, &tags)
25125				if err != nil {
25126					return err
25127				}
25128				vw.Tags = tags
25129			}
25130		}
25131	}
25132
25133	return nil
25134}
25135
25136// VirtualWanProperties parameters for VirtualWAN
25137type VirtualWanProperties struct {
25138	// DisableVpnEncryption - Vpn encryption to be disabled or not.
25139	DisableVpnEncryption *bool `json:"disableVpnEncryption,omitempty"`
25140	// VirtualHubs - READ-ONLY; List of VirtualHubs in the VirtualWAN.
25141	VirtualHubs *[]SubResource `json:"virtualHubs,omitempty"`
25142	// VpnSites - READ-ONLY
25143	VpnSites *[]SubResource `json:"vpnSites,omitempty"`
25144	// SecurityProviderName - The Security Provider name.
25145	SecurityProviderName *string `json:"securityProviderName,omitempty"`
25146	// AllowBranchToBranchTraffic - True if branch to branch traffic is allowed.
25147	AllowBranchToBranchTraffic *bool `json:"allowBranchToBranchTraffic,omitempty"`
25148	// AllowVnetToVnetTraffic - True if Vnet to Vnet traffic is allowed.
25149	AllowVnetToVnetTraffic *bool `json:"allowVnetToVnetTraffic,omitempty"`
25150	// Office365LocalBreakoutCategory - The office local breakout category. Possible values include: 'OfficeTrafficCategoryOptimize', 'OfficeTrafficCategoryOptimizeAndAllow', 'OfficeTrafficCategoryAll', 'OfficeTrafficCategoryNone'
25151	Office365LocalBreakoutCategory OfficeTrafficCategory `json:"office365LocalBreakoutCategory,omitempty"`
25152	// P2SVpnServerConfigurations - list of all P2SVpnServerConfigurations associated with the virtual wan.
25153	P2SVpnServerConfigurations *[]P2SVpnServerConfiguration `json:"p2SVpnServerConfigurations,omitempty"`
25154	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
25155	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
25156}
25157
25158// MarshalJSON is the custom marshaler for VirtualWanProperties.
25159func (vwp VirtualWanProperties) MarshalJSON() ([]byte, error) {
25160	objectMap := make(map[string]interface{})
25161	if vwp.DisableVpnEncryption != nil {
25162		objectMap["disableVpnEncryption"] = vwp.DisableVpnEncryption
25163	}
25164	if vwp.SecurityProviderName != nil {
25165		objectMap["securityProviderName"] = vwp.SecurityProviderName
25166	}
25167	if vwp.AllowBranchToBranchTraffic != nil {
25168		objectMap["allowBranchToBranchTraffic"] = vwp.AllowBranchToBranchTraffic
25169	}
25170	if vwp.AllowVnetToVnetTraffic != nil {
25171		objectMap["allowVnetToVnetTraffic"] = vwp.AllowVnetToVnetTraffic
25172	}
25173	if vwp.Office365LocalBreakoutCategory != "" {
25174		objectMap["office365LocalBreakoutCategory"] = vwp.Office365LocalBreakoutCategory
25175	}
25176	if vwp.P2SVpnServerConfigurations != nil {
25177		objectMap["p2SVpnServerConfigurations"] = vwp.P2SVpnServerConfigurations
25178	}
25179	if vwp.ProvisioningState != "" {
25180		objectMap["provisioningState"] = vwp.ProvisioningState
25181	}
25182	return json.Marshal(objectMap)
25183}
25184
25185// VirtualWansCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
25186// long-running operation.
25187type VirtualWansCreateOrUpdateFuture struct {
25188	azure.FutureAPI
25189	// Result returns the result of the asynchronous operation.
25190	// If the operation has not completed it will return an error.
25191	Result func(VirtualWansClient) (VirtualWAN, error)
25192}
25193
25194// VirtualWansDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
25195// operation.
25196type VirtualWansDeleteFuture struct {
25197	azure.FutureAPI
25198	// Result returns the result of the asynchronous operation.
25199	// If the operation has not completed it will return an error.
25200	Result func(VirtualWansClient) (autorest.Response, error)
25201}
25202
25203// VirtualWanSecurityProvider collection of SecurityProviders.
25204type VirtualWanSecurityProvider struct {
25205	// Name - Name of the security provider.
25206	Name *string `json:"name,omitempty"`
25207	// URL - Url of the security provider.
25208	URL *string `json:"url,omitempty"`
25209	// Type - Name of the security provider. Possible values include: 'External', 'Native'
25210	Type VirtualWanSecurityProviderType `json:"type,omitempty"`
25211}
25212
25213// VirtualWanSecurityProviders collection of SecurityProviders.
25214type VirtualWanSecurityProviders struct {
25215	autorest.Response  `json:"-"`
25216	SupportedProviders *[]VirtualWanSecurityProvider `json:"supportedProviders,omitempty"`
25217}
25218
25219// VirtualWansUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
25220// operation.
25221type VirtualWansUpdateTagsFuture struct {
25222	azure.FutureAPI
25223	// Result returns the result of the asynchronous operation.
25224	// If the operation has not completed it will return an error.
25225	Result func(VirtualWansClient) (VirtualWAN, error)
25226}
25227
25228// VpnClientConfiguration vpnClientConfiguration for P2S client.
25229type VpnClientConfiguration struct {
25230	// VpnClientAddressPool - The reference of the address space resource which represents Address space for P2S VpnClient.
25231	VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"`
25232	// VpnClientRootCertificates - VpnClientRootCertificate for virtual network gateway.
25233	VpnClientRootCertificates *[]VpnClientRootCertificate `json:"vpnClientRootCertificates,omitempty"`
25234	// VpnClientRevokedCertificates - VpnClientRevokedCertificate for Virtual network gateway.
25235	VpnClientRevokedCertificates *[]VpnClientRevokedCertificate `json:"vpnClientRevokedCertificates,omitempty"`
25236	// VpnClientProtocols - VpnClientProtocols for Virtual network gateway.
25237	VpnClientProtocols *[]VpnClientProtocol `json:"vpnClientProtocols,omitempty"`
25238	// VpnClientIpsecPolicies - VpnClientIpsecPolicies for virtual network gateway P2S client.
25239	VpnClientIpsecPolicies *[]IpsecPolicy `json:"vpnClientIpsecPolicies,omitempty"`
25240	// RadiusServerAddress - The radius server address property of the VirtualNetworkGateway resource for vpn client connection.
25241	RadiusServerAddress *string `json:"radiusServerAddress,omitempty"`
25242	// RadiusServerSecret - The radius secret property of the VirtualNetworkGateway resource for vpn client connection.
25243	RadiusServerSecret *string `json:"radiusServerSecret,omitempty"`
25244}
25245
25246// VpnClientConnectionHealth vpnClientConnectionHealth properties
25247type VpnClientConnectionHealth struct {
25248	// TotalIngressBytesTransferred - READ-ONLY; Total of the Ingress Bytes Transferred in this P2S Vpn connection
25249	TotalIngressBytesTransferred *int64 `json:"totalIngressBytesTransferred,omitempty"`
25250	// TotalEgressBytesTransferred - READ-ONLY; Total of the Egress Bytes Transferred in this connection
25251	TotalEgressBytesTransferred *int64 `json:"totalEgressBytesTransferred,omitempty"`
25252	// VpnClientConnectionsCount - The total of p2s vpn clients connected at this time to this P2SVpnGateway.
25253	VpnClientConnectionsCount *int32 `json:"vpnClientConnectionsCount,omitempty"`
25254	// AllocatedIPAddresses - List of allocated ip addresses to the connected p2s vpn clients.
25255	AllocatedIPAddresses *[]string `json:"allocatedIpAddresses,omitempty"`
25256}
25257
25258// MarshalJSON is the custom marshaler for VpnClientConnectionHealth.
25259func (vcch VpnClientConnectionHealth) MarshalJSON() ([]byte, error) {
25260	objectMap := make(map[string]interface{})
25261	if vcch.VpnClientConnectionsCount != nil {
25262		objectMap["vpnClientConnectionsCount"] = vcch.VpnClientConnectionsCount
25263	}
25264	if vcch.AllocatedIPAddresses != nil {
25265		objectMap["allocatedIpAddresses"] = vcch.AllocatedIPAddresses
25266	}
25267	return json.Marshal(objectMap)
25268}
25269
25270// VpnClientIPsecParameters an IPSec parameters for a virtual network gateway P2S connection.
25271type VpnClientIPsecParameters struct {
25272	autorest.Response `json:"-"`
25273	// SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for P2S client.
25274	SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"`
25275	// SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for P2S client..
25276	SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"`
25277	// IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256'
25278	IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"`
25279	// IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256'
25280	IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"`
25281	// IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128'
25282	IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"`
25283	// IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'IkeIntegrityMD5', 'IkeIntegritySHA1', 'IkeIntegritySHA256', 'IkeIntegritySHA384', 'IkeIntegrityGCMAES256', 'IkeIntegrityGCMAES128'
25284	IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"`
25285	// DhGroup - The DH Groups used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24'
25286	DhGroup DhGroup `json:"dhGroup,omitempty"`
25287	// PfsGroup - The Pfs Groups used in IKE Phase 2 for new child SA. Possible values include: 'PfsGroupNone', 'PfsGroupPFS1', 'PfsGroupPFS2', 'PfsGroupPFS2048', 'PfsGroupECP256', 'PfsGroupECP384', 'PfsGroupPFS24', 'PfsGroupPFS14', 'PfsGroupPFSMM'
25288	PfsGroup PfsGroup `json:"pfsGroup,omitempty"`
25289}
25290
25291// VpnClientParameters vpn Client Parameters for package generation
25292type VpnClientParameters struct {
25293	// ProcessorArchitecture - VPN client Processor Architecture. Possible values are: 'AMD64' and 'X86'. Possible values include: 'Amd64', 'X86'
25294	ProcessorArchitecture ProcessorArchitecture `json:"processorArchitecture,omitempty"`
25295	// AuthenticationMethod - VPN client Authentication Method. Possible values are: 'EAPTLS' and 'EAPMSCHAPv2'. Possible values include: 'EAPTLS', 'EAPMSCHAPv2'
25296	AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"`
25297	// 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.
25298	RadiusServerAuthCertificate *string `json:"radiusServerAuthCertificate,omitempty"`
25299	// ClientRootCertificates - A list of client root certificates public certificate data encoded as Base-64 strings. Optional parameter for external radius based authentication with EAPTLS.
25300	ClientRootCertificates *[]string `json:"clientRootCertificates,omitempty"`
25301}
25302
25303// VpnClientRevokedCertificate VPN client revoked certificate of virtual network gateway.
25304type VpnClientRevokedCertificate struct {
25305	// VpnClientRevokedCertificatePropertiesFormat - Properties of the vpn client revoked certificate.
25306	*VpnClientRevokedCertificatePropertiesFormat `json:"properties,omitempty"`
25307	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
25308	Name *string `json:"name,omitempty"`
25309	// Etag - A unique read-only string that changes whenever the resource is updated.
25310	Etag *string `json:"etag,omitempty"`
25311	// ID - Resource ID.
25312	ID *string `json:"id,omitempty"`
25313}
25314
25315// MarshalJSON is the custom marshaler for VpnClientRevokedCertificate.
25316func (vcrc VpnClientRevokedCertificate) MarshalJSON() ([]byte, error) {
25317	objectMap := make(map[string]interface{})
25318	if vcrc.VpnClientRevokedCertificatePropertiesFormat != nil {
25319		objectMap["properties"] = vcrc.VpnClientRevokedCertificatePropertiesFormat
25320	}
25321	if vcrc.Name != nil {
25322		objectMap["name"] = vcrc.Name
25323	}
25324	if vcrc.Etag != nil {
25325		objectMap["etag"] = vcrc.Etag
25326	}
25327	if vcrc.ID != nil {
25328		objectMap["id"] = vcrc.ID
25329	}
25330	return json.Marshal(objectMap)
25331}
25332
25333// UnmarshalJSON is the custom unmarshaler for VpnClientRevokedCertificate struct.
25334func (vcrc *VpnClientRevokedCertificate) UnmarshalJSON(body []byte) error {
25335	var m map[string]*json.RawMessage
25336	err := json.Unmarshal(body, &m)
25337	if err != nil {
25338		return err
25339	}
25340	for k, v := range m {
25341		switch k {
25342		case "properties":
25343			if v != nil {
25344				var vpnClientRevokedCertificatePropertiesFormat VpnClientRevokedCertificatePropertiesFormat
25345				err = json.Unmarshal(*v, &vpnClientRevokedCertificatePropertiesFormat)
25346				if err != nil {
25347					return err
25348				}
25349				vcrc.VpnClientRevokedCertificatePropertiesFormat = &vpnClientRevokedCertificatePropertiesFormat
25350			}
25351		case "name":
25352			if v != nil {
25353				var name string
25354				err = json.Unmarshal(*v, &name)
25355				if err != nil {
25356					return err
25357				}
25358				vcrc.Name = &name
25359			}
25360		case "etag":
25361			if v != nil {
25362				var etag string
25363				err = json.Unmarshal(*v, &etag)
25364				if err != nil {
25365					return err
25366				}
25367				vcrc.Etag = &etag
25368			}
25369		case "id":
25370			if v != nil {
25371				var ID string
25372				err = json.Unmarshal(*v, &ID)
25373				if err != nil {
25374					return err
25375				}
25376				vcrc.ID = &ID
25377			}
25378		}
25379	}
25380
25381	return nil
25382}
25383
25384// VpnClientRevokedCertificatePropertiesFormat properties of the revoked VPN client certificate of virtual
25385// network gateway.
25386type VpnClientRevokedCertificatePropertiesFormat struct {
25387	// Thumbprint - The revoked VPN client certificate thumbprint.
25388	Thumbprint *string `json:"thumbprint,omitempty"`
25389	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client revoked certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
25390	ProvisioningState *string `json:"provisioningState,omitempty"`
25391}
25392
25393// MarshalJSON is the custom marshaler for VpnClientRevokedCertificatePropertiesFormat.
25394func (vcrcpf VpnClientRevokedCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
25395	objectMap := make(map[string]interface{})
25396	if vcrcpf.Thumbprint != nil {
25397		objectMap["thumbprint"] = vcrcpf.Thumbprint
25398	}
25399	return json.Marshal(objectMap)
25400}
25401
25402// VpnClientRootCertificate VPN client root certificate of virtual network gateway
25403type VpnClientRootCertificate struct {
25404	// VpnClientRootCertificatePropertiesFormat - Properties of the vpn client root certificate.
25405	*VpnClientRootCertificatePropertiesFormat `json:"properties,omitempty"`
25406	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
25407	Name *string `json:"name,omitempty"`
25408	// Etag - A unique read-only string that changes whenever the resource is updated.
25409	Etag *string `json:"etag,omitempty"`
25410	// ID - Resource ID.
25411	ID *string `json:"id,omitempty"`
25412}
25413
25414// MarshalJSON is the custom marshaler for VpnClientRootCertificate.
25415func (vcrc VpnClientRootCertificate) MarshalJSON() ([]byte, error) {
25416	objectMap := make(map[string]interface{})
25417	if vcrc.VpnClientRootCertificatePropertiesFormat != nil {
25418		objectMap["properties"] = vcrc.VpnClientRootCertificatePropertiesFormat
25419	}
25420	if vcrc.Name != nil {
25421		objectMap["name"] = vcrc.Name
25422	}
25423	if vcrc.Etag != nil {
25424		objectMap["etag"] = vcrc.Etag
25425	}
25426	if vcrc.ID != nil {
25427		objectMap["id"] = vcrc.ID
25428	}
25429	return json.Marshal(objectMap)
25430}
25431
25432// UnmarshalJSON is the custom unmarshaler for VpnClientRootCertificate struct.
25433func (vcrc *VpnClientRootCertificate) UnmarshalJSON(body []byte) error {
25434	var m map[string]*json.RawMessage
25435	err := json.Unmarshal(body, &m)
25436	if err != nil {
25437		return err
25438	}
25439	for k, v := range m {
25440		switch k {
25441		case "properties":
25442			if v != nil {
25443				var vpnClientRootCertificatePropertiesFormat VpnClientRootCertificatePropertiesFormat
25444				err = json.Unmarshal(*v, &vpnClientRootCertificatePropertiesFormat)
25445				if err != nil {
25446					return err
25447				}
25448				vcrc.VpnClientRootCertificatePropertiesFormat = &vpnClientRootCertificatePropertiesFormat
25449			}
25450		case "name":
25451			if v != nil {
25452				var name string
25453				err = json.Unmarshal(*v, &name)
25454				if err != nil {
25455					return err
25456				}
25457				vcrc.Name = &name
25458			}
25459		case "etag":
25460			if v != nil {
25461				var etag string
25462				err = json.Unmarshal(*v, &etag)
25463				if err != nil {
25464					return err
25465				}
25466				vcrc.Etag = &etag
25467			}
25468		case "id":
25469			if v != nil {
25470				var ID string
25471				err = json.Unmarshal(*v, &ID)
25472				if err != nil {
25473					return err
25474				}
25475				vcrc.ID = &ID
25476			}
25477		}
25478	}
25479
25480	return nil
25481}
25482
25483// VpnClientRootCertificatePropertiesFormat properties of SSL certificates of application gateway
25484type VpnClientRootCertificatePropertiesFormat struct {
25485	// PublicCertData - The certificate public data.
25486	PublicCertData *string `json:"publicCertData,omitempty"`
25487	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
25488	ProvisioningState *string `json:"provisioningState,omitempty"`
25489}
25490
25491// MarshalJSON is the custom marshaler for VpnClientRootCertificatePropertiesFormat.
25492func (vcrcpf VpnClientRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
25493	objectMap := make(map[string]interface{})
25494	if vcrcpf.PublicCertData != nil {
25495		objectMap["publicCertData"] = vcrcpf.PublicCertData
25496	}
25497	return json.Marshal(objectMap)
25498}
25499
25500// VpnConnection vpnConnection Resource.
25501type VpnConnection struct {
25502	autorest.Response        `json:"-"`
25503	*VpnConnectionProperties `json:"properties,omitempty"`
25504	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
25505	Name *string `json:"name,omitempty"`
25506	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
25507	Etag *string `json:"etag,omitempty"`
25508	// ID - Resource ID.
25509	ID *string `json:"id,omitempty"`
25510}
25511
25512// MarshalJSON is the custom marshaler for VpnConnection.
25513func (vc VpnConnection) MarshalJSON() ([]byte, error) {
25514	objectMap := make(map[string]interface{})
25515	if vc.VpnConnectionProperties != nil {
25516		objectMap["properties"] = vc.VpnConnectionProperties
25517	}
25518	if vc.Name != nil {
25519		objectMap["name"] = vc.Name
25520	}
25521	if vc.ID != nil {
25522		objectMap["id"] = vc.ID
25523	}
25524	return json.Marshal(objectMap)
25525}
25526
25527// UnmarshalJSON is the custom unmarshaler for VpnConnection struct.
25528func (vc *VpnConnection) UnmarshalJSON(body []byte) error {
25529	var m map[string]*json.RawMessage
25530	err := json.Unmarshal(body, &m)
25531	if err != nil {
25532		return err
25533	}
25534	for k, v := range m {
25535		switch k {
25536		case "properties":
25537			if v != nil {
25538				var vpnConnectionProperties VpnConnectionProperties
25539				err = json.Unmarshal(*v, &vpnConnectionProperties)
25540				if err != nil {
25541					return err
25542				}
25543				vc.VpnConnectionProperties = &vpnConnectionProperties
25544			}
25545		case "name":
25546			if v != nil {
25547				var name string
25548				err = json.Unmarshal(*v, &name)
25549				if err != nil {
25550					return err
25551				}
25552				vc.Name = &name
25553			}
25554		case "etag":
25555			if v != nil {
25556				var etag string
25557				err = json.Unmarshal(*v, &etag)
25558				if err != nil {
25559					return err
25560				}
25561				vc.Etag = &etag
25562			}
25563		case "id":
25564			if v != nil {
25565				var ID string
25566				err = json.Unmarshal(*v, &ID)
25567				if err != nil {
25568					return err
25569				}
25570				vc.ID = &ID
25571			}
25572		}
25573	}
25574
25575	return nil
25576}
25577
25578// VpnConnectionProperties parameters for VpnConnection
25579type VpnConnectionProperties struct {
25580	// RemoteVpnSite - Id of the connected vpn site.
25581	RemoteVpnSite *SubResource `json:"remoteVpnSite,omitempty"`
25582	// RoutingWeight - routing weight for vpn connection.
25583	RoutingWeight *int32 `json:"routingWeight,omitempty"`
25584	// ConnectionStatus - The connection status. Possible values include: 'VpnConnectionStatusUnknown', 'VpnConnectionStatusConnecting', 'VpnConnectionStatusConnected', 'VpnConnectionStatusNotConnected'
25585	ConnectionStatus VpnConnectionStatus `json:"connectionStatus,omitempty"`
25586	// VpnConnectionProtocolType - Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1'
25587	VpnConnectionProtocolType VirtualNetworkGatewayConnectionProtocol `json:"vpnConnectionProtocolType,omitempty"`
25588	// IngressBytesTransferred - READ-ONLY; Ingress bytes transferred.
25589	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
25590	// EgressBytesTransferred - READ-ONLY; Egress bytes transferred.
25591	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
25592	// ConnectionBandwidth - Expected bandwidth in MBPS.
25593	ConnectionBandwidth *int32 `json:"connectionBandwidth,omitempty"`
25594	// SharedKey - SharedKey for the vpn connection.
25595	SharedKey *string `json:"sharedKey,omitempty"`
25596	// EnableBgp - EnableBgp flag
25597	EnableBgp *bool `json:"enableBgp,omitempty"`
25598	// IpsecPolicies - The IPSec Policies to be considered by this connection.
25599	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
25600	// EnableRateLimiting - EnableBgp flag
25601	EnableRateLimiting *bool `json:"enableRateLimiting,omitempty"`
25602	// EnableInternetSecurity - Enable internet security
25603	EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"`
25604	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
25605	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
25606}
25607
25608// MarshalJSON is the custom marshaler for VpnConnectionProperties.
25609func (vcp VpnConnectionProperties) MarshalJSON() ([]byte, error) {
25610	objectMap := make(map[string]interface{})
25611	if vcp.RemoteVpnSite != nil {
25612		objectMap["remoteVpnSite"] = vcp.RemoteVpnSite
25613	}
25614	if vcp.RoutingWeight != nil {
25615		objectMap["routingWeight"] = vcp.RoutingWeight
25616	}
25617	if vcp.ConnectionStatus != "" {
25618		objectMap["connectionStatus"] = vcp.ConnectionStatus
25619	}
25620	if vcp.VpnConnectionProtocolType != "" {
25621		objectMap["vpnConnectionProtocolType"] = vcp.VpnConnectionProtocolType
25622	}
25623	if vcp.ConnectionBandwidth != nil {
25624		objectMap["connectionBandwidth"] = vcp.ConnectionBandwidth
25625	}
25626	if vcp.SharedKey != nil {
25627		objectMap["sharedKey"] = vcp.SharedKey
25628	}
25629	if vcp.EnableBgp != nil {
25630		objectMap["enableBgp"] = vcp.EnableBgp
25631	}
25632	if vcp.IpsecPolicies != nil {
25633		objectMap["ipsecPolicies"] = vcp.IpsecPolicies
25634	}
25635	if vcp.EnableRateLimiting != nil {
25636		objectMap["enableRateLimiting"] = vcp.EnableRateLimiting
25637	}
25638	if vcp.EnableInternetSecurity != nil {
25639		objectMap["enableInternetSecurity"] = vcp.EnableInternetSecurity
25640	}
25641	if vcp.ProvisioningState != "" {
25642		objectMap["provisioningState"] = vcp.ProvisioningState
25643	}
25644	return json.Marshal(objectMap)
25645}
25646
25647// VpnConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
25648// long-running operation.
25649type VpnConnectionsCreateOrUpdateFuture struct {
25650	azure.FutureAPI
25651	// Result returns the result of the asynchronous operation.
25652	// If the operation has not completed it will return an error.
25653	Result func(VpnConnectionsClient) (VpnConnection, error)
25654}
25655
25656// VpnConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
25657// operation.
25658type VpnConnectionsDeleteFuture struct {
25659	azure.FutureAPI
25660	// Result returns the result of the asynchronous operation.
25661	// If the operation has not completed it will return an error.
25662	Result func(VpnConnectionsClient) (autorest.Response, error)
25663}
25664
25665// VpnDeviceScriptParameters vpn device configuration script generation parameters
25666type VpnDeviceScriptParameters struct {
25667	// Vendor - The vendor for the vpn device.
25668	Vendor *string `json:"vendor,omitempty"`
25669	// DeviceFamily - The device family for the vpn device.
25670	DeviceFamily *string `json:"deviceFamily,omitempty"`
25671	// FirmwareVersion - The firmware version for the vpn device.
25672	FirmwareVersion *string `json:"firmwareVersion,omitempty"`
25673}
25674
25675// VpnGateway vpnGateway Resource.
25676type VpnGateway struct {
25677	autorest.Response     `json:"-"`
25678	*VpnGatewayProperties `json:"properties,omitempty"`
25679	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
25680	Etag *string `json:"etag,omitempty"`
25681	// ID - Resource ID.
25682	ID *string `json:"id,omitempty"`
25683	// Name - READ-ONLY; Resource name.
25684	Name *string `json:"name,omitempty"`
25685	// Type - READ-ONLY; Resource type.
25686	Type *string `json:"type,omitempty"`
25687	// Location - Resource location.
25688	Location *string `json:"location,omitempty"`
25689	// Tags - Resource tags.
25690	Tags map[string]*string `json:"tags"`
25691}
25692
25693// MarshalJSON is the custom marshaler for VpnGateway.
25694func (vg VpnGateway) MarshalJSON() ([]byte, error) {
25695	objectMap := make(map[string]interface{})
25696	if vg.VpnGatewayProperties != nil {
25697		objectMap["properties"] = vg.VpnGatewayProperties
25698	}
25699	if vg.ID != nil {
25700		objectMap["id"] = vg.ID
25701	}
25702	if vg.Location != nil {
25703		objectMap["location"] = vg.Location
25704	}
25705	if vg.Tags != nil {
25706		objectMap["tags"] = vg.Tags
25707	}
25708	return json.Marshal(objectMap)
25709}
25710
25711// UnmarshalJSON is the custom unmarshaler for VpnGateway struct.
25712func (vg *VpnGateway) UnmarshalJSON(body []byte) error {
25713	var m map[string]*json.RawMessage
25714	err := json.Unmarshal(body, &m)
25715	if err != nil {
25716		return err
25717	}
25718	for k, v := range m {
25719		switch k {
25720		case "properties":
25721			if v != nil {
25722				var vpnGatewayProperties VpnGatewayProperties
25723				err = json.Unmarshal(*v, &vpnGatewayProperties)
25724				if err != nil {
25725					return err
25726				}
25727				vg.VpnGatewayProperties = &vpnGatewayProperties
25728			}
25729		case "etag":
25730			if v != nil {
25731				var etag string
25732				err = json.Unmarshal(*v, &etag)
25733				if err != nil {
25734					return err
25735				}
25736				vg.Etag = &etag
25737			}
25738		case "id":
25739			if v != nil {
25740				var ID string
25741				err = json.Unmarshal(*v, &ID)
25742				if err != nil {
25743					return err
25744				}
25745				vg.ID = &ID
25746			}
25747		case "name":
25748			if v != nil {
25749				var name string
25750				err = json.Unmarshal(*v, &name)
25751				if err != nil {
25752					return err
25753				}
25754				vg.Name = &name
25755			}
25756		case "type":
25757			if v != nil {
25758				var typeVar string
25759				err = json.Unmarshal(*v, &typeVar)
25760				if err != nil {
25761					return err
25762				}
25763				vg.Type = &typeVar
25764			}
25765		case "location":
25766			if v != nil {
25767				var location string
25768				err = json.Unmarshal(*v, &location)
25769				if err != nil {
25770					return err
25771				}
25772				vg.Location = &location
25773			}
25774		case "tags":
25775			if v != nil {
25776				var tags map[string]*string
25777				err = json.Unmarshal(*v, &tags)
25778				if err != nil {
25779					return err
25780				}
25781				vg.Tags = tags
25782			}
25783		}
25784	}
25785
25786	return nil
25787}
25788
25789// VpnGatewayProperties parameters for VpnGateway
25790type VpnGatewayProperties struct {
25791	// VirtualHub - The VirtualHub to which the gateway belongs
25792	VirtualHub *SubResource `json:"virtualHub,omitempty"`
25793	// Connections - list of all vpn connections to the gateway.
25794	Connections *[]VpnConnection `json:"connections,omitempty"`
25795	// BgpSettings - Local network gateway's BGP speaker settings.
25796	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
25797	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
25798	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
25799	// VpnGatewayScaleUnit - The scale unit for this vpn gateway.
25800	VpnGatewayScaleUnit *int32 `json:"vpnGatewayScaleUnit,omitempty"`
25801}
25802
25803// VpnGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
25804// long-running operation.
25805type VpnGatewaysCreateOrUpdateFuture struct {
25806	azure.FutureAPI
25807	// Result returns the result of the asynchronous operation.
25808	// If the operation has not completed it will return an error.
25809	Result func(VpnGatewaysClient) (VpnGateway, error)
25810}
25811
25812// VpnGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
25813// operation.
25814type VpnGatewaysDeleteFuture struct {
25815	azure.FutureAPI
25816	// Result returns the result of the asynchronous operation.
25817	// If the operation has not completed it will return an error.
25818	Result func(VpnGatewaysClient) (autorest.Response, error)
25819}
25820
25821// VpnGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
25822// operation.
25823type VpnGatewaysUpdateTagsFuture struct {
25824	azure.FutureAPI
25825	// Result returns the result of the asynchronous operation.
25826	// If the operation has not completed it will return an error.
25827	Result func(VpnGatewaysClient) (VpnGateway, error)
25828}
25829
25830// VpnProfileResponse vpn Profile Response for package generation
25831type VpnProfileResponse struct {
25832	autorest.Response `json:"-"`
25833	// ProfileURL - URL to the VPN profile
25834	ProfileURL *string `json:"profileUrl,omitempty"`
25835}
25836
25837// VpnSite vpnSite Resource.
25838type VpnSite struct {
25839	autorest.Response  `json:"-"`
25840	*VpnSiteProperties `json:"properties,omitempty"`
25841	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
25842	Etag *string `json:"etag,omitempty"`
25843	// ID - Resource ID.
25844	ID *string `json:"id,omitempty"`
25845	// Name - READ-ONLY; Resource name.
25846	Name *string `json:"name,omitempty"`
25847	// Type - READ-ONLY; Resource type.
25848	Type *string `json:"type,omitempty"`
25849	// Location - Resource location.
25850	Location *string `json:"location,omitempty"`
25851	// Tags - Resource tags.
25852	Tags map[string]*string `json:"tags"`
25853}
25854
25855// MarshalJSON is the custom marshaler for VpnSite.
25856func (vs VpnSite) MarshalJSON() ([]byte, error) {
25857	objectMap := make(map[string]interface{})
25858	if vs.VpnSiteProperties != nil {
25859		objectMap["properties"] = vs.VpnSiteProperties
25860	}
25861	if vs.ID != nil {
25862		objectMap["id"] = vs.ID
25863	}
25864	if vs.Location != nil {
25865		objectMap["location"] = vs.Location
25866	}
25867	if vs.Tags != nil {
25868		objectMap["tags"] = vs.Tags
25869	}
25870	return json.Marshal(objectMap)
25871}
25872
25873// UnmarshalJSON is the custom unmarshaler for VpnSite struct.
25874func (vs *VpnSite) UnmarshalJSON(body []byte) error {
25875	var m map[string]*json.RawMessage
25876	err := json.Unmarshal(body, &m)
25877	if err != nil {
25878		return err
25879	}
25880	for k, v := range m {
25881		switch k {
25882		case "properties":
25883			if v != nil {
25884				var vpnSiteProperties VpnSiteProperties
25885				err = json.Unmarshal(*v, &vpnSiteProperties)
25886				if err != nil {
25887					return err
25888				}
25889				vs.VpnSiteProperties = &vpnSiteProperties
25890			}
25891		case "etag":
25892			if v != nil {
25893				var etag string
25894				err = json.Unmarshal(*v, &etag)
25895				if err != nil {
25896					return err
25897				}
25898				vs.Etag = &etag
25899			}
25900		case "id":
25901			if v != nil {
25902				var ID string
25903				err = json.Unmarshal(*v, &ID)
25904				if err != nil {
25905					return err
25906				}
25907				vs.ID = &ID
25908			}
25909		case "name":
25910			if v != nil {
25911				var name string
25912				err = json.Unmarshal(*v, &name)
25913				if err != nil {
25914					return err
25915				}
25916				vs.Name = &name
25917			}
25918		case "type":
25919			if v != nil {
25920				var typeVar string
25921				err = json.Unmarshal(*v, &typeVar)
25922				if err != nil {
25923					return err
25924				}
25925				vs.Type = &typeVar
25926			}
25927		case "location":
25928			if v != nil {
25929				var location string
25930				err = json.Unmarshal(*v, &location)
25931				if err != nil {
25932					return err
25933				}
25934				vs.Location = &location
25935			}
25936		case "tags":
25937			if v != nil {
25938				var tags map[string]*string
25939				err = json.Unmarshal(*v, &tags)
25940				if err != nil {
25941					return err
25942				}
25943				vs.Tags = tags
25944			}
25945		}
25946	}
25947
25948	return nil
25949}
25950
25951// VpnSiteID vpnSite Resource.
25952type VpnSiteID struct {
25953	// VpnSite - READ-ONLY; The resource-uri of the vpn-site for which config is to be fetched.
25954	VpnSite *string `json:"vpnSite,omitempty"`
25955}
25956
25957// VpnSiteProperties parameters for VpnSite
25958type VpnSiteProperties struct {
25959	// VirtualWan - The VirtualWAN to which the vpnSite belongs
25960	VirtualWan *SubResource `json:"virtualWan,omitempty"`
25961	// DeviceProperties - The device properties
25962	DeviceProperties *DeviceProperties `json:"deviceProperties,omitempty"`
25963	// IPAddress - The ip-address for the vpn-site.
25964	IPAddress *string `json:"ipAddress,omitempty"`
25965	// SiteKey - The key for vpn-site that can be used for connections.
25966	SiteKey *string `json:"siteKey,omitempty"`
25967	// AddressSpace - The AddressSpace that contains an array of IP address ranges.
25968	AddressSpace *AddressSpace `json:"addressSpace,omitempty"`
25969	// BgpProperties - The set of bgp properties.
25970	BgpProperties *BgpSettings `json:"bgpProperties,omitempty"`
25971	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
25972	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
25973	// IsSecuritySite - IsSecuritySite flag
25974	IsSecuritySite *bool `json:"isSecuritySite,omitempty"`
25975}
25976
25977// VpnSitesConfigurationDownloadFuture an abstraction for monitoring and retrieving the results of a
25978// long-running operation.
25979type VpnSitesConfigurationDownloadFuture struct {
25980	azure.FutureAPI
25981	// Result returns the result of the asynchronous operation.
25982	// If the operation has not completed it will return an error.
25983	Result func(VpnSitesConfigurationClient) (autorest.Response, error)
25984}
25985
25986// VpnSitesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
25987// operation.
25988type VpnSitesCreateOrUpdateFuture struct {
25989	azure.FutureAPI
25990	// Result returns the result of the asynchronous operation.
25991	// If the operation has not completed it will return an error.
25992	Result func(VpnSitesClient) (VpnSite, error)
25993}
25994
25995// VpnSitesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
25996// operation.
25997type VpnSitesDeleteFuture struct {
25998	azure.FutureAPI
25999	// Result returns the result of the asynchronous operation.
26000	// If the operation has not completed it will return an error.
26001	Result func(VpnSitesClient) (autorest.Response, error)
26002}
26003
26004// VpnSitesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
26005// operation.
26006type VpnSitesUpdateTagsFuture struct {
26007	azure.FutureAPI
26008	// Result returns the result of the asynchronous operation.
26009	// If the operation has not completed it will return an error.
26010	Result func(VpnSitesClient) (VpnSite, error)
26011}
26012
26013// Watcher network watcher in a resource group.
26014type Watcher struct {
26015	autorest.Response `json:"-"`
26016	// Etag - A unique read-only string that changes whenever the resource is updated.
26017	Etag                     *string `json:"etag,omitempty"`
26018	*WatcherPropertiesFormat `json:"properties,omitempty"`
26019	// ID - Resource ID.
26020	ID *string `json:"id,omitempty"`
26021	// Name - READ-ONLY; Resource name.
26022	Name *string `json:"name,omitempty"`
26023	// Type - READ-ONLY; Resource type.
26024	Type *string `json:"type,omitempty"`
26025	// Location - Resource location.
26026	Location *string `json:"location,omitempty"`
26027	// Tags - Resource tags.
26028	Tags map[string]*string `json:"tags"`
26029}
26030
26031// MarshalJSON is the custom marshaler for Watcher.
26032func (w Watcher) MarshalJSON() ([]byte, error) {
26033	objectMap := make(map[string]interface{})
26034	if w.Etag != nil {
26035		objectMap["etag"] = w.Etag
26036	}
26037	if w.WatcherPropertiesFormat != nil {
26038		objectMap["properties"] = w.WatcherPropertiesFormat
26039	}
26040	if w.ID != nil {
26041		objectMap["id"] = w.ID
26042	}
26043	if w.Location != nil {
26044		objectMap["location"] = w.Location
26045	}
26046	if w.Tags != nil {
26047		objectMap["tags"] = w.Tags
26048	}
26049	return json.Marshal(objectMap)
26050}
26051
26052// UnmarshalJSON is the custom unmarshaler for Watcher struct.
26053func (w *Watcher) UnmarshalJSON(body []byte) error {
26054	var m map[string]*json.RawMessage
26055	err := json.Unmarshal(body, &m)
26056	if err != nil {
26057		return err
26058	}
26059	for k, v := range m {
26060		switch k {
26061		case "etag":
26062			if v != nil {
26063				var etag string
26064				err = json.Unmarshal(*v, &etag)
26065				if err != nil {
26066					return err
26067				}
26068				w.Etag = &etag
26069			}
26070		case "properties":
26071			if v != nil {
26072				var watcherPropertiesFormat WatcherPropertiesFormat
26073				err = json.Unmarshal(*v, &watcherPropertiesFormat)
26074				if err != nil {
26075					return err
26076				}
26077				w.WatcherPropertiesFormat = &watcherPropertiesFormat
26078			}
26079		case "id":
26080			if v != nil {
26081				var ID string
26082				err = json.Unmarshal(*v, &ID)
26083				if err != nil {
26084					return err
26085				}
26086				w.ID = &ID
26087			}
26088		case "name":
26089			if v != nil {
26090				var name string
26091				err = json.Unmarshal(*v, &name)
26092				if err != nil {
26093					return err
26094				}
26095				w.Name = &name
26096			}
26097		case "type":
26098			if v != nil {
26099				var typeVar string
26100				err = json.Unmarshal(*v, &typeVar)
26101				if err != nil {
26102					return err
26103				}
26104				w.Type = &typeVar
26105			}
26106		case "location":
26107			if v != nil {
26108				var location string
26109				err = json.Unmarshal(*v, &location)
26110				if err != nil {
26111					return err
26112				}
26113				w.Location = &location
26114			}
26115		case "tags":
26116			if v != nil {
26117				var tags map[string]*string
26118				err = json.Unmarshal(*v, &tags)
26119				if err != nil {
26120					return err
26121				}
26122				w.Tags = tags
26123			}
26124		}
26125	}
26126
26127	return nil
26128}
26129
26130// WatcherListResult list of network watcher resources.
26131type WatcherListResult struct {
26132	autorest.Response `json:"-"`
26133	Value             *[]Watcher `json:"value,omitempty"`
26134}
26135
26136// WatcherPropertiesFormat the network watcher properties.
26137type WatcherPropertiesFormat struct {
26138	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
26139	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
26140}
26141
26142// WatchersCheckConnectivityFuture an abstraction for monitoring and retrieving the results of a
26143// long-running operation.
26144type WatchersCheckConnectivityFuture struct {
26145	azure.FutureAPI
26146	// Result returns the result of the asynchronous operation.
26147	// If the operation has not completed it will return an error.
26148	Result func(WatchersClient) (ConnectivityInformation, error)
26149}
26150
26151// WatchersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
26152// operation.
26153type WatchersDeleteFuture struct {
26154	azure.FutureAPI
26155	// Result returns the result of the asynchronous operation.
26156	// If the operation has not completed it will return an error.
26157	Result func(WatchersClient) (autorest.Response, error)
26158}
26159
26160// WatchersGetAzureReachabilityReportFuture an abstraction for monitoring and retrieving the results of a
26161// long-running operation.
26162type WatchersGetAzureReachabilityReportFuture struct {
26163	azure.FutureAPI
26164	// Result returns the result of the asynchronous operation.
26165	// If the operation has not completed it will return an error.
26166	Result func(WatchersClient) (AzureReachabilityReport, error)
26167}
26168
26169// WatchersGetFlowLogStatusFuture an abstraction for monitoring and retrieving the results of a
26170// long-running operation.
26171type WatchersGetFlowLogStatusFuture struct {
26172	azure.FutureAPI
26173	// Result returns the result of the asynchronous operation.
26174	// If the operation has not completed it will return an error.
26175	Result func(WatchersClient) (FlowLogInformation, error)
26176}
26177
26178// WatchersGetNetworkConfigurationDiagnosticFuture an abstraction for monitoring and retrieving the results
26179// of a long-running operation.
26180type WatchersGetNetworkConfigurationDiagnosticFuture struct {
26181	azure.FutureAPI
26182	// Result returns the result of the asynchronous operation.
26183	// If the operation has not completed it will return an error.
26184	Result func(WatchersClient) (ConfigurationDiagnosticResponse, error)
26185}
26186
26187// WatchersGetNextHopFuture an abstraction for monitoring and retrieving the results of a long-running
26188// operation.
26189type WatchersGetNextHopFuture struct {
26190	azure.FutureAPI
26191	// Result returns the result of the asynchronous operation.
26192	// If the operation has not completed it will return an error.
26193	Result func(WatchersClient) (NextHopResult, error)
26194}
26195
26196// WatchersGetTroubleshootingFuture an abstraction for monitoring and retrieving the results of a
26197// long-running operation.
26198type WatchersGetTroubleshootingFuture struct {
26199	azure.FutureAPI
26200	// Result returns the result of the asynchronous operation.
26201	// If the operation has not completed it will return an error.
26202	Result func(WatchersClient) (TroubleshootingResult, error)
26203}
26204
26205// WatchersGetTroubleshootingResultFuture an abstraction for monitoring and retrieving the results of a
26206// long-running operation.
26207type WatchersGetTroubleshootingResultFuture struct {
26208	azure.FutureAPI
26209	// Result returns the result of the asynchronous operation.
26210	// If the operation has not completed it will return an error.
26211	Result func(WatchersClient) (TroubleshootingResult, error)
26212}
26213
26214// WatchersGetVMSecurityRulesFuture an abstraction for monitoring and retrieving the results of a
26215// long-running operation.
26216type WatchersGetVMSecurityRulesFuture struct {
26217	azure.FutureAPI
26218	// Result returns the result of the asynchronous operation.
26219	// If the operation has not completed it will return an error.
26220	Result func(WatchersClient) (SecurityGroupViewResult, error)
26221}
26222
26223// WatchersListAvailableProvidersFuture an abstraction for monitoring and retrieving the results of a
26224// long-running operation.
26225type WatchersListAvailableProvidersFuture struct {
26226	azure.FutureAPI
26227	// Result returns the result of the asynchronous operation.
26228	// If the operation has not completed it will return an error.
26229	Result func(WatchersClient) (AvailableProvidersList, error)
26230}
26231
26232// WatchersSetFlowLogConfigurationFuture an abstraction for monitoring and retrieving the results of a
26233// long-running operation.
26234type WatchersSetFlowLogConfigurationFuture struct {
26235	azure.FutureAPI
26236	// Result returns the result of the asynchronous operation.
26237	// If the operation has not completed it will return an error.
26238	Result func(WatchersClient) (FlowLogInformation, error)
26239}
26240
26241// WatchersVerifyIPFlowFuture an abstraction for monitoring and retrieving the results of a long-running
26242// operation.
26243type WatchersVerifyIPFlowFuture struct {
26244	azure.FutureAPI
26245	// Result returns the result of the asynchronous operation.
26246	// If the operation has not completed it will return an error.
26247	Result func(WatchersClient) (VerificationIPFlowResult, error)
26248}
26249