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/2019-02-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 - Properties of the application gateway.
45	*ApplicationGatewayPropertiesFormat `json:"properties,omitempty"`
46	// Etag - A unique read-only string that changes whenever the resource is updated.
47	Etag *string `json:"etag,omitempty"`
48	// Zones - A list of availability zones denoting where the resource needs to come from.
49	Zones *[]string `json:"zones,omitempty"`
50	// Identity - The identity of the application gateway, if configured.
51	Identity *ManagedServiceIdentity `json:"identity,omitempty"`
52	// ID - Resource ID.
53	ID *string `json:"id,omitempty"`
54	// Name - READ-ONLY; Resource name.
55	Name *string `json:"name,omitempty"`
56	// Type - READ-ONLY; Resource type.
57	Type *string `json:"type,omitempty"`
58	// Location - Resource location.
59	Location *string `json:"location,omitempty"`
60	// Tags - Resource tags.
61	Tags map[string]*string `json:"tags"`
62}
63
64// MarshalJSON is the custom marshaler for ApplicationGateway.
65func (ag ApplicationGateway) MarshalJSON() ([]byte, error) {
66	objectMap := make(map[string]interface{})
67	if ag.ApplicationGatewayPropertiesFormat != nil {
68		objectMap["properties"] = ag.ApplicationGatewayPropertiesFormat
69	}
70	if ag.Etag != nil {
71		objectMap["etag"] = ag.Etag
72	}
73	if ag.Zones != nil {
74		objectMap["zones"] = ag.Zones
75	}
76	if ag.Identity != nil {
77		objectMap["identity"] = ag.Identity
78	}
79	if ag.ID != nil {
80		objectMap["id"] = ag.ID
81	}
82	if ag.Location != nil {
83		objectMap["location"] = ag.Location
84	}
85	if ag.Tags != nil {
86		objectMap["tags"] = ag.Tags
87	}
88	return json.Marshal(objectMap)
89}
90
91// UnmarshalJSON is the custom unmarshaler for ApplicationGateway struct.
92func (ag *ApplicationGateway) UnmarshalJSON(body []byte) error {
93	var m map[string]*json.RawMessage
94	err := json.Unmarshal(body, &m)
95	if err != nil {
96		return err
97	}
98	for k, v := range m {
99		switch k {
100		case "properties":
101			if v != nil {
102				var applicationGatewayPropertiesFormat ApplicationGatewayPropertiesFormat
103				err = json.Unmarshal(*v, &applicationGatewayPropertiesFormat)
104				if err != nil {
105					return err
106				}
107				ag.ApplicationGatewayPropertiesFormat = &applicationGatewayPropertiesFormat
108			}
109		case "etag":
110			if v != nil {
111				var etag string
112				err = json.Unmarshal(*v, &etag)
113				if err != nil {
114					return err
115				}
116				ag.Etag = &etag
117			}
118		case "zones":
119			if v != nil {
120				var zones []string
121				err = json.Unmarshal(*v, &zones)
122				if err != nil {
123					return err
124				}
125				ag.Zones = &zones
126			}
127		case "identity":
128			if v != nil {
129				var identity ManagedServiceIdentity
130				err = json.Unmarshal(*v, &identity)
131				if err != nil {
132					return err
133				}
134				ag.Identity = &identity
135			}
136		case "id":
137			if v != nil {
138				var ID string
139				err = json.Unmarshal(*v, &ID)
140				if err != nil {
141					return err
142				}
143				ag.ID = &ID
144			}
145		case "name":
146			if v != nil {
147				var name string
148				err = json.Unmarshal(*v, &name)
149				if err != nil {
150					return err
151				}
152				ag.Name = &name
153			}
154		case "type":
155			if v != nil {
156				var typeVar string
157				err = json.Unmarshal(*v, &typeVar)
158				if err != nil {
159					return err
160				}
161				ag.Type = &typeVar
162			}
163		case "location":
164			if v != nil {
165				var location string
166				err = json.Unmarshal(*v, &location)
167				if err != nil {
168					return err
169				}
170				ag.Location = &location
171			}
172		case "tags":
173			if v != nil {
174				var tags map[string]*string
175				err = json.Unmarshal(*v, &tags)
176				if err != nil {
177					return err
178				}
179				ag.Tags = tags
180			}
181		}
182	}
183
184	return nil
185}
186
187// ApplicationGatewayAuthenticationCertificate authentication certificates of an application gateway.
188type ApplicationGatewayAuthenticationCertificate struct {
189	// ApplicationGatewayAuthenticationCertificatePropertiesFormat - Properties of the application gateway authentication certificate.
190	*ApplicationGatewayAuthenticationCertificatePropertiesFormat `json:"properties,omitempty"`
191	// Name - Name of the authentication certificate that is unique within an Application Gateway.
192	Name *string `json:"name,omitempty"`
193	// Etag - A unique read-only string that changes whenever the resource is updated.
194	Etag *string `json:"etag,omitempty"`
195	// Type - Type of the resource.
196	Type *string `json:"type,omitempty"`
197	// ID - Resource ID.
198	ID *string `json:"id,omitempty"`
199}
200
201// MarshalJSON is the custom marshaler for ApplicationGatewayAuthenticationCertificate.
202func (agac ApplicationGatewayAuthenticationCertificate) MarshalJSON() ([]byte, error) {
203	objectMap := make(map[string]interface{})
204	if agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat != nil {
205		objectMap["properties"] = agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat
206	}
207	if agac.Name != nil {
208		objectMap["name"] = agac.Name
209	}
210	if agac.Etag != nil {
211		objectMap["etag"] = agac.Etag
212	}
213	if agac.Type != nil {
214		objectMap["type"] = agac.Type
215	}
216	if agac.ID != nil {
217		objectMap["id"] = agac.ID
218	}
219	return json.Marshal(objectMap)
220}
221
222// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayAuthenticationCertificate struct.
223func (agac *ApplicationGatewayAuthenticationCertificate) UnmarshalJSON(body []byte) error {
224	var m map[string]*json.RawMessage
225	err := json.Unmarshal(body, &m)
226	if err != nil {
227		return err
228	}
229	for k, v := range m {
230		switch k {
231		case "properties":
232			if v != nil {
233				var applicationGatewayAuthenticationCertificatePropertiesFormat ApplicationGatewayAuthenticationCertificatePropertiesFormat
234				err = json.Unmarshal(*v, &applicationGatewayAuthenticationCertificatePropertiesFormat)
235				if err != nil {
236					return err
237				}
238				agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat = &applicationGatewayAuthenticationCertificatePropertiesFormat
239			}
240		case "name":
241			if v != nil {
242				var name string
243				err = json.Unmarshal(*v, &name)
244				if err != nil {
245					return err
246				}
247				agac.Name = &name
248			}
249		case "etag":
250			if v != nil {
251				var etag string
252				err = json.Unmarshal(*v, &etag)
253				if err != nil {
254					return err
255				}
256				agac.Etag = &etag
257			}
258		case "type":
259			if v != nil {
260				var typeVar string
261				err = json.Unmarshal(*v, &typeVar)
262				if err != nil {
263					return err
264				}
265				agac.Type = &typeVar
266			}
267		case "id":
268			if v != nil {
269				var ID string
270				err = json.Unmarshal(*v, &ID)
271				if err != nil {
272					return err
273				}
274				agac.ID = &ID
275			}
276		}
277	}
278
279	return nil
280}
281
282// ApplicationGatewayAuthenticationCertificatePropertiesFormat authentication certificates properties of an
283// application gateway.
284type ApplicationGatewayAuthenticationCertificatePropertiesFormat struct {
285	// Data - Certificate public data.
286	Data *string `json:"data,omitempty"`
287	// ProvisioningState - Provisioning state of the authentication certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
288	ProvisioningState *string `json:"provisioningState,omitempty"`
289}
290
291// ApplicationGatewayAutoscaleConfiguration application Gateway autoscale configuration.
292type ApplicationGatewayAutoscaleConfiguration struct {
293	// MinCapacity - Lower bound on number of Application Gateway capacity
294	MinCapacity *int32 `json:"minCapacity,omitempty"`
295	// MaxCapacity - Upper bound on number of Application Gateway capacity
296	MaxCapacity *int32 `json:"maxCapacity,omitempty"`
297}
298
299// ApplicationGatewayAvailableSslOptions response for ApplicationGatewayAvailableSslOptions API service
300// call.
301type ApplicationGatewayAvailableSslOptions struct {
302	autorest.Response `json:"-"`
303	// ApplicationGatewayAvailableSslOptionsPropertiesFormat - Properties of the application gateway available SSL options.
304	*ApplicationGatewayAvailableSslOptionsPropertiesFormat `json:"properties,omitempty"`
305	// ID - Resource ID.
306	ID *string `json:"id,omitempty"`
307	// Name - READ-ONLY; Resource name.
308	Name *string `json:"name,omitempty"`
309	// Type - READ-ONLY; Resource type.
310	Type *string `json:"type,omitempty"`
311	// Location - Resource location.
312	Location *string `json:"location,omitempty"`
313	// Tags - Resource tags.
314	Tags map[string]*string `json:"tags"`
315}
316
317// MarshalJSON is the custom marshaler for ApplicationGatewayAvailableSslOptions.
318func (agaso ApplicationGatewayAvailableSslOptions) MarshalJSON() ([]byte, error) {
319	objectMap := make(map[string]interface{})
320	if agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat != nil {
321		objectMap["properties"] = agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat
322	}
323	if agaso.ID != nil {
324		objectMap["id"] = agaso.ID
325	}
326	if agaso.Location != nil {
327		objectMap["location"] = agaso.Location
328	}
329	if agaso.Tags != nil {
330		objectMap["tags"] = agaso.Tags
331	}
332	return json.Marshal(objectMap)
333}
334
335// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayAvailableSslOptions struct.
336func (agaso *ApplicationGatewayAvailableSslOptions) UnmarshalJSON(body []byte) error {
337	var m map[string]*json.RawMessage
338	err := json.Unmarshal(body, &m)
339	if err != nil {
340		return err
341	}
342	for k, v := range m {
343		switch k {
344		case "properties":
345			if v != nil {
346				var applicationGatewayAvailableSslOptionsPropertiesFormat ApplicationGatewayAvailableSslOptionsPropertiesFormat
347				err = json.Unmarshal(*v, &applicationGatewayAvailableSslOptionsPropertiesFormat)
348				if err != nil {
349					return err
350				}
351				agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat = &applicationGatewayAvailableSslOptionsPropertiesFormat
352			}
353		case "id":
354			if v != nil {
355				var ID string
356				err = json.Unmarshal(*v, &ID)
357				if err != nil {
358					return err
359				}
360				agaso.ID = &ID
361			}
362		case "name":
363			if v != nil {
364				var name string
365				err = json.Unmarshal(*v, &name)
366				if err != nil {
367					return err
368				}
369				agaso.Name = &name
370			}
371		case "type":
372			if v != nil {
373				var typeVar string
374				err = json.Unmarshal(*v, &typeVar)
375				if err != nil {
376					return err
377				}
378				agaso.Type = &typeVar
379			}
380		case "location":
381			if v != nil {
382				var location string
383				err = json.Unmarshal(*v, &location)
384				if err != nil {
385					return err
386				}
387				agaso.Location = &location
388			}
389		case "tags":
390			if v != nil {
391				var tags map[string]*string
392				err = json.Unmarshal(*v, &tags)
393				if err != nil {
394					return err
395				}
396				agaso.Tags = tags
397			}
398		}
399	}
400
401	return nil
402}
403
404// ApplicationGatewayAvailableSslOptionsPropertiesFormat properties of
405// ApplicationGatewayAvailableSslOptions
406type ApplicationGatewayAvailableSslOptionsPropertiesFormat struct {
407	// PredefinedPolicies - List of available Ssl predefined policy.
408	PredefinedPolicies *[]SubResource `json:"predefinedPolicies,omitempty"`
409	// DefaultPolicy - Name of the Ssl predefined policy applied by default to application gateway. Possible values include: 'AppGwSslPolicy20150501', 'AppGwSslPolicy20170401', 'AppGwSslPolicy20170401S'
410	DefaultPolicy ApplicationGatewaySslPolicyName `json:"defaultPolicy,omitempty"`
411	// AvailableCipherSuites - List of available Ssl cipher suites.
412	AvailableCipherSuites *[]ApplicationGatewaySslCipherSuite `json:"availableCipherSuites,omitempty"`
413	// AvailableProtocols - List of available Ssl protocols.
414	AvailableProtocols *[]ApplicationGatewaySslProtocol `json:"availableProtocols,omitempty"`
415}
416
417// ApplicationGatewayAvailableSslPredefinedPolicies response for ApplicationGatewayAvailableSslOptions API
418// service call.
419type ApplicationGatewayAvailableSslPredefinedPolicies struct {
420	autorest.Response `json:"-"`
421	// Value - List of available Ssl predefined policy.
422	Value *[]ApplicationGatewaySslPredefinedPolicy `json:"value,omitempty"`
423	// NextLink - URL to get the next set of results.
424	NextLink *string `json:"nextLink,omitempty"`
425}
426
427// ApplicationGatewayAvailableSslPredefinedPoliciesIterator provides access to a complete listing of
428// ApplicationGatewaySslPredefinedPolicy values.
429type ApplicationGatewayAvailableSslPredefinedPoliciesIterator struct {
430	i    int
431	page ApplicationGatewayAvailableSslPredefinedPoliciesPage
432}
433
434// NextWithContext advances to the next value.  If there was an error making
435// the request the iterator does not advance and the error is returned.
436func (iter *ApplicationGatewayAvailableSslPredefinedPoliciesIterator) NextWithContext(ctx context.Context) (err error) {
437	if tracing.IsEnabled() {
438		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayAvailableSslPredefinedPoliciesIterator.NextWithContext")
439		defer func() {
440			sc := -1
441			if iter.Response().Response.Response != nil {
442				sc = iter.Response().Response.Response.StatusCode
443			}
444			tracing.EndSpan(ctx, sc, err)
445		}()
446	}
447	iter.i++
448	if iter.i < len(iter.page.Values()) {
449		return nil
450	}
451	err = iter.page.NextWithContext(ctx)
452	if err != nil {
453		iter.i--
454		return err
455	}
456	iter.i = 0
457	return nil
458}
459
460// Next advances to the next value.  If there was an error making
461// the request the iterator does not advance and the error is returned.
462// Deprecated: Use NextWithContext() instead.
463func (iter *ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Next() error {
464	return iter.NextWithContext(context.Background())
465}
466
467// NotDone returns true if the enumeration should be started or is not yet complete.
468func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) NotDone() bool {
469	return iter.page.NotDone() && iter.i < len(iter.page.Values())
470}
471
472// Response returns the raw server response from the last page request.
473func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Response() ApplicationGatewayAvailableSslPredefinedPolicies {
474	return iter.page.Response()
475}
476
477// Value returns the current value or a zero-initialized value if the
478// iterator has advanced beyond the end of the collection.
479func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Value() ApplicationGatewaySslPredefinedPolicy {
480	if !iter.page.NotDone() {
481		return ApplicationGatewaySslPredefinedPolicy{}
482	}
483	return iter.page.Values()[iter.i]
484}
485
486// Creates a new instance of the ApplicationGatewayAvailableSslPredefinedPoliciesIterator type.
487func NewApplicationGatewayAvailableSslPredefinedPoliciesIterator(page ApplicationGatewayAvailableSslPredefinedPoliciesPage) ApplicationGatewayAvailableSslPredefinedPoliciesIterator {
488	return ApplicationGatewayAvailableSslPredefinedPoliciesIterator{page: page}
489}
490
491// IsEmpty returns true if the ListResult contains no values.
492func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) IsEmpty() bool {
493	return agaspp.Value == nil || len(*agaspp.Value) == 0
494}
495
496// hasNextLink returns true if the NextLink is not empty.
497func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) hasNextLink() bool {
498	return agaspp.NextLink != nil && len(*agaspp.NextLink) != 0
499}
500
501// applicationGatewayAvailableSslPredefinedPoliciesPreparer prepares a request to retrieve the next set of results.
502// It returns nil if no more results exist.
503func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) applicationGatewayAvailableSslPredefinedPoliciesPreparer(ctx context.Context) (*http.Request, error) {
504	if !agaspp.hasNextLink() {
505		return nil, nil
506	}
507	return autorest.Prepare((&http.Request{}).WithContext(ctx),
508		autorest.AsJSON(),
509		autorest.AsGet(),
510		autorest.WithBaseURL(to.String(agaspp.NextLink)))
511}
512
513// ApplicationGatewayAvailableSslPredefinedPoliciesPage contains a page of
514// ApplicationGatewaySslPredefinedPolicy values.
515type ApplicationGatewayAvailableSslPredefinedPoliciesPage struct {
516	fn     func(context.Context, ApplicationGatewayAvailableSslPredefinedPolicies) (ApplicationGatewayAvailableSslPredefinedPolicies, error)
517	agaspp ApplicationGatewayAvailableSslPredefinedPolicies
518}
519
520// NextWithContext advances to the next page of values.  If there was an error making
521// the request the page does not advance and the error is returned.
522func (page *ApplicationGatewayAvailableSslPredefinedPoliciesPage) NextWithContext(ctx context.Context) (err error) {
523	if tracing.IsEnabled() {
524		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayAvailableSslPredefinedPoliciesPage.NextWithContext")
525		defer func() {
526			sc := -1
527			if page.Response().Response.Response != nil {
528				sc = page.Response().Response.Response.StatusCode
529			}
530			tracing.EndSpan(ctx, sc, err)
531		}()
532	}
533	for {
534		next, err := page.fn(ctx, page.agaspp)
535		if err != nil {
536			return err
537		}
538		page.agaspp = next
539		if !next.hasNextLink() || !next.IsEmpty() {
540			break
541		}
542	}
543	return nil
544}
545
546// Next advances to the next page of values.  If there was an error making
547// the request the page does not advance and the error is returned.
548// Deprecated: Use NextWithContext() instead.
549func (page *ApplicationGatewayAvailableSslPredefinedPoliciesPage) Next() error {
550	return page.NextWithContext(context.Background())
551}
552
553// NotDone returns true if the page enumeration should be started or is not yet complete.
554func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) NotDone() bool {
555	return !page.agaspp.IsEmpty()
556}
557
558// Response returns the raw server response from the last page request.
559func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) Response() ApplicationGatewayAvailableSslPredefinedPolicies {
560	return page.agaspp
561}
562
563// Values returns the slice of values for the current page or nil if there are no values.
564func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) Values() []ApplicationGatewaySslPredefinedPolicy {
565	if page.agaspp.IsEmpty() {
566		return nil
567	}
568	return *page.agaspp.Value
569}
570
571// Creates a new instance of the ApplicationGatewayAvailableSslPredefinedPoliciesPage type.
572func NewApplicationGatewayAvailableSslPredefinedPoliciesPage(cur ApplicationGatewayAvailableSslPredefinedPolicies, getNextPage func(context.Context, ApplicationGatewayAvailableSslPredefinedPolicies) (ApplicationGatewayAvailableSslPredefinedPolicies, error)) ApplicationGatewayAvailableSslPredefinedPoliciesPage {
573	return ApplicationGatewayAvailableSslPredefinedPoliciesPage{
574		fn:     getNextPage,
575		agaspp: cur,
576	}
577}
578
579// ApplicationGatewayAvailableWafRuleSetsResult response for ApplicationGatewayAvailableWafRuleSets API
580// service call.
581type ApplicationGatewayAvailableWafRuleSetsResult struct {
582	autorest.Response `json:"-"`
583	// Value - The list of application gateway rule sets.
584	Value *[]ApplicationGatewayFirewallRuleSet `json:"value,omitempty"`
585}
586
587// ApplicationGatewayBackendAddress backend address of an application gateway.
588type ApplicationGatewayBackendAddress struct {
589	// Fqdn - Fully qualified domain name (FQDN).
590	Fqdn *string `json:"fqdn,omitempty"`
591	// IPAddress - IP address
592	IPAddress *string `json:"ipAddress,omitempty"`
593}
594
595// ApplicationGatewayBackendAddressPool backend Address Pool of an application gateway.
596type ApplicationGatewayBackendAddressPool struct {
597	// ApplicationGatewayBackendAddressPoolPropertiesFormat - Properties of the application gateway backend address pool.
598	*ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"`
599	// Name - Name of the backend address pool that is unique within an Application Gateway.
600	Name *string `json:"name,omitempty"`
601	// Etag - A unique read-only string that changes whenever the resource is updated.
602	Etag *string `json:"etag,omitempty"`
603	// Type - Type of the resource.
604	Type *string `json:"type,omitempty"`
605	// ID - Resource ID.
606	ID *string `json:"id,omitempty"`
607}
608
609// MarshalJSON is the custom marshaler for ApplicationGatewayBackendAddressPool.
610func (agbap ApplicationGatewayBackendAddressPool) MarshalJSON() ([]byte, error) {
611	objectMap := make(map[string]interface{})
612	if agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat != nil {
613		objectMap["properties"] = agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat
614	}
615	if agbap.Name != nil {
616		objectMap["name"] = agbap.Name
617	}
618	if agbap.Etag != nil {
619		objectMap["etag"] = agbap.Etag
620	}
621	if agbap.Type != nil {
622		objectMap["type"] = agbap.Type
623	}
624	if agbap.ID != nil {
625		objectMap["id"] = agbap.ID
626	}
627	return json.Marshal(objectMap)
628}
629
630// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayBackendAddressPool struct.
631func (agbap *ApplicationGatewayBackendAddressPool) UnmarshalJSON(body []byte) error {
632	var m map[string]*json.RawMessage
633	err := json.Unmarshal(body, &m)
634	if err != nil {
635		return err
636	}
637	for k, v := range m {
638		switch k {
639		case "properties":
640			if v != nil {
641				var applicationGatewayBackendAddressPoolPropertiesFormat ApplicationGatewayBackendAddressPoolPropertiesFormat
642				err = json.Unmarshal(*v, &applicationGatewayBackendAddressPoolPropertiesFormat)
643				if err != nil {
644					return err
645				}
646				agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat = &applicationGatewayBackendAddressPoolPropertiesFormat
647			}
648		case "name":
649			if v != nil {
650				var name string
651				err = json.Unmarshal(*v, &name)
652				if err != nil {
653					return err
654				}
655				agbap.Name = &name
656			}
657		case "etag":
658			if v != nil {
659				var etag string
660				err = json.Unmarshal(*v, &etag)
661				if err != nil {
662					return err
663				}
664				agbap.Etag = &etag
665			}
666		case "type":
667			if v != nil {
668				var typeVar string
669				err = json.Unmarshal(*v, &typeVar)
670				if err != nil {
671					return err
672				}
673				agbap.Type = &typeVar
674			}
675		case "id":
676			if v != nil {
677				var ID string
678				err = json.Unmarshal(*v, &ID)
679				if err != nil {
680					return err
681				}
682				agbap.ID = &ID
683			}
684		}
685	}
686
687	return nil
688}
689
690// ApplicationGatewayBackendAddressPoolPropertiesFormat properties of Backend Address Pool of an
691// application gateway.
692type ApplicationGatewayBackendAddressPoolPropertiesFormat struct {
693	// BackendIPConfigurations - Collection of references to IPs defined in network interfaces.
694	BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"`
695	// BackendAddresses - Backend addresses
696	BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"`
697	// ProvisioningState - Provisioning state of the backend address pool resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
698	ProvisioningState *string `json:"provisioningState,omitempty"`
699}
700
701// ApplicationGatewayBackendHealth response for ApplicationGatewayBackendHealth API service call.
702type ApplicationGatewayBackendHealth struct {
703	autorest.Response `json:"-"`
704	// BackendAddressPools - A list of ApplicationGatewayBackendHealthPool resources.
705	BackendAddressPools *[]ApplicationGatewayBackendHealthPool `json:"backendAddressPools,omitempty"`
706}
707
708// ApplicationGatewayBackendHealthHTTPSettings application gateway BackendHealthHttp settings.
709type ApplicationGatewayBackendHealthHTTPSettings struct {
710	// BackendHTTPSettings - Reference of an ApplicationGatewayBackendHttpSettings resource.
711	BackendHTTPSettings *ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettings,omitempty"`
712	// Servers - List of ApplicationGatewayBackendHealthServer resources.
713	Servers *[]ApplicationGatewayBackendHealthServer `json:"servers,omitempty"`
714}
715
716// ApplicationGatewayBackendHealthOnDemand result of on demand test probe
717type ApplicationGatewayBackendHealthOnDemand struct {
718	autorest.Response `json:"-"`
719	// BackendAddressPool - Reference of an ApplicationGatewayBackendAddressPool resource.
720	BackendAddressPool *ApplicationGatewayBackendAddressPool `json:"backendAddressPool,omitempty"`
721	// BackendHealthHTTPSettings - Application gateway BackendHealthHttp settings.
722	BackendHealthHTTPSettings *ApplicationGatewayBackendHealthHTTPSettings `json:"backendHealthHttpSettings,omitempty"`
723}
724
725// ApplicationGatewayBackendHealthPool application gateway BackendHealth pool.
726type ApplicationGatewayBackendHealthPool struct {
727	// BackendAddressPool - Reference of an ApplicationGatewayBackendAddressPool resource.
728	BackendAddressPool *ApplicationGatewayBackendAddressPool `json:"backendAddressPool,omitempty"`
729	// BackendHTTPSettingsCollection - List of ApplicationGatewayBackendHealthHttpSettings resources.
730	BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHealthHTTPSettings `json:"backendHttpSettingsCollection,omitempty"`
731}
732
733// ApplicationGatewayBackendHealthServer application gateway backendhealth http settings.
734type ApplicationGatewayBackendHealthServer struct {
735	// Address - IP address or FQDN of backend server.
736	Address *string `json:"address,omitempty"`
737	// IPConfiguration - Reference of IP configuration of backend server.
738	IPConfiguration *InterfaceIPConfiguration `json:"ipConfiguration,omitempty"`
739	// Health - Health of backend server. Possible values include: 'Unknown', 'Up', 'Down', 'Partial', 'Draining'
740	Health ApplicationGatewayBackendHealthServerHealth `json:"health,omitempty"`
741	// HealthProbeLog - Health Probe Log.
742	HealthProbeLog *string `json:"healthProbeLog,omitempty"`
743}
744
745// ApplicationGatewayBackendHTTPSettings backend address pool settings of an application gateway.
746type ApplicationGatewayBackendHTTPSettings struct {
747	// ApplicationGatewayBackendHTTPSettingsPropertiesFormat - Properties of the application gateway backend HTTP settings.
748	*ApplicationGatewayBackendHTTPSettingsPropertiesFormat `json:"properties,omitempty"`
749	// Name - Name of the backend http settings that is unique within an Application Gateway.
750	Name *string `json:"name,omitempty"`
751	// Etag - A unique read-only string that changes whenever the resource is updated.
752	Etag *string `json:"etag,omitempty"`
753	// Type - Type of the resource.
754	Type *string `json:"type,omitempty"`
755	// ID - Resource ID.
756	ID *string `json:"id,omitempty"`
757}
758
759// MarshalJSON is the custom marshaler for ApplicationGatewayBackendHTTPSettings.
760func (agbhs ApplicationGatewayBackendHTTPSettings) MarshalJSON() ([]byte, error) {
761	objectMap := make(map[string]interface{})
762	if agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat != nil {
763		objectMap["properties"] = agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat
764	}
765	if agbhs.Name != nil {
766		objectMap["name"] = agbhs.Name
767	}
768	if agbhs.Etag != nil {
769		objectMap["etag"] = agbhs.Etag
770	}
771	if agbhs.Type != nil {
772		objectMap["type"] = agbhs.Type
773	}
774	if agbhs.ID != nil {
775		objectMap["id"] = agbhs.ID
776	}
777	return json.Marshal(objectMap)
778}
779
780// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayBackendHTTPSettings struct.
781func (agbhs *ApplicationGatewayBackendHTTPSettings) UnmarshalJSON(body []byte) error {
782	var m map[string]*json.RawMessage
783	err := json.Unmarshal(body, &m)
784	if err != nil {
785		return err
786	}
787	for k, v := range m {
788		switch k {
789		case "properties":
790			if v != nil {
791				var applicationGatewayBackendHTTPSettingsPropertiesFormat ApplicationGatewayBackendHTTPSettingsPropertiesFormat
792				err = json.Unmarshal(*v, &applicationGatewayBackendHTTPSettingsPropertiesFormat)
793				if err != nil {
794					return err
795				}
796				agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat = &applicationGatewayBackendHTTPSettingsPropertiesFormat
797			}
798		case "name":
799			if v != nil {
800				var name string
801				err = json.Unmarshal(*v, &name)
802				if err != nil {
803					return err
804				}
805				agbhs.Name = &name
806			}
807		case "etag":
808			if v != nil {
809				var etag string
810				err = json.Unmarshal(*v, &etag)
811				if err != nil {
812					return err
813				}
814				agbhs.Etag = &etag
815			}
816		case "type":
817			if v != nil {
818				var typeVar string
819				err = json.Unmarshal(*v, &typeVar)
820				if err != nil {
821					return err
822				}
823				agbhs.Type = &typeVar
824			}
825		case "id":
826			if v != nil {
827				var ID string
828				err = json.Unmarshal(*v, &ID)
829				if err != nil {
830					return err
831				}
832				agbhs.ID = &ID
833			}
834		}
835	}
836
837	return nil
838}
839
840// ApplicationGatewayBackendHTTPSettingsPropertiesFormat properties of Backend address pool settings of an
841// application gateway.
842type ApplicationGatewayBackendHTTPSettingsPropertiesFormat struct {
843	// Port - The destination port on the backend.
844	Port *int32 `json:"port,omitempty"`
845	// Protocol - The protocol used to communicate with the backend. Possible values include: 'HTTP', 'HTTPS'
846	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
847	// CookieBasedAffinity - Cookie based affinity. Possible values include: 'Enabled', 'Disabled'
848	CookieBasedAffinity ApplicationGatewayCookieBasedAffinity `json:"cookieBasedAffinity,omitempty"`
849	// 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.
850	RequestTimeout *int32 `json:"requestTimeout,omitempty"`
851	// Probe - Probe resource of an application gateway.
852	Probe *SubResource `json:"probe,omitempty"`
853	// AuthenticationCertificates - Array of references to application gateway authentication certificates.
854	AuthenticationCertificates *[]SubResource `json:"authenticationCertificates,omitempty"`
855	// TrustedRootCertificates - Array of references to application gateway trusted root certificates.
856	TrustedRootCertificates *[]SubResource `json:"trustedRootCertificates,omitempty"`
857	// ConnectionDraining - Connection draining of the backend http settings resource.
858	ConnectionDraining *ApplicationGatewayConnectionDraining `json:"connectionDraining,omitempty"`
859	// HostName - Host header to be sent to the backend servers.
860	HostName *string `json:"hostName,omitempty"`
861	// PickHostNameFromBackendAddress - Whether to pick host header should be picked from the host name of the backend server. Default value is false.
862	PickHostNameFromBackendAddress *bool `json:"pickHostNameFromBackendAddress,omitempty"`
863	// AffinityCookieName - Cookie name to use for the affinity cookie.
864	AffinityCookieName *string `json:"affinityCookieName,omitempty"`
865	// ProbeEnabled - Whether the probe is enabled. Default value is false.
866	ProbeEnabled *bool `json:"probeEnabled,omitempty"`
867	// Path - Path which should be used as a prefix for all HTTP requests. Null means no path will be prefixed. Default value is null.
868	Path *string `json:"path,omitempty"`
869	// ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
870	ProvisioningState *string `json:"provisioningState,omitempty"`
871}
872
873// ApplicationGatewayConnectionDraining connection draining allows open connections to a backend server to
874// be active for a specified time after the backend server got removed from the configuration.
875type ApplicationGatewayConnectionDraining struct {
876	// Enabled - Whether connection draining is enabled or not.
877	Enabled *bool `json:"enabled,omitempty"`
878	// DrainTimeoutInSec - The number of seconds connection draining is active. Acceptable values are from 1 second to 3600 seconds.
879	DrainTimeoutInSec *int32 `json:"drainTimeoutInSec,omitempty"`
880}
881
882// ApplicationGatewayCustomError customer error of an application gateway.
883type ApplicationGatewayCustomError struct {
884	// StatusCode - Status code of the application gateway customer error. Possible values include: 'HTTPStatus403', 'HTTPStatus502'
885	StatusCode ApplicationGatewayCustomErrorStatusCode `json:"statusCode,omitempty"`
886	// CustomErrorPageURL - Error page URL of the application gateway customer error.
887	CustomErrorPageURL *string `json:"customErrorPageUrl,omitempty"`
888}
889
890// ApplicationGatewayFirewallDisabledRuleGroup allows to disable rules within a rule group or an entire
891// rule group.
892type ApplicationGatewayFirewallDisabledRuleGroup struct {
893	// RuleGroupName - The name of the rule group that will be disabled.
894	RuleGroupName *string `json:"ruleGroupName,omitempty"`
895	// Rules - The list of rules that will be disabled. If null, all rules of the rule group will be disabled.
896	Rules *[]int32 `json:"rules,omitempty"`
897}
898
899// ApplicationGatewayFirewallExclusion allow to exclude some variable satisfy the condition for the WAF
900// check
901type ApplicationGatewayFirewallExclusion struct {
902	// MatchVariable - The variable to be excluded.
903	MatchVariable *string `json:"matchVariable,omitempty"`
904	// SelectorMatchOperator - When matchVariable is a collection, operate on the selector to specify which elements in the collection this exclusion applies to.
905	SelectorMatchOperator *string `json:"selectorMatchOperator,omitempty"`
906	// Selector - When matchVariable is a collection, operator used to specify which elements in the collection this exclusion applies to.
907	Selector *string `json:"selector,omitempty"`
908}
909
910// ApplicationGatewayFirewallRule a web application firewall rule.
911type ApplicationGatewayFirewallRule struct {
912	// RuleID - The identifier of the web application firewall rule.
913	RuleID *int32 `json:"ruleId,omitempty"`
914	// Description - The description of the web application firewall rule.
915	Description *string `json:"description,omitempty"`
916}
917
918// ApplicationGatewayFirewallRuleGroup a web application firewall rule group.
919type ApplicationGatewayFirewallRuleGroup struct {
920	// RuleGroupName - The name of the web application firewall rule group.
921	RuleGroupName *string `json:"ruleGroupName,omitempty"`
922	// Description - The description of the web application firewall rule group.
923	Description *string `json:"description,omitempty"`
924	// Rules - The rules of the web application firewall rule group.
925	Rules *[]ApplicationGatewayFirewallRule `json:"rules,omitempty"`
926}
927
928// ApplicationGatewayFirewallRuleSet a web application firewall rule set.
929type ApplicationGatewayFirewallRuleSet struct {
930	// ApplicationGatewayFirewallRuleSetPropertiesFormat - Properties of the application gateway firewall rule set.
931	*ApplicationGatewayFirewallRuleSetPropertiesFormat `json:"properties,omitempty"`
932	// ID - Resource ID.
933	ID *string `json:"id,omitempty"`
934	// Name - READ-ONLY; Resource name.
935	Name *string `json:"name,omitempty"`
936	// Type - READ-ONLY; Resource type.
937	Type *string `json:"type,omitempty"`
938	// Location - Resource location.
939	Location *string `json:"location,omitempty"`
940	// Tags - Resource tags.
941	Tags map[string]*string `json:"tags"`
942}
943
944// MarshalJSON is the custom marshaler for ApplicationGatewayFirewallRuleSet.
945func (agfrs ApplicationGatewayFirewallRuleSet) MarshalJSON() ([]byte, error) {
946	objectMap := make(map[string]interface{})
947	if agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat != nil {
948		objectMap["properties"] = agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat
949	}
950	if agfrs.ID != nil {
951		objectMap["id"] = agfrs.ID
952	}
953	if agfrs.Location != nil {
954		objectMap["location"] = agfrs.Location
955	}
956	if agfrs.Tags != nil {
957		objectMap["tags"] = agfrs.Tags
958	}
959	return json.Marshal(objectMap)
960}
961
962// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFirewallRuleSet struct.
963func (agfrs *ApplicationGatewayFirewallRuleSet) UnmarshalJSON(body []byte) error {
964	var m map[string]*json.RawMessage
965	err := json.Unmarshal(body, &m)
966	if err != nil {
967		return err
968	}
969	for k, v := range m {
970		switch k {
971		case "properties":
972			if v != nil {
973				var applicationGatewayFirewallRuleSetPropertiesFormat ApplicationGatewayFirewallRuleSetPropertiesFormat
974				err = json.Unmarshal(*v, &applicationGatewayFirewallRuleSetPropertiesFormat)
975				if err != nil {
976					return err
977				}
978				agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat = &applicationGatewayFirewallRuleSetPropertiesFormat
979			}
980		case "id":
981			if v != nil {
982				var ID string
983				err = json.Unmarshal(*v, &ID)
984				if err != nil {
985					return err
986				}
987				agfrs.ID = &ID
988			}
989		case "name":
990			if v != nil {
991				var name string
992				err = json.Unmarshal(*v, &name)
993				if err != nil {
994					return err
995				}
996				agfrs.Name = &name
997			}
998		case "type":
999			if v != nil {
1000				var typeVar string
1001				err = json.Unmarshal(*v, &typeVar)
1002				if err != nil {
1003					return err
1004				}
1005				agfrs.Type = &typeVar
1006			}
1007		case "location":
1008			if v != nil {
1009				var location string
1010				err = json.Unmarshal(*v, &location)
1011				if err != nil {
1012					return err
1013				}
1014				agfrs.Location = &location
1015			}
1016		case "tags":
1017			if v != nil {
1018				var tags map[string]*string
1019				err = json.Unmarshal(*v, &tags)
1020				if err != nil {
1021					return err
1022				}
1023				agfrs.Tags = tags
1024			}
1025		}
1026	}
1027
1028	return nil
1029}
1030
1031// ApplicationGatewayFirewallRuleSetPropertiesFormat properties of the web application firewall rule set.
1032type ApplicationGatewayFirewallRuleSetPropertiesFormat struct {
1033	// ProvisioningState - The provisioning state of the web application firewall rule set.
1034	ProvisioningState *string `json:"provisioningState,omitempty"`
1035	// RuleSetType - The type of the web application firewall rule set.
1036	RuleSetType *string `json:"ruleSetType,omitempty"`
1037	// RuleSetVersion - The version of the web application firewall rule set type.
1038	RuleSetVersion *string `json:"ruleSetVersion,omitempty"`
1039	// RuleGroups - The rule groups of the web application firewall rule set.
1040	RuleGroups *[]ApplicationGatewayFirewallRuleGroup `json:"ruleGroups,omitempty"`
1041}
1042
1043// ApplicationGatewayFrontendIPConfiguration frontend IP configuration of an application gateway.
1044type ApplicationGatewayFrontendIPConfiguration struct {
1045	// ApplicationGatewayFrontendIPConfigurationPropertiesFormat - Properties of the application gateway frontend IP configuration.
1046	*ApplicationGatewayFrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"`
1047	// Name - Name of the frontend IP configuration that is unique within an Application Gateway.
1048	Name *string `json:"name,omitempty"`
1049	// Etag - A unique read-only string that changes whenever the resource is updated.
1050	Etag *string `json:"etag,omitempty"`
1051	// Type - Type of the resource.
1052	Type *string `json:"type,omitempty"`
1053	// ID - Resource ID.
1054	ID *string `json:"id,omitempty"`
1055}
1056
1057// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendIPConfiguration.
1058func (agfic ApplicationGatewayFrontendIPConfiguration) MarshalJSON() ([]byte, error) {
1059	objectMap := make(map[string]interface{})
1060	if agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat != nil {
1061		objectMap["properties"] = agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat
1062	}
1063	if agfic.Name != nil {
1064		objectMap["name"] = agfic.Name
1065	}
1066	if agfic.Etag != nil {
1067		objectMap["etag"] = agfic.Etag
1068	}
1069	if agfic.Type != nil {
1070		objectMap["type"] = agfic.Type
1071	}
1072	if agfic.ID != nil {
1073		objectMap["id"] = agfic.ID
1074	}
1075	return json.Marshal(objectMap)
1076}
1077
1078// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFrontendIPConfiguration struct.
1079func (agfic *ApplicationGatewayFrontendIPConfiguration) UnmarshalJSON(body []byte) error {
1080	var m map[string]*json.RawMessage
1081	err := json.Unmarshal(body, &m)
1082	if err != nil {
1083		return err
1084	}
1085	for k, v := range m {
1086		switch k {
1087		case "properties":
1088			if v != nil {
1089				var applicationGatewayFrontendIPConfigurationPropertiesFormat ApplicationGatewayFrontendIPConfigurationPropertiesFormat
1090				err = json.Unmarshal(*v, &applicationGatewayFrontendIPConfigurationPropertiesFormat)
1091				if err != nil {
1092					return err
1093				}
1094				agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat = &applicationGatewayFrontendIPConfigurationPropertiesFormat
1095			}
1096		case "name":
1097			if v != nil {
1098				var name string
1099				err = json.Unmarshal(*v, &name)
1100				if err != nil {
1101					return err
1102				}
1103				agfic.Name = &name
1104			}
1105		case "etag":
1106			if v != nil {
1107				var etag string
1108				err = json.Unmarshal(*v, &etag)
1109				if err != nil {
1110					return err
1111				}
1112				agfic.Etag = &etag
1113			}
1114		case "type":
1115			if v != nil {
1116				var typeVar string
1117				err = json.Unmarshal(*v, &typeVar)
1118				if err != nil {
1119					return err
1120				}
1121				agfic.Type = &typeVar
1122			}
1123		case "id":
1124			if v != nil {
1125				var ID string
1126				err = json.Unmarshal(*v, &ID)
1127				if err != nil {
1128					return err
1129				}
1130				agfic.ID = &ID
1131			}
1132		}
1133	}
1134
1135	return nil
1136}
1137
1138// ApplicationGatewayFrontendIPConfigurationPropertiesFormat properties of Frontend IP configuration of an
1139// application gateway.
1140type ApplicationGatewayFrontendIPConfigurationPropertiesFormat struct {
1141	// PrivateIPAddress - PrivateIPAddress of the network interface IP Configuration.
1142	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
1143	// PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'Static', 'Dynamic'
1144	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
1145	// Subnet - Reference of the subnet resource.
1146	Subnet *SubResource `json:"subnet,omitempty"`
1147	// PublicIPAddress - Reference of the PublicIP resource.
1148	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
1149	// ProvisioningState - Provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1150	ProvisioningState *string `json:"provisioningState,omitempty"`
1151}
1152
1153// ApplicationGatewayFrontendPort frontend port of an application gateway.
1154type ApplicationGatewayFrontendPort struct {
1155	// ApplicationGatewayFrontendPortPropertiesFormat - Properties of the application gateway frontend port.
1156	*ApplicationGatewayFrontendPortPropertiesFormat `json:"properties,omitempty"`
1157	// Name - Name of the frontend port that is unique within an Application Gateway
1158	Name *string `json:"name,omitempty"`
1159	// Etag - A unique read-only string that changes whenever the resource is updated.
1160	Etag *string `json:"etag,omitempty"`
1161	// Type - Type of the resource.
1162	Type *string `json:"type,omitempty"`
1163	// ID - Resource ID.
1164	ID *string `json:"id,omitempty"`
1165}
1166
1167// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendPort.
1168func (agfp ApplicationGatewayFrontendPort) MarshalJSON() ([]byte, error) {
1169	objectMap := make(map[string]interface{})
1170	if agfp.ApplicationGatewayFrontendPortPropertiesFormat != nil {
1171		objectMap["properties"] = agfp.ApplicationGatewayFrontendPortPropertiesFormat
1172	}
1173	if agfp.Name != nil {
1174		objectMap["name"] = agfp.Name
1175	}
1176	if agfp.Etag != nil {
1177		objectMap["etag"] = agfp.Etag
1178	}
1179	if agfp.Type != nil {
1180		objectMap["type"] = agfp.Type
1181	}
1182	if agfp.ID != nil {
1183		objectMap["id"] = agfp.ID
1184	}
1185	return json.Marshal(objectMap)
1186}
1187
1188// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFrontendPort struct.
1189func (agfp *ApplicationGatewayFrontendPort) UnmarshalJSON(body []byte) error {
1190	var m map[string]*json.RawMessage
1191	err := json.Unmarshal(body, &m)
1192	if err != nil {
1193		return err
1194	}
1195	for k, v := range m {
1196		switch k {
1197		case "properties":
1198			if v != nil {
1199				var applicationGatewayFrontendPortPropertiesFormat ApplicationGatewayFrontendPortPropertiesFormat
1200				err = json.Unmarshal(*v, &applicationGatewayFrontendPortPropertiesFormat)
1201				if err != nil {
1202					return err
1203				}
1204				agfp.ApplicationGatewayFrontendPortPropertiesFormat = &applicationGatewayFrontendPortPropertiesFormat
1205			}
1206		case "name":
1207			if v != nil {
1208				var name string
1209				err = json.Unmarshal(*v, &name)
1210				if err != nil {
1211					return err
1212				}
1213				agfp.Name = &name
1214			}
1215		case "etag":
1216			if v != nil {
1217				var etag string
1218				err = json.Unmarshal(*v, &etag)
1219				if err != nil {
1220					return err
1221				}
1222				agfp.Etag = &etag
1223			}
1224		case "type":
1225			if v != nil {
1226				var typeVar string
1227				err = json.Unmarshal(*v, &typeVar)
1228				if err != nil {
1229					return err
1230				}
1231				agfp.Type = &typeVar
1232			}
1233		case "id":
1234			if v != nil {
1235				var ID string
1236				err = json.Unmarshal(*v, &ID)
1237				if err != nil {
1238					return err
1239				}
1240				agfp.ID = &ID
1241			}
1242		}
1243	}
1244
1245	return nil
1246}
1247
1248// ApplicationGatewayFrontendPortPropertiesFormat properties of Frontend port of an application gateway.
1249type ApplicationGatewayFrontendPortPropertiesFormat struct {
1250	// Port - Frontend port
1251	Port *int32 `json:"port,omitempty"`
1252	// ProvisioningState - Provisioning state of the frontend port resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1253	ProvisioningState *string `json:"provisioningState,omitempty"`
1254}
1255
1256// ApplicationGatewayHeaderConfiguration header configuration of the Actions set in Application Gateway.
1257type ApplicationGatewayHeaderConfiguration struct {
1258	// HeaderName - Header name of the header configuration
1259	HeaderName *string `json:"headerName,omitempty"`
1260	// HeaderValue - Header value of the header configuration
1261	HeaderValue *string `json:"headerValue,omitempty"`
1262}
1263
1264// ApplicationGatewayHTTPListener http listener of an application gateway.
1265type ApplicationGatewayHTTPListener struct {
1266	// ApplicationGatewayHTTPListenerPropertiesFormat - Properties of the application gateway HTTP listener.
1267	*ApplicationGatewayHTTPListenerPropertiesFormat `json:"properties,omitempty"`
1268	// Name - Name of the HTTP listener that is unique within an Application Gateway.
1269	Name *string `json:"name,omitempty"`
1270	// Etag - A unique read-only string that changes whenever the resource is updated.
1271	Etag *string `json:"etag,omitempty"`
1272	// Type - Type of the resource.
1273	Type *string `json:"type,omitempty"`
1274	// ID - Resource ID.
1275	ID *string `json:"id,omitempty"`
1276}
1277
1278// MarshalJSON is the custom marshaler for ApplicationGatewayHTTPListener.
1279func (aghl ApplicationGatewayHTTPListener) MarshalJSON() ([]byte, error) {
1280	objectMap := make(map[string]interface{})
1281	if aghl.ApplicationGatewayHTTPListenerPropertiesFormat != nil {
1282		objectMap["properties"] = aghl.ApplicationGatewayHTTPListenerPropertiesFormat
1283	}
1284	if aghl.Name != nil {
1285		objectMap["name"] = aghl.Name
1286	}
1287	if aghl.Etag != nil {
1288		objectMap["etag"] = aghl.Etag
1289	}
1290	if aghl.Type != nil {
1291		objectMap["type"] = aghl.Type
1292	}
1293	if aghl.ID != nil {
1294		objectMap["id"] = aghl.ID
1295	}
1296	return json.Marshal(objectMap)
1297}
1298
1299// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayHTTPListener struct.
1300func (aghl *ApplicationGatewayHTTPListener) UnmarshalJSON(body []byte) error {
1301	var m map[string]*json.RawMessage
1302	err := json.Unmarshal(body, &m)
1303	if err != nil {
1304		return err
1305	}
1306	for k, v := range m {
1307		switch k {
1308		case "properties":
1309			if v != nil {
1310				var applicationGatewayHTTPListenerPropertiesFormat ApplicationGatewayHTTPListenerPropertiesFormat
1311				err = json.Unmarshal(*v, &applicationGatewayHTTPListenerPropertiesFormat)
1312				if err != nil {
1313					return err
1314				}
1315				aghl.ApplicationGatewayHTTPListenerPropertiesFormat = &applicationGatewayHTTPListenerPropertiesFormat
1316			}
1317		case "name":
1318			if v != nil {
1319				var name string
1320				err = json.Unmarshal(*v, &name)
1321				if err != nil {
1322					return err
1323				}
1324				aghl.Name = &name
1325			}
1326		case "etag":
1327			if v != nil {
1328				var etag string
1329				err = json.Unmarshal(*v, &etag)
1330				if err != nil {
1331					return err
1332				}
1333				aghl.Etag = &etag
1334			}
1335		case "type":
1336			if v != nil {
1337				var typeVar string
1338				err = json.Unmarshal(*v, &typeVar)
1339				if err != nil {
1340					return err
1341				}
1342				aghl.Type = &typeVar
1343			}
1344		case "id":
1345			if v != nil {
1346				var ID string
1347				err = json.Unmarshal(*v, &ID)
1348				if err != nil {
1349					return err
1350				}
1351				aghl.ID = &ID
1352			}
1353		}
1354	}
1355
1356	return nil
1357}
1358
1359// ApplicationGatewayHTTPListenerPropertiesFormat properties of HTTP listener of an application gateway.
1360type ApplicationGatewayHTTPListenerPropertiesFormat struct {
1361	// FrontendIPConfiguration - Frontend IP configuration resource of an application gateway.
1362	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
1363	// FrontendPort - Frontend port resource of an application gateway.
1364	FrontendPort *SubResource `json:"frontendPort,omitempty"`
1365	// Protocol - Protocol of the HTTP listener. Possible values include: 'HTTP', 'HTTPS'
1366	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
1367	// HostName - Host name of HTTP listener.
1368	HostName *string `json:"hostName,omitempty"`
1369	// SslCertificate - SSL certificate resource of an application gateway.
1370	SslCertificate *SubResource `json:"sslCertificate,omitempty"`
1371	// RequireServerNameIndication - Applicable only if protocol is https. Enables SNI for multi-hosting.
1372	RequireServerNameIndication *bool `json:"requireServerNameIndication,omitempty"`
1373	// ProvisioningState - Provisioning state of the HTTP listener resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1374	ProvisioningState *string `json:"provisioningState,omitempty"`
1375	// CustomErrorConfigurations - Custom error configurations of the HTTP listener.
1376	CustomErrorConfigurations *[]ApplicationGatewayCustomError `json:"customErrorConfigurations,omitempty"`
1377}
1378
1379// ApplicationGatewayIPConfiguration IP configuration of an application gateway. Currently 1 public and 1
1380// private IP configuration is allowed.
1381type ApplicationGatewayIPConfiguration struct {
1382	// ApplicationGatewayIPConfigurationPropertiesFormat - Properties of the application gateway IP configuration.
1383	*ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"`
1384	// Name - Name of the IP configuration that is unique within an Application Gateway.
1385	Name *string `json:"name,omitempty"`
1386	// Etag - A unique read-only string that changes whenever the resource is updated.
1387	Etag *string `json:"etag,omitempty"`
1388	// Type - Type of the resource.
1389	Type *string `json:"type,omitempty"`
1390	// ID - Resource ID.
1391	ID *string `json:"id,omitempty"`
1392}
1393
1394// MarshalJSON is the custom marshaler for ApplicationGatewayIPConfiguration.
1395func (agic ApplicationGatewayIPConfiguration) MarshalJSON() ([]byte, error) {
1396	objectMap := make(map[string]interface{})
1397	if agic.ApplicationGatewayIPConfigurationPropertiesFormat != nil {
1398		objectMap["properties"] = agic.ApplicationGatewayIPConfigurationPropertiesFormat
1399	}
1400	if agic.Name != nil {
1401		objectMap["name"] = agic.Name
1402	}
1403	if agic.Etag != nil {
1404		objectMap["etag"] = agic.Etag
1405	}
1406	if agic.Type != nil {
1407		objectMap["type"] = agic.Type
1408	}
1409	if agic.ID != nil {
1410		objectMap["id"] = agic.ID
1411	}
1412	return json.Marshal(objectMap)
1413}
1414
1415// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayIPConfiguration struct.
1416func (agic *ApplicationGatewayIPConfiguration) UnmarshalJSON(body []byte) error {
1417	var m map[string]*json.RawMessage
1418	err := json.Unmarshal(body, &m)
1419	if err != nil {
1420		return err
1421	}
1422	for k, v := range m {
1423		switch k {
1424		case "properties":
1425			if v != nil {
1426				var applicationGatewayIPConfigurationPropertiesFormat ApplicationGatewayIPConfigurationPropertiesFormat
1427				err = json.Unmarshal(*v, &applicationGatewayIPConfigurationPropertiesFormat)
1428				if err != nil {
1429					return err
1430				}
1431				agic.ApplicationGatewayIPConfigurationPropertiesFormat = &applicationGatewayIPConfigurationPropertiesFormat
1432			}
1433		case "name":
1434			if v != nil {
1435				var name string
1436				err = json.Unmarshal(*v, &name)
1437				if err != nil {
1438					return err
1439				}
1440				agic.Name = &name
1441			}
1442		case "etag":
1443			if v != nil {
1444				var etag string
1445				err = json.Unmarshal(*v, &etag)
1446				if err != nil {
1447					return err
1448				}
1449				agic.Etag = &etag
1450			}
1451		case "type":
1452			if v != nil {
1453				var typeVar string
1454				err = json.Unmarshal(*v, &typeVar)
1455				if err != nil {
1456					return err
1457				}
1458				agic.Type = &typeVar
1459			}
1460		case "id":
1461			if v != nil {
1462				var ID string
1463				err = json.Unmarshal(*v, &ID)
1464				if err != nil {
1465					return err
1466				}
1467				agic.ID = &ID
1468			}
1469		}
1470	}
1471
1472	return nil
1473}
1474
1475// ApplicationGatewayIPConfigurationPropertiesFormat properties of IP configuration of an application
1476// gateway.
1477type ApplicationGatewayIPConfigurationPropertiesFormat struct {
1478	// Subnet - Reference of the subnet resource. A subnet from where application gateway gets its private address.
1479	Subnet *SubResource `json:"subnet,omitempty"`
1480	// ProvisioningState - Provisioning state of the application gateway subnet resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1481	ProvisioningState *string `json:"provisioningState,omitempty"`
1482}
1483
1484// ApplicationGatewayListResult response for ListApplicationGateways API service call.
1485type ApplicationGatewayListResult struct {
1486	autorest.Response `json:"-"`
1487	// Value - List of an application gateways in a resource group.
1488	Value *[]ApplicationGateway `json:"value,omitempty"`
1489	// NextLink - URL to get the next set of results.
1490	NextLink *string `json:"nextLink,omitempty"`
1491}
1492
1493// ApplicationGatewayListResultIterator provides access to a complete listing of ApplicationGateway values.
1494type ApplicationGatewayListResultIterator struct {
1495	i    int
1496	page ApplicationGatewayListResultPage
1497}
1498
1499// NextWithContext advances to the next value.  If there was an error making
1500// the request the iterator does not advance and the error is returned.
1501func (iter *ApplicationGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
1502	if tracing.IsEnabled() {
1503		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayListResultIterator.NextWithContext")
1504		defer func() {
1505			sc := -1
1506			if iter.Response().Response.Response != nil {
1507				sc = iter.Response().Response.Response.StatusCode
1508			}
1509			tracing.EndSpan(ctx, sc, err)
1510		}()
1511	}
1512	iter.i++
1513	if iter.i < len(iter.page.Values()) {
1514		return nil
1515	}
1516	err = iter.page.NextWithContext(ctx)
1517	if err != nil {
1518		iter.i--
1519		return err
1520	}
1521	iter.i = 0
1522	return nil
1523}
1524
1525// Next advances to the next value.  If there was an error making
1526// the request the iterator does not advance and the error is returned.
1527// Deprecated: Use NextWithContext() instead.
1528func (iter *ApplicationGatewayListResultIterator) Next() error {
1529	return iter.NextWithContext(context.Background())
1530}
1531
1532// NotDone returns true if the enumeration should be started or is not yet complete.
1533func (iter ApplicationGatewayListResultIterator) NotDone() bool {
1534	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1535}
1536
1537// Response returns the raw server response from the last page request.
1538func (iter ApplicationGatewayListResultIterator) Response() ApplicationGatewayListResult {
1539	return iter.page.Response()
1540}
1541
1542// Value returns the current value or a zero-initialized value if the
1543// iterator has advanced beyond the end of the collection.
1544func (iter ApplicationGatewayListResultIterator) Value() ApplicationGateway {
1545	if !iter.page.NotDone() {
1546		return ApplicationGateway{}
1547	}
1548	return iter.page.Values()[iter.i]
1549}
1550
1551// Creates a new instance of the ApplicationGatewayListResultIterator type.
1552func NewApplicationGatewayListResultIterator(page ApplicationGatewayListResultPage) ApplicationGatewayListResultIterator {
1553	return ApplicationGatewayListResultIterator{page: page}
1554}
1555
1556// IsEmpty returns true if the ListResult contains no values.
1557func (aglr ApplicationGatewayListResult) IsEmpty() bool {
1558	return aglr.Value == nil || len(*aglr.Value) == 0
1559}
1560
1561// hasNextLink returns true if the NextLink is not empty.
1562func (aglr ApplicationGatewayListResult) hasNextLink() bool {
1563	return aglr.NextLink != nil && len(*aglr.NextLink) != 0
1564}
1565
1566// applicationGatewayListResultPreparer prepares a request to retrieve the next set of results.
1567// It returns nil if no more results exist.
1568func (aglr ApplicationGatewayListResult) applicationGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
1569	if !aglr.hasNextLink() {
1570		return nil, nil
1571	}
1572	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1573		autorest.AsJSON(),
1574		autorest.AsGet(),
1575		autorest.WithBaseURL(to.String(aglr.NextLink)))
1576}
1577
1578// ApplicationGatewayListResultPage contains a page of ApplicationGateway values.
1579type ApplicationGatewayListResultPage struct {
1580	fn   func(context.Context, ApplicationGatewayListResult) (ApplicationGatewayListResult, error)
1581	aglr ApplicationGatewayListResult
1582}
1583
1584// NextWithContext advances to the next page of values.  If there was an error making
1585// the request the page does not advance and the error is returned.
1586func (page *ApplicationGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
1587	if tracing.IsEnabled() {
1588		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayListResultPage.NextWithContext")
1589		defer func() {
1590			sc := -1
1591			if page.Response().Response.Response != nil {
1592				sc = page.Response().Response.Response.StatusCode
1593			}
1594			tracing.EndSpan(ctx, sc, err)
1595		}()
1596	}
1597	for {
1598		next, err := page.fn(ctx, page.aglr)
1599		if err != nil {
1600			return err
1601		}
1602		page.aglr = next
1603		if !next.hasNextLink() || !next.IsEmpty() {
1604			break
1605		}
1606	}
1607	return nil
1608}
1609
1610// Next advances to the next page of values.  If there was an error making
1611// the request the page does not advance and the error is returned.
1612// Deprecated: Use NextWithContext() instead.
1613func (page *ApplicationGatewayListResultPage) Next() error {
1614	return page.NextWithContext(context.Background())
1615}
1616
1617// NotDone returns true if the page enumeration should be started or is not yet complete.
1618func (page ApplicationGatewayListResultPage) NotDone() bool {
1619	return !page.aglr.IsEmpty()
1620}
1621
1622// Response returns the raw server response from the last page request.
1623func (page ApplicationGatewayListResultPage) Response() ApplicationGatewayListResult {
1624	return page.aglr
1625}
1626
1627// Values returns the slice of values for the current page or nil if there are no values.
1628func (page ApplicationGatewayListResultPage) Values() []ApplicationGateway {
1629	if page.aglr.IsEmpty() {
1630		return nil
1631	}
1632	return *page.aglr.Value
1633}
1634
1635// Creates a new instance of the ApplicationGatewayListResultPage type.
1636func NewApplicationGatewayListResultPage(cur ApplicationGatewayListResult, getNextPage func(context.Context, ApplicationGatewayListResult) (ApplicationGatewayListResult, error)) ApplicationGatewayListResultPage {
1637	return ApplicationGatewayListResultPage{
1638		fn:   getNextPage,
1639		aglr: cur,
1640	}
1641}
1642
1643// ApplicationGatewayOnDemandProbe details of on demand test probe request
1644type ApplicationGatewayOnDemandProbe struct {
1645	// Protocol - The protocol used for the probe. Possible values include: 'HTTP', 'HTTPS'
1646	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
1647	// Host - Host name to send the probe to.
1648	Host *string `json:"host,omitempty"`
1649	// Path - Relative path of probe. Valid path starts from '/'. Probe is sent to <Protocol>://<host>:<port><path>
1650	Path *string `json:"path,omitempty"`
1651	// 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.
1652	Timeout *int32 `json:"timeout,omitempty"`
1653	// PickHostNameFromBackendHTTPSettings - Whether the host header should be picked from the backend http settings. Default value is false.
1654	PickHostNameFromBackendHTTPSettings *bool `json:"pickHostNameFromBackendHttpSettings,omitempty"`
1655	// Match - Criterion for classifying a healthy probe response.
1656	Match *ApplicationGatewayProbeHealthResponseMatch `json:"match,omitempty"`
1657	// BackendAddressPool - Reference of backend pool of application gateway to which probe request will be sent.
1658	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
1659	// BackendHTTPSettings - Reference of backend http setting of application gateway to be used for test probe.
1660	BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"`
1661}
1662
1663// ApplicationGatewayPathRule path rule of URL path map of an application gateway.
1664type ApplicationGatewayPathRule struct {
1665	// ApplicationGatewayPathRulePropertiesFormat - Properties of the application gateway path rule.
1666	*ApplicationGatewayPathRulePropertiesFormat `json:"properties,omitempty"`
1667	// Name - Name of the path rule that is unique within an Application Gateway.
1668	Name *string `json:"name,omitempty"`
1669	// Etag - A unique read-only string that changes whenever the resource is updated.
1670	Etag *string `json:"etag,omitempty"`
1671	// Type - Type of the resource.
1672	Type *string `json:"type,omitempty"`
1673	// ID - Resource ID.
1674	ID *string `json:"id,omitempty"`
1675}
1676
1677// MarshalJSON is the custom marshaler for ApplicationGatewayPathRule.
1678func (agpr ApplicationGatewayPathRule) MarshalJSON() ([]byte, error) {
1679	objectMap := make(map[string]interface{})
1680	if agpr.ApplicationGatewayPathRulePropertiesFormat != nil {
1681		objectMap["properties"] = agpr.ApplicationGatewayPathRulePropertiesFormat
1682	}
1683	if agpr.Name != nil {
1684		objectMap["name"] = agpr.Name
1685	}
1686	if agpr.Etag != nil {
1687		objectMap["etag"] = agpr.Etag
1688	}
1689	if agpr.Type != nil {
1690		objectMap["type"] = agpr.Type
1691	}
1692	if agpr.ID != nil {
1693		objectMap["id"] = agpr.ID
1694	}
1695	return json.Marshal(objectMap)
1696}
1697
1698// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayPathRule struct.
1699func (agpr *ApplicationGatewayPathRule) UnmarshalJSON(body []byte) error {
1700	var m map[string]*json.RawMessage
1701	err := json.Unmarshal(body, &m)
1702	if err != nil {
1703		return err
1704	}
1705	for k, v := range m {
1706		switch k {
1707		case "properties":
1708			if v != nil {
1709				var applicationGatewayPathRulePropertiesFormat ApplicationGatewayPathRulePropertiesFormat
1710				err = json.Unmarshal(*v, &applicationGatewayPathRulePropertiesFormat)
1711				if err != nil {
1712					return err
1713				}
1714				agpr.ApplicationGatewayPathRulePropertiesFormat = &applicationGatewayPathRulePropertiesFormat
1715			}
1716		case "name":
1717			if v != nil {
1718				var name string
1719				err = json.Unmarshal(*v, &name)
1720				if err != nil {
1721					return err
1722				}
1723				agpr.Name = &name
1724			}
1725		case "etag":
1726			if v != nil {
1727				var etag string
1728				err = json.Unmarshal(*v, &etag)
1729				if err != nil {
1730					return err
1731				}
1732				agpr.Etag = &etag
1733			}
1734		case "type":
1735			if v != nil {
1736				var typeVar string
1737				err = json.Unmarshal(*v, &typeVar)
1738				if err != nil {
1739					return err
1740				}
1741				agpr.Type = &typeVar
1742			}
1743		case "id":
1744			if v != nil {
1745				var ID string
1746				err = json.Unmarshal(*v, &ID)
1747				if err != nil {
1748					return err
1749				}
1750				agpr.ID = &ID
1751			}
1752		}
1753	}
1754
1755	return nil
1756}
1757
1758// ApplicationGatewayPathRulePropertiesFormat properties of path rule of an application gateway.
1759type ApplicationGatewayPathRulePropertiesFormat struct {
1760	// Paths - Path rules of URL path map.
1761	Paths *[]string `json:"paths,omitempty"`
1762	// BackendAddressPool - Backend address pool resource of URL path map path rule.
1763	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
1764	// BackendHTTPSettings - Backend http settings resource of URL path map path rule.
1765	BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"`
1766	// RedirectConfiguration - Redirect configuration resource of URL path map path rule.
1767	RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"`
1768	// RewriteRuleSet - Rewrite rule set resource of URL path map path rule.
1769	RewriteRuleSet *SubResource `json:"rewriteRuleSet,omitempty"`
1770	// ProvisioningState - Path rule of URL path map resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1771	ProvisioningState *string `json:"provisioningState,omitempty"`
1772}
1773
1774// ApplicationGatewayProbe probe of the application gateway.
1775type ApplicationGatewayProbe struct {
1776	// ApplicationGatewayProbePropertiesFormat - Properties of the application gateway probe.
1777	*ApplicationGatewayProbePropertiesFormat `json:"properties,omitempty"`
1778	// Name - Name of the probe that is unique within an Application Gateway.
1779	Name *string `json:"name,omitempty"`
1780	// Etag - A unique read-only string that changes whenever the resource is updated.
1781	Etag *string `json:"etag,omitempty"`
1782	// Type - Type of the resource.
1783	Type *string `json:"type,omitempty"`
1784	// ID - Resource ID.
1785	ID *string `json:"id,omitempty"`
1786}
1787
1788// MarshalJSON is the custom marshaler for ApplicationGatewayProbe.
1789func (agp ApplicationGatewayProbe) MarshalJSON() ([]byte, error) {
1790	objectMap := make(map[string]interface{})
1791	if agp.ApplicationGatewayProbePropertiesFormat != nil {
1792		objectMap["properties"] = agp.ApplicationGatewayProbePropertiesFormat
1793	}
1794	if agp.Name != nil {
1795		objectMap["name"] = agp.Name
1796	}
1797	if agp.Etag != nil {
1798		objectMap["etag"] = agp.Etag
1799	}
1800	if agp.Type != nil {
1801		objectMap["type"] = agp.Type
1802	}
1803	if agp.ID != nil {
1804		objectMap["id"] = agp.ID
1805	}
1806	return json.Marshal(objectMap)
1807}
1808
1809// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayProbe struct.
1810func (agp *ApplicationGatewayProbe) UnmarshalJSON(body []byte) error {
1811	var m map[string]*json.RawMessage
1812	err := json.Unmarshal(body, &m)
1813	if err != nil {
1814		return err
1815	}
1816	for k, v := range m {
1817		switch k {
1818		case "properties":
1819			if v != nil {
1820				var applicationGatewayProbePropertiesFormat ApplicationGatewayProbePropertiesFormat
1821				err = json.Unmarshal(*v, &applicationGatewayProbePropertiesFormat)
1822				if err != nil {
1823					return err
1824				}
1825				agp.ApplicationGatewayProbePropertiesFormat = &applicationGatewayProbePropertiesFormat
1826			}
1827		case "name":
1828			if v != nil {
1829				var name string
1830				err = json.Unmarshal(*v, &name)
1831				if err != nil {
1832					return err
1833				}
1834				agp.Name = &name
1835			}
1836		case "etag":
1837			if v != nil {
1838				var etag string
1839				err = json.Unmarshal(*v, &etag)
1840				if err != nil {
1841					return err
1842				}
1843				agp.Etag = &etag
1844			}
1845		case "type":
1846			if v != nil {
1847				var typeVar string
1848				err = json.Unmarshal(*v, &typeVar)
1849				if err != nil {
1850					return err
1851				}
1852				agp.Type = &typeVar
1853			}
1854		case "id":
1855			if v != nil {
1856				var ID string
1857				err = json.Unmarshal(*v, &ID)
1858				if err != nil {
1859					return err
1860				}
1861				agp.ID = &ID
1862			}
1863		}
1864	}
1865
1866	return nil
1867}
1868
1869// ApplicationGatewayProbeHealthResponseMatch application gateway probe health response match
1870type ApplicationGatewayProbeHealthResponseMatch struct {
1871	// Body - Body that must be contained in the health response. Default value is empty.
1872	Body *string `json:"body,omitempty"`
1873	// StatusCodes - Allowed ranges of healthy status codes. Default range of healthy status codes is 200-399.
1874	StatusCodes *[]string `json:"statusCodes,omitempty"`
1875}
1876
1877// ApplicationGatewayProbePropertiesFormat properties of probe of an application gateway.
1878type ApplicationGatewayProbePropertiesFormat struct {
1879	// Protocol - The protocol used for the probe. Possible values include: 'HTTP', 'HTTPS'
1880	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
1881	// Host - Host name to send the probe to.
1882	Host *string `json:"host,omitempty"`
1883	// Path - Relative path of probe. Valid path starts from '/'. Probe is sent to <Protocol>://<host>:<port><path>
1884	Path *string `json:"path,omitempty"`
1885	// Interval - The probing interval in seconds. This is the time interval between two consecutive probes. Acceptable values are from 1 second to 86400 seconds.
1886	Interval *int32 `json:"interval,omitempty"`
1887	// 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.
1888	Timeout *int32 `json:"timeout,omitempty"`
1889	// 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.
1890	UnhealthyThreshold *int32 `json:"unhealthyThreshold,omitempty"`
1891	// PickHostNameFromBackendHTTPSettings - Whether the host header should be picked from the backend http settings. Default value is false.
1892	PickHostNameFromBackendHTTPSettings *bool `json:"pickHostNameFromBackendHttpSettings,omitempty"`
1893	// MinServers - Minimum number of servers that are always marked healthy. Default value is 0.
1894	MinServers *int32 `json:"minServers,omitempty"`
1895	// Match - Criterion for classifying a healthy probe response.
1896	Match *ApplicationGatewayProbeHealthResponseMatch `json:"match,omitempty"`
1897	// ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1898	ProvisioningState *string `json:"provisioningState,omitempty"`
1899}
1900
1901// ApplicationGatewayPropertiesFormat properties of the application gateway.
1902type ApplicationGatewayPropertiesFormat struct {
1903	// Sku - SKU of the application gateway resource.
1904	Sku *ApplicationGatewaySku `json:"sku,omitempty"`
1905	// SslPolicy - SSL policy of the application gateway resource.
1906	SslPolicy *ApplicationGatewaySslPolicy `json:"sslPolicy,omitempty"`
1907	// OperationalState - READ-ONLY; Operational state of the application gateway resource. Possible values include: 'Stopped', 'Starting', 'Running', 'Stopping'
1908	OperationalState ApplicationGatewayOperationalState `json:"operationalState,omitempty"`
1909	// GatewayIPConfigurations - Subnets of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits).
1910	GatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"gatewayIPConfigurations,omitempty"`
1911	// AuthenticationCertificates - Authentication certificates of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits).
1912	AuthenticationCertificates *[]ApplicationGatewayAuthenticationCertificate `json:"authenticationCertificates,omitempty"`
1913	// TrustedRootCertificates - Trusted Root certificates of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits).
1914	TrustedRootCertificates *[]ApplicationGatewayTrustedRootCertificate `json:"trustedRootCertificates,omitempty"`
1915	// SslCertificates - SSL certificates of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits).
1916	SslCertificates *[]ApplicationGatewaySslCertificate `json:"sslCertificates,omitempty"`
1917	// FrontendIPConfigurations - Frontend IP addresses of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits).
1918	FrontendIPConfigurations *[]ApplicationGatewayFrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"`
1919	// FrontendPorts - Frontend ports of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits).
1920	FrontendPorts *[]ApplicationGatewayFrontendPort `json:"frontendPorts,omitempty"`
1921	// Probes - Probes of the application gateway resource.
1922	Probes *[]ApplicationGatewayProbe `json:"probes,omitempty"`
1923	// BackendAddressPools - Backend address pool of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits).
1924	BackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"backendAddressPools,omitempty"`
1925	// BackendHTTPSettingsCollection - Backend http settings of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits).
1926	BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettingsCollection,omitempty"`
1927	// HTTPListeners - Http listeners of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits).
1928	HTTPListeners *[]ApplicationGatewayHTTPListener `json:"httpListeners,omitempty"`
1929	// URLPathMaps - URL path map of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits).
1930	URLPathMaps *[]ApplicationGatewayURLPathMap `json:"urlPathMaps,omitempty"`
1931	// RequestRoutingRules - Request routing rules of the application gateway resource.
1932	RequestRoutingRules *[]ApplicationGatewayRequestRoutingRule `json:"requestRoutingRules,omitempty"`
1933	// RewriteRuleSets - Rewrite rules for the application gateway resource.
1934	RewriteRuleSets *[]ApplicationGatewayRewriteRuleSet `json:"rewriteRuleSets,omitempty"`
1935	// RedirectConfigurations - Redirect configurations of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits).
1936	RedirectConfigurations *[]ApplicationGatewayRedirectConfiguration `json:"redirectConfigurations,omitempty"`
1937	// WebApplicationFirewallConfiguration - Web application firewall configuration.
1938	WebApplicationFirewallConfiguration *ApplicationGatewayWebApplicationFirewallConfiguration `json:"webApplicationFirewallConfiguration,omitempty"`
1939	// FirewallPolicy - Reference of the FirewallPolicy resource.
1940	FirewallPolicy *SubResource `json:"firewallPolicy,omitempty"`
1941	// EnableHTTP2 - Whether HTTP2 is enabled on the application gateway resource.
1942	EnableHTTP2 *bool `json:"enableHttp2,omitempty"`
1943	// EnableFips - Whether FIPS is enabled on the application gateway resource.
1944	EnableFips *bool `json:"enableFips,omitempty"`
1945	// AutoscaleConfiguration - Autoscale Configuration.
1946	AutoscaleConfiguration *ApplicationGatewayAutoscaleConfiguration `json:"autoscaleConfiguration,omitempty"`
1947	// ResourceGUID - Resource GUID property of the application gateway resource.
1948	ResourceGUID *string `json:"resourceGuid,omitempty"`
1949	// ProvisioningState - Provisioning state of the application gateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1950	ProvisioningState *string `json:"provisioningState,omitempty"`
1951	// CustomErrorConfigurations - Custom error configurations of the application gateway resource.
1952	CustomErrorConfigurations *[]ApplicationGatewayCustomError `json:"customErrorConfigurations,omitempty"`
1953}
1954
1955// MarshalJSON is the custom marshaler for ApplicationGatewayPropertiesFormat.
1956func (agpf ApplicationGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
1957	objectMap := make(map[string]interface{})
1958	if agpf.Sku != nil {
1959		objectMap["sku"] = agpf.Sku
1960	}
1961	if agpf.SslPolicy != nil {
1962		objectMap["sslPolicy"] = agpf.SslPolicy
1963	}
1964	if agpf.GatewayIPConfigurations != nil {
1965		objectMap["gatewayIPConfigurations"] = agpf.GatewayIPConfigurations
1966	}
1967	if agpf.AuthenticationCertificates != nil {
1968		objectMap["authenticationCertificates"] = agpf.AuthenticationCertificates
1969	}
1970	if agpf.TrustedRootCertificates != nil {
1971		objectMap["trustedRootCertificates"] = agpf.TrustedRootCertificates
1972	}
1973	if agpf.SslCertificates != nil {
1974		objectMap["sslCertificates"] = agpf.SslCertificates
1975	}
1976	if agpf.FrontendIPConfigurations != nil {
1977		objectMap["frontendIPConfigurations"] = agpf.FrontendIPConfigurations
1978	}
1979	if agpf.FrontendPorts != nil {
1980		objectMap["frontendPorts"] = agpf.FrontendPorts
1981	}
1982	if agpf.Probes != nil {
1983		objectMap["probes"] = agpf.Probes
1984	}
1985	if agpf.BackendAddressPools != nil {
1986		objectMap["backendAddressPools"] = agpf.BackendAddressPools
1987	}
1988	if agpf.BackendHTTPSettingsCollection != nil {
1989		objectMap["backendHttpSettingsCollection"] = agpf.BackendHTTPSettingsCollection
1990	}
1991	if agpf.HTTPListeners != nil {
1992		objectMap["httpListeners"] = agpf.HTTPListeners
1993	}
1994	if agpf.URLPathMaps != nil {
1995		objectMap["urlPathMaps"] = agpf.URLPathMaps
1996	}
1997	if agpf.RequestRoutingRules != nil {
1998		objectMap["requestRoutingRules"] = agpf.RequestRoutingRules
1999	}
2000	if agpf.RewriteRuleSets != nil {
2001		objectMap["rewriteRuleSets"] = agpf.RewriteRuleSets
2002	}
2003	if agpf.RedirectConfigurations != nil {
2004		objectMap["redirectConfigurations"] = agpf.RedirectConfigurations
2005	}
2006	if agpf.WebApplicationFirewallConfiguration != nil {
2007		objectMap["webApplicationFirewallConfiguration"] = agpf.WebApplicationFirewallConfiguration
2008	}
2009	if agpf.FirewallPolicy != nil {
2010		objectMap["firewallPolicy"] = agpf.FirewallPolicy
2011	}
2012	if agpf.EnableHTTP2 != nil {
2013		objectMap["enableHttp2"] = agpf.EnableHTTP2
2014	}
2015	if agpf.EnableFips != nil {
2016		objectMap["enableFips"] = agpf.EnableFips
2017	}
2018	if agpf.AutoscaleConfiguration != nil {
2019		objectMap["autoscaleConfiguration"] = agpf.AutoscaleConfiguration
2020	}
2021	if agpf.ResourceGUID != nil {
2022		objectMap["resourceGuid"] = agpf.ResourceGUID
2023	}
2024	if agpf.ProvisioningState != nil {
2025		objectMap["provisioningState"] = agpf.ProvisioningState
2026	}
2027	if agpf.CustomErrorConfigurations != nil {
2028		objectMap["customErrorConfigurations"] = agpf.CustomErrorConfigurations
2029	}
2030	return json.Marshal(objectMap)
2031}
2032
2033// ApplicationGatewayRedirectConfiguration redirect configuration of an application gateway.
2034type ApplicationGatewayRedirectConfiguration struct {
2035	// ApplicationGatewayRedirectConfigurationPropertiesFormat - Properties of the application gateway redirect configuration.
2036	*ApplicationGatewayRedirectConfigurationPropertiesFormat `json:"properties,omitempty"`
2037	// Name - Name of the redirect configuration that is unique within an Application Gateway.
2038	Name *string `json:"name,omitempty"`
2039	// Etag - A unique read-only string that changes whenever the resource is updated.
2040	Etag *string `json:"etag,omitempty"`
2041	// Type - Type of the resource.
2042	Type *string `json:"type,omitempty"`
2043	// ID - Resource ID.
2044	ID *string `json:"id,omitempty"`
2045}
2046
2047// MarshalJSON is the custom marshaler for ApplicationGatewayRedirectConfiguration.
2048func (agrc ApplicationGatewayRedirectConfiguration) MarshalJSON() ([]byte, error) {
2049	objectMap := make(map[string]interface{})
2050	if agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat != nil {
2051		objectMap["properties"] = agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat
2052	}
2053	if agrc.Name != nil {
2054		objectMap["name"] = agrc.Name
2055	}
2056	if agrc.Etag != nil {
2057		objectMap["etag"] = agrc.Etag
2058	}
2059	if agrc.Type != nil {
2060		objectMap["type"] = agrc.Type
2061	}
2062	if agrc.ID != nil {
2063		objectMap["id"] = agrc.ID
2064	}
2065	return json.Marshal(objectMap)
2066}
2067
2068// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRedirectConfiguration struct.
2069func (agrc *ApplicationGatewayRedirectConfiguration) UnmarshalJSON(body []byte) error {
2070	var m map[string]*json.RawMessage
2071	err := json.Unmarshal(body, &m)
2072	if err != nil {
2073		return err
2074	}
2075	for k, v := range m {
2076		switch k {
2077		case "properties":
2078			if v != nil {
2079				var applicationGatewayRedirectConfigurationPropertiesFormat ApplicationGatewayRedirectConfigurationPropertiesFormat
2080				err = json.Unmarshal(*v, &applicationGatewayRedirectConfigurationPropertiesFormat)
2081				if err != nil {
2082					return err
2083				}
2084				agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat = &applicationGatewayRedirectConfigurationPropertiesFormat
2085			}
2086		case "name":
2087			if v != nil {
2088				var name string
2089				err = json.Unmarshal(*v, &name)
2090				if err != nil {
2091					return err
2092				}
2093				agrc.Name = &name
2094			}
2095		case "etag":
2096			if v != nil {
2097				var etag string
2098				err = json.Unmarshal(*v, &etag)
2099				if err != nil {
2100					return err
2101				}
2102				agrc.Etag = &etag
2103			}
2104		case "type":
2105			if v != nil {
2106				var typeVar string
2107				err = json.Unmarshal(*v, &typeVar)
2108				if err != nil {
2109					return err
2110				}
2111				agrc.Type = &typeVar
2112			}
2113		case "id":
2114			if v != nil {
2115				var ID string
2116				err = json.Unmarshal(*v, &ID)
2117				if err != nil {
2118					return err
2119				}
2120				agrc.ID = &ID
2121			}
2122		}
2123	}
2124
2125	return nil
2126}
2127
2128// ApplicationGatewayRedirectConfigurationPropertiesFormat properties of redirect configuration of the
2129// application gateway.
2130type ApplicationGatewayRedirectConfigurationPropertiesFormat struct {
2131	// RedirectType - HTTP redirection type. Possible values include: 'Permanent', 'Found', 'SeeOther', 'Temporary'
2132	RedirectType ApplicationGatewayRedirectType `json:"redirectType,omitempty"`
2133	// TargetListener - Reference to a listener to redirect the request to.
2134	TargetListener *SubResource `json:"targetListener,omitempty"`
2135	// TargetURL - Url to redirect the request to.
2136	TargetURL *string `json:"targetUrl,omitempty"`
2137	// IncludePath - Include path in the redirected url.
2138	IncludePath *bool `json:"includePath,omitempty"`
2139	// IncludeQueryString - Include query string in the redirected url.
2140	IncludeQueryString *bool `json:"includeQueryString,omitempty"`
2141	// RequestRoutingRules - Request routing specifying redirect configuration.
2142	RequestRoutingRules *[]SubResource `json:"requestRoutingRules,omitempty"`
2143	// URLPathMaps - Url path maps specifying default redirect configuration.
2144	URLPathMaps *[]SubResource `json:"urlPathMaps,omitempty"`
2145	// PathRules - Path rules specifying redirect configuration.
2146	PathRules *[]SubResource `json:"pathRules,omitempty"`
2147}
2148
2149// ApplicationGatewayRequestRoutingRule request routing rule of an application gateway.
2150type ApplicationGatewayRequestRoutingRule struct {
2151	// ApplicationGatewayRequestRoutingRulePropertiesFormat - Properties of the application gateway request routing rule.
2152	*ApplicationGatewayRequestRoutingRulePropertiesFormat `json:"properties,omitempty"`
2153	// Name - Name of the request routing rule that is unique within an Application Gateway.
2154	Name *string `json:"name,omitempty"`
2155	// Etag - A unique read-only string that changes whenever the resource is updated.
2156	Etag *string `json:"etag,omitempty"`
2157	// Type - Type of the resource.
2158	Type *string `json:"type,omitempty"`
2159	// ID - Resource ID.
2160	ID *string `json:"id,omitempty"`
2161}
2162
2163// MarshalJSON is the custom marshaler for ApplicationGatewayRequestRoutingRule.
2164func (agrrr ApplicationGatewayRequestRoutingRule) MarshalJSON() ([]byte, error) {
2165	objectMap := make(map[string]interface{})
2166	if agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat != nil {
2167		objectMap["properties"] = agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat
2168	}
2169	if agrrr.Name != nil {
2170		objectMap["name"] = agrrr.Name
2171	}
2172	if agrrr.Etag != nil {
2173		objectMap["etag"] = agrrr.Etag
2174	}
2175	if agrrr.Type != nil {
2176		objectMap["type"] = agrrr.Type
2177	}
2178	if agrrr.ID != nil {
2179		objectMap["id"] = agrrr.ID
2180	}
2181	return json.Marshal(objectMap)
2182}
2183
2184// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRequestRoutingRule struct.
2185func (agrrr *ApplicationGatewayRequestRoutingRule) UnmarshalJSON(body []byte) error {
2186	var m map[string]*json.RawMessage
2187	err := json.Unmarshal(body, &m)
2188	if err != nil {
2189		return err
2190	}
2191	for k, v := range m {
2192		switch k {
2193		case "properties":
2194			if v != nil {
2195				var applicationGatewayRequestRoutingRulePropertiesFormat ApplicationGatewayRequestRoutingRulePropertiesFormat
2196				err = json.Unmarshal(*v, &applicationGatewayRequestRoutingRulePropertiesFormat)
2197				if err != nil {
2198					return err
2199				}
2200				agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat = &applicationGatewayRequestRoutingRulePropertiesFormat
2201			}
2202		case "name":
2203			if v != nil {
2204				var name string
2205				err = json.Unmarshal(*v, &name)
2206				if err != nil {
2207					return err
2208				}
2209				agrrr.Name = &name
2210			}
2211		case "etag":
2212			if v != nil {
2213				var etag string
2214				err = json.Unmarshal(*v, &etag)
2215				if err != nil {
2216					return err
2217				}
2218				agrrr.Etag = &etag
2219			}
2220		case "type":
2221			if v != nil {
2222				var typeVar string
2223				err = json.Unmarshal(*v, &typeVar)
2224				if err != nil {
2225					return err
2226				}
2227				agrrr.Type = &typeVar
2228			}
2229		case "id":
2230			if v != nil {
2231				var ID string
2232				err = json.Unmarshal(*v, &ID)
2233				if err != nil {
2234					return err
2235				}
2236				agrrr.ID = &ID
2237			}
2238		}
2239	}
2240
2241	return nil
2242}
2243
2244// ApplicationGatewayRequestRoutingRulePropertiesFormat properties of request routing rule of the
2245// application gateway.
2246type ApplicationGatewayRequestRoutingRulePropertiesFormat struct {
2247	// RuleType - Rule type. Possible values include: 'Basic', 'PathBasedRouting'
2248	RuleType ApplicationGatewayRequestRoutingRuleType `json:"ruleType,omitempty"`
2249	// BackendAddressPool - Backend address pool resource of the application gateway.
2250	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
2251	// BackendHTTPSettings - Backend http settings resource of the application gateway.
2252	BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"`
2253	// HTTPListener - Http listener resource of the application gateway.
2254	HTTPListener *SubResource `json:"httpListener,omitempty"`
2255	// URLPathMap - URL path map resource of the application gateway.
2256	URLPathMap *SubResource `json:"urlPathMap,omitempty"`
2257	// RewriteRuleSet - Rewrite Rule Set resource in Basic rule of the application gateway.
2258	RewriteRuleSet *SubResource `json:"rewriteRuleSet,omitempty"`
2259	// RedirectConfiguration - Redirect configuration resource of the application gateway.
2260	RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"`
2261	// ProvisioningState - Provisioning state of the request routing rule resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2262	ProvisioningState *string `json:"provisioningState,omitempty"`
2263}
2264
2265// ApplicationGatewayRewriteRule rewrite rule of an application gateway.
2266type ApplicationGatewayRewriteRule struct {
2267	// Name - Name of the rewrite rule that is unique within an Application Gateway.
2268	Name *string `json:"name,omitempty"`
2269	// RuleSequence - Rule Sequence of the rewrite rule that determines the order of execution of a particular rule in a RewriteRuleSet.
2270	RuleSequence *int32 `json:"ruleSequence,omitempty"`
2271	// Conditions - Conditions based on which the action set execution will be evaluated.
2272	Conditions *[]ApplicationGatewayRewriteRuleCondition `json:"conditions,omitempty"`
2273	// ActionSet - Set of actions to be done as part of the rewrite Rule.
2274	ActionSet *ApplicationGatewayRewriteRuleActionSet `json:"actionSet,omitempty"`
2275}
2276
2277// ApplicationGatewayRewriteRuleActionSet set of actions in the Rewrite Rule in Application Gateway.
2278type ApplicationGatewayRewriteRuleActionSet struct {
2279	// RequestHeaderConfigurations - Request Header Actions in the Action Set
2280	RequestHeaderConfigurations *[]ApplicationGatewayHeaderConfiguration `json:"requestHeaderConfigurations,omitempty"`
2281	// ResponseHeaderConfigurations - Response Header Actions in the Action Set
2282	ResponseHeaderConfigurations *[]ApplicationGatewayHeaderConfiguration `json:"responseHeaderConfigurations,omitempty"`
2283}
2284
2285// ApplicationGatewayRewriteRuleCondition set of conditions in the Rewrite Rule in Application Gateway.
2286type ApplicationGatewayRewriteRuleCondition struct {
2287	// Variable - The condition parameter of the RewriteRuleCondition.
2288	Variable *string `json:"variable,omitempty"`
2289	// Pattern - The pattern, either fixed string or regular expression, that evaluates the truthfulness of the condition
2290	Pattern *string `json:"pattern,omitempty"`
2291	// IgnoreCase - Setting this paramter to truth value with force the pattern to do a case in-sensitive comparison.
2292	IgnoreCase *bool `json:"ignoreCase,omitempty"`
2293	// Negate - Setting this value as truth will force to check the negation of the condition given by the user.
2294	Negate *bool `json:"negate,omitempty"`
2295}
2296
2297// ApplicationGatewayRewriteRuleSet rewrite rule set of an application gateway.
2298type ApplicationGatewayRewriteRuleSet struct {
2299	// ApplicationGatewayRewriteRuleSetPropertiesFormat - Properties of the application gateway rewrite rule set.
2300	*ApplicationGatewayRewriteRuleSetPropertiesFormat `json:"properties,omitempty"`
2301	// Name - Name of the rewrite rule set that is unique within an Application Gateway.
2302	Name *string `json:"name,omitempty"`
2303	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
2304	Etag *string `json:"etag,omitempty"`
2305	// ID - Resource ID.
2306	ID *string `json:"id,omitempty"`
2307}
2308
2309// MarshalJSON is the custom marshaler for ApplicationGatewayRewriteRuleSet.
2310func (agrrs ApplicationGatewayRewriteRuleSet) MarshalJSON() ([]byte, error) {
2311	objectMap := make(map[string]interface{})
2312	if agrrs.ApplicationGatewayRewriteRuleSetPropertiesFormat != nil {
2313		objectMap["properties"] = agrrs.ApplicationGatewayRewriteRuleSetPropertiesFormat
2314	}
2315	if agrrs.Name != nil {
2316		objectMap["name"] = agrrs.Name
2317	}
2318	if agrrs.ID != nil {
2319		objectMap["id"] = agrrs.ID
2320	}
2321	return json.Marshal(objectMap)
2322}
2323
2324// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRewriteRuleSet struct.
2325func (agrrs *ApplicationGatewayRewriteRuleSet) UnmarshalJSON(body []byte) error {
2326	var m map[string]*json.RawMessage
2327	err := json.Unmarshal(body, &m)
2328	if err != nil {
2329		return err
2330	}
2331	for k, v := range m {
2332		switch k {
2333		case "properties":
2334			if v != nil {
2335				var applicationGatewayRewriteRuleSetPropertiesFormat ApplicationGatewayRewriteRuleSetPropertiesFormat
2336				err = json.Unmarshal(*v, &applicationGatewayRewriteRuleSetPropertiesFormat)
2337				if err != nil {
2338					return err
2339				}
2340				agrrs.ApplicationGatewayRewriteRuleSetPropertiesFormat = &applicationGatewayRewriteRuleSetPropertiesFormat
2341			}
2342		case "name":
2343			if v != nil {
2344				var name string
2345				err = json.Unmarshal(*v, &name)
2346				if err != nil {
2347					return err
2348				}
2349				agrrs.Name = &name
2350			}
2351		case "etag":
2352			if v != nil {
2353				var etag string
2354				err = json.Unmarshal(*v, &etag)
2355				if err != nil {
2356					return err
2357				}
2358				agrrs.Etag = &etag
2359			}
2360		case "id":
2361			if v != nil {
2362				var ID string
2363				err = json.Unmarshal(*v, &ID)
2364				if err != nil {
2365					return err
2366				}
2367				agrrs.ID = &ID
2368			}
2369		}
2370	}
2371
2372	return nil
2373}
2374
2375// ApplicationGatewayRewriteRuleSetPropertiesFormat properties of rewrite rule set of the application
2376// gateway.
2377type ApplicationGatewayRewriteRuleSetPropertiesFormat struct {
2378	// RewriteRules - Rewrite rules in the rewrite rule set.
2379	RewriteRules *[]ApplicationGatewayRewriteRule `json:"rewriteRules,omitempty"`
2380	// ProvisioningState - READ-ONLY; Provisioning state of the rewrite rule set resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2381	ProvisioningState *string `json:"provisioningState,omitempty"`
2382}
2383
2384// MarshalJSON is the custom marshaler for ApplicationGatewayRewriteRuleSetPropertiesFormat.
2385func (agrrspf ApplicationGatewayRewriteRuleSetPropertiesFormat) MarshalJSON() ([]byte, error) {
2386	objectMap := make(map[string]interface{})
2387	if agrrspf.RewriteRules != nil {
2388		objectMap["rewriteRules"] = agrrspf.RewriteRules
2389	}
2390	return json.Marshal(objectMap)
2391}
2392
2393// ApplicationGatewaysBackendHealthFuture an abstraction for monitoring and retrieving the results of a
2394// long-running operation.
2395type ApplicationGatewaysBackendHealthFuture struct {
2396	azure.FutureAPI
2397	// Result returns the result of the asynchronous operation.
2398	// If the operation has not completed it will return an error.
2399	Result func(ApplicationGatewaysClient) (ApplicationGatewayBackendHealth, error)
2400}
2401
2402// ApplicationGatewaysBackendHealthOnDemandFuture an abstraction for monitoring and retrieving the results
2403// of a long-running operation.
2404type ApplicationGatewaysBackendHealthOnDemandFuture struct {
2405	azure.FutureAPI
2406	// Result returns the result of the asynchronous operation.
2407	// If the operation has not completed it will return an error.
2408	Result func(ApplicationGatewaysClient) (ApplicationGatewayBackendHealthOnDemand, error)
2409}
2410
2411// ApplicationGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
2412// long-running operation.
2413type ApplicationGatewaysCreateOrUpdateFuture struct {
2414	azure.FutureAPI
2415	// Result returns the result of the asynchronous operation.
2416	// If the operation has not completed it will return an error.
2417	Result func(ApplicationGatewaysClient) (ApplicationGateway, error)
2418}
2419
2420// ApplicationGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
2421// long-running operation.
2422type ApplicationGatewaysDeleteFuture struct {
2423	azure.FutureAPI
2424	// Result returns the result of the asynchronous operation.
2425	// If the operation has not completed it will return an error.
2426	Result func(ApplicationGatewaysClient) (autorest.Response, error)
2427}
2428
2429// ApplicationGatewaySku SKU of an application gateway
2430type ApplicationGatewaySku struct {
2431	// Name - Name of an application gateway SKU. Possible values include: 'StandardSmall', 'StandardMedium', 'StandardLarge', 'WAFMedium', 'WAFLarge', 'StandardV2', 'WAFV2'
2432	Name ApplicationGatewaySkuName `json:"name,omitempty"`
2433	// Tier - Tier of an application gateway. Possible values include: 'ApplicationGatewayTierStandard', 'ApplicationGatewayTierWAF', 'ApplicationGatewayTierStandardV2', 'ApplicationGatewayTierWAFV2'
2434	Tier ApplicationGatewayTier `json:"tier,omitempty"`
2435	// Capacity - Capacity (instance count) of an application gateway.
2436	Capacity *int32 `json:"capacity,omitempty"`
2437}
2438
2439// ApplicationGatewaySslCertificate SSL certificates of an application gateway.
2440type ApplicationGatewaySslCertificate struct {
2441	// ApplicationGatewaySslCertificatePropertiesFormat - Properties of the application gateway SSL certificate.
2442	*ApplicationGatewaySslCertificatePropertiesFormat `json:"properties,omitempty"`
2443	// Name - Name of the SSL certificate that is unique within an Application Gateway.
2444	Name *string `json:"name,omitempty"`
2445	// Etag - A unique read-only string that changes whenever the resource is updated.
2446	Etag *string `json:"etag,omitempty"`
2447	// Type - Type of the resource.
2448	Type *string `json:"type,omitempty"`
2449	// ID - Resource ID.
2450	ID *string `json:"id,omitempty"`
2451}
2452
2453// MarshalJSON is the custom marshaler for ApplicationGatewaySslCertificate.
2454func (agsc ApplicationGatewaySslCertificate) MarshalJSON() ([]byte, error) {
2455	objectMap := make(map[string]interface{})
2456	if agsc.ApplicationGatewaySslCertificatePropertiesFormat != nil {
2457		objectMap["properties"] = agsc.ApplicationGatewaySslCertificatePropertiesFormat
2458	}
2459	if agsc.Name != nil {
2460		objectMap["name"] = agsc.Name
2461	}
2462	if agsc.Etag != nil {
2463		objectMap["etag"] = agsc.Etag
2464	}
2465	if agsc.Type != nil {
2466		objectMap["type"] = agsc.Type
2467	}
2468	if agsc.ID != nil {
2469		objectMap["id"] = agsc.ID
2470	}
2471	return json.Marshal(objectMap)
2472}
2473
2474// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslCertificate struct.
2475func (agsc *ApplicationGatewaySslCertificate) UnmarshalJSON(body []byte) error {
2476	var m map[string]*json.RawMessage
2477	err := json.Unmarshal(body, &m)
2478	if err != nil {
2479		return err
2480	}
2481	for k, v := range m {
2482		switch k {
2483		case "properties":
2484			if v != nil {
2485				var applicationGatewaySslCertificatePropertiesFormat ApplicationGatewaySslCertificatePropertiesFormat
2486				err = json.Unmarshal(*v, &applicationGatewaySslCertificatePropertiesFormat)
2487				if err != nil {
2488					return err
2489				}
2490				agsc.ApplicationGatewaySslCertificatePropertiesFormat = &applicationGatewaySslCertificatePropertiesFormat
2491			}
2492		case "name":
2493			if v != nil {
2494				var name string
2495				err = json.Unmarshal(*v, &name)
2496				if err != nil {
2497					return err
2498				}
2499				agsc.Name = &name
2500			}
2501		case "etag":
2502			if v != nil {
2503				var etag string
2504				err = json.Unmarshal(*v, &etag)
2505				if err != nil {
2506					return err
2507				}
2508				agsc.Etag = &etag
2509			}
2510		case "type":
2511			if v != nil {
2512				var typeVar string
2513				err = json.Unmarshal(*v, &typeVar)
2514				if err != nil {
2515					return err
2516				}
2517				agsc.Type = &typeVar
2518			}
2519		case "id":
2520			if v != nil {
2521				var ID string
2522				err = json.Unmarshal(*v, &ID)
2523				if err != nil {
2524					return err
2525				}
2526				agsc.ID = &ID
2527			}
2528		}
2529	}
2530
2531	return nil
2532}
2533
2534// ApplicationGatewaySslCertificatePropertiesFormat properties of SSL certificates of an application
2535// gateway.
2536type ApplicationGatewaySslCertificatePropertiesFormat struct {
2537	// Data - Base-64 encoded pfx certificate. Only applicable in PUT Request.
2538	Data *string `json:"data,omitempty"`
2539	// Password - Password for the pfx file specified in data. Only applicable in PUT request.
2540	Password *string `json:"password,omitempty"`
2541	// PublicCertData - Base-64 encoded Public cert data corresponding to pfx specified in data. Only applicable in GET request.
2542	PublicCertData *string `json:"publicCertData,omitempty"`
2543	// KeyVaultSecretID - Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault.
2544	KeyVaultSecretID *string `json:"keyVaultSecretId,omitempty"`
2545	// ProvisioningState - Provisioning state of the SSL certificate resource Possible values are: 'Updating', 'Deleting', and 'Failed'.
2546	ProvisioningState *string `json:"provisioningState,omitempty"`
2547}
2548
2549// ApplicationGatewaySslPolicy application Gateway Ssl policy.
2550type ApplicationGatewaySslPolicy struct {
2551	// DisabledSslProtocols - Ssl protocols to be disabled on application gateway.
2552	DisabledSslProtocols *[]ApplicationGatewaySslProtocol `json:"disabledSslProtocols,omitempty"`
2553	// PolicyType - Type of Ssl Policy. Possible values include: 'Predefined', 'Custom'
2554	PolicyType ApplicationGatewaySslPolicyType `json:"policyType,omitempty"`
2555	// PolicyName - Name of Ssl predefined policy. Possible values include: 'AppGwSslPolicy20150501', 'AppGwSslPolicy20170401', 'AppGwSslPolicy20170401S'
2556	PolicyName ApplicationGatewaySslPolicyName `json:"policyName,omitempty"`
2557	// CipherSuites - Ssl cipher suites to be enabled in the specified order to application gateway.
2558	CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"`
2559	// MinProtocolVersion - Minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'TLSv10', 'TLSv11', 'TLSv12'
2560	MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"`
2561}
2562
2563// ApplicationGatewaySslPredefinedPolicy an Ssl predefined policy
2564type ApplicationGatewaySslPredefinedPolicy struct {
2565	autorest.Response `json:"-"`
2566	// Name - Name of the Ssl predefined policy.
2567	Name *string `json:"name,omitempty"`
2568	// ApplicationGatewaySslPredefinedPolicyPropertiesFormat - Properties of the application gateway SSL predefined policy.
2569	*ApplicationGatewaySslPredefinedPolicyPropertiesFormat `json:"properties,omitempty"`
2570	// ID - Resource ID.
2571	ID *string `json:"id,omitempty"`
2572}
2573
2574// MarshalJSON is the custom marshaler for ApplicationGatewaySslPredefinedPolicy.
2575func (agspp ApplicationGatewaySslPredefinedPolicy) MarshalJSON() ([]byte, error) {
2576	objectMap := make(map[string]interface{})
2577	if agspp.Name != nil {
2578		objectMap["name"] = agspp.Name
2579	}
2580	if agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat != nil {
2581		objectMap["properties"] = agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat
2582	}
2583	if agspp.ID != nil {
2584		objectMap["id"] = agspp.ID
2585	}
2586	return json.Marshal(objectMap)
2587}
2588
2589// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslPredefinedPolicy struct.
2590func (agspp *ApplicationGatewaySslPredefinedPolicy) UnmarshalJSON(body []byte) error {
2591	var m map[string]*json.RawMessage
2592	err := json.Unmarshal(body, &m)
2593	if err != nil {
2594		return err
2595	}
2596	for k, v := range m {
2597		switch k {
2598		case "name":
2599			if v != nil {
2600				var name string
2601				err = json.Unmarshal(*v, &name)
2602				if err != nil {
2603					return err
2604				}
2605				agspp.Name = &name
2606			}
2607		case "properties":
2608			if v != nil {
2609				var applicationGatewaySslPredefinedPolicyPropertiesFormat ApplicationGatewaySslPredefinedPolicyPropertiesFormat
2610				err = json.Unmarshal(*v, &applicationGatewaySslPredefinedPolicyPropertiesFormat)
2611				if err != nil {
2612					return err
2613				}
2614				agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat = &applicationGatewaySslPredefinedPolicyPropertiesFormat
2615			}
2616		case "id":
2617			if v != nil {
2618				var ID string
2619				err = json.Unmarshal(*v, &ID)
2620				if err != nil {
2621					return err
2622				}
2623				agspp.ID = &ID
2624			}
2625		}
2626	}
2627
2628	return nil
2629}
2630
2631// ApplicationGatewaySslPredefinedPolicyPropertiesFormat properties of
2632// ApplicationGatewaySslPredefinedPolicy
2633type ApplicationGatewaySslPredefinedPolicyPropertiesFormat struct {
2634	// CipherSuites - Ssl cipher suites to be enabled in the specified order for application gateway.
2635	CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"`
2636	// MinProtocolVersion - Minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'TLSv10', 'TLSv11', 'TLSv12'
2637	MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"`
2638}
2639
2640// ApplicationGatewaysStartFuture an abstraction for monitoring and retrieving the results of a
2641// long-running operation.
2642type ApplicationGatewaysStartFuture struct {
2643	azure.FutureAPI
2644	// Result returns the result of the asynchronous operation.
2645	// If the operation has not completed it will return an error.
2646	Result func(ApplicationGatewaysClient) (autorest.Response, error)
2647}
2648
2649// ApplicationGatewaysStopFuture an abstraction for monitoring and retrieving the results of a long-running
2650// operation.
2651type ApplicationGatewaysStopFuture struct {
2652	azure.FutureAPI
2653	// Result returns the result of the asynchronous operation.
2654	// If the operation has not completed it will return an error.
2655	Result func(ApplicationGatewaysClient) (autorest.Response, error)
2656}
2657
2658// ApplicationGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
2659// long-running operation.
2660type ApplicationGatewaysUpdateTagsFuture struct {
2661	azure.FutureAPI
2662	// Result returns the result of the asynchronous operation.
2663	// If the operation has not completed it will return an error.
2664	Result func(ApplicationGatewaysClient) (ApplicationGateway, error)
2665}
2666
2667// ApplicationGatewayTrustedRootCertificate trusted Root certificates of an application gateway.
2668type ApplicationGatewayTrustedRootCertificate struct {
2669	// ApplicationGatewayTrustedRootCertificatePropertiesFormat - Properties of the application gateway trusted root certificate.
2670	*ApplicationGatewayTrustedRootCertificatePropertiesFormat `json:"properties,omitempty"`
2671	// Name - Name of the trusted root certificate that is unique within an Application Gateway.
2672	Name *string `json:"name,omitempty"`
2673	// Etag - A unique read-only string that changes whenever the resource is updated.
2674	Etag *string `json:"etag,omitempty"`
2675	// Type - Type of the resource.
2676	Type *string `json:"type,omitempty"`
2677	// ID - Resource ID.
2678	ID *string `json:"id,omitempty"`
2679}
2680
2681// MarshalJSON is the custom marshaler for ApplicationGatewayTrustedRootCertificate.
2682func (agtrc ApplicationGatewayTrustedRootCertificate) MarshalJSON() ([]byte, error) {
2683	objectMap := make(map[string]interface{})
2684	if agtrc.ApplicationGatewayTrustedRootCertificatePropertiesFormat != nil {
2685		objectMap["properties"] = agtrc.ApplicationGatewayTrustedRootCertificatePropertiesFormat
2686	}
2687	if agtrc.Name != nil {
2688		objectMap["name"] = agtrc.Name
2689	}
2690	if agtrc.Etag != nil {
2691		objectMap["etag"] = agtrc.Etag
2692	}
2693	if agtrc.Type != nil {
2694		objectMap["type"] = agtrc.Type
2695	}
2696	if agtrc.ID != nil {
2697		objectMap["id"] = agtrc.ID
2698	}
2699	return json.Marshal(objectMap)
2700}
2701
2702// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayTrustedRootCertificate struct.
2703func (agtrc *ApplicationGatewayTrustedRootCertificate) UnmarshalJSON(body []byte) error {
2704	var m map[string]*json.RawMessage
2705	err := json.Unmarshal(body, &m)
2706	if err != nil {
2707		return err
2708	}
2709	for k, v := range m {
2710		switch k {
2711		case "properties":
2712			if v != nil {
2713				var applicationGatewayTrustedRootCertificatePropertiesFormat ApplicationGatewayTrustedRootCertificatePropertiesFormat
2714				err = json.Unmarshal(*v, &applicationGatewayTrustedRootCertificatePropertiesFormat)
2715				if err != nil {
2716					return err
2717				}
2718				agtrc.ApplicationGatewayTrustedRootCertificatePropertiesFormat = &applicationGatewayTrustedRootCertificatePropertiesFormat
2719			}
2720		case "name":
2721			if v != nil {
2722				var name string
2723				err = json.Unmarshal(*v, &name)
2724				if err != nil {
2725					return err
2726				}
2727				agtrc.Name = &name
2728			}
2729		case "etag":
2730			if v != nil {
2731				var etag string
2732				err = json.Unmarshal(*v, &etag)
2733				if err != nil {
2734					return err
2735				}
2736				agtrc.Etag = &etag
2737			}
2738		case "type":
2739			if v != nil {
2740				var typeVar string
2741				err = json.Unmarshal(*v, &typeVar)
2742				if err != nil {
2743					return err
2744				}
2745				agtrc.Type = &typeVar
2746			}
2747		case "id":
2748			if v != nil {
2749				var ID string
2750				err = json.Unmarshal(*v, &ID)
2751				if err != nil {
2752					return err
2753				}
2754				agtrc.ID = &ID
2755			}
2756		}
2757	}
2758
2759	return nil
2760}
2761
2762// ApplicationGatewayTrustedRootCertificatePropertiesFormat trusted Root certificates properties of an
2763// application gateway.
2764type ApplicationGatewayTrustedRootCertificatePropertiesFormat struct {
2765	// Data - Certificate public data.
2766	Data *string `json:"data,omitempty"`
2767	// KeyVaultSecretID - Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault.
2768	KeyVaultSecretID *string `json:"keyVaultSecretId,omitempty"`
2769	// ProvisioningState - Provisioning state of the trusted root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2770	ProvisioningState *string `json:"provisioningState,omitempty"`
2771}
2772
2773// ApplicationGatewayURLPathMap urlPathMaps give a url path to the backend mapping information for
2774// PathBasedRouting.
2775type ApplicationGatewayURLPathMap struct {
2776	// ApplicationGatewayURLPathMapPropertiesFormat - Properties of the application gateway URL path map.
2777	*ApplicationGatewayURLPathMapPropertiesFormat `json:"properties,omitempty"`
2778	// Name - Name of the URL path map that is unique within an Application Gateway.
2779	Name *string `json:"name,omitempty"`
2780	// Etag - A unique read-only string that changes whenever the resource is updated.
2781	Etag *string `json:"etag,omitempty"`
2782	// Type - Type of the resource.
2783	Type *string `json:"type,omitempty"`
2784	// ID - Resource ID.
2785	ID *string `json:"id,omitempty"`
2786}
2787
2788// MarshalJSON is the custom marshaler for ApplicationGatewayURLPathMap.
2789func (agupm ApplicationGatewayURLPathMap) MarshalJSON() ([]byte, error) {
2790	objectMap := make(map[string]interface{})
2791	if agupm.ApplicationGatewayURLPathMapPropertiesFormat != nil {
2792		objectMap["properties"] = agupm.ApplicationGatewayURLPathMapPropertiesFormat
2793	}
2794	if agupm.Name != nil {
2795		objectMap["name"] = agupm.Name
2796	}
2797	if agupm.Etag != nil {
2798		objectMap["etag"] = agupm.Etag
2799	}
2800	if agupm.Type != nil {
2801		objectMap["type"] = agupm.Type
2802	}
2803	if agupm.ID != nil {
2804		objectMap["id"] = agupm.ID
2805	}
2806	return json.Marshal(objectMap)
2807}
2808
2809// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayURLPathMap struct.
2810func (agupm *ApplicationGatewayURLPathMap) UnmarshalJSON(body []byte) error {
2811	var m map[string]*json.RawMessage
2812	err := json.Unmarshal(body, &m)
2813	if err != nil {
2814		return err
2815	}
2816	for k, v := range m {
2817		switch k {
2818		case "properties":
2819			if v != nil {
2820				var applicationGatewayURLPathMapPropertiesFormat ApplicationGatewayURLPathMapPropertiesFormat
2821				err = json.Unmarshal(*v, &applicationGatewayURLPathMapPropertiesFormat)
2822				if err != nil {
2823					return err
2824				}
2825				agupm.ApplicationGatewayURLPathMapPropertiesFormat = &applicationGatewayURLPathMapPropertiesFormat
2826			}
2827		case "name":
2828			if v != nil {
2829				var name string
2830				err = json.Unmarshal(*v, &name)
2831				if err != nil {
2832					return err
2833				}
2834				agupm.Name = &name
2835			}
2836		case "etag":
2837			if v != nil {
2838				var etag string
2839				err = json.Unmarshal(*v, &etag)
2840				if err != nil {
2841					return err
2842				}
2843				agupm.Etag = &etag
2844			}
2845		case "type":
2846			if v != nil {
2847				var typeVar string
2848				err = json.Unmarshal(*v, &typeVar)
2849				if err != nil {
2850					return err
2851				}
2852				agupm.Type = &typeVar
2853			}
2854		case "id":
2855			if v != nil {
2856				var ID string
2857				err = json.Unmarshal(*v, &ID)
2858				if err != nil {
2859					return err
2860				}
2861				agupm.ID = &ID
2862			}
2863		}
2864	}
2865
2866	return nil
2867}
2868
2869// ApplicationGatewayURLPathMapPropertiesFormat properties of UrlPathMap of the application gateway.
2870type ApplicationGatewayURLPathMapPropertiesFormat struct {
2871	// DefaultBackendAddressPool - Default backend address pool resource of URL path map.
2872	DefaultBackendAddressPool *SubResource `json:"defaultBackendAddressPool,omitempty"`
2873	// DefaultBackendHTTPSettings - Default backend http settings resource of URL path map.
2874	DefaultBackendHTTPSettings *SubResource `json:"defaultBackendHttpSettings,omitempty"`
2875	// DefaultRewriteRuleSet - Default Rewrite rule set resource of URL path map.
2876	DefaultRewriteRuleSet *SubResource `json:"defaultRewriteRuleSet,omitempty"`
2877	// DefaultRedirectConfiguration - Default redirect configuration resource of URL path map.
2878	DefaultRedirectConfiguration *SubResource `json:"defaultRedirectConfiguration,omitempty"`
2879	// PathRules - Path rule of URL path map resource.
2880	PathRules *[]ApplicationGatewayPathRule `json:"pathRules,omitempty"`
2881	// ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2882	ProvisioningState *string `json:"provisioningState,omitempty"`
2883}
2884
2885// ApplicationGatewayWebApplicationFirewallConfiguration application gateway web application firewall
2886// configuration.
2887type ApplicationGatewayWebApplicationFirewallConfiguration struct {
2888	// Enabled - Whether the web application firewall is enabled or not.
2889	Enabled *bool `json:"enabled,omitempty"`
2890	// FirewallMode - Web application firewall mode. Possible values include: 'Detection', 'Prevention'
2891	FirewallMode ApplicationGatewayFirewallMode `json:"firewallMode,omitempty"`
2892	// RuleSetType - The type of the web application firewall rule set. Possible values are: 'OWASP'.
2893	RuleSetType *string `json:"ruleSetType,omitempty"`
2894	// RuleSetVersion - The version of the rule set type.
2895	RuleSetVersion *string `json:"ruleSetVersion,omitempty"`
2896	// DisabledRuleGroups - The disabled rule groups.
2897	DisabledRuleGroups *[]ApplicationGatewayFirewallDisabledRuleGroup `json:"disabledRuleGroups,omitempty"`
2898	// RequestBodyCheck - Whether allow WAF to check request Body.
2899	RequestBodyCheck *bool `json:"requestBodyCheck,omitempty"`
2900	// MaxRequestBodySize - Maximum request body size for WAF.
2901	MaxRequestBodySize *int32 `json:"maxRequestBodySize,omitempty"`
2902	// MaxRequestBodySizeInKb - Maximum request body size in Kb for WAF.
2903	MaxRequestBodySizeInKb *int32 `json:"maxRequestBodySizeInKb,omitempty"`
2904	// FileUploadLimitInMb - Maximum file upload size in Mb for WAF.
2905	FileUploadLimitInMb *int32 `json:"fileUploadLimitInMb,omitempty"`
2906	// Exclusions - The exclusion list.
2907	Exclusions *[]ApplicationGatewayFirewallExclusion `json:"exclusions,omitempty"`
2908}
2909
2910// ApplicationSecurityGroup an application security group in a resource group.
2911type ApplicationSecurityGroup struct {
2912	autorest.Response `json:"-"`
2913	// ApplicationSecurityGroupPropertiesFormat - Properties of the application security group.
2914	*ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"`
2915	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
2916	Etag *string `json:"etag,omitempty"`
2917	// ID - Resource ID.
2918	ID *string `json:"id,omitempty"`
2919	// Name - READ-ONLY; Resource name.
2920	Name *string `json:"name,omitempty"`
2921	// Type - READ-ONLY; Resource type.
2922	Type *string `json:"type,omitempty"`
2923	// Location - Resource location.
2924	Location *string `json:"location,omitempty"`
2925	// Tags - Resource tags.
2926	Tags map[string]*string `json:"tags"`
2927}
2928
2929// MarshalJSON is the custom marshaler for ApplicationSecurityGroup.
2930func (asg ApplicationSecurityGroup) MarshalJSON() ([]byte, error) {
2931	objectMap := make(map[string]interface{})
2932	if asg.ApplicationSecurityGroupPropertiesFormat != nil {
2933		objectMap["properties"] = asg.ApplicationSecurityGroupPropertiesFormat
2934	}
2935	if asg.ID != nil {
2936		objectMap["id"] = asg.ID
2937	}
2938	if asg.Location != nil {
2939		objectMap["location"] = asg.Location
2940	}
2941	if asg.Tags != nil {
2942		objectMap["tags"] = asg.Tags
2943	}
2944	return json.Marshal(objectMap)
2945}
2946
2947// UnmarshalJSON is the custom unmarshaler for ApplicationSecurityGroup struct.
2948func (asg *ApplicationSecurityGroup) UnmarshalJSON(body []byte) error {
2949	var m map[string]*json.RawMessage
2950	err := json.Unmarshal(body, &m)
2951	if err != nil {
2952		return err
2953	}
2954	for k, v := range m {
2955		switch k {
2956		case "properties":
2957			if v != nil {
2958				var applicationSecurityGroupPropertiesFormat ApplicationSecurityGroupPropertiesFormat
2959				err = json.Unmarshal(*v, &applicationSecurityGroupPropertiesFormat)
2960				if err != nil {
2961					return err
2962				}
2963				asg.ApplicationSecurityGroupPropertiesFormat = &applicationSecurityGroupPropertiesFormat
2964			}
2965		case "etag":
2966			if v != nil {
2967				var etag string
2968				err = json.Unmarshal(*v, &etag)
2969				if err != nil {
2970					return err
2971				}
2972				asg.Etag = &etag
2973			}
2974		case "id":
2975			if v != nil {
2976				var ID string
2977				err = json.Unmarshal(*v, &ID)
2978				if err != nil {
2979					return err
2980				}
2981				asg.ID = &ID
2982			}
2983		case "name":
2984			if v != nil {
2985				var name string
2986				err = json.Unmarshal(*v, &name)
2987				if err != nil {
2988					return err
2989				}
2990				asg.Name = &name
2991			}
2992		case "type":
2993			if v != nil {
2994				var typeVar string
2995				err = json.Unmarshal(*v, &typeVar)
2996				if err != nil {
2997					return err
2998				}
2999				asg.Type = &typeVar
3000			}
3001		case "location":
3002			if v != nil {
3003				var location string
3004				err = json.Unmarshal(*v, &location)
3005				if err != nil {
3006					return err
3007				}
3008				asg.Location = &location
3009			}
3010		case "tags":
3011			if v != nil {
3012				var tags map[string]*string
3013				err = json.Unmarshal(*v, &tags)
3014				if err != nil {
3015					return err
3016				}
3017				asg.Tags = tags
3018			}
3019		}
3020	}
3021
3022	return nil
3023}
3024
3025// ApplicationSecurityGroupListResult a list of application security groups.
3026type ApplicationSecurityGroupListResult struct {
3027	autorest.Response `json:"-"`
3028	// Value - A list of application security groups.
3029	Value *[]ApplicationSecurityGroup `json:"value,omitempty"`
3030	// NextLink - READ-ONLY; The URL to get the next set of results.
3031	NextLink *string `json:"nextLink,omitempty"`
3032}
3033
3034// MarshalJSON is the custom marshaler for ApplicationSecurityGroupListResult.
3035func (asglr ApplicationSecurityGroupListResult) MarshalJSON() ([]byte, error) {
3036	objectMap := make(map[string]interface{})
3037	if asglr.Value != nil {
3038		objectMap["value"] = asglr.Value
3039	}
3040	return json.Marshal(objectMap)
3041}
3042
3043// ApplicationSecurityGroupListResultIterator provides access to a complete listing of
3044// ApplicationSecurityGroup values.
3045type ApplicationSecurityGroupListResultIterator struct {
3046	i    int
3047	page ApplicationSecurityGroupListResultPage
3048}
3049
3050// NextWithContext advances to the next value.  If there was an error making
3051// the request the iterator does not advance and the error is returned.
3052func (iter *ApplicationSecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
3053	if tracing.IsEnabled() {
3054		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupListResultIterator.NextWithContext")
3055		defer func() {
3056			sc := -1
3057			if iter.Response().Response.Response != nil {
3058				sc = iter.Response().Response.Response.StatusCode
3059			}
3060			tracing.EndSpan(ctx, sc, err)
3061		}()
3062	}
3063	iter.i++
3064	if iter.i < len(iter.page.Values()) {
3065		return nil
3066	}
3067	err = iter.page.NextWithContext(ctx)
3068	if err != nil {
3069		iter.i--
3070		return err
3071	}
3072	iter.i = 0
3073	return nil
3074}
3075
3076// Next advances to the next value.  If there was an error making
3077// the request the iterator does not advance and the error is returned.
3078// Deprecated: Use NextWithContext() instead.
3079func (iter *ApplicationSecurityGroupListResultIterator) Next() error {
3080	return iter.NextWithContext(context.Background())
3081}
3082
3083// NotDone returns true if the enumeration should be started or is not yet complete.
3084func (iter ApplicationSecurityGroupListResultIterator) NotDone() bool {
3085	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3086}
3087
3088// Response returns the raw server response from the last page request.
3089func (iter ApplicationSecurityGroupListResultIterator) Response() ApplicationSecurityGroupListResult {
3090	return iter.page.Response()
3091}
3092
3093// Value returns the current value or a zero-initialized value if the
3094// iterator has advanced beyond the end of the collection.
3095func (iter ApplicationSecurityGroupListResultIterator) Value() ApplicationSecurityGroup {
3096	if !iter.page.NotDone() {
3097		return ApplicationSecurityGroup{}
3098	}
3099	return iter.page.Values()[iter.i]
3100}
3101
3102// Creates a new instance of the ApplicationSecurityGroupListResultIterator type.
3103func NewApplicationSecurityGroupListResultIterator(page ApplicationSecurityGroupListResultPage) ApplicationSecurityGroupListResultIterator {
3104	return ApplicationSecurityGroupListResultIterator{page: page}
3105}
3106
3107// IsEmpty returns true if the ListResult contains no values.
3108func (asglr ApplicationSecurityGroupListResult) IsEmpty() bool {
3109	return asglr.Value == nil || len(*asglr.Value) == 0
3110}
3111
3112// hasNextLink returns true if the NextLink is not empty.
3113func (asglr ApplicationSecurityGroupListResult) hasNextLink() bool {
3114	return asglr.NextLink != nil && len(*asglr.NextLink) != 0
3115}
3116
3117// applicationSecurityGroupListResultPreparer prepares a request to retrieve the next set of results.
3118// It returns nil if no more results exist.
3119func (asglr ApplicationSecurityGroupListResult) applicationSecurityGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
3120	if !asglr.hasNextLink() {
3121		return nil, nil
3122	}
3123	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3124		autorest.AsJSON(),
3125		autorest.AsGet(),
3126		autorest.WithBaseURL(to.String(asglr.NextLink)))
3127}
3128
3129// ApplicationSecurityGroupListResultPage contains a page of ApplicationSecurityGroup values.
3130type ApplicationSecurityGroupListResultPage struct {
3131	fn    func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)
3132	asglr ApplicationSecurityGroupListResult
3133}
3134
3135// NextWithContext advances to the next page of values.  If there was an error making
3136// the request the page does not advance and the error is returned.
3137func (page *ApplicationSecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
3138	if tracing.IsEnabled() {
3139		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupListResultPage.NextWithContext")
3140		defer func() {
3141			sc := -1
3142			if page.Response().Response.Response != nil {
3143				sc = page.Response().Response.Response.StatusCode
3144			}
3145			tracing.EndSpan(ctx, sc, err)
3146		}()
3147	}
3148	for {
3149		next, err := page.fn(ctx, page.asglr)
3150		if err != nil {
3151			return err
3152		}
3153		page.asglr = next
3154		if !next.hasNextLink() || !next.IsEmpty() {
3155			break
3156		}
3157	}
3158	return nil
3159}
3160
3161// Next advances to the next page of values.  If there was an error making
3162// the request the page does not advance and the error is returned.
3163// Deprecated: Use NextWithContext() instead.
3164func (page *ApplicationSecurityGroupListResultPage) Next() error {
3165	return page.NextWithContext(context.Background())
3166}
3167
3168// NotDone returns true if the page enumeration should be started or is not yet complete.
3169func (page ApplicationSecurityGroupListResultPage) NotDone() bool {
3170	return !page.asglr.IsEmpty()
3171}
3172
3173// Response returns the raw server response from the last page request.
3174func (page ApplicationSecurityGroupListResultPage) Response() ApplicationSecurityGroupListResult {
3175	return page.asglr
3176}
3177
3178// Values returns the slice of values for the current page or nil if there are no values.
3179func (page ApplicationSecurityGroupListResultPage) Values() []ApplicationSecurityGroup {
3180	if page.asglr.IsEmpty() {
3181		return nil
3182	}
3183	return *page.asglr.Value
3184}
3185
3186// Creates a new instance of the ApplicationSecurityGroupListResultPage type.
3187func NewApplicationSecurityGroupListResultPage(cur ApplicationSecurityGroupListResult, getNextPage func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)) ApplicationSecurityGroupListResultPage {
3188	return ApplicationSecurityGroupListResultPage{
3189		fn:    getNextPage,
3190		asglr: cur,
3191	}
3192}
3193
3194// ApplicationSecurityGroupPropertiesFormat application security group properties.
3195type ApplicationSecurityGroupPropertiesFormat struct {
3196	// 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.
3197	ResourceGUID *string `json:"resourceGuid,omitempty"`
3198	// ProvisioningState - READ-ONLY; The provisioning state of the application security group resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
3199	ProvisioningState *string `json:"provisioningState,omitempty"`
3200}
3201
3202// ApplicationSecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
3203// of a long-running operation.
3204type ApplicationSecurityGroupsCreateOrUpdateFuture struct {
3205	azure.FutureAPI
3206	// Result returns the result of the asynchronous operation.
3207	// If the operation has not completed it will return an error.
3208	Result func(ApplicationSecurityGroupsClient) (ApplicationSecurityGroup, error)
3209}
3210
3211// ApplicationSecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a
3212// long-running operation.
3213type ApplicationSecurityGroupsDeleteFuture struct {
3214	azure.FutureAPI
3215	// Result returns the result of the asynchronous operation.
3216	// If the operation has not completed it will return an error.
3217	Result func(ApplicationSecurityGroupsClient) (autorest.Response, error)
3218}
3219
3220// ApplicationSecurityGroupsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
3221// long-running operation.
3222type ApplicationSecurityGroupsUpdateTagsFuture struct {
3223	azure.FutureAPI
3224	// Result returns the result of the asynchronous operation.
3225	// If the operation has not completed it will return an error.
3226	Result func(ApplicationSecurityGroupsClient) (ApplicationSecurityGroup, error)
3227}
3228
3229// AuthorizationListResult response for ListAuthorizations API service call retrieves all authorizations
3230// that belongs to an ExpressRouteCircuit.
3231type AuthorizationListResult struct {
3232	autorest.Response `json:"-"`
3233	// Value - The authorizations in an ExpressRoute Circuit.
3234	Value *[]ExpressRouteCircuitAuthorization `json:"value,omitempty"`
3235	// NextLink - The URL to get the next set of results.
3236	NextLink *string `json:"nextLink,omitempty"`
3237}
3238
3239// AuthorizationListResultIterator provides access to a complete listing of
3240// ExpressRouteCircuitAuthorization values.
3241type AuthorizationListResultIterator struct {
3242	i    int
3243	page AuthorizationListResultPage
3244}
3245
3246// NextWithContext advances to the next value.  If there was an error making
3247// the request the iterator does not advance and the error is returned.
3248func (iter *AuthorizationListResultIterator) NextWithContext(ctx context.Context) (err error) {
3249	if tracing.IsEnabled() {
3250		ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultIterator.NextWithContext")
3251		defer func() {
3252			sc := -1
3253			if iter.Response().Response.Response != nil {
3254				sc = iter.Response().Response.Response.StatusCode
3255			}
3256			tracing.EndSpan(ctx, sc, err)
3257		}()
3258	}
3259	iter.i++
3260	if iter.i < len(iter.page.Values()) {
3261		return nil
3262	}
3263	err = iter.page.NextWithContext(ctx)
3264	if err != nil {
3265		iter.i--
3266		return err
3267	}
3268	iter.i = 0
3269	return nil
3270}
3271
3272// Next advances to the next value.  If there was an error making
3273// the request the iterator does not advance and the error is returned.
3274// Deprecated: Use NextWithContext() instead.
3275func (iter *AuthorizationListResultIterator) Next() error {
3276	return iter.NextWithContext(context.Background())
3277}
3278
3279// NotDone returns true if the enumeration should be started or is not yet complete.
3280func (iter AuthorizationListResultIterator) NotDone() bool {
3281	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3282}
3283
3284// Response returns the raw server response from the last page request.
3285func (iter AuthorizationListResultIterator) Response() AuthorizationListResult {
3286	return iter.page.Response()
3287}
3288
3289// Value returns the current value or a zero-initialized value if the
3290// iterator has advanced beyond the end of the collection.
3291func (iter AuthorizationListResultIterator) Value() ExpressRouteCircuitAuthorization {
3292	if !iter.page.NotDone() {
3293		return ExpressRouteCircuitAuthorization{}
3294	}
3295	return iter.page.Values()[iter.i]
3296}
3297
3298// Creates a new instance of the AuthorizationListResultIterator type.
3299func NewAuthorizationListResultIterator(page AuthorizationListResultPage) AuthorizationListResultIterator {
3300	return AuthorizationListResultIterator{page: page}
3301}
3302
3303// IsEmpty returns true if the ListResult contains no values.
3304func (alr AuthorizationListResult) IsEmpty() bool {
3305	return alr.Value == nil || len(*alr.Value) == 0
3306}
3307
3308// hasNextLink returns true if the NextLink is not empty.
3309func (alr AuthorizationListResult) hasNextLink() bool {
3310	return alr.NextLink != nil && len(*alr.NextLink) != 0
3311}
3312
3313// authorizationListResultPreparer prepares a request to retrieve the next set of results.
3314// It returns nil if no more results exist.
3315func (alr AuthorizationListResult) authorizationListResultPreparer(ctx context.Context) (*http.Request, error) {
3316	if !alr.hasNextLink() {
3317		return nil, nil
3318	}
3319	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3320		autorest.AsJSON(),
3321		autorest.AsGet(),
3322		autorest.WithBaseURL(to.String(alr.NextLink)))
3323}
3324
3325// AuthorizationListResultPage contains a page of ExpressRouteCircuitAuthorization values.
3326type AuthorizationListResultPage struct {
3327	fn  func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)
3328	alr AuthorizationListResult
3329}
3330
3331// NextWithContext advances to the next page of values.  If there was an error making
3332// the request the page does not advance and the error is returned.
3333func (page *AuthorizationListResultPage) NextWithContext(ctx context.Context) (err error) {
3334	if tracing.IsEnabled() {
3335		ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultPage.NextWithContext")
3336		defer func() {
3337			sc := -1
3338			if page.Response().Response.Response != nil {
3339				sc = page.Response().Response.Response.StatusCode
3340			}
3341			tracing.EndSpan(ctx, sc, err)
3342		}()
3343	}
3344	for {
3345		next, err := page.fn(ctx, page.alr)
3346		if err != nil {
3347			return err
3348		}
3349		page.alr = next
3350		if !next.hasNextLink() || !next.IsEmpty() {
3351			break
3352		}
3353	}
3354	return nil
3355}
3356
3357// Next advances to the next page of values.  If there was an error making
3358// the request the page does not advance and the error is returned.
3359// Deprecated: Use NextWithContext() instead.
3360func (page *AuthorizationListResultPage) Next() error {
3361	return page.NextWithContext(context.Background())
3362}
3363
3364// NotDone returns true if the page enumeration should be started or is not yet complete.
3365func (page AuthorizationListResultPage) NotDone() bool {
3366	return !page.alr.IsEmpty()
3367}
3368
3369// Response returns the raw server response from the last page request.
3370func (page AuthorizationListResultPage) Response() AuthorizationListResult {
3371	return page.alr
3372}
3373
3374// Values returns the slice of values for the current page or nil if there are no values.
3375func (page AuthorizationListResultPage) Values() []ExpressRouteCircuitAuthorization {
3376	if page.alr.IsEmpty() {
3377		return nil
3378	}
3379	return *page.alr.Value
3380}
3381
3382// Creates a new instance of the AuthorizationListResultPage type.
3383func NewAuthorizationListResultPage(cur AuthorizationListResult, getNextPage func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)) AuthorizationListResultPage {
3384	return AuthorizationListResultPage{
3385		fn:  getNextPage,
3386		alr: cur,
3387	}
3388}
3389
3390// AuthorizationPropertiesFormat properties of ExpressRouteCircuitAuthorization.
3391type AuthorizationPropertiesFormat struct {
3392	// AuthorizationKey - The authorization key.
3393	AuthorizationKey *string `json:"authorizationKey,omitempty"`
3394	// AuthorizationUseStatus - AuthorizationUseStatus. Possible values are: 'Available' and 'InUse'. Possible values include: 'Available', 'InUse'
3395	AuthorizationUseStatus AuthorizationUseStatus `json:"authorizationUseStatus,omitempty"`
3396	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
3397	ProvisioningState *string `json:"provisioningState,omitempty"`
3398}
3399
3400// Availability availability of the metric.
3401type Availability struct {
3402	// TimeGrain - The time grain of the availability.
3403	TimeGrain *string `json:"timeGrain,omitempty"`
3404	// Retention - The retention of the availability.
3405	Retention *string `json:"retention,omitempty"`
3406	// BlobDuration - Duration of the availability blob.
3407	BlobDuration *string `json:"blobDuration,omitempty"`
3408}
3409
3410// AvailableDelegation the serviceName of an AvailableDelegation indicates a possible delegation for a
3411// subnet.
3412type AvailableDelegation struct {
3413	// Name - The name of the AvailableDelegation resource.
3414	Name *string `json:"name,omitempty"`
3415	// ID - A unique identifier of the AvailableDelegation resource.
3416	ID *string `json:"id,omitempty"`
3417	// Type - Resource type.
3418	Type *string `json:"type,omitempty"`
3419	// ServiceName - The name of the service and resource
3420	ServiceName *string `json:"serviceName,omitempty"`
3421	// Actions - Describes the actions permitted to the service upon delegation
3422	Actions *[]string `json:"actions,omitempty"`
3423}
3424
3425// AvailableDelegationsResult an array of available delegations.
3426type AvailableDelegationsResult struct {
3427	autorest.Response `json:"-"`
3428	// Value - An array of available delegations.
3429	Value *[]AvailableDelegation `json:"value,omitempty"`
3430	// NextLink - READ-ONLY; The URL to get the next set of results.
3431	NextLink *string `json:"nextLink,omitempty"`
3432}
3433
3434// MarshalJSON is the custom marshaler for AvailableDelegationsResult.
3435func (adr AvailableDelegationsResult) MarshalJSON() ([]byte, error) {
3436	objectMap := make(map[string]interface{})
3437	if adr.Value != nil {
3438		objectMap["value"] = adr.Value
3439	}
3440	return json.Marshal(objectMap)
3441}
3442
3443// AvailableDelegationsResultIterator provides access to a complete listing of AvailableDelegation values.
3444type AvailableDelegationsResultIterator struct {
3445	i    int
3446	page AvailableDelegationsResultPage
3447}
3448
3449// NextWithContext advances to the next value.  If there was an error making
3450// the request the iterator does not advance and the error is returned.
3451func (iter *AvailableDelegationsResultIterator) NextWithContext(ctx context.Context) (err error) {
3452	if tracing.IsEnabled() {
3453		ctx = tracing.StartSpan(ctx, fqdn+"/AvailableDelegationsResultIterator.NextWithContext")
3454		defer func() {
3455			sc := -1
3456			if iter.Response().Response.Response != nil {
3457				sc = iter.Response().Response.Response.StatusCode
3458			}
3459			tracing.EndSpan(ctx, sc, err)
3460		}()
3461	}
3462	iter.i++
3463	if iter.i < len(iter.page.Values()) {
3464		return nil
3465	}
3466	err = iter.page.NextWithContext(ctx)
3467	if err != nil {
3468		iter.i--
3469		return err
3470	}
3471	iter.i = 0
3472	return nil
3473}
3474
3475// Next advances to the next value.  If there was an error making
3476// the request the iterator does not advance and the error is returned.
3477// Deprecated: Use NextWithContext() instead.
3478func (iter *AvailableDelegationsResultIterator) Next() error {
3479	return iter.NextWithContext(context.Background())
3480}
3481
3482// NotDone returns true if the enumeration should be started or is not yet complete.
3483func (iter AvailableDelegationsResultIterator) NotDone() bool {
3484	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3485}
3486
3487// Response returns the raw server response from the last page request.
3488func (iter AvailableDelegationsResultIterator) Response() AvailableDelegationsResult {
3489	return iter.page.Response()
3490}
3491
3492// Value returns the current value or a zero-initialized value if the
3493// iterator has advanced beyond the end of the collection.
3494func (iter AvailableDelegationsResultIterator) Value() AvailableDelegation {
3495	if !iter.page.NotDone() {
3496		return AvailableDelegation{}
3497	}
3498	return iter.page.Values()[iter.i]
3499}
3500
3501// Creates a new instance of the AvailableDelegationsResultIterator type.
3502func NewAvailableDelegationsResultIterator(page AvailableDelegationsResultPage) AvailableDelegationsResultIterator {
3503	return AvailableDelegationsResultIterator{page: page}
3504}
3505
3506// IsEmpty returns true if the ListResult contains no values.
3507func (adr AvailableDelegationsResult) IsEmpty() bool {
3508	return adr.Value == nil || len(*adr.Value) == 0
3509}
3510
3511// hasNextLink returns true if the NextLink is not empty.
3512func (adr AvailableDelegationsResult) hasNextLink() bool {
3513	return adr.NextLink != nil && len(*adr.NextLink) != 0
3514}
3515
3516// availableDelegationsResultPreparer prepares a request to retrieve the next set of results.
3517// It returns nil if no more results exist.
3518func (adr AvailableDelegationsResult) availableDelegationsResultPreparer(ctx context.Context) (*http.Request, error) {
3519	if !adr.hasNextLink() {
3520		return nil, nil
3521	}
3522	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3523		autorest.AsJSON(),
3524		autorest.AsGet(),
3525		autorest.WithBaseURL(to.String(adr.NextLink)))
3526}
3527
3528// AvailableDelegationsResultPage contains a page of AvailableDelegation values.
3529type AvailableDelegationsResultPage struct {
3530	fn  func(context.Context, AvailableDelegationsResult) (AvailableDelegationsResult, error)
3531	adr AvailableDelegationsResult
3532}
3533
3534// NextWithContext advances to the next page of values.  If there was an error making
3535// the request the page does not advance and the error is returned.
3536func (page *AvailableDelegationsResultPage) NextWithContext(ctx context.Context) (err error) {
3537	if tracing.IsEnabled() {
3538		ctx = tracing.StartSpan(ctx, fqdn+"/AvailableDelegationsResultPage.NextWithContext")
3539		defer func() {
3540			sc := -1
3541			if page.Response().Response.Response != nil {
3542				sc = page.Response().Response.Response.StatusCode
3543			}
3544			tracing.EndSpan(ctx, sc, err)
3545		}()
3546	}
3547	for {
3548		next, err := page.fn(ctx, page.adr)
3549		if err != nil {
3550			return err
3551		}
3552		page.adr = next
3553		if !next.hasNextLink() || !next.IsEmpty() {
3554			break
3555		}
3556	}
3557	return nil
3558}
3559
3560// Next advances to the next page of values.  If there was an error making
3561// the request the page does not advance and the error is returned.
3562// Deprecated: Use NextWithContext() instead.
3563func (page *AvailableDelegationsResultPage) Next() error {
3564	return page.NextWithContext(context.Background())
3565}
3566
3567// NotDone returns true if the page enumeration should be started or is not yet complete.
3568func (page AvailableDelegationsResultPage) NotDone() bool {
3569	return !page.adr.IsEmpty()
3570}
3571
3572// Response returns the raw server response from the last page request.
3573func (page AvailableDelegationsResultPage) Response() AvailableDelegationsResult {
3574	return page.adr
3575}
3576
3577// Values returns the slice of values for the current page or nil if there are no values.
3578func (page AvailableDelegationsResultPage) Values() []AvailableDelegation {
3579	if page.adr.IsEmpty() {
3580		return nil
3581	}
3582	return *page.adr.Value
3583}
3584
3585// Creates a new instance of the AvailableDelegationsResultPage type.
3586func NewAvailableDelegationsResultPage(cur AvailableDelegationsResult, getNextPage func(context.Context, AvailableDelegationsResult) (AvailableDelegationsResult, error)) AvailableDelegationsResultPage {
3587	return AvailableDelegationsResultPage{
3588		fn:  getNextPage,
3589		adr: cur,
3590	}
3591}
3592
3593// AvailableProvidersList list of available countries with details.
3594type AvailableProvidersList struct {
3595	autorest.Response `json:"-"`
3596	// Countries - List of available countries.
3597	Countries *[]AvailableProvidersListCountry `json:"countries,omitempty"`
3598}
3599
3600// AvailableProvidersListCity city or town details.
3601type AvailableProvidersListCity struct {
3602	// CityName - The city or town name.
3603	CityName *string `json:"cityName,omitempty"`
3604	// Providers - A list of Internet service providers.
3605	Providers *[]string `json:"providers,omitempty"`
3606}
3607
3608// AvailableProvidersListCountry country details.
3609type AvailableProvidersListCountry struct {
3610	// CountryName - The country name.
3611	CountryName *string `json:"countryName,omitempty"`
3612	// Providers - A list of Internet service providers.
3613	Providers *[]string `json:"providers,omitempty"`
3614	// States - List of available states in the country.
3615	States *[]AvailableProvidersListState `json:"states,omitempty"`
3616}
3617
3618// AvailableProvidersListParameters constraints that determine the list of available Internet service
3619// providers.
3620type AvailableProvidersListParameters struct {
3621	// AzureLocations - A list of Azure regions.
3622	AzureLocations *[]string `json:"azureLocations,omitempty"`
3623	// Country - The country for available providers list.
3624	Country *string `json:"country,omitempty"`
3625	// State - The state for available providers list.
3626	State *string `json:"state,omitempty"`
3627	// City - The city or town for available providers list.
3628	City *string `json:"city,omitempty"`
3629}
3630
3631// AvailableProvidersListState state details.
3632type AvailableProvidersListState struct {
3633	// StateName - The state name.
3634	StateName *string `json:"stateName,omitempty"`
3635	// Providers - A list of Internet service providers.
3636	Providers *[]string `json:"providers,omitempty"`
3637	// Cities - List of available cities or towns in the state.
3638	Cities *[]AvailableProvidersListCity `json:"cities,omitempty"`
3639}
3640
3641// AzureAsyncOperationResult the response body contains the status of the specified asynchronous operation,
3642// indicating whether it has succeeded, is in progress, or has failed. Note that this status is distinct
3643// from the HTTP status code returned for the Get Operation Status operation itself. If the asynchronous
3644// operation succeeded, the response body includes the HTTP status code for the successful request. If the
3645// asynchronous operation failed, the response body includes the HTTP status code for the failed request
3646// and error information regarding the failure.
3647type AzureAsyncOperationResult struct {
3648	// Status - Status of the Azure async operation. Possible values are: 'InProgress', 'Succeeded', and 'Failed'. Possible values include: 'OperationStatusInProgress', 'OperationStatusSucceeded', 'OperationStatusFailed'
3649	Status OperationStatus `json:"status,omitempty"`
3650	// Error - Details of the error occurred during specified asynchronous operation.
3651	Error *Error `json:"error,omitempty"`
3652}
3653
3654// AzureFirewall azure Firewall resource
3655type AzureFirewall struct {
3656	autorest.Response `json:"-"`
3657	// AzureFirewallPropertiesFormat - Properties of the azure firewall.
3658	*AzureFirewallPropertiesFormat `json:"properties,omitempty"`
3659	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
3660	Etag *string `json:"etag,omitempty"`
3661	// ID - Resource ID.
3662	ID *string `json:"id,omitempty"`
3663	// Name - READ-ONLY; Resource name.
3664	Name *string `json:"name,omitempty"`
3665	// Type - READ-ONLY; Resource type.
3666	Type *string `json:"type,omitempty"`
3667	// Location - Resource location.
3668	Location *string `json:"location,omitempty"`
3669	// Tags - Resource tags.
3670	Tags map[string]*string `json:"tags"`
3671}
3672
3673// MarshalJSON is the custom marshaler for AzureFirewall.
3674func (af AzureFirewall) MarshalJSON() ([]byte, error) {
3675	objectMap := make(map[string]interface{})
3676	if af.AzureFirewallPropertiesFormat != nil {
3677		objectMap["properties"] = af.AzureFirewallPropertiesFormat
3678	}
3679	if af.ID != nil {
3680		objectMap["id"] = af.ID
3681	}
3682	if af.Location != nil {
3683		objectMap["location"] = af.Location
3684	}
3685	if af.Tags != nil {
3686		objectMap["tags"] = af.Tags
3687	}
3688	return json.Marshal(objectMap)
3689}
3690
3691// UnmarshalJSON is the custom unmarshaler for AzureFirewall struct.
3692func (af *AzureFirewall) UnmarshalJSON(body []byte) error {
3693	var m map[string]*json.RawMessage
3694	err := json.Unmarshal(body, &m)
3695	if err != nil {
3696		return err
3697	}
3698	for k, v := range m {
3699		switch k {
3700		case "properties":
3701			if v != nil {
3702				var azureFirewallPropertiesFormat AzureFirewallPropertiesFormat
3703				err = json.Unmarshal(*v, &azureFirewallPropertiesFormat)
3704				if err != nil {
3705					return err
3706				}
3707				af.AzureFirewallPropertiesFormat = &azureFirewallPropertiesFormat
3708			}
3709		case "etag":
3710			if v != nil {
3711				var etag string
3712				err = json.Unmarshal(*v, &etag)
3713				if err != nil {
3714					return err
3715				}
3716				af.Etag = &etag
3717			}
3718		case "id":
3719			if v != nil {
3720				var ID string
3721				err = json.Unmarshal(*v, &ID)
3722				if err != nil {
3723					return err
3724				}
3725				af.ID = &ID
3726			}
3727		case "name":
3728			if v != nil {
3729				var name string
3730				err = json.Unmarshal(*v, &name)
3731				if err != nil {
3732					return err
3733				}
3734				af.Name = &name
3735			}
3736		case "type":
3737			if v != nil {
3738				var typeVar string
3739				err = json.Unmarshal(*v, &typeVar)
3740				if err != nil {
3741					return err
3742				}
3743				af.Type = &typeVar
3744			}
3745		case "location":
3746			if v != nil {
3747				var location string
3748				err = json.Unmarshal(*v, &location)
3749				if err != nil {
3750					return err
3751				}
3752				af.Location = &location
3753			}
3754		case "tags":
3755			if v != nil {
3756				var tags map[string]*string
3757				err = json.Unmarshal(*v, &tags)
3758				if err != nil {
3759					return err
3760				}
3761				af.Tags = tags
3762			}
3763		}
3764	}
3765
3766	return nil
3767}
3768
3769// AzureFirewallApplicationRule properties of an application rule.
3770type AzureFirewallApplicationRule struct {
3771	// Name - Name of the application rule.
3772	Name *string `json:"name,omitempty"`
3773	// Description - Description of the rule.
3774	Description *string `json:"description,omitempty"`
3775	// SourceAddresses - List of source IP addresses for this rule.
3776	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
3777	// Protocols - Array of ApplicationRuleProtocols.
3778	Protocols *[]AzureFirewallApplicationRuleProtocol `json:"protocols,omitempty"`
3779	// TargetFqdns - List of FQDNs for this rule.
3780	TargetFqdns *[]string `json:"targetFqdns,omitempty"`
3781	// FqdnTags - List of FQDN Tags for this rule.
3782	FqdnTags *[]string `json:"fqdnTags,omitempty"`
3783}
3784
3785// AzureFirewallApplicationRuleCollection application rule collection resource
3786type AzureFirewallApplicationRuleCollection struct {
3787	// AzureFirewallApplicationRuleCollectionPropertiesFormat - Properties of the azure firewall application rule collection.
3788	*AzureFirewallApplicationRuleCollectionPropertiesFormat `json:"properties,omitempty"`
3789	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
3790	Name *string `json:"name,omitempty"`
3791	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
3792	Etag *string `json:"etag,omitempty"`
3793	// ID - Resource ID.
3794	ID *string `json:"id,omitempty"`
3795}
3796
3797// MarshalJSON is the custom marshaler for AzureFirewallApplicationRuleCollection.
3798func (afarc AzureFirewallApplicationRuleCollection) MarshalJSON() ([]byte, error) {
3799	objectMap := make(map[string]interface{})
3800	if afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat != nil {
3801		objectMap["properties"] = afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat
3802	}
3803	if afarc.Name != nil {
3804		objectMap["name"] = afarc.Name
3805	}
3806	if afarc.ID != nil {
3807		objectMap["id"] = afarc.ID
3808	}
3809	return json.Marshal(objectMap)
3810}
3811
3812// UnmarshalJSON is the custom unmarshaler for AzureFirewallApplicationRuleCollection struct.
3813func (afarc *AzureFirewallApplicationRuleCollection) UnmarshalJSON(body []byte) error {
3814	var m map[string]*json.RawMessage
3815	err := json.Unmarshal(body, &m)
3816	if err != nil {
3817		return err
3818	}
3819	for k, v := range m {
3820		switch k {
3821		case "properties":
3822			if v != nil {
3823				var azureFirewallApplicationRuleCollectionPropertiesFormat AzureFirewallApplicationRuleCollectionPropertiesFormat
3824				err = json.Unmarshal(*v, &azureFirewallApplicationRuleCollectionPropertiesFormat)
3825				if err != nil {
3826					return err
3827				}
3828				afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat = &azureFirewallApplicationRuleCollectionPropertiesFormat
3829			}
3830		case "name":
3831			if v != nil {
3832				var name string
3833				err = json.Unmarshal(*v, &name)
3834				if err != nil {
3835					return err
3836				}
3837				afarc.Name = &name
3838			}
3839		case "etag":
3840			if v != nil {
3841				var etag string
3842				err = json.Unmarshal(*v, &etag)
3843				if err != nil {
3844					return err
3845				}
3846				afarc.Etag = &etag
3847			}
3848		case "id":
3849			if v != nil {
3850				var ID string
3851				err = json.Unmarshal(*v, &ID)
3852				if err != nil {
3853					return err
3854				}
3855				afarc.ID = &ID
3856			}
3857		}
3858	}
3859
3860	return nil
3861}
3862
3863// AzureFirewallApplicationRuleCollectionPropertiesFormat properties of the application rule collection.
3864type AzureFirewallApplicationRuleCollectionPropertiesFormat struct {
3865	// Priority - Priority of the application rule collection resource.
3866	Priority *int32 `json:"priority,omitempty"`
3867	// Action - The action type of a rule collection
3868	Action *AzureFirewallRCAction `json:"action,omitempty"`
3869	// Rules - Collection of rules used by a application rule collection.
3870	Rules *[]AzureFirewallApplicationRule `json:"rules,omitempty"`
3871	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
3872	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
3873}
3874
3875// AzureFirewallApplicationRuleProtocol properties of the application rule protocol.
3876type AzureFirewallApplicationRuleProtocol struct {
3877	// ProtocolType - Protocol type. Possible values include: 'AzureFirewallApplicationRuleProtocolTypeHTTP', 'AzureFirewallApplicationRuleProtocolTypeHTTPS'
3878	ProtocolType AzureFirewallApplicationRuleProtocolType `json:"protocolType,omitempty"`
3879	// Port - Port number for the protocol, cannot be greater than 64000. This field is optional.
3880	Port *int32 `json:"port,omitempty"`
3881}
3882
3883// AzureFirewallFqdnTag azure Firewall FQDN Tag Resource
3884type AzureFirewallFqdnTag struct {
3885	// AzureFirewallFqdnTagPropertiesFormat - Properties of the azure firewall FQDN tag.
3886	*AzureFirewallFqdnTagPropertiesFormat `json:"properties,omitempty"`
3887	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
3888	Etag *string `json:"etag,omitempty"`
3889	// ID - Resource ID.
3890	ID *string `json:"id,omitempty"`
3891	// Name - READ-ONLY; Resource name.
3892	Name *string `json:"name,omitempty"`
3893	// Type - READ-ONLY; Resource type.
3894	Type *string `json:"type,omitempty"`
3895	// Location - Resource location.
3896	Location *string `json:"location,omitempty"`
3897	// Tags - Resource tags.
3898	Tags map[string]*string `json:"tags"`
3899}
3900
3901// MarshalJSON is the custom marshaler for AzureFirewallFqdnTag.
3902func (afft AzureFirewallFqdnTag) MarshalJSON() ([]byte, error) {
3903	objectMap := make(map[string]interface{})
3904	if afft.AzureFirewallFqdnTagPropertiesFormat != nil {
3905		objectMap["properties"] = afft.AzureFirewallFqdnTagPropertiesFormat
3906	}
3907	if afft.ID != nil {
3908		objectMap["id"] = afft.ID
3909	}
3910	if afft.Location != nil {
3911		objectMap["location"] = afft.Location
3912	}
3913	if afft.Tags != nil {
3914		objectMap["tags"] = afft.Tags
3915	}
3916	return json.Marshal(objectMap)
3917}
3918
3919// UnmarshalJSON is the custom unmarshaler for AzureFirewallFqdnTag struct.
3920func (afft *AzureFirewallFqdnTag) UnmarshalJSON(body []byte) error {
3921	var m map[string]*json.RawMessage
3922	err := json.Unmarshal(body, &m)
3923	if err != nil {
3924		return err
3925	}
3926	for k, v := range m {
3927		switch k {
3928		case "properties":
3929			if v != nil {
3930				var azureFirewallFqdnTagPropertiesFormat AzureFirewallFqdnTagPropertiesFormat
3931				err = json.Unmarshal(*v, &azureFirewallFqdnTagPropertiesFormat)
3932				if err != nil {
3933					return err
3934				}
3935				afft.AzureFirewallFqdnTagPropertiesFormat = &azureFirewallFqdnTagPropertiesFormat
3936			}
3937		case "etag":
3938			if v != nil {
3939				var etag string
3940				err = json.Unmarshal(*v, &etag)
3941				if err != nil {
3942					return err
3943				}
3944				afft.Etag = &etag
3945			}
3946		case "id":
3947			if v != nil {
3948				var ID string
3949				err = json.Unmarshal(*v, &ID)
3950				if err != nil {
3951					return err
3952				}
3953				afft.ID = &ID
3954			}
3955		case "name":
3956			if v != nil {
3957				var name string
3958				err = json.Unmarshal(*v, &name)
3959				if err != nil {
3960					return err
3961				}
3962				afft.Name = &name
3963			}
3964		case "type":
3965			if v != nil {
3966				var typeVar string
3967				err = json.Unmarshal(*v, &typeVar)
3968				if err != nil {
3969					return err
3970				}
3971				afft.Type = &typeVar
3972			}
3973		case "location":
3974			if v != nil {
3975				var location string
3976				err = json.Unmarshal(*v, &location)
3977				if err != nil {
3978					return err
3979				}
3980				afft.Location = &location
3981			}
3982		case "tags":
3983			if v != nil {
3984				var tags map[string]*string
3985				err = json.Unmarshal(*v, &tags)
3986				if err != nil {
3987					return err
3988				}
3989				afft.Tags = tags
3990			}
3991		}
3992	}
3993
3994	return nil
3995}
3996
3997// AzureFirewallFqdnTagListResult response for ListAzureFirewallFqdnTags API service call.
3998type AzureFirewallFqdnTagListResult struct {
3999	autorest.Response `json:"-"`
4000	// Value - List of Azure Firewall FQDN Tags in a resource group.
4001	Value *[]AzureFirewallFqdnTag `json:"value,omitempty"`
4002	// NextLink - URL to get the next set of results.
4003	NextLink *string `json:"nextLink,omitempty"`
4004}
4005
4006// AzureFirewallFqdnTagListResultIterator provides access to a complete listing of AzureFirewallFqdnTag
4007// values.
4008type AzureFirewallFqdnTagListResultIterator struct {
4009	i    int
4010	page AzureFirewallFqdnTagListResultPage
4011}
4012
4013// NextWithContext advances to the next value.  If there was an error making
4014// the request the iterator does not advance and the error is returned.
4015func (iter *AzureFirewallFqdnTagListResultIterator) NextWithContext(ctx context.Context) (err error) {
4016	if tracing.IsEnabled() {
4017		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallFqdnTagListResultIterator.NextWithContext")
4018		defer func() {
4019			sc := -1
4020			if iter.Response().Response.Response != nil {
4021				sc = iter.Response().Response.Response.StatusCode
4022			}
4023			tracing.EndSpan(ctx, sc, err)
4024		}()
4025	}
4026	iter.i++
4027	if iter.i < len(iter.page.Values()) {
4028		return nil
4029	}
4030	err = iter.page.NextWithContext(ctx)
4031	if err != nil {
4032		iter.i--
4033		return err
4034	}
4035	iter.i = 0
4036	return nil
4037}
4038
4039// Next advances to the next value.  If there was an error making
4040// the request the iterator does not advance and the error is returned.
4041// Deprecated: Use NextWithContext() instead.
4042func (iter *AzureFirewallFqdnTagListResultIterator) Next() error {
4043	return iter.NextWithContext(context.Background())
4044}
4045
4046// NotDone returns true if the enumeration should be started or is not yet complete.
4047func (iter AzureFirewallFqdnTagListResultIterator) NotDone() bool {
4048	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4049}
4050
4051// Response returns the raw server response from the last page request.
4052func (iter AzureFirewallFqdnTagListResultIterator) Response() AzureFirewallFqdnTagListResult {
4053	return iter.page.Response()
4054}
4055
4056// Value returns the current value or a zero-initialized value if the
4057// iterator has advanced beyond the end of the collection.
4058func (iter AzureFirewallFqdnTagListResultIterator) Value() AzureFirewallFqdnTag {
4059	if !iter.page.NotDone() {
4060		return AzureFirewallFqdnTag{}
4061	}
4062	return iter.page.Values()[iter.i]
4063}
4064
4065// Creates a new instance of the AzureFirewallFqdnTagListResultIterator type.
4066func NewAzureFirewallFqdnTagListResultIterator(page AzureFirewallFqdnTagListResultPage) AzureFirewallFqdnTagListResultIterator {
4067	return AzureFirewallFqdnTagListResultIterator{page: page}
4068}
4069
4070// IsEmpty returns true if the ListResult contains no values.
4071func (afftlr AzureFirewallFqdnTagListResult) IsEmpty() bool {
4072	return afftlr.Value == nil || len(*afftlr.Value) == 0
4073}
4074
4075// hasNextLink returns true if the NextLink is not empty.
4076func (afftlr AzureFirewallFqdnTagListResult) hasNextLink() bool {
4077	return afftlr.NextLink != nil && len(*afftlr.NextLink) != 0
4078}
4079
4080// azureFirewallFqdnTagListResultPreparer prepares a request to retrieve the next set of results.
4081// It returns nil if no more results exist.
4082func (afftlr AzureFirewallFqdnTagListResult) azureFirewallFqdnTagListResultPreparer(ctx context.Context) (*http.Request, error) {
4083	if !afftlr.hasNextLink() {
4084		return nil, nil
4085	}
4086	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4087		autorest.AsJSON(),
4088		autorest.AsGet(),
4089		autorest.WithBaseURL(to.String(afftlr.NextLink)))
4090}
4091
4092// AzureFirewallFqdnTagListResultPage contains a page of AzureFirewallFqdnTag values.
4093type AzureFirewallFqdnTagListResultPage struct {
4094	fn     func(context.Context, AzureFirewallFqdnTagListResult) (AzureFirewallFqdnTagListResult, error)
4095	afftlr AzureFirewallFqdnTagListResult
4096}
4097
4098// NextWithContext advances to the next page of values.  If there was an error making
4099// the request the page does not advance and the error is returned.
4100func (page *AzureFirewallFqdnTagListResultPage) NextWithContext(ctx context.Context) (err error) {
4101	if tracing.IsEnabled() {
4102		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallFqdnTagListResultPage.NextWithContext")
4103		defer func() {
4104			sc := -1
4105			if page.Response().Response.Response != nil {
4106				sc = page.Response().Response.Response.StatusCode
4107			}
4108			tracing.EndSpan(ctx, sc, err)
4109		}()
4110	}
4111	for {
4112		next, err := page.fn(ctx, page.afftlr)
4113		if err != nil {
4114			return err
4115		}
4116		page.afftlr = next
4117		if !next.hasNextLink() || !next.IsEmpty() {
4118			break
4119		}
4120	}
4121	return nil
4122}
4123
4124// Next advances to the next page of values.  If there was an error making
4125// the request the page does not advance and the error is returned.
4126// Deprecated: Use NextWithContext() instead.
4127func (page *AzureFirewallFqdnTagListResultPage) Next() error {
4128	return page.NextWithContext(context.Background())
4129}
4130
4131// NotDone returns true if the page enumeration should be started or is not yet complete.
4132func (page AzureFirewallFqdnTagListResultPage) NotDone() bool {
4133	return !page.afftlr.IsEmpty()
4134}
4135
4136// Response returns the raw server response from the last page request.
4137func (page AzureFirewallFqdnTagListResultPage) Response() AzureFirewallFqdnTagListResult {
4138	return page.afftlr
4139}
4140
4141// Values returns the slice of values for the current page or nil if there are no values.
4142func (page AzureFirewallFqdnTagListResultPage) Values() []AzureFirewallFqdnTag {
4143	if page.afftlr.IsEmpty() {
4144		return nil
4145	}
4146	return *page.afftlr.Value
4147}
4148
4149// Creates a new instance of the AzureFirewallFqdnTagListResultPage type.
4150func NewAzureFirewallFqdnTagListResultPage(cur AzureFirewallFqdnTagListResult, getNextPage func(context.Context, AzureFirewallFqdnTagListResult) (AzureFirewallFqdnTagListResult, error)) AzureFirewallFqdnTagListResultPage {
4151	return AzureFirewallFqdnTagListResultPage{
4152		fn:     getNextPage,
4153		afftlr: cur,
4154	}
4155}
4156
4157// AzureFirewallFqdnTagPropertiesFormat azure Firewall FQDN Tag Properties
4158type AzureFirewallFqdnTagPropertiesFormat struct {
4159	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
4160	ProvisioningState *string `json:"provisioningState,omitempty"`
4161	// FqdnTagName - READ-ONLY; The name of this FQDN Tag.
4162	FqdnTagName *string `json:"fqdnTagName,omitempty"`
4163}
4164
4165// AzureFirewallIPConfiguration IP configuration of an Azure Firewall.
4166type AzureFirewallIPConfiguration struct {
4167	// AzureFirewallIPConfigurationPropertiesFormat - Properties of the azure firewall IP configuration.
4168	*AzureFirewallIPConfigurationPropertiesFormat `json:"properties,omitempty"`
4169	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
4170	Name *string `json:"name,omitempty"`
4171	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
4172	Etag *string `json:"etag,omitempty"`
4173	// ID - Resource ID.
4174	ID *string `json:"id,omitempty"`
4175}
4176
4177// MarshalJSON is the custom marshaler for AzureFirewallIPConfiguration.
4178func (afic AzureFirewallIPConfiguration) MarshalJSON() ([]byte, error) {
4179	objectMap := make(map[string]interface{})
4180	if afic.AzureFirewallIPConfigurationPropertiesFormat != nil {
4181		objectMap["properties"] = afic.AzureFirewallIPConfigurationPropertiesFormat
4182	}
4183	if afic.Name != nil {
4184		objectMap["name"] = afic.Name
4185	}
4186	if afic.ID != nil {
4187		objectMap["id"] = afic.ID
4188	}
4189	return json.Marshal(objectMap)
4190}
4191
4192// UnmarshalJSON is the custom unmarshaler for AzureFirewallIPConfiguration struct.
4193func (afic *AzureFirewallIPConfiguration) UnmarshalJSON(body []byte) error {
4194	var m map[string]*json.RawMessage
4195	err := json.Unmarshal(body, &m)
4196	if err != nil {
4197		return err
4198	}
4199	for k, v := range m {
4200		switch k {
4201		case "properties":
4202			if v != nil {
4203				var azureFirewallIPConfigurationPropertiesFormat AzureFirewallIPConfigurationPropertiesFormat
4204				err = json.Unmarshal(*v, &azureFirewallIPConfigurationPropertiesFormat)
4205				if err != nil {
4206					return err
4207				}
4208				afic.AzureFirewallIPConfigurationPropertiesFormat = &azureFirewallIPConfigurationPropertiesFormat
4209			}
4210		case "name":
4211			if v != nil {
4212				var name string
4213				err = json.Unmarshal(*v, &name)
4214				if err != nil {
4215					return err
4216				}
4217				afic.Name = &name
4218			}
4219		case "etag":
4220			if v != nil {
4221				var etag string
4222				err = json.Unmarshal(*v, &etag)
4223				if err != nil {
4224					return err
4225				}
4226				afic.Etag = &etag
4227			}
4228		case "id":
4229			if v != nil {
4230				var ID string
4231				err = json.Unmarshal(*v, &ID)
4232				if err != nil {
4233					return err
4234				}
4235				afic.ID = &ID
4236			}
4237		}
4238	}
4239
4240	return nil
4241}
4242
4243// AzureFirewallIPConfigurationPropertiesFormat properties of IP configuration of an Azure Firewall.
4244type AzureFirewallIPConfigurationPropertiesFormat struct {
4245	// PrivateIPAddress - READ-ONLY; The Firewall Internal Load Balancer IP to be used as the next hop in User Defined Routes.
4246	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
4247	// Subnet - Reference of the subnet resource. This resource must be named 'AzureFirewallSubnet'.
4248	Subnet *SubResource `json:"subnet,omitempty"`
4249	// PublicIPAddress - Reference of the PublicIP resource. This field is a mandatory input if subnet is not null.
4250	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
4251	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
4252	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
4253}
4254
4255// MarshalJSON is the custom marshaler for AzureFirewallIPConfigurationPropertiesFormat.
4256func (aficpf AzureFirewallIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
4257	objectMap := make(map[string]interface{})
4258	if aficpf.Subnet != nil {
4259		objectMap["subnet"] = aficpf.Subnet
4260	}
4261	if aficpf.PublicIPAddress != nil {
4262		objectMap["publicIPAddress"] = aficpf.PublicIPAddress
4263	}
4264	if aficpf.ProvisioningState != "" {
4265		objectMap["provisioningState"] = aficpf.ProvisioningState
4266	}
4267	return json.Marshal(objectMap)
4268}
4269
4270// AzureFirewallListResult response for ListAzureFirewalls API service call.
4271type AzureFirewallListResult struct {
4272	autorest.Response `json:"-"`
4273	// Value - List of Azure Firewalls in a resource group.
4274	Value *[]AzureFirewall `json:"value,omitempty"`
4275	// NextLink - URL to get the next set of results.
4276	NextLink *string `json:"nextLink,omitempty"`
4277}
4278
4279// AzureFirewallListResultIterator provides access to a complete listing of AzureFirewall values.
4280type AzureFirewallListResultIterator struct {
4281	i    int
4282	page AzureFirewallListResultPage
4283}
4284
4285// NextWithContext advances to the next value.  If there was an error making
4286// the request the iterator does not advance and the error is returned.
4287func (iter *AzureFirewallListResultIterator) NextWithContext(ctx context.Context) (err error) {
4288	if tracing.IsEnabled() {
4289		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallListResultIterator.NextWithContext")
4290		defer func() {
4291			sc := -1
4292			if iter.Response().Response.Response != nil {
4293				sc = iter.Response().Response.Response.StatusCode
4294			}
4295			tracing.EndSpan(ctx, sc, err)
4296		}()
4297	}
4298	iter.i++
4299	if iter.i < len(iter.page.Values()) {
4300		return nil
4301	}
4302	err = iter.page.NextWithContext(ctx)
4303	if err != nil {
4304		iter.i--
4305		return err
4306	}
4307	iter.i = 0
4308	return nil
4309}
4310
4311// Next advances to the next value.  If there was an error making
4312// the request the iterator does not advance and the error is returned.
4313// Deprecated: Use NextWithContext() instead.
4314func (iter *AzureFirewallListResultIterator) Next() error {
4315	return iter.NextWithContext(context.Background())
4316}
4317
4318// NotDone returns true if the enumeration should be started or is not yet complete.
4319func (iter AzureFirewallListResultIterator) NotDone() bool {
4320	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4321}
4322
4323// Response returns the raw server response from the last page request.
4324func (iter AzureFirewallListResultIterator) Response() AzureFirewallListResult {
4325	return iter.page.Response()
4326}
4327
4328// Value returns the current value or a zero-initialized value if the
4329// iterator has advanced beyond the end of the collection.
4330func (iter AzureFirewallListResultIterator) Value() AzureFirewall {
4331	if !iter.page.NotDone() {
4332		return AzureFirewall{}
4333	}
4334	return iter.page.Values()[iter.i]
4335}
4336
4337// Creates a new instance of the AzureFirewallListResultIterator type.
4338func NewAzureFirewallListResultIterator(page AzureFirewallListResultPage) AzureFirewallListResultIterator {
4339	return AzureFirewallListResultIterator{page: page}
4340}
4341
4342// IsEmpty returns true if the ListResult contains no values.
4343func (aflr AzureFirewallListResult) IsEmpty() bool {
4344	return aflr.Value == nil || len(*aflr.Value) == 0
4345}
4346
4347// hasNextLink returns true if the NextLink is not empty.
4348func (aflr AzureFirewallListResult) hasNextLink() bool {
4349	return aflr.NextLink != nil && len(*aflr.NextLink) != 0
4350}
4351
4352// azureFirewallListResultPreparer prepares a request to retrieve the next set of results.
4353// It returns nil if no more results exist.
4354func (aflr AzureFirewallListResult) azureFirewallListResultPreparer(ctx context.Context) (*http.Request, error) {
4355	if !aflr.hasNextLink() {
4356		return nil, nil
4357	}
4358	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4359		autorest.AsJSON(),
4360		autorest.AsGet(),
4361		autorest.WithBaseURL(to.String(aflr.NextLink)))
4362}
4363
4364// AzureFirewallListResultPage contains a page of AzureFirewall values.
4365type AzureFirewallListResultPage struct {
4366	fn   func(context.Context, AzureFirewallListResult) (AzureFirewallListResult, error)
4367	aflr AzureFirewallListResult
4368}
4369
4370// NextWithContext advances to the next page of values.  If there was an error making
4371// the request the page does not advance and the error is returned.
4372func (page *AzureFirewallListResultPage) NextWithContext(ctx context.Context) (err error) {
4373	if tracing.IsEnabled() {
4374		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallListResultPage.NextWithContext")
4375		defer func() {
4376			sc := -1
4377			if page.Response().Response.Response != nil {
4378				sc = page.Response().Response.Response.StatusCode
4379			}
4380			tracing.EndSpan(ctx, sc, err)
4381		}()
4382	}
4383	for {
4384		next, err := page.fn(ctx, page.aflr)
4385		if err != nil {
4386			return err
4387		}
4388		page.aflr = next
4389		if !next.hasNextLink() || !next.IsEmpty() {
4390			break
4391		}
4392	}
4393	return nil
4394}
4395
4396// Next advances to the next page of values.  If there was an error making
4397// the request the page does not advance and the error is returned.
4398// Deprecated: Use NextWithContext() instead.
4399func (page *AzureFirewallListResultPage) Next() error {
4400	return page.NextWithContext(context.Background())
4401}
4402
4403// NotDone returns true if the page enumeration should be started or is not yet complete.
4404func (page AzureFirewallListResultPage) NotDone() bool {
4405	return !page.aflr.IsEmpty()
4406}
4407
4408// Response returns the raw server response from the last page request.
4409func (page AzureFirewallListResultPage) Response() AzureFirewallListResult {
4410	return page.aflr
4411}
4412
4413// Values returns the slice of values for the current page or nil if there are no values.
4414func (page AzureFirewallListResultPage) Values() []AzureFirewall {
4415	if page.aflr.IsEmpty() {
4416		return nil
4417	}
4418	return *page.aflr.Value
4419}
4420
4421// Creates a new instance of the AzureFirewallListResultPage type.
4422func NewAzureFirewallListResultPage(cur AzureFirewallListResult, getNextPage func(context.Context, AzureFirewallListResult) (AzureFirewallListResult, error)) AzureFirewallListResultPage {
4423	return AzureFirewallListResultPage{
4424		fn:   getNextPage,
4425		aflr: cur,
4426	}
4427}
4428
4429// AzureFirewallNatRCAction azureFirewall NAT Rule Collection Action.
4430type AzureFirewallNatRCAction struct {
4431	// Type - The type of action. Possible values include: 'Snat', 'Dnat'
4432	Type AzureFirewallNatRCActionType `json:"type,omitempty"`
4433}
4434
4435// AzureFirewallNatRule properties of a NAT rule.
4436type AzureFirewallNatRule struct {
4437	// Name - Name of the NAT rule.
4438	Name *string `json:"name,omitempty"`
4439	// Description - Description of the rule.
4440	Description *string `json:"description,omitempty"`
4441	// SourceAddresses - List of source IP addresses for this rule.
4442	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
4443	// DestinationAddresses - List of destination IP addresses for this rule. Supports IP ranges, prefixes, and service tags.
4444	DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
4445	// DestinationPorts - List of destination ports.
4446	DestinationPorts *[]string `json:"destinationPorts,omitempty"`
4447	// Protocols - Array of AzureFirewallNetworkRuleProtocols applicable to this NAT rule.
4448	Protocols *[]AzureFirewallNetworkRuleProtocol `json:"protocols,omitempty"`
4449	// TranslatedAddress - The translated address for this NAT rule.
4450	TranslatedAddress *string `json:"translatedAddress,omitempty"`
4451	// TranslatedPort - The translated port for this NAT rule.
4452	TranslatedPort *string `json:"translatedPort,omitempty"`
4453}
4454
4455// AzureFirewallNatRuleCollection NAT rule collection resource
4456type AzureFirewallNatRuleCollection struct {
4457	// AzureFirewallNatRuleCollectionProperties - Properties of the azure firewall NAT rule collection.
4458	*AzureFirewallNatRuleCollectionProperties `json:"properties,omitempty"`
4459	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
4460	Name *string `json:"name,omitempty"`
4461	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
4462	Etag *string `json:"etag,omitempty"`
4463	// ID - Resource ID.
4464	ID *string `json:"id,omitempty"`
4465}
4466
4467// MarshalJSON is the custom marshaler for AzureFirewallNatRuleCollection.
4468func (afnrc AzureFirewallNatRuleCollection) MarshalJSON() ([]byte, error) {
4469	objectMap := make(map[string]interface{})
4470	if afnrc.AzureFirewallNatRuleCollectionProperties != nil {
4471		objectMap["properties"] = afnrc.AzureFirewallNatRuleCollectionProperties
4472	}
4473	if afnrc.Name != nil {
4474		objectMap["name"] = afnrc.Name
4475	}
4476	if afnrc.ID != nil {
4477		objectMap["id"] = afnrc.ID
4478	}
4479	return json.Marshal(objectMap)
4480}
4481
4482// UnmarshalJSON is the custom unmarshaler for AzureFirewallNatRuleCollection struct.
4483func (afnrc *AzureFirewallNatRuleCollection) UnmarshalJSON(body []byte) error {
4484	var m map[string]*json.RawMessage
4485	err := json.Unmarshal(body, &m)
4486	if err != nil {
4487		return err
4488	}
4489	for k, v := range m {
4490		switch k {
4491		case "properties":
4492			if v != nil {
4493				var azureFirewallNatRuleCollectionProperties AzureFirewallNatRuleCollectionProperties
4494				err = json.Unmarshal(*v, &azureFirewallNatRuleCollectionProperties)
4495				if err != nil {
4496					return err
4497				}
4498				afnrc.AzureFirewallNatRuleCollectionProperties = &azureFirewallNatRuleCollectionProperties
4499			}
4500		case "name":
4501			if v != nil {
4502				var name string
4503				err = json.Unmarshal(*v, &name)
4504				if err != nil {
4505					return err
4506				}
4507				afnrc.Name = &name
4508			}
4509		case "etag":
4510			if v != nil {
4511				var etag string
4512				err = json.Unmarshal(*v, &etag)
4513				if err != nil {
4514					return err
4515				}
4516				afnrc.Etag = &etag
4517			}
4518		case "id":
4519			if v != nil {
4520				var ID string
4521				err = json.Unmarshal(*v, &ID)
4522				if err != nil {
4523					return err
4524				}
4525				afnrc.ID = &ID
4526			}
4527		}
4528	}
4529
4530	return nil
4531}
4532
4533// AzureFirewallNatRuleCollectionProperties properties of the NAT rule collection.
4534type AzureFirewallNatRuleCollectionProperties struct {
4535	// Priority - Priority of the NAT rule collection resource.
4536	Priority *int32 `json:"priority,omitempty"`
4537	// Action - The action type of a NAT rule collection
4538	Action *AzureFirewallNatRCAction `json:"action,omitempty"`
4539	// Rules - Collection of rules used by a NAT rule collection.
4540	Rules *[]AzureFirewallNatRule `json:"rules,omitempty"`
4541	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
4542	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
4543}
4544
4545// AzureFirewallNetworkRule properties of the network rule.
4546type AzureFirewallNetworkRule struct {
4547	// Name - Name of the network rule.
4548	Name *string `json:"name,omitempty"`
4549	// Description - Description of the rule.
4550	Description *string `json:"description,omitempty"`
4551	// Protocols - Array of AzureFirewallNetworkRuleProtocols.
4552	Protocols *[]AzureFirewallNetworkRuleProtocol `json:"protocols,omitempty"`
4553	// SourceAddresses - List of source IP addresses for this rule.
4554	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
4555	// DestinationAddresses - List of destination IP addresses.
4556	DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
4557	// DestinationPorts - List of destination ports.
4558	DestinationPorts *[]string `json:"destinationPorts,omitempty"`
4559}
4560
4561// AzureFirewallNetworkRuleCollection network rule collection resource
4562type AzureFirewallNetworkRuleCollection struct {
4563	// AzureFirewallNetworkRuleCollectionPropertiesFormat - Properties of the azure firewall network rule collection.
4564	*AzureFirewallNetworkRuleCollectionPropertiesFormat `json:"properties,omitempty"`
4565	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
4566	Name *string `json:"name,omitempty"`
4567	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
4568	Etag *string `json:"etag,omitempty"`
4569	// ID - Resource ID.
4570	ID *string `json:"id,omitempty"`
4571}
4572
4573// MarshalJSON is the custom marshaler for AzureFirewallNetworkRuleCollection.
4574func (afnrc AzureFirewallNetworkRuleCollection) MarshalJSON() ([]byte, error) {
4575	objectMap := make(map[string]interface{})
4576	if afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat != nil {
4577		objectMap["properties"] = afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat
4578	}
4579	if afnrc.Name != nil {
4580		objectMap["name"] = afnrc.Name
4581	}
4582	if afnrc.ID != nil {
4583		objectMap["id"] = afnrc.ID
4584	}
4585	return json.Marshal(objectMap)
4586}
4587
4588// UnmarshalJSON is the custom unmarshaler for AzureFirewallNetworkRuleCollection struct.
4589func (afnrc *AzureFirewallNetworkRuleCollection) UnmarshalJSON(body []byte) error {
4590	var m map[string]*json.RawMessage
4591	err := json.Unmarshal(body, &m)
4592	if err != nil {
4593		return err
4594	}
4595	for k, v := range m {
4596		switch k {
4597		case "properties":
4598			if v != nil {
4599				var azureFirewallNetworkRuleCollectionPropertiesFormat AzureFirewallNetworkRuleCollectionPropertiesFormat
4600				err = json.Unmarshal(*v, &azureFirewallNetworkRuleCollectionPropertiesFormat)
4601				if err != nil {
4602					return err
4603				}
4604				afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat = &azureFirewallNetworkRuleCollectionPropertiesFormat
4605			}
4606		case "name":
4607			if v != nil {
4608				var name string
4609				err = json.Unmarshal(*v, &name)
4610				if err != nil {
4611					return err
4612				}
4613				afnrc.Name = &name
4614			}
4615		case "etag":
4616			if v != nil {
4617				var etag string
4618				err = json.Unmarshal(*v, &etag)
4619				if err != nil {
4620					return err
4621				}
4622				afnrc.Etag = &etag
4623			}
4624		case "id":
4625			if v != nil {
4626				var ID string
4627				err = json.Unmarshal(*v, &ID)
4628				if err != nil {
4629					return err
4630				}
4631				afnrc.ID = &ID
4632			}
4633		}
4634	}
4635
4636	return nil
4637}
4638
4639// AzureFirewallNetworkRuleCollectionPropertiesFormat properties of the network rule collection.
4640type AzureFirewallNetworkRuleCollectionPropertiesFormat struct {
4641	// Priority - Priority of the network rule collection resource.
4642	Priority *int32 `json:"priority,omitempty"`
4643	// Action - The action type of a rule collection
4644	Action *AzureFirewallRCAction `json:"action,omitempty"`
4645	// Rules - Collection of rules used by a network rule collection.
4646	Rules *[]AzureFirewallNetworkRule `json:"rules,omitempty"`
4647	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
4648	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
4649}
4650
4651// AzureFirewallPropertiesFormat properties of the Azure Firewall.
4652type AzureFirewallPropertiesFormat struct {
4653	// ApplicationRuleCollections - Collection of application rule collections used by Azure Firewall.
4654	ApplicationRuleCollections *[]AzureFirewallApplicationRuleCollection `json:"applicationRuleCollections,omitempty"`
4655	// NatRuleCollections - Collection of NAT rule collections used by Azure Firewall.
4656	NatRuleCollections *[]AzureFirewallNatRuleCollection `json:"natRuleCollections,omitempty"`
4657	// NetworkRuleCollections - Collection of network rule collections used by Azure Firewall.
4658	NetworkRuleCollections *[]AzureFirewallNetworkRuleCollection `json:"networkRuleCollections,omitempty"`
4659	// IPConfigurations - IP configuration of the Azure Firewall resource.
4660	IPConfigurations *[]AzureFirewallIPConfiguration `json:"ipConfigurations,omitempty"`
4661	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
4662	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
4663	// ThreatIntelMode - The operation mode for Threat Intelligence. Possible values include: 'AzureFirewallThreatIntelModeAlert', 'AzureFirewallThreatIntelModeDeny', 'AzureFirewallThreatIntelModeOff'
4664	ThreatIntelMode AzureFirewallThreatIntelMode `json:"threatIntelMode,omitempty"`
4665}
4666
4667// AzureFirewallRCAction properties of the AzureFirewallRCAction.
4668type AzureFirewallRCAction struct {
4669	// Type - The type of action. Possible values include: 'AzureFirewallRCActionTypeAllow', 'AzureFirewallRCActionTypeDeny'
4670	Type AzureFirewallRCActionType `json:"type,omitempty"`
4671}
4672
4673// AzureFirewallsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
4674// long-running operation.
4675type AzureFirewallsCreateOrUpdateFuture struct {
4676	azure.FutureAPI
4677	// Result returns the result of the asynchronous operation.
4678	// If the operation has not completed it will return an error.
4679	Result func(AzureFirewallsClient) (AzureFirewall, error)
4680}
4681
4682// AzureFirewallsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
4683// operation.
4684type AzureFirewallsDeleteFuture struct {
4685	azure.FutureAPI
4686	// Result returns the result of the asynchronous operation.
4687	// If the operation has not completed it will return an error.
4688	Result func(AzureFirewallsClient) (autorest.Response, error)
4689}
4690
4691// AzureReachabilityReport azure reachability report details.
4692type AzureReachabilityReport struct {
4693	autorest.Response `json:"-"`
4694	// AggregationLevel - The aggregation level of Azure reachability report. Can be Country, State or City.
4695	AggregationLevel *string `json:"aggregationLevel,omitempty"`
4696	// ProviderLocation - Parameters that define a geographic location.
4697	ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"`
4698	// ReachabilityReport - List of Azure reachability report items.
4699	ReachabilityReport *[]AzureReachabilityReportItem `json:"reachabilityReport,omitempty"`
4700}
4701
4702// AzureReachabilityReportItem azure reachability report details for a given provider location.
4703type AzureReachabilityReportItem struct {
4704	// Provider - The Internet service provider.
4705	Provider *string `json:"provider,omitempty"`
4706	// AzureLocation - The Azure region.
4707	AzureLocation *string `json:"azureLocation,omitempty"`
4708	// Latencies - List of latency details for each of the time series.
4709	Latencies *[]AzureReachabilityReportLatencyInfo `json:"latencies,omitempty"`
4710}
4711
4712// AzureReachabilityReportLatencyInfo details on latency for a time series.
4713type AzureReachabilityReportLatencyInfo struct {
4714	// TimeStamp - The time stamp.
4715	TimeStamp *date.Time `json:"timeStamp,omitempty"`
4716	// Score - The relative latency score between 1 and 100, higher values indicating a faster connection.
4717	Score *int32 `json:"score,omitempty"`
4718}
4719
4720// AzureReachabilityReportLocation parameters that define a geographic location.
4721type AzureReachabilityReportLocation struct {
4722	// Country - The name of the country.
4723	Country *string `json:"country,omitempty"`
4724	// State - The name of the state.
4725	State *string `json:"state,omitempty"`
4726	// City - The name of the city or town.
4727	City *string `json:"city,omitempty"`
4728}
4729
4730// AzureReachabilityReportParameters geographic and time constraints for Azure reachability report.
4731type AzureReachabilityReportParameters struct {
4732	// ProviderLocation - Parameters that define a geographic location.
4733	ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"`
4734	// Providers - List of Internet service providers.
4735	Providers *[]string `json:"providers,omitempty"`
4736	// AzureLocations - Optional Azure regions to scope the query to.
4737	AzureLocations *[]string `json:"azureLocations,omitempty"`
4738	// StartTime - The start time for the Azure reachability report.
4739	StartTime *date.Time `json:"startTime,omitempty"`
4740	// EndTime - The end time for the Azure reachability report.
4741	EndTime *date.Time `json:"endTime,omitempty"`
4742}
4743
4744// BackendAddressPool pool of backend IP addresses.
4745type BackendAddressPool struct {
4746	autorest.Response `json:"-"`
4747	// BackendAddressPoolPropertiesFormat - Properties of load balancer backend address pool.
4748	*BackendAddressPoolPropertiesFormat `json:"properties,omitempty"`
4749	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
4750	Name *string `json:"name,omitempty"`
4751	// Etag - A unique read-only string that changes whenever the resource is updated.
4752	Etag *string `json:"etag,omitempty"`
4753	// ID - Resource ID.
4754	ID *string `json:"id,omitempty"`
4755}
4756
4757// MarshalJSON is the custom marshaler for BackendAddressPool.
4758func (bap BackendAddressPool) MarshalJSON() ([]byte, error) {
4759	objectMap := make(map[string]interface{})
4760	if bap.BackendAddressPoolPropertiesFormat != nil {
4761		objectMap["properties"] = bap.BackendAddressPoolPropertiesFormat
4762	}
4763	if bap.Name != nil {
4764		objectMap["name"] = bap.Name
4765	}
4766	if bap.Etag != nil {
4767		objectMap["etag"] = bap.Etag
4768	}
4769	if bap.ID != nil {
4770		objectMap["id"] = bap.ID
4771	}
4772	return json.Marshal(objectMap)
4773}
4774
4775// UnmarshalJSON is the custom unmarshaler for BackendAddressPool struct.
4776func (bap *BackendAddressPool) UnmarshalJSON(body []byte) error {
4777	var m map[string]*json.RawMessage
4778	err := json.Unmarshal(body, &m)
4779	if err != nil {
4780		return err
4781	}
4782	for k, v := range m {
4783		switch k {
4784		case "properties":
4785			if v != nil {
4786				var backendAddressPoolPropertiesFormat BackendAddressPoolPropertiesFormat
4787				err = json.Unmarshal(*v, &backendAddressPoolPropertiesFormat)
4788				if err != nil {
4789					return err
4790				}
4791				bap.BackendAddressPoolPropertiesFormat = &backendAddressPoolPropertiesFormat
4792			}
4793		case "name":
4794			if v != nil {
4795				var name string
4796				err = json.Unmarshal(*v, &name)
4797				if err != nil {
4798					return err
4799				}
4800				bap.Name = &name
4801			}
4802		case "etag":
4803			if v != nil {
4804				var etag string
4805				err = json.Unmarshal(*v, &etag)
4806				if err != nil {
4807					return err
4808				}
4809				bap.Etag = &etag
4810			}
4811		case "id":
4812			if v != nil {
4813				var ID string
4814				err = json.Unmarshal(*v, &ID)
4815				if err != nil {
4816					return err
4817				}
4818				bap.ID = &ID
4819			}
4820		}
4821	}
4822
4823	return nil
4824}
4825
4826// BackendAddressPoolPropertiesFormat properties of the backend address pool.
4827type BackendAddressPoolPropertiesFormat struct {
4828	// BackendIPConfigurations - READ-ONLY; Gets collection of references to IP addresses defined in network interfaces.
4829	BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"`
4830	// LoadBalancingRules - READ-ONLY; Gets load balancing rules that use this backend address pool.
4831	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
4832	// OutboundRule - READ-ONLY; Gets outbound rules that use this backend address pool.
4833	OutboundRule *SubResource `json:"outboundRule,omitempty"`
4834	// OutboundRules - READ-ONLY; Gets outbound rules that use this backend address pool.
4835	OutboundRules *[]SubResource `json:"outboundRules,omitempty"`
4836	// ProvisioningState - Get provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
4837	ProvisioningState *string `json:"provisioningState,omitempty"`
4838}
4839
4840// MarshalJSON is the custom marshaler for BackendAddressPoolPropertiesFormat.
4841func (bappf BackendAddressPoolPropertiesFormat) MarshalJSON() ([]byte, error) {
4842	objectMap := make(map[string]interface{})
4843	if bappf.ProvisioningState != nil {
4844		objectMap["provisioningState"] = bappf.ProvisioningState
4845	}
4846	return json.Marshal(objectMap)
4847}
4848
4849// BGPCommunity contains bgp community information offered in Service Community resources.
4850type BGPCommunity struct {
4851	// ServiceSupportedRegion - The region which the service support. e.g. For O365, region is Global.
4852	ServiceSupportedRegion *string `json:"serviceSupportedRegion,omitempty"`
4853	// CommunityName - The name of the bgp community. e.g. Skype.
4854	CommunityName *string `json:"communityName,omitempty"`
4855	// CommunityValue - The value of the bgp community. For more information: https://docs.microsoft.com/en-us/azure/expressroute/expressroute-routing.
4856	CommunityValue *string `json:"communityValue,omitempty"`
4857	// CommunityPrefixes - The prefixes that the bgp community contains.
4858	CommunityPrefixes *[]string `json:"communityPrefixes,omitempty"`
4859	// IsAuthorizedToUse - Customer is authorized to use bgp community or not.
4860	IsAuthorizedToUse *bool `json:"isAuthorizedToUse,omitempty"`
4861	// ServiceGroup - The service group of the bgp community contains.
4862	ServiceGroup *string `json:"serviceGroup,omitempty"`
4863}
4864
4865// BgpPeerStatus BGP peer status details
4866type BgpPeerStatus struct {
4867	// LocalAddress - READ-ONLY; The virtual network gateway's local address
4868	LocalAddress *string `json:"localAddress,omitempty"`
4869	// Neighbor - READ-ONLY; The remote BGP peer
4870	Neighbor *string `json:"neighbor,omitempty"`
4871	// Asn - READ-ONLY; The autonomous system number of the remote BGP peer
4872	Asn *int32 `json:"asn,omitempty"`
4873	// State - READ-ONLY; The BGP peer state. Possible values include: 'BgpPeerStateUnknown', 'BgpPeerStateStopped', 'BgpPeerStateIdle', 'BgpPeerStateConnecting', 'BgpPeerStateConnected'
4874	State BgpPeerState `json:"state,omitempty"`
4875	// ConnectedDuration - READ-ONLY; For how long the peering has been up
4876	ConnectedDuration *string `json:"connectedDuration,omitempty"`
4877	// RoutesReceived - READ-ONLY; The number of routes learned from this peer
4878	RoutesReceived *int64 `json:"routesReceived,omitempty"`
4879	// MessagesSent - READ-ONLY; The number of BGP messages sent
4880	MessagesSent *int64 `json:"messagesSent,omitempty"`
4881	// MessagesReceived - READ-ONLY; The number of BGP messages received
4882	MessagesReceived *int64 `json:"messagesReceived,omitempty"`
4883}
4884
4885// BgpPeerStatusListResult response for list BGP peer status API service call
4886type BgpPeerStatusListResult struct {
4887	autorest.Response `json:"-"`
4888	// Value - List of BGP peers
4889	Value *[]BgpPeerStatus `json:"value,omitempty"`
4890}
4891
4892// BgpServiceCommunity service Community Properties.
4893type BgpServiceCommunity struct {
4894	// BgpServiceCommunityPropertiesFormat - Properties of the BGP service community.
4895	*BgpServiceCommunityPropertiesFormat `json:"properties,omitempty"`
4896	// ID - Resource ID.
4897	ID *string `json:"id,omitempty"`
4898	// Name - READ-ONLY; Resource name.
4899	Name *string `json:"name,omitempty"`
4900	// Type - READ-ONLY; Resource type.
4901	Type *string `json:"type,omitempty"`
4902	// Location - Resource location.
4903	Location *string `json:"location,omitempty"`
4904	// Tags - Resource tags.
4905	Tags map[string]*string `json:"tags"`
4906}
4907
4908// MarshalJSON is the custom marshaler for BgpServiceCommunity.
4909func (bsc BgpServiceCommunity) MarshalJSON() ([]byte, error) {
4910	objectMap := make(map[string]interface{})
4911	if bsc.BgpServiceCommunityPropertiesFormat != nil {
4912		objectMap["properties"] = bsc.BgpServiceCommunityPropertiesFormat
4913	}
4914	if bsc.ID != nil {
4915		objectMap["id"] = bsc.ID
4916	}
4917	if bsc.Location != nil {
4918		objectMap["location"] = bsc.Location
4919	}
4920	if bsc.Tags != nil {
4921		objectMap["tags"] = bsc.Tags
4922	}
4923	return json.Marshal(objectMap)
4924}
4925
4926// UnmarshalJSON is the custom unmarshaler for BgpServiceCommunity struct.
4927func (bsc *BgpServiceCommunity) UnmarshalJSON(body []byte) error {
4928	var m map[string]*json.RawMessage
4929	err := json.Unmarshal(body, &m)
4930	if err != nil {
4931		return err
4932	}
4933	for k, v := range m {
4934		switch k {
4935		case "properties":
4936			if v != nil {
4937				var bgpServiceCommunityPropertiesFormat BgpServiceCommunityPropertiesFormat
4938				err = json.Unmarshal(*v, &bgpServiceCommunityPropertiesFormat)
4939				if err != nil {
4940					return err
4941				}
4942				bsc.BgpServiceCommunityPropertiesFormat = &bgpServiceCommunityPropertiesFormat
4943			}
4944		case "id":
4945			if v != nil {
4946				var ID string
4947				err = json.Unmarshal(*v, &ID)
4948				if err != nil {
4949					return err
4950				}
4951				bsc.ID = &ID
4952			}
4953		case "name":
4954			if v != nil {
4955				var name string
4956				err = json.Unmarshal(*v, &name)
4957				if err != nil {
4958					return err
4959				}
4960				bsc.Name = &name
4961			}
4962		case "type":
4963			if v != nil {
4964				var typeVar string
4965				err = json.Unmarshal(*v, &typeVar)
4966				if err != nil {
4967					return err
4968				}
4969				bsc.Type = &typeVar
4970			}
4971		case "location":
4972			if v != nil {
4973				var location string
4974				err = json.Unmarshal(*v, &location)
4975				if err != nil {
4976					return err
4977				}
4978				bsc.Location = &location
4979			}
4980		case "tags":
4981			if v != nil {
4982				var tags map[string]*string
4983				err = json.Unmarshal(*v, &tags)
4984				if err != nil {
4985					return err
4986				}
4987				bsc.Tags = tags
4988			}
4989		}
4990	}
4991
4992	return nil
4993}
4994
4995// BgpServiceCommunityListResult response for the ListServiceCommunity API service call.
4996type BgpServiceCommunityListResult struct {
4997	autorest.Response `json:"-"`
4998	// Value - A list of service community resources.
4999	Value *[]BgpServiceCommunity `json:"value,omitempty"`
5000	// NextLink - The URL to get the next set of results.
5001	NextLink *string `json:"nextLink,omitempty"`
5002}
5003
5004// BgpServiceCommunityListResultIterator provides access to a complete listing of BgpServiceCommunity
5005// values.
5006type BgpServiceCommunityListResultIterator struct {
5007	i    int
5008	page BgpServiceCommunityListResultPage
5009}
5010
5011// NextWithContext advances to the next value.  If there was an error making
5012// the request the iterator does not advance and the error is returned.
5013func (iter *BgpServiceCommunityListResultIterator) NextWithContext(ctx context.Context) (err error) {
5014	if tracing.IsEnabled() {
5015		ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultIterator.NextWithContext")
5016		defer func() {
5017			sc := -1
5018			if iter.Response().Response.Response != nil {
5019				sc = iter.Response().Response.Response.StatusCode
5020			}
5021			tracing.EndSpan(ctx, sc, err)
5022		}()
5023	}
5024	iter.i++
5025	if iter.i < len(iter.page.Values()) {
5026		return nil
5027	}
5028	err = iter.page.NextWithContext(ctx)
5029	if err != nil {
5030		iter.i--
5031		return err
5032	}
5033	iter.i = 0
5034	return nil
5035}
5036
5037// Next advances to the next value.  If there was an error making
5038// the request the iterator does not advance and the error is returned.
5039// Deprecated: Use NextWithContext() instead.
5040func (iter *BgpServiceCommunityListResultIterator) Next() error {
5041	return iter.NextWithContext(context.Background())
5042}
5043
5044// NotDone returns true if the enumeration should be started or is not yet complete.
5045func (iter BgpServiceCommunityListResultIterator) NotDone() bool {
5046	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5047}
5048
5049// Response returns the raw server response from the last page request.
5050func (iter BgpServiceCommunityListResultIterator) Response() BgpServiceCommunityListResult {
5051	return iter.page.Response()
5052}
5053
5054// Value returns the current value or a zero-initialized value if the
5055// iterator has advanced beyond the end of the collection.
5056func (iter BgpServiceCommunityListResultIterator) Value() BgpServiceCommunity {
5057	if !iter.page.NotDone() {
5058		return BgpServiceCommunity{}
5059	}
5060	return iter.page.Values()[iter.i]
5061}
5062
5063// Creates a new instance of the BgpServiceCommunityListResultIterator type.
5064func NewBgpServiceCommunityListResultIterator(page BgpServiceCommunityListResultPage) BgpServiceCommunityListResultIterator {
5065	return BgpServiceCommunityListResultIterator{page: page}
5066}
5067
5068// IsEmpty returns true if the ListResult contains no values.
5069func (bsclr BgpServiceCommunityListResult) IsEmpty() bool {
5070	return bsclr.Value == nil || len(*bsclr.Value) == 0
5071}
5072
5073// hasNextLink returns true if the NextLink is not empty.
5074func (bsclr BgpServiceCommunityListResult) hasNextLink() bool {
5075	return bsclr.NextLink != nil && len(*bsclr.NextLink) != 0
5076}
5077
5078// bgpServiceCommunityListResultPreparer prepares a request to retrieve the next set of results.
5079// It returns nil if no more results exist.
5080func (bsclr BgpServiceCommunityListResult) bgpServiceCommunityListResultPreparer(ctx context.Context) (*http.Request, error) {
5081	if !bsclr.hasNextLink() {
5082		return nil, nil
5083	}
5084	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5085		autorest.AsJSON(),
5086		autorest.AsGet(),
5087		autorest.WithBaseURL(to.String(bsclr.NextLink)))
5088}
5089
5090// BgpServiceCommunityListResultPage contains a page of BgpServiceCommunity values.
5091type BgpServiceCommunityListResultPage struct {
5092	fn    func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)
5093	bsclr BgpServiceCommunityListResult
5094}
5095
5096// NextWithContext advances to the next page of values.  If there was an error making
5097// the request the page does not advance and the error is returned.
5098func (page *BgpServiceCommunityListResultPage) NextWithContext(ctx context.Context) (err error) {
5099	if tracing.IsEnabled() {
5100		ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultPage.NextWithContext")
5101		defer func() {
5102			sc := -1
5103			if page.Response().Response.Response != nil {
5104				sc = page.Response().Response.Response.StatusCode
5105			}
5106			tracing.EndSpan(ctx, sc, err)
5107		}()
5108	}
5109	for {
5110		next, err := page.fn(ctx, page.bsclr)
5111		if err != nil {
5112			return err
5113		}
5114		page.bsclr = next
5115		if !next.hasNextLink() || !next.IsEmpty() {
5116			break
5117		}
5118	}
5119	return nil
5120}
5121
5122// Next advances to the next page of values.  If there was an error making
5123// the request the page does not advance and the error is returned.
5124// Deprecated: Use NextWithContext() instead.
5125func (page *BgpServiceCommunityListResultPage) Next() error {
5126	return page.NextWithContext(context.Background())
5127}
5128
5129// NotDone returns true if the page enumeration should be started or is not yet complete.
5130func (page BgpServiceCommunityListResultPage) NotDone() bool {
5131	return !page.bsclr.IsEmpty()
5132}
5133
5134// Response returns the raw server response from the last page request.
5135func (page BgpServiceCommunityListResultPage) Response() BgpServiceCommunityListResult {
5136	return page.bsclr
5137}
5138
5139// Values returns the slice of values for the current page or nil if there are no values.
5140func (page BgpServiceCommunityListResultPage) Values() []BgpServiceCommunity {
5141	if page.bsclr.IsEmpty() {
5142		return nil
5143	}
5144	return *page.bsclr.Value
5145}
5146
5147// Creates a new instance of the BgpServiceCommunityListResultPage type.
5148func NewBgpServiceCommunityListResultPage(cur BgpServiceCommunityListResult, getNextPage func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)) BgpServiceCommunityListResultPage {
5149	return BgpServiceCommunityListResultPage{
5150		fn:    getNextPage,
5151		bsclr: cur,
5152	}
5153}
5154
5155// BgpServiceCommunityPropertiesFormat properties of Service Community.
5156type BgpServiceCommunityPropertiesFormat struct {
5157	// ServiceName - The name of the bgp community. e.g. Skype.
5158	ServiceName *string `json:"serviceName,omitempty"`
5159	// BgpCommunities - Get a list of bgp communities.
5160	BgpCommunities *[]BGPCommunity `json:"bgpCommunities,omitempty"`
5161}
5162
5163// BgpSettings BGP settings details
5164type BgpSettings struct {
5165	// Asn - The BGP speaker's ASN.
5166	Asn *int64 `json:"asn,omitempty"`
5167	// BgpPeeringAddress - The BGP peering address and BGP identifier of this BGP speaker.
5168	BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"`
5169	// PeerWeight - The weight added to routes learned from this BGP speaker.
5170	PeerWeight *int32 `json:"peerWeight,omitempty"`
5171}
5172
5173// CloudError an error response from the Batch service.
5174type CloudError struct {
5175	// Error - Cloud error body.
5176	Error *CloudErrorBody `json:"error,omitempty"`
5177}
5178
5179// CloudErrorBody an error response from the Batch service.
5180type CloudErrorBody struct {
5181	// Code - An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
5182	Code *string `json:"code,omitempty"`
5183	// Message - A message describing the error, intended to be suitable for display in a user interface.
5184	Message *string `json:"message,omitempty"`
5185	// Target - The target of the particular error. For example, the name of the property in error.
5186	Target *string `json:"target,omitempty"`
5187	// Details - A list of additional details about the error.
5188	Details *[]CloudErrorBody `json:"details,omitempty"`
5189}
5190
5191// ConfigurationDiagnosticParameters parameters to get network configuration diagnostic.
5192type ConfigurationDiagnosticParameters struct {
5193	// TargetResourceID - The ID of the target resource to perform network configuration diagnostic. Valid options are VM, NetworkInterface, VMSS/NetworkInterface and Application Gateway.
5194	TargetResourceID *string `json:"targetResourceId,omitempty"`
5195	// VerbosityLevel - Verbosity level. Accepted values are 'Normal', 'Minimum', 'Full'. Possible values include: 'Normal', 'Minimum', 'Full'
5196	VerbosityLevel VerbosityLevel `json:"verbosityLevel,omitempty"`
5197	// Profiles - List of network configuration diagnostic profiles.
5198	Profiles *[]ConfigurationDiagnosticProfile `json:"profiles,omitempty"`
5199}
5200
5201// ConfigurationDiagnosticProfile parameters to compare with network configuration.
5202type ConfigurationDiagnosticProfile struct {
5203	// Direction - The direction of the traffic. Possible values include: 'Inbound', 'Outbound'
5204	Direction Direction `json:"direction,omitempty"`
5205	// Protocol - Protocol to be verified on. Accepted values are '*', TCP, UDP.
5206	Protocol *string `json:"protocol,omitempty"`
5207	// Source - Traffic source. Accepted values are '*', IP Address/CIDR, Service Tag.
5208	Source *string `json:"source,omitempty"`
5209	// Destination - Traffic destination. Accepted values are: '*', IP Address/CIDR, Service Tag.
5210	Destination *string `json:"destination,omitempty"`
5211	// DestinationPort - Traffic destination port. Accepted values are '*', port (for example, 3389) and port range (for example, 80-100).
5212	DestinationPort *string `json:"destinationPort,omitempty"`
5213}
5214
5215// ConfigurationDiagnosticResponse results of network configuration diagnostic on the target resource.
5216type ConfigurationDiagnosticResponse struct {
5217	autorest.Response `json:"-"`
5218	// Results - READ-ONLY; List of network configuration diagnostic results.
5219	Results *[]ConfigurationDiagnosticResult `json:"results,omitempty"`
5220}
5221
5222// ConfigurationDiagnosticResult network configuration diagnostic result corresponded to provided traffic
5223// query.
5224type ConfigurationDiagnosticResult struct {
5225	// Profile - Network configuration diagnostic profile.
5226	Profile *ConfigurationDiagnosticProfile `json:"profile,omitempty"`
5227	// NetworkSecurityGroupResult - Network security group result.
5228	NetworkSecurityGroupResult *SecurityGroupResult `json:"networkSecurityGroupResult,omitempty"`
5229}
5230
5231// ConnectionMonitor parameters that define the operation to create a connection monitor.
5232type ConnectionMonitor struct {
5233	// Location - Connection monitor location.
5234	Location *string `json:"location,omitempty"`
5235	// Tags - Connection monitor tags.
5236	Tags map[string]*string `json:"tags"`
5237	// ConnectionMonitorParameters - Properties of the connection monitor.
5238	*ConnectionMonitorParameters `json:"properties,omitempty"`
5239}
5240
5241// MarshalJSON is the custom marshaler for ConnectionMonitor.
5242func (cm ConnectionMonitor) MarshalJSON() ([]byte, error) {
5243	objectMap := make(map[string]interface{})
5244	if cm.Location != nil {
5245		objectMap["location"] = cm.Location
5246	}
5247	if cm.Tags != nil {
5248		objectMap["tags"] = cm.Tags
5249	}
5250	if cm.ConnectionMonitorParameters != nil {
5251		objectMap["properties"] = cm.ConnectionMonitorParameters
5252	}
5253	return json.Marshal(objectMap)
5254}
5255
5256// UnmarshalJSON is the custom unmarshaler for ConnectionMonitor struct.
5257func (cm *ConnectionMonitor) UnmarshalJSON(body []byte) error {
5258	var m map[string]*json.RawMessage
5259	err := json.Unmarshal(body, &m)
5260	if err != nil {
5261		return err
5262	}
5263	for k, v := range m {
5264		switch k {
5265		case "location":
5266			if v != nil {
5267				var location string
5268				err = json.Unmarshal(*v, &location)
5269				if err != nil {
5270					return err
5271				}
5272				cm.Location = &location
5273			}
5274		case "tags":
5275			if v != nil {
5276				var tags map[string]*string
5277				err = json.Unmarshal(*v, &tags)
5278				if err != nil {
5279					return err
5280				}
5281				cm.Tags = tags
5282			}
5283		case "properties":
5284			if v != nil {
5285				var connectionMonitorParameters ConnectionMonitorParameters
5286				err = json.Unmarshal(*v, &connectionMonitorParameters)
5287				if err != nil {
5288					return err
5289				}
5290				cm.ConnectionMonitorParameters = &connectionMonitorParameters
5291			}
5292		}
5293	}
5294
5295	return nil
5296}
5297
5298// ConnectionMonitorDestination describes the destination of connection monitor.
5299type ConnectionMonitorDestination struct {
5300	// ResourceID - The ID of the resource used as the destination by connection monitor.
5301	ResourceID *string `json:"resourceId,omitempty"`
5302	// Address - Address of the connection monitor destination (IP or domain name).
5303	Address *string `json:"address,omitempty"`
5304	// Port - The destination port used by connection monitor.
5305	Port *int32 `json:"port,omitempty"`
5306}
5307
5308// ConnectionMonitorListResult list of connection monitors.
5309type ConnectionMonitorListResult struct {
5310	autorest.Response `json:"-"`
5311	// Value - Information about connection monitors.
5312	Value *[]ConnectionMonitorResult `json:"value,omitempty"`
5313}
5314
5315// ConnectionMonitorParameters parameters that define the operation to create a connection monitor.
5316type ConnectionMonitorParameters struct {
5317	// Source - Describes the source of connection monitor.
5318	Source *ConnectionMonitorSource `json:"source,omitempty"`
5319	// Destination - Describes the destination of connection monitor.
5320	Destination *ConnectionMonitorDestination `json:"destination,omitempty"`
5321	// AutoStart - Determines if the connection monitor will start automatically once created.
5322	AutoStart *bool `json:"autoStart,omitempty"`
5323	// MonitoringIntervalInSeconds - Monitoring interval in seconds.
5324	MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"`
5325}
5326
5327// ConnectionMonitorQueryResult list of connection states snapshots.
5328type ConnectionMonitorQueryResult struct {
5329	autorest.Response `json:"-"`
5330	// SourceStatus - Status of connection monitor source. Possible values include: 'ConnectionMonitorSourceStatusUnknown', 'ConnectionMonitorSourceStatusActive', 'ConnectionMonitorSourceStatusInactive'
5331	SourceStatus ConnectionMonitorSourceStatus `json:"sourceStatus,omitempty"`
5332	// States - Information about connection states.
5333	States *[]ConnectionStateSnapshot `json:"states,omitempty"`
5334}
5335
5336// ConnectionMonitorResult information about the connection monitor.
5337type ConnectionMonitorResult struct {
5338	autorest.Response `json:"-"`
5339	// Name - READ-ONLY; Name of the connection monitor.
5340	Name *string `json:"name,omitempty"`
5341	// ID - READ-ONLY; ID of the connection monitor.
5342	ID *string `json:"id,omitempty"`
5343	// Etag - A unique read-only string that changes whenever the resource is updated.
5344	Etag *string `json:"etag,omitempty"`
5345	// Type - READ-ONLY; Connection monitor type.
5346	Type *string `json:"type,omitempty"`
5347	// Location - Connection monitor location.
5348	Location *string `json:"location,omitempty"`
5349	// Tags - Connection monitor tags.
5350	Tags map[string]*string `json:"tags"`
5351	// ConnectionMonitorResultProperties - Properties of the connection monitor result.
5352	*ConnectionMonitorResultProperties `json:"properties,omitempty"`
5353}
5354
5355// MarshalJSON is the custom marshaler for ConnectionMonitorResult.
5356func (cmr ConnectionMonitorResult) MarshalJSON() ([]byte, error) {
5357	objectMap := make(map[string]interface{})
5358	if cmr.Etag != nil {
5359		objectMap["etag"] = cmr.Etag
5360	}
5361	if cmr.Location != nil {
5362		objectMap["location"] = cmr.Location
5363	}
5364	if cmr.Tags != nil {
5365		objectMap["tags"] = cmr.Tags
5366	}
5367	if cmr.ConnectionMonitorResultProperties != nil {
5368		objectMap["properties"] = cmr.ConnectionMonitorResultProperties
5369	}
5370	return json.Marshal(objectMap)
5371}
5372
5373// UnmarshalJSON is the custom unmarshaler for ConnectionMonitorResult struct.
5374func (cmr *ConnectionMonitorResult) UnmarshalJSON(body []byte) error {
5375	var m map[string]*json.RawMessage
5376	err := json.Unmarshal(body, &m)
5377	if err != nil {
5378		return err
5379	}
5380	for k, v := range m {
5381		switch k {
5382		case "name":
5383			if v != nil {
5384				var name string
5385				err = json.Unmarshal(*v, &name)
5386				if err != nil {
5387					return err
5388				}
5389				cmr.Name = &name
5390			}
5391		case "id":
5392			if v != nil {
5393				var ID string
5394				err = json.Unmarshal(*v, &ID)
5395				if err != nil {
5396					return err
5397				}
5398				cmr.ID = &ID
5399			}
5400		case "etag":
5401			if v != nil {
5402				var etag string
5403				err = json.Unmarshal(*v, &etag)
5404				if err != nil {
5405					return err
5406				}
5407				cmr.Etag = &etag
5408			}
5409		case "type":
5410			if v != nil {
5411				var typeVar string
5412				err = json.Unmarshal(*v, &typeVar)
5413				if err != nil {
5414					return err
5415				}
5416				cmr.Type = &typeVar
5417			}
5418		case "location":
5419			if v != nil {
5420				var location string
5421				err = json.Unmarshal(*v, &location)
5422				if err != nil {
5423					return err
5424				}
5425				cmr.Location = &location
5426			}
5427		case "tags":
5428			if v != nil {
5429				var tags map[string]*string
5430				err = json.Unmarshal(*v, &tags)
5431				if err != nil {
5432					return err
5433				}
5434				cmr.Tags = tags
5435			}
5436		case "properties":
5437			if v != nil {
5438				var connectionMonitorResultProperties ConnectionMonitorResultProperties
5439				err = json.Unmarshal(*v, &connectionMonitorResultProperties)
5440				if err != nil {
5441					return err
5442				}
5443				cmr.ConnectionMonitorResultProperties = &connectionMonitorResultProperties
5444			}
5445		}
5446	}
5447
5448	return nil
5449}
5450
5451// ConnectionMonitorResultProperties describes the properties of a connection monitor.
5452type ConnectionMonitorResultProperties struct {
5453	// ProvisioningState - The provisioning state of the connection monitor. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
5454	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
5455	// StartTime - The date and time when the connection monitor was started.
5456	StartTime *date.Time `json:"startTime,omitempty"`
5457	// MonitoringStatus - The monitoring status of the connection monitor.
5458	MonitoringStatus *string `json:"monitoringStatus,omitempty"`
5459	// Source - Describes the source of connection monitor.
5460	Source *ConnectionMonitorSource `json:"source,omitempty"`
5461	// Destination - Describes the destination of connection monitor.
5462	Destination *ConnectionMonitorDestination `json:"destination,omitempty"`
5463	// AutoStart - Determines if the connection monitor will start automatically once created.
5464	AutoStart *bool `json:"autoStart,omitempty"`
5465	// MonitoringIntervalInSeconds - Monitoring interval in seconds.
5466	MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"`
5467}
5468
5469// ConnectionMonitorsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
5470// long-running operation.
5471type ConnectionMonitorsCreateOrUpdateFuture struct {
5472	azure.FutureAPI
5473	// Result returns the result of the asynchronous operation.
5474	// If the operation has not completed it will return an error.
5475	Result func(ConnectionMonitorsClient) (ConnectionMonitorResult, error)
5476}
5477
5478// ConnectionMonitorsDeleteFuture an abstraction for monitoring and retrieving the results of a
5479// long-running operation.
5480type ConnectionMonitorsDeleteFuture struct {
5481	azure.FutureAPI
5482	// Result returns the result of the asynchronous operation.
5483	// If the operation has not completed it will return an error.
5484	Result func(ConnectionMonitorsClient) (autorest.Response, error)
5485}
5486
5487// ConnectionMonitorSource describes the source of connection monitor.
5488type ConnectionMonitorSource struct {
5489	// ResourceID - The ID of the resource used as the source by connection monitor.
5490	ResourceID *string `json:"resourceId,omitempty"`
5491	// Port - The source port used by connection monitor.
5492	Port *int32 `json:"port,omitempty"`
5493}
5494
5495// ConnectionMonitorsQueryFuture an abstraction for monitoring and retrieving the results of a long-running
5496// operation.
5497type ConnectionMonitorsQueryFuture struct {
5498	azure.FutureAPI
5499	// Result returns the result of the asynchronous operation.
5500	// If the operation has not completed it will return an error.
5501	Result func(ConnectionMonitorsClient) (ConnectionMonitorQueryResult, error)
5502}
5503
5504// ConnectionMonitorsStartFuture an abstraction for monitoring and retrieving the results of a long-running
5505// operation.
5506type ConnectionMonitorsStartFuture struct {
5507	azure.FutureAPI
5508	// Result returns the result of the asynchronous operation.
5509	// If the operation has not completed it will return an error.
5510	Result func(ConnectionMonitorsClient) (autorest.Response, error)
5511}
5512
5513// ConnectionMonitorsStopFuture an abstraction for monitoring and retrieving the results of a long-running
5514// operation.
5515type ConnectionMonitorsStopFuture struct {
5516	azure.FutureAPI
5517	// Result returns the result of the asynchronous operation.
5518	// If the operation has not completed it will return an error.
5519	Result func(ConnectionMonitorsClient) (autorest.Response, error)
5520}
5521
5522// ConnectionResetSharedKey the virtual network connection reset shared key
5523type ConnectionResetSharedKey struct {
5524	autorest.Response `json:"-"`
5525	// KeyLength - The virtual network connection reset shared key length, should between 1 and 128.
5526	KeyLength *int32 `json:"keyLength,omitempty"`
5527}
5528
5529// ConnectionSharedKey response for GetConnectionSharedKey API service call
5530type ConnectionSharedKey struct {
5531	autorest.Response `json:"-"`
5532	// Value - The virtual network connection shared key value.
5533	Value *string `json:"value,omitempty"`
5534	// ID - Resource ID.
5535	ID *string `json:"id,omitempty"`
5536}
5537
5538// ConnectionStateSnapshot connection state snapshot.
5539type ConnectionStateSnapshot struct {
5540	// ConnectionState - The connection state. Possible values include: 'ConnectionStateReachable', 'ConnectionStateUnreachable', 'ConnectionStateUnknown'
5541	ConnectionState ConnectionState `json:"connectionState,omitempty"`
5542	// StartTime - The start time of the connection snapshot.
5543	StartTime *date.Time `json:"startTime,omitempty"`
5544	// EndTime - The end time of the connection snapshot.
5545	EndTime *date.Time `json:"endTime,omitempty"`
5546	// EvaluationState - Connectivity analysis evaluation state. Possible values include: 'NotStarted', 'InProgress', 'Completed'
5547	EvaluationState EvaluationState `json:"evaluationState,omitempty"`
5548	// AvgLatencyInMs - Average latency in ms.
5549	AvgLatencyInMs *int32 `json:"avgLatencyInMs,omitempty"`
5550	// MinLatencyInMs - Minimum latency in ms.
5551	MinLatencyInMs *int32 `json:"minLatencyInMs,omitempty"`
5552	// MaxLatencyInMs - Maximum latency in ms.
5553	MaxLatencyInMs *int32 `json:"maxLatencyInMs,omitempty"`
5554	// ProbesSent - The number of sent probes.
5555	ProbesSent *int32 `json:"probesSent,omitempty"`
5556	// ProbesFailed - The number of failed probes.
5557	ProbesFailed *int32 `json:"probesFailed,omitempty"`
5558	// Hops - READ-ONLY; List of hops between the source and the destination.
5559	Hops *[]ConnectivityHop `json:"hops,omitempty"`
5560}
5561
5562// MarshalJSON is the custom marshaler for ConnectionStateSnapshot.
5563func (CSS ConnectionStateSnapshot) MarshalJSON() ([]byte, error) {
5564	objectMap := make(map[string]interface{})
5565	if CSS.ConnectionState != "" {
5566		objectMap["connectionState"] = CSS.ConnectionState
5567	}
5568	if CSS.StartTime != nil {
5569		objectMap["startTime"] = CSS.StartTime
5570	}
5571	if CSS.EndTime != nil {
5572		objectMap["endTime"] = CSS.EndTime
5573	}
5574	if CSS.EvaluationState != "" {
5575		objectMap["evaluationState"] = CSS.EvaluationState
5576	}
5577	if CSS.AvgLatencyInMs != nil {
5578		objectMap["avgLatencyInMs"] = CSS.AvgLatencyInMs
5579	}
5580	if CSS.MinLatencyInMs != nil {
5581		objectMap["minLatencyInMs"] = CSS.MinLatencyInMs
5582	}
5583	if CSS.MaxLatencyInMs != nil {
5584		objectMap["maxLatencyInMs"] = CSS.MaxLatencyInMs
5585	}
5586	if CSS.ProbesSent != nil {
5587		objectMap["probesSent"] = CSS.ProbesSent
5588	}
5589	if CSS.ProbesFailed != nil {
5590		objectMap["probesFailed"] = CSS.ProbesFailed
5591	}
5592	return json.Marshal(objectMap)
5593}
5594
5595// ConnectivityDestination parameters that define destination of connection.
5596type ConnectivityDestination struct {
5597	// ResourceID - The ID of the resource to which a connection attempt will be made.
5598	ResourceID *string `json:"resourceId,omitempty"`
5599	// Address - The IP address or URI the resource to which a connection attempt will be made.
5600	Address *string `json:"address,omitempty"`
5601	// Port - Port on which check connectivity will be performed.
5602	Port *int32 `json:"port,omitempty"`
5603}
5604
5605// ConnectivityHop information about a hop between the source and the destination.
5606type ConnectivityHop struct {
5607	// Type - READ-ONLY; The type of the hop.
5608	Type *string `json:"type,omitempty"`
5609	// ID - READ-ONLY; The ID of the hop.
5610	ID *string `json:"id,omitempty"`
5611	// Address - READ-ONLY; The IP address of the hop.
5612	Address *string `json:"address,omitempty"`
5613	// ResourceID - READ-ONLY; The ID of the resource corresponding to this hop.
5614	ResourceID *string `json:"resourceId,omitempty"`
5615	// NextHopIds - READ-ONLY; List of next hop identifiers.
5616	NextHopIds *[]string `json:"nextHopIds,omitempty"`
5617	// Issues - READ-ONLY; List of issues.
5618	Issues *[]ConnectivityIssue `json:"issues,omitempty"`
5619}
5620
5621// ConnectivityInformation information on the connectivity status.
5622type ConnectivityInformation struct {
5623	autorest.Response `json:"-"`
5624	// Hops - READ-ONLY; List of hops between the source and the destination.
5625	Hops *[]ConnectivityHop `json:"hops,omitempty"`
5626	// ConnectionStatus - READ-ONLY; The connection status. Possible values include: 'ConnectionStatusUnknown', 'ConnectionStatusConnected', 'ConnectionStatusDisconnected', 'ConnectionStatusDegraded'
5627	ConnectionStatus ConnectionStatus `json:"connectionStatus,omitempty"`
5628	// AvgLatencyInMs - READ-ONLY; Average latency in milliseconds.
5629	AvgLatencyInMs *int32 `json:"avgLatencyInMs,omitempty"`
5630	// MinLatencyInMs - READ-ONLY; Minimum latency in milliseconds.
5631	MinLatencyInMs *int32 `json:"minLatencyInMs,omitempty"`
5632	// MaxLatencyInMs - READ-ONLY; Maximum latency in milliseconds.
5633	MaxLatencyInMs *int32 `json:"maxLatencyInMs,omitempty"`
5634	// ProbesSent - READ-ONLY; Total number of probes sent.
5635	ProbesSent *int32 `json:"probesSent,omitempty"`
5636	// ProbesFailed - READ-ONLY; Number of failed probes.
5637	ProbesFailed *int32 `json:"probesFailed,omitempty"`
5638}
5639
5640// ConnectivityIssue information about an issue encountered in the process of checking for connectivity.
5641type ConnectivityIssue struct {
5642	// Origin - READ-ONLY; The origin of the issue. Possible values include: 'OriginLocal', 'OriginInbound', 'OriginOutbound'
5643	Origin Origin `json:"origin,omitempty"`
5644	// Severity - READ-ONLY; The severity of the issue. Possible values include: 'SeverityError', 'SeverityWarning'
5645	Severity Severity `json:"severity,omitempty"`
5646	// Type - READ-ONLY; The type of issue. Possible values include: 'IssueTypeUnknown', 'IssueTypeAgentStopped', 'IssueTypeGuestFirewall', 'IssueTypeDNSResolution', 'IssueTypeSocketBind', 'IssueTypeNetworkSecurityRule', 'IssueTypeUserDefinedRoute', 'IssueTypePortThrottled', 'IssueTypePlatform'
5647	Type IssueType `json:"type,omitempty"`
5648	// Context - READ-ONLY; Provides additional context on the issue.
5649	Context *[]map[string]*string `json:"context,omitempty"`
5650}
5651
5652// ConnectivityParameters parameters that determine how the connectivity check will be performed.
5653type ConnectivityParameters struct {
5654	// Source - Describes the source of the connection.
5655	Source *ConnectivitySource `json:"source,omitempty"`
5656	// Destination - Describes the destination of connection.
5657	Destination *ConnectivityDestination `json:"destination,omitempty"`
5658	// Protocol - Network protocol. Possible values include: 'ProtocolTCP', 'ProtocolHTTP', 'ProtocolHTTPS', 'ProtocolIcmp'
5659	Protocol Protocol `json:"protocol,omitempty"`
5660	// ProtocolConfiguration - Configuration of the protocol.
5661	ProtocolConfiguration *ProtocolConfiguration `json:"protocolConfiguration,omitempty"`
5662}
5663
5664// ConnectivitySource parameters that define the source of the connection.
5665type ConnectivitySource struct {
5666	// ResourceID - The ID of the resource from which a connectivity check will be initiated.
5667	ResourceID *string `json:"resourceId,omitempty"`
5668	// Port - The source port from which a connectivity check will be performed.
5669	Port *int32 `json:"port,omitempty"`
5670}
5671
5672// Container reference to container resource in remote resource provider.
5673type Container struct {
5674	// ID - Resource ID.
5675	ID *string `json:"id,omitempty"`
5676}
5677
5678// ContainerNetworkInterface container network interface child resource.
5679type ContainerNetworkInterface struct {
5680	// ContainerNetworkInterfacePropertiesFormat - Container network interface properties.
5681	*ContainerNetworkInterfacePropertiesFormat `json:"properties,omitempty"`
5682	// Name - The name of the resource. This name can be used to access the resource.
5683	Name *string `json:"name,omitempty"`
5684	// Type - READ-ONLY; Sub Resource type.
5685	Type *string `json:"type,omitempty"`
5686	// Etag - A unique read-only string that changes whenever the resource is updated.
5687	Etag *string `json:"etag,omitempty"`
5688	// ID - Resource ID.
5689	ID *string `json:"id,omitempty"`
5690}
5691
5692// MarshalJSON is the custom marshaler for ContainerNetworkInterface.
5693func (cni ContainerNetworkInterface) MarshalJSON() ([]byte, error) {
5694	objectMap := make(map[string]interface{})
5695	if cni.ContainerNetworkInterfacePropertiesFormat != nil {
5696		objectMap["properties"] = cni.ContainerNetworkInterfacePropertiesFormat
5697	}
5698	if cni.Name != nil {
5699		objectMap["name"] = cni.Name
5700	}
5701	if cni.Etag != nil {
5702		objectMap["etag"] = cni.Etag
5703	}
5704	if cni.ID != nil {
5705		objectMap["id"] = cni.ID
5706	}
5707	return json.Marshal(objectMap)
5708}
5709
5710// UnmarshalJSON is the custom unmarshaler for ContainerNetworkInterface struct.
5711func (cni *ContainerNetworkInterface) UnmarshalJSON(body []byte) error {
5712	var m map[string]*json.RawMessage
5713	err := json.Unmarshal(body, &m)
5714	if err != nil {
5715		return err
5716	}
5717	for k, v := range m {
5718		switch k {
5719		case "properties":
5720			if v != nil {
5721				var containerNetworkInterfacePropertiesFormat ContainerNetworkInterfacePropertiesFormat
5722				err = json.Unmarshal(*v, &containerNetworkInterfacePropertiesFormat)
5723				if err != nil {
5724					return err
5725				}
5726				cni.ContainerNetworkInterfacePropertiesFormat = &containerNetworkInterfacePropertiesFormat
5727			}
5728		case "name":
5729			if v != nil {
5730				var name string
5731				err = json.Unmarshal(*v, &name)
5732				if err != nil {
5733					return err
5734				}
5735				cni.Name = &name
5736			}
5737		case "type":
5738			if v != nil {
5739				var typeVar string
5740				err = json.Unmarshal(*v, &typeVar)
5741				if err != nil {
5742					return err
5743				}
5744				cni.Type = &typeVar
5745			}
5746		case "etag":
5747			if v != nil {
5748				var etag string
5749				err = json.Unmarshal(*v, &etag)
5750				if err != nil {
5751					return err
5752				}
5753				cni.Etag = &etag
5754			}
5755		case "id":
5756			if v != nil {
5757				var ID string
5758				err = json.Unmarshal(*v, &ID)
5759				if err != nil {
5760					return err
5761				}
5762				cni.ID = &ID
5763			}
5764		}
5765	}
5766
5767	return nil
5768}
5769
5770// ContainerNetworkInterfaceConfiguration container network interface configuration child resource.
5771type ContainerNetworkInterfaceConfiguration struct {
5772	// ContainerNetworkInterfaceConfigurationPropertiesFormat - Container network interface configuration properties.
5773	*ContainerNetworkInterfaceConfigurationPropertiesFormat `json:"properties,omitempty"`
5774	// Name - The name of the resource. This name can be used to access the resource.
5775	Name *string `json:"name,omitempty"`
5776	// Type - READ-ONLY; Sub Resource type.
5777	Type *string `json:"type,omitempty"`
5778	// Etag - A unique read-only string that changes whenever the resource is updated.
5779	Etag *string `json:"etag,omitempty"`
5780	// ID - Resource ID.
5781	ID *string `json:"id,omitempty"`
5782}
5783
5784// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceConfiguration.
5785func (cnic ContainerNetworkInterfaceConfiguration) MarshalJSON() ([]byte, error) {
5786	objectMap := make(map[string]interface{})
5787	if cnic.ContainerNetworkInterfaceConfigurationPropertiesFormat != nil {
5788		objectMap["properties"] = cnic.ContainerNetworkInterfaceConfigurationPropertiesFormat
5789	}
5790	if cnic.Name != nil {
5791		objectMap["name"] = cnic.Name
5792	}
5793	if cnic.Etag != nil {
5794		objectMap["etag"] = cnic.Etag
5795	}
5796	if cnic.ID != nil {
5797		objectMap["id"] = cnic.ID
5798	}
5799	return json.Marshal(objectMap)
5800}
5801
5802// UnmarshalJSON is the custom unmarshaler for ContainerNetworkInterfaceConfiguration struct.
5803func (cnic *ContainerNetworkInterfaceConfiguration) UnmarshalJSON(body []byte) error {
5804	var m map[string]*json.RawMessage
5805	err := json.Unmarshal(body, &m)
5806	if err != nil {
5807		return err
5808	}
5809	for k, v := range m {
5810		switch k {
5811		case "properties":
5812			if v != nil {
5813				var containerNetworkInterfaceConfigurationPropertiesFormat ContainerNetworkInterfaceConfigurationPropertiesFormat
5814				err = json.Unmarshal(*v, &containerNetworkInterfaceConfigurationPropertiesFormat)
5815				if err != nil {
5816					return err
5817				}
5818				cnic.ContainerNetworkInterfaceConfigurationPropertiesFormat = &containerNetworkInterfaceConfigurationPropertiesFormat
5819			}
5820		case "name":
5821			if v != nil {
5822				var name string
5823				err = json.Unmarshal(*v, &name)
5824				if err != nil {
5825					return err
5826				}
5827				cnic.Name = &name
5828			}
5829		case "type":
5830			if v != nil {
5831				var typeVar string
5832				err = json.Unmarshal(*v, &typeVar)
5833				if err != nil {
5834					return err
5835				}
5836				cnic.Type = &typeVar
5837			}
5838		case "etag":
5839			if v != nil {
5840				var etag string
5841				err = json.Unmarshal(*v, &etag)
5842				if err != nil {
5843					return err
5844				}
5845				cnic.Etag = &etag
5846			}
5847		case "id":
5848			if v != nil {
5849				var ID string
5850				err = json.Unmarshal(*v, &ID)
5851				if err != nil {
5852					return err
5853				}
5854				cnic.ID = &ID
5855			}
5856		}
5857	}
5858
5859	return nil
5860}
5861
5862// ContainerNetworkInterfaceConfigurationPropertiesFormat container network interface configuration
5863// properties.
5864type ContainerNetworkInterfaceConfigurationPropertiesFormat struct {
5865	// IPConfigurations - A list of ip configurations of the container network interface configuration.
5866	IPConfigurations *[]IPConfigurationProfile `json:"ipConfigurations,omitempty"`
5867	// ContainerNetworkInterfaces - A list of container network interfaces created from this container network interface configuration.
5868	ContainerNetworkInterfaces *[]SubResource `json:"containerNetworkInterfaces,omitempty"`
5869	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
5870	ProvisioningState *string `json:"provisioningState,omitempty"`
5871}
5872
5873// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceConfigurationPropertiesFormat.
5874func (cnicpf ContainerNetworkInterfaceConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
5875	objectMap := make(map[string]interface{})
5876	if cnicpf.IPConfigurations != nil {
5877		objectMap["ipConfigurations"] = cnicpf.IPConfigurations
5878	}
5879	if cnicpf.ContainerNetworkInterfaces != nil {
5880		objectMap["containerNetworkInterfaces"] = cnicpf.ContainerNetworkInterfaces
5881	}
5882	return json.Marshal(objectMap)
5883}
5884
5885// ContainerNetworkInterfaceIPConfiguration the ip configuration for a container network interface.
5886type ContainerNetworkInterfaceIPConfiguration struct {
5887	// ContainerNetworkInterfaceIPConfigurationPropertiesFormat - Properties of the container network interface IP configuration.
5888	*ContainerNetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"`
5889	// Name - The name of the resource. This name can be used to access the resource.
5890	Name *string `json:"name,omitempty"`
5891	// Type - READ-ONLY; Sub Resource type.
5892	Type *string `json:"type,omitempty"`
5893	// Etag - A unique read-only string that changes whenever the resource is updated.
5894	Etag *string `json:"etag,omitempty"`
5895}
5896
5897// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceIPConfiguration.
5898func (cniic ContainerNetworkInterfaceIPConfiguration) MarshalJSON() ([]byte, error) {
5899	objectMap := make(map[string]interface{})
5900	if cniic.ContainerNetworkInterfaceIPConfigurationPropertiesFormat != nil {
5901		objectMap["properties"] = cniic.ContainerNetworkInterfaceIPConfigurationPropertiesFormat
5902	}
5903	if cniic.Name != nil {
5904		objectMap["name"] = cniic.Name
5905	}
5906	if cniic.Etag != nil {
5907		objectMap["etag"] = cniic.Etag
5908	}
5909	return json.Marshal(objectMap)
5910}
5911
5912// UnmarshalJSON is the custom unmarshaler for ContainerNetworkInterfaceIPConfiguration struct.
5913func (cniic *ContainerNetworkInterfaceIPConfiguration) UnmarshalJSON(body []byte) error {
5914	var m map[string]*json.RawMessage
5915	err := json.Unmarshal(body, &m)
5916	if err != nil {
5917		return err
5918	}
5919	for k, v := range m {
5920		switch k {
5921		case "properties":
5922			if v != nil {
5923				var containerNetworkInterfaceIPConfigurationPropertiesFormat ContainerNetworkInterfaceIPConfigurationPropertiesFormat
5924				err = json.Unmarshal(*v, &containerNetworkInterfaceIPConfigurationPropertiesFormat)
5925				if err != nil {
5926					return err
5927				}
5928				cniic.ContainerNetworkInterfaceIPConfigurationPropertiesFormat = &containerNetworkInterfaceIPConfigurationPropertiesFormat
5929			}
5930		case "name":
5931			if v != nil {
5932				var name string
5933				err = json.Unmarshal(*v, &name)
5934				if err != nil {
5935					return err
5936				}
5937				cniic.Name = &name
5938			}
5939		case "type":
5940			if v != nil {
5941				var typeVar string
5942				err = json.Unmarshal(*v, &typeVar)
5943				if err != nil {
5944					return err
5945				}
5946				cniic.Type = &typeVar
5947			}
5948		case "etag":
5949			if v != nil {
5950				var etag string
5951				err = json.Unmarshal(*v, &etag)
5952				if err != nil {
5953					return err
5954				}
5955				cniic.Etag = &etag
5956			}
5957		}
5958	}
5959
5960	return nil
5961}
5962
5963// ContainerNetworkInterfaceIPConfigurationPropertiesFormat properties of the container network interface
5964// IP configuration.
5965type ContainerNetworkInterfaceIPConfigurationPropertiesFormat struct {
5966	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
5967	ProvisioningState *string `json:"provisioningState,omitempty"`
5968}
5969
5970// ContainerNetworkInterfacePropertiesFormat properties of container network interface.
5971type ContainerNetworkInterfacePropertiesFormat struct {
5972	// ContainerNetworkInterfaceConfiguration - Container network interface configuration from which this container network interface is created.
5973	ContainerNetworkInterfaceConfiguration *ContainerNetworkInterfaceConfiguration `json:"containerNetworkInterfaceConfiguration,omitempty"`
5974	// Container - Reference to the container to which this container network interface is attached.
5975	Container *Container `json:"container,omitempty"`
5976	// IPConfigurations - Reference to the ip configuration on this container nic.
5977	IPConfigurations *[]ContainerNetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"`
5978	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
5979	ProvisioningState *string `json:"provisioningState,omitempty"`
5980}
5981
5982// MarshalJSON is the custom marshaler for ContainerNetworkInterfacePropertiesFormat.
5983func (cnipf ContainerNetworkInterfacePropertiesFormat) MarshalJSON() ([]byte, error) {
5984	objectMap := make(map[string]interface{})
5985	if cnipf.ContainerNetworkInterfaceConfiguration != nil {
5986		objectMap["containerNetworkInterfaceConfiguration"] = cnipf.ContainerNetworkInterfaceConfiguration
5987	}
5988	if cnipf.Container != nil {
5989		objectMap["container"] = cnipf.Container
5990	}
5991	if cnipf.IPConfigurations != nil {
5992		objectMap["ipConfigurations"] = cnipf.IPConfigurations
5993	}
5994	return json.Marshal(objectMap)
5995}
5996
5997// DdosCustomPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
5998// long-running operation.
5999type DdosCustomPoliciesCreateOrUpdateFuture struct {
6000	azure.FutureAPI
6001	// Result returns the result of the asynchronous operation.
6002	// If the operation has not completed it will return an error.
6003	Result func(DdosCustomPoliciesClient) (DdosCustomPolicy, error)
6004}
6005
6006// DdosCustomPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a
6007// long-running operation.
6008type DdosCustomPoliciesDeleteFuture struct {
6009	azure.FutureAPI
6010	// Result returns the result of the asynchronous operation.
6011	// If the operation has not completed it will return an error.
6012	Result func(DdosCustomPoliciesClient) (autorest.Response, error)
6013}
6014
6015// DdosCustomPoliciesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
6016// long-running operation.
6017type DdosCustomPoliciesUpdateTagsFuture struct {
6018	azure.FutureAPI
6019	// Result returns the result of the asynchronous operation.
6020	// If the operation has not completed it will return an error.
6021	Result func(DdosCustomPoliciesClient) (DdosCustomPolicy, error)
6022}
6023
6024// DdosCustomPolicy a DDoS custom policy in a resource group.
6025type DdosCustomPolicy struct {
6026	autorest.Response `json:"-"`
6027	// DdosCustomPolicyPropertiesFormat - Properties of the DDoS custom policy.
6028	*DdosCustomPolicyPropertiesFormat `json:"properties,omitempty"`
6029	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
6030	Etag *string `json:"etag,omitempty"`
6031	// ID - Resource ID.
6032	ID *string `json:"id,omitempty"`
6033	// Name - READ-ONLY; Resource name.
6034	Name *string `json:"name,omitempty"`
6035	// Type - READ-ONLY; Resource type.
6036	Type *string `json:"type,omitempty"`
6037	// Location - Resource location.
6038	Location *string `json:"location,omitempty"`
6039	// Tags - Resource tags.
6040	Tags map[string]*string `json:"tags"`
6041}
6042
6043// MarshalJSON is the custom marshaler for DdosCustomPolicy.
6044func (dcp DdosCustomPolicy) MarshalJSON() ([]byte, error) {
6045	objectMap := make(map[string]interface{})
6046	if dcp.DdosCustomPolicyPropertiesFormat != nil {
6047		objectMap["properties"] = dcp.DdosCustomPolicyPropertiesFormat
6048	}
6049	if dcp.ID != nil {
6050		objectMap["id"] = dcp.ID
6051	}
6052	if dcp.Location != nil {
6053		objectMap["location"] = dcp.Location
6054	}
6055	if dcp.Tags != nil {
6056		objectMap["tags"] = dcp.Tags
6057	}
6058	return json.Marshal(objectMap)
6059}
6060
6061// UnmarshalJSON is the custom unmarshaler for DdosCustomPolicy struct.
6062func (dcp *DdosCustomPolicy) UnmarshalJSON(body []byte) error {
6063	var m map[string]*json.RawMessage
6064	err := json.Unmarshal(body, &m)
6065	if err != nil {
6066		return err
6067	}
6068	for k, v := range m {
6069		switch k {
6070		case "properties":
6071			if v != nil {
6072				var ddosCustomPolicyPropertiesFormat DdosCustomPolicyPropertiesFormat
6073				err = json.Unmarshal(*v, &ddosCustomPolicyPropertiesFormat)
6074				if err != nil {
6075					return err
6076				}
6077				dcp.DdosCustomPolicyPropertiesFormat = &ddosCustomPolicyPropertiesFormat
6078			}
6079		case "etag":
6080			if v != nil {
6081				var etag string
6082				err = json.Unmarshal(*v, &etag)
6083				if err != nil {
6084					return err
6085				}
6086				dcp.Etag = &etag
6087			}
6088		case "id":
6089			if v != nil {
6090				var ID string
6091				err = json.Unmarshal(*v, &ID)
6092				if err != nil {
6093					return err
6094				}
6095				dcp.ID = &ID
6096			}
6097		case "name":
6098			if v != nil {
6099				var name string
6100				err = json.Unmarshal(*v, &name)
6101				if err != nil {
6102					return err
6103				}
6104				dcp.Name = &name
6105			}
6106		case "type":
6107			if v != nil {
6108				var typeVar string
6109				err = json.Unmarshal(*v, &typeVar)
6110				if err != nil {
6111					return err
6112				}
6113				dcp.Type = &typeVar
6114			}
6115		case "location":
6116			if v != nil {
6117				var location string
6118				err = json.Unmarshal(*v, &location)
6119				if err != nil {
6120					return err
6121				}
6122				dcp.Location = &location
6123			}
6124		case "tags":
6125			if v != nil {
6126				var tags map[string]*string
6127				err = json.Unmarshal(*v, &tags)
6128				if err != nil {
6129					return err
6130				}
6131				dcp.Tags = tags
6132			}
6133		}
6134	}
6135
6136	return nil
6137}
6138
6139// DdosCustomPolicyPropertiesFormat dDoS custom policy properties.
6140type DdosCustomPolicyPropertiesFormat struct {
6141	// ResourceGUID - READ-ONLY; The resource GUID property of the DDoS custom policy resource. It uniquely identifies the resource, even if the user changes its name or migrate the resource across subscriptions or resource groups.
6142	ResourceGUID *string `json:"resourceGuid,omitempty"`
6143	// ProvisioningState - READ-ONLY; The provisioning state of the DDoS custom policy resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
6144	ProvisioningState *string `json:"provisioningState,omitempty"`
6145	// PublicIPAddresses - READ-ONLY; The list of public IPs associated with the DDoS custom policy resource. This list is read-only.
6146	PublicIPAddresses *[]SubResource `json:"publicIPAddresses,omitempty"`
6147	// ProtocolCustomSettings - The protocol-specific DDoS policy customization parameters.
6148	ProtocolCustomSettings *[]ProtocolCustomSettingsFormat `json:"protocolCustomSettings,omitempty"`
6149}
6150
6151// MarshalJSON is the custom marshaler for DdosCustomPolicyPropertiesFormat.
6152func (dcppf DdosCustomPolicyPropertiesFormat) MarshalJSON() ([]byte, error) {
6153	objectMap := make(map[string]interface{})
6154	if dcppf.ProtocolCustomSettings != nil {
6155		objectMap["protocolCustomSettings"] = dcppf.ProtocolCustomSettings
6156	}
6157	return json.Marshal(objectMap)
6158}
6159
6160// DdosProtectionPlan a DDoS protection plan in a resource group.
6161type DdosProtectionPlan struct {
6162	autorest.Response `json:"-"`
6163	// ID - READ-ONLY; Resource ID.
6164	ID *string `json:"id,omitempty"`
6165	// Name - READ-ONLY; Resource name.
6166	Name *string `json:"name,omitempty"`
6167	// Type - READ-ONLY; Resource type.
6168	Type *string `json:"type,omitempty"`
6169	// Location - Resource location.
6170	Location *string `json:"location,omitempty"`
6171	// Tags - Resource tags.
6172	Tags map[string]*string `json:"tags"`
6173	// DdosProtectionPlanPropertiesFormat - Properties of the DDoS protection plan.
6174	*DdosProtectionPlanPropertiesFormat `json:"properties,omitempty"`
6175	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
6176	Etag *string `json:"etag,omitempty"`
6177}
6178
6179// MarshalJSON is the custom marshaler for DdosProtectionPlan.
6180func (dpp DdosProtectionPlan) MarshalJSON() ([]byte, error) {
6181	objectMap := make(map[string]interface{})
6182	if dpp.Location != nil {
6183		objectMap["location"] = dpp.Location
6184	}
6185	if dpp.Tags != nil {
6186		objectMap["tags"] = dpp.Tags
6187	}
6188	if dpp.DdosProtectionPlanPropertiesFormat != nil {
6189		objectMap["properties"] = dpp.DdosProtectionPlanPropertiesFormat
6190	}
6191	return json.Marshal(objectMap)
6192}
6193
6194// UnmarshalJSON is the custom unmarshaler for DdosProtectionPlan struct.
6195func (dpp *DdosProtectionPlan) UnmarshalJSON(body []byte) error {
6196	var m map[string]*json.RawMessage
6197	err := json.Unmarshal(body, &m)
6198	if err != nil {
6199		return err
6200	}
6201	for k, v := range m {
6202		switch k {
6203		case "id":
6204			if v != nil {
6205				var ID string
6206				err = json.Unmarshal(*v, &ID)
6207				if err != nil {
6208					return err
6209				}
6210				dpp.ID = &ID
6211			}
6212		case "name":
6213			if v != nil {
6214				var name string
6215				err = json.Unmarshal(*v, &name)
6216				if err != nil {
6217					return err
6218				}
6219				dpp.Name = &name
6220			}
6221		case "type":
6222			if v != nil {
6223				var typeVar string
6224				err = json.Unmarshal(*v, &typeVar)
6225				if err != nil {
6226					return err
6227				}
6228				dpp.Type = &typeVar
6229			}
6230		case "location":
6231			if v != nil {
6232				var location string
6233				err = json.Unmarshal(*v, &location)
6234				if err != nil {
6235					return err
6236				}
6237				dpp.Location = &location
6238			}
6239		case "tags":
6240			if v != nil {
6241				var tags map[string]*string
6242				err = json.Unmarshal(*v, &tags)
6243				if err != nil {
6244					return err
6245				}
6246				dpp.Tags = tags
6247			}
6248		case "properties":
6249			if v != nil {
6250				var ddosProtectionPlanPropertiesFormat DdosProtectionPlanPropertiesFormat
6251				err = json.Unmarshal(*v, &ddosProtectionPlanPropertiesFormat)
6252				if err != nil {
6253					return err
6254				}
6255				dpp.DdosProtectionPlanPropertiesFormat = &ddosProtectionPlanPropertiesFormat
6256			}
6257		case "etag":
6258			if v != nil {
6259				var etag string
6260				err = json.Unmarshal(*v, &etag)
6261				if err != nil {
6262					return err
6263				}
6264				dpp.Etag = &etag
6265			}
6266		}
6267	}
6268
6269	return nil
6270}
6271
6272// DdosProtectionPlanListResult a list of DDoS protection plans.
6273type DdosProtectionPlanListResult struct {
6274	autorest.Response `json:"-"`
6275	// Value - A list of DDoS protection plans.
6276	Value *[]DdosProtectionPlan `json:"value,omitempty"`
6277	// NextLink - READ-ONLY; The URL to get the next set of results.
6278	NextLink *string `json:"nextLink,omitempty"`
6279}
6280
6281// MarshalJSON is the custom marshaler for DdosProtectionPlanListResult.
6282func (dpplr DdosProtectionPlanListResult) MarshalJSON() ([]byte, error) {
6283	objectMap := make(map[string]interface{})
6284	if dpplr.Value != nil {
6285		objectMap["value"] = dpplr.Value
6286	}
6287	return json.Marshal(objectMap)
6288}
6289
6290// DdosProtectionPlanListResultIterator provides access to a complete listing of DdosProtectionPlan values.
6291type DdosProtectionPlanListResultIterator struct {
6292	i    int
6293	page DdosProtectionPlanListResultPage
6294}
6295
6296// NextWithContext advances to the next value.  If there was an error making
6297// the request the iterator does not advance and the error is returned.
6298func (iter *DdosProtectionPlanListResultIterator) NextWithContext(ctx context.Context) (err error) {
6299	if tracing.IsEnabled() {
6300		ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlanListResultIterator.NextWithContext")
6301		defer func() {
6302			sc := -1
6303			if iter.Response().Response.Response != nil {
6304				sc = iter.Response().Response.Response.StatusCode
6305			}
6306			tracing.EndSpan(ctx, sc, err)
6307		}()
6308	}
6309	iter.i++
6310	if iter.i < len(iter.page.Values()) {
6311		return nil
6312	}
6313	err = iter.page.NextWithContext(ctx)
6314	if err != nil {
6315		iter.i--
6316		return err
6317	}
6318	iter.i = 0
6319	return nil
6320}
6321
6322// Next advances to the next value.  If there was an error making
6323// the request the iterator does not advance and the error is returned.
6324// Deprecated: Use NextWithContext() instead.
6325func (iter *DdosProtectionPlanListResultIterator) Next() error {
6326	return iter.NextWithContext(context.Background())
6327}
6328
6329// NotDone returns true if the enumeration should be started or is not yet complete.
6330func (iter DdosProtectionPlanListResultIterator) NotDone() bool {
6331	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6332}
6333
6334// Response returns the raw server response from the last page request.
6335func (iter DdosProtectionPlanListResultIterator) Response() DdosProtectionPlanListResult {
6336	return iter.page.Response()
6337}
6338
6339// Value returns the current value or a zero-initialized value if the
6340// iterator has advanced beyond the end of the collection.
6341func (iter DdosProtectionPlanListResultIterator) Value() DdosProtectionPlan {
6342	if !iter.page.NotDone() {
6343		return DdosProtectionPlan{}
6344	}
6345	return iter.page.Values()[iter.i]
6346}
6347
6348// Creates a new instance of the DdosProtectionPlanListResultIterator type.
6349func NewDdosProtectionPlanListResultIterator(page DdosProtectionPlanListResultPage) DdosProtectionPlanListResultIterator {
6350	return DdosProtectionPlanListResultIterator{page: page}
6351}
6352
6353// IsEmpty returns true if the ListResult contains no values.
6354func (dpplr DdosProtectionPlanListResult) IsEmpty() bool {
6355	return dpplr.Value == nil || len(*dpplr.Value) == 0
6356}
6357
6358// hasNextLink returns true if the NextLink is not empty.
6359func (dpplr DdosProtectionPlanListResult) hasNextLink() bool {
6360	return dpplr.NextLink != nil && len(*dpplr.NextLink) != 0
6361}
6362
6363// ddosProtectionPlanListResultPreparer prepares a request to retrieve the next set of results.
6364// It returns nil if no more results exist.
6365func (dpplr DdosProtectionPlanListResult) ddosProtectionPlanListResultPreparer(ctx context.Context) (*http.Request, error) {
6366	if !dpplr.hasNextLink() {
6367		return nil, nil
6368	}
6369	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6370		autorest.AsJSON(),
6371		autorest.AsGet(),
6372		autorest.WithBaseURL(to.String(dpplr.NextLink)))
6373}
6374
6375// DdosProtectionPlanListResultPage contains a page of DdosProtectionPlan values.
6376type DdosProtectionPlanListResultPage struct {
6377	fn    func(context.Context, DdosProtectionPlanListResult) (DdosProtectionPlanListResult, error)
6378	dpplr DdosProtectionPlanListResult
6379}
6380
6381// NextWithContext advances to the next page of values.  If there was an error making
6382// the request the page does not advance and the error is returned.
6383func (page *DdosProtectionPlanListResultPage) NextWithContext(ctx context.Context) (err error) {
6384	if tracing.IsEnabled() {
6385		ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlanListResultPage.NextWithContext")
6386		defer func() {
6387			sc := -1
6388			if page.Response().Response.Response != nil {
6389				sc = page.Response().Response.Response.StatusCode
6390			}
6391			tracing.EndSpan(ctx, sc, err)
6392		}()
6393	}
6394	for {
6395		next, err := page.fn(ctx, page.dpplr)
6396		if err != nil {
6397			return err
6398		}
6399		page.dpplr = next
6400		if !next.hasNextLink() || !next.IsEmpty() {
6401			break
6402		}
6403	}
6404	return nil
6405}
6406
6407// Next advances to the next page of values.  If there was an error making
6408// the request the page does not advance and the error is returned.
6409// Deprecated: Use NextWithContext() instead.
6410func (page *DdosProtectionPlanListResultPage) Next() error {
6411	return page.NextWithContext(context.Background())
6412}
6413
6414// NotDone returns true if the page enumeration should be started or is not yet complete.
6415func (page DdosProtectionPlanListResultPage) NotDone() bool {
6416	return !page.dpplr.IsEmpty()
6417}
6418
6419// Response returns the raw server response from the last page request.
6420func (page DdosProtectionPlanListResultPage) Response() DdosProtectionPlanListResult {
6421	return page.dpplr
6422}
6423
6424// Values returns the slice of values for the current page or nil if there are no values.
6425func (page DdosProtectionPlanListResultPage) Values() []DdosProtectionPlan {
6426	if page.dpplr.IsEmpty() {
6427		return nil
6428	}
6429	return *page.dpplr.Value
6430}
6431
6432// Creates a new instance of the DdosProtectionPlanListResultPage type.
6433func NewDdosProtectionPlanListResultPage(cur DdosProtectionPlanListResult, getNextPage func(context.Context, DdosProtectionPlanListResult) (DdosProtectionPlanListResult, error)) DdosProtectionPlanListResultPage {
6434	return DdosProtectionPlanListResultPage{
6435		fn:    getNextPage,
6436		dpplr: cur,
6437	}
6438}
6439
6440// DdosProtectionPlanPropertiesFormat dDoS protection plan properties.
6441type DdosProtectionPlanPropertiesFormat struct {
6442	// 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.
6443	ResourceGUID *string `json:"resourceGuid,omitempty"`
6444	// ProvisioningState - READ-ONLY; The provisioning state of the DDoS protection plan resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
6445	ProvisioningState *string `json:"provisioningState,omitempty"`
6446	// VirtualNetworks - READ-ONLY; The list of virtual networks associated with the DDoS protection plan resource. This list is read-only.
6447	VirtualNetworks *[]SubResource `json:"virtualNetworks,omitempty"`
6448}
6449
6450// DdosProtectionPlansCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
6451// long-running operation.
6452type DdosProtectionPlansCreateOrUpdateFuture struct {
6453	azure.FutureAPI
6454	// Result returns the result of the asynchronous operation.
6455	// If the operation has not completed it will return an error.
6456	Result func(DdosProtectionPlansClient) (DdosProtectionPlan, error)
6457}
6458
6459// DdosProtectionPlansDeleteFuture an abstraction for monitoring and retrieving the results of a
6460// long-running operation.
6461type DdosProtectionPlansDeleteFuture struct {
6462	azure.FutureAPI
6463	// Result returns the result of the asynchronous operation.
6464	// If the operation has not completed it will return an error.
6465	Result func(DdosProtectionPlansClient) (autorest.Response, error)
6466}
6467
6468// DdosProtectionPlansUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
6469// long-running operation.
6470type DdosProtectionPlansUpdateTagsFuture struct {
6471	azure.FutureAPI
6472	// Result returns the result of the asynchronous operation.
6473	// If the operation has not completed it will return an error.
6474	Result func(DdosProtectionPlansClient) (DdosProtectionPlan, error)
6475}
6476
6477// DdosSettings contains the DDoS protection settings of the public IP.
6478type DdosSettings struct {
6479	// DdosCustomPolicy - The DDoS custom policy associated with the public IP.
6480	DdosCustomPolicy *SubResource `json:"ddosCustomPolicy,omitempty"`
6481	// ProtectionCoverage - The DDoS protection policy customizability of the public IP. Only standard coverage will have the ability to be customized. Possible values include: 'DdosSettingsProtectionCoverageBasic', 'DdosSettingsProtectionCoverageStandard'
6482	ProtectionCoverage DdosSettingsProtectionCoverage `json:"protectionCoverage,omitempty"`
6483}
6484
6485// Delegation details the service to which the subnet is delegated.
6486type Delegation struct {
6487	// ServiceDelegationPropertiesFormat - Properties of the subnet.
6488	*ServiceDelegationPropertiesFormat `json:"properties,omitempty"`
6489	// Name - The name of the resource that is unique within a subnet. This name can be used to access the resource.
6490	Name *string `json:"name,omitempty"`
6491	// Etag - A unique read-only string that changes whenever the resource is updated.
6492	Etag *string `json:"etag,omitempty"`
6493	// ID - Resource ID.
6494	ID *string `json:"id,omitempty"`
6495}
6496
6497// MarshalJSON is the custom marshaler for Delegation.
6498func (d Delegation) MarshalJSON() ([]byte, error) {
6499	objectMap := make(map[string]interface{})
6500	if d.ServiceDelegationPropertiesFormat != nil {
6501		objectMap["properties"] = d.ServiceDelegationPropertiesFormat
6502	}
6503	if d.Name != nil {
6504		objectMap["name"] = d.Name
6505	}
6506	if d.Etag != nil {
6507		objectMap["etag"] = d.Etag
6508	}
6509	if d.ID != nil {
6510		objectMap["id"] = d.ID
6511	}
6512	return json.Marshal(objectMap)
6513}
6514
6515// UnmarshalJSON is the custom unmarshaler for Delegation struct.
6516func (d *Delegation) UnmarshalJSON(body []byte) error {
6517	var m map[string]*json.RawMessage
6518	err := json.Unmarshal(body, &m)
6519	if err != nil {
6520		return err
6521	}
6522	for k, v := range m {
6523		switch k {
6524		case "properties":
6525			if v != nil {
6526				var serviceDelegationPropertiesFormat ServiceDelegationPropertiesFormat
6527				err = json.Unmarshal(*v, &serviceDelegationPropertiesFormat)
6528				if err != nil {
6529					return err
6530				}
6531				d.ServiceDelegationPropertiesFormat = &serviceDelegationPropertiesFormat
6532			}
6533		case "name":
6534			if v != nil {
6535				var name string
6536				err = json.Unmarshal(*v, &name)
6537				if err != nil {
6538					return err
6539				}
6540				d.Name = &name
6541			}
6542		case "etag":
6543			if v != nil {
6544				var etag string
6545				err = json.Unmarshal(*v, &etag)
6546				if err != nil {
6547					return err
6548				}
6549				d.Etag = &etag
6550			}
6551		case "id":
6552			if v != nil {
6553				var ID string
6554				err = json.Unmarshal(*v, &ID)
6555				if err != nil {
6556					return err
6557				}
6558				d.ID = &ID
6559			}
6560		}
6561	}
6562
6563	return nil
6564}
6565
6566// DeviceProperties list of properties of the device.
6567type DeviceProperties struct {
6568	// DeviceVendor - Name of the device Vendor.
6569	DeviceVendor *string `json:"deviceVendor,omitempty"`
6570	// DeviceModel - Model of the device.
6571	DeviceModel *string `json:"deviceModel,omitempty"`
6572	// LinkSpeedInMbps - Link speed.
6573	LinkSpeedInMbps *int32 `json:"linkSpeedInMbps,omitempty"`
6574}
6575
6576// DhcpOptions dhcpOptions contains an array of DNS servers available to VMs deployed in the virtual
6577// network. Standard DHCP option for a subnet overrides VNET DHCP options.
6578type DhcpOptions struct {
6579	// DNSServers - The list of DNS servers IP addresses.
6580	DNSServers *[]string `json:"dnsServers,omitempty"`
6581}
6582
6583// Dimension dimension of the metric.
6584type Dimension struct {
6585	// Name - The name of the dimension.
6586	Name *string `json:"name,omitempty"`
6587	// DisplayName - The display name of the dimension.
6588	DisplayName *string `json:"displayName,omitempty"`
6589	// InternalName - The internal name of the dimension.
6590	InternalName *string `json:"internalName,omitempty"`
6591}
6592
6593// DNSNameAvailabilityResult response for the CheckDnsNameAvailability API service call.
6594type DNSNameAvailabilityResult struct {
6595	autorest.Response `json:"-"`
6596	// Available - Domain availability (True/False).
6597	Available *bool `json:"available,omitempty"`
6598}
6599
6600// EffectiveNetworkSecurityGroup effective network security group.
6601type EffectiveNetworkSecurityGroup struct {
6602	// NetworkSecurityGroup - The ID of network security group that is applied.
6603	NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"`
6604	// Association - Associated resources.
6605	Association *EffectiveNetworkSecurityGroupAssociation `json:"association,omitempty"`
6606	// EffectiveSecurityRules - A collection of effective security rules.
6607	EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"`
6608	// TagMap - Mapping of tags to list of IP Addresses included within the tag.
6609	TagMap map[string][]string `json:"tagMap"`
6610}
6611
6612// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroup.
6613func (ensg EffectiveNetworkSecurityGroup) MarshalJSON() ([]byte, error) {
6614	objectMap := make(map[string]interface{})
6615	if ensg.NetworkSecurityGroup != nil {
6616		objectMap["networkSecurityGroup"] = ensg.NetworkSecurityGroup
6617	}
6618	if ensg.Association != nil {
6619		objectMap["association"] = ensg.Association
6620	}
6621	if ensg.EffectiveSecurityRules != nil {
6622		objectMap["effectiveSecurityRules"] = ensg.EffectiveSecurityRules
6623	}
6624	if ensg.TagMap != nil {
6625		objectMap["tagMap"] = ensg.TagMap
6626	}
6627	return json.Marshal(objectMap)
6628}
6629
6630// EffectiveNetworkSecurityGroupAssociation the effective network security group association.
6631type EffectiveNetworkSecurityGroupAssociation struct {
6632	// Subnet - The ID of the subnet if assigned.
6633	Subnet *SubResource `json:"subnet,omitempty"`
6634	// NetworkInterface - The ID of the network interface if assigned.
6635	NetworkInterface *SubResource `json:"networkInterface,omitempty"`
6636}
6637
6638// EffectiveNetworkSecurityGroupListResult response for list effective network security groups API service
6639// call.
6640type EffectiveNetworkSecurityGroupListResult struct {
6641	autorest.Response `json:"-"`
6642	// Value - A list of effective network security groups.
6643	Value *[]EffectiveNetworkSecurityGroup `json:"value,omitempty"`
6644	// NextLink - READ-ONLY; The URL to get the next set of results.
6645	NextLink *string `json:"nextLink,omitempty"`
6646}
6647
6648// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroupListResult.
6649func (ensglr EffectiveNetworkSecurityGroupListResult) MarshalJSON() ([]byte, error) {
6650	objectMap := make(map[string]interface{})
6651	if ensglr.Value != nil {
6652		objectMap["value"] = ensglr.Value
6653	}
6654	return json.Marshal(objectMap)
6655}
6656
6657// EffectiveNetworkSecurityRule effective network security rules.
6658type EffectiveNetworkSecurityRule struct {
6659	// Name - The name of the security rule specified by the user (if created by the user).
6660	Name *string `json:"name,omitempty"`
6661	// Protocol - The network protocol this rule applies to. Possible values are: 'Tcp', 'Udp', and 'All'. Possible values include: 'EffectiveSecurityRuleProtocolTCP', 'EffectiveSecurityRuleProtocolUDP', 'EffectiveSecurityRuleProtocolAll'
6662	Protocol EffectiveSecurityRuleProtocol `json:"protocol,omitempty"`
6663	// SourcePortRange - The source port or range.
6664	SourcePortRange *string `json:"sourcePortRange,omitempty"`
6665	// DestinationPortRange - The destination port or range.
6666	DestinationPortRange *string `json:"destinationPortRange,omitempty"`
6667	// 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 (*)
6668	SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"`
6669	// 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 (*)
6670	DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"`
6671	// SourceAddressPrefix - The source address prefix.
6672	SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
6673	// DestinationAddressPrefix - The destination address prefix.
6674	DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"`
6675	// SourceAddressPrefixes - The source address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*).
6676	SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"`
6677	// DestinationAddressPrefixes - The destination address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*).
6678	DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"`
6679	// ExpandedSourceAddressPrefix - The expanded source address prefix.
6680	ExpandedSourceAddressPrefix *[]string `json:"expandedSourceAddressPrefix,omitempty"`
6681	// ExpandedDestinationAddressPrefix - Expanded destination address prefix.
6682	ExpandedDestinationAddressPrefix *[]string `json:"expandedDestinationAddressPrefix,omitempty"`
6683	// Access - Whether network traffic is allowed or denied. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
6684	Access SecurityRuleAccess `json:"access,omitempty"`
6685	// Priority - The priority of the rule.
6686	Priority *int32 `json:"priority,omitempty"`
6687	// Direction - The direction of the rule. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound'
6688	Direction SecurityRuleDirection `json:"direction,omitempty"`
6689}
6690
6691// EffectiveRoute effective Route
6692type EffectiveRoute struct {
6693	// Name - The name of the user defined route. This is optional.
6694	Name *string `json:"name,omitempty"`
6695	// DisableBgpRoutePropagation - If true, on-premises routes are not propagated to the network interfaces in the subnet.
6696	DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"`
6697	// Source - Who created the route. Possible values are: 'Unknown', 'User', 'VirtualNetworkGateway', and 'Default'. Possible values include: 'EffectiveRouteSourceUnknown', 'EffectiveRouteSourceUser', 'EffectiveRouteSourceVirtualNetworkGateway', 'EffectiveRouteSourceDefault'
6698	Source EffectiveRouteSource `json:"source,omitempty"`
6699	// State - The value of effective route. Possible values are: 'Active' and 'Invalid'. Possible values include: 'Active', 'Invalid'
6700	State EffectiveRouteState `json:"state,omitempty"`
6701	// AddressPrefix - The address prefixes of the effective routes in CIDR notation.
6702	AddressPrefix *[]string `json:"addressPrefix,omitempty"`
6703	// NextHopIPAddress - The IP address of the next hop of the effective route.
6704	NextHopIPAddress *[]string `json:"nextHopIpAddress,omitempty"`
6705	// NextHopType - The type of Azure hop the packet should be sent to. Possible values include: 'RouteNextHopTypeVirtualNetworkGateway', 'RouteNextHopTypeVnetLocal', 'RouteNextHopTypeInternet', 'RouteNextHopTypeVirtualAppliance', 'RouteNextHopTypeNone'
6706	NextHopType RouteNextHopType `json:"nextHopType,omitempty"`
6707}
6708
6709// EffectiveRouteListResult response for list effective route API service call.
6710type EffectiveRouteListResult struct {
6711	autorest.Response `json:"-"`
6712	// Value - A list of effective routes.
6713	Value *[]EffectiveRoute `json:"value,omitempty"`
6714	// NextLink - READ-ONLY; The URL to get the next set of results.
6715	NextLink *string `json:"nextLink,omitempty"`
6716}
6717
6718// MarshalJSON is the custom marshaler for EffectiveRouteListResult.
6719func (erlr EffectiveRouteListResult) MarshalJSON() ([]byte, error) {
6720	objectMap := make(map[string]interface{})
6721	if erlr.Value != nil {
6722		objectMap["value"] = erlr.Value
6723	}
6724	return json.Marshal(objectMap)
6725}
6726
6727// EndpointService identifies the service being brought into the virtual network.
6728type EndpointService struct {
6729	// ID - A unique identifier of the service being referenced by the interface endpoint.
6730	ID *string `json:"id,omitempty"`
6731}
6732
6733// EndpointServiceResult endpoint service.
6734type EndpointServiceResult struct {
6735	// Name - READ-ONLY; Name of the endpoint service.
6736	Name *string `json:"name,omitempty"`
6737	// Type - READ-ONLY; Type of the endpoint service.
6738	Type *string `json:"type,omitempty"`
6739	// ID - Resource ID.
6740	ID *string `json:"id,omitempty"`
6741}
6742
6743// MarshalJSON is the custom marshaler for EndpointServiceResult.
6744func (esr EndpointServiceResult) MarshalJSON() ([]byte, error) {
6745	objectMap := make(map[string]interface{})
6746	if esr.ID != nil {
6747		objectMap["id"] = esr.ID
6748	}
6749	return json.Marshal(objectMap)
6750}
6751
6752// EndpointServicesListResult response for the ListAvailableEndpointServices API service call.
6753type EndpointServicesListResult struct {
6754	autorest.Response `json:"-"`
6755	// Value - List of available endpoint services in a region.
6756	Value *[]EndpointServiceResult `json:"value,omitempty"`
6757	// NextLink - The URL to get the next set of results.
6758	NextLink *string `json:"nextLink,omitempty"`
6759}
6760
6761// EndpointServicesListResultIterator provides access to a complete listing of EndpointServiceResult
6762// values.
6763type EndpointServicesListResultIterator struct {
6764	i    int
6765	page EndpointServicesListResultPage
6766}
6767
6768// NextWithContext advances to the next value.  If there was an error making
6769// the request the iterator does not advance and the error is returned.
6770func (iter *EndpointServicesListResultIterator) NextWithContext(ctx context.Context) (err error) {
6771	if tracing.IsEnabled() {
6772		ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultIterator.NextWithContext")
6773		defer func() {
6774			sc := -1
6775			if iter.Response().Response.Response != nil {
6776				sc = iter.Response().Response.Response.StatusCode
6777			}
6778			tracing.EndSpan(ctx, sc, err)
6779		}()
6780	}
6781	iter.i++
6782	if iter.i < len(iter.page.Values()) {
6783		return nil
6784	}
6785	err = iter.page.NextWithContext(ctx)
6786	if err != nil {
6787		iter.i--
6788		return err
6789	}
6790	iter.i = 0
6791	return nil
6792}
6793
6794// Next advances to the next value.  If there was an error making
6795// the request the iterator does not advance and the error is returned.
6796// Deprecated: Use NextWithContext() instead.
6797func (iter *EndpointServicesListResultIterator) Next() error {
6798	return iter.NextWithContext(context.Background())
6799}
6800
6801// NotDone returns true if the enumeration should be started or is not yet complete.
6802func (iter EndpointServicesListResultIterator) NotDone() bool {
6803	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6804}
6805
6806// Response returns the raw server response from the last page request.
6807func (iter EndpointServicesListResultIterator) Response() EndpointServicesListResult {
6808	return iter.page.Response()
6809}
6810
6811// Value returns the current value or a zero-initialized value if the
6812// iterator has advanced beyond the end of the collection.
6813func (iter EndpointServicesListResultIterator) Value() EndpointServiceResult {
6814	if !iter.page.NotDone() {
6815		return EndpointServiceResult{}
6816	}
6817	return iter.page.Values()[iter.i]
6818}
6819
6820// Creates a new instance of the EndpointServicesListResultIterator type.
6821func NewEndpointServicesListResultIterator(page EndpointServicesListResultPage) EndpointServicesListResultIterator {
6822	return EndpointServicesListResultIterator{page: page}
6823}
6824
6825// IsEmpty returns true if the ListResult contains no values.
6826func (eslr EndpointServicesListResult) IsEmpty() bool {
6827	return eslr.Value == nil || len(*eslr.Value) == 0
6828}
6829
6830// hasNextLink returns true if the NextLink is not empty.
6831func (eslr EndpointServicesListResult) hasNextLink() bool {
6832	return eslr.NextLink != nil && len(*eslr.NextLink) != 0
6833}
6834
6835// endpointServicesListResultPreparer prepares a request to retrieve the next set of results.
6836// It returns nil if no more results exist.
6837func (eslr EndpointServicesListResult) endpointServicesListResultPreparer(ctx context.Context) (*http.Request, error) {
6838	if !eslr.hasNextLink() {
6839		return nil, nil
6840	}
6841	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6842		autorest.AsJSON(),
6843		autorest.AsGet(),
6844		autorest.WithBaseURL(to.String(eslr.NextLink)))
6845}
6846
6847// EndpointServicesListResultPage contains a page of EndpointServiceResult values.
6848type EndpointServicesListResultPage struct {
6849	fn   func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)
6850	eslr EndpointServicesListResult
6851}
6852
6853// NextWithContext advances to the next page of values.  If there was an error making
6854// the request the page does not advance and the error is returned.
6855func (page *EndpointServicesListResultPage) NextWithContext(ctx context.Context) (err error) {
6856	if tracing.IsEnabled() {
6857		ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultPage.NextWithContext")
6858		defer func() {
6859			sc := -1
6860			if page.Response().Response.Response != nil {
6861				sc = page.Response().Response.Response.StatusCode
6862			}
6863			tracing.EndSpan(ctx, sc, err)
6864		}()
6865	}
6866	for {
6867		next, err := page.fn(ctx, page.eslr)
6868		if err != nil {
6869			return err
6870		}
6871		page.eslr = next
6872		if !next.hasNextLink() || !next.IsEmpty() {
6873			break
6874		}
6875	}
6876	return nil
6877}
6878
6879// Next advances to the next page of values.  If there was an error making
6880// the request the page does not advance and the error is returned.
6881// Deprecated: Use NextWithContext() instead.
6882func (page *EndpointServicesListResultPage) Next() error {
6883	return page.NextWithContext(context.Background())
6884}
6885
6886// NotDone returns true if the page enumeration should be started or is not yet complete.
6887func (page EndpointServicesListResultPage) NotDone() bool {
6888	return !page.eslr.IsEmpty()
6889}
6890
6891// Response returns the raw server response from the last page request.
6892func (page EndpointServicesListResultPage) Response() EndpointServicesListResult {
6893	return page.eslr
6894}
6895
6896// Values returns the slice of values for the current page or nil if there are no values.
6897func (page EndpointServicesListResultPage) Values() []EndpointServiceResult {
6898	if page.eslr.IsEmpty() {
6899		return nil
6900	}
6901	return *page.eslr.Value
6902}
6903
6904// Creates a new instance of the EndpointServicesListResultPage type.
6905func NewEndpointServicesListResultPage(cur EndpointServicesListResult, getNextPage func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)) EndpointServicesListResultPage {
6906	return EndpointServicesListResultPage{
6907		fn:   getNextPage,
6908		eslr: cur,
6909	}
6910}
6911
6912// Error common error representation.
6913type Error struct {
6914	// Code - Error code.
6915	Code *string `json:"code,omitempty"`
6916	// Message - Error message.
6917	Message *string `json:"message,omitempty"`
6918	// Target - Error target.
6919	Target *string `json:"target,omitempty"`
6920	// Details - Error details.
6921	Details *[]ErrorDetails `json:"details,omitempty"`
6922	// InnerError - Inner error message.
6923	InnerError *string `json:"innerError,omitempty"`
6924}
6925
6926// ErrorDetails common error details representation.
6927type ErrorDetails struct {
6928	// Code - Error code.
6929	Code *string `json:"code,omitempty"`
6930	// Target - Error target.
6931	Target *string `json:"target,omitempty"`
6932	// Message - Error message.
6933	Message *string `json:"message,omitempty"`
6934}
6935
6936// ErrorResponse the error object.
6937type ErrorResponse struct {
6938	// Error - The error details object.
6939	Error *ErrorDetails `json:"error,omitempty"`
6940}
6941
6942// EvaluatedNetworkSecurityGroup results of network security group evaluation.
6943type EvaluatedNetworkSecurityGroup struct {
6944	// NetworkSecurityGroupID - Network security group ID.
6945	NetworkSecurityGroupID *string `json:"networkSecurityGroupId,omitempty"`
6946	// AppliedTo - Resource ID of nic or subnet to which network security group is applied.
6947	AppliedTo *string `json:"appliedTo,omitempty"`
6948	// MatchedRule - Matched network security rule.
6949	MatchedRule *MatchedRule `json:"matchedRule,omitempty"`
6950	// RulesEvaluationResult - READ-ONLY; List of network security rules evaluation results.
6951	RulesEvaluationResult *[]SecurityRulesEvaluationResult `json:"rulesEvaluationResult,omitempty"`
6952}
6953
6954// MarshalJSON is the custom marshaler for EvaluatedNetworkSecurityGroup.
6955func (ensg EvaluatedNetworkSecurityGroup) MarshalJSON() ([]byte, error) {
6956	objectMap := make(map[string]interface{})
6957	if ensg.NetworkSecurityGroupID != nil {
6958		objectMap["networkSecurityGroupId"] = ensg.NetworkSecurityGroupID
6959	}
6960	if ensg.AppliedTo != nil {
6961		objectMap["appliedTo"] = ensg.AppliedTo
6962	}
6963	if ensg.MatchedRule != nil {
6964		objectMap["matchedRule"] = ensg.MatchedRule
6965	}
6966	return json.Marshal(objectMap)
6967}
6968
6969// ExpressRouteCircuit expressRouteCircuit resource
6970type ExpressRouteCircuit struct {
6971	autorest.Response `json:"-"`
6972	// Sku - The SKU.
6973	Sku *ExpressRouteCircuitSku `json:"sku,omitempty"`
6974	// ExpressRouteCircuitPropertiesFormat - Properties of the express route circuit.
6975	*ExpressRouteCircuitPropertiesFormat `json:"properties,omitempty"`
6976	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
6977	Etag *string `json:"etag,omitempty"`
6978	// ID - Resource ID.
6979	ID *string `json:"id,omitempty"`
6980	// Name - READ-ONLY; Resource name.
6981	Name *string `json:"name,omitempty"`
6982	// Type - READ-ONLY; Resource type.
6983	Type *string `json:"type,omitempty"`
6984	// Location - Resource location.
6985	Location *string `json:"location,omitempty"`
6986	// Tags - Resource tags.
6987	Tags map[string]*string `json:"tags"`
6988}
6989
6990// MarshalJSON is the custom marshaler for ExpressRouteCircuit.
6991func (erc ExpressRouteCircuit) MarshalJSON() ([]byte, error) {
6992	objectMap := make(map[string]interface{})
6993	if erc.Sku != nil {
6994		objectMap["sku"] = erc.Sku
6995	}
6996	if erc.ExpressRouteCircuitPropertiesFormat != nil {
6997		objectMap["properties"] = erc.ExpressRouteCircuitPropertiesFormat
6998	}
6999	if erc.ID != nil {
7000		objectMap["id"] = erc.ID
7001	}
7002	if erc.Location != nil {
7003		objectMap["location"] = erc.Location
7004	}
7005	if erc.Tags != nil {
7006		objectMap["tags"] = erc.Tags
7007	}
7008	return json.Marshal(objectMap)
7009}
7010
7011// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuit struct.
7012func (erc *ExpressRouteCircuit) UnmarshalJSON(body []byte) error {
7013	var m map[string]*json.RawMessage
7014	err := json.Unmarshal(body, &m)
7015	if err != nil {
7016		return err
7017	}
7018	for k, v := range m {
7019		switch k {
7020		case "sku":
7021			if v != nil {
7022				var sku ExpressRouteCircuitSku
7023				err = json.Unmarshal(*v, &sku)
7024				if err != nil {
7025					return err
7026				}
7027				erc.Sku = &sku
7028			}
7029		case "properties":
7030			if v != nil {
7031				var expressRouteCircuitPropertiesFormat ExpressRouteCircuitPropertiesFormat
7032				err = json.Unmarshal(*v, &expressRouteCircuitPropertiesFormat)
7033				if err != nil {
7034					return err
7035				}
7036				erc.ExpressRouteCircuitPropertiesFormat = &expressRouteCircuitPropertiesFormat
7037			}
7038		case "etag":
7039			if v != nil {
7040				var etag string
7041				err = json.Unmarshal(*v, &etag)
7042				if err != nil {
7043					return err
7044				}
7045				erc.Etag = &etag
7046			}
7047		case "id":
7048			if v != nil {
7049				var ID string
7050				err = json.Unmarshal(*v, &ID)
7051				if err != nil {
7052					return err
7053				}
7054				erc.ID = &ID
7055			}
7056		case "name":
7057			if v != nil {
7058				var name string
7059				err = json.Unmarshal(*v, &name)
7060				if err != nil {
7061					return err
7062				}
7063				erc.Name = &name
7064			}
7065		case "type":
7066			if v != nil {
7067				var typeVar string
7068				err = json.Unmarshal(*v, &typeVar)
7069				if err != nil {
7070					return err
7071				}
7072				erc.Type = &typeVar
7073			}
7074		case "location":
7075			if v != nil {
7076				var location string
7077				err = json.Unmarshal(*v, &location)
7078				if err != nil {
7079					return err
7080				}
7081				erc.Location = &location
7082			}
7083		case "tags":
7084			if v != nil {
7085				var tags map[string]*string
7086				err = json.Unmarshal(*v, &tags)
7087				if err != nil {
7088					return err
7089				}
7090				erc.Tags = tags
7091			}
7092		}
7093	}
7094
7095	return nil
7096}
7097
7098// ExpressRouteCircuitArpTable the ARP table associated with the ExpressRouteCircuit.
7099type ExpressRouteCircuitArpTable struct {
7100	// Age - Entry age in minutes
7101	Age *int32 `json:"age,omitempty"`
7102	// Interface - Interface address
7103	Interface *string `json:"interface,omitempty"`
7104	// IPAddress - The IP address.
7105	IPAddress *string `json:"ipAddress,omitempty"`
7106	// MacAddress - The MAC address.
7107	MacAddress *string `json:"macAddress,omitempty"`
7108}
7109
7110// ExpressRouteCircuitAuthorization authorization in an ExpressRouteCircuit resource.
7111type ExpressRouteCircuitAuthorization struct {
7112	autorest.Response `json:"-"`
7113	// AuthorizationPropertiesFormat - Properties of the express route circuit authorization.
7114	*AuthorizationPropertiesFormat `json:"properties,omitempty"`
7115	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
7116	Name *string `json:"name,omitempty"`
7117	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
7118	Etag *string `json:"etag,omitempty"`
7119	// ID - Resource ID.
7120	ID *string `json:"id,omitempty"`
7121}
7122
7123// MarshalJSON is the custom marshaler for ExpressRouteCircuitAuthorization.
7124func (erca ExpressRouteCircuitAuthorization) MarshalJSON() ([]byte, error) {
7125	objectMap := make(map[string]interface{})
7126	if erca.AuthorizationPropertiesFormat != nil {
7127		objectMap["properties"] = erca.AuthorizationPropertiesFormat
7128	}
7129	if erca.Name != nil {
7130		objectMap["name"] = erca.Name
7131	}
7132	if erca.ID != nil {
7133		objectMap["id"] = erca.ID
7134	}
7135	return json.Marshal(objectMap)
7136}
7137
7138// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitAuthorization struct.
7139func (erca *ExpressRouteCircuitAuthorization) UnmarshalJSON(body []byte) error {
7140	var m map[string]*json.RawMessage
7141	err := json.Unmarshal(body, &m)
7142	if err != nil {
7143		return err
7144	}
7145	for k, v := range m {
7146		switch k {
7147		case "properties":
7148			if v != nil {
7149				var authorizationPropertiesFormat AuthorizationPropertiesFormat
7150				err = json.Unmarshal(*v, &authorizationPropertiesFormat)
7151				if err != nil {
7152					return err
7153				}
7154				erca.AuthorizationPropertiesFormat = &authorizationPropertiesFormat
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				erca.Name = &name
7164			}
7165		case "etag":
7166			if v != nil {
7167				var etag string
7168				err = json.Unmarshal(*v, &etag)
7169				if err != nil {
7170					return err
7171				}
7172				erca.Etag = &etag
7173			}
7174		case "id":
7175			if v != nil {
7176				var ID string
7177				err = json.Unmarshal(*v, &ID)
7178				if err != nil {
7179					return err
7180				}
7181				erca.ID = &ID
7182			}
7183		}
7184	}
7185
7186	return nil
7187}
7188
7189// ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
7190// results of a long-running operation.
7191type ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture struct {
7192	azure.FutureAPI
7193	// Result returns the result of the asynchronous operation.
7194	// If the operation has not completed it will return an error.
7195	Result func(ExpressRouteCircuitAuthorizationsClient) (ExpressRouteCircuitAuthorization, error)
7196}
7197
7198// ExpressRouteCircuitAuthorizationsDeleteFuture an abstraction for monitoring and retrieving the results
7199// of a long-running operation.
7200type ExpressRouteCircuitAuthorizationsDeleteFuture struct {
7201	azure.FutureAPI
7202	// Result returns the result of the asynchronous operation.
7203	// If the operation has not completed it will return an error.
7204	Result func(ExpressRouteCircuitAuthorizationsClient) (autorest.Response, error)
7205}
7206
7207// ExpressRouteCircuitConnection express Route Circuit Connection in an ExpressRouteCircuitPeering
7208// resource.
7209type ExpressRouteCircuitConnection struct {
7210	autorest.Response `json:"-"`
7211	// ExpressRouteCircuitConnectionPropertiesFormat - Properties of the express route circuit connection.
7212	*ExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"`
7213	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
7214	Name *string `json:"name,omitempty"`
7215	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
7216	Etag *string `json:"etag,omitempty"`
7217	// ID - Resource ID.
7218	ID *string `json:"id,omitempty"`
7219}
7220
7221// MarshalJSON is the custom marshaler for ExpressRouteCircuitConnection.
7222func (ercc ExpressRouteCircuitConnection) MarshalJSON() ([]byte, error) {
7223	objectMap := make(map[string]interface{})
7224	if ercc.ExpressRouteCircuitConnectionPropertiesFormat != nil {
7225		objectMap["properties"] = ercc.ExpressRouteCircuitConnectionPropertiesFormat
7226	}
7227	if ercc.Name != nil {
7228		objectMap["name"] = ercc.Name
7229	}
7230	if ercc.ID != nil {
7231		objectMap["id"] = ercc.ID
7232	}
7233	return json.Marshal(objectMap)
7234}
7235
7236// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitConnection struct.
7237func (ercc *ExpressRouteCircuitConnection) UnmarshalJSON(body []byte) error {
7238	var m map[string]*json.RawMessage
7239	err := json.Unmarshal(body, &m)
7240	if err != nil {
7241		return err
7242	}
7243	for k, v := range m {
7244		switch k {
7245		case "properties":
7246			if v != nil {
7247				var expressRouteCircuitConnectionPropertiesFormat ExpressRouteCircuitConnectionPropertiesFormat
7248				err = json.Unmarshal(*v, &expressRouteCircuitConnectionPropertiesFormat)
7249				if err != nil {
7250					return err
7251				}
7252				ercc.ExpressRouteCircuitConnectionPropertiesFormat = &expressRouteCircuitConnectionPropertiesFormat
7253			}
7254		case "name":
7255			if v != nil {
7256				var name string
7257				err = json.Unmarshal(*v, &name)
7258				if err != nil {
7259					return err
7260				}
7261				ercc.Name = &name
7262			}
7263		case "etag":
7264			if v != nil {
7265				var etag string
7266				err = json.Unmarshal(*v, &etag)
7267				if err != nil {
7268					return err
7269				}
7270				ercc.Etag = &etag
7271			}
7272		case "id":
7273			if v != nil {
7274				var ID string
7275				err = json.Unmarshal(*v, &ID)
7276				if err != nil {
7277					return err
7278				}
7279				ercc.ID = &ID
7280			}
7281		}
7282	}
7283
7284	return nil
7285}
7286
7287// ExpressRouteCircuitConnectionListResult response for ListConnections API service call retrieves all
7288// global reach connections that belongs to a Private Peering for an ExpressRouteCircuit.
7289type ExpressRouteCircuitConnectionListResult struct {
7290	autorest.Response `json:"-"`
7291	// Value - The global reach connection associated with Private Peering in an ExpressRoute Circuit.
7292	Value *[]ExpressRouteCircuitConnection `json:"value,omitempty"`
7293	// NextLink - The URL to get the next set of results.
7294	NextLink *string `json:"nextLink,omitempty"`
7295}
7296
7297// ExpressRouteCircuitConnectionListResultIterator provides access to a complete listing of
7298// ExpressRouteCircuitConnection values.
7299type ExpressRouteCircuitConnectionListResultIterator struct {
7300	i    int
7301	page ExpressRouteCircuitConnectionListResultPage
7302}
7303
7304// NextWithContext advances to the next value.  If there was an error making
7305// the request the iterator does not advance and the error is returned.
7306func (iter *ExpressRouteCircuitConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
7307	if tracing.IsEnabled() {
7308		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitConnectionListResultIterator.NextWithContext")
7309		defer func() {
7310			sc := -1
7311			if iter.Response().Response.Response != nil {
7312				sc = iter.Response().Response.Response.StatusCode
7313			}
7314			tracing.EndSpan(ctx, sc, err)
7315		}()
7316	}
7317	iter.i++
7318	if iter.i < len(iter.page.Values()) {
7319		return nil
7320	}
7321	err = iter.page.NextWithContext(ctx)
7322	if err != nil {
7323		iter.i--
7324		return err
7325	}
7326	iter.i = 0
7327	return nil
7328}
7329
7330// Next advances to the next value.  If there was an error making
7331// the request the iterator does not advance and the error is returned.
7332// Deprecated: Use NextWithContext() instead.
7333func (iter *ExpressRouteCircuitConnectionListResultIterator) Next() error {
7334	return iter.NextWithContext(context.Background())
7335}
7336
7337// NotDone returns true if the enumeration should be started or is not yet complete.
7338func (iter ExpressRouteCircuitConnectionListResultIterator) NotDone() bool {
7339	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7340}
7341
7342// Response returns the raw server response from the last page request.
7343func (iter ExpressRouteCircuitConnectionListResultIterator) Response() ExpressRouteCircuitConnectionListResult {
7344	return iter.page.Response()
7345}
7346
7347// Value returns the current value or a zero-initialized value if the
7348// iterator has advanced beyond the end of the collection.
7349func (iter ExpressRouteCircuitConnectionListResultIterator) Value() ExpressRouteCircuitConnection {
7350	if !iter.page.NotDone() {
7351		return ExpressRouteCircuitConnection{}
7352	}
7353	return iter.page.Values()[iter.i]
7354}
7355
7356// Creates a new instance of the ExpressRouteCircuitConnectionListResultIterator type.
7357func NewExpressRouteCircuitConnectionListResultIterator(page ExpressRouteCircuitConnectionListResultPage) ExpressRouteCircuitConnectionListResultIterator {
7358	return ExpressRouteCircuitConnectionListResultIterator{page: page}
7359}
7360
7361// IsEmpty returns true if the ListResult contains no values.
7362func (ercclr ExpressRouteCircuitConnectionListResult) IsEmpty() bool {
7363	return ercclr.Value == nil || len(*ercclr.Value) == 0
7364}
7365
7366// hasNextLink returns true if the NextLink is not empty.
7367func (ercclr ExpressRouteCircuitConnectionListResult) hasNextLink() bool {
7368	return ercclr.NextLink != nil && len(*ercclr.NextLink) != 0
7369}
7370
7371// expressRouteCircuitConnectionListResultPreparer prepares a request to retrieve the next set of results.
7372// It returns nil if no more results exist.
7373func (ercclr ExpressRouteCircuitConnectionListResult) expressRouteCircuitConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
7374	if !ercclr.hasNextLink() {
7375		return nil, nil
7376	}
7377	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7378		autorest.AsJSON(),
7379		autorest.AsGet(),
7380		autorest.WithBaseURL(to.String(ercclr.NextLink)))
7381}
7382
7383// ExpressRouteCircuitConnectionListResultPage contains a page of ExpressRouteCircuitConnection values.
7384type ExpressRouteCircuitConnectionListResultPage struct {
7385	fn     func(context.Context, ExpressRouteCircuitConnectionListResult) (ExpressRouteCircuitConnectionListResult, error)
7386	ercclr ExpressRouteCircuitConnectionListResult
7387}
7388
7389// NextWithContext advances to the next page of values.  If there was an error making
7390// the request the page does not advance and the error is returned.
7391func (page *ExpressRouteCircuitConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
7392	if tracing.IsEnabled() {
7393		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitConnectionListResultPage.NextWithContext")
7394		defer func() {
7395			sc := -1
7396			if page.Response().Response.Response != nil {
7397				sc = page.Response().Response.Response.StatusCode
7398			}
7399			tracing.EndSpan(ctx, sc, err)
7400		}()
7401	}
7402	for {
7403		next, err := page.fn(ctx, page.ercclr)
7404		if err != nil {
7405			return err
7406		}
7407		page.ercclr = next
7408		if !next.hasNextLink() || !next.IsEmpty() {
7409			break
7410		}
7411	}
7412	return nil
7413}
7414
7415// Next advances to the next page of values.  If there was an error making
7416// the request the page does not advance and the error is returned.
7417// Deprecated: Use NextWithContext() instead.
7418func (page *ExpressRouteCircuitConnectionListResultPage) Next() error {
7419	return page.NextWithContext(context.Background())
7420}
7421
7422// NotDone returns true if the page enumeration should be started or is not yet complete.
7423func (page ExpressRouteCircuitConnectionListResultPage) NotDone() bool {
7424	return !page.ercclr.IsEmpty()
7425}
7426
7427// Response returns the raw server response from the last page request.
7428func (page ExpressRouteCircuitConnectionListResultPage) Response() ExpressRouteCircuitConnectionListResult {
7429	return page.ercclr
7430}
7431
7432// Values returns the slice of values for the current page or nil if there are no values.
7433func (page ExpressRouteCircuitConnectionListResultPage) Values() []ExpressRouteCircuitConnection {
7434	if page.ercclr.IsEmpty() {
7435		return nil
7436	}
7437	return *page.ercclr.Value
7438}
7439
7440// Creates a new instance of the ExpressRouteCircuitConnectionListResultPage type.
7441func NewExpressRouteCircuitConnectionListResultPage(cur ExpressRouteCircuitConnectionListResult, getNextPage func(context.Context, ExpressRouteCircuitConnectionListResult) (ExpressRouteCircuitConnectionListResult, error)) ExpressRouteCircuitConnectionListResultPage {
7442	return ExpressRouteCircuitConnectionListResultPage{
7443		fn:     getNextPage,
7444		ercclr: cur,
7445	}
7446}
7447
7448// ExpressRouteCircuitConnectionPropertiesFormat properties of the express route circuit connection.
7449type ExpressRouteCircuitConnectionPropertiesFormat struct {
7450	// ExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the circuit initiating connection.
7451	ExpressRouteCircuitPeering *SubResource `json:"expressRouteCircuitPeering,omitempty"`
7452	// PeerExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the peered circuit.
7453	PeerExpressRouteCircuitPeering *SubResource `json:"peerExpressRouteCircuitPeering,omitempty"`
7454	// AddressPrefix - /29 IP address space to carve out Customer addresses for tunnels.
7455	AddressPrefix *string `json:"addressPrefix,omitempty"`
7456	// AuthorizationKey - The authorization key.
7457	AuthorizationKey *string `json:"authorizationKey,omitempty"`
7458	// CircuitConnectionStatus - Express Route Circuit connection state. Possible values include: 'Connected', 'Connecting', 'Disconnected'
7459	CircuitConnectionStatus CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"`
7460	// ProvisioningState - READ-ONLY; Provisioning state of the circuit connection resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
7461	ProvisioningState *string `json:"provisioningState,omitempty"`
7462}
7463
7464// MarshalJSON is the custom marshaler for ExpressRouteCircuitConnectionPropertiesFormat.
7465func (erccpf ExpressRouteCircuitConnectionPropertiesFormat) MarshalJSON() ([]byte, error) {
7466	objectMap := make(map[string]interface{})
7467	if erccpf.ExpressRouteCircuitPeering != nil {
7468		objectMap["expressRouteCircuitPeering"] = erccpf.ExpressRouteCircuitPeering
7469	}
7470	if erccpf.PeerExpressRouteCircuitPeering != nil {
7471		objectMap["peerExpressRouteCircuitPeering"] = erccpf.PeerExpressRouteCircuitPeering
7472	}
7473	if erccpf.AddressPrefix != nil {
7474		objectMap["addressPrefix"] = erccpf.AddressPrefix
7475	}
7476	if erccpf.AuthorizationKey != nil {
7477		objectMap["authorizationKey"] = erccpf.AuthorizationKey
7478	}
7479	if erccpf.CircuitConnectionStatus != "" {
7480		objectMap["circuitConnectionStatus"] = erccpf.CircuitConnectionStatus
7481	}
7482	return json.Marshal(objectMap)
7483}
7484
7485// ExpressRouteCircuitConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
7486// results of a long-running operation.
7487type ExpressRouteCircuitConnectionsCreateOrUpdateFuture struct {
7488	azure.FutureAPI
7489	// Result returns the result of the asynchronous operation.
7490	// If the operation has not completed it will return an error.
7491	Result func(ExpressRouteCircuitConnectionsClient) (ExpressRouteCircuitConnection, error)
7492}
7493
7494// ExpressRouteCircuitConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a
7495// long-running operation.
7496type ExpressRouteCircuitConnectionsDeleteFuture struct {
7497	azure.FutureAPI
7498	// Result returns the result of the asynchronous operation.
7499	// If the operation has not completed it will return an error.
7500	Result func(ExpressRouteCircuitConnectionsClient) (autorest.Response, error)
7501}
7502
7503// ExpressRouteCircuitListResult response for ListExpressRouteCircuit API service call.
7504type ExpressRouteCircuitListResult struct {
7505	autorest.Response `json:"-"`
7506	// Value - A list of ExpressRouteCircuits in a resource group.
7507	Value *[]ExpressRouteCircuit `json:"value,omitempty"`
7508	// NextLink - The URL to get the next set of results.
7509	NextLink *string `json:"nextLink,omitempty"`
7510}
7511
7512// ExpressRouteCircuitListResultIterator provides access to a complete listing of ExpressRouteCircuit
7513// values.
7514type ExpressRouteCircuitListResultIterator struct {
7515	i    int
7516	page ExpressRouteCircuitListResultPage
7517}
7518
7519// NextWithContext advances to the next value.  If there was an error making
7520// the request the iterator does not advance and the error is returned.
7521func (iter *ExpressRouteCircuitListResultIterator) NextWithContext(ctx context.Context) (err error) {
7522	if tracing.IsEnabled() {
7523		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultIterator.NextWithContext")
7524		defer func() {
7525			sc := -1
7526			if iter.Response().Response.Response != nil {
7527				sc = iter.Response().Response.Response.StatusCode
7528			}
7529			tracing.EndSpan(ctx, sc, err)
7530		}()
7531	}
7532	iter.i++
7533	if iter.i < len(iter.page.Values()) {
7534		return nil
7535	}
7536	err = iter.page.NextWithContext(ctx)
7537	if err != nil {
7538		iter.i--
7539		return err
7540	}
7541	iter.i = 0
7542	return nil
7543}
7544
7545// Next advances to the next value.  If there was an error making
7546// the request the iterator does not advance and the error is returned.
7547// Deprecated: Use NextWithContext() instead.
7548func (iter *ExpressRouteCircuitListResultIterator) Next() error {
7549	return iter.NextWithContext(context.Background())
7550}
7551
7552// NotDone returns true if the enumeration should be started or is not yet complete.
7553func (iter ExpressRouteCircuitListResultIterator) NotDone() bool {
7554	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7555}
7556
7557// Response returns the raw server response from the last page request.
7558func (iter ExpressRouteCircuitListResultIterator) Response() ExpressRouteCircuitListResult {
7559	return iter.page.Response()
7560}
7561
7562// Value returns the current value or a zero-initialized value if the
7563// iterator has advanced beyond the end of the collection.
7564func (iter ExpressRouteCircuitListResultIterator) Value() ExpressRouteCircuit {
7565	if !iter.page.NotDone() {
7566		return ExpressRouteCircuit{}
7567	}
7568	return iter.page.Values()[iter.i]
7569}
7570
7571// Creates a new instance of the ExpressRouteCircuitListResultIterator type.
7572func NewExpressRouteCircuitListResultIterator(page ExpressRouteCircuitListResultPage) ExpressRouteCircuitListResultIterator {
7573	return ExpressRouteCircuitListResultIterator{page: page}
7574}
7575
7576// IsEmpty returns true if the ListResult contains no values.
7577func (erclr ExpressRouteCircuitListResult) IsEmpty() bool {
7578	return erclr.Value == nil || len(*erclr.Value) == 0
7579}
7580
7581// hasNextLink returns true if the NextLink is not empty.
7582func (erclr ExpressRouteCircuitListResult) hasNextLink() bool {
7583	return erclr.NextLink != nil && len(*erclr.NextLink) != 0
7584}
7585
7586// expressRouteCircuitListResultPreparer prepares a request to retrieve the next set of results.
7587// It returns nil if no more results exist.
7588func (erclr ExpressRouteCircuitListResult) expressRouteCircuitListResultPreparer(ctx context.Context) (*http.Request, error) {
7589	if !erclr.hasNextLink() {
7590		return nil, nil
7591	}
7592	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7593		autorest.AsJSON(),
7594		autorest.AsGet(),
7595		autorest.WithBaseURL(to.String(erclr.NextLink)))
7596}
7597
7598// ExpressRouteCircuitListResultPage contains a page of ExpressRouteCircuit values.
7599type ExpressRouteCircuitListResultPage struct {
7600	fn    func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)
7601	erclr ExpressRouteCircuitListResult
7602}
7603
7604// NextWithContext advances to the next page of values.  If there was an error making
7605// the request the page does not advance and the error is returned.
7606func (page *ExpressRouteCircuitListResultPage) NextWithContext(ctx context.Context) (err error) {
7607	if tracing.IsEnabled() {
7608		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultPage.NextWithContext")
7609		defer func() {
7610			sc := -1
7611			if page.Response().Response.Response != nil {
7612				sc = page.Response().Response.Response.StatusCode
7613			}
7614			tracing.EndSpan(ctx, sc, err)
7615		}()
7616	}
7617	for {
7618		next, err := page.fn(ctx, page.erclr)
7619		if err != nil {
7620			return err
7621		}
7622		page.erclr = next
7623		if !next.hasNextLink() || !next.IsEmpty() {
7624			break
7625		}
7626	}
7627	return nil
7628}
7629
7630// Next advances to the next page of values.  If there was an error making
7631// the request the page does not advance and the error is returned.
7632// Deprecated: Use NextWithContext() instead.
7633func (page *ExpressRouteCircuitListResultPage) Next() error {
7634	return page.NextWithContext(context.Background())
7635}
7636
7637// NotDone returns true if the page enumeration should be started or is not yet complete.
7638func (page ExpressRouteCircuitListResultPage) NotDone() bool {
7639	return !page.erclr.IsEmpty()
7640}
7641
7642// Response returns the raw server response from the last page request.
7643func (page ExpressRouteCircuitListResultPage) Response() ExpressRouteCircuitListResult {
7644	return page.erclr
7645}
7646
7647// Values returns the slice of values for the current page or nil if there are no values.
7648func (page ExpressRouteCircuitListResultPage) Values() []ExpressRouteCircuit {
7649	if page.erclr.IsEmpty() {
7650		return nil
7651	}
7652	return *page.erclr.Value
7653}
7654
7655// Creates a new instance of the ExpressRouteCircuitListResultPage type.
7656func NewExpressRouteCircuitListResultPage(cur ExpressRouteCircuitListResult, getNextPage func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)) ExpressRouteCircuitListResultPage {
7657	return ExpressRouteCircuitListResultPage{
7658		fn:    getNextPage,
7659		erclr: cur,
7660	}
7661}
7662
7663// ExpressRouteCircuitPeering peering in an ExpressRouteCircuit resource.
7664type ExpressRouteCircuitPeering struct {
7665	autorest.Response `json:"-"`
7666	// ExpressRouteCircuitPeeringPropertiesFormat - Properties of the express route circuit peering.
7667	*ExpressRouteCircuitPeeringPropertiesFormat `json:"properties,omitempty"`
7668	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
7669	Name *string `json:"name,omitempty"`
7670	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
7671	Etag *string `json:"etag,omitempty"`
7672	// ID - Resource ID.
7673	ID *string `json:"id,omitempty"`
7674}
7675
7676// MarshalJSON is the custom marshaler for ExpressRouteCircuitPeering.
7677func (ercp ExpressRouteCircuitPeering) MarshalJSON() ([]byte, error) {
7678	objectMap := make(map[string]interface{})
7679	if ercp.ExpressRouteCircuitPeeringPropertiesFormat != nil {
7680		objectMap["properties"] = ercp.ExpressRouteCircuitPeeringPropertiesFormat
7681	}
7682	if ercp.Name != nil {
7683		objectMap["name"] = ercp.Name
7684	}
7685	if ercp.ID != nil {
7686		objectMap["id"] = ercp.ID
7687	}
7688	return json.Marshal(objectMap)
7689}
7690
7691// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitPeering struct.
7692func (ercp *ExpressRouteCircuitPeering) UnmarshalJSON(body []byte) error {
7693	var m map[string]*json.RawMessage
7694	err := json.Unmarshal(body, &m)
7695	if err != nil {
7696		return err
7697	}
7698	for k, v := range m {
7699		switch k {
7700		case "properties":
7701			if v != nil {
7702				var expressRouteCircuitPeeringPropertiesFormat ExpressRouteCircuitPeeringPropertiesFormat
7703				err = json.Unmarshal(*v, &expressRouteCircuitPeeringPropertiesFormat)
7704				if err != nil {
7705					return err
7706				}
7707				ercp.ExpressRouteCircuitPeeringPropertiesFormat = &expressRouteCircuitPeeringPropertiesFormat
7708			}
7709		case "name":
7710			if v != nil {
7711				var name string
7712				err = json.Unmarshal(*v, &name)
7713				if err != nil {
7714					return err
7715				}
7716				ercp.Name = &name
7717			}
7718		case "etag":
7719			if v != nil {
7720				var etag string
7721				err = json.Unmarshal(*v, &etag)
7722				if err != nil {
7723					return err
7724				}
7725				ercp.Etag = &etag
7726			}
7727		case "id":
7728			if v != nil {
7729				var ID string
7730				err = json.Unmarshal(*v, &ID)
7731				if err != nil {
7732					return err
7733				}
7734				ercp.ID = &ID
7735			}
7736		}
7737	}
7738
7739	return nil
7740}
7741
7742// ExpressRouteCircuitPeeringConfig specifies the peering configuration.
7743type ExpressRouteCircuitPeeringConfig struct {
7744	// AdvertisedPublicPrefixes - The reference of AdvertisedPublicPrefixes.
7745	AdvertisedPublicPrefixes *[]string `json:"advertisedPublicPrefixes,omitempty"`
7746	// AdvertisedCommunities - The communities of bgp peering. Specified for microsoft peering
7747	AdvertisedCommunities *[]string `json:"advertisedCommunities,omitempty"`
7748	// AdvertisedPublicPrefixesState - AdvertisedPublicPrefixState of the Peering resource. Possible values are 'NotConfigured', 'Configuring', 'Configured', and 'ValidationNeeded'. Possible values include: 'NotConfigured', 'Configuring', 'Configured', 'ValidationNeeded'
7749	AdvertisedPublicPrefixesState ExpressRouteCircuitPeeringAdvertisedPublicPrefixState `json:"advertisedPublicPrefixesState,omitempty"`
7750	// LegacyMode - The legacy mode of the peering.
7751	LegacyMode *int32 `json:"legacyMode,omitempty"`
7752	// CustomerASN - The CustomerASN of the peering.
7753	CustomerASN *int32 `json:"customerASN,omitempty"`
7754	// RoutingRegistryName - The RoutingRegistryName of the configuration.
7755	RoutingRegistryName *string `json:"routingRegistryName,omitempty"`
7756}
7757
7758// ExpressRouteCircuitPeeringID expressRoute circuit peering identifier.
7759type ExpressRouteCircuitPeeringID struct {
7760	// ID - The ID of the ExpressRoute circuit peering.
7761	ID *string `json:"id,omitempty"`
7762}
7763
7764// ExpressRouteCircuitPeeringListResult response for ListPeering API service call retrieves all peerings
7765// that belong to an ExpressRouteCircuit.
7766type ExpressRouteCircuitPeeringListResult struct {
7767	autorest.Response `json:"-"`
7768	// Value - The peerings in an express route circuit.
7769	Value *[]ExpressRouteCircuitPeering `json:"value,omitempty"`
7770	// NextLink - The URL to get the next set of results.
7771	NextLink *string `json:"nextLink,omitempty"`
7772}
7773
7774// ExpressRouteCircuitPeeringListResultIterator provides access to a complete listing of
7775// ExpressRouteCircuitPeering values.
7776type ExpressRouteCircuitPeeringListResultIterator struct {
7777	i    int
7778	page ExpressRouteCircuitPeeringListResultPage
7779}
7780
7781// NextWithContext advances to the next value.  If there was an error making
7782// the request the iterator does not advance and the error is returned.
7783func (iter *ExpressRouteCircuitPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
7784	if tracing.IsEnabled() {
7785		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultIterator.NextWithContext")
7786		defer func() {
7787			sc := -1
7788			if iter.Response().Response.Response != nil {
7789				sc = iter.Response().Response.Response.StatusCode
7790			}
7791			tracing.EndSpan(ctx, sc, err)
7792		}()
7793	}
7794	iter.i++
7795	if iter.i < len(iter.page.Values()) {
7796		return nil
7797	}
7798	err = iter.page.NextWithContext(ctx)
7799	if err != nil {
7800		iter.i--
7801		return err
7802	}
7803	iter.i = 0
7804	return nil
7805}
7806
7807// Next advances to the next value.  If there was an error making
7808// the request the iterator does not advance and the error is returned.
7809// Deprecated: Use NextWithContext() instead.
7810func (iter *ExpressRouteCircuitPeeringListResultIterator) Next() error {
7811	return iter.NextWithContext(context.Background())
7812}
7813
7814// NotDone returns true if the enumeration should be started or is not yet complete.
7815func (iter ExpressRouteCircuitPeeringListResultIterator) NotDone() bool {
7816	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7817}
7818
7819// Response returns the raw server response from the last page request.
7820func (iter ExpressRouteCircuitPeeringListResultIterator) Response() ExpressRouteCircuitPeeringListResult {
7821	return iter.page.Response()
7822}
7823
7824// Value returns the current value or a zero-initialized value if the
7825// iterator has advanced beyond the end of the collection.
7826func (iter ExpressRouteCircuitPeeringListResultIterator) Value() ExpressRouteCircuitPeering {
7827	if !iter.page.NotDone() {
7828		return ExpressRouteCircuitPeering{}
7829	}
7830	return iter.page.Values()[iter.i]
7831}
7832
7833// Creates a new instance of the ExpressRouteCircuitPeeringListResultIterator type.
7834func NewExpressRouteCircuitPeeringListResultIterator(page ExpressRouteCircuitPeeringListResultPage) ExpressRouteCircuitPeeringListResultIterator {
7835	return ExpressRouteCircuitPeeringListResultIterator{page: page}
7836}
7837
7838// IsEmpty returns true if the ListResult contains no values.
7839func (ercplr ExpressRouteCircuitPeeringListResult) IsEmpty() bool {
7840	return ercplr.Value == nil || len(*ercplr.Value) == 0
7841}
7842
7843// hasNextLink returns true if the NextLink is not empty.
7844func (ercplr ExpressRouteCircuitPeeringListResult) hasNextLink() bool {
7845	return ercplr.NextLink != nil && len(*ercplr.NextLink) != 0
7846}
7847
7848// expressRouteCircuitPeeringListResultPreparer prepares a request to retrieve the next set of results.
7849// It returns nil if no more results exist.
7850func (ercplr ExpressRouteCircuitPeeringListResult) expressRouteCircuitPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
7851	if !ercplr.hasNextLink() {
7852		return nil, nil
7853	}
7854	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7855		autorest.AsJSON(),
7856		autorest.AsGet(),
7857		autorest.WithBaseURL(to.String(ercplr.NextLink)))
7858}
7859
7860// ExpressRouteCircuitPeeringListResultPage contains a page of ExpressRouteCircuitPeering values.
7861type ExpressRouteCircuitPeeringListResultPage struct {
7862	fn     func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)
7863	ercplr ExpressRouteCircuitPeeringListResult
7864}
7865
7866// NextWithContext advances to the next page of values.  If there was an error making
7867// the request the page does not advance and the error is returned.
7868func (page *ExpressRouteCircuitPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
7869	if tracing.IsEnabled() {
7870		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultPage.NextWithContext")
7871		defer func() {
7872			sc := -1
7873			if page.Response().Response.Response != nil {
7874				sc = page.Response().Response.Response.StatusCode
7875			}
7876			tracing.EndSpan(ctx, sc, err)
7877		}()
7878	}
7879	for {
7880		next, err := page.fn(ctx, page.ercplr)
7881		if err != nil {
7882			return err
7883		}
7884		page.ercplr = next
7885		if !next.hasNextLink() || !next.IsEmpty() {
7886			break
7887		}
7888	}
7889	return nil
7890}
7891
7892// Next advances to the next page of values.  If there was an error making
7893// the request the page does not advance and the error is returned.
7894// Deprecated: Use NextWithContext() instead.
7895func (page *ExpressRouteCircuitPeeringListResultPage) Next() error {
7896	return page.NextWithContext(context.Background())
7897}
7898
7899// NotDone returns true if the page enumeration should be started or is not yet complete.
7900func (page ExpressRouteCircuitPeeringListResultPage) NotDone() bool {
7901	return !page.ercplr.IsEmpty()
7902}
7903
7904// Response returns the raw server response from the last page request.
7905func (page ExpressRouteCircuitPeeringListResultPage) Response() ExpressRouteCircuitPeeringListResult {
7906	return page.ercplr
7907}
7908
7909// Values returns the slice of values for the current page or nil if there are no values.
7910func (page ExpressRouteCircuitPeeringListResultPage) Values() []ExpressRouteCircuitPeering {
7911	if page.ercplr.IsEmpty() {
7912		return nil
7913	}
7914	return *page.ercplr.Value
7915}
7916
7917// Creates a new instance of the ExpressRouteCircuitPeeringListResultPage type.
7918func NewExpressRouteCircuitPeeringListResultPage(cur ExpressRouteCircuitPeeringListResult, getNextPage func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)) ExpressRouteCircuitPeeringListResultPage {
7919	return ExpressRouteCircuitPeeringListResultPage{
7920		fn:     getNextPage,
7921		ercplr: cur,
7922	}
7923}
7924
7925// ExpressRouteCircuitPeeringPropertiesFormat properties of the express route circuit peering.
7926type ExpressRouteCircuitPeeringPropertiesFormat struct {
7927	// PeeringType - The peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'
7928	PeeringType ExpressRoutePeeringType `json:"peeringType,omitempty"`
7929	// State - The peering state. Possible values include: 'ExpressRoutePeeringStateDisabled', 'ExpressRoutePeeringStateEnabled'
7930	State ExpressRoutePeeringState `json:"state,omitempty"`
7931	// AzureASN - The Azure ASN.
7932	AzureASN *int32 `json:"azureASN,omitempty"`
7933	// PeerASN - The peer ASN.
7934	PeerASN *int64 `json:"peerASN,omitempty"`
7935	// PrimaryPeerAddressPrefix - The primary address prefix.
7936	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
7937	// SecondaryPeerAddressPrefix - The secondary address prefix.
7938	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
7939	// PrimaryAzurePort - The primary port.
7940	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
7941	// SecondaryAzurePort - The secondary port.
7942	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
7943	// SharedKey - The shared key.
7944	SharedKey *string `json:"sharedKey,omitempty"`
7945	// VlanID - The VLAN ID.
7946	VlanID *int32 `json:"vlanId,omitempty"`
7947	// MicrosoftPeeringConfig - The Microsoft peering configuration.
7948	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
7949	// Stats - Gets peering stats.
7950	Stats *ExpressRouteCircuitStats `json:"stats,omitempty"`
7951	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
7952	ProvisioningState *string `json:"provisioningState,omitempty"`
7953	// GatewayManagerEtag - The GatewayManager Etag.
7954	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
7955	// LastModifiedBy - Gets whether the provider or the customer last modified the peering.
7956	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
7957	// RouteFilter - The reference of the RouteFilter resource.
7958	RouteFilter *RouteFilter `json:"routeFilter,omitempty"`
7959	// Ipv6PeeringConfig - The IPv6 peering configuration.
7960	Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"`
7961	// ExpressRouteConnection - The ExpressRoute connection.
7962	ExpressRouteConnection *ExpressRouteConnectionID `json:"expressRouteConnection,omitempty"`
7963	// Connections - The list of circuit connections associated with Azure Private Peering for this circuit.
7964	Connections *[]ExpressRouteCircuitConnection `json:"connections,omitempty"`
7965	// PeeredConnections - READ-ONLY; The list of peered circuit connections associated with Azure Private Peering for this circuit.
7966	PeeredConnections *[]PeerExpressRouteCircuitConnection `json:"peeredConnections,omitempty"`
7967}
7968
7969// MarshalJSON is the custom marshaler for ExpressRouteCircuitPeeringPropertiesFormat.
7970func (ercppf ExpressRouteCircuitPeeringPropertiesFormat) MarshalJSON() ([]byte, error) {
7971	objectMap := make(map[string]interface{})
7972	if ercppf.PeeringType != "" {
7973		objectMap["peeringType"] = ercppf.PeeringType
7974	}
7975	if ercppf.State != "" {
7976		objectMap["state"] = ercppf.State
7977	}
7978	if ercppf.AzureASN != nil {
7979		objectMap["azureASN"] = ercppf.AzureASN
7980	}
7981	if ercppf.PeerASN != nil {
7982		objectMap["peerASN"] = ercppf.PeerASN
7983	}
7984	if ercppf.PrimaryPeerAddressPrefix != nil {
7985		objectMap["primaryPeerAddressPrefix"] = ercppf.PrimaryPeerAddressPrefix
7986	}
7987	if ercppf.SecondaryPeerAddressPrefix != nil {
7988		objectMap["secondaryPeerAddressPrefix"] = ercppf.SecondaryPeerAddressPrefix
7989	}
7990	if ercppf.PrimaryAzurePort != nil {
7991		objectMap["primaryAzurePort"] = ercppf.PrimaryAzurePort
7992	}
7993	if ercppf.SecondaryAzurePort != nil {
7994		objectMap["secondaryAzurePort"] = ercppf.SecondaryAzurePort
7995	}
7996	if ercppf.SharedKey != nil {
7997		objectMap["sharedKey"] = ercppf.SharedKey
7998	}
7999	if ercppf.VlanID != nil {
8000		objectMap["vlanId"] = ercppf.VlanID
8001	}
8002	if ercppf.MicrosoftPeeringConfig != nil {
8003		objectMap["microsoftPeeringConfig"] = ercppf.MicrosoftPeeringConfig
8004	}
8005	if ercppf.Stats != nil {
8006		objectMap["stats"] = ercppf.Stats
8007	}
8008	if ercppf.ProvisioningState != nil {
8009		objectMap["provisioningState"] = ercppf.ProvisioningState
8010	}
8011	if ercppf.GatewayManagerEtag != nil {
8012		objectMap["gatewayManagerEtag"] = ercppf.GatewayManagerEtag
8013	}
8014	if ercppf.LastModifiedBy != nil {
8015		objectMap["lastModifiedBy"] = ercppf.LastModifiedBy
8016	}
8017	if ercppf.RouteFilter != nil {
8018		objectMap["routeFilter"] = ercppf.RouteFilter
8019	}
8020	if ercppf.Ipv6PeeringConfig != nil {
8021		objectMap["ipv6PeeringConfig"] = ercppf.Ipv6PeeringConfig
8022	}
8023	if ercppf.ExpressRouteConnection != nil {
8024		objectMap["expressRouteConnection"] = ercppf.ExpressRouteConnection
8025	}
8026	if ercppf.Connections != nil {
8027		objectMap["connections"] = ercppf.Connections
8028	}
8029	return json.Marshal(objectMap)
8030}
8031
8032// ExpressRouteCircuitPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
8033// of a long-running operation.
8034type ExpressRouteCircuitPeeringsCreateOrUpdateFuture struct {
8035	azure.FutureAPI
8036	// Result returns the result of the asynchronous operation.
8037	// If the operation has not completed it will return an error.
8038	Result func(ExpressRouteCircuitPeeringsClient) (ExpressRouteCircuitPeering, error)
8039}
8040
8041// ExpressRouteCircuitPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
8042// long-running operation.
8043type ExpressRouteCircuitPeeringsDeleteFuture struct {
8044	azure.FutureAPI
8045	// Result returns the result of the asynchronous operation.
8046	// If the operation has not completed it will return an error.
8047	Result func(ExpressRouteCircuitPeeringsClient) (autorest.Response, error)
8048}
8049
8050// ExpressRouteCircuitPropertiesFormat properties of ExpressRouteCircuit.
8051type ExpressRouteCircuitPropertiesFormat struct {
8052	// AllowClassicOperations - Allow classic operations
8053	AllowClassicOperations *bool `json:"allowClassicOperations,omitempty"`
8054	// CircuitProvisioningState - The CircuitProvisioningState state of the resource.
8055	CircuitProvisioningState *string `json:"circuitProvisioningState,omitempty"`
8056	// ServiceProviderProvisioningState - The ServiceProviderProvisioningState state of the resource. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning'
8057	ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"`
8058	// Authorizations - The list of authorizations.
8059	Authorizations *[]ExpressRouteCircuitAuthorization `json:"authorizations,omitempty"`
8060	// Peerings - The list of peerings.
8061	Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"`
8062	// ServiceKey - The ServiceKey.
8063	ServiceKey *string `json:"serviceKey,omitempty"`
8064	// ServiceProviderNotes - The ServiceProviderNotes.
8065	ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"`
8066	// ServiceProviderProperties - The ServiceProviderProperties.
8067	ServiceProviderProperties *ExpressRouteCircuitServiceProviderProperties `json:"serviceProviderProperties,omitempty"`
8068	// ExpressRoutePort - The reference to the ExpressRoutePort resource when the circuit is provisioned on an ExpressRoutePort resource.
8069	ExpressRoutePort *SubResource `json:"expressRoutePort,omitempty"`
8070	// BandwidthInGbps - The bandwidth of the circuit when the circuit is provisioned on an ExpressRoutePort resource.
8071	BandwidthInGbps *float64 `json:"bandwidthInGbps,omitempty"`
8072	// Stag - READ-ONLY; The identifier of the circuit traffic. Outer tag for QinQ encapsulation.
8073	Stag *int32 `json:"stag,omitempty"`
8074	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
8075	ProvisioningState *string `json:"provisioningState,omitempty"`
8076	// GatewayManagerEtag - The GatewayManager Etag.
8077	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
8078	// GlobalReachEnabled - Flag denoting Global reach status.
8079	GlobalReachEnabled *bool `json:"globalReachEnabled,omitempty"`
8080}
8081
8082// MarshalJSON is the custom marshaler for ExpressRouteCircuitPropertiesFormat.
8083func (ercpf ExpressRouteCircuitPropertiesFormat) MarshalJSON() ([]byte, error) {
8084	objectMap := make(map[string]interface{})
8085	if ercpf.AllowClassicOperations != nil {
8086		objectMap["allowClassicOperations"] = ercpf.AllowClassicOperations
8087	}
8088	if ercpf.CircuitProvisioningState != nil {
8089		objectMap["circuitProvisioningState"] = ercpf.CircuitProvisioningState
8090	}
8091	if ercpf.ServiceProviderProvisioningState != "" {
8092		objectMap["serviceProviderProvisioningState"] = ercpf.ServiceProviderProvisioningState
8093	}
8094	if ercpf.Authorizations != nil {
8095		objectMap["authorizations"] = ercpf.Authorizations
8096	}
8097	if ercpf.Peerings != nil {
8098		objectMap["peerings"] = ercpf.Peerings
8099	}
8100	if ercpf.ServiceKey != nil {
8101		objectMap["serviceKey"] = ercpf.ServiceKey
8102	}
8103	if ercpf.ServiceProviderNotes != nil {
8104		objectMap["serviceProviderNotes"] = ercpf.ServiceProviderNotes
8105	}
8106	if ercpf.ServiceProviderProperties != nil {
8107		objectMap["serviceProviderProperties"] = ercpf.ServiceProviderProperties
8108	}
8109	if ercpf.ExpressRoutePort != nil {
8110		objectMap["expressRoutePort"] = ercpf.ExpressRoutePort
8111	}
8112	if ercpf.BandwidthInGbps != nil {
8113		objectMap["bandwidthInGbps"] = ercpf.BandwidthInGbps
8114	}
8115	if ercpf.ProvisioningState != nil {
8116		objectMap["provisioningState"] = ercpf.ProvisioningState
8117	}
8118	if ercpf.GatewayManagerEtag != nil {
8119		objectMap["gatewayManagerEtag"] = ercpf.GatewayManagerEtag
8120	}
8121	if ercpf.GlobalReachEnabled != nil {
8122		objectMap["globalReachEnabled"] = ercpf.GlobalReachEnabled
8123	}
8124	return json.Marshal(objectMap)
8125}
8126
8127// ExpressRouteCircuitReference reference to an express route circuit.
8128type ExpressRouteCircuitReference struct {
8129	// ID - Corresponding Express Route Circuit Id.
8130	ID *string `json:"id,omitempty"`
8131}
8132
8133// ExpressRouteCircuitRoutesTable the routes table associated with the ExpressRouteCircuit
8134type ExpressRouteCircuitRoutesTable struct {
8135	// NetworkProperty - IP address of a network entity
8136	NetworkProperty *string `json:"network,omitempty"`
8137	// NextHop - NextHop address
8138	NextHop *string `json:"nextHop,omitempty"`
8139	// LocPrf - Local preference value as set with the set local-preference route-map configuration command
8140	LocPrf *string `json:"locPrf,omitempty"`
8141	// Weight - Route Weight.
8142	Weight *int32 `json:"weight,omitempty"`
8143	// Path - Autonomous system paths to the destination network.
8144	Path *string `json:"path,omitempty"`
8145}
8146
8147// ExpressRouteCircuitRoutesTableSummary the routes table associated with the ExpressRouteCircuit.
8148type ExpressRouteCircuitRoutesTableSummary struct {
8149	// Neighbor - IP address of the neighbor.
8150	Neighbor *string `json:"neighbor,omitempty"`
8151	// V - BGP version number spoken to the neighbor.
8152	V *int32 `json:"v,omitempty"`
8153	// As - Autonomous system number.
8154	As *int32 `json:"as,omitempty"`
8155	// 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.
8156	UpDown *string `json:"upDown,omitempty"`
8157	// StatePfxRcd - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group.
8158	StatePfxRcd *string `json:"statePfxRcd,omitempty"`
8159}
8160
8161// ExpressRouteCircuitsArpTableListResult response for ListArpTable associated with the Express Route
8162// Circuits API.
8163type ExpressRouteCircuitsArpTableListResult struct {
8164	autorest.Response `json:"-"`
8165	// Value - Gets list of the ARP table.
8166	Value *[]ExpressRouteCircuitArpTable `json:"value,omitempty"`
8167	// NextLink - The URL to get the next set of results.
8168	NextLink *string `json:"nextLink,omitempty"`
8169}
8170
8171// ExpressRouteCircuitsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
8172// long-running operation.
8173type ExpressRouteCircuitsCreateOrUpdateFuture struct {
8174	azure.FutureAPI
8175	// Result returns the result of the asynchronous operation.
8176	// If the operation has not completed it will return an error.
8177	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuit, error)
8178}
8179
8180// ExpressRouteCircuitsDeleteFuture an abstraction for monitoring and retrieving the results of a
8181// long-running operation.
8182type ExpressRouteCircuitsDeleteFuture struct {
8183	azure.FutureAPI
8184	// Result returns the result of the asynchronous operation.
8185	// If the operation has not completed it will return an error.
8186	Result func(ExpressRouteCircuitsClient) (autorest.Response, error)
8187}
8188
8189// ExpressRouteCircuitServiceProviderProperties contains ServiceProviderProperties in an
8190// ExpressRouteCircuit.
8191type ExpressRouteCircuitServiceProviderProperties struct {
8192	// ServiceProviderName - The serviceProviderName.
8193	ServiceProviderName *string `json:"serviceProviderName,omitempty"`
8194	// PeeringLocation - The peering location.
8195	PeeringLocation *string `json:"peeringLocation,omitempty"`
8196	// BandwidthInMbps - The BandwidthInMbps.
8197	BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"`
8198}
8199
8200// ExpressRouteCircuitSku contains SKU in an ExpressRouteCircuit.
8201type ExpressRouteCircuitSku struct {
8202	// Name - The name of the SKU.
8203	Name *string `json:"name,omitempty"`
8204	// Tier - The tier of the SKU. Possible values are 'Standard', 'Premium' or 'Local'. Possible values include: 'ExpressRouteCircuitSkuTierStandard', 'ExpressRouteCircuitSkuTierPremium', 'ExpressRouteCircuitSkuTierBasic', 'ExpressRouteCircuitSkuTierLocal'
8205	Tier ExpressRouteCircuitSkuTier `json:"tier,omitempty"`
8206	// Family - The family of the SKU. Possible values are: 'UnlimitedData' and 'MeteredData'. Possible values include: 'UnlimitedData', 'MeteredData'
8207	Family ExpressRouteCircuitSkuFamily `json:"family,omitempty"`
8208}
8209
8210// ExpressRouteCircuitsListArpTableFuture an abstraction for monitoring and retrieving the results of a
8211// long-running operation.
8212type ExpressRouteCircuitsListArpTableFuture struct {
8213	azure.FutureAPI
8214	// Result returns the result of the asynchronous operation.
8215	// If the operation has not completed it will return an error.
8216	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsArpTableListResult, error)
8217}
8218
8219// ExpressRouteCircuitsListRoutesTableFuture an abstraction for monitoring and retrieving the results of a
8220// long-running operation.
8221type ExpressRouteCircuitsListRoutesTableFuture struct {
8222	azure.FutureAPI
8223	// Result returns the result of the asynchronous operation.
8224	// If the operation has not completed it will return an error.
8225	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsRoutesTableListResult, error)
8226}
8227
8228// ExpressRouteCircuitsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving the
8229// results of a long-running operation.
8230type ExpressRouteCircuitsListRoutesTableSummaryFuture struct {
8231	azure.FutureAPI
8232	// Result returns the result of the asynchronous operation.
8233	// If the operation has not completed it will return an error.
8234	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsRoutesTableSummaryListResult, error)
8235}
8236
8237// ExpressRouteCircuitsRoutesTableListResult response for ListRoutesTable associated with the Express Route
8238// Circuits API.
8239type ExpressRouteCircuitsRoutesTableListResult struct {
8240	autorest.Response `json:"-"`
8241	// Value - The list of routes table.
8242	Value *[]ExpressRouteCircuitRoutesTable `json:"value,omitempty"`
8243	// NextLink - The URL to get the next set of results.
8244	NextLink *string `json:"nextLink,omitempty"`
8245}
8246
8247// ExpressRouteCircuitsRoutesTableSummaryListResult response for ListRoutesTable associated with the
8248// Express Route Circuits API.
8249type ExpressRouteCircuitsRoutesTableSummaryListResult struct {
8250	autorest.Response `json:"-"`
8251	// Value - A list of the routes table.
8252	Value *[]ExpressRouteCircuitRoutesTableSummary `json:"value,omitempty"`
8253	// NextLink - The URL to get the next set of results.
8254	NextLink *string `json:"nextLink,omitempty"`
8255}
8256
8257// ExpressRouteCircuitStats contains stats associated with the peering.
8258type ExpressRouteCircuitStats struct {
8259	autorest.Response `json:"-"`
8260	// PrimarybytesIn - Gets BytesIn of the peering.
8261	PrimarybytesIn *int64 `json:"primarybytesIn,omitempty"`
8262	// PrimarybytesOut - Gets BytesOut of the peering.
8263	PrimarybytesOut *int64 `json:"primarybytesOut,omitempty"`
8264	// SecondarybytesIn - Gets BytesIn of the peering.
8265	SecondarybytesIn *int64 `json:"secondarybytesIn,omitempty"`
8266	// SecondarybytesOut - Gets BytesOut of the peering.
8267	SecondarybytesOut *int64 `json:"secondarybytesOut,omitempty"`
8268}
8269
8270// ExpressRouteCircuitsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
8271// long-running operation.
8272type ExpressRouteCircuitsUpdateTagsFuture struct {
8273	azure.FutureAPI
8274	// Result returns the result of the asynchronous operation.
8275	// If the operation has not completed it will return an error.
8276	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuit, error)
8277}
8278
8279// ExpressRouteConnection expressRouteConnection resource.
8280type ExpressRouteConnection struct {
8281	autorest.Response `json:"-"`
8282	// ExpressRouteConnectionProperties - Properties of the express route connection.
8283	*ExpressRouteConnectionProperties `json:"properties,omitempty"`
8284	// Name - The name of the resource.
8285	Name *string `json:"name,omitempty"`
8286	// ID - Resource ID.
8287	ID *string `json:"id,omitempty"`
8288}
8289
8290// MarshalJSON is the custom marshaler for ExpressRouteConnection.
8291func (erc ExpressRouteConnection) MarshalJSON() ([]byte, error) {
8292	objectMap := make(map[string]interface{})
8293	if erc.ExpressRouteConnectionProperties != nil {
8294		objectMap["properties"] = erc.ExpressRouteConnectionProperties
8295	}
8296	if erc.Name != nil {
8297		objectMap["name"] = erc.Name
8298	}
8299	if erc.ID != nil {
8300		objectMap["id"] = erc.ID
8301	}
8302	return json.Marshal(objectMap)
8303}
8304
8305// UnmarshalJSON is the custom unmarshaler for ExpressRouteConnection struct.
8306func (erc *ExpressRouteConnection) UnmarshalJSON(body []byte) error {
8307	var m map[string]*json.RawMessage
8308	err := json.Unmarshal(body, &m)
8309	if err != nil {
8310		return err
8311	}
8312	for k, v := range m {
8313		switch k {
8314		case "properties":
8315			if v != nil {
8316				var expressRouteConnectionProperties ExpressRouteConnectionProperties
8317				err = json.Unmarshal(*v, &expressRouteConnectionProperties)
8318				if err != nil {
8319					return err
8320				}
8321				erc.ExpressRouteConnectionProperties = &expressRouteConnectionProperties
8322			}
8323		case "name":
8324			if v != nil {
8325				var name string
8326				err = json.Unmarshal(*v, &name)
8327				if err != nil {
8328					return err
8329				}
8330				erc.Name = &name
8331			}
8332		case "id":
8333			if v != nil {
8334				var ID string
8335				err = json.Unmarshal(*v, &ID)
8336				if err != nil {
8337					return err
8338				}
8339				erc.ID = &ID
8340			}
8341		}
8342	}
8343
8344	return nil
8345}
8346
8347// ExpressRouteConnectionID the ID of the ExpressRouteConnection.
8348type ExpressRouteConnectionID struct {
8349	// ID - READ-ONLY; The ID of the ExpressRouteConnection.
8350	ID *string `json:"id,omitempty"`
8351}
8352
8353// ExpressRouteConnectionList expressRouteConnection list
8354type ExpressRouteConnectionList struct {
8355	autorest.Response `json:"-"`
8356	// Value - The list of ExpressRoute connections
8357	Value *[]ExpressRouteConnection `json:"value,omitempty"`
8358}
8359
8360// ExpressRouteConnectionProperties properties of the ExpressRouteConnection subresource.
8361type ExpressRouteConnectionProperties struct {
8362	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
8363	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
8364	// ExpressRouteCircuitPeering - The ExpressRoute circuit peering.
8365	ExpressRouteCircuitPeering *ExpressRouteCircuitPeeringID `json:"expressRouteCircuitPeering,omitempty"`
8366	// AuthorizationKey - Authorization key to establish the connection.
8367	AuthorizationKey *string `json:"authorizationKey,omitempty"`
8368	// RoutingWeight - The routing weight associated to the connection.
8369	RoutingWeight *int32 `json:"routingWeight,omitempty"`
8370}
8371
8372// ExpressRouteConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
8373// a long-running operation.
8374type ExpressRouteConnectionsCreateOrUpdateFuture struct {
8375	azure.FutureAPI
8376	// Result returns the result of the asynchronous operation.
8377	// If the operation has not completed it will return an error.
8378	Result func(ExpressRouteConnectionsClient) (ExpressRouteConnection, error)
8379}
8380
8381// ExpressRouteConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a
8382// long-running operation.
8383type ExpressRouteConnectionsDeleteFuture struct {
8384	azure.FutureAPI
8385	// Result returns the result of the asynchronous operation.
8386	// If the operation has not completed it will return an error.
8387	Result func(ExpressRouteConnectionsClient) (autorest.Response, error)
8388}
8389
8390// ExpressRouteCrossConnection expressRouteCrossConnection resource
8391type ExpressRouteCrossConnection struct {
8392	autorest.Response `json:"-"`
8393	// ExpressRouteCrossConnectionProperties - Properties of the express route cross connection.
8394	*ExpressRouteCrossConnectionProperties `json:"properties,omitempty"`
8395	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
8396	Etag *string `json:"etag,omitempty"`
8397	// ID - Resource ID.
8398	ID *string `json:"id,omitempty"`
8399	// Name - READ-ONLY; Resource name.
8400	Name *string `json:"name,omitempty"`
8401	// Type - READ-ONLY; Resource type.
8402	Type *string `json:"type,omitempty"`
8403	// Location - Resource location.
8404	Location *string `json:"location,omitempty"`
8405	// Tags - Resource tags.
8406	Tags map[string]*string `json:"tags"`
8407}
8408
8409// MarshalJSON is the custom marshaler for ExpressRouteCrossConnection.
8410func (ercc ExpressRouteCrossConnection) MarshalJSON() ([]byte, error) {
8411	objectMap := make(map[string]interface{})
8412	if ercc.ExpressRouteCrossConnectionProperties != nil {
8413		objectMap["properties"] = ercc.ExpressRouteCrossConnectionProperties
8414	}
8415	if ercc.ID != nil {
8416		objectMap["id"] = ercc.ID
8417	}
8418	if ercc.Location != nil {
8419		objectMap["location"] = ercc.Location
8420	}
8421	if ercc.Tags != nil {
8422		objectMap["tags"] = ercc.Tags
8423	}
8424	return json.Marshal(objectMap)
8425}
8426
8427// UnmarshalJSON is the custom unmarshaler for ExpressRouteCrossConnection struct.
8428func (ercc *ExpressRouteCrossConnection) UnmarshalJSON(body []byte) error {
8429	var m map[string]*json.RawMessage
8430	err := json.Unmarshal(body, &m)
8431	if err != nil {
8432		return err
8433	}
8434	for k, v := range m {
8435		switch k {
8436		case "properties":
8437			if v != nil {
8438				var expressRouteCrossConnectionProperties ExpressRouteCrossConnectionProperties
8439				err = json.Unmarshal(*v, &expressRouteCrossConnectionProperties)
8440				if err != nil {
8441					return err
8442				}
8443				ercc.ExpressRouteCrossConnectionProperties = &expressRouteCrossConnectionProperties
8444			}
8445		case "etag":
8446			if v != nil {
8447				var etag string
8448				err = json.Unmarshal(*v, &etag)
8449				if err != nil {
8450					return err
8451				}
8452				ercc.Etag = &etag
8453			}
8454		case "id":
8455			if v != nil {
8456				var ID string
8457				err = json.Unmarshal(*v, &ID)
8458				if err != nil {
8459					return err
8460				}
8461				ercc.ID = &ID
8462			}
8463		case "name":
8464			if v != nil {
8465				var name string
8466				err = json.Unmarshal(*v, &name)
8467				if err != nil {
8468					return err
8469				}
8470				ercc.Name = &name
8471			}
8472		case "type":
8473			if v != nil {
8474				var typeVar string
8475				err = json.Unmarshal(*v, &typeVar)
8476				if err != nil {
8477					return err
8478				}
8479				ercc.Type = &typeVar
8480			}
8481		case "location":
8482			if v != nil {
8483				var location string
8484				err = json.Unmarshal(*v, &location)
8485				if err != nil {
8486					return err
8487				}
8488				ercc.Location = &location
8489			}
8490		case "tags":
8491			if v != nil {
8492				var tags map[string]*string
8493				err = json.Unmarshal(*v, &tags)
8494				if err != nil {
8495					return err
8496				}
8497				ercc.Tags = tags
8498			}
8499		}
8500	}
8501
8502	return nil
8503}
8504
8505// ExpressRouteCrossConnectionListResult response for ListExpressRouteCrossConnection API service call.
8506type ExpressRouteCrossConnectionListResult struct {
8507	autorest.Response `json:"-"`
8508	// Value - A list of ExpressRouteCrossConnection resources.
8509	Value *[]ExpressRouteCrossConnection `json:"value,omitempty"`
8510	// NextLink - READ-ONLY; The URL to get the next set of results.
8511	NextLink *string `json:"nextLink,omitempty"`
8512}
8513
8514// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionListResult.
8515func (ercclr ExpressRouteCrossConnectionListResult) MarshalJSON() ([]byte, error) {
8516	objectMap := make(map[string]interface{})
8517	if ercclr.Value != nil {
8518		objectMap["value"] = ercclr.Value
8519	}
8520	return json.Marshal(objectMap)
8521}
8522
8523// ExpressRouteCrossConnectionListResultIterator provides access to a complete listing of
8524// ExpressRouteCrossConnection values.
8525type ExpressRouteCrossConnectionListResultIterator struct {
8526	i    int
8527	page ExpressRouteCrossConnectionListResultPage
8528}
8529
8530// NextWithContext advances to the next value.  If there was an error making
8531// the request the iterator does not advance and the error is returned.
8532func (iter *ExpressRouteCrossConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
8533	if tracing.IsEnabled() {
8534		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionListResultIterator.NextWithContext")
8535		defer func() {
8536			sc := -1
8537			if iter.Response().Response.Response != nil {
8538				sc = iter.Response().Response.Response.StatusCode
8539			}
8540			tracing.EndSpan(ctx, sc, err)
8541		}()
8542	}
8543	iter.i++
8544	if iter.i < len(iter.page.Values()) {
8545		return nil
8546	}
8547	err = iter.page.NextWithContext(ctx)
8548	if err != nil {
8549		iter.i--
8550		return err
8551	}
8552	iter.i = 0
8553	return nil
8554}
8555
8556// Next advances to the next value.  If there was an error making
8557// the request the iterator does not advance and the error is returned.
8558// Deprecated: Use NextWithContext() instead.
8559func (iter *ExpressRouteCrossConnectionListResultIterator) Next() error {
8560	return iter.NextWithContext(context.Background())
8561}
8562
8563// NotDone returns true if the enumeration should be started or is not yet complete.
8564func (iter ExpressRouteCrossConnectionListResultIterator) NotDone() bool {
8565	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8566}
8567
8568// Response returns the raw server response from the last page request.
8569func (iter ExpressRouteCrossConnectionListResultIterator) Response() ExpressRouteCrossConnectionListResult {
8570	return iter.page.Response()
8571}
8572
8573// Value returns the current value or a zero-initialized value if the
8574// iterator has advanced beyond the end of the collection.
8575func (iter ExpressRouteCrossConnectionListResultIterator) Value() ExpressRouteCrossConnection {
8576	if !iter.page.NotDone() {
8577		return ExpressRouteCrossConnection{}
8578	}
8579	return iter.page.Values()[iter.i]
8580}
8581
8582// Creates a new instance of the ExpressRouteCrossConnectionListResultIterator type.
8583func NewExpressRouteCrossConnectionListResultIterator(page ExpressRouteCrossConnectionListResultPage) ExpressRouteCrossConnectionListResultIterator {
8584	return ExpressRouteCrossConnectionListResultIterator{page: page}
8585}
8586
8587// IsEmpty returns true if the ListResult contains no values.
8588func (ercclr ExpressRouteCrossConnectionListResult) IsEmpty() bool {
8589	return ercclr.Value == nil || len(*ercclr.Value) == 0
8590}
8591
8592// hasNextLink returns true if the NextLink is not empty.
8593func (ercclr ExpressRouteCrossConnectionListResult) hasNextLink() bool {
8594	return ercclr.NextLink != nil && len(*ercclr.NextLink) != 0
8595}
8596
8597// expressRouteCrossConnectionListResultPreparer prepares a request to retrieve the next set of results.
8598// It returns nil if no more results exist.
8599func (ercclr ExpressRouteCrossConnectionListResult) expressRouteCrossConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
8600	if !ercclr.hasNextLink() {
8601		return nil, nil
8602	}
8603	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8604		autorest.AsJSON(),
8605		autorest.AsGet(),
8606		autorest.WithBaseURL(to.String(ercclr.NextLink)))
8607}
8608
8609// ExpressRouteCrossConnectionListResultPage contains a page of ExpressRouteCrossConnection values.
8610type ExpressRouteCrossConnectionListResultPage struct {
8611	fn     func(context.Context, ExpressRouteCrossConnectionListResult) (ExpressRouteCrossConnectionListResult, error)
8612	ercclr ExpressRouteCrossConnectionListResult
8613}
8614
8615// NextWithContext advances to the next page of values.  If there was an error making
8616// the request the page does not advance and the error is returned.
8617func (page *ExpressRouteCrossConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
8618	if tracing.IsEnabled() {
8619		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionListResultPage.NextWithContext")
8620		defer func() {
8621			sc := -1
8622			if page.Response().Response.Response != nil {
8623				sc = page.Response().Response.Response.StatusCode
8624			}
8625			tracing.EndSpan(ctx, sc, err)
8626		}()
8627	}
8628	for {
8629		next, err := page.fn(ctx, page.ercclr)
8630		if err != nil {
8631			return err
8632		}
8633		page.ercclr = next
8634		if !next.hasNextLink() || !next.IsEmpty() {
8635			break
8636		}
8637	}
8638	return nil
8639}
8640
8641// Next advances to the next page of values.  If there was an error making
8642// the request the page does not advance and the error is returned.
8643// Deprecated: Use NextWithContext() instead.
8644func (page *ExpressRouteCrossConnectionListResultPage) Next() error {
8645	return page.NextWithContext(context.Background())
8646}
8647
8648// NotDone returns true if the page enumeration should be started or is not yet complete.
8649func (page ExpressRouteCrossConnectionListResultPage) NotDone() bool {
8650	return !page.ercclr.IsEmpty()
8651}
8652
8653// Response returns the raw server response from the last page request.
8654func (page ExpressRouteCrossConnectionListResultPage) Response() ExpressRouteCrossConnectionListResult {
8655	return page.ercclr
8656}
8657
8658// Values returns the slice of values for the current page or nil if there are no values.
8659func (page ExpressRouteCrossConnectionListResultPage) Values() []ExpressRouteCrossConnection {
8660	if page.ercclr.IsEmpty() {
8661		return nil
8662	}
8663	return *page.ercclr.Value
8664}
8665
8666// Creates a new instance of the ExpressRouteCrossConnectionListResultPage type.
8667func NewExpressRouteCrossConnectionListResultPage(cur ExpressRouteCrossConnectionListResult, getNextPage func(context.Context, ExpressRouteCrossConnectionListResult) (ExpressRouteCrossConnectionListResult, error)) ExpressRouteCrossConnectionListResultPage {
8668	return ExpressRouteCrossConnectionListResultPage{
8669		fn:     getNextPage,
8670		ercclr: cur,
8671	}
8672}
8673
8674// ExpressRouteCrossConnectionPeering peering in an ExpressRoute Cross Connection resource.
8675type ExpressRouteCrossConnectionPeering struct {
8676	autorest.Response `json:"-"`
8677	// ExpressRouteCrossConnectionPeeringProperties - Properties of the express route cross connection peering.
8678	*ExpressRouteCrossConnectionPeeringProperties `json:"properties,omitempty"`
8679	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
8680	Name *string `json:"name,omitempty"`
8681	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
8682	Etag *string `json:"etag,omitempty"`
8683	// ID - Resource ID.
8684	ID *string `json:"id,omitempty"`
8685}
8686
8687// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeering.
8688func (erccp ExpressRouteCrossConnectionPeering) MarshalJSON() ([]byte, error) {
8689	objectMap := make(map[string]interface{})
8690	if erccp.ExpressRouteCrossConnectionPeeringProperties != nil {
8691		objectMap["properties"] = erccp.ExpressRouteCrossConnectionPeeringProperties
8692	}
8693	if erccp.Name != nil {
8694		objectMap["name"] = erccp.Name
8695	}
8696	if erccp.ID != nil {
8697		objectMap["id"] = erccp.ID
8698	}
8699	return json.Marshal(objectMap)
8700}
8701
8702// UnmarshalJSON is the custom unmarshaler for ExpressRouteCrossConnectionPeering struct.
8703func (erccp *ExpressRouteCrossConnectionPeering) UnmarshalJSON(body []byte) error {
8704	var m map[string]*json.RawMessage
8705	err := json.Unmarshal(body, &m)
8706	if err != nil {
8707		return err
8708	}
8709	for k, v := range m {
8710		switch k {
8711		case "properties":
8712			if v != nil {
8713				var expressRouteCrossConnectionPeeringProperties ExpressRouteCrossConnectionPeeringProperties
8714				err = json.Unmarshal(*v, &expressRouteCrossConnectionPeeringProperties)
8715				if err != nil {
8716					return err
8717				}
8718				erccp.ExpressRouteCrossConnectionPeeringProperties = &expressRouteCrossConnectionPeeringProperties
8719			}
8720		case "name":
8721			if v != nil {
8722				var name string
8723				err = json.Unmarshal(*v, &name)
8724				if err != nil {
8725					return err
8726				}
8727				erccp.Name = &name
8728			}
8729		case "etag":
8730			if v != nil {
8731				var etag string
8732				err = json.Unmarshal(*v, &etag)
8733				if err != nil {
8734					return err
8735				}
8736				erccp.Etag = &etag
8737			}
8738		case "id":
8739			if v != nil {
8740				var ID string
8741				err = json.Unmarshal(*v, &ID)
8742				if err != nil {
8743					return err
8744				}
8745				erccp.ID = &ID
8746			}
8747		}
8748	}
8749
8750	return nil
8751}
8752
8753// ExpressRouteCrossConnectionPeeringList response for ListPeering API service call retrieves all peerings
8754// that belong to an ExpressRouteCrossConnection.
8755type ExpressRouteCrossConnectionPeeringList struct {
8756	autorest.Response `json:"-"`
8757	// Value - The peerings in an express route cross connection.
8758	Value *[]ExpressRouteCrossConnectionPeering `json:"value,omitempty"`
8759	// NextLink - READ-ONLY; The URL to get the next set of results.
8760	NextLink *string `json:"nextLink,omitempty"`
8761}
8762
8763// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeeringList.
8764func (erccpl ExpressRouteCrossConnectionPeeringList) MarshalJSON() ([]byte, error) {
8765	objectMap := make(map[string]interface{})
8766	if erccpl.Value != nil {
8767		objectMap["value"] = erccpl.Value
8768	}
8769	return json.Marshal(objectMap)
8770}
8771
8772// ExpressRouteCrossConnectionPeeringListIterator provides access to a complete listing of
8773// ExpressRouteCrossConnectionPeering values.
8774type ExpressRouteCrossConnectionPeeringListIterator struct {
8775	i    int
8776	page ExpressRouteCrossConnectionPeeringListPage
8777}
8778
8779// NextWithContext advances to the next value.  If there was an error making
8780// the request the iterator does not advance and the error is returned.
8781func (iter *ExpressRouteCrossConnectionPeeringListIterator) NextWithContext(ctx context.Context) (err error) {
8782	if tracing.IsEnabled() {
8783		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringListIterator.NextWithContext")
8784		defer func() {
8785			sc := -1
8786			if iter.Response().Response.Response != nil {
8787				sc = iter.Response().Response.Response.StatusCode
8788			}
8789			tracing.EndSpan(ctx, sc, err)
8790		}()
8791	}
8792	iter.i++
8793	if iter.i < len(iter.page.Values()) {
8794		return nil
8795	}
8796	err = iter.page.NextWithContext(ctx)
8797	if err != nil {
8798		iter.i--
8799		return err
8800	}
8801	iter.i = 0
8802	return nil
8803}
8804
8805// Next advances to the next value.  If there was an error making
8806// the request the iterator does not advance and the error is returned.
8807// Deprecated: Use NextWithContext() instead.
8808func (iter *ExpressRouteCrossConnectionPeeringListIterator) Next() error {
8809	return iter.NextWithContext(context.Background())
8810}
8811
8812// NotDone returns true if the enumeration should be started or is not yet complete.
8813func (iter ExpressRouteCrossConnectionPeeringListIterator) NotDone() bool {
8814	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8815}
8816
8817// Response returns the raw server response from the last page request.
8818func (iter ExpressRouteCrossConnectionPeeringListIterator) Response() ExpressRouteCrossConnectionPeeringList {
8819	return iter.page.Response()
8820}
8821
8822// Value returns the current value or a zero-initialized value if the
8823// iterator has advanced beyond the end of the collection.
8824func (iter ExpressRouteCrossConnectionPeeringListIterator) Value() ExpressRouteCrossConnectionPeering {
8825	if !iter.page.NotDone() {
8826		return ExpressRouteCrossConnectionPeering{}
8827	}
8828	return iter.page.Values()[iter.i]
8829}
8830
8831// Creates a new instance of the ExpressRouteCrossConnectionPeeringListIterator type.
8832func NewExpressRouteCrossConnectionPeeringListIterator(page ExpressRouteCrossConnectionPeeringListPage) ExpressRouteCrossConnectionPeeringListIterator {
8833	return ExpressRouteCrossConnectionPeeringListIterator{page: page}
8834}
8835
8836// IsEmpty returns true if the ListResult contains no values.
8837func (erccpl ExpressRouteCrossConnectionPeeringList) IsEmpty() bool {
8838	return erccpl.Value == nil || len(*erccpl.Value) == 0
8839}
8840
8841// hasNextLink returns true if the NextLink is not empty.
8842func (erccpl ExpressRouteCrossConnectionPeeringList) hasNextLink() bool {
8843	return erccpl.NextLink != nil && len(*erccpl.NextLink) != 0
8844}
8845
8846// expressRouteCrossConnectionPeeringListPreparer prepares a request to retrieve the next set of results.
8847// It returns nil if no more results exist.
8848func (erccpl ExpressRouteCrossConnectionPeeringList) expressRouteCrossConnectionPeeringListPreparer(ctx context.Context) (*http.Request, error) {
8849	if !erccpl.hasNextLink() {
8850		return nil, nil
8851	}
8852	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8853		autorest.AsJSON(),
8854		autorest.AsGet(),
8855		autorest.WithBaseURL(to.String(erccpl.NextLink)))
8856}
8857
8858// ExpressRouteCrossConnectionPeeringListPage contains a page of ExpressRouteCrossConnectionPeering values.
8859type ExpressRouteCrossConnectionPeeringListPage struct {
8860	fn     func(context.Context, ExpressRouteCrossConnectionPeeringList) (ExpressRouteCrossConnectionPeeringList, error)
8861	erccpl ExpressRouteCrossConnectionPeeringList
8862}
8863
8864// NextWithContext advances to the next page of values.  If there was an error making
8865// the request the page does not advance and the error is returned.
8866func (page *ExpressRouteCrossConnectionPeeringListPage) NextWithContext(ctx context.Context) (err error) {
8867	if tracing.IsEnabled() {
8868		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringListPage.NextWithContext")
8869		defer func() {
8870			sc := -1
8871			if page.Response().Response.Response != nil {
8872				sc = page.Response().Response.Response.StatusCode
8873			}
8874			tracing.EndSpan(ctx, sc, err)
8875		}()
8876	}
8877	for {
8878		next, err := page.fn(ctx, page.erccpl)
8879		if err != nil {
8880			return err
8881		}
8882		page.erccpl = next
8883		if !next.hasNextLink() || !next.IsEmpty() {
8884			break
8885		}
8886	}
8887	return nil
8888}
8889
8890// Next advances to the next page of values.  If there was an error making
8891// the request the page does not advance and the error is returned.
8892// Deprecated: Use NextWithContext() instead.
8893func (page *ExpressRouteCrossConnectionPeeringListPage) Next() error {
8894	return page.NextWithContext(context.Background())
8895}
8896
8897// NotDone returns true if the page enumeration should be started or is not yet complete.
8898func (page ExpressRouteCrossConnectionPeeringListPage) NotDone() bool {
8899	return !page.erccpl.IsEmpty()
8900}
8901
8902// Response returns the raw server response from the last page request.
8903func (page ExpressRouteCrossConnectionPeeringListPage) Response() ExpressRouteCrossConnectionPeeringList {
8904	return page.erccpl
8905}
8906
8907// Values returns the slice of values for the current page or nil if there are no values.
8908func (page ExpressRouteCrossConnectionPeeringListPage) Values() []ExpressRouteCrossConnectionPeering {
8909	if page.erccpl.IsEmpty() {
8910		return nil
8911	}
8912	return *page.erccpl.Value
8913}
8914
8915// Creates a new instance of the ExpressRouteCrossConnectionPeeringListPage type.
8916func NewExpressRouteCrossConnectionPeeringListPage(cur ExpressRouteCrossConnectionPeeringList, getNextPage func(context.Context, ExpressRouteCrossConnectionPeeringList) (ExpressRouteCrossConnectionPeeringList, error)) ExpressRouteCrossConnectionPeeringListPage {
8917	return ExpressRouteCrossConnectionPeeringListPage{
8918		fn:     getNextPage,
8919		erccpl: cur,
8920	}
8921}
8922
8923// ExpressRouteCrossConnectionPeeringProperties properties of express route cross connection peering.
8924type ExpressRouteCrossConnectionPeeringProperties struct {
8925	// PeeringType - The peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'
8926	PeeringType ExpressRoutePeeringType `json:"peeringType,omitempty"`
8927	// State - The peering state. Possible values include: 'ExpressRoutePeeringStateDisabled', 'ExpressRoutePeeringStateEnabled'
8928	State ExpressRoutePeeringState `json:"state,omitempty"`
8929	// AzureASN - READ-ONLY; The Azure ASN.
8930	AzureASN *int32 `json:"azureASN,omitempty"`
8931	// PeerASN - The peer ASN.
8932	PeerASN *int64 `json:"peerASN,omitempty"`
8933	// PrimaryPeerAddressPrefix - The primary address prefix.
8934	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
8935	// SecondaryPeerAddressPrefix - The secondary address prefix.
8936	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
8937	// PrimaryAzurePort - READ-ONLY; The primary port.
8938	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
8939	// SecondaryAzurePort - READ-ONLY; The secondary port.
8940	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
8941	// SharedKey - The shared key.
8942	SharedKey *string `json:"sharedKey,omitempty"`
8943	// VlanID - The VLAN ID.
8944	VlanID *int32 `json:"vlanId,omitempty"`
8945	// MicrosoftPeeringConfig - The Microsoft peering configuration.
8946	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
8947	// ProvisioningState - READ-ONLY; Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
8948	ProvisioningState *string `json:"provisioningState,omitempty"`
8949	// GatewayManagerEtag - The GatewayManager Etag.
8950	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
8951	// LastModifiedBy - Gets whether the provider or the customer last modified the peering.
8952	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
8953	// Ipv6PeeringConfig - The IPv6 peering configuration.
8954	Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"`
8955}
8956
8957// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeeringProperties.
8958func (erccpp ExpressRouteCrossConnectionPeeringProperties) MarshalJSON() ([]byte, error) {
8959	objectMap := make(map[string]interface{})
8960	if erccpp.PeeringType != "" {
8961		objectMap["peeringType"] = erccpp.PeeringType
8962	}
8963	if erccpp.State != "" {
8964		objectMap["state"] = erccpp.State
8965	}
8966	if erccpp.PeerASN != nil {
8967		objectMap["peerASN"] = erccpp.PeerASN
8968	}
8969	if erccpp.PrimaryPeerAddressPrefix != nil {
8970		objectMap["primaryPeerAddressPrefix"] = erccpp.PrimaryPeerAddressPrefix
8971	}
8972	if erccpp.SecondaryPeerAddressPrefix != nil {
8973		objectMap["secondaryPeerAddressPrefix"] = erccpp.SecondaryPeerAddressPrefix
8974	}
8975	if erccpp.SharedKey != nil {
8976		objectMap["sharedKey"] = erccpp.SharedKey
8977	}
8978	if erccpp.VlanID != nil {
8979		objectMap["vlanId"] = erccpp.VlanID
8980	}
8981	if erccpp.MicrosoftPeeringConfig != nil {
8982		objectMap["microsoftPeeringConfig"] = erccpp.MicrosoftPeeringConfig
8983	}
8984	if erccpp.GatewayManagerEtag != nil {
8985		objectMap["gatewayManagerEtag"] = erccpp.GatewayManagerEtag
8986	}
8987	if erccpp.LastModifiedBy != nil {
8988		objectMap["lastModifiedBy"] = erccpp.LastModifiedBy
8989	}
8990	if erccpp.Ipv6PeeringConfig != nil {
8991		objectMap["ipv6PeeringConfig"] = erccpp.Ipv6PeeringConfig
8992	}
8993	return json.Marshal(objectMap)
8994}
8995
8996// ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
8997// results of a long-running operation.
8998type ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture struct {
8999	azure.FutureAPI
9000	// Result returns the result of the asynchronous operation.
9001	// If the operation has not completed it will return an error.
9002	Result func(ExpressRouteCrossConnectionPeeringsClient) (ExpressRouteCrossConnectionPeering, error)
9003}
9004
9005// ExpressRouteCrossConnectionPeeringsDeleteFuture an abstraction for monitoring and retrieving the results
9006// of a long-running operation.
9007type ExpressRouteCrossConnectionPeeringsDeleteFuture struct {
9008	azure.FutureAPI
9009	// Result returns the result of the asynchronous operation.
9010	// If the operation has not completed it will return an error.
9011	Result func(ExpressRouteCrossConnectionPeeringsClient) (autorest.Response, error)
9012}
9013
9014// ExpressRouteCrossConnectionProperties properties of ExpressRouteCrossConnection.
9015type ExpressRouteCrossConnectionProperties struct {
9016	// PrimaryAzurePort - READ-ONLY; The name of the primary  port.
9017	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
9018	// SecondaryAzurePort - READ-ONLY; The name of the secondary  port.
9019	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
9020	// STag - READ-ONLY; The identifier of the circuit traffic.
9021	STag *int32 `json:"sTag,omitempty"`
9022	// PeeringLocation - The peering location of the ExpressRoute circuit.
9023	PeeringLocation *string `json:"peeringLocation,omitempty"`
9024	// BandwidthInMbps - The circuit bandwidth In Mbps.
9025	BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"`
9026	// ExpressRouteCircuit - The ExpressRouteCircuit
9027	ExpressRouteCircuit *ExpressRouteCircuitReference `json:"expressRouteCircuit,omitempty"`
9028	// ServiceProviderProvisioningState - The provisioning state of the circuit in the connectivity provider system. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning'
9029	ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"`
9030	// ServiceProviderNotes - Additional read only notes set by the connectivity provider.
9031	ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"`
9032	// ProvisioningState - READ-ONLY; Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
9033	ProvisioningState *string `json:"provisioningState,omitempty"`
9034	// Peerings - The list of peerings.
9035	Peerings *[]ExpressRouteCrossConnectionPeering `json:"peerings,omitempty"`
9036}
9037
9038// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionProperties.
9039func (erccp ExpressRouteCrossConnectionProperties) MarshalJSON() ([]byte, error) {
9040	objectMap := make(map[string]interface{})
9041	if erccp.PeeringLocation != nil {
9042		objectMap["peeringLocation"] = erccp.PeeringLocation
9043	}
9044	if erccp.BandwidthInMbps != nil {
9045		objectMap["bandwidthInMbps"] = erccp.BandwidthInMbps
9046	}
9047	if erccp.ExpressRouteCircuit != nil {
9048		objectMap["expressRouteCircuit"] = erccp.ExpressRouteCircuit
9049	}
9050	if erccp.ServiceProviderProvisioningState != "" {
9051		objectMap["serviceProviderProvisioningState"] = erccp.ServiceProviderProvisioningState
9052	}
9053	if erccp.ServiceProviderNotes != nil {
9054		objectMap["serviceProviderNotes"] = erccp.ServiceProviderNotes
9055	}
9056	if erccp.Peerings != nil {
9057		objectMap["peerings"] = erccp.Peerings
9058	}
9059	return json.Marshal(objectMap)
9060}
9061
9062// ExpressRouteCrossConnectionRoutesTableSummary the routes table associated with the ExpressRouteCircuit.
9063type ExpressRouteCrossConnectionRoutesTableSummary struct {
9064	// Neighbor - IP address of Neighbor router
9065	Neighbor *string `json:"neighbor,omitempty"`
9066	// Asn - Autonomous system number.
9067	Asn *int32 `json:"asn,omitempty"`
9068	// 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.
9069	UpDown *string `json:"upDown,omitempty"`
9070	// StateOrPrefixesReceived - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group.
9071	StateOrPrefixesReceived *string `json:"stateOrPrefixesReceived,omitempty"`
9072}
9073
9074// ExpressRouteCrossConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
9075// results of a long-running operation.
9076type ExpressRouteCrossConnectionsCreateOrUpdateFuture struct {
9077	azure.FutureAPI
9078	// Result returns the result of the asynchronous operation.
9079	// If the operation has not completed it will return an error.
9080	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCrossConnection, error)
9081}
9082
9083// ExpressRouteCrossConnectionsListArpTableFuture an abstraction for monitoring and retrieving the results
9084// of a long-running operation.
9085type ExpressRouteCrossConnectionsListArpTableFuture struct {
9086	azure.FutureAPI
9087	// Result returns the result of the asynchronous operation.
9088	// If the operation has not completed it will return an error.
9089	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCircuitsArpTableListResult, error)
9090}
9091
9092// ExpressRouteCrossConnectionsListRoutesTableFuture an abstraction for monitoring and retrieving the
9093// results of a long-running operation.
9094type ExpressRouteCrossConnectionsListRoutesTableFuture struct {
9095	azure.FutureAPI
9096	// Result returns the result of the asynchronous operation.
9097	// If the operation has not completed it will return an error.
9098	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCircuitsRoutesTableListResult, error)
9099}
9100
9101// ExpressRouteCrossConnectionsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving
9102// the results of a long-running operation.
9103type ExpressRouteCrossConnectionsListRoutesTableSummaryFuture struct {
9104	azure.FutureAPI
9105	// Result returns the result of the asynchronous operation.
9106	// If the operation has not completed it will return an error.
9107	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCrossConnectionsRoutesTableSummaryListResult, error)
9108}
9109
9110// ExpressRouteCrossConnectionsRoutesTableSummaryListResult response for ListRoutesTable associated with
9111// the Express Route Cross Connections.
9112type ExpressRouteCrossConnectionsRoutesTableSummaryListResult struct {
9113	autorest.Response `json:"-"`
9114	// Value - A list of the routes table.
9115	Value *[]ExpressRouteCrossConnectionRoutesTableSummary `json:"value,omitempty"`
9116	// NextLink - READ-ONLY; The URL to get the next set of results.
9117	NextLink *string `json:"nextLink,omitempty"`
9118}
9119
9120// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionsRoutesTableSummaryListResult.
9121func (erccrtslr ExpressRouteCrossConnectionsRoutesTableSummaryListResult) MarshalJSON() ([]byte, error) {
9122	objectMap := make(map[string]interface{})
9123	if erccrtslr.Value != nil {
9124		objectMap["value"] = erccrtslr.Value
9125	}
9126	return json.Marshal(objectMap)
9127}
9128
9129// ExpressRouteCrossConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the results of
9130// a long-running operation.
9131type ExpressRouteCrossConnectionsUpdateTagsFuture struct {
9132	azure.FutureAPI
9133	// Result returns the result of the asynchronous operation.
9134	// If the operation has not completed it will return an error.
9135	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCrossConnection, error)
9136}
9137
9138// ExpressRouteGateway expressRoute gateway resource.
9139type ExpressRouteGateway struct {
9140	autorest.Response `json:"-"`
9141	// ExpressRouteGatewayProperties - Properties of the express route gateway.
9142	*ExpressRouteGatewayProperties `json:"properties,omitempty"`
9143	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
9144	Etag *string `json:"etag,omitempty"`
9145	// ID - Resource ID.
9146	ID *string `json:"id,omitempty"`
9147	// Name - READ-ONLY; Resource name.
9148	Name *string `json:"name,omitempty"`
9149	// Type - READ-ONLY; Resource type.
9150	Type *string `json:"type,omitempty"`
9151	// Location - Resource location.
9152	Location *string `json:"location,omitempty"`
9153	// Tags - Resource tags.
9154	Tags map[string]*string `json:"tags"`
9155}
9156
9157// MarshalJSON is the custom marshaler for ExpressRouteGateway.
9158func (erg ExpressRouteGateway) MarshalJSON() ([]byte, error) {
9159	objectMap := make(map[string]interface{})
9160	if erg.ExpressRouteGatewayProperties != nil {
9161		objectMap["properties"] = erg.ExpressRouteGatewayProperties
9162	}
9163	if erg.ID != nil {
9164		objectMap["id"] = erg.ID
9165	}
9166	if erg.Location != nil {
9167		objectMap["location"] = erg.Location
9168	}
9169	if erg.Tags != nil {
9170		objectMap["tags"] = erg.Tags
9171	}
9172	return json.Marshal(objectMap)
9173}
9174
9175// UnmarshalJSON is the custom unmarshaler for ExpressRouteGateway struct.
9176func (erg *ExpressRouteGateway) UnmarshalJSON(body []byte) error {
9177	var m map[string]*json.RawMessage
9178	err := json.Unmarshal(body, &m)
9179	if err != nil {
9180		return err
9181	}
9182	for k, v := range m {
9183		switch k {
9184		case "properties":
9185			if v != nil {
9186				var expressRouteGatewayProperties ExpressRouteGatewayProperties
9187				err = json.Unmarshal(*v, &expressRouteGatewayProperties)
9188				if err != nil {
9189					return err
9190				}
9191				erg.ExpressRouteGatewayProperties = &expressRouteGatewayProperties
9192			}
9193		case "etag":
9194			if v != nil {
9195				var etag string
9196				err = json.Unmarshal(*v, &etag)
9197				if err != nil {
9198					return err
9199				}
9200				erg.Etag = &etag
9201			}
9202		case "id":
9203			if v != nil {
9204				var ID string
9205				err = json.Unmarshal(*v, &ID)
9206				if err != nil {
9207					return err
9208				}
9209				erg.ID = &ID
9210			}
9211		case "name":
9212			if v != nil {
9213				var name string
9214				err = json.Unmarshal(*v, &name)
9215				if err != nil {
9216					return err
9217				}
9218				erg.Name = &name
9219			}
9220		case "type":
9221			if v != nil {
9222				var typeVar string
9223				err = json.Unmarshal(*v, &typeVar)
9224				if err != nil {
9225					return err
9226				}
9227				erg.Type = &typeVar
9228			}
9229		case "location":
9230			if v != nil {
9231				var location string
9232				err = json.Unmarshal(*v, &location)
9233				if err != nil {
9234					return err
9235				}
9236				erg.Location = &location
9237			}
9238		case "tags":
9239			if v != nil {
9240				var tags map[string]*string
9241				err = json.Unmarshal(*v, &tags)
9242				if err != nil {
9243					return err
9244				}
9245				erg.Tags = tags
9246			}
9247		}
9248	}
9249
9250	return nil
9251}
9252
9253// ExpressRouteGatewayList list of ExpressRoute gateways.
9254type ExpressRouteGatewayList struct {
9255	autorest.Response `json:"-"`
9256	// Value - List of ExpressRoute gateways.
9257	Value *[]ExpressRouteGateway `json:"value,omitempty"`
9258}
9259
9260// ExpressRouteGatewayProperties expressRoute gateway resource properties.
9261type ExpressRouteGatewayProperties struct {
9262	// AutoScaleConfiguration - Configuration for auto scaling.
9263	AutoScaleConfiguration *ExpressRouteGatewayPropertiesAutoScaleConfiguration `json:"autoScaleConfiguration,omitempty"`
9264	// ExpressRouteConnections - READ-ONLY; List of ExpressRoute connections to the ExpressRoute gateway.
9265	ExpressRouteConnections *[]ExpressRouteConnection `json:"expressRouteConnections,omitempty"`
9266	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
9267	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
9268	// VirtualHub - The Virtual Hub where the ExpressRoute gateway is or will be deployed.
9269	VirtualHub *VirtualHubID `json:"virtualHub,omitempty"`
9270}
9271
9272// MarshalJSON is the custom marshaler for ExpressRouteGatewayProperties.
9273func (ergp ExpressRouteGatewayProperties) MarshalJSON() ([]byte, error) {
9274	objectMap := make(map[string]interface{})
9275	if ergp.AutoScaleConfiguration != nil {
9276		objectMap["autoScaleConfiguration"] = ergp.AutoScaleConfiguration
9277	}
9278	if ergp.ProvisioningState != "" {
9279		objectMap["provisioningState"] = ergp.ProvisioningState
9280	}
9281	if ergp.VirtualHub != nil {
9282		objectMap["virtualHub"] = ergp.VirtualHub
9283	}
9284	return json.Marshal(objectMap)
9285}
9286
9287// ExpressRouteGatewayPropertiesAutoScaleConfiguration configuration for auto scaling.
9288type ExpressRouteGatewayPropertiesAutoScaleConfiguration struct {
9289	// Bounds - Minimum and maximum number of scale units to deploy.
9290	Bounds *ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds `json:"bounds,omitempty"`
9291}
9292
9293// ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds minimum and maximum number of scale units to
9294// deploy.
9295type ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds struct {
9296	// Min - Minimum number of scale units deployed for ExpressRoute gateway.
9297	Min *int32 `json:"min,omitempty"`
9298	// Max - Maximum number of scale units deployed for ExpressRoute gateway.
9299	Max *int32 `json:"max,omitempty"`
9300}
9301
9302// ExpressRouteGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
9303// long-running operation.
9304type ExpressRouteGatewaysCreateOrUpdateFuture struct {
9305	azure.FutureAPI
9306	// Result returns the result of the asynchronous operation.
9307	// If the operation has not completed it will return an error.
9308	Result func(ExpressRouteGatewaysClient) (ExpressRouteGateway, error)
9309}
9310
9311// ExpressRouteGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
9312// long-running operation.
9313type ExpressRouteGatewaysDeleteFuture struct {
9314	azure.FutureAPI
9315	// Result returns the result of the asynchronous operation.
9316	// If the operation has not completed it will return an error.
9317	Result func(ExpressRouteGatewaysClient) (autorest.Response, error)
9318}
9319
9320// ExpressRouteLink expressRouteLink child resource definition.
9321type ExpressRouteLink struct {
9322	autorest.Response `json:"-"`
9323	// ExpressRouteLinkPropertiesFormat - ExpressRouteLink properties
9324	*ExpressRouteLinkPropertiesFormat `json:"properties,omitempty"`
9325	// Name - Name of child port resource that is unique among child port resources of the parent.
9326	Name *string `json:"name,omitempty"`
9327	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
9328	Etag *string `json:"etag,omitempty"`
9329	// ID - Resource ID.
9330	ID *string `json:"id,omitempty"`
9331}
9332
9333// MarshalJSON is the custom marshaler for ExpressRouteLink.
9334func (erl ExpressRouteLink) MarshalJSON() ([]byte, error) {
9335	objectMap := make(map[string]interface{})
9336	if erl.ExpressRouteLinkPropertiesFormat != nil {
9337		objectMap["properties"] = erl.ExpressRouteLinkPropertiesFormat
9338	}
9339	if erl.Name != nil {
9340		objectMap["name"] = erl.Name
9341	}
9342	if erl.ID != nil {
9343		objectMap["id"] = erl.ID
9344	}
9345	return json.Marshal(objectMap)
9346}
9347
9348// UnmarshalJSON is the custom unmarshaler for ExpressRouteLink struct.
9349func (erl *ExpressRouteLink) UnmarshalJSON(body []byte) error {
9350	var m map[string]*json.RawMessage
9351	err := json.Unmarshal(body, &m)
9352	if err != nil {
9353		return err
9354	}
9355	for k, v := range m {
9356		switch k {
9357		case "properties":
9358			if v != nil {
9359				var expressRouteLinkPropertiesFormat ExpressRouteLinkPropertiesFormat
9360				err = json.Unmarshal(*v, &expressRouteLinkPropertiesFormat)
9361				if err != nil {
9362					return err
9363				}
9364				erl.ExpressRouteLinkPropertiesFormat = &expressRouteLinkPropertiesFormat
9365			}
9366		case "name":
9367			if v != nil {
9368				var name string
9369				err = json.Unmarshal(*v, &name)
9370				if err != nil {
9371					return err
9372				}
9373				erl.Name = &name
9374			}
9375		case "etag":
9376			if v != nil {
9377				var etag string
9378				err = json.Unmarshal(*v, &etag)
9379				if err != nil {
9380					return err
9381				}
9382				erl.Etag = &etag
9383			}
9384		case "id":
9385			if v != nil {
9386				var ID string
9387				err = json.Unmarshal(*v, &ID)
9388				if err != nil {
9389					return err
9390				}
9391				erl.ID = &ID
9392			}
9393		}
9394	}
9395
9396	return nil
9397}
9398
9399// ExpressRouteLinkListResult response for ListExpressRouteLinks API service call.
9400type ExpressRouteLinkListResult struct {
9401	autorest.Response `json:"-"`
9402	// Value - The list of ExpressRouteLink sub-resources.
9403	Value *[]ExpressRouteLink `json:"value,omitempty"`
9404	// NextLink - The URL to get the next set of results.
9405	NextLink *string `json:"nextLink,omitempty"`
9406}
9407
9408// ExpressRouteLinkListResultIterator provides access to a complete listing of ExpressRouteLink values.
9409type ExpressRouteLinkListResultIterator struct {
9410	i    int
9411	page ExpressRouteLinkListResultPage
9412}
9413
9414// NextWithContext advances to the next value.  If there was an error making
9415// the request the iterator does not advance and the error is returned.
9416func (iter *ExpressRouteLinkListResultIterator) NextWithContext(ctx context.Context) (err error) {
9417	if tracing.IsEnabled() {
9418		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteLinkListResultIterator.NextWithContext")
9419		defer func() {
9420			sc := -1
9421			if iter.Response().Response.Response != nil {
9422				sc = iter.Response().Response.Response.StatusCode
9423			}
9424			tracing.EndSpan(ctx, sc, err)
9425		}()
9426	}
9427	iter.i++
9428	if iter.i < len(iter.page.Values()) {
9429		return nil
9430	}
9431	err = iter.page.NextWithContext(ctx)
9432	if err != nil {
9433		iter.i--
9434		return err
9435	}
9436	iter.i = 0
9437	return nil
9438}
9439
9440// Next advances to the next value.  If there was an error making
9441// the request the iterator does not advance and the error is returned.
9442// Deprecated: Use NextWithContext() instead.
9443func (iter *ExpressRouteLinkListResultIterator) Next() error {
9444	return iter.NextWithContext(context.Background())
9445}
9446
9447// NotDone returns true if the enumeration should be started or is not yet complete.
9448func (iter ExpressRouteLinkListResultIterator) NotDone() bool {
9449	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9450}
9451
9452// Response returns the raw server response from the last page request.
9453func (iter ExpressRouteLinkListResultIterator) Response() ExpressRouteLinkListResult {
9454	return iter.page.Response()
9455}
9456
9457// Value returns the current value or a zero-initialized value if the
9458// iterator has advanced beyond the end of the collection.
9459func (iter ExpressRouteLinkListResultIterator) Value() ExpressRouteLink {
9460	if !iter.page.NotDone() {
9461		return ExpressRouteLink{}
9462	}
9463	return iter.page.Values()[iter.i]
9464}
9465
9466// Creates a new instance of the ExpressRouteLinkListResultIterator type.
9467func NewExpressRouteLinkListResultIterator(page ExpressRouteLinkListResultPage) ExpressRouteLinkListResultIterator {
9468	return ExpressRouteLinkListResultIterator{page: page}
9469}
9470
9471// IsEmpty returns true if the ListResult contains no values.
9472func (erllr ExpressRouteLinkListResult) IsEmpty() bool {
9473	return erllr.Value == nil || len(*erllr.Value) == 0
9474}
9475
9476// hasNextLink returns true if the NextLink is not empty.
9477func (erllr ExpressRouteLinkListResult) hasNextLink() bool {
9478	return erllr.NextLink != nil && len(*erllr.NextLink) != 0
9479}
9480
9481// expressRouteLinkListResultPreparer prepares a request to retrieve the next set of results.
9482// It returns nil if no more results exist.
9483func (erllr ExpressRouteLinkListResult) expressRouteLinkListResultPreparer(ctx context.Context) (*http.Request, error) {
9484	if !erllr.hasNextLink() {
9485		return nil, nil
9486	}
9487	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9488		autorest.AsJSON(),
9489		autorest.AsGet(),
9490		autorest.WithBaseURL(to.String(erllr.NextLink)))
9491}
9492
9493// ExpressRouteLinkListResultPage contains a page of ExpressRouteLink values.
9494type ExpressRouteLinkListResultPage struct {
9495	fn    func(context.Context, ExpressRouteLinkListResult) (ExpressRouteLinkListResult, error)
9496	erllr ExpressRouteLinkListResult
9497}
9498
9499// NextWithContext advances to the next page of values.  If there was an error making
9500// the request the page does not advance and the error is returned.
9501func (page *ExpressRouteLinkListResultPage) NextWithContext(ctx context.Context) (err error) {
9502	if tracing.IsEnabled() {
9503		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteLinkListResultPage.NextWithContext")
9504		defer func() {
9505			sc := -1
9506			if page.Response().Response.Response != nil {
9507				sc = page.Response().Response.Response.StatusCode
9508			}
9509			tracing.EndSpan(ctx, sc, err)
9510		}()
9511	}
9512	for {
9513		next, err := page.fn(ctx, page.erllr)
9514		if err != nil {
9515			return err
9516		}
9517		page.erllr = next
9518		if !next.hasNextLink() || !next.IsEmpty() {
9519			break
9520		}
9521	}
9522	return nil
9523}
9524
9525// Next advances to the next page of values.  If there was an error making
9526// the request the page does not advance and the error is returned.
9527// Deprecated: Use NextWithContext() instead.
9528func (page *ExpressRouteLinkListResultPage) Next() error {
9529	return page.NextWithContext(context.Background())
9530}
9531
9532// NotDone returns true if the page enumeration should be started or is not yet complete.
9533func (page ExpressRouteLinkListResultPage) NotDone() bool {
9534	return !page.erllr.IsEmpty()
9535}
9536
9537// Response returns the raw server response from the last page request.
9538func (page ExpressRouteLinkListResultPage) Response() ExpressRouteLinkListResult {
9539	return page.erllr
9540}
9541
9542// Values returns the slice of values for the current page or nil if there are no values.
9543func (page ExpressRouteLinkListResultPage) Values() []ExpressRouteLink {
9544	if page.erllr.IsEmpty() {
9545		return nil
9546	}
9547	return *page.erllr.Value
9548}
9549
9550// Creates a new instance of the ExpressRouteLinkListResultPage type.
9551func NewExpressRouteLinkListResultPage(cur ExpressRouteLinkListResult, getNextPage func(context.Context, ExpressRouteLinkListResult) (ExpressRouteLinkListResult, error)) ExpressRouteLinkListResultPage {
9552	return ExpressRouteLinkListResultPage{
9553		fn:    getNextPage,
9554		erllr: cur,
9555	}
9556}
9557
9558// ExpressRouteLinkPropertiesFormat properties specific to ExpressRouteLink resources.
9559type ExpressRouteLinkPropertiesFormat struct {
9560	// RouterName - READ-ONLY; Name of Azure router associated with physical port.
9561	RouterName *string `json:"routerName,omitempty"`
9562	// InterfaceName - READ-ONLY; Name of Azure router interface.
9563	InterfaceName *string `json:"interfaceName,omitempty"`
9564	// PatchPanelID - READ-ONLY; Mapping between physical port to patch panel port.
9565	PatchPanelID *string `json:"patchPanelId,omitempty"`
9566	// RackID - READ-ONLY; Mapping of physical patch panel to rack.
9567	RackID *string `json:"rackId,omitempty"`
9568	// ConnectorType - READ-ONLY; Physical fiber port type. Possible values include: 'LC', 'SC'
9569	ConnectorType ExpressRouteLinkConnectorType `json:"connectorType,omitempty"`
9570	// AdminState - Administrative state of the physical port. Possible values include: 'ExpressRouteLinkAdminStateEnabled', 'ExpressRouteLinkAdminStateDisabled'
9571	AdminState ExpressRouteLinkAdminState `json:"adminState,omitempty"`
9572	// ProvisioningState - READ-ONLY; The provisioning state of the ExpressRouteLink resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
9573	ProvisioningState *string `json:"provisioningState,omitempty"`
9574}
9575
9576// MarshalJSON is the custom marshaler for ExpressRouteLinkPropertiesFormat.
9577func (erlpf ExpressRouteLinkPropertiesFormat) MarshalJSON() ([]byte, error) {
9578	objectMap := make(map[string]interface{})
9579	if erlpf.AdminState != "" {
9580		objectMap["adminState"] = erlpf.AdminState
9581	}
9582	return json.Marshal(objectMap)
9583}
9584
9585// ExpressRoutePort expressRoutePort resource definition.
9586type ExpressRoutePort struct {
9587	autorest.Response `json:"-"`
9588	// ExpressRoutePortPropertiesFormat - ExpressRoutePort properties
9589	*ExpressRoutePortPropertiesFormat `json:"properties,omitempty"`
9590	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
9591	Etag *string `json:"etag,omitempty"`
9592	// ID - Resource ID.
9593	ID *string `json:"id,omitempty"`
9594	// Name - READ-ONLY; Resource name.
9595	Name *string `json:"name,omitempty"`
9596	// Type - READ-ONLY; Resource type.
9597	Type *string `json:"type,omitempty"`
9598	// Location - Resource location.
9599	Location *string `json:"location,omitempty"`
9600	// Tags - Resource tags.
9601	Tags map[string]*string `json:"tags"`
9602}
9603
9604// MarshalJSON is the custom marshaler for ExpressRoutePort.
9605func (erp ExpressRoutePort) MarshalJSON() ([]byte, error) {
9606	objectMap := make(map[string]interface{})
9607	if erp.ExpressRoutePortPropertiesFormat != nil {
9608		objectMap["properties"] = erp.ExpressRoutePortPropertiesFormat
9609	}
9610	if erp.ID != nil {
9611		objectMap["id"] = erp.ID
9612	}
9613	if erp.Location != nil {
9614		objectMap["location"] = erp.Location
9615	}
9616	if erp.Tags != nil {
9617		objectMap["tags"] = erp.Tags
9618	}
9619	return json.Marshal(objectMap)
9620}
9621
9622// UnmarshalJSON is the custom unmarshaler for ExpressRoutePort struct.
9623func (erp *ExpressRoutePort) UnmarshalJSON(body []byte) error {
9624	var m map[string]*json.RawMessage
9625	err := json.Unmarshal(body, &m)
9626	if err != nil {
9627		return err
9628	}
9629	for k, v := range m {
9630		switch k {
9631		case "properties":
9632			if v != nil {
9633				var expressRoutePortPropertiesFormat ExpressRoutePortPropertiesFormat
9634				err = json.Unmarshal(*v, &expressRoutePortPropertiesFormat)
9635				if err != nil {
9636					return err
9637				}
9638				erp.ExpressRoutePortPropertiesFormat = &expressRoutePortPropertiesFormat
9639			}
9640		case "etag":
9641			if v != nil {
9642				var etag string
9643				err = json.Unmarshal(*v, &etag)
9644				if err != nil {
9645					return err
9646				}
9647				erp.Etag = &etag
9648			}
9649		case "id":
9650			if v != nil {
9651				var ID string
9652				err = json.Unmarshal(*v, &ID)
9653				if err != nil {
9654					return err
9655				}
9656				erp.ID = &ID
9657			}
9658		case "name":
9659			if v != nil {
9660				var name string
9661				err = json.Unmarshal(*v, &name)
9662				if err != nil {
9663					return err
9664				}
9665				erp.Name = &name
9666			}
9667		case "type":
9668			if v != nil {
9669				var typeVar string
9670				err = json.Unmarshal(*v, &typeVar)
9671				if err != nil {
9672					return err
9673				}
9674				erp.Type = &typeVar
9675			}
9676		case "location":
9677			if v != nil {
9678				var location string
9679				err = json.Unmarshal(*v, &location)
9680				if err != nil {
9681					return err
9682				}
9683				erp.Location = &location
9684			}
9685		case "tags":
9686			if v != nil {
9687				var tags map[string]*string
9688				err = json.Unmarshal(*v, &tags)
9689				if err != nil {
9690					return err
9691				}
9692				erp.Tags = tags
9693			}
9694		}
9695	}
9696
9697	return nil
9698}
9699
9700// ExpressRoutePortListResult response for ListExpressRoutePorts API service call.
9701type ExpressRoutePortListResult struct {
9702	autorest.Response `json:"-"`
9703	// Value - A list of ExpressRoutePort resources.
9704	Value *[]ExpressRoutePort `json:"value,omitempty"`
9705	// NextLink - The URL to get the next set of results.
9706	NextLink *string `json:"nextLink,omitempty"`
9707}
9708
9709// ExpressRoutePortListResultIterator provides access to a complete listing of ExpressRoutePort values.
9710type ExpressRoutePortListResultIterator struct {
9711	i    int
9712	page ExpressRoutePortListResultPage
9713}
9714
9715// NextWithContext advances to the next value.  If there was an error making
9716// the request the iterator does not advance and the error is returned.
9717func (iter *ExpressRoutePortListResultIterator) NextWithContext(ctx context.Context) (err error) {
9718	if tracing.IsEnabled() {
9719		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortListResultIterator.NextWithContext")
9720		defer func() {
9721			sc := -1
9722			if iter.Response().Response.Response != nil {
9723				sc = iter.Response().Response.Response.StatusCode
9724			}
9725			tracing.EndSpan(ctx, sc, err)
9726		}()
9727	}
9728	iter.i++
9729	if iter.i < len(iter.page.Values()) {
9730		return nil
9731	}
9732	err = iter.page.NextWithContext(ctx)
9733	if err != nil {
9734		iter.i--
9735		return err
9736	}
9737	iter.i = 0
9738	return nil
9739}
9740
9741// Next advances to the next value.  If there was an error making
9742// the request the iterator does not advance and the error is returned.
9743// Deprecated: Use NextWithContext() instead.
9744func (iter *ExpressRoutePortListResultIterator) Next() error {
9745	return iter.NextWithContext(context.Background())
9746}
9747
9748// NotDone returns true if the enumeration should be started or is not yet complete.
9749func (iter ExpressRoutePortListResultIterator) NotDone() bool {
9750	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9751}
9752
9753// Response returns the raw server response from the last page request.
9754func (iter ExpressRoutePortListResultIterator) Response() ExpressRoutePortListResult {
9755	return iter.page.Response()
9756}
9757
9758// Value returns the current value or a zero-initialized value if the
9759// iterator has advanced beyond the end of the collection.
9760func (iter ExpressRoutePortListResultIterator) Value() ExpressRoutePort {
9761	if !iter.page.NotDone() {
9762		return ExpressRoutePort{}
9763	}
9764	return iter.page.Values()[iter.i]
9765}
9766
9767// Creates a new instance of the ExpressRoutePortListResultIterator type.
9768func NewExpressRoutePortListResultIterator(page ExpressRoutePortListResultPage) ExpressRoutePortListResultIterator {
9769	return ExpressRoutePortListResultIterator{page: page}
9770}
9771
9772// IsEmpty returns true if the ListResult contains no values.
9773func (erplr ExpressRoutePortListResult) IsEmpty() bool {
9774	return erplr.Value == nil || len(*erplr.Value) == 0
9775}
9776
9777// hasNextLink returns true if the NextLink is not empty.
9778func (erplr ExpressRoutePortListResult) hasNextLink() bool {
9779	return erplr.NextLink != nil && len(*erplr.NextLink) != 0
9780}
9781
9782// expressRoutePortListResultPreparer prepares a request to retrieve the next set of results.
9783// It returns nil if no more results exist.
9784func (erplr ExpressRoutePortListResult) expressRoutePortListResultPreparer(ctx context.Context) (*http.Request, error) {
9785	if !erplr.hasNextLink() {
9786		return nil, nil
9787	}
9788	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9789		autorest.AsJSON(),
9790		autorest.AsGet(),
9791		autorest.WithBaseURL(to.String(erplr.NextLink)))
9792}
9793
9794// ExpressRoutePortListResultPage contains a page of ExpressRoutePort values.
9795type ExpressRoutePortListResultPage struct {
9796	fn    func(context.Context, ExpressRoutePortListResult) (ExpressRoutePortListResult, error)
9797	erplr ExpressRoutePortListResult
9798}
9799
9800// NextWithContext advances to the next page of values.  If there was an error making
9801// the request the page does not advance and the error is returned.
9802func (page *ExpressRoutePortListResultPage) NextWithContext(ctx context.Context) (err error) {
9803	if tracing.IsEnabled() {
9804		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortListResultPage.NextWithContext")
9805		defer func() {
9806			sc := -1
9807			if page.Response().Response.Response != nil {
9808				sc = page.Response().Response.Response.StatusCode
9809			}
9810			tracing.EndSpan(ctx, sc, err)
9811		}()
9812	}
9813	for {
9814		next, err := page.fn(ctx, page.erplr)
9815		if err != nil {
9816			return err
9817		}
9818		page.erplr = next
9819		if !next.hasNextLink() || !next.IsEmpty() {
9820			break
9821		}
9822	}
9823	return nil
9824}
9825
9826// Next advances to the next page of values.  If there was an error making
9827// the request the page does not advance and the error is returned.
9828// Deprecated: Use NextWithContext() instead.
9829func (page *ExpressRoutePortListResultPage) Next() error {
9830	return page.NextWithContext(context.Background())
9831}
9832
9833// NotDone returns true if the page enumeration should be started or is not yet complete.
9834func (page ExpressRoutePortListResultPage) NotDone() bool {
9835	return !page.erplr.IsEmpty()
9836}
9837
9838// Response returns the raw server response from the last page request.
9839func (page ExpressRoutePortListResultPage) Response() ExpressRoutePortListResult {
9840	return page.erplr
9841}
9842
9843// Values returns the slice of values for the current page or nil if there are no values.
9844func (page ExpressRoutePortListResultPage) Values() []ExpressRoutePort {
9845	if page.erplr.IsEmpty() {
9846		return nil
9847	}
9848	return *page.erplr.Value
9849}
9850
9851// Creates a new instance of the ExpressRoutePortListResultPage type.
9852func NewExpressRoutePortListResultPage(cur ExpressRoutePortListResult, getNextPage func(context.Context, ExpressRoutePortListResult) (ExpressRoutePortListResult, error)) ExpressRoutePortListResultPage {
9853	return ExpressRoutePortListResultPage{
9854		fn:    getNextPage,
9855		erplr: cur,
9856	}
9857}
9858
9859// ExpressRoutePortPropertiesFormat properties specific to ExpressRoutePort resources.
9860type ExpressRoutePortPropertiesFormat struct {
9861	// PeeringLocation - The name of the peering location that the ExpressRoutePort is mapped to physically.
9862	PeeringLocation *string `json:"peeringLocation,omitempty"`
9863	// BandwidthInGbps - Bandwidth of procured ports in Gbps
9864	BandwidthInGbps *int32 `json:"bandwidthInGbps,omitempty"`
9865	// ProvisionedBandwidthInGbps - READ-ONLY; Aggregate Gbps of associated circuit bandwidths.
9866	ProvisionedBandwidthInGbps *float64 `json:"provisionedBandwidthInGbps,omitempty"`
9867	// Mtu - READ-ONLY; Maximum transmission unit of the physical port pair(s)
9868	Mtu *string `json:"mtu,omitempty"`
9869	// Encapsulation - Encapsulation method on physical ports. Possible values include: 'Dot1Q', 'QinQ'
9870	Encapsulation ExpressRoutePortsEncapsulation `json:"encapsulation,omitempty"`
9871	// EtherType - READ-ONLY; Ether type of the physical port.
9872	EtherType *string `json:"etherType,omitempty"`
9873	// AllocationDate - READ-ONLY; Date of the physical port allocation to be used in Letter of Authorization.
9874	AllocationDate *string `json:"allocationDate,omitempty"`
9875	// Links - The set of physical links of the ExpressRoutePort resource
9876	Links *[]ExpressRouteLink `json:"links,omitempty"`
9877	// Circuits - READ-ONLY; Reference the ExpressRoute circuit(s) that are provisioned on this ExpressRoutePort resource.
9878	Circuits *[]SubResource `json:"circuits,omitempty"`
9879	// ProvisioningState - READ-ONLY; The provisioning state of the ExpressRoutePort resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
9880	ProvisioningState *string `json:"provisioningState,omitempty"`
9881	// ResourceGUID - The resource GUID property of the ExpressRoutePort resource.
9882	ResourceGUID *string `json:"resourceGuid,omitempty"`
9883}
9884
9885// MarshalJSON is the custom marshaler for ExpressRoutePortPropertiesFormat.
9886func (erppf ExpressRoutePortPropertiesFormat) MarshalJSON() ([]byte, error) {
9887	objectMap := make(map[string]interface{})
9888	if erppf.PeeringLocation != nil {
9889		objectMap["peeringLocation"] = erppf.PeeringLocation
9890	}
9891	if erppf.BandwidthInGbps != nil {
9892		objectMap["bandwidthInGbps"] = erppf.BandwidthInGbps
9893	}
9894	if erppf.Encapsulation != "" {
9895		objectMap["encapsulation"] = erppf.Encapsulation
9896	}
9897	if erppf.Links != nil {
9898		objectMap["links"] = erppf.Links
9899	}
9900	if erppf.ResourceGUID != nil {
9901		objectMap["resourceGuid"] = erppf.ResourceGUID
9902	}
9903	return json.Marshal(objectMap)
9904}
9905
9906// ExpressRoutePortsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
9907// long-running operation.
9908type ExpressRoutePortsCreateOrUpdateFuture struct {
9909	azure.FutureAPI
9910	// Result returns the result of the asynchronous operation.
9911	// If the operation has not completed it will return an error.
9912	Result func(ExpressRoutePortsClient) (ExpressRoutePort, error)
9913}
9914
9915// ExpressRoutePortsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
9916// operation.
9917type ExpressRoutePortsDeleteFuture struct {
9918	azure.FutureAPI
9919	// Result returns the result of the asynchronous operation.
9920	// If the operation has not completed it will return an error.
9921	Result func(ExpressRoutePortsClient) (autorest.Response, error)
9922}
9923
9924// ExpressRoutePortsLocation definition of the ExpressRoutePorts peering location resource.
9925type ExpressRoutePortsLocation struct {
9926	autorest.Response `json:"-"`
9927	// ExpressRoutePortsLocationPropertiesFormat - ExpressRoutePort peering location properties
9928	*ExpressRoutePortsLocationPropertiesFormat `json:"properties,omitempty"`
9929	// ID - Resource ID.
9930	ID *string `json:"id,omitempty"`
9931	// Name - READ-ONLY; Resource name.
9932	Name *string `json:"name,omitempty"`
9933	// Type - READ-ONLY; Resource type.
9934	Type *string `json:"type,omitempty"`
9935	// Location - Resource location.
9936	Location *string `json:"location,omitempty"`
9937	// Tags - Resource tags.
9938	Tags map[string]*string `json:"tags"`
9939}
9940
9941// MarshalJSON is the custom marshaler for ExpressRoutePortsLocation.
9942func (erpl ExpressRoutePortsLocation) MarshalJSON() ([]byte, error) {
9943	objectMap := make(map[string]interface{})
9944	if erpl.ExpressRoutePortsLocationPropertiesFormat != nil {
9945		objectMap["properties"] = erpl.ExpressRoutePortsLocationPropertiesFormat
9946	}
9947	if erpl.ID != nil {
9948		objectMap["id"] = erpl.ID
9949	}
9950	if erpl.Location != nil {
9951		objectMap["location"] = erpl.Location
9952	}
9953	if erpl.Tags != nil {
9954		objectMap["tags"] = erpl.Tags
9955	}
9956	return json.Marshal(objectMap)
9957}
9958
9959// UnmarshalJSON is the custom unmarshaler for ExpressRoutePortsLocation struct.
9960func (erpl *ExpressRoutePortsLocation) UnmarshalJSON(body []byte) error {
9961	var m map[string]*json.RawMessage
9962	err := json.Unmarshal(body, &m)
9963	if err != nil {
9964		return err
9965	}
9966	for k, v := range m {
9967		switch k {
9968		case "properties":
9969			if v != nil {
9970				var expressRoutePortsLocationPropertiesFormat ExpressRoutePortsLocationPropertiesFormat
9971				err = json.Unmarshal(*v, &expressRoutePortsLocationPropertiesFormat)
9972				if err != nil {
9973					return err
9974				}
9975				erpl.ExpressRoutePortsLocationPropertiesFormat = &expressRoutePortsLocationPropertiesFormat
9976			}
9977		case "id":
9978			if v != nil {
9979				var ID string
9980				err = json.Unmarshal(*v, &ID)
9981				if err != nil {
9982					return err
9983				}
9984				erpl.ID = &ID
9985			}
9986		case "name":
9987			if v != nil {
9988				var name string
9989				err = json.Unmarshal(*v, &name)
9990				if err != nil {
9991					return err
9992				}
9993				erpl.Name = &name
9994			}
9995		case "type":
9996			if v != nil {
9997				var typeVar string
9998				err = json.Unmarshal(*v, &typeVar)
9999				if err != nil {
10000					return err
10001				}
10002				erpl.Type = &typeVar
10003			}
10004		case "location":
10005			if v != nil {
10006				var location string
10007				err = json.Unmarshal(*v, &location)
10008				if err != nil {
10009					return err
10010				}
10011				erpl.Location = &location
10012			}
10013		case "tags":
10014			if v != nil {
10015				var tags map[string]*string
10016				err = json.Unmarshal(*v, &tags)
10017				if err != nil {
10018					return err
10019				}
10020				erpl.Tags = tags
10021			}
10022		}
10023	}
10024
10025	return nil
10026}
10027
10028// ExpressRoutePortsLocationBandwidths real-time inventory of available ExpressRoute port bandwidths.
10029type ExpressRoutePortsLocationBandwidths struct {
10030	// OfferName - READ-ONLY; Bandwidth descriptive name
10031	OfferName *string `json:"offerName,omitempty"`
10032	// ValueInGbps - READ-ONLY; Bandwidth value in Gbps
10033	ValueInGbps *int32 `json:"valueInGbps,omitempty"`
10034}
10035
10036// ExpressRoutePortsLocationListResult response for ListExpressRoutePortsLocations API service call.
10037type ExpressRoutePortsLocationListResult struct {
10038	autorest.Response `json:"-"`
10039	// Value - The list of all ExpressRoutePort peering locations.
10040	Value *[]ExpressRoutePortsLocation `json:"value,omitempty"`
10041	// NextLink - The URL to get the next set of results.
10042	NextLink *string `json:"nextLink,omitempty"`
10043}
10044
10045// ExpressRoutePortsLocationListResultIterator provides access to a complete listing of
10046// ExpressRoutePortsLocation values.
10047type ExpressRoutePortsLocationListResultIterator struct {
10048	i    int
10049	page ExpressRoutePortsLocationListResultPage
10050}
10051
10052// NextWithContext advances to the next value.  If there was an error making
10053// the request the iterator does not advance and the error is returned.
10054func (iter *ExpressRoutePortsLocationListResultIterator) NextWithContext(ctx context.Context) (err error) {
10055	if tracing.IsEnabled() {
10056		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsLocationListResultIterator.NextWithContext")
10057		defer func() {
10058			sc := -1
10059			if iter.Response().Response.Response != nil {
10060				sc = iter.Response().Response.Response.StatusCode
10061			}
10062			tracing.EndSpan(ctx, sc, err)
10063		}()
10064	}
10065	iter.i++
10066	if iter.i < len(iter.page.Values()) {
10067		return nil
10068	}
10069	err = iter.page.NextWithContext(ctx)
10070	if err != nil {
10071		iter.i--
10072		return err
10073	}
10074	iter.i = 0
10075	return nil
10076}
10077
10078// Next advances to the next value.  If there was an error making
10079// the request the iterator does not advance and the error is returned.
10080// Deprecated: Use NextWithContext() instead.
10081func (iter *ExpressRoutePortsLocationListResultIterator) Next() error {
10082	return iter.NextWithContext(context.Background())
10083}
10084
10085// NotDone returns true if the enumeration should be started or is not yet complete.
10086func (iter ExpressRoutePortsLocationListResultIterator) NotDone() bool {
10087	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10088}
10089
10090// Response returns the raw server response from the last page request.
10091func (iter ExpressRoutePortsLocationListResultIterator) Response() ExpressRoutePortsLocationListResult {
10092	return iter.page.Response()
10093}
10094
10095// Value returns the current value or a zero-initialized value if the
10096// iterator has advanced beyond the end of the collection.
10097func (iter ExpressRoutePortsLocationListResultIterator) Value() ExpressRoutePortsLocation {
10098	if !iter.page.NotDone() {
10099		return ExpressRoutePortsLocation{}
10100	}
10101	return iter.page.Values()[iter.i]
10102}
10103
10104// Creates a new instance of the ExpressRoutePortsLocationListResultIterator type.
10105func NewExpressRoutePortsLocationListResultIterator(page ExpressRoutePortsLocationListResultPage) ExpressRoutePortsLocationListResultIterator {
10106	return ExpressRoutePortsLocationListResultIterator{page: page}
10107}
10108
10109// IsEmpty returns true if the ListResult contains no values.
10110func (erpllr ExpressRoutePortsLocationListResult) IsEmpty() bool {
10111	return erpllr.Value == nil || len(*erpllr.Value) == 0
10112}
10113
10114// hasNextLink returns true if the NextLink is not empty.
10115func (erpllr ExpressRoutePortsLocationListResult) hasNextLink() bool {
10116	return erpllr.NextLink != nil && len(*erpllr.NextLink) != 0
10117}
10118
10119// expressRoutePortsLocationListResultPreparer prepares a request to retrieve the next set of results.
10120// It returns nil if no more results exist.
10121func (erpllr ExpressRoutePortsLocationListResult) expressRoutePortsLocationListResultPreparer(ctx context.Context) (*http.Request, error) {
10122	if !erpllr.hasNextLink() {
10123		return nil, nil
10124	}
10125	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10126		autorest.AsJSON(),
10127		autorest.AsGet(),
10128		autorest.WithBaseURL(to.String(erpllr.NextLink)))
10129}
10130
10131// ExpressRoutePortsLocationListResultPage contains a page of ExpressRoutePortsLocation values.
10132type ExpressRoutePortsLocationListResultPage struct {
10133	fn     func(context.Context, ExpressRoutePortsLocationListResult) (ExpressRoutePortsLocationListResult, error)
10134	erpllr ExpressRoutePortsLocationListResult
10135}
10136
10137// NextWithContext advances to the next page of values.  If there was an error making
10138// the request the page does not advance and the error is returned.
10139func (page *ExpressRoutePortsLocationListResultPage) NextWithContext(ctx context.Context) (err error) {
10140	if tracing.IsEnabled() {
10141		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsLocationListResultPage.NextWithContext")
10142		defer func() {
10143			sc := -1
10144			if page.Response().Response.Response != nil {
10145				sc = page.Response().Response.Response.StatusCode
10146			}
10147			tracing.EndSpan(ctx, sc, err)
10148		}()
10149	}
10150	for {
10151		next, err := page.fn(ctx, page.erpllr)
10152		if err != nil {
10153			return err
10154		}
10155		page.erpllr = next
10156		if !next.hasNextLink() || !next.IsEmpty() {
10157			break
10158		}
10159	}
10160	return nil
10161}
10162
10163// Next advances to the next page of values.  If there was an error making
10164// the request the page does not advance and the error is returned.
10165// Deprecated: Use NextWithContext() instead.
10166func (page *ExpressRoutePortsLocationListResultPage) Next() error {
10167	return page.NextWithContext(context.Background())
10168}
10169
10170// NotDone returns true if the page enumeration should be started or is not yet complete.
10171func (page ExpressRoutePortsLocationListResultPage) NotDone() bool {
10172	return !page.erpllr.IsEmpty()
10173}
10174
10175// Response returns the raw server response from the last page request.
10176func (page ExpressRoutePortsLocationListResultPage) Response() ExpressRoutePortsLocationListResult {
10177	return page.erpllr
10178}
10179
10180// Values returns the slice of values for the current page or nil if there are no values.
10181func (page ExpressRoutePortsLocationListResultPage) Values() []ExpressRoutePortsLocation {
10182	if page.erpllr.IsEmpty() {
10183		return nil
10184	}
10185	return *page.erpllr.Value
10186}
10187
10188// Creates a new instance of the ExpressRoutePortsLocationListResultPage type.
10189func NewExpressRoutePortsLocationListResultPage(cur ExpressRoutePortsLocationListResult, getNextPage func(context.Context, ExpressRoutePortsLocationListResult) (ExpressRoutePortsLocationListResult, error)) ExpressRoutePortsLocationListResultPage {
10190	return ExpressRoutePortsLocationListResultPage{
10191		fn:     getNextPage,
10192		erpllr: cur,
10193	}
10194}
10195
10196// ExpressRoutePortsLocationPropertiesFormat properties specific to ExpressRoutePorts peering location
10197// resources.
10198type ExpressRoutePortsLocationPropertiesFormat struct {
10199	// Address - READ-ONLY; Address of peering location.
10200	Address *string `json:"address,omitempty"`
10201	// Contact - READ-ONLY; Contact details of peering locations.
10202	Contact *string `json:"contact,omitempty"`
10203	// AvailableBandwidths - The inventory of available ExpressRoutePort bandwidths.
10204	AvailableBandwidths *[]ExpressRoutePortsLocationBandwidths `json:"availableBandwidths,omitempty"`
10205	// ProvisioningState - READ-ONLY; The provisioning state of the ExpressRoutePortLocation resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
10206	ProvisioningState *string `json:"provisioningState,omitempty"`
10207}
10208
10209// MarshalJSON is the custom marshaler for ExpressRoutePortsLocationPropertiesFormat.
10210func (erplpf ExpressRoutePortsLocationPropertiesFormat) MarshalJSON() ([]byte, error) {
10211	objectMap := make(map[string]interface{})
10212	if erplpf.AvailableBandwidths != nil {
10213		objectMap["availableBandwidths"] = erplpf.AvailableBandwidths
10214	}
10215	return json.Marshal(objectMap)
10216}
10217
10218// ExpressRoutePortsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
10219// long-running operation.
10220type ExpressRoutePortsUpdateTagsFuture struct {
10221	azure.FutureAPI
10222	// Result returns the result of the asynchronous operation.
10223	// If the operation has not completed it will return an error.
10224	Result func(ExpressRoutePortsClient) (ExpressRoutePort, error)
10225}
10226
10227// ExpressRouteServiceProvider a ExpressRouteResourceProvider object.
10228type ExpressRouteServiceProvider struct {
10229	// ExpressRouteServiceProviderPropertiesFormat - Properties of the express route service provider.
10230	*ExpressRouteServiceProviderPropertiesFormat `json:"properties,omitempty"`
10231	// ID - Resource ID.
10232	ID *string `json:"id,omitempty"`
10233	// Name - READ-ONLY; Resource name.
10234	Name *string `json:"name,omitempty"`
10235	// Type - READ-ONLY; Resource type.
10236	Type *string `json:"type,omitempty"`
10237	// Location - Resource location.
10238	Location *string `json:"location,omitempty"`
10239	// Tags - Resource tags.
10240	Tags map[string]*string `json:"tags"`
10241}
10242
10243// MarshalJSON is the custom marshaler for ExpressRouteServiceProvider.
10244func (ersp ExpressRouteServiceProvider) MarshalJSON() ([]byte, error) {
10245	objectMap := make(map[string]interface{})
10246	if ersp.ExpressRouteServiceProviderPropertiesFormat != nil {
10247		objectMap["properties"] = ersp.ExpressRouteServiceProviderPropertiesFormat
10248	}
10249	if ersp.ID != nil {
10250		objectMap["id"] = ersp.ID
10251	}
10252	if ersp.Location != nil {
10253		objectMap["location"] = ersp.Location
10254	}
10255	if ersp.Tags != nil {
10256		objectMap["tags"] = ersp.Tags
10257	}
10258	return json.Marshal(objectMap)
10259}
10260
10261// UnmarshalJSON is the custom unmarshaler for ExpressRouteServiceProvider struct.
10262func (ersp *ExpressRouteServiceProvider) UnmarshalJSON(body []byte) error {
10263	var m map[string]*json.RawMessage
10264	err := json.Unmarshal(body, &m)
10265	if err != nil {
10266		return err
10267	}
10268	for k, v := range m {
10269		switch k {
10270		case "properties":
10271			if v != nil {
10272				var expressRouteServiceProviderPropertiesFormat ExpressRouteServiceProviderPropertiesFormat
10273				err = json.Unmarshal(*v, &expressRouteServiceProviderPropertiesFormat)
10274				if err != nil {
10275					return err
10276				}
10277				ersp.ExpressRouteServiceProviderPropertiesFormat = &expressRouteServiceProviderPropertiesFormat
10278			}
10279		case "id":
10280			if v != nil {
10281				var ID string
10282				err = json.Unmarshal(*v, &ID)
10283				if err != nil {
10284					return err
10285				}
10286				ersp.ID = &ID
10287			}
10288		case "name":
10289			if v != nil {
10290				var name string
10291				err = json.Unmarshal(*v, &name)
10292				if err != nil {
10293					return err
10294				}
10295				ersp.Name = &name
10296			}
10297		case "type":
10298			if v != nil {
10299				var typeVar string
10300				err = json.Unmarshal(*v, &typeVar)
10301				if err != nil {
10302					return err
10303				}
10304				ersp.Type = &typeVar
10305			}
10306		case "location":
10307			if v != nil {
10308				var location string
10309				err = json.Unmarshal(*v, &location)
10310				if err != nil {
10311					return err
10312				}
10313				ersp.Location = &location
10314			}
10315		case "tags":
10316			if v != nil {
10317				var tags map[string]*string
10318				err = json.Unmarshal(*v, &tags)
10319				if err != nil {
10320					return err
10321				}
10322				ersp.Tags = tags
10323			}
10324		}
10325	}
10326
10327	return nil
10328}
10329
10330// ExpressRouteServiceProviderBandwidthsOffered contains bandwidths offered in ExpressRouteServiceProvider
10331// resources.
10332type ExpressRouteServiceProviderBandwidthsOffered struct {
10333	// OfferName - The OfferName.
10334	OfferName *string `json:"offerName,omitempty"`
10335	// ValueInMbps - The ValueInMbps.
10336	ValueInMbps *int32 `json:"valueInMbps,omitempty"`
10337}
10338
10339// ExpressRouteServiceProviderListResult response for the ListExpressRouteServiceProvider API service call.
10340type ExpressRouteServiceProviderListResult struct {
10341	autorest.Response `json:"-"`
10342	// Value - A list of ExpressRouteResourceProvider resources.
10343	Value *[]ExpressRouteServiceProvider `json:"value,omitempty"`
10344	// NextLink - The URL to get the next set of results.
10345	NextLink *string `json:"nextLink,omitempty"`
10346}
10347
10348// ExpressRouteServiceProviderListResultIterator provides access to a complete listing of
10349// ExpressRouteServiceProvider values.
10350type ExpressRouteServiceProviderListResultIterator struct {
10351	i    int
10352	page ExpressRouteServiceProviderListResultPage
10353}
10354
10355// NextWithContext advances to the next value.  If there was an error making
10356// the request the iterator does not advance and the error is returned.
10357func (iter *ExpressRouteServiceProviderListResultIterator) NextWithContext(ctx context.Context) (err error) {
10358	if tracing.IsEnabled() {
10359		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultIterator.NextWithContext")
10360		defer func() {
10361			sc := -1
10362			if iter.Response().Response.Response != nil {
10363				sc = iter.Response().Response.Response.StatusCode
10364			}
10365			tracing.EndSpan(ctx, sc, err)
10366		}()
10367	}
10368	iter.i++
10369	if iter.i < len(iter.page.Values()) {
10370		return nil
10371	}
10372	err = iter.page.NextWithContext(ctx)
10373	if err != nil {
10374		iter.i--
10375		return err
10376	}
10377	iter.i = 0
10378	return nil
10379}
10380
10381// Next advances to the next value.  If there was an error making
10382// the request the iterator does not advance and the error is returned.
10383// Deprecated: Use NextWithContext() instead.
10384func (iter *ExpressRouteServiceProviderListResultIterator) Next() error {
10385	return iter.NextWithContext(context.Background())
10386}
10387
10388// NotDone returns true if the enumeration should be started or is not yet complete.
10389func (iter ExpressRouteServiceProviderListResultIterator) NotDone() bool {
10390	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10391}
10392
10393// Response returns the raw server response from the last page request.
10394func (iter ExpressRouteServiceProviderListResultIterator) Response() ExpressRouteServiceProviderListResult {
10395	return iter.page.Response()
10396}
10397
10398// Value returns the current value or a zero-initialized value if the
10399// iterator has advanced beyond the end of the collection.
10400func (iter ExpressRouteServiceProviderListResultIterator) Value() ExpressRouteServiceProvider {
10401	if !iter.page.NotDone() {
10402		return ExpressRouteServiceProvider{}
10403	}
10404	return iter.page.Values()[iter.i]
10405}
10406
10407// Creates a new instance of the ExpressRouteServiceProviderListResultIterator type.
10408func NewExpressRouteServiceProviderListResultIterator(page ExpressRouteServiceProviderListResultPage) ExpressRouteServiceProviderListResultIterator {
10409	return ExpressRouteServiceProviderListResultIterator{page: page}
10410}
10411
10412// IsEmpty returns true if the ListResult contains no values.
10413func (ersplr ExpressRouteServiceProviderListResult) IsEmpty() bool {
10414	return ersplr.Value == nil || len(*ersplr.Value) == 0
10415}
10416
10417// hasNextLink returns true if the NextLink is not empty.
10418func (ersplr ExpressRouteServiceProviderListResult) hasNextLink() bool {
10419	return ersplr.NextLink != nil && len(*ersplr.NextLink) != 0
10420}
10421
10422// expressRouteServiceProviderListResultPreparer prepares a request to retrieve the next set of results.
10423// It returns nil if no more results exist.
10424func (ersplr ExpressRouteServiceProviderListResult) expressRouteServiceProviderListResultPreparer(ctx context.Context) (*http.Request, error) {
10425	if !ersplr.hasNextLink() {
10426		return nil, nil
10427	}
10428	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10429		autorest.AsJSON(),
10430		autorest.AsGet(),
10431		autorest.WithBaseURL(to.String(ersplr.NextLink)))
10432}
10433
10434// ExpressRouteServiceProviderListResultPage contains a page of ExpressRouteServiceProvider values.
10435type ExpressRouteServiceProviderListResultPage struct {
10436	fn     func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)
10437	ersplr ExpressRouteServiceProviderListResult
10438}
10439
10440// NextWithContext advances to the next page of values.  If there was an error making
10441// the request the page does not advance and the error is returned.
10442func (page *ExpressRouteServiceProviderListResultPage) NextWithContext(ctx context.Context) (err error) {
10443	if tracing.IsEnabled() {
10444		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultPage.NextWithContext")
10445		defer func() {
10446			sc := -1
10447			if page.Response().Response.Response != nil {
10448				sc = page.Response().Response.Response.StatusCode
10449			}
10450			tracing.EndSpan(ctx, sc, err)
10451		}()
10452	}
10453	for {
10454		next, err := page.fn(ctx, page.ersplr)
10455		if err != nil {
10456			return err
10457		}
10458		page.ersplr = next
10459		if !next.hasNextLink() || !next.IsEmpty() {
10460			break
10461		}
10462	}
10463	return nil
10464}
10465
10466// Next advances to the next page of values.  If there was an error making
10467// the request the page does not advance and the error is returned.
10468// Deprecated: Use NextWithContext() instead.
10469func (page *ExpressRouteServiceProviderListResultPage) Next() error {
10470	return page.NextWithContext(context.Background())
10471}
10472
10473// NotDone returns true if the page enumeration should be started or is not yet complete.
10474func (page ExpressRouteServiceProviderListResultPage) NotDone() bool {
10475	return !page.ersplr.IsEmpty()
10476}
10477
10478// Response returns the raw server response from the last page request.
10479func (page ExpressRouteServiceProviderListResultPage) Response() ExpressRouteServiceProviderListResult {
10480	return page.ersplr
10481}
10482
10483// Values returns the slice of values for the current page or nil if there are no values.
10484func (page ExpressRouteServiceProviderListResultPage) Values() []ExpressRouteServiceProvider {
10485	if page.ersplr.IsEmpty() {
10486		return nil
10487	}
10488	return *page.ersplr.Value
10489}
10490
10491// Creates a new instance of the ExpressRouteServiceProviderListResultPage type.
10492func NewExpressRouteServiceProviderListResultPage(cur ExpressRouteServiceProviderListResult, getNextPage func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)) ExpressRouteServiceProviderListResultPage {
10493	return ExpressRouteServiceProviderListResultPage{
10494		fn:     getNextPage,
10495		ersplr: cur,
10496	}
10497}
10498
10499// ExpressRouteServiceProviderPropertiesFormat properties of ExpressRouteServiceProvider.
10500type ExpressRouteServiceProviderPropertiesFormat struct {
10501	// PeeringLocations - Get a list of peering locations.
10502	PeeringLocations *[]string `json:"peeringLocations,omitempty"`
10503	// BandwidthsOffered - Gets bandwidths offered.
10504	BandwidthsOffered *[]ExpressRouteServiceProviderBandwidthsOffered `json:"bandwidthsOffered,omitempty"`
10505	// ProvisioningState - Gets the provisioning state of the resource.
10506	ProvisioningState *string `json:"provisioningState,omitempty"`
10507}
10508
10509// FlowLogFormatParameters parameters that define the flow log format.
10510type FlowLogFormatParameters struct {
10511	// Type - The file type of flow log. Possible values include: 'JSON'
10512	Type FlowLogFormatType `json:"type,omitempty"`
10513	// Version - The version (revision) of the flow log.
10514	Version *int32 `json:"version,omitempty"`
10515}
10516
10517// FlowLogInformation information on the configuration of flow log and traffic analytics (optional) .
10518type FlowLogInformation struct {
10519	autorest.Response `json:"-"`
10520	// TargetResourceID - The ID of the resource to configure for flow log and traffic analytics (optional) .
10521	TargetResourceID *string `json:"targetResourceId,omitempty"`
10522	// FlowLogProperties - Properties of the flow log.
10523	*FlowLogProperties `json:"properties,omitempty"`
10524	// FlowAnalyticsConfiguration - Parameters that define the configuration of traffic analytics.
10525	FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"`
10526}
10527
10528// MarshalJSON is the custom marshaler for FlowLogInformation.
10529func (fli FlowLogInformation) MarshalJSON() ([]byte, error) {
10530	objectMap := make(map[string]interface{})
10531	if fli.TargetResourceID != nil {
10532		objectMap["targetResourceId"] = fli.TargetResourceID
10533	}
10534	if fli.FlowLogProperties != nil {
10535		objectMap["properties"] = fli.FlowLogProperties
10536	}
10537	if fli.FlowAnalyticsConfiguration != nil {
10538		objectMap["flowAnalyticsConfiguration"] = fli.FlowAnalyticsConfiguration
10539	}
10540	return json.Marshal(objectMap)
10541}
10542
10543// UnmarshalJSON is the custom unmarshaler for FlowLogInformation struct.
10544func (fli *FlowLogInformation) UnmarshalJSON(body []byte) error {
10545	var m map[string]*json.RawMessage
10546	err := json.Unmarshal(body, &m)
10547	if err != nil {
10548		return err
10549	}
10550	for k, v := range m {
10551		switch k {
10552		case "targetResourceId":
10553			if v != nil {
10554				var targetResourceID string
10555				err = json.Unmarshal(*v, &targetResourceID)
10556				if err != nil {
10557					return err
10558				}
10559				fli.TargetResourceID = &targetResourceID
10560			}
10561		case "properties":
10562			if v != nil {
10563				var flowLogProperties FlowLogProperties
10564				err = json.Unmarshal(*v, &flowLogProperties)
10565				if err != nil {
10566					return err
10567				}
10568				fli.FlowLogProperties = &flowLogProperties
10569			}
10570		case "flowAnalyticsConfiguration":
10571			if v != nil {
10572				var flowAnalyticsConfiguration TrafficAnalyticsProperties
10573				err = json.Unmarshal(*v, &flowAnalyticsConfiguration)
10574				if err != nil {
10575					return err
10576				}
10577				fli.FlowAnalyticsConfiguration = &flowAnalyticsConfiguration
10578			}
10579		}
10580	}
10581
10582	return nil
10583}
10584
10585// FlowLogProperties parameters that define the configuration of flow log.
10586type FlowLogProperties struct {
10587	// StorageID - ID of the storage account which is used to store the flow log.
10588	StorageID *string `json:"storageId,omitempty"`
10589	// Enabled - Flag to enable/disable flow logging.
10590	Enabled *bool `json:"enabled,omitempty"`
10591	// RetentionPolicy - Parameters that define the retention policy for flow log.
10592	RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"`
10593	// Format - Parameters that define the flow log format.
10594	Format *FlowLogFormatParameters `json:"format,omitempty"`
10595}
10596
10597// FlowLogStatusParameters parameters that define a resource to query flow log and traffic analytics
10598// (optional) status.
10599type FlowLogStatusParameters struct {
10600	// TargetResourceID - The target resource where getting the flow log and traffic analytics (optional) status.
10601	TargetResourceID *string `json:"targetResourceId,omitempty"`
10602}
10603
10604// FrontendIPConfiguration frontend IP address of the load balancer.
10605type FrontendIPConfiguration struct {
10606	autorest.Response `json:"-"`
10607	// FrontendIPConfigurationPropertiesFormat - Properties of the load balancer probe.
10608	*FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"`
10609	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
10610	Name *string `json:"name,omitempty"`
10611	// Etag - A unique read-only string that changes whenever the resource is updated.
10612	Etag *string `json:"etag,omitempty"`
10613	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
10614	Zones *[]string `json:"zones,omitempty"`
10615	// ID - Resource ID.
10616	ID *string `json:"id,omitempty"`
10617}
10618
10619// MarshalJSON is the custom marshaler for FrontendIPConfiguration.
10620func (fic FrontendIPConfiguration) MarshalJSON() ([]byte, error) {
10621	objectMap := make(map[string]interface{})
10622	if fic.FrontendIPConfigurationPropertiesFormat != nil {
10623		objectMap["properties"] = fic.FrontendIPConfigurationPropertiesFormat
10624	}
10625	if fic.Name != nil {
10626		objectMap["name"] = fic.Name
10627	}
10628	if fic.Etag != nil {
10629		objectMap["etag"] = fic.Etag
10630	}
10631	if fic.Zones != nil {
10632		objectMap["zones"] = fic.Zones
10633	}
10634	if fic.ID != nil {
10635		objectMap["id"] = fic.ID
10636	}
10637	return json.Marshal(objectMap)
10638}
10639
10640// UnmarshalJSON is the custom unmarshaler for FrontendIPConfiguration struct.
10641func (fic *FrontendIPConfiguration) UnmarshalJSON(body []byte) error {
10642	var m map[string]*json.RawMessage
10643	err := json.Unmarshal(body, &m)
10644	if err != nil {
10645		return err
10646	}
10647	for k, v := range m {
10648		switch k {
10649		case "properties":
10650			if v != nil {
10651				var frontendIPConfigurationPropertiesFormat FrontendIPConfigurationPropertiesFormat
10652				err = json.Unmarshal(*v, &frontendIPConfigurationPropertiesFormat)
10653				if err != nil {
10654					return err
10655				}
10656				fic.FrontendIPConfigurationPropertiesFormat = &frontendIPConfigurationPropertiesFormat
10657			}
10658		case "name":
10659			if v != nil {
10660				var name string
10661				err = json.Unmarshal(*v, &name)
10662				if err != nil {
10663					return err
10664				}
10665				fic.Name = &name
10666			}
10667		case "etag":
10668			if v != nil {
10669				var etag string
10670				err = json.Unmarshal(*v, &etag)
10671				if err != nil {
10672					return err
10673				}
10674				fic.Etag = &etag
10675			}
10676		case "zones":
10677			if v != nil {
10678				var zones []string
10679				err = json.Unmarshal(*v, &zones)
10680				if err != nil {
10681					return err
10682				}
10683				fic.Zones = &zones
10684			}
10685		case "id":
10686			if v != nil {
10687				var ID string
10688				err = json.Unmarshal(*v, &ID)
10689				if err != nil {
10690					return err
10691				}
10692				fic.ID = &ID
10693			}
10694		}
10695	}
10696
10697	return nil
10698}
10699
10700// FrontendIPConfigurationPropertiesFormat properties of Frontend IP Configuration of the load balancer.
10701type FrontendIPConfigurationPropertiesFormat struct {
10702	// InboundNatRules - READ-ONLY; Read only. Inbound rules URIs that use this frontend IP.
10703	InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"`
10704	// InboundNatPools - READ-ONLY; Read only. Inbound pools URIs that use this frontend IP.
10705	InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"`
10706	// OutboundRules - READ-ONLY; Read only. Outbound rules URIs that use this frontend IP.
10707	OutboundRules *[]SubResource `json:"outboundRules,omitempty"`
10708	// LoadBalancingRules - READ-ONLY; Gets load balancing rules URIs that use this frontend IP.
10709	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
10710	// PrivateIPAddress - The private IP address of the IP configuration.
10711	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
10712	// PrivateIPAllocationMethod - The Private IP allocation method. Possible values include: 'Static', 'Dynamic'
10713	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
10714	// Subnet - The reference of the subnet resource.
10715	Subnet *Subnet `json:"subnet,omitempty"`
10716	// PublicIPAddress - The reference of the Public IP resource.
10717	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
10718	// PublicIPPrefix - The reference of the Public IP Prefix resource.
10719	PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"`
10720	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
10721	ProvisioningState *string `json:"provisioningState,omitempty"`
10722}
10723
10724// MarshalJSON is the custom marshaler for FrontendIPConfigurationPropertiesFormat.
10725func (ficpf FrontendIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
10726	objectMap := make(map[string]interface{})
10727	if ficpf.PrivateIPAddress != nil {
10728		objectMap["privateIPAddress"] = ficpf.PrivateIPAddress
10729	}
10730	if ficpf.PrivateIPAllocationMethod != "" {
10731		objectMap["privateIPAllocationMethod"] = ficpf.PrivateIPAllocationMethod
10732	}
10733	if ficpf.Subnet != nil {
10734		objectMap["subnet"] = ficpf.Subnet
10735	}
10736	if ficpf.PublicIPAddress != nil {
10737		objectMap["publicIPAddress"] = ficpf.PublicIPAddress
10738	}
10739	if ficpf.PublicIPPrefix != nil {
10740		objectMap["publicIPPrefix"] = ficpf.PublicIPPrefix
10741	}
10742	if ficpf.ProvisioningState != nil {
10743		objectMap["provisioningState"] = ficpf.ProvisioningState
10744	}
10745	return json.Marshal(objectMap)
10746}
10747
10748// GatewayRoute gateway routing details
10749type GatewayRoute struct {
10750	// LocalAddress - READ-ONLY; The gateway's local address
10751	LocalAddress *string `json:"localAddress,omitempty"`
10752	// NetworkProperty - READ-ONLY; The route's network prefix
10753	NetworkProperty *string `json:"network,omitempty"`
10754	// NextHop - READ-ONLY; The route's next hop
10755	NextHop *string `json:"nextHop,omitempty"`
10756	// SourcePeer - READ-ONLY; The peer this route was learned from
10757	SourcePeer *string `json:"sourcePeer,omitempty"`
10758	// Origin - READ-ONLY; The source this route was learned from
10759	Origin *string `json:"origin,omitempty"`
10760	// AsPath - READ-ONLY; The route's AS path sequence
10761	AsPath *string `json:"asPath,omitempty"`
10762	// Weight - READ-ONLY; The route's weight
10763	Weight *int32 `json:"weight,omitempty"`
10764}
10765
10766// GatewayRouteListResult list of virtual network gateway routes
10767type GatewayRouteListResult struct {
10768	autorest.Response `json:"-"`
10769	// Value - List of gateway routes
10770	Value *[]GatewayRoute `json:"value,omitempty"`
10771}
10772
10773// GetVpnSitesConfigurationRequest list of Vpn-Sites
10774type GetVpnSitesConfigurationRequest struct {
10775	// VpnSites - List of resource-ids of the vpn-sites for which config is to be downloaded.
10776	VpnSites *[]string `json:"vpnSites,omitempty"`
10777	// OutputBlobSasURL - The sas-url to download the configurations for vpn-sites
10778	OutputBlobSasURL *string `json:"outputBlobSasUrl,omitempty"`
10779}
10780
10781// HTTPConfiguration HTTP configuration of the connectivity check.
10782type HTTPConfiguration struct {
10783	// Method - HTTP method. Possible values include: 'Get'
10784	Method HTTPMethod `json:"method,omitempty"`
10785	// Headers - List of HTTP headers.
10786	Headers *[]HTTPHeader `json:"headers,omitempty"`
10787	// ValidStatusCodes - Valid status codes.
10788	ValidStatusCodes *[]int32 `json:"validStatusCodes,omitempty"`
10789}
10790
10791// HTTPHeader describes the HTTP header.
10792type HTTPHeader struct {
10793	// Name - The name in HTTP header.
10794	Name *string `json:"name,omitempty"`
10795	// Value - The value in HTTP header.
10796	Value *string `json:"value,omitempty"`
10797}
10798
10799// HubVirtualNetworkConnection hubVirtualNetworkConnection Resource.
10800type HubVirtualNetworkConnection struct {
10801	autorest.Response `json:"-"`
10802	// HubVirtualNetworkConnectionProperties - Properties of the hub virtual network connection.
10803	*HubVirtualNetworkConnectionProperties `json:"properties,omitempty"`
10804	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
10805	Name *string `json:"name,omitempty"`
10806	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
10807	Etag *string `json:"etag,omitempty"`
10808	// ID - Resource ID.
10809	ID *string `json:"id,omitempty"`
10810}
10811
10812// MarshalJSON is the custom marshaler for HubVirtualNetworkConnection.
10813func (hvnc HubVirtualNetworkConnection) MarshalJSON() ([]byte, error) {
10814	objectMap := make(map[string]interface{})
10815	if hvnc.HubVirtualNetworkConnectionProperties != nil {
10816		objectMap["properties"] = hvnc.HubVirtualNetworkConnectionProperties
10817	}
10818	if hvnc.Name != nil {
10819		objectMap["name"] = hvnc.Name
10820	}
10821	if hvnc.ID != nil {
10822		objectMap["id"] = hvnc.ID
10823	}
10824	return json.Marshal(objectMap)
10825}
10826
10827// UnmarshalJSON is the custom unmarshaler for HubVirtualNetworkConnection struct.
10828func (hvnc *HubVirtualNetworkConnection) UnmarshalJSON(body []byte) error {
10829	var m map[string]*json.RawMessage
10830	err := json.Unmarshal(body, &m)
10831	if err != nil {
10832		return err
10833	}
10834	for k, v := range m {
10835		switch k {
10836		case "properties":
10837			if v != nil {
10838				var hubVirtualNetworkConnectionProperties HubVirtualNetworkConnectionProperties
10839				err = json.Unmarshal(*v, &hubVirtualNetworkConnectionProperties)
10840				if err != nil {
10841					return err
10842				}
10843				hvnc.HubVirtualNetworkConnectionProperties = &hubVirtualNetworkConnectionProperties
10844			}
10845		case "name":
10846			if v != nil {
10847				var name string
10848				err = json.Unmarshal(*v, &name)
10849				if err != nil {
10850					return err
10851				}
10852				hvnc.Name = &name
10853			}
10854		case "etag":
10855			if v != nil {
10856				var etag string
10857				err = json.Unmarshal(*v, &etag)
10858				if err != nil {
10859					return err
10860				}
10861				hvnc.Etag = &etag
10862			}
10863		case "id":
10864			if v != nil {
10865				var ID string
10866				err = json.Unmarshal(*v, &ID)
10867				if err != nil {
10868					return err
10869				}
10870				hvnc.ID = &ID
10871			}
10872		}
10873	}
10874
10875	return nil
10876}
10877
10878// HubVirtualNetworkConnectionProperties parameters for HubVirtualNetworkConnection
10879type HubVirtualNetworkConnectionProperties struct {
10880	// RemoteVirtualNetwork - Reference to the remote virtual network.
10881	RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"`
10882	// AllowHubToRemoteVnetTransit - VirtualHub to RemoteVnet transit to enabled or not.
10883	AllowHubToRemoteVnetTransit *bool `json:"allowHubToRemoteVnetTransit,omitempty"`
10884	// AllowRemoteVnetToUseHubVnetGateways - Allow RemoteVnet to use Virtual Hub's gateways.
10885	AllowRemoteVnetToUseHubVnetGateways *bool `json:"allowRemoteVnetToUseHubVnetGateways,omitempty"`
10886	// EnableInternetSecurity - Enable internet security
10887	EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"`
10888	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
10889	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
10890}
10891
10892// InboundNatPool inbound NAT pool of the load balancer.
10893type InboundNatPool struct {
10894	// InboundNatPoolPropertiesFormat - Properties of load balancer inbound nat pool.
10895	*InboundNatPoolPropertiesFormat `json:"properties,omitempty"`
10896	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
10897	Name *string `json:"name,omitempty"`
10898	// Etag - A unique read-only string that changes whenever the resource is updated.
10899	Etag *string `json:"etag,omitempty"`
10900	// ID - Resource ID.
10901	ID *string `json:"id,omitempty"`
10902}
10903
10904// MarshalJSON is the custom marshaler for InboundNatPool.
10905func (inp InboundNatPool) MarshalJSON() ([]byte, error) {
10906	objectMap := make(map[string]interface{})
10907	if inp.InboundNatPoolPropertiesFormat != nil {
10908		objectMap["properties"] = inp.InboundNatPoolPropertiesFormat
10909	}
10910	if inp.Name != nil {
10911		objectMap["name"] = inp.Name
10912	}
10913	if inp.Etag != nil {
10914		objectMap["etag"] = inp.Etag
10915	}
10916	if inp.ID != nil {
10917		objectMap["id"] = inp.ID
10918	}
10919	return json.Marshal(objectMap)
10920}
10921
10922// UnmarshalJSON is the custom unmarshaler for InboundNatPool struct.
10923func (inp *InboundNatPool) UnmarshalJSON(body []byte) error {
10924	var m map[string]*json.RawMessage
10925	err := json.Unmarshal(body, &m)
10926	if err != nil {
10927		return err
10928	}
10929	for k, v := range m {
10930		switch k {
10931		case "properties":
10932			if v != nil {
10933				var inboundNatPoolPropertiesFormat InboundNatPoolPropertiesFormat
10934				err = json.Unmarshal(*v, &inboundNatPoolPropertiesFormat)
10935				if err != nil {
10936					return err
10937				}
10938				inp.InboundNatPoolPropertiesFormat = &inboundNatPoolPropertiesFormat
10939			}
10940		case "name":
10941			if v != nil {
10942				var name string
10943				err = json.Unmarshal(*v, &name)
10944				if err != nil {
10945					return err
10946				}
10947				inp.Name = &name
10948			}
10949		case "etag":
10950			if v != nil {
10951				var etag string
10952				err = json.Unmarshal(*v, &etag)
10953				if err != nil {
10954					return err
10955				}
10956				inp.Etag = &etag
10957			}
10958		case "id":
10959			if v != nil {
10960				var ID string
10961				err = json.Unmarshal(*v, &ID)
10962				if err != nil {
10963					return err
10964				}
10965				inp.ID = &ID
10966			}
10967		}
10968	}
10969
10970	return nil
10971}
10972
10973// InboundNatPoolPropertiesFormat properties of Inbound NAT pool.
10974type InboundNatPoolPropertiesFormat struct {
10975	// FrontendIPConfiguration - A reference to frontend IP addresses.
10976	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
10977	// Protocol - The reference to the transport protocol used by the inbound NAT pool. Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
10978	Protocol TransportProtocol `json:"protocol,omitempty"`
10979	// 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.
10980	FrontendPortRangeStart *int32 `json:"frontendPortRangeStart,omitempty"`
10981	// 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.
10982	FrontendPortRangeEnd *int32 `json:"frontendPortRangeEnd,omitempty"`
10983	// BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 1 and 65535.
10984	BackendPort *int32 `json:"backendPort,omitempty"`
10985	// 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.
10986	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
10987	// 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.
10988	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
10989	// EnableTCPReset - Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP.
10990	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
10991	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
10992	ProvisioningState *string `json:"provisioningState,omitempty"`
10993}
10994
10995// InboundNatRule inbound NAT rule of the load balancer.
10996type InboundNatRule struct {
10997	autorest.Response `json:"-"`
10998	// InboundNatRulePropertiesFormat - Properties of load balancer inbound nat rule.
10999	*InboundNatRulePropertiesFormat `json:"properties,omitempty"`
11000	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
11001	Name *string `json:"name,omitempty"`
11002	// Etag - A unique read-only string that changes whenever the resource is updated.
11003	Etag *string `json:"etag,omitempty"`
11004	// ID - Resource ID.
11005	ID *string `json:"id,omitempty"`
11006}
11007
11008// MarshalJSON is the custom marshaler for InboundNatRule.
11009func (inr InboundNatRule) MarshalJSON() ([]byte, error) {
11010	objectMap := make(map[string]interface{})
11011	if inr.InboundNatRulePropertiesFormat != nil {
11012		objectMap["properties"] = inr.InboundNatRulePropertiesFormat
11013	}
11014	if inr.Name != nil {
11015		objectMap["name"] = inr.Name
11016	}
11017	if inr.Etag != nil {
11018		objectMap["etag"] = inr.Etag
11019	}
11020	if inr.ID != nil {
11021		objectMap["id"] = inr.ID
11022	}
11023	return json.Marshal(objectMap)
11024}
11025
11026// UnmarshalJSON is the custom unmarshaler for InboundNatRule struct.
11027func (inr *InboundNatRule) UnmarshalJSON(body []byte) error {
11028	var m map[string]*json.RawMessage
11029	err := json.Unmarshal(body, &m)
11030	if err != nil {
11031		return err
11032	}
11033	for k, v := range m {
11034		switch k {
11035		case "properties":
11036			if v != nil {
11037				var inboundNatRulePropertiesFormat InboundNatRulePropertiesFormat
11038				err = json.Unmarshal(*v, &inboundNatRulePropertiesFormat)
11039				if err != nil {
11040					return err
11041				}
11042				inr.InboundNatRulePropertiesFormat = &inboundNatRulePropertiesFormat
11043			}
11044		case "name":
11045			if v != nil {
11046				var name string
11047				err = json.Unmarshal(*v, &name)
11048				if err != nil {
11049					return err
11050				}
11051				inr.Name = &name
11052			}
11053		case "etag":
11054			if v != nil {
11055				var etag string
11056				err = json.Unmarshal(*v, &etag)
11057				if err != nil {
11058					return err
11059				}
11060				inr.Etag = &etag
11061			}
11062		case "id":
11063			if v != nil {
11064				var ID string
11065				err = json.Unmarshal(*v, &ID)
11066				if err != nil {
11067					return err
11068				}
11069				inr.ID = &ID
11070			}
11071		}
11072	}
11073
11074	return nil
11075}
11076
11077// InboundNatRuleListResult response for ListInboundNatRule API service call.
11078type InboundNatRuleListResult struct {
11079	autorest.Response `json:"-"`
11080	// Value - A list of inbound nat rules in a load balancer.
11081	Value *[]InboundNatRule `json:"value,omitempty"`
11082	// NextLink - READ-ONLY; The URL to get the next set of results.
11083	NextLink *string `json:"nextLink,omitempty"`
11084}
11085
11086// MarshalJSON is the custom marshaler for InboundNatRuleListResult.
11087func (inrlr InboundNatRuleListResult) MarshalJSON() ([]byte, error) {
11088	objectMap := make(map[string]interface{})
11089	if inrlr.Value != nil {
11090		objectMap["value"] = inrlr.Value
11091	}
11092	return json.Marshal(objectMap)
11093}
11094
11095// InboundNatRuleListResultIterator provides access to a complete listing of InboundNatRule values.
11096type InboundNatRuleListResultIterator struct {
11097	i    int
11098	page InboundNatRuleListResultPage
11099}
11100
11101// NextWithContext advances to the next value.  If there was an error making
11102// the request the iterator does not advance and the error is returned.
11103func (iter *InboundNatRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
11104	if tracing.IsEnabled() {
11105		ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultIterator.NextWithContext")
11106		defer func() {
11107			sc := -1
11108			if iter.Response().Response.Response != nil {
11109				sc = iter.Response().Response.Response.StatusCode
11110			}
11111			tracing.EndSpan(ctx, sc, err)
11112		}()
11113	}
11114	iter.i++
11115	if iter.i < len(iter.page.Values()) {
11116		return nil
11117	}
11118	err = iter.page.NextWithContext(ctx)
11119	if err != nil {
11120		iter.i--
11121		return err
11122	}
11123	iter.i = 0
11124	return nil
11125}
11126
11127// Next advances to the next value.  If there was an error making
11128// the request the iterator does not advance and the error is returned.
11129// Deprecated: Use NextWithContext() instead.
11130func (iter *InboundNatRuleListResultIterator) Next() error {
11131	return iter.NextWithContext(context.Background())
11132}
11133
11134// NotDone returns true if the enumeration should be started or is not yet complete.
11135func (iter InboundNatRuleListResultIterator) NotDone() bool {
11136	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11137}
11138
11139// Response returns the raw server response from the last page request.
11140func (iter InboundNatRuleListResultIterator) Response() InboundNatRuleListResult {
11141	return iter.page.Response()
11142}
11143
11144// Value returns the current value or a zero-initialized value if the
11145// iterator has advanced beyond the end of the collection.
11146func (iter InboundNatRuleListResultIterator) Value() InboundNatRule {
11147	if !iter.page.NotDone() {
11148		return InboundNatRule{}
11149	}
11150	return iter.page.Values()[iter.i]
11151}
11152
11153// Creates a new instance of the InboundNatRuleListResultIterator type.
11154func NewInboundNatRuleListResultIterator(page InboundNatRuleListResultPage) InboundNatRuleListResultIterator {
11155	return InboundNatRuleListResultIterator{page: page}
11156}
11157
11158// IsEmpty returns true if the ListResult contains no values.
11159func (inrlr InboundNatRuleListResult) IsEmpty() bool {
11160	return inrlr.Value == nil || len(*inrlr.Value) == 0
11161}
11162
11163// hasNextLink returns true if the NextLink is not empty.
11164func (inrlr InboundNatRuleListResult) hasNextLink() bool {
11165	return inrlr.NextLink != nil && len(*inrlr.NextLink) != 0
11166}
11167
11168// inboundNatRuleListResultPreparer prepares a request to retrieve the next set of results.
11169// It returns nil if no more results exist.
11170func (inrlr InboundNatRuleListResult) inboundNatRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
11171	if !inrlr.hasNextLink() {
11172		return nil, nil
11173	}
11174	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11175		autorest.AsJSON(),
11176		autorest.AsGet(),
11177		autorest.WithBaseURL(to.String(inrlr.NextLink)))
11178}
11179
11180// InboundNatRuleListResultPage contains a page of InboundNatRule values.
11181type InboundNatRuleListResultPage struct {
11182	fn    func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)
11183	inrlr InboundNatRuleListResult
11184}
11185
11186// NextWithContext advances to the next page of values.  If there was an error making
11187// the request the page does not advance and the error is returned.
11188func (page *InboundNatRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
11189	if tracing.IsEnabled() {
11190		ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultPage.NextWithContext")
11191		defer func() {
11192			sc := -1
11193			if page.Response().Response.Response != nil {
11194				sc = page.Response().Response.Response.StatusCode
11195			}
11196			tracing.EndSpan(ctx, sc, err)
11197		}()
11198	}
11199	for {
11200		next, err := page.fn(ctx, page.inrlr)
11201		if err != nil {
11202			return err
11203		}
11204		page.inrlr = next
11205		if !next.hasNextLink() || !next.IsEmpty() {
11206			break
11207		}
11208	}
11209	return nil
11210}
11211
11212// Next advances to the next page of values.  If there was an error making
11213// the request the page does not advance and the error is returned.
11214// Deprecated: Use NextWithContext() instead.
11215func (page *InboundNatRuleListResultPage) Next() error {
11216	return page.NextWithContext(context.Background())
11217}
11218
11219// NotDone returns true if the page enumeration should be started or is not yet complete.
11220func (page InboundNatRuleListResultPage) NotDone() bool {
11221	return !page.inrlr.IsEmpty()
11222}
11223
11224// Response returns the raw server response from the last page request.
11225func (page InboundNatRuleListResultPage) Response() InboundNatRuleListResult {
11226	return page.inrlr
11227}
11228
11229// Values returns the slice of values for the current page or nil if there are no values.
11230func (page InboundNatRuleListResultPage) Values() []InboundNatRule {
11231	if page.inrlr.IsEmpty() {
11232		return nil
11233	}
11234	return *page.inrlr.Value
11235}
11236
11237// Creates a new instance of the InboundNatRuleListResultPage type.
11238func NewInboundNatRuleListResultPage(cur InboundNatRuleListResult, getNextPage func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)) InboundNatRuleListResultPage {
11239	return InboundNatRuleListResultPage{
11240		fn:    getNextPage,
11241		inrlr: cur,
11242	}
11243}
11244
11245// InboundNatRulePropertiesFormat properties of the inbound NAT rule.
11246type InboundNatRulePropertiesFormat struct {
11247	// FrontendIPConfiguration - A reference to frontend IP addresses.
11248	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
11249	// 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.
11250	BackendIPConfiguration *InterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"`
11251	// Protocol - The reference to the transport protocol used by the load balancing rule. Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
11252	Protocol TransportProtocol `json:"protocol,omitempty"`
11253	// 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.
11254	FrontendPort *int32 `json:"frontendPort,omitempty"`
11255	// BackendPort - The port used for the internal endpoint. Acceptable values range from 1 to 65535.
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	// EnableTCPReset - Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP.
11262	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
11263	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
11264	ProvisioningState *string `json:"provisioningState,omitempty"`
11265}
11266
11267// MarshalJSON is the custom marshaler for InboundNatRulePropertiesFormat.
11268func (inrpf InboundNatRulePropertiesFormat) MarshalJSON() ([]byte, error) {
11269	objectMap := make(map[string]interface{})
11270	if inrpf.FrontendIPConfiguration != nil {
11271		objectMap["frontendIPConfiguration"] = inrpf.FrontendIPConfiguration
11272	}
11273	if inrpf.Protocol != "" {
11274		objectMap["protocol"] = inrpf.Protocol
11275	}
11276	if inrpf.FrontendPort != nil {
11277		objectMap["frontendPort"] = inrpf.FrontendPort
11278	}
11279	if inrpf.BackendPort != nil {
11280		objectMap["backendPort"] = inrpf.BackendPort
11281	}
11282	if inrpf.IdleTimeoutInMinutes != nil {
11283		objectMap["idleTimeoutInMinutes"] = inrpf.IdleTimeoutInMinutes
11284	}
11285	if inrpf.EnableFloatingIP != nil {
11286		objectMap["enableFloatingIP"] = inrpf.EnableFloatingIP
11287	}
11288	if inrpf.EnableTCPReset != nil {
11289		objectMap["enableTcpReset"] = inrpf.EnableTCPReset
11290	}
11291	if inrpf.ProvisioningState != nil {
11292		objectMap["provisioningState"] = inrpf.ProvisioningState
11293	}
11294	return json.Marshal(objectMap)
11295}
11296
11297// InboundNatRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
11298// long-running operation.
11299type InboundNatRulesCreateOrUpdateFuture struct {
11300	azure.FutureAPI
11301	// Result returns the result of the asynchronous operation.
11302	// If the operation has not completed it will return an error.
11303	Result func(InboundNatRulesClient) (InboundNatRule, error)
11304}
11305
11306// InboundNatRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
11307// operation.
11308type InboundNatRulesDeleteFuture struct {
11309	azure.FutureAPI
11310	// Result returns the result of the asynchronous operation.
11311	// If the operation has not completed it will return an error.
11312	Result func(InboundNatRulesClient) (autorest.Response, error)
11313}
11314
11315// IntentPolicy network Intent Policy resource.
11316type IntentPolicy struct {
11317	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
11318	Etag *string `json:"etag,omitempty"`
11319	// ID - Resource ID.
11320	ID *string `json:"id,omitempty"`
11321	// Name - READ-ONLY; Resource name.
11322	Name *string `json:"name,omitempty"`
11323	// Type - READ-ONLY; Resource type.
11324	Type *string `json:"type,omitempty"`
11325	// Location - Resource location.
11326	Location *string `json:"location,omitempty"`
11327	// Tags - Resource tags.
11328	Tags map[string]*string `json:"tags"`
11329}
11330
11331// MarshalJSON is the custom marshaler for IntentPolicy.
11332func (IP IntentPolicy) MarshalJSON() ([]byte, error) {
11333	objectMap := make(map[string]interface{})
11334	if IP.Etag != nil {
11335		objectMap["etag"] = IP.Etag
11336	}
11337	if IP.ID != nil {
11338		objectMap["id"] = IP.ID
11339	}
11340	if IP.Location != nil {
11341		objectMap["location"] = IP.Location
11342	}
11343	if IP.Tags != nil {
11344		objectMap["tags"] = IP.Tags
11345	}
11346	return json.Marshal(objectMap)
11347}
11348
11349// IntentPolicyConfiguration details of NetworkIntentPolicyConfiguration for PrepareNetworkPoliciesRequest.
11350type IntentPolicyConfiguration struct {
11351	// NetworkIntentPolicyName - The name of the Network Intent Policy for storing in target subscription.
11352	NetworkIntentPolicyName *string `json:"networkIntentPolicyName,omitempty"`
11353	// SourceNetworkIntentPolicy - Source network intent policy.
11354	SourceNetworkIntentPolicy *IntentPolicy `json:"sourceNetworkIntentPolicy,omitempty"`
11355}
11356
11357// Interface a network interface in a resource group.
11358type Interface struct {
11359	autorest.Response `json:"-"`
11360	// InterfacePropertiesFormat - Properties of the network interface.
11361	*InterfacePropertiesFormat `json:"properties,omitempty"`
11362	// Etag - A unique read-only string that changes whenever the resource is updated.
11363	Etag *string `json:"etag,omitempty"`
11364	// ID - Resource ID.
11365	ID *string `json:"id,omitempty"`
11366	// Name - READ-ONLY; Resource name.
11367	Name *string `json:"name,omitempty"`
11368	// Type - READ-ONLY; Resource type.
11369	Type *string `json:"type,omitempty"`
11370	// Location - Resource location.
11371	Location *string `json:"location,omitempty"`
11372	// Tags - Resource tags.
11373	Tags map[string]*string `json:"tags"`
11374}
11375
11376// MarshalJSON is the custom marshaler for Interface.
11377func (i Interface) MarshalJSON() ([]byte, error) {
11378	objectMap := make(map[string]interface{})
11379	if i.InterfacePropertiesFormat != nil {
11380		objectMap["properties"] = i.InterfacePropertiesFormat
11381	}
11382	if i.Etag != nil {
11383		objectMap["etag"] = i.Etag
11384	}
11385	if i.ID != nil {
11386		objectMap["id"] = i.ID
11387	}
11388	if i.Location != nil {
11389		objectMap["location"] = i.Location
11390	}
11391	if i.Tags != nil {
11392		objectMap["tags"] = i.Tags
11393	}
11394	return json.Marshal(objectMap)
11395}
11396
11397// UnmarshalJSON is the custom unmarshaler for Interface struct.
11398func (i *Interface) UnmarshalJSON(body []byte) error {
11399	var m map[string]*json.RawMessage
11400	err := json.Unmarshal(body, &m)
11401	if err != nil {
11402		return err
11403	}
11404	for k, v := range m {
11405		switch k {
11406		case "properties":
11407			if v != nil {
11408				var interfacePropertiesFormat InterfacePropertiesFormat
11409				err = json.Unmarshal(*v, &interfacePropertiesFormat)
11410				if err != nil {
11411					return err
11412				}
11413				i.InterfacePropertiesFormat = &interfacePropertiesFormat
11414			}
11415		case "etag":
11416			if v != nil {
11417				var etag string
11418				err = json.Unmarshal(*v, &etag)
11419				if err != nil {
11420					return err
11421				}
11422				i.Etag = &etag
11423			}
11424		case "id":
11425			if v != nil {
11426				var ID string
11427				err = json.Unmarshal(*v, &ID)
11428				if err != nil {
11429					return err
11430				}
11431				i.ID = &ID
11432			}
11433		case "name":
11434			if v != nil {
11435				var name string
11436				err = json.Unmarshal(*v, &name)
11437				if err != nil {
11438					return err
11439				}
11440				i.Name = &name
11441			}
11442		case "type":
11443			if v != nil {
11444				var typeVar string
11445				err = json.Unmarshal(*v, &typeVar)
11446				if err != nil {
11447					return err
11448				}
11449				i.Type = &typeVar
11450			}
11451		case "location":
11452			if v != nil {
11453				var location string
11454				err = json.Unmarshal(*v, &location)
11455				if err != nil {
11456					return err
11457				}
11458				i.Location = &location
11459			}
11460		case "tags":
11461			if v != nil {
11462				var tags map[string]*string
11463				err = json.Unmarshal(*v, &tags)
11464				if err != nil {
11465					return err
11466				}
11467				i.Tags = tags
11468			}
11469		}
11470	}
11471
11472	return nil
11473}
11474
11475// InterfaceAssociation network interface and its custom security rules.
11476type InterfaceAssociation struct {
11477	// ID - READ-ONLY; Network interface ID.
11478	ID *string `json:"id,omitempty"`
11479	// SecurityRules - Collection of custom security rules.
11480	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
11481}
11482
11483// MarshalJSON is the custom marshaler for InterfaceAssociation.
11484func (ia InterfaceAssociation) MarshalJSON() ([]byte, error) {
11485	objectMap := make(map[string]interface{})
11486	if ia.SecurityRules != nil {
11487		objectMap["securityRules"] = ia.SecurityRules
11488	}
11489	return json.Marshal(objectMap)
11490}
11491
11492// InterfaceDNSSettings DNS settings of a network interface.
11493type InterfaceDNSSettings struct {
11494	// 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.
11495	DNSServers *[]string `json:"dnsServers,omitempty"`
11496	// 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.
11497	AppliedDNSServers *[]string `json:"appliedDnsServers,omitempty"`
11498	// InternalDNSNameLabel - Relative DNS name for this NIC used for internal communications between VMs in the same virtual network.
11499	InternalDNSNameLabel *string `json:"internalDnsNameLabel,omitempty"`
11500	// InternalFqdn - Fully qualified DNS name supporting internal communications between VMs in the same virtual network.
11501	InternalFqdn *string `json:"internalFqdn,omitempty"`
11502	// 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.
11503	InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"`
11504}
11505
11506// InterfaceEndpoint interface endpoint resource.
11507type InterfaceEndpoint struct {
11508	autorest.Response `json:"-"`
11509	// InterfaceEndpointProperties - Properties of the interface endpoint.
11510	*InterfaceEndpointProperties `json:"properties,omitempty"`
11511	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
11512	Etag *string `json:"etag,omitempty"`
11513	// ID - Resource ID.
11514	ID *string `json:"id,omitempty"`
11515	// Name - READ-ONLY; Resource name.
11516	Name *string `json:"name,omitempty"`
11517	// Type - READ-ONLY; Resource type.
11518	Type *string `json:"type,omitempty"`
11519	// Location - Resource location.
11520	Location *string `json:"location,omitempty"`
11521	// Tags - Resource tags.
11522	Tags map[string]*string `json:"tags"`
11523}
11524
11525// MarshalJSON is the custom marshaler for InterfaceEndpoint.
11526func (ie InterfaceEndpoint) MarshalJSON() ([]byte, error) {
11527	objectMap := make(map[string]interface{})
11528	if ie.InterfaceEndpointProperties != nil {
11529		objectMap["properties"] = ie.InterfaceEndpointProperties
11530	}
11531	if ie.Etag != nil {
11532		objectMap["etag"] = ie.Etag
11533	}
11534	if ie.ID != nil {
11535		objectMap["id"] = ie.ID
11536	}
11537	if ie.Location != nil {
11538		objectMap["location"] = ie.Location
11539	}
11540	if ie.Tags != nil {
11541		objectMap["tags"] = ie.Tags
11542	}
11543	return json.Marshal(objectMap)
11544}
11545
11546// UnmarshalJSON is the custom unmarshaler for InterfaceEndpoint struct.
11547func (ie *InterfaceEndpoint) UnmarshalJSON(body []byte) error {
11548	var m map[string]*json.RawMessage
11549	err := json.Unmarshal(body, &m)
11550	if err != nil {
11551		return err
11552	}
11553	for k, v := range m {
11554		switch k {
11555		case "properties":
11556			if v != nil {
11557				var interfaceEndpointProperties InterfaceEndpointProperties
11558				err = json.Unmarshal(*v, &interfaceEndpointProperties)
11559				if err != nil {
11560					return err
11561				}
11562				ie.InterfaceEndpointProperties = &interfaceEndpointProperties
11563			}
11564		case "etag":
11565			if v != nil {
11566				var etag string
11567				err = json.Unmarshal(*v, &etag)
11568				if err != nil {
11569					return err
11570				}
11571				ie.Etag = &etag
11572			}
11573		case "id":
11574			if v != nil {
11575				var ID string
11576				err = json.Unmarshal(*v, &ID)
11577				if err != nil {
11578					return err
11579				}
11580				ie.ID = &ID
11581			}
11582		case "name":
11583			if v != nil {
11584				var name string
11585				err = json.Unmarshal(*v, &name)
11586				if err != nil {
11587					return err
11588				}
11589				ie.Name = &name
11590			}
11591		case "type":
11592			if v != nil {
11593				var typeVar string
11594				err = json.Unmarshal(*v, &typeVar)
11595				if err != nil {
11596					return err
11597				}
11598				ie.Type = &typeVar
11599			}
11600		case "location":
11601			if v != nil {
11602				var location string
11603				err = json.Unmarshal(*v, &location)
11604				if err != nil {
11605					return err
11606				}
11607				ie.Location = &location
11608			}
11609		case "tags":
11610			if v != nil {
11611				var tags map[string]*string
11612				err = json.Unmarshal(*v, &tags)
11613				if err != nil {
11614					return err
11615				}
11616				ie.Tags = tags
11617			}
11618		}
11619	}
11620
11621	return nil
11622}
11623
11624// InterfaceEndpointListResult response for the ListInterfaceEndpoints API service call.
11625type InterfaceEndpointListResult struct {
11626	autorest.Response `json:"-"`
11627	// Value - Gets a list of InterfaceEndpoint resources in a resource group.
11628	Value *[]InterfaceEndpoint `json:"value,omitempty"`
11629	// NextLink - READ-ONLY; The URL to get the next set of results.
11630	NextLink *string `json:"nextLink,omitempty"`
11631}
11632
11633// MarshalJSON is the custom marshaler for InterfaceEndpointListResult.
11634func (ielr InterfaceEndpointListResult) MarshalJSON() ([]byte, error) {
11635	objectMap := make(map[string]interface{})
11636	if ielr.Value != nil {
11637		objectMap["value"] = ielr.Value
11638	}
11639	return json.Marshal(objectMap)
11640}
11641
11642// InterfaceEndpointListResultIterator provides access to a complete listing of InterfaceEndpoint values.
11643type InterfaceEndpointListResultIterator struct {
11644	i    int
11645	page InterfaceEndpointListResultPage
11646}
11647
11648// NextWithContext advances to the next value.  If there was an error making
11649// the request the iterator does not advance and the error is returned.
11650func (iter *InterfaceEndpointListResultIterator) NextWithContext(ctx context.Context) (err error) {
11651	if tracing.IsEnabled() {
11652		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceEndpointListResultIterator.NextWithContext")
11653		defer func() {
11654			sc := -1
11655			if iter.Response().Response.Response != nil {
11656				sc = iter.Response().Response.Response.StatusCode
11657			}
11658			tracing.EndSpan(ctx, sc, err)
11659		}()
11660	}
11661	iter.i++
11662	if iter.i < len(iter.page.Values()) {
11663		return nil
11664	}
11665	err = iter.page.NextWithContext(ctx)
11666	if err != nil {
11667		iter.i--
11668		return err
11669	}
11670	iter.i = 0
11671	return nil
11672}
11673
11674// Next advances to the next value.  If there was an error making
11675// the request the iterator does not advance and the error is returned.
11676// Deprecated: Use NextWithContext() instead.
11677func (iter *InterfaceEndpointListResultIterator) Next() error {
11678	return iter.NextWithContext(context.Background())
11679}
11680
11681// NotDone returns true if the enumeration should be started or is not yet complete.
11682func (iter InterfaceEndpointListResultIterator) NotDone() bool {
11683	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11684}
11685
11686// Response returns the raw server response from the last page request.
11687func (iter InterfaceEndpointListResultIterator) Response() InterfaceEndpointListResult {
11688	return iter.page.Response()
11689}
11690
11691// Value returns the current value or a zero-initialized value if the
11692// iterator has advanced beyond the end of the collection.
11693func (iter InterfaceEndpointListResultIterator) Value() InterfaceEndpoint {
11694	if !iter.page.NotDone() {
11695		return InterfaceEndpoint{}
11696	}
11697	return iter.page.Values()[iter.i]
11698}
11699
11700// Creates a new instance of the InterfaceEndpointListResultIterator type.
11701func NewInterfaceEndpointListResultIterator(page InterfaceEndpointListResultPage) InterfaceEndpointListResultIterator {
11702	return InterfaceEndpointListResultIterator{page: page}
11703}
11704
11705// IsEmpty returns true if the ListResult contains no values.
11706func (ielr InterfaceEndpointListResult) IsEmpty() bool {
11707	return ielr.Value == nil || len(*ielr.Value) == 0
11708}
11709
11710// hasNextLink returns true if the NextLink is not empty.
11711func (ielr InterfaceEndpointListResult) hasNextLink() bool {
11712	return ielr.NextLink != nil && len(*ielr.NextLink) != 0
11713}
11714
11715// interfaceEndpointListResultPreparer prepares a request to retrieve the next set of results.
11716// It returns nil if no more results exist.
11717func (ielr InterfaceEndpointListResult) interfaceEndpointListResultPreparer(ctx context.Context) (*http.Request, error) {
11718	if !ielr.hasNextLink() {
11719		return nil, nil
11720	}
11721	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11722		autorest.AsJSON(),
11723		autorest.AsGet(),
11724		autorest.WithBaseURL(to.String(ielr.NextLink)))
11725}
11726
11727// InterfaceEndpointListResultPage contains a page of InterfaceEndpoint values.
11728type InterfaceEndpointListResultPage struct {
11729	fn   func(context.Context, InterfaceEndpointListResult) (InterfaceEndpointListResult, error)
11730	ielr InterfaceEndpointListResult
11731}
11732
11733// NextWithContext advances to the next page of values.  If there was an error making
11734// the request the page does not advance and the error is returned.
11735func (page *InterfaceEndpointListResultPage) NextWithContext(ctx context.Context) (err error) {
11736	if tracing.IsEnabled() {
11737		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceEndpointListResultPage.NextWithContext")
11738		defer func() {
11739			sc := -1
11740			if page.Response().Response.Response != nil {
11741				sc = page.Response().Response.Response.StatusCode
11742			}
11743			tracing.EndSpan(ctx, sc, err)
11744		}()
11745	}
11746	for {
11747		next, err := page.fn(ctx, page.ielr)
11748		if err != nil {
11749			return err
11750		}
11751		page.ielr = next
11752		if !next.hasNextLink() || !next.IsEmpty() {
11753			break
11754		}
11755	}
11756	return nil
11757}
11758
11759// Next advances to the next page of values.  If there was an error making
11760// the request the page does not advance and the error is returned.
11761// Deprecated: Use NextWithContext() instead.
11762func (page *InterfaceEndpointListResultPage) Next() error {
11763	return page.NextWithContext(context.Background())
11764}
11765
11766// NotDone returns true if the page enumeration should be started or is not yet complete.
11767func (page InterfaceEndpointListResultPage) NotDone() bool {
11768	return !page.ielr.IsEmpty()
11769}
11770
11771// Response returns the raw server response from the last page request.
11772func (page InterfaceEndpointListResultPage) Response() InterfaceEndpointListResult {
11773	return page.ielr
11774}
11775
11776// Values returns the slice of values for the current page or nil if there are no values.
11777func (page InterfaceEndpointListResultPage) Values() []InterfaceEndpoint {
11778	if page.ielr.IsEmpty() {
11779		return nil
11780	}
11781	return *page.ielr.Value
11782}
11783
11784// Creates a new instance of the InterfaceEndpointListResultPage type.
11785func NewInterfaceEndpointListResultPage(cur InterfaceEndpointListResult, getNextPage func(context.Context, InterfaceEndpointListResult) (InterfaceEndpointListResult, error)) InterfaceEndpointListResultPage {
11786	return InterfaceEndpointListResultPage{
11787		fn:   getNextPage,
11788		ielr: cur,
11789	}
11790}
11791
11792// InterfaceEndpointProperties properties of the interface endpoint.
11793type InterfaceEndpointProperties struct {
11794	// Fqdn - A first-party service's FQDN that is mapped to the private IP allocated via this interface endpoint.
11795	Fqdn *string `json:"fqdn,omitempty"`
11796	// EndpointService - A reference to the service being brought into the virtual network.
11797	EndpointService *EndpointService `json:"endpointService,omitempty"`
11798	// Subnet - The ID of the subnet from which the private IP will be allocated.
11799	Subnet *Subnet `json:"subnet,omitempty"`
11800	// NetworkInterfaces - READ-ONLY; Gets an array of references to the network interfaces created for this interface endpoint.
11801	NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"`
11802	// Owner - READ-ONLY; A read-only property that identifies who created this interface endpoint.
11803	Owner *string `json:"owner,omitempty"`
11804	// ProvisioningState - READ-ONLY; The provisioning state of the interface endpoint. Possible values are: 'Updating', 'Deleting', and 'Failed'.
11805	ProvisioningState *string `json:"provisioningState,omitempty"`
11806}
11807
11808// MarshalJSON is the custom marshaler for InterfaceEndpointProperties.
11809func (iep InterfaceEndpointProperties) MarshalJSON() ([]byte, error) {
11810	objectMap := make(map[string]interface{})
11811	if iep.Fqdn != nil {
11812		objectMap["fqdn"] = iep.Fqdn
11813	}
11814	if iep.EndpointService != nil {
11815		objectMap["endpointService"] = iep.EndpointService
11816	}
11817	if iep.Subnet != nil {
11818		objectMap["subnet"] = iep.Subnet
11819	}
11820	return json.Marshal(objectMap)
11821}
11822
11823// InterfaceEndpointsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
11824// long-running operation.
11825type InterfaceEndpointsCreateOrUpdateFuture struct {
11826	azure.FutureAPI
11827	// Result returns the result of the asynchronous operation.
11828	// If the operation has not completed it will return an error.
11829	Result func(InterfaceEndpointsClient) (InterfaceEndpoint, error)
11830}
11831
11832// InterfaceEndpointsDeleteFuture an abstraction for monitoring and retrieving the results of a
11833// long-running operation.
11834type InterfaceEndpointsDeleteFuture struct {
11835	azure.FutureAPI
11836	// Result returns the result of the asynchronous operation.
11837	// If the operation has not completed it will return an error.
11838	Result func(InterfaceEndpointsClient) (autorest.Response, error)
11839}
11840
11841// InterfaceIPConfiguration iPConfiguration in a network interface.
11842type InterfaceIPConfiguration struct {
11843	autorest.Response `json:"-"`
11844	// InterfaceIPConfigurationPropertiesFormat - Network interface IP configuration properties.
11845	*InterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"`
11846	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
11847	Name *string `json:"name,omitempty"`
11848	// Etag - A unique read-only string that changes whenever the resource is updated.
11849	Etag *string `json:"etag,omitempty"`
11850	// ID - Resource ID.
11851	ID *string `json:"id,omitempty"`
11852}
11853
11854// MarshalJSON is the custom marshaler for InterfaceIPConfiguration.
11855func (iic InterfaceIPConfiguration) MarshalJSON() ([]byte, error) {
11856	objectMap := make(map[string]interface{})
11857	if iic.InterfaceIPConfigurationPropertiesFormat != nil {
11858		objectMap["properties"] = iic.InterfaceIPConfigurationPropertiesFormat
11859	}
11860	if iic.Name != nil {
11861		objectMap["name"] = iic.Name
11862	}
11863	if iic.Etag != nil {
11864		objectMap["etag"] = iic.Etag
11865	}
11866	if iic.ID != nil {
11867		objectMap["id"] = iic.ID
11868	}
11869	return json.Marshal(objectMap)
11870}
11871
11872// UnmarshalJSON is the custom unmarshaler for InterfaceIPConfiguration struct.
11873func (iic *InterfaceIPConfiguration) UnmarshalJSON(body []byte) error {
11874	var m map[string]*json.RawMessage
11875	err := json.Unmarshal(body, &m)
11876	if err != nil {
11877		return err
11878	}
11879	for k, v := range m {
11880		switch k {
11881		case "properties":
11882			if v != nil {
11883				var interfaceIPConfigurationPropertiesFormat InterfaceIPConfigurationPropertiesFormat
11884				err = json.Unmarshal(*v, &interfaceIPConfigurationPropertiesFormat)
11885				if err != nil {
11886					return err
11887				}
11888				iic.InterfaceIPConfigurationPropertiesFormat = &interfaceIPConfigurationPropertiesFormat
11889			}
11890		case "name":
11891			if v != nil {
11892				var name string
11893				err = json.Unmarshal(*v, &name)
11894				if err != nil {
11895					return err
11896				}
11897				iic.Name = &name
11898			}
11899		case "etag":
11900			if v != nil {
11901				var etag string
11902				err = json.Unmarshal(*v, &etag)
11903				if err != nil {
11904					return err
11905				}
11906				iic.Etag = &etag
11907			}
11908		case "id":
11909			if v != nil {
11910				var ID string
11911				err = json.Unmarshal(*v, &ID)
11912				if err != nil {
11913					return err
11914				}
11915				iic.ID = &ID
11916			}
11917		}
11918	}
11919
11920	return nil
11921}
11922
11923// InterfaceIPConfigurationListResult response for list ip configurations API service call.
11924type InterfaceIPConfigurationListResult struct {
11925	autorest.Response `json:"-"`
11926	// Value - A list of ip configurations.
11927	Value *[]InterfaceIPConfiguration `json:"value,omitempty"`
11928	// NextLink - READ-ONLY; The URL to get the next set of results.
11929	NextLink *string `json:"nextLink,omitempty"`
11930}
11931
11932// MarshalJSON is the custom marshaler for InterfaceIPConfigurationListResult.
11933func (iiclr InterfaceIPConfigurationListResult) MarshalJSON() ([]byte, error) {
11934	objectMap := make(map[string]interface{})
11935	if iiclr.Value != nil {
11936		objectMap["value"] = iiclr.Value
11937	}
11938	return json.Marshal(objectMap)
11939}
11940
11941// InterfaceIPConfigurationListResultIterator provides access to a complete listing of
11942// InterfaceIPConfiguration values.
11943type InterfaceIPConfigurationListResultIterator struct {
11944	i    int
11945	page InterfaceIPConfigurationListResultPage
11946}
11947
11948// NextWithContext advances to the next value.  If there was an error making
11949// the request the iterator does not advance and the error is returned.
11950func (iter *InterfaceIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
11951	if tracing.IsEnabled() {
11952		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultIterator.NextWithContext")
11953		defer func() {
11954			sc := -1
11955			if iter.Response().Response.Response != nil {
11956				sc = iter.Response().Response.Response.StatusCode
11957			}
11958			tracing.EndSpan(ctx, sc, err)
11959		}()
11960	}
11961	iter.i++
11962	if iter.i < len(iter.page.Values()) {
11963		return nil
11964	}
11965	err = iter.page.NextWithContext(ctx)
11966	if err != nil {
11967		iter.i--
11968		return err
11969	}
11970	iter.i = 0
11971	return nil
11972}
11973
11974// Next advances to the next value.  If there was an error making
11975// the request the iterator does not advance and the error is returned.
11976// Deprecated: Use NextWithContext() instead.
11977func (iter *InterfaceIPConfigurationListResultIterator) Next() error {
11978	return iter.NextWithContext(context.Background())
11979}
11980
11981// NotDone returns true if the enumeration should be started or is not yet complete.
11982func (iter InterfaceIPConfigurationListResultIterator) NotDone() bool {
11983	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11984}
11985
11986// Response returns the raw server response from the last page request.
11987func (iter InterfaceIPConfigurationListResultIterator) Response() InterfaceIPConfigurationListResult {
11988	return iter.page.Response()
11989}
11990
11991// Value returns the current value or a zero-initialized value if the
11992// iterator has advanced beyond the end of the collection.
11993func (iter InterfaceIPConfigurationListResultIterator) Value() InterfaceIPConfiguration {
11994	if !iter.page.NotDone() {
11995		return InterfaceIPConfiguration{}
11996	}
11997	return iter.page.Values()[iter.i]
11998}
11999
12000// Creates a new instance of the InterfaceIPConfigurationListResultIterator type.
12001func NewInterfaceIPConfigurationListResultIterator(page InterfaceIPConfigurationListResultPage) InterfaceIPConfigurationListResultIterator {
12002	return InterfaceIPConfigurationListResultIterator{page: page}
12003}
12004
12005// IsEmpty returns true if the ListResult contains no values.
12006func (iiclr InterfaceIPConfigurationListResult) IsEmpty() bool {
12007	return iiclr.Value == nil || len(*iiclr.Value) == 0
12008}
12009
12010// hasNextLink returns true if the NextLink is not empty.
12011func (iiclr InterfaceIPConfigurationListResult) hasNextLink() bool {
12012	return iiclr.NextLink != nil && len(*iiclr.NextLink) != 0
12013}
12014
12015// interfaceIPConfigurationListResultPreparer prepares a request to retrieve the next set of results.
12016// It returns nil if no more results exist.
12017func (iiclr InterfaceIPConfigurationListResult) interfaceIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
12018	if !iiclr.hasNextLink() {
12019		return nil, nil
12020	}
12021	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12022		autorest.AsJSON(),
12023		autorest.AsGet(),
12024		autorest.WithBaseURL(to.String(iiclr.NextLink)))
12025}
12026
12027// InterfaceIPConfigurationListResultPage contains a page of InterfaceIPConfiguration values.
12028type InterfaceIPConfigurationListResultPage struct {
12029	fn    func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)
12030	iiclr InterfaceIPConfigurationListResult
12031}
12032
12033// NextWithContext advances to the next page of values.  If there was an error making
12034// the request the page does not advance and the error is returned.
12035func (page *InterfaceIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
12036	if tracing.IsEnabled() {
12037		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultPage.NextWithContext")
12038		defer func() {
12039			sc := -1
12040			if page.Response().Response.Response != nil {
12041				sc = page.Response().Response.Response.StatusCode
12042			}
12043			tracing.EndSpan(ctx, sc, err)
12044		}()
12045	}
12046	for {
12047		next, err := page.fn(ctx, page.iiclr)
12048		if err != nil {
12049			return err
12050		}
12051		page.iiclr = next
12052		if !next.hasNextLink() || !next.IsEmpty() {
12053			break
12054		}
12055	}
12056	return nil
12057}
12058
12059// Next advances to the next page of values.  If there was an error making
12060// the request the page does not advance and the error is returned.
12061// Deprecated: Use NextWithContext() instead.
12062func (page *InterfaceIPConfigurationListResultPage) Next() error {
12063	return page.NextWithContext(context.Background())
12064}
12065
12066// NotDone returns true if the page enumeration should be started or is not yet complete.
12067func (page InterfaceIPConfigurationListResultPage) NotDone() bool {
12068	return !page.iiclr.IsEmpty()
12069}
12070
12071// Response returns the raw server response from the last page request.
12072func (page InterfaceIPConfigurationListResultPage) Response() InterfaceIPConfigurationListResult {
12073	return page.iiclr
12074}
12075
12076// Values returns the slice of values for the current page or nil if there are no values.
12077func (page InterfaceIPConfigurationListResultPage) Values() []InterfaceIPConfiguration {
12078	if page.iiclr.IsEmpty() {
12079		return nil
12080	}
12081	return *page.iiclr.Value
12082}
12083
12084// Creates a new instance of the InterfaceIPConfigurationListResultPage type.
12085func NewInterfaceIPConfigurationListResultPage(cur InterfaceIPConfigurationListResult, getNextPage func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)) InterfaceIPConfigurationListResultPage {
12086	return InterfaceIPConfigurationListResultPage{
12087		fn:    getNextPage,
12088		iiclr: cur,
12089	}
12090}
12091
12092// InterfaceIPConfigurationPropertiesFormat properties of IP configuration.
12093type InterfaceIPConfigurationPropertiesFormat struct {
12094	// VirtualNetworkTaps - The reference to Virtual Network Taps.
12095	VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"`
12096	// ApplicationGatewayBackendAddressPools - The reference of ApplicationGatewayBackendAddressPool resource.
12097	ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"`
12098	// LoadBalancerBackendAddressPools - The reference of LoadBalancerBackendAddressPool resource.
12099	LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"`
12100	// LoadBalancerInboundNatRules - A list of references of LoadBalancerInboundNatRules.
12101	LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"`
12102	// PrivateIPAddress - Private IP address of the IP configuration.
12103	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
12104	// PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'Static', 'Dynamic'
12105	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
12106	// 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 include: 'IPv4', 'IPv6'
12107	PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
12108	// Subnet - Subnet bound to the IP configuration.
12109	Subnet *Subnet `json:"subnet,omitempty"`
12110	// Primary - Gets whether this is a primary customer address on the network interface.
12111	Primary *bool `json:"primary,omitempty"`
12112	// PublicIPAddress - Public IP address bound to the IP configuration.
12113	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
12114	// ApplicationSecurityGroups - Application security groups in which the IP configuration is included.
12115	ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"`
12116	// ProvisioningState - The provisioning state of the network interface IP configuration. Possible values are: 'Updating', 'Deleting', and 'Failed'.
12117	ProvisioningState *string `json:"provisioningState,omitempty"`
12118}
12119
12120// InterfaceListResult response for the ListNetworkInterface API service call.
12121type InterfaceListResult struct {
12122	autorest.Response `json:"-"`
12123	// Value - A list of network interfaces in a resource group.
12124	Value *[]Interface `json:"value,omitempty"`
12125	// NextLink - READ-ONLY; The URL to get the next set of results.
12126	NextLink *string `json:"nextLink,omitempty"`
12127}
12128
12129// MarshalJSON is the custom marshaler for InterfaceListResult.
12130func (ilr InterfaceListResult) MarshalJSON() ([]byte, error) {
12131	objectMap := make(map[string]interface{})
12132	if ilr.Value != nil {
12133		objectMap["value"] = ilr.Value
12134	}
12135	return json.Marshal(objectMap)
12136}
12137
12138// InterfaceListResultIterator provides access to a complete listing of Interface values.
12139type InterfaceListResultIterator struct {
12140	i    int
12141	page InterfaceListResultPage
12142}
12143
12144// NextWithContext advances to the next value.  If there was an error making
12145// the request the iterator does not advance and the error is returned.
12146func (iter *InterfaceListResultIterator) NextWithContext(ctx context.Context) (err error) {
12147	if tracing.IsEnabled() {
12148		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultIterator.NextWithContext")
12149		defer func() {
12150			sc := -1
12151			if iter.Response().Response.Response != nil {
12152				sc = iter.Response().Response.Response.StatusCode
12153			}
12154			tracing.EndSpan(ctx, sc, err)
12155		}()
12156	}
12157	iter.i++
12158	if iter.i < len(iter.page.Values()) {
12159		return nil
12160	}
12161	err = iter.page.NextWithContext(ctx)
12162	if err != nil {
12163		iter.i--
12164		return err
12165	}
12166	iter.i = 0
12167	return nil
12168}
12169
12170// Next advances to the next value.  If there was an error making
12171// the request the iterator does not advance and the error is returned.
12172// Deprecated: Use NextWithContext() instead.
12173func (iter *InterfaceListResultIterator) Next() error {
12174	return iter.NextWithContext(context.Background())
12175}
12176
12177// NotDone returns true if the enumeration should be started or is not yet complete.
12178func (iter InterfaceListResultIterator) NotDone() bool {
12179	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12180}
12181
12182// Response returns the raw server response from the last page request.
12183func (iter InterfaceListResultIterator) Response() InterfaceListResult {
12184	return iter.page.Response()
12185}
12186
12187// Value returns the current value or a zero-initialized value if the
12188// iterator has advanced beyond the end of the collection.
12189func (iter InterfaceListResultIterator) Value() Interface {
12190	if !iter.page.NotDone() {
12191		return Interface{}
12192	}
12193	return iter.page.Values()[iter.i]
12194}
12195
12196// Creates a new instance of the InterfaceListResultIterator type.
12197func NewInterfaceListResultIterator(page InterfaceListResultPage) InterfaceListResultIterator {
12198	return InterfaceListResultIterator{page: page}
12199}
12200
12201// IsEmpty returns true if the ListResult contains no values.
12202func (ilr InterfaceListResult) IsEmpty() bool {
12203	return ilr.Value == nil || len(*ilr.Value) == 0
12204}
12205
12206// hasNextLink returns true if the NextLink is not empty.
12207func (ilr InterfaceListResult) hasNextLink() bool {
12208	return ilr.NextLink != nil && len(*ilr.NextLink) != 0
12209}
12210
12211// interfaceListResultPreparer prepares a request to retrieve the next set of results.
12212// It returns nil if no more results exist.
12213func (ilr InterfaceListResult) interfaceListResultPreparer(ctx context.Context) (*http.Request, error) {
12214	if !ilr.hasNextLink() {
12215		return nil, nil
12216	}
12217	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12218		autorest.AsJSON(),
12219		autorest.AsGet(),
12220		autorest.WithBaseURL(to.String(ilr.NextLink)))
12221}
12222
12223// InterfaceListResultPage contains a page of Interface values.
12224type InterfaceListResultPage struct {
12225	fn  func(context.Context, InterfaceListResult) (InterfaceListResult, error)
12226	ilr InterfaceListResult
12227}
12228
12229// NextWithContext advances to the next page of values.  If there was an error making
12230// the request the page does not advance and the error is returned.
12231func (page *InterfaceListResultPage) NextWithContext(ctx context.Context) (err error) {
12232	if tracing.IsEnabled() {
12233		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultPage.NextWithContext")
12234		defer func() {
12235			sc := -1
12236			if page.Response().Response.Response != nil {
12237				sc = page.Response().Response.Response.StatusCode
12238			}
12239			tracing.EndSpan(ctx, sc, err)
12240		}()
12241	}
12242	for {
12243		next, err := page.fn(ctx, page.ilr)
12244		if err != nil {
12245			return err
12246		}
12247		page.ilr = next
12248		if !next.hasNextLink() || !next.IsEmpty() {
12249			break
12250		}
12251	}
12252	return nil
12253}
12254
12255// Next advances to the next page of values.  If there was an error making
12256// the request the page does not advance and the error is returned.
12257// Deprecated: Use NextWithContext() instead.
12258func (page *InterfaceListResultPage) Next() error {
12259	return page.NextWithContext(context.Background())
12260}
12261
12262// NotDone returns true if the page enumeration should be started or is not yet complete.
12263func (page InterfaceListResultPage) NotDone() bool {
12264	return !page.ilr.IsEmpty()
12265}
12266
12267// Response returns the raw server response from the last page request.
12268func (page InterfaceListResultPage) Response() InterfaceListResult {
12269	return page.ilr
12270}
12271
12272// Values returns the slice of values for the current page or nil if there are no values.
12273func (page InterfaceListResultPage) Values() []Interface {
12274	if page.ilr.IsEmpty() {
12275		return nil
12276	}
12277	return *page.ilr.Value
12278}
12279
12280// Creates a new instance of the InterfaceListResultPage type.
12281func NewInterfaceListResultPage(cur InterfaceListResult, getNextPage func(context.Context, InterfaceListResult) (InterfaceListResult, error)) InterfaceListResultPage {
12282	return InterfaceListResultPage{
12283		fn:  getNextPage,
12284		ilr: cur,
12285	}
12286}
12287
12288// InterfaceLoadBalancerListResult response for list ip configurations API service call.
12289type InterfaceLoadBalancerListResult struct {
12290	autorest.Response `json:"-"`
12291	// Value - A list of load balancers.
12292	Value *[]LoadBalancer `json:"value,omitempty"`
12293	// NextLink - READ-ONLY; The URL to get the next set of results.
12294	NextLink *string `json:"nextLink,omitempty"`
12295}
12296
12297// MarshalJSON is the custom marshaler for InterfaceLoadBalancerListResult.
12298func (ilblr InterfaceLoadBalancerListResult) MarshalJSON() ([]byte, error) {
12299	objectMap := make(map[string]interface{})
12300	if ilblr.Value != nil {
12301		objectMap["value"] = ilblr.Value
12302	}
12303	return json.Marshal(objectMap)
12304}
12305
12306// InterfaceLoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values.
12307type InterfaceLoadBalancerListResultIterator struct {
12308	i    int
12309	page InterfaceLoadBalancerListResultPage
12310}
12311
12312// NextWithContext advances to the next value.  If there was an error making
12313// the request the iterator does not advance and the error is returned.
12314func (iter *InterfaceLoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) {
12315	if tracing.IsEnabled() {
12316		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultIterator.NextWithContext")
12317		defer func() {
12318			sc := -1
12319			if iter.Response().Response.Response != nil {
12320				sc = iter.Response().Response.Response.StatusCode
12321			}
12322			tracing.EndSpan(ctx, sc, err)
12323		}()
12324	}
12325	iter.i++
12326	if iter.i < len(iter.page.Values()) {
12327		return nil
12328	}
12329	err = iter.page.NextWithContext(ctx)
12330	if err != nil {
12331		iter.i--
12332		return err
12333	}
12334	iter.i = 0
12335	return nil
12336}
12337
12338// Next advances to the next value.  If there was an error making
12339// the request the iterator does not advance and the error is returned.
12340// Deprecated: Use NextWithContext() instead.
12341func (iter *InterfaceLoadBalancerListResultIterator) Next() error {
12342	return iter.NextWithContext(context.Background())
12343}
12344
12345// NotDone returns true if the enumeration should be started or is not yet complete.
12346func (iter InterfaceLoadBalancerListResultIterator) NotDone() bool {
12347	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12348}
12349
12350// Response returns the raw server response from the last page request.
12351func (iter InterfaceLoadBalancerListResultIterator) Response() InterfaceLoadBalancerListResult {
12352	return iter.page.Response()
12353}
12354
12355// Value returns the current value or a zero-initialized value if the
12356// iterator has advanced beyond the end of the collection.
12357func (iter InterfaceLoadBalancerListResultIterator) Value() LoadBalancer {
12358	if !iter.page.NotDone() {
12359		return LoadBalancer{}
12360	}
12361	return iter.page.Values()[iter.i]
12362}
12363
12364// Creates a new instance of the InterfaceLoadBalancerListResultIterator type.
12365func NewInterfaceLoadBalancerListResultIterator(page InterfaceLoadBalancerListResultPage) InterfaceLoadBalancerListResultIterator {
12366	return InterfaceLoadBalancerListResultIterator{page: page}
12367}
12368
12369// IsEmpty returns true if the ListResult contains no values.
12370func (ilblr InterfaceLoadBalancerListResult) IsEmpty() bool {
12371	return ilblr.Value == nil || len(*ilblr.Value) == 0
12372}
12373
12374// hasNextLink returns true if the NextLink is not empty.
12375func (ilblr InterfaceLoadBalancerListResult) hasNextLink() bool {
12376	return ilblr.NextLink != nil && len(*ilblr.NextLink) != 0
12377}
12378
12379// interfaceLoadBalancerListResultPreparer prepares a request to retrieve the next set of results.
12380// It returns nil if no more results exist.
12381func (ilblr InterfaceLoadBalancerListResult) interfaceLoadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) {
12382	if !ilblr.hasNextLink() {
12383		return nil, nil
12384	}
12385	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12386		autorest.AsJSON(),
12387		autorest.AsGet(),
12388		autorest.WithBaseURL(to.String(ilblr.NextLink)))
12389}
12390
12391// InterfaceLoadBalancerListResultPage contains a page of LoadBalancer values.
12392type InterfaceLoadBalancerListResultPage struct {
12393	fn    func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)
12394	ilblr InterfaceLoadBalancerListResult
12395}
12396
12397// NextWithContext advances to the next page of values.  If there was an error making
12398// the request the page does not advance and the error is returned.
12399func (page *InterfaceLoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) {
12400	if tracing.IsEnabled() {
12401		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultPage.NextWithContext")
12402		defer func() {
12403			sc := -1
12404			if page.Response().Response.Response != nil {
12405				sc = page.Response().Response.Response.StatusCode
12406			}
12407			tracing.EndSpan(ctx, sc, err)
12408		}()
12409	}
12410	for {
12411		next, err := page.fn(ctx, page.ilblr)
12412		if err != nil {
12413			return err
12414		}
12415		page.ilblr = next
12416		if !next.hasNextLink() || !next.IsEmpty() {
12417			break
12418		}
12419	}
12420	return nil
12421}
12422
12423// Next advances to the next page of values.  If there was an error making
12424// the request the page does not advance and the error is returned.
12425// Deprecated: Use NextWithContext() instead.
12426func (page *InterfaceLoadBalancerListResultPage) Next() error {
12427	return page.NextWithContext(context.Background())
12428}
12429
12430// NotDone returns true if the page enumeration should be started or is not yet complete.
12431func (page InterfaceLoadBalancerListResultPage) NotDone() bool {
12432	return !page.ilblr.IsEmpty()
12433}
12434
12435// Response returns the raw server response from the last page request.
12436func (page InterfaceLoadBalancerListResultPage) Response() InterfaceLoadBalancerListResult {
12437	return page.ilblr
12438}
12439
12440// Values returns the slice of values for the current page or nil if there are no values.
12441func (page InterfaceLoadBalancerListResultPage) Values() []LoadBalancer {
12442	if page.ilblr.IsEmpty() {
12443		return nil
12444	}
12445	return *page.ilblr.Value
12446}
12447
12448// Creates a new instance of the InterfaceLoadBalancerListResultPage type.
12449func NewInterfaceLoadBalancerListResultPage(cur InterfaceLoadBalancerListResult, getNextPage func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)) InterfaceLoadBalancerListResultPage {
12450	return InterfaceLoadBalancerListResultPage{
12451		fn:    getNextPage,
12452		ilblr: cur,
12453	}
12454}
12455
12456// InterfacePropertiesFormat networkInterface properties.
12457type InterfacePropertiesFormat struct {
12458	// VirtualMachine - READ-ONLY; The reference of a virtual machine.
12459	VirtualMachine *SubResource `json:"virtualMachine,omitempty"`
12460	// NetworkSecurityGroup - The reference of the NetworkSecurityGroup resource.
12461	NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"`
12462	// InterfaceEndpoint - READ-ONLY; A reference to the interface endpoint to which the network interface is linked.
12463	InterfaceEndpoint *InterfaceEndpoint `json:"interfaceEndpoint,omitempty"`
12464	// IPConfigurations - A list of IPConfigurations of the network interface.
12465	IPConfigurations *[]InterfaceIPConfiguration `json:"ipConfigurations,omitempty"`
12466	// TapConfigurations - A list of TapConfigurations of the network interface.
12467	TapConfigurations *[]InterfaceTapConfiguration `json:"tapConfigurations,omitempty"`
12468	// DNSSettings - The DNS settings in network interface.
12469	DNSSettings *InterfaceDNSSettings `json:"dnsSettings,omitempty"`
12470	// MacAddress - The MAC address of the network interface.
12471	MacAddress *string `json:"macAddress,omitempty"`
12472	// Primary - Gets whether this is a primary network interface on a virtual machine.
12473	Primary *bool `json:"primary,omitempty"`
12474	// EnableAcceleratedNetworking - If the network interface is accelerated networking enabled.
12475	EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"`
12476	// EnableIPForwarding - Indicates whether IP forwarding is enabled on this network interface.
12477	EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"`
12478	// HostedWorkloads - READ-ONLY; A list of references to linked BareMetal resources
12479	HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"`
12480	// ResourceGUID - The resource GUID property of the network interface resource.
12481	ResourceGUID *string `json:"resourceGuid,omitempty"`
12482	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
12483	ProvisioningState *string `json:"provisioningState,omitempty"`
12484}
12485
12486// MarshalJSON is the custom marshaler for InterfacePropertiesFormat.
12487func (ipf InterfacePropertiesFormat) MarshalJSON() ([]byte, error) {
12488	objectMap := make(map[string]interface{})
12489	if ipf.NetworkSecurityGroup != nil {
12490		objectMap["networkSecurityGroup"] = ipf.NetworkSecurityGroup
12491	}
12492	if ipf.IPConfigurations != nil {
12493		objectMap["ipConfigurations"] = ipf.IPConfigurations
12494	}
12495	if ipf.TapConfigurations != nil {
12496		objectMap["tapConfigurations"] = ipf.TapConfigurations
12497	}
12498	if ipf.DNSSettings != nil {
12499		objectMap["dnsSettings"] = ipf.DNSSettings
12500	}
12501	if ipf.MacAddress != nil {
12502		objectMap["macAddress"] = ipf.MacAddress
12503	}
12504	if ipf.Primary != nil {
12505		objectMap["primary"] = ipf.Primary
12506	}
12507	if ipf.EnableAcceleratedNetworking != nil {
12508		objectMap["enableAcceleratedNetworking"] = ipf.EnableAcceleratedNetworking
12509	}
12510	if ipf.EnableIPForwarding != nil {
12511		objectMap["enableIPForwarding"] = ipf.EnableIPForwarding
12512	}
12513	if ipf.ResourceGUID != nil {
12514		objectMap["resourceGuid"] = ipf.ResourceGUID
12515	}
12516	if ipf.ProvisioningState != nil {
12517		objectMap["provisioningState"] = ipf.ProvisioningState
12518	}
12519	return json.Marshal(objectMap)
12520}
12521
12522// InterfacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
12523// long-running operation.
12524type InterfacesCreateOrUpdateFuture struct {
12525	azure.FutureAPI
12526	// Result returns the result of the asynchronous operation.
12527	// If the operation has not completed it will return an error.
12528	Result func(InterfacesClient) (Interface, error)
12529}
12530
12531// InterfacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
12532// operation.
12533type InterfacesDeleteFuture struct {
12534	azure.FutureAPI
12535	// Result returns the result of the asynchronous operation.
12536	// If the operation has not completed it will return an error.
12537	Result func(InterfacesClient) (autorest.Response, error)
12538}
12539
12540// InterfacesGetEffectiveRouteTableFuture an abstraction for monitoring and retrieving the results of a
12541// long-running operation.
12542type InterfacesGetEffectiveRouteTableFuture struct {
12543	azure.FutureAPI
12544	// Result returns the result of the asynchronous operation.
12545	// If the operation has not completed it will return an error.
12546	Result func(InterfacesClient) (EffectiveRouteListResult, error)
12547}
12548
12549// InterfacesListEffectiveNetworkSecurityGroupsFuture an abstraction for monitoring and retrieving the
12550// results of a long-running operation.
12551type InterfacesListEffectiveNetworkSecurityGroupsFuture struct {
12552	azure.FutureAPI
12553	// Result returns the result of the asynchronous operation.
12554	// If the operation has not completed it will return an error.
12555	Result func(InterfacesClient) (EffectiveNetworkSecurityGroupListResult, error)
12556}
12557
12558// InterfacesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
12559// operation.
12560type InterfacesUpdateTagsFuture struct {
12561	azure.FutureAPI
12562	// Result returns the result of the asynchronous operation.
12563	// If the operation has not completed it will return an error.
12564	Result func(InterfacesClient) (Interface, error)
12565}
12566
12567// InterfaceTapConfiguration tap configuration in a Network Interface
12568type InterfaceTapConfiguration struct {
12569	autorest.Response `json:"-"`
12570	// InterfaceTapConfigurationPropertiesFormat - Properties of the Virtual Network Tap configuration
12571	*InterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"`
12572	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
12573	Name *string `json:"name,omitempty"`
12574	// Etag - A unique read-only string that changes whenever the resource is updated.
12575	Etag *string `json:"etag,omitempty"`
12576	// Type - READ-ONLY; Sub Resource type.
12577	Type *string `json:"type,omitempty"`
12578	// ID - Resource ID.
12579	ID *string `json:"id,omitempty"`
12580}
12581
12582// MarshalJSON is the custom marshaler for InterfaceTapConfiguration.
12583func (itc InterfaceTapConfiguration) MarshalJSON() ([]byte, error) {
12584	objectMap := make(map[string]interface{})
12585	if itc.InterfaceTapConfigurationPropertiesFormat != nil {
12586		objectMap["properties"] = itc.InterfaceTapConfigurationPropertiesFormat
12587	}
12588	if itc.Name != nil {
12589		objectMap["name"] = itc.Name
12590	}
12591	if itc.Etag != nil {
12592		objectMap["etag"] = itc.Etag
12593	}
12594	if itc.ID != nil {
12595		objectMap["id"] = itc.ID
12596	}
12597	return json.Marshal(objectMap)
12598}
12599
12600// UnmarshalJSON is the custom unmarshaler for InterfaceTapConfiguration struct.
12601func (itc *InterfaceTapConfiguration) UnmarshalJSON(body []byte) error {
12602	var m map[string]*json.RawMessage
12603	err := json.Unmarshal(body, &m)
12604	if err != nil {
12605		return err
12606	}
12607	for k, v := range m {
12608		switch k {
12609		case "properties":
12610			if v != nil {
12611				var interfaceTapConfigurationPropertiesFormat InterfaceTapConfigurationPropertiesFormat
12612				err = json.Unmarshal(*v, &interfaceTapConfigurationPropertiesFormat)
12613				if err != nil {
12614					return err
12615				}
12616				itc.InterfaceTapConfigurationPropertiesFormat = &interfaceTapConfigurationPropertiesFormat
12617			}
12618		case "name":
12619			if v != nil {
12620				var name string
12621				err = json.Unmarshal(*v, &name)
12622				if err != nil {
12623					return err
12624				}
12625				itc.Name = &name
12626			}
12627		case "etag":
12628			if v != nil {
12629				var etag string
12630				err = json.Unmarshal(*v, &etag)
12631				if err != nil {
12632					return err
12633				}
12634				itc.Etag = &etag
12635			}
12636		case "type":
12637			if v != nil {
12638				var typeVar string
12639				err = json.Unmarshal(*v, &typeVar)
12640				if err != nil {
12641					return err
12642				}
12643				itc.Type = &typeVar
12644			}
12645		case "id":
12646			if v != nil {
12647				var ID string
12648				err = json.Unmarshal(*v, &ID)
12649				if err != nil {
12650					return err
12651				}
12652				itc.ID = &ID
12653			}
12654		}
12655	}
12656
12657	return nil
12658}
12659
12660// InterfaceTapConfigurationListResult response for list tap configurations API service call.
12661type InterfaceTapConfigurationListResult struct {
12662	autorest.Response `json:"-"`
12663	// Value - A list of tap configurations.
12664	Value *[]InterfaceTapConfiguration `json:"value,omitempty"`
12665	// NextLink - READ-ONLY; The URL to get the next set of results.
12666	NextLink *string `json:"nextLink,omitempty"`
12667}
12668
12669// MarshalJSON is the custom marshaler for InterfaceTapConfigurationListResult.
12670func (itclr InterfaceTapConfigurationListResult) MarshalJSON() ([]byte, error) {
12671	objectMap := make(map[string]interface{})
12672	if itclr.Value != nil {
12673		objectMap["value"] = itclr.Value
12674	}
12675	return json.Marshal(objectMap)
12676}
12677
12678// InterfaceTapConfigurationListResultIterator provides access to a complete listing of
12679// InterfaceTapConfiguration values.
12680type InterfaceTapConfigurationListResultIterator struct {
12681	i    int
12682	page InterfaceTapConfigurationListResultPage
12683}
12684
12685// NextWithContext advances to the next value.  If there was an error making
12686// the request the iterator does not advance and the error is returned.
12687func (iter *InterfaceTapConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
12688	if tracing.IsEnabled() {
12689		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationListResultIterator.NextWithContext")
12690		defer func() {
12691			sc := -1
12692			if iter.Response().Response.Response != nil {
12693				sc = iter.Response().Response.Response.StatusCode
12694			}
12695			tracing.EndSpan(ctx, sc, err)
12696		}()
12697	}
12698	iter.i++
12699	if iter.i < len(iter.page.Values()) {
12700		return nil
12701	}
12702	err = iter.page.NextWithContext(ctx)
12703	if err != nil {
12704		iter.i--
12705		return err
12706	}
12707	iter.i = 0
12708	return nil
12709}
12710
12711// Next advances to the next value.  If there was an error making
12712// the request the iterator does not advance and the error is returned.
12713// Deprecated: Use NextWithContext() instead.
12714func (iter *InterfaceTapConfigurationListResultIterator) Next() error {
12715	return iter.NextWithContext(context.Background())
12716}
12717
12718// NotDone returns true if the enumeration should be started or is not yet complete.
12719func (iter InterfaceTapConfigurationListResultIterator) NotDone() bool {
12720	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12721}
12722
12723// Response returns the raw server response from the last page request.
12724func (iter InterfaceTapConfigurationListResultIterator) Response() InterfaceTapConfigurationListResult {
12725	return iter.page.Response()
12726}
12727
12728// Value returns the current value or a zero-initialized value if the
12729// iterator has advanced beyond the end of the collection.
12730func (iter InterfaceTapConfigurationListResultIterator) Value() InterfaceTapConfiguration {
12731	if !iter.page.NotDone() {
12732		return InterfaceTapConfiguration{}
12733	}
12734	return iter.page.Values()[iter.i]
12735}
12736
12737// Creates a new instance of the InterfaceTapConfigurationListResultIterator type.
12738func NewInterfaceTapConfigurationListResultIterator(page InterfaceTapConfigurationListResultPage) InterfaceTapConfigurationListResultIterator {
12739	return InterfaceTapConfigurationListResultIterator{page: page}
12740}
12741
12742// IsEmpty returns true if the ListResult contains no values.
12743func (itclr InterfaceTapConfigurationListResult) IsEmpty() bool {
12744	return itclr.Value == nil || len(*itclr.Value) == 0
12745}
12746
12747// hasNextLink returns true if the NextLink is not empty.
12748func (itclr InterfaceTapConfigurationListResult) hasNextLink() bool {
12749	return itclr.NextLink != nil && len(*itclr.NextLink) != 0
12750}
12751
12752// interfaceTapConfigurationListResultPreparer prepares a request to retrieve the next set of results.
12753// It returns nil if no more results exist.
12754func (itclr InterfaceTapConfigurationListResult) interfaceTapConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
12755	if !itclr.hasNextLink() {
12756		return nil, nil
12757	}
12758	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12759		autorest.AsJSON(),
12760		autorest.AsGet(),
12761		autorest.WithBaseURL(to.String(itclr.NextLink)))
12762}
12763
12764// InterfaceTapConfigurationListResultPage contains a page of InterfaceTapConfiguration values.
12765type InterfaceTapConfigurationListResultPage struct {
12766	fn    func(context.Context, InterfaceTapConfigurationListResult) (InterfaceTapConfigurationListResult, error)
12767	itclr InterfaceTapConfigurationListResult
12768}
12769
12770// NextWithContext advances to the next page of values.  If there was an error making
12771// the request the page does not advance and the error is returned.
12772func (page *InterfaceTapConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
12773	if tracing.IsEnabled() {
12774		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationListResultPage.NextWithContext")
12775		defer func() {
12776			sc := -1
12777			if page.Response().Response.Response != nil {
12778				sc = page.Response().Response.Response.StatusCode
12779			}
12780			tracing.EndSpan(ctx, sc, err)
12781		}()
12782	}
12783	for {
12784		next, err := page.fn(ctx, page.itclr)
12785		if err != nil {
12786			return err
12787		}
12788		page.itclr = next
12789		if !next.hasNextLink() || !next.IsEmpty() {
12790			break
12791		}
12792	}
12793	return nil
12794}
12795
12796// Next advances to the next page of values.  If there was an error making
12797// the request the page does not advance and the error is returned.
12798// Deprecated: Use NextWithContext() instead.
12799func (page *InterfaceTapConfigurationListResultPage) Next() error {
12800	return page.NextWithContext(context.Background())
12801}
12802
12803// NotDone returns true if the page enumeration should be started or is not yet complete.
12804func (page InterfaceTapConfigurationListResultPage) NotDone() bool {
12805	return !page.itclr.IsEmpty()
12806}
12807
12808// Response returns the raw server response from the last page request.
12809func (page InterfaceTapConfigurationListResultPage) Response() InterfaceTapConfigurationListResult {
12810	return page.itclr
12811}
12812
12813// Values returns the slice of values for the current page or nil if there are no values.
12814func (page InterfaceTapConfigurationListResultPage) Values() []InterfaceTapConfiguration {
12815	if page.itclr.IsEmpty() {
12816		return nil
12817	}
12818	return *page.itclr.Value
12819}
12820
12821// Creates a new instance of the InterfaceTapConfigurationListResultPage type.
12822func NewInterfaceTapConfigurationListResultPage(cur InterfaceTapConfigurationListResult, getNextPage func(context.Context, InterfaceTapConfigurationListResult) (InterfaceTapConfigurationListResult, error)) InterfaceTapConfigurationListResultPage {
12823	return InterfaceTapConfigurationListResultPage{
12824		fn:    getNextPage,
12825		itclr: cur,
12826	}
12827}
12828
12829// InterfaceTapConfigurationPropertiesFormat properties of Virtual Network Tap configuration.
12830type InterfaceTapConfigurationPropertiesFormat struct {
12831	// VirtualNetworkTap - The reference of the Virtual Network Tap resource.
12832	VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"`
12833	// ProvisioningState - READ-ONLY; The provisioning state of the network interface tap configuration. Possible values are: 'Updating', 'Deleting', and 'Failed'.
12834	ProvisioningState *string `json:"provisioningState,omitempty"`
12835}
12836
12837// MarshalJSON is the custom marshaler for InterfaceTapConfigurationPropertiesFormat.
12838func (itcpf InterfaceTapConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
12839	objectMap := make(map[string]interface{})
12840	if itcpf.VirtualNetworkTap != nil {
12841		objectMap["virtualNetworkTap"] = itcpf.VirtualNetworkTap
12842	}
12843	return json.Marshal(objectMap)
12844}
12845
12846// InterfaceTapConfigurationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
12847// of a long-running operation.
12848type InterfaceTapConfigurationsCreateOrUpdateFuture struct {
12849	azure.FutureAPI
12850	// Result returns the result of the asynchronous operation.
12851	// If the operation has not completed it will return an error.
12852	Result func(InterfaceTapConfigurationsClient) (InterfaceTapConfiguration, error)
12853}
12854
12855// InterfaceTapConfigurationsDeleteFuture an abstraction for monitoring and retrieving the results of a
12856// long-running operation.
12857type InterfaceTapConfigurationsDeleteFuture struct {
12858	azure.FutureAPI
12859	// Result returns the result of the asynchronous operation.
12860	// If the operation has not completed it will return an error.
12861	Result func(InterfaceTapConfigurationsClient) (autorest.Response, error)
12862}
12863
12864// IPAddressAvailabilityResult response for CheckIPAddressAvailability API service call
12865type IPAddressAvailabilityResult struct {
12866	autorest.Response `json:"-"`
12867	// Available - Private IP address availability.
12868	Available *bool `json:"available,omitempty"`
12869	// AvailableIPAddresses - Contains other available private IP addresses if the asked for address is taken.
12870	AvailableIPAddresses *[]string `json:"availableIPAddresses,omitempty"`
12871}
12872
12873// IPConfiguration IP configuration
12874type IPConfiguration struct {
12875	// IPConfigurationPropertiesFormat - Properties of the IP configuration
12876	*IPConfigurationPropertiesFormat `json:"properties,omitempty"`
12877	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
12878	Name *string `json:"name,omitempty"`
12879	// Etag - A unique read-only string that changes whenever the resource is updated.
12880	Etag *string `json:"etag,omitempty"`
12881	// ID - Resource ID.
12882	ID *string `json:"id,omitempty"`
12883}
12884
12885// MarshalJSON is the custom marshaler for IPConfiguration.
12886func (ic IPConfiguration) MarshalJSON() ([]byte, error) {
12887	objectMap := make(map[string]interface{})
12888	if ic.IPConfigurationPropertiesFormat != nil {
12889		objectMap["properties"] = ic.IPConfigurationPropertiesFormat
12890	}
12891	if ic.Name != nil {
12892		objectMap["name"] = ic.Name
12893	}
12894	if ic.Etag != nil {
12895		objectMap["etag"] = ic.Etag
12896	}
12897	if ic.ID != nil {
12898		objectMap["id"] = ic.ID
12899	}
12900	return json.Marshal(objectMap)
12901}
12902
12903// UnmarshalJSON is the custom unmarshaler for IPConfiguration struct.
12904func (ic *IPConfiguration) UnmarshalJSON(body []byte) error {
12905	var m map[string]*json.RawMessage
12906	err := json.Unmarshal(body, &m)
12907	if err != nil {
12908		return err
12909	}
12910	for k, v := range m {
12911		switch k {
12912		case "properties":
12913			if v != nil {
12914				var IPConfigurationPropertiesFormat IPConfigurationPropertiesFormat
12915				err = json.Unmarshal(*v, &IPConfigurationPropertiesFormat)
12916				if err != nil {
12917					return err
12918				}
12919				ic.IPConfigurationPropertiesFormat = &IPConfigurationPropertiesFormat
12920			}
12921		case "name":
12922			if v != nil {
12923				var name string
12924				err = json.Unmarshal(*v, &name)
12925				if err != nil {
12926					return err
12927				}
12928				ic.Name = &name
12929			}
12930		case "etag":
12931			if v != nil {
12932				var etag string
12933				err = json.Unmarshal(*v, &etag)
12934				if err != nil {
12935					return err
12936				}
12937				ic.Etag = &etag
12938			}
12939		case "id":
12940			if v != nil {
12941				var ID string
12942				err = json.Unmarshal(*v, &ID)
12943				if err != nil {
12944					return err
12945				}
12946				ic.ID = &ID
12947			}
12948		}
12949	}
12950
12951	return nil
12952}
12953
12954// IPConfigurationProfile IP configuration profile child resource.
12955type IPConfigurationProfile struct {
12956	// IPConfigurationProfilePropertiesFormat - Properties of the IP configuration profile.
12957	*IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"`
12958	// Name - The name of the resource. This name can be used to access the resource.
12959	Name *string `json:"name,omitempty"`
12960	// Type - READ-ONLY; Sub Resource type.
12961	Type *string `json:"type,omitempty"`
12962	// Etag - A unique read-only string that changes whenever the resource is updated.
12963	Etag *string `json:"etag,omitempty"`
12964	// ID - Resource ID.
12965	ID *string `json:"id,omitempty"`
12966}
12967
12968// MarshalJSON is the custom marshaler for IPConfigurationProfile.
12969func (icp IPConfigurationProfile) MarshalJSON() ([]byte, error) {
12970	objectMap := make(map[string]interface{})
12971	if icp.IPConfigurationProfilePropertiesFormat != nil {
12972		objectMap["properties"] = icp.IPConfigurationProfilePropertiesFormat
12973	}
12974	if icp.Name != nil {
12975		objectMap["name"] = icp.Name
12976	}
12977	if icp.Etag != nil {
12978		objectMap["etag"] = icp.Etag
12979	}
12980	if icp.ID != nil {
12981		objectMap["id"] = icp.ID
12982	}
12983	return json.Marshal(objectMap)
12984}
12985
12986// UnmarshalJSON is the custom unmarshaler for IPConfigurationProfile struct.
12987func (icp *IPConfigurationProfile) UnmarshalJSON(body []byte) error {
12988	var m map[string]*json.RawMessage
12989	err := json.Unmarshal(body, &m)
12990	if err != nil {
12991		return err
12992	}
12993	for k, v := range m {
12994		switch k {
12995		case "properties":
12996			if v != nil {
12997				var IPConfigurationProfilePropertiesFormat IPConfigurationProfilePropertiesFormat
12998				err = json.Unmarshal(*v, &IPConfigurationProfilePropertiesFormat)
12999				if err != nil {
13000					return err
13001				}
13002				icp.IPConfigurationProfilePropertiesFormat = &IPConfigurationProfilePropertiesFormat
13003			}
13004		case "name":
13005			if v != nil {
13006				var name string
13007				err = json.Unmarshal(*v, &name)
13008				if err != nil {
13009					return err
13010				}
13011				icp.Name = &name
13012			}
13013		case "type":
13014			if v != nil {
13015				var typeVar string
13016				err = json.Unmarshal(*v, &typeVar)
13017				if err != nil {
13018					return err
13019				}
13020				icp.Type = &typeVar
13021			}
13022		case "etag":
13023			if v != nil {
13024				var etag string
13025				err = json.Unmarshal(*v, &etag)
13026				if err != nil {
13027					return err
13028				}
13029				icp.Etag = &etag
13030			}
13031		case "id":
13032			if v != nil {
13033				var ID string
13034				err = json.Unmarshal(*v, &ID)
13035				if err != nil {
13036					return err
13037				}
13038				icp.ID = &ID
13039			}
13040		}
13041	}
13042
13043	return nil
13044}
13045
13046// IPConfigurationProfilePropertiesFormat IP configuration profile properties.
13047type IPConfigurationProfilePropertiesFormat struct {
13048	// Subnet - The reference of the subnet resource to create a container network interface ip configuration.
13049	Subnet *Subnet `json:"subnet,omitempty"`
13050	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
13051	ProvisioningState *string `json:"provisioningState,omitempty"`
13052}
13053
13054// MarshalJSON is the custom marshaler for IPConfigurationProfilePropertiesFormat.
13055func (icppf IPConfigurationProfilePropertiesFormat) MarshalJSON() ([]byte, error) {
13056	objectMap := make(map[string]interface{})
13057	if icppf.Subnet != nil {
13058		objectMap["subnet"] = icppf.Subnet
13059	}
13060	return json.Marshal(objectMap)
13061}
13062
13063// IPConfigurationPropertiesFormat properties of IP configuration.
13064type IPConfigurationPropertiesFormat struct {
13065	// PrivateIPAddress - The private IP address of the IP configuration.
13066	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
13067	// PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'Static', 'Dynamic'
13068	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
13069	// Subnet - The reference of the subnet resource.
13070	Subnet *Subnet `json:"subnet,omitempty"`
13071	// PublicIPAddress - The reference of the public IP resource.
13072	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
13073	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
13074	ProvisioningState *string `json:"provisioningState,omitempty"`
13075}
13076
13077// IpsecPolicy an IPSec Policy configuration for a virtual network gateway connection
13078type IpsecPolicy struct {
13079	// SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for a site to site VPN tunnel.
13080	SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"`
13081	// SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for a site to site VPN tunnel.
13082	SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"`
13083	// IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256'
13084	IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"`
13085	// IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256'
13086	IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"`
13087	// IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128'
13088	IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"`
13089	// IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'IkeIntegrityMD5', 'IkeIntegritySHA1', 'IkeIntegritySHA256', 'IkeIntegritySHA384', 'IkeIntegrityGCMAES256', 'IkeIntegrityGCMAES128'
13090	IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"`
13091	// DhGroup - The DH Group used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24'
13092	DhGroup DhGroup `json:"dhGroup,omitempty"`
13093	// PfsGroup - The Pfs Group used in IKE Phase 2 for new child SA. Possible values include: 'PfsGroupNone', 'PfsGroupPFS1', 'PfsGroupPFS2', 'PfsGroupPFS2048', 'PfsGroupECP256', 'PfsGroupECP384', 'PfsGroupPFS24', 'PfsGroupPFS14', 'PfsGroupPFSMM'
13094	PfsGroup PfsGroup `json:"pfsGroup,omitempty"`
13095}
13096
13097// IPTag contains the IpTag associated with the object
13098type IPTag struct {
13099	// IPTagType - Gets or sets the ipTag type: Example FirstPartyUsage.
13100	IPTagType *string `json:"ipTagType,omitempty"`
13101	// Tag - Gets or sets value of the IpTag associated with the public IP. Example SQL, Storage etc
13102	Tag *string `json:"tag,omitempty"`
13103}
13104
13105// Ipv6ExpressRouteCircuitPeeringConfig contains IPv6 peering config.
13106type Ipv6ExpressRouteCircuitPeeringConfig struct {
13107	// PrimaryPeerAddressPrefix - The primary address prefix.
13108	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
13109	// SecondaryPeerAddressPrefix - The secondary address prefix.
13110	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
13111	// MicrosoftPeeringConfig - The Microsoft peering configuration.
13112	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
13113	// RouteFilter - The reference of the RouteFilter resource.
13114	RouteFilter *RouteFilter `json:"routeFilter,omitempty"`
13115	// State - The state of peering. Possible values are: 'Disabled' and 'Enabled'. Possible values include: 'ExpressRouteCircuitPeeringStateDisabled', 'ExpressRouteCircuitPeeringStateEnabled'
13116	State ExpressRouteCircuitPeeringState `json:"state,omitempty"`
13117}
13118
13119// ListHubVirtualNetworkConnectionsResult list of HubVirtualNetworkConnections and a URL nextLink to get
13120// the next set of results.
13121type ListHubVirtualNetworkConnectionsResult struct {
13122	autorest.Response `json:"-"`
13123	// Value - List of HubVirtualNetworkConnections.
13124	Value *[]HubVirtualNetworkConnection `json:"value,omitempty"`
13125	// NextLink - URL to get the next set of operation list results if there are any.
13126	NextLink *string `json:"nextLink,omitempty"`
13127}
13128
13129// ListHubVirtualNetworkConnectionsResultIterator provides access to a complete listing of
13130// HubVirtualNetworkConnection values.
13131type ListHubVirtualNetworkConnectionsResultIterator struct {
13132	i    int
13133	page ListHubVirtualNetworkConnectionsResultPage
13134}
13135
13136// NextWithContext advances to the next value.  If there was an error making
13137// the request the iterator does not advance and the error is returned.
13138func (iter *ListHubVirtualNetworkConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
13139	if tracing.IsEnabled() {
13140		ctx = tracing.StartSpan(ctx, fqdn+"/ListHubVirtualNetworkConnectionsResultIterator.NextWithContext")
13141		defer func() {
13142			sc := -1
13143			if iter.Response().Response.Response != nil {
13144				sc = iter.Response().Response.Response.StatusCode
13145			}
13146			tracing.EndSpan(ctx, sc, err)
13147		}()
13148	}
13149	iter.i++
13150	if iter.i < len(iter.page.Values()) {
13151		return nil
13152	}
13153	err = iter.page.NextWithContext(ctx)
13154	if err != nil {
13155		iter.i--
13156		return err
13157	}
13158	iter.i = 0
13159	return nil
13160}
13161
13162// Next advances to the next value.  If there was an error making
13163// the request the iterator does not advance and the error is returned.
13164// Deprecated: Use NextWithContext() instead.
13165func (iter *ListHubVirtualNetworkConnectionsResultIterator) Next() error {
13166	return iter.NextWithContext(context.Background())
13167}
13168
13169// NotDone returns true if the enumeration should be started or is not yet complete.
13170func (iter ListHubVirtualNetworkConnectionsResultIterator) NotDone() bool {
13171	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13172}
13173
13174// Response returns the raw server response from the last page request.
13175func (iter ListHubVirtualNetworkConnectionsResultIterator) Response() ListHubVirtualNetworkConnectionsResult {
13176	return iter.page.Response()
13177}
13178
13179// Value returns the current value or a zero-initialized value if the
13180// iterator has advanced beyond the end of the collection.
13181func (iter ListHubVirtualNetworkConnectionsResultIterator) Value() HubVirtualNetworkConnection {
13182	if !iter.page.NotDone() {
13183		return HubVirtualNetworkConnection{}
13184	}
13185	return iter.page.Values()[iter.i]
13186}
13187
13188// Creates a new instance of the ListHubVirtualNetworkConnectionsResultIterator type.
13189func NewListHubVirtualNetworkConnectionsResultIterator(page ListHubVirtualNetworkConnectionsResultPage) ListHubVirtualNetworkConnectionsResultIterator {
13190	return ListHubVirtualNetworkConnectionsResultIterator{page: page}
13191}
13192
13193// IsEmpty returns true if the ListResult contains no values.
13194func (lhvncr ListHubVirtualNetworkConnectionsResult) IsEmpty() bool {
13195	return lhvncr.Value == nil || len(*lhvncr.Value) == 0
13196}
13197
13198// hasNextLink returns true if the NextLink is not empty.
13199func (lhvncr ListHubVirtualNetworkConnectionsResult) hasNextLink() bool {
13200	return lhvncr.NextLink != nil && len(*lhvncr.NextLink) != 0
13201}
13202
13203// listHubVirtualNetworkConnectionsResultPreparer prepares a request to retrieve the next set of results.
13204// It returns nil if no more results exist.
13205func (lhvncr ListHubVirtualNetworkConnectionsResult) listHubVirtualNetworkConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
13206	if !lhvncr.hasNextLink() {
13207		return nil, nil
13208	}
13209	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13210		autorest.AsJSON(),
13211		autorest.AsGet(),
13212		autorest.WithBaseURL(to.String(lhvncr.NextLink)))
13213}
13214
13215// ListHubVirtualNetworkConnectionsResultPage contains a page of HubVirtualNetworkConnection values.
13216type ListHubVirtualNetworkConnectionsResultPage struct {
13217	fn     func(context.Context, ListHubVirtualNetworkConnectionsResult) (ListHubVirtualNetworkConnectionsResult, error)
13218	lhvncr ListHubVirtualNetworkConnectionsResult
13219}
13220
13221// NextWithContext advances to the next page of values.  If there was an error making
13222// the request the page does not advance and the error is returned.
13223func (page *ListHubVirtualNetworkConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
13224	if tracing.IsEnabled() {
13225		ctx = tracing.StartSpan(ctx, fqdn+"/ListHubVirtualNetworkConnectionsResultPage.NextWithContext")
13226		defer func() {
13227			sc := -1
13228			if page.Response().Response.Response != nil {
13229				sc = page.Response().Response.Response.StatusCode
13230			}
13231			tracing.EndSpan(ctx, sc, err)
13232		}()
13233	}
13234	for {
13235		next, err := page.fn(ctx, page.lhvncr)
13236		if err != nil {
13237			return err
13238		}
13239		page.lhvncr = next
13240		if !next.hasNextLink() || !next.IsEmpty() {
13241			break
13242		}
13243	}
13244	return nil
13245}
13246
13247// Next advances to the next page of values.  If there was an error making
13248// the request the page does not advance and the error is returned.
13249// Deprecated: Use NextWithContext() instead.
13250func (page *ListHubVirtualNetworkConnectionsResultPage) Next() error {
13251	return page.NextWithContext(context.Background())
13252}
13253
13254// NotDone returns true if the page enumeration should be started or is not yet complete.
13255func (page ListHubVirtualNetworkConnectionsResultPage) NotDone() bool {
13256	return !page.lhvncr.IsEmpty()
13257}
13258
13259// Response returns the raw server response from the last page request.
13260func (page ListHubVirtualNetworkConnectionsResultPage) Response() ListHubVirtualNetworkConnectionsResult {
13261	return page.lhvncr
13262}
13263
13264// Values returns the slice of values for the current page or nil if there are no values.
13265func (page ListHubVirtualNetworkConnectionsResultPage) Values() []HubVirtualNetworkConnection {
13266	if page.lhvncr.IsEmpty() {
13267		return nil
13268	}
13269	return *page.lhvncr.Value
13270}
13271
13272// Creates a new instance of the ListHubVirtualNetworkConnectionsResultPage type.
13273func NewListHubVirtualNetworkConnectionsResultPage(cur ListHubVirtualNetworkConnectionsResult, getNextPage func(context.Context, ListHubVirtualNetworkConnectionsResult) (ListHubVirtualNetworkConnectionsResult, error)) ListHubVirtualNetworkConnectionsResultPage {
13274	return ListHubVirtualNetworkConnectionsResultPage{
13275		fn:     getNextPage,
13276		lhvncr: cur,
13277	}
13278}
13279
13280// ListP2SVpnGatewaysResult result of the request to list P2SVpnGateways. It contains a list of
13281// P2SVpnGateways and a URL nextLink to get the next set of results.
13282type ListP2SVpnGatewaysResult struct {
13283	autorest.Response `json:"-"`
13284	// Value - List of P2SVpnGateways.
13285	Value *[]P2SVpnGateway `json:"value,omitempty"`
13286	// NextLink - URL to get the next set of operation list results if there are any.
13287	NextLink *string `json:"nextLink,omitempty"`
13288}
13289
13290// ListP2SVpnGatewaysResultIterator provides access to a complete listing of P2SVpnGateway values.
13291type ListP2SVpnGatewaysResultIterator struct {
13292	i    int
13293	page ListP2SVpnGatewaysResultPage
13294}
13295
13296// NextWithContext advances to the next value.  If there was an error making
13297// the request the iterator does not advance and the error is returned.
13298func (iter *ListP2SVpnGatewaysResultIterator) NextWithContext(ctx context.Context) (err error) {
13299	if tracing.IsEnabled() {
13300		ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnGatewaysResultIterator.NextWithContext")
13301		defer func() {
13302			sc := -1
13303			if iter.Response().Response.Response != nil {
13304				sc = iter.Response().Response.Response.StatusCode
13305			}
13306			tracing.EndSpan(ctx, sc, err)
13307		}()
13308	}
13309	iter.i++
13310	if iter.i < len(iter.page.Values()) {
13311		return nil
13312	}
13313	err = iter.page.NextWithContext(ctx)
13314	if err != nil {
13315		iter.i--
13316		return err
13317	}
13318	iter.i = 0
13319	return nil
13320}
13321
13322// Next advances to the next value.  If there was an error making
13323// the request the iterator does not advance and the error is returned.
13324// Deprecated: Use NextWithContext() instead.
13325func (iter *ListP2SVpnGatewaysResultIterator) Next() error {
13326	return iter.NextWithContext(context.Background())
13327}
13328
13329// NotDone returns true if the enumeration should be started or is not yet complete.
13330func (iter ListP2SVpnGatewaysResultIterator) NotDone() bool {
13331	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13332}
13333
13334// Response returns the raw server response from the last page request.
13335func (iter ListP2SVpnGatewaysResultIterator) Response() ListP2SVpnGatewaysResult {
13336	return iter.page.Response()
13337}
13338
13339// Value returns the current value or a zero-initialized value if the
13340// iterator has advanced beyond the end of the collection.
13341func (iter ListP2SVpnGatewaysResultIterator) Value() P2SVpnGateway {
13342	if !iter.page.NotDone() {
13343		return P2SVpnGateway{}
13344	}
13345	return iter.page.Values()[iter.i]
13346}
13347
13348// Creates a new instance of the ListP2SVpnGatewaysResultIterator type.
13349func NewListP2SVpnGatewaysResultIterator(page ListP2SVpnGatewaysResultPage) ListP2SVpnGatewaysResultIterator {
13350	return ListP2SVpnGatewaysResultIterator{page: page}
13351}
13352
13353// IsEmpty returns true if the ListResult contains no values.
13354func (lpvgr ListP2SVpnGatewaysResult) IsEmpty() bool {
13355	return lpvgr.Value == nil || len(*lpvgr.Value) == 0
13356}
13357
13358// hasNextLink returns true if the NextLink is not empty.
13359func (lpvgr ListP2SVpnGatewaysResult) hasNextLink() bool {
13360	return lpvgr.NextLink != nil && len(*lpvgr.NextLink) != 0
13361}
13362
13363// listP2SVpnGatewaysResultPreparer prepares a request to retrieve the next set of results.
13364// It returns nil if no more results exist.
13365func (lpvgr ListP2SVpnGatewaysResult) listP2SVpnGatewaysResultPreparer(ctx context.Context) (*http.Request, error) {
13366	if !lpvgr.hasNextLink() {
13367		return nil, nil
13368	}
13369	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13370		autorest.AsJSON(),
13371		autorest.AsGet(),
13372		autorest.WithBaseURL(to.String(lpvgr.NextLink)))
13373}
13374
13375// ListP2SVpnGatewaysResultPage contains a page of P2SVpnGateway values.
13376type ListP2SVpnGatewaysResultPage struct {
13377	fn    func(context.Context, ListP2SVpnGatewaysResult) (ListP2SVpnGatewaysResult, error)
13378	lpvgr ListP2SVpnGatewaysResult
13379}
13380
13381// NextWithContext advances to the next page of values.  If there was an error making
13382// the request the page does not advance and the error is returned.
13383func (page *ListP2SVpnGatewaysResultPage) NextWithContext(ctx context.Context) (err error) {
13384	if tracing.IsEnabled() {
13385		ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnGatewaysResultPage.NextWithContext")
13386		defer func() {
13387			sc := -1
13388			if page.Response().Response.Response != nil {
13389				sc = page.Response().Response.Response.StatusCode
13390			}
13391			tracing.EndSpan(ctx, sc, err)
13392		}()
13393	}
13394	for {
13395		next, err := page.fn(ctx, page.lpvgr)
13396		if err != nil {
13397			return err
13398		}
13399		page.lpvgr = next
13400		if !next.hasNextLink() || !next.IsEmpty() {
13401			break
13402		}
13403	}
13404	return nil
13405}
13406
13407// Next advances to the next page of values.  If there was an error making
13408// the request the page does not advance and the error is returned.
13409// Deprecated: Use NextWithContext() instead.
13410func (page *ListP2SVpnGatewaysResultPage) Next() error {
13411	return page.NextWithContext(context.Background())
13412}
13413
13414// NotDone returns true if the page enumeration should be started or is not yet complete.
13415func (page ListP2SVpnGatewaysResultPage) NotDone() bool {
13416	return !page.lpvgr.IsEmpty()
13417}
13418
13419// Response returns the raw server response from the last page request.
13420func (page ListP2SVpnGatewaysResultPage) Response() ListP2SVpnGatewaysResult {
13421	return page.lpvgr
13422}
13423
13424// Values returns the slice of values for the current page or nil if there are no values.
13425func (page ListP2SVpnGatewaysResultPage) Values() []P2SVpnGateway {
13426	if page.lpvgr.IsEmpty() {
13427		return nil
13428	}
13429	return *page.lpvgr.Value
13430}
13431
13432// Creates a new instance of the ListP2SVpnGatewaysResultPage type.
13433func NewListP2SVpnGatewaysResultPage(cur ListP2SVpnGatewaysResult, getNextPage func(context.Context, ListP2SVpnGatewaysResult) (ListP2SVpnGatewaysResult, error)) ListP2SVpnGatewaysResultPage {
13434	return ListP2SVpnGatewaysResultPage{
13435		fn:    getNextPage,
13436		lpvgr: cur,
13437	}
13438}
13439
13440// ListP2SVpnServerConfigurationsResult result of the request to list all P2SVpnServerConfigurations
13441// associated to a VirtualWan. It contains a list of P2SVpnServerConfigurations and a URL nextLink to get
13442// the next set of results.
13443type ListP2SVpnServerConfigurationsResult struct {
13444	autorest.Response `json:"-"`
13445	// Value - List of P2SVpnServerConfigurations.
13446	Value *[]P2SVpnServerConfiguration `json:"value,omitempty"`
13447	// NextLink - URL to get the next set of operation list results if there are any.
13448	NextLink *string `json:"nextLink,omitempty"`
13449}
13450
13451// ListP2SVpnServerConfigurationsResultIterator provides access to a complete listing of
13452// P2SVpnServerConfiguration values.
13453type ListP2SVpnServerConfigurationsResultIterator struct {
13454	i    int
13455	page ListP2SVpnServerConfigurationsResultPage
13456}
13457
13458// NextWithContext advances to the next value.  If there was an error making
13459// the request the iterator does not advance and the error is returned.
13460func (iter *ListP2SVpnServerConfigurationsResultIterator) NextWithContext(ctx context.Context) (err error) {
13461	if tracing.IsEnabled() {
13462		ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnServerConfigurationsResultIterator.NextWithContext")
13463		defer func() {
13464			sc := -1
13465			if iter.Response().Response.Response != nil {
13466				sc = iter.Response().Response.Response.StatusCode
13467			}
13468			tracing.EndSpan(ctx, sc, err)
13469		}()
13470	}
13471	iter.i++
13472	if iter.i < len(iter.page.Values()) {
13473		return nil
13474	}
13475	err = iter.page.NextWithContext(ctx)
13476	if err != nil {
13477		iter.i--
13478		return err
13479	}
13480	iter.i = 0
13481	return nil
13482}
13483
13484// Next advances to the next value.  If there was an error making
13485// the request the iterator does not advance and the error is returned.
13486// Deprecated: Use NextWithContext() instead.
13487func (iter *ListP2SVpnServerConfigurationsResultIterator) Next() error {
13488	return iter.NextWithContext(context.Background())
13489}
13490
13491// NotDone returns true if the enumeration should be started or is not yet complete.
13492func (iter ListP2SVpnServerConfigurationsResultIterator) NotDone() bool {
13493	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13494}
13495
13496// Response returns the raw server response from the last page request.
13497func (iter ListP2SVpnServerConfigurationsResultIterator) Response() ListP2SVpnServerConfigurationsResult {
13498	return iter.page.Response()
13499}
13500
13501// Value returns the current value or a zero-initialized value if the
13502// iterator has advanced beyond the end of the collection.
13503func (iter ListP2SVpnServerConfigurationsResultIterator) Value() P2SVpnServerConfiguration {
13504	if !iter.page.NotDone() {
13505		return P2SVpnServerConfiguration{}
13506	}
13507	return iter.page.Values()[iter.i]
13508}
13509
13510// Creates a new instance of the ListP2SVpnServerConfigurationsResultIterator type.
13511func NewListP2SVpnServerConfigurationsResultIterator(page ListP2SVpnServerConfigurationsResultPage) ListP2SVpnServerConfigurationsResultIterator {
13512	return ListP2SVpnServerConfigurationsResultIterator{page: page}
13513}
13514
13515// IsEmpty returns true if the ListResult contains no values.
13516func (lpvscr ListP2SVpnServerConfigurationsResult) IsEmpty() bool {
13517	return lpvscr.Value == nil || len(*lpvscr.Value) == 0
13518}
13519
13520// hasNextLink returns true if the NextLink is not empty.
13521func (lpvscr ListP2SVpnServerConfigurationsResult) hasNextLink() bool {
13522	return lpvscr.NextLink != nil && len(*lpvscr.NextLink) != 0
13523}
13524
13525// listP2SVpnServerConfigurationsResultPreparer prepares a request to retrieve the next set of results.
13526// It returns nil if no more results exist.
13527func (lpvscr ListP2SVpnServerConfigurationsResult) listP2SVpnServerConfigurationsResultPreparer(ctx context.Context) (*http.Request, error) {
13528	if !lpvscr.hasNextLink() {
13529		return nil, nil
13530	}
13531	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13532		autorest.AsJSON(),
13533		autorest.AsGet(),
13534		autorest.WithBaseURL(to.String(lpvscr.NextLink)))
13535}
13536
13537// ListP2SVpnServerConfigurationsResultPage contains a page of P2SVpnServerConfiguration values.
13538type ListP2SVpnServerConfigurationsResultPage struct {
13539	fn     func(context.Context, ListP2SVpnServerConfigurationsResult) (ListP2SVpnServerConfigurationsResult, error)
13540	lpvscr ListP2SVpnServerConfigurationsResult
13541}
13542
13543// NextWithContext advances to the next page of values.  If there was an error making
13544// the request the page does not advance and the error is returned.
13545func (page *ListP2SVpnServerConfigurationsResultPage) NextWithContext(ctx context.Context) (err error) {
13546	if tracing.IsEnabled() {
13547		ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnServerConfigurationsResultPage.NextWithContext")
13548		defer func() {
13549			sc := -1
13550			if page.Response().Response.Response != nil {
13551				sc = page.Response().Response.Response.StatusCode
13552			}
13553			tracing.EndSpan(ctx, sc, err)
13554		}()
13555	}
13556	for {
13557		next, err := page.fn(ctx, page.lpvscr)
13558		if err != nil {
13559			return err
13560		}
13561		page.lpvscr = next
13562		if !next.hasNextLink() || !next.IsEmpty() {
13563			break
13564		}
13565	}
13566	return nil
13567}
13568
13569// Next advances to the next page of values.  If there was an error making
13570// the request the page does not advance and the error is returned.
13571// Deprecated: Use NextWithContext() instead.
13572func (page *ListP2SVpnServerConfigurationsResultPage) Next() error {
13573	return page.NextWithContext(context.Background())
13574}
13575
13576// NotDone returns true if the page enumeration should be started or is not yet complete.
13577func (page ListP2SVpnServerConfigurationsResultPage) NotDone() bool {
13578	return !page.lpvscr.IsEmpty()
13579}
13580
13581// Response returns the raw server response from the last page request.
13582func (page ListP2SVpnServerConfigurationsResultPage) Response() ListP2SVpnServerConfigurationsResult {
13583	return page.lpvscr
13584}
13585
13586// Values returns the slice of values for the current page or nil if there are no values.
13587func (page ListP2SVpnServerConfigurationsResultPage) Values() []P2SVpnServerConfiguration {
13588	if page.lpvscr.IsEmpty() {
13589		return nil
13590	}
13591	return *page.lpvscr.Value
13592}
13593
13594// Creates a new instance of the ListP2SVpnServerConfigurationsResultPage type.
13595func NewListP2SVpnServerConfigurationsResultPage(cur ListP2SVpnServerConfigurationsResult, getNextPage func(context.Context, ListP2SVpnServerConfigurationsResult) (ListP2SVpnServerConfigurationsResult, error)) ListP2SVpnServerConfigurationsResultPage {
13596	return ListP2SVpnServerConfigurationsResultPage{
13597		fn:     getNextPage,
13598		lpvscr: cur,
13599	}
13600}
13601
13602// ListString ...
13603type ListString struct {
13604	autorest.Response `json:"-"`
13605	Value             *[]string `json:"value,omitempty"`
13606}
13607
13608// ListVirtualHubsResult result of the request to list VirtualHubs. It contains a list of VirtualHubs and a
13609// URL nextLink to get the next set of results.
13610type ListVirtualHubsResult struct {
13611	autorest.Response `json:"-"`
13612	// Value - List of VirtualHubs.
13613	Value *[]VirtualHub `json:"value,omitempty"`
13614	// NextLink - URL to get the next set of operation list results if there are any.
13615	NextLink *string `json:"nextLink,omitempty"`
13616}
13617
13618// ListVirtualHubsResultIterator provides access to a complete listing of VirtualHub values.
13619type ListVirtualHubsResultIterator struct {
13620	i    int
13621	page ListVirtualHubsResultPage
13622}
13623
13624// NextWithContext advances to the next value.  If there was an error making
13625// the request the iterator does not advance and the error is returned.
13626func (iter *ListVirtualHubsResultIterator) NextWithContext(ctx context.Context) (err error) {
13627	if tracing.IsEnabled() {
13628		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubsResultIterator.NextWithContext")
13629		defer func() {
13630			sc := -1
13631			if iter.Response().Response.Response != nil {
13632				sc = iter.Response().Response.Response.StatusCode
13633			}
13634			tracing.EndSpan(ctx, sc, err)
13635		}()
13636	}
13637	iter.i++
13638	if iter.i < len(iter.page.Values()) {
13639		return nil
13640	}
13641	err = iter.page.NextWithContext(ctx)
13642	if err != nil {
13643		iter.i--
13644		return err
13645	}
13646	iter.i = 0
13647	return nil
13648}
13649
13650// Next advances to the next value.  If there was an error making
13651// the request the iterator does not advance and the error is returned.
13652// Deprecated: Use NextWithContext() instead.
13653func (iter *ListVirtualHubsResultIterator) Next() error {
13654	return iter.NextWithContext(context.Background())
13655}
13656
13657// NotDone returns true if the enumeration should be started or is not yet complete.
13658func (iter ListVirtualHubsResultIterator) NotDone() bool {
13659	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13660}
13661
13662// Response returns the raw server response from the last page request.
13663func (iter ListVirtualHubsResultIterator) Response() ListVirtualHubsResult {
13664	return iter.page.Response()
13665}
13666
13667// Value returns the current value or a zero-initialized value if the
13668// iterator has advanced beyond the end of the collection.
13669func (iter ListVirtualHubsResultIterator) Value() VirtualHub {
13670	if !iter.page.NotDone() {
13671		return VirtualHub{}
13672	}
13673	return iter.page.Values()[iter.i]
13674}
13675
13676// Creates a new instance of the ListVirtualHubsResultIterator type.
13677func NewListVirtualHubsResultIterator(page ListVirtualHubsResultPage) ListVirtualHubsResultIterator {
13678	return ListVirtualHubsResultIterator{page: page}
13679}
13680
13681// IsEmpty returns true if the ListResult contains no values.
13682func (lvhr ListVirtualHubsResult) IsEmpty() bool {
13683	return lvhr.Value == nil || len(*lvhr.Value) == 0
13684}
13685
13686// hasNextLink returns true if the NextLink is not empty.
13687func (lvhr ListVirtualHubsResult) hasNextLink() bool {
13688	return lvhr.NextLink != nil && len(*lvhr.NextLink) != 0
13689}
13690
13691// listVirtualHubsResultPreparer prepares a request to retrieve the next set of results.
13692// It returns nil if no more results exist.
13693func (lvhr ListVirtualHubsResult) listVirtualHubsResultPreparer(ctx context.Context) (*http.Request, error) {
13694	if !lvhr.hasNextLink() {
13695		return nil, nil
13696	}
13697	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13698		autorest.AsJSON(),
13699		autorest.AsGet(),
13700		autorest.WithBaseURL(to.String(lvhr.NextLink)))
13701}
13702
13703// ListVirtualHubsResultPage contains a page of VirtualHub values.
13704type ListVirtualHubsResultPage struct {
13705	fn   func(context.Context, ListVirtualHubsResult) (ListVirtualHubsResult, error)
13706	lvhr ListVirtualHubsResult
13707}
13708
13709// NextWithContext advances to the next page of values.  If there was an error making
13710// the request the page does not advance and the error is returned.
13711func (page *ListVirtualHubsResultPage) NextWithContext(ctx context.Context) (err error) {
13712	if tracing.IsEnabled() {
13713		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubsResultPage.NextWithContext")
13714		defer func() {
13715			sc := -1
13716			if page.Response().Response.Response != nil {
13717				sc = page.Response().Response.Response.StatusCode
13718			}
13719			tracing.EndSpan(ctx, sc, err)
13720		}()
13721	}
13722	for {
13723		next, err := page.fn(ctx, page.lvhr)
13724		if err != nil {
13725			return err
13726		}
13727		page.lvhr = next
13728		if !next.hasNextLink() || !next.IsEmpty() {
13729			break
13730		}
13731	}
13732	return nil
13733}
13734
13735// Next advances to the next page of values.  If there was an error making
13736// the request the page does not advance and the error is returned.
13737// Deprecated: Use NextWithContext() instead.
13738func (page *ListVirtualHubsResultPage) Next() error {
13739	return page.NextWithContext(context.Background())
13740}
13741
13742// NotDone returns true if the page enumeration should be started or is not yet complete.
13743func (page ListVirtualHubsResultPage) NotDone() bool {
13744	return !page.lvhr.IsEmpty()
13745}
13746
13747// Response returns the raw server response from the last page request.
13748func (page ListVirtualHubsResultPage) Response() ListVirtualHubsResult {
13749	return page.lvhr
13750}
13751
13752// Values returns the slice of values for the current page or nil if there are no values.
13753func (page ListVirtualHubsResultPage) Values() []VirtualHub {
13754	if page.lvhr.IsEmpty() {
13755		return nil
13756	}
13757	return *page.lvhr.Value
13758}
13759
13760// Creates a new instance of the ListVirtualHubsResultPage type.
13761func NewListVirtualHubsResultPage(cur ListVirtualHubsResult, getNextPage func(context.Context, ListVirtualHubsResult) (ListVirtualHubsResult, error)) ListVirtualHubsResultPage {
13762	return ListVirtualHubsResultPage{
13763		fn:   getNextPage,
13764		lvhr: cur,
13765	}
13766}
13767
13768// ListVirtualWANsResult result of the request to list VirtualWANs. It contains a list of VirtualWANs and a
13769// URL nextLink to get the next set of results.
13770type ListVirtualWANsResult struct {
13771	autorest.Response `json:"-"`
13772	// Value - List of VirtualWANs.
13773	Value *[]VirtualWAN `json:"value,omitempty"`
13774	// NextLink - URL to get the next set of operation list results if there are any.
13775	NextLink *string `json:"nextLink,omitempty"`
13776}
13777
13778// ListVirtualWANsResultIterator provides access to a complete listing of VirtualWAN values.
13779type ListVirtualWANsResultIterator struct {
13780	i    int
13781	page ListVirtualWANsResultPage
13782}
13783
13784// NextWithContext advances to the next value.  If there was an error making
13785// the request the iterator does not advance and the error is returned.
13786func (iter *ListVirtualWANsResultIterator) NextWithContext(ctx context.Context) (err error) {
13787	if tracing.IsEnabled() {
13788		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualWANsResultIterator.NextWithContext")
13789		defer func() {
13790			sc := -1
13791			if iter.Response().Response.Response != nil {
13792				sc = iter.Response().Response.Response.StatusCode
13793			}
13794			tracing.EndSpan(ctx, sc, err)
13795		}()
13796	}
13797	iter.i++
13798	if iter.i < len(iter.page.Values()) {
13799		return nil
13800	}
13801	err = iter.page.NextWithContext(ctx)
13802	if err != nil {
13803		iter.i--
13804		return err
13805	}
13806	iter.i = 0
13807	return nil
13808}
13809
13810// Next advances to the next value.  If there was an error making
13811// the request the iterator does not advance and the error is returned.
13812// Deprecated: Use NextWithContext() instead.
13813func (iter *ListVirtualWANsResultIterator) Next() error {
13814	return iter.NextWithContext(context.Background())
13815}
13816
13817// NotDone returns true if the enumeration should be started or is not yet complete.
13818func (iter ListVirtualWANsResultIterator) NotDone() bool {
13819	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13820}
13821
13822// Response returns the raw server response from the last page request.
13823func (iter ListVirtualWANsResultIterator) Response() ListVirtualWANsResult {
13824	return iter.page.Response()
13825}
13826
13827// Value returns the current value or a zero-initialized value if the
13828// iterator has advanced beyond the end of the collection.
13829func (iter ListVirtualWANsResultIterator) Value() VirtualWAN {
13830	if !iter.page.NotDone() {
13831		return VirtualWAN{}
13832	}
13833	return iter.page.Values()[iter.i]
13834}
13835
13836// Creates a new instance of the ListVirtualWANsResultIterator type.
13837func NewListVirtualWANsResultIterator(page ListVirtualWANsResultPage) ListVirtualWANsResultIterator {
13838	return ListVirtualWANsResultIterator{page: page}
13839}
13840
13841// IsEmpty returns true if the ListResult contains no values.
13842func (lvwnr ListVirtualWANsResult) IsEmpty() bool {
13843	return lvwnr.Value == nil || len(*lvwnr.Value) == 0
13844}
13845
13846// hasNextLink returns true if the NextLink is not empty.
13847func (lvwnr ListVirtualWANsResult) hasNextLink() bool {
13848	return lvwnr.NextLink != nil && len(*lvwnr.NextLink) != 0
13849}
13850
13851// listVirtualWANsResultPreparer prepares a request to retrieve the next set of results.
13852// It returns nil if no more results exist.
13853func (lvwnr ListVirtualWANsResult) listVirtualWANsResultPreparer(ctx context.Context) (*http.Request, error) {
13854	if !lvwnr.hasNextLink() {
13855		return nil, nil
13856	}
13857	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13858		autorest.AsJSON(),
13859		autorest.AsGet(),
13860		autorest.WithBaseURL(to.String(lvwnr.NextLink)))
13861}
13862
13863// ListVirtualWANsResultPage contains a page of VirtualWAN values.
13864type ListVirtualWANsResultPage struct {
13865	fn    func(context.Context, ListVirtualWANsResult) (ListVirtualWANsResult, error)
13866	lvwnr ListVirtualWANsResult
13867}
13868
13869// NextWithContext advances to the next page of values.  If there was an error making
13870// the request the page does not advance and the error is returned.
13871func (page *ListVirtualWANsResultPage) NextWithContext(ctx context.Context) (err error) {
13872	if tracing.IsEnabled() {
13873		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualWANsResultPage.NextWithContext")
13874		defer func() {
13875			sc := -1
13876			if page.Response().Response.Response != nil {
13877				sc = page.Response().Response.Response.StatusCode
13878			}
13879			tracing.EndSpan(ctx, sc, err)
13880		}()
13881	}
13882	for {
13883		next, err := page.fn(ctx, page.lvwnr)
13884		if err != nil {
13885			return err
13886		}
13887		page.lvwnr = next
13888		if !next.hasNextLink() || !next.IsEmpty() {
13889			break
13890		}
13891	}
13892	return nil
13893}
13894
13895// Next advances to the next page of values.  If there was an error making
13896// the request the page does not advance and the error is returned.
13897// Deprecated: Use NextWithContext() instead.
13898func (page *ListVirtualWANsResultPage) Next() error {
13899	return page.NextWithContext(context.Background())
13900}
13901
13902// NotDone returns true if the page enumeration should be started or is not yet complete.
13903func (page ListVirtualWANsResultPage) NotDone() bool {
13904	return !page.lvwnr.IsEmpty()
13905}
13906
13907// Response returns the raw server response from the last page request.
13908func (page ListVirtualWANsResultPage) Response() ListVirtualWANsResult {
13909	return page.lvwnr
13910}
13911
13912// Values returns the slice of values for the current page or nil if there are no values.
13913func (page ListVirtualWANsResultPage) Values() []VirtualWAN {
13914	if page.lvwnr.IsEmpty() {
13915		return nil
13916	}
13917	return *page.lvwnr.Value
13918}
13919
13920// Creates a new instance of the ListVirtualWANsResultPage type.
13921func NewListVirtualWANsResultPage(cur ListVirtualWANsResult, getNextPage func(context.Context, ListVirtualWANsResult) (ListVirtualWANsResult, error)) ListVirtualWANsResultPage {
13922	return ListVirtualWANsResultPage{
13923		fn:    getNextPage,
13924		lvwnr: cur,
13925	}
13926}
13927
13928// ListVpnConnectionsResult result of the request to list all vpn connections to a virtual wan vpn gateway.
13929// It contains a list of Vpn Connections and a URL nextLink to get the next set of results.
13930type ListVpnConnectionsResult struct {
13931	autorest.Response `json:"-"`
13932	// Value - List of Vpn Connections.
13933	Value *[]VpnConnection `json:"value,omitempty"`
13934	// NextLink - URL to get the next set of operation list results if there are any.
13935	NextLink *string `json:"nextLink,omitempty"`
13936}
13937
13938// ListVpnConnectionsResultIterator provides access to a complete listing of VpnConnection values.
13939type ListVpnConnectionsResultIterator struct {
13940	i    int
13941	page ListVpnConnectionsResultPage
13942}
13943
13944// NextWithContext advances to the next value.  If there was an error making
13945// the request the iterator does not advance and the error is returned.
13946func (iter *ListVpnConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
13947	if tracing.IsEnabled() {
13948		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnConnectionsResultIterator.NextWithContext")
13949		defer func() {
13950			sc := -1
13951			if iter.Response().Response.Response != nil {
13952				sc = iter.Response().Response.Response.StatusCode
13953			}
13954			tracing.EndSpan(ctx, sc, err)
13955		}()
13956	}
13957	iter.i++
13958	if iter.i < len(iter.page.Values()) {
13959		return nil
13960	}
13961	err = iter.page.NextWithContext(ctx)
13962	if err != nil {
13963		iter.i--
13964		return err
13965	}
13966	iter.i = 0
13967	return nil
13968}
13969
13970// Next advances to the next value.  If there was an error making
13971// the request the iterator does not advance and the error is returned.
13972// Deprecated: Use NextWithContext() instead.
13973func (iter *ListVpnConnectionsResultIterator) Next() error {
13974	return iter.NextWithContext(context.Background())
13975}
13976
13977// NotDone returns true if the enumeration should be started or is not yet complete.
13978func (iter ListVpnConnectionsResultIterator) NotDone() bool {
13979	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13980}
13981
13982// Response returns the raw server response from the last page request.
13983func (iter ListVpnConnectionsResultIterator) Response() ListVpnConnectionsResult {
13984	return iter.page.Response()
13985}
13986
13987// Value returns the current value or a zero-initialized value if the
13988// iterator has advanced beyond the end of the collection.
13989func (iter ListVpnConnectionsResultIterator) Value() VpnConnection {
13990	if !iter.page.NotDone() {
13991		return VpnConnection{}
13992	}
13993	return iter.page.Values()[iter.i]
13994}
13995
13996// Creates a new instance of the ListVpnConnectionsResultIterator type.
13997func NewListVpnConnectionsResultIterator(page ListVpnConnectionsResultPage) ListVpnConnectionsResultIterator {
13998	return ListVpnConnectionsResultIterator{page: page}
13999}
14000
14001// IsEmpty returns true if the ListResult contains no values.
14002func (lvcr ListVpnConnectionsResult) IsEmpty() bool {
14003	return lvcr.Value == nil || len(*lvcr.Value) == 0
14004}
14005
14006// hasNextLink returns true if the NextLink is not empty.
14007func (lvcr ListVpnConnectionsResult) hasNextLink() bool {
14008	return lvcr.NextLink != nil && len(*lvcr.NextLink) != 0
14009}
14010
14011// listVpnConnectionsResultPreparer prepares a request to retrieve the next set of results.
14012// It returns nil if no more results exist.
14013func (lvcr ListVpnConnectionsResult) listVpnConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
14014	if !lvcr.hasNextLink() {
14015		return nil, nil
14016	}
14017	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14018		autorest.AsJSON(),
14019		autorest.AsGet(),
14020		autorest.WithBaseURL(to.String(lvcr.NextLink)))
14021}
14022
14023// ListVpnConnectionsResultPage contains a page of VpnConnection values.
14024type ListVpnConnectionsResultPage struct {
14025	fn   func(context.Context, ListVpnConnectionsResult) (ListVpnConnectionsResult, error)
14026	lvcr ListVpnConnectionsResult
14027}
14028
14029// NextWithContext advances to the next page of values.  If there was an error making
14030// the request the page does not advance and the error is returned.
14031func (page *ListVpnConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
14032	if tracing.IsEnabled() {
14033		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnConnectionsResultPage.NextWithContext")
14034		defer func() {
14035			sc := -1
14036			if page.Response().Response.Response != nil {
14037				sc = page.Response().Response.Response.StatusCode
14038			}
14039			tracing.EndSpan(ctx, sc, err)
14040		}()
14041	}
14042	for {
14043		next, err := page.fn(ctx, page.lvcr)
14044		if err != nil {
14045			return err
14046		}
14047		page.lvcr = next
14048		if !next.hasNextLink() || !next.IsEmpty() {
14049			break
14050		}
14051	}
14052	return nil
14053}
14054
14055// Next advances to the next page of values.  If there was an error making
14056// the request the page does not advance and the error is returned.
14057// Deprecated: Use NextWithContext() instead.
14058func (page *ListVpnConnectionsResultPage) Next() error {
14059	return page.NextWithContext(context.Background())
14060}
14061
14062// NotDone returns true if the page enumeration should be started or is not yet complete.
14063func (page ListVpnConnectionsResultPage) NotDone() bool {
14064	return !page.lvcr.IsEmpty()
14065}
14066
14067// Response returns the raw server response from the last page request.
14068func (page ListVpnConnectionsResultPage) Response() ListVpnConnectionsResult {
14069	return page.lvcr
14070}
14071
14072// Values returns the slice of values for the current page or nil if there are no values.
14073func (page ListVpnConnectionsResultPage) Values() []VpnConnection {
14074	if page.lvcr.IsEmpty() {
14075		return nil
14076	}
14077	return *page.lvcr.Value
14078}
14079
14080// Creates a new instance of the ListVpnConnectionsResultPage type.
14081func NewListVpnConnectionsResultPage(cur ListVpnConnectionsResult, getNextPage func(context.Context, ListVpnConnectionsResult) (ListVpnConnectionsResult, error)) ListVpnConnectionsResultPage {
14082	return ListVpnConnectionsResultPage{
14083		fn:   getNextPage,
14084		lvcr: cur,
14085	}
14086}
14087
14088// ListVpnGatewaysResult result of the request to list VpnGateways. It contains a list of VpnGateways and a
14089// URL nextLink to get the next set of results.
14090type ListVpnGatewaysResult struct {
14091	autorest.Response `json:"-"`
14092	// Value - List of VpnGateways.
14093	Value *[]VpnGateway `json:"value,omitempty"`
14094	// NextLink - URL to get the next set of operation list results if there are any.
14095	NextLink *string `json:"nextLink,omitempty"`
14096}
14097
14098// ListVpnGatewaysResultIterator provides access to a complete listing of VpnGateway values.
14099type ListVpnGatewaysResultIterator struct {
14100	i    int
14101	page ListVpnGatewaysResultPage
14102}
14103
14104// NextWithContext advances to the next value.  If there was an error making
14105// the request the iterator does not advance and the error is returned.
14106func (iter *ListVpnGatewaysResultIterator) NextWithContext(ctx context.Context) (err error) {
14107	if tracing.IsEnabled() {
14108		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnGatewaysResultIterator.NextWithContext")
14109		defer func() {
14110			sc := -1
14111			if iter.Response().Response.Response != nil {
14112				sc = iter.Response().Response.Response.StatusCode
14113			}
14114			tracing.EndSpan(ctx, sc, err)
14115		}()
14116	}
14117	iter.i++
14118	if iter.i < len(iter.page.Values()) {
14119		return nil
14120	}
14121	err = iter.page.NextWithContext(ctx)
14122	if err != nil {
14123		iter.i--
14124		return err
14125	}
14126	iter.i = 0
14127	return nil
14128}
14129
14130// Next advances to the next value.  If there was an error making
14131// the request the iterator does not advance and the error is returned.
14132// Deprecated: Use NextWithContext() instead.
14133func (iter *ListVpnGatewaysResultIterator) Next() error {
14134	return iter.NextWithContext(context.Background())
14135}
14136
14137// NotDone returns true if the enumeration should be started or is not yet complete.
14138func (iter ListVpnGatewaysResultIterator) NotDone() bool {
14139	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14140}
14141
14142// Response returns the raw server response from the last page request.
14143func (iter ListVpnGatewaysResultIterator) Response() ListVpnGatewaysResult {
14144	return iter.page.Response()
14145}
14146
14147// Value returns the current value or a zero-initialized value if the
14148// iterator has advanced beyond the end of the collection.
14149func (iter ListVpnGatewaysResultIterator) Value() VpnGateway {
14150	if !iter.page.NotDone() {
14151		return VpnGateway{}
14152	}
14153	return iter.page.Values()[iter.i]
14154}
14155
14156// Creates a new instance of the ListVpnGatewaysResultIterator type.
14157func NewListVpnGatewaysResultIterator(page ListVpnGatewaysResultPage) ListVpnGatewaysResultIterator {
14158	return ListVpnGatewaysResultIterator{page: page}
14159}
14160
14161// IsEmpty returns true if the ListResult contains no values.
14162func (lvgr ListVpnGatewaysResult) IsEmpty() bool {
14163	return lvgr.Value == nil || len(*lvgr.Value) == 0
14164}
14165
14166// hasNextLink returns true if the NextLink is not empty.
14167func (lvgr ListVpnGatewaysResult) hasNextLink() bool {
14168	return lvgr.NextLink != nil && len(*lvgr.NextLink) != 0
14169}
14170
14171// listVpnGatewaysResultPreparer prepares a request to retrieve the next set of results.
14172// It returns nil if no more results exist.
14173func (lvgr ListVpnGatewaysResult) listVpnGatewaysResultPreparer(ctx context.Context) (*http.Request, error) {
14174	if !lvgr.hasNextLink() {
14175		return nil, nil
14176	}
14177	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14178		autorest.AsJSON(),
14179		autorest.AsGet(),
14180		autorest.WithBaseURL(to.String(lvgr.NextLink)))
14181}
14182
14183// ListVpnGatewaysResultPage contains a page of VpnGateway values.
14184type ListVpnGatewaysResultPage struct {
14185	fn   func(context.Context, ListVpnGatewaysResult) (ListVpnGatewaysResult, error)
14186	lvgr ListVpnGatewaysResult
14187}
14188
14189// NextWithContext advances to the next page of values.  If there was an error making
14190// the request the page does not advance and the error is returned.
14191func (page *ListVpnGatewaysResultPage) NextWithContext(ctx context.Context) (err error) {
14192	if tracing.IsEnabled() {
14193		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnGatewaysResultPage.NextWithContext")
14194		defer func() {
14195			sc := -1
14196			if page.Response().Response.Response != nil {
14197				sc = page.Response().Response.Response.StatusCode
14198			}
14199			tracing.EndSpan(ctx, sc, err)
14200		}()
14201	}
14202	for {
14203		next, err := page.fn(ctx, page.lvgr)
14204		if err != nil {
14205			return err
14206		}
14207		page.lvgr = next
14208		if !next.hasNextLink() || !next.IsEmpty() {
14209			break
14210		}
14211	}
14212	return nil
14213}
14214
14215// Next advances to the next page of values.  If there was an error making
14216// the request the page does not advance and the error is returned.
14217// Deprecated: Use NextWithContext() instead.
14218func (page *ListVpnGatewaysResultPage) Next() error {
14219	return page.NextWithContext(context.Background())
14220}
14221
14222// NotDone returns true if the page enumeration should be started or is not yet complete.
14223func (page ListVpnGatewaysResultPage) NotDone() bool {
14224	return !page.lvgr.IsEmpty()
14225}
14226
14227// Response returns the raw server response from the last page request.
14228func (page ListVpnGatewaysResultPage) Response() ListVpnGatewaysResult {
14229	return page.lvgr
14230}
14231
14232// Values returns the slice of values for the current page or nil if there are no values.
14233func (page ListVpnGatewaysResultPage) Values() []VpnGateway {
14234	if page.lvgr.IsEmpty() {
14235		return nil
14236	}
14237	return *page.lvgr.Value
14238}
14239
14240// Creates a new instance of the ListVpnGatewaysResultPage type.
14241func NewListVpnGatewaysResultPage(cur ListVpnGatewaysResult, getNextPage func(context.Context, ListVpnGatewaysResult) (ListVpnGatewaysResult, error)) ListVpnGatewaysResultPage {
14242	return ListVpnGatewaysResultPage{
14243		fn:   getNextPage,
14244		lvgr: cur,
14245	}
14246}
14247
14248// ListVpnSitesResult result of the request to list VpnSites. It contains a list of VpnSites and a URL
14249// nextLink to get the next set of results.
14250type ListVpnSitesResult struct {
14251	autorest.Response `json:"-"`
14252	// Value - List of VpnSites.
14253	Value *[]VpnSite `json:"value,omitempty"`
14254	// NextLink - URL to get the next set of operation list results if there are any.
14255	NextLink *string `json:"nextLink,omitempty"`
14256}
14257
14258// ListVpnSitesResultIterator provides access to a complete listing of VpnSite values.
14259type ListVpnSitesResultIterator struct {
14260	i    int
14261	page ListVpnSitesResultPage
14262}
14263
14264// NextWithContext advances to the next value.  If there was an error making
14265// the request the iterator does not advance and the error is returned.
14266func (iter *ListVpnSitesResultIterator) NextWithContext(ctx context.Context) (err error) {
14267	if tracing.IsEnabled() {
14268		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSitesResultIterator.NextWithContext")
14269		defer func() {
14270			sc := -1
14271			if iter.Response().Response.Response != nil {
14272				sc = iter.Response().Response.Response.StatusCode
14273			}
14274			tracing.EndSpan(ctx, sc, err)
14275		}()
14276	}
14277	iter.i++
14278	if iter.i < len(iter.page.Values()) {
14279		return nil
14280	}
14281	err = iter.page.NextWithContext(ctx)
14282	if err != nil {
14283		iter.i--
14284		return err
14285	}
14286	iter.i = 0
14287	return nil
14288}
14289
14290// Next advances to the next value.  If there was an error making
14291// the request the iterator does not advance and the error is returned.
14292// Deprecated: Use NextWithContext() instead.
14293func (iter *ListVpnSitesResultIterator) Next() error {
14294	return iter.NextWithContext(context.Background())
14295}
14296
14297// NotDone returns true if the enumeration should be started or is not yet complete.
14298func (iter ListVpnSitesResultIterator) NotDone() bool {
14299	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14300}
14301
14302// Response returns the raw server response from the last page request.
14303func (iter ListVpnSitesResultIterator) Response() ListVpnSitesResult {
14304	return iter.page.Response()
14305}
14306
14307// Value returns the current value or a zero-initialized value if the
14308// iterator has advanced beyond the end of the collection.
14309func (iter ListVpnSitesResultIterator) Value() VpnSite {
14310	if !iter.page.NotDone() {
14311		return VpnSite{}
14312	}
14313	return iter.page.Values()[iter.i]
14314}
14315
14316// Creates a new instance of the ListVpnSitesResultIterator type.
14317func NewListVpnSitesResultIterator(page ListVpnSitesResultPage) ListVpnSitesResultIterator {
14318	return ListVpnSitesResultIterator{page: page}
14319}
14320
14321// IsEmpty returns true if the ListResult contains no values.
14322func (lvsr ListVpnSitesResult) IsEmpty() bool {
14323	return lvsr.Value == nil || len(*lvsr.Value) == 0
14324}
14325
14326// hasNextLink returns true if the NextLink is not empty.
14327func (lvsr ListVpnSitesResult) hasNextLink() bool {
14328	return lvsr.NextLink != nil && len(*lvsr.NextLink) != 0
14329}
14330
14331// listVpnSitesResultPreparer prepares a request to retrieve the next set of results.
14332// It returns nil if no more results exist.
14333func (lvsr ListVpnSitesResult) listVpnSitesResultPreparer(ctx context.Context) (*http.Request, error) {
14334	if !lvsr.hasNextLink() {
14335		return nil, nil
14336	}
14337	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14338		autorest.AsJSON(),
14339		autorest.AsGet(),
14340		autorest.WithBaseURL(to.String(lvsr.NextLink)))
14341}
14342
14343// ListVpnSitesResultPage contains a page of VpnSite values.
14344type ListVpnSitesResultPage struct {
14345	fn   func(context.Context, ListVpnSitesResult) (ListVpnSitesResult, error)
14346	lvsr ListVpnSitesResult
14347}
14348
14349// NextWithContext advances to the next page of values.  If there was an error making
14350// the request the page does not advance and the error is returned.
14351func (page *ListVpnSitesResultPage) NextWithContext(ctx context.Context) (err error) {
14352	if tracing.IsEnabled() {
14353		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSitesResultPage.NextWithContext")
14354		defer func() {
14355			sc := -1
14356			if page.Response().Response.Response != nil {
14357				sc = page.Response().Response.Response.StatusCode
14358			}
14359			tracing.EndSpan(ctx, sc, err)
14360		}()
14361	}
14362	for {
14363		next, err := page.fn(ctx, page.lvsr)
14364		if err != nil {
14365			return err
14366		}
14367		page.lvsr = next
14368		if !next.hasNextLink() || !next.IsEmpty() {
14369			break
14370		}
14371	}
14372	return nil
14373}
14374
14375// Next advances to the next page of values.  If there was an error making
14376// the request the page does not advance and the error is returned.
14377// Deprecated: Use NextWithContext() instead.
14378func (page *ListVpnSitesResultPage) Next() error {
14379	return page.NextWithContext(context.Background())
14380}
14381
14382// NotDone returns true if the page enumeration should be started or is not yet complete.
14383func (page ListVpnSitesResultPage) NotDone() bool {
14384	return !page.lvsr.IsEmpty()
14385}
14386
14387// Response returns the raw server response from the last page request.
14388func (page ListVpnSitesResultPage) Response() ListVpnSitesResult {
14389	return page.lvsr
14390}
14391
14392// Values returns the slice of values for the current page or nil if there are no values.
14393func (page ListVpnSitesResultPage) Values() []VpnSite {
14394	if page.lvsr.IsEmpty() {
14395		return nil
14396	}
14397	return *page.lvsr.Value
14398}
14399
14400// Creates a new instance of the ListVpnSitesResultPage type.
14401func NewListVpnSitesResultPage(cur ListVpnSitesResult, getNextPage func(context.Context, ListVpnSitesResult) (ListVpnSitesResult, error)) ListVpnSitesResultPage {
14402	return ListVpnSitesResultPage{
14403		fn:   getNextPage,
14404		lvsr: cur,
14405	}
14406}
14407
14408// LoadBalancer loadBalancer resource
14409type LoadBalancer struct {
14410	autorest.Response `json:"-"`
14411	// Sku - The load balancer SKU.
14412	Sku *LoadBalancerSku `json:"sku,omitempty"`
14413	// LoadBalancerPropertiesFormat - Properties of load balancer.
14414	*LoadBalancerPropertiesFormat `json:"properties,omitempty"`
14415	// Etag - A unique read-only string that changes whenever the resource is updated.
14416	Etag *string `json:"etag,omitempty"`
14417	// ID - Resource ID.
14418	ID *string `json:"id,omitempty"`
14419	// Name - READ-ONLY; Resource name.
14420	Name *string `json:"name,omitempty"`
14421	// Type - READ-ONLY; Resource type.
14422	Type *string `json:"type,omitempty"`
14423	// Location - Resource location.
14424	Location *string `json:"location,omitempty"`
14425	// Tags - Resource tags.
14426	Tags map[string]*string `json:"tags"`
14427}
14428
14429// MarshalJSON is the custom marshaler for LoadBalancer.
14430func (lb LoadBalancer) MarshalJSON() ([]byte, error) {
14431	objectMap := make(map[string]interface{})
14432	if lb.Sku != nil {
14433		objectMap["sku"] = lb.Sku
14434	}
14435	if lb.LoadBalancerPropertiesFormat != nil {
14436		objectMap["properties"] = lb.LoadBalancerPropertiesFormat
14437	}
14438	if lb.Etag != nil {
14439		objectMap["etag"] = lb.Etag
14440	}
14441	if lb.ID != nil {
14442		objectMap["id"] = lb.ID
14443	}
14444	if lb.Location != nil {
14445		objectMap["location"] = lb.Location
14446	}
14447	if lb.Tags != nil {
14448		objectMap["tags"] = lb.Tags
14449	}
14450	return json.Marshal(objectMap)
14451}
14452
14453// UnmarshalJSON is the custom unmarshaler for LoadBalancer struct.
14454func (lb *LoadBalancer) UnmarshalJSON(body []byte) error {
14455	var m map[string]*json.RawMessage
14456	err := json.Unmarshal(body, &m)
14457	if err != nil {
14458		return err
14459	}
14460	for k, v := range m {
14461		switch k {
14462		case "sku":
14463			if v != nil {
14464				var sku LoadBalancerSku
14465				err = json.Unmarshal(*v, &sku)
14466				if err != nil {
14467					return err
14468				}
14469				lb.Sku = &sku
14470			}
14471		case "properties":
14472			if v != nil {
14473				var loadBalancerPropertiesFormat LoadBalancerPropertiesFormat
14474				err = json.Unmarshal(*v, &loadBalancerPropertiesFormat)
14475				if err != nil {
14476					return err
14477				}
14478				lb.LoadBalancerPropertiesFormat = &loadBalancerPropertiesFormat
14479			}
14480		case "etag":
14481			if v != nil {
14482				var etag string
14483				err = json.Unmarshal(*v, &etag)
14484				if err != nil {
14485					return err
14486				}
14487				lb.Etag = &etag
14488			}
14489		case "id":
14490			if v != nil {
14491				var ID string
14492				err = json.Unmarshal(*v, &ID)
14493				if err != nil {
14494					return err
14495				}
14496				lb.ID = &ID
14497			}
14498		case "name":
14499			if v != nil {
14500				var name string
14501				err = json.Unmarshal(*v, &name)
14502				if err != nil {
14503					return err
14504				}
14505				lb.Name = &name
14506			}
14507		case "type":
14508			if v != nil {
14509				var typeVar string
14510				err = json.Unmarshal(*v, &typeVar)
14511				if err != nil {
14512					return err
14513				}
14514				lb.Type = &typeVar
14515			}
14516		case "location":
14517			if v != nil {
14518				var location string
14519				err = json.Unmarshal(*v, &location)
14520				if err != nil {
14521					return err
14522				}
14523				lb.Location = &location
14524			}
14525		case "tags":
14526			if v != nil {
14527				var tags map[string]*string
14528				err = json.Unmarshal(*v, &tags)
14529				if err != nil {
14530					return err
14531				}
14532				lb.Tags = tags
14533			}
14534		}
14535	}
14536
14537	return nil
14538}
14539
14540// LoadBalancerBackendAddressPoolListResult response for ListBackendAddressPool API service call.
14541type LoadBalancerBackendAddressPoolListResult struct {
14542	autorest.Response `json:"-"`
14543	// Value - A list of backend address pools in a load balancer.
14544	Value *[]BackendAddressPool `json:"value,omitempty"`
14545	// NextLink - READ-ONLY; The URL to get the next set of results.
14546	NextLink *string `json:"nextLink,omitempty"`
14547}
14548
14549// MarshalJSON is the custom marshaler for LoadBalancerBackendAddressPoolListResult.
14550func (lbbaplr LoadBalancerBackendAddressPoolListResult) MarshalJSON() ([]byte, error) {
14551	objectMap := make(map[string]interface{})
14552	if lbbaplr.Value != nil {
14553		objectMap["value"] = lbbaplr.Value
14554	}
14555	return json.Marshal(objectMap)
14556}
14557
14558// LoadBalancerBackendAddressPoolListResultIterator provides access to a complete listing of
14559// BackendAddressPool values.
14560type LoadBalancerBackendAddressPoolListResultIterator struct {
14561	i    int
14562	page LoadBalancerBackendAddressPoolListResultPage
14563}
14564
14565// NextWithContext advances to the next value.  If there was an error making
14566// the request the iterator does not advance and the error is returned.
14567func (iter *LoadBalancerBackendAddressPoolListResultIterator) NextWithContext(ctx context.Context) (err error) {
14568	if tracing.IsEnabled() {
14569		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultIterator.NextWithContext")
14570		defer func() {
14571			sc := -1
14572			if iter.Response().Response.Response != nil {
14573				sc = iter.Response().Response.Response.StatusCode
14574			}
14575			tracing.EndSpan(ctx, sc, err)
14576		}()
14577	}
14578	iter.i++
14579	if iter.i < len(iter.page.Values()) {
14580		return nil
14581	}
14582	err = iter.page.NextWithContext(ctx)
14583	if err != nil {
14584		iter.i--
14585		return err
14586	}
14587	iter.i = 0
14588	return nil
14589}
14590
14591// Next advances to the next value.  If there was an error making
14592// the request the iterator does not advance and the error is returned.
14593// Deprecated: Use NextWithContext() instead.
14594func (iter *LoadBalancerBackendAddressPoolListResultIterator) Next() error {
14595	return iter.NextWithContext(context.Background())
14596}
14597
14598// NotDone returns true if the enumeration should be started or is not yet complete.
14599func (iter LoadBalancerBackendAddressPoolListResultIterator) NotDone() bool {
14600	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14601}
14602
14603// Response returns the raw server response from the last page request.
14604func (iter LoadBalancerBackendAddressPoolListResultIterator) Response() LoadBalancerBackendAddressPoolListResult {
14605	return iter.page.Response()
14606}
14607
14608// Value returns the current value or a zero-initialized value if the
14609// iterator has advanced beyond the end of the collection.
14610func (iter LoadBalancerBackendAddressPoolListResultIterator) Value() BackendAddressPool {
14611	if !iter.page.NotDone() {
14612		return BackendAddressPool{}
14613	}
14614	return iter.page.Values()[iter.i]
14615}
14616
14617// Creates a new instance of the LoadBalancerBackendAddressPoolListResultIterator type.
14618func NewLoadBalancerBackendAddressPoolListResultIterator(page LoadBalancerBackendAddressPoolListResultPage) LoadBalancerBackendAddressPoolListResultIterator {
14619	return LoadBalancerBackendAddressPoolListResultIterator{page: page}
14620}
14621
14622// IsEmpty returns true if the ListResult contains no values.
14623func (lbbaplr LoadBalancerBackendAddressPoolListResult) IsEmpty() bool {
14624	return lbbaplr.Value == nil || len(*lbbaplr.Value) == 0
14625}
14626
14627// hasNextLink returns true if the NextLink is not empty.
14628func (lbbaplr LoadBalancerBackendAddressPoolListResult) hasNextLink() bool {
14629	return lbbaplr.NextLink != nil && len(*lbbaplr.NextLink) != 0
14630}
14631
14632// loadBalancerBackendAddressPoolListResultPreparer prepares a request to retrieve the next set of results.
14633// It returns nil if no more results exist.
14634func (lbbaplr LoadBalancerBackendAddressPoolListResult) loadBalancerBackendAddressPoolListResultPreparer(ctx context.Context) (*http.Request, error) {
14635	if !lbbaplr.hasNextLink() {
14636		return nil, nil
14637	}
14638	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14639		autorest.AsJSON(),
14640		autorest.AsGet(),
14641		autorest.WithBaseURL(to.String(lbbaplr.NextLink)))
14642}
14643
14644// LoadBalancerBackendAddressPoolListResultPage contains a page of BackendAddressPool values.
14645type LoadBalancerBackendAddressPoolListResultPage struct {
14646	fn      func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)
14647	lbbaplr LoadBalancerBackendAddressPoolListResult
14648}
14649
14650// NextWithContext advances to the next page of values.  If there was an error making
14651// the request the page does not advance and the error is returned.
14652func (page *LoadBalancerBackendAddressPoolListResultPage) NextWithContext(ctx context.Context) (err error) {
14653	if tracing.IsEnabled() {
14654		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultPage.NextWithContext")
14655		defer func() {
14656			sc := -1
14657			if page.Response().Response.Response != nil {
14658				sc = page.Response().Response.Response.StatusCode
14659			}
14660			tracing.EndSpan(ctx, sc, err)
14661		}()
14662	}
14663	for {
14664		next, err := page.fn(ctx, page.lbbaplr)
14665		if err != nil {
14666			return err
14667		}
14668		page.lbbaplr = next
14669		if !next.hasNextLink() || !next.IsEmpty() {
14670			break
14671		}
14672	}
14673	return nil
14674}
14675
14676// Next advances to the next page of values.  If there was an error making
14677// the request the page does not advance and the error is returned.
14678// Deprecated: Use NextWithContext() instead.
14679func (page *LoadBalancerBackendAddressPoolListResultPage) Next() error {
14680	return page.NextWithContext(context.Background())
14681}
14682
14683// NotDone returns true if the page enumeration should be started or is not yet complete.
14684func (page LoadBalancerBackendAddressPoolListResultPage) NotDone() bool {
14685	return !page.lbbaplr.IsEmpty()
14686}
14687
14688// Response returns the raw server response from the last page request.
14689func (page LoadBalancerBackendAddressPoolListResultPage) Response() LoadBalancerBackendAddressPoolListResult {
14690	return page.lbbaplr
14691}
14692
14693// Values returns the slice of values for the current page or nil if there are no values.
14694func (page LoadBalancerBackendAddressPoolListResultPage) Values() []BackendAddressPool {
14695	if page.lbbaplr.IsEmpty() {
14696		return nil
14697	}
14698	return *page.lbbaplr.Value
14699}
14700
14701// Creates a new instance of the LoadBalancerBackendAddressPoolListResultPage type.
14702func NewLoadBalancerBackendAddressPoolListResultPage(cur LoadBalancerBackendAddressPoolListResult, getNextPage func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)) LoadBalancerBackendAddressPoolListResultPage {
14703	return LoadBalancerBackendAddressPoolListResultPage{
14704		fn:      getNextPage,
14705		lbbaplr: cur,
14706	}
14707}
14708
14709// LoadBalancerFrontendIPConfigurationListResult response for ListFrontendIPConfiguration API service call.
14710type LoadBalancerFrontendIPConfigurationListResult struct {
14711	autorest.Response `json:"-"`
14712	// Value - A list of frontend IP configurations in a load balancer.
14713	Value *[]FrontendIPConfiguration `json:"value,omitempty"`
14714	// NextLink - READ-ONLY; The URL to get the next set of results.
14715	NextLink *string `json:"nextLink,omitempty"`
14716}
14717
14718// MarshalJSON is the custom marshaler for LoadBalancerFrontendIPConfigurationListResult.
14719func (lbficlr LoadBalancerFrontendIPConfigurationListResult) MarshalJSON() ([]byte, error) {
14720	objectMap := make(map[string]interface{})
14721	if lbficlr.Value != nil {
14722		objectMap["value"] = lbficlr.Value
14723	}
14724	return json.Marshal(objectMap)
14725}
14726
14727// LoadBalancerFrontendIPConfigurationListResultIterator provides access to a complete listing of
14728// FrontendIPConfiguration values.
14729type LoadBalancerFrontendIPConfigurationListResultIterator struct {
14730	i    int
14731	page LoadBalancerFrontendIPConfigurationListResultPage
14732}
14733
14734// NextWithContext advances to the next value.  If there was an error making
14735// the request the iterator does not advance and the error is returned.
14736func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
14737	if tracing.IsEnabled() {
14738		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultIterator.NextWithContext")
14739		defer func() {
14740			sc := -1
14741			if iter.Response().Response.Response != nil {
14742				sc = iter.Response().Response.Response.StatusCode
14743			}
14744			tracing.EndSpan(ctx, sc, err)
14745		}()
14746	}
14747	iter.i++
14748	if iter.i < len(iter.page.Values()) {
14749		return nil
14750	}
14751	err = iter.page.NextWithContext(ctx)
14752	if err != nil {
14753		iter.i--
14754		return err
14755	}
14756	iter.i = 0
14757	return nil
14758}
14759
14760// Next advances to the next value.  If there was an error making
14761// the request the iterator does not advance and the error is returned.
14762// Deprecated: Use NextWithContext() instead.
14763func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) Next() error {
14764	return iter.NextWithContext(context.Background())
14765}
14766
14767// NotDone returns true if the enumeration should be started or is not yet complete.
14768func (iter LoadBalancerFrontendIPConfigurationListResultIterator) NotDone() bool {
14769	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14770}
14771
14772// Response returns the raw server response from the last page request.
14773func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Response() LoadBalancerFrontendIPConfigurationListResult {
14774	return iter.page.Response()
14775}
14776
14777// Value returns the current value or a zero-initialized value if the
14778// iterator has advanced beyond the end of the collection.
14779func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Value() FrontendIPConfiguration {
14780	if !iter.page.NotDone() {
14781		return FrontendIPConfiguration{}
14782	}
14783	return iter.page.Values()[iter.i]
14784}
14785
14786// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultIterator type.
14787func NewLoadBalancerFrontendIPConfigurationListResultIterator(page LoadBalancerFrontendIPConfigurationListResultPage) LoadBalancerFrontendIPConfigurationListResultIterator {
14788	return LoadBalancerFrontendIPConfigurationListResultIterator{page: page}
14789}
14790
14791// IsEmpty returns true if the ListResult contains no values.
14792func (lbficlr LoadBalancerFrontendIPConfigurationListResult) IsEmpty() bool {
14793	return lbficlr.Value == nil || len(*lbficlr.Value) == 0
14794}
14795
14796// hasNextLink returns true if the NextLink is not empty.
14797func (lbficlr LoadBalancerFrontendIPConfigurationListResult) hasNextLink() bool {
14798	return lbficlr.NextLink != nil && len(*lbficlr.NextLink) != 0
14799}
14800
14801// loadBalancerFrontendIPConfigurationListResultPreparer prepares a request to retrieve the next set of results.
14802// It returns nil if no more results exist.
14803func (lbficlr LoadBalancerFrontendIPConfigurationListResult) loadBalancerFrontendIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
14804	if !lbficlr.hasNextLink() {
14805		return nil, nil
14806	}
14807	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14808		autorest.AsJSON(),
14809		autorest.AsGet(),
14810		autorest.WithBaseURL(to.String(lbficlr.NextLink)))
14811}
14812
14813// LoadBalancerFrontendIPConfigurationListResultPage contains a page of FrontendIPConfiguration values.
14814type LoadBalancerFrontendIPConfigurationListResultPage struct {
14815	fn      func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)
14816	lbficlr LoadBalancerFrontendIPConfigurationListResult
14817}
14818
14819// NextWithContext advances to the next page of values.  If there was an error making
14820// the request the page does not advance and the error is returned.
14821func (page *LoadBalancerFrontendIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
14822	if tracing.IsEnabled() {
14823		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultPage.NextWithContext")
14824		defer func() {
14825			sc := -1
14826			if page.Response().Response.Response != nil {
14827				sc = page.Response().Response.Response.StatusCode
14828			}
14829			tracing.EndSpan(ctx, sc, err)
14830		}()
14831	}
14832	for {
14833		next, err := page.fn(ctx, page.lbficlr)
14834		if err != nil {
14835			return err
14836		}
14837		page.lbficlr = next
14838		if !next.hasNextLink() || !next.IsEmpty() {
14839			break
14840		}
14841	}
14842	return nil
14843}
14844
14845// Next advances to the next page of values.  If there was an error making
14846// the request the page does not advance and the error is returned.
14847// Deprecated: Use NextWithContext() instead.
14848func (page *LoadBalancerFrontendIPConfigurationListResultPage) Next() error {
14849	return page.NextWithContext(context.Background())
14850}
14851
14852// NotDone returns true if the page enumeration should be started or is not yet complete.
14853func (page LoadBalancerFrontendIPConfigurationListResultPage) NotDone() bool {
14854	return !page.lbficlr.IsEmpty()
14855}
14856
14857// Response returns the raw server response from the last page request.
14858func (page LoadBalancerFrontendIPConfigurationListResultPage) Response() LoadBalancerFrontendIPConfigurationListResult {
14859	return page.lbficlr
14860}
14861
14862// Values returns the slice of values for the current page or nil if there are no values.
14863func (page LoadBalancerFrontendIPConfigurationListResultPage) Values() []FrontendIPConfiguration {
14864	if page.lbficlr.IsEmpty() {
14865		return nil
14866	}
14867	return *page.lbficlr.Value
14868}
14869
14870// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultPage type.
14871func NewLoadBalancerFrontendIPConfigurationListResultPage(cur LoadBalancerFrontendIPConfigurationListResult, getNextPage func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)) LoadBalancerFrontendIPConfigurationListResultPage {
14872	return LoadBalancerFrontendIPConfigurationListResultPage{
14873		fn:      getNextPage,
14874		lbficlr: cur,
14875	}
14876}
14877
14878// LoadBalancerListResult response for ListLoadBalancers API service call.
14879type LoadBalancerListResult struct {
14880	autorest.Response `json:"-"`
14881	// Value - A list of load balancers in a resource group.
14882	Value *[]LoadBalancer `json:"value,omitempty"`
14883	// NextLink - READ-ONLY; The URL to get the next set of results.
14884	NextLink *string `json:"nextLink,omitempty"`
14885}
14886
14887// MarshalJSON is the custom marshaler for LoadBalancerListResult.
14888func (lblr LoadBalancerListResult) MarshalJSON() ([]byte, error) {
14889	objectMap := make(map[string]interface{})
14890	if lblr.Value != nil {
14891		objectMap["value"] = lblr.Value
14892	}
14893	return json.Marshal(objectMap)
14894}
14895
14896// LoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values.
14897type LoadBalancerListResultIterator struct {
14898	i    int
14899	page LoadBalancerListResultPage
14900}
14901
14902// NextWithContext advances to the next value.  If there was an error making
14903// the request the iterator does not advance and the error is returned.
14904func (iter *LoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) {
14905	if tracing.IsEnabled() {
14906		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultIterator.NextWithContext")
14907		defer func() {
14908			sc := -1
14909			if iter.Response().Response.Response != nil {
14910				sc = iter.Response().Response.Response.StatusCode
14911			}
14912			tracing.EndSpan(ctx, sc, err)
14913		}()
14914	}
14915	iter.i++
14916	if iter.i < len(iter.page.Values()) {
14917		return nil
14918	}
14919	err = iter.page.NextWithContext(ctx)
14920	if err != nil {
14921		iter.i--
14922		return err
14923	}
14924	iter.i = 0
14925	return nil
14926}
14927
14928// Next advances to the next value.  If there was an error making
14929// the request the iterator does not advance and the error is returned.
14930// Deprecated: Use NextWithContext() instead.
14931func (iter *LoadBalancerListResultIterator) Next() error {
14932	return iter.NextWithContext(context.Background())
14933}
14934
14935// NotDone returns true if the enumeration should be started or is not yet complete.
14936func (iter LoadBalancerListResultIterator) NotDone() bool {
14937	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14938}
14939
14940// Response returns the raw server response from the last page request.
14941func (iter LoadBalancerListResultIterator) Response() LoadBalancerListResult {
14942	return iter.page.Response()
14943}
14944
14945// Value returns the current value or a zero-initialized value if the
14946// iterator has advanced beyond the end of the collection.
14947func (iter LoadBalancerListResultIterator) Value() LoadBalancer {
14948	if !iter.page.NotDone() {
14949		return LoadBalancer{}
14950	}
14951	return iter.page.Values()[iter.i]
14952}
14953
14954// Creates a new instance of the LoadBalancerListResultIterator type.
14955func NewLoadBalancerListResultIterator(page LoadBalancerListResultPage) LoadBalancerListResultIterator {
14956	return LoadBalancerListResultIterator{page: page}
14957}
14958
14959// IsEmpty returns true if the ListResult contains no values.
14960func (lblr LoadBalancerListResult) IsEmpty() bool {
14961	return lblr.Value == nil || len(*lblr.Value) == 0
14962}
14963
14964// hasNextLink returns true if the NextLink is not empty.
14965func (lblr LoadBalancerListResult) hasNextLink() bool {
14966	return lblr.NextLink != nil && len(*lblr.NextLink) != 0
14967}
14968
14969// loadBalancerListResultPreparer prepares a request to retrieve the next set of results.
14970// It returns nil if no more results exist.
14971func (lblr LoadBalancerListResult) loadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) {
14972	if !lblr.hasNextLink() {
14973		return nil, nil
14974	}
14975	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14976		autorest.AsJSON(),
14977		autorest.AsGet(),
14978		autorest.WithBaseURL(to.String(lblr.NextLink)))
14979}
14980
14981// LoadBalancerListResultPage contains a page of LoadBalancer values.
14982type LoadBalancerListResultPage struct {
14983	fn   func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)
14984	lblr LoadBalancerListResult
14985}
14986
14987// NextWithContext advances to the next page of values.  If there was an error making
14988// the request the page does not advance and the error is returned.
14989func (page *LoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) {
14990	if tracing.IsEnabled() {
14991		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultPage.NextWithContext")
14992		defer func() {
14993			sc := -1
14994			if page.Response().Response.Response != nil {
14995				sc = page.Response().Response.Response.StatusCode
14996			}
14997			tracing.EndSpan(ctx, sc, err)
14998		}()
14999	}
15000	for {
15001		next, err := page.fn(ctx, page.lblr)
15002		if err != nil {
15003			return err
15004		}
15005		page.lblr = next
15006		if !next.hasNextLink() || !next.IsEmpty() {
15007			break
15008		}
15009	}
15010	return nil
15011}
15012
15013// Next advances to the next page of values.  If there was an error making
15014// the request the page does not advance and the error is returned.
15015// Deprecated: Use NextWithContext() instead.
15016func (page *LoadBalancerListResultPage) Next() error {
15017	return page.NextWithContext(context.Background())
15018}
15019
15020// NotDone returns true if the page enumeration should be started or is not yet complete.
15021func (page LoadBalancerListResultPage) NotDone() bool {
15022	return !page.lblr.IsEmpty()
15023}
15024
15025// Response returns the raw server response from the last page request.
15026func (page LoadBalancerListResultPage) Response() LoadBalancerListResult {
15027	return page.lblr
15028}
15029
15030// Values returns the slice of values for the current page or nil if there are no values.
15031func (page LoadBalancerListResultPage) Values() []LoadBalancer {
15032	if page.lblr.IsEmpty() {
15033		return nil
15034	}
15035	return *page.lblr.Value
15036}
15037
15038// Creates a new instance of the LoadBalancerListResultPage type.
15039func NewLoadBalancerListResultPage(cur LoadBalancerListResult, getNextPage func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)) LoadBalancerListResultPage {
15040	return LoadBalancerListResultPage{
15041		fn:   getNextPage,
15042		lblr: cur,
15043	}
15044}
15045
15046// LoadBalancerLoadBalancingRuleListResult response for ListLoadBalancingRule API service call.
15047type LoadBalancerLoadBalancingRuleListResult struct {
15048	autorest.Response `json:"-"`
15049	// Value - A list of load balancing rules in a load balancer.
15050	Value *[]LoadBalancingRule `json:"value,omitempty"`
15051	// NextLink - READ-ONLY; The URL to get the next set of results.
15052	NextLink *string `json:"nextLink,omitempty"`
15053}
15054
15055// MarshalJSON is the custom marshaler for LoadBalancerLoadBalancingRuleListResult.
15056func (lblbrlr LoadBalancerLoadBalancingRuleListResult) MarshalJSON() ([]byte, error) {
15057	objectMap := make(map[string]interface{})
15058	if lblbrlr.Value != nil {
15059		objectMap["value"] = lblbrlr.Value
15060	}
15061	return json.Marshal(objectMap)
15062}
15063
15064// LoadBalancerLoadBalancingRuleListResultIterator provides access to a complete listing of
15065// LoadBalancingRule values.
15066type LoadBalancerLoadBalancingRuleListResultIterator struct {
15067	i    int
15068	page LoadBalancerLoadBalancingRuleListResultPage
15069}
15070
15071// NextWithContext advances to the next value.  If there was an error making
15072// the request the iterator does not advance and the error is returned.
15073func (iter *LoadBalancerLoadBalancingRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
15074	if tracing.IsEnabled() {
15075		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultIterator.NextWithContext")
15076		defer func() {
15077			sc := -1
15078			if iter.Response().Response.Response != nil {
15079				sc = iter.Response().Response.Response.StatusCode
15080			}
15081			tracing.EndSpan(ctx, sc, err)
15082		}()
15083	}
15084	iter.i++
15085	if iter.i < len(iter.page.Values()) {
15086		return nil
15087	}
15088	err = iter.page.NextWithContext(ctx)
15089	if err != nil {
15090		iter.i--
15091		return err
15092	}
15093	iter.i = 0
15094	return nil
15095}
15096
15097// Next advances to the next value.  If there was an error making
15098// the request the iterator does not advance and the error is returned.
15099// Deprecated: Use NextWithContext() instead.
15100func (iter *LoadBalancerLoadBalancingRuleListResultIterator) Next() error {
15101	return iter.NextWithContext(context.Background())
15102}
15103
15104// NotDone returns true if the enumeration should be started or is not yet complete.
15105func (iter LoadBalancerLoadBalancingRuleListResultIterator) NotDone() bool {
15106	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15107}
15108
15109// Response returns the raw server response from the last page request.
15110func (iter LoadBalancerLoadBalancingRuleListResultIterator) Response() LoadBalancerLoadBalancingRuleListResult {
15111	return iter.page.Response()
15112}
15113
15114// Value returns the current value or a zero-initialized value if the
15115// iterator has advanced beyond the end of the collection.
15116func (iter LoadBalancerLoadBalancingRuleListResultIterator) Value() LoadBalancingRule {
15117	if !iter.page.NotDone() {
15118		return LoadBalancingRule{}
15119	}
15120	return iter.page.Values()[iter.i]
15121}
15122
15123// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultIterator type.
15124func NewLoadBalancerLoadBalancingRuleListResultIterator(page LoadBalancerLoadBalancingRuleListResultPage) LoadBalancerLoadBalancingRuleListResultIterator {
15125	return LoadBalancerLoadBalancingRuleListResultIterator{page: page}
15126}
15127
15128// IsEmpty returns true if the ListResult contains no values.
15129func (lblbrlr LoadBalancerLoadBalancingRuleListResult) IsEmpty() bool {
15130	return lblbrlr.Value == nil || len(*lblbrlr.Value) == 0
15131}
15132
15133// hasNextLink returns true if the NextLink is not empty.
15134func (lblbrlr LoadBalancerLoadBalancingRuleListResult) hasNextLink() bool {
15135	return lblbrlr.NextLink != nil && len(*lblbrlr.NextLink) != 0
15136}
15137
15138// loadBalancerLoadBalancingRuleListResultPreparer prepares a request to retrieve the next set of results.
15139// It returns nil if no more results exist.
15140func (lblbrlr LoadBalancerLoadBalancingRuleListResult) loadBalancerLoadBalancingRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
15141	if !lblbrlr.hasNextLink() {
15142		return nil, nil
15143	}
15144	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15145		autorest.AsJSON(),
15146		autorest.AsGet(),
15147		autorest.WithBaseURL(to.String(lblbrlr.NextLink)))
15148}
15149
15150// LoadBalancerLoadBalancingRuleListResultPage contains a page of LoadBalancingRule values.
15151type LoadBalancerLoadBalancingRuleListResultPage struct {
15152	fn      func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)
15153	lblbrlr LoadBalancerLoadBalancingRuleListResult
15154}
15155
15156// NextWithContext advances to the next page of values.  If there was an error making
15157// the request the page does not advance and the error is returned.
15158func (page *LoadBalancerLoadBalancingRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
15159	if tracing.IsEnabled() {
15160		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultPage.NextWithContext")
15161		defer func() {
15162			sc := -1
15163			if page.Response().Response.Response != nil {
15164				sc = page.Response().Response.Response.StatusCode
15165			}
15166			tracing.EndSpan(ctx, sc, err)
15167		}()
15168	}
15169	for {
15170		next, err := page.fn(ctx, page.lblbrlr)
15171		if err != nil {
15172			return err
15173		}
15174		page.lblbrlr = next
15175		if !next.hasNextLink() || !next.IsEmpty() {
15176			break
15177		}
15178	}
15179	return nil
15180}
15181
15182// Next advances to the next page of values.  If there was an error making
15183// the request the page does not advance and the error is returned.
15184// Deprecated: Use NextWithContext() instead.
15185func (page *LoadBalancerLoadBalancingRuleListResultPage) Next() error {
15186	return page.NextWithContext(context.Background())
15187}
15188
15189// NotDone returns true if the page enumeration should be started or is not yet complete.
15190func (page LoadBalancerLoadBalancingRuleListResultPage) NotDone() bool {
15191	return !page.lblbrlr.IsEmpty()
15192}
15193
15194// Response returns the raw server response from the last page request.
15195func (page LoadBalancerLoadBalancingRuleListResultPage) Response() LoadBalancerLoadBalancingRuleListResult {
15196	return page.lblbrlr
15197}
15198
15199// Values returns the slice of values for the current page or nil if there are no values.
15200func (page LoadBalancerLoadBalancingRuleListResultPage) Values() []LoadBalancingRule {
15201	if page.lblbrlr.IsEmpty() {
15202		return nil
15203	}
15204	return *page.lblbrlr.Value
15205}
15206
15207// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultPage type.
15208func NewLoadBalancerLoadBalancingRuleListResultPage(cur LoadBalancerLoadBalancingRuleListResult, getNextPage func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)) LoadBalancerLoadBalancingRuleListResultPage {
15209	return LoadBalancerLoadBalancingRuleListResultPage{
15210		fn:      getNextPage,
15211		lblbrlr: cur,
15212	}
15213}
15214
15215// LoadBalancerOutboundRuleListResult response for ListOutboundRule API service call.
15216type LoadBalancerOutboundRuleListResult struct {
15217	autorest.Response `json:"-"`
15218	// Value - A list of outbound rules in a load balancer.
15219	Value *[]OutboundRule `json:"value,omitempty"`
15220	// NextLink - READ-ONLY; The URL to get the next set of results.
15221	NextLink *string `json:"nextLink,omitempty"`
15222}
15223
15224// MarshalJSON is the custom marshaler for LoadBalancerOutboundRuleListResult.
15225func (lborlr LoadBalancerOutboundRuleListResult) MarshalJSON() ([]byte, error) {
15226	objectMap := make(map[string]interface{})
15227	if lborlr.Value != nil {
15228		objectMap["value"] = lborlr.Value
15229	}
15230	return json.Marshal(objectMap)
15231}
15232
15233// LoadBalancerOutboundRuleListResultIterator provides access to a complete listing of OutboundRule values.
15234type LoadBalancerOutboundRuleListResultIterator struct {
15235	i    int
15236	page LoadBalancerOutboundRuleListResultPage
15237}
15238
15239// NextWithContext advances to the next value.  If there was an error making
15240// the request the iterator does not advance and the error is returned.
15241func (iter *LoadBalancerOutboundRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
15242	if tracing.IsEnabled() {
15243		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerOutboundRuleListResultIterator.NextWithContext")
15244		defer func() {
15245			sc := -1
15246			if iter.Response().Response.Response != nil {
15247				sc = iter.Response().Response.Response.StatusCode
15248			}
15249			tracing.EndSpan(ctx, sc, err)
15250		}()
15251	}
15252	iter.i++
15253	if iter.i < len(iter.page.Values()) {
15254		return nil
15255	}
15256	err = iter.page.NextWithContext(ctx)
15257	if err != nil {
15258		iter.i--
15259		return err
15260	}
15261	iter.i = 0
15262	return nil
15263}
15264
15265// Next advances to the next value.  If there was an error making
15266// the request the iterator does not advance and the error is returned.
15267// Deprecated: Use NextWithContext() instead.
15268func (iter *LoadBalancerOutboundRuleListResultIterator) Next() error {
15269	return iter.NextWithContext(context.Background())
15270}
15271
15272// NotDone returns true if the enumeration should be started or is not yet complete.
15273func (iter LoadBalancerOutboundRuleListResultIterator) NotDone() bool {
15274	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15275}
15276
15277// Response returns the raw server response from the last page request.
15278func (iter LoadBalancerOutboundRuleListResultIterator) Response() LoadBalancerOutboundRuleListResult {
15279	return iter.page.Response()
15280}
15281
15282// Value returns the current value or a zero-initialized value if the
15283// iterator has advanced beyond the end of the collection.
15284func (iter LoadBalancerOutboundRuleListResultIterator) Value() OutboundRule {
15285	if !iter.page.NotDone() {
15286		return OutboundRule{}
15287	}
15288	return iter.page.Values()[iter.i]
15289}
15290
15291// Creates a new instance of the LoadBalancerOutboundRuleListResultIterator type.
15292func NewLoadBalancerOutboundRuleListResultIterator(page LoadBalancerOutboundRuleListResultPage) LoadBalancerOutboundRuleListResultIterator {
15293	return LoadBalancerOutboundRuleListResultIterator{page: page}
15294}
15295
15296// IsEmpty returns true if the ListResult contains no values.
15297func (lborlr LoadBalancerOutboundRuleListResult) IsEmpty() bool {
15298	return lborlr.Value == nil || len(*lborlr.Value) == 0
15299}
15300
15301// hasNextLink returns true if the NextLink is not empty.
15302func (lborlr LoadBalancerOutboundRuleListResult) hasNextLink() bool {
15303	return lborlr.NextLink != nil && len(*lborlr.NextLink) != 0
15304}
15305
15306// loadBalancerOutboundRuleListResultPreparer prepares a request to retrieve the next set of results.
15307// It returns nil if no more results exist.
15308func (lborlr LoadBalancerOutboundRuleListResult) loadBalancerOutboundRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
15309	if !lborlr.hasNextLink() {
15310		return nil, nil
15311	}
15312	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15313		autorest.AsJSON(),
15314		autorest.AsGet(),
15315		autorest.WithBaseURL(to.String(lborlr.NextLink)))
15316}
15317
15318// LoadBalancerOutboundRuleListResultPage contains a page of OutboundRule values.
15319type LoadBalancerOutboundRuleListResultPage struct {
15320	fn     func(context.Context, LoadBalancerOutboundRuleListResult) (LoadBalancerOutboundRuleListResult, error)
15321	lborlr LoadBalancerOutboundRuleListResult
15322}
15323
15324// NextWithContext advances to the next page of values.  If there was an error making
15325// the request the page does not advance and the error is returned.
15326func (page *LoadBalancerOutboundRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
15327	if tracing.IsEnabled() {
15328		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerOutboundRuleListResultPage.NextWithContext")
15329		defer func() {
15330			sc := -1
15331			if page.Response().Response.Response != nil {
15332				sc = page.Response().Response.Response.StatusCode
15333			}
15334			tracing.EndSpan(ctx, sc, err)
15335		}()
15336	}
15337	for {
15338		next, err := page.fn(ctx, page.lborlr)
15339		if err != nil {
15340			return err
15341		}
15342		page.lborlr = next
15343		if !next.hasNextLink() || !next.IsEmpty() {
15344			break
15345		}
15346	}
15347	return nil
15348}
15349
15350// Next advances to the next page of values.  If there was an error making
15351// the request the page does not advance and the error is returned.
15352// Deprecated: Use NextWithContext() instead.
15353func (page *LoadBalancerOutboundRuleListResultPage) Next() error {
15354	return page.NextWithContext(context.Background())
15355}
15356
15357// NotDone returns true if the page enumeration should be started or is not yet complete.
15358func (page LoadBalancerOutboundRuleListResultPage) NotDone() bool {
15359	return !page.lborlr.IsEmpty()
15360}
15361
15362// Response returns the raw server response from the last page request.
15363func (page LoadBalancerOutboundRuleListResultPage) Response() LoadBalancerOutboundRuleListResult {
15364	return page.lborlr
15365}
15366
15367// Values returns the slice of values for the current page or nil if there are no values.
15368func (page LoadBalancerOutboundRuleListResultPage) Values() []OutboundRule {
15369	if page.lborlr.IsEmpty() {
15370		return nil
15371	}
15372	return *page.lborlr.Value
15373}
15374
15375// Creates a new instance of the LoadBalancerOutboundRuleListResultPage type.
15376func NewLoadBalancerOutboundRuleListResultPage(cur LoadBalancerOutboundRuleListResult, getNextPage func(context.Context, LoadBalancerOutboundRuleListResult) (LoadBalancerOutboundRuleListResult, error)) LoadBalancerOutboundRuleListResultPage {
15377	return LoadBalancerOutboundRuleListResultPage{
15378		fn:     getNextPage,
15379		lborlr: cur,
15380	}
15381}
15382
15383// LoadBalancerProbeListResult response for ListProbe API service call.
15384type LoadBalancerProbeListResult struct {
15385	autorest.Response `json:"-"`
15386	// Value - A list of probes in a load balancer.
15387	Value *[]Probe `json:"value,omitempty"`
15388	// NextLink - READ-ONLY; The URL to get the next set of results.
15389	NextLink *string `json:"nextLink,omitempty"`
15390}
15391
15392// MarshalJSON is the custom marshaler for LoadBalancerProbeListResult.
15393func (lbplr LoadBalancerProbeListResult) MarshalJSON() ([]byte, error) {
15394	objectMap := make(map[string]interface{})
15395	if lbplr.Value != nil {
15396		objectMap["value"] = lbplr.Value
15397	}
15398	return json.Marshal(objectMap)
15399}
15400
15401// LoadBalancerProbeListResultIterator provides access to a complete listing of Probe values.
15402type LoadBalancerProbeListResultIterator struct {
15403	i    int
15404	page LoadBalancerProbeListResultPage
15405}
15406
15407// NextWithContext advances to the next value.  If there was an error making
15408// the request the iterator does not advance and the error is returned.
15409func (iter *LoadBalancerProbeListResultIterator) NextWithContext(ctx context.Context) (err error) {
15410	if tracing.IsEnabled() {
15411		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultIterator.NextWithContext")
15412		defer func() {
15413			sc := -1
15414			if iter.Response().Response.Response != nil {
15415				sc = iter.Response().Response.Response.StatusCode
15416			}
15417			tracing.EndSpan(ctx, sc, err)
15418		}()
15419	}
15420	iter.i++
15421	if iter.i < len(iter.page.Values()) {
15422		return nil
15423	}
15424	err = iter.page.NextWithContext(ctx)
15425	if err != nil {
15426		iter.i--
15427		return err
15428	}
15429	iter.i = 0
15430	return nil
15431}
15432
15433// Next advances to the next value.  If there was an error making
15434// the request the iterator does not advance and the error is returned.
15435// Deprecated: Use NextWithContext() instead.
15436func (iter *LoadBalancerProbeListResultIterator) Next() error {
15437	return iter.NextWithContext(context.Background())
15438}
15439
15440// NotDone returns true if the enumeration should be started or is not yet complete.
15441func (iter LoadBalancerProbeListResultIterator) NotDone() bool {
15442	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15443}
15444
15445// Response returns the raw server response from the last page request.
15446func (iter LoadBalancerProbeListResultIterator) Response() LoadBalancerProbeListResult {
15447	return iter.page.Response()
15448}
15449
15450// Value returns the current value or a zero-initialized value if the
15451// iterator has advanced beyond the end of the collection.
15452func (iter LoadBalancerProbeListResultIterator) Value() Probe {
15453	if !iter.page.NotDone() {
15454		return Probe{}
15455	}
15456	return iter.page.Values()[iter.i]
15457}
15458
15459// Creates a new instance of the LoadBalancerProbeListResultIterator type.
15460func NewLoadBalancerProbeListResultIterator(page LoadBalancerProbeListResultPage) LoadBalancerProbeListResultIterator {
15461	return LoadBalancerProbeListResultIterator{page: page}
15462}
15463
15464// IsEmpty returns true if the ListResult contains no values.
15465func (lbplr LoadBalancerProbeListResult) IsEmpty() bool {
15466	return lbplr.Value == nil || len(*lbplr.Value) == 0
15467}
15468
15469// hasNextLink returns true if the NextLink is not empty.
15470func (lbplr LoadBalancerProbeListResult) hasNextLink() bool {
15471	return lbplr.NextLink != nil && len(*lbplr.NextLink) != 0
15472}
15473
15474// loadBalancerProbeListResultPreparer prepares a request to retrieve the next set of results.
15475// It returns nil if no more results exist.
15476func (lbplr LoadBalancerProbeListResult) loadBalancerProbeListResultPreparer(ctx context.Context) (*http.Request, error) {
15477	if !lbplr.hasNextLink() {
15478		return nil, nil
15479	}
15480	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15481		autorest.AsJSON(),
15482		autorest.AsGet(),
15483		autorest.WithBaseURL(to.String(lbplr.NextLink)))
15484}
15485
15486// LoadBalancerProbeListResultPage contains a page of Probe values.
15487type LoadBalancerProbeListResultPage struct {
15488	fn    func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)
15489	lbplr LoadBalancerProbeListResult
15490}
15491
15492// NextWithContext advances to the next page of values.  If there was an error making
15493// the request the page does not advance and the error is returned.
15494func (page *LoadBalancerProbeListResultPage) NextWithContext(ctx context.Context) (err error) {
15495	if tracing.IsEnabled() {
15496		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultPage.NextWithContext")
15497		defer func() {
15498			sc := -1
15499			if page.Response().Response.Response != nil {
15500				sc = page.Response().Response.Response.StatusCode
15501			}
15502			tracing.EndSpan(ctx, sc, err)
15503		}()
15504	}
15505	for {
15506		next, err := page.fn(ctx, page.lbplr)
15507		if err != nil {
15508			return err
15509		}
15510		page.lbplr = next
15511		if !next.hasNextLink() || !next.IsEmpty() {
15512			break
15513		}
15514	}
15515	return nil
15516}
15517
15518// Next advances to the next page of values.  If there was an error making
15519// the request the page does not advance and the error is returned.
15520// Deprecated: Use NextWithContext() instead.
15521func (page *LoadBalancerProbeListResultPage) Next() error {
15522	return page.NextWithContext(context.Background())
15523}
15524
15525// NotDone returns true if the page enumeration should be started or is not yet complete.
15526func (page LoadBalancerProbeListResultPage) NotDone() bool {
15527	return !page.lbplr.IsEmpty()
15528}
15529
15530// Response returns the raw server response from the last page request.
15531func (page LoadBalancerProbeListResultPage) Response() LoadBalancerProbeListResult {
15532	return page.lbplr
15533}
15534
15535// Values returns the slice of values for the current page or nil if there are no values.
15536func (page LoadBalancerProbeListResultPage) Values() []Probe {
15537	if page.lbplr.IsEmpty() {
15538		return nil
15539	}
15540	return *page.lbplr.Value
15541}
15542
15543// Creates a new instance of the LoadBalancerProbeListResultPage type.
15544func NewLoadBalancerProbeListResultPage(cur LoadBalancerProbeListResult, getNextPage func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)) LoadBalancerProbeListResultPage {
15545	return LoadBalancerProbeListResultPage{
15546		fn:    getNextPage,
15547		lbplr: cur,
15548	}
15549}
15550
15551// LoadBalancerPropertiesFormat properties of the load balancer.
15552type LoadBalancerPropertiesFormat struct {
15553	// FrontendIPConfigurations - Object representing the frontend IPs to be used for the load balancer
15554	FrontendIPConfigurations *[]FrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"`
15555	// BackendAddressPools - Collection of backend address pools used by a load balancer
15556	BackendAddressPools *[]BackendAddressPool `json:"backendAddressPools,omitempty"`
15557	// LoadBalancingRules - Object collection representing the load balancing rules Gets the provisioning
15558	LoadBalancingRules *[]LoadBalancingRule `json:"loadBalancingRules,omitempty"`
15559	// Probes - Collection of probe objects used in the load balancer
15560	Probes *[]Probe `json:"probes,omitempty"`
15561	// 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.
15562	InboundNatRules *[]InboundNatRule `json:"inboundNatRules,omitempty"`
15563	// 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.
15564	InboundNatPools *[]InboundNatPool `json:"inboundNatPools,omitempty"`
15565	// OutboundRules - The outbound rules.
15566	OutboundRules *[]OutboundRule `json:"outboundRules,omitempty"`
15567	// ResourceGUID - The resource GUID property of the load balancer resource.
15568	ResourceGUID *string `json:"resourceGuid,omitempty"`
15569	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
15570	ProvisioningState *string `json:"provisioningState,omitempty"`
15571}
15572
15573// LoadBalancersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
15574// long-running operation.
15575type LoadBalancersCreateOrUpdateFuture struct {
15576	azure.FutureAPI
15577	// Result returns the result of the asynchronous operation.
15578	// If the operation has not completed it will return an error.
15579	Result func(LoadBalancersClient) (LoadBalancer, error)
15580}
15581
15582// LoadBalancersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
15583// operation.
15584type LoadBalancersDeleteFuture struct {
15585	azure.FutureAPI
15586	// Result returns the result of the asynchronous operation.
15587	// If the operation has not completed it will return an error.
15588	Result func(LoadBalancersClient) (autorest.Response, error)
15589}
15590
15591// LoadBalancerSku SKU of a load balancer
15592type LoadBalancerSku struct {
15593	// Name - Name of a load balancer SKU. Possible values include: 'LoadBalancerSkuNameBasic', 'LoadBalancerSkuNameStandard'
15594	Name LoadBalancerSkuName `json:"name,omitempty"`
15595}
15596
15597// LoadBalancersUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
15598// operation.
15599type LoadBalancersUpdateTagsFuture struct {
15600	azure.FutureAPI
15601	// Result returns the result of the asynchronous operation.
15602	// If the operation has not completed it will return an error.
15603	Result func(LoadBalancersClient) (LoadBalancer, error)
15604}
15605
15606// LoadBalancingRule a load balancing rule for a load balancer.
15607type LoadBalancingRule struct {
15608	autorest.Response `json:"-"`
15609	// LoadBalancingRulePropertiesFormat - Properties of load balancer load balancing rule.
15610	*LoadBalancingRulePropertiesFormat `json:"properties,omitempty"`
15611	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
15612	Name *string `json:"name,omitempty"`
15613	// Etag - A unique read-only string that changes whenever the resource is updated.
15614	Etag *string `json:"etag,omitempty"`
15615	// ID - Resource ID.
15616	ID *string `json:"id,omitempty"`
15617}
15618
15619// MarshalJSON is the custom marshaler for LoadBalancingRule.
15620func (lbr LoadBalancingRule) MarshalJSON() ([]byte, error) {
15621	objectMap := make(map[string]interface{})
15622	if lbr.LoadBalancingRulePropertiesFormat != nil {
15623		objectMap["properties"] = lbr.LoadBalancingRulePropertiesFormat
15624	}
15625	if lbr.Name != nil {
15626		objectMap["name"] = lbr.Name
15627	}
15628	if lbr.Etag != nil {
15629		objectMap["etag"] = lbr.Etag
15630	}
15631	if lbr.ID != nil {
15632		objectMap["id"] = lbr.ID
15633	}
15634	return json.Marshal(objectMap)
15635}
15636
15637// UnmarshalJSON is the custom unmarshaler for LoadBalancingRule struct.
15638func (lbr *LoadBalancingRule) UnmarshalJSON(body []byte) error {
15639	var m map[string]*json.RawMessage
15640	err := json.Unmarshal(body, &m)
15641	if err != nil {
15642		return err
15643	}
15644	for k, v := range m {
15645		switch k {
15646		case "properties":
15647			if v != nil {
15648				var loadBalancingRulePropertiesFormat LoadBalancingRulePropertiesFormat
15649				err = json.Unmarshal(*v, &loadBalancingRulePropertiesFormat)
15650				if err != nil {
15651					return err
15652				}
15653				lbr.LoadBalancingRulePropertiesFormat = &loadBalancingRulePropertiesFormat
15654			}
15655		case "name":
15656			if v != nil {
15657				var name string
15658				err = json.Unmarshal(*v, &name)
15659				if err != nil {
15660					return err
15661				}
15662				lbr.Name = &name
15663			}
15664		case "etag":
15665			if v != nil {
15666				var etag string
15667				err = json.Unmarshal(*v, &etag)
15668				if err != nil {
15669					return err
15670				}
15671				lbr.Etag = &etag
15672			}
15673		case "id":
15674			if v != nil {
15675				var ID string
15676				err = json.Unmarshal(*v, &ID)
15677				if err != nil {
15678					return err
15679				}
15680				lbr.ID = &ID
15681			}
15682		}
15683	}
15684
15685	return nil
15686}
15687
15688// LoadBalancingRulePropertiesFormat properties of the load balancer.
15689type LoadBalancingRulePropertiesFormat struct {
15690	// FrontendIPConfiguration - A reference to frontend IP addresses.
15691	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
15692	// BackendAddressPool - A reference to a pool of DIPs. Inbound traffic is randomly load balanced across IPs in the backend IPs.
15693	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
15694	// Probe - The reference of the load balancer probe used by the load balancing rule.
15695	Probe *SubResource `json:"probe,omitempty"`
15696	// Protocol - The reference to the transport protocol used by the load balancing rule. Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
15697	Protocol TransportProtocol `json:"protocol,omitempty"`
15698	// LoadDistribution - The load distribution policy for this rule. Possible values are 'Default', 'SourceIP', and 'SourceIPProtocol'. Possible values include: 'LoadDistributionDefault', 'LoadDistributionSourceIP', 'LoadDistributionSourceIPProtocol'
15699	LoadDistribution LoadDistribution `json:"loadDistribution,omitempty"`
15700	// 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"
15701	FrontendPort *int32 `json:"frontendPort,omitempty"`
15702	// BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 0 and 65535. Note that value 0 enables "Any Port"
15703	BackendPort *int32 `json:"backendPort,omitempty"`
15704	// 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.
15705	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
15706	// 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.
15707	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
15708	// EnableTCPReset - Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP.
15709	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
15710	// DisableOutboundSnat - Configures SNAT for the VMs in the backend pool to use the publicIP address specified in the frontend of the load balancing rule.
15711	DisableOutboundSnat *bool `json:"disableOutboundSnat,omitempty"`
15712	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
15713	ProvisioningState *string `json:"provisioningState,omitempty"`
15714}
15715
15716// LocalNetworkGateway a common class for general resource information
15717type LocalNetworkGateway struct {
15718	autorest.Response `json:"-"`
15719	// LocalNetworkGatewayPropertiesFormat - Properties of the local network gateway.
15720	*LocalNetworkGatewayPropertiesFormat `json:"properties,omitempty"`
15721	// Etag - A unique read-only string that changes whenever the resource is updated.
15722	Etag *string `json:"etag,omitempty"`
15723	// ID - Resource ID.
15724	ID *string `json:"id,omitempty"`
15725	// Name - READ-ONLY; Resource name.
15726	Name *string `json:"name,omitempty"`
15727	// Type - READ-ONLY; Resource type.
15728	Type *string `json:"type,omitempty"`
15729	// Location - Resource location.
15730	Location *string `json:"location,omitempty"`
15731	// Tags - Resource tags.
15732	Tags map[string]*string `json:"tags"`
15733}
15734
15735// MarshalJSON is the custom marshaler for LocalNetworkGateway.
15736func (lng LocalNetworkGateway) MarshalJSON() ([]byte, error) {
15737	objectMap := make(map[string]interface{})
15738	if lng.LocalNetworkGatewayPropertiesFormat != nil {
15739		objectMap["properties"] = lng.LocalNetworkGatewayPropertiesFormat
15740	}
15741	if lng.Etag != nil {
15742		objectMap["etag"] = lng.Etag
15743	}
15744	if lng.ID != nil {
15745		objectMap["id"] = lng.ID
15746	}
15747	if lng.Location != nil {
15748		objectMap["location"] = lng.Location
15749	}
15750	if lng.Tags != nil {
15751		objectMap["tags"] = lng.Tags
15752	}
15753	return json.Marshal(objectMap)
15754}
15755
15756// UnmarshalJSON is the custom unmarshaler for LocalNetworkGateway struct.
15757func (lng *LocalNetworkGateway) UnmarshalJSON(body []byte) error {
15758	var m map[string]*json.RawMessage
15759	err := json.Unmarshal(body, &m)
15760	if err != nil {
15761		return err
15762	}
15763	for k, v := range m {
15764		switch k {
15765		case "properties":
15766			if v != nil {
15767				var localNetworkGatewayPropertiesFormat LocalNetworkGatewayPropertiesFormat
15768				err = json.Unmarshal(*v, &localNetworkGatewayPropertiesFormat)
15769				if err != nil {
15770					return err
15771				}
15772				lng.LocalNetworkGatewayPropertiesFormat = &localNetworkGatewayPropertiesFormat
15773			}
15774		case "etag":
15775			if v != nil {
15776				var etag string
15777				err = json.Unmarshal(*v, &etag)
15778				if err != nil {
15779					return err
15780				}
15781				lng.Etag = &etag
15782			}
15783		case "id":
15784			if v != nil {
15785				var ID string
15786				err = json.Unmarshal(*v, &ID)
15787				if err != nil {
15788					return err
15789				}
15790				lng.ID = &ID
15791			}
15792		case "name":
15793			if v != nil {
15794				var name string
15795				err = json.Unmarshal(*v, &name)
15796				if err != nil {
15797					return err
15798				}
15799				lng.Name = &name
15800			}
15801		case "type":
15802			if v != nil {
15803				var typeVar string
15804				err = json.Unmarshal(*v, &typeVar)
15805				if err != nil {
15806					return err
15807				}
15808				lng.Type = &typeVar
15809			}
15810		case "location":
15811			if v != nil {
15812				var location string
15813				err = json.Unmarshal(*v, &location)
15814				if err != nil {
15815					return err
15816				}
15817				lng.Location = &location
15818			}
15819		case "tags":
15820			if v != nil {
15821				var tags map[string]*string
15822				err = json.Unmarshal(*v, &tags)
15823				if err != nil {
15824					return err
15825				}
15826				lng.Tags = tags
15827			}
15828		}
15829	}
15830
15831	return nil
15832}
15833
15834// LocalNetworkGatewayListResult response for ListLocalNetworkGateways API service call.
15835type LocalNetworkGatewayListResult struct {
15836	autorest.Response `json:"-"`
15837	// Value - A list of local network gateways that exists in a resource group.
15838	Value *[]LocalNetworkGateway `json:"value,omitempty"`
15839	// NextLink - READ-ONLY; The URL to get the next set of results.
15840	NextLink *string `json:"nextLink,omitempty"`
15841}
15842
15843// MarshalJSON is the custom marshaler for LocalNetworkGatewayListResult.
15844func (lnglr LocalNetworkGatewayListResult) MarshalJSON() ([]byte, error) {
15845	objectMap := make(map[string]interface{})
15846	if lnglr.Value != nil {
15847		objectMap["value"] = lnglr.Value
15848	}
15849	return json.Marshal(objectMap)
15850}
15851
15852// LocalNetworkGatewayListResultIterator provides access to a complete listing of LocalNetworkGateway
15853// values.
15854type LocalNetworkGatewayListResultIterator struct {
15855	i    int
15856	page LocalNetworkGatewayListResultPage
15857}
15858
15859// NextWithContext advances to the next value.  If there was an error making
15860// the request the iterator does not advance and the error is returned.
15861func (iter *LocalNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
15862	if tracing.IsEnabled() {
15863		ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultIterator.NextWithContext")
15864		defer func() {
15865			sc := -1
15866			if iter.Response().Response.Response != nil {
15867				sc = iter.Response().Response.Response.StatusCode
15868			}
15869			tracing.EndSpan(ctx, sc, err)
15870		}()
15871	}
15872	iter.i++
15873	if iter.i < len(iter.page.Values()) {
15874		return nil
15875	}
15876	err = iter.page.NextWithContext(ctx)
15877	if err != nil {
15878		iter.i--
15879		return err
15880	}
15881	iter.i = 0
15882	return nil
15883}
15884
15885// Next advances to the next value.  If there was an error making
15886// the request the iterator does not advance and the error is returned.
15887// Deprecated: Use NextWithContext() instead.
15888func (iter *LocalNetworkGatewayListResultIterator) Next() error {
15889	return iter.NextWithContext(context.Background())
15890}
15891
15892// NotDone returns true if the enumeration should be started or is not yet complete.
15893func (iter LocalNetworkGatewayListResultIterator) NotDone() bool {
15894	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15895}
15896
15897// Response returns the raw server response from the last page request.
15898func (iter LocalNetworkGatewayListResultIterator) Response() LocalNetworkGatewayListResult {
15899	return iter.page.Response()
15900}
15901
15902// Value returns the current value or a zero-initialized value if the
15903// iterator has advanced beyond the end of the collection.
15904func (iter LocalNetworkGatewayListResultIterator) Value() LocalNetworkGateway {
15905	if !iter.page.NotDone() {
15906		return LocalNetworkGateway{}
15907	}
15908	return iter.page.Values()[iter.i]
15909}
15910
15911// Creates a new instance of the LocalNetworkGatewayListResultIterator type.
15912func NewLocalNetworkGatewayListResultIterator(page LocalNetworkGatewayListResultPage) LocalNetworkGatewayListResultIterator {
15913	return LocalNetworkGatewayListResultIterator{page: page}
15914}
15915
15916// IsEmpty returns true if the ListResult contains no values.
15917func (lnglr LocalNetworkGatewayListResult) IsEmpty() bool {
15918	return lnglr.Value == nil || len(*lnglr.Value) == 0
15919}
15920
15921// hasNextLink returns true if the NextLink is not empty.
15922func (lnglr LocalNetworkGatewayListResult) hasNextLink() bool {
15923	return lnglr.NextLink != nil && len(*lnglr.NextLink) != 0
15924}
15925
15926// localNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results.
15927// It returns nil if no more results exist.
15928func (lnglr LocalNetworkGatewayListResult) localNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
15929	if !lnglr.hasNextLink() {
15930		return nil, nil
15931	}
15932	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15933		autorest.AsJSON(),
15934		autorest.AsGet(),
15935		autorest.WithBaseURL(to.String(lnglr.NextLink)))
15936}
15937
15938// LocalNetworkGatewayListResultPage contains a page of LocalNetworkGateway values.
15939type LocalNetworkGatewayListResultPage struct {
15940	fn    func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)
15941	lnglr LocalNetworkGatewayListResult
15942}
15943
15944// NextWithContext advances to the next page of values.  If there was an error making
15945// the request the page does not advance and the error is returned.
15946func (page *LocalNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
15947	if tracing.IsEnabled() {
15948		ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultPage.NextWithContext")
15949		defer func() {
15950			sc := -1
15951			if page.Response().Response.Response != nil {
15952				sc = page.Response().Response.Response.StatusCode
15953			}
15954			tracing.EndSpan(ctx, sc, err)
15955		}()
15956	}
15957	for {
15958		next, err := page.fn(ctx, page.lnglr)
15959		if err != nil {
15960			return err
15961		}
15962		page.lnglr = next
15963		if !next.hasNextLink() || !next.IsEmpty() {
15964			break
15965		}
15966	}
15967	return nil
15968}
15969
15970// Next advances to the next page of values.  If there was an error making
15971// the request the page does not advance and the error is returned.
15972// Deprecated: Use NextWithContext() instead.
15973func (page *LocalNetworkGatewayListResultPage) Next() error {
15974	return page.NextWithContext(context.Background())
15975}
15976
15977// NotDone returns true if the page enumeration should be started or is not yet complete.
15978func (page LocalNetworkGatewayListResultPage) NotDone() bool {
15979	return !page.lnglr.IsEmpty()
15980}
15981
15982// Response returns the raw server response from the last page request.
15983func (page LocalNetworkGatewayListResultPage) Response() LocalNetworkGatewayListResult {
15984	return page.lnglr
15985}
15986
15987// Values returns the slice of values for the current page or nil if there are no values.
15988func (page LocalNetworkGatewayListResultPage) Values() []LocalNetworkGateway {
15989	if page.lnglr.IsEmpty() {
15990		return nil
15991	}
15992	return *page.lnglr.Value
15993}
15994
15995// Creates a new instance of the LocalNetworkGatewayListResultPage type.
15996func NewLocalNetworkGatewayListResultPage(cur LocalNetworkGatewayListResult, getNextPage func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)) LocalNetworkGatewayListResultPage {
15997	return LocalNetworkGatewayListResultPage{
15998		fn:    getNextPage,
15999		lnglr: cur,
16000	}
16001}
16002
16003// LocalNetworkGatewayPropertiesFormat localNetworkGateway properties
16004type LocalNetworkGatewayPropertiesFormat struct {
16005	// LocalNetworkAddressSpace - Local network site address space.
16006	LocalNetworkAddressSpace *AddressSpace `json:"localNetworkAddressSpace,omitempty"`
16007	// GatewayIPAddress - IP address of local network gateway.
16008	GatewayIPAddress *string `json:"gatewayIpAddress,omitempty"`
16009	// BgpSettings - Local network gateway's BGP speaker settings.
16010	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
16011	// ResourceGUID - The resource GUID property of the LocalNetworkGateway resource.
16012	ResourceGUID *string `json:"resourceGuid,omitempty"`
16013	// ProvisioningState - READ-ONLY; The provisioning state of the LocalNetworkGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
16014	ProvisioningState *string `json:"provisioningState,omitempty"`
16015}
16016
16017// MarshalJSON is the custom marshaler for LocalNetworkGatewayPropertiesFormat.
16018func (lngpf LocalNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
16019	objectMap := make(map[string]interface{})
16020	if lngpf.LocalNetworkAddressSpace != nil {
16021		objectMap["localNetworkAddressSpace"] = lngpf.LocalNetworkAddressSpace
16022	}
16023	if lngpf.GatewayIPAddress != nil {
16024		objectMap["gatewayIpAddress"] = lngpf.GatewayIPAddress
16025	}
16026	if lngpf.BgpSettings != nil {
16027		objectMap["bgpSettings"] = lngpf.BgpSettings
16028	}
16029	if lngpf.ResourceGUID != nil {
16030		objectMap["resourceGuid"] = lngpf.ResourceGUID
16031	}
16032	return json.Marshal(objectMap)
16033}
16034
16035// LocalNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
16036// long-running operation.
16037type LocalNetworkGatewaysCreateOrUpdateFuture struct {
16038	azure.FutureAPI
16039	// Result returns the result of the asynchronous operation.
16040	// If the operation has not completed it will return an error.
16041	Result func(LocalNetworkGatewaysClient) (LocalNetworkGateway, error)
16042}
16043
16044// LocalNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
16045// long-running operation.
16046type LocalNetworkGatewaysDeleteFuture struct {
16047	azure.FutureAPI
16048	// Result returns the result of the asynchronous operation.
16049	// If the operation has not completed it will return an error.
16050	Result func(LocalNetworkGatewaysClient) (autorest.Response, error)
16051}
16052
16053// LocalNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
16054// long-running operation.
16055type LocalNetworkGatewaysUpdateTagsFuture struct {
16056	azure.FutureAPI
16057	// Result returns the result of the asynchronous operation.
16058	// If the operation has not completed it will return an error.
16059	Result func(LocalNetworkGatewaysClient) (LocalNetworkGateway, error)
16060}
16061
16062// LogSpecification description of logging specification.
16063type LogSpecification struct {
16064	// Name - The name of the specification.
16065	Name *string `json:"name,omitempty"`
16066	// DisplayName - The display name of the specification.
16067	DisplayName *string `json:"displayName,omitempty"`
16068	// BlobDuration - Duration of the blob.
16069	BlobDuration *string `json:"blobDuration,omitempty"`
16070}
16071
16072// ManagedServiceIdentity identity for the resource.
16073type ManagedServiceIdentity struct {
16074	// PrincipalID - READ-ONLY; The principal id of the system assigned identity. This property will only be provided for a system assigned identity.
16075	PrincipalID *string `json:"principalId,omitempty"`
16076	// TenantID - READ-ONLY; The tenant id of the system assigned identity. This property will only be provided for a system assigned identity.
16077	TenantID *string `json:"tenantId,omitempty"`
16078	// Type - The type of identity used for the resource. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the virtual machine. Possible values include: 'ResourceIdentityTypeSystemAssigned', 'ResourceIdentityTypeUserAssigned', 'ResourceIdentityTypeSystemAssignedUserAssigned', 'ResourceIdentityTypeNone'
16079	Type ResourceIdentityType `json:"type,omitempty"`
16080	// UserAssignedIdentities - The list of user identities associated with resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
16081	UserAssignedIdentities map[string]*ManagedServiceIdentityUserAssignedIdentitiesValue `json:"userAssignedIdentities"`
16082}
16083
16084// MarshalJSON is the custom marshaler for ManagedServiceIdentity.
16085func (msi ManagedServiceIdentity) MarshalJSON() ([]byte, error) {
16086	objectMap := make(map[string]interface{})
16087	if msi.Type != "" {
16088		objectMap["type"] = msi.Type
16089	}
16090	if msi.UserAssignedIdentities != nil {
16091		objectMap["userAssignedIdentities"] = msi.UserAssignedIdentities
16092	}
16093	return json.Marshal(objectMap)
16094}
16095
16096// ManagedServiceIdentityUserAssignedIdentitiesValue ...
16097type ManagedServiceIdentityUserAssignedIdentitiesValue struct {
16098	// PrincipalID - READ-ONLY; The principal id of user assigned identity.
16099	PrincipalID *string `json:"principalId,omitempty"`
16100	// ClientID - READ-ONLY; The client id of user assigned identity.
16101	ClientID *string `json:"clientId,omitempty"`
16102}
16103
16104// MatchCondition define match conditions
16105type MatchCondition struct {
16106	// MatchVariables - List of match variables
16107	MatchVariables *[]MatchVariable `json:"matchVariables,omitempty"`
16108	// Operator - Describes operator to be matched. Possible values include: 'WebApplicationFirewallOperatorIPMatch', 'WebApplicationFirewallOperatorEqual', 'WebApplicationFirewallOperatorContains', 'WebApplicationFirewallOperatorLessThan', 'WebApplicationFirewallOperatorGreaterThan', 'WebApplicationFirewallOperatorLessThanOrEqual', 'WebApplicationFirewallOperatorGreaterThanOrEqual', 'WebApplicationFirewallOperatorBeginsWith', 'WebApplicationFirewallOperatorEndsWith', 'WebApplicationFirewallOperatorRegex'
16109	Operator WebApplicationFirewallOperator `json:"operator,omitempty"`
16110	// NegationConditon - Describes if this is negate condition or not
16111	NegationConditon *bool `json:"negationConditon,omitempty"`
16112	// MatchValues - Match value
16113	MatchValues *[]string `json:"matchValues,omitempty"`
16114	// Transforms - List of transforms
16115	Transforms *[]WebApplicationFirewallTransform `json:"transforms,omitempty"`
16116}
16117
16118// MatchedRule matched rule.
16119type MatchedRule struct {
16120	// RuleName - Name of the matched network security rule.
16121	RuleName *string `json:"ruleName,omitempty"`
16122	// Action - The network traffic is allowed or denied. Possible values are 'Allow' and 'Deny'.
16123	Action *string `json:"action,omitempty"`
16124}
16125
16126// MatchVariable define match variables
16127type MatchVariable struct {
16128	// VariableName - Match Variable. Possible values include: 'RemoteAddr', 'RequestMethod', 'QueryString', 'PostArgs', 'RequestURI', 'RequestHeaders', 'RequestBody', 'RequestCookies'
16129	VariableName WebApplicationFirewallMatchVariable `json:"variableName,omitempty"`
16130	// Selector - Describes field of the matchVariable collection
16131	Selector *string `json:"selector,omitempty"`
16132}
16133
16134// MetricSpecification description of metrics specification.
16135type MetricSpecification struct {
16136	// Name - The name of the metric.
16137	Name *string `json:"name,omitempty"`
16138	// DisplayName - The display name of the metric.
16139	DisplayName *string `json:"displayName,omitempty"`
16140	// DisplayDescription - The description of the metric.
16141	DisplayDescription *string `json:"displayDescription,omitempty"`
16142	// Unit - Units the metric to be displayed in.
16143	Unit *string `json:"unit,omitempty"`
16144	// AggregationType - The aggregation type.
16145	AggregationType *string `json:"aggregationType,omitempty"`
16146	// Availabilities - List of availability.
16147	Availabilities *[]Availability `json:"availabilities,omitempty"`
16148	// EnableRegionalMdmAccount - Whether regional MDM account enabled.
16149	EnableRegionalMdmAccount *bool `json:"enableRegionalMdmAccount,omitempty"`
16150	// FillGapWithZero - Whether gaps would be filled with zeros.
16151	FillGapWithZero *bool `json:"fillGapWithZero,omitempty"`
16152	// MetricFilterPattern - Pattern for the filter of the metric.
16153	MetricFilterPattern *string `json:"metricFilterPattern,omitempty"`
16154	// Dimensions - List of dimensions.
16155	Dimensions *[]Dimension `json:"dimensions,omitempty"`
16156	// IsInternal - Whether the metric is internal.
16157	IsInternal *bool `json:"isInternal,omitempty"`
16158	// SourceMdmAccount - The source MDM account.
16159	SourceMdmAccount *string `json:"sourceMdmAccount,omitempty"`
16160	// SourceMdmNamespace - The source MDM namespace.
16161	SourceMdmNamespace *string `json:"sourceMdmNamespace,omitempty"`
16162	// ResourceIDDimensionNameOverride - The resource Id dimension name override.
16163	ResourceIDDimensionNameOverride *string `json:"resourceIdDimensionNameOverride,omitempty"`
16164}
16165
16166// NatGateway nat Gateway resource.
16167type NatGateway struct {
16168	autorest.Response `json:"-"`
16169	// Sku - The nat gateway SKU.
16170	Sku *NatGatewaySku `json:"sku,omitempty"`
16171	// NatGatewayPropertiesFormat - Nat Gateway properties.
16172	*NatGatewayPropertiesFormat `json:"properties,omitempty"`
16173	// Etag - A unique read-only string that changes whenever the resource is updated.
16174	Etag *string `json:"etag,omitempty"`
16175	// ID - Resource ID.
16176	ID *string `json:"id,omitempty"`
16177	// Name - READ-ONLY; Resource name.
16178	Name *string `json:"name,omitempty"`
16179	// Type - READ-ONLY; Resource type.
16180	Type *string `json:"type,omitempty"`
16181	// Location - Resource location.
16182	Location *string `json:"location,omitempty"`
16183	// Tags - Resource tags.
16184	Tags map[string]*string `json:"tags"`
16185}
16186
16187// MarshalJSON is the custom marshaler for NatGateway.
16188func (ng NatGateway) MarshalJSON() ([]byte, error) {
16189	objectMap := make(map[string]interface{})
16190	if ng.Sku != nil {
16191		objectMap["sku"] = ng.Sku
16192	}
16193	if ng.NatGatewayPropertiesFormat != nil {
16194		objectMap["properties"] = ng.NatGatewayPropertiesFormat
16195	}
16196	if ng.Etag != nil {
16197		objectMap["etag"] = ng.Etag
16198	}
16199	if ng.ID != nil {
16200		objectMap["id"] = ng.ID
16201	}
16202	if ng.Location != nil {
16203		objectMap["location"] = ng.Location
16204	}
16205	if ng.Tags != nil {
16206		objectMap["tags"] = ng.Tags
16207	}
16208	return json.Marshal(objectMap)
16209}
16210
16211// UnmarshalJSON is the custom unmarshaler for NatGateway struct.
16212func (ng *NatGateway) UnmarshalJSON(body []byte) error {
16213	var m map[string]*json.RawMessage
16214	err := json.Unmarshal(body, &m)
16215	if err != nil {
16216		return err
16217	}
16218	for k, v := range m {
16219		switch k {
16220		case "sku":
16221			if v != nil {
16222				var sku NatGatewaySku
16223				err = json.Unmarshal(*v, &sku)
16224				if err != nil {
16225					return err
16226				}
16227				ng.Sku = &sku
16228			}
16229		case "properties":
16230			if v != nil {
16231				var natGatewayPropertiesFormat NatGatewayPropertiesFormat
16232				err = json.Unmarshal(*v, &natGatewayPropertiesFormat)
16233				if err != nil {
16234					return err
16235				}
16236				ng.NatGatewayPropertiesFormat = &natGatewayPropertiesFormat
16237			}
16238		case "etag":
16239			if v != nil {
16240				var etag string
16241				err = json.Unmarshal(*v, &etag)
16242				if err != nil {
16243					return err
16244				}
16245				ng.Etag = &etag
16246			}
16247		case "id":
16248			if v != nil {
16249				var ID string
16250				err = json.Unmarshal(*v, &ID)
16251				if err != nil {
16252					return err
16253				}
16254				ng.ID = &ID
16255			}
16256		case "name":
16257			if v != nil {
16258				var name string
16259				err = json.Unmarshal(*v, &name)
16260				if err != nil {
16261					return err
16262				}
16263				ng.Name = &name
16264			}
16265		case "type":
16266			if v != nil {
16267				var typeVar string
16268				err = json.Unmarshal(*v, &typeVar)
16269				if err != nil {
16270					return err
16271				}
16272				ng.Type = &typeVar
16273			}
16274		case "location":
16275			if v != nil {
16276				var location string
16277				err = json.Unmarshal(*v, &location)
16278				if err != nil {
16279					return err
16280				}
16281				ng.Location = &location
16282			}
16283		case "tags":
16284			if v != nil {
16285				var tags map[string]*string
16286				err = json.Unmarshal(*v, &tags)
16287				if err != nil {
16288					return err
16289				}
16290				ng.Tags = tags
16291			}
16292		}
16293	}
16294
16295	return nil
16296}
16297
16298// NatGatewayListResult response for ListNatGateways API service call.
16299type NatGatewayListResult struct {
16300	autorest.Response `json:"-"`
16301	// Value - A list of Nat Gateways that exists in a resource group.
16302	Value *[]NatGateway `json:"value,omitempty"`
16303	// NextLink - The URL to get the next set of results.
16304	NextLink *string `json:"nextLink,omitempty"`
16305}
16306
16307// NatGatewayListResultIterator provides access to a complete listing of NatGateway values.
16308type NatGatewayListResultIterator struct {
16309	i    int
16310	page NatGatewayListResultPage
16311}
16312
16313// NextWithContext advances to the next value.  If there was an error making
16314// the request the iterator does not advance and the error is returned.
16315func (iter *NatGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
16316	if tracing.IsEnabled() {
16317		ctx = tracing.StartSpan(ctx, fqdn+"/NatGatewayListResultIterator.NextWithContext")
16318		defer func() {
16319			sc := -1
16320			if iter.Response().Response.Response != nil {
16321				sc = iter.Response().Response.Response.StatusCode
16322			}
16323			tracing.EndSpan(ctx, sc, err)
16324		}()
16325	}
16326	iter.i++
16327	if iter.i < len(iter.page.Values()) {
16328		return nil
16329	}
16330	err = iter.page.NextWithContext(ctx)
16331	if err != nil {
16332		iter.i--
16333		return err
16334	}
16335	iter.i = 0
16336	return nil
16337}
16338
16339// Next advances to the next value.  If there was an error making
16340// the request the iterator does not advance and the error is returned.
16341// Deprecated: Use NextWithContext() instead.
16342func (iter *NatGatewayListResultIterator) Next() error {
16343	return iter.NextWithContext(context.Background())
16344}
16345
16346// NotDone returns true if the enumeration should be started or is not yet complete.
16347func (iter NatGatewayListResultIterator) NotDone() bool {
16348	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16349}
16350
16351// Response returns the raw server response from the last page request.
16352func (iter NatGatewayListResultIterator) Response() NatGatewayListResult {
16353	return iter.page.Response()
16354}
16355
16356// Value returns the current value or a zero-initialized value if the
16357// iterator has advanced beyond the end of the collection.
16358func (iter NatGatewayListResultIterator) Value() NatGateway {
16359	if !iter.page.NotDone() {
16360		return NatGateway{}
16361	}
16362	return iter.page.Values()[iter.i]
16363}
16364
16365// Creates a new instance of the NatGatewayListResultIterator type.
16366func NewNatGatewayListResultIterator(page NatGatewayListResultPage) NatGatewayListResultIterator {
16367	return NatGatewayListResultIterator{page: page}
16368}
16369
16370// IsEmpty returns true if the ListResult contains no values.
16371func (nglr NatGatewayListResult) IsEmpty() bool {
16372	return nglr.Value == nil || len(*nglr.Value) == 0
16373}
16374
16375// hasNextLink returns true if the NextLink is not empty.
16376func (nglr NatGatewayListResult) hasNextLink() bool {
16377	return nglr.NextLink != nil && len(*nglr.NextLink) != 0
16378}
16379
16380// natGatewayListResultPreparer prepares a request to retrieve the next set of results.
16381// It returns nil if no more results exist.
16382func (nglr NatGatewayListResult) natGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
16383	if !nglr.hasNextLink() {
16384		return nil, nil
16385	}
16386	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16387		autorest.AsJSON(),
16388		autorest.AsGet(),
16389		autorest.WithBaseURL(to.String(nglr.NextLink)))
16390}
16391
16392// NatGatewayListResultPage contains a page of NatGateway values.
16393type NatGatewayListResultPage struct {
16394	fn   func(context.Context, NatGatewayListResult) (NatGatewayListResult, error)
16395	nglr NatGatewayListResult
16396}
16397
16398// NextWithContext advances to the next page of values.  If there was an error making
16399// the request the page does not advance and the error is returned.
16400func (page *NatGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
16401	if tracing.IsEnabled() {
16402		ctx = tracing.StartSpan(ctx, fqdn+"/NatGatewayListResultPage.NextWithContext")
16403		defer func() {
16404			sc := -1
16405			if page.Response().Response.Response != nil {
16406				sc = page.Response().Response.Response.StatusCode
16407			}
16408			tracing.EndSpan(ctx, sc, err)
16409		}()
16410	}
16411	for {
16412		next, err := page.fn(ctx, page.nglr)
16413		if err != nil {
16414			return err
16415		}
16416		page.nglr = next
16417		if !next.hasNextLink() || !next.IsEmpty() {
16418			break
16419		}
16420	}
16421	return nil
16422}
16423
16424// Next advances to the next page of values.  If there was an error making
16425// the request the page does not advance and the error is returned.
16426// Deprecated: Use NextWithContext() instead.
16427func (page *NatGatewayListResultPage) Next() error {
16428	return page.NextWithContext(context.Background())
16429}
16430
16431// NotDone returns true if the page enumeration should be started or is not yet complete.
16432func (page NatGatewayListResultPage) NotDone() bool {
16433	return !page.nglr.IsEmpty()
16434}
16435
16436// Response returns the raw server response from the last page request.
16437func (page NatGatewayListResultPage) Response() NatGatewayListResult {
16438	return page.nglr
16439}
16440
16441// Values returns the slice of values for the current page or nil if there are no values.
16442func (page NatGatewayListResultPage) Values() []NatGateway {
16443	if page.nglr.IsEmpty() {
16444		return nil
16445	}
16446	return *page.nglr.Value
16447}
16448
16449// Creates a new instance of the NatGatewayListResultPage type.
16450func NewNatGatewayListResultPage(cur NatGatewayListResult, getNextPage func(context.Context, NatGatewayListResult) (NatGatewayListResult, error)) NatGatewayListResultPage {
16451	return NatGatewayListResultPage{
16452		fn:   getNextPage,
16453		nglr: cur,
16454	}
16455}
16456
16457// NatGatewayPropertiesFormat nat Gateway properties.
16458type NatGatewayPropertiesFormat struct {
16459	// IdleTimeoutInMinutes - The idle timeout of the nat gateway.
16460	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
16461	// PublicIPAddresses - An array of public ip addresses associated with the nat gateway resource.
16462	PublicIPAddresses *[]SubResource `json:"publicIpAddresses,omitempty"`
16463	// PublicIPPrefixes - An array of public ip prefixes associated with the nat gateway resource.
16464	PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"`
16465	// Subnets - READ-ONLY; An array of references to the subnets using this nat gateway resource.
16466	Subnets *[]SubResource `json:"subnets,omitempty"`
16467	// ResourceGUID - The resource GUID property of the nat gateway resource.
16468	ResourceGUID *string `json:"resourceGuid,omitempty"`
16469	// ProvisioningState - The provisioning state of the NatGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
16470	ProvisioningState *string `json:"provisioningState,omitempty"`
16471}
16472
16473// MarshalJSON is the custom marshaler for NatGatewayPropertiesFormat.
16474func (ngpf NatGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
16475	objectMap := make(map[string]interface{})
16476	if ngpf.IdleTimeoutInMinutes != nil {
16477		objectMap["idleTimeoutInMinutes"] = ngpf.IdleTimeoutInMinutes
16478	}
16479	if ngpf.PublicIPAddresses != nil {
16480		objectMap["publicIpAddresses"] = ngpf.PublicIPAddresses
16481	}
16482	if ngpf.PublicIPPrefixes != nil {
16483		objectMap["publicIpPrefixes"] = ngpf.PublicIPPrefixes
16484	}
16485	if ngpf.ResourceGUID != nil {
16486		objectMap["resourceGuid"] = ngpf.ResourceGUID
16487	}
16488	if ngpf.ProvisioningState != nil {
16489		objectMap["provisioningState"] = ngpf.ProvisioningState
16490	}
16491	return json.Marshal(objectMap)
16492}
16493
16494// NatGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
16495// long-running operation.
16496type NatGatewaysCreateOrUpdateFuture struct {
16497	azure.FutureAPI
16498	// Result returns the result of the asynchronous operation.
16499	// If the operation has not completed it will return an error.
16500	Result func(NatGatewaysClient) (NatGateway, error)
16501}
16502
16503// NatGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
16504// operation.
16505type NatGatewaysDeleteFuture struct {
16506	azure.FutureAPI
16507	// Result returns the result of the asynchronous operation.
16508	// If the operation has not completed it will return an error.
16509	Result func(NatGatewaysClient) (autorest.Response, error)
16510}
16511
16512// NatGatewaySku SKU of nat gateway
16513type NatGatewaySku struct {
16514	// Name - Name of Nat Gateway SKU. Possible values include: 'Standard'
16515	Name NatGatewaySkuName `json:"name,omitempty"`
16516}
16517
16518// NextHopParameters parameters that define the source and destination endpoint.
16519type NextHopParameters struct {
16520	// TargetResourceID - The resource identifier of the target resource against which the action is to be performed.
16521	TargetResourceID *string `json:"targetResourceId,omitempty"`
16522	// SourceIPAddress - The source IP address.
16523	SourceIPAddress *string `json:"sourceIPAddress,omitempty"`
16524	// DestinationIPAddress - The destination IP address.
16525	DestinationIPAddress *string `json:"destinationIPAddress,omitempty"`
16526	// 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).
16527	TargetNicResourceID *string `json:"targetNicResourceId,omitempty"`
16528}
16529
16530// NextHopResult the information about next hop from the specified VM.
16531type NextHopResult struct {
16532	autorest.Response `json:"-"`
16533	// NextHopType - Next hop type. Possible values include: 'NextHopTypeInternet', 'NextHopTypeVirtualAppliance', 'NextHopTypeVirtualNetworkGateway', 'NextHopTypeVnetLocal', 'NextHopTypeHyperNetGateway', 'NextHopTypeNone'
16534	NextHopType NextHopType `json:"nextHopType,omitempty"`
16535	// NextHopIPAddress - Next hop IP Address
16536	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
16537	// 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'.
16538	RouteTableID *string `json:"routeTableId,omitempty"`
16539}
16540
16541// Operation network REST API operation definition.
16542type Operation struct {
16543	// Name - Operation name: {provider}/{resource}/{operation}
16544	Name *string `json:"name,omitempty"`
16545	// Display - Display metadata associated with the operation.
16546	Display *OperationDisplay `json:"display,omitempty"`
16547	// Origin - Origin of the operation.
16548	Origin *string `json:"origin,omitempty"`
16549	// OperationPropertiesFormat - Operation properties format.
16550	*OperationPropertiesFormat `json:"properties,omitempty"`
16551}
16552
16553// MarshalJSON is the custom marshaler for Operation.
16554func (o Operation) MarshalJSON() ([]byte, error) {
16555	objectMap := make(map[string]interface{})
16556	if o.Name != nil {
16557		objectMap["name"] = o.Name
16558	}
16559	if o.Display != nil {
16560		objectMap["display"] = o.Display
16561	}
16562	if o.Origin != nil {
16563		objectMap["origin"] = o.Origin
16564	}
16565	if o.OperationPropertiesFormat != nil {
16566		objectMap["properties"] = o.OperationPropertiesFormat
16567	}
16568	return json.Marshal(objectMap)
16569}
16570
16571// UnmarshalJSON is the custom unmarshaler for Operation struct.
16572func (o *Operation) UnmarshalJSON(body []byte) error {
16573	var m map[string]*json.RawMessage
16574	err := json.Unmarshal(body, &m)
16575	if err != nil {
16576		return err
16577	}
16578	for k, v := range m {
16579		switch k {
16580		case "name":
16581			if v != nil {
16582				var name string
16583				err = json.Unmarshal(*v, &name)
16584				if err != nil {
16585					return err
16586				}
16587				o.Name = &name
16588			}
16589		case "display":
16590			if v != nil {
16591				var display OperationDisplay
16592				err = json.Unmarshal(*v, &display)
16593				if err != nil {
16594					return err
16595				}
16596				o.Display = &display
16597			}
16598		case "origin":
16599			if v != nil {
16600				var origin string
16601				err = json.Unmarshal(*v, &origin)
16602				if err != nil {
16603					return err
16604				}
16605				o.Origin = &origin
16606			}
16607		case "properties":
16608			if v != nil {
16609				var operationPropertiesFormat OperationPropertiesFormat
16610				err = json.Unmarshal(*v, &operationPropertiesFormat)
16611				if err != nil {
16612					return err
16613				}
16614				o.OperationPropertiesFormat = &operationPropertiesFormat
16615			}
16616		}
16617	}
16618
16619	return nil
16620}
16621
16622// OperationDisplay display metadata associated with the operation.
16623type OperationDisplay struct {
16624	// Provider - Service provider: Microsoft Network.
16625	Provider *string `json:"provider,omitempty"`
16626	// Resource - Resource on which the operation is performed.
16627	Resource *string `json:"resource,omitempty"`
16628	// Operation - Type of the operation: get, read, delete, etc.
16629	Operation *string `json:"operation,omitempty"`
16630	// Description - Description of the operation.
16631	Description *string `json:"description,omitempty"`
16632}
16633
16634// OperationListResult result of the request to list Network operations. It contains a list of operations
16635// and a URL link to get the next set of results.
16636type OperationListResult struct {
16637	autorest.Response `json:"-"`
16638	// Value - List of Network operations supported by the Network resource provider.
16639	Value *[]Operation `json:"value,omitempty"`
16640	// NextLink - URL to get the next set of operation list results if there are any.
16641	NextLink *string `json:"nextLink,omitempty"`
16642}
16643
16644// OperationListResultIterator provides access to a complete listing of Operation values.
16645type OperationListResultIterator struct {
16646	i    int
16647	page OperationListResultPage
16648}
16649
16650// NextWithContext advances to the next value.  If there was an error making
16651// the request the iterator does not advance and the error is returned.
16652func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) {
16653	if tracing.IsEnabled() {
16654		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext")
16655		defer func() {
16656			sc := -1
16657			if iter.Response().Response.Response != nil {
16658				sc = iter.Response().Response.Response.StatusCode
16659			}
16660			tracing.EndSpan(ctx, sc, err)
16661		}()
16662	}
16663	iter.i++
16664	if iter.i < len(iter.page.Values()) {
16665		return nil
16666	}
16667	err = iter.page.NextWithContext(ctx)
16668	if err != nil {
16669		iter.i--
16670		return err
16671	}
16672	iter.i = 0
16673	return nil
16674}
16675
16676// Next advances to the next value.  If there was an error making
16677// the request the iterator does not advance and the error is returned.
16678// Deprecated: Use NextWithContext() instead.
16679func (iter *OperationListResultIterator) Next() error {
16680	return iter.NextWithContext(context.Background())
16681}
16682
16683// NotDone returns true if the enumeration should be started or is not yet complete.
16684func (iter OperationListResultIterator) NotDone() bool {
16685	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16686}
16687
16688// Response returns the raw server response from the last page request.
16689func (iter OperationListResultIterator) Response() OperationListResult {
16690	return iter.page.Response()
16691}
16692
16693// Value returns the current value or a zero-initialized value if the
16694// iterator has advanced beyond the end of the collection.
16695func (iter OperationListResultIterator) Value() Operation {
16696	if !iter.page.NotDone() {
16697		return Operation{}
16698	}
16699	return iter.page.Values()[iter.i]
16700}
16701
16702// Creates a new instance of the OperationListResultIterator type.
16703func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator {
16704	return OperationListResultIterator{page: page}
16705}
16706
16707// IsEmpty returns true if the ListResult contains no values.
16708func (olr OperationListResult) IsEmpty() bool {
16709	return olr.Value == nil || len(*olr.Value) == 0
16710}
16711
16712// hasNextLink returns true if the NextLink is not empty.
16713func (olr OperationListResult) hasNextLink() bool {
16714	return olr.NextLink != nil && len(*olr.NextLink) != 0
16715}
16716
16717// operationListResultPreparer prepares a request to retrieve the next set of results.
16718// It returns nil if no more results exist.
16719func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) {
16720	if !olr.hasNextLink() {
16721		return nil, nil
16722	}
16723	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16724		autorest.AsJSON(),
16725		autorest.AsGet(),
16726		autorest.WithBaseURL(to.String(olr.NextLink)))
16727}
16728
16729// OperationListResultPage contains a page of Operation values.
16730type OperationListResultPage struct {
16731	fn  func(context.Context, OperationListResult) (OperationListResult, error)
16732	olr OperationListResult
16733}
16734
16735// NextWithContext advances to the next page of values.  If there was an error making
16736// the request the page does not advance and the error is returned.
16737func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) {
16738	if tracing.IsEnabled() {
16739		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext")
16740		defer func() {
16741			sc := -1
16742			if page.Response().Response.Response != nil {
16743				sc = page.Response().Response.Response.StatusCode
16744			}
16745			tracing.EndSpan(ctx, sc, err)
16746		}()
16747	}
16748	for {
16749		next, err := page.fn(ctx, page.olr)
16750		if err != nil {
16751			return err
16752		}
16753		page.olr = next
16754		if !next.hasNextLink() || !next.IsEmpty() {
16755			break
16756		}
16757	}
16758	return nil
16759}
16760
16761// Next advances to the next page of values.  If there was an error making
16762// the request the page does not advance and the error is returned.
16763// Deprecated: Use NextWithContext() instead.
16764func (page *OperationListResultPage) Next() error {
16765	return page.NextWithContext(context.Background())
16766}
16767
16768// NotDone returns true if the page enumeration should be started or is not yet complete.
16769func (page OperationListResultPage) NotDone() bool {
16770	return !page.olr.IsEmpty()
16771}
16772
16773// Response returns the raw server response from the last page request.
16774func (page OperationListResultPage) Response() OperationListResult {
16775	return page.olr
16776}
16777
16778// Values returns the slice of values for the current page or nil if there are no values.
16779func (page OperationListResultPage) Values() []Operation {
16780	if page.olr.IsEmpty() {
16781		return nil
16782	}
16783	return *page.olr.Value
16784}
16785
16786// Creates a new instance of the OperationListResultPage type.
16787func NewOperationListResultPage(cur OperationListResult, getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
16788	return OperationListResultPage{
16789		fn:  getNextPage,
16790		olr: cur,
16791	}
16792}
16793
16794// OperationPropertiesFormat description of operation properties format.
16795type OperationPropertiesFormat struct {
16796	// ServiceSpecification - Specification of the service.
16797	ServiceSpecification *OperationPropertiesFormatServiceSpecification `json:"serviceSpecification,omitempty"`
16798}
16799
16800// OperationPropertiesFormatServiceSpecification specification of the service.
16801type OperationPropertiesFormatServiceSpecification struct {
16802	// MetricSpecifications - Operation service specification.
16803	MetricSpecifications *[]MetricSpecification `json:"metricSpecifications,omitempty"`
16804	// LogSpecifications - Operation log specification.
16805	LogSpecifications *[]LogSpecification `json:"logSpecifications,omitempty"`
16806}
16807
16808// OutboundRule outbound rule of the load balancer.
16809type OutboundRule struct {
16810	autorest.Response `json:"-"`
16811	// OutboundRulePropertiesFormat - Properties of load balancer outbound rule.
16812	*OutboundRulePropertiesFormat `json:"properties,omitempty"`
16813	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
16814	Name *string `json:"name,omitempty"`
16815	// Etag - A unique read-only string that changes whenever the resource is updated.
16816	Etag *string `json:"etag,omitempty"`
16817	// ID - Resource ID.
16818	ID *string `json:"id,omitempty"`
16819}
16820
16821// MarshalJSON is the custom marshaler for OutboundRule.
16822func (or OutboundRule) MarshalJSON() ([]byte, error) {
16823	objectMap := make(map[string]interface{})
16824	if or.OutboundRulePropertiesFormat != nil {
16825		objectMap["properties"] = or.OutboundRulePropertiesFormat
16826	}
16827	if or.Name != nil {
16828		objectMap["name"] = or.Name
16829	}
16830	if or.Etag != nil {
16831		objectMap["etag"] = or.Etag
16832	}
16833	if or.ID != nil {
16834		objectMap["id"] = or.ID
16835	}
16836	return json.Marshal(objectMap)
16837}
16838
16839// UnmarshalJSON is the custom unmarshaler for OutboundRule struct.
16840func (or *OutboundRule) UnmarshalJSON(body []byte) error {
16841	var m map[string]*json.RawMessage
16842	err := json.Unmarshal(body, &m)
16843	if err != nil {
16844		return err
16845	}
16846	for k, v := range m {
16847		switch k {
16848		case "properties":
16849			if v != nil {
16850				var outboundRulePropertiesFormat OutboundRulePropertiesFormat
16851				err = json.Unmarshal(*v, &outboundRulePropertiesFormat)
16852				if err != nil {
16853					return err
16854				}
16855				or.OutboundRulePropertiesFormat = &outboundRulePropertiesFormat
16856			}
16857		case "name":
16858			if v != nil {
16859				var name string
16860				err = json.Unmarshal(*v, &name)
16861				if err != nil {
16862					return err
16863				}
16864				or.Name = &name
16865			}
16866		case "etag":
16867			if v != nil {
16868				var etag string
16869				err = json.Unmarshal(*v, &etag)
16870				if err != nil {
16871					return err
16872				}
16873				or.Etag = &etag
16874			}
16875		case "id":
16876			if v != nil {
16877				var ID string
16878				err = json.Unmarshal(*v, &ID)
16879				if err != nil {
16880					return err
16881				}
16882				or.ID = &ID
16883			}
16884		}
16885	}
16886
16887	return nil
16888}
16889
16890// OutboundRulePropertiesFormat outbound rule of the load balancer.
16891type OutboundRulePropertiesFormat struct {
16892	// AllocatedOutboundPorts - The number of outbound ports to be used for NAT.
16893	AllocatedOutboundPorts *int32 `json:"allocatedOutboundPorts,omitempty"`
16894	// FrontendIPConfigurations - The Frontend IP addresses of the load balancer.
16895	FrontendIPConfigurations *[]SubResource `json:"frontendIPConfigurations,omitempty"`
16896	// BackendAddressPool - A reference to a pool of DIPs. Outbound traffic is randomly load balanced across IPs in the backend IPs.
16897	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
16898	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
16899	ProvisioningState *string `json:"provisioningState,omitempty"`
16900	// Protocol - The protocol for the outbound rule in load balancer. Possible values are: 'Tcp', 'Udp', and 'All'. Possible values include: 'LoadBalancerOutboundRuleProtocolTCP', 'LoadBalancerOutboundRuleProtocolUDP', 'LoadBalancerOutboundRuleProtocolAll'
16901	Protocol LoadBalancerOutboundRuleProtocol `json:"protocol,omitempty"`
16902	// EnableTCPReset - Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP.
16903	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
16904	// IdleTimeoutInMinutes - The timeout for the TCP idle connection
16905	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
16906}
16907
16908// P2SVpnGateway p2SVpnGateway Resource.
16909type P2SVpnGateway struct {
16910	autorest.Response `json:"-"`
16911	// P2SVpnGatewayProperties - Properties of the P2SVpnGateway.
16912	*P2SVpnGatewayProperties `json:"properties,omitempty"`
16913	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
16914	Etag *string `json:"etag,omitempty"`
16915	// ID - Resource ID.
16916	ID *string `json:"id,omitempty"`
16917	// Name - READ-ONLY; Resource name.
16918	Name *string `json:"name,omitempty"`
16919	// Type - READ-ONLY; Resource type.
16920	Type *string `json:"type,omitempty"`
16921	// Location - Resource location.
16922	Location *string `json:"location,omitempty"`
16923	// Tags - Resource tags.
16924	Tags map[string]*string `json:"tags"`
16925}
16926
16927// MarshalJSON is the custom marshaler for P2SVpnGateway.
16928func (pvg P2SVpnGateway) MarshalJSON() ([]byte, error) {
16929	objectMap := make(map[string]interface{})
16930	if pvg.P2SVpnGatewayProperties != nil {
16931		objectMap["properties"] = pvg.P2SVpnGatewayProperties
16932	}
16933	if pvg.ID != nil {
16934		objectMap["id"] = pvg.ID
16935	}
16936	if pvg.Location != nil {
16937		objectMap["location"] = pvg.Location
16938	}
16939	if pvg.Tags != nil {
16940		objectMap["tags"] = pvg.Tags
16941	}
16942	return json.Marshal(objectMap)
16943}
16944
16945// UnmarshalJSON is the custom unmarshaler for P2SVpnGateway struct.
16946func (pvg *P2SVpnGateway) UnmarshalJSON(body []byte) error {
16947	var m map[string]*json.RawMessage
16948	err := json.Unmarshal(body, &m)
16949	if err != nil {
16950		return err
16951	}
16952	for k, v := range m {
16953		switch k {
16954		case "properties":
16955			if v != nil {
16956				var p2SVpnGatewayProperties P2SVpnGatewayProperties
16957				err = json.Unmarshal(*v, &p2SVpnGatewayProperties)
16958				if err != nil {
16959					return err
16960				}
16961				pvg.P2SVpnGatewayProperties = &p2SVpnGatewayProperties
16962			}
16963		case "etag":
16964			if v != nil {
16965				var etag string
16966				err = json.Unmarshal(*v, &etag)
16967				if err != nil {
16968					return err
16969				}
16970				pvg.Etag = &etag
16971			}
16972		case "id":
16973			if v != nil {
16974				var ID string
16975				err = json.Unmarshal(*v, &ID)
16976				if err != nil {
16977					return err
16978				}
16979				pvg.ID = &ID
16980			}
16981		case "name":
16982			if v != nil {
16983				var name string
16984				err = json.Unmarshal(*v, &name)
16985				if err != nil {
16986					return err
16987				}
16988				pvg.Name = &name
16989			}
16990		case "type":
16991			if v != nil {
16992				var typeVar string
16993				err = json.Unmarshal(*v, &typeVar)
16994				if err != nil {
16995					return err
16996				}
16997				pvg.Type = &typeVar
16998			}
16999		case "location":
17000			if v != nil {
17001				var location string
17002				err = json.Unmarshal(*v, &location)
17003				if err != nil {
17004					return err
17005				}
17006				pvg.Location = &location
17007			}
17008		case "tags":
17009			if v != nil {
17010				var tags map[string]*string
17011				err = json.Unmarshal(*v, &tags)
17012				if err != nil {
17013					return err
17014				}
17015				pvg.Tags = tags
17016			}
17017		}
17018	}
17019
17020	return nil
17021}
17022
17023// P2SVpnGatewayProperties parameters for P2SVpnGateway
17024type P2SVpnGatewayProperties struct {
17025	// VirtualHub - The VirtualHub to which the gateway belongs
17026	VirtualHub *SubResource `json:"virtualHub,omitempty"`
17027	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
17028	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
17029	// VpnGatewayScaleUnit - The scale unit for this p2s vpn gateway.
17030	VpnGatewayScaleUnit *int32 `json:"vpnGatewayScaleUnit,omitempty"`
17031	// P2SVpnServerConfiguration - The P2SVpnServerConfiguration to which the p2sVpnGateway is attached to.
17032	P2SVpnServerConfiguration *SubResource `json:"p2SVpnServerConfiguration,omitempty"`
17033	// VpnClientAddressPool - The reference of the address space resource which represents Address space for P2S VpnClient.
17034	VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"`
17035	// CustomRoutes - The reference of the address space resource which represents the custom routes specified by the customer for P2SVpnGateway and P2S VpnClient.
17036	CustomRoutes *AddressSpace `json:"customRoutes,omitempty"`
17037	// VpnClientConnectionHealth - READ-ONLY; All P2S VPN clients' connection health status.
17038	VpnClientConnectionHealth *VpnClientConnectionHealth `json:"vpnClientConnectionHealth,omitempty"`
17039}
17040
17041// MarshalJSON is the custom marshaler for P2SVpnGatewayProperties.
17042func (pvgp P2SVpnGatewayProperties) MarshalJSON() ([]byte, error) {
17043	objectMap := make(map[string]interface{})
17044	if pvgp.VirtualHub != nil {
17045		objectMap["virtualHub"] = pvgp.VirtualHub
17046	}
17047	if pvgp.ProvisioningState != "" {
17048		objectMap["provisioningState"] = pvgp.ProvisioningState
17049	}
17050	if pvgp.VpnGatewayScaleUnit != nil {
17051		objectMap["vpnGatewayScaleUnit"] = pvgp.VpnGatewayScaleUnit
17052	}
17053	if pvgp.P2SVpnServerConfiguration != nil {
17054		objectMap["p2SVpnServerConfiguration"] = pvgp.P2SVpnServerConfiguration
17055	}
17056	if pvgp.VpnClientAddressPool != nil {
17057		objectMap["vpnClientAddressPool"] = pvgp.VpnClientAddressPool
17058	}
17059	if pvgp.CustomRoutes != nil {
17060		objectMap["customRoutes"] = pvgp.CustomRoutes
17061	}
17062	return json.Marshal(objectMap)
17063}
17064
17065// P2sVpnGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
17066// long-running operation.
17067type P2sVpnGatewaysCreateOrUpdateFuture struct {
17068	azure.FutureAPI
17069	// Result returns the result of the asynchronous operation.
17070	// If the operation has not completed it will return an error.
17071	Result func(P2sVpnGatewaysClient) (P2SVpnGateway, error)
17072}
17073
17074// P2sVpnGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
17075// operation.
17076type P2sVpnGatewaysDeleteFuture struct {
17077	azure.FutureAPI
17078	// Result returns the result of the asynchronous operation.
17079	// If the operation has not completed it will return an error.
17080	Result func(P2sVpnGatewaysClient) (autorest.Response, error)
17081}
17082
17083// P2sVpnGatewaysGenerateVpnProfileFuture an abstraction for monitoring and retrieving the results of a
17084// long-running operation.
17085type P2sVpnGatewaysGenerateVpnProfileFuture struct {
17086	azure.FutureAPI
17087	// Result returns the result of the asynchronous operation.
17088	// If the operation has not completed it will return an error.
17089	Result func(P2sVpnGatewaysClient) (VpnProfileResponse, error)
17090}
17091
17092// P2sVpnGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
17093// long-running operation.
17094type P2sVpnGatewaysUpdateTagsFuture struct {
17095	azure.FutureAPI
17096	// Result returns the result of the asynchronous operation.
17097	// If the operation has not completed it will return an error.
17098	Result func(P2sVpnGatewaysClient) (P2SVpnGateway, error)
17099}
17100
17101// P2SVpnProfileParameters vpn Client Parameters for package generation
17102type P2SVpnProfileParameters struct {
17103	// AuthenticationMethod - VPN client authentication method. Possible values include: 'EAPTLS', 'EAPMSCHAPv2'
17104	AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"`
17105}
17106
17107// P2SVpnServerConfigRadiusClientRootCertificate radius client root certificate of
17108// P2SVpnServerConfiguration.
17109type P2SVpnServerConfigRadiusClientRootCertificate struct {
17110	// P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat - Properties of the Radius client root certificate.
17111	*P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat `json:"properties,omitempty"`
17112	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
17113	Name *string `json:"name,omitempty"`
17114	// Etag - A unique read-only string that changes whenever the resource is updated.
17115	Etag *string `json:"etag,omitempty"`
17116	// ID - Resource ID.
17117	ID *string `json:"id,omitempty"`
17118}
17119
17120// MarshalJSON is the custom marshaler for P2SVpnServerConfigRadiusClientRootCertificate.
17121func (pvscrcrc P2SVpnServerConfigRadiusClientRootCertificate) MarshalJSON() ([]byte, error) {
17122	objectMap := make(map[string]interface{})
17123	if pvscrcrc.P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat != nil {
17124		objectMap["properties"] = pvscrcrc.P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat
17125	}
17126	if pvscrcrc.Name != nil {
17127		objectMap["name"] = pvscrcrc.Name
17128	}
17129	if pvscrcrc.Etag != nil {
17130		objectMap["etag"] = pvscrcrc.Etag
17131	}
17132	if pvscrcrc.ID != nil {
17133		objectMap["id"] = pvscrcrc.ID
17134	}
17135	return json.Marshal(objectMap)
17136}
17137
17138// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfigRadiusClientRootCertificate struct.
17139func (pvscrcrc *P2SVpnServerConfigRadiusClientRootCertificate) UnmarshalJSON(body []byte) error {
17140	var m map[string]*json.RawMessage
17141	err := json.Unmarshal(body, &m)
17142	if err != nil {
17143		return err
17144	}
17145	for k, v := range m {
17146		switch k {
17147		case "properties":
17148			if v != nil {
17149				var p2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat
17150				err = json.Unmarshal(*v, &p2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat)
17151				if err != nil {
17152					return err
17153				}
17154				pvscrcrc.P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat = &p2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat
17155			}
17156		case "name":
17157			if v != nil {
17158				var name string
17159				err = json.Unmarshal(*v, &name)
17160				if err != nil {
17161					return err
17162				}
17163				pvscrcrc.Name = &name
17164			}
17165		case "etag":
17166			if v != nil {
17167				var etag string
17168				err = json.Unmarshal(*v, &etag)
17169				if err != nil {
17170					return err
17171				}
17172				pvscrcrc.Etag = &etag
17173			}
17174		case "id":
17175			if v != nil {
17176				var ID string
17177				err = json.Unmarshal(*v, &ID)
17178				if err != nil {
17179					return err
17180				}
17181				pvscrcrc.ID = &ID
17182			}
17183		}
17184	}
17185
17186	return nil
17187}
17188
17189// P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat properties of the Radius client root
17190// certificate of P2SVpnServerConfiguration.
17191type P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat struct {
17192	// Thumbprint - The Radius client root certificate thumbprint.
17193	Thumbprint *string `json:"thumbprint,omitempty"`
17194	// ProvisioningState - READ-ONLY; The provisioning state of the Radius client root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
17195	ProvisioningState *string `json:"provisioningState,omitempty"`
17196}
17197
17198// MarshalJSON is the custom marshaler for P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat.
17199func (pvscrcrcpf P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
17200	objectMap := make(map[string]interface{})
17201	if pvscrcrcpf.Thumbprint != nil {
17202		objectMap["thumbprint"] = pvscrcrcpf.Thumbprint
17203	}
17204	return json.Marshal(objectMap)
17205}
17206
17207// P2SVpnServerConfigRadiusServerRootCertificate radius Server root certificate of
17208// P2SVpnServerConfiguration.
17209type P2SVpnServerConfigRadiusServerRootCertificate struct {
17210	// P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat - Properties of the P2SVpnServerConfiguration Radius Server root certificate.
17211	*P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat `json:"properties,omitempty"`
17212	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
17213	Name *string `json:"name,omitempty"`
17214	// Etag - A unique read-only string that changes whenever the resource is updated.
17215	Etag *string `json:"etag,omitempty"`
17216	// ID - Resource ID.
17217	ID *string `json:"id,omitempty"`
17218}
17219
17220// MarshalJSON is the custom marshaler for P2SVpnServerConfigRadiusServerRootCertificate.
17221func (pvscrsrc P2SVpnServerConfigRadiusServerRootCertificate) MarshalJSON() ([]byte, error) {
17222	objectMap := make(map[string]interface{})
17223	if pvscrsrc.P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat != nil {
17224		objectMap["properties"] = pvscrsrc.P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat
17225	}
17226	if pvscrsrc.Name != nil {
17227		objectMap["name"] = pvscrsrc.Name
17228	}
17229	if pvscrsrc.Etag != nil {
17230		objectMap["etag"] = pvscrsrc.Etag
17231	}
17232	if pvscrsrc.ID != nil {
17233		objectMap["id"] = pvscrsrc.ID
17234	}
17235	return json.Marshal(objectMap)
17236}
17237
17238// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfigRadiusServerRootCertificate struct.
17239func (pvscrsrc *P2SVpnServerConfigRadiusServerRootCertificate) UnmarshalJSON(body []byte) error {
17240	var m map[string]*json.RawMessage
17241	err := json.Unmarshal(body, &m)
17242	if err != nil {
17243		return err
17244	}
17245	for k, v := range m {
17246		switch k {
17247		case "properties":
17248			if v != nil {
17249				var p2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat
17250				err = json.Unmarshal(*v, &p2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat)
17251				if err != nil {
17252					return err
17253				}
17254				pvscrsrc.P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat = &p2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat
17255			}
17256		case "name":
17257			if v != nil {
17258				var name string
17259				err = json.Unmarshal(*v, &name)
17260				if err != nil {
17261					return err
17262				}
17263				pvscrsrc.Name = &name
17264			}
17265		case "etag":
17266			if v != nil {
17267				var etag string
17268				err = json.Unmarshal(*v, &etag)
17269				if err != nil {
17270					return err
17271				}
17272				pvscrsrc.Etag = &etag
17273			}
17274		case "id":
17275			if v != nil {
17276				var ID string
17277				err = json.Unmarshal(*v, &ID)
17278				if err != nil {
17279					return err
17280				}
17281				pvscrsrc.ID = &ID
17282			}
17283		}
17284	}
17285
17286	return nil
17287}
17288
17289// P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat properties of Radius Server root
17290// certificate of P2SVpnServerConfiguration.
17291type P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat struct {
17292	// PublicCertData - The certificate public data.
17293	PublicCertData *string `json:"publicCertData,omitempty"`
17294	// ProvisioningState - READ-ONLY; The provisioning state of the P2SVpnServerConfiguration Radius Server root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
17295	ProvisioningState *string `json:"provisioningState,omitempty"`
17296}
17297
17298// MarshalJSON is the custom marshaler for P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat.
17299func (pvscrsrcpf P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
17300	objectMap := make(map[string]interface{})
17301	if pvscrsrcpf.PublicCertData != nil {
17302		objectMap["publicCertData"] = pvscrsrcpf.PublicCertData
17303	}
17304	return json.Marshal(objectMap)
17305}
17306
17307// P2SVpnServerConfiguration p2SVpnServerConfiguration Resource.
17308type P2SVpnServerConfiguration struct {
17309	autorest.Response `json:"-"`
17310	// P2SVpnServerConfigurationProperties - Properties of the P2SVpnServer configuration.
17311	*P2SVpnServerConfigurationProperties `json:"properties,omitempty"`
17312	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
17313	Name *string `json:"name,omitempty"`
17314	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
17315	Etag *string `json:"etag,omitempty"`
17316	// ID - Resource ID.
17317	ID *string `json:"id,omitempty"`
17318}
17319
17320// MarshalJSON is the custom marshaler for P2SVpnServerConfiguration.
17321func (pvsc P2SVpnServerConfiguration) MarshalJSON() ([]byte, error) {
17322	objectMap := make(map[string]interface{})
17323	if pvsc.P2SVpnServerConfigurationProperties != nil {
17324		objectMap["properties"] = pvsc.P2SVpnServerConfigurationProperties
17325	}
17326	if pvsc.Name != nil {
17327		objectMap["name"] = pvsc.Name
17328	}
17329	if pvsc.ID != nil {
17330		objectMap["id"] = pvsc.ID
17331	}
17332	return json.Marshal(objectMap)
17333}
17334
17335// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfiguration struct.
17336func (pvsc *P2SVpnServerConfiguration) UnmarshalJSON(body []byte) error {
17337	var m map[string]*json.RawMessage
17338	err := json.Unmarshal(body, &m)
17339	if err != nil {
17340		return err
17341	}
17342	for k, v := range m {
17343		switch k {
17344		case "properties":
17345			if v != nil {
17346				var p2SVpnServerConfigurationProperties P2SVpnServerConfigurationProperties
17347				err = json.Unmarshal(*v, &p2SVpnServerConfigurationProperties)
17348				if err != nil {
17349					return err
17350				}
17351				pvsc.P2SVpnServerConfigurationProperties = &p2SVpnServerConfigurationProperties
17352			}
17353		case "name":
17354			if v != nil {
17355				var name string
17356				err = json.Unmarshal(*v, &name)
17357				if err != nil {
17358					return err
17359				}
17360				pvsc.Name = &name
17361			}
17362		case "etag":
17363			if v != nil {
17364				var etag string
17365				err = json.Unmarshal(*v, &etag)
17366				if err != nil {
17367					return err
17368				}
17369				pvsc.Etag = &etag
17370			}
17371		case "id":
17372			if v != nil {
17373				var ID string
17374				err = json.Unmarshal(*v, &ID)
17375				if err != nil {
17376					return err
17377				}
17378				pvsc.ID = &ID
17379			}
17380		}
17381	}
17382
17383	return nil
17384}
17385
17386// P2SVpnServerConfigurationProperties parameters for P2SVpnServerConfiguration
17387type P2SVpnServerConfigurationProperties struct {
17388	// Name - The name of the P2SVpnServerConfiguration that is unique within a VirtualWan in a resource group. This name can be used to access the resource along with Paren VirtualWan resource name.
17389	Name *string `json:"name,omitempty"`
17390	// VpnProtocols - VPN protocols for the P2SVpnServerConfiguration.
17391	VpnProtocols *[]VpnGatewayTunnelingProtocol `json:"vpnProtocols,omitempty"`
17392	// P2SVpnServerConfigVpnClientRootCertificates - VPN client root certificate of P2SVpnServerConfiguration.
17393	P2SVpnServerConfigVpnClientRootCertificates *[]P2SVpnServerConfigVpnClientRootCertificate `json:"p2SVpnServerConfigVpnClientRootCertificates,omitempty"`
17394	// P2SVpnServerConfigVpnClientRevokedCertificates - VPN client revoked certificate of P2SVpnServerConfiguration.
17395	P2SVpnServerConfigVpnClientRevokedCertificates *[]P2SVpnServerConfigVpnClientRevokedCertificate `json:"p2SVpnServerConfigVpnClientRevokedCertificates,omitempty"`
17396	// P2SVpnServerConfigRadiusServerRootCertificates - Radius Server root certificate of P2SVpnServerConfiguration.
17397	P2SVpnServerConfigRadiusServerRootCertificates *[]P2SVpnServerConfigRadiusServerRootCertificate `json:"p2SVpnServerConfigRadiusServerRootCertificates,omitempty"`
17398	// P2SVpnServerConfigRadiusClientRootCertificates - Radius client root certificate of P2SVpnServerConfiguration.
17399	P2SVpnServerConfigRadiusClientRootCertificates *[]P2SVpnServerConfigRadiusClientRootCertificate `json:"p2SVpnServerConfigRadiusClientRootCertificates,omitempty"`
17400	// VpnClientIpsecPolicies - VpnClientIpsecPolicies for P2SVpnServerConfiguration.
17401	VpnClientIpsecPolicies *[]IpsecPolicy `json:"vpnClientIpsecPolicies,omitempty"`
17402	// RadiusServerAddress - The radius server address property of the P2SVpnServerConfiguration resource for point to site client connection.
17403	RadiusServerAddress *string `json:"radiusServerAddress,omitempty"`
17404	// RadiusServerSecret - The radius secret property of the P2SVpnServerConfiguration resource for point to site client connection.
17405	RadiusServerSecret *string `json:"radiusServerSecret,omitempty"`
17406	// ProvisioningState - READ-ONLY; The provisioning state of the P2SVpnServerConfiguration resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
17407	ProvisioningState *string `json:"provisioningState,omitempty"`
17408	// P2SVpnGateways - READ-ONLY; List of references to P2SVpnGateways.
17409	P2SVpnGateways *[]SubResource `json:"p2SVpnGateways,omitempty"`
17410	// Etag - A unique read-only string that changes whenever the resource is updated.
17411	Etag *string `json:"etag,omitempty"`
17412}
17413
17414// MarshalJSON is the custom marshaler for P2SVpnServerConfigurationProperties.
17415func (pvscp P2SVpnServerConfigurationProperties) MarshalJSON() ([]byte, error) {
17416	objectMap := make(map[string]interface{})
17417	if pvscp.Name != nil {
17418		objectMap["name"] = pvscp.Name
17419	}
17420	if pvscp.VpnProtocols != nil {
17421		objectMap["vpnProtocols"] = pvscp.VpnProtocols
17422	}
17423	if pvscp.P2SVpnServerConfigVpnClientRootCertificates != nil {
17424		objectMap["p2SVpnServerConfigVpnClientRootCertificates"] = pvscp.P2SVpnServerConfigVpnClientRootCertificates
17425	}
17426	if pvscp.P2SVpnServerConfigVpnClientRevokedCertificates != nil {
17427		objectMap["p2SVpnServerConfigVpnClientRevokedCertificates"] = pvscp.P2SVpnServerConfigVpnClientRevokedCertificates
17428	}
17429	if pvscp.P2SVpnServerConfigRadiusServerRootCertificates != nil {
17430		objectMap["p2SVpnServerConfigRadiusServerRootCertificates"] = pvscp.P2SVpnServerConfigRadiusServerRootCertificates
17431	}
17432	if pvscp.P2SVpnServerConfigRadiusClientRootCertificates != nil {
17433		objectMap["p2SVpnServerConfigRadiusClientRootCertificates"] = pvscp.P2SVpnServerConfigRadiusClientRootCertificates
17434	}
17435	if pvscp.VpnClientIpsecPolicies != nil {
17436		objectMap["vpnClientIpsecPolicies"] = pvscp.VpnClientIpsecPolicies
17437	}
17438	if pvscp.RadiusServerAddress != nil {
17439		objectMap["radiusServerAddress"] = pvscp.RadiusServerAddress
17440	}
17441	if pvscp.RadiusServerSecret != nil {
17442		objectMap["radiusServerSecret"] = pvscp.RadiusServerSecret
17443	}
17444	if pvscp.Etag != nil {
17445		objectMap["etag"] = pvscp.Etag
17446	}
17447	return json.Marshal(objectMap)
17448}
17449
17450// P2sVpnServerConfigurationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
17451// of a long-running operation.
17452type P2sVpnServerConfigurationsCreateOrUpdateFuture struct {
17453	azure.FutureAPI
17454	// Result returns the result of the asynchronous operation.
17455	// If the operation has not completed it will return an error.
17456	Result func(P2sVpnServerConfigurationsClient) (P2SVpnServerConfiguration, error)
17457}
17458
17459// P2sVpnServerConfigurationsDeleteFuture an abstraction for monitoring and retrieving the results of a
17460// long-running operation.
17461type P2sVpnServerConfigurationsDeleteFuture struct {
17462	azure.FutureAPI
17463	// Result returns the result of the asynchronous operation.
17464	// If the operation has not completed it will return an error.
17465	Result func(P2sVpnServerConfigurationsClient) (autorest.Response, error)
17466}
17467
17468// P2SVpnServerConfigVpnClientRevokedCertificate VPN client revoked certificate of
17469// P2SVpnServerConfiguration.
17470type P2SVpnServerConfigVpnClientRevokedCertificate struct {
17471	// P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat - Properties of the vpn client revoked certificate.
17472	*P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat `json:"properties,omitempty"`
17473	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
17474	Name *string `json:"name,omitempty"`
17475	// Etag - A unique read-only string that changes whenever the resource is updated.
17476	Etag *string `json:"etag,omitempty"`
17477	// ID - Resource ID.
17478	ID *string `json:"id,omitempty"`
17479}
17480
17481// MarshalJSON is the custom marshaler for P2SVpnServerConfigVpnClientRevokedCertificate.
17482func (pvscvcrc P2SVpnServerConfigVpnClientRevokedCertificate) MarshalJSON() ([]byte, error) {
17483	objectMap := make(map[string]interface{})
17484	if pvscvcrc.P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat != nil {
17485		objectMap["properties"] = pvscvcrc.P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat
17486	}
17487	if pvscvcrc.Name != nil {
17488		objectMap["name"] = pvscvcrc.Name
17489	}
17490	if pvscvcrc.Etag != nil {
17491		objectMap["etag"] = pvscvcrc.Etag
17492	}
17493	if pvscvcrc.ID != nil {
17494		objectMap["id"] = pvscvcrc.ID
17495	}
17496	return json.Marshal(objectMap)
17497}
17498
17499// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfigVpnClientRevokedCertificate struct.
17500func (pvscvcrc *P2SVpnServerConfigVpnClientRevokedCertificate) UnmarshalJSON(body []byte) error {
17501	var m map[string]*json.RawMessage
17502	err := json.Unmarshal(body, &m)
17503	if err != nil {
17504		return err
17505	}
17506	for k, v := range m {
17507		switch k {
17508		case "properties":
17509			if v != nil {
17510				var p2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat
17511				err = json.Unmarshal(*v, &p2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat)
17512				if err != nil {
17513					return err
17514				}
17515				pvscvcrc.P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat = &p2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat
17516			}
17517		case "name":
17518			if v != nil {
17519				var name string
17520				err = json.Unmarshal(*v, &name)
17521				if err != nil {
17522					return err
17523				}
17524				pvscvcrc.Name = &name
17525			}
17526		case "etag":
17527			if v != nil {
17528				var etag string
17529				err = json.Unmarshal(*v, &etag)
17530				if err != nil {
17531					return err
17532				}
17533				pvscvcrc.Etag = &etag
17534			}
17535		case "id":
17536			if v != nil {
17537				var ID string
17538				err = json.Unmarshal(*v, &ID)
17539				if err != nil {
17540					return err
17541				}
17542				pvscvcrc.ID = &ID
17543			}
17544		}
17545	}
17546
17547	return nil
17548}
17549
17550// P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat properties of the revoked VPN client
17551// certificate of P2SVpnServerConfiguration.
17552type P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat struct {
17553	// Thumbprint - The revoked VPN client certificate thumbprint.
17554	Thumbprint *string `json:"thumbprint,omitempty"`
17555	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client revoked certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
17556	ProvisioningState *string `json:"provisioningState,omitempty"`
17557}
17558
17559// MarshalJSON is the custom marshaler for P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat.
17560func (pvscvcrcpf P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
17561	objectMap := make(map[string]interface{})
17562	if pvscvcrcpf.Thumbprint != nil {
17563		objectMap["thumbprint"] = pvscvcrcpf.Thumbprint
17564	}
17565	return json.Marshal(objectMap)
17566}
17567
17568// P2SVpnServerConfigVpnClientRootCertificate VPN client root certificate of P2SVpnServerConfiguration.
17569type P2SVpnServerConfigVpnClientRootCertificate struct {
17570	// P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat - Properties of the P2SVpnServerConfiguration VPN client root certificate.
17571	*P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat `json:"properties,omitempty"`
17572	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
17573	Name *string `json:"name,omitempty"`
17574	// Etag - A unique read-only string that changes whenever the resource is updated.
17575	Etag *string `json:"etag,omitempty"`
17576	// ID - Resource ID.
17577	ID *string `json:"id,omitempty"`
17578}
17579
17580// MarshalJSON is the custom marshaler for P2SVpnServerConfigVpnClientRootCertificate.
17581func (pvscvcrc P2SVpnServerConfigVpnClientRootCertificate) MarshalJSON() ([]byte, error) {
17582	objectMap := make(map[string]interface{})
17583	if pvscvcrc.P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat != nil {
17584		objectMap["properties"] = pvscvcrc.P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat
17585	}
17586	if pvscvcrc.Name != nil {
17587		objectMap["name"] = pvscvcrc.Name
17588	}
17589	if pvscvcrc.Etag != nil {
17590		objectMap["etag"] = pvscvcrc.Etag
17591	}
17592	if pvscvcrc.ID != nil {
17593		objectMap["id"] = pvscvcrc.ID
17594	}
17595	return json.Marshal(objectMap)
17596}
17597
17598// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfigVpnClientRootCertificate struct.
17599func (pvscvcrc *P2SVpnServerConfigVpnClientRootCertificate) UnmarshalJSON(body []byte) error {
17600	var m map[string]*json.RawMessage
17601	err := json.Unmarshal(body, &m)
17602	if err != nil {
17603		return err
17604	}
17605	for k, v := range m {
17606		switch k {
17607		case "properties":
17608			if v != nil {
17609				var p2SVpnServerConfigVpnClientRootCertificatePropertiesFormat P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat
17610				err = json.Unmarshal(*v, &p2SVpnServerConfigVpnClientRootCertificatePropertiesFormat)
17611				if err != nil {
17612					return err
17613				}
17614				pvscvcrc.P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat = &p2SVpnServerConfigVpnClientRootCertificatePropertiesFormat
17615			}
17616		case "name":
17617			if v != nil {
17618				var name string
17619				err = json.Unmarshal(*v, &name)
17620				if err != nil {
17621					return err
17622				}
17623				pvscvcrc.Name = &name
17624			}
17625		case "etag":
17626			if v != nil {
17627				var etag string
17628				err = json.Unmarshal(*v, &etag)
17629				if err != nil {
17630					return err
17631				}
17632				pvscvcrc.Etag = &etag
17633			}
17634		case "id":
17635			if v != nil {
17636				var ID string
17637				err = json.Unmarshal(*v, &ID)
17638				if err != nil {
17639					return err
17640				}
17641				pvscvcrc.ID = &ID
17642			}
17643		}
17644	}
17645
17646	return nil
17647}
17648
17649// P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat properties of VPN client root certificate of
17650// P2SVpnServerConfiguration.
17651type P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat struct {
17652	// PublicCertData - The certificate public data.
17653	PublicCertData *string `json:"publicCertData,omitempty"`
17654	// ProvisioningState - READ-ONLY; The provisioning state of the P2SVpnServerConfiguration VPN client root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
17655	ProvisioningState *string `json:"provisioningState,omitempty"`
17656}
17657
17658// MarshalJSON is the custom marshaler for P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat.
17659func (pvscvcrcpf P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
17660	objectMap := make(map[string]interface{})
17661	if pvscvcrcpf.PublicCertData != nil {
17662		objectMap["publicCertData"] = pvscvcrcpf.PublicCertData
17663	}
17664	return json.Marshal(objectMap)
17665}
17666
17667// PacketCapture parameters that define the create packet capture operation.
17668type PacketCapture struct {
17669	// PacketCaptureParameters - Properties of the packet capture.
17670	*PacketCaptureParameters `json:"properties,omitempty"`
17671}
17672
17673// MarshalJSON is the custom marshaler for PacketCapture.
17674func (pc PacketCapture) MarshalJSON() ([]byte, error) {
17675	objectMap := make(map[string]interface{})
17676	if pc.PacketCaptureParameters != nil {
17677		objectMap["properties"] = pc.PacketCaptureParameters
17678	}
17679	return json.Marshal(objectMap)
17680}
17681
17682// UnmarshalJSON is the custom unmarshaler for PacketCapture struct.
17683func (pc *PacketCapture) UnmarshalJSON(body []byte) error {
17684	var m map[string]*json.RawMessage
17685	err := json.Unmarshal(body, &m)
17686	if err != nil {
17687		return err
17688	}
17689	for k, v := range m {
17690		switch k {
17691		case "properties":
17692			if v != nil {
17693				var packetCaptureParameters PacketCaptureParameters
17694				err = json.Unmarshal(*v, &packetCaptureParameters)
17695				if err != nil {
17696					return err
17697				}
17698				pc.PacketCaptureParameters = &packetCaptureParameters
17699			}
17700		}
17701	}
17702
17703	return nil
17704}
17705
17706// PacketCaptureFilter filter that is applied to packet capture request. Multiple filters can be applied.
17707type PacketCaptureFilter struct {
17708	// Protocol - Protocol to be filtered on. Possible values include: 'PcProtocolTCP', 'PcProtocolUDP', 'PcProtocolAny'
17709	Protocol PcProtocol `json:"protocol,omitempty"`
17710	// 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.
17711	LocalIPAddress *string `json:"localIPAddress,omitempty"`
17712	// 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.
17713	RemoteIPAddress *string `json:"remoteIPAddress,omitempty"`
17714	// 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.
17715	LocalPort *string `json:"localPort,omitempty"`
17716	// 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.
17717	RemotePort *string `json:"remotePort,omitempty"`
17718}
17719
17720// PacketCaptureListResult list of packet capture sessions.
17721type PacketCaptureListResult struct {
17722	autorest.Response `json:"-"`
17723	// Value - Information about packet capture sessions.
17724	Value *[]PacketCaptureResult `json:"value,omitempty"`
17725}
17726
17727// PacketCaptureParameters parameters that define the create packet capture operation.
17728type PacketCaptureParameters struct {
17729	// Target - The ID of the targeted resource, only VM is currently supported.
17730	Target *string `json:"target,omitempty"`
17731	// BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated.
17732	BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"`
17733	// TotalBytesPerSession - Maximum size of the capture output.
17734	TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"`
17735	// TimeLimitInSeconds - Maximum duration of the capture session in seconds.
17736	TimeLimitInSeconds *int32 `json:"timeLimitInSeconds,omitempty"`
17737	// StorageLocation - Describes the storage location for a packet capture session.
17738	StorageLocation *PacketCaptureStorageLocation `json:"storageLocation,omitempty"`
17739	// Filters - A list of packet capture filters.
17740	Filters *[]PacketCaptureFilter `json:"filters,omitempty"`
17741}
17742
17743// PacketCaptureQueryStatusResult status of packet capture session.
17744type PacketCaptureQueryStatusResult struct {
17745	autorest.Response `json:"-"`
17746	// Name - The name of the packet capture resource.
17747	Name *string `json:"name,omitempty"`
17748	// ID - The ID of the packet capture resource.
17749	ID *string `json:"id,omitempty"`
17750	// CaptureStartTime - The start time of the packet capture session.
17751	CaptureStartTime *date.Time `json:"captureStartTime,omitempty"`
17752	// PacketCaptureStatus - The status of the packet capture session. Possible values include: 'PcStatusNotStarted', 'PcStatusRunning', 'PcStatusStopped', 'PcStatusError', 'PcStatusUnknown'
17753	PacketCaptureStatus PcStatus `json:"packetCaptureStatus,omitempty"`
17754	// StopReason - The reason the current packet capture session was stopped.
17755	StopReason *string `json:"stopReason,omitempty"`
17756	// PacketCaptureError - List of errors of packet capture session.
17757	PacketCaptureError *[]PcError `json:"packetCaptureError,omitempty"`
17758}
17759
17760// PacketCaptureResult information about packet capture session.
17761type PacketCaptureResult struct {
17762	autorest.Response `json:"-"`
17763	// Name - READ-ONLY; Name of the packet capture session.
17764	Name *string `json:"name,omitempty"`
17765	// ID - READ-ONLY; ID of the packet capture operation.
17766	ID *string `json:"id,omitempty"`
17767	// Etag - A unique read-only string that changes whenever the resource is updated.
17768	Etag *string `json:"etag,omitempty"`
17769	// PacketCaptureResultProperties - Properties of the packet capture result.
17770	*PacketCaptureResultProperties `json:"properties,omitempty"`
17771}
17772
17773// MarshalJSON is the custom marshaler for PacketCaptureResult.
17774func (pcr PacketCaptureResult) MarshalJSON() ([]byte, error) {
17775	objectMap := make(map[string]interface{})
17776	if pcr.Etag != nil {
17777		objectMap["etag"] = pcr.Etag
17778	}
17779	if pcr.PacketCaptureResultProperties != nil {
17780		objectMap["properties"] = pcr.PacketCaptureResultProperties
17781	}
17782	return json.Marshal(objectMap)
17783}
17784
17785// UnmarshalJSON is the custom unmarshaler for PacketCaptureResult struct.
17786func (pcr *PacketCaptureResult) UnmarshalJSON(body []byte) error {
17787	var m map[string]*json.RawMessage
17788	err := json.Unmarshal(body, &m)
17789	if err != nil {
17790		return err
17791	}
17792	for k, v := range m {
17793		switch k {
17794		case "name":
17795			if v != nil {
17796				var name string
17797				err = json.Unmarshal(*v, &name)
17798				if err != nil {
17799					return err
17800				}
17801				pcr.Name = &name
17802			}
17803		case "id":
17804			if v != nil {
17805				var ID string
17806				err = json.Unmarshal(*v, &ID)
17807				if err != nil {
17808					return err
17809				}
17810				pcr.ID = &ID
17811			}
17812		case "etag":
17813			if v != nil {
17814				var etag string
17815				err = json.Unmarshal(*v, &etag)
17816				if err != nil {
17817					return err
17818				}
17819				pcr.Etag = &etag
17820			}
17821		case "properties":
17822			if v != nil {
17823				var packetCaptureResultProperties PacketCaptureResultProperties
17824				err = json.Unmarshal(*v, &packetCaptureResultProperties)
17825				if err != nil {
17826					return err
17827				}
17828				pcr.PacketCaptureResultProperties = &packetCaptureResultProperties
17829			}
17830		}
17831	}
17832
17833	return nil
17834}
17835
17836// PacketCaptureResultProperties describes the properties of a packet capture session.
17837type PacketCaptureResultProperties struct {
17838	// ProvisioningState - The provisioning state of the packet capture session. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
17839	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
17840	// Target - The ID of the targeted resource, only VM is currently supported.
17841	Target *string `json:"target,omitempty"`
17842	// BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated.
17843	BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"`
17844	// TotalBytesPerSession - Maximum size of the capture output.
17845	TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"`
17846	// TimeLimitInSeconds - Maximum duration of the capture session in seconds.
17847	TimeLimitInSeconds *int32 `json:"timeLimitInSeconds,omitempty"`
17848	// StorageLocation - Describes the storage location for a packet capture session.
17849	StorageLocation *PacketCaptureStorageLocation `json:"storageLocation,omitempty"`
17850	// Filters - A list of packet capture filters.
17851	Filters *[]PacketCaptureFilter `json:"filters,omitempty"`
17852}
17853
17854// PacketCapturesCreateFuture an abstraction for monitoring and retrieving the results of a long-running
17855// operation.
17856type PacketCapturesCreateFuture struct {
17857	azure.FutureAPI
17858	// Result returns the result of the asynchronous operation.
17859	// If the operation has not completed it will return an error.
17860	Result func(PacketCapturesClient) (PacketCaptureResult, error)
17861}
17862
17863// PacketCapturesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
17864// operation.
17865type PacketCapturesDeleteFuture struct {
17866	azure.FutureAPI
17867	// Result returns the result of the asynchronous operation.
17868	// If the operation has not completed it will return an error.
17869	Result func(PacketCapturesClient) (autorest.Response, error)
17870}
17871
17872// PacketCapturesGetStatusFuture an abstraction for monitoring and retrieving the results of a long-running
17873// operation.
17874type PacketCapturesGetStatusFuture struct {
17875	azure.FutureAPI
17876	// Result returns the result of the asynchronous operation.
17877	// If the operation has not completed it will return an error.
17878	Result func(PacketCapturesClient) (PacketCaptureQueryStatusResult, error)
17879}
17880
17881// PacketCapturesStopFuture an abstraction for monitoring and retrieving the results of a long-running
17882// operation.
17883type PacketCapturesStopFuture struct {
17884	azure.FutureAPI
17885	// Result returns the result of the asynchronous operation.
17886	// If the operation has not completed it will return an error.
17887	Result func(PacketCapturesClient) (autorest.Response, error)
17888}
17889
17890// PacketCaptureStorageLocation describes the storage location for a packet capture session.
17891type PacketCaptureStorageLocation struct {
17892	// StorageID - The ID of the storage account to save the packet capture session. Required if no local file path is provided.
17893	StorageID *string `json:"storageId,omitempty"`
17894	// 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.
17895	StoragePath *string `json:"storagePath,omitempty"`
17896	// 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.
17897	FilePath *string `json:"filePath,omitempty"`
17898}
17899
17900// PatchRouteFilter route Filter Resource.
17901type PatchRouteFilter struct {
17902	// RouteFilterPropertiesFormat - Properties of the route filter.
17903	*RouteFilterPropertiesFormat `json:"properties,omitempty"`
17904	// Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource.
17905	Name *string `json:"name,omitempty"`
17906	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
17907	Etag *string `json:"etag,omitempty"`
17908	// Type - READ-ONLY; Resource type.
17909	Type *string `json:"type,omitempty"`
17910	// Tags - Resource tags.
17911	Tags map[string]*string `json:"tags"`
17912	// ID - Resource ID.
17913	ID *string `json:"id,omitempty"`
17914}
17915
17916// MarshalJSON is the custom marshaler for PatchRouteFilter.
17917func (prf PatchRouteFilter) MarshalJSON() ([]byte, error) {
17918	objectMap := make(map[string]interface{})
17919	if prf.RouteFilterPropertiesFormat != nil {
17920		objectMap["properties"] = prf.RouteFilterPropertiesFormat
17921	}
17922	if prf.Tags != nil {
17923		objectMap["tags"] = prf.Tags
17924	}
17925	if prf.ID != nil {
17926		objectMap["id"] = prf.ID
17927	}
17928	return json.Marshal(objectMap)
17929}
17930
17931// UnmarshalJSON is the custom unmarshaler for PatchRouteFilter struct.
17932func (prf *PatchRouteFilter) UnmarshalJSON(body []byte) error {
17933	var m map[string]*json.RawMessage
17934	err := json.Unmarshal(body, &m)
17935	if err != nil {
17936		return err
17937	}
17938	for k, v := range m {
17939		switch k {
17940		case "properties":
17941			if v != nil {
17942				var routeFilterPropertiesFormat RouteFilterPropertiesFormat
17943				err = json.Unmarshal(*v, &routeFilterPropertiesFormat)
17944				if err != nil {
17945					return err
17946				}
17947				prf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat
17948			}
17949		case "name":
17950			if v != nil {
17951				var name string
17952				err = json.Unmarshal(*v, &name)
17953				if err != nil {
17954					return err
17955				}
17956				prf.Name = &name
17957			}
17958		case "etag":
17959			if v != nil {
17960				var etag string
17961				err = json.Unmarshal(*v, &etag)
17962				if err != nil {
17963					return err
17964				}
17965				prf.Etag = &etag
17966			}
17967		case "type":
17968			if v != nil {
17969				var typeVar string
17970				err = json.Unmarshal(*v, &typeVar)
17971				if err != nil {
17972					return err
17973				}
17974				prf.Type = &typeVar
17975			}
17976		case "tags":
17977			if v != nil {
17978				var tags map[string]*string
17979				err = json.Unmarshal(*v, &tags)
17980				if err != nil {
17981					return err
17982				}
17983				prf.Tags = tags
17984			}
17985		case "id":
17986			if v != nil {
17987				var ID string
17988				err = json.Unmarshal(*v, &ID)
17989				if err != nil {
17990					return err
17991				}
17992				prf.ID = &ID
17993			}
17994		}
17995	}
17996
17997	return nil
17998}
17999
18000// PatchRouteFilterRule route Filter Rule Resource
18001type PatchRouteFilterRule struct {
18002	// RouteFilterRulePropertiesFormat - Properties of the route filter rule.
18003	*RouteFilterRulePropertiesFormat `json:"properties,omitempty"`
18004	// Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource.
18005	Name *string `json:"name,omitempty"`
18006	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
18007	Etag *string `json:"etag,omitempty"`
18008	// ID - Resource ID.
18009	ID *string `json:"id,omitempty"`
18010}
18011
18012// MarshalJSON is the custom marshaler for PatchRouteFilterRule.
18013func (prfr PatchRouteFilterRule) MarshalJSON() ([]byte, error) {
18014	objectMap := make(map[string]interface{})
18015	if prfr.RouteFilterRulePropertiesFormat != nil {
18016		objectMap["properties"] = prfr.RouteFilterRulePropertiesFormat
18017	}
18018	if prfr.ID != nil {
18019		objectMap["id"] = prfr.ID
18020	}
18021	return json.Marshal(objectMap)
18022}
18023
18024// UnmarshalJSON is the custom unmarshaler for PatchRouteFilterRule struct.
18025func (prfr *PatchRouteFilterRule) UnmarshalJSON(body []byte) error {
18026	var m map[string]*json.RawMessage
18027	err := json.Unmarshal(body, &m)
18028	if err != nil {
18029		return err
18030	}
18031	for k, v := range m {
18032		switch k {
18033		case "properties":
18034			if v != nil {
18035				var routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat
18036				err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat)
18037				if err != nil {
18038					return err
18039				}
18040				prfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat
18041			}
18042		case "name":
18043			if v != nil {
18044				var name string
18045				err = json.Unmarshal(*v, &name)
18046				if err != nil {
18047					return err
18048				}
18049				prfr.Name = &name
18050			}
18051		case "etag":
18052			if v != nil {
18053				var etag string
18054				err = json.Unmarshal(*v, &etag)
18055				if err != nil {
18056					return err
18057				}
18058				prfr.Etag = &etag
18059			}
18060		case "id":
18061			if v != nil {
18062				var ID string
18063				err = json.Unmarshal(*v, &ID)
18064				if err != nil {
18065					return err
18066				}
18067				prfr.ID = &ID
18068			}
18069		}
18070	}
18071
18072	return nil
18073}
18074
18075// PeerExpressRouteCircuitConnection peer Express Route Circuit Connection in an ExpressRouteCircuitPeering
18076// resource.
18077type PeerExpressRouteCircuitConnection struct {
18078	autorest.Response `json:"-"`
18079	// PeerExpressRouteCircuitConnectionPropertiesFormat - Properties of the peer express route circuit connection.
18080	*PeerExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"`
18081	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
18082	Name *string `json:"name,omitempty"`
18083	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
18084	Etag *string `json:"etag,omitempty"`
18085	// ID - Resource ID.
18086	ID *string `json:"id,omitempty"`
18087}
18088
18089// MarshalJSON is the custom marshaler for PeerExpressRouteCircuitConnection.
18090func (percc PeerExpressRouteCircuitConnection) MarshalJSON() ([]byte, error) {
18091	objectMap := make(map[string]interface{})
18092	if percc.PeerExpressRouteCircuitConnectionPropertiesFormat != nil {
18093		objectMap["properties"] = percc.PeerExpressRouteCircuitConnectionPropertiesFormat
18094	}
18095	if percc.Name != nil {
18096		objectMap["name"] = percc.Name
18097	}
18098	if percc.ID != nil {
18099		objectMap["id"] = percc.ID
18100	}
18101	return json.Marshal(objectMap)
18102}
18103
18104// UnmarshalJSON is the custom unmarshaler for PeerExpressRouteCircuitConnection struct.
18105func (percc *PeerExpressRouteCircuitConnection) UnmarshalJSON(body []byte) error {
18106	var m map[string]*json.RawMessage
18107	err := json.Unmarshal(body, &m)
18108	if err != nil {
18109		return err
18110	}
18111	for k, v := range m {
18112		switch k {
18113		case "properties":
18114			if v != nil {
18115				var peerExpressRouteCircuitConnectionPropertiesFormat PeerExpressRouteCircuitConnectionPropertiesFormat
18116				err = json.Unmarshal(*v, &peerExpressRouteCircuitConnectionPropertiesFormat)
18117				if err != nil {
18118					return err
18119				}
18120				percc.PeerExpressRouteCircuitConnectionPropertiesFormat = &peerExpressRouteCircuitConnectionPropertiesFormat
18121			}
18122		case "name":
18123			if v != nil {
18124				var name string
18125				err = json.Unmarshal(*v, &name)
18126				if err != nil {
18127					return err
18128				}
18129				percc.Name = &name
18130			}
18131		case "etag":
18132			if v != nil {
18133				var etag string
18134				err = json.Unmarshal(*v, &etag)
18135				if err != nil {
18136					return err
18137				}
18138				percc.Etag = &etag
18139			}
18140		case "id":
18141			if v != nil {
18142				var ID string
18143				err = json.Unmarshal(*v, &ID)
18144				if err != nil {
18145					return err
18146				}
18147				percc.ID = &ID
18148			}
18149		}
18150	}
18151
18152	return nil
18153}
18154
18155// PeerExpressRouteCircuitConnectionListResult response for ListPeeredConnections API service call
18156// retrieves all global reach peer circuit connections that belongs to a Private Peering for an
18157// ExpressRouteCircuit.
18158type PeerExpressRouteCircuitConnectionListResult struct {
18159	autorest.Response `json:"-"`
18160	// Value - The global reach peer circuit connection associated with Private Peering in an ExpressRoute Circuit.
18161	Value *[]PeerExpressRouteCircuitConnection `json:"value,omitempty"`
18162	// NextLink - The URL to get the next set of results.
18163	NextLink *string `json:"nextLink,omitempty"`
18164}
18165
18166// PeerExpressRouteCircuitConnectionListResultIterator provides access to a complete listing of
18167// PeerExpressRouteCircuitConnection values.
18168type PeerExpressRouteCircuitConnectionListResultIterator struct {
18169	i    int
18170	page PeerExpressRouteCircuitConnectionListResultPage
18171}
18172
18173// NextWithContext advances to the next value.  If there was an error making
18174// the request the iterator does not advance and the error is returned.
18175func (iter *PeerExpressRouteCircuitConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
18176	if tracing.IsEnabled() {
18177		ctx = tracing.StartSpan(ctx, fqdn+"/PeerExpressRouteCircuitConnectionListResultIterator.NextWithContext")
18178		defer func() {
18179			sc := -1
18180			if iter.Response().Response.Response != nil {
18181				sc = iter.Response().Response.Response.StatusCode
18182			}
18183			tracing.EndSpan(ctx, sc, err)
18184		}()
18185	}
18186	iter.i++
18187	if iter.i < len(iter.page.Values()) {
18188		return nil
18189	}
18190	err = iter.page.NextWithContext(ctx)
18191	if err != nil {
18192		iter.i--
18193		return err
18194	}
18195	iter.i = 0
18196	return nil
18197}
18198
18199// Next advances to the next value.  If there was an error making
18200// the request the iterator does not advance and the error is returned.
18201// Deprecated: Use NextWithContext() instead.
18202func (iter *PeerExpressRouteCircuitConnectionListResultIterator) Next() error {
18203	return iter.NextWithContext(context.Background())
18204}
18205
18206// NotDone returns true if the enumeration should be started or is not yet complete.
18207func (iter PeerExpressRouteCircuitConnectionListResultIterator) NotDone() bool {
18208	return iter.page.NotDone() && iter.i < len(iter.page.Values())
18209}
18210
18211// Response returns the raw server response from the last page request.
18212func (iter PeerExpressRouteCircuitConnectionListResultIterator) Response() PeerExpressRouteCircuitConnectionListResult {
18213	return iter.page.Response()
18214}
18215
18216// Value returns the current value or a zero-initialized value if the
18217// iterator has advanced beyond the end of the collection.
18218func (iter PeerExpressRouteCircuitConnectionListResultIterator) Value() PeerExpressRouteCircuitConnection {
18219	if !iter.page.NotDone() {
18220		return PeerExpressRouteCircuitConnection{}
18221	}
18222	return iter.page.Values()[iter.i]
18223}
18224
18225// Creates a new instance of the PeerExpressRouteCircuitConnectionListResultIterator type.
18226func NewPeerExpressRouteCircuitConnectionListResultIterator(page PeerExpressRouteCircuitConnectionListResultPage) PeerExpressRouteCircuitConnectionListResultIterator {
18227	return PeerExpressRouteCircuitConnectionListResultIterator{page: page}
18228}
18229
18230// IsEmpty returns true if the ListResult contains no values.
18231func (percclr PeerExpressRouteCircuitConnectionListResult) IsEmpty() bool {
18232	return percclr.Value == nil || len(*percclr.Value) == 0
18233}
18234
18235// hasNextLink returns true if the NextLink is not empty.
18236func (percclr PeerExpressRouteCircuitConnectionListResult) hasNextLink() bool {
18237	return percclr.NextLink != nil && len(*percclr.NextLink) != 0
18238}
18239
18240// peerExpressRouteCircuitConnectionListResultPreparer prepares a request to retrieve the next set of results.
18241// It returns nil if no more results exist.
18242func (percclr PeerExpressRouteCircuitConnectionListResult) peerExpressRouteCircuitConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
18243	if !percclr.hasNextLink() {
18244		return nil, nil
18245	}
18246	return autorest.Prepare((&http.Request{}).WithContext(ctx),
18247		autorest.AsJSON(),
18248		autorest.AsGet(),
18249		autorest.WithBaseURL(to.String(percclr.NextLink)))
18250}
18251
18252// PeerExpressRouteCircuitConnectionListResultPage contains a page of PeerExpressRouteCircuitConnection
18253// values.
18254type PeerExpressRouteCircuitConnectionListResultPage struct {
18255	fn      func(context.Context, PeerExpressRouteCircuitConnectionListResult) (PeerExpressRouteCircuitConnectionListResult, error)
18256	percclr PeerExpressRouteCircuitConnectionListResult
18257}
18258
18259// NextWithContext advances to the next page of values.  If there was an error making
18260// the request the page does not advance and the error is returned.
18261func (page *PeerExpressRouteCircuitConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
18262	if tracing.IsEnabled() {
18263		ctx = tracing.StartSpan(ctx, fqdn+"/PeerExpressRouteCircuitConnectionListResultPage.NextWithContext")
18264		defer func() {
18265			sc := -1
18266			if page.Response().Response.Response != nil {
18267				sc = page.Response().Response.Response.StatusCode
18268			}
18269			tracing.EndSpan(ctx, sc, err)
18270		}()
18271	}
18272	for {
18273		next, err := page.fn(ctx, page.percclr)
18274		if err != nil {
18275			return err
18276		}
18277		page.percclr = next
18278		if !next.hasNextLink() || !next.IsEmpty() {
18279			break
18280		}
18281	}
18282	return nil
18283}
18284
18285// Next advances to the next page of values.  If there was an error making
18286// the request the page does not advance and the error is returned.
18287// Deprecated: Use NextWithContext() instead.
18288func (page *PeerExpressRouteCircuitConnectionListResultPage) Next() error {
18289	return page.NextWithContext(context.Background())
18290}
18291
18292// NotDone returns true if the page enumeration should be started or is not yet complete.
18293func (page PeerExpressRouteCircuitConnectionListResultPage) NotDone() bool {
18294	return !page.percclr.IsEmpty()
18295}
18296
18297// Response returns the raw server response from the last page request.
18298func (page PeerExpressRouteCircuitConnectionListResultPage) Response() PeerExpressRouteCircuitConnectionListResult {
18299	return page.percclr
18300}
18301
18302// Values returns the slice of values for the current page or nil if there are no values.
18303func (page PeerExpressRouteCircuitConnectionListResultPage) Values() []PeerExpressRouteCircuitConnection {
18304	if page.percclr.IsEmpty() {
18305		return nil
18306	}
18307	return *page.percclr.Value
18308}
18309
18310// Creates a new instance of the PeerExpressRouteCircuitConnectionListResultPage type.
18311func NewPeerExpressRouteCircuitConnectionListResultPage(cur PeerExpressRouteCircuitConnectionListResult, getNextPage func(context.Context, PeerExpressRouteCircuitConnectionListResult) (PeerExpressRouteCircuitConnectionListResult, error)) PeerExpressRouteCircuitConnectionListResultPage {
18312	return PeerExpressRouteCircuitConnectionListResultPage{
18313		fn:      getNextPage,
18314		percclr: cur,
18315	}
18316}
18317
18318// PeerExpressRouteCircuitConnectionPropertiesFormat properties of the peer express route circuit
18319// connection.
18320type PeerExpressRouteCircuitConnectionPropertiesFormat struct {
18321	// ExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the circuit.
18322	ExpressRouteCircuitPeering *SubResource `json:"expressRouteCircuitPeering,omitempty"`
18323	// PeerExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the peered circuit.
18324	PeerExpressRouteCircuitPeering *SubResource `json:"peerExpressRouteCircuitPeering,omitempty"`
18325	// AddressPrefix - /29 IP address space to carve out Customer addresses for tunnels.
18326	AddressPrefix *string `json:"addressPrefix,omitempty"`
18327	// CircuitConnectionStatus - Express Route Circuit connection state. Possible values include: 'Connected', 'Connecting', 'Disconnected'
18328	CircuitConnectionStatus CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"`
18329	// ConnectionName - The name of the express route circuit connection resource.
18330	ConnectionName *string `json:"connectionName,omitempty"`
18331	// AuthResourceGUID - The resource guid of the authorization used for the express route circuit connection.
18332	AuthResourceGUID *string `json:"authResourceGuid,omitempty"`
18333	// ProvisioningState - READ-ONLY; Provisioning state of the peer express route circuit connection resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
18334	ProvisioningState *string `json:"provisioningState,omitempty"`
18335}
18336
18337// MarshalJSON is the custom marshaler for PeerExpressRouteCircuitConnectionPropertiesFormat.
18338func (perccpf PeerExpressRouteCircuitConnectionPropertiesFormat) MarshalJSON() ([]byte, error) {
18339	objectMap := make(map[string]interface{})
18340	if perccpf.ExpressRouteCircuitPeering != nil {
18341		objectMap["expressRouteCircuitPeering"] = perccpf.ExpressRouteCircuitPeering
18342	}
18343	if perccpf.PeerExpressRouteCircuitPeering != nil {
18344		objectMap["peerExpressRouteCircuitPeering"] = perccpf.PeerExpressRouteCircuitPeering
18345	}
18346	if perccpf.AddressPrefix != nil {
18347		objectMap["addressPrefix"] = perccpf.AddressPrefix
18348	}
18349	if perccpf.CircuitConnectionStatus != "" {
18350		objectMap["circuitConnectionStatus"] = perccpf.CircuitConnectionStatus
18351	}
18352	if perccpf.ConnectionName != nil {
18353		objectMap["connectionName"] = perccpf.ConnectionName
18354	}
18355	if perccpf.AuthResourceGUID != nil {
18356		objectMap["authResourceGuid"] = perccpf.AuthResourceGUID
18357	}
18358	return json.Marshal(objectMap)
18359}
18360
18361// PolicySettings defines contents of a web application firewall global configuration
18362type PolicySettings struct {
18363	// EnabledState - Describes if the policy is in enabled state or disabled state. Possible values include: 'WebApplicationFirewallEnabledStateDisabled', 'WebApplicationFirewallEnabledStateEnabled'
18364	EnabledState WebApplicationFirewallEnabledState `json:"enabledState,omitempty"`
18365	// Mode - Describes if it is in detection mode  or prevention mode at policy level. Possible values include: 'WebApplicationFirewallModePrevention', 'WebApplicationFirewallModeDetection'
18366	Mode WebApplicationFirewallMode `json:"mode,omitempty"`
18367}
18368
18369// PrepareNetworkPoliciesRequest details of PrepareNetworkPolicies for Subnet.
18370type PrepareNetworkPoliciesRequest struct {
18371	// ServiceName - The name of the service for which subnet is being prepared for.
18372	ServiceName *string `json:"serviceName,omitempty"`
18373	// ResourceGroupName - The name of the resource group where the Network Intent Policy will be stored.
18374	ResourceGroupName *string `json:"resourceGroupName,omitempty"`
18375	// NetworkIntentPolicyConfigurations - A list of NetworkIntentPolicyConfiguration.
18376	NetworkIntentPolicyConfigurations *[]IntentPolicyConfiguration `json:"networkIntentPolicyConfigurations,omitempty"`
18377}
18378
18379// Probe a load balancer probe.
18380type Probe struct {
18381	autorest.Response `json:"-"`
18382	// ProbePropertiesFormat - Properties of load balancer probe.
18383	*ProbePropertiesFormat `json:"properties,omitempty"`
18384	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
18385	Name *string `json:"name,omitempty"`
18386	// Etag - A unique read-only string that changes whenever the resource is updated.
18387	Etag *string `json:"etag,omitempty"`
18388	// ID - Resource ID.
18389	ID *string `json:"id,omitempty"`
18390}
18391
18392// MarshalJSON is the custom marshaler for Probe.
18393func (p Probe) MarshalJSON() ([]byte, error) {
18394	objectMap := make(map[string]interface{})
18395	if p.ProbePropertiesFormat != nil {
18396		objectMap["properties"] = p.ProbePropertiesFormat
18397	}
18398	if p.Name != nil {
18399		objectMap["name"] = p.Name
18400	}
18401	if p.Etag != nil {
18402		objectMap["etag"] = p.Etag
18403	}
18404	if p.ID != nil {
18405		objectMap["id"] = p.ID
18406	}
18407	return json.Marshal(objectMap)
18408}
18409
18410// UnmarshalJSON is the custom unmarshaler for Probe struct.
18411func (p *Probe) UnmarshalJSON(body []byte) error {
18412	var m map[string]*json.RawMessage
18413	err := json.Unmarshal(body, &m)
18414	if err != nil {
18415		return err
18416	}
18417	for k, v := range m {
18418		switch k {
18419		case "properties":
18420			if v != nil {
18421				var probePropertiesFormat ProbePropertiesFormat
18422				err = json.Unmarshal(*v, &probePropertiesFormat)
18423				if err != nil {
18424					return err
18425				}
18426				p.ProbePropertiesFormat = &probePropertiesFormat
18427			}
18428		case "name":
18429			if v != nil {
18430				var name string
18431				err = json.Unmarshal(*v, &name)
18432				if err != nil {
18433					return err
18434				}
18435				p.Name = &name
18436			}
18437		case "etag":
18438			if v != nil {
18439				var etag string
18440				err = json.Unmarshal(*v, &etag)
18441				if err != nil {
18442					return err
18443				}
18444				p.Etag = &etag
18445			}
18446		case "id":
18447			if v != nil {
18448				var ID string
18449				err = json.Unmarshal(*v, &ID)
18450				if err != nil {
18451					return err
18452				}
18453				p.ID = &ID
18454			}
18455		}
18456	}
18457
18458	return nil
18459}
18460
18461// ProbePropertiesFormat load balancer probe resource.
18462type ProbePropertiesFormat struct {
18463	// LoadBalancingRules - READ-ONLY; The load balancer rules that use this probe.
18464	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
18465	// 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'
18466	Protocol ProbeProtocol `json:"protocol,omitempty"`
18467	// Port - The port for communicating the probe. Possible values range from 1 to 65535, inclusive.
18468	Port *int32 `json:"port,omitempty"`
18469	// 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.
18470	IntervalInSeconds *int32 `json:"intervalInSeconds,omitempty"`
18471	// 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.
18472	NumberOfProbes *int32 `json:"numberOfProbes,omitempty"`
18473	// 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.
18474	RequestPath *string `json:"requestPath,omitempty"`
18475	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
18476	ProvisioningState *string `json:"provisioningState,omitempty"`
18477}
18478
18479// MarshalJSON is the custom marshaler for ProbePropertiesFormat.
18480func (ppf ProbePropertiesFormat) MarshalJSON() ([]byte, error) {
18481	objectMap := make(map[string]interface{})
18482	if ppf.Protocol != "" {
18483		objectMap["protocol"] = ppf.Protocol
18484	}
18485	if ppf.Port != nil {
18486		objectMap["port"] = ppf.Port
18487	}
18488	if ppf.IntervalInSeconds != nil {
18489		objectMap["intervalInSeconds"] = ppf.IntervalInSeconds
18490	}
18491	if ppf.NumberOfProbes != nil {
18492		objectMap["numberOfProbes"] = ppf.NumberOfProbes
18493	}
18494	if ppf.RequestPath != nil {
18495		objectMap["requestPath"] = ppf.RequestPath
18496	}
18497	if ppf.ProvisioningState != nil {
18498		objectMap["provisioningState"] = ppf.ProvisioningState
18499	}
18500	return json.Marshal(objectMap)
18501}
18502
18503// Profile network profile resource.
18504type Profile struct {
18505	autorest.Response `json:"-"`
18506	// ProfilePropertiesFormat - Network profile properties.
18507	*ProfilePropertiesFormat `json:"properties,omitempty"`
18508	// Etag - A unique read-only string that changes whenever the resource is updated.
18509	Etag *string `json:"etag,omitempty"`
18510	// ID - Resource ID.
18511	ID *string `json:"id,omitempty"`
18512	// Name - READ-ONLY; Resource name.
18513	Name *string `json:"name,omitempty"`
18514	// Type - READ-ONLY; Resource type.
18515	Type *string `json:"type,omitempty"`
18516	// Location - Resource location.
18517	Location *string `json:"location,omitempty"`
18518	// Tags - Resource tags.
18519	Tags map[string]*string `json:"tags"`
18520}
18521
18522// MarshalJSON is the custom marshaler for Profile.
18523func (p Profile) MarshalJSON() ([]byte, error) {
18524	objectMap := make(map[string]interface{})
18525	if p.ProfilePropertiesFormat != nil {
18526		objectMap["properties"] = p.ProfilePropertiesFormat
18527	}
18528	if p.Etag != nil {
18529		objectMap["etag"] = p.Etag
18530	}
18531	if p.ID != nil {
18532		objectMap["id"] = p.ID
18533	}
18534	if p.Location != nil {
18535		objectMap["location"] = p.Location
18536	}
18537	if p.Tags != nil {
18538		objectMap["tags"] = p.Tags
18539	}
18540	return json.Marshal(objectMap)
18541}
18542
18543// UnmarshalJSON is the custom unmarshaler for Profile struct.
18544func (p *Profile) UnmarshalJSON(body []byte) error {
18545	var m map[string]*json.RawMessage
18546	err := json.Unmarshal(body, &m)
18547	if err != nil {
18548		return err
18549	}
18550	for k, v := range m {
18551		switch k {
18552		case "properties":
18553			if v != nil {
18554				var profilePropertiesFormat ProfilePropertiesFormat
18555				err = json.Unmarshal(*v, &profilePropertiesFormat)
18556				if err != nil {
18557					return err
18558				}
18559				p.ProfilePropertiesFormat = &profilePropertiesFormat
18560			}
18561		case "etag":
18562			if v != nil {
18563				var etag string
18564				err = json.Unmarshal(*v, &etag)
18565				if err != nil {
18566					return err
18567				}
18568				p.Etag = &etag
18569			}
18570		case "id":
18571			if v != nil {
18572				var ID string
18573				err = json.Unmarshal(*v, &ID)
18574				if err != nil {
18575					return err
18576				}
18577				p.ID = &ID
18578			}
18579		case "name":
18580			if v != nil {
18581				var name string
18582				err = json.Unmarshal(*v, &name)
18583				if err != nil {
18584					return err
18585				}
18586				p.Name = &name
18587			}
18588		case "type":
18589			if v != nil {
18590				var typeVar string
18591				err = json.Unmarshal(*v, &typeVar)
18592				if err != nil {
18593					return err
18594				}
18595				p.Type = &typeVar
18596			}
18597		case "location":
18598			if v != nil {
18599				var location string
18600				err = json.Unmarshal(*v, &location)
18601				if err != nil {
18602					return err
18603				}
18604				p.Location = &location
18605			}
18606		case "tags":
18607			if v != nil {
18608				var tags map[string]*string
18609				err = json.Unmarshal(*v, &tags)
18610				if err != nil {
18611					return err
18612				}
18613				p.Tags = tags
18614			}
18615		}
18616	}
18617
18618	return nil
18619}
18620
18621// ProfileListResult response for ListNetworkProfiles API service call.
18622type ProfileListResult struct {
18623	autorest.Response `json:"-"`
18624	// Value - A list of network profiles that exist in a resource group.
18625	Value *[]Profile `json:"value,omitempty"`
18626	// NextLink - The URL to get the next set of results.
18627	NextLink *string `json:"nextLink,omitempty"`
18628}
18629
18630// ProfileListResultIterator provides access to a complete listing of Profile values.
18631type ProfileListResultIterator struct {
18632	i    int
18633	page ProfileListResultPage
18634}
18635
18636// NextWithContext advances to the next value.  If there was an error making
18637// the request the iterator does not advance and the error is returned.
18638func (iter *ProfileListResultIterator) NextWithContext(ctx context.Context) (err error) {
18639	if tracing.IsEnabled() {
18640		ctx = tracing.StartSpan(ctx, fqdn+"/ProfileListResultIterator.NextWithContext")
18641		defer func() {
18642			sc := -1
18643			if iter.Response().Response.Response != nil {
18644				sc = iter.Response().Response.Response.StatusCode
18645			}
18646			tracing.EndSpan(ctx, sc, err)
18647		}()
18648	}
18649	iter.i++
18650	if iter.i < len(iter.page.Values()) {
18651		return nil
18652	}
18653	err = iter.page.NextWithContext(ctx)
18654	if err != nil {
18655		iter.i--
18656		return err
18657	}
18658	iter.i = 0
18659	return nil
18660}
18661
18662// Next advances to the next value.  If there was an error making
18663// the request the iterator does not advance and the error is returned.
18664// Deprecated: Use NextWithContext() instead.
18665func (iter *ProfileListResultIterator) Next() error {
18666	return iter.NextWithContext(context.Background())
18667}
18668
18669// NotDone returns true if the enumeration should be started or is not yet complete.
18670func (iter ProfileListResultIterator) NotDone() bool {
18671	return iter.page.NotDone() && iter.i < len(iter.page.Values())
18672}
18673
18674// Response returns the raw server response from the last page request.
18675func (iter ProfileListResultIterator) Response() ProfileListResult {
18676	return iter.page.Response()
18677}
18678
18679// Value returns the current value or a zero-initialized value if the
18680// iterator has advanced beyond the end of the collection.
18681func (iter ProfileListResultIterator) Value() Profile {
18682	if !iter.page.NotDone() {
18683		return Profile{}
18684	}
18685	return iter.page.Values()[iter.i]
18686}
18687
18688// Creates a new instance of the ProfileListResultIterator type.
18689func NewProfileListResultIterator(page ProfileListResultPage) ProfileListResultIterator {
18690	return ProfileListResultIterator{page: page}
18691}
18692
18693// IsEmpty returns true if the ListResult contains no values.
18694func (plr ProfileListResult) IsEmpty() bool {
18695	return plr.Value == nil || len(*plr.Value) == 0
18696}
18697
18698// hasNextLink returns true if the NextLink is not empty.
18699func (plr ProfileListResult) hasNextLink() bool {
18700	return plr.NextLink != nil && len(*plr.NextLink) != 0
18701}
18702
18703// profileListResultPreparer prepares a request to retrieve the next set of results.
18704// It returns nil if no more results exist.
18705func (plr ProfileListResult) profileListResultPreparer(ctx context.Context) (*http.Request, error) {
18706	if !plr.hasNextLink() {
18707		return nil, nil
18708	}
18709	return autorest.Prepare((&http.Request{}).WithContext(ctx),
18710		autorest.AsJSON(),
18711		autorest.AsGet(),
18712		autorest.WithBaseURL(to.String(plr.NextLink)))
18713}
18714
18715// ProfileListResultPage contains a page of Profile values.
18716type ProfileListResultPage struct {
18717	fn  func(context.Context, ProfileListResult) (ProfileListResult, error)
18718	plr ProfileListResult
18719}
18720
18721// NextWithContext advances to the next page of values.  If there was an error making
18722// the request the page does not advance and the error is returned.
18723func (page *ProfileListResultPage) NextWithContext(ctx context.Context) (err error) {
18724	if tracing.IsEnabled() {
18725		ctx = tracing.StartSpan(ctx, fqdn+"/ProfileListResultPage.NextWithContext")
18726		defer func() {
18727			sc := -1
18728			if page.Response().Response.Response != nil {
18729				sc = page.Response().Response.Response.StatusCode
18730			}
18731			tracing.EndSpan(ctx, sc, err)
18732		}()
18733	}
18734	for {
18735		next, err := page.fn(ctx, page.plr)
18736		if err != nil {
18737			return err
18738		}
18739		page.plr = next
18740		if !next.hasNextLink() || !next.IsEmpty() {
18741			break
18742		}
18743	}
18744	return nil
18745}
18746
18747// Next advances to the next page of values.  If there was an error making
18748// the request the page does not advance and the error is returned.
18749// Deprecated: Use NextWithContext() instead.
18750func (page *ProfileListResultPage) Next() error {
18751	return page.NextWithContext(context.Background())
18752}
18753
18754// NotDone returns true if the page enumeration should be started or is not yet complete.
18755func (page ProfileListResultPage) NotDone() bool {
18756	return !page.plr.IsEmpty()
18757}
18758
18759// Response returns the raw server response from the last page request.
18760func (page ProfileListResultPage) Response() ProfileListResult {
18761	return page.plr
18762}
18763
18764// Values returns the slice of values for the current page or nil if there are no values.
18765func (page ProfileListResultPage) Values() []Profile {
18766	if page.plr.IsEmpty() {
18767		return nil
18768	}
18769	return *page.plr.Value
18770}
18771
18772// Creates a new instance of the ProfileListResultPage type.
18773func NewProfileListResultPage(cur ProfileListResult, getNextPage func(context.Context, ProfileListResult) (ProfileListResult, error)) ProfileListResultPage {
18774	return ProfileListResultPage{
18775		fn:  getNextPage,
18776		plr: cur,
18777	}
18778}
18779
18780// ProfilePropertiesFormat network profile properties.
18781type ProfilePropertiesFormat struct {
18782	// ContainerNetworkInterfaces - List of child container network interfaces.
18783	ContainerNetworkInterfaces *[]ContainerNetworkInterface `json:"containerNetworkInterfaces,omitempty"`
18784	// ContainerNetworkInterfaceConfigurations - List of chid container network interface configurations.
18785	ContainerNetworkInterfaceConfigurations *[]ContainerNetworkInterfaceConfiguration `json:"containerNetworkInterfaceConfigurations,omitempty"`
18786	// ResourceGUID - READ-ONLY; The resource GUID property of the network interface resource.
18787	ResourceGUID *string `json:"resourceGuid,omitempty"`
18788	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
18789	ProvisioningState *string `json:"provisioningState,omitempty"`
18790}
18791
18792// MarshalJSON is the custom marshaler for ProfilePropertiesFormat.
18793func (ppf ProfilePropertiesFormat) MarshalJSON() ([]byte, error) {
18794	objectMap := make(map[string]interface{})
18795	if ppf.ContainerNetworkInterfaces != nil {
18796		objectMap["containerNetworkInterfaces"] = ppf.ContainerNetworkInterfaces
18797	}
18798	if ppf.ContainerNetworkInterfaceConfigurations != nil {
18799		objectMap["containerNetworkInterfaceConfigurations"] = ppf.ContainerNetworkInterfaceConfigurations
18800	}
18801	return json.Marshal(objectMap)
18802}
18803
18804// ProfilesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
18805// operation.
18806type ProfilesDeleteFuture struct {
18807	azure.FutureAPI
18808	// Result returns the result of the asynchronous operation.
18809	// If the operation has not completed it will return an error.
18810	Result func(ProfilesClient) (autorest.Response, error)
18811}
18812
18813// ProtocolConfiguration configuration of the protocol.
18814type ProtocolConfiguration struct {
18815	// HTTPConfiguration - HTTP configuration of the connectivity check.
18816	HTTPConfiguration *HTTPConfiguration `json:"HTTPConfiguration,omitempty"`
18817}
18818
18819// ProtocolCustomSettingsFormat dDoS custom policy properties.
18820type ProtocolCustomSettingsFormat struct {
18821	// Protocol - The protocol for which the DDoS protection policy is being customized. Possible values include: 'DdosCustomPolicyProtocolTCP', 'DdosCustomPolicyProtocolUDP', 'DdosCustomPolicyProtocolSyn'
18822	Protocol DdosCustomPolicyProtocol `json:"protocol,omitempty"`
18823	// TriggerRateOverride - The customized DDoS protection trigger rate.
18824	TriggerRateOverride *string `json:"triggerRateOverride,omitempty"`
18825	// SourceRateOverride - The customized DDoS protection source rate.
18826	SourceRateOverride *string `json:"sourceRateOverride,omitempty"`
18827	// TriggerSensitivityOverride - The customized DDoS protection trigger rate sensitivity degrees. High: Trigger rate set with most sensitivity w.r.t. normal traffic. Default: Trigger rate set with moderate sensitivity w.r.t. normal traffic. Low: Trigger rate set with less sensitivity w.r.t. normal traffic. Relaxed: Trigger rate set with least sensitivity w.r.t. normal traffic. Possible values include: 'Relaxed', 'Low', 'Default', 'High'
18828	TriggerSensitivityOverride DdosCustomPolicyTriggerSensitivityOverride `json:"triggerSensitivityOverride,omitempty"`
18829}
18830
18831// PublicIPAddress public IP address resource.
18832type PublicIPAddress struct {
18833	autorest.Response `json:"-"`
18834	// Sku - The public IP address SKU.
18835	Sku *PublicIPAddressSku `json:"sku,omitempty"`
18836	// PublicIPAddressPropertiesFormat - Public IP address properties.
18837	*PublicIPAddressPropertiesFormat `json:"properties,omitempty"`
18838	// Etag - A unique read-only string that changes whenever the resource is updated.
18839	Etag *string `json:"etag,omitempty"`
18840	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
18841	Zones *[]string `json:"zones,omitempty"`
18842	// ID - Resource ID.
18843	ID *string `json:"id,omitempty"`
18844	// Name - READ-ONLY; Resource name.
18845	Name *string `json:"name,omitempty"`
18846	// Type - READ-ONLY; Resource type.
18847	Type *string `json:"type,omitempty"`
18848	// Location - Resource location.
18849	Location *string `json:"location,omitempty"`
18850	// Tags - Resource tags.
18851	Tags map[string]*string `json:"tags"`
18852}
18853
18854// MarshalJSON is the custom marshaler for PublicIPAddress.
18855func (pia PublicIPAddress) MarshalJSON() ([]byte, error) {
18856	objectMap := make(map[string]interface{})
18857	if pia.Sku != nil {
18858		objectMap["sku"] = pia.Sku
18859	}
18860	if pia.PublicIPAddressPropertiesFormat != nil {
18861		objectMap["properties"] = pia.PublicIPAddressPropertiesFormat
18862	}
18863	if pia.Etag != nil {
18864		objectMap["etag"] = pia.Etag
18865	}
18866	if pia.Zones != nil {
18867		objectMap["zones"] = pia.Zones
18868	}
18869	if pia.ID != nil {
18870		objectMap["id"] = pia.ID
18871	}
18872	if pia.Location != nil {
18873		objectMap["location"] = pia.Location
18874	}
18875	if pia.Tags != nil {
18876		objectMap["tags"] = pia.Tags
18877	}
18878	return json.Marshal(objectMap)
18879}
18880
18881// UnmarshalJSON is the custom unmarshaler for PublicIPAddress struct.
18882func (pia *PublicIPAddress) UnmarshalJSON(body []byte) error {
18883	var m map[string]*json.RawMessage
18884	err := json.Unmarshal(body, &m)
18885	if err != nil {
18886		return err
18887	}
18888	for k, v := range m {
18889		switch k {
18890		case "sku":
18891			if v != nil {
18892				var sku PublicIPAddressSku
18893				err = json.Unmarshal(*v, &sku)
18894				if err != nil {
18895					return err
18896				}
18897				pia.Sku = &sku
18898			}
18899		case "properties":
18900			if v != nil {
18901				var publicIPAddressPropertiesFormat PublicIPAddressPropertiesFormat
18902				err = json.Unmarshal(*v, &publicIPAddressPropertiesFormat)
18903				if err != nil {
18904					return err
18905				}
18906				pia.PublicIPAddressPropertiesFormat = &publicIPAddressPropertiesFormat
18907			}
18908		case "etag":
18909			if v != nil {
18910				var etag string
18911				err = json.Unmarshal(*v, &etag)
18912				if err != nil {
18913					return err
18914				}
18915				pia.Etag = &etag
18916			}
18917		case "zones":
18918			if v != nil {
18919				var zones []string
18920				err = json.Unmarshal(*v, &zones)
18921				if err != nil {
18922					return err
18923				}
18924				pia.Zones = &zones
18925			}
18926		case "id":
18927			if v != nil {
18928				var ID string
18929				err = json.Unmarshal(*v, &ID)
18930				if err != nil {
18931					return err
18932				}
18933				pia.ID = &ID
18934			}
18935		case "name":
18936			if v != nil {
18937				var name string
18938				err = json.Unmarshal(*v, &name)
18939				if err != nil {
18940					return err
18941				}
18942				pia.Name = &name
18943			}
18944		case "type":
18945			if v != nil {
18946				var typeVar string
18947				err = json.Unmarshal(*v, &typeVar)
18948				if err != nil {
18949					return err
18950				}
18951				pia.Type = &typeVar
18952			}
18953		case "location":
18954			if v != nil {
18955				var location string
18956				err = json.Unmarshal(*v, &location)
18957				if err != nil {
18958					return err
18959				}
18960				pia.Location = &location
18961			}
18962		case "tags":
18963			if v != nil {
18964				var tags map[string]*string
18965				err = json.Unmarshal(*v, &tags)
18966				if err != nil {
18967					return err
18968				}
18969				pia.Tags = tags
18970			}
18971		}
18972	}
18973
18974	return nil
18975}
18976
18977// PublicIPAddressDNSSettings contains FQDN of the DNS record associated with the public IP address
18978type PublicIPAddressDNSSettings struct {
18979	// 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.
18980	DomainNameLabel *string `json:"domainNameLabel,omitempty"`
18981	// 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.
18982	Fqdn *string `json:"fqdn,omitempty"`
18983	// 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.
18984	ReverseFqdn *string `json:"reverseFqdn,omitempty"`
18985}
18986
18987// PublicIPAddressesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
18988// long-running operation.
18989type PublicIPAddressesCreateOrUpdateFuture struct {
18990	azure.FutureAPI
18991	// Result returns the result of the asynchronous operation.
18992	// If the operation has not completed it will return an error.
18993	Result func(PublicIPAddressesClient) (PublicIPAddress, error)
18994}
18995
18996// PublicIPAddressesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
18997// operation.
18998type PublicIPAddressesDeleteFuture struct {
18999	azure.FutureAPI
19000	// Result returns the result of the asynchronous operation.
19001	// If the operation has not completed it will return an error.
19002	Result func(PublicIPAddressesClient) (autorest.Response, error)
19003}
19004
19005// PublicIPAddressesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
19006// long-running operation.
19007type PublicIPAddressesUpdateTagsFuture struct {
19008	azure.FutureAPI
19009	// Result returns the result of the asynchronous operation.
19010	// If the operation has not completed it will return an error.
19011	Result func(PublicIPAddressesClient) (PublicIPAddress, error)
19012}
19013
19014// PublicIPAddressListResult response for ListPublicIpAddresses API service call.
19015type PublicIPAddressListResult struct {
19016	autorest.Response `json:"-"`
19017	// Value - A list of public IP addresses that exists in a resource group.
19018	Value *[]PublicIPAddress `json:"value,omitempty"`
19019	// NextLink - The URL to get the next set of results.
19020	NextLink *string `json:"nextLink,omitempty"`
19021}
19022
19023// PublicIPAddressListResultIterator provides access to a complete listing of PublicIPAddress values.
19024type PublicIPAddressListResultIterator struct {
19025	i    int
19026	page PublicIPAddressListResultPage
19027}
19028
19029// NextWithContext advances to the next value.  If there was an error making
19030// the request the iterator does not advance and the error is returned.
19031func (iter *PublicIPAddressListResultIterator) NextWithContext(ctx context.Context) (err error) {
19032	if tracing.IsEnabled() {
19033		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultIterator.NextWithContext")
19034		defer func() {
19035			sc := -1
19036			if iter.Response().Response.Response != nil {
19037				sc = iter.Response().Response.Response.StatusCode
19038			}
19039			tracing.EndSpan(ctx, sc, err)
19040		}()
19041	}
19042	iter.i++
19043	if iter.i < len(iter.page.Values()) {
19044		return nil
19045	}
19046	err = iter.page.NextWithContext(ctx)
19047	if err != nil {
19048		iter.i--
19049		return err
19050	}
19051	iter.i = 0
19052	return nil
19053}
19054
19055// Next advances to the next value.  If there was an error making
19056// the request the iterator does not advance and the error is returned.
19057// Deprecated: Use NextWithContext() instead.
19058func (iter *PublicIPAddressListResultIterator) Next() error {
19059	return iter.NextWithContext(context.Background())
19060}
19061
19062// NotDone returns true if the enumeration should be started or is not yet complete.
19063func (iter PublicIPAddressListResultIterator) NotDone() bool {
19064	return iter.page.NotDone() && iter.i < len(iter.page.Values())
19065}
19066
19067// Response returns the raw server response from the last page request.
19068func (iter PublicIPAddressListResultIterator) Response() PublicIPAddressListResult {
19069	return iter.page.Response()
19070}
19071
19072// Value returns the current value or a zero-initialized value if the
19073// iterator has advanced beyond the end of the collection.
19074func (iter PublicIPAddressListResultIterator) Value() PublicIPAddress {
19075	if !iter.page.NotDone() {
19076		return PublicIPAddress{}
19077	}
19078	return iter.page.Values()[iter.i]
19079}
19080
19081// Creates a new instance of the PublicIPAddressListResultIterator type.
19082func NewPublicIPAddressListResultIterator(page PublicIPAddressListResultPage) PublicIPAddressListResultIterator {
19083	return PublicIPAddressListResultIterator{page: page}
19084}
19085
19086// IsEmpty returns true if the ListResult contains no values.
19087func (pialr PublicIPAddressListResult) IsEmpty() bool {
19088	return pialr.Value == nil || len(*pialr.Value) == 0
19089}
19090
19091// hasNextLink returns true if the NextLink is not empty.
19092func (pialr PublicIPAddressListResult) hasNextLink() bool {
19093	return pialr.NextLink != nil && len(*pialr.NextLink) != 0
19094}
19095
19096// publicIPAddressListResultPreparer prepares a request to retrieve the next set of results.
19097// It returns nil if no more results exist.
19098func (pialr PublicIPAddressListResult) publicIPAddressListResultPreparer(ctx context.Context) (*http.Request, error) {
19099	if !pialr.hasNextLink() {
19100		return nil, nil
19101	}
19102	return autorest.Prepare((&http.Request{}).WithContext(ctx),
19103		autorest.AsJSON(),
19104		autorest.AsGet(),
19105		autorest.WithBaseURL(to.String(pialr.NextLink)))
19106}
19107
19108// PublicIPAddressListResultPage contains a page of PublicIPAddress values.
19109type PublicIPAddressListResultPage struct {
19110	fn    func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)
19111	pialr PublicIPAddressListResult
19112}
19113
19114// NextWithContext advances to the next page of values.  If there was an error making
19115// the request the page does not advance and the error is returned.
19116func (page *PublicIPAddressListResultPage) NextWithContext(ctx context.Context) (err error) {
19117	if tracing.IsEnabled() {
19118		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultPage.NextWithContext")
19119		defer func() {
19120			sc := -1
19121			if page.Response().Response.Response != nil {
19122				sc = page.Response().Response.Response.StatusCode
19123			}
19124			tracing.EndSpan(ctx, sc, err)
19125		}()
19126	}
19127	for {
19128		next, err := page.fn(ctx, page.pialr)
19129		if err != nil {
19130			return err
19131		}
19132		page.pialr = next
19133		if !next.hasNextLink() || !next.IsEmpty() {
19134			break
19135		}
19136	}
19137	return nil
19138}
19139
19140// Next advances to the next page of values.  If there was an error making
19141// the request the page does not advance and the error is returned.
19142// Deprecated: Use NextWithContext() instead.
19143func (page *PublicIPAddressListResultPage) Next() error {
19144	return page.NextWithContext(context.Background())
19145}
19146
19147// NotDone returns true if the page enumeration should be started or is not yet complete.
19148func (page PublicIPAddressListResultPage) NotDone() bool {
19149	return !page.pialr.IsEmpty()
19150}
19151
19152// Response returns the raw server response from the last page request.
19153func (page PublicIPAddressListResultPage) Response() PublicIPAddressListResult {
19154	return page.pialr
19155}
19156
19157// Values returns the slice of values for the current page or nil if there are no values.
19158func (page PublicIPAddressListResultPage) Values() []PublicIPAddress {
19159	if page.pialr.IsEmpty() {
19160		return nil
19161	}
19162	return *page.pialr.Value
19163}
19164
19165// Creates a new instance of the PublicIPAddressListResultPage type.
19166func NewPublicIPAddressListResultPage(cur PublicIPAddressListResult, getNextPage func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)) PublicIPAddressListResultPage {
19167	return PublicIPAddressListResultPage{
19168		fn:    getNextPage,
19169		pialr: cur,
19170	}
19171}
19172
19173// PublicIPAddressPropertiesFormat public IP address properties.
19174type PublicIPAddressPropertiesFormat struct {
19175	// PublicIPAllocationMethod - The public IP address allocation method. Possible values include: 'Static', 'Dynamic'
19176	PublicIPAllocationMethod IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"`
19177	// PublicIPAddressVersion - The public IP address version. Possible values include: 'IPv4', 'IPv6'
19178	PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"`
19179	// IPConfiguration - READ-ONLY; The IP configuration associated with the public IP address.
19180	IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"`
19181	// DNSSettings - The FQDN of the DNS record associated with the public IP address.
19182	DNSSettings *PublicIPAddressDNSSettings `json:"dnsSettings,omitempty"`
19183	// DdosSettings - The DDoS protection custom policy associated with the public IP address.
19184	DdosSettings *DdosSettings `json:"ddosSettings,omitempty"`
19185	// IPTags - The list of tags associated with the public IP address.
19186	IPTags *[]IPTag `json:"ipTags,omitempty"`
19187	// IPAddress - The IP address associated with the public IP address resource.
19188	IPAddress *string `json:"ipAddress,omitempty"`
19189	// PublicIPPrefix - The Public IP Prefix this Public IP Address should be allocated from.
19190	PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"`
19191	// IdleTimeoutInMinutes - The idle timeout of the public IP address.
19192	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
19193	// ResourceGUID - The resource GUID property of the public IP resource.
19194	ResourceGUID *string `json:"resourceGuid,omitempty"`
19195	// ProvisioningState - The provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
19196	ProvisioningState *string `json:"provisioningState,omitempty"`
19197}
19198
19199// MarshalJSON is the custom marshaler for PublicIPAddressPropertiesFormat.
19200func (piapf PublicIPAddressPropertiesFormat) MarshalJSON() ([]byte, error) {
19201	objectMap := make(map[string]interface{})
19202	if piapf.PublicIPAllocationMethod != "" {
19203		objectMap["publicIPAllocationMethod"] = piapf.PublicIPAllocationMethod
19204	}
19205	if piapf.PublicIPAddressVersion != "" {
19206		objectMap["publicIPAddressVersion"] = piapf.PublicIPAddressVersion
19207	}
19208	if piapf.DNSSettings != nil {
19209		objectMap["dnsSettings"] = piapf.DNSSettings
19210	}
19211	if piapf.DdosSettings != nil {
19212		objectMap["ddosSettings"] = piapf.DdosSettings
19213	}
19214	if piapf.IPTags != nil {
19215		objectMap["ipTags"] = piapf.IPTags
19216	}
19217	if piapf.IPAddress != nil {
19218		objectMap["ipAddress"] = piapf.IPAddress
19219	}
19220	if piapf.PublicIPPrefix != nil {
19221		objectMap["publicIPPrefix"] = piapf.PublicIPPrefix
19222	}
19223	if piapf.IdleTimeoutInMinutes != nil {
19224		objectMap["idleTimeoutInMinutes"] = piapf.IdleTimeoutInMinutes
19225	}
19226	if piapf.ResourceGUID != nil {
19227		objectMap["resourceGuid"] = piapf.ResourceGUID
19228	}
19229	if piapf.ProvisioningState != nil {
19230		objectMap["provisioningState"] = piapf.ProvisioningState
19231	}
19232	return json.Marshal(objectMap)
19233}
19234
19235// PublicIPAddressSku SKU of a public IP address
19236type PublicIPAddressSku struct {
19237	// Name - Name of a public IP address SKU. Possible values include: 'PublicIPAddressSkuNameBasic', 'PublicIPAddressSkuNameStandard'
19238	Name PublicIPAddressSkuName `json:"name,omitempty"`
19239}
19240
19241// PublicIPPrefix public IP prefix resource.
19242type PublicIPPrefix struct {
19243	autorest.Response `json:"-"`
19244	// Sku - The public IP prefix SKU.
19245	Sku *PublicIPPrefixSku `json:"sku,omitempty"`
19246	// PublicIPPrefixPropertiesFormat - Public IP prefix properties.
19247	*PublicIPPrefixPropertiesFormat `json:"properties,omitempty"`
19248	// Etag - A unique read-only string that changes whenever the resource is updated.
19249	Etag *string `json:"etag,omitempty"`
19250	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
19251	Zones *[]string `json:"zones,omitempty"`
19252	// ID - Resource ID.
19253	ID *string `json:"id,omitempty"`
19254	// Name - READ-ONLY; Resource name.
19255	Name *string `json:"name,omitempty"`
19256	// Type - READ-ONLY; Resource type.
19257	Type *string `json:"type,omitempty"`
19258	// Location - Resource location.
19259	Location *string `json:"location,omitempty"`
19260	// Tags - Resource tags.
19261	Tags map[string]*string `json:"tags"`
19262}
19263
19264// MarshalJSON is the custom marshaler for PublicIPPrefix.
19265func (pip PublicIPPrefix) MarshalJSON() ([]byte, error) {
19266	objectMap := make(map[string]interface{})
19267	if pip.Sku != nil {
19268		objectMap["sku"] = pip.Sku
19269	}
19270	if pip.PublicIPPrefixPropertiesFormat != nil {
19271		objectMap["properties"] = pip.PublicIPPrefixPropertiesFormat
19272	}
19273	if pip.Etag != nil {
19274		objectMap["etag"] = pip.Etag
19275	}
19276	if pip.Zones != nil {
19277		objectMap["zones"] = pip.Zones
19278	}
19279	if pip.ID != nil {
19280		objectMap["id"] = pip.ID
19281	}
19282	if pip.Location != nil {
19283		objectMap["location"] = pip.Location
19284	}
19285	if pip.Tags != nil {
19286		objectMap["tags"] = pip.Tags
19287	}
19288	return json.Marshal(objectMap)
19289}
19290
19291// UnmarshalJSON is the custom unmarshaler for PublicIPPrefix struct.
19292func (pip *PublicIPPrefix) UnmarshalJSON(body []byte) error {
19293	var m map[string]*json.RawMessage
19294	err := json.Unmarshal(body, &m)
19295	if err != nil {
19296		return err
19297	}
19298	for k, v := range m {
19299		switch k {
19300		case "sku":
19301			if v != nil {
19302				var sku PublicIPPrefixSku
19303				err = json.Unmarshal(*v, &sku)
19304				if err != nil {
19305					return err
19306				}
19307				pip.Sku = &sku
19308			}
19309		case "properties":
19310			if v != nil {
19311				var publicIPPrefixPropertiesFormat PublicIPPrefixPropertiesFormat
19312				err = json.Unmarshal(*v, &publicIPPrefixPropertiesFormat)
19313				if err != nil {
19314					return err
19315				}
19316				pip.PublicIPPrefixPropertiesFormat = &publicIPPrefixPropertiesFormat
19317			}
19318		case "etag":
19319			if v != nil {
19320				var etag string
19321				err = json.Unmarshal(*v, &etag)
19322				if err != nil {
19323					return err
19324				}
19325				pip.Etag = &etag
19326			}
19327		case "zones":
19328			if v != nil {
19329				var zones []string
19330				err = json.Unmarshal(*v, &zones)
19331				if err != nil {
19332					return err
19333				}
19334				pip.Zones = &zones
19335			}
19336		case "id":
19337			if v != nil {
19338				var ID string
19339				err = json.Unmarshal(*v, &ID)
19340				if err != nil {
19341					return err
19342				}
19343				pip.ID = &ID
19344			}
19345		case "name":
19346			if v != nil {
19347				var name string
19348				err = json.Unmarshal(*v, &name)
19349				if err != nil {
19350					return err
19351				}
19352				pip.Name = &name
19353			}
19354		case "type":
19355			if v != nil {
19356				var typeVar string
19357				err = json.Unmarshal(*v, &typeVar)
19358				if err != nil {
19359					return err
19360				}
19361				pip.Type = &typeVar
19362			}
19363		case "location":
19364			if v != nil {
19365				var location string
19366				err = json.Unmarshal(*v, &location)
19367				if err != nil {
19368					return err
19369				}
19370				pip.Location = &location
19371			}
19372		case "tags":
19373			if v != nil {
19374				var tags map[string]*string
19375				err = json.Unmarshal(*v, &tags)
19376				if err != nil {
19377					return err
19378				}
19379				pip.Tags = tags
19380			}
19381		}
19382	}
19383
19384	return nil
19385}
19386
19387// PublicIPPrefixesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
19388// long-running operation.
19389type PublicIPPrefixesCreateOrUpdateFuture struct {
19390	azure.FutureAPI
19391	// Result returns the result of the asynchronous operation.
19392	// If the operation has not completed it will return an error.
19393	Result func(PublicIPPrefixesClient) (PublicIPPrefix, error)
19394}
19395
19396// PublicIPPrefixesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
19397// operation.
19398type PublicIPPrefixesDeleteFuture struct {
19399	azure.FutureAPI
19400	// Result returns the result of the asynchronous operation.
19401	// If the operation has not completed it will return an error.
19402	Result func(PublicIPPrefixesClient) (autorest.Response, error)
19403}
19404
19405// PublicIPPrefixesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
19406// long-running operation.
19407type PublicIPPrefixesUpdateTagsFuture struct {
19408	azure.FutureAPI
19409	// Result returns the result of the asynchronous operation.
19410	// If the operation has not completed it will return an error.
19411	Result func(PublicIPPrefixesClient) (PublicIPPrefix, error)
19412}
19413
19414// PublicIPPrefixListResult response for ListPublicIpPrefixes API service call.
19415type PublicIPPrefixListResult struct {
19416	autorest.Response `json:"-"`
19417	// Value - A list of public IP prefixes that exists in a resource group.
19418	Value *[]PublicIPPrefix `json:"value,omitempty"`
19419	// NextLink - The URL to get the next set of results.
19420	NextLink *string `json:"nextLink,omitempty"`
19421}
19422
19423// PublicIPPrefixListResultIterator provides access to a complete listing of PublicIPPrefix values.
19424type PublicIPPrefixListResultIterator struct {
19425	i    int
19426	page PublicIPPrefixListResultPage
19427}
19428
19429// NextWithContext advances to the next value.  If there was an error making
19430// the request the iterator does not advance and the error is returned.
19431func (iter *PublicIPPrefixListResultIterator) NextWithContext(ctx context.Context) (err error) {
19432	if tracing.IsEnabled() {
19433		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixListResultIterator.NextWithContext")
19434		defer func() {
19435			sc := -1
19436			if iter.Response().Response.Response != nil {
19437				sc = iter.Response().Response.Response.StatusCode
19438			}
19439			tracing.EndSpan(ctx, sc, err)
19440		}()
19441	}
19442	iter.i++
19443	if iter.i < len(iter.page.Values()) {
19444		return nil
19445	}
19446	err = iter.page.NextWithContext(ctx)
19447	if err != nil {
19448		iter.i--
19449		return err
19450	}
19451	iter.i = 0
19452	return nil
19453}
19454
19455// Next advances to the next value.  If there was an error making
19456// the request the iterator does not advance and the error is returned.
19457// Deprecated: Use NextWithContext() instead.
19458func (iter *PublicIPPrefixListResultIterator) Next() error {
19459	return iter.NextWithContext(context.Background())
19460}
19461
19462// NotDone returns true if the enumeration should be started or is not yet complete.
19463func (iter PublicIPPrefixListResultIterator) NotDone() bool {
19464	return iter.page.NotDone() && iter.i < len(iter.page.Values())
19465}
19466
19467// Response returns the raw server response from the last page request.
19468func (iter PublicIPPrefixListResultIterator) Response() PublicIPPrefixListResult {
19469	return iter.page.Response()
19470}
19471
19472// Value returns the current value or a zero-initialized value if the
19473// iterator has advanced beyond the end of the collection.
19474func (iter PublicIPPrefixListResultIterator) Value() PublicIPPrefix {
19475	if !iter.page.NotDone() {
19476		return PublicIPPrefix{}
19477	}
19478	return iter.page.Values()[iter.i]
19479}
19480
19481// Creates a new instance of the PublicIPPrefixListResultIterator type.
19482func NewPublicIPPrefixListResultIterator(page PublicIPPrefixListResultPage) PublicIPPrefixListResultIterator {
19483	return PublicIPPrefixListResultIterator{page: page}
19484}
19485
19486// IsEmpty returns true if the ListResult contains no values.
19487func (piplr PublicIPPrefixListResult) IsEmpty() bool {
19488	return piplr.Value == nil || len(*piplr.Value) == 0
19489}
19490
19491// hasNextLink returns true if the NextLink is not empty.
19492func (piplr PublicIPPrefixListResult) hasNextLink() bool {
19493	return piplr.NextLink != nil && len(*piplr.NextLink) != 0
19494}
19495
19496// publicIPPrefixListResultPreparer prepares a request to retrieve the next set of results.
19497// It returns nil if no more results exist.
19498func (piplr PublicIPPrefixListResult) publicIPPrefixListResultPreparer(ctx context.Context) (*http.Request, error) {
19499	if !piplr.hasNextLink() {
19500		return nil, nil
19501	}
19502	return autorest.Prepare((&http.Request{}).WithContext(ctx),
19503		autorest.AsJSON(),
19504		autorest.AsGet(),
19505		autorest.WithBaseURL(to.String(piplr.NextLink)))
19506}
19507
19508// PublicIPPrefixListResultPage contains a page of PublicIPPrefix values.
19509type PublicIPPrefixListResultPage struct {
19510	fn    func(context.Context, PublicIPPrefixListResult) (PublicIPPrefixListResult, error)
19511	piplr PublicIPPrefixListResult
19512}
19513
19514// NextWithContext advances to the next page of values.  If there was an error making
19515// the request the page does not advance and the error is returned.
19516func (page *PublicIPPrefixListResultPage) NextWithContext(ctx context.Context) (err error) {
19517	if tracing.IsEnabled() {
19518		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixListResultPage.NextWithContext")
19519		defer func() {
19520			sc := -1
19521			if page.Response().Response.Response != nil {
19522				sc = page.Response().Response.Response.StatusCode
19523			}
19524			tracing.EndSpan(ctx, sc, err)
19525		}()
19526	}
19527	for {
19528		next, err := page.fn(ctx, page.piplr)
19529		if err != nil {
19530			return err
19531		}
19532		page.piplr = next
19533		if !next.hasNextLink() || !next.IsEmpty() {
19534			break
19535		}
19536	}
19537	return nil
19538}
19539
19540// Next advances to the next page of values.  If there was an error making
19541// the request the page does not advance and the error is returned.
19542// Deprecated: Use NextWithContext() instead.
19543func (page *PublicIPPrefixListResultPage) Next() error {
19544	return page.NextWithContext(context.Background())
19545}
19546
19547// NotDone returns true if the page enumeration should be started or is not yet complete.
19548func (page PublicIPPrefixListResultPage) NotDone() bool {
19549	return !page.piplr.IsEmpty()
19550}
19551
19552// Response returns the raw server response from the last page request.
19553func (page PublicIPPrefixListResultPage) Response() PublicIPPrefixListResult {
19554	return page.piplr
19555}
19556
19557// Values returns the slice of values for the current page or nil if there are no values.
19558func (page PublicIPPrefixListResultPage) Values() []PublicIPPrefix {
19559	if page.piplr.IsEmpty() {
19560		return nil
19561	}
19562	return *page.piplr.Value
19563}
19564
19565// Creates a new instance of the PublicIPPrefixListResultPage type.
19566func NewPublicIPPrefixListResultPage(cur PublicIPPrefixListResult, getNextPage func(context.Context, PublicIPPrefixListResult) (PublicIPPrefixListResult, error)) PublicIPPrefixListResultPage {
19567	return PublicIPPrefixListResultPage{
19568		fn:    getNextPage,
19569		piplr: cur,
19570	}
19571}
19572
19573// PublicIPPrefixPropertiesFormat public IP prefix properties.
19574type PublicIPPrefixPropertiesFormat struct {
19575	// PublicIPAddressVersion - The public IP address version. Possible values include: 'IPv4', 'IPv6'
19576	PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"`
19577	// IPTags - The list of tags associated with the public IP prefix.
19578	IPTags *[]IPTag `json:"ipTags,omitempty"`
19579	// PrefixLength - The Length of the Public IP Prefix.
19580	PrefixLength *int32 `json:"prefixLength,omitempty"`
19581	// IPPrefix - The allocated Prefix.
19582	IPPrefix *string `json:"ipPrefix,omitempty"`
19583	// PublicIPAddresses - The list of all referenced PublicIPAddresses.
19584	PublicIPAddresses *[]ReferencedPublicIPAddress `json:"publicIPAddresses,omitempty"`
19585	// LoadBalancerFrontendIPConfiguration - READ-ONLY; The reference to load balancer frontend IP configuration associated with the public IP prefix.
19586	LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIpConfiguration,omitempty"`
19587	// ResourceGUID - The resource GUID property of the public IP prefix resource.
19588	ResourceGUID *string `json:"resourceGuid,omitempty"`
19589	// ProvisioningState - The provisioning state of the Public IP prefix resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
19590	ProvisioningState *string `json:"provisioningState,omitempty"`
19591}
19592
19593// MarshalJSON is the custom marshaler for PublicIPPrefixPropertiesFormat.
19594func (pippf PublicIPPrefixPropertiesFormat) MarshalJSON() ([]byte, error) {
19595	objectMap := make(map[string]interface{})
19596	if pippf.PublicIPAddressVersion != "" {
19597		objectMap["publicIPAddressVersion"] = pippf.PublicIPAddressVersion
19598	}
19599	if pippf.IPTags != nil {
19600		objectMap["ipTags"] = pippf.IPTags
19601	}
19602	if pippf.PrefixLength != nil {
19603		objectMap["prefixLength"] = pippf.PrefixLength
19604	}
19605	if pippf.IPPrefix != nil {
19606		objectMap["ipPrefix"] = pippf.IPPrefix
19607	}
19608	if pippf.PublicIPAddresses != nil {
19609		objectMap["publicIPAddresses"] = pippf.PublicIPAddresses
19610	}
19611	if pippf.ResourceGUID != nil {
19612		objectMap["resourceGuid"] = pippf.ResourceGUID
19613	}
19614	if pippf.ProvisioningState != nil {
19615		objectMap["provisioningState"] = pippf.ProvisioningState
19616	}
19617	return json.Marshal(objectMap)
19618}
19619
19620// PublicIPPrefixSku SKU of a public IP prefix.
19621type PublicIPPrefixSku struct {
19622	// Name - Name of a public IP prefix SKU. Possible values include: 'PublicIPPrefixSkuNameStandard'
19623	Name PublicIPPrefixSkuName `json:"name,omitempty"`
19624}
19625
19626// QueryTroubleshootingParameters parameters that define the resource to query the troubleshooting result.
19627type QueryTroubleshootingParameters struct {
19628	// TargetResourceID - The target resource ID to query the troubleshooting result.
19629	TargetResourceID *string `json:"targetResourceId,omitempty"`
19630}
19631
19632// ReferencedPublicIPAddress reference to a public IP address.
19633type ReferencedPublicIPAddress struct {
19634	// ID - The PublicIPAddress Reference.
19635	ID *string `json:"id,omitempty"`
19636}
19637
19638// Resource common resource representation.
19639type Resource struct {
19640	// ID - Resource ID.
19641	ID *string `json:"id,omitempty"`
19642	// Name - READ-ONLY; Resource name.
19643	Name *string `json:"name,omitempty"`
19644	// Type - READ-ONLY; Resource type.
19645	Type *string `json:"type,omitempty"`
19646	// Location - Resource location.
19647	Location *string `json:"location,omitempty"`
19648	// Tags - Resource tags.
19649	Tags map[string]*string `json:"tags"`
19650}
19651
19652// MarshalJSON is the custom marshaler for Resource.
19653func (r Resource) MarshalJSON() ([]byte, error) {
19654	objectMap := make(map[string]interface{})
19655	if r.ID != nil {
19656		objectMap["id"] = r.ID
19657	}
19658	if r.Location != nil {
19659		objectMap["location"] = r.Location
19660	}
19661	if r.Tags != nil {
19662		objectMap["tags"] = r.Tags
19663	}
19664	return json.Marshal(objectMap)
19665}
19666
19667// ResourceNavigationLink resourceNavigationLink resource.
19668type ResourceNavigationLink struct {
19669	// ResourceNavigationLinkFormat - Resource navigation link properties format.
19670	*ResourceNavigationLinkFormat `json:"properties,omitempty"`
19671	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
19672	Name *string `json:"name,omitempty"`
19673	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
19674	Etag *string `json:"etag,omitempty"`
19675	// ID - Resource ID.
19676	ID *string `json:"id,omitempty"`
19677}
19678
19679// MarshalJSON is the custom marshaler for ResourceNavigationLink.
19680func (rnl ResourceNavigationLink) MarshalJSON() ([]byte, error) {
19681	objectMap := make(map[string]interface{})
19682	if rnl.ResourceNavigationLinkFormat != nil {
19683		objectMap["properties"] = rnl.ResourceNavigationLinkFormat
19684	}
19685	if rnl.Name != nil {
19686		objectMap["name"] = rnl.Name
19687	}
19688	if rnl.ID != nil {
19689		objectMap["id"] = rnl.ID
19690	}
19691	return json.Marshal(objectMap)
19692}
19693
19694// UnmarshalJSON is the custom unmarshaler for ResourceNavigationLink struct.
19695func (rnl *ResourceNavigationLink) UnmarshalJSON(body []byte) error {
19696	var m map[string]*json.RawMessage
19697	err := json.Unmarshal(body, &m)
19698	if err != nil {
19699		return err
19700	}
19701	for k, v := range m {
19702		switch k {
19703		case "properties":
19704			if v != nil {
19705				var resourceNavigationLinkFormat ResourceNavigationLinkFormat
19706				err = json.Unmarshal(*v, &resourceNavigationLinkFormat)
19707				if err != nil {
19708					return err
19709				}
19710				rnl.ResourceNavigationLinkFormat = &resourceNavigationLinkFormat
19711			}
19712		case "name":
19713			if v != nil {
19714				var name string
19715				err = json.Unmarshal(*v, &name)
19716				if err != nil {
19717					return err
19718				}
19719				rnl.Name = &name
19720			}
19721		case "etag":
19722			if v != nil {
19723				var etag string
19724				err = json.Unmarshal(*v, &etag)
19725				if err != nil {
19726					return err
19727				}
19728				rnl.Etag = &etag
19729			}
19730		case "id":
19731			if v != nil {
19732				var ID string
19733				err = json.Unmarshal(*v, &ID)
19734				if err != nil {
19735					return err
19736				}
19737				rnl.ID = &ID
19738			}
19739		}
19740	}
19741
19742	return nil
19743}
19744
19745// ResourceNavigationLinkFormat properties of ResourceNavigationLink.
19746type ResourceNavigationLinkFormat struct {
19747	// LinkedResourceType - Resource type of the linked resource.
19748	LinkedResourceType *string `json:"linkedResourceType,omitempty"`
19749	// Link - Link to the external resource
19750	Link *string `json:"link,omitempty"`
19751	// ProvisioningState - READ-ONLY; Provisioning state of the ResourceNavigationLink resource.
19752	ProvisioningState *string `json:"provisioningState,omitempty"`
19753}
19754
19755// MarshalJSON is the custom marshaler for ResourceNavigationLinkFormat.
19756func (rnlf ResourceNavigationLinkFormat) MarshalJSON() ([]byte, error) {
19757	objectMap := make(map[string]interface{})
19758	if rnlf.LinkedResourceType != nil {
19759		objectMap["linkedResourceType"] = rnlf.LinkedResourceType
19760	}
19761	if rnlf.Link != nil {
19762		objectMap["link"] = rnlf.Link
19763	}
19764	return json.Marshal(objectMap)
19765}
19766
19767// ResourceNavigationLinksListResult response for ResourceNavigationLinks_Get operation.
19768type ResourceNavigationLinksListResult struct {
19769	autorest.Response `json:"-"`
19770	// Value - The resource navigation links in a subnet.
19771	Value *[]ResourceNavigationLink `json:"value,omitempty"`
19772	// NextLink - The URL to get the next set of results.
19773	NextLink *string `json:"nextLink,omitempty"`
19774}
19775
19776// RetentionPolicyParameters parameters that define the retention policy for flow log.
19777type RetentionPolicyParameters struct {
19778	// Days - Number of days to retain flow log records.
19779	Days *int32 `json:"days,omitempty"`
19780	// Enabled - Flag to enable/disable retention.
19781	Enabled *bool `json:"enabled,omitempty"`
19782}
19783
19784// Route route resource
19785type Route struct {
19786	autorest.Response `json:"-"`
19787	// RoutePropertiesFormat - Properties of the route.
19788	*RoutePropertiesFormat `json:"properties,omitempty"`
19789	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
19790	Name *string `json:"name,omitempty"`
19791	// Etag - A unique read-only string that changes whenever the resource is updated.
19792	Etag *string `json:"etag,omitempty"`
19793	// ID - Resource ID.
19794	ID *string `json:"id,omitempty"`
19795}
19796
19797// MarshalJSON is the custom marshaler for Route.
19798func (r Route) MarshalJSON() ([]byte, error) {
19799	objectMap := make(map[string]interface{})
19800	if r.RoutePropertiesFormat != nil {
19801		objectMap["properties"] = r.RoutePropertiesFormat
19802	}
19803	if r.Name != nil {
19804		objectMap["name"] = r.Name
19805	}
19806	if r.Etag != nil {
19807		objectMap["etag"] = r.Etag
19808	}
19809	if r.ID != nil {
19810		objectMap["id"] = r.ID
19811	}
19812	return json.Marshal(objectMap)
19813}
19814
19815// UnmarshalJSON is the custom unmarshaler for Route struct.
19816func (r *Route) UnmarshalJSON(body []byte) error {
19817	var m map[string]*json.RawMessage
19818	err := json.Unmarshal(body, &m)
19819	if err != nil {
19820		return err
19821	}
19822	for k, v := range m {
19823		switch k {
19824		case "properties":
19825			if v != nil {
19826				var routePropertiesFormat RoutePropertiesFormat
19827				err = json.Unmarshal(*v, &routePropertiesFormat)
19828				if err != nil {
19829					return err
19830				}
19831				r.RoutePropertiesFormat = &routePropertiesFormat
19832			}
19833		case "name":
19834			if v != nil {
19835				var name string
19836				err = json.Unmarshal(*v, &name)
19837				if err != nil {
19838					return err
19839				}
19840				r.Name = &name
19841			}
19842		case "etag":
19843			if v != nil {
19844				var etag string
19845				err = json.Unmarshal(*v, &etag)
19846				if err != nil {
19847					return err
19848				}
19849				r.Etag = &etag
19850			}
19851		case "id":
19852			if v != nil {
19853				var ID string
19854				err = json.Unmarshal(*v, &ID)
19855				if err != nil {
19856					return err
19857				}
19858				r.ID = &ID
19859			}
19860		}
19861	}
19862
19863	return nil
19864}
19865
19866// RouteFilter route Filter Resource.
19867type RouteFilter struct {
19868	autorest.Response `json:"-"`
19869	// RouteFilterPropertiesFormat - Properties of the route filter.
19870	*RouteFilterPropertiesFormat `json:"properties,omitempty"`
19871	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
19872	Etag *string `json:"etag,omitempty"`
19873	// ID - Resource ID.
19874	ID *string `json:"id,omitempty"`
19875	// Name - READ-ONLY; Resource name.
19876	Name *string `json:"name,omitempty"`
19877	// Type - READ-ONLY; Resource type.
19878	Type *string `json:"type,omitempty"`
19879	// Location - Resource location.
19880	Location *string `json:"location,omitempty"`
19881	// Tags - Resource tags.
19882	Tags map[string]*string `json:"tags"`
19883}
19884
19885// MarshalJSON is the custom marshaler for RouteFilter.
19886func (rf RouteFilter) MarshalJSON() ([]byte, error) {
19887	objectMap := make(map[string]interface{})
19888	if rf.RouteFilterPropertiesFormat != nil {
19889		objectMap["properties"] = rf.RouteFilterPropertiesFormat
19890	}
19891	if rf.ID != nil {
19892		objectMap["id"] = rf.ID
19893	}
19894	if rf.Location != nil {
19895		objectMap["location"] = rf.Location
19896	}
19897	if rf.Tags != nil {
19898		objectMap["tags"] = rf.Tags
19899	}
19900	return json.Marshal(objectMap)
19901}
19902
19903// UnmarshalJSON is the custom unmarshaler for RouteFilter struct.
19904func (rf *RouteFilter) UnmarshalJSON(body []byte) error {
19905	var m map[string]*json.RawMessage
19906	err := json.Unmarshal(body, &m)
19907	if err != nil {
19908		return err
19909	}
19910	for k, v := range m {
19911		switch k {
19912		case "properties":
19913			if v != nil {
19914				var routeFilterPropertiesFormat RouteFilterPropertiesFormat
19915				err = json.Unmarshal(*v, &routeFilterPropertiesFormat)
19916				if err != nil {
19917					return err
19918				}
19919				rf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat
19920			}
19921		case "etag":
19922			if v != nil {
19923				var etag string
19924				err = json.Unmarshal(*v, &etag)
19925				if err != nil {
19926					return err
19927				}
19928				rf.Etag = &etag
19929			}
19930		case "id":
19931			if v != nil {
19932				var ID string
19933				err = json.Unmarshal(*v, &ID)
19934				if err != nil {
19935					return err
19936				}
19937				rf.ID = &ID
19938			}
19939		case "name":
19940			if v != nil {
19941				var name string
19942				err = json.Unmarshal(*v, &name)
19943				if err != nil {
19944					return err
19945				}
19946				rf.Name = &name
19947			}
19948		case "type":
19949			if v != nil {
19950				var typeVar string
19951				err = json.Unmarshal(*v, &typeVar)
19952				if err != nil {
19953					return err
19954				}
19955				rf.Type = &typeVar
19956			}
19957		case "location":
19958			if v != nil {
19959				var location string
19960				err = json.Unmarshal(*v, &location)
19961				if err != nil {
19962					return err
19963				}
19964				rf.Location = &location
19965			}
19966		case "tags":
19967			if v != nil {
19968				var tags map[string]*string
19969				err = json.Unmarshal(*v, &tags)
19970				if err != nil {
19971					return err
19972				}
19973				rf.Tags = tags
19974			}
19975		}
19976	}
19977
19978	return nil
19979}
19980
19981// RouteFilterListResult response for the ListRouteFilters API service call.
19982type RouteFilterListResult struct {
19983	autorest.Response `json:"-"`
19984	// Value - Gets a list of route filters in a resource group.
19985	Value *[]RouteFilter `json:"value,omitempty"`
19986	// NextLink - The URL to get the next set of results.
19987	NextLink *string `json:"nextLink,omitempty"`
19988}
19989
19990// RouteFilterListResultIterator provides access to a complete listing of RouteFilter values.
19991type RouteFilterListResultIterator struct {
19992	i    int
19993	page RouteFilterListResultPage
19994}
19995
19996// NextWithContext advances to the next value.  If there was an error making
19997// the request the iterator does not advance and the error is returned.
19998func (iter *RouteFilterListResultIterator) NextWithContext(ctx context.Context) (err error) {
19999	if tracing.IsEnabled() {
20000		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultIterator.NextWithContext")
20001		defer func() {
20002			sc := -1
20003			if iter.Response().Response.Response != nil {
20004				sc = iter.Response().Response.Response.StatusCode
20005			}
20006			tracing.EndSpan(ctx, sc, err)
20007		}()
20008	}
20009	iter.i++
20010	if iter.i < len(iter.page.Values()) {
20011		return nil
20012	}
20013	err = iter.page.NextWithContext(ctx)
20014	if err != nil {
20015		iter.i--
20016		return err
20017	}
20018	iter.i = 0
20019	return nil
20020}
20021
20022// Next advances to the next value.  If there was an error making
20023// the request the iterator does not advance and the error is returned.
20024// Deprecated: Use NextWithContext() instead.
20025func (iter *RouteFilterListResultIterator) Next() error {
20026	return iter.NextWithContext(context.Background())
20027}
20028
20029// NotDone returns true if the enumeration should be started or is not yet complete.
20030func (iter RouteFilterListResultIterator) NotDone() bool {
20031	return iter.page.NotDone() && iter.i < len(iter.page.Values())
20032}
20033
20034// Response returns the raw server response from the last page request.
20035func (iter RouteFilterListResultIterator) Response() RouteFilterListResult {
20036	return iter.page.Response()
20037}
20038
20039// Value returns the current value or a zero-initialized value if the
20040// iterator has advanced beyond the end of the collection.
20041func (iter RouteFilterListResultIterator) Value() RouteFilter {
20042	if !iter.page.NotDone() {
20043		return RouteFilter{}
20044	}
20045	return iter.page.Values()[iter.i]
20046}
20047
20048// Creates a new instance of the RouteFilterListResultIterator type.
20049func NewRouteFilterListResultIterator(page RouteFilterListResultPage) RouteFilterListResultIterator {
20050	return RouteFilterListResultIterator{page: page}
20051}
20052
20053// IsEmpty returns true if the ListResult contains no values.
20054func (rflr RouteFilterListResult) IsEmpty() bool {
20055	return rflr.Value == nil || len(*rflr.Value) == 0
20056}
20057
20058// hasNextLink returns true if the NextLink is not empty.
20059func (rflr RouteFilterListResult) hasNextLink() bool {
20060	return rflr.NextLink != nil && len(*rflr.NextLink) != 0
20061}
20062
20063// routeFilterListResultPreparer prepares a request to retrieve the next set of results.
20064// It returns nil if no more results exist.
20065func (rflr RouteFilterListResult) routeFilterListResultPreparer(ctx context.Context) (*http.Request, error) {
20066	if !rflr.hasNextLink() {
20067		return nil, nil
20068	}
20069	return autorest.Prepare((&http.Request{}).WithContext(ctx),
20070		autorest.AsJSON(),
20071		autorest.AsGet(),
20072		autorest.WithBaseURL(to.String(rflr.NextLink)))
20073}
20074
20075// RouteFilterListResultPage contains a page of RouteFilter values.
20076type RouteFilterListResultPage struct {
20077	fn   func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)
20078	rflr RouteFilterListResult
20079}
20080
20081// NextWithContext advances to the next page of values.  If there was an error making
20082// the request the page does not advance and the error is returned.
20083func (page *RouteFilterListResultPage) NextWithContext(ctx context.Context) (err error) {
20084	if tracing.IsEnabled() {
20085		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultPage.NextWithContext")
20086		defer func() {
20087			sc := -1
20088			if page.Response().Response.Response != nil {
20089				sc = page.Response().Response.Response.StatusCode
20090			}
20091			tracing.EndSpan(ctx, sc, err)
20092		}()
20093	}
20094	for {
20095		next, err := page.fn(ctx, page.rflr)
20096		if err != nil {
20097			return err
20098		}
20099		page.rflr = next
20100		if !next.hasNextLink() || !next.IsEmpty() {
20101			break
20102		}
20103	}
20104	return nil
20105}
20106
20107// Next advances to the next page of values.  If there was an error making
20108// the request the page does not advance and the error is returned.
20109// Deprecated: Use NextWithContext() instead.
20110func (page *RouteFilterListResultPage) Next() error {
20111	return page.NextWithContext(context.Background())
20112}
20113
20114// NotDone returns true if the page enumeration should be started or is not yet complete.
20115func (page RouteFilterListResultPage) NotDone() bool {
20116	return !page.rflr.IsEmpty()
20117}
20118
20119// Response returns the raw server response from the last page request.
20120func (page RouteFilterListResultPage) Response() RouteFilterListResult {
20121	return page.rflr
20122}
20123
20124// Values returns the slice of values for the current page or nil if there are no values.
20125func (page RouteFilterListResultPage) Values() []RouteFilter {
20126	if page.rflr.IsEmpty() {
20127		return nil
20128	}
20129	return *page.rflr.Value
20130}
20131
20132// Creates a new instance of the RouteFilterListResultPage type.
20133func NewRouteFilterListResultPage(cur RouteFilterListResult, getNextPage func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)) RouteFilterListResultPage {
20134	return RouteFilterListResultPage{
20135		fn:   getNextPage,
20136		rflr: cur,
20137	}
20138}
20139
20140// RouteFilterPropertiesFormat route Filter Resource
20141type RouteFilterPropertiesFormat struct {
20142	// Rules - Collection of RouteFilterRules contained within a route filter.
20143	Rules *[]RouteFilterRule `json:"rules,omitempty"`
20144	// Peerings - A collection of references to express route circuit peerings.
20145	Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"`
20146	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', 'Succeeded' and 'Failed'.
20147	ProvisioningState *string `json:"provisioningState,omitempty"`
20148}
20149
20150// MarshalJSON is the custom marshaler for RouteFilterPropertiesFormat.
20151func (rfpf RouteFilterPropertiesFormat) MarshalJSON() ([]byte, error) {
20152	objectMap := make(map[string]interface{})
20153	if rfpf.Rules != nil {
20154		objectMap["rules"] = rfpf.Rules
20155	}
20156	if rfpf.Peerings != nil {
20157		objectMap["peerings"] = rfpf.Peerings
20158	}
20159	return json.Marshal(objectMap)
20160}
20161
20162// RouteFilterRule route Filter Rule Resource
20163type RouteFilterRule struct {
20164	autorest.Response `json:"-"`
20165	// RouteFilterRulePropertiesFormat - Properties of the route filter rule.
20166	*RouteFilterRulePropertiesFormat `json:"properties,omitempty"`
20167	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
20168	Name *string `json:"name,omitempty"`
20169	// Location - Resource location.
20170	Location *string `json:"location,omitempty"`
20171	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
20172	Etag *string `json:"etag,omitempty"`
20173	// ID - Resource ID.
20174	ID *string `json:"id,omitempty"`
20175}
20176
20177// MarshalJSON is the custom marshaler for RouteFilterRule.
20178func (rfr RouteFilterRule) MarshalJSON() ([]byte, error) {
20179	objectMap := make(map[string]interface{})
20180	if rfr.RouteFilterRulePropertiesFormat != nil {
20181		objectMap["properties"] = rfr.RouteFilterRulePropertiesFormat
20182	}
20183	if rfr.Name != nil {
20184		objectMap["name"] = rfr.Name
20185	}
20186	if rfr.Location != nil {
20187		objectMap["location"] = rfr.Location
20188	}
20189	if rfr.ID != nil {
20190		objectMap["id"] = rfr.ID
20191	}
20192	return json.Marshal(objectMap)
20193}
20194
20195// UnmarshalJSON is the custom unmarshaler for RouteFilterRule struct.
20196func (rfr *RouteFilterRule) UnmarshalJSON(body []byte) error {
20197	var m map[string]*json.RawMessage
20198	err := json.Unmarshal(body, &m)
20199	if err != nil {
20200		return err
20201	}
20202	for k, v := range m {
20203		switch k {
20204		case "properties":
20205			if v != nil {
20206				var routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat
20207				err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat)
20208				if err != nil {
20209					return err
20210				}
20211				rfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat
20212			}
20213		case "name":
20214			if v != nil {
20215				var name string
20216				err = json.Unmarshal(*v, &name)
20217				if err != nil {
20218					return err
20219				}
20220				rfr.Name = &name
20221			}
20222		case "location":
20223			if v != nil {
20224				var location string
20225				err = json.Unmarshal(*v, &location)
20226				if err != nil {
20227					return err
20228				}
20229				rfr.Location = &location
20230			}
20231		case "etag":
20232			if v != nil {
20233				var etag string
20234				err = json.Unmarshal(*v, &etag)
20235				if err != nil {
20236					return err
20237				}
20238				rfr.Etag = &etag
20239			}
20240		case "id":
20241			if v != nil {
20242				var ID string
20243				err = json.Unmarshal(*v, &ID)
20244				if err != nil {
20245					return err
20246				}
20247				rfr.ID = &ID
20248			}
20249		}
20250	}
20251
20252	return nil
20253}
20254
20255// RouteFilterRuleListResult response for the ListRouteFilterRules API service call
20256type RouteFilterRuleListResult struct {
20257	autorest.Response `json:"-"`
20258	// Value - Gets a list of RouteFilterRules in a resource group.
20259	Value *[]RouteFilterRule `json:"value,omitempty"`
20260	// NextLink - The URL to get the next set of results.
20261	NextLink *string `json:"nextLink,omitempty"`
20262}
20263
20264// RouteFilterRuleListResultIterator provides access to a complete listing of RouteFilterRule values.
20265type RouteFilterRuleListResultIterator struct {
20266	i    int
20267	page RouteFilterRuleListResultPage
20268}
20269
20270// NextWithContext advances to the next value.  If there was an error making
20271// the request the iterator does not advance and the error is returned.
20272func (iter *RouteFilterRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
20273	if tracing.IsEnabled() {
20274		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultIterator.NextWithContext")
20275		defer func() {
20276			sc := -1
20277			if iter.Response().Response.Response != nil {
20278				sc = iter.Response().Response.Response.StatusCode
20279			}
20280			tracing.EndSpan(ctx, sc, err)
20281		}()
20282	}
20283	iter.i++
20284	if iter.i < len(iter.page.Values()) {
20285		return nil
20286	}
20287	err = iter.page.NextWithContext(ctx)
20288	if err != nil {
20289		iter.i--
20290		return err
20291	}
20292	iter.i = 0
20293	return nil
20294}
20295
20296// Next advances to the next value.  If there was an error making
20297// the request the iterator does not advance and the error is returned.
20298// Deprecated: Use NextWithContext() instead.
20299func (iter *RouteFilterRuleListResultIterator) Next() error {
20300	return iter.NextWithContext(context.Background())
20301}
20302
20303// NotDone returns true if the enumeration should be started or is not yet complete.
20304func (iter RouteFilterRuleListResultIterator) NotDone() bool {
20305	return iter.page.NotDone() && iter.i < len(iter.page.Values())
20306}
20307
20308// Response returns the raw server response from the last page request.
20309func (iter RouteFilterRuleListResultIterator) Response() RouteFilterRuleListResult {
20310	return iter.page.Response()
20311}
20312
20313// Value returns the current value or a zero-initialized value if the
20314// iterator has advanced beyond the end of the collection.
20315func (iter RouteFilterRuleListResultIterator) Value() RouteFilterRule {
20316	if !iter.page.NotDone() {
20317		return RouteFilterRule{}
20318	}
20319	return iter.page.Values()[iter.i]
20320}
20321
20322// Creates a new instance of the RouteFilterRuleListResultIterator type.
20323func NewRouteFilterRuleListResultIterator(page RouteFilterRuleListResultPage) RouteFilterRuleListResultIterator {
20324	return RouteFilterRuleListResultIterator{page: page}
20325}
20326
20327// IsEmpty returns true if the ListResult contains no values.
20328func (rfrlr RouteFilterRuleListResult) IsEmpty() bool {
20329	return rfrlr.Value == nil || len(*rfrlr.Value) == 0
20330}
20331
20332// hasNextLink returns true if the NextLink is not empty.
20333func (rfrlr RouteFilterRuleListResult) hasNextLink() bool {
20334	return rfrlr.NextLink != nil && len(*rfrlr.NextLink) != 0
20335}
20336
20337// routeFilterRuleListResultPreparer prepares a request to retrieve the next set of results.
20338// It returns nil if no more results exist.
20339func (rfrlr RouteFilterRuleListResult) routeFilterRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
20340	if !rfrlr.hasNextLink() {
20341		return nil, nil
20342	}
20343	return autorest.Prepare((&http.Request{}).WithContext(ctx),
20344		autorest.AsJSON(),
20345		autorest.AsGet(),
20346		autorest.WithBaseURL(to.String(rfrlr.NextLink)))
20347}
20348
20349// RouteFilterRuleListResultPage contains a page of RouteFilterRule values.
20350type RouteFilterRuleListResultPage struct {
20351	fn    func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)
20352	rfrlr RouteFilterRuleListResult
20353}
20354
20355// NextWithContext advances to the next page of values.  If there was an error making
20356// the request the page does not advance and the error is returned.
20357func (page *RouteFilterRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
20358	if tracing.IsEnabled() {
20359		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultPage.NextWithContext")
20360		defer func() {
20361			sc := -1
20362			if page.Response().Response.Response != nil {
20363				sc = page.Response().Response.Response.StatusCode
20364			}
20365			tracing.EndSpan(ctx, sc, err)
20366		}()
20367	}
20368	for {
20369		next, err := page.fn(ctx, page.rfrlr)
20370		if err != nil {
20371			return err
20372		}
20373		page.rfrlr = next
20374		if !next.hasNextLink() || !next.IsEmpty() {
20375			break
20376		}
20377	}
20378	return nil
20379}
20380
20381// Next advances to the next page of values.  If there was an error making
20382// the request the page does not advance and the error is returned.
20383// Deprecated: Use NextWithContext() instead.
20384func (page *RouteFilterRuleListResultPage) Next() error {
20385	return page.NextWithContext(context.Background())
20386}
20387
20388// NotDone returns true if the page enumeration should be started or is not yet complete.
20389func (page RouteFilterRuleListResultPage) NotDone() bool {
20390	return !page.rfrlr.IsEmpty()
20391}
20392
20393// Response returns the raw server response from the last page request.
20394func (page RouteFilterRuleListResultPage) Response() RouteFilterRuleListResult {
20395	return page.rfrlr
20396}
20397
20398// Values returns the slice of values for the current page or nil if there are no values.
20399func (page RouteFilterRuleListResultPage) Values() []RouteFilterRule {
20400	if page.rfrlr.IsEmpty() {
20401		return nil
20402	}
20403	return *page.rfrlr.Value
20404}
20405
20406// Creates a new instance of the RouteFilterRuleListResultPage type.
20407func NewRouteFilterRuleListResultPage(cur RouteFilterRuleListResult, getNextPage func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)) RouteFilterRuleListResultPage {
20408	return RouteFilterRuleListResultPage{
20409		fn:    getNextPage,
20410		rfrlr: cur,
20411	}
20412}
20413
20414// RouteFilterRulePropertiesFormat route Filter Rule Resource
20415type RouteFilterRulePropertiesFormat struct {
20416	// Access - The access type of the rule. Possible values include: 'Allow', 'Deny'
20417	Access Access `json:"access,omitempty"`
20418	// RouteFilterRuleType - The rule type of the rule. Valid value is: 'Community'
20419	RouteFilterRuleType *string `json:"routeFilterRuleType,omitempty"`
20420	// Communities - The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020']
20421	Communities *[]string `json:"communities,omitempty"`
20422	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', 'Succeeded' and 'Failed'.
20423	ProvisioningState *string `json:"provisioningState,omitempty"`
20424}
20425
20426// MarshalJSON is the custom marshaler for RouteFilterRulePropertiesFormat.
20427func (rfrpf RouteFilterRulePropertiesFormat) MarshalJSON() ([]byte, error) {
20428	objectMap := make(map[string]interface{})
20429	if rfrpf.Access != "" {
20430		objectMap["access"] = rfrpf.Access
20431	}
20432	if rfrpf.RouteFilterRuleType != nil {
20433		objectMap["routeFilterRuleType"] = rfrpf.RouteFilterRuleType
20434	}
20435	if rfrpf.Communities != nil {
20436		objectMap["communities"] = rfrpf.Communities
20437	}
20438	return json.Marshal(objectMap)
20439}
20440
20441// RouteFilterRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
20442// long-running operation.
20443type RouteFilterRulesCreateOrUpdateFuture struct {
20444	azure.FutureAPI
20445	// Result returns the result of the asynchronous operation.
20446	// If the operation has not completed it will return an error.
20447	Result func(RouteFilterRulesClient) (RouteFilterRule, error)
20448}
20449
20450// RouteFilterRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
20451// operation.
20452type RouteFilterRulesDeleteFuture struct {
20453	azure.FutureAPI
20454	// Result returns the result of the asynchronous operation.
20455	// If the operation has not completed it will return an error.
20456	Result func(RouteFilterRulesClient) (autorest.Response, error)
20457}
20458
20459// RouteFilterRulesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
20460// operation.
20461type RouteFilterRulesUpdateFuture struct {
20462	azure.FutureAPI
20463	// Result returns the result of the asynchronous operation.
20464	// If the operation has not completed it will return an error.
20465	Result func(RouteFilterRulesClient) (RouteFilterRule, error)
20466}
20467
20468// RouteFiltersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
20469// long-running operation.
20470type RouteFiltersCreateOrUpdateFuture struct {
20471	azure.FutureAPI
20472	// Result returns the result of the asynchronous operation.
20473	// If the operation has not completed it will return an error.
20474	Result func(RouteFiltersClient) (RouteFilter, error)
20475}
20476
20477// RouteFiltersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
20478// operation.
20479type RouteFiltersDeleteFuture struct {
20480	azure.FutureAPI
20481	// Result returns the result of the asynchronous operation.
20482	// If the operation has not completed it will return an error.
20483	Result func(RouteFiltersClient) (autorest.Response, error)
20484}
20485
20486// RouteFiltersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
20487// operation.
20488type RouteFiltersUpdateFuture struct {
20489	azure.FutureAPI
20490	// Result returns the result of the asynchronous operation.
20491	// If the operation has not completed it will return an error.
20492	Result func(RouteFiltersClient) (RouteFilter, error)
20493}
20494
20495// RouteListResult response for the ListRoute API service call
20496type RouteListResult struct {
20497	autorest.Response `json:"-"`
20498	// Value - Gets a list of routes in a resource group.
20499	Value *[]Route `json:"value,omitempty"`
20500	// NextLink - The URL to get the next set of results.
20501	NextLink *string `json:"nextLink,omitempty"`
20502}
20503
20504// RouteListResultIterator provides access to a complete listing of Route values.
20505type RouteListResultIterator struct {
20506	i    int
20507	page RouteListResultPage
20508}
20509
20510// NextWithContext advances to the next value.  If there was an error making
20511// the request the iterator does not advance and the error is returned.
20512func (iter *RouteListResultIterator) NextWithContext(ctx context.Context) (err error) {
20513	if tracing.IsEnabled() {
20514		ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultIterator.NextWithContext")
20515		defer func() {
20516			sc := -1
20517			if iter.Response().Response.Response != nil {
20518				sc = iter.Response().Response.Response.StatusCode
20519			}
20520			tracing.EndSpan(ctx, sc, err)
20521		}()
20522	}
20523	iter.i++
20524	if iter.i < len(iter.page.Values()) {
20525		return nil
20526	}
20527	err = iter.page.NextWithContext(ctx)
20528	if err != nil {
20529		iter.i--
20530		return err
20531	}
20532	iter.i = 0
20533	return nil
20534}
20535
20536// Next advances to the next value.  If there was an error making
20537// the request the iterator does not advance and the error is returned.
20538// Deprecated: Use NextWithContext() instead.
20539func (iter *RouteListResultIterator) Next() error {
20540	return iter.NextWithContext(context.Background())
20541}
20542
20543// NotDone returns true if the enumeration should be started or is not yet complete.
20544func (iter RouteListResultIterator) NotDone() bool {
20545	return iter.page.NotDone() && iter.i < len(iter.page.Values())
20546}
20547
20548// Response returns the raw server response from the last page request.
20549func (iter RouteListResultIterator) Response() RouteListResult {
20550	return iter.page.Response()
20551}
20552
20553// Value returns the current value or a zero-initialized value if the
20554// iterator has advanced beyond the end of the collection.
20555func (iter RouteListResultIterator) Value() Route {
20556	if !iter.page.NotDone() {
20557		return Route{}
20558	}
20559	return iter.page.Values()[iter.i]
20560}
20561
20562// Creates a new instance of the RouteListResultIterator type.
20563func NewRouteListResultIterator(page RouteListResultPage) RouteListResultIterator {
20564	return RouteListResultIterator{page: page}
20565}
20566
20567// IsEmpty returns true if the ListResult contains no values.
20568func (rlr RouteListResult) IsEmpty() bool {
20569	return rlr.Value == nil || len(*rlr.Value) == 0
20570}
20571
20572// hasNextLink returns true if the NextLink is not empty.
20573func (rlr RouteListResult) hasNextLink() bool {
20574	return rlr.NextLink != nil && len(*rlr.NextLink) != 0
20575}
20576
20577// routeListResultPreparer prepares a request to retrieve the next set of results.
20578// It returns nil if no more results exist.
20579func (rlr RouteListResult) routeListResultPreparer(ctx context.Context) (*http.Request, error) {
20580	if !rlr.hasNextLink() {
20581		return nil, nil
20582	}
20583	return autorest.Prepare((&http.Request{}).WithContext(ctx),
20584		autorest.AsJSON(),
20585		autorest.AsGet(),
20586		autorest.WithBaseURL(to.String(rlr.NextLink)))
20587}
20588
20589// RouteListResultPage contains a page of Route values.
20590type RouteListResultPage struct {
20591	fn  func(context.Context, RouteListResult) (RouteListResult, error)
20592	rlr RouteListResult
20593}
20594
20595// NextWithContext advances to the next page of values.  If there was an error making
20596// the request the page does not advance and the error is returned.
20597func (page *RouteListResultPage) NextWithContext(ctx context.Context) (err error) {
20598	if tracing.IsEnabled() {
20599		ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultPage.NextWithContext")
20600		defer func() {
20601			sc := -1
20602			if page.Response().Response.Response != nil {
20603				sc = page.Response().Response.Response.StatusCode
20604			}
20605			tracing.EndSpan(ctx, sc, err)
20606		}()
20607	}
20608	for {
20609		next, err := page.fn(ctx, page.rlr)
20610		if err != nil {
20611			return err
20612		}
20613		page.rlr = next
20614		if !next.hasNextLink() || !next.IsEmpty() {
20615			break
20616		}
20617	}
20618	return nil
20619}
20620
20621// Next advances to the next page of values.  If there was an error making
20622// the request the page does not advance and the error is returned.
20623// Deprecated: Use NextWithContext() instead.
20624func (page *RouteListResultPage) Next() error {
20625	return page.NextWithContext(context.Background())
20626}
20627
20628// NotDone returns true if the page enumeration should be started or is not yet complete.
20629func (page RouteListResultPage) NotDone() bool {
20630	return !page.rlr.IsEmpty()
20631}
20632
20633// Response returns the raw server response from the last page request.
20634func (page RouteListResultPage) Response() RouteListResult {
20635	return page.rlr
20636}
20637
20638// Values returns the slice of values for the current page or nil if there are no values.
20639func (page RouteListResultPage) Values() []Route {
20640	if page.rlr.IsEmpty() {
20641		return nil
20642	}
20643	return *page.rlr.Value
20644}
20645
20646// Creates a new instance of the RouteListResultPage type.
20647func NewRouteListResultPage(cur RouteListResult, getNextPage func(context.Context, RouteListResult) (RouteListResult, error)) RouteListResultPage {
20648	return RouteListResultPage{
20649		fn:  getNextPage,
20650		rlr: cur,
20651	}
20652}
20653
20654// RoutePropertiesFormat route resource
20655type RoutePropertiesFormat struct {
20656	// AddressPrefix - The destination CIDR to which the route applies.
20657	AddressPrefix *string `json:"addressPrefix,omitempty"`
20658	// NextHopType - The type of Azure hop the packet should be sent to. Possible values include: 'RouteNextHopTypeVirtualNetworkGateway', 'RouteNextHopTypeVnetLocal', 'RouteNextHopTypeInternet', 'RouteNextHopTypeVirtualAppliance', 'RouteNextHopTypeNone'
20659	NextHopType RouteNextHopType `json:"nextHopType,omitempty"`
20660	// NextHopIPAddress - The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance.
20661	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
20662	// ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
20663	ProvisioningState *string `json:"provisioningState,omitempty"`
20664}
20665
20666// RoutesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
20667// operation.
20668type RoutesCreateOrUpdateFuture struct {
20669	azure.FutureAPI
20670	// Result returns the result of the asynchronous operation.
20671	// If the operation has not completed it will return an error.
20672	Result func(RoutesClient) (Route, error)
20673}
20674
20675// RoutesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
20676type RoutesDeleteFuture struct {
20677	azure.FutureAPI
20678	// Result returns the result of the asynchronous operation.
20679	// If the operation has not completed it will return an error.
20680	Result func(RoutesClient) (autorest.Response, error)
20681}
20682
20683// RouteTable route table resource.
20684type RouteTable struct {
20685	autorest.Response `json:"-"`
20686	// RouteTablePropertiesFormat - Properties of the route table.
20687	*RouteTablePropertiesFormat `json:"properties,omitempty"`
20688	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
20689	Etag *string `json:"etag,omitempty"`
20690	// ID - Resource ID.
20691	ID *string `json:"id,omitempty"`
20692	// Name - READ-ONLY; Resource name.
20693	Name *string `json:"name,omitempty"`
20694	// Type - READ-ONLY; Resource type.
20695	Type *string `json:"type,omitempty"`
20696	// Location - Resource location.
20697	Location *string `json:"location,omitempty"`
20698	// Tags - Resource tags.
20699	Tags map[string]*string `json:"tags"`
20700}
20701
20702// MarshalJSON is the custom marshaler for RouteTable.
20703func (rt RouteTable) MarshalJSON() ([]byte, error) {
20704	objectMap := make(map[string]interface{})
20705	if rt.RouteTablePropertiesFormat != nil {
20706		objectMap["properties"] = rt.RouteTablePropertiesFormat
20707	}
20708	if rt.Etag != nil {
20709		objectMap["etag"] = rt.Etag
20710	}
20711	if rt.ID != nil {
20712		objectMap["id"] = rt.ID
20713	}
20714	if rt.Location != nil {
20715		objectMap["location"] = rt.Location
20716	}
20717	if rt.Tags != nil {
20718		objectMap["tags"] = rt.Tags
20719	}
20720	return json.Marshal(objectMap)
20721}
20722
20723// UnmarshalJSON is the custom unmarshaler for RouteTable struct.
20724func (rt *RouteTable) UnmarshalJSON(body []byte) error {
20725	var m map[string]*json.RawMessage
20726	err := json.Unmarshal(body, &m)
20727	if err != nil {
20728		return err
20729	}
20730	for k, v := range m {
20731		switch k {
20732		case "properties":
20733			if v != nil {
20734				var routeTablePropertiesFormat RouteTablePropertiesFormat
20735				err = json.Unmarshal(*v, &routeTablePropertiesFormat)
20736				if err != nil {
20737					return err
20738				}
20739				rt.RouteTablePropertiesFormat = &routeTablePropertiesFormat
20740			}
20741		case "etag":
20742			if v != nil {
20743				var etag string
20744				err = json.Unmarshal(*v, &etag)
20745				if err != nil {
20746					return err
20747				}
20748				rt.Etag = &etag
20749			}
20750		case "id":
20751			if v != nil {
20752				var ID string
20753				err = json.Unmarshal(*v, &ID)
20754				if err != nil {
20755					return err
20756				}
20757				rt.ID = &ID
20758			}
20759		case "name":
20760			if v != nil {
20761				var name string
20762				err = json.Unmarshal(*v, &name)
20763				if err != nil {
20764					return err
20765				}
20766				rt.Name = &name
20767			}
20768		case "type":
20769			if v != nil {
20770				var typeVar string
20771				err = json.Unmarshal(*v, &typeVar)
20772				if err != nil {
20773					return err
20774				}
20775				rt.Type = &typeVar
20776			}
20777		case "location":
20778			if v != nil {
20779				var location string
20780				err = json.Unmarshal(*v, &location)
20781				if err != nil {
20782					return err
20783				}
20784				rt.Location = &location
20785			}
20786		case "tags":
20787			if v != nil {
20788				var tags map[string]*string
20789				err = json.Unmarshal(*v, &tags)
20790				if err != nil {
20791					return err
20792				}
20793				rt.Tags = tags
20794			}
20795		}
20796	}
20797
20798	return nil
20799}
20800
20801// RouteTableListResult response for the ListRouteTable API service call.
20802type RouteTableListResult struct {
20803	autorest.Response `json:"-"`
20804	// Value - Gets a list of route tables in a resource group.
20805	Value *[]RouteTable `json:"value,omitempty"`
20806	// NextLink - The URL to get the next set of results.
20807	NextLink *string `json:"nextLink,omitempty"`
20808}
20809
20810// RouteTableListResultIterator provides access to a complete listing of RouteTable values.
20811type RouteTableListResultIterator struct {
20812	i    int
20813	page RouteTableListResultPage
20814}
20815
20816// NextWithContext advances to the next value.  If there was an error making
20817// the request the iterator does not advance and the error is returned.
20818func (iter *RouteTableListResultIterator) NextWithContext(ctx context.Context) (err error) {
20819	if tracing.IsEnabled() {
20820		ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultIterator.NextWithContext")
20821		defer func() {
20822			sc := -1
20823			if iter.Response().Response.Response != nil {
20824				sc = iter.Response().Response.Response.StatusCode
20825			}
20826			tracing.EndSpan(ctx, sc, err)
20827		}()
20828	}
20829	iter.i++
20830	if iter.i < len(iter.page.Values()) {
20831		return nil
20832	}
20833	err = iter.page.NextWithContext(ctx)
20834	if err != nil {
20835		iter.i--
20836		return err
20837	}
20838	iter.i = 0
20839	return nil
20840}
20841
20842// Next advances to the next value.  If there was an error making
20843// the request the iterator does not advance and the error is returned.
20844// Deprecated: Use NextWithContext() instead.
20845func (iter *RouteTableListResultIterator) Next() error {
20846	return iter.NextWithContext(context.Background())
20847}
20848
20849// NotDone returns true if the enumeration should be started or is not yet complete.
20850func (iter RouteTableListResultIterator) NotDone() bool {
20851	return iter.page.NotDone() && iter.i < len(iter.page.Values())
20852}
20853
20854// Response returns the raw server response from the last page request.
20855func (iter RouteTableListResultIterator) Response() RouteTableListResult {
20856	return iter.page.Response()
20857}
20858
20859// Value returns the current value or a zero-initialized value if the
20860// iterator has advanced beyond the end of the collection.
20861func (iter RouteTableListResultIterator) Value() RouteTable {
20862	if !iter.page.NotDone() {
20863		return RouteTable{}
20864	}
20865	return iter.page.Values()[iter.i]
20866}
20867
20868// Creates a new instance of the RouteTableListResultIterator type.
20869func NewRouteTableListResultIterator(page RouteTableListResultPage) RouteTableListResultIterator {
20870	return RouteTableListResultIterator{page: page}
20871}
20872
20873// IsEmpty returns true if the ListResult contains no values.
20874func (rtlr RouteTableListResult) IsEmpty() bool {
20875	return rtlr.Value == nil || len(*rtlr.Value) == 0
20876}
20877
20878// hasNextLink returns true if the NextLink is not empty.
20879func (rtlr RouteTableListResult) hasNextLink() bool {
20880	return rtlr.NextLink != nil && len(*rtlr.NextLink) != 0
20881}
20882
20883// routeTableListResultPreparer prepares a request to retrieve the next set of results.
20884// It returns nil if no more results exist.
20885func (rtlr RouteTableListResult) routeTableListResultPreparer(ctx context.Context) (*http.Request, error) {
20886	if !rtlr.hasNextLink() {
20887		return nil, nil
20888	}
20889	return autorest.Prepare((&http.Request{}).WithContext(ctx),
20890		autorest.AsJSON(),
20891		autorest.AsGet(),
20892		autorest.WithBaseURL(to.String(rtlr.NextLink)))
20893}
20894
20895// RouteTableListResultPage contains a page of RouteTable values.
20896type RouteTableListResultPage struct {
20897	fn   func(context.Context, RouteTableListResult) (RouteTableListResult, error)
20898	rtlr RouteTableListResult
20899}
20900
20901// NextWithContext advances to the next page of values.  If there was an error making
20902// the request the page does not advance and the error is returned.
20903func (page *RouteTableListResultPage) NextWithContext(ctx context.Context) (err error) {
20904	if tracing.IsEnabled() {
20905		ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultPage.NextWithContext")
20906		defer func() {
20907			sc := -1
20908			if page.Response().Response.Response != nil {
20909				sc = page.Response().Response.Response.StatusCode
20910			}
20911			tracing.EndSpan(ctx, sc, err)
20912		}()
20913	}
20914	for {
20915		next, err := page.fn(ctx, page.rtlr)
20916		if err != nil {
20917			return err
20918		}
20919		page.rtlr = next
20920		if !next.hasNextLink() || !next.IsEmpty() {
20921			break
20922		}
20923	}
20924	return nil
20925}
20926
20927// Next advances to the next page of values.  If there was an error making
20928// the request the page does not advance and the error is returned.
20929// Deprecated: Use NextWithContext() instead.
20930func (page *RouteTableListResultPage) Next() error {
20931	return page.NextWithContext(context.Background())
20932}
20933
20934// NotDone returns true if the page enumeration should be started or is not yet complete.
20935func (page RouteTableListResultPage) NotDone() bool {
20936	return !page.rtlr.IsEmpty()
20937}
20938
20939// Response returns the raw server response from the last page request.
20940func (page RouteTableListResultPage) Response() RouteTableListResult {
20941	return page.rtlr
20942}
20943
20944// Values returns the slice of values for the current page or nil if there are no values.
20945func (page RouteTableListResultPage) Values() []RouteTable {
20946	if page.rtlr.IsEmpty() {
20947		return nil
20948	}
20949	return *page.rtlr.Value
20950}
20951
20952// Creates a new instance of the RouteTableListResultPage type.
20953func NewRouteTableListResultPage(cur RouteTableListResult, getNextPage func(context.Context, RouteTableListResult) (RouteTableListResult, error)) RouteTableListResultPage {
20954	return RouteTableListResultPage{
20955		fn:   getNextPage,
20956		rtlr: cur,
20957	}
20958}
20959
20960// RouteTablePropertiesFormat route Table resource
20961type RouteTablePropertiesFormat struct {
20962	// Routes - Collection of routes contained within a route table.
20963	Routes *[]Route `json:"routes,omitempty"`
20964	// Subnets - READ-ONLY; A collection of references to subnets.
20965	Subnets *[]Subnet `json:"subnets,omitempty"`
20966	// DisableBgpRoutePropagation - Gets or sets whether to disable the routes learned by BGP on that route table. True means disable.
20967	DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"`
20968	// ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
20969	ProvisioningState *string `json:"provisioningState,omitempty"`
20970}
20971
20972// MarshalJSON is the custom marshaler for RouteTablePropertiesFormat.
20973func (rtpf RouteTablePropertiesFormat) MarshalJSON() ([]byte, error) {
20974	objectMap := make(map[string]interface{})
20975	if rtpf.Routes != nil {
20976		objectMap["routes"] = rtpf.Routes
20977	}
20978	if rtpf.DisableBgpRoutePropagation != nil {
20979		objectMap["disableBgpRoutePropagation"] = rtpf.DisableBgpRoutePropagation
20980	}
20981	if rtpf.ProvisioningState != nil {
20982		objectMap["provisioningState"] = rtpf.ProvisioningState
20983	}
20984	return json.Marshal(objectMap)
20985}
20986
20987// RouteTablesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
20988// long-running operation.
20989type RouteTablesCreateOrUpdateFuture struct {
20990	azure.FutureAPI
20991	// Result returns the result of the asynchronous operation.
20992	// If the operation has not completed it will return an error.
20993	Result func(RouteTablesClient) (RouteTable, error)
20994}
20995
20996// RouteTablesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
20997// operation.
20998type RouteTablesDeleteFuture struct {
20999	azure.FutureAPI
21000	// Result returns the result of the asynchronous operation.
21001	// If the operation has not completed it will return an error.
21002	Result func(RouteTablesClient) (autorest.Response, error)
21003}
21004
21005// RouteTablesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
21006// operation.
21007type RouteTablesUpdateTagsFuture struct {
21008	azure.FutureAPI
21009	// Result returns the result of the asynchronous operation.
21010	// If the operation has not completed it will return an error.
21011	Result func(RouteTablesClient) (RouteTable, error)
21012}
21013
21014// SecurityGroup networkSecurityGroup resource.
21015type SecurityGroup struct {
21016	autorest.Response `json:"-"`
21017	// SecurityGroupPropertiesFormat - Properties of the network security group
21018	*SecurityGroupPropertiesFormat `json:"properties,omitempty"`
21019	// Etag - A unique read-only string that changes whenever the resource is updated.
21020	Etag *string `json:"etag,omitempty"`
21021	// ID - Resource ID.
21022	ID *string `json:"id,omitempty"`
21023	// Name - READ-ONLY; Resource name.
21024	Name *string `json:"name,omitempty"`
21025	// Type - READ-ONLY; Resource type.
21026	Type *string `json:"type,omitempty"`
21027	// Location - Resource location.
21028	Location *string `json:"location,omitempty"`
21029	// Tags - Resource tags.
21030	Tags map[string]*string `json:"tags"`
21031}
21032
21033// MarshalJSON is the custom marshaler for SecurityGroup.
21034func (sg SecurityGroup) MarshalJSON() ([]byte, error) {
21035	objectMap := make(map[string]interface{})
21036	if sg.SecurityGroupPropertiesFormat != nil {
21037		objectMap["properties"] = sg.SecurityGroupPropertiesFormat
21038	}
21039	if sg.Etag != nil {
21040		objectMap["etag"] = sg.Etag
21041	}
21042	if sg.ID != nil {
21043		objectMap["id"] = sg.ID
21044	}
21045	if sg.Location != nil {
21046		objectMap["location"] = sg.Location
21047	}
21048	if sg.Tags != nil {
21049		objectMap["tags"] = sg.Tags
21050	}
21051	return json.Marshal(objectMap)
21052}
21053
21054// UnmarshalJSON is the custom unmarshaler for SecurityGroup struct.
21055func (sg *SecurityGroup) UnmarshalJSON(body []byte) error {
21056	var m map[string]*json.RawMessage
21057	err := json.Unmarshal(body, &m)
21058	if err != nil {
21059		return err
21060	}
21061	for k, v := range m {
21062		switch k {
21063		case "properties":
21064			if v != nil {
21065				var securityGroupPropertiesFormat SecurityGroupPropertiesFormat
21066				err = json.Unmarshal(*v, &securityGroupPropertiesFormat)
21067				if err != nil {
21068					return err
21069				}
21070				sg.SecurityGroupPropertiesFormat = &securityGroupPropertiesFormat
21071			}
21072		case "etag":
21073			if v != nil {
21074				var etag string
21075				err = json.Unmarshal(*v, &etag)
21076				if err != nil {
21077					return err
21078				}
21079				sg.Etag = &etag
21080			}
21081		case "id":
21082			if v != nil {
21083				var ID string
21084				err = json.Unmarshal(*v, &ID)
21085				if err != nil {
21086					return err
21087				}
21088				sg.ID = &ID
21089			}
21090		case "name":
21091			if v != nil {
21092				var name string
21093				err = json.Unmarshal(*v, &name)
21094				if err != nil {
21095					return err
21096				}
21097				sg.Name = &name
21098			}
21099		case "type":
21100			if v != nil {
21101				var typeVar string
21102				err = json.Unmarshal(*v, &typeVar)
21103				if err != nil {
21104					return err
21105				}
21106				sg.Type = &typeVar
21107			}
21108		case "location":
21109			if v != nil {
21110				var location string
21111				err = json.Unmarshal(*v, &location)
21112				if err != nil {
21113					return err
21114				}
21115				sg.Location = &location
21116			}
21117		case "tags":
21118			if v != nil {
21119				var tags map[string]*string
21120				err = json.Unmarshal(*v, &tags)
21121				if err != nil {
21122					return err
21123				}
21124				sg.Tags = tags
21125			}
21126		}
21127	}
21128
21129	return nil
21130}
21131
21132// SecurityGroupListResult response for ListNetworkSecurityGroups API service call.
21133type SecurityGroupListResult struct {
21134	autorest.Response `json:"-"`
21135	// Value - A list of NetworkSecurityGroup resources.
21136	Value *[]SecurityGroup `json:"value,omitempty"`
21137	// NextLink - The URL to get the next set of results.
21138	NextLink *string `json:"nextLink,omitempty"`
21139}
21140
21141// SecurityGroupListResultIterator provides access to a complete listing of SecurityGroup values.
21142type SecurityGroupListResultIterator struct {
21143	i    int
21144	page SecurityGroupListResultPage
21145}
21146
21147// NextWithContext advances to the next value.  If there was an error making
21148// the request the iterator does not advance and the error is returned.
21149func (iter *SecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
21150	if tracing.IsEnabled() {
21151		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultIterator.NextWithContext")
21152		defer func() {
21153			sc := -1
21154			if iter.Response().Response.Response != nil {
21155				sc = iter.Response().Response.Response.StatusCode
21156			}
21157			tracing.EndSpan(ctx, sc, err)
21158		}()
21159	}
21160	iter.i++
21161	if iter.i < len(iter.page.Values()) {
21162		return nil
21163	}
21164	err = iter.page.NextWithContext(ctx)
21165	if err != nil {
21166		iter.i--
21167		return err
21168	}
21169	iter.i = 0
21170	return nil
21171}
21172
21173// Next advances to the next value.  If there was an error making
21174// the request the iterator does not advance and the error is returned.
21175// Deprecated: Use NextWithContext() instead.
21176func (iter *SecurityGroupListResultIterator) Next() error {
21177	return iter.NextWithContext(context.Background())
21178}
21179
21180// NotDone returns true if the enumeration should be started or is not yet complete.
21181func (iter SecurityGroupListResultIterator) NotDone() bool {
21182	return iter.page.NotDone() && iter.i < len(iter.page.Values())
21183}
21184
21185// Response returns the raw server response from the last page request.
21186func (iter SecurityGroupListResultIterator) Response() SecurityGroupListResult {
21187	return iter.page.Response()
21188}
21189
21190// Value returns the current value or a zero-initialized value if the
21191// iterator has advanced beyond the end of the collection.
21192func (iter SecurityGroupListResultIterator) Value() SecurityGroup {
21193	if !iter.page.NotDone() {
21194		return SecurityGroup{}
21195	}
21196	return iter.page.Values()[iter.i]
21197}
21198
21199// Creates a new instance of the SecurityGroupListResultIterator type.
21200func NewSecurityGroupListResultIterator(page SecurityGroupListResultPage) SecurityGroupListResultIterator {
21201	return SecurityGroupListResultIterator{page: page}
21202}
21203
21204// IsEmpty returns true if the ListResult contains no values.
21205func (sglr SecurityGroupListResult) IsEmpty() bool {
21206	return sglr.Value == nil || len(*sglr.Value) == 0
21207}
21208
21209// hasNextLink returns true if the NextLink is not empty.
21210func (sglr SecurityGroupListResult) hasNextLink() bool {
21211	return sglr.NextLink != nil && len(*sglr.NextLink) != 0
21212}
21213
21214// securityGroupListResultPreparer prepares a request to retrieve the next set of results.
21215// It returns nil if no more results exist.
21216func (sglr SecurityGroupListResult) securityGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
21217	if !sglr.hasNextLink() {
21218		return nil, nil
21219	}
21220	return autorest.Prepare((&http.Request{}).WithContext(ctx),
21221		autorest.AsJSON(),
21222		autorest.AsGet(),
21223		autorest.WithBaseURL(to.String(sglr.NextLink)))
21224}
21225
21226// SecurityGroupListResultPage contains a page of SecurityGroup values.
21227type SecurityGroupListResultPage struct {
21228	fn   func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)
21229	sglr SecurityGroupListResult
21230}
21231
21232// NextWithContext advances to the next page of values.  If there was an error making
21233// the request the page does not advance and the error is returned.
21234func (page *SecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
21235	if tracing.IsEnabled() {
21236		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultPage.NextWithContext")
21237		defer func() {
21238			sc := -1
21239			if page.Response().Response.Response != nil {
21240				sc = page.Response().Response.Response.StatusCode
21241			}
21242			tracing.EndSpan(ctx, sc, err)
21243		}()
21244	}
21245	for {
21246		next, err := page.fn(ctx, page.sglr)
21247		if err != nil {
21248			return err
21249		}
21250		page.sglr = next
21251		if !next.hasNextLink() || !next.IsEmpty() {
21252			break
21253		}
21254	}
21255	return nil
21256}
21257
21258// Next advances to the next page of values.  If there was an error making
21259// the request the page does not advance and the error is returned.
21260// Deprecated: Use NextWithContext() instead.
21261func (page *SecurityGroupListResultPage) Next() error {
21262	return page.NextWithContext(context.Background())
21263}
21264
21265// NotDone returns true if the page enumeration should be started or is not yet complete.
21266func (page SecurityGroupListResultPage) NotDone() bool {
21267	return !page.sglr.IsEmpty()
21268}
21269
21270// Response returns the raw server response from the last page request.
21271func (page SecurityGroupListResultPage) Response() SecurityGroupListResult {
21272	return page.sglr
21273}
21274
21275// Values returns the slice of values for the current page or nil if there are no values.
21276func (page SecurityGroupListResultPage) Values() []SecurityGroup {
21277	if page.sglr.IsEmpty() {
21278		return nil
21279	}
21280	return *page.sglr.Value
21281}
21282
21283// Creates a new instance of the SecurityGroupListResultPage type.
21284func NewSecurityGroupListResultPage(cur SecurityGroupListResult, getNextPage func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)) SecurityGroupListResultPage {
21285	return SecurityGroupListResultPage{
21286		fn:   getNextPage,
21287		sglr: cur,
21288	}
21289}
21290
21291// SecurityGroupNetworkInterface network interface and all its associated security rules.
21292type SecurityGroupNetworkInterface struct {
21293	// ID - ID of the network interface.
21294	ID *string `json:"id,omitempty"`
21295	// SecurityRuleAssociations - All security rules associated with the network interface.
21296	SecurityRuleAssociations *SecurityRuleAssociations `json:"securityRuleAssociations,omitempty"`
21297}
21298
21299// SecurityGroupPropertiesFormat network Security Group resource.
21300type SecurityGroupPropertiesFormat struct {
21301	// SecurityRules - A collection of security rules of the network security group.
21302	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
21303	// DefaultSecurityRules - The default security rules of network security group.
21304	DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"`
21305	// NetworkInterfaces - READ-ONLY; A collection of references to network interfaces.
21306	NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"`
21307	// Subnets - READ-ONLY; A collection of references to subnets.
21308	Subnets *[]Subnet `json:"subnets,omitempty"`
21309	// ResourceGUID - The resource GUID property of the network security group resource.
21310	ResourceGUID *string `json:"resourceGuid,omitempty"`
21311	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
21312	ProvisioningState *string `json:"provisioningState,omitempty"`
21313}
21314
21315// MarshalJSON is the custom marshaler for SecurityGroupPropertiesFormat.
21316func (sgpf SecurityGroupPropertiesFormat) MarshalJSON() ([]byte, error) {
21317	objectMap := make(map[string]interface{})
21318	if sgpf.SecurityRules != nil {
21319		objectMap["securityRules"] = sgpf.SecurityRules
21320	}
21321	if sgpf.DefaultSecurityRules != nil {
21322		objectMap["defaultSecurityRules"] = sgpf.DefaultSecurityRules
21323	}
21324	if sgpf.ResourceGUID != nil {
21325		objectMap["resourceGuid"] = sgpf.ResourceGUID
21326	}
21327	if sgpf.ProvisioningState != nil {
21328		objectMap["provisioningState"] = sgpf.ProvisioningState
21329	}
21330	return json.Marshal(objectMap)
21331}
21332
21333// SecurityGroupResult network configuration diagnostic result corresponded provided traffic query.
21334type SecurityGroupResult struct {
21335	// SecurityRuleAccessResult - The network traffic is allowed or denied. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
21336	SecurityRuleAccessResult SecurityRuleAccess `json:"securityRuleAccessResult,omitempty"`
21337	// EvaluatedNetworkSecurityGroups - READ-ONLY; List of results network security groups diagnostic.
21338	EvaluatedNetworkSecurityGroups *[]EvaluatedNetworkSecurityGroup `json:"evaluatedNetworkSecurityGroups,omitempty"`
21339}
21340
21341// MarshalJSON is the custom marshaler for SecurityGroupResult.
21342func (sgr SecurityGroupResult) MarshalJSON() ([]byte, error) {
21343	objectMap := make(map[string]interface{})
21344	if sgr.SecurityRuleAccessResult != "" {
21345		objectMap["securityRuleAccessResult"] = sgr.SecurityRuleAccessResult
21346	}
21347	return json.Marshal(objectMap)
21348}
21349
21350// SecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
21351// long-running operation.
21352type SecurityGroupsCreateOrUpdateFuture struct {
21353	azure.FutureAPI
21354	// Result returns the result of the asynchronous operation.
21355	// If the operation has not completed it will return an error.
21356	Result func(SecurityGroupsClient) (SecurityGroup, error)
21357}
21358
21359// SecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
21360// operation.
21361type SecurityGroupsDeleteFuture struct {
21362	azure.FutureAPI
21363	// Result returns the result of the asynchronous operation.
21364	// If the operation has not completed it will return an error.
21365	Result func(SecurityGroupsClient) (autorest.Response, error)
21366}
21367
21368// SecurityGroupsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
21369// long-running operation.
21370type SecurityGroupsUpdateTagsFuture struct {
21371	azure.FutureAPI
21372	// Result returns the result of the asynchronous operation.
21373	// If the operation has not completed it will return an error.
21374	Result func(SecurityGroupsClient) (SecurityGroup, error)
21375}
21376
21377// SecurityGroupViewParameters parameters that define the VM to check security groups for.
21378type SecurityGroupViewParameters struct {
21379	// TargetResourceID - ID of the target VM.
21380	TargetResourceID *string `json:"targetResourceId,omitempty"`
21381}
21382
21383// SecurityGroupViewResult the information about security rules applied to the specified VM.
21384type SecurityGroupViewResult struct {
21385	autorest.Response `json:"-"`
21386	// NetworkInterfaces - List of network interfaces on the specified VM.
21387	NetworkInterfaces *[]SecurityGroupNetworkInterface `json:"networkInterfaces,omitempty"`
21388}
21389
21390// SecurityRule network security rule.
21391type SecurityRule struct {
21392	autorest.Response `json:"-"`
21393	// SecurityRulePropertiesFormat - Properties of the security rule
21394	*SecurityRulePropertiesFormat `json:"properties,omitempty"`
21395	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
21396	Name *string `json:"name,omitempty"`
21397	// Etag - A unique read-only string that changes whenever the resource is updated.
21398	Etag *string `json:"etag,omitempty"`
21399	// ID - Resource ID.
21400	ID *string `json:"id,omitempty"`
21401}
21402
21403// MarshalJSON is the custom marshaler for SecurityRule.
21404func (sr SecurityRule) MarshalJSON() ([]byte, error) {
21405	objectMap := make(map[string]interface{})
21406	if sr.SecurityRulePropertiesFormat != nil {
21407		objectMap["properties"] = sr.SecurityRulePropertiesFormat
21408	}
21409	if sr.Name != nil {
21410		objectMap["name"] = sr.Name
21411	}
21412	if sr.Etag != nil {
21413		objectMap["etag"] = sr.Etag
21414	}
21415	if sr.ID != nil {
21416		objectMap["id"] = sr.ID
21417	}
21418	return json.Marshal(objectMap)
21419}
21420
21421// UnmarshalJSON is the custom unmarshaler for SecurityRule struct.
21422func (sr *SecurityRule) UnmarshalJSON(body []byte) error {
21423	var m map[string]*json.RawMessage
21424	err := json.Unmarshal(body, &m)
21425	if err != nil {
21426		return err
21427	}
21428	for k, v := range m {
21429		switch k {
21430		case "properties":
21431			if v != nil {
21432				var securityRulePropertiesFormat SecurityRulePropertiesFormat
21433				err = json.Unmarshal(*v, &securityRulePropertiesFormat)
21434				if err != nil {
21435					return err
21436				}
21437				sr.SecurityRulePropertiesFormat = &securityRulePropertiesFormat
21438			}
21439		case "name":
21440			if v != nil {
21441				var name string
21442				err = json.Unmarshal(*v, &name)
21443				if err != nil {
21444					return err
21445				}
21446				sr.Name = &name
21447			}
21448		case "etag":
21449			if v != nil {
21450				var etag string
21451				err = json.Unmarshal(*v, &etag)
21452				if err != nil {
21453					return err
21454				}
21455				sr.Etag = &etag
21456			}
21457		case "id":
21458			if v != nil {
21459				var ID string
21460				err = json.Unmarshal(*v, &ID)
21461				if err != nil {
21462					return err
21463				}
21464				sr.ID = &ID
21465			}
21466		}
21467	}
21468
21469	return nil
21470}
21471
21472// SecurityRuleAssociations all security rules associated with the network interface.
21473type SecurityRuleAssociations struct {
21474	// NetworkInterfaceAssociation - Network interface and it's custom security rules.
21475	NetworkInterfaceAssociation *InterfaceAssociation `json:"networkInterfaceAssociation,omitempty"`
21476	// SubnetAssociation - Subnet and it's custom security rules.
21477	SubnetAssociation *SubnetAssociation `json:"subnetAssociation,omitempty"`
21478	// DefaultSecurityRules - Collection of default security rules of the network security group.
21479	DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"`
21480	// EffectiveSecurityRules - Collection of effective security rules.
21481	EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"`
21482}
21483
21484// SecurityRuleListResult response for ListSecurityRule API service call. Retrieves all security rules that
21485// belongs to a network security group.
21486type SecurityRuleListResult struct {
21487	autorest.Response `json:"-"`
21488	// Value - The security rules in a network security group.
21489	Value *[]SecurityRule `json:"value,omitempty"`
21490	// NextLink - The URL to get the next set of results.
21491	NextLink *string `json:"nextLink,omitempty"`
21492}
21493
21494// SecurityRuleListResultIterator provides access to a complete listing of SecurityRule values.
21495type SecurityRuleListResultIterator struct {
21496	i    int
21497	page SecurityRuleListResultPage
21498}
21499
21500// NextWithContext advances to the next value.  If there was an error making
21501// the request the iterator does not advance and the error is returned.
21502func (iter *SecurityRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
21503	if tracing.IsEnabled() {
21504		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultIterator.NextWithContext")
21505		defer func() {
21506			sc := -1
21507			if iter.Response().Response.Response != nil {
21508				sc = iter.Response().Response.Response.StatusCode
21509			}
21510			tracing.EndSpan(ctx, sc, err)
21511		}()
21512	}
21513	iter.i++
21514	if iter.i < len(iter.page.Values()) {
21515		return nil
21516	}
21517	err = iter.page.NextWithContext(ctx)
21518	if err != nil {
21519		iter.i--
21520		return err
21521	}
21522	iter.i = 0
21523	return nil
21524}
21525
21526// Next advances to the next value.  If there was an error making
21527// the request the iterator does not advance and the error is returned.
21528// Deprecated: Use NextWithContext() instead.
21529func (iter *SecurityRuleListResultIterator) Next() error {
21530	return iter.NextWithContext(context.Background())
21531}
21532
21533// NotDone returns true if the enumeration should be started or is not yet complete.
21534func (iter SecurityRuleListResultIterator) NotDone() bool {
21535	return iter.page.NotDone() && iter.i < len(iter.page.Values())
21536}
21537
21538// Response returns the raw server response from the last page request.
21539func (iter SecurityRuleListResultIterator) Response() SecurityRuleListResult {
21540	return iter.page.Response()
21541}
21542
21543// Value returns the current value or a zero-initialized value if the
21544// iterator has advanced beyond the end of the collection.
21545func (iter SecurityRuleListResultIterator) Value() SecurityRule {
21546	if !iter.page.NotDone() {
21547		return SecurityRule{}
21548	}
21549	return iter.page.Values()[iter.i]
21550}
21551
21552// Creates a new instance of the SecurityRuleListResultIterator type.
21553func NewSecurityRuleListResultIterator(page SecurityRuleListResultPage) SecurityRuleListResultIterator {
21554	return SecurityRuleListResultIterator{page: page}
21555}
21556
21557// IsEmpty returns true if the ListResult contains no values.
21558func (srlr SecurityRuleListResult) IsEmpty() bool {
21559	return srlr.Value == nil || len(*srlr.Value) == 0
21560}
21561
21562// hasNextLink returns true if the NextLink is not empty.
21563func (srlr SecurityRuleListResult) hasNextLink() bool {
21564	return srlr.NextLink != nil && len(*srlr.NextLink) != 0
21565}
21566
21567// securityRuleListResultPreparer prepares a request to retrieve the next set of results.
21568// It returns nil if no more results exist.
21569func (srlr SecurityRuleListResult) securityRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
21570	if !srlr.hasNextLink() {
21571		return nil, nil
21572	}
21573	return autorest.Prepare((&http.Request{}).WithContext(ctx),
21574		autorest.AsJSON(),
21575		autorest.AsGet(),
21576		autorest.WithBaseURL(to.String(srlr.NextLink)))
21577}
21578
21579// SecurityRuleListResultPage contains a page of SecurityRule values.
21580type SecurityRuleListResultPage struct {
21581	fn   func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)
21582	srlr SecurityRuleListResult
21583}
21584
21585// NextWithContext advances to the next page of values.  If there was an error making
21586// the request the page does not advance and the error is returned.
21587func (page *SecurityRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
21588	if tracing.IsEnabled() {
21589		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultPage.NextWithContext")
21590		defer func() {
21591			sc := -1
21592			if page.Response().Response.Response != nil {
21593				sc = page.Response().Response.Response.StatusCode
21594			}
21595			tracing.EndSpan(ctx, sc, err)
21596		}()
21597	}
21598	for {
21599		next, err := page.fn(ctx, page.srlr)
21600		if err != nil {
21601			return err
21602		}
21603		page.srlr = next
21604		if !next.hasNextLink() || !next.IsEmpty() {
21605			break
21606		}
21607	}
21608	return nil
21609}
21610
21611// Next advances to the next page of values.  If there was an error making
21612// the request the page does not advance and the error is returned.
21613// Deprecated: Use NextWithContext() instead.
21614func (page *SecurityRuleListResultPage) Next() error {
21615	return page.NextWithContext(context.Background())
21616}
21617
21618// NotDone returns true if the page enumeration should be started or is not yet complete.
21619func (page SecurityRuleListResultPage) NotDone() bool {
21620	return !page.srlr.IsEmpty()
21621}
21622
21623// Response returns the raw server response from the last page request.
21624func (page SecurityRuleListResultPage) Response() SecurityRuleListResult {
21625	return page.srlr
21626}
21627
21628// Values returns the slice of values for the current page or nil if there are no values.
21629func (page SecurityRuleListResultPage) Values() []SecurityRule {
21630	if page.srlr.IsEmpty() {
21631		return nil
21632	}
21633	return *page.srlr.Value
21634}
21635
21636// Creates a new instance of the SecurityRuleListResultPage type.
21637func NewSecurityRuleListResultPage(cur SecurityRuleListResult, getNextPage func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)) SecurityRuleListResultPage {
21638	return SecurityRuleListResultPage{
21639		fn:   getNextPage,
21640		srlr: cur,
21641	}
21642}
21643
21644// SecurityRulePropertiesFormat security rule resource.
21645type SecurityRulePropertiesFormat struct {
21646	// Description - A description for this rule. Restricted to 140 chars.
21647	Description *string `json:"description,omitempty"`
21648	// Protocol - Network protocol this rule applies to. Possible values are 'Tcp', 'Udp', 'Icmp', 'Esp', and '*'. Possible values include: 'SecurityRuleProtocolTCP', 'SecurityRuleProtocolUDP', 'SecurityRuleProtocolIcmp', 'SecurityRuleProtocolEsp', 'SecurityRuleProtocolAsterisk'
21649	Protocol SecurityRuleProtocol `json:"protocol,omitempty"`
21650	// SourcePortRange - The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
21651	SourcePortRange *string `json:"sourcePortRange,omitempty"`
21652	// DestinationPortRange - The destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
21653	DestinationPortRange *string `json:"destinationPortRange,omitempty"`
21654	// 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.
21655	SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
21656	// SourceAddressPrefixes - The CIDR or source IP ranges.
21657	SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"`
21658	// SourceApplicationSecurityGroups - The application security group specified as source.
21659	SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"`
21660	// 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.
21661	DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"`
21662	// DestinationAddressPrefixes - The destination address prefixes. CIDR or destination IP ranges.
21663	DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"`
21664	// DestinationApplicationSecurityGroups - The application security group specified as destination.
21665	DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"`
21666	// SourcePortRanges - The source port ranges.
21667	SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"`
21668	// DestinationPortRanges - The destination port ranges.
21669	DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"`
21670	// Access - The network traffic is allowed or denied. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
21671	Access SecurityRuleAccess `json:"access,omitempty"`
21672	// 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.
21673	Priority *int32 `json:"priority,omitempty"`
21674	// Direction - The direction of the rule. The direction specifies if rule will be evaluated on incoming or outgoing traffic. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound'
21675	Direction SecurityRuleDirection `json:"direction,omitempty"`
21676	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
21677	ProvisioningState *string `json:"provisioningState,omitempty"`
21678}
21679
21680// SecurityRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
21681// long-running operation.
21682type SecurityRulesCreateOrUpdateFuture struct {
21683	azure.FutureAPI
21684	// Result returns the result of the asynchronous operation.
21685	// If the operation has not completed it will return an error.
21686	Result func(SecurityRulesClient) (SecurityRule, error)
21687}
21688
21689// SecurityRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
21690// operation.
21691type SecurityRulesDeleteFuture struct {
21692	azure.FutureAPI
21693	// Result returns the result of the asynchronous operation.
21694	// If the operation has not completed it will return an error.
21695	Result func(SecurityRulesClient) (autorest.Response, error)
21696}
21697
21698// SecurityRulesEvaluationResult network security rules evaluation result.
21699type SecurityRulesEvaluationResult struct {
21700	// Name - Name of the network security rule.
21701	Name *string `json:"name,omitempty"`
21702	// ProtocolMatched - Value indicating whether protocol is matched.
21703	ProtocolMatched *bool `json:"protocolMatched,omitempty"`
21704	// SourceMatched - Value indicating whether source is matched.
21705	SourceMatched *bool `json:"sourceMatched,omitempty"`
21706	// SourcePortMatched - Value indicating whether source port is matched.
21707	SourcePortMatched *bool `json:"sourcePortMatched,omitempty"`
21708	// DestinationMatched - Value indicating whether destination is matched.
21709	DestinationMatched *bool `json:"destinationMatched,omitempty"`
21710	// DestinationPortMatched - Value indicating whether destination port is matched.
21711	DestinationPortMatched *bool `json:"destinationPortMatched,omitempty"`
21712}
21713
21714// ServiceAssociationLink serviceAssociationLink resource.
21715type ServiceAssociationLink struct {
21716	// ServiceAssociationLinkPropertiesFormat - Resource navigation link properties format.
21717	*ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"`
21718	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
21719	Name *string `json:"name,omitempty"`
21720	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
21721	Etag *string `json:"etag,omitempty"`
21722	// ID - Resource ID.
21723	ID *string `json:"id,omitempty"`
21724}
21725
21726// MarshalJSON is the custom marshaler for ServiceAssociationLink.
21727func (sal ServiceAssociationLink) MarshalJSON() ([]byte, error) {
21728	objectMap := make(map[string]interface{})
21729	if sal.ServiceAssociationLinkPropertiesFormat != nil {
21730		objectMap["properties"] = sal.ServiceAssociationLinkPropertiesFormat
21731	}
21732	if sal.Name != nil {
21733		objectMap["name"] = sal.Name
21734	}
21735	if sal.ID != nil {
21736		objectMap["id"] = sal.ID
21737	}
21738	return json.Marshal(objectMap)
21739}
21740
21741// UnmarshalJSON is the custom unmarshaler for ServiceAssociationLink struct.
21742func (sal *ServiceAssociationLink) UnmarshalJSON(body []byte) error {
21743	var m map[string]*json.RawMessage
21744	err := json.Unmarshal(body, &m)
21745	if err != nil {
21746		return err
21747	}
21748	for k, v := range m {
21749		switch k {
21750		case "properties":
21751			if v != nil {
21752				var serviceAssociationLinkPropertiesFormat ServiceAssociationLinkPropertiesFormat
21753				err = json.Unmarshal(*v, &serviceAssociationLinkPropertiesFormat)
21754				if err != nil {
21755					return err
21756				}
21757				sal.ServiceAssociationLinkPropertiesFormat = &serviceAssociationLinkPropertiesFormat
21758			}
21759		case "name":
21760			if v != nil {
21761				var name string
21762				err = json.Unmarshal(*v, &name)
21763				if err != nil {
21764					return err
21765				}
21766				sal.Name = &name
21767			}
21768		case "etag":
21769			if v != nil {
21770				var etag string
21771				err = json.Unmarshal(*v, &etag)
21772				if err != nil {
21773					return err
21774				}
21775				sal.Etag = &etag
21776			}
21777		case "id":
21778			if v != nil {
21779				var ID string
21780				err = json.Unmarshal(*v, &ID)
21781				if err != nil {
21782					return err
21783				}
21784				sal.ID = &ID
21785			}
21786		}
21787	}
21788
21789	return nil
21790}
21791
21792// ServiceAssociationLinkPropertiesFormat properties of ServiceAssociationLink.
21793type ServiceAssociationLinkPropertiesFormat struct {
21794	// LinkedResourceType - Resource type of the linked resource.
21795	LinkedResourceType *string `json:"linkedResourceType,omitempty"`
21796	// Link - Link to the external resource.
21797	Link *string `json:"link,omitempty"`
21798	// ProvisioningState - READ-ONLY; Provisioning state of the ServiceAssociationLink resource.
21799	ProvisioningState *string `json:"provisioningState,omitempty"`
21800}
21801
21802// MarshalJSON is the custom marshaler for ServiceAssociationLinkPropertiesFormat.
21803func (salpf ServiceAssociationLinkPropertiesFormat) MarshalJSON() ([]byte, error) {
21804	objectMap := make(map[string]interface{})
21805	if salpf.LinkedResourceType != nil {
21806		objectMap["linkedResourceType"] = salpf.LinkedResourceType
21807	}
21808	if salpf.Link != nil {
21809		objectMap["link"] = salpf.Link
21810	}
21811	return json.Marshal(objectMap)
21812}
21813
21814// ServiceAssociationLinksListResult response for ServiceAssociationLinks_Get operation.
21815type ServiceAssociationLinksListResult struct {
21816	autorest.Response `json:"-"`
21817	// Value - The service association links in a subnet.
21818	Value *[]ServiceAssociationLink `json:"value,omitempty"`
21819	// NextLink - The URL to get the next set of results.
21820	NextLink *string `json:"nextLink,omitempty"`
21821}
21822
21823// ServiceDelegationPropertiesFormat properties of a service delegation.
21824type ServiceDelegationPropertiesFormat struct {
21825	// ServiceName - The name of the service to whom the subnet should be delegated (e.g. Microsoft.Sql/servers)
21826	ServiceName *string `json:"serviceName,omitempty"`
21827	// Actions - Describes the actions permitted to the service upon delegation
21828	Actions *[]string `json:"actions,omitempty"`
21829	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
21830	ProvisioningState *string `json:"provisioningState,omitempty"`
21831}
21832
21833// MarshalJSON is the custom marshaler for ServiceDelegationPropertiesFormat.
21834func (sdpf ServiceDelegationPropertiesFormat) MarshalJSON() ([]byte, error) {
21835	objectMap := make(map[string]interface{})
21836	if sdpf.ServiceName != nil {
21837		objectMap["serviceName"] = sdpf.ServiceName
21838	}
21839	if sdpf.Actions != nil {
21840		objectMap["actions"] = sdpf.Actions
21841	}
21842	return json.Marshal(objectMap)
21843}
21844
21845// ServiceEndpointPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
21846// a long-running operation.
21847type ServiceEndpointPoliciesCreateOrUpdateFuture struct {
21848	azure.FutureAPI
21849	// Result returns the result of the asynchronous operation.
21850	// If the operation has not completed it will return an error.
21851	Result func(ServiceEndpointPoliciesClient) (ServiceEndpointPolicy, error)
21852}
21853
21854// ServiceEndpointPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a
21855// long-running operation.
21856type ServiceEndpointPoliciesDeleteFuture struct {
21857	azure.FutureAPI
21858	// Result returns the result of the asynchronous operation.
21859	// If the operation has not completed it will return an error.
21860	Result func(ServiceEndpointPoliciesClient) (autorest.Response, error)
21861}
21862
21863// ServiceEndpointPoliciesUpdateFuture an abstraction for monitoring and retrieving the results of a
21864// long-running operation.
21865type ServiceEndpointPoliciesUpdateFuture struct {
21866	azure.FutureAPI
21867	// Result returns the result of the asynchronous operation.
21868	// If the operation has not completed it will return an error.
21869	Result func(ServiceEndpointPoliciesClient) (ServiceEndpointPolicy, error)
21870}
21871
21872// ServiceEndpointPolicy service End point policy resource.
21873type ServiceEndpointPolicy struct {
21874	autorest.Response `json:"-"`
21875	// ServiceEndpointPolicyPropertiesFormat - Properties of the service end point policy
21876	*ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"`
21877	// Etag - A unique read-only string that changes whenever the resource is updated.
21878	Etag *string `json:"etag,omitempty"`
21879	// ID - Resource ID.
21880	ID *string `json:"id,omitempty"`
21881	// Name - READ-ONLY; Resource name.
21882	Name *string `json:"name,omitempty"`
21883	// Type - READ-ONLY; Resource type.
21884	Type *string `json:"type,omitempty"`
21885	// Location - Resource location.
21886	Location *string `json:"location,omitempty"`
21887	// Tags - Resource tags.
21888	Tags map[string]*string `json:"tags"`
21889}
21890
21891// MarshalJSON is the custom marshaler for ServiceEndpointPolicy.
21892func (sep ServiceEndpointPolicy) MarshalJSON() ([]byte, error) {
21893	objectMap := make(map[string]interface{})
21894	if sep.ServiceEndpointPolicyPropertiesFormat != nil {
21895		objectMap["properties"] = sep.ServiceEndpointPolicyPropertiesFormat
21896	}
21897	if sep.Etag != nil {
21898		objectMap["etag"] = sep.Etag
21899	}
21900	if sep.ID != nil {
21901		objectMap["id"] = sep.ID
21902	}
21903	if sep.Location != nil {
21904		objectMap["location"] = sep.Location
21905	}
21906	if sep.Tags != nil {
21907		objectMap["tags"] = sep.Tags
21908	}
21909	return json.Marshal(objectMap)
21910}
21911
21912// UnmarshalJSON is the custom unmarshaler for ServiceEndpointPolicy struct.
21913func (sep *ServiceEndpointPolicy) UnmarshalJSON(body []byte) error {
21914	var m map[string]*json.RawMessage
21915	err := json.Unmarshal(body, &m)
21916	if err != nil {
21917		return err
21918	}
21919	for k, v := range m {
21920		switch k {
21921		case "properties":
21922			if v != nil {
21923				var serviceEndpointPolicyPropertiesFormat ServiceEndpointPolicyPropertiesFormat
21924				err = json.Unmarshal(*v, &serviceEndpointPolicyPropertiesFormat)
21925				if err != nil {
21926					return err
21927				}
21928				sep.ServiceEndpointPolicyPropertiesFormat = &serviceEndpointPolicyPropertiesFormat
21929			}
21930		case "etag":
21931			if v != nil {
21932				var etag string
21933				err = json.Unmarshal(*v, &etag)
21934				if err != nil {
21935					return err
21936				}
21937				sep.Etag = &etag
21938			}
21939		case "id":
21940			if v != nil {
21941				var ID string
21942				err = json.Unmarshal(*v, &ID)
21943				if err != nil {
21944					return err
21945				}
21946				sep.ID = &ID
21947			}
21948		case "name":
21949			if v != nil {
21950				var name string
21951				err = json.Unmarshal(*v, &name)
21952				if err != nil {
21953					return err
21954				}
21955				sep.Name = &name
21956			}
21957		case "type":
21958			if v != nil {
21959				var typeVar string
21960				err = json.Unmarshal(*v, &typeVar)
21961				if err != nil {
21962					return err
21963				}
21964				sep.Type = &typeVar
21965			}
21966		case "location":
21967			if v != nil {
21968				var location string
21969				err = json.Unmarshal(*v, &location)
21970				if err != nil {
21971					return err
21972				}
21973				sep.Location = &location
21974			}
21975		case "tags":
21976			if v != nil {
21977				var tags map[string]*string
21978				err = json.Unmarshal(*v, &tags)
21979				if err != nil {
21980					return err
21981				}
21982				sep.Tags = tags
21983			}
21984		}
21985	}
21986
21987	return nil
21988}
21989
21990// ServiceEndpointPolicyDefinition service Endpoint policy definitions.
21991type ServiceEndpointPolicyDefinition struct {
21992	autorest.Response `json:"-"`
21993	// ServiceEndpointPolicyDefinitionPropertiesFormat - Properties of the service endpoint policy definition
21994	*ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"`
21995	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
21996	Name *string `json:"name,omitempty"`
21997	// Etag - A unique read-only string that changes whenever the resource is updated.
21998	Etag *string `json:"etag,omitempty"`
21999	// ID - Resource ID.
22000	ID *string `json:"id,omitempty"`
22001}
22002
22003// MarshalJSON is the custom marshaler for ServiceEndpointPolicyDefinition.
22004func (sepd ServiceEndpointPolicyDefinition) MarshalJSON() ([]byte, error) {
22005	objectMap := make(map[string]interface{})
22006	if sepd.ServiceEndpointPolicyDefinitionPropertiesFormat != nil {
22007		objectMap["properties"] = sepd.ServiceEndpointPolicyDefinitionPropertiesFormat
22008	}
22009	if sepd.Name != nil {
22010		objectMap["name"] = sepd.Name
22011	}
22012	if sepd.Etag != nil {
22013		objectMap["etag"] = sepd.Etag
22014	}
22015	if sepd.ID != nil {
22016		objectMap["id"] = sepd.ID
22017	}
22018	return json.Marshal(objectMap)
22019}
22020
22021// UnmarshalJSON is the custom unmarshaler for ServiceEndpointPolicyDefinition struct.
22022func (sepd *ServiceEndpointPolicyDefinition) UnmarshalJSON(body []byte) error {
22023	var m map[string]*json.RawMessage
22024	err := json.Unmarshal(body, &m)
22025	if err != nil {
22026		return err
22027	}
22028	for k, v := range m {
22029		switch k {
22030		case "properties":
22031			if v != nil {
22032				var serviceEndpointPolicyDefinitionPropertiesFormat ServiceEndpointPolicyDefinitionPropertiesFormat
22033				err = json.Unmarshal(*v, &serviceEndpointPolicyDefinitionPropertiesFormat)
22034				if err != nil {
22035					return err
22036				}
22037				sepd.ServiceEndpointPolicyDefinitionPropertiesFormat = &serviceEndpointPolicyDefinitionPropertiesFormat
22038			}
22039		case "name":
22040			if v != nil {
22041				var name string
22042				err = json.Unmarshal(*v, &name)
22043				if err != nil {
22044					return err
22045				}
22046				sepd.Name = &name
22047			}
22048		case "etag":
22049			if v != nil {
22050				var etag string
22051				err = json.Unmarshal(*v, &etag)
22052				if err != nil {
22053					return err
22054				}
22055				sepd.Etag = &etag
22056			}
22057		case "id":
22058			if v != nil {
22059				var ID string
22060				err = json.Unmarshal(*v, &ID)
22061				if err != nil {
22062					return err
22063				}
22064				sepd.ID = &ID
22065			}
22066		}
22067	}
22068
22069	return nil
22070}
22071
22072// ServiceEndpointPolicyDefinitionListResult response for ListServiceEndpointPolicyDefinition API service
22073// call. Retrieves all service endpoint policy definition that belongs to a service endpoint policy.
22074type ServiceEndpointPolicyDefinitionListResult struct {
22075	autorest.Response `json:"-"`
22076	// Value - The service endpoint policy definition in a service endpoint policy.
22077	Value *[]ServiceEndpointPolicyDefinition `json:"value,omitempty"`
22078	// NextLink - The URL to get the next set of results.
22079	NextLink *string `json:"nextLink,omitempty"`
22080}
22081
22082// ServiceEndpointPolicyDefinitionListResultIterator provides access to a complete listing of
22083// ServiceEndpointPolicyDefinition values.
22084type ServiceEndpointPolicyDefinitionListResultIterator struct {
22085	i    int
22086	page ServiceEndpointPolicyDefinitionListResultPage
22087}
22088
22089// NextWithContext advances to the next value.  If there was an error making
22090// the request the iterator does not advance and the error is returned.
22091func (iter *ServiceEndpointPolicyDefinitionListResultIterator) NextWithContext(ctx context.Context) (err error) {
22092	if tracing.IsEnabled() {
22093		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyDefinitionListResultIterator.NextWithContext")
22094		defer func() {
22095			sc := -1
22096			if iter.Response().Response.Response != nil {
22097				sc = iter.Response().Response.Response.StatusCode
22098			}
22099			tracing.EndSpan(ctx, sc, err)
22100		}()
22101	}
22102	iter.i++
22103	if iter.i < len(iter.page.Values()) {
22104		return nil
22105	}
22106	err = iter.page.NextWithContext(ctx)
22107	if err != nil {
22108		iter.i--
22109		return err
22110	}
22111	iter.i = 0
22112	return nil
22113}
22114
22115// Next advances to the next value.  If there was an error making
22116// the request the iterator does not advance and the error is returned.
22117// Deprecated: Use NextWithContext() instead.
22118func (iter *ServiceEndpointPolicyDefinitionListResultIterator) Next() error {
22119	return iter.NextWithContext(context.Background())
22120}
22121
22122// NotDone returns true if the enumeration should be started or is not yet complete.
22123func (iter ServiceEndpointPolicyDefinitionListResultIterator) NotDone() bool {
22124	return iter.page.NotDone() && iter.i < len(iter.page.Values())
22125}
22126
22127// Response returns the raw server response from the last page request.
22128func (iter ServiceEndpointPolicyDefinitionListResultIterator) Response() ServiceEndpointPolicyDefinitionListResult {
22129	return iter.page.Response()
22130}
22131
22132// Value returns the current value or a zero-initialized value if the
22133// iterator has advanced beyond the end of the collection.
22134func (iter ServiceEndpointPolicyDefinitionListResultIterator) Value() ServiceEndpointPolicyDefinition {
22135	if !iter.page.NotDone() {
22136		return ServiceEndpointPolicyDefinition{}
22137	}
22138	return iter.page.Values()[iter.i]
22139}
22140
22141// Creates a new instance of the ServiceEndpointPolicyDefinitionListResultIterator type.
22142func NewServiceEndpointPolicyDefinitionListResultIterator(page ServiceEndpointPolicyDefinitionListResultPage) ServiceEndpointPolicyDefinitionListResultIterator {
22143	return ServiceEndpointPolicyDefinitionListResultIterator{page: page}
22144}
22145
22146// IsEmpty returns true if the ListResult contains no values.
22147func (sepdlr ServiceEndpointPolicyDefinitionListResult) IsEmpty() bool {
22148	return sepdlr.Value == nil || len(*sepdlr.Value) == 0
22149}
22150
22151// hasNextLink returns true if the NextLink is not empty.
22152func (sepdlr ServiceEndpointPolicyDefinitionListResult) hasNextLink() bool {
22153	return sepdlr.NextLink != nil && len(*sepdlr.NextLink) != 0
22154}
22155
22156// serviceEndpointPolicyDefinitionListResultPreparer prepares a request to retrieve the next set of results.
22157// It returns nil if no more results exist.
22158func (sepdlr ServiceEndpointPolicyDefinitionListResult) serviceEndpointPolicyDefinitionListResultPreparer(ctx context.Context) (*http.Request, error) {
22159	if !sepdlr.hasNextLink() {
22160		return nil, nil
22161	}
22162	return autorest.Prepare((&http.Request{}).WithContext(ctx),
22163		autorest.AsJSON(),
22164		autorest.AsGet(),
22165		autorest.WithBaseURL(to.String(sepdlr.NextLink)))
22166}
22167
22168// ServiceEndpointPolicyDefinitionListResultPage contains a page of ServiceEndpointPolicyDefinition values.
22169type ServiceEndpointPolicyDefinitionListResultPage struct {
22170	fn     func(context.Context, ServiceEndpointPolicyDefinitionListResult) (ServiceEndpointPolicyDefinitionListResult, error)
22171	sepdlr ServiceEndpointPolicyDefinitionListResult
22172}
22173
22174// NextWithContext advances to the next page of values.  If there was an error making
22175// the request the page does not advance and the error is returned.
22176func (page *ServiceEndpointPolicyDefinitionListResultPage) NextWithContext(ctx context.Context) (err error) {
22177	if tracing.IsEnabled() {
22178		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyDefinitionListResultPage.NextWithContext")
22179		defer func() {
22180			sc := -1
22181			if page.Response().Response.Response != nil {
22182				sc = page.Response().Response.Response.StatusCode
22183			}
22184			tracing.EndSpan(ctx, sc, err)
22185		}()
22186	}
22187	for {
22188		next, err := page.fn(ctx, page.sepdlr)
22189		if err != nil {
22190			return err
22191		}
22192		page.sepdlr = next
22193		if !next.hasNextLink() || !next.IsEmpty() {
22194			break
22195		}
22196	}
22197	return nil
22198}
22199
22200// Next advances to the next page of values.  If there was an error making
22201// the request the page does not advance and the error is returned.
22202// Deprecated: Use NextWithContext() instead.
22203func (page *ServiceEndpointPolicyDefinitionListResultPage) Next() error {
22204	return page.NextWithContext(context.Background())
22205}
22206
22207// NotDone returns true if the page enumeration should be started or is not yet complete.
22208func (page ServiceEndpointPolicyDefinitionListResultPage) NotDone() bool {
22209	return !page.sepdlr.IsEmpty()
22210}
22211
22212// Response returns the raw server response from the last page request.
22213func (page ServiceEndpointPolicyDefinitionListResultPage) Response() ServiceEndpointPolicyDefinitionListResult {
22214	return page.sepdlr
22215}
22216
22217// Values returns the slice of values for the current page or nil if there are no values.
22218func (page ServiceEndpointPolicyDefinitionListResultPage) Values() []ServiceEndpointPolicyDefinition {
22219	if page.sepdlr.IsEmpty() {
22220		return nil
22221	}
22222	return *page.sepdlr.Value
22223}
22224
22225// Creates a new instance of the ServiceEndpointPolicyDefinitionListResultPage type.
22226func NewServiceEndpointPolicyDefinitionListResultPage(cur ServiceEndpointPolicyDefinitionListResult, getNextPage func(context.Context, ServiceEndpointPolicyDefinitionListResult) (ServiceEndpointPolicyDefinitionListResult, error)) ServiceEndpointPolicyDefinitionListResultPage {
22227	return ServiceEndpointPolicyDefinitionListResultPage{
22228		fn:     getNextPage,
22229		sepdlr: cur,
22230	}
22231}
22232
22233// ServiceEndpointPolicyDefinitionPropertiesFormat service Endpoint policy definition resource.
22234type ServiceEndpointPolicyDefinitionPropertiesFormat struct {
22235	// Description - A description for this rule. Restricted to 140 chars.
22236	Description *string `json:"description,omitempty"`
22237	// Service - Service endpoint name.
22238	Service *string `json:"service,omitempty"`
22239	// ServiceResources - A list of service resources.
22240	ServiceResources *[]string `json:"serviceResources,omitempty"`
22241	// ProvisioningState - READ-ONLY; The provisioning state of the service end point policy definition. Possible values are: 'Updating', 'Deleting', and 'Failed'.
22242	ProvisioningState *string `json:"provisioningState,omitempty"`
22243}
22244
22245// MarshalJSON is the custom marshaler for ServiceEndpointPolicyDefinitionPropertiesFormat.
22246func (sepdpf ServiceEndpointPolicyDefinitionPropertiesFormat) MarshalJSON() ([]byte, error) {
22247	objectMap := make(map[string]interface{})
22248	if sepdpf.Description != nil {
22249		objectMap["description"] = sepdpf.Description
22250	}
22251	if sepdpf.Service != nil {
22252		objectMap["service"] = sepdpf.Service
22253	}
22254	if sepdpf.ServiceResources != nil {
22255		objectMap["serviceResources"] = sepdpf.ServiceResources
22256	}
22257	return json.Marshal(objectMap)
22258}
22259
22260// ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
22261// results of a long-running operation.
22262type ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture struct {
22263	azure.FutureAPI
22264	// Result returns the result of the asynchronous operation.
22265	// If the operation has not completed it will return an error.
22266	Result func(ServiceEndpointPolicyDefinitionsClient) (ServiceEndpointPolicyDefinition, error)
22267}
22268
22269// ServiceEndpointPolicyDefinitionsDeleteFuture an abstraction for monitoring and retrieving the results of
22270// a long-running operation.
22271type ServiceEndpointPolicyDefinitionsDeleteFuture struct {
22272	azure.FutureAPI
22273	// Result returns the result of the asynchronous operation.
22274	// If the operation has not completed it will return an error.
22275	Result func(ServiceEndpointPolicyDefinitionsClient) (autorest.Response, error)
22276}
22277
22278// ServiceEndpointPolicyListResult response for ListServiceEndpointPolicies API service call.
22279type ServiceEndpointPolicyListResult struct {
22280	autorest.Response `json:"-"`
22281	// Value - A list of ServiceEndpointPolicy resources.
22282	Value *[]ServiceEndpointPolicy `json:"value,omitempty"`
22283	// NextLink - READ-ONLY; The URL to get the next set of results.
22284	NextLink *string `json:"nextLink,omitempty"`
22285}
22286
22287// MarshalJSON is the custom marshaler for ServiceEndpointPolicyListResult.
22288func (seplr ServiceEndpointPolicyListResult) MarshalJSON() ([]byte, error) {
22289	objectMap := make(map[string]interface{})
22290	if seplr.Value != nil {
22291		objectMap["value"] = seplr.Value
22292	}
22293	return json.Marshal(objectMap)
22294}
22295
22296// ServiceEndpointPolicyListResultIterator provides access to a complete listing of ServiceEndpointPolicy
22297// values.
22298type ServiceEndpointPolicyListResultIterator struct {
22299	i    int
22300	page ServiceEndpointPolicyListResultPage
22301}
22302
22303// NextWithContext advances to the next value.  If there was an error making
22304// the request the iterator does not advance and the error is returned.
22305func (iter *ServiceEndpointPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) {
22306	if tracing.IsEnabled() {
22307		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyListResultIterator.NextWithContext")
22308		defer func() {
22309			sc := -1
22310			if iter.Response().Response.Response != nil {
22311				sc = iter.Response().Response.Response.StatusCode
22312			}
22313			tracing.EndSpan(ctx, sc, err)
22314		}()
22315	}
22316	iter.i++
22317	if iter.i < len(iter.page.Values()) {
22318		return nil
22319	}
22320	err = iter.page.NextWithContext(ctx)
22321	if err != nil {
22322		iter.i--
22323		return err
22324	}
22325	iter.i = 0
22326	return nil
22327}
22328
22329// Next advances to the next value.  If there was an error making
22330// the request the iterator does not advance and the error is returned.
22331// Deprecated: Use NextWithContext() instead.
22332func (iter *ServiceEndpointPolicyListResultIterator) Next() error {
22333	return iter.NextWithContext(context.Background())
22334}
22335
22336// NotDone returns true if the enumeration should be started or is not yet complete.
22337func (iter ServiceEndpointPolicyListResultIterator) NotDone() bool {
22338	return iter.page.NotDone() && iter.i < len(iter.page.Values())
22339}
22340
22341// Response returns the raw server response from the last page request.
22342func (iter ServiceEndpointPolicyListResultIterator) Response() ServiceEndpointPolicyListResult {
22343	return iter.page.Response()
22344}
22345
22346// Value returns the current value or a zero-initialized value if the
22347// iterator has advanced beyond the end of the collection.
22348func (iter ServiceEndpointPolicyListResultIterator) Value() ServiceEndpointPolicy {
22349	if !iter.page.NotDone() {
22350		return ServiceEndpointPolicy{}
22351	}
22352	return iter.page.Values()[iter.i]
22353}
22354
22355// Creates a new instance of the ServiceEndpointPolicyListResultIterator type.
22356func NewServiceEndpointPolicyListResultIterator(page ServiceEndpointPolicyListResultPage) ServiceEndpointPolicyListResultIterator {
22357	return ServiceEndpointPolicyListResultIterator{page: page}
22358}
22359
22360// IsEmpty returns true if the ListResult contains no values.
22361func (seplr ServiceEndpointPolicyListResult) IsEmpty() bool {
22362	return seplr.Value == nil || len(*seplr.Value) == 0
22363}
22364
22365// hasNextLink returns true if the NextLink is not empty.
22366func (seplr ServiceEndpointPolicyListResult) hasNextLink() bool {
22367	return seplr.NextLink != nil && len(*seplr.NextLink) != 0
22368}
22369
22370// serviceEndpointPolicyListResultPreparer prepares a request to retrieve the next set of results.
22371// It returns nil if no more results exist.
22372func (seplr ServiceEndpointPolicyListResult) serviceEndpointPolicyListResultPreparer(ctx context.Context) (*http.Request, error) {
22373	if !seplr.hasNextLink() {
22374		return nil, nil
22375	}
22376	return autorest.Prepare((&http.Request{}).WithContext(ctx),
22377		autorest.AsJSON(),
22378		autorest.AsGet(),
22379		autorest.WithBaseURL(to.String(seplr.NextLink)))
22380}
22381
22382// ServiceEndpointPolicyListResultPage contains a page of ServiceEndpointPolicy values.
22383type ServiceEndpointPolicyListResultPage struct {
22384	fn    func(context.Context, ServiceEndpointPolicyListResult) (ServiceEndpointPolicyListResult, error)
22385	seplr ServiceEndpointPolicyListResult
22386}
22387
22388// NextWithContext advances to the next page of values.  If there was an error making
22389// the request the page does not advance and the error is returned.
22390func (page *ServiceEndpointPolicyListResultPage) NextWithContext(ctx context.Context) (err error) {
22391	if tracing.IsEnabled() {
22392		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyListResultPage.NextWithContext")
22393		defer func() {
22394			sc := -1
22395			if page.Response().Response.Response != nil {
22396				sc = page.Response().Response.Response.StatusCode
22397			}
22398			tracing.EndSpan(ctx, sc, err)
22399		}()
22400	}
22401	for {
22402		next, err := page.fn(ctx, page.seplr)
22403		if err != nil {
22404			return err
22405		}
22406		page.seplr = next
22407		if !next.hasNextLink() || !next.IsEmpty() {
22408			break
22409		}
22410	}
22411	return nil
22412}
22413
22414// Next advances to the next page of values.  If there was an error making
22415// the request the page does not advance and the error is returned.
22416// Deprecated: Use NextWithContext() instead.
22417func (page *ServiceEndpointPolicyListResultPage) Next() error {
22418	return page.NextWithContext(context.Background())
22419}
22420
22421// NotDone returns true if the page enumeration should be started or is not yet complete.
22422func (page ServiceEndpointPolicyListResultPage) NotDone() bool {
22423	return !page.seplr.IsEmpty()
22424}
22425
22426// Response returns the raw server response from the last page request.
22427func (page ServiceEndpointPolicyListResultPage) Response() ServiceEndpointPolicyListResult {
22428	return page.seplr
22429}
22430
22431// Values returns the slice of values for the current page or nil if there are no values.
22432func (page ServiceEndpointPolicyListResultPage) Values() []ServiceEndpointPolicy {
22433	if page.seplr.IsEmpty() {
22434		return nil
22435	}
22436	return *page.seplr.Value
22437}
22438
22439// Creates a new instance of the ServiceEndpointPolicyListResultPage type.
22440func NewServiceEndpointPolicyListResultPage(cur ServiceEndpointPolicyListResult, getNextPage func(context.Context, ServiceEndpointPolicyListResult) (ServiceEndpointPolicyListResult, error)) ServiceEndpointPolicyListResultPage {
22441	return ServiceEndpointPolicyListResultPage{
22442		fn:    getNextPage,
22443		seplr: cur,
22444	}
22445}
22446
22447// ServiceEndpointPolicyPropertiesFormat service Endpoint Policy resource.
22448type ServiceEndpointPolicyPropertiesFormat struct {
22449	// ServiceEndpointPolicyDefinitions - A collection of service endpoint policy definitions of the service endpoint policy.
22450	ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"`
22451	// Subnets - READ-ONLY; A collection of references to subnets.
22452	Subnets *[]Subnet `json:"subnets,omitempty"`
22453	// ResourceGUID - READ-ONLY; The resource GUID property of the service endpoint policy resource.
22454	ResourceGUID *string `json:"resourceGuid,omitempty"`
22455	// ProvisioningState - READ-ONLY; The provisioning state of the service endpoint policy. Possible values are: 'Updating', 'Deleting', and 'Failed'.
22456	ProvisioningState *string `json:"provisioningState,omitempty"`
22457}
22458
22459// MarshalJSON is the custom marshaler for ServiceEndpointPolicyPropertiesFormat.
22460func (seppf ServiceEndpointPolicyPropertiesFormat) MarshalJSON() ([]byte, error) {
22461	objectMap := make(map[string]interface{})
22462	if seppf.ServiceEndpointPolicyDefinitions != nil {
22463		objectMap["serviceEndpointPolicyDefinitions"] = seppf.ServiceEndpointPolicyDefinitions
22464	}
22465	return json.Marshal(objectMap)
22466}
22467
22468// ServiceEndpointPropertiesFormat the service endpoint properties.
22469type ServiceEndpointPropertiesFormat struct {
22470	// Service - The type of the endpoint service.
22471	Service *string `json:"service,omitempty"`
22472	// Locations - A list of locations.
22473	Locations *[]string `json:"locations,omitempty"`
22474	// ProvisioningState - The provisioning state of the resource.
22475	ProvisioningState *string `json:"provisioningState,omitempty"`
22476}
22477
22478// String ...
22479type String struct {
22480	autorest.Response `json:"-"`
22481	Value             *string `json:"value,omitempty"`
22482}
22483
22484// Subnet subnet in a virtual network resource.
22485type Subnet struct {
22486	autorest.Response `json:"-"`
22487	// SubnetPropertiesFormat - Properties of the subnet.
22488	*SubnetPropertiesFormat `json:"properties,omitempty"`
22489	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
22490	Name *string `json:"name,omitempty"`
22491	// Etag - A unique read-only string that changes whenever the resource is updated.
22492	Etag *string `json:"etag,omitempty"`
22493	// ID - Resource ID.
22494	ID *string `json:"id,omitempty"`
22495}
22496
22497// MarshalJSON is the custom marshaler for Subnet.
22498func (s Subnet) MarshalJSON() ([]byte, error) {
22499	objectMap := make(map[string]interface{})
22500	if s.SubnetPropertiesFormat != nil {
22501		objectMap["properties"] = s.SubnetPropertiesFormat
22502	}
22503	if s.Name != nil {
22504		objectMap["name"] = s.Name
22505	}
22506	if s.Etag != nil {
22507		objectMap["etag"] = s.Etag
22508	}
22509	if s.ID != nil {
22510		objectMap["id"] = s.ID
22511	}
22512	return json.Marshal(objectMap)
22513}
22514
22515// UnmarshalJSON is the custom unmarshaler for Subnet struct.
22516func (s *Subnet) UnmarshalJSON(body []byte) error {
22517	var m map[string]*json.RawMessage
22518	err := json.Unmarshal(body, &m)
22519	if err != nil {
22520		return err
22521	}
22522	for k, v := range m {
22523		switch k {
22524		case "properties":
22525			if v != nil {
22526				var subnetPropertiesFormat SubnetPropertiesFormat
22527				err = json.Unmarshal(*v, &subnetPropertiesFormat)
22528				if err != nil {
22529					return err
22530				}
22531				s.SubnetPropertiesFormat = &subnetPropertiesFormat
22532			}
22533		case "name":
22534			if v != nil {
22535				var name string
22536				err = json.Unmarshal(*v, &name)
22537				if err != nil {
22538					return err
22539				}
22540				s.Name = &name
22541			}
22542		case "etag":
22543			if v != nil {
22544				var etag string
22545				err = json.Unmarshal(*v, &etag)
22546				if err != nil {
22547					return err
22548				}
22549				s.Etag = &etag
22550			}
22551		case "id":
22552			if v != nil {
22553				var ID string
22554				err = json.Unmarshal(*v, &ID)
22555				if err != nil {
22556					return err
22557				}
22558				s.ID = &ID
22559			}
22560		}
22561	}
22562
22563	return nil
22564}
22565
22566// SubnetAssociation subnet and it's custom security rules.
22567type SubnetAssociation struct {
22568	// ID - READ-ONLY; Subnet ID.
22569	ID *string `json:"id,omitempty"`
22570	// SecurityRules - Collection of custom security rules.
22571	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
22572}
22573
22574// MarshalJSON is the custom marshaler for SubnetAssociation.
22575func (sa SubnetAssociation) MarshalJSON() ([]byte, error) {
22576	objectMap := make(map[string]interface{})
22577	if sa.SecurityRules != nil {
22578		objectMap["securityRules"] = sa.SecurityRules
22579	}
22580	return json.Marshal(objectMap)
22581}
22582
22583// SubnetListResult response for ListSubnets API service callRetrieves all subnet that belongs to a virtual
22584// network
22585type SubnetListResult struct {
22586	autorest.Response `json:"-"`
22587	// Value - The subnets in a virtual network.
22588	Value *[]Subnet `json:"value,omitempty"`
22589	// NextLink - The URL to get the next set of results.
22590	NextLink *string `json:"nextLink,omitempty"`
22591}
22592
22593// SubnetListResultIterator provides access to a complete listing of Subnet values.
22594type SubnetListResultIterator struct {
22595	i    int
22596	page SubnetListResultPage
22597}
22598
22599// NextWithContext advances to the next value.  If there was an error making
22600// the request the iterator does not advance and the error is returned.
22601func (iter *SubnetListResultIterator) NextWithContext(ctx context.Context) (err error) {
22602	if tracing.IsEnabled() {
22603		ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultIterator.NextWithContext")
22604		defer func() {
22605			sc := -1
22606			if iter.Response().Response.Response != nil {
22607				sc = iter.Response().Response.Response.StatusCode
22608			}
22609			tracing.EndSpan(ctx, sc, err)
22610		}()
22611	}
22612	iter.i++
22613	if iter.i < len(iter.page.Values()) {
22614		return nil
22615	}
22616	err = iter.page.NextWithContext(ctx)
22617	if err != nil {
22618		iter.i--
22619		return err
22620	}
22621	iter.i = 0
22622	return nil
22623}
22624
22625// Next advances to the next value.  If there was an error making
22626// the request the iterator does not advance and the error is returned.
22627// Deprecated: Use NextWithContext() instead.
22628func (iter *SubnetListResultIterator) Next() error {
22629	return iter.NextWithContext(context.Background())
22630}
22631
22632// NotDone returns true if the enumeration should be started or is not yet complete.
22633func (iter SubnetListResultIterator) NotDone() bool {
22634	return iter.page.NotDone() && iter.i < len(iter.page.Values())
22635}
22636
22637// Response returns the raw server response from the last page request.
22638func (iter SubnetListResultIterator) Response() SubnetListResult {
22639	return iter.page.Response()
22640}
22641
22642// Value returns the current value or a zero-initialized value if the
22643// iterator has advanced beyond the end of the collection.
22644func (iter SubnetListResultIterator) Value() Subnet {
22645	if !iter.page.NotDone() {
22646		return Subnet{}
22647	}
22648	return iter.page.Values()[iter.i]
22649}
22650
22651// Creates a new instance of the SubnetListResultIterator type.
22652func NewSubnetListResultIterator(page SubnetListResultPage) SubnetListResultIterator {
22653	return SubnetListResultIterator{page: page}
22654}
22655
22656// IsEmpty returns true if the ListResult contains no values.
22657func (slr SubnetListResult) IsEmpty() bool {
22658	return slr.Value == nil || len(*slr.Value) == 0
22659}
22660
22661// hasNextLink returns true if the NextLink is not empty.
22662func (slr SubnetListResult) hasNextLink() bool {
22663	return slr.NextLink != nil && len(*slr.NextLink) != 0
22664}
22665
22666// subnetListResultPreparer prepares a request to retrieve the next set of results.
22667// It returns nil if no more results exist.
22668func (slr SubnetListResult) subnetListResultPreparer(ctx context.Context) (*http.Request, error) {
22669	if !slr.hasNextLink() {
22670		return nil, nil
22671	}
22672	return autorest.Prepare((&http.Request{}).WithContext(ctx),
22673		autorest.AsJSON(),
22674		autorest.AsGet(),
22675		autorest.WithBaseURL(to.String(slr.NextLink)))
22676}
22677
22678// SubnetListResultPage contains a page of Subnet values.
22679type SubnetListResultPage struct {
22680	fn  func(context.Context, SubnetListResult) (SubnetListResult, error)
22681	slr SubnetListResult
22682}
22683
22684// NextWithContext advances to the next page of values.  If there was an error making
22685// the request the page does not advance and the error is returned.
22686func (page *SubnetListResultPage) NextWithContext(ctx context.Context) (err error) {
22687	if tracing.IsEnabled() {
22688		ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultPage.NextWithContext")
22689		defer func() {
22690			sc := -1
22691			if page.Response().Response.Response != nil {
22692				sc = page.Response().Response.Response.StatusCode
22693			}
22694			tracing.EndSpan(ctx, sc, err)
22695		}()
22696	}
22697	for {
22698		next, err := page.fn(ctx, page.slr)
22699		if err != nil {
22700			return err
22701		}
22702		page.slr = next
22703		if !next.hasNextLink() || !next.IsEmpty() {
22704			break
22705		}
22706	}
22707	return nil
22708}
22709
22710// Next advances to the next page of values.  If there was an error making
22711// the request the page does not advance and the error is returned.
22712// Deprecated: Use NextWithContext() instead.
22713func (page *SubnetListResultPage) Next() error {
22714	return page.NextWithContext(context.Background())
22715}
22716
22717// NotDone returns true if the page enumeration should be started or is not yet complete.
22718func (page SubnetListResultPage) NotDone() bool {
22719	return !page.slr.IsEmpty()
22720}
22721
22722// Response returns the raw server response from the last page request.
22723func (page SubnetListResultPage) Response() SubnetListResult {
22724	return page.slr
22725}
22726
22727// Values returns the slice of values for the current page or nil if there are no values.
22728func (page SubnetListResultPage) Values() []Subnet {
22729	if page.slr.IsEmpty() {
22730		return nil
22731	}
22732	return *page.slr.Value
22733}
22734
22735// Creates a new instance of the SubnetListResultPage type.
22736func NewSubnetListResultPage(cur SubnetListResult, getNextPage func(context.Context, SubnetListResult) (SubnetListResult, error)) SubnetListResultPage {
22737	return SubnetListResultPage{
22738		fn:  getNextPage,
22739		slr: cur,
22740	}
22741}
22742
22743// SubnetPropertiesFormat properties of the subnet.
22744type SubnetPropertiesFormat struct {
22745	// AddressPrefix - The address prefix for the subnet.
22746	AddressPrefix *string `json:"addressPrefix,omitempty"`
22747	// AddressPrefixes - List of  address prefixes for the subnet.
22748	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
22749	// NetworkSecurityGroup - The reference of the NetworkSecurityGroup resource.
22750	NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"`
22751	// RouteTable - The reference of the RouteTable resource.
22752	RouteTable *RouteTable `json:"routeTable,omitempty"`
22753	// NatGateway - Nat gateway associated with this subnet.
22754	NatGateway *SubResource `json:"natGateway,omitempty"`
22755	// ServiceEndpoints - An array of service endpoints.
22756	ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"`
22757	// ServiceEndpointPolicies - An array of service endpoint policies.
22758	ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"`
22759	// InterfaceEndpoints - READ-ONLY; An array of references to interface endpoints
22760	InterfaceEndpoints *[]InterfaceEndpoint `json:"interfaceEndpoints,omitempty"`
22761	// IPConfigurations - READ-ONLY; Gets an array of references to the network interface IP configurations using subnet.
22762	IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"`
22763	// IPConfigurationProfiles - READ-ONLY; Array of IP configuration profiles which reference this subnet.
22764	IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"`
22765	// ResourceNavigationLinks - Gets an array of references to the external resources using subnet.
22766	ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"`
22767	// ServiceAssociationLinks - Gets an array of references to services injecting into this subnet.
22768	ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"`
22769	// Delegations - Gets an array of references to the delegations on the subnet.
22770	Delegations *[]Delegation `json:"delegations,omitempty"`
22771	// Purpose - READ-ONLY; A read-only string identifying the intention of use for this subnet based on delegations and other user-defined properties.
22772	Purpose *string `json:"purpose,omitempty"`
22773	// ProvisioningState - The provisioning state of the resource.
22774	ProvisioningState *string `json:"provisioningState,omitempty"`
22775}
22776
22777// MarshalJSON is the custom marshaler for SubnetPropertiesFormat.
22778func (spf SubnetPropertiesFormat) MarshalJSON() ([]byte, error) {
22779	objectMap := make(map[string]interface{})
22780	if spf.AddressPrefix != nil {
22781		objectMap["addressPrefix"] = spf.AddressPrefix
22782	}
22783	if spf.AddressPrefixes != nil {
22784		objectMap["addressPrefixes"] = spf.AddressPrefixes
22785	}
22786	if spf.NetworkSecurityGroup != nil {
22787		objectMap["networkSecurityGroup"] = spf.NetworkSecurityGroup
22788	}
22789	if spf.RouteTable != nil {
22790		objectMap["routeTable"] = spf.RouteTable
22791	}
22792	if spf.NatGateway != nil {
22793		objectMap["natGateway"] = spf.NatGateway
22794	}
22795	if spf.ServiceEndpoints != nil {
22796		objectMap["serviceEndpoints"] = spf.ServiceEndpoints
22797	}
22798	if spf.ServiceEndpointPolicies != nil {
22799		objectMap["serviceEndpointPolicies"] = spf.ServiceEndpointPolicies
22800	}
22801	if spf.ResourceNavigationLinks != nil {
22802		objectMap["resourceNavigationLinks"] = spf.ResourceNavigationLinks
22803	}
22804	if spf.ServiceAssociationLinks != nil {
22805		objectMap["serviceAssociationLinks"] = spf.ServiceAssociationLinks
22806	}
22807	if spf.Delegations != nil {
22808		objectMap["delegations"] = spf.Delegations
22809	}
22810	if spf.ProvisioningState != nil {
22811		objectMap["provisioningState"] = spf.ProvisioningState
22812	}
22813	return json.Marshal(objectMap)
22814}
22815
22816// SubnetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
22817// operation.
22818type SubnetsCreateOrUpdateFuture struct {
22819	azure.FutureAPI
22820	// Result returns the result of the asynchronous operation.
22821	// If the operation has not completed it will return an error.
22822	Result func(SubnetsClient) (Subnet, error)
22823}
22824
22825// SubnetsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
22826// operation.
22827type SubnetsDeleteFuture struct {
22828	azure.FutureAPI
22829	// Result returns the result of the asynchronous operation.
22830	// If the operation has not completed it will return an error.
22831	Result func(SubnetsClient) (autorest.Response, error)
22832}
22833
22834// SubnetsPrepareNetworkPoliciesFuture an abstraction for monitoring and retrieving the results of a
22835// long-running operation.
22836type SubnetsPrepareNetworkPoliciesFuture struct {
22837	azure.FutureAPI
22838	// Result returns the result of the asynchronous operation.
22839	// If the operation has not completed it will return an error.
22840	Result func(SubnetsClient) (autorest.Response, error)
22841}
22842
22843// SubResource reference to another subresource.
22844type SubResource struct {
22845	// ID - Resource ID.
22846	ID *string `json:"id,omitempty"`
22847}
22848
22849// TagsObject tags object for patch operations.
22850type TagsObject struct {
22851	// Tags - Resource tags.
22852	Tags map[string]*string `json:"tags"`
22853}
22854
22855// MarshalJSON is the custom marshaler for TagsObject.
22856func (toVar TagsObject) MarshalJSON() ([]byte, error) {
22857	objectMap := make(map[string]interface{})
22858	if toVar.Tags != nil {
22859		objectMap["tags"] = toVar.Tags
22860	}
22861	return json.Marshal(objectMap)
22862}
22863
22864// Topology topology of the specified resource group.
22865type Topology struct {
22866	autorest.Response `json:"-"`
22867	// ID - READ-ONLY; GUID representing the operation id.
22868	ID *string `json:"id,omitempty"`
22869	// CreatedDateTime - READ-ONLY; The datetime when the topology was initially created for the resource group.
22870	CreatedDateTime *date.Time `json:"createdDateTime,omitempty"`
22871	// LastModified - READ-ONLY; The datetime when the topology was last modified.
22872	LastModified *date.Time `json:"lastModified,omitempty"`
22873	// Resources - A list of topology resources.
22874	Resources *[]TopologyResource `json:"resources,omitempty"`
22875}
22876
22877// MarshalJSON is the custom marshaler for Topology.
22878func (t Topology) MarshalJSON() ([]byte, error) {
22879	objectMap := make(map[string]interface{})
22880	if t.Resources != nil {
22881		objectMap["resources"] = t.Resources
22882	}
22883	return json.Marshal(objectMap)
22884}
22885
22886// TopologyAssociation resources that have an association with the parent resource.
22887type TopologyAssociation struct {
22888	// Name - The name of the resource that is associated with the parent resource.
22889	Name *string `json:"name,omitempty"`
22890	// ResourceID - The ID of the resource that is associated with the parent resource.
22891	ResourceID *string `json:"resourceId,omitempty"`
22892	// AssociationType - The association type of the child resource to the parent resource. Possible values include: 'Associated', 'Contains'
22893	AssociationType AssociationType `json:"associationType,omitempty"`
22894}
22895
22896// TopologyParameters parameters that define the representation of topology.
22897type TopologyParameters struct {
22898	// TargetResourceGroupName - The name of the target resource group to perform topology on.
22899	TargetResourceGroupName *string `json:"targetResourceGroupName,omitempty"`
22900	// TargetVirtualNetwork - The reference of the Virtual Network resource.
22901	TargetVirtualNetwork *SubResource `json:"targetVirtualNetwork,omitempty"`
22902	// TargetSubnet - The reference of the Subnet resource.
22903	TargetSubnet *SubResource `json:"targetSubnet,omitempty"`
22904}
22905
22906// TopologyResource the network resource topology information for the given resource group.
22907type TopologyResource struct {
22908	// Name - Name of the resource.
22909	Name *string `json:"name,omitempty"`
22910	// ID - ID of the resource.
22911	ID *string `json:"id,omitempty"`
22912	// Location - Resource location.
22913	Location *string `json:"location,omitempty"`
22914	// Associations - Holds the associations the resource has with other resources in the resource group.
22915	Associations *[]TopologyAssociation `json:"associations,omitempty"`
22916}
22917
22918// TrafficAnalyticsConfigurationProperties parameters that define the configuration of traffic analytics.
22919type TrafficAnalyticsConfigurationProperties struct {
22920	// Enabled - Flag to enable/disable traffic analytics.
22921	Enabled *bool `json:"enabled,omitempty"`
22922	// WorkspaceID - The resource guid of the attached workspace
22923	WorkspaceID *string `json:"workspaceId,omitempty"`
22924	// WorkspaceRegion - The location of the attached workspace
22925	WorkspaceRegion *string `json:"workspaceRegion,omitempty"`
22926	// WorkspaceResourceID - Resource Id of the attached workspace
22927	WorkspaceResourceID *string `json:"workspaceResourceId,omitempty"`
22928	// TrafficAnalyticsInterval - The interval in minutes which would decide how frequently TA service should do flow analytics
22929	TrafficAnalyticsInterval *int32 `json:"trafficAnalyticsInterval,omitempty"`
22930}
22931
22932// TrafficAnalyticsProperties parameters that define the configuration of traffic analytics.
22933type TrafficAnalyticsProperties struct {
22934	// NetworkWatcherFlowAnalyticsConfiguration - Parameters that define the configuration of traffic analytics.
22935	NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"`
22936}
22937
22938// TroubleshootingDetails information gained from troubleshooting of specified resource.
22939type TroubleshootingDetails struct {
22940	// ID - The id of the get troubleshoot operation.
22941	ID *string `json:"id,omitempty"`
22942	// ReasonType - Reason type of failure.
22943	ReasonType *string `json:"reasonType,omitempty"`
22944	// Summary - A summary of troubleshooting.
22945	Summary *string `json:"summary,omitempty"`
22946	// Detail - Details on troubleshooting results.
22947	Detail *string `json:"detail,omitempty"`
22948	// RecommendedActions - List of recommended actions.
22949	RecommendedActions *[]TroubleshootingRecommendedActions `json:"recommendedActions,omitempty"`
22950}
22951
22952// TroubleshootingParameters parameters that define the resource to troubleshoot.
22953type TroubleshootingParameters struct {
22954	// TargetResourceID - The target resource to troubleshoot.
22955	TargetResourceID *string `json:"targetResourceId,omitempty"`
22956	// TroubleshootingProperties - Properties of the troubleshooting resource.
22957	*TroubleshootingProperties `json:"properties,omitempty"`
22958}
22959
22960// MarshalJSON is the custom marshaler for TroubleshootingParameters.
22961func (tp TroubleshootingParameters) MarshalJSON() ([]byte, error) {
22962	objectMap := make(map[string]interface{})
22963	if tp.TargetResourceID != nil {
22964		objectMap["targetResourceId"] = tp.TargetResourceID
22965	}
22966	if tp.TroubleshootingProperties != nil {
22967		objectMap["properties"] = tp.TroubleshootingProperties
22968	}
22969	return json.Marshal(objectMap)
22970}
22971
22972// UnmarshalJSON is the custom unmarshaler for TroubleshootingParameters struct.
22973func (tp *TroubleshootingParameters) UnmarshalJSON(body []byte) error {
22974	var m map[string]*json.RawMessage
22975	err := json.Unmarshal(body, &m)
22976	if err != nil {
22977		return err
22978	}
22979	for k, v := range m {
22980		switch k {
22981		case "targetResourceId":
22982			if v != nil {
22983				var targetResourceID string
22984				err = json.Unmarshal(*v, &targetResourceID)
22985				if err != nil {
22986					return err
22987				}
22988				tp.TargetResourceID = &targetResourceID
22989			}
22990		case "properties":
22991			if v != nil {
22992				var troubleshootingProperties TroubleshootingProperties
22993				err = json.Unmarshal(*v, &troubleshootingProperties)
22994				if err != nil {
22995					return err
22996				}
22997				tp.TroubleshootingProperties = &troubleshootingProperties
22998			}
22999		}
23000	}
23001
23002	return nil
23003}
23004
23005// TroubleshootingProperties storage location provided for troubleshoot.
23006type TroubleshootingProperties struct {
23007	// StorageID - The ID for the storage account to save the troubleshoot result.
23008	StorageID *string `json:"storageId,omitempty"`
23009	// StoragePath - The path to the blob to save the troubleshoot result in.
23010	StoragePath *string `json:"storagePath,omitempty"`
23011}
23012
23013// TroubleshootingRecommendedActions recommended actions based on discovered issues.
23014type TroubleshootingRecommendedActions struct {
23015	// ActionID - ID of the recommended action.
23016	ActionID *string `json:"actionId,omitempty"`
23017	// ActionText - Description of recommended actions.
23018	ActionText *string `json:"actionText,omitempty"`
23019	// ActionURI - The uri linking to a documentation for the recommended troubleshooting actions.
23020	ActionURI *string `json:"actionUri,omitempty"`
23021	// ActionURIText - The information from the URI for the recommended troubleshooting actions.
23022	ActionURIText *string `json:"actionUriText,omitempty"`
23023}
23024
23025// TroubleshootingResult troubleshooting information gained from specified resource.
23026type TroubleshootingResult struct {
23027	autorest.Response `json:"-"`
23028	// StartTime - The start time of the troubleshooting.
23029	StartTime *date.Time `json:"startTime,omitempty"`
23030	// EndTime - The end time of the troubleshooting.
23031	EndTime *date.Time `json:"endTime,omitempty"`
23032	// Code - The result code of the troubleshooting.
23033	Code *string `json:"code,omitempty"`
23034	// Results - Information from troubleshooting.
23035	Results *[]TroubleshootingDetails `json:"results,omitempty"`
23036}
23037
23038// TunnelConnectionHealth virtualNetworkGatewayConnection properties
23039type TunnelConnectionHealth struct {
23040	// Tunnel - READ-ONLY; Tunnel name.
23041	Tunnel *string `json:"tunnel,omitempty"`
23042	// ConnectionStatus - READ-ONLY; Virtual Network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
23043	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
23044	// IngressBytesTransferred - READ-ONLY; The Ingress Bytes Transferred in this connection
23045	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
23046	// EgressBytesTransferred - READ-ONLY; The Egress Bytes Transferred in this connection
23047	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
23048	// LastConnectionEstablishedUtcTime - READ-ONLY; The time at which connection was established in Utc format.
23049	LastConnectionEstablishedUtcTime *string `json:"lastConnectionEstablishedUtcTime,omitempty"`
23050}
23051
23052// Usage describes network resource usage.
23053type Usage struct {
23054	// ID - READ-ONLY; Resource identifier.
23055	ID *string `json:"id,omitempty"`
23056	// Unit - An enum describing the unit of measurement.
23057	Unit *string `json:"unit,omitempty"`
23058	// CurrentValue - The current value of the usage.
23059	CurrentValue *int64 `json:"currentValue,omitempty"`
23060	// Limit - The limit of usage.
23061	Limit *int64 `json:"limit,omitempty"`
23062	// Name - The name of the type of usage.
23063	Name *UsageName `json:"name,omitempty"`
23064}
23065
23066// MarshalJSON is the custom marshaler for Usage.
23067func (u Usage) MarshalJSON() ([]byte, error) {
23068	objectMap := make(map[string]interface{})
23069	if u.Unit != nil {
23070		objectMap["unit"] = u.Unit
23071	}
23072	if u.CurrentValue != nil {
23073		objectMap["currentValue"] = u.CurrentValue
23074	}
23075	if u.Limit != nil {
23076		objectMap["limit"] = u.Limit
23077	}
23078	if u.Name != nil {
23079		objectMap["name"] = u.Name
23080	}
23081	return json.Marshal(objectMap)
23082}
23083
23084// UsageName the usage names.
23085type UsageName struct {
23086	// Value - A string describing the resource name.
23087	Value *string `json:"value,omitempty"`
23088	// LocalizedValue - A localized string describing the resource name.
23089	LocalizedValue *string `json:"localizedValue,omitempty"`
23090}
23091
23092// UsagesListResult the list usages operation response.
23093type UsagesListResult struct {
23094	autorest.Response `json:"-"`
23095	// Value - The list network resource usages.
23096	Value *[]Usage `json:"value,omitempty"`
23097	// NextLink - URL to get the next set of results.
23098	NextLink *string `json:"nextLink,omitempty"`
23099}
23100
23101// UsagesListResultIterator provides access to a complete listing of Usage values.
23102type UsagesListResultIterator struct {
23103	i    int
23104	page UsagesListResultPage
23105}
23106
23107// NextWithContext advances to the next value.  If there was an error making
23108// the request the iterator does not advance and the error is returned.
23109func (iter *UsagesListResultIterator) NextWithContext(ctx context.Context) (err error) {
23110	if tracing.IsEnabled() {
23111		ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultIterator.NextWithContext")
23112		defer func() {
23113			sc := -1
23114			if iter.Response().Response.Response != nil {
23115				sc = iter.Response().Response.Response.StatusCode
23116			}
23117			tracing.EndSpan(ctx, sc, err)
23118		}()
23119	}
23120	iter.i++
23121	if iter.i < len(iter.page.Values()) {
23122		return nil
23123	}
23124	err = iter.page.NextWithContext(ctx)
23125	if err != nil {
23126		iter.i--
23127		return err
23128	}
23129	iter.i = 0
23130	return nil
23131}
23132
23133// Next advances to the next value.  If there was an error making
23134// the request the iterator does not advance and the error is returned.
23135// Deprecated: Use NextWithContext() instead.
23136func (iter *UsagesListResultIterator) Next() error {
23137	return iter.NextWithContext(context.Background())
23138}
23139
23140// NotDone returns true if the enumeration should be started or is not yet complete.
23141func (iter UsagesListResultIterator) NotDone() bool {
23142	return iter.page.NotDone() && iter.i < len(iter.page.Values())
23143}
23144
23145// Response returns the raw server response from the last page request.
23146func (iter UsagesListResultIterator) Response() UsagesListResult {
23147	return iter.page.Response()
23148}
23149
23150// Value returns the current value or a zero-initialized value if the
23151// iterator has advanced beyond the end of the collection.
23152func (iter UsagesListResultIterator) Value() Usage {
23153	if !iter.page.NotDone() {
23154		return Usage{}
23155	}
23156	return iter.page.Values()[iter.i]
23157}
23158
23159// Creates a new instance of the UsagesListResultIterator type.
23160func NewUsagesListResultIterator(page UsagesListResultPage) UsagesListResultIterator {
23161	return UsagesListResultIterator{page: page}
23162}
23163
23164// IsEmpty returns true if the ListResult contains no values.
23165func (ulr UsagesListResult) IsEmpty() bool {
23166	return ulr.Value == nil || len(*ulr.Value) == 0
23167}
23168
23169// hasNextLink returns true if the NextLink is not empty.
23170func (ulr UsagesListResult) hasNextLink() bool {
23171	return ulr.NextLink != nil && len(*ulr.NextLink) != 0
23172}
23173
23174// usagesListResultPreparer prepares a request to retrieve the next set of results.
23175// It returns nil if no more results exist.
23176func (ulr UsagesListResult) usagesListResultPreparer(ctx context.Context) (*http.Request, error) {
23177	if !ulr.hasNextLink() {
23178		return nil, nil
23179	}
23180	return autorest.Prepare((&http.Request{}).WithContext(ctx),
23181		autorest.AsJSON(),
23182		autorest.AsGet(),
23183		autorest.WithBaseURL(to.String(ulr.NextLink)))
23184}
23185
23186// UsagesListResultPage contains a page of Usage values.
23187type UsagesListResultPage struct {
23188	fn  func(context.Context, UsagesListResult) (UsagesListResult, error)
23189	ulr UsagesListResult
23190}
23191
23192// NextWithContext advances to the next page of values.  If there was an error making
23193// the request the page does not advance and the error is returned.
23194func (page *UsagesListResultPage) NextWithContext(ctx context.Context) (err error) {
23195	if tracing.IsEnabled() {
23196		ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultPage.NextWithContext")
23197		defer func() {
23198			sc := -1
23199			if page.Response().Response.Response != nil {
23200				sc = page.Response().Response.Response.StatusCode
23201			}
23202			tracing.EndSpan(ctx, sc, err)
23203		}()
23204	}
23205	for {
23206		next, err := page.fn(ctx, page.ulr)
23207		if err != nil {
23208			return err
23209		}
23210		page.ulr = next
23211		if !next.hasNextLink() || !next.IsEmpty() {
23212			break
23213		}
23214	}
23215	return nil
23216}
23217
23218// Next advances to the next page of values.  If there was an error making
23219// the request the page does not advance and the error is returned.
23220// Deprecated: Use NextWithContext() instead.
23221func (page *UsagesListResultPage) Next() error {
23222	return page.NextWithContext(context.Background())
23223}
23224
23225// NotDone returns true if the page enumeration should be started or is not yet complete.
23226func (page UsagesListResultPage) NotDone() bool {
23227	return !page.ulr.IsEmpty()
23228}
23229
23230// Response returns the raw server response from the last page request.
23231func (page UsagesListResultPage) Response() UsagesListResult {
23232	return page.ulr
23233}
23234
23235// Values returns the slice of values for the current page or nil if there are no values.
23236func (page UsagesListResultPage) Values() []Usage {
23237	if page.ulr.IsEmpty() {
23238		return nil
23239	}
23240	return *page.ulr.Value
23241}
23242
23243// Creates a new instance of the UsagesListResultPage type.
23244func NewUsagesListResultPage(cur UsagesListResult, getNextPage func(context.Context, UsagesListResult) (UsagesListResult, error)) UsagesListResultPage {
23245	return UsagesListResultPage{
23246		fn:  getNextPage,
23247		ulr: cur,
23248	}
23249}
23250
23251// VerificationIPFlowParameters parameters that define the IP flow to be verified.
23252type VerificationIPFlowParameters struct {
23253	// TargetResourceID - The ID of the target resource to perform next-hop on.
23254	TargetResourceID *string `json:"targetResourceId,omitempty"`
23255	// Direction - The direction of the packet represented as a 5-tuple. Possible values include: 'Inbound', 'Outbound'
23256	Direction Direction `json:"direction,omitempty"`
23257	// Protocol - Protocol to be verified on. Possible values include: 'IPFlowProtocolTCP', 'IPFlowProtocolUDP'
23258	Protocol IPFlowProtocol `json:"protocol,omitempty"`
23259	// 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.
23260	LocalPort *string `json:"localPort,omitempty"`
23261	// 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.
23262	RemotePort *string `json:"remotePort,omitempty"`
23263	// LocalIPAddress - The local IP address. Acceptable values are valid IPv4 addresses.
23264	LocalIPAddress *string `json:"localIPAddress,omitempty"`
23265	// RemoteIPAddress - The remote IP address. Acceptable values are valid IPv4 addresses.
23266	RemoteIPAddress *string `json:"remoteIPAddress,omitempty"`
23267	// 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).
23268	TargetNicResourceID *string `json:"targetNicResourceId,omitempty"`
23269}
23270
23271// VerificationIPFlowResult results of IP flow verification on the target resource.
23272type VerificationIPFlowResult struct {
23273	autorest.Response `json:"-"`
23274	// Access - Indicates whether the traffic is allowed or denied. Possible values include: 'Allow', 'Deny'
23275	Access Access `json:"access,omitempty"`
23276	// RuleName - Name of the rule. If input is not matched against any security rule, it is not displayed.
23277	RuleName *string `json:"ruleName,omitempty"`
23278}
23279
23280// VirtualHub virtualHub Resource.
23281type VirtualHub struct {
23282	autorest.Response `json:"-"`
23283	// VirtualHubProperties - Properties of the virtual hub.
23284	*VirtualHubProperties `json:"properties,omitempty"`
23285	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
23286	Etag *string `json:"etag,omitempty"`
23287	// ID - Resource ID.
23288	ID *string `json:"id,omitempty"`
23289	// Name - READ-ONLY; Resource name.
23290	Name *string `json:"name,omitempty"`
23291	// Type - READ-ONLY; Resource type.
23292	Type *string `json:"type,omitempty"`
23293	// Location - Resource location.
23294	Location *string `json:"location,omitempty"`
23295	// Tags - Resource tags.
23296	Tags map[string]*string `json:"tags"`
23297}
23298
23299// MarshalJSON is the custom marshaler for VirtualHub.
23300func (vh VirtualHub) MarshalJSON() ([]byte, error) {
23301	objectMap := make(map[string]interface{})
23302	if vh.VirtualHubProperties != nil {
23303		objectMap["properties"] = vh.VirtualHubProperties
23304	}
23305	if vh.ID != nil {
23306		objectMap["id"] = vh.ID
23307	}
23308	if vh.Location != nil {
23309		objectMap["location"] = vh.Location
23310	}
23311	if vh.Tags != nil {
23312		objectMap["tags"] = vh.Tags
23313	}
23314	return json.Marshal(objectMap)
23315}
23316
23317// UnmarshalJSON is the custom unmarshaler for VirtualHub struct.
23318func (vh *VirtualHub) UnmarshalJSON(body []byte) error {
23319	var m map[string]*json.RawMessage
23320	err := json.Unmarshal(body, &m)
23321	if err != nil {
23322		return err
23323	}
23324	for k, v := range m {
23325		switch k {
23326		case "properties":
23327			if v != nil {
23328				var virtualHubProperties VirtualHubProperties
23329				err = json.Unmarshal(*v, &virtualHubProperties)
23330				if err != nil {
23331					return err
23332				}
23333				vh.VirtualHubProperties = &virtualHubProperties
23334			}
23335		case "etag":
23336			if v != nil {
23337				var etag string
23338				err = json.Unmarshal(*v, &etag)
23339				if err != nil {
23340					return err
23341				}
23342				vh.Etag = &etag
23343			}
23344		case "id":
23345			if v != nil {
23346				var ID string
23347				err = json.Unmarshal(*v, &ID)
23348				if err != nil {
23349					return err
23350				}
23351				vh.ID = &ID
23352			}
23353		case "name":
23354			if v != nil {
23355				var name string
23356				err = json.Unmarshal(*v, &name)
23357				if err != nil {
23358					return err
23359				}
23360				vh.Name = &name
23361			}
23362		case "type":
23363			if v != nil {
23364				var typeVar string
23365				err = json.Unmarshal(*v, &typeVar)
23366				if err != nil {
23367					return err
23368				}
23369				vh.Type = &typeVar
23370			}
23371		case "location":
23372			if v != nil {
23373				var location string
23374				err = json.Unmarshal(*v, &location)
23375				if err != nil {
23376					return err
23377				}
23378				vh.Location = &location
23379			}
23380		case "tags":
23381			if v != nil {
23382				var tags map[string]*string
23383				err = json.Unmarshal(*v, &tags)
23384				if err != nil {
23385					return err
23386				}
23387				vh.Tags = tags
23388			}
23389		}
23390	}
23391
23392	return nil
23393}
23394
23395// VirtualHubID virtual Hub identifier.
23396type VirtualHubID struct {
23397	// ID - The resource URI for the Virtual Hub where the ExpressRoute gateway is or will be deployed. The Virtual Hub resource and the ExpressRoute gateway resource reside in the same subscription.
23398	ID *string `json:"id,omitempty"`
23399}
23400
23401// VirtualHubProperties parameters for VirtualHub
23402type VirtualHubProperties struct {
23403	// VirtualWan - The VirtualWAN to which the VirtualHub belongs
23404	VirtualWan *SubResource `json:"virtualWan,omitempty"`
23405	// VpnGateway - The VpnGateway associated with this VirtualHub
23406	VpnGateway *SubResource `json:"vpnGateway,omitempty"`
23407	// P2SVpnGateway - The P2SVpnGateway associated with this VirtualHub
23408	P2SVpnGateway *SubResource `json:"p2SVpnGateway,omitempty"`
23409	// ExpressRouteGateway - The expressRouteGateway associated with this VirtualHub
23410	ExpressRouteGateway *SubResource `json:"expressRouteGateway,omitempty"`
23411	// VirtualNetworkConnections - List of all vnet connections with this VirtualHub.
23412	VirtualNetworkConnections *[]HubVirtualNetworkConnection `json:"virtualNetworkConnections,omitempty"`
23413	// AddressPrefix - Address-prefix for this VirtualHub.
23414	AddressPrefix *string `json:"addressPrefix,omitempty"`
23415	// RouteTable - The routeTable associated with this virtual hub.
23416	RouteTable *VirtualHubRouteTable `json:"routeTable,omitempty"`
23417	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
23418	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
23419}
23420
23421// VirtualHubRoute virtualHub route
23422type VirtualHubRoute struct {
23423	// AddressPrefixes - List of all addressPrefixes.
23424	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
23425	// NextHopIPAddress - NextHop ip address.
23426	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
23427}
23428
23429// VirtualHubRouteTable virtualHub route table
23430type VirtualHubRouteTable struct {
23431	// Routes - List of all routes.
23432	Routes *[]VirtualHubRoute `json:"routes,omitempty"`
23433}
23434
23435// VirtualHubsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
23436// long-running operation.
23437type VirtualHubsCreateOrUpdateFuture struct {
23438	azure.FutureAPI
23439	// Result returns the result of the asynchronous operation.
23440	// If the operation has not completed it will return an error.
23441	Result func(VirtualHubsClient) (VirtualHub, error)
23442}
23443
23444// VirtualHubsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
23445// operation.
23446type VirtualHubsDeleteFuture struct {
23447	azure.FutureAPI
23448	// Result returns the result of the asynchronous operation.
23449	// If the operation has not completed it will return an error.
23450	Result func(VirtualHubsClient) (autorest.Response, error)
23451}
23452
23453// VirtualHubsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
23454// operation.
23455type VirtualHubsUpdateTagsFuture struct {
23456	azure.FutureAPI
23457	// Result returns the result of the asynchronous operation.
23458	// If the operation has not completed it will return an error.
23459	Result func(VirtualHubsClient) (VirtualHub, error)
23460}
23461
23462// VirtualNetwork virtual Network resource.
23463type VirtualNetwork struct {
23464	autorest.Response `json:"-"`
23465	// VirtualNetworkPropertiesFormat - Properties of the virtual network.
23466	*VirtualNetworkPropertiesFormat `json:"properties,omitempty"`
23467	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
23468	Etag *string `json:"etag,omitempty"`
23469	// ID - Resource ID.
23470	ID *string `json:"id,omitempty"`
23471	// Name - READ-ONLY; Resource name.
23472	Name *string `json:"name,omitempty"`
23473	// Type - READ-ONLY; Resource type.
23474	Type *string `json:"type,omitempty"`
23475	// Location - Resource location.
23476	Location *string `json:"location,omitempty"`
23477	// Tags - Resource tags.
23478	Tags map[string]*string `json:"tags"`
23479}
23480
23481// MarshalJSON is the custom marshaler for VirtualNetwork.
23482func (vn VirtualNetwork) MarshalJSON() ([]byte, error) {
23483	objectMap := make(map[string]interface{})
23484	if vn.VirtualNetworkPropertiesFormat != nil {
23485		objectMap["properties"] = vn.VirtualNetworkPropertiesFormat
23486	}
23487	if vn.Etag != nil {
23488		objectMap["etag"] = vn.Etag
23489	}
23490	if vn.ID != nil {
23491		objectMap["id"] = vn.ID
23492	}
23493	if vn.Location != nil {
23494		objectMap["location"] = vn.Location
23495	}
23496	if vn.Tags != nil {
23497		objectMap["tags"] = vn.Tags
23498	}
23499	return json.Marshal(objectMap)
23500}
23501
23502// UnmarshalJSON is the custom unmarshaler for VirtualNetwork struct.
23503func (vn *VirtualNetwork) UnmarshalJSON(body []byte) error {
23504	var m map[string]*json.RawMessage
23505	err := json.Unmarshal(body, &m)
23506	if err != nil {
23507		return err
23508	}
23509	for k, v := range m {
23510		switch k {
23511		case "properties":
23512			if v != nil {
23513				var virtualNetworkPropertiesFormat VirtualNetworkPropertiesFormat
23514				err = json.Unmarshal(*v, &virtualNetworkPropertiesFormat)
23515				if err != nil {
23516					return err
23517				}
23518				vn.VirtualNetworkPropertiesFormat = &virtualNetworkPropertiesFormat
23519			}
23520		case "etag":
23521			if v != nil {
23522				var etag string
23523				err = json.Unmarshal(*v, &etag)
23524				if err != nil {
23525					return err
23526				}
23527				vn.Etag = &etag
23528			}
23529		case "id":
23530			if v != nil {
23531				var ID string
23532				err = json.Unmarshal(*v, &ID)
23533				if err != nil {
23534					return err
23535				}
23536				vn.ID = &ID
23537			}
23538		case "name":
23539			if v != nil {
23540				var name string
23541				err = json.Unmarshal(*v, &name)
23542				if err != nil {
23543					return err
23544				}
23545				vn.Name = &name
23546			}
23547		case "type":
23548			if v != nil {
23549				var typeVar string
23550				err = json.Unmarshal(*v, &typeVar)
23551				if err != nil {
23552					return err
23553				}
23554				vn.Type = &typeVar
23555			}
23556		case "location":
23557			if v != nil {
23558				var location string
23559				err = json.Unmarshal(*v, &location)
23560				if err != nil {
23561					return err
23562				}
23563				vn.Location = &location
23564			}
23565		case "tags":
23566			if v != nil {
23567				var tags map[string]*string
23568				err = json.Unmarshal(*v, &tags)
23569				if err != nil {
23570					return err
23571				}
23572				vn.Tags = tags
23573			}
23574		}
23575	}
23576
23577	return nil
23578}
23579
23580// VirtualNetworkConnectionGatewayReference a reference to VirtualNetworkGateway or LocalNetworkGateway
23581// resource.
23582type VirtualNetworkConnectionGatewayReference struct {
23583	// ID - The ID of VirtualNetworkGateway or LocalNetworkGateway resource.
23584	ID *string `json:"id,omitempty"`
23585}
23586
23587// VirtualNetworkGateway a common class for general resource information
23588type VirtualNetworkGateway struct {
23589	autorest.Response `json:"-"`
23590	// VirtualNetworkGatewayPropertiesFormat - Properties of the virtual network gateway.
23591	*VirtualNetworkGatewayPropertiesFormat `json:"properties,omitempty"`
23592	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
23593	Etag *string `json:"etag,omitempty"`
23594	// ID - Resource ID.
23595	ID *string `json:"id,omitempty"`
23596	// Name - READ-ONLY; Resource name.
23597	Name *string `json:"name,omitempty"`
23598	// Type - READ-ONLY; Resource type.
23599	Type *string `json:"type,omitempty"`
23600	// Location - Resource location.
23601	Location *string `json:"location,omitempty"`
23602	// Tags - Resource tags.
23603	Tags map[string]*string `json:"tags"`
23604}
23605
23606// MarshalJSON is the custom marshaler for VirtualNetworkGateway.
23607func (vng VirtualNetworkGateway) MarshalJSON() ([]byte, error) {
23608	objectMap := make(map[string]interface{})
23609	if vng.VirtualNetworkGatewayPropertiesFormat != nil {
23610		objectMap["properties"] = vng.VirtualNetworkGatewayPropertiesFormat
23611	}
23612	if vng.Etag != nil {
23613		objectMap["etag"] = vng.Etag
23614	}
23615	if vng.ID != nil {
23616		objectMap["id"] = vng.ID
23617	}
23618	if vng.Location != nil {
23619		objectMap["location"] = vng.Location
23620	}
23621	if vng.Tags != nil {
23622		objectMap["tags"] = vng.Tags
23623	}
23624	return json.Marshal(objectMap)
23625}
23626
23627// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGateway struct.
23628func (vng *VirtualNetworkGateway) UnmarshalJSON(body []byte) error {
23629	var m map[string]*json.RawMessage
23630	err := json.Unmarshal(body, &m)
23631	if err != nil {
23632		return err
23633	}
23634	for k, v := range m {
23635		switch k {
23636		case "properties":
23637			if v != nil {
23638				var virtualNetworkGatewayPropertiesFormat VirtualNetworkGatewayPropertiesFormat
23639				err = json.Unmarshal(*v, &virtualNetworkGatewayPropertiesFormat)
23640				if err != nil {
23641					return err
23642				}
23643				vng.VirtualNetworkGatewayPropertiesFormat = &virtualNetworkGatewayPropertiesFormat
23644			}
23645		case "etag":
23646			if v != nil {
23647				var etag string
23648				err = json.Unmarshal(*v, &etag)
23649				if err != nil {
23650					return err
23651				}
23652				vng.Etag = &etag
23653			}
23654		case "id":
23655			if v != nil {
23656				var ID string
23657				err = json.Unmarshal(*v, &ID)
23658				if err != nil {
23659					return err
23660				}
23661				vng.ID = &ID
23662			}
23663		case "name":
23664			if v != nil {
23665				var name string
23666				err = json.Unmarshal(*v, &name)
23667				if err != nil {
23668					return err
23669				}
23670				vng.Name = &name
23671			}
23672		case "type":
23673			if v != nil {
23674				var typeVar string
23675				err = json.Unmarshal(*v, &typeVar)
23676				if err != nil {
23677					return err
23678				}
23679				vng.Type = &typeVar
23680			}
23681		case "location":
23682			if v != nil {
23683				var location string
23684				err = json.Unmarshal(*v, &location)
23685				if err != nil {
23686					return err
23687				}
23688				vng.Location = &location
23689			}
23690		case "tags":
23691			if v != nil {
23692				var tags map[string]*string
23693				err = json.Unmarshal(*v, &tags)
23694				if err != nil {
23695					return err
23696				}
23697				vng.Tags = tags
23698			}
23699		}
23700	}
23701
23702	return nil
23703}
23704
23705// VirtualNetworkGatewayConnection a common class for general resource information
23706type VirtualNetworkGatewayConnection struct {
23707	autorest.Response `json:"-"`
23708	// VirtualNetworkGatewayConnectionPropertiesFormat - Properties of the virtual network gateway connection.
23709	*VirtualNetworkGatewayConnectionPropertiesFormat `json:"properties,omitempty"`
23710	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
23711	Etag *string `json:"etag,omitempty"`
23712	// ID - Resource ID.
23713	ID *string `json:"id,omitempty"`
23714	// Name - READ-ONLY; Resource name.
23715	Name *string `json:"name,omitempty"`
23716	// Type - READ-ONLY; Resource type.
23717	Type *string `json:"type,omitempty"`
23718	// Location - Resource location.
23719	Location *string `json:"location,omitempty"`
23720	// Tags - Resource tags.
23721	Tags map[string]*string `json:"tags"`
23722}
23723
23724// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnection.
23725func (vngc VirtualNetworkGatewayConnection) MarshalJSON() ([]byte, error) {
23726	objectMap := make(map[string]interface{})
23727	if vngc.VirtualNetworkGatewayConnectionPropertiesFormat != nil {
23728		objectMap["properties"] = vngc.VirtualNetworkGatewayConnectionPropertiesFormat
23729	}
23730	if vngc.Etag != nil {
23731		objectMap["etag"] = vngc.Etag
23732	}
23733	if vngc.ID != nil {
23734		objectMap["id"] = vngc.ID
23735	}
23736	if vngc.Location != nil {
23737		objectMap["location"] = vngc.Location
23738	}
23739	if vngc.Tags != nil {
23740		objectMap["tags"] = vngc.Tags
23741	}
23742	return json.Marshal(objectMap)
23743}
23744
23745// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnection struct.
23746func (vngc *VirtualNetworkGatewayConnection) UnmarshalJSON(body []byte) error {
23747	var m map[string]*json.RawMessage
23748	err := json.Unmarshal(body, &m)
23749	if err != nil {
23750		return err
23751	}
23752	for k, v := range m {
23753		switch k {
23754		case "properties":
23755			if v != nil {
23756				var virtualNetworkGatewayConnectionPropertiesFormat VirtualNetworkGatewayConnectionPropertiesFormat
23757				err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionPropertiesFormat)
23758				if err != nil {
23759					return err
23760				}
23761				vngc.VirtualNetworkGatewayConnectionPropertiesFormat = &virtualNetworkGatewayConnectionPropertiesFormat
23762			}
23763		case "etag":
23764			if v != nil {
23765				var etag string
23766				err = json.Unmarshal(*v, &etag)
23767				if err != nil {
23768					return err
23769				}
23770				vngc.Etag = &etag
23771			}
23772		case "id":
23773			if v != nil {
23774				var ID string
23775				err = json.Unmarshal(*v, &ID)
23776				if err != nil {
23777					return err
23778				}
23779				vngc.ID = &ID
23780			}
23781		case "name":
23782			if v != nil {
23783				var name string
23784				err = json.Unmarshal(*v, &name)
23785				if err != nil {
23786					return err
23787				}
23788				vngc.Name = &name
23789			}
23790		case "type":
23791			if v != nil {
23792				var typeVar string
23793				err = json.Unmarshal(*v, &typeVar)
23794				if err != nil {
23795					return err
23796				}
23797				vngc.Type = &typeVar
23798			}
23799		case "location":
23800			if v != nil {
23801				var location string
23802				err = json.Unmarshal(*v, &location)
23803				if err != nil {
23804					return err
23805				}
23806				vngc.Location = &location
23807			}
23808		case "tags":
23809			if v != nil {
23810				var tags map[string]*string
23811				err = json.Unmarshal(*v, &tags)
23812				if err != nil {
23813					return err
23814				}
23815				vngc.Tags = tags
23816			}
23817		}
23818	}
23819
23820	return nil
23821}
23822
23823// VirtualNetworkGatewayConnectionListEntity a common class for general resource information
23824type VirtualNetworkGatewayConnectionListEntity struct {
23825	// VirtualNetworkGatewayConnectionListEntityPropertiesFormat - Properties of the virtual network gateway connection.
23826	*VirtualNetworkGatewayConnectionListEntityPropertiesFormat `json:"properties,omitempty"`
23827	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
23828	Etag *string `json:"etag,omitempty"`
23829	// ID - Resource ID.
23830	ID *string `json:"id,omitempty"`
23831	// Name - READ-ONLY; Resource name.
23832	Name *string `json:"name,omitempty"`
23833	// Type - READ-ONLY; Resource type.
23834	Type *string `json:"type,omitempty"`
23835	// Location - Resource location.
23836	Location *string `json:"location,omitempty"`
23837	// Tags - Resource tags.
23838	Tags map[string]*string `json:"tags"`
23839}
23840
23841// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListEntity.
23842func (vngcle VirtualNetworkGatewayConnectionListEntity) MarshalJSON() ([]byte, error) {
23843	objectMap := make(map[string]interface{})
23844	if vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat != nil {
23845		objectMap["properties"] = vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat
23846	}
23847	if vngcle.Etag != nil {
23848		objectMap["etag"] = vngcle.Etag
23849	}
23850	if vngcle.ID != nil {
23851		objectMap["id"] = vngcle.ID
23852	}
23853	if vngcle.Location != nil {
23854		objectMap["location"] = vngcle.Location
23855	}
23856	if vngcle.Tags != nil {
23857		objectMap["tags"] = vngcle.Tags
23858	}
23859	return json.Marshal(objectMap)
23860}
23861
23862// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnectionListEntity struct.
23863func (vngcle *VirtualNetworkGatewayConnectionListEntity) UnmarshalJSON(body []byte) error {
23864	var m map[string]*json.RawMessage
23865	err := json.Unmarshal(body, &m)
23866	if err != nil {
23867		return err
23868	}
23869	for k, v := range m {
23870		switch k {
23871		case "properties":
23872			if v != nil {
23873				var virtualNetworkGatewayConnectionListEntityPropertiesFormat VirtualNetworkGatewayConnectionListEntityPropertiesFormat
23874				err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionListEntityPropertiesFormat)
23875				if err != nil {
23876					return err
23877				}
23878				vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat = &virtualNetworkGatewayConnectionListEntityPropertiesFormat
23879			}
23880		case "etag":
23881			if v != nil {
23882				var etag string
23883				err = json.Unmarshal(*v, &etag)
23884				if err != nil {
23885					return err
23886				}
23887				vngcle.Etag = &etag
23888			}
23889		case "id":
23890			if v != nil {
23891				var ID string
23892				err = json.Unmarshal(*v, &ID)
23893				if err != nil {
23894					return err
23895				}
23896				vngcle.ID = &ID
23897			}
23898		case "name":
23899			if v != nil {
23900				var name string
23901				err = json.Unmarshal(*v, &name)
23902				if err != nil {
23903					return err
23904				}
23905				vngcle.Name = &name
23906			}
23907		case "type":
23908			if v != nil {
23909				var typeVar string
23910				err = json.Unmarshal(*v, &typeVar)
23911				if err != nil {
23912					return err
23913				}
23914				vngcle.Type = &typeVar
23915			}
23916		case "location":
23917			if v != nil {
23918				var location string
23919				err = json.Unmarshal(*v, &location)
23920				if err != nil {
23921					return err
23922				}
23923				vngcle.Location = &location
23924			}
23925		case "tags":
23926			if v != nil {
23927				var tags map[string]*string
23928				err = json.Unmarshal(*v, &tags)
23929				if err != nil {
23930					return err
23931				}
23932				vngcle.Tags = tags
23933			}
23934		}
23935	}
23936
23937	return nil
23938}
23939
23940// VirtualNetworkGatewayConnectionListEntityPropertiesFormat virtualNetworkGatewayConnection properties
23941type VirtualNetworkGatewayConnectionListEntityPropertiesFormat struct {
23942	// AuthorizationKey - The authorizationKey.
23943	AuthorizationKey *string `json:"authorizationKey,omitempty"`
23944	// VirtualNetworkGateway1 - The reference to virtual network gateway resource.
23945	VirtualNetworkGateway1 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway1,omitempty"`
23946	// VirtualNetworkGateway2 - The reference to virtual network gateway resource.
23947	VirtualNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway2,omitempty"`
23948	// LocalNetworkGateway2 - The reference to local network gateway resource.
23949	LocalNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"localNetworkGateway2,omitempty"`
23950	// ConnectionType - Gateway connection type. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'
23951	ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"`
23952	// ConnectionProtocol - Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1'
23953	ConnectionProtocol VirtualNetworkGatewayConnectionProtocol `json:"connectionProtocol,omitempty"`
23954	// RoutingWeight - The routing weight.
23955	RoutingWeight *int32 `json:"routingWeight,omitempty"`
23956	// SharedKey - The IPSec shared key.
23957	SharedKey *string `json:"sharedKey,omitempty"`
23958	// ConnectionStatus - READ-ONLY; Virtual Network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
23959	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
23960	// TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status.
23961	TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"`
23962	// EgressBytesTransferred - READ-ONLY; The egress bytes transferred in this connection.
23963	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
23964	// IngressBytesTransferred - READ-ONLY; The ingress bytes transferred in this connection.
23965	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
23966	// Peer - The reference to peerings resource.
23967	Peer *SubResource `json:"peer,omitempty"`
23968	// EnableBgp - EnableBgp flag
23969	EnableBgp *bool `json:"enableBgp,omitempty"`
23970	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
23971	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
23972	// IpsecPolicies - The IPSec Policies to be considered by this connection.
23973	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
23974	// ResourceGUID - The resource GUID property of the VirtualNetworkGatewayConnection resource.
23975	ResourceGUID *string `json:"resourceGuid,omitempty"`
23976	// ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGatewayConnection resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
23977	ProvisioningState *string `json:"provisioningState,omitempty"`
23978	// ExpressRouteGatewayBypass - Bypass ExpressRoute Gateway for data forwarding
23979	ExpressRouteGatewayBypass *bool `json:"expressRouteGatewayBypass,omitempty"`
23980}
23981
23982// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListEntityPropertiesFormat.
23983func (vngclepf VirtualNetworkGatewayConnectionListEntityPropertiesFormat) MarshalJSON() ([]byte, error) {
23984	objectMap := make(map[string]interface{})
23985	if vngclepf.AuthorizationKey != nil {
23986		objectMap["authorizationKey"] = vngclepf.AuthorizationKey
23987	}
23988	if vngclepf.VirtualNetworkGateway1 != nil {
23989		objectMap["virtualNetworkGateway1"] = vngclepf.VirtualNetworkGateway1
23990	}
23991	if vngclepf.VirtualNetworkGateway2 != nil {
23992		objectMap["virtualNetworkGateway2"] = vngclepf.VirtualNetworkGateway2
23993	}
23994	if vngclepf.LocalNetworkGateway2 != nil {
23995		objectMap["localNetworkGateway2"] = vngclepf.LocalNetworkGateway2
23996	}
23997	if vngclepf.ConnectionType != "" {
23998		objectMap["connectionType"] = vngclepf.ConnectionType
23999	}
24000	if vngclepf.ConnectionProtocol != "" {
24001		objectMap["connectionProtocol"] = vngclepf.ConnectionProtocol
24002	}
24003	if vngclepf.RoutingWeight != nil {
24004		objectMap["routingWeight"] = vngclepf.RoutingWeight
24005	}
24006	if vngclepf.SharedKey != nil {
24007		objectMap["sharedKey"] = vngclepf.SharedKey
24008	}
24009	if vngclepf.Peer != nil {
24010		objectMap["peer"] = vngclepf.Peer
24011	}
24012	if vngclepf.EnableBgp != nil {
24013		objectMap["enableBgp"] = vngclepf.EnableBgp
24014	}
24015	if vngclepf.UsePolicyBasedTrafficSelectors != nil {
24016		objectMap["usePolicyBasedTrafficSelectors"] = vngclepf.UsePolicyBasedTrafficSelectors
24017	}
24018	if vngclepf.IpsecPolicies != nil {
24019		objectMap["ipsecPolicies"] = vngclepf.IpsecPolicies
24020	}
24021	if vngclepf.ResourceGUID != nil {
24022		objectMap["resourceGuid"] = vngclepf.ResourceGUID
24023	}
24024	if vngclepf.ExpressRouteGatewayBypass != nil {
24025		objectMap["expressRouteGatewayBypass"] = vngclepf.ExpressRouteGatewayBypass
24026	}
24027	return json.Marshal(objectMap)
24028}
24029
24030// VirtualNetworkGatewayConnectionListResult response for the ListVirtualNetworkGatewayConnections API
24031// service call
24032type VirtualNetworkGatewayConnectionListResult struct {
24033	autorest.Response `json:"-"`
24034	// Value - Gets a list of VirtualNetworkGatewayConnection resources that exists in a resource group.
24035	Value *[]VirtualNetworkGatewayConnection `json:"value,omitempty"`
24036	// NextLink - READ-ONLY; The URL to get the next set of results.
24037	NextLink *string `json:"nextLink,omitempty"`
24038}
24039
24040// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListResult.
24041func (vngclr VirtualNetworkGatewayConnectionListResult) MarshalJSON() ([]byte, error) {
24042	objectMap := make(map[string]interface{})
24043	if vngclr.Value != nil {
24044		objectMap["value"] = vngclr.Value
24045	}
24046	return json.Marshal(objectMap)
24047}
24048
24049// VirtualNetworkGatewayConnectionListResultIterator provides access to a complete listing of
24050// VirtualNetworkGatewayConnection values.
24051type VirtualNetworkGatewayConnectionListResultIterator struct {
24052	i    int
24053	page VirtualNetworkGatewayConnectionListResultPage
24054}
24055
24056// NextWithContext advances to the next value.  If there was an error making
24057// the request the iterator does not advance and the error is returned.
24058func (iter *VirtualNetworkGatewayConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
24059	if tracing.IsEnabled() {
24060		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultIterator.NextWithContext")
24061		defer func() {
24062			sc := -1
24063			if iter.Response().Response.Response != nil {
24064				sc = iter.Response().Response.Response.StatusCode
24065			}
24066			tracing.EndSpan(ctx, sc, err)
24067		}()
24068	}
24069	iter.i++
24070	if iter.i < len(iter.page.Values()) {
24071		return nil
24072	}
24073	err = iter.page.NextWithContext(ctx)
24074	if err != nil {
24075		iter.i--
24076		return err
24077	}
24078	iter.i = 0
24079	return nil
24080}
24081
24082// Next advances to the next value.  If there was an error making
24083// the request the iterator does not advance and the error is returned.
24084// Deprecated: Use NextWithContext() instead.
24085func (iter *VirtualNetworkGatewayConnectionListResultIterator) Next() error {
24086	return iter.NextWithContext(context.Background())
24087}
24088
24089// NotDone returns true if the enumeration should be started or is not yet complete.
24090func (iter VirtualNetworkGatewayConnectionListResultIterator) NotDone() bool {
24091	return iter.page.NotDone() && iter.i < len(iter.page.Values())
24092}
24093
24094// Response returns the raw server response from the last page request.
24095func (iter VirtualNetworkGatewayConnectionListResultIterator) Response() VirtualNetworkGatewayConnectionListResult {
24096	return iter.page.Response()
24097}
24098
24099// Value returns the current value or a zero-initialized value if the
24100// iterator has advanced beyond the end of the collection.
24101func (iter VirtualNetworkGatewayConnectionListResultIterator) Value() VirtualNetworkGatewayConnection {
24102	if !iter.page.NotDone() {
24103		return VirtualNetworkGatewayConnection{}
24104	}
24105	return iter.page.Values()[iter.i]
24106}
24107
24108// Creates a new instance of the VirtualNetworkGatewayConnectionListResultIterator type.
24109func NewVirtualNetworkGatewayConnectionListResultIterator(page VirtualNetworkGatewayConnectionListResultPage) VirtualNetworkGatewayConnectionListResultIterator {
24110	return VirtualNetworkGatewayConnectionListResultIterator{page: page}
24111}
24112
24113// IsEmpty returns true if the ListResult contains no values.
24114func (vngclr VirtualNetworkGatewayConnectionListResult) IsEmpty() bool {
24115	return vngclr.Value == nil || len(*vngclr.Value) == 0
24116}
24117
24118// hasNextLink returns true if the NextLink is not empty.
24119func (vngclr VirtualNetworkGatewayConnectionListResult) hasNextLink() bool {
24120	return vngclr.NextLink != nil && len(*vngclr.NextLink) != 0
24121}
24122
24123// virtualNetworkGatewayConnectionListResultPreparer prepares a request to retrieve the next set of results.
24124// It returns nil if no more results exist.
24125func (vngclr VirtualNetworkGatewayConnectionListResult) virtualNetworkGatewayConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
24126	if !vngclr.hasNextLink() {
24127		return nil, nil
24128	}
24129	return autorest.Prepare((&http.Request{}).WithContext(ctx),
24130		autorest.AsJSON(),
24131		autorest.AsGet(),
24132		autorest.WithBaseURL(to.String(vngclr.NextLink)))
24133}
24134
24135// VirtualNetworkGatewayConnectionListResultPage contains a page of VirtualNetworkGatewayConnection values.
24136type VirtualNetworkGatewayConnectionListResultPage struct {
24137	fn     func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)
24138	vngclr VirtualNetworkGatewayConnectionListResult
24139}
24140
24141// NextWithContext advances to the next page of values.  If there was an error making
24142// the request the page does not advance and the error is returned.
24143func (page *VirtualNetworkGatewayConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
24144	if tracing.IsEnabled() {
24145		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultPage.NextWithContext")
24146		defer func() {
24147			sc := -1
24148			if page.Response().Response.Response != nil {
24149				sc = page.Response().Response.Response.StatusCode
24150			}
24151			tracing.EndSpan(ctx, sc, err)
24152		}()
24153	}
24154	for {
24155		next, err := page.fn(ctx, page.vngclr)
24156		if err != nil {
24157			return err
24158		}
24159		page.vngclr = next
24160		if !next.hasNextLink() || !next.IsEmpty() {
24161			break
24162		}
24163	}
24164	return nil
24165}
24166
24167// Next advances to the next page of values.  If there was an error making
24168// the request the page does not advance and the error is returned.
24169// Deprecated: Use NextWithContext() instead.
24170func (page *VirtualNetworkGatewayConnectionListResultPage) Next() error {
24171	return page.NextWithContext(context.Background())
24172}
24173
24174// NotDone returns true if the page enumeration should be started or is not yet complete.
24175func (page VirtualNetworkGatewayConnectionListResultPage) NotDone() bool {
24176	return !page.vngclr.IsEmpty()
24177}
24178
24179// Response returns the raw server response from the last page request.
24180func (page VirtualNetworkGatewayConnectionListResultPage) Response() VirtualNetworkGatewayConnectionListResult {
24181	return page.vngclr
24182}
24183
24184// Values returns the slice of values for the current page or nil if there are no values.
24185func (page VirtualNetworkGatewayConnectionListResultPage) Values() []VirtualNetworkGatewayConnection {
24186	if page.vngclr.IsEmpty() {
24187		return nil
24188	}
24189	return *page.vngclr.Value
24190}
24191
24192// Creates a new instance of the VirtualNetworkGatewayConnectionListResultPage type.
24193func NewVirtualNetworkGatewayConnectionListResultPage(cur VirtualNetworkGatewayConnectionListResult, getNextPage func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)) VirtualNetworkGatewayConnectionListResultPage {
24194	return VirtualNetworkGatewayConnectionListResultPage{
24195		fn:     getNextPage,
24196		vngclr: cur,
24197	}
24198}
24199
24200// VirtualNetworkGatewayConnectionPropertiesFormat virtualNetworkGatewayConnection properties
24201type VirtualNetworkGatewayConnectionPropertiesFormat struct {
24202	// AuthorizationKey - The authorizationKey.
24203	AuthorizationKey *string `json:"authorizationKey,omitempty"`
24204	// VirtualNetworkGateway1 - The reference to virtual network gateway resource.
24205	VirtualNetworkGateway1 *VirtualNetworkGateway `json:"virtualNetworkGateway1,omitempty"`
24206	// VirtualNetworkGateway2 - The reference to virtual network gateway resource.
24207	VirtualNetworkGateway2 *VirtualNetworkGateway `json:"virtualNetworkGateway2,omitempty"`
24208	// LocalNetworkGateway2 - The reference to local network gateway resource.
24209	LocalNetworkGateway2 *LocalNetworkGateway `json:"localNetworkGateway2,omitempty"`
24210	// ConnectionType - Gateway connection type. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'
24211	ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"`
24212	// ConnectionProtocol - Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1'
24213	ConnectionProtocol VirtualNetworkGatewayConnectionProtocol `json:"connectionProtocol,omitempty"`
24214	// RoutingWeight - The routing weight.
24215	RoutingWeight *int32 `json:"routingWeight,omitempty"`
24216	// SharedKey - The IPSec shared key.
24217	SharedKey *string `json:"sharedKey,omitempty"`
24218	// ConnectionStatus - READ-ONLY; Virtual Network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
24219	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
24220	// TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status.
24221	TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"`
24222	// EgressBytesTransferred - READ-ONLY; The egress bytes transferred in this connection.
24223	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
24224	// IngressBytesTransferred - READ-ONLY; The ingress bytes transferred in this connection.
24225	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
24226	// Peer - The reference to peerings resource.
24227	Peer *SubResource `json:"peer,omitempty"`
24228	// EnableBgp - EnableBgp flag
24229	EnableBgp *bool `json:"enableBgp,omitempty"`
24230	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
24231	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
24232	// IpsecPolicies - The IPSec Policies to be considered by this connection.
24233	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
24234	// ResourceGUID - The resource GUID property of the VirtualNetworkGatewayConnection resource.
24235	ResourceGUID *string `json:"resourceGuid,omitempty"`
24236	// ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGatewayConnection resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
24237	ProvisioningState *string `json:"provisioningState,omitempty"`
24238	// ExpressRouteGatewayBypass - Bypass ExpressRoute Gateway for data forwarding
24239	ExpressRouteGatewayBypass *bool `json:"expressRouteGatewayBypass,omitempty"`
24240}
24241
24242// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionPropertiesFormat.
24243func (vngcpf VirtualNetworkGatewayConnectionPropertiesFormat) MarshalJSON() ([]byte, error) {
24244	objectMap := make(map[string]interface{})
24245	if vngcpf.AuthorizationKey != nil {
24246		objectMap["authorizationKey"] = vngcpf.AuthorizationKey
24247	}
24248	if vngcpf.VirtualNetworkGateway1 != nil {
24249		objectMap["virtualNetworkGateway1"] = vngcpf.VirtualNetworkGateway1
24250	}
24251	if vngcpf.VirtualNetworkGateway2 != nil {
24252		objectMap["virtualNetworkGateway2"] = vngcpf.VirtualNetworkGateway2
24253	}
24254	if vngcpf.LocalNetworkGateway2 != nil {
24255		objectMap["localNetworkGateway2"] = vngcpf.LocalNetworkGateway2
24256	}
24257	if vngcpf.ConnectionType != "" {
24258		objectMap["connectionType"] = vngcpf.ConnectionType
24259	}
24260	if vngcpf.ConnectionProtocol != "" {
24261		objectMap["connectionProtocol"] = vngcpf.ConnectionProtocol
24262	}
24263	if vngcpf.RoutingWeight != nil {
24264		objectMap["routingWeight"] = vngcpf.RoutingWeight
24265	}
24266	if vngcpf.SharedKey != nil {
24267		objectMap["sharedKey"] = vngcpf.SharedKey
24268	}
24269	if vngcpf.Peer != nil {
24270		objectMap["peer"] = vngcpf.Peer
24271	}
24272	if vngcpf.EnableBgp != nil {
24273		objectMap["enableBgp"] = vngcpf.EnableBgp
24274	}
24275	if vngcpf.UsePolicyBasedTrafficSelectors != nil {
24276		objectMap["usePolicyBasedTrafficSelectors"] = vngcpf.UsePolicyBasedTrafficSelectors
24277	}
24278	if vngcpf.IpsecPolicies != nil {
24279		objectMap["ipsecPolicies"] = vngcpf.IpsecPolicies
24280	}
24281	if vngcpf.ResourceGUID != nil {
24282		objectMap["resourceGuid"] = vngcpf.ResourceGUID
24283	}
24284	if vngcpf.ExpressRouteGatewayBypass != nil {
24285		objectMap["expressRouteGatewayBypass"] = vngcpf.ExpressRouteGatewayBypass
24286	}
24287	return json.Marshal(objectMap)
24288}
24289
24290// VirtualNetworkGatewayConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
24291// results of a long-running operation.
24292type VirtualNetworkGatewayConnectionsCreateOrUpdateFuture struct {
24293	azure.FutureAPI
24294	// Result returns the result of the asynchronous operation.
24295	// If the operation has not completed it will return an error.
24296	Result func(VirtualNetworkGatewayConnectionsClient) (VirtualNetworkGatewayConnection, error)
24297}
24298
24299// VirtualNetworkGatewayConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of
24300// a long-running operation.
24301type VirtualNetworkGatewayConnectionsDeleteFuture struct {
24302	azure.FutureAPI
24303	// Result returns the result of the asynchronous operation.
24304	// If the operation has not completed it will return an error.
24305	Result func(VirtualNetworkGatewayConnectionsClient) (autorest.Response, error)
24306}
24307
24308// VirtualNetworkGatewayConnectionsResetSharedKeyFuture an abstraction for monitoring and retrieving the
24309// results of a long-running operation.
24310type VirtualNetworkGatewayConnectionsResetSharedKeyFuture struct {
24311	azure.FutureAPI
24312	// Result returns the result of the asynchronous operation.
24313	// If the operation has not completed it will return an error.
24314	Result func(VirtualNetworkGatewayConnectionsClient) (ConnectionResetSharedKey, error)
24315}
24316
24317// VirtualNetworkGatewayConnectionsSetSharedKeyFuture an abstraction for monitoring and retrieving the
24318// results of a long-running operation.
24319type VirtualNetworkGatewayConnectionsSetSharedKeyFuture struct {
24320	azure.FutureAPI
24321	// Result returns the result of the asynchronous operation.
24322	// If the operation has not completed it will return an error.
24323	Result func(VirtualNetworkGatewayConnectionsClient) (ConnectionSharedKey, error)
24324}
24325
24326// VirtualNetworkGatewayConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the
24327// results of a long-running operation.
24328type VirtualNetworkGatewayConnectionsUpdateTagsFuture struct {
24329	azure.FutureAPI
24330	// Result returns the result of the asynchronous operation.
24331	// If the operation has not completed it will return an error.
24332	Result func(VirtualNetworkGatewayConnectionsClient) (VirtualNetworkGatewayConnection, error)
24333}
24334
24335// VirtualNetworkGatewayIPConfiguration IP configuration for virtual network gateway
24336type VirtualNetworkGatewayIPConfiguration struct {
24337	// VirtualNetworkGatewayIPConfigurationPropertiesFormat - Properties of the virtual network gateway ip configuration.
24338	*VirtualNetworkGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"`
24339	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
24340	Name *string `json:"name,omitempty"`
24341	// Etag - A unique read-only string that changes whenever the resource is updated.
24342	Etag *string `json:"etag,omitempty"`
24343	// ID - Resource ID.
24344	ID *string `json:"id,omitempty"`
24345}
24346
24347// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfiguration.
24348func (vngic VirtualNetworkGatewayIPConfiguration) MarshalJSON() ([]byte, error) {
24349	objectMap := make(map[string]interface{})
24350	if vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat != nil {
24351		objectMap["properties"] = vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat
24352	}
24353	if vngic.Name != nil {
24354		objectMap["name"] = vngic.Name
24355	}
24356	if vngic.Etag != nil {
24357		objectMap["etag"] = vngic.Etag
24358	}
24359	if vngic.ID != nil {
24360		objectMap["id"] = vngic.ID
24361	}
24362	return json.Marshal(objectMap)
24363}
24364
24365// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayIPConfiguration struct.
24366func (vngic *VirtualNetworkGatewayIPConfiguration) UnmarshalJSON(body []byte) error {
24367	var m map[string]*json.RawMessage
24368	err := json.Unmarshal(body, &m)
24369	if err != nil {
24370		return err
24371	}
24372	for k, v := range m {
24373		switch k {
24374		case "properties":
24375			if v != nil {
24376				var virtualNetworkGatewayIPConfigurationPropertiesFormat VirtualNetworkGatewayIPConfigurationPropertiesFormat
24377				err = json.Unmarshal(*v, &virtualNetworkGatewayIPConfigurationPropertiesFormat)
24378				if err != nil {
24379					return err
24380				}
24381				vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat = &virtualNetworkGatewayIPConfigurationPropertiesFormat
24382			}
24383		case "name":
24384			if v != nil {
24385				var name string
24386				err = json.Unmarshal(*v, &name)
24387				if err != nil {
24388					return err
24389				}
24390				vngic.Name = &name
24391			}
24392		case "etag":
24393			if v != nil {
24394				var etag string
24395				err = json.Unmarshal(*v, &etag)
24396				if err != nil {
24397					return err
24398				}
24399				vngic.Etag = &etag
24400			}
24401		case "id":
24402			if v != nil {
24403				var ID string
24404				err = json.Unmarshal(*v, &ID)
24405				if err != nil {
24406					return err
24407				}
24408				vngic.ID = &ID
24409			}
24410		}
24411	}
24412
24413	return nil
24414}
24415
24416// VirtualNetworkGatewayIPConfigurationPropertiesFormat properties of VirtualNetworkGatewayIPConfiguration
24417type VirtualNetworkGatewayIPConfigurationPropertiesFormat struct {
24418	// PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'Static', 'Dynamic'
24419	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
24420	// Subnet - The reference of the subnet resource.
24421	Subnet *SubResource `json:"subnet,omitempty"`
24422	// PublicIPAddress - The reference of the public IP resource.
24423	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
24424	// ProvisioningState - READ-ONLY; The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
24425	ProvisioningState *string `json:"provisioningState,omitempty"`
24426}
24427
24428// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfigurationPropertiesFormat.
24429func (vngicpf VirtualNetworkGatewayIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
24430	objectMap := make(map[string]interface{})
24431	if vngicpf.PrivateIPAllocationMethod != "" {
24432		objectMap["privateIPAllocationMethod"] = vngicpf.PrivateIPAllocationMethod
24433	}
24434	if vngicpf.Subnet != nil {
24435		objectMap["subnet"] = vngicpf.Subnet
24436	}
24437	if vngicpf.PublicIPAddress != nil {
24438		objectMap["publicIPAddress"] = vngicpf.PublicIPAddress
24439	}
24440	return json.Marshal(objectMap)
24441}
24442
24443// VirtualNetworkGatewayListConnectionsResult response for the VirtualNetworkGatewayListConnections API
24444// service call
24445type VirtualNetworkGatewayListConnectionsResult struct {
24446	autorest.Response `json:"-"`
24447	// Value - Gets a list of VirtualNetworkGatewayConnection resources that exists in a resource group.
24448	Value *[]VirtualNetworkGatewayConnectionListEntity `json:"value,omitempty"`
24449	// NextLink - READ-ONLY; The URL to get the next set of results.
24450	NextLink *string `json:"nextLink,omitempty"`
24451}
24452
24453// MarshalJSON is the custom marshaler for VirtualNetworkGatewayListConnectionsResult.
24454func (vnglcr VirtualNetworkGatewayListConnectionsResult) MarshalJSON() ([]byte, error) {
24455	objectMap := make(map[string]interface{})
24456	if vnglcr.Value != nil {
24457		objectMap["value"] = vnglcr.Value
24458	}
24459	return json.Marshal(objectMap)
24460}
24461
24462// VirtualNetworkGatewayListConnectionsResultIterator provides access to a complete listing of
24463// VirtualNetworkGatewayConnectionListEntity values.
24464type VirtualNetworkGatewayListConnectionsResultIterator struct {
24465	i    int
24466	page VirtualNetworkGatewayListConnectionsResultPage
24467}
24468
24469// NextWithContext advances to the next value.  If there was an error making
24470// the request the iterator does not advance and the error is returned.
24471func (iter *VirtualNetworkGatewayListConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
24472	if tracing.IsEnabled() {
24473		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultIterator.NextWithContext")
24474		defer func() {
24475			sc := -1
24476			if iter.Response().Response.Response != nil {
24477				sc = iter.Response().Response.Response.StatusCode
24478			}
24479			tracing.EndSpan(ctx, sc, err)
24480		}()
24481	}
24482	iter.i++
24483	if iter.i < len(iter.page.Values()) {
24484		return nil
24485	}
24486	err = iter.page.NextWithContext(ctx)
24487	if err != nil {
24488		iter.i--
24489		return err
24490	}
24491	iter.i = 0
24492	return nil
24493}
24494
24495// Next advances to the next value.  If there was an error making
24496// the request the iterator does not advance and the error is returned.
24497// Deprecated: Use NextWithContext() instead.
24498func (iter *VirtualNetworkGatewayListConnectionsResultIterator) Next() error {
24499	return iter.NextWithContext(context.Background())
24500}
24501
24502// NotDone returns true if the enumeration should be started or is not yet complete.
24503func (iter VirtualNetworkGatewayListConnectionsResultIterator) NotDone() bool {
24504	return iter.page.NotDone() && iter.i < len(iter.page.Values())
24505}
24506
24507// Response returns the raw server response from the last page request.
24508func (iter VirtualNetworkGatewayListConnectionsResultIterator) Response() VirtualNetworkGatewayListConnectionsResult {
24509	return iter.page.Response()
24510}
24511
24512// Value returns the current value or a zero-initialized value if the
24513// iterator has advanced beyond the end of the collection.
24514func (iter VirtualNetworkGatewayListConnectionsResultIterator) Value() VirtualNetworkGatewayConnectionListEntity {
24515	if !iter.page.NotDone() {
24516		return VirtualNetworkGatewayConnectionListEntity{}
24517	}
24518	return iter.page.Values()[iter.i]
24519}
24520
24521// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultIterator type.
24522func NewVirtualNetworkGatewayListConnectionsResultIterator(page VirtualNetworkGatewayListConnectionsResultPage) VirtualNetworkGatewayListConnectionsResultIterator {
24523	return VirtualNetworkGatewayListConnectionsResultIterator{page: page}
24524}
24525
24526// IsEmpty returns true if the ListResult contains no values.
24527func (vnglcr VirtualNetworkGatewayListConnectionsResult) IsEmpty() bool {
24528	return vnglcr.Value == nil || len(*vnglcr.Value) == 0
24529}
24530
24531// hasNextLink returns true if the NextLink is not empty.
24532func (vnglcr VirtualNetworkGatewayListConnectionsResult) hasNextLink() bool {
24533	return vnglcr.NextLink != nil && len(*vnglcr.NextLink) != 0
24534}
24535
24536// virtualNetworkGatewayListConnectionsResultPreparer prepares a request to retrieve the next set of results.
24537// It returns nil if no more results exist.
24538func (vnglcr VirtualNetworkGatewayListConnectionsResult) virtualNetworkGatewayListConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
24539	if !vnglcr.hasNextLink() {
24540		return nil, nil
24541	}
24542	return autorest.Prepare((&http.Request{}).WithContext(ctx),
24543		autorest.AsJSON(),
24544		autorest.AsGet(),
24545		autorest.WithBaseURL(to.String(vnglcr.NextLink)))
24546}
24547
24548// VirtualNetworkGatewayListConnectionsResultPage contains a page of
24549// VirtualNetworkGatewayConnectionListEntity values.
24550type VirtualNetworkGatewayListConnectionsResultPage struct {
24551	fn     func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)
24552	vnglcr VirtualNetworkGatewayListConnectionsResult
24553}
24554
24555// NextWithContext advances to the next page of values.  If there was an error making
24556// the request the page does not advance and the error is returned.
24557func (page *VirtualNetworkGatewayListConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
24558	if tracing.IsEnabled() {
24559		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultPage.NextWithContext")
24560		defer func() {
24561			sc := -1
24562			if page.Response().Response.Response != nil {
24563				sc = page.Response().Response.Response.StatusCode
24564			}
24565			tracing.EndSpan(ctx, sc, err)
24566		}()
24567	}
24568	for {
24569		next, err := page.fn(ctx, page.vnglcr)
24570		if err != nil {
24571			return err
24572		}
24573		page.vnglcr = next
24574		if !next.hasNextLink() || !next.IsEmpty() {
24575			break
24576		}
24577	}
24578	return nil
24579}
24580
24581// Next advances to the next page of values.  If there was an error making
24582// the request the page does not advance and the error is returned.
24583// Deprecated: Use NextWithContext() instead.
24584func (page *VirtualNetworkGatewayListConnectionsResultPage) Next() error {
24585	return page.NextWithContext(context.Background())
24586}
24587
24588// NotDone returns true if the page enumeration should be started or is not yet complete.
24589func (page VirtualNetworkGatewayListConnectionsResultPage) NotDone() bool {
24590	return !page.vnglcr.IsEmpty()
24591}
24592
24593// Response returns the raw server response from the last page request.
24594func (page VirtualNetworkGatewayListConnectionsResultPage) Response() VirtualNetworkGatewayListConnectionsResult {
24595	return page.vnglcr
24596}
24597
24598// Values returns the slice of values for the current page or nil if there are no values.
24599func (page VirtualNetworkGatewayListConnectionsResultPage) Values() []VirtualNetworkGatewayConnectionListEntity {
24600	if page.vnglcr.IsEmpty() {
24601		return nil
24602	}
24603	return *page.vnglcr.Value
24604}
24605
24606// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultPage type.
24607func NewVirtualNetworkGatewayListConnectionsResultPage(cur VirtualNetworkGatewayListConnectionsResult, getNextPage func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)) VirtualNetworkGatewayListConnectionsResultPage {
24608	return VirtualNetworkGatewayListConnectionsResultPage{
24609		fn:     getNextPage,
24610		vnglcr: cur,
24611	}
24612}
24613
24614// VirtualNetworkGatewayListResult response for the ListVirtualNetworkGateways API service call.
24615type VirtualNetworkGatewayListResult struct {
24616	autorest.Response `json:"-"`
24617	// Value - Gets a list of VirtualNetworkGateway resources that exists in a resource group.
24618	Value *[]VirtualNetworkGateway `json:"value,omitempty"`
24619	// NextLink - READ-ONLY; The URL to get the next set of results.
24620	NextLink *string `json:"nextLink,omitempty"`
24621}
24622
24623// MarshalJSON is the custom marshaler for VirtualNetworkGatewayListResult.
24624func (vnglr VirtualNetworkGatewayListResult) MarshalJSON() ([]byte, error) {
24625	objectMap := make(map[string]interface{})
24626	if vnglr.Value != nil {
24627		objectMap["value"] = vnglr.Value
24628	}
24629	return json.Marshal(objectMap)
24630}
24631
24632// VirtualNetworkGatewayListResultIterator provides access to a complete listing of VirtualNetworkGateway
24633// values.
24634type VirtualNetworkGatewayListResultIterator struct {
24635	i    int
24636	page VirtualNetworkGatewayListResultPage
24637}
24638
24639// NextWithContext advances to the next value.  If there was an error making
24640// the request the iterator does not advance and the error is returned.
24641func (iter *VirtualNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
24642	if tracing.IsEnabled() {
24643		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultIterator.NextWithContext")
24644		defer func() {
24645			sc := -1
24646			if iter.Response().Response.Response != nil {
24647				sc = iter.Response().Response.Response.StatusCode
24648			}
24649			tracing.EndSpan(ctx, sc, err)
24650		}()
24651	}
24652	iter.i++
24653	if iter.i < len(iter.page.Values()) {
24654		return nil
24655	}
24656	err = iter.page.NextWithContext(ctx)
24657	if err != nil {
24658		iter.i--
24659		return err
24660	}
24661	iter.i = 0
24662	return nil
24663}
24664
24665// Next advances to the next value.  If there was an error making
24666// the request the iterator does not advance and the error is returned.
24667// Deprecated: Use NextWithContext() instead.
24668func (iter *VirtualNetworkGatewayListResultIterator) Next() error {
24669	return iter.NextWithContext(context.Background())
24670}
24671
24672// NotDone returns true if the enumeration should be started or is not yet complete.
24673func (iter VirtualNetworkGatewayListResultIterator) NotDone() bool {
24674	return iter.page.NotDone() && iter.i < len(iter.page.Values())
24675}
24676
24677// Response returns the raw server response from the last page request.
24678func (iter VirtualNetworkGatewayListResultIterator) Response() VirtualNetworkGatewayListResult {
24679	return iter.page.Response()
24680}
24681
24682// Value returns the current value or a zero-initialized value if the
24683// iterator has advanced beyond the end of the collection.
24684func (iter VirtualNetworkGatewayListResultIterator) Value() VirtualNetworkGateway {
24685	if !iter.page.NotDone() {
24686		return VirtualNetworkGateway{}
24687	}
24688	return iter.page.Values()[iter.i]
24689}
24690
24691// Creates a new instance of the VirtualNetworkGatewayListResultIterator type.
24692func NewVirtualNetworkGatewayListResultIterator(page VirtualNetworkGatewayListResultPage) VirtualNetworkGatewayListResultIterator {
24693	return VirtualNetworkGatewayListResultIterator{page: page}
24694}
24695
24696// IsEmpty returns true if the ListResult contains no values.
24697func (vnglr VirtualNetworkGatewayListResult) IsEmpty() bool {
24698	return vnglr.Value == nil || len(*vnglr.Value) == 0
24699}
24700
24701// hasNextLink returns true if the NextLink is not empty.
24702func (vnglr VirtualNetworkGatewayListResult) hasNextLink() bool {
24703	return vnglr.NextLink != nil && len(*vnglr.NextLink) != 0
24704}
24705
24706// virtualNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results.
24707// It returns nil if no more results exist.
24708func (vnglr VirtualNetworkGatewayListResult) virtualNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
24709	if !vnglr.hasNextLink() {
24710		return nil, nil
24711	}
24712	return autorest.Prepare((&http.Request{}).WithContext(ctx),
24713		autorest.AsJSON(),
24714		autorest.AsGet(),
24715		autorest.WithBaseURL(to.String(vnglr.NextLink)))
24716}
24717
24718// VirtualNetworkGatewayListResultPage contains a page of VirtualNetworkGateway values.
24719type VirtualNetworkGatewayListResultPage struct {
24720	fn    func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)
24721	vnglr VirtualNetworkGatewayListResult
24722}
24723
24724// NextWithContext advances to the next page of values.  If there was an error making
24725// the request the page does not advance and the error is returned.
24726func (page *VirtualNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
24727	if tracing.IsEnabled() {
24728		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultPage.NextWithContext")
24729		defer func() {
24730			sc := -1
24731			if page.Response().Response.Response != nil {
24732				sc = page.Response().Response.Response.StatusCode
24733			}
24734			tracing.EndSpan(ctx, sc, err)
24735		}()
24736	}
24737	for {
24738		next, err := page.fn(ctx, page.vnglr)
24739		if err != nil {
24740			return err
24741		}
24742		page.vnglr = next
24743		if !next.hasNextLink() || !next.IsEmpty() {
24744			break
24745		}
24746	}
24747	return nil
24748}
24749
24750// Next advances to the next page of values.  If there was an error making
24751// the request the page does not advance and the error is returned.
24752// Deprecated: Use NextWithContext() instead.
24753func (page *VirtualNetworkGatewayListResultPage) Next() error {
24754	return page.NextWithContext(context.Background())
24755}
24756
24757// NotDone returns true if the page enumeration should be started or is not yet complete.
24758func (page VirtualNetworkGatewayListResultPage) NotDone() bool {
24759	return !page.vnglr.IsEmpty()
24760}
24761
24762// Response returns the raw server response from the last page request.
24763func (page VirtualNetworkGatewayListResultPage) Response() VirtualNetworkGatewayListResult {
24764	return page.vnglr
24765}
24766
24767// Values returns the slice of values for the current page or nil if there are no values.
24768func (page VirtualNetworkGatewayListResultPage) Values() []VirtualNetworkGateway {
24769	if page.vnglr.IsEmpty() {
24770		return nil
24771	}
24772	return *page.vnglr.Value
24773}
24774
24775// Creates a new instance of the VirtualNetworkGatewayListResultPage type.
24776func NewVirtualNetworkGatewayListResultPage(cur VirtualNetworkGatewayListResult, getNextPage func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)) VirtualNetworkGatewayListResultPage {
24777	return VirtualNetworkGatewayListResultPage{
24778		fn:    getNextPage,
24779		vnglr: cur,
24780	}
24781}
24782
24783// VirtualNetworkGatewayPropertiesFormat virtualNetworkGateway properties
24784type VirtualNetworkGatewayPropertiesFormat struct {
24785	// IPConfigurations - IP configurations for virtual network gateway.
24786	IPConfigurations *[]VirtualNetworkGatewayIPConfiguration `json:"ipConfigurations,omitempty"`
24787	// GatewayType - The type of this virtual network gateway. Possible values are: 'Vpn' and 'ExpressRoute'. Possible values include: 'VirtualNetworkGatewayTypeVpn', 'VirtualNetworkGatewayTypeExpressRoute'
24788	GatewayType VirtualNetworkGatewayType `json:"gatewayType,omitempty"`
24789	// VpnType - The type of this virtual network gateway. Possible values are: 'PolicyBased' and 'RouteBased'. Possible values include: 'PolicyBased', 'RouteBased'
24790	VpnType VpnType `json:"vpnType,omitempty"`
24791	// EnableBgp - Whether BGP is enabled for this virtual network gateway or not.
24792	EnableBgp *bool `json:"enableBgp,omitempty"`
24793	// ActiveActive - ActiveActive flag
24794	ActiveActive *bool `json:"activeActive,omitempty"`
24795	// 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.
24796	GatewayDefaultSite *SubResource `json:"gatewayDefaultSite,omitempty"`
24797	// Sku - The reference of the VirtualNetworkGatewaySku resource which represents the SKU selected for Virtual network gateway.
24798	Sku *VirtualNetworkGatewaySku `json:"sku,omitempty"`
24799	// VpnClientConfiguration - The reference of the VpnClientConfiguration resource which represents the P2S VpnClient configurations.
24800	VpnClientConfiguration *VpnClientConfiguration `json:"vpnClientConfiguration,omitempty"`
24801	// BgpSettings - Virtual network gateway's BGP speaker settings.
24802	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
24803	// CustomRoutes - The reference of the address space resource which represents the custom routes address space specified by the customer for virtual network gateway and VpnClient.
24804	CustomRoutes *AddressSpace `json:"customRoutes,omitempty"`
24805	// ResourceGUID - The resource GUID property of the VirtualNetworkGateway resource.
24806	ResourceGUID *string `json:"resourceGuid,omitempty"`
24807	// ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
24808	ProvisioningState *string `json:"provisioningState,omitempty"`
24809}
24810
24811// MarshalJSON is the custom marshaler for VirtualNetworkGatewayPropertiesFormat.
24812func (vngpf VirtualNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
24813	objectMap := make(map[string]interface{})
24814	if vngpf.IPConfigurations != nil {
24815		objectMap["ipConfigurations"] = vngpf.IPConfigurations
24816	}
24817	if vngpf.GatewayType != "" {
24818		objectMap["gatewayType"] = vngpf.GatewayType
24819	}
24820	if vngpf.VpnType != "" {
24821		objectMap["vpnType"] = vngpf.VpnType
24822	}
24823	if vngpf.EnableBgp != nil {
24824		objectMap["enableBgp"] = vngpf.EnableBgp
24825	}
24826	if vngpf.ActiveActive != nil {
24827		objectMap["activeActive"] = vngpf.ActiveActive
24828	}
24829	if vngpf.GatewayDefaultSite != nil {
24830		objectMap["gatewayDefaultSite"] = vngpf.GatewayDefaultSite
24831	}
24832	if vngpf.Sku != nil {
24833		objectMap["sku"] = vngpf.Sku
24834	}
24835	if vngpf.VpnClientConfiguration != nil {
24836		objectMap["vpnClientConfiguration"] = vngpf.VpnClientConfiguration
24837	}
24838	if vngpf.BgpSettings != nil {
24839		objectMap["bgpSettings"] = vngpf.BgpSettings
24840	}
24841	if vngpf.CustomRoutes != nil {
24842		objectMap["customRoutes"] = vngpf.CustomRoutes
24843	}
24844	if vngpf.ResourceGUID != nil {
24845		objectMap["resourceGuid"] = vngpf.ResourceGUID
24846	}
24847	return json.Marshal(objectMap)
24848}
24849
24850// VirtualNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
24851// long-running operation.
24852type VirtualNetworkGatewaysCreateOrUpdateFuture struct {
24853	azure.FutureAPI
24854	// Result returns the result of the asynchronous operation.
24855	// If the operation has not completed it will return an error.
24856	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
24857}
24858
24859// VirtualNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
24860// long-running operation.
24861type VirtualNetworkGatewaysDeleteFuture struct {
24862	azure.FutureAPI
24863	// Result returns the result of the asynchronous operation.
24864	// If the operation has not completed it will return an error.
24865	Result func(VirtualNetworkGatewaysClient) (autorest.Response, error)
24866}
24867
24868// VirtualNetworkGatewaysGeneratevpnclientpackageFuture an abstraction for monitoring and retrieving the
24869// results of a long-running operation.
24870type VirtualNetworkGatewaysGeneratevpnclientpackageFuture struct {
24871	azure.FutureAPI
24872	// Result returns the result of the asynchronous operation.
24873	// If the operation has not completed it will return an error.
24874	Result func(VirtualNetworkGatewaysClient) (String, error)
24875}
24876
24877// VirtualNetworkGatewaysGenerateVpnProfileFuture an abstraction for monitoring and retrieving the results
24878// of a long-running operation.
24879type VirtualNetworkGatewaysGenerateVpnProfileFuture struct {
24880	azure.FutureAPI
24881	// Result returns the result of the asynchronous operation.
24882	// If the operation has not completed it will return an error.
24883	Result func(VirtualNetworkGatewaysClient) (String, error)
24884}
24885
24886// VirtualNetworkGatewaysGetAdvertisedRoutesFuture an abstraction for monitoring and retrieving the results
24887// of a long-running operation.
24888type VirtualNetworkGatewaysGetAdvertisedRoutesFuture struct {
24889	azure.FutureAPI
24890	// Result returns the result of the asynchronous operation.
24891	// If the operation has not completed it will return an error.
24892	Result func(VirtualNetworkGatewaysClient) (GatewayRouteListResult, error)
24893}
24894
24895// VirtualNetworkGatewaysGetBgpPeerStatusFuture an abstraction for monitoring and retrieving the results of
24896// a long-running operation.
24897type VirtualNetworkGatewaysGetBgpPeerStatusFuture struct {
24898	azure.FutureAPI
24899	// Result returns the result of the asynchronous operation.
24900	// If the operation has not completed it will return an error.
24901	Result func(VirtualNetworkGatewaysClient) (BgpPeerStatusListResult, error)
24902}
24903
24904// VirtualNetworkGatewaysGetLearnedRoutesFuture an abstraction for monitoring and retrieving the results of
24905// a long-running operation.
24906type VirtualNetworkGatewaysGetLearnedRoutesFuture struct {
24907	azure.FutureAPI
24908	// Result returns the result of the asynchronous operation.
24909	// If the operation has not completed it will return an error.
24910	Result func(VirtualNetworkGatewaysClient) (GatewayRouteListResult, error)
24911}
24912
24913// VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture an abstraction for monitoring and retrieving the
24914// results of a long-running operation.
24915type VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture struct {
24916	azure.FutureAPI
24917	// Result returns the result of the asynchronous operation.
24918	// If the operation has not completed it will return an error.
24919	Result func(VirtualNetworkGatewaysClient) (VpnClientIPsecParameters, error)
24920}
24921
24922// VirtualNetworkGatewaysGetVpnProfilePackageURLFuture an abstraction for monitoring and retrieving the
24923// results of a long-running operation.
24924type VirtualNetworkGatewaysGetVpnProfilePackageURLFuture struct {
24925	azure.FutureAPI
24926	// Result returns the result of the asynchronous operation.
24927	// If the operation has not completed it will return an error.
24928	Result func(VirtualNetworkGatewaysClient) (String, error)
24929}
24930
24931// VirtualNetworkGatewaySku virtualNetworkGatewaySku details
24932type VirtualNetworkGatewaySku struct {
24933	// Name - Gateway SKU name. Possible values include: 'VirtualNetworkGatewaySkuNameBasic', 'VirtualNetworkGatewaySkuNameHighPerformance', 'VirtualNetworkGatewaySkuNameStandard', 'VirtualNetworkGatewaySkuNameUltraPerformance', 'VirtualNetworkGatewaySkuNameVpnGw1', 'VirtualNetworkGatewaySkuNameVpnGw2', 'VirtualNetworkGatewaySkuNameVpnGw3', 'VirtualNetworkGatewaySkuNameVpnGw1AZ', 'VirtualNetworkGatewaySkuNameVpnGw2AZ', 'VirtualNetworkGatewaySkuNameVpnGw3AZ', 'VirtualNetworkGatewaySkuNameErGw1AZ', 'VirtualNetworkGatewaySkuNameErGw2AZ', 'VirtualNetworkGatewaySkuNameErGw3AZ'
24934	Name VirtualNetworkGatewaySkuName `json:"name,omitempty"`
24935	// Tier - Gateway SKU tier. Possible values include: 'VirtualNetworkGatewaySkuTierBasic', 'VirtualNetworkGatewaySkuTierHighPerformance', 'VirtualNetworkGatewaySkuTierStandard', 'VirtualNetworkGatewaySkuTierUltraPerformance', 'VirtualNetworkGatewaySkuTierVpnGw1', 'VirtualNetworkGatewaySkuTierVpnGw2', 'VirtualNetworkGatewaySkuTierVpnGw3', 'VirtualNetworkGatewaySkuTierVpnGw1AZ', 'VirtualNetworkGatewaySkuTierVpnGw2AZ', 'VirtualNetworkGatewaySkuTierVpnGw3AZ', 'VirtualNetworkGatewaySkuTierErGw1AZ', 'VirtualNetworkGatewaySkuTierErGw2AZ', 'VirtualNetworkGatewaySkuTierErGw3AZ'
24936	Tier VirtualNetworkGatewaySkuTier `json:"tier,omitempty"`
24937	// Capacity - The capacity.
24938	Capacity *int32 `json:"capacity,omitempty"`
24939}
24940
24941// VirtualNetworkGatewaysResetFuture an abstraction for monitoring and retrieving the results of a
24942// long-running operation.
24943type VirtualNetworkGatewaysResetFuture struct {
24944	azure.FutureAPI
24945	// Result returns the result of the asynchronous operation.
24946	// If the operation has not completed it will return an error.
24947	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
24948}
24949
24950// VirtualNetworkGatewaysResetVpnClientSharedKeyFuture an abstraction for monitoring and retrieving the
24951// results of a long-running operation.
24952type VirtualNetworkGatewaysResetVpnClientSharedKeyFuture struct {
24953	azure.FutureAPI
24954	// Result returns the result of the asynchronous operation.
24955	// If the operation has not completed it will return an error.
24956	Result func(VirtualNetworkGatewaysClient) (autorest.Response, error)
24957}
24958
24959// VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture an abstraction for monitoring and retrieving the
24960// results of a long-running operation.
24961type VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture struct {
24962	azure.FutureAPI
24963	// Result returns the result of the asynchronous operation.
24964	// If the operation has not completed it will return an error.
24965	Result func(VirtualNetworkGatewaysClient) (VpnClientIPsecParameters, error)
24966}
24967
24968// VirtualNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
24969// long-running operation.
24970type VirtualNetworkGatewaysUpdateTagsFuture struct {
24971	azure.FutureAPI
24972	// Result returns the result of the asynchronous operation.
24973	// If the operation has not completed it will return an error.
24974	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
24975}
24976
24977// VirtualNetworkListResult response for the ListVirtualNetworks API service call.
24978type VirtualNetworkListResult struct {
24979	autorest.Response `json:"-"`
24980	// Value - Gets a list of VirtualNetwork resources in a resource group.
24981	Value *[]VirtualNetwork `json:"value,omitempty"`
24982	// NextLink - The URL to get the next set of results.
24983	NextLink *string `json:"nextLink,omitempty"`
24984}
24985
24986// VirtualNetworkListResultIterator provides access to a complete listing of VirtualNetwork values.
24987type VirtualNetworkListResultIterator struct {
24988	i    int
24989	page VirtualNetworkListResultPage
24990}
24991
24992// NextWithContext advances to the next value.  If there was an error making
24993// the request the iterator does not advance and the error is returned.
24994func (iter *VirtualNetworkListResultIterator) NextWithContext(ctx context.Context) (err error) {
24995	if tracing.IsEnabled() {
24996		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultIterator.NextWithContext")
24997		defer func() {
24998			sc := -1
24999			if iter.Response().Response.Response != nil {
25000				sc = iter.Response().Response.Response.StatusCode
25001			}
25002			tracing.EndSpan(ctx, sc, err)
25003		}()
25004	}
25005	iter.i++
25006	if iter.i < len(iter.page.Values()) {
25007		return nil
25008	}
25009	err = iter.page.NextWithContext(ctx)
25010	if err != nil {
25011		iter.i--
25012		return err
25013	}
25014	iter.i = 0
25015	return nil
25016}
25017
25018// Next advances to the next value.  If there was an error making
25019// the request the iterator does not advance and the error is returned.
25020// Deprecated: Use NextWithContext() instead.
25021func (iter *VirtualNetworkListResultIterator) Next() error {
25022	return iter.NextWithContext(context.Background())
25023}
25024
25025// NotDone returns true if the enumeration should be started or is not yet complete.
25026func (iter VirtualNetworkListResultIterator) NotDone() bool {
25027	return iter.page.NotDone() && iter.i < len(iter.page.Values())
25028}
25029
25030// Response returns the raw server response from the last page request.
25031func (iter VirtualNetworkListResultIterator) Response() VirtualNetworkListResult {
25032	return iter.page.Response()
25033}
25034
25035// Value returns the current value or a zero-initialized value if the
25036// iterator has advanced beyond the end of the collection.
25037func (iter VirtualNetworkListResultIterator) Value() VirtualNetwork {
25038	if !iter.page.NotDone() {
25039		return VirtualNetwork{}
25040	}
25041	return iter.page.Values()[iter.i]
25042}
25043
25044// Creates a new instance of the VirtualNetworkListResultIterator type.
25045func NewVirtualNetworkListResultIterator(page VirtualNetworkListResultPage) VirtualNetworkListResultIterator {
25046	return VirtualNetworkListResultIterator{page: page}
25047}
25048
25049// IsEmpty returns true if the ListResult contains no values.
25050func (vnlr VirtualNetworkListResult) IsEmpty() bool {
25051	return vnlr.Value == nil || len(*vnlr.Value) == 0
25052}
25053
25054// hasNextLink returns true if the NextLink is not empty.
25055func (vnlr VirtualNetworkListResult) hasNextLink() bool {
25056	return vnlr.NextLink != nil && len(*vnlr.NextLink) != 0
25057}
25058
25059// virtualNetworkListResultPreparer prepares a request to retrieve the next set of results.
25060// It returns nil if no more results exist.
25061func (vnlr VirtualNetworkListResult) virtualNetworkListResultPreparer(ctx context.Context) (*http.Request, error) {
25062	if !vnlr.hasNextLink() {
25063		return nil, nil
25064	}
25065	return autorest.Prepare((&http.Request{}).WithContext(ctx),
25066		autorest.AsJSON(),
25067		autorest.AsGet(),
25068		autorest.WithBaseURL(to.String(vnlr.NextLink)))
25069}
25070
25071// VirtualNetworkListResultPage contains a page of VirtualNetwork values.
25072type VirtualNetworkListResultPage struct {
25073	fn   func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)
25074	vnlr VirtualNetworkListResult
25075}
25076
25077// NextWithContext advances to the next page of values.  If there was an error making
25078// the request the page does not advance and the error is returned.
25079func (page *VirtualNetworkListResultPage) NextWithContext(ctx context.Context) (err error) {
25080	if tracing.IsEnabled() {
25081		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultPage.NextWithContext")
25082		defer func() {
25083			sc := -1
25084			if page.Response().Response.Response != nil {
25085				sc = page.Response().Response.Response.StatusCode
25086			}
25087			tracing.EndSpan(ctx, sc, err)
25088		}()
25089	}
25090	for {
25091		next, err := page.fn(ctx, page.vnlr)
25092		if err != nil {
25093			return err
25094		}
25095		page.vnlr = next
25096		if !next.hasNextLink() || !next.IsEmpty() {
25097			break
25098		}
25099	}
25100	return nil
25101}
25102
25103// Next advances to the next page of values.  If there was an error making
25104// the request the page does not advance and the error is returned.
25105// Deprecated: Use NextWithContext() instead.
25106func (page *VirtualNetworkListResultPage) Next() error {
25107	return page.NextWithContext(context.Background())
25108}
25109
25110// NotDone returns true if the page enumeration should be started or is not yet complete.
25111func (page VirtualNetworkListResultPage) NotDone() bool {
25112	return !page.vnlr.IsEmpty()
25113}
25114
25115// Response returns the raw server response from the last page request.
25116func (page VirtualNetworkListResultPage) Response() VirtualNetworkListResult {
25117	return page.vnlr
25118}
25119
25120// Values returns the slice of values for the current page or nil if there are no values.
25121func (page VirtualNetworkListResultPage) Values() []VirtualNetwork {
25122	if page.vnlr.IsEmpty() {
25123		return nil
25124	}
25125	return *page.vnlr.Value
25126}
25127
25128// Creates a new instance of the VirtualNetworkListResultPage type.
25129func NewVirtualNetworkListResultPage(cur VirtualNetworkListResult, getNextPage func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)) VirtualNetworkListResultPage {
25130	return VirtualNetworkListResultPage{
25131		fn:   getNextPage,
25132		vnlr: cur,
25133	}
25134}
25135
25136// VirtualNetworkListUsageResult response for the virtual networks GetUsage API service call.
25137type VirtualNetworkListUsageResult struct {
25138	autorest.Response `json:"-"`
25139	// Value - READ-ONLY; VirtualNetwork usage stats.
25140	Value *[]VirtualNetworkUsage `json:"value,omitempty"`
25141	// NextLink - The URL to get the next set of results.
25142	NextLink *string `json:"nextLink,omitempty"`
25143}
25144
25145// MarshalJSON is the custom marshaler for VirtualNetworkListUsageResult.
25146func (vnlur VirtualNetworkListUsageResult) MarshalJSON() ([]byte, error) {
25147	objectMap := make(map[string]interface{})
25148	if vnlur.NextLink != nil {
25149		objectMap["nextLink"] = vnlur.NextLink
25150	}
25151	return json.Marshal(objectMap)
25152}
25153
25154// VirtualNetworkListUsageResultIterator provides access to a complete listing of VirtualNetworkUsage
25155// values.
25156type VirtualNetworkListUsageResultIterator struct {
25157	i    int
25158	page VirtualNetworkListUsageResultPage
25159}
25160
25161// NextWithContext advances to the next value.  If there was an error making
25162// the request the iterator does not advance and the error is returned.
25163func (iter *VirtualNetworkListUsageResultIterator) NextWithContext(ctx context.Context) (err error) {
25164	if tracing.IsEnabled() {
25165		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultIterator.NextWithContext")
25166		defer func() {
25167			sc := -1
25168			if iter.Response().Response.Response != nil {
25169				sc = iter.Response().Response.Response.StatusCode
25170			}
25171			tracing.EndSpan(ctx, sc, err)
25172		}()
25173	}
25174	iter.i++
25175	if iter.i < len(iter.page.Values()) {
25176		return nil
25177	}
25178	err = iter.page.NextWithContext(ctx)
25179	if err != nil {
25180		iter.i--
25181		return err
25182	}
25183	iter.i = 0
25184	return nil
25185}
25186
25187// Next advances to the next value.  If there was an error making
25188// the request the iterator does not advance and the error is returned.
25189// Deprecated: Use NextWithContext() instead.
25190func (iter *VirtualNetworkListUsageResultIterator) Next() error {
25191	return iter.NextWithContext(context.Background())
25192}
25193
25194// NotDone returns true if the enumeration should be started or is not yet complete.
25195func (iter VirtualNetworkListUsageResultIterator) NotDone() bool {
25196	return iter.page.NotDone() && iter.i < len(iter.page.Values())
25197}
25198
25199// Response returns the raw server response from the last page request.
25200func (iter VirtualNetworkListUsageResultIterator) Response() VirtualNetworkListUsageResult {
25201	return iter.page.Response()
25202}
25203
25204// Value returns the current value or a zero-initialized value if the
25205// iterator has advanced beyond the end of the collection.
25206func (iter VirtualNetworkListUsageResultIterator) Value() VirtualNetworkUsage {
25207	if !iter.page.NotDone() {
25208		return VirtualNetworkUsage{}
25209	}
25210	return iter.page.Values()[iter.i]
25211}
25212
25213// Creates a new instance of the VirtualNetworkListUsageResultIterator type.
25214func NewVirtualNetworkListUsageResultIterator(page VirtualNetworkListUsageResultPage) VirtualNetworkListUsageResultIterator {
25215	return VirtualNetworkListUsageResultIterator{page: page}
25216}
25217
25218// IsEmpty returns true if the ListResult contains no values.
25219func (vnlur VirtualNetworkListUsageResult) IsEmpty() bool {
25220	return vnlur.Value == nil || len(*vnlur.Value) == 0
25221}
25222
25223// hasNextLink returns true if the NextLink is not empty.
25224func (vnlur VirtualNetworkListUsageResult) hasNextLink() bool {
25225	return vnlur.NextLink != nil && len(*vnlur.NextLink) != 0
25226}
25227
25228// virtualNetworkListUsageResultPreparer prepares a request to retrieve the next set of results.
25229// It returns nil if no more results exist.
25230func (vnlur VirtualNetworkListUsageResult) virtualNetworkListUsageResultPreparer(ctx context.Context) (*http.Request, error) {
25231	if !vnlur.hasNextLink() {
25232		return nil, nil
25233	}
25234	return autorest.Prepare((&http.Request{}).WithContext(ctx),
25235		autorest.AsJSON(),
25236		autorest.AsGet(),
25237		autorest.WithBaseURL(to.String(vnlur.NextLink)))
25238}
25239
25240// VirtualNetworkListUsageResultPage contains a page of VirtualNetworkUsage values.
25241type VirtualNetworkListUsageResultPage struct {
25242	fn    func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)
25243	vnlur VirtualNetworkListUsageResult
25244}
25245
25246// NextWithContext advances to the next page of values.  If there was an error making
25247// the request the page does not advance and the error is returned.
25248func (page *VirtualNetworkListUsageResultPage) NextWithContext(ctx context.Context) (err error) {
25249	if tracing.IsEnabled() {
25250		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultPage.NextWithContext")
25251		defer func() {
25252			sc := -1
25253			if page.Response().Response.Response != nil {
25254				sc = page.Response().Response.Response.StatusCode
25255			}
25256			tracing.EndSpan(ctx, sc, err)
25257		}()
25258	}
25259	for {
25260		next, err := page.fn(ctx, page.vnlur)
25261		if err != nil {
25262			return err
25263		}
25264		page.vnlur = next
25265		if !next.hasNextLink() || !next.IsEmpty() {
25266			break
25267		}
25268	}
25269	return nil
25270}
25271
25272// Next advances to the next page of values.  If there was an error making
25273// the request the page does not advance and the error is returned.
25274// Deprecated: Use NextWithContext() instead.
25275func (page *VirtualNetworkListUsageResultPage) Next() error {
25276	return page.NextWithContext(context.Background())
25277}
25278
25279// NotDone returns true if the page enumeration should be started or is not yet complete.
25280func (page VirtualNetworkListUsageResultPage) NotDone() bool {
25281	return !page.vnlur.IsEmpty()
25282}
25283
25284// Response returns the raw server response from the last page request.
25285func (page VirtualNetworkListUsageResultPage) Response() VirtualNetworkListUsageResult {
25286	return page.vnlur
25287}
25288
25289// Values returns the slice of values for the current page or nil if there are no values.
25290func (page VirtualNetworkListUsageResultPage) Values() []VirtualNetworkUsage {
25291	if page.vnlur.IsEmpty() {
25292		return nil
25293	}
25294	return *page.vnlur.Value
25295}
25296
25297// Creates a new instance of the VirtualNetworkListUsageResultPage type.
25298func NewVirtualNetworkListUsageResultPage(cur VirtualNetworkListUsageResult, getNextPage func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)) VirtualNetworkListUsageResultPage {
25299	return VirtualNetworkListUsageResultPage{
25300		fn:    getNextPage,
25301		vnlur: cur,
25302	}
25303}
25304
25305// VirtualNetworkPeering peerings in a virtual network resource.
25306type VirtualNetworkPeering struct {
25307	autorest.Response `json:"-"`
25308	// VirtualNetworkPeeringPropertiesFormat - Properties of the virtual network peering.
25309	*VirtualNetworkPeeringPropertiesFormat `json:"properties,omitempty"`
25310	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
25311	Name *string `json:"name,omitempty"`
25312	// Etag - A unique read-only string that changes whenever the resource is updated.
25313	Etag *string `json:"etag,omitempty"`
25314	// ID - Resource ID.
25315	ID *string `json:"id,omitempty"`
25316}
25317
25318// MarshalJSON is the custom marshaler for VirtualNetworkPeering.
25319func (vnp VirtualNetworkPeering) MarshalJSON() ([]byte, error) {
25320	objectMap := make(map[string]interface{})
25321	if vnp.VirtualNetworkPeeringPropertiesFormat != nil {
25322		objectMap["properties"] = vnp.VirtualNetworkPeeringPropertiesFormat
25323	}
25324	if vnp.Name != nil {
25325		objectMap["name"] = vnp.Name
25326	}
25327	if vnp.Etag != nil {
25328		objectMap["etag"] = vnp.Etag
25329	}
25330	if vnp.ID != nil {
25331		objectMap["id"] = vnp.ID
25332	}
25333	return json.Marshal(objectMap)
25334}
25335
25336// UnmarshalJSON is the custom unmarshaler for VirtualNetworkPeering struct.
25337func (vnp *VirtualNetworkPeering) UnmarshalJSON(body []byte) error {
25338	var m map[string]*json.RawMessage
25339	err := json.Unmarshal(body, &m)
25340	if err != nil {
25341		return err
25342	}
25343	for k, v := range m {
25344		switch k {
25345		case "properties":
25346			if v != nil {
25347				var virtualNetworkPeeringPropertiesFormat VirtualNetworkPeeringPropertiesFormat
25348				err = json.Unmarshal(*v, &virtualNetworkPeeringPropertiesFormat)
25349				if err != nil {
25350					return err
25351				}
25352				vnp.VirtualNetworkPeeringPropertiesFormat = &virtualNetworkPeeringPropertiesFormat
25353			}
25354		case "name":
25355			if v != nil {
25356				var name string
25357				err = json.Unmarshal(*v, &name)
25358				if err != nil {
25359					return err
25360				}
25361				vnp.Name = &name
25362			}
25363		case "etag":
25364			if v != nil {
25365				var etag string
25366				err = json.Unmarshal(*v, &etag)
25367				if err != nil {
25368					return err
25369				}
25370				vnp.Etag = &etag
25371			}
25372		case "id":
25373			if v != nil {
25374				var ID string
25375				err = json.Unmarshal(*v, &ID)
25376				if err != nil {
25377					return err
25378				}
25379				vnp.ID = &ID
25380			}
25381		}
25382	}
25383
25384	return nil
25385}
25386
25387// VirtualNetworkPeeringListResult response for ListSubnets API service call. Retrieves all subnets that
25388// belong to a virtual network.
25389type VirtualNetworkPeeringListResult struct {
25390	autorest.Response `json:"-"`
25391	// Value - The peerings in a virtual network.
25392	Value *[]VirtualNetworkPeering `json:"value,omitempty"`
25393	// NextLink - The URL to get the next set of results.
25394	NextLink *string `json:"nextLink,omitempty"`
25395}
25396
25397// VirtualNetworkPeeringListResultIterator provides access to a complete listing of VirtualNetworkPeering
25398// values.
25399type VirtualNetworkPeeringListResultIterator struct {
25400	i    int
25401	page VirtualNetworkPeeringListResultPage
25402}
25403
25404// NextWithContext advances to the next value.  If there was an error making
25405// the request the iterator does not advance and the error is returned.
25406func (iter *VirtualNetworkPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
25407	if tracing.IsEnabled() {
25408		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultIterator.NextWithContext")
25409		defer func() {
25410			sc := -1
25411			if iter.Response().Response.Response != nil {
25412				sc = iter.Response().Response.Response.StatusCode
25413			}
25414			tracing.EndSpan(ctx, sc, err)
25415		}()
25416	}
25417	iter.i++
25418	if iter.i < len(iter.page.Values()) {
25419		return nil
25420	}
25421	err = iter.page.NextWithContext(ctx)
25422	if err != nil {
25423		iter.i--
25424		return err
25425	}
25426	iter.i = 0
25427	return nil
25428}
25429
25430// Next advances to the next value.  If there was an error making
25431// the request the iterator does not advance and the error is returned.
25432// Deprecated: Use NextWithContext() instead.
25433func (iter *VirtualNetworkPeeringListResultIterator) Next() error {
25434	return iter.NextWithContext(context.Background())
25435}
25436
25437// NotDone returns true if the enumeration should be started or is not yet complete.
25438func (iter VirtualNetworkPeeringListResultIterator) NotDone() bool {
25439	return iter.page.NotDone() && iter.i < len(iter.page.Values())
25440}
25441
25442// Response returns the raw server response from the last page request.
25443func (iter VirtualNetworkPeeringListResultIterator) Response() VirtualNetworkPeeringListResult {
25444	return iter.page.Response()
25445}
25446
25447// Value returns the current value or a zero-initialized value if the
25448// iterator has advanced beyond the end of the collection.
25449func (iter VirtualNetworkPeeringListResultIterator) Value() VirtualNetworkPeering {
25450	if !iter.page.NotDone() {
25451		return VirtualNetworkPeering{}
25452	}
25453	return iter.page.Values()[iter.i]
25454}
25455
25456// Creates a new instance of the VirtualNetworkPeeringListResultIterator type.
25457func NewVirtualNetworkPeeringListResultIterator(page VirtualNetworkPeeringListResultPage) VirtualNetworkPeeringListResultIterator {
25458	return VirtualNetworkPeeringListResultIterator{page: page}
25459}
25460
25461// IsEmpty returns true if the ListResult contains no values.
25462func (vnplr VirtualNetworkPeeringListResult) IsEmpty() bool {
25463	return vnplr.Value == nil || len(*vnplr.Value) == 0
25464}
25465
25466// hasNextLink returns true if the NextLink is not empty.
25467func (vnplr VirtualNetworkPeeringListResult) hasNextLink() bool {
25468	return vnplr.NextLink != nil && len(*vnplr.NextLink) != 0
25469}
25470
25471// virtualNetworkPeeringListResultPreparer prepares a request to retrieve the next set of results.
25472// It returns nil if no more results exist.
25473func (vnplr VirtualNetworkPeeringListResult) virtualNetworkPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
25474	if !vnplr.hasNextLink() {
25475		return nil, nil
25476	}
25477	return autorest.Prepare((&http.Request{}).WithContext(ctx),
25478		autorest.AsJSON(),
25479		autorest.AsGet(),
25480		autorest.WithBaseURL(to.String(vnplr.NextLink)))
25481}
25482
25483// VirtualNetworkPeeringListResultPage contains a page of VirtualNetworkPeering values.
25484type VirtualNetworkPeeringListResultPage struct {
25485	fn    func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)
25486	vnplr VirtualNetworkPeeringListResult
25487}
25488
25489// NextWithContext advances to the next page of values.  If there was an error making
25490// the request the page does not advance and the error is returned.
25491func (page *VirtualNetworkPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
25492	if tracing.IsEnabled() {
25493		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultPage.NextWithContext")
25494		defer func() {
25495			sc := -1
25496			if page.Response().Response.Response != nil {
25497				sc = page.Response().Response.Response.StatusCode
25498			}
25499			tracing.EndSpan(ctx, sc, err)
25500		}()
25501	}
25502	for {
25503		next, err := page.fn(ctx, page.vnplr)
25504		if err != nil {
25505			return err
25506		}
25507		page.vnplr = next
25508		if !next.hasNextLink() || !next.IsEmpty() {
25509			break
25510		}
25511	}
25512	return nil
25513}
25514
25515// Next advances to the next page of values.  If there was an error making
25516// the request the page does not advance and the error is returned.
25517// Deprecated: Use NextWithContext() instead.
25518func (page *VirtualNetworkPeeringListResultPage) Next() error {
25519	return page.NextWithContext(context.Background())
25520}
25521
25522// NotDone returns true if the page enumeration should be started or is not yet complete.
25523func (page VirtualNetworkPeeringListResultPage) NotDone() bool {
25524	return !page.vnplr.IsEmpty()
25525}
25526
25527// Response returns the raw server response from the last page request.
25528func (page VirtualNetworkPeeringListResultPage) Response() VirtualNetworkPeeringListResult {
25529	return page.vnplr
25530}
25531
25532// Values returns the slice of values for the current page or nil if there are no values.
25533func (page VirtualNetworkPeeringListResultPage) Values() []VirtualNetworkPeering {
25534	if page.vnplr.IsEmpty() {
25535		return nil
25536	}
25537	return *page.vnplr.Value
25538}
25539
25540// Creates a new instance of the VirtualNetworkPeeringListResultPage type.
25541func NewVirtualNetworkPeeringListResultPage(cur VirtualNetworkPeeringListResult, getNextPage func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)) VirtualNetworkPeeringListResultPage {
25542	return VirtualNetworkPeeringListResultPage{
25543		fn:    getNextPage,
25544		vnplr: cur,
25545	}
25546}
25547
25548// VirtualNetworkPeeringPropertiesFormat properties of the virtual network peering.
25549type VirtualNetworkPeeringPropertiesFormat struct {
25550	// AllowVirtualNetworkAccess - Whether the VMs in the local virtual network space would be able to access the VMs in remote virtual network space.
25551	AllowVirtualNetworkAccess *bool `json:"allowVirtualNetworkAccess,omitempty"`
25552	// AllowForwardedTraffic - Whether the forwarded traffic from the VMs in the local virtual network will be allowed/disallowed in remote virtual network.
25553	AllowForwardedTraffic *bool `json:"allowForwardedTraffic,omitempty"`
25554	// AllowGatewayTransit - If gateway links can be used in remote virtual networking to link to this virtual network.
25555	AllowGatewayTransit *bool `json:"allowGatewayTransit,omitempty"`
25556	// 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.
25557	UseRemoteGateways *bool `json:"useRemoteGateways,omitempty"`
25558	// 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).
25559	RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"`
25560	// RemoteAddressSpace - The reference of the remote virtual network address space.
25561	RemoteAddressSpace *AddressSpace `json:"remoteAddressSpace,omitempty"`
25562	// PeeringState - The status of the virtual network peering. Possible values are 'Initiated', 'Connected', and 'Disconnected'. Possible values include: 'VirtualNetworkPeeringStateInitiated', 'VirtualNetworkPeeringStateConnected', 'VirtualNetworkPeeringStateDisconnected'
25563	PeeringState VirtualNetworkPeeringState `json:"peeringState,omitempty"`
25564	// ProvisioningState - The provisioning state of the resource.
25565	ProvisioningState *string `json:"provisioningState,omitempty"`
25566}
25567
25568// VirtualNetworkPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
25569// long-running operation.
25570type VirtualNetworkPeeringsCreateOrUpdateFuture struct {
25571	azure.FutureAPI
25572	// Result returns the result of the asynchronous operation.
25573	// If the operation has not completed it will return an error.
25574	Result func(VirtualNetworkPeeringsClient) (VirtualNetworkPeering, error)
25575}
25576
25577// VirtualNetworkPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
25578// long-running operation.
25579type VirtualNetworkPeeringsDeleteFuture struct {
25580	azure.FutureAPI
25581	// Result returns the result of the asynchronous operation.
25582	// If the operation has not completed it will return an error.
25583	Result func(VirtualNetworkPeeringsClient) (autorest.Response, error)
25584}
25585
25586// VirtualNetworkPropertiesFormat properties of the virtual network.
25587type VirtualNetworkPropertiesFormat struct {
25588	// AddressSpace - The AddressSpace that contains an array of IP address ranges that can be used by subnets.
25589	AddressSpace *AddressSpace `json:"addressSpace,omitempty"`
25590	// DhcpOptions - The dhcpOptions that contains an array of DNS servers available to VMs deployed in the virtual network.
25591	DhcpOptions *DhcpOptions `json:"dhcpOptions,omitempty"`
25592	// Subnets - A list of subnets in a Virtual Network.
25593	Subnets *[]Subnet `json:"subnets,omitempty"`
25594	// VirtualNetworkPeerings - A list of peerings in a Virtual Network.
25595	VirtualNetworkPeerings *[]VirtualNetworkPeering `json:"virtualNetworkPeerings,omitempty"`
25596	// ResourceGUID - The resourceGuid property of the Virtual Network resource.
25597	ResourceGUID *string `json:"resourceGuid,omitempty"`
25598	// ProvisioningState - The provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
25599	ProvisioningState *string `json:"provisioningState,omitempty"`
25600	// 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.
25601	EnableDdosProtection *bool `json:"enableDdosProtection,omitempty"`
25602	// EnableVMProtection - Indicates if VM protection is enabled for all the subnets in the virtual network.
25603	EnableVMProtection *bool `json:"enableVmProtection,omitempty"`
25604	// DdosProtectionPlan - The DDoS protection plan associated with the virtual network.
25605	DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"`
25606}
25607
25608// VirtualNetworksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
25609// long-running operation.
25610type VirtualNetworksCreateOrUpdateFuture struct {
25611	azure.FutureAPI
25612	// Result returns the result of the asynchronous operation.
25613	// If the operation has not completed it will return an error.
25614	Result func(VirtualNetworksClient) (VirtualNetwork, error)
25615}
25616
25617// VirtualNetworksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
25618// operation.
25619type VirtualNetworksDeleteFuture struct {
25620	azure.FutureAPI
25621	// Result returns the result of the asynchronous operation.
25622	// If the operation has not completed it will return an error.
25623	Result func(VirtualNetworksClient) (autorest.Response, error)
25624}
25625
25626// VirtualNetworksUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
25627// long-running operation.
25628type VirtualNetworksUpdateTagsFuture struct {
25629	azure.FutureAPI
25630	// Result returns the result of the asynchronous operation.
25631	// If the operation has not completed it will return an error.
25632	Result func(VirtualNetworksClient) (VirtualNetwork, error)
25633}
25634
25635// VirtualNetworkTap virtual Network Tap resource
25636type VirtualNetworkTap struct {
25637	autorest.Response `json:"-"`
25638	// VirtualNetworkTapPropertiesFormat - Virtual Network Tap Properties.
25639	*VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"`
25640	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
25641	Etag *string `json:"etag,omitempty"`
25642	// ID - Resource ID.
25643	ID *string `json:"id,omitempty"`
25644	// Name - READ-ONLY; Resource name.
25645	Name *string `json:"name,omitempty"`
25646	// Type - READ-ONLY; Resource type.
25647	Type *string `json:"type,omitempty"`
25648	// Location - Resource location.
25649	Location *string `json:"location,omitempty"`
25650	// Tags - Resource tags.
25651	Tags map[string]*string `json:"tags"`
25652}
25653
25654// MarshalJSON is the custom marshaler for VirtualNetworkTap.
25655func (vnt VirtualNetworkTap) MarshalJSON() ([]byte, error) {
25656	objectMap := make(map[string]interface{})
25657	if vnt.VirtualNetworkTapPropertiesFormat != nil {
25658		objectMap["properties"] = vnt.VirtualNetworkTapPropertiesFormat
25659	}
25660	if vnt.Etag != nil {
25661		objectMap["etag"] = vnt.Etag
25662	}
25663	if vnt.ID != nil {
25664		objectMap["id"] = vnt.ID
25665	}
25666	if vnt.Location != nil {
25667		objectMap["location"] = vnt.Location
25668	}
25669	if vnt.Tags != nil {
25670		objectMap["tags"] = vnt.Tags
25671	}
25672	return json.Marshal(objectMap)
25673}
25674
25675// UnmarshalJSON is the custom unmarshaler for VirtualNetworkTap struct.
25676func (vnt *VirtualNetworkTap) UnmarshalJSON(body []byte) error {
25677	var m map[string]*json.RawMessage
25678	err := json.Unmarshal(body, &m)
25679	if err != nil {
25680		return err
25681	}
25682	for k, v := range m {
25683		switch k {
25684		case "properties":
25685			if v != nil {
25686				var virtualNetworkTapPropertiesFormat VirtualNetworkTapPropertiesFormat
25687				err = json.Unmarshal(*v, &virtualNetworkTapPropertiesFormat)
25688				if err != nil {
25689					return err
25690				}
25691				vnt.VirtualNetworkTapPropertiesFormat = &virtualNetworkTapPropertiesFormat
25692			}
25693		case "etag":
25694			if v != nil {
25695				var etag string
25696				err = json.Unmarshal(*v, &etag)
25697				if err != nil {
25698					return err
25699				}
25700				vnt.Etag = &etag
25701			}
25702		case "id":
25703			if v != nil {
25704				var ID string
25705				err = json.Unmarshal(*v, &ID)
25706				if err != nil {
25707					return err
25708				}
25709				vnt.ID = &ID
25710			}
25711		case "name":
25712			if v != nil {
25713				var name string
25714				err = json.Unmarshal(*v, &name)
25715				if err != nil {
25716					return err
25717				}
25718				vnt.Name = &name
25719			}
25720		case "type":
25721			if v != nil {
25722				var typeVar string
25723				err = json.Unmarshal(*v, &typeVar)
25724				if err != nil {
25725					return err
25726				}
25727				vnt.Type = &typeVar
25728			}
25729		case "location":
25730			if v != nil {
25731				var location string
25732				err = json.Unmarshal(*v, &location)
25733				if err != nil {
25734					return err
25735				}
25736				vnt.Location = &location
25737			}
25738		case "tags":
25739			if v != nil {
25740				var tags map[string]*string
25741				err = json.Unmarshal(*v, &tags)
25742				if err != nil {
25743					return err
25744				}
25745				vnt.Tags = tags
25746			}
25747		}
25748	}
25749
25750	return nil
25751}
25752
25753// VirtualNetworkTapListResult response for ListVirtualNetworkTap API service call.
25754type VirtualNetworkTapListResult struct {
25755	autorest.Response `json:"-"`
25756	// Value - A list of VirtualNetworkTaps in a resource group.
25757	Value *[]VirtualNetworkTap `json:"value,omitempty"`
25758	// NextLink - The URL to get the next set of results.
25759	NextLink *string `json:"nextLink,omitempty"`
25760}
25761
25762// VirtualNetworkTapListResultIterator provides access to a complete listing of VirtualNetworkTap values.
25763type VirtualNetworkTapListResultIterator struct {
25764	i    int
25765	page VirtualNetworkTapListResultPage
25766}
25767
25768// NextWithContext advances to the next value.  If there was an error making
25769// the request the iterator does not advance and the error is returned.
25770func (iter *VirtualNetworkTapListResultIterator) NextWithContext(ctx context.Context) (err error) {
25771	if tracing.IsEnabled() {
25772		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapListResultIterator.NextWithContext")
25773		defer func() {
25774			sc := -1
25775			if iter.Response().Response.Response != nil {
25776				sc = iter.Response().Response.Response.StatusCode
25777			}
25778			tracing.EndSpan(ctx, sc, err)
25779		}()
25780	}
25781	iter.i++
25782	if iter.i < len(iter.page.Values()) {
25783		return nil
25784	}
25785	err = iter.page.NextWithContext(ctx)
25786	if err != nil {
25787		iter.i--
25788		return err
25789	}
25790	iter.i = 0
25791	return nil
25792}
25793
25794// Next advances to the next value.  If there was an error making
25795// the request the iterator does not advance and the error is returned.
25796// Deprecated: Use NextWithContext() instead.
25797func (iter *VirtualNetworkTapListResultIterator) Next() error {
25798	return iter.NextWithContext(context.Background())
25799}
25800
25801// NotDone returns true if the enumeration should be started or is not yet complete.
25802func (iter VirtualNetworkTapListResultIterator) NotDone() bool {
25803	return iter.page.NotDone() && iter.i < len(iter.page.Values())
25804}
25805
25806// Response returns the raw server response from the last page request.
25807func (iter VirtualNetworkTapListResultIterator) Response() VirtualNetworkTapListResult {
25808	return iter.page.Response()
25809}
25810
25811// Value returns the current value or a zero-initialized value if the
25812// iterator has advanced beyond the end of the collection.
25813func (iter VirtualNetworkTapListResultIterator) Value() VirtualNetworkTap {
25814	if !iter.page.NotDone() {
25815		return VirtualNetworkTap{}
25816	}
25817	return iter.page.Values()[iter.i]
25818}
25819
25820// Creates a new instance of the VirtualNetworkTapListResultIterator type.
25821func NewVirtualNetworkTapListResultIterator(page VirtualNetworkTapListResultPage) VirtualNetworkTapListResultIterator {
25822	return VirtualNetworkTapListResultIterator{page: page}
25823}
25824
25825// IsEmpty returns true if the ListResult contains no values.
25826func (vntlr VirtualNetworkTapListResult) IsEmpty() bool {
25827	return vntlr.Value == nil || len(*vntlr.Value) == 0
25828}
25829
25830// hasNextLink returns true if the NextLink is not empty.
25831func (vntlr VirtualNetworkTapListResult) hasNextLink() bool {
25832	return vntlr.NextLink != nil && len(*vntlr.NextLink) != 0
25833}
25834
25835// virtualNetworkTapListResultPreparer prepares a request to retrieve the next set of results.
25836// It returns nil if no more results exist.
25837func (vntlr VirtualNetworkTapListResult) virtualNetworkTapListResultPreparer(ctx context.Context) (*http.Request, error) {
25838	if !vntlr.hasNextLink() {
25839		return nil, nil
25840	}
25841	return autorest.Prepare((&http.Request{}).WithContext(ctx),
25842		autorest.AsJSON(),
25843		autorest.AsGet(),
25844		autorest.WithBaseURL(to.String(vntlr.NextLink)))
25845}
25846
25847// VirtualNetworkTapListResultPage contains a page of VirtualNetworkTap values.
25848type VirtualNetworkTapListResultPage struct {
25849	fn    func(context.Context, VirtualNetworkTapListResult) (VirtualNetworkTapListResult, error)
25850	vntlr VirtualNetworkTapListResult
25851}
25852
25853// NextWithContext advances to the next page of values.  If there was an error making
25854// the request the page does not advance and the error is returned.
25855func (page *VirtualNetworkTapListResultPage) NextWithContext(ctx context.Context) (err error) {
25856	if tracing.IsEnabled() {
25857		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapListResultPage.NextWithContext")
25858		defer func() {
25859			sc := -1
25860			if page.Response().Response.Response != nil {
25861				sc = page.Response().Response.Response.StatusCode
25862			}
25863			tracing.EndSpan(ctx, sc, err)
25864		}()
25865	}
25866	for {
25867		next, err := page.fn(ctx, page.vntlr)
25868		if err != nil {
25869			return err
25870		}
25871		page.vntlr = next
25872		if !next.hasNextLink() || !next.IsEmpty() {
25873			break
25874		}
25875	}
25876	return nil
25877}
25878
25879// Next advances to the next page of values.  If there was an error making
25880// the request the page does not advance and the error is returned.
25881// Deprecated: Use NextWithContext() instead.
25882func (page *VirtualNetworkTapListResultPage) Next() error {
25883	return page.NextWithContext(context.Background())
25884}
25885
25886// NotDone returns true if the page enumeration should be started or is not yet complete.
25887func (page VirtualNetworkTapListResultPage) NotDone() bool {
25888	return !page.vntlr.IsEmpty()
25889}
25890
25891// Response returns the raw server response from the last page request.
25892func (page VirtualNetworkTapListResultPage) Response() VirtualNetworkTapListResult {
25893	return page.vntlr
25894}
25895
25896// Values returns the slice of values for the current page or nil if there are no values.
25897func (page VirtualNetworkTapListResultPage) Values() []VirtualNetworkTap {
25898	if page.vntlr.IsEmpty() {
25899		return nil
25900	}
25901	return *page.vntlr.Value
25902}
25903
25904// Creates a new instance of the VirtualNetworkTapListResultPage type.
25905func NewVirtualNetworkTapListResultPage(cur VirtualNetworkTapListResult, getNextPage func(context.Context, VirtualNetworkTapListResult) (VirtualNetworkTapListResult, error)) VirtualNetworkTapListResultPage {
25906	return VirtualNetworkTapListResultPage{
25907		fn:    getNextPage,
25908		vntlr: cur,
25909	}
25910}
25911
25912// VirtualNetworkTapPropertiesFormat virtual Network Tap properties.
25913type VirtualNetworkTapPropertiesFormat struct {
25914	// NetworkInterfaceTapConfigurations - READ-ONLY; Specifies the list of resource IDs for the network interface IP configuration that needs to be tapped.
25915	NetworkInterfaceTapConfigurations *[]InterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"`
25916	// ResourceGUID - READ-ONLY; The resourceGuid property of the virtual network tap.
25917	ResourceGUID *string `json:"resourceGuid,omitempty"`
25918	// ProvisioningState - READ-ONLY; The provisioning state of the virtual network tap. Possible values are: 'Updating', 'Deleting', and 'Failed'.
25919	ProvisioningState *string `json:"provisioningState,omitempty"`
25920	// DestinationNetworkInterfaceIPConfiguration - The reference to the private IP Address of the collector nic that will receive the tap
25921	DestinationNetworkInterfaceIPConfiguration *InterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"`
25922	// DestinationLoadBalancerFrontEndIPConfiguration - The reference to the private IP address on the internal Load Balancer that will receive the tap
25923	DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"`
25924	// DestinationPort - The VXLAN destination port that will receive the tapped traffic.
25925	DestinationPort *int32 `json:"destinationPort,omitempty"`
25926}
25927
25928// MarshalJSON is the custom marshaler for VirtualNetworkTapPropertiesFormat.
25929func (vntpf VirtualNetworkTapPropertiesFormat) MarshalJSON() ([]byte, error) {
25930	objectMap := make(map[string]interface{})
25931	if vntpf.DestinationNetworkInterfaceIPConfiguration != nil {
25932		objectMap["destinationNetworkInterfaceIPConfiguration"] = vntpf.DestinationNetworkInterfaceIPConfiguration
25933	}
25934	if vntpf.DestinationLoadBalancerFrontEndIPConfiguration != nil {
25935		objectMap["destinationLoadBalancerFrontEndIPConfiguration"] = vntpf.DestinationLoadBalancerFrontEndIPConfiguration
25936	}
25937	if vntpf.DestinationPort != nil {
25938		objectMap["destinationPort"] = vntpf.DestinationPort
25939	}
25940	return json.Marshal(objectMap)
25941}
25942
25943// VirtualNetworkTapsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
25944// long-running operation.
25945type VirtualNetworkTapsCreateOrUpdateFuture struct {
25946	azure.FutureAPI
25947	// Result returns the result of the asynchronous operation.
25948	// If the operation has not completed it will return an error.
25949	Result func(VirtualNetworkTapsClient) (VirtualNetworkTap, error)
25950}
25951
25952// VirtualNetworkTapsDeleteFuture an abstraction for monitoring and retrieving the results of a
25953// long-running operation.
25954type VirtualNetworkTapsDeleteFuture struct {
25955	azure.FutureAPI
25956	// Result returns the result of the asynchronous operation.
25957	// If the operation has not completed it will return an error.
25958	Result func(VirtualNetworkTapsClient) (autorest.Response, error)
25959}
25960
25961// VirtualNetworkTapsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
25962// long-running operation.
25963type VirtualNetworkTapsUpdateTagsFuture struct {
25964	azure.FutureAPI
25965	// Result returns the result of the asynchronous operation.
25966	// If the operation has not completed it will return an error.
25967	Result func(VirtualNetworkTapsClient) (VirtualNetworkTap, error)
25968}
25969
25970// VirtualNetworkUsage usage details for subnet.
25971type VirtualNetworkUsage struct {
25972	// CurrentValue - READ-ONLY; Indicates number of IPs used from the Subnet.
25973	CurrentValue *float64 `json:"currentValue,omitempty"`
25974	// ID - READ-ONLY; Subnet identifier.
25975	ID *string `json:"id,omitempty"`
25976	// Limit - READ-ONLY; Indicates the size of the subnet.
25977	Limit *float64 `json:"limit,omitempty"`
25978	// Name - READ-ONLY; The name containing common and localized value for usage.
25979	Name *VirtualNetworkUsageName `json:"name,omitempty"`
25980	// Unit - READ-ONLY; Usage units. Returns 'Count'
25981	Unit *string `json:"unit,omitempty"`
25982}
25983
25984// VirtualNetworkUsageName usage strings container.
25985type VirtualNetworkUsageName struct {
25986	// LocalizedValue - READ-ONLY; Localized subnet size and usage string.
25987	LocalizedValue *string `json:"localizedValue,omitempty"`
25988	// Value - READ-ONLY; Subnet size and usage string.
25989	Value *string `json:"value,omitempty"`
25990}
25991
25992// VirtualWAN virtualWAN Resource.
25993type VirtualWAN struct {
25994	autorest.Response `json:"-"`
25995	// VirtualWanProperties - Properties of the virtual WAN.
25996	*VirtualWanProperties `json:"properties,omitempty"`
25997	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
25998	Etag *string `json:"etag,omitempty"`
25999	// ID - Resource ID.
26000	ID *string `json:"id,omitempty"`
26001	// Name - READ-ONLY; Resource name.
26002	Name *string `json:"name,omitempty"`
26003	// Type - READ-ONLY; Resource type.
26004	Type *string `json:"type,omitempty"`
26005	// Location - Resource location.
26006	Location *string `json:"location,omitempty"`
26007	// Tags - Resource tags.
26008	Tags map[string]*string `json:"tags"`
26009}
26010
26011// MarshalJSON is the custom marshaler for VirtualWAN.
26012func (vw VirtualWAN) MarshalJSON() ([]byte, error) {
26013	objectMap := make(map[string]interface{})
26014	if vw.VirtualWanProperties != nil {
26015		objectMap["properties"] = vw.VirtualWanProperties
26016	}
26017	if vw.ID != nil {
26018		objectMap["id"] = vw.ID
26019	}
26020	if vw.Location != nil {
26021		objectMap["location"] = vw.Location
26022	}
26023	if vw.Tags != nil {
26024		objectMap["tags"] = vw.Tags
26025	}
26026	return json.Marshal(objectMap)
26027}
26028
26029// UnmarshalJSON is the custom unmarshaler for VirtualWAN struct.
26030func (vw *VirtualWAN) UnmarshalJSON(body []byte) error {
26031	var m map[string]*json.RawMessage
26032	err := json.Unmarshal(body, &m)
26033	if err != nil {
26034		return err
26035	}
26036	for k, v := range m {
26037		switch k {
26038		case "properties":
26039			if v != nil {
26040				var virtualWanProperties VirtualWanProperties
26041				err = json.Unmarshal(*v, &virtualWanProperties)
26042				if err != nil {
26043					return err
26044				}
26045				vw.VirtualWanProperties = &virtualWanProperties
26046			}
26047		case "etag":
26048			if v != nil {
26049				var etag string
26050				err = json.Unmarshal(*v, &etag)
26051				if err != nil {
26052					return err
26053				}
26054				vw.Etag = &etag
26055			}
26056		case "id":
26057			if v != nil {
26058				var ID string
26059				err = json.Unmarshal(*v, &ID)
26060				if err != nil {
26061					return err
26062				}
26063				vw.ID = &ID
26064			}
26065		case "name":
26066			if v != nil {
26067				var name string
26068				err = json.Unmarshal(*v, &name)
26069				if err != nil {
26070					return err
26071				}
26072				vw.Name = &name
26073			}
26074		case "type":
26075			if v != nil {
26076				var typeVar string
26077				err = json.Unmarshal(*v, &typeVar)
26078				if err != nil {
26079					return err
26080				}
26081				vw.Type = &typeVar
26082			}
26083		case "location":
26084			if v != nil {
26085				var location string
26086				err = json.Unmarshal(*v, &location)
26087				if err != nil {
26088					return err
26089				}
26090				vw.Location = &location
26091			}
26092		case "tags":
26093			if v != nil {
26094				var tags map[string]*string
26095				err = json.Unmarshal(*v, &tags)
26096				if err != nil {
26097					return err
26098				}
26099				vw.Tags = tags
26100			}
26101		}
26102	}
26103
26104	return nil
26105}
26106
26107// VirtualWanProperties parameters for VirtualWAN
26108type VirtualWanProperties struct {
26109	// DisableVpnEncryption - Vpn encryption to be disabled or not.
26110	DisableVpnEncryption *bool `json:"disableVpnEncryption,omitempty"`
26111	// VirtualHubs - READ-ONLY; List of VirtualHubs in the VirtualWAN.
26112	VirtualHubs *[]SubResource `json:"virtualHubs,omitempty"`
26113	// VpnSites - READ-ONLY; List of VpnSites in the VirtualWAN.
26114	VpnSites *[]SubResource `json:"vpnSites,omitempty"`
26115	// SecurityProviderName - The Security Provider name.
26116	SecurityProviderName *string `json:"securityProviderName,omitempty"`
26117	// AllowBranchToBranchTraffic - True if branch to branch traffic is allowed.
26118	AllowBranchToBranchTraffic *bool `json:"allowBranchToBranchTraffic,omitempty"`
26119	// AllowVnetToVnetTraffic - True if Vnet to Vnet traffic is allowed.
26120	AllowVnetToVnetTraffic *bool `json:"allowVnetToVnetTraffic,omitempty"`
26121	// Office365LocalBreakoutCategory - The office local breakout category. Possible values include: 'OfficeTrafficCategoryOptimize', 'OfficeTrafficCategoryOptimizeAndAllow', 'OfficeTrafficCategoryAll', 'OfficeTrafficCategoryNone'
26122	Office365LocalBreakoutCategory OfficeTrafficCategory `json:"office365LocalBreakoutCategory,omitempty"`
26123	// P2SVpnServerConfigurations - List of all P2SVpnServerConfigurations associated with the virtual wan.
26124	P2SVpnServerConfigurations *[]P2SVpnServerConfiguration `json:"p2SVpnServerConfigurations,omitempty"`
26125	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
26126	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
26127}
26128
26129// MarshalJSON is the custom marshaler for VirtualWanProperties.
26130func (vwp VirtualWanProperties) MarshalJSON() ([]byte, error) {
26131	objectMap := make(map[string]interface{})
26132	if vwp.DisableVpnEncryption != nil {
26133		objectMap["disableVpnEncryption"] = vwp.DisableVpnEncryption
26134	}
26135	if vwp.SecurityProviderName != nil {
26136		objectMap["securityProviderName"] = vwp.SecurityProviderName
26137	}
26138	if vwp.AllowBranchToBranchTraffic != nil {
26139		objectMap["allowBranchToBranchTraffic"] = vwp.AllowBranchToBranchTraffic
26140	}
26141	if vwp.AllowVnetToVnetTraffic != nil {
26142		objectMap["allowVnetToVnetTraffic"] = vwp.AllowVnetToVnetTraffic
26143	}
26144	if vwp.Office365LocalBreakoutCategory != "" {
26145		objectMap["office365LocalBreakoutCategory"] = vwp.Office365LocalBreakoutCategory
26146	}
26147	if vwp.P2SVpnServerConfigurations != nil {
26148		objectMap["p2SVpnServerConfigurations"] = vwp.P2SVpnServerConfigurations
26149	}
26150	if vwp.ProvisioningState != "" {
26151		objectMap["provisioningState"] = vwp.ProvisioningState
26152	}
26153	return json.Marshal(objectMap)
26154}
26155
26156// VirtualWansCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
26157// long-running operation.
26158type VirtualWansCreateOrUpdateFuture struct {
26159	azure.FutureAPI
26160	// Result returns the result of the asynchronous operation.
26161	// If the operation has not completed it will return an error.
26162	Result func(VirtualWansClient) (VirtualWAN, error)
26163}
26164
26165// VirtualWansDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
26166// operation.
26167type VirtualWansDeleteFuture struct {
26168	azure.FutureAPI
26169	// Result returns the result of the asynchronous operation.
26170	// If the operation has not completed it will return an error.
26171	Result func(VirtualWansClient) (autorest.Response, error)
26172}
26173
26174// VirtualWanSecurityProvider collection of SecurityProviders.
26175type VirtualWanSecurityProvider struct {
26176	// Name - Name of the security provider.
26177	Name *string `json:"name,omitempty"`
26178	// URL - Url of the security provider.
26179	URL *string `json:"url,omitempty"`
26180	// Type - Name of the security provider. Possible values include: 'External', 'Native'
26181	Type VirtualWanSecurityProviderType `json:"type,omitempty"`
26182}
26183
26184// VirtualWanSecurityProviders collection of SecurityProviders.
26185type VirtualWanSecurityProviders struct {
26186	autorest.Response `json:"-"`
26187	// SupportedProviders - List of VirtualWAN security providers.
26188	SupportedProviders *[]VirtualWanSecurityProvider `json:"supportedProviders,omitempty"`
26189}
26190
26191// VirtualWansUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
26192// operation.
26193type VirtualWansUpdateTagsFuture struct {
26194	azure.FutureAPI
26195	// Result returns the result of the asynchronous operation.
26196	// If the operation has not completed it will return an error.
26197	Result func(VirtualWansClient) (VirtualWAN, error)
26198}
26199
26200// VpnClientConfiguration vpnClientConfiguration for P2S client.
26201type VpnClientConfiguration struct {
26202	// VpnClientAddressPool - The reference of the address space resource which represents Address space for P2S VpnClient.
26203	VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"`
26204	// VpnClientRootCertificates - VpnClientRootCertificate for virtual network gateway.
26205	VpnClientRootCertificates *[]VpnClientRootCertificate `json:"vpnClientRootCertificates,omitempty"`
26206	// VpnClientRevokedCertificates - VpnClientRevokedCertificate for Virtual network gateway.
26207	VpnClientRevokedCertificates *[]VpnClientRevokedCertificate `json:"vpnClientRevokedCertificates,omitempty"`
26208	// VpnClientProtocols - VpnClientProtocols for Virtual network gateway.
26209	VpnClientProtocols *[]VpnClientProtocol `json:"vpnClientProtocols,omitempty"`
26210	// VpnClientIpsecPolicies - VpnClientIpsecPolicies for virtual network gateway P2S client.
26211	VpnClientIpsecPolicies *[]IpsecPolicy `json:"vpnClientIpsecPolicies,omitempty"`
26212	// RadiusServerAddress - The radius server address property of the VirtualNetworkGateway resource for vpn client connection.
26213	RadiusServerAddress *string `json:"radiusServerAddress,omitempty"`
26214	// RadiusServerSecret - The radius secret property of the VirtualNetworkGateway resource for vpn client connection.
26215	RadiusServerSecret *string `json:"radiusServerSecret,omitempty"`
26216}
26217
26218// VpnClientConnectionHealth vpnClientConnectionHealth properties
26219type VpnClientConnectionHealth struct {
26220	// TotalIngressBytesTransferred - READ-ONLY; Total of the Ingress Bytes Transferred in this P2S Vpn connection
26221	TotalIngressBytesTransferred *int64 `json:"totalIngressBytesTransferred,omitempty"`
26222	// TotalEgressBytesTransferred - READ-ONLY; Total of the Egress Bytes Transferred in this connection
26223	TotalEgressBytesTransferred *int64 `json:"totalEgressBytesTransferred,omitempty"`
26224	// VpnClientConnectionsCount - The total of p2s vpn clients connected at this time to this P2SVpnGateway.
26225	VpnClientConnectionsCount *int32 `json:"vpnClientConnectionsCount,omitempty"`
26226	// AllocatedIPAddresses - List of allocated ip addresses to the connected p2s vpn clients.
26227	AllocatedIPAddresses *[]string `json:"allocatedIpAddresses,omitempty"`
26228}
26229
26230// MarshalJSON is the custom marshaler for VpnClientConnectionHealth.
26231func (vcch VpnClientConnectionHealth) MarshalJSON() ([]byte, error) {
26232	objectMap := make(map[string]interface{})
26233	if vcch.VpnClientConnectionsCount != nil {
26234		objectMap["vpnClientConnectionsCount"] = vcch.VpnClientConnectionsCount
26235	}
26236	if vcch.AllocatedIPAddresses != nil {
26237		objectMap["allocatedIpAddresses"] = vcch.AllocatedIPAddresses
26238	}
26239	return json.Marshal(objectMap)
26240}
26241
26242// VpnClientIPsecParameters an IPSec parameters for a virtual network gateway P2S connection.
26243type VpnClientIPsecParameters struct {
26244	autorest.Response `json:"-"`
26245	// SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for P2S client.
26246	SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"`
26247	// SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for P2S client..
26248	SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"`
26249	// IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256'
26250	IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"`
26251	// IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256'
26252	IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"`
26253	// IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128'
26254	IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"`
26255	// IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'IkeIntegrityMD5', 'IkeIntegritySHA1', 'IkeIntegritySHA256', 'IkeIntegritySHA384', 'IkeIntegrityGCMAES256', 'IkeIntegrityGCMAES128'
26256	IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"`
26257	// DhGroup - The DH Group used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24'
26258	DhGroup DhGroup `json:"dhGroup,omitempty"`
26259	// PfsGroup - The Pfs Group used in IKE Phase 2 for new child SA. Possible values include: 'PfsGroupNone', 'PfsGroupPFS1', 'PfsGroupPFS2', 'PfsGroupPFS2048', 'PfsGroupECP256', 'PfsGroupECP384', 'PfsGroupPFS24', 'PfsGroupPFS14', 'PfsGroupPFSMM'
26260	PfsGroup PfsGroup `json:"pfsGroup,omitempty"`
26261}
26262
26263// VpnClientParameters vpn Client Parameters for package generation
26264type VpnClientParameters struct {
26265	// ProcessorArchitecture - VPN client Processor Architecture. Possible values are: 'AMD64' and 'X86'. Possible values include: 'Amd64', 'X86'
26266	ProcessorArchitecture ProcessorArchitecture `json:"processorArchitecture,omitempty"`
26267	// AuthenticationMethod - VPN client authentication method. Possible values include: 'EAPTLS', 'EAPMSCHAPv2'
26268	AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"`
26269	// 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.
26270	RadiusServerAuthCertificate *string `json:"radiusServerAuthCertificate,omitempty"`
26271	// ClientRootCertificates - A list of client root certificates public certificate data encoded as Base-64 strings. Optional parameter for external radius based authentication with EAPTLS.
26272	ClientRootCertificates *[]string `json:"clientRootCertificates,omitempty"`
26273}
26274
26275// VpnClientRevokedCertificate VPN client revoked certificate of virtual network gateway.
26276type VpnClientRevokedCertificate struct {
26277	// VpnClientRevokedCertificatePropertiesFormat - Properties of the vpn client revoked certificate.
26278	*VpnClientRevokedCertificatePropertiesFormat `json:"properties,omitempty"`
26279	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
26280	Name *string `json:"name,omitempty"`
26281	// Etag - A unique read-only string that changes whenever the resource is updated.
26282	Etag *string `json:"etag,omitempty"`
26283	// ID - Resource ID.
26284	ID *string `json:"id,omitempty"`
26285}
26286
26287// MarshalJSON is the custom marshaler for VpnClientRevokedCertificate.
26288func (vcrc VpnClientRevokedCertificate) MarshalJSON() ([]byte, error) {
26289	objectMap := make(map[string]interface{})
26290	if vcrc.VpnClientRevokedCertificatePropertiesFormat != nil {
26291		objectMap["properties"] = vcrc.VpnClientRevokedCertificatePropertiesFormat
26292	}
26293	if vcrc.Name != nil {
26294		objectMap["name"] = vcrc.Name
26295	}
26296	if vcrc.Etag != nil {
26297		objectMap["etag"] = vcrc.Etag
26298	}
26299	if vcrc.ID != nil {
26300		objectMap["id"] = vcrc.ID
26301	}
26302	return json.Marshal(objectMap)
26303}
26304
26305// UnmarshalJSON is the custom unmarshaler for VpnClientRevokedCertificate struct.
26306func (vcrc *VpnClientRevokedCertificate) UnmarshalJSON(body []byte) error {
26307	var m map[string]*json.RawMessage
26308	err := json.Unmarshal(body, &m)
26309	if err != nil {
26310		return err
26311	}
26312	for k, v := range m {
26313		switch k {
26314		case "properties":
26315			if v != nil {
26316				var vpnClientRevokedCertificatePropertiesFormat VpnClientRevokedCertificatePropertiesFormat
26317				err = json.Unmarshal(*v, &vpnClientRevokedCertificatePropertiesFormat)
26318				if err != nil {
26319					return err
26320				}
26321				vcrc.VpnClientRevokedCertificatePropertiesFormat = &vpnClientRevokedCertificatePropertiesFormat
26322			}
26323		case "name":
26324			if v != nil {
26325				var name string
26326				err = json.Unmarshal(*v, &name)
26327				if err != nil {
26328					return err
26329				}
26330				vcrc.Name = &name
26331			}
26332		case "etag":
26333			if v != nil {
26334				var etag string
26335				err = json.Unmarshal(*v, &etag)
26336				if err != nil {
26337					return err
26338				}
26339				vcrc.Etag = &etag
26340			}
26341		case "id":
26342			if v != nil {
26343				var ID string
26344				err = json.Unmarshal(*v, &ID)
26345				if err != nil {
26346					return err
26347				}
26348				vcrc.ID = &ID
26349			}
26350		}
26351	}
26352
26353	return nil
26354}
26355
26356// VpnClientRevokedCertificatePropertiesFormat properties of the revoked VPN client certificate of virtual
26357// network gateway.
26358type VpnClientRevokedCertificatePropertiesFormat struct {
26359	// Thumbprint - The revoked VPN client certificate thumbprint.
26360	Thumbprint *string `json:"thumbprint,omitempty"`
26361	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client revoked certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
26362	ProvisioningState *string `json:"provisioningState,omitempty"`
26363}
26364
26365// MarshalJSON is the custom marshaler for VpnClientRevokedCertificatePropertiesFormat.
26366func (vcrcpf VpnClientRevokedCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
26367	objectMap := make(map[string]interface{})
26368	if vcrcpf.Thumbprint != nil {
26369		objectMap["thumbprint"] = vcrcpf.Thumbprint
26370	}
26371	return json.Marshal(objectMap)
26372}
26373
26374// VpnClientRootCertificate VPN client root certificate of virtual network gateway
26375type VpnClientRootCertificate struct {
26376	// VpnClientRootCertificatePropertiesFormat - Properties of the vpn client root certificate.
26377	*VpnClientRootCertificatePropertiesFormat `json:"properties,omitempty"`
26378	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
26379	Name *string `json:"name,omitempty"`
26380	// Etag - A unique read-only string that changes whenever the resource is updated.
26381	Etag *string `json:"etag,omitempty"`
26382	// ID - Resource ID.
26383	ID *string `json:"id,omitempty"`
26384}
26385
26386// MarshalJSON is the custom marshaler for VpnClientRootCertificate.
26387func (vcrc VpnClientRootCertificate) MarshalJSON() ([]byte, error) {
26388	objectMap := make(map[string]interface{})
26389	if vcrc.VpnClientRootCertificatePropertiesFormat != nil {
26390		objectMap["properties"] = vcrc.VpnClientRootCertificatePropertiesFormat
26391	}
26392	if vcrc.Name != nil {
26393		objectMap["name"] = vcrc.Name
26394	}
26395	if vcrc.Etag != nil {
26396		objectMap["etag"] = vcrc.Etag
26397	}
26398	if vcrc.ID != nil {
26399		objectMap["id"] = vcrc.ID
26400	}
26401	return json.Marshal(objectMap)
26402}
26403
26404// UnmarshalJSON is the custom unmarshaler for VpnClientRootCertificate struct.
26405func (vcrc *VpnClientRootCertificate) UnmarshalJSON(body []byte) error {
26406	var m map[string]*json.RawMessage
26407	err := json.Unmarshal(body, &m)
26408	if err != nil {
26409		return err
26410	}
26411	for k, v := range m {
26412		switch k {
26413		case "properties":
26414			if v != nil {
26415				var vpnClientRootCertificatePropertiesFormat VpnClientRootCertificatePropertiesFormat
26416				err = json.Unmarshal(*v, &vpnClientRootCertificatePropertiesFormat)
26417				if err != nil {
26418					return err
26419				}
26420				vcrc.VpnClientRootCertificatePropertiesFormat = &vpnClientRootCertificatePropertiesFormat
26421			}
26422		case "name":
26423			if v != nil {
26424				var name string
26425				err = json.Unmarshal(*v, &name)
26426				if err != nil {
26427					return err
26428				}
26429				vcrc.Name = &name
26430			}
26431		case "etag":
26432			if v != nil {
26433				var etag string
26434				err = json.Unmarshal(*v, &etag)
26435				if err != nil {
26436					return err
26437				}
26438				vcrc.Etag = &etag
26439			}
26440		case "id":
26441			if v != nil {
26442				var ID string
26443				err = json.Unmarshal(*v, &ID)
26444				if err != nil {
26445					return err
26446				}
26447				vcrc.ID = &ID
26448			}
26449		}
26450	}
26451
26452	return nil
26453}
26454
26455// VpnClientRootCertificatePropertiesFormat properties of SSL certificates of application gateway
26456type VpnClientRootCertificatePropertiesFormat struct {
26457	// PublicCertData - The certificate public data.
26458	PublicCertData *string `json:"publicCertData,omitempty"`
26459	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
26460	ProvisioningState *string `json:"provisioningState,omitempty"`
26461}
26462
26463// MarshalJSON is the custom marshaler for VpnClientRootCertificatePropertiesFormat.
26464func (vcrcpf VpnClientRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
26465	objectMap := make(map[string]interface{})
26466	if vcrcpf.PublicCertData != nil {
26467		objectMap["publicCertData"] = vcrcpf.PublicCertData
26468	}
26469	return json.Marshal(objectMap)
26470}
26471
26472// VpnConnection vpnConnection Resource.
26473type VpnConnection struct {
26474	autorest.Response `json:"-"`
26475	// VpnConnectionProperties - Properties of the VPN connection.
26476	*VpnConnectionProperties `json:"properties,omitempty"`
26477	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
26478	Name *string `json:"name,omitempty"`
26479	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
26480	Etag *string `json:"etag,omitempty"`
26481	// ID - Resource ID.
26482	ID *string `json:"id,omitempty"`
26483}
26484
26485// MarshalJSON is the custom marshaler for VpnConnection.
26486func (vc VpnConnection) MarshalJSON() ([]byte, error) {
26487	objectMap := make(map[string]interface{})
26488	if vc.VpnConnectionProperties != nil {
26489		objectMap["properties"] = vc.VpnConnectionProperties
26490	}
26491	if vc.Name != nil {
26492		objectMap["name"] = vc.Name
26493	}
26494	if vc.ID != nil {
26495		objectMap["id"] = vc.ID
26496	}
26497	return json.Marshal(objectMap)
26498}
26499
26500// UnmarshalJSON is the custom unmarshaler for VpnConnection struct.
26501func (vc *VpnConnection) UnmarshalJSON(body []byte) error {
26502	var m map[string]*json.RawMessage
26503	err := json.Unmarshal(body, &m)
26504	if err != nil {
26505		return err
26506	}
26507	for k, v := range m {
26508		switch k {
26509		case "properties":
26510			if v != nil {
26511				var vpnConnectionProperties VpnConnectionProperties
26512				err = json.Unmarshal(*v, &vpnConnectionProperties)
26513				if err != nil {
26514					return err
26515				}
26516				vc.VpnConnectionProperties = &vpnConnectionProperties
26517			}
26518		case "name":
26519			if v != nil {
26520				var name string
26521				err = json.Unmarshal(*v, &name)
26522				if err != nil {
26523					return err
26524				}
26525				vc.Name = &name
26526			}
26527		case "etag":
26528			if v != nil {
26529				var etag string
26530				err = json.Unmarshal(*v, &etag)
26531				if err != nil {
26532					return err
26533				}
26534				vc.Etag = &etag
26535			}
26536		case "id":
26537			if v != nil {
26538				var ID string
26539				err = json.Unmarshal(*v, &ID)
26540				if err != nil {
26541					return err
26542				}
26543				vc.ID = &ID
26544			}
26545		}
26546	}
26547
26548	return nil
26549}
26550
26551// VpnConnectionProperties parameters for VpnConnection
26552type VpnConnectionProperties struct {
26553	// RemoteVpnSite - Id of the connected vpn site.
26554	RemoteVpnSite *SubResource `json:"remoteVpnSite,omitempty"`
26555	// RoutingWeight - Routing weight for vpn connection.
26556	RoutingWeight *int32 `json:"routingWeight,omitempty"`
26557	// ConnectionStatus - The connection status. Possible values include: 'VpnConnectionStatusUnknown', 'VpnConnectionStatusConnecting', 'VpnConnectionStatusConnected', 'VpnConnectionStatusNotConnected'
26558	ConnectionStatus VpnConnectionStatus `json:"connectionStatus,omitempty"`
26559	// VpnConnectionProtocolType - Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1'
26560	VpnConnectionProtocolType VirtualNetworkGatewayConnectionProtocol `json:"vpnConnectionProtocolType,omitempty"`
26561	// IngressBytesTransferred - READ-ONLY; Ingress bytes transferred.
26562	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
26563	// EgressBytesTransferred - READ-ONLY; Egress bytes transferred.
26564	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
26565	// ConnectionBandwidth - Expected bandwidth in MBPS.
26566	ConnectionBandwidth *int32 `json:"connectionBandwidth,omitempty"`
26567	// SharedKey - SharedKey for the vpn connection.
26568	SharedKey *string `json:"sharedKey,omitempty"`
26569	// EnableBgp - EnableBgp flag
26570	EnableBgp *bool `json:"enableBgp,omitempty"`
26571	// IpsecPolicies - The IPSec Policies to be considered by this connection.
26572	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
26573	// EnableRateLimiting - EnableBgp flag
26574	EnableRateLimiting *bool `json:"enableRateLimiting,omitempty"`
26575	// EnableInternetSecurity - Enable internet security
26576	EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"`
26577	// UseLocalAzureIPAddress - Use local azure ip to initiate connection
26578	UseLocalAzureIPAddress *bool `json:"useLocalAzureIpAddress,omitempty"`
26579	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
26580	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
26581}
26582
26583// MarshalJSON is the custom marshaler for VpnConnectionProperties.
26584func (vcp VpnConnectionProperties) MarshalJSON() ([]byte, error) {
26585	objectMap := make(map[string]interface{})
26586	if vcp.RemoteVpnSite != nil {
26587		objectMap["remoteVpnSite"] = vcp.RemoteVpnSite
26588	}
26589	if vcp.RoutingWeight != nil {
26590		objectMap["routingWeight"] = vcp.RoutingWeight
26591	}
26592	if vcp.ConnectionStatus != "" {
26593		objectMap["connectionStatus"] = vcp.ConnectionStatus
26594	}
26595	if vcp.VpnConnectionProtocolType != "" {
26596		objectMap["vpnConnectionProtocolType"] = vcp.VpnConnectionProtocolType
26597	}
26598	if vcp.ConnectionBandwidth != nil {
26599		objectMap["connectionBandwidth"] = vcp.ConnectionBandwidth
26600	}
26601	if vcp.SharedKey != nil {
26602		objectMap["sharedKey"] = vcp.SharedKey
26603	}
26604	if vcp.EnableBgp != nil {
26605		objectMap["enableBgp"] = vcp.EnableBgp
26606	}
26607	if vcp.IpsecPolicies != nil {
26608		objectMap["ipsecPolicies"] = vcp.IpsecPolicies
26609	}
26610	if vcp.EnableRateLimiting != nil {
26611		objectMap["enableRateLimiting"] = vcp.EnableRateLimiting
26612	}
26613	if vcp.EnableInternetSecurity != nil {
26614		objectMap["enableInternetSecurity"] = vcp.EnableInternetSecurity
26615	}
26616	if vcp.UseLocalAzureIPAddress != nil {
26617		objectMap["useLocalAzureIpAddress"] = vcp.UseLocalAzureIPAddress
26618	}
26619	if vcp.ProvisioningState != "" {
26620		objectMap["provisioningState"] = vcp.ProvisioningState
26621	}
26622	return json.Marshal(objectMap)
26623}
26624
26625// VpnConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
26626// long-running operation.
26627type VpnConnectionsCreateOrUpdateFuture struct {
26628	azure.FutureAPI
26629	// Result returns the result of the asynchronous operation.
26630	// If the operation has not completed it will return an error.
26631	Result func(VpnConnectionsClient) (VpnConnection, error)
26632}
26633
26634// VpnConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
26635// operation.
26636type VpnConnectionsDeleteFuture struct {
26637	azure.FutureAPI
26638	// Result returns the result of the asynchronous operation.
26639	// If the operation has not completed it will return an error.
26640	Result func(VpnConnectionsClient) (autorest.Response, error)
26641}
26642
26643// VpnDeviceScriptParameters vpn device configuration script generation parameters
26644type VpnDeviceScriptParameters struct {
26645	// Vendor - The vendor for the vpn device.
26646	Vendor *string `json:"vendor,omitempty"`
26647	// DeviceFamily - The device family for the vpn device.
26648	DeviceFamily *string `json:"deviceFamily,omitempty"`
26649	// FirmwareVersion - The firmware version for the vpn device.
26650	FirmwareVersion *string `json:"firmwareVersion,omitempty"`
26651}
26652
26653// VpnGateway vpnGateway Resource.
26654type VpnGateway struct {
26655	autorest.Response `json:"-"`
26656	// VpnGatewayProperties - Properties of the VPN gateway.
26657	*VpnGatewayProperties `json:"properties,omitempty"`
26658	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
26659	Etag *string `json:"etag,omitempty"`
26660	// ID - Resource ID.
26661	ID *string `json:"id,omitempty"`
26662	// Name - READ-ONLY; Resource name.
26663	Name *string `json:"name,omitempty"`
26664	// Type - READ-ONLY; Resource type.
26665	Type *string `json:"type,omitempty"`
26666	// Location - Resource location.
26667	Location *string `json:"location,omitempty"`
26668	// Tags - Resource tags.
26669	Tags map[string]*string `json:"tags"`
26670}
26671
26672// MarshalJSON is the custom marshaler for VpnGateway.
26673func (vg VpnGateway) MarshalJSON() ([]byte, error) {
26674	objectMap := make(map[string]interface{})
26675	if vg.VpnGatewayProperties != nil {
26676		objectMap["properties"] = vg.VpnGatewayProperties
26677	}
26678	if vg.ID != nil {
26679		objectMap["id"] = vg.ID
26680	}
26681	if vg.Location != nil {
26682		objectMap["location"] = vg.Location
26683	}
26684	if vg.Tags != nil {
26685		objectMap["tags"] = vg.Tags
26686	}
26687	return json.Marshal(objectMap)
26688}
26689
26690// UnmarshalJSON is the custom unmarshaler for VpnGateway struct.
26691func (vg *VpnGateway) UnmarshalJSON(body []byte) error {
26692	var m map[string]*json.RawMessage
26693	err := json.Unmarshal(body, &m)
26694	if err != nil {
26695		return err
26696	}
26697	for k, v := range m {
26698		switch k {
26699		case "properties":
26700			if v != nil {
26701				var vpnGatewayProperties VpnGatewayProperties
26702				err = json.Unmarshal(*v, &vpnGatewayProperties)
26703				if err != nil {
26704					return err
26705				}
26706				vg.VpnGatewayProperties = &vpnGatewayProperties
26707			}
26708		case "etag":
26709			if v != nil {
26710				var etag string
26711				err = json.Unmarshal(*v, &etag)
26712				if err != nil {
26713					return err
26714				}
26715				vg.Etag = &etag
26716			}
26717		case "id":
26718			if v != nil {
26719				var ID string
26720				err = json.Unmarshal(*v, &ID)
26721				if err != nil {
26722					return err
26723				}
26724				vg.ID = &ID
26725			}
26726		case "name":
26727			if v != nil {
26728				var name string
26729				err = json.Unmarshal(*v, &name)
26730				if err != nil {
26731					return err
26732				}
26733				vg.Name = &name
26734			}
26735		case "type":
26736			if v != nil {
26737				var typeVar string
26738				err = json.Unmarshal(*v, &typeVar)
26739				if err != nil {
26740					return err
26741				}
26742				vg.Type = &typeVar
26743			}
26744		case "location":
26745			if v != nil {
26746				var location string
26747				err = json.Unmarshal(*v, &location)
26748				if err != nil {
26749					return err
26750				}
26751				vg.Location = &location
26752			}
26753		case "tags":
26754			if v != nil {
26755				var tags map[string]*string
26756				err = json.Unmarshal(*v, &tags)
26757				if err != nil {
26758					return err
26759				}
26760				vg.Tags = tags
26761			}
26762		}
26763	}
26764
26765	return nil
26766}
26767
26768// VpnGatewayProperties parameters for VpnGateway
26769type VpnGatewayProperties struct {
26770	// VirtualHub - The VirtualHub to which the gateway belongs
26771	VirtualHub *SubResource `json:"virtualHub,omitempty"`
26772	// Connections - List of all vpn connections to the gateway.
26773	Connections *[]VpnConnection `json:"connections,omitempty"`
26774	// BgpSettings - Local network gateway's BGP speaker settings.
26775	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
26776	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
26777	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
26778	// VpnGatewayScaleUnit - The scale unit for this vpn gateway.
26779	VpnGatewayScaleUnit *int32 `json:"vpnGatewayScaleUnit,omitempty"`
26780}
26781
26782// VpnGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
26783// long-running operation.
26784type VpnGatewaysCreateOrUpdateFuture struct {
26785	azure.FutureAPI
26786	// Result returns the result of the asynchronous operation.
26787	// If the operation has not completed it will return an error.
26788	Result func(VpnGatewaysClient) (VpnGateway, error)
26789}
26790
26791// VpnGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
26792// operation.
26793type VpnGatewaysDeleteFuture struct {
26794	azure.FutureAPI
26795	// Result returns the result of the asynchronous operation.
26796	// If the operation has not completed it will return an error.
26797	Result func(VpnGatewaysClient) (autorest.Response, error)
26798}
26799
26800// VpnGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
26801// operation.
26802type VpnGatewaysUpdateTagsFuture struct {
26803	azure.FutureAPI
26804	// Result returns the result of the asynchronous operation.
26805	// If the operation has not completed it will return an error.
26806	Result func(VpnGatewaysClient) (VpnGateway, error)
26807}
26808
26809// VpnProfileResponse vpn Profile Response for package generation
26810type VpnProfileResponse struct {
26811	autorest.Response `json:"-"`
26812	// ProfileURL - URL to the VPN profile
26813	ProfileURL *string `json:"profileUrl,omitempty"`
26814}
26815
26816// VpnSite vpnSite Resource.
26817type VpnSite struct {
26818	autorest.Response `json:"-"`
26819	// VpnSiteProperties - Properties of the VPN site.
26820	*VpnSiteProperties `json:"properties,omitempty"`
26821	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
26822	Etag *string `json:"etag,omitempty"`
26823	// ID - Resource ID.
26824	ID *string `json:"id,omitempty"`
26825	// Name - READ-ONLY; Resource name.
26826	Name *string `json:"name,omitempty"`
26827	// Type - READ-ONLY; Resource type.
26828	Type *string `json:"type,omitempty"`
26829	// Location - Resource location.
26830	Location *string `json:"location,omitempty"`
26831	// Tags - Resource tags.
26832	Tags map[string]*string `json:"tags"`
26833}
26834
26835// MarshalJSON is the custom marshaler for VpnSite.
26836func (vs VpnSite) MarshalJSON() ([]byte, error) {
26837	objectMap := make(map[string]interface{})
26838	if vs.VpnSiteProperties != nil {
26839		objectMap["properties"] = vs.VpnSiteProperties
26840	}
26841	if vs.ID != nil {
26842		objectMap["id"] = vs.ID
26843	}
26844	if vs.Location != nil {
26845		objectMap["location"] = vs.Location
26846	}
26847	if vs.Tags != nil {
26848		objectMap["tags"] = vs.Tags
26849	}
26850	return json.Marshal(objectMap)
26851}
26852
26853// UnmarshalJSON is the custom unmarshaler for VpnSite struct.
26854func (vs *VpnSite) UnmarshalJSON(body []byte) error {
26855	var m map[string]*json.RawMessage
26856	err := json.Unmarshal(body, &m)
26857	if err != nil {
26858		return err
26859	}
26860	for k, v := range m {
26861		switch k {
26862		case "properties":
26863			if v != nil {
26864				var vpnSiteProperties VpnSiteProperties
26865				err = json.Unmarshal(*v, &vpnSiteProperties)
26866				if err != nil {
26867					return err
26868				}
26869				vs.VpnSiteProperties = &vpnSiteProperties
26870			}
26871		case "etag":
26872			if v != nil {
26873				var etag string
26874				err = json.Unmarshal(*v, &etag)
26875				if err != nil {
26876					return err
26877				}
26878				vs.Etag = &etag
26879			}
26880		case "id":
26881			if v != nil {
26882				var ID string
26883				err = json.Unmarshal(*v, &ID)
26884				if err != nil {
26885					return err
26886				}
26887				vs.ID = &ID
26888			}
26889		case "name":
26890			if v != nil {
26891				var name string
26892				err = json.Unmarshal(*v, &name)
26893				if err != nil {
26894					return err
26895				}
26896				vs.Name = &name
26897			}
26898		case "type":
26899			if v != nil {
26900				var typeVar string
26901				err = json.Unmarshal(*v, &typeVar)
26902				if err != nil {
26903					return err
26904				}
26905				vs.Type = &typeVar
26906			}
26907		case "location":
26908			if v != nil {
26909				var location string
26910				err = json.Unmarshal(*v, &location)
26911				if err != nil {
26912					return err
26913				}
26914				vs.Location = &location
26915			}
26916		case "tags":
26917			if v != nil {
26918				var tags map[string]*string
26919				err = json.Unmarshal(*v, &tags)
26920				if err != nil {
26921					return err
26922				}
26923				vs.Tags = tags
26924			}
26925		}
26926	}
26927
26928	return nil
26929}
26930
26931// VpnSiteID vpnSite Resource.
26932type VpnSiteID struct {
26933	// VpnSite - READ-ONLY; The resource-uri of the vpn-site for which config is to be fetched.
26934	VpnSite *string `json:"vpnSite,omitempty"`
26935}
26936
26937// VpnSiteProperties parameters for VpnSite
26938type VpnSiteProperties struct {
26939	// VirtualWan - The VirtualWAN to which the vpnSite belongs
26940	VirtualWan *SubResource `json:"virtualWan,omitempty"`
26941	// DeviceProperties - The device properties
26942	DeviceProperties *DeviceProperties `json:"deviceProperties,omitempty"`
26943	// IPAddress - The ip-address for the vpn-site.
26944	IPAddress *string `json:"ipAddress,omitempty"`
26945	// SiteKey - The key for vpn-site that can be used for connections.
26946	SiteKey *string `json:"siteKey,omitempty"`
26947	// AddressSpace - The AddressSpace that contains an array of IP address ranges.
26948	AddressSpace *AddressSpace `json:"addressSpace,omitempty"`
26949	// BgpProperties - The set of bgp properties.
26950	BgpProperties *BgpSettings `json:"bgpProperties,omitempty"`
26951	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
26952	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
26953	// IsSecuritySite - IsSecuritySite flag
26954	IsSecuritySite *bool `json:"isSecuritySite,omitempty"`
26955}
26956
26957// VpnSitesConfigurationDownloadFuture an abstraction for monitoring and retrieving the results of a
26958// long-running operation.
26959type VpnSitesConfigurationDownloadFuture struct {
26960	azure.FutureAPI
26961	// Result returns the result of the asynchronous operation.
26962	// If the operation has not completed it will return an error.
26963	Result func(VpnSitesConfigurationClient) (autorest.Response, error)
26964}
26965
26966// VpnSitesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
26967// operation.
26968type VpnSitesCreateOrUpdateFuture struct {
26969	azure.FutureAPI
26970	// Result returns the result of the asynchronous operation.
26971	// If the operation has not completed it will return an error.
26972	Result func(VpnSitesClient) (VpnSite, error)
26973}
26974
26975// VpnSitesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
26976// operation.
26977type VpnSitesDeleteFuture struct {
26978	azure.FutureAPI
26979	// Result returns the result of the asynchronous operation.
26980	// If the operation has not completed it will return an error.
26981	Result func(VpnSitesClient) (autorest.Response, error)
26982}
26983
26984// VpnSitesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
26985// operation.
26986type VpnSitesUpdateTagsFuture struct {
26987	azure.FutureAPI
26988	// Result returns the result of the asynchronous operation.
26989	// If the operation has not completed it will return an error.
26990	Result func(VpnSitesClient) (VpnSite, error)
26991}
26992
26993// Watcher network watcher in a resource group.
26994type Watcher struct {
26995	autorest.Response `json:"-"`
26996	// Etag - A unique read-only string that changes whenever the resource is updated.
26997	Etag *string `json:"etag,omitempty"`
26998	// WatcherPropertiesFormat - Properties of the network watcher.
26999	*WatcherPropertiesFormat `json:"properties,omitempty"`
27000	// ID - Resource ID.
27001	ID *string `json:"id,omitempty"`
27002	// Name - READ-ONLY; Resource name.
27003	Name *string `json:"name,omitempty"`
27004	// Type - READ-ONLY; Resource type.
27005	Type *string `json:"type,omitempty"`
27006	// Location - Resource location.
27007	Location *string `json:"location,omitempty"`
27008	// Tags - Resource tags.
27009	Tags map[string]*string `json:"tags"`
27010}
27011
27012// MarshalJSON is the custom marshaler for Watcher.
27013func (w Watcher) MarshalJSON() ([]byte, error) {
27014	objectMap := make(map[string]interface{})
27015	if w.Etag != nil {
27016		objectMap["etag"] = w.Etag
27017	}
27018	if w.WatcherPropertiesFormat != nil {
27019		objectMap["properties"] = w.WatcherPropertiesFormat
27020	}
27021	if w.ID != nil {
27022		objectMap["id"] = w.ID
27023	}
27024	if w.Location != nil {
27025		objectMap["location"] = w.Location
27026	}
27027	if w.Tags != nil {
27028		objectMap["tags"] = w.Tags
27029	}
27030	return json.Marshal(objectMap)
27031}
27032
27033// UnmarshalJSON is the custom unmarshaler for Watcher struct.
27034func (w *Watcher) UnmarshalJSON(body []byte) error {
27035	var m map[string]*json.RawMessage
27036	err := json.Unmarshal(body, &m)
27037	if err != nil {
27038		return err
27039	}
27040	for k, v := range m {
27041		switch k {
27042		case "etag":
27043			if v != nil {
27044				var etag string
27045				err = json.Unmarshal(*v, &etag)
27046				if err != nil {
27047					return err
27048				}
27049				w.Etag = &etag
27050			}
27051		case "properties":
27052			if v != nil {
27053				var watcherPropertiesFormat WatcherPropertiesFormat
27054				err = json.Unmarshal(*v, &watcherPropertiesFormat)
27055				if err != nil {
27056					return err
27057				}
27058				w.WatcherPropertiesFormat = &watcherPropertiesFormat
27059			}
27060		case "id":
27061			if v != nil {
27062				var ID string
27063				err = json.Unmarshal(*v, &ID)
27064				if err != nil {
27065					return err
27066				}
27067				w.ID = &ID
27068			}
27069		case "name":
27070			if v != nil {
27071				var name string
27072				err = json.Unmarshal(*v, &name)
27073				if err != nil {
27074					return err
27075				}
27076				w.Name = &name
27077			}
27078		case "type":
27079			if v != nil {
27080				var typeVar string
27081				err = json.Unmarshal(*v, &typeVar)
27082				if err != nil {
27083					return err
27084				}
27085				w.Type = &typeVar
27086			}
27087		case "location":
27088			if v != nil {
27089				var location string
27090				err = json.Unmarshal(*v, &location)
27091				if err != nil {
27092					return err
27093				}
27094				w.Location = &location
27095			}
27096		case "tags":
27097			if v != nil {
27098				var tags map[string]*string
27099				err = json.Unmarshal(*v, &tags)
27100				if err != nil {
27101					return err
27102				}
27103				w.Tags = tags
27104			}
27105		}
27106	}
27107
27108	return nil
27109}
27110
27111// WatcherListResult response for ListNetworkWatchers API service call.
27112type WatcherListResult struct {
27113	autorest.Response `json:"-"`
27114	// Value - List of network watcher resources.
27115	Value *[]Watcher `json:"value,omitempty"`
27116}
27117
27118// WatcherPropertiesFormat the network watcher properties.
27119type WatcherPropertiesFormat struct {
27120	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
27121	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
27122}
27123
27124// WatchersCheckConnectivityFuture an abstraction for monitoring and retrieving the results of a
27125// long-running operation.
27126type WatchersCheckConnectivityFuture struct {
27127	azure.FutureAPI
27128	// Result returns the result of the asynchronous operation.
27129	// If the operation has not completed it will return an error.
27130	Result func(WatchersClient) (ConnectivityInformation, error)
27131}
27132
27133// WatchersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
27134// operation.
27135type WatchersDeleteFuture struct {
27136	azure.FutureAPI
27137	// Result returns the result of the asynchronous operation.
27138	// If the operation has not completed it will return an error.
27139	Result func(WatchersClient) (autorest.Response, error)
27140}
27141
27142// WatchersGetAzureReachabilityReportFuture an abstraction for monitoring and retrieving the results of a
27143// long-running operation.
27144type WatchersGetAzureReachabilityReportFuture struct {
27145	azure.FutureAPI
27146	// Result returns the result of the asynchronous operation.
27147	// If the operation has not completed it will return an error.
27148	Result func(WatchersClient) (AzureReachabilityReport, error)
27149}
27150
27151// WatchersGetFlowLogStatusFuture an abstraction for monitoring and retrieving the results of a
27152// long-running operation.
27153type WatchersGetFlowLogStatusFuture struct {
27154	azure.FutureAPI
27155	// Result returns the result of the asynchronous operation.
27156	// If the operation has not completed it will return an error.
27157	Result func(WatchersClient) (FlowLogInformation, error)
27158}
27159
27160// WatchersGetNetworkConfigurationDiagnosticFuture an abstraction for monitoring and retrieving the results
27161// of a long-running operation.
27162type WatchersGetNetworkConfigurationDiagnosticFuture struct {
27163	azure.FutureAPI
27164	// Result returns the result of the asynchronous operation.
27165	// If the operation has not completed it will return an error.
27166	Result func(WatchersClient) (ConfigurationDiagnosticResponse, error)
27167}
27168
27169// WatchersGetNextHopFuture an abstraction for monitoring and retrieving the results of a long-running
27170// operation.
27171type WatchersGetNextHopFuture struct {
27172	azure.FutureAPI
27173	// Result returns the result of the asynchronous operation.
27174	// If the operation has not completed it will return an error.
27175	Result func(WatchersClient) (NextHopResult, error)
27176}
27177
27178// WatchersGetTroubleshootingFuture an abstraction for monitoring and retrieving the results of a
27179// long-running operation.
27180type WatchersGetTroubleshootingFuture struct {
27181	azure.FutureAPI
27182	// Result returns the result of the asynchronous operation.
27183	// If the operation has not completed it will return an error.
27184	Result func(WatchersClient) (TroubleshootingResult, error)
27185}
27186
27187// WatchersGetTroubleshootingResultFuture an abstraction for monitoring and retrieving the results of a
27188// long-running operation.
27189type WatchersGetTroubleshootingResultFuture struct {
27190	azure.FutureAPI
27191	// Result returns the result of the asynchronous operation.
27192	// If the operation has not completed it will return an error.
27193	Result func(WatchersClient) (TroubleshootingResult, error)
27194}
27195
27196// WatchersGetVMSecurityRulesFuture an abstraction for monitoring and retrieving the results of a
27197// long-running operation.
27198type WatchersGetVMSecurityRulesFuture struct {
27199	azure.FutureAPI
27200	// Result returns the result of the asynchronous operation.
27201	// If the operation has not completed it will return an error.
27202	Result func(WatchersClient) (SecurityGroupViewResult, error)
27203}
27204
27205// WatchersListAvailableProvidersFuture an abstraction for monitoring and retrieving the results of a
27206// long-running operation.
27207type WatchersListAvailableProvidersFuture struct {
27208	azure.FutureAPI
27209	// Result returns the result of the asynchronous operation.
27210	// If the operation has not completed it will return an error.
27211	Result func(WatchersClient) (AvailableProvidersList, error)
27212}
27213
27214// WatchersSetFlowLogConfigurationFuture an abstraction for monitoring and retrieving the results of a
27215// long-running operation.
27216type WatchersSetFlowLogConfigurationFuture struct {
27217	azure.FutureAPI
27218	// Result returns the result of the asynchronous operation.
27219	// If the operation has not completed it will return an error.
27220	Result func(WatchersClient) (FlowLogInformation, error)
27221}
27222
27223// WatchersVerifyIPFlowFuture an abstraction for monitoring and retrieving the results of a long-running
27224// operation.
27225type WatchersVerifyIPFlowFuture struct {
27226	azure.FutureAPI
27227	// Result returns the result of the asynchronous operation.
27228	// If the operation has not completed it will return an error.
27229	Result func(WatchersClient) (VerificationIPFlowResult, error)
27230}
27231
27232// WebApplicationFirewallCustomRule defines contents of a web application rule
27233type WebApplicationFirewallCustomRule struct {
27234	// Name - Gets name of the resource that is unique within a policy. This name can be used to access the resource.
27235	Name *string `json:"name,omitempty"`
27236	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
27237	Etag *string `json:"etag,omitempty"`
27238	// Priority - Describes priority of the rule. Rules with a lower value will be evaluated before rules with a higher value
27239	Priority *int32 `json:"priority,omitempty"`
27240	// RuleType - Describes type of rule. Possible values include: 'WebApplicationFirewallRuleTypeMatchRule', 'WebApplicationFirewallRuleTypeInvalid'
27241	RuleType WebApplicationFirewallRuleType `json:"ruleType,omitempty"`
27242	// MatchConditions - List of match conditions
27243	MatchConditions *[]MatchCondition `json:"matchConditions,omitempty"`
27244	// Action - Type of Actions. Possible values include: 'WebApplicationFirewallActionAllow', 'WebApplicationFirewallActionBlock', 'WebApplicationFirewallActionLog'
27245	Action WebApplicationFirewallAction `json:"action,omitempty"`
27246}
27247
27248// MarshalJSON is the custom marshaler for WebApplicationFirewallCustomRule.
27249func (wafcr WebApplicationFirewallCustomRule) MarshalJSON() ([]byte, error) {
27250	objectMap := make(map[string]interface{})
27251	if wafcr.Name != nil {
27252		objectMap["name"] = wafcr.Name
27253	}
27254	if wafcr.Priority != nil {
27255		objectMap["priority"] = wafcr.Priority
27256	}
27257	if wafcr.RuleType != "" {
27258		objectMap["ruleType"] = wafcr.RuleType
27259	}
27260	if wafcr.MatchConditions != nil {
27261		objectMap["matchConditions"] = wafcr.MatchConditions
27262	}
27263	if wafcr.Action != "" {
27264		objectMap["action"] = wafcr.Action
27265	}
27266	return json.Marshal(objectMap)
27267}
27268
27269// WebApplicationFirewallPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a
27270// long-running operation.
27271type WebApplicationFirewallPoliciesDeleteFuture struct {
27272	azure.FutureAPI
27273	// Result returns the result of the asynchronous operation.
27274	// If the operation has not completed it will return an error.
27275	Result func(WebApplicationFirewallPoliciesClient) (autorest.Response, error)
27276}
27277
27278// WebApplicationFirewallPolicy defines web application firewall policy.
27279type WebApplicationFirewallPolicy struct {
27280	autorest.Response `json:"-"`
27281	// WebApplicationFirewallPolicyPropertiesFormat - Properties of the web application firewall policy.
27282	*WebApplicationFirewallPolicyPropertiesFormat `json:"properties,omitempty"`
27283	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
27284	Etag *string `json:"etag,omitempty"`
27285	// ID - Resource ID.
27286	ID *string `json:"id,omitempty"`
27287	// Name - READ-ONLY; Resource name.
27288	Name *string `json:"name,omitempty"`
27289	// Type - READ-ONLY; Resource type.
27290	Type *string `json:"type,omitempty"`
27291	// Location - Resource location.
27292	Location *string `json:"location,omitempty"`
27293	// Tags - Resource tags.
27294	Tags map[string]*string `json:"tags"`
27295}
27296
27297// MarshalJSON is the custom marshaler for WebApplicationFirewallPolicy.
27298func (wafp WebApplicationFirewallPolicy) MarshalJSON() ([]byte, error) {
27299	objectMap := make(map[string]interface{})
27300	if wafp.WebApplicationFirewallPolicyPropertiesFormat != nil {
27301		objectMap["properties"] = wafp.WebApplicationFirewallPolicyPropertiesFormat
27302	}
27303	if wafp.Etag != nil {
27304		objectMap["etag"] = wafp.Etag
27305	}
27306	if wafp.ID != nil {
27307		objectMap["id"] = wafp.ID
27308	}
27309	if wafp.Location != nil {
27310		objectMap["location"] = wafp.Location
27311	}
27312	if wafp.Tags != nil {
27313		objectMap["tags"] = wafp.Tags
27314	}
27315	return json.Marshal(objectMap)
27316}
27317
27318// UnmarshalJSON is the custom unmarshaler for WebApplicationFirewallPolicy struct.
27319func (wafp *WebApplicationFirewallPolicy) UnmarshalJSON(body []byte) error {
27320	var m map[string]*json.RawMessage
27321	err := json.Unmarshal(body, &m)
27322	if err != nil {
27323		return err
27324	}
27325	for k, v := range m {
27326		switch k {
27327		case "properties":
27328			if v != nil {
27329				var webApplicationFirewallPolicyPropertiesFormat WebApplicationFirewallPolicyPropertiesFormat
27330				err = json.Unmarshal(*v, &webApplicationFirewallPolicyPropertiesFormat)
27331				if err != nil {
27332					return err
27333				}
27334				wafp.WebApplicationFirewallPolicyPropertiesFormat = &webApplicationFirewallPolicyPropertiesFormat
27335			}
27336		case "etag":
27337			if v != nil {
27338				var etag string
27339				err = json.Unmarshal(*v, &etag)
27340				if err != nil {
27341					return err
27342				}
27343				wafp.Etag = &etag
27344			}
27345		case "id":
27346			if v != nil {
27347				var ID string
27348				err = json.Unmarshal(*v, &ID)
27349				if err != nil {
27350					return err
27351				}
27352				wafp.ID = &ID
27353			}
27354		case "name":
27355			if v != nil {
27356				var name string
27357				err = json.Unmarshal(*v, &name)
27358				if err != nil {
27359					return err
27360				}
27361				wafp.Name = &name
27362			}
27363		case "type":
27364			if v != nil {
27365				var typeVar string
27366				err = json.Unmarshal(*v, &typeVar)
27367				if err != nil {
27368					return err
27369				}
27370				wafp.Type = &typeVar
27371			}
27372		case "location":
27373			if v != nil {
27374				var location string
27375				err = json.Unmarshal(*v, &location)
27376				if err != nil {
27377					return err
27378				}
27379				wafp.Location = &location
27380			}
27381		case "tags":
27382			if v != nil {
27383				var tags map[string]*string
27384				err = json.Unmarshal(*v, &tags)
27385				if err != nil {
27386					return err
27387				}
27388				wafp.Tags = tags
27389			}
27390		}
27391	}
27392
27393	return nil
27394}
27395
27396// WebApplicationFirewallPolicyListResult result of the request to list WebApplicationFirewallPolicies. It
27397// contains a list of WebApplicationFirewallPolicy objects and a URL link to get the next set of results.
27398type WebApplicationFirewallPolicyListResult struct {
27399	autorest.Response `json:"-"`
27400	// Value - READ-ONLY; List of WebApplicationFirewallPolicies within a resource group.
27401	Value *[]WebApplicationFirewallPolicy `json:"value,omitempty"`
27402	// NextLink - READ-ONLY; URL to get the next set of WebApplicationFirewallPolicy objects if there are any.
27403	NextLink *string `json:"nextLink,omitempty"`
27404}
27405
27406// WebApplicationFirewallPolicyListResultIterator provides access to a complete listing of
27407// WebApplicationFirewallPolicy values.
27408type WebApplicationFirewallPolicyListResultIterator struct {
27409	i    int
27410	page WebApplicationFirewallPolicyListResultPage
27411}
27412
27413// NextWithContext advances to the next value.  If there was an error making
27414// the request the iterator does not advance and the error is returned.
27415func (iter *WebApplicationFirewallPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) {
27416	if tracing.IsEnabled() {
27417		ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPolicyListResultIterator.NextWithContext")
27418		defer func() {
27419			sc := -1
27420			if iter.Response().Response.Response != nil {
27421				sc = iter.Response().Response.Response.StatusCode
27422			}
27423			tracing.EndSpan(ctx, sc, err)
27424		}()
27425	}
27426	iter.i++
27427	if iter.i < len(iter.page.Values()) {
27428		return nil
27429	}
27430	err = iter.page.NextWithContext(ctx)
27431	if err != nil {
27432		iter.i--
27433		return err
27434	}
27435	iter.i = 0
27436	return nil
27437}
27438
27439// Next advances to the next value.  If there was an error making
27440// the request the iterator does not advance and the error is returned.
27441// Deprecated: Use NextWithContext() instead.
27442func (iter *WebApplicationFirewallPolicyListResultIterator) Next() error {
27443	return iter.NextWithContext(context.Background())
27444}
27445
27446// NotDone returns true if the enumeration should be started or is not yet complete.
27447func (iter WebApplicationFirewallPolicyListResultIterator) NotDone() bool {
27448	return iter.page.NotDone() && iter.i < len(iter.page.Values())
27449}
27450
27451// Response returns the raw server response from the last page request.
27452func (iter WebApplicationFirewallPolicyListResultIterator) Response() WebApplicationFirewallPolicyListResult {
27453	return iter.page.Response()
27454}
27455
27456// Value returns the current value or a zero-initialized value if the
27457// iterator has advanced beyond the end of the collection.
27458func (iter WebApplicationFirewallPolicyListResultIterator) Value() WebApplicationFirewallPolicy {
27459	if !iter.page.NotDone() {
27460		return WebApplicationFirewallPolicy{}
27461	}
27462	return iter.page.Values()[iter.i]
27463}
27464
27465// Creates a new instance of the WebApplicationFirewallPolicyListResultIterator type.
27466func NewWebApplicationFirewallPolicyListResultIterator(page WebApplicationFirewallPolicyListResultPage) WebApplicationFirewallPolicyListResultIterator {
27467	return WebApplicationFirewallPolicyListResultIterator{page: page}
27468}
27469
27470// IsEmpty returns true if the ListResult contains no values.
27471func (wafplr WebApplicationFirewallPolicyListResult) IsEmpty() bool {
27472	return wafplr.Value == nil || len(*wafplr.Value) == 0
27473}
27474
27475// hasNextLink returns true if the NextLink is not empty.
27476func (wafplr WebApplicationFirewallPolicyListResult) hasNextLink() bool {
27477	return wafplr.NextLink != nil && len(*wafplr.NextLink) != 0
27478}
27479
27480// webApplicationFirewallPolicyListResultPreparer prepares a request to retrieve the next set of results.
27481// It returns nil if no more results exist.
27482func (wafplr WebApplicationFirewallPolicyListResult) webApplicationFirewallPolicyListResultPreparer(ctx context.Context) (*http.Request, error) {
27483	if !wafplr.hasNextLink() {
27484		return nil, nil
27485	}
27486	return autorest.Prepare((&http.Request{}).WithContext(ctx),
27487		autorest.AsJSON(),
27488		autorest.AsGet(),
27489		autorest.WithBaseURL(to.String(wafplr.NextLink)))
27490}
27491
27492// WebApplicationFirewallPolicyListResultPage contains a page of WebApplicationFirewallPolicy values.
27493type WebApplicationFirewallPolicyListResultPage struct {
27494	fn     func(context.Context, WebApplicationFirewallPolicyListResult) (WebApplicationFirewallPolicyListResult, error)
27495	wafplr WebApplicationFirewallPolicyListResult
27496}
27497
27498// NextWithContext advances to the next page of values.  If there was an error making
27499// the request the page does not advance and the error is returned.
27500func (page *WebApplicationFirewallPolicyListResultPage) NextWithContext(ctx context.Context) (err error) {
27501	if tracing.IsEnabled() {
27502		ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPolicyListResultPage.NextWithContext")
27503		defer func() {
27504			sc := -1
27505			if page.Response().Response.Response != nil {
27506				sc = page.Response().Response.Response.StatusCode
27507			}
27508			tracing.EndSpan(ctx, sc, err)
27509		}()
27510	}
27511	for {
27512		next, err := page.fn(ctx, page.wafplr)
27513		if err != nil {
27514			return err
27515		}
27516		page.wafplr = next
27517		if !next.hasNextLink() || !next.IsEmpty() {
27518			break
27519		}
27520	}
27521	return nil
27522}
27523
27524// Next advances to the next page of values.  If there was an error making
27525// the request the page does not advance and the error is returned.
27526// Deprecated: Use NextWithContext() instead.
27527func (page *WebApplicationFirewallPolicyListResultPage) Next() error {
27528	return page.NextWithContext(context.Background())
27529}
27530
27531// NotDone returns true if the page enumeration should be started or is not yet complete.
27532func (page WebApplicationFirewallPolicyListResultPage) NotDone() bool {
27533	return !page.wafplr.IsEmpty()
27534}
27535
27536// Response returns the raw server response from the last page request.
27537func (page WebApplicationFirewallPolicyListResultPage) Response() WebApplicationFirewallPolicyListResult {
27538	return page.wafplr
27539}
27540
27541// Values returns the slice of values for the current page or nil if there are no values.
27542func (page WebApplicationFirewallPolicyListResultPage) Values() []WebApplicationFirewallPolicy {
27543	if page.wafplr.IsEmpty() {
27544		return nil
27545	}
27546	return *page.wafplr.Value
27547}
27548
27549// Creates a new instance of the WebApplicationFirewallPolicyListResultPage type.
27550func NewWebApplicationFirewallPolicyListResultPage(cur WebApplicationFirewallPolicyListResult, getNextPage func(context.Context, WebApplicationFirewallPolicyListResult) (WebApplicationFirewallPolicyListResult, error)) WebApplicationFirewallPolicyListResultPage {
27551	return WebApplicationFirewallPolicyListResultPage{
27552		fn:     getNextPage,
27553		wafplr: cur,
27554	}
27555}
27556
27557// WebApplicationFirewallPolicyPropertiesFormat defines web application firewall policy properties
27558type WebApplicationFirewallPolicyPropertiesFormat struct {
27559	// PolicySettings - Describes  policySettings for policy
27560	PolicySettings *PolicySettings `json:"policySettings,omitempty"`
27561	// CustomRules - Describes custom rules inside the policy
27562	CustomRules *[]WebApplicationFirewallCustomRule `json:"customRules,omitempty"`
27563	// ApplicationGateways - READ-ONLY; A collection of references to application gateways.
27564	ApplicationGateways *[]ApplicationGateway `json:"applicationGateways,omitempty"`
27565	// ProvisioningState - READ-ONLY; Provisioning state of the WebApplicationFirewallPolicy.
27566	ProvisioningState *string `json:"provisioningState,omitempty"`
27567	// ResourceState - READ-ONLY; Resource status of the policy. Possible values include: 'WebApplicationFirewallPolicyResourceStateCreating', 'WebApplicationFirewallPolicyResourceStateEnabling', 'WebApplicationFirewallPolicyResourceStateEnabled', 'WebApplicationFirewallPolicyResourceStateDisabling', 'WebApplicationFirewallPolicyResourceStateDisabled', 'WebApplicationFirewallPolicyResourceStateDeleting'
27568	ResourceState WebApplicationFirewallPolicyResourceState `json:"resourceState,omitempty"`
27569}
27570
27571// MarshalJSON is the custom marshaler for WebApplicationFirewallPolicyPropertiesFormat.
27572func (wafppf WebApplicationFirewallPolicyPropertiesFormat) MarshalJSON() ([]byte, error) {
27573	objectMap := make(map[string]interface{})
27574	if wafppf.PolicySettings != nil {
27575		objectMap["policySettings"] = wafppf.PolicySettings
27576	}
27577	if wafppf.CustomRules != nil {
27578		objectMap["customRules"] = wafppf.CustomRules
27579	}
27580	return json.Marshal(objectMap)
27581}
27582