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-06-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	// ID - Resource ID.
50	ID *string `json:"id,omitempty"`
51	// Name - READ-ONLY; Resource name.
52	Name *string `json:"name,omitempty"`
53	// Type - READ-ONLY; Resource type.
54	Type *string `json:"type,omitempty"`
55	// Location - Resource location.
56	Location *string `json:"location,omitempty"`
57	// Tags - Resource tags.
58	Tags map[string]*string `json:"tags"`
59}
60
61// MarshalJSON is the custom marshaler for ApplicationGateway.
62func (ag ApplicationGateway) MarshalJSON() ([]byte, error) {
63	objectMap := make(map[string]interface{})
64	if ag.ApplicationGatewayPropertiesFormat != nil {
65		objectMap["properties"] = ag.ApplicationGatewayPropertiesFormat
66	}
67	if ag.Etag != nil {
68		objectMap["etag"] = ag.Etag
69	}
70	if ag.Zones != nil {
71		objectMap["zones"] = ag.Zones
72	}
73	if ag.ID != nil {
74		objectMap["id"] = ag.ID
75	}
76	if ag.Location != nil {
77		objectMap["location"] = ag.Location
78	}
79	if ag.Tags != nil {
80		objectMap["tags"] = ag.Tags
81	}
82	return json.Marshal(objectMap)
83}
84
85// UnmarshalJSON is the custom unmarshaler for ApplicationGateway struct.
86func (ag *ApplicationGateway) UnmarshalJSON(body []byte) error {
87	var m map[string]*json.RawMessage
88	err := json.Unmarshal(body, &m)
89	if err != nil {
90		return err
91	}
92	for k, v := range m {
93		switch k {
94		case "properties":
95			if v != nil {
96				var applicationGatewayPropertiesFormat ApplicationGatewayPropertiesFormat
97				err = json.Unmarshal(*v, &applicationGatewayPropertiesFormat)
98				if err != nil {
99					return err
100				}
101				ag.ApplicationGatewayPropertiesFormat = &applicationGatewayPropertiesFormat
102			}
103		case "etag":
104			if v != nil {
105				var etag string
106				err = json.Unmarshal(*v, &etag)
107				if err != nil {
108					return err
109				}
110				ag.Etag = &etag
111			}
112		case "zones":
113			if v != nil {
114				var zones []string
115				err = json.Unmarshal(*v, &zones)
116				if err != nil {
117					return err
118				}
119				ag.Zones = &zones
120			}
121		case "id":
122			if v != nil {
123				var ID string
124				err = json.Unmarshal(*v, &ID)
125				if err != nil {
126					return err
127				}
128				ag.ID = &ID
129			}
130		case "name":
131			if v != nil {
132				var name string
133				err = json.Unmarshal(*v, &name)
134				if err != nil {
135					return err
136				}
137				ag.Name = &name
138			}
139		case "type":
140			if v != nil {
141				var typeVar string
142				err = json.Unmarshal(*v, &typeVar)
143				if err != nil {
144					return err
145				}
146				ag.Type = &typeVar
147			}
148		case "location":
149			if v != nil {
150				var location string
151				err = json.Unmarshal(*v, &location)
152				if err != nil {
153					return err
154				}
155				ag.Location = &location
156			}
157		case "tags":
158			if v != nil {
159				var tags map[string]*string
160				err = json.Unmarshal(*v, &tags)
161				if err != nil {
162					return err
163				}
164				ag.Tags = tags
165			}
166		}
167	}
168
169	return nil
170}
171
172// ApplicationGatewayAuthenticationCertificate authentication certificates of an application gateway.
173type ApplicationGatewayAuthenticationCertificate struct {
174	*ApplicationGatewayAuthenticationCertificatePropertiesFormat `json:"properties,omitempty"`
175	// Name - Name of the authentication certificate that is unique within an Application Gateway.
176	Name *string `json:"name,omitempty"`
177	// Etag - A unique read-only string that changes whenever the resource is updated.
178	Etag *string `json:"etag,omitempty"`
179	// Type - Type of the resource.
180	Type *string `json:"type,omitempty"`
181	// ID - Resource ID.
182	ID *string `json:"id,omitempty"`
183}
184
185// MarshalJSON is the custom marshaler for ApplicationGatewayAuthenticationCertificate.
186func (agac ApplicationGatewayAuthenticationCertificate) MarshalJSON() ([]byte, error) {
187	objectMap := make(map[string]interface{})
188	if agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat != nil {
189		objectMap["properties"] = agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat
190	}
191	if agac.Name != nil {
192		objectMap["name"] = agac.Name
193	}
194	if agac.Etag != nil {
195		objectMap["etag"] = agac.Etag
196	}
197	if agac.Type != nil {
198		objectMap["type"] = agac.Type
199	}
200	if agac.ID != nil {
201		objectMap["id"] = agac.ID
202	}
203	return json.Marshal(objectMap)
204}
205
206// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayAuthenticationCertificate struct.
207func (agac *ApplicationGatewayAuthenticationCertificate) UnmarshalJSON(body []byte) error {
208	var m map[string]*json.RawMessage
209	err := json.Unmarshal(body, &m)
210	if err != nil {
211		return err
212	}
213	for k, v := range m {
214		switch k {
215		case "properties":
216			if v != nil {
217				var applicationGatewayAuthenticationCertificatePropertiesFormat ApplicationGatewayAuthenticationCertificatePropertiesFormat
218				err = json.Unmarshal(*v, &applicationGatewayAuthenticationCertificatePropertiesFormat)
219				if err != nil {
220					return err
221				}
222				agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat = &applicationGatewayAuthenticationCertificatePropertiesFormat
223			}
224		case "name":
225			if v != nil {
226				var name string
227				err = json.Unmarshal(*v, &name)
228				if err != nil {
229					return err
230				}
231				agac.Name = &name
232			}
233		case "etag":
234			if v != nil {
235				var etag string
236				err = json.Unmarshal(*v, &etag)
237				if err != nil {
238					return err
239				}
240				agac.Etag = &etag
241			}
242		case "type":
243			if v != nil {
244				var typeVar string
245				err = json.Unmarshal(*v, &typeVar)
246				if err != nil {
247					return err
248				}
249				agac.Type = &typeVar
250			}
251		case "id":
252			if v != nil {
253				var ID string
254				err = json.Unmarshal(*v, &ID)
255				if err != nil {
256					return err
257				}
258				agac.ID = &ID
259			}
260		}
261	}
262
263	return nil
264}
265
266// ApplicationGatewayAuthenticationCertificatePropertiesFormat authentication certificates properties of an
267// application gateway.
268type ApplicationGatewayAuthenticationCertificatePropertiesFormat struct {
269	// Data - Certificate public data.
270	Data *string `json:"data,omitempty"`
271	// ProvisioningState - Provisioning state of the authentication certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
272	ProvisioningState *string `json:"provisioningState,omitempty"`
273}
274
275// ApplicationGatewayAutoscaleBounds application Gateway autoscale bounds on number of Application Gateway
276// instance.
277type ApplicationGatewayAutoscaleBounds struct {
278	// Min - Lower bound on number of Application Gateway instances.
279	Min *int32 `json:"min,omitempty"`
280	// Max - Upper bound on number of Application Gateway instances.
281	Max *int32 `json:"max,omitempty"`
282}
283
284// ApplicationGatewayAutoscaleConfiguration application Gateway autoscale configuration.
285type ApplicationGatewayAutoscaleConfiguration struct {
286	// Bounds - Autoscale bounds
287	Bounds *ApplicationGatewayAutoscaleBounds `json:"bounds,omitempty"`
288}
289
290// ApplicationGatewayAvailableSslOptions response for ApplicationGatewayAvailableSslOptions API service
291// call.
292type ApplicationGatewayAvailableSslOptions struct {
293	autorest.Response                                      `json:"-"`
294	*ApplicationGatewayAvailableSslOptionsPropertiesFormat `json:"properties,omitempty"`
295	// ID - Resource ID.
296	ID *string `json:"id,omitempty"`
297	// Name - READ-ONLY; Resource name.
298	Name *string `json:"name,omitempty"`
299	// Type - READ-ONLY; Resource type.
300	Type *string `json:"type,omitempty"`
301	// Location - Resource location.
302	Location *string `json:"location,omitempty"`
303	// Tags - Resource tags.
304	Tags map[string]*string `json:"tags"`
305}
306
307// MarshalJSON is the custom marshaler for ApplicationGatewayAvailableSslOptions.
308func (agaso ApplicationGatewayAvailableSslOptions) MarshalJSON() ([]byte, error) {
309	objectMap := make(map[string]interface{})
310	if agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat != nil {
311		objectMap["properties"] = agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat
312	}
313	if agaso.ID != nil {
314		objectMap["id"] = agaso.ID
315	}
316	if agaso.Location != nil {
317		objectMap["location"] = agaso.Location
318	}
319	if agaso.Tags != nil {
320		objectMap["tags"] = agaso.Tags
321	}
322	return json.Marshal(objectMap)
323}
324
325// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayAvailableSslOptions struct.
326func (agaso *ApplicationGatewayAvailableSslOptions) UnmarshalJSON(body []byte) error {
327	var m map[string]*json.RawMessage
328	err := json.Unmarshal(body, &m)
329	if err != nil {
330		return err
331	}
332	for k, v := range m {
333		switch k {
334		case "properties":
335			if v != nil {
336				var applicationGatewayAvailableSslOptionsPropertiesFormat ApplicationGatewayAvailableSslOptionsPropertiesFormat
337				err = json.Unmarshal(*v, &applicationGatewayAvailableSslOptionsPropertiesFormat)
338				if err != nil {
339					return err
340				}
341				agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat = &applicationGatewayAvailableSslOptionsPropertiesFormat
342			}
343		case "id":
344			if v != nil {
345				var ID string
346				err = json.Unmarshal(*v, &ID)
347				if err != nil {
348					return err
349				}
350				agaso.ID = &ID
351			}
352		case "name":
353			if v != nil {
354				var name string
355				err = json.Unmarshal(*v, &name)
356				if err != nil {
357					return err
358				}
359				agaso.Name = &name
360			}
361		case "type":
362			if v != nil {
363				var typeVar string
364				err = json.Unmarshal(*v, &typeVar)
365				if err != nil {
366					return err
367				}
368				agaso.Type = &typeVar
369			}
370		case "location":
371			if v != nil {
372				var location string
373				err = json.Unmarshal(*v, &location)
374				if err != nil {
375					return err
376				}
377				agaso.Location = &location
378			}
379		case "tags":
380			if v != nil {
381				var tags map[string]*string
382				err = json.Unmarshal(*v, &tags)
383				if err != nil {
384					return err
385				}
386				agaso.Tags = tags
387			}
388		}
389	}
390
391	return nil
392}
393
394// ApplicationGatewayAvailableSslOptionsPropertiesFormat properties of
395// ApplicationGatewayAvailableSslOptions
396type ApplicationGatewayAvailableSslOptionsPropertiesFormat struct {
397	// PredefinedPolicies - List of available Ssl predefined policy.
398	PredefinedPolicies *[]SubResource `json:"predefinedPolicies,omitempty"`
399	// DefaultPolicy - Name of the Ssl predefined policy applied by default to application gateway. Possible values include: 'AppGwSslPolicy20150501', 'AppGwSslPolicy20170401', 'AppGwSslPolicy20170401S'
400	DefaultPolicy ApplicationGatewaySslPolicyName `json:"defaultPolicy,omitempty"`
401	// AvailableCipherSuites - List of available Ssl cipher suites.
402	AvailableCipherSuites *[]ApplicationGatewaySslCipherSuite `json:"availableCipherSuites,omitempty"`
403	// AvailableProtocols - List of available Ssl protocols.
404	AvailableProtocols *[]ApplicationGatewaySslProtocol `json:"availableProtocols,omitempty"`
405}
406
407// ApplicationGatewayAvailableSslPredefinedPolicies response for ApplicationGatewayAvailableSslOptions API
408// service call.
409type ApplicationGatewayAvailableSslPredefinedPolicies struct {
410	autorest.Response `json:"-"`
411	// Value - List of available Ssl predefined policy.
412	Value *[]ApplicationGatewaySslPredefinedPolicy `json:"value,omitempty"`
413	// NextLink - URL to get the next set of results.
414	NextLink *string `json:"nextLink,omitempty"`
415}
416
417// ApplicationGatewayAvailableSslPredefinedPoliciesIterator provides access to a complete listing of
418// ApplicationGatewaySslPredefinedPolicy values.
419type ApplicationGatewayAvailableSslPredefinedPoliciesIterator struct {
420	i    int
421	page ApplicationGatewayAvailableSslPredefinedPoliciesPage
422}
423
424// NextWithContext advances to the next value.  If there was an error making
425// the request the iterator does not advance and the error is returned.
426func (iter *ApplicationGatewayAvailableSslPredefinedPoliciesIterator) NextWithContext(ctx context.Context) (err error) {
427	if tracing.IsEnabled() {
428		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayAvailableSslPredefinedPoliciesIterator.NextWithContext")
429		defer func() {
430			sc := -1
431			if iter.Response().Response.Response != nil {
432				sc = iter.Response().Response.Response.StatusCode
433			}
434			tracing.EndSpan(ctx, sc, err)
435		}()
436	}
437	iter.i++
438	if iter.i < len(iter.page.Values()) {
439		return nil
440	}
441	err = iter.page.NextWithContext(ctx)
442	if err != nil {
443		iter.i--
444		return err
445	}
446	iter.i = 0
447	return nil
448}
449
450// Next advances to the next value.  If there was an error making
451// the request the iterator does not advance and the error is returned.
452// Deprecated: Use NextWithContext() instead.
453func (iter *ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Next() error {
454	return iter.NextWithContext(context.Background())
455}
456
457// NotDone returns true if the enumeration should be started or is not yet complete.
458func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) NotDone() bool {
459	return iter.page.NotDone() && iter.i < len(iter.page.Values())
460}
461
462// Response returns the raw server response from the last page request.
463func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Response() ApplicationGatewayAvailableSslPredefinedPolicies {
464	return iter.page.Response()
465}
466
467// Value returns the current value or a zero-initialized value if the
468// iterator has advanced beyond the end of the collection.
469func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Value() ApplicationGatewaySslPredefinedPolicy {
470	if !iter.page.NotDone() {
471		return ApplicationGatewaySslPredefinedPolicy{}
472	}
473	return iter.page.Values()[iter.i]
474}
475
476// Creates a new instance of the ApplicationGatewayAvailableSslPredefinedPoliciesIterator type.
477func NewApplicationGatewayAvailableSslPredefinedPoliciesIterator(page ApplicationGatewayAvailableSslPredefinedPoliciesPage) ApplicationGatewayAvailableSslPredefinedPoliciesIterator {
478	return ApplicationGatewayAvailableSslPredefinedPoliciesIterator{page: page}
479}
480
481// IsEmpty returns true if the ListResult contains no values.
482func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) IsEmpty() bool {
483	return agaspp.Value == nil || len(*agaspp.Value) == 0
484}
485
486// hasNextLink returns true if the NextLink is not empty.
487func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) hasNextLink() bool {
488	return agaspp.NextLink != nil && len(*agaspp.NextLink) != 0
489}
490
491// applicationGatewayAvailableSslPredefinedPoliciesPreparer prepares a request to retrieve the next set of results.
492// It returns nil if no more results exist.
493func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) applicationGatewayAvailableSslPredefinedPoliciesPreparer(ctx context.Context) (*http.Request, error) {
494	if !agaspp.hasNextLink() {
495		return nil, nil
496	}
497	return autorest.Prepare((&http.Request{}).WithContext(ctx),
498		autorest.AsJSON(),
499		autorest.AsGet(),
500		autorest.WithBaseURL(to.String(agaspp.NextLink)))
501}
502
503// ApplicationGatewayAvailableSslPredefinedPoliciesPage contains a page of
504// ApplicationGatewaySslPredefinedPolicy values.
505type ApplicationGatewayAvailableSslPredefinedPoliciesPage struct {
506	fn     func(context.Context, ApplicationGatewayAvailableSslPredefinedPolicies) (ApplicationGatewayAvailableSslPredefinedPolicies, error)
507	agaspp ApplicationGatewayAvailableSslPredefinedPolicies
508}
509
510// NextWithContext advances to the next page of values.  If there was an error making
511// the request the page does not advance and the error is returned.
512func (page *ApplicationGatewayAvailableSslPredefinedPoliciesPage) NextWithContext(ctx context.Context) (err error) {
513	if tracing.IsEnabled() {
514		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayAvailableSslPredefinedPoliciesPage.NextWithContext")
515		defer func() {
516			sc := -1
517			if page.Response().Response.Response != nil {
518				sc = page.Response().Response.Response.StatusCode
519			}
520			tracing.EndSpan(ctx, sc, err)
521		}()
522	}
523	for {
524		next, err := page.fn(ctx, page.agaspp)
525		if err != nil {
526			return err
527		}
528		page.agaspp = next
529		if !next.hasNextLink() || !next.IsEmpty() {
530			break
531		}
532	}
533	return nil
534}
535
536// Next advances to the next page of values.  If there was an error making
537// the request the page does not advance and the error is returned.
538// Deprecated: Use NextWithContext() instead.
539func (page *ApplicationGatewayAvailableSslPredefinedPoliciesPage) Next() error {
540	return page.NextWithContext(context.Background())
541}
542
543// NotDone returns true if the page enumeration should be started or is not yet complete.
544func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) NotDone() bool {
545	return !page.agaspp.IsEmpty()
546}
547
548// Response returns the raw server response from the last page request.
549func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) Response() ApplicationGatewayAvailableSslPredefinedPolicies {
550	return page.agaspp
551}
552
553// Values returns the slice of values for the current page or nil if there are no values.
554func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) Values() []ApplicationGatewaySslPredefinedPolicy {
555	if page.agaspp.IsEmpty() {
556		return nil
557	}
558	return *page.agaspp.Value
559}
560
561// Creates a new instance of the ApplicationGatewayAvailableSslPredefinedPoliciesPage type.
562func NewApplicationGatewayAvailableSslPredefinedPoliciesPage(cur ApplicationGatewayAvailableSslPredefinedPolicies, getNextPage func(context.Context, ApplicationGatewayAvailableSslPredefinedPolicies) (ApplicationGatewayAvailableSslPredefinedPolicies, error)) ApplicationGatewayAvailableSslPredefinedPoliciesPage {
563	return ApplicationGatewayAvailableSslPredefinedPoliciesPage{
564		fn:     getNextPage,
565		agaspp: cur,
566	}
567}
568
569// ApplicationGatewayAvailableWafRuleSetsResult response for ApplicationGatewayAvailableWafRuleSets API
570// service call.
571type ApplicationGatewayAvailableWafRuleSetsResult struct {
572	autorest.Response `json:"-"`
573	// Value - The list of application gateway rule sets.
574	Value *[]ApplicationGatewayFirewallRuleSet `json:"value,omitempty"`
575}
576
577// ApplicationGatewayBackendAddress backend address of an application gateway.
578type ApplicationGatewayBackendAddress struct {
579	// Fqdn - Fully qualified domain name (FQDN).
580	Fqdn *string `json:"fqdn,omitempty"`
581	// IPAddress - IP address
582	IPAddress *string `json:"ipAddress,omitempty"`
583}
584
585// ApplicationGatewayBackendAddressPool backend Address Pool of an application gateway.
586type ApplicationGatewayBackendAddressPool struct {
587	*ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"`
588	// Name - Name of the backend address pool that is unique within an Application Gateway.
589	Name *string `json:"name,omitempty"`
590	// Etag - A unique read-only string that changes whenever the resource is updated.
591	Etag *string `json:"etag,omitempty"`
592	// Type - Type of the resource.
593	Type *string `json:"type,omitempty"`
594	// ID - Resource ID.
595	ID *string `json:"id,omitempty"`
596}
597
598// MarshalJSON is the custom marshaler for ApplicationGatewayBackendAddressPool.
599func (agbap ApplicationGatewayBackendAddressPool) MarshalJSON() ([]byte, error) {
600	objectMap := make(map[string]interface{})
601	if agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat != nil {
602		objectMap["properties"] = agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat
603	}
604	if agbap.Name != nil {
605		objectMap["name"] = agbap.Name
606	}
607	if agbap.Etag != nil {
608		objectMap["etag"] = agbap.Etag
609	}
610	if agbap.Type != nil {
611		objectMap["type"] = agbap.Type
612	}
613	if agbap.ID != nil {
614		objectMap["id"] = agbap.ID
615	}
616	return json.Marshal(objectMap)
617}
618
619// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayBackendAddressPool struct.
620func (agbap *ApplicationGatewayBackendAddressPool) UnmarshalJSON(body []byte) error {
621	var m map[string]*json.RawMessage
622	err := json.Unmarshal(body, &m)
623	if err != nil {
624		return err
625	}
626	for k, v := range m {
627		switch k {
628		case "properties":
629			if v != nil {
630				var applicationGatewayBackendAddressPoolPropertiesFormat ApplicationGatewayBackendAddressPoolPropertiesFormat
631				err = json.Unmarshal(*v, &applicationGatewayBackendAddressPoolPropertiesFormat)
632				if err != nil {
633					return err
634				}
635				agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat = &applicationGatewayBackendAddressPoolPropertiesFormat
636			}
637		case "name":
638			if v != nil {
639				var name string
640				err = json.Unmarshal(*v, &name)
641				if err != nil {
642					return err
643				}
644				agbap.Name = &name
645			}
646		case "etag":
647			if v != nil {
648				var etag string
649				err = json.Unmarshal(*v, &etag)
650				if err != nil {
651					return err
652				}
653				agbap.Etag = &etag
654			}
655		case "type":
656			if v != nil {
657				var typeVar string
658				err = json.Unmarshal(*v, &typeVar)
659				if err != nil {
660					return err
661				}
662				agbap.Type = &typeVar
663			}
664		case "id":
665			if v != nil {
666				var ID string
667				err = json.Unmarshal(*v, &ID)
668				if err != nil {
669					return err
670				}
671				agbap.ID = &ID
672			}
673		}
674	}
675
676	return nil
677}
678
679// ApplicationGatewayBackendAddressPoolPropertiesFormat properties of Backend Address Pool of an
680// application gateway.
681type ApplicationGatewayBackendAddressPoolPropertiesFormat struct {
682	// BackendIPConfigurations - Collection of references to IPs defined in network interfaces.
683	BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"`
684	// BackendAddresses - Backend addresses
685	BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"`
686	// ProvisioningState - Provisioning state of the backend address pool resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
687	ProvisioningState *string `json:"provisioningState,omitempty"`
688}
689
690// ApplicationGatewayBackendHealth list of ApplicationGatewayBackendHealthPool resources.
691type ApplicationGatewayBackendHealth struct {
692	autorest.Response   `json:"-"`
693	BackendAddressPools *[]ApplicationGatewayBackendHealthPool `json:"backendAddressPools,omitempty"`
694}
695
696// ApplicationGatewayBackendHealthHTTPSettings application gateway BackendHealthHttp settings.
697type ApplicationGatewayBackendHealthHTTPSettings struct {
698	// BackendHTTPSettings - Reference of an ApplicationGatewayBackendHttpSettings resource.
699	BackendHTTPSettings *ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettings,omitempty"`
700	// Servers - List of ApplicationGatewayBackendHealthServer resources.
701	Servers *[]ApplicationGatewayBackendHealthServer `json:"servers,omitempty"`
702}
703
704// ApplicationGatewayBackendHealthPool application gateway BackendHealth pool.
705type ApplicationGatewayBackendHealthPool struct {
706	// BackendAddressPool - Reference of an ApplicationGatewayBackendAddressPool resource.
707	BackendAddressPool *ApplicationGatewayBackendAddressPool `json:"backendAddressPool,omitempty"`
708	// BackendHTTPSettingsCollection - List of ApplicationGatewayBackendHealthHttpSettings resources.
709	BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHealthHTTPSettings `json:"backendHttpSettingsCollection,omitempty"`
710}
711
712// ApplicationGatewayBackendHealthServer application gateway backendhealth http settings.
713type ApplicationGatewayBackendHealthServer struct {
714	// Address - IP address or FQDN of backend server.
715	Address *string `json:"address,omitempty"`
716	// IPConfiguration - Reference of IP configuration of backend server.
717	IPConfiguration *InterfaceIPConfiguration `json:"ipConfiguration,omitempty"`
718	// Health - Health of backend server. Possible values include: 'Unknown', 'Up', 'Down', 'Partial', 'Draining'
719	Health ApplicationGatewayBackendHealthServerHealth `json:"health,omitempty"`
720}
721
722// ApplicationGatewayBackendHTTPSettings backend address pool settings of an application gateway.
723type ApplicationGatewayBackendHTTPSettings struct {
724	*ApplicationGatewayBackendHTTPSettingsPropertiesFormat `json:"properties,omitempty"`
725	// Name - Name of the backend http settings that is unique within an Application Gateway.
726	Name *string `json:"name,omitempty"`
727	// Etag - A unique read-only string that changes whenever the resource is updated.
728	Etag *string `json:"etag,omitempty"`
729	// Type - Type of the resource.
730	Type *string `json:"type,omitempty"`
731	// ID - Resource ID.
732	ID *string `json:"id,omitempty"`
733}
734
735// MarshalJSON is the custom marshaler for ApplicationGatewayBackendHTTPSettings.
736func (agbhs ApplicationGatewayBackendHTTPSettings) MarshalJSON() ([]byte, error) {
737	objectMap := make(map[string]interface{})
738	if agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat != nil {
739		objectMap["properties"] = agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat
740	}
741	if agbhs.Name != nil {
742		objectMap["name"] = agbhs.Name
743	}
744	if agbhs.Etag != nil {
745		objectMap["etag"] = agbhs.Etag
746	}
747	if agbhs.Type != nil {
748		objectMap["type"] = agbhs.Type
749	}
750	if agbhs.ID != nil {
751		objectMap["id"] = agbhs.ID
752	}
753	return json.Marshal(objectMap)
754}
755
756// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayBackendHTTPSettings struct.
757func (agbhs *ApplicationGatewayBackendHTTPSettings) UnmarshalJSON(body []byte) error {
758	var m map[string]*json.RawMessage
759	err := json.Unmarshal(body, &m)
760	if err != nil {
761		return err
762	}
763	for k, v := range m {
764		switch k {
765		case "properties":
766			if v != nil {
767				var applicationGatewayBackendHTTPSettingsPropertiesFormat ApplicationGatewayBackendHTTPSettingsPropertiesFormat
768				err = json.Unmarshal(*v, &applicationGatewayBackendHTTPSettingsPropertiesFormat)
769				if err != nil {
770					return err
771				}
772				agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat = &applicationGatewayBackendHTTPSettingsPropertiesFormat
773			}
774		case "name":
775			if v != nil {
776				var name string
777				err = json.Unmarshal(*v, &name)
778				if err != nil {
779					return err
780				}
781				agbhs.Name = &name
782			}
783		case "etag":
784			if v != nil {
785				var etag string
786				err = json.Unmarshal(*v, &etag)
787				if err != nil {
788					return err
789				}
790				agbhs.Etag = &etag
791			}
792		case "type":
793			if v != nil {
794				var typeVar string
795				err = json.Unmarshal(*v, &typeVar)
796				if err != nil {
797					return err
798				}
799				agbhs.Type = &typeVar
800			}
801		case "id":
802			if v != nil {
803				var ID string
804				err = json.Unmarshal(*v, &ID)
805				if err != nil {
806					return err
807				}
808				agbhs.ID = &ID
809			}
810		}
811	}
812
813	return nil
814}
815
816// ApplicationGatewayBackendHTTPSettingsPropertiesFormat properties of Backend address pool settings of an
817// application gateway.
818type ApplicationGatewayBackendHTTPSettingsPropertiesFormat struct {
819	// Port - The destination port on the backend.
820	Port *int32 `json:"port,omitempty"`
821	// Protocol - The protocol used to communicate with the backend. Possible values are 'Http' and 'Https'. Possible values include: 'HTTP', 'HTTPS'
822	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
823	// CookieBasedAffinity - Cookie based affinity. Possible values include: 'Enabled', 'Disabled'
824	CookieBasedAffinity ApplicationGatewayCookieBasedAffinity `json:"cookieBasedAffinity,omitempty"`
825	// 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.
826	RequestTimeout *int32 `json:"requestTimeout,omitempty"`
827	// Probe - Probe resource of an application gateway.
828	Probe *SubResource `json:"probe,omitempty"`
829	// AuthenticationCertificates - Array of references to application gateway authentication certificates.
830	AuthenticationCertificates *[]SubResource `json:"authenticationCertificates,omitempty"`
831	// ConnectionDraining - Connection draining of the backend http settings resource.
832	ConnectionDraining *ApplicationGatewayConnectionDraining `json:"connectionDraining,omitempty"`
833	// HostName - Host header to be sent to the backend servers.
834	HostName *string `json:"hostName,omitempty"`
835	// PickHostNameFromBackendAddress - Whether to pick host header should be picked from the host name of the backend server. Default value is false.
836	PickHostNameFromBackendAddress *bool `json:"pickHostNameFromBackendAddress,omitempty"`
837	// AffinityCookieName - Cookie name to use for the affinity cookie.
838	AffinityCookieName *string `json:"affinityCookieName,omitempty"`
839	// ProbeEnabled - Whether the probe is enabled. Default value is false.
840	ProbeEnabled *bool `json:"probeEnabled,omitempty"`
841	// Path - Path which should be used as a prefix for all HTTP requests. Null means no path will be prefixed. Default value is null.
842	Path *string `json:"path,omitempty"`
843	// ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
844	ProvisioningState *string `json:"provisioningState,omitempty"`
845}
846
847// ApplicationGatewayConnectionDraining connection draining allows open connections to a backend server to
848// be active for a specified time after the backend server got removed from the configuration.
849type ApplicationGatewayConnectionDraining struct {
850	// Enabled - Whether connection draining is enabled or not.
851	Enabled *bool `json:"enabled,omitempty"`
852	// DrainTimeoutInSec - The number of seconds connection draining is active. Acceptable values are from 1 second to 3600 seconds.
853	DrainTimeoutInSec *int32 `json:"drainTimeoutInSec,omitempty"`
854}
855
856// ApplicationGatewayFirewallDisabledRuleGroup allows to disable rules within a rule group or an entire
857// rule group.
858type ApplicationGatewayFirewallDisabledRuleGroup struct {
859	// RuleGroupName - The name of the rule group that will be disabled.
860	RuleGroupName *string `json:"ruleGroupName,omitempty"`
861	// Rules - The list of rules that will be disabled. If null, all rules of the rule group will be disabled.
862	Rules *[]int32 `json:"rules,omitempty"`
863}
864
865// ApplicationGatewayFirewallRule a web application firewall rule.
866type ApplicationGatewayFirewallRule struct {
867	// RuleID - The identifier of the web application firewall rule.
868	RuleID *int32 `json:"ruleId,omitempty"`
869	// Description - The description of the web application firewall rule.
870	Description *string `json:"description,omitempty"`
871}
872
873// ApplicationGatewayFirewallRuleGroup a web application firewall rule group.
874type ApplicationGatewayFirewallRuleGroup struct {
875	// RuleGroupName - The name of the web application firewall rule group.
876	RuleGroupName *string `json:"ruleGroupName,omitempty"`
877	// Description - The description of the web application firewall rule group.
878	Description *string `json:"description,omitempty"`
879	// Rules - The rules of the web application firewall rule group.
880	Rules *[]ApplicationGatewayFirewallRule `json:"rules,omitempty"`
881}
882
883// ApplicationGatewayFirewallRuleSet a web application firewall rule set.
884type ApplicationGatewayFirewallRuleSet struct {
885	*ApplicationGatewayFirewallRuleSetPropertiesFormat `json:"properties,omitempty"`
886	// ID - Resource ID.
887	ID *string `json:"id,omitempty"`
888	// Name - READ-ONLY; Resource name.
889	Name *string `json:"name,omitempty"`
890	// Type - READ-ONLY; Resource type.
891	Type *string `json:"type,omitempty"`
892	// Location - Resource location.
893	Location *string `json:"location,omitempty"`
894	// Tags - Resource tags.
895	Tags map[string]*string `json:"tags"`
896}
897
898// MarshalJSON is the custom marshaler for ApplicationGatewayFirewallRuleSet.
899func (agfrs ApplicationGatewayFirewallRuleSet) MarshalJSON() ([]byte, error) {
900	objectMap := make(map[string]interface{})
901	if agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat != nil {
902		objectMap["properties"] = agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat
903	}
904	if agfrs.ID != nil {
905		objectMap["id"] = agfrs.ID
906	}
907	if agfrs.Location != nil {
908		objectMap["location"] = agfrs.Location
909	}
910	if agfrs.Tags != nil {
911		objectMap["tags"] = agfrs.Tags
912	}
913	return json.Marshal(objectMap)
914}
915
916// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFirewallRuleSet struct.
917func (agfrs *ApplicationGatewayFirewallRuleSet) UnmarshalJSON(body []byte) error {
918	var m map[string]*json.RawMessage
919	err := json.Unmarshal(body, &m)
920	if err != nil {
921		return err
922	}
923	for k, v := range m {
924		switch k {
925		case "properties":
926			if v != nil {
927				var applicationGatewayFirewallRuleSetPropertiesFormat ApplicationGatewayFirewallRuleSetPropertiesFormat
928				err = json.Unmarshal(*v, &applicationGatewayFirewallRuleSetPropertiesFormat)
929				if err != nil {
930					return err
931				}
932				agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat = &applicationGatewayFirewallRuleSetPropertiesFormat
933			}
934		case "id":
935			if v != nil {
936				var ID string
937				err = json.Unmarshal(*v, &ID)
938				if err != nil {
939					return err
940				}
941				agfrs.ID = &ID
942			}
943		case "name":
944			if v != nil {
945				var name string
946				err = json.Unmarshal(*v, &name)
947				if err != nil {
948					return err
949				}
950				agfrs.Name = &name
951			}
952		case "type":
953			if v != nil {
954				var typeVar string
955				err = json.Unmarshal(*v, &typeVar)
956				if err != nil {
957					return err
958				}
959				agfrs.Type = &typeVar
960			}
961		case "location":
962			if v != nil {
963				var location string
964				err = json.Unmarshal(*v, &location)
965				if err != nil {
966					return err
967				}
968				agfrs.Location = &location
969			}
970		case "tags":
971			if v != nil {
972				var tags map[string]*string
973				err = json.Unmarshal(*v, &tags)
974				if err != nil {
975					return err
976				}
977				agfrs.Tags = tags
978			}
979		}
980	}
981
982	return nil
983}
984
985// ApplicationGatewayFirewallRuleSetPropertiesFormat properties of the web application firewall rule set.
986type ApplicationGatewayFirewallRuleSetPropertiesFormat struct {
987	// ProvisioningState - The provisioning state of the web application firewall rule set.
988	ProvisioningState *string `json:"provisioningState,omitempty"`
989	// RuleSetType - The type of the web application firewall rule set.
990	RuleSetType *string `json:"ruleSetType,omitempty"`
991	// RuleSetVersion - The version of the web application firewall rule set type.
992	RuleSetVersion *string `json:"ruleSetVersion,omitempty"`
993	// RuleGroups - The rule groups of the web application firewall rule set.
994	RuleGroups *[]ApplicationGatewayFirewallRuleGroup `json:"ruleGroups,omitempty"`
995}
996
997// ApplicationGatewayFrontendIPConfiguration frontend IP configuration of an application gateway.
998type ApplicationGatewayFrontendIPConfiguration struct {
999	*ApplicationGatewayFrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"`
1000	// Name - Name of the frontend IP configuration that is unique within an Application Gateway.
1001	Name *string `json:"name,omitempty"`
1002	// Etag - A unique read-only string that changes whenever the resource is updated.
1003	Etag *string `json:"etag,omitempty"`
1004	// Type - Type of the resource.
1005	Type *string `json:"type,omitempty"`
1006	// ID - Resource ID.
1007	ID *string `json:"id,omitempty"`
1008}
1009
1010// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendIPConfiguration.
1011func (agfic ApplicationGatewayFrontendIPConfiguration) MarshalJSON() ([]byte, error) {
1012	objectMap := make(map[string]interface{})
1013	if agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat != nil {
1014		objectMap["properties"] = agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat
1015	}
1016	if agfic.Name != nil {
1017		objectMap["name"] = agfic.Name
1018	}
1019	if agfic.Etag != nil {
1020		objectMap["etag"] = agfic.Etag
1021	}
1022	if agfic.Type != nil {
1023		objectMap["type"] = agfic.Type
1024	}
1025	if agfic.ID != nil {
1026		objectMap["id"] = agfic.ID
1027	}
1028	return json.Marshal(objectMap)
1029}
1030
1031// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFrontendIPConfiguration struct.
1032func (agfic *ApplicationGatewayFrontendIPConfiguration) UnmarshalJSON(body []byte) error {
1033	var m map[string]*json.RawMessage
1034	err := json.Unmarshal(body, &m)
1035	if err != nil {
1036		return err
1037	}
1038	for k, v := range m {
1039		switch k {
1040		case "properties":
1041			if v != nil {
1042				var applicationGatewayFrontendIPConfigurationPropertiesFormat ApplicationGatewayFrontendIPConfigurationPropertiesFormat
1043				err = json.Unmarshal(*v, &applicationGatewayFrontendIPConfigurationPropertiesFormat)
1044				if err != nil {
1045					return err
1046				}
1047				agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat = &applicationGatewayFrontendIPConfigurationPropertiesFormat
1048			}
1049		case "name":
1050			if v != nil {
1051				var name string
1052				err = json.Unmarshal(*v, &name)
1053				if err != nil {
1054					return err
1055				}
1056				agfic.Name = &name
1057			}
1058		case "etag":
1059			if v != nil {
1060				var etag string
1061				err = json.Unmarshal(*v, &etag)
1062				if err != nil {
1063					return err
1064				}
1065				agfic.Etag = &etag
1066			}
1067		case "type":
1068			if v != nil {
1069				var typeVar string
1070				err = json.Unmarshal(*v, &typeVar)
1071				if err != nil {
1072					return err
1073				}
1074				agfic.Type = &typeVar
1075			}
1076		case "id":
1077			if v != nil {
1078				var ID string
1079				err = json.Unmarshal(*v, &ID)
1080				if err != nil {
1081					return err
1082				}
1083				agfic.ID = &ID
1084			}
1085		}
1086	}
1087
1088	return nil
1089}
1090
1091// ApplicationGatewayFrontendIPConfigurationPropertiesFormat properties of Frontend IP configuration of an
1092// application gateway.
1093type ApplicationGatewayFrontendIPConfigurationPropertiesFormat struct {
1094	// PrivateIPAddress - PrivateIPAddress of the network interface IP Configuration.
1095	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
1096	// PrivateIPAllocationMethod - PrivateIP allocation method. Possible values include: 'Static', 'Dynamic'
1097	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
1098	// Subnet - Reference of the subnet resource.
1099	Subnet *SubResource `json:"subnet,omitempty"`
1100	// PublicIPAddress - Reference of the PublicIP resource.
1101	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
1102	// ProvisioningState - Provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1103	ProvisioningState *string `json:"provisioningState,omitempty"`
1104}
1105
1106// ApplicationGatewayFrontendPort frontend port of an application gateway.
1107type ApplicationGatewayFrontendPort struct {
1108	*ApplicationGatewayFrontendPortPropertiesFormat `json:"properties,omitempty"`
1109	// Name - Name of the frontend port that is unique within an Application Gateway
1110	Name *string `json:"name,omitempty"`
1111	// Etag - A unique read-only string that changes whenever the resource is updated.
1112	Etag *string `json:"etag,omitempty"`
1113	// Type - Type of the resource.
1114	Type *string `json:"type,omitempty"`
1115	// ID - Resource ID.
1116	ID *string `json:"id,omitempty"`
1117}
1118
1119// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendPort.
1120func (agfp ApplicationGatewayFrontendPort) MarshalJSON() ([]byte, error) {
1121	objectMap := make(map[string]interface{})
1122	if agfp.ApplicationGatewayFrontendPortPropertiesFormat != nil {
1123		objectMap["properties"] = agfp.ApplicationGatewayFrontendPortPropertiesFormat
1124	}
1125	if agfp.Name != nil {
1126		objectMap["name"] = agfp.Name
1127	}
1128	if agfp.Etag != nil {
1129		objectMap["etag"] = agfp.Etag
1130	}
1131	if agfp.Type != nil {
1132		objectMap["type"] = agfp.Type
1133	}
1134	if agfp.ID != nil {
1135		objectMap["id"] = agfp.ID
1136	}
1137	return json.Marshal(objectMap)
1138}
1139
1140// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFrontendPort struct.
1141func (agfp *ApplicationGatewayFrontendPort) UnmarshalJSON(body []byte) error {
1142	var m map[string]*json.RawMessage
1143	err := json.Unmarshal(body, &m)
1144	if err != nil {
1145		return err
1146	}
1147	for k, v := range m {
1148		switch k {
1149		case "properties":
1150			if v != nil {
1151				var applicationGatewayFrontendPortPropertiesFormat ApplicationGatewayFrontendPortPropertiesFormat
1152				err = json.Unmarshal(*v, &applicationGatewayFrontendPortPropertiesFormat)
1153				if err != nil {
1154					return err
1155				}
1156				agfp.ApplicationGatewayFrontendPortPropertiesFormat = &applicationGatewayFrontendPortPropertiesFormat
1157			}
1158		case "name":
1159			if v != nil {
1160				var name string
1161				err = json.Unmarshal(*v, &name)
1162				if err != nil {
1163					return err
1164				}
1165				agfp.Name = &name
1166			}
1167		case "etag":
1168			if v != nil {
1169				var etag string
1170				err = json.Unmarshal(*v, &etag)
1171				if err != nil {
1172					return err
1173				}
1174				agfp.Etag = &etag
1175			}
1176		case "type":
1177			if v != nil {
1178				var typeVar string
1179				err = json.Unmarshal(*v, &typeVar)
1180				if err != nil {
1181					return err
1182				}
1183				agfp.Type = &typeVar
1184			}
1185		case "id":
1186			if v != nil {
1187				var ID string
1188				err = json.Unmarshal(*v, &ID)
1189				if err != nil {
1190					return err
1191				}
1192				agfp.ID = &ID
1193			}
1194		}
1195	}
1196
1197	return nil
1198}
1199
1200// ApplicationGatewayFrontendPortPropertiesFormat properties of Frontend port of an application gateway.
1201type ApplicationGatewayFrontendPortPropertiesFormat struct {
1202	// Port - Frontend port
1203	Port *int32 `json:"port,omitempty"`
1204	// ProvisioningState - Provisioning state of the frontend port resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1205	ProvisioningState *string `json:"provisioningState,omitempty"`
1206}
1207
1208// ApplicationGatewayHTTPListener http listener of an application gateway.
1209type ApplicationGatewayHTTPListener struct {
1210	*ApplicationGatewayHTTPListenerPropertiesFormat `json:"properties,omitempty"`
1211	// Name - Name of the HTTP listener that is unique within an Application Gateway.
1212	Name *string `json:"name,omitempty"`
1213	// Etag - A unique read-only string that changes whenever the resource is updated.
1214	Etag *string `json:"etag,omitempty"`
1215	// Type - Type of the resource.
1216	Type *string `json:"type,omitempty"`
1217	// ID - Resource ID.
1218	ID *string `json:"id,omitempty"`
1219}
1220
1221// MarshalJSON is the custom marshaler for ApplicationGatewayHTTPListener.
1222func (aghl ApplicationGatewayHTTPListener) MarshalJSON() ([]byte, error) {
1223	objectMap := make(map[string]interface{})
1224	if aghl.ApplicationGatewayHTTPListenerPropertiesFormat != nil {
1225		objectMap["properties"] = aghl.ApplicationGatewayHTTPListenerPropertiesFormat
1226	}
1227	if aghl.Name != nil {
1228		objectMap["name"] = aghl.Name
1229	}
1230	if aghl.Etag != nil {
1231		objectMap["etag"] = aghl.Etag
1232	}
1233	if aghl.Type != nil {
1234		objectMap["type"] = aghl.Type
1235	}
1236	if aghl.ID != nil {
1237		objectMap["id"] = aghl.ID
1238	}
1239	return json.Marshal(objectMap)
1240}
1241
1242// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayHTTPListener struct.
1243func (aghl *ApplicationGatewayHTTPListener) UnmarshalJSON(body []byte) error {
1244	var m map[string]*json.RawMessage
1245	err := json.Unmarshal(body, &m)
1246	if err != nil {
1247		return err
1248	}
1249	for k, v := range m {
1250		switch k {
1251		case "properties":
1252			if v != nil {
1253				var applicationGatewayHTTPListenerPropertiesFormat ApplicationGatewayHTTPListenerPropertiesFormat
1254				err = json.Unmarshal(*v, &applicationGatewayHTTPListenerPropertiesFormat)
1255				if err != nil {
1256					return err
1257				}
1258				aghl.ApplicationGatewayHTTPListenerPropertiesFormat = &applicationGatewayHTTPListenerPropertiesFormat
1259			}
1260		case "name":
1261			if v != nil {
1262				var name string
1263				err = json.Unmarshal(*v, &name)
1264				if err != nil {
1265					return err
1266				}
1267				aghl.Name = &name
1268			}
1269		case "etag":
1270			if v != nil {
1271				var etag string
1272				err = json.Unmarshal(*v, &etag)
1273				if err != nil {
1274					return err
1275				}
1276				aghl.Etag = &etag
1277			}
1278		case "type":
1279			if v != nil {
1280				var typeVar string
1281				err = json.Unmarshal(*v, &typeVar)
1282				if err != nil {
1283					return err
1284				}
1285				aghl.Type = &typeVar
1286			}
1287		case "id":
1288			if v != nil {
1289				var ID string
1290				err = json.Unmarshal(*v, &ID)
1291				if err != nil {
1292					return err
1293				}
1294				aghl.ID = &ID
1295			}
1296		}
1297	}
1298
1299	return nil
1300}
1301
1302// ApplicationGatewayHTTPListenerPropertiesFormat properties of HTTP listener of an application gateway.
1303type ApplicationGatewayHTTPListenerPropertiesFormat struct {
1304	// FrontendIPConfiguration - Frontend IP configuration resource of an application gateway.
1305	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
1306	// FrontendPort - Frontend port resource of an application gateway.
1307	FrontendPort *SubResource `json:"frontendPort,omitempty"`
1308	// Protocol - Protocol of the HTTP listener. Possible values are 'Http' and 'Https'. Possible values include: 'HTTP', 'HTTPS'
1309	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
1310	// HostName - Host name of HTTP listener.
1311	HostName *string `json:"hostName,omitempty"`
1312	// SslCertificate - SSL certificate resource of an application gateway.
1313	SslCertificate *SubResource `json:"sslCertificate,omitempty"`
1314	// RequireServerNameIndication - Applicable only if protocol is https. Enables SNI for multi-hosting.
1315	RequireServerNameIndication *bool `json:"requireServerNameIndication,omitempty"`
1316	// ProvisioningState - Provisioning state of the HTTP listener resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1317	ProvisioningState *string `json:"provisioningState,omitempty"`
1318}
1319
1320// ApplicationGatewayIPConfiguration IP configuration of an application gateway. Currently 1 public and 1
1321// private IP configuration is allowed.
1322type ApplicationGatewayIPConfiguration struct {
1323	*ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"`
1324	// Name - Name of the IP configuration that is unique within an Application Gateway.
1325	Name *string `json:"name,omitempty"`
1326	// Etag - A unique read-only string that changes whenever the resource is updated.
1327	Etag *string `json:"etag,omitempty"`
1328	// Type - Type of the resource.
1329	Type *string `json:"type,omitempty"`
1330	// ID - Resource ID.
1331	ID *string `json:"id,omitempty"`
1332}
1333
1334// MarshalJSON is the custom marshaler for ApplicationGatewayIPConfiguration.
1335func (agic ApplicationGatewayIPConfiguration) MarshalJSON() ([]byte, error) {
1336	objectMap := make(map[string]interface{})
1337	if agic.ApplicationGatewayIPConfigurationPropertiesFormat != nil {
1338		objectMap["properties"] = agic.ApplicationGatewayIPConfigurationPropertiesFormat
1339	}
1340	if agic.Name != nil {
1341		objectMap["name"] = agic.Name
1342	}
1343	if agic.Etag != nil {
1344		objectMap["etag"] = agic.Etag
1345	}
1346	if agic.Type != nil {
1347		objectMap["type"] = agic.Type
1348	}
1349	if agic.ID != nil {
1350		objectMap["id"] = agic.ID
1351	}
1352	return json.Marshal(objectMap)
1353}
1354
1355// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayIPConfiguration struct.
1356func (agic *ApplicationGatewayIPConfiguration) UnmarshalJSON(body []byte) error {
1357	var m map[string]*json.RawMessage
1358	err := json.Unmarshal(body, &m)
1359	if err != nil {
1360		return err
1361	}
1362	for k, v := range m {
1363		switch k {
1364		case "properties":
1365			if v != nil {
1366				var applicationGatewayIPConfigurationPropertiesFormat ApplicationGatewayIPConfigurationPropertiesFormat
1367				err = json.Unmarshal(*v, &applicationGatewayIPConfigurationPropertiesFormat)
1368				if err != nil {
1369					return err
1370				}
1371				agic.ApplicationGatewayIPConfigurationPropertiesFormat = &applicationGatewayIPConfigurationPropertiesFormat
1372			}
1373		case "name":
1374			if v != nil {
1375				var name string
1376				err = json.Unmarshal(*v, &name)
1377				if err != nil {
1378					return err
1379				}
1380				agic.Name = &name
1381			}
1382		case "etag":
1383			if v != nil {
1384				var etag string
1385				err = json.Unmarshal(*v, &etag)
1386				if err != nil {
1387					return err
1388				}
1389				agic.Etag = &etag
1390			}
1391		case "type":
1392			if v != nil {
1393				var typeVar string
1394				err = json.Unmarshal(*v, &typeVar)
1395				if err != nil {
1396					return err
1397				}
1398				agic.Type = &typeVar
1399			}
1400		case "id":
1401			if v != nil {
1402				var ID string
1403				err = json.Unmarshal(*v, &ID)
1404				if err != nil {
1405					return err
1406				}
1407				agic.ID = &ID
1408			}
1409		}
1410	}
1411
1412	return nil
1413}
1414
1415// ApplicationGatewayIPConfigurationPropertiesFormat properties of IP configuration of an application
1416// gateway.
1417type ApplicationGatewayIPConfigurationPropertiesFormat struct {
1418	// Subnet - Reference of the subnet resource. A subnet from where application gateway gets its private address.
1419	Subnet *SubResource `json:"subnet,omitempty"`
1420	// ProvisioningState - Provisioning state of the application gateway subnet resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1421	ProvisioningState *string `json:"provisioningState,omitempty"`
1422}
1423
1424// ApplicationGatewayListResult response for ListApplicationGateways API service call.
1425type ApplicationGatewayListResult struct {
1426	autorest.Response `json:"-"`
1427	// Value - List of an application gateways in a resource group.
1428	Value *[]ApplicationGateway `json:"value,omitempty"`
1429	// NextLink - URL to get the next set of results.
1430	NextLink *string `json:"nextLink,omitempty"`
1431}
1432
1433// ApplicationGatewayListResultIterator provides access to a complete listing of ApplicationGateway values.
1434type ApplicationGatewayListResultIterator struct {
1435	i    int
1436	page ApplicationGatewayListResultPage
1437}
1438
1439// NextWithContext advances to the next value.  If there was an error making
1440// the request the iterator does not advance and the error is returned.
1441func (iter *ApplicationGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
1442	if tracing.IsEnabled() {
1443		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayListResultIterator.NextWithContext")
1444		defer func() {
1445			sc := -1
1446			if iter.Response().Response.Response != nil {
1447				sc = iter.Response().Response.Response.StatusCode
1448			}
1449			tracing.EndSpan(ctx, sc, err)
1450		}()
1451	}
1452	iter.i++
1453	if iter.i < len(iter.page.Values()) {
1454		return nil
1455	}
1456	err = iter.page.NextWithContext(ctx)
1457	if err != nil {
1458		iter.i--
1459		return err
1460	}
1461	iter.i = 0
1462	return nil
1463}
1464
1465// Next advances to the next value.  If there was an error making
1466// the request the iterator does not advance and the error is returned.
1467// Deprecated: Use NextWithContext() instead.
1468func (iter *ApplicationGatewayListResultIterator) Next() error {
1469	return iter.NextWithContext(context.Background())
1470}
1471
1472// NotDone returns true if the enumeration should be started or is not yet complete.
1473func (iter ApplicationGatewayListResultIterator) NotDone() bool {
1474	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1475}
1476
1477// Response returns the raw server response from the last page request.
1478func (iter ApplicationGatewayListResultIterator) Response() ApplicationGatewayListResult {
1479	return iter.page.Response()
1480}
1481
1482// Value returns the current value or a zero-initialized value if the
1483// iterator has advanced beyond the end of the collection.
1484func (iter ApplicationGatewayListResultIterator) Value() ApplicationGateway {
1485	if !iter.page.NotDone() {
1486		return ApplicationGateway{}
1487	}
1488	return iter.page.Values()[iter.i]
1489}
1490
1491// Creates a new instance of the ApplicationGatewayListResultIterator type.
1492func NewApplicationGatewayListResultIterator(page ApplicationGatewayListResultPage) ApplicationGatewayListResultIterator {
1493	return ApplicationGatewayListResultIterator{page: page}
1494}
1495
1496// IsEmpty returns true if the ListResult contains no values.
1497func (aglr ApplicationGatewayListResult) IsEmpty() bool {
1498	return aglr.Value == nil || len(*aglr.Value) == 0
1499}
1500
1501// hasNextLink returns true if the NextLink is not empty.
1502func (aglr ApplicationGatewayListResult) hasNextLink() bool {
1503	return aglr.NextLink != nil && len(*aglr.NextLink) != 0
1504}
1505
1506// applicationGatewayListResultPreparer prepares a request to retrieve the next set of results.
1507// It returns nil if no more results exist.
1508func (aglr ApplicationGatewayListResult) applicationGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
1509	if !aglr.hasNextLink() {
1510		return nil, nil
1511	}
1512	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1513		autorest.AsJSON(),
1514		autorest.AsGet(),
1515		autorest.WithBaseURL(to.String(aglr.NextLink)))
1516}
1517
1518// ApplicationGatewayListResultPage contains a page of ApplicationGateway values.
1519type ApplicationGatewayListResultPage struct {
1520	fn   func(context.Context, ApplicationGatewayListResult) (ApplicationGatewayListResult, error)
1521	aglr ApplicationGatewayListResult
1522}
1523
1524// NextWithContext advances to the next page of values.  If there was an error making
1525// the request the page does not advance and the error is returned.
1526func (page *ApplicationGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
1527	if tracing.IsEnabled() {
1528		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayListResultPage.NextWithContext")
1529		defer func() {
1530			sc := -1
1531			if page.Response().Response.Response != nil {
1532				sc = page.Response().Response.Response.StatusCode
1533			}
1534			tracing.EndSpan(ctx, sc, err)
1535		}()
1536	}
1537	for {
1538		next, err := page.fn(ctx, page.aglr)
1539		if err != nil {
1540			return err
1541		}
1542		page.aglr = next
1543		if !next.hasNextLink() || !next.IsEmpty() {
1544			break
1545		}
1546	}
1547	return nil
1548}
1549
1550// Next advances to the next page of values.  If there was an error making
1551// the request the page does not advance and the error is returned.
1552// Deprecated: Use NextWithContext() instead.
1553func (page *ApplicationGatewayListResultPage) Next() error {
1554	return page.NextWithContext(context.Background())
1555}
1556
1557// NotDone returns true if the page enumeration should be started or is not yet complete.
1558func (page ApplicationGatewayListResultPage) NotDone() bool {
1559	return !page.aglr.IsEmpty()
1560}
1561
1562// Response returns the raw server response from the last page request.
1563func (page ApplicationGatewayListResultPage) Response() ApplicationGatewayListResult {
1564	return page.aglr
1565}
1566
1567// Values returns the slice of values for the current page or nil if there are no values.
1568func (page ApplicationGatewayListResultPage) Values() []ApplicationGateway {
1569	if page.aglr.IsEmpty() {
1570		return nil
1571	}
1572	return *page.aglr.Value
1573}
1574
1575// Creates a new instance of the ApplicationGatewayListResultPage type.
1576func NewApplicationGatewayListResultPage(cur ApplicationGatewayListResult, getNextPage func(context.Context, ApplicationGatewayListResult) (ApplicationGatewayListResult, error)) ApplicationGatewayListResultPage {
1577	return ApplicationGatewayListResultPage{
1578		fn:   getNextPage,
1579		aglr: cur,
1580	}
1581}
1582
1583// ApplicationGatewayPathRule path rule of URL path map of an application gateway.
1584type ApplicationGatewayPathRule struct {
1585	*ApplicationGatewayPathRulePropertiesFormat `json:"properties,omitempty"`
1586	// Name - Name of the path rule that is unique within an Application Gateway.
1587	Name *string `json:"name,omitempty"`
1588	// Etag - A unique read-only string that changes whenever the resource is updated.
1589	Etag *string `json:"etag,omitempty"`
1590	// Type - Type of the resource.
1591	Type *string `json:"type,omitempty"`
1592	// ID - Resource ID.
1593	ID *string `json:"id,omitempty"`
1594}
1595
1596// MarshalJSON is the custom marshaler for ApplicationGatewayPathRule.
1597func (agpr ApplicationGatewayPathRule) MarshalJSON() ([]byte, error) {
1598	objectMap := make(map[string]interface{})
1599	if agpr.ApplicationGatewayPathRulePropertiesFormat != nil {
1600		objectMap["properties"] = agpr.ApplicationGatewayPathRulePropertiesFormat
1601	}
1602	if agpr.Name != nil {
1603		objectMap["name"] = agpr.Name
1604	}
1605	if agpr.Etag != nil {
1606		objectMap["etag"] = agpr.Etag
1607	}
1608	if agpr.Type != nil {
1609		objectMap["type"] = agpr.Type
1610	}
1611	if agpr.ID != nil {
1612		objectMap["id"] = agpr.ID
1613	}
1614	return json.Marshal(objectMap)
1615}
1616
1617// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayPathRule struct.
1618func (agpr *ApplicationGatewayPathRule) UnmarshalJSON(body []byte) error {
1619	var m map[string]*json.RawMessage
1620	err := json.Unmarshal(body, &m)
1621	if err != nil {
1622		return err
1623	}
1624	for k, v := range m {
1625		switch k {
1626		case "properties":
1627			if v != nil {
1628				var applicationGatewayPathRulePropertiesFormat ApplicationGatewayPathRulePropertiesFormat
1629				err = json.Unmarshal(*v, &applicationGatewayPathRulePropertiesFormat)
1630				if err != nil {
1631					return err
1632				}
1633				agpr.ApplicationGatewayPathRulePropertiesFormat = &applicationGatewayPathRulePropertiesFormat
1634			}
1635		case "name":
1636			if v != nil {
1637				var name string
1638				err = json.Unmarshal(*v, &name)
1639				if err != nil {
1640					return err
1641				}
1642				agpr.Name = &name
1643			}
1644		case "etag":
1645			if v != nil {
1646				var etag string
1647				err = json.Unmarshal(*v, &etag)
1648				if err != nil {
1649					return err
1650				}
1651				agpr.Etag = &etag
1652			}
1653		case "type":
1654			if v != nil {
1655				var typeVar string
1656				err = json.Unmarshal(*v, &typeVar)
1657				if err != nil {
1658					return err
1659				}
1660				agpr.Type = &typeVar
1661			}
1662		case "id":
1663			if v != nil {
1664				var ID string
1665				err = json.Unmarshal(*v, &ID)
1666				if err != nil {
1667					return err
1668				}
1669				agpr.ID = &ID
1670			}
1671		}
1672	}
1673
1674	return nil
1675}
1676
1677// ApplicationGatewayPathRulePropertiesFormat properties of path rule of an application gateway.
1678type ApplicationGatewayPathRulePropertiesFormat struct {
1679	// Paths - Path rules of URL path map.
1680	Paths *[]string `json:"paths,omitempty"`
1681	// BackendAddressPool - Backend address pool resource of URL path map path rule.
1682	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
1683	// BackendHTTPSettings - Backend http settings resource of URL path map path rule.
1684	BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"`
1685	// RedirectConfiguration - Redirect configuration resource of URL path map path rule.
1686	RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"`
1687	// ProvisioningState - Path rule of URL path map resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1688	ProvisioningState *string `json:"provisioningState,omitempty"`
1689}
1690
1691// ApplicationGatewayProbe probe of the application gateway.
1692type ApplicationGatewayProbe struct {
1693	*ApplicationGatewayProbePropertiesFormat `json:"properties,omitempty"`
1694	// Name - Name of the probe that is unique within an Application Gateway.
1695	Name *string `json:"name,omitempty"`
1696	// Etag - A unique read-only string that changes whenever the resource is updated.
1697	Etag *string `json:"etag,omitempty"`
1698	// Type - Type of the resource.
1699	Type *string `json:"type,omitempty"`
1700	// ID - Resource ID.
1701	ID *string `json:"id,omitempty"`
1702}
1703
1704// MarshalJSON is the custom marshaler for ApplicationGatewayProbe.
1705func (agp ApplicationGatewayProbe) MarshalJSON() ([]byte, error) {
1706	objectMap := make(map[string]interface{})
1707	if agp.ApplicationGatewayProbePropertiesFormat != nil {
1708		objectMap["properties"] = agp.ApplicationGatewayProbePropertiesFormat
1709	}
1710	if agp.Name != nil {
1711		objectMap["name"] = agp.Name
1712	}
1713	if agp.Etag != nil {
1714		objectMap["etag"] = agp.Etag
1715	}
1716	if agp.Type != nil {
1717		objectMap["type"] = agp.Type
1718	}
1719	if agp.ID != nil {
1720		objectMap["id"] = agp.ID
1721	}
1722	return json.Marshal(objectMap)
1723}
1724
1725// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayProbe struct.
1726func (agp *ApplicationGatewayProbe) UnmarshalJSON(body []byte) error {
1727	var m map[string]*json.RawMessage
1728	err := json.Unmarshal(body, &m)
1729	if err != nil {
1730		return err
1731	}
1732	for k, v := range m {
1733		switch k {
1734		case "properties":
1735			if v != nil {
1736				var applicationGatewayProbePropertiesFormat ApplicationGatewayProbePropertiesFormat
1737				err = json.Unmarshal(*v, &applicationGatewayProbePropertiesFormat)
1738				if err != nil {
1739					return err
1740				}
1741				agp.ApplicationGatewayProbePropertiesFormat = &applicationGatewayProbePropertiesFormat
1742			}
1743		case "name":
1744			if v != nil {
1745				var name string
1746				err = json.Unmarshal(*v, &name)
1747				if err != nil {
1748					return err
1749				}
1750				agp.Name = &name
1751			}
1752		case "etag":
1753			if v != nil {
1754				var etag string
1755				err = json.Unmarshal(*v, &etag)
1756				if err != nil {
1757					return err
1758				}
1759				agp.Etag = &etag
1760			}
1761		case "type":
1762			if v != nil {
1763				var typeVar string
1764				err = json.Unmarshal(*v, &typeVar)
1765				if err != nil {
1766					return err
1767				}
1768				agp.Type = &typeVar
1769			}
1770		case "id":
1771			if v != nil {
1772				var ID string
1773				err = json.Unmarshal(*v, &ID)
1774				if err != nil {
1775					return err
1776				}
1777				agp.ID = &ID
1778			}
1779		}
1780	}
1781
1782	return nil
1783}
1784
1785// ApplicationGatewayProbeHealthResponseMatch application gateway probe health response match
1786type ApplicationGatewayProbeHealthResponseMatch struct {
1787	// Body - Body that must be contained in the health response. Default value is empty.
1788	Body *string `json:"body,omitempty"`
1789	// StatusCodes - Allowed ranges of healthy status codes. Default range of healthy status codes is 200-399.
1790	StatusCodes *[]string `json:"statusCodes,omitempty"`
1791}
1792
1793// ApplicationGatewayProbePropertiesFormat properties of probe of an application gateway.
1794type ApplicationGatewayProbePropertiesFormat struct {
1795	// Protocol - The protocol used for the probe. Possible values are 'Http' and 'Https'. Possible values include: 'HTTP', 'HTTPS'
1796	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
1797	// Host - Host name to send the probe to.
1798	Host *string `json:"host,omitempty"`
1799	// Path - Relative path of probe. Valid path starts from '/'. Probe is sent to <Protocol>://<host>:<port><path>
1800	Path *string `json:"path,omitempty"`
1801	// Interval - The probing interval in seconds. This is the time interval between two consecutive probes. Acceptable values are from 1 second to 86400 seconds.
1802	Interval *int32 `json:"interval,omitempty"`
1803	// 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.
1804	Timeout *int32 `json:"timeout,omitempty"`
1805	// 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.
1806	UnhealthyThreshold *int32 `json:"unhealthyThreshold,omitempty"`
1807	// PickHostNameFromBackendHTTPSettings - Whether the host header should be picked from the backend http settings. Default value is false.
1808	PickHostNameFromBackendHTTPSettings *bool `json:"pickHostNameFromBackendHttpSettings,omitempty"`
1809	// MinServers - Minimum number of servers that are always marked healthy. Default value is 0.
1810	MinServers *int32 `json:"minServers,omitempty"`
1811	// Match - Criterion for classifying a healthy probe response.
1812	Match *ApplicationGatewayProbeHealthResponseMatch `json:"match,omitempty"`
1813	// ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1814	ProvisioningState *string `json:"provisioningState,omitempty"`
1815}
1816
1817// ApplicationGatewayPropertiesFormat properties of the application gateway.
1818type ApplicationGatewayPropertiesFormat struct {
1819	// Sku - SKU of the application gateway resource.
1820	Sku *ApplicationGatewaySku `json:"sku,omitempty"`
1821	// SslPolicy - SSL policy of the application gateway resource.
1822	SslPolicy *ApplicationGatewaySslPolicy `json:"sslPolicy,omitempty"`
1823	// OperationalState - READ-ONLY; Operational state of the application gateway resource. Possible values include: 'Stopped', 'Starting', 'Running', 'Stopping'
1824	OperationalState ApplicationGatewayOperationalState `json:"operationalState,omitempty"`
1825	// GatewayIPConfigurations - Subnets of application the gateway resource.
1826	GatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"gatewayIPConfigurations,omitempty"`
1827	// AuthenticationCertificates - Authentication certificates of the application gateway resource.
1828	AuthenticationCertificates *[]ApplicationGatewayAuthenticationCertificate `json:"authenticationCertificates,omitempty"`
1829	// SslCertificates - SSL certificates of the application gateway resource.
1830	SslCertificates *[]ApplicationGatewaySslCertificate `json:"sslCertificates,omitempty"`
1831	// FrontendIPConfigurations - Frontend IP addresses of the application gateway resource.
1832	FrontendIPConfigurations *[]ApplicationGatewayFrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"`
1833	// FrontendPorts - Frontend ports of the application gateway resource.
1834	FrontendPorts *[]ApplicationGatewayFrontendPort `json:"frontendPorts,omitempty"`
1835	// Probes - Probes of the application gateway resource.
1836	Probes *[]ApplicationGatewayProbe `json:"probes,omitempty"`
1837	// BackendAddressPools - Backend address pool of the application gateway resource.
1838	BackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"backendAddressPools,omitempty"`
1839	// BackendHTTPSettingsCollection - Backend http settings of the application gateway resource.
1840	BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettingsCollection,omitempty"`
1841	// HTTPListeners - Http listeners of the application gateway resource.
1842	HTTPListeners *[]ApplicationGatewayHTTPListener `json:"httpListeners,omitempty"`
1843	// URLPathMaps - URL path map of the application gateway resource.
1844	URLPathMaps *[]ApplicationGatewayURLPathMap `json:"urlPathMaps,omitempty"`
1845	// RequestRoutingRules - Request routing rules of the application gateway resource.
1846	RequestRoutingRules *[]ApplicationGatewayRequestRoutingRule `json:"requestRoutingRules,omitempty"`
1847	// RedirectConfigurations - Redirect configurations of the application gateway resource.
1848	RedirectConfigurations *[]ApplicationGatewayRedirectConfiguration `json:"redirectConfigurations,omitempty"`
1849	// WebApplicationFirewallConfiguration - Web application firewall configuration.
1850	WebApplicationFirewallConfiguration *ApplicationGatewayWebApplicationFirewallConfiguration `json:"webApplicationFirewallConfiguration,omitempty"`
1851	// EnableHTTP2 - Whether HTTP2 is enabled on the application gateway resource.
1852	EnableHTTP2 *bool `json:"enableHttp2,omitempty"`
1853	// EnableFips - Whether FIPS is enabled on the application gateway resource.
1854	EnableFips *bool `json:"enableFips,omitempty"`
1855	// AutoscaleConfiguration - Autoscale Configuration.
1856	AutoscaleConfiguration *ApplicationGatewayAutoscaleConfiguration `json:"autoscaleConfiguration,omitempty"`
1857	// ResourceGUID - Resource GUID property of the application gateway resource.
1858	ResourceGUID *string `json:"resourceGuid,omitempty"`
1859	// ProvisioningState - Provisioning state of the application gateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1860	ProvisioningState *string `json:"provisioningState,omitempty"`
1861}
1862
1863// MarshalJSON is the custom marshaler for ApplicationGatewayPropertiesFormat.
1864func (agpf ApplicationGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
1865	objectMap := make(map[string]interface{})
1866	if agpf.Sku != nil {
1867		objectMap["sku"] = agpf.Sku
1868	}
1869	if agpf.SslPolicy != nil {
1870		objectMap["sslPolicy"] = agpf.SslPolicy
1871	}
1872	if agpf.GatewayIPConfigurations != nil {
1873		objectMap["gatewayIPConfigurations"] = agpf.GatewayIPConfigurations
1874	}
1875	if agpf.AuthenticationCertificates != nil {
1876		objectMap["authenticationCertificates"] = agpf.AuthenticationCertificates
1877	}
1878	if agpf.SslCertificates != nil {
1879		objectMap["sslCertificates"] = agpf.SslCertificates
1880	}
1881	if agpf.FrontendIPConfigurations != nil {
1882		objectMap["frontendIPConfigurations"] = agpf.FrontendIPConfigurations
1883	}
1884	if agpf.FrontendPorts != nil {
1885		objectMap["frontendPorts"] = agpf.FrontendPorts
1886	}
1887	if agpf.Probes != nil {
1888		objectMap["probes"] = agpf.Probes
1889	}
1890	if agpf.BackendAddressPools != nil {
1891		objectMap["backendAddressPools"] = agpf.BackendAddressPools
1892	}
1893	if agpf.BackendHTTPSettingsCollection != nil {
1894		objectMap["backendHttpSettingsCollection"] = agpf.BackendHTTPSettingsCollection
1895	}
1896	if agpf.HTTPListeners != nil {
1897		objectMap["httpListeners"] = agpf.HTTPListeners
1898	}
1899	if agpf.URLPathMaps != nil {
1900		objectMap["urlPathMaps"] = agpf.URLPathMaps
1901	}
1902	if agpf.RequestRoutingRules != nil {
1903		objectMap["requestRoutingRules"] = agpf.RequestRoutingRules
1904	}
1905	if agpf.RedirectConfigurations != nil {
1906		objectMap["redirectConfigurations"] = agpf.RedirectConfigurations
1907	}
1908	if agpf.WebApplicationFirewallConfiguration != nil {
1909		objectMap["webApplicationFirewallConfiguration"] = agpf.WebApplicationFirewallConfiguration
1910	}
1911	if agpf.EnableHTTP2 != nil {
1912		objectMap["enableHttp2"] = agpf.EnableHTTP2
1913	}
1914	if agpf.EnableFips != nil {
1915		objectMap["enableFips"] = agpf.EnableFips
1916	}
1917	if agpf.AutoscaleConfiguration != nil {
1918		objectMap["autoscaleConfiguration"] = agpf.AutoscaleConfiguration
1919	}
1920	if agpf.ResourceGUID != nil {
1921		objectMap["resourceGuid"] = agpf.ResourceGUID
1922	}
1923	if agpf.ProvisioningState != nil {
1924		objectMap["provisioningState"] = agpf.ProvisioningState
1925	}
1926	return json.Marshal(objectMap)
1927}
1928
1929// ApplicationGatewayRedirectConfiguration redirect configuration of an application gateway.
1930type ApplicationGatewayRedirectConfiguration struct {
1931	*ApplicationGatewayRedirectConfigurationPropertiesFormat `json:"properties,omitempty"`
1932	// Name - Name of the redirect configuration that is unique within an Application Gateway.
1933	Name *string `json:"name,omitempty"`
1934	// Etag - A unique read-only string that changes whenever the resource is updated.
1935	Etag *string `json:"etag,omitempty"`
1936	// Type - Type of the resource.
1937	Type *string `json:"type,omitempty"`
1938	// ID - Resource ID.
1939	ID *string `json:"id,omitempty"`
1940}
1941
1942// MarshalJSON is the custom marshaler for ApplicationGatewayRedirectConfiguration.
1943func (agrc ApplicationGatewayRedirectConfiguration) MarshalJSON() ([]byte, error) {
1944	objectMap := make(map[string]interface{})
1945	if agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat != nil {
1946		objectMap["properties"] = agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat
1947	}
1948	if agrc.Name != nil {
1949		objectMap["name"] = agrc.Name
1950	}
1951	if agrc.Etag != nil {
1952		objectMap["etag"] = agrc.Etag
1953	}
1954	if agrc.Type != nil {
1955		objectMap["type"] = agrc.Type
1956	}
1957	if agrc.ID != nil {
1958		objectMap["id"] = agrc.ID
1959	}
1960	return json.Marshal(objectMap)
1961}
1962
1963// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRedirectConfiguration struct.
1964func (agrc *ApplicationGatewayRedirectConfiguration) UnmarshalJSON(body []byte) error {
1965	var m map[string]*json.RawMessage
1966	err := json.Unmarshal(body, &m)
1967	if err != nil {
1968		return err
1969	}
1970	for k, v := range m {
1971		switch k {
1972		case "properties":
1973			if v != nil {
1974				var applicationGatewayRedirectConfigurationPropertiesFormat ApplicationGatewayRedirectConfigurationPropertiesFormat
1975				err = json.Unmarshal(*v, &applicationGatewayRedirectConfigurationPropertiesFormat)
1976				if err != nil {
1977					return err
1978				}
1979				agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat = &applicationGatewayRedirectConfigurationPropertiesFormat
1980			}
1981		case "name":
1982			if v != nil {
1983				var name string
1984				err = json.Unmarshal(*v, &name)
1985				if err != nil {
1986					return err
1987				}
1988				agrc.Name = &name
1989			}
1990		case "etag":
1991			if v != nil {
1992				var etag string
1993				err = json.Unmarshal(*v, &etag)
1994				if err != nil {
1995					return err
1996				}
1997				agrc.Etag = &etag
1998			}
1999		case "type":
2000			if v != nil {
2001				var typeVar string
2002				err = json.Unmarshal(*v, &typeVar)
2003				if err != nil {
2004					return err
2005				}
2006				agrc.Type = &typeVar
2007			}
2008		case "id":
2009			if v != nil {
2010				var ID string
2011				err = json.Unmarshal(*v, &ID)
2012				if err != nil {
2013					return err
2014				}
2015				agrc.ID = &ID
2016			}
2017		}
2018	}
2019
2020	return nil
2021}
2022
2023// ApplicationGatewayRedirectConfigurationPropertiesFormat properties of redirect configuration of the
2024// application gateway.
2025type ApplicationGatewayRedirectConfigurationPropertiesFormat struct {
2026	// RedirectType - Supported http redirection types - Permanent, Temporary, Found, SeeOther. Possible values include: 'Permanent', 'Found', 'SeeOther', 'Temporary'
2027	RedirectType ApplicationGatewayRedirectType `json:"redirectType,omitempty"`
2028	// TargetListener - Reference to a listener to redirect the request to.
2029	TargetListener *SubResource `json:"targetListener,omitempty"`
2030	// TargetURL - Url to redirect the request to.
2031	TargetURL *string `json:"targetUrl,omitempty"`
2032	// IncludePath - Include path in the redirected url.
2033	IncludePath *bool `json:"includePath,omitempty"`
2034	// IncludeQueryString - Include query string in the redirected url.
2035	IncludeQueryString *bool `json:"includeQueryString,omitempty"`
2036	// RequestRoutingRules - Request routing specifying redirect configuration.
2037	RequestRoutingRules *[]SubResource `json:"requestRoutingRules,omitempty"`
2038	// URLPathMaps - Url path maps specifying default redirect configuration.
2039	URLPathMaps *[]SubResource `json:"urlPathMaps,omitempty"`
2040	// PathRules - Path rules specifying redirect configuration.
2041	PathRules *[]SubResource `json:"pathRules,omitempty"`
2042}
2043
2044// ApplicationGatewayRequestRoutingRule request routing rule of an application gateway.
2045type ApplicationGatewayRequestRoutingRule struct {
2046	*ApplicationGatewayRequestRoutingRulePropertiesFormat `json:"properties,omitempty"`
2047	// Name - Name of the request routing rule that is unique within an Application Gateway.
2048	Name *string `json:"name,omitempty"`
2049	// Etag - A unique read-only string that changes whenever the resource is updated.
2050	Etag *string `json:"etag,omitempty"`
2051	// Type - Type of the resource.
2052	Type *string `json:"type,omitempty"`
2053	// ID - Resource ID.
2054	ID *string `json:"id,omitempty"`
2055}
2056
2057// MarshalJSON is the custom marshaler for ApplicationGatewayRequestRoutingRule.
2058func (agrrr ApplicationGatewayRequestRoutingRule) MarshalJSON() ([]byte, error) {
2059	objectMap := make(map[string]interface{})
2060	if agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat != nil {
2061		objectMap["properties"] = agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat
2062	}
2063	if agrrr.Name != nil {
2064		objectMap["name"] = agrrr.Name
2065	}
2066	if agrrr.Etag != nil {
2067		objectMap["etag"] = agrrr.Etag
2068	}
2069	if agrrr.Type != nil {
2070		objectMap["type"] = agrrr.Type
2071	}
2072	if agrrr.ID != nil {
2073		objectMap["id"] = agrrr.ID
2074	}
2075	return json.Marshal(objectMap)
2076}
2077
2078// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRequestRoutingRule struct.
2079func (agrrr *ApplicationGatewayRequestRoutingRule) UnmarshalJSON(body []byte) error {
2080	var m map[string]*json.RawMessage
2081	err := json.Unmarshal(body, &m)
2082	if err != nil {
2083		return err
2084	}
2085	for k, v := range m {
2086		switch k {
2087		case "properties":
2088			if v != nil {
2089				var applicationGatewayRequestRoutingRulePropertiesFormat ApplicationGatewayRequestRoutingRulePropertiesFormat
2090				err = json.Unmarshal(*v, &applicationGatewayRequestRoutingRulePropertiesFormat)
2091				if err != nil {
2092					return err
2093				}
2094				agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat = &applicationGatewayRequestRoutingRulePropertiesFormat
2095			}
2096		case "name":
2097			if v != nil {
2098				var name string
2099				err = json.Unmarshal(*v, &name)
2100				if err != nil {
2101					return err
2102				}
2103				agrrr.Name = &name
2104			}
2105		case "etag":
2106			if v != nil {
2107				var etag string
2108				err = json.Unmarshal(*v, &etag)
2109				if err != nil {
2110					return err
2111				}
2112				agrrr.Etag = &etag
2113			}
2114		case "type":
2115			if v != nil {
2116				var typeVar string
2117				err = json.Unmarshal(*v, &typeVar)
2118				if err != nil {
2119					return err
2120				}
2121				agrrr.Type = &typeVar
2122			}
2123		case "id":
2124			if v != nil {
2125				var ID string
2126				err = json.Unmarshal(*v, &ID)
2127				if err != nil {
2128					return err
2129				}
2130				agrrr.ID = &ID
2131			}
2132		}
2133	}
2134
2135	return nil
2136}
2137
2138// ApplicationGatewayRequestRoutingRulePropertiesFormat properties of request routing rule of the
2139// application gateway.
2140type ApplicationGatewayRequestRoutingRulePropertiesFormat struct {
2141	// RuleType - Rule type. Possible values include: 'Basic', 'PathBasedRouting'
2142	RuleType ApplicationGatewayRequestRoutingRuleType `json:"ruleType,omitempty"`
2143	// BackendAddressPool - Backend address pool resource of the application gateway.
2144	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
2145	// BackendHTTPSettings - Backend http settings resource of the application gateway.
2146	BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"`
2147	// HTTPListener - Http listener resource of the application gateway.
2148	HTTPListener *SubResource `json:"httpListener,omitempty"`
2149	// URLPathMap - URL path map resource of the application gateway.
2150	URLPathMap *SubResource `json:"urlPathMap,omitempty"`
2151	// RedirectConfiguration - Redirect configuration resource of the application gateway.
2152	RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"`
2153	// ProvisioningState - Provisioning state of the request routing rule resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2154	ProvisioningState *string `json:"provisioningState,omitempty"`
2155}
2156
2157// ApplicationGatewaysBackendHealthFuture an abstraction for monitoring and retrieving the results of a
2158// long-running operation.
2159type ApplicationGatewaysBackendHealthFuture struct {
2160	azure.FutureAPI
2161	// Result returns the result of the asynchronous operation.
2162	// If the operation has not completed it will return an error.
2163	Result func(ApplicationGatewaysClient) (ApplicationGatewayBackendHealth, error)
2164}
2165
2166// ApplicationGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
2167// long-running operation.
2168type ApplicationGatewaysCreateOrUpdateFuture struct {
2169	azure.FutureAPI
2170	// Result returns the result of the asynchronous operation.
2171	// If the operation has not completed it will return an error.
2172	Result func(ApplicationGatewaysClient) (ApplicationGateway, error)
2173}
2174
2175// ApplicationGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
2176// long-running operation.
2177type ApplicationGatewaysDeleteFuture struct {
2178	azure.FutureAPI
2179	// Result returns the result of the asynchronous operation.
2180	// If the operation has not completed it will return an error.
2181	Result func(ApplicationGatewaysClient) (autorest.Response, error)
2182}
2183
2184// ApplicationGatewaySku SKU of an application gateway
2185type ApplicationGatewaySku struct {
2186	// Name - Name of an application gateway SKU. Possible values include: 'StandardSmall', 'StandardMedium', 'StandardLarge', 'WAFMedium', 'WAFLarge', 'StandardV2', 'WAFV2'
2187	Name ApplicationGatewaySkuName `json:"name,omitempty"`
2188	// Tier - Tier of an application gateway. Possible values include: 'ApplicationGatewayTierStandard', 'ApplicationGatewayTierWAF', 'ApplicationGatewayTierStandardV2', 'ApplicationGatewayTierWAFV2'
2189	Tier ApplicationGatewayTier `json:"tier,omitempty"`
2190	// Capacity - Capacity (instance count) of an application gateway.
2191	Capacity *int32 `json:"capacity,omitempty"`
2192}
2193
2194// ApplicationGatewaySslCertificate SSL certificates of an application gateway.
2195type ApplicationGatewaySslCertificate struct {
2196	*ApplicationGatewaySslCertificatePropertiesFormat `json:"properties,omitempty"`
2197	// Name - Name of the SSL certificate that is unique within an Application Gateway.
2198	Name *string `json:"name,omitempty"`
2199	// Etag - A unique read-only string that changes whenever the resource is updated.
2200	Etag *string `json:"etag,omitempty"`
2201	// Type - Type of the resource.
2202	Type *string `json:"type,omitempty"`
2203	// ID - Resource ID.
2204	ID *string `json:"id,omitempty"`
2205}
2206
2207// MarshalJSON is the custom marshaler for ApplicationGatewaySslCertificate.
2208func (agsc ApplicationGatewaySslCertificate) MarshalJSON() ([]byte, error) {
2209	objectMap := make(map[string]interface{})
2210	if agsc.ApplicationGatewaySslCertificatePropertiesFormat != nil {
2211		objectMap["properties"] = agsc.ApplicationGatewaySslCertificatePropertiesFormat
2212	}
2213	if agsc.Name != nil {
2214		objectMap["name"] = agsc.Name
2215	}
2216	if agsc.Etag != nil {
2217		objectMap["etag"] = agsc.Etag
2218	}
2219	if agsc.Type != nil {
2220		objectMap["type"] = agsc.Type
2221	}
2222	if agsc.ID != nil {
2223		objectMap["id"] = agsc.ID
2224	}
2225	return json.Marshal(objectMap)
2226}
2227
2228// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslCertificate struct.
2229func (agsc *ApplicationGatewaySslCertificate) UnmarshalJSON(body []byte) error {
2230	var m map[string]*json.RawMessage
2231	err := json.Unmarshal(body, &m)
2232	if err != nil {
2233		return err
2234	}
2235	for k, v := range m {
2236		switch k {
2237		case "properties":
2238			if v != nil {
2239				var applicationGatewaySslCertificatePropertiesFormat ApplicationGatewaySslCertificatePropertiesFormat
2240				err = json.Unmarshal(*v, &applicationGatewaySslCertificatePropertiesFormat)
2241				if err != nil {
2242					return err
2243				}
2244				agsc.ApplicationGatewaySslCertificatePropertiesFormat = &applicationGatewaySslCertificatePropertiesFormat
2245			}
2246		case "name":
2247			if v != nil {
2248				var name string
2249				err = json.Unmarshal(*v, &name)
2250				if err != nil {
2251					return err
2252				}
2253				agsc.Name = &name
2254			}
2255		case "etag":
2256			if v != nil {
2257				var etag string
2258				err = json.Unmarshal(*v, &etag)
2259				if err != nil {
2260					return err
2261				}
2262				agsc.Etag = &etag
2263			}
2264		case "type":
2265			if v != nil {
2266				var typeVar string
2267				err = json.Unmarshal(*v, &typeVar)
2268				if err != nil {
2269					return err
2270				}
2271				agsc.Type = &typeVar
2272			}
2273		case "id":
2274			if v != nil {
2275				var ID string
2276				err = json.Unmarshal(*v, &ID)
2277				if err != nil {
2278					return err
2279				}
2280				agsc.ID = &ID
2281			}
2282		}
2283	}
2284
2285	return nil
2286}
2287
2288// ApplicationGatewaySslCertificatePropertiesFormat properties of SSL certificates of an application
2289// gateway.
2290type ApplicationGatewaySslCertificatePropertiesFormat struct {
2291	// Data - Base-64 encoded pfx certificate. Only applicable in PUT Request.
2292	Data *string `json:"data,omitempty"`
2293	// Password - Password for the pfx file specified in data. Only applicable in PUT request.
2294	Password *string `json:"password,omitempty"`
2295	// PublicCertData - Base-64 encoded Public cert data corresponding to pfx specified in data. Only applicable in GET request.
2296	PublicCertData *string `json:"publicCertData,omitempty"`
2297	// ProvisioningState - Provisioning state of the SSL certificate resource Possible values are: 'Updating', 'Deleting', and 'Failed'.
2298	ProvisioningState *string `json:"provisioningState,omitempty"`
2299}
2300
2301// ApplicationGatewaySslPolicy application Gateway Ssl policy.
2302type ApplicationGatewaySslPolicy struct {
2303	// DisabledSslProtocols - Ssl protocols to be disabled on application gateway.
2304	DisabledSslProtocols *[]ApplicationGatewaySslProtocol `json:"disabledSslProtocols,omitempty"`
2305	// PolicyType - Type of Ssl Policy. Possible values include: 'Predefined', 'Custom'
2306	PolicyType ApplicationGatewaySslPolicyType `json:"policyType,omitempty"`
2307	// PolicyName - Name of Ssl predefined policy. Possible values include: 'AppGwSslPolicy20150501', 'AppGwSslPolicy20170401', 'AppGwSslPolicy20170401S'
2308	PolicyName ApplicationGatewaySslPolicyName `json:"policyName,omitempty"`
2309	// CipherSuites - Ssl cipher suites to be enabled in the specified order to application gateway.
2310	CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"`
2311	// MinProtocolVersion - Minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'TLSv10', 'TLSv11', 'TLSv12'
2312	MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"`
2313}
2314
2315// ApplicationGatewaySslPredefinedPolicy an Ssl predefined policy
2316type ApplicationGatewaySslPredefinedPolicy struct {
2317	autorest.Response `json:"-"`
2318	// Name - Name of the Ssl predefined policy.
2319	Name                                                   *string `json:"name,omitempty"`
2320	*ApplicationGatewaySslPredefinedPolicyPropertiesFormat `json:"properties,omitempty"`
2321	// ID - Resource ID.
2322	ID *string `json:"id,omitempty"`
2323}
2324
2325// MarshalJSON is the custom marshaler for ApplicationGatewaySslPredefinedPolicy.
2326func (agspp ApplicationGatewaySslPredefinedPolicy) MarshalJSON() ([]byte, error) {
2327	objectMap := make(map[string]interface{})
2328	if agspp.Name != nil {
2329		objectMap["name"] = agspp.Name
2330	}
2331	if agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat != nil {
2332		objectMap["properties"] = agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat
2333	}
2334	if agspp.ID != nil {
2335		objectMap["id"] = agspp.ID
2336	}
2337	return json.Marshal(objectMap)
2338}
2339
2340// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslPredefinedPolicy struct.
2341func (agspp *ApplicationGatewaySslPredefinedPolicy) UnmarshalJSON(body []byte) error {
2342	var m map[string]*json.RawMessage
2343	err := json.Unmarshal(body, &m)
2344	if err != nil {
2345		return err
2346	}
2347	for k, v := range m {
2348		switch k {
2349		case "name":
2350			if v != nil {
2351				var name string
2352				err = json.Unmarshal(*v, &name)
2353				if err != nil {
2354					return err
2355				}
2356				agspp.Name = &name
2357			}
2358		case "properties":
2359			if v != nil {
2360				var applicationGatewaySslPredefinedPolicyPropertiesFormat ApplicationGatewaySslPredefinedPolicyPropertiesFormat
2361				err = json.Unmarshal(*v, &applicationGatewaySslPredefinedPolicyPropertiesFormat)
2362				if err != nil {
2363					return err
2364				}
2365				agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat = &applicationGatewaySslPredefinedPolicyPropertiesFormat
2366			}
2367		case "id":
2368			if v != nil {
2369				var ID string
2370				err = json.Unmarshal(*v, &ID)
2371				if err != nil {
2372					return err
2373				}
2374				agspp.ID = &ID
2375			}
2376		}
2377	}
2378
2379	return nil
2380}
2381
2382// ApplicationGatewaySslPredefinedPolicyPropertiesFormat properties of
2383// ApplicationGatewaySslPredefinedPolicy
2384type ApplicationGatewaySslPredefinedPolicyPropertiesFormat struct {
2385	// CipherSuites - Ssl cipher suites to be enabled in the specified order for application gateway.
2386	CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"`
2387	// MinProtocolVersion - Minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'TLSv10', 'TLSv11', 'TLSv12'
2388	MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"`
2389}
2390
2391// ApplicationGatewaysStartFuture an abstraction for monitoring and retrieving the results of a
2392// long-running operation.
2393type ApplicationGatewaysStartFuture struct {
2394	azure.FutureAPI
2395	// Result returns the result of the asynchronous operation.
2396	// If the operation has not completed it will return an error.
2397	Result func(ApplicationGatewaysClient) (autorest.Response, error)
2398}
2399
2400// ApplicationGatewaysStopFuture an abstraction for monitoring and retrieving the results of a long-running
2401// operation.
2402type ApplicationGatewaysStopFuture struct {
2403	azure.FutureAPI
2404	// Result returns the result of the asynchronous operation.
2405	// If the operation has not completed it will return an error.
2406	Result func(ApplicationGatewaysClient) (autorest.Response, error)
2407}
2408
2409// ApplicationGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
2410// long-running operation.
2411type ApplicationGatewaysUpdateTagsFuture struct {
2412	azure.FutureAPI
2413	// Result returns the result of the asynchronous operation.
2414	// If the operation has not completed it will return an error.
2415	Result func(ApplicationGatewaysClient) (ApplicationGateway, error)
2416}
2417
2418// ApplicationGatewayURLPathMap urlPathMaps give a url path to the backend mapping information for
2419// PathBasedRouting.
2420type ApplicationGatewayURLPathMap struct {
2421	*ApplicationGatewayURLPathMapPropertiesFormat `json:"properties,omitempty"`
2422	// Name - Name of the URL path map that is unique within an Application Gateway.
2423	Name *string `json:"name,omitempty"`
2424	// Etag - A unique read-only string that changes whenever the resource is updated.
2425	Etag *string `json:"etag,omitempty"`
2426	// Type - Type of the resource.
2427	Type *string `json:"type,omitempty"`
2428	// ID - Resource ID.
2429	ID *string `json:"id,omitempty"`
2430}
2431
2432// MarshalJSON is the custom marshaler for ApplicationGatewayURLPathMap.
2433func (agupm ApplicationGatewayURLPathMap) MarshalJSON() ([]byte, error) {
2434	objectMap := make(map[string]interface{})
2435	if agupm.ApplicationGatewayURLPathMapPropertiesFormat != nil {
2436		objectMap["properties"] = agupm.ApplicationGatewayURLPathMapPropertiesFormat
2437	}
2438	if agupm.Name != nil {
2439		objectMap["name"] = agupm.Name
2440	}
2441	if agupm.Etag != nil {
2442		objectMap["etag"] = agupm.Etag
2443	}
2444	if agupm.Type != nil {
2445		objectMap["type"] = agupm.Type
2446	}
2447	if agupm.ID != nil {
2448		objectMap["id"] = agupm.ID
2449	}
2450	return json.Marshal(objectMap)
2451}
2452
2453// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayURLPathMap struct.
2454func (agupm *ApplicationGatewayURLPathMap) UnmarshalJSON(body []byte) error {
2455	var m map[string]*json.RawMessage
2456	err := json.Unmarshal(body, &m)
2457	if err != nil {
2458		return err
2459	}
2460	for k, v := range m {
2461		switch k {
2462		case "properties":
2463			if v != nil {
2464				var applicationGatewayURLPathMapPropertiesFormat ApplicationGatewayURLPathMapPropertiesFormat
2465				err = json.Unmarshal(*v, &applicationGatewayURLPathMapPropertiesFormat)
2466				if err != nil {
2467					return err
2468				}
2469				agupm.ApplicationGatewayURLPathMapPropertiesFormat = &applicationGatewayURLPathMapPropertiesFormat
2470			}
2471		case "name":
2472			if v != nil {
2473				var name string
2474				err = json.Unmarshal(*v, &name)
2475				if err != nil {
2476					return err
2477				}
2478				agupm.Name = &name
2479			}
2480		case "etag":
2481			if v != nil {
2482				var etag string
2483				err = json.Unmarshal(*v, &etag)
2484				if err != nil {
2485					return err
2486				}
2487				agupm.Etag = &etag
2488			}
2489		case "type":
2490			if v != nil {
2491				var typeVar string
2492				err = json.Unmarshal(*v, &typeVar)
2493				if err != nil {
2494					return err
2495				}
2496				agupm.Type = &typeVar
2497			}
2498		case "id":
2499			if v != nil {
2500				var ID string
2501				err = json.Unmarshal(*v, &ID)
2502				if err != nil {
2503					return err
2504				}
2505				agupm.ID = &ID
2506			}
2507		}
2508	}
2509
2510	return nil
2511}
2512
2513// ApplicationGatewayURLPathMapPropertiesFormat properties of UrlPathMap of the application gateway.
2514type ApplicationGatewayURLPathMapPropertiesFormat struct {
2515	// DefaultBackendAddressPool - Default backend address pool resource of URL path map.
2516	DefaultBackendAddressPool *SubResource `json:"defaultBackendAddressPool,omitempty"`
2517	// DefaultBackendHTTPSettings - Default backend http settings resource of URL path map.
2518	DefaultBackendHTTPSettings *SubResource `json:"defaultBackendHttpSettings,omitempty"`
2519	// DefaultRedirectConfiguration - Default redirect configuration resource of URL path map.
2520	DefaultRedirectConfiguration *SubResource `json:"defaultRedirectConfiguration,omitempty"`
2521	// PathRules - Path rule of URL path map resource.
2522	PathRules *[]ApplicationGatewayPathRule `json:"pathRules,omitempty"`
2523	// ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2524	ProvisioningState *string `json:"provisioningState,omitempty"`
2525}
2526
2527// ApplicationGatewayWebApplicationFirewallConfiguration application gateway web application firewall
2528// configuration.
2529type ApplicationGatewayWebApplicationFirewallConfiguration struct {
2530	// Enabled - Whether the web application firewall is enabled or not.
2531	Enabled *bool `json:"enabled,omitempty"`
2532	// FirewallMode - Web application firewall mode. Possible values include: 'Detection', 'Prevention'
2533	FirewallMode ApplicationGatewayFirewallMode `json:"firewallMode,omitempty"`
2534	// RuleSetType - The type of the web application firewall rule set. Possible values are: 'OWASP'.
2535	RuleSetType *string `json:"ruleSetType,omitempty"`
2536	// RuleSetVersion - The version of the rule set type.
2537	RuleSetVersion *string `json:"ruleSetVersion,omitempty"`
2538	// DisabledRuleGroups - The disabled rule groups.
2539	DisabledRuleGroups *[]ApplicationGatewayFirewallDisabledRuleGroup `json:"disabledRuleGroups,omitempty"`
2540	// RequestBodyCheck - Whether allow WAF to check request Body.
2541	RequestBodyCheck *bool `json:"requestBodyCheck,omitempty"`
2542	// MaxRequestBodySize - Maximum request body size for WAF.
2543	MaxRequestBodySize *int32 `json:"maxRequestBodySize,omitempty"`
2544}
2545
2546// ApplicationSecurityGroup an application security group in a resource group.
2547type ApplicationSecurityGroup struct {
2548	autorest.Response `json:"-"`
2549	// ApplicationSecurityGroupPropertiesFormat - Properties of the application security group.
2550	*ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"`
2551	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
2552	Etag *string `json:"etag,omitempty"`
2553	// ID - Resource ID.
2554	ID *string `json:"id,omitempty"`
2555	// Name - READ-ONLY; Resource name.
2556	Name *string `json:"name,omitempty"`
2557	// Type - READ-ONLY; Resource type.
2558	Type *string `json:"type,omitempty"`
2559	// Location - Resource location.
2560	Location *string `json:"location,omitempty"`
2561	// Tags - Resource tags.
2562	Tags map[string]*string `json:"tags"`
2563}
2564
2565// MarshalJSON is the custom marshaler for ApplicationSecurityGroup.
2566func (asg ApplicationSecurityGroup) MarshalJSON() ([]byte, error) {
2567	objectMap := make(map[string]interface{})
2568	if asg.ApplicationSecurityGroupPropertiesFormat != nil {
2569		objectMap["properties"] = asg.ApplicationSecurityGroupPropertiesFormat
2570	}
2571	if asg.ID != nil {
2572		objectMap["id"] = asg.ID
2573	}
2574	if asg.Location != nil {
2575		objectMap["location"] = asg.Location
2576	}
2577	if asg.Tags != nil {
2578		objectMap["tags"] = asg.Tags
2579	}
2580	return json.Marshal(objectMap)
2581}
2582
2583// UnmarshalJSON is the custom unmarshaler for ApplicationSecurityGroup struct.
2584func (asg *ApplicationSecurityGroup) UnmarshalJSON(body []byte) error {
2585	var m map[string]*json.RawMessage
2586	err := json.Unmarshal(body, &m)
2587	if err != nil {
2588		return err
2589	}
2590	for k, v := range m {
2591		switch k {
2592		case "properties":
2593			if v != nil {
2594				var applicationSecurityGroupPropertiesFormat ApplicationSecurityGroupPropertiesFormat
2595				err = json.Unmarshal(*v, &applicationSecurityGroupPropertiesFormat)
2596				if err != nil {
2597					return err
2598				}
2599				asg.ApplicationSecurityGroupPropertiesFormat = &applicationSecurityGroupPropertiesFormat
2600			}
2601		case "etag":
2602			if v != nil {
2603				var etag string
2604				err = json.Unmarshal(*v, &etag)
2605				if err != nil {
2606					return err
2607				}
2608				asg.Etag = &etag
2609			}
2610		case "id":
2611			if v != nil {
2612				var ID string
2613				err = json.Unmarshal(*v, &ID)
2614				if err != nil {
2615					return err
2616				}
2617				asg.ID = &ID
2618			}
2619		case "name":
2620			if v != nil {
2621				var name string
2622				err = json.Unmarshal(*v, &name)
2623				if err != nil {
2624					return err
2625				}
2626				asg.Name = &name
2627			}
2628		case "type":
2629			if v != nil {
2630				var typeVar string
2631				err = json.Unmarshal(*v, &typeVar)
2632				if err != nil {
2633					return err
2634				}
2635				asg.Type = &typeVar
2636			}
2637		case "location":
2638			if v != nil {
2639				var location string
2640				err = json.Unmarshal(*v, &location)
2641				if err != nil {
2642					return err
2643				}
2644				asg.Location = &location
2645			}
2646		case "tags":
2647			if v != nil {
2648				var tags map[string]*string
2649				err = json.Unmarshal(*v, &tags)
2650				if err != nil {
2651					return err
2652				}
2653				asg.Tags = tags
2654			}
2655		}
2656	}
2657
2658	return nil
2659}
2660
2661// ApplicationSecurityGroupListResult a list of application security groups.
2662type ApplicationSecurityGroupListResult struct {
2663	autorest.Response `json:"-"`
2664	// Value - A list of application security groups.
2665	Value *[]ApplicationSecurityGroup `json:"value,omitempty"`
2666	// NextLink - READ-ONLY; The URL to get the next set of results.
2667	NextLink *string `json:"nextLink,omitempty"`
2668}
2669
2670// MarshalJSON is the custom marshaler for ApplicationSecurityGroupListResult.
2671func (asglr ApplicationSecurityGroupListResult) MarshalJSON() ([]byte, error) {
2672	objectMap := make(map[string]interface{})
2673	if asglr.Value != nil {
2674		objectMap["value"] = asglr.Value
2675	}
2676	return json.Marshal(objectMap)
2677}
2678
2679// ApplicationSecurityGroupListResultIterator provides access to a complete listing of
2680// ApplicationSecurityGroup values.
2681type ApplicationSecurityGroupListResultIterator struct {
2682	i    int
2683	page ApplicationSecurityGroupListResultPage
2684}
2685
2686// NextWithContext advances to the next value.  If there was an error making
2687// the request the iterator does not advance and the error is returned.
2688func (iter *ApplicationSecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
2689	if tracing.IsEnabled() {
2690		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupListResultIterator.NextWithContext")
2691		defer func() {
2692			sc := -1
2693			if iter.Response().Response.Response != nil {
2694				sc = iter.Response().Response.Response.StatusCode
2695			}
2696			tracing.EndSpan(ctx, sc, err)
2697		}()
2698	}
2699	iter.i++
2700	if iter.i < len(iter.page.Values()) {
2701		return nil
2702	}
2703	err = iter.page.NextWithContext(ctx)
2704	if err != nil {
2705		iter.i--
2706		return err
2707	}
2708	iter.i = 0
2709	return nil
2710}
2711
2712// Next advances to the next value.  If there was an error making
2713// the request the iterator does not advance and the error is returned.
2714// Deprecated: Use NextWithContext() instead.
2715func (iter *ApplicationSecurityGroupListResultIterator) Next() error {
2716	return iter.NextWithContext(context.Background())
2717}
2718
2719// NotDone returns true if the enumeration should be started or is not yet complete.
2720func (iter ApplicationSecurityGroupListResultIterator) NotDone() bool {
2721	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2722}
2723
2724// Response returns the raw server response from the last page request.
2725func (iter ApplicationSecurityGroupListResultIterator) Response() ApplicationSecurityGroupListResult {
2726	return iter.page.Response()
2727}
2728
2729// Value returns the current value or a zero-initialized value if the
2730// iterator has advanced beyond the end of the collection.
2731func (iter ApplicationSecurityGroupListResultIterator) Value() ApplicationSecurityGroup {
2732	if !iter.page.NotDone() {
2733		return ApplicationSecurityGroup{}
2734	}
2735	return iter.page.Values()[iter.i]
2736}
2737
2738// Creates a new instance of the ApplicationSecurityGroupListResultIterator type.
2739func NewApplicationSecurityGroupListResultIterator(page ApplicationSecurityGroupListResultPage) ApplicationSecurityGroupListResultIterator {
2740	return ApplicationSecurityGroupListResultIterator{page: page}
2741}
2742
2743// IsEmpty returns true if the ListResult contains no values.
2744func (asglr ApplicationSecurityGroupListResult) IsEmpty() bool {
2745	return asglr.Value == nil || len(*asglr.Value) == 0
2746}
2747
2748// hasNextLink returns true if the NextLink is not empty.
2749func (asglr ApplicationSecurityGroupListResult) hasNextLink() bool {
2750	return asglr.NextLink != nil && len(*asglr.NextLink) != 0
2751}
2752
2753// applicationSecurityGroupListResultPreparer prepares a request to retrieve the next set of results.
2754// It returns nil if no more results exist.
2755func (asglr ApplicationSecurityGroupListResult) applicationSecurityGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
2756	if !asglr.hasNextLink() {
2757		return nil, nil
2758	}
2759	return autorest.Prepare((&http.Request{}).WithContext(ctx),
2760		autorest.AsJSON(),
2761		autorest.AsGet(),
2762		autorest.WithBaseURL(to.String(asglr.NextLink)))
2763}
2764
2765// ApplicationSecurityGroupListResultPage contains a page of ApplicationSecurityGroup values.
2766type ApplicationSecurityGroupListResultPage struct {
2767	fn    func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)
2768	asglr ApplicationSecurityGroupListResult
2769}
2770
2771// NextWithContext advances to the next page of values.  If there was an error making
2772// the request the page does not advance and the error is returned.
2773func (page *ApplicationSecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
2774	if tracing.IsEnabled() {
2775		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupListResultPage.NextWithContext")
2776		defer func() {
2777			sc := -1
2778			if page.Response().Response.Response != nil {
2779				sc = page.Response().Response.Response.StatusCode
2780			}
2781			tracing.EndSpan(ctx, sc, err)
2782		}()
2783	}
2784	for {
2785		next, err := page.fn(ctx, page.asglr)
2786		if err != nil {
2787			return err
2788		}
2789		page.asglr = next
2790		if !next.hasNextLink() || !next.IsEmpty() {
2791			break
2792		}
2793	}
2794	return nil
2795}
2796
2797// Next advances to the next page of values.  If there was an error making
2798// the request the page does not advance and the error is returned.
2799// Deprecated: Use NextWithContext() instead.
2800func (page *ApplicationSecurityGroupListResultPage) Next() error {
2801	return page.NextWithContext(context.Background())
2802}
2803
2804// NotDone returns true if the page enumeration should be started or is not yet complete.
2805func (page ApplicationSecurityGroupListResultPage) NotDone() bool {
2806	return !page.asglr.IsEmpty()
2807}
2808
2809// Response returns the raw server response from the last page request.
2810func (page ApplicationSecurityGroupListResultPage) Response() ApplicationSecurityGroupListResult {
2811	return page.asglr
2812}
2813
2814// Values returns the slice of values for the current page or nil if there are no values.
2815func (page ApplicationSecurityGroupListResultPage) Values() []ApplicationSecurityGroup {
2816	if page.asglr.IsEmpty() {
2817		return nil
2818	}
2819	return *page.asglr.Value
2820}
2821
2822// Creates a new instance of the ApplicationSecurityGroupListResultPage type.
2823func NewApplicationSecurityGroupListResultPage(cur ApplicationSecurityGroupListResult, getNextPage func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)) ApplicationSecurityGroupListResultPage {
2824	return ApplicationSecurityGroupListResultPage{
2825		fn:    getNextPage,
2826		asglr: cur,
2827	}
2828}
2829
2830// ApplicationSecurityGroupPropertiesFormat application security group properties.
2831type ApplicationSecurityGroupPropertiesFormat struct {
2832	// 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.
2833	ResourceGUID *string `json:"resourceGuid,omitempty"`
2834	// ProvisioningState - READ-ONLY; The provisioning state of the application security group resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
2835	ProvisioningState *string `json:"provisioningState,omitempty"`
2836}
2837
2838// ApplicationSecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
2839// of a long-running operation.
2840type ApplicationSecurityGroupsCreateOrUpdateFuture struct {
2841	azure.FutureAPI
2842	// Result returns the result of the asynchronous operation.
2843	// If the operation has not completed it will return an error.
2844	Result func(ApplicationSecurityGroupsClient) (ApplicationSecurityGroup, error)
2845}
2846
2847// ApplicationSecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a
2848// long-running operation.
2849type ApplicationSecurityGroupsDeleteFuture struct {
2850	azure.FutureAPI
2851	// Result returns the result of the asynchronous operation.
2852	// If the operation has not completed it will return an error.
2853	Result func(ApplicationSecurityGroupsClient) (autorest.Response, error)
2854}
2855
2856// AuthorizationListResult response for ListAuthorizations API service call retrieves all authorizations
2857// that belongs to an ExpressRouteCircuit.
2858type AuthorizationListResult struct {
2859	autorest.Response `json:"-"`
2860	// Value - The authorizations in an ExpressRoute Circuit.
2861	Value *[]ExpressRouteCircuitAuthorization `json:"value,omitempty"`
2862	// NextLink - The URL to get the next set of results.
2863	NextLink *string `json:"nextLink,omitempty"`
2864}
2865
2866// AuthorizationListResultIterator provides access to a complete listing of
2867// ExpressRouteCircuitAuthorization values.
2868type AuthorizationListResultIterator struct {
2869	i    int
2870	page AuthorizationListResultPage
2871}
2872
2873// NextWithContext advances to the next value.  If there was an error making
2874// the request the iterator does not advance and the error is returned.
2875func (iter *AuthorizationListResultIterator) NextWithContext(ctx context.Context) (err error) {
2876	if tracing.IsEnabled() {
2877		ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultIterator.NextWithContext")
2878		defer func() {
2879			sc := -1
2880			if iter.Response().Response.Response != nil {
2881				sc = iter.Response().Response.Response.StatusCode
2882			}
2883			tracing.EndSpan(ctx, sc, err)
2884		}()
2885	}
2886	iter.i++
2887	if iter.i < len(iter.page.Values()) {
2888		return nil
2889	}
2890	err = iter.page.NextWithContext(ctx)
2891	if err != nil {
2892		iter.i--
2893		return err
2894	}
2895	iter.i = 0
2896	return nil
2897}
2898
2899// Next advances to the next value.  If there was an error making
2900// the request the iterator does not advance and the error is returned.
2901// Deprecated: Use NextWithContext() instead.
2902func (iter *AuthorizationListResultIterator) Next() error {
2903	return iter.NextWithContext(context.Background())
2904}
2905
2906// NotDone returns true if the enumeration should be started or is not yet complete.
2907func (iter AuthorizationListResultIterator) NotDone() bool {
2908	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2909}
2910
2911// Response returns the raw server response from the last page request.
2912func (iter AuthorizationListResultIterator) Response() AuthorizationListResult {
2913	return iter.page.Response()
2914}
2915
2916// Value returns the current value or a zero-initialized value if the
2917// iterator has advanced beyond the end of the collection.
2918func (iter AuthorizationListResultIterator) Value() ExpressRouteCircuitAuthorization {
2919	if !iter.page.NotDone() {
2920		return ExpressRouteCircuitAuthorization{}
2921	}
2922	return iter.page.Values()[iter.i]
2923}
2924
2925// Creates a new instance of the AuthorizationListResultIterator type.
2926func NewAuthorizationListResultIterator(page AuthorizationListResultPage) AuthorizationListResultIterator {
2927	return AuthorizationListResultIterator{page: page}
2928}
2929
2930// IsEmpty returns true if the ListResult contains no values.
2931func (alr AuthorizationListResult) IsEmpty() bool {
2932	return alr.Value == nil || len(*alr.Value) == 0
2933}
2934
2935// hasNextLink returns true if the NextLink is not empty.
2936func (alr AuthorizationListResult) hasNextLink() bool {
2937	return alr.NextLink != nil && len(*alr.NextLink) != 0
2938}
2939
2940// authorizationListResultPreparer prepares a request to retrieve the next set of results.
2941// It returns nil if no more results exist.
2942func (alr AuthorizationListResult) authorizationListResultPreparer(ctx context.Context) (*http.Request, error) {
2943	if !alr.hasNextLink() {
2944		return nil, nil
2945	}
2946	return autorest.Prepare((&http.Request{}).WithContext(ctx),
2947		autorest.AsJSON(),
2948		autorest.AsGet(),
2949		autorest.WithBaseURL(to.String(alr.NextLink)))
2950}
2951
2952// AuthorizationListResultPage contains a page of ExpressRouteCircuitAuthorization values.
2953type AuthorizationListResultPage struct {
2954	fn  func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)
2955	alr AuthorizationListResult
2956}
2957
2958// NextWithContext advances to the next page of values.  If there was an error making
2959// the request the page does not advance and the error is returned.
2960func (page *AuthorizationListResultPage) NextWithContext(ctx context.Context) (err error) {
2961	if tracing.IsEnabled() {
2962		ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultPage.NextWithContext")
2963		defer func() {
2964			sc := -1
2965			if page.Response().Response.Response != nil {
2966				sc = page.Response().Response.Response.StatusCode
2967			}
2968			tracing.EndSpan(ctx, sc, err)
2969		}()
2970	}
2971	for {
2972		next, err := page.fn(ctx, page.alr)
2973		if err != nil {
2974			return err
2975		}
2976		page.alr = next
2977		if !next.hasNextLink() || !next.IsEmpty() {
2978			break
2979		}
2980	}
2981	return nil
2982}
2983
2984// Next advances to the next page of values.  If there was an error making
2985// the request the page does not advance and the error is returned.
2986// Deprecated: Use NextWithContext() instead.
2987func (page *AuthorizationListResultPage) Next() error {
2988	return page.NextWithContext(context.Background())
2989}
2990
2991// NotDone returns true if the page enumeration should be started or is not yet complete.
2992func (page AuthorizationListResultPage) NotDone() bool {
2993	return !page.alr.IsEmpty()
2994}
2995
2996// Response returns the raw server response from the last page request.
2997func (page AuthorizationListResultPage) Response() AuthorizationListResult {
2998	return page.alr
2999}
3000
3001// Values returns the slice of values for the current page or nil if there are no values.
3002func (page AuthorizationListResultPage) Values() []ExpressRouteCircuitAuthorization {
3003	if page.alr.IsEmpty() {
3004		return nil
3005	}
3006	return *page.alr.Value
3007}
3008
3009// Creates a new instance of the AuthorizationListResultPage type.
3010func NewAuthorizationListResultPage(cur AuthorizationListResult, getNextPage func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)) AuthorizationListResultPage {
3011	return AuthorizationListResultPage{
3012		fn:  getNextPage,
3013		alr: cur,
3014	}
3015}
3016
3017// AuthorizationPropertiesFormat ...
3018type AuthorizationPropertiesFormat struct {
3019	// AuthorizationKey - The authorization key.
3020	AuthorizationKey *string `json:"authorizationKey,omitempty"`
3021	// AuthorizationUseStatus - AuthorizationUseStatus. Possible values are: 'Available' and 'InUse'. Possible values include: 'Available', 'InUse'
3022	AuthorizationUseStatus AuthorizationUseStatus `json:"authorizationUseStatus,omitempty"`
3023	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
3024	ProvisioningState *string `json:"provisioningState,omitempty"`
3025}
3026
3027// Availability availability of the metric.
3028type Availability struct {
3029	// TimeGrain - The time grain of the availability.
3030	TimeGrain *string `json:"timeGrain,omitempty"`
3031	// Retention - The retention of the availability.
3032	Retention *string `json:"retention,omitempty"`
3033	// BlobDuration - Duration of the availability blob.
3034	BlobDuration *string `json:"blobDuration,omitempty"`
3035}
3036
3037// AvailableProvidersList list of available countries with details.
3038type AvailableProvidersList struct {
3039	autorest.Response `json:"-"`
3040	// Countries - List of available countries.
3041	Countries *[]AvailableProvidersListCountry `json:"countries,omitempty"`
3042}
3043
3044// AvailableProvidersListCity city or town details.
3045type AvailableProvidersListCity struct {
3046	// CityName - The city or town name.
3047	CityName *string `json:"cityName,omitempty"`
3048	// Providers - A list of Internet service providers.
3049	Providers *[]string `json:"providers,omitempty"`
3050}
3051
3052// AvailableProvidersListCountry country details.
3053type AvailableProvidersListCountry struct {
3054	// CountryName - The country name.
3055	CountryName *string `json:"countryName,omitempty"`
3056	// Providers - A list of Internet service providers.
3057	Providers *[]string `json:"providers,omitempty"`
3058	// States - List of available states in the country.
3059	States *[]AvailableProvidersListState `json:"states,omitempty"`
3060}
3061
3062// AvailableProvidersListParameters constraints that determine the list of available Internet service
3063// providers.
3064type AvailableProvidersListParameters struct {
3065	// AzureLocations - A list of Azure regions.
3066	AzureLocations *[]string `json:"azureLocations,omitempty"`
3067	// Country - The country for available providers list.
3068	Country *string `json:"country,omitempty"`
3069	// State - The state for available providers list.
3070	State *string `json:"state,omitempty"`
3071	// City - The city or town for available providers list.
3072	City *string `json:"city,omitempty"`
3073}
3074
3075// AvailableProvidersListState state details.
3076type AvailableProvidersListState struct {
3077	// StateName - The state name.
3078	StateName *string `json:"stateName,omitempty"`
3079	// Providers - A list of Internet service providers.
3080	Providers *[]string `json:"providers,omitempty"`
3081	// Cities - List of available cities or towns in the state.
3082	Cities *[]AvailableProvidersListCity `json:"cities,omitempty"`
3083}
3084
3085// AzureAsyncOperationResult the response body contains the status of the specified asynchronous operation,
3086// indicating whether it has succeeded, is in progress, or has failed. Note that this status is distinct
3087// from the HTTP status code returned for the Get Operation Status operation itself. If the asynchronous
3088// operation succeeded, the response body includes the HTTP status code for the successful request. If the
3089// asynchronous operation failed, the response body includes the HTTP status code for the failed request
3090// and error information regarding the failure.
3091type AzureAsyncOperationResult struct {
3092	// Status - Status of the Azure async operation. Possible values are: 'InProgress', 'Succeeded', and 'Failed'. Possible values include: 'OperationStatusInProgress', 'OperationStatusSucceeded', 'OperationStatusFailed'
3093	Status OperationStatus `json:"status,omitempty"`
3094	Error  *Error          `json:"error,omitempty"`
3095}
3096
3097// AzureFirewall azure Firewall resource
3098type AzureFirewall struct {
3099	autorest.Response              `json:"-"`
3100	*AzureFirewallPropertiesFormat `json:"properties,omitempty"`
3101	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
3102	Etag *string `json:"etag,omitempty"`
3103	// ID - Resource ID.
3104	ID *string `json:"id,omitempty"`
3105	// Name - READ-ONLY; Resource name.
3106	Name *string `json:"name,omitempty"`
3107	// Type - READ-ONLY; Resource type.
3108	Type *string `json:"type,omitempty"`
3109	// Location - Resource location.
3110	Location *string `json:"location,omitempty"`
3111	// Tags - Resource tags.
3112	Tags map[string]*string `json:"tags"`
3113}
3114
3115// MarshalJSON is the custom marshaler for AzureFirewall.
3116func (af AzureFirewall) MarshalJSON() ([]byte, error) {
3117	objectMap := make(map[string]interface{})
3118	if af.AzureFirewallPropertiesFormat != nil {
3119		objectMap["properties"] = af.AzureFirewallPropertiesFormat
3120	}
3121	if af.ID != nil {
3122		objectMap["id"] = af.ID
3123	}
3124	if af.Location != nil {
3125		objectMap["location"] = af.Location
3126	}
3127	if af.Tags != nil {
3128		objectMap["tags"] = af.Tags
3129	}
3130	return json.Marshal(objectMap)
3131}
3132
3133// UnmarshalJSON is the custom unmarshaler for AzureFirewall struct.
3134func (af *AzureFirewall) UnmarshalJSON(body []byte) error {
3135	var m map[string]*json.RawMessage
3136	err := json.Unmarshal(body, &m)
3137	if err != nil {
3138		return err
3139	}
3140	for k, v := range m {
3141		switch k {
3142		case "properties":
3143			if v != nil {
3144				var azureFirewallPropertiesFormat AzureFirewallPropertiesFormat
3145				err = json.Unmarshal(*v, &azureFirewallPropertiesFormat)
3146				if err != nil {
3147					return err
3148				}
3149				af.AzureFirewallPropertiesFormat = &azureFirewallPropertiesFormat
3150			}
3151		case "etag":
3152			if v != nil {
3153				var etag string
3154				err = json.Unmarshal(*v, &etag)
3155				if err != nil {
3156					return err
3157				}
3158				af.Etag = &etag
3159			}
3160		case "id":
3161			if v != nil {
3162				var ID string
3163				err = json.Unmarshal(*v, &ID)
3164				if err != nil {
3165					return err
3166				}
3167				af.ID = &ID
3168			}
3169		case "name":
3170			if v != nil {
3171				var name string
3172				err = json.Unmarshal(*v, &name)
3173				if err != nil {
3174					return err
3175				}
3176				af.Name = &name
3177			}
3178		case "type":
3179			if v != nil {
3180				var typeVar string
3181				err = json.Unmarshal(*v, &typeVar)
3182				if err != nil {
3183					return err
3184				}
3185				af.Type = &typeVar
3186			}
3187		case "location":
3188			if v != nil {
3189				var location string
3190				err = json.Unmarshal(*v, &location)
3191				if err != nil {
3192					return err
3193				}
3194				af.Location = &location
3195			}
3196		case "tags":
3197			if v != nil {
3198				var tags map[string]*string
3199				err = json.Unmarshal(*v, &tags)
3200				if err != nil {
3201					return err
3202				}
3203				af.Tags = tags
3204			}
3205		}
3206	}
3207
3208	return nil
3209}
3210
3211// AzureFirewallApplicationRule properties of an application rule.
3212type AzureFirewallApplicationRule struct {
3213	// Name - Name of the application rule.
3214	Name *string `json:"name,omitempty"`
3215	// Description - Description of the rule.
3216	Description *string `json:"description,omitempty"`
3217	// SourceAddresses - List of source IP addresses for this rule.
3218	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
3219	// Protocols - Array of ApplicationRuleProtocols.
3220	Protocols *[]AzureFirewallApplicationRuleProtocol `json:"protocols,omitempty"`
3221	// TargetUrls - List of URLs for this rule.
3222	TargetUrls *[]string `json:"targetUrls,omitempty"`
3223}
3224
3225// AzureFirewallApplicationRuleCollection application rule collection resource
3226type AzureFirewallApplicationRuleCollection struct {
3227	*AzureFirewallApplicationRuleCollectionPropertiesFormat `json:"properties,omitempty"`
3228	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
3229	Name *string `json:"name,omitempty"`
3230	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
3231	Etag *string `json:"etag,omitempty"`
3232	// ID - Resource ID.
3233	ID *string `json:"id,omitempty"`
3234}
3235
3236// MarshalJSON is the custom marshaler for AzureFirewallApplicationRuleCollection.
3237func (afarc AzureFirewallApplicationRuleCollection) MarshalJSON() ([]byte, error) {
3238	objectMap := make(map[string]interface{})
3239	if afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat != nil {
3240		objectMap["properties"] = afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat
3241	}
3242	if afarc.Name != nil {
3243		objectMap["name"] = afarc.Name
3244	}
3245	if afarc.ID != nil {
3246		objectMap["id"] = afarc.ID
3247	}
3248	return json.Marshal(objectMap)
3249}
3250
3251// UnmarshalJSON is the custom unmarshaler for AzureFirewallApplicationRuleCollection struct.
3252func (afarc *AzureFirewallApplicationRuleCollection) UnmarshalJSON(body []byte) error {
3253	var m map[string]*json.RawMessage
3254	err := json.Unmarshal(body, &m)
3255	if err != nil {
3256		return err
3257	}
3258	for k, v := range m {
3259		switch k {
3260		case "properties":
3261			if v != nil {
3262				var azureFirewallApplicationRuleCollectionPropertiesFormat AzureFirewallApplicationRuleCollectionPropertiesFormat
3263				err = json.Unmarshal(*v, &azureFirewallApplicationRuleCollectionPropertiesFormat)
3264				if err != nil {
3265					return err
3266				}
3267				afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat = &azureFirewallApplicationRuleCollectionPropertiesFormat
3268			}
3269		case "name":
3270			if v != nil {
3271				var name string
3272				err = json.Unmarshal(*v, &name)
3273				if err != nil {
3274					return err
3275				}
3276				afarc.Name = &name
3277			}
3278		case "etag":
3279			if v != nil {
3280				var etag string
3281				err = json.Unmarshal(*v, &etag)
3282				if err != nil {
3283					return err
3284				}
3285				afarc.Etag = &etag
3286			}
3287		case "id":
3288			if v != nil {
3289				var ID string
3290				err = json.Unmarshal(*v, &ID)
3291				if err != nil {
3292					return err
3293				}
3294				afarc.ID = &ID
3295			}
3296		}
3297	}
3298
3299	return nil
3300}
3301
3302// AzureFirewallApplicationRuleCollectionPropertiesFormat properties of the application rule collection.
3303type AzureFirewallApplicationRuleCollectionPropertiesFormat struct {
3304	// Priority - Priority of the application rule collection resource.
3305	Priority *int32 `json:"priority,omitempty"`
3306	// Action - The action type of a rule collection
3307	Action *AzureFirewallRCAction `json:"action,omitempty"`
3308	// Rules - Collection of rules used by a application rule collection.
3309	Rules *[]AzureFirewallApplicationRule `json:"rules,omitempty"`
3310	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
3311	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
3312}
3313
3314// AzureFirewallApplicationRuleProtocol properties of the application rule protocol.
3315type AzureFirewallApplicationRuleProtocol struct {
3316	// ProtocolType - Protocol type. Possible values include: 'AzureFirewallApplicationRuleProtocolTypeHTTP', 'AzureFirewallApplicationRuleProtocolTypeHTTPS'
3317	ProtocolType AzureFirewallApplicationRuleProtocolType `json:"protocolType,omitempty"`
3318	// Port - Port number for the protocol, cannot be greater than 64000. This field is optional.
3319	Port *int32 `json:"port,omitempty"`
3320}
3321
3322// AzureFirewallIPConfiguration IP configuration of an Azure Firewall.
3323type AzureFirewallIPConfiguration struct {
3324	*AzureFirewallIPConfigurationPropertiesFormat `json:"properties,omitempty"`
3325	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
3326	Name *string `json:"name,omitempty"`
3327	// Etag - A unique read-only string that changes whenever the resource is updated.
3328	Etag *string `json:"etag,omitempty"`
3329	// ID - Resource ID.
3330	ID *string `json:"id,omitempty"`
3331}
3332
3333// MarshalJSON is the custom marshaler for AzureFirewallIPConfiguration.
3334func (afic AzureFirewallIPConfiguration) MarshalJSON() ([]byte, error) {
3335	objectMap := make(map[string]interface{})
3336	if afic.AzureFirewallIPConfigurationPropertiesFormat != nil {
3337		objectMap["properties"] = afic.AzureFirewallIPConfigurationPropertiesFormat
3338	}
3339	if afic.Name != nil {
3340		objectMap["name"] = afic.Name
3341	}
3342	if afic.Etag != nil {
3343		objectMap["etag"] = afic.Etag
3344	}
3345	if afic.ID != nil {
3346		objectMap["id"] = afic.ID
3347	}
3348	return json.Marshal(objectMap)
3349}
3350
3351// UnmarshalJSON is the custom unmarshaler for AzureFirewallIPConfiguration struct.
3352func (afic *AzureFirewallIPConfiguration) UnmarshalJSON(body []byte) error {
3353	var m map[string]*json.RawMessage
3354	err := json.Unmarshal(body, &m)
3355	if err != nil {
3356		return err
3357	}
3358	for k, v := range m {
3359		switch k {
3360		case "properties":
3361			if v != nil {
3362				var azureFirewallIPConfigurationPropertiesFormat AzureFirewallIPConfigurationPropertiesFormat
3363				err = json.Unmarshal(*v, &azureFirewallIPConfigurationPropertiesFormat)
3364				if err != nil {
3365					return err
3366				}
3367				afic.AzureFirewallIPConfigurationPropertiesFormat = &azureFirewallIPConfigurationPropertiesFormat
3368			}
3369		case "name":
3370			if v != nil {
3371				var name string
3372				err = json.Unmarshal(*v, &name)
3373				if err != nil {
3374					return err
3375				}
3376				afic.Name = &name
3377			}
3378		case "etag":
3379			if v != nil {
3380				var etag string
3381				err = json.Unmarshal(*v, &etag)
3382				if err != nil {
3383					return err
3384				}
3385				afic.Etag = &etag
3386			}
3387		case "id":
3388			if v != nil {
3389				var ID string
3390				err = json.Unmarshal(*v, &ID)
3391				if err != nil {
3392					return err
3393				}
3394				afic.ID = &ID
3395			}
3396		}
3397	}
3398
3399	return nil
3400}
3401
3402// AzureFirewallIPConfigurationPropertiesFormat properties of IP configuration of an Azure Firewall.
3403type AzureFirewallIPConfigurationPropertiesFormat struct {
3404	// PrivateIPAddress - The Firewall Internal Load Balancer IP to be used as the next hop in User Defined Routes.
3405	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
3406	// Subnet - Reference of the subnet resource. This resource must be named 'AzureFirewallSubnet'.
3407	Subnet *SubResource `json:"subnet,omitempty"`
3408	// InternalPublicIPAddress - Reference of the PublicIP resource. This field is a mandatory input.
3409	InternalPublicIPAddress *SubResource `json:"internalPublicIpAddress,omitempty"`
3410	// PublicIPAddress - Reference of the PublicIP resource. This field is populated in the output.
3411	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
3412	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
3413	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
3414}
3415
3416// AzureFirewallListResult response for ListAzureFirewalls API service call.
3417type AzureFirewallListResult struct {
3418	autorest.Response `json:"-"`
3419	// Value - List of a Azure Firewalls in a resource group.
3420	Value *[]AzureFirewall `json:"value,omitempty"`
3421	// NextLink - URL to get the next set of results.
3422	NextLink *string `json:"nextLink,omitempty"`
3423}
3424
3425// AzureFirewallListResultIterator provides access to a complete listing of AzureFirewall values.
3426type AzureFirewallListResultIterator struct {
3427	i    int
3428	page AzureFirewallListResultPage
3429}
3430
3431// NextWithContext advances to the next value.  If there was an error making
3432// the request the iterator does not advance and the error is returned.
3433func (iter *AzureFirewallListResultIterator) NextWithContext(ctx context.Context) (err error) {
3434	if tracing.IsEnabled() {
3435		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallListResultIterator.NextWithContext")
3436		defer func() {
3437			sc := -1
3438			if iter.Response().Response.Response != nil {
3439				sc = iter.Response().Response.Response.StatusCode
3440			}
3441			tracing.EndSpan(ctx, sc, err)
3442		}()
3443	}
3444	iter.i++
3445	if iter.i < len(iter.page.Values()) {
3446		return nil
3447	}
3448	err = iter.page.NextWithContext(ctx)
3449	if err != nil {
3450		iter.i--
3451		return err
3452	}
3453	iter.i = 0
3454	return nil
3455}
3456
3457// Next advances to the next value.  If there was an error making
3458// the request the iterator does not advance and the error is returned.
3459// Deprecated: Use NextWithContext() instead.
3460func (iter *AzureFirewallListResultIterator) Next() error {
3461	return iter.NextWithContext(context.Background())
3462}
3463
3464// NotDone returns true if the enumeration should be started or is not yet complete.
3465func (iter AzureFirewallListResultIterator) NotDone() bool {
3466	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3467}
3468
3469// Response returns the raw server response from the last page request.
3470func (iter AzureFirewallListResultIterator) Response() AzureFirewallListResult {
3471	return iter.page.Response()
3472}
3473
3474// Value returns the current value or a zero-initialized value if the
3475// iterator has advanced beyond the end of the collection.
3476func (iter AzureFirewallListResultIterator) Value() AzureFirewall {
3477	if !iter.page.NotDone() {
3478		return AzureFirewall{}
3479	}
3480	return iter.page.Values()[iter.i]
3481}
3482
3483// Creates a new instance of the AzureFirewallListResultIterator type.
3484func NewAzureFirewallListResultIterator(page AzureFirewallListResultPage) AzureFirewallListResultIterator {
3485	return AzureFirewallListResultIterator{page: page}
3486}
3487
3488// IsEmpty returns true if the ListResult contains no values.
3489func (aflr AzureFirewallListResult) IsEmpty() bool {
3490	return aflr.Value == nil || len(*aflr.Value) == 0
3491}
3492
3493// hasNextLink returns true if the NextLink is not empty.
3494func (aflr AzureFirewallListResult) hasNextLink() bool {
3495	return aflr.NextLink != nil && len(*aflr.NextLink) != 0
3496}
3497
3498// azureFirewallListResultPreparer prepares a request to retrieve the next set of results.
3499// It returns nil if no more results exist.
3500func (aflr AzureFirewallListResult) azureFirewallListResultPreparer(ctx context.Context) (*http.Request, error) {
3501	if !aflr.hasNextLink() {
3502		return nil, nil
3503	}
3504	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3505		autorest.AsJSON(),
3506		autorest.AsGet(),
3507		autorest.WithBaseURL(to.String(aflr.NextLink)))
3508}
3509
3510// AzureFirewallListResultPage contains a page of AzureFirewall values.
3511type AzureFirewallListResultPage struct {
3512	fn   func(context.Context, AzureFirewallListResult) (AzureFirewallListResult, error)
3513	aflr AzureFirewallListResult
3514}
3515
3516// NextWithContext advances to the next page of values.  If there was an error making
3517// the request the page does not advance and the error is returned.
3518func (page *AzureFirewallListResultPage) NextWithContext(ctx context.Context) (err error) {
3519	if tracing.IsEnabled() {
3520		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallListResultPage.NextWithContext")
3521		defer func() {
3522			sc := -1
3523			if page.Response().Response.Response != nil {
3524				sc = page.Response().Response.Response.StatusCode
3525			}
3526			tracing.EndSpan(ctx, sc, err)
3527		}()
3528	}
3529	for {
3530		next, err := page.fn(ctx, page.aflr)
3531		if err != nil {
3532			return err
3533		}
3534		page.aflr = next
3535		if !next.hasNextLink() || !next.IsEmpty() {
3536			break
3537		}
3538	}
3539	return nil
3540}
3541
3542// Next advances to the next page of values.  If there was an error making
3543// the request the page does not advance and the error is returned.
3544// Deprecated: Use NextWithContext() instead.
3545func (page *AzureFirewallListResultPage) Next() error {
3546	return page.NextWithContext(context.Background())
3547}
3548
3549// NotDone returns true if the page enumeration should be started or is not yet complete.
3550func (page AzureFirewallListResultPage) NotDone() bool {
3551	return !page.aflr.IsEmpty()
3552}
3553
3554// Response returns the raw server response from the last page request.
3555func (page AzureFirewallListResultPage) Response() AzureFirewallListResult {
3556	return page.aflr
3557}
3558
3559// Values returns the slice of values for the current page or nil if there are no values.
3560func (page AzureFirewallListResultPage) Values() []AzureFirewall {
3561	if page.aflr.IsEmpty() {
3562		return nil
3563	}
3564	return *page.aflr.Value
3565}
3566
3567// Creates a new instance of the AzureFirewallListResultPage type.
3568func NewAzureFirewallListResultPage(cur AzureFirewallListResult, getNextPage func(context.Context, AzureFirewallListResult) (AzureFirewallListResult, error)) AzureFirewallListResultPage {
3569	return AzureFirewallListResultPage{
3570		fn:   getNextPage,
3571		aflr: cur,
3572	}
3573}
3574
3575// AzureFirewallNetworkRule properties of the network rule.
3576type AzureFirewallNetworkRule struct {
3577	// Name - Name of the network rule.
3578	Name *string `json:"name,omitempty"`
3579	// Description - Description of the rule.
3580	Description *string `json:"description,omitempty"`
3581	// Protocols - Array of AzureFirewallNetworkRuleProtocols.
3582	Protocols *[]AzureFirewallNetworkRuleProtocol `json:"protocols,omitempty"`
3583	// SourceAddresses - List of source IP addresses for this rule.
3584	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
3585	// DestinationAddresses - List of destination IP addresses.
3586	DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
3587	// DestinationPorts - List of destination ports.
3588	DestinationPorts *[]string `json:"destinationPorts,omitempty"`
3589}
3590
3591// AzureFirewallNetworkRuleCollection network rule collection resource
3592type AzureFirewallNetworkRuleCollection struct {
3593	*AzureFirewallNetworkRuleCollectionPropertiesFormat `json:"properties,omitempty"`
3594	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
3595	Name *string `json:"name,omitempty"`
3596	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
3597	Etag *string `json:"etag,omitempty"`
3598	// ID - Resource ID.
3599	ID *string `json:"id,omitempty"`
3600}
3601
3602// MarshalJSON is the custom marshaler for AzureFirewallNetworkRuleCollection.
3603func (afnrc AzureFirewallNetworkRuleCollection) MarshalJSON() ([]byte, error) {
3604	objectMap := make(map[string]interface{})
3605	if afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat != nil {
3606		objectMap["properties"] = afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat
3607	}
3608	if afnrc.Name != nil {
3609		objectMap["name"] = afnrc.Name
3610	}
3611	if afnrc.ID != nil {
3612		objectMap["id"] = afnrc.ID
3613	}
3614	return json.Marshal(objectMap)
3615}
3616
3617// UnmarshalJSON is the custom unmarshaler for AzureFirewallNetworkRuleCollection struct.
3618func (afnrc *AzureFirewallNetworkRuleCollection) UnmarshalJSON(body []byte) error {
3619	var m map[string]*json.RawMessage
3620	err := json.Unmarshal(body, &m)
3621	if err != nil {
3622		return err
3623	}
3624	for k, v := range m {
3625		switch k {
3626		case "properties":
3627			if v != nil {
3628				var azureFirewallNetworkRuleCollectionPropertiesFormat AzureFirewallNetworkRuleCollectionPropertiesFormat
3629				err = json.Unmarshal(*v, &azureFirewallNetworkRuleCollectionPropertiesFormat)
3630				if err != nil {
3631					return err
3632				}
3633				afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat = &azureFirewallNetworkRuleCollectionPropertiesFormat
3634			}
3635		case "name":
3636			if v != nil {
3637				var name string
3638				err = json.Unmarshal(*v, &name)
3639				if err != nil {
3640					return err
3641				}
3642				afnrc.Name = &name
3643			}
3644		case "etag":
3645			if v != nil {
3646				var etag string
3647				err = json.Unmarshal(*v, &etag)
3648				if err != nil {
3649					return err
3650				}
3651				afnrc.Etag = &etag
3652			}
3653		case "id":
3654			if v != nil {
3655				var ID string
3656				err = json.Unmarshal(*v, &ID)
3657				if err != nil {
3658					return err
3659				}
3660				afnrc.ID = &ID
3661			}
3662		}
3663	}
3664
3665	return nil
3666}
3667
3668// AzureFirewallNetworkRuleCollectionPropertiesFormat properties of the network rule collection.
3669type AzureFirewallNetworkRuleCollectionPropertiesFormat struct {
3670	// Priority - Priority of the network rule collection resource.
3671	Priority *int32 `json:"priority,omitempty"`
3672	// Action - The action type of a rule collection
3673	Action *AzureFirewallRCAction `json:"action,omitempty"`
3674	// Rules - Collection of rules used by a network rule collection.
3675	Rules *[]AzureFirewallNetworkRule `json:"rules,omitempty"`
3676	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
3677	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
3678}
3679
3680// AzureFirewallPropertiesFormat properties of the Azure Firewall.
3681type AzureFirewallPropertiesFormat struct {
3682	// ApplicationRuleCollections - Collection of application rule collections used by a Azure Firewall.
3683	ApplicationRuleCollections *[]AzureFirewallApplicationRuleCollection `json:"applicationRuleCollections,omitempty"`
3684	// NetworkRuleCollections - Collection of network rule collections used by a Azure Firewall.
3685	NetworkRuleCollections *[]AzureFirewallNetworkRuleCollection `json:"networkRuleCollections,omitempty"`
3686	// IPConfigurations - IP configuration of the Azure Firewall resource.
3687	IPConfigurations *[]AzureFirewallIPConfiguration `json:"ipConfigurations,omitempty"`
3688	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
3689	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
3690}
3691
3692// AzureFirewallRCAction properties of the AzureFirewallRCAction.
3693type AzureFirewallRCAction struct {
3694	// Type - The type of action. Possible values include: 'AzureFirewallRCActionTypeAllow', 'AzureFirewallRCActionTypeDeny'
3695	Type AzureFirewallRCActionType `json:"type,omitempty"`
3696}
3697
3698// AzureFirewallsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
3699// long-running operation.
3700type AzureFirewallsCreateOrUpdateFuture struct {
3701	azure.FutureAPI
3702	// Result returns the result of the asynchronous operation.
3703	// If the operation has not completed it will return an error.
3704	Result func(AzureFirewallsClient) (AzureFirewall, error)
3705}
3706
3707// AzureFirewallsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
3708// operation.
3709type AzureFirewallsDeleteFuture struct {
3710	azure.FutureAPI
3711	// Result returns the result of the asynchronous operation.
3712	// If the operation has not completed it will return an error.
3713	Result func(AzureFirewallsClient) (autorest.Response, error)
3714}
3715
3716// AzureReachabilityReport azure reachability report details.
3717type AzureReachabilityReport struct {
3718	autorest.Response `json:"-"`
3719	// AggregationLevel - The aggregation level of Azure reachability report. Can be Country, State or City.
3720	AggregationLevel *string                          `json:"aggregationLevel,omitempty"`
3721	ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"`
3722	// ReachabilityReport - List of Azure reachability report items.
3723	ReachabilityReport *[]AzureReachabilityReportItem `json:"reachabilityReport,omitempty"`
3724}
3725
3726// AzureReachabilityReportItem azure reachability report details for a given provider location.
3727type AzureReachabilityReportItem struct {
3728	// Provider - The Internet service provider.
3729	Provider *string `json:"provider,omitempty"`
3730	// AzureLocation - The Azure region.
3731	AzureLocation *string `json:"azureLocation,omitempty"`
3732	// Latencies - List of latency details for each of the time series.
3733	Latencies *[]AzureReachabilityReportLatencyInfo `json:"latencies,omitempty"`
3734}
3735
3736// AzureReachabilityReportLatencyInfo details on latency for a time series.
3737type AzureReachabilityReportLatencyInfo struct {
3738	// TimeStamp - The time stamp.
3739	TimeStamp *date.Time `json:"timeStamp,omitempty"`
3740	// Score - The relative latency score between 1 and 100, higher values indicating a faster connection.
3741	Score *int32 `json:"score,omitempty"`
3742}
3743
3744// AzureReachabilityReportLocation parameters that define a geographic location.
3745type AzureReachabilityReportLocation struct {
3746	// Country - The name of the country.
3747	Country *string `json:"country,omitempty"`
3748	// State - The name of the state.
3749	State *string `json:"state,omitempty"`
3750	// City - The name of the city or town.
3751	City *string `json:"city,omitempty"`
3752}
3753
3754// AzureReachabilityReportParameters geographic and time constraints for Azure reachability report.
3755type AzureReachabilityReportParameters struct {
3756	ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"`
3757	// Providers - List of Internet service providers.
3758	Providers *[]string `json:"providers,omitempty"`
3759	// AzureLocations - Optional Azure regions to scope the query to.
3760	AzureLocations *[]string `json:"azureLocations,omitempty"`
3761	// StartTime - The start time for the Azure reachability report.
3762	StartTime *date.Time `json:"startTime,omitempty"`
3763	// EndTime - The end time for the Azure reachability report.
3764	EndTime *date.Time `json:"endTime,omitempty"`
3765}
3766
3767// BackendAddressPool pool of backend IP addresses.
3768type BackendAddressPool struct {
3769	autorest.Response `json:"-"`
3770	// BackendAddressPoolPropertiesFormat - Properties of load balancer backend address pool.
3771	*BackendAddressPoolPropertiesFormat `json:"properties,omitempty"`
3772	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
3773	Name *string `json:"name,omitempty"`
3774	// Etag - A unique read-only string that changes whenever the resource is updated.
3775	Etag *string `json:"etag,omitempty"`
3776	// ID - Resource ID.
3777	ID *string `json:"id,omitempty"`
3778}
3779
3780// MarshalJSON is the custom marshaler for BackendAddressPool.
3781func (bap BackendAddressPool) MarshalJSON() ([]byte, error) {
3782	objectMap := make(map[string]interface{})
3783	if bap.BackendAddressPoolPropertiesFormat != nil {
3784		objectMap["properties"] = bap.BackendAddressPoolPropertiesFormat
3785	}
3786	if bap.Name != nil {
3787		objectMap["name"] = bap.Name
3788	}
3789	if bap.Etag != nil {
3790		objectMap["etag"] = bap.Etag
3791	}
3792	if bap.ID != nil {
3793		objectMap["id"] = bap.ID
3794	}
3795	return json.Marshal(objectMap)
3796}
3797
3798// UnmarshalJSON is the custom unmarshaler for BackendAddressPool struct.
3799func (bap *BackendAddressPool) UnmarshalJSON(body []byte) error {
3800	var m map[string]*json.RawMessage
3801	err := json.Unmarshal(body, &m)
3802	if err != nil {
3803		return err
3804	}
3805	for k, v := range m {
3806		switch k {
3807		case "properties":
3808			if v != nil {
3809				var backendAddressPoolPropertiesFormat BackendAddressPoolPropertiesFormat
3810				err = json.Unmarshal(*v, &backendAddressPoolPropertiesFormat)
3811				if err != nil {
3812					return err
3813				}
3814				bap.BackendAddressPoolPropertiesFormat = &backendAddressPoolPropertiesFormat
3815			}
3816		case "name":
3817			if v != nil {
3818				var name string
3819				err = json.Unmarshal(*v, &name)
3820				if err != nil {
3821					return err
3822				}
3823				bap.Name = &name
3824			}
3825		case "etag":
3826			if v != nil {
3827				var etag string
3828				err = json.Unmarshal(*v, &etag)
3829				if err != nil {
3830					return err
3831				}
3832				bap.Etag = &etag
3833			}
3834		case "id":
3835			if v != nil {
3836				var ID string
3837				err = json.Unmarshal(*v, &ID)
3838				if err != nil {
3839					return err
3840				}
3841				bap.ID = &ID
3842			}
3843		}
3844	}
3845
3846	return nil
3847}
3848
3849// BackendAddressPoolPropertiesFormat properties of the backend address pool.
3850type BackendAddressPoolPropertiesFormat struct {
3851	// BackendIPConfigurations - READ-ONLY; Gets collection of references to IP addresses defined in network interfaces.
3852	BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"`
3853	// LoadBalancingRules - READ-ONLY; Gets load balancing rules that use this backend address pool.
3854	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
3855	// OutboundNatRule - READ-ONLY; Gets outbound rules that use this backend address pool.
3856	OutboundNatRule *SubResource `json:"outboundNatRule,omitempty"`
3857	// ProvisioningState - Get provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
3858	ProvisioningState *string `json:"provisioningState,omitempty"`
3859}
3860
3861// MarshalJSON is the custom marshaler for BackendAddressPoolPropertiesFormat.
3862func (bappf BackendAddressPoolPropertiesFormat) MarshalJSON() ([]byte, error) {
3863	objectMap := make(map[string]interface{})
3864	if bappf.ProvisioningState != nil {
3865		objectMap["provisioningState"] = bappf.ProvisioningState
3866	}
3867	return json.Marshal(objectMap)
3868}
3869
3870// BGPCommunity contains bgp community information offered in Service Community resources.
3871type BGPCommunity struct {
3872	// ServiceSupportedRegion - The region which the service support. e.g. For O365, region is Global.
3873	ServiceSupportedRegion *string `json:"serviceSupportedRegion,omitempty"`
3874	// CommunityName - The name of the bgp community. e.g. Skype.
3875	CommunityName *string `json:"communityName,omitempty"`
3876	// CommunityValue - The value of the bgp community. For more information: https://docs.microsoft.com/en-us/azure/expressroute/expressroute-routing.
3877	CommunityValue *string `json:"communityValue,omitempty"`
3878	// CommunityPrefixes - The prefixes that the bgp community contains.
3879	CommunityPrefixes *[]string `json:"communityPrefixes,omitempty"`
3880	// IsAuthorizedToUse - Customer is authorized to use bgp community or not.
3881	IsAuthorizedToUse *bool `json:"isAuthorizedToUse,omitempty"`
3882	// ServiceGroup - The service group of the bgp community contains.
3883	ServiceGroup *string `json:"serviceGroup,omitempty"`
3884}
3885
3886// BgpPeerStatus BGP peer status details
3887type BgpPeerStatus struct {
3888	// LocalAddress - READ-ONLY; The virtual network gateway's local address
3889	LocalAddress *string `json:"localAddress,omitempty"`
3890	// Neighbor - READ-ONLY; The remote BGP peer
3891	Neighbor *string `json:"neighbor,omitempty"`
3892	// Asn - READ-ONLY; The autonomous system number of the remote BGP peer
3893	Asn *int32 `json:"asn,omitempty"`
3894	// State - READ-ONLY; The BGP peer state. Possible values include: 'BgpPeerStateUnknown', 'BgpPeerStateStopped', 'BgpPeerStateIdle', 'BgpPeerStateConnecting', 'BgpPeerStateConnected'
3895	State BgpPeerState `json:"state,omitempty"`
3896	// ConnectedDuration - READ-ONLY; For how long the peering has been up
3897	ConnectedDuration *string `json:"connectedDuration,omitempty"`
3898	// RoutesReceived - READ-ONLY; The number of routes learned from this peer
3899	RoutesReceived *int64 `json:"routesReceived,omitempty"`
3900	// MessagesSent - READ-ONLY; The number of BGP messages sent
3901	MessagesSent *int64 `json:"messagesSent,omitempty"`
3902	// MessagesReceived - READ-ONLY; The number of BGP messages received
3903	MessagesReceived *int64 `json:"messagesReceived,omitempty"`
3904}
3905
3906// BgpPeerStatusListResult response for list BGP peer status API service call
3907type BgpPeerStatusListResult struct {
3908	autorest.Response `json:"-"`
3909	// Value - List of BGP peers
3910	Value *[]BgpPeerStatus `json:"value,omitempty"`
3911}
3912
3913// BgpServiceCommunity service Community Properties.
3914type BgpServiceCommunity struct {
3915	*BgpServiceCommunityPropertiesFormat `json:"properties,omitempty"`
3916	// ID - Resource ID.
3917	ID *string `json:"id,omitempty"`
3918	// Name - READ-ONLY; Resource name.
3919	Name *string `json:"name,omitempty"`
3920	// Type - READ-ONLY; Resource type.
3921	Type *string `json:"type,omitempty"`
3922	// Location - Resource location.
3923	Location *string `json:"location,omitempty"`
3924	// Tags - Resource tags.
3925	Tags map[string]*string `json:"tags"`
3926}
3927
3928// MarshalJSON is the custom marshaler for BgpServiceCommunity.
3929func (bsc BgpServiceCommunity) MarshalJSON() ([]byte, error) {
3930	objectMap := make(map[string]interface{})
3931	if bsc.BgpServiceCommunityPropertiesFormat != nil {
3932		objectMap["properties"] = bsc.BgpServiceCommunityPropertiesFormat
3933	}
3934	if bsc.ID != nil {
3935		objectMap["id"] = bsc.ID
3936	}
3937	if bsc.Location != nil {
3938		objectMap["location"] = bsc.Location
3939	}
3940	if bsc.Tags != nil {
3941		objectMap["tags"] = bsc.Tags
3942	}
3943	return json.Marshal(objectMap)
3944}
3945
3946// UnmarshalJSON is the custom unmarshaler for BgpServiceCommunity struct.
3947func (bsc *BgpServiceCommunity) UnmarshalJSON(body []byte) error {
3948	var m map[string]*json.RawMessage
3949	err := json.Unmarshal(body, &m)
3950	if err != nil {
3951		return err
3952	}
3953	for k, v := range m {
3954		switch k {
3955		case "properties":
3956			if v != nil {
3957				var bgpServiceCommunityPropertiesFormat BgpServiceCommunityPropertiesFormat
3958				err = json.Unmarshal(*v, &bgpServiceCommunityPropertiesFormat)
3959				if err != nil {
3960					return err
3961				}
3962				bsc.BgpServiceCommunityPropertiesFormat = &bgpServiceCommunityPropertiesFormat
3963			}
3964		case "id":
3965			if v != nil {
3966				var ID string
3967				err = json.Unmarshal(*v, &ID)
3968				if err != nil {
3969					return err
3970				}
3971				bsc.ID = &ID
3972			}
3973		case "name":
3974			if v != nil {
3975				var name string
3976				err = json.Unmarshal(*v, &name)
3977				if err != nil {
3978					return err
3979				}
3980				bsc.Name = &name
3981			}
3982		case "type":
3983			if v != nil {
3984				var typeVar string
3985				err = json.Unmarshal(*v, &typeVar)
3986				if err != nil {
3987					return err
3988				}
3989				bsc.Type = &typeVar
3990			}
3991		case "location":
3992			if v != nil {
3993				var location string
3994				err = json.Unmarshal(*v, &location)
3995				if err != nil {
3996					return err
3997				}
3998				bsc.Location = &location
3999			}
4000		case "tags":
4001			if v != nil {
4002				var tags map[string]*string
4003				err = json.Unmarshal(*v, &tags)
4004				if err != nil {
4005					return err
4006				}
4007				bsc.Tags = tags
4008			}
4009		}
4010	}
4011
4012	return nil
4013}
4014
4015// BgpServiceCommunityListResult response for the ListServiceCommunity API service call.
4016type BgpServiceCommunityListResult struct {
4017	autorest.Response `json:"-"`
4018	// Value - A list of service community resources.
4019	Value *[]BgpServiceCommunity `json:"value,omitempty"`
4020	// NextLink - The URL to get the next set of results.
4021	NextLink *string `json:"nextLink,omitempty"`
4022}
4023
4024// BgpServiceCommunityListResultIterator provides access to a complete listing of BgpServiceCommunity
4025// values.
4026type BgpServiceCommunityListResultIterator struct {
4027	i    int
4028	page BgpServiceCommunityListResultPage
4029}
4030
4031// NextWithContext advances to the next value.  If there was an error making
4032// the request the iterator does not advance and the error is returned.
4033func (iter *BgpServiceCommunityListResultIterator) NextWithContext(ctx context.Context) (err error) {
4034	if tracing.IsEnabled() {
4035		ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultIterator.NextWithContext")
4036		defer func() {
4037			sc := -1
4038			if iter.Response().Response.Response != nil {
4039				sc = iter.Response().Response.Response.StatusCode
4040			}
4041			tracing.EndSpan(ctx, sc, err)
4042		}()
4043	}
4044	iter.i++
4045	if iter.i < len(iter.page.Values()) {
4046		return nil
4047	}
4048	err = iter.page.NextWithContext(ctx)
4049	if err != nil {
4050		iter.i--
4051		return err
4052	}
4053	iter.i = 0
4054	return nil
4055}
4056
4057// Next advances to the next value.  If there was an error making
4058// the request the iterator does not advance and the error is returned.
4059// Deprecated: Use NextWithContext() instead.
4060func (iter *BgpServiceCommunityListResultIterator) Next() error {
4061	return iter.NextWithContext(context.Background())
4062}
4063
4064// NotDone returns true if the enumeration should be started or is not yet complete.
4065func (iter BgpServiceCommunityListResultIterator) NotDone() bool {
4066	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4067}
4068
4069// Response returns the raw server response from the last page request.
4070func (iter BgpServiceCommunityListResultIterator) Response() BgpServiceCommunityListResult {
4071	return iter.page.Response()
4072}
4073
4074// Value returns the current value or a zero-initialized value if the
4075// iterator has advanced beyond the end of the collection.
4076func (iter BgpServiceCommunityListResultIterator) Value() BgpServiceCommunity {
4077	if !iter.page.NotDone() {
4078		return BgpServiceCommunity{}
4079	}
4080	return iter.page.Values()[iter.i]
4081}
4082
4083// Creates a new instance of the BgpServiceCommunityListResultIterator type.
4084func NewBgpServiceCommunityListResultIterator(page BgpServiceCommunityListResultPage) BgpServiceCommunityListResultIterator {
4085	return BgpServiceCommunityListResultIterator{page: page}
4086}
4087
4088// IsEmpty returns true if the ListResult contains no values.
4089func (bsclr BgpServiceCommunityListResult) IsEmpty() bool {
4090	return bsclr.Value == nil || len(*bsclr.Value) == 0
4091}
4092
4093// hasNextLink returns true if the NextLink is not empty.
4094func (bsclr BgpServiceCommunityListResult) hasNextLink() bool {
4095	return bsclr.NextLink != nil && len(*bsclr.NextLink) != 0
4096}
4097
4098// bgpServiceCommunityListResultPreparer prepares a request to retrieve the next set of results.
4099// It returns nil if no more results exist.
4100func (bsclr BgpServiceCommunityListResult) bgpServiceCommunityListResultPreparer(ctx context.Context) (*http.Request, error) {
4101	if !bsclr.hasNextLink() {
4102		return nil, nil
4103	}
4104	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4105		autorest.AsJSON(),
4106		autorest.AsGet(),
4107		autorest.WithBaseURL(to.String(bsclr.NextLink)))
4108}
4109
4110// BgpServiceCommunityListResultPage contains a page of BgpServiceCommunity values.
4111type BgpServiceCommunityListResultPage struct {
4112	fn    func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)
4113	bsclr BgpServiceCommunityListResult
4114}
4115
4116// NextWithContext advances to the next page of values.  If there was an error making
4117// the request the page does not advance and the error is returned.
4118func (page *BgpServiceCommunityListResultPage) NextWithContext(ctx context.Context) (err error) {
4119	if tracing.IsEnabled() {
4120		ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultPage.NextWithContext")
4121		defer func() {
4122			sc := -1
4123			if page.Response().Response.Response != nil {
4124				sc = page.Response().Response.Response.StatusCode
4125			}
4126			tracing.EndSpan(ctx, sc, err)
4127		}()
4128	}
4129	for {
4130		next, err := page.fn(ctx, page.bsclr)
4131		if err != nil {
4132			return err
4133		}
4134		page.bsclr = next
4135		if !next.hasNextLink() || !next.IsEmpty() {
4136			break
4137		}
4138	}
4139	return nil
4140}
4141
4142// Next advances to the next page of values.  If there was an error making
4143// the request the page does not advance and the error is returned.
4144// Deprecated: Use NextWithContext() instead.
4145func (page *BgpServiceCommunityListResultPage) Next() error {
4146	return page.NextWithContext(context.Background())
4147}
4148
4149// NotDone returns true if the page enumeration should be started or is not yet complete.
4150func (page BgpServiceCommunityListResultPage) NotDone() bool {
4151	return !page.bsclr.IsEmpty()
4152}
4153
4154// Response returns the raw server response from the last page request.
4155func (page BgpServiceCommunityListResultPage) Response() BgpServiceCommunityListResult {
4156	return page.bsclr
4157}
4158
4159// Values returns the slice of values for the current page or nil if there are no values.
4160func (page BgpServiceCommunityListResultPage) Values() []BgpServiceCommunity {
4161	if page.bsclr.IsEmpty() {
4162		return nil
4163	}
4164	return *page.bsclr.Value
4165}
4166
4167// Creates a new instance of the BgpServiceCommunityListResultPage type.
4168func NewBgpServiceCommunityListResultPage(cur BgpServiceCommunityListResult, getNextPage func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)) BgpServiceCommunityListResultPage {
4169	return BgpServiceCommunityListResultPage{
4170		fn:    getNextPage,
4171		bsclr: cur,
4172	}
4173}
4174
4175// BgpServiceCommunityPropertiesFormat properties of Service Community.
4176type BgpServiceCommunityPropertiesFormat struct {
4177	// ServiceName - The name of the bgp community. e.g. Skype.
4178	ServiceName *string `json:"serviceName,omitempty"`
4179	// BgpCommunities - Get a list of bgp communities.
4180	BgpCommunities *[]BGPCommunity `json:"bgpCommunities,omitempty"`
4181}
4182
4183// BgpSettings BGP settings details
4184type BgpSettings struct {
4185	// Asn - The BGP speaker's ASN.
4186	Asn *int64 `json:"asn,omitempty"`
4187	// BgpPeeringAddress - The BGP peering address and BGP identifier of this BGP speaker.
4188	BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"`
4189	// PeerWeight - The weight added to routes learned from this BGP speaker.
4190	PeerWeight *int32 `json:"peerWeight,omitempty"`
4191}
4192
4193// ConfigurationDiagnosticParameters parameters to get network configuration diagnostic.
4194type ConfigurationDiagnosticParameters struct {
4195	// TargetResourceID - The ID of the target resource to perform network configuration diagnostic. Valid options are VM, NetworkInterface, VMSS/NetworkInterface and Application Gateway.
4196	TargetResourceID *string `json:"targetResourceId,omitempty"`
4197	// Queries - List of traffic queries.
4198	Queries *[]TrafficQuery `json:"queries,omitempty"`
4199}
4200
4201// ConfigurationDiagnosticResponse results of network configuration diagnostic on the target resource.
4202type ConfigurationDiagnosticResponse struct {
4203	autorest.Response `json:"-"`
4204	// Results - READ-ONLY; List of network configuration diagnostic results.
4205	Results *[]ConfigurationDiagnosticResult `json:"results,omitempty"`
4206}
4207
4208// ConfigurationDiagnosticResult network configuration diagnostic result corresponded to provided traffic
4209// query.
4210type ConfigurationDiagnosticResult struct {
4211	TrafficQuery               *TrafficQuery        `json:"trafficQuery,omitempty"`
4212	NetworkSecurityGroupResult *SecurityGroupResult `json:"networkSecurityGroupResult,omitempty"`
4213}
4214
4215// ConnectionMonitor parameters that define the operation to create a connection monitor.
4216type ConnectionMonitor struct {
4217	// Location - Connection monitor location.
4218	Location *string `json:"location,omitempty"`
4219	// Tags - Connection monitor tags.
4220	Tags                         map[string]*string `json:"tags"`
4221	*ConnectionMonitorParameters `json:"properties,omitempty"`
4222}
4223
4224// MarshalJSON is the custom marshaler for ConnectionMonitor.
4225func (cm ConnectionMonitor) MarshalJSON() ([]byte, error) {
4226	objectMap := make(map[string]interface{})
4227	if cm.Location != nil {
4228		objectMap["location"] = cm.Location
4229	}
4230	if cm.Tags != nil {
4231		objectMap["tags"] = cm.Tags
4232	}
4233	if cm.ConnectionMonitorParameters != nil {
4234		objectMap["properties"] = cm.ConnectionMonitorParameters
4235	}
4236	return json.Marshal(objectMap)
4237}
4238
4239// UnmarshalJSON is the custom unmarshaler for ConnectionMonitor struct.
4240func (cm *ConnectionMonitor) UnmarshalJSON(body []byte) error {
4241	var m map[string]*json.RawMessage
4242	err := json.Unmarshal(body, &m)
4243	if err != nil {
4244		return err
4245	}
4246	for k, v := range m {
4247		switch k {
4248		case "location":
4249			if v != nil {
4250				var location string
4251				err = json.Unmarshal(*v, &location)
4252				if err != nil {
4253					return err
4254				}
4255				cm.Location = &location
4256			}
4257		case "tags":
4258			if v != nil {
4259				var tags map[string]*string
4260				err = json.Unmarshal(*v, &tags)
4261				if err != nil {
4262					return err
4263				}
4264				cm.Tags = tags
4265			}
4266		case "properties":
4267			if v != nil {
4268				var connectionMonitorParameters ConnectionMonitorParameters
4269				err = json.Unmarshal(*v, &connectionMonitorParameters)
4270				if err != nil {
4271					return err
4272				}
4273				cm.ConnectionMonitorParameters = &connectionMonitorParameters
4274			}
4275		}
4276	}
4277
4278	return nil
4279}
4280
4281// ConnectionMonitorDestination describes the destination of connection monitor.
4282type ConnectionMonitorDestination struct {
4283	// ResourceID - The ID of the resource used as the destination by connection monitor.
4284	ResourceID *string `json:"resourceId,omitempty"`
4285	// Address - Address of the connection monitor destination (IP or domain name).
4286	Address *string `json:"address,omitempty"`
4287	// Port - The destination port used by connection monitor.
4288	Port *int32 `json:"port,omitempty"`
4289}
4290
4291// ConnectionMonitorListResult list of connection monitors.
4292type ConnectionMonitorListResult struct {
4293	autorest.Response `json:"-"`
4294	// Value - Information about connection monitors.
4295	Value *[]ConnectionMonitorResult `json:"value,omitempty"`
4296}
4297
4298// ConnectionMonitorParameters parameters that define the operation to create a connection monitor.
4299type ConnectionMonitorParameters struct {
4300	Source      *ConnectionMonitorSource      `json:"source,omitempty"`
4301	Destination *ConnectionMonitorDestination `json:"destination,omitempty"`
4302	// AutoStart - Determines if the connection monitor will start automatically once created.
4303	AutoStart *bool `json:"autoStart,omitempty"`
4304	// MonitoringIntervalInSeconds - Monitoring interval in seconds.
4305	MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"`
4306}
4307
4308// ConnectionMonitorQueryResult list of connection states snapshots.
4309type ConnectionMonitorQueryResult struct {
4310	autorest.Response `json:"-"`
4311	// SourceStatus - Status of connection monitor source. Possible values include: 'Uknown', 'Active', 'Inactive'
4312	SourceStatus ConnectionMonitorSourceStatus `json:"sourceStatus,omitempty"`
4313	// States - Information about connection states.
4314	States *[]ConnectionStateSnapshot `json:"states,omitempty"`
4315}
4316
4317// ConnectionMonitorResult information about the connection monitor.
4318type ConnectionMonitorResult struct {
4319	autorest.Response `json:"-"`
4320	// Name - READ-ONLY; Name of the connection monitor.
4321	Name *string `json:"name,omitempty"`
4322	// ID - READ-ONLY; ID of the connection monitor.
4323	ID   *string `json:"id,omitempty"`
4324	Etag *string `json:"etag,omitempty"`
4325	// Type - READ-ONLY; Connection monitor type.
4326	Type *string `json:"type,omitempty"`
4327	// Location - Connection monitor location.
4328	Location *string `json:"location,omitempty"`
4329	// Tags - Connection monitor tags.
4330	Tags                               map[string]*string `json:"tags"`
4331	*ConnectionMonitorResultProperties `json:"properties,omitempty"`
4332}
4333
4334// MarshalJSON is the custom marshaler for ConnectionMonitorResult.
4335func (cmr ConnectionMonitorResult) MarshalJSON() ([]byte, error) {
4336	objectMap := make(map[string]interface{})
4337	if cmr.Etag != nil {
4338		objectMap["etag"] = cmr.Etag
4339	}
4340	if cmr.Location != nil {
4341		objectMap["location"] = cmr.Location
4342	}
4343	if cmr.Tags != nil {
4344		objectMap["tags"] = cmr.Tags
4345	}
4346	if cmr.ConnectionMonitorResultProperties != nil {
4347		objectMap["properties"] = cmr.ConnectionMonitorResultProperties
4348	}
4349	return json.Marshal(objectMap)
4350}
4351
4352// UnmarshalJSON is the custom unmarshaler for ConnectionMonitorResult struct.
4353func (cmr *ConnectionMonitorResult) UnmarshalJSON(body []byte) error {
4354	var m map[string]*json.RawMessage
4355	err := json.Unmarshal(body, &m)
4356	if err != nil {
4357		return err
4358	}
4359	for k, v := range m {
4360		switch k {
4361		case "name":
4362			if v != nil {
4363				var name string
4364				err = json.Unmarshal(*v, &name)
4365				if err != nil {
4366					return err
4367				}
4368				cmr.Name = &name
4369			}
4370		case "id":
4371			if v != nil {
4372				var ID string
4373				err = json.Unmarshal(*v, &ID)
4374				if err != nil {
4375					return err
4376				}
4377				cmr.ID = &ID
4378			}
4379		case "etag":
4380			if v != nil {
4381				var etag string
4382				err = json.Unmarshal(*v, &etag)
4383				if err != nil {
4384					return err
4385				}
4386				cmr.Etag = &etag
4387			}
4388		case "type":
4389			if v != nil {
4390				var typeVar string
4391				err = json.Unmarshal(*v, &typeVar)
4392				if err != nil {
4393					return err
4394				}
4395				cmr.Type = &typeVar
4396			}
4397		case "location":
4398			if v != nil {
4399				var location string
4400				err = json.Unmarshal(*v, &location)
4401				if err != nil {
4402					return err
4403				}
4404				cmr.Location = &location
4405			}
4406		case "tags":
4407			if v != nil {
4408				var tags map[string]*string
4409				err = json.Unmarshal(*v, &tags)
4410				if err != nil {
4411					return err
4412				}
4413				cmr.Tags = tags
4414			}
4415		case "properties":
4416			if v != nil {
4417				var connectionMonitorResultProperties ConnectionMonitorResultProperties
4418				err = json.Unmarshal(*v, &connectionMonitorResultProperties)
4419				if err != nil {
4420					return err
4421				}
4422				cmr.ConnectionMonitorResultProperties = &connectionMonitorResultProperties
4423			}
4424		}
4425	}
4426
4427	return nil
4428}
4429
4430// ConnectionMonitorResultProperties describes the properties of a connection monitor.
4431type ConnectionMonitorResultProperties struct {
4432	// ProvisioningState - The provisioning state of the connection monitor. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
4433	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
4434	// StartTime - The date and time when the connection monitor was started.
4435	StartTime *date.Time `json:"startTime,omitempty"`
4436	// MonitoringStatus - The monitoring status of the connection monitor.
4437	MonitoringStatus *string                       `json:"monitoringStatus,omitempty"`
4438	Source           *ConnectionMonitorSource      `json:"source,omitempty"`
4439	Destination      *ConnectionMonitorDestination `json:"destination,omitempty"`
4440	// AutoStart - Determines if the connection monitor will start automatically once created.
4441	AutoStart *bool `json:"autoStart,omitempty"`
4442	// MonitoringIntervalInSeconds - Monitoring interval in seconds.
4443	MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"`
4444}
4445
4446// ConnectionMonitorsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
4447// long-running operation.
4448type ConnectionMonitorsCreateOrUpdateFuture struct {
4449	azure.FutureAPI
4450	// Result returns the result of the asynchronous operation.
4451	// If the operation has not completed it will return an error.
4452	Result func(ConnectionMonitorsClient) (ConnectionMonitorResult, error)
4453}
4454
4455// ConnectionMonitorsDeleteFuture an abstraction for monitoring and retrieving the results of a
4456// long-running operation.
4457type ConnectionMonitorsDeleteFuture struct {
4458	azure.FutureAPI
4459	// Result returns the result of the asynchronous operation.
4460	// If the operation has not completed it will return an error.
4461	Result func(ConnectionMonitorsClient) (autorest.Response, error)
4462}
4463
4464// ConnectionMonitorSource describes the source of connection monitor.
4465type ConnectionMonitorSource struct {
4466	// ResourceID - The ID of the resource used as the source by connection monitor.
4467	ResourceID *string `json:"resourceId,omitempty"`
4468	// Port - The source port used by connection monitor.
4469	Port *int32 `json:"port,omitempty"`
4470}
4471
4472// ConnectionMonitorsQueryFuture an abstraction for monitoring and retrieving the results of a long-running
4473// operation.
4474type ConnectionMonitorsQueryFuture struct {
4475	azure.FutureAPI
4476	// Result returns the result of the asynchronous operation.
4477	// If the operation has not completed it will return an error.
4478	Result func(ConnectionMonitorsClient) (ConnectionMonitorQueryResult, error)
4479}
4480
4481// ConnectionMonitorsStartFuture an abstraction for monitoring and retrieving the results of a long-running
4482// operation.
4483type ConnectionMonitorsStartFuture struct {
4484	azure.FutureAPI
4485	// Result returns the result of the asynchronous operation.
4486	// If the operation has not completed it will return an error.
4487	Result func(ConnectionMonitorsClient) (autorest.Response, error)
4488}
4489
4490// ConnectionMonitorsStopFuture an abstraction for monitoring and retrieving the results of a long-running
4491// operation.
4492type ConnectionMonitorsStopFuture struct {
4493	azure.FutureAPI
4494	// Result returns the result of the asynchronous operation.
4495	// If the operation has not completed it will return an error.
4496	Result func(ConnectionMonitorsClient) (autorest.Response, error)
4497}
4498
4499// ConnectionResetSharedKey the virtual network connection reset shared key
4500type ConnectionResetSharedKey struct {
4501	autorest.Response `json:"-"`
4502	// KeyLength - The virtual network connection reset shared key length, should between 1 and 128.
4503	KeyLength *int32 `json:"keyLength,omitempty"`
4504}
4505
4506// ConnectionSharedKey response for GetConnectionSharedKey API service call
4507type ConnectionSharedKey struct {
4508	autorest.Response `json:"-"`
4509	// Value - The virtual network connection shared key value.
4510	Value *string `json:"value,omitempty"`
4511	// ID - Resource ID.
4512	ID *string `json:"id,omitempty"`
4513}
4514
4515// ConnectionStateSnapshot connection state snapshot.
4516type ConnectionStateSnapshot struct {
4517	// ConnectionState - The connection state. Possible values include: 'ConnectionStateReachable', 'ConnectionStateUnreachable', 'ConnectionStateUnknown'
4518	ConnectionState ConnectionState `json:"connectionState,omitempty"`
4519	// StartTime - The start time of the connection snapshot.
4520	StartTime *date.Time `json:"startTime,omitempty"`
4521	// EndTime - The end time of the connection snapshot.
4522	EndTime *date.Time `json:"endTime,omitempty"`
4523	// EvaluationState - Connectivity analysis evaluation state. Possible values include: 'NotStarted', 'InProgress', 'Completed'
4524	EvaluationState EvaluationState `json:"evaluationState,omitempty"`
4525	// AvgLatencyInMs - Average latency in ms.
4526	AvgLatencyInMs *int32 `json:"avgLatencyInMs,omitempty"`
4527	// MinLatencyInMs - Minimum latency in ms.
4528	MinLatencyInMs *int32 `json:"minLatencyInMs,omitempty"`
4529	// MaxLatencyInMs - Maximum latency in ms.
4530	MaxLatencyInMs *int32 `json:"maxLatencyInMs,omitempty"`
4531	// ProbesSent - The number of sent probes.
4532	ProbesSent *int32 `json:"probesSent,omitempty"`
4533	// ProbesFailed - The number of failed probes.
4534	ProbesFailed *int32 `json:"probesFailed,omitempty"`
4535	// Hops - READ-ONLY; List of hops between the source and the destination.
4536	Hops *[]ConnectivityHop `json:"hops,omitempty"`
4537}
4538
4539// MarshalJSON is the custom marshaler for ConnectionStateSnapshot.
4540func (CSS ConnectionStateSnapshot) MarshalJSON() ([]byte, error) {
4541	objectMap := make(map[string]interface{})
4542	if CSS.ConnectionState != "" {
4543		objectMap["connectionState"] = CSS.ConnectionState
4544	}
4545	if CSS.StartTime != nil {
4546		objectMap["startTime"] = CSS.StartTime
4547	}
4548	if CSS.EndTime != nil {
4549		objectMap["endTime"] = CSS.EndTime
4550	}
4551	if CSS.EvaluationState != "" {
4552		objectMap["evaluationState"] = CSS.EvaluationState
4553	}
4554	if CSS.AvgLatencyInMs != nil {
4555		objectMap["avgLatencyInMs"] = CSS.AvgLatencyInMs
4556	}
4557	if CSS.MinLatencyInMs != nil {
4558		objectMap["minLatencyInMs"] = CSS.MinLatencyInMs
4559	}
4560	if CSS.MaxLatencyInMs != nil {
4561		objectMap["maxLatencyInMs"] = CSS.MaxLatencyInMs
4562	}
4563	if CSS.ProbesSent != nil {
4564		objectMap["probesSent"] = CSS.ProbesSent
4565	}
4566	if CSS.ProbesFailed != nil {
4567		objectMap["probesFailed"] = CSS.ProbesFailed
4568	}
4569	return json.Marshal(objectMap)
4570}
4571
4572// ConnectivityDestination parameters that define destination of connection.
4573type ConnectivityDestination struct {
4574	// ResourceID - The ID of the resource to which a connection attempt will be made.
4575	ResourceID *string `json:"resourceId,omitempty"`
4576	// Address - The IP address or URI the resource to which a connection attempt will be made.
4577	Address *string `json:"address,omitempty"`
4578	// Port - Port on which check connectivity will be performed.
4579	Port *int32 `json:"port,omitempty"`
4580}
4581
4582// ConnectivityHop information about a hop between the source and the destination.
4583type ConnectivityHop struct {
4584	// Type - READ-ONLY; The type of the hop.
4585	Type *string `json:"type,omitempty"`
4586	// ID - READ-ONLY; The ID of the hop.
4587	ID *string `json:"id,omitempty"`
4588	// Address - READ-ONLY; The IP address of the hop.
4589	Address *string `json:"address,omitempty"`
4590	// ResourceID - READ-ONLY; The ID of the resource corresponding to this hop.
4591	ResourceID *string `json:"resourceId,omitempty"`
4592	// NextHopIds - READ-ONLY; List of next hop identifiers.
4593	NextHopIds *[]string `json:"nextHopIds,omitempty"`
4594	// Issues - READ-ONLY; List of issues.
4595	Issues *[]ConnectivityIssue `json:"issues,omitempty"`
4596}
4597
4598// ConnectivityInformation information on the connectivity status.
4599type ConnectivityInformation struct {
4600	autorest.Response `json:"-"`
4601	// Hops - READ-ONLY; List of hops between the source and the destination.
4602	Hops *[]ConnectivityHop `json:"hops,omitempty"`
4603	// ConnectionStatus - READ-ONLY; The connection status. Possible values include: 'ConnectionStatusUnknown', 'ConnectionStatusConnected', 'ConnectionStatusDisconnected', 'ConnectionStatusDegraded'
4604	ConnectionStatus ConnectionStatus `json:"connectionStatus,omitempty"`
4605	// AvgLatencyInMs - READ-ONLY; Average latency in milliseconds.
4606	AvgLatencyInMs *int32 `json:"avgLatencyInMs,omitempty"`
4607	// MinLatencyInMs - READ-ONLY; Minimum latency in milliseconds.
4608	MinLatencyInMs *int32 `json:"minLatencyInMs,omitempty"`
4609	// MaxLatencyInMs - READ-ONLY; Maximum latency in milliseconds.
4610	MaxLatencyInMs *int32 `json:"maxLatencyInMs,omitempty"`
4611	// ProbesSent - READ-ONLY; Total number of probes sent.
4612	ProbesSent *int32 `json:"probesSent,omitempty"`
4613	// ProbesFailed - READ-ONLY; Number of failed probes.
4614	ProbesFailed *int32 `json:"probesFailed,omitempty"`
4615}
4616
4617// ConnectivityIssue information about an issue encountered in the process of checking for connectivity.
4618type ConnectivityIssue struct {
4619	// Origin - READ-ONLY; The origin of the issue. Possible values include: 'OriginLocal', 'OriginInbound', 'OriginOutbound'
4620	Origin Origin `json:"origin,omitempty"`
4621	// Severity - READ-ONLY; The severity of the issue. Possible values include: 'SeverityError', 'SeverityWarning'
4622	Severity Severity `json:"severity,omitempty"`
4623	// Type - READ-ONLY; The type of issue. Possible values include: 'IssueTypeUnknown', 'IssueTypeAgentStopped', 'IssueTypeGuestFirewall', 'IssueTypeDNSResolution', 'IssueTypeSocketBind', 'IssueTypeNetworkSecurityRule', 'IssueTypeUserDefinedRoute', 'IssueTypePortThrottled', 'IssueTypePlatform'
4624	Type IssueType `json:"type,omitempty"`
4625	// Context - READ-ONLY; Provides additional context on the issue.
4626	Context *[]map[string]*string `json:"context,omitempty"`
4627}
4628
4629// ConnectivityParameters parameters that determine how the connectivity check will be performed.
4630type ConnectivityParameters struct {
4631	Source      *ConnectivitySource      `json:"source,omitempty"`
4632	Destination *ConnectivityDestination `json:"destination,omitempty"`
4633	// Protocol - Network protocol. Possible values include: 'ProtocolTCP', 'ProtocolHTTP', 'ProtocolHTTPS', 'ProtocolIcmp'
4634	Protocol              Protocol               `json:"protocol,omitempty"`
4635	ProtocolConfiguration *ProtocolConfiguration `json:"protocolConfiguration,omitempty"`
4636}
4637
4638// ConnectivitySource parameters that define the source of the connection.
4639type ConnectivitySource struct {
4640	// ResourceID - The ID of the resource from which a connectivity check will be initiated.
4641	ResourceID *string `json:"resourceId,omitempty"`
4642	// Port - The source port from which a connectivity check will be performed.
4643	Port *int32 `json:"port,omitempty"`
4644}
4645
4646// DdosProtectionPlan a DDoS protection plan in a resource group.
4647type DdosProtectionPlan struct {
4648	autorest.Response `json:"-"`
4649	// ID - READ-ONLY; Resource ID.
4650	ID *string `json:"id,omitempty"`
4651	// Name - READ-ONLY; Resource name.
4652	Name *string `json:"name,omitempty"`
4653	// Type - READ-ONLY; Resource type.
4654	Type *string `json:"type,omitempty"`
4655	// Location - Resource location.
4656	Location *string `json:"location,omitempty"`
4657	// Tags - Resource tags.
4658	Tags map[string]*string `json:"tags"`
4659	// DdosProtectionPlanPropertiesFormat - Properties of the DDoS protection plan.
4660	*DdosProtectionPlanPropertiesFormat `json:"properties,omitempty"`
4661	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
4662	Etag *string `json:"etag,omitempty"`
4663}
4664
4665// MarshalJSON is the custom marshaler for DdosProtectionPlan.
4666func (dpp DdosProtectionPlan) MarshalJSON() ([]byte, error) {
4667	objectMap := make(map[string]interface{})
4668	if dpp.Location != nil {
4669		objectMap["location"] = dpp.Location
4670	}
4671	if dpp.Tags != nil {
4672		objectMap["tags"] = dpp.Tags
4673	}
4674	if dpp.DdosProtectionPlanPropertiesFormat != nil {
4675		objectMap["properties"] = dpp.DdosProtectionPlanPropertiesFormat
4676	}
4677	return json.Marshal(objectMap)
4678}
4679
4680// UnmarshalJSON is the custom unmarshaler for DdosProtectionPlan struct.
4681func (dpp *DdosProtectionPlan) UnmarshalJSON(body []byte) error {
4682	var m map[string]*json.RawMessage
4683	err := json.Unmarshal(body, &m)
4684	if err != nil {
4685		return err
4686	}
4687	for k, v := range m {
4688		switch k {
4689		case "id":
4690			if v != nil {
4691				var ID string
4692				err = json.Unmarshal(*v, &ID)
4693				if err != nil {
4694					return err
4695				}
4696				dpp.ID = &ID
4697			}
4698		case "name":
4699			if v != nil {
4700				var name string
4701				err = json.Unmarshal(*v, &name)
4702				if err != nil {
4703					return err
4704				}
4705				dpp.Name = &name
4706			}
4707		case "type":
4708			if v != nil {
4709				var typeVar string
4710				err = json.Unmarshal(*v, &typeVar)
4711				if err != nil {
4712					return err
4713				}
4714				dpp.Type = &typeVar
4715			}
4716		case "location":
4717			if v != nil {
4718				var location string
4719				err = json.Unmarshal(*v, &location)
4720				if err != nil {
4721					return err
4722				}
4723				dpp.Location = &location
4724			}
4725		case "tags":
4726			if v != nil {
4727				var tags map[string]*string
4728				err = json.Unmarshal(*v, &tags)
4729				if err != nil {
4730					return err
4731				}
4732				dpp.Tags = tags
4733			}
4734		case "properties":
4735			if v != nil {
4736				var ddosProtectionPlanPropertiesFormat DdosProtectionPlanPropertiesFormat
4737				err = json.Unmarshal(*v, &ddosProtectionPlanPropertiesFormat)
4738				if err != nil {
4739					return err
4740				}
4741				dpp.DdosProtectionPlanPropertiesFormat = &ddosProtectionPlanPropertiesFormat
4742			}
4743		case "etag":
4744			if v != nil {
4745				var etag string
4746				err = json.Unmarshal(*v, &etag)
4747				if err != nil {
4748					return err
4749				}
4750				dpp.Etag = &etag
4751			}
4752		}
4753	}
4754
4755	return nil
4756}
4757
4758// DdosProtectionPlanListResult a list of DDoS protection plans.
4759type DdosProtectionPlanListResult struct {
4760	autorest.Response `json:"-"`
4761	// Value - A list of DDoS protection plans.
4762	Value *[]DdosProtectionPlan `json:"value,omitempty"`
4763	// NextLink - READ-ONLY; The URL to get the next set of results.
4764	NextLink *string `json:"nextLink,omitempty"`
4765}
4766
4767// MarshalJSON is the custom marshaler for DdosProtectionPlanListResult.
4768func (dpplr DdosProtectionPlanListResult) MarshalJSON() ([]byte, error) {
4769	objectMap := make(map[string]interface{})
4770	if dpplr.Value != nil {
4771		objectMap["value"] = dpplr.Value
4772	}
4773	return json.Marshal(objectMap)
4774}
4775
4776// DdosProtectionPlanListResultIterator provides access to a complete listing of DdosProtectionPlan values.
4777type DdosProtectionPlanListResultIterator struct {
4778	i    int
4779	page DdosProtectionPlanListResultPage
4780}
4781
4782// NextWithContext advances to the next value.  If there was an error making
4783// the request the iterator does not advance and the error is returned.
4784func (iter *DdosProtectionPlanListResultIterator) NextWithContext(ctx context.Context) (err error) {
4785	if tracing.IsEnabled() {
4786		ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlanListResultIterator.NextWithContext")
4787		defer func() {
4788			sc := -1
4789			if iter.Response().Response.Response != nil {
4790				sc = iter.Response().Response.Response.StatusCode
4791			}
4792			tracing.EndSpan(ctx, sc, err)
4793		}()
4794	}
4795	iter.i++
4796	if iter.i < len(iter.page.Values()) {
4797		return nil
4798	}
4799	err = iter.page.NextWithContext(ctx)
4800	if err != nil {
4801		iter.i--
4802		return err
4803	}
4804	iter.i = 0
4805	return nil
4806}
4807
4808// Next advances to the next value.  If there was an error making
4809// the request the iterator does not advance and the error is returned.
4810// Deprecated: Use NextWithContext() instead.
4811func (iter *DdosProtectionPlanListResultIterator) Next() error {
4812	return iter.NextWithContext(context.Background())
4813}
4814
4815// NotDone returns true if the enumeration should be started or is not yet complete.
4816func (iter DdosProtectionPlanListResultIterator) NotDone() bool {
4817	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4818}
4819
4820// Response returns the raw server response from the last page request.
4821func (iter DdosProtectionPlanListResultIterator) Response() DdosProtectionPlanListResult {
4822	return iter.page.Response()
4823}
4824
4825// Value returns the current value or a zero-initialized value if the
4826// iterator has advanced beyond the end of the collection.
4827func (iter DdosProtectionPlanListResultIterator) Value() DdosProtectionPlan {
4828	if !iter.page.NotDone() {
4829		return DdosProtectionPlan{}
4830	}
4831	return iter.page.Values()[iter.i]
4832}
4833
4834// Creates a new instance of the DdosProtectionPlanListResultIterator type.
4835func NewDdosProtectionPlanListResultIterator(page DdosProtectionPlanListResultPage) DdosProtectionPlanListResultIterator {
4836	return DdosProtectionPlanListResultIterator{page: page}
4837}
4838
4839// IsEmpty returns true if the ListResult contains no values.
4840func (dpplr DdosProtectionPlanListResult) IsEmpty() bool {
4841	return dpplr.Value == nil || len(*dpplr.Value) == 0
4842}
4843
4844// hasNextLink returns true if the NextLink is not empty.
4845func (dpplr DdosProtectionPlanListResult) hasNextLink() bool {
4846	return dpplr.NextLink != nil && len(*dpplr.NextLink) != 0
4847}
4848
4849// ddosProtectionPlanListResultPreparer prepares a request to retrieve the next set of results.
4850// It returns nil if no more results exist.
4851func (dpplr DdosProtectionPlanListResult) ddosProtectionPlanListResultPreparer(ctx context.Context) (*http.Request, error) {
4852	if !dpplr.hasNextLink() {
4853		return nil, nil
4854	}
4855	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4856		autorest.AsJSON(),
4857		autorest.AsGet(),
4858		autorest.WithBaseURL(to.String(dpplr.NextLink)))
4859}
4860
4861// DdosProtectionPlanListResultPage contains a page of DdosProtectionPlan values.
4862type DdosProtectionPlanListResultPage struct {
4863	fn    func(context.Context, DdosProtectionPlanListResult) (DdosProtectionPlanListResult, error)
4864	dpplr DdosProtectionPlanListResult
4865}
4866
4867// NextWithContext advances to the next page of values.  If there was an error making
4868// the request the page does not advance and the error is returned.
4869func (page *DdosProtectionPlanListResultPage) NextWithContext(ctx context.Context) (err error) {
4870	if tracing.IsEnabled() {
4871		ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlanListResultPage.NextWithContext")
4872		defer func() {
4873			sc := -1
4874			if page.Response().Response.Response != nil {
4875				sc = page.Response().Response.Response.StatusCode
4876			}
4877			tracing.EndSpan(ctx, sc, err)
4878		}()
4879	}
4880	for {
4881		next, err := page.fn(ctx, page.dpplr)
4882		if err != nil {
4883			return err
4884		}
4885		page.dpplr = next
4886		if !next.hasNextLink() || !next.IsEmpty() {
4887			break
4888		}
4889	}
4890	return nil
4891}
4892
4893// Next advances to the next page of values.  If there was an error making
4894// the request the page does not advance and the error is returned.
4895// Deprecated: Use NextWithContext() instead.
4896func (page *DdosProtectionPlanListResultPage) Next() error {
4897	return page.NextWithContext(context.Background())
4898}
4899
4900// NotDone returns true if the page enumeration should be started or is not yet complete.
4901func (page DdosProtectionPlanListResultPage) NotDone() bool {
4902	return !page.dpplr.IsEmpty()
4903}
4904
4905// Response returns the raw server response from the last page request.
4906func (page DdosProtectionPlanListResultPage) Response() DdosProtectionPlanListResult {
4907	return page.dpplr
4908}
4909
4910// Values returns the slice of values for the current page or nil if there are no values.
4911func (page DdosProtectionPlanListResultPage) Values() []DdosProtectionPlan {
4912	if page.dpplr.IsEmpty() {
4913		return nil
4914	}
4915	return *page.dpplr.Value
4916}
4917
4918// Creates a new instance of the DdosProtectionPlanListResultPage type.
4919func NewDdosProtectionPlanListResultPage(cur DdosProtectionPlanListResult, getNextPage func(context.Context, DdosProtectionPlanListResult) (DdosProtectionPlanListResult, error)) DdosProtectionPlanListResultPage {
4920	return DdosProtectionPlanListResultPage{
4921		fn:    getNextPage,
4922		dpplr: cur,
4923	}
4924}
4925
4926// DdosProtectionPlanPropertiesFormat dDoS protection plan properties.
4927type DdosProtectionPlanPropertiesFormat struct {
4928	// 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.
4929	ResourceGUID *string `json:"resourceGuid,omitempty"`
4930	// ProvisioningState - READ-ONLY; The provisioning state of the DDoS protection plan resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
4931	ProvisioningState *string `json:"provisioningState,omitempty"`
4932	// VirtualNetworks - READ-ONLY; The list of virtual networks associated with the DDoS protection plan resource. This list is read-only.
4933	VirtualNetworks *[]SubResource `json:"virtualNetworks,omitempty"`
4934}
4935
4936// DdosProtectionPlansCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
4937// long-running operation.
4938type DdosProtectionPlansCreateOrUpdateFuture struct {
4939	azure.FutureAPI
4940	// Result returns the result of the asynchronous operation.
4941	// If the operation has not completed it will return an error.
4942	Result func(DdosProtectionPlansClient) (DdosProtectionPlan, error)
4943}
4944
4945// DdosProtectionPlansDeleteFuture an abstraction for monitoring and retrieving the results of a
4946// long-running operation.
4947type DdosProtectionPlansDeleteFuture struct {
4948	azure.FutureAPI
4949	// Result returns the result of the asynchronous operation.
4950	// If the operation has not completed it will return an error.
4951	Result func(DdosProtectionPlansClient) (autorest.Response, error)
4952}
4953
4954// DeviceProperties list of properties of the device.
4955type DeviceProperties struct {
4956	// DeviceVendor - Name of the device Vendor.
4957	DeviceVendor *string `json:"deviceVendor,omitempty"`
4958	// DeviceModel - Model of the device.
4959	DeviceModel *string `json:"deviceModel,omitempty"`
4960	// LinkSpeedInMbps - Link speed.
4961	LinkSpeedInMbps *int32 `json:"linkSpeedInMbps,omitempty"`
4962}
4963
4964// DhcpOptions dhcpOptions contains an array of DNS servers available to VMs deployed in the virtual
4965// network. Standard DHCP option for a subnet overrides VNET DHCP options.
4966type DhcpOptions struct {
4967	// DNSServers - The list of DNS servers IP addresses.
4968	DNSServers *[]string `json:"dnsServers,omitempty"`
4969}
4970
4971// Dimension dimension of the metric.
4972type Dimension struct {
4973	// Name - The name of the dimension.
4974	Name *string `json:"name,omitempty"`
4975	// DisplayName - The display name of the dimension.
4976	DisplayName *string `json:"displayName,omitempty"`
4977	// InternalName - The internal name of the dimension.
4978	InternalName *string `json:"internalName,omitempty"`
4979}
4980
4981// DNSNameAvailabilityResult response for the CheckDnsNameAvailability API service call.
4982type DNSNameAvailabilityResult struct {
4983	autorest.Response `json:"-"`
4984	// Available - Domain availability (True/False).
4985	Available *bool `json:"available,omitempty"`
4986}
4987
4988// EffectiveNetworkSecurityGroup effective network security group.
4989type EffectiveNetworkSecurityGroup struct {
4990	// NetworkSecurityGroup - The ID of network security group that is applied.
4991	NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"`
4992	// Association - Associated resources.
4993	Association *EffectiveNetworkSecurityGroupAssociation `json:"association,omitempty"`
4994	// EffectiveSecurityRules - A collection of effective security rules.
4995	EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"`
4996	// TagMap - Mapping of tags to list of IP Addresses included within the tag.
4997	TagMap map[string][]string `json:"tagMap"`
4998}
4999
5000// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroup.
5001func (ensg EffectiveNetworkSecurityGroup) MarshalJSON() ([]byte, error) {
5002	objectMap := make(map[string]interface{})
5003	if ensg.NetworkSecurityGroup != nil {
5004		objectMap["networkSecurityGroup"] = ensg.NetworkSecurityGroup
5005	}
5006	if ensg.Association != nil {
5007		objectMap["association"] = ensg.Association
5008	}
5009	if ensg.EffectiveSecurityRules != nil {
5010		objectMap["effectiveSecurityRules"] = ensg.EffectiveSecurityRules
5011	}
5012	if ensg.TagMap != nil {
5013		objectMap["tagMap"] = ensg.TagMap
5014	}
5015	return json.Marshal(objectMap)
5016}
5017
5018// EffectiveNetworkSecurityGroupAssociation the effective network security group association.
5019type EffectiveNetworkSecurityGroupAssociation struct {
5020	// Subnet - The ID of the subnet if assigned.
5021	Subnet *SubResource `json:"subnet,omitempty"`
5022	// NetworkInterface - The ID of the network interface if assigned.
5023	NetworkInterface *SubResource `json:"networkInterface,omitempty"`
5024}
5025
5026// EffectiveNetworkSecurityGroupListResult response for list effective network security groups API service
5027// call.
5028type EffectiveNetworkSecurityGroupListResult struct {
5029	autorest.Response `json:"-"`
5030	// Value - A list of effective network security groups.
5031	Value *[]EffectiveNetworkSecurityGroup `json:"value,omitempty"`
5032	// NextLink - READ-ONLY; The URL to get the next set of results.
5033	NextLink *string `json:"nextLink,omitempty"`
5034}
5035
5036// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroupListResult.
5037func (ensglr EffectiveNetworkSecurityGroupListResult) MarshalJSON() ([]byte, error) {
5038	objectMap := make(map[string]interface{})
5039	if ensglr.Value != nil {
5040		objectMap["value"] = ensglr.Value
5041	}
5042	return json.Marshal(objectMap)
5043}
5044
5045// EffectiveNetworkSecurityRule effective network security rules.
5046type EffectiveNetworkSecurityRule struct {
5047	// Name - The name of the security rule specified by the user (if created by the user).
5048	Name *string `json:"name,omitempty"`
5049	// Protocol - The network protocol this rule applies to. Possible values are: 'Tcp', 'Udp', and 'All'. Possible values include: 'EffectiveSecurityRuleProtocolTCP', 'EffectiveSecurityRuleProtocolUDP', 'EffectiveSecurityRuleProtocolAll'
5050	Protocol EffectiveSecurityRuleProtocol `json:"protocol,omitempty"`
5051	// SourcePortRange - The source port or range.
5052	SourcePortRange *string `json:"sourcePortRange,omitempty"`
5053	// DestinationPortRange - The destination port or range.
5054	DestinationPortRange *string `json:"destinationPortRange,omitempty"`
5055	// 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 (*)
5056	SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"`
5057	// 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 (*)
5058	DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"`
5059	// SourceAddressPrefix - The source address prefix.
5060	SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
5061	// DestinationAddressPrefix - The destination address prefix.
5062	DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"`
5063	// SourceAddressPrefixes - The source address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*).
5064	SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"`
5065	// DestinationAddressPrefixes - The destination address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*).
5066	DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"`
5067	// ExpandedSourceAddressPrefix - The expanded source address prefix.
5068	ExpandedSourceAddressPrefix *[]string `json:"expandedSourceAddressPrefix,omitempty"`
5069	// ExpandedDestinationAddressPrefix - Expanded destination address prefix.
5070	ExpandedDestinationAddressPrefix *[]string `json:"expandedDestinationAddressPrefix,omitempty"`
5071	// Access - Whether network traffic is allowed or denied. Possible values are: 'Allow' and 'Deny'. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
5072	Access SecurityRuleAccess `json:"access,omitempty"`
5073	// Priority - The priority of the rule.
5074	Priority *int32 `json:"priority,omitempty"`
5075	// Direction - The direction of the rule. Possible values are: 'Inbound and Outbound'. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound'
5076	Direction SecurityRuleDirection `json:"direction,omitempty"`
5077}
5078
5079// EffectiveRoute effective Route
5080type EffectiveRoute struct {
5081	// Name - The name of the user defined route. This is optional.
5082	Name *string `json:"name,omitempty"`
5083	// Source - Who created the route. Possible values are: 'Unknown', 'User', 'VirtualNetworkGateway', and 'Default'. Possible values include: 'EffectiveRouteSourceUnknown', 'EffectiveRouteSourceUser', 'EffectiveRouteSourceVirtualNetworkGateway', 'EffectiveRouteSourceDefault'
5084	Source EffectiveRouteSource `json:"source,omitempty"`
5085	// State - The value of effective route. Possible values are: 'Active' and 'Invalid'. Possible values include: 'EffectiveRouteStateActive', 'EffectiveRouteStateInvalid'
5086	State EffectiveRouteState `json:"state,omitempty"`
5087	// AddressPrefix - The address prefixes of the effective routes in CIDR notation.
5088	AddressPrefix *[]string `json:"addressPrefix,omitempty"`
5089	// NextHopIPAddress - The IP address of the next hop of the effective route.
5090	NextHopIPAddress *[]string `json:"nextHopIpAddress,omitempty"`
5091	// 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'
5092	NextHopType RouteNextHopType `json:"nextHopType,omitempty"`
5093}
5094
5095// EffectiveRouteListResult response for list effective route API service call.
5096type EffectiveRouteListResult struct {
5097	autorest.Response `json:"-"`
5098	// Value - A list of effective routes.
5099	Value *[]EffectiveRoute `json:"value,omitempty"`
5100	// NextLink - READ-ONLY; The URL to get the next set of results.
5101	NextLink *string `json:"nextLink,omitempty"`
5102}
5103
5104// MarshalJSON is the custom marshaler for EffectiveRouteListResult.
5105func (erlr EffectiveRouteListResult) MarshalJSON() ([]byte, error) {
5106	objectMap := make(map[string]interface{})
5107	if erlr.Value != nil {
5108		objectMap["value"] = erlr.Value
5109	}
5110	return json.Marshal(objectMap)
5111}
5112
5113// EndpointServiceResult endpoint service.
5114type EndpointServiceResult struct {
5115	// Name - READ-ONLY; Name of the endpoint service.
5116	Name *string `json:"name,omitempty"`
5117	// Type - READ-ONLY; Type of the endpoint service.
5118	Type *string `json:"type,omitempty"`
5119	// ID - Resource ID.
5120	ID *string `json:"id,omitempty"`
5121}
5122
5123// MarshalJSON is the custom marshaler for EndpointServiceResult.
5124func (esr EndpointServiceResult) MarshalJSON() ([]byte, error) {
5125	objectMap := make(map[string]interface{})
5126	if esr.ID != nil {
5127		objectMap["id"] = esr.ID
5128	}
5129	return json.Marshal(objectMap)
5130}
5131
5132// EndpointServicesListResult response for the ListAvailableEndpointServices API service call.
5133type EndpointServicesListResult struct {
5134	autorest.Response `json:"-"`
5135	// Value - List of available endpoint services in a region.
5136	Value *[]EndpointServiceResult `json:"value,omitempty"`
5137	// NextLink - The URL to get the next set of results.
5138	NextLink *string `json:"nextLink,omitempty"`
5139}
5140
5141// EndpointServicesListResultIterator provides access to a complete listing of EndpointServiceResult
5142// values.
5143type EndpointServicesListResultIterator struct {
5144	i    int
5145	page EndpointServicesListResultPage
5146}
5147
5148// NextWithContext advances to the next value.  If there was an error making
5149// the request the iterator does not advance and the error is returned.
5150func (iter *EndpointServicesListResultIterator) NextWithContext(ctx context.Context) (err error) {
5151	if tracing.IsEnabled() {
5152		ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultIterator.NextWithContext")
5153		defer func() {
5154			sc := -1
5155			if iter.Response().Response.Response != nil {
5156				sc = iter.Response().Response.Response.StatusCode
5157			}
5158			tracing.EndSpan(ctx, sc, err)
5159		}()
5160	}
5161	iter.i++
5162	if iter.i < len(iter.page.Values()) {
5163		return nil
5164	}
5165	err = iter.page.NextWithContext(ctx)
5166	if err != nil {
5167		iter.i--
5168		return err
5169	}
5170	iter.i = 0
5171	return nil
5172}
5173
5174// Next advances to the next value.  If there was an error making
5175// the request the iterator does not advance and the error is returned.
5176// Deprecated: Use NextWithContext() instead.
5177func (iter *EndpointServicesListResultIterator) Next() error {
5178	return iter.NextWithContext(context.Background())
5179}
5180
5181// NotDone returns true if the enumeration should be started or is not yet complete.
5182func (iter EndpointServicesListResultIterator) NotDone() bool {
5183	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5184}
5185
5186// Response returns the raw server response from the last page request.
5187func (iter EndpointServicesListResultIterator) Response() EndpointServicesListResult {
5188	return iter.page.Response()
5189}
5190
5191// Value returns the current value or a zero-initialized value if the
5192// iterator has advanced beyond the end of the collection.
5193func (iter EndpointServicesListResultIterator) Value() EndpointServiceResult {
5194	if !iter.page.NotDone() {
5195		return EndpointServiceResult{}
5196	}
5197	return iter.page.Values()[iter.i]
5198}
5199
5200// Creates a new instance of the EndpointServicesListResultIterator type.
5201func NewEndpointServicesListResultIterator(page EndpointServicesListResultPage) EndpointServicesListResultIterator {
5202	return EndpointServicesListResultIterator{page: page}
5203}
5204
5205// IsEmpty returns true if the ListResult contains no values.
5206func (eslr EndpointServicesListResult) IsEmpty() bool {
5207	return eslr.Value == nil || len(*eslr.Value) == 0
5208}
5209
5210// hasNextLink returns true if the NextLink is not empty.
5211func (eslr EndpointServicesListResult) hasNextLink() bool {
5212	return eslr.NextLink != nil && len(*eslr.NextLink) != 0
5213}
5214
5215// endpointServicesListResultPreparer prepares a request to retrieve the next set of results.
5216// It returns nil if no more results exist.
5217func (eslr EndpointServicesListResult) endpointServicesListResultPreparer(ctx context.Context) (*http.Request, error) {
5218	if !eslr.hasNextLink() {
5219		return nil, nil
5220	}
5221	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5222		autorest.AsJSON(),
5223		autorest.AsGet(),
5224		autorest.WithBaseURL(to.String(eslr.NextLink)))
5225}
5226
5227// EndpointServicesListResultPage contains a page of EndpointServiceResult values.
5228type EndpointServicesListResultPage struct {
5229	fn   func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)
5230	eslr EndpointServicesListResult
5231}
5232
5233// NextWithContext advances to the next page of values.  If there was an error making
5234// the request the page does not advance and the error is returned.
5235func (page *EndpointServicesListResultPage) NextWithContext(ctx context.Context) (err error) {
5236	if tracing.IsEnabled() {
5237		ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultPage.NextWithContext")
5238		defer func() {
5239			sc := -1
5240			if page.Response().Response.Response != nil {
5241				sc = page.Response().Response.Response.StatusCode
5242			}
5243			tracing.EndSpan(ctx, sc, err)
5244		}()
5245	}
5246	for {
5247		next, err := page.fn(ctx, page.eslr)
5248		if err != nil {
5249			return err
5250		}
5251		page.eslr = next
5252		if !next.hasNextLink() || !next.IsEmpty() {
5253			break
5254		}
5255	}
5256	return nil
5257}
5258
5259// Next advances to the next page of values.  If there was an error making
5260// the request the page does not advance and the error is returned.
5261// Deprecated: Use NextWithContext() instead.
5262func (page *EndpointServicesListResultPage) Next() error {
5263	return page.NextWithContext(context.Background())
5264}
5265
5266// NotDone returns true if the page enumeration should be started or is not yet complete.
5267func (page EndpointServicesListResultPage) NotDone() bool {
5268	return !page.eslr.IsEmpty()
5269}
5270
5271// Response returns the raw server response from the last page request.
5272func (page EndpointServicesListResultPage) Response() EndpointServicesListResult {
5273	return page.eslr
5274}
5275
5276// Values returns the slice of values for the current page or nil if there are no values.
5277func (page EndpointServicesListResultPage) Values() []EndpointServiceResult {
5278	if page.eslr.IsEmpty() {
5279		return nil
5280	}
5281	return *page.eslr.Value
5282}
5283
5284// Creates a new instance of the EndpointServicesListResultPage type.
5285func NewEndpointServicesListResultPage(cur EndpointServicesListResult, getNextPage func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)) EndpointServicesListResultPage {
5286	return EndpointServicesListResultPage{
5287		fn:   getNextPage,
5288		eslr: cur,
5289	}
5290}
5291
5292// Error ...
5293type Error struct {
5294	Code       *string         `json:"code,omitempty"`
5295	Message    *string         `json:"message,omitempty"`
5296	Target     *string         `json:"target,omitempty"`
5297	Details    *[]ErrorDetails `json:"details,omitempty"`
5298	InnerError *string         `json:"innerError,omitempty"`
5299}
5300
5301// ErrorDetails ...
5302type ErrorDetails struct {
5303	Code    *string `json:"code,omitempty"`
5304	Target  *string `json:"target,omitempty"`
5305	Message *string `json:"message,omitempty"`
5306}
5307
5308// ErrorResponse the error object.
5309type ErrorResponse struct {
5310	Error *ErrorDetails `json:"error,omitempty"`
5311}
5312
5313// EvaluatedNetworkSecurityGroup results of network security group evaluation.
5314type EvaluatedNetworkSecurityGroup struct {
5315	// NetworkSecurityGroupID - Network security group ID.
5316	NetworkSecurityGroupID *string      `json:"networkSecurityGroupId,omitempty"`
5317	MatchedRule            *MatchedRule `json:"matchedRule,omitempty"`
5318	// RulesEvaluationResult - READ-ONLY; List of network security rules evaluation results.
5319	RulesEvaluationResult *[]SecurityRulesEvaluationResult `json:"rulesEvaluationResult,omitempty"`
5320}
5321
5322// MarshalJSON is the custom marshaler for EvaluatedNetworkSecurityGroup.
5323func (ensg EvaluatedNetworkSecurityGroup) MarshalJSON() ([]byte, error) {
5324	objectMap := make(map[string]interface{})
5325	if ensg.NetworkSecurityGroupID != nil {
5326		objectMap["networkSecurityGroupId"] = ensg.NetworkSecurityGroupID
5327	}
5328	if ensg.MatchedRule != nil {
5329		objectMap["matchedRule"] = ensg.MatchedRule
5330	}
5331	return json.Marshal(objectMap)
5332}
5333
5334// ExpressRouteCircuit expressRouteCircuit resource
5335type ExpressRouteCircuit struct {
5336	autorest.Response `json:"-"`
5337	// Sku - The SKU.
5338	Sku                                  *ExpressRouteCircuitSku `json:"sku,omitempty"`
5339	*ExpressRouteCircuitPropertiesFormat `json:"properties,omitempty"`
5340	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
5341	Etag *string `json:"etag,omitempty"`
5342	// ID - Resource ID.
5343	ID *string `json:"id,omitempty"`
5344	// Name - READ-ONLY; Resource name.
5345	Name *string `json:"name,omitempty"`
5346	// Type - READ-ONLY; Resource type.
5347	Type *string `json:"type,omitempty"`
5348	// Location - Resource location.
5349	Location *string `json:"location,omitempty"`
5350	// Tags - Resource tags.
5351	Tags map[string]*string `json:"tags"`
5352}
5353
5354// MarshalJSON is the custom marshaler for ExpressRouteCircuit.
5355func (erc ExpressRouteCircuit) MarshalJSON() ([]byte, error) {
5356	objectMap := make(map[string]interface{})
5357	if erc.Sku != nil {
5358		objectMap["sku"] = erc.Sku
5359	}
5360	if erc.ExpressRouteCircuitPropertiesFormat != nil {
5361		objectMap["properties"] = erc.ExpressRouteCircuitPropertiesFormat
5362	}
5363	if erc.ID != nil {
5364		objectMap["id"] = erc.ID
5365	}
5366	if erc.Location != nil {
5367		objectMap["location"] = erc.Location
5368	}
5369	if erc.Tags != nil {
5370		objectMap["tags"] = erc.Tags
5371	}
5372	return json.Marshal(objectMap)
5373}
5374
5375// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuit struct.
5376func (erc *ExpressRouteCircuit) UnmarshalJSON(body []byte) error {
5377	var m map[string]*json.RawMessage
5378	err := json.Unmarshal(body, &m)
5379	if err != nil {
5380		return err
5381	}
5382	for k, v := range m {
5383		switch k {
5384		case "sku":
5385			if v != nil {
5386				var sku ExpressRouteCircuitSku
5387				err = json.Unmarshal(*v, &sku)
5388				if err != nil {
5389					return err
5390				}
5391				erc.Sku = &sku
5392			}
5393		case "properties":
5394			if v != nil {
5395				var expressRouteCircuitPropertiesFormat ExpressRouteCircuitPropertiesFormat
5396				err = json.Unmarshal(*v, &expressRouteCircuitPropertiesFormat)
5397				if err != nil {
5398					return err
5399				}
5400				erc.ExpressRouteCircuitPropertiesFormat = &expressRouteCircuitPropertiesFormat
5401			}
5402		case "etag":
5403			if v != nil {
5404				var etag string
5405				err = json.Unmarshal(*v, &etag)
5406				if err != nil {
5407					return err
5408				}
5409				erc.Etag = &etag
5410			}
5411		case "id":
5412			if v != nil {
5413				var ID string
5414				err = json.Unmarshal(*v, &ID)
5415				if err != nil {
5416					return err
5417				}
5418				erc.ID = &ID
5419			}
5420		case "name":
5421			if v != nil {
5422				var name string
5423				err = json.Unmarshal(*v, &name)
5424				if err != nil {
5425					return err
5426				}
5427				erc.Name = &name
5428			}
5429		case "type":
5430			if v != nil {
5431				var typeVar string
5432				err = json.Unmarshal(*v, &typeVar)
5433				if err != nil {
5434					return err
5435				}
5436				erc.Type = &typeVar
5437			}
5438		case "location":
5439			if v != nil {
5440				var location string
5441				err = json.Unmarshal(*v, &location)
5442				if err != nil {
5443					return err
5444				}
5445				erc.Location = &location
5446			}
5447		case "tags":
5448			if v != nil {
5449				var tags map[string]*string
5450				err = json.Unmarshal(*v, &tags)
5451				if err != nil {
5452					return err
5453				}
5454				erc.Tags = tags
5455			}
5456		}
5457	}
5458
5459	return nil
5460}
5461
5462// ExpressRouteCircuitArpTable the ARP table associated with the ExpressRouteCircuit.
5463type ExpressRouteCircuitArpTable struct {
5464	// Age - Entry age in minutes
5465	Age *int32 `json:"age,omitempty"`
5466	// Interface - Interface address
5467	Interface *string `json:"interface,omitempty"`
5468	// IPAddress - The IP address.
5469	IPAddress *string `json:"ipAddress,omitempty"`
5470	// MacAddress - The MAC address.
5471	MacAddress *string `json:"macAddress,omitempty"`
5472}
5473
5474// ExpressRouteCircuitAuthorization authorization in an ExpressRouteCircuit resource.
5475type ExpressRouteCircuitAuthorization struct {
5476	autorest.Response              `json:"-"`
5477	*AuthorizationPropertiesFormat `json:"properties,omitempty"`
5478	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
5479	Name *string `json:"name,omitempty"`
5480	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
5481	Etag *string `json:"etag,omitempty"`
5482	// ID - Resource ID.
5483	ID *string `json:"id,omitempty"`
5484}
5485
5486// MarshalJSON is the custom marshaler for ExpressRouteCircuitAuthorization.
5487func (erca ExpressRouteCircuitAuthorization) MarshalJSON() ([]byte, error) {
5488	objectMap := make(map[string]interface{})
5489	if erca.AuthorizationPropertiesFormat != nil {
5490		objectMap["properties"] = erca.AuthorizationPropertiesFormat
5491	}
5492	if erca.Name != nil {
5493		objectMap["name"] = erca.Name
5494	}
5495	if erca.ID != nil {
5496		objectMap["id"] = erca.ID
5497	}
5498	return json.Marshal(objectMap)
5499}
5500
5501// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitAuthorization struct.
5502func (erca *ExpressRouteCircuitAuthorization) UnmarshalJSON(body []byte) error {
5503	var m map[string]*json.RawMessage
5504	err := json.Unmarshal(body, &m)
5505	if err != nil {
5506		return err
5507	}
5508	for k, v := range m {
5509		switch k {
5510		case "properties":
5511			if v != nil {
5512				var authorizationPropertiesFormat AuthorizationPropertiesFormat
5513				err = json.Unmarshal(*v, &authorizationPropertiesFormat)
5514				if err != nil {
5515					return err
5516				}
5517				erca.AuthorizationPropertiesFormat = &authorizationPropertiesFormat
5518			}
5519		case "name":
5520			if v != nil {
5521				var name string
5522				err = json.Unmarshal(*v, &name)
5523				if err != nil {
5524					return err
5525				}
5526				erca.Name = &name
5527			}
5528		case "etag":
5529			if v != nil {
5530				var etag string
5531				err = json.Unmarshal(*v, &etag)
5532				if err != nil {
5533					return err
5534				}
5535				erca.Etag = &etag
5536			}
5537		case "id":
5538			if v != nil {
5539				var ID string
5540				err = json.Unmarshal(*v, &ID)
5541				if err != nil {
5542					return err
5543				}
5544				erca.ID = &ID
5545			}
5546		}
5547	}
5548
5549	return nil
5550}
5551
5552// ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
5553// results of a long-running operation.
5554type ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture struct {
5555	azure.FutureAPI
5556	// Result returns the result of the asynchronous operation.
5557	// If the operation has not completed it will return an error.
5558	Result func(ExpressRouteCircuitAuthorizationsClient) (ExpressRouteCircuitAuthorization, error)
5559}
5560
5561// ExpressRouteCircuitAuthorizationsDeleteFuture an abstraction for monitoring and retrieving the results
5562// of a long-running operation.
5563type ExpressRouteCircuitAuthorizationsDeleteFuture struct {
5564	azure.FutureAPI
5565	// Result returns the result of the asynchronous operation.
5566	// If the operation has not completed it will return an error.
5567	Result func(ExpressRouteCircuitAuthorizationsClient) (autorest.Response, error)
5568}
5569
5570// ExpressRouteCircuitConnection express Route Circuit Connection in an ExpressRouteCircuitPeering
5571// resource.
5572type ExpressRouteCircuitConnection struct {
5573	autorest.Response                              `json:"-"`
5574	*ExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"`
5575	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
5576	Name *string `json:"name,omitempty"`
5577	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
5578	Etag *string `json:"etag,omitempty"`
5579	// ID - Resource ID.
5580	ID *string `json:"id,omitempty"`
5581}
5582
5583// MarshalJSON is the custom marshaler for ExpressRouteCircuitConnection.
5584func (ercc ExpressRouteCircuitConnection) MarshalJSON() ([]byte, error) {
5585	objectMap := make(map[string]interface{})
5586	if ercc.ExpressRouteCircuitConnectionPropertiesFormat != nil {
5587		objectMap["properties"] = ercc.ExpressRouteCircuitConnectionPropertiesFormat
5588	}
5589	if ercc.Name != nil {
5590		objectMap["name"] = ercc.Name
5591	}
5592	if ercc.ID != nil {
5593		objectMap["id"] = ercc.ID
5594	}
5595	return json.Marshal(objectMap)
5596}
5597
5598// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitConnection struct.
5599func (ercc *ExpressRouteCircuitConnection) UnmarshalJSON(body []byte) error {
5600	var m map[string]*json.RawMessage
5601	err := json.Unmarshal(body, &m)
5602	if err != nil {
5603		return err
5604	}
5605	for k, v := range m {
5606		switch k {
5607		case "properties":
5608			if v != nil {
5609				var expressRouteCircuitConnectionPropertiesFormat ExpressRouteCircuitConnectionPropertiesFormat
5610				err = json.Unmarshal(*v, &expressRouteCircuitConnectionPropertiesFormat)
5611				if err != nil {
5612					return err
5613				}
5614				ercc.ExpressRouteCircuitConnectionPropertiesFormat = &expressRouteCircuitConnectionPropertiesFormat
5615			}
5616		case "name":
5617			if v != nil {
5618				var name string
5619				err = json.Unmarshal(*v, &name)
5620				if err != nil {
5621					return err
5622				}
5623				ercc.Name = &name
5624			}
5625		case "etag":
5626			if v != nil {
5627				var etag string
5628				err = json.Unmarshal(*v, &etag)
5629				if err != nil {
5630					return err
5631				}
5632				ercc.Etag = &etag
5633			}
5634		case "id":
5635			if v != nil {
5636				var ID string
5637				err = json.Unmarshal(*v, &ID)
5638				if err != nil {
5639					return err
5640				}
5641				ercc.ID = &ID
5642			}
5643		}
5644	}
5645
5646	return nil
5647}
5648
5649// ExpressRouteCircuitConnectionPropertiesFormat ...
5650type ExpressRouteCircuitConnectionPropertiesFormat struct {
5651	// ExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the circuit initiating connection.
5652	ExpressRouteCircuitPeering *SubResource `json:"expressRouteCircuitPeering,omitempty"`
5653	// PeerExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the peered circuit.
5654	PeerExpressRouteCircuitPeering *SubResource `json:"peerExpressRouteCircuitPeering,omitempty"`
5655	// AddressPrefix - /29 IP address space to carve out Customer addresses for tunnels.
5656	AddressPrefix *string `json:"addressPrefix,omitempty"`
5657	// AuthorizationKey - The authorization key.
5658	AuthorizationKey *string `json:"authorizationKey,omitempty"`
5659	// CircuitConnectionStatus - READ-ONLY; Express Route Circuit Connection State. Possible values are: 'Connected' and 'Disconnected'. Possible values include: 'Connected', 'Connecting', 'Disconnected'
5660	CircuitConnectionStatus CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"`
5661	// ProvisioningState - READ-ONLY; Provisioning state of the circuit connection resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
5662	ProvisioningState *string `json:"provisioningState,omitempty"`
5663}
5664
5665// MarshalJSON is the custom marshaler for ExpressRouteCircuitConnectionPropertiesFormat.
5666func (erccpf ExpressRouteCircuitConnectionPropertiesFormat) MarshalJSON() ([]byte, error) {
5667	objectMap := make(map[string]interface{})
5668	if erccpf.ExpressRouteCircuitPeering != nil {
5669		objectMap["expressRouteCircuitPeering"] = erccpf.ExpressRouteCircuitPeering
5670	}
5671	if erccpf.PeerExpressRouteCircuitPeering != nil {
5672		objectMap["peerExpressRouteCircuitPeering"] = erccpf.PeerExpressRouteCircuitPeering
5673	}
5674	if erccpf.AddressPrefix != nil {
5675		objectMap["addressPrefix"] = erccpf.AddressPrefix
5676	}
5677	if erccpf.AuthorizationKey != nil {
5678		objectMap["authorizationKey"] = erccpf.AuthorizationKey
5679	}
5680	return json.Marshal(objectMap)
5681}
5682
5683// ExpressRouteCircuitConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
5684// results of a long-running operation.
5685type ExpressRouteCircuitConnectionsCreateOrUpdateFuture struct {
5686	azure.FutureAPI
5687	// Result returns the result of the asynchronous operation.
5688	// If the operation has not completed it will return an error.
5689	Result func(ExpressRouteCircuitConnectionsClient) (ExpressRouteCircuitConnection, error)
5690}
5691
5692// ExpressRouteCircuitConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a
5693// long-running operation.
5694type ExpressRouteCircuitConnectionsDeleteFuture struct {
5695	azure.FutureAPI
5696	// Result returns the result of the asynchronous operation.
5697	// If the operation has not completed it will return an error.
5698	Result func(ExpressRouteCircuitConnectionsClient) (autorest.Response, error)
5699}
5700
5701// ExpressRouteCircuitListResult response for ListExpressRouteCircuit API service call.
5702type ExpressRouteCircuitListResult struct {
5703	autorest.Response `json:"-"`
5704	// Value - A list of ExpressRouteCircuits in a resource group.
5705	Value *[]ExpressRouteCircuit `json:"value,omitempty"`
5706	// NextLink - The URL to get the next set of results.
5707	NextLink *string `json:"nextLink,omitempty"`
5708}
5709
5710// ExpressRouteCircuitListResultIterator provides access to a complete listing of ExpressRouteCircuit
5711// values.
5712type ExpressRouteCircuitListResultIterator struct {
5713	i    int
5714	page ExpressRouteCircuitListResultPage
5715}
5716
5717// NextWithContext advances to the next value.  If there was an error making
5718// the request the iterator does not advance and the error is returned.
5719func (iter *ExpressRouteCircuitListResultIterator) NextWithContext(ctx context.Context) (err error) {
5720	if tracing.IsEnabled() {
5721		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultIterator.NextWithContext")
5722		defer func() {
5723			sc := -1
5724			if iter.Response().Response.Response != nil {
5725				sc = iter.Response().Response.Response.StatusCode
5726			}
5727			tracing.EndSpan(ctx, sc, err)
5728		}()
5729	}
5730	iter.i++
5731	if iter.i < len(iter.page.Values()) {
5732		return nil
5733	}
5734	err = iter.page.NextWithContext(ctx)
5735	if err != nil {
5736		iter.i--
5737		return err
5738	}
5739	iter.i = 0
5740	return nil
5741}
5742
5743// Next advances to the next value.  If there was an error making
5744// the request the iterator does not advance and the error is returned.
5745// Deprecated: Use NextWithContext() instead.
5746func (iter *ExpressRouteCircuitListResultIterator) Next() error {
5747	return iter.NextWithContext(context.Background())
5748}
5749
5750// NotDone returns true if the enumeration should be started or is not yet complete.
5751func (iter ExpressRouteCircuitListResultIterator) NotDone() bool {
5752	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5753}
5754
5755// Response returns the raw server response from the last page request.
5756func (iter ExpressRouteCircuitListResultIterator) Response() ExpressRouteCircuitListResult {
5757	return iter.page.Response()
5758}
5759
5760// Value returns the current value or a zero-initialized value if the
5761// iterator has advanced beyond the end of the collection.
5762func (iter ExpressRouteCircuitListResultIterator) Value() ExpressRouteCircuit {
5763	if !iter.page.NotDone() {
5764		return ExpressRouteCircuit{}
5765	}
5766	return iter.page.Values()[iter.i]
5767}
5768
5769// Creates a new instance of the ExpressRouteCircuitListResultIterator type.
5770func NewExpressRouteCircuitListResultIterator(page ExpressRouteCircuitListResultPage) ExpressRouteCircuitListResultIterator {
5771	return ExpressRouteCircuitListResultIterator{page: page}
5772}
5773
5774// IsEmpty returns true if the ListResult contains no values.
5775func (erclr ExpressRouteCircuitListResult) IsEmpty() bool {
5776	return erclr.Value == nil || len(*erclr.Value) == 0
5777}
5778
5779// hasNextLink returns true if the NextLink is not empty.
5780func (erclr ExpressRouteCircuitListResult) hasNextLink() bool {
5781	return erclr.NextLink != nil && len(*erclr.NextLink) != 0
5782}
5783
5784// expressRouteCircuitListResultPreparer prepares a request to retrieve the next set of results.
5785// It returns nil if no more results exist.
5786func (erclr ExpressRouteCircuitListResult) expressRouteCircuitListResultPreparer(ctx context.Context) (*http.Request, error) {
5787	if !erclr.hasNextLink() {
5788		return nil, nil
5789	}
5790	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5791		autorest.AsJSON(),
5792		autorest.AsGet(),
5793		autorest.WithBaseURL(to.String(erclr.NextLink)))
5794}
5795
5796// ExpressRouteCircuitListResultPage contains a page of ExpressRouteCircuit values.
5797type ExpressRouteCircuitListResultPage struct {
5798	fn    func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)
5799	erclr ExpressRouteCircuitListResult
5800}
5801
5802// NextWithContext advances to the next page of values.  If there was an error making
5803// the request the page does not advance and the error is returned.
5804func (page *ExpressRouteCircuitListResultPage) NextWithContext(ctx context.Context) (err error) {
5805	if tracing.IsEnabled() {
5806		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultPage.NextWithContext")
5807		defer func() {
5808			sc := -1
5809			if page.Response().Response.Response != nil {
5810				sc = page.Response().Response.Response.StatusCode
5811			}
5812			tracing.EndSpan(ctx, sc, err)
5813		}()
5814	}
5815	for {
5816		next, err := page.fn(ctx, page.erclr)
5817		if err != nil {
5818			return err
5819		}
5820		page.erclr = next
5821		if !next.hasNextLink() || !next.IsEmpty() {
5822			break
5823		}
5824	}
5825	return nil
5826}
5827
5828// Next advances to the next page of values.  If there was an error making
5829// the request the page does not advance and the error is returned.
5830// Deprecated: Use NextWithContext() instead.
5831func (page *ExpressRouteCircuitListResultPage) Next() error {
5832	return page.NextWithContext(context.Background())
5833}
5834
5835// NotDone returns true if the page enumeration should be started or is not yet complete.
5836func (page ExpressRouteCircuitListResultPage) NotDone() bool {
5837	return !page.erclr.IsEmpty()
5838}
5839
5840// Response returns the raw server response from the last page request.
5841func (page ExpressRouteCircuitListResultPage) Response() ExpressRouteCircuitListResult {
5842	return page.erclr
5843}
5844
5845// Values returns the slice of values for the current page or nil if there are no values.
5846func (page ExpressRouteCircuitListResultPage) Values() []ExpressRouteCircuit {
5847	if page.erclr.IsEmpty() {
5848		return nil
5849	}
5850	return *page.erclr.Value
5851}
5852
5853// Creates a new instance of the ExpressRouteCircuitListResultPage type.
5854func NewExpressRouteCircuitListResultPage(cur ExpressRouteCircuitListResult, getNextPage func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)) ExpressRouteCircuitListResultPage {
5855	return ExpressRouteCircuitListResultPage{
5856		fn:    getNextPage,
5857		erclr: cur,
5858	}
5859}
5860
5861// ExpressRouteCircuitPeering peering in an ExpressRouteCircuit resource.
5862type ExpressRouteCircuitPeering struct {
5863	autorest.Response                           `json:"-"`
5864	*ExpressRouteCircuitPeeringPropertiesFormat `json:"properties,omitempty"`
5865	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
5866	Name *string `json:"name,omitempty"`
5867	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
5868	Etag *string `json:"etag,omitempty"`
5869	// ID - Resource ID.
5870	ID *string `json:"id,omitempty"`
5871}
5872
5873// MarshalJSON is the custom marshaler for ExpressRouteCircuitPeering.
5874func (ercp ExpressRouteCircuitPeering) MarshalJSON() ([]byte, error) {
5875	objectMap := make(map[string]interface{})
5876	if ercp.ExpressRouteCircuitPeeringPropertiesFormat != nil {
5877		objectMap["properties"] = ercp.ExpressRouteCircuitPeeringPropertiesFormat
5878	}
5879	if ercp.Name != nil {
5880		objectMap["name"] = ercp.Name
5881	}
5882	if ercp.ID != nil {
5883		objectMap["id"] = ercp.ID
5884	}
5885	return json.Marshal(objectMap)
5886}
5887
5888// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitPeering struct.
5889func (ercp *ExpressRouteCircuitPeering) UnmarshalJSON(body []byte) error {
5890	var m map[string]*json.RawMessage
5891	err := json.Unmarshal(body, &m)
5892	if err != nil {
5893		return err
5894	}
5895	for k, v := range m {
5896		switch k {
5897		case "properties":
5898			if v != nil {
5899				var expressRouteCircuitPeeringPropertiesFormat ExpressRouteCircuitPeeringPropertiesFormat
5900				err = json.Unmarshal(*v, &expressRouteCircuitPeeringPropertiesFormat)
5901				if err != nil {
5902					return err
5903				}
5904				ercp.ExpressRouteCircuitPeeringPropertiesFormat = &expressRouteCircuitPeeringPropertiesFormat
5905			}
5906		case "name":
5907			if v != nil {
5908				var name string
5909				err = json.Unmarshal(*v, &name)
5910				if err != nil {
5911					return err
5912				}
5913				ercp.Name = &name
5914			}
5915		case "etag":
5916			if v != nil {
5917				var etag string
5918				err = json.Unmarshal(*v, &etag)
5919				if err != nil {
5920					return err
5921				}
5922				ercp.Etag = &etag
5923			}
5924		case "id":
5925			if v != nil {
5926				var ID string
5927				err = json.Unmarshal(*v, &ID)
5928				if err != nil {
5929					return err
5930				}
5931				ercp.ID = &ID
5932			}
5933		}
5934	}
5935
5936	return nil
5937}
5938
5939// ExpressRouteCircuitPeeringConfig specifies the peering configuration.
5940type ExpressRouteCircuitPeeringConfig struct {
5941	// AdvertisedPublicPrefixes - The reference of AdvertisedPublicPrefixes.
5942	AdvertisedPublicPrefixes *[]string `json:"advertisedPublicPrefixes,omitempty"`
5943	// AdvertisedCommunities - The communities of bgp peering. Specified for microsoft peering
5944	AdvertisedCommunities *[]string `json:"advertisedCommunities,omitempty"`
5945	// AdvertisedPublicPrefixesState - AdvertisedPublicPrefixState of the Peering resource. Possible values are 'NotConfigured', 'Configuring', 'Configured', and 'ValidationNeeded'. Possible values include: 'NotConfigured', 'Configuring', 'Configured', 'ValidationNeeded'
5946	AdvertisedPublicPrefixesState ExpressRouteCircuitPeeringAdvertisedPublicPrefixState `json:"advertisedPublicPrefixesState,omitempty"`
5947	// LegacyMode - The legacy mode of the peering.
5948	LegacyMode *int32 `json:"legacyMode,omitempty"`
5949	// CustomerASN - The CustomerASN of the peering.
5950	CustomerASN *int32 `json:"customerASN,omitempty"`
5951	// RoutingRegistryName - The RoutingRegistryName of the configuration.
5952	RoutingRegistryName *string `json:"routingRegistryName,omitempty"`
5953}
5954
5955// ExpressRouteCircuitPeeringListResult response for ListPeering API service call retrieves all peerings
5956// that belong to an ExpressRouteCircuit.
5957type ExpressRouteCircuitPeeringListResult struct {
5958	autorest.Response `json:"-"`
5959	// Value - The peerings in an express route circuit.
5960	Value *[]ExpressRouteCircuitPeering `json:"value,omitempty"`
5961	// NextLink - The URL to get the next set of results.
5962	NextLink *string `json:"nextLink,omitempty"`
5963}
5964
5965// ExpressRouteCircuitPeeringListResultIterator provides access to a complete listing of
5966// ExpressRouteCircuitPeering values.
5967type ExpressRouteCircuitPeeringListResultIterator struct {
5968	i    int
5969	page ExpressRouteCircuitPeeringListResultPage
5970}
5971
5972// NextWithContext advances to the next value.  If there was an error making
5973// the request the iterator does not advance and the error is returned.
5974func (iter *ExpressRouteCircuitPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
5975	if tracing.IsEnabled() {
5976		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultIterator.NextWithContext")
5977		defer func() {
5978			sc := -1
5979			if iter.Response().Response.Response != nil {
5980				sc = iter.Response().Response.Response.StatusCode
5981			}
5982			tracing.EndSpan(ctx, sc, err)
5983		}()
5984	}
5985	iter.i++
5986	if iter.i < len(iter.page.Values()) {
5987		return nil
5988	}
5989	err = iter.page.NextWithContext(ctx)
5990	if err != nil {
5991		iter.i--
5992		return err
5993	}
5994	iter.i = 0
5995	return nil
5996}
5997
5998// Next advances to the next value.  If there was an error making
5999// the request the iterator does not advance and the error is returned.
6000// Deprecated: Use NextWithContext() instead.
6001func (iter *ExpressRouteCircuitPeeringListResultIterator) Next() error {
6002	return iter.NextWithContext(context.Background())
6003}
6004
6005// NotDone returns true if the enumeration should be started or is not yet complete.
6006func (iter ExpressRouteCircuitPeeringListResultIterator) NotDone() bool {
6007	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6008}
6009
6010// Response returns the raw server response from the last page request.
6011func (iter ExpressRouteCircuitPeeringListResultIterator) Response() ExpressRouteCircuitPeeringListResult {
6012	return iter.page.Response()
6013}
6014
6015// Value returns the current value or a zero-initialized value if the
6016// iterator has advanced beyond the end of the collection.
6017func (iter ExpressRouteCircuitPeeringListResultIterator) Value() ExpressRouteCircuitPeering {
6018	if !iter.page.NotDone() {
6019		return ExpressRouteCircuitPeering{}
6020	}
6021	return iter.page.Values()[iter.i]
6022}
6023
6024// Creates a new instance of the ExpressRouteCircuitPeeringListResultIterator type.
6025func NewExpressRouteCircuitPeeringListResultIterator(page ExpressRouteCircuitPeeringListResultPage) ExpressRouteCircuitPeeringListResultIterator {
6026	return ExpressRouteCircuitPeeringListResultIterator{page: page}
6027}
6028
6029// IsEmpty returns true if the ListResult contains no values.
6030func (ercplr ExpressRouteCircuitPeeringListResult) IsEmpty() bool {
6031	return ercplr.Value == nil || len(*ercplr.Value) == 0
6032}
6033
6034// hasNextLink returns true if the NextLink is not empty.
6035func (ercplr ExpressRouteCircuitPeeringListResult) hasNextLink() bool {
6036	return ercplr.NextLink != nil && len(*ercplr.NextLink) != 0
6037}
6038
6039// expressRouteCircuitPeeringListResultPreparer prepares a request to retrieve the next set of results.
6040// It returns nil if no more results exist.
6041func (ercplr ExpressRouteCircuitPeeringListResult) expressRouteCircuitPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
6042	if !ercplr.hasNextLink() {
6043		return nil, nil
6044	}
6045	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6046		autorest.AsJSON(),
6047		autorest.AsGet(),
6048		autorest.WithBaseURL(to.String(ercplr.NextLink)))
6049}
6050
6051// ExpressRouteCircuitPeeringListResultPage contains a page of ExpressRouteCircuitPeering values.
6052type ExpressRouteCircuitPeeringListResultPage struct {
6053	fn     func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)
6054	ercplr ExpressRouteCircuitPeeringListResult
6055}
6056
6057// NextWithContext advances to the next page of values.  If there was an error making
6058// the request the page does not advance and the error is returned.
6059func (page *ExpressRouteCircuitPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
6060	if tracing.IsEnabled() {
6061		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultPage.NextWithContext")
6062		defer func() {
6063			sc := -1
6064			if page.Response().Response.Response != nil {
6065				sc = page.Response().Response.Response.StatusCode
6066			}
6067			tracing.EndSpan(ctx, sc, err)
6068		}()
6069	}
6070	for {
6071		next, err := page.fn(ctx, page.ercplr)
6072		if err != nil {
6073			return err
6074		}
6075		page.ercplr = next
6076		if !next.hasNextLink() || !next.IsEmpty() {
6077			break
6078		}
6079	}
6080	return nil
6081}
6082
6083// Next advances to the next page of values.  If there was an error making
6084// the request the page does not advance and the error is returned.
6085// Deprecated: Use NextWithContext() instead.
6086func (page *ExpressRouteCircuitPeeringListResultPage) Next() error {
6087	return page.NextWithContext(context.Background())
6088}
6089
6090// NotDone returns true if the page enumeration should be started or is not yet complete.
6091func (page ExpressRouteCircuitPeeringListResultPage) NotDone() bool {
6092	return !page.ercplr.IsEmpty()
6093}
6094
6095// Response returns the raw server response from the last page request.
6096func (page ExpressRouteCircuitPeeringListResultPage) Response() ExpressRouteCircuitPeeringListResult {
6097	return page.ercplr
6098}
6099
6100// Values returns the slice of values for the current page or nil if there are no values.
6101func (page ExpressRouteCircuitPeeringListResultPage) Values() []ExpressRouteCircuitPeering {
6102	if page.ercplr.IsEmpty() {
6103		return nil
6104	}
6105	return *page.ercplr.Value
6106}
6107
6108// Creates a new instance of the ExpressRouteCircuitPeeringListResultPage type.
6109func NewExpressRouteCircuitPeeringListResultPage(cur ExpressRouteCircuitPeeringListResult, getNextPage func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)) ExpressRouteCircuitPeeringListResultPage {
6110	return ExpressRouteCircuitPeeringListResultPage{
6111		fn:     getNextPage,
6112		ercplr: cur,
6113	}
6114}
6115
6116// ExpressRouteCircuitPeeringPropertiesFormat ...
6117type ExpressRouteCircuitPeeringPropertiesFormat struct {
6118	// PeeringType - The peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'
6119	PeeringType ExpressRoutePeeringType `json:"peeringType,omitempty"`
6120	// State - The peering state. Possible values include: 'ExpressRoutePeeringStateDisabled', 'ExpressRoutePeeringStateEnabled'
6121	State ExpressRoutePeeringState `json:"state,omitempty"`
6122	// AzureASN - The Azure ASN.
6123	AzureASN *int32 `json:"azureASN,omitempty"`
6124	// PeerASN - The peer ASN.
6125	PeerASN *int64 `json:"peerASN,omitempty"`
6126	// PrimaryPeerAddressPrefix - The primary address prefix.
6127	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
6128	// SecondaryPeerAddressPrefix - The secondary address prefix.
6129	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
6130	// PrimaryAzurePort - The primary port.
6131	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
6132	// SecondaryAzurePort - The secondary port.
6133	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
6134	// SharedKey - The shared key.
6135	SharedKey *string `json:"sharedKey,omitempty"`
6136	// VlanID - The VLAN ID.
6137	VlanID *int32 `json:"vlanId,omitempty"`
6138	// MicrosoftPeeringConfig - The Microsoft peering configuration.
6139	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
6140	// Stats - Gets peering stats.
6141	Stats *ExpressRouteCircuitStats `json:"stats,omitempty"`
6142	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
6143	ProvisioningState *string `json:"provisioningState,omitempty"`
6144	// GatewayManagerEtag - The GatewayManager Etag.
6145	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
6146	// LastModifiedBy - Gets whether the provider or the customer last modified the peering.
6147	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
6148	// RouteFilter - The reference of the RouteFilter resource.
6149	RouteFilter *RouteFilter `json:"routeFilter,omitempty"`
6150	// Ipv6PeeringConfig - The IPv6 peering configuration.
6151	Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"`
6152	// Connections - The list of circuit connections associated with Azure Private Peering for this circuit.
6153	Connections *[]ExpressRouteCircuitConnection `json:"connections,omitempty"`
6154}
6155
6156// ExpressRouteCircuitPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
6157// of a long-running operation.
6158type ExpressRouteCircuitPeeringsCreateOrUpdateFuture struct {
6159	azure.FutureAPI
6160	// Result returns the result of the asynchronous operation.
6161	// If the operation has not completed it will return an error.
6162	Result func(ExpressRouteCircuitPeeringsClient) (ExpressRouteCircuitPeering, error)
6163}
6164
6165// ExpressRouteCircuitPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
6166// long-running operation.
6167type ExpressRouteCircuitPeeringsDeleteFuture struct {
6168	azure.FutureAPI
6169	// Result returns the result of the asynchronous operation.
6170	// If the operation has not completed it will return an error.
6171	Result func(ExpressRouteCircuitPeeringsClient) (autorest.Response, error)
6172}
6173
6174// ExpressRouteCircuitPropertiesFormat properties of ExpressRouteCircuit.
6175type ExpressRouteCircuitPropertiesFormat struct {
6176	// AllowClassicOperations - Allow classic operations
6177	AllowClassicOperations *bool `json:"allowClassicOperations,omitempty"`
6178	// CircuitProvisioningState - The CircuitProvisioningState state of the resource.
6179	CircuitProvisioningState *string `json:"circuitProvisioningState,omitempty"`
6180	// ServiceProviderProvisioningState - The ServiceProviderProvisioningState state of the resource. Possible values are 'NotProvisioned', 'Provisioning', 'Provisioned', and 'Deprovisioning'. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning'
6181	ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"`
6182	// Authorizations - The list of authorizations.
6183	Authorizations *[]ExpressRouteCircuitAuthorization `json:"authorizations,omitempty"`
6184	// Peerings - The list of peerings.
6185	Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"`
6186	// ServiceKey - The ServiceKey.
6187	ServiceKey *string `json:"serviceKey,omitempty"`
6188	// ServiceProviderNotes - The ServiceProviderNotes.
6189	ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"`
6190	// ServiceProviderProperties - The ServiceProviderProperties.
6191	ServiceProviderProperties *ExpressRouteCircuitServiceProviderProperties `json:"serviceProviderProperties,omitempty"`
6192	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
6193	ProvisioningState *string `json:"provisioningState,omitempty"`
6194	// GatewayManagerEtag - The GatewayManager Etag.
6195	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
6196}
6197
6198// ExpressRouteCircuitReference ...
6199type ExpressRouteCircuitReference struct {
6200	// ID - Corresponding Express Route Circuit Id.
6201	ID *string `json:"id,omitempty"`
6202}
6203
6204// ExpressRouteCircuitRoutesTable the routes table associated with the ExpressRouteCircuit
6205type ExpressRouteCircuitRoutesTable struct {
6206	// NetworkProperty - IP address of a network entity
6207	NetworkProperty *string `json:"network,omitempty"`
6208	// NextHop - NextHop address
6209	NextHop *string `json:"nextHop,omitempty"`
6210	// LocPrf - Local preference value as set with the set local-preference route-map configuration command
6211	LocPrf *string `json:"locPrf,omitempty"`
6212	// Weight - Route Weight.
6213	Weight *int32 `json:"weight,omitempty"`
6214	// Path - Autonomous system paths to the destination network.
6215	Path *string `json:"path,omitempty"`
6216}
6217
6218// ExpressRouteCircuitRoutesTableSummary the routes table associated with the ExpressRouteCircuit.
6219type ExpressRouteCircuitRoutesTableSummary struct {
6220	// Neighbor - IP address of the neighbor.
6221	Neighbor *string `json:"neighbor,omitempty"`
6222	// V - BGP version number spoken to the neighbor.
6223	V *int32 `json:"v,omitempty"`
6224	// As - Autonomous system number.
6225	As *int32 `json:"as,omitempty"`
6226	// 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.
6227	UpDown *string `json:"upDown,omitempty"`
6228	// StatePfxRcd - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group.
6229	StatePfxRcd *string `json:"statePfxRcd,omitempty"`
6230}
6231
6232// ExpressRouteCircuitsArpTableListResult response for ListArpTable associated with the Express Route
6233// Circuits API.
6234type ExpressRouteCircuitsArpTableListResult struct {
6235	autorest.Response `json:"-"`
6236	// Value - Gets list of the ARP table.
6237	Value *[]ExpressRouteCircuitArpTable `json:"value,omitempty"`
6238	// NextLink - The URL to get the next set of results.
6239	NextLink *string `json:"nextLink,omitempty"`
6240}
6241
6242// ExpressRouteCircuitsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
6243// long-running operation.
6244type ExpressRouteCircuitsCreateOrUpdateFuture struct {
6245	azure.FutureAPI
6246	// Result returns the result of the asynchronous operation.
6247	// If the operation has not completed it will return an error.
6248	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuit, error)
6249}
6250
6251// ExpressRouteCircuitsDeleteFuture an abstraction for monitoring and retrieving the results of a
6252// long-running operation.
6253type ExpressRouteCircuitsDeleteFuture struct {
6254	azure.FutureAPI
6255	// Result returns the result of the asynchronous operation.
6256	// If the operation has not completed it will return an error.
6257	Result func(ExpressRouteCircuitsClient) (autorest.Response, error)
6258}
6259
6260// ExpressRouteCircuitServiceProviderProperties contains ServiceProviderProperties in an
6261// ExpressRouteCircuit.
6262type ExpressRouteCircuitServiceProviderProperties struct {
6263	// ServiceProviderName - The serviceProviderName.
6264	ServiceProviderName *string `json:"serviceProviderName,omitempty"`
6265	// PeeringLocation - The peering location.
6266	PeeringLocation *string `json:"peeringLocation,omitempty"`
6267	// BandwidthInMbps - The BandwidthInMbps.
6268	BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"`
6269}
6270
6271// ExpressRouteCircuitSku contains SKU in an ExpressRouteCircuit.
6272type ExpressRouteCircuitSku struct {
6273	// Name - The name of the SKU.
6274	Name *string `json:"name,omitempty"`
6275	// Tier - The tier of the SKU. Possible values are 'Standard' and 'Premium'. Possible values include: 'Standard', 'Premium'
6276	Tier ExpressRouteCircuitSkuTier `json:"tier,omitempty"`
6277	// Family - The family of the SKU. Possible values are: 'UnlimitedData' and 'MeteredData'. Possible values include: 'UnlimitedData', 'MeteredData'
6278	Family ExpressRouteCircuitSkuFamily `json:"family,omitempty"`
6279}
6280
6281// ExpressRouteCircuitsListArpTableFuture an abstraction for monitoring and retrieving the results of a
6282// long-running operation.
6283type ExpressRouteCircuitsListArpTableFuture struct {
6284	azure.FutureAPI
6285	// Result returns the result of the asynchronous operation.
6286	// If the operation has not completed it will return an error.
6287	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsArpTableListResult, error)
6288}
6289
6290// ExpressRouteCircuitsListRoutesTableFuture an abstraction for monitoring and retrieving the results of a
6291// long-running operation.
6292type ExpressRouteCircuitsListRoutesTableFuture struct {
6293	azure.FutureAPI
6294	// Result returns the result of the asynchronous operation.
6295	// If the operation has not completed it will return an error.
6296	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsRoutesTableListResult, error)
6297}
6298
6299// ExpressRouteCircuitsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving the
6300// results of a long-running operation.
6301type ExpressRouteCircuitsListRoutesTableSummaryFuture struct {
6302	azure.FutureAPI
6303	// Result returns the result of the asynchronous operation.
6304	// If the operation has not completed it will return an error.
6305	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsRoutesTableSummaryListResult, error)
6306}
6307
6308// ExpressRouteCircuitsRoutesTableListResult response for ListRoutesTable associated with the Express Route
6309// Circuits API.
6310type ExpressRouteCircuitsRoutesTableListResult struct {
6311	autorest.Response `json:"-"`
6312	// Value - The list of routes table.
6313	Value *[]ExpressRouteCircuitRoutesTable `json:"value,omitempty"`
6314	// NextLink - The URL to get the next set of results.
6315	NextLink *string `json:"nextLink,omitempty"`
6316}
6317
6318// ExpressRouteCircuitsRoutesTableSummaryListResult response for ListRoutesTable associated with the
6319// Express Route Circuits API.
6320type ExpressRouteCircuitsRoutesTableSummaryListResult struct {
6321	autorest.Response `json:"-"`
6322	// Value - A list of the routes table.
6323	Value *[]ExpressRouteCircuitRoutesTableSummary `json:"value,omitempty"`
6324	// NextLink - The URL to get the next set of results.
6325	NextLink *string `json:"nextLink,omitempty"`
6326}
6327
6328// ExpressRouteCircuitStats contains stats associated with the peering.
6329type ExpressRouteCircuitStats struct {
6330	autorest.Response `json:"-"`
6331	// PrimarybytesIn - Gets BytesIn of the peering.
6332	PrimarybytesIn *int64 `json:"primarybytesIn,omitempty"`
6333	// PrimarybytesOut - Gets BytesOut of the peering.
6334	PrimarybytesOut *int64 `json:"primarybytesOut,omitempty"`
6335	// SecondarybytesIn - Gets BytesIn of the peering.
6336	SecondarybytesIn *int64 `json:"secondarybytesIn,omitempty"`
6337	// SecondarybytesOut - Gets BytesOut of the peering.
6338	SecondarybytesOut *int64 `json:"secondarybytesOut,omitempty"`
6339}
6340
6341// ExpressRouteCircuitsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
6342// long-running operation.
6343type ExpressRouteCircuitsUpdateTagsFuture struct {
6344	azure.FutureAPI
6345	// Result returns the result of the asynchronous operation.
6346	// If the operation has not completed it will return an error.
6347	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuit, error)
6348}
6349
6350// ExpressRouteCrossConnection expressRouteCrossConnection resource
6351type ExpressRouteCrossConnection struct {
6352	autorest.Response                      `json:"-"`
6353	*ExpressRouteCrossConnectionProperties `json:"properties,omitempty"`
6354	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
6355	Etag *string `json:"etag,omitempty"`
6356	// ID - Resource ID.
6357	ID *string `json:"id,omitempty"`
6358	// Name - READ-ONLY; Resource name.
6359	Name *string `json:"name,omitempty"`
6360	// Type - READ-ONLY; Resource type.
6361	Type *string `json:"type,omitempty"`
6362	// Location - Resource location.
6363	Location *string `json:"location,omitempty"`
6364	// Tags - Resource tags.
6365	Tags map[string]*string `json:"tags"`
6366}
6367
6368// MarshalJSON is the custom marshaler for ExpressRouteCrossConnection.
6369func (ercc ExpressRouteCrossConnection) MarshalJSON() ([]byte, error) {
6370	objectMap := make(map[string]interface{})
6371	if ercc.ExpressRouteCrossConnectionProperties != nil {
6372		objectMap["properties"] = ercc.ExpressRouteCrossConnectionProperties
6373	}
6374	if ercc.ID != nil {
6375		objectMap["id"] = ercc.ID
6376	}
6377	if ercc.Location != nil {
6378		objectMap["location"] = ercc.Location
6379	}
6380	if ercc.Tags != nil {
6381		objectMap["tags"] = ercc.Tags
6382	}
6383	return json.Marshal(objectMap)
6384}
6385
6386// UnmarshalJSON is the custom unmarshaler for ExpressRouteCrossConnection struct.
6387func (ercc *ExpressRouteCrossConnection) UnmarshalJSON(body []byte) error {
6388	var m map[string]*json.RawMessage
6389	err := json.Unmarshal(body, &m)
6390	if err != nil {
6391		return err
6392	}
6393	for k, v := range m {
6394		switch k {
6395		case "properties":
6396			if v != nil {
6397				var expressRouteCrossConnectionProperties ExpressRouteCrossConnectionProperties
6398				err = json.Unmarshal(*v, &expressRouteCrossConnectionProperties)
6399				if err != nil {
6400					return err
6401				}
6402				ercc.ExpressRouteCrossConnectionProperties = &expressRouteCrossConnectionProperties
6403			}
6404		case "etag":
6405			if v != nil {
6406				var etag string
6407				err = json.Unmarshal(*v, &etag)
6408				if err != nil {
6409					return err
6410				}
6411				ercc.Etag = &etag
6412			}
6413		case "id":
6414			if v != nil {
6415				var ID string
6416				err = json.Unmarshal(*v, &ID)
6417				if err != nil {
6418					return err
6419				}
6420				ercc.ID = &ID
6421			}
6422		case "name":
6423			if v != nil {
6424				var name string
6425				err = json.Unmarshal(*v, &name)
6426				if err != nil {
6427					return err
6428				}
6429				ercc.Name = &name
6430			}
6431		case "type":
6432			if v != nil {
6433				var typeVar string
6434				err = json.Unmarshal(*v, &typeVar)
6435				if err != nil {
6436					return err
6437				}
6438				ercc.Type = &typeVar
6439			}
6440		case "location":
6441			if v != nil {
6442				var location string
6443				err = json.Unmarshal(*v, &location)
6444				if err != nil {
6445					return err
6446				}
6447				ercc.Location = &location
6448			}
6449		case "tags":
6450			if v != nil {
6451				var tags map[string]*string
6452				err = json.Unmarshal(*v, &tags)
6453				if err != nil {
6454					return err
6455				}
6456				ercc.Tags = tags
6457			}
6458		}
6459	}
6460
6461	return nil
6462}
6463
6464// ExpressRouteCrossConnectionListResult response for ListExpressRouteCrossConnection API service call.
6465type ExpressRouteCrossConnectionListResult struct {
6466	autorest.Response `json:"-"`
6467	// Value - A list of ExpressRouteCrossConnection resources.
6468	Value *[]ExpressRouteCrossConnection `json:"value,omitempty"`
6469	// NextLink - READ-ONLY; The URL to get the next set of results.
6470	NextLink *string `json:"nextLink,omitempty"`
6471}
6472
6473// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionListResult.
6474func (ercclr ExpressRouteCrossConnectionListResult) MarshalJSON() ([]byte, error) {
6475	objectMap := make(map[string]interface{})
6476	if ercclr.Value != nil {
6477		objectMap["value"] = ercclr.Value
6478	}
6479	return json.Marshal(objectMap)
6480}
6481
6482// ExpressRouteCrossConnectionListResultIterator provides access to a complete listing of
6483// ExpressRouteCrossConnection values.
6484type ExpressRouteCrossConnectionListResultIterator struct {
6485	i    int
6486	page ExpressRouteCrossConnectionListResultPage
6487}
6488
6489// NextWithContext advances to the next value.  If there was an error making
6490// the request the iterator does not advance and the error is returned.
6491func (iter *ExpressRouteCrossConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
6492	if tracing.IsEnabled() {
6493		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionListResultIterator.NextWithContext")
6494		defer func() {
6495			sc := -1
6496			if iter.Response().Response.Response != nil {
6497				sc = iter.Response().Response.Response.StatusCode
6498			}
6499			tracing.EndSpan(ctx, sc, err)
6500		}()
6501	}
6502	iter.i++
6503	if iter.i < len(iter.page.Values()) {
6504		return nil
6505	}
6506	err = iter.page.NextWithContext(ctx)
6507	if err != nil {
6508		iter.i--
6509		return err
6510	}
6511	iter.i = 0
6512	return nil
6513}
6514
6515// Next advances to the next value.  If there was an error making
6516// the request the iterator does not advance and the error is returned.
6517// Deprecated: Use NextWithContext() instead.
6518func (iter *ExpressRouteCrossConnectionListResultIterator) Next() error {
6519	return iter.NextWithContext(context.Background())
6520}
6521
6522// NotDone returns true if the enumeration should be started or is not yet complete.
6523func (iter ExpressRouteCrossConnectionListResultIterator) NotDone() bool {
6524	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6525}
6526
6527// Response returns the raw server response from the last page request.
6528func (iter ExpressRouteCrossConnectionListResultIterator) Response() ExpressRouteCrossConnectionListResult {
6529	return iter.page.Response()
6530}
6531
6532// Value returns the current value or a zero-initialized value if the
6533// iterator has advanced beyond the end of the collection.
6534func (iter ExpressRouteCrossConnectionListResultIterator) Value() ExpressRouteCrossConnection {
6535	if !iter.page.NotDone() {
6536		return ExpressRouteCrossConnection{}
6537	}
6538	return iter.page.Values()[iter.i]
6539}
6540
6541// Creates a new instance of the ExpressRouteCrossConnectionListResultIterator type.
6542func NewExpressRouteCrossConnectionListResultIterator(page ExpressRouteCrossConnectionListResultPage) ExpressRouteCrossConnectionListResultIterator {
6543	return ExpressRouteCrossConnectionListResultIterator{page: page}
6544}
6545
6546// IsEmpty returns true if the ListResult contains no values.
6547func (ercclr ExpressRouteCrossConnectionListResult) IsEmpty() bool {
6548	return ercclr.Value == nil || len(*ercclr.Value) == 0
6549}
6550
6551// hasNextLink returns true if the NextLink is not empty.
6552func (ercclr ExpressRouteCrossConnectionListResult) hasNextLink() bool {
6553	return ercclr.NextLink != nil && len(*ercclr.NextLink) != 0
6554}
6555
6556// expressRouteCrossConnectionListResultPreparer prepares a request to retrieve the next set of results.
6557// It returns nil if no more results exist.
6558func (ercclr ExpressRouteCrossConnectionListResult) expressRouteCrossConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
6559	if !ercclr.hasNextLink() {
6560		return nil, nil
6561	}
6562	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6563		autorest.AsJSON(),
6564		autorest.AsGet(),
6565		autorest.WithBaseURL(to.String(ercclr.NextLink)))
6566}
6567
6568// ExpressRouteCrossConnectionListResultPage contains a page of ExpressRouteCrossConnection values.
6569type ExpressRouteCrossConnectionListResultPage struct {
6570	fn     func(context.Context, ExpressRouteCrossConnectionListResult) (ExpressRouteCrossConnectionListResult, error)
6571	ercclr ExpressRouteCrossConnectionListResult
6572}
6573
6574// NextWithContext advances to the next page of values.  If there was an error making
6575// the request the page does not advance and the error is returned.
6576func (page *ExpressRouteCrossConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
6577	if tracing.IsEnabled() {
6578		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionListResultPage.NextWithContext")
6579		defer func() {
6580			sc := -1
6581			if page.Response().Response.Response != nil {
6582				sc = page.Response().Response.Response.StatusCode
6583			}
6584			tracing.EndSpan(ctx, sc, err)
6585		}()
6586	}
6587	for {
6588		next, err := page.fn(ctx, page.ercclr)
6589		if err != nil {
6590			return err
6591		}
6592		page.ercclr = next
6593		if !next.hasNextLink() || !next.IsEmpty() {
6594			break
6595		}
6596	}
6597	return nil
6598}
6599
6600// Next advances to the next page of values.  If there was an error making
6601// the request the page does not advance and the error is returned.
6602// Deprecated: Use NextWithContext() instead.
6603func (page *ExpressRouteCrossConnectionListResultPage) Next() error {
6604	return page.NextWithContext(context.Background())
6605}
6606
6607// NotDone returns true if the page enumeration should be started or is not yet complete.
6608func (page ExpressRouteCrossConnectionListResultPage) NotDone() bool {
6609	return !page.ercclr.IsEmpty()
6610}
6611
6612// Response returns the raw server response from the last page request.
6613func (page ExpressRouteCrossConnectionListResultPage) Response() ExpressRouteCrossConnectionListResult {
6614	return page.ercclr
6615}
6616
6617// Values returns the slice of values for the current page or nil if there are no values.
6618func (page ExpressRouteCrossConnectionListResultPage) Values() []ExpressRouteCrossConnection {
6619	if page.ercclr.IsEmpty() {
6620		return nil
6621	}
6622	return *page.ercclr.Value
6623}
6624
6625// Creates a new instance of the ExpressRouteCrossConnectionListResultPage type.
6626func NewExpressRouteCrossConnectionListResultPage(cur ExpressRouteCrossConnectionListResult, getNextPage func(context.Context, ExpressRouteCrossConnectionListResult) (ExpressRouteCrossConnectionListResult, error)) ExpressRouteCrossConnectionListResultPage {
6627	return ExpressRouteCrossConnectionListResultPage{
6628		fn:     getNextPage,
6629		ercclr: cur,
6630	}
6631}
6632
6633// ExpressRouteCrossConnectionPeering peering in an ExpressRoute Cross Connection resource.
6634type ExpressRouteCrossConnectionPeering struct {
6635	autorest.Response                             `json:"-"`
6636	*ExpressRouteCrossConnectionPeeringProperties `json:"properties,omitempty"`
6637	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
6638	Name *string `json:"name,omitempty"`
6639	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
6640	Etag *string `json:"etag,omitempty"`
6641	// ID - Resource ID.
6642	ID *string `json:"id,omitempty"`
6643}
6644
6645// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeering.
6646func (erccp ExpressRouteCrossConnectionPeering) MarshalJSON() ([]byte, error) {
6647	objectMap := make(map[string]interface{})
6648	if erccp.ExpressRouteCrossConnectionPeeringProperties != nil {
6649		objectMap["properties"] = erccp.ExpressRouteCrossConnectionPeeringProperties
6650	}
6651	if erccp.Name != nil {
6652		objectMap["name"] = erccp.Name
6653	}
6654	if erccp.ID != nil {
6655		objectMap["id"] = erccp.ID
6656	}
6657	return json.Marshal(objectMap)
6658}
6659
6660// UnmarshalJSON is the custom unmarshaler for ExpressRouteCrossConnectionPeering struct.
6661func (erccp *ExpressRouteCrossConnectionPeering) UnmarshalJSON(body []byte) error {
6662	var m map[string]*json.RawMessage
6663	err := json.Unmarshal(body, &m)
6664	if err != nil {
6665		return err
6666	}
6667	for k, v := range m {
6668		switch k {
6669		case "properties":
6670			if v != nil {
6671				var expressRouteCrossConnectionPeeringProperties ExpressRouteCrossConnectionPeeringProperties
6672				err = json.Unmarshal(*v, &expressRouteCrossConnectionPeeringProperties)
6673				if err != nil {
6674					return err
6675				}
6676				erccp.ExpressRouteCrossConnectionPeeringProperties = &expressRouteCrossConnectionPeeringProperties
6677			}
6678		case "name":
6679			if v != nil {
6680				var name string
6681				err = json.Unmarshal(*v, &name)
6682				if err != nil {
6683					return err
6684				}
6685				erccp.Name = &name
6686			}
6687		case "etag":
6688			if v != nil {
6689				var etag string
6690				err = json.Unmarshal(*v, &etag)
6691				if err != nil {
6692					return err
6693				}
6694				erccp.Etag = &etag
6695			}
6696		case "id":
6697			if v != nil {
6698				var ID string
6699				err = json.Unmarshal(*v, &ID)
6700				if err != nil {
6701					return err
6702				}
6703				erccp.ID = &ID
6704			}
6705		}
6706	}
6707
6708	return nil
6709}
6710
6711// ExpressRouteCrossConnectionPeeringList response for ListPeering API service call retrieves all peerings
6712// that belong to an ExpressRouteCrossConnection.
6713type ExpressRouteCrossConnectionPeeringList struct {
6714	autorest.Response `json:"-"`
6715	// Value - The peerings in an express route cross connection.
6716	Value *[]ExpressRouteCrossConnectionPeering `json:"value,omitempty"`
6717	// NextLink - READ-ONLY; The URL to get the next set of results.
6718	NextLink *string `json:"nextLink,omitempty"`
6719}
6720
6721// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeeringList.
6722func (erccpl ExpressRouteCrossConnectionPeeringList) MarshalJSON() ([]byte, error) {
6723	objectMap := make(map[string]interface{})
6724	if erccpl.Value != nil {
6725		objectMap["value"] = erccpl.Value
6726	}
6727	return json.Marshal(objectMap)
6728}
6729
6730// ExpressRouteCrossConnectionPeeringListIterator provides access to a complete listing of
6731// ExpressRouteCrossConnectionPeering values.
6732type ExpressRouteCrossConnectionPeeringListIterator struct {
6733	i    int
6734	page ExpressRouteCrossConnectionPeeringListPage
6735}
6736
6737// NextWithContext advances to the next value.  If there was an error making
6738// the request the iterator does not advance and the error is returned.
6739func (iter *ExpressRouteCrossConnectionPeeringListIterator) NextWithContext(ctx context.Context) (err error) {
6740	if tracing.IsEnabled() {
6741		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringListIterator.NextWithContext")
6742		defer func() {
6743			sc := -1
6744			if iter.Response().Response.Response != nil {
6745				sc = iter.Response().Response.Response.StatusCode
6746			}
6747			tracing.EndSpan(ctx, sc, err)
6748		}()
6749	}
6750	iter.i++
6751	if iter.i < len(iter.page.Values()) {
6752		return nil
6753	}
6754	err = iter.page.NextWithContext(ctx)
6755	if err != nil {
6756		iter.i--
6757		return err
6758	}
6759	iter.i = 0
6760	return nil
6761}
6762
6763// Next advances to the next value.  If there was an error making
6764// the request the iterator does not advance and the error is returned.
6765// Deprecated: Use NextWithContext() instead.
6766func (iter *ExpressRouteCrossConnectionPeeringListIterator) Next() error {
6767	return iter.NextWithContext(context.Background())
6768}
6769
6770// NotDone returns true if the enumeration should be started or is not yet complete.
6771func (iter ExpressRouteCrossConnectionPeeringListIterator) NotDone() bool {
6772	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6773}
6774
6775// Response returns the raw server response from the last page request.
6776func (iter ExpressRouteCrossConnectionPeeringListIterator) Response() ExpressRouteCrossConnectionPeeringList {
6777	return iter.page.Response()
6778}
6779
6780// Value returns the current value or a zero-initialized value if the
6781// iterator has advanced beyond the end of the collection.
6782func (iter ExpressRouteCrossConnectionPeeringListIterator) Value() ExpressRouteCrossConnectionPeering {
6783	if !iter.page.NotDone() {
6784		return ExpressRouteCrossConnectionPeering{}
6785	}
6786	return iter.page.Values()[iter.i]
6787}
6788
6789// Creates a new instance of the ExpressRouteCrossConnectionPeeringListIterator type.
6790func NewExpressRouteCrossConnectionPeeringListIterator(page ExpressRouteCrossConnectionPeeringListPage) ExpressRouteCrossConnectionPeeringListIterator {
6791	return ExpressRouteCrossConnectionPeeringListIterator{page: page}
6792}
6793
6794// IsEmpty returns true if the ListResult contains no values.
6795func (erccpl ExpressRouteCrossConnectionPeeringList) IsEmpty() bool {
6796	return erccpl.Value == nil || len(*erccpl.Value) == 0
6797}
6798
6799// hasNextLink returns true if the NextLink is not empty.
6800func (erccpl ExpressRouteCrossConnectionPeeringList) hasNextLink() bool {
6801	return erccpl.NextLink != nil && len(*erccpl.NextLink) != 0
6802}
6803
6804// expressRouteCrossConnectionPeeringListPreparer prepares a request to retrieve the next set of results.
6805// It returns nil if no more results exist.
6806func (erccpl ExpressRouteCrossConnectionPeeringList) expressRouteCrossConnectionPeeringListPreparer(ctx context.Context) (*http.Request, error) {
6807	if !erccpl.hasNextLink() {
6808		return nil, nil
6809	}
6810	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6811		autorest.AsJSON(),
6812		autorest.AsGet(),
6813		autorest.WithBaseURL(to.String(erccpl.NextLink)))
6814}
6815
6816// ExpressRouteCrossConnectionPeeringListPage contains a page of ExpressRouteCrossConnectionPeering values.
6817type ExpressRouteCrossConnectionPeeringListPage struct {
6818	fn     func(context.Context, ExpressRouteCrossConnectionPeeringList) (ExpressRouteCrossConnectionPeeringList, error)
6819	erccpl ExpressRouteCrossConnectionPeeringList
6820}
6821
6822// NextWithContext advances to the next page of values.  If there was an error making
6823// the request the page does not advance and the error is returned.
6824func (page *ExpressRouteCrossConnectionPeeringListPage) NextWithContext(ctx context.Context) (err error) {
6825	if tracing.IsEnabled() {
6826		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringListPage.NextWithContext")
6827		defer func() {
6828			sc := -1
6829			if page.Response().Response.Response != nil {
6830				sc = page.Response().Response.Response.StatusCode
6831			}
6832			tracing.EndSpan(ctx, sc, err)
6833		}()
6834	}
6835	for {
6836		next, err := page.fn(ctx, page.erccpl)
6837		if err != nil {
6838			return err
6839		}
6840		page.erccpl = next
6841		if !next.hasNextLink() || !next.IsEmpty() {
6842			break
6843		}
6844	}
6845	return nil
6846}
6847
6848// Next advances to the next page of values.  If there was an error making
6849// the request the page does not advance and the error is returned.
6850// Deprecated: Use NextWithContext() instead.
6851func (page *ExpressRouteCrossConnectionPeeringListPage) Next() error {
6852	return page.NextWithContext(context.Background())
6853}
6854
6855// NotDone returns true if the page enumeration should be started or is not yet complete.
6856func (page ExpressRouteCrossConnectionPeeringListPage) NotDone() bool {
6857	return !page.erccpl.IsEmpty()
6858}
6859
6860// Response returns the raw server response from the last page request.
6861func (page ExpressRouteCrossConnectionPeeringListPage) Response() ExpressRouteCrossConnectionPeeringList {
6862	return page.erccpl
6863}
6864
6865// Values returns the slice of values for the current page or nil if there are no values.
6866func (page ExpressRouteCrossConnectionPeeringListPage) Values() []ExpressRouteCrossConnectionPeering {
6867	if page.erccpl.IsEmpty() {
6868		return nil
6869	}
6870	return *page.erccpl.Value
6871}
6872
6873// Creates a new instance of the ExpressRouteCrossConnectionPeeringListPage type.
6874func NewExpressRouteCrossConnectionPeeringListPage(cur ExpressRouteCrossConnectionPeeringList, getNextPage func(context.Context, ExpressRouteCrossConnectionPeeringList) (ExpressRouteCrossConnectionPeeringList, error)) ExpressRouteCrossConnectionPeeringListPage {
6875	return ExpressRouteCrossConnectionPeeringListPage{
6876		fn:     getNextPage,
6877		erccpl: cur,
6878	}
6879}
6880
6881// ExpressRouteCrossConnectionPeeringProperties ...
6882type ExpressRouteCrossConnectionPeeringProperties struct {
6883	// PeeringType - The peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'
6884	PeeringType ExpressRoutePeeringType `json:"peeringType,omitempty"`
6885	// State - The peering state. Possible values include: 'ExpressRoutePeeringStateDisabled', 'ExpressRoutePeeringStateEnabled'
6886	State ExpressRoutePeeringState `json:"state,omitempty"`
6887	// AzureASN - READ-ONLY; The Azure ASN.
6888	AzureASN *int32 `json:"azureASN,omitempty"`
6889	// PeerASN - The peer ASN.
6890	PeerASN *int64 `json:"peerASN,omitempty"`
6891	// PrimaryPeerAddressPrefix - The primary address prefix.
6892	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
6893	// SecondaryPeerAddressPrefix - The secondary address prefix.
6894	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
6895	// PrimaryAzurePort - READ-ONLY; The primary port.
6896	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
6897	// SecondaryAzurePort - READ-ONLY; The secondary port.
6898	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
6899	// SharedKey - The shared key.
6900	SharedKey *string `json:"sharedKey,omitempty"`
6901	// VlanID - The VLAN ID.
6902	VlanID *int32 `json:"vlanId,omitempty"`
6903	// MicrosoftPeeringConfig - The Microsoft peering configuration.
6904	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
6905	// ProvisioningState - READ-ONLY; Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
6906	ProvisioningState *string `json:"provisioningState,omitempty"`
6907	// GatewayManagerEtag - The GatewayManager Etag.
6908	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
6909	// LastModifiedBy - Gets whether the provider or the customer last modified the peering.
6910	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
6911	// Ipv6PeeringConfig - The IPv6 peering configuration.
6912	Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"`
6913}
6914
6915// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeeringProperties.
6916func (erccpp ExpressRouteCrossConnectionPeeringProperties) MarshalJSON() ([]byte, error) {
6917	objectMap := make(map[string]interface{})
6918	if erccpp.PeeringType != "" {
6919		objectMap["peeringType"] = erccpp.PeeringType
6920	}
6921	if erccpp.State != "" {
6922		objectMap["state"] = erccpp.State
6923	}
6924	if erccpp.PeerASN != nil {
6925		objectMap["peerASN"] = erccpp.PeerASN
6926	}
6927	if erccpp.PrimaryPeerAddressPrefix != nil {
6928		objectMap["primaryPeerAddressPrefix"] = erccpp.PrimaryPeerAddressPrefix
6929	}
6930	if erccpp.SecondaryPeerAddressPrefix != nil {
6931		objectMap["secondaryPeerAddressPrefix"] = erccpp.SecondaryPeerAddressPrefix
6932	}
6933	if erccpp.SharedKey != nil {
6934		objectMap["sharedKey"] = erccpp.SharedKey
6935	}
6936	if erccpp.VlanID != nil {
6937		objectMap["vlanId"] = erccpp.VlanID
6938	}
6939	if erccpp.MicrosoftPeeringConfig != nil {
6940		objectMap["microsoftPeeringConfig"] = erccpp.MicrosoftPeeringConfig
6941	}
6942	if erccpp.GatewayManagerEtag != nil {
6943		objectMap["gatewayManagerEtag"] = erccpp.GatewayManagerEtag
6944	}
6945	if erccpp.LastModifiedBy != nil {
6946		objectMap["lastModifiedBy"] = erccpp.LastModifiedBy
6947	}
6948	if erccpp.Ipv6PeeringConfig != nil {
6949		objectMap["ipv6PeeringConfig"] = erccpp.Ipv6PeeringConfig
6950	}
6951	return json.Marshal(objectMap)
6952}
6953
6954// ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
6955// results of a long-running operation.
6956type ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture struct {
6957	azure.FutureAPI
6958	// Result returns the result of the asynchronous operation.
6959	// If the operation has not completed it will return an error.
6960	Result func(ExpressRouteCrossConnectionPeeringsClient) (ExpressRouteCrossConnectionPeering, error)
6961}
6962
6963// ExpressRouteCrossConnectionPeeringsDeleteFuture an abstraction for monitoring and retrieving the results
6964// of a long-running operation.
6965type ExpressRouteCrossConnectionPeeringsDeleteFuture struct {
6966	azure.FutureAPI
6967	// Result returns the result of the asynchronous operation.
6968	// If the operation has not completed it will return an error.
6969	Result func(ExpressRouteCrossConnectionPeeringsClient) (autorest.Response, error)
6970}
6971
6972// ExpressRouteCrossConnectionProperties properties of ExpressRouteCrossConnection.
6973type ExpressRouteCrossConnectionProperties struct {
6974	// PrimaryAzurePort - READ-ONLY; The name of the primary  port.
6975	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
6976	// SecondaryAzurePort - READ-ONLY; The name of the secondary  port.
6977	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
6978	// STag - READ-ONLY; The identifier of the circuit traffic.
6979	STag *int32 `json:"sTag,omitempty"`
6980	// PeeringLocation - The peering location of the ExpressRoute circuit.
6981	PeeringLocation *string `json:"peeringLocation,omitempty"`
6982	// BandwidthInMbps - The circuit bandwidth In Mbps.
6983	BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"`
6984	// ExpressRouteCircuit - The ExpressRouteCircuit
6985	ExpressRouteCircuit *ExpressRouteCircuitReference `json:"expressRouteCircuit,omitempty"`
6986	// 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'
6987	ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"`
6988	// ServiceProviderNotes - Additional read only notes set by the connectivity provider.
6989	ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"`
6990	// ProvisioningState - READ-ONLY; Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
6991	ProvisioningState *string `json:"provisioningState,omitempty"`
6992	// Peerings - The list of peerings.
6993	Peerings *[]ExpressRouteCrossConnectionPeering `json:"peerings,omitempty"`
6994}
6995
6996// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionProperties.
6997func (erccp ExpressRouteCrossConnectionProperties) MarshalJSON() ([]byte, error) {
6998	objectMap := make(map[string]interface{})
6999	if erccp.PeeringLocation != nil {
7000		objectMap["peeringLocation"] = erccp.PeeringLocation
7001	}
7002	if erccp.BandwidthInMbps != nil {
7003		objectMap["bandwidthInMbps"] = erccp.BandwidthInMbps
7004	}
7005	if erccp.ExpressRouteCircuit != nil {
7006		objectMap["expressRouteCircuit"] = erccp.ExpressRouteCircuit
7007	}
7008	if erccp.ServiceProviderProvisioningState != "" {
7009		objectMap["serviceProviderProvisioningState"] = erccp.ServiceProviderProvisioningState
7010	}
7011	if erccp.ServiceProviderNotes != nil {
7012		objectMap["serviceProviderNotes"] = erccp.ServiceProviderNotes
7013	}
7014	if erccp.Peerings != nil {
7015		objectMap["peerings"] = erccp.Peerings
7016	}
7017	return json.Marshal(objectMap)
7018}
7019
7020// ExpressRouteCrossConnectionRoutesTableSummary the routes table associated with the ExpressRouteCircuit.
7021type ExpressRouteCrossConnectionRoutesTableSummary struct {
7022	// Neighbor - IP address of Neighbor router
7023	Neighbor *string `json:"neighbor,omitempty"`
7024	// Asn - Autonomous system number.
7025	Asn *int32 `json:"asn,omitempty"`
7026	// 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.
7027	UpDown *string `json:"upDown,omitempty"`
7028	// StateOrPrefixesReceived - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group.
7029	StateOrPrefixesReceived *string `json:"stateOrPrefixesReceived,omitempty"`
7030}
7031
7032// ExpressRouteCrossConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
7033// results of a long-running operation.
7034type ExpressRouteCrossConnectionsCreateOrUpdateFuture struct {
7035	azure.FutureAPI
7036	// Result returns the result of the asynchronous operation.
7037	// If the operation has not completed it will return an error.
7038	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCrossConnection, error)
7039}
7040
7041// ExpressRouteCrossConnectionsListArpTableFuture an abstraction for monitoring and retrieving the results
7042// of a long-running operation.
7043type ExpressRouteCrossConnectionsListArpTableFuture struct {
7044	azure.FutureAPI
7045	// Result returns the result of the asynchronous operation.
7046	// If the operation has not completed it will return an error.
7047	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCircuitsArpTableListResult, error)
7048}
7049
7050// ExpressRouteCrossConnectionsListRoutesTableFuture an abstraction for monitoring and retrieving the
7051// results of a long-running operation.
7052type ExpressRouteCrossConnectionsListRoutesTableFuture struct {
7053	azure.FutureAPI
7054	// Result returns the result of the asynchronous operation.
7055	// If the operation has not completed it will return an error.
7056	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCircuitsRoutesTableListResult, error)
7057}
7058
7059// ExpressRouteCrossConnectionsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving
7060// the results of a long-running operation.
7061type ExpressRouteCrossConnectionsListRoutesTableSummaryFuture struct {
7062	azure.FutureAPI
7063	// Result returns the result of the asynchronous operation.
7064	// If the operation has not completed it will return an error.
7065	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCrossConnectionsRoutesTableSummaryListResult, error)
7066}
7067
7068// ExpressRouteCrossConnectionsRoutesTableSummaryListResult response for ListRoutesTable associated with
7069// the Express Route Cross Connections.
7070type ExpressRouteCrossConnectionsRoutesTableSummaryListResult struct {
7071	autorest.Response `json:"-"`
7072	// Value - A list of the routes table.
7073	Value *[]ExpressRouteCrossConnectionRoutesTableSummary `json:"value,omitempty"`
7074	// NextLink - READ-ONLY; The URL to get the next set of results.
7075	NextLink *string `json:"nextLink,omitempty"`
7076}
7077
7078// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionsRoutesTableSummaryListResult.
7079func (erccrtslr ExpressRouteCrossConnectionsRoutesTableSummaryListResult) MarshalJSON() ([]byte, error) {
7080	objectMap := make(map[string]interface{})
7081	if erccrtslr.Value != nil {
7082		objectMap["value"] = erccrtslr.Value
7083	}
7084	return json.Marshal(objectMap)
7085}
7086
7087// ExpressRouteCrossConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the results of
7088// a long-running operation.
7089type ExpressRouteCrossConnectionsUpdateTagsFuture struct {
7090	azure.FutureAPI
7091	// Result returns the result of the asynchronous operation.
7092	// If the operation has not completed it will return an error.
7093	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCrossConnection, error)
7094}
7095
7096// ExpressRouteServiceProvider a ExpressRouteResourceProvider object.
7097type ExpressRouteServiceProvider struct {
7098	*ExpressRouteServiceProviderPropertiesFormat `json:"properties,omitempty"`
7099	// ID - Resource ID.
7100	ID *string `json:"id,omitempty"`
7101	// Name - READ-ONLY; Resource name.
7102	Name *string `json:"name,omitempty"`
7103	// Type - READ-ONLY; Resource type.
7104	Type *string `json:"type,omitempty"`
7105	// Location - Resource location.
7106	Location *string `json:"location,omitempty"`
7107	// Tags - Resource tags.
7108	Tags map[string]*string `json:"tags"`
7109}
7110
7111// MarshalJSON is the custom marshaler for ExpressRouteServiceProvider.
7112func (ersp ExpressRouteServiceProvider) MarshalJSON() ([]byte, error) {
7113	objectMap := make(map[string]interface{})
7114	if ersp.ExpressRouteServiceProviderPropertiesFormat != nil {
7115		objectMap["properties"] = ersp.ExpressRouteServiceProviderPropertiesFormat
7116	}
7117	if ersp.ID != nil {
7118		objectMap["id"] = ersp.ID
7119	}
7120	if ersp.Location != nil {
7121		objectMap["location"] = ersp.Location
7122	}
7123	if ersp.Tags != nil {
7124		objectMap["tags"] = ersp.Tags
7125	}
7126	return json.Marshal(objectMap)
7127}
7128
7129// UnmarshalJSON is the custom unmarshaler for ExpressRouteServiceProvider struct.
7130func (ersp *ExpressRouteServiceProvider) UnmarshalJSON(body []byte) error {
7131	var m map[string]*json.RawMessage
7132	err := json.Unmarshal(body, &m)
7133	if err != nil {
7134		return err
7135	}
7136	for k, v := range m {
7137		switch k {
7138		case "properties":
7139			if v != nil {
7140				var expressRouteServiceProviderPropertiesFormat ExpressRouteServiceProviderPropertiesFormat
7141				err = json.Unmarshal(*v, &expressRouteServiceProviderPropertiesFormat)
7142				if err != nil {
7143					return err
7144				}
7145				ersp.ExpressRouteServiceProviderPropertiesFormat = &expressRouteServiceProviderPropertiesFormat
7146			}
7147		case "id":
7148			if v != nil {
7149				var ID string
7150				err = json.Unmarshal(*v, &ID)
7151				if err != nil {
7152					return err
7153				}
7154				ersp.ID = &ID
7155			}
7156		case "name":
7157			if v != nil {
7158				var name string
7159				err = json.Unmarshal(*v, &name)
7160				if err != nil {
7161					return err
7162				}
7163				ersp.Name = &name
7164			}
7165		case "type":
7166			if v != nil {
7167				var typeVar string
7168				err = json.Unmarshal(*v, &typeVar)
7169				if err != nil {
7170					return err
7171				}
7172				ersp.Type = &typeVar
7173			}
7174		case "location":
7175			if v != nil {
7176				var location string
7177				err = json.Unmarshal(*v, &location)
7178				if err != nil {
7179					return err
7180				}
7181				ersp.Location = &location
7182			}
7183		case "tags":
7184			if v != nil {
7185				var tags map[string]*string
7186				err = json.Unmarshal(*v, &tags)
7187				if err != nil {
7188					return err
7189				}
7190				ersp.Tags = tags
7191			}
7192		}
7193	}
7194
7195	return nil
7196}
7197
7198// ExpressRouteServiceProviderBandwidthsOffered contains bandwidths offered in ExpressRouteServiceProvider
7199// resources.
7200type ExpressRouteServiceProviderBandwidthsOffered struct {
7201	// OfferName - The OfferName.
7202	OfferName *string `json:"offerName,omitempty"`
7203	// ValueInMbps - The ValueInMbps.
7204	ValueInMbps *int32 `json:"valueInMbps,omitempty"`
7205}
7206
7207// ExpressRouteServiceProviderListResult response for the ListExpressRouteServiceProvider API service call.
7208type ExpressRouteServiceProviderListResult struct {
7209	autorest.Response `json:"-"`
7210	// Value - A list of ExpressRouteResourceProvider resources.
7211	Value *[]ExpressRouteServiceProvider `json:"value,omitempty"`
7212	// NextLink - The URL to get the next set of results.
7213	NextLink *string `json:"nextLink,omitempty"`
7214}
7215
7216// ExpressRouteServiceProviderListResultIterator provides access to a complete listing of
7217// ExpressRouteServiceProvider values.
7218type ExpressRouteServiceProviderListResultIterator struct {
7219	i    int
7220	page ExpressRouteServiceProviderListResultPage
7221}
7222
7223// NextWithContext advances to the next value.  If there was an error making
7224// the request the iterator does not advance and the error is returned.
7225func (iter *ExpressRouteServiceProviderListResultIterator) NextWithContext(ctx context.Context) (err error) {
7226	if tracing.IsEnabled() {
7227		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultIterator.NextWithContext")
7228		defer func() {
7229			sc := -1
7230			if iter.Response().Response.Response != nil {
7231				sc = iter.Response().Response.Response.StatusCode
7232			}
7233			tracing.EndSpan(ctx, sc, err)
7234		}()
7235	}
7236	iter.i++
7237	if iter.i < len(iter.page.Values()) {
7238		return nil
7239	}
7240	err = iter.page.NextWithContext(ctx)
7241	if err != nil {
7242		iter.i--
7243		return err
7244	}
7245	iter.i = 0
7246	return nil
7247}
7248
7249// Next advances to the next value.  If there was an error making
7250// the request the iterator does not advance and the error is returned.
7251// Deprecated: Use NextWithContext() instead.
7252func (iter *ExpressRouteServiceProviderListResultIterator) Next() error {
7253	return iter.NextWithContext(context.Background())
7254}
7255
7256// NotDone returns true if the enumeration should be started or is not yet complete.
7257func (iter ExpressRouteServiceProviderListResultIterator) NotDone() bool {
7258	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7259}
7260
7261// Response returns the raw server response from the last page request.
7262func (iter ExpressRouteServiceProviderListResultIterator) Response() ExpressRouteServiceProviderListResult {
7263	return iter.page.Response()
7264}
7265
7266// Value returns the current value or a zero-initialized value if the
7267// iterator has advanced beyond the end of the collection.
7268func (iter ExpressRouteServiceProviderListResultIterator) Value() ExpressRouteServiceProvider {
7269	if !iter.page.NotDone() {
7270		return ExpressRouteServiceProvider{}
7271	}
7272	return iter.page.Values()[iter.i]
7273}
7274
7275// Creates a new instance of the ExpressRouteServiceProviderListResultIterator type.
7276func NewExpressRouteServiceProviderListResultIterator(page ExpressRouteServiceProviderListResultPage) ExpressRouteServiceProviderListResultIterator {
7277	return ExpressRouteServiceProviderListResultIterator{page: page}
7278}
7279
7280// IsEmpty returns true if the ListResult contains no values.
7281func (ersplr ExpressRouteServiceProviderListResult) IsEmpty() bool {
7282	return ersplr.Value == nil || len(*ersplr.Value) == 0
7283}
7284
7285// hasNextLink returns true if the NextLink is not empty.
7286func (ersplr ExpressRouteServiceProviderListResult) hasNextLink() bool {
7287	return ersplr.NextLink != nil && len(*ersplr.NextLink) != 0
7288}
7289
7290// expressRouteServiceProviderListResultPreparer prepares a request to retrieve the next set of results.
7291// It returns nil if no more results exist.
7292func (ersplr ExpressRouteServiceProviderListResult) expressRouteServiceProviderListResultPreparer(ctx context.Context) (*http.Request, error) {
7293	if !ersplr.hasNextLink() {
7294		return nil, nil
7295	}
7296	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7297		autorest.AsJSON(),
7298		autorest.AsGet(),
7299		autorest.WithBaseURL(to.String(ersplr.NextLink)))
7300}
7301
7302// ExpressRouteServiceProviderListResultPage contains a page of ExpressRouteServiceProvider values.
7303type ExpressRouteServiceProviderListResultPage struct {
7304	fn     func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)
7305	ersplr ExpressRouteServiceProviderListResult
7306}
7307
7308// NextWithContext advances to the next page of values.  If there was an error making
7309// the request the page does not advance and the error is returned.
7310func (page *ExpressRouteServiceProviderListResultPage) NextWithContext(ctx context.Context) (err error) {
7311	if tracing.IsEnabled() {
7312		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultPage.NextWithContext")
7313		defer func() {
7314			sc := -1
7315			if page.Response().Response.Response != nil {
7316				sc = page.Response().Response.Response.StatusCode
7317			}
7318			tracing.EndSpan(ctx, sc, err)
7319		}()
7320	}
7321	for {
7322		next, err := page.fn(ctx, page.ersplr)
7323		if err != nil {
7324			return err
7325		}
7326		page.ersplr = next
7327		if !next.hasNextLink() || !next.IsEmpty() {
7328			break
7329		}
7330	}
7331	return nil
7332}
7333
7334// Next advances to the next page of values.  If there was an error making
7335// the request the page does not advance and the error is returned.
7336// Deprecated: Use NextWithContext() instead.
7337func (page *ExpressRouteServiceProviderListResultPage) Next() error {
7338	return page.NextWithContext(context.Background())
7339}
7340
7341// NotDone returns true if the page enumeration should be started or is not yet complete.
7342func (page ExpressRouteServiceProviderListResultPage) NotDone() bool {
7343	return !page.ersplr.IsEmpty()
7344}
7345
7346// Response returns the raw server response from the last page request.
7347func (page ExpressRouteServiceProviderListResultPage) Response() ExpressRouteServiceProviderListResult {
7348	return page.ersplr
7349}
7350
7351// Values returns the slice of values for the current page or nil if there are no values.
7352func (page ExpressRouteServiceProviderListResultPage) Values() []ExpressRouteServiceProvider {
7353	if page.ersplr.IsEmpty() {
7354		return nil
7355	}
7356	return *page.ersplr.Value
7357}
7358
7359// Creates a new instance of the ExpressRouteServiceProviderListResultPage type.
7360func NewExpressRouteServiceProviderListResultPage(cur ExpressRouteServiceProviderListResult, getNextPage func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)) ExpressRouteServiceProviderListResultPage {
7361	return ExpressRouteServiceProviderListResultPage{
7362		fn:     getNextPage,
7363		ersplr: cur,
7364	}
7365}
7366
7367// ExpressRouteServiceProviderPropertiesFormat properties of ExpressRouteServiceProvider.
7368type ExpressRouteServiceProviderPropertiesFormat struct {
7369	// PeeringLocations - Get a list of peering locations.
7370	PeeringLocations *[]string `json:"peeringLocations,omitempty"`
7371	// BandwidthsOffered - Gets bandwidths offered.
7372	BandwidthsOffered *[]ExpressRouteServiceProviderBandwidthsOffered `json:"bandwidthsOffered,omitempty"`
7373	// ProvisioningState - Gets the provisioning state of the resource.
7374	ProvisioningState *string `json:"provisioningState,omitempty"`
7375}
7376
7377// FlowLogInformation information on the configuration of flow log and traffic analytics (optional) .
7378type FlowLogInformation struct {
7379	autorest.Response `json:"-"`
7380	// TargetResourceID - The ID of the resource to configure for flow log and traffic analytics (optional) .
7381	TargetResourceID           *string `json:"targetResourceId,omitempty"`
7382	*FlowLogProperties         `json:"properties,omitempty"`
7383	FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"`
7384}
7385
7386// MarshalJSON is the custom marshaler for FlowLogInformation.
7387func (fli FlowLogInformation) MarshalJSON() ([]byte, error) {
7388	objectMap := make(map[string]interface{})
7389	if fli.TargetResourceID != nil {
7390		objectMap["targetResourceId"] = fli.TargetResourceID
7391	}
7392	if fli.FlowLogProperties != nil {
7393		objectMap["properties"] = fli.FlowLogProperties
7394	}
7395	if fli.FlowAnalyticsConfiguration != nil {
7396		objectMap["flowAnalyticsConfiguration"] = fli.FlowAnalyticsConfiguration
7397	}
7398	return json.Marshal(objectMap)
7399}
7400
7401// UnmarshalJSON is the custom unmarshaler for FlowLogInformation struct.
7402func (fli *FlowLogInformation) UnmarshalJSON(body []byte) error {
7403	var m map[string]*json.RawMessage
7404	err := json.Unmarshal(body, &m)
7405	if err != nil {
7406		return err
7407	}
7408	for k, v := range m {
7409		switch k {
7410		case "targetResourceId":
7411			if v != nil {
7412				var targetResourceID string
7413				err = json.Unmarshal(*v, &targetResourceID)
7414				if err != nil {
7415					return err
7416				}
7417				fli.TargetResourceID = &targetResourceID
7418			}
7419		case "properties":
7420			if v != nil {
7421				var flowLogProperties FlowLogProperties
7422				err = json.Unmarshal(*v, &flowLogProperties)
7423				if err != nil {
7424					return err
7425				}
7426				fli.FlowLogProperties = &flowLogProperties
7427			}
7428		case "flowAnalyticsConfiguration":
7429			if v != nil {
7430				var flowAnalyticsConfiguration TrafficAnalyticsProperties
7431				err = json.Unmarshal(*v, &flowAnalyticsConfiguration)
7432				if err != nil {
7433					return err
7434				}
7435				fli.FlowAnalyticsConfiguration = &flowAnalyticsConfiguration
7436			}
7437		}
7438	}
7439
7440	return nil
7441}
7442
7443// FlowLogProperties parameters that define the configuration of flow log.
7444type FlowLogProperties struct {
7445	// StorageID - ID of the storage account which is used to store the flow log.
7446	StorageID *string `json:"storageId,omitempty"`
7447	// Enabled - Flag to enable/disable flow logging.
7448	Enabled         *bool                      `json:"enabled,omitempty"`
7449	RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"`
7450}
7451
7452// FlowLogStatusParameters parameters that define a resource to query flow log and traffic analytics
7453// (optional) status.
7454type FlowLogStatusParameters struct {
7455	// TargetResourceID - The target resource where getting the flow log and traffic analytics (optional) status.
7456	TargetResourceID *string `json:"targetResourceId,omitempty"`
7457}
7458
7459// FrontendIPConfiguration frontend IP address of the load balancer.
7460type FrontendIPConfiguration struct {
7461	autorest.Response `json:"-"`
7462	// FrontendIPConfigurationPropertiesFormat - Properties of the load balancer probe.
7463	*FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"`
7464	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
7465	Name *string `json:"name,omitempty"`
7466	// Etag - A unique read-only string that changes whenever the resource is updated.
7467	Etag *string `json:"etag,omitempty"`
7468	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
7469	Zones *[]string `json:"zones,omitempty"`
7470	// ID - Resource ID.
7471	ID *string `json:"id,omitempty"`
7472}
7473
7474// MarshalJSON is the custom marshaler for FrontendIPConfiguration.
7475func (fic FrontendIPConfiguration) MarshalJSON() ([]byte, error) {
7476	objectMap := make(map[string]interface{})
7477	if fic.FrontendIPConfigurationPropertiesFormat != nil {
7478		objectMap["properties"] = fic.FrontendIPConfigurationPropertiesFormat
7479	}
7480	if fic.Name != nil {
7481		objectMap["name"] = fic.Name
7482	}
7483	if fic.Etag != nil {
7484		objectMap["etag"] = fic.Etag
7485	}
7486	if fic.Zones != nil {
7487		objectMap["zones"] = fic.Zones
7488	}
7489	if fic.ID != nil {
7490		objectMap["id"] = fic.ID
7491	}
7492	return json.Marshal(objectMap)
7493}
7494
7495// UnmarshalJSON is the custom unmarshaler for FrontendIPConfiguration struct.
7496func (fic *FrontendIPConfiguration) UnmarshalJSON(body []byte) error {
7497	var m map[string]*json.RawMessage
7498	err := json.Unmarshal(body, &m)
7499	if err != nil {
7500		return err
7501	}
7502	for k, v := range m {
7503		switch k {
7504		case "properties":
7505			if v != nil {
7506				var frontendIPConfigurationPropertiesFormat FrontendIPConfigurationPropertiesFormat
7507				err = json.Unmarshal(*v, &frontendIPConfigurationPropertiesFormat)
7508				if err != nil {
7509					return err
7510				}
7511				fic.FrontendIPConfigurationPropertiesFormat = &frontendIPConfigurationPropertiesFormat
7512			}
7513		case "name":
7514			if v != nil {
7515				var name string
7516				err = json.Unmarshal(*v, &name)
7517				if err != nil {
7518					return err
7519				}
7520				fic.Name = &name
7521			}
7522		case "etag":
7523			if v != nil {
7524				var etag string
7525				err = json.Unmarshal(*v, &etag)
7526				if err != nil {
7527					return err
7528				}
7529				fic.Etag = &etag
7530			}
7531		case "zones":
7532			if v != nil {
7533				var zones []string
7534				err = json.Unmarshal(*v, &zones)
7535				if err != nil {
7536					return err
7537				}
7538				fic.Zones = &zones
7539			}
7540		case "id":
7541			if v != nil {
7542				var ID string
7543				err = json.Unmarshal(*v, &ID)
7544				if err != nil {
7545					return err
7546				}
7547				fic.ID = &ID
7548			}
7549		}
7550	}
7551
7552	return nil
7553}
7554
7555// FrontendIPConfigurationPropertiesFormat properties of Frontend IP Configuration of the load balancer.
7556type FrontendIPConfigurationPropertiesFormat struct {
7557	// InboundNatRules - READ-ONLY; Read only. Inbound rules URIs that use this frontend IP.
7558	InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"`
7559	// InboundNatPools - READ-ONLY; Read only. Inbound pools URIs that use this frontend IP.
7560	InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"`
7561	// OutboundNatRules - READ-ONLY; Read only. Outbound rules URIs that use this frontend IP.
7562	OutboundNatRules *[]SubResource `json:"outboundNatRules,omitempty"`
7563	// LoadBalancingRules - READ-ONLY; Gets load balancing rules URIs that use this frontend IP.
7564	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
7565	// PrivateIPAddress - The private IP address of the IP configuration.
7566	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
7567	// PrivateIPAllocationMethod - The Private IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
7568	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
7569	// Subnet - The reference of the subnet resource.
7570	Subnet *Subnet `json:"subnet,omitempty"`
7571	// PublicIPAddress - The reference of the Public IP resource.
7572	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
7573	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
7574	ProvisioningState *string `json:"provisioningState,omitempty"`
7575}
7576
7577// MarshalJSON is the custom marshaler for FrontendIPConfigurationPropertiesFormat.
7578func (ficpf FrontendIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
7579	objectMap := make(map[string]interface{})
7580	if ficpf.PrivateIPAddress != nil {
7581		objectMap["privateIPAddress"] = ficpf.PrivateIPAddress
7582	}
7583	if ficpf.PrivateIPAllocationMethod != "" {
7584		objectMap["privateIPAllocationMethod"] = ficpf.PrivateIPAllocationMethod
7585	}
7586	if ficpf.Subnet != nil {
7587		objectMap["subnet"] = ficpf.Subnet
7588	}
7589	if ficpf.PublicIPAddress != nil {
7590		objectMap["publicIPAddress"] = ficpf.PublicIPAddress
7591	}
7592	if ficpf.ProvisioningState != nil {
7593		objectMap["provisioningState"] = ficpf.ProvisioningState
7594	}
7595	return json.Marshal(objectMap)
7596}
7597
7598// GatewayRoute gateway routing details
7599type GatewayRoute struct {
7600	// LocalAddress - READ-ONLY; The gateway's local address
7601	LocalAddress *string `json:"localAddress,omitempty"`
7602	// NetworkProperty - READ-ONLY; The route's network prefix
7603	NetworkProperty *string `json:"network,omitempty"`
7604	// NextHop - READ-ONLY; The route's next hop
7605	NextHop *string `json:"nextHop,omitempty"`
7606	// SourcePeer - READ-ONLY; The peer this route was learned from
7607	SourcePeer *string `json:"sourcePeer,omitempty"`
7608	// Origin - READ-ONLY; The source this route was learned from
7609	Origin *string `json:"origin,omitempty"`
7610	// AsPath - READ-ONLY; The route's AS path sequence
7611	AsPath *string `json:"asPath,omitempty"`
7612	// Weight - READ-ONLY; The route's weight
7613	Weight *int32 `json:"weight,omitempty"`
7614}
7615
7616// GatewayRouteListResult list of virtual network gateway routes
7617type GatewayRouteListResult struct {
7618	autorest.Response `json:"-"`
7619	// Value - List of gateway routes
7620	Value *[]GatewayRoute `json:"value,omitempty"`
7621}
7622
7623// GetVpnSitesConfigurationRequest list of Vpn-Sites
7624type GetVpnSitesConfigurationRequest struct {
7625	// VpnSites - List of resource-ids of the vpn-sites for which config is to be downloaded.
7626	VpnSites *[]SubResource `json:"vpnSites,omitempty"`
7627	// OutputBlobSasURL - The sas-url to download the configurations for vpn-sites
7628	OutputBlobSasURL *string `json:"outputBlobSasUrl,omitempty"`
7629}
7630
7631// HTTPConfiguration HTTP configuration of the connectivity check.
7632type HTTPConfiguration struct {
7633	// Method - HTTP method. Possible values include: 'Get'
7634	Method HTTPMethod `json:"method,omitempty"`
7635	// Headers - List of HTTP headers.
7636	Headers *[]HTTPHeader `json:"headers,omitempty"`
7637	// ValidStatusCodes - Valid status codes.
7638	ValidStatusCodes *[]int32 `json:"validStatusCodes,omitempty"`
7639}
7640
7641// HTTPHeader describes the HTTP header.
7642type HTTPHeader struct {
7643	// Name - The name in HTTP header.
7644	Name *string `json:"name,omitempty"`
7645	// Value - The value in HTTP header.
7646	Value *string `json:"value,omitempty"`
7647}
7648
7649// HubVirtualNetworkConnection hubVirtualNetworkConnection Resource.
7650type HubVirtualNetworkConnection struct {
7651	autorest.Response                      `json:"-"`
7652	*HubVirtualNetworkConnectionProperties `json:"properties,omitempty"`
7653	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
7654	Etag *string `json:"etag,omitempty"`
7655	// ID - Resource ID.
7656	ID *string `json:"id,omitempty"`
7657	// Name - READ-ONLY; Resource name.
7658	Name *string `json:"name,omitempty"`
7659	// Type - READ-ONLY; Resource type.
7660	Type *string `json:"type,omitempty"`
7661	// Location - Resource location.
7662	Location *string `json:"location,omitempty"`
7663	// Tags - Resource tags.
7664	Tags map[string]*string `json:"tags"`
7665}
7666
7667// MarshalJSON is the custom marshaler for HubVirtualNetworkConnection.
7668func (hvnc HubVirtualNetworkConnection) MarshalJSON() ([]byte, error) {
7669	objectMap := make(map[string]interface{})
7670	if hvnc.HubVirtualNetworkConnectionProperties != nil {
7671		objectMap["properties"] = hvnc.HubVirtualNetworkConnectionProperties
7672	}
7673	if hvnc.ID != nil {
7674		objectMap["id"] = hvnc.ID
7675	}
7676	if hvnc.Location != nil {
7677		objectMap["location"] = hvnc.Location
7678	}
7679	if hvnc.Tags != nil {
7680		objectMap["tags"] = hvnc.Tags
7681	}
7682	return json.Marshal(objectMap)
7683}
7684
7685// UnmarshalJSON is the custom unmarshaler for HubVirtualNetworkConnection struct.
7686func (hvnc *HubVirtualNetworkConnection) UnmarshalJSON(body []byte) error {
7687	var m map[string]*json.RawMessage
7688	err := json.Unmarshal(body, &m)
7689	if err != nil {
7690		return err
7691	}
7692	for k, v := range m {
7693		switch k {
7694		case "properties":
7695			if v != nil {
7696				var hubVirtualNetworkConnectionProperties HubVirtualNetworkConnectionProperties
7697				err = json.Unmarshal(*v, &hubVirtualNetworkConnectionProperties)
7698				if err != nil {
7699					return err
7700				}
7701				hvnc.HubVirtualNetworkConnectionProperties = &hubVirtualNetworkConnectionProperties
7702			}
7703		case "etag":
7704			if v != nil {
7705				var etag string
7706				err = json.Unmarshal(*v, &etag)
7707				if err != nil {
7708					return err
7709				}
7710				hvnc.Etag = &etag
7711			}
7712		case "id":
7713			if v != nil {
7714				var ID string
7715				err = json.Unmarshal(*v, &ID)
7716				if err != nil {
7717					return err
7718				}
7719				hvnc.ID = &ID
7720			}
7721		case "name":
7722			if v != nil {
7723				var name string
7724				err = json.Unmarshal(*v, &name)
7725				if err != nil {
7726					return err
7727				}
7728				hvnc.Name = &name
7729			}
7730		case "type":
7731			if v != nil {
7732				var typeVar string
7733				err = json.Unmarshal(*v, &typeVar)
7734				if err != nil {
7735					return err
7736				}
7737				hvnc.Type = &typeVar
7738			}
7739		case "location":
7740			if v != nil {
7741				var location string
7742				err = json.Unmarshal(*v, &location)
7743				if err != nil {
7744					return err
7745				}
7746				hvnc.Location = &location
7747			}
7748		case "tags":
7749			if v != nil {
7750				var tags map[string]*string
7751				err = json.Unmarshal(*v, &tags)
7752				if err != nil {
7753					return err
7754				}
7755				hvnc.Tags = tags
7756			}
7757		}
7758	}
7759
7760	return nil
7761}
7762
7763// HubVirtualNetworkConnectionProperties parameters for HubVirtualNetworkConnection
7764type HubVirtualNetworkConnectionProperties struct {
7765	// RemoteVirtualNetwork - Reference to the remote virtual network.
7766	RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"`
7767	// AllowHubToRemoteVnetTransit - VirtualHub to RemoteVnet transit to enabled or not.
7768	AllowHubToRemoteVnetTransit *bool `json:"allowHubToRemoteVnetTransit,omitempty"`
7769	// AllowRemoteVnetToUseHubVnetGateways - Allow RemoteVnet to use Virtual Hub's gateways.
7770	AllowRemoteVnetToUseHubVnetGateways *bool `json:"allowRemoteVnetToUseHubVnetGateways,omitempty"`
7771	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
7772	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
7773}
7774
7775// InboundNatPool inbound NAT pool of the load balancer.
7776type InboundNatPool struct {
7777	// InboundNatPoolPropertiesFormat - Properties of load balancer inbound nat pool.
7778	*InboundNatPoolPropertiesFormat `json:"properties,omitempty"`
7779	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
7780	Name *string `json:"name,omitempty"`
7781	// Etag - A unique read-only string that changes whenever the resource is updated.
7782	Etag *string `json:"etag,omitempty"`
7783	// ID - Resource ID.
7784	ID *string `json:"id,omitempty"`
7785}
7786
7787// MarshalJSON is the custom marshaler for InboundNatPool.
7788func (inp InboundNatPool) MarshalJSON() ([]byte, error) {
7789	objectMap := make(map[string]interface{})
7790	if inp.InboundNatPoolPropertiesFormat != nil {
7791		objectMap["properties"] = inp.InboundNatPoolPropertiesFormat
7792	}
7793	if inp.Name != nil {
7794		objectMap["name"] = inp.Name
7795	}
7796	if inp.Etag != nil {
7797		objectMap["etag"] = inp.Etag
7798	}
7799	if inp.ID != nil {
7800		objectMap["id"] = inp.ID
7801	}
7802	return json.Marshal(objectMap)
7803}
7804
7805// UnmarshalJSON is the custom unmarshaler for InboundNatPool struct.
7806func (inp *InboundNatPool) UnmarshalJSON(body []byte) error {
7807	var m map[string]*json.RawMessage
7808	err := json.Unmarshal(body, &m)
7809	if err != nil {
7810		return err
7811	}
7812	for k, v := range m {
7813		switch k {
7814		case "properties":
7815			if v != nil {
7816				var inboundNatPoolPropertiesFormat InboundNatPoolPropertiesFormat
7817				err = json.Unmarshal(*v, &inboundNatPoolPropertiesFormat)
7818				if err != nil {
7819					return err
7820				}
7821				inp.InboundNatPoolPropertiesFormat = &inboundNatPoolPropertiesFormat
7822			}
7823		case "name":
7824			if v != nil {
7825				var name string
7826				err = json.Unmarshal(*v, &name)
7827				if err != nil {
7828					return err
7829				}
7830				inp.Name = &name
7831			}
7832		case "etag":
7833			if v != nil {
7834				var etag string
7835				err = json.Unmarshal(*v, &etag)
7836				if err != nil {
7837					return err
7838				}
7839				inp.Etag = &etag
7840			}
7841		case "id":
7842			if v != nil {
7843				var ID string
7844				err = json.Unmarshal(*v, &ID)
7845				if err != nil {
7846					return err
7847				}
7848				inp.ID = &ID
7849			}
7850		}
7851	}
7852
7853	return nil
7854}
7855
7856// InboundNatPoolPropertiesFormat properties of Inbound NAT pool.
7857type InboundNatPoolPropertiesFormat struct {
7858	// FrontendIPConfiguration - A reference to frontend IP addresses.
7859	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
7860	// Protocol - Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
7861	Protocol TransportProtocol `json:"protocol,omitempty"`
7862	// 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.
7863	FrontendPortRangeStart *int32 `json:"frontendPortRangeStart,omitempty"`
7864	// 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.
7865	FrontendPortRangeEnd *int32 `json:"frontendPortRangeEnd,omitempty"`
7866	// BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 1 and 65535.
7867	BackendPort *int32 `json:"backendPort,omitempty"`
7868	// 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.
7869	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
7870	// 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.
7871	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
7872	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
7873	ProvisioningState *string `json:"provisioningState,omitempty"`
7874}
7875
7876// InboundNatRule inbound NAT rule of the load balancer.
7877type InboundNatRule struct {
7878	autorest.Response `json:"-"`
7879	// InboundNatRulePropertiesFormat - Properties of load balancer inbound nat rule.
7880	*InboundNatRulePropertiesFormat `json:"properties,omitempty"`
7881	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
7882	Name *string `json:"name,omitempty"`
7883	// Etag - A unique read-only string that changes whenever the resource is updated.
7884	Etag *string `json:"etag,omitempty"`
7885	// ID - Resource ID.
7886	ID *string `json:"id,omitempty"`
7887}
7888
7889// MarshalJSON is the custom marshaler for InboundNatRule.
7890func (inr InboundNatRule) MarshalJSON() ([]byte, error) {
7891	objectMap := make(map[string]interface{})
7892	if inr.InboundNatRulePropertiesFormat != nil {
7893		objectMap["properties"] = inr.InboundNatRulePropertiesFormat
7894	}
7895	if inr.Name != nil {
7896		objectMap["name"] = inr.Name
7897	}
7898	if inr.Etag != nil {
7899		objectMap["etag"] = inr.Etag
7900	}
7901	if inr.ID != nil {
7902		objectMap["id"] = inr.ID
7903	}
7904	return json.Marshal(objectMap)
7905}
7906
7907// UnmarshalJSON is the custom unmarshaler for InboundNatRule struct.
7908func (inr *InboundNatRule) UnmarshalJSON(body []byte) error {
7909	var m map[string]*json.RawMessage
7910	err := json.Unmarshal(body, &m)
7911	if err != nil {
7912		return err
7913	}
7914	for k, v := range m {
7915		switch k {
7916		case "properties":
7917			if v != nil {
7918				var inboundNatRulePropertiesFormat InboundNatRulePropertiesFormat
7919				err = json.Unmarshal(*v, &inboundNatRulePropertiesFormat)
7920				if err != nil {
7921					return err
7922				}
7923				inr.InboundNatRulePropertiesFormat = &inboundNatRulePropertiesFormat
7924			}
7925		case "name":
7926			if v != nil {
7927				var name string
7928				err = json.Unmarshal(*v, &name)
7929				if err != nil {
7930					return err
7931				}
7932				inr.Name = &name
7933			}
7934		case "etag":
7935			if v != nil {
7936				var etag string
7937				err = json.Unmarshal(*v, &etag)
7938				if err != nil {
7939					return err
7940				}
7941				inr.Etag = &etag
7942			}
7943		case "id":
7944			if v != nil {
7945				var ID string
7946				err = json.Unmarshal(*v, &ID)
7947				if err != nil {
7948					return err
7949				}
7950				inr.ID = &ID
7951			}
7952		}
7953	}
7954
7955	return nil
7956}
7957
7958// InboundNatRuleListResult response for ListInboundNatRule API service call.
7959type InboundNatRuleListResult struct {
7960	autorest.Response `json:"-"`
7961	// Value - A list of inbound nat rules in a load balancer.
7962	Value *[]InboundNatRule `json:"value,omitempty"`
7963	// NextLink - READ-ONLY; The URL to get the next set of results.
7964	NextLink *string `json:"nextLink,omitempty"`
7965}
7966
7967// MarshalJSON is the custom marshaler for InboundNatRuleListResult.
7968func (inrlr InboundNatRuleListResult) MarshalJSON() ([]byte, error) {
7969	objectMap := make(map[string]interface{})
7970	if inrlr.Value != nil {
7971		objectMap["value"] = inrlr.Value
7972	}
7973	return json.Marshal(objectMap)
7974}
7975
7976// InboundNatRuleListResultIterator provides access to a complete listing of InboundNatRule values.
7977type InboundNatRuleListResultIterator struct {
7978	i    int
7979	page InboundNatRuleListResultPage
7980}
7981
7982// NextWithContext advances to the next value.  If there was an error making
7983// the request the iterator does not advance and the error is returned.
7984func (iter *InboundNatRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
7985	if tracing.IsEnabled() {
7986		ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultIterator.NextWithContext")
7987		defer func() {
7988			sc := -1
7989			if iter.Response().Response.Response != nil {
7990				sc = iter.Response().Response.Response.StatusCode
7991			}
7992			tracing.EndSpan(ctx, sc, err)
7993		}()
7994	}
7995	iter.i++
7996	if iter.i < len(iter.page.Values()) {
7997		return nil
7998	}
7999	err = iter.page.NextWithContext(ctx)
8000	if err != nil {
8001		iter.i--
8002		return err
8003	}
8004	iter.i = 0
8005	return nil
8006}
8007
8008// Next advances to the next value.  If there was an error making
8009// the request the iterator does not advance and the error is returned.
8010// Deprecated: Use NextWithContext() instead.
8011func (iter *InboundNatRuleListResultIterator) Next() error {
8012	return iter.NextWithContext(context.Background())
8013}
8014
8015// NotDone returns true if the enumeration should be started or is not yet complete.
8016func (iter InboundNatRuleListResultIterator) NotDone() bool {
8017	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8018}
8019
8020// Response returns the raw server response from the last page request.
8021func (iter InboundNatRuleListResultIterator) Response() InboundNatRuleListResult {
8022	return iter.page.Response()
8023}
8024
8025// Value returns the current value or a zero-initialized value if the
8026// iterator has advanced beyond the end of the collection.
8027func (iter InboundNatRuleListResultIterator) Value() InboundNatRule {
8028	if !iter.page.NotDone() {
8029		return InboundNatRule{}
8030	}
8031	return iter.page.Values()[iter.i]
8032}
8033
8034// Creates a new instance of the InboundNatRuleListResultIterator type.
8035func NewInboundNatRuleListResultIterator(page InboundNatRuleListResultPage) InboundNatRuleListResultIterator {
8036	return InboundNatRuleListResultIterator{page: page}
8037}
8038
8039// IsEmpty returns true if the ListResult contains no values.
8040func (inrlr InboundNatRuleListResult) IsEmpty() bool {
8041	return inrlr.Value == nil || len(*inrlr.Value) == 0
8042}
8043
8044// hasNextLink returns true if the NextLink is not empty.
8045func (inrlr InboundNatRuleListResult) hasNextLink() bool {
8046	return inrlr.NextLink != nil && len(*inrlr.NextLink) != 0
8047}
8048
8049// inboundNatRuleListResultPreparer prepares a request to retrieve the next set of results.
8050// It returns nil if no more results exist.
8051func (inrlr InboundNatRuleListResult) inboundNatRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
8052	if !inrlr.hasNextLink() {
8053		return nil, nil
8054	}
8055	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8056		autorest.AsJSON(),
8057		autorest.AsGet(),
8058		autorest.WithBaseURL(to.String(inrlr.NextLink)))
8059}
8060
8061// InboundNatRuleListResultPage contains a page of InboundNatRule values.
8062type InboundNatRuleListResultPage struct {
8063	fn    func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)
8064	inrlr InboundNatRuleListResult
8065}
8066
8067// NextWithContext advances to the next page of values.  If there was an error making
8068// the request the page does not advance and the error is returned.
8069func (page *InboundNatRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
8070	if tracing.IsEnabled() {
8071		ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultPage.NextWithContext")
8072		defer func() {
8073			sc := -1
8074			if page.Response().Response.Response != nil {
8075				sc = page.Response().Response.Response.StatusCode
8076			}
8077			tracing.EndSpan(ctx, sc, err)
8078		}()
8079	}
8080	for {
8081		next, err := page.fn(ctx, page.inrlr)
8082		if err != nil {
8083			return err
8084		}
8085		page.inrlr = next
8086		if !next.hasNextLink() || !next.IsEmpty() {
8087			break
8088		}
8089	}
8090	return nil
8091}
8092
8093// Next advances to the next page of values.  If there was an error making
8094// the request the page does not advance and the error is returned.
8095// Deprecated: Use NextWithContext() instead.
8096func (page *InboundNatRuleListResultPage) Next() error {
8097	return page.NextWithContext(context.Background())
8098}
8099
8100// NotDone returns true if the page enumeration should be started or is not yet complete.
8101func (page InboundNatRuleListResultPage) NotDone() bool {
8102	return !page.inrlr.IsEmpty()
8103}
8104
8105// Response returns the raw server response from the last page request.
8106func (page InboundNatRuleListResultPage) Response() InboundNatRuleListResult {
8107	return page.inrlr
8108}
8109
8110// Values returns the slice of values for the current page or nil if there are no values.
8111func (page InboundNatRuleListResultPage) Values() []InboundNatRule {
8112	if page.inrlr.IsEmpty() {
8113		return nil
8114	}
8115	return *page.inrlr.Value
8116}
8117
8118// Creates a new instance of the InboundNatRuleListResultPage type.
8119func NewInboundNatRuleListResultPage(cur InboundNatRuleListResult, getNextPage func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)) InboundNatRuleListResultPage {
8120	return InboundNatRuleListResultPage{
8121		fn:    getNextPage,
8122		inrlr: cur,
8123	}
8124}
8125
8126// InboundNatRulePropertiesFormat properties of the inbound NAT rule.
8127type InboundNatRulePropertiesFormat struct {
8128	// FrontendIPConfiguration - A reference to frontend IP addresses.
8129	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
8130	// 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.
8131	BackendIPConfiguration *InterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"`
8132	// Protocol - Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
8133	Protocol TransportProtocol `json:"protocol,omitempty"`
8134	// 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.
8135	FrontendPort *int32 `json:"frontendPort,omitempty"`
8136	// BackendPort - The port used for the internal endpoint. Acceptable values range from 1 to 65535.
8137	BackendPort *int32 `json:"backendPort,omitempty"`
8138	// 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.
8139	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
8140	// 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.
8141	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
8142	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
8143	ProvisioningState *string `json:"provisioningState,omitempty"`
8144}
8145
8146// MarshalJSON is the custom marshaler for InboundNatRulePropertiesFormat.
8147func (inrpf InboundNatRulePropertiesFormat) MarshalJSON() ([]byte, error) {
8148	objectMap := make(map[string]interface{})
8149	if inrpf.FrontendIPConfiguration != nil {
8150		objectMap["frontendIPConfiguration"] = inrpf.FrontendIPConfiguration
8151	}
8152	if inrpf.Protocol != "" {
8153		objectMap["protocol"] = inrpf.Protocol
8154	}
8155	if inrpf.FrontendPort != nil {
8156		objectMap["frontendPort"] = inrpf.FrontendPort
8157	}
8158	if inrpf.BackendPort != nil {
8159		objectMap["backendPort"] = inrpf.BackendPort
8160	}
8161	if inrpf.IdleTimeoutInMinutes != nil {
8162		objectMap["idleTimeoutInMinutes"] = inrpf.IdleTimeoutInMinutes
8163	}
8164	if inrpf.EnableFloatingIP != nil {
8165		objectMap["enableFloatingIP"] = inrpf.EnableFloatingIP
8166	}
8167	if inrpf.ProvisioningState != nil {
8168		objectMap["provisioningState"] = inrpf.ProvisioningState
8169	}
8170	return json.Marshal(objectMap)
8171}
8172
8173// InboundNatRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
8174// long-running operation.
8175type InboundNatRulesCreateOrUpdateFuture struct {
8176	azure.FutureAPI
8177	// Result returns the result of the asynchronous operation.
8178	// If the operation has not completed it will return an error.
8179	Result func(InboundNatRulesClient) (InboundNatRule, error)
8180}
8181
8182// InboundNatRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
8183// operation.
8184type InboundNatRulesDeleteFuture struct {
8185	azure.FutureAPI
8186	// Result returns the result of the asynchronous operation.
8187	// If the operation has not completed it will return an error.
8188	Result func(InboundNatRulesClient) (autorest.Response, error)
8189}
8190
8191// Interface a network interface in a resource group.
8192type Interface struct {
8193	autorest.Response `json:"-"`
8194	// InterfacePropertiesFormat - Properties of the network interface.
8195	*InterfacePropertiesFormat `json:"properties,omitempty"`
8196	// Etag - A unique read-only string that changes whenever the resource is updated.
8197	Etag *string `json:"etag,omitempty"`
8198	// ID - Resource ID.
8199	ID *string `json:"id,omitempty"`
8200	// Name - READ-ONLY; Resource name.
8201	Name *string `json:"name,omitempty"`
8202	// Type - READ-ONLY; Resource type.
8203	Type *string `json:"type,omitempty"`
8204	// Location - Resource location.
8205	Location *string `json:"location,omitempty"`
8206	// Tags - Resource tags.
8207	Tags map[string]*string `json:"tags"`
8208}
8209
8210// MarshalJSON is the custom marshaler for Interface.
8211func (i Interface) MarshalJSON() ([]byte, error) {
8212	objectMap := make(map[string]interface{})
8213	if i.InterfacePropertiesFormat != nil {
8214		objectMap["properties"] = i.InterfacePropertiesFormat
8215	}
8216	if i.Etag != nil {
8217		objectMap["etag"] = i.Etag
8218	}
8219	if i.ID != nil {
8220		objectMap["id"] = i.ID
8221	}
8222	if i.Location != nil {
8223		objectMap["location"] = i.Location
8224	}
8225	if i.Tags != nil {
8226		objectMap["tags"] = i.Tags
8227	}
8228	return json.Marshal(objectMap)
8229}
8230
8231// UnmarshalJSON is the custom unmarshaler for Interface struct.
8232func (i *Interface) UnmarshalJSON(body []byte) error {
8233	var m map[string]*json.RawMessage
8234	err := json.Unmarshal(body, &m)
8235	if err != nil {
8236		return err
8237	}
8238	for k, v := range m {
8239		switch k {
8240		case "properties":
8241			if v != nil {
8242				var interfacePropertiesFormat InterfacePropertiesFormat
8243				err = json.Unmarshal(*v, &interfacePropertiesFormat)
8244				if err != nil {
8245					return err
8246				}
8247				i.InterfacePropertiesFormat = &interfacePropertiesFormat
8248			}
8249		case "etag":
8250			if v != nil {
8251				var etag string
8252				err = json.Unmarshal(*v, &etag)
8253				if err != nil {
8254					return err
8255				}
8256				i.Etag = &etag
8257			}
8258		case "id":
8259			if v != nil {
8260				var ID string
8261				err = json.Unmarshal(*v, &ID)
8262				if err != nil {
8263					return err
8264				}
8265				i.ID = &ID
8266			}
8267		case "name":
8268			if v != nil {
8269				var name string
8270				err = json.Unmarshal(*v, &name)
8271				if err != nil {
8272					return err
8273				}
8274				i.Name = &name
8275			}
8276		case "type":
8277			if v != nil {
8278				var typeVar string
8279				err = json.Unmarshal(*v, &typeVar)
8280				if err != nil {
8281					return err
8282				}
8283				i.Type = &typeVar
8284			}
8285		case "location":
8286			if v != nil {
8287				var location string
8288				err = json.Unmarshal(*v, &location)
8289				if err != nil {
8290					return err
8291				}
8292				i.Location = &location
8293			}
8294		case "tags":
8295			if v != nil {
8296				var tags map[string]*string
8297				err = json.Unmarshal(*v, &tags)
8298				if err != nil {
8299					return err
8300				}
8301				i.Tags = tags
8302			}
8303		}
8304	}
8305
8306	return nil
8307}
8308
8309// InterfaceAssociation network interface and its custom security rules.
8310type InterfaceAssociation struct {
8311	// ID - READ-ONLY; Network interface ID.
8312	ID *string `json:"id,omitempty"`
8313	// SecurityRules - Collection of custom security rules.
8314	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
8315}
8316
8317// MarshalJSON is the custom marshaler for InterfaceAssociation.
8318func (ia InterfaceAssociation) MarshalJSON() ([]byte, error) {
8319	objectMap := make(map[string]interface{})
8320	if ia.SecurityRules != nil {
8321		objectMap["securityRules"] = ia.SecurityRules
8322	}
8323	return json.Marshal(objectMap)
8324}
8325
8326// InterfaceDNSSettings DNS settings of a network interface.
8327type InterfaceDNSSettings struct {
8328	// 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.
8329	DNSServers *[]string `json:"dnsServers,omitempty"`
8330	// 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.
8331	AppliedDNSServers *[]string `json:"appliedDnsServers,omitempty"`
8332	// InternalDNSNameLabel - Relative DNS name for this NIC used for internal communications between VMs in the same virtual network.
8333	InternalDNSNameLabel *string `json:"internalDnsNameLabel,omitempty"`
8334	// InternalFqdn - Fully qualified DNS name supporting internal communications between VMs in the same virtual network.
8335	InternalFqdn *string `json:"internalFqdn,omitempty"`
8336	// 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.
8337	InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"`
8338}
8339
8340// InterfaceIPConfiguration iPConfiguration in a network interface.
8341type InterfaceIPConfiguration struct {
8342	autorest.Response `json:"-"`
8343	// InterfaceIPConfigurationPropertiesFormat - Network interface IP configuration properties.
8344	*InterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"`
8345	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
8346	Name *string `json:"name,omitempty"`
8347	// Etag - A unique read-only string that changes whenever the resource is updated.
8348	Etag *string `json:"etag,omitempty"`
8349	// ID - Resource ID.
8350	ID *string `json:"id,omitempty"`
8351}
8352
8353// MarshalJSON is the custom marshaler for InterfaceIPConfiguration.
8354func (iic InterfaceIPConfiguration) MarshalJSON() ([]byte, error) {
8355	objectMap := make(map[string]interface{})
8356	if iic.InterfaceIPConfigurationPropertiesFormat != nil {
8357		objectMap["properties"] = iic.InterfaceIPConfigurationPropertiesFormat
8358	}
8359	if iic.Name != nil {
8360		objectMap["name"] = iic.Name
8361	}
8362	if iic.Etag != nil {
8363		objectMap["etag"] = iic.Etag
8364	}
8365	if iic.ID != nil {
8366		objectMap["id"] = iic.ID
8367	}
8368	return json.Marshal(objectMap)
8369}
8370
8371// UnmarshalJSON is the custom unmarshaler for InterfaceIPConfiguration struct.
8372func (iic *InterfaceIPConfiguration) UnmarshalJSON(body []byte) error {
8373	var m map[string]*json.RawMessage
8374	err := json.Unmarshal(body, &m)
8375	if err != nil {
8376		return err
8377	}
8378	for k, v := range m {
8379		switch k {
8380		case "properties":
8381			if v != nil {
8382				var interfaceIPConfigurationPropertiesFormat InterfaceIPConfigurationPropertiesFormat
8383				err = json.Unmarshal(*v, &interfaceIPConfigurationPropertiesFormat)
8384				if err != nil {
8385					return err
8386				}
8387				iic.InterfaceIPConfigurationPropertiesFormat = &interfaceIPConfigurationPropertiesFormat
8388			}
8389		case "name":
8390			if v != nil {
8391				var name string
8392				err = json.Unmarshal(*v, &name)
8393				if err != nil {
8394					return err
8395				}
8396				iic.Name = &name
8397			}
8398		case "etag":
8399			if v != nil {
8400				var etag string
8401				err = json.Unmarshal(*v, &etag)
8402				if err != nil {
8403					return err
8404				}
8405				iic.Etag = &etag
8406			}
8407		case "id":
8408			if v != nil {
8409				var ID string
8410				err = json.Unmarshal(*v, &ID)
8411				if err != nil {
8412					return err
8413				}
8414				iic.ID = &ID
8415			}
8416		}
8417	}
8418
8419	return nil
8420}
8421
8422// InterfaceIPConfigurationListResult response for list ip configurations API service call.
8423type InterfaceIPConfigurationListResult struct {
8424	autorest.Response `json:"-"`
8425	// Value - A list of ip configurations.
8426	Value *[]InterfaceIPConfiguration `json:"value,omitempty"`
8427	// NextLink - READ-ONLY; The URL to get the next set of results.
8428	NextLink *string `json:"nextLink,omitempty"`
8429}
8430
8431// MarshalJSON is the custom marshaler for InterfaceIPConfigurationListResult.
8432func (iiclr InterfaceIPConfigurationListResult) MarshalJSON() ([]byte, error) {
8433	objectMap := make(map[string]interface{})
8434	if iiclr.Value != nil {
8435		objectMap["value"] = iiclr.Value
8436	}
8437	return json.Marshal(objectMap)
8438}
8439
8440// InterfaceIPConfigurationListResultIterator provides access to a complete listing of
8441// InterfaceIPConfiguration values.
8442type InterfaceIPConfigurationListResultIterator struct {
8443	i    int
8444	page InterfaceIPConfigurationListResultPage
8445}
8446
8447// NextWithContext advances to the next value.  If there was an error making
8448// the request the iterator does not advance and the error is returned.
8449func (iter *InterfaceIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
8450	if tracing.IsEnabled() {
8451		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultIterator.NextWithContext")
8452		defer func() {
8453			sc := -1
8454			if iter.Response().Response.Response != nil {
8455				sc = iter.Response().Response.Response.StatusCode
8456			}
8457			tracing.EndSpan(ctx, sc, err)
8458		}()
8459	}
8460	iter.i++
8461	if iter.i < len(iter.page.Values()) {
8462		return nil
8463	}
8464	err = iter.page.NextWithContext(ctx)
8465	if err != nil {
8466		iter.i--
8467		return err
8468	}
8469	iter.i = 0
8470	return nil
8471}
8472
8473// Next advances to the next value.  If there was an error making
8474// the request the iterator does not advance and the error is returned.
8475// Deprecated: Use NextWithContext() instead.
8476func (iter *InterfaceIPConfigurationListResultIterator) Next() error {
8477	return iter.NextWithContext(context.Background())
8478}
8479
8480// NotDone returns true if the enumeration should be started or is not yet complete.
8481func (iter InterfaceIPConfigurationListResultIterator) NotDone() bool {
8482	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8483}
8484
8485// Response returns the raw server response from the last page request.
8486func (iter InterfaceIPConfigurationListResultIterator) Response() InterfaceIPConfigurationListResult {
8487	return iter.page.Response()
8488}
8489
8490// Value returns the current value or a zero-initialized value if the
8491// iterator has advanced beyond the end of the collection.
8492func (iter InterfaceIPConfigurationListResultIterator) Value() InterfaceIPConfiguration {
8493	if !iter.page.NotDone() {
8494		return InterfaceIPConfiguration{}
8495	}
8496	return iter.page.Values()[iter.i]
8497}
8498
8499// Creates a new instance of the InterfaceIPConfigurationListResultIterator type.
8500func NewInterfaceIPConfigurationListResultIterator(page InterfaceIPConfigurationListResultPage) InterfaceIPConfigurationListResultIterator {
8501	return InterfaceIPConfigurationListResultIterator{page: page}
8502}
8503
8504// IsEmpty returns true if the ListResult contains no values.
8505func (iiclr InterfaceIPConfigurationListResult) IsEmpty() bool {
8506	return iiclr.Value == nil || len(*iiclr.Value) == 0
8507}
8508
8509// hasNextLink returns true if the NextLink is not empty.
8510func (iiclr InterfaceIPConfigurationListResult) hasNextLink() bool {
8511	return iiclr.NextLink != nil && len(*iiclr.NextLink) != 0
8512}
8513
8514// interfaceIPConfigurationListResultPreparer prepares a request to retrieve the next set of results.
8515// It returns nil if no more results exist.
8516func (iiclr InterfaceIPConfigurationListResult) interfaceIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
8517	if !iiclr.hasNextLink() {
8518		return nil, nil
8519	}
8520	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8521		autorest.AsJSON(),
8522		autorest.AsGet(),
8523		autorest.WithBaseURL(to.String(iiclr.NextLink)))
8524}
8525
8526// InterfaceIPConfigurationListResultPage contains a page of InterfaceIPConfiguration values.
8527type InterfaceIPConfigurationListResultPage struct {
8528	fn    func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)
8529	iiclr InterfaceIPConfigurationListResult
8530}
8531
8532// NextWithContext advances to the next page of values.  If there was an error making
8533// the request the page does not advance and the error is returned.
8534func (page *InterfaceIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
8535	if tracing.IsEnabled() {
8536		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultPage.NextWithContext")
8537		defer func() {
8538			sc := -1
8539			if page.Response().Response.Response != nil {
8540				sc = page.Response().Response.Response.StatusCode
8541			}
8542			tracing.EndSpan(ctx, sc, err)
8543		}()
8544	}
8545	for {
8546		next, err := page.fn(ctx, page.iiclr)
8547		if err != nil {
8548			return err
8549		}
8550		page.iiclr = next
8551		if !next.hasNextLink() || !next.IsEmpty() {
8552			break
8553		}
8554	}
8555	return nil
8556}
8557
8558// Next advances to the next page of values.  If there was an error making
8559// the request the page does not advance and the error is returned.
8560// Deprecated: Use NextWithContext() instead.
8561func (page *InterfaceIPConfigurationListResultPage) Next() error {
8562	return page.NextWithContext(context.Background())
8563}
8564
8565// NotDone returns true if the page enumeration should be started or is not yet complete.
8566func (page InterfaceIPConfigurationListResultPage) NotDone() bool {
8567	return !page.iiclr.IsEmpty()
8568}
8569
8570// Response returns the raw server response from the last page request.
8571func (page InterfaceIPConfigurationListResultPage) Response() InterfaceIPConfigurationListResult {
8572	return page.iiclr
8573}
8574
8575// Values returns the slice of values for the current page or nil if there are no values.
8576func (page InterfaceIPConfigurationListResultPage) Values() []InterfaceIPConfiguration {
8577	if page.iiclr.IsEmpty() {
8578		return nil
8579	}
8580	return *page.iiclr.Value
8581}
8582
8583// Creates a new instance of the InterfaceIPConfigurationListResultPage type.
8584func NewInterfaceIPConfigurationListResultPage(cur InterfaceIPConfigurationListResult, getNextPage func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)) InterfaceIPConfigurationListResultPage {
8585	return InterfaceIPConfigurationListResultPage{
8586		fn:    getNextPage,
8587		iiclr: cur,
8588	}
8589}
8590
8591// InterfaceIPConfigurationPropertiesFormat properties of IP configuration.
8592type InterfaceIPConfigurationPropertiesFormat struct {
8593	// ApplicationGatewayBackendAddressPools - The reference of ApplicationGatewayBackendAddressPool resource.
8594	ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"`
8595	// LoadBalancerBackendAddressPools - The reference of LoadBalancerBackendAddressPool resource.
8596	LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"`
8597	// LoadBalancerInboundNatRules - A list of references of LoadBalancerInboundNatRules.
8598	LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"`
8599	// PrivateIPAddress - Private IP address of the IP configuration.
8600	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
8601	// PrivateIPAllocationMethod - Defines how a private IP address is assigned. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
8602	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
8603	// 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'
8604	PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
8605	// Subnet - Subnet bound to the IP configuration.
8606	Subnet *Subnet `json:"subnet,omitempty"`
8607	// Primary - Gets whether this is a primary customer address on the network interface.
8608	Primary *bool `json:"primary,omitempty"`
8609	// PublicIPAddress - Public IP address bound to the IP configuration.
8610	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
8611	// ApplicationSecurityGroups - Application security groups in which the IP configuration is included.
8612	ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"`
8613	// ProvisioningState - The provisioning state of the network interface IP configuration. Possible values are: 'Updating', 'Deleting', and 'Failed'.
8614	ProvisioningState *string `json:"provisioningState,omitempty"`
8615}
8616
8617// InterfaceListResult response for the ListNetworkInterface API service call.
8618type InterfaceListResult struct {
8619	autorest.Response `json:"-"`
8620	// Value - A list of network interfaces in a resource group.
8621	Value *[]Interface `json:"value,omitempty"`
8622	// NextLink - READ-ONLY; The URL to get the next set of results.
8623	NextLink *string `json:"nextLink,omitempty"`
8624}
8625
8626// MarshalJSON is the custom marshaler for InterfaceListResult.
8627func (ilr InterfaceListResult) MarshalJSON() ([]byte, error) {
8628	objectMap := make(map[string]interface{})
8629	if ilr.Value != nil {
8630		objectMap["value"] = ilr.Value
8631	}
8632	return json.Marshal(objectMap)
8633}
8634
8635// InterfaceListResultIterator provides access to a complete listing of Interface values.
8636type InterfaceListResultIterator struct {
8637	i    int
8638	page InterfaceListResultPage
8639}
8640
8641// NextWithContext advances to the next value.  If there was an error making
8642// the request the iterator does not advance and the error is returned.
8643func (iter *InterfaceListResultIterator) NextWithContext(ctx context.Context) (err error) {
8644	if tracing.IsEnabled() {
8645		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultIterator.NextWithContext")
8646		defer func() {
8647			sc := -1
8648			if iter.Response().Response.Response != nil {
8649				sc = iter.Response().Response.Response.StatusCode
8650			}
8651			tracing.EndSpan(ctx, sc, err)
8652		}()
8653	}
8654	iter.i++
8655	if iter.i < len(iter.page.Values()) {
8656		return nil
8657	}
8658	err = iter.page.NextWithContext(ctx)
8659	if err != nil {
8660		iter.i--
8661		return err
8662	}
8663	iter.i = 0
8664	return nil
8665}
8666
8667// Next advances to the next value.  If there was an error making
8668// the request the iterator does not advance and the error is returned.
8669// Deprecated: Use NextWithContext() instead.
8670func (iter *InterfaceListResultIterator) Next() error {
8671	return iter.NextWithContext(context.Background())
8672}
8673
8674// NotDone returns true if the enumeration should be started or is not yet complete.
8675func (iter InterfaceListResultIterator) NotDone() bool {
8676	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8677}
8678
8679// Response returns the raw server response from the last page request.
8680func (iter InterfaceListResultIterator) Response() InterfaceListResult {
8681	return iter.page.Response()
8682}
8683
8684// Value returns the current value or a zero-initialized value if the
8685// iterator has advanced beyond the end of the collection.
8686func (iter InterfaceListResultIterator) Value() Interface {
8687	if !iter.page.NotDone() {
8688		return Interface{}
8689	}
8690	return iter.page.Values()[iter.i]
8691}
8692
8693// Creates a new instance of the InterfaceListResultIterator type.
8694func NewInterfaceListResultIterator(page InterfaceListResultPage) InterfaceListResultIterator {
8695	return InterfaceListResultIterator{page: page}
8696}
8697
8698// IsEmpty returns true if the ListResult contains no values.
8699func (ilr InterfaceListResult) IsEmpty() bool {
8700	return ilr.Value == nil || len(*ilr.Value) == 0
8701}
8702
8703// hasNextLink returns true if the NextLink is not empty.
8704func (ilr InterfaceListResult) hasNextLink() bool {
8705	return ilr.NextLink != nil && len(*ilr.NextLink) != 0
8706}
8707
8708// interfaceListResultPreparer prepares a request to retrieve the next set of results.
8709// It returns nil if no more results exist.
8710func (ilr InterfaceListResult) interfaceListResultPreparer(ctx context.Context) (*http.Request, error) {
8711	if !ilr.hasNextLink() {
8712		return nil, nil
8713	}
8714	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8715		autorest.AsJSON(),
8716		autorest.AsGet(),
8717		autorest.WithBaseURL(to.String(ilr.NextLink)))
8718}
8719
8720// InterfaceListResultPage contains a page of Interface values.
8721type InterfaceListResultPage struct {
8722	fn  func(context.Context, InterfaceListResult) (InterfaceListResult, error)
8723	ilr InterfaceListResult
8724}
8725
8726// NextWithContext advances to the next page of values.  If there was an error making
8727// the request the page does not advance and the error is returned.
8728func (page *InterfaceListResultPage) NextWithContext(ctx context.Context) (err error) {
8729	if tracing.IsEnabled() {
8730		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultPage.NextWithContext")
8731		defer func() {
8732			sc := -1
8733			if page.Response().Response.Response != nil {
8734				sc = page.Response().Response.Response.StatusCode
8735			}
8736			tracing.EndSpan(ctx, sc, err)
8737		}()
8738	}
8739	for {
8740		next, err := page.fn(ctx, page.ilr)
8741		if err != nil {
8742			return err
8743		}
8744		page.ilr = next
8745		if !next.hasNextLink() || !next.IsEmpty() {
8746			break
8747		}
8748	}
8749	return nil
8750}
8751
8752// Next advances to the next page of values.  If there was an error making
8753// the request the page does not advance and the error is returned.
8754// Deprecated: Use NextWithContext() instead.
8755func (page *InterfaceListResultPage) Next() error {
8756	return page.NextWithContext(context.Background())
8757}
8758
8759// NotDone returns true if the page enumeration should be started or is not yet complete.
8760func (page InterfaceListResultPage) NotDone() bool {
8761	return !page.ilr.IsEmpty()
8762}
8763
8764// Response returns the raw server response from the last page request.
8765func (page InterfaceListResultPage) Response() InterfaceListResult {
8766	return page.ilr
8767}
8768
8769// Values returns the slice of values for the current page or nil if there are no values.
8770func (page InterfaceListResultPage) Values() []Interface {
8771	if page.ilr.IsEmpty() {
8772		return nil
8773	}
8774	return *page.ilr.Value
8775}
8776
8777// Creates a new instance of the InterfaceListResultPage type.
8778func NewInterfaceListResultPage(cur InterfaceListResult, getNextPage func(context.Context, InterfaceListResult) (InterfaceListResult, error)) InterfaceListResultPage {
8779	return InterfaceListResultPage{
8780		fn:  getNextPage,
8781		ilr: cur,
8782	}
8783}
8784
8785// InterfaceLoadBalancerListResult response for list ip configurations API service call.
8786type InterfaceLoadBalancerListResult struct {
8787	autorest.Response `json:"-"`
8788	// Value - A list of load balancers.
8789	Value *[]LoadBalancer `json:"value,omitempty"`
8790	// NextLink - READ-ONLY; The URL to get the next set of results.
8791	NextLink *string `json:"nextLink,omitempty"`
8792}
8793
8794// MarshalJSON is the custom marshaler for InterfaceLoadBalancerListResult.
8795func (ilblr InterfaceLoadBalancerListResult) MarshalJSON() ([]byte, error) {
8796	objectMap := make(map[string]interface{})
8797	if ilblr.Value != nil {
8798		objectMap["value"] = ilblr.Value
8799	}
8800	return json.Marshal(objectMap)
8801}
8802
8803// InterfaceLoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values.
8804type InterfaceLoadBalancerListResultIterator struct {
8805	i    int
8806	page InterfaceLoadBalancerListResultPage
8807}
8808
8809// NextWithContext advances to the next value.  If there was an error making
8810// the request the iterator does not advance and the error is returned.
8811func (iter *InterfaceLoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) {
8812	if tracing.IsEnabled() {
8813		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultIterator.NextWithContext")
8814		defer func() {
8815			sc := -1
8816			if iter.Response().Response.Response != nil {
8817				sc = iter.Response().Response.Response.StatusCode
8818			}
8819			tracing.EndSpan(ctx, sc, err)
8820		}()
8821	}
8822	iter.i++
8823	if iter.i < len(iter.page.Values()) {
8824		return nil
8825	}
8826	err = iter.page.NextWithContext(ctx)
8827	if err != nil {
8828		iter.i--
8829		return err
8830	}
8831	iter.i = 0
8832	return nil
8833}
8834
8835// Next advances to the next value.  If there was an error making
8836// the request the iterator does not advance and the error is returned.
8837// Deprecated: Use NextWithContext() instead.
8838func (iter *InterfaceLoadBalancerListResultIterator) Next() error {
8839	return iter.NextWithContext(context.Background())
8840}
8841
8842// NotDone returns true if the enumeration should be started or is not yet complete.
8843func (iter InterfaceLoadBalancerListResultIterator) NotDone() bool {
8844	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8845}
8846
8847// Response returns the raw server response from the last page request.
8848func (iter InterfaceLoadBalancerListResultIterator) Response() InterfaceLoadBalancerListResult {
8849	return iter.page.Response()
8850}
8851
8852// Value returns the current value or a zero-initialized value if the
8853// iterator has advanced beyond the end of the collection.
8854func (iter InterfaceLoadBalancerListResultIterator) Value() LoadBalancer {
8855	if !iter.page.NotDone() {
8856		return LoadBalancer{}
8857	}
8858	return iter.page.Values()[iter.i]
8859}
8860
8861// Creates a new instance of the InterfaceLoadBalancerListResultIterator type.
8862func NewInterfaceLoadBalancerListResultIterator(page InterfaceLoadBalancerListResultPage) InterfaceLoadBalancerListResultIterator {
8863	return InterfaceLoadBalancerListResultIterator{page: page}
8864}
8865
8866// IsEmpty returns true if the ListResult contains no values.
8867func (ilblr InterfaceLoadBalancerListResult) IsEmpty() bool {
8868	return ilblr.Value == nil || len(*ilblr.Value) == 0
8869}
8870
8871// hasNextLink returns true if the NextLink is not empty.
8872func (ilblr InterfaceLoadBalancerListResult) hasNextLink() bool {
8873	return ilblr.NextLink != nil && len(*ilblr.NextLink) != 0
8874}
8875
8876// interfaceLoadBalancerListResultPreparer prepares a request to retrieve the next set of results.
8877// It returns nil if no more results exist.
8878func (ilblr InterfaceLoadBalancerListResult) interfaceLoadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) {
8879	if !ilblr.hasNextLink() {
8880		return nil, nil
8881	}
8882	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8883		autorest.AsJSON(),
8884		autorest.AsGet(),
8885		autorest.WithBaseURL(to.String(ilblr.NextLink)))
8886}
8887
8888// InterfaceLoadBalancerListResultPage contains a page of LoadBalancer values.
8889type InterfaceLoadBalancerListResultPage struct {
8890	fn    func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)
8891	ilblr InterfaceLoadBalancerListResult
8892}
8893
8894// NextWithContext advances to the next page of values.  If there was an error making
8895// the request the page does not advance and the error is returned.
8896func (page *InterfaceLoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) {
8897	if tracing.IsEnabled() {
8898		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultPage.NextWithContext")
8899		defer func() {
8900			sc := -1
8901			if page.Response().Response.Response != nil {
8902				sc = page.Response().Response.Response.StatusCode
8903			}
8904			tracing.EndSpan(ctx, sc, err)
8905		}()
8906	}
8907	for {
8908		next, err := page.fn(ctx, page.ilblr)
8909		if err != nil {
8910			return err
8911		}
8912		page.ilblr = next
8913		if !next.hasNextLink() || !next.IsEmpty() {
8914			break
8915		}
8916	}
8917	return nil
8918}
8919
8920// Next advances to the next page of values.  If there was an error making
8921// the request the page does not advance and the error is returned.
8922// Deprecated: Use NextWithContext() instead.
8923func (page *InterfaceLoadBalancerListResultPage) Next() error {
8924	return page.NextWithContext(context.Background())
8925}
8926
8927// NotDone returns true if the page enumeration should be started or is not yet complete.
8928func (page InterfaceLoadBalancerListResultPage) NotDone() bool {
8929	return !page.ilblr.IsEmpty()
8930}
8931
8932// Response returns the raw server response from the last page request.
8933func (page InterfaceLoadBalancerListResultPage) Response() InterfaceLoadBalancerListResult {
8934	return page.ilblr
8935}
8936
8937// Values returns the slice of values for the current page or nil if there are no values.
8938func (page InterfaceLoadBalancerListResultPage) Values() []LoadBalancer {
8939	if page.ilblr.IsEmpty() {
8940		return nil
8941	}
8942	return *page.ilblr.Value
8943}
8944
8945// Creates a new instance of the InterfaceLoadBalancerListResultPage type.
8946func NewInterfaceLoadBalancerListResultPage(cur InterfaceLoadBalancerListResult, getNextPage func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)) InterfaceLoadBalancerListResultPage {
8947	return InterfaceLoadBalancerListResultPage{
8948		fn:    getNextPage,
8949		ilblr: cur,
8950	}
8951}
8952
8953// InterfacePropertiesFormat networkInterface properties.
8954type InterfacePropertiesFormat struct {
8955	// VirtualMachine - The reference of a virtual machine.
8956	VirtualMachine *SubResource `json:"virtualMachine,omitempty"`
8957	// NetworkSecurityGroup - The reference of the NetworkSecurityGroup resource.
8958	NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"`
8959	// IPConfigurations - A list of IPConfigurations of the network interface.
8960	IPConfigurations *[]InterfaceIPConfiguration `json:"ipConfigurations,omitempty"`
8961	// DNSSettings - The DNS settings in network interface.
8962	DNSSettings *InterfaceDNSSettings `json:"dnsSettings,omitempty"`
8963	// MacAddress - The MAC address of the network interface.
8964	MacAddress *string `json:"macAddress,omitempty"`
8965	// Primary - Gets whether this is a primary network interface on a virtual machine.
8966	Primary *bool `json:"primary,omitempty"`
8967	// EnableAcceleratedNetworking - If the network interface is accelerated networking enabled.
8968	EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"`
8969	// EnableIPForwarding - Indicates whether IP forwarding is enabled on this network interface.
8970	EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"`
8971	// ResourceGUID - The resource GUID property of the network interface resource.
8972	ResourceGUID *string `json:"resourceGuid,omitempty"`
8973	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
8974	ProvisioningState *string `json:"provisioningState,omitempty"`
8975}
8976
8977// InterfacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
8978// long-running operation.
8979type InterfacesCreateOrUpdateFuture struct {
8980	azure.FutureAPI
8981	// Result returns the result of the asynchronous operation.
8982	// If the operation has not completed it will return an error.
8983	Result func(InterfacesClient) (Interface, error)
8984}
8985
8986// InterfacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
8987// operation.
8988type InterfacesDeleteFuture struct {
8989	azure.FutureAPI
8990	// Result returns the result of the asynchronous operation.
8991	// If the operation has not completed it will return an error.
8992	Result func(InterfacesClient) (autorest.Response, error)
8993}
8994
8995// InterfacesGetEffectiveRouteTableFuture an abstraction for monitoring and retrieving the results of a
8996// long-running operation.
8997type InterfacesGetEffectiveRouteTableFuture struct {
8998	azure.FutureAPI
8999	// Result returns the result of the asynchronous operation.
9000	// If the operation has not completed it will return an error.
9001	Result func(InterfacesClient) (EffectiveRouteListResult, error)
9002}
9003
9004// InterfacesListEffectiveNetworkSecurityGroupsFuture an abstraction for monitoring and retrieving the
9005// results of a long-running operation.
9006type InterfacesListEffectiveNetworkSecurityGroupsFuture struct {
9007	azure.FutureAPI
9008	// Result returns the result of the asynchronous operation.
9009	// If the operation has not completed it will return an error.
9010	Result func(InterfacesClient) (EffectiveNetworkSecurityGroupListResult, error)
9011}
9012
9013// InterfacesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
9014// operation.
9015type InterfacesUpdateTagsFuture struct {
9016	azure.FutureAPI
9017	// Result returns the result of the asynchronous operation.
9018	// If the operation has not completed it will return an error.
9019	Result func(InterfacesClient) (Interface, error)
9020}
9021
9022// IPAddressAvailabilityResult response for CheckIPAddressAvailability API service call
9023type IPAddressAvailabilityResult struct {
9024	autorest.Response `json:"-"`
9025	// Available - Private IP address availability.
9026	Available *bool `json:"available,omitempty"`
9027	// AvailableIPAddresses - Contains other available private IP addresses if the asked for address is taken.
9028	AvailableIPAddresses *[]string `json:"availableIPAddresses,omitempty"`
9029}
9030
9031// IPConfiguration IP configuration
9032type IPConfiguration struct {
9033	// IPConfigurationPropertiesFormat - Properties of the IP configuration
9034	*IPConfigurationPropertiesFormat `json:"properties,omitempty"`
9035	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
9036	Name *string `json:"name,omitempty"`
9037	// Etag - A unique read-only string that changes whenever the resource is updated.
9038	Etag *string `json:"etag,omitempty"`
9039	// ID - Resource ID.
9040	ID *string `json:"id,omitempty"`
9041}
9042
9043// MarshalJSON is the custom marshaler for IPConfiguration.
9044func (ic IPConfiguration) MarshalJSON() ([]byte, error) {
9045	objectMap := make(map[string]interface{})
9046	if ic.IPConfigurationPropertiesFormat != nil {
9047		objectMap["properties"] = ic.IPConfigurationPropertiesFormat
9048	}
9049	if ic.Name != nil {
9050		objectMap["name"] = ic.Name
9051	}
9052	if ic.Etag != nil {
9053		objectMap["etag"] = ic.Etag
9054	}
9055	if ic.ID != nil {
9056		objectMap["id"] = ic.ID
9057	}
9058	return json.Marshal(objectMap)
9059}
9060
9061// UnmarshalJSON is the custom unmarshaler for IPConfiguration struct.
9062func (ic *IPConfiguration) UnmarshalJSON(body []byte) error {
9063	var m map[string]*json.RawMessage
9064	err := json.Unmarshal(body, &m)
9065	if err != nil {
9066		return err
9067	}
9068	for k, v := range m {
9069		switch k {
9070		case "properties":
9071			if v != nil {
9072				var IPConfigurationPropertiesFormat IPConfigurationPropertiesFormat
9073				err = json.Unmarshal(*v, &IPConfigurationPropertiesFormat)
9074				if err != nil {
9075					return err
9076				}
9077				ic.IPConfigurationPropertiesFormat = &IPConfigurationPropertiesFormat
9078			}
9079		case "name":
9080			if v != nil {
9081				var name string
9082				err = json.Unmarshal(*v, &name)
9083				if err != nil {
9084					return err
9085				}
9086				ic.Name = &name
9087			}
9088		case "etag":
9089			if v != nil {
9090				var etag string
9091				err = json.Unmarshal(*v, &etag)
9092				if err != nil {
9093					return err
9094				}
9095				ic.Etag = &etag
9096			}
9097		case "id":
9098			if v != nil {
9099				var ID string
9100				err = json.Unmarshal(*v, &ID)
9101				if err != nil {
9102					return err
9103				}
9104				ic.ID = &ID
9105			}
9106		}
9107	}
9108
9109	return nil
9110}
9111
9112// IPConfigurationPropertiesFormat properties of IP configuration.
9113type IPConfigurationPropertiesFormat struct {
9114	// PrivateIPAddress - The private IP address of the IP configuration.
9115	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
9116	// PrivateIPAllocationMethod - The private IP allocation method. Possible values are 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
9117	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
9118	// Subnet - The reference of the subnet resource.
9119	Subnet *Subnet `json:"subnet,omitempty"`
9120	// PublicIPAddress - The reference of the public IP resource.
9121	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
9122	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
9123	ProvisioningState *string `json:"provisioningState,omitempty"`
9124}
9125
9126// IpsecPolicy an IPSec Policy configuration for a virtual network gateway connection
9127type IpsecPolicy struct {
9128	// SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for a site to site VPN tunnel.
9129	SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"`
9130	// SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for a site to site VPN tunnel.
9131	SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"`
9132	// IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256'
9133	IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"`
9134	// IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256'
9135	IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"`
9136	// IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128'
9137	IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"`
9138	// IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'IkeIntegrityMD5', 'IkeIntegritySHA1', 'IkeIntegritySHA256', 'IkeIntegritySHA384', 'IkeIntegrityGCMAES256', 'IkeIntegrityGCMAES128'
9139	IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"`
9140	// DhGroup - The DH Groups used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24'
9141	DhGroup DhGroup `json:"dhGroup,omitempty"`
9142	// 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'
9143	PfsGroup PfsGroup `json:"pfsGroup,omitempty"`
9144}
9145
9146// IPTag contains the IpTag associated with the public IP address
9147type IPTag struct {
9148	// IPTagType - Gets or sets the ipTag type: Example FirstPartyUsage.
9149	IPTagType *string `json:"ipTagType,omitempty"`
9150	// Tag - Gets or sets value of the IpTag associated with the public IP. Example SQL, Storage etc
9151	Tag *string `json:"tag,omitempty"`
9152}
9153
9154// Ipv6ExpressRouteCircuitPeeringConfig contains IPv6 peering config.
9155type Ipv6ExpressRouteCircuitPeeringConfig struct {
9156	// PrimaryPeerAddressPrefix - The primary address prefix.
9157	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
9158	// SecondaryPeerAddressPrefix - The secondary address prefix.
9159	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
9160	// MicrosoftPeeringConfig - The Microsoft peering configuration.
9161	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
9162	// RouteFilter - The reference of the RouteFilter resource.
9163	RouteFilter *RouteFilter `json:"routeFilter,omitempty"`
9164	// State - The state of peering. Possible values are: 'Disabled' and 'Enabled'. Possible values include: 'ExpressRouteCircuitPeeringStateDisabled', 'ExpressRouteCircuitPeeringStateEnabled'
9165	State ExpressRouteCircuitPeeringState `json:"state,omitempty"`
9166}
9167
9168// ListHubVirtualNetworkConnectionsResult list of HubVirtualNetworkConnections and a URL nextLink to get
9169// the next set of results.
9170type ListHubVirtualNetworkConnectionsResult struct {
9171	autorest.Response `json:"-"`
9172	// Value - List of HubVirtualNetworkConnections.
9173	Value *[]HubVirtualNetworkConnection `json:"value,omitempty"`
9174	// NextLink - URL to get the next set of operation list results if there are any.
9175	NextLink *string `json:"nextLink,omitempty"`
9176}
9177
9178// ListHubVirtualNetworkConnectionsResultIterator provides access to a complete listing of
9179// HubVirtualNetworkConnection values.
9180type ListHubVirtualNetworkConnectionsResultIterator struct {
9181	i    int
9182	page ListHubVirtualNetworkConnectionsResultPage
9183}
9184
9185// NextWithContext advances to the next value.  If there was an error making
9186// the request the iterator does not advance and the error is returned.
9187func (iter *ListHubVirtualNetworkConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
9188	if tracing.IsEnabled() {
9189		ctx = tracing.StartSpan(ctx, fqdn+"/ListHubVirtualNetworkConnectionsResultIterator.NextWithContext")
9190		defer func() {
9191			sc := -1
9192			if iter.Response().Response.Response != nil {
9193				sc = iter.Response().Response.Response.StatusCode
9194			}
9195			tracing.EndSpan(ctx, sc, err)
9196		}()
9197	}
9198	iter.i++
9199	if iter.i < len(iter.page.Values()) {
9200		return nil
9201	}
9202	err = iter.page.NextWithContext(ctx)
9203	if err != nil {
9204		iter.i--
9205		return err
9206	}
9207	iter.i = 0
9208	return nil
9209}
9210
9211// Next advances to the next value.  If there was an error making
9212// the request the iterator does not advance and the error is returned.
9213// Deprecated: Use NextWithContext() instead.
9214func (iter *ListHubVirtualNetworkConnectionsResultIterator) Next() error {
9215	return iter.NextWithContext(context.Background())
9216}
9217
9218// NotDone returns true if the enumeration should be started or is not yet complete.
9219func (iter ListHubVirtualNetworkConnectionsResultIterator) NotDone() bool {
9220	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9221}
9222
9223// Response returns the raw server response from the last page request.
9224func (iter ListHubVirtualNetworkConnectionsResultIterator) Response() ListHubVirtualNetworkConnectionsResult {
9225	return iter.page.Response()
9226}
9227
9228// Value returns the current value or a zero-initialized value if the
9229// iterator has advanced beyond the end of the collection.
9230func (iter ListHubVirtualNetworkConnectionsResultIterator) Value() HubVirtualNetworkConnection {
9231	if !iter.page.NotDone() {
9232		return HubVirtualNetworkConnection{}
9233	}
9234	return iter.page.Values()[iter.i]
9235}
9236
9237// Creates a new instance of the ListHubVirtualNetworkConnectionsResultIterator type.
9238func NewListHubVirtualNetworkConnectionsResultIterator(page ListHubVirtualNetworkConnectionsResultPage) ListHubVirtualNetworkConnectionsResultIterator {
9239	return ListHubVirtualNetworkConnectionsResultIterator{page: page}
9240}
9241
9242// IsEmpty returns true if the ListResult contains no values.
9243func (lhvncr ListHubVirtualNetworkConnectionsResult) IsEmpty() bool {
9244	return lhvncr.Value == nil || len(*lhvncr.Value) == 0
9245}
9246
9247// hasNextLink returns true if the NextLink is not empty.
9248func (lhvncr ListHubVirtualNetworkConnectionsResult) hasNextLink() bool {
9249	return lhvncr.NextLink != nil && len(*lhvncr.NextLink) != 0
9250}
9251
9252// listHubVirtualNetworkConnectionsResultPreparer prepares a request to retrieve the next set of results.
9253// It returns nil if no more results exist.
9254func (lhvncr ListHubVirtualNetworkConnectionsResult) listHubVirtualNetworkConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
9255	if !lhvncr.hasNextLink() {
9256		return nil, nil
9257	}
9258	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9259		autorest.AsJSON(),
9260		autorest.AsGet(),
9261		autorest.WithBaseURL(to.String(lhvncr.NextLink)))
9262}
9263
9264// ListHubVirtualNetworkConnectionsResultPage contains a page of HubVirtualNetworkConnection values.
9265type ListHubVirtualNetworkConnectionsResultPage struct {
9266	fn     func(context.Context, ListHubVirtualNetworkConnectionsResult) (ListHubVirtualNetworkConnectionsResult, error)
9267	lhvncr ListHubVirtualNetworkConnectionsResult
9268}
9269
9270// NextWithContext advances to the next page of values.  If there was an error making
9271// the request the page does not advance and the error is returned.
9272func (page *ListHubVirtualNetworkConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
9273	if tracing.IsEnabled() {
9274		ctx = tracing.StartSpan(ctx, fqdn+"/ListHubVirtualNetworkConnectionsResultPage.NextWithContext")
9275		defer func() {
9276			sc := -1
9277			if page.Response().Response.Response != nil {
9278				sc = page.Response().Response.Response.StatusCode
9279			}
9280			tracing.EndSpan(ctx, sc, err)
9281		}()
9282	}
9283	for {
9284		next, err := page.fn(ctx, page.lhvncr)
9285		if err != nil {
9286			return err
9287		}
9288		page.lhvncr = next
9289		if !next.hasNextLink() || !next.IsEmpty() {
9290			break
9291		}
9292	}
9293	return nil
9294}
9295
9296// Next advances to the next page of values.  If there was an error making
9297// the request the page does not advance and the error is returned.
9298// Deprecated: Use NextWithContext() instead.
9299func (page *ListHubVirtualNetworkConnectionsResultPage) Next() error {
9300	return page.NextWithContext(context.Background())
9301}
9302
9303// NotDone returns true if the page enumeration should be started or is not yet complete.
9304func (page ListHubVirtualNetworkConnectionsResultPage) NotDone() bool {
9305	return !page.lhvncr.IsEmpty()
9306}
9307
9308// Response returns the raw server response from the last page request.
9309func (page ListHubVirtualNetworkConnectionsResultPage) Response() ListHubVirtualNetworkConnectionsResult {
9310	return page.lhvncr
9311}
9312
9313// Values returns the slice of values for the current page or nil if there are no values.
9314func (page ListHubVirtualNetworkConnectionsResultPage) Values() []HubVirtualNetworkConnection {
9315	if page.lhvncr.IsEmpty() {
9316		return nil
9317	}
9318	return *page.lhvncr.Value
9319}
9320
9321// Creates a new instance of the ListHubVirtualNetworkConnectionsResultPage type.
9322func NewListHubVirtualNetworkConnectionsResultPage(cur ListHubVirtualNetworkConnectionsResult, getNextPage func(context.Context, ListHubVirtualNetworkConnectionsResult) (ListHubVirtualNetworkConnectionsResult, error)) ListHubVirtualNetworkConnectionsResultPage {
9323	return ListHubVirtualNetworkConnectionsResultPage{
9324		fn:     getNextPage,
9325		lhvncr: cur,
9326	}
9327}
9328
9329// ListVirtualHubsResult result of the request to list VirtualHubs. It contains a list of VirtualHubs and a
9330// URL nextLink to get the next set of results.
9331type ListVirtualHubsResult struct {
9332	autorest.Response `json:"-"`
9333	// Value - List of VirtualHubs.
9334	Value *[]VirtualHub `json:"value,omitempty"`
9335	// NextLink - URL to get the next set of operation list results if there are any.
9336	NextLink *string `json:"nextLink,omitempty"`
9337}
9338
9339// ListVirtualHubsResultIterator provides access to a complete listing of VirtualHub values.
9340type ListVirtualHubsResultIterator struct {
9341	i    int
9342	page ListVirtualHubsResultPage
9343}
9344
9345// NextWithContext advances to the next value.  If there was an error making
9346// the request the iterator does not advance and the error is returned.
9347func (iter *ListVirtualHubsResultIterator) NextWithContext(ctx context.Context) (err error) {
9348	if tracing.IsEnabled() {
9349		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubsResultIterator.NextWithContext")
9350		defer func() {
9351			sc := -1
9352			if iter.Response().Response.Response != nil {
9353				sc = iter.Response().Response.Response.StatusCode
9354			}
9355			tracing.EndSpan(ctx, sc, err)
9356		}()
9357	}
9358	iter.i++
9359	if iter.i < len(iter.page.Values()) {
9360		return nil
9361	}
9362	err = iter.page.NextWithContext(ctx)
9363	if err != nil {
9364		iter.i--
9365		return err
9366	}
9367	iter.i = 0
9368	return nil
9369}
9370
9371// Next advances to the next value.  If there was an error making
9372// the request the iterator does not advance and the error is returned.
9373// Deprecated: Use NextWithContext() instead.
9374func (iter *ListVirtualHubsResultIterator) Next() error {
9375	return iter.NextWithContext(context.Background())
9376}
9377
9378// NotDone returns true if the enumeration should be started or is not yet complete.
9379func (iter ListVirtualHubsResultIterator) NotDone() bool {
9380	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9381}
9382
9383// Response returns the raw server response from the last page request.
9384func (iter ListVirtualHubsResultIterator) Response() ListVirtualHubsResult {
9385	return iter.page.Response()
9386}
9387
9388// Value returns the current value or a zero-initialized value if the
9389// iterator has advanced beyond the end of the collection.
9390func (iter ListVirtualHubsResultIterator) Value() VirtualHub {
9391	if !iter.page.NotDone() {
9392		return VirtualHub{}
9393	}
9394	return iter.page.Values()[iter.i]
9395}
9396
9397// Creates a new instance of the ListVirtualHubsResultIterator type.
9398func NewListVirtualHubsResultIterator(page ListVirtualHubsResultPage) ListVirtualHubsResultIterator {
9399	return ListVirtualHubsResultIterator{page: page}
9400}
9401
9402// IsEmpty returns true if the ListResult contains no values.
9403func (lvhr ListVirtualHubsResult) IsEmpty() bool {
9404	return lvhr.Value == nil || len(*lvhr.Value) == 0
9405}
9406
9407// hasNextLink returns true if the NextLink is not empty.
9408func (lvhr ListVirtualHubsResult) hasNextLink() bool {
9409	return lvhr.NextLink != nil && len(*lvhr.NextLink) != 0
9410}
9411
9412// listVirtualHubsResultPreparer prepares a request to retrieve the next set of results.
9413// It returns nil if no more results exist.
9414func (lvhr ListVirtualHubsResult) listVirtualHubsResultPreparer(ctx context.Context) (*http.Request, error) {
9415	if !lvhr.hasNextLink() {
9416		return nil, nil
9417	}
9418	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9419		autorest.AsJSON(),
9420		autorest.AsGet(),
9421		autorest.WithBaseURL(to.String(lvhr.NextLink)))
9422}
9423
9424// ListVirtualHubsResultPage contains a page of VirtualHub values.
9425type ListVirtualHubsResultPage struct {
9426	fn   func(context.Context, ListVirtualHubsResult) (ListVirtualHubsResult, error)
9427	lvhr ListVirtualHubsResult
9428}
9429
9430// NextWithContext advances to the next page of values.  If there was an error making
9431// the request the page does not advance and the error is returned.
9432func (page *ListVirtualHubsResultPage) NextWithContext(ctx context.Context) (err error) {
9433	if tracing.IsEnabled() {
9434		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubsResultPage.NextWithContext")
9435		defer func() {
9436			sc := -1
9437			if page.Response().Response.Response != nil {
9438				sc = page.Response().Response.Response.StatusCode
9439			}
9440			tracing.EndSpan(ctx, sc, err)
9441		}()
9442	}
9443	for {
9444		next, err := page.fn(ctx, page.lvhr)
9445		if err != nil {
9446			return err
9447		}
9448		page.lvhr = next
9449		if !next.hasNextLink() || !next.IsEmpty() {
9450			break
9451		}
9452	}
9453	return nil
9454}
9455
9456// Next advances to the next page of values.  If there was an error making
9457// the request the page does not advance and the error is returned.
9458// Deprecated: Use NextWithContext() instead.
9459func (page *ListVirtualHubsResultPage) Next() error {
9460	return page.NextWithContext(context.Background())
9461}
9462
9463// NotDone returns true if the page enumeration should be started or is not yet complete.
9464func (page ListVirtualHubsResultPage) NotDone() bool {
9465	return !page.lvhr.IsEmpty()
9466}
9467
9468// Response returns the raw server response from the last page request.
9469func (page ListVirtualHubsResultPage) Response() ListVirtualHubsResult {
9470	return page.lvhr
9471}
9472
9473// Values returns the slice of values for the current page or nil if there are no values.
9474func (page ListVirtualHubsResultPage) Values() []VirtualHub {
9475	if page.lvhr.IsEmpty() {
9476		return nil
9477	}
9478	return *page.lvhr.Value
9479}
9480
9481// Creates a new instance of the ListVirtualHubsResultPage type.
9482func NewListVirtualHubsResultPage(cur ListVirtualHubsResult, getNextPage func(context.Context, ListVirtualHubsResult) (ListVirtualHubsResult, error)) ListVirtualHubsResultPage {
9483	return ListVirtualHubsResultPage{
9484		fn:   getNextPage,
9485		lvhr: cur,
9486	}
9487}
9488
9489// ListVirtualWANsResult result of the request to list VirtualWANs. It contains a list of VirtualWANs and a
9490// URL nextLink to get the next set of results.
9491type ListVirtualWANsResult struct {
9492	autorest.Response `json:"-"`
9493	// Value - List of VirtualWANs.
9494	Value *[]VirtualWAN `json:"value,omitempty"`
9495	// NextLink - URL to get the next set of operation list results if there are any.
9496	NextLink *string `json:"nextLink,omitempty"`
9497}
9498
9499// ListVirtualWANsResultIterator provides access to a complete listing of VirtualWAN values.
9500type ListVirtualWANsResultIterator struct {
9501	i    int
9502	page ListVirtualWANsResultPage
9503}
9504
9505// NextWithContext advances to the next value.  If there was an error making
9506// the request the iterator does not advance and the error is returned.
9507func (iter *ListVirtualWANsResultIterator) NextWithContext(ctx context.Context) (err error) {
9508	if tracing.IsEnabled() {
9509		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualWANsResultIterator.NextWithContext")
9510		defer func() {
9511			sc := -1
9512			if iter.Response().Response.Response != nil {
9513				sc = iter.Response().Response.Response.StatusCode
9514			}
9515			tracing.EndSpan(ctx, sc, err)
9516		}()
9517	}
9518	iter.i++
9519	if iter.i < len(iter.page.Values()) {
9520		return nil
9521	}
9522	err = iter.page.NextWithContext(ctx)
9523	if err != nil {
9524		iter.i--
9525		return err
9526	}
9527	iter.i = 0
9528	return nil
9529}
9530
9531// Next advances to the next value.  If there was an error making
9532// the request the iterator does not advance and the error is returned.
9533// Deprecated: Use NextWithContext() instead.
9534func (iter *ListVirtualWANsResultIterator) Next() error {
9535	return iter.NextWithContext(context.Background())
9536}
9537
9538// NotDone returns true if the enumeration should be started or is not yet complete.
9539func (iter ListVirtualWANsResultIterator) NotDone() bool {
9540	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9541}
9542
9543// Response returns the raw server response from the last page request.
9544func (iter ListVirtualWANsResultIterator) Response() ListVirtualWANsResult {
9545	return iter.page.Response()
9546}
9547
9548// Value returns the current value or a zero-initialized value if the
9549// iterator has advanced beyond the end of the collection.
9550func (iter ListVirtualWANsResultIterator) Value() VirtualWAN {
9551	if !iter.page.NotDone() {
9552		return VirtualWAN{}
9553	}
9554	return iter.page.Values()[iter.i]
9555}
9556
9557// Creates a new instance of the ListVirtualWANsResultIterator type.
9558func NewListVirtualWANsResultIterator(page ListVirtualWANsResultPage) ListVirtualWANsResultIterator {
9559	return ListVirtualWANsResultIterator{page: page}
9560}
9561
9562// IsEmpty returns true if the ListResult contains no values.
9563func (lvwnr ListVirtualWANsResult) IsEmpty() bool {
9564	return lvwnr.Value == nil || len(*lvwnr.Value) == 0
9565}
9566
9567// hasNextLink returns true if the NextLink is not empty.
9568func (lvwnr ListVirtualWANsResult) hasNextLink() bool {
9569	return lvwnr.NextLink != nil && len(*lvwnr.NextLink) != 0
9570}
9571
9572// listVirtualWANsResultPreparer prepares a request to retrieve the next set of results.
9573// It returns nil if no more results exist.
9574func (lvwnr ListVirtualWANsResult) listVirtualWANsResultPreparer(ctx context.Context) (*http.Request, error) {
9575	if !lvwnr.hasNextLink() {
9576		return nil, nil
9577	}
9578	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9579		autorest.AsJSON(),
9580		autorest.AsGet(),
9581		autorest.WithBaseURL(to.String(lvwnr.NextLink)))
9582}
9583
9584// ListVirtualWANsResultPage contains a page of VirtualWAN values.
9585type ListVirtualWANsResultPage struct {
9586	fn    func(context.Context, ListVirtualWANsResult) (ListVirtualWANsResult, error)
9587	lvwnr ListVirtualWANsResult
9588}
9589
9590// NextWithContext advances to the next page of values.  If there was an error making
9591// the request the page does not advance and the error is returned.
9592func (page *ListVirtualWANsResultPage) NextWithContext(ctx context.Context) (err error) {
9593	if tracing.IsEnabled() {
9594		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualWANsResultPage.NextWithContext")
9595		defer func() {
9596			sc := -1
9597			if page.Response().Response.Response != nil {
9598				sc = page.Response().Response.Response.StatusCode
9599			}
9600			tracing.EndSpan(ctx, sc, err)
9601		}()
9602	}
9603	for {
9604		next, err := page.fn(ctx, page.lvwnr)
9605		if err != nil {
9606			return err
9607		}
9608		page.lvwnr = next
9609		if !next.hasNextLink() || !next.IsEmpty() {
9610			break
9611		}
9612	}
9613	return nil
9614}
9615
9616// Next advances to the next page of values.  If there was an error making
9617// the request the page does not advance and the error is returned.
9618// Deprecated: Use NextWithContext() instead.
9619func (page *ListVirtualWANsResultPage) Next() error {
9620	return page.NextWithContext(context.Background())
9621}
9622
9623// NotDone returns true if the page enumeration should be started or is not yet complete.
9624func (page ListVirtualWANsResultPage) NotDone() bool {
9625	return !page.lvwnr.IsEmpty()
9626}
9627
9628// Response returns the raw server response from the last page request.
9629func (page ListVirtualWANsResultPage) Response() ListVirtualWANsResult {
9630	return page.lvwnr
9631}
9632
9633// Values returns the slice of values for the current page or nil if there are no values.
9634func (page ListVirtualWANsResultPage) Values() []VirtualWAN {
9635	if page.lvwnr.IsEmpty() {
9636		return nil
9637	}
9638	return *page.lvwnr.Value
9639}
9640
9641// Creates a new instance of the ListVirtualWANsResultPage type.
9642func NewListVirtualWANsResultPage(cur ListVirtualWANsResult, getNextPage func(context.Context, ListVirtualWANsResult) (ListVirtualWANsResult, error)) ListVirtualWANsResultPage {
9643	return ListVirtualWANsResultPage{
9644		fn:    getNextPage,
9645		lvwnr: cur,
9646	}
9647}
9648
9649// ListVpnConnectionsResult result of the request to list all vpn connections to a virtual wan vpn gateway.
9650// It contains a list of Vpn Connections and a URL nextLink to get the next set of results.
9651type ListVpnConnectionsResult struct {
9652	autorest.Response `json:"-"`
9653	// Value - List of Vpn Connections.
9654	Value *[]VpnConnection `json:"value,omitempty"`
9655	// NextLink - URL to get the next set of operation list results if there are any.
9656	NextLink *string `json:"nextLink,omitempty"`
9657}
9658
9659// ListVpnConnectionsResultIterator provides access to a complete listing of VpnConnection values.
9660type ListVpnConnectionsResultIterator struct {
9661	i    int
9662	page ListVpnConnectionsResultPage
9663}
9664
9665// NextWithContext advances to the next value.  If there was an error making
9666// the request the iterator does not advance and the error is returned.
9667func (iter *ListVpnConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
9668	if tracing.IsEnabled() {
9669		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnConnectionsResultIterator.NextWithContext")
9670		defer func() {
9671			sc := -1
9672			if iter.Response().Response.Response != nil {
9673				sc = iter.Response().Response.Response.StatusCode
9674			}
9675			tracing.EndSpan(ctx, sc, err)
9676		}()
9677	}
9678	iter.i++
9679	if iter.i < len(iter.page.Values()) {
9680		return nil
9681	}
9682	err = iter.page.NextWithContext(ctx)
9683	if err != nil {
9684		iter.i--
9685		return err
9686	}
9687	iter.i = 0
9688	return nil
9689}
9690
9691// Next advances to the next value.  If there was an error making
9692// the request the iterator does not advance and the error is returned.
9693// Deprecated: Use NextWithContext() instead.
9694func (iter *ListVpnConnectionsResultIterator) Next() error {
9695	return iter.NextWithContext(context.Background())
9696}
9697
9698// NotDone returns true if the enumeration should be started or is not yet complete.
9699func (iter ListVpnConnectionsResultIterator) NotDone() bool {
9700	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9701}
9702
9703// Response returns the raw server response from the last page request.
9704func (iter ListVpnConnectionsResultIterator) Response() ListVpnConnectionsResult {
9705	return iter.page.Response()
9706}
9707
9708// Value returns the current value or a zero-initialized value if the
9709// iterator has advanced beyond the end of the collection.
9710func (iter ListVpnConnectionsResultIterator) Value() VpnConnection {
9711	if !iter.page.NotDone() {
9712		return VpnConnection{}
9713	}
9714	return iter.page.Values()[iter.i]
9715}
9716
9717// Creates a new instance of the ListVpnConnectionsResultIterator type.
9718func NewListVpnConnectionsResultIterator(page ListVpnConnectionsResultPage) ListVpnConnectionsResultIterator {
9719	return ListVpnConnectionsResultIterator{page: page}
9720}
9721
9722// IsEmpty returns true if the ListResult contains no values.
9723func (lvcr ListVpnConnectionsResult) IsEmpty() bool {
9724	return lvcr.Value == nil || len(*lvcr.Value) == 0
9725}
9726
9727// hasNextLink returns true if the NextLink is not empty.
9728func (lvcr ListVpnConnectionsResult) hasNextLink() bool {
9729	return lvcr.NextLink != nil && len(*lvcr.NextLink) != 0
9730}
9731
9732// listVpnConnectionsResultPreparer prepares a request to retrieve the next set of results.
9733// It returns nil if no more results exist.
9734func (lvcr ListVpnConnectionsResult) listVpnConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
9735	if !lvcr.hasNextLink() {
9736		return nil, nil
9737	}
9738	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9739		autorest.AsJSON(),
9740		autorest.AsGet(),
9741		autorest.WithBaseURL(to.String(lvcr.NextLink)))
9742}
9743
9744// ListVpnConnectionsResultPage contains a page of VpnConnection values.
9745type ListVpnConnectionsResultPage struct {
9746	fn   func(context.Context, ListVpnConnectionsResult) (ListVpnConnectionsResult, error)
9747	lvcr ListVpnConnectionsResult
9748}
9749
9750// NextWithContext advances to the next page of values.  If there was an error making
9751// the request the page does not advance and the error is returned.
9752func (page *ListVpnConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
9753	if tracing.IsEnabled() {
9754		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnConnectionsResultPage.NextWithContext")
9755		defer func() {
9756			sc := -1
9757			if page.Response().Response.Response != nil {
9758				sc = page.Response().Response.Response.StatusCode
9759			}
9760			tracing.EndSpan(ctx, sc, err)
9761		}()
9762	}
9763	for {
9764		next, err := page.fn(ctx, page.lvcr)
9765		if err != nil {
9766			return err
9767		}
9768		page.lvcr = next
9769		if !next.hasNextLink() || !next.IsEmpty() {
9770			break
9771		}
9772	}
9773	return nil
9774}
9775
9776// Next advances to the next page of values.  If there was an error making
9777// the request the page does not advance and the error is returned.
9778// Deprecated: Use NextWithContext() instead.
9779func (page *ListVpnConnectionsResultPage) Next() error {
9780	return page.NextWithContext(context.Background())
9781}
9782
9783// NotDone returns true if the page enumeration should be started or is not yet complete.
9784func (page ListVpnConnectionsResultPage) NotDone() bool {
9785	return !page.lvcr.IsEmpty()
9786}
9787
9788// Response returns the raw server response from the last page request.
9789func (page ListVpnConnectionsResultPage) Response() ListVpnConnectionsResult {
9790	return page.lvcr
9791}
9792
9793// Values returns the slice of values for the current page or nil if there are no values.
9794func (page ListVpnConnectionsResultPage) Values() []VpnConnection {
9795	if page.lvcr.IsEmpty() {
9796		return nil
9797	}
9798	return *page.lvcr.Value
9799}
9800
9801// Creates a new instance of the ListVpnConnectionsResultPage type.
9802func NewListVpnConnectionsResultPage(cur ListVpnConnectionsResult, getNextPage func(context.Context, ListVpnConnectionsResult) (ListVpnConnectionsResult, error)) ListVpnConnectionsResultPage {
9803	return ListVpnConnectionsResultPage{
9804		fn:   getNextPage,
9805		lvcr: cur,
9806	}
9807}
9808
9809// ListVpnGatewaysResult result of the request to list VpnGateways. It contains a list of VpnGateways and a
9810// URL nextLink to get the next set of results.
9811type ListVpnGatewaysResult struct {
9812	autorest.Response `json:"-"`
9813	// Value - List of VpnGateways.
9814	Value *[]VpnGateway `json:"value,omitempty"`
9815	// NextLink - URL to get the next set of operation list results if there are any.
9816	NextLink *string `json:"nextLink,omitempty"`
9817}
9818
9819// ListVpnGatewaysResultIterator provides access to a complete listing of VpnGateway values.
9820type ListVpnGatewaysResultIterator struct {
9821	i    int
9822	page ListVpnGatewaysResultPage
9823}
9824
9825// NextWithContext advances to the next value.  If there was an error making
9826// the request the iterator does not advance and the error is returned.
9827func (iter *ListVpnGatewaysResultIterator) NextWithContext(ctx context.Context) (err error) {
9828	if tracing.IsEnabled() {
9829		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnGatewaysResultIterator.NextWithContext")
9830		defer func() {
9831			sc := -1
9832			if iter.Response().Response.Response != nil {
9833				sc = iter.Response().Response.Response.StatusCode
9834			}
9835			tracing.EndSpan(ctx, sc, err)
9836		}()
9837	}
9838	iter.i++
9839	if iter.i < len(iter.page.Values()) {
9840		return nil
9841	}
9842	err = iter.page.NextWithContext(ctx)
9843	if err != nil {
9844		iter.i--
9845		return err
9846	}
9847	iter.i = 0
9848	return nil
9849}
9850
9851// Next advances to the next value.  If there was an error making
9852// the request the iterator does not advance and the error is returned.
9853// Deprecated: Use NextWithContext() instead.
9854func (iter *ListVpnGatewaysResultIterator) Next() error {
9855	return iter.NextWithContext(context.Background())
9856}
9857
9858// NotDone returns true if the enumeration should be started or is not yet complete.
9859func (iter ListVpnGatewaysResultIterator) NotDone() bool {
9860	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9861}
9862
9863// Response returns the raw server response from the last page request.
9864func (iter ListVpnGatewaysResultIterator) Response() ListVpnGatewaysResult {
9865	return iter.page.Response()
9866}
9867
9868// Value returns the current value or a zero-initialized value if the
9869// iterator has advanced beyond the end of the collection.
9870func (iter ListVpnGatewaysResultIterator) Value() VpnGateway {
9871	if !iter.page.NotDone() {
9872		return VpnGateway{}
9873	}
9874	return iter.page.Values()[iter.i]
9875}
9876
9877// Creates a new instance of the ListVpnGatewaysResultIterator type.
9878func NewListVpnGatewaysResultIterator(page ListVpnGatewaysResultPage) ListVpnGatewaysResultIterator {
9879	return ListVpnGatewaysResultIterator{page: page}
9880}
9881
9882// IsEmpty returns true if the ListResult contains no values.
9883func (lvgr ListVpnGatewaysResult) IsEmpty() bool {
9884	return lvgr.Value == nil || len(*lvgr.Value) == 0
9885}
9886
9887// hasNextLink returns true if the NextLink is not empty.
9888func (lvgr ListVpnGatewaysResult) hasNextLink() bool {
9889	return lvgr.NextLink != nil && len(*lvgr.NextLink) != 0
9890}
9891
9892// listVpnGatewaysResultPreparer prepares a request to retrieve the next set of results.
9893// It returns nil if no more results exist.
9894func (lvgr ListVpnGatewaysResult) listVpnGatewaysResultPreparer(ctx context.Context) (*http.Request, error) {
9895	if !lvgr.hasNextLink() {
9896		return nil, nil
9897	}
9898	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9899		autorest.AsJSON(),
9900		autorest.AsGet(),
9901		autorest.WithBaseURL(to.String(lvgr.NextLink)))
9902}
9903
9904// ListVpnGatewaysResultPage contains a page of VpnGateway values.
9905type ListVpnGatewaysResultPage struct {
9906	fn   func(context.Context, ListVpnGatewaysResult) (ListVpnGatewaysResult, error)
9907	lvgr ListVpnGatewaysResult
9908}
9909
9910// NextWithContext advances to the next page of values.  If there was an error making
9911// the request the page does not advance and the error is returned.
9912func (page *ListVpnGatewaysResultPage) NextWithContext(ctx context.Context) (err error) {
9913	if tracing.IsEnabled() {
9914		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnGatewaysResultPage.NextWithContext")
9915		defer func() {
9916			sc := -1
9917			if page.Response().Response.Response != nil {
9918				sc = page.Response().Response.Response.StatusCode
9919			}
9920			tracing.EndSpan(ctx, sc, err)
9921		}()
9922	}
9923	for {
9924		next, err := page.fn(ctx, page.lvgr)
9925		if err != nil {
9926			return err
9927		}
9928		page.lvgr = next
9929		if !next.hasNextLink() || !next.IsEmpty() {
9930			break
9931		}
9932	}
9933	return nil
9934}
9935
9936// Next advances to the next page of values.  If there was an error making
9937// the request the page does not advance and the error is returned.
9938// Deprecated: Use NextWithContext() instead.
9939func (page *ListVpnGatewaysResultPage) Next() error {
9940	return page.NextWithContext(context.Background())
9941}
9942
9943// NotDone returns true if the page enumeration should be started or is not yet complete.
9944func (page ListVpnGatewaysResultPage) NotDone() bool {
9945	return !page.lvgr.IsEmpty()
9946}
9947
9948// Response returns the raw server response from the last page request.
9949func (page ListVpnGatewaysResultPage) Response() ListVpnGatewaysResult {
9950	return page.lvgr
9951}
9952
9953// Values returns the slice of values for the current page or nil if there are no values.
9954func (page ListVpnGatewaysResultPage) Values() []VpnGateway {
9955	if page.lvgr.IsEmpty() {
9956		return nil
9957	}
9958	return *page.lvgr.Value
9959}
9960
9961// Creates a new instance of the ListVpnGatewaysResultPage type.
9962func NewListVpnGatewaysResultPage(cur ListVpnGatewaysResult, getNextPage func(context.Context, ListVpnGatewaysResult) (ListVpnGatewaysResult, error)) ListVpnGatewaysResultPage {
9963	return ListVpnGatewaysResultPage{
9964		fn:   getNextPage,
9965		lvgr: cur,
9966	}
9967}
9968
9969// ListVpnSitesResult result of the request to list VpnSites. It contains a list of VpnSites and a URL
9970// nextLink to get the next set of results.
9971type ListVpnSitesResult struct {
9972	autorest.Response `json:"-"`
9973	// Value - List of VpnSites.
9974	Value *[]VpnSite `json:"value,omitempty"`
9975	// NextLink - URL to get the next set of operation list results if there are any.
9976	NextLink *string `json:"nextLink,omitempty"`
9977}
9978
9979// ListVpnSitesResultIterator provides access to a complete listing of VpnSite values.
9980type ListVpnSitesResultIterator struct {
9981	i    int
9982	page ListVpnSitesResultPage
9983}
9984
9985// NextWithContext advances to the next value.  If there was an error making
9986// the request the iterator does not advance and the error is returned.
9987func (iter *ListVpnSitesResultIterator) NextWithContext(ctx context.Context) (err error) {
9988	if tracing.IsEnabled() {
9989		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSitesResultIterator.NextWithContext")
9990		defer func() {
9991			sc := -1
9992			if iter.Response().Response.Response != nil {
9993				sc = iter.Response().Response.Response.StatusCode
9994			}
9995			tracing.EndSpan(ctx, sc, err)
9996		}()
9997	}
9998	iter.i++
9999	if iter.i < len(iter.page.Values()) {
10000		return nil
10001	}
10002	err = iter.page.NextWithContext(ctx)
10003	if err != nil {
10004		iter.i--
10005		return err
10006	}
10007	iter.i = 0
10008	return nil
10009}
10010
10011// Next advances to the next value.  If there was an error making
10012// the request the iterator does not advance and the error is returned.
10013// Deprecated: Use NextWithContext() instead.
10014func (iter *ListVpnSitesResultIterator) Next() error {
10015	return iter.NextWithContext(context.Background())
10016}
10017
10018// NotDone returns true if the enumeration should be started or is not yet complete.
10019func (iter ListVpnSitesResultIterator) NotDone() bool {
10020	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10021}
10022
10023// Response returns the raw server response from the last page request.
10024func (iter ListVpnSitesResultIterator) Response() ListVpnSitesResult {
10025	return iter.page.Response()
10026}
10027
10028// Value returns the current value or a zero-initialized value if the
10029// iterator has advanced beyond the end of the collection.
10030func (iter ListVpnSitesResultIterator) Value() VpnSite {
10031	if !iter.page.NotDone() {
10032		return VpnSite{}
10033	}
10034	return iter.page.Values()[iter.i]
10035}
10036
10037// Creates a new instance of the ListVpnSitesResultIterator type.
10038func NewListVpnSitesResultIterator(page ListVpnSitesResultPage) ListVpnSitesResultIterator {
10039	return ListVpnSitesResultIterator{page: page}
10040}
10041
10042// IsEmpty returns true if the ListResult contains no values.
10043func (lvsr ListVpnSitesResult) IsEmpty() bool {
10044	return lvsr.Value == nil || len(*lvsr.Value) == 0
10045}
10046
10047// hasNextLink returns true if the NextLink is not empty.
10048func (lvsr ListVpnSitesResult) hasNextLink() bool {
10049	return lvsr.NextLink != nil && len(*lvsr.NextLink) != 0
10050}
10051
10052// listVpnSitesResultPreparer prepares a request to retrieve the next set of results.
10053// It returns nil if no more results exist.
10054func (lvsr ListVpnSitesResult) listVpnSitesResultPreparer(ctx context.Context) (*http.Request, error) {
10055	if !lvsr.hasNextLink() {
10056		return nil, nil
10057	}
10058	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10059		autorest.AsJSON(),
10060		autorest.AsGet(),
10061		autorest.WithBaseURL(to.String(lvsr.NextLink)))
10062}
10063
10064// ListVpnSitesResultPage contains a page of VpnSite values.
10065type ListVpnSitesResultPage struct {
10066	fn   func(context.Context, ListVpnSitesResult) (ListVpnSitesResult, error)
10067	lvsr ListVpnSitesResult
10068}
10069
10070// NextWithContext advances to the next page of values.  If there was an error making
10071// the request the page does not advance and the error is returned.
10072func (page *ListVpnSitesResultPage) NextWithContext(ctx context.Context) (err error) {
10073	if tracing.IsEnabled() {
10074		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSitesResultPage.NextWithContext")
10075		defer func() {
10076			sc := -1
10077			if page.Response().Response.Response != nil {
10078				sc = page.Response().Response.Response.StatusCode
10079			}
10080			tracing.EndSpan(ctx, sc, err)
10081		}()
10082	}
10083	for {
10084		next, err := page.fn(ctx, page.lvsr)
10085		if err != nil {
10086			return err
10087		}
10088		page.lvsr = next
10089		if !next.hasNextLink() || !next.IsEmpty() {
10090			break
10091		}
10092	}
10093	return nil
10094}
10095
10096// Next advances to the next page of values.  If there was an error making
10097// the request the page does not advance and the error is returned.
10098// Deprecated: Use NextWithContext() instead.
10099func (page *ListVpnSitesResultPage) Next() error {
10100	return page.NextWithContext(context.Background())
10101}
10102
10103// NotDone returns true if the page enumeration should be started or is not yet complete.
10104func (page ListVpnSitesResultPage) NotDone() bool {
10105	return !page.lvsr.IsEmpty()
10106}
10107
10108// Response returns the raw server response from the last page request.
10109func (page ListVpnSitesResultPage) Response() ListVpnSitesResult {
10110	return page.lvsr
10111}
10112
10113// Values returns the slice of values for the current page or nil if there are no values.
10114func (page ListVpnSitesResultPage) Values() []VpnSite {
10115	if page.lvsr.IsEmpty() {
10116		return nil
10117	}
10118	return *page.lvsr.Value
10119}
10120
10121// Creates a new instance of the ListVpnSitesResultPage type.
10122func NewListVpnSitesResultPage(cur ListVpnSitesResult, getNextPage func(context.Context, ListVpnSitesResult) (ListVpnSitesResult, error)) ListVpnSitesResultPage {
10123	return ListVpnSitesResultPage{
10124		fn:   getNextPage,
10125		lvsr: cur,
10126	}
10127}
10128
10129// LoadBalancer loadBalancer resource
10130type LoadBalancer struct {
10131	autorest.Response `json:"-"`
10132	// Sku - The load balancer SKU.
10133	Sku *LoadBalancerSku `json:"sku,omitempty"`
10134	// LoadBalancerPropertiesFormat - Properties of load balancer.
10135	*LoadBalancerPropertiesFormat `json:"properties,omitempty"`
10136	// Etag - A unique read-only string that changes whenever the resource is updated.
10137	Etag *string `json:"etag,omitempty"`
10138	// ID - Resource ID.
10139	ID *string `json:"id,omitempty"`
10140	// Name - READ-ONLY; Resource name.
10141	Name *string `json:"name,omitempty"`
10142	// Type - READ-ONLY; Resource type.
10143	Type *string `json:"type,omitempty"`
10144	// Location - Resource location.
10145	Location *string `json:"location,omitempty"`
10146	// Tags - Resource tags.
10147	Tags map[string]*string `json:"tags"`
10148}
10149
10150// MarshalJSON is the custom marshaler for LoadBalancer.
10151func (lb LoadBalancer) MarshalJSON() ([]byte, error) {
10152	objectMap := make(map[string]interface{})
10153	if lb.Sku != nil {
10154		objectMap["sku"] = lb.Sku
10155	}
10156	if lb.LoadBalancerPropertiesFormat != nil {
10157		objectMap["properties"] = lb.LoadBalancerPropertiesFormat
10158	}
10159	if lb.Etag != nil {
10160		objectMap["etag"] = lb.Etag
10161	}
10162	if lb.ID != nil {
10163		objectMap["id"] = lb.ID
10164	}
10165	if lb.Location != nil {
10166		objectMap["location"] = lb.Location
10167	}
10168	if lb.Tags != nil {
10169		objectMap["tags"] = lb.Tags
10170	}
10171	return json.Marshal(objectMap)
10172}
10173
10174// UnmarshalJSON is the custom unmarshaler for LoadBalancer struct.
10175func (lb *LoadBalancer) UnmarshalJSON(body []byte) error {
10176	var m map[string]*json.RawMessage
10177	err := json.Unmarshal(body, &m)
10178	if err != nil {
10179		return err
10180	}
10181	for k, v := range m {
10182		switch k {
10183		case "sku":
10184			if v != nil {
10185				var sku LoadBalancerSku
10186				err = json.Unmarshal(*v, &sku)
10187				if err != nil {
10188					return err
10189				}
10190				lb.Sku = &sku
10191			}
10192		case "properties":
10193			if v != nil {
10194				var loadBalancerPropertiesFormat LoadBalancerPropertiesFormat
10195				err = json.Unmarshal(*v, &loadBalancerPropertiesFormat)
10196				if err != nil {
10197					return err
10198				}
10199				lb.LoadBalancerPropertiesFormat = &loadBalancerPropertiesFormat
10200			}
10201		case "etag":
10202			if v != nil {
10203				var etag string
10204				err = json.Unmarshal(*v, &etag)
10205				if err != nil {
10206					return err
10207				}
10208				lb.Etag = &etag
10209			}
10210		case "id":
10211			if v != nil {
10212				var ID string
10213				err = json.Unmarshal(*v, &ID)
10214				if err != nil {
10215					return err
10216				}
10217				lb.ID = &ID
10218			}
10219		case "name":
10220			if v != nil {
10221				var name string
10222				err = json.Unmarshal(*v, &name)
10223				if err != nil {
10224					return err
10225				}
10226				lb.Name = &name
10227			}
10228		case "type":
10229			if v != nil {
10230				var typeVar string
10231				err = json.Unmarshal(*v, &typeVar)
10232				if err != nil {
10233					return err
10234				}
10235				lb.Type = &typeVar
10236			}
10237		case "location":
10238			if v != nil {
10239				var location string
10240				err = json.Unmarshal(*v, &location)
10241				if err != nil {
10242					return err
10243				}
10244				lb.Location = &location
10245			}
10246		case "tags":
10247			if v != nil {
10248				var tags map[string]*string
10249				err = json.Unmarshal(*v, &tags)
10250				if err != nil {
10251					return err
10252				}
10253				lb.Tags = tags
10254			}
10255		}
10256	}
10257
10258	return nil
10259}
10260
10261// LoadBalancerBackendAddressPoolListResult response for ListBackendAddressPool API service call.
10262type LoadBalancerBackendAddressPoolListResult struct {
10263	autorest.Response `json:"-"`
10264	// Value - A list of backend address pools in a load balancer.
10265	Value *[]BackendAddressPool `json:"value,omitempty"`
10266	// NextLink - READ-ONLY; The URL to get the next set of results.
10267	NextLink *string `json:"nextLink,omitempty"`
10268}
10269
10270// MarshalJSON is the custom marshaler for LoadBalancerBackendAddressPoolListResult.
10271func (lbbaplr LoadBalancerBackendAddressPoolListResult) MarshalJSON() ([]byte, error) {
10272	objectMap := make(map[string]interface{})
10273	if lbbaplr.Value != nil {
10274		objectMap["value"] = lbbaplr.Value
10275	}
10276	return json.Marshal(objectMap)
10277}
10278
10279// LoadBalancerBackendAddressPoolListResultIterator provides access to a complete listing of
10280// BackendAddressPool values.
10281type LoadBalancerBackendAddressPoolListResultIterator struct {
10282	i    int
10283	page LoadBalancerBackendAddressPoolListResultPage
10284}
10285
10286// NextWithContext advances to the next value.  If there was an error making
10287// the request the iterator does not advance and the error is returned.
10288func (iter *LoadBalancerBackendAddressPoolListResultIterator) NextWithContext(ctx context.Context) (err error) {
10289	if tracing.IsEnabled() {
10290		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultIterator.NextWithContext")
10291		defer func() {
10292			sc := -1
10293			if iter.Response().Response.Response != nil {
10294				sc = iter.Response().Response.Response.StatusCode
10295			}
10296			tracing.EndSpan(ctx, sc, err)
10297		}()
10298	}
10299	iter.i++
10300	if iter.i < len(iter.page.Values()) {
10301		return nil
10302	}
10303	err = iter.page.NextWithContext(ctx)
10304	if err != nil {
10305		iter.i--
10306		return err
10307	}
10308	iter.i = 0
10309	return nil
10310}
10311
10312// Next advances to the next value.  If there was an error making
10313// the request the iterator does not advance and the error is returned.
10314// Deprecated: Use NextWithContext() instead.
10315func (iter *LoadBalancerBackendAddressPoolListResultIterator) Next() error {
10316	return iter.NextWithContext(context.Background())
10317}
10318
10319// NotDone returns true if the enumeration should be started or is not yet complete.
10320func (iter LoadBalancerBackendAddressPoolListResultIterator) NotDone() bool {
10321	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10322}
10323
10324// Response returns the raw server response from the last page request.
10325func (iter LoadBalancerBackendAddressPoolListResultIterator) Response() LoadBalancerBackendAddressPoolListResult {
10326	return iter.page.Response()
10327}
10328
10329// Value returns the current value or a zero-initialized value if the
10330// iterator has advanced beyond the end of the collection.
10331func (iter LoadBalancerBackendAddressPoolListResultIterator) Value() BackendAddressPool {
10332	if !iter.page.NotDone() {
10333		return BackendAddressPool{}
10334	}
10335	return iter.page.Values()[iter.i]
10336}
10337
10338// Creates a new instance of the LoadBalancerBackendAddressPoolListResultIterator type.
10339func NewLoadBalancerBackendAddressPoolListResultIterator(page LoadBalancerBackendAddressPoolListResultPage) LoadBalancerBackendAddressPoolListResultIterator {
10340	return LoadBalancerBackendAddressPoolListResultIterator{page: page}
10341}
10342
10343// IsEmpty returns true if the ListResult contains no values.
10344func (lbbaplr LoadBalancerBackendAddressPoolListResult) IsEmpty() bool {
10345	return lbbaplr.Value == nil || len(*lbbaplr.Value) == 0
10346}
10347
10348// hasNextLink returns true if the NextLink is not empty.
10349func (lbbaplr LoadBalancerBackendAddressPoolListResult) hasNextLink() bool {
10350	return lbbaplr.NextLink != nil && len(*lbbaplr.NextLink) != 0
10351}
10352
10353// loadBalancerBackendAddressPoolListResultPreparer prepares a request to retrieve the next set of results.
10354// It returns nil if no more results exist.
10355func (lbbaplr LoadBalancerBackendAddressPoolListResult) loadBalancerBackendAddressPoolListResultPreparer(ctx context.Context) (*http.Request, error) {
10356	if !lbbaplr.hasNextLink() {
10357		return nil, nil
10358	}
10359	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10360		autorest.AsJSON(),
10361		autorest.AsGet(),
10362		autorest.WithBaseURL(to.String(lbbaplr.NextLink)))
10363}
10364
10365// LoadBalancerBackendAddressPoolListResultPage contains a page of BackendAddressPool values.
10366type LoadBalancerBackendAddressPoolListResultPage struct {
10367	fn      func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)
10368	lbbaplr LoadBalancerBackendAddressPoolListResult
10369}
10370
10371// NextWithContext advances to the next page of values.  If there was an error making
10372// the request the page does not advance and the error is returned.
10373func (page *LoadBalancerBackendAddressPoolListResultPage) NextWithContext(ctx context.Context) (err error) {
10374	if tracing.IsEnabled() {
10375		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultPage.NextWithContext")
10376		defer func() {
10377			sc := -1
10378			if page.Response().Response.Response != nil {
10379				sc = page.Response().Response.Response.StatusCode
10380			}
10381			tracing.EndSpan(ctx, sc, err)
10382		}()
10383	}
10384	for {
10385		next, err := page.fn(ctx, page.lbbaplr)
10386		if err != nil {
10387			return err
10388		}
10389		page.lbbaplr = next
10390		if !next.hasNextLink() || !next.IsEmpty() {
10391			break
10392		}
10393	}
10394	return nil
10395}
10396
10397// Next advances to the next page of values.  If there was an error making
10398// the request the page does not advance and the error is returned.
10399// Deprecated: Use NextWithContext() instead.
10400func (page *LoadBalancerBackendAddressPoolListResultPage) Next() error {
10401	return page.NextWithContext(context.Background())
10402}
10403
10404// NotDone returns true if the page enumeration should be started or is not yet complete.
10405func (page LoadBalancerBackendAddressPoolListResultPage) NotDone() bool {
10406	return !page.lbbaplr.IsEmpty()
10407}
10408
10409// Response returns the raw server response from the last page request.
10410func (page LoadBalancerBackendAddressPoolListResultPage) Response() LoadBalancerBackendAddressPoolListResult {
10411	return page.lbbaplr
10412}
10413
10414// Values returns the slice of values for the current page or nil if there are no values.
10415func (page LoadBalancerBackendAddressPoolListResultPage) Values() []BackendAddressPool {
10416	if page.lbbaplr.IsEmpty() {
10417		return nil
10418	}
10419	return *page.lbbaplr.Value
10420}
10421
10422// Creates a new instance of the LoadBalancerBackendAddressPoolListResultPage type.
10423func NewLoadBalancerBackendAddressPoolListResultPage(cur LoadBalancerBackendAddressPoolListResult, getNextPage func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)) LoadBalancerBackendAddressPoolListResultPage {
10424	return LoadBalancerBackendAddressPoolListResultPage{
10425		fn:      getNextPage,
10426		lbbaplr: cur,
10427	}
10428}
10429
10430// LoadBalancerFrontendIPConfigurationListResult response for ListFrontendIPConfiguration API service call.
10431type LoadBalancerFrontendIPConfigurationListResult struct {
10432	autorest.Response `json:"-"`
10433	// Value - A list of frontend IP configurations in a load balancer.
10434	Value *[]FrontendIPConfiguration `json:"value,omitempty"`
10435	// NextLink - READ-ONLY; The URL to get the next set of results.
10436	NextLink *string `json:"nextLink,omitempty"`
10437}
10438
10439// MarshalJSON is the custom marshaler for LoadBalancerFrontendIPConfigurationListResult.
10440func (lbficlr LoadBalancerFrontendIPConfigurationListResult) MarshalJSON() ([]byte, error) {
10441	objectMap := make(map[string]interface{})
10442	if lbficlr.Value != nil {
10443		objectMap["value"] = lbficlr.Value
10444	}
10445	return json.Marshal(objectMap)
10446}
10447
10448// LoadBalancerFrontendIPConfigurationListResultIterator provides access to a complete listing of
10449// FrontendIPConfiguration values.
10450type LoadBalancerFrontendIPConfigurationListResultIterator struct {
10451	i    int
10452	page LoadBalancerFrontendIPConfigurationListResultPage
10453}
10454
10455// NextWithContext advances to the next value.  If there was an error making
10456// the request the iterator does not advance and the error is returned.
10457func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
10458	if tracing.IsEnabled() {
10459		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultIterator.NextWithContext")
10460		defer func() {
10461			sc := -1
10462			if iter.Response().Response.Response != nil {
10463				sc = iter.Response().Response.Response.StatusCode
10464			}
10465			tracing.EndSpan(ctx, sc, err)
10466		}()
10467	}
10468	iter.i++
10469	if iter.i < len(iter.page.Values()) {
10470		return nil
10471	}
10472	err = iter.page.NextWithContext(ctx)
10473	if err != nil {
10474		iter.i--
10475		return err
10476	}
10477	iter.i = 0
10478	return nil
10479}
10480
10481// Next advances to the next value.  If there was an error making
10482// the request the iterator does not advance and the error is returned.
10483// Deprecated: Use NextWithContext() instead.
10484func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) Next() error {
10485	return iter.NextWithContext(context.Background())
10486}
10487
10488// NotDone returns true if the enumeration should be started or is not yet complete.
10489func (iter LoadBalancerFrontendIPConfigurationListResultIterator) NotDone() bool {
10490	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10491}
10492
10493// Response returns the raw server response from the last page request.
10494func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Response() LoadBalancerFrontendIPConfigurationListResult {
10495	return iter.page.Response()
10496}
10497
10498// Value returns the current value or a zero-initialized value if the
10499// iterator has advanced beyond the end of the collection.
10500func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Value() FrontendIPConfiguration {
10501	if !iter.page.NotDone() {
10502		return FrontendIPConfiguration{}
10503	}
10504	return iter.page.Values()[iter.i]
10505}
10506
10507// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultIterator type.
10508func NewLoadBalancerFrontendIPConfigurationListResultIterator(page LoadBalancerFrontendIPConfigurationListResultPage) LoadBalancerFrontendIPConfigurationListResultIterator {
10509	return LoadBalancerFrontendIPConfigurationListResultIterator{page: page}
10510}
10511
10512// IsEmpty returns true if the ListResult contains no values.
10513func (lbficlr LoadBalancerFrontendIPConfigurationListResult) IsEmpty() bool {
10514	return lbficlr.Value == nil || len(*lbficlr.Value) == 0
10515}
10516
10517// hasNextLink returns true if the NextLink is not empty.
10518func (lbficlr LoadBalancerFrontendIPConfigurationListResult) hasNextLink() bool {
10519	return lbficlr.NextLink != nil && len(*lbficlr.NextLink) != 0
10520}
10521
10522// loadBalancerFrontendIPConfigurationListResultPreparer prepares a request to retrieve the next set of results.
10523// It returns nil if no more results exist.
10524func (lbficlr LoadBalancerFrontendIPConfigurationListResult) loadBalancerFrontendIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
10525	if !lbficlr.hasNextLink() {
10526		return nil, nil
10527	}
10528	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10529		autorest.AsJSON(),
10530		autorest.AsGet(),
10531		autorest.WithBaseURL(to.String(lbficlr.NextLink)))
10532}
10533
10534// LoadBalancerFrontendIPConfigurationListResultPage contains a page of FrontendIPConfiguration values.
10535type LoadBalancerFrontendIPConfigurationListResultPage struct {
10536	fn      func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)
10537	lbficlr LoadBalancerFrontendIPConfigurationListResult
10538}
10539
10540// NextWithContext advances to the next page of values.  If there was an error making
10541// the request the page does not advance and the error is returned.
10542func (page *LoadBalancerFrontendIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
10543	if tracing.IsEnabled() {
10544		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultPage.NextWithContext")
10545		defer func() {
10546			sc := -1
10547			if page.Response().Response.Response != nil {
10548				sc = page.Response().Response.Response.StatusCode
10549			}
10550			tracing.EndSpan(ctx, sc, err)
10551		}()
10552	}
10553	for {
10554		next, err := page.fn(ctx, page.lbficlr)
10555		if err != nil {
10556			return err
10557		}
10558		page.lbficlr = next
10559		if !next.hasNextLink() || !next.IsEmpty() {
10560			break
10561		}
10562	}
10563	return nil
10564}
10565
10566// Next advances to the next page of values.  If there was an error making
10567// the request the page does not advance and the error is returned.
10568// Deprecated: Use NextWithContext() instead.
10569func (page *LoadBalancerFrontendIPConfigurationListResultPage) Next() error {
10570	return page.NextWithContext(context.Background())
10571}
10572
10573// NotDone returns true if the page enumeration should be started or is not yet complete.
10574func (page LoadBalancerFrontendIPConfigurationListResultPage) NotDone() bool {
10575	return !page.lbficlr.IsEmpty()
10576}
10577
10578// Response returns the raw server response from the last page request.
10579func (page LoadBalancerFrontendIPConfigurationListResultPage) Response() LoadBalancerFrontendIPConfigurationListResult {
10580	return page.lbficlr
10581}
10582
10583// Values returns the slice of values for the current page or nil if there are no values.
10584func (page LoadBalancerFrontendIPConfigurationListResultPage) Values() []FrontendIPConfiguration {
10585	if page.lbficlr.IsEmpty() {
10586		return nil
10587	}
10588	return *page.lbficlr.Value
10589}
10590
10591// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultPage type.
10592func NewLoadBalancerFrontendIPConfigurationListResultPage(cur LoadBalancerFrontendIPConfigurationListResult, getNextPage func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)) LoadBalancerFrontendIPConfigurationListResultPage {
10593	return LoadBalancerFrontendIPConfigurationListResultPage{
10594		fn:      getNextPage,
10595		lbficlr: cur,
10596	}
10597}
10598
10599// LoadBalancerListResult response for ListLoadBalancers API service call.
10600type LoadBalancerListResult struct {
10601	autorest.Response `json:"-"`
10602	// Value - A list of load balancers in a resource group.
10603	Value *[]LoadBalancer `json:"value,omitempty"`
10604	// NextLink - READ-ONLY; The URL to get the next set of results.
10605	NextLink *string `json:"nextLink,omitempty"`
10606}
10607
10608// MarshalJSON is the custom marshaler for LoadBalancerListResult.
10609func (lblr LoadBalancerListResult) MarshalJSON() ([]byte, error) {
10610	objectMap := make(map[string]interface{})
10611	if lblr.Value != nil {
10612		objectMap["value"] = lblr.Value
10613	}
10614	return json.Marshal(objectMap)
10615}
10616
10617// LoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values.
10618type LoadBalancerListResultIterator struct {
10619	i    int
10620	page LoadBalancerListResultPage
10621}
10622
10623// NextWithContext advances to the next value.  If there was an error making
10624// the request the iterator does not advance and the error is returned.
10625func (iter *LoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) {
10626	if tracing.IsEnabled() {
10627		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultIterator.NextWithContext")
10628		defer func() {
10629			sc := -1
10630			if iter.Response().Response.Response != nil {
10631				sc = iter.Response().Response.Response.StatusCode
10632			}
10633			tracing.EndSpan(ctx, sc, err)
10634		}()
10635	}
10636	iter.i++
10637	if iter.i < len(iter.page.Values()) {
10638		return nil
10639	}
10640	err = iter.page.NextWithContext(ctx)
10641	if err != nil {
10642		iter.i--
10643		return err
10644	}
10645	iter.i = 0
10646	return nil
10647}
10648
10649// Next advances to the next value.  If there was an error making
10650// the request the iterator does not advance and the error is returned.
10651// Deprecated: Use NextWithContext() instead.
10652func (iter *LoadBalancerListResultIterator) Next() error {
10653	return iter.NextWithContext(context.Background())
10654}
10655
10656// NotDone returns true if the enumeration should be started or is not yet complete.
10657func (iter LoadBalancerListResultIterator) NotDone() bool {
10658	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10659}
10660
10661// Response returns the raw server response from the last page request.
10662func (iter LoadBalancerListResultIterator) Response() LoadBalancerListResult {
10663	return iter.page.Response()
10664}
10665
10666// Value returns the current value or a zero-initialized value if the
10667// iterator has advanced beyond the end of the collection.
10668func (iter LoadBalancerListResultIterator) Value() LoadBalancer {
10669	if !iter.page.NotDone() {
10670		return LoadBalancer{}
10671	}
10672	return iter.page.Values()[iter.i]
10673}
10674
10675// Creates a new instance of the LoadBalancerListResultIterator type.
10676func NewLoadBalancerListResultIterator(page LoadBalancerListResultPage) LoadBalancerListResultIterator {
10677	return LoadBalancerListResultIterator{page: page}
10678}
10679
10680// IsEmpty returns true if the ListResult contains no values.
10681func (lblr LoadBalancerListResult) IsEmpty() bool {
10682	return lblr.Value == nil || len(*lblr.Value) == 0
10683}
10684
10685// hasNextLink returns true if the NextLink is not empty.
10686func (lblr LoadBalancerListResult) hasNextLink() bool {
10687	return lblr.NextLink != nil && len(*lblr.NextLink) != 0
10688}
10689
10690// loadBalancerListResultPreparer prepares a request to retrieve the next set of results.
10691// It returns nil if no more results exist.
10692func (lblr LoadBalancerListResult) loadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) {
10693	if !lblr.hasNextLink() {
10694		return nil, nil
10695	}
10696	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10697		autorest.AsJSON(),
10698		autorest.AsGet(),
10699		autorest.WithBaseURL(to.String(lblr.NextLink)))
10700}
10701
10702// LoadBalancerListResultPage contains a page of LoadBalancer values.
10703type LoadBalancerListResultPage struct {
10704	fn   func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)
10705	lblr LoadBalancerListResult
10706}
10707
10708// NextWithContext advances to the next page of values.  If there was an error making
10709// the request the page does not advance and the error is returned.
10710func (page *LoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) {
10711	if tracing.IsEnabled() {
10712		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultPage.NextWithContext")
10713		defer func() {
10714			sc := -1
10715			if page.Response().Response.Response != nil {
10716				sc = page.Response().Response.Response.StatusCode
10717			}
10718			tracing.EndSpan(ctx, sc, err)
10719		}()
10720	}
10721	for {
10722		next, err := page.fn(ctx, page.lblr)
10723		if err != nil {
10724			return err
10725		}
10726		page.lblr = next
10727		if !next.hasNextLink() || !next.IsEmpty() {
10728			break
10729		}
10730	}
10731	return nil
10732}
10733
10734// Next advances to the next page of values.  If there was an error making
10735// the request the page does not advance and the error is returned.
10736// Deprecated: Use NextWithContext() instead.
10737func (page *LoadBalancerListResultPage) Next() error {
10738	return page.NextWithContext(context.Background())
10739}
10740
10741// NotDone returns true if the page enumeration should be started or is not yet complete.
10742func (page LoadBalancerListResultPage) NotDone() bool {
10743	return !page.lblr.IsEmpty()
10744}
10745
10746// Response returns the raw server response from the last page request.
10747func (page LoadBalancerListResultPage) Response() LoadBalancerListResult {
10748	return page.lblr
10749}
10750
10751// Values returns the slice of values for the current page or nil if there are no values.
10752func (page LoadBalancerListResultPage) Values() []LoadBalancer {
10753	if page.lblr.IsEmpty() {
10754		return nil
10755	}
10756	return *page.lblr.Value
10757}
10758
10759// Creates a new instance of the LoadBalancerListResultPage type.
10760func NewLoadBalancerListResultPage(cur LoadBalancerListResult, getNextPage func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)) LoadBalancerListResultPage {
10761	return LoadBalancerListResultPage{
10762		fn:   getNextPage,
10763		lblr: cur,
10764	}
10765}
10766
10767// LoadBalancerLoadBalancingRuleListResult response for ListLoadBalancingRule API service call.
10768type LoadBalancerLoadBalancingRuleListResult struct {
10769	autorest.Response `json:"-"`
10770	// Value - A list of load balancing rules in a load balancer.
10771	Value *[]LoadBalancingRule `json:"value,omitempty"`
10772	// NextLink - READ-ONLY; The URL to get the next set of results.
10773	NextLink *string `json:"nextLink,omitempty"`
10774}
10775
10776// MarshalJSON is the custom marshaler for LoadBalancerLoadBalancingRuleListResult.
10777func (lblbrlr LoadBalancerLoadBalancingRuleListResult) MarshalJSON() ([]byte, error) {
10778	objectMap := make(map[string]interface{})
10779	if lblbrlr.Value != nil {
10780		objectMap["value"] = lblbrlr.Value
10781	}
10782	return json.Marshal(objectMap)
10783}
10784
10785// LoadBalancerLoadBalancingRuleListResultIterator provides access to a complete listing of
10786// LoadBalancingRule values.
10787type LoadBalancerLoadBalancingRuleListResultIterator struct {
10788	i    int
10789	page LoadBalancerLoadBalancingRuleListResultPage
10790}
10791
10792// NextWithContext advances to the next value.  If there was an error making
10793// the request the iterator does not advance and the error is returned.
10794func (iter *LoadBalancerLoadBalancingRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
10795	if tracing.IsEnabled() {
10796		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultIterator.NextWithContext")
10797		defer func() {
10798			sc := -1
10799			if iter.Response().Response.Response != nil {
10800				sc = iter.Response().Response.Response.StatusCode
10801			}
10802			tracing.EndSpan(ctx, sc, err)
10803		}()
10804	}
10805	iter.i++
10806	if iter.i < len(iter.page.Values()) {
10807		return nil
10808	}
10809	err = iter.page.NextWithContext(ctx)
10810	if err != nil {
10811		iter.i--
10812		return err
10813	}
10814	iter.i = 0
10815	return nil
10816}
10817
10818// Next advances to the next value.  If there was an error making
10819// the request the iterator does not advance and the error is returned.
10820// Deprecated: Use NextWithContext() instead.
10821func (iter *LoadBalancerLoadBalancingRuleListResultIterator) Next() error {
10822	return iter.NextWithContext(context.Background())
10823}
10824
10825// NotDone returns true if the enumeration should be started or is not yet complete.
10826func (iter LoadBalancerLoadBalancingRuleListResultIterator) NotDone() bool {
10827	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10828}
10829
10830// Response returns the raw server response from the last page request.
10831func (iter LoadBalancerLoadBalancingRuleListResultIterator) Response() LoadBalancerLoadBalancingRuleListResult {
10832	return iter.page.Response()
10833}
10834
10835// Value returns the current value or a zero-initialized value if the
10836// iterator has advanced beyond the end of the collection.
10837func (iter LoadBalancerLoadBalancingRuleListResultIterator) Value() LoadBalancingRule {
10838	if !iter.page.NotDone() {
10839		return LoadBalancingRule{}
10840	}
10841	return iter.page.Values()[iter.i]
10842}
10843
10844// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultIterator type.
10845func NewLoadBalancerLoadBalancingRuleListResultIterator(page LoadBalancerLoadBalancingRuleListResultPage) LoadBalancerLoadBalancingRuleListResultIterator {
10846	return LoadBalancerLoadBalancingRuleListResultIterator{page: page}
10847}
10848
10849// IsEmpty returns true if the ListResult contains no values.
10850func (lblbrlr LoadBalancerLoadBalancingRuleListResult) IsEmpty() bool {
10851	return lblbrlr.Value == nil || len(*lblbrlr.Value) == 0
10852}
10853
10854// hasNextLink returns true if the NextLink is not empty.
10855func (lblbrlr LoadBalancerLoadBalancingRuleListResult) hasNextLink() bool {
10856	return lblbrlr.NextLink != nil && len(*lblbrlr.NextLink) != 0
10857}
10858
10859// loadBalancerLoadBalancingRuleListResultPreparer prepares a request to retrieve the next set of results.
10860// It returns nil if no more results exist.
10861func (lblbrlr LoadBalancerLoadBalancingRuleListResult) loadBalancerLoadBalancingRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
10862	if !lblbrlr.hasNextLink() {
10863		return nil, nil
10864	}
10865	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10866		autorest.AsJSON(),
10867		autorest.AsGet(),
10868		autorest.WithBaseURL(to.String(lblbrlr.NextLink)))
10869}
10870
10871// LoadBalancerLoadBalancingRuleListResultPage contains a page of LoadBalancingRule values.
10872type LoadBalancerLoadBalancingRuleListResultPage struct {
10873	fn      func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)
10874	lblbrlr LoadBalancerLoadBalancingRuleListResult
10875}
10876
10877// NextWithContext advances to the next page of values.  If there was an error making
10878// the request the page does not advance and the error is returned.
10879func (page *LoadBalancerLoadBalancingRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
10880	if tracing.IsEnabled() {
10881		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultPage.NextWithContext")
10882		defer func() {
10883			sc := -1
10884			if page.Response().Response.Response != nil {
10885				sc = page.Response().Response.Response.StatusCode
10886			}
10887			tracing.EndSpan(ctx, sc, err)
10888		}()
10889	}
10890	for {
10891		next, err := page.fn(ctx, page.lblbrlr)
10892		if err != nil {
10893			return err
10894		}
10895		page.lblbrlr = next
10896		if !next.hasNextLink() || !next.IsEmpty() {
10897			break
10898		}
10899	}
10900	return nil
10901}
10902
10903// Next advances to the next page of values.  If there was an error making
10904// the request the page does not advance and the error is returned.
10905// Deprecated: Use NextWithContext() instead.
10906func (page *LoadBalancerLoadBalancingRuleListResultPage) Next() error {
10907	return page.NextWithContext(context.Background())
10908}
10909
10910// NotDone returns true if the page enumeration should be started or is not yet complete.
10911func (page LoadBalancerLoadBalancingRuleListResultPage) NotDone() bool {
10912	return !page.lblbrlr.IsEmpty()
10913}
10914
10915// Response returns the raw server response from the last page request.
10916func (page LoadBalancerLoadBalancingRuleListResultPage) Response() LoadBalancerLoadBalancingRuleListResult {
10917	return page.lblbrlr
10918}
10919
10920// Values returns the slice of values for the current page or nil if there are no values.
10921func (page LoadBalancerLoadBalancingRuleListResultPage) Values() []LoadBalancingRule {
10922	if page.lblbrlr.IsEmpty() {
10923		return nil
10924	}
10925	return *page.lblbrlr.Value
10926}
10927
10928// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultPage type.
10929func NewLoadBalancerLoadBalancingRuleListResultPage(cur LoadBalancerLoadBalancingRuleListResult, getNextPage func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)) LoadBalancerLoadBalancingRuleListResultPage {
10930	return LoadBalancerLoadBalancingRuleListResultPage{
10931		fn:      getNextPage,
10932		lblbrlr: cur,
10933	}
10934}
10935
10936// LoadBalancerProbeListResult response for ListProbe API service call.
10937type LoadBalancerProbeListResult struct {
10938	autorest.Response `json:"-"`
10939	// Value - A list of probes in a load balancer.
10940	Value *[]Probe `json:"value,omitempty"`
10941	// NextLink - READ-ONLY; The URL to get the next set of results.
10942	NextLink *string `json:"nextLink,omitempty"`
10943}
10944
10945// MarshalJSON is the custom marshaler for LoadBalancerProbeListResult.
10946func (lbplr LoadBalancerProbeListResult) MarshalJSON() ([]byte, error) {
10947	objectMap := make(map[string]interface{})
10948	if lbplr.Value != nil {
10949		objectMap["value"] = lbplr.Value
10950	}
10951	return json.Marshal(objectMap)
10952}
10953
10954// LoadBalancerProbeListResultIterator provides access to a complete listing of Probe values.
10955type LoadBalancerProbeListResultIterator struct {
10956	i    int
10957	page LoadBalancerProbeListResultPage
10958}
10959
10960// NextWithContext advances to the next value.  If there was an error making
10961// the request the iterator does not advance and the error is returned.
10962func (iter *LoadBalancerProbeListResultIterator) NextWithContext(ctx context.Context) (err error) {
10963	if tracing.IsEnabled() {
10964		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultIterator.NextWithContext")
10965		defer func() {
10966			sc := -1
10967			if iter.Response().Response.Response != nil {
10968				sc = iter.Response().Response.Response.StatusCode
10969			}
10970			tracing.EndSpan(ctx, sc, err)
10971		}()
10972	}
10973	iter.i++
10974	if iter.i < len(iter.page.Values()) {
10975		return nil
10976	}
10977	err = iter.page.NextWithContext(ctx)
10978	if err != nil {
10979		iter.i--
10980		return err
10981	}
10982	iter.i = 0
10983	return nil
10984}
10985
10986// Next advances to the next value.  If there was an error making
10987// the request the iterator does not advance and the error is returned.
10988// Deprecated: Use NextWithContext() instead.
10989func (iter *LoadBalancerProbeListResultIterator) Next() error {
10990	return iter.NextWithContext(context.Background())
10991}
10992
10993// NotDone returns true if the enumeration should be started or is not yet complete.
10994func (iter LoadBalancerProbeListResultIterator) NotDone() bool {
10995	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10996}
10997
10998// Response returns the raw server response from the last page request.
10999func (iter LoadBalancerProbeListResultIterator) Response() LoadBalancerProbeListResult {
11000	return iter.page.Response()
11001}
11002
11003// Value returns the current value or a zero-initialized value if the
11004// iterator has advanced beyond the end of the collection.
11005func (iter LoadBalancerProbeListResultIterator) Value() Probe {
11006	if !iter.page.NotDone() {
11007		return Probe{}
11008	}
11009	return iter.page.Values()[iter.i]
11010}
11011
11012// Creates a new instance of the LoadBalancerProbeListResultIterator type.
11013func NewLoadBalancerProbeListResultIterator(page LoadBalancerProbeListResultPage) LoadBalancerProbeListResultIterator {
11014	return LoadBalancerProbeListResultIterator{page: page}
11015}
11016
11017// IsEmpty returns true if the ListResult contains no values.
11018func (lbplr LoadBalancerProbeListResult) IsEmpty() bool {
11019	return lbplr.Value == nil || len(*lbplr.Value) == 0
11020}
11021
11022// hasNextLink returns true if the NextLink is not empty.
11023func (lbplr LoadBalancerProbeListResult) hasNextLink() bool {
11024	return lbplr.NextLink != nil && len(*lbplr.NextLink) != 0
11025}
11026
11027// loadBalancerProbeListResultPreparer prepares a request to retrieve the next set of results.
11028// It returns nil if no more results exist.
11029func (lbplr LoadBalancerProbeListResult) loadBalancerProbeListResultPreparer(ctx context.Context) (*http.Request, error) {
11030	if !lbplr.hasNextLink() {
11031		return nil, nil
11032	}
11033	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11034		autorest.AsJSON(),
11035		autorest.AsGet(),
11036		autorest.WithBaseURL(to.String(lbplr.NextLink)))
11037}
11038
11039// LoadBalancerProbeListResultPage contains a page of Probe values.
11040type LoadBalancerProbeListResultPage struct {
11041	fn    func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)
11042	lbplr LoadBalancerProbeListResult
11043}
11044
11045// NextWithContext advances to the next page of values.  If there was an error making
11046// the request the page does not advance and the error is returned.
11047func (page *LoadBalancerProbeListResultPage) NextWithContext(ctx context.Context) (err error) {
11048	if tracing.IsEnabled() {
11049		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultPage.NextWithContext")
11050		defer func() {
11051			sc := -1
11052			if page.Response().Response.Response != nil {
11053				sc = page.Response().Response.Response.StatusCode
11054			}
11055			tracing.EndSpan(ctx, sc, err)
11056		}()
11057	}
11058	for {
11059		next, err := page.fn(ctx, page.lbplr)
11060		if err != nil {
11061			return err
11062		}
11063		page.lbplr = next
11064		if !next.hasNextLink() || !next.IsEmpty() {
11065			break
11066		}
11067	}
11068	return nil
11069}
11070
11071// Next advances to the next page of values.  If there was an error making
11072// the request the page does not advance and the error is returned.
11073// Deprecated: Use NextWithContext() instead.
11074func (page *LoadBalancerProbeListResultPage) Next() error {
11075	return page.NextWithContext(context.Background())
11076}
11077
11078// NotDone returns true if the page enumeration should be started or is not yet complete.
11079func (page LoadBalancerProbeListResultPage) NotDone() bool {
11080	return !page.lbplr.IsEmpty()
11081}
11082
11083// Response returns the raw server response from the last page request.
11084func (page LoadBalancerProbeListResultPage) Response() LoadBalancerProbeListResult {
11085	return page.lbplr
11086}
11087
11088// Values returns the slice of values for the current page or nil if there are no values.
11089func (page LoadBalancerProbeListResultPage) Values() []Probe {
11090	if page.lbplr.IsEmpty() {
11091		return nil
11092	}
11093	return *page.lbplr.Value
11094}
11095
11096// Creates a new instance of the LoadBalancerProbeListResultPage type.
11097func NewLoadBalancerProbeListResultPage(cur LoadBalancerProbeListResult, getNextPage func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)) LoadBalancerProbeListResultPage {
11098	return LoadBalancerProbeListResultPage{
11099		fn:    getNextPage,
11100		lbplr: cur,
11101	}
11102}
11103
11104// LoadBalancerPropertiesFormat properties of the load balancer.
11105type LoadBalancerPropertiesFormat struct {
11106	// FrontendIPConfigurations - Object representing the frontend IPs to be used for the load balancer
11107	FrontendIPConfigurations *[]FrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"`
11108	// BackendAddressPools - Collection of backend address pools used by a load balancer
11109	BackendAddressPools *[]BackendAddressPool `json:"backendAddressPools,omitempty"`
11110	// LoadBalancingRules - Object collection representing the load balancing rules Gets the provisioning
11111	LoadBalancingRules *[]LoadBalancingRule `json:"loadBalancingRules,omitempty"`
11112	// Probes - Collection of probe objects used in the load balancer
11113	Probes *[]Probe `json:"probes,omitempty"`
11114	// 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.
11115	InboundNatRules *[]InboundNatRule `json:"inboundNatRules,omitempty"`
11116	// 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.
11117	InboundNatPools *[]InboundNatPool `json:"inboundNatPools,omitempty"`
11118	// OutboundNatRules - The outbound NAT rules.
11119	OutboundNatRules *[]OutboundNatRule `json:"outboundNatRules,omitempty"`
11120	// ResourceGUID - The resource GUID property of the load balancer resource.
11121	ResourceGUID *string `json:"resourceGuid,omitempty"`
11122	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
11123	ProvisioningState *string `json:"provisioningState,omitempty"`
11124}
11125
11126// LoadBalancersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
11127// long-running operation.
11128type LoadBalancersCreateOrUpdateFuture struct {
11129	azure.FutureAPI
11130	// Result returns the result of the asynchronous operation.
11131	// If the operation has not completed it will return an error.
11132	Result func(LoadBalancersClient) (LoadBalancer, error)
11133}
11134
11135// LoadBalancersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
11136// operation.
11137type LoadBalancersDeleteFuture struct {
11138	azure.FutureAPI
11139	// Result returns the result of the asynchronous operation.
11140	// If the operation has not completed it will return an error.
11141	Result func(LoadBalancersClient) (autorest.Response, error)
11142}
11143
11144// LoadBalancerSku SKU of a load balancer
11145type LoadBalancerSku struct {
11146	// Name - Name of a load balancer SKU. Possible values include: 'LoadBalancerSkuNameBasic', 'LoadBalancerSkuNameStandard'
11147	Name LoadBalancerSkuName `json:"name,omitempty"`
11148}
11149
11150// LoadBalancersUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
11151// operation.
11152type LoadBalancersUpdateTagsFuture struct {
11153	azure.FutureAPI
11154	// Result returns the result of the asynchronous operation.
11155	// If the operation has not completed it will return an error.
11156	Result func(LoadBalancersClient) (LoadBalancer, error)
11157}
11158
11159// LoadBalancingRule a load balancing rule for a load balancer.
11160type LoadBalancingRule struct {
11161	autorest.Response `json:"-"`
11162	// LoadBalancingRulePropertiesFormat - Properties of load balancer load balancing rule.
11163	*LoadBalancingRulePropertiesFormat `json:"properties,omitempty"`
11164	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
11165	Name *string `json:"name,omitempty"`
11166	// Etag - A unique read-only string that changes whenever the resource is updated.
11167	Etag *string `json:"etag,omitempty"`
11168	// ID - Resource ID.
11169	ID *string `json:"id,omitempty"`
11170}
11171
11172// MarshalJSON is the custom marshaler for LoadBalancingRule.
11173func (lbr LoadBalancingRule) MarshalJSON() ([]byte, error) {
11174	objectMap := make(map[string]interface{})
11175	if lbr.LoadBalancingRulePropertiesFormat != nil {
11176		objectMap["properties"] = lbr.LoadBalancingRulePropertiesFormat
11177	}
11178	if lbr.Name != nil {
11179		objectMap["name"] = lbr.Name
11180	}
11181	if lbr.Etag != nil {
11182		objectMap["etag"] = lbr.Etag
11183	}
11184	if lbr.ID != nil {
11185		objectMap["id"] = lbr.ID
11186	}
11187	return json.Marshal(objectMap)
11188}
11189
11190// UnmarshalJSON is the custom unmarshaler for LoadBalancingRule struct.
11191func (lbr *LoadBalancingRule) UnmarshalJSON(body []byte) error {
11192	var m map[string]*json.RawMessage
11193	err := json.Unmarshal(body, &m)
11194	if err != nil {
11195		return err
11196	}
11197	for k, v := range m {
11198		switch k {
11199		case "properties":
11200			if v != nil {
11201				var loadBalancingRulePropertiesFormat LoadBalancingRulePropertiesFormat
11202				err = json.Unmarshal(*v, &loadBalancingRulePropertiesFormat)
11203				if err != nil {
11204					return err
11205				}
11206				lbr.LoadBalancingRulePropertiesFormat = &loadBalancingRulePropertiesFormat
11207			}
11208		case "name":
11209			if v != nil {
11210				var name string
11211				err = json.Unmarshal(*v, &name)
11212				if err != nil {
11213					return err
11214				}
11215				lbr.Name = &name
11216			}
11217		case "etag":
11218			if v != nil {
11219				var etag string
11220				err = json.Unmarshal(*v, &etag)
11221				if err != nil {
11222					return err
11223				}
11224				lbr.Etag = &etag
11225			}
11226		case "id":
11227			if v != nil {
11228				var ID string
11229				err = json.Unmarshal(*v, &ID)
11230				if err != nil {
11231					return err
11232				}
11233				lbr.ID = &ID
11234			}
11235		}
11236	}
11237
11238	return nil
11239}
11240
11241// LoadBalancingRulePropertiesFormat properties of the load balancer.
11242type LoadBalancingRulePropertiesFormat struct {
11243	// FrontendIPConfiguration - A reference to frontend IP addresses.
11244	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
11245	// BackendAddressPool - A reference to a pool of DIPs. Inbound traffic is randomly load balanced across IPs in the backend IPs.
11246	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
11247	// Probe - The reference of the load balancer probe used by the load balancing rule.
11248	Probe *SubResource `json:"probe,omitempty"`
11249	// Protocol - Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
11250	Protocol TransportProtocol `json:"protocol,omitempty"`
11251	// LoadDistribution - The load distribution policy for this rule. Possible values are 'Default', 'SourceIP', and 'SourceIPProtocol'. Possible values include: 'Default', 'SourceIP', 'SourceIPProtocol'
11252	LoadDistribution LoadDistribution `json:"loadDistribution,omitempty"`
11253	// 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"
11254	FrontendPort *int32 `json:"frontendPort,omitempty"`
11255	// BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 0 and 65535. Note that value 0 enables "Any Port"
11256	BackendPort *int32 `json:"backendPort,omitempty"`
11257	// 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.
11258	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
11259	// 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.
11260	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
11261	// DisableOutboundSnat - Configures SNAT for the VMs in the backend pool to use the publicIP address specified in the frontend of the load balancing rule.
11262	DisableOutboundSnat *bool `json:"disableOutboundSnat,omitempty"`
11263	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
11264	ProvisioningState *string `json:"provisioningState,omitempty"`
11265}
11266
11267// LocalNetworkGateway a common class for general resource information
11268type LocalNetworkGateway struct {
11269	autorest.Response `json:"-"`
11270	// LocalNetworkGatewayPropertiesFormat - Properties of the local network gateway.
11271	*LocalNetworkGatewayPropertiesFormat `json:"properties,omitempty"`
11272	// Etag - A unique read-only string that changes whenever the resource is updated.
11273	Etag *string `json:"etag,omitempty"`
11274	// ID - Resource ID.
11275	ID *string `json:"id,omitempty"`
11276	// Name - READ-ONLY; Resource name.
11277	Name *string `json:"name,omitempty"`
11278	// Type - READ-ONLY; Resource type.
11279	Type *string `json:"type,omitempty"`
11280	// Location - Resource location.
11281	Location *string `json:"location,omitempty"`
11282	// Tags - Resource tags.
11283	Tags map[string]*string `json:"tags"`
11284}
11285
11286// MarshalJSON is the custom marshaler for LocalNetworkGateway.
11287func (lng LocalNetworkGateway) MarshalJSON() ([]byte, error) {
11288	objectMap := make(map[string]interface{})
11289	if lng.LocalNetworkGatewayPropertiesFormat != nil {
11290		objectMap["properties"] = lng.LocalNetworkGatewayPropertiesFormat
11291	}
11292	if lng.Etag != nil {
11293		objectMap["etag"] = lng.Etag
11294	}
11295	if lng.ID != nil {
11296		objectMap["id"] = lng.ID
11297	}
11298	if lng.Location != nil {
11299		objectMap["location"] = lng.Location
11300	}
11301	if lng.Tags != nil {
11302		objectMap["tags"] = lng.Tags
11303	}
11304	return json.Marshal(objectMap)
11305}
11306
11307// UnmarshalJSON is the custom unmarshaler for LocalNetworkGateway struct.
11308func (lng *LocalNetworkGateway) UnmarshalJSON(body []byte) error {
11309	var m map[string]*json.RawMessage
11310	err := json.Unmarshal(body, &m)
11311	if err != nil {
11312		return err
11313	}
11314	for k, v := range m {
11315		switch k {
11316		case "properties":
11317			if v != nil {
11318				var localNetworkGatewayPropertiesFormat LocalNetworkGatewayPropertiesFormat
11319				err = json.Unmarshal(*v, &localNetworkGatewayPropertiesFormat)
11320				if err != nil {
11321					return err
11322				}
11323				lng.LocalNetworkGatewayPropertiesFormat = &localNetworkGatewayPropertiesFormat
11324			}
11325		case "etag":
11326			if v != nil {
11327				var etag string
11328				err = json.Unmarshal(*v, &etag)
11329				if err != nil {
11330					return err
11331				}
11332				lng.Etag = &etag
11333			}
11334		case "id":
11335			if v != nil {
11336				var ID string
11337				err = json.Unmarshal(*v, &ID)
11338				if err != nil {
11339					return err
11340				}
11341				lng.ID = &ID
11342			}
11343		case "name":
11344			if v != nil {
11345				var name string
11346				err = json.Unmarshal(*v, &name)
11347				if err != nil {
11348					return err
11349				}
11350				lng.Name = &name
11351			}
11352		case "type":
11353			if v != nil {
11354				var typeVar string
11355				err = json.Unmarshal(*v, &typeVar)
11356				if err != nil {
11357					return err
11358				}
11359				lng.Type = &typeVar
11360			}
11361		case "location":
11362			if v != nil {
11363				var location string
11364				err = json.Unmarshal(*v, &location)
11365				if err != nil {
11366					return err
11367				}
11368				lng.Location = &location
11369			}
11370		case "tags":
11371			if v != nil {
11372				var tags map[string]*string
11373				err = json.Unmarshal(*v, &tags)
11374				if err != nil {
11375					return err
11376				}
11377				lng.Tags = tags
11378			}
11379		}
11380	}
11381
11382	return nil
11383}
11384
11385// LocalNetworkGatewayListResult response for ListLocalNetworkGateways API service call.
11386type LocalNetworkGatewayListResult struct {
11387	autorest.Response `json:"-"`
11388	// Value - A list of local network gateways that exists in a resource group.
11389	Value *[]LocalNetworkGateway `json:"value,omitempty"`
11390	// NextLink - READ-ONLY; The URL to get the next set of results.
11391	NextLink *string `json:"nextLink,omitempty"`
11392}
11393
11394// MarshalJSON is the custom marshaler for LocalNetworkGatewayListResult.
11395func (lnglr LocalNetworkGatewayListResult) MarshalJSON() ([]byte, error) {
11396	objectMap := make(map[string]interface{})
11397	if lnglr.Value != nil {
11398		objectMap["value"] = lnglr.Value
11399	}
11400	return json.Marshal(objectMap)
11401}
11402
11403// LocalNetworkGatewayListResultIterator provides access to a complete listing of LocalNetworkGateway
11404// values.
11405type LocalNetworkGatewayListResultIterator struct {
11406	i    int
11407	page LocalNetworkGatewayListResultPage
11408}
11409
11410// NextWithContext advances to the next value.  If there was an error making
11411// the request the iterator does not advance and the error is returned.
11412func (iter *LocalNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
11413	if tracing.IsEnabled() {
11414		ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultIterator.NextWithContext")
11415		defer func() {
11416			sc := -1
11417			if iter.Response().Response.Response != nil {
11418				sc = iter.Response().Response.Response.StatusCode
11419			}
11420			tracing.EndSpan(ctx, sc, err)
11421		}()
11422	}
11423	iter.i++
11424	if iter.i < len(iter.page.Values()) {
11425		return nil
11426	}
11427	err = iter.page.NextWithContext(ctx)
11428	if err != nil {
11429		iter.i--
11430		return err
11431	}
11432	iter.i = 0
11433	return nil
11434}
11435
11436// Next advances to the next value.  If there was an error making
11437// the request the iterator does not advance and the error is returned.
11438// Deprecated: Use NextWithContext() instead.
11439func (iter *LocalNetworkGatewayListResultIterator) Next() error {
11440	return iter.NextWithContext(context.Background())
11441}
11442
11443// NotDone returns true if the enumeration should be started or is not yet complete.
11444func (iter LocalNetworkGatewayListResultIterator) NotDone() bool {
11445	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11446}
11447
11448// Response returns the raw server response from the last page request.
11449func (iter LocalNetworkGatewayListResultIterator) Response() LocalNetworkGatewayListResult {
11450	return iter.page.Response()
11451}
11452
11453// Value returns the current value or a zero-initialized value if the
11454// iterator has advanced beyond the end of the collection.
11455func (iter LocalNetworkGatewayListResultIterator) Value() LocalNetworkGateway {
11456	if !iter.page.NotDone() {
11457		return LocalNetworkGateway{}
11458	}
11459	return iter.page.Values()[iter.i]
11460}
11461
11462// Creates a new instance of the LocalNetworkGatewayListResultIterator type.
11463func NewLocalNetworkGatewayListResultIterator(page LocalNetworkGatewayListResultPage) LocalNetworkGatewayListResultIterator {
11464	return LocalNetworkGatewayListResultIterator{page: page}
11465}
11466
11467// IsEmpty returns true if the ListResult contains no values.
11468func (lnglr LocalNetworkGatewayListResult) IsEmpty() bool {
11469	return lnglr.Value == nil || len(*lnglr.Value) == 0
11470}
11471
11472// hasNextLink returns true if the NextLink is not empty.
11473func (lnglr LocalNetworkGatewayListResult) hasNextLink() bool {
11474	return lnglr.NextLink != nil && len(*lnglr.NextLink) != 0
11475}
11476
11477// localNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results.
11478// It returns nil if no more results exist.
11479func (lnglr LocalNetworkGatewayListResult) localNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
11480	if !lnglr.hasNextLink() {
11481		return nil, nil
11482	}
11483	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11484		autorest.AsJSON(),
11485		autorest.AsGet(),
11486		autorest.WithBaseURL(to.String(lnglr.NextLink)))
11487}
11488
11489// LocalNetworkGatewayListResultPage contains a page of LocalNetworkGateway values.
11490type LocalNetworkGatewayListResultPage struct {
11491	fn    func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)
11492	lnglr LocalNetworkGatewayListResult
11493}
11494
11495// NextWithContext advances to the next page of values.  If there was an error making
11496// the request the page does not advance and the error is returned.
11497func (page *LocalNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
11498	if tracing.IsEnabled() {
11499		ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultPage.NextWithContext")
11500		defer func() {
11501			sc := -1
11502			if page.Response().Response.Response != nil {
11503				sc = page.Response().Response.Response.StatusCode
11504			}
11505			tracing.EndSpan(ctx, sc, err)
11506		}()
11507	}
11508	for {
11509		next, err := page.fn(ctx, page.lnglr)
11510		if err != nil {
11511			return err
11512		}
11513		page.lnglr = next
11514		if !next.hasNextLink() || !next.IsEmpty() {
11515			break
11516		}
11517	}
11518	return nil
11519}
11520
11521// Next advances to the next page of values.  If there was an error making
11522// the request the page does not advance and the error is returned.
11523// Deprecated: Use NextWithContext() instead.
11524func (page *LocalNetworkGatewayListResultPage) Next() error {
11525	return page.NextWithContext(context.Background())
11526}
11527
11528// NotDone returns true if the page enumeration should be started or is not yet complete.
11529func (page LocalNetworkGatewayListResultPage) NotDone() bool {
11530	return !page.lnglr.IsEmpty()
11531}
11532
11533// Response returns the raw server response from the last page request.
11534func (page LocalNetworkGatewayListResultPage) Response() LocalNetworkGatewayListResult {
11535	return page.lnglr
11536}
11537
11538// Values returns the slice of values for the current page or nil if there are no values.
11539func (page LocalNetworkGatewayListResultPage) Values() []LocalNetworkGateway {
11540	if page.lnglr.IsEmpty() {
11541		return nil
11542	}
11543	return *page.lnglr.Value
11544}
11545
11546// Creates a new instance of the LocalNetworkGatewayListResultPage type.
11547func NewLocalNetworkGatewayListResultPage(cur LocalNetworkGatewayListResult, getNextPage func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)) LocalNetworkGatewayListResultPage {
11548	return LocalNetworkGatewayListResultPage{
11549		fn:    getNextPage,
11550		lnglr: cur,
11551	}
11552}
11553
11554// LocalNetworkGatewayPropertiesFormat localNetworkGateway properties
11555type LocalNetworkGatewayPropertiesFormat struct {
11556	// LocalNetworkAddressSpace - Local network site address space.
11557	LocalNetworkAddressSpace *AddressSpace `json:"localNetworkAddressSpace,omitempty"`
11558	// GatewayIPAddress - IP address of local network gateway.
11559	GatewayIPAddress *string `json:"gatewayIpAddress,omitempty"`
11560	// BgpSettings - Local network gateway's BGP speaker settings.
11561	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
11562	// ResourceGUID - The resource GUID property of the LocalNetworkGateway resource.
11563	ResourceGUID *string `json:"resourceGuid,omitempty"`
11564	// ProvisioningState - READ-ONLY; The provisioning state of the LocalNetworkGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
11565	ProvisioningState *string `json:"provisioningState,omitempty"`
11566}
11567
11568// MarshalJSON is the custom marshaler for LocalNetworkGatewayPropertiesFormat.
11569func (lngpf LocalNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
11570	objectMap := make(map[string]interface{})
11571	if lngpf.LocalNetworkAddressSpace != nil {
11572		objectMap["localNetworkAddressSpace"] = lngpf.LocalNetworkAddressSpace
11573	}
11574	if lngpf.GatewayIPAddress != nil {
11575		objectMap["gatewayIpAddress"] = lngpf.GatewayIPAddress
11576	}
11577	if lngpf.BgpSettings != nil {
11578		objectMap["bgpSettings"] = lngpf.BgpSettings
11579	}
11580	if lngpf.ResourceGUID != nil {
11581		objectMap["resourceGuid"] = lngpf.ResourceGUID
11582	}
11583	return json.Marshal(objectMap)
11584}
11585
11586// LocalNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
11587// long-running operation.
11588type LocalNetworkGatewaysCreateOrUpdateFuture struct {
11589	azure.FutureAPI
11590	// Result returns the result of the asynchronous operation.
11591	// If the operation has not completed it will return an error.
11592	Result func(LocalNetworkGatewaysClient) (LocalNetworkGateway, error)
11593}
11594
11595// LocalNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
11596// long-running operation.
11597type LocalNetworkGatewaysDeleteFuture struct {
11598	azure.FutureAPI
11599	// Result returns the result of the asynchronous operation.
11600	// If the operation has not completed it will return an error.
11601	Result func(LocalNetworkGatewaysClient) (autorest.Response, error)
11602}
11603
11604// LocalNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
11605// long-running operation.
11606type LocalNetworkGatewaysUpdateTagsFuture struct {
11607	azure.FutureAPI
11608	// Result returns the result of the asynchronous operation.
11609	// If the operation has not completed it will return an error.
11610	Result func(LocalNetworkGatewaysClient) (LocalNetworkGateway, error)
11611}
11612
11613// LogSpecification description of logging specification.
11614type LogSpecification struct {
11615	// Name - The name of the specification.
11616	Name *string `json:"name,omitempty"`
11617	// DisplayName - The display name of the specification.
11618	DisplayName *string `json:"displayName,omitempty"`
11619	// BlobDuration - Duration of the blob.
11620	BlobDuration *string `json:"blobDuration,omitempty"`
11621}
11622
11623// MatchedRule matched rule.
11624type MatchedRule struct {
11625	// RuleName - Name of the matched network security rule.
11626	RuleName *string `json:"ruleName,omitempty"`
11627	// Action - The network traffic is allowed or denied. Possible values are 'Allow' and 'Deny'.
11628	Action *string `json:"action,omitempty"`
11629}
11630
11631// MetricSpecification description of metrics specification.
11632type MetricSpecification struct {
11633	// Name - The name of the metric.
11634	Name *string `json:"name,omitempty"`
11635	// DisplayName - The display name of the metric.
11636	DisplayName *string `json:"displayName,omitempty"`
11637	// DisplayDescription - The description of the metric.
11638	DisplayDescription *string `json:"displayDescription,omitempty"`
11639	// Unit - Units the metric to be displayed in.
11640	Unit *string `json:"unit,omitempty"`
11641	// AggregationType - The aggregation type.
11642	AggregationType *string `json:"aggregationType,omitempty"`
11643	// Availabilities - List of availability.
11644	Availabilities *[]Availability `json:"availabilities,omitempty"`
11645	// EnableRegionalMdmAccount - Whether regional MDM account enabled.
11646	EnableRegionalMdmAccount *bool `json:"enableRegionalMdmAccount,omitempty"`
11647	// FillGapWithZero - Whether gaps would be filled with zeros.
11648	FillGapWithZero *bool `json:"fillGapWithZero,omitempty"`
11649	// MetricFilterPattern - Pattern for the filter of the metric.
11650	MetricFilterPattern *string `json:"metricFilterPattern,omitempty"`
11651	// Dimensions - List of dimensions.
11652	Dimensions *[]Dimension `json:"dimensions,omitempty"`
11653	// IsInternal - Whether the metric is internal.
11654	IsInternal *bool `json:"isInternal,omitempty"`
11655	// SourceMdmAccount - The source MDM account.
11656	SourceMdmAccount *string `json:"sourceMdmAccount,omitempty"`
11657	// SourceMdmNamespace - The source MDM namespace.
11658	SourceMdmNamespace *string `json:"sourceMdmNamespace,omitempty"`
11659	// ResourceIDDimensionNameOverride - The resource Id dimension name override.
11660	ResourceIDDimensionNameOverride *string `json:"resourceIdDimensionNameOverride,omitempty"`
11661}
11662
11663// NextHopParameters parameters that define the source and destination endpoint.
11664type NextHopParameters struct {
11665	// TargetResourceID - The resource identifier of the target resource against which the action is to be performed.
11666	TargetResourceID *string `json:"targetResourceId,omitempty"`
11667	// SourceIPAddress - The source IP address.
11668	SourceIPAddress *string `json:"sourceIPAddress,omitempty"`
11669	// DestinationIPAddress - The destination IP address.
11670	DestinationIPAddress *string `json:"destinationIPAddress,omitempty"`
11671	// 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).
11672	TargetNicResourceID *string `json:"targetNicResourceId,omitempty"`
11673}
11674
11675// NextHopResult the information about next hop from the specified VM.
11676type NextHopResult struct {
11677	autorest.Response `json:"-"`
11678	// NextHopType - Next hop type. Possible values include: 'NextHopTypeInternet', 'NextHopTypeVirtualAppliance', 'NextHopTypeVirtualNetworkGateway', 'NextHopTypeVnetLocal', 'NextHopTypeHyperNetGateway', 'NextHopTypeNone'
11679	NextHopType NextHopType `json:"nextHopType,omitempty"`
11680	// NextHopIPAddress - Next hop IP Address
11681	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
11682	// 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'.
11683	RouteTableID *string `json:"routeTableId,omitempty"`
11684}
11685
11686// Operation network REST API operation definition.
11687type Operation struct {
11688	// Name - Operation name: {provider}/{resource}/{operation}
11689	Name *string `json:"name,omitempty"`
11690	// Display - Display metadata associated with the operation.
11691	Display *OperationDisplay `json:"display,omitempty"`
11692	// Origin - Origin of the operation.
11693	Origin *string `json:"origin,omitempty"`
11694	// OperationPropertiesFormat - Operation properties format.
11695	*OperationPropertiesFormat `json:"properties,omitempty"`
11696}
11697
11698// MarshalJSON is the custom marshaler for Operation.
11699func (o Operation) MarshalJSON() ([]byte, error) {
11700	objectMap := make(map[string]interface{})
11701	if o.Name != nil {
11702		objectMap["name"] = o.Name
11703	}
11704	if o.Display != nil {
11705		objectMap["display"] = o.Display
11706	}
11707	if o.Origin != nil {
11708		objectMap["origin"] = o.Origin
11709	}
11710	if o.OperationPropertiesFormat != nil {
11711		objectMap["properties"] = o.OperationPropertiesFormat
11712	}
11713	return json.Marshal(objectMap)
11714}
11715
11716// UnmarshalJSON is the custom unmarshaler for Operation struct.
11717func (o *Operation) UnmarshalJSON(body []byte) error {
11718	var m map[string]*json.RawMessage
11719	err := json.Unmarshal(body, &m)
11720	if err != nil {
11721		return err
11722	}
11723	for k, v := range m {
11724		switch k {
11725		case "name":
11726			if v != nil {
11727				var name string
11728				err = json.Unmarshal(*v, &name)
11729				if err != nil {
11730					return err
11731				}
11732				o.Name = &name
11733			}
11734		case "display":
11735			if v != nil {
11736				var display OperationDisplay
11737				err = json.Unmarshal(*v, &display)
11738				if err != nil {
11739					return err
11740				}
11741				o.Display = &display
11742			}
11743		case "origin":
11744			if v != nil {
11745				var origin string
11746				err = json.Unmarshal(*v, &origin)
11747				if err != nil {
11748					return err
11749				}
11750				o.Origin = &origin
11751			}
11752		case "properties":
11753			if v != nil {
11754				var operationPropertiesFormat OperationPropertiesFormat
11755				err = json.Unmarshal(*v, &operationPropertiesFormat)
11756				if err != nil {
11757					return err
11758				}
11759				o.OperationPropertiesFormat = &operationPropertiesFormat
11760			}
11761		}
11762	}
11763
11764	return nil
11765}
11766
11767// OperationDisplay display metadata associated with the operation.
11768type OperationDisplay struct {
11769	// Provider - Service provider: Microsoft Network.
11770	Provider *string `json:"provider,omitempty"`
11771	// Resource - Resource on which the operation is performed.
11772	Resource *string `json:"resource,omitempty"`
11773	// Operation - Type of the operation: get, read, delete, etc.
11774	Operation *string `json:"operation,omitempty"`
11775	// Description - Description of the operation.
11776	Description *string `json:"description,omitempty"`
11777}
11778
11779// OperationListResult result of the request to list Network operations. It contains a list of operations
11780// and a URL link to get the next set of results.
11781type OperationListResult struct {
11782	autorest.Response `json:"-"`
11783	// Value - List of Network operations supported by the Network resource provider.
11784	Value *[]Operation `json:"value,omitempty"`
11785	// NextLink - URL to get the next set of operation list results if there are any.
11786	NextLink *string `json:"nextLink,omitempty"`
11787}
11788
11789// OperationListResultIterator provides access to a complete listing of Operation values.
11790type OperationListResultIterator struct {
11791	i    int
11792	page OperationListResultPage
11793}
11794
11795// NextWithContext advances to the next value.  If there was an error making
11796// the request the iterator does not advance and the error is returned.
11797func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) {
11798	if tracing.IsEnabled() {
11799		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext")
11800		defer func() {
11801			sc := -1
11802			if iter.Response().Response.Response != nil {
11803				sc = iter.Response().Response.Response.StatusCode
11804			}
11805			tracing.EndSpan(ctx, sc, err)
11806		}()
11807	}
11808	iter.i++
11809	if iter.i < len(iter.page.Values()) {
11810		return nil
11811	}
11812	err = iter.page.NextWithContext(ctx)
11813	if err != nil {
11814		iter.i--
11815		return err
11816	}
11817	iter.i = 0
11818	return nil
11819}
11820
11821// Next advances to the next value.  If there was an error making
11822// the request the iterator does not advance and the error is returned.
11823// Deprecated: Use NextWithContext() instead.
11824func (iter *OperationListResultIterator) Next() error {
11825	return iter.NextWithContext(context.Background())
11826}
11827
11828// NotDone returns true if the enumeration should be started or is not yet complete.
11829func (iter OperationListResultIterator) NotDone() bool {
11830	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11831}
11832
11833// Response returns the raw server response from the last page request.
11834func (iter OperationListResultIterator) Response() OperationListResult {
11835	return iter.page.Response()
11836}
11837
11838// Value returns the current value or a zero-initialized value if the
11839// iterator has advanced beyond the end of the collection.
11840func (iter OperationListResultIterator) Value() Operation {
11841	if !iter.page.NotDone() {
11842		return Operation{}
11843	}
11844	return iter.page.Values()[iter.i]
11845}
11846
11847// Creates a new instance of the OperationListResultIterator type.
11848func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator {
11849	return OperationListResultIterator{page: page}
11850}
11851
11852// IsEmpty returns true if the ListResult contains no values.
11853func (olr OperationListResult) IsEmpty() bool {
11854	return olr.Value == nil || len(*olr.Value) == 0
11855}
11856
11857// hasNextLink returns true if the NextLink is not empty.
11858func (olr OperationListResult) hasNextLink() bool {
11859	return olr.NextLink != nil && len(*olr.NextLink) != 0
11860}
11861
11862// operationListResultPreparer prepares a request to retrieve the next set of results.
11863// It returns nil if no more results exist.
11864func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) {
11865	if !olr.hasNextLink() {
11866		return nil, nil
11867	}
11868	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11869		autorest.AsJSON(),
11870		autorest.AsGet(),
11871		autorest.WithBaseURL(to.String(olr.NextLink)))
11872}
11873
11874// OperationListResultPage contains a page of Operation values.
11875type OperationListResultPage struct {
11876	fn  func(context.Context, OperationListResult) (OperationListResult, error)
11877	olr OperationListResult
11878}
11879
11880// NextWithContext advances to the next page of values.  If there was an error making
11881// the request the page does not advance and the error is returned.
11882func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) {
11883	if tracing.IsEnabled() {
11884		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext")
11885		defer func() {
11886			sc := -1
11887			if page.Response().Response.Response != nil {
11888				sc = page.Response().Response.Response.StatusCode
11889			}
11890			tracing.EndSpan(ctx, sc, err)
11891		}()
11892	}
11893	for {
11894		next, err := page.fn(ctx, page.olr)
11895		if err != nil {
11896			return err
11897		}
11898		page.olr = next
11899		if !next.hasNextLink() || !next.IsEmpty() {
11900			break
11901		}
11902	}
11903	return nil
11904}
11905
11906// Next advances to the next page of values.  If there was an error making
11907// the request the page does not advance and the error is returned.
11908// Deprecated: Use NextWithContext() instead.
11909func (page *OperationListResultPage) Next() error {
11910	return page.NextWithContext(context.Background())
11911}
11912
11913// NotDone returns true if the page enumeration should be started or is not yet complete.
11914func (page OperationListResultPage) NotDone() bool {
11915	return !page.olr.IsEmpty()
11916}
11917
11918// Response returns the raw server response from the last page request.
11919func (page OperationListResultPage) Response() OperationListResult {
11920	return page.olr
11921}
11922
11923// Values returns the slice of values for the current page or nil if there are no values.
11924func (page OperationListResultPage) Values() []Operation {
11925	if page.olr.IsEmpty() {
11926		return nil
11927	}
11928	return *page.olr.Value
11929}
11930
11931// Creates a new instance of the OperationListResultPage type.
11932func NewOperationListResultPage(cur OperationListResult, getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
11933	return OperationListResultPage{
11934		fn:  getNextPage,
11935		olr: cur,
11936	}
11937}
11938
11939// OperationPropertiesFormat description of operation properties format.
11940type OperationPropertiesFormat struct {
11941	// ServiceSpecification - Specification of the service.
11942	ServiceSpecification *OperationPropertiesFormatServiceSpecification `json:"serviceSpecification,omitempty"`
11943}
11944
11945// OperationPropertiesFormatServiceSpecification specification of the service.
11946type OperationPropertiesFormatServiceSpecification struct {
11947	// MetricSpecifications - Operation service specification.
11948	MetricSpecifications *[]MetricSpecification `json:"metricSpecifications,omitempty"`
11949	// LogSpecifications - Operation log specification.
11950	LogSpecifications *[]LogSpecification `json:"logSpecifications,omitempty"`
11951}
11952
11953// OutboundNatRule outbound NAT pool of the load balancer.
11954type OutboundNatRule struct {
11955	// OutboundNatRulePropertiesFormat - Properties of load balancer outbound nat rule.
11956	*OutboundNatRulePropertiesFormat `json:"properties,omitempty"`
11957	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
11958	Name *string `json:"name,omitempty"`
11959	// Etag - A unique read-only string that changes whenever the resource is updated.
11960	Etag *string `json:"etag,omitempty"`
11961	// ID - Resource ID.
11962	ID *string `json:"id,omitempty"`
11963}
11964
11965// MarshalJSON is the custom marshaler for OutboundNatRule.
11966func (onr OutboundNatRule) MarshalJSON() ([]byte, error) {
11967	objectMap := make(map[string]interface{})
11968	if onr.OutboundNatRulePropertiesFormat != nil {
11969		objectMap["properties"] = onr.OutboundNatRulePropertiesFormat
11970	}
11971	if onr.Name != nil {
11972		objectMap["name"] = onr.Name
11973	}
11974	if onr.Etag != nil {
11975		objectMap["etag"] = onr.Etag
11976	}
11977	if onr.ID != nil {
11978		objectMap["id"] = onr.ID
11979	}
11980	return json.Marshal(objectMap)
11981}
11982
11983// UnmarshalJSON is the custom unmarshaler for OutboundNatRule struct.
11984func (onr *OutboundNatRule) UnmarshalJSON(body []byte) error {
11985	var m map[string]*json.RawMessage
11986	err := json.Unmarshal(body, &m)
11987	if err != nil {
11988		return err
11989	}
11990	for k, v := range m {
11991		switch k {
11992		case "properties":
11993			if v != nil {
11994				var outboundNatRulePropertiesFormat OutboundNatRulePropertiesFormat
11995				err = json.Unmarshal(*v, &outboundNatRulePropertiesFormat)
11996				if err != nil {
11997					return err
11998				}
11999				onr.OutboundNatRulePropertiesFormat = &outboundNatRulePropertiesFormat
12000			}
12001		case "name":
12002			if v != nil {
12003				var name string
12004				err = json.Unmarshal(*v, &name)
12005				if err != nil {
12006					return err
12007				}
12008				onr.Name = &name
12009			}
12010		case "etag":
12011			if v != nil {
12012				var etag string
12013				err = json.Unmarshal(*v, &etag)
12014				if err != nil {
12015					return err
12016				}
12017				onr.Etag = &etag
12018			}
12019		case "id":
12020			if v != nil {
12021				var ID string
12022				err = json.Unmarshal(*v, &ID)
12023				if err != nil {
12024					return err
12025				}
12026				onr.ID = &ID
12027			}
12028		}
12029	}
12030
12031	return nil
12032}
12033
12034// OutboundNatRulePropertiesFormat outbound NAT pool of the load balancer.
12035type OutboundNatRulePropertiesFormat struct {
12036	// AllocatedOutboundPorts - The number of outbound ports to be used for NAT.
12037	AllocatedOutboundPorts *int32 `json:"allocatedOutboundPorts,omitempty"`
12038	// FrontendIPConfigurations - The Frontend IP addresses of the load balancer.
12039	FrontendIPConfigurations *[]SubResource `json:"frontendIPConfigurations,omitempty"`
12040	// BackendAddressPool - A reference to a pool of DIPs. Outbound traffic is randomly load balanced across IPs in the backend IPs.
12041	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
12042	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
12043	ProvisioningState *string `json:"provisioningState,omitempty"`
12044}
12045
12046// PacketCapture parameters that define the create packet capture operation.
12047type PacketCapture struct {
12048	*PacketCaptureParameters `json:"properties,omitempty"`
12049}
12050
12051// MarshalJSON is the custom marshaler for PacketCapture.
12052func (pc PacketCapture) MarshalJSON() ([]byte, error) {
12053	objectMap := make(map[string]interface{})
12054	if pc.PacketCaptureParameters != nil {
12055		objectMap["properties"] = pc.PacketCaptureParameters
12056	}
12057	return json.Marshal(objectMap)
12058}
12059
12060// UnmarshalJSON is the custom unmarshaler for PacketCapture struct.
12061func (pc *PacketCapture) UnmarshalJSON(body []byte) error {
12062	var m map[string]*json.RawMessage
12063	err := json.Unmarshal(body, &m)
12064	if err != nil {
12065		return err
12066	}
12067	for k, v := range m {
12068		switch k {
12069		case "properties":
12070			if v != nil {
12071				var packetCaptureParameters PacketCaptureParameters
12072				err = json.Unmarshal(*v, &packetCaptureParameters)
12073				if err != nil {
12074					return err
12075				}
12076				pc.PacketCaptureParameters = &packetCaptureParameters
12077			}
12078		}
12079	}
12080
12081	return nil
12082}
12083
12084// PacketCaptureFilter filter that is applied to packet capture request. Multiple filters can be applied.
12085type PacketCaptureFilter struct {
12086	// Protocol - Protocol to be filtered on. Possible values include: 'PcProtocolTCP', 'PcProtocolUDP', 'PcProtocolAny'
12087	Protocol PcProtocol `json:"protocol,omitempty"`
12088	// 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.
12089	LocalIPAddress *string `json:"localIPAddress,omitempty"`
12090	// 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.
12091	RemoteIPAddress *string `json:"remoteIPAddress,omitempty"`
12092	// 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.
12093	LocalPort *string `json:"localPort,omitempty"`
12094	// 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.
12095	RemotePort *string `json:"remotePort,omitempty"`
12096}
12097
12098// PacketCaptureListResult list of packet capture sessions.
12099type PacketCaptureListResult struct {
12100	autorest.Response `json:"-"`
12101	// Value - Information about packet capture sessions.
12102	Value *[]PacketCaptureResult `json:"value,omitempty"`
12103}
12104
12105// PacketCaptureParameters parameters that define the create packet capture operation.
12106type PacketCaptureParameters struct {
12107	// Target - The ID of the targeted resource, only VM is currently supported.
12108	Target *string `json:"target,omitempty"`
12109	// BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated.
12110	BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"`
12111	// TotalBytesPerSession - Maximum size of the capture output.
12112	TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"`
12113	// TimeLimitInSeconds - Maximum duration of the capture session in seconds.
12114	TimeLimitInSeconds *int32                        `json:"timeLimitInSeconds,omitempty"`
12115	StorageLocation    *PacketCaptureStorageLocation `json:"storageLocation,omitempty"`
12116	Filters            *[]PacketCaptureFilter        `json:"filters,omitempty"`
12117}
12118
12119// PacketCaptureQueryStatusResult status of packet capture session.
12120type PacketCaptureQueryStatusResult struct {
12121	autorest.Response `json:"-"`
12122	// Name - The name of the packet capture resource.
12123	Name *string `json:"name,omitempty"`
12124	// ID - The ID of the packet capture resource.
12125	ID *string `json:"id,omitempty"`
12126	// CaptureStartTime - The start time of the packet capture session.
12127	CaptureStartTime *date.Time `json:"captureStartTime,omitempty"`
12128	// PacketCaptureStatus - The status of the packet capture session. Possible values include: 'PcStatusNotStarted', 'PcStatusRunning', 'PcStatusStopped', 'PcStatusError', 'PcStatusUnknown'
12129	PacketCaptureStatus PcStatus `json:"packetCaptureStatus,omitempty"`
12130	// StopReason - The reason the current packet capture session was stopped.
12131	StopReason *string `json:"stopReason,omitempty"`
12132	// PacketCaptureError - List of errors of packet capture session.
12133	PacketCaptureError *[]PcError `json:"packetCaptureError,omitempty"`
12134}
12135
12136// PacketCaptureResult information about packet capture session.
12137type PacketCaptureResult struct {
12138	autorest.Response `json:"-"`
12139	// Name - READ-ONLY; Name of the packet capture session.
12140	Name *string `json:"name,omitempty"`
12141	// ID - READ-ONLY; ID of the packet capture operation.
12142	ID                             *string `json:"id,omitempty"`
12143	Etag                           *string `json:"etag,omitempty"`
12144	*PacketCaptureResultProperties `json:"properties,omitempty"`
12145}
12146
12147// MarshalJSON is the custom marshaler for PacketCaptureResult.
12148func (pcr PacketCaptureResult) MarshalJSON() ([]byte, error) {
12149	objectMap := make(map[string]interface{})
12150	if pcr.Etag != nil {
12151		objectMap["etag"] = pcr.Etag
12152	}
12153	if pcr.PacketCaptureResultProperties != nil {
12154		objectMap["properties"] = pcr.PacketCaptureResultProperties
12155	}
12156	return json.Marshal(objectMap)
12157}
12158
12159// UnmarshalJSON is the custom unmarshaler for PacketCaptureResult struct.
12160func (pcr *PacketCaptureResult) UnmarshalJSON(body []byte) error {
12161	var m map[string]*json.RawMessage
12162	err := json.Unmarshal(body, &m)
12163	if err != nil {
12164		return err
12165	}
12166	for k, v := range m {
12167		switch k {
12168		case "name":
12169			if v != nil {
12170				var name string
12171				err = json.Unmarshal(*v, &name)
12172				if err != nil {
12173					return err
12174				}
12175				pcr.Name = &name
12176			}
12177		case "id":
12178			if v != nil {
12179				var ID string
12180				err = json.Unmarshal(*v, &ID)
12181				if err != nil {
12182					return err
12183				}
12184				pcr.ID = &ID
12185			}
12186		case "etag":
12187			if v != nil {
12188				var etag string
12189				err = json.Unmarshal(*v, &etag)
12190				if err != nil {
12191					return err
12192				}
12193				pcr.Etag = &etag
12194			}
12195		case "properties":
12196			if v != nil {
12197				var packetCaptureResultProperties PacketCaptureResultProperties
12198				err = json.Unmarshal(*v, &packetCaptureResultProperties)
12199				if err != nil {
12200					return err
12201				}
12202				pcr.PacketCaptureResultProperties = &packetCaptureResultProperties
12203			}
12204		}
12205	}
12206
12207	return nil
12208}
12209
12210// PacketCaptureResultProperties describes the properties of a packet capture session.
12211type PacketCaptureResultProperties struct {
12212	// ProvisioningState - The provisioning state of the packet capture session. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
12213	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
12214	// Target - The ID of the targeted resource, only VM is currently supported.
12215	Target *string `json:"target,omitempty"`
12216	// BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated.
12217	BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"`
12218	// TotalBytesPerSession - Maximum size of the capture output.
12219	TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"`
12220	// TimeLimitInSeconds - Maximum duration of the capture session in seconds.
12221	TimeLimitInSeconds *int32                        `json:"timeLimitInSeconds,omitempty"`
12222	StorageLocation    *PacketCaptureStorageLocation `json:"storageLocation,omitempty"`
12223	Filters            *[]PacketCaptureFilter        `json:"filters,omitempty"`
12224}
12225
12226// PacketCapturesCreateFuture an abstraction for monitoring and retrieving the results of a long-running
12227// operation.
12228type PacketCapturesCreateFuture struct {
12229	azure.FutureAPI
12230	// Result returns the result of the asynchronous operation.
12231	// If the operation has not completed it will return an error.
12232	Result func(PacketCapturesClient) (PacketCaptureResult, error)
12233}
12234
12235// PacketCapturesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
12236// operation.
12237type PacketCapturesDeleteFuture struct {
12238	azure.FutureAPI
12239	// Result returns the result of the asynchronous operation.
12240	// If the operation has not completed it will return an error.
12241	Result func(PacketCapturesClient) (autorest.Response, error)
12242}
12243
12244// PacketCapturesGetStatusFuture an abstraction for monitoring and retrieving the results of a long-running
12245// operation.
12246type PacketCapturesGetStatusFuture struct {
12247	azure.FutureAPI
12248	// Result returns the result of the asynchronous operation.
12249	// If the operation has not completed it will return an error.
12250	Result func(PacketCapturesClient) (PacketCaptureQueryStatusResult, error)
12251}
12252
12253// PacketCapturesStopFuture an abstraction for monitoring and retrieving the results of a long-running
12254// operation.
12255type PacketCapturesStopFuture struct {
12256	azure.FutureAPI
12257	// Result returns the result of the asynchronous operation.
12258	// If the operation has not completed it will return an error.
12259	Result func(PacketCapturesClient) (autorest.Response, error)
12260}
12261
12262// PacketCaptureStorageLocation describes the storage location for a packet capture session.
12263type PacketCaptureStorageLocation struct {
12264	// StorageID - The ID of the storage account to save the packet capture session. Required if no local file path is provided.
12265	StorageID *string `json:"storageId,omitempty"`
12266	// 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.
12267	StoragePath *string `json:"storagePath,omitempty"`
12268	// 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.
12269	FilePath *string `json:"filePath,omitempty"`
12270}
12271
12272// PatchRouteFilter route Filter Resource.
12273type PatchRouteFilter struct {
12274	*RouteFilterPropertiesFormat `json:"properties,omitempty"`
12275	// Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource.
12276	Name *string `json:"name,omitempty"`
12277	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
12278	Etag *string `json:"etag,omitempty"`
12279	// Type - READ-ONLY; Resource type.
12280	Type *string `json:"type,omitempty"`
12281	// Tags - Resource tags.
12282	Tags map[string]*string `json:"tags"`
12283	// ID - Resource ID.
12284	ID *string `json:"id,omitempty"`
12285}
12286
12287// MarshalJSON is the custom marshaler for PatchRouteFilter.
12288func (prf PatchRouteFilter) MarshalJSON() ([]byte, error) {
12289	objectMap := make(map[string]interface{})
12290	if prf.RouteFilterPropertiesFormat != nil {
12291		objectMap["properties"] = prf.RouteFilterPropertiesFormat
12292	}
12293	if prf.Tags != nil {
12294		objectMap["tags"] = prf.Tags
12295	}
12296	if prf.ID != nil {
12297		objectMap["id"] = prf.ID
12298	}
12299	return json.Marshal(objectMap)
12300}
12301
12302// UnmarshalJSON is the custom unmarshaler for PatchRouteFilter struct.
12303func (prf *PatchRouteFilter) UnmarshalJSON(body []byte) error {
12304	var m map[string]*json.RawMessage
12305	err := json.Unmarshal(body, &m)
12306	if err != nil {
12307		return err
12308	}
12309	for k, v := range m {
12310		switch k {
12311		case "properties":
12312			if v != nil {
12313				var routeFilterPropertiesFormat RouteFilterPropertiesFormat
12314				err = json.Unmarshal(*v, &routeFilterPropertiesFormat)
12315				if err != nil {
12316					return err
12317				}
12318				prf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat
12319			}
12320		case "name":
12321			if v != nil {
12322				var name string
12323				err = json.Unmarshal(*v, &name)
12324				if err != nil {
12325					return err
12326				}
12327				prf.Name = &name
12328			}
12329		case "etag":
12330			if v != nil {
12331				var etag string
12332				err = json.Unmarshal(*v, &etag)
12333				if err != nil {
12334					return err
12335				}
12336				prf.Etag = &etag
12337			}
12338		case "type":
12339			if v != nil {
12340				var typeVar string
12341				err = json.Unmarshal(*v, &typeVar)
12342				if err != nil {
12343					return err
12344				}
12345				prf.Type = &typeVar
12346			}
12347		case "tags":
12348			if v != nil {
12349				var tags map[string]*string
12350				err = json.Unmarshal(*v, &tags)
12351				if err != nil {
12352					return err
12353				}
12354				prf.Tags = tags
12355			}
12356		case "id":
12357			if v != nil {
12358				var ID string
12359				err = json.Unmarshal(*v, &ID)
12360				if err != nil {
12361					return err
12362				}
12363				prf.ID = &ID
12364			}
12365		}
12366	}
12367
12368	return nil
12369}
12370
12371// PatchRouteFilterRule route Filter Rule Resource
12372type PatchRouteFilterRule struct {
12373	*RouteFilterRulePropertiesFormat `json:"properties,omitempty"`
12374	// Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource.
12375	Name *string `json:"name,omitempty"`
12376	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
12377	Etag *string `json:"etag,omitempty"`
12378	// ID - Resource ID.
12379	ID *string `json:"id,omitempty"`
12380}
12381
12382// MarshalJSON is the custom marshaler for PatchRouteFilterRule.
12383func (prfr PatchRouteFilterRule) MarshalJSON() ([]byte, error) {
12384	objectMap := make(map[string]interface{})
12385	if prfr.RouteFilterRulePropertiesFormat != nil {
12386		objectMap["properties"] = prfr.RouteFilterRulePropertiesFormat
12387	}
12388	if prfr.ID != nil {
12389		objectMap["id"] = prfr.ID
12390	}
12391	return json.Marshal(objectMap)
12392}
12393
12394// UnmarshalJSON is the custom unmarshaler for PatchRouteFilterRule struct.
12395func (prfr *PatchRouteFilterRule) UnmarshalJSON(body []byte) error {
12396	var m map[string]*json.RawMessage
12397	err := json.Unmarshal(body, &m)
12398	if err != nil {
12399		return err
12400	}
12401	for k, v := range m {
12402		switch k {
12403		case "properties":
12404			if v != nil {
12405				var routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat
12406				err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat)
12407				if err != nil {
12408					return err
12409				}
12410				prfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat
12411			}
12412		case "name":
12413			if v != nil {
12414				var name string
12415				err = json.Unmarshal(*v, &name)
12416				if err != nil {
12417					return err
12418				}
12419				prfr.Name = &name
12420			}
12421		case "etag":
12422			if v != nil {
12423				var etag string
12424				err = json.Unmarshal(*v, &etag)
12425				if err != nil {
12426					return err
12427				}
12428				prfr.Etag = &etag
12429			}
12430		case "id":
12431			if v != nil {
12432				var ID string
12433				err = json.Unmarshal(*v, &ID)
12434				if err != nil {
12435					return err
12436				}
12437				prfr.ID = &ID
12438			}
12439		}
12440	}
12441
12442	return nil
12443}
12444
12445// Policies policies for vpn gateway.
12446type Policies struct {
12447	// AllowBranchToBranchTraffic - True if branch to branch traffic is allowed.
12448	AllowBranchToBranchTraffic *bool `json:"allowBranchToBranchTraffic,omitempty"`
12449	// AllowVnetToVnetTraffic - True if Vnet to Vnet traffic is allowed.
12450	AllowVnetToVnetTraffic *bool `json:"allowVnetToVnetTraffic,omitempty"`
12451}
12452
12453// Probe a load balancer probe.
12454type Probe struct {
12455	autorest.Response `json:"-"`
12456	// ProbePropertiesFormat - Properties of load balancer probe.
12457	*ProbePropertiesFormat `json:"properties,omitempty"`
12458	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
12459	Name *string `json:"name,omitempty"`
12460	// Etag - A unique read-only string that changes whenever the resource is updated.
12461	Etag *string `json:"etag,omitempty"`
12462	// ID - Resource ID.
12463	ID *string `json:"id,omitempty"`
12464}
12465
12466// MarshalJSON is the custom marshaler for Probe.
12467func (p Probe) MarshalJSON() ([]byte, error) {
12468	objectMap := make(map[string]interface{})
12469	if p.ProbePropertiesFormat != nil {
12470		objectMap["properties"] = p.ProbePropertiesFormat
12471	}
12472	if p.Name != nil {
12473		objectMap["name"] = p.Name
12474	}
12475	if p.Etag != nil {
12476		objectMap["etag"] = p.Etag
12477	}
12478	if p.ID != nil {
12479		objectMap["id"] = p.ID
12480	}
12481	return json.Marshal(objectMap)
12482}
12483
12484// UnmarshalJSON is the custom unmarshaler for Probe struct.
12485func (p *Probe) UnmarshalJSON(body []byte) error {
12486	var m map[string]*json.RawMessage
12487	err := json.Unmarshal(body, &m)
12488	if err != nil {
12489		return err
12490	}
12491	for k, v := range m {
12492		switch k {
12493		case "properties":
12494			if v != nil {
12495				var probePropertiesFormat ProbePropertiesFormat
12496				err = json.Unmarshal(*v, &probePropertiesFormat)
12497				if err != nil {
12498					return err
12499				}
12500				p.ProbePropertiesFormat = &probePropertiesFormat
12501			}
12502		case "name":
12503			if v != nil {
12504				var name string
12505				err = json.Unmarshal(*v, &name)
12506				if err != nil {
12507					return err
12508				}
12509				p.Name = &name
12510			}
12511		case "etag":
12512			if v != nil {
12513				var etag string
12514				err = json.Unmarshal(*v, &etag)
12515				if err != nil {
12516					return err
12517				}
12518				p.Etag = &etag
12519			}
12520		case "id":
12521			if v != nil {
12522				var ID string
12523				err = json.Unmarshal(*v, &ID)
12524				if err != nil {
12525					return err
12526				}
12527				p.ID = &ID
12528			}
12529		}
12530	}
12531
12532	return nil
12533}
12534
12535// ProbePropertiesFormat load balancer probe resource.
12536type ProbePropertiesFormat struct {
12537	// LoadBalancingRules - READ-ONLY; The load balancer rules that use this probe.
12538	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
12539	// 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'
12540	Protocol ProbeProtocol `json:"protocol,omitempty"`
12541	// Port - The port for communicating the probe. Possible values range from 1 to 65535, inclusive.
12542	Port *int32 `json:"port,omitempty"`
12543	// 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.
12544	IntervalInSeconds *int32 `json:"intervalInSeconds,omitempty"`
12545	// 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.
12546	NumberOfProbes *int32 `json:"numberOfProbes,omitempty"`
12547	// 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.
12548	RequestPath *string `json:"requestPath,omitempty"`
12549	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
12550	ProvisioningState *string `json:"provisioningState,omitempty"`
12551}
12552
12553// MarshalJSON is the custom marshaler for ProbePropertiesFormat.
12554func (ppf ProbePropertiesFormat) MarshalJSON() ([]byte, error) {
12555	objectMap := make(map[string]interface{})
12556	if ppf.Protocol != "" {
12557		objectMap["protocol"] = ppf.Protocol
12558	}
12559	if ppf.Port != nil {
12560		objectMap["port"] = ppf.Port
12561	}
12562	if ppf.IntervalInSeconds != nil {
12563		objectMap["intervalInSeconds"] = ppf.IntervalInSeconds
12564	}
12565	if ppf.NumberOfProbes != nil {
12566		objectMap["numberOfProbes"] = ppf.NumberOfProbes
12567	}
12568	if ppf.RequestPath != nil {
12569		objectMap["requestPath"] = ppf.RequestPath
12570	}
12571	if ppf.ProvisioningState != nil {
12572		objectMap["provisioningState"] = ppf.ProvisioningState
12573	}
12574	return json.Marshal(objectMap)
12575}
12576
12577// ProtocolConfiguration configuration of the protocol.
12578type ProtocolConfiguration struct {
12579	HTTPConfiguration *HTTPConfiguration `json:"HTTPConfiguration,omitempty"`
12580}
12581
12582// PublicIPAddress public IP address resource.
12583type PublicIPAddress struct {
12584	autorest.Response `json:"-"`
12585	// Sku - The public IP address SKU.
12586	Sku *PublicIPAddressSku `json:"sku,omitempty"`
12587	// PublicIPAddressPropertiesFormat - Public IP address properties.
12588	*PublicIPAddressPropertiesFormat `json:"properties,omitempty"`
12589	// Etag - A unique read-only string that changes whenever the resource is updated.
12590	Etag *string `json:"etag,omitempty"`
12591	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
12592	Zones *[]string `json:"zones,omitempty"`
12593	// ID - Resource ID.
12594	ID *string `json:"id,omitempty"`
12595	// Name - READ-ONLY; Resource name.
12596	Name *string `json:"name,omitempty"`
12597	// Type - READ-ONLY; Resource type.
12598	Type *string `json:"type,omitempty"`
12599	// Location - Resource location.
12600	Location *string `json:"location,omitempty"`
12601	// Tags - Resource tags.
12602	Tags map[string]*string `json:"tags"`
12603}
12604
12605// MarshalJSON is the custom marshaler for PublicIPAddress.
12606func (pia PublicIPAddress) MarshalJSON() ([]byte, error) {
12607	objectMap := make(map[string]interface{})
12608	if pia.Sku != nil {
12609		objectMap["sku"] = pia.Sku
12610	}
12611	if pia.PublicIPAddressPropertiesFormat != nil {
12612		objectMap["properties"] = pia.PublicIPAddressPropertiesFormat
12613	}
12614	if pia.Etag != nil {
12615		objectMap["etag"] = pia.Etag
12616	}
12617	if pia.Zones != nil {
12618		objectMap["zones"] = pia.Zones
12619	}
12620	if pia.ID != nil {
12621		objectMap["id"] = pia.ID
12622	}
12623	if pia.Location != nil {
12624		objectMap["location"] = pia.Location
12625	}
12626	if pia.Tags != nil {
12627		objectMap["tags"] = pia.Tags
12628	}
12629	return json.Marshal(objectMap)
12630}
12631
12632// UnmarshalJSON is the custom unmarshaler for PublicIPAddress struct.
12633func (pia *PublicIPAddress) UnmarshalJSON(body []byte) error {
12634	var m map[string]*json.RawMessage
12635	err := json.Unmarshal(body, &m)
12636	if err != nil {
12637		return err
12638	}
12639	for k, v := range m {
12640		switch k {
12641		case "sku":
12642			if v != nil {
12643				var sku PublicIPAddressSku
12644				err = json.Unmarshal(*v, &sku)
12645				if err != nil {
12646					return err
12647				}
12648				pia.Sku = &sku
12649			}
12650		case "properties":
12651			if v != nil {
12652				var publicIPAddressPropertiesFormat PublicIPAddressPropertiesFormat
12653				err = json.Unmarshal(*v, &publicIPAddressPropertiesFormat)
12654				if err != nil {
12655					return err
12656				}
12657				pia.PublicIPAddressPropertiesFormat = &publicIPAddressPropertiesFormat
12658			}
12659		case "etag":
12660			if v != nil {
12661				var etag string
12662				err = json.Unmarshal(*v, &etag)
12663				if err != nil {
12664					return err
12665				}
12666				pia.Etag = &etag
12667			}
12668		case "zones":
12669			if v != nil {
12670				var zones []string
12671				err = json.Unmarshal(*v, &zones)
12672				if err != nil {
12673					return err
12674				}
12675				pia.Zones = &zones
12676			}
12677		case "id":
12678			if v != nil {
12679				var ID string
12680				err = json.Unmarshal(*v, &ID)
12681				if err != nil {
12682					return err
12683				}
12684				pia.ID = &ID
12685			}
12686		case "name":
12687			if v != nil {
12688				var name string
12689				err = json.Unmarshal(*v, &name)
12690				if err != nil {
12691					return err
12692				}
12693				pia.Name = &name
12694			}
12695		case "type":
12696			if v != nil {
12697				var typeVar string
12698				err = json.Unmarshal(*v, &typeVar)
12699				if err != nil {
12700					return err
12701				}
12702				pia.Type = &typeVar
12703			}
12704		case "location":
12705			if v != nil {
12706				var location string
12707				err = json.Unmarshal(*v, &location)
12708				if err != nil {
12709					return err
12710				}
12711				pia.Location = &location
12712			}
12713		case "tags":
12714			if v != nil {
12715				var tags map[string]*string
12716				err = json.Unmarshal(*v, &tags)
12717				if err != nil {
12718					return err
12719				}
12720				pia.Tags = tags
12721			}
12722		}
12723	}
12724
12725	return nil
12726}
12727
12728// PublicIPAddressDNSSettings contains FQDN of the DNS record associated with the public IP address
12729type PublicIPAddressDNSSettings struct {
12730	// 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.
12731	DomainNameLabel *string `json:"domainNameLabel,omitempty"`
12732	// 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.
12733	Fqdn *string `json:"fqdn,omitempty"`
12734	// 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.
12735	ReverseFqdn *string `json:"reverseFqdn,omitempty"`
12736}
12737
12738// PublicIPAddressesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
12739// long-running operation.
12740type PublicIPAddressesCreateOrUpdateFuture struct {
12741	azure.FutureAPI
12742	// Result returns the result of the asynchronous operation.
12743	// If the operation has not completed it will return an error.
12744	Result func(PublicIPAddressesClient) (PublicIPAddress, error)
12745}
12746
12747// PublicIPAddressesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
12748// operation.
12749type PublicIPAddressesDeleteFuture struct {
12750	azure.FutureAPI
12751	// Result returns the result of the asynchronous operation.
12752	// If the operation has not completed it will return an error.
12753	Result func(PublicIPAddressesClient) (autorest.Response, error)
12754}
12755
12756// PublicIPAddressesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
12757// long-running operation.
12758type PublicIPAddressesUpdateTagsFuture struct {
12759	azure.FutureAPI
12760	// Result returns the result of the asynchronous operation.
12761	// If the operation has not completed it will return an error.
12762	Result func(PublicIPAddressesClient) (PublicIPAddress, error)
12763}
12764
12765// PublicIPAddressListResult response for ListPublicIpAddresses API service call.
12766type PublicIPAddressListResult struct {
12767	autorest.Response `json:"-"`
12768	// Value - A list of public IP addresses that exists in a resource group.
12769	Value *[]PublicIPAddress `json:"value,omitempty"`
12770	// NextLink - The URL to get the next set of results.
12771	NextLink *string `json:"nextLink,omitempty"`
12772}
12773
12774// PublicIPAddressListResultIterator provides access to a complete listing of PublicIPAddress values.
12775type PublicIPAddressListResultIterator struct {
12776	i    int
12777	page PublicIPAddressListResultPage
12778}
12779
12780// NextWithContext advances to the next value.  If there was an error making
12781// the request the iterator does not advance and the error is returned.
12782func (iter *PublicIPAddressListResultIterator) NextWithContext(ctx context.Context) (err error) {
12783	if tracing.IsEnabled() {
12784		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultIterator.NextWithContext")
12785		defer func() {
12786			sc := -1
12787			if iter.Response().Response.Response != nil {
12788				sc = iter.Response().Response.Response.StatusCode
12789			}
12790			tracing.EndSpan(ctx, sc, err)
12791		}()
12792	}
12793	iter.i++
12794	if iter.i < len(iter.page.Values()) {
12795		return nil
12796	}
12797	err = iter.page.NextWithContext(ctx)
12798	if err != nil {
12799		iter.i--
12800		return err
12801	}
12802	iter.i = 0
12803	return nil
12804}
12805
12806// Next advances to the next value.  If there was an error making
12807// the request the iterator does not advance and the error is returned.
12808// Deprecated: Use NextWithContext() instead.
12809func (iter *PublicIPAddressListResultIterator) Next() error {
12810	return iter.NextWithContext(context.Background())
12811}
12812
12813// NotDone returns true if the enumeration should be started or is not yet complete.
12814func (iter PublicIPAddressListResultIterator) NotDone() bool {
12815	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12816}
12817
12818// Response returns the raw server response from the last page request.
12819func (iter PublicIPAddressListResultIterator) Response() PublicIPAddressListResult {
12820	return iter.page.Response()
12821}
12822
12823// Value returns the current value or a zero-initialized value if the
12824// iterator has advanced beyond the end of the collection.
12825func (iter PublicIPAddressListResultIterator) Value() PublicIPAddress {
12826	if !iter.page.NotDone() {
12827		return PublicIPAddress{}
12828	}
12829	return iter.page.Values()[iter.i]
12830}
12831
12832// Creates a new instance of the PublicIPAddressListResultIterator type.
12833func NewPublicIPAddressListResultIterator(page PublicIPAddressListResultPage) PublicIPAddressListResultIterator {
12834	return PublicIPAddressListResultIterator{page: page}
12835}
12836
12837// IsEmpty returns true if the ListResult contains no values.
12838func (pialr PublicIPAddressListResult) IsEmpty() bool {
12839	return pialr.Value == nil || len(*pialr.Value) == 0
12840}
12841
12842// hasNextLink returns true if the NextLink is not empty.
12843func (pialr PublicIPAddressListResult) hasNextLink() bool {
12844	return pialr.NextLink != nil && len(*pialr.NextLink) != 0
12845}
12846
12847// publicIPAddressListResultPreparer prepares a request to retrieve the next set of results.
12848// It returns nil if no more results exist.
12849func (pialr PublicIPAddressListResult) publicIPAddressListResultPreparer(ctx context.Context) (*http.Request, error) {
12850	if !pialr.hasNextLink() {
12851		return nil, nil
12852	}
12853	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12854		autorest.AsJSON(),
12855		autorest.AsGet(),
12856		autorest.WithBaseURL(to.String(pialr.NextLink)))
12857}
12858
12859// PublicIPAddressListResultPage contains a page of PublicIPAddress values.
12860type PublicIPAddressListResultPage struct {
12861	fn    func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)
12862	pialr PublicIPAddressListResult
12863}
12864
12865// NextWithContext advances to the next page of values.  If there was an error making
12866// the request the page does not advance and the error is returned.
12867func (page *PublicIPAddressListResultPage) NextWithContext(ctx context.Context) (err error) {
12868	if tracing.IsEnabled() {
12869		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultPage.NextWithContext")
12870		defer func() {
12871			sc := -1
12872			if page.Response().Response.Response != nil {
12873				sc = page.Response().Response.Response.StatusCode
12874			}
12875			tracing.EndSpan(ctx, sc, err)
12876		}()
12877	}
12878	for {
12879		next, err := page.fn(ctx, page.pialr)
12880		if err != nil {
12881			return err
12882		}
12883		page.pialr = next
12884		if !next.hasNextLink() || !next.IsEmpty() {
12885			break
12886		}
12887	}
12888	return nil
12889}
12890
12891// Next advances to the next page of values.  If there was an error making
12892// the request the page does not advance and the error is returned.
12893// Deprecated: Use NextWithContext() instead.
12894func (page *PublicIPAddressListResultPage) Next() error {
12895	return page.NextWithContext(context.Background())
12896}
12897
12898// NotDone returns true if the page enumeration should be started or is not yet complete.
12899func (page PublicIPAddressListResultPage) NotDone() bool {
12900	return !page.pialr.IsEmpty()
12901}
12902
12903// Response returns the raw server response from the last page request.
12904func (page PublicIPAddressListResultPage) Response() PublicIPAddressListResult {
12905	return page.pialr
12906}
12907
12908// Values returns the slice of values for the current page or nil if there are no values.
12909func (page PublicIPAddressListResultPage) Values() []PublicIPAddress {
12910	if page.pialr.IsEmpty() {
12911		return nil
12912	}
12913	return *page.pialr.Value
12914}
12915
12916// Creates a new instance of the PublicIPAddressListResultPage type.
12917func NewPublicIPAddressListResultPage(cur PublicIPAddressListResult, getNextPage func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)) PublicIPAddressListResultPage {
12918	return PublicIPAddressListResultPage{
12919		fn:    getNextPage,
12920		pialr: cur,
12921	}
12922}
12923
12924// PublicIPAddressPropertiesFormat public IP address properties.
12925type PublicIPAddressPropertiesFormat struct {
12926	// PublicIPAllocationMethod - The public IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
12927	PublicIPAllocationMethod IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"`
12928	// PublicIPAddressVersion - The public IP address version. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6'
12929	PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"`
12930	// IPConfiguration - READ-ONLY; The IP configuration associated with the public IP address.
12931	IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"`
12932	// DNSSettings - The FQDN of the DNS record associated with the public IP address.
12933	DNSSettings *PublicIPAddressDNSSettings `json:"dnsSettings,omitempty"`
12934	// IPTags - The list of tags associated with the public IP address.
12935	IPTags *[]IPTag `json:"ipTags,omitempty"`
12936	// IPAddress - The IP address associated with the public IP address resource.
12937	IPAddress *string `json:"ipAddress,omitempty"`
12938	// IdleTimeoutInMinutes - The idle timeout of the public IP address.
12939	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
12940	// ResourceGUID - The resource GUID property of the public IP resource.
12941	ResourceGUID *string `json:"resourceGuid,omitempty"`
12942	// ProvisioningState - The provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
12943	ProvisioningState *string `json:"provisioningState,omitempty"`
12944}
12945
12946// MarshalJSON is the custom marshaler for PublicIPAddressPropertiesFormat.
12947func (piapf PublicIPAddressPropertiesFormat) MarshalJSON() ([]byte, error) {
12948	objectMap := make(map[string]interface{})
12949	if piapf.PublicIPAllocationMethod != "" {
12950		objectMap["publicIPAllocationMethod"] = piapf.PublicIPAllocationMethod
12951	}
12952	if piapf.PublicIPAddressVersion != "" {
12953		objectMap["publicIPAddressVersion"] = piapf.PublicIPAddressVersion
12954	}
12955	if piapf.DNSSettings != nil {
12956		objectMap["dnsSettings"] = piapf.DNSSettings
12957	}
12958	if piapf.IPTags != nil {
12959		objectMap["ipTags"] = piapf.IPTags
12960	}
12961	if piapf.IPAddress != nil {
12962		objectMap["ipAddress"] = piapf.IPAddress
12963	}
12964	if piapf.IdleTimeoutInMinutes != nil {
12965		objectMap["idleTimeoutInMinutes"] = piapf.IdleTimeoutInMinutes
12966	}
12967	if piapf.ResourceGUID != nil {
12968		objectMap["resourceGuid"] = piapf.ResourceGUID
12969	}
12970	if piapf.ProvisioningState != nil {
12971		objectMap["provisioningState"] = piapf.ProvisioningState
12972	}
12973	return json.Marshal(objectMap)
12974}
12975
12976// PublicIPAddressSku SKU of a public IP address
12977type PublicIPAddressSku struct {
12978	// Name - Name of a public IP address SKU. Possible values include: 'PublicIPAddressSkuNameBasic', 'PublicIPAddressSkuNameStandard'
12979	Name PublicIPAddressSkuName `json:"name,omitempty"`
12980}
12981
12982// QueryTroubleshootingParameters parameters that define the resource to query the troubleshooting result.
12983type QueryTroubleshootingParameters struct {
12984	// TargetResourceID - The target resource ID to query the troubleshooting result.
12985	TargetResourceID *string `json:"targetResourceId,omitempty"`
12986}
12987
12988// Resource common resource representation.
12989type Resource struct {
12990	// ID - Resource ID.
12991	ID *string `json:"id,omitempty"`
12992	// Name - READ-ONLY; Resource name.
12993	Name *string `json:"name,omitempty"`
12994	// Type - READ-ONLY; Resource type.
12995	Type *string `json:"type,omitempty"`
12996	// Location - Resource location.
12997	Location *string `json:"location,omitempty"`
12998	// Tags - Resource tags.
12999	Tags map[string]*string `json:"tags"`
13000}
13001
13002// MarshalJSON is the custom marshaler for Resource.
13003func (r Resource) MarshalJSON() ([]byte, error) {
13004	objectMap := make(map[string]interface{})
13005	if r.ID != nil {
13006		objectMap["id"] = r.ID
13007	}
13008	if r.Location != nil {
13009		objectMap["location"] = r.Location
13010	}
13011	if r.Tags != nil {
13012		objectMap["tags"] = r.Tags
13013	}
13014	return json.Marshal(objectMap)
13015}
13016
13017// ResourceNavigationLink resourceNavigationLink resource.
13018type ResourceNavigationLink struct {
13019	// ResourceNavigationLinkFormat - Resource navigation link properties format.
13020	*ResourceNavigationLinkFormat `json:"properties,omitempty"`
13021	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
13022	Name *string `json:"name,omitempty"`
13023	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
13024	Etag *string `json:"etag,omitempty"`
13025	// ID - Resource ID.
13026	ID *string `json:"id,omitempty"`
13027}
13028
13029// MarshalJSON is the custom marshaler for ResourceNavigationLink.
13030func (rnl ResourceNavigationLink) MarshalJSON() ([]byte, error) {
13031	objectMap := make(map[string]interface{})
13032	if rnl.ResourceNavigationLinkFormat != nil {
13033		objectMap["properties"] = rnl.ResourceNavigationLinkFormat
13034	}
13035	if rnl.Name != nil {
13036		objectMap["name"] = rnl.Name
13037	}
13038	if rnl.ID != nil {
13039		objectMap["id"] = rnl.ID
13040	}
13041	return json.Marshal(objectMap)
13042}
13043
13044// UnmarshalJSON is the custom unmarshaler for ResourceNavigationLink struct.
13045func (rnl *ResourceNavigationLink) UnmarshalJSON(body []byte) error {
13046	var m map[string]*json.RawMessage
13047	err := json.Unmarshal(body, &m)
13048	if err != nil {
13049		return err
13050	}
13051	for k, v := range m {
13052		switch k {
13053		case "properties":
13054			if v != nil {
13055				var resourceNavigationLinkFormat ResourceNavigationLinkFormat
13056				err = json.Unmarshal(*v, &resourceNavigationLinkFormat)
13057				if err != nil {
13058					return err
13059				}
13060				rnl.ResourceNavigationLinkFormat = &resourceNavigationLinkFormat
13061			}
13062		case "name":
13063			if v != nil {
13064				var name string
13065				err = json.Unmarshal(*v, &name)
13066				if err != nil {
13067					return err
13068				}
13069				rnl.Name = &name
13070			}
13071		case "etag":
13072			if v != nil {
13073				var etag string
13074				err = json.Unmarshal(*v, &etag)
13075				if err != nil {
13076					return err
13077				}
13078				rnl.Etag = &etag
13079			}
13080		case "id":
13081			if v != nil {
13082				var ID string
13083				err = json.Unmarshal(*v, &ID)
13084				if err != nil {
13085					return err
13086				}
13087				rnl.ID = &ID
13088			}
13089		}
13090	}
13091
13092	return nil
13093}
13094
13095// ResourceNavigationLinkFormat properties of ResourceNavigationLink.
13096type ResourceNavigationLinkFormat struct {
13097	// LinkedResourceType - Resource type of the linked resource.
13098	LinkedResourceType *string `json:"linkedResourceType,omitempty"`
13099	// Link - Link to the external resource
13100	Link *string `json:"link,omitempty"`
13101	// ProvisioningState - READ-ONLY; Provisioning state of the ResourceNavigationLink resource.
13102	ProvisioningState *string `json:"provisioningState,omitempty"`
13103}
13104
13105// MarshalJSON is the custom marshaler for ResourceNavigationLinkFormat.
13106func (rnlf ResourceNavigationLinkFormat) MarshalJSON() ([]byte, error) {
13107	objectMap := make(map[string]interface{})
13108	if rnlf.LinkedResourceType != nil {
13109		objectMap["linkedResourceType"] = rnlf.LinkedResourceType
13110	}
13111	if rnlf.Link != nil {
13112		objectMap["link"] = rnlf.Link
13113	}
13114	return json.Marshal(objectMap)
13115}
13116
13117// RetentionPolicyParameters parameters that define the retention policy for flow log.
13118type RetentionPolicyParameters struct {
13119	// Days - Number of days to retain flow log records.
13120	Days *int32 `json:"days,omitempty"`
13121	// Enabled - Flag to enable/disable retention.
13122	Enabled *bool `json:"enabled,omitempty"`
13123}
13124
13125// Route route resource
13126type Route struct {
13127	autorest.Response `json:"-"`
13128	// RoutePropertiesFormat - Properties of the route.
13129	*RoutePropertiesFormat `json:"properties,omitempty"`
13130	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
13131	Name *string `json:"name,omitempty"`
13132	// Etag - A unique read-only string that changes whenever the resource is updated.
13133	Etag *string `json:"etag,omitempty"`
13134	// ID - Resource ID.
13135	ID *string `json:"id,omitempty"`
13136}
13137
13138// MarshalJSON is the custom marshaler for Route.
13139func (r Route) MarshalJSON() ([]byte, error) {
13140	objectMap := make(map[string]interface{})
13141	if r.RoutePropertiesFormat != nil {
13142		objectMap["properties"] = r.RoutePropertiesFormat
13143	}
13144	if r.Name != nil {
13145		objectMap["name"] = r.Name
13146	}
13147	if r.Etag != nil {
13148		objectMap["etag"] = r.Etag
13149	}
13150	if r.ID != nil {
13151		objectMap["id"] = r.ID
13152	}
13153	return json.Marshal(objectMap)
13154}
13155
13156// UnmarshalJSON is the custom unmarshaler for Route struct.
13157func (r *Route) UnmarshalJSON(body []byte) error {
13158	var m map[string]*json.RawMessage
13159	err := json.Unmarshal(body, &m)
13160	if err != nil {
13161		return err
13162	}
13163	for k, v := range m {
13164		switch k {
13165		case "properties":
13166			if v != nil {
13167				var routePropertiesFormat RoutePropertiesFormat
13168				err = json.Unmarshal(*v, &routePropertiesFormat)
13169				if err != nil {
13170					return err
13171				}
13172				r.RoutePropertiesFormat = &routePropertiesFormat
13173			}
13174		case "name":
13175			if v != nil {
13176				var name string
13177				err = json.Unmarshal(*v, &name)
13178				if err != nil {
13179					return err
13180				}
13181				r.Name = &name
13182			}
13183		case "etag":
13184			if v != nil {
13185				var etag string
13186				err = json.Unmarshal(*v, &etag)
13187				if err != nil {
13188					return err
13189				}
13190				r.Etag = &etag
13191			}
13192		case "id":
13193			if v != nil {
13194				var ID string
13195				err = json.Unmarshal(*v, &ID)
13196				if err != nil {
13197					return err
13198				}
13199				r.ID = &ID
13200			}
13201		}
13202	}
13203
13204	return nil
13205}
13206
13207// RouteFilter route Filter Resource.
13208type RouteFilter struct {
13209	autorest.Response            `json:"-"`
13210	*RouteFilterPropertiesFormat `json:"properties,omitempty"`
13211	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
13212	Etag *string `json:"etag,omitempty"`
13213	// ID - Resource ID.
13214	ID *string `json:"id,omitempty"`
13215	// Name - READ-ONLY; Resource name.
13216	Name *string `json:"name,omitempty"`
13217	// Type - READ-ONLY; Resource type.
13218	Type *string `json:"type,omitempty"`
13219	// Location - Resource location.
13220	Location *string `json:"location,omitempty"`
13221	// Tags - Resource tags.
13222	Tags map[string]*string `json:"tags"`
13223}
13224
13225// MarshalJSON is the custom marshaler for RouteFilter.
13226func (rf RouteFilter) MarshalJSON() ([]byte, error) {
13227	objectMap := make(map[string]interface{})
13228	if rf.RouteFilterPropertiesFormat != nil {
13229		objectMap["properties"] = rf.RouteFilterPropertiesFormat
13230	}
13231	if rf.ID != nil {
13232		objectMap["id"] = rf.ID
13233	}
13234	if rf.Location != nil {
13235		objectMap["location"] = rf.Location
13236	}
13237	if rf.Tags != nil {
13238		objectMap["tags"] = rf.Tags
13239	}
13240	return json.Marshal(objectMap)
13241}
13242
13243// UnmarshalJSON is the custom unmarshaler for RouteFilter struct.
13244func (rf *RouteFilter) UnmarshalJSON(body []byte) error {
13245	var m map[string]*json.RawMessage
13246	err := json.Unmarshal(body, &m)
13247	if err != nil {
13248		return err
13249	}
13250	for k, v := range m {
13251		switch k {
13252		case "properties":
13253			if v != nil {
13254				var routeFilterPropertiesFormat RouteFilterPropertiesFormat
13255				err = json.Unmarshal(*v, &routeFilterPropertiesFormat)
13256				if err != nil {
13257					return err
13258				}
13259				rf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat
13260			}
13261		case "etag":
13262			if v != nil {
13263				var etag string
13264				err = json.Unmarshal(*v, &etag)
13265				if err != nil {
13266					return err
13267				}
13268				rf.Etag = &etag
13269			}
13270		case "id":
13271			if v != nil {
13272				var ID string
13273				err = json.Unmarshal(*v, &ID)
13274				if err != nil {
13275					return err
13276				}
13277				rf.ID = &ID
13278			}
13279		case "name":
13280			if v != nil {
13281				var name string
13282				err = json.Unmarshal(*v, &name)
13283				if err != nil {
13284					return err
13285				}
13286				rf.Name = &name
13287			}
13288		case "type":
13289			if v != nil {
13290				var typeVar string
13291				err = json.Unmarshal(*v, &typeVar)
13292				if err != nil {
13293					return err
13294				}
13295				rf.Type = &typeVar
13296			}
13297		case "location":
13298			if v != nil {
13299				var location string
13300				err = json.Unmarshal(*v, &location)
13301				if err != nil {
13302					return err
13303				}
13304				rf.Location = &location
13305			}
13306		case "tags":
13307			if v != nil {
13308				var tags map[string]*string
13309				err = json.Unmarshal(*v, &tags)
13310				if err != nil {
13311					return err
13312				}
13313				rf.Tags = tags
13314			}
13315		}
13316	}
13317
13318	return nil
13319}
13320
13321// RouteFilterListResult response for the ListRouteFilters API service call.
13322type RouteFilterListResult struct {
13323	autorest.Response `json:"-"`
13324	// Value - Gets a list of route filters in a resource group.
13325	Value *[]RouteFilter `json:"value,omitempty"`
13326	// NextLink - The URL to get the next set of results.
13327	NextLink *string `json:"nextLink,omitempty"`
13328}
13329
13330// RouteFilterListResultIterator provides access to a complete listing of RouteFilter values.
13331type RouteFilterListResultIterator struct {
13332	i    int
13333	page RouteFilterListResultPage
13334}
13335
13336// NextWithContext advances to the next value.  If there was an error making
13337// the request the iterator does not advance and the error is returned.
13338func (iter *RouteFilterListResultIterator) NextWithContext(ctx context.Context) (err error) {
13339	if tracing.IsEnabled() {
13340		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultIterator.NextWithContext")
13341		defer func() {
13342			sc := -1
13343			if iter.Response().Response.Response != nil {
13344				sc = iter.Response().Response.Response.StatusCode
13345			}
13346			tracing.EndSpan(ctx, sc, err)
13347		}()
13348	}
13349	iter.i++
13350	if iter.i < len(iter.page.Values()) {
13351		return nil
13352	}
13353	err = iter.page.NextWithContext(ctx)
13354	if err != nil {
13355		iter.i--
13356		return err
13357	}
13358	iter.i = 0
13359	return nil
13360}
13361
13362// Next advances to the next value.  If there was an error making
13363// the request the iterator does not advance and the error is returned.
13364// Deprecated: Use NextWithContext() instead.
13365func (iter *RouteFilterListResultIterator) Next() error {
13366	return iter.NextWithContext(context.Background())
13367}
13368
13369// NotDone returns true if the enumeration should be started or is not yet complete.
13370func (iter RouteFilterListResultIterator) NotDone() bool {
13371	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13372}
13373
13374// Response returns the raw server response from the last page request.
13375func (iter RouteFilterListResultIterator) Response() RouteFilterListResult {
13376	return iter.page.Response()
13377}
13378
13379// Value returns the current value or a zero-initialized value if the
13380// iterator has advanced beyond the end of the collection.
13381func (iter RouteFilterListResultIterator) Value() RouteFilter {
13382	if !iter.page.NotDone() {
13383		return RouteFilter{}
13384	}
13385	return iter.page.Values()[iter.i]
13386}
13387
13388// Creates a new instance of the RouteFilterListResultIterator type.
13389func NewRouteFilterListResultIterator(page RouteFilterListResultPage) RouteFilterListResultIterator {
13390	return RouteFilterListResultIterator{page: page}
13391}
13392
13393// IsEmpty returns true if the ListResult contains no values.
13394func (rflr RouteFilterListResult) IsEmpty() bool {
13395	return rflr.Value == nil || len(*rflr.Value) == 0
13396}
13397
13398// hasNextLink returns true if the NextLink is not empty.
13399func (rflr RouteFilterListResult) hasNextLink() bool {
13400	return rflr.NextLink != nil && len(*rflr.NextLink) != 0
13401}
13402
13403// routeFilterListResultPreparer prepares a request to retrieve the next set of results.
13404// It returns nil if no more results exist.
13405func (rflr RouteFilterListResult) routeFilterListResultPreparer(ctx context.Context) (*http.Request, error) {
13406	if !rflr.hasNextLink() {
13407		return nil, nil
13408	}
13409	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13410		autorest.AsJSON(),
13411		autorest.AsGet(),
13412		autorest.WithBaseURL(to.String(rflr.NextLink)))
13413}
13414
13415// RouteFilterListResultPage contains a page of RouteFilter values.
13416type RouteFilterListResultPage struct {
13417	fn   func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)
13418	rflr RouteFilterListResult
13419}
13420
13421// NextWithContext advances to the next page of values.  If there was an error making
13422// the request the page does not advance and the error is returned.
13423func (page *RouteFilterListResultPage) NextWithContext(ctx context.Context) (err error) {
13424	if tracing.IsEnabled() {
13425		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultPage.NextWithContext")
13426		defer func() {
13427			sc := -1
13428			if page.Response().Response.Response != nil {
13429				sc = page.Response().Response.Response.StatusCode
13430			}
13431			tracing.EndSpan(ctx, sc, err)
13432		}()
13433	}
13434	for {
13435		next, err := page.fn(ctx, page.rflr)
13436		if err != nil {
13437			return err
13438		}
13439		page.rflr = next
13440		if !next.hasNextLink() || !next.IsEmpty() {
13441			break
13442		}
13443	}
13444	return nil
13445}
13446
13447// Next advances to the next page of values.  If there was an error making
13448// the request the page does not advance and the error is returned.
13449// Deprecated: Use NextWithContext() instead.
13450func (page *RouteFilterListResultPage) Next() error {
13451	return page.NextWithContext(context.Background())
13452}
13453
13454// NotDone returns true if the page enumeration should be started or is not yet complete.
13455func (page RouteFilterListResultPage) NotDone() bool {
13456	return !page.rflr.IsEmpty()
13457}
13458
13459// Response returns the raw server response from the last page request.
13460func (page RouteFilterListResultPage) Response() RouteFilterListResult {
13461	return page.rflr
13462}
13463
13464// Values returns the slice of values for the current page or nil if there are no values.
13465func (page RouteFilterListResultPage) Values() []RouteFilter {
13466	if page.rflr.IsEmpty() {
13467		return nil
13468	}
13469	return *page.rflr.Value
13470}
13471
13472// Creates a new instance of the RouteFilterListResultPage type.
13473func NewRouteFilterListResultPage(cur RouteFilterListResult, getNextPage func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)) RouteFilterListResultPage {
13474	return RouteFilterListResultPage{
13475		fn:   getNextPage,
13476		rflr: cur,
13477	}
13478}
13479
13480// RouteFilterPropertiesFormat route Filter Resource
13481type RouteFilterPropertiesFormat struct {
13482	// Rules - Collection of RouteFilterRules contained within a route filter.
13483	Rules *[]RouteFilterRule `json:"rules,omitempty"`
13484	// Peerings - A collection of references to express route circuit peerings.
13485	Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"`
13486	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', 'Succeeded' and 'Failed'.
13487	ProvisioningState *string `json:"provisioningState,omitempty"`
13488}
13489
13490// MarshalJSON is the custom marshaler for RouteFilterPropertiesFormat.
13491func (rfpf RouteFilterPropertiesFormat) MarshalJSON() ([]byte, error) {
13492	objectMap := make(map[string]interface{})
13493	if rfpf.Rules != nil {
13494		objectMap["rules"] = rfpf.Rules
13495	}
13496	if rfpf.Peerings != nil {
13497		objectMap["peerings"] = rfpf.Peerings
13498	}
13499	return json.Marshal(objectMap)
13500}
13501
13502// RouteFilterRule route Filter Rule Resource
13503type RouteFilterRule struct {
13504	autorest.Response                `json:"-"`
13505	*RouteFilterRulePropertiesFormat `json:"properties,omitempty"`
13506	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
13507	Name *string `json:"name,omitempty"`
13508	// Location - Resource location.
13509	Location *string `json:"location,omitempty"`
13510	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
13511	Etag *string `json:"etag,omitempty"`
13512	// ID - Resource ID.
13513	ID *string `json:"id,omitempty"`
13514}
13515
13516// MarshalJSON is the custom marshaler for RouteFilterRule.
13517func (rfr RouteFilterRule) MarshalJSON() ([]byte, error) {
13518	objectMap := make(map[string]interface{})
13519	if rfr.RouteFilterRulePropertiesFormat != nil {
13520		objectMap["properties"] = rfr.RouteFilterRulePropertiesFormat
13521	}
13522	if rfr.Name != nil {
13523		objectMap["name"] = rfr.Name
13524	}
13525	if rfr.Location != nil {
13526		objectMap["location"] = rfr.Location
13527	}
13528	if rfr.ID != nil {
13529		objectMap["id"] = rfr.ID
13530	}
13531	return json.Marshal(objectMap)
13532}
13533
13534// UnmarshalJSON is the custom unmarshaler for RouteFilterRule struct.
13535func (rfr *RouteFilterRule) UnmarshalJSON(body []byte) error {
13536	var m map[string]*json.RawMessage
13537	err := json.Unmarshal(body, &m)
13538	if err != nil {
13539		return err
13540	}
13541	for k, v := range m {
13542		switch k {
13543		case "properties":
13544			if v != nil {
13545				var routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat
13546				err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat)
13547				if err != nil {
13548					return err
13549				}
13550				rfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat
13551			}
13552		case "name":
13553			if v != nil {
13554				var name string
13555				err = json.Unmarshal(*v, &name)
13556				if err != nil {
13557					return err
13558				}
13559				rfr.Name = &name
13560			}
13561		case "location":
13562			if v != nil {
13563				var location string
13564				err = json.Unmarshal(*v, &location)
13565				if err != nil {
13566					return err
13567				}
13568				rfr.Location = &location
13569			}
13570		case "etag":
13571			if v != nil {
13572				var etag string
13573				err = json.Unmarshal(*v, &etag)
13574				if err != nil {
13575					return err
13576				}
13577				rfr.Etag = &etag
13578			}
13579		case "id":
13580			if v != nil {
13581				var ID string
13582				err = json.Unmarshal(*v, &ID)
13583				if err != nil {
13584					return err
13585				}
13586				rfr.ID = &ID
13587			}
13588		}
13589	}
13590
13591	return nil
13592}
13593
13594// RouteFilterRuleListResult response for the ListRouteFilterRules API service call
13595type RouteFilterRuleListResult struct {
13596	autorest.Response `json:"-"`
13597	// Value - Gets a list of RouteFilterRules in a resource group.
13598	Value *[]RouteFilterRule `json:"value,omitempty"`
13599	// NextLink - The URL to get the next set of results.
13600	NextLink *string `json:"nextLink,omitempty"`
13601}
13602
13603// RouteFilterRuleListResultIterator provides access to a complete listing of RouteFilterRule values.
13604type RouteFilterRuleListResultIterator struct {
13605	i    int
13606	page RouteFilterRuleListResultPage
13607}
13608
13609// NextWithContext advances to the next value.  If there was an error making
13610// the request the iterator does not advance and the error is returned.
13611func (iter *RouteFilterRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
13612	if tracing.IsEnabled() {
13613		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultIterator.NextWithContext")
13614		defer func() {
13615			sc := -1
13616			if iter.Response().Response.Response != nil {
13617				sc = iter.Response().Response.Response.StatusCode
13618			}
13619			tracing.EndSpan(ctx, sc, err)
13620		}()
13621	}
13622	iter.i++
13623	if iter.i < len(iter.page.Values()) {
13624		return nil
13625	}
13626	err = iter.page.NextWithContext(ctx)
13627	if err != nil {
13628		iter.i--
13629		return err
13630	}
13631	iter.i = 0
13632	return nil
13633}
13634
13635// Next advances to the next value.  If there was an error making
13636// the request the iterator does not advance and the error is returned.
13637// Deprecated: Use NextWithContext() instead.
13638func (iter *RouteFilterRuleListResultIterator) Next() error {
13639	return iter.NextWithContext(context.Background())
13640}
13641
13642// NotDone returns true if the enumeration should be started or is not yet complete.
13643func (iter RouteFilterRuleListResultIterator) NotDone() bool {
13644	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13645}
13646
13647// Response returns the raw server response from the last page request.
13648func (iter RouteFilterRuleListResultIterator) Response() RouteFilterRuleListResult {
13649	return iter.page.Response()
13650}
13651
13652// Value returns the current value or a zero-initialized value if the
13653// iterator has advanced beyond the end of the collection.
13654func (iter RouteFilterRuleListResultIterator) Value() RouteFilterRule {
13655	if !iter.page.NotDone() {
13656		return RouteFilterRule{}
13657	}
13658	return iter.page.Values()[iter.i]
13659}
13660
13661// Creates a new instance of the RouteFilterRuleListResultIterator type.
13662func NewRouteFilterRuleListResultIterator(page RouteFilterRuleListResultPage) RouteFilterRuleListResultIterator {
13663	return RouteFilterRuleListResultIterator{page: page}
13664}
13665
13666// IsEmpty returns true if the ListResult contains no values.
13667func (rfrlr RouteFilterRuleListResult) IsEmpty() bool {
13668	return rfrlr.Value == nil || len(*rfrlr.Value) == 0
13669}
13670
13671// hasNextLink returns true if the NextLink is not empty.
13672func (rfrlr RouteFilterRuleListResult) hasNextLink() bool {
13673	return rfrlr.NextLink != nil && len(*rfrlr.NextLink) != 0
13674}
13675
13676// routeFilterRuleListResultPreparer prepares a request to retrieve the next set of results.
13677// It returns nil if no more results exist.
13678func (rfrlr RouteFilterRuleListResult) routeFilterRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
13679	if !rfrlr.hasNextLink() {
13680		return nil, nil
13681	}
13682	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13683		autorest.AsJSON(),
13684		autorest.AsGet(),
13685		autorest.WithBaseURL(to.String(rfrlr.NextLink)))
13686}
13687
13688// RouteFilterRuleListResultPage contains a page of RouteFilterRule values.
13689type RouteFilterRuleListResultPage struct {
13690	fn    func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)
13691	rfrlr RouteFilterRuleListResult
13692}
13693
13694// NextWithContext advances to the next page of values.  If there was an error making
13695// the request the page does not advance and the error is returned.
13696func (page *RouteFilterRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
13697	if tracing.IsEnabled() {
13698		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultPage.NextWithContext")
13699		defer func() {
13700			sc := -1
13701			if page.Response().Response.Response != nil {
13702				sc = page.Response().Response.Response.StatusCode
13703			}
13704			tracing.EndSpan(ctx, sc, err)
13705		}()
13706	}
13707	for {
13708		next, err := page.fn(ctx, page.rfrlr)
13709		if err != nil {
13710			return err
13711		}
13712		page.rfrlr = next
13713		if !next.hasNextLink() || !next.IsEmpty() {
13714			break
13715		}
13716	}
13717	return nil
13718}
13719
13720// Next advances to the next page of values.  If there was an error making
13721// the request the page does not advance and the error is returned.
13722// Deprecated: Use NextWithContext() instead.
13723func (page *RouteFilterRuleListResultPage) Next() error {
13724	return page.NextWithContext(context.Background())
13725}
13726
13727// NotDone returns true if the page enumeration should be started or is not yet complete.
13728func (page RouteFilterRuleListResultPage) NotDone() bool {
13729	return !page.rfrlr.IsEmpty()
13730}
13731
13732// Response returns the raw server response from the last page request.
13733func (page RouteFilterRuleListResultPage) Response() RouteFilterRuleListResult {
13734	return page.rfrlr
13735}
13736
13737// Values returns the slice of values for the current page or nil if there are no values.
13738func (page RouteFilterRuleListResultPage) Values() []RouteFilterRule {
13739	if page.rfrlr.IsEmpty() {
13740		return nil
13741	}
13742	return *page.rfrlr.Value
13743}
13744
13745// Creates a new instance of the RouteFilterRuleListResultPage type.
13746func NewRouteFilterRuleListResultPage(cur RouteFilterRuleListResult, getNextPage func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)) RouteFilterRuleListResultPage {
13747	return RouteFilterRuleListResultPage{
13748		fn:    getNextPage,
13749		rfrlr: cur,
13750	}
13751}
13752
13753// RouteFilterRulePropertiesFormat route Filter Rule Resource
13754type RouteFilterRulePropertiesFormat struct {
13755	// Access - The access type of the rule. Valid values are: 'Allow', 'Deny'. Possible values include: 'Allow', 'Deny'
13756	Access Access `json:"access,omitempty"`
13757	// RouteFilterRuleType - The rule type of the rule. Valid value is: 'Community'
13758	RouteFilterRuleType *string `json:"routeFilterRuleType,omitempty"`
13759	// Communities - The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020']
13760	Communities *[]string `json:"communities,omitempty"`
13761	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', 'Succeeded' and 'Failed'.
13762	ProvisioningState *string `json:"provisioningState,omitempty"`
13763}
13764
13765// MarshalJSON is the custom marshaler for RouteFilterRulePropertiesFormat.
13766func (rfrpf RouteFilterRulePropertiesFormat) MarshalJSON() ([]byte, error) {
13767	objectMap := make(map[string]interface{})
13768	if rfrpf.Access != "" {
13769		objectMap["access"] = rfrpf.Access
13770	}
13771	if rfrpf.RouteFilterRuleType != nil {
13772		objectMap["routeFilterRuleType"] = rfrpf.RouteFilterRuleType
13773	}
13774	if rfrpf.Communities != nil {
13775		objectMap["communities"] = rfrpf.Communities
13776	}
13777	return json.Marshal(objectMap)
13778}
13779
13780// RouteFilterRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
13781// long-running operation.
13782type RouteFilterRulesCreateOrUpdateFuture struct {
13783	azure.FutureAPI
13784	// Result returns the result of the asynchronous operation.
13785	// If the operation has not completed it will return an error.
13786	Result func(RouteFilterRulesClient) (RouteFilterRule, error)
13787}
13788
13789// RouteFilterRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
13790// operation.
13791type RouteFilterRulesDeleteFuture struct {
13792	azure.FutureAPI
13793	// Result returns the result of the asynchronous operation.
13794	// If the operation has not completed it will return an error.
13795	Result func(RouteFilterRulesClient) (autorest.Response, error)
13796}
13797
13798// RouteFilterRulesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
13799// operation.
13800type RouteFilterRulesUpdateFuture struct {
13801	azure.FutureAPI
13802	// Result returns the result of the asynchronous operation.
13803	// If the operation has not completed it will return an error.
13804	Result func(RouteFilterRulesClient) (RouteFilterRule, error)
13805}
13806
13807// RouteFiltersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
13808// long-running operation.
13809type RouteFiltersCreateOrUpdateFuture struct {
13810	azure.FutureAPI
13811	// Result returns the result of the asynchronous operation.
13812	// If the operation has not completed it will return an error.
13813	Result func(RouteFiltersClient) (RouteFilter, error)
13814}
13815
13816// RouteFiltersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
13817// operation.
13818type RouteFiltersDeleteFuture struct {
13819	azure.FutureAPI
13820	// Result returns the result of the asynchronous operation.
13821	// If the operation has not completed it will return an error.
13822	Result func(RouteFiltersClient) (autorest.Response, error)
13823}
13824
13825// RouteFiltersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
13826// operation.
13827type RouteFiltersUpdateFuture struct {
13828	azure.FutureAPI
13829	// Result returns the result of the asynchronous operation.
13830	// If the operation has not completed it will return an error.
13831	Result func(RouteFiltersClient) (RouteFilter, error)
13832}
13833
13834// RouteListResult response for the ListRoute API service call
13835type RouteListResult struct {
13836	autorest.Response `json:"-"`
13837	// Value - Gets a list of routes in a resource group.
13838	Value *[]Route `json:"value,omitempty"`
13839	// NextLink - The URL to get the next set of results.
13840	NextLink *string `json:"nextLink,omitempty"`
13841}
13842
13843// RouteListResultIterator provides access to a complete listing of Route values.
13844type RouteListResultIterator struct {
13845	i    int
13846	page RouteListResultPage
13847}
13848
13849// NextWithContext advances to the next value.  If there was an error making
13850// the request the iterator does not advance and the error is returned.
13851func (iter *RouteListResultIterator) NextWithContext(ctx context.Context) (err error) {
13852	if tracing.IsEnabled() {
13853		ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultIterator.NextWithContext")
13854		defer func() {
13855			sc := -1
13856			if iter.Response().Response.Response != nil {
13857				sc = iter.Response().Response.Response.StatusCode
13858			}
13859			tracing.EndSpan(ctx, sc, err)
13860		}()
13861	}
13862	iter.i++
13863	if iter.i < len(iter.page.Values()) {
13864		return nil
13865	}
13866	err = iter.page.NextWithContext(ctx)
13867	if err != nil {
13868		iter.i--
13869		return err
13870	}
13871	iter.i = 0
13872	return nil
13873}
13874
13875// Next advances to the next value.  If there was an error making
13876// the request the iterator does not advance and the error is returned.
13877// Deprecated: Use NextWithContext() instead.
13878func (iter *RouteListResultIterator) Next() error {
13879	return iter.NextWithContext(context.Background())
13880}
13881
13882// NotDone returns true if the enumeration should be started or is not yet complete.
13883func (iter RouteListResultIterator) NotDone() bool {
13884	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13885}
13886
13887// Response returns the raw server response from the last page request.
13888func (iter RouteListResultIterator) Response() RouteListResult {
13889	return iter.page.Response()
13890}
13891
13892// Value returns the current value or a zero-initialized value if the
13893// iterator has advanced beyond the end of the collection.
13894func (iter RouteListResultIterator) Value() Route {
13895	if !iter.page.NotDone() {
13896		return Route{}
13897	}
13898	return iter.page.Values()[iter.i]
13899}
13900
13901// Creates a new instance of the RouteListResultIterator type.
13902func NewRouteListResultIterator(page RouteListResultPage) RouteListResultIterator {
13903	return RouteListResultIterator{page: page}
13904}
13905
13906// IsEmpty returns true if the ListResult contains no values.
13907func (rlr RouteListResult) IsEmpty() bool {
13908	return rlr.Value == nil || len(*rlr.Value) == 0
13909}
13910
13911// hasNextLink returns true if the NextLink is not empty.
13912func (rlr RouteListResult) hasNextLink() bool {
13913	return rlr.NextLink != nil && len(*rlr.NextLink) != 0
13914}
13915
13916// routeListResultPreparer prepares a request to retrieve the next set of results.
13917// It returns nil if no more results exist.
13918func (rlr RouteListResult) routeListResultPreparer(ctx context.Context) (*http.Request, error) {
13919	if !rlr.hasNextLink() {
13920		return nil, nil
13921	}
13922	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13923		autorest.AsJSON(),
13924		autorest.AsGet(),
13925		autorest.WithBaseURL(to.String(rlr.NextLink)))
13926}
13927
13928// RouteListResultPage contains a page of Route values.
13929type RouteListResultPage struct {
13930	fn  func(context.Context, RouteListResult) (RouteListResult, error)
13931	rlr RouteListResult
13932}
13933
13934// NextWithContext advances to the next page of values.  If there was an error making
13935// the request the page does not advance and the error is returned.
13936func (page *RouteListResultPage) NextWithContext(ctx context.Context) (err error) {
13937	if tracing.IsEnabled() {
13938		ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultPage.NextWithContext")
13939		defer func() {
13940			sc := -1
13941			if page.Response().Response.Response != nil {
13942				sc = page.Response().Response.Response.StatusCode
13943			}
13944			tracing.EndSpan(ctx, sc, err)
13945		}()
13946	}
13947	for {
13948		next, err := page.fn(ctx, page.rlr)
13949		if err != nil {
13950			return err
13951		}
13952		page.rlr = next
13953		if !next.hasNextLink() || !next.IsEmpty() {
13954			break
13955		}
13956	}
13957	return nil
13958}
13959
13960// Next 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.
13962// Deprecated: Use NextWithContext() instead.
13963func (page *RouteListResultPage) Next() error {
13964	return page.NextWithContext(context.Background())
13965}
13966
13967// NotDone returns true if the page enumeration should be started or is not yet complete.
13968func (page RouteListResultPage) NotDone() bool {
13969	return !page.rlr.IsEmpty()
13970}
13971
13972// Response returns the raw server response from the last page request.
13973func (page RouteListResultPage) Response() RouteListResult {
13974	return page.rlr
13975}
13976
13977// Values returns the slice of values for the current page or nil if there are no values.
13978func (page RouteListResultPage) Values() []Route {
13979	if page.rlr.IsEmpty() {
13980		return nil
13981	}
13982	return *page.rlr.Value
13983}
13984
13985// Creates a new instance of the RouteListResultPage type.
13986func NewRouteListResultPage(cur RouteListResult, getNextPage func(context.Context, RouteListResult) (RouteListResult, error)) RouteListResultPage {
13987	return RouteListResultPage{
13988		fn:  getNextPage,
13989		rlr: cur,
13990	}
13991}
13992
13993// RoutePropertiesFormat route resource
13994type RoutePropertiesFormat struct {
13995	// AddressPrefix - The destination CIDR to which the route applies.
13996	AddressPrefix *string `json:"addressPrefix,omitempty"`
13997	// 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'
13998	NextHopType RouteNextHopType `json:"nextHopType,omitempty"`
13999	// NextHopIPAddress - The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance.
14000	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
14001	// ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
14002	ProvisioningState *string `json:"provisioningState,omitempty"`
14003}
14004
14005// RoutesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
14006// operation.
14007type RoutesCreateOrUpdateFuture struct {
14008	azure.FutureAPI
14009	// Result returns the result of the asynchronous operation.
14010	// If the operation has not completed it will return an error.
14011	Result func(RoutesClient) (Route, error)
14012}
14013
14014// RoutesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
14015type RoutesDeleteFuture struct {
14016	azure.FutureAPI
14017	// Result returns the result of the asynchronous operation.
14018	// If the operation has not completed it will return an error.
14019	Result func(RoutesClient) (autorest.Response, error)
14020}
14021
14022// RouteTable route table resource.
14023type RouteTable struct {
14024	autorest.Response `json:"-"`
14025	// RouteTablePropertiesFormat - Properties of the route table.
14026	*RouteTablePropertiesFormat `json:"properties,omitempty"`
14027	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
14028	Etag *string `json:"etag,omitempty"`
14029	// ID - Resource ID.
14030	ID *string `json:"id,omitempty"`
14031	// Name - READ-ONLY; Resource name.
14032	Name *string `json:"name,omitempty"`
14033	// Type - READ-ONLY; Resource type.
14034	Type *string `json:"type,omitempty"`
14035	// Location - Resource location.
14036	Location *string `json:"location,omitempty"`
14037	// Tags - Resource tags.
14038	Tags map[string]*string `json:"tags"`
14039}
14040
14041// MarshalJSON is the custom marshaler for RouteTable.
14042func (rt RouteTable) MarshalJSON() ([]byte, error) {
14043	objectMap := make(map[string]interface{})
14044	if rt.RouteTablePropertiesFormat != nil {
14045		objectMap["properties"] = rt.RouteTablePropertiesFormat
14046	}
14047	if rt.Etag != nil {
14048		objectMap["etag"] = rt.Etag
14049	}
14050	if rt.ID != nil {
14051		objectMap["id"] = rt.ID
14052	}
14053	if rt.Location != nil {
14054		objectMap["location"] = rt.Location
14055	}
14056	if rt.Tags != nil {
14057		objectMap["tags"] = rt.Tags
14058	}
14059	return json.Marshal(objectMap)
14060}
14061
14062// UnmarshalJSON is the custom unmarshaler for RouteTable struct.
14063func (rt *RouteTable) UnmarshalJSON(body []byte) error {
14064	var m map[string]*json.RawMessage
14065	err := json.Unmarshal(body, &m)
14066	if err != nil {
14067		return err
14068	}
14069	for k, v := range m {
14070		switch k {
14071		case "properties":
14072			if v != nil {
14073				var routeTablePropertiesFormat RouteTablePropertiesFormat
14074				err = json.Unmarshal(*v, &routeTablePropertiesFormat)
14075				if err != nil {
14076					return err
14077				}
14078				rt.RouteTablePropertiesFormat = &routeTablePropertiesFormat
14079			}
14080		case "etag":
14081			if v != nil {
14082				var etag string
14083				err = json.Unmarshal(*v, &etag)
14084				if err != nil {
14085					return err
14086				}
14087				rt.Etag = &etag
14088			}
14089		case "id":
14090			if v != nil {
14091				var ID string
14092				err = json.Unmarshal(*v, &ID)
14093				if err != nil {
14094					return err
14095				}
14096				rt.ID = &ID
14097			}
14098		case "name":
14099			if v != nil {
14100				var name string
14101				err = json.Unmarshal(*v, &name)
14102				if err != nil {
14103					return err
14104				}
14105				rt.Name = &name
14106			}
14107		case "type":
14108			if v != nil {
14109				var typeVar string
14110				err = json.Unmarshal(*v, &typeVar)
14111				if err != nil {
14112					return err
14113				}
14114				rt.Type = &typeVar
14115			}
14116		case "location":
14117			if v != nil {
14118				var location string
14119				err = json.Unmarshal(*v, &location)
14120				if err != nil {
14121					return err
14122				}
14123				rt.Location = &location
14124			}
14125		case "tags":
14126			if v != nil {
14127				var tags map[string]*string
14128				err = json.Unmarshal(*v, &tags)
14129				if err != nil {
14130					return err
14131				}
14132				rt.Tags = tags
14133			}
14134		}
14135	}
14136
14137	return nil
14138}
14139
14140// RouteTableListResult response for the ListRouteTable API service call.
14141type RouteTableListResult struct {
14142	autorest.Response `json:"-"`
14143	// Value - Gets a list of route tables in a resource group.
14144	Value *[]RouteTable `json:"value,omitempty"`
14145	// NextLink - The URL to get the next set of results.
14146	NextLink *string `json:"nextLink,omitempty"`
14147}
14148
14149// RouteTableListResultIterator provides access to a complete listing of RouteTable values.
14150type RouteTableListResultIterator struct {
14151	i    int
14152	page RouteTableListResultPage
14153}
14154
14155// NextWithContext advances to the next value.  If there was an error making
14156// the request the iterator does not advance and the error is returned.
14157func (iter *RouteTableListResultIterator) NextWithContext(ctx context.Context) (err error) {
14158	if tracing.IsEnabled() {
14159		ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultIterator.NextWithContext")
14160		defer func() {
14161			sc := -1
14162			if iter.Response().Response.Response != nil {
14163				sc = iter.Response().Response.Response.StatusCode
14164			}
14165			tracing.EndSpan(ctx, sc, err)
14166		}()
14167	}
14168	iter.i++
14169	if iter.i < len(iter.page.Values()) {
14170		return nil
14171	}
14172	err = iter.page.NextWithContext(ctx)
14173	if err != nil {
14174		iter.i--
14175		return err
14176	}
14177	iter.i = 0
14178	return nil
14179}
14180
14181// Next advances to the next value.  If there was an error making
14182// the request the iterator does not advance and the error is returned.
14183// Deprecated: Use NextWithContext() instead.
14184func (iter *RouteTableListResultIterator) Next() error {
14185	return iter.NextWithContext(context.Background())
14186}
14187
14188// NotDone returns true if the enumeration should be started or is not yet complete.
14189func (iter RouteTableListResultIterator) NotDone() bool {
14190	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14191}
14192
14193// Response returns the raw server response from the last page request.
14194func (iter RouteTableListResultIterator) Response() RouteTableListResult {
14195	return iter.page.Response()
14196}
14197
14198// Value returns the current value or a zero-initialized value if the
14199// iterator has advanced beyond the end of the collection.
14200func (iter RouteTableListResultIterator) Value() RouteTable {
14201	if !iter.page.NotDone() {
14202		return RouteTable{}
14203	}
14204	return iter.page.Values()[iter.i]
14205}
14206
14207// Creates a new instance of the RouteTableListResultIterator type.
14208func NewRouteTableListResultIterator(page RouteTableListResultPage) RouteTableListResultIterator {
14209	return RouteTableListResultIterator{page: page}
14210}
14211
14212// IsEmpty returns true if the ListResult contains no values.
14213func (rtlr RouteTableListResult) IsEmpty() bool {
14214	return rtlr.Value == nil || len(*rtlr.Value) == 0
14215}
14216
14217// hasNextLink returns true if the NextLink is not empty.
14218func (rtlr RouteTableListResult) hasNextLink() bool {
14219	return rtlr.NextLink != nil && len(*rtlr.NextLink) != 0
14220}
14221
14222// routeTableListResultPreparer prepares a request to retrieve the next set of results.
14223// It returns nil if no more results exist.
14224func (rtlr RouteTableListResult) routeTableListResultPreparer(ctx context.Context) (*http.Request, error) {
14225	if !rtlr.hasNextLink() {
14226		return nil, nil
14227	}
14228	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14229		autorest.AsJSON(),
14230		autorest.AsGet(),
14231		autorest.WithBaseURL(to.String(rtlr.NextLink)))
14232}
14233
14234// RouteTableListResultPage contains a page of RouteTable values.
14235type RouteTableListResultPage struct {
14236	fn   func(context.Context, RouteTableListResult) (RouteTableListResult, error)
14237	rtlr RouteTableListResult
14238}
14239
14240// NextWithContext advances to the next page of values.  If there was an error making
14241// the request the page does not advance and the error is returned.
14242func (page *RouteTableListResultPage) NextWithContext(ctx context.Context) (err error) {
14243	if tracing.IsEnabled() {
14244		ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultPage.NextWithContext")
14245		defer func() {
14246			sc := -1
14247			if page.Response().Response.Response != nil {
14248				sc = page.Response().Response.Response.StatusCode
14249			}
14250			tracing.EndSpan(ctx, sc, err)
14251		}()
14252	}
14253	for {
14254		next, err := page.fn(ctx, page.rtlr)
14255		if err != nil {
14256			return err
14257		}
14258		page.rtlr = next
14259		if !next.hasNextLink() || !next.IsEmpty() {
14260			break
14261		}
14262	}
14263	return nil
14264}
14265
14266// Next advances to the next page of values.  If there was an error making
14267// the request the page does not advance and the error is returned.
14268// Deprecated: Use NextWithContext() instead.
14269func (page *RouteTableListResultPage) Next() error {
14270	return page.NextWithContext(context.Background())
14271}
14272
14273// NotDone returns true if the page enumeration should be started or is not yet complete.
14274func (page RouteTableListResultPage) NotDone() bool {
14275	return !page.rtlr.IsEmpty()
14276}
14277
14278// Response returns the raw server response from the last page request.
14279func (page RouteTableListResultPage) Response() RouteTableListResult {
14280	return page.rtlr
14281}
14282
14283// Values returns the slice of values for the current page or nil if there are no values.
14284func (page RouteTableListResultPage) Values() []RouteTable {
14285	if page.rtlr.IsEmpty() {
14286		return nil
14287	}
14288	return *page.rtlr.Value
14289}
14290
14291// Creates a new instance of the RouteTableListResultPage type.
14292func NewRouteTableListResultPage(cur RouteTableListResult, getNextPage func(context.Context, RouteTableListResult) (RouteTableListResult, error)) RouteTableListResultPage {
14293	return RouteTableListResultPage{
14294		fn:   getNextPage,
14295		rtlr: cur,
14296	}
14297}
14298
14299// RouteTablePropertiesFormat route Table resource
14300type RouteTablePropertiesFormat struct {
14301	// Routes - Collection of routes contained within a route table.
14302	Routes *[]Route `json:"routes,omitempty"`
14303	// Subnets - READ-ONLY; A collection of references to subnets.
14304	Subnets *[]Subnet `json:"subnets,omitempty"`
14305	// DisableBgpRoutePropagation - Gets or sets whether to disable the routes learned by BGP on that route table. True means disable.
14306	DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"`
14307	// ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
14308	ProvisioningState *string `json:"provisioningState,omitempty"`
14309}
14310
14311// MarshalJSON is the custom marshaler for RouteTablePropertiesFormat.
14312func (rtpf RouteTablePropertiesFormat) MarshalJSON() ([]byte, error) {
14313	objectMap := make(map[string]interface{})
14314	if rtpf.Routes != nil {
14315		objectMap["routes"] = rtpf.Routes
14316	}
14317	if rtpf.DisableBgpRoutePropagation != nil {
14318		objectMap["disableBgpRoutePropagation"] = rtpf.DisableBgpRoutePropagation
14319	}
14320	if rtpf.ProvisioningState != nil {
14321		objectMap["provisioningState"] = rtpf.ProvisioningState
14322	}
14323	return json.Marshal(objectMap)
14324}
14325
14326// RouteTablesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
14327// long-running operation.
14328type RouteTablesCreateOrUpdateFuture struct {
14329	azure.FutureAPI
14330	// Result returns the result of the asynchronous operation.
14331	// If the operation has not completed it will return an error.
14332	Result func(RouteTablesClient) (RouteTable, error)
14333}
14334
14335// RouteTablesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
14336// operation.
14337type RouteTablesDeleteFuture struct {
14338	azure.FutureAPI
14339	// Result returns the result of the asynchronous operation.
14340	// If the operation has not completed it will return an error.
14341	Result func(RouteTablesClient) (autorest.Response, error)
14342}
14343
14344// RouteTablesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
14345// operation.
14346type RouteTablesUpdateTagsFuture struct {
14347	azure.FutureAPI
14348	// Result returns the result of the asynchronous operation.
14349	// If the operation has not completed it will return an error.
14350	Result func(RouteTablesClient) (RouteTable, error)
14351}
14352
14353// SecurityGroup networkSecurityGroup resource.
14354type SecurityGroup struct {
14355	autorest.Response `json:"-"`
14356	// SecurityGroupPropertiesFormat - Properties of the network security group
14357	*SecurityGroupPropertiesFormat `json:"properties,omitempty"`
14358	// Etag - A unique read-only string that changes whenever the resource is updated.
14359	Etag *string `json:"etag,omitempty"`
14360	// ID - Resource ID.
14361	ID *string `json:"id,omitempty"`
14362	// Name - READ-ONLY; Resource name.
14363	Name *string `json:"name,omitempty"`
14364	// Type - READ-ONLY; Resource type.
14365	Type *string `json:"type,omitempty"`
14366	// Location - Resource location.
14367	Location *string `json:"location,omitempty"`
14368	// Tags - Resource tags.
14369	Tags map[string]*string `json:"tags"`
14370}
14371
14372// MarshalJSON is the custom marshaler for SecurityGroup.
14373func (sg SecurityGroup) MarshalJSON() ([]byte, error) {
14374	objectMap := make(map[string]interface{})
14375	if sg.SecurityGroupPropertiesFormat != nil {
14376		objectMap["properties"] = sg.SecurityGroupPropertiesFormat
14377	}
14378	if sg.Etag != nil {
14379		objectMap["etag"] = sg.Etag
14380	}
14381	if sg.ID != nil {
14382		objectMap["id"] = sg.ID
14383	}
14384	if sg.Location != nil {
14385		objectMap["location"] = sg.Location
14386	}
14387	if sg.Tags != nil {
14388		objectMap["tags"] = sg.Tags
14389	}
14390	return json.Marshal(objectMap)
14391}
14392
14393// UnmarshalJSON is the custom unmarshaler for SecurityGroup struct.
14394func (sg *SecurityGroup) UnmarshalJSON(body []byte) error {
14395	var m map[string]*json.RawMessage
14396	err := json.Unmarshal(body, &m)
14397	if err != nil {
14398		return err
14399	}
14400	for k, v := range m {
14401		switch k {
14402		case "properties":
14403			if v != nil {
14404				var securityGroupPropertiesFormat SecurityGroupPropertiesFormat
14405				err = json.Unmarshal(*v, &securityGroupPropertiesFormat)
14406				if err != nil {
14407					return err
14408				}
14409				sg.SecurityGroupPropertiesFormat = &securityGroupPropertiesFormat
14410			}
14411		case "etag":
14412			if v != nil {
14413				var etag string
14414				err = json.Unmarshal(*v, &etag)
14415				if err != nil {
14416					return err
14417				}
14418				sg.Etag = &etag
14419			}
14420		case "id":
14421			if v != nil {
14422				var ID string
14423				err = json.Unmarshal(*v, &ID)
14424				if err != nil {
14425					return err
14426				}
14427				sg.ID = &ID
14428			}
14429		case "name":
14430			if v != nil {
14431				var name string
14432				err = json.Unmarshal(*v, &name)
14433				if err != nil {
14434					return err
14435				}
14436				sg.Name = &name
14437			}
14438		case "type":
14439			if v != nil {
14440				var typeVar string
14441				err = json.Unmarshal(*v, &typeVar)
14442				if err != nil {
14443					return err
14444				}
14445				sg.Type = &typeVar
14446			}
14447		case "location":
14448			if v != nil {
14449				var location string
14450				err = json.Unmarshal(*v, &location)
14451				if err != nil {
14452					return err
14453				}
14454				sg.Location = &location
14455			}
14456		case "tags":
14457			if v != nil {
14458				var tags map[string]*string
14459				err = json.Unmarshal(*v, &tags)
14460				if err != nil {
14461					return err
14462				}
14463				sg.Tags = tags
14464			}
14465		}
14466	}
14467
14468	return nil
14469}
14470
14471// SecurityGroupListResult response for ListNetworkSecurityGroups API service call.
14472type SecurityGroupListResult struct {
14473	autorest.Response `json:"-"`
14474	// Value - A list of NetworkSecurityGroup resources.
14475	Value *[]SecurityGroup `json:"value,omitempty"`
14476	// NextLink - The URL to get the next set of results.
14477	NextLink *string `json:"nextLink,omitempty"`
14478}
14479
14480// SecurityGroupListResultIterator provides access to a complete listing of SecurityGroup values.
14481type SecurityGroupListResultIterator struct {
14482	i    int
14483	page SecurityGroupListResultPage
14484}
14485
14486// NextWithContext advances to the next value.  If there was an error making
14487// the request the iterator does not advance and the error is returned.
14488func (iter *SecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
14489	if tracing.IsEnabled() {
14490		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultIterator.NextWithContext")
14491		defer func() {
14492			sc := -1
14493			if iter.Response().Response.Response != nil {
14494				sc = iter.Response().Response.Response.StatusCode
14495			}
14496			tracing.EndSpan(ctx, sc, err)
14497		}()
14498	}
14499	iter.i++
14500	if iter.i < len(iter.page.Values()) {
14501		return nil
14502	}
14503	err = iter.page.NextWithContext(ctx)
14504	if err != nil {
14505		iter.i--
14506		return err
14507	}
14508	iter.i = 0
14509	return nil
14510}
14511
14512// Next advances to the next value.  If there was an error making
14513// the request the iterator does not advance and the error is returned.
14514// Deprecated: Use NextWithContext() instead.
14515func (iter *SecurityGroupListResultIterator) Next() error {
14516	return iter.NextWithContext(context.Background())
14517}
14518
14519// NotDone returns true if the enumeration should be started or is not yet complete.
14520func (iter SecurityGroupListResultIterator) NotDone() bool {
14521	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14522}
14523
14524// Response returns the raw server response from the last page request.
14525func (iter SecurityGroupListResultIterator) Response() SecurityGroupListResult {
14526	return iter.page.Response()
14527}
14528
14529// Value returns the current value or a zero-initialized value if the
14530// iterator has advanced beyond the end of the collection.
14531func (iter SecurityGroupListResultIterator) Value() SecurityGroup {
14532	if !iter.page.NotDone() {
14533		return SecurityGroup{}
14534	}
14535	return iter.page.Values()[iter.i]
14536}
14537
14538// Creates a new instance of the SecurityGroupListResultIterator type.
14539func NewSecurityGroupListResultIterator(page SecurityGroupListResultPage) SecurityGroupListResultIterator {
14540	return SecurityGroupListResultIterator{page: page}
14541}
14542
14543// IsEmpty returns true if the ListResult contains no values.
14544func (sglr SecurityGroupListResult) IsEmpty() bool {
14545	return sglr.Value == nil || len(*sglr.Value) == 0
14546}
14547
14548// hasNextLink returns true if the NextLink is not empty.
14549func (sglr SecurityGroupListResult) hasNextLink() bool {
14550	return sglr.NextLink != nil && len(*sglr.NextLink) != 0
14551}
14552
14553// securityGroupListResultPreparer prepares a request to retrieve the next set of results.
14554// It returns nil if no more results exist.
14555func (sglr SecurityGroupListResult) securityGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
14556	if !sglr.hasNextLink() {
14557		return nil, nil
14558	}
14559	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14560		autorest.AsJSON(),
14561		autorest.AsGet(),
14562		autorest.WithBaseURL(to.String(sglr.NextLink)))
14563}
14564
14565// SecurityGroupListResultPage contains a page of SecurityGroup values.
14566type SecurityGroupListResultPage struct {
14567	fn   func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)
14568	sglr SecurityGroupListResult
14569}
14570
14571// NextWithContext advances to the next page of values.  If there was an error making
14572// the request the page does not advance and the error is returned.
14573func (page *SecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
14574	if tracing.IsEnabled() {
14575		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultPage.NextWithContext")
14576		defer func() {
14577			sc := -1
14578			if page.Response().Response.Response != nil {
14579				sc = page.Response().Response.Response.StatusCode
14580			}
14581			tracing.EndSpan(ctx, sc, err)
14582		}()
14583	}
14584	for {
14585		next, err := page.fn(ctx, page.sglr)
14586		if err != nil {
14587			return err
14588		}
14589		page.sglr = next
14590		if !next.hasNextLink() || !next.IsEmpty() {
14591			break
14592		}
14593	}
14594	return nil
14595}
14596
14597// Next advances to the next page of values.  If there was an error making
14598// the request the page does not advance and the error is returned.
14599// Deprecated: Use NextWithContext() instead.
14600func (page *SecurityGroupListResultPage) Next() error {
14601	return page.NextWithContext(context.Background())
14602}
14603
14604// NotDone returns true if the page enumeration should be started or is not yet complete.
14605func (page SecurityGroupListResultPage) NotDone() bool {
14606	return !page.sglr.IsEmpty()
14607}
14608
14609// Response returns the raw server response from the last page request.
14610func (page SecurityGroupListResultPage) Response() SecurityGroupListResult {
14611	return page.sglr
14612}
14613
14614// Values returns the slice of values for the current page or nil if there are no values.
14615func (page SecurityGroupListResultPage) Values() []SecurityGroup {
14616	if page.sglr.IsEmpty() {
14617		return nil
14618	}
14619	return *page.sglr.Value
14620}
14621
14622// Creates a new instance of the SecurityGroupListResultPage type.
14623func NewSecurityGroupListResultPage(cur SecurityGroupListResult, getNextPage func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)) SecurityGroupListResultPage {
14624	return SecurityGroupListResultPage{
14625		fn:   getNextPage,
14626		sglr: cur,
14627	}
14628}
14629
14630// SecurityGroupNetworkInterface network interface and all its associated security rules.
14631type SecurityGroupNetworkInterface struct {
14632	// ID - ID of the network interface.
14633	ID                       *string                   `json:"id,omitempty"`
14634	SecurityRuleAssociations *SecurityRuleAssociations `json:"securityRuleAssociations,omitempty"`
14635}
14636
14637// SecurityGroupPropertiesFormat network Security Group resource.
14638type SecurityGroupPropertiesFormat struct {
14639	// SecurityRules - A collection of security rules of the network security group.
14640	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
14641	// DefaultSecurityRules - The default security rules of network security group.
14642	DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"`
14643	// NetworkInterfaces - READ-ONLY; A collection of references to network interfaces.
14644	NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"`
14645	// Subnets - READ-ONLY; A collection of references to subnets.
14646	Subnets *[]Subnet `json:"subnets,omitempty"`
14647	// ResourceGUID - The resource GUID property of the network security group resource.
14648	ResourceGUID *string `json:"resourceGuid,omitempty"`
14649	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
14650	ProvisioningState *string `json:"provisioningState,omitempty"`
14651}
14652
14653// MarshalJSON is the custom marshaler for SecurityGroupPropertiesFormat.
14654func (sgpf SecurityGroupPropertiesFormat) MarshalJSON() ([]byte, error) {
14655	objectMap := make(map[string]interface{})
14656	if sgpf.SecurityRules != nil {
14657		objectMap["securityRules"] = sgpf.SecurityRules
14658	}
14659	if sgpf.DefaultSecurityRules != nil {
14660		objectMap["defaultSecurityRules"] = sgpf.DefaultSecurityRules
14661	}
14662	if sgpf.ResourceGUID != nil {
14663		objectMap["resourceGuid"] = sgpf.ResourceGUID
14664	}
14665	if sgpf.ProvisioningState != nil {
14666		objectMap["provisioningState"] = sgpf.ProvisioningState
14667	}
14668	return json.Marshal(objectMap)
14669}
14670
14671// SecurityGroupResult network configuration diagnostic result corresponded provided traffic query.
14672type SecurityGroupResult struct {
14673	// SecurityRuleAccessResult - The network traffic is allowed or denied. Possible values are 'Allow' and 'Deny'. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
14674	SecurityRuleAccessResult SecurityRuleAccess `json:"securityRuleAccessResult,omitempty"`
14675	// EvaluatedNetworkSecurityGroups - READ-ONLY; List of results network security groups diagnostic.
14676	EvaluatedNetworkSecurityGroups *[]EvaluatedNetworkSecurityGroup `json:"evaluatedNetworkSecurityGroups,omitempty"`
14677}
14678
14679// MarshalJSON is the custom marshaler for SecurityGroupResult.
14680func (sgr SecurityGroupResult) MarshalJSON() ([]byte, error) {
14681	objectMap := make(map[string]interface{})
14682	if sgr.SecurityRuleAccessResult != "" {
14683		objectMap["securityRuleAccessResult"] = sgr.SecurityRuleAccessResult
14684	}
14685	return json.Marshal(objectMap)
14686}
14687
14688// SecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
14689// long-running operation.
14690type SecurityGroupsCreateOrUpdateFuture struct {
14691	azure.FutureAPI
14692	// Result returns the result of the asynchronous operation.
14693	// If the operation has not completed it will return an error.
14694	Result func(SecurityGroupsClient) (SecurityGroup, error)
14695}
14696
14697// SecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
14698// operation.
14699type SecurityGroupsDeleteFuture struct {
14700	azure.FutureAPI
14701	// Result returns the result of the asynchronous operation.
14702	// If the operation has not completed it will return an error.
14703	Result func(SecurityGroupsClient) (autorest.Response, error)
14704}
14705
14706// SecurityGroupsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
14707// long-running operation.
14708type SecurityGroupsUpdateTagsFuture struct {
14709	azure.FutureAPI
14710	// Result returns the result of the asynchronous operation.
14711	// If the operation has not completed it will return an error.
14712	Result func(SecurityGroupsClient) (SecurityGroup, error)
14713}
14714
14715// SecurityGroupViewParameters parameters that define the VM to check security groups for.
14716type SecurityGroupViewParameters struct {
14717	// TargetResourceID - ID of the target VM.
14718	TargetResourceID *string `json:"targetResourceId,omitempty"`
14719}
14720
14721// SecurityGroupViewResult the information about security rules applied to the specified VM.
14722type SecurityGroupViewResult struct {
14723	autorest.Response `json:"-"`
14724	// NetworkInterfaces - List of network interfaces on the specified VM.
14725	NetworkInterfaces *[]SecurityGroupNetworkInterface `json:"networkInterfaces,omitempty"`
14726}
14727
14728// SecurityRule network security rule.
14729type SecurityRule struct {
14730	autorest.Response `json:"-"`
14731	// SecurityRulePropertiesFormat - Properties of the security rule
14732	*SecurityRulePropertiesFormat `json:"properties,omitempty"`
14733	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
14734	Name *string `json:"name,omitempty"`
14735	// Etag - A unique read-only string that changes whenever the resource is updated.
14736	Etag *string `json:"etag,omitempty"`
14737	// ID - Resource ID.
14738	ID *string `json:"id,omitempty"`
14739}
14740
14741// MarshalJSON is the custom marshaler for SecurityRule.
14742func (sr SecurityRule) MarshalJSON() ([]byte, error) {
14743	objectMap := make(map[string]interface{})
14744	if sr.SecurityRulePropertiesFormat != nil {
14745		objectMap["properties"] = sr.SecurityRulePropertiesFormat
14746	}
14747	if sr.Name != nil {
14748		objectMap["name"] = sr.Name
14749	}
14750	if sr.Etag != nil {
14751		objectMap["etag"] = sr.Etag
14752	}
14753	if sr.ID != nil {
14754		objectMap["id"] = sr.ID
14755	}
14756	return json.Marshal(objectMap)
14757}
14758
14759// UnmarshalJSON is the custom unmarshaler for SecurityRule struct.
14760func (sr *SecurityRule) UnmarshalJSON(body []byte) error {
14761	var m map[string]*json.RawMessage
14762	err := json.Unmarshal(body, &m)
14763	if err != nil {
14764		return err
14765	}
14766	for k, v := range m {
14767		switch k {
14768		case "properties":
14769			if v != nil {
14770				var securityRulePropertiesFormat SecurityRulePropertiesFormat
14771				err = json.Unmarshal(*v, &securityRulePropertiesFormat)
14772				if err != nil {
14773					return err
14774				}
14775				sr.SecurityRulePropertiesFormat = &securityRulePropertiesFormat
14776			}
14777		case "name":
14778			if v != nil {
14779				var name string
14780				err = json.Unmarshal(*v, &name)
14781				if err != nil {
14782					return err
14783				}
14784				sr.Name = &name
14785			}
14786		case "etag":
14787			if v != nil {
14788				var etag string
14789				err = json.Unmarshal(*v, &etag)
14790				if err != nil {
14791					return err
14792				}
14793				sr.Etag = &etag
14794			}
14795		case "id":
14796			if v != nil {
14797				var ID string
14798				err = json.Unmarshal(*v, &ID)
14799				if err != nil {
14800					return err
14801				}
14802				sr.ID = &ID
14803			}
14804		}
14805	}
14806
14807	return nil
14808}
14809
14810// SecurityRuleAssociations all security rules associated with the network interface.
14811type SecurityRuleAssociations struct {
14812	NetworkInterfaceAssociation *InterfaceAssociation `json:"networkInterfaceAssociation,omitempty"`
14813	SubnetAssociation           *SubnetAssociation    `json:"subnetAssociation,omitempty"`
14814	// DefaultSecurityRules - Collection of default security rules of the network security group.
14815	DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"`
14816	// EffectiveSecurityRules - Collection of effective security rules.
14817	EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"`
14818}
14819
14820// SecurityRuleListResult response for ListSecurityRule API service call. Retrieves all security rules that
14821// belongs to a network security group.
14822type SecurityRuleListResult struct {
14823	autorest.Response `json:"-"`
14824	// Value - The security rules in a network security group.
14825	Value *[]SecurityRule `json:"value,omitempty"`
14826	// NextLink - The URL to get the next set of results.
14827	NextLink *string `json:"nextLink,omitempty"`
14828}
14829
14830// SecurityRuleListResultIterator provides access to a complete listing of SecurityRule values.
14831type SecurityRuleListResultIterator struct {
14832	i    int
14833	page SecurityRuleListResultPage
14834}
14835
14836// NextWithContext advances to the next value.  If there was an error making
14837// the request the iterator does not advance and the error is returned.
14838func (iter *SecurityRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
14839	if tracing.IsEnabled() {
14840		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultIterator.NextWithContext")
14841		defer func() {
14842			sc := -1
14843			if iter.Response().Response.Response != nil {
14844				sc = iter.Response().Response.Response.StatusCode
14845			}
14846			tracing.EndSpan(ctx, sc, err)
14847		}()
14848	}
14849	iter.i++
14850	if iter.i < len(iter.page.Values()) {
14851		return nil
14852	}
14853	err = iter.page.NextWithContext(ctx)
14854	if err != nil {
14855		iter.i--
14856		return err
14857	}
14858	iter.i = 0
14859	return nil
14860}
14861
14862// Next advances to the next value.  If there was an error making
14863// the request the iterator does not advance and the error is returned.
14864// Deprecated: Use NextWithContext() instead.
14865func (iter *SecurityRuleListResultIterator) Next() error {
14866	return iter.NextWithContext(context.Background())
14867}
14868
14869// NotDone returns true if the enumeration should be started or is not yet complete.
14870func (iter SecurityRuleListResultIterator) NotDone() bool {
14871	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14872}
14873
14874// Response returns the raw server response from the last page request.
14875func (iter SecurityRuleListResultIterator) Response() SecurityRuleListResult {
14876	return iter.page.Response()
14877}
14878
14879// Value returns the current value or a zero-initialized value if the
14880// iterator has advanced beyond the end of the collection.
14881func (iter SecurityRuleListResultIterator) Value() SecurityRule {
14882	if !iter.page.NotDone() {
14883		return SecurityRule{}
14884	}
14885	return iter.page.Values()[iter.i]
14886}
14887
14888// Creates a new instance of the SecurityRuleListResultIterator type.
14889func NewSecurityRuleListResultIterator(page SecurityRuleListResultPage) SecurityRuleListResultIterator {
14890	return SecurityRuleListResultIterator{page: page}
14891}
14892
14893// IsEmpty returns true if the ListResult contains no values.
14894func (srlr SecurityRuleListResult) IsEmpty() bool {
14895	return srlr.Value == nil || len(*srlr.Value) == 0
14896}
14897
14898// hasNextLink returns true if the NextLink is not empty.
14899func (srlr SecurityRuleListResult) hasNextLink() bool {
14900	return srlr.NextLink != nil && len(*srlr.NextLink) != 0
14901}
14902
14903// securityRuleListResultPreparer prepares a request to retrieve the next set of results.
14904// It returns nil if no more results exist.
14905func (srlr SecurityRuleListResult) securityRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
14906	if !srlr.hasNextLink() {
14907		return nil, nil
14908	}
14909	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14910		autorest.AsJSON(),
14911		autorest.AsGet(),
14912		autorest.WithBaseURL(to.String(srlr.NextLink)))
14913}
14914
14915// SecurityRuleListResultPage contains a page of SecurityRule values.
14916type SecurityRuleListResultPage struct {
14917	fn   func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)
14918	srlr SecurityRuleListResult
14919}
14920
14921// NextWithContext advances to the next page of values.  If there was an error making
14922// the request the page does not advance and the error is returned.
14923func (page *SecurityRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
14924	if tracing.IsEnabled() {
14925		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultPage.NextWithContext")
14926		defer func() {
14927			sc := -1
14928			if page.Response().Response.Response != nil {
14929				sc = page.Response().Response.Response.StatusCode
14930			}
14931			tracing.EndSpan(ctx, sc, err)
14932		}()
14933	}
14934	for {
14935		next, err := page.fn(ctx, page.srlr)
14936		if err != nil {
14937			return err
14938		}
14939		page.srlr = next
14940		if !next.hasNextLink() || !next.IsEmpty() {
14941			break
14942		}
14943	}
14944	return nil
14945}
14946
14947// Next advances to the next page of values.  If there was an error making
14948// the request the page does not advance and the error is returned.
14949// Deprecated: Use NextWithContext() instead.
14950func (page *SecurityRuleListResultPage) Next() error {
14951	return page.NextWithContext(context.Background())
14952}
14953
14954// NotDone returns true if the page enumeration should be started or is not yet complete.
14955func (page SecurityRuleListResultPage) NotDone() bool {
14956	return !page.srlr.IsEmpty()
14957}
14958
14959// Response returns the raw server response from the last page request.
14960func (page SecurityRuleListResultPage) Response() SecurityRuleListResult {
14961	return page.srlr
14962}
14963
14964// Values returns the slice of values for the current page or nil if there are no values.
14965func (page SecurityRuleListResultPage) Values() []SecurityRule {
14966	if page.srlr.IsEmpty() {
14967		return nil
14968	}
14969	return *page.srlr.Value
14970}
14971
14972// Creates a new instance of the SecurityRuleListResultPage type.
14973func NewSecurityRuleListResultPage(cur SecurityRuleListResult, getNextPage func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)) SecurityRuleListResultPage {
14974	return SecurityRuleListResultPage{
14975		fn:   getNextPage,
14976		srlr: cur,
14977	}
14978}
14979
14980// SecurityRulePropertiesFormat security rule resource.
14981type SecurityRulePropertiesFormat struct {
14982	// Description - A description for this rule. Restricted to 140 chars.
14983	Description *string `json:"description,omitempty"`
14984	// Protocol - Network protocol this rule applies to. Possible values are 'Tcp', 'Udp', and '*'. Possible values include: 'SecurityRuleProtocolTCP', 'SecurityRuleProtocolUDP', 'SecurityRuleProtocolAsterisk'
14985	Protocol SecurityRuleProtocol `json:"protocol,omitempty"`
14986	// SourcePortRange - The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
14987	SourcePortRange *string `json:"sourcePortRange,omitempty"`
14988	// DestinationPortRange - The destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
14989	DestinationPortRange *string `json:"destinationPortRange,omitempty"`
14990	// SourceAddressPrefix - The CIDR or source IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. If this is an ingress rule, specifies where network traffic originates from.
14991	SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
14992	// SourceAddressPrefixes - The CIDR or source IP ranges.
14993	SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"`
14994	// SourceApplicationSecurityGroups - The application security group specified as source.
14995	SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"`
14996	// DestinationAddressPrefix - The destination address prefix. CIDR or destination IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used.
14997	DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"`
14998	// DestinationAddressPrefixes - The destination address prefixes. CIDR or destination IP ranges.
14999	DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"`
15000	// DestinationApplicationSecurityGroups - The application security group specified as destination.
15001	DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"`
15002	// SourcePortRanges - The source port ranges.
15003	SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"`
15004	// DestinationPortRanges - The destination port ranges.
15005	DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"`
15006	// Access - The network traffic is allowed or denied. Possible values are: 'Allow' and 'Deny'. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
15007	Access SecurityRuleAccess `json:"access,omitempty"`
15008	// 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.
15009	Priority *int32 `json:"priority,omitempty"`
15010	// 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'
15011	Direction SecurityRuleDirection `json:"direction,omitempty"`
15012	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
15013	ProvisioningState *string `json:"provisioningState,omitempty"`
15014}
15015
15016// SecurityRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
15017// long-running operation.
15018type SecurityRulesCreateOrUpdateFuture struct {
15019	azure.FutureAPI
15020	// Result returns the result of the asynchronous operation.
15021	// If the operation has not completed it will return an error.
15022	Result func(SecurityRulesClient) (SecurityRule, error)
15023}
15024
15025// SecurityRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
15026// operation.
15027type SecurityRulesDeleteFuture struct {
15028	azure.FutureAPI
15029	// Result returns the result of the asynchronous operation.
15030	// If the operation has not completed it will return an error.
15031	Result func(SecurityRulesClient) (autorest.Response, error)
15032}
15033
15034// SecurityRulesEvaluationResult network security rules evaluation result.
15035type SecurityRulesEvaluationResult struct {
15036	// Name - Name of the network security rule.
15037	Name *string `json:"name,omitempty"`
15038	// ProtocolMatched - Value indicating whether protocol is matched.
15039	ProtocolMatched *bool `json:"protocolMatched,omitempty"`
15040	// SourceMatched - Value indicating whether source is matched.
15041	SourceMatched *bool `json:"sourceMatched,omitempty"`
15042	// SourcePortMatched - Value indicating whether source port is matched.
15043	SourcePortMatched *bool `json:"sourcePortMatched,omitempty"`
15044	// DestinationMatched - Value indicating whether destination is matched.
15045	DestinationMatched *bool `json:"destinationMatched,omitempty"`
15046	// DestinationPortMatched - Value indicating whether destination port is matched.
15047	DestinationPortMatched *bool `json:"destinationPortMatched,omitempty"`
15048}
15049
15050// ServiceEndpointPropertiesFormat the service endpoint properties.
15051type ServiceEndpointPropertiesFormat struct {
15052	// Service - The type of the endpoint service.
15053	Service *string `json:"service,omitempty"`
15054	// Locations - A list of locations.
15055	Locations *[]string `json:"locations,omitempty"`
15056	// ProvisioningState - The provisioning state of the resource.
15057	ProvisioningState *string `json:"provisioningState,omitempty"`
15058}
15059
15060// String ...
15061type String struct {
15062	autorest.Response `json:"-"`
15063	Value             *string `json:"value,omitempty"`
15064}
15065
15066// Subnet subnet in a virtual network resource.
15067type Subnet struct {
15068	autorest.Response `json:"-"`
15069	// SubnetPropertiesFormat - Properties of the subnet.
15070	*SubnetPropertiesFormat `json:"properties,omitempty"`
15071	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
15072	Name *string `json:"name,omitempty"`
15073	// Etag - A unique read-only string that changes whenever the resource is updated.
15074	Etag *string `json:"etag,omitempty"`
15075	// ID - Resource ID.
15076	ID *string `json:"id,omitempty"`
15077}
15078
15079// MarshalJSON is the custom marshaler for Subnet.
15080func (s Subnet) MarshalJSON() ([]byte, error) {
15081	objectMap := make(map[string]interface{})
15082	if s.SubnetPropertiesFormat != nil {
15083		objectMap["properties"] = s.SubnetPropertiesFormat
15084	}
15085	if s.Name != nil {
15086		objectMap["name"] = s.Name
15087	}
15088	if s.Etag != nil {
15089		objectMap["etag"] = s.Etag
15090	}
15091	if s.ID != nil {
15092		objectMap["id"] = s.ID
15093	}
15094	return json.Marshal(objectMap)
15095}
15096
15097// UnmarshalJSON is the custom unmarshaler for Subnet struct.
15098func (s *Subnet) UnmarshalJSON(body []byte) error {
15099	var m map[string]*json.RawMessage
15100	err := json.Unmarshal(body, &m)
15101	if err != nil {
15102		return err
15103	}
15104	for k, v := range m {
15105		switch k {
15106		case "properties":
15107			if v != nil {
15108				var subnetPropertiesFormat SubnetPropertiesFormat
15109				err = json.Unmarshal(*v, &subnetPropertiesFormat)
15110				if err != nil {
15111					return err
15112				}
15113				s.SubnetPropertiesFormat = &subnetPropertiesFormat
15114			}
15115		case "name":
15116			if v != nil {
15117				var name string
15118				err = json.Unmarshal(*v, &name)
15119				if err != nil {
15120					return err
15121				}
15122				s.Name = &name
15123			}
15124		case "etag":
15125			if v != nil {
15126				var etag string
15127				err = json.Unmarshal(*v, &etag)
15128				if err != nil {
15129					return err
15130				}
15131				s.Etag = &etag
15132			}
15133		case "id":
15134			if v != nil {
15135				var ID string
15136				err = json.Unmarshal(*v, &ID)
15137				if err != nil {
15138					return err
15139				}
15140				s.ID = &ID
15141			}
15142		}
15143	}
15144
15145	return nil
15146}
15147
15148// SubnetAssociation network interface and its custom security rules.
15149type SubnetAssociation struct {
15150	// ID - READ-ONLY; Subnet ID.
15151	ID *string `json:"id,omitempty"`
15152	// SecurityRules - Collection of custom security rules.
15153	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
15154}
15155
15156// MarshalJSON is the custom marshaler for SubnetAssociation.
15157func (sa SubnetAssociation) MarshalJSON() ([]byte, error) {
15158	objectMap := make(map[string]interface{})
15159	if sa.SecurityRules != nil {
15160		objectMap["securityRules"] = sa.SecurityRules
15161	}
15162	return json.Marshal(objectMap)
15163}
15164
15165// SubnetListResult response for ListSubnets API service callRetrieves all subnet that belongs to a virtual
15166// network
15167type SubnetListResult struct {
15168	autorest.Response `json:"-"`
15169	// Value - The subnets in a virtual network.
15170	Value *[]Subnet `json:"value,omitempty"`
15171	// NextLink - The URL to get the next set of results.
15172	NextLink *string `json:"nextLink,omitempty"`
15173}
15174
15175// SubnetListResultIterator provides access to a complete listing of Subnet values.
15176type SubnetListResultIterator struct {
15177	i    int
15178	page SubnetListResultPage
15179}
15180
15181// NextWithContext advances to the next value.  If there was an error making
15182// the request the iterator does not advance and the error is returned.
15183func (iter *SubnetListResultIterator) NextWithContext(ctx context.Context) (err error) {
15184	if tracing.IsEnabled() {
15185		ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultIterator.NextWithContext")
15186		defer func() {
15187			sc := -1
15188			if iter.Response().Response.Response != nil {
15189				sc = iter.Response().Response.Response.StatusCode
15190			}
15191			tracing.EndSpan(ctx, sc, err)
15192		}()
15193	}
15194	iter.i++
15195	if iter.i < len(iter.page.Values()) {
15196		return nil
15197	}
15198	err = iter.page.NextWithContext(ctx)
15199	if err != nil {
15200		iter.i--
15201		return err
15202	}
15203	iter.i = 0
15204	return nil
15205}
15206
15207// Next advances to the next value.  If there was an error making
15208// the request the iterator does not advance and the error is returned.
15209// Deprecated: Use NextWithContext() instead.
15210func (iter *SubnetListResultIterator) Next() error {
15211	return iter.NextWithContext(context.Background())
15212}
15213
15214// NotDone returns true if the enumeration should be started or is not yet complete.
15215func (iter SubnetListResultIterator) NotDone() bool {
15216	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15217}
15218
15219// Response returns the raw server response from the last page request.
15220func (iter SubnetListResultIterator) Response() SubnetListResult {
15221	return iter.page.Response()
15222}
15223
15224// Value returns the current value or a zero-initialized value if the
15225// iterator has advanced beyond the end of the collection.
15226func (iter SubnetListResultIterator) Value() Subnet {
15227	if !iter.page.NotDone() {
15228		return Subnet{}
15229	}
15230	return iter.page.Values()[iter.i]
15231}
15232
15233// Creates a new instance of the SubnetListResultIterator type.
15234func NewSubnetListResultIterator(page SubnetListResultPage) SubnetListResultIterator {
15235	return SubnetListResultIterator{page: page}
15236}
15237
15238// IsEmpty returns true if the ListResult contains no values.
15239func (slr SubnetListResult) IsEmpty() bool {
15240	return slr.Value == nil || len(*slr.Value) == 0
15241}
15242
15243// hasNextLink returns true if the NextLink is not empty.
15244func (slr SubnetListResult) hasNextLink() bool {
15245	return slr.NextLink != nil && len(*slr.NextLink) != 0
15246}
15247
15248// subnetListResultPreparer prepares a request to retrieve the next set of results.
15249// It returns nil if no more results exist.
15250func (slr SubnetListResult) subnetListResultPreparer(ctx context.Context) (*http.Request, error) {
15251	if !slr.hasNextLink() {
15252		return nil, nil
15253	}
15254	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15255		autorest.AsJSON(),
15256		autorest.AsGet(),
15257		autorest.WithBaseURL(to.String(slr.NextLink)))
15258}
15259
15260// SubnetListResultPage contains a page of Subnet values.
15261type SubnetListResultPage struct {
15262	fn  func(context.Context, SubnetListResult) (SubnetListResult, error)
15263	slr SubnetListResult
15264}
15265
15266// NextWithContext advances to the next page of values.  If there was an error making
15267// the request the page does not advance and the error is returned.
15268func (page *SubnetListResultPage) NextWithContext(ctx context.Context) (err error) {
15269	if tracing.IsEnabled() {
15270		ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultPage.NextWithContext")
15271		defer func() {
15272			sc := -1
15273			if page.Response().Response.Response != nil {
15274				sc = page.Response().Response.Response.StatusCode
15275			}
15276			tracing.EndSpan(ctx, sc, err)
15277		}()
15278	}
15279	for {
15280		next, err := page.fn(ctx, page.slr)
15281		if err != nil {
15282			return err
15283		}
15284		page.slr = next
15285		if !next.hasNextLink() || !next.IsEmpty() {
15286			break
15287		}
15288	}
15289	return nil
15290}
15291
15292// Next advances to the next page of values.  If there was an error making
15293// the request the page does not advance and the error is returned.
15294// Deprecated: Use NextWithContext() instead.
15295func (page *SubnetListResultPage) Next() error {
15296	return page.NextWithContext(context.Background())
15297}
15298
15299// NotDone returns true if the page enumeration should be started or is not yet complete.
15300func (page SubnetListResultPage) NotDone() bool {
15301	return !page.slr.IsEmpty()
15302}
15303
15304// Response returns the raw server response from the last page request.
15305func (page SubnetListResultPage) Response() SubnetListResult {
15306	return page.slr
15307}
15308
15309// Values returns the slice of values for the current page or nil if there are no values.
15310func (page SubnetListResultPage) Values() []Subnet {
15311	if page.slr.IsEmpty() {
15312		return nil
15313	}
15314	return *page.slr.Value
15315}
15316
15317// Creates a new instance of the SubnetListResultPage type.
15318func NewSubnetListResultPage(cur SubnetListResult, getNextPage func(context.Context, SubnetListResult) (SubnetListResult, error)) SubnetListResultPage {
15319	return SubnetListResultPage{
15320		fn:  getNextPage,
15321		slr: cur,
15322	}
15323}
15324
15325// SubnetPropertiesFormat properties of the subnet.
15326type SubnetPropertiesFormat struct {
15327	// AddressPrefix - The address prefix for the subnet.
15328	AddressPrefix *string `json:"addressPrefix,omitempty"`
15329	// NetworkSecurityGroup - The reference of the NetworkSecurityGroup resource.
15330	NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"`
15331	// RouteTable - The reference of the RouteTable resource.
15332	RouteTable *RouteTable `json:"routeTable,omitempty"`
15333	// ServiceEndpoints - An array of service endpoints.
15334	ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"`
15335	// IPConfigurations - READ-ONLY; Gets an array of references to the network interface IP configurations using subnet.
15336	IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"`
15337	// ResourceNavigationLinks - Gets an array of references to the external resources using subnet.
15338	ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"`
15339	// ProvisioningState - The provisioning state of the resource.
15340	ProvisioningState *string `json:"provisioningState,omitempty"`
15341}
15342
15343// MarshalJSON is the custom marshaler for SubnetPropertiesFormat.
15344func (spf SubnetPropertiesFormat) MarshalJSON() ([]byte, error) {
15345	objectMap := make(map[string]interface{})
15346	if spf.AddressPrefix != nil {
15347		objectMap["addressPrefix"] = spf.AddressPrefix
15348	}
15349	if spf.NetworkSecurityGroup != nil {
15350		objectMap["networkSecurityGroup"] = spf.NetworkSecurityGroup
15351	}
15352	if spf.RouteTable != nil {
15353		objectMap["routeTable"] = spf.RouteTable
15354	}
15355	if spf.ServiceEndpoints != nil {
15356		objectMap["serviceEndpoints"] = spf.ServiceEndpoints
15357	}
15358	if spf.ResourceNavigationLinks != nil {
15359		objectMap["resourceNavigationLinks"] = spf.ResourceNavigationLinks
15360	}
15361	if spf.ProvisioningState != nil {
15362		objectMap["provisioningState"] = spf.ProvisioningState
15363	}
15364	return json.Marshal(objectMap)
15365}
15366
15367// SubnetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
15368// operation.
15369type SubnetsCreateOrUpdateFuture struct {
15370	azure.FutureAPI
15371	// Result returns the result of the asynchronous operation.
15372	// If the operation has not completed it will return an error.
15373	Result func(SubnetsClient) (Subnet, error)
15374}
15375
15376// SubnetsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
15377// operation.
15378type SubnetsDeleteFuture struct {
15379	azure.FutureAPI
15380	// Result returns the result of the asynchronous operation.
15381	// If the operation has not completed it will return an error.
15382	Result func(SubnetsClient) (autorest.Response, error)
15383}
15384
15385// SubResource reference to another subresource.
15386type SubResource struct {
15387	// ID - Resource ID.
15388	ID *string `json:"id,omitempty"`
15389}
15390
15391// TagsObject tags object for patch operations.
15392type TagsObject struct {
15393	// Tags - Resource tags.
15394	Tags map[string]*string `json:"tags"`
15395}
15396
15397// MarshalJSON is the custom marshaler for TagsObject.
15398func (toVar TagsObject) MarshalJSON() ([]byte, error) {
15399	objectMap := make(map[string]interface{})
15400	if toVar.Tags != nil {
15401		objectMap["tags"] = toVar.Tags
15402	}
15403	return json.Marshal(objectMap)
15404}
15405
15406// Topology topology of the specified resource group.
15407type Topology struct {
15408	autorest.Response `json:"-"`
15409	// ID - READ-ONLY; GUID representing the operation id.
15410	ID *string `json:"id,omitempty"`
15411	// CreatedDateTime - READ-ONLY; The datetime when the topology was initially created for the resource group.
15412	CreatedDateTime *date.Time `json:"createdDateTime,omitempty"`
15413	// LastModified - READ-ONLY; The datetime when the topology was last modified.
15414	LastModified *date.Time          `json:"lastModified,omitempty"`
15415	Resources    *[]TopologyResource `json:"resources,omitempty"`
15416}
15417
15418// MarshalJSON is the custom marshaler for Topology.
15419func (t Topology) MarshalJSON() ([]byte, error) {
15420	objectMap := make(map[string]interface{})
15421	if t.Resources != nil {
15422		objectMap["resources"] = t.Resources
15423	}
15424	return json.Marshal(objectMap)
15425}
15426
15427// TopologyAssociation resources that have an association with the parent resource.
15428type TopologyAssociation struct {
15429	// Name - The name of the resource that is associated with the parent resource.
15430	Name *string `json:"name,omitempty"`
15431	// ResourceID - The ID of the resource that is associated with the parent resource.
15432	ResourceID *string `json:"resourceId,omitempty"`
15433	// AssociationType - The association type of the child resource to the parent resource. Possible values include: 'Associated', 'Contains'
15434	AssociationType AssociationType `json:"associationType,omitempty"`
15435}
15436
15437// TopologyParameters parameters that define the representation of topology.
15438type TopologyParameters struct {
15439	// TargetResourceGroupName - The name of the target resource group to perform topology on.
15440	TargetResourceGroupName *string `json:"targetResourceGroupName,omitempty"`
15441	// TargetVirtualNetwork - The reference of the Virtual Network resource.
15442	TargetVirtualNetwork *SubResource `json:"targetVirtualNetwork,omitempty"`
15443	// TargetSubnet - The reference of the Subnet resource.
15444	TargetSubnet *SubResource `json:"targetSubnet,omitempty"`
15445}
15446
15447// TopologyResource the network resource topology information for the given resource group.
15448type TopologyResource struct {
15449	// Name - Name of the resource.
15450	Name *string `json:"name,omitempty"`
15451	// ID - ID of the resource.
15452	ID *string `json:"id,omitempty"`
15453	// Location - Resource location.
15454	Location *string `json:"location,omitempty"`
15455	// Associations - Holds the associations the resource has with other resources in the resource group.
15456	Associations *[]TopologyAssociation `json:"associations,omitempty"`
15457}
15458
15459// TrafficAnalyticsConfigurationProperties parameters that define the configuration of traffic analytics.
15460type TrafficAnalyticsConfigurationProperties struct {
15461	// Enabled - Flag to enable/disable traffic analytics.
15462	Enabled *bool `json:"enabled,omitempty"`
15463	// WorkspaceID - The resource guid of the attached workspace
15464	WorkspaceID *string `json:"workspaceId,omitempty"`
15465	// WorkspaceRegion - The location of the attached workspace
15466	WorkspaceRegion *string `json:"workspaceRegion,omitempty"`
15467	// WorkspaceResourceID - Resource Id of the attached workspace
15468	WorkspaceResourceID *string `json:"workspaceResourceId,omitempty"`
15469}
15470
15471// TrafficAnalyticsProperties parameters that define the configuration of traffic analytics.
15472type TrafficAnalyticsProperties struct {
15473	NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"`
15474}
15475
15476// TrafficQuery parameters to compare with network configuration.
15477type TrafficQuery struct {
15478	// Direction - The direction of the traffic. Accepted values are 'Inbound' and 'Outbound'. Possible values include: 'Inbound', 'Outbound'
15479	Direction Direction `json:"direction,omitempty"`
15480	// Protocol - Protocol to be verified on. Accepted values are '*', TCP, UDP.
15481	Protocol *string `json:"protocol,omitempty"`
15482	// Source - Traffic source. Accepted values are '*', IP Address/CIDR, Service Tag.
15483	Source *string `json:"source,omitempty"`
15484	// Destination - Traffic destination. Accepted values are: '*', IP Address/CIDR, Service Tag.
15485	Destination *string `json:"destination,omitempty"`
15486	// DestinationPort - Traffic destination port. Accepted values are '*', port (for example, 3389) and port range (for example, 80-100).
15487	DestinationPort *string `json:"destinationPort,omitempty"`
15488}
15489
15490// TroubleshootingDetails information gained from troubleshooting of specified resource.
15491type TroubleshootingDetails struct {
15492	// ID - The id of the get troubleshoot operation.
15493	ID *string `json:"id,omitempty"`
15494	// ReasonType - Reason type of failure.
15495	ReasonType *string `json:"reasonType,omitempty"`
15496	// Summary - A summary of troubleshooting.
15497	Summary *string `json:"summary,omitempty"`
15498	// Detail - Details on troubleshooting results.
15499	Detail *string `json:"detail,omitempty"`
15500	// RecommendedActions - List of recommended actions.
15501	RecommendedActions *[]TroubleshootingRecommendedActions `json:"recommendedActions,omitempty"`
15502}
15503
15504// TroubleshootingParameters parameters that define the resource to troubleshoot.
15505type TroubleshootingParameters struct {
15506	// TargetResourceID - The target resource to troubleshoot.
15507	TargetResourceID           *string `json:"targetResourceId,omitempty"`
15508	*TroubleshootingProperties `json:"properties,omitempty"`
15509}
15510
15511// MarshalJSON is the custom marshaler for TroubleshootingParameters.
15512func (tp TroubleshootingParameters) MarshalJSON() ([]byte, error) {
15513	objectMap := make(map[string]interface{})
15514	if tp.TargetResourceID != nil {
15515		objectMap["targetResourceId"] = tp.TargetResourceID
15516	}
15517	if tp.TroubleshootingProperties != nil {
15518		objectMap["properties"] = tp.TroubleshootingProperties
15519	}
15520	return json.Marshal(objectMap)
15521}
15522
15523// UnmarshalJSON is the custom unmarshaler for TroubleshootingParameters struct.
15524func (tp *TroubleshootingParameters) UnmarshalJSON(body []byte) error {
15525	var m map[string]*json.RawMessage
15526	err := json.Unmarshal(body, &m)
15527	if err != nil {
15528		return err
15529	}
15530	for k, v := range m {
15531		switch k {
15532		case "targetResourceId":
15533			if v != nil {
15534				var targetResourceID string
15535				err = json.Unmarshal(*v, &targetResourceID)
15536				if err != nil {
15537					return err
15538				}
15539				tp.TargetResourceID = &targetResourceID
15540			}
15541		case "properties":
15542			if v != nil {
15543				var troubleshootingProperties TroubleshootingProperties
15544				err = json.Unmarshal(*v, &troubleshootingProperties)
15545				if err != nil {
15546					return err
15547				}
15548				tp.TroubleshootingProperties = &troubleshootingProperties
15549			}
15550		}
15551	}
15552
15553	return nil
15554}
15555
15556// TroubleshootingProperties storage location provided for troubleshoot.
15557type TroubleshootingProperties struct {
15558	// StorageID - The ID for the storage account to save the troubleshoot result.
15559	StorageID *string `json:"storageId,omitempty"`
15560	// StoragePath - The path to the blob to save the troubleshoot result in.
15561	StoragePath *string `json:"storagePath,omitempty"`
15562}
15563
15564// TroubleshootingRecommendedActions recommended actions based on discovered issues.
15565type TroubleshootingRecommendedActions struct {
15566	// ActionID - ID of the recommended action.
15567	ActionID *string `json:"actionId,omitempty"`
15568	// ActionText - Description of recommended actions.
15569	ActionText *string `json:"actionText,omitempty"`
15570	// ActionURI - The uri linking to a documentation for the recommended troubleshooting actions.
15571	ActionURI *string `json:"actionUri,omitempty"`
15572	// ActionURIText - The information from the URI for the recommended troubleshooting actions.
15573	ActionURIText *string `json:"actionUriText,omitempty"`
15574}
15575
15576// TroubleshootingResult troubleshooting information gained from specified resource.
15577type TroubleshootingResult struct {
15578	autorest.Response `json:"-"`
15579	// StartTime - The start time of the troubleshooting.
15580	StartTime *date.Time `json:"startTime,omitempty"`
15581	// EndTime - The end time of the troubleshooting.
15582	EndTime *date.Time `json:"endTime,omitempty"`
15583	// Code - The result code of the troubleshooting.
15584	Code *string `json:"code,omitempty"`
15585	// Results - Information from troubleshooting.
15586	Results *[]TroubleshootingDetails `json:"results,omitempty"`
15587}
15588
15589// TunnelConnectionHealth virtualNetworkGatewayConnection properties
15590type TunnelConnectionHealth struct {
15591	// Tunnel - READ-ONLY; Tunnel name.
15592	Tunnel *string `json:"tunnel,omitempty"`
15593	// ConnectionStatus - READ-ONLY; Virtual network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
15594	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
15595	// IngressBytesTransferred - READ-ONLY; The Ingress Bytes Transferred in this connection
15596	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
15597	// EgressBytesTransferred - READ-ONLY; The Egress Bytes Transferred in this connection
15598	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
15599	// LastConnectionEstablishedUtcTime - READ-ONLY; The time at which connection was established in Utc format.
15600	LastConnectionEstablishedUtcTime *string `json:"lastConnectionEstablishedUtcTime,omitempty"`
15601}
15602
15603// Usage describes network resource usage.
15604type Usage struct {
15605	// ID - READ-ONLY; Resource identifier.
15606	ID *string `json:"id,omitempty"`
15607	// Unit - An enum describing the unit of measurement.
15608	Unit *string `json:"unit,omitempty"`
15609	// CurrentValue - The current value of the usage.
15610	CurrentValue *int64 `json:"currentValue,omitempty"`
15611	// Limit - The limit of usage.
15612	Limit *int64 `json:"limit,omitempty"`
15613	// Name - The name of the type of usage.
15614	Name *UsageName `json:"name,omitempty"`
15615}
15616
15617// MarshalJSON is the custom marshaler for Usage.
15618func (u Usage) MarshalJSON() ([]byte, error) {
15619	objectMap := make(map[string]interface{})
15620	if u.Unit != nil {
15621		objectMap["unit"] = u.Unit
15622	}
15623	if u.CurrentValue != nil {
15624		objectMap["currentValue"] = u.CurrentValue
15625	}
15626	if u.Limit != nil {
15627		objectMap["limit"] = u.Limit
15628	}
15629	if u.Name != nil {
15630		objectMap["name"] = u.Name
15631	}
15632	return json.Marshal(objectMap)
15633}
15634
15635// UsageName the usage names.
15636type UsageName struct {
15637	// Value - A string describing the resource name.
15638	Value *string `json:"value,omitempty"`
15639	// LocalizedValue - A localized string describing the resource name.
15640	LocalizedValue *string `json:"localizedValue,omitempty"`
15641}
15642
15643// UsagesListResult the list usages operation response.
15644type UsagesListResult struct {
15645	autorest.Response `json:"-"`
15646	// Value - The list network resource usages.
15647	Value *[]Usage `json:"value,omitempty"`
15648	// NextLink - URL to get the next set of results.
15649	NextLink *string `json:"nextLink,omitempty"`
15650}
15651
15652// UsagesListResultIterator provides access to a complete listing of Usage values.
15653type UsagesListResultIterator struct {
15654	i    int
15655	page UsagesListResultPage
15656}
15657
15658// NextWithContext advances to the next value.  If there was an error making
15659// the request the iterator does not advance and the error is returned.
15660func (iter *UsagesListResultIterator) NextWithContext(ctx context.Context) (err error) {
15661	if tracing.IsEnabled() {
15662		ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultIterator.NextWithContext")
15663		defer func() {
15664			sc := -1
15665			if iter.Response().Response.Response != nil {
15666				sc = iter.Response().Response.Response.StatusCode
15667			}
15668			tracing.EndSpan(ctx, sc, err)
15669		}()
15670	}
15671	iter.i++
15672	if iter.i < len(iter.page.Values()) {
15673		return nil
15674	}
15675	err = iter.page.NextWithContext(ctx)
15676	if err != nil {
15677		iter.i--
15678		return err
15679	}
15680	iter.i = 0
15681	return nil
15682}
15683
15684// Next advances to the next value.  If there was an error making
15685// the request the iterator does not advance and the error is returned.
15686// Deprecated: Use NextWithContext() instead.
15687func (iter *UsagesListResultIterator) Next() error {
15688	return iter.NextWithContext(context.Background())
15689}
15690
15691// NotDone returns true if the enumeration should be started or is not yet complete.
15692func (iter UsagesListResultIterator) NotDone() bool {
15693	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15694}
15695
15696// Response returns the raw server response from the last page request.
15697func (iter UsagesListResultIterator) Response() UsagesListResult {
15698	return iter.page.Response()
15699}
15700
15701// Value returns the current value or a zero-initialized value if the
15702// iterator has advanced beyond the end of the collection.
15703func (iter UsagesListResultIterator) Value() Usage {
15704	if !iter.page.NotDone() {
15705		return Usage{}
15706	}
15707	return iter.page.Values()[iter.i]
15708}
15709
15710// Creates a new instance of the UsagesListResultIterator type.
15711func NewUsagesListResultIterator(page UsagesListResultPage) UsagesListResultIterator {
15712	return UsagesListResultIterator{page: page}
15713}
15714
15715// IsEmpty returns true if the ListResult contains no values.
15716func (ulr UsagesListResult) IsEmpty() bool {
15717	return ulr.Value == nil || len(*ulr.Value) == 0
15718}
15719
15720// hasNextLink returns true if the NextLink is not empty.
15721func (ulr UsagesListResult) hasNextLink() bool {
15722	return ulr.NextLink != nil && len(*ulr.NextLink) != 0
15723}
15724
15725// usagesListResultPreparer prepares a request to retrieve the next set of results.
15726// It returns nil if no more results exist.
15727func (ulr UsagesListResult) usagesListResultPreparer(ctx context.Context) (*http.Request, error) {
15728	if !ulr.hasNextLink() {
15729		return nil, nil
15730	}
15731	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15732		autorest.AsJSON(),
15733		autorest.AsGet(),
15734		autorest.WithBaseURL(to.String(ulr.NextLink)))
15735}
15736
15737// UsagesListResultPage contains a page of Usage values.
15738type UsagesListResultPage struct {
15739	fn  func(context.Context, UsagesListResult) (UsagesListResult, error)
15740	ulr UsagesListResult
15741}
15742
15743// NextWithContext advances to the next page of values.  If there was an error making
15744// the request the page does not advance and the error is returned.
15745func (page *UsagesListResultPage) NextWithContext(ctx context.Context) (err error) {
15746	if tracing.IsEnabled() {
15747		ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultPage.NextWithContext")
15748		defer func() {
15749			sc := -1
15750			if page.Response().Response.Response != nil {
15751				sc = page.Response().Response.Response.StatusCode
15752			}
15753			tracing.EndSpan(ctx, sc, err)
15754		}()
15755	}
15756	for {
15757		next, err := page.fn(ctx, page.ulr)
15758		if err != nil {
15759			return err
15760		}
15761		page.ulr = next
15762		if !next.hasNextLink() || !next.IsEmpty() {
15763			break
15764		}
15765	}
15766	return nil
15767}
15768
15769// Next advances to the next page of values.  If there was an error making
15770// the request the page does not advance and the error is returned.
15771// Deprecated: Use NextWithContext() instead.
15772func (page *UsagesListResultPage) Next() error {
15773	return page.NextWithContext(context.Background())
15774}
15775
15776// NotDone returns true if the page enumeration should be started or is not yet complete.
15777func (page UsagesListResultPage) NotDone() bool {
15778	return !page.ulr.IsEmpty()
15779}
15780
15781// Response returns the raw server response from the last page request.
15782func (page UsagesListResultPage) Response() UsagesListResult {
15783	return page.ulr
15784}
15785
15786// Values returns the slice of values for the current page or nil if there are no values.
15787func (page UsagesListResultPage) Values() []Usage {
15788	if page.ulr.IsEmpty() {
15789		return nil
15790	}
15791	return *page.ulr.Value
15792}
15793
15794// Creates a new instance of the UsagesListResultPage type.
15795func NewUsagesListResultPage(cur UsagesListResult, getNextPage func(context.Context, UsagesListResult) (UsagesListResult, error)) UsagesListResultPage {
15796	return UsagesListResultPage{
15797		fn:  getNextPage,
15798		ulr: cur,
15799	}
15800}
15801
15802// VerificationIPFlowParameters parameters that define the IP flow to be verified.
15803type VerificationIPFlowParameters struct {
15804	// TargetResourceID - The ID of the target resource to perform next-hop on.
15805	TargetResourceID *string `json:"targetResourceId,omitempty"`
15806	// Direction - The direction of the packet represented as a 5-tuple. Possible values include: 'Inbound', 'Outbound'
15807	Direction Direction `json:"direction,omitempty"`
15808	// Protocol - Protocol to be verified on. Possible values include: 'IPFlowProtocolTCP', 'IPFlowProtocolUDP'
15809	Protocol IPFlowProtocol `json:"protocol,omitempty"`
15810	// 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.
15811	LocalPort *string `json:"localPort,omitempty"`
15812	// 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.
15813	RemotePort *string `json:"remotePort,omitempty"`
15814	// LocalIPAddress - The local IP address. Acceptable values are valid IPv4 addresses.
15815	LocalIPAddress *string `json:"localIPAddress,omitempty"`
15816	// RemoteIPAddress - The remote IP address. Acceptable values are valid IPv4 addresses.
15817	RemoteIPAddress *string `json:"remoteIPAddress,omitempty"`
15818	// 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).
15819	TargetNicResourceID *string `json:"targetNicResourceId,omitempty"`
15820}
15821
15822// VerificationIPFlowResult results of IP flow verification on the target resource.
15823type VerificationIPFlowResult struct {
15824	autorest.Response `json:"-"`
15825	// Access - Indicates whether the traffic is allowed or denied. Possible values include: 'Allow', 'Deny'
15826	Access Access `json:"access,omitempty"`
15827	// RuleName - Name of the rule. If input is not matched against any security rule, it is not displayed.
15828	RuleName *string `json:"ruleName,omitempty"`
15829}
15830
15831// VirtualHub virtualHub Resource.
15832type VirtualHub struct {
15833	autorest.Response     `json:"-"`
15834	*VirtualHubProperties `json:"properties,omitempty"`
15835	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
15836	Etag *string `json:"etag,omitempty"`
15837	// ID - Resource ID.
15838	ID *string `json:"id,omitempty"`
15839	// Name - READ-ONLY; Resource name.
15840	Name *string `json:"name,omitempty"`
15841	// Type - READ-ONLY; Resource type.
15842	Type *string `json:"type,omitempty"`
15843	// Location - Resource location.
15844	Location *string `json:"location,omitempty"`
15845	// Tags - Resource tags.
15846	Tags map[string]*string `json:"tags"`
15847}
15848
15849// MarshalJSON is the custom marshaler for VirtualHub.
15850func (vh VirtualHub) MarshalJSON() ([]byte, error) {
15851	objectMap := make(map[string]interface{})
15852	if vh.VirtualHubProperties != nil {
15853		objectMap["properties"] = vh.VirtualHubProperties
15854	}
15855	if vh.ID != nil {
15856		objectMap["id"] = vh.ID
15857	}
15858	if vh.Location != nil {
15859		objectMap["location"] = vh.Location
15860	}
15861	if vh.Tags != nil {
15862		objectMap["tags"] = vh.Tags
15863	}
15864	return json.Marshal(objectMap)
15865}
15866
15867// UnmarshalJSON is the custom unmarshaler for VirtualHub struct.
15868func (vh *VirtualHub) UnmarshalJSON(body []byte) error {
15869	var m map[string]*json.RawMessage
15870	err := json.Unmarshal(body, &m)
15871	if err != nil {
15872		return err
15873	}
15874	for k, v := range m {
15875		switch k {
15876		case "properties":
15877			if v != nil {
15878				var virtualHubProperties VirtualHubProperties
15879				err = json.Unmarshal(*v, &virtualHubProperties)
15880				if err != nil {
15881					return err
15882				}
15883				vh.VirtualHubProperties = &virtualHubProperties
15884			}
15885		case "etag":
15886			if v != nil {
15887				var etag string
15888				err = json.Unmarshal(*v, &etag)
15889				if err != nil {
15890					return err
15891				}
15892				vh.Etag = &etag
15893			}
15894		case "id":
15895			if v != nil {
15896				var ID string
15897				err = json.Unmarshal(*v, &ID)
15898				if err != nil {
15899					return err
15900				}
15901				vh.ID = &ID
15902			}
15903		case "name":
15904			if v != nil {
15905				var name string
15906				err = json.Unmarshal(*v, &name)
15907				if err != nil {
15908					return err
15909				}
15910				vh.Name = &name
15911			}
15912		case "type":
15913			if v != nil {
15914				var typeVar string
15915				err = json.Unmarshal(*v, &typeVar)
15916				if err != nil {
15917					return err
15918				}
15919				vh.Type = &typeVar
15920			}
15921		case "location":
15922			if v != nil {
15923				var location string
15924				err = json.Unmarshal(*v, &location)
15925				if err != nil {
15926					return err
15927				}
15928				vh.Location = &location
15929			}
15930		case "tags":
15931			if v != nil {
15932				var tags map[string]*string
15933				err = json.Unmarshal(*v, &tags)
15934				if err != nil {
15935					return err
15936				}
15937				vh.Tags = tags
15938			}
15939		}
15940	}
15941
15942	return nil
15943}
15944
15945// VirtualHubProperties parameters for VirtualHub
15946type VirtualHubProperties struct {
15947	// VirtualWan - The VirtualWAN to which the VirtualHub belongs
15948	VirtualWan *SubResource `json:"virtualWan,omitempty"`
15949	// HubVirtualNetworkConnections - list of all vnet connections with this VirtualHub.
15950	HubVirtualNetworkConnections *[]HubVirtualNetworkConnection `json:"hubVirtualNetworkConnections,omitempty"`
15951	// AddressPrefix - Address-prefix for this VirtualHub.
15952	AddressPrefix *string `json:"addressPrefix,omitempty"`
15953	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
15954	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
15955}
15956
15957// VirtualHubsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
15958// long-running operation.
15959type VirtualHubsCreateOrUpdateFuture struct {
15960	azure.FutureAPI
15961	// Result returns the result of the asynchronous operation.
15962	// If the operation has not completed it will return an error.
15963	Result func(VirtualHubsClient) (VirtualHub, error)
15964}
15965
15966// VirtualHubsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
15967// operation.
15968type VirtualHubsDeleteFuture struct {
15969	azure.FutureAPI
15970	// Result returns the result of the asynchronous operation.
15971	// If the operation has not completed it will return an error.
15972	Result func(VirtualHubsClient) (autorest.Response, error)
15973}
15974
15975// VirtualHubsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
15976// operation.
15977type VirtualHubsUpdateTagsFuture struct {
15978	azure.FutureAPI
15979	// Result returns the result of the asynchronous operation.
15980	// If the operation has not completed it will return an error.
15981	Result func(VirtualHubsClient) (VirtualHub, error)
15982}
15983
15984// VirtualNetwork virtual Network resource.
15985type VirtualNetwork struct {
15986	autorest.Response `json:"-"`
15987	// VirtualNetworkPropertiesFormat - Properties of the virtual network.
15988	*VirtualNetworkPropertiesFormat `json:"properties,omitempty"`
15989	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
15990	Etag *string `json:"etag,omitempty"`
15991	// ID - Resource ID.
15992	ID *string `json:"id,omitempty"`
15993	// Name - READ-ONLY; Resource name.
15994	Name *string `json:"name,omitempty"`
15995	// Type - READ-ONLY; Resource type.
15996	Type *string `json:"type,omitempty"`
15997	// Location - Resource location.
15998	Location *string `json:"location,omitempty"`
15999	// Tags - Resource tags.
16000	Tags map[string]*string `json:"tags"`
16001}
16002
16003// MarshalJSON is the custom marshaler for VirtualNetwork.
16004func (vn VirtualNetwork) MarshalJSON() ([]byte, error) {
16005	objectMap := make(map[string]interface{})
16006	if vn.VirtualNetworkPropertiesFormat != nil {
16007		objectMap["properties"] = vn.VirtualNetworkPropertiesFormat
16008	}
16009	if vn.Etag != nil {
16010		objectMap["etag"] = vn.Etag
16011	}
16012	if vn.ID != nil {
16013		objectMap["id"] = vn.ID
16014	}
16015	if vn.Location != nil {
16016		objectMap["location"] = vn.Location
16017	}
16018	if vn.Tags != nil {
16019		objectMap["tags"] = vn.Tags
16020	}
16021	return json.Marshal(objectMap)
16022}
16023
16024// UnmarshalJSON is the custom unmarshaler for VirtualNetwork struct.
16025func (vn *VirtualNetwork) UnmarshalJSON(body []byte) error {
16026	var m map[string]*json.RawMessage
16027	err := json.Unmarshal(body, &m)
16028	if err != nil {
16029		return err
16030	}
16031	for k, v := range m {
16032		switch k {
16033		case "properties":
16034			if v != nil {
16035				var virtualNetworkPropertiesFormat VirtualNetworkPropertiesFormat
16036				err = json.Unmarshal(*v, &virtualNetworkPropertiesFormat)
16037				if err != nil {
16038					return err
16039				}
16040				vn.VirtualNetworkPropertiesFormat = &virtualNetworkPropertiesFormat
16041			}
16042		case "etag":
16043			if v != nil {
16044				var etag string
16045				err = json.Unmarshal(*v, &etag)
16046				if err != nil {
16047					return err
16048				}
16049				vn.Etag = &etag
16050			}
16051		case "id":
16052			if v != nil {
16053				var ID string
16054				err = json.Unmarshal(*v, &ID)
16055				if err != nil {
16056					return err
16057				}
16058				vn.ID = &ID
16059			}
16060		case "name":
16061			if v != nil {
16062				var name string
16063				err = json.Unmarshal(*v, &name)
16064				if err != nil {
16065					return err
16066				}
16067				vn.Name = &name
16068			}
16069		case "type":
16070			if v != nil {
16071				var typeVar string
16072				err = json.Unmarshal(*v, &typeVar)
16073				if err != nil {
16074					return err
16075				}
16076				vn.Type = &typeVar
16077			}
16078		case "location":
16079			if v != nil {
16080				var location string
16081				err = json.Unmarshal(*v, &location)
16082				if err != nil {
16083					return err
16084				}
16085				vn.Location = &location
16086			}
16087		case "tags":
16088			if v != nil {
16089				var tags map[string]*string
16090				err = json.Unmarshal(*v, &tags)
16091				if err != nil {
16092					return err
16093				}
16094				vn.Tags = tags
16095			}
16096		}
16097	}
16098
16099	return nil
16100}
16101
16102// VirtualNetworkConnectionGatewayReference a reference to VirtualNetworkGateway or LocalNetworkGateway
16103// resource.
16104type VirtualNetworkConnectionGatewayReference struct {
16105	// ID - The ID of VirtualNetworkGateway or LocalNetworkGateway resource.
16106	ID *string `json:"id,omitempty"`
16107}
16108
16109// VirtualNetworkGateway a common class for general resource information
16110type VirtualNetworkGateway struct {
16111	autorest.Response `json:"-"`
16112	// VirtualNetworkGatewayPropertiesFormat - Properties of the virtual network gateway.
16113	*VirtualNetworkGatewayPropertiesFormat `json:"properties,omitempty"`
16114	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
16115	Etag *string `json:"etag,omitempty"`
16116	// ID - Resource ID.
16117	ID *string `json:"id,omitempty"`
16118	// Name - READ-ONLY; Resource name.
16119	Name *string `json:"name,omitempty"`
16120	// Type - READ-ONLY; Resource type.
16121	Type *string `json:"type,omitempty"`
16122	// Location - Resource location.
16123	Location *string `json:"location,omitempty"`
16124	// Tags - Resource tags.
16125	Tags map[string]*string `json:"tags"`
16126}
16127
16128// MarshalJSON is the custom marshaler for VirtualNetworkGateway.
16129func (vng VirtualNetworkGateway) MarshalJSON() ([]byte, error) {
16130	objectMap := make(map[string]interface{})
16131	if vng.VirtualNetworkGatewayPropertiesFormat != nil {
16132		objectMap["properties"] = vng.VirtualNetworkGatewayPropertiesFormat
16133	}
16134	if vng.Etag != nil {
16135		objectMap["etag"] = vng.Etag
16136	}
16137	if vng.ID != nil {
16138		objectMap["id"] = vng.ID
16139	}
16140	if vng.Location != nil {
16141		objectMap["location"] = vng.Location
16142	}
16143	if vng.Tags != nil {
16144		objectMap["tags"] = vng.Tags
16145	}
16146	return json.Marshal(objectMap)
16147}
16148
16149// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGateway struct.
16150func (vng *VirtualNetworkGateway) UnmarshalJSON(body []byte) error {
16151	var m map[string]*json.RawMessage
16152	err := json.Unmarshal(body, &m)
16153	if err != nil {
16154		return err
16155	}
16156	for k, v := range m {
16157		switch k {
16158		case "properties":
16159			if v != nil {
16160				var virtualNetworkGatewayPropertiesFormat VirtualNetworkGatewayPropertiesFormat
16161				err = json.Unmarshal(*v, &virtualNetworkGatewayPropertiesFormat)
16162				if err != nil {
16163					return err
16164				}
16165				vng.VirtualNetworkGatewayPropertiesFormat = &virtualNetworkGatewayPropertiesFormat
16166			}
16167		case "etag":
16168			if v != nil {
16169				var etag string
16170				err = json.Unmarshal(*v, &etag)
16171				if err != nil {
16172					return err
16173				}
16174				vng.Etag = &etag
16175			}
16176		case "id":
16177			if v != nil {
16178				var ID string
16179				err = json.Unmarshal(*v, &ID)
16180				if err != nil {
16181					return err
16182				}
16183				vng.ID = &ID
16184			}
16185		case "name":
16186			if v != nil {
16187				var name string
16188				err = json.Unmarshal(*v, &name)
16189				if err != nil {
16190					return err
16191				}
16192				vng.Name = &name
16193			}
16194		case "type":
16195			if v != nil {
16196				var typeVar string
16197				err = json.Unmarshal(*v, &typeVar)
16198				if err != nil {
16199					return err
16200				}
16201				vng.Type = &typeVar
16202			}
16203		case "location":
16204			if v != nil {
16205				var location string
16206				err = json.Unmarshal(*v, &location)
16207				if err != nil {
16208					return err
16209				}
16210				vng.Location = &location
16211			}
16212		case "tags":
16213			if v != nil {
16214				var tags map[string]*string
16215				err = json.Unmarshal(*v, &tags)
16216				if err != nil {
16217					return err
16218				}
16219				vng.Tags = tags
16220			}
16221		}
16222	}
16223
16224	return nil
16225}
16226
16227// VirtualNetworkGatewayConnection a common class for general resource information
16228type VirtualNetworkGatewayConnection struct {
16229	autorest.Response `json:"-"`
16230	// VirtualNetworkGatewayConnectionPropertiesFormat - Properties of the virtual network gateway connection.
16231	*VirtualNetworkGatewayConnectionPropertiesFormat `json:"properties,omitempty"`
16232	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
16233	Etag *string `json:"etag,omitempty"`
16234	// ID - Resource ID.
16235	ID *string `json:"id,omitempty"`
16236	// Name - READ-ONLY; Resource name.
16237	Name *string `json:"name,omitempty"`
16238	// Type - READ-ONLY; Resource type.
16239	Type *string `json:"type,omitempty"`
16240	// Location - Resource location.
16241	Location *string `json:"location,omitempty"`
16242	// Tags - Resource tags.
16243	Tags map[string]*string `json:"tags"`
16244}
16245
16246// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnection.
16247func (vngc VirtualNetworkGatewayConnection) MarshalJSON() ([]byte, error) {
16248	objectMap := make(map[string]interface{})
16249	if vngc.VirtualNetworkGatewayConnectionPropertiesFormat != nil {
16250		objectMap["properties"] = vngc.VirtualNetworkGatewayConnectionPropertiesFormat
16251	}
16252	if vngc.Etag != nil {
16253		objectMap["etag"] = vngc.Etag
16254	}
16255	if vngc.ID != nil {
16256		objectMap["id"] = vngc.ID
16257	}
16258	if vngc.Location != nil {
16259		objectMap["location"] = vngc.Location
16260	}
16261	if vngc.Tags != nil {
16262		objectMap["tags"] = vngc.Tags
16263	}
16264	return json.Marshal(objectMap)
16265}
16266
16267// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnection struct.
16268func (vngc *VirtualNetworkGatewayConnection) UnmarshalJSON(body []byte) error {
16269	var m map[string]*json.RawMessage
16270	err := json.Unmarshal(body, &m)
16271	if err != nil {
16272		return err
16273	}
16274	for k, v := range m {
16275		switch k {
16276		case "properties":
16277			if v != nil {
16278				var virtualNetworkGatewayConnectionPropertiesFormat VirtualNetworkGatewayConnectionPropertiesFormat
16279				err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionPropertiesFormat)
16280				if err != nil {
16281					return err
16282				}
16283				vngc.VirtualNetworkGatewayConnectionPropertiesFormat = &virtualNetworkGatewayConnectionPropertiesFormat
16284			}
16285		case "etag":
16286			if v != nil {
16287				var etag string
16288				err = json.Unmarshal(*v, &etag)
16289				if err != nil {
16290					return err
16291				}
16292				vngc.Etag = &etag
16293			}
16294		case "id":
16295			if v != nil {
16296				var ID string
16297				err = json.Unmarshal(*v, &ID)
16298				if err != nil {
16299					return err
16300				}
16301				vngc.ID = &ID
16302			}
16303		case "name":
16304			if v != nil {
16305				var name string
16306				err = json.Unmarshal(*v, &name)
16307				if err != nil {
16308					return err
16309				}
16310				vngc.Name = &name
16311			}
16312		case "type":
16313			if v != nil {
16314				var typeVar string
16315				err = json.Unmarshal(*v, &typeVar)
16316				if err != nil {
16317					return err
16318				}
16319				vngc.Type = &typeVar
16320			}
16321		case "location":
16322			if v != nil {
16323				var location string
16324				err = json.Unmarshal(*v, &location)
16325				if err != nil {
16326					return err
16327				}
16328				vngc.Location = &location
16329			}
16330		case "tags":
16331			if v != nil {
16332				var tags map[string]*string
16333				err = json.Unmarshal(*v, &tags)
16334				if err != nil {
16335					return err
16336				}
16337				vngc.Tags = tags
16338			}
16339		}
16340	}
16341
16342	return nil
16343}
16344
16345// VirtualNetworkGatewayConnectionListEntity a common class for general resource information
16346type VirtualNetworkGatewayConnectionListEntity struct {
16347	// VirtualNetworkGatewayConnectionListEntityPropertiesFormat - Properties of the virtual network gateway connection.
16348	*VirtualNetworkGatewayConnectionListEntityPropertiesFormat `json:"properties,omitempty"`
16349	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
16350	Etag *string `json:"etag,omitempty"`
16351	// ID - Resource ID.
16352	ID *string `json:"id,omitempty"`
16353	// Name - READ-ONLY; Resource name.
16354	Name *string `json:"name,omitempty"`
16355	// Type - READ-ONLY; Resource type.
16356	Type *string `json:"type,omitempty"`
16357	// Location - Resource location.
16358	Location *string `json:"location,omitempty"`
16359	// Tags - Resource tags.
16360	Tags map[string]*string `json:"tags"`
16361}
16362
16363// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListEntity.
16364func (vngcle VirtualNetworkGatewayConnectionListEntity) MarshalJSON() ([]byte, error) {
16365	objectMap := make(map[string]interface{})
16366	if vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat != nil {
16367		objectMap["properties"] = vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat
16368	}
16369	if vngcle.Etag != nil {
16370		objectMap["etag"] = vngcle.Etag
16371	}
16372	if vngcle.ID != nil {
16373		objectMap["id"] = vngcle.ID
16374	}
16375	if vngcle.Location != nil {
16376		objectMap["location"] = vngcle.Location
16377	}
16378	if vngcle.Tags != nil {
16379		objectMap["tags"] = vngcle.Tags
16380	}
16381	return json.Marshal(objectMap)
16382}
16383
16384// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnectionListEntity struct.
16385func (vngcle *VirtualNetworkGatewayConnectionListEntity) UnmarshalJSON(body []byte) error {
16386	var m map[string]*json.RawMessage
16387	err := json.Unmarshal(body, &m)
16388	if err != nil {
16389		return err
16390	}
16391	for k, v := range m {
16392		switch k {
16393		case "properties":
16394			if v != nil {
16395				var virtualNetworkGatewayConnectionListEntityPropertiesFormat VirtualNetworkGatewayConnectionListEntityPropertiesFormat
16396				err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionListEntityPropertiesFormat)
16397				if err != nil {
16398					return err
16399				}
16400				vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat = &virtualNetworkGatewayConnectionListEntityPropertiesFormat
16401			}
16402		case "etag":
16403			if v != nil {
16404				var etag string
16405				err = json.Unmarshal(*v, &etag)
16406				if err != nil {
16407					return err
16408				}
16409				vngcle.Etag = &etag
16410			}
16411		case "id":
16412			if v != nil {
16413				var ID string
16414				err = json.Unmarshal(*v, &ID)
16415				if err != nil {
16416					return err
16417				}
16418				vngcle.ID = &ID
16419			}
16420		case "name":
16421			if v != nil {
16422				var name string
16423				err = json.Unmarshal(*v, &name)
16424				if err != nil {
16425					return err
16426				}
16427				vngcle.Name = &name
16428			}
16429		case "type":
16430			if v != nil {
16431				var typeVar string
16432				err = json.Unmarshal(*v, &typeVar)
16433				if err != nil {
16434					return err
16435				}
16436				vngcle.Type = &typeVar
16437			}
16438		case "location":
16439			if v != nil {
16440				var location string
16441				err = json.Unmarshal(*v, &location)
16442				if err != nil {
16443					return err
16444				}
16445				vngcle.Location = &location
16446			}
16447		case "tags":
16448			if v != nil {
16449				var tags map[string]*string
16450				err = json.Unmarshal(*v, &tags)
16451				if err != nil {
16452					return err
16453				}
16454				vngcle.Tags = tags
16455			}
16456		}
16457	}
16458
16459	return nil
16460}
16461
16462// VirtualNetworkGatewayConnectionListEntityPropertiesFormat virtualNetworkGatewayConnection properties
16463type VirtualNetworkGatewayConnectionListEntityPropertiesFormat struct {
16464	// AuthorizationKey - The authorizationKey.
16465	AuthorizationKey *string `json:"authorizationKey,omitempty"`
16466	// VirtualNetworkGateway1 - The reference to virtual network gateway resource.
16467	VirtualNetworkGateway1 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway1,omitempty"`
16468	// VirtualNetworkGateway2 - The reference to virtual network gateway resource.
16469	VirtualNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway2,omitempty"`
16470	// LocalNetworkGateway2 - The reference to local network gateway resource.
16471	LocalNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"localNetworkGateway2,omitempty"`
16472	// ConnectionType - Gateway connection type. Possible values are: 'IPsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'
16473	ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"`
16474	// RoutingWeight - The routing weight.
16475	RoutingWeight *int32 `json:"routingWeight,omitempty"`
16476	// SharedKey - The IPSec shared key.
16477	SharedKey *string `json:"sharedKey,omitempty"`
16478	// ConnectionStatus - READ-ONLY; Virtual network Gateway connection status. Possible values are 'Unknown', 'Connecting', 'Connected' and 'NotConnected'. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
16479	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
16480	// TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status.
16481	TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"`
16482	// EgressBytesTransferred - READ-ONLY; The egress bytes transferred in this connection.
16483	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
16484	// IngressBytesTransferred - READ-ONLY; The ingress bytes transferred in this connection.
16485	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
16486	// Peer - The reference to peerings resource.
16487	Peer *SubResource `json:"peer,omitempty"`
16488	// EnableBgp - EnableBgp flag
16489	EnableBgp *bool `json:"enableBgp,omitempty"`
16490	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
16491	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
16492	// IpsecPolicies - The IPSec Policies to be considered by this connection.
16493	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
16494	// ResourceGUID - The resource GUID property of the VirtualNetworkGatewayConnection resource.
16495	ResourceGUID *string `json:"resourceGuid,omitempty"`
16496	// ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGatewayConnection resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
16497	ProvisioningState *string `json:"provisioningState,omitempty"`
16498}
16499
16500// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListEntityPropertiesFormat.
16501func (vngclepf VirtualNetworkGatewayConnectionListEntityPropertiesFormat) MarshalJSON() ([]byte, error) {
16502	objectMap := make(map[string]interface{})
16503	if vngclepf.AuthorizationKey != nil {
16504		objectMap["authorizationKey"] = vngclepf.AuthorizationKey
16505	}
16506	if vngclepf.VirtualNetworkGateway1 != nil {
16507		objectMap["virtualNetworkGateway1"] = vngclepf.VirtualNetworkGateway1
16508	}
16509	if vngclepf.VirtualNetworkGateway2 != nil {
16510		objectMap["virtualNetworkGateway2"] = vngclepf.VirtualNetworkGateway2
16511	}
16512	if vngclepf.LocalNetworkGateway2 != nil {
16513		objectMap["localNetworkGateway2"] = vngclepf.LocalNetworkGateway2
16514	}
16515	if vngclepf.ConnectionType != "" {
16516		objectMap["connectionType"] = vngclepf.ConnectionType
16517	}
16518	if vngclepf.RoutingWeight != nil {
16519		objectMap["routingWeight"] = vngclepf.RoutingWeight
16520	}
16521	if vngclepf.SharedKey != nil {
16522		objectMap["sharedKey"] = vngclepf.SharedKey
16523	}
16524	if vngclepf.Peer != nil {
16525		objectMap["peer"] = vngclepf.Peer
16526	}
16527	if vngclepf.EnableBgp != nil {
16528		objectMap["enableBgp"] = vngclepf.EnableBgp
16529	}
16530	if vngclepf.UsePolicyBasedTrafficSelectors != nil {
16531		objectMap["usePolicyBasedTrafficSelectors"] = vngclepf.UsePolicyBasedTrafficSelectors
16532	}
16533	if vngclepf.IpsecPolicies != nil {
16534		objectMap["ipsecPolicies"] = vngclepf.IpsecPolicies
16535	}
16536	if vngclepf.ResourceGUID != nil {
16537		objectMap["resourceGuid"] = vngclepf.ResourceGUID
16538	}
16539	return json.Marshal(objectMap)
16540}
16541
16542// VirtualNetworkGatewayConnectionListResult response for the ListVirtualNetworkGatewayConnections API
16543// service call
16544type VirtualNetworkGatewayConnectionListResult struct {
16545	autorest.Response `json:"-"`
16546	// Value - Gets a list of VirtualNetworkGatewayConnection resources that exists in a resource group.
16547	Value *[]VirtualNetworkGatewayConnection `json:"value,omitempty"`
16548	// NextLink - READ-ONLY; The URL to get the next set of results.
16549	NextLink *string `json:"nextLink,omitempty"`
16550}
16551
16552// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListResult.
16553func (vngclr VirtualNetworkGatewayConnectionListResult) MarshalJSON() ([]byte, error) {
16554	objectMap := make(map[string]interface{})
16555	if vngclr.Value != nil {
16556		objectMap["value"] = vngclr.Value
16557	}
16558	return json.Marshal(objectMap)
16559}
16560
16561// VirtualNetworkGatewayConnectionListResultIterator provides access to a complete listing of
16562// VirtualNetworkGatewayConnection values.
16563type VirtualNetworkGatewayConnectionListResultIterator struct {
16564	i    int
16565	page VirtualNetworkGatewayConnectionListResultPage
16566}
16567
16568// NextWithContext advances to the next value.  If there was an error making
16569// the request the iterator does not advance and the error is returned.
16570func (iter *VirtualNetworkGatewayConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
16571	if tracing.IsEnabled() {
16572		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultIterator.NextWithContext")
16573		defer func() {
16574			sc := -1
16575			if iter.Response().Response.Response != nil {
16576				sc = iter.Response().Response.Response.StatusCode
16577			}
16578			tracing.EndSpan(ctx, sc, err)
16579		}()
16580	}
16581	iter.i++
16582	if iter.i < len(iter.page.Values()) {
16583		return nil
16584	}
16585	err = iter.page.NextWithContext(ctx)
16586	if err != nil {
16587		iter.i--
16588		return err
16589	}
16590	iter.i = 0
16591	return nil
16592}
16593
16594// Next advances to the next value.  If there was an error making
16595// the request the iterator does not advance and the error is returned.
16596// Deprecated: Use NextWithContext() instead.
16597func (iter *VirtualNetworkGatewayConnectionListResultIterator) Next() error {
16598	return iter.NextWithContext(context.Background())
16599}
16600
16601// NotDone returns true if the enumeration should be started or is not yet complete.
16602func (iter VirtualNetworkGatewayConnectionListResultIterator) NotDone() bool {
16603	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16604}
16605
16606// Response returns the raw server response from the last page request.
16607func (iter VirtualNetworkGatewayConnectionListResultIterator) Response() VirtualNetworkGatewayConnectionListResult {
16608	return iter.page.Response()
16609}
16610
16611// Value returns the current value or a zero-initialized value if the
16612// iterator has advanced beyond the end of the collection.
16613func (iter VirtualNetworkGatewayConnectionListResultIterator) Value() VirtualNetworkGatewayConnection {
16614	if !iter.page.NotDone() {
16615		return VirtualNetworkGatewayConnection{}
16616	}
16617	return iter.page.Values()[iter.i]
16618}
16619
16620// Creates a new instance of the VirtualNetworkGatewayConnectionListResultIterator type.
16621func NewVirtualNetworkGatewayConnectionListResultIterator(page VirtualNetworkGatewayConnectionListResultPage) VirtualNetworkGatewayConnectionListResultIterator {
16622	return VirtualNetworkGatewayConnectionListResultIterator{page: page}
16623}
16624
16625// IsEmpty returns true if the ListResult contains no values.
16626func (vngclr VirtualNetworkGatewayConnectionListResult) IsEmpty() bool {
16627	return vngclr.Value == nil || len(*vngclr.Value) == 0
16628}
16629
16630// hasNextLink returns true if the NextLink is not empty.
16631func (vngclr VirtualNetworkGatewayConnectionListResult) hasNextLink() bool {
16632	return vngclr.NextLink != nil && len(*vngclr.NextLink) != 0
16633}
16634
16635// virtualNetworkGatewayConnectionListResultPreparer prepares a request to retrieve the next set of results.
16636// It returns nil if no more results exist.
16637func (vngclr VirtualNetworkGatewayConnectionListResult) virtualNetworkGatewayConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
16638	if !vngclr.hasNextLink() {
16639		return nil, nil
16640	}
16641	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16642		autorest.AsJSON(),
16643		autorest.AsGet(),
16644		autorest.WithBaseURL(to.String(vngclr.NextLink)))
16645}
16646
16647// VirtualNetworkGatewayConnectionListResultPage contains a page of VirtualNetworkGatewayConnection values.
16648type VirtualNetworkGatewayConnectionListResultPage struct {
16649	fn     func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)
16650	vngclr VirtualNetworkGatewayConnectionListResult
16651}
16652
16653// NextWithContext advances to the next page of values.  If there was an error making
16654// the request the page does not advance and the error is returned.
16655func (page *VirtualNetworkGatewayConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
16656	if tracing.IsEnabled() {
16657		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultPage.NextWithContext")
16658		defer func() {
16659			sc := -1
16660			if page.Response().Response.Response != nil {
16661				sc = page.Response().Response.Response.StatusCode
16662			}
16663			tracing.EndSpan(ctx, sc, err)
16664		}()
16665	}
16666	for {
16667		next, err := page.fn(ctx, page.vngclr)
16668		if err != nil {
16669			return err
16670		}
16671		page.vngclr = next
16672		if !next.hasNextLink() || !next.IsEmpty() {
16673			break
16674		}
16675	}
16676	return nil
16677}
16678
16679// Next advances to the next page of values.  If there was an error making
16680// the request the page does not advance and the error is returned.
16681// Deprecated: Use NextWithContext() instead.
16682func (page *VirtualNetworkGatewayConnectionListResultPage) Next() error {
16683	return page.NextWithContext(context.Background())
16684}
16685
16686// NotDone returns true if the page enumeration should be started or is not yet complete.
16687func (page VirtualNetworkGatewayConnectionListResultPage) NotDone() bool {
16688	return !page.vngclr.IsEmpty()
16689}
16690
16691// Response returns the raw server response from the last page request.
16692func (page VirtualNetworkGatewayConnectionListResultPage) Response() VirtualNetworkGatewayConnectionListResult {
16693	return page.vngclr
16694}
16695
16696// Values returns the slice of values for the current page or nil if there are no values.
16697func (page VirtualNetworkGatewayConnectionListResultPage) Values() []VirtualNetworkGatewayConnection {
16698	if page.vngclr.IsEmpty() {
16699		return nil
16700	}
16701	return *page.vngclr.Value
16702}
16703
16704// Creates a new instance of the VirtualNetworkGatewayConnectionListResultPage type.
16705func NewVirtualNetworkGatewayConnectionListResultPage(cur VirtualNetworkGatewayConnectionListResult, getNextPage func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)) VirtualNetworkGatewayConnectionListResultPage {
16706	return VirtualNetworkGatewayConnectionListResultPage{
16707		fn:     getNextPage,
16708		vngclr: cur,
16709	}
16710}
16711
16712// VirtualNetworkGatewayConnectionPropertiesFormat virtualNetworkGatewayConnection properties
16713type VirtualNetworkGatewayConnectionPropertiesFormat struct {
16714	// AuthorizationKey - The authorizationKey.
16715	AuthorizationKey *string `json:"authorizationKey,omitempty"`
16716	// VirtualNetworkGateway1 - The reference to virtual network gateway resource.
16717	VirtualNetworkGateway1 *VirtualNetworkGateway `json:"virtualNetworkGateway1,omitempty"`
16718	// VirtualNetworkGateway2 - The reference to virtual network gateway resource.
16719	VirtualNetworkGateway2 *VirtualNetworkGateway `json:"virtualNetworkGateway2,omitempty"`
16720	// LocalNetworkGateway2 - The reference to local network gateway resource.
16721	LocalNetworkGateway2 *LocalNetworkGateway `json:"localNetworkGateway2,omitempty"`
16722	// ConnectionType - Gateway connection type. Possible values are: 'IPsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'
16723	ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"`
16724	// RoutingWeight - The routing weight.
16725	RoutingWeight *int32 `json:"routingWeight,omitempty"`
16726	// SharedKey - The IPSec shared key.
16727	SharedKey *string `json:"sharedKey,omitempty"`
16728	// ConnectionStatus - READ-ONLY; Virtual network Gateway connection status. Possible values are 'Unknown', 'Connecting', 'Connected' and 'NotConnected'. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
16729	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
16730	// TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status.
16731	TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"`
16732	// EgressBytesTransferred - READ-ONLY; The egress bytes transferred in this connection.
16733	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
16734	// IngressBytesTransferred - READ-ONLY; The ingress bytes transferred in this connection.
16735	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
16736	// Peer - The reference to peerings resource.
16737	Peer *SubResource `json:"peer,omitempty"`
16738	// EnableBgp - EnableBgp flag
16739	EnableBgp *bool `json:"enableBgp,omitempty"`
16740	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
16741	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
16742	// IpsecPolicies - The IPSec Policies to be considered by this connection.
16743	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
16744	// ResourceGUID - The resource GUID property of the VirtualNetworkGatewayConnection resource.
16745	ResourceGUID *string `json:"resourceGuid,omitempty"`
16746	// ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGatewayConnection resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
16747	ProvisioningState *string `json:"provisioningState,omitempty"`
16748}
16749
16750// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionPropertiesFormat.
16751func (vngcpf VirtualNetworkGatewayConnectionPropertiesFormat) MarshalJSON() ([]byte, error) {
16752	objectMap := make(map[string]interface{})
16753	if vngcpf.AuthorizationKey != nil {
16754		objectMap["authorizationKey"] = vngcpf.AuthorizationKey
16755	}
16756	if vngcpf.VirtualNetworkGateway1 != nil {
16757		objectMap["virtualNetworkGateway1"] = vngcpf.VirtualNetworkGateway1
16758	}
16759	if vngcpf.VirtualNetworkGateway2 != nil {
16760		objectMap["virtualNetworkGateway2"] = vngcpf.VirtualNetworkGateway2
16761	}
16762	if vngcpf.LocalNetworkGateway2 != nil {
16763		objectMap["localNetworkGateway2"] = vngcpf.LocalNetworkGateway2
16764	}
16765	if vngcpf.ConnectionType != "" {
16766		objectMap["connectionType"] = vngcpf.ConnectionType
16767	}
16768	if vngcpf.RoutingWeight != nil {
16769		objectMap["routingWeight"] = vngcpf.RoutingWeight
16770	}
16771	if vngcpf.SharedKey != nil {
16772		objectMap["sharedKey"] = vngcpf.SharedKey
16773	}
16774	if vngcpf.Peer != nil {
16775		objectMap["peer"] = vngcpf.Peer
16776	}
16777	if vngcpf.EnableBgp != nil {
16778		objectMap["enableBgp"] = vngcpf.EnableBgp
16779	}
16780	if vngcpf.UsePolicyBasedTrafficSelectors != nil {
16781		objectMap["usePolicyBasedTrafficSelectors"] = vngcpf.UsePolicyBasedTrafficSelectors
16782	}
16783	if vngcpf.IpsecPolicies != nil {
16784		objectMap["ipsecPolicies"] = vngcpf.IpsecPolicies
16785	}
16786	if vngcpf.ResourceGUID != nil {
16787		objectMap["resourceGuid"] = vngcpf.ResourceGUID
16788	}
16789	return json.Marshal(objectMap)
16790}
16791
16792// VirtualNetworkGatewayConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
16793// results of a long-running operation.
16794type VirtualNetworkGatewayConnectionsCreateOrUpdateFuture struct {
16795	azure.FutureAPI
16796	// Result returns the result of the asynchronous operation.
16797	// If the operation has not completed it will return an error.
16798	Result func(VirtualNetworkGatewayConnectionsClient) (VirtualNetworkGatewayConnection, error)
16799}
16800
16801// VirtualNetworkGatewayConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of
16802// a long-running operation.
16803type VirtualNetworkGatewayConnectionsDeleteFuture struct {
16804	azure.FutureAPI
16805	// Result returns the result of the asynchronous operation.
16806	// If the operation has not completed it will return an error.
16807	Result func(VirtualNetworkGatewayConnectionsClient) (autorest.Response, error)
16808}
16809
16810// VirtualNetworkGatewayConnectionsResetSharedKeyFuture an abstraction for monitoring and retrieving the
16811// results of a long-running operation.
16812type VirtualNetworkGatewayConnectionsResetSharedKeyFuture struct {
16813	azure.FutureAPI
16814	// Result returns the result of the asynchronous operation.
16815	// If the operation has not completed it will return an error.
16816	Result func(VirtualNetworkGatewayConnectionsClient) (ConnectionResetSharedKey, error)
16817}
16818
16819// VirtualNetworkGatewayConnectionsSetSharedKeyFuture an abstraction for monitoring and retrieving the
16820// results of a long-running operation.
16821type VirtualNetworkGatewayConnectionsSetSharedKeyFuture struct {
16822	azure.FutureAPI
16823	// Result returns the result of the asynchronous operation.
16824	// If the operation has not completed it will return an error.
16825	Result func(VirtualNetworkGatewayConnectionsClient) (ConnectionSharedKey, error)
16826}
16827
16828// VirtualNetworkGatewayConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the
16829// results of a long-running operation.
16830type VirtualNetworkGatewayConnectionsUpdateTagsFuture struct {
16831	azure.FutureAPI
16832	// Result returns the result of the asynchronous operation.
16833	// If the operation has not completed it will return an error.
16834	Result func(VirtualNetworkGatewayConnectionsClient) (VirtualNetworkGatewayConnection, error)
16835}
16836
16837// VirtualNetworkGatewayIPConfiguration IP configuration for virtual network gateway
16838type VirtualNetworkGatewayIPConfiguration struct {
16839	// VirtualNetworkGatewayIPConfigurationPropertiesFormat - Properties of the virtual network gateway ip configuration.
16840	*VirtualNetworkGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"`
16841	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
16842	Name *string `json:"name,omitempty"`
16843	// Etag - A unique read-only string that changes whenever the resource is updated.
16844	Etag *string `json:"etag,omitempty"`
16845	// ID - Resource ID.
16846	ID *string `json:"id,omitempty"`
16847}
16848
16849// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfiguration.
16850func (vngic VirtualNetworkGatewayIPConfiguration) MarshalJSON() ([]byte, error) {
16851	objectMap := make(map[string]interface{})
16852	if vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat != nil {
16853		objectMap["properties"] = vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat
16854	}
16855	if vngic.Name != nil {
16856		objectMap["name"] = vngic.Name
16857	}
16858	if vngic.Etag != nil {
16859		objectMap["etag"] = vngic.Etag
16860	}
16861	if vngic.ID != nil {
16862		objectMap["id"] = vngic.ID
16863	}
16864	return json.Marshal(objectMap)
16865}
16866
16867// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayIPConfiguration struct.
16868func (vngic *VirtualNetworkGatewayIPConfiguration) UnmarshalJSON(body []byte) error {
16869	var m map[string]*json.RawMessage
16870	err := json.Unmarshal(body, &m)
16871	if err != nil {
16872		return err
16873	}
16874	for k, v := range m {
16875		switch k {
16876		case "properties":
16877			if v != nil {
16878				var virtualNetworkGatewayIPConfigurationPropertiesFormat VirtualNetworkGatewayIPConfigurationPropertiesFormat
16879				err = json.Unmarshal(*v, &virtualNetworkGatewayIPConfigurationPropertiesFormat)
16880				if err != nil {
16881					return err
16882				}
16883				vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat = &virtualNetworkGatewayIPConfigurationPropertiesFormat
16884			}
16885		case "name":
16886			if v != nil {
16887				var name string
16888				err = json.Unmarshal(*v, &name)
16889				if err != nil {
16890					return err
16891				}
16892				vngic.Name = &name
16893			}
16894		case "etag":
16895			if v != nil {
16896				var etag string
16897				err = json.Unmarshal(*v, &etag)
16898				if err != nil {
16899					return err
16900				}
16901				vngic.Etag = &etag
16902			}
16903		case "id":
16904			if v != nil {
16905				var ID string
16906				err = json.Unmarshal(*v, &ID)
16907				if err != nil {
16908					return err
16909				}
16910				vngic.ID = &ID
16911			}
16912		}
16913	}
16914
16915	return nil
16916}
16917
16918// VirtualNetworkGatewayIPConfigurationPropertiesFormat properties of VirtualNetworkGatewayIPConfiguration
16919type VirtualNetworkGatewayIPConfigurationPropertiesFormat struct {
16920	// PrivateIPAllocationMethod - The private IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
16921	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
16922	// Subnet - The reference of the subnet resource.
16923	Subnet *SubResource `json:"subnet,omitempty"`
16924	// PublicIPAddress - The reference of the public IP resource.
16925	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
16926	// ProvisioningState - READ-ONLY; The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
16927	ProvisioningState *string `json:"provisioningState,omitempty"`
16928}
16929
16930// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfigurationPropertiesFormat.
16931func (vngicpf VirtualNetworkGatewayIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
16932	objectMap := make(map[string]interface{})
16933	if vngicpf.PrivateIPAllocationMethod != "" {
16934		objectMap["privateIPAllocationMethod"] = vngicpf.PrivateIPAllocationMethod
16935	}
16936	if vngicpf.Subnet != nil {
16937		objectMap["subnet"] = vngicpf.Subnet
16938	}
16939	if vngicpf.PublicIPAddress != nil {
16940		objectMap["publicIPAddress"] = vngicpf.PublicIPAddress
16941	}
16942	return json.Marshal(objectMap)
16943}
16944
16945// VirtualNetworkGatewayListConnectionsResult response for the VirtualNetworkGatewayListConnections API
16946// service call
16947type VirtualNetworkGatewayListConnectionsResult struct {
16948	autorest.Response `json:"-"`
16949	// Value - Gets a list of VirtualNetworkGatewayConnection resources that exists in a resource group.
16950	Value *[]VirtualNetworkGatewayConnectionListEntity `json:"value,omitempty"`
16951	// NextLink - READ-ONLY; The URL to get the next set of results.
16952	NextLink *string `json:"nextLink,omitempty"`
16953}
16954
16955// MarshalJSON is the custom marshaler for VirtualNetworkGatewayListConnectionsResult.
16956func (vnglcr VirtualNetworkGatewayListConnectionsResult) MarshalJSON() ([]byte, error) {
16957	objectMap := make(map[string]interface{})
16958	if vnglcr.Value != nil {
16959		objectMap["value"] = vnglcr.Value
16960	}
16961	return json.Marshal(objectMap)
16962}
16963
16964// VirtualNetworkGatewayListConnectionsResultIterator provides access to a complete listing of
16965// VirtualNetworkGatewayConnectionListEntity values.
16966type VirtualNetworkGatewayListConnectionsResultIterator struct {
16967	i    int
16968	page VirtualNetworkGatewayListConnectionsResultPage
16969}
16970
16971// NextWithContext advances to the next value.  If there was an error making
16972// the request the iterator does not advance and the error is returned.
16973func (iter *VirtualNetworkGatewayListConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
16974	if tracing.IsEnabled() {
16975		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultIterator.NextWithContext")
16976		defer func() {
16977			sc := -1
16978			if iter.Response().Response.Response != nil {
16979				sc = iter.Response().Response.Response.StatusCode
16980			}
16981			tracing.EndSpan(ctx, sc, err)
16982		}()
16983	}
16984	iter.i++
16985	if iter.i < len(iter.page.Values()) {
16986		return nil
16987	}
16988	err = iter.page.NextWithContext(ctx)
16989	if err != nil {
16990		iter.i--
16991		return err
16992	}
16993	iter.i = 0
16994	return nil
16995}
16996
16997// Next advances to the next value.  If there was an error making
16998// the request the iterator does not advance and the error is returned.
16999// Deprecated: Use NextWithContext() instead.
17000func (iter *VirtualNetworkGatewayListConnectionsResultIterator) Next() error {
17001	return iter.NextWithContext(context.Background())
17002}
17003
17004// NotDone returns true if the enumeration should be started or is not yet complete.
17005func (iter VirtualNetworkGatewayListConnectionsResultIterator) NotDone() bool {
17006	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17007}
17008
17009// Response returns the raw server response from the last page request.
17010func (iter VirtualNetworkGatewayListConnectionsResultIterator) Response() VirtualNetworkGatewayListConnectionsResult {
17011	return iter.page.Response()
17012}
17013
17014// Value returns the current value or a zero-initialized value if the
17015// iterator has advanced beyond the end of the collection.
17016func (iter VirtualNetworkGatewayListConnectionsResultIterator) Value() VirtualNetworkGatewayConnectionListEntity {
17017	if !iter.page.NotDone() {
17018		return VirtualNetworkGatewayConnectionListEntity{}
17019	}
17020	return iter.page.Values()[iter.i]
17021}
17022
17023// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultIterator type.
17024func NewVirtualNetworkGatewayListConnectionsResultIterator(page VirtualNetworkGatewayListConnectionsResultPage) VirtualNetworkGatewayListConnectionsResultIterator {
17025	return VirtualNetworkGatewayListConnectionsResultIterator{page: page}
17026}
17027
17028// IsEmpty returns true if the ListResult contains no values.
17029func (vnglcr VirtualNetworkGatewayListConnectionsResult) IsEmpty() bool {
17030	return vnglcr.Value == nil || len(*vnglcr.Value) == 0
17031}
17032
17033// hasNextLink returns true if the NextLink is not empty.
17034func (vnglcr VirtualNetworkGatewayListConnectionsResult) hasNextLink() bool {
17035	return vnglcr.NextLink != nil && len(*vnglcr.NextLink) != 0
17036}
17037
17038// virtualNetworkGatewayListConnectionsResultPreparer prepares a request to retrieve the next set of results.
17039// It returns nil if no more results exist.
17040func (vnglcr VirtualNetworkGatewayListConnectionsResult) virtualNetworkGatewayListConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
17041	if !vnglcr.hasNextLink() {
17042		return nil, nil
17043	}
17044	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17045		autorest.AsJSON(),
17046		autorest.AsGet(),
17047		autorest.WithBaseURL(to.String(vnglcr.NextLink)))
17048}
17049
17050// VirtualNetworkGatewayListConnectionsResultPage contains a page of
17051// VirtualNetworkGatewayConnectionListEntity values.
17052type VirtualNetworkGatewayListConnectionsResultPage struct {
17053	fn     func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)
17054	vnglcr VirtualNetworkGatewayListConnectionsResult
17055}
17056
17057// NextWithContext advances to the next page of values.  If there was an error making
17058// the request the page does not advance and the error is returned.
17059func (page *VirtualNetworkGatewayListConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
17060	if tracing.IsEnabled() {
17061		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultPage.NextWithContext")
17062		defer func() {
17063			sc := -1
17064			if page.Response().Response.Response != nil {
17065				sc = page.Response().Response.Response.StatusCode
17066			}
17067			tracing.EndSpan(ctx, sc, err)
17068		}()
17069	}
17070	for {
17071		next, err := page.fn(ctx, page.vnglcr)
17072		if err != nil {
17073			return err
17074		}
17075		page.vnglcr = next
17076		if !next.hasNextLink() || !next.IsEmpty() {
17077			break
17078		}
17079	}
17080	return nil
17081}
17082
17083// Next advances to the next page of values.  If there was an error making
17084// the request the page does not advance and the error is returned.
17085// Deprecated: Use NextWithContext() instead.
17086func (page *VirtualNetworkGatewayListConnectionsResultPage) Next() error {
17087	return page.NextWithContext(context.Background())
17088}
17089
17090// NotDone returns true if the page enumeration should be started or is not yet complete.
17091func (page VirtualNetworkGatewayListConnectionsResultPage) NotDone() bool {
17092	return !page.vnglcr.IsEmpty()
17093}
17094
17095// Response returns the raw server response from the last page request.
17096func (page VirtualNetworkGatewayListConnectionsResultPage) Response() VirtualNetworkGatewayListConnectionsResult {
17097	return page.vnglcr
17098}
17099
17100// Values returns the slice of values for the current page or nil if there are no values.
17101func (page VirtualNetworkGatewayListConnectionsResultPage) Values() []VirtualNetworkGatewayConnectionListEntity {
17102	if page.vnglcr.IsEmpty() {
17103		return nil
17104	}
17105	return *page.vnglcr.Value
17106}
17107
17108// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultPage type.
17109func NewVirtualNetworkGatewayListConnectionsResultPage(cur VirtualNetworkGatewayListConnectionsResult, getNextPage func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)) VirtualNetworkGatewayListConnectionsResultPage {
17110	return VirtualNetworkGatewayListConnectionsResultPage{
17111		fn:     getNextPage,
17112		vnglcr: cur,
17113	}
17114}
17115
17116// VirtualNetworkGatewayListResult response for the ListVirtualNetworkGateways API service call.
17117type VirtualNetworkGatewayListResult struct {
17118	autorest.Response `json:"-"`
17119	// Value - Gets a list of VirtualNetworkGateway resources that exists in a resource group.
17120	Value *[]VirtualNetworkGateway `json:"value,omitempty"`
17121	// NextLink - READ-ONLY; The URL to get the next set of results.
17122	NextLink *string `json:"nextLink,omitempty"`
17123}
17124
17125// MarshalJSON is the custom marshaler for VirtualNetworkGatewayListResult.
17126func (vnglr VirtualNetworkGatewayListResult) MarshalJSON() ([]byte, error) {
17127	objectMap := make(map[string]interface{})
17128	if vnglr.Value != nil {
17129		objectMap["value"] = vnglr.Value
17130	}
17131	return json.Marshal(objectMap)
17132}
17133
17134// VirtualNetworkGatewayListResultIterator provides access to a complete listing of VirtualNetworkGateway
17135// values.
17136type VirtualNetworkGatewayListResultIterator struct {
17137	i    int
17138	page VirtualNetworkGatewayListResultPage
17139}
17140
17141// NextWithContext advances to the next value.  If there was an error making
17142// the request the iterator does not advance and the error is returned.
17143func (iter *VirtualNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
17144	if tracing.IsEnabled() {
17145		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultIterator.NextWithContext")
17146		defer func() {
17147			sc := -1
17148			if iter.Response().Response.Response != nil {
17149				sc = iter.Response().Response.Response.StatusCode
17150			}
17151			tracing.EndSpan(ctx, sc, err)
17152		}()
17153	}
17154	iter.i++
17155	if iter.i < len(iter.page.Values()) {
17156		return nil
17157	}
17158	err = iter.page.NextWithContext(ctx)
17159	if err != nil {
17160		iter.i--
17161		return err
17162	}
17163	iter.i = 0
17164	return nil
17165}
17166
17167// Next advances to the next value.  If there was an error making
17168// the request the iterator does not advance and the error is returned.
17169// Deprecated: Use NextWithContext() instead.
17170func (iter *VirtualNetworkGatewayListResultIterator) Next() error {
17171	return iter.NextWithContext(context.Background())
17172}
17173
17174// NotDone returns true if the enumeration should be started or is not yet complete.
17175func (iter VirtualNetworkGatewayListResultIterator) NotDone() bool {
17176	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17177}
17178
17179// Response returns the raw server response from the last page request.
17180func (iter VirtualNetworkGatewayListResultIterator) Response() VirtualNetworkGatewayListResult {
17181	return iter.page.Response()
17182}
17183
17184// Value returns the current value or a zero-initialized value if the
17185// iterator has advanced beyond the end of the collection.
17186func (iter VirtualNetworkGatewayListResultIterator) Value() VirtualNetworkGateway {
17187	if !iter.page.NotDone() {
17188		return VirtualNetworkGateway{}
17189	}
17190	return iter.page.Values()[iter.i]
17191}
17192
17193// Creates a new instance of the VirtualNetworkGatewayListResultIterator type.
17194func NewVirtualNetworkGatewayListResultIterator(page VirtualNetworkGatewayListResultPage) VirtualNetworkGatewayListResultIterator {
17195	return VirtualNetworkGatewayListResultIterator{page: page}
17196}
17197
17198// IsEmpty returns true if the ListResult contains no values.
17199func (vnglr VirtualNetworkGatewayListResult) IsEmpty() bool {
17200	return vnglr.Value == nil || len(*vnglr.Value) == 0
17201}
17202
17203// hasNextLink returns true if the NextLink is not empty.
17204func (vnglr VirtualNetworkGatewayListResult) hasNextLink() bool {
17205	return vnglr.NextLink != nil && len(*vnglr.NextLink) != 0
17206}
17207
17208// virtualNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results.
17209// It returns nil if no more results exist.
17210func (vnglr VirtualNetworkGatewayListResult) virtualNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
17211	if !vnglr.hasNextLink() {
17212		return nil, nil
17213	}
17214	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17215		autorest.AsJSON(),
17216		autorest.AsGet(),
17217		autorest.WithBaseURL(to.String(vnglr.NextLink)))
17218}
17219
17220// VirtualNetworkGatewayListResultPage contains a page of VirtualNetworkGateway values.
17221type VirtualNetworkGatewayListResultPage struct {
17222	fn    func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)
17223	vnglr VirtualNetworkGatewayListResult
17224}
17225
17226// NextWithContext advances to the next page of values.  If there was an error making
17227// the request the page does not advance and the error is returned.
17228func (page *VirtualNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
17229	if tracing.IsEnabled() {
17230		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultPage.NextWithContext")
17231		defer func() {
17232			sc := -1
17233			if page.Response().Response.Response != nil {
17234				sc = page.Response().Response.Response.StatusCode
17235			}
17236			tracing.EndSpan(ctx, sc, err)
17237		}()
17238	}
17239	for {
17240		next, err := page.fn(ctx, page.vnglr)
17241		if err != nil {
17242			return err
17243		}
17244		page.vnglr = next
17245		if !next.hasNextLink() || !next.IsEmpty() {
17246			break
17247		}
17248	}
17249	return nil
17250}
17251
17252// Next advances to the next page of values.  If there was an error making
17253// the request the page does not advance and the error is returned.
17254// Deprecated: Use NextWithContext() instead.
17255func (page *VirtualNetworkGatewayListResultPage) Next() error {
17256	return page.NextWithContext(context.Background())
17257}
17258
17259// NotDone returns true if the page enumeration should be started or is not yet complete.
17260func (page VirtualNetworkGatewayListResultPage) NotDone() bool {
17261	return !page.vnglr.IsEmpty()
17262}
17263
17264// Response returns the raw server response from the last page request.
17265func (page VirtualNetworkGatewayListResultPage) Response() VirtualNetworkGatewayListResult {
17266	return page.vnglr
17267}
17268
17269// Values returns the slice of values for the current page or nil if there are no values.
17270func (page VirtualNetworkGatewayListResultPage) Values() []VirtualNetworkGateway {
17271	if page.vnglr.IsEmpty() {
17272		return nil
17273	}
17274	return *page.vnglr.Value
17275}
17276
17277// Creates a new instance of the VirtualNetworkGatewayListResultPage type.
17278func NewVirtualNetworkGatewayListResultPage(cur VirtualNetworkGatewayListResult, getNextPage func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)) VirtualNetworkGatewayListResultPage {
17279	return VirtualNetworkGatewayListResultPage{
17280		fn:    getNextPage,
17281		vnglr: cur,
17282	}
17283}
17284
17285// VirtualNetworkGatewayPropertiesFormat virtualNetworkGateway properties
17286type VirtualNetworkGatewayPropertiesFormat struct {
17287	// IPConfigurations - IP configurations for virtual network gateway.
17288	IPConfigurations *[]VirtualNetworkGatewayIPConfiguration `json:"ipConfigurations,omitempty"`
17289	// GatewayType - The type of this virtual network gateway. Possible values are: 'Vpn' and 'ExpressRoute'. Possible values include: 'VirtualNetworkGatewayTypeVpn', 'VirtualNetworkGatewayTypeExpressRoute'
17290	GatewayType VirtualNetworkGatewayType `json:"gatewayType,omitempty"`
17291	// VpnType - The type of this virtual network gateway. Possible values are: 'PolicyBased' and 'RouteBased'. Possible values include: 'PolicyBased', 'RouteBased'
17292	VpnType VpnType `json:"vpnType,omitempty"`
17293	// EnableBgp - Whether BGP is enabled for this virtual network gateway or not.
17294	EnableBgp *bool `json:"enableBgp,omitempty"`
17295	// ActiveActive - ActiveActive flag
17296	ActiveActive *bool `json:"activeActive,omitempty"`
17297	// 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.
17298	GatewayDefaultSite *SubResource `json:"gatewayDefaultSite,omitempty"`
17299	// Sku - The reference of the VirtualNetworkGatewaySku resource which represents the SKU selected for Virtual network gateway.
17300	Sku *VirtualNetworkGatewaySku `json:"sku,omitempty"`
17301	// VpnClientConfiguration - The reference of the VpnClientConfiguration resource which represents the P2S VpnClient configurations.
17302	VpnClientConfiguration *VpnClientConfiguration `json:"vpnClientConfiguration,omitempty"`
17303	// BgpSettings - Virtual network gateway's BGP speaker settings.
17304	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
17305	// ResourceGUID - The resource GUID property of the VirtualNetworkGateway resource.
17306	ResourceGUID *string `json:"resourceGuid,omitempty"`
17307	// ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
17308	ProvisioningState *string `json:"provisioningState,omitempty"`
17309}
17310
17311// MarshalJSON is the custom marshaler for VirtualNetworkGatewayPropertiesFormat.
17312func (vngpf VirtualNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
17313	objectMap := make(map[string]interface{})
17314	if vngpf.IPConfigurations != nil {
17315		objectMap["ipConfigurations"] = vngpf.IPConfigurations
17316	}
17317	if vngpf.GatewayType != "" {
17318		objectMap["gatewayType"] = vngpf.GatewayType
17319	}
17320	if vngpf.VpnType != "" {
17321		objectMap["vpnType"] = vngpf.VpnType
17322	}
17323	if vngpf.EnableBgp != nil {
17324		objectMap["enableBgp"] = vngpf.EnableBgp
17325	}
17326	if vngpf.ActiveActive != nil {
17327		objectMap["activeActive"] = vngpf.ActiveActive
17328	}
17329	if vngpf.GatewayDefaultSite != nil {
17330		objectMap["gatewayDefaultSite"] = vngpf.GatewayDefaultSite
17331	}
17332	if vngpf.Sku != nil {
17333		objectMap["sku"] = vngpf.Sku
17334	}
17335	if vngpf.VpnClientConfiguration != nil {
17336		objectMap["vpnClientConfiguration"] = vngpf.VpnClientConfiguration
17337	}
17338	if vngpf.BgpSettings != nil {
17339		objectMap["bgpSettings"] = vngpf.BgpSettings
17340	}
17341	if vngpf.ResourceGUID != nil {
17342		objectMap["resourceGuid"] = vngpf.ResourceGUID
17343	}
17344	return json.Marshal(objectMap)
17345}
17346
17347// VirtualNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
17348// long-running operation.
17349type VirtualNetworkGatewaysCreateOrUpdateFuture struct {
17350	azure.FutureAPI
17351	// Result returns the result of the asynchronous operation.
17352	// If the operation has not completed it will return an error.
17353	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
17354}
17355
17356// VirtualNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
17357// long-running operation.
17358type VirtualNetworkGatewaysDeleteFuture struct {
17359	azure.FutureAPI
17360	// Result returns the result of the asynchronous operation.
17361	// If the operation has not completed it will return an error.
17362	Result func(VirtualNetworkGatewaysClient) (autorest.Response, error)
17363}
17364
17365// VirtualNetworkGatewaysGeneratevpnclientpackageFuture an abstraction for monitoring and retrieving the
17366// results of a long-running operation.
17367type VirtualNetworkGatewaysGeneratevpnclientpackageFuture struct {
17368	azure.FutureAPI
17369	// Result returns the result of the asynchronous operation.
17370	// If the operation has not completed it will return an error.
17371	Result func(VirtualNetworkGatewaysClient) (String, error)
17372}
17373
17374// VirtualNetworkGatewaysGenerateVpnProfileFuture an abstraction for monitoring and retrieving the results
17375// of a long-running operation.
17376type VirtualNetworkGatewaysGenerateVpnProfileFuture struct {
17377	azure.FutureAPI
17378	// Result returns the result of the asynchronous operation.
17379	// If the operation has not completed it will return an error.
17380	Result func(VirtualNetworkGatewaysClient) (String, error)
17381}
17382
17383// VirtualNetworkGatewaysGetAdvertisedRoutesFuture an abstraction for monitoring and retrieving the results
17384// of a long-running operation.
17385type VirtualNetworkGatewaysGetAdvertisedRoutesFuture struct {
17386	azure.FutureAPI
17387	// Result returns the result of the asynchronous operation.
17388	// If the operation has not completed it will return an error.
17389	Result func(VirtualNetworkGatewaysClient) (GatewayRouteListResult, error)
17390}
17391
17392// VirtualNetworkGatewaysGetBgpPeerStatusFuture an abstraction for monitoring and retrieving the results of
17393// a long-running operation.
17394type VirtualNetworkGatewaysGetBgpPeerStatusFuture struct {
17395	azure.FutureAPI
17396	// Result returns the result of the asynchronous operation.
17397	// If the operation has not completed it will return an error.
17398	Result func(VirtualNetworkGatewaysClient) (BgpPeerStatusListResult, error)
17399}
17400
17401// VirtualNetworkGatewaysGetLearnedRoutesFuture an abstraction for monitoring and retrieving the results of
17402// a long-running operation.
17403type VirtualNetworkGatewaysGetLearnedRoutesFuture struct {
17404	azure.FutureAPI
17405	// Result returns the result of the asynchronous operation.
17406	// If the operation has not completed it will return an error.
17407	Result func(VirtualNetworkGatewaysClient) (GatewayRouteListResult, error)
17408}
17409
17410// VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture an abstraction for monitoring and retrieving the
17411// results of a long-running operation.
17412type VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture struct {
17413	azure.FutureAPI
17414	// Result returns the result of the asynchronous operation.
17415	// If the operation has not completed it will return an error.
17416	Result func(VirtualNetworkGatewaysClient) (VpnClientIPsecParameters, error)
17417}
17418
17419// VirtualNetworkGatewaysGetVpnProfilePackageURLFuture an abstraction for monitoring and retrieving the
17420// results of a long-running operation.
17421type VirtualNetworkGatewaysGetVpnProfilePackageURLFuture struct {
17422	azure.FutureAPI
17423	// Result returns the result of the asynchronous operation.
17424	// If the operation has not completed it will return an error.
17425	Result func(VirtualNetworkGatewaysClient) (String, error)
17426}
17427
17428// VirtualNetworkGatewaySku virtualNetworkGatewaySku details
17429type VirtualNetworkGatewaySku struct {
17430	// Name - Gateway SKU name. Possible values include: 'VirtualNetworkGatewaySkuNameBasic', 'VirtualNetworkGatewaySkuNameHighPerformance', 'VirtualNetworkGatewaySkuNameStandard', 'VirtualNetworkGatewaySkuNameUltraPerformance', 'VirtualNetworkGatewaySkuNameVpnGw1', 'VirtualNetworkGatewaySkuNameVpnGw2', 'VirtualNetworkGatewaySkuNameVpnGw3', 'VirtualNetworkGatewaySkuNameVpnGw1AZ', 'VirtualNetworkGatewaySkuNameVpnGw2AZ', 'VirtualNetworkGatewaySkuNameVpnGw3AZ', 'VirtualNetworkGatewaySkuNameErGw1AZ', 'VirtualNetworkGatewaySkuNameErGw2AZ', 'VirtualNetworkGatewaySkuNameErGw3AZ'
17431	Name VirtualNetworkGatewaySkuName `json:"name,omitempty"`
17432	// Tier - Gateway SKU tier. Possible values include: 'VirtualNetworkGatewaySkuTierBasic', 'VirtualNetworkGatewaySkuTierHighPerformance', 'VirtualNetworkGatewaySkuTierStandard', 'VirtualNetworkGatewaySkuTierUltraPerformance', 'VirtualNetworkGatewaySkuTierVpnGw1', 'VirtualNetworkGatewaySkuTierVpnGw2', 'VirtualNetworkGatewaySkuTierVpnGw3', 'VirtualNetworkGatewaySkuTierVpnGw1AZ', 'VirtualNetworkGatewaySkuTierVpnGw2AZ', 'VirtualNetworkGatewaySkuTierVpnGw3AZ', 'VirtualNetworkGatewaySkuTierErGw1AZ', 'VirtualNetworkGatewaySkuTierErGw2AZ', 'VirtualNetworkGatewaySkuTierErGw3AZ'
17433	Tier VirtualNetworkGatewaySkuTier `json:"tier,omitempty"`
17434	// Capacity - The capacity.
17435	Capacity *int32 `json:"capacity,omitempty"`
17436}
17437
17438// VirtualNetworkGatewaysResetFuture an abstraction for monitoring and retrieving the results of a
17439// long-running operation.
17440type VirtualNetworkGatewaysResetFuture struct {
17441	azure.FutureAPI
17442	// Result returns the result of the asynchronous operation.
17443	// If the operation has not completed it will return an error.
17444	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
17445}
17446
17447// VirtualNetworkGatewaysResetVpnClientSharedKeyFuture an abstraction for monitoring and retrieving the
17448// results of a long-running operation.
17449type VirtualNetworkGatewaysResetVpnClientSharedKeyFuture struct {
17450	azure.FutureAPI
17451	// Result returns the result of the asynchronous operation.
17452	// If the operation has not completed it will return an error.
17453	Result func(VirtualNetworkGatewaysClient) (autorest.Response, error)
17454}
17455
17456// VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture an abstraction for monitoring and retrieving the
17457// results of a long-running operation.
17458type VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture struct {
17459	azure.FutureAPI
17460	// Result returns the result of the asynchronous operation.
17461	// If the operation has not completed it will return an error.
17462	Result func(VirtualNetworkGatewaysClient) (VpnClientIPsecParameters, error)
17463}
17464
17465// VirtualNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
17466// long-running operation.
17467type VirtualNetworkGatewaysUpdateTagsFuture struct {
17468	azure.FutureAPI
17469	// Result returns the result of the asynchronous operation.
17470	// If the operation has not completed it will return an error.
17471	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
17472}
17473
17474// VirtualNetworkListResult response for the ListVirtualNetworks API service call.
17475type VirtualNetworkListResult struct {
17476	autorest.Response `json:"-"`
17477	// Value - Gets a list of VirtualNetwork resources in a resource group.
17478	Value *[]VirtualNetwork `json:"value,omitempty"`
17479	// NextLink - The URL to get the next set of results.
17480	NextLink *string `json:"nextLink,omitempty"`
17481}
17482
17483// VirtualNetworkListResultIterator provides access to a complete listing of VirtualNetwork values.
17484type VirtualNetworkListResultIterator struct {
17485	i    int
17486	page VirtualNetworkListResultPage
17487}
17488
17489// NextWithContext advances to the next value.  If there was an error making
17490// the request the iterator does not advance and the error is returned.
17491func (iter *VirtualNetworkListResultIterator) NextWithContext(ctx context.Context) (err error) {
17492	if tracing.IsEnabled() {
17493		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultIterator.NextWithContext")
17494		defer func() {
17495			sc := -1
17496			if iter.Response().Response.Response != nil {
17497				sc = iter.Response().Response.Response.StatusCode
17498			}
17499			tracing.EndSpan(ctx, sc, err)
17500		}()
17501	}
17502	iter.i++
17503	if iter.i < len(iter.page.Values()) {
17504		return nil
17505	}
17506	err = iter.page.NextWithContext(ctx)
17507	if err != nil {
17508		iter.i--
17509		return err
17510	}
17511	iter.i = 0
17512	return nil
17513}
17514
17515// Next advances to the next value.  If there was an error making
17516// the request the iterator does not advance and the error is returned.
17517// Deprecated: Use NextWithContext() instead.
17518func (iter *VirtualNetworkListResultIterator) Next() error {
17519	return iter.NextWithContext(context.Background())
17520}
17521
17522// NotDone returns true if the enumeration should be started or is not yet complete.
17523func (iter VirtualNetworkListResultIterator) NotDone() bool {
17524	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17525}
17526
17527// Response returns the raw server response from the last page request.
17528func (iter VirtualNetworkListResultIterator) Response() VirtualNetworkListResult {
17529	return iter.page.Response()
17530}
17531
17532// Value returns the current value or a zero-initialized value if the
17533// iterator has advanced beyond the end of the collection.
17534func (iter VirtualNetworkListResultIterator) Value() VirtualNetwork {
17535	if !iter.page.NotDone() {
17536		return VirtualNetwork{}
17537	}
17538	return iter.page.Values()[iter.i]
17539}
17540
17541// Creates a new instance of the VirtualNetworkListResultIterator type.
17542func NewVirtualNetworkListResultIterator(page VirtualNetworkListResultPage) VirtualNetworkListResultIterator {
17543	return VirtualNetworkListResultIterator{page: page}
17544}
17545
17546// IsEmpty returns true if the ListResult contains no values.
17547func (vnlr VirtualNetworkListResult) IsEmpty() bool {
17548	return vnlr.Value == nil || len(*vnlr.Value) == 0
17549}
17550
17551// hasNextLink returns true if the NextLink is not empty.
17552func (vnlr VirtualNetworkListResult) hasNextLink() bool {
17553	return vnlr.NextLink != nil && len(*vnlr.NextLink) != 0
17554}
17555
17556// virtualNetworkListResultPreparer prepares a request to retrieve the next set of results.
17557// It returns nil if no more results exist.
17558func (vnlr VirtualNetworkListResult) virtualNetworkListResultPreparer(ctx context.Context) (*http.Request, error) {
17559	if !vnlr.hasNextLink() {
17560		return nil, nil
17561	}
17562	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17563		autorest.AsJSON(),
17564		autorest.AsGet(),
17565		autorest.WithBaseURL(to.String(vnlr.NextLink)))
17566}
17567
17568// VirtualNetworkListResultPage contains a page of VirtualNetwork values.
17569type VirtualNetworkListResultPage struct {
17570	fn   func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)
17571	vnlr VirtualNetworkListResult
17572}
17573
17574// NextWithContext advances to the next page of values.  If there was an error making
17575// the request the page does not advance and the error is returned.
17576func (page *VirtualNetworkListResultPage) NextWithContext(ctx context.Context) (err error) {
17577	if tracing.IsEnabled() {
17578		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultPage.NextWithContext")
17579		defer func() {
17580			sc := -1
17581			if page.Response().Response.Response != nil {
17582				sc = page.Response().Response.Response.StatusCode
17583			}
17584			tracing.EndSpan(ctx, sc, err)
17585		}()
17586	}
17587	for {
17588		next, err := page.fn(ctx, page.vnlr)
17589		if err != nil {
17590			return err
17591		}
17592		page.vnlr = next
17593		if !next.hasNextLink() || !next.IsEmpty() {
17594			break
17595		}
17596	}
17597	return nil
17598}
17599
17600// Next advances to the next page of values.  If there was an error making
17601// the request the page does not advance and the error is returned.
17602// Deprecated: Use NextWithContext() instead.
17603func (page *VirtualNetworkListResultPage) Next() error {
17604	return page.NextWithContext(context.Background())
17605}
17606
17607// NotDone returns true if the page enumeration should be started or is not yet complete.
17608func (page VirtualNetworkListResultPage) NotDone() bool {
17609	return !page.vnlr.IsEmpty()
17610}
17611
17612// Response returns the raw server response from the last page request.
17613func (page VirtualNetworkListResultPage) Response() VirtualNetworkListResult {
17614	return page.vnlr
17615}
17616
17617// Values returns the slice of values for the current page or nil if there are no values.
17618func (page VirtualNetworkListResultPage) Values() []VirtualNetwork {
17619	if page.vnlr.IsEmpty() {
17620		return nil
17621	}
17622	return *page.vnlr.Value
17623}
17624
17625// Creates a new instance of the VirtualNetworkListResultPage type.
17626func NewVirtualNetworkListResultPage(cur VirtualNetworkListResult, getNextPage func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)) VirtualNetworkListResultPage {
17627	return VirtualNetworkListResultPage{
17628		fn:   getNextPage,
17629		vnlr: cur,
17630	}
17631}
17632
17633// VirtualNetworkListUsageResult response for the virtual networks GetUsage API service call.
17634type VirtualNetworkListUsageResult struct {
17635	autorest.Response `json:"-"`
17636	// Value - READ-ONLY; VirtualNetwork usage stats.
17637	Value *[]VirtualNetworkUsage `json:"value,omitempty"`
17638	// NextLink - The URL to get the next set of results.
17639	NextLink *string `json:"nextLink,omitempty"`
17640}
17641
17642// MarshalJSON is the custom marshaler for VirtualNetworkListUsageResult.
17643func (vnlur VirtualNetworkListUsageResult) MarshalJSON() ([]byte, error) {
17644	objectMap := make(map[string]interface{})
17645	if vnlur.NextLink != nil {
17646		objectMap["nextLink"] = vnlur.NextLink
17647	}
17648	return json.Marshal(objectMap)
17649}
17650
17651// VirtualNetworkListUsageResultIterator provides access to a complete listing of VirtualNetworkUsage
17652// values.
17653type VirtualNetworkListUsageResultIterator struct {
17654	i    int
17655	page VirtualNetworkListUsageResultPage
17656}
17657
17658// NextWithContext advances to the next value.  If there was an error making
17659// the request the iterator does not advance and the error is returned.
17660func (iter *VirtualNetworkListUsageResultIterator) NextWithContext(ctx context.Context) (err error) {
17661	if tracing.IsEnabled() {
17662		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultIterator.NextWithContext")
17663		defer func() {
17664			sc := -1
17665			if iter.Response().Response.Response != nil {
17666				sc = iter.Response().Response.Response.StatusCode
17667			}
17668			tracing.EndSpan(ctx, sc, err)
17669		}()
17670	}
17671	iter.i++
17672	if iter.i < len(iter.page.Values()) {
17673		return nil
17674	}
17675	err = iter.page.NextWithContext(ctx)
17676	if err != nil {
17677		iter.i--
17678		return err
17679	}
17680	iter.i = 0
17681	return nil
17682}
17683
17684// Next advances to the next value.  If there was an error making
17685// the request the iterator does not advance and the error is returned.
17686// Deprecated: Use NextWithContext() instead.
17687func (iter *VirtualNetworkListUsageResultIterator) Next() error {
17688	return iter.NextWithContext(context.Background())
17689}
17690
17691// NotDone returns true if the enumeration should be started or is not yet complete.
17692func (iter VirtualNetworkListUsageResultIterator) NotDone() bool {
17693	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17694}
17695
17696// Response returns the raw server response from the last page request.
17697func (iter VirtualNetworkListUsageResultIterator) Response() VirtualNetworkListUsageResult {
17698	return iter.page.Response()
17699}
17700
17701// Value returns the current value or a zero-initialized value if the
17702// iterator has advanced beyond the end of the collection.
17703func (iter VirtualNetworkListUsageResultIterator) Value() VirtualNetworkUsage {
17704	if !iter.page.NotDone() {
17705		return VirtualNetworkUsage{}
17706	}
17707	return iter.page.Values()[iter.i]
17708}
17709
17710// Creates a new instance of the VirtualNetworkListUsageResultIterator type.
17711func NewVirtualNetworkListUsageResultIterator(page VirtualNetworkListUsageResultPage) VirtualNetworkListUsageResultIterator {
17712	return VirtualNetworkListUsageResultIterator{page: page}
17713}
17714
17715// IsEmpty returns true if the ListResult contains no values.
17716func (vnlur VirtualNetworkListUsageResult) IsEmpty() bool {
17717	return vnlur.Value == nil || len(*vnlur.Value) == 0
17718}
17719
17720// hasNextLink returns true if the NextLink is not empty.
17721func (vnlur VirtualNetworkListUsageResult) hasNextLink() bool {
17722	return vnlur.NextLink != nil && len(*vnlur.NextLink) != 0
17723}
17724
17725// virtualNetworkListUsageResultPreparer prepares a request to retrieve the next set of results.
17726// It returns nil if no more results exist.
17727func (vnlur VirtualNetworkListUsageResult) virtualNetworkListUsageResultPreparer(ctx context.Context) (*http.Request, error) {
17728	if !vnlur.hasNextLink() {
17729		return nil, nil
17730	}
17731	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17732		autorest.AsJSON(),
17733		autorest.AsGet(),
17734		autorest.WithBaseURL(to.String(vnlur.NextLink)))
17735}
17736
17737// VirtualNetworkListUsageResultPage contains a page of VirtualNetworkUsage values.
17738type VirtualNetworkListUsageResultPage struct {
17739	fn    func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)
17740	vnlur VirtualNetworkListUsageResult
17741}
17742
17743// NextWithContext advances to the next page of values.  If there was an error making
17744// the request the page does not advance and the error is returned.
17745func (page *VirtualNetworkListUsageResultPage) NextWithContext(ctx context.Context) (err error) {
17746	if tracing.IsEnabled() {
17747		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultPage.NextWithContext")
17748		defer func() {
17749			sc := -1
17750			if page.Response().Response.Response != nil {
17751				sc = page.Response().Response.Response.StatusCode
17752			}
17753			tracing.EndSpan(ctx, sc, err)
17754		}()
17755	}
17756	for {
17757		next, err := page.fn(ctx, page.vnlur)
17758		if err != nil {
17759			return err
17760		}
17761		page.vnlur = next
17762		if !next.hasNextLink() || !next.IsEmpty() {
17763			break
17764		}
17765	}
17766	return nil
17767}
17768
17769// Next advances to the next page of values.  If there was an error making
17770// the request the page does not advance and the error is returned.
17771// Deprecated: Use NextWithContext() instead.
17772func (page *VirtualNetworkListUsageResultPage) Next() error {
17773	return page.NextWithContext(context.Background())
17774}
17775
17776// NotDone returns true if the page enumeration should be started or is not yet complete.
17777func (page VirtualNetworkListUsageResultPage) NotDone() bool {
17778	return !page.vnlur.IsEmpty()
17779}
17780
17781// Response returns the raw server response from the last page request.
17782func (page VirtualNetworkListUsageResultPage) Response() VirtualNetworkListUsageResult {
17783	return page.vnlur
17784}
17785
17786// Values returns the slice of values for the current page or nil if there are no values.
17787func (page VirtualNetworkListUsageResultPage) Values() []VirtualNetworkUsage {
17788	if page.vnlur.IsEmpty() {
17789		return nil
17790	}
17791	return *page.vnlur.Value
17792}
17793
17794// Creates a new instance of the VirtualNetworkListUsageResultPage type.
17795func NewVirtualNetworkListUsageResultPage(cur VirtualNetworkListUsageResult, getNextPage func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)) VirtualNetworkListUsageResultPage {
17796	return VirtualNetworkListUsageResultPage{
17797		fn:    getNextPage,
17798		vnlur: cur,
17799	}
17800}
17801
17802// VirtualNetworkPeering peerings in a virtual network resource.
17803type VirtualNetworkPeering struct {
17804	autorest.Response `json:"-"`
17805	// VirtualNetworkPeeringPropertiesFormat - Properties of the virtual network peering.
17806	*VirtualNetworkPeeringPropertiesFormat `json:"properties,omitempty"`
17807	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
17808	Name *string `json:"name,omitempty"`
17809	// Etag - A unique read-only string that changes whenever the resource is updated.
17810	Etag *string `json:"etag,omitempty"`
17811	// ID - Resource ID.
17812	ID *string `json:"id,omitempty"`
17813}
17814
17815// MarshalJSON is the custom marshaler for VirtualNetworkPeering.
17816func (vnp VirtualNetworkPeering) MarshalJSON() ([]byte, error) {
17817	objectMap := make(map[string]interface{})
17818	if vnp.VirtualNetworkPeeringPropertiesFormat != nil {
17819		objectMap["properties"] = vnp.VirtualNetworkPeeringPropertiesFormat
17820	}
17821	if vnp.Name != nil {
17822		objectMap["name"] = vnp.Name
17823	}
17824	if vnp.Etag != nil {
17825		objectMap["etag"] = vnp.Etag
17826	}
17827	if vnp.ID != nil {
17828		objectMap["id"] = vnp.ID
17829	}
17830	return json.Marshal(objectMap)
17831}
17832
17833// UnmarshalJSON is the custom unmarshaler for VirtualNetworkPeering struct.
17834func (vnp *VirtualNetworkPeering) UnmarshalJSON(body []byte) error {
17835	var m map[string]*json.RawMessage
17836	err := json.Unmarshal(body, &m)
17837	if err != nil {
17838		return err
17839	}
17840	for k, v := range m {
17841		switch k {
17842		case "properties":
17843			if v != nil {
17844				var virtualNetworkPeeringPropertiesFormat VirtualNetworkPeeringPropertiesFormat
17845				err = json.Unmarshal(*v, &virtualNetworkPeeringPropertiesFormat)
17846				if err != nil {
17847					return err
17848				}
17849				vnp.VirtualNetworkPeeringPropertiesFormat = &virtualNetworkPeeringPropertiesFormat
17850			}
17851		case "name":
17852			if v != nil {
17853				var name string
17854				err = json.Unmarshal(*v, &name)
17855				if err != nil {
17856					return err
17857				}
17858				vnp.Name = &name
17859			}
17860		case "etag":
17861			if v != nil {
17862				var etag string
17863				err = json.Unmarshal(*v, &etag)
17864				if err != nil {
17865					return err
17866				}
17867				vnp.Etag = &etag
17868			}
17869		case "id":
17870			if v != nil {
17871				var ID string
17872				err = json.Unmarshal(*v, &ID)
17873				if err != nil {
17874					return err
17875				}
17876				vnp.ID = &ID
17877			}
17878		}
17879	}
17880
17881	return nil
17882}
17883
17884// VirtualNetworkPeeringListResult response for ListSubnets API service call. Retrieves all subnets that
17885// belong to a virtual network.
17886type VirtualNetworkPeeringListResult struct {
17887	autorest.Response `json:"-"`
17888	// Value - The peerings in a virtual network.
17889	Value *[]VirtualNetworkPeering `json:"value,omitempty"`
17890	// NextLink - The URL to get the next set of results.
17891	NextLink *string `json:"nextLink,omitempty"`
17892}
17893
17894// VirtualNetworkPeeringListResultIterator provides access to a complete listing of VirtualNetworkPeering
17895// values.
17896type VirtualNetworkPeeringListResultIterator struct {
17897	i    int
17898	page VirtualNetworkPeeringListResultPage
17899}
17900
17901// NextWithContext advances to the next value.  If there was an error making
17902// the request the iterator does not advance and the error is returned.
17903func (iter *VirtualNetworkPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
17904	if tracing.IsEnabled() {
17905		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultIterator.NextWithContext")
17906		defer func() {
17907			sc := -1
17908			if iter.Response().Response.Response != nil {
17909				sc = iter.Response().Response.Response.StatusCode
17910			}
17911			tracing.EndSpan(ctx, sc, err)
17912		}()
17913	}
17914	iter.i++
17915	if iter.i < len(iter.page.Values()) {
17916		return nil
17917	}
17918	err = iter.page.NextWithContext(ctx)
17919	if err != nil {
17920		iter.i--
17921		return err
17922	}
17923	iter.i = 0
17924	return nil
17925}
17926
17927// Next advances to the next value.  If there was an error making
17928// the request the iterator does not advance and the error is returned.
17929// Deprecated: Use NextWithContext() instead.
17930func (iter *VirtualNetworkPeeringListResultIterator) Next() error {
17931	return iter.NextWithContext(context.Background())
17932}
17933
17934// NotDone returns true if the enumeration should be started or is not yet complete.
17935func (iter VirtualNetworkPeeringListResultIterator) NotDone() bool {
17936	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17937}
17938
17939// Response returns the raw server response from the last page request.
17940func (iter VirtualNetworkPeeringListResultIterator) Response() VirtualNetworkPeeringListResult {
17941	return iter.page.Response()
17942}
17943
17944// Value returns the current value or a zero-initialized value if the
17945// iterator has advanced beyond the end of the collection.
17946func (iter VirtualNetworkPeeringListResultIterator) Value() VirtualNetworkPeering {
17947	if !iter.page.NotDone() {
17948		return VirtualNetworkPeering{}
17949	}
17950	return iter.page.Values()[iter.i]
17951}
17952
17953// Creates a new instance of the VirtualNetworkPeeringListResultIterator type.
17954func NewVirtualNetworkPeeringListResultIterator(page VirtualNetworkPeeringListResultPage) VirtualNetworkPeeringListResultIterator {
17955	return VirtualNetworkPeeringListResultIterator{page: page}
17956}
17957
17958// IsEmpty returns true if the ListResult contains no values.
17959func (vnplr VirtualNetworkPeeringListResult) IsEmpty() bool {
17960	return vnplr.Value == nil || len(*vnplr.Value) == 0
17961}
17962
17963// hasNextLink returns true if the NextLink is not empty.
17964func (vnplr VirtualNetworkPeeringListResult) hasNextLink() bool {
17965	return vnplr.NextLink != nil && len(*vnplr.NextLink) != 0
17966}
17967
17968// virtualNetworkPeeringListResultPreparer prepares a request to retrieve the next set of results.
17969// It returns nil if no more results exist.
17970func (vnplr VirtualNetworkPeeringListResult) virtualNetworkPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
17971	if !vnplr.hasNextLink() {
17972		return nil, nil
17973	}
17974	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17975		autorest.AsJSON(),
17976		autorest.AsGet(),
17977		autorest.WithBaseURL(to.String(vnplr.NextLink)))
17978}
17979
17980// VirtualNetworkPeeringListResultPage contains a page of VirtualNetworkPeering values.
17981type VirtualNetworkPeeringListResultPage struct {
17982	fn    func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)
17983	vnplr VirtualNetworkPeeringListResult
17984}
17985
17986// NextWithContext advances to the next page of values.  If there was an error making
17987// the request the page does not advance and the error is returned.
17988func (page *VirtualNetworkPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
17989	if tracing.IsEnabled() {
17990		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultPage.NextWithContext")
17991		defer func() {
17992			sc := -1
17993			if page.Response().Response.Response != nil {
17994				sc = page.Response().Response.Response.StatusCode
17995			}
17996			tracing.EndSpan(ctx, sc, err)
17997		}()
17998	}
17999	for {
18000		next, err := page.fn(ctx, page.vnplr)
18001		if err != nil {
18002			return err
18003		}
18004		page.vnplr = next
18005		if !next.hasNextLink() || !next.IsEmpty() {
18006			break
18007		}
18008	}
18009	return nil
18010}
18011
18012// Next advances to the next page of values.  If there was an error making
18013// the request the page does not advance and the error is returned.
18014// Deprecated: Use NextWithContext() instead.
18015func (page *VirtualNetworkPeeringListResultPage) Next() error {
18016	return page.NextWithContext(context.Background())
18017}
18018
18019// NotDone returns true if the page enumeration should be started or is not yet complete.
18020func (page VirtualNetworkPeeringListResultPage) NotDone() bool {
18021	return !page.vnplr.IsEmpty()
18022}
18023
18024// Response returns the raw server response from the last page request.
18025func (page VirtualNetworkPeeringListResultPage) Response() VirtualNetworkPeeringListResult {
18026	return page.vnplr
18027}
18028
18029// Values returns the slice of values for the current page or nil if there are no values.
18030func (page VirtualNetworkPeeringListResultPage) Values() []VirtualNetworkPeering {
18031	if page.vnplr.IsEmpty() {
18032		return nil
18033	}
18034	return *page.vnplr.Value
18035}
18036
18037// Creates a new instance of the VirtualNetworkPeeringListResultPage type.
18038func NewVirtualNetworkPeeringListResultPage(cur VirtualNetworkPeeringListResult, getNextPage func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)) VirtualNetworkPeeringListResultPage {
18039	return VirtualNetworkPeeringListResultPage{
18040		fn:    getNextPage,
18041		vnplr: cur,
18042	}
18043}
18044
18045// VirtualNetworkPeeringPropertiesFormat properties of the virtual network peering.
18046type VirtualNetworkPeeringPropertiesFormat struct {
18047	// AllowVirtualNetworkAccess - Whether the VMs in the linked virtual network space would be able to access all the VMs in local Virtual network space.
18048	AllowVirtualNetworkAccess *bool `json:"allowVirtualNetworkAccess,omitempty"`
18049	// AllowForwardedTraffic - Whether the forwarded traffic from the VMs in the remote virtual network will be allowed/disallowed.
18050	AllowForwardedTraffic *bool `json:"allowForwardedTraffic,omitempty"`
18051	// AllowGatewayTransit - If gateway links can be used in remote virtual networking to link to this virtual network.
18052	AllowGatewayTransit *bool `json:"allowGatewayTransit,omitempty"`
18053	// 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.
18054	UseRemoteGateways *bool `json:"useRemoteGateways,omitempty"`
18055	// 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).
18056	RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"`
18057	// RemoteAddressSpace - The reference of the remote virtual network address space.
18058	RemoteAddressSpace *AddressSpace `json:"remoteAddressSpace,omitempty"`
18059	// PeeringState - The status of the virtual network peering. Possible values are 'Initiated', 'Connected', and 'Disconnected'. Possible values include: 'VirtualNetworkPeeringStateInitiated', 'VirtualNetworkPeeringStateConnected', 'VirtualNetworkPeeringStateDisconnected'
18060	PeeringState VirtualNetworkPeeringState `json:"peeringState,omitempty"`
18061	// ProvisioningState - The provisioning state of the resource.
18062	ProvisioningState *string `json:"provisioningState,omitempty"`
18063}
18064
18065// VirtualNetworkPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
18066// long-running operation.
18067type VirtualNetworkPeeringsCreateOrUpdateFuture struct {
18068	azure.FutureAPI
18069	// Result returns the result of the asynchronous operation.
18070	// If the operation has not completed it will return an error.
18071	Result func(VirtualNetworkPeeringsClient) (VirtualNetworkPeering, error)
18072}
18073
18074// VirtualNetworkPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
18075// long-running operation.
18076type VirtualNetworkPeeringsDeleteFuture struct {
18077	azure.FutureAPI
18078	// Result returns the result of the asynchronous operation.
18079	// If the operation has not completed it will return an error.
18080	Result func(VirtualNetworkPeeringsClient) (autorest.Response, error)
18081}
18082
18083// VirtualNetworkPropertiesFormat properties of the virtual network.
18084type VirtualNetworkPropertiesFormat struct {
18085	// AddressSpace - The AddressSpace that contains an array of IP address ranges that can be used by subnets.
18086	AddressSpace *AddressSpace `json:"addressSpace,omitempty"`
18087	// DhcpOptions - The dhcpOptions that contains an array of DNS servers available to VMs deployed in the virtual network.
18088	DhcpOptions *DhcpOptions `json:"dhcpOptions,omitempty"`
18089	// Subnets - A list of subnets in a Virtual Network.
18090	Subnets *[]Subnet `json:"subnets,omitempty"`
18091	// VirtualNetworkPeerings - A list of peerings in a Virtual Network.
18092	VirtualNetworkPeerings *[]VirtualNetworkPeering `json:"virtualNetworkPeerings,omitempty"`
18093	// ResourceGUID - The resourceGuid property of the Virtual Network resource.
18094	ResourceGUID *string `json:"resourceGuid,omitempty"`
18095	// ProvisioningState - The provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
18096	ProvisioningState *string `json:"provisioningState,omitempty"`
18097	// 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.
18098	EnableDdosProtection *bool `json:"enableDdosProtection,omitempty"`
18099	// EnableVMProtection - Indicates if VM protection is enabled for all the subnets in the virtual network.
18100	EnableVMProtection *bool `json:"enableVmProtection,omitempty"`
18101	// DdosProtectionPlan - The DDoS protection plan associated with the virtual network.
18102	DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"`
18103}
18104
18105// VirtualNetworksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
18106// long-running operation.
18107type VirtualNetworksCreateOrUpdateFuture struct {
18108	azure.FutureAPI
18109	// Result returns the result of the asynchronous operation.
18110	// If the operation has not completed it will return an error.
18111	Result func(VirtualNetworksClient) (VirtualNetwork, error)
18112}
18113
18114// VirtualNetworksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
18115// operation.
18116type VirtualNetworksDeleteFuture struct {
18117	azure.FutureAPI
18118	// Result returns the result of the asynchronous operation.
18119	// If the operation has not completed it will return an error.
18120	Result func(VirtualNetworksClient) (autorest.Response, error)
18121}
18122
18123// VirtualNetworksUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
18124// long-running operation.
18125type VirtualNetworksUpdateTagsFuture struct {
18126	azure.FutureAPI
18127	// Result returns the result of the asynchronous operation.
18128	// If the operation has not completed it will return an error.
18129	Result func(VirtualNetworksClient) (VirtualNetwork, error)
18130}
18131
18132// VirtualNetworkUsage usage details for subnet.
18133type VirtualNetworkUsage struct {
18134	// CurrentValue - READ-ONLY; Indicates number of IPs used from the Subnet.
18135	CurrentValue *float64 `json:"currentValue,omitempty"`
18136	// ID - READ-ONLY; Subnet identifier.
18137	ID *string `json:"id,omitempty"`
18138	// Limit - READ-ONLY; Indicates the size of the subnet.
18139	Limit *float64 `json:"limit,omitempty"`
18140	// Name - READ-ONLY; The name containing common and localized value for usage.
18141	Name *VirtualNetworkUsageName `json:"name,omitempty"`
18142	// Unit - READ-ONLY; Usage units. Returns 'Count'
18143	Unit *string `json:"unit,omitempty"`
18144}
18145
18146// VirtualNetworkUsageName usage strings container.
18147type VirtualNetworkUsageName struct {
18148	// LocalizedValue - READ-ONLY; Localized subnet size and usage string.
18149	LocalizedValue *string `json:"localizedValue,omitempty"`
18150	// Value - READ-ONLY; Subnet size and usage string.
18151	Value *string `json:"value,omitempty"`
18152}
18153
18154// VirtualWAN virtualWAN Resource.
18155type VirtualWAN struct {
18156	autorest.Response     `json:"-"`
18157	*VirtualWanProperties `json:"properties,omitempty"`
18158	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
18159	Etag *string `json:"etag,omitempty"`
18160	// ID - Resource ID.
18161	ID *string `json:"id,omitempty"`
18162	// Name - READ-ONLY; Resource name.
18163	Name *string `json:"name,omitempty"`
18164	// Type - READ-ONLY; Resource type.
18165	Type *string `json:"type,omitempty"`
18166	// Location - Resource location.
18167	Location *string `json:"location,omitempty"`
18168	// Tags - Resource tags.
18169	Tags map[string]*string `json:"tags"`
18170}
18171
18172// MarshalJSON is the custom marshaler for VirtualWAN.
18173func (vw VirtualWAN) MarshalJSON() ([]byte, error) {
18174	objectMap := make(map[string]interface{})
18175	if vw.VirtualWanProperties != nil {
18176		objectMap["properties"] = vw.VirtualWanProperties
18177	}
18178	if vw.ID != nil {
18179		objectMap["id"] = vw.ID
18180	}
18181	if vw.Location != nil {
18182		objectMap["location"] = vw.Location
18183	}
18184	if vw.Tags != nil {
18185		objectMap["tags"] = vw.Tags
18186	}
18187	return json.Marshal(objectMap)
18188}
18189
18190// UnmarshalJSON is the custom unmarshaler for VirtualWAN struct.
18191func (vw *VirtualWAN) UnmarshalJSON(body []byte) error {
18192	var m map[string]*json.RawMessage
18193	err := json.Unmarshal(body, &m)
18194	if err != nil {
18195		return err
18196	}
18197	for k, v := range m {
18198		switch k {
18199		case "properties":
18200			if v != nil {
18201				var virtualWanProperties VirtualWanProperties
18202				err = json.Unmarshal(*v, &virtualWanProperties)
18203				if err != nil {
18204					return err
18205				}
18206				vw.VirtualWanProperties = &virtualWanProperties
18207			}
18208		case "etag":
18209			if v != nil {
18210				var etag string
18211				err = json.Unmarshal(*v, &etag)
18212				if err != nil {
18213					return err
18214				}
18215				vw.Etag = &etag
18216			}
18217		case "id":
18218			if v != nil {
18219				var ID string
18220				err = json.Unmarshal(*v, &ID)
18221				if err != nil {
18222					return err
18223				}
18224				vw.ID = &ID
18225			}
18226		case "name":
18227			if v != nil {
18228				var name string
18229				err = json.Unmarshal(*v, &name)
18230				if err != nil {
18231					return err
18232				}
18233				vw.Name = &name
18234			}
18235		case "type":
18236			if v != nil {
18237				var typeVar string
18238				err = json.Unmarshal(*v, &typeVar)
18239				if err != nil {
18240					return err
18241				}
18242				vw.Type = &typeVar
18243			}
18244		case "location":
18245			if v != nil {
18246				var location string
18247				err = json.Unmarshal(*v, &location)
18248				if err != nil {
18249					return err
18250				}
18251				vw.Location = &location
18252			}
18253		case "tags":
18254			if v != nil {
18255				var tags map[string]*string
18256				err = json.Unmarshal(*v, &tags)
18257				if err != nil {
18258					return err
18259				}
18260				vw.Tags = tags
18261			}
18262		}
18263	}
18264
18265	return nil
18266}
18267
18268// VirtualWanProperties parameters for VirtualWAN
18269type VirtualWanProperties struct {
18270	// DisableVpnEncryption - Vpn encryption to be disabled or not.
18271	DisableVpnEncryption *bool `json:"disableVpnEncryption,omitempty"`
18272	// VirtualHubs - READ-ONLY; List of VirtualHubs in the VirtualWAN.
18273	VirtualHubs *[]SubResource `json:"virtualHubs,omitempty"`
18274	// VpnSites - READ-ONLY
18275	VpnSites *[]SubResource `json:"vpnSites,omitempty"`
18276	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
18277	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
18278}
18279
18280// MarshalJSON is the custom marshaler for VirtualWanProperties.
18281func (vwp VirtualWanProperties) MarshalJSON() ([]byte, error) {
18282	objectMap := make(map[string]interface{})
18283	if vwp.DisableVpnEncryption != nil {
18284		objectMap["disableVpnEncryption"] = vwp.DisableVpnEncryption
18285	}
18286	if vwp.ProvisioningState != "" {
18287		objectMap["provisioningState"] = vwp.ProvisioningState
18288	}
18289	return json.Marshal(objectMap)
18290}
18291
18292// VirtualWANsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
18293// long-running operation.
18294type VirtualWANsCreateOrUpdateFuture struct {
18295	azure.FutureAPI
18296	// Result returns the result of the asynchronous operation.
18297	// If the operation has not completed it will return an error.
18298	Result func(VirtualWANsClient) (VirtualWAN, error)
18299}
18300
18301// VirtualWANsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
18302// operation.
18303type VirtualWANsDeleteFuture struct {
18304	azure.FutureAPI
18305	// Result returns the result of the asynchronous operation.
18306	// If the operation has not completed it will return an error.
18307	Result func(VirtualWANsClient) (autorest.Response, error)
18308}
18309
18310// VirtualWANsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
18311// operation.
18312type VirtualWANsUpdateTagsFuture struct {
18313	azure.FutureAPI
18314	// Result returns the result of the asynchronous operation.
18315	// If the operation has not completed it will return an error.
18316	Result func(VirtualWANsClient) (VirtualWAN, error)
18317}
18318
18319// VpnClientConfiguration vpnClientConfiguration for P2S client.
18320type VpnClientConfiguration struct {
18321	// VpnClientAddressPool - The reference of the address space resource which represents Address space for P2S VpnClient.
18322	VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"`
18323	// VpnClientRootCertificates - VpnClientRootCertificate for virtual network gateway.
18324	VpnClientRootCertificates *[]VpnClientRootCertificate `json:"vpnClientRootCertificates,omitempty"`
18325	// VpnClientRevokedCertificates - VpnClientRevokedCertificate for Virtual network gateway.
18326	VpnClientRevokedCertificates *[]VpnClientRevokedCertificate `json:"vpnClientRevokedCertificates,omitempty"`
18327	// VpnClientProtocols - VpnClientProtocols for Virtual network gateway.
18328	VpnClientProtocols *[]VpnClientProtocol `json:"vpnClientProtocols,omitempty"`
18329	// VpnClientIpsecPolicies - VpnClientIpsecPolicies for virtual network gateway P2S client.
18330	VpnClientIpsecPolicies *[]IpsecPolicy `json:"vpnClientIpsecPolicies,omitempty"`
18331	// RadiusServerAddress - The radius server address property of the VirtualNetworkGateway resource for vpn client connection.
18332	RadiusServerAddress *string `json:"radiusServerAddress,omitempty"`
18333	// RadiusServerSecret - The radius secret property of the VirtualNetworkGateway resource for vpn client connection.
18334	RadiusServerSecret *string `json:"radiusServerSecret,omitempty"`
18335}
18336
18337// VpnClientIPsecParameters an IPSec parameters for a virtual network gateway P2S connection.
18338type VpnClientIPsecParameters struct {
18339	autorest.Response `json:"-"`
18340	// SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for P2S client.
18341	SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"`
18342	// SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for P2S client..
18343	SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"`
18344	// IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256'
18345	IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"`
18346	// IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256'
18347	IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"`
18348	// IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128'
18349	IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"`
18350	// IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'IkeIntegrityMD5', 'IkeIntegritySHA1', 'IkeIntegritySHA256', 'IkeIntegritySHA384', 'IkeIntegrityGCMAES256', 'IkeIntegrityGCMAES128'
18351	IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"`
18352	// DhGroup - The DH Groups used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24'
18353	DhGroup DhGroup `json:"dhGroup,omitempty"`
18354	// 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'
18355	PfsGroup PfsGroup `json:"pfsGroup,omitempty"`
18356}
18357
18358// VpnClientParameters vpn Client Parameters for package generation
18359type VpnClientParameters struct {
18360	// ProcessorArchitecture - VPN client Processor Architecture. Possible values are: 'AMD64' and 'X86'. Possible values include: 'Amd64', 'X86'
18361	ProcessorArchitecture ProcessorArchitecture `json:"processorArchitecture,omitempty"`
18362	// AuthenticationMethod - VPN client Authentication Method. Possible values are: 'EAPTLS' and 'EAPMSCHAPv2'. Possible values include: 'EAPTLS', 'EAPMSCHAPv2'
18363	AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"`
18364	// 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.
18365	RadiusServerAuthCertificate *string `json:"radiusServerAuthCertificate,omitempty"`
18366	// ClientRootCertificates - A list of client root certificates public certificate data encoded as Base-64 strings. Optional parameter for external radius based authentication with EAPTLS.
18367	ClientRootCertificates *[]string `json:"clientRootCertificates,omitempty"`
18368}
18369
18370// VpnClientRevokedCertificate VPN client revoked certificate of virtual network gateway.
18371type VpnClientRevokedCertificate struct {
18372	// VpnClientRevokedCertificatePropertiesFormat - Properties of the vpn client revoked certificate.
18373	*VpnClientRevokedCertificatePropertiesFormat `json:"properties,omitempty"`
18374	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
18375	Name *string `json:"name,omitempty"`
18376	// Etag - A unique read-only string that changes whenever the resource is updated.
18377	Etag *string `json:"etag,omitempty"`
18378	// ID - Resource ID.
18379	ID *string `json:"id,omitempty"`
18380}
18381
18382// MarshalJSON is the custom marshaler for VpnClientRevokedCertificate.
18383func (vcrc VpnClientRevokedCertificate) MarshalJSON() ([]byte, error) {
18384	objectMap := make(map[string]interface{})
18385	if vcrc.VpnClientRevokedCertificatePropertiesFormat != nil {
18386		objectMap["properties"] = vcrc.VpnClientRevokedCertificatePropertiesFormat
18387	}
18388	if vcrc.Name != nil {
18389		objectMap["name"] = vcrc.Name
18390	}
18391	if vcrc.Etag != nil {
18392		objectMap["etag"] = vcrc.Etag
18393	}
18394	if vcrc.ID != nil {
18395		objectMap["id"] = vcrc.ID
18396	}
18397	return json.Marshal(objectMap)
18398}
18399
18400// UnmarshalJSON is the custom unmarshaler for VpnClientRevokedCertificate struct.
18401func (vcrc *VpnClientRevokedCertificate) UnmarshalJSON(body []byte) error {
18402	var m map[string]*json.RawMessage
18403	err := json.Unmarshal(body, &m)
18404	if err != nil {
18405		return err
18406	}
18407	for k, v := range m {
18408		switch k {
18409		case "properties":
18410			if v != nil {
18411				var vpnClientRevokedCertificatePropertiesFormat VpnClientRevokedCertificatePropertiesFormat
18412				err = json.Unmarshal(*v, &vpnClientRevokedCertificatePropertiesFormat)
18413				if err != nil {
18414					return err
18415				}
18416				vcrc.VpnClientRevokedCertificatePropertiesFormat = &vpnClientRevokedCertificatePropertiesFormat
18417			}
18418		case "name":
18419			if v != nil {
18420				var name string
18421				err = json.Unmarshal(*v, &name)
18422				if err != nil {
18423					return err
18424				}
18425				vcrc.Name = &name
18426			}
18427		case "etag":
18428			if v != nil {
18429				var etag string
18430				err = json.Unmarshal(*v, &etag)
18431				if err != nil {
18432					return err
18433				}
18434				vcrc.Etag = &etag
18435			}
18436		case "id":
18437			if v != nil {
18438				var ID string
18439				err = json.Unmarshal(*v, &ID)
18440				if err != nil {
18441					return err
18442				}
18443				vcrc.ID = &ID
18444			}
18445		}
18446	}
18447
18448	return nil
18449}
18450
18451// VpnClientRevokedCertificatePropertiesFormat properties of the revoked VPN client certificate of virtual
18452// network gateway.
18453type VpnClientRevokedCertificatePropertiesFormat struct {
18454	// Thumbprint - The revoked VPN client certificate thumbprint.
18455	Thumbprint *string `json:"thumbprint,omitempty"`
18456	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client revoked certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
18457	ProvisioningState *string `json:"provisioningState,omitempty"`
18458}
18459
18460// MarshalJSON is the custom marshaler for VpnClientRevokedCertificatePropertiesFormat.
18461func (vcrcpf VpnClientRevokedCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
18462	objectMap := make(map[string]interface{})
18463	if vcrcpf.Thumbprint != nil {
18464		objectMap["thumbprint"] = vcrcpf.Thumbprint
18465	}
18466	return json.Marshal(objectMap)
18467}
18468
18469// VpnClientRootCertificate VPN client root certificate of virtual network gateway
18470type VpnClientRootCertificate struct {
18471	// VpnClientRootCertificatePropertiesFormat - Properties of the vpn client root certificate.
18472	*VpnClientRootCertificatePropertiesFormat `json:"properties,omitempty"`
18473	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
18474	Name *string `json:"name,omitempty"`
18475	// Etag - A unique read-only string that changes whenever the resource is updated.
18476	Etag *string `json:"etag,omitempty"`
18477	// ID - Resource ID.
18478	ID *string `json:"id,omitempty"`
18479}
18480
18481// MarshalJSON is the custom marshaler for VpnClientRootCertificate.
18482func (vcrc VpnClientRootCertificate) MarshalJSON() ([]byte, error) {
18483	objectMap := make(map[string]interface{})
18484	if vcrc.VpnClientRootCertificatePropertiesFormat != nil {
18485		objectMap["properties"] = vcrc.VpnClientRootCertificatePropertiesFormat
18486	}
18487	if vcrc.Name != nil {
18488		objectMap["name"] = vcrc.Name
18489	}
18490	if vcrc.Etag != nil {
18491		objectMap["etag"] = vcrc.Etag
18492	}
18493	if vcrc.ID != nil {
18494		objectMap["id"] = vcrc.ID
18495	}
18496	return json.Marshal(objectMap)
18497}
18498
18499// UnmarshalJSON is the custom unmarshaler for VpnClientRootCertificate struct.
18500func (vcrc *VpnClientRootCertificate) UnmarshalJSON(body []byte) error {
18501	var m map[string]*json.RawMessage
18502	err := json.Unmarshal(body, &m)
18503	if err != nil {
18504		return err
18505	}
18506	for k, v := range m {
18507		switch k {
18508		case "properties":
18509			if v != nil {
18510				var vpnClientRootCertificatePropertiesFormat VpnClientRootCertificatePropertiesFormat
18511				err = json.Unmarshal(*v, &vpnClientRootCertificatePropertiesFormat)
18512				if err != nil {
18513					return err
18514				}
18515				vcrc.VpnClientRootCertificatePropertiesFormat = &vpnClientRootCertificatePropertiesFormat
18516			}
18517		case "name":
18518			if v != nil {
18519				var name string
18520				err = json.Unmarshal(*v, &name)
18521				if err != nil {
18522					return err
18523				}
18524				vcrc.Name = &name
18525			}
18526		case "etag":
18527			if v != nil {
18528				var etag string
18529				err = json.Unmarshal(*v, &etag)
18530				if err != nil {
18531					return err
18532				}
18533				vcrc.Etag = &etag
18534			}
18535		case "id":
18536			if v != nil {
18537				var ID string
18538				err = json.Unmarshal(*v, &ID)
18539				if err != nil {
18540					return err
18541				}
18542				vcrc.ID = &ID
18543			}
18544		}
18545	}
18546
18547	return nil
18548}
18549
18550// VpnClientRootCertificatePropertiesFormat properties of SSL certificates of application gateway
18551type VpnClientRootCertificatePropertiesFormat struct {
18552	// PublicCertData - The certificate public data.
18553	PublicCertData *string `json:"publicCertData,omitempty"`
18554	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
18555	ProvisioningState *string `json:"provisioningState,omitempty"`
18556}
18557
18558// MarshalJSON is the custom marshaler for VpnClientRootCertificatePropertiesFormat.
18559func (vcrcpf VpnClientRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
18560	objectMap := make(map[string]interface{})
18561	if vcrcpf.PublicCertData != nil {
18562		objectMap["publicCertData"] = vcrcpf.PublicCertData
18563	}
18564	return json.Marshal(objectMap)
18565}
18566
18567// VpnConnection vpnConnection Resource.
18568type VpnConnection struct {
18569	autorest.Response        `json:"-"`
18570	*VpnConnectionProperties `json:"properties,omitempty"`
18571	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
18572	Name *string `json:"name,omitempty"`
18573	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
18574	Etag *string `json:"etag,omitempty"`
18575	// ID - Resource ID.
18576	ID *string `json:"id,omitempty"`
18577}
18578
18579// MarshalJSON is the custom marshaler for VpnConnection.
18580func (vc VpnConnection) MarshalJSON() ([]byte, error) {
18581	objectMap := make(map[string]interface{})
18582	if vc.VpnConnectionProperties != nil {
18583		objectMap["properties"] = vc.VpnConnectionProperties
18584	}
18585	if vc.Name != nil {
18586		objectMap["name"] = vc.Name
18587	}
18588	if vc.ID != nil {
18589		objectMap["id"] = vc.ID
18590	}
18591	return json.Marshal(objectMap)
18592}
18593
18594// UnmarshalJSON is the custom unmarshaler for VpnConnection struct.
18595func (vc *VpnConnection) UnmarshalJSON(body []byte) error {
18596	var m map[string]*json.RawMessage
18597	err := json.Unmarshal(body, &m)
18598	if err != nil {
18599		return err
18600	}
18601	for k, v := range m {
18602		switch k {
18603		case "properties":
18604			if v != nil {
18605				var vpnConnectionProperties VpnConnectionProperties
18606				err = json.Unmarshal(*v, &vpnConnectionProperties)
18607				if err != nil {
18608					return err
18609				}
18610				vc.VpnConnectionProperties = &vpnConnectionProperties
18611			}
18612		case "name":
18613			if v != nil {
18614				var name string
18615				err = json.Unmarshal(*v, &name)
18616				if err != nil {
18617					return err
18618				}
18619				vc.Name = &name
18620			}
18621		case "etag":
18622			if v != nil {
18623				var etag string
18624				err = json.Unmarshal(*v, &etag)
18625				if err != nil {
18626					return err
18627				}
18628				vc.Etag = &etag
18629			}
18630		case "id":
18631			if v != nil {
18632				var ID string
18633				err = json.Unmarshal(*v, &ID)
18634				if err != nil {
18635					return err
18636				}
18637				vc.ID = &ID
18638			}
18639		}
18640	}
18641
18642	return nil
18643}
18644
18645// VpnConnectionProperties parameters for VpnConnection
18646type VpnConnectionProperties struct {
18647	// RemoteVpnSite - Id of the connected vpn site.
18648	RemoteVpnSite *SubResource `json:"remoteVpnSite,omitempty"`
18649	// RoutingWeight - routing weight for vpn connection.
18650	RoutingWeight *int32 `json:"routingWeight,omitempty"`
18651	// ConnectionStatus - The connection status. Possible values include: 'VpnConnectionStatusUnknown', 'VpnConnectionStatusConnecting', 'VpnConnectionStatusConnected', 'VpnConnectionStatusNotConnected'
18652	ConnectionStatus VpnConnectionStatus `json:"connectionStatus,omitempty"`
18653	// IngressBytesTransferred - READ-ONLY; Ingress bytes transferred.
18654	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
18655	// EgressBytesTransferred - READ-ONLY; Egress bytes transferred.
18656	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
18657	// ConnectionBandwidthInMbps - READ-ONLY; Expected bandwidth in MBPS.
18658	ConnectionBandwidthInMbps *int32 `json:"connectionBandwidthInMbps,omitempty"`
18659	// SharedKey - SharedKey for the vpn connection.
18660	SharedKey *string `json:"sharedKey,omitempty"`
18661	// EnableBgp - EnableBgp flag
18662	EnableBgp *bool `json:"enableBgp,omitempty"`
18663	// IpsecPolicies - The IPSec Policies to be considered by this connection.
18664	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
18665	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
18666	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
18667}
18668
18669// MarshalJSON is the custom marshaler for VpnConnectionProperties.
18670func (vcp VpnConnectionProperties) MarshalJSON() ([]byte, error) {
18671	objectMap := make(map[string]interface{})
18672	if vcp.RemoteVpnSite != nil {
18673		objectMap["remoteVpnSite"] = vcp.RemoteVpnSite
18674	}
18675	if vcp.RoutingWeight != nil {
18676		objectMap["routingWeight"] = vcp.RoutingWeight
18677	}
18678	if vcp.ConnectionStatus != "" {
18679		objectMap["connectionStatus"] = vcp.ConnectionStatus
18680	}
18681	if vcp.SharedKey != nil {
18682		objectMap["sharedKey"] = vcp.SharedKey
18683	}
18684	if vcp.EnableBgp != nil {
18685		objectMap["enableBgp"] = vcp.EnableBgp
18686	}
18687	if vcp.IpsecPolicies != nil {
18688		objectMap["ipsecPolicies"] = vcp.IpsecPolicies
18689	}
18690	if vcp.ProvisioningState != "" {
18691		objectMap["provisioningState"] = vcp.ProvisioningState
18692	}
18693	return json.Marshal(objectMap)
18694}
18695
18696// VpnConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
18697// long-running operation.
18698type VpnConnectionsCreateOrUpdateFuture struct {
18699	azure.FutureAPI
18700	// Result returns the result of the asynchronous operation.
18701	// If the operation has not completed it will return an error.
18702	Result func(VpnConnectionsClient) (VpnConnection, error)
18703}
18704
18705// VpnConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
18706// operation.
18707type VpnConnectionsDeleteFuture struct {
18708	azure.FutureAPI
18709	// Result returns the result of the asynchronous operation.
18710	// If the operation has not completed it will return an error.
18711	Result func(VpnConnectionsClient) (autorest.Response, error)
18712}
18713
18714// VpnDeviceScriptParameters vpn device configuration script generation parameters
18715type VpnDeviceScriptParameters struct {
18716	// Vendor - The vendor for the vpn device.
18717	Vendor *string `json:"vendor,omitempty"`
18718	// DeviceFamily - The device family for the vpn device.
18719	DeviceFamily *string `json:"deviceFamily,omitempty"`
18720	// FirmwareVersion - The firmware version for the vpn device.
18721	FirmwareVersion *string `json:"firmwareVersion,omitempty"`
18722}
18723
18724// VpnGateway vpnGateway Resource.
18725type VpnGateway struct {
18726	autorest.Response     `json:"-"`
18727	*VpnGatewayProperties `json:"properties,omitempty"`
18728	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
18729	Etag *string `json:"etag,omitempty"`
18730	// ID - Resource ID.
18731	ID *string `json:"id,omitempty"`
18732	// Name - READ-ONLY; Resource name.
18733	Name *string `json:"name,omitempty"`
18734	// Type - READ-ONLY; Resource type.
18735	Type *string `json:"type,omitempty"`
18736	// Location - Resource location.
18737	Location *string `json:"location,omitempty"`
18738	// Tags - Resource tags.
18739	Tags map[string]*string `json:"tags"`
18740}
18741
18742// MarshalJSON is the custom marshaler for VpnGateway.
18743func (vg VpnGateway) MarshalJSON() ([]byte, error) {
18744	objectMap := make(map[string]interface{})
18745	if vg.VpnGatewayProperties != nil {
18746		objectMap["properties"] = vg.VpnGatewayProperties
18747	}
18748	if vg.ID != nil {
18749		objectMap["id"] = vg.ID
18750	}
18751	if vg.Location != nil {
18752		objectMap["location"] = vg.Location
18753	}
18754	if vg.Tags != nil {
18755		objectMap["tags"] = vg.Tags
18756	}
18757	return json.Marshal(objectMap)
18758}
18759
18760// UnmarshalJSON is the custom unmarshaler for VpnGateway struct.
18761func (vg *VpnGateway) UnmarshalJSON(body []byte) error {
18762	var m map[string]*json.RawMessage
18763	err := json.Unmarshal(body, &m)
18764	if err != nil {
18765		return err
18766	}
18767	for k, v := range m {
18768		switch k {
18769		case "properties":
18770			if v != nil {
18771				var vpnGatewayProperties VpnGatewayProperties
18772				err = json.Unmarshal(*v, &vpnGatewayProperties)
18773				if err != nil {
18774					return err
18775				}
18776				vg.VpnGatewayProperties = &vpnGatewayProperties
18777			}
18778		case "etag":
18779			if v != nil {
18780				var etag string
18781				err = json.Unmarshal(*v, &etag)
18782				if err != nil {
18783					return err
18784				}
18785				vg.Etag = &etag
18786			}
18787		case "id":
18788			if v != nil {
18789				var ID string
18790				err = json.Unmarshal(*v, &ID)
18791				if err != nil {
18792					return err
18793				}
18794				vg.ID = &ID
18795			}
18796		case "name":
18797			if v != nil {
18798				var name string
18799				err = json.Unmarshal(*v, &name)
18800				if err != nil {
18801					return err
18802				}
18803				vg.Name = &name
18804			}
18805		case "type":
18806			if v != nil {
18807				var typeVar string
18808				err = json.Unmarshal(*v, &typeVar)
18809				if err != nil {
18810					return err
18811				}
18812				vg.Type = &typeVar
18813			}
18814		case "location":
18815			if v != nil {
18816				var location string
18817				err = json.Unmarshal(*v, &location)
18818				if err != nil {
18819					return err
18820				}
18821				vg.Location = &location
18822			}
18823		case "tags":
18824			if v != nil {
18825				var tags map[string]*string
18826				err = json.Unmarshal(*v, &tags)
18827				if err != nil {
18828					return err
18829				}
18830				vg.Tags = tags
18831			}
18832		}
18833	}
18834
18835	return nil
18836}
18837
18838// VpnGatewayProperties parameters for VpnGateway
18839type VpnGatewayProperties struct {
18840	// VirtualHub - The VirtualHub to which the gateway belongs
18841	VirtualHub *SubResource `json:"virtualHub,omitempty"`
18842	// Connections - list of all vpn connections to the gateway.
18843	Connections *[]VpnConnection `json:"connections,omitempty"`
18844	// BgpSettings - Local network gateway's BGP speaker settings.
18845	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
18846	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
18847	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
18848	// Policies - The policies applied to this vpn gateway.
18849	Policies *Policies `json:"policies,omitempty"`
18850}
18851
18852// VpnGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
18853// long-running operation.
18854type VpnGatewaysCreateOrUpdateFuture struct {
18855	azure.FutureAPI
18856	// Result returns the result of the asynchronous operation.
18857	// If the operation has not completed it will return an error.
18858	Result func(VpnGatewaysClient) (VpnGateway, error)
18859}
18860
18861// VpnGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
18862// operation.
18863type VpnGatewaysDeleteFuture struct {
18864	azure.FutureAPI
18865	// Result returns the result of the asynchronous operation.
18866	// If the operation has not completed it will return an error.
18867	Result func(VpnGatewaysClient) (autorest.Response, error)
18868}
18869
18870// VpnGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
18871// operation.
18872type VpnGatewaysUpdateTagsFuture struct {
18873	azure.FutureAPI
18874	// Result returns the result of the asynchronous operation.
18875	// If the operation has not completed it will return an error.
18876	Result func(VpnGatewaysClient) (VpnGateway, error)
18877}
18878
18879// VpnSite vpnSite Resource.
18880type VpnSite struct {
18881	autorest.Response  `json:"-"`
18882	*VpnSiteProperties `json:"properties,omitempty"`
18883	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
18884	Etag *string `json:"etag,omitempty"`
18885	// ID - Resource ID.
18886	ID *string `json:"id,omitempty"`
18887	// Name - READ-ONLY; Resource name.
18888	Name *string `json:"name,omitempty"`
18889	// Type - READ-ONLY; Resource type.
18890	Type *string `json:"type,omitempty"`
18891	// Location - Resource location.
18892	Location *string `json:"location,omitempty"`
18893	// Tags - Resource tags.
18894	Tags map[string]*string `json:"tags"`
18895}
18896
18897// MarshalJSON is the custom marshaler for VpnSite.
18898func (vs VpnSite) MarshalJSON() ([]byte, error) {
18899	objectMap := make(map[string]interface{})
18900	if vs.VpnSiteProperties != nil {
18901		objectMap["properties"] = vs.VpnSiteProperties
18902	}
18903	if vs.ID != nil {
18904		objectMap["id"] = vs.ID
18905	}
18906	if vs.Location != nil {
18907		objectMap["location"] = vs.Location
18908	}
18909	if vs.Tags != nil {
18910		objectMap["tags"] = vs.Tags
18911	}
18912	return json.Marshal(objectMap)
18913}
18914
18915// UnmarshalJSON is the custom unmarshaler for VpnSite struct.
18916func (vs *VpnSite) UnmarshalJSON(body []byte) error {
18917	var m map[string]*json.RawMessage
18918	err := json.Unmarshal(body, &m)
18919	if err != nil {
18920		return err
18921	}
18922	for k, v := range m {
18923		switch k {
18924		case "properties":
18925			if v != nil {
18926				var vpnSiteProperties VpnSiteProperties
18927				err = json.Unmarshal(*v, &vpnSiteProperties)
18928				if err != nil {
18929					return err
18930				}
18931				vs.VpnSiteProperties = &vpnSiteProperties
18932			}
18933		case "etag":
18934			if v != nil {
18935				var etag string
18936				err = json.Unmarshal(*v, &etag)
18937				if err != nil {
18938					return err
18939				}
18940				vs.Etag = &etag
18941			}
18942		case "id":
18943			if v != nil {
18944				var ID string
18945				err = json.Unmarshal(*v, &ID)
18946				if err != nil {
18947					return err
18948				}
18949				vs.ID = &ID
18950			}
18951		case "name":
18952			if v != nil {
18953				var name string
18954				err = json.Unmarshal(*v, &name)
18955				if err != nil {
18956					return err
18957				}
18958				vs.Name = &name
18959			}
18960		case "type":
18961			if v != nil {
18962				var typeVar string
18963				err = json.Unmarshal(*v, &typeVar)
18964				if err != nil {
18965					return err
18966				}
18967				vs.Type = &typeVar
18968			}
18969		case "location":
18970			if v != nil {
18971				var location string
18972				err = json.Unmarshal(*v, &location)
18973				if err != nil {
18974					return err
18975				}
18976				vs.Location = &location
18977			}
18978		case "tags":
18979			if v != nil {
18980				var tags map[string]*string
18981				err = json.Unmarshal(*v, &tags)
18982				if err != nil {
18983					return err
18984				}
18985				vs.Tags = tags
18986			}
18987		}
18988	}
18989
18990	return nil
18991}
18992
18993// VpnSiteID vpnSite Resource.
18994type VpnSiteID struct {
18995	// VpnSite - READ-ONLY; The resource-uri of the vpn-site for which config is to be fetched.
18996	VpnSite *string `json:"vpnSite,omitempty"`
18997}
18998
18999// VpnSiteProperties parameters for VpnSite
19000type VpnSiteProperties struct {
19001	// VirtualWAN - The VirtualWAN to which the vpnSite belongs
19002	VirtualWAN *SubResource `json:"virtualWAN,omitempty"`
19003	// DeviceProperties - The device properties
19004	DeviceProperties *DeviceProperties `json:"deviceProperties,omitempty"`
19005	// IPAddress - The ip-address for the vpn-site.
19006	IPAddress *string `json:"ipAddress,omitempty"`
19007	// SiteKey - The key for vpn-site that can be used for connections.
19008	SiteKey *string `json:"siteKey,omitempty"`
19009	// AddressSpace - The AddressSpace that contains an array of IP address ranges.
19010	AddressSpace *AddressSpace `json:"addressSpace,omitempty"`
19011	// BgpProperties - The set of bgp properties.
19012	BgpProperties *BgpSettings `json:"bgpProperties,omitempty"`
19013	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
19014	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
19015}
19016
19017// VpnSitesConfigurationDownloadFuture an abstraction for monitoring and retrieving the results of a
19018// long-running operation.
19019type VpnSitesConfigurationDownloadFuture struct {
19020	azure.FutureAPI
19021	// Result returns the result of the asynchronous operation.
19022	// If the operation has not completed it will return an error.
19023	Result func(VpnSitesConfigurationClient) (autorest.Response, error)
19024}
19025
19026// VpnSitesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
19027// operation.
19028type VpnSitesCreateOrUpdateFuture struct {
19029	azure.FutureAPI
19030	// Result returns the result of the asynchronous operation.
19031	// If the operation has not completed it will return an error.
19032	Result func(VpnSitesClient) (VpnSite, error)
19033}
19034
19035// VpnSitesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
19036// operation.
19037type VpnSitesDeleteFuture struct {
19038	azure.FutureAPI
19039	// Result returns the result of the asynchronous operation.
19040	// If the operation has not completed it will return an error.
19041	Result func(VpnSitesClient) (autorest.Response, error)
19042}
19043
19044// VpnSitesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
19045// operation.
19046type VpnSitesUpdateTagsFuture struct {
19047	azure.FutureAPI
19048	// Result returns the result of the asynchronous operation.
19049	// If the operation has not completed it will return an error.
19050	Result func(VpnSitesClient) (VpnSite, error)
19051}
19052
19053// Watcher network watcher in a resource group.
19054type Watcher struct {
19055	autorest.Response `json:"-"`
19056	// Etag - A unique read-only string that changes whenever the resource is updated.
19057	Etag                     *string `json:"etag,omitempty"`
19058	*WatcherPropertiesFormat `json:"properties,omitempty"`
19059	// ID - Resource ID.
19060	ID *string `json:"id,omitempty"`
19061	// Name - READ-ONLY; Resource name.
19062	Name *string `json:"name,omitempty"`
19063	// Type - READ-ONLY; Resource type.
19064	Type *string `json:"type,omitempty"`
19065	// Location - Resource location.
19066	Location *string `json:"location,omitempty"`
19067	// Tags - Resource tags.
19068	Tags map[string]*string `json:"tags"`
19069}
19070
19071// MarshalJSON is the custom marshaler for Watcher.
19072func (w Watcher) MarshalJSON() ([]byte, error) {
19073	objectMap := make(map[string]interface{})
19074	if w.Etag != nil {
19075		objectMap["etag"] = w.Etag
19076	}
19077	if w.WatcherPropertiesFormat != nil {
19078		objectMap["properties"] = w.WatcherPropertiesFormat
19079	}
19080	if w.ID != nil {
19081		objectMap["id"] = w.ID
19082	}
19083	if w.Location != nil {
19084		objectMap["location"] = w.Location
19085	}
19086	if w.Tags != nil {
19087		objectMap["tags"] = w.Tags
19088	}
19089	return json.Marshal(objectMap)
19090}
19091
19092// UnmarshalJSON is the custom unmarshaler for Watcher struct.
19093func (w *Watcher) UnmarshalJSON(body []byte) error {
19094	var m map[string]*json.RawMessage
19095	err := json.Unmarshal(body, &m)
19096	if err != nil {
19097		return err
19098	}
19099	for k, v := range m {
19100		switch k {
19101		case "etag":
19102			if v != nil {
19103				var etag string
19104				err = json.Unmarshal(*v, &etag)
19105				if err != nil {
19106					return err
19107				}
19108				w.Etag = &etag
19109			}
19110		case "properties":
19111			if v != nil {
19112				var watcherPropertiesFormat WatcherPropertiesFormat
19113				err = json.Unmarshal(*v, &watcherPropertiesFormat)
19114				if err != nil {
19115					return err
19116				}
19117				w.WatcherPropertiesFormat = &watcherPropertiesFormat
19118			}
19119		case "id":
19120			if v != nil {
19121				var ID string
19122				err = json.Unmarshal(*v, &ID)
19123				if err != nil {
19124					return err
19125				}
19126				w.ID = &ID
19127			}
19128		case "name":
19129			if v != nil {
19130				var name string
19131				err = json.Unmarshal(*v, &name)
19132				if err != nil {
19133					return err
19134				}
19135				w.Name = &name
19136			}
19137		case "type":
19138			if v != nil {
19139				var typeVar string
19140				err = json.Unmarshal(*v, &typeVar)
19141				if err != nil {
19142					return err
19143				}
19144				w.Type = &typeVar
19145			}
19146		case "location":
19147			if v != nil {
19148				var location string
19149				err = json.Unmarshal(*v, &location)
19150				if err != nil {
19151					return err
19152				}
19153				w.Location = &location
19154			}
19155		case "tags":
19156			if v != nil {
19157				var tags map[string]*string
19158				err = json.Unmarshal(*v, &tags)
19159				if err != nil {
19160					return err
19161				}
19162				w.Tags = tags
19163			}
19164		}
19165	}
19166
19167	return nil
19168}
19169
19170// WatcherListResult list of network watcher resources.
19171type WatcherListResult struct {
19172	autorest.Response `json:"-"`
19173	Value             *[]Watcher `json:"value,omitempty"`
19174}
19175
19176// WatcherPropertiesFormat the network watcher properties.
19177type WatcherPropertiesFormat struct {
19178	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
19179	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
19180}
19181
19182// WatchersCheckConnectivityFuture an abstraction for monitoring and retrieving the results of a
19183// long-running operation.
19184type WatchersCheckConnectivityFuture struct {
19185	azure.FutureAPI
19186	// Result returns the result of the asynchronous operation.
19187	// If the operation has not completed it will return an error.
19188	Result func(WatchersClient) (ConnectivityInformation, error)
19189}
19190
19191// WatchersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
19192// operation.
19193type WatchersDeleteFuture struct {
19194	azure.FutureAPI
19195	// Result returns the result of the asynchronous operation.
19196	// If the operation has not completed it will return an error.
19197	Result func(WatchersClient) (autorest.Response, error)
19198}
19199
19200// WatchersGetAzureReachabilityReportFuture an abstraction for monitoring and retrieving the results of a
19201// long-running operation.
19202type WatchersGetAzureReachabilityReportFuture struct {
19203	azure.FutureAPI
19204	// Result returns the result of the asynchronous operation.
19205	// If the operation has not completed it will return an error.
19206	Result func(WatchersClient) (AzureReachabilityReport, error)
19207}
19208
19209// WatchersGetFlowLogStatusFuture an abstraction for monitoring and retrieving the results of a
19210// long-running operation.
19211type WatchersGetFlowLogStatusFuture struct {
19212	azure.FutureAPI
19213	// Result returns the result of the asynchronous operation.
19214	// If the operation has not completed it will return an error.
19215	Result func(WatchersClient) (FlowLogInformation, error)
19216}
19217
19218// WatchersGetNetworkConfigurationDiagnosticFuture an abstraction for monitoring and retrieving the results
19219// of a long-running operation.
19220type WatchersGetNetworkConfigurationDiagnosticFuture struct {
19221	azure.FutureAPI
19222	// Result returns the result of the asynchronous operation.
19223	// If the operation has not completed it will return an error.
19224	Result func(WatchersClient) (ConfigurationDiagnosticResponse, error)
19225}
19226
19227// WatchersGetNextHopFuture an abstraction for monitoring and retrieving the results of a long-running
19228// operation.
19229type WatchersGetNextHopFuture struct {
19230	azure.FutureAPI
19231	// Result returns the result of the asynchronous operation.
19232	// If the operation has not completed it will return an error.
19233	Result func(WatchersClient) (NextHopResult, error)
19234}
19235
19236// WatchersGetTroubleshootingFuture an abstraction for monitoring and retrieving the results of a
19237// long-running operation.
19238type WatchersGetTroubleshootingFuture struct {
19239	azure.FutureAPI
19240	// Result returns the result of the asynchronous operation.
19241	// If the operation has not completed it will return an error.
19242	Result func(WatchersClient) (TroubleshootingResult, error)
19243}
19244
19245// WatchersGetTroubleshootingResultFuture an abstraction for monitoring and retrieving the results of a
19246// long-running operation.
19247type WatchersGetTroubleshootingResultFuture struct {
19248	azure.FutureAPI
19249	// Result returns the result of the asynchronous operation.
19250	// If the operation has not completed it will return an error.
19251	Result func(WatchersClient) (TroubleshootingResult, error)
19252}
19253
19254// WatchersGetVMSecurityRulesFuture an abstraction for monitoring and retrieving the results of a
19255// long-running operation.
19256type WatchersGetVMSecurityRulesFuture struct {
19257	azure.FutureAPI
19258	// Result returns the result of the asynchronous operation.
19259	// If the operation has not completed it will return an error.
19260	Result func(WatchersClient) (SecurityGroupViewResult, error)
19261}
19262
19263// WatchersListAvailableProvidersFuture an abstraction for monitoring and retrieving the results of a
19264// long-running operation.
19265type WatchersListAvailableProvidersFuture struct {
19266	azure.FutureAPI
19267	// Result returns the result of the asynchronous operation.
19268	// If the operation has not completed it will return an error.
19269	Result func(WatchersClient) (AvailableProvidersList, error)
19270}
19271
19272// WatchersSetFlowLogConfigurationFuture an abstraction for monitoring and retrieving the results of a
19273// long-running operation.
19274type WatchersSetFlowLogConfigurationFuture struct {
19275	azure.FutureAPI
19276	// Result returns the result of the asynchronous operation.
19277	// If the operation has not completed it will return an error.
19278	Result func(WatchersClient) (FlowLogInformation, error)
19279}
19280
19281// WatchersVerifyIPFlowFuture an abstraction for monitoring and retrieving the results of a long-running
19282// operation.
19283type WatchersVerifyIPFlowFuture struct {
19284	azure.FutureAPI
19285	// Result returns the result of the asynchronous operation.
19286	// If the operation has not completed it will return an error.
19287	Result func(WatchersClient) (VerificationIPFlowResult, error)
19288}
19289