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-06-01/network"
33
34// AddressSpace addressSpace contains an array of IP address ranges that can be used by subnets of the
35// virtual network.
36type AddressSpace struct {
37	// AddressPrefixes - A list of address blocks reserved for this virtual network in CIDR notation.
38	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
39}
40
41// ApplicationGateway application gateway resource.
42type ApplicationGateway struct {
43	autorest.Response `json:"-"`
44	// ApplicationGatewayPropertiesFormat - 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	// Port - Custom port which will be used for probing the backend servers. The valid value ranges from 1 to 65535. In case not set, port from http settings will be used. This property is valid for Standard_v2 and WAF_v2 only.
1900	Port *int32 `json:"port,omitempty"`
1901}
1902
1903// ApplicationGatewayPropertiesFormat properties of the application gateway.
1904type ApplicationGatewayPropertiesFormat struct {
1905	// Sku - SKU of the application gateway resource.
1906	Sku *ApplicationGatewaySku `json:"sku,omitempty"`
1907	// SslPolicy - SSL policy of the application gateway resource.
1908	SslPolicy *ApplicationGatewaySslPolicy `json:"sslPolicy,omitempty"`
1909	// OperationalState - READ-ONLY; Operational state of the application gateway resource. Possible values include: 'Stopped', 'Starting', 'Running', 'Stopping'
1910	OperationalState ApplicationGatewayOperationalState `json:"operationalState,omitempty"`
1911	// 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).
1912	GatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"gatewayIPConfigurations,omitempty"`
1913	// 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).
1914	AuthenticationCertificates *[]ApplicationGatewayAuthenticationCertificate `json:"authenticationCertificates,omitempty"`
1915	// 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).
1916	TrustedRootCertificates *[]ApplicationGatewayTrustedRootCertificate `json:"trustedRootCertificates,omitempty"`
1917	// 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).
1918	SslCertificates *[]ApplicationGatewaySslCertificate `json:"sslCertificates,omitempty"`
1919	// 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).
1920	FrontendIPConfigurations *[]ApplicationGatewayFrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"`
1921	// 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).
1922	FrontendPorts *[]ApplicationGatewayFrontendPort `json:"frontendPorts,omitempty"`
1923	// Probes - Probes of the application gateway resource.
1924	Probes *[]ApplicationGatewayProbe `json:"probes,omitempty"`
1925	// 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).
1926	BackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"backendAddressPools,omitempty"`
1927	// 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).
1928	BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettingsCollection,omitempty"`
1929	// 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).
1930	HTTPListeners *[]ApplicationGatewayHTTPListener `json:"httpListeners,omitempty"`
1931	// 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).
1932	URLPathMaps *[]ApplicationGatewayURLPathMap `json:"urlPathMaps,omitempty"`
1933	// RequestRoutingRules - Request routing rules of the application gateway resource.
1934	RequestRoutingRules *[]ApplicationGatewayRequestRoutingRule `json:"requestRoutingRules,omitempty"`
1935	// RewriteRuleSets - Rewrite rules for the application gateway resource.
1936	RewriteRuleSets *[]ApplicationGatewayRewriteRuleSet `json:"rewriteRuleSets,omitempty"`
1937	// 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).
1938	RedirectConfigurations *[]ApplicationGatewayRedirectConfiguration `json:"redirectConfigurations,omitempty"`
1939	// WebApplicationFirewallConfiguration - Web application firewall configuration.
1940	WebApplicationFirewallConfiguration *ApplicationGatewayWebApplicationFirewallConfiguration `json:"webApplicationFirewallConfiguration,omitempty"`
1941	// FirewallPolicy - Reference of the FirewallPolicy resource.
1942	FirewallPolicy *SubResource `json:"firewallPolicy,omitempty"`
1943	// EnableHTTP2 - Whether HTTP2 is enabled on the application gateway resource.
1944	EnableHTTP2 *bool `json:"enableHttp2,omitempty"`
1945	// EnableFips - Whether FIPS is enabled on the application gateway resource.
1946	EnableFips *bool `json:"enableFips,omitempty"`
1947	// AutoscaleConfiguration - Autoscale Configuration.
1948	AutoscaleConfiguration *ApplicationGatewayAutoscaleConfiguration `json:"autoscaleConfiguration,omitempty"`
1949	// ResourceGUID - Resource GUID property of the application gateway resource.
1950	ResourceGUID *string `json:"resourceGuid,omitempty"`
1951	// ProvisioningState - Provisioning state of the application gateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1952	ProvisioningState *string `json:"provisioningState,omitempty"`
1953	// CustomErrorConfigurations - Custom error configurations of the application gateway resource.
1954	CustomErrorConfigurations *[]ApplicationGatewayCustomError `json:"customErrorConfigurations,omitempty"`
1955}
1956
1957// MarshalJSON is the custom marshaler for ApplicationGatewayPropertiesFormat.
1958func (agpf ApplicationGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
1959	objectMap := make(map[string]interface{})
1960	if agpf.Sku != nil {
1961		objectMap["sku"] = agpf.Sku
1962	}
1963	if agpf.SslPolicy != nil {
1964		objectMap["sslPolicy"] = agpf.SslPolicy
1965	}
1966	if agpf.GatewayIPConfigurations != nil {
1967		objectMap["gatewayIPConfigurations"] = agpf.GatewayIPConfigurations
1968	}
1969	if agpf.AuthenticationCertificates != nil {
1970		objectMap["authenticationCertificates"] = agpf.AuthenticationCertificates
1971	}
1972	if agpf.TrustedRootCertificates != nil {
1973		objectMap["trustedRootCertificates"] = agpf.TrustedRootCertificates
1974	}
1975	if agpf.SslCertificates != nil {
1976		objectMap["sslCertificates"] = agpf.SslCertificates
1977	}
1978	if agpf.FrontendIPConfigurations != nil {
1979		objectMap["frontendIPConfigurations"] = agpf.FrontendIPConfigurations
1980	}
1981	if agpf.FrontendPorts != nil {
1982		objectMap["frontendPorts"] = agpf.FrontendPorts
1983	}
1984	if agpf.Probes != nil {
1985		objectMap["probes"] = agpf.Probes
1986	}
1987	if agpf.BackendAddressPools != nil {
1988		objectMap["backendAddressPools"] = agpf.BackendAddressPools
1989	}
1990	if agpf.BackendHTTPSettingsCollection != nil {
1991		objectMap["backendHttpSettingsCollection"] = agpf.BackendHTTPSettingsCollection
1992	}
1993	if agpf.HTTPListeners != nil {
1994		objectMap["httpListeners"] = agpf.HTTPListeners
1995	}
1996	if agpf.URLPathMaps != nil {
1997		objectMap["urlPathMaps"] = agpf.URLPathMaps
1998	}
1999	if agpf.RequestRoutingRules != nil {
2000		objectMap["requestRoutingRules"] = agpf.RequestRoutingRules
2001	}
2002	if agpf.RewriteRuleSets != nil {
2003		objectMap["rewriteRuleSets"] = agpf.RewriteRuleSets
2004	}
2005	if agpf.RedirectConfigurations != nil {
2006		objectMap["redirectConfigurations"] = agpf.RedirectConfigurations
2007	}
2008	if agpf.WebApplicationFirewallConfiguration != nil {
2009		objectMap["webApplicationFirewallConfiguration"] = agpf.WebApplicationFirewallConfiguration
2010	}
2011	if agpf.FirewallPolicy != nil {
2012		objectMap["firewallPolicy"] = agpf.FirewallPolicy
2013	}
2014	if agpf.EnableHTTP2 != nil {
2015		objectMap["enableHttp2"] = agpf.EnableHTTP2
2016	}
2017	if agpf.EnableFips != nil {
2018		objectMap["enableFips"] = agpf.EnableFips
2019	}
2020	if agpf.AutoscaleConfiguration != nil {
2021		objectMap["autoscaleConfiguration"] = agpf.AutoscaleConfiguration
2022	}
2023	if agpf.ResourceGUID != nil {
2024		objectMap["resourceGuid"] = agpf.ResourceGUID
2025	}
2026	if agpf.ProvisioningState != nil {
2027		objectMap["provisioningState"] = agpf.ProvisioningState
2028	}
2029	if agpf.CustomErrorConfigurations != nil {
2030		objectMap["customErrorConfigurations"] = agpf.CustomErrorConfigurations
2031	}
2032	return json.Marshal(objectMap)
2033}
2034
2035// ApplicationGatewayRedirectConfiguration redirect configuration of an application gateway.
2036type ApplicationGatewayRedirectConfiguration struct {
2037	// ApplicationGatewayRedirectConfigurationPropertiesFormat - Properties of the application gateway redirect configuration.
2038	*ApplicationGatewayRedirectConfigurationPropertiesFormat `json:"properties,omitempty"`
2039	// Name - Name of the redirect configuration that is unique within an Application Gateway.
2040	Name *string `json:"name,omitempty"`
2041	// Etag - A unique read-only string that changes whenever the resource is updated.
2042	Etag *string `json:"etag,omitempty"`
2043	// Type - Type of the resource.
2044	Type *string `json:"type,omitempty"`
2045	// ID - Resource ID.
2046	ID *string `json:"id,omitempty"`
2047}
2048
2049// MarshalJSON is the custom marshaler for ApplicationGatewayRedirectConfiguration.
2050func (agrc ApplicationGatewayRedirectConfiguration) MarshalJSON() ([]byte, error) {
2051	objectMap := make(map[string]interface{})
2052	if agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat != nil {
2053		objectMap["properties"] = agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat
2054	}
2055	if agrc.Name != nil {
2056		objectMap["name"] = agrc.Name
2057	}
2058	if agrc.Etag != nil {
2059		objectMap["etag"] = agrc.Etag
2060	}
2061	if agrc.Type != nil {
2062		objectMap["type"] = agrc.Type
2063	}
2064	if agrc.ID != nil {
2065		objectMap["id"] = agrc.ID
2066	}
2067	return json.Marshal(objectMap)
2068}
2069
2070// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRedirectConfiguration struct.
2071func (agrc *ApplicationGatewayRedirectConfiguration) UnmarshalJSON(body []byte) error {
2072	var m map[string]*json.RawMessage
2073	err := json.Unmarshal(body, &m)
2074	if err != nil {
2075		return err
2076	}
2077	for k, v := range m {
2078		switch k {
2079		case "properties":
2080			if v != nil {
2081				var applicationGatewayRedirectConfigurationPropertiesFormat ApplicationGatewayRedirectConfigurationPropertiesFormat
2082				err = json.Unmarshal(*v, &applicationGatewayRedirectConfigurationPropertiesFormat)
2083				if err != nil {
2084					return err
2085				}
2086				agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat = &applicationGatewayRedirectConfigurationPropertiesFormat
2087			}
2088		case "name":
2089			if v != nil {
2090				var name string
2091				err = json.Unmarshal(*v, &name)
2092				if err != nil {
2093					return err
2094				}
2095				agrc.Name = &name
2096			}
2097		case "etag":
2098			if v != nil {
2099				var etag string
2100				err = json.Unmarshal(*v, &etag)
2101				if err != nil {
2102					return err
2103				}
2104				agrc.Etag = &etag
2105			}
2106		case "type":
2107			if v != nil {
2108				var typeVar string
2109				err = json.Unmarshal(*v, &typeVar)
2110				if err != nil {
2111					return err
2112				}
2113				agrc.Type = &typeVar
2114			}
2115		case "id":
2116			if v != nil {
2117				var ID string
2118				err = json.Unmarshal(*v, &ID)
2119				if err != nil {
2120					return err
2121				}
2122				agrc.ID = &ID
2123			}
2124		}
2125	}
2126
2127	return nil
2128}
2129
2130// ApplicationGatewayRedirectConfigurationPropertiesFormat properties of redirect configuration of the
2131// application gateway.
2132type ApplicationGatewayRedirectConfigurationPropertiesFormat struct {
2133	// RedirectType - HTTP redirection type. Possible values include: 'Permanent', 'Found', 'SeeOther', 'Temporary'
2134	RedirectType ApplicationGatewayRedirectType `json:"redirectType,omitempty"`
2135	// TargetListener - Reference to a listener to redirect the request to.
2136	TargetListener *SubResource `json:"targetListener,omitempty"`
2137	// TargetURL - Url to redirect the request to.
2138	TargetURL *string `json:"targetUrl,omitempty"`
2139	// IncludePath - Include path in the redirected url.
2140	IncludePath *bool `json:"includePath,omitempty"`
2141	// IncludeQueryString - Include query string in the redirected url.
2142	IncludeQueryString *bool `json:"includeQueryString,omitempty"`
2143	// RequestRoutingRules - Request routing specifying redirect configuration.
2144	RequestRoutingRules *[]SubResource `json:"requestRoutingRules,omitempty"`
2145	// URLPathMaps - Url path maps specifying default redirect configuration.
2146	URLPathMaps *[]SubResource `json:"urlPathMaps,omitempty"`
2147	// PathRules - Path rules specifying redirect configuration.
2148	PathRules *[]SubResource `json:"pathRules,omitempty"`
2149}
2150
2151// ApplicationGatewayRequestRoutingRule request routing rule of an application gateway.
2152type ApplicationGatewayRequestRoutingRule struct {
2153	// ApplicationGatewayRequestRoutingRulePropertiesFormat - Properties of the application gateway request routing rule.
2154	*ApplicationGatewayRequestRoutingRulePropertiesFormat `json:"properties,omitempty"`
2155	// Name - Name of the request routing rule that is unique within an Application Gateway.
2156	Name *string `json:"name,omitempty"`
2157	// Etag - A unique read-only string that changes whenever the resource is updated.
2158	Etag *string `json:"etag,omitempty"`
2159	// Type - Type of the resource.
2160	Type *string `json:"type,omitempty"`
2161	// ID - Resource ID.
2162	ID *string `json:"id,omitempty"`
2163}
2164
2165// MarshalJSON is the custom marshaler for ApplicationGatewayRequestRoutingRule.
2166func (agrrr ApplicationGatewayRequestRoutingRule) MarshalJSON() ([]byte, error) {
2167	objectMap := make(map[string]interface{})
2168	if agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat != nil {
2169		objectMap["properties"] = agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat
2170	}
2171	if agrrr.Name != nil {
2172		objectMap["name"] = agrrr.Name
2173	}
2174	if agrrr.Etag != nil {
2175		objectMap["etag"] = agrrr.Etag
2176	}
2177	if agrrr.Type != nil {
2178		objectMap["type"] = agrrr.Type
2179	}
2180	if agrrr.ID != nil {
2181		objectMap["id"] = agrrr.ID
2182	}
2183	return json.Marshal(objectMap)
2184}
2185
2186// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRequestRoutingRule struct.
2187func (agrrr *ApplicationGatewayRequestRoutingRule) UnmarshalJSON(body []byte) error {
2188	var m map[string]*json.RawMessage
2189	err := json.Unmarshal(body, &m)
2190	if err != nil {
2191		return err
2192	}
2193	for k, v := range m {
2194		switch k {
2195		case "properties":
2196			if v != nil {
2197				var applicationGatewayRequestRoutingRulePropertiesFormat ApplicationGatewayRequestRoutingRulePropertiesFormat
2198				err = json.Unmarshal(*v, &applicationGatewayRequestRoutingRulePropertiesFormat)
2199				if err != nil {
2200					return err
2201				}
2202				agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat = &applicationGatewayRequestRoutingRulePropertiesFormat
2203			}
2204		case "name":
2205			if v != nil {
2206				var name string
2207				err = json.Unmarshal(*v, &name)
2208				if err != nil {
2209					return err
2210				}
2211				agrrr.Name = &name
2212			}
2213		case "etag":
2214			if v != nil {
2215				var etag string
2216				err = json.Unmarshal(*v, &etag)
2217				if err != nil {
2218					return err
2219				}
2220				agrrr.Etag = &etag
2221			}
2222		case "type":
2223			if v != nil {
2224				var typeVar string
2225				err = json.Unmarshal(*v, &typeVar)
2226				if err != nil {
2227					return err
2228				}
2229				agrrr.Type = &typeVar
2230			}
2231		case "id":
2232			if v != nil {
2233				var ID string
2234				err = json.Unmarshal(*v, &ID)
2235				if err != nil {
2236					return err
2237				}
2238				agrrr.ID = &ID
2239			}
2240		}
2241	}
2242
2243	return nil
2244}
2245
2246// ApplicationGatewayRequestRoutingRulePropertiesFormat properties of request routing rule of the
2247// application gateway.
2248type ApplicationGatewayRequestRoutingRulePropertiesFormat struct {
2249	// RuleType - Rule type. Possible values include: 'Basic', 'PathBasedRouting'
2250	RuleType ApplicationGatewayRequestRoutingRuleType `json:"ruleType,omitempty"`
2251	// BackendAddressPool - Backend address pool resource of the application gateway.
2252	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
2253	// BackendHTTPSettings - Backend http settings resource of the application gateway.
2254	BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"`
2255	// HTTPListener - Http listener resource of the application gateway.
2256	HTTPListener *SubResource `json:"httpListener,omitempty"`
2257	// URLPathMap - URL path map resource of the application gateway.
2258	URLPathMap *SubResource `json:"urlPathMap,omitempty"`
2259	// RewriteRuleSet - Rewrite Rule Set resource in Basic rule of the application gateway.
2260	RewriteRuleSet *SubResource `json:"rewriteRuleSet,omitempty"`
2261	// RedirectConfiguration - Redirect configuration resource of the application gateway.
2262	RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"`
2263	// ProvisioningState - Provisioning state of the request routing rule resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2264	ProvisioningState *string `json:"provisioningState,omitempty"`
2265}
2266
2267// ApplicationGatewayRewriteRule rewrite rule of an application gateway.
2268type ApplicationGatewayRewriteRule struct {
2269	// Name - Name of the rewrite rule that is unique within an Application Gateway.
2270	Name *string `json:"name,omitempty"`
2271	// RuleSequence - Rule Sequence of the rewrite rule that determines the order of execution of a particular rule in a RewriteRuleSet.
2272	RuleSequence *int32 `json:"ruleSequence,omitempty"`
2273	// Conditions - Conditions based on which the action set execution will be evaluated.
2274	Conditions *[]ApplicationGatewayRewriteRuleCondition `json:"conditions,omitempty"`
2275	// ActionSet - Set of actions to be done as part of the rewrite Rule.
2276	ActionSet *ApplicationGatewayRewriteRuleActionSet `json:"actionSet,omitempty"`
2277}
2278
2279// ApplicationGatewayRewriteRuleActionSet set of actions in the Rewrite Rule in Application Gateway.
2280type ApplicationGatewayRewriteRuleActionSet struct {
2281	// RequestHeaderConfigurations - Request Header Actions in the Action Set.
2282	RequestHeaderConfigurations *[]ApplicationGatewayHeaderConfiguration `json:"requestHeaderConfigurations,omitempty"`
2283	// ResponseHeaderConfigurations - Response Header Actions in the Action Set.
2284	ResponseHeaderConfigurations *[]ApplicationGatewayHeaderConfiguration `json:"responseHeaderConfigurations,omitempty"`
2285}
2286
2287// ApplicationGatewayRewriteRuleCondition set of conditions in the Rewrite Rule in Application Gateway.
2288type ApplicationGatewayRewriteRuleCondition struct {
2289	// Variable - The condition parameter of the RewriteRuleCondition.
2290	Variable *string `json:"variable,omitempty"`
2291	// Pattern - The pattern, either fixed string or regular expression, that evaluates the truthfulness of the condition.
2292	Pattern *string `json:"pattern,omitempty"`
2293	// IgnoreCase - Setting this paramter to truth value with force the pattern to do a case in-sensitive comparison.
2294	IgnoreCase *bool `json:"ignoreCase,omitempty"`
2295	// Negate - Setting this value as truth will force to check the negation of the condition given by the user.
2296	Negate *bool `json:"negate,omitempty"`
2297}
2298
2299// ApplicationGatewayRewriteRuleSet rewrite rule set of an application gateway.
2300type ApplicationGatewayRewriteRuleSet struct {
2301	// ApplicationGatewayRewriteRuleSetPropertiesFormat - Properties of the application gateway rewrite rule set.
2302	*ApplicationGatewayRewriteRuleSetPropertiesFormat `json:"properties,omitempty"`
2303	// Name - Name of the rewrite rule set that is unique within an Application Gateway.
2304	Name *string `json:"name,omitempty"`
2305	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
2306	Etag *string `json:"etag,omitempty"`
2307	// ID - Resource ID.
2308	ID *string `json:"id,omitempty"`
2309}
2310
2311// MarshalJSON is the custom marshaler for ApplicationGatewayRewriteRuleSet.
2312func (agrrs ApplicationGatewayRewriteRuleSet) MarshalJSON() ([]byte, error) {
2313	objectMap := make(map[string]interface{})
2314	if agrrs.ApplicationGatewayRewriteRuleSetPropertiesFormat != nil {
2315		objectMap["properties"] = agrrs.ApplicationGatewayRewriteRuleSetPropertiesFormat
2316	}
2317	if agrrs.Name != nil {
2318		objectMap["name"] = agrrs.Name
2319	}
2320	if agrrs.ID != nil {
2321		objectMap["id"] = agrrs.ID
2322	}
2323	return json.Marshal(objectMap)
2324}
2325
2326// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRewriteRuleSet struct.
2327func (agrrs *ApplicationGatewayRewriteRuleSet) UnmarshalJSON(body []byte) error {
2328	var m map[string]*json.RawMessage
2329	err := json.Unmarshal(body, &m)
2330	if err != nil {
2331		return err
2332	}
2333	for k, v := range m {
2334		switch k {
2335		case "properties":
2336			if v != nil {
2337				var applicationGatewayRewriteRuleSetPropertiesFormat ApplicationGatewayRewriteRuleSetPropertiesFormat
2338				err = json.Unmarshal(*v, &applicationGatewayRewriteRuleSetPropertiesFormat)
2339				if err != nil {
2340					return err
2341				}
2342				agrrs.ApplicationGatewayRewriteRuleSetPropertiesFormat = &applicationGatewayRewriteRuleSetPropertiesFormat
2343			}
2344		case "name":
2345			if v != nil {
2346				var name string
2347				err = json.Unmarshal(*v, &name)
2348				if err != nil {
2349					return err
2350				}
2351				agrrs.Name = &name
2352			}
2353		case "etag":
2354			if v != nil {
2355				var etag string
2356				err = json.Unmarshal(*v, &etag)
2357				if err != nil {
2358					return err
2359				}
2360				agrrs.Etag = &etag
2361			}
2362		case "id":
2363			if v != nil {
2364				var ID string
2365				err = json.Unmarshal(*v, &ID)
2366				if err != nil {
2367					return err
2368				}
2369				agrrs.ID = &ID
2370			}
2371		}
2372	}
2373
2374	return nil
2375}
2376
2377// ApplicationGatewayRewriteRuleSetPropertiesFormat properties of rewrite rule set of the application
2378// gateway.
2379type ApplicationGatewayRewriteRuleSetPropertiesFormat struct {
2380	// RewriteRules - Rewrite rules in the rewrite rule set.
2381	RewriteRules *[]ApplicationGatewayRewriteRule `json:"rewriteRules,omitempty"`
2382	// ProvisioningState - READ-ONLY; Provisioning state of the rewrite rule set resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2383	ProvisioningState *string `json:"provisioningState,omitempty"`
2384}
2385
2386// MarshalJSON is the custom marshaler for ApplicationGatewayRewriteRuleSetPropertiesFormat.
2387func (agrrspf ApplicationGatewayRewriteRuleSetPropertiesFormat) MarshalJSON() ([]byte, error) {
2388	objectMap := make(map[string]interface{})
2389	if agrrspf.RewriteRules != nil {
2390		objectMap["rewriteRules"] = agrrspf.RewriteRules
2391	}
2392	return json.Marshal(objectMap)
2393}
2394
2395// ApplicationGatewaysBackendHealthFuture an abstraction for monitoring and retrieving the results of a
2396// long-running operation.
2397type ApplicationGatewaysBackendHealthFuture struct {
2398	azure.FutureAPI
2399	// Result returns the result of the asynchronous operation.
2400	// If the operation has not completed it will return an error.
2401	Result func(ApplicationGatewaysClient) (ApplicationGatewayBackendHealth, error)
2402}
2403
2404// ApplicationGatewaysBackendHealthOnDemandFuture an abstraction for monitoring and retrieving the results
2405// of a long-running operation.
2406type ApplicationGatewaysBackendHealthOnDemandFuture struct {
2407	azure.FutureAPI
2408	// Result returns the result of the asynchronous operation.
2409	// If the operation has not completed it will return an error.
2410	Result func(ApplicationGatewaysClient) (ApplicationGatewayBackendHealthOnDemand, error)
2411}
2412
2413// ApplicationGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
2414// long-running operation.
2415type ApplicationGatewaysCreateOrUpdateFuture struct {
2416	azure.FutureAPI
2417	// Result returns the result of the asynchronous operation.
2418	// If the operation has not completed it will return an error.
2419	Result func(ApplicationGatewaysClient) (ApplicationGateway, error)
2420}
2421
2422// ApplicationGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
2423// long-running operation.
2424type ApplicationGatewaysDeleteFuture struct {
2425	azure.FutureAPI
2426	// Result returns the result of the asynchronous operation.
2427	// If the operation has not completed it will return an error.
2428	Result func(ApplicationGatewaysClient) (autorest.Response, error)
2429}
2430
2431// ApplicationGatewaySku SKU of an application gateway.
2432type ApplicationGatewaySku struct {
2433	// Name - Name of an application gateway SKU. Possible values include: 'StandardSmall', 'StandardMedium', 'StandardLarge', 'WAFMedium', 'WAFLarge', 'StandardV2', 'WAFV2'
2434	Name ApplicationGatewaySkuName `json:"name,omitempty"`
2435	// Tier - Tier of an application gateway. Possible values include: 'ApplicationGatewayTierStandard', 'ApplicationGatewayTierWAF', 'ApplicationGatewayTierStandardV2', 'ApplicationGatewayTierWAFV2'
2436	Tier ApplicationGatewayTier `json:"tier,omitempty"`
2437	// Capacity - Capacity (instance count) of an application gateway.
2438	Capacity *int32 `json:"capacity,omitempty"`
2439}
2440
2441// ApplicationGatewaySslCertificate SSL certificates of an application gateway.
2442type ApplicationGatewaySslCertificate struct {
2443	// ApplicationGatewaySslCertificatePropertiesFormat - Properties of the application gateway SSL certificate.
2444	*ApplicationGatewaySslCertificatePropertiesFormat `json:"properties,omitempty"`
2445	// Name - Name of the SSL certificate that is unique within an Application Gateway.
2446	Name *string `json:"name,omitempty"`
2447	// Etag - A unique read-only string that changes whenever the resource is updated.
2448	Etag *string `json:"etag,omitempty"`
2449	// Type - Type of the resource.
2450	Type *string `json:"type,omitempty"`
2451	// ID - Resource ID.
2452	ID *string `json:"id,omitempty"`
2453}
2454
2455// MarshalJSON is the custom marshaler for ApplicationGatewaySslCertificate.
2456func (agsc ApplicationGatewaySslCertificate) MarshalJSON() ([]byte, error) {
2457	objectMap := make(map[string]interface{})
2458	if agsc.ApplicationGatewaySslCertificatePropertiesFormat != nil {
2459		objectMap["properties"] = agsc.ApplicationGatewaySslCertificatePropertiesFormat
2460	}
2461	if agsc.Name != nil {
2462		objectMap["name"] = agsc.Name
2463	}
2464	if agsc.Etag != nil {
2465		objectMap["etag"] = agsc.Etag
2466	}
2467	if agsc.Type != nil {
2468		objectMap["type"] = agsc.Type
2469	}
2470	if agsc.ID != nil {
2471		objectMap["id"] = agsc.ID
2472	}
2473	return json.Marshal(objectMap)
2474}
2475
2476// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslCertificate struct.
2477func (agsc *ApplicationGatewaySslCertificate) UnmarshalJSON(body []byte) error {
2478	var m map[string]*json.RawMessage
2479	err := json.Unmarshal(body, &m)
2480	if err != nil {
2481		return err
2482	}
2483	for k, v := range m {
2484		switch k {
2485		case "properties":
2486			if v != nil {
2487				var applicationGatewaySslCertificatePropertiesFormat ApplicationGatewaySslCertificatePropertiesFormat
2488				err = json.Unmarshal(*v, &applicationGatewaySslCertificatePropertiesFormat)
2489				if err != nil {
2490					return err
2491				}
2492				agsc.ApplicationGatewaySslCertificatePropertiesFormat = &applicationGatewaySslCertificatePropertiesFormat
2493			}
2494		case "name":
2495			if v != nil {
2496				var name string
2497				err = json.Unmarshal(*v, &name)
2498				if err != nil {
2499					return err
2500				}
2501				agsc.Name = &name
2502			}
2503		case "etag":
2504			if v != nil {
2505				var etag string
2506				err = json.Unmarshal(*v, &etag)
2507				if err != nil {
2508					return err
2509				}
2510				agsc.Etag = &etag
2511			}
2512		case "type":
2513			if v != nil {
2514				var typeVar string
2515				err = json.Unmarshal(*v, &typeVar)
2516				if err != nil {
2517					return err
2518				}
2519				agsc.Type = &typeVar
2520			}
2521		case "id":
2522			if v != nil {
2523				var ID string
2524				err = json.Unmarshal(*v, &ID)
2525				if err != nil {
2526					return err
2527				}
2528				agsc.ID = &ID
2529			}
2530		}
2531	}
2532
2533	return nil
2534}
2535
2536// ApplicationGatewaySslCertificatePropertiesFormat properties of SSL certificates of an application
2537// gateway.
2538type ApplicationGatewaySslCertificatePropertiesFormat struct {
2539	// Data - Base-64 encoded pfx certificate. Only applicable in PUT Request.
2540	Data *string `json:"data,omitempty"`
2541	// Password - Password for the pfx file specified in data. Only applicable in PUT request.
2542	Password *string `json:"password,omitempty"`
2543	// PublicCertData - Base-64 encoded Public cert data corresponding to pfx specified in data. Only applicable in GET request.
2544	PublicCertData *string `json:"publicCertData,omitempty"`
2545	// KeyVaultSecretID - Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault.
2546	KeyVaultSecretID *string `json:"keyVaultSecretId,omitempty"`
2547	// ProvisioningState - Provisioning state of the SSL certificate resource Possible values are: 'Updating', 'Deleting', and 'Failed'.
2548	ProvisioningState *string `json:"provisioningState,omitempty"`
2549}
2550
2551// ApplicationGatewaySslPolicy application Gateway Ssl policy.
2552type ApplicationGatewaySslPolicy struct {
2553	// DisabledSslProtocols - Ssl protocols to be disabled on application gateway.
2554	DisabledSslProtocols *[]ApplicationGatewaySslProtocol `json:"disabledSslProtocols,omitempty"`
2555	// PolicyType - Type of Ssl Policy. Possible values include: 'Predefined', 'Custom'
2556	PolicyType ApplicationGatewaySslPolicyType `json:"policyType,omitempty"`
2557	// PolicyName - Name of Ssl predefined policy. Possible values include: 'AppGwSslPolicy20150501', 'AppGwSslPolicy20170401', 'AppGwSslPolicy20170401S'
2558	PolicyName ApplicationGatewaySslPolicyName `json:"policyName,omitempty"`
2559	// CipherSuites - Ssl cipher suites to be enabled in the specified order to application gateway.
2560	CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"`
2561	// MinProtocolVersion - Minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'TLSv10', 'TLSv11', 'TLSv12'
2562	MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"`
2563}
2564
2565// ApplicationGatewaySslPredefinedPolicy an Ssl predefined policy.
2566type ApplicationGatewaySslPredefinedPolicy struct {
2567	autorest.Response `json:"-"`
2568	// Name - Name of the Ssl predefined policy.
2569	Name *string `json:"name,omitempty"`
2570	// ApplicationGatewaySslPredefinedPolicyPropertiesFormat - Properties of the application gateway SSL predefined policy.
2571	*ApplicationGatewaySslPredefinedPolicyPropertiesFormat `json:"properties,omitempty"`
2572	// ID - Resource ID.
2573	ID *string `json:"id,omitempty"`
2574}
2575
2576// MarshalJSON is the custom marshaler for ApplicationGatewaySslPredefinedPolicy.
2577func (agspp ApplicationGatewaySslPredefinedPolicy) MarshalJSON() ([]byte, error) {
2578	objectMap := make(map[string]interface{})
2579	if agspp.Name != nil {
2580		objectMap["name"] = agspp.Name
2581	}
2582	if agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat != nil {
2583		objectMap["properties"] = agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat
2584	}
2585	if agspp.ID != nil {
2586		objectMap["id"] = agspp.ID
2587	}
2588	return json.Marshal(objectMap)
2589}
2590
2591// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslPredefinedPolicy struct.
2592func (agspp *ApplicationGatewaySslPredefinedPolicy) UnmarshalJSON(body []byte) error {
2593	var m map[string]*json.RawMessage
2594	err := json.Unmarshal(body, &m)
2595	if err != nil {
2596		return err
2597	}
2598	for k, v := range m {
2599		switch k {
2600		case "name":
2601			if v != nil {
2602				var name string
2603				err = json.Unmarshal(*v, &name)
2604				if err != nil {
2605					return err
2606				}
2607				agspp.Name = &name
2608			}
2609		case "properties":
2610			if v != nil {
2611				var applicationGatewaySslPredefinedPolicyPropertiesFormat ApplicationGatewaySslPredefinedPolicyPropertiesFormat
2612				err = json.Unmarshal(*v, &applicationGatewaySslPredefinedPolicyPropertiesFormat)
2613				if err != nil {
2614					return err
2615				}
2616				agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat = &applicationGatewaySslPredefinedPolicyPropertiesFormat
2617			}
2618		case "id":
2619			if v != nil {
2620				var ID string
2621				err = json.Unmarshal(*v, &ID)
2622				if err != nil {
2623					return err
2624				}
2625				agspp.ID = &ID
2626			}
2627		}
2628	}
2629
2630	return nil
2631}
2632
2633// ApplicationGatewaySslPredefinedPolicyPropertiesFormat properties of
2634// ApplicationGatewaySslPredefinedPolicy.
2635type ApplicationGatewaySslPredefinedPolicyPropertiesFormat struct {
2636	// CipherSuites - Ssl cipher suites to be enabled in the specified order for application gateway.
2637	CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"`
2638	// MinProtocolVersion - Minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'TLSv10', 'TLSv11', 'TLSv12'
2639	MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"`
2640}
2641
2642// ApplicationGatewaysStartFuture an abstraction for monitoring and retrieving the results of a
2643// long-running operation.
2644type ApplicationGatewaysStartFuture struct {
2645	azure.FutureAPI
2646	// Result returns the result of the asynchronous operation.
2647	// If the operation has not completed it will return an error.
2648	Result func(ApplicationGatewaysClient) (autorest.Response, error)
2649}
2650
2651// ApplicationGatewaysStopFuture an abstraction for monitoring and retrieving the results of a long-running
2652// operation.
2653type ApplicationGatewaysStopFuture struct {
2654	azure.FutureAPI
2655	// Result returns the result of the asynchronous operation.
2656	// If the operation has not completed it will return an error.
2657	Result func(ApplicationGatewaysClient) (autorest.Response, error)
2658}
2659
2660// ApplicationGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
2661// long-running operation.
2662type ApplicationGatewaysUpdateTagsFuture struct {
2663	azure.FutureAPI
2664	// Result returns the result of the asynchronous operation.
2665	// If the operation has not completed it will return an error.
2666	Result func(ApplicationGatewaysClient) (ApplicationGateway, error)
2667}
2668
2669// ApplicationGatewayTrustedRootCertificate trusted Root certificates of an application gateway.
2670type ApplicationGatewayTrustedRootCertificate struct {
2671	// ApplicationGatewayTrustedRootCertificatePropertiesFormat - Properties of the application gateway trusted root certificate.
2672	*ApplicationGatewayTrustedRootCertificatePropertiesFormat `json:"properties,omitempty"`
2673	// Name - Name of the trusted root certificate that is unique within an Application Gateway.
2674	Name *string `json:"name,omitempty"`
2675	// Etag - A unique read-only string that changes whenever the resource is updated.
2676	Etag *string `json:"etag,omitempty"`
2677	// Type - Type of the resource.
2678	Type *string `json:"type,omitempty"`
2679	// ID - Resource ID.
2680	ID *string `json:"id,omitempty"`
2681}
2682
2683// MarshalJSON is the custom marshaler for ApplicationGatewayTrustedRootCertificate.
2684func (agtrc ApplicationGatewayTrustedRootCertificate) MarshalJSON() ([]byte, error) {
2685	objectMap := make(map[string]interface{})
2686	if agtrc.ApplicationGatewayTrustedRootCertificatePropertiesFormat != nil {
2687		objectMap["properties"] = agtrc.ApplicationGatewayTrustedRootCertificatePropertiesFormat
2688	}
2689	if agtrc.Name != nil {
2690		objectMap["name"] = agtrc.Name
2691	}
2692	if agtrc.Etag != nil {
2693		objectMap["etag"] = agtrc.Etag
2694	}
2695	if agtrc.Type != nil {
2696		objectMap["type"] = agtrc.Type
2697	}
2698	if agtrc.ID != nil {
2699		objectMap["id"] = agtrc.ID
2700	}
2701	return json.Marshal(objectMap)
2702}
2703
2704// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayTrustedRootCertificate struct.
2705func (agtrc *ApplicationGatewayTrustedRootCertificate) UnmarshalJSON(body []byte) error {
2706	var m map[string]*json.RawMessage
2707	err := json.Unmarshal(body, &m)
2708	if err != nil {
2709		return err
2710	}
2711	for k, v := range m {
2712		switch k {
2713		case "properties":
2714			if v != nil {
2715				var applicationGatewayTrustedRootCertificatePropertiesFormat ApplicationGatewayTrustedRootCertificatePropertiesFormat
2716				err = json.Unmarshal(*v, &applicationGatewayTrustedRootCertificatePropertiesFormat)
2717				if err != nil {
2718					return err
2719				}
2720				agtrc.ApplicationGatewayTrustedRootCertificatePropertiesFormat = &applicationGatewayTrustedRootCertificatePropertiesFormat
2721			}
2722		case "name":
2723			if v != nil {
2724				var name string
2725				err = json.Unmarshal(*v, &name)
2726				if err != nil {
2727					return err
2728				}
2729				agtrc.Name = &name
2730			}
2731		case "etag":
2732			if v != nil {
2733				var etag string
2734				err = json.Unmarshal(*v, &etag)
2735				if err != nil {
2736					return err
2737				}
2738				agtrc.Etag = &etag
2739			}
2740		case "type":
2741			if v != nil {
2742				var typeVar string
2743				err = json.Unmarshal(*v, &typeVar)
2744				if err != nil {
2745					return err
2746				}
2747				agtrc.Type = &typeVar
2748			}
2749		case "id":
2750			if v != nil {
2751				var ID string
2752				err = json.Unmarshal(*v, &ID)
2753				if err != nil {
2754					return err
2755				}
2756				agtrc.ID = &ID
2757			}
2758		}
2759	}
2760
2761	return nil
2762}
2763
2764// ApplicationGatewayTrustedRootCertificatePropertiesFormat trusted Root certificates properties of an
2765// application gateway.
2766type ApplicationGatewayTrustedRootCertificatePropertiesFormat struct {
2767	// Data - Certificate public data.
2768	Data *string `json:"data,omitempty"`
2769	// KeyVaultSecretID - Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault.
2770	KeyVaultSecretID *string `json:"keyVaultSecretId,omitempty"`
2771	// ProvisioningState - Provisioning state of the trusted root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2772	ProvisioningState *string `json:"provisioningState,omitempty"`
2773}
2774
2775// ApplicationGatewayURLPathMap urlPathMaps give a url path to the backend mapping information for
2776// PathBasedRouting.
2777type ApplicationGatewayURLPathMap struct {
2778	// ApplicationGatewayURLPathMapPropertiesFormat - Properties of the application gateway URL path map.
2779	*ApplicationGatewayURLPathMapPropertiesFormat `json:"properties,omitempty"`
2780	// Name - Name of the URL path map that is unique within an Application Gateway.
2781	Name *string `json:"name,omitempty"`
2782	// Etag - A unique read-only string that changes whenever the resource is updated.
2783	Etag *string `json:"etag,omitempty"`
2784	// Type - Type of the resource.
2785	Type *string `json:"type,omitempty"`
2786	// ID - Resource ID.
2787	ID *string `json:"id,omitempty"`
2788}
2789
2790// MarshalJSON is the custom marshaler for ApplicationGatewayURLPathMap.
2791func (agupm ApplicationGatewayURLPathMap) MarshalJSON() ([]byte, error) {
2792	objectMap := make(map[string]interface{})
2793	if agupm.ApplicationGatewayURLPathMapPropertiesFormat != nil {
2794		objectMap["properties"] = agupm.ApplicationGatewayURLPathMapPropertiesFormat
2795	}
2796	if agupm.Name != nil {
2797		objectMap["name"] = agupm.Name
2798	}
2799	if agupm.Etag != nil {
2800		objectMap["etag"] = agupm.Etag
2801	}
2802	if agupm.Type != nil {
2803		objectMap["type"] = agupm.Type
2804	}
2805	if agupm.ID != nil {
2806		objectMap["id"] = agupm.ID
2807	}
2808	return json.Marshal(objectMap)
2809}
2810
2811// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayURLPathMap struct.
2812func (agupm *ApplicationGatewayURLPathMap) UnmarshalJSON(body []byte) error {
2813	var m map[string]*json.RawMessage
2814	err := json.Unmarshal(body, &m)
2815	if err != nil {
2816		return err
2817	}
2818	for k, v := range m {
2819		switch k {
2820		case "properties":
2821			if v != nil {
2822				var applicationGatewayURLPathMapPropertiesFormat ApplicationGatewayURLPathMapPropertiesFormat
2823				err = json.Unmarshal(*v, &applicationGatewayURLPathMapPropertiesFormat)
2824				if err != nil {
2825					return err
2826				}
2827				agupm.ApplicationGatewayURLPathMapPropertiesFormat = &applicationGatewayURLPathMapPropertiesFormat
2828			}
2829		case "name":
2830			if v != nil {
2831				var name string
2832				err = json.Unmarshal(*v, &name)
2833				if err != nil {
2834					return err
2835				}
2836				agupm.Name = &name
2837			}
2838		case "etag":
2839			if v != nil {
2840				var etag string
2841				err = json.Unmarshal(*v, &etag)
2842				if err != nil {
2843					return err
2844				}
2845				agupm.Etag = &etag
2846			}
2847		case "type":
2848			if v != nil {
2849				var typeVar string
2850				err = json.Unmarshal(*v, &typeVar)
2851				if err != nil {
2852					return err
2853				}
2854				agupm.Type = &typeVar
2855			}
2856		case "id":
2857			if v != nil {
2858				var ID string
2859				err = json.Unmarshal(*v, &ID)
2860				if err != nil {
2861					return err
2862				}
2863				agupm.ID = &ID
2864			}
2865		}
2866	}
2867
2868	return nil
2869}
2870
2871// ApplicationGatewayURLPathMapPropertiesFormat properties of UrlPathMap of the application gateway.
2872type ApplicationGatewayURLPathMapPropertiesFormat struct {
2873	// DefaultBackendAddressPool - Default backend address pool resource of URL path map.
2874	DefaultBackendAddressPool *SubResource `json:"defaultBackendAddressPool,omitempty"`
2875	// DefaultBackendHTTPSettings - Default backend http settings resource of URL path map.
2876	DefaultBackendHTTPSettings *SubResource `json:"defaultBackendHttpSettings,omitempty"`
2877	// DefaultRewriteRuleSet - Default Rewrite rule set resource of URL path map.
2878	DefaultRewriteRuleSet *SubResource `json:"defaultRewriteRuleSet,omitempty"`
2879	// DefaultRedirectConfiguration - Default redirect configuration resource of URL path map.
2880	DefaultRedirectConfiguration *SubResource `json:"defaultRedirectConfiguration,omitempty"`
2881	// PathRules - Path rule of URL path map resource.
2882	PathRules *[]ApplicationGatewayPathRule `json:"pathRules,omitempty"`
2883	// ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2884	ProvisioningState *string `json:"provisioningState,omitempty"`
2885}
2886
2887// ApplicationGatewayWebApplicationFirewallConfiguration application gateway web application firewall
2888// configuration.
2889type ApplicationGatewayWebApplicationFirewallConfiguration struct {
2890	// Enabled - Whether the web application firewall is enabled or not.
2891	Enabled *bool `json:"enabled,omitempty"`
2892	// FirewallMode - Web application firewall mode. Possible values include: 'Detection', 'Prevention'
2893	FirewallMode ApplicationGatewayFirewallMode `json:"firewallMode,omitempty"`
2894	// RuleSetType - The type of the web application firewall rule set. Possible values are: 'OWASP'.
2895	RuleSetType *string `json:"ruleSetType,omitempty"`
2896	// RuleSetVersion - The version of the rule set type.
2897	RuleSetVersion *string `json:"ruleSetVersion,omitempty"`
2898	// DisabledRuleGroups - The disabled rule groups.
2899	DisabledRuleGroups *[]ApplicationGatewayFirewallDisabledRuleGroup `json:"disabledRuleGroups,omitempty"`
2900	// RequestBodyCheck - Whether allow WAF to check request Body.
2901	RequestBodyCheck *bool `json:"requestBodyCheck,omitempty"`
2902	// MaxRequestBodySize - Maximum request body size for WAF.
2903	MaxRequestBodySize *int32 `json:"maxRequestBodySize,omitempty"`
2904	// MaxRequestBodySizeInKb - Maximum request body size in Kb for WAF.
2905	MaxRequestBodySizeInKb *int32 `json:"maxRequestBodySizeInKb,omitempty"`
2906	// FileUploadLimitInMb - Maximum file upload size in Mb for WAF.
2907	FileUploadLimitInMb *int32 `json:"fileUploadLimitInMb,omitempty"`
2908	// Exclusions - The exclusion list.
2909	Exclusions *[]ApplicationGatewayFirewallExclusion `json:"exclusions,omitempty"`
2910}
2911
2912// ApplicationRuleCondition rule condition of type application.
2913type ApplicationRuleCondition struct {
2914	// SourceAddresses - List of source IP addresses for this rule.
2915	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
2916	// DestinationAddresses - List of destination IP addresses or Service Tags.
2917	DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
2918	// Protocols - Array of Application Protocols.
2919	Protocols *[]FirewallPolicyRuleConditionApplicationProtocol `json:"protocols,omitempty"`
2920	// TargetFqdns - List of FQDNs for this rule condition.
2921	TargetFqdns *[]string `json:"targetFqdns,omitempty"`
2922	// FqdnTags - List of FQDN Tags for this rule condition.
2923	FqdnTags *[]string `json:"fqdnTags,omitempty"`
2924	// Name - Name of the rule condition.
2925	Name *string `json:"name,omitempty"`
2926	// Description - Description of the rule condition.
2927	Description *string `json:"description,omitempty"`
2928	// RuleConditionType - Possible values include: 'RuleConditionTypeFirewallPolicyRuleCondition', 'RuleConditionTypeApplicationRuleCondition', 'RuleConditionTypeNetworkRuleCondition'
2929	RuleConditionType RuleConditionType `json:"ruleConditionType,omitempty"`
2930}
2931
2932// MarshalJSON is the custom marshaler for ApplicationRuleCondition.
2933func (arc ApplicationRuleCondition) MarshalJSON() ([]byte, error) {
2934	arc.RuleConditionType = RuleConditionTypeApplicationRuleCondition
2935	objectMap := make(map[string]interface{})
2936	if arc.SourceAddresses != nil {
2937		objectMap["sourceAddresses"] = arc.SourceAddresses
2938	}
2939	if arc.DestinationAddresses != nil {
2940		objectMap["destinationAddresses"] = arc.DestinationAddresses
2941	}
2942	if arc.Protocols != nil {
2943		objectMap["protocols"] = arc.Protocols
2944	}
2945	if arc.TargetFqdns != nil {
2946		objectMap["targetFqdns"] = arc.TargetFqdns
2947	}
2948	if arc.FqdnTags != nil {
2949		objectMap["fqdnTags"] = arc.FqdnTags
2950	}
2951	if arc.Name != nil {
2952		objectMap["name"] = arc.Name
2953	}
2954	if arc.Description != nil {
2955		objectMap["description"] = arc.Description
2956	}
2957	if arc.RuleConditionType != "" {
2958		objectMap["ruleConditionType"] = arc.RuleConditionType
2959	}
2960	return json.Marshal(objectMap)
2961}
2962
2963// AsApplicationRuleCondition is the BasicFirewallPolicyRuleCondition implementation for ApplicationRuleCondition.
2964func (arc ApplicationRuleCondition) AsApplicationRuleCondition() (*ApplicationRuleCondition, bool) {
2965	return &arc, true
2966}
2967
2968// AsRuleCondition is the BasicFirewallPolicyRuleCondition implementation for ApplicationRuleCondition.
2969func (arc ApplicationRuleCondition) AsRuleCondition() (*RuleCondition, bool) {
2970	return nil, false
2971}
2972
2973// AsFirewallPolicyRuleCondition is the BasicFirewallPolicyRuleCondition implementation for ApplicationRuleCondition.
2974func (arc ApplicationRuleCondition) AsFirewallPolicyRuleCondition() (*FirewallPolicyRuleCondition, bool) {
2975	return nil, false
2976}
2977
2978// AsBasicFirewallPolicyRuleCondition is the BasicFirewallPolicyRuleCondition implementation for ApplicationRuleCondition.
2979func (arc ApplicationRuleCondition) AsBasicFirewallPolicyRuleCondition() (BasicFirewallPolicyRuleCondition, bool) {
2980	return &arc, true
2981}
2982
2983// ApplicationSecurityGroup an application security group in a resource group.
2984type ApplicationSecurityGroup struct {
2985	autorest.Response `json:"-"`
2986	// ApplicationSecurityGroupPropertiesFormat - Properties of the application security group.
2987	*ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"`
2988	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
2989	Etag *string `json:"etag,omitempty"`
2990	// ID - Resource ID.
2991	ID *string `json:"id,omitempty"`
2992	// Name - READ-ONLY; Resource name.
2993	Name *string `json:"name,omitempty"`
2994	// Type - READ-ONLY; Resource type.
2995	Type *string `json:"type,omitempty"`
2996	// Location - Resource location.
2997	Location *string `json:"location,omitempty"`
2998	// Tags - Resource tags.
2999	Tags map[string]*string `json:"tags"`
3000}
3001
3002// MarshalJSON is the custom marshaler for ApplicationSecurityGroup.
3003func (asg ApplicationSecurityGroup) MarshalJSON() ([]byte, error) {
3004	objectMap := make(map[string]interface{})
3005	if asg.ApplicationSecurityGroupPropertiesFormat != nil {
3006		objectMap["properties"] = asg.ApplicationSecurityGroupPropertiesFormat
3007	}
3008	if asg.ID != nil {
3009		objectMap["id"] = asg.ID
3010	}
3011	if asg.Location != nil {
3012		objectMap["location"] = asg.Location
3013	}
3014	if asg.Tags != nil {
3015		objectMap["tags"] = asg.Tags
3016	}
3017	return json.Marshal(objectMap)
3018}
3019
3020// UnmarshalJSON is the custom unmarshaler for ApplicationSecurityGroup struct.
3021func (asg *ApplicationSecurityGroup) UnmarshalJSON(body []byte) error {
3022	var m map[string]*json.RawMessage
3023	err := json.Unmarshal(body, &m)
3024	if err != nil {
3025		return err
3026	}
3027	for k, v := range m {
3028		switch k {
3029		case "properties":
3030			if v != nil {
3031				var applicationSecurityGroupPropertiesFormat ApplicationSecurityGroupPropertiesFormat
3032				err = json.Unmarshal(*v, &applicationSecurityGroupPropertiesFormat)
3033				if err != nil {
3034					return err
3035				}
3036				asg.ApplicationSecurityGroupPropertiesFormat = &applicationSecurityGroupPropertiesFormat
3037			}
3038		case "etag":
3039			if v != nil {
3040				var etag string
3041				err = json.Unmarshal(*v, &etag)
3042				if err != nil {
3043					return err
3044				}
3045				asg.Etag = &etag
3046			}
3047		case "id":
3048			if v != nil {
3049				var ID string
3050				err = json.Unmarshal(*v, &ID)
3051				if err != nil {
3052					return err
3053				}
3054				asg.ID = &ID
3055			}
3056		case "name":
3057			if v != nil {
3058				var name string
3059				err = json.Unmarshal(*v, &name)
3060				if err != nil {
3061					return err
3062				}
3063				asg.Name = &name
3064			}
3065		case "type":
3066			if v != nil {
3067				var typeVar string
3068				err = json.Unmarshal(*v, &typeVar)
3069				if err != nil {
3070					return err
3071				}
3072				asg.Type = &typeVar
3073			}
3074		case "location":
3075			if v != nil {
3076				var location string
3077				err = json.Unmarshal(*v, &location)
3078				if err != nil {
3079					return err
3080				}
3081				asg.Location = &location
3082			}
3083		case "tags":
3084			if v != nil {
3085				var tags map[string]*string
3086				err = json.Unmarshal(*v, &tags)
3087				if err != nil {
3088					return err
3089				}
3090				asg.Tags = tags
3091			}
3092		}
3093	}
3094
3095	return nil
3096}
3097
3098// ApplicationSecurityGroupListResult a list of application security groups.
3099type ApplicationSecurityGroupListResult struct {
3100	autorest.Response `json:"-"`
3101	// Value - A list of application security groups.
3102	Value *[]ApplicationSecurityGroup `json:"value,omitempty"`
3103	// NextLink - READ-ONLY; The URL to get the next set of results.
3104	NextLink *string `json:"nextLink,omitempty"`
3105}
3106
3107// MarshalJSON is the custom marshaler for ApplicationSecurityGroupListResult.
3108func (asglr ApplicationSecurityGroupListResult) MarshalJSON() ([]byte, error) {
3109	objectMap := make(map[string]interface{})
3110	if asglr.Value != nil {
3111		objectMap["value"] = asglr.Value
3112	}
3113	return json.Marshal(objectMap)
3114}
3115
3116// ApplicationSecurityGroupListResultIterator provides access to a complete listing of
3117// ApplicationSecurityGroup values.
3118type ApplicationSecurityGroupListResultIterator struct {
3119	i    int
3120	page ApplicationSecurityGroupListResultPage
3121}
3122
3123// NextWithContext advances to the next value.  If there was an error making
3124// the request the iterator does not advance and the error is returned.
3125func (iter *ApplicationSecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
3126	if tracing.IsEnabled() {
3127		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupListResultIterator.NextWithContext")
3128		defer func() {
3129			sc := -1
3130			if iter.Response().Response.Response != nil {
3131				sc = iter.Response().Response.Response.StatusCode
3132			}
3133			tracing.EndSpan(ctx, sc, err)
3134		}()
3135	}
3136	iter.i++
3137	if iter.i < len(iter.page.Values()) {
3138		return nil
3139	}
3140	err = iter.page.NextWithContext(ctx)
3141	if err != nil {
3142		iter.i--
3143		return err
3144	}
3145	iter.i = 0
3146	return nil
3147}
3148
3149// Next advances to the next value.  If there was an error making
3150// the request the iterator does not advance and the error is returned.
3151// Deprecated: Use NextWithContext() instead.
3152func (iter *ApplicationSecurityGroupListResultIterator) Next() error {
3153	return iter.NextWithContext(context.Background())
3154}
3155
3156// NotDone returns true if the enumeration should be started or is not yet complete.
3157func (iter ApplicationSecurityGroupListResultIterator) NotDone() bool {
3158	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3159}
3160
3161// Response returns the raw server response from the last page request.
3162func (iter ApplicationSecurityGroupListResultIterator) Response() ApplicationSecurityGroupListResult {
3163	return iter.page.Response()
3164}
3165
3166// Value returns the current value or a zero-initialized value if the
3167// iterator has advanced beyond the end of the collection.
3168func (iter ApplicationSecurityGroupListResultIterator) Value() ApplicationSecurityGroup {
3169	if !iter.page.NotDone() {
3170		return ApplicationSecurityGroup{}
3171	}
3172	return iter.page.Values()[iter.i]
3173}
3174
3175// Creates a new instance of the ApplicationSecurityGroupListResultIterator type.
3176func NewApplicationSecurityGroupListResultIterator(page ApplicationSecurityGroupListResultPage) ApplicationSecurityGroupListResultIterator {
3177	return ApplicationSecurityGroupListResultIterator{page: page}
3178}
3179
3180// IsEmpty returns true if the ListResult contains no values.
3181func (asglr ApplicationSecurityGroupListResult) IsEmpty() bool {
3182	return asglr.Value == nil || len(*asglr.Value) == 0
3183}
3184
3185// hasNextLink returns true if the NextLink is not empty.
3186func (asglr ApplicationSecurityGroupListResult) hasNextLink() bool {
3187	return asglr.NextLink != nil && len(*asglr.NextLink) != 0
3188}
3189
3190// applicationSecurityGroupListResultPreparer prepares a request to retrieve the next set of results.
3191// It returns nil if no more results exist.
3192func (asglr ApplicationSecurityGroupListResult) applicationSecurityGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
3193	if !asglr.hasNextLink() {
3194		return nil, nil
3195	}
3196	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3197		autorest.AsJSON(),
3198		autorest.AsGet(),
3199		autorest.WithBaseURL(to.String(asglr.NextLink)))
3200}
3201
3202// ApplicationSecurityGroupListResultPage contains a page of ApplicationSecurityGroup values.
3203type ApplicationSecurityGroupListResultPage struct {
3204	fn    func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)
3205	asglr ApplicationSecurityGroupListResult
3206}
3207
3208// NextWithContext advances to the next page of values.  If there was an error making
3209// the request the page does not advance and the error is returned.
3210func (page *ApplicationSecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
3211	if tracing.IsEnabled() {
3212		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupListResultPage.NextWithContext")
3213		defer func() {
3214			sc := -1
3215			if page.Response().Response.Response != nil {
3216				sc = page.Response().Response.Response.StatusCode
3217			}
3218			tracing.EndSpan(ctx, sc, err)
3219		}()
3220	}
3221	for {
3222		next, err := page.fn(ctx, page.asglr)
3223		if err != nil {
3224			return err
3225		}
3226		page.asglr = next
3227		if !next.hasNextLink() || !next.IsEmpty() {
3228			break
3229		}
3230	}
3231	return nil
3232}
3233
3234// Next advances to the next page of values.  If there was an error making
3235// the request the page does not advance and the error is returned.
3236// Deprecated: Use NextWithContext() instead.
3237func (page *ApplicationSecurityGroupListResultPage) Next() error {
3238	return page.NextWithContext(context.Background())
3239}
3240
3241// NotDone returns true if the page enumeration should be started or is not yet complete.
3242func (page ApplicationSecurityGroupListResultPage) NotDone() bool {
3243	return !page.asglr.IsEmpty()
3244}
3245
3246// Response returns the raw server response from the last page request.
3247func (page ApplicationSecurityGroupListResultPage) Response() ApplicationSecurityGroupListResult {
3248	return page.asglr
3249}
3250
3251// Values returns the slice of values for the current page or nil if there are no values.
3252func (page ApplicationSecurityGroupListResultPage) Values() []ApplicationSecurityGroup {
3253	if page.asglr.IsEmpty() {
3254		return nil
3255	}
3256	return *page.asglr.Value
3257}
3258
3259// Creates a new instance of the ApplicationSecurityGroupListResultPage type.
3260func NewApplicationSecurityGroupListResultPage(cur ApplicationSecurityGroupListResult, getNextPage func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)) ApplicationSecurityGroupListResultPage {
3261	return ApplicationSecurityGroupListResultPage{
3262		fn:    getNextPage,
3263		asglr: cur,
3264	}
3265}
3266
3267// ApplicationSecurityGroupPropertiesFormat application security group properties.
3268type ApplicationSecurityGroupPropertiesFormat struct {
3269	// 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.
3270	ResourceGUID *string `json:"resourceGuid,omitempty"`
3271	// ProvisioningState - READ-ONLY; The provisioning state of the application security group resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
3272	ProvisioningState *string `json:"provisioningState,omitempty"`
3273}
3274
3275// ApplicationSecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
3276// of a long-running operation.
3277type ApplicationSecurityGroupsCreateOrUpdateFuture struct {
3278	azure.FutureAPI
3279	// Result returns the result of the asynchronous operation.
3280	// If the operation has not completed it will return an error.
3281	Result func(ApplicationSecurityGroupsClient) (ApplicationSecurityGroup, error)
3282}
3283
3284// ApplicationSecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a
3285// long-running operation.
3286type ApplicationSecurityGroupsDeleteFuture struct {
3287	azure.FutureAPI
3288	// Result returns the result of the asynchronous operation.
3289	// If the operation has not completed it will return an error.
3290	Result func(ApplicationSecurityGroupsClient) (autorest.Response, error)
3291}
3292
3293// ApplicationSecurityGroupsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
3294// long-running operation.
3295type ApplicationSecurityGroupsUpdateTagsFuture struct {
3296	azure.FutureAPI
3297	// Result returns the result of the asynchronous operation.
3298	// If the operation has not completed it will return an error.
3299	Result func(ApplicationSecurityGroupsClient) (ApplicationSecurityGroup, error)
3300}
3301
3302// AuthorizationListResult response for ListAuthorizations API service call retrieves all authorizations
3303// that belongs to an ExpressRouteCircuit.
3304type AuthorizationListResult struct {
3305	autorest.Response `json:"-"`
3306	// Value - The authorizations in an ExpressRoute Circuit.
3307	Value *[]ExpressRouteCircuitAuthorization `json:"value,omitempty"`
3308	// NextLink - The URL to get the next set of results.
3309	NextLink *string `json:"nextLink,omitempty"`
3310}
3311
3312// AuthorizationListResultIterator provides access to a complete listing of
3313// ExpressRouteCircuitAuthorization values.
3314type AuthorizationListResultIterator struct {
3315	i    int
3316	page AuthorizationListResultPage
3317}
3318
3319// NextWithContext advances to the next value.  If there was an error making
3320// the request the iterator does not advance and the error is returned.
3321func (iter *AuthorizationListResultIterator) NextWithContext(ctx context.Context) (err error) {
3322	if tracing.IsEnabled() {
3323		ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultIterator.NextWithContext")
3324		defer func() {
3325			sc := -1
3326			if iter.Response().Response.Response != nil {
3327				sc = iter.Response().Response.Response.StatusCode
3328			}
3329			tracing.EndSpan(ctx, sc, err)
3330		}()
3331	}
3332	iter.i++
3333	if iter.i < len(iter.page.Values()) {
3334		return nil
3335	}
3336	err = iter.page.NextWithContext(ctx)
3337	if err != nil {
3338		iter.i--
3339		return err
3340	}
3341	iter.i = 0
3342	return nil
3343}
3344
3345// Next advances to the next value.  If there was an error making
3346// the request the iterator does not advance and the error is returned.
3347// Deprecated: Use NextWithContext() instead.
3348func (iter *AuthorizationListResultIterator) Next() error {
3349	return iter.NextWithContext(context.Background())
3350}
3351
3352// NotDone returns true if the enumeration should be started or is not yet complete.
3353func (iter AuthorizationListResultIterator) NotDone() bool {
3354	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3355}
3356
3357// Response returns the raw server response from the last page request.
3358func (iter AuthorizationListResultIterator) Response() AuthorizationListResult {
3359	return iter.page.Response()
3360}
3361
3362// Value returns the current value or a zero-initialized value if the
3363// iterator has advanced beyond the end of the collection.
3364func (iter AuthorizationListResultIterator) Value() ExpressRouteCircuitAuthorization {
3365	if !iter.page.NotDone() {
3366		return ExpressRouteCircuitAuthorization{}
3367	}
3368	return iter.page.Values()[iter.i]
3369}
3370
3371// Creates a new instance of the AuthorizationListResultIterator type.
3372func NewAuthorizationListResultIterator(page AuthorizationListResultPage) AuthorizationListResultIterator {
3373	return AuthorizationListResultIterator{page: page}
3374}
3375
3376// IsEmpty returns true if the ListResult contains no values.
3377func (alr AuthorizationListResult) IsEmpty() bool {
3378	return alr.Value == nil || len(*alr.Value) == 0
3379}
3380
3381// hasNextLink returns true if the NextLink is not empty.
3382func (alr AuthorizationListResult) hasNextLink() bool {
3383	return alr.NextLink != nil && len(*alr.NextLink) != 0
3384}
3385
3386// authorizationListResultPreparer prepares a request to retrieve the next set of results.
3387// It returns nil if no more results exist.
3388func (alr AuthorizationListResult) authorizationListResultPreparer(ctx context.Context) (*http.Request, error) {
3389	if !alr.hasNextLink() {
3390		return nil, nil
3391	}
3392	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3393		autorest.AsJSON(),
3394		autorest.AsGet(),
3395		autorest.WithBaseURL(to.String(alr.NextLink)))
3396}
3397
3398// AuthorizationListResultPage contains a page of ExpressRouteCircuitAuthorization values.
3399type AuthorizationListResultPage struct {
3400	fn  func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)
3401	alr AuthorizationListResult
3402}
3403
3404// NextWithContext advances to the next page of values.  If there was an error making
3405// the request the page does not advance and the error is returned.
3406func (page *AuthorizationListResultPage) NextWithContext(ctx context.Context) (err error) {
3407	if tracing.IsEnabled() {
3408		ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultPage.NextWithContext")
3409		defer func() {
3410			sc := -1
3411			if page.Response().Response.Response != nil {
3412				sc = page.Response().Response.Response.StatusCode
3413			}
3414			tracing.EndSpan(ctx, sc, err)
3415		}()
3416	}
3417	for {
3418		next, err := page.fn(ctx, page.alr)
3419		if err != nil {
3420			return err
3421		}
3422		page.alr = next
3423		if !next.hasNextLink() || !next.IsEmpty() {
3424			break
3425		}
3426	}
3427	return nil
3428}
3429
3430// Next advances to the next page of values.  If there was an error making
3431// the request the page does not advance and the error is returned.
3432// Deprecated: Use NextWithContext() instead.
3433func (page *AuthorizationListResultPage) Next() error {
3434	return page.NextWithContext(context.Background())
3435}
3436
3437// NotDone returns true if the page enumeration should be started or is not yet complete.
3438func (page AuthorizationListResultPage) NotDone() bool {
3439	return !page.alr.IsEmpty()
3440}
3441
3442// Response returns the raw server response from the last page request.
3443func (page AuthorizationListResultPage) Response() AuthorizationListResult {
3444	return page.alr
3445}
3446
3447// Values returns the slice of values for the current page or nil if there are no values.
3448func (page AuthorizationListResultPage) Values() []ExpressRouteCircuitAuthorization {
3449	if page.alr.IsEmpty() {
3450		return nil
3451	}
3452	return *page.alr.Value
3453}
3454
3455// Creates a new instance of the AuthorizationListResultPage type.
3456func NewAuthorizationListResultPage(cur AuthorizationListResult, getNextPage func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)) AuthorizationListResultPage {
3457	return AuthorizationListResultPage{
3458		fn:  getNextPage,
3459		alr: cur,
3460	}
3461}
3462
3463// AuthorizationPropertiesFormat properties of ExpressRouteCircuitAuthorization.
3464type AuthorizationPropertiesFormat struct {
3465	// AuthorizationKey - The authorization key.
3466	AuthorizationKey *string `json:"authorizationKey,omitempty"`
3467	// AuthorizationUseStatus - The authorization use status. Possible values include: 'Available', 'InUse'
3468	AuthorizationUseStatus AuthorizationUseStatus `json:"authorizationUseStatus,omitempty"`
3469	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
3470	ProvisioningState *string `json:"provisioningState,omitempty"`
3471}
3472
3473// AutoApprovedPrivateLinkService the information of an AutoApprovedPrivateLinkService.
3474type AutoApprovedPrivateLinkService struct {
3475	// PrivateLinkService - The id of the private link service resource.
3476	PrivateLinkService *string `json:"privateLinkService,omitempty"`
3477}
3478
3479// AutoApprovedPrivateLinkServicesResult an array of private link service id that can be linked to a
3480// private end point with auto approved.
3481type AutoApprovedPrivateLinkServicesResult struct {
3482	autorest.Response `json:"-"`
3483	// Value - An array of auto approved private link service.
3484	Value *[]AutoApprovedPrivateLinkService `json:"value,omitempty"`
3485	// NextLink - READ-ONLY; The URL to get the next set of results.
3486	NextLink *string `json:"nextLink,omitempty"`
3487}
3488
3489// MarshalJSON is the custom marshaler for AutoApprovedPrivateLinkServicesResult.
3490func (aaplsr AutoApprovedPrivateLinkServicesResult) MarshalJSON() ([]byte, error) {
3491	objectMap := make(map[string]interface{})
3492	if aaplsr.Value != nil {
3493		objectMap["value"] = aaplsr.Value
3494	}
3495	return json.Marshal(objectMap)
3496}
3497
3498// AutoApprovedPrivateLinkServicesResultIterator provides access to a complete listing of
3499// AutoApprovedPrivateLinkService values.
3500type AutoApprovedPrivateLinkServicesResultIterator struct {
3501	i    int
3502	page AutoApprovedPrivateLinkServicesResultPage
3503}
3504
3505// NextWithContext advances to the next value.  If there was an error making
3506// the request the iterator does not advance and the error is returned.
3507func (iter *AutoApprovedPrivateLinkServicesResultIterator) NextWithContext(ctx context.Context) (err error) {
3508	if tracing.IsEnabled() {
3509		ctx = tracing.StartSpan(ctx, fqdn+"/AutoApprovedPrivateLinkServicesResultIterator.NextWithContext")
3510		defer func() {
3511			sc := -1
3512			if iter.Response().Response.Response != nil {
3513				sc = iter.Response().Response.Response.StatusCode
3514			}
3515			tracing.EndSpan(ctx, sc, err)
3516		}()
3517	}
3518	iter.i++
3519	if iter.i < len(iter.page.Values()) {
3520		return nil
3521	}
3522	err = iter.page.NextWithContext(ctx)
3523	if err != nil {
3524		iter.i--
3525		return err
3526	}
3527	iter.i = 0
3528	return nil
3529}
3530
3531// Next advances to the next value.  If there was an error making
3532// the request the iterator does not advance and the error is returned.
3533// Deprecated: Use NextWithContext() instead.
3534func (iter *AutoApprovedPrivateLinkServicesResultIterator) Next() error {
3535	return iter.NextWithContext(context.Background())
3536}
3537
3538// NotDone returns true if the enumeration should be started or is not yet complete.
3539func (iter AutoApprovedPrivateLinkServicesResultIterator) NotDone() bool {
3540	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3541}
3542
3543// Response returns the raw server response from the last page request.
3544func (iter AutoApprovedPrivateLinkServicesResultIterator) Response() AutoApprovedPrivateLinkServicesResult {
3545	return iter.page.Response()
3546}
3547
3548// Value returns the current value or a zero-initialized value if the
3549// iterator has advanced beyond the end of the collection.
3550func (iter AutoApprovedPrivateLinkServicesResultIterator) Value() AutoApprovedPrivateLinkService {
3551	if !iter.page.NotDone() {
3552		return AutoApprovedPrivateLinkService{}
3553	}
3554	return iter.page.Values()[iter.i]
3555}
3556
3557// Creates a new instance of the AutoApprovedPrivateLinkServicesResultIterator type.
3558func NewAutoApprovedPrivateLinkServicesResultIterator(page AutoApprovedPrivateLinkServicesResultPage) AutoApprovedPrivateLinkServicesResultIterator {
3559	return AutoApprovedPrivateLinkServicesResultIterator{page: page}
3560}
3561
3562// IsEmpty returns true if the ListResult contains no values.
3563func (aaplsr AutoApprovedPrivateLinkServicesResult) IsEmpty() bool {
3564	return aaplsr.Value == nil || len(*aaplsr.Value) == 0
3565}
3566
3567// hasNextLink returns true if the NextLink is not empty.
3568func (aaplsr AutoApprovedPrivateLinkServicesResult) hasNextLink() bool {
3569	return aaplsr.NextLink != nil && len(*aaplsr.NextLink) != 0
3570}
3571
3572// autoApprovedPrivateLinkServicesResultPreparer prepares a request to retrieve the next set of results.
3573// It returns nil if no more results exist.
3574func (aaplsr AutoApprovedPrivateLinkServicesResult) autoApprovedPrivateLinkServicesResultPreparer(ctx context.Context) (*http.Request, error) {
3575	if !aaplsr.hasNextLink() {
3576		return nil, nil
3577	}
3578	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3579		autorest.AsJSON(),
3580		autorest.AsGet(),
3581		autorest.WithBaseURL(to.String(aaplsr.NextLink)))
3582}
3583
3584// AutoApprovedPrivateLinkServicesResultPage contains a page of AutoApprovedPrivateLinkService values.
3585type AutoApprovedPrivateLinkServicesResultPage struct {
3586	fn     func(context.Context, AutoApprovedPrivateLinkServicesResult) (AutoApprovedPrivateLinkServicesResult, error)
3587	aaplsr AutoApprovedPrivateLinkServicesResult
3588}
3589
3590// NextWithContext advances to the next page of values.  If there was an error making
3591// the request the page does not advance and the error is returned.
3592func (page *AutoApprovedPrivateLinkServicesResultPage) NextWithContext(ctx context.Context) (err error) {
3593	if tracing.IsEnabled() {
3594		ctx = tracing.StartSpan(ctx, fqdn+"/AutoApprovedPrivateLinkServicesResultPage.NextWithContext")
3595		defer func() {
3596			sc := -1
3597			if page.Response().Response.Response != nil {
3598				sc = page.Response().Response.Response.StatusCode
3599			}
3600			tracing.EndSpan(ctx, sc, err)
3601		}()
3602	}
3603	for {
3604		next, err := page.fn(ctx, page.aaplsr)
3605		if err != nil {
3606			return err
3607		}
3608		page.aaplsr = next
3609		if !next.hasNextLink() || !next.IsEmpty() {
3610			break
3611		}
3612	}
3613	return nil
3614}
3615
3616// Next advances to the next page of values.  If there was an error making
3617// the request the page does not advance and the error is returned.
3618// Deprecated: Use NextWithContext() instead.
3619func (page *AutoApprovedPrivateLinkServicesResultPage) Next() error {
3620	return page.NextWithContext(context.Background())
3621}
3622
3623// NotDone returns true if the page enumeration should be started or is not yet complete.
3624func (page AutoApprovedPrivateLinkServicesResultPage) NotDone() bool {
3625	return !page.aaplsr.IsEmpty()
3626}
3627
3628// Response returns the raw server response from the last page request.
3629func (page AutoApprovedPrivateLinkServicesResultPage) Response() AutoApprovedPrivateLinkServicesResult {
3630	return page.aaplsr
3631}
3632
3633// Values returns the slice of values for the current page or nil if there are no values.
3634func (page AutoApprovedPrivateLinkServicesResultPage) Values() []AutoApprovedPrivateLinkService {
3635	if page.aaplsr.IsEmpty() {
3636		return nil
3637	}
3638	return *page.aaplsr.Value
3639}
3640
3641// Creates a new instance of the AutoApprovedPrivateLinkServicesResultPage type.
3642func NewAutoApprovedPrivateLinkServicesResultPage(cur AutoApprovedPrivateLinkServicesResult, getNextPage func(context.Context, AutoApprovedPrivateLinkServicesResult) (AutoApprovedPrivateLinkServicesResult, error)) AutoApprovedPrivateLinkServicesResultPage {
3643	return AutoApprovedPrivateLinkServicesResultPage{
3644		fn:     getNextPage,
3645		aaplsr: cur,
3646	}
3647}
3648
3649// Availability availability of the metric.
3650type Availability struct {
3651	// TimeGrain - The time grain of the availability.
3652	TimeGrain *string `json:"timeGrain,omitempty"`
3653	// Retention - The retention of the availability.
3654	Retention *string `json:"retention,omitempty"`
3655	// BlobDuration - Duration of the availability blob.
3656	BlobDuration *string `json:"blobDuration,omitempty"`
3657}
3658
3659// AvailableDelegation the serviceName of an AvailableDelegation indicates a possible delegation for a
3660// subnet.
3661type AvailableDelegation struct {
3662	// Name - The name of the AvailableDelegation resource.
3663	Name *string `json:"name,omitempty"`
3664	// ID - A unique identifier of the AvailableDelegation resource.
3665	ID *string `json:"id,omitempty"`
3666	// Type - Resource type.
3667	Type *string `json:"type,omitempty"`
3668	// ServiceName - The name of the service and resource.
3669	ServiceName *string `json:"serviceName,omitempty"`
3670	// Actions - Describes the actions permitted to the service upon delegation.
3671	Actions *[]string `json:"actions,omitempty"`
3672}
3673
3674// AvailableDelegationsResult an array of available delegations.
3675type AvailableDelegationsResult struct {
3676	autorest.Response `json:"-"`
3677	// Value - An array of available delegations.
3678	Value *[]AvailableDelegation `json:"value,omitempty"`
3679	// NextLink - READ-ONLY; The URL to get the next set of results.
3680	NextLink *string `json:"nextLink,omitempty"`
3681}
3682
3683// MarshalJSON is the custom marshaler for AvailableDelegationsResult.
3684func (adr AvailableDelegationsResult) MarshalJSON() ([]byte, error) {
3685	objectMap := make(map[string]interface{})
3686	if adr.Value != nil {
3687		objectMap["value"] = adr.Value
3688	}
3689	return json.Marshal(objectMap)
3690}
3691
3692// AvailableDelegationsResultIterator provides access to a complete listing of AvailableDelegation values.
3693type AvailableDelegationsResultIterator struct {
3694	i    int
3695	page AvailableDelegationsResultPage
3696}
3697
3698// NextWithContext advances to the next value.  If there was an error making
3699// the request the iterator does not advance and the error is returned.
3700func (iter *AvailableDelegationsResultIterator) NextWithContext(ctx context.Context) (err error) {
3701	if tracing.IsEnabled() {
3702		ctx = tracing.StartSpan(ctx, fqdn+"/AvailableDelegationsResultIterator.NextWithContext")
3703		defer func() {
3704			sc := -1
3705			if iter.Response().Response.Response != nil {
3706				sc = iter.Response().Response.Response.StatusCode
3707			}
3708			tracing.EndSpan(ctx, sc, err)
3709		}()
3710	}
3711	iter.i++
3712	if iter.i < len(iter.page.Values()) {
3713		return nil
3714	}
3715	err = iter.page.NextWithContext(ctx)
3716	if err != nil {
3717		iter.i--
3718		return err
3719	}
3720	iter.i = 0
3721	return nil
3722}
3723
3724// Next advances to the next value.  If there was an error making
3725// the request the iterator does not advance and the error is returned.
3726// Deprecated: Use NextWithContext() instead.
3727func (iter *AvailableDelegationsResultIterator) Next() error {
3728	return iter.NextWithContext(context.Background())
3729}
3730
3731// NotDone returns true if the enumeration should be started or is not yet complete.
3732func (iter AvailableDelegationsResultIterator) NotDone() bool {
3733	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3734}
3735
3736// Response returns the raw server response from the last page request.
3737func (iter AvailableDelegationsResultIterator) Response() AvailableDelegationsResult {
3738	return iter.page.Response()
3739}
3740
3741// Value returns the current value or a zero-initialized value if the
3742// iterator has advanced beyond the end of the collection.
3743func (iter AvailableDelegationsResultIterator) Value() AvailableDelegation {
3744	if !iter.page.NotDone() {
3745		return AvailableDelegation{}
3746	}
3747	return iter.page.Values()[iter.i]
3748}
3749
3750// Creates a new instance of the AvailableDelegationsResultIterator type.
3751func NewAvailableDelegationsResultIterator(page AvailableDelegationsResultPage) AvailableDelegationsResultIterator {
3752	return AvailableDelegationsResultIterator{page: page}
3753}
3754
3755// IsEmpty returns true if the ListResult contains no values.
3756func (adr AvailableDelegationsResult) IsEmpty() bool {
3757	return adr.Value == nil || len(*adr.Value) == 0
3758}
3759
3760// hasNextLink returns true if the NextLink is not empty.
3761func (adr AvailableDelegationsResult) hasNextLink() bool {
3762	return adr.NextLink != nil && len(*adr.NextLink) != 0
3763}
3764
3765// availableDelegationsResultPreparer prepares a request to retrieve the next set of results.
3766// It returns nil if no more results exist.
3767func (adr AvailableDelegationsResult) availableDelegationsResultPreparer(ctx context.Context) (*http.Request, error) {
3768	if !adr.hasNextLink() {
3769		return nil, nil
3770	}
3771	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3772		autorest.AsJSON(),
3773		autorest.AsGet(),
3774		autorest.WithBaseURL(to.String(adr.NextLink)))
3775}
3776
3777// AvailableDelegationsResultPage contains a page of AvailableDelegation values.
3778type AvailableDelegationsResultPage struct {
3779	fn  func(context.Context, AvailableDelegationsResult) (AvailableDelegationsResult, error)
3780	adr AvailableDelegationsResult
3781}
3782
3783// NextWithContext advances to the next page of values.  If there was an error making
3784// the request the page does not advance and the error is returned.
3785func (page *AvailableDelegationsResultPage) NextWithContext(ctx context.Context) (err error) {
3786	if tracing.IsEnabled() {
3787		ctx = tracing.StartSpan(ctx, fqdn+"/AvailableDelegationsResultPage.NextWithContext")
3788		defer func() {
3789			sc := -1
3790			if page.Response().Response.Response != nil {
3791				sc = page.Response().Response.Response.StatusCode
3792			}
3793			tracing.EndSpan(ctx, sc, err)
3794		}()
3795	}
3796	for {
3797		next, err := page.fn(ctx, page.adr)
3798		if err != nil {
3799			return err
3800		}
3801		page.adr = next
3802		if !next.hasNextLink() || !next.IsEmpty() {
3803			break
3804		}
3805	}
3806	return nil
3807}
3808
3809// Next advances to the next page of values.  If there was an error making
3810// the request the page does not advance and the error is returned.
3811// Deprecated: Use NextWithContext() instead.
3812func (page *AvailableDelegationsResultPage) Next() error {
3813	return page.NextWithContext(context.Background())
3814}
3815
3816// NotDone returns true if the page enumeration should be started or is not yet complete.
3817func (page AvailableDelegationsResultPage) NotDone() bool {
3818	return !page.adr.IsEmpty()
3819}
3820
3821// Response returns the raw server response from the last page request.
3822func (page AvailableDelegationsResultPage) Response() AvailableDelegationsResult {
3823	return page.adr
3824}
3825
3826// Values returns the slice of values for the current page or nil if there are no values.
3827func (page AvailableDelegationsResultPage) Values() []AvailableDelegation {
3828	if page.adr.IsEmpty() {
3829		return nil
3830	}
3831	return *page.adr.Value
3832}
3833
3834// Creates a new instance of the AvailableDelegationsResultPage type.
3835func NewAvailableDelegationsResultPage(cur AvailableDelegationsResult, getNextPage func(context.Context, AvailableDelegationsResult) (AvailableDelegationsResult, error)) AvailableDelegationsResultPage {
3836	return AvailableDelegationsResultPage{
3837		fn:  getNextPage,
3838		adr: cur,
3839	}
3840}
3841
3842// AvailablePrivateEndpointType the information of an AvailablePrivateEndpointType.
3843type AvailablePrivateEndpointType struct {
3844	// Name - The name of the service and resource.
3845	Name *string `json:"name,omitempty"`
3846	// ID - A unique identifier of the AvailablePrivateEndpoint Type resource.
3847	ID *string `json:"id,omitempty"`
3848	// Type - Resource type.
3849	Type *string `json:"type,omitempty"`
3850	// ResourceName - The name of the service and resource.
3851	ResourceName *string `json:"resourceName,omitempty"`
3852}
3853
3854// AvailablePrivateEndpointTypesResult an array of available PrivateEndpoint types.
3855type AvailablePrivateEndpointTypesResult struct {
3856	autorest.Response `json:"-"`
3857	// Value - An array of available privateEndpoint type.
3858	Value *[]AvailablePrivateEndpointType `json:"value,omitempty"`
3859	// NextLink - READ-ONLY; The URL to get the next set of results.
3860	NextLink *string `json:"nextLink,omitempty"`
3861}
3862
3863// MarshalJSON is the custom marshaler for AvailablePrivateEndpointTypesResult.
3864func (apetr AvailablePrivateEndpointTypesResult) MarshalJSON() ([]byte, error) {
3865	objectMap := make(map[string]interface{})
3866	if apetr.Value != nil {
3867		objectMap["value"] = apetr.Value
3868	}
3869	return json.Marshal(objectMap)
3870}
3871
3872// AvailablePrivateEndpointTypesResultIterator provides access to a complete listing of
3873// AvailablePrivateEndpointType values.
3874type AvailablePrivateEndpointTypesResultIterator struct {
3875	i    int
3876	page AvailablePrivateEndpointTypesResultPage
3877}
3878
3879// NextWithContext advances to the next value.  If there was an error making
3880// the request the iterator does not advance and the error is returned.
3881func (iter *AvailablePrivateEndpointTypesResultIterator) NextWithContext(ctx context.Context) (err error) {
3882	if tracing.IsEnabled() {
3883		ctx = tracing.StartSpan(ctx, fqdn+"/AvailablePrivateEndpointTypesResultIterator.NextWithContext")
3884		defer func() {
3885			sc := -1
3886			if iter.Response().Response.Response != nil {
3887				sc = iter.Response().Response.Response.StatusCode
3888			}
3889			tracing.EndSpan(ctx, sc, err)
3890		}()
3891	}
3892	iter.i++
3893	if iter.i < len(iter.page.Values()) {
3894		return nil
3895	}
3896	err = iter.page.NextWithContext(ctx)
3897	if err != nil {
3898		iter.i--
3899		return err
3900	}
3901	iter.i = 0
3902	return nil
3903}
3904
3905// Next advances to the next value.  If there was an error making
3906// the request the iterator does not advance and the error is returned.
3907// Deprecated: Use NextWithContext() instead.
3908func (iter *AvailablePrivateEndpointTypesResultIterator) Next() error {
3909	return iter.NextWithContext(context.Background())
3910}
3911
3912// NotDone returns true if the enumeration should be started or is not yet complete.
3913func (iter AvailablePrivateEndpointTypesResultIterator) NotDone() bool {
3914	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3915}
3916
3917// Response returns the raw server response from the last page request.
3918func (iter AvailablePrivateEndpointTypesResultIterator) Response() AvailablePrivateEndpointTypesResult {
3919	return iter.page.Response()
3920}
3921
3922// Value returns the current value or a zero-initialized value if the
3923// iterator has advanced beyond the end of the collection.
3924func (iter AvailablePrivateEndpointTypesResultIterator) Value() AvailablePrivateEndpointType {
3925	if !iter.page.NotDone() {
3926		return AvailablePrivateEndpointType{}
3927	}
3928	return iter.page.Values()[iter.i]
3929}
3930
3931// Creates a new instance of the AvailablePrivateEndpointTypesResultIterator type.
3932func NewAvailablePrivateEndpointTypesResultIterator(page AvailablePrivateEndpointTypesResultPage) AvailablePrivateEndpointTypesResultIterator {
3933	return AvailablePrivateEndpointTypesResultIterator{page: page}
3934}
3935
3936// IsEmpty returns true if the ListResult contains no values.
3937func (apetr AvailablePrivateEndpointTypesResult) IsEmpty() bool {
3938	return apetr.Value == nil || len(*apetr.Value) == 0
3939}
3940
3941// hasNextLink returns true if the NextLink is not empty.
3942func (apetr AvailablePrivateEndpointTypesResult) hasNextLink() bool {
3943	return apetr.NextLink != nil && len(*apetr.NextLink) != 0
3944}
3945
3946// availablePrivateEndpointTypesResultPreparer prepares a request to retrieve the next set of results.
3947// It returns nil if no more results exist.
3948func (apetr AvailablePrivateEndpointTypesResult) availablePrivateEndpointTypesResultPreparer(ctx context.Context) (*http.Request, error) {
3949	if !apetr.hasNextLink() {
3950		return nil, nil
3951	}
3952	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3953		autorest.AsJSON(),
3954		autorest.AsGet(),
3955		autorest.WithBaseURL(to.String(apetr.NextLink)))
3956}
3957
3958// AvailablePrivateEndpointTypesResultPage contains a page of AvailablePrivateEndpointType values.
3959type AvailablePrivateEndpointTypesResultPage struct {
3960	fn    func(context.Context, AvailablePrivateEndpointTypesResult) (AvailablePrivateEndpointTypesResult, error)
3961	apetr AvailablePrivateEndpointTypesResult
3962}
3963
3964// NextWithContext advances to the next page of values.  If there was an error making
3965// the request the page does not advance and the error is returned.
3966func (page *AvailablePrivateEndpointTypesResultPage) NextWithContext(ctx context.Context) (err error) {
3967	if tracing.IsEnabled() {
3968		ctx = tracing.StartSpan(ctx, fqdn+"/AvailablePrivateEndpointTypesResultPage.NextWithContext")
3969		defer func() {
3970			sc := -1
3971			if page.Response().Response.Response != nil {
3972				sc = page.Response().Response.Response.StatusCode
3973			}
3974			tracing.EndSpan(ctx, sc, err)
3975		}()
3976	}
3977	for {
3978		next, err := page.fn(ctx, page.apetr)
3979		if err != nil {
3980			return err
3981		}
3982		page.apetr = next
3983		if !next.hasNextLink() || !next.IsEmpty() {
3984			break
3985		}
3986	}
3987	return nil
3988}
3989
3990// Next advances to the next page of values.  If there was an error making
3991// the request the page does not advance and the error is returned.
3992// Deprecated: Use NextWithContext() instead.
3993func (page *AvailablePrivateEndpointTypesResultPage) Next() error {
3994	return page.NextWithContext(context.Background())
3995}
3996
3997// NotDone returns true if the page enumeration should be started or is not yet complete.
3998func (page AvailablePrivateEndpointTypesResultPage) NotDone() bool {
3999	return !page.apetr.IsEmpty()
4000}
4001
4002// Response returns the raw server response from the last page request.
4003func (page AvailablePrivateEndpointTypesResultPage) Response() AvailablePrivateEndpointTypesResult {
4004	return page.apetr
4005}
4006
4007// Values returns the slice of values for the current page or nil if there are no values.
4008func (page AvailablePrivateEndpointTypesResultPage) Values() []AvailablePrivateEndpointType {
4009	if page.apetr.IsEmpty() {
4010		return nil
4011	}
4012	return *page.apetr.Value
4013}
4014
4015// Creates a new instance of the AvailablePrivateEndpointTypesResultPage type.
4016func NewAvailablePrivateEndpointTypesResultPage(cur AvailablePrivateEndpointTypesResult, getNextPage func(context.Context, AvailablePrivateEndpointTypesResult) (AvailablePrivateEndpointTypesResult, error)) AvailablePrivateEndpointTypesResultPage {
4017	return AvailablePrivateEndpointTypesResultPage{
4018		fn:    getNextPage,
4019		apetr: cur,
4020	}
4021}
4022
4023// AvailableProvidersList list of available countries with details.
4024type AvailableProvidersList struct {
4025	autorest.Response `json:"-"`
4026	// Countries - List of available countries.
4027	Countries *[]AvailableProvidersListCountry `json:"countries,omitempty"`
4028}
4029
4030// AvailableProvidersListCity city or town details.
4031type AvailableProvidersListCity struct {
4032	// CityName - The city or town name.
4033	CityName *string `json:"cityName,omitempty"`
4034	// Providers - A list of Internet service providers.
4035	Providers *[]string `json:"providers,omitempty"`
4036}
4037
4038// AvailableProvidersListCountry country details.
4039type AvailableProvidersListCountry struct {
4040	// CountryName - The country name.
4041	CountryName *string `json:"countryName,omitempty"`
4042	// Providers - A list of Internet service providers.
4043	Providers *[]string `json:"providers,omitempty"`
4044	// States - List of available states in the country.
4045	States *[]AvailableProvidersListState `json:"states,omitempty"`
4046}
4047
4048// AvailableProvidersListParameters constraints that determine the list of available Internet service
4049// providers.
4050type AvailableProvidersListParameters struct {
4051	// AzureLocations - A list of Azure regions.
4052	AzureLocations *[]string `json:"azureLocations,omitempty"`
4053	// Country - The country for available providers list.
4054	Country *string `json:"country,omitempty"`
4055	// State - The state for available providers list.
4056	State *string `json:"state,omitempty"`
4057	// City - The city or town for available providers list.
4058	City *string `json:"city,omitempty"`
4059}
4060
4061// AvailableProvidersListState state details.
4062type AvailableProvidersListState struct {
4063	// StateName - The state name.
4064	StateName *string `json:"stateName,omitempty"`
4065	// Providers - A list of Internet service providers.
4066	Providers *[]string `json:"providers,omitempty"`
4067	// Cities - List of available cities or towns in the state.
4068	Cities *[]AvailableProvidersListCity `json:"cities,omitempty"`
4069}
4070
4071// AzureAsyncOperationResult the response body contains the status of the specified asynchronous operation,
4072// indicating whether it has succeeded, is in progress, or has failed. Note that this status is distinct
4073// from the HTTP status code returned for the Get Operation Status operation itself. If the asynchronous
4074// operation succeeded, the response body includes the HTTP status code for the successful request. If the
4075// asynchronous operation failed, the response body includes the HTTP status code for the failed request
4076// and error information regarding the failure.
4077type AzureAsyncOperationResult struct {
4078	// Status - Status of the Azure async operation. Possible values include: 'OperationStatusInProgress', 'OperationStatusSucceeded', 'OperationStatusFailed'
4079	Status OperationStatus `json:"status,omitempty"`
4080	// Error - Details of the error occurred during specified asynchronous operation.
4081	Error *Error `json:"error,omitempty"`
4082}
4083
4084// AzureFirewall azure Firewall resource.
4085type AzureFirewall struct {
4086	autorest.Response `json:"-"`
4087	// AzureFirewallPropertiesFormat - Properties of the azure firewall.
4088	*AzureFirewallPropertiesFormat `json:"properties,omitempty"`
4089	// Zones - A list of availability zones denoting where the resource needs to come from.
4090	Zones *[]string `json:"zones,omitempty"`
4091	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
4092	Etag *string `json:"etag,omitempty"`
4093	// ID - Resource ID.
4094	ID *string `json:"id,omitempty"`
4095	// Name - READ-ONLY; Resource name.
4096	Name *string `json:"name,omitempty"`
4097	// Type - READ-ONLY; Resource type.
4098	Type *string `json:"type,omitempty"`
4099	// Location - Resource location.
4100	Location *string `json:"location,omitempty"`
4101	// Tags - Resource tags.
4102	Tags map[string]*string `json:"tags"`
4103}
4104
4105// MarshalJSON is the custom marshaler for AzureFirewall.
4106func (af AzureFirewall) MarshalJSON() ([]byte, error) {
4107	objectMap := make(map[string]interface{})
4108	if af.AzureFirewallPropertiesFormat != nil {
4109		objectMap["properties"] = af.AzureFirewallPropertiesFormat
4110	}
4111	if af.Zones != nil {
4112		objectMap["zones"] = af.Zones
4113	}
4114	if af.ID != nil {
4115		objectMap["id"] = af.ID
4116	}
4117	if af.Location != nil {
4118		objectMap["location"] = af.Location
4119	}
4120	if af.Tags != nil {
4121		objectMap["tags"] = af.Tags
4122	}
4123	return json.Marshal(objectMap)
4124}
4125
4126// UnmarshalJSON is the custom unmarshaler for AzureFirewall struct.
4127func (af *AzureFirewall) UnmarshalJSON(body []byte) error {
4128	var m map[string]*json.RawMessage
4129	err := json.Unmarshal(body, &m)
4130	if err != nil {
4131		return err
4132	}
4133	for k, v := range m {
4134		switch k {
4135		case "properties":
4136			if v != nil {
4137				var azureFirewallPropertiesFormat AzureFirewallPropertiesFormat
4138				err = json.Unmarshal(*v, &azureFirewallPropertiesFormat)
4139				if err != nil {
4140					return err
4141				}
4142				af.AzureFirewallPropertiesFormat = &azureFirewallPropertiesFormat
4143			}
4144		case "zones":
4145			if v != nil {
4146				var zones []string
4147				err = json.Unmarshal(*v, &zones)
4148				if err != nil {
4149					return err
4150				}
4151				af.Zones = &zones
4152			}
4153		case "etag":
4154			if v != nil {
4155				var etag string
4156				err = json.Unmarshal(*v, &etag)
4157				if err != nil {
4158					return err
4159				}
4160				af.Etag = &etag
4161			}
4162		case "id":
4163			if v != nil {
4164				var ID string
4165				err = json.Unmarshal(*v, &ID)
4166				if err != nil {
4167					return err
4168				}
4169				af.ID = &ID
4170			}
4171		case "name":
4172			if v != nil {
4173				var name string
4174				err = json.Unmarshal(*v, &name)
4175				if err != nil {
4176					return err
4177				}
4178				af.Name = &name
4179			}
4180		case "type":
4181			if v != nil {
4182				var typeVar string
4183				err = json.Unmarshal(*v, &typeVar)
4184				if err != nil {
4185					return err
4186				}
4187				af.Type = &typeVar
4188			}
4189		case "location":
4190			if v != nil {
4191				var location string
4192				err = json.Unmarshal(*v, &location)
4193				if err != nil {
4194					return err
4195				}
4196				af.Location = &location
4197			}
4198		case "tags":
4199			if v != nil {
4200				var tags map[string]*string
4201				err = json.Unmarshal(*v, &tags)
4202				if err != nil {
4203					return err
4204				}
4205				af.Tags = tags
4206			}
4207		}
4208	}
4209
4210	return nil
4211}
4212
4213// AzureFirewallApplicationRule properties of an application rule.
4214type AzureFirewallApplicationRule struct {
4215	// Name - Name of the application rule.
4216	Name *string `json:"name,omitempty"`
4217	// Description - Description of the rule.
4218	Description *string `json:"description,omitempty"`
4219	// SourceAddresses - List of source IP addresses for this rule.
4220	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
4221	// Protocols - Array of ApplicationRuleProtocols.
4222	Protocols *[]AzureFirewallApplicationRuleProtocol `json:"protocols,omitempty"`
4223	// TargetFqdns - List of FQDNs for this rule.
4224	TargetFqdns *[]string `json:"targetFqdns,omitempty"`
4225	// FqdnTags - List of FQDN Tags for this rule.
4226	FqdnTags *[]string `json:"fqdnTags,omitempty"`
4227}
4228
4229// AzureFirewallApplicationRuleCollection application rule collection resource.
4230type AzureFirewallApplicationRuleCollection struct {
4231	// AzureFirewallApplicationRuleCollectionPropertiesFormat - Properties of the azure firewall application rule collection.
4232	*AzureFirewallApplicationRuleCollectionPropertiesFormat `json:"properties,omitempty"`
4233	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
4234	Name *string `json:"name,omitempty"`
4235	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
4236	Etag *string `json:"etag,omitempty"`
4237	// ID - Resource ID.
4238	ID *string `json:"id,omitempty"`
4239}
4240
4241// MarshalJSON is the custom marshaler for AzureFirewallApplicationRuleCollection.
4242func (afarc AzureFirewallApplicationRuleCollection) MarshalJSON() ([]byte, error) {
4243	objectMap := make(map[string]interface{})
4244	if afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat != nil {
4245		objectMap["properties"] = afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat
4246	}
4247	if afarc.Name != nil {
4248		objectMap["name"] = afarc.Name
4249	}
4250	if afarc.ID != nil {
4251		objectMap["id"] = afarc.ID
4252	}
4253	return json.Marshal(objectMap)
4254}
4255
4256// UnmarshalJSON is the custom unmarshaler for AzureFirewallApplicationRuleCollection struct.
4257func (afarc *AzureFirewallApplicationRuleCollection) UnmarshalJSON(body []byte) error {
4258	var m map[string]*json.RawMessage
4259	err := json.Unmarshal(body, &m)
4260	if err != nil {
4261		return err
4262	}
4263	for k, v := range m {
4264		switch k {
4265		case "properties":
4266			if v != nil {
4267				var azureFirewallApplicationRuleCollectionPropertiesFormat AzureFirewallApplicationRuleCollectionPropertiesFormat
4268				err = json.Unmarshal(*v, &azureFirewallApplicationRuleCollectionPropertiesFormat)
4269				if err != nil {
4270					return err
4271				}
4272				afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat = &azureFirewallApplicationRuleCollectionPropertiesFormat
4273			}
4274		case "name":
4275			if v != nil {
4276				var name string
4277				err = json.Unmarshal(*v, &name)
4278				if err != nil {
4279					return err
4280				}
4281				afarc.Name = &name
4282			}
4283		case "etag":
4284			if v != nil {
4285				var etag string
4286				err = json.Unmarshal(*v, &etag)
4287				if err != nil {
4288					return err
4289				}
4290				afarc.Etag = &etag
4291			}
4292		case "id":
4293			if v != nil {
4294				var ID string
4295				err = json.Unmarshal(*v, &ID)
4296				if err != nil {
4297					return err
4298				}
4299				afarc.ID = &ID
4300			}
4301		}
4302	}
4303
4304	return nil
4305}
4306
4307// AzureFirewallApplicationRuleCollectionPropertiesFormat properties of the application rule collection.
4308type AzureFirewallApplicationRuleCollectionPropertiesFormat struct {
4309	// Priority - Priority of the application rule collection resource.
4310	Priority *int32 `json:"priority,omitempty"`
4311	// Action - The action type of a rule collection.
4312	Action *AzureFirewallRCAction `json:"action,omitempty"`
4313	// Rules - Collection of rules used by a application rule collection.
4314	Rules *[]AzureFirewallApplicationRule `json:"rules,omitempty"`
4315	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
4316	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
4317}
4318
4319// AzureFirewallApplicationRuleProtocol properties of the application rule protocol.
4320type AzureFirewallApplicationRuleProtocol struct {
4321	// ProtocolType - Protocol type. Possible values include: 'AzureFirewallApplicationRuleProtocolTypeHTTP', 'AzureFirewallApplicationRuleProtocolTypeHTTPS'
4322	ProtocolType AzureFirewallApplicationRuleProtocolType `json:"protocolType,omitempty"`
4323	// Port - Port number for the protocol, cannot be greater than 64000. This field is optional.
4324	Port *int32 `json:"port,omitempty"`
4325}
4326
4327// AzureFirewallFqdnTag azure Firewall FQDN Tag Resource.
4328type AzureFirewallFqdnTag struct {
4329	// AzureFirewallFqdnTagPropertiesFormat - Properties of the azure firewall FQDN tag.
4330	*AzureFirewallFqdnTagPropertiesFormat `json:"properties,omitempty"`
4331	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
4332	Etag *string `json:"etag,omitempty"`
4333	// ID - Resource ID.
4334	ID *string `json:"id,omitempty"`
4335	// Name - READ-ONLY; Resource name.
4336	Name *string `json:"name,omitempty"`
4337	// Type - READ-ONLY; Resource type.
4338	Type *string `json:"type,omitempty"`
4339	// Location - Resource location.
4340	Location *string `json:"location,omitempty"`
4341	// Tags - Resource tags.
4342	Tags map[string]*string `json:"tags"`
4343}
4344
4345// MarshalJSON is the custom marshaler for AzureFirewallFqdnTag.
4346func (afft AzureFirewallFqdnTag) MarshalJSON() ([]byte, error) {
4347	objectMap := make(map[string]interface{})
4348	if afft.AzureFirewallFqdnTagPropertiesFormat != nil {
4349		objectMap["properties"] = afft.AzureFirewallFqdnTagPropertiesFormat
4350	}
4351	if afft.ID != nil {
4352		objectMap["id"] = afft.ID
4353	}
4354	if afft.Location != nil {
4355		objectMap["location"] = afft.Location
4356	}
4357	if afft.Tags != nil {
4358		objectMap["tags"] = afft.Tags
4359	}
4360	return json.Marshal(objectMap)
4361}
4362
4363// UnmarshalJSON is the custom unmarshaler for AzureFirewallFqdnTag struct.
4364func (afft *AzureFirewallFqdnTag) UnmarshalJSON(body []byte) error {
4365	var m map[string]*json.RawMessage
4366	err := json.Unmarshal(body, &m)
4367	if err != nil {
4368		return err
4369	}
4370	for k, v := range m {
4371		switch k {
4372		case "properties":
4373			if v != nil {
4374				var azureFirewallFqdnTagPropertiesFormat AzureFirewallFqdnTagPropertiesFormat
4375				err = json.Unmarshal(*v, &azureFirewallFqdnTagPropertiesFormat)
4376				if err != nil {
4377					return err
4378				}
4379				afft.AzureFirewallFqdnTagPropertiesFormat = &azureFirewallFqdnTagPropertiesFormat
4380			}
4381		case "etag":
4382			if v != nil {
4383				var etag string
4384				err = json.Unmarshal(*v, &etag)
4385				if err != nil {
4386					return err
4387				}
4388				afft.Etag = &etag
4389			}
4390		case "id":
4391			if v != nil {
4392				var ID string
4393				err = json.Unmarshal(*v, &ID)
4394				if err != nil {
4395					return err
4396				}
4397				afft.ID = &ID
4398			}
4399		case "name":
4400			if v != nil {
4401				var name string
4402				err = json.Unmarshal(*v, &name)
4403				if err != nil {
4404					return err
4405				}
4406				afft.Name = &name
4407			}
4408		case "type":
4409			if v != nil {
4410				var typeVar string
4411				err = json.Unmarshal(*v, &typeVar)
4412				if err != nil {
4413					return err
4414				}
4415				afft.Type = &typeVar
4416			}
4417		case "location":
4418			if v != nil {
4419				var location string
4420				err = json.Unmarshal(*v, &location)
4421				if err != nil {
4422					return err
4423				}
4424				afft.Location = &location
4425			}
4426		case "tags":
4427			if v != nil {
4428				var tags map[string]*string
4429				err = json.Unmarshal(*v, &tags)
4430				if err != nil {
4431					return err
4432				}
4433				afft.Tags = tags
4434			}
4435		}
4436	}
4437
4438	return nil
4439}
4440
4441// AzureFirewallFqdnTagListResult response for ListAzureFirewallFqdnTags API service call.
4442type AzureFirewallFqdnTagListResult struct {
4443	autorest.Response `json:"-"`
4444	// Value - List of Azure Firewall FQDN Tags in a resource group.
4445	Value *[]AzureFirewallFqdnTag `json:"value,omitempty"`
4446	// NextLink - URL to get the next set of results.
4447	NextLink *string `json:"nextLink,omitempty"`
4448}
4449
4450// AzureFirewallFqdnTagListResultIterator provides access to a complete listing of AzureFirewallFqdnTag
4451// values.
4452type AzureFirewallFqdnTagListResultIterator struct {
4453	i    int
4454	page AzureFirewallFqdnTagListResultPage
4455}
4456
4457// NextWithContext advances to the next value.  If there was an error making
4458// the request the iterator does not advance and the error is returned.
4459func (iter *AzureFirewallFqdnTagListResultIterator) NextWithContext(ctx context.Context) (err error) {
4460	if tracing.IsEnabled() {
4461		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallFqdnTagListResultIterator.NextWithContext")
4462		defer func() {
4463			sc := -1
4464			if iter.Response().Response.Response != nil {
4465				sc = iter.Response().Response.Response.StatusCode
4466			}
4467			tracing.EndSpan(ctx, sc, err)
4468		}()
4469	}
4470	iter.i++
4471	if iter.i < len(iter.page.Values()) {
4472		return nil
4473	}
4474	err = iter.page.NextWithContext(ctx)
4475	if err != nil {
4476		iter.i--
4477		return err
4478	}
4479	iter.i = 0
4480	return nil
4481}
4482
4483// Next advances to the next value.  If there was an error making
4484// the request the iterator does not advance and the error is returned.
4485// Deprecated: Use NextWithContext() instead.
4486func (iter *AzureFirewallFqdnTagListResultIterator) Next() error {
4487	return iter.NextWithContext(context.Background())
4488}
4489
4490// NotDone returns true if the enumeration should be started or is not yet complete.
4491func (iter AzureFirewallFqdnTagListResultIterator) NotDone() bool {
4492	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4493}
4494
4495// Response returns the raw server response from the last page request.
4496func (iter AzureFirewallFqdnTagListResultIterator) Response() AzureFirewallFqdnTagListResult {
4497	return iter.page.Response()
4498}
4499
4500// Value returns the current value or a zero-initialized value if the
4501// iterator has advanced beyond the end of the collection.
4502func (iter AzureFirewallFqdnTagListResultIterator) Value() AzureFirewallFqdnTag {
4503	if !iter.page.NotDone() {
4504		return AzureFirewallFqdnTag{}
4505	}
4506	return iter.page.Values()[iter.i]
4507}
4508
4509// Creates a new instance of the AzureFirewallFqdnTagListResultIterator type.
4510func NewAzureFirewallFqdnTagListResultIterator(page AzureFirewallFqdnTagListResultPage) AzureFirewallFqdnTagListResultIterator {
4511	return AzureFirewallFqdnTagListResultIterator{page: page}
4512}
4513
4514// IsEmpty returns true if the ListResult contains no values.
4515func (afftlr AzureFirewallFqdnTagListResult) IsEmpty() bool {
4516	return afftlr.Value == nil || len(*afftlr.Value) == 0
4517}
4518
4519// hasNextLink returns true if the NextLink is not empty.
4520func (afftlr AzureFirewallFqdnTagListResult) hasNextLink() bool {
4521	return afftlr.NextLink != nil && len(*afftlr.NextLink) != 0
4522}
4523
4524// azureFirewallFqdnTagListResultPreparer prepares a request to retrieve the next set of results.
4525// It returns nil if no more results exist.
4526func (afftlr AzureFirewallFqdnTagListResult) azureFirewallFqdnTagListResultPreparer(ctx context.Context) (*http.Request, error) {
4527	if !afftlr.hasNextLink() {
4528		return nil, nil
4529	}
4530	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4531		autorest.AsJSON(),
4532		autorest.AsGet(),
4533		autorest.WithBaseURL(to.String(afftlr.NextLink)))
4534}
4535
4536// AzureFirewallFqdnTagListResultPage contains a page of AzureFirewallFqdnTag values.
4537type AzureFirewallFqdnTagListResultPage struct {
4538	fn     func(context.Context, AzureFirewallFqdnTagListResult) (AzureFirewallFqdnTagListResult, error)
4539	afftlr AzureFirewallFqdnTagListResult
4540}
4541
4542// NextWithContext advances to the next page of values.  If there was an error making
4543// the request the page does not advance and the error is returned.
4544func (page *AzureFirewallFqdnTagListResultPage) NextWithContext(ctx context.Context) (err error) {
4545	if tracing.IsEnabled() {
4546		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallFqdnTagListResultPage.NextWithContext")
4547		defer func() {
4548			sc := -1
4549			if page.Response().Response.Response != nil {
4550				sc = page.Response().Response.Response.StatusCode
4551			}
4552			tracing.EndSpan(ctx, sc, err)
4553		}()
4554	}
4555	for {
4556		next, err := page.fn(ctx, page.afftlr)
4557		if err != nil {
4558			return err
4559		}
4560		page.afftlr = next
4561		if !next.hasNextLink() || !next.IsEmpty() {
4562			break
4563		}
4564	}
4565	return nil
4566}
4567
4568// Next advances to the next page of values.  If there was an error making
4569// the request the page does not advance and the error is returned.
4570// Deprecated: Use NextWithContext() instead.
4571func (page *AzureFirewallFqdnTagListResultPage) Next() error {
4572	return page.NextWithContext(context.Background())
4573}
4574
4575// NotDone returns true if the page enumeration should be started or is not yet complete.
4576func (page AzureFirewallFqdnTagListResultPage) NotDone() bool {
4577	return !page.afftlr.IsEmpty()
4578}
4579
4580// Response returns the raw server response from the last page request.
4581func (page AzureFirewallFqdnTagListResultPage) Response() AzureFirewallFqdnTagListResult {
4582	return page.afftlr
4583}
4584
4585// Values returns the slice of values for the current page or nil if there are no values.
4586func (page AzureFirewallFqdnTagListResultPage) Values() []AzureFirewallFqdnTag {
4587	if page.afftlr.IsEmpty() {
4588		return nil
4589	}
4590	return *page.afftlr.Value
4591}
4592
4593// Creates a new instance of the AzureFirewallFqdnTagListResultPage type.
4594func NewAzureFirewallFqdnTagListResultPage(cur AzureFirewallFqdnTagListResult, getNextPage func(context.Context, AzureFirewallFqdnTagListResult) (AzureFirewallFqdnTagListResult, error)) AzureFirewallFqdnTagListResultPage {
4595	return AzureFirewallFqdnTagListResultPage{
4596		fn:     getNextPage,
4597		afftlr: cur,
4598	}
4599}
4600
4601// AzureFirewallFqdnTagPropertiesFormat azure Firewall FQDN Tag Properties.
4602type AzureFirewallFqdnTagPropertiesFormat struct {
4603	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
4604	ProvisioningState *string `json:"provisioningState,omitempty"`
4605	// FqdnTagName - READ-ONLY; The name of this FQDN Tag.
4606	FqdnTagName *string `json:"fqdnTagName,omitempty"`
4607}
4608
4609// AzureFirewallIPConfiguration IP configuration of an Azure Firewall.
4610type AzureFirewallIPConfiguration struct {
4611	// AzureFirewallIPConfigurationPropertiesFormat - Properties of the azure firewall IP configuration.
4612	*AzureFirewallIPConfigurationPropertiesFormat `json:"properties,omitempty"`
4613	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
4614	Name *string `json:"name,omitempty"`
4615	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
4616	Etag *string `json:"etag,omitempty"`
4617	// ID - Resource ID.
4618	ID *string `json:"id,omitempty"`
4619}
4620
4621// MarshalJSON is the custom marshaler for AzureFirewallIPConfiguration.
4622func (afic AzureFirewallIPConfiguration) MarshalJSON() ([]byte, error) {
4623	objectMap := make(map[string]interface{})
4624	if afic.AzureFirewallIPConfigurationPropertiesFormat != nil {
4625		objectMap["properties"] = afic.AzureFirewallIPConfigurationPropertiesFormat
4626	}
4627	if afic.Name != nil {
4628		objectMap["name"] = afic.Name
4629	}
4630	if afic.ID != nil {
4631		objectMap["id"] = afic.ID
4632	}
4633	return json.Marshal(objectMap)
4634}
4635
4636// UnmarshalJSON is the custom unmarshaler for AzureFirewallIPConfiguration struct.
4637func (afic *AzureFirewallIPConfiguration) UnmarshalJSON(body []byte) error {
4638	var m map[string]*json.RawMessage
4639	err := json.Unmarshal(body, &m)
4640	if err != nil {
4641		return err
4642	}
4643	for k, v := range m {
4644		switch k {
4645		case "properties":
4646			if v != nil {
4647				var azureFirewallIPConfigurationPropertiesFormat AzureFirewallIPConfigurationPropertiesFormat
4648				err = json.Unmarshal(*v, &azureFirewallIPConfigurationPropertiesFormat)
4649				if err != nil {
4650					return err
4651				}
4652				afic.AzureFirewallIPConfigurationPropertiesFormat = &azureFirewallIPConfigurationPropertiesFormat
4653			}
4654		case "name":
4655			if v != nil {
4656				var name string
4657				err = json.Unmarshal(*v, &name)
4658				if err != nil {
4659					return err
4660				}
4661				afic.Name = &name
4662			}
4663		case "etag":
4664			if v != nil {
4665				var etag string
4666				err = json.Unmarshal(*v, &etag)
4667				if err != nil {
4668					return err
4669				}
4670				afic.Etag = &etag
4671			}
4672		case "id":
4673			if v != nil {
4674				var ID string
4675				err = json.Unmarshal(*v, &ID)
4676				if err != nil {
4677					return err
4678				}
4679				afic.ID = &ID
4680			}
4681		}
4682	}
4683
4684	return nil
4685}
4686
4687// AzureFirewallIPConfigurationPropertiesFormat properties of IP configuration of an Azure Firewall.
4688type AzureFirewallIPConfigurationPropertiesFormat struct {
4689	// PrivateIPAddress - READ-ONLY; The Firewall Internal Load Balancer IP to be used as the next hop in User Defined Routes.
4690	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
4691	// Subnet - Reference of the subnet resource. This resource must be named 'AzureFirewallSubnet'.
4692	Subnet *SubResource `json:"subnet,omitempty"`
4693	// PublicIPAddress - Reference of the PublicIP resource. This field is a mandatory input if subnet is not null.
4694	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
4695	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
4696	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
4697}
4698
4699// MarshalJSON is the custom marshaler for AzureFirewallIPConfigurationPropertiesFormat.
4700func (aficpf AzureFirewallIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
4701	objectMap := make(map[string]interface{})
4702	if aficpf.Subnet != nil {
4703		objectMap["subnet"] = aficpf.Subnet
4704	}
4705	if aficpf.PublicIPAddress != nil {
4706		objectMap["publicIPAddress"] = aficpf.PublicIPAddress
4707	}
4708	if aficpf.ProvisioningState != "" {
4709		objectMap["provisioningState"] = aficpf.ProvisioningState
4710	}
4711	return json.Marshal(objectMap)
4712}
4713
4714// AzureFirewallListResult response for ListAzureFirewalls API service call.
4715type AzureFirewallListResult struct {
4716	autorest.Response `json:"-"`
4717	// Value - List of Azure Firewalls in a resource group.
4718	Value *[]AzureFirewall `json:"value,omitempty"`
4719	// NextLink - URL to get the next set of results.
4720	NextLink *string `json:"nextLink,omitempty"`
4721}
4722
4723// AzureFirewallListResultIterator provides access to a complete listing of AzureFirewall values.
4724type AzureFirewallListResultIterator struct {
4725	i    int
4726	page AzureFirewallListResultPage
4727}
4728
4729// NextWithContext advances to the next value.  If there was an error making
4730// the request the iterator does not advance and the error is returned.
4731func (iter *AzureFirewallListResultIterator) NextWithContext(ctx context.Context) (err error) {
4732	if tracing.IsEnabled() {
4733		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallListResultIterator.NextWithContext")
4734		defer func() {
4735			sc := -1
4736			if iter.Response().Response.Response != nil {
4737				sc = iter.Response().Response.Response.StatusCode
4738			}
4739			tracing.EndSpan(ctx, sc, err)
4740		}()
4741	}
4742	iter.i++
4743	if iter.i < len(iter.page.Values()) {
4744		return nil
4745	}
4746	err = iter.page.NextWithContext(ctx)
4747	if err != nil {
4748		iter.i--
4749		return err
4750	}
4751	iter.i = 0
4752	return nil
4753}
4754
4755// Next advances to the next value.  If there was an error making
4756// the request the iterator does not advance and the error is returned.
4757// Deprecated: Use NextWithContext() instead.
4758func (iter *AzureFirewallListResultIterator) Next() error {
4759	return iter.NextWithContext(context.Background())
4760}
4761
4762// NotDone returns true if the enumeration should be started or is not yet complete.
4763func (iter AzureFirewallListResultIterator) NotDone() bool {
4764	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4765}
4766
4767// Response returns the raw server response from the last page request.
4768func (iter AzureFirewallListResultIterator) Response() AzureFirewallListResult {
4769	return iter.page.Response()
4770}
4771
4772// Value returns the current value or a zero-initialized value if the
4773// iterator has advanced beyond the end of the collection.
4774func (iter AzureFirewallListResultIterator) Value() AzureFirewall {
4775	if !iter.page.NotDone() {
4776		return AzureFirewall{}
4777	}
4778	return iter.page.Values()[iter.i]
4779}
4780
4781// Creates a new instance of the AzureFirewallListResultIterator type.
4782func NewAzureFirewallListResultIterator(page AzureFirewallListResultPage) AzureFirewallListResultIterator {
4783	return AzureFirewallListResultIterator{page: page}
4784}
4785
4786// IsEmpty returns true if the ListResult contains no values.
4787func (aflr AzureFirewallListResult) IsEmpty() bool {
4788	return aflr.Value == nil || len(*aflr.Value) == 0
4789}
4790
4791// hasNextLink returns true if the NextLink is not empty.
4792func (aflr AzureFirewallListResult) hasNextLink() bool {
4793	return aflr.NextLink != nil && len(*aflr.NextLink) != 0
4794}
4795
4796// azureFirewallListResultPreparer prepares a request to retrieve the next set of results.
4797// It returns nil if no more results exist.
4798func (aflr AzureFirewallListResult) azureFirewallListResultPreparer(ctx context.Context) (*http.Request, error) {
4799	if !aflr.hasNextLink() {
4800		return nil, nil
4801	}
4802	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4803		autorest.AsJSON(),
4804		autorest.AsGet(),
4805		autorest.WithBaseURL(to.String(aflr.NextLink)))
4806}
4807
4808// AzureFirewallListResultPage contains a page of AzureFirewall values.
4809type AzureFirewallListResultPage struct {
4810	fn   func(context.Context, AzureFirewallListResult) (AzureFirewallListResult, error)
4811	aflr AzureFirewallListResult
4812}
4813
4814// NextWithContext advances to the next page of values.  If there was an error making
4815// the request the page does not advance and the error is returned.
4816func (page *AzureFirewallListResultPage) NextWithContext(ctx context.Context) (err error) {
4817	if tracing.IsEnabled() {
4818		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallListResultPage.NextWithContext")
4819		defer func() {
4820			sc := -1
4821			if page.Response().Response.Response != nil {
4822				sc = page.Response().Response.Response.StatusCode
4823			}
4824			tracing.EndSpan(ctx, sc, err)
4825		}()
4826	}
4827	for {
4828		next, err := page.fn(ctx, page.aflr)
4829		if err != nil {
4830			return err
4831		}
4832		page.aflr = next
4833		if !next.hasNextLink() || !next.IsEmpty() {
4834			break
4835		}
4836	}
4837	return nil
4838}
4839
4840// Next advances to the next page of values.  If there was an error making
4841// the request the page does not advance and the error is returned.
4842// Deprecated: Use NextWithContext() instead.
4843func (page *AzureFirewallListResultPage) Next() error {
4844	return page.NextWithContext(context.Background())
4845}
4846
4847// NotDone returns true if the page enumeration should be started or is not yet complete.
4848func (page AzureFirewallListResultPage) NotDone() bool {
4849	return !page.aflr.IsEmpty()
4850}
4851
4852// Response returns the raw server response from the last page request.
4853func (page AzureFirewallListResultPage) Response() AzureFirewallListResult {
4854	return page.aflr
4855}
4856
4857// Values returns the slice of values for the current page or nil if there are no values.
4858func (page AzureFirewallListResultPage) Values() []AzureFirewall {
4859	if page.aflr.IsEmpty() {
4860		return nil
4861	}
4862	return *page.aflr.Value
4863}
4864
4865// Creates a new instance of the AzureFirewallListResultPage type.
4866func NewAzureFirewallListResultPage(cur AzureFirewallListResult, getNextPage func(context.Context, AzureFirewallListResult) (AzureFirewallListResult, error)) AzureFirewallListResultPage {
4867	return AzureFirewallListResultPage{
4868		fn:   getNextPage,
4869		aflr: cur,
4870	}
4871}
4872
4873// AzureFirewallNatRCAction azureFirewall NAT Rule Collection Action.
4874type AzureFirewallNatRCAction struct {
4875	// Type - The type of action. Possible values include: 'Snat', 'Dnat'
4876	Type AzureFirewallNatRCActionType `json:"type,omitempty"`
4877}
4878
4879// AzureFirewallNatRule properties of a NAT rule.
4880type AzureFirewallNatRule struct {
4881	// Name - Name of the NAT rule.
4882	Name *string `json:"name,omitempty"`
4883	// Description - Description of the rule.
4884	Description *string `json:"description,omitempty"`
4885	// SourceAddresses - List of source IP addresses for this rule.
4886	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
4887	// DestinationAddresses - List of destination IP addresses for this rule. Supports IP ranges, prefixes, and service tags.
4888	DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
4889	// DestinationPorts - List of destination ports.
4890	DestinationPorts *[]string `json:"destinationPorts,omitempty"`
4891	// Protocols - Array of AzureFirewallNetworkRuleProtocols applicable to this NAT rule.
4892	Protocols *[]AzureFirewallNetworkRuleProtocol `json:"protocols,omitempty"`
4893	// TranslatedAddress - The translated address for this NAT rule.
4894	TranslatedAddress *string `json:"translatedAddress,omitempty"`
4895	// TranslatedPort - The translated port for this NAT rule.
4896	TranslatedPort *string `json:"translatedPort,omitempty"`
4897}
4898
4899// AzureFirewallNatRuleCollection NAT rule collection resource.
4900type AzureFirewallNatRuleCollection struct {
4901	// AzureFirewallNatRuleCollectionProperties - Properties of the azure firewall NAT rule collection.
4902	*AzureFirewallNatRuleCollectionProperties `json:"properties,omitempty"`
4903	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
4904	Name *string `json:"name,omitempty"`
4905	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
4906	Etag *string `json:"etag,omitempty"`
4907	// ID - Resource ID.
4908	ID *string `json:"id,omitempty"`
4909}
4910
4911// MarshalJSON is the custom marshaler for AzureFirewallNatRuleCollection.
4912func (afnrc AzureFirewallNatRuleCollection) MarshalJSON() ([]byte, error) {
4913	objectMap := make(map[string]interface{})
4914	if afnrc.AzureFirewallNatRuleCollectionProperties != nil {
4915		objectMap["properties"] = afnrc.AzureFirewallNatRuleCollectionProperties
4916	}
4917	if afnrc.Name != nil {
4918		objectMap["name"] = afnrc.Name
4919	}
4920	if afnrc.ID != nil {
4921		objectMap["id"] = afnrc.ID
4922	}
4923	return json.Marshal(objectMap)
4924}
4925
4926// UnmarshalJSON is the custom unmarshaler for AzureFirewallNatRuleCollection struct.
4927func (afnrc *AzureFirewallNatRuleCollection) 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 azureFirewallNatRuleCollectionProperties AzureFirewallNatRuleCollectionProperties
4938				err = json.Unmarshal(*v, &azureFirewallNatRuleCollectionProperties)
4939				if err != nil {
4940					return err
4941				}
4942				afnrc.AzureFirewallNatRuleCollectionProperties = &azureFirewallNatRuleCollectionProperties
4943			}
4944		case "name":
4945			if v != nil {
4946				var name string
4947				err = json.Unmarshal(*v, &name)
4948				if err != nil {
4949					return err
4950				}
4951				afnrc.Name = &name
4952			}
4953		case "etag":
4954			if v != nil {
4955				var etag string
4956				err = json.Unmarshal(*v, &etag)
4957				if err != nil {
4958					return err
4959				}
4960				afnrc.Etag = &etag
4961			}
4962		case "id":
4963			if v != nil {
4964				var ID string
4965				err = json.Unmarshal(*v, &ID)
4966				if err != nil {
4967					return err
4968				}
4969				afnrc.ID = &ID
4970			}
4971		}
4972	}
4973
4974	return nil
4975}
4976
4977// AzureFirewallNatRuleCollectionProperties properties of the NAT rule collection.
4978type AzureFirewallNatRuleCollectionProperties struct {
4979	// Priority - Priority of the NAT rule collection resource.
4980	Priority *int32 `json:"priority,omitempty"`
4981	// Action - The action type of a NAT rule collection.
4982	Action *AzureFirewallNatRCAction `json:"action,omitempty"`
4983	// Rules - Collection of rules used by a NAT rule collection.
4984	Rules *[]AzureFirewallNatRule `json:"rules,omitempty"`
4985	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
4986	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
4987}
4988
4989// AzureFirewallNetworkRule properties of the network rule.
4990type AzureFirewallNetworkRule struct {
4991	// Name - Name of the network rule.
4992	Name *string `json:"name,omitempty"`
4993	// Description - Description of the rule.
4994	Description *string `json:"description,omitempty"`
4995	// Protocols - Array of AzureFirewallNetworkRuleProtocols.
4996	Protocols *[]AzureFirewallNetworkRuleProtocol `json:"protocols,omitempty"`
4997	// SourceAddresses - List of source IP addresses for this rule.
4998	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
4999	// DestinationAddresses - List of destination IP addresses.
5000	DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
5001	// DestinationPorts - List of destination ports.
5002	DestinationPorts *[]string `json:"destinationPorts,omitempty"`
5003}
5004
5005// AzureFirewallNetworkRuleCollection network rule collection resource.
5006type AzureFirewallNetworkRuleCollection struct {
5007	// AzureFirewallNetworkRuleCollectionPropertiesFormat - Properties of the azure firewall network rule collection.
5008	*AzureFirewallNetworkRuleCollectionPropertiesFormat `json:"properties,omitempty"`
5009	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
5010	Name *string `json:"name,omitempty"`
5011	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
5012	Etag *string `json:"etag,omitempty"`
5013	// ID - Resource ID.
5014	ID *string `json:"id,omitempty"`
5015}
5016
5017// MarshalJSON is the custom marshaler for AzureFirewallNetworkRuleCollection.
5018func (afnrc AzureFirewallNetworkRuleCollection) MarshalJSON() ([]byte, error) {
5019	objectMap := make(map[string]interface{})
5020	if afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat != nil {
5021		objectMap["properties"] = afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat
5022	}
5023	if afnrc.Name != nil {
5024		objectMap["name"] = afnrc.Name
5025	}
5026	if afnrc.ID != nil {
5027		objectMap["id"] = afnrc.ID
5028	}
5029	return json.Marshal(objectMap)
5030}
5031
5032// UnmarshalJSON is the custom unmarshaler for AzureFirewallNetworkRuleCollection struct.
5033func (afnrc *AzureFirewallNetworkRuleCollection) UnmarshalJSON(body []byte) error {
5034	var m map[string]*json.RawMessage
5035	err := json.Unmarshal(body, &m)
5036	if err != nil {
5037		return err
5038	}
5039	for k, v := range m {
5040		switch k {
5041		case "properties":
5042			if v != nil {
5043				var azureFirewallNetworkRuleCollectionPropertiesFormat AzureFirewallNetworkRuleCollectionPropertiesFormat
5044				err = json.Unmarshal(*v, &azureFirewallNetworkRuleCollectionPropertiesFormat)
5045				if err != nil {
5046					return err
5047				}
5048				afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat = &azureFirewallNetworkRuleCollectionPropertiesFormat
5049			}
5050		case "name":
5051			if v != nil {
5052				var name string
5053				err = json.Unmarshal(*v, &name)
5054				if err != nil {
5055					return err
5056				}
5057				afnrc.Name = &name
5058			}
5059		case "etag":
5060			if v != nil {
5061				var etag string
5062				err = json.Unmarshal(*v, &etag)
5063				if err != nil {
5064					return err
5065				}
5066				afnrc.Etag = &etag
5067			}
5068		case "id":
5069			if v != nil {
5070				var ID string
5071				err = json.Unmarshal(*v, &ID)
5072				if err != nil {
5073					return err
5074				}
5075				afnrc.ID = &ID
5076			}
5077		}
5078	}
5079
5080	return nil
5081}
5082
5083// AzureFirewallNetworkRuleCollectionPropertiesFormat properties of the network rule collection.
5084type AzureFirewallNetworkRuleCollectionPropertiesFormat struct {
5085	// Priority - Priority of the network rule collection resource.
5086	Priority *int32 `json:"priority,omitempty"`
5087	// Action - The action type of a rule collection.
5088	Action *AzureFirewallRCAction `json:"action,omitempty"`
5089	// Rules - Collection of rules used by a network rule collection.
5090	Rules *[]AzureFirewallNetworkRule `json:"rules,omitempty"`
5091	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
5092	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
5093}
5094
5095// AzureFirewallPropertiesFormat properties of the Azure Firewall.
5096type AzureFirewallPropertiesFormat struct {
5097	// ApplicationRuleCollections - Collection of application rule collections used by Azure Firewall.
5098	ApplicationRuleCollections *[]AzureFirewallApplicationRuleCollection `json:"applicationRuleCollections,omitempty"`
5099	// NatRuleCollections - Collection of NAT rule collections used by Azure Firewall.
5100	NatRuleCollections *[]AzureFirewallNatRuleCollection `json:"natRuleCollections,omitempty"`
5101	// NetworkRuleCollections - Collection of network rule collections used by Azure Firewall.
5102	NetworkRuleCollections *[]AzureFirewallNetworkRuleCollection `json:"networkRuleCollections,omitempty"`
5103	// IPConfigurations - IP configuration of the Azure Firewall resource.
5104	IPConfigurations *[]AzureFirewallIPConfiguration `json:"ipConfigurations,omitempty"`
5105	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
5106	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
5107	// ThreatIntelMode - The operation mode for Threat Intelligence. Possible values include: 'AzureFirewallThreatIntelModeAlert', 'AzureFirewallThreatIntelModeDeny', 'AzureFirewallThreatIntelModeOff'
5108	ThreatIntelMode AzureFirewallThreatIntelMode `json:"threatIntelMode,omitempty"`
5109	// VirtualHub - The virtualHub to which the firewall belongs.
5110	VirtualHub *SubResource `json:"virtualHub,omitempty"`
5111	// FirewallPolicy - The firewallPolicy associated with this azure firewall.
5112	FirewallPolicy *SubResource `json:"firewallPolicy,omitempty"`
5113	// HubIPAddresses - READ-ONLY; IP addresses associated with AzureFirewall.
5114	HubIPAddresses *HubIPAddresses `json:"hubIpAddresses,omitempty"`
5115}
5116
5117// MarshalJSON is the custom marshaler for AzureFirewallPropertiesFormat.
5118func (afpf AzureFirewallPropertiesFormat) MarshalJSON() ([]byte, error) {
5119	objectMap := make(map[string]interface{})
5120	if afpf.ApplicationRuleCollections != nil {
5121		objectMap["applicationRuleCollections"] = afpf.ApplicationRuleCollections
5122	}
5123	if afpf.NatRuleCollections != nil {
5124		objectMap["natRuleCollections"] = afpf.NatRuleCollections
5125	}
5126	if afpf.NetworkRuleCollections != nil {
5127		objectMap["networkRuleCollections"] = afpf.NetworkRuleCollections
5128	}
5129	if afpf.IPConfigurations != nil {
5130		objectMap["ipConfigurations"] = afpf.IPConfigurations
5131	}
5132	if afpf.ProvisioningState != "" {
5133		objectMap["provisioningState"] = afpf.ProvisioningState
5134	}
5135	if afpf.ThreatIntelMode != "" {
5136		objectMap["threatIntelMode"] = afpf.ThreatIntelMode
5137	}
5138	if afpf.VirtualHub != nil {
5139		objectMap["virtualHub"] = afpf.VirtualHub
5140	}
5141	if afpf.FirewallPolicy != nil {
5142		objectMap["firewallPolicy"] = afpf.FirewallPolicy
5143	}
5144	return json.Marshal(objectMap)
5145}
5146
5147// AzureFirewallPublicIPAddress public IP Address associated with azure firewall.
5148type AzureFirewallPublicIPAddress struct {
5149	// Address - Public IP Address value.
5150	Address *string `json:"address,omitempty"`
5151}
5152
5153// AzureFirewallRCAction properties of the AzureFirewallRCAction.
5154type AzureFirewallRCAction struct {
5155	// Type - The type of action. Possible values include: 'AzureFirewallRCActionTypeAllow', 'AzureFirewallRCActionTypeDeny'
5156	Type AzureFirewallRCActionType `json:"type,omitempty"`
5157}
5158
5159// AzureFirewallsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
5160// long-running operation.
5161type AzureFirewallsCreateOrUpdateFuture struct {
5162	azure.FutureAPI
5163	// Result returns the result of the asynchronous operation.
5164	// If the operation has not completed it will return an error.
5165	Result func(AzureFirewallsClient) (AzureFirewall, error)
5166}
5167
5168// AzureFirewallsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
5169// operation.
5170type AzureFirewallsDeleteFuture struct {
5171	azure.FutureAPI
5172	// Result returns the result of the asynchronous operation.
5173	// If the operation has not completed it will return an error.
5174	Result func(AzureFirewallsClient) (autorest.Response, error)
5175}
5176
5177// AzureReachabilityReport azure reachability report details.
5178type AzureReachabilityReport struct {
5179	autorest.Response `json:"-"`
5180	// AggregationLevel - The aggregation level of Azure reachability report. Can be Country, State or City.
5181	AggregationLevel *string `json:"aggregationLevel,omitempty"`
5182	// ProviderLocation - Parameters that define a geographic location.
5183	ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"`
5184	// ReachabilityReport - List of Azure reachability report items.
5185	ReachabilityReport *[]AzureReachabilityReportItem `json:"reachabilityReport,omitempty"`
5186}
5187
5188// AzureReachabilityReportItem azure reachability report details for a given provider location.
5189type AzureReachabilityReportItem struct {
5190	// Provider - The Internet service provider.
5191	Provider *string `json:"provider,omitempty"`
5192	// AzureLocation - The Azure region.
5193	AzureLocation *string `json:"azureLocation,omitempty"`
5194	// Latencies - List of latency details for each of the time series.
5195	Latencies *[]AzureReachabilityReportLatencyInfo `json:"latencies,omitempty"`
5196}
5197
5198// AzureReachabilityReportLatencyInfo details on latency for a time series.
5199type AzureReachabilityReportLatencyInfo struct {
5200	// TimeStamp - The time stamp.
5201	TimeStamp *date.Time `json:"timeStamp,omitempty"`
5202	// Score - The relative latency score between 1 and 100, higher values indicating a faster connection.
5203	Score *int32 `json:"score,omitempty"`
5204}
5205
5206// AzureReachabilityReportLocation parameters that define a geographic location.
5207type AzureReachabilityReportLocation struct {
5208	// Country - The name of the country.
5209	Country *string `json:"country,omitempty"`
5210	// State - The name of the state.
5211	State *string `json:"state,omitempty"`
5212	// City - The name of the city or town.
5213	City *string `json:"city,omitempty"`
5214}
5215
5216// AzureReachabilityReportParameters geographic and time constraints for Azure reachability report.
5217type AzureReachabilityReportParameters struct {
5218	// ProviderLocation - Parameters that define a geographic location.
5219	ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"`
5220	// Providers - List of Internet service providers.
5221	Providers *[]string `json:"providers,omitempty"`
5222	// AzureLocations - Optional Azure regions to scope the query to.
5223	AzureLocations *[]string `json:"azureLocations,omitempty"`
5224	// StartTime - The start time for the Azure reachability report.
5225	StartTime *date.Time `json:"startTime,omitempty"`
5226	// EndTime - The end time for the Azure reachability report.
5227	EndTime *date.Time `json:"endTime,omitempty"`
5228}
5229
5230// BackendAddressPool pool of backend IP addresses.
5231type BackendAddressPool struct {
5232	autorest.Response `json:"-"`
5233	// BackendAddressPoolPropertiesFormat - Properties of load balancer backend address pool.
5234	*BackendAddressPoolPropertiesFormat `json:"properties,omitempty"`
5235	// Name - Gets name of the resource that is unique within the set of backend address pools used by the load balancer. This name can be used to access the resource.
5236	Name *string `json:"name,omitempty"`
5237	// Etag - A unique read-only string that changes whenever the resource is updated.
5238	Etag *string `json:"etag,omitempty"`
5239	// Type - READ-ONLY; Type of the resource.
5240	Type *string `json:"type,omitempty"`
5241	// ID - Resource ID.
5242	ID *string `json:"id,omitempty"`
5243}
5244
5245// MarshalJSON is the custom marshaler for BackendAddressPool.
5246func (bap BackendAddressPool) MarshalJSON() ([]byte, error) {
5247	objectMap := make(map[string]interface{})
5248	if bap.BackendAddressPoolPropertiesFormat != nil {
5249		objectMap["properties"] = bap.BackendAddressPoolPropertiesFormat
5250	}
5251	if bap.Name != nil {
5252		objectMap["name"] = bap.Name
5253	}
5254	if bap.Etag != nil {
5255		objectMap["etag"] = bap.Etag
5256	}
5257	if bap.ID != nil {
5258		objectMap["id"] = bap.ID
5259	}
5260	return json.Marshal(objectMap)
5261}
5262
5263// UnmarshalJSON is the custom unmarshaler for BackendAddressPool struct.
5264func (bap *BackendAddressPool) UnmarshalJSON(body []byte) error {
5265	var m map[string]*json.RawMessage
5266	err := json.Unmarshal(body, &m)
5267	if err != nil {
5268		return err
5269	}
5270	for k, v := range m {
5271		switch k {
5272		case "properties":
5273			if v != nil {
5274				var backendAddressPoolPropertiesFormat BackendAddressPoolPropertiesFormat
5275				err = json.Unmarshal(*v, &backendAddressPoolPropertiesFormat)
5276				if err != nil {
5277					return err
5278				}
5279				bap.BackendAddressPoolPropertiesFormat = &backendAddressPoolPropertiesFormat
5280			}
5281		case "name":
5282			if v != nil {
5283				var name string
5284				err = json.Unmarshal(*v, &name)
5285				if err != nil {
5286					return err
5287				}
5288				bap.Name = &name
5289			}
5290		case "etag":
5291			if v != nil {
5292				var etag string
5293				err = json.Unmarshal(*v, &etag)
5294				if err != nil {
5295					return err
5296				}
5297				bap.Etag = &etag
5298			}
5299		case "type":
5300			if v != nil {
5301				var typeVar string
5302				err = json.Unmarshal(*v, &typeVar)
5303				if err != nil {
5304					return err
5305				}
5306				bap.Type = &typeVar
5307			}
5308		case "id":
5309			if v != nil {
5310				var ID string
5311				err = json.Unmarshal(*v, &ID)
5312				if err != nil {
5313					return err
5314				}
5315				bap.ID = &ID
5316			}
5317		}
5318	}
5319
5320	return nil
5321}
5322
5323// BackendAddressPoolPropertiesFormat properties of the backend address pool.
5324type BackendAddressPoolPropertiesFormat struct {
5325	// BackendIPConfigurations - READ-ONLY; Gets collection of references to IP addresses defined in network interfaces.
5326	BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"`
5327	// LoadBalancingRules - READ-ONLY; Gets load balancing rules that use this backend address pool.
5328	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
5329	// OutboundRule - READ-ONLY; Gets outbound rules that use this backend address pool.
5330	OutboundRule *SubResource `json:"outboundRule,omitempty"`
5331	// OutboundRules - READ-ONLY; Gets outbound rules that use this backend address pool.
5332	OutboundRules *[]SubResource `json:"outboundRules,omitempty"`
5333	// ProvisioningState - Get provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
5334	ProvisioningState *string `json:"provisioningState,omitempty"`
5335}
5336
5337// MarshalJSON is the custom marshaler for BackendAddressPoolPropertiesFormat.
5338func (bappf BackendAddressPoolPropertiesFormat) MarshalJSON() ([]byte, error) {
5339	objectMap := make(map[string]interface{})
5340	if bappf.ProvisioningState != nil {
5341		objectMap["provisioningState"] = bappf.ProvisioningState
5342	}
5343	return json.Marshal(objectMap)
5344}
5345
5346// BastionHost bastion Host resource.
5347type BastionHost struct {
5348	autorest.Response `json:"-"`
5349	// BastionHostPropertiesFormat - Represents the bastion host resource.
5350	*BastionHostPropertiesFormat `json:"properties,omitempty"`
5351	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
5352	Etag *string `json:"etag,omitempty"`
5353	// ID - Resource ID.
5354	ID *string `json:"id,omitempty"`
5355	// Name - READ-ONLY; Resource name.
5356	Name *string `json:"name,omitempty"`
5357	// Type - READ-ONLY; Resource type.
5358	Type *string `json:"type,omitempty"`
5359	// Location - Resource location.
5360	Location *string `json:"location,omitempty"`
5361	// Tags - Resource tags.
5362	Tags map[string]*string `json:"tags"`
5363}
5364
5365// MarshalJSON is the custom marshaler for BastionHost.
5366func (bh BastionHost) MarshalJSON() ([]byte, error) {
5367	objectMap := make(map[string]interface{})
5368	if bh.BastionHostPropertiesFormat != nil {
5369		objectMap["properties"] = bh.BastionHostPropertiesFormat
5370	}
5371	if bh.ID != nil {
5372		objectMap["id"] = bh.ID
5373	}
5374	if bh.Location != nil {
5375		objectMap["location"] = bh.Location
5376	}
5377	if bh.Tags != nil {
5378		objectMap["tags"] = bh.Tags
5379	}
5380	return json.Marshal(objectMap)
5381}
5382
5383// UnmarshalJSON is the custom unmarshaler for BastionHost struct.
5384func (bh *BastionHost) UnmarshalJSON(body []byte) error {
5385	var m map[string]*json.RawMessage
5386	err := json.Unmarshal(body, &m)
5387	if err != nil {
5388		return err
5389	}
5390	for k, v := range m {
5391		switch k {
5392		case "properties":
5393			if v != nil {
5394				var bastionHostPropertiesFormat BastionHostPropertiesFormat
5395				err = json.Unmarshal(*v, &bastionHostPropertiesFormat)
5396				if err != nil {
5397					return err
5398				}
5399				bh.BastionHostPropertiesFormat = &bastionHostPropertiesFormat
5400			}
5401		case "etag":
5402			if v != nil {
5403				var etag string
5404				err = json.Unmarshal(*v, &etag)
5405				if err != nil {
5406					return err
5407				}
5408				bh.Etag = &etag
5409			}
5410		case "id":
5411			if v != nil {
5412				var ID string
5413				err = json.Unmarshal(*v, &ID)
5414				if err != nil {
5415					return err
5416				}
5417				bh.ID = &ID
5418			}
5419		case "name":
5420			if v != nil {
5421				var name string
5422				err = json.Unmarshal(*v, &name)
5423				if err != nil {
5424					return err
5425				}
5426				bh.Name = &name
5427			}
5428		case "type":
5429			if v != nil {
5430				var typeVar string
5431				err = json.Unmarshal(*v, &typeVar)
5432				if err != nil {
5433					return err
5434				}
5435				bh.Type = &typeVar
5436			}
5437		case "location":
5438			if v != nil {
5439				var location string
5440				err = json.Unmarshal(*v, &location)
5441				if err != nil {
5442					return err
5443				}
5444				bh.Location = &location
5445			}
5446		case "tags":
5447			if v != nil {
5448				var tags map[string]*string
5449				err = json.Unmarshal(*v, &tags)
5450				if err != nil {
5451					return err
5452				}
5453				bh.Tags = tags
5454			}
5455		}
5456	}
5457
5458	return nil
5459}
5460
5461// BastionHostIPConfiguration IP configuration of an Bastion Host.
5462type BastionHostIPConfiguration struct {
5463	// BastionHostIPConfigurationPropertiesFormat - Represents the ip configuration associated with the resource.
5464	*BastionHostIPConfigurationPropertiesFormat `json:"properties,omitempty"`
5465	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
5466	Name *string `json:"name,omitempty"`
5467	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
5468	Etag *string `json:"etag,omitempty"`
5469	// Type - READ-ONLY; Ip configuration type.
5470	Type *string `json:"type,omitempty"`
5471	// ID - Resource ID.
5472	ID *string `json:"id,omitempty"`
5473}
5474
5475// MarshalJSON is the custom marshaler for BastionHostIPConfiguration.
5476func (bhic BastionHostIPConfiguration) MarshalJSON() ([]byte, error) {
5477	objectMap := make(map[string]interface{})
5478	if bhic.BastionHostIPConfigurationPropertiesFormat != nil {
5479		objectMap["properties"] = bhic.BastionHostIPConfigurationPropertiesFormat
5480	}
5481	if bhic.Name != nil {
5482		objectMap["name"] = bhic.Name
5483	}
5484	if bhic.ID != nil {
5485		objectMap["id"] = bhic.ID
5486	}
5487	return json.Marshal(objectMap)
5488}
5489
5490// UnmarshalJSON is the custom unmarshaler for BastionHostIPConfiguration struct.
5491func (bhic *BastionHostIPConfiguration) UnmarshalJSON(body []byte) error {
5492	var m map[string]*json.RawMessage
5493	err := json.Unmarshal(body, &m)
5494	if err != nil {
5495		return err
5496	}
5497	for k, v := range m {
5498		switch k {
5499		case "properties":
5500			if v != nil {
5501				var bastionHostIPConfigurationPropertiesFormat BastionHostIPConfigurationPropertiesFormat
5502				err = json.Unmarshal(*v, &bastionHostIPConfigurationPropertiesFormat)
5503				if err != nil {
5504					return err
5505				}
5506				bhic.BastionHostIPConfigurationPropertiesFormat = &bastionHostIPConfigurationPropertiesFormat
5507			}
5508		case "name":
5509			if v != nil {
5510				var name string
5511				err = json.Unmarshal(*v, &name)
5512				if err != nil {
5513					return err
5514				}
5515				bhic.Name = &name
5516			}
5517		case "etag":
5518			if v != nil {
5519				var etag string
5520				err = json.Unmarshal(*v, &etag)
5521				if err != nil {
5522					return err
5523				}
5524				bhic.Etag = &etag
5525			}
5526		case "type":
5527			if v != nil {
5528				var typeVar string
5529				err = json.Unmarshal(*v, &typeVar)
5530				if err != nil {
5531					return err
5532				}
5533				bhic.Type = &typeVar
5534			}
5535		case "id":
5536			if v != nil {
5537				var ID string
5538				err = json.Unmarshal(*v, &ID)
5539				if err != nil {
5540					return err
5541				}
5542				bhic.ID = &ID
5543			}
5544		}
5545	}
5546
5547	return nil
5548}
5549
5550// BastionHostIPConfigurationPropertiesFormat properties of IP configuration of an Bastion Host.
5551type BastionHostIPConfigurationPropertiesFormat struct {
5552	// Subnet - Reference of the subnet resource.
5553	Subnet *SubResource `json:"subnet,omitempty"`
5554	// PublicIPAddress - Reference of the PublicIP resource.
5555	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
5556	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
5557	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
5558	// PrivateIPAllocationMethod - Private IP allocation method. Possible values include: 'Static', 'Dynamic'
5559	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
5560}
5561
5562// BastionHostListResult response for ListBastionHosts API service call.
5563type BastionHostListResult struct {
5564	autorest.Response `json:"-"`
5565	// Value - List of Bastion Hosts in a resource group.
5566	Value *[]BastionHost `json:"value,omitempty"`
5567	// NextLink - URL to get the next set of results.
5568	NextLink *string `json:"nextLink,omitempty"`
5569}
5570
5571// BastionHostListResultIterator provides access to a complete listing of BastionHost values.
5572type BastionHostListResultIterator struct {
5573	i    int
5574	page BastionHostListResultPage
5575}
5576
5577// NextWithContext advances to the next value.  If there was an error making
5578// the request the iterator does not advance and the error is returned.
5579func (iter *BastionHostListResultIterator) NextWithContext(ctx context.Context) (err error) {
5580	if tracing.IsEnabled() {
5581		ctx = tracing.StartSpan(ctx, fqdn+"/BastionHostListResultIterator.NextWithContext")
5582		defer func() {
5583			sc := -1
5584			if iter.Response().Response.Response != nil {
5585				sc = iter.Response().Response.Response.StatusCode
5586			}
5587			tracing.EndSpan(ctx, sc, err)
5588		}()
5589	}
5590	iter.i++
5591	if iter.i < len(iter.page.Values()) {
5592		return nil
5593	}
5594	err = iter.page.NextWithContext(ctx)
5595	if err != nil {
5596		iter.i--
5597		return err
5598	}
5599	iter.i = 0
5600	return nil
5601}
5602
5603// Next advances to the next value.  If there was an error making
5604// the request the iterator does not advance and the error is returned.
5605// Deprecated: Use NextWithContext() instead.
5606func (iter *BastionHostListResultIterator) Next() error {
5607	return iter.NextWithContext(context.Background())
5608}
5609
5610// NotDone returns true if the enumeration should be started or is not yet complete.
5611func (iter BastionHostListResultIterator) NotDone() bool {
5612	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5613}
5614
5615// Response returns the raw server response from the last page request.
5616func (iter BastionHostListResultIterator) Response() BastionHostListResult {
5617	return iter.page.Response()
5618}
5619
5620// Value returns the current value or a zero-initialized value if the
5621// iterator has advanced beyond the end of the collection.
5622func (iter BastionHostListResultIterator) Value() BastionHost {
5623	if !iter.page.NotDone() {
5624		return BastionHost{}
5625	}
5626	return iter.page.Values()[iter.i]
5627}
5628
5629// Creates a new instance of the BastionHostListResultIterator type.
5630func NewBastionHostListResultIterator(page BastionHostListResultPage) BastionHostListResultIterator {
5631	return BastionHostListResultIterator{page: page}
5632}
5633
5634// IsEmpty returns true if the ListResult contains no values.
5635func (bhlr BastionHostListResult) IsEmpty() bool {
5636	return bhlr.Value == nil || len(*bhlr.Value) == 0
5637}
5638
5639// hasNextLink returns true if the NextLink is not empty.
5640func (bhlr BastionHostListResult) hasNextLink() bool {
5641	return bhlr.NextLink != nil && len(*bhlr.NextLink) != 0
5642}
5643
5644// bastionHostListResultPreparer prepares a request to retrieve the next set of results.
5645// It returns nil if no more results exist.
5646func (bhlr BastionHostListResult) bastionHostListResultPreparer(ctx context.Context) (*http.Request, error) {
5647	if !bhlr.hasNextLink() {
5648		return nil, nil
5649	}
5650	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5651		autorest.AsJSON(),
5652		autorest.AsGet(),
5653		autorest.WithBaseURL(to.String(bhlr.NextLink)))
5654}
5655
5656// BastionHostListResultPage contains a page of BastionHost values.
5657type BastionHostListResultPage struct {
5658	fn   func(context.Context, BastionHostListResult) (BastionHostListResult, error)
5659	bhlr BastionHostListResult
5660}
5661
5662// NextWithContext advances to the next page of values.  If there was an error making
5663// the request the page does not advance and the error is returned.
5664func (page *BastionHostListResultPage) NextWithContext(ctx context.Context) (err error) {
5665	if tracing.IsEnabled() {
5666		ctx = tracing.StartSpan(ctx, fqdn+"/BastionHostListResultPage.NextWithContext")
5667		defer func() {
5668			sc := -1
5669			if page.Response().Response.Response != nil {
5670				sc = page.Response().Response.Response.StatusCode
5671			}
5672			tracing.EndSpan(ctx, sc, err)
5673		}()
5674	}
5675	for {
5676		next, err := page.fn(ctx, page.bhlr)
5677		if err != nil {
5678			return err
5679		}
5680		page.bhlr = next
5681		if !next.hasNextLink() || !next.IsEmpty() {
5682			break
5683		}
5684	}
5685	return nil
5686}
5687
5688// Next advances to the next page of values.  If there was an error making
5689// the request the page does not advance and the error is returned.
5690// Deprecated: Use NextWithContext() instead.
5691func (page *BastionHostListResultPage) Next() error {
5692	return page.NextWithContext(context.Background())
5693}
5694
5695// NotDone returns true if the page enumeration should be started or is not yet complete.
5696func (page BastionHostListResultPage) NotDone() bool {
5697	return !page.bhlr.IsEmpty()
5698}
5699
5700// Response returns the raw server response from the last page request.
5701func (page BastionHostListResultPage) Response() BastionHostListResult {
5702	return page.bhlr
5703}
5704
5705// Values returns the slice of values for the current page or nil if there are no values.
5706func (page BastionHostListResultPage) Values() []BastionHost {
5707	if page.bhlr.IsEmpty() {
5708		return nil
5709	}
5710	return *page.bhlr.Value
5711}
5712
5713// Creates a new instance of the BastionHostListResultPage type.
5714func NewBastionHostListResultPage(cur BastionHostListResult, getNextPage func(context.Context, BastionHostListResult) (BastionHostListResult, error)) BastionHostListResultPage {
5715	return BastionHostListResultPage{
5716		fn:   getNextPage,
5717		bhlr: cur,
5718	}
5719}
5720
5721// BastionHostPropertiesFormat properties of the Bastion Host.
5722type BastionHostPropertiesFormat struct {
5723	// IPConfigurations - IP configuration of the Bastion Host resource.
5724	IPConfigurations *[]BastionHostIPConfiguration `json:"ipConfigurations,omitempty"`
5725	// DNSName - FQDN for the endpoint on which bastion host is accessible.
5726	DNSName *string `json:"dnsName,omitempty"`
5727	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
5728	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
5729}
5730
5731// BastionHostsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
5732// long-running operation.
5733type BastionHostsCreateOrUpdateFuture struct {
5734	azure.FutureAPI
5735	// Result returns the result of the asynchronous operation.
5736	// If the operation has not completed it will return an error.
5737	Result func(BastionHostsClient) (BastionHost, error)
5738}
5739
5740// BastionHostsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
5741// operation.
5742type BastionHostsDeleteFuture struct {
5743	azure.FutureAPI
5744	// Result returns the result of the asynchronous operation.
5745	// If the operation has not completed it will return an error.
5746	Result func(BastionHostsClient) (autorest.Response, error)
5747}
5748
5749// BastionHostsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
5750// operation.
5751type BastionHostsUpdateTagsFuture struct {
5752	azure.FutureAPI
5753	// Result returns the result of the asynchronous operation.
5754	// If the operation has not completed it will return an error.
5755	Result func(BastionHostsClient) (BastionHost, error)
5756}
5757
5758// BGPCommunity contains bgp community information offered in Service Community resources.
5759type BGPCommunity struct {
5760	// ServiceSupportedRegion - The region which the service support. e.g. For O365, region is Global.
5761	ServiceSupportedRegion *string `json:"serviceSupportedRegion,omitempty"`
5762	// CommunityName - The name of the bgp community. e.g. Skype.
5763	CommunityName *string `json:"communityName,omitempty"`
5764	// CommunityValue - The value of the bgp community. For more information: https://docs.microsoft.com/en-us/azure/expressroute/expressroute-routing.
5765	CommunityValue *string `json:"communityValue,omitempty"`
5766	// CommunityPrefixes - The prefixes that the bgp community contains.
5767	CommunityPrefixes *[]string `json:"communityPrefixes,omitempty"`
5768	// IsAuthorizedToUse - Customer is authorized to use bgp community or not.
5769	IsAuthorizedToUse *bool `json:"isAuthorizedToUse,omitempty"`
5770	// ServiceGroup - The service group of the bgp community contains.
5771	ServiceGroup *string `json:"serviceGroup,omitempty"`
5772}
5773
5774// BgpPeerStatus BGP peer status details.
5775type BgpPeerStatus struct {
5776	// LocalAddress - READ-ONLY; The virtual network gateway's local address.
5777	LocalAddress *string `json:"localAddress,omitempty"`
5778	// Neighbor - READ-ONLY; The remote BGP peer.
5779	Neighbor *string `json:"neighbor,omitempty"`
5780	// Asn - READ-ONLY; The autonomous system number of the remote BGP peer.
5781	Asn *int32 `json:"asn,omitempty"`
5782	// State - READ-ONLY; The BGP peer state. Possible values include: 'BgpPeerStateUnknown', 'BgpPeerStateStopped', 'BgpPeerStateIdle', 'BgpPeerStateConnecting', 'BgpPeerStateConnected'
5783	State BgpPeerState `json:"state,omitempty"`
5784	// ConnectedDuration - READ-ONLY; For how long the peering has been up.
5785	ConnectedDuration *string `json:"connectedDuration,omitempty"`
5786	// RoutesReceived - READ-ONLY; The number of routes learned from this peer.
5787	RoutesReceived *int64 `json:"routesReceived,omitempty"`
5788	// MessagesSent - READ-ONLY; The number of BGP messages sent.
5789	MessagesSent *int64 `json:"messagesSent,omitempty"`
5790	// MessagesReceived - READ-ONLY; The number of BGP messages received.
5791	MessagesReceived *int64 `json:"messagesReceived,omitempty"`
5792}
5793
5794// BgpPeerStatusListResult response for list BGP peer status API service call.
5795type BgpPeerStatusListResult struct {
5796	autorest.Response `json:"-"`
5797	// Value - List of BGP peers.
5798	Value *[]BgpPeerStatus `json:"value,omitempty"`
5799}
5800
5801// BgpServiceCommunity service Community Properties.
5802type BgpServiceCommunity struct {
5803	// BgpServiceCommunityPropertiesFormat - Properties of the BGP service community.
5804	*BgpServiceCommunityPropertiesFormat `json:"properties,omitempty"`
5805	// ID - Resource ID.
5806	ID *string `json:"id,omitempty"`
5807	// Name - READ-ONLY; Resource name.
5808	Name *string `json:"name,omitempty"`
5809	// Type - READ-ONLY; Resource type.
5810	Type *string `json:"type,omitempty"`
5811	// Location - Resource location.
5812	Location *string `json:"location,omitempty"`
5813	// Tags - Resource tags.
5814	Tags map[string]*string `json:"tags"`
5815}
5816
5817// MarshalJSON is the custom marshaler for BgpServiceCommunity.
5818func (bsc BgpServiceCommunity) MarshalJSON() ([]byte, error) {
5819	objectMap := make(map[string]interface{})
5820	if bsc.BgpServiceCommunityPropertiesFormat != nil {
5821		objectMap["properties"] = bsc.BgpServiceCommunityPropertiesFormat
5822	}
5823	if bsc.ID != nil {
5824		objectMap["id"] = bsc.ID
5825	}
5826	if bsc.Location != nil {
5827		objectMap["location"] = bsc.Location
5828	}
5829	if bsc.Tags != nil {
5830		objectMap["tags"] = bsc.Tags
5831	}
5832	return json.Marshal(objectMap)
5833}
5834
5835// UnmarshalJSON is the custom unmarshaler for BgpServiceCommunity struct.
5836func (bsc *BgpServiceCommunity) UnmarshalJSON(body []byte) error {
5837	var m map[string]*json.RawMessage
5838	err := json.Unmarshal(body, &m)
5839	if err != nil {
5840		return err
5841	}
5842	for k, v := range m {
5843		switch k {
5844		case "properties":
5845			if v != nil {
5846				var bgpServiceCommunityPropertiesFormat BgpServiceCommunityPropertiesFormat
5847				err = json.Unmarshal(*v, &bgpServiceCommunityPropertiesFormat)
5848				if err != nil {
5849					return err
5850				}
5851				bsc.BgpServiceCommunityPropertiesFormat = &bgpServiceCommunityPropertiesFormat
5852			}
5853		case "id":
5854			if v != nil {
5855				var ID string
5856				err = json.Unmarshal(*v, &ID)
5857				if err != nil {
5858					return err
5859				}
5860				bsc.ID = &ID
5861			}
5862		case "name":
5863			if v != nil {
5864				var name string
5865				err = json.Unmarshal(*v, &name)
5866				if err != nil {
5867					return err
5868				}
5869				bsc.Name = &name
5870			}
5871		case "type":
5872			if v != nil {
5873				var typeVar string
5874				err = json.Unmarshal(*v, &typeVar)
5875				if err != nil {
5876					return err
5877				}
5878				bsc.Type = &typeVar
5879			}
5880		case "location":
5881			if v != nil {
5882				var location string
5883				err = json.Unmarshal(*v, &location)
5884				if err != nil {
5885					return err
5886				}
5887				bsc.Location = &location
5888			}
5889		case "tags":
5890			if v != nil {
5891				var tags map[string]*string
5892				err = json.Unmarshal(*v, &tags)
5893				if err != nil {
5894					return err
5895				}
5896				bsc.Tags = tags
5897			}
5898		}
5899	}
5900
5901	return nil
5902}
5903
5904// BgpServiceCommunityListResult response for the ListServiceCommunity API service call.
5905type BgpServiceCommunityListResult struct {
5906	autorest.Response `json:"-"`
5907	// Value - A list of service community resources.
5908	Value *[]BgpServiceCommunity `json:"value,omitempty"`
5909	// NextLink - The URL to get the next set of results.
5910	NextLink *string `json:"nextLink,omitempty"`
5911}
5912
5913// BgpServiceCommunityListResultIterator provides access to a complete listing of BgpServiceCommunity
5914// values.
5915type BgpServiceCommunityListResultIterator struct {
5916	i    int
5917	page BgpServiceCommunityListResultPage
5918}
5919
5920// NextWithContext advances to the next value.  If there was an error making
5921// the request the iterator does not advance and the error is returned.
5922func (iter *BgpServiceCommunityListResultIterator) NextWithContext(ctx context.Context) (err error) {
5923	if tracing.IsEnabled() {
5924		ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultIterator.NextWithContext")
5925		defer func() {
5926			sc := -1
5927			if iter.Response().Response.Response != nil {
5928				sc = iter.Response().Response.Response.StatusCode
5929			}
5930			tracing.EndSpan(ctx, sc, err)
5931		}()
5932	}
5933	iter.i++
5934	if iter.i < len(iter.page.Values()) {
5935		return nil
5936	}
5937	err = iter.page.NextWithContext(ctx)
5938	if err != nil {
5939		iter.i--
5940		return err
5941	}
5942	iter.i = 0
5943	return nil
5944}
5945
5946// Next advances to the next value.  If there was an error making
5947// the request the iterator does not advance and the error is returned.
5948// Deprecated: Use NextWithContext() instead.
5949func (iter *BgpServiceCommunityListResultIterator) Next() error {
5950	return iter.NextWithContext(context.Background())
5951}
5952
5953// NotDone returns true if the enumeration should be started or is not yet complete.
5954func (iter BgpServiceCommunityListResultIterator) NotDone() bool {
5955	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5956}
5957
5958// Response returns the raw server response from the last page request.
5959func (iter BgpServiceCommunityListResultIterator) Response() BgpServiceCommunityListResult {
5960	return iter.page.Response()
5961}
5962
5963// Value returns the current value or a zero-initialized value if the
5964// iterator has advanced beyond the end of the collection.
5965func (iter BgpServiceCommunityListResultIterator) Value() BgpServiceCommunity {
5966	if !iter.page.NotDone() {
5967		return BgpServiceCommunity{}
5968	}
5969	return iter.page.Values()[iter.i]
5970}
5971
5972// Creates a new instance of the BgpServiceCommunityListResultIterator type.
5973func NewBgpServiceCommunityListResultIterator(page BgpServiceCommunityListResultPage) BgpServiceCommunityListResultIterator {
5974	return BgpServiceCommunityListResultIterator{page: page}
5975}
5976
5977// IsEmpty returns true if the ListResult contains no values.
5978func (bsclr BgpServiceCommunityListResult) IsEmpty() bool {
5979	return bsclr.Value == nil || len(*bsclr.Value) == 0
5980}
5981
5982// hasNextLink returns true if the NextLink is not empty.
5983func (bsclr BgpServiceCommunityListResult) hasNextLink() bool {
5984	return bsclr.NextLink != nil && len(*bsclr.NextLink) != 0
5985}
5986
5987// bgpServiceCommunityListResultPreparer prepares a request to retrieve the next set of results.
5988// It returns nil if no more results exist.
5989func (bsclr BgpServiceCommunityListResult) bgpServiceCommunityListResultPreparer(ctx context.Context) (*http.Request, error) {
5990	if !bsclr.hasNextLink() {
5991		return nil, nil
5992	}
5993	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5994		autorest.AsJSON(),
5995		autorest.AsGet(),
5996		autorest.WithBaseURL(to.String(bsclr.NextLink)))
5997}
5998
5999// BgpServiceCommunityListResultPage contains a page of BgpServiceCommunity values.
6000type BgpServiceCommunityListResultPage struct {
6001	fn    func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)
6002	bsclr BgpServiceCommunityListResult
6003}
6004
6005// NextWithContext advances to the next page of values.  If there was an error making
6006// the request the page does not advance and the error is returned.
6007func (page *BgpServiceCommunityListResultPage) NextWithContext(ctx context.Context) (err error) {
6008	if tracing.IsEnabled() {
6009		ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultPage.NextWithContext")
6010		defer func() {
6011			sc := -1
6012			if page.Response().Response.Response != nil {
6013				sc = page.Response().Response.Response.StatusCode
6014			}
6015			tracing.EndSpan(ctx, sc, err)
6016		}()
6017	}
6018	for {
6019		next, err := page.fn(ctx, page.bsclr)
6020		if err != nil {
6021			return err
6022		}
6023		page.bsclr = next
6024		if !next.hasNextLink() || !next.IsEmpty() {
6025			break
6026		}
6027	}
6028	return nil
6029}
6030
6031// Next advances to the next page of values.  If there was an error making
6032// the request the page does not advance and the error is returned.
6033// Deprecated: Use NextWithContext() instead.
6034func (page *BgpServiceCommunityListResultPage) Next() error {
6035	return page.NextWithContext(context.Background())
6036}
6037
6038// NotDone returns true if the page enumeration should be started or is not yet complete.
6039func (page BgpServiceCommunityListResultPage) NotDone() bool {
6040	return !page.bsclr.IsEmpty()
6041}
6042
6043// Response returns the raw server response from the last page request.
6044func (page BgpServiceCommunityListResultPage) Response() BgpServiceCommunityListResult {
6045	return page.bsclr
6046}
6047
6048// Values returns the slice of values for the current page or nil if there are no values.
6049func (page BgpServiceCommunityListResultPage) Values() []BgpServiceCommunity {
6050	if page.bsclr.IsEmpty() {
6051		return nil
6052	}
6053	return *page.bsclr.Value
6054}
6055
6056// Creates a new instance of the BgpServiceCommunityListResultPage type.
6057func NewBgpServiceCommunityListResultPage(cur BgpServiceCommunityListResult, getNextPage func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)) BgpServiceCommunityListResultPage {
6058	return BgpServiceCommunityListResultPage{
6059		fn:    getNextPage,
6060		bsclr: cur,
6061	}
6062}
6063
6064// BgpServiceCommunityPropertiesFormat properties of Service Community.
6065type BgpServiceCommunityPropertiesFormat struct {
6066	// ServiceName - The name of the bgp community. e.g. Skype.
6067	ServiceName *string `json:"serviceName,omitempty"`
6068	// BgpCommunities - Get a list of bgp communities.
6069	BgpCommunities *[]BGPCommunity `json:"bgpCommunities,omitempty"`
6070}
6071
6072// BgpSettings BGP settings details.
6073type BgpSettings struct {
6074	// Asn - The BGP speaker's ASN.
6075	Asn *int64 `json:"asn,omitempty"`
6076	// BgpPeeringAddress - The BGP peering address and BGP identifier of this BGP speaker.
6077	BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"`
6078	// PeerWeight - The weight added to routes learned from this BGP speaker.
6079	PeerWeight *int32 `json:"peerWeight,omitempty"`
6080}
6081
6082// CheckPrivateLinkServiceVisibilityRequest request body of the CheckPrivateLinkServiceVisibility API
6083// service call.
6084type CheckPrivateLinkServiceVisibilityRequest struct {
6085	// PrivateLinkServiceAlias - The alias of the private link service.
6086	PrivateLinkServiceAlias *string `json:"privateLinkServiceAlias,omitempty"`
6087}
6088
6089// CloudError an error response from the Batch service.
6090type CloudError struct {
6091	// Error - Cloud error body.
6092	Error *CloudErrorBody `json:"error,omitempty"`
6093}
6094
6095// CloudErrorBody an error response from the Batch service.
6096type CloudErrorBody struct {
6097	// Code - An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
6098	Code *string `json:"code,omitempty"`
6099	// Message - A message describing the error, intended to be suitable for display in a user interface.
6100	Message *string `json:"message,omitempty"`
6101	// Target - The target of the particular error. For example, the name of the property in error.
6102	Target *string `json:"target,omitempty"`
6103	// Details - A list of additional details about the error.
6104	Details *[]CloudErrorBody `json:"details,omitempty"`
6105}
6106
6107// ConfigurationDiagnosticParameters parameters to get network configuration diagnostic.
6108type ConfigurationDiagnosticParameters struct {
6109	// TargetResourceID - The ID of the target resource to perform network configuration diagnostic. Valid options are VM, NetworkInterface, VMSS/NetworkInterface and Application Gateway.
6110	TargetResourceID *string `json:"targetResourceId,omitempty"`
6111	// VerbosityLevel - Verbosity level. Possible values include: 'Normal', 'Minimum', 'Full'
6112	VerbosityLevel VerbosityLevel `json:"verbosityLevel,omitempty"`
6113	// Profiles - List of network configuration diagnostic profiles.
6114	Profiles *[]ConfigurationDiagnosticProfile `json:"profiles,omitempty"`
6115}
6116
6117// ConfigurationDiagnosticProfile parameters to compare with network configuration.
6118type ConfigurationDiagnosticProfile struct {
6119	// Direction - The direction of the traffic. Possible values include: 'Inbound', 'Outbound'
6120	Direction Direction `json:"direction,omitempty"`
6121	// Protocol - Protocol to be verified on. Accepted values are '*', TCP, UDP.
6122	Protocol *string `json:"protocol,omitempty"`
6123	// Source - Traffic source. Accepted values are '*', IP Address/CIDR, Service Tag.
6124	Source *string `json:"source,omitempty"`
6125	// Destination - Traffic destination. Accepted values are: '*', IP Address/CIDR, Service Tag.
6126	Destination *string `json:"destination,omitempty"`
6127	// DestinationPort - Traffic destination port. Accepted values are '*', port (for example, 3389) and port range (for example, 80-100).
6128	DestinationPort *string `json:"destinationPort,omitempty"`
6129}
6130
6131// ConfigurationDiagnosticResponse results of network configuration diagnostic on the target resource.
6132type ConfigurationDiagnosticResponse struct {
6133	autorest.Response `json:"-"`
6134	// Results - READ-ONLY; List of network configuration diagnostic results.
6135	Results *[]ConfigurationDiagnosticResult `json:"results,omitempty"`
6136}
6137
6138// ConfigurationDiagnosticResult network configuration diagnostic result corresponded to provided traffic
6139// query.
6140type ConfigurationDiagnosticResult struct {
6141	// Profile - Network configuration diagnostic profile.
6142	Profile *ConfigurationDiagnosticProfile `json:"profile,omitempty"`
6143	// NetworkSecurityGroupResult - Network security group result.
6144	NetworkSecurityGroupResult *SecurityGroupResult `json:"networkSecurityGroupResult,omitempty"`
6145}
6146
6147// ConnectionMonitor parameters that define the operation to create a connection monitor.
6148type ConnectionMonitor struct {
6149	// Location - Connection monitor location.
6150	Location *string `json:"location,omitempty"`
6151	// Tags - Connection monitor tags.
6152	Tags map[string]*string `json:"tags"`
6153	// ConnectionMonitorParameters - Properties of the connection monitor.
6154	*ConnectionMonitorParameters `json:"properties,omitempty"`
6155}
6156
6157// MarshalJSON is the custom marshaler for ConnectionMonitor.
6158func (cm ConnectionMonitor) MarshalJSON() ([]byte, error) {
6159	objectMap := make(map[string]interface{})
6160	if cm.Location != nil {
6161		objectMap["location"] = cm.Location
6162	}
6163	if cm.Tags != nil {
6164		objectMap["tags"] = cm.Tags
6165	}
6166	if cm.ConnectionMonitorParameters != nil {
6167		objectMap["properties"] = cm.ConnectionMonitorParameters
6168	}
6169	return json.Marshal(objectMap)
6170}
6171
6172// UnmarshalJSON is the custom unmarshaler for ConnectionMonitor struct.
6173func (cm *ConnectionMonitor) UnmarshalJSON(body []byte) error {
6174	var m map[string]*json.RawMessage
6175	err := json.Unmarshal(body, &m)
6176	if err != nil {
6177		return err
6178	}
6179	for k, v := range m {
6180		switch k {
6181		case "location":
6182			if v != nil {
6183				var location string
6184				err = json.Unmarshal(*v, &location)
6185				if err != nil {
6186					return err
6187				}
6188				cm.Location = &location
6189			}
6190		case "tags":
6191			if v != nil {
6192				var tags map[string]*string
6193				err = json.Unmarshal(*v, &tags)
6194				if err != nil {
6195					return err
6196				}
6197				cm.Tags = tags
6198			}
6199		case "properties":
6200			if v != nil {
6201				var connectionMonitorParameters ConnectionMonitorParameters
6202				err = json.Unmarshal(*v, &connectionMonitorParameters)
6203				if err != nil {
6204					return err
6205				}
6206				cm.ConnectionMonitorParameters = &connectionMonitorParameters
6207			}
6208		}
6209	}
6210
6211	return nil
6212}
6213
6214// ConnectionMonitorDestination describes the destination of connection monitor.
6215type ConnectionMonitorDestination struct {
6216	// ResourceID - The ID of the resource used as the destination by connection monitor.
6217	ResourceID *string `json:"resourceId,omitempty"`
6218	// Address - Address of the connection monitor destination (IP or domain name).
6219	Address *string `json:"address,omitempty"`
6220	// Port - The destination port used by connection monitor.
6221	Port *int32 `json:"port,omitempty"`
6222}
6223
6224// ConnectionMonitorListResult list of connection monitors.
6225type ConnectionMonitorListResult struct {
6226	autorest.Response `json:"-"`
6227	// Value - Information about connection monitors.
6228	Value *[]ConnectionMonitorResult `json:"value,omitempty"`
6229}
6230
6231// ConnectionMonitorParameters parameters that define the operation to create a connection monitor.
6232type ConnectionMonitorParameters struct {
6233	// Source - Describes the source of connection monitor.
6234	Source *ConnectionMonitorSource `json:"source,omitempty"`
6235	// Destination - Describes the destination of connection monitor.
6236	Destination *ConnectionMonitorDestination `json:"destination,omitempty"`
6237	// AutoStart - Determines if the connection monitor will start automatically once created.
6238	AutoStart *bool `json:"autoStart,omitempty"`
6239	// MonitoringIntervalInSeconds - Monitoring interval in seconds.
6240	MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"`
6241}
6242
6243// ConnectionMonitorQueryResult list of connection states snapshots.
6244type ConnectionMonitorQueryResult struct {
6245	autorest.Response `json:"-"`
6246	// SourceStatus - Status of connection monitor source. Possible values include: 'ConnectionMonitorSourceStatusUnknown', 'ConnectionMonitorSourceStatusActive', 'ConnectionMonitorSourceStatusInactive'
6247	SourceStatus ConnectionMonitorSourceStatus `json:"sourceStatus,omitempty"`
6248	// States - Information about connection states.
6249	States *[]ConnectionStateSnapshot `json:"states,omitempty"`
6250}
6251
6252// ConnectionMonitorResult information about the connection monitor.
6253type ConnectionMonitorResult struct {
6254	autorest.Response `json:"-"`
6255	// Name - READ-ONLY; Name of the connection monitor.
6256	Name *string `json:"name,omitempty"`
6257	// ID - READ-ONLY; ID of the connection monitor.
6258	ID *string `json:"id,omitempty"`
6259	// Etag - A unique read-only string that changes whenever the resource is updated.
6260	Etag *string `json:"etag,omitempty"`
6261	// Type - READ-ONLY; Connection monitor type.
6262	Type *string `json:"type,omitempty"`
6263	// Location - Connection monitor location.
6264	Location *string `json:"location,omitempty"`
6265	// Tags - Connection monitor tags.
6266	Tags map[string]*string `json:"tags"`
6267	// ConnectionMonitorResultProperties - Properties of the connection monitor result.
6268	*ConnectionMonitorResultProperties `json:"properties,omitempty"`
6269}
6270
6271// MarshalJSON is the custom marshaler for ConnectionMonitorResult.
6272func (cmr ConnectionMonitorResult) MarshalJSON() ([]byte, error) {
6273	objectMap := make(map[string]interface{})
6274	if cmr.Etag != nil {
6275		objectMap["etag"] = cmr.Etag
6276	}
6277	if cmr.Location != nil {
6278		objectMap["location"] = cmr.Location
6279	}
6280	if cmr.Tags != nil {
6281		objectMap["tags"] = cmr.Tags
6282	}
6283	if cmr.ConnectionMonitorResultProperties != nil {
6284		objectMap["properties"] = cmr.ConnectionMonitorResultProperties
6285	}
6286	return json.Marshal(objectMap)
6287}
6288
6289// UnmarshalJSON is the custom unmarshaler for ConnectionMonitorResult struct.
6290func (cmr *ConnectionMonitorResult) UnmarshalJSON(body []byte) error {
6291	var m map[string]*json.RawMessage
6292	err := json.Unmarshal(body, &m)
6293	if err != nil {
6294		return err
6295	}
6296	for k, v := range m {
6297		switch k {
6298		case "name":
6299			if v != nil {
6300				var name string
6301				err = json.Unmarshal(*v, &name)
6302				if err != nil {
6303					return err
6304				}
6305				cmr.Name = &name
6306			}
6307		case "id":
6308			if v != nil {
6309				var ID string
6310				err = json.Unmarshal(*v, &ID)
6311				if err != nil {
6312					return err
6313				}
6314				cmr.ID = &ID
6315			}
6316		case "etag":
6317			if v != nil {
6318				var etag string
6319				err = json.Unmarshal(*v, &etag)
6320				if err != nil {
6321					return err
6322				}
6323				cmr.Etag = &etag
6324			}
6325		case "type":
6326			if v != nil {
6327				var typeVar string
6328				err = json.Unmarshal(*v, &typeVar)
6329				if err != nil {
6330					return err
6331				}
6332				cmr.Type = &typeVar
6333			}
6334		case "location":
6335			if v != nil {
6336				var location string
6337				err = json.Unmarshal(*v, &location)
6338				if err != nil {
6339					return err
6340				}
6341				cmr.Location = &location
6342			}
6343		case "tags":
6344			if v != nil {
6345				var tags map[string]*string
6346				err = json.Unmarshal(*v, &tags)
6347				if err != nil {
6348					return err
6349				}
6350				cmr.Tags = tags
6351			}
6352		case "properties":
6353			if v != nil {
6354				var connectionMonitorResultProperties ConnectionMonitorResultProperties
6355				err = json.Unmarshal(*v, &connectionMonitorResultProperties)
6356				if err != nil {
6357					return err
6358				}
6359				cmr.ConnectionMonitorResultProperties = &connectionMonitorResultProperties
6360			}
6361		}
6362	}
6363
6364	return nil
6365}
6366
6367// ConnectionMonitorResultProperties describes the properties of a connection monitor.
6368type ConnectionMonitorResultProperties struct {
6369	// ProvisioningState - The provisioning state of the connection monitor. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
6370	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
6371	// StartTime - The date and time when the connection monitor was started.
6372	StartTime *date.Time `json:"startTime,omitempty"`
6373	// MonitoringStatus - The monitoring status of the connection monitor.
6374	MonitoringStatus *string `json:"monitoringStatus,omitempty"`
6375	// Source - Describes the source of connection monitor.
6376	Source *ConnectionMonitorSource `json:"source,omitempty"`
6377	// Destination - Describes the destination of connection monitor.
6378	Destination *ConnectionMonitorDestination `json:"destination,omitempty"`
6379	// AutoStart - Determines if the connection monitor will start automatically once created.
6380	AutoStart *bool `json:"autoStart,omitempty"`
6381	// MonitoringIntervalInSeconds - Monitoring interval in seconds.
6382	MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"`
6383}
6384
6385// ConnectionMonitorsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
6386// long-running operation.
6387type ConnectionMonitorsCreateOrUpdateFuture struct {
6388	azure.FutureAPI
6389	// Result returns the result of the asynchronous operation.
6390	// If the operation has not completed it will return an error.
6391	Result func(ConnectionMonitorsClient) (ConnectionMonitorResult, error)
6392}
6393
6394// ConnectionMonitorsDeleteFuture an abstraction for monitoring and retrieving the results of a
6395// long-running operation.
6396type ConnectionMonitorsDeleteFuture struct {
6397	azure.FutureAPI
6398	// Result returns the result of the asynchronous operation.
6399	// If the operation has not completed it will return an error.
6400	Result func(ConnectionMonitorsClient) (autorest.Response, error)
6401}
6402
6403// ConnectionMonitorSource describes the source of connection monitor.
6404type ConnectionMonitorSource struct {
6405	// ResourceID - The ID of the resource used as the source by connection monitor.
6406	ResourceID *string `json:"resourceId,omitempty"`
6407	// Port - The source port used by connection monitor.
6408	Port *int32 `json:"port,omitempty"`
6409}
6410
6411// ConnectionMonitorsQueryFuture an abstraction for monitoring and retrieving the results of a long-running
6412// operation.
6413type ConnectionMonitorsQueryFuture struct {
6414	azure.FutureAPI
6415	// Result returns the result of the asynchronous operation.
6416	// If the operation has not completed it will return an error.
6417	Result func(ConnectionMonitorsClient) (ConnectionMonitorQueryResult, error)
6418}
6419
6420// ConnectionMonitorsStartFuture an abstraction for monitoring and retrieving the results of a long-running
6421// operation.
6422type ConnectionMonitorsStartFuture struct {
6423	azure.FutureAPI
6424	// Result returns the result of the asynchronous operation.
6425	// If the operation has not completed it will return an error.
6426	Result func(ConnectionMonitorsClient) (autorest.Response, error)
6427}
6428
6429// ConnectionMonitorsStopFuture an abstraction for monitoring and retrieving the results of a long-running
6430// operation.
6431type ConnectionMonitorsStopFuture struct {
6432	azure.FutureAPI
6433	// Result returns the result of the asynchronous operation.
6434	// If the operation has not completed it will return an error.
6435	Result func(ConnectionMonitorsClient) (autorest.Response, error)
6436}
6437
6438// ConnectionResetSharedKey the virtual network connection reset shared key.
6439type ConnectionResetSharedKey struct {
6440	autorest.Response `json:"-"`
6441	// KeyLength - The virtual network connection reset shared key length, should between 1 and 128.
6442	KeyLength *int32 `json:"keyLength,omitempty"`
6443}
6444
6445// ConnectionSharedKey response for GetConnectionSharedKey API service call.
6446type ConnectionSharedKey struct {
6447	autorest.Response `json:"-"`
6448	// Value - The virtual network connection shared key value.
6449	Value *string `json:"value,omitempty"`
6450	// ID - Resource ID.
6451	ID *string `json:"id,omitempty"`
6452}
6453
6454// ConnectionStateSnapshot connection state snapshot.
6455type ConnectionStateSnapshot struct {
6456	// ConnectionState - The connection state. Possible values include: 'ConnectionStateReachable', 'ConnectionStateUnreachable', 'ConnectionStateUnknown'
6457	ConnectionState ConnectionState `json:"connectionState,omitempty"`
6458	// StartTime - The start time of the connection snapshot.
6459	StartTime *date.Time `json:"startTime,omitempty"`
6460	// EndTime - The end time of the connection snapshot.
6461	EndTime *date.Time `json:"endTime,omitempty"`
6462	// EvaluationState - Connectivity analysis evaluation state. Possible values include: 'NotStarted', 'InProgress', 'Completed'
6463	EvaluationState EvaluationState `json:"evaluationState,omitempty"`
6464	// AvgLatencyInMs - Average latency in ms.
6465	AvgLatencyInMs *int32 `json:"avgLatencyInMs,omitempty"`
6466	// MinLatencyInMs - Minimum latency in ms.
6467	MinLatencyInMs *int32 `json:"minLatencyInMs,omitempty"`
6468	// MaxLatencyInMs - Maximum latency in ms.
6469	MaxLatencyInMs *int32 `json:"maxLatencyInMs,omitempty"`
6470	// ProbesSent - The number of sent probes.
6471	ProbesSent *int32 `json:"probesSent,omitempty"`
6472	// ProbesFailed - The number of failed probes.
6473	ProbesFailed *int32 `json:"probesFailed,omitempty"`
6474	// Hops - READ-ONLY; List of hops between the source and the destination.
6475	Hops *[]ConnectivityHop `json:"hops,omitempty"`
6476}
6477
6478// MarshalJSON is the custom marshaler for ConnectionStateSnapshot.
6479func (CSS ConnectionStateSnapshot) MarshalJSON() ([]byte, error) {
6480	objectMap := make(map[string]interface{})
6481	if CSS.ConnectionState != "" {
6482		objectMap["connectionState"] = CSS.ConnectionState
6483	}
6484	if CSS.StartTime != nil {
6485		objectMap["startTime"] = CSS.StartTime
6486	}
6487	if CSS.EndTime != nil {
6488		objectMap["endTime"] = CSS.EndTime
6489	}
6490	if CSS.EvaluationState != "" {
6491		objectMap["evaluationState"] = CSS.EvaluationState
6492	}
6493	if CSS.AvgLatencyInMs != nil {
6494		objectMap["avgLatencyInMs"] = CSS.AvgLatencyInMs
6495	}
6496	if CSS.MinLatencyInMs != nil {
6497		objectMap["minLatencyInMs"] = CSS.MinLatencyInMs
6498	}
6499	if CSS.MaxLatencyInMs != nil {
6500		objectMap["maxLatencyInMs"] = CSS.MaxLatencyInMs
6501	}
6502	if CSS.ProbesSent != nil {
6503		objectMap["probesSent"] = CSS.ProbesSent
6504	}
6505	if CSS.ProbesFailed != nil {
6506		objectMap["probesFailed"] = CSS.ProbesFailed
6507	}
6508	return json.Marshal(objectMap)
6509}
6510
6511// ConnectivityDestination parameters that define destination of connection.
6512type ConnectivityDestination struct {
6513	// ResourceID - The ID of the resource to which a connection attempt will be made.
6514	ResourceID *string `json:"resourceId,omitempty"`
6515	// Address - The IP address or URI the resource to which a connection attempt will be made.
6516	Address *string `json:"address,omitempty"`
6517	// Port - Port on which check connectivity will be performed.
6518	Port *int32 `json:"port,omitempty"`
6519}
6520
6521// ConnectivityHop information about a hop between the source and the destination.
6522type ConnectivityHop struct {
6523	// Type - READ-ONLY; The type of the hop.
6524	Type *string `json:"type,omitempty"`
6525	// ID - READ-ONLY; The ID of the hop.
6526	ID *string `json:"id,omitempty"`
6527	// Address - READ-ONLY; The IP address of the hop.
6528	Address *string `json:"address,omitempty"`
6529	// ResourceID - READ-ONLY; The ID of the resource corresponding to this hop.
6530	ResourceID *string `json:"resourceId,omitempty"`
6531	// NextHopIds - READ-ONLY; List of next hop identifiers.
6532	NextHopIds *[]string `json:"nextHopIds,omitempty"`
6533	// Issues - READ-ONLY; List of issues.
6534	Issues *[]ConnectivityIssue `json:"issues,omitempty"`
6535}
6536
6537// ConnectivityInformation information on the connectivity status.
6538type ConnectivityInformation struct {
6539	autorest.Response `json:"-"`
6540	// Hops - READ-ONLY; List of hops between the source and the destination.
6541	Hops *[]ConnectivityHop `json:"hops,omitempty"`
6542	// ConnectionStatus - READ-ONLY; The connection status. Possible values include: 'ConnectionStatusUnknown', 'ConnectionStatusConnected', 'ConnectionStatusDisconnected', 'ConnectionStatusDegraded'
6543	ConnectionStatus ConnectionStatus `json:"connectionStatus,omitempty"`
6544	// AvgLatencyInMs - READ-ONLY; Average latency in milliseconds.
6545	AvgLatencyInMs *int32 `json:"avgLatencyInMs,omitempty"`
6546	// MinLatencyInMs - READ-ONLY; Minimum latency in milliseconds.
6547	MinLatencyInMs *int32 `json:"minLatencyInMs,omitempty"`
6548	// MaxLatencyInMs - READ-ONLY; Maximum latency in milliseconds.
6549	MaxLatencyInMs *int32 `json:"maxLatencyInMs,omitempty"`
6550	// ProbesSent - READ-ONLY; Total number of probes sent.
6551	ProbesSent *int32 `json:"probesSent,omitempty"`
6552	// ProbesFailed - READ-ONLY; Number of failed probes.
6553	ProbesFailed *int32 `json:"probesFailed,omitempty"`
6554}
6555
6556// ConnectivityIssue information about an issue encountered in the process of checking for connectivity.
6557type ConnectivityIssue struct {
6558	// Origin - READ-ONLY; The origin of the issue. Possible values include: 'OriginLocal', 'OriginInbound', 'OriginOutbound'
6559	Origin Origin `json:"origin,omitempty"`
6560	// Severity - READ-ONLY; The severity of the issue. Possible values include: 'SeverityError', 'SeverityWarning'
6561	Severity Severity `json:"severity,omitempty"`
6562	// Type - READ-ONLY; The type of issue. Possible values include: 'IssueTypeUnknown', 'IssueTypeAgentStopped', 'IssueTypeGuestFirewall', 'IssueTypeDNSResolution', 'IssueTypeSocketBind', 'IssueTypeNetworkSecurityRule', 'IssueTypeUserDefinedRoute', 'IssueTypePortThrottled', 'IssueTypePlatform'
6563	Type IssueType `json:"type,omitempty"`
6564	// Context - READ-ONLY; Provides additional context on the issue.
6565	Context *[]map[string]*string `json:"context,omitempty"`
6566}
6567
6568// ConnectivityParameters parameters that determine how the connectivity check will be performed.
6569type ConnectivityParameters struct {
6570	// Source - Describes the source of the connection.
6571	Source *ConnectivitySource `json:"source,omitempty"`
6572	// Destination - Describes the destination of connection.
6573	Destination *ConnectivityDestination `json:"destination,omitempty"`
6574	// Protocol - Network protocol. Possible values include: 'ProtocolTCP', 'ProtocolHTTP', 'ProtocolHTTPS', 'ProtocolIcmp'
6575	Protocol Protocol `json:"protocol,omitempty"`
6576	// ProtocolConfiguration - Configuration of the protocol.
6577	ProtocolConfiguration *ProtocolConfiguration `json:"protocolConfiguration,omitempty"`
6578}
6579
6580// ConnectivitySource parameters that define the source of the connection.
6581type ConnectivitySource struct {
6582	// ResourceID - The ID of the resource from which a connectivity check will be initiated.
6583	ResourceID *string `json:"resourceId,omitempty"`
6584	// Port - The source port from which a connectivity check will be performed.
6585	Port *int32 `json:"port,omitempty"`
6586}
6587
6588// Container reference to container resource in remote resource provider.
6589type Container struct {
6590	// ID - Resource ID.
6591	ID *string `json:"id,omitempty"`
6592}
6593
6594// ContainerNetworkInterface container network interface child resource.
6595type ContainerNetworkInterface struct {
6596	// ContainerNetworkInterfacePropertiesFormat - Container network interface properties.
6597	*ContainerNetworkInterfacePropertiesFormat `json:"properties,omitempty"`
6598	// Name - The name of the resource. This name can be used to access the resource.
6599	Name *string `json:"name,omitempty"`
6600	// Type - READ-ONLY; Sub Resource type.
6601	Type *string `json:"type,omitempty"`
6602	// Etag - A unique read-only string that changes whenever the resource is updated.
6603	Etag *string `json:"etag,omitempty"`
6604	// ID - Resource ID.
6605	ID *string `json:"id,omitempty"`
6606}
6607
6608// MarshalJSON is the custom marshaler for ContainerNetworkInterface.
6609func (cni ContainerNetworkInterface) MarshalJSON() ([]byte, error) {
6610	objectMap := make(map[string]interface{})
6611	if cni.ContainerNetworkInterfacePropertiesFormat != nil {
6612		objectMap["properties"] = cni.ContainerNetworkInterfacePropertiesFormat
6613	}
6614	if cni.Name != nil {
6615		objectMap["name"] = cni.Name
6616	}
6617	if cni.Etag != nil {
6618		objectMap["etag"] = cni.Etag
6619	}
6620	if cni.ID != nil {
6621		objectMap["id"] = cni.ID
6622	}
6623	return json.Marshal(objectMap)
6624}
6625
6626// UnmarshalJSON is the custom unmarshaler for ContainerNetworkInterface struct.
6627func (cni *ContainerNetworkInterface) UnmarshalJSON(body []byte) error {
6628	var m map[string]*json.RawMessage
6629	err := json.Unmarshal(body, &m)
6630	if err != nil {
6631		return err
6632	}
6633	for k, v := range m {
6634		switch k {
6635		case "properties":
6636			if v != nil {
6637				var containerNetworkInterfacePropertiesFormat ContainerNetworkInterfacePropertiesFormat
6638				err = json.Unmarshal(*v, &containerNetworkInterfacePropertiesFormat)
6639				if err != nil {
6640					return err
6641				}
6642				cni.ContainerNetworkInterfacePropertiesFormat = &containerNetworkInterfacePropertiesFormat
6643			}
6644		case "name":
6645			if v != nil {
6646				var name string
6647				err = json.Unmarshal(*v, &name)
6648				if err != nil {
6649					return err
6650				}
6651				cni.Name = &name
6652			}
6653		case "type":
6654			if v != nil {
6655				var typeVar string
6656				err = json.Unmarshal(*v, &typeVar)
6657				if err != nil {
6658					return err
6659				}
6660				cni.Type = &typeVar
6661			}
6662		case "etag":
6663			if v != nil {
6664				var etag string
6665				err = json.Unmarshal(*v, &etag)
6666				if err != nil {
6667					return err
6668				}
6669				cni.Etag = &etag
6670			}
6671		case "id":
6672			if v != nil {
6673				var ID string
6674				err = json.Unmarshal(*v, &ID)
6675				if err != nil {
6676					return err
6677				}
6678				cni.ID = &ID
6679			}
6680		}
6681	}
6682
6683	return nil
6684}
6685
6686// ContainerNetworkInterfaceConfiguration container network interface configuration child resource.
6687type ContainerNetworkInterfaceConfiguration struct {
6688	// ContainerNetworkInterfaceConfigurationPropertiesFormat - Container network interface configuration properties.
6689	*ContainerNetworkInterfaceConfigurationPropertiesFormat `json:"properties,omitempty"`
6690	// Name - The name of the resource. This name can be used to access the resource.
6691	Name *string `json:"name,omitempty"`
6692	// Type - READ-ONLY; Sub Resource type.
6693	Type *string `json:"type,omitempty"`
6694	// Etag - A unique read-only string that changes whenever the resource is updated.
6695	Etag *string `json:"etag,omitempty"`
6696	// ID - Resource ID.
6697	ID *string `json:"id,omitempty"`
6698}
6699
6700// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceConfiguration.
6701func (cnic ContainerNetworkInterfaceConfiguration) MarshalJSON() ([]byte, error) {
6702	objectMap := make(map[string]interface{})
6703	if cnic.ContainerNetworkInterfaceConfigurationPropertiesFormat != nil {
6704		objectMap["properties"] = cnic.ContainerNetworkInterfaceConfigurationPropertiesFormat
6705	}
6706	if cnic.Name != nil {
6707		objectMap["name"] = cnic.Name
6708	}
6709	if cnic.Etag != nil {
6710		objectMap["etag"] = cnic.Etag
6711	}
6712	if cnic.ID != nil {
6713		objectMap["id"] = cnic.ID
6714	}
6715	return json.Marshal(objectMap)
6716}
6717
6718// UnmarshalJSON is the custom unmarshaler for ContainerNetworkInterfaceConfiguration struct.
6719func (cnic *ContainerNetworkInterfaceConfiguration) UnmarshalJSON(body []byte) error {
6720	var m map[string]*json.RawMessage
6721	err := json.Unmarshal(body, &m)
6722	if err != nil {
6723		return err
6724	}
6725	for k, v := range m {
6726		switch k {
6727		case "properties":
6728			if v != nil {
6729				var containerNetworkInterfaceConfigurationPropertiesFormat ContainerNetworkInterfaceConfigurationPropertiesFormat
6730				err = json.Unmarshal(*v, &containerNetworkInterfaceConfigurationPropertiesFormat)
6731				if err != nil {
6732					return err
6733				}
6734				cnic.ContainerNetworkInterfaceConfigurationPropertiesFormat = &containerNetworkInterfaceConfigurationPropertiesFormat
6735			}
6736		case "name":
6737			if v != nil {
6738				var name string
6739				err = json.Unmarshal(*v, &name)
6740				if err != nil {
6741					return err
6742				}
6743				cnic.Name = &name
6744			}
6745		case "type":
6746			if v != nil {
6747				var typeVar string
6748				err = json.Unmarshal(*v, &typeVar)
6749				if err != nil {
6750					return err
6751				}
6752				cnic.Type = &typeVar
6753			}
6754		case "etag":
6755			if v != nil {
6756				var etag string
6757				err = json.Unmarshal(*v, &etag)
6758				if err != nil {
6759					return err
6760				}
6761				cnic.Etag = &etag
6762			}
6763		case "id":
6764			if v != nil {
6765				var ID string
6766				err = json.Unmarshal(*v, &ID)
6767				if err != nil {
6768					return err
6769				}
6770				cnic.ID = &ID
6771			}
6772		}
6773	}
6774
6775	return nil
6776}
6777
6778// ContainerNetworkInterfaceConfigurationPropertiesFormat container network interface configuration
6779// properties.
6780type ContainerNetworkInterfaceConfigurationPropertiesFormat struct {
6781	// IPConfigurations - A list of ip configurations of the container network interface configuration.
6782	IPConfigurations *[]IPConfigurationProfile `json:"ipConfigurations,omitempty"`
6783	// ContainerNetworkInterfaces - A list of container network interfaces created from this container network interface configuration.
6784	ContainerNetworkInterfaces *[]SubResource `json:"containerNetworkInterfaces,omitempty"`
6785	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
6786	ProvisioningState *string `json:"provisioningState,omitempty"`
6787}
6788
6789// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceConfigurationPropertiesFormat.
6790func (cnicpf ContainerNetworkInterfaceConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
6791	objectMap := make(map[string]interface{})
6792	if cnicpf.IPConfigurations != nil {
6793		objectMap["ipConfigurations"] = cnicpf.IPConfigurations
6794	}
6795	if cnicpf.ContainerNetworkInterfaces != nil {
6796		objectMap["containerNetworkInterfaces"] = cnicpf.ContainerNetworkInterfaces
6797	}
6798	return json.Marshal(objectMap)
6799}
6800
6801// ContainerNetworkInterfaceIPConfiguration the ip configuration for a container network interface.
6802type ContainerNetworkInterfaceIPConfiguration struct {
6803	// ContainerNetworkInterfaceIPConfigurationPropertiesFormat - Properties of the container network interface IP configuration.
6804	*ContainerNetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"`
6805	// Name - The name of the resource. This name can be used to access the resource.
6806	Name *string `json:"name,omitempty"`
6807	// Type - READ-ONLY; Sub Resource type.
6808	Type *string `json:"type,omitempty"`
6809	// Etag - A unique read-only string that changes whenever the resource is updated.
6810	Etag *string `json:"etag,omitempty"`
6811}
6812
6813// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceIPConfiguration.
6814func (cniic ContainerNetworkInterfaceIPConfiguration) MarshalJSON() ([]byte, error) {
6815	objectMap := make(map[string]interface{})
6816	if cniic.ContainerNetworkInterfaceIPConfigurationPropertiesFormat != nil {
6817		objectMap["properties"] = cniic.ContainerNetworkInterfaceIPConfigurationPropertiesFormat
6818	}
6819	if cniic.Name != nil {
6820		objectMap["name"] = cniic.Name
6821	}
6822	if cniic.Etag != nil {
6823		objectMap["etag"] = cniic.Etag
6824	}
6825	return json.Marshal(objectMap)
6826}
6827
6828// UnmarshalJSON is the custom unmarshaler for ContainerNetworkInterfaceIPConfiguration struct.
6829func (cniic *ContainerNetworkInterfaceIPConfiguration) UnmarshalJSON(body []byte) error {
6830	var m map[string]*json.RawMessage
6831	err := json.Unmarshal(body, &m)
6832	if err != nil {
6833		return err
6834	}
6835	for k, v := range m {
6836		switch k {
6837		case "properties":
6838			if v != nil {
6839				var containerNetworkInterfaceIPConfigurationPropertiesFormat ContainerNetworkInterfaceIPConfigurationPropertiesFormat
6840				err = json.Unmarshal(*v, &containerNetworkInterfaceIPConfigurationPropertiesFormat)
6841				if err != nil {
6842					return err
6843				}
6844				cniic.ContainerNetworkInterfaceIPConfigurationPropertiesFormat = &containerNetworkInterfaceIPConfigurationPropertiesFormat
6845			}
6846		case "name":
6847			if v != nil {
6848				var name string
6849				err = json.Unmarshal(*v, &name)
6850				if err != nil {
6851					return err
6852				}
6853				cniic.Name = &name
6854			}
6855		case "type":
6856			if v != nil {
6857				var typeVar string
6858				err = json.Unmarshal(*v, &typeVar)
6859				if err != nil {
6860					return err
6861				}
6862				cniic.Type = &typeVar
6863			}
6864		case "etag":
6865			if v != nil {
6866				var etag string
6867				err = json.Unmarshal(*v, &etag)
6868				if err != nil {
6869					return err
6870				}
6871				cniic.Etag = &etag
6872			}
6873		}
6874	}
6875
6876	return nil
6877}
6878
6879// ContainerNetworkInterfaceIPConfigurationPropertiesFormat properties of the container network interface
6880// IP configuration.
6881type ContainerNetworkInterfaceIPConfigurationPropertiesFormat struct {
6882	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
6883	ProvisioningState *string `json:"provisioningState,omitempty"`
6884}
6885
6886// ContainerNetworkInterfacePropertiesFormat properties of container network interface.
6887type ContainerNetworkInterfacePropertiesFormat struct {
6888	// ContainerNetworkInterfaceConfiguration - Container network interface configuration from which this container network interface is created.
6889	ContainerNetworkInterfaceConfiguration *ContainerNetworkInterfaceConfiguration `json:"containerNetworkInterfaceConfiguration,omitempty"`
6890	// Container - Reference to the container to which this container network interface is attached.
6891	Container *Container `json:"container,omitempty"`
6892	// IPConfigurations - Reference to the ip configuration on this container nic.
6893	IPConfigurations *[]ContainerNetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"`
6894	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
6895	ProvisioningState *string `json:"provisioningState,omitempty"`
6896}
6897
6898// MarshalJSON is the custom marshaler for ContainerNetworkInterfacePropertiesFormat.
6899func (cnipf ContainerNetworkInterfacePropertiesFormat) MarshalJSON() ([]byte, error) {
6900	objectMap := make(map[string]interface{})
6901	if cnipf.ContainerNetworkInterfaceConfiguration != nil {
6902		objectMap["containerNetworkInterfaceConfiguration"] = cnipf.ContainerNetworkInterfaceConfiguration
6903	}
6904	if cnipf.Container != nil {
6905		objectMap["container"] = cnipf.Container
6906	}
6907	if cnipf.IPConfigurations != nil {
6908		objectMap["ipConfigurations"] = cnipf.IPConfigurations
6909	}
6910	return json.Marshal(objectMap)
6911}
6912
6913// DdosCustomPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
6914// long-running operation.
6915type DdosCustomPoliciesCreateOrUpdateFuture struct {
6916	azure.FutureAPI
6917	// Result returns the result of the asynchronous operation.
6918	// If the operation has not completed it will return an error.
6919	Result func(DdosCustomPoliciesClient) (DdosCustomPolicy, error)
6920}
6921
6922// DdosCustomPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a
6923// long-running operation.
6924type DdosCustomPoliciesDeleteFuture struct {
6925	azure.FutureAPI
6926	// Result returns the result of the asynchronous operation.
6927	// If the operation has not completed it will return an error.
6928	Result func(DdosCustomPoliciesClient) (autorest.Response, error)
6929}
6930
6931// DdosCustomPoliciesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
6932// long-running operation.
6933type DdosCustomPoliciesUpdateTagsFuture struct {
6934	azure.FutureAPI
6935	// Result returns the result of the asynchronous operation.
6936	// If the operation has not completed it will return an error.
6937	Result func(DdosCustomPoliciesClient) (DdosCustomPolicy, error)
6938}
6939
6940// DdosCustomPolicy a DDoS custom policy in a resource group.
6941type DdosCustomPolicy struct {
6942	autorest.Response `json:"-"`
6943	// DdosCustomPolicyPropertiesFormat - Properties of the DDoS custom policy.
6944	*DdosCustomPolicyPropertiesFormat `json:"properties,omitempty"`
6945	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
6946	Etag *string `json:"etag,omitempty"`
6947	// ID - Resource ID.
6948	ID *string `json:"id,omitempty"`
6949	// Name - READ-ONLY; Resource name.
6950	Name *string `json:"name,omitempty"`
6951	// Type - READ-ONLY; Resource type.
6952	Type *string `json:"type,omitempty"`
6953	// Location - Resource location.
6954	Location *string `json:"location,omitempty"`
6955	// Tags - Resource tags.
6956	Tags map[string]*string `json:"tags"`
6957}
6958
6959// MarshalJSON is the custom marshaler for DdosCustomPolicy.
6960func (dcp DdosCustomPolicy) MarshalJSON() ([]byte, error) {
6961	objectMap := make(map[string]interface{})
6962	if dcp.DdosCustomPolicyPropertiesFormat != nil {
6963		objectMap["properties"] = dcp.DdosCustomPolicyPropertiesFormat
6964	}
6965	if dcp.ID != nil {
6966		objectMap["id"] = dcp.ID
6967	}
6968	if dcp.Location != nil {
6969		objectMap["location"] = dcp.Location
6970	}
6971	if dcp.Tags != nil {
6972		objectMap["tags"] = dcp.Tags
6973	}
6974	return json.Marshal(objectMap)
6975}
6976
6977// UnmarshalJSON is the custom unmarshaler for DdosCustomPolicy struct.
6978func (dcp *DdosCustomPolicy) UnmarshalJSON(body []byte) error {
6979	var m map[string]*json.RawMessage
6980	err := json.Unmarshal(body, &m)
6981	if err != nil {
6982		return err
6983	}
6984	for k, v := range m {
6985		switch k {
6986		case "properties":
6987			if v != nil {
6988				var ddosCustomPolicyPropertiesFormat DdosCustomPolicyPropertiesFormat
6989				err = json.Unmarshal(*v, &ddosCustomPolicyPropertiesFormat)
6990				if err != nil {
6991					return err
6992				}
6993				dcp.DdosCustomPolicyPropertiesFormat = &ddosCustomPolicyPropertiesFormat
6994			}
6995		case "etag":
6996			if v != nil {
6997				var etag string
6998				err = json.Unmarshal(*v, &etag)
6999				if err != nil {
7000					return err
7001				}
7002				dcp.Etag = &etag
7003			}
7004		case "id":
7005			if v != nil {
7006				var ID string
7007				err = json.Unmarshal(*v, &ID)
7008				if err != nil {
7009					return err
7010				}
7011				dcp.ID = &ID
7012			}
7013		case "name":
7014			if v != nil {
7015				var name string
7016				err = json.Unmarshal(*v, &name)
7017				if err != nil {
7018					return err
7019				}
7020				dcp.Name = &name
7021			}
7022		case "type":
7023			if v != nil {
7024				var typeVar string
7025				err = json.Unmarshal(*v, &typeVar)
7026				if err != nil {
7027					return err
7028				}
7029				dcp.Type = &typeVar
7030			}
7031		case "location":
7032			if v != nil {
7033				var location string
7034				err = json.Unmarshal(*v, &location)
7035				if err != nil {
7036					return err
7037				}
7038				dcp.Location = &location
7039			}
7040		case "tags":
7041			if v != nil {
7042				var tags map[string]*string
7043				err = json.Unmarshal(*v, &tags)
7044				if err != nil {
7045					return err
7046				}
7047				dcp.Tags = tags
7048			}
7049		}
7050	}
7051
7052	return nil
7053}
7054
7055// DdosCustomPolicyPropertiesFormat dDoS custom policy properties.
7056type DdosCustomPolicyPropertiesFormat struct {
7057	// 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.
7058	ResourceGUID *string `json:"resourceGuid,omitempty"`
7059	// ProvisioningState - READ-ONLY; The provisioning state of the DDoS custom policy resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
7060	ProvisioningState *string `json:"provisioningState,omitempty"`
7061	// PublicIPAddresses - READ-ONLY; The list of public IPs associated with the DDoS custom policy resource. This list is read-only.
7062	PublicIPAddresses *[]SubResource `json:"publicIPAddresses,omitempty"`
7063	// ProtocolCustomSettings - The protocol-specific DDoS policy customization parameters.
7064	ProtocolCustomSettings *[]ProtocolCustomSettingsFormat `json:"protocolCustomSettings,omitempty"`
7065}
7066
7067// MarshalJSON is the custom marshaler for DdosCustomPolicyPropertiesFormat.
7068func (dcppf DdosCustomPolicyPropertiesFormat) MarshalJSON() ([]byte, error) {
7069	objectMap := make(map[string]interface{})
7070	if dcppf.ProtocolCustomSettings != nil {
7071		objectMap["protocolCustomSettings"] = dcppf.ProtocolCustomSettings
7072	}
7073	return json.Marshal(objectMap)
7074}
7075
7076// DdosProtectionPlan a DDoS protection plan in a resource group.
7077type DdosProtectionPlan struct {
7078	autorest.Response `json:"-"`
7079	// ID - READ-ONLY; Resource ID.
7080	ID *string `json:"id,omitempty"`
7081	// Name - READ-ONLY; Resource name.
7082	Name *string `json:"name,omitempty"`
7083	// Type - READ-ONLY; Resource type.
7084	Type *string `json:"type,omitempty"`
7085	// Location - Resource location.
7086	Location *string `json:"location,omitempty"`
7087	// Tags - Resource tags.
7088	Tags map[string]*string `json:"tags"`
7089	// DdosProtectionPlanPropertiesFormat - Properties of the DDoS protection plan.
7090	*DdosProtectionPlanPropertiesFormat `json:"properties,omitempty"`
7091	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
7092	Etag *string `json:"etag,omitempty"`
7093}
7094
7095// MarshalJSON is the custom marshaler for DdosProtectionPlan.
7096func (dpp DdosProtectionPlan) MarshalJSON() ([]byte, error) {
7097	objectMap := make(map[string]interface{})
7098	if dpp.Location != nil {
7099		objectMap["location"] = dpp.Location
7100	}
7101	if dpp.Tags != nil {
7102		objectMap["tags"] = dpp.Tags
7103	}
7104	if dpp.DdosProtectionPlanPropertiesFormat != nil {
7105		objectMap["properties"] = dpp.DdosProtectionPlanPropertiesFormat
7106	}
7107	return json.Marshal(objectMap)
7108}
7109
7110// UnmarshalJSON is the custom unmarshaler for DdosProtectionPlan struct.
7111func (dpp *DdosProtectionPlan) UnmarshalJSON(body []byte) error {
7112	var m map[string]*json.RawMessage
7113	err := json.Unmarshal(body, &m)
7114	if err != nil {
7115		return err
7116	}
7117	for k, v := range m {
7118		switch k {
7119		case "id":
7120			if v != nil {
7121				var ID string
7122				err = json.Unmarshal(*v, &ID)
7123				if err != nil {
7124					return err
7125				}
7126				dpp.ID = &ID
7127			}
7128		case "name":
7129			if v != nil {
7130				var name string
7131				err = json.Unmarshal(*v, &name)
7132				if err != nil {
7133					return err
7134				}
7135				dpp.Name = &name
7136			}
7137		case "type":
7138			if v != nil {
7139				var typeVar string
7140				err = json.Unmarshal(*v, &typeVar)
7141				if err != nil {
7142					return err
7143				}
7144				dpp.Type = &typeVar
7145			}
7146		case "location":
7147			if v != nil {
7148				var location string
7149				err = json.Unmarshal(*v, &location)
7150				if err != nil {
7151					return err
7152				}
7153				dpp.Location = &location
7154			}
7155		case "tags":
7156			if v != nil {
7157				var tags map[string]*string
7158				err = json.Unmarshal(*v, &tags)
7159				if err != nil {
7160					return err
7161				}
7162				dpp.Tags = tags
7163			}
7164		case "properties":
7165			if v != nil {
7166				var ddosProtectionPlanPropertiesFormat DdosProtectionPlanPropertiesFormat
7167				err = json.Unmarshal(*v, &ddosProtectionPlanPropertiesFormat)
7168				if err != nil {
7169					return err
7170				}
7171				dpp.DdosProtectionPlanPropertiesFormat = &ddosProtectionPlanPropertiesFormat
7172			}
7173		case "etag":
7174			if v != nil {
7175				var etag string
7176				err = json.Unmarshal(*v, &etag)
7177				if err != nil {
7178					return err
7179				}
7180				dpp.Etag = &etag
7181			}
7182		}
7183	}
7184
7185	return nil
7186}
7187
7188// DdosProtectionPlanListResult a list of DDoS protection plans.
7189type DdosProtectionPlanListResult struct {
7190	autorest.Response `json:"-"`
7191	// Value - A list of DDoS protection plans.
7192	Value *[]DdosProtectionPlan `json:"value,omitempty"`
7193	// NextLink - READ-ONLY; The URL to get the next set of results.
7194	NextLink *string `json:"nextLink,omitempty"`
7195}
7196
7197// MarshalJSON is the custom marshaler for DdosProtectionPlanListResult.
7198func (dpplr DdosProtectionPlanListResult) MarshalJSON() ([]byte, error) {
7199	objectMap := make(map[string]interface{})
7200	if dpplr.Value != nil {
7201		objectMap["value"] = dpplr.Value
7202	}
7203	return json.Marshal(objectMap)
7204}
7205
7206// DdosProtectionPlanListResultIterator provides access to a complete listing of DdosProtectionPlan values.
7207type DdosProtectionPlanListResultIterator struct {
7208	i    int
7209	page DdosProtectionPlanListResultPage
7210}
7211
7212// NextWithContext advances to the next value.  If there was an error making
7213// the request the iterator does not advance and the error is returned.
7214func (iter *DdosProtectionPlanListResultIterator) NextWithContext(ctx context.Context) (err error) {
7215	if tracing.IsEnabled() {
7216		ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlanListResultIterator.NextWithContext")
7217		defer func() {
7218			sc := -1
7219			if iter.Response().Response.Response != nil {
7220				sc = iter.Response().Response.Response.StatusCode
7221			}
7222			tracing.EndSpan(ctx, sc, err)
7223		}()
7224	}
7225	iter.i++
7226	if iter.i < len(iter.page.Values()) {
7227		return nil
7228	}
7229	err = iter.page.NextWithContext(ctx)
7230	if err != nil {
7231		iter.i--
7232		return err
7233	}
7234	iter.i = 0
7235	return nil
7236}
7237
7238// Next advances to the next value.  If there was an error making
7239// the request the iterator does not advance and the error is returned.
7240// Deprecated: Use NextWithContext() instead.
7241func (iter *DdosProtectionPlanListResultIterator) Next() error {
7242	return iter.NextWithContext(context.Background())
7243}
7244
7245// NotDone returns true if the enumeration should be started or is not yet complete.
7246func (iter DdosProtectionPlanListResultIterator) NotDone() bool {
7247	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7248}
7249
7250// Response returns the raw server response from the last page request.
7251func (iter DdosProtectionPlanListResultIterator) Response() DdosProtectionPlanListResult {
7252	return iter.page.Response()
7253}
7254
7255// Value returns the current value or a zero-initialized value if the
7256// iterator has advanced beyond the end of the collection.
7257func (iter DdosProtectionPlanListResultIterator) Value() DdosProtectionPlan {
7258	if !iter.page.NotDone() {
7259		return DdosProtectionPlan{}
7260	}
7261	return iter.page.Values()[iter.i]
7262}
7263
7264// Creates a new instance of the DdosProtectionPlanListResultIterator type.
7265func NewDdosProtectionPlanListResultIterator(page DdosProtectionPlanListResultPage) DdosProtectionPlanListResultIterator {
7266	return DdosProtectionPlanListResultIterator{page: page}
7267}
7268
7269// IsEmpty returns true if the ListResult contains no values.
7270func (dpplr DdosProtectionPlanListResult) IsEmpty() bool {
7271	return dpplr.Value == nil || len(*dpplr.Value) == 0
7272}
7273
7274// hasNextLink returns true if the NextLink is not empty.
7275func (dpplr DdosProtectionPlanListResult) hasNextLink() bool {
7276	return dpplr.NextLink != nil && len(*dpplr.NextLink) != 0
7277}
7278
7279// ddosProtectionPlanListResultPreparer prepares a request to retrieve the next set of results.
7280// It returns nil if no more results exist.
7281func (dpplr DdosProtectionPlanListResult) ddosProtectionPlanListResultPreparer(ctx context.Context) (*http.Request, error) {
7282	if !dpplr.hasNextLink() {
7283		return nil, nil
7284	}
7285	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7286		autorest.AsJSON(),
7287		autorest.AsGet(),
7288		autorest.WithBaseURL(to.String(dpplr.NextLink)))
7289}
7290
7291// DdosProtectionPlanListResultPage contains a page of DdosProtectionPlan values.
7292type DdosProtectionPlanListResultPage struct {
7293	fn    func(context.Context, DdosProtectionPlanListResult) (DdosProtectionPlanListResult, error)
7294	dpplr DdosProtectionPlanListResult
7295}
7296
7297// NextWithContext advances to the next page of values.  If there was an error making
7298// the request the page does not advance and the error is returned.
7299func (page *DdosProtectionPlanListResultPage) NextWithContext(ctx context.Context) (err error) {
7300	if tracing.IsEnabled() {
7301		ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlanListResultPage.NextWithContext")
7302		defer func() {
7303			sc := -1
7304			if page.Response().Response.Response != nil {
7305				sc = page.Response().Response.Response.StatusCode
7306			}
7307			tracing.EndSpan(ctx, sc, err)
7308		}()
7309	}
7310	for {
7311		next, err := page.fn(ctx, page.dpplr)
7312		if err != nil {
7313			return err
7314		}
7315		page.dpplr = next
7316		if !next.hasNextLink() || !next.IsEmpty() {
7317			break
7318		}
7319	}
7320	return nil
7321}
7322
7323// Next advances to the next page of values.  If there was an error making
7324// the request the page does not advance and the error is returned.
7325// Deprecated: Use NextWithContext() instead.
7326func (page *DdosProtectionPlanListResultPage) Next() error {
7327	return page.NextWithContext(context.Background())
7328}
7329
7330// NotDone returns true if the page enumeration should be started or is not yet complete.
7331func (page DdosProtectionPlanListResultPage) NotDone() bool {
7332	return !page.dpplr.IsEmpty()
7333}
7334
7335// Response returns the raw server response from the last page request.
7336func (page DdosProtectionPlanListResultPage) Response() DdosProtectionPlanListResult {
7337	return page.dpplr
7338}
7339
7340// Values returns the slice of values for the current page or nil if there are no values.
7341func (page DdosProtectionPlanListResultPage) Values() []DdosProtectionPlan {
7342	if page.dpplr.IsEmpty() {
7343		return nil
7344	}
7345	return *page.dpplr.Value
7346}
7347
7348// Creates a new instance of the DdosProtectionPlanListResultPage type.
7349func NewDdosProtectionPlanListResultPage(cur DdosProtectionPlanListResult, getNextPage func(context.Context, DdosProtectionPlanListResult) (DdosProtectionPlanListResult, error)) DdosProtectionPlanListResultPage {
7350	return DdosProtectionPlanListResultPage{
7351		fn:    getNextPage,
7352		dpplr: cur,
7353	}
7354}
7355
7356// DdosProtectionPlanPropertiesFormat dDoS protection plan properties.
7357type DdosProtectionPlanPropertiesFormat struct {
7358	// 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.
7359	ResourceGUID *string `json:"resourceGuid,omitempty"`
7360	// ProvisioningState - READ-ONLY; The provisioning state of the DDoS protection plan resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
7361	ProvisioningState *string `json:"provisioningState,omitempty"`
7362	// VirtualNetworks - READ-ONLY; The list of virtual networks associated with the DDoS protection plan resource. This list is read-only.
7363	VirtualNetworks *[]SubResource `json:"virtualNetworks,omitempty"`
7364}
7365
7366// DdosProtectionPlansCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
7367// long-running operation.
7368type DdosProtectionPlansCreateOrUpdateFuture struct {
7369	azure.FutureAPI
7370	// Result returns the result of the asynchronous operation.
7371	// If the operation has not completed it will return an error.
7372	Result func(DdosProtectionPlansClient) (DdosProtectionPlan, error)
7373}
7374
7375// DdosProtectionPlansDeleteFuture an abstraction for monitoring and retrieving the results of a
7376// long-running operation.
7377type DdosProtectionPlansDeleteFuture struct {
7378	azure.FutureAPI
7379	// Result returns the result of the asynchronous operation.
7380	// If the operation has not completed it will return an error.
7381	Result func(DdosProtectionPlansClient) (autorest.Response, error)
7382}
7383
7384// DdosProtectionPlansUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
7385// long-running operation.
7386type DdosProtectionPlansUpdateTagsFuture struct {
7387	azure.FutureAPI
7388	// Result returns the result of the asynchronous operation.
7389	// If the operation has not completed it will return an error.
7390	Result func(DdosProtectionPlansClient) (DdosProtectionPlan, error)
7391}
7392
7393// DdosSettings contains the DDoS protection settings of the public IP.
7394type DdosSettings struct {
7395	// DdosCustomPolicy - The DDoS custom policy associated with the public IP.
7396	DdosCustomPolicy *SubResource `json:"ddosCustomPolicy,omitempty"`
7397	// 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'
7398	ProtectionCoverage DdosSettingsProtectionCoverage `json:"protectionCoverage,omitempty"`
7399}
7400
7401// Delegation details the service to which the subnet is delegated.
7402type Delegation struct {
7403	// ServiceDelegationPropertiesFormat - Properties of the subnet.
7404	*ServiceDelegationPropertiesFormat `json:"properties,omitempty"`
7405	// Name - The name of the resource that is unique within a subnet. This name can be used to access the resource.
7406	Name *string `json:"name,omitempty"`
7407	// Etag - A unique read-only string that changes whenever the resource is updated.
7408	Etag *string `json:"etag,omitempty"`
7409	// ID - Resource ID.
7410	ID *string `json:"id,omitempty"`
7411}
7412
7413// MarshalJSON is the custom marshaler for Delegation.
7414func (d Delegation) MarshalJSON() ([]byte, error) {
7415	objectMap := make(map[string]interface{})
7416	if d.ServiceDelegationPropertiesFormat != nil {
7417		objectMap["properties"] = d.ServiceDelegationPropertiesFormat
7418	}
7419	if d.Name != nil {
7420		objectMap["name"] = d.Name
7421	}
7422	if d.Etag != nil {
7423		objectMap["etag"] = d.Etag
7424	}
7425	if d.ID != nil {
7426		objectMap["id"] = d.ID
7427	}
7428	return json.Marshal(objectMap)
7429}
7430
7431// UnmarshalJSON is the custom unmarshaler for Delegation struct.
7432func (d *Delegation) UnmarshalJSON(body []byte) error {
7433	var m map[string]*json.RawMessage
7434	err := json.Unmarshal(body, &m)
7435	if err != nil {
7436		return err
7437	}
7438	for k, v := range m {
7439		switch k {
7440		case "properties":
7441			if v != nil {
7442				var serviceDelegationPropertiesFormat ServiceDelegationPropertiesFormat
7443				err = json.Unmarshal(*v, &serviceDelegationPropertiesFormat)
7444				if err != nil {
7445					return err
7446				}
7447				d.ServiceDelegationPropertiesFormat = &serviceDelegationPropertiesFormat
7448			}
7449		case "name":
7450			if v != nil {
7451				var name string
7452				err = json.Unmarshal(*v, &name)
7453				if err != nil {
7454					return err
7455				}
7456				d.Name = &name
7457			}
7458		case "etag":
7459			if v != nil {
7460				var etag string
7461				err = json.Unmarshal(*v, &etag)
7462				if err != nil {
7463					return err
7464				}
7465				d.Etag = &etag
7466			}
7467		case "id":
7468			if v != nil {
7469				var ID string
7470				err = json.Unmarshal(*v, &ID)
7471				if err != nil {
7472					return err
7473				}
7474				d.ID = &ID
7475			}
7476		}
7477	}
7478
7479	return nil
7480}
7481
7482// DeviceProperties list of properties of the device.
7483type DeviceProperties struct {
7484	// DeviceVendor - Name of the device Vendor.
7485	DeviceVendor *string `json:"deviceVendor,omitempty"`
7486	// DeviceModel - Model of the device.
7487	DeviceModel *string `json:"deviceModel,omitempty"`
7488	// LinkSpeedInMbps - Link speed.
7489	LinkSpeedInMbps *int32 `json:"linkSpeedInMbps,omitempty"`
7490}
7491
7492// DhcpOptions dhcpOptions contains an array of DNS servers available to VMs deployed in the virtual
7493// network. Standard DHCP option for a subnet overrides VNET DHCP options.
7494type DhcpOptions struct {
7495	// DNSServers - The list of DNS servers IP addresses.
7496	DNSServers *[]string `json:"dnsServers,omitempty"`
7497}
7498
7499// Dimension dimension of the metric.
7500type Dimension struct {
7501	// Name - The name of the dimension.
7502	Name *string `json:"name,omitempty"`
7503	// DisplayName - The display name of the dimension.
7504	DisplayName *string `json:"displayName,omitempty"`
7505	// InternalName - The internal name of the dimension.
7506	InternalName *string `json:"internalName,omitempty"`
7507}
7508
7509// DNSNameAvailabilityResult response for the CheckDnsNameAvailability API service call.
7510type DNSNameAvailabilityResult struct {
7511	autorest.Response `json:"-"`
7512	// Available - Domain availability (True/False).
7513	Available *bool `json:"available,omitempty"`
7514}
7515
7516// EffectiveNetworkSecurityGroup effective network security group.
7517type EffectiveNetworkSecurityGroup struct {
7518	// NetworkSecurityGroup - The ID of network security group that is applied.
7519	NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"`
7520	// Association - Associated resources.
7521	Association *EffectiveNetworkSecurityGroupAssociation `json:"association,omitempty"`
7522	// EffectiveSecurityRules - A collection of effective security rules.
7523	EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"`
7524	// TagMap - Mapping of tags to list of IP Addresses included within the tag.
7525	TagMap map[string][]string `json:"tagMap"`
7526}
7527
7528// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroup.
7529func (ensg EffectiveNetworkSecurityGroup) MarshalJSON() ([]byte, error) {
7530	objectMap := make(map[string]interface{})
7531	if ensg.NetworkSecurityGroup != nil {
7532		objectMap["networkSecurityGroup"] = ensg.NetworkSecurityGroup
7533	}
7534	if ensg.Association != nil {
7535		objectMap["association"] = ensg.Association
7536	}
7537	if ensg.EffectiveSecurityRules != nil {
7538		objectMap["effectiveSecurityRules"] = ensg.EffectiveSecurityRules
7539	}
7540	if ensg.TagMap != nil {
7541		objectMap["tagMap"] = ensg.TagMap
7542	}
7543	return json.Marshal(objectMap)
7544}
7545
7546// EffectiveNetworkSecurityGroupAssociation the effective network security group association.
7547type EffectiveNetworkSecurityGroupAssociation struct {
7548	// Subnet - The ID of the subnet if assigned.
7549	Subnet *SubResource `json:"subnet,omitempty"`
7550	// NetworkInterface - The ID of the network interface if assigned.
7551	NetworkInterface *SubResource `json:"networkInterface,omitempty"`
7552}
7553
7554// EffectiveNetworkSecurityGroupListResult response for list effective network security groups API service
7555// call.
7556type EffectiveNetworkSecurityGroupListResult struct {
7557	autorest.Response `json:"-"`
7558	// Value - A list of effective network security groups.
7559	Value *[]EffectiveNetworkSecurityGroup `json:"value,omitempty"`
7560	// NextLink - READ-ONLY; The URL to get the next set of results.
7561	NextLink *string `json:"nextLink,omitempty"`
7562}
7563
7564// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroupListResult.
7565func (ensglr EffectiveNetworkSecurityGroupListResult) MarshalJSON() ([]byte, error) {
7566	objectMap := make(map[string]interface{})
7567	if ensglr.Value != nil {
7568		objectMap["value"] = ensglr.Value
7569	}
7570	return json.Marshal(objectMap)
7571}
7572
7573// EffectiveNetworkSecurityRule effective network security rules.
7574type EffectiveNetworkSecurityRule struct {
7575	// Name - The name of the security rule specified by the user (if created by the user).
7576	Name *string `json:"name,omitempty"`
7577	// Protocol - The network protocol this rule applies to. Possible values include: 'EffectiveSecurityRuleProtocolTCP', 'EffectiveSecurityRuleProtocolUDP', 'EffectiveSecurityRuleProtocolAll'
7578	Protocol EffectiveSecurityRuleProtocol `json:"protocol,omitempty"`
7579	// SourcePortRange - The source port or range.
7580	SourcePortRange *string `json:"sourcePortRange,omitempty"`
7581	// DestinationPortRange - The destination port or range.
7582	DestinationPortRange *string `json:"destinationPortRange,omitempty"`
7583	// 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 (*).
7584	SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"`
7585	// 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 (*).
7586	DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"`
7587	// SourceAddressPrefix - The source address prefix.
7588	SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
7589	// DestinationAddressPrefix - The destination address prefix.
7590	DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"`
7591	// SourceAddressPrefixes - The source address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*).
7592	SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"`
7593	// DestinationAddressPrefixes - The destination address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*).
7594	DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"`
7595	// ExpandedSourceAddressPrefix - The expanded source address prefix.
7596	ExpandedSourceAddressPrefix *[]string `json:"expandedSourceAddressPrefix,omitempty"`
7597	// ExpandedDestinationAddressPrefix - Expanded destination address prefix.
7598	ExpandedDestinationAddressPrefix *[]string `json:"expandedDestinationAddressPrefix,omitempty"`
7599	// Access - Whether network traffic is allowed or denied. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
7600	Access SecurityRuleAccess `json:"access,omitempty"`
7601	// Priority - The priority of the rule.
7602	Priority *int32 `json:"priority,omitempty"`
7603	// Direction - The direction of the rule. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound'
7604	Direction SecurityRuleDirection `json:"direction,omitempty"`
7605}
7606
7607// EffectiveRoute effective Route.
7608type EffectiveRoute struct {
7609	// Name - The name of the user defined route. This is optional.
7610	Name *string `json:"name,omitempty"`
7611	// DisableBgpRoutePropagation - If true, on-premises routes are not propagated to the network interfaces in the subnet.
7612	DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"`
7613	// Source - Who created the route. Possible values include: 'EffectiveRouteSourceUnknown', 'EffectiveRouteSourceUser', 'EffectiveRouteSourceVirtualNetworkGateway', 'EffectiveRouteSourceDefault'
7614	Source EffectiveRouteSource `json:"source,omitempty"`
7615	// State - The value of effective route. Possible values include: 'Active', 'Invalid'
7616	State EffectiveRouteState `json:"state,omitempty"`
7617	// AddressPrefix - The address prefixes of the effective routes in CIDR notation.
7618	AddressPrefix *[]string `json:"addressPrefix,omitempty"`
7619	// NextHopIPAddress - The IP address of the next hop of the effective route.
7620	NextHopIPAddress *[]string `json:"nextHopIpAddress,omitempty"`
7621	// NextHopType - The type of Azure hop the packet should be sent to. Possible values include: 'RouteNextHopTypeVirtualNetworkGateway', 'RouteNextHopTypeVnetLocal', 'RouteNextHopTypeInternet', 'RouteNextHopTypeVirtualAppliance', 'RouteNextHopTypeNone'
7622	NextHopType RouteNextHopType `json:"nextHopType,omitempty"`
7623}
7624
7625// EffectiveRouteListResult response for list effective route API service call.
7626type EffectiveRouteListResult struct {
7627	autorest.Response `json:"-"`
7628	// Value - A list of effective routes.
7629	Value *[]EffectiveRoute `json:"value,omitempty"`
7630	// NextLink - READ-ONLY; The URL to get the next set of results.
7631	NextLink *string `json:"nextLink,omitempty"`
7632}
7633
7634// MarshalJSON is the custom marshaler for EffectiveRouteListResult.
7635func (erlr EffectiveRouteListResult) MarshalJSON() ([]byte, error) {
7636	objectMap := make(map[string]interface{})
7637	if erlr.Value != nil {
7638		objectMap["value"] = erlr.Value
7639	}
7640	return json.Marshal(objectMap)
7641}
7642
7643// EndpointServiceResult endpoint service.
7644type EndpointServiceResult struct {
7645	// Name - READ-ONLY; Name of the endpoint service.
7646	Name *string `json:"name,omitempty"`
7647	// Type - READ-ONLY; Type of the endpoint service.
7648	Type *string `json:"type,omitempty"`
7649	// ID - Resource ID.
7650	ID *string `json:"id,omitempty"`
7651}
7652
7653// MarshalJSON is the custom marshaler for EndpointServiceResult.
7654func (esr EndpointServiceResult) MarshalJSON() ([]byte, error) {
7655	objectMap := make(map[string]interface{})
7656	if esr.ID != nil {
7657		objectMap["id"] = esr.ID
7658	}
7659	return json.Marshal(objectMap)
7660}
7661
7662// EndpointServicesListResult response for the ListAvailableEndpointServices API service call.
7663type EndpointServicesListResult struct {
7664	autorest.Response `json:"-"`
7665	// Value - List of available endpoint services in a region.
7666	Value *[]EndpointServiceResult `json:"value,omitempty"`
7667	// NextLink - The URL to get the next set of results.
7668	NextLink *string `json:"nextLink,omitempty"`
7669}
7670
7671// EndpointServicesListResultIterator provides access to a complete listing of EndpointServiceResult
7672// values.
7673type EndpointServicesListResultIterator struct {
7674	i    int
7675	page EndpointServicesListResultPage
7676}
7677
7678// NextWithContext advances to the next value.  If there was an error making
7679// the request the iterator does not advance and the error is returned.
7680func (iter *EndpointServicesListResultIterator) NextWithContext(ctx context.Context) (err error) {
7681	if tracing.IsEnabled() {
7682		ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultIterator.NextWithContext")
7683		defer func() {
7684			sc := -1
7685			if iter.Response().Response.Response != nil {
7686				sc = iter.Response().Response.Response.StatusCode
7687			}
7688			tracing.EndSpan(ctx, sc, err)
7689		}()
7690	}
7691	iter.i++
7692	if iter.i < len(iter.page.Values()) {
7693		return nil
7694	}
7695	err = iter.page.NextWithContext(ctx)
7696	if err != nil {
7697		iter.i--
7698		return err
7699	}
7700	iter.i = 0
7701	return nil
7702}
7703
7704// Next advances to the next value.  If there was an error making
7705// the request the iterator does not advance and the error is returned.
7706// Deprecated: Use NextWithContext() instead.
7707func (iter *EndpointServicesListResultIterator) Next() error {
7708	return iter.NextWithContext(context.Background())
7709}
7710
7711// NotDone returns true if the enumeration should be started or is not yet complete.
7712func (iter EndpointServicesListResultIterator) NotDone() bool {
7713	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7714}
7715
7716// Response returns the raw server response from the last page request.
7717func (iter EndpointServicesListResultIterator) Response() EndpointServicesListResult {
7718	return iter.page.Response()
7719}
7720
7721// Value returns the current value or a zero-initialized value if the
7722// iterator has advanced beyond the end of the collection.
7723func (iter EndpointServicesListResultIterator) Value() EndpointServiceResult {
7724	if !iter.page.NotDone() {
7725		return EndpointServiceResult{}
7726	}
7727	return iter.page.Values()[iter.i]
7728}
7729
7730// Creates a new instance of the EndpointServicesListResultIterator type.
7731func NewEndpointServicesListResultIterator(page EndpointServicesListResultPage) EndpointServicesListResultIterator {
7732	return EndpointServicesListResultIterator{page: page}
7733}
7734
7735// IsEmpty returns true if the ListResult contains no values.
7736func (eslr EndpointServicesListResult) IsEmpty() bool {
7737	return eslr.Value == nil || len(*eslr.Value) == 0
7738}
7739
7740// hasNextLink returns true if the NextLink is not empty.
7741func (eslr EndpointServicesListResult) hasNextLink() bool {
7742	return eslr.NextLink != nil && len(*eslr.NextLink) != 0
7743}
7744
7745// endpointServicesListResultPreparer prepares a request to retrieve the next set of results.
7746// It returns nil if no more results exist.
7747func (eslr EndpointServicesListResult) endpointServicesListResultPreparer(ctx context.Context) (*http.Request, error) {
7748	if !eslr.hasNextLink() {
7749		return nil, nil
7750	}
7751	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7752		autorest.AsJSON(),
7753		autorest.AsGet(),
7754		autorest.WithBaseURL(to.String(eslr.NextLink)))
7755}
7756
7757// EndpointServicesListResultPage contains a page of EndpointServiceResult values.
7758type EndpointServicesListResultPage struct {
7759	fn   func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)
7760	eslr EndpointServicesListResult
7761}
7762
7763// NextWithContext advances to the next page of values.  If there was an error making
7764// the request the page does not advance and the error is returned.
7765func (page *EndpointServicesListResultPage) NextWithContext(ctx context.Context) (err error) {
7766	if tracing.IsEnabled() {
7767		ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultPage.NextWithContext")
7768		defer func() {
7769			sc := -1
7770			if page.Response().Response.Response != nil {
7771				sc = page.Response().Response.Response.StatusCode
7772			}
7773			tracing.EndSpan(ctx, sc, err)
7774		}()
7775	}
7776	for {
7777		next, err := page.fn(ctx, page.eslr)
7778		if err != nil {
7779			return err
7780		}
7781		page.eslr = next
7782		if !next.hasNextLink() || !next.IsEmpty() {
7783			break
7784		}
7785	}
7786	return nil
7787}
7788
7789// Next advances to the next page of values.  If there was an error making
7790// the request the page does not advance and the error is returned.
7791// Deprecated: Use NextWithContext() instead.
7792func (page *EndpointServicesListResultPage) Next() error {
7793	return page.NextWithContext(context.Background())
7794}
7795
7796// NotDone returns true if the page enumeration should be started or is not yet complete.
7797func (page EndpointServicesListResultPage) NotDone() bool {
7798	return !page.eslr.IsEmpty()
7799}
7800
7801// Response returns the raw server response from the last page request.
7802func (page EndpointServicesListResultPage) Response() EndpointServicesListResult {
7803	return page.eslr
7804}
7805
7806// Values returns the slice of values for the current page or nil if there are no values.
7807func (page EndpointServicesListResultPage) Values() []EndpointServiceResult {
7808	if page.eslr.IsEmpty() {
7809		return nil
7810	}
7811	return *page.eslr.Value
7812}
7813
7814// Creates a new instance of the EndpointServicesListResultPage type.
7815func NewEndpointServicesListResultPage(cur EndpointServicesListResult, getNextPage func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)) EndpointServicesListResultPage {
7816	return EndpointServicesListResultPage{
7817		fn:   getNextPage,
7818		eslr: cur,
7819	}
7820}
7821
7822// Error common error representation.
7823type Error struct {
7824	// Code - Error code.
7825	Code *string `json:"code,omitempty"`
7826	// Message - Error message.
7827	Message *string `json:"message,omitempty"`
7828	// Target - Error target.
7829	Target *string `json:"target,omitempty"`
7830	// Details - Error details.
7831	Details *[]ErrorDetails `json:"details,omitempty"`
7832	// InnerError - Inner error message.
7833	InnerError *string `json:"innerError,omitempty"`
7834}
7835
7836// ErrorDetails common error details representation.
7837type ErrorDetails struct {
7838	// Code - Error code.
7839	Code *string `json:"code,omitempty"`
7840	// Target - Error target.
7841	Target *string `json:"target,omitempty"`
7842	// Message - Error message.
7843	Message *string `json:"message,omitempty"`
7844}
7845
7846// ErrorResponse the error object.
7847type ErrorResponse struct {
7848	// Error - The error details object.
7849	Error *ErrorDetails `json:"error,omitempty"`
7850}
7851
7852// EvaluatedNetworkSecurityGroup results of network security group evaluation.
7853type EvaluatedNetworkSecurityGroup struct {
7854	// NetworkSecurityGroupID - Network security group ID.
7855	NetworkSecurityGroupID *string `json:"networkSecurityGroupId,omitempty"`
7856	// AppliedTo - Resource ID of nic or subnet to which network security group is applied.
7857	AppliedTo *string `json:"appliedTo,omitempty"`
7858	// MatchedRule - Matched network security rule.
7859	MatchedRule *MatchedRule `json:"matchedRule,omitempty"`
7860	// RulesEvaluationResult - READ-ONLY; List of network security rules evaluation results.
7861	RulesEvaluationResult *[]SecurityRulesEvaluationResult `json:"rulesEvaluationResult,omitempty"`
7862}
7863
7864// MarshalJSON is the custom marshaler for EvaluatedNetworkSecurityGroup.
7865func (ensg EvaluatedNetworkSecurityGroup) MarshalJSON() ([]byte, error) {
7866	objectMap := make(map[string]interface{})
7867	if ensg.NetworkSecurityGroupID != nil {
7868		objectMap["networkSecurityGroupId"] = ensg.NetworkSecurityGroupID
7869	}
7870	if ensg.AppliedTo != nil {
7871		objectMap["appliedTo"] = ensg.AppliedTo
7872	}
7873	if ensg.MatchedRule != nil {
7874		objectMap["matchedRule"] = ensg.MatchedRule
7875	}
7876	return json.Marshal(objectMap)
7877}
7878
7879// ExpressRouteCircuit expressRouteCircuit resource.
7880type ExpressRouteCircuit struct {
7881	autorest.Response `json:"-"`
7882	// Sku - The SKU.
7883	Sku *ExpressRouteCircuitSku `json:"sku,omitempty"`
7884	// ExpressRouteCircuitPropertiesFormat - Properties of the express route circuit.
7885	*ExpressRouteCircuitPropertiesFormat `json:"properties,omitempty"`
7886	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
7887	Etag *string `json:"etag,omitempty"`
7888	// ID - Resource ID.
7889	ID *string `json:"id,omitempty"`
7890	// Name - READ-ONLY; Resource name.
7891	Name *string `json:"name,omitempty"`
7892	// Type - READ-ONLY; Resource type.
7893	Type *string `json:"type,omitempty"`
7894	// Location - Resource location.
7895	Location *string `json:"location,omitempty"`
7896	// Tags - Resource tags.
7897	Tags map[string]*string `json:"tags"`
7898}
7899
7900// MarshalJSON is the custom marshaler for ExpressRouteCircuit.
7901func (erc ExpressRouteCircuit) MarshalJSON() ([]byte, error) {
7902	objectMap := make(map[string]interface{})
7903	if erc.Sku != nil {
7904		objectMap["sku"] = erc.Sku
7905	}
7906	if erc.ExpressRouteCircuitPropertiesFormat != nil {
7907		objectMap["properties"] = erc.ExpressRouteCircuitPropertiesFormat
7908	}
7909	if erc.ID != nil {
7910		objectMap["id"] = erc.ID
7911	}
7912	if erc.Location != nil {
7913		objectMap["location"] = erc.Location
7914	}
7915	if erc.Tags != nil {
7916		objectMap["tags"] = erc.Tags
7917	}
7918	return json.Marshal(objectMap)
7919}
7920
7921// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuit struct.
7922func (erc *ExpressRouteCircuit) UnmarshalJSON(body []byte) error {
7923	var m map[string]*json.RawMessage
7924	err := json.Unmarshal(body, &m)
7925	if err != nil {
7926		return err
7927	}
7928	for k, v := range m {
7929		switch k {
7930		case "sku":
7931			if v != nil {
7932				var sku ExpressRouteCircuitSku
7933				err = json.Unmarshal(*v, &sku)
7934				if err != nil {
7935					return err
7936				}
7937				erc.Sku = &sku
7938			}
7939		case "properties":
7940			if v != nil {
7941				var expressRouteCircuitPropertiesFormat ExpressRouteCircuitPropertiesFormat
7942				err = json.Unmarshal(*v, &expressRouteCircuitPropertiesFormat)
7943				if err != nil {
7944					return err
7945				}
7946				erc.ExpressRouteCircuitPropertiesFormat = &expressRouteCircuitPropertiesFormat
7947			}
7948		case "etag":
7949			if v != nil {
7950				var etag string
7951				err = json.Unmarshal(*v, &etag)
7952				if err != nil {
7953					return err
7954				}
7955				erc.Etag = &etag
7956			}
7957		case "id":
7958			if v != nil {
7959				var ID string
7960				err = json.Unmarshal(*v, &ID)
7961				if err != nil {
7962					return err
7963				}
7964				erc.ID = &ID
7965			}
7966		case "name":
7967			if v != nil {
7968				var name string
7969				err = json.Unmarshal(*v, &name)
7970				if err != nil {
7971					return err
7972				}
7973				erc.Name = &name
7974			}
7975		case "type":
7976			if v != nil {
7977				var typeVar string
7978				err = json.Unmarshal(*v, &typeVar)
7979				if err != nil {
7980					return err
7981				}
7982				erc.Type = &typeVar
7983			}
7984		case "location":
7985			if v != nil {
7986				var location string
7987				err = json.Unmarshal(*v, &location)
7988				if err != nil {
7989					return err
7990				}
7991				erc.Location = &location
7992			}
7993		case "tags":
7994			if v != nil {
7995				var tags map[string]*string
7996				err = json.Unmarshal(*v, &tags)
7997				if err != nil {
7998					return err
7999				}
8000				erc.Tags = tags
8001			}
8002		}
8003	}
8004
8005	return nil
8006}
8007
8008// ExpressRouteCircuitArpTable the ARP table associated with the ExpressRouteCircuit.
8009type ExpressRouteCircuitArpTable struct {
8010	// Age - Entry age in minutes.
8011	Age *int32 `json:"age,omitempty"`
8012	// Interface - Interface address.
8013	Interface *string `json:"interface,omitempty"`
8014	// IPAddress - The IP address.
8015	IPAddress *string `json:"ipAddress,omitempty"`
8016	// MacAddress - The MAC address.
8017	MacAddress *string `json:"macAddress,omitempty"`
8018}
8019
8020// ExpressRouteCircuitAuthorization authorization in an ExpressRouteCircuit resource.
8021type ExpressRouteCircuitAuthorization struct {
8022	autorest.Response `json:"-"`
8023	// AuthorizationPropertiesFormat - Properties of the express route circuit authorization.
8024	*AuthorizationPropertiesFormat `json:"properties,omitempty"`
8025	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
8026	Name *string `json:"name,omitempty"`
8027	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
8028	Etag *string `json:"etag,omitempty"`
8029	// Type - READ-ONLY; Type of the resource.
8030	Type *string `json:"type,omitempty"`
8031	// ID - Resource ID.
8032	ID *string `json:"id,omitempty"`
8033}
8034
8035// MarshalJSON is the custom marshaler for ExpressRouteCircuitAuthorization.
8036func (erca ExpressRouteCircuitAuthorization) MarshalJSON() ([]byte, error) {
8037	objectMap := make(map[string]interface{})
8038	if erca.AuthorizationPropertiesFormat != nil {
8039		objectMap["properties"] = erca.AuthorizationPropertiesFormat
8040	}
8041	if erca.Name != nil {
8042		objectMap["name"] = erca.Name
8043	}
8044	if erca.ID != nil {
8045		objectMap["id"] = erca.ID
8046	}
8047	return json.Marshal(objectMap)
8048}
8049
8050// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitAuthorization struct.
8051func (erca *ExpressRouteCircuitAuthorization) UnmarshalJSON(body []byte) error {
8052	var m map[string]*json.RawMessage
8053	err := json.Unmarshal(body, &m)
8054	if err != nil {
8055		return err
8056	}
8057	for k, v := range m {
8058		switch k {
8059		case "properties":
8060			if v != nil {
8061				var authorizationPropertiesFormat AuthorizationPropertiesFormat
8062				err = json.Unmarshal(*v, &authorizationPropertiesFormat)
8063				if err != nil {
8064					return err
8065				}
8066				erca.AuthorizationPropertiesFormat = &authorizationPropertiesFormat
8067			}
8068		case "name":
8069			if v != nil {
8070				var name string
8071				err = json.Unmarshal(*v, &name)
8072				if err != nil {
8073					return err
8074				}
8075				erca.Name = &name
8076			}
8077		case "etag":
8078			if v != nil {
8079				var etag string
8080				err = json.Unmarshal(*v, &etag)
8081				if err != nil {
8082					return err
8083				}
8084				erca.Etag = &etag
8085			}
8086		case "type":
8087			if v != nil {
8088				var typeVar string
8089				err = json.Unmarshal(*v, &typeVar)
8090				if err != nil {
8091					return err
8092				}
8093				erca.Type = &typeVar
8094			}
8095		case "id":
8096			if v != nil {
8097				var ID string
8098				err = json.Unmarshal(*v, &ID)
8099				if err != nil {
8100					return err
8101				}
8102				erca.ID = &ID
8103			}
8104		}
8105	}
8106
8107	return nil
8108}
8109
8110// ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
8111// results of a long-running operation.
8112type ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture struct {
8113	azure.FutureAPI
8114	// Result returns the result of the asynchronous operation.
8115	// If the operation has not completed it will return an error.
8116	Result func(ExpressRouteCircuitAuthorizationsClient) (ExpressRouteCircuitAuthorization, error)
8117}
8118
8119// ExpressRouteCircuitAuthorizationsDeleteFuture an abstraction for monitoring and retrieving the results
8120// of a long-running operation.
8121type ExpressRouteCircuitAuthorizationsDeleteFuture struct {
8122	azure.FutureAPI
8123	// Result returns the result of the asynchronous operation.
8124	// If the operation has not completed it will return an error.
8125	Result func(ExpressRouteCircuitAuthorizationsClient) (autorest.Response, error)
8126}
8127
8128// ExpressRouteCircuitConnection express Route Circuit Connection in an ExpressRouteCircuitPeering
8129// resource.
8130type ExpressRouteCircuitConnection struct {
8131	autorest.Response `json:"-"`
8132	// ExpressRouteCircuitConnectionPropertiesFormat - Properties of the express route circuit connection.
8133	*ExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"`
8134	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
8135	Name *string `json:"name,omitempty"`
8136	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
8137	Etag *string `json:"etag,omitempty"`
8138	// Type - READ-ONLY; Type of the resource.
8139	Type *string `json:"type,omitempty"`
8140	// ID - Resource ID.
8141	ID *string `json:"id,omitempty"`
8142}
8143
8144// MarshalJSON is the custom marshaler for ExpressRouteCircuitConnection.
8145func (ercc ExpressRouteCircuitConnection) MarshalJSON() ([]byte, error) {
8146	objectMap := make(map[string]interface{})
8147	if ercc.ExpressRouteCircuitConnectionPropertiesFormat != nil {
8148		objectMap["properties"] = ercc.ExpressRouteCircuitConnectionPropertiesFormat
8149	}
8150	if ercc.Name != nil {
8151		objectMap["name"] = ercc.Name
8152	}
8153	if ercc.ID != nil {
8154		objectMap["id"] = ercc.ID
8155	}
8156	return json.Marshal(objectMap)
8157}
8158
8159// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitConnection struct.
8160func (ercc *ExpressRouteCircuitConnection) UnmarshalJSON(body []byte) error {
8161	var m map[string]*json.RawMessage
8162	err := json.Unmarshal(body, &m)
8163	if err != nil {
8164		return err
8165	}
8166	for k, v := range m {
8167		switch k {
8168		case "properties":
8169			if v != nil {
8170				var expressRouteCircuitConnectionPropertiesFormat ExpressRouteCircuitConnectionPropertiesFormat
8171				err = json.Unmarshal(*v, &expressRouteCircuitConnectionPropertiesFormat)
8172				if err != nil {
8173					return err
8174				}
8175				ercc.ExpressRouteCircuitConnectionPropertiesFormat = &expressRouteCircuitConnectionPropertiesFormat
8176			}
8177		case "name":
8178			if v != nil {
8179				var name string
8180				err = json.Unmarshal(*v, &name)
8181				if err != nil {
8182					return err
8183				}
8184				ercc.Name = &name
8185			}
8186		case "etag":
8187			if v != nil {
8188				var etag string
8189				err = json.Unmarshal(*v, &etag)
8190				if err != nil {
8191					return err
8192				}
8193				ercc.Etag = &etag
8194			}
8195		case "type":
8196			if v != nil {
8197				var typeVar string
8198				err = json.Unmarshal(*v, &typeVar)
8199				if err != nil {
8200					return err
8201				}
8202				ercc.Type = &typeVar
8203			}
8204		case "id":
8205			if v != nil {
8206				var ID string
8207				err = json.Unmarshal(*v, &ID)
8208				if err != nil {
8209					return err
8210				}
8211				ercc.ID = &ID
8212			}
8213		}
8214	}
8215
8216	return nil
8217}
8218
8219// ExpressRouteCircuitConnectionListResult response for ListConnections API service call retrieves all
8220// global reach connections that belongs to a Private Peering for an ExpressRouteCircuit.
8221type ExpressRouteCircuitConnectionListResult struct {
8222	autorest.Response `json:"-"`
8223	// Value - The global reach connection associated with Private Peering in an ExpressRoute Circuit.
8224	Value *[]ExpressRouteCircuitConnection `json:"value,omitempty"`
8225	// NextLink - The URL to get the next set of results.
8226	NextLink *string `json:"nextLink,omitempty"`
8227}
8228
8229// ExpressRouteCircuitConnectionListResultIterator provides access to a complete listing of
8230// ExpressRouteCircuitConnection values.
8231type ExpressRouteCircuitConnectionListResultIterator struct {
8232	i    int
8233	page ExpressRouteCircuitConnectionListResultPage
8234}
8235
8236// NextWithContext advances to the next value.  If there was an error making
8237// the request the iterator does not advance and the error is returned.
8238func (iter *ExpressRouteCircuitConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
8239	if tracing.IsEnabled() {
8240		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitConnectionListResultIterator.NextWithContext")
8241		defer func() {
8242			sc := -1
8243			if iter.Response().Response.Response != nil {
8244				sc = iter.Response().Response.Response.StatusCode
8245			}
8246			tracing.EndSpan(ctx, sc, err)
8247		}()
8248	}
8249	iter.i++
8250	if iter.i < len(iter.page.Values()) {
8251		return nil
8252	}
8253	err = iter.page.NextWithContext(ctx)
8254	if err != nil {
8255		iter.i--
8256		return err
8257	}
8258	iter.i = 0
8259	return nil
8260}
8261
8262// Next advances to the next value.  If there was an error making
8263// the request the iterator does not advance and the error is returned.
8264// Deprecated: Use NextWithContext() instead.
8265func (iter *ExpressRouteCircuitConnectionListResultIterator) Next() error {
8266	return iter.NextWithContext(context.Background())
8267}
8268
8269// NotDone returns true if the enumeration should be started or is not yet complete.
8270func (iter ExpressRouteCircuitConnectionListResultIterator) NotDone() bool {
8271	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8272}
8273
8274// Response returns the raw server response from the last page request.
8275func (iter ExpressRouteCircuitConnectionListResultIterator) Response() ExpressRouteCircuitConnectionListResult {
8276	return iter.page.Response()
8277}
8278
8279// Value returns the current value or a zero-initialized value if the
8280// iterator has advanced beyond the end of the collection.
8281func (iter ExpressRouteCircuitConnectionListResultIterator) Value() ExpressRouteCircuitConnection {
8282	if !iter.page.NotDone() {
8283		return ExpressRouteCircuitConnection{}
8284	}
8285	return iter.page.Values()[iter.i]
8286}
8287
8288// Creates a new instance of the ExpressRouteCircuitConnectionListResultIterator type.
8289func NewExpressRouteCircuitConnectionListResultIterator(page ExpressRouteCircuitConnectionListResultPage) ExpressRouteCircuitConnectionListResultIterator {
8290	return ExpressRouteCircuitConnectionListResultIterator{page: page}
8291}
8292
8293// IsEmpty returns true if the ListResult contains no values.
8294func (ercclr ExpressRouteCircuitConnectionListResult) IsEmpty() bool {
8295	return ercclr.Value == nil || len(*ercclr.Value) == 0
8296}
8297
8298// hasNextLink returns true if the NextLink is not empty.
8299func (ercclr ExpressRouteCircuitConnectionListResult) hasNextLink() bool {
8300	return ercclr.NextLink != nil && len(*ercclr.NextLink) != 0
8301}
8302
8303// expressRouteCircuitConnectionListResultPreparer prepares a request to retrieve the next set of results.
8304// It returns nil if no more results exist.
8305func (ercclr ExpressRouteCircuitConnectionListResult) expressRouteCircuitConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
8306	if !ercclr.hasNextLink() {
8307		return nil, nil
8308	}
8309	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8310		autorest.AsJSON(),
8311		autorest.AsGet(),
8312		autorest.WithBaseURL(to.String(ercclr.NextLink)))
8313}
8314
8315// ExpressRouteCircuitConnectionListResultPage contains a page of ExpressRouteCircuitConnection values.
8316type ExpressRouteCircuitConnectionListResultPage struct {
8317	fn     func(context.Context, ExpressRouteCircuitConnectionListResult) (ExpressRouteCircuitConnectionListResult, error)
8318	ercclr ExpressRouteCircuitConnectionListResult
8319}
8320
8321// NextWithContext advances to the next page of values.  If there was an error making
8322// the request the page does not advance and the error is returned.
8323func (page *ExpressRouteCircuitConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
8324	if tracing.IsEnabled() {
8325		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitConnectionListResultPage.NextWithContext")
8326		defer func() {
8327			sc := -1
8328			if page.Response().Response.Response != nil {
8329				sc = page.Response().Response.Response.StatusCode
8330			}
8331			tracing.EndSpan(ctx, sc, err)
8332		}()
8333	}
8334	for {
8335		next, err := page.fn(ctx, page.ercclr)
8336		if err != nil {
8337			return err
8338		}
8339		page.ercclr = next
8340		if !next.hasNextLink() || !next.IsEmpty() {
8341			break
8342		}
8343	}
8344	return nil
8345}
8346
8347// Next advances to the next page of values.  If there was an error making
8348// the request the page does not advance and the error is returned.
8349// Deprecated: Use NextWithContext() instead.
8350func (page *ExpressRouteCircuitConnectionListResultPage) Next() error {
8351	return page.NextWithContext(context.Background())
8352}
8353
8354// NotDone returns true if the page enumeration should be started or is not yet complete.
8355func (page ExpressRouteCircuitConnectionListResultPage) NotDone() bool {
8356	return !page.ercclr.IsEmpty()
8357}
8358
8359// Response returns the raw server response from the last page request.
8360func (page ExpressRouteCircuitConnectionListResultPage) Response() ExpressRouteCircuitConnectionListResult {
8361	return page.ercclr
8362}
8363
8364// Values returns the slice of values for the current page or nil if there are no values.
8365func (page ExpressRouteCircuitConnectionListResultPage) Values() []ExpressRouteCircuitConnection {
8366	if page.ercclr.IsEmpty() {
8367		return nil
8368	}
8369	return *page.ercclr.Value
8370}
8371
8372// Creates a new instance of the ExpressRouteCircuitConnectionListResultPage type.
8373func NewExpressRouteCircuitConnectionListResultPage(cur ExpressRouteCircuitConnectionListResult, getNextPage func(context.Context, ExpressRouteCircuitConnectionListResult) (ExpressRouteCircuitConnectionListResult, error)) ExpressRouteCircuitConnectionListResultPage {
8374	return ExpressRouteCircuitConnectionListResultPage{
8375		fn:     getNextPage,
8376		ercclr: cur,
8377	}
8378}
8379
8380// ExpressRouteCircuitConnectionPropertiesFormat properties of the express route circuit connection.
8381type ExpressRouteCircuitConnectionPropertiesFormat struct {
8382	// ExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the circuit initiating connection.
8383	ExpressRouteCircuitPeering *SubResource `json:"expressRouteCircuitPeering,omitempty"`
8384	// PeerExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the peered circuit.
8385	PeerExpressRouteCircuitPeering *SubResource `json:"peerExpressRouteCircuitPeering,omitempty"`
8386	// AddressPrefix - /29 IP address space to carve out Customer addresses for tunnels.
8387	AddressPrefix *string `json:"addressPrefix,omitempty"`
8388	// AuthorizationKey - The authorization key.
8389	AuthorizationKey *string `json:"authorizationKey,omitempty"`
8390	// CircuitConnectionStatus - Express Route Circuit connection state. Possible values include: 'Connected', 'Connecting', 'Disconnected'
8391	CircuitConnectionStatus CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"`
8392	// ProvisioningState - READ-ONLY; Provisioning state of the circuit connection resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
8393	ProvisioningState *string `json:"provisioningState,omitempty"`
8394}
8395
8396// MarshalJSON is the custom marshaler for ExpressRouteCircuitConnectionPropertiesFormat.
8397func (erccpf ExpressRouteCircuitConnectionPropertiesFormat) MarshalJSON() ([]byte, error) {
8398	objectMap := make(map[string]interface{})
8399	if erccpf.ExpressRouteCircuitPeering != nil {
8400		objectMap["expressRouteCircuitPeering"] = erccpf.ExpressRouteCircuitPeering
8401	}
8402	if erccpf.PeerExpressRouteCircuitPeering != nil {
8403		objectMap["peerExpressRouteCircuitPeering"] = erccpf.PeerExpressRouteCircuitPeering
8404	}
8405	if erccpf.AddressPrefix != nil {
8406		objectMap["addressPrefix"] = erccpf.AddressPrefix
8407	}
8408	if erccpf.AuthorizationKey != nil {
8409		objectMap["authorizationKey"] = erccpf.AuthorizationKey
8410	}
8411	if erccpf.CircuitConnectionStatus != "" {
8412		objectMap["circuitConnectionStatus"] = erccpf.CircuitConnectionStatus
8413	}
8414	return json.Marshal(objectMap)
8415}
8416
8417// ExpressRouteCircuitConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
8418// results of a long-running operation.
8419type ExpressRouteCircuitConnectionsCreateOrUpdateFuture struct {
8420	azure.FutureAPI
8421	// Result returns the result of the asynchronous operation.
8422	// If the operation has not completed it will return an error.
8423	Result func(ExpressRouteCircuitConnectionsClient) (ExpressRouteCircuitConnection, error)
8424}
8425
8426// ExpressRouteCircuitConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a
8427// long-running operation.
8428type ExpressRouteCircuitConnectionsDeleteFuture struct {
8429	azure.FutureAPI
8430	// Result returns the result of the asynchronous operation.
8431	// If the operation has not completed it will return an error.
8432	Result func(ExpressRouteCircuitConnectionsClient) (autorest.Response, error)
8433}
8434
8435// ExpressRouteCircuitListResult response for ListExpressRouteCircuit API service call.
8436type ExpressRouteCircuitListResult struct {
8437	autorest.Response `json:"-"`
8438	// Value - A list of ExpressRouteCircuits in a resource group.
8439	Value *[]ExpressRouteCircuit `json:"value,omitempty"`
8440	// NextLink - The URL to get the next set of results.
8441	NextLink *string `json:"nextLink,omitempty"`
8442}
8443
8444// ExpressRouteCircuitListResultIterator provides access to a complete listing of ExpressRouteCircuit
8445// values.
8446type ExpressRouteCircuitListResultIterator struct {
8447	i    int
8448	page ExpressRouteCircuitListResultPage
8449}
8450
8451// NextWithContext advances to the next value.  If there was an error making
8452// the request the iterator does not advance and the error is returned.
8453func (iter *ExpressRouteCircuitListResultIterator) NextWithContext(ctx context.Context) (err error) {
8454	if tracing.IsEnabled() {
8455		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultIterator.NextWithContext")
8456		defer func() {
8457			sc := -1
8458			if iter.Response().Response.Response != nil {
8459				sc = iter.Response().Response.Response.StatusCode
8460			}
8461			tracing.EndSpan(ctx, sc, err)
8462		}()
8463	}
8464	iter.i++
8465	if iter.i < len(iter.page.Values()) {
8466		return nil
8467	}
8468	err = iter.page.NextWithContext(ctx)
8469	if err != nil {
8470		iter.i--
8471		return err
8472	}
8473	iter.i = 0
8474	return nil
8475}
8476
8477// Next advances to the next value.  If there was an error making
8478// the request the iterator does not advance and the error is returned.
8479// Deprecated: Use NextWithContext() instead.
8480func (iter *ExpressRouteCircuitListResultIterator) Next() error {
8481	return iter.NextWithContext(context.Background())
8482}
8483
8484// NotDone returns true if the enumeration should be started or is not yet complete.
8485func (iter ExpressRouteCircuitListResultIterator) NotDone() bool {
8486	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8487}
8488
8489// Response returns the raw server response from the last page request.
8490func (iter ExpressRouteCircuitListResultIterator) Response() ExpressRouteCircuitListResult {
8491	return iter.page.Response()
8492}
8493
8494// Value returns the current value or a zero-initialized value if the
8495// iterator has advanced beyond the end of the collection.
8496func (iter ExpressRouteCircuitListResultIterator) Value() ExpressRouteCircuit {
8497	if !iter.page.NotDone() {
8498		return ExpressRouteCircuit{}
8499	}
8500	return iter.page.Values()[iter.i]
8501}
8502
8503// Creates a new instance of the ExpressRouteCircuitListResultIterator type.
8504func NewExpressRouteCircuitListResultIterator(page ExpressRouteCircuitListResultPage) ExpressRouteCircuitListResultIterator {
8505	return ExpressRouteCircuitListResultIterator{page: page}
8506}
8507
8508// IsEmpty returns true if the ListResult contains no values.
8509func (erclr ExpressRouteCircuitListResult) IsEmpty() bool {
8510	return erclr.Value == nil || len(*erclr.Value) == 0
8511}
8512
8513// hasNextLink returns true if the NextLink is not empty.
8514func (erclr ExpressRouteCircuitListResult) hasNextLink() bool {
8515	return erclr.NextLink != nil && len(*erclr.NextLink) != 0
8516}
8517
8518// expressRouteCircuitListResultPreparer prepares a request to retrieve the next set of results.
8519// It returns nil if no more results exist.
8520func (erclr ExpressRouteCircuitListResult) expressRouteCircuitListResultPreparer(ctx context.Context) (*http.Request, error) {
8521	if !erclr.hasNextLink() {
8522		return nil, nil
8523	}
8524	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8525		autorest.AsJSON(),
8526		autorest.AsGet(),
8527		autorest.WithBaseURL(to.String(erclr.NextLink)))
8528}
8529
8530// ExpressRouteCircuitListResultPage contains a page of ExpressRouteCircuit values.
8531type ExpressRouteCircuitListResultPage struct {
8532	fn    func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)
8533	erclr ExpressRouteCircuitListResult
8534}
8535
8536// NextWithContext advances to the next page of values.  If there was an error making
8537// the request the page does not advance and the error is returned.
8538func (page *ExpressRouteCircuitListResultPage) NextWithContext(ctx context.Context) (err error) {
8539	if tracing.IsEnabled() {
8540		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultPage.NextWithContext")
8541		defer func() {
8542			sc := -1
8543			if page.Response().Response.Response != nil {
8544				sc = page.Response().Response.Response.StatusCode
8545			}
8546			tracing.EndSpan(ctx, sc, err)
8547		}()
8548	}
8549	for {
8550		next, err := page.fn(ctx, page.erclr)
8551		if err != nil {
8552			return err
8553		}
8554		page.erclr = next
8555		if !next.hasNextLink() || !next.IsEmpty() {
8556			break
8557		}
8558	}
8559	return nil
8560}
8561
8562// Next advances to the next page of values.  If there was an error making
8563// the request the page does not advance and the error is returned.
8564// Deprecated: Use NextWithContext() instead.
8565func (page *ExpressRouteCircuitListResultPage) Next() error {
8566	return page.NextWithContext(context.Background())
8567}
8568
8569// NotDone returns true if the page enumeration should be started or is not yet complete.
8570func (page ExpressRouteCircuitListResultPage) NotDone() bool {
8571	return !page.erclr.IsEmpty()
8572}
8573
8574// Response returns the raw server response from the last page request.
8575func (page ExpressRouteCircuitListResultPage) Response() ExpressRouteCircuitListResult {
8576	return page.erclr
8577}
8578
8579// Values returns the slice of values for the current page or nil if there are no values.
8580func (page ExpressRouteCircuitListResultPage) Values() []ExpressRouteCircuit {
8581	if page.erclr.IsEmpty() {
8582		return nil
8583	}
8584	return *page.erclr.Value
8585}
8586
8587// Creates a new instance of the ExpressRouteCircuitListResultPage type.
8588func NewExpressRouteCircuitListResultPage(cur ExpressRouteCircuitListResult, getNextPage func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)) ExpressRouteCircuitListResultPage {
8589	return ExpressRouteCircuitListResultPage{
8590		fn:    getNextPage,
8591		erclr: cur,
8592	}
8593}
8594
8595// ExpressRouteCircuitPeering peering in an ExpressRouteCircuit resource.
8596type ExpressRouteCircuitPeering struct {
8597	autorest.Response `json:"-"`
8598	// ExpressRouteCircuitPeeringPropertiesFormat - Properties of the express route circuit peering.
8599	*ExpressRouteCircuitPeeringPropertiesFormat `json:"properties,omitempty"`
8600	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
8601	Name *string `json:"name,omitempty"`
8602	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
8603	Etag *string `json:"etag,omitempty"`
8604	// Type - READ-ONLY; Type of the resource.
8605	Type *string `json:"type,omitempty"`
8606	// ID - Resource ID.
8607	ID *string `json:"id,omitempty"`
8608}
8609
8610// MarshalJSON is the custom marshaler for ExpressRouteCircuitPeering.
8611func (ercp ExpressRouteCircuitPeering) MarshalJSON() ([]byte, error) {
8612	objectMap := make(map[string]interface{})
8613	if ercp.ExpressRouteCircuitPeeringPropertiesFormat != nil {
8614		objectMap["properties"] = ercp.ExpressRouteCircuitPeeringPropertiesFormat
8615	}
8616	if ercp.Name != nil {
8617		objectMap["name"] = ercp.Name
8618	}
8619	if ercp.ID != nil {
8620		objectMap["id"] = ercp.ID
8621	}
8622	return json.Marshal(objectMap)
8623}
8624
8625// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitPeering struct.
8626func (ercp *ExpressRouteCircuitPeering) UnmarshalJSON(body []byte) error {
8627	var m map[string]*json.RawMessage
8628	err := json.Unmarshal(body, &m)
8629	if err != nil {
8630		return err
8631	}
8632	for k, v := range m {
8633		switch k {
8634		case "properties":
8635			if v != nil {
8636				var expressRouteCircuitPeeringPropertiesFormat ExpressRouteCircuitPeeringPropertiesFormat
8637				err = json.Unmarshal(*v, &expressRouteCircuitPeeringPropertiesFormat)
8638				if err != nil {
8639					return err
8640				}
8641				ercp.ExpressRouteCircuitPeeringPropertiesFormat = &expressRouteCircuitPeeringPropertiesFormat
8642			}
8643		case "name":
8644			if v != nil {
8645				var name string
8646				err = json.Unmarshal(*v, &name)
8647				if err != nil {
8648					return err
8649				}
8650				ercp.Name = &name
8651			}
8652		case "etag":
8653			if v != nil {
8654				var etag string
8655				err = json.Unmarshal(*v, &etag)
8656				if err != nil {
8657					return err
8658				}
8659				ercp.Etag = &etag
8660			}
8661		case "type":
8662			if v != nil {
8663				var typeVar string
8664				err = json.Unmarshal(*v, &typeVar)
8665				if err != nil {
8666					return err
8667				}
8668				ercp.Type = &typeVar
8669			}
8670		case "id":
8671			if v != nil {
8672				var ID string
8673				err = json.Unmarshal(*v, &ID)
8674				if err != nil {
8675					return err
8676				}
8677				ercp.ID = &ID
8678			}
8679		}
8680	}
8681
8682	return nil
8683}
8684
8685// ExpressRouteCircuitPeeringConfig specifies the peering configuration.
8686type ExpressRouteCircuitPeeringConfig struct {
8687	// AdvertisedPublicPrefixes - The reference of AdvertisedPublicPrefixes.
8688	AdvertisedPublicPrefixes *[]string `json:"advertisedPublicPrefixes,omitempty"`
8689	// AdvertisedCommunities - The communities of bgp peering. Specified for microsoft peering.
8690	AdvertisedCommunities *[]string `json:"advertisedCommunities,omitempty"`
8691	// AdvertisedPublicPrefixesState - The advertised public prefix state of the Peering resource. Possible values include: 'NotConfigured', 'Configuring', 'Configured', 'ValidationNeeded'
8692	AdvertisedPublicPrefixesState ExpressRouteCircuitPeeringAdvertisedPublicPrefixState `json:"advertisedPublicPrefixesState,omitempty"`
8693	// LegacyMode - The legacy mode of the peering.
8694	LegacyMode *int32 `json:"legacyMode,omitempty"`
8695	// CustomerASN - The CustomerASN of the peering.
8696	CustomerASN *int32 `json:"customerASN,omitempty"`
8697	// RoutingRegistryName - The RoutingRegistryName of the configuration.
8698	RoutingRegistryName *string `json:"routingRegistryName,omitempty"`
8699}
8700
8701// ExpressRouteCircuitPeeringID expressRoute circuit peering identifier.
8702type ExpressRouteCircuitPeeringID struct {
8703	// ID - The ID of the ExpressRoute circuit peering.
8704	ID *string `json:"id,omitempty"`
8705}
8706
8707// ExpressRouteCircuitPeeringListResult response for ListPeering API service call retrieves all peerings
8708// that belong to an ExpressRouteCircuit.
8709type ExpressRouteCircuitPeeringListResult struct {
8710	autorest.Response `json:"-"`
8711	// Value - The peerings in an express route circuit.
8712	Value *[]ExpressRouteCircuitPeering `json:"value,omitempty"`
8713	// NextLink - The URL to get the next set of results.
8714	NextLink *string `json:"nextLink,omitempty"`
8715}
8716
8717// ExpressRouteCircuitPeeringListResultIterator provides access to a complete listing of
8718// ExpressRouteCircuitPeering values.
8719type ExpressRouteCircuitPeeringListResultIterator struct {
8720	i    int
8721	page ExpressRouteCircuitPeeringListResultPage
8722}
8723
8724// NextWithContext advances to the next value.  If there was an error making
8725// the request the iterator does not advance and the error is returned.
8726func (iter *ExpressRouteCircuitPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
8727	if tracing.IsEnabled() {
8728		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultIterator.NextWithContext")
8729		defer func() {
8730			sc := -1
8731			if iter.Response().Response.Response != nil {
8732				sc = iter.Response().Response.Response.StatusCode
8733			}
8734			tracing.EndSpan(ctx, sc, err)
8735		}()
8736	}
8737	iter.i++
8738	if iter.i < len(iter.page.Values()) {
8739		return nil
8740	}
8741	err = iter.page.NextWithContext(ctx)
8742	if err != nil {
8743		iter.i--
8744		return err
8745	}
8746	iter.i = 0
8747	return nil
8748}
8749
8750// Next advances to the next value.  If there was an error making
8751// the request the iterator does not advance and the error is returned.
8752// Deprecated: Use NextWithContext() instead.
8753func (iter *ExpressRouteCircuitPeeringListResultIterator) Next() error {
8754	return iter.NextWithContext(context.Background())
8755}
8756
8757// NotDone returns true if the enumeration should be started or is not yet complete.
8758func (iter ExpressRouteCircuitPeeringListResultIterator) NotDone() bool {
8759	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8760}
8761
8762// Response returns the raw server response from the last page request.
8763func (iter ExpressRouteCircuitPeeringListResultIterator) Response() ExpressRouteCircuitPeeringListResult {
8764	return iter.page.Response()
8765}
8766
8767// Value returns the current value or a zero-initialized value if the
8768// iterator has advanced beyond the end of the collection.
8769func (iter ExpressRouteCircuitPeeringListResultIterator) Value() ExpressRouteCircuitPeering {
8770	if !iter.page.NotDone() {
8771		return ExpressRouteCircuitPeering{}
8772	}
8773	return iter.page.Values()[iter.i]
8774}
8775
8776// Creates a new instance of the ExpressRouteCircuitPeeringListResultIterator type.
8777func NewExpressRouteCircuitPeeringListResultIterator(page ExpressRouteCircuitPeeringListResultPage) ExpressRouteCircuitPeeringListResultIterator {
8778	return ExpressRouteCircuitPeeringListResultIterator{page: page}
8779}
8780
8781// IsEmpty returns true if the ListResult contains no values.
8782func (ercplr ExpressRouteCircuitPeeringListResult) IsEmpty() bool {
8783	return ercplr.Value == nil || len(*ercplr.Value) == 0
8784}
8785
8786// hasNextLink returns true if the NextLink is not empty.
8787func (ercplr ExpressRouteCircuitPeeringListResult) hasNextLink() bool {
8788	return ercplr.NextLink != nil && len(*ercplr.NextLink) != 0
8789}
8790
8791// expressRouteCircuitPeeringListResultPreparer prepares a request to retrieve the next set of results.
8792// It returns nil if no more results exist.
8793func (ercplr ExpressRouteCircuitPeeringListResult) expressRouteCircuitPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
8794	if !ercplr.hasNextLink() {
8795		return nil, nil
8796	}
8797	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8798		autorest.AsJSON(),
8799		autorest.AsGet(),
8800		autorest.WithBaseURL(to.String(ercplr.NextLink)))
8801}
8802
8803// ExpressRouteCircuitPeeringListResultPage contains a page of ExpressRouteCircuitPeering values.
8804type ExpressRouteCircuitPeeringListResultPage struct {
8805	fn     func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)
8806	ercplr ExpressRouteCircuitPeeringListResult
8807}
8808
8809// NextWithContext advances to the next page of values.  If there was an error making
8810// the request the page does not advance and the error is returned.
8811func (page *ExpressRouteCircuitPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
8812	if tracing.IsEnabled() {
8813		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultPage.NextWithContext")
8814		defer func() {
8815			sc := -1
8816			if page.Response().Response.Response != nil {
8817				sc = page.Response().Response.Response.StatusCode
8818			}
8819			tracing.EndSpan(ctx, sc, err)
8820		}()
8821	}
8822	for {
8823		next, err := page.fn(ctx, page.ercplr)
8824		if err != nil {
8825			return err
8826		}
8827		page.ercplr = next
8828		if !next.hasNextLink() || !next.IsEmpty() {
8829			break
8830		}
8831	}
8832	return nil
8833}
8834
8835// Next advances to the next page of values.  If there was an error making
8836// the request the page does not advance and the error is returned.
8837// Deprecated: Use NextWithContext() instead.
8838func (page *ExpressRouteCircuitPeeringListResultPage) Next() error {
8839	return page.NextWithContext(context.Background())
8840}
8841
8842// NotDone returns true if the page enumeration should be started or is not yet complete.
8843func (page ExpressRouteCircuitPeeringListResultPage) NotDone() bool {
8844	return !page.ercplr.IsEmpty()
8845}
8846
8847// Response returns the raw server response from the last page request.
8848func (page ExpressRouteCircuitPeeringListResultPage) Response() ExpressRouteCircuitPeeringListResult {
8849	return page.ercplr
8850}
8851
8852// Values returns the slice of values for the current page or nil if there are no values.
8853func (page ExpressRouteCircuitPeeringListResultPage) Values() []ExpressRouteCircuitPeering {
8854	if page.ercplr.IsEmpty() {
8855		return nil
8856	}
8857	return *page.ercplr.Value
8858}
8859
8860// Creates a new instance of the ExpressRouteCircuitPeeringListResultPage type.
8861func NewExpressRouteCircuitPeeringListResultPage(cur ExpressRouteCircuitPeeringListResult, getNextPage func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)) ExpressRouteCircuitPeeringListResultPage {
8862	return ExpressRouteCircuitPeeringListResultPage{
8863		fn:     getNextPage,
8864		ercplr: cur,
8865	}
8866}
8867
8868// ExpressRouteCircuitPeeringPropertiesFormat properties of the express route circuit peering.
8869type ExpressRouteCircuitPeeringPropertiesFormat struct {
8870	// PeeringType - The peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'
8871	PeeringType ExpressRoutePeeringType `json:"peeringType,omitempty"`
8872	// State - The peering state. Possible values include: 'ExpressRoutePeeringStateDisabled', 'ExpressRoutePeeringStateEnabled'
8873	State ExpressRoutePeeringState `json:"state,omitempty"`
8874	// AzureASN - The Azure ASN.
8875	AzureASN *int32 `json:"azureASN,omitempty"`
8876	// PeerASN - The peer ASN.
8877	PeerASN *int64 `json:"peerASN,omitempty"`
8878	// PrimaryPeerAddressPrefix - The primary address prefix.
8879	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
8880	// SecondaryPeerAddressPrefix - The secondary address prefix.
8881	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
8882	// PrimaryAzurePort - The primary port.
8883	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
8884	// SecondaryAzurePort - The secondary port.
8885	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
8886	// SharedKey - The shared key.
8887	SharedKey *string `json:"sharedKey,omitempty"`
8888	// VlanID - The VLAN ID.
8889	VlanID *int32 `json:"vlanId,omitempty"`
8890	// MicrosoftPeeringConfig - The Microsoft peering configuration.
8891	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
8892	// Stats - Gets peering stats.
8893	Stats *ExpressRouteCircuitStats `json:"stats,omitempty"`
8894	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
8895	ProvisioningState *string `json:"provisioningState,omitempty"`
8896	// GatewayManagerEtag - The GatewayManager Etag.
8897	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
8898	// LastModifiedBy - Gets whether the provider or the customer last modified the peering.
8899	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
8900	// RouteFilter - The reference of the RouteFilter resource.
8901	RouteFilter *SubResource `json:"routeFilter,omitempty"`
8902	// Ipv6PeeringConfig - The IPv6 peering configuration.
8903	Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"`
8904	// ExpressRouteConnection - The ExpressRoute connection.
8905	ExpressRouteConnection *ExpressRouteConnectionID `json:"expressRouteConnection,omitempty"`
8906	// Connections - The list of circuit connections associated with Azure Private Peering for this circuit.
8907	Connections *[]ExpressRouteCircuitConnection `json:"connections,omitempty"`
8908	// PeeredConnections - READ-ONLY; The list of peered circuit connections associated with Azure Private Peering for this circuit.
8909	PeeredConnections *[]PeerExpressRouteCircuitConnection `json:"peeredConnections,omitempty"`
8910}
8911
8912// MarshalJSON is the custom marshaler for ExpressRouteCircuitPeeringPropertiesFormat.
8913func (ercppf ExpressRouteCircuitPeeringPropertiesFormat) MarshalJSON() ([]byte, error) {
8914	objectMap := make(map[string]interface{})
8915	if ercppf.PeeringType != "" {
8916		objectMap["peeringType"] = ercppf.PeeringType
8917	}
8918	if ercppf.State != "" {
8919		objectMap["state"] = ercppf.State
8920	}
8921	if ercppf.AzureASN != nil {
8922		objectMap["azureASN"] = ercppf.AzureASN
8923	}
8924	if ercppf.PeerASN != nil {
8925		objectMap["peerASN"] = ercppf.PeerASN
8926	}
8927	if ercppf.PrimaryPeerAddressPrefix != nil {
8928		objectMap["primaryPeerAddressPrefix"] = ercppf.PrimaryPeerAddressPrefix
8929	}
8930	if ercppf.SecondaryPeerAddressPrefix != nil {
8931		objectMap["secondaryPeerAddressPrefix"] = ercppf.SecondaryPeerAddressPrefix
8932	}
8933	if ercppf.PrimaryAzurePort != nil {
8934		objectMap["primaryAzurePort"] = ercppf.PrimaryAzurePort
8935	}
8936	if ercppf.SecondaryAzurePort != nil {
8937		objectMap["secondaryAzurePort"] = ercppf.SecondaryAzurePort
8938	}
8939	if ercppf.SharedKey != nil {
8940		objectMap["sharedKey"] = ercppf.SharedKey
8941	}
8942	if ercppf.VlanID != nil {
8943		objectMap["vlanId"] = ercppf.VlanID
8944	}
8945	if ercppf.MicrosoftPeeringConfig != nil {
8946		objectMap["microsoftPeeringConfig"] = ercppf.MicrosoftPeeringConfig
8947	}
8948	if ercppf.Stats != nil {
8949		objectMap["stats"] = ercppf.Stats
8950	}
8951	if ercppf.ProvisioningState != nil {
8952		objectMap["provisioningState"] = ercppf.ProvisioningState
8953	}
8954	if ercppf.GatewayManagerEtag != nil {
8955		objectMap["gatewayManagerEtag"] = ercppf.GatewayManagerEtag
8956	}
8957	if ercppf.LastModifiedBy != nil {
8958		objectMap["lastModifiedBy"] = ercppf.LastModifiedBy
8959	}
8960	if ercppf.RouteFilter != nil {
8961		objectMap["routeFilter"] = ercppf.RouteFilter
8962	}
8963	if ercppf.Ipv6PeeringConfig != nil {
8964		objectMap["ipv6PeeringConfig"] = ercppf.Ipv6PeeringConfig
8965	}
8966	if ercppf.ExpressRouteConnection != nil {
8967		objectMap["expressRouteConnection"] = ercppf.ExpressRouteConnection
8968	}
8969	if ercppf.Connections != nil {
8970		objectMap["connections"] = ercppf.Connections
8971	}
8972	return json.Marshal(objectMap)
8973}
8974
8975// ExpressRouteCircuitPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
8976// of a long-running operation.
8977type ExpressRouteCircuitPeeringsCreateOrUpdateFuture struct {
8978	azure.FutureAPI
8979	// Result returns the result of the asynchronous operation.
8980	// If the operation has not completed it will return an error.
8981	Result func(ExpressRouteCircuitPeeringsClient) (ExpressRouteCircuitPeering, error)
8982}
8983
8984// ExpressRouteCircuitPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
8985// long-running operation.
8986type ExpressRouteCircuitPeeringsDeleteFuture struct {
8987	azure.FutureAPI
8988	// Result returns the result of the asynchronous operation.
8989	// If the operation has not completed it will return an error.
8990	Result func(ExpressRouteCircuitPeeringsClient) (autorest.Response, error)
8991}
8992
8993// ExpressRouteCircuitPropertiesFormat properties of ExpressRouteCircuit.
8994type ExpressRouteCircuitPropertiesFormat struct {
8995	// AllowClassicOperations - Allow classic operations.
8996	AllowClassicOperations *bool `json:"allowClassicOperations,omitempty"`
8997	// CircuitProvisioningState - The CircuitProvisioningState state of the resource.
8998	CircuitProvisioningState *string `json:"circuitProvisioningState,omitempty"`
8999	// ServiceProviderProvisioningState - The ServiceProviderProvisioningState state of the resource. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning'
9000	ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"`
9001	// Authorizations - The list of authorizations.
9002	Authorizations *[]ExpressRouteCircuitAuthorization `json:"authorizations,omitempty"`
9003	// Peerings - The list of peerings.
9004	Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"`
9005	// ServiceKey - The ServiceKey.
9006	ServiceKey *string `json:"serviceKey,omitempty"`
9007	// ServiceProviderNotes - The ServiceProviderNotes.
9008	ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"`
9009	// ServiceProviderProperties - The ServiceProviderProperties.
9010	ServiceProviderProperties *ExpressRouteCircuitServiceProviderProperties `json:"serviceProviderProperties,omitempty"`
9011	// ExpressRoutePort - The reference to the ExpressRoutePort resource when the circuit is provisioned on an ExpressRoutePort resource.
9012	ExpressRoutePort *SubResource `json:"expressRoutePort,omitempty"`
9013	// BandwidthInGbps - The bandwidth of the circuit when the circuit is provisioned on an ExpressRoutePort resource.
9014	BandwidthInGbps *float64 `json:"bandwidthInGbps,omitempty"`
9015	// Stag - READ-ONLY; The identifier of the circuit traffic. Outer tag for QinQ encapsulation.
9016	Stag *int32 `json:"stag,omitempty"`
9017	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
9018	ProvisioningState *string `json:"provisioningState,omitempty"`
9019	// GatewayManagerEtag - The GatewayManager Etag.
9020	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
9021	// GlobalReachEnabled - Flag denoting Global reach status.
9022	GlobalReachEnabled *bool `json:"globalReachEnabled,omitempty"`
9023}
9024
9025// MarshalJSON is the custom marshaler for ExpressRouteCircuitPropertiesFormat.
9026func (ercpf ExpressRouteCircuitPropertiesFormat) MarshalJSON() ([]byte, error) {
9027	objectMap := make(map[string]interface{})
9028	if ercpf.AllowClassicOperations != nil {
9029		objectMap["allowClassicOperations"] = ercpf.AllowClassicOperations
9030	}
9031	if ercpf.CircuitProvisioningState != nil {
9032		objectMap["circuitProvisioningState"] = ercpf.CircuitProvisioningState
9033	}
9034	if ercpf.ServiceProviderProvisioningState != "" {
9035		objectMap["serviceProviderProvisioningState"] = ercpf.ServiceProviderProvisioningState
9036	}
9037	if ercpf.Authorizations != nil {
9038		objectMap["authorizations"] = ercpf.Authorizations
9039	}
9040	if ercpf.Peerings != nil {
9041		objectMap["peerings"] = ercpf.Peerings
9042	}
9043	if ercpf.ServiceKey != nil {
9044		objectMap["serviceKey"] = ercpf.ServiceKey
9045	}
9046	if ercpf.ServiceProviderNotes != nil {
9047		objectMap["serviceProviderNotes"] = ercpf.ServiceProviderNotes
9048	}
9049	if ercpf.ServiceProviderProperties != nil {
9050		objectMap["serviceProviderProperties"] = ercpf.ServiceProviderProperties
9051	}
9052	if ercpf.ExpressRoutePort != nil {
9053		objectMap["expressRoutePort"] = ercpf.ExpressRoutePort
9054	}
9055	if ercpf.BandwidthInGbps != nil {
9056		objectMap["bandwidthInGbps"] = ercpf.BandwidthInGbps
9057	}
9058	if ercpf.ProvisioningState != nil {
9059		objectMap["provisioningState"] = ercpf.ProvisioningState
9060	}
9061	if ercpf.GatewayManagerEtag != nil {
9062		objectMap["gatewayManagerEtag"] = ercpf.GatewayManagerEtag
9063	}
9064	if ercpf.GlobalReachEnabled != nil {
9065		objectMap["globalReachEnabled"] = ercpf.GlobalReachEnabled
9066	}
9067	return json.Marshal(objectMap)
9068}
9069
9070// ExpressRouteCircuitReference reference to an express route circuit.
9071type ExpressRouteCircuitReference struct {
9072	// ID - Corresponding Express Route Circuit Id.
9073	ID *string `json:"id,omitempty"`
9074}
9075
9076// ExpressRouteCircuitRoutesTable the routes table associated with the ExpressRouteCircuit.
9077type ExpressRouteCircuitRoutesTable struct {
9078	// NetworkProperty - IP address of a network entity.
9079	NetworkProperty *string `json:"network,omitempty"`
9080	// NextHop - NextHop address.
9081	NextHop *string `json:"nextHop,omitempty"`
9082	// LocPrf - Local preference value as set with the set local-preference route-map configuration command.
9083	LocPrf *string `json:"locPrf,omitempty"`
9084	// Weight - Route Weight.
9085	Weight *int32 `json:"weight,omitempty"`
9086	// Path - Autonomous system paths to the destination network.
9087	Path *string `json:"path,omitempty"`
9088}
9089
9090// ExpressRouteCircuitRoutesTableSummary the routes table associated with the ExpressRouteCircuit.
9091type ExpressRouteCircuitRoutesTableSummary struct {
9092	// Neighbor - IP address of the neighbor.
9093	Neighbor *string `json:"neighbor,omitempty"`
9094	// V - BGP version number spoken to the neighbor.
9095	V *int32 `json:"v,omitempty"`
9096	// As - Autonomous system number.
9097	As *int32 `json:"as,omitempty"`
9098	// 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.
9099	UpDown *string `json:"upDown,omitempty"`
9100	// StatePfxRcd - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group.
9101	StatePfxRcd *string `json:"statePfxRcd,omitempty"`
9102}
9103
9104// ExpressRouteCircuitsArpTableListResult response for ListArpTable associated with the Express Route
9105// Circuits API.
9106type ExpressRouteCircuitsArpTableListResult struct {
9107	autorest.Response `json:"-"`
9108	// Value - Gets list of the ARP table.
9109	Value *[]ExpressRouteCircuitArpTable `json:"value,omitempty"`
9110	// NextLink - The URL to get the next set of results.
9111	NextLink *string `json:"nextLink,omitempty"`
9112}
9113
9114// ExpressRouteCircuitsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
9115// long-running operation.
9116type ExpressRouteCircuitsCreateOrUpdateFuture struct {
9117	azure.FutureAPI
9118	// Result returns the result of the asynchronous operation.
9119	// If the operation has not completed it will return an error.
9120	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuit, error)
9121}
9122
9123// ExpressRouteCircuitsDeleteFuture an abstraction for monitoring and retrieving the results of a
9124// long-running operation.
9125type ExpressRouteCircuitsDeleteFuture struct {
9126	azure.FutureAPI
9127	// Result returns the result of the asynchronous operation.
9128	// If the operation has not completed it will return an error.
9129	Result func(ExpressRouteCircuitsClient) (autorest.Response, error)
9130}
9131
9132// ExpressRouteCircuitServiceProviderProperties contains ServiceProviderProperties in an
9133// ExpressRouteCircuit.
9134type ExpressRouteCircuitServiceProviderProperties struct {
9135	// ServiceProviderName - The serviceProviderName.
9136	ServiceProviderName *string `json:"serviceProviderName,omitempty"`
9137	// PeeringLocation - The peering location.
9138	PeeringLocation *string `json:"peeringLocation,omitempty"`
9139	// BandwidthInMbps - The BandwidthInMbps.
9140	BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"`
9141}
9142
9143// ExpressRouteCircuitSku contains SKU in an ExpressRouteCircuit.
9144type ExpressRouteCircuitSku struct {
9145	// Name - The name of the SKU.
9146	Name *string `json:"name,omitempty"`
9147	// Tier - The tier of the SKU. Possible values include: 'ExpressRouteCircuitSkuTierStandard', 'ExpressRouteCircuitSkuTierPremium', 'ExpressRouteCircuitSkuTierBasic', 'ExpressRouteCircuitSkuTierLocal'
9148	Tier ExpressRouteCircuitSkuTier `json:"tier,omitempty"`
9149	// Family - The family of the SKU. Possible values include: 'UnlimitedData', 'MeteredData'
9150	Family ExpressRouteCircuitSkuFamily `json:"family,omitempty"`
9151}
9152
9153// ExpressRouteCircuitsListArpTableFuture an abstraction for monitoring and retrieving the results of a
9154// long-running operation.
9155type ExpressRouteCircuitsListArpTableFuture struct {
9156	azure.FutureAPI
9157	// Result returns the result of the asynchronous operation.
9158	// If the operation has not completed it will return an error.
9159	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsArpTableListResult, error)
9160}
9161
9162// ExpressRouteCircuitsListRoutesTableFuture an abstraction for monitoring and retrieving the results of a
9163// long-running operation.
9164type ExpressRouteCircuitsListRoutesTableFuture struct {
9165	azure.FutureAPI
9166	// Result returns the result of the asynchronous operation.
9167	// If the operation has not completed it will return an error.
9168	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsRoutesTableListResult, error)
9169}
9170
9171// ExpressRouteCircuitsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving the
9172// results of a long-running operation.
9173type ExpressRouteCircuitsListRoutesTableSummaryFuture struct {
9174	azure.FutureAPI
9175	// Result returns the result of the asynchronous operation.
9176	// If the operation has not completed it will return an error.
9177	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsRoutesTableSummaryListResult, error)
9178}
9179
9180// ExpressRouteCircuitsRoutesTableListResult response for ListRoutesTable associated with the Express Route
9181// Circuits API.
9182type ExpressRouteCircuitsRoutesTableListResult struct {
9183	autorest.Response `json:"-"`
9184	// Value - The list of routes table.
9185	Value *[]ExpressRouteCircuitRoutesTable `json:"value,omitempty"`
9186	// NextLink - The URL to get the next set of results.
9187	NextLink *string `json:"nextLink,omitempty"`
9188}
9189
9190// ExpressRouteCircuitsRoutesTableSummaryListResult response for ListRoutesTable associated with the
9191// Express Route Circuits API.
9192type ExpressRouteCircuitsRoutesTableSummaryListResult struct {
9193	autorest.Response `json:"-"`
9194	// Value - A list of the routes table.
9195	Value *[]ExpressRouteCircuitRoutesTableSummary `json:"value,omitempty"`
9196	// NextLink - The URL to get the next set of results.
9197	NextLink *string `json:"nextLink,omitempty"`
9198}
9199
9200// ExpressRouteCircuitStats contains stats associated with the peering.
9201type ExpressRouteCircuitStats struct {
9202	autorest.Response `json:"-"`
9203	// PrimarybytesIn - Gets BytesIn of the peering.
9204	PrimarybytesIn *int64 `json:"primarybytesIn,omitempty"`
9205	// PrimarybytesOut - Gets BytesOut of the peering.
9206	PrimarybytesOut *int64 `json:"primarybytesOut,omitempty"`
9207	// SecondarybytesIn - Gets BytesIn of the peering.
9208	SecondarybytesIn *int64 `json:"secondarybytesIn,omitempty"`
9209	// SecondarybytesOut - Gets BytesOut of the peering.
9210	SecondarybytesOut *int64 `json:"secondarybytesOut,omitempty"`
9211}
9212
9213// ExpressRouteCircuitsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
9214// long-running operation.
9215type ExpressRouteCircuitsUpdateTagsFuture struct {
9216	azure.FutureAPI
9217	// Result returns the result of the asynchronous operation.
9218	// If the operation has not completed it will return an error.
9219	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuit, error)
9220}
9221
9222// ExpressRouteConnection expressRouteConnection resource.
9223type ExpressRouteConnection struct {
9224	autorest.Response `json:"-"`
9225	// ExpressRouteConnectionProperties - Properties of the express route connection.
9226	*ExpressRouteConnectionProperties `json:"properties,omitempty"`
9227	// Name - The name of the resource.
9228	Name *string `json:"name,omitempty"`
9229	// ID - Resource ID.
9230	ID *string `json:"id,omitempty"`
9231}
9232
9233// MarshalJSON is the custom marshaler for ExpressRouteConnection.
9234func (erc ExpressRouteConnection) MarshalJSON() ([]byte, error) {
9235	objectMap := make(map[string]interface{})
9236	if erc.ExpressRouteConnectionProperties != nil {
9237		objectMap["properties"] = erc.ExpressRouteConnectionProperties
9238	}
9239	if erc.Name != nil {
9240		objectMap["name"] = erc.Name
9241	}
9242	if erc.ID != nil {
9243		objectMap["id"] = erc.ID
9244	}
9245	return json.Marshal(objectMap)
9246}
9247
9248// UnmarshalJSON is the custom unmarshaler for ExpressRouteConnection struct.
9249func (erc *ExpressRouteConnection) UnmarshalJSON(body []byte) error {
9250	var m map[string]*json.RawMessage
9251	err := json.Unmarshal(body, &m)
9252	if err != nil {
9253		return err
9254	}
9255	for k, v := range m {
9256		switch k {
9257		case "properties":
9258			if v != nil {
9259				var expressRouteConnectionProperties ExpressRouteConnectionProperties
9260				err = json.Unmarshal(*v, &expressRouteConnectionProperties)
9261				if err != nil {
9262					return err
9263				}
9264				erc.ExpressRouteConnectionProperties = &expressRouteConnectionProperties
9265			}
9266		case "name":
9267			if v != nil {
9268				var name string
9269				err = json.Unmarshal(*v, &name)
9270				if err != nil {
9271					return err
9272				}
9273				erc.Name = &name
9274			}
9275		case "id":
9276			if v != nil {
9277				var ID string
9278				err = json.Unmarshal(*v, &ID)
9279				if err != nil {
9280					return err
9281				}
9282				erc.ID = &ID
9283			}
9284		}
9285	}
9286
9287	return nil
9288}
9289
9290// ExpressRouteConnectionID the ID of the ExpressRouteConnection.
9291type ExpressRouteConnectionID struct {
9292	// ID - READ-ONLY; The ID of the ExpressRouteConnection.
9293	ID *string `json:"id,omitempty"`
9294}
9295
9296// ExpressRouteConnectionList expressRouteConnection list.
9297type ExpressRouteConnectionList struct {
9298	autorest.Response `json:"-"`
9299	// Value - The list of ExpressRoute connections.
9300	Value *[]ExpressRouteConnection `json:"value,omitempty"`
9301}
9302
9303// ExpressRouteConnectionProperties properties of the ExpressRouteConnection subresource.
9304type ExpressRouteConnectionProperties struct {
9305	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
9306	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
9307	// ExpressRouteCircuitPeering - The ExpressRoute circuit peering.
9308	ExpressRouteCircuitPeering *ExpressRouteCircuitPeeringID `json:"expressRouteCircuitPeering,omitempty"`
9309	// AuthorizationKey - Authorization key to establish the connection.
9310	AuthorizationKey *string `json:"authorizationKey,omitempty"`
9311	// RoutingWeight - The routing weight associated to the connection.
9312	RoutingWeight *int32 `json:"routingWeight,omitempty"`
9313}
9314
9315// ExpressRouteConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
9316// a long-running operation.
9317type ExpressRouteConnectionsCreateOrUpdateFuture struct {
9318	azure.FutureAPI
9319	// Result returns the result of the asynchronous operation.
9320	// If the operation has not completed it will return an error.
9321	Result func(ExpressRouteConnectionsClient) (ExpressRouteConnection, error)
9322}
9323
9324// ExpressRouteConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a
9325// long-running operation.
9326type ExpressRouteConnectionsDeleteFuture struct {
9327	azure.FutureAPI
9328	// Result returns the result of the asynchronous operation.
9329	// If the operation has not completed it will return an error.
9330	Result func(ExpressRouteConnectionsClient) (autorest.Response, error)
9331}
9332
9333// ExpressRouteCrossConnection expressRouteCrossConnection resource.
9334type ExpressRouteCrossConnection struct {
9335	autorest.Response `json:"-"`
9336	// ExpressRouteCrossConnectionProperties - Properties of the express route cross connection.
9337	*ExpressRouteCrossConnectionProperties `json:"properties,omitempty"`
9338	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
9339	Etag *string `json:"etag,omitempty"`
9340	// ID - Resource ID.
9341	ID *string `json:"id,omitempty"`
9342	// Name - READ-ONLY; Resource name.
9343	Name *string `json:"name,omitempty"`
9344	// Type - READ-ONLY; Resource type.
9345	Type *string `json:"type,omitempty"`
9346	// Location - Resource location.
9347	Location *string `json:"location,omitempty"`
9348	// Tags - Resource tags.
9349	Tags map[string]*string `json:"tags"`
9350}
9351
9352// MarshalJSON is the custom marshaler for ExpressRouteCrossConnection.
9353func (ercc ExpressRouteCrossConnection) MarshalJSON() ([]byte, error) {
9354	objectMap := make(map[string]interface{})
9355	if ercc.ExpressRouteCrossConnectionProperties != nil {
9356		objectMap["properties"] = ercc.ExpressRouteCrossConnectionProperties
9357	}
9358	if ercc.ID != nil {
9359		objectMap["id"] = ercc.ID
9360	}
9361	if ercc.Location != nil {
9362		objectMap["location"] = ercc.Location
9363	}
9364	if ercc.Tags != nil {
9365		objectMap["tags"] = ercc.Tags
9366	}
9367	return json.Marshal(objectMap)
9368}
9369
9370// UnmarshalJSON is the custom unmarshaler for ExpressRouteCrossConnection struct.
9371func (ercc *ExpressRouteCrossConnection) UnmarshalJSON(body []byte) error {
9372	var m map[string]*json.RawMessage
9373	err := json.Unmarshal(body, &m)
9374	if err != nil {
9375		return err
9376	}
9377	for k, v := range m {
9378		switch k {
9379		case "properties":
9380			if v != nil {
9381				var expressRouteCrossConnectionProperties ExpressRouteCrossConnectionProperties
9382				err = json.Unmarshal(*v, &expressRouteCrossConnectionProperties)
9383				if err != nil {
9384					return err
9385				}
9386				ercc.ExpressRouteCrossConnectionProperties = &expressRouteCrossConnectionProperties
9387			}
9388		case "etag":
9389			if v != nil {
9390				var etag string
9391				err = json.Unmarshal(*v, &etag)
9392				if err != nil {
9393					return err
9394				}
9395				ercc.Etag = &etag
9396			}
9397		case "id":
9398			if v != nil {
9399				var ID string
9400				err = json.Unmarshal(*v, &ID)
9401				if err != nil {
9402					return err
9403				}
9404				ercc.ID = &ID
9405			}
9406		case "name":
9407			if v != nil {
9408				var name string
9409				err = json.Unmarshal(*v, &name)
9410				if err != nil {
9411					return err
9412				}
9413				ercc.Name = &name
9414			}
9415		case "type":
9416			if v != nil {
9417				var typeVar string
9418				err = json.Unmarshal(*v, &typeVar)
9419				if err != nil {
9420					return err
9421				}
9422				ercc.Type = &typeVar
9423			}
9424		case "location":
9425			if v != nil {
9426				var location string
9427				err = json.Unmarshal(*v, &location)
9428				if err != nil {
9429					return err
9430				}
9431				ercc.Location = &location
9432			}
9433		case "tags":
9434			if v != nil {
9435				var tags map[string]*string
9436				err = json.Unmarshal(*v, &tags)
9437				if err != nil {
9438					return err
9439				}
9440				ercc.Tags = tags
9441			}
9442		}
9443	}
9444
9445	return nil
9446}
9447
9448// ExpressRouteCrossConnectionListResult response for ListExpressRouteCrossConnection API service call.
9449type ExpressRouteCrossConnectionListResult struct {
9450	autorest.Response `json:"-"`
9451	// Value - A list of ExpressRouteCrossConnection resources.
9452	Value *[]ExpressRouteCrossConnection `json:"value,omitempty"`
9453	// NextLink - READ-ONLY; The URL to get the next set of results.
9454	NextLink *string `json:"nextLink,omitempty"`
9455}
9456
9457// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionListResult.
9458func (ercclr ExpressRouteCrossConnectionListResult) MarshalJSON() ([]byte, error) {
9459	objectMap := make(map[string]interface{})
9460	if ercclr.Value != nil {
9461		objectMap["value"] = ercclr.Value
9462	}
9463	return json.Marshal(objectMap)
9464}
9465
9466// ExpressRouteCrossConnectionListResultIterator provides access to a complete listing of
9467// ExpressRouteCrossConnection values.
9468type ExpressRouteCrossConnectionListResultIterator struct {
9469	i    int
9470	page ExpressRouteCrossConnectionListResultPage
9471}
9472
9473// NextWithContext advances to the next value.  If there was an error making
9474// the request the iterator does not advance and the error is returned.
9475func (iter *ExpressRouteCrossConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
9476	if tracing.IsEnabled() {
9477		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionListResultIterator.NextWithContext")
9478		defer func() {
9479			sc := -1
9480			if iter.Response().Response.Response != nil {
9481				sc = iter.Response().Response.Response.StatusCode
9482			}
9483			tracing.EndSpan(ctx, sc, err)
9484		}()
9485	}
9486	iter.i++
9487	if iter.i < len(iter.page.Values()) {
9488		return nil
9489	}
9490	err = iter.page.NextWithContext(ctx)
9491	if err != nil {
9492		iter.i--
9493		return err
9494	}
9495	iter.i = 0
9496	return nil
9497}
9498
9499// Next advances to the next value.  If there was an error making
9500// the request the iterator does not advance and the error is returned.
9501// Deprecated: Use NextWithContext() instead.
9502func (iter *ExpressRouteCrossConnectionListResultIterator) Next() error {
9503	return iter.NextWithContext(context.Background())
9504}
9505
9506// NotDone returns true if the enumeration should be started or is not yet complete.
9507func (iter ExpressRouteCrossConnectionListResultIterator) NotDone() bool {
9508	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9509}
9510
9511// Response returns the raw server response from the last page request.
9512func (iter ExpressRouteCrossConnectionListResultIterator) Response() ExpressRouteCrossConnectionListResult {
9513	return iter.page.Response()
9514}
9515
9516// Value returns the current value or a zero-initialized value if the
9517// iterator has advanced beyond the end of the collection.
9518func (iter ExpressRouteCrossConnectionListResultIterator) Value() ExpressRouteCrossConnection {
9519	if !iter.page.NotDone() {
9520		return ExpressRouteCrossConnection{}
9521	}
9522	return iter.page.Values()[iter.i]
9523}
9524
9525// Creates a new instance of the ExpressRouteCrossConnectionListResultIterator type.
9526func NewExpressRouteCrossConnectionListResultIterator(page ExpressRouteCrossConnectionListResultPage) ExpressRouteCrossConnectionListResultIterator {
9527	return ExpressRouteCrossConnectionListResultIterator{page: page}
9528}
9529
9530// IsEmpty returns true if the ListResult contains no values.
9531func (ercclr ExpressRouteCrossConnectionListResult) IsEmpty() bool {
9532	return ercclr.Value == nil || len(*ercclr.Value) == 0
9533}
9534
9535// hasNextLink returns true if the NextLink is not empty.
9536func (ercclr ExpressRouteCrossConnectionListResult) hasNextLink() bool {
9537	return ercclr.NextLink != nil && len(*ercclr.NextLink) != 0
9538}
9539
9540// expressRouteCrossConnectionListResultPreparer prepares a request to retrieve the next set of results.
9541// It returns nil if no more results exist.
9542func (ercclr ExpressRouteCrossConnectionListResult) expressRouteCrossConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
9543	if !ercclr.hasNextLink() {
9544		return nil, nil
9545	}
9546	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9547		autorest.AsJSON(),
9548		autorest.AsGet(),
9549		autorest.WithBaseURL(to.String(ercclr.NextLink)))
9550}
9551
9552// ExpressRouteCrossConnectionListResultPage contains a page of ExpressRouteCrossConnection values.
9553type ExpressRouteCrossConnectionListResultPage struct {
9554	fn     func(context.Context, ExpressRouteCrossConnectionListResult) (ExpressRouteCrossConnectionListResult, error)
9555	ercclr ExpressRouteCrossConnectionListResult
9556}
9557
9558// NextWithContext advances to the next page of values.  If there was an error making
9559// the request the page does not advance and the error is returned.
9560func (page *ExpressRouteCrossConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
9561	if tracing.IsEnabled() {
9562		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionListResultPage.NextWithContext")
9563		defer func() {
9564			sc := -1
9565			if page.Response().Response.Response != nil {
9566				sc = page.Response().Response.Response.StatusCode
9567			}
9568			tracing.EndSpan(ctx, sc, err)
9569		}()
9570	}
9571	for {
9572		next, err := page.fn(ctx, page.ercclr)
9573		if err != nil {
9574			return err
9575		}
9576		page.ercclr = next
9577		if !next.hasNextLink() || !next.IsEmpty() {
9578			break
9579		}
9580	}
9581	return nil
9582}
9583
9584// Next advances to the next page of values.  If there was an error making
9585// the request the page does not advance and the error is returned.
9586// Deprecated: Use NextWithContext() instead.
9587func (page *ExpressRouteCrossConnectionListResultPage) Next() error {
9588	return page.NextWithContext(context.Background())
9589}
9590
9591// NotDone returns true if the page enumeration should be started or is not yet complete.
9592func (page ExpressRouteCrossConnectionListResultPage) NotDone() bool {
9593	return !page.ercclr.IsEmpty()
9594}
9595
9596// Response returns the raw server response from the last page request.
9597func (page ExpressRouteCrossConnectionListResultPage) Response() ExpressRouteCrossConnectionListResult {
9598	return page.ercclr
9599}
9600
9601// Values returns the slice of values for the current page or nil if there are no values.
9602func (page ExpressRouteCrossConnectionListResultPage) Values() []ExpressRouteCrossConnection {
9603	if page.ercclr.IsEmpty() {
9604		return nil
9605	}
9606	return *page.ercclr.Value
9607}
9608
9609// Creates a new instance of the ExpressRouteCrossConnectionListResultPage type.
9610func NewExpressRouteCrossConnectionListResultPage(cur ExpressRouteCrossConnectionListResult, getNextPage func(context.Context, ExpressRouteCrossConnectionListResult) (ExpressRouteCrossConnectionListResult, error)) ExpressRouteCrossConnectionListResultPage {
9611	return ExpressRouteCrossConnectionListResultPage{
9612		fn:     getNextPage,
9613		ercclr: cur,
9614	}
9615}
9616
9617// ExpressRouteCrossConnectionPeering peering in an ExpressRoute Cross Connection resource.
9618type ExpressRouteCrossConnectionPeering struct {
9619	autorest.Response `json:"-"`
9620	// ExpressRouteCrossConnectionPeeringProperties - Properties of the express route cross connection peering.
9621	*ExpressRouteCrossConnectionPeeringProperties `json:"properties,omitempty"`
9622	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
9623	Name *string `json:"name,omitempty"`
9624	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
9625	Etag *string `json:"etag,omitempty"`
9626	// ID - Resource ID.
9627	ID *string `json:"id,omitempty"`
9628}
9629
9630// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeering.
9631func (erccp ExpressRouteCrossConnectionPeering) MarshalJSON() ([]byte, error) {
9632	objectMap := make(map[string]interface{})
9633	if erccp.ExpressRouteCrossConnectionPeeringProperties != nil {
9634		objectMap["properties"] = erccp.ExpressRouteCrossConnectionPeeringProperties
9635	}
9636	if erccp.Name != nil {
9637		objectMap["name"] = erccp.Name
9638	}
9639	if erccp.ID != nil {
9640		objectMap["id"] = erccp.ID
9641	}
9642	return json.Marshal(objectMap)
9643}
9644
9645// UnmarshalJSON is the custom unmarshaler for ExpressRouteCrossConnectionPeering struct.
9646func (erccp *ExpressRouteCrossConnectionPeering) UnmarshalJSON(body []byte) error {
9647	var m map[string]*json.RawMessage
9648	err := json.Unmarshal(body, &m)
9649	if err != nil {
9650		return err
9651	}
9652	for k, v := range m {
9653		switch k {
9654		case "properties":
9655			if v != nil {
9656				var expressRouteCrossConnectionPeeringProperties ExpressRouteCrossConnectionPeeringProperties
9657				err = json.Unmarshal(*v, &expressRouteCrossConnectionPeeringProperties)
9658				if err != nil {
9659					return err
9660				}
9661				erccp.ExpressRouteCrossConnectionPeeringProperties = &expressRouteCrossConnectionPeeringProperties
9662			}
9663		case "name":
9664			if v != nil {
9665				var name string
9666				err = json.Unmarshal(*v, &name)
9667				if err != nil {
9668					return err
9669				}
9670				erccp.Name = &name
9671			}
9672		case "etag":
9673			if v != nil {
9674				var etag string
9675				err = json.Unmarshal(*v, &etag)
9676				if err != nil {
9677					return err
9678				}
9679				erccp.Etag = &etag
9680			}
9681		case "id":
9682			if v != nil {
9683				var ID string
9684				err = json.Unmarshal(*v, &ID)
9685				if err != nil {
9686					return err
9687				}
9688				erccp.ID = &ID
9689			}
9690		}
9691	}
9692
9693	return nil
9694}
9695
9696// ExpressRouteCrossConnectionPeeringList response for ListPeering API service call retrieves all peerings
9697// that belong to an ExpressRouteCrossConnection.
9698type ExpressRouteCrossConnectionPeeringList struct {
9699	autorest.Response `json:"-"`
9700	// Value - The peerings in an express route cross connection.
9701	Value *[]ExpressRouteCrossConnectionPeering `json:"value,omitempty"`
9702	// NextLink - READ-ONLY; The URL to get the next set of results.
9703	NextLink *string `json:"nextLink,omitempty"`
9704}
9705
9706// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeeringList.
9707func (erccpl ExpressRouteCrossConnectionPeeringList) MarshalJSON() ([]byte, error) {
9708	objectMap := make(map[string]interface{})
9709	if erccpl.Value != nil {
9710		objectMap["value"] = erccpl.Value
9711	}
9712	return json.Marshal(objectMap)
9713}
9714
9715// ExpressRouteCrossConnectionPeeringListIterator provides access to a complete listing of
9716// ExpressRouteCrossConnectionPeering values.
9717type ExpressRouteCrossConnectionPeeringListIterator struct {
9718	i    int
9719	page ExpressRouteCrossConnectionPeeringListPage
9720}
9721
9722// NextWithContext advances to the next value.  If there was an error making
9723// the request the iterator does not advance and the error is returned.
9724func (iter *ExpressRouteCrossConnectionPeeringListIterator) NextWithContext(ctx context.Context) (err error) {
9725	if tracing.IsEnabled() {
9726		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringListIterator.NextWithContext")
9727		defer func() {
9728			sc := -1
9729			if iter.Response().Response.Response != nil {
9730				sc = iter.Response().Response.Response.StatusCode
9731			}
9732			tracing.EndSpan(ctx, sc, err)
9733		}()
9734	}
9735	iter.i++
9736	if iter.i < len(iter.page.Values()) {
9737		return nil
9738	}
9739	err = iter.page.NextWithContext(ctx)
9740	if err != nil {
9741		iter.i--
9742		return err
9743	}
9744	iter.i = 0
9745	return nil
9746}
9747
9748// Next advances to the next value.  If there was an error making
9749// the request the iterator does not advance and the error is returned.
9750// Deprecated: Use NextWithContext() instead.
9751func (iter *ExpressRouteCrossConnectionPeeringListIterator) Next() error {
9752	return iter.NextWithContext(context.Background())
9753}
9754
9755// NotDone returns true if the enumeration should be started or is not yet complete.
9756func (iter ExpressRouteCrossConnectionPeeringListIterator) NotDone() bool {
9757	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9758}
9759
9760// Response returns the raw server response from the last page request.
9761func (iter ExpressRouteCrossConnectionPeeringListIterator) Response() ExpressRouteCrossConnectionPeeringList {
9762	return iter.page.Response()
9763}
9764
9765// Value returns the current value or a zero-initialized value if the
9766// iterator has advanced beyond the end of the collection.
9767func (iter ExpressRouteCrossConnectionPeeringListIterator) Value() ExpressRouteCrossConnectionPeering {
9768	if !iter.page.NotDone() {
9769		return ExpressRouteCrossConnectionPeering{}
9770	}
9771	return iter.page.Values()[iter.i]
9772}
9773
9774// Creates a new instance of the ExpressRouteCrossConnectionPeeringListIterator type.
9775func NewExpressRouteCrossConnectionPeeringListIterator(page ExpressRouteCrossConnectionPeeringListPage) ExpressRouteCrossConnectionPeeringListIterator {
9776	return ExpressRouteCrossConnectionPeeringListIterator{page: page}
9777}
9778
9779// IsEmpty returns true if the ListResult contains no values.
9780func (erccpl ExpressRouteCrossConnectionPeeringList) IsEmpty() bool {
9781	return erccpl.Value == nil || len(*erccpl.Value) == 0
9782}
9783
9784// hasNextLink returns true if the NextLink is not empty.
9785func (erccpl ExpressRouteCrossConnectionPeeringList) hasNextLink() bool {
9786	return erccpl.NextLink != nil && len(*erccpl.NextLink) != 0
9787}
9788
9789// expressRouteCrossConnectionPeeringListPreparer prepares a request to retrieve the next set of results.
9790// It returns nil if no more results exist.
9791func (erccpl ExpressRouteCrossConnectionPeeringList) expressRouteCrossConnectionPeeringListPreparer(ctx context.Context) (*http.Request, error) {
9792	if !erccpl.hasNextLink() {
9793		return nil, nil
9794	}
9795	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9796		autorest.AsJSON(),
9797		autorest.AsGet(),
9798		autorest.WithBaseURL(to.String(erccpl.NextLink)))
9799}
9800
9801// ExpressRouteCrossConnectionPeeringListPage contains a page of ExpressRouteCrossConnectionPeering values.
9802type ExpressRouteCrossConnectionPeeringListPage struct {
9803	fn     func(context.Context, ExpressRouteCrossConnectionPeeringList) (ExpressRouteCrossConnectionPeeringList, error)
9804	erccpl ExpressRouteCrossConnectionPeeringList
9805}
9806
9807// NextWithContext advances to the next page of values.  If there was an error making
9808// the request the page does not advance and the error is returned.
9809func (page *ExpressRouteCrossConnectionPeeringListPage) NextWithContext(ctx context.Context) (err error) {
9810	if tracing.IsEnabled() {
9811		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringListPage.NextWithContext")
9812		defer func() {
9813			sc := -1
9814			if page.Response().Response.Response != nil {
9815				sc = page.Response().Response.Response.StatusCode
9816			}
9817			tracing.EndSpan(ctx, sc, err)
9818		}()
9819	}
9820	for {
9821		next, err := page.fn(ctx, page.erccpl)
9822		if err != nil {
9823			return err
9824		}
9825		page.erccpl = next
9826		if !next.hasNextLink() || !next.IsEmpty() {
9827			break
9828		}
9829	}
9830	return nil
9831}
9832
9833// Next advances to the next page of values.  If there was an error making
9834// the request the page does not advance and the error is returned.
9835// Deprecated: Use NextWithContext() instead.
9836func (page *ExpressRouteCrossConnectionPeeringListPage) Next() error {
9837	return page.NextWithContext(context.Background())
9838}
9839
9840// NotDone returns true if the page enumeration should be started or is not yet complete.
9841func (page ExpressRouteCrossConnectionPeeringListPage) NotDone() bool {
9842	return !page.erccpl.IsEmpty()
9843}
9844
9845// Response returns the raw server response from the last page request.
9846func (page ExpressRouteCrossConnectionPeeringListPage) Response() ExpressRouteCrossConnectionPeeringList {
9847	return page.erccpl
9848}
9849
9850// Values returns the slice of values for the current page or nil if there are no values.
9851func (page ExpressRouteCrossConnectionPeeringListPage) Values() []ExpressRouteCrossConnectionPeering {
9852	if page.erccpl.IsEmpty() {
9853		return nil
9854	}
9855	return *page.erccpl.Value
9856}
9857
9858// Creates a new instance of the ExpressRouteCrossConnectionPeeringListPage type.
9859func NewExpressRouteCrossConnectionPeeringListPage(cur ExpressRouteCrossConnectionPeeringList, getNextPage func(context.Context, ExpressRouteCrossConnectionPeeringList) (ExpressRouteCrossConnectionPeeringList, error)) ExpressRouteCrossConnectionPeeringListPage {
9860	return ExpressRouteCrossConnectionPeeringListPage{
9861		fn:     getNextPage,
9862		erccpl: cur,
9863	}
9864}
9865
9866// ExpressRouteCrossConnectionPeeringProperties properties of express route cross connection peering.
9867type ExpressRouteCrossConnectionPeeringProperties struct {
9868	// PeeringType - The peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'
9869	PeeringType ExpressRoutePeeringType `json:"peeringType,omitempty"`
9870	// State - The peering state. Possible values include: 'ExpressRoutePeeringStateDisabled', 'ExpressRoutePeeringStateEnabled'
9871	State ExpressRoutePeeringState `json:"state,omitempty"`
9872	// AzureASN - READ-ONLY; The Azure ASN.
9873	AzureASN *int32 `json:"azureASN,omitempty"`
9874	// PeerASN - The peer ASN.
9875	PeerASN *int64 `json:"peerASN,omitempty"`
9876	// PrimaryPeerAddressPrefix - The primary address prefix.
9877	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
9878	// SecondaryPeerAddressPrefix - The secondary address prefix.
9879	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
9880	// PrimaryAzurePort - READ-ONLY; The primary port.
9881	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
9882	// SecondaryAzurePort - READ-ONLY; The secondary port.
9883	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
9884	// SharedKey - The shared key.
9885	SharedKey *string `json:"sharedKey,omitempty"`
9886	// VlanID - The VLAN ID.
9887	VlanID *int32 `json:"vlanId,omitempty"`
9888	// MicrosoftPeeringConfig - The Microsoft peering configuration.
9889	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
9890	// ProvisioningState - READ-ONLY; Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
9891	ProvisioningState *string `json:"provisioningState,omitempty"`
9892	// GatewayManagerEtag - The GatewayManager Etag.
9893	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
9894	// LastModifiedBy - Gets whether the provider or the customer last modified the peering.
9895	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
9896	// Ipv6PeeringConfig - The IPv6 peering configuration.
9897	Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"`
9898}
9899
9900// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeeringProperties.
9901func (erccpp ExpressRouteCrossConnectionPeeringProperties) MarshalJSON() ([]byte, error) {
9902	objectMap := make(map[string]interface{})
9903	if erccpp.PeeringType != "" {
9904		objectMap["peeringType"] = erccpp.PeeringType
9905	}
9906	if erccpp.State != "" {
9907		objectMap["state"] = erccpp.State
9908	}
9909	if erccpp.PeerASN != nil {
9910		objectMap["peerASN"] = erccpp.PeerASN
9911	}
9912	if erccpp.PrimaryPeerAddressPrefix != nil {
9913		objectMap["primaryPeerAddressPrefix"] = erccpp.PrimaryPeerAddressPrefix
9914	}
9915	if erccpp.SecondaryPeerAddressPrefix != nil {
9916		objectMap["secondaryPeerAddressPrefix"] = erccpp.SecondaryPeerAddressPrefix
9917	}
9918	if erccpp.SharedKey != nil {
9919		objectMap["sharedKey"] = erccpp.SharedKey
9920	}
9921	if erccpp.VlanID != nil {
9922		objectMap["vlanId"] = erccpp.VlanID
9923	}
9924	if erccpp.MicrosoftPeeringConfig != nil {
9925		objectMap["microsoftPeeringConfig"] = erccpp.MicrosoftPeeringConfig
9926	}
9927	if erccpp.GatewayManagerEtag != nil {
9928		objectMap["gatewayManagerEtag"] = erccpp.GatewayManagerEtag
9929	}
9930	if erccpp.LastModifiedBy != nil {
9931		objectMap["lastModifiedBy"] = erccpp.LastModifiedBy
9932	}
9933	if erccpp.Ipv6PeeringConfig != nil {
9934		objectMap["ipv6PeeringConfig"] = erccpp.Ipv6PeeringConfig
9935	}
9936	return json.Marshal(objectMap)
9937}
9938
9939// ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
9940// results of a long-running operation.
9941type ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture struct {
9942	azure.FutureAPI
9943	// Result returns the result of the asynchronous operation.
9944	// If the operation has not completed it will return an error.
9945	Result func(ExpressRouteCrossConnectionPeeringsClient) (ExpressRouteCrossConnectionPeering, error)
9946}
9947
9948// ExpressRouteCrossConnectionPeeringsDeleteFuture an abstraction for monitoring and retrieving the results
9949// of a long-running operation.
9950type ExpressRouteCrossConnectionPeeringsDeleteFuture struct {
9951	azure.FutureAPI
9952	// Result returns the result of the asynchronous operation.
9953	// If the operation has not completed it will return an error.
9954	Result func(ExpressRouteCrossConnectionPeeringsClient) (autorest.Response, error)
9955}
9956
9957// ExpressRouteCrossConnectionProperties properties of ExpressRouteCrossConnection.
9958type ExpressRouteCrossConnectionProperties struct {
9959	// PrimaryAzurePort - READ-ONLY; The name of the primary port.
9960	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
9961	// SecondaryAzurePort - READ-ONLY; The name of the secondary port.
9962	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
9963	// STag - READ-ONLY; The identifier of the circuit traffic.
9964	STag *int32 `json:"sTag,omitempty"`
9965	// PeeringLocation - The peering location of the ExpressRoute circuit.
9966	PeeringLocation *string `json:"peeringLocation,omitempty"`
9967	// BandwidthInMbps - The circuit bandwidth In Mbps.
9968	BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"`
9969	// ExpressRouteCircuit - The ExpressRouteCircuit.
9970	ExpressRouteCircuit *ExpressRouteCircuitReference `json:"expressRouteCircuit,omitempty"`
9971	// ServiceProviderProvisioningState - The provisioning state of the circuit in the connectivity provider system. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning'
9972	ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"`
9973	// ServiceProviderNotes - Additional read only notes set by the connectivity provider.
9974	ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"`
9975	// ProvisioningState - READ-ONLY; Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
9976	ProvisioningState *string `json:"provisioningState,omitempty"`
9977	// Peerings - The list of peerings.
9978	Peerings *[]ExpressRouteCrossConnectionPeering `json:"peerings,omitempty"`
9979}
9980
9981// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionProperties.
9982func (erccp ExpressRouteCrossConnectionProperties) MarshalJSON() ([]byte, error) {
9983	objectMap := make(map[string]interface{})
9984	if erccp.PeeringLocation != nil {
9985		objectMap["peeringLocation"] = erccp.PeeringLocation
9986	}
9987	if erccp.BandwidthInMbps != nil {
9988		objectMap["bandwidthInMbps"] = erccp.BandwidthInMbps
9989	}
9990	if erccp.ExpressRouteCircuit != nil {
9991		objectMap["expressRouteCircuit"] = erccp.ExpressRouteCircuit
9992	}
9993	if erccp.ServiceProviderProvisioningState != "" {
9994		objectMap["serviceProviderProvisioningState"] = erccp.ServiceProviderProvisioningState
9995	}
9996	if erccp.ServiceProviderNotes != nil {
9997		objectMap["serviceProviderNotes"] = erccp.ServiceProviderNotes
9998	}
9999	if erccp.Peerings != nil {
10000		objectMap["peerings"] = erccp.Peerings
10001	}
10002	return json.Marshal(objectMap)
10003}
10004
10005// ExpressRouteCrossConnectionRoutesTableSummary the routes table associated with the ExpressRouteCircuit.
10006type ExpressRouteCrossConnectionRoutesTableSummary struct {
10007	// Neighbor - IP address of Neighbor router.
10008	Neighbor *string `json:"neighbor,omitempty"`
10009	// Asn - Autonomous system number.
10010	Asn *int32 `json:"asn,omitempty"`
10011	// 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.
10012	UpDown *string `json:"upDown,omitempty"`
10013	// StateOrPrefixesReceived - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group.
10014	StateOrPrefixesReceived *string `json:"stateOrPrefixesReceived,omitempty"`
10015}
10016
10017// ExpressRouteCrossConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
10018// results of a long-running operation.
10019type ExpressRouteCrossConnectionsCreateOrUpdateFuture struct {
10020	azure.FutureAPI
10021	// Result returns the result of the asynchronous operation.
10022	// If the operation has not completed it will return an error.
10023	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCrossConnection, error)
10024}
10025
10026// ExpressRouteCrossConnectionsListArpTableFuture an abstraction for monitoring and retrieving the results
10027// of a long-running operation.
10028type ExpressRouteCrossConnectionsListArpTableFuture struct {
10029	azure.FutureAPI
10030	// Result returns the result of the asynchronous operation.
10031	// If the operation has not completed it will return an error.
10032	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCircuitsArpTableListResult, error)
10033}
10034
10035// ExpressRouteCrossConnectionsListRoutesTableFuture an abstraction for monitoring and retrieving the
10036// results of a long-running operation.
10037type ExpressRouteCrossConnectionsListRoutesTableFuture struct {
10038	azure.FutureAPI
10039	// Result returns the result of the asynchronous operation.
10040	// If the operation has not completed it will return an error.
10041	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCircuitsRoutesTableListResult, error)
10042}
10043
10044// ExpressRouteCrossConnectionsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving
10045// the results of a long-running operation.
10046type ExpressRouteCrossConnectionsListRoutesTableSummaryFuture struct {
10047	azure.FutureAPI
10048	// Result returns the result of the asynchronous operation.
10049	// If the operation has not completed it will return an error.
10050	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCrossConnectionsRoutesTableSummaryListResult, error)
10051}
10052
10053// ExpressRouteCrossConnectionsRoutesTableSummaryListResult response for ListRoutesTable associated with
10054// the Express Route Cross Connections.
10055type ExpressRouteCrossConnectionsRoutesTableSummaryListResult struct {
10056	autorest.Response `json:"-"`
10057	// Value - A list of the routes table.
10058	Value *[]ExpressRouteCrossConnectionRoutesTableSummary `json:"value,omitempty"`
10059	// NextLink - READ-ONLY; The URL to get the next set of results.
10060	NextLink *string `json:"nextLink,omitempty"`
10061}
10062
10063// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionsRoutesTableSummaryListResult.
10064func (erccrtslr ExpressRouteCrossConnectionsRoutesTableSummaryListResult) MarshalJSON() ([]byte, error) {
10065	objectMap := make(map[string]interface{})
10066	if erccrtslr.Value != nil {
10067		objectMap["value"] = erccrtslr.Value
10068	}
10069	return json.Marshal(objectMap)
10070}
10071
10072// ExpressRouteCrossConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the results of
10073// a long-running operation.
10074type ExpressRouteCrossConnectionsUpdateTagsFuture struct {
10075	azure.FutureAPI
10076	// Result returns the result of the asynchronous operation.
10077	// If the operation has not completed it will return an error.
10078	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCrossConnection, error)
10079}
10080
10081// ExpressRouteGateway expressRoute gateway resource.
10082type ExpressRouteGateway struct {
10083	autorest.Response `json:"-"`
10084	// ExpressRouteGatewayProperties - Properties of the express route gateway.
10085	*ExpressRouteGatewayProperties `json:"properties,omitempty"`
10086	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
10087	Etag *string `json:"etag,omitempty"`
10088	// ID - Resource ID.
10089	ID *string `json:"id,omitempty"`
10090	// Name - READ-ONLY; Resource name.
10091	Name *string `json:"name,omitempty"`
10092	// Type - READ-ONLY; Resource type.
10093	Type *string `json:"type,omitempty"`
10094	// Location - Resource location.
10095	Location *string `json:"location,omitempty"`
10096	// Tags - Resource tags.
10097	Tags map[string]*string `json:"tags"`
10098}
10099
10100// MarshalJSON is the custom marshaler for ExpressRouteGateway.
10101func (erg ExpressRouteGateway) MarshalJSON() ([]byte, error) {
10102	objectMap := make(map[string]interface{})
10103	if erg.ExpressRouteGatewayProperties != nil {
10104		objectMap["properties"] = erg.ExpressRouteGatewayProperties
10105	}
10106	if erg.ID != nil {
10107		objectMap["id"] = erg.ID
10108	}
10109	if erg.Location != nil {
10110		objectMap["location"] = erg.Location
10111	}
10112	if erg.Tags != nil {
10113		objectMap["tags"] = erg.Tags
10114	}
10115	return json.Marshal(objectMap)
10116}
10117
10118// UnmarshalJSON is the custom unmarshaler for ExpressRouteGateway struct.
10119func (erg *ExpressRouteGateway) UnmarshalJSON(body []byte) error {
10120	var m map[string]*json.RawMessage
10121	err := json.Unmarshal(body, &m)
10122	if err != nil {
10123		return err
10124	}
10125	for k, v := range m {
10126		switch k {
10127		case "properties":
10128			if v != nil {
10129				var expressRouteGatewayProperties ExpressRouteGatewayProperties
10130				err = json.Unmarshal(*v, &expressRouteGatewayProperties)
10131				if err != nil {
10132					return err
10133				}
10134				erg.ExpressRouteGatewayProperties = &expressRouteGatewayProperties
10135			}
10136		case "etag":
10137			if v != nil {
10138				var etag string
10139				err = json.Unmarshal(*v, &etag)
10140				if err != nil {
10141					return err
10142				}
10143				erg.Etag = &etag
10144			}
10145		case "id":
10146			if v != nil {
10147				var ID string
10148				err = json.Unmarshal(*v, &ID)
10149				if err != nil {
10150					return err
10151				}
10152				erg.ID = &ID
10153			}
10154		case "name":
10155			if v != nil {
10156				var name string
10157				err = json.Unmarshal(*v, &name)
10158				if err != nil {
10159					return err
10160				}
10161				erg.Name = &name
10162			}
10163		case "type":
10164			if v != nil {
10165				var typeVar string
10166				err = json.Unmarshal(*v, &typeVar)
10167				if err != nil {
10168					return err
10169				}
10170				erg.Type = &typeVar
10171			}
10172		case "location":
10173			if v != nil {
10174				var location string
10175				err = json.Unmarshal(*v, &location)
10176				if err != nil {
10177					return err
10178				}
10179				erg.Location = &location
10180			}
10181		case "tags":
10182			if v != nil {
10183				var tags map[string]*string
10184				err = json.Unmarshal(*v, &tags)
10185				if err != nil {
10186					return err
10187				}
10188				erg.Tags = tags
10189			}
10190		}
10191	}
10192
10193	return nil
10194}
10195
10196// ExpressRouteGatewayList list of ExpressRoute gateways.
10197type ExpressRouteGatewayList struct {
10198	autorest.Response `json:"-"`
10199	// Value - List of ExpressRoute gateways.
10200	Value *[]ExpressRouteGateway `json:"value,omitempty"`
10201}
10202
10203// ExpressRouteGatewayProperties expressRoute gateway resource properties.
10204type ExpressRouteGatewayProperties struct {
10205	// AutoScaleConfiguration - Configuration for auto scaling.
10206	AutoScaleConfiguration *ExpressRouteGatewayPropertiesAutoScaleConfiguration `json:"autoScaleConfiguration,omitempty"`
10207	// ExpressRouteConnections - READ-ONLY; List of ExpressRoute connections to the ExpressRoute gateway.
10208	ExpressRouteConnections *[]ExpressRouteConnection `json:"expressRouteConnections,omitempty"`
10209	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
10210	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
10211	// VirtualHub - The Virtual Hub where the ExpressRoute gateway is or will be deployed.
10212	VirtualHub *VirtualHubID `json:"virtualHub,omitempty"`
10213}
10214
10215// MarshalJSON is the custom marshaler for ExpressRouteGatewayProperties.
10216func (ergp ExpressRouteGatewayProperties) MarshalJSON() ([]byte, error) {
10217	objectMap := make(map[string]interface{})
10218	if ergp.AutoScaleConfiguration != nil {
10219		objectMap["autoScaleConfiguration"] = ergp.AutoScaleConfiguration
10220	}
10221	if ergp.ProvisioningState != "" {
10222		objectMap["provisioningState"] = ergp.ProvisioningState
10223	}
10224	if ergp.VirtualHub != nil {
10225		objectMap["virtualHub"] = ergp.VirtualHub
10226	}
10227	return json.Marshal(objectMap)
10228}
10229
10230// ExpressRouteGatewayPropertiesAutoScaleConfiguration configuration for auto scaling.
10231type ExpressRouteGatewayPropertiesAutoScaleConfiguration struct {
10232	// Bounds - Minimum and maximum number of scale units to deploy.
10233	Bounds *ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds `json:"bounds,omitempty"`
10234}
10235
10236// ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds minimum and maximum number of scale units to
10237// deploy.
10238type ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds struct {
10239	// Min - Minimum number of scale units deployed for ExpressRoute gateway.
10240	Min *int32 `json:"min,omitempty"`
10241	// Max - Maximum number of scale units deployed for ExpressRoute gateway.
10242	Max *int32 `json:"max,omitempty"`
10243}
10244
10245// ExpressRouteGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
10246// long-running operation.
10247type ExpressRouteGatewaysCreateOrUpdateFuture struct {
10248	azure.FutureAPI
10249	// Result returns the result of the asynchronous operation.
10250	// If the operation has not completed it will return an error.
10251	Result func(ExpressRouteGatewaysClient) (ExpressRouteGateway, error)
10252}
10253
10254// ExpressRouteGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
10255// long-running operation.
10256type ExpressRouteGatewaysDeleteFuture struct {
10257	azure.FutureAPI
10258	// Result returns the result of the asynchronous operation.
10259	// If the operation has not completed it will return an error.
10260	Result func(ExpressRouteGatewaysClient) (autorest.Response, error)
10261}
10262
10263// ExpressRouteLink expressRouteLink child resource definition.
10264type ExpressRouteLink struct {
10265	autorest.Response `json:"-"`
10266	// ExpressRouteLinkPropertiesFormat - ExpressRouteLink properties.
10267	*ExpressRouteLinkPropertiesFormat `json:"properties,omitempty"`
10268	// Name - Name of child port resource that is unique among child port resources of the parent.
10269	Name *string `json:"name,omitempty"`
10270	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
10271	Etag *string `json:"etag,omitempty"`
10272	// ID - Resource ID.
10273	ID *string `json:"id,omitempty"`
10274}
10275
10276// MarshalJSON is the custom marshaler for ExpressRouteLink.
10277func (erl ExpressRouteLink) MarshalJSON() ([]byte, error) {
10278	objectMap := make(map[string]interface{})
10279	if erl.ExpressRouteLinkPropertiesFormat != nil {
10280		objectMap["properties"] = erl.ExpressRouteLinkPropertiesFormat
10281	}
10282	if erl.Name != nil {
10283		objectMap["name"] = erl.Name
10284	}
10285	if erl.ID != nil {
10286		objectMap["id"] = erl.ID
10287	}
10288	return json.Marshal(objectMap)
10289}
10290
10291// UnmarshalJSON is the custom unmarshaler for ExpressRouteLink struct.
10292func (erl *ExpressRouteLink) UnmarshalJSON(body []byte) error {
10293	var m map[string]*json.RawMessage
10294	err := json.Unmarshal(body, &m)
10295	if err != nil {
10296		return err
10297	}
10298	for k, v := range m {
10299		switch k {
10300		case "properties":
10301			if v != nil {
10302				var expressRouteLinkPropertiesFormat ExpressRouteLinkPropertiesFormat
10303				err = json.Unmarshal(*v, &expressRouteLinkPropertiesFormat)
10304				if err != nil {
10305					return err
10306				}
10307				erl.ExpressRouteLinkPropertiesFormat = &expressRouteLinkPropertiesFormat
10308			}
10309		case "name":
10310			if v != nil {
10311				var name string
10312				err = json.Unmarshal(*v, &name)
10313				if err != nil {
10314					return err
10315				}
10316				erl.Name = &name
10317			}
10318		case "etag":
10319			if v != nil {
10320				var etag string
10321				err = json.Unmarshal(*v, &etag)
10322				if err != nil {
10323					return err
10324				}
10325				erl.Etag = &etag
10326			}
10327		case "id":
10328			if v != nil {
10329				var ID string
10330				err = json.Unmarshal(*v, &ID)
10331				if err != nil {
10332					return err
10333				}
10334				erl.ID = &ID
10335			}
10336		}
10337	}
10338
10339	return nil
10340}
10341
10342// ExpressRouteLinkListResult response for ListExpressRouteLinks API service call.
10343type ExpressRouteLinkListResult struct {
10344	autorest.Response `json:"-"`
10345	// Value - The list of ExpressRouteLink sub-resources.
10346	Value *[]ExpressRouteLink `json:"value,omitempty"`
10347	// NextLink - The URL to get the next set of results.
10348	NextLink *string `json:"nextLink,omitempty"`
10349}
10350
10351// ExpressRouteLinkListResultIterator provides access to a complete listing of ExpressRouteLink values.
10352type ExpressRouteLinkListResultIterator struct {
10353	i    int
10354	page ExpressRouteLinkListResultPage
10355}
10356
10357// NextWithContext advances to the next value.  If there was an error making
10358// the request the iterator does not advance and the error is returned.
10359func (iter *ExpressRouteLinkListResultIterator) NextWithContext(ctx context.Context) (err error) {
10360	if tracing.IsEnabled() {
10361		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteLinkListResultIterator.NextWithContext")
10362		defer func() {
10363			sc := -1
10364			if iter.Response().Response.Response != nil {
10365				sc = iter.Response().Response.Response.StatusCode
10366			}
10367			tracing.EndSpan(ctx, sc, err)
10368		}()
10369	}
10370	iter.i++
10371	if iter.i < len(iter.page.Values()) {
10372		return nil
10373	}
10374	err = iter.page.NextWithContext(ctx)
10375	if err != nil {
10376		iter.i--
10377		return err
10378	}
10379	iter.i = 0
10380	return nil
10381}
10382
10383// Next advances to the next value.  If there was an error making
10384// the request the iterator does not advance and the error is returned.
10385// Deprecated: Use NextWithContext() instead.
10386func (iter *ExpressRouteLinkListResultIterator) Next() error {
10387	return iter.NextWithContext(context.Background())
10388}
10389
10390// NotDone returns true if the enumeration should be started or is not yet complete.
10391func (iter ExpressRouteLinkListResultIterator) NotDone() bool {
10392	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10393}
10394
10395// Response returns the raw server response from the last page request.
10396func (iter ExpressRouteLinkListResultIterator) Response() ExpressRouteLinkListResult {
10397	return iter.page.Response()
10398}
10399
10400// Value returns the current value or a zero-initialized value if the
10401// iterator has advanced beyond the end of the collection.
10402func (iter ExpressRouteLinkListResultIterator) Value() ExpressRouteLink {
10403	if !iter.page.NotDone() {
10404		return ExpressRouteLink{}
10405	}
10406	return iter.page.Values()[iter.i]
10407}
10408
10409// Creates a new instance of the ExpressRouteLinkListResultIterator type.
10410func NewExpressRouteLinkListResultIterator(page ExpressRouteLinkListResultPage) ExpressRouteLinkListResultIterator {
10411	return ExpressRouteLinkListResultIterator{page: page}
10412}
10413
10414// IsEmpty returns true if the ListResult contains no values.
10415func (erllr ExpressRouteLinkListResult) IsEmpty() bool {
10416	return erllr.Value == nil || len(*erllr.Value) == 0
10417}
10418
10419// hasNextLink returns true if the NextLink is not empty.
10420func (erllr ExpressRouteLinkListResult) hasNextLink() bool {
10421	return erllr.NextLink != nil && len(*erllr.NextLink) != 0
10422}
10423
10424// expressRouteLinkListResultPreparer prepares a request to retrieve the next set of results.
10425// It returns nil if no more results exist.
10426func (erllr ExpressRouteLinkListResult) expressRouteLinkListResultPreparer(ctx context.Context) (*http.Request, error) {
10427	if !erllr.hasNextLink() {
10428		return nil, nil
10429	}
10430	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10431		autorest.AsJSON(),
10432		autorest.AsGet(),
10433		autorest.WithBaseURL(to.String(erllr.NextLink)))
10434}
10435
10436// ExpressRouteLinkListResultPage contains a page of ExpressRouteLink values.
10437type ExpressRouteLinkListResultPage struct {
10438	fn    func(context.Context, ExpressRouteLinkListResult) (ExpressRouteLinkListResult, error)
10439	erllr ExpressRouteLinkListResult
10440}
10441
10442// NextWithContext advances to the next page of values.  If there was an error making
10443// the request the page does not advance and the error is returned.
10444func (page *ExpressRouteLinkListResultPage) NextWithContext(ctx context.Context) (err error) {
10445	if tracing.IsEnabled() {
10446		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteLinkListResultPage.NextWithContext")
10447		defer func() {
10448			sc := -1
10449			if page.Response().Response.Response != nil {
10450				sc = page.Response().Response.Response.StatusCode
10451			}
10452			tracing.EndSpan(ctx, sc, err)
10453		}()
10454	}
10455	for {
10456		next, err := page.fn(ctx, page.erllr)
10457		if err != nil {
10458			return err
10459		}
10460		page.erllr = next
10461		if !next.hasNextLink() || !next.IsEmpty() {
10462			break
10463		}
10464	}
10465	return nil
10466}
10467
10468// Next advances to the next page of values.  If there was an error making
10469// the request the page does not advance and the error is returned.
10470// Deprecated: Use NextWithContext() instead.
10471func (page *ExpressRouteLinkListResultPage) Next() error {
10472	return page.NextWithContext(context.Background())
10473}
10474
10475// NotDone returns true if the page enumeration should be started or is not yet complete.
10476func (page ExpressRouteLinkListResultPage) NotDone() bool {
10477	return !page.erllr.IsEmpty()
10478}
10479
10480// Response returns the raw server response from the last page request.
10481func (page ExpressRouteLinkListResultPage) Response() ExpressRouteLinkListResult {
10482	return page.erllr
10483}
10484
10485// Values returns the slice of values for the current page or nil if there are no values.
10486func (page ExpressRouteLinkListResultPage) Values() []ExpressRouteLink {
10487	if page.erllr.IsEmpty() {
10488		return nil
10489	}
10490	return *page.erllr.Value
10491}
10492
10493// Creates a new instance of the ExpressRouteLinkListResultPage type.
10494func NewExpressRouteLinkListResultPage(cur ExpressRouteLinkListResult, getNextPage func(context.Context, ExpressRouteLinkListResult) (ExpressRouteLinkListResult, error)) ExpressRouteLinkListResultPage {
10495	return ExpressRouteLinkListResultPage{
10496		fn:    getNextPage,
10497		erllr: cur,
10498	}
10499}
10500
10501// ExpressRouteLinkPropertiesFormat properties specific to ExpressRouteLink resources.
10502type ExpressRouteLinkPropertiesFormat struct {
10503	// RouterName - READ-ONLY; Name of Azure router associated with physical port.
10504	RouterName *string `json:"routerName,omitempty"`
10505	// InterfaceName - READ-ONLY; Name of Azure router interface.
10506	InterfaceName *string `json:"interfaceName,omitempty"`
10507	// PatchPanelID - READ-ONLY; Mapping between physical port to patch panel port.
10508	PatchPanelID *string `json:"patchPanelId,omitempty"`
10509	// RackID - READ-ONLY; Mapping of physical patch panel to rack.
10510	RackID *string `json:"rackId,omitempty"`
10511	// ConnectorType - READ-ONLY; Physical fiber port type. Possible values include: 'LC', 'SC'
10512	ConnectorType ExpressRouteLinkConnectorType `json:"connectorType,omitempty"`
10513	// AdminState - Administrative state of the physical port. Possible values include: 'ExpressRouteLinkAdminStateEnabled', 'ExpressRouteLinkAdminStateDisabled'
10514	AdminState ExpressRouteLinkAdminState `json:"adminState,omitempty"`
10515	// ProvisioningState - READ-ONLY; The provisioning state of the ExpressRouteLink resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
10516	ProvisioningState *string `json:"provisioningState,omitempty"`
10517}
10518
10519// MarshalJSON is the custom marshaler for ExpressRouteLinkPropertiesFormat.
10520func (erlpf ExpressRouteLinkPropertiesFormat) MarshalJSON() ([]byte, error) {
10521	objectMap := make(map[string]interface{})
10522	if erlpf.AdminState != "" {
10523		objectMap["adminState"] = erlpf.AdminState
10524	}
10525	return json.Marshal(objectMap)
10526}
10527
10528// ExpressRoutePort expressRoutePort resource definition.
10529type ExpressRoutePort struct {
10530	autorest.Response `json:"-"`
10531	// ExpressRoutePortPropertiesFormat - ExpressRoutePort properties.
10532	*ExpressRoutePortPropertiesFormat `json:"properties,omitempty"`
10533	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
10534	Etag *string `json:"etag,omitempty"`
10535	// ID - Resource ID.
10536	ID *string `json:"id,omitempty"`
10537	// Name - READ-ONLY; Resource name.
10538	Name *string `json:"name,omitempty"`
10539	// Type - READ-ONLY; Resource type.
10540	Type *string `json:"type,omitempty"`
10541	// Location - Resource location.
10542	Location *string `json:"location,omitempty"`
10543	// Tags - Resource tags.
10544	Tags map[string]*string `json:"tags"`
10545}
10546
10547// MarshalJSON is the custom marshaler for ExpressRoutePort.
10548func (erp ExpressRoutePort) MarshalJSON() ([]byte, error) {
10549	objectMap := make(map[string]interface{})
10550	if erp.ExpressRoutePortPropertiesFormat != nil {
10551		objectMap["properties"] = erp.ExpressRoutePortPropertiesFormat
10552	}
10553	if erp.ID != nil {
10554		objectMap["id"] = erp.ID
10555	}
10556	if erp.Location != nil {
10557		objectMap["location"] = erp.Location
10558	}
10559	if erp.Tags != nil {
10560		objectMap["tags"] = erp.Tags
10561	}
10562	return json.Marshal(objectMap)
10563}
10564
10565// UnmarshalJSON is the custom unmarshaler for ExpressRoutePort struct.
10566func (erp *ExpressRoutePort) UnmarshalJSON(body []byte) error {
10567	var m map[string]*json.RawMessage
10568	err := json.Unmarshal(body, &m)
10569	if err != nil {
10570		return err
10571	}
10572	for k, v := range m {
10573		switch k {
10574		case "properties":
10575			if v != nil {
10576				var expressRoutePortPropertiesFormat ExpressRoutePortPropertiesFormat
10577				err = json.Unmarshal(*v, &expressRoutePortPropertiesFormat)
10578				if err != nil {
10579					return err
10580				}
10581				erp.ExpressRoutePortPropertiesFormat = &expressRoutePortPropertiesFormat
10582			}
10583		case "etag":
10584			if v != nil {
10585				var etag string
10586				err = json.Unmarshal(*v, &etag)
10587				if err != nil {
10588					return err
10589				}
10590				erp.Etag = &etag
10591			}
10592		case "id":
10593			if v != nil {
10594				var ID string
10595				err = json.Unmarshal(*v, &ID)
10596				if err != nil {
10597					return err
10598				}
10599				erp.ID = &ID
10600			}
10601		case "name":
10602			if v != nil {
10603				var name string
10604				err = json.Unmarshal(*v, &name)
10605				if err != nil {
10606					return err
10607				}
10608				erp.Name = &name
10609			}
10610		case "type":
10611			if v != nil {
10612				var typeVar string
10613				err = json.Unmarshal(*v, &typeVar)
10614				if err != nil {
10615					return err
10616				}
10617				erp.Type = &typeVar
10618			}
10619		case "location":
10620			if v != nil {
10621				var location string
10622				err = json.Unmarshal(*v, &location)
10623				if err != nil {
10624					return err
10625				}
10626				erp.Location = &location
10627			}
10628		case "tags":
10629			if v != nil {
10630				var tags map[string]*string
10631				err = json.Unmarshal(*v, &tags)
10632				if err != nil {
10633					return err
10634				}
10635				erp.Tags = tags
10636			}
10637		}
10638	}
10639
10640	return nil
10641}
10642
10643// ExpressRoutePortListResult response for ListExpressRoutePorts API service call.
10644type ExpressRoutePortListResult struct {
10645	autorest.Response `json:"-"`
10646	// Value - A list of ExpressRoutePort resources.
10647	Value *[]ExpressRoutePort `json:"value,omitempty"`
10648	// NextLink - The URL to get the next set of results.
10649	NextLink *string `json:"nextLink,omitempty"`
10650}
10651
10652// ExpressRoutePortListResultIterator provides access to a complete listing of ExpressRoutePort values.
10653type ExpressRoutePortListResultIterator struct {
10654	i    int
10655	page ExpressRoutePortListResultPage
10656}
10657
10658// NextWithContext advances to the next value.  If there was an error making
10659// the request the iterator does not advance and the error is returned.
10660func (iter *ExpressRoutePortListResultIterator) NextWithContext(ctx context.Context) (err error) {
10661	if tracing.IsEnabled() {
10662		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortListResultIterator.NextWithContext")
10663		defer func() {
10664			sc := -1
10665			if iter.Response().Response.Response != nil {
10666				sc = iter.Response().Response.Response.StatusCode
10667			}
10668			tracing.EndSpan(ctx, sc, err)
10669		}()
10670	}
10671	iter.i++
10672	if iter.i < len(iter.page.Values()) {
10673		return nil
10674	}
10675	err = iter.page.NextWithContext(ctx)
10676	if err != nil {
10677		iter.i--
10678		return err
10679	}
10680	iter.i = 0
10681	return nil
10682}
10683
10684// Next advances to the next value.  If there was an error making
10685// the request the iterator does not advance and the error is returned.
10686// Deprecated: Use NextWithContext() instead.
10687func (iter *ExpressRoutePortListResultIterator) Next() error {
10688	return iter.NextWithContext(context.Background())
10689}
10690
10691// NotDone returns true if the enumeration should be started or is not yet complete.
10692func (iter ExpressRoutePortListResultIterator) NotDone() bool {
10693	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10694}
10695
10696// Response returns the raw server response from the last page request.
10697func (iter ExpressRoutePortListResultIterator) Response() ExpressRoutePortListResult {
10698	return iter.page.Response()
10699}
10700
10701// Value returns the current value or a zero-initialized value if the
10702// iterator has advanced beyond the end of the collection.
10703func (iter ExpressRoutePortListResultIterator) Value() ExpressRoutePort {
10704	if !iter.page.NotDone() {
10705		return ExpressRoutePort{}
10706	}
10707	return iter.page.Values()[iter.i]
10708}
10709
10710// Creates a new instance of the ExpressRoutePortListResultIterator type.
10711func NewExpressRoutePortListResultIterator(page ExpressRoutePortListResultPage) ExpressRoutePortListResultIterator {
10712	return ExpressRoutePortListResultIterator{page: page}
10713}
10714
10715// IsEmpty returns true if the ListResult contains no values.
10716func (erplr ExpressRoutePortListResult) IsEmpty() bool {
10717	return erplr.Value == nil || len(*erplr.Value) == 0
10718}
10719
10720// hasNextLink returns true if the NextLink is not empty.
10721func (erplr ExpressRoutePortListResult) hasNextLink() bool {
10722	return erplr.NextLink != nil && len(*erplr.NextLink) != 0
10723}
10724
10725// expressRoutePortListResultPreparer prepares a request to retrieve the next set of results.
10726// It returns nil if no more results exist.
10727func (erplr ExpressRoutePortListResult) expressRoutePortListResultPreparer(ctx context.Context) (*http.Request, error) {
10728	if !erplr.hasNextLink() {
10729		return nil, nil
10730	}
10731	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10732		autorest.AsJSON(),
10733		autorest.AsGet(),
10734		autorest.WithBaseURL(to.String(erplr.NextLink)))
10735}
10736
10737// ExpressRoutePortListResultPage contains a page of ExpressRoutePort values.
10738type ExpressRoutePortListResultPage struct {
10739	fn    func(context.Context, ExpressRoutePortListResult) (ExpressRoutePortListResult, error)
10740	erplr ExpressRoutePortListResult
10741}
10742
10743// NextWithContext advances to the next page of values.  If there was an error making
10744// the request the page does not advance and the error is returned.
10745func (page *ExpressRoutePortListResultPage) NextWithContext(ctx context.Context) (err error) {
10746	if tracing.IsEnabled() {
10747		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortListResultPage.NextWithContext")
10748		defer func() {
10749			sc := -1
10750			if page.Response().Response.Response != nil {
10751				sc = page.Response().Response.Response.StatusCode
10752			}
10753			tracing.EndSpan(ctx, sc, err)
10754		}()
10755	}
10756	for {
10757		next, err := page.fn(ctx, page.erplr)
10758		if err != nil {
10759			return err
10760		}
10761		page.erplr = next
10762		if !next.hasNextLink() || !next.IsEmpty() {
10763			break
10764		}
10765	}
10766	return nil
10767}
10768
10769// Next advances to the next page of values.  If there was an error making
10770// the request the page does not advance and the error is returned.
10771// Deprecated: Use NextWithContext() instead.
10772func (page *ExpressRoutePortListResultPage) Next() error {
10773	return page.NextWithContext(context.Background())
10774}
10775
10776// NotDone returns true if the page enumeration should be started or is not yet complete.
10777func (page ExpressRoutePortListResultPage) NotDone() bool {
10778	return !page.erplr.IsEmpty()
10779}
10780
10781// Response returns the raw server response from the last page request.
10782func (page ExpressRoutePortListResultPage) Response() ExpressRoutePortListResult {
10783	return page.erplr
10784}
10785
10786// Values returns the slice of values for the current page or nil if there are no values.
10787func (page ExpressRoutePortListResultPage) Values() []ExpressRoutePort {
10788	if page.erplr.IsEmpty() {
10789		return nil
10790	}
10791	return *page.erplr.Value
10792}
10793
10794// Creates a new instance of the ExpressRoutePortListResultPage type.
10795func NewExpressRoutePortListResultPage(cur ExpressRoutePortListResult, getNextPage func(context.Context, ExpressRoutePortListResult) (ExpressRoutePortListResult, error)) ExpressRoutePortListResultPage {
10796	return ExpressRoutePortListResultPage{
10797		fn:    getNextPage,
10798		erplr: cur,
10799	}
10800}
10801
10802// ExpressRoutePortPropertiesFormat properties specific to ExpressRoutePort resources.
10803type ExpressRoutePortPropertiesFormat struct {
10804	// PeeringLocation - The name of the peering location that the ExpressRoutePort is mapped to physically.
10805	PeeringLocation *string `json:"peeringLocation,omitempty"`
10806	// BandwidthInGbps - Bandwidth of procured ports in Gbps.
10807	BandwidthInGbps *int32 `json:"bandwidthInGbps,omitempty"`
10808	// ProvisionedBandwidthInGbps - READ-ONLY; Aggregate Gbps of associated circuit bandwidths.
10809	ProvisionedBandwidthInGbps *float64 `json:"provisionedBandwidthInGbps,omitempty"`
10810	// Mtu - READ-ONLY; Maximum transmission unit of the physical port pair(s).
10811	Mtu *string `json:"mtu,omitempty"`
10812	// Encapsulation - Encapsulation method on physical ports. Possible values include: 'Dot1Q', 'QinQ'
10813	Encapsulation ExpressRoutePortsEncapsulation `json:"encapsulation,omitempty"`
10814	// EtherType - READ-ONLY; Ether type of the physical port.
10815	EtherType *string `json:"etherType,omitempty"`
10816	// AllocationDate - READ-ONLY; Date of the physical port allocation to be used in Letter of Authorization.
10817	AllocationDate *string `json:"allocationDate,omitempty"`
10818	// Links - The set of physical links of the ExpressRoutePort resource.
10819	Links *[]ExpressRouteLink `json:"links,omitempty"`
10820	// Circuits - READ-ONLY; Reference the ExpressRoute circuit(s) that are provisioned on this ExpressRoutePort resource.
10821	Circuits *[]SubResource `json:"circuits,omitempty"`
10822	// ProvisioningState - READ-ONLY; The provisioning state of the ExpressRoutePort resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
10823	ProvisioningState *string `json:"provisioningState,omitempty"`
10824	// ResourceGUID - The resource GUID property of the ExpressRoutePort resource.
10825	ResourceGUID *string `json:"resourceGuid,omitempty"`
10826}
10827
10828// MarshalJSON is the custom marshaler for ExpressRoutePortPropertiesFormat.
10829func (erppf ExpressRoutePortPropertiesFormat) MarshalJSON() ([]byte, error) {
10830	objectMap := make(map[string]interface{})
10831	if erppf.PeeringLocation != nil {
10832		objectMap["peeringLocation"] = erppf.PeeringLocation
10833	}
10834	if erppf.BandwidthInGbps != nil {
10835		objectMap["bandwidthInGbps"] = erppf.BandwidthInGbps
10836	}
10837	if erppf.Encapsulation != "" {
10838		objectMap["encapsulation"] = erppf.Encapsulation
10839	}
10840	if erppf.Links != nil {
10841		objectMap["links"] = erppf.Links
10842	}
10843	if erppf.ResourceGUID != nil {
10844		objectMap["resourceGuid"] = erppf.ResourceGUID
10845	}
10846	return json.Marshal(objectMap)
10847}
10848
10849// ExpressRoutePortsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
10850// long-running operation.
10851type ExpressRoutePortsCreateOrUpdateFuture struct {
10852	azure.FutureAPI
10853	// Result returns the result of the asynchronous operation.
10854	// If the operation has not completed it will return an error.
10855	Result func(ExpressRoutePortsClient) (ExpressRoutePort, error)
10856}
10857
10858// ExpressRoutePortsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
10859// operation.
10860type ExpressRoutePortsDeleteFuture struct {
10861	azure.FutureAPI
10862	// Result returns the result of the asynchronous operation.
10863	// If the operation has not completed it will return an error.
10864	Result func(ExpressRoutePortsClient) (autorest.Response, error)
10865}
10866
10867// ExpressRoutePortsLocation definition of the ExpressRoutePorts peering location resource.
10868type ExpressRoutePortsLocation struct {
10869	autorest.Response `json:"-"`
10870	// ExpressRoutePortsLocationPropertiesFormat - ExpressRoutePort peering location properties.
10871	*ExpressRoutePortsLocationPropertiesFormat `json:"properties,omitempty"`
10872	// ID - Resource ID.
10873	ID *string `json:"id,omitempty"`
10874	// Name - READ-ONLY; Resource name.
10875	Name *string `json:"name,omitempty"`
10876	// Type - READ-ONLY; Resource type.
10877	Type *string `json:"type,omitempty"`
10878	// Location - Resource location.
10879	Location *string `json:"location,omitempty"`
10880	// Tags - Resource tags.
10881	Tags map[string]*string `json:"tags"`
10882}
10883
10884// MarshalJSON is the custom marshaler for ExpressRoutePortsLocation.
10885func (erpl ExpressRoutePortsLocation) MarshalJSON() ([]byte, error) {
10886	objectMap := make(map[string]interface{})
10887	if erpl.ExpressRoutePortsLocationPropertiesFormat != nil {
10888		objectMap["properties"] = erpl.ExpressRoutePortsLocationPropertiesFormat
10889	}
10890	if erpl.ID != nil {
10891		objectMap["id"] = erpl.ID
10892	}
10893	if erpl.Location != nil {
10894		objectMap["location"] = erpl.Location
10895	}
10896	if erpl.Tags != nil {
10897		objectMap["tags"] = erpl.Tags
10898	}
10899	return json.Marshal(objectMap)
10900}
10901
10902// UnmarshalJSON is the custom unmarshaler for ExpressRoutePortsLocation struct.
10903func (erpl *ExpressRoutePortsLocation) UnmarshalJSON(body []byte) error {
10904	var m map[string]*json.RawMessage
10905	err := json.Unmarshal(body, &m)
10906	if err != nil {
10907		return err
10908	}
10909	for k, v := range m {
10910		switch k {
10911		case "properties":
10912			if v != nil {
10913				var expressRoutePortsLocationPropertiesFormat ExpressRoutePortsLocationPropertiesFormat
10914				err = json.Unmarshal(*v, &expressRoutePortsLocationPropertiesFormat)
10915				if err != nil {
10916					return err
10917				}
10918				erpl.ExpressRoutePortsLocationPropertiesFormat = &expressRoutePortsLocationPropertiesFormat
10919			}
10920		case "id":
10921			if v != nil {
10922				var ID string
10923				err = json.Unmarshal(*v, &ID)
10924				if err != nil {
10925					return err
10926				}
10927				erpl.ID = &ID
10928			}
10929		case "name":
10930			if v != nil {
10931				var name string
10932				err = json.Unmarshal(*v, &name)
10933				if err != nil {
10934					return err
10935				}
10936				erpl.Name = &name
10937			}
10938		case "type":
10939			if v != nil {
10940				var typeVar string
10941				err = json.Unmarshal(*v, &typeVar)
10942				if err != nil {
10943					return err
10944				}
10945				erpl.Type = &typeVar
10946			}
10947		case "location":
10948			if v != nil {
10949				var location string
10950				err = json.Unmarshal(*v, &location)
10951				if err != nil {
10952					return err
10953				}
10954				erpl.Location = &location
10955			}
10956		case "tags":
10957			if v != nil {
10958				var tags map[string]*string
10959				err = json.Unmarshal(*v, &tags)
10960				if err != nil {
10961					return err
10962				}
10963				erpl.Tags = tags
10964			}
10965		}
10966	}
10967
10968	return nil
10969}
10970
10971// ExpressRoutePortsLocationBandwidths real-time inventory of available ExpressRoute port bandwidths.
10972type ExpressRoutePortsLocationBandwidths struct {
10973	// OfferName - READ-ONLY; Bandwidth descriptive name.
10974	OfferName *string `json:"offerName,omitempty"`
10975	// ValueInGbps - READ-ONLY; Bandwidth value in Gbps.
10976	ValueInGbps *int32 `json:"valueInGbps,omitempty"`
10977}
10978
10979// ExpressRoutePortsLocationListResult response for ListExpressRoutePortsLocations API service call.
10980type ExpressRoutePortsLocationListResult struct {
10981	autorest.Response `json:"-"`
10982	// Value - The list of all ExpressRoutePort peering locations.
10983	Value *[]ExpressRoutePortsLocation `json:"value,omitempty"`
10984	// NextLink - The URL to get the next set of results.
10985	NextLink *string `json:"nextLink,omitempty"`
10986}
10987
10988// ExpressRoutePortsLocationListResultIterator provides access to a complete listing of
10989// ExpressRoutePortsLocation values.
10990type ExpressRoutePortsLocationListResultIterator struct {
10991	i    int
10992	page ExpressRoutePortsLocationListResultPage
10993}
10994
10995// NextWithContext advances to the next value.  If there was an error making
10996// the request the iterator does not advance and the error is returned.
10997func (iter *ExpressRoutePortsLocationListResultIterator) NextWithContext(ctx context.Context) (err error) {
10998	if tracing.IsEnabled() {
10999		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsLocationListResultIterator.NextWithContext")
11000		defer func() {
11001			sc := -1
11002			if iter.Response().Response.Response != nil {
11003				sc = iter.Response().Response.Response.StatusCode
11004			}
11005			tracing.EndSpan(ctx, sc, err)
11006		}()
11007	}
11008	iter.i++
11009	if iter.i < len(iter.page.Values()) {
11010		return nil
11011	}
11012	err = iter.page.NextWithContext(ctx)
11013	if err != nil {
11014		iter.i--
11015		return err
11016	}
11017	iter.i = 0
11018	return nil
11019}
11020
11021// Next advances to the next value.  If there was an error making
11022// the request the iterator does not advance and the error is returned.
11023// Deprecated: Use NextWithContext() instead.
11024func (iter *ExpressRoutePortsLocationListResultIterator) Next() error {
11025	return iter.NextWithContext(context.Background())
11026}
11027
11028// NotDone returns true if the enumeration should be started or is not yet complete.
11029func (iter ExpressRoutePortsLocationListResultIterator) NotDone() bool {
11030	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11031}
11032
11033// Response returns the raw server response from the last page request.
11034func (iter ExpressRoutePortsLocationListResultIterator) Response() ExpressRoutePortsLocationListResult {
11035	return iter.page.Response()
11036}
11037
11038// Value returns the current value or a zero-initialized value if the
11039// iterator has advanced beyond the end of the collection.
11040func (iter ExpressRoutePortsLocationListResultIterator) Value() ExpressRoutePortsLocation {
11041	if !iter.page.NotDone() {
11042		return ExpressRoutePortsLocation{}
11043	}
11044	return iter.page.Values()[iter.i]
11045}
11046
11047// Creates a new instance of the ExpressRoutePortsLocationListResultIterator type.
11048func NewExpressRoutePortsLocationListResultIterator(page ExpressRoutePortsLocationListResultPage) ExpressRoutePortsLocationListResultIterator {
11049	return ExpressRoutePortsLocationListResultIterator{page: page}
11050}
11051
11052// IsEmpty returns true if the ListResult contains no values.
11053func (erpllr ExpressRoutePortsLocationListResult) IsEmpty() bool {
11054	return erpllr.Value == nil || len(*erpllr.Value) == 0
11055}
11056
11057// hasNextLink returns true if the NextLink is not empty.
11058func (erpllr ExpressRoutePortsLocationListResult) hasNextLink() bool {
11059	return erpllr.NextLink != nil && len(*erpllr.NextLink) != 0
11060}
11061
11062// expressRoutePortsLocationListResultPreparer prepares a request to retrieve the next set of results.
11063// It returns nil if no more results exist.
11064func (erpllr ExpressRoutePortsLocationListResult) expressRoutePortsLocationListResultPreparer(ctx context.Context) (*http.Request, error) {
11065	if !erpllr.hasNextLink() {
11066		return nil, nil
11067	}
11068	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11069		autorest.AsJSON(),
11070		autorest.AsGet(),
11071		autorest.WithBaseURL(to.String(erpllr.NextLink)))
11072}
11073
11074// ExpressRoutePortsLocationListResultPage contains a page of ExpressRoutePortsLocation values.
11075type ExpressRoutePortsLocationListResultPage struct {
11076	fn     func(context.Context, ExpressRoutePortsLocationListResult) (ExpressRoutePortsLocationListResult, error)
11077	erpllr ExpressRoutePortsLocationListResult
11078}
11079
11080// NextWithContext advances to the next page of values.  If there was an error making
11081// the request the page does not advance and the error is returned.
11082func (page *ExpressRoutePortsLocationListResultPage) NextWithContext(ctx context.Context) (err error) {
11083	if tracing.IsEnabled() {
11084		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsLocationListResultPage.NextWithContext")
11085		defer func() {
11086			sc := -1
11087			if page.Response().Response.Response != nil {
11088				sc = page.Response().Response.Response.StatusCode
11089			}
11090			tracing.EndSpan(ctx, sc, err)
11091		}()
11092	}
11093	for {
11094		next, err := page.fn(ctx, page.erpllr)
11095		if err != nil {
11096			return err
11097		}
11098		page.erpllr = next
11099		if !next.hasNextLink() || !next.IsEmpty() {
11100			break
11101		}
11102	}
11103	return nil
11104}
11105
11106// Next advances to the next page of values.  If there was an error making
11107// the request the page does not advance and the error is returned.
11108// Deprecated: Use NextWithContext() instead.
11109func (page *ExpressRoutePortsLocationListResultPage) Next() error {
11110	return page.NextWithContext(context.Background())
11111}
11112
11113// NotDone returns true if the page enumeration should be started or is not yet complete.
11114func (page ExpressRoutePortsLocationListResultPage) NotDone() bool {
11115	return !page.erpllr.IsEmpty()
11116}
11117
11118// Response returns the raw server response from the last page request.
11119func (page ExpressRoutePortsLocationListResultPage) Response() ExpressRoutePortsLocationListResult {
11120	return page.erpllr
11121}
11122
11123// Values returns the slice of values for the current page or nil if there are no values.
11124func (page ExpressRoutePortsLocationListResultPage) Values() []ExpressRoutePortsLocation {
11125	if page.erpllr.IsEmpty() {
11126		return nil
11127	}
11128	return *page.erpllr.Value
11129}
11130
11131// Creates a new instance of the ExpressRoutePortsLocationListResultPage type.
11132func NewExpressRoutePortsLocationListResultPage(cur ExpressRoutePortsLocationListResult, getNextPage func(context.Context, ExpressRoutePortsLocationListResult) (ExpressRoutePortsLocationListResult, error)) ExpressRoutePortsLocationListResultPage {
11133	return ExpressRoutePortsLocationListResultPage{
11134		fn:     getNextPage,
11135		erpllr: cur,
11136	}
11137}
11138
11139// ExpressRoutePortsLocationPropertiesFormat properties specific to ExpressRoutePorts peering location
11140// resources.
11141type ExpressRoutePortsLocationPropertiesFormat struct {
11142	// Address - READ-ONLY; Address of peering location.
11143	Address *string `json:"address,omitempty"`
11144	// Contact - READ-ONLY; Contact details of peering locations.
11145	Contact *string `json:"contact,omitempty"`
11146	// AvailableBandwidths - The inventory of available ExpressRoutePort bandwidths.
11147	AvailableBandwidths *[]ExpressRoutePortsLocationBandwidths `json:"availableBandwidths,omitempty"`
11148	// ProvisioningState - READ-ONLY; The provisioning state of the ExpressRoutePortLocation resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
11149	ProvisioningState *string `json:"provisioningState,omitempty"`
11150}
11151
11152// MarshalJSON is the custom marshaler for ExpressRoutePortsLocationPropertiesFormat.
11153func (erplpf ExpressRoutePortsLocationPropertiesFormat) MarshalJSON() ([]byte, error) {
11154	objectMap := make(map[string]interface{})
11155	if erplpf.AvailableBandwidths != nil {
11156		objectMap["availableBandwidths"] = erplpf.AvailableBandwidths
11157	}
11158	return json.Marshal(objectMap)
11159}
11160
11161// ExpressRoutePortsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
11162// long-running operation.
11163type ExpressRoutePortsUpdateTagsFuture struct {
11164	azure.FutureAPI
11165	// Result returns the result of the asynchronous operation.
11166	// If the operation has not completed it will return an error.
11167	Result func(ExpressRoutePortsClient) (ExpressRoutePort, error)
11168}
11169
11170// ExpressRouteServiceProvider a ExpressRouteResourceProvider object.
11171type ExpressRouteServiceProvider struct {
11172	// ExpressRouteServiceProviderPropertiesFormat - Properties of the express route service provider.
11173	*ExpressRouteServiceProviderPropertiesFormat `json:"properties,omitempty"`
11174	// ID - Resource ID.
11175	ID *string `json:"id,omitempty"`
11176	// Name - READ-ONLY; Resource name.
11177	Name *string `json:"name,omitempty"`
11178	// Type - READ-ONLY; Resource type.
11179	Type *string `json:"type,omitempty"`
11180	// Location - Resource location.
11181	Location *string `json:"location,omitempty"`
11182	// Tags - Resource tags.
11183	Tags map[string]*string `json:"tags"`
11184}
11185
11186// MarshalJSON is the custom marshaler for ExpressRouteServiceProvider.
11187func (ersp ExpressRouteServiceProvider) MarshalJSON() ([]byte, error) {
11188	objectMap := make(map[string]interface{})
11189	if ersp.ExpressRouteServiceProviderPropertiesFormat != nil {
11190		objectMap["properties"] = ersp.ExpressRouteServiceProviderPropertiesFormat
11191	}
11192	if ersp.ID != nil {
11193		objectMap["id"] = ersp.ID
11194	}
11195	if ersp.Location != nil {
11196		objectMap["location"] = ersp.Location
11197	}
11198	if ersp.Tags != nil {
11199		objectMap["tags"] = ersp.Tags
11200	}
11201	return json.Marshal(objectMap)
11202}
11203
11204// UnmarshalJSON is the custom unmarshaler for ExpressRouteServiceProvider struct.
11205func (ersp *ExpressRouteServiceProvider) UnmarshalJSON(body []byte) error {
11206	var m map[string]*json.RawMessage
11207	err := json.Unmarshal(body, &m)
11208	if err != nil {
11209		return err
11210	}
11211	for k, v := range m {
11212		switch k {
11213		case "properties":
11214			if v != nil {
11215				var expressRouteServiceProviderPropertiesFormat ExpressRouteServiceProviderPropertiesFormat
11216				err = json.Unmarshal(*v, &expressRouteServiceProviderPropertiesFormat)
11217				if err != nil {
11218					return err
11219				}
11220				ersp.ExpressRouteServiceProviderPropertiesFormat = &expressRouteServiceProviderPropertiesFormat
11221			}
11222		case "id":
11223			if v != nil {
11224				var ID string
11225				err = json.Unmarshal(*v, &ID)
11226				if err != nil {
11227					return err
11228				}
11229				ersp.ID = &ID
11230			}
11231		case "name":
11232			if v != nil {
11233				var name string
11234				err = json.Unmarshal(*v, &name)
11235				if err != nil {
11236					return err
11237				}
11238				ersp.Name = &name
11239			}
11240		case "type":
11241			if v != nil {
11242				var typeVar string
11243				err = json.Unmarshal(*v, &typeVar)
11244				if err != nil {
11245					return err
11246				}
11247				ersp.Type = &typeVar
11248			}
11249		case "location":
11250			if v != nil {
11251				var location string
11252				err = json.Unmarshal(*v, &location)
11253				if err != nil {
11254					return err
11255				}
11256				ersp.Location = &location
11257			}
11258		case "tags":
11259			if v != nil {
11260				var tags map[string]*string
11261				err = json.Unmarshal(*v, &tags)
11262				if err != nil {
11263					return err
11264				}
11265				ersp.Tags = tags
11266			}
11267		}
11268	}
11269
11270	return nil
11271}
11272
11273// ExpressRouteServiceProviderBandwidthsOffered contains bandwidths offered in ExpressRouteServiceProvider
11274// resources.
11275type ExpressRouteServiceProviderBandwidthsOffered struct {
11276	// OfferName - The OfferName.
11277	OfferName *string `json:"offerName,omitempty"`
11278	// ValueInMbps - The ValueInMbps.
11279	ValueInMbps *int32 `json:"valueInMbps,omitempty"`
11280}
11281
11282// ExpressRouteServiceProviderListResult response for the ListExpressRouteServiceProvider API service call.
11283type ExpressRouteServiceProviderListResult struct {
11284	autorest.Response `json:"-"`
11285	// Value - A list of ExpressRouteResourceProvider resources.
11286	Value *[]ExpressRouteServiceProvider `json:"value,omitempty"`
11287	// NextLink - The URL to get the next set of results.
11288	NextLink *string `json:"nextLink,omitempty"`
11289}
11290
11291// ExpressRouteServiceProviderListResultIterator provides access to a complete listing of
11292// ExpressRouteServiceProvider values.
11293type ExpressRouteServiceProviderListResultIterator struct {
11294	i    int
11295	page ExpressRouteServiceProviderListResultPage
11296}
11297
11298// NextWithContext advances to the next value.  If there was an error making
11299// the request the iterator does not advance and the error is returned.
11300func (iter *ExpressRouteServiceProviderListResultIterator) NextWithContext(ctx context.Context) (err error) {
11301	if tracing.IsEnabled() {
11302		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultIterator.NextWithContext")
11303		defer func() {
11304			sc := -1
11305			if iter.Response().Response.Response != nil {
11306				sc = iter.Response().Response.Response.StatusCode
11307			}
11308			tracing.EndSpan(ctx, sc, err)
11309		}()
11310	}
11311	iter.i++
11312	if iter.i < len(iter.page.Values()) {
11313		return nil
11314	}
11315	err = iter.page.NextWithContext(ctx)
11316	if err != nil {
11317		iter.i--
11318		return err
11319	}
11320	iter.i = 0
11321	return nil
11322}
11323
11324// Next advances to the next value.  If there was an error making
11325// the request the iterator does not advance and the error is returned.
11326// Deprecated: Use NextWithContext() instead.
11327func (iter *ExpressRouteServiceProviderListResultIterator) Next() error {
11328	return iter.NextWithContext(context.Background())
11329}
11330
11331// NotDone returns true if the enumeration should be started or is not yet complete.
11332func (iter ExpressRouteServiceProviderListResultIterator) NotDone() bool {
11333	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11334}
11335
11336// Response returns the raw server response from the last page request.
11337func (iter ExpressRouteServiceProviderListResultIterator) Response() ExpressRouteServiceProviderListResult {
11338	return iter.page.Response()
11339}
11340
11341// Value returns the current value or a zero-initialized value if the
11342// iterator has advanced beyond the end of the collection.
11343func (iter ExpressRouteServiceProviderListResultIterator) Value() ExpressRouteServiceProvider {
11344	if !iter.page.NotDone() {
11345		return ExpressRouteServiceProvider{}
11346	}
11347	return iter.page.Values()[iter.i]
11348}
11349
11350// Creates a new instance of the ExpressRouteServiceProviderListResultIterator type.
11351func NewExpressRouteServiceProviderListResultIterator(page ExpressRouteServiceProviderListResultPage) ExpressRouteServiceProviderListResultIterator {
11352	return ExpressRouteServiceProviderListResultIterator{page: page}
11353}
11354
11355// IsEmpty returns true if the ListResult contains no values.
11356func (ersplr ExpressRouteServiceProviderListResult) IsEmpty() bool {
11357	return ersplr.Value == nil || len(*ersplr.Value) == 0
11358}
11359
11360// hasNextLink returns true if the NextLink is not empty.
11361func (ersplr ExpressRouteServiceProviderListResult) hasNextLink() bool {
11362	return ersplr.NextLink != nil && len(*ersplr.NextLink) != 0
11363}
11364
11365// expressRouteServiceProviderListResultPreparer prepares a request to retrieve the next set of results.
11366// It returns nil if no more results exist.
11367func (ersplr ExpressRouteServiceProviderListResult) expressRouteServiceProviderListResultPreparer(ctx context.Context) (*http.Request, error) {
11368	if !ersplr.hasNextLink() {
11369		return nil, nil
11370	}
11371	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11372		autorest.AsJSON(),
11373		autorest.AsGet(),
11374		autorest.WithBaseURL(to.String(ersplr.NextLink)))
11375}
11376
11377// ExpressRouteServiceProviderListResultPage contains a page of ExpressRouteServiceProvider values.
11378type ExpressRouteServiceProviderListResultPage struct {
11379	fn     func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)
11380	ersplr ExpressRouteServiceProviderListResult
11381}
11382
11383// NextWithContext advances to the next page of values.  If there was an error making
11384// the request the page does not advance and the error is returned.
11385func (page *ExpressRouteServiceProviderListResultPage) NextWithContext(ctx context.Context) (err error) {
11386	if tracing.IsEnabled() {
11387		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultPage.NextWithContext")
11388		defer func() {
11389			sc := -1
11390			if page.Response().Response.Response != nil {
11391				sc = page.Response().Response.Response.StatusCode
11392			}
11393			tracing.EndSpan(ctx, sc, err)
11394		}()
11395	}
11396	for {
11397		next, err := page.fn(ctx, page.ersplr)
11398		if err != nil {
11399			return err
11400		}
11401		page.ersplr = next
11402		if !next.hasNextLink() || !next.IsEmpty() {
11403			break
11404		}
11405	}
11406	return nil
11407}
11408
11409// Next advances to the next page of values.  If there was an error making
11410// the request the page does not advance and the error is returned.
11411// Deprecated: Use NextWithContext() instead.
11412func (page *ExpressRouteServiceProviderListResultPage) Next() error {
11413	return page.NextWithContext(context.Background())
11414}
11415
11416// NotDone returns true if the page enumeration should be started or is not yet complete.
11417func (page ExpressRouteServiceProviderListResultPage) NotDone() bool {
11418	return !page.ersplr.IsEmpty()
11419}
11420
11421// Response returns the raw server response from the last page request.
11422func (page ExpressRouteServiceProviderListResultPage) Response() ExpressRouteServiceProviderListResult {
11423	return page.ersplr
11424}
11425
11426// Values returns the slice of values for the current page or nil if there are no values.
11427func (page ExpressRouteServiceProviderListResultPage) Values() []ExpressRouteServiceProvider {
11428	if page.ersplr.IsEmpty() {
11429		return nil
11430	}
11431	return *page.ersplr.Value
11432}
11433
11434// Creates a new instance of the ExpressRouteServiceProviderListResultPage type.
11435func NewExpressRouteServiceProviderListResultPage(cur ExpressRouteServiceProviderListResult, getNextPage func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)) ExpressRouteServiceProviderListResultPage {
11436	return ExpressRouteServiceProviderListResultPage{
11437		fn:     getNextPage,
11438		ersplr: cur,
11439	}
11440}
11441
11442// ExpressRouteServiceProviderPropertiesFormat properties of ExpressRouteServiceProvider.
11443type ExpressRouteServiceProviderPropertiesFormat struct {
11444	// PeeringLocations - Get a list of peering locations.
11445	PeeringLocations *[]string `json:"peeringLocations,omitempty"`
11446	// BandwidthsOffered - Gets bandwidths offered.
11447	BandwidthsOffered *[]ExpressRouteServiceProviderBandwidthsOffered `json:"bandwidthsOffered,omitempty"`
11448	// ProvisioningState - Gets the provisioning state of the resource.
11449	ProvisioningState *string `json:"provisioningState,omitempty"`
11450}
11451
11452// FirewallPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
11453// long-running operation.
11454type FirewallPoliciesCreateOrUpdateFuture struct {
11455	azure.FutureAPI
11456	// Result returns the result of the asynchronous operation.
11457	// If the operation has not completed it will return an error.
11458	Result func(FirewallPoliciesClient) (FirewallPolicy, error)
11459}
11460
11461// FirewallPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
11462// operation.
11463type FirewallPoliciesDeleteFuture struct {
11464	azure.FutureAPI
11465	// Result returns the result of the asynchronous operation.
11466	// If the operation has not completed it will return an error.
11467	Result func(FirewallPoliciesClient) (autorest.Response, error)
11468}
11469
11470// FirewallPolicy firewallPolicy Resource.
11471type FirewallPolicy struct {
11472	autorest.Response `json:"-"`
11473	// FirewallPolicyPropertiesFormat - Properties of the firewall policy.
11474	*FirewallPolicyPropertiesFormat `json:"properties,omitempty"`
11475	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
11476	Etag *string `json:"etag,omitempty"`
11477	// ID - Resource ID.
11478	ID *string `json:"id,omitempty"`
11479	// Name - READ-ONLY; Resource name.
11480	Name *string `json:"name,omitempty"`
11481	// Type - READ-ONLY; Resource type.
11482	Type *string `json:"type,omitempty"`
11483	// Location - Resource location.
11484	Location *string `json:"location,omitempty"`
11485	// Tags - Resource tags.
11486	Tags map[string]*string `json:"tags"`
11487}
11488
11489// MarshalJSON is the custom marshaler for FirewallPolicy.
11490func (fp FirewallPolicy) MarshalJSON() ([]byte, error) {
11491	objectMap := make(map[string]interface{})
11492	if fp.FirewallPolicyPropertiesFormat != nil {
11493		objectMap["properties"] = fp.FirewallPolicyPropertiesFormat
11494	}
11495	if fp.ID != nil {
11496		objectMap["id"] = fp.ID
11497	}
11498	if fp.Location != nil {
11499		objectMap["location"] = fp.Location
11500	}
11501	if fp.Tags != nil {
11502		objectMap["tags"] = fp.Tags
11503	}
11504	return json.Marshal(objectMap)
11505}
11506
11507// UnmarshalJSON is the custom unmarshaler for FirewallPolicy struct.
11508func (fp *FirewallPolicy) UnmarshalJSON(body []byte) error {
11509	var m map[string]*json.RawMessage
11510	err := json.Unmarshal(body, &m)
11511	if err != nil {
11512		return err
11513	}
11514	for k, v := range m {
11515		switch k {
11516		case "properties":
11517			if v != nil {
11518				var firewallPolicyPropertiesFormat FirewallPolicyPropertiesFormat
11519				err = json.Unmarshal(*v, &firewallPolicyPropertiesFormat)
11520				if err != nil {
11521					return err
11522				}
11523				fp.FirewallPolicyPropertiesFormat = &firewallPolicyPropertiesFormat
11524			}
11525		case "etag":
11526			if v != nil {
11527				var etag string
11528				err = json.Unmarshal(*v, &etag)
11529				if err != nil {
11530					return err
11531				}
11532				fp.Etag = &etag
11533			}
11534		case "id":
11535			if v != nil {
11536				var ID string
11537				err = json.Unmarshal(*v, &ID)
11538				if err != nil {
11539					return err
11540				}
11541				fp.ID = &ID
11542			}
11543		case "name":
11544			if v != nil {
11545				var name string
11546				err = json.Unmarshal(*v, &name)
11547				if err != nil {
11548					return err
11549				}
11550				fp.Name = &name
11551			}
11552		case "type":
11553			if v != nil {
11554				var typeVar string
11555				err = json.Unmarshal(*v, &typeVar)
11556				if err != nil {
11557					return err
11558				}
11559				fp.Type = &typeVar
11560			}
11561		case "location":
11562			if v != nil {
11563				var location string
11564				err = json.Unmarshal(*v, &location)
11565				if err != nil {
11566					return err
11567				}
11568				fp.Location = &location
11569			}
11570		case "tags":
11571			if v != nil {
11572				var tags map[string]*string
11573				err = json.Unmarshal(*v, &tags)
11574				if err != nil {
11575					return err
11576				}
11577				fp.Tags = tags
11578			}
11579		}
11580	}
11581
11582	return nil
11583}
11584
11585// FirewallPolicyFilterRule firewall Policy Filter Rule
11586type FirewallPolicyFilterRule struct {
11587	// Action - The action type of a Filter rule
11588	Action *FirewallPolicyFilterRuleAction `json:"action,omitempty"`
11589	// RuleConditions - Collection of rule conditions used by a rule.
11590	RuleConditions *[]BasicFirewallPolicyRuleCondition `json:"ruleConditions,omitempty"`
11591	// Name - Name of the Rule
11592	Name *string `json:"name,omitempty"`
11593	// Priority - Priority of the Firewall Policy Rule resource.
11594	Priority *int32 `json:"priority,omitempty"`
11595	// RuleType - Possible values include: 'RuleTypeFirewallPolicyRule', 'RuleTypeFirewallPolicyNatRule', 'RuleTypeFirewallPolicyFilterRule'
11596	RuleType RuleType `json:"ruleType,omitempty"`
11597}
11598
11599// MarshalJSON is the custom marshaler for FirewallPolicyFilterRule.
11600func (fpfr FirewallPolicyFilterRule) MarshalJSON() ([]byte, error) {
11601	fpfr.RuleType = RuleTypeFirewallPolicyFilterRule
11602	objectMap := make(map[string]interface{})
11603	if fpfr.Action != nil {
11604		objectMap["action"] = fpfr.Action
11605	}
11606	if fpfr.RuleConditions != nil {
11607		objectMap["ruleConditions"] = fpfr.RuleConditions
11608	}
11609	if fpfr.Name != nil {
11610		objectMap["name"] = fpfr.Name
11611	}
11612	if fpfr.Priority != nil {
11613		objectMap["priority"] = fpfr.Priority
11614	}
11615	if fpfr.RuleType != "" {
11616		objectMap["ruleType"] = fpfr.RuleType
11617	}
11618	return json.Marshal(objectMap)
11619}
11620
11621// AsFirewallPolicyNatRule is the BasicFirewallPolicyRule implementation for FirewallPolicyFilterRule.
11622func (fpfr FirewallPolicyFilterRule) AsFirewallPolicyNatRule() (*FirewallPolicyNatRule, bool) {
11623	return nil, false
11624}
11625
11626// AsFirewallPolicyFilterRule is the BasicFirewallPolicyRule implementation for FirewallPolicyFilterRule.
11627func (fpfr FirewallPolicyFilterRule) AsFirewallPolicyFilterRule() (*FirewallPolicyFilterRule, bool) {
11628	return &fpfr, true
11629}
11630
11631// AsFirewallPolicyRule is the BasicFirewallPolicyRule implementation for FirewallPolicyFilterRule.
11632func (fpfr FirewallPolicyFilterRule) AsFirewallPolicyRule() (*FirewallPolicyRule, bool) {
11633	return nil, false
11634}
11635
11636// AsBasicFirewallPolicyRule is the BasicFirewallPolicyRule implementation for FirewallPolicyFilterRule.
11637func (fpfr FirewallPolicyFilterRule) AsBasicFirewallPolicyRule() (BasicFirewallPolicyRule, bool) {
11638	return &fpfr, true
11639}
11640
11641// UnmarshalJSON is the custom unmarshaler for FirewallPolicyFilterRule struct.
11642func (fpfr *FirewallPolicyFilterRule) UnmarshalJSON(body []byte) error {
11643	var m map[string]*json.RawMessage
11644	err := json.Unmarshal(body, &m)
11645	if err != nil {
11646		return err
11647	}
11648	for k, v := range m {
11649		switch k {
11650		case "action":
11651			if v != nil {
11652				var action FirewallPolicyFilterRuleAction
11653				err = json.Unmarshal(*v, &action)
11654				if err != nil {
11655					return err
11656				}
11657				fpfr.Action = &action
11658			}
11659		case "ruleConditions":
11660			if v != nil {
11661				ruleConditions, err := unmarshalBasicFirewallPolicyRuleConditionArray(*v)
11662				if err != nil {
11663					return err
11664				}
11665				fpfr.RuleConditions = &ruleConditions
11666			}
11667		case "name":
11668			if v != nil {
11669				var name string
11670				err = json.Unmarshal(*v, &name)
11671				if err != nil {
11672					return err
11673				}
11674				fpfr.Name = &name
11675			}
11676		case "priority":
11677			if v != nil {
11678				var priority int32
11679				err = json.Unmarshal(*v, &priority)
11680				if err != nil {
11681					return err
11682				}
11683				fpfr.Priority = &priority
11684			}
11685		case "ruleType":
11686			if v != nil {
11687				var ruleType RuleType
11688				err = json.Unmarshal(*v, &ruleType)
11689				if err != nil {
11690					return err
11691				}
11692				fpfr.RuleType = ruleType
11693			}
11694		}
11695	}
11696
11697	return nil
11698}
11699
11700// FirewallPolicyFilterRuleAction properties of the FirewallPolicyFilterRuleAction.
11701type FirewallPolicyFilterRuleAction struct {
11702	// Type - The type of action. Possible values include: 'FirewallPolicyFilterRuleActionTypeAllow', 'FirewallPolicyFilterRuleActionTypeDeny', 'FirewallPolicyFilterRuleActionTypeAlert'
11703	Type FirewallPolicyFilterRuleActionType `json:"type,omitempty"`
11704}
11705
11706// FirewallPolicyListResult response for ListFirewallPolicies API service call.
11707type FirewallPolicyListResult struct {
11708	autorest.Response `json:"-"`
11709	// Value - List of Firewall Policies in a resource group.
11710	Value *[]FirewallPolicy `json:"value,omitempty"`
11711	// NextLink - URL to get the next set of results.
11712	NextLink *string `json:"nextLink,omitempty"`
11713}
11714
11715// FirewallPolicyListResultIterator provides access to a complete listing of FirewallPolicy values.
11716type FirewallPolicyListResultIterator struct {
11717	i    int
11718	page FirewallPolicyListResultPage
11719}
11720
11721// NextWithContext advances to the next value.  If there was an error making
11722// the request the iterator does not advance and the error is returned.
11723func (iter *FirewallPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) {
11724	if tracing.IsEnabled() {
11725		ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyListResultIterator.NextWithContext")
11726		defer func() {
11727			sc := -1
11728			if iter.Response().Response.Response != nil {
11729				sc = iter.Response().Response.Response.StatusCode
11730			}
11731			tracing.EndSpan(ctx, sc, err)
11732		}()
11733	}
11734	iter.i++
11735	if iter.i < len(iter.page.Values()) {
11736		return nil
11737	}
11738	err = iter.page.NextWithContext(ctx)
11739	if err != nil {
11740		iter.i--
11741		return err
11742	}
11743	iter.i = 0
11744	return nil
11745}
11746
11747// Next advances to the next value.  If there was an error making
11748// the request the iterator does not advance and the error is returned.
11749// Deprecated: Use NextWithContext() instead.
11750func (iter *FirewallPolicyListResultIterator) Next() error {
11751	return iter.NextWithContext(context.Background())
11752}
11753
11754// NotDone returns true if the enumeration should be started or is not yet complete.
11755func (iter FirewallPolicyListResultIterator) NotDone() bool {
11756	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11757}
11758
11759// Response returns the raw server response from the last page request.
11760func (iter FirewallPolicyListResultIterator) Response() FirewallPolicyListResult {
11761	return iter.page.Response()
11762}
11763
11764// Value returns the current value or a zero-initialized value if the
11765// iterator has advanced beyond the end of the collection.
11766func (iter FirewallPolicyListResultIterator) Value() FirewallPolicy {
11767	if !iter.page.NotDone() {
11768		return FirewallPolicy{}
11769	}
11770	return iter.page.Values()[iter.i]
11771}
11772
11773// Creates a new instance of the FirewallPolicyListResultIterator type.
11774func NewFirewallPolicyListResultIterator(page FirewallPolicyListResultPage) FirewallPolicyListResultIterator {
11775	return FirewallPolicyListResultIterator{page: page}
11776}
11777
11778// IsEmpty returns true if the ListResult contains no values.
11779func (fplr FirewallPolicyListResult) IsEmpty() bool {
11780	return fplr.Value == nil || len(*fplr.Value) == 0
11781}
11782
11783// hasNextLink returns true if the NextLink is not empty.
11784func (fplr FirewallPolicyListResult) hasNextLink() bool {
11785	return fplr.NextLink != nil && len(*fplr.NextLink) != 0
11786}
11787
11788// firewallPolicyListResultPreparer prepares a request to retrieve the next set of results.
11789// It returns nil if no more results exist.
11790func (fplr FirewallPolicyListResult) firewallPolicyListResultPreparer(ctx context.Context) (*http.Request, error) {
11791	if !fplr.hasNextLink() {
11792		return nil, nil
11793	}
11794	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11795		autorest.AsJSON(),
11796		autorest.AsGet(),
11797		autorest.WithBaseURL(to.String(fplr.NextLink)))
11798}
11799
11800// FirewallPolicyListResultPage contains a page of FirewallPolicy values.
11801type FirewallPolicyListResultPage struct {
11802	fn   func(context.Context, FirewallPolicyListResult) (FirewallPolicyListResult, error)
11803	fplr FirewallPolicyListResult
11804}
11805
11806// NextWithContext advances to the next page of values.  If there was an error making
11807// the request the page does not advance and the error is returned.
11808func (page *FirewallPolicyListResultPage) NextWithContext(ctx context.Context) (err error) {
11809	if tracing.IsEnabled() {
11810		ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyListResultPage.NextWithContext")
11811		defer func() {
11812			sc := -1
11813			if page.Response().Response.Response != nil {
11814				sc = page.Response().Response.Response.StatusCode
11815			}
11816			tracing.EndSpan(ctx, sc, err)
11817		}()
11818	}
11819	for {
11820		next, err := page.fn(ctx, page.fplr)
11821		if err != nil {
11822			return err
11823		}
11824		page.fplr = next
11825		if !next.hasNextLink() || !next.IsEmpty() {
11826			break
11827		}
11828	}
11829	return nil
11830}
11831
11832// Next advances to the next page of values.  If there was an error making
11833// the request the page does not advance and the error is returned.
11834// Deprecated: Use NextWithContext() instead.
11835func (page *FirewallPolicyListResultPage) Next() error {
11836	return page.NextWithContext(context.Background())
11837}
11838
11839// NotDone returns true if the page enumeration should be started or is not yet complete.
11840func (page FirewallPolicyListResultPage) NotDone() bool {
11841	return !page.fplr.IsEmpty()
11842}
11843
11844// Response returns the raw server response from the last page request.
11845func (page FirewallPolicyListResultPage) Response() FirewallPolicyListResult {
11846	return page.fplr
11847}
11848
11849// Values returns the slice of values for the current page or nil if there are no values.
11850func (page FirewallPolicyListResultPage) Values() []FirewallPolicy {
11851	if page.fplr.IsEmpty() {
11852		return nil
11853	}
11854	return *page.fplr.Value
11855}
11856
11857// Creates a new instance of the FirewallPolicyListResultPage type.
11858func NewFirewallPolicyListResultPage(cur FirewallPolicyListResult, getNextPage func(context.Context, FirewallPolicyListResult) (FirewallPolicyListResult, error)) FirewallPolicyListResultPage {
11859	return FirewallPolicyListResultPage{
11860		fn:   getNextPage,
11861		fplr: cur,
11862	}
11863}
11864
11865// FirewallPolicyNatRule firewall Policy NAT Rule
11866type FirewallPolicyNatRule struct {
11867	// Action - The action type of a Nat rule, SNAT or DNAT
11868	Action *FirewallPolicyNatRuleAction `json:"action,omitempty"`
11869	// TranslatedAddress - The translated address for this NAT rule.
11870	TranslatedAddress *string `json:"translatedAddress,omitempty"`
11871	// TranslatedPort - The translated port for this NAT rule.
11872	TranslatedPort *string `json:"translatedPort,omitempty"`
11873	// RuleCondition - The match conditions for incoming traffic
11874	RuleCondition BasicFirewallPolicyRuleCondition `json:"ruleCondition,omitempty"`
11875	// Name - Name of the Rule
11876	Name *string `json:"name,omitempty"`
11877	// Priority - Priority of the Firewall Policy Rule resource.
11878	Priority *int32 `json:"priority,omitempty"`
11879	// RuleType - Possible values include: 'RuleTypeFirewallPolicyRule', 'RuleTypeFirewallPolicyNatRule', 'RuleTypeFirewallPolicyFilterRule'
11880	RuleType RuleType `json:"ruleType,omitempty"`
11881}
11882
11883// MarshalJSON is the custom marshaler for FirewallPolicyNatRule.
11884func (fpnr FirewallPolicyNatRule) MarshalJSON() ([]byte, error) {
11885	fpnr.RuleType = RuleTypeFirewallPolicyNatRule
11886	objectMap := make(map[string]interface{})
11887	if fpnr.Action != nil {
11888		objectMap["action"] = fpnr.Action
11889	}
11890	if fpnr.TranslatedAddress != nil {
11891		objectMap["translatedAddress"] = fpnr.TranslatedAddress
11892	}
11893	if fpnr.TranslatedPort != nil {
11894		objectMap["translatedPort"] = fpnr.TranslatedPort
11895	}
11896	objectMap["ruleCondition"] = fpnr.RuleCondition
11897	if fpnr.Name != nil {
11898		objectMap["name"] = fpnr.Name
11899	}
11900	if fpnr.Priority != nil {
11901		objectMap["priority"] = fpnr.Priority
11902	}
11903	if fpnr.RuleType != "" {
11904		objectMap["ruleType"] = fpnr.RuleType
11905	}
11906	return json.Marshal(objectMap)
11907}
11908
11909// AsFirewallPolicyNatRule is the BasicFirewallPolicyRule implementation for FirewallPolicyNatRule.
11910func (fpnr FirewallPolicyNatRule) AsFirewallPolicyNatRule() (*FirewallPolicyNatRule, bool) {
11911	return &fpnr, true
11912}
11913
11914// AsFirewallPolicyFilterRule is the BasicFirewallPolicyRule implementation for FirewallPolicyNatRule.
11915func (fpnr FirewallPolicyNatRule) AsFirewallPolicyFilterRule() (*FirewallPolicyFilterRule, bool) {
11916	return nil, false
11917}
11918
11919// AsFirewallPolicyRule is the BasicFirewallPolicyRule implementation for FirewallPolicyNatRule.
11920func (fpnr FirewallPolicyNatRule) AsFirewallPolicyRule() (*FirewallPolicyRule, bool) {
11921	return nil, false
11922}
11923
11924// AsBasicFirewallPolicyRule is the BasicFirewallPolicyRule implementation for FirewallPolicyNatRule.
11925func (fpnr FirewallPolicyNatRule) AsBasicFirewallPolicyRule() (BasicFirewallPolicyRule, bool) {
11926	return &fpnr, true
11927}
11928
11929// UnmarshalJSON is the custom unmarshaler for FirewallPolicyNatRule struct.
11930func (fpnr *FirewallPolicyNatRule) UnmarshalJSON(body []byte) error {
11931	var m map[string]*json.RawMessage
11932	err := json.Unmarshal(body, &m)
11933	if err != nil {
11934		return err
11935	}
11936	for k, v := range m {
11937		switch k {
11938		case "action":
11939			if v != nil {
11940				var action FirewallPolicyNatRuleAction
11941				err = json.Unmarshal(*v, &action)
11942				if err != nil {
11943					return err
11944				}
11945				fpnr.Action = &action
11946			}
11947		case "translatedAddress":
11948			if v != nil {
11949				var translatedAddress string
11950				err = json.Unmarshal(*v, &translatedAddress)
11951				if err != nil {
11952					return err
11953				}
11954				fpnr.TranslatedAddress = &translatedAddress
11955			}
11956		case "translatedPort":
11957			if v != nil {
11958				var translatedPort string
11959				err = json.Unmarshal(*v, &translatedPort)
11960				if err != nil {
11961					return err
11962				}
11963				fpnr.TranslatedPort = &translatedPort
11964			}
11965		case "ruleCondition":
11966			if v != nil {
11967				ruleCondition, err := unmarshalBasicFirewallPolicyRuleCondition(*v)
11968				if err != nil {
11969					return err
11970				}
11971				fpnr.RuleCondition = ruleCondition
11972			}
11973		case "name":
11974			if v != nil {
11975				var name string
11976				err = json.Unmarshal(*v, &name)
11977				if err != nil {
11978					return err
11979				}
11980				fpnr.Name = &name
11981			}
11982		case "priority":
11983			if v != nil {
11984				var priority int32
11985				err = json.Unmarshal(*v, &priority)
11986				if err != nil {
11987					return err
11988				}
11989				fpnr.Priority = &priority
11990			}
11991		case "ruleType":
11992			if v != nil {
11993				var ruleType RuleType
11994				err = json.Unmarshal(*v, &ruleType)
11995				if err != nil {
11996					return err
11997				}
11998				fpnr.RuleType = ruleType
11999			}
12000		}
12001	}
12002
12003	return nil
12004}
12005
12006// FirewallPolicyNatRuleAction properties of the FirewallPolicyNatRuleAction.
12007type FirewallPolicyNatRuleAction struct {
12008	// Type - The type of action. Possible values include: 'DNAT', 'SNAT'
12009	Type FirewallPolicyNatRuleActionType `json:"type,omitempty"`
12010}
12011
12012// FirewallPolicyPropertiesFormat firewall Policy definition
12013type FirewallPolicyPropertiesFormat struct {
12014	// RuleGroups - READ-ONLY; List of references to FirewallPolicyRuleGroups
12015	RuleGroups *[]SubResource `json:"ruleGroups,omitempty"`
12016	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
12017	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
12018	// BasePolicy - The parent firewall policy from which rules are inherited.
12019	BasePolicy *SubResource `json:"basePolicy,omitempty"`
12020	// Firewalls - READ-ONLY; List of references to Azure Firewalls that this Firewall Policy is associated with
12021	Firewalls *[]SubResource `json:"firewalls,omitempty"`
12022	// ChildPolicies - READ-ONLY; List of references to Child Firewall Policies
12023	ChildPolicies *[]SubResource `json:"childPolicies,omitempty"`
12024	// ThreatIntelMode - The operation mode for Threat Intelligence. Possible values include: 'AzureFirewallThreatIntelModeAlert', 'AzureFirewallThreatIntelModeDeny', 'AzureFirewallThreatIntelModeOff'
12025	ThreatIntelMode AzureFirewallThreatIntelMode `json:"threatIntelMode,omitempty"`
12026}
12027
12028// MarshalJSON is the custom marshaler for FirewallPolicyPropertiesFormat.
12029func (fppf FirewallPolicyPropertiesFormat) MarshalJSON() ([]byte, error) {
12030	objectMap := make(map[string]interface{})
12031	if fppf.ProvisioningState != "" {
12032		objectMap["provisioningState"] = fppf.ProvisioningState
12033	}
12034	if fppf.BasePolicy != nil {
12035		objectMap["basePolicy"] = fppf.BasePolicy
12036	}
12037	if fppf.ThreatIntelMode != "" {
12038		objectMap["threatIntelMode"] = fppf.ThreatIntelMode
12039	}
12040	return json.Marshal(objectMap)
12041}
12042
12043// BasicFirewallPolicyRule properties of the rule.
12044type BasicFirewallPolicyRule interface {
12045	AsFirewallPolicyNatRule() (*FirewallPolicyNatRule, bool)
12046	AsFirewallPolicyFilterRule() (*FirewallPolicyFilterRule, bool)
12047	AsFirewallPolicyRule() (*FirewallPolicyRule, bool)
12048}
12049
12050// FirewallPolicyRule properties of the rule.
12051type FirewallPolicyRule struct {
12052	// Name - Name of the Rule
12053	Name *string `json:"name,omitempty"`
12054	// Priority - Priority of the Firewall Policy Rule resource.
12055	Priority *int32 `json:"priority,omitempty"`
12056	// RuleType - Possible values include: 'RuleTypeFirewallPolicyRule', 'RuleTypeFirewallPolicyNatRule', 'RuleTypeFirewallPolicyFilterRule'
12057	RuleType RuleType `json:"ruleType,omitempty"`
12058}
12059
12060func unmarshalBasicFirewallPolicyRule(body []byte) (BasicFirewallPolicyRule, error) {
12061	var m map[string]interface{}
12062	err := json.Unmarshal(body, &m)
12063	if err != nil {
12064		return nil, err
12065	}
12066
12067	switch m["ruleType"] {
12068	case string(RuleTypeFirewallPolicyNatRule):
12069		var fpnr FirewallPolicyNatRule
12070		err := json.Unmarshal(body, &fpnr)
12071		return fpnr, err
12072	case string(RuleTypeFirewallPolicyFilterRule):
12073		var fpfr FirewallPolicyFilterRule
12074		err := json.Unmarshal(body, &fpfr)
12075		return fpfr, err
12076	default:
12077		var fpr FirewallPolicyRule
12078		err := json.Unmarshal(body, &fpr)
12079		return fpr, err
12080	}
12081}
12082func unmarshalBasicFirewallPolicyRuleArray(body []byte) ([]BasicFirewallPolicyRule, error) {
12083	var rawMessages []*json.RawMessage
12084	err := json.Unmarshal(body, &rawMessages)
12085	if err != nil {
12086		return nil, err
12087	}
12088
12089	fprArray := make([]BasicFirewallPolicyRule, len(rawMessages))
12090
12091	for index, rawMessage := range rawMessages {
12092		fpr, err := unmarshalBasicFirewallPolicyRule(*rawMessage)
12093		if err != nil {
12094			return nil, err
12095		}
12096		fprArray[index] = fpr
12097	}
12098	return fprArray, nil
12099}
12100
12101// MarshalJSON is the custom marshaler for FirewallPolicyRule.
12102func (fpr FirewallPolicyRule) MarshalJSON() ([]byte, error) {
12103	fpr.RuleType = RuleTypeFirewallPolicyRule
12104	objectMap := make(map[string]interface{})
12105	if fpr.Name != nil {
12106		objectMap["name"] = fpr.Name
12107	}
12108	if fpr.Priority != nil {
12109		objectMap["priority"] = fpr.Priority
12110	}
12111	if fpr.RuleType != "" {
12112		objectMap["ruleType"] = fpr.RuleType
12113	}
12114	return json.Marshal(objectMap)
12115}
12116
12117// AsFirewallPolicyNatRule is the BasicFirewallPolicyRule implementation for FirewallPolicyRule.
12118func (fpr FirewallPolicyRule) AsFirewallPolicyNatRule() (*FirewallPolicyNatRule, bool) {
12119	return nil, false
12120}
12121
12122// AsFirewallPolicyFilterRule is the BasicFirewallPolicyRule implementation for FirewallPolicyRule.
12123func (fpr FirewallPolicyRule) AsFirewallPolicyFilterRule() (*FirewallPolicyFilterRule, bool) {
12124	return nil, false
12125}
12126
12127// AsFirewallPolicyRule is the BasicFirewallPolicyRule implementation for FirewallPolicyRule.
12128func (fpr FirewallPolicyRule) AsFirewallPolicyRule() (*FirewallPolicyRule, bool) {
12129	return &fpr, true
12130}
12131
12132// AsBasicFirewallPolicyRule is the BasicFirewallPolicyRule implementation for FirewallPolicyRule.
12133func (fpr FirewallPolicyRule) AsBasicFirewallPolicyRule() (BasicFirewallPolicyRule, bool) {
12134	return &fpr, true
12135}
12136
12137// BasicFirewallPolicyRuleCondition properties of a rule.
12138type BasicFirewallPolicyRuleCondition interface {
12139	AsApplicationRuleCondition() (*ApplicationRuleCondition, bool)
12140	AsRuleCondition() (*RuleCondition, bool)
12141	AsFirewallPolicyRuleCondition() (*FirewallPolicyRuleCondition, bool)
12142}
12143
12144// FirewallPolicyRuleCondition properties of a rule.
12145type FirewallPolicyRuleCondition struct {
12146	// Name - Name of the rule condition.
12147	Name *string `json:"name,omitempty"`
12148	// Description - Description of the rule condition.
12149	Description *string `json:"description,omitempty"`
12150	// RuleConditionType - Possible values include: 'RuleConditionTypeFirewallPolicyRuleCondition', 'RuleConditionTypeApplicationRuleCondition', 'RuleConditionTypeNetworkRuleCondition'
12151	RuleConditionType RuleConditionType `json:"ruleConditionType,omitempty"`
12152}
12153
12154func unmarshalBasicFirewallPolicyRuleCondition(body []byte) (BasicFirewallPolicyRuleCondition, error) {
12155	var m map[string]interface{}
12156	err := json.Unmarshal(body, &m)
12157	if err != nil {
12158		return nil, err
12159	}
12160
12161	switch m["ruleConditionType"] {
12162	case string(RuleConditionTypeApplicationRuleCondition):
12163		var arc ApplicationRuleCondition
12164		err := json.Unmarshal(body, &arc)
12165		return arc, err
12166	case string(RuleConditionTypeNetworkRuleCondition):
12167		var rc RuleCondition
12168		err := json.Unmarshal(body, &rc)
12169		return rc, err
12170	default:
12171		var fprc FirewallPolicyRuleCondition
12172		err := json.Unmarshal(body, &fprc)
12173		return fprc, err
12174	}
12175}
12176func unmarshalBasicFirewallPolicyRuleConditionArray(body []byte) ([]BasicFirewallPolicyRuleCondition, error) {
12177	var rawMessages []*json.RawMessage
12178	err := json.Unmarshal(body, &rawMessages)
12179	if err != nil {
12180		return nil, err
12181	}
12182
12183	fprcArray := make([]BasicFirewallPolicyRuleCondition, len(rawMessages))
12184
12185	for index, rawMessage := range rawMessages {
12186		fprc, err := unmarshalBasicFirewallPolicyRuleCondition(*rawMessage)
12187		if err != nil {
12188			return nil, err
12189		}
12190		fprcArray[index] = fprc
12191	}
12192	return fprcArray, nil
12193}
12194
12195// MarshalJSON is the custom marshaler for FirewallPolicyRuleCondition.
12196func (fprc FirewallPolicyRuleCondition) MarshalJSON() ([]byte, error) {
12197	fprc.RuleConditionType = RuleConditionTypeFirewallPolicyRuleCondition
12198	objectMap := make(map[string]interface{})
12199	if fprc.Name != nil {
12200		objectMap["name"] = fprc.Name
12201	}
12202	if fprc.Description != nil {
12203		objectMap["description"] = fprc.Description
12204	}
12205	if fprc.RuleConditionType != "" {
12206		objectMap["ruleConditionType"] = fprc.RuleConditionType
12207	}
12208	return json.Marshal(objectMap)
12209}
12210
12211// AsApplicationRuleCondition is the BasicFirewallPolicyRuleCondition implementation for FirewallPolicyRuleCondition.
12212func (fprc FirewallPolicyRuleCondition) AsApplicationRuleCondition() (*ApplicationRuleCondition, bool) {
12213	return nil, false
12214}
12215
12216// AsRuleCondition is the BasicFirewallPolicyRuleCondition implementation for FirewallPolicyRuleCondition.
12217func (fprc FirewallPolicyRuleCondition) AsRuleCondition() (*RuleCondition, bool) {
12218	return nil, false
12219}
12220
12221// AsFirewallPolicyRuleCondition is the BasicFirewallPolicyRuleCondition implementation for FirewallPolicyRuleCondition.
12222func (fprc FirewallPolicyRuleCondition) AsFirewallPolicyRuleCondition() (*FirewallPolicyRuleCondition, bool) {
12223	return &fprc, true
12224}
12225
12226// AsBasicFirewallPolicyRuleCondition is the BasicFirewallPolicyRuleCondition implementation for FirewallPolicyRuleCondition.
12227func (fprc FirewallPolicyRuleCondition) AsBasicFirewallPolicyRuleCondition() (BasicFirewallPolicyRuleCondition, bool) {
12228	return &fprc, true
12229}
12230
12231// FirewallPolicyRuleConditionApplicationProtocol properties of the application rule protocol.
12232type FirewallPolicyRuleConditionApplicationProtocol struct {
12233	// ProtocolType - Protocol type. Possible values include: 'FirewallPolicyRuleConditionApplicationProtocolTypeHTTP', 'FirewallPolicyRuleConditionApplicationProtocolTypeHTTPS'
12234	ProtocolType FirewallPolicyRuleConditionApplicationProtocolType `json:"protocolType,omitempty"`
12235	// Port - Port number for the protocol, cannot be greater than 64000.
12236	Port *int32 `json:"port,omitempty"`
12237}
12238
12239// FirewallPolicyRuleGroup rule Group resource
12240type FirewallPolicyRuleGroup struct {
12241	autorest.Response `json:"-"`
12242	// FirewallPolicyRuleGroupProperties - The properties of the firewall policy rule group.
12243	*FirewallPolicyRuleGroupProperties `json:"properties,omitempty"`
12244	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
12245	Name *string `json:"name,omitempty"`
12246	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
12247	Etag *string `json:"etag,omitempty"`
12248	// Type - READ-ONLY; Rule Group type.
12249	Type *string `json:"type,omitempty"`
12250	// ID - Resource ID.
12251	ID *string `json:"id,omitempty"`
12252}
12253
12254// MarshalJSON is the custom marshaler for FirewallPolicyRuleGroup.
12255func (fprg FirewallPolicyRuleGroup) MarshalJSON() ([]byte, error) {
12256	objectMap := make(map[string]interface{})
12257	if fprg.FirewallPolicyRuleGroupProperties != nil {
12258		objectMap["properties"] = fprg.FirewallPolicyRuleGroupProperties
12259	}
12260	if fprg.Name != nil {
12261		objectMap["name"] = fprg.Name
12262	}
12263	if fprg.ID != nil {
12264		objectMap["id"] = fprg.ID
12265	}
12266	return json.Marshal(objectMap)
12267}
12268
12269// UnmarshalJSON is the custom unmarshaler for FirewallPolicyRuleGroup struct.
12270func (fprg *FirewallPolicyRuleGroup) UnmarshalJSON(body []byte) error {
12271	var m map[string]*json.RawMessage
12272	err := json.Unmarshal(body, &m)
12273	if err != nil {
12274		return err
12275	}
12276	for k, v := range m {
12277		switch k {
12278		case "properties":
12279			if v != nil {
12280				var firewallPolicyRuleGroupProperties FirewallPolicyRuleGroupProperties
12281				err = json.Unmarshal(*v, &firewallPolicyRuleGroupProperties)
12282				if err != nil {
12283					return err
12284				}
12285				fprg.FirewallPolicyRuleGroupProperties = &firewallPolicyRuleGroupProperties
12286			}
12287		case "name":
12288			if v != nil {
12289				var name string
12290				err = json.Unmarshal(*v, &name)
12291				if err != nil {
12292					return err
12293				}
12294				fprg.Name = &name
12295			}
12296		case "etag":
12297			if v != nil {
12298				var etag string
12299				err = json.Unmarshal(*v, &etag)
12300				if err != nil {
12301					return err
12302				}
12303				fprg.Etag = &etag
12304			}
12305		case "type":
12306			if v != nil {
12307				var typeVar string
12308				err = json.Unmarshal(*v, &typeVar)
12309				if err != nil {
12310					return err
12311				}
12312				fprg.Type = &typeVar
12313			}
12314		case "id":
12315			if v != nil {
12316				var ID string
12317				err = json.Unmarshal(*v, &ID)
12318				if err != nil {
12319					return err
12320				}
12321				fprg.ID = &ID
12322			}
12323		}
12324	}
12325
12326	return nil
12327}
12328
12329// FirewallPolicyRuleGroupListResult response for ListFirewallPolicyRuleGroups API service call.
12330type FirewallPolicyRuleGroupListResult struct {
12331	autorest.Response `json:"-"`
12332	// Value - List of FirewallPolicyRuleGroups in a FirewallPolicy.
12333	Value *[]FirewallPolicyRuleGroup `json:"value,omitempty"`
12334	// NextLink - URL to get the next set of results.
12335	NextLink *string `json:"nextLink,omitempty"`
12336}
12337
12338// FirewallPolicyRuleGroupListResultIterator provides access to a complete listing of
12339// FirewallPolicyRuleGroup values.
12340type FirewallPolicyRuleGroupListResultIterator struct {
12341	i    int
12342	page FirewallPolicyRuleGroupListResultPage
12343}
12344
12345// NextWithContext advances to the next value.  If there was an error making
12346// the request the iterator does not advance and the error is returned.
12347func (iter *FirewallPolicyRuleGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
12348	if tracing.IsEnabled() {
12349		ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyRuleGroupListResultIterator.NextWithContext")
12350		defer func() {
12351			sc := -1
12352			if iter.Response().Response.Response != nil {
12353				sc = iter.Response().Response.Response.StatusCode
12354			}
12355			tracing.EndSpan(ctx, sc, err)
12356		}()
12357	}
12358	iter.i++
12359	if iter.i < len(iter.page.Values()) {
12360		return nil
12361	}
12362	err = iter.page.NextWithContext(ctx)
12363	if err != nil {
12364		iter.i--
12365		return err
12366	}
12367	iter.i = 0
12368	return nil
12369}
12370
12371// Next advances to the next value.  If there was an error making
12372// the request the iterator does not advance and the error is returned.
12373// Deprecated: Use NextWithContext() instead.
12374func (iter *FirewallPolicyRuleGroupListResultIterator) Next() error {
12375	return iter.NextWithContext(context.Background())
12376}
12377
12378// NotDone returns true if the enumeration should be started or is not yet complete.
12379func (iter FirewallPolicyRuleGroupListResultIterator) NotDone() bool {
12380	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12381}
12382
12383// Response returns the raw server response from the last page request.
12384func (iter FirewallPolicyRuleGroupListResultIterator) Response() FirewallPolicyRuleGroupListResult {
12385	return iter.page.Response()
12386}
12387
12388// Value returns the current value or a zero-initialized value if the
12389// iterator has advanced beyond the end of the collection.
12390func (iter FirewallPolicyRuleGroupListResultIterator) Value() FirewallPolicyRuleGroup {
12391	if !iter.page.NotDone() {
12392		return FirewallPolicyRuleGroup{}
12393	}
12394	return iter.page.Values()[iter.i]
12395}
12396
12397// Creates a new instance of the FirewallPolicyRuleGroupListResultIterator type.
12398func NewFirewallPolicyRuleGroupListResultIterator(page FirewallPolicyRuleGroupListResultPage) FirewallPolicyRuleGroupListResultIterator {
12399	return FirewallPolicyRuleGroupListResultIterator{page: page}
12400}
12401
12402// IsEmpty returns true if the ListResult contains no values.
12403func (fprglr FirewallPolicyRuleGroupListResult) IsEmpty() bool {
12404	return fprglr.Value == nil || len(*fprglr.Value) == 0
12405}
12406
12407// hasNextLink returns true if the NextLink is not empty.
12408func (fprglr FirewallPolicyRuleGroupListResult) hasNextLink() bool {
12409	return fprglr.NextLink != nil && len(*fprglr.NextLink) != 0
12410}
12411
12412// firewallPolicyRuleGroupListResultPreparer prepares a request to retrieve the next set of results.
12413// It returns nil if no more results exist.
12414func (fprglr FirewallPolicyRuleGroupListResult) firewallPolicyRuleGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
12415	if !fprglr.hasNextLink() {
12416		return nil, nil
12417	}
12418	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12419		autorest.AsJSON(),
12420		autorest.AsGet(),
12421		autorest.WithBaseURL(to.String(fprglr.NextLink)))
12422}
12423
12424// FirewallPolicyRuleGroupListResultPage contains a page of FirewallPolicyRuleGroup values.
12425type FirewallPolicyRuleGroupListResultPage struct {
12426	fn     func(context.Context, FirewallPolicyRuleGroupListResult) (FirewallPolicyRuleGroupListResult, error)
12427	fprglr FirewallPolicyRuleGroupListResult
12428}
12429
12430// NextWithContext advances to the next page of values.  If there was an error making
12431// the request the page does not advance and the error is returned.
12432func (page *FirewallPolicyRuleGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
12433	if tracing.IsEnabled() {
12434		ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyRuleGroupListResultPage.NextWithContext")
12435		defer func() {
12436			sc := -1
12437			if page.Response().Response.Response != nil {
12438				sc = page.Response().Response.Response.StatusCode
12439			}
12440			tracing.EndSpan(ctx, sc, err)
12441		}()
12442	}
12443	for {
12444		next, err := page.fn(ctx, page.fprglr)
12445		if err != nil {
12446			return err
12447		}
12448		page.fprglr = next
12449		if !next.hasNextLink() || !next.IsEmpty() {
12450			break
12451		}
12452	}
12453	return nil
12454}
12455
12456// Next advances to the next page of values.  If there was an error making
12457// the request the page does not advance and the error is returned.
12458// Deprecated: Use NextWithContext() instead.
12459func (page *FirewallPolicyRuleGroupListResultPage) Next() error {
12460	return page.NextWithContext(context.Background())
12461}
12462
12463// NotDone returns true if the page enumeration should be started or is not yet complete.
12464func (page FirewallPolicyRuleGroupListResultPage) NotDone() bool {
12465	return !page.fprglr.IsEmpty()
12466}
12467
12468// Response returns the raw server response from the last page request.
12469func (page FirewallPolicyRuleGroupListResultPage) Response() FirewallPolicyRuleGroupListResult {
12470	return page.fprglr
12471}
12472
12473// Values returns the slice of values for the current page or nil if there are no values.
12474func (page FirewallPolicyRuleGroupListResultPage) Values() []FirewallPolicyRuleGroup {
12475	if page.fprglr.IsEmpty() {
12476		return nil
12477	}
12478	return *page.fprglr.Value
12479}
12480
12481// Creates a new instance of the FirewallPolicyRuleGroupListResultPage type.
12482func NewFirewallPolicyRuleGroupListResultPage(cur FirewallPolicyRuleGroupListResult, getNextPage func(context.Context, FirewallPolicyRuleGroupListResult) (FirewallPolicyRuleGroupListResult, error)) FirewallPolicyRuleGroupListResultPage {
12483	return FirewallPolicyRuleGroupListResultPage{
12484		fn:     getNextPage,
12485		fprglr: cur,
12486	}
12487}
12488
12489// FirewallPolicyRuleGroupProperties properties of the rule group.
12490type FirewallPolicyRuleGroupProperties struct {
12491	// Priority - Priority of the Firewall Policy Rule Group resource.
12492	Priority *int32 `json:"priority,omitempty"`
12493	// Rules - Group of Firewall Policy rules.
12494	Rules *[]BasicFirewallPolicyRule `json:"rules,omitempty"`
12495	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
12496	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
12497}
12498
12499// UnmarshalJSON is the custom unmarshaler for FirewallPolicyRuleGroupProperties struct.
12500func (fprgp *FirewallPolicyRuleGroupProperties) UnmarshalJSON(body []byte) error {
12501	var m map[string]*json.RawMessage
12502	err := json.Unmarshal(body, &m)
12503	if err != nil {
12504		return err
12505	}
12506	for k, v := range m {
12507		switch k {
12508		case "priority":
12509			if v != nil {
12510				var priority int32
12511				err = json.Unmarshal(*v, &priority)
12512				if err != nil {
12513					return err
12514				}
12515				fprgp.Priority = &priority
12516			}
12517		case "rules":
12518			if v != nil {
12519				rules, err := unmarshalBasicFirewallPolicyRuleArray(*v)
12520				if err != nil {
12521					return err
12522				}
12523				fprgp.Rules = &rules
12524			}
12525		case "provisioningState":
12526			if v != nil {
12527				var provisioningState ProvisioningState
12528				err = json.Unmarshal(*v, &provisioningState)
12529				if err != nil {
12530					return err
12531				}
12532				fprgp.ProvisioningState = provisioningState
12533			}
12534		}
12535	}
12536
12537	return nil
12538}
12539
12540// FirewallPolicyRuleGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
12541// a long-running operation.
12542type FirewallPolicyRuleGroupsCreateOrUpdateFuture 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(FirewallPolicyRuleGroupsClient) (FirewallPolicyRuleGroup, error)
12547}
12548
12549// FirewallPolicyRuleGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a
12550// long-running operation.
12551type FirewallPolicyRuleGroupsDeleteFuture 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(FirewallPolicyRuleGroupsClient) (autorest.Response, error)
12556}
12557
12558// FlowLogFormatParameters parameters that define the flow log format.
12559type FlowLogFormatParameters struct {
12560	// Type - The file type of flow log. Possible values include: 'JSON'
12561	Type FlowLogFormatType `json:"type,omitempty"`
12562	// Version - The version (revision) of the flow log.
12563	Version *int32 `json:"version,omitempty"`
12564}
12565
12566// FlowLogInformation information on the configuration of flow log and traffic analytics (optional) .
12567type FlowLogInformation struct {
12568	autorest.Response `json:"-"`
12569	// TargetResourceID - The ID of the resource to configure for flow log and traffic analytics (optional) .
12570	TargetResourceID *string `json:"targetResourceId,omitempty"`
12571	// FlowLogProperties - Properties of the flow log.
12572	*FlowLogProperties `json:"properties,omitempty"`
12573	// FlowAnalyticsConfiguration - Parameters that define the configuration of traffic analytics.
12574	FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"`
12575}
12576
12577// MarshalJSON is the custom marshaler for FlowLogInformation.
12578func (fli FlowLogInformation) MarshalJSON() ([]byte, error) {
12579	objectMap := make(map[string]interface{})
12580	if fli.TargetResourceID != nil {
12581		objectMap["targetResourceId"] = fli.TargetResourceID
12582	}
12583	if fli.FlowLogProperties != nil {
12584		objectMap["properties"] = fli.FlowLogProperties
12585	}
12586	if fli.FlowAnalyticsConfiguration != nil {
12587		objectMap["flowAnalyticsConfiguration"] = fli.FlowAnalyticsConfiguration
12588	}
12589	return json.Marshal(objectMap)
12590}
12591
12592// UnmarshalJSON is the custom unmarshaler for FlowLogInformation struct.
12593func (fli *FlowLogInformation) UnmarshalJSON(body []byte) error {
12594	var m map[string]*json.RawMessage
12595	err := json.Unmarshal(body, &m)
12596	if err != nil {
12597		return err
12598	}
12599	for k, v := range m {
12600		switch k {
12601		case "targetResourceId":
12602			if v != nil {
12603				var targetResourceID string
12604				err = json.Unmarshal(*v, &targetResourceID)
12605				if err != nil {
12606					return err
12607				}
12608				fli.TargetResourceID = &targetResourceID
12609			}
12610		case "properties":
12611			if v != nil {
12612				var flowLogProperties FlowLogProperties
12613				err = json.Unmarshal(*v, &flowLogProperties)
12614				if err != nil {
12615					return err
12616				}
12617				fli.FlowLogProperties = &flowLogProperties
12618			}
12619		case "flowAnalyticsConfiguration":
12620			if v != nil {
12621				var flowAnalyticsConfiguration TrafficAnalyticsProperties
12622				err = json.Unmarshal(*v, &flowAnalyticsConfiguration)
12623				if err != nil {
12624					return err
12625				}
12626				fli.FlowAnalyticsConfiguration = &flowAnalyticsConfiguration
12627			}
12628		}
12629	}
12630
12631	return nil
12632}
12633
12634// FlowLogProperties parameters that define the configuration of flow log.
12635type FlowLogProperties struct {
12636	// StorageID - ID of the storage account which is used to store the flow log.
12637	StorageID *string `json:"storageId,omitempty"`
12638	// Enabled - Flag to enable/disable flow logging.
12639	Enabled *bool `json:"enabled,omitempty"`
12640	// RetentionPolicy - Parameters that define the retention policy for flow log.
12641	RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"`
12642	// Format - Parameters that define the flow log format.
12643	Format *FlowLogFormatParameters `json:"format,omitempty"`
12644}
12645
12646// FlowLogStatusParameters parameters that define a resource to query flow log and traffic analytics
12647// (optional) status.
12648type FlowLogStatusParameters struct {
12649	// TargetResourceID - The target resource where getting the flow log and traffic analytics (optional) status.
12650	TargetResourceID *string `json:"targetResourceId,omitempty"`
12651}
12652
12653// FrontendIPConfiguration frontend IP address of the load balancer.
12654type FrontendIPConfiguration struct {
12655	autorest.Response `json:"-"`
12656	// FrontendIPConfigurationPropertiesFormat - Properties of the load balancer probe.
12657	*FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"`
12658	// Name - The name of the resource that is unique within the set of frontend IP configurations used by the load balancer. This name can be used to access the resource.
12659	Name *string `json:"name,omitempty"`
12660	// Etag - A unique read-only string that changes whenever the resource is updated.
12661	Etag *string `json:"etag,omitempty"`
12662	// Type - READ-ONLY; Type of the resource.
12663	Type *string `json:"type,omitempty"`
12664	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
12665	Zones *[]string `json:"zones,omitempty"`
12666	// ID - Resource ID.
12667	ID *string `json:"id,omitempty"`
12668}
12669
12670// MarshalJSON is the custom marshaler for FrontendIPConfiguration.
12671func (fic FrontendIPConfiguration) MarshalJSON() ([]byte, error) {
12672	objectMap := make(map[string]interface{})
12673	if fic.FrontendIPConfigurationPropertiesFormat != nil {
12674		objectMap["properties"] = fic.FrontendIPConfigurationPropertiesFormat
12675	}
12676	if fic.Name != nil {
12677		objectMap["name"] = fic.Name
12678	}
12679	if fic.Etag != nil {
12680		objectMap["etag"] = fic.Etag
12681	}
12682	if fic.Zones != nil {
12683		objectMap["zones"] = fic.Zones
12684	}
12685	if fic.ID != nil {
12686		objectMap["id"] = fic.ID
12687	}
12688	return json.Marshal(objectMap)
12689}
12690
12691// UnmarshalJSON is the custom unmarshaler for FrontendIPConfiguration struct.
12692func (fic *FrontendIPConfiguration) UnmarshalJSON(body []byte) error {
12693	var m map[string]*json.RawMessage
12694	err := json.Unmarshal(body, &m)
12695	if err != nil {
12696		return err
12697	}
12698	for k, v := range m {
12699		switch k {
12700		case "properties":
12701			if v != nil {
12702				var frontendIPConfigurationPropertiesFormat FrontendIPConfigurationPropertiesFormat
12703				err = json.Unmarshal(*v, &frontendIPConfigurationPropertiesFormat)
12704				if err != nil {
12705					return err
12706				}
12707				fic.FrontendIPConfigurationPropertiesFormat = &frontendIPConfigurationPropertiesFormat
12708			}
12709		case "name":
12710			if v != nil {
12711				var name string
12712				err = json.Unmarshal(*v, &name)
12713				if err != nil {
12714					return err
12715				}
12716				fic.Name = &name
12717			}
12718		case "etag":
12719			if v != nil {
12720				var etag string
12721				err = json.Unmarshal(*v, &etag)
12722				if err != nil {
12723					return err
12724				}
12725				fic.Etag = &etag
12726			}
12727		case "type":
12728			if v != nil {
12729				var typeVar string
12730				err = json.Unmarshal(*v, &typeVar)
12731				if err != nil {
12732					return err
12733				}
12734				fic.Type = &typeVar
12735			}
12736		case "zones":
12737			if v != nil {
12738				var zones []string
12739				err = json.Unmarshal(*v, &zones)
12740				if err != nil {
12741					return err
12742				}
12743				fic.Zones = &zones
12744			}
12745		case "id":
12746			if v != nil {
12747				var ID string
12748				err = json.Unmarshal(*v, &ID)
12749				if err != nil {
12750					return err
12751				}
12752				fic.ID = &ID
12753			}
12754		}
12755	}
12756
12757	return nil
12758}
12759
12760// FrontendIPConfigurationPropertiesFormat properties of Frontend IP Configuration of the load balancer.
12761type FrontendIPConfigurationPropertiesFormat struct {
12762	// InboundNatRules - READ-ONLY; Read only. Inbound rules URIs that use this frontend IP.
12763	InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"`
12764	// InboundNatPools - READ-ONLY; Read only. Inbound pools URIs that use this frontend IP.
12765	InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"`
12766	// OutboundRules - READ-ONLY; Read only. Outbound rules URIs that use this frontend IP.
12767	OutboundRules *[]SubResource `json:"outboundRules,omitempty"`
12768	// LoadBalancingRules - READ-ONLY; Gets load balancing rules URIs that use this frontend IP.
12769	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
12770	// PrivateIPAddress - The private IP address of the IP configuration.
12771	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
12772	// PrivateIPAllocationMethod - The Private IP allocation method. Possible values include: 'Static', 'Dynamic'
12773	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
12774	// PrivateIPAddressVersion - It represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values include: 'IPv4', 'IPv6'
12775	PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
12776	// Subnet - The reference of the subnet resource.
12777	Subnet *Subnet `json:"subnet,omitempty"`
12778	// PublicIPAddress - The reference of the Public IP resource.
12779	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
12780	// PublicIPPrefix - The reference of the Public IP Prefix resource.
12781	PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"`
12782	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
12783	ProvisioningState *string `json:"provisioningState,omitempty"`
12784}
12785
12786// MarshalJSON is the custom marshaler for FrontendIPConfigurationPropertiesFormat.
12787func (ficpf FrontendIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
12788	objectMap := make(map[string]interface{})
12789	if ficpf.PrivateIPAddress != nil {
12790		objectMap["privateIPAddress"] = ficpf.PrivateIPAddress
12791	}
12792	if ficpf.PrivateIPAllocationMethod != "" {
12793		objectMap["privateIPAllocationMethod"] = ficpf.PrivateIPAllocationMethod
12794	}
12795	if ficpf.PrivateIPAddressVersion != "" {
12796		objectMap["privateIPAddressVersion"] = ficpf.PrivateIPAddressVersion
12797	}
12798	if ficpf.Subnet != nil {
12799		objectMap["subnet"] = ficpf.Subnet
12800	}
12801	if ficpf.PublicIPAddress != nil {
12802		objectMap["publicIPAddress"] = ficpf.PublicIPAddress
12803	}
12804	if ficpf.PublicIPPrefix != nil {
12805		objectMap["publicIPPrefix"] = ficpf.PublicIPPrefix
12806	}
12807	if ficpf.ProvisioningState != nil {
12808		objectMap["provisioningState"] = ficpf.ProvisioningState
12809	}
12810	return json.Marshal(objectMap)
12811}
12812
12813// GatewayRoute gateway routing details.
12814type GatewayRoute struct {
12815	// LocalAddress - READ-ONLY; The gateway's local address.
12816	LocalAddress *string `json:"localAddress,omitempty"`
12817	// NetworkProperty - READ-ONLY; The route's network prefix.
12818	NetworkProperty *string `json:"network,omitempty"`
12819	// NextHop - READ-ONLY; The route's next hop.
12820	NextHop *string `json:"nextHop,omitempty"`
12821	// SourcePeer - READ-ONLY; The peer this route was learned from.
12822	SourcePeer *string `json:"sourcePeer,omitempty"`
12823	// Origin - READ-ONLY; The source this route was learned from.
12824	Origin *string `json:"origin,omitempty"`
12825	// AsPath - READ-ONLY; The route's AS path sequence.
12826	AsPath *string `json:"asPath,omitempty"`
12827	// Weight - READ-ONLY; The route's weight.
12828	Weight *int32 `json:"weight,omitempty"`
12829}
12830
12831// GatewayRouteListResult list of virtual network gateway routes.
12832type GatewayRouteListResult struct {
12833	autorest.Response `json:"-"`
12834	// Value - List of gateway routes.
12835	Value *[]GatewayRoute `json:"value,omitempty"`
12836}
12837
12838// GetVpnSitesConfigurationRequest list of Vpn-Sites.
12839type GetVpnSitesConfigurationRequest struct {
12840	// VpnSites - List of resource-ids of the vpn-sites for which config is to be downloaded.
12841	VpnSites *[]string `json:"vpnSites,omitempty"`
12842	// OutputBlobSasURL - The sas-url to download the configurations for vpn-sites.
12843	OutputBlobSasURL *string `json:"outputBlobSasUrl,omitempty"`
12844}
12845
12846// HTTPConfiguration HTTP configuration of the connectivity check.
12847type HTTPConfiguration struct {
12848	// Method - HTTP method. Possible values include: 'Get'
12849	Method HTTPMethod `json:"method,omitempty"`
12850	// Headers - List of HTTP headers.
12851	Headers *[]HTTPHeader `json:"headers,omitempty"`
12852	// ValidStatusCodes - Valid status codes.
12853	ValidStatusCodes *[]int32 `json:"validStatusCodes,omitempty"`
12854}
12855
12856// HTTPHeader describes the HTTP header.
12857type HTTPHeader struct {
12858	// Name - The name in HTTP header.
12859	Name *string `json:"name,omitempty"`
12860	// Value - The value in HTTP header.
12861	Value *string `json:"value,omitempty"`
12862}
12863
12864// HubIPAddresses IP addresses associated with azure firewall.
12865type HubIPAddresses struct {
12866	// PublicIPAddresses - List of Public IP addresses associated with azure firewall.
12867	PublicIPAddresses *[]AzureFirewallPublicIPAddress `json:"publicIPAddresses,omitempty"`
12868	// PrivateIPAddress - Private IP Address associated with azure firewall.
12869	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
12870}
12871
12872// HubVirtualNetworkConnection hubVirtualNetworkConnection Resource.
12873type HubVirtualNetworkConnection struct {
12874	autorest.Response `json:"-"`
12875	// HubVirtualNetworkConnectionProperties - Properties of the hub virtual network connection.
12876	*HubVirtualNetworkConnectionProperties `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 - READ-ONLY; Gets 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 HubVirtualNetworkConnection.
12886func (hvnc HubVirtualNetworkConnection) MarshalJSON() ([]byte, error) {
12887	objectMap := make(map[string]interface{})
12888	if hvnc.HubVirtualNetworkConnectionProperties != nil {
12889		objectMap["properties"] = hvnc.HubVirtualNetworkConnectionProperties
12890	}
12891	if hvnc.Name != nil {
12892		objectMap["name"] = hvnc.Name
12893	}
12894	if hvnc.ID != nil {
12895		objectMap["id"] = hvnc.ID
12896	}
12897	return json.Marshal(objectMap)
12898}
12899
12900// UnmarshalJSON is the custom unmarshaler for HubVirtualNetworkConnection struct.
12901func (hvnc *HubVirtualNetworkConnection) UnmarshalJSON(body []byte) error {
12902	var m map[string]*json.RawMessage
12903	err := json.Unmarshal(body, &m)
12904	if err != nil {
12905		return err
12906	}
12907	for k, v := range m {
12908		switch k {
12909		case "properties":
12910			if v != nil {
12911				var hubVirtualNetworkConnectionProperties HubVirtualNetworkConnectionProperties
12912				err = json.Unmarshal(*v, &hubVirtualNetworkConnectionProperties)
12913				if err != nil {
12914					return err
12915				}
12916				hvnc.HubVirtualNetworkConnectionProperties = &hubVirtualNetworkConnectionProperties
12917			}
12918		case "name":
12919			if v != nil {
12920				var name string
12921				err = json.Unmarshal(*v, &name)
12922				if err != nil {
12923					return err
12924				}
12925				hvnc.Name = &name
12926			}
12927		case "etag":
12928			if v != nil {
12929				var etag string
12930				err = json.Unmarshal(*v, &etag)
12931				if err != nil {
12932					return err
12933				}
12934				hvnc.Etag = &etag
12935			}
12936		case "id":
12937			if v != nil {
12938				var ID string
12939				err = json.Unmarshal(*v, &ID)
12940				if err != nil {
12941					return err
12942				}
12943				hvnc.ID = &ID
12944			}
12945		}
12946	}
12947
12948	return nil
12949}
12950
12951// HubVirtualNetworkConnectionProperties parameters for HubVirtualNetworkConnection.
12952type HubVirtualNetworkConnectionProperties struct {
12953	// RemoteVirtualNetwork - Reference to the remote virtual network.
12954	RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"`
12955	// AllowHubToRemoteVnetTransit - VirtualHub to RemoteVnet transit to enabled or not.
12956	AllowHubToRemoteVnetTransit *bool `json:"allowHubToRemoteVnetTransit,omitempty"`
12957	// AllowRemoteVnetToUseHubVnetGateways - Allow RemoteVnet to use Virtual Hub's gateways.
12958	AllowRemoteVnetToUseHubVnetGateways *bool `json:"allowRemoteVnetToUseHubVnetGateways,omitempty"`
12959	// EnableInternetSecurity - Enable internet security.
12960	EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"`
12961	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
12962	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
12963}
12964
12965// InboundNatPool inbound NAT pool of the load balancer.
12966type InboundNatPool struct {
12967	// InboundNatPoolPropertiesFormat - Properties of load balancer inbound nat pool.
12968	*InboundNatPoolPropertiesFormat `json:"properties,omitempty"`
12969	// Name - The name of the resource that is unique within the set of inbound NAT pools used by the load balancer. This name can be used to access the resource.
12970	Name *string `json:"name,omitempty"`
12971	// Etag - A unique read-only string that changes whenever the resource is updated.
12972	Etag *string `json:"etag,omitempty"`
12973	// Type - READ-ONLY; Type of the resource.
12974	Type *string `json:"type,omitempty"`
12975	// ID - Resource ID.
12976	ID *string `json:"id,omitempty"`
12977}
12978
12979// MarshalJSON is the custom marshaler for InboundNatPool.
12980func (inp InboundNatPool) MarshalJSON() ([]byte, error) {
12981	objectMap := make(map[string]interface{})
12982	if inp.InboundNatPoolPropertiesFormat != nil {
12983		objectMap["properties"] = inp.InboundNatPoolPropertiesFormat
12984	}
12985	if inp.Name != nil {
12986		objectMap["name"] = inp.Name
12987	}
12988	if inp.Etag != nil {
12989		objectMap["etag"] = inp.Etag
12990	}
12991	if inp.ID != nil {
12992		objectMap["id"] = inp.ID
12993	}
12994	return json.Marshal(objectMap)
12995}
12996
12997// UnmarshalJSON is the custom unmarshaler for InboundNatPool struct.
12998func (inp *InboundNatPool) UnmarshalJSON(body []byte) error {
12999	var m map[string]*json.RawMessage
13000	err := json.Unmarshal(body, &m)
13001	if err != nil {
13002		return err
13003	}
13004	for k, v := range m {
13005		switch k {
13006		case "properties":
13007			if v != nil {
13008				var inboundNatPoolPropertiesFormat InboundNatPoolPropertiesFormat
13009				err = json.Unmarshal(*v, &inboundNatPoolPropertiesFormat)
13010				if err != nil {
13011					return err
13012				}
13013				inp.InboundNatPoolPropertiesFormat = &inboundNatPoolPropertiesFormat
13014			}
13015		case "name":
13016			if v != nil {
13017				var name string
13018				err = json.Unmarshal(*v, &name)
13019				if err != nil {
13020					return err
13021				}
13022				inp.Name = &name
13023			}
13024		case "etag":
13025			if v != nil {
13026				var etag string
13027				err = json.Unmarshal(*v, &etag)
13028				if err != nil {
13029					return err
13030				}
13031				inp.Etag = &etag
13032			}
13033		case "type":
13034			if v != nil {
13035				var typeVar string
13036				err = json.Unmarshal(*v, &typeVar)
13037				if err != nil {
13038					return err
13039				}
13040				inp.Type = &typeVar
13041			}
13042		case "id":
13043			if v != nil {
13044				var ID string
13045				err = json.Unmarshal(*v, &ID)
13046				if err != nil {
13047					return err
13048				}
13049				inp.ID = &ID
13050			}
13051		}
13052	}
13053
13054	return nil
13055}
13056
13057// InboundNatPoolPropertiesFormat properties of Inbound NAT pool.
13058type InboundNatPoolPropertiesFormat struct {
13059	// FrontendIPConfiguration - A reference to frontend IP addresses.
13060	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
13061	// Protocol - The reference to the transport protocol used by the inbound NAT pool. Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
13062	Protocol TransportProtocol `json:"protocol,omitempty"`
13063	// 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.
13064	FrontendPortRangeStart *int32 `json:"frontendPortRangeStart,omitempty"`
13065	// 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.
13066	FrontendPortRangeEnd *int32 `json:"frontendPortRangeEnd,omitempty"`
13067	// BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 1 and 65535.
13068	BackendPort *int32 `json:"backendPort,omitempty"`
13069	// 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.
13070	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
13071	// 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.
13072	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
13073	// 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.
13074	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
13075	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
13076	ProvisioningState *string `json:"provisioningState,omitempty"`
13077}
13078
13079// InboundNatRule inbound NAT rule of the load balancer.
13080type InboundNatRule struct {
13081	autorest.Response `json:"-"`
13082	// InboundNatRulePropertiesFormat - Properties of load balancer inbound nat rule.
13083	*InboundNatRulePropertiesFormat `json:"properties,omitempty"`
13084	// Name - Gets name of the resource that is unique within the set of inbound NAT rules used by the load balancer. This name can be used to access the resource.
13085	Name *string `json:"name,omitempty"`
13086	// Etag - A unique read-only string that changes whenever the resource is updated.
13087	Etag *string `json:"etag,omitempty"`
13088	// Type - READ-ONLY; Type of the resource.
13089	Type *string `json:"type,omitempty"`
13090	// ID - Resource ID.
13091	ID *string `json:"id,omitempty"`
13092}
13093
13094// MarshalJSON is the custom marshaler for InboundNatRule.
13095func (inr InboundNatRule) MarshalJSON() ([]byte, error) {
13096	objectMap := make(map[string]interface{})
13097	if inr.InboundNatRulePropertiesFormat != nil {
13098		objectMap["properties"] = inr.InboundNatRulePropertiesFormat
13099	}
13100	if inr.Name != nil {
13101		objectMap["name"] = inr.Name
13102	}
13103	if inr.Etag != nil {
13104		objectMap["etag"] = inr.Etag
13105	}
13106	if inr.ID != nil {
13107		objectMap["id"] = inr.ID
13108	}
13109	return json.Marshal(objectMap)
13110}
13111
13112// UnmarshalJSON is the custom unmarshaler for InboundNatRule struct.
13113func (inr *InboundNatRule) UnmarshalJSON(body []byte) error {
13114	var m map[string]*json.RawMessage
13115	err := json.Unmarshal(body, &m)
13116	if err != nil {
13117		return err
13118	}
13119	for k, v := range m {
13120		switch k {
13121		case "properties":
13122			if v != nil {
13123				var inboundNatRulePropertiesFormat InboundNatRulePropertiesFormat
13124				err = json.Unmarshal(*v, &inboundNatRulePropertiesFormat)
13125				if err != nil {
13126					return err
13127				}
13128				inr.InboundNatRulePropertiesFormat = &inboundNatRulePropertiesFormat
13129			}
13130		case "name":
13131			if v != nil {
13132				var name string
13133				err = json.Unmarshal(*v, &name)
13134				if err != nil {
13135					return err
13136				}
13137				inr.Name = &name
13138			}
13139		case "etag":
13140			if v != nil {
13141				var etag string
13142				err = json.Unmarshal(*v, &etag)
13143				if err != nil {
13144					return err
13145				}
13146				inr.Etag = &etag
13147			}
13148		case "type":
13149			if v != nil {
13150				var typeVar string
13151				err = json.Unmarshal(*v, &typeVar)
13152				if err != nil {
13153					return err
13154				}
13155				inr.Type = &typeVar
13156			}
13157		case "id":
13158			if v != nil {
13159				var ID string
13160				err = json.Unmarshal(*v, &ID)
13161				if err != nil {
13162					return err
13163				}
13164				inr.ID = &ID
13165			}
13166		}
13167	}
13168
13169	return nil
13170}
13171
13172// InboundNatRuleListResult response for ListInboundNatRule API service call.
13173type InboundNatRuleListResult struct {
13174	autorest.Response `json:"-"`
13175	// Value - A list of inbound nat rules in a load balancer.
13176	Value *[]InboundNatRule `json:"value,omitempty"`
13177	// NextLink - READ-ONLY; The URL to get the next set of results.
13178	NextLink *string `json:"nextLink,omitempty"`
13179}
13180
13181// MarshalJSON is the custom marshaler for InboundNatRuleListResult.
13182func (inrlr InboundNatRuleListResult) MarshalJSON() ([]byte, error) {
13183	objectMap := make(map[string]interface{})
13184	if inrlr.Value != nil {
13185		objectMap["value"] = inrlr.Value
13186	}
13187	return json.Marshal(objectMap)
13188}
13189
13190// InboundNatRuleListResultIterator provides access to a complete listing of InboundNatRule values.
13191type InboundNatRuleListResultIterator struct {
13192	i    int
13193	page InboundNatRuleListResultPage
13194}
13195
13196// NextWithContext advances to the next value.  If there was an error making
13197// the request the iterator does not advance and the error is returned.
13198func (iter *InboundNatRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
13199	if tracing.IsEnabled() {
13200		ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultIterator.NextWithContext")
13201		defer func() {
13202			sc := -1
13203			if iter.Response().Response.Response != nil {
13204				sc = iter.Response().Response.Response.StatusCode
13205			}
13206			tracing.EndSpan(ctx, sc, err)
13207		}()
13208	}
13209	iter.i++
13210	if iter.i < len(iter.page.Values()) {
13211		return nil
13212	}
13213	err = iter.page.NextWithContext(ctx)
13214	if err != nil {
13215		iter.i--
13216		return err
13217	}
13218	iter.i = 0
13219	return nil
13220}
13221
13222// Next advances to the next value.  If there was an error making
13223// the request the iterator does not advance and the error is returned.
13224// Deprecated: Use NextWithContext() instead.
13225func (iter *InboundNatRuleListResultIterator) Next() error {
13226	return iter.NextWithContext(context.Background())
13227}
13228
13229// NotDone returns true if the enumeration should be started or is not yet complete.
13230func (iter InboundNatRuleListResultIterator) NotDone() bool {
13231	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13232}
13233
13234// Response returns the raw server response from the last page request.
13235func (iter InboundNatRuleListResultIterator) Response() InboundNatRuleListResult {
13236	return iter.page.Response()
13237}
13238
13239// Value returns the current value or a zero-initialized value if the
13240// iterator has advanced beyond the end of the collection.
13241func (iter InboundNatRuleListResultIterator) Value() InboundNatRule {
13242	if !iter.page.NotDone() {
13243		return InboundNatRule{}
13244	}
13245	return iter.page.Values()[iter.i]
13246}
13247
13248// Creates a new instance of the InboundNatRuleListResultIterator type.
13249func NewInboundNatRuleListResultIterator(page InboundNatRuleListResultPage) InboundNatRuleListResultIterator {
13250	return InboundNatRuleListResultIterator{page: page}
13251}
13252
13253// IsEmpty returns true if the ListResult contains no values.
13254func (inrlr InboundNatRuleListResult) IsEmpty() bool {
13255	return inrlr.Value == nil || len(*inrlr.Value) == 0
13256}
13257
13258// hasNextLink returns true if the NextLink is not empty.
13259func (inrlr InboundNatRuleListResult) hasNextLink() bool {
13260	return inrlr.NextLink != nil && len(*inrlr.NextLink) != 0
13261}
13262
13263// inboundNatRuleListResultPreparer prepares a request to retrieve the next set of results.
13264// It returns nil if no more results exist.
13265func (inrlr InboundNatRuleListResult) inboundNatRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
13266	if !inrlr.hasNextLink() {
13267		return nil, nil
13268	}
13269	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13270		autorest.AsJSON(),
13271		autorest.AsGet(),
13272		autorest.WithBaseURL(to.String(inrlr.NextLink)))
13273}
13274
13275// InboundNatRuleListResultPage contains a page of InboundNatRule values.
13276type InboundNatRuleListResultPage struct {
13277	fn    func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)
13278	inrlr InboundNatRuleListResult
13279}
13280
13281// NextWithContext advances to the next page of values.  If there was an error making
13282// the request the page does not advance and the error is returned.
13283func (page *InboundNatRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
13284	if tracing.IsEnabled() {
13285		ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultPage.NextWithContext")
13286		defer func() {
13287			sc := -1
13288			if page.Response().Response.Response != nil {
13289				sc = page.Response().Response.Response.StatusCode
13290			}
13291			tracing.EndSpan(ctx, sc, err)
13292		}()
13293	}
13294	for {
13295		next, err := page.fn(ctx, page.inrlr)
13296		if err != nil {
13297			return err
13298		}
13299		page.inrlr = next
13300		if !next.hasNextLink() || !next.IsEmpty() {
13301			break
13302		}
13303	}
13304	return nil
13305}
13306
13307// Next advances to the next page of values.  If there was an error making
13308// the request the page does not advance and the error is returned.
13309// Deprecated: Use NextWithContext() instead.
13310func (page *InboundNatRuleListResultPage) Next() error {
13311	return page.NextWithContext(context.Background())
13312}
13313
13314// NotDone returns true if the page enumeration should be started or is not yet complete.
13315func (page InboundNatRuleListResultPage) NotDone() bool {
13316	return !page.inrlr.IsEmpty()
13317}
13318
13319// Response returns the raw server response from the last page request.
13320func (page InboundNatRuleListResultPage) Response() InboundNatRuleListResult {
13321	return page.inrlr
13322}
13323
13324// Values returns the slice of values for the current page or nil if there are no values.
13325func (page InboundNatRuleListResultPage) Values() []InboundNatRule {
13326	if page.inrlr.IsEmpty() {
13327		return nil
13328	}
13329	return *page.inrlr.Value
13330}
13331
13332// Creates a new instance of the InboundNatRuleListResultPage type.
13333func NewInboundNatRuleListResultPage(cur InboundNatRuleListResult, getNextPage func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)) InboundNatRuleListResultPage {
13334	return InboundNatRuleListResultPage{
13335		fn:    getNextPage,
13336		inrlr: cur,
13337	}
13338}
13339
13340// InboundNatRulePropertiesFormat properties of the inbound NAT rule.
13341type InboundNatRulePropertiesFormat struct {
13342	// FrontendIPConfiguration - A reference to frontend IP addresses.
13343	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
13344	// 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.
13345	BackendIPConfiguration *InterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"`
13346	// Protocol - The reference to the transport protocol used by the load balancing rule. Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
13347	Protocol TransportProtocol `json:"protocol,omitempty"`
13348	// 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.
13349	FrontendPort *int32 `json:"frontendPort,omitempty"`
13350	// BackendPort - The port used for the internal endpoint. Acceptable values range from 1 to 65535.
13351	BackendPort *int32 `json:"backendPort,omitempty"`
13352	// 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.
13353	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
13354	// 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.
13355	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
13356	// 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.
13357	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
13358	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
13359	ProvisioningState *string `json:"provisioningState,omitempty"`
13360}
13361
13362// MarshalJSON is the custom marshaler for InboundNatRulePropertiesFormat.
13363func (inrpf InboundNatRulePropertiesFormat) MarshalJSON() ([]byte, error) {
13364	objectMap := make(map[string]interface{})
13365	if inrpf.FrontendIPConfiguration != nil {
13366		objectMap["frontendIPConfiguration"] = inrpf.FrontendIPConfiguration
13367	}
13368	if inrpf.Protocol != "" {
13369		objectMap["protocol"] = inrpf.Protocol
13370	}
13371	if inrpf.FrontendPort != nil {
13372		objectMap["frontendPort"] = inrpf.FrontendPort
13373	}
13374	if inrpf.BackendPort != nil {
13375		objectMap["backendPort"] = inrpf.BackendPort
13376	}
13377	if inrpf.IdleTimeoutInMinutes != nil {
13378		objectMap["idleTimeoutInMinutes"] = inrpf.IdleTimeoutInMinutes
13379	}
13380	if inrpf.EnableFloatingIP != nil {
13381		objectMap["enableFloatingIP"] = inrpf.EnableFloatingIP
13382	}
13383	if inrpf.EnableTCPReset != nil {
13384		objectMap["enableTcpReset"] = inrpf.EnableTCPReset
13385	}
13386	if inrpf.ProvisioningState != nil {
13387		objectMap["provisioningState"] = inrpf.ProvisioningState
13388	}
13389	return json.Marshal(objectMap)
13390}
13391
13392// InboundNatRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
13393// long-running operation.
13394type InboundNatRulesCreateOrUpdateFuture struct {
13395	azure.FutureAPI
13396	// Result returns the result of the asynchronous operation.
13397	// If the operation has not completed it will return an error.
13398	Result func(InboundNatRulesClient) (InboundNatRule, error)
13399}
13400
13401// InboundNatRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
13402// operation.
13403type InboundNatRulesDeleteFuture struct {
13404	azure.FutureAPI
13405	// Result returns the result of the asynchronous operation.
13406	// If the operation has not completed it will return an error.
13407	Result func(InboundNatRulesClient) (autorest.Response, error)
13408}
13409
13410// IntentPolicy network Intent Policy resource.
13411type IntentPolicy struct {
13412	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
13413	Etag *string `json:"etag,omitempty"`
13414	// ID - Resource ID.
13415	ID *string `json:"id,omitempty"`
13416	// Name - READ-ONLY; Resource name.
13417	Name *string `json:"name,omitempty"`
13418	// Type - READ-ONLY; Resource type.
13419	Type *string `json:"type,omitempty"`
13420	// Location - Resource location.
13421	Location *string `json:"location,omitempty"`
13422	// Tags - Resource tags.
13423	Tags map[string]*string `json:"tags"`
13424}
13425
13426// MarshalJSON is the custom marshaler for IntentPolicy.
13427func (IP IntentPolicy) MarshalJSON() ([]byte, error) {
13428	objectMap := make(map[string]interface{})
13429	if IP.Etag != nil {
13430		objectMap["etag"] = IP.Etag
13431	}
13432	if IP.ID != nil {
13433		objectMap["id"] = IP.ID
13434	}
13435	if IP.Location != nil {
13436		objectMap["location"] = IP.Location
13437	}
13438	if IP.Tags != nil {
13439		objectMap["tags"] = IP.Tags
13440	}
13441	return json.Marshal(objectMap)
13442}
13443
13444// IntentPolicyConfiguration details of NetworkIntentPolicyConfiguration for PrepareNetworkPoliciesRequest.
13445type IntentPolicyConfiguration struct {
13446	// NetworkIntentPolicyName - The name of the Network Intent Policy for storing in target subscription.
13447	NetworkIntentPolicyName *string `json:"networkIntentPolicyName,omitempty"`
13448	// SourceNetworkIntentPolicy - Source network intent policy.
13449	SourceNetworkIntentPolicy *IntentPolicy `json:"sourceNetworkIntentPolicy,omitempty"`
13450}
13451
13452// Interface a network interface in a resource group.
13453type Interface struct {
13454	autorest.Response `json:"-"`
13455	// InterfacePropertiesFormat - Properties of the network interface.
13456	*InterfacePropertiesFormat `json:"properties,omitempty"`
13457	// Etag - A unique read-only string that changes whenever the resource is updated.
13458	Etag *string `json:"etag,omitempty"`
13459	// ID - Resource ID.
13460	ID *string `json:"id,omitempty"`
13461	// Name - READ-ONLY; Resource name.
13462	Name *string `json:"name,omitempty"`
13463	// Type - READ-ONLY; Resource type.
13464	Type *string `json:"type,omitempty"`
13465	// Location - Resource location.
13466	Location *string `json:"location,omitempty"`
13467	// Tags - Resource tags.
13468	Tags map[string]*string `json:"tags"`
13469}
13470
13471// MarshalJSON is the custom marshaler for Interface.
13472func (i Interface) MarshalJSON() ([]byte, error) {
13473	objectMap := make(map[string]interface{})
13474	if i.InterfacePropertiesFormat != nil {
13475		objectMap["properties"] = i.InterfacePropertiesFormat
13476	}
13477	if i.Etag != nil {
13478		objectMap["etag"] = i.Etag
13479	}
13480	if i.ID != nil {
13481		objectMap["id"] = i.ID
13482	}
13483	if i.Location != nil {
13484		objectMap["location"] = i.Location
13485	}
13486	if i.Tags != nil {
13487		objectMap["tags"] = i.Tags
13488	}
13489	return json.Marshal(objectMap)
13490}
13491
13492// UnmarshalJSON is the custom unmarshaler for Interface struct.
13493func (i *Interface) UnmarshalJSON(body []byte) error {
13494	var m map[string]*json.RawMessage
13495	err := json.Unmarshal(body, &m)
13496	if err != nil {
13497		return err
13498	}
13499	for k, v := range m {
13500		switch k {
13501		case "properties":
13502			if v != nil {
13503				var interfacePropertiesFormat InterfacePropertiesFormat
13504				err = json.Unmarshal(*v, &interfacePropertiesFormat)
13505				if err != nil {
13506					return err
13507				}
13508				i.InterfacePropertiesFormat = &interfacePropertiesFormat
13509			}
13510		case "etag":
13511			if v != nil {
13512				var etag string
13513				err = json.Unmarshal(*v, &etag)
13514				if err != nil {
13515					return err
13516				}
13517				i.Etag = &etag
13518			}
13519		case "id":
13520			if v != nil {
13521				var ID string
13522				err = json.Unmarshal(*v, &ID)
13523				if err != nil {
13524					return err
13525				}
13526				i.ID = &ID
13527			}
13528		case "name":
13529			if v != nil {
13530				var name string
13531				err = json.Unmarshal(*v, &name)
13532				if err != nil {
13533					return err
13534				}
13535				i.Name = &name
13536			}
13537		case "type":
13538			if v != nil {
13539				var typeVar string
13540				err = json.Unmarshal(*v, &typeVar)
13541				if err != nil {
13542					return err
13543				}
13544				i.Type = &typeVar
13545			}
13546		case "location":
13547			if v != nil {
13548				var location string
13549				err = json.Unmarshal(*v, &location)
13550				if err != nil {
13551					return err
13552				}
13553				i.Location = &location
13554			}
13555		case "tags":
13556			if v != nil {
13557				var tags map[string]*string
13558				err = json.Unmarshal(*v, &tags)
13559				if err != nil {
13560					return err
13561				}
13562				i.Tags = tags
13563			}
13564		}
13565	}
13566
13567	return nil
13568}
13569
13570// InterfaceAssociation network interface and its custom security rules.
13571type InterfaceAssociation struct {
13572	// ID - READ-ONLY; Network interface ID.
13573	ID *string `json:"id,omitempty"`
13574	// SecurityRules - Collection of custom security rules.
13575	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
13576}
13577
13578// MarshalJSON is the custom marshaler for InterfaceAssociation.
13579func (ia InterfaceAssociation) MarshalJSON() ([]byte, error) {
13580	objectMap := make(map[string]interface{})
13581	if ia.SecurityRules != nil {
13582		objectMap["securityRules"] = ia.SecurityRules
13583	}
13584	return json.Marshal(objectMap)
13585}
13586
13587// InterfaceDNSSettings DNS settings of a network interface.
13588type InterfaceDNSSettings struct {
13589	// 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.
13590	DNSServers *[]string `json:"dnsServers,omitempty"`
13591	// 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.
13592	AppliedDNSServers *[]string `json:"appliedDnsServers,omitempty"`
13593	// InternalDNSNameLabel - Relative DNS name for this NIC used for internal communications between VMs in the same virtual network.
13594	InternalDNSNameLabel *string `json:"internalDnsNameLabel,omitempty"`
13595	// InternalFqdn - Fully qualified DNS name supporting internal communications between VMs in the same virtual network.
13596	InternalFqdn *string `json:"internalFqdn,omitempty"`
13597	// 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.
13598	InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"`
13599}
13600
13601// InterfaceIPConfiguration iPConfiguration in a network interface.
13602type InterfaceIPConfiguration struct {
13603	autorest.Response `json:"-"`
13604	// InterfaceIPConfigurationPropertiesFormat - Network interface IP configuration properties.
13605	*InterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"`
13606	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
13607	Name *string `json:"name,omitempty"`
13608	// Etag - A unique read-only string that changes whenever the resource is updated.
13609	Etag *string `json:"etag,omitempty"`
13610	// ID - Resource ID.
13611	ID *string `json:"id,omitempty"`
13612}
13613
13614// MarshalJSON is the custom marshaler for InterfaceIPConfiguration.
13615func (iic InterfaceIPConfiguration) MarshalJSON() ([]byte, error) {
13616	objectMap := make(map[string]interface{})
13617	if iic.InterfaceIPConfigurationPropertiesFormat != nil {
13618		objectMap["properties"] = iic.InterfaceIPConfigurationPropertiesFormat
13619	}
13620	if iic.Name != nil {
13621		objectMap["name"] = iic.Name
13622	}
13623	if iic.Etag != nil {
13624		objectMap["etag"] = iic.Etag
13625	}
13626	if iic.ID != nil {
13627		objectMap["id"] = iic.ID
13628	}
13629	return json.Marshal(objectMap)
13630}
13631
13632// UnmarshalJSON is the custom unmarshaler for InterfaceIPConfiguration struct.
13633func (iic *InterfaceIPConfiguration) UnmarshalJSON(body []byte) error {
13634	var m map[string]*json.RawMessage
13635	err := json.Unmarshal(body, &m)
13636	if err != nil {
13637		return err
13638	}
13639	for k, v := range m {
13640		switch k {
13641		case "properties":
13642			if v != nil {
13643				var interfaceIPConfigurationPropertiesFormat InterfaceIPConfigurationPropertiesFormat
13644				err = json.Unmarshal(*v, &interfaceIPConfigurationPropertiesFormat)
13645				if err != nil {
13646					return err
13647				}
13648				iic.InterfaceIPConfigurationPropertiesFormat = &interfaceIPConfigurationPropertiesFormat
13649			}
13650		case "name":
13651			if v != nil {
13652				var name string
13653				err = json.Unmarshal(*v, &name)
13654				if err != nil {
13655					return err
13656				}
13657				iic.Name = &name
13658			}
13659		case "etag":
13660			if v != nil {
13661				var etag string
13662				err = json.Unmarshal(*v, &etag)
13663				if err != nil {
13664					return err
13665				}
13666				iic.Etag = &etag
13667			}
13668		case "id":
13669			if v != nil {
13670				var ID string
13671				err = json.Unmarshal(*v, &ID)
13672				if err != nil {
13673					return err
13674				}
13675				iic.ID = &ID
13676			}
13677		}
13678	}
13679
13680	return nil
13681}
13682
13683// InterfaceIPConfigurationListResult response for list ip configurations API service call.
13684type InterfaceIPConfigurationListResult struct {
13685	autorest.Response `json:"-"`
13686	// Value - A list of ip configurations.
13687	Value *[]InterfaceIPConfiguration `json:"value,omitempty"`
13688	// NextLink - READ-ONLY; The URL to get the next set of results.
13689	NextLink *string `json:"nextLink,omitempty"`
13690}
13691
13692// MarshalJSON is the custom marshaler for InterfaceIPConfigurationListResult.
13693func (iiclr InterfaceIPConfigurationListResult) MarshalJSON() ([]byte, error) {
13694	objectMap := make(map[string]interface{})
13695	if iiclr.Value != nil {
13696		objectMap["value"] = iiclr.Value
13697	}
13698	return json.Marshal(objectMap)
13699}
13700
13701// InterfaceIPConfigurationListResultIterator provides access to a complete listing of
13702// InterfaceIPConfiguration values.
13703type InterfaceIPConfigurationListResultIterator struct {
13704	i    int
13705	page InterfaceIPConfigurationListResultPage
13706}
13707
13708// NextWithContext advances to the next value.  If there was an error making
13709// the request the iterator does not advance and the error is returned.
13710func (iter *InterfaceIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
13711	if tracing.IsEnabled() {
13712		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultIterator.NextWithContext")
13713		defer func() {
13714			sc := -1
13715			if iter.Response().Response.Response != nil {
13716				sc = iter.Response().Response.Response.StatusCode
13717			}
13718			tracing.EndSpan(ctx, sc, err)
13719		}()
13720	}
13721	iter.i++
13722	if iter.i < len(iter.page.Values()) {
13723		return nil
13724	}
13725	err = iter.page.NextWithContext(ctx)
13726	if err != nil {
13727		iter.i--
13728		return err
13729	}
13730	iter.i = 0
13731	return nil
13732}
13733
13734// Next advances to the next value.  If there was an error making
13735// the request the iterator does not advance and the error is returned.
13736// Deprecated: Use NextWithContext() instead.
13737func (iter *InterfaceIPConfigurationListResultIterator) Next() error {
13738	return iter.NextWithContext(context.Background())
13739}
13740
13741// NotDone returns true if the enumeration should be started or is not yet complete.
13742func (iter InterfaceIPConfigurationListResultIterator) NotDone() bool {
13743	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13744}
13745
13746// Response returns the raw server response from the last page request.
13747func (iter InterfaceIPConfigurationListResultIterator) Response() InterfaceIPConfigurationListResult {
13748	return iter.page.Response()
13749}
13750
13751// Value returns the current value or a zero-initialized value if the
13752// iterator has advanced beyond the end of the collection.
13753func (iter InterfaceIPConfigurationListResultIterator) Value() InterfaceIPConfiguration {
13754	if !iter.page.NotDone() {
13755		return InterfaceIPConfiguration{}
13756	}
13757	return iter.page.Values()[iter.i]
13758}
13759
13760// Creates a new instance of the InterfaceIPConfigurationListResultIterator type.
13761func NewInterfaceIPConfigurationListResultIterator(page InterfaceIPConfigurationListResultPage) InterfaceIPConfigurationListResultIterator {
13762	return InterfaceIPConfigurationListResultIterator{page: page}
13763}
13764
13765// IsEmpty returns true if the ListResult contains no values.
13766func (iiclr InterfaceIPConfigurationListResult) IsEmpty() bool {
13767	return iiclr.Value == nil || len(*iiclr.Value) == 0
13768}
13769
13770// hasNextLink returns true if the NextLink is not empty.
13771func (iiclr InterfaceIPConfigurationListResult) hasNextLink() bool {
13772	return iiclr.NextLink != nil && len(*iiclr.NextLink) != 0
13773}
13774
13775// interfaceIPConfigurationListResultPreparer prepares a request to retrieve the next set of results.
13776// It returns nil if no more results exist.
13777func (iiclr InterfaceIPConfigurationListResult) interfaceIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
13778	if !iiclr.hasNextLink() {
13779		return nil, nil
13780	}
13781	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13782		autorest.AsJSON(),
13783		autorest.AsGet(),
13784		autorest.WithBaseURL(to.String(iiclr.NextLink)))
13785}
13786
13787// InterfaceIPConfigurationListResultPage contains a page of InterfaceIPConfiguration values.
13788type InterfaceIPConfigurationListResultPage struct {
13789	fn    func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)
13790	iiclr InterfaceIPConfigurationListResult
13791}
13792
13793// NextWithContext advances to the next page of values.  If there was an error making
13794// the request the page does not advance and the error is returned.
13795func (page *InterfaceIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
13796	if tracing.IsEnabled() {
13797		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultPage.NextWithContext")
13798		defer func() {
13799			sc := -1
13800			if page.Response().Response.Response != nil {
13801				sc = page.Response().Response.Response.StatusCode
13802			}
13803			tracing.EndSpan(ctx, sc, err)
13804		}()
13805	}
13806	for {
13807		next, err := page.fn(ctx, page.iiclr)
13808		if err != nil {
13809			return err
13810		}
13811		page.iiclr = next
13812		if !next.hasNextLink() || !next.IsEmpty() {
13813			break
13814		}
13815	}
13816	return nil
13817}
13818
13819// Next advances to the next page of values.  If there was an error making
13820// the request the page does not advance and the error is returned.
13821// Deprecated: Use NextWithContext() instead.
13822func (page *InterfaceIPConfigurationListResultPage) Next() error {
13823	return page.NextWithContext(context.Background())
13824}
13825
13826// NotDone returns true if the page enumeration should be started or is not yet complete.
13827func (page InterfaceIPConfigurationListResultPage) NotDone() bool {
13828	return !page.iiclr.IsEmpty()
13829}
13830
13831// Response returns the raw server response from the last page request.
13832func (page InterfaceIPConfigurationListResultPage) Response() InterfaceIPConfigurationListResult {
13833	return page.iiclr
13834}
13835
13836// Values returns the slice of values for the current page or nil if there are no values.
13837func (page InterfaceIPConfigurationListResultPage) Values() []InterfaceIPConfiguration {
13838	if page.iiclr.IsEmpty() {
13839		return nil
13840	}
13841	return *page.iiclr.Value
13842}
13843
13844// Creates a new instance of the InterfaceIPConfigurationListResultPage type.
13845func NewInterfaceIPConfigurationListResultPage(cur InterfaceIPConfigurationListResult, getNextPage func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)) InterfaceIPConfigurationListResultPage {
13846	return InterfaceIPConfigurationListResultPage{
13847		fn:    getNextPage,
13848		iiclr: cur,
13849	}
13850}
13851
13852// InterfaceIPConfigurationPropertiesFormat properties of IP configuration.
13853type InterfaceIPConfigurationPropertiesFormat struct {
13854	// VirtualNetworkTaps - The reference to Virtual Network Taps.
13855	VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"`
13856	// ApplicationGatewayBackendAddressPools - The reference of ApplicationGatewayBackendAddressPool resource.
13857	ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"`
13858	// LoadBalancerBackendAddressPools - The reference of LoadBalancerBackendAddressPool resource.
13859	LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"`
13860	// LoadBalancerInboundNatRules - A list of references of LoadBalancerInboundNatRules.
13861	LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"`
13862	// PrivateIPAddress - Private IP address of the IP configuration.
13863	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
13864	// PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'Static', 'Dynamic'
13865	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
13866	// 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'
13867	PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
13868	// Subnet - Subnet bound to the IP configuration.
13869	Subnet *Subnet `json:"subnet,omitempty"`
13870	// Primary - Gets whether this is a primary customer address on the network interface.
13871	Primary *bool `json:"primary,omitempty"`
13872	// PublicIPAddress - Public IP address bound to the IP configuration.
13873	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
13874	// ApplicationSecurityGroups - Application security groups in which the IP configuration is included.
13875	ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"`
13876	// ProvisioningState - The provisioning state of the network interface IP configuration. Possible values are: 'Updating', 'Deleting', and 'Failed'.
13877	ProvisioningState *string `json:"provisioningState,omitempty"`
13878}
13879
13880// InterfaceListResult response for the ListNetworkInterface API service call.
13881type InterfaceListResult struct {
13882	autorest.Response `json:"-"`
13883	// Value - A list of network interfaces in a resource group.
13884	Value *[]Interface `json:"value,omitempty"`
13885	// NextLink - READ-ONLY; The URL to get the next set of results.
13886	NextLink *string `json:"nextLink,omitempty"`
13887}
13888
13889// MarshalJSON is the custom marshaler for InterfaceListResult.
13890func (ilr InterfaceListResult) MarshalJSON() ([]byte, error) {
13891	objectMap := make(map[string]interface{})
13892	if ilr.Value != nil {
13893		objectMap["value"] = ilr.Value
13894	}
13895	return json.Marshal(objectMap)
13896}
13897
13898// InterfaceListResultIterator provides access to a complete listing of Interface values.
13899type InterfaceListResultIterator struct {
13900	i    int
13901	page InterfaceListResultPage
13902}
13903
13904// NextWithContext advances to the next value.  If there was an error making
13905// the request the iterator does not advance and the error is returned.
13906func (iter *InterfaceListResultIterator) NextWithContext(ctx context.Context) (err error) {
13907	if tracing.IsEnabled() {
13908		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultIterator.NextWithContext")
13909		defer func() {
13910			sc := -1
13911			if iter.Response().Response.Response != nil {
13912				sc = iter.Response().Response.Response.StatusCode
13913			}
13914			tracing.EndSpan(ctx, sc, err)
13915		}()
13916	}
13917	iter.i++
13918	if iter.i < len(iter.page.Values()) {
13919		return nil
13920	}
13921	err = iter.page.NextWithContext(ctx)
13922	if err != nil {
13923		iter.i--
13924		return err
13925	}
13926	iter.i = 0
13927	return nil
13928}
13929
13930// Next advances to the next value.  If there was an error making
13931// the request the iterator does not advance and the error is returned.
13932// Deprecated: Use NextWithContext() instead.
13933func (iter *InterfaceListResultIterator) Next() error {
13934	return iter.NextWithContext(context.Background())
13935}
13936
13937// NotDone returns true if the enumeration should be started or is not yet complete.
13938func (iter InterfaceListResultIterator) NotDone() bool {
13939	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13940}
13941
13942// Response returns the raw server response from the last page request.
13943func (iter InterfaceListResultIterator) Response() InterfaceListResult {
13944	return iter.page.Response()
13945}
13946
13947// Value returns the current value or a zero-initialized value if the
13948// iterator has advanced beyond the end of the collection.
13949func (iter InterfaceListResultIterator) Value() Interface {
13950	if !iter.page.NotDone() {
13951		return Interface{}
13952	}
13953	return iter.page.Values()[iter.i]
13954}
13955
13956// Creates a new instance of the InterfaceListResultIterator type.
13957func NewInterfaceListResultIterator(page InterfaceListResultPage) InterfaceListResultIterator {
13958	return InterfaceListResultIterator{page: page}
13959}
13960
13961// IsEmpty returns true if the ListResult contains no values.
13962func (ilr InterfaceListResult) IsEmpty() bool {
13963	return ilr.Value == nil || len(*ilr.Value) == 0
13964}
13965
13966// hasNextLink returns true if the NextLink is not empty.
13967func (ilr InterfaceListResult) hasNextLink() bool {
13968	return ilr.NextLink != nil && len(*ilr.NextLink) != 0
13969}
13970
13971// interfaceListResultPreparer prepares a request to retrieve the next set of results.
13972// It returns nil if no more results exist.
13973func (ilr InterfaceListResult) interfaceListResultPreparer(ctx context.Context) (*http.Request, error) {
13974	if !ilr.hasNextLink() {
13975		return nil, nil
13976	}
13977	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13978		autorest.AsJSON(),
13979		autorest.AsGet(),
13980		autorest.WithBaseURL(to.String(ilr.NextLink)))
13981}
13982
13983// InterfaceListResultPage contains a page of Interface values.
13984type InterfaceListResultPage struct {
13985	fn  func(context.Context, InterfaceListResult) (InterfaceListResult, error)
13986	ilr InterfaceListResult
13987}
13988
13989// NextWithContext advances to the next page of values.  If there was an error making
13990// the request the page does not advance and the error is returned.
13991func (page *InterfaceListResultPage) NextWithContext(ctx context.Context) (err error) {
13992	if tracing.IsEnabled() {
13993		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultPage.NextWithContext")
13994		defer func() {
13995			sc := -1
13996			if page.Response().Response.Response != nil {
13997				sc = page.Response().Response.Response.StatusCode
13998			}
13999			tracing.EndSpan(ctx, sc, err)
14000		}()
14001	}
14002	for {
14003		next, err := page.fn(ctx, page.ilr)
14004		if err != nil {
14005			return err
14006		}
14007		page.ilr = next
14008		if !next.hasNextLink() || !next.IsEmpty() {
14009			break
14010		}
14011	}
14012	return nil
14013}
14014
14015// Next advances to the next page of values.  If there was an error making
14016// the request the page does not advance and the error is returned.
14017// Deprecated: Use NextWithContext() instead.
14018func (page *InterfaceListResultPage) Next() error {
14019	return page.NextWithContext(context.Background())
14020}
14021
14022// NotDone returns true if the page enumeration should be started or is not yet complete.
14023func (page InterfaceListResultPage) NotDone() bool {
14024	return !page.ilr.IsEmpty()
14025}
14026
14027// Response returns the raw server response from the last page request.
14028func (page InterfaceListResultPage) Response() InterfaceListResult {
14029	return page.ilr
14030}
14031
14032// Values returns the slice of values for the current page or nil if there are no values.
14033func (page InterfaceListResultPage) Values() []Interface {
14034	if page.ilr.IsEmpty() {
14035		return nil
14036	}
14037	return *page.ilr.Value
14038}
14039
14040// Creates a new instance of the InterfaceListResultPage type.
14041func NewInterfaceListResultPage(cur InterfaceListResult, getNextPage func(context.Context, InterfaceListResult) (InterfaceListResult, error)) InterfaceListResultPage {
14042	return InterfaceListResultPage{
14043		fn:  getNextPage,
14044		ilr: cur,
14045	}
14046}
14047
14048// InterfaceLoadBalancerListResult response for list ip configurations API service call.
14049type InterfaceLoadBalancerListResult struct {
14050	autorest.Response `json:"-"`
14051	// Value - A list of load balancers.
14052	Value *[]LoadBalancer `json:"value,omitempty"`
14053	// NextLink - READ-ONLY; The URL to get the next set of results.
14054	NextLink *string `json:"nextLink,omitempty"`
14055}
14056
14057// MarshalJSON is the custom marshaler for InterfaceLoadBalancerListResult.
14058func (ilblr InterfaceLoadBalancerListResult) MarshalJSON() ([]byte, error) {
14059	objectMap := make(map[string]interface{})
14060	if ilblr.Value != nil {
14061		objectMap["value"] = ilblr.Value
14062	}
14063	return json.Marshal(objectMap)
14064}
14065
14066// InterfaceLoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values.
14067type InterfaceLoadBalancerListResultIterator struct {
14068	i    int
14069	page InterfaceLoadBalancerListResultPage
14070}
14071
14072// NextWithContext advances to the next value.  If there was an error making
14073// the request the iterator does not advance and the error is returned.
14074func (iter *InterfaceLoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) {
14075	if tracing.IsEnabled() {
14076		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultIterator.NextWithContext")
14077		defer func() {
14078			sc := -1
14079			if iter.Response().Response.Response != nil {
14080				sc = iter.Response().Response.Response.StatusCode
14081			}
14082			tracing.EndSpan(ctx, sc, err)
14083		}()
14084	}
14085	iter.i++
14086	if iter.i < len(iter.page.Values()) {
14087		return nil
14088	}
14089	err = iter.page.NextWithContext(ctx)
14090	if err != nil {
14091		iter.i--
14092		return err
14093	}
14094	iter.i = 0
14095	return nil
14096}
14097
14098// Next advances to the next value.  If there was an error making
14099// the request the iterator does not advance and the error is returned.
14100// Deprecated: Use NextWithContext() instead.
14101func (iter *InterfaceLoadBalancerListResultIterator) Next() error {
14102	return iter.NextWithContext(context.Background())
14103}
14104
14105// NotDone returns true if the enumeration should be started or is not yet complete.
14106func (iter InterfaceLoadBalancerListResultIterator) NotDone() bool {
14107	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14108}
14109
14110// Response returns the raw server response from the last page request.
14111func (iter InterfaceLoadBalancerListResultIterator) Response() InterfaceLoadBalancerListResult {
14112	return iter.page.Response()
14113}
14114
14115// Value returns the current value or a zero-initialized value if the
14116// iterator has advanced beyond the end of the collection.
14117func (iter InterfaceLoadBalancerListResultIterator) Value() LoadBalancer {
14118	if !iter.page.NotDone() {
14119		return LoadBalancer{}
14120	}
14121	return iter.page.Values()[iter.i]
14122}
14123
14124// Creates a new instance of the InterfaceLoadBalancerListResultIterator type.
14125func NewInterfaceLoadBalancerListResultIterator(page InterfaceLoadBalancerListResultPage) InterfaceLoadBalancerListResultIterator {
14126	return InterfaceLoadBalancerListResultIterator{page: page}
14127}
14128
14129// IsEmpty returns true if the ListResult contains no values.
14130func (ilblr InterfaceLoadBalancerListResult) IsEmpty() bool {
14131	return ilblr.Value == nil || len(*ilblr.Value) == 0
14132}
14133
14134// hasNextLink returns true if the NextLink is not empty.
14135func (ilblr InterfaceLoadBalancerListResult) hasNextLink() bool {
14136	return ilblr.NextLink != nil && len(*ilblr.NextLink) != 0
14137}
14138
14139// interfaceLoadBalancerListResultPreparer prepares a request to retrieve the next set of results.
14140// It returns nil if no more results exist.
14141func (ilblr InterfaceLoadBalancerListResult) interfaceLoadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) {
14142	if !ilblr.hasNextLink() {
14143		return nil, nil
14144	}
14145	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14146		autorest.AsJSON(),
14147		autorest.AsGet(),
14148		autorest.WithBaseURL(to.String(ilblr.NextLink)))
14149}
14150
14151// InterfaceLoadBalancerListResultPage contains a page of LoadBalancer values.
14152type InterfaceLoadBalancerListResultPage struct {
14153	fn    func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)
14154	ilblr InterfaceLoadBalancerListResult
14155}
14156
14157// NextWithContext advances to the next page of values.  If there was an error making
14158// the request the page does not advance and the error is returned.
14159func (page *InterfaceLoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) {
14160	if tracing.IsEnabled() {
14161		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultPage.NextWithContext")
14162		defer func() {
14163			sc := -1
14164			if page.Response().Response.Response != nil {
14165				sc = page.Response().Response.Response.StatusCode
14166			}
14167			tracing.EndSpan(ctx, sc, err)
14168		}()
14169	}
14170	for {
14171		next, err := page.fn(ctx, page.ilblr)
14172		if err != nil {
14173			return err
14174		}
14175		page.ilblr = next
14176		if !next.hasNextLink() || !next.IsEmpty() {
14177			break
14178		}
14179	}
14180	return nil
14181}
14182
14183// Next advances to the next page of values.  If there was an error making
14184// the request the page does not advance and the error is returned.
14185// Deprecated: Use NextWithContext() instead.
14186func (page *InterfaceLoadBalancerListResultPage) Next() error {
14187	return page.NextWithContext(context.Background())
14188}
14189
14190// NotDone returns true if the page enumeration should be started or is not yet complete.
14191func (page InterfaceLoadBalancerListResultPage) NotDone() bool {
14192	return !page.ilblr.IsEmpty()
14193}
14194
14195// Response returns the raw server response from the last page request.
14196func (page InterfaceLoadBalancerListResultPage) Response() InterfaceLoadBalancerListResult {
14197	return page.ilblr
14198}
14199
14200// Values returns the slice of values for the current page or nil if there are no values.
14201func (page InterfaceLoadBalancerListResultPage) Values() []LoadBalancer {
14202	if page.ilblr.IsEmpty() {
14203		return nil
14204	}
14205	return *page.ilblr.Value
14206}
14207
14208// Creates a new instance of the InterfaceLoadBalancerListResultPage type.
14209func NewInterfaceLoadBalancerListResultPage(cur InterfaceLoadBalancerListResult, getNextPage func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)) InterfaceLoadBalancerListResultPage {
14210	return InterfaceLoadBalancerListResultPage{
14211		fn:    getNextPage,
14212		ilblr: cur,
14213	}
14214}
14215
14216// InterfacePropertiesFormat networkInterface properties.
14217type InterfacePropertiesFormat struct {
14218	// VirtualMachine - READ-ONLY; The reference of a virtual machine.
14219	VirtualMachine *SubResource `json:"virtualMachine,omitempty"`
14220	// NetworkSecurityGroup - The reference of the NetworkSecurityGroup resource.
14221	NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"`
14222	// PrivateEndpoint - READ-ONLY; A reference to the private endpoint to which the network interface is linked.
14223	PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"`
14224	// IPConfigurations - A list of IPConfigurations of the network interface.
14225	IPConfigurations *[]InterfaceIPConfiguration `json:"ipConfigurations,omitempty"`
14226	// TapConfigurations - A list of TapConfigurations of the network interface.
14227	TapConfigurations *[]InterfaceTapConfiguration `json:"tapConfigurations,omitempty"`
14228	// DNSSettings - The DNS settings in network interface.
14229	DNSSettings *InterfaceDNSSettings `json:"dnsSettings,omitempty"`
14230	// MacAddress - The MAC address of the network interface.
14231	MacAddress *string `json:"macAddress,omitempty"`
14232	// Primary - Gets whether this is a primary network interface on a virtual machine.
14233	Primary *bool `json:"primary,omitempty"`
14234	// EnableAcceleratedNetworking - If the network interface is accelerated networking enabled.
14235	EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"`
14236	// EnableIPForwarding - Indicates whether IP forwarding is enabled on this network interface.
14237	EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"`
14238	// HostedWorkloads - READ-ONLY; A list of references to linked BareMetal resources.
14239	HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"`
14240	// ResourceGUID - The resource GUID property of the network interface resource.
14241	ResourceGUID *string `json:"resourceGuid,omitempty"`
14242	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
14243	ProvisioningState *string `json:"provisioningState,omitempty"`
14244}
14245
14246// MarshalJSON is the custom marshaler for InterfacePropertiesFormat.
14247func (ipf InterfacePropertiesFormat) MarshalJSON() ([]byte, error) {
14248	objectMap := make(map[string]interface{})
14249	if ipf.NetworkSecurityGroup != nil {
14250		objectMap["networkSecurityGroup"] = ipf.NetworkSecurityGroup
14251	}
14252	if ipf.IPConfigurations != nil {
14253		objectMap["ipConfigurations"] = ipf.IPConfigurations
14254	}
14255	if ipf.TapConfigurations != nil {
14256		objectMap["tapConfigurations"] = ipf.TapConfigurations
14257	}
14258	if ipf.DNSSettings != nil {
14259		objectMap["dnsSettings"] = ipf.DNSSettings
14260	}
14261	if ipf.MacAddress != nil {
14262		objectMap["macAddress"] = ipf.MacAddress
14263	}
14264	if ipf.Primary != nil {
14265		objectMap["primary"] = ipf.Primary
14266	}
14267	if ipf.EnableAcceleratedNetworking != nil {
14268		objectMap["enableAcceleratedNetworking"] = ipf.EnableAcceleratedNetworking
14269	}
14270	if ipf.EnableIPForwarding != nil {
14271		objectMap["enableIPForwarding"] = ipf.EnableIPForwarding
14272	}
14273	if ipf.ResourceGUID != nil {
14274		objectMap["resourceGuid"] = ipf.ResourceGUID
14275	}
14276	if ipf.ProvisioningState != nil {
14277		objectMap["provisioningState"] = ipf.ProvisioningState
14278	}
14279	return json.Marshal(objectMap)
14280}
14281
14282// InterfacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
14283// long-running operation.
14284type InterfacesCreateOrUpdateFuture struct {
14285	azure.FutureAPI
14286	// Result returns the result of the asynchronous operation.
14287	// If the operation has not completed it will return an error.
14288	Result func(InterfacesClient) (Interface, error)
14289}
14290
14291// InterfacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
14292// operation.
14293type InterfacesDeleteFuture struct {
14294	azure.FutureAPI
14295	// Result returns the result of the asynchronous operation.
14296	// If the operation has not completed it will return an error.
14297	Result func(InterfacesClient) (autorest.Response, error)
14298}
14299
14300// InterfacesGetEffectiveRouteTableFuture an abstraction for monitoring and retrieving the results of a
14301// long-running operation.
14302type InterfacesGetEffectiveRouteTableFuture struct {
14303	azure.FutureAPI
14304	// Result returns the result of the asynchronous operation.
14305	// If the operation has not completed it will return an error.
14306	Result func(InterfacesClient) (EffectiveRouteListResult, error)
14307}
14308
14309// InterfacesListEffectiveNetworkSecurityGroupsFuture an abstraction for monitoring and retrieving the
14310// results of a long-running operation.
14311type InterfacesListEffectiveNetworkSecurityGroupsFuture struct {
14312	azure.FutureAPI
14313	// Result returns the result of the asynchronous operation.
14314	// If the operation has not completed it will return an error.
14315	Result func(InterfacesClient) (EffectiveNetworkSecurityGroupListResult, error)
14316}
14317
14318// InterfacesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
14319// operation.
14320type InterfacesUpdateTagsFuture struct {
14321	azure.FutureAPI
14322	// Result returns the result of the asynchronous operation.
14323	// If the operation has not completed it will return an error.
14324	Result func(InterfacesClient) (Interface, error)
14325}
14326
14327// InterfaceTapConfiguration tap configuration in a Network Interface.
14328type InterfaceTapConfiguration struct {
14329	autorest.Response `json:"-"`
14330	// InterfaceTapConfigurationPropertiesFormat - Properties of the Virtual Network Tap configuration.
14331	*InterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"`
14332	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
14333	Name *string `json:"name,omitempty"`
14334	// Etag - A unique read-only string that changes whenever the resource is updated.
14335	Etag *string `json:"etag,omitempty"`
14336	// Type - READ-ONLY; Sub Resource type.
14337	Type *string `json:"type,omitempty"`
14338	// ID - Resource ID.
14339	ID *string `json:"id,omitempty"`
14340}
14341
14342// MarshalJSON is the custom marshaler for InterfaceTapConfiguration.
14343func (itc InterfaceTapConfiguration) MarshalJSON() ([]byte, error) {
14344	objectMap := make(map[string]interface{})
14345	if itc.InterfaceTapConfigurationPropertiesFormat != nil {
14346		objectMap["properties"] = itc.InterfaceTapConfigurationPropertiesFormat
14347	}
14348	if itc.Name != nil {
14349		objectMap["name"] = itc.Name
14350	}
14351	if itc.Etag != nil {
14352		objectMap["etag"] = itc.Etag
14353	}
14354	if itc.ID != nil {
14355		objectMap["id"] = itc.ID
14356	}
14357	return json.Marshal(objectMap)
14358}
14359
14360// UnmarshalJSON is the custom unmarshaler for InterfaceTapConfiguration struct.
14361func (itc *InterfaceTapConfiguration) UnmarshalJSON(body []byte) error {
14362	var m map[string]*json.RawMessage
14363	err := json.Unmarshal(body, &m)
14364	if err != nil {
14365		return err
14366	}
14367	for k, v := range m {
14368		switch k {
14369		case "properties":
14370			if v != nil {
14371				var interfaceTapConfigurationPropertiesFormat InterfaceTapConfigurationPropertiesFormat
14372				err = json.Unmarshal(*v, &interfaceTapConfigurationPropertiesFormat)
14373				if err != nil {
14374					return err
14375				}
14376				itc.InterfaceTapConfigurationPropertiesFormat = &interfaceTapConfigurationPropertiesFormat
14377			}
14378		case "name":
14379			if v != nil {
14380				var name string
14381				err = json.Unmarshal(*v, &name)
14382				if err != nil {
14383					return err
14384				}
14385				itc.Name = &name
14386			}
14387		case "etag":
14388			if v != nil {
14389				var etag string
14390				err = json.Unmarshal(*v, &etag)
14391				if err != nil {
14392					return err
14393				}
14394				itc.Etag = &etag
14395			}
14396		case "type":
14397			if v != nil {
14398				var typeVar string
14399				err = json.Unmarshal(*v, &typeVar)
14400				if err != nil {
14401					return err
14402				}
14403				itc.Type = &typeVar
14404			}
14405		case "id":
14406			if v != nil {
14407				var ID string
14408				err = json.Unmarshal(*v, &ID)
14409				if err != nil {
14410					return err
14411				}
14412				itc.ID = &ID
14413			}
14414		}
14415	}
14416
14417	return nil
14418}
14419
14420// InterfaceTapConfigurationListResult response for list tap configurations API service call.
14421type InterfaceTapConfigurationListResult struct {
14422	autorest.Response `json:"-"`
14423	// Value - A list of tap configurations.
14424	Value *[]InterfaceTapConfiguration `json:"value,omitempty"`
14425	// NextLink - READ-ONLY; The URL to get the next set of results.
14426	NextLink *string `json:"nextLink,omitempty"`
14427}
14428
14429// MarshalJSON is the custom marshaler for InterfaceTapConfigurationListResult.
14430func (itclr InterfaceTapConfigurationListResult) MarshalJSON() ([]byte, error) {
14431	objectMap := make(map[string]interface{})
14432	if itclr.Value != nil {
14433		objectMap["value"] = itclr.Value
14434	}
14435	return json.Marshal(objectMap)
14436}
14437
14438// InterfaceTapConfigurationListResultIterator provides access to a complete listing of
14439// InterfaceTapConfiguration values.
14440type InterfaceTapConfigurationListResultIterator struct {
14441	i    int
14442	page InterfaceTapConfigurationListResultPage
14443}
14444
14445// NextWithContext advances to the next value.  If there was an error making
14446// the request the iterator does not advance and the error is returned.
14447func (iter *InterfaceTapConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
14448	if tracing.IsEnabled() {
14449		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationListResultIterator.NextWithContext")
14450		defer func() {
14451			sc := -1
14452			if iter.Response().Response.Response != nil {
14453				sc = iter.Response().Response.Response.StatusCode
14454			}
14455			tracing.EndSpan(ctx, sc, err)
14456		}()
14457	}
14458	iter.i++
14459	if iter.i < len(iter.page.Values()) {
14460		return nil
14461	}
14462	err = iter.page.NextWithContext(ctx)
14463	if err != nil {
14464		iter.i--
14465		return err
14466	}
14467	iter.i = 0
14468	return nil
14469}
14470
14471// Next advances to the next value.  If there was an error making
14472// the request the iterator does not advance and the error is returned.
14473// Deprecated: Use NextWithContext() instead.
14474func (iter *InterfaceTapConfigurationListResultIterator) Next() error {
14475	return iter.NextWithContext(context.Background())
14476}
14477
14478// NotDone returns true if the enumeration should be started or is not yet complete.
14479func (iter InterfaceTapConfigurationListResultIterator) NotDone() bool {
14480	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14481}
14482
14483// Response returns the raw server response from the last page request.
14484func (iter InterfaceTapConfigurationListResultIterator) Response() InterfaceTapConfigurationListResult {
14485	return iter.page.Response()
14486}
14487
14488// Value returns the current value or a zero-initialized value if the
14489// iterator has advanced beyond the end of the collection.
14490func (iter InterfaceTapConfigurationListResultIterator) Value() InterfaceTapConfiguration {
14491	if !iter.page.NotDone() {
14492		return InterfaceTapConfiguration{}
14493	}
14494	return iter.page.Values()[iter.i]
14495}
14496
14497// Creates a new instance of the InterfaceTapConfigurationListResultIterator type.
14498func NewInterfaceTapConfigurationListResultIterator(page InterfaceTapConfigurationListResultPage) InterfaceTapConfigurationListResultIterator {
14499	return InterfaceTapConfigurationListResultIterator{page: page}
14500}
14501
14502// IsEmpty returns true if the ListResult contains no values.
14503func (itclr InterfaceTapConfigurationListResult) IsEmpty() bool {
14504	return itclr.Value == nil || len(*itclr.Value) == 0
14505}
14506
14507// hasNextLink returns true if the NextLink is not empty.
14508func (itclr InterfaceTapConfigurationListResult) hasNextLink() bool {
14509	return itclr.NextLink != nil && len(*itclr.NextLink) != 0
14510}
14511
14512// interfaceTapConfigurationListResultPreparer prepares a request to retrieve the next set of results.
14513// It returns nil if no more results exist.
14514func (itclr InterfaceTapConfigurationListResult) interfaceTapConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
14515	if !itclr.hasNextLink() {
14516		return nil, nil
14517	}
14518	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14519		autorest.AsJSON(),
14520		autorest.AsGet(),
14521		autorest.WithBaseURL(to.String(itclr.NextLink)))
14522}
14523
14524// InterfaceTapConfigurationListResultPage contains a page of InterfaceTapConfiguration values.
14525type InterfaceTapConfigurationListResultPage struct {
14526	fn    func(context.Context, InterfaceTapConfigurationListResult) (InterfaceTapConfigurationListResult, error)
14527	itclr InterfaceTapConfigurationListResult
14528}
14529
14530// NextWithContext advances to the next page of values.  If there was an error making
14531// the request the page does not advance and the error is returned.
14532func (page *InterfaceTapConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
14533	if tracing.IsEnabled() {
14534		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationListResultPage.NextWithContext")
14535		defer func() {
14536			sc := -1
14537			if page.Response().Response.Response != nil {
14538				sc = page.Response().Response.Response.StatusCode
14539			}
14540			tracing.EndSpan(ctx, sc, err)
14541		}()
14542	}
14543	for {
14544		next, err := page.fn(ctx, page.itclr)
14545		if err != nil {
14546			return err
14547		}
14548		page.itclr = next
14549		if !next.hasNextLink() || !next.IsEmpty() {
14550			break
14551		}
14552	}
14553	return nil
14554}
14555
14556// Next advances to the next page of values.  If there was an error making
14557// the request the page does not advance and the error is returned.
14558// Deprecated: Use NextWithContext() instead.
14559func (page *InterfaceTapConfigurationListResultPage) Next() error {
14560	return page.NextWithContext(context.Background())
14561}
14562
14563// NotDone returns true if the page enumeration should be started or is not yet complete.
14564func (page InterfaceTapConfigurationListResultPage) NotDone() bool {
14565	return !page.itclr.IsEmpty()
14566}
14567
14568// Response returns the raw server response from the last page request.
14569func (page InterfaceTapConfigurationListResultPage) Response() InterfaceTapConfigurationListResult {
14570	return page.itclr
14571}
14572
14573// Values returns the slice of values for the current page or nil if there are no values.
14574func (page InterfaceTapConfigurationListResultPage) Values() []InterfaceTapConfiguration {
14575	if page.itclr.IsEmpty() {
14576		return nil
14577	}
14578	return *page.itclr.Value
14579}
14580
14581// Creates a new instance of the InterfaceTapConfigurationListResultPage type.
14582func NewInterfaceTapConfigurationListResultPage(cur InterfaceTapConfigurationListResult, getNextPage func(context.Context, InterfaceTapConfigurationListResult) (InterfaceTapConfigurationListResult, error)) InterfaceTapConfigurationListResultPage {
14583	return InterfaceTapConfigurationListResultPage{
14584		fn:    getNextPage,
14585		itclr: cur,
14586	}
14587}
14588
14589// InterfaceTapConfigurationPropertiesFormat properties of Virtual Network Tap configuration.
14590type InterfaceTapConfigurationPropertiesFormat struct {
14591	// VirtualNetworkTap - The reference of the Virtual Network Tap resource.
14592	VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"`
14593	// ProvisioningState - READ-ONLY; The provisioning state of the network interface tap configuration. Possible values are: 'Updating', 'Deleting', and 'Failed'.
14594	ProvisioningState *string `json:"provisioningState,omitempty"`
14595}
14596
14597// MarshalJSON is the custom marshaler for InterfaceTapConfigurationPropertiesFormat.
14598func (itcpf InterfaceTapConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
14599	objectMap := make(map[string]interface{})
14600	if itcpf.VirtualNetworkTap != nil {
14601		objectMap["virtualNetworkTap"] = itcpf.VirtualNetworkTap
14602	}
14603	return json.Marshal(objectMap)
14604}
14605
14606// InterfaceTapConfigurationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
14607// of a long-running operation.
14608type InterfaceTapConfigurationsCreateOrUpdateFuture struct {
14609	azure.FutureAPI
14610	// Result returns the result of the asynchronous operation.
14611	// If the operation has not completed it will return an error.
14612	Result func(InterfaceTapConfigurationsClient) (InterfaceTapConfiguration, error)
14613}
14614
14615// InterfaceTapConfigurationsDeleteFuture an abstraction for monitoring and retrieving the results of a
14616// long-running operation.
14617type InterfaceTapConfigurationsDeleteFuture struct {
14618	azure.FutureAPI
14619	// Result returns the result of the asynchronous operation.
14620	// If the operation has not completed it will return an error.
14621	Result func(InterfaceTapConfigurationsClient) (autorest.Response, error)
14622}
14623
14624// IPAddressAvailabilityResult response for CheckIPAddressAvailability API service call.
14625type IPAddressAvailabilityResult struct {
14626	autorest.Response `json:"-"`
14627	// Available - Private IP address availability.
14628	Available *bool `json:"available,omitempty"`
14629	// AvailableIPAddresses - Contains other available private IP addresses if the asked for address is taken.
14630	AvailableIPAddresses *[]string `json:"availableIPAddresses,omitempty"`
14631}
14632
14633// IPConfiguration IP configuration.
14634type IPConfiguration struct {
14635	// IPConfigurationPropertiesFormat - Properties of the IP configuration.
14636	*IPConfigurationPropertiesFormat `json:"properties,omitempty"`
14637	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
14638	Name *string `json:"name,omitempty"`
14639	// Etag - A unique read-only string that changes whenever the resource is updated.
14640	Etag *string `json:"etag,omitempty"`
14641	// ID - Resource ID.
14642	ID *string `json:"id,omitempty"`
14643}
14644
14645// MarshalJSON is the custom marshaler for IPConfiguration.
14646func (ic IPConfiguration) MarshalJSON() ([]byte, error) {
14647	objectMap := make(map[string]interface{})
14648	if ic.IPConfigurationPropertiesFormat != nil {
14649		objectMap["properties"] = ic.IPConfigurationPropertiesFormat
14650	}
14651	if ic.Name != nil {
14652		objectMap["name"] = ic.Name
14653	}
14654	if ic.Etag != nil {
14655		objectMap["etag"] = ic.Etag
14656	}
14657	if ic.ID != nil {
14658		objectMap["id"] = ic.ID
14659	}
14660	return json.Marshal(objectMap)
14661}
14662
14663// UnmarshalJSON is the custom unmarshaler for IPConfiguration struct.
14664func (ic *IPConfiguration) UnmarshalJSON(body []byte) error {
14665	var m map[string]*json.RawMessage
14666	err := json.Unmarshal(body, &m)
14667	if err != nil {
14668		return err
14669	}
14670	for k, v := range m {
14671		switch k {
14672		case "properties":
14673			if v != nil {
14674				var IPConfigurationPropertiesFormat IPConfigurationPropertiesFormat
14675				err = json.Unmarshal(*v, &IPConfigurationPropertiesFormat)
14676				if err != nil {
14677					return err
14678				}
14679				ic.IPConfigurationPropertiesFormat = &IPConfigurationPropertiesFormat
14680			}
14681		case "name":
14682			if v != nil {
14683				var name string
14684				err = json.Unmarshal(*v, &name)
14685				if err != nil {
14686					return err
14687				}
14688				ic.Name = &name
14689			}
14690		case "etag":
14691			if v != nil {
14692				var etag string
14693				err = json.Unmarshal(*v, &etag)
14694				if err != nil {
14695					return err
14696				}
14697				ic.Etag = &etag
14698			}
14699		case "id":
14700			if v != nil {
14701				var ID string
14702				err = json.Unmarshal(*v, &ID)
14703				if err != nil {
14704					return err
14705				}
14706				ic.ID = &ID
14707			}
14708		}
14709	}
14710
14711	return nil
14712}
14713
14714// IPConfigurationProfile IP configuration profile child resource.
14715type IPConfigurationProfile struct {
14716	// IPConfigurationProfilePropertiesFormat - Properties of the IP configuration profile.
14717	*IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"`
14718	// Name - The name of the resource. This name can be used to access the resource.
14719	Name *string `json:"name,omitempty"`
14720	// Type - READ-ONLY; Sub Resource type.
14721	Type *string `json:"type,omitempty"`
14722	// Etag - A unique read-only string that changes whenever the resource is updated.
14723	Etag *string `json:"etag,omitempty"`
14724	// ID - Resource ID.
14725	ID *string `json:"id,omitempty"`
14726}
14727
14728// MarshalJSON is the custom marshaler for IPConfigurationProfile.
14729func (icp IPConfigurationProfile) MarshalJSON() ([]byte, error) {
14730	objectMap := make(map[string]interface{})
14731	if icp.IPConfigurationProfilePropertiesFormat != nil {
14732		objectMap["properties"] = icp.IPConfigurationProfilePropertiesFormat
14733	}
14734	if icp.Name != nil {
14735		objectMap["name"] = icp.Name
14736	}
14737	if icp.Etag != nil {
14738		objectMap["etag"] = icp.Etag
14739	}
14740	if icp.ID != nil {
14741		objectMap["id"] = icp.ID
14742	}
14743	return json.Marshal(objectMap)
14744}
14745
14746// UnmarshalJSON is the custom unmarshaler for IPConfigurationProfile struct.
14747func (icp *IPConfigurationProfile) UnmarshalJSON(body []byte) error {
14748	var m map[string]*json.RawMessage
14749	err := json.Unmarshal(body, &m)
14750	if err != nil {
14751		return err
14752	}
14753	for k, v := range m {
14754		switch k {
14755		case "properties":
14756			if v != nil {
14757				var IPConfigurationProfilePropertiesFormat IPConfigurationProfilePropertiesFormat
14758				err = json.Unmarshal(*v, &IPConfigurationProfilePropertiesFormat)
14759				if err != nil {
14760					return err
14761				}
14762				icp.IPConfigurationProfilePropertiesFormat = &IPConfigurationProfilePropertiesFormat
14763			}
14764		case "name":
14765			if v != nil {
14766				var name string
14767				err = json.Unmarshal(*v, &name)
14768				if err != nil {
14769					return err
14770				}
14771				icp.Name = &name
14772			}
14773		case "type":
14774			if v != nil {
14775				var typeVar string
14776				err = json.Unmarshal(*v, &typeVar)
14777				if err != nil {
14778					return err
14779				}
14780				icp.Type = &typeVar
14781			}
14782		case "etag":
14783			if v != nil {
14784				var etag string
14785				err = json.Unmarshal(*v, &etag)
14786				if err != nil {
14787					return err
14788				}
14789				icp.Etag = &etag
14790			}
14791		case "id":
14792			if v != nil {
14793				var ID string
14794				err = json.Unmarshal(*v, &ID)
14795				if err != nil {
14796					return err
14797				}
14798				icp.ID = &ID
14799			}
14800		}
14801	}
14802
14803	return nil
14804}
14805
14806// IPConfigurationProfilePropertiesFormat IP configuration profile properties.
14807type IPConfigurationProfilePropertiesFormat struct {
14808	// Subnet - The reference of the subnet resource to create a container network interface ip configuration.
14809	Subnet *Subnet `json:"subnet,omitempty"`
14810	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
14811	ProvisioningState *string `json:"provisioningState,omitempty"`
14812}
14813
14814// MarshalJSON is the custom marshaler for IPConfigurationProfilePropertiesFormat.
14815func (icppf IPConfigurationProfilePropertiesFormat) MarshalJSON() ([]byte, error) {
14816	objectMap := make(map[string]interface{})
14817	if icppf.Subnet != nil {
14818		objectMap["subnet"] = icppf.Subnet
14819	}
14820	return json.Marshal(objectMap)
14821}
14822
14823// IPConfigurationPropertiesFormat properties of IP configuration.
14824type IPConfigurationPropertiesFormat struct {
14825	// PrivateIPAddress - The private IP address of the IP configuration.
14826	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
14827	// PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'Static', 'Dynamic'
14828	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
14829	// Subnet - The reference of the subnet resource.
14830	Subnet *Subnet `json:"subnet,omitempty"`
14831	// PublicIPAddress - The reference of the public IP resource.
14832	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
14833	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
14834	ProvisioningState *string `json:"provisioningState,omitempty"`
14835}
14836
14837// IpsecPolicy an IPSec Policy configuration for a virtual network gateway connection.
14838type IpsecPolicy struct {
14839	// SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for a site to site VPN tunnel.
14840	SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"`
14841	// SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for a site to site VPN tunnel.
14842	SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"`
14843	// IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256'
14844	IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"`
14845	// IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256'
14846	IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"`
14847	// IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128'
14848	IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"`
14849	// IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'IkeIntegrityMD5', 'IkeIntegritySHA1', 'IkeIntegritySHA256', 'IkeIntegritySHA384', 'IkeIntegrityGCMAES256', 'IkeIntegrityGCMAES128'
14850	IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"`
14851	// DhGroup - The DH Group used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24'
14852	DhGroup DhGroup `json:"dhGroup,omitempty"`
14853	// 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'
14854	PfsGroup PfsGroup `json:"pfsGroup,omitempty"`
14855}
14856
14857// IPTag contains the IpTag associated with the object.
14858type IPTag struct {
14859	// IPTagType - Gets or sets the ipTag type: Example FirstPartyUsage.
14860	IPTagType *string `json:"ipTagType,omitempty"`
14861	// Tag - Gets or sets value of the IpTag associated with the public IP. Example SQL, Storage etc.
14862	Tag *string `json:"tag,omitempty"`
14863}
14864
14865// Ipv6ExpressRouteCircuitPeeringConfig contains IPv6 peering config.
14866type Ipv6ExpressRouteCircuitPeeringConfig struct {
14867	// PrimaryPeerAddressPrefix - The primary address prefix.
14868	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
14869	// SecondaryPeerAddressPrefix - The secondary address prefix.
14870	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
14871	// MicrosoftPeeringConfig - The Microsoft peering configuration.
14872	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
14873	// RouteFilter - The reference of the RouteFilter resource.
14874	RouteFilter *SubResource `json:"routeFilter,omitempty"`
14875	// State - The state of peering. Possible values include: 'ExpressRouteCircuitPeeringStateDisabled', 'ExpressRouteCircuitPeeringStateEnabled'
14876	State ExpressRouteCircuitPeeringState `json:"state,omitempty"`
14877}
14878
14879// ListHubVirtualNetworkConnectionsResult list of HubVirtualNetworkConnections and a URL nextLink to get
14880// the next set of results.
14881type ListHubVirtualNetworkConnectionsResult struct {
14882	autorest.Response `json:"-"`
14883	// Value - List of HubVirtualNetworkConnections.
14884	Value *[]HubVirtualNetworkConnection `json:"value,omitempty"`
14885	// NextLink - URL to get the next set of operation list results if there are any.
14886	NextLink *string `json:"nextLink,omitempty"`
14887}
14888
14889// ListHubVirtualNetworkConnectionsResultIterator provides access to a complete listing of
14890// HubVirtualNetworkConnection values.
14891type ListHubVirtualNetworkConnectionsResultIterator struct {
14892	i    int
14893	page ListHubVirtualNetworkConnectionsResultPage
14894}
14895
14896// NextWithContext advances to the next value.  If there was an error making
14897// the request the iterator does not advance and the error is returned.
14898func (iter *ListHubVirtualNetworkConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
14899	if tracing.IsEnabled() {
14900		ctx = tracing.StartSpan(ctx, fqdn+"/ListHubVirtualNetworkConnectionsResultIterator.NextWithContext")
14901		defer func() {
14902			sc := -1
14903			if iter.Response().Response.Response != nil {
14904				sc = iter.Response().Response.Response.StatusCode
14905			}
14906			tracing.EndSpan(ctx, sc, err)
14907		}()
14908	}
14909	iter.i++
14910	if iter.i < len(iter.page.Values()) {
14911		return nil
14912	}
14913	err = iter.page.NextWithContext(ctx)
14914	if err != nil {
14915		iter.i--
14916		return err
14917	}
14918	iter.i = 0
14919	return nil
14920}
14921
14922// Next advances to the next value.  If there was an error making
14923// the request the iterator does not advance and the error is returned.
14924// Deprecated: Use NextWithContext() instead.
14925func (iter *ListHubVirtualNetworkConnectionsResultIterator) Next() error {
14926	return iter.NextWithContext(context.Background())
14927}
14928
14929// NotDone returns true if the enumeration should be started or is not yet complete.
14930func (iter ListHubVirtualNetworkConnectionsResultIterator) NotDone() bool {
14931	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14932}
14933
14934// Response returns the raw server response from the last page request.
14935func (iter ListHubVirtualNetworkConnectionsResultIterator) Response() ListHubVirtualNetworkConnectionsResult {
14936	return iter.page.Response()
14937}
14938
14939// Value returns the current value or a zero-initialized value if the
14940// iterator has advanced beyond the end of the collection.
14941func (iter ListHubVirtualNetworkConnectionsResultIterator) Value() HubVirtualNetworkConnection {
14942	if !iter.page.NotDone() {
14943		return HubVirtualNetworkConnection{}
14944	}
14945	return iter.page.Values()[iter.i]
14946}
14947
14948// Creates a new instance of the ListHubVirtualNetworkConnectionsResultIterator type.
14949func NewListHubVirtualNetworkConnectionsResultIterator(page ListHubVirtualNetworkConnectionsResultPage) ListHubVirtualNetworkConnectionsResultIterator {
14950	return ListHubVirtualNetworkConnectionsResultIterator{page: page}
14951}
14952
14953// IsEmpty returns true if the ListResult contains no values.
14954func (lhvncr ListHubVirtualNetworkConnectionsResult) IsEmpty() bool {
14955	return lhvncr.Value == nil || len(*lhvncr.Value) == 0
14956}
14957
14958// hasNextLink returns true if the NextLink is not empty.
14959func (lhvncr ListHubVirtualNetworkConnectionsResult) hasNextLink() bool {
14960	return lhvncr.NextLink != nil && len(*lhvncr.NextLink) != 0
14961}
14962
14963// listHubVirtualNetworkConnectionsResultPreparer prepares a request to retrieve the next set of results.
14964// It returns nil if no more results exist.
14965func (lhvncr ListHubVirtualNetworkConnectionsResult) listHubVirtualNetworkConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
14966	if !lhvncr.hasNextLink() {
14967		return nil, nil
14968	}
14969	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14970		autorest.AsJSON(),
14971		autorest.AsGet(),
14972		autorest.WithBaseURL(to.String(lhvncr.NextLink)))
14973}
14974
14975// ListHubVirtualNetworkConnectionsResultPage contains a page of HubVirtualNetworkConnection values.
14976type ListHubVirtualNetworkConnectionsResultPage struct {
14977	fn     func(context.Context, ListHubVirtualNetworkConnectionsResult) (ListHubVirtualNetworkConnectionsResult, error)
14978	lhvncr ListHubVirtualNetworkConnectionsResult
14979}
14980
14981// NextWithContext advances to the next page of values.  If there was an error making
14982// the request the page does not advance and the error is returned.
14983func (page *ListHubVirtualNetworkConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
14984	if tracing.IsEnabled() {
14985		ctx = tracing.StartSpan(ctx, fqdn+"/ListHubVirtualNetworkConnectionsResultPage.NextWithContext")
14986		defer func() {
14987			sc := -1
14988			if page.Response().Response.Response != nil {
14989				sc = page.Response().Response.Response.StatusCode
14990			}
14991			tracing.EndSpan(ctx, sc, err)
14992		}()
14993	}
14994	for {
14995		next, err := page.fn(ctx, page.lhvncr)
14996		if err != nil {
14997			return err
14998		}
14999		page.lhvncr = next
15000		if !next.hasNextLink() || !next.IsEmpty() {
15001			break
15002		}
15003	}
15004	return nil
15005}
15006
15007// Next advances to the next page of values.  If there was an error making
15008// the request the page does not advance and the error is returned.
15009// Deprecated: Use NextWithContext() instead.
15010func (page *ListHubVirtualNetworkConnectionsResultPage) Next() error {
15011	return page.NextWithContext(context.Background())
15012}
15013
15014// NotDone returns true if the page enumeration should be started or is not yet complete.
15015func (page ListHubVirtualNetworkConnectionsResultPage) NotDone() bool {
15016	return !page.lhvncr.IsEmpty()
15017}
15018
15019// Response returns the raw server response from the last page request.
15020func (page ListHubVirtualNetworkConnectionsResultPage) Response() ListHubVirtualNetworkConnectionsResult {
15021	return page.lhvncr
15022}
15023
15024// Values returns the slice of values for the current page or nil if there are no values.
15025func (page ListHubVirtualNetworkConnectionsResultPage) Values() []HubVirtualNetworkConnection {
15026	if page.lhvncr.IsEmpty() {
15027		return nil
15028	}
15029	return *page.lhvncr.Value
15030}
15031
15032// Creates a new instance of the ListHubVirtualNetworkConnectionsResultPage type.
15033func NewListHubVirtualNetworkConnectionsResultPage(cur ListHubVirtualNetworkConnectionsResult, getNextPage func(context.Context, ListHubVirtualNetworkConnectionsResult) (ListHubVirtualNetworkConnectionsResult, error)) ListHubVirtualNetworkConnectionsResultPage {
15034	return ListHubVirtualNetworkConnectionsResultPage{
15035		fn:     getNextPage,
15036		lhvncr: cur,
15037	}
15038}
15039
15040// ListP2SVpnGatewaysResult result of the request to list P2SVpnGateways. It contains a list of
15041// P2SVpnGateways and a URL nextLink to get the next set of results.
15042type ListP2SVpnGatewaysResult struct {
15043	autorest.Response `json:"-"`
15044	// Value - List of P2SVpnGateways.
15045	Value *[]P2SVpnGateway `json:"value,omitempty"`
15046	// NextLink - URL to get the next set of operation list results if there are any.
15047	NextLink *string `json:"nextLink,omitempty"`
15048}
15049
15050// ListP2SVpnGatewaysResultIterator provides access to a complete listing of P2SVpnGateway values.
15051type ListP2SVpnGatewaysResultIterator struct {
15052	i    int
15053	page ListP2SVpnGatewaysResultPage
15054}
15055
15056// NextWithContext advances to the next value.  If there was an error making
15057// the request the iterator does not advance and the error is returned.
15058func (iter *ListP2SVpnGatewaysResultIterator) NextWithContext(ctx context.Context) (err error) {
15059	if tracing.IsEnabled() {
15060		ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnGatewaysResultIterator.NextWithContext")
15061		defer func() {
15062			sc := -1
15063			if iter.Response().Response.Response != nil {
15064				sc = iter.Response().Response.Response.StatusCode
15065			}
15066			tracing.EndSpan(ctx, sc, err)
15067		}()
15068	}
15069	iter.i++
15070	if iter.i < len(iter.page.Values()) {
15071		return nil
15072	}
15073	err = iter.page.NextWithContext(ctx)
15074	if err != nil {
15075		iter.i--
15076		return err
15077	}
15078	iter.i = 0
15079	return nil
15080}
15081
15082// Next advances to the next value.  If there was an error making
15083// the request the iterator does not advance and the error is returned.
15084// Deprecated: Use NextWithContext() instead.
15085func (iter *ListP2SVpnGatewaysResultIterator) Next() error {
15086	return iter.NextWithContext(context.Background())
15087}
15088
15089// NotDone returns true if the enumeration should be started or is not yet complete.
15090func (iter ListP2SVpnGatewaysResultIterator) NotDone() bool {
15091	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15092}
15093
15094// Response returns the raw server response from the last page request.
15095func (iter ListP2SVpnGatewaysResultIterator) Response() ListP2SVpnGatewaysResult {
15096	return iter.page.Response()
15097}
15098
15099// Value returns the current value or a zero-initialized value if the
15100// iterator has advanced beyond the end of the collection.
15101func (iter ListP2SVpnGatewaysResultIterator) Value() P2SVpnGateway {
15102	if !iter.page.NotDone() {
15103		return P2SVpnGateway{}
15104	}
15105	return iter.page.Values()[iter.i]
15106}
15107
15108// Creates a new instance of the ListP2SVpnGatewaysResultIterator type.
15109func NewListP2SVpnGatewaysResultIterator(page ListP2SVpnGatewaysResultPage) ListP2SVpnGatewaysResultIterator {
15110	return ListP2SVpnGatewaysResultIterator{page: page}
15111}
15112
15113// IsEmpty returns true if the ListResult contains no values.
15114func (lpvgr ListP2SVpnGatewaysResult) IsEmpty() bool {
15115	return lpvgr.Value == nil || len(*lpvgr.Value) == 0
15116}
15117
15118// hasNextLink returns true if the NextLink is not empty.
15119func (lpvgr ListP2SVpnGatewaysResult) hasNextLink() bool {
15120	return lpvgr.NextLink != nil && len(*lpvgr.NextLink) != 0
15121}
15122
15123// listP2SVpnGatewaysResultPreparer prepares a request to retrieve the next set of results.
15124// It returns nil if no more results exist.
15125func (lpvgr ListP2SVpnGatewaysResult) listP2SVpnGatewaysResultPreparer(ctx context.Context) (*http.Request, error) {
15126	if !lpvgr.hasNextLink() {
15127		return nil, nil
15128	}
15129	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15130		autorest.AsJSON(),
15131		autorest.AsGet(),
15132		autorest.WithBaseURL(to.String(lpvgr.NextLink)))
15133}
15134
15135// ListP2SVpnGatewaysResultPage contains a page of P2SVpnGateway values.
15136type ListP2SVpnGatewaysResultPage struct {
15137	fn    func(context.Context, ListP2SVpnGatewaysResult) (ListP2SVpnGatewaysResult, error)
15138	lpvgr ListP2SVpnGatewaysResult
15139}
15140
15141// NextWithContext advances to the next page of values.  If there was an error making
15142// the request the page does not advance and the error is returned.
15143func (page *ListP2SVpnGatewaysResultPage) NextWithContext(ctx context.Context) (err error) {
15144	if tracing.IsEnabled() {
15145		ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnGatewaysResultPage.NextWithContext")
15146		defer func() {
15147			sc := -1
15148			if page.Response().Response.Response != nil {
15149				sc = page.Response().Response.Response.StatusCode
15150			}
15151			tracing.EndSpan(ctx, sc, err)
15152		}()
15153	}
15154	for {
15155		next, err := page.fn(ctx, page.lpvgr)
15156		if err != nil {
15157			return err
15158		}
15159		page.lpvgr = next
15160		if !next.hasNextLink() || !next.IsEmpty() {
15161			break
15162		}
15163	}
15164	return nil
15165}
15166
15167// Next advances to the next page of values.  If there was an error making
15168// the request the page does not advance and the error is returned.
15169// Deprecated: Use NextWithContext() instead.
15170func (page *ListP2SVpnGatewaysResultPage) Next() error {
15171	return page.NextWithContext(context.Background())
15172}
15173
15174// NotDone returns true if the page enumeration should be started or is not yet complete.
15175func (page ListP2SVpnGatewaysResultPage) NotDone() bool {
15176	return !page.lpvgr.IsEmpty()
15177}
15178
15179// Response returns the raw server response from the last page request.
15180func (page ListP2SVpnGatewaysResultPage) Response() ListP2SVpnGatewaysResult {
15181	return page.lpvgr
15182}
15183
15184// Values returns the slice of values for the current page or nil if there are no values.
15185func (page ListP2SVpnGatewaysResultPage) Values() []P2SVpnGateway {
15186	if page.lpvgr.IsEmpty() {
15187		return nil
15188	}
15189	return *page.lpvgr.Value
15190}
15191
15192// Creates a new instance of the ListP2SVpnGatewaysResultPage type.
15193func NewListP2SVpnGatewaysResultPage(cur ListP2SVpnGatewaysResult, getNextPage func(context.Context, ListP2SVpnGatewaysResult) (ListP2SVpnGatewaysResult, error)) ListP2SVpnGatewaysResultPage {
15194	return ListP2SVpnGatewaysResultPage{
15195		fn:    getNextPage,
15196		lpvgr: cur,
15197	}
15198}
15199
15200// ListP2SVpnServerConfigurationsResult result of the request to list all P2SVpnServerConfigurations
15201// associated to a VirtualWan. It contains a list of P2SVpnServerConfigurations and a URL nextLink to get
15202// the next set of results.
15203type ListP2SVpnServerConfigurationsResult struct {
15204	autorest.Response `json:"-"`
15205	// Value - List of P2SVpnServerConfigurations.
15206	Value *[]P2SVpnServerConfiguration `json:"value,omitempty"`
15207	// NextLink - URL to get the next set of operation list results if there are any.
15208	NextLink *string `json:"nextLink,omitempty"`
15209}
15210
15211// ListP2SVpnServerConfigurationsResultIterator provides access to a complete listing of
15212// P2SVpnServerConfiguration values.
15213type ListP2SVpnServerConfigurationsResultIterator struct {
15214	i    int
15215	page ListP2SVpnServerConfigurationsResultPage
15216}
15217
15218// NextWithContext advances to the next value.  If there was an error making
15219// the request the iterator does not advance and the error is returned.
15220func (iter *ListP2SVpnServerConfigurationsResultIterator) NextWithContext(ctx context.Context) (err error) {
15221	if tracing.IsEnabled() {
15222		ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnServerConfigurationsResultIterator.NextWithContext")
15223		defer func() {
15224			sc := -1
15225			if iter.Response().Response.Response != nil {
15226				sc = iter.Response().Response.Response.StatusCode
15227			}
15228			tracing.EndSpan(ctx, sc, err)
15229		}()
15230	}
15231	iter.i++
15232	if iter.i < len(iter.page.Values()) {
15233		return nil
15234	}
15235	err = iter.page.NextWithContext(ctx)
15236	if err != nil {
15237		iter.i--
15238		return err
15239	}
15240	iter.i = 0
15241	return nil
15242}
15243
15244// Next advances to the next value.  If there was an error making
15245// the request the iterator does not advance and the error is returned.
15246// Deprecated: Use NextWithContext() instead.
15247func (iter *ListP2SVpnServerConfigurationsResultIterator) Next() error {
15248	return iter.NextWithContext(context.Background())
15249}
15250
15251// NotDone returns true if the enumeration should be started or is not yet complete.
15252func (iter ListP2SVpnServerConfigurationsResultIterator) NotDone() bool {
15253	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15254}
15255
15256// Response returns the raw server response from the last page request.
15257func (iter ListP2SVpnServerConfigurationsResultIterator) Response() ListP2SVpnServerConfigurationsResult {
15258	return iter.page.Response()
15259}
15260
15261// Value returns the current value or a zero-initialized value if the
15262// iterator has advanced beyond the end of the collection.
15263func (iter ListP2SVpnServerConfigurationsResultIterator) Value() P2SVpnServerConfiguration {
15264	if !iter.page.NotDone() {
15265		return P2SVpnServerConfiguration{}
15266	}
15267	return iter.page.Values()[iter.i]
15268}
15269
15270// Creates a new instance of the ListP2SVpnServerConfigurationsResultIterator type.
15271func NewListP2SVpnServerConfigurationsResultIterator(page ListP2SVpnServerConfigurationsResultPage) ListP2SVpnServerConfigurationsResultIterator {
15272	return ListP2SVpnServerConfigurationsResultIterator{page: page}
15273}
15274
15275// IsEmpty returns true if the ListResult contains no values.
15276func (lpvscr ListP2SVpnServerConfigurationsResult) IsEmpty() bool {
15277	return lpvscr.Value == nil || len(*lpvscr.Value) == 0
15278}
15279
15280// hasNextLink returns true if the NextLink is not empty.
15281func (lpvscr ListP2SVpnServerConfigurationsResult) hasNextLink() bool {
15282	return lpvscr.NextLink != nil && len(*lpvscr.NextLink) != 0
15283}
15284
15285// listP2SVpnServerConfigurationsResultPreparer prepares a request to retrieve the next set of results.
15286// It returns nil if no more results exist.
15287func (lpvscr ListP2SVpnServerConfigurationsResult) listP2SVpnServerConfigurationsResultPreparer(ctx context.Context) (*http.Request, error) {
15288	if !lpvscr.hasNextLink() {
15289		return nil, nil
15290	}
15291	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15292		autorest.AsJSON(),
15293		autorest.AsGet(),
15294		autorest.WithBaseURL(to.String(lpvscr.NextLink)))
15295}
15296
15297// ListP2SVpnServerConfigurationsResultPage contains a page of P2SVpnServerConfiguration values.
15298type ListP2SVpnServerConfigurationsResultPage struct {
15299	fn     func(context.Context, ListP2SVpnServerConfigurationsResult) (ListP2SVpnServerConfigurationsResult, error)
15300	lpvscr ListP2SVpnServerConfigurationsResult
15301}
15302
15303// NextWithContext advances to the next page of values.  If there was an error making
15304// the request the page does not advance and the error is returned.
15305func (page *ListP2SVpnServerConfigurationsResultPage) NextWithContext(ctx context.Context) (err error) {
15306	if tracing.IsEnabled() {
15307		ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnServerConfigurationsResultPage.NextWithContext")
15308		defer func() {
15309			sc := -1
15310			if page.Response().Response.Response != nil {
15311				sc = page.Response().Response.Response.StatusCode
15312			}
15313			tracing.EndSpan(ctx, sc, err)
15314		}()
15315	}
15316	for {
15317		next, err := page.fn(ctx, page.lpvscr)
15318		if err != nil {
15319			return err
15320		}
15321		page.lpvscr = next
15322		if !next.hasNextLink() || !next.IsEmpty() {
15323			break
15324		}
15325	}
15326	return nil
15327}
15328
15329// Next advances to the next page of values.  If there was an error making
15330// the request the page does not advance and the error is returned.
15331// Deprecated: Use NextWithContext() instead.
15332func (page *ListP2SVpnServerConfigurationsResultPage) Next() error {
15333	return page.NextWithContext(context.Background())
15334}
15335
15336// NotDone returns true if the page enumeration should be started or is not yet complete.
15337func (page ListP2SVpnServerConfigurationsResultPage) NotDone() bool {
15338	return !page.lpvscr.IsEmpty()
15339}
15340
15341// Response returns the raw server response from the last page request.
15342func (page ListP2SVpnServerConfigurationsResultPage) Response() ListP2SVpnServerConfigurationsResult {
15343	return page.lpvscr
15344}
15345
15346// Values returns the slice of values for the current page or nil if there are no values.
15347func (page ListP2SVpnServerConfigurationsResultPage) Values() []P2SVpnServerConfiguration {
15348	if page.lpvscr.IsEmpty() {
15349		return nil
15350	}
15351	return *page.lpvscr.Value
15352}
15353
15354// Creates a new instance of the ListP2SVpnServerConfigurationsResultPage type.
15355func NewListP2SVpnServerConfigurationsResultPage(cur ListP2SVpnServerConfigurationsResult, getNextPage func(context.Context, ListP2SVpnServerConfigurationsResult) (ListP2SVpnServerConfigurationsResult, error)) ListP2SVpnServerConfigurationsResultPage {
15356	return ListP2SVpnServerConfigurationsResultPage{
15357		fn:     getNextPage,
15358		lpvscr: cur,
15359	}
15360}
15361
15362// ListString ...
15363type ListString struct {
15364	autorest.Response `json:"-"`
15365	Value             *[]string `json:"value,omitempty"`
15366}
15367
15368// ListVirtualHubsResult result of the request to list VirtualHubs. It contains a list of VirtualHubs and a
15369// URL nextLink to get the next set of results.
15370type ListVirtualHubsResult struct {
15371	autorest.Response `json:"-"`
15372	// Value - List of VirtualHubs.
15373	Value *[]VirtualHub `json:"value,omitempty"`
15374	// NextLink - URL to get the next set of operation list results if there are any.
15375	NextLink *string `json:"nextLink,omitempty"`
15376}
15377
15378// ListVirtualHubsResultIterator provides access to a complete listing of VirtualHub values.
15379type ListVirtualHubsResultIterator struct {
15380	i    int
15381	page ListVirtualHubsResultPage
15382}
15383
15384// NextWithContext advances to the next value.  If there was an error making
15385// the request the iterator does not advance and the error is returned.
15386func (iter *ListVirtualHubsResultIterator) NextWithContext(ctx context.Context) (err error) {
15387	if tracing.IsEnabled() {
15388		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubsResultIterator.NextWithContext")
15389		defer func() {
15390			sc := -1
15391			if iter.Response().Response.Response != nil {
15392				sc = iter.Response().Response.Response.StatusCode
15393			}
15394			tracing.EndSpan(ctx, sc, err)
15395		}()
15396	}
15397	iter.i++
15398	if iter.i < len(iter.page.Values()) {
15399		return nil
15400	}
15401	err = iter.page.NextWithContext(ctx)
15402	if err != nil {
15403		iter.i--
15404		return err
15405	}
15406	iter.i = 0
15407	return nil
15408}
15409
15410// Next advances to the next value.  If there was an error making
15411// the request the iterator does not advance and the error is returned.
15412// Deprecated: Use NextWithContext() instead.
15413func (iter *ListVirtualHubsResultIterator) Next() error {
15414	return iter.NextWithContext(context.Background())
15415}
15416
15417// NotDone returns true if the enumeration should be started or is not yet complete.
15418func (iter ListVirtualHubsResultIterator) NotDone() bool {
15419	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15420}
15421
15422// Response returns the raw server response from the last page request.
15423func (iter ListVirtualHubsResultIterator) Response() ListVirtualHubsResult {
15424	return iter.page.Response()
15425}
15426
15427// Value returns the current value or a zero-initialized value if the
15428// iterator has advanced beyond the end of the collection.
15429func (iter ListVirtualHubsResultIterator) Value() VirtualHub {
15430	if !iter.page.NotDone() {
15431		return VirtualHub{}
15432	}
15433	return iter.page.Values()[iter.i]
15434}
15435
15436// Creates a new instance of the ListVirtualHubsResultIterator type.
15437func NewListVirtualHubsResultIterator(page ListVirtualHubsResultPage) ListVirtualHubsResultIterator {
15438	return ListVirtualHubsResultIterator{page: page}
15439}
15440
15441// IsEmpty returns true if the ListResult contains no values.
15442func (lvhr ListVirtualHubsResult) IsEmpty() bool {
15443	return lvhr.Value == nil || len(*lvhr.Value) == 0
15444}
15445
15446// hasNextLink returns true if the NextLink is not empty.
15447func (lvhr ListVirtualHubsResult) hasNextLink() bool {
15448	return lvhr.NextLink != nil && len(*lvhr.NextLink) != 0
15449}
15450
15451// listVirtualHubsResultPreparer prepares a request to retrieve the next set of results.
15452// It returns nil if no more results exist.
15453func (lvhr ListVirtualHubsResult) listVirtualHubsResultPreparer(ctx context.Context) (*http.Request, error) {
15454	if !lvhr.hasNextLink() {
15455		return nil, nil
15456	}
15457	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15458		autorest.AsJSON(),
15459		autorest.AsGet(),
15460		autorest.WithBaseURL(to.String(lvhr.NextLink)))
15461}
15462
15463// ListVirtualHubsResultPage contains a page of VirtualHub values.
15464type ListVirtualHubsResultPage struct {
15465	fn   func(context.Context, ListVirtualHubsResult) (ListVirtualHubsResult, error)
15466	lvhr ListVirtualHubsResult
15467}
15468
15469// NextWithContext advances to the next page of values.  If there was an error making
15470// the request the page does not advance and the error is returned.
15471func (page *ListVirtualHubsResultPage) NextWithContext(ctx context.Context) (err error) {
15472	if tracing.IsEnabled() {
15473		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubsResultPage.NextWithContext")
15474		defer func() {
15475			sc := -1
15476			if page.Response().Response.Response != nil {
15477				sc = page.Response().Response.Response.StatusCode
15478			}
15479			tracing.EndSpan(ctx, sc, err)
15480		}()
15481	}
15482	for {
15483		next, err := page.fn(ctx, page.lvhr)
15484		if err != nil {
15485			return err
15486		}
15487		page.lvhr = next
15488		if !next.hasNextLink() || !next.IsEmpty() {
15489			break
15490		}
15491	}
15492	return nil
15493}
15494
15495// Next advances to the next page of values.  If there was an error making
15496// the request the page does not advance and the error is returned.
15497// Deprecated: Use NextWithContext() instead.
15498func (page *ListVirtualHubsResultPage) Next() error {
15499	return page.NextWithContext(context.Background())
15500}
15501
15502// NotDone returns true if the page enumeration should be started or is not yet complete.
15503func (page ListVirtualHubsResultPage) NotDone() bool {
15504	return !page.lvhr.IsEmpty()
15505}
15506
15507// Response returns the raw server response from the last page request.
15508func (page ListVirtualHubsResultPage) Response() ListVirtualHubsResult {
15509	return page.lvhr
15510}
15511
15512// Values returns the slice of values for the current page or nil if there are no values.
15513func (page ListVirtualHubsResultPage) Values() []VirtualHub {
15514	if page.lvhr.IsEmpty() {
15515		return nil
15516	}
15517	return *page.lvhr.Value
15518}
15519
15520// Creates a new instance of the ListVirtualHubsResultPage type.
15521func NewListVirtualHubsResultPage(cur ListVirtualHubsResult, getNextPage func(context.Context, ListVirtualHubsResult) (ListVirtualHubsResult, error)) ListVirtualHubsResultPage {
15522	return ListVirtualHubsResultPage{
15523		fn:   getNextPage,
15524		lvhr: cur,
15525	}
15526}
15527
15528// ListVirtualWANsResult result of the request to list VirtualWANs. It contains a list of VirtualWANs and a
15529// URL nextLink to get the next set of results.
15530type ListVirtualWANsResult struct {
15531	autorest.Response `json:"-"`
15532	// Value - List of VirtualWANs.
15533	Value *[]VirtualWAN `json:"value,omitempty"`
15534	// NextLink - URL to get the next set of operation list results if there are any.
15535	NextLink *string `json:"nextLink,omitempty"`
15536}
15537
15538// ListVirtualWANsResultIterator provides access to a complete listing of VirtualWAN values.
15539type ListVirtualWANsResultIterator struct {
15540	i    int
15541	page ListVirtualWANsResultPage
15542}
15543
15544// NextWithContext advances to the next value.  If there was an error making
15545// the request the iterator does not advance and the error is returned.
15546func (iter *ListVirtualWANsResultIterator) NextWithContext(ctx context.Context) (err error) {
15547	if tracing.IsEnabled() {
15548		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualWANsResultIterator.NextWithContext")
15549		defer func() {
15550			sc := -1
15551			if iter.Response().Response.Response != nil {
15552				sc = iter.Response().Response.Response.StatusCode
15553			}
15554			tracing.EndSpan(ctx, sc, err)
15555		}()
15556	}
15557	iter.i++
15558	if iter.i < len(iter.page.Values()) {
15559		return nil
15560	}
15561	err = iter.page.NextWithContext(ctx)
15562	if err != nil {
15563		iter.i--
15564		return err
15565	}
15566	iter.i = 0
15567	return nil
15568}
15569
15570// Next advances to the next value.  If there was an error making
15571// the request the iterator does not advance and the error is returned.
15572// Deprecated: Use NextWithContext() instead.
15573func (iter *ListVirtualWANsResultIterator) Next() error {
15574	return iter.NextWithContext(context.Background())
15575}
15576
15577// NotDone returns true if the enumeration should be started or is not yet complete.
15578func (iter ListVirtualWANsResultIterator) NotDone() bool {
15579	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15580}
15581
15582// Response returns the raw server response from the last page request.
15583func (iter ListVirtualWANsResultIterator) Response() ListVirtualWANsResult {
15584	return iter.page.Response()
15585}
15586
15587// Value returns the current value or a zero-initialized value if the
15588// iterator has advanced beyond the end of the collection.
15589func (iter ListVirtualWANsResultIterator) Value() VirtualWAN {
15590	if !iter.page.NotDone() {
15591		return VirtualWAN{}
15592	}
15593	return iter.page.Values()[iter.i]
15594}
15595
15596// Creates a new instance of the ListVirtualWANsResultIterator type.
15597func NewListVirtualWANsResultIterator(page ListVirtualWANsResultPage) ListVirtualWANsResultIterator {
15598	return ListVirtualWANsResultIterator{page: page}
15599}
15600
15601// IsEmpty returns true if the ListResult contains no values.
15602func (lvwnr ListVirtualWANsResult) IsEmpty() bool {
15603	return lvwnr.Value == nil || len(*lvwnr.Value) == 0
15604}
15605
15606// hasNextLink returns true if the NextLink is not empty.
15607func (lvwnr ListVirtualWANsResult) hasNextLink() bool {
15608	return lvwnr.NextLink != nil && len(*lvwnr.NextLink) != 0
15609}
15610
15611// listVirtualWANsResultPreparer prepares a request to retrieve the next set of results.
15612// It returns nil if no more results exist.
15613func (lvwnr ListVirtualWANsResult) listVirtualWANsResultPreparer(ctx context.Context) (*http.Request, error) {
15614	if !lvwnr.hasNextLink() {
15615		return nil, nil
15616	}
15617	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15618		autorest.AsJSON(),
15619		autorest.AsGet(),
15620		autorest.WithBaseURL(to.String(lvwnr.NextLink)))
15621}
15622
15623// ListVirtualWANsResultPage contains a page of VirtualWAN values.
15624type ListVirtualWANsResultPage struct {
15625	fn    func(context.Context, ListVirtualWANsResult) (ListVirtualWANsResult, error)
15626	lvwnr ListVirtualWANsResult
15627}
15628
15629// NextWithContext advances to the next page of values.  If there was an error making
15630// the request the page does not advance and the error is returned.
15631func (page *ListVirtualWANsResultPage) NextWithContext(ctx context.Context) (err error) {
15632	if tracing.IsEnabled() {
15633		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualWANsResultPage.NextWithContext")
15634		defer func() {
15635			sc := -1
15636			if page.Response().Response.Response != nil {
15637				sc = page.Response().Response.Response.StatusCode
15638			}
15639			tracing.EndSpan(ctx, sc, err)
15640		}()
15641	}
15642	for {
15643		next, err := page.fn(ctx, page.lvwnr)
15644		if err != nil {
15645			return err
15646		}
15647		page.lvwnr = next
15648		if !next.hasNextLink() || !next.IsEmpty() {
15649			break
15650		}
15651	}
15652	return nil
15653}
15654
15655// Next advances to the next page of values.  If there was an error making
15656// the request the page does not advance and the error is returned.
15657// Deprecated: Use NextWithContext() instead.
15658func (page *ListVirtualWANsResultPage) Next() error {
15659	return page.NextWithContext(context.Background())
15660}
15661
15662// NotDone returns true if the page enumeration should be started or is not yet complete.
15663func (page ListVirtualWANsResultPage) NotDone() bool {
15664	return !page.lvwnr.IsEmpty()
15665}
15666
15667// Response returns the raw server response from the last page request.
15668func (page ListVirtualWANsResultPage) Response() ListVirtualWANsResult {
15669	return page.lvwnr
15670}
15671
15672// Values returns the slice of values for the current page or nil if there are no values.
15673func (page ListVirtualWANsResultPage) Values() []VirtualWAN {
15674	if page.lvwnr.IsEmpty() {
15675		return nil
15676	}
15677	return *page.lvwnr.Value
15678}
15679
15680// Creates a new instance of the ListVirtualWANsResultPage type.
15681func NewListVirtualWANsResultPage(cur ListVirtualWANsResult, getNextPage func(context.Context, ListVirtualWANsResult) (ListVirtualWANsResult, error)) ListVirtualWANsResultPage {
15682	return ListVirtualWANsResultPage{
15683		fn:    getNextPage,
15684		lvwnr: cur,
15685	}
15686}
15687
15688// ListVpnConnectionsResult result of the request to list all vpn connections to a virtual wan vpn gateway.
15689// It contains a list of Vpn Connections and a URL nextLink to get the next set of results.
15690type ListVpnConnectionsResult struct {
15691	autorest.Response `json:"-"`
15692	// Value - List of Vpn Connections.
15693	Value *[]VpnConnection `json:"value,omitempty"`
15694	// NextLink - URL to get the next set of operation list results if there are any.
15695	NextLink *string `json:"nextLink,omitempty"`
15696}
15697
15698// ListVpnConnectionsResultIterator provides access to a complete listing of VpnConnection values.
15699type ListVpnConnectionsResultIterator struct {
15700	i    int
15701	page ListVpnConnectionsResultPage
15702}
15703
15704// NextWithContext advances to the next value.  If there was an error making
15705// the request the iterator does not advance and the error is returned.
15706func (iter *ListVpnConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
15707	if tracing.IsEnabled() {
15708		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnConnectionsResultIterator.NextWithContext")
15709		defer func() {
15710			sc := -1
15711			if iter.Response().Response.Response != nil {
15712				sc = iter.Response().Response.Response.StatusCode
15713			}
15714			tracing.EndSpan(ctx, sc, err)
15715		}()
15716	}
15717	iter.i++
15718	if iter.i < len(iter.page.Values()) {
15719		return nil
15720	}
15721	err = iter.page.NextWithContext(ctx)
15722	if err != nil {
15723		iter.i--
15724		return err
15725	}
15726	iter.i = 0
15727	return nil
15728}
15729
15730// Next advances to the next value.  If there was an error making
15731// the request the iterator does not advance and the error is returned.
15732// Deprecated: Use NextWithContext() instead.
15733func (iter *ListVpnConnectionsResultIterator) Next() error {
15734	return iter.NextWithContext(context.Background())
15735}
15736
15737// NotDone returns true if the enumeration should be started or is not yet complete.
15738func (iter ListVpnConnectionsResultIterator) NotDone() bool {
15739	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15740}
15741
15742// Response returns the raw server response from the last page request.
15743func (iter ListVpnConnectionsResultIterator) Response() ListVpnConnectionsResult {
15744	return iter.page.Response()
15745}
15746
15747// Value returns the current value or a zero-initialized value if the
15748// iterator has advanced beyond the end of the collection.
15749func (iter ListVpnConnectionsResultIterator) Value() VpnConnection {
15750	if !iter.page.NotDone() {
15751		return VpnConnection{}
15752	}
15753	return iter.page.Values()[iter.i]
15754}
15755
15756// Creates a new instance of the ListVpnConnectionsResultIterator type.
15757func NewListVpnConnectionsResultIterator(page ListVpnConnectionsResultPage) ListVpnConnectionsResultIterator {
15758	return ListVpnConnectionsResultIterator{page: page}
15759}
15760
15761// IsEmpty returns true if the ListResult contains no values.
15762func (lvcr ListVpnConnectionsResult) IsEmpty() bool {
15763	return lvcr.Value == nil || len(*lvcr.Value) == 0
15764}
15765
15766// hasNextLink returns true if the NextLink is not empty.
15767func (lvcr ListVpnConnectionsResult) hasNextLink() bool {
15768	return lvcr.NextLink != nil && len(*lvcr.NextLink) != 0
15769}
15770
15771// listVpnConnectionsResultPreparer prepares a request to retrieve the next set of results.
15772// It returns nil if no more results exist.
15773func (lvcr ListVpnConnectionsResult) listVpnConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
15774	if !lvcr.hasNextLink() {
15775		return nil, nil
15776	}
15777	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15778		autorest.AsJSON(),
15779		autorest.AsGet(),
15780		autorest.WithBaseURL(to.String(lvcr.NextLink)))
15781}
15782
15783// ListVpnConnectionsResultPage contains a page of VpnConnection values.
15784type ListVpnConnectionsResultPage struct {
15785	fn   func(context.Context, ListVpnConnectionsResult) (ListVpnConnectionsResult, error)
15786	lvcr ListVpnConnectionsResult
15787}
15788
15789// NextWithContext advances to the next page of values.  If there was an error making
15790// the request the page does not advance and the error is returned.
15791func (page *ListVpnConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
15792	if tracing.IsEnabled() {
15793		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnConnectionsResultPage.NextWithContext")
15794		defer func() {
15795			sc := -1
15796			if page.Response().Response.Response != nil {
15797				sc = page.Response().Response.Response.StatusCode
15798			}
15799			tracing.EndSpan(ctx, sc, err)
15800		}()
15801	}
15802	for {
15803		next, err := page.fn(ctx, page.lvcr)
15804		if err != nil {
15805			return err
15806		}
15807		page.lvcr = next
15808		if !next.hasNextLink() || !next.IsEmpty() {
15809			break
15810		}
15811	}
15812	return nil
15813}
15814
15815// Next advances to the next page of values.  If there was an error making
15816// the request the page does not advance and the error is returned.
15817// Deprecated: Use NextWithContext() instead.
15818func (page *ListVpnConnectionsResultPage) Next() error {
15819	return page.NextWithContext(context.Background())
15820}
15821
15822// NotDone returns true if the page enumeration should be started or is not yet complete.
15823func (page ListVpnConnectionsResultPage) NotDone() bool {
15824	return !page.lvcr.IsEmpty()
15825}
15826
15827// Response returns the raw server response from the last page request.
15828func (page ListVpnConnectionsResultPage) Response() ListVpnConnectionsResult {
15829	return page.lvcr
15830}
15831
15832// Values returns the slice of values for the current page or nil if there are no values.
15833func (page ListVpnConnectionsResultPage) Values() []VpnConnection {
15834	if page.lvcr.IsEmpty() {
15835		return nil
15836	}
15837	return *page.lvcr.Value
15838}
15839
15840// Creates a new instance of the ListVpnConnectionsResultPage type.
15841func NewListVpnConnectionsResultPage(cur ListVpnConnectionsResult, getNextPage func(context.Context, ListVpnConnectionsResult) (ListVpnConnectionsResult, error)) ListVpnConnectionsResultPage {
15842	return ListVpnConnectionsResultPage{
15843		fn:   getNextPage,
15844		lvcr: cur,
15845	}
15846}
15847
15848// ListVpnGatewaysResult result of the request to list VpnGateways. It contains a list of VpnGateways and a
15849// URL nextLink to get the next set of results.
15850type ListVpnGatewaysResult struct {
15851	autorest.Response `json:"-"`
15852	// Value - List of VpnGateways.
15853	Value *[]VpnGateway `json:"value,omitempty"`
15854	// NextLink - URL to get the next set of operation list results if there are any.
15855	NextLink *string `json:"nextLink,omitempty"`
15856}
15857
15858// ListVpnGatewaysResultIterator provides access to a complete listing of VpnGateway values.
15859type ListVpnGatewaysResultIterator struct {
15860	i    int
15861	page ListVpnGatewaysResultPage
15862}
15863
15864// NextWithContext advances to the next value.  If there was an error making
15865// the request the iterator does not advance and the error is returned.
15866func (iter *ListVpnGatewaysResultIterator) NextWithContext(ctx context.Context) (err error) {
15867	if tracing.IsEnabled() {
15868		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnGatewaysResultIterator.NextWithContext")
15869		defer func() {
15870			sc := -1
15871			if iter.Response().Response.Response != nil {
15872				sc = iter.Response().Response.Response.StatusCode
15873			}
15874			tracing.EndSpan(ctx, sc, err)
15875		}()
15876	}
15877	iter.i++
15878	if iter.i < len(iter.page.Values()) {
15879		return nil
15880	}
15881	err = iter.page.NextWithContext(ctx)
15882	if err != nil {
15883		iter.i--
15884		return err
15885	}
15886	iter.i = 0
15887	return nil
15888}
15889
15890// Next advances to the next value.  If there was an error making
15891// the request the iterator does not advance and the error is returned.
15892// Deprecated: Use NextWithContext() instead.
15893func (iter *ListVpnGatewaysResultIterator) Next() error {
15894	return iter.NextWithContext(context.Background())
15895}
15896
15897// NotDone returns true if the enumeration should be started or is not yet complete.
15898func (iter ListVpnGatewaysResultIterator) NotDone() bool {
15899	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15900}
15901
15902// Response returns the raw server response from the last page request.
15903func (iter ListVpnGatewaysResultIterator) Response() ListVpnGatewaysResult {
15904	return iter.page.Response()
15905}
15906
15907// Value returns the current value or a zero-initialized value if the
15908// iterator has advanced beyond the end of the collection.
15909func (iter ListVpnGatewaysResultIterator) Value() VpnGateway {
15910	if !iter.page.NotDone() {
15911		return VpnGateway{}
15912	}
15913	return iter.page.Values()[iter.i]
15914}
15915
15916// Creates a new instance of the ListVpnGatewaysResultIterator type.
15917func NewListVpnGatewaysResultIterator(page ListVpnGatewaysResultPage) ListVpnGatewaysResultIterator {
15918	return ListVpnGatewaysResultIterator{page: page}
15919}
15920
15921// IsEmpty returns true if the ListResult contains no values.
15922func (lvgr ListVpnGatewaysResult) IsEmpty() bool {
15923	return lvgr.Value == nil || len(*lvgr.Value) == 0
15924}
15925
15926// hasNextLink returns true if the NextLink is not empty.
15927func (lvgr ListVpnGatewaysResult) hasNextLink() bool {
15928	return lvgr.NextLink != nil && len(*lvgr.NextLink) != 0
15929}
15930
15931// listVpnGatewaysResultPreparer prepares a request to retrieve the next set of results.
15932// It returns nil if no more results exist.
15933func (lvgr ListVpnGatewaysResult) listVpnGatewaysResultPreparer(ctx context.Context) (*http.Request, error) {
15934	if !lvgr.hasNextLink() {
15935		return nil, nil
15936	}
15937	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15938		autorest.AsJSON(),
15939		autorest.AsGet(),
15940		autorest.WithBaseURL(to.String(lvgr.NextLink)))
15941}
15942
15943// ListVpnGatewaysResultPage contains a page of VpnGateway values.
15944type ListVpnGatewaysResultPage struct {
15945	fn   func(context.Context, ListVpnGatewaysResult) (ListVpnGatewaysResult, error)
15946	lvgr ListVpnGatewaysResult
15947}
15948
15949// NextWithContext advances to the next page of values.  If there was an error making
15950// the request the page does not advance and the error is returned.
15951func (page *ListVpnGatewaysResultPage) NextWithContext(ctx context.Context) (err error) {
15952	if tracing.IsEnabled() {
15953		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnGatewaysResultPage.NextWithContext")
15954		defer func() {
15955			sc := -1
15956			if page.Response().Response.Response != nil {
15957				sc = page.Response().Response.Response.StatusCode
15958			}
15959			tracing.EndSpan(ctx, sc, err)
15960		}()
15961	}
15962	for {
15963		next, err := page.fn(ctx, page.lvgr)
15964		if err != nil {
15965			return err
15966		}
15967		page.lvgr = next
15968		if !next.hasNextLink() || !next.IsEmpty() {
15969			break
15970		}
15971	}
15972	return nil
15973}
15974
15975// Next advances to the next page of values.  If there was an error making
15976// the request the page does not advance and the error is returned.
15977// Deprecated: Use NextWithContext() instead.
15978func (page *ListVpnGatewaysResultPage) Next() error {
15979	return page.NextWithContext(context.Background())
15980}
15981
15982// NotDone returns true if the page enumeration should be started or is not yet complete.
15983func (page ListVpnGatewaysResultPage) NotDone() bool {
15984	return !page.lvgr.IsEmpty()
15985}
15986
15987// Response returns the raw server response from the last page request.
15988func (page ListVpnGatewaysResultPage) Response() ListVpnGatewaysResult {
15989	return page.lvgr
15990}
15991
15992// Values returns the slice of values for the current page or nil if there are no values.
15993func (page ListVpnGatewaysResultPage) Values() []VpnGateway {
15994	if page.lvgr.IsEmpty() {
15995		return nil
15996	}
15997	return *page.lvgr.Value
15998}
15999
16000// Creates a new instance of the ListVpnGatewaysResultPage type.
16001func NewListVpnGatewaysResultPage(cur ListVpnGatewaysResult, getNextPage func(context.Context, ListVpnGatewaysResult) (ListVpnGatewaysResult, error)) ListVpnGatewaysResultPage {
16002	return ListVpnGatewaysResultPage{
16003		fn:   getNextPage,
16004		lvgr: cur,
16005	}
16006}
16007
16008// ListVpnSiteLinkConnectionsResult result of the request to list all vpn connections to a virtual wan vpn
16009// gateway. It contains a list of Vpn Connections and a URL nextLink to get the next set of results.
16010type ListVpnSiteLinkConnectionsResult struct {
16011	autorest.Response `json:"-"`
16012	// Value - List of VpnSiteLinkConnections.
16013	Value *[]VpnSiteLinkConnection `json:"value,omitempty"`
16014	// NextLink - URL to get the next set of operation list results if there are any.
16015	NextLink *string `json:"nextLink,omitempty"`
16016}
16017
16018// ListVpnSiteLinkConnectionsResultIterator provides access to a complete listing of VpnSiteLinkConnection
16019// values.
16020type ListVpnSiteLinkConnectionsResultIterator struct {
16021	i    int
16022	page ListVpnSiteLinkConnectionsResultPage
16023}
16024
16025// NextWithContext advances to the next value.  If there was an error making
16026// the request the iterator does not advance and the error is returned.
16027func (iter *ListVpnSiteLinkConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
16028	if tracing.IsEnabled() {
16029		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSiteLinkConnectionsResultIterator.NextWithContext")
16030		defer func() {
16031			sc := -1
16032			if iter.Response().Response.Response != nil {
16033				sc = iter.Response().Response.Response.StatusCode
16034			}
16035			tracing.EndSpan(ctx, sc, err)
16036		}()
16037	}
16038	iter.i++
16039	if iter.i < len(iter.page.Values()) {
16040		return nil
16041	}
16042	err = iter.page.NextWithContext(ctx)
16043	if err != nil {
16044		iter.i--
16045		return err
16046	}
16047	iter.i = 0
16048	return nil
16049}
16050
16051// Next advances to the next value.  If there was an error making
16052// the request the iterator does not advance and the error is returned.
16053// Deprecated: Use NextWithContext() instead.
16054func (iter *ListVpnSiteLinkConnectionsResultIterator) Next() error {
16055	return iter.NextWithContext(context.Background())
16056}
16057
16058// NotDone returns true if the enumeration should be started or is not yet complete.
16059func (iter ListVpnSiteLinkConnectionsResultIterator) NotDone() bool {
16060	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16061}
16062
16063// Response returns the raw server response from the last page request.
16064func (iter ListVpnSiteLinkConnectionsResultIterator) Response() ListVpnSiteLinkConnectionsResult {
16065	return iter.page.Response()
16066}
16067
16068// Value returns the current value or a zero-initialized value if the
16069// iterator has advanced beyond the end of the collection.
16070func (iter ListVpnSiteLinkConnectionsResultIterator) Value() VpnSiteLinkConnection {
16071	if !iter.page.NotDone() {
16072		return VpnSiteLinkConnection{}
16073	}
16074	return iter.page.Values()[iter.i]
16075}
16076
16077// Creates a new instance of the ListVpnSiteLinkConnectionsResultIterator type.
16078func NewListVpnSiteLinkConnectionsResultIterator(page ListVpnSiteLinkConnectionsResultPage) ListVpnSiteLinkConnectionsResultIterator {
16079	return ListVpnSiteLinkConnectionsResultIterator{page: page}
16080}
16081
16082// IsEmpty returns true if the ListResult contains no values.
16083func (lvslcr ListVpnSiteLinkConnectionsResult) IsEmpty() bool {
16084	return lvslcr.Value == nil || len(*lvslcr.Value) == 0
16085}
16086
16087// hasNextLink returns true if the NextLink is not empty.
16088func (lvslcr ListVpnSiteLinkConnectionsResult) hasNextLink() bool {
16089	return lvslcr.NextLink != nil && len(*lvslcr.NextLink) != 0
16090}
16091
16092// listVpnSiteLinkConnectionsResultPreparer prepares a request to retrieve the next set of results.
16093// It returns nil if no more results exist.
16094func (lvslcr ListVpnSiteLinkConnectionsResult) listVpnSiteLinkConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
16095	if !lvslcr.hasNextLink() {
16096		return nil, nil
16097	}
16098	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16099		autorest.AsJSON(),
16100		autorest.AsGet(),
16101		autorest.WithBaseURL(to.String(lvslcr.NextLink)))
16102}
16103
16104// ListVpnSiteLinkConnectionsResultPage contains a page of VpnSiteLinkConnection values.
16105type ListVpnSiteLinkConnectionsResultPage struct {
16106	fn     func(context.Context, ListVpnSiteLinkConnectionsResult) (ListVpnSiteLinkConnectionsResult, error)
16107	lvslcr ListVpnSiteLinkConnectionsResult
16108}
16109
16110// NextWithContext advances to the next page of values.  If there was an error making
16111// the request the page does not advance and the error is returned.
16112func (page *ListVpnSiteLinkConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
16113	if tracing.IsEnabled() {
16114		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSiteLinkConnectionsResultPage.NextWithContext")
16115		defer func() {
16116			sc := -1
16117			if page.Response().Response.Response != nil {
16118				sc = page.Response().Response.Response.StatusCode
16119			}
16120			tracing.EndSpan(ctx, sc, err)
16121		}()
16122	}
16123	for {
16124		next, err := page.fn(ctx, page.lvslcr)
16125		if err != nil {
16126			return err
16127		}
16128		page.lvslcr = next
16129		if !next.hasNextLink() || !next.IsEmpty() {
16130			break
16131		}
16132	}
16133	return nil
16134}
16135
16136// Next advances to the next page of values.  If there was an error making
16137// the request the page does not advance and the error is returned.
16138// Deprecated: Use NextWithContext() instead.
16139func (page *ListVpnSiteLinkConnectionsResultPage) Next() error {
16140	return page.NextWithContext(context.Background())
16141}
16142
16143// NotDone returns true if the page enumeration should be started or is not yet complete.
16144func (page ListVpnSiteLinkConnectionsResultPage) NotDone() bool {
16145	return !page.lvslcr.IsEmpty()
16146}
16147
16148// Response returns the raw server response from the last page request.
16149func (page ListVpnSiteLinkConnectionsResultPage) Response() ListVpnSiteLinkConnectionsResult {
16150	return page.lvslcr
16151}
16152
16153// Values returns the slice of values for the current page or nil if there are no values.
16154func (page ListVpnSiteLinkConnectionsResultPage) Values() []VpnSiteLinkConnection {
16155	if page.lvslcr.IsEmpty() {
16156		return nil
16157	}
16158	return *page.lvslcr.Value
16159}
16160
16161// Creates a new instance of the ListVpnSiteLinkConnectionsResultPage type.
16162func NewListVpnSiteLinkConnectionsResultPage(cur ListVpnSiteLinkConnectionsResult, getNextPage func(context.Context, ListVpnSiteLinkConnectionsResult) (ListVpnSiteLinkConnectionsResult, error)) ListVpnSiteLinkConnectionsResultPage {
16163	return ListVpnSiteLinkConnectionsResultPage{
16164		fn:     getNextPage,
16165		lvslcr: cur,
16166	}
16167}
16168
16169// ListVpnSiteLinksResult result of the request to list VpnSiteLinks. It contains a list of VpnSiteLinks
16170// and a URL nextLink to get the next set of results.
16171type ListVpnSiteLinksResult struct {
16172	autorest.Response `json:"-"`
16173	// Value - List of VpnSitesLinks.
16174	Value *[]VpnSiteLink `json:"value,omitempty"`
16175	// NextLink - URL to get the next set of operation list results if there are any.
16176	NextLink *string `json:"nextLink,omitempty"`
16177}
16178
16179// ListVpnSiteLinksResultIterator provides access to a complete listing of VpnSiteLink values.
16180type ListVpnSiteLinksResultIterator struct {
16181	i    int
16182	page ListVpnSiteLinksResultPage
16183}
16184
16185// NextWithContext advances to the next value.  If there was an error making
16186// the request the iterator does not advance and the error is returned.
16187func (iter *ListVpnSiteLinksResultIterator) NextWithContext(ctx context.Context) (err error) {
16188	if tracing.IsEnabled() {
16189		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSiteLinksResultIterator.NextWithContext")
16190		defer func() {
16191			sc := -1
16192			if iter.Response().Response.Response != nil {
16193				sc = iter.Response().Response.Response.StatusCode
16194			}
16195			tracing.EndSpan(ctx, sc, err)
16196		}()
16197	}
16198	iter.i++
16199	if iter.i < len(iter.page.Values()) {
16200		return nil
16201	}
16202	err = iter.page.NextWithContext(ctx)
16203	if err != nil {
16204		iter.i--
16205		return err
16206	}
16207	iter.i = 0
16208	return nil
16209}
16210
16211// Next advances to the next value.  If there was an error making
16212// the request the iterator does not advance and the error is returned.
16213// Deprecated: Use NextWithContext() instead.
16214func (iter *ListVpnSiteLinksResultIterator) Next() error {
16215	return iter.NextWithContext(context.Background())
16216}
16217
16218// NotDone returns true if the enumeration should be started or is not yet complete.
16219func (iter ListVpnSiteLinksResultIterator) NotDone() bool {
16220	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16221}
16222
16223// Response returns the raw server response from the last page request.
16224func (iter ListVpnSiteLinksResultIterator) Response() ListVpnSiteLinksResult {
16225	return iter.page.Response()
16226}
16227
16228// Value returns the current value or a zero-initialized value if the
16229// iterator has advanced beyond the end of the collection.
16230func (iter ListVpnSiteLinksResultIterator) Value() VpnSiteLink {
16231	if !iter.page.NotDone() {
16232		return VpnSiteLink{}
16233	}
16234	return iter.page.Values()[iter.i]
16235}
16236
16237// Creates a new instance of the ListVpnSiteLinksResultIterator type.
16238func NewListVpnSiteLinksResultIterator(page ListVpnSiteLinksResultPage) ListVpnSiteLinksResultIterator {
16239	return ListVpnSiteLinksResultIterator{page: page}
16240}
16241
16242// IsEmpty returns true if the ListResult contains no values.
16243func (lvslr ListVpnSiteLinksResult) IsEmpty() bool {
16244	return lvslr.Value == nil || len(*lvslr.Value) == 0
16245}
16246
16247// hasNextLink returns true if the NextLink is not empty.
16248func (lvslr ListVpnSiteLinksResult) hasNextLink() bool {
16249	return lvslr.NextLink != nil && len(*lvslr.NextLink) != 0
16250}
16251
16252// listVpnSiteLinksResultPreparer prepares a request to retrieve the next set of results.
16253// It returns nil if no more results exist.
16254func (lvslr ListVpnSiteLinksResult) listVpnSiteLinksResultPreparer(ctx context.Context) (*http.Request, error) {
16255	if !lvslr.hasNextLink() {
16256		return nil, nil
16257	}
16258	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16259		autorest.AsJSON(),
16260		autorest.AsGet(),
16261		autorest.WithBaseURL(to.String(lvslr.NextLink)))
16262}
16263
16264// ListVpnSiteLinksResultPage contains a page of VpnSiteLink values.
16265type ListVpnSiteLinksResultPage struct {
16266	fn    func(context.Context, ListVpnSiteLinksResult) (ListVpnSiteLinksResult, error)
16267	lvslr ListVpnSiteLinksResult
16268}
16269
16270// NextWithContext advances to the next page of values.  If there was an error making
16271// the request the page does not advance and the error is returned.
16272func (page *ListVpnSiteLinksResultPage) NextWithContext(ctx context.Context) (err error) {
16273	if tracing.IsEnabled() {
16274		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSiteLinksResultPage.NextWithContext")
16275		defer func() {
16276			sc := -1
16277			if page.Response().Response.Response != nil {
16278				sc = page.Response().Response.Response.StatusCode
16279			}
16280			tracing.EndSpan(ctx, sc, err)
16281		}()
16282	}
16283	for {
16284		next, err := page.fn(ctx, page.lvslr)
16285		if err != nil {
16286			return err
16287		}
16288		page.lvslr = next
16289		if !next.hasNextLink() || !next.IsEmpty() {
16290			break
16291		}
16292	}
16293	return nil
16294}
16295
16296// Next advances to the next page of values.  If there was an error making
16297// the request the page does not advance and the error is returned.
16298// Deprecated: Use NextWithContext() instead.
16299func (page *ListVpnSiteLinksResultPage) Next() error {
16300	return page.NextWithContext(context.Background())
16301}
16302
16303// NotDone returns true if the page enumeration should be started or is not yet complete.
16304func (page ListVpnSiteLinksResultPage) NotDone() bool {
16305	return !page.lvslr.IsEmpty()
16306}
16307
16308// Response returns the raw server response from the last page request.
16309func (page ListVpnSiteLinksResultPage) Response() ListVpnSiteLinksResult {
16310	return page.lvslr
16311}
16312
16313// Values returns the slice of values for the current page or nil if there are no values.
16314func (page ListVpnSiteLinksResultPage) Values() []VpnSiteLink {
16315	if page.lvslr.IsEmpty() {
16316		return nil
16317	}
16318	return *page.lvslr.Value
16319}
16320
16321// Creates a new instance of the ListVpnSiteLinksResultPage type.
16322func NewListVpnSiteLinksResultPage(cur ListVpnSiteLinksResult, getNextPage func(context.Context, ListVpnSiteLinksResult) (ListVpnSiteLinksResult, error)) ListVpnSiteLinksResultPage {
16323	return ListVpnSiteLinksResultPage{
16324		fn:    getNextPage,
16325		lvslr: cur,
16326	}
16327}
16328
16329// ListVpnSitesResult result of the request to list VpnSites. It contains a list of VpnSites and a URL
16330// nextLink to get the next set of results.
16331type ListVpnSitesResult struct {
16332	autorest.Response `json:"-"`
16333	// Value - List of VpnSites.
16334	Value *[]VpnSite `json:"value,omitempty"`
16335	// NextLink - URL to get the next set of operation list results if there are any.
16336	NextLink *string `json:"nextLink,omitempty"`
16337}
16338
16339// ListVpnSitesResultIterator provides access to a complete listing of VpnSite values.
16340type ListVpnSitesResultIterator struct {
16341	i    int
16342	page ListVpnSitesResultPage
16343}
16344
16345// NextWithContext advances to the next value.  If there was an error making
16346// the request the iterator does not advance and the error is returned.
16347func (iter *ListVpnSitesResultIterator) NextWithContext(ctx context.Context) (err error) {
16348	if tracing.IsEnabled() {
16349		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSitesResultIterator.NextWithContext")
16350		defer func() {
16351			sc := -1
16352			if iter.Response().Response.Response != nil {
16353				sc = iter.Response().Response.Response.StatusCode
16354			}
16355			tracing.EndSpan(ctx, sc, err)
16356		}()
16357	}
16358	iter.i++
16359	if iter.i < len(iter.page.Values()) {
16360		return nil
16361	}
16362	err = iter.page.NextWithContext(ctx)
16363	if err != nil {
16364		iter.i--
16365		return err
16366	}
16367	iter.i = 0
16368	return nil
16369}
16370
16371// Next advances to the next value.  If there was an error making
16372// the request the iterator does not advance and the error is returned.
16373// Deprecated: Use NextWithContext() instead.
16374func (iter *ListVpnSitesResultIterator) Next() error {
16375	return iter.NextWithContext(context.Background())
16376}
16377
16378// NotDone returns true if the enumeration should be started or is not yet complete.
16379func (iter ListVpnSitesResultIterator) NotDone() bool {
16380	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16381}
16382
16383// Response returns the raw server response from the last page request.
16384func (iter ListVpnSitesResultIterator) Response() ListVpnSitesResult {
16385	return iter.page.Response()
16386}
16387
16388// Value returns the current value or a zero-initialized value if the
16389// iterator has advanced beyond the end of the collection.
16390func (iter ListVpnSitesResultIterator) Value() VpnSite {
16391	if !iter.page.NotDone() {
16392		return VpnSite{}
16393	}
16394	return iter.page.Values()[iter.i]
16395}
16396
16397// Creates a new instance of the ListVpnSitesResultIterator type.
16398func NewListVpnSitesResultIterator(page ListVpnSitesResultPage) ListVpnSitesResultIterator {
16399	return ListVpnSitesResultIterator{page: page}
16400}
16401
16402// IsEmpty returns true if the ListResult contains no values.
16403func (lvsr ListVpnSitesResult) IsEmpty() bool {
16404	return lvsr.Value == nil || len(*lvsr.Value) == 0
16405}
16406
16407// hasNextLink returns true if the NextLink is not empty.
16408func (lvsr ListVpnSitesResult) hasNextLink() bool {
16409	return lvsr.NextLink != nil && len(*lvsr.NextLink) != 0
16410}
16411
16412// listVpnSitesResultPreparer prepares a request to retrieve the next set of results.
16413// It returns nil if no more results exist.
16414func (lvsr ListVpnSitesResult) listVpnSitesResultPreparer(ctx context.Context) (*http.Request, error) {
16415	if !lvsr.hasNextLink() {
16416		return nil, nil
16417	}
16418	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16419		autorest.AsJSON(),
16420		autorest.AsGet(),
16421		autorest.WithBaseURL(to.String(lvsr.NextLink)))
16422}
16423
16424// ListVpnSitesResultPage contains a page of VpnSite values.
16425type ListVpnSitesResultPage struct {
16426	fn   func(context.Context, ListVpnSitesResult) (ListVpnSitesResult, error)
16427	lvsr ListVpnSitesResult
16428}
16429
16430// NextWithContext advances to the next page of values.  If there was an error making
16431// the request the page does not advance and the error is returned.
16432func (page *ListVpnSitesResultPage) NextWithContext(ctx context.Context) (err error) {
16433	if tracing.IsEnabled() {
16434		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSitesResultPage.NextWithContext")
16435		defer func() {
16436			sc := -1
16437			if page.Response().Response.Response != nil {
16438				sc = page.Response().Response.Response.StatusCode
16439			}
16440			tracing.EndSpan(ctx, sc, err)
16441		}()
16442	}
16443	for {
16444		next, err := page.fn(ctx, page.lvsr)
16445		if err != nil {
16446			return err
16447		}
16448		page.lvsr = next
16449		if !next.hasNextLink() || !next.IsEmpty() {
16450			break
16451		}
16452	}
16453	return nil
16454}
16455
16456// Next advances to the next page of values.  If there was an error making
16457// the request the page does not advance and the error is returned.
16458// Deprecated: Use NextWithContext() instead.
16459func (page *ListVpnSitesResultPage) Next() error {
16460	return page.NextWithContext(context.Background())
16461}
16462
16463// NotDone returns true if the page enumeration should be started or is not yet complete.
16464func (page ListVpnSitesResultPage) NotDone() bool {
16465	return !page.lvsr.IsEmpty()
16466}
16467
16468// Response returns the raw server response from the last page request.
16469func (page ListVpnSitesResultPage) Response() ListVpnSitesResult {
16470	return page.lvsr
16471}
16472
16473// Values returns the slice of values for the current page or nil if there are no values.
16474func (page ListVpnSitesResultPage) Values() []VpnSite {
16475	if page.lvsr.IsEmpty() {
16476		return nil
16477	}
16478	return *page.lvsr.Value
16479}
16480
16481// Creates a new instance of the ListVpnSitesResultPage type.
16482func NewListVpnSitesResultPage(cur ListVpnSitesResult, getNextPage func(context.Context, ListVpnSitesResult) (ListVpnSitesResult, error)) ListVpnSitesResultPage {
16483	return ListVpnSitesResultPage{
16484		fn:   getNextPage,
16485		lvsr: cur,
16486	}
16487}
16488
16489// LoadBalancer loadBalancer resource.
16490type LoadBalancer struct {
16491	autorest.Response `json:"-"`
16492	// Sku - The load balancer SKU.
16493	Sku *LoadBalancerSku `json:"sku,omitempty"`
16494	// LoadBalancerPropertiesFormat - Properties of load balancer.
16495	*LoadBalancerPropertiesFormat `json:"properties,omitempty"`
16496	// Etag - A unique read-only string that changes whenever the resource is updated.
16497	Etag *string `json:"etag,omitempty"`
16498	// ID - Resource ID.
16499	ID *string `json:"id,omitempty"`
16500	// Name - READ-ONLY; Resource name.
16501	Name *string `json:"name,omitempty"`
16502	// Type - READ-ONLY; Resource type.
16503	Type *string `json:"type,omitempty"`
16504	// Location - Resource location.
16505	Location *string `json:"location,omitempty"`
16506	// Tags - Resource tags.
16507	Tags map[string]*string `json:"tags"`
16508}
16509
16510// MarshalJSON is the custom marshaler for LoadBalancer.
16511func (lb LoadBalancer) MarshalJSON() ([]byte, error) {
16512	objectMap := make(map[string]interface{})
16513	if lb.Sku != nil {
16514		objectMap["sku"] = lb.Sku
16515	}
16516	if lb.LoadBalancerPropertiesFormat != nil {
16517		objectMap["properties"] = lb.LoadBalancerPropertiesFormat
16518	}
16519	if lb.Etag != nil {
16520		objectMap["etag"] = lb.Etag
16521	}
16522	if lb.ID != nil {
16523		objectMap["id"] = lb.ID
16524	}
16525	if lb.Location != nil {
16526		objectMap["location"] = lb.Location
16527	}
16528	if lb.Tags != nil {
16529		objectMap["tags"] = lb.Tags
16530	}
16531	return json.Marshal(objectMap)
16532}
16533
16534// UnmarshalJSON is the custom unmarshaler for LoadBalancer struct.
16535func (lb *LoadBalancer) UnmarshalJSON(body []byte) error {
16536	var m map[string]*json.RawMessage
16537	err := json.Unmarshal(body, &m)
16538	if err != nil {
16539		return err
16540	}
16541	for k, v := range m {
16542		switch k {
16543		case "sku":
16544			if v != nil {
16545				var sku LoadBalancerSku
16546				err = json.Unmarshal(*v, &sku)
16547				if err != nil {
16548					return err
16549				}
16550				lb.Sku = &sku
16551			}
16552		case "properties":
16553			if v != nil {
16554				var loadBalancerPropertiesFormat LoadBalancerPropertiesFormat
16555				err = json.Unmarshal(*v, &loadBalancerPropertiesFormat)
16556				if err != nil {
16557					return err
16558				}
16559				lb.LoadBalancerPropertiesFormat = &loadBalancerPropertiesFormat
16560			}
16561		case "etag":
16562			if v != nil {
16563				var etag string
16564				err = json.Unmarshal(*v, &etag)
16565				if err != nil {
16566					return err
16567				}
16568				lb.Etag = &etag
16569			}
16570		case "id":
16571			if v != nil {
16572				var ID string
16573				err = json.Unmarshal(*v, &ID)
16574				if err != nil {
16575					return err
16576				}
16577				lb.ID = &ID
16578			}
16579		case "name":
16580			if v != nil {
16581				var name string
16582				err = json.Unmarshal(*v, &name)
16583				if err != nil {
16584					return err
16585				}
16586				lb.Name = &name
16587			}
16588		case "type":
16589			if v != nil {
16590				var typeVar string
16591				err = json.Unmarshal(*v, &typeVar)
16592				if err != nil {
16593					return err
16594				}
16595				lb.Type = &typeVar
16596			}
16597		case "location":
16598			if v != nil {
16599				var location string
16600				err = json.Unmarshal(*v, &location)
16601				if err != nil {
16602					return err
16603				}
16604				lb.Location = &location
16605			}
16606		case "tags":
16607			if v != nil {
16608				var tags map[string]*string
16609				err = json.Unmarshal(*v, &tags)
16610				if err != nil {
16611					return err
16612				}
16613				lb.Tags = tags
16614			}
16615		}
16616	}
16617
16618	return nil
16619}
16620
16621// LoadBalancerBackendAddressPoolListResult response for ListBackendAddressPool API service call.
16622type LoadBalancerBackendAddressPoolListResult struct {
16623	autorest.Response `json:"-"`
16624	// Value - A list of backend address pools in a load balancer.
16625	Value *[]BackendAddressPool `json:"value,omitempty"`
16626	// NextLink - READ-ONLY; The URL to get the next set of results.
16627	NextLink *string `json:"nextLink,omitempty"`
16628}
16629
16630// MarshalJSON is the custom marshaler for LoadBalancerBackendAddressPoolListResult.
16631func (lbbaplr LoadBalancerBackendAddressPoolListResult) MarshalJSON() ([]byte, error) {
16632	objectMap := make(map[string]interface{})
16633	if lbbaplr.Value != nil {
16634		objectMap["value"] = lbbaplr.Value
16635	}
16636	return json.Marshal(objectMap)
16637}
16638
16639// LoadBalancerBackendAddressPoolListResultIterator provides access to a complete listing of
16640// BackendAddressPool values.
16641type LoadBalancerBackendAddressPoolListResultIterator struct {
16642	i    int
16643	page LoadBalancerBackendAddressPoolListResultPage
16644}
16645
16646// NextWithContext advances to the next value.  If there was an error making
16647// the request the iterator does not advance and the error is returned.
16648func (iter *LoadBalancerBackendAddressPoolListResultIterator) NextWithContext(ctx context.Context) (err error) {
16649	if tracing.IsEnabled() {
16650		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultIterator.NextWithContext")
16651		defer func() {
16652			sc := -1
16653			if iter.Response().Response.Response != nil {
16654				sc = iter.Response().Response.Response.StatusCode
16655			}
16656			tracing.EndSpan(ctx, sc, err)
16657		}()
16658	}
16659	iter.i++
16660	if iter.i < len(iter.page.Values()) {
16661		return nil
16662	}
16663	err = iter.page.NextWithContext(ctx)
16664	if err != nil {
16665		iter.i--
16666		return err
16667	}
16668	iter.i = 0
16669	return nil
16670}
16671
16672// Next advances to the next value.  If there was an error making
16673// the request the iterator does not advance and the error is returned.
16674// Deprecated: Use NextWithContext() instead.
16675func (iter *LoadBalancerBackendAddressPoolListResultIterator) Next() error {
16676	return iter.NextWithContext(context.Background())
16677}
16678
16679// NotDone returns true if the enumeration should be started or is not yet complete.
16680func (iter LoadBalancerBackendAddressPoolListResultIterator) NotDone() bool {
16681	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16682}
16683
16684// Response returns the raw server response from the last page request.
16685func (iter LoadBalancerBackendAddressPoolListResultIterator) Response() LoadBalancerBackendAddressPoolListResult {
16686	return iter.page.Response()
16687}
16688
16689// Value returns the current value or a zero-initialized value if the
16690// iterator has advanced beyond the end of the collection.
16691func (iter LoadBalancerBackendAddressPoolListResultIterator) Value() BackendAddressPool {
16692	if !iter.page.NotDone() {
16693		return BackendAddressPool{}
16694	}
16695	return iter.page.Values()[iter.i]
16696}
16697
16698// Creates a new instance of the LoadBalancerBackendAddressPoolListResultIterator type.
16699func NewLoadBalancerBackendAddressPoolListResultIterator(page LoadBalancerBackendAddressPoolListResultPage) LoadBalancerBackendAddressPoolListResultIterator {
16700	return LoadBalancerBackendAddressPoolListResultIterator{page: page}
16701}
16702
16703// IsEmpty returns true if the ListResult contains no values.
16704func (lbbaplr LoadBalancerBackendAddressPoolListResult) IsEmpty() bool {
16705	return lbbaplr.Value == nil || len(*lbbaplr.Value) == 0
16706}
16707
16708// hasNextLink returns true if the NextLink is not empty.
16709func (lbbaplr LoadBalancerBackendAddressPoolListResult) hasNextLink() bool {
16710	return lbbaplr.NextLink != nil && len(*lbbaplr.NextLink) != 0
16711}
16712
16713// loadBalancerBackendAddressPoolListResultPreparer prepares a request to retrieve the next set of results.
16714// It returns nil if no more results exist.
16715func (lbbaplr LoadBalancerBackendAddressPoolListResult) loadBalancerBackendAddressPoolListResultPreparer(ctx context.Context) (*http.Request, error) {
16716	if !lbbaplr.hasNextLink() {
16717		return nil, nil
16718	}
16719	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16720		autorest.AsJSON(),
16721		autorest.AsGet(),
16722		autorest.WithBaseURL(to.String(lbbaplr.NextLink)))
16723}
16724
16725// LoadBalancerBackendAddressPoolListResultPage contains a page of BackendAddressPool values.
16726type LoadBalancerBackendAddressPoolListResultPage struct {
16727	fn      func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)
16728	lbbaplr LoadBalancerBackendAddressPoolListResult
16729}
16730
16731// NextWithContext advances to the next page of values.  If there was an error making
16732// the request the page does not advance and the error is returned.
16733func (page *LoadBalancerBackendAddressPoolListResultPage) NextWithContext(ctx context.Context) (err error) {
16734	if tracing.IsEnabled() {
16735		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultPage.NextWithContext")
16736		defer func() {
16737			sc := -1
16738			if page.Response().Response.Response != nil {
16739				sc = page.Response().Response.Response.StatusCode
16740			}
16741			tracing.EndSpan(ctx, sc, err)
16742		}()
16743	}
16744	for {
16745		next, err := page.fn(ctx, page.lbbaplr)
16746		if err != nil {
16747			return err
16748		}
16749		page.lbbaplr = next
16750		if !next.hasNextLink() || !next.IsEmpty() {
16751			break
16752		}
16753	}
16754	return nil
16755}
16756
16757// Next advances to the next page of values.  If there was an error making
16758// the request the page does not advance and the error is returned.
16759// Deprecated: Use NextWithContext() instead.
16760func (page *LoadBalancerBackendAddressPoolListResultPage) Next() error {
16761	return page.NextWithContext(context.Background())
16762}
16763
16764// NotDone returns true if the page enumeration should be started or is not yet complete.
16765func (page LoadBalancerBackendAddressPoolListResultPage) NotDone() bool {
16766	return !page.lbbaplr.IsEmpty()
16767}
16768
16769// Response returns the raw server response from the last page request.
16770func (page LoadBalancerBackendAddressPoolListResultPage) Response() LoadBalancerBackendAddressPoolListResult {
16771	return page.lbbaplr
16772}
16773
16774// Values returns the slice of values for the current page or nil if there are no values.
16775func (page LoadBalancerBackendAddressPoolListResultPage) Values() []BackendAddressPool {
16776	if page.lbbaplr.IsEmpty() {
16777		return nil
16778	}
16779	return *page.lbbaplr.Value
16780}
16781
16782// Creates a new instance of the LoadBalancerBackendAddressPoolListResultPage type.
16783func NewLoadBalancerBackendAddressPoolListResultPage(cur LoadBalancerBackendAddressPoolListResult, getNextPage func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)) LoadBalancerBackendAddressPoolListResultPage {
16784	return LoadBalancerBackendAddressPoolListResultPage{
16785		fn:      getNextPage,
16786		lbbaplr: cur,
16787	}
16788}
16789
16790// LoadBalancerFrontendIPConfigurationListResult response for ListFrontendIPConfiguration API service call.
16791type LoadBalancerFrontendIPConfigurationListResult struct {
16792	autorest.Response `json:"-"`
16793	// Value - A list of frontend IP configurations in a load balancer.
16794	Value *[]FrontendIPConfiguration `json:"value,omitempty"`
16795	// NextLink - READ-ONLY; The URL to get the next set of results.
16796	NextLink *string `json:"nextLink,omitempty"`
16797}
16798
16799// MarshalJSON is the custom marshaler for LoadBalancerFrontendIPConfigurationListResult.
16800func (lbficlr LoadBalancerFrontendIPConfigurationListResult) MarshalJSON() ([]byte, error) {
16801	objectMap := make(map[string]interface{})
16802	if lbficlr.Value != nil {
16803		objectMap["value"] = lbficlr.Value
16804	}
16805	return json.Marshal(objectMap)
16806}
16807
16808// LoadBalancerFrontendIPConfigurationListResultIterator provides access to a complete listing of
16809// FrontendIPConfiguration values.
16810type LoadBalancerFrontendIPConfigurationListResultIterator struct {
16811	i    int
16812	page LoadBalancerFrontendIPConfigurationListResultPage
16813}
16814
16815// NextWithContext advances to the next value.  If there was an error making
16816// the request the iterator does not advance and the error is returned.
16817func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
16818	if tracing.IsEnabled() {
16819		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultIterator.NextWithContext")
16820		defer func() {
16821			sc := -1
16822			if iter.Response().Response.Response != nil {
16823				sc = iter.Response().Response.Response.StatusCode
16824			}
16825			tracing.EndSpan(ctx, sc, err)
16826		}()
16827	}
16828	iter.i++
16829	if iter.i < len(iter.page.Values()) {
16830		return nil
16831	}
16832	err = iter.page.NextWithContext(ctx)
16833	if err != nil {
16834		iter.i--
16835		return err
16836	}
16837	iter.i = 0
16838	return nil
16839}
16840
16841// Next advances to the next value.  If there was an error making
16842// the request the iterator does not advance and the error is returned.
16843// Deprecated: Use NextWithContext() instead.
16844func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) Next() error {
16845	return iter.NextWithContext(context.Background())
16846}
16847
16848// NotDone returns true if the enumeration should be started or is not yet complete.
16849func (iter LoadBalancerFrontendIPConfigurationListResultIterator) NotDone() bool {
16850	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16851}
16852
16853// Response returns the raw server response from the last page request.
16854func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Response() LoadBalancerFrontendIPConfigurationListResult {
16855	return iter.page.Response()
16856}
16857
16858// Value returns the current value or a zero-initialized value if the
16859// iterator has advanced beyond the end of the collection.
16860func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Value() FrontendIPConfiguration {
16861	if !iter.page.NotDone() {
16862		return FrontendIPConfiguration{}
16863	}
16864	return iter.page.Values()[iter.i]
16865}
16866
16867// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultIterator type.
16868func NewLoadBalancerFrontendIPConfigurationListResultIterator(page LoadBalancerFrontendIPConfigurationListResultPage) LoadBalancerFrontendIPConfigurationListResultIterator {
16869	return LoadBalancerFrontendIPConfigurationListResultIterator{page: page}
16870}
16871
16872// IsEmpty returns true if the ListResult contains no values.
16873func (lbficlr LoadBalancerFrontendIPConfigurationListResult) IsEmpty() bool {
16874	return lbficlr.Value == nil || len(*lbficlr.Value) == 0
16875}
16876
16877// hasNextLink returns true if the NextLink is not empty.
16878func (lbficlr LoadBalancerFrontendIPConfigurationListResult) hasNextLink() bool {
16879	return lbficlr.NextLink != nil && len(*lbficlr.NextLink) != 0
16880}
16881
16882// loadBalancerFrontendIPConfigurationListResultPreparer prepares a request to retrieve the next set of results.
16883// It returns nil if no more results exist.
16884func (lbficlr LoadBalancerFrontendIPConfigurationListResult) loadBalancerFrontendIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
16885	if !lbficlr.hasNextLink() {
16886		return nil, nil
16887	}
16888	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16889		autorest.AsJSON(),
16890		autorest.AsGet(),
16891		autorest.WithBaseURL(to.String(lbficlr.NextLink)))
16892}
16893
16894// LoadBalancerFrontendIPConfigurationListResultPage contains a page of FrontendIPConfiguration values.
16895type LoadBalancerFrontendIPConfigurationListResultPage struct {
16896	fn      func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)
16897	lbficlr LoadBalancerFrontendIPConfigurationListResult
16898}
16899
16900// NextWithContext advances to the next page of values.  If there was an error making
16901// the request the page does not advance and the error is returned.
16902func (page *LoadBalancerFrontendIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
16903	if tracing.IsEnabled() {
16904		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultPage.NextWithContext")
16905		defer func() {
16906			sc := -1
16907			if page.Response().Response.Response != nil {
16908				sc = page.Response().Response.Response.StatusCode
16909			}
16910			tracing.EndSpan(ctx, sc, err)
16911		}()
16912	}
16913	for {
16914		next, err := page.fn(ctx, page.lbficlr)
16915		if err != nil {
16916			return err
16917		}
16918		page.lbficlr = next
16919		if !next.hasNextLink() || !next.IsEmpty() {
16920			break
16921		}
16922	}
16923	return nil
16924}
16925
16926// Next advances to the next page of values.  If there was an error making
16927// the request the page does not advance and the error is returned.
16928// Deprecated: Use NextWithContext() instead.
16929func (page *LoadBalancerFrontendIPConfigurationListResultPage) Next() error {
16930	return page.NextWithContext(context.Background())
16931}
16932
16933// NotDone returns true if the page enumeration should be started or is not yet complete.
16934func (page LoadBalancerFrontendIPConfigurationListResultPage) NotDone() bool {
16935	return !page.lbficlr.IsEmpty()
16936}
16937
16938// Response returns the raw server response from the last page request.
16939func (page LoadBalancerFrontendIPConfigurationListResultPage) Response() LoadBalancerFrontendIPConfigurationListResult {
16940	return page.lbficlr
16941}
16942
16943// Values returns the slice of values for the current page or nil if there are no values.
16944func (page LoadBalancerFrontendIPConfigurationListResultPage) Values() []FrontendIPConfiguration {
16945	if page.lbficlr.IsEmpty() {
16946		return nil
16947	}
16948	return *page.lbficlr.Value
16949}
16950
16951// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultPage type.
16952func NewLoadBalancerFrontendIPConfigurationListResultPage(cur LoadBalancerFrontendIPConfigurationListResult, getNextPage func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)) LoadBalancerFrontendIPConfigurationListResultPage {
16953	return LoadBalancerFrontendIPConfigurationListResultPage{
16954		fn:      getNextPage,
16955		lbficlr: cur,
16956	}
16957}
16958
16959// LoadBalancerListResult response for ListLoadBalancers API service call.
16960type LoadBalancerListResult struct {
16961	autorest.Response `json:"-"`
16962	// Value - A list of load balancers in a resource group.
16963	Value *[]LoadBalancer `json:"value,omitempty"`
16964	// NextLink - READ-ONLY; The URL to get the next set of results.
16965	NextLink *string `json:"nextLink,omitempty"`
16966}
16967
16968// MarshalJSON is the custom marshaler for LoadBalancerListResult.
16969func (lblr LoadBalancerListResult) MarshalJSON() ([]byte, error) {
16970	objectMap := make(map[string]interface{})
16971	if lblr.Value != nil {
16972		objectMap["value"] = lblr.Value
16973	}
16974	return json.Marshal(objectMap)
16975}
16976
16977// LoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values.
16978type LoadBalancerListResultIterator struct {
16979	i    int
16980	page LoadBalancerListResultPage
16981}
16982
16983// NextWithContext advances to the next value.  If there was an error making
16984// the request the iterator does not advance and the error is returned.
16985func (iter *LoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) {
16986	if tracing.IsEnabled() {
16987		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultIterator.NextWithContext")
16988		defer func() {
16989			sc := -1
16990			if iter.Response().Response.Response != nil {
16991				sc = iter.Response().Response.Response.StatusCode
16992			}
16993			tracing.EndSpan(ctx, sc, err)
16994		}()
16995	}
16996	iter.i++
16997	if iter.i < len(iter.page.Values()) {
16998		return nil
16999	}
17000	err = iter.page.NextWithContext(ctx)
17001	if err != nil {
17002		iter.i--
17003		return err
17004	}
17005	iter.i = 0
17006	return nil
17007}
17008
17009// Next advances to the next value.  If there was an error making
17010// the request the iterator does not advance and the error is returned.
17011// Deprecated: Use NextWithContext() instead.
17012func (iter *LoadBalancerListResultIterator) Next() error {
17013	return iter.NextWithContext(context.Background())
17014}
17015
17016// NotDone returns true if the enumeration should be started or is not yet complete.
17017func (iter LoadBalancerListResultIterator) NotDone() bool {
17018	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17019}
17020
17021// Response returns the raw server response from the last page request.
17022func (iter LoadBalancerListResultIterator) Response() LoadBalancerListResult {
17023	return iter.page.Response()
17024}
17025
17026// Value returns the current value or a zero-initialized value if the
17027// iterator has advanced beyond the end of the collection.
17028func (iter LoadBalancerListResultIterator) Value() LoadBalancer {
17029	if !iter.page.NotDone() {
17030		return LoadBalancer{}
17031	}
17032	return iter.page.Values()[iter.i]
17033}
17034
17035// Creates a new instance of the LoadBalancerListResultIterator type.
17036func NewLoadBalancerListResultIterator(page LoadBalancerListResultPage) LoadBalancerListResultIterator {
17037	return LoadBalancerListResultIterator{page: page}
17038}
17039
17040// IsEmpty returns true if the ListResult contains no values.
17041func (lblr LoadBalancerListResult) IsEmpty() bool {
17042	return lblr.Value == nil || len(*lblr.Value) == 0
17043}
17044
17045// hasNextLink returns true if the NextLink is not empty.
17046func (lblr LoadBalancerListResult) hasNextLink() bool {
17047	return lblr.NextLink != nil && len(*lblr.NextLink) != 0
17048}
17049
17050// loadBalancerListResultPreparer prepares a request to retrieve the next set of results.
17051// It returns nil if no more results exist.
17052func (lblr LoadBalancerListResult) loadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) {
17053	if !lblr.hasNextLink() {
17054		return nil, nil
17055	}
17056	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17057		autorest.AsJSON(),
17058		autorest.AsGet(),
17059		autorest.WithBaseURL(to.String(lblr.NextLink)))
17060}
17061
17062// LoadBalancerListResultPage contains a page of LoadBalancer values.
17063type LoadBalancerListResultPage struct {
17064	fn   func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)
17065	lblr LoadBalancerListResult
17066}
17067
17068// NextWithContext advances to the next page of values.  If there was an error making
17069// the request the page does not advance and the error is returned.
17070func (page *LoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) {
17071	if tracing.IsEnabled() {
17072		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultPage.NextWithContext")
17073		defer func() {
17074			sc := -1
17075			if page.Response().Response.Response != nil {
17076				sc = page.Response().Response.Response.StatusCode
17077			}
17078			tracing.EndSpan(ctx, sc, err)
17079		}()
17080	}
17081	for {
17082		next, err := page.fn(ctx, page.lblr)
17083		if err != nil {
17084			return err
17085		}
17086		page.lblr = next
17087		if !next.hasNextLink() || !next.IsEmpty() {
17088			break
17089		}
17090	}
17091	return nil
17092}
17093
17094// Next advances to the next page of values.  If there was an error making
17095// the request the page does not advance and the error is returned.
17096// Deprecated: Use NextWithContext() instead.
17097func (page *LoadBalancerListResultPage) Next() error {
17098	return page.NextWithContext(context.Background())
17099}
17100
17101// NotDone returns true if the page enumeration should be started or is not yet complete.
17102func (page LoadBalancerListResultPage) NotDone() bool {
17103	return !page.lblr.IsEmpty()
17104}
17105
17106// Response returns the raw server response from the last page request.
17107func (page LoadBalancerListResultPage) Response() LoadBalancerListResult {
17108	return page.lblr
17109}
17110
17111// Values returns the slice of values for the current page or nil if there are no values.
17112func (page LoadBalancerListResultPage) Values() []LoadBalancer {
17113	if page.lblr.IsEmpty() {
17114		return nil
17115	}
17116	return *page.lblr.Value
17117}
17118
17119// Creates a new instance of the LoadBalancerListResultPage type.
17120func NewLoadBalancerListResultPage(cur LoadBalancerListResult, getNextPage func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)) LoadBalancerListResultPage {
17121	return LoadBalancerListResultPage{
17122		fn:   getNextPage,
17123		lblr: cur,
17124	}
17125}
17126
17127// LoadBalancerLoadBalancingRuleListResult response for ListLoadBalancingRule API service call.
17128type LoadBalancerLoadBalancingRuleListResult struct {
17129	autorest.Response `json:"-"`
17130	// Value - A list of load balancing rules in a load balancer.
17131	Value *[]LoadBalancingRule `json:"value,omitempty"`
17132	// NextLink - READ-ONLY; The URL to get the next set of results.
17133	NextLink *string `json:"nextLink,omitempty"`
17134}
17135
17136// MarshalJSON is the custom marshaler for LoadBalancerLoadBalancingRuleListResult.
17137func (lblbrlr LoadBalancerLoadBalancingRuleListResult) MarshalJSON() ([]byte, error) {
17138	objectMap := make(map[string]interface{})
17139	if lblbrlr.Value != nil {
17140		objectMap["value"] = lblbrlr.Value
17141	}
17142	return json.Marshal(objectMap)
17143}
17144
17145// LoadBalancerLoadBalancingRuleListResultIterator provides access to a complete listing of
17146// LoadBalancingRule values.
17147type LoadBalancerLoadBalancingRuleListResultIterator struct {
17148	i    int
17149	page LoadBalancerLoadBalancingRuleListResultPage
17150}
17151
17152// NextWithContext advances to the next value.  If there was an error making
17153// the request the iterator does not advance and the error is returned.
17154func (iter *LoadBalancerLoadBalancingRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
17155	if tracing.IsEnabled() {
17156		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultIterator.NextWithContext")
17157		defer func() {
17158			sc := -1
17159			if iter.Response().Response.Response != nil {
17160				sc = iter.Response().Response.Response.StatusCode
17161			}
17162			tracing.EndSpan(ctx, sc, err)
17163		}()
17164	}
17165	iter.i++
17166	if iter.i < len(iter.page.Values()) {
17167		return nil
17168	}
17169	err = iter.page.NextWithContext(ctx)
17170	if err != nil {
17171		iter.i--
17172		return err
17173	}
17174	iter.i = 0
17175	return nil
17176}
17177
17178// Next advances to the next value.  If there was an error making
17179// the request the iterator does not advance and the error is returned.
17180// Deprecated: Use NextWithContext() instead.
17181func (iter *LoadBalancerLoadBalancingRuleListResultIterator) Next() error {
17182	return iter.NextWithContext(context.Background())
17183}
17184
17185// NotDone returns true if the enumeration should be started or is not yet complete.
17186func (iter LoadBalancerLoadBalancingRuleListResultIterator) NotDone() bool {
17187	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17188}
17189
17190// Response returns the raw server response from the last page request.
17191func (iter LoadBalancerLoadBalancingRuleListResultIterator) Response() LoadBalancerLoadBalancingRuleListResult {
17192	return iter.page.Response()
17193}
17194
17195// Value returns the current value or a zero-initialized value if the
17196// iterator has advanced beyond the end of the collection.
17197func (iter LoadBalancerLoadBalancingRuleListResultIterator) Value() LoadBalancingRule {
17198	if !iter.page.NotDone() {
17199		return LoadBalancingRule{}
17200	}
17201	return iter.page.Values()[iter.i]
17202}
17203
17204// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultIterator type.
17205func NewLoadBalancerLoadBalancingRuleListResultIterator(page LoadBalancerLoadBalancingRuleListResultPage) LoadBalancerLoadBalancingRuleListResultIterator {
17206	return LoadBalancerLoadBalancingRuleListResultIterator{page: page}
17207}
17208
17209// IsEmpty returns true if the ListResult contains no values.
17210func (lblbrlr LoadBalancerLoadBalancingRuleListResult) IsEmpty() bool {
17211	return lblbrlr.Value == nil || len(*lblbrlr.Value) == 0
17212}
17213
17214// hasNextLink returns true if the NextLink is not empty.
17215func (lblbrlr LoadBalancerLoadBalancingRuleListResult) hasNextLink() bool {
17216	return lblbrlr.NextLink != nil && len(*lblbrlr.NextLink) != 0
17217}
17218
17219// loadBalancerLoadBalancingRuleListResultPreparer prepares a request to retrieve the next set of results.
17220// It returns nil if no more results exist.
17221func (lblbrlr LoadBalancerLoadBalancingRuleListResult) loadBalancerLoadBalancingRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
17222	if !lblbrlr.hasNextLink() {
17223		return nil, nil
17224	}
17225	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17226		autorest.AsJSON(),
17227		autorest.AsGet(),
17228		autorest.WithBaseURL(to.String(lblbrlr.NextLink)))
17229}
17230
17231// LoadBalancerLoadBalancingRuleListResultPage contains a page of LoadBalancingRule values.
17232type LoadBalancerLoadBalancingRuleListResultPage struct {
17233	fn      func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)
17234	lblbrlr LoadBalancerLoadBalancingRuleListResult
17235}
17236
17237// NextWithContext advances to the next page of values.  If there was an error making
17238// the request the page does not advance and the error is returned.
17239func (page *LoadBalancerLoadBalancingRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
17240	if tracing.IsEnabled() {
17241		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultPage.NextWithContext")
17242		defer func() {
17243			sc := -1
17244			if page.Response().Response.Response != nil {
17245				sc = page.Response().Response.Response.StatusCode
17246			}
17247			tracing.EndSpan(ctx, sc, err)
17248		}()
17249	}
17250	for {
17251		next, err := page.fn(ctx, page.lblbrlr)
17252		if err != nil {
17253			return err
17254		}
17255		page.lblbrlr = next
17256		if !next.hasNextLink() || !next.IsEmpty() {
17257			break
17258		}
17259	}
17260	return nil
17261}
17262
17263// Next advances to the next page of values.  If there was an error making
17264// the request the page does not advance and the error is returned.
17265// Deprecated: Use NextWithContext() instead.
17266func (page *LoadBalancerLoadBalancingRuleListResultPage) Next() error {
17267	return page.NextWithContext(context.Background())
17268}
17269
17270// NotDone returns true if the page enumeration should be started or is not yet complete.
17271func (page LoadBalancerLoadBalancingRuleListResultPage) NotDone() bool {
17272	return !page.lblbrlr.IsEmpty()
17273}
17274
17275// Response returns the raw server response from the last page request.
17276func (page LoadBalancerLoadBalancingRuleListResultPage) Response() LoadBalancerLoadBalancingRuleListResult {
17277	return page.lblbrlr
17278}
17279
17280// Values returns the slice of values for the current page or nil if there are no values.
17281func (page LoadBalancerLoadBalancingRuleListResultPage) Values() []LoadBalancingRule {
17282	if page.lblbrlr.IsEmpty() {
17283		return nil
17284	}
17285	return *page.lblbrlr.Value
17286}
17287
17288// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultPage type.
17289func NewLoadBalancerLoadBalancingRuleListResultPage(cur LoadBalancerLoadBalancingRuleListResult, getNextPage func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)) LoadBalancerLoadBalancingRuleListResultPage {
17290	return LoadBalancerLoadBalancingRuleListResultPage{
17291		fn:      getNextPage,
17292		lblbrlr: cur,
17293	}
17294}
17295
17296// LoadBalancerOutboundRuleListResult response for ListOutboundRule API service call.
17297type LoadBalancerOutboundRuleListResult struct {
17298	autorest.Response `json:"-"`
17299	// Value - A list of outbound rules in a load balancer.
17300	Value *[]OutboundRule `json:"value,omitempty"`
17301	// NextLink - READ-ONLY; The URL to get the next set of results.
17302	NextLink *string `json:"nextLink,omitempty"`
17303}
17304
17305// MarshalJSON is the custom marshaler for LoadBalancerOutboundRuleListResult.
17306func (lborlr LoadBalancerOutboundRuleListResult) MarshalJSON() ([]byte, error) {
17307	objectMap := make(map[string]interface{})
17308	if lborlr.Value != nil {
17309		objectMap["value"] = lborlr.Value
17310	}
17311	return json.Marshal(objectMap)
17312}
17313
17314// LoadBalancerOutboundRuleListResultIterator provides access to a complete listing of OutboundRule values.
17315type LoadBalancerOutboundRuleListResultIterator struct {
17316	i    int
17317	page LoadBalancerOutboundRuleListResultPage
17318}
17319
17320// NextWithContext advances to the next value.  If there was an error making
17321// the request the iterator does not advance and the error is returned.
17322func (iter *LoadBalancerOutboundRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
17323	if tracing.IsEnabled() {
17324		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerOutboundRuleListResultIterator.NextWithContext")
17325		defer func() {
17326			sc := -1
17327			if iter.Response().Response.Response != nil {
17328				sc = iter.Response().Response.Response.StatusCode
17329			}
17330			tracing.EndSpan(ctx, sc, err)
17331		}()
17332	}
17333	iter.i++
17334	if iter.i < len(iter.page.Values()) {
17335		return nil
17336	}
17337	err = iter.page.NextWithContext(ctx)
17338	if err != nil {
17339		iter.i--
17340		return err
17341	}
17342	iter.i = 0
17343	return nil
17344}
17345
17346// Next advances to the next value.  If there was an error making
17347// the request the iterator does not advance and the error is returned.
17348// Deprecated: Use NextWithContext() instead.
17349func (iter *LoadBalancerOutboundRuleListResultIterator) Next() error {
17350	return iter.NextWithContext(context.Background())
17351}
17352
17353// NotDone returns true if the enumeration should be started or is not yet complete.
17354func (iter LoadBalancerOutboundRuleListResultIterator) NotDone() bool {
17355	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17356}
17357
17358// Response returns the raw server response from the last page request.
17359func (iter LoadBalancerOutboundRuleListResultIterator) Response() LoadBalancerOutboundRuleListResult {
17360	return iter.page.Response()
17361}
17362
17363// Value returns the current value or a zero-initialized value if the
17364// iterator has advanced beyond the end of the collection.
17365func (iter LoadBalancerOutboundRuleListResultIterator) Value() OutboundRule {
17366	if !iter.page.NotDone() {
17367		return OutboundRule{}
17368	}
17369	return iter.page.Values()[iter.i]
17370}
17371
17372// Creates a new instance of the LoadBalancerOutboundRuleListResultIterator type.
17373func NewLoadBalancerOutboundRuleListResultIterator(page LoadBalancerOutboundRuleListResultPage) LoadBalancerOutboundRuleListResultIterator {
17374	return LoadBalancerOutboundRuleListResultIterator{page: page}
17375}
17376
17377// IsEmpty returns true if the ListResult contains no values.
17378func (lborlr LoadBalancerOutboundRuleListResult) IsEmpty() bool {
17379	return lborlr.Value == nil || len(*lborlr.Value) == 0
17380}
17381
17382// hasNextLink returns true if the NextLink is not empty.
17383func (lborlr LoadBalancerOutboundRuleListResult) hasNextLink() bool {
17384	return lborlr.NextLink != nil && len(*lborlr.NextLink) != 0
17385}
17386
17387// loadBalancerOutboundRuleListResultPreparer prepares a request to retrieve the next set of results.
17388// It returns nil if no more results exist.
17389func (lborlr LoadBalancerOutboundRuleListResult) loadBalancerOutboundRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
17390	if !lborlr.hasNextLink() {
17391		return nil, nil
17392	}
17393	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17394		autorest.AsJSON(),
17395		autorest.AsGet(),
17396		autorest.WithBaseURL(to.String(lborlr.NextLink)))
17397}
17398
17399// LoadBalancerOutboundRuleListResultPage contains a page of OutboundRule values.
17400type LoadBalancerOutboundRuleListResultPage struct {
17401	fn     func(context.Context, LoadBalancerOutboundRuleListResult) (LoadBalancerOutboundRuleListResult, error)
17402	lborlr LoadBalancerOutboundRuleListResult
17403}
17404
17405// NextWithContext advances to the next page of values.  If there was an error making
17406// the request the page does not advance and the error is returned.
17407func (page *LoadBalancerOutboundRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
17408	if tracing.IsEnabled() {
17409		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerOutboundRuleListResultPage.NextWithContext")
17410		defer func() {
17411			sc := -1
17412			if page.Response().Response.Response != nil {
17413				sc = page.Response().Response.Response.StatusCode
17414			}
17415			tracing.EndSpan(ctx, sc, err)
17416		}()
17417	}
17418	for {
17419		next, err := page.fn(ctx, page.lborlr)
17420		if err != nil {
17421			return err
17422		}
17423		page.lborlr = next
17424		if !next.hasNextLink() || !next.IsEmpty() {
17425			break
17426		}
17427	}
17428	return nil
17429}
17430
17431// Next advances to the next page of values.  If there was an error making
17432// the request the page does not advance and the error is returned.
17433// Deprecated: Use NextWithContext() instead.
17434func (page *LoadBalancerOutboundRuleListResultPage) Next() error {
17435	return page.NextWithContext(context.Background())
17436}
17437
17438// NotDone returns true if the page enumeration should be started or is not yet complete.
17439func (page LoadBalancerOutboundRuleListResultPage) NotDone() bool {
17440	return !page.lborlr.IsEmpty()
17441}
17442
17443// Response returns the raw server response from the last page request.
17444func (page LoadBalancerOutboundRuleListResultPage) Response() LoadBalancerOutboundRuleListResult {
17445	return page.lborlr
17446}
17447
17448// Values returns the slice of values for the current page or nil if there are no values.
17449func (page LoadBalancerOutboundRuleListResultPage) Values() []OutboundRule {
17450	if page.lborlr.IsEmpty() {
17451		return nil
17452	}
17453	return *page.lborlr.Value
17454}
17455
17456// Creates a new instance of the LoadBalancerOutboundRuleListResultPage type.
17457func NewLoadBalancerOutboundRuleListResultPage(cur LoadBalancerOutboundRuleListResult, getNextPage func(context.Context, LoadBalancerOutboundRuleListResult) (LoadBalancerOutboundRuleListResult, error)) LoadBalancerOutboundRuleListResultPage {
17458	return LoadBalancerOutboundRuleListResultPage{
17459		fn:     getNextPage,
17460		lborlr: cur,
17461	}
17462}
17463
17464// LoadBalancerProbeListResult response for ListProbe API service call.
17465type LoadBalancerProbeListResult struct {
17466	autorest.Response `json:"-"`
17467	// Value - A list of probes in a load balancer.
17468	Value *[]Probe `json:"value,omitempty"`
17469	// NextLink - READ-ONLY; The URL to get the next set of results.
17470	NextLink *string `json:"nextLink,omitempty"`
17471}
17472
17473// MarshalJSON is the custom marshaler for LoadBalancerProbeListResult.
17474func (lbplr LoadBalancerProbeListResult) MarshalJSON() ([]byte, error) {
17475	objectMap := make(map[string]interface{})
17476	if lbplr.Value != nil {
17477		objectMap["value"] = lbplr.Value
17478	}
17479	return json.Marshal(objectMap)
17480}
17481
17482// LoadBalancerProbeListResultIterator provides access to a complete listing of Probe values.
17483type LoadBalancerProbeListResultIterator struct {
17484	i    int
17485	page LoadBalancerProbeListResultPage
17486}
17487
17488// NextWithContext advances to the next value.  If there was an error making
17489// the request the iterator does not advance and the error is returned.
17490func (iter *LoadBalancerProbeListResultIterator) NextWithContext(ctx context.Context) (err error) {
17491	if tracing.IsEnabled() {
17492		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultIterator.NextWithContext")
17493		defer func() {
17494			sc := -1
17495			if iter.Response().Response.Response != nil {
17496				sc = iter.Response().Response.Response.StatusCode
17497			}
17498			tracing.EndSpan(ctx, sc, err)
17499		}()
17500	}
17501	iter.i++
17502	if iter.i < len(iter.page.Values()) {
17503		return nil
17504	}
17505	err = iter.page.NextWithContext(ctx)
17506	if err != nil {
17507		iter.i--
17508		return err
17509	}
17510	iter.i = 0
17511	return nil
17512}
17513
17514// Next advances to the next value.  If there was an error making
17515// the request the iterator does not advance and the error is returned.
17516// Deprecated: Use NextWithContext() instead.
17517func (iter *LoadBalancerProbeListResultIterator) Next() error {
17518	return iter.NextWithContext(context.Background())
17519}
17520
17521// NotDone returns true if the enumeration should be started or is not yet complete.
17522func (iter LoadBalancerProbeListResultIterator) NotDone() bool {
17523	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17524}
17525
17526// Response returns the raw server response from the last page request.
17527func (iter LoadBalancerProbeListResultIterator) Response() LoadBalancerProbeListResult {
17528	return iter.page.Response()
17529}
17530
17531// Value returns the current value or a zero-initialized value if the
17532// iterator has advanced beyond the end of the collection.
17533func (iter LoadBalancerProbeListResultIterator) Value() Probe {
17534	if !iter.page.NotDone() {
17535		return Probe{}
17536	}
17537	return iter.page.Values()[iter.i]
17538}
17539
17540// Creates a new instance of the LoadBalancerProbeListResultIterator type.
17541func NewLoadBalancerProbeListResultIterator(page LoadBalancerProbeListResultPage) LoadBalancerProbeListResultIterator {
17542	return LoadBalancerProbeListResultIterator{page: page}
17543}
17544
17545// IsEmpty returns true if the ListResult contains no values.
17546func (lbplr LoadBalancerProbeListResult) IsEmpty() bool {
17547	return lbplr.Value == nil || len(*lbplr.Value) == 0
17548}
17549
17550// hasNextLink returns true if the NextLink is not empty.
17551func (lbplr LoadBalancerProbeListResult) hasNextLink() bool {
17552	return lbplr.NextLink != nil && len(*lbplr.NextLink) != 0
17553}
17554
17555// loadBalancerProbeListResultPreparer prepares a request to retrieve the next set of results.
17556// It returns nil if no more results exist.
17557func (lbplr LoadBalancerProbeListResult) loadBalancerProbeListResultPreparer(ctx context.Context) (*http.Request, error) {
17558	if !lbplr.hasNextLink() {
17559		return nil, nil
17560	}
17561	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17562		autorest.AsJSON(),
17563		autorest.AsGet(),
17564		autorest.WithBaseURL(to.String(lbplr.NextLink)))
17565}
17566
17567// LoadBalancerProbeListResultPage contains a page of Probe values.
17568type LoadBalancerProbeListResultPage struct {
17569	fn    func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)
17570	lbplr LoadBalancerProbeListResult
17571}
17572
17573// NextWithContext advances to the next page of values.  If there was an error making
17574// the request the page does not advance and the error is returned.
17575func (page *LoadBalancerProbeListResultPage) NextWithContext(ctx context.Context) (err error) {
17576	if tracing.IsEnabled() {
17577		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultPage.NextWithContext")
17578		defer func() {
17579			sc := -1
17580			if page.Response().Response.Response != nil {
17581				sc = page.Response().Response.Response.StatusCode
17582			}
17583			tracing.EndSpan(ctx, sc, err)
17584		}()
17585	}
17586	for {
17587		next, err := page.fn(ctx, page.lbplr)
17588		if err != nil {
17589			return err
17590		}
17591		page.lbplr = next
17592		if !next.hasNextLink() || !next.IsEmpty() {
17593			break
17594		}
17595	}
17596	return nil
17597}
17598
17599// Next advances to the next page of values.  If there was an error making
17600// the request the page does not advance and the error is returned.
17601// Deprecated: Use NextWithContext() instead.
17602func (page *LoadBalancerProbeListResultPage) Next() error {
17603	return page.NextWithContext(context.Background())
17604}
17605
17606// NotDone returns true if the page enumeration should be started or is not yet complete.
17607func (page LoadBalancerProbeListResultPage) NotDone() bool {
17608	return !page.lbplr.IsEmpty()
17609}
17610
17611// Response returns the raw server response from the last page request.
17612func (page LoadBalancerProbeListResultPage) Response() LoadBalancerProbeListResult {
17613	return page.lbplr
17614}
17615
17616// Values returns the slice of values for the current page or nil if there are no values.
17617func (page LoadBalancerProbeListResultPage) Values() []Probe {
17618	if page.lbplr.IsEmpty() {
17619		return nil
17620	}
17621	return *page.lbplr.Value
17622}
17623
17624// Creates a new instance of the LoadBalancerProbeListResultPage type.
17625func NewLoadBalancerProbeListResultPage(cur LoadBalancerProbeListResult, getNextPage func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)) LoadBalancerProbeListResultPage {
17626	return LoadBalancerProbeListResultPage{
17627		fn:    getNextPage,
17628		lbplr: cur,
17629	}
17630}
17631
17632// LoadBalancerPropertiesFormat properties of the load balancer.
17633type LoadBalancerPropertiesFormat struct {
17634	// FrontendIPConfigurations - Object representing the frontend IPs to be used for the load balancer.
17635	FrontendIPConfigurations *[]FrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"`
17636	// BackendAddressPools - Collection of backend address pools used by a load balancer.
17637	BackendAddressPools *[]BackendAddressPool `json:"backendAddressPools,omitempty"`
17638	// LoadBalancingRules - Object collection representing the load balancing rules Gets the provisioning.
17639	LoadBalancingRules *[]LoadBalancingRule `json:"loadBalancingRules,omitempty"`
17640	// Probes - Collection of probe objects used in the load balancer.
17641	Probes *[]Probe `json:"probes,omitempty"`
17642	// 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.
17643	InboundNatRules *[]InboundNatRule `json:"inboundNatRules,omitempty"`
17644	// 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.
17645	InboundNatPools *[]InboundNatPool `json:"inboundNatPools,omitempty"`
17646	// OutboundRules - The outbound rules.
17647	OutboundRules *[]OutboundRule `json:"outboundRules,omitempty"`
17648	// ResourceGUID - The resource GUID property of the load balancer resource.
17649	ResourceGUID *string `json:"resourceGuid,omitempty"`
17650	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
17651	ProvisioningState *string `json:"provisioningState,omitempty"`
17652}
17653
17654// LoadBalancersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
17655// long-running operation.
17656type LoadBalancersCreateOrUpdateFuture struct {
17657	azure.FutureAPI
17658	// Result returns the result of the asynchronous operation.
17659	// If the operation has not completed it will return an error.
17660	Result func(LoadBalancersClient) (LoadBalancer, error)
17661}
17662
17663// LoadBalancersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
17664// operation.
17665type LoadBalancersDeleteFuture struct {
17666	azure.FutureAPI
17667	// Result returns the result of the asynchronous operation.
17668	// If the operation has not completed it will return an error.
17669	Result func(LoadBalancersClient) (autorest.Response, error)
17670}
17671
17672// LoadBalancerSku SKU of a load balancer.
17673type LoadBalancerSku struct {
17674	// Name - Name of a load balancer SKU. Possible values include: 'LoadBalancerSkuNameBasic', 'LoadBalancerSkuNameStandard'
17675	Name LoadBalancerSkuName `json:"name,omitempty"`
17676}
17677
17678// LoadBalancersUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
17679// operation.
17680type LoadBalancersUpdateTagsFuture struct {
17681	azure.FutureAPI
17682	// Result returns the result of the asynchronous operation.
17683	// If the operation has not completed it will return an error.
17684	Result func(LoadBalancersClient) (LoadBalancer, error)
17685}
17686
17687// LoadBalancingRule a load balancing rule for a load balancer.
17688type LoadBalancingRule struct {
17689	autorest.Response `json:"-"`
17690	// LoadBalancingRulePropertiesFormat - Properties of load balancer load balancing rule.
17691	*LoadBalancingRulePropertiesFormat `json:"properties,omitempty"`
17692	// Name - The name of the resource that is unique within the set of load balancing rules used by the load balancer. This name can be used to access the resource.
17693	Name *string `json:"name,omitempty"`
17694	// Etag - A unique read-only string that changes whenever the resource is updated.
17695	Etag *string `json:"etag,omitempty"`
17696	// Type - READ-ONLY; Type of the resource.
17697	Type *string `json:"type,omitempty"`
17698	// ID - Resource ID.
17699	ID *string `json:"id,omitempty"`
17700}
17701
17702// MarshalJSON is the custom marshaler for LoadBalancingRule.
17703func (lbr LoadBalancingRule) MarshalJSON() ([]byte, error) {
17704	objectMap := make(map[string]interface{})
17705	if lbr.LoadBalancingRulePropertiesFormat != nil {
17706		objectMap["properties"] = lbr.LoadBalancingRulePropertiesFormat
17707	}
17708	if lbr.Name != nil {
17709		objectMap["name"] = lbr.Name
17710	}
17711	if lbr.Etag != nil {
17712		objectMap["etag"] = lbr.Etag
17713	}
17714	if lbr.ID != nil {
17715		objectMap["id"] = lbr.ID
17716	}
17717	return json.Marshal(objectMap)
17718}
17719
17720// UnmarshalJSON is the custom unmarshaler for LoadBalancingRule struct.
17721func (lbr *LoadBalancingRule) UnmarshalJSON(body []byte) error {
17722	var m map[string]*json.RawMessage
17723	err := json.Unmarshal(body, &m)
17724	if err != nil {
17725		return err
17726	}
17727	for k, v := range m {
17728		switch k {
17729		case "properties":
17730			if v != nil {
17731				var loadBalancingRulePropertiesFormat LoadBalancingRulePropertiesFormat
17732				err = json.Unmarshal(*v, &loadBalancingRulePropertiesFormat)
17733				if err != nil {
17734					return err
17735				}
17736				lbr.LoadBalancingRulePropertiesFormat = &loadBalancingRulePropertiesFormat
17737			}
17738		case "name":
17739			if v != nil {
17740				var name string
17741				err = json.Unmarshal(*v, &name)
17742				if err != nil {
17743					return err
17744				}
17745				lbr.Name = &name
17746			}
17747		case "etag":
17748			if v != nil {
17749				var etag string
17750				err = json.Unmarshal(*v, &etag)
17751				if err != nil {
17752					return err
17753				}
17754				lbr.Etag = &etag
17755			}
17756		case "type":
17757			if v != nil {
17758				var typeVar string
17759				err = json.Unmarshal(*v, &typeVar)
17760				if err != nil {
17761					return err
17762				}
17763				lbr.Type = &typeVar
17764			}
17765		case "id":
17766			if v != nil {
17767				var ID string
17768				err = json.Unmarshal(*v, &ID)
17769				if err != nil {
17770					return err
17771				}
17772				lbr.ID = &ID
17773			}
17774		}
17775	}
17776
17777	return nil
17778}
17779
17780// LoadBalancingRulePropertiesFormat properties of the load balancer.
17781type LoadBalancingRulePropertiesFormat struct {
17782	// FrontendIPConfiguration - A reference to frontend IP addresses.
17783	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
17784	// BackendAddressPool - A reference to a pool of DIPs. Inbound traffic is randomly load balanced across IPs in the backend IPs.
17785	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
17786	// Probe - The reference of the load balancer probe used by the load balancing rule.
17787	Probe *SubResource `json:"probe,omitempty"`
17788	// Protocol - The reference to the transport protocol used by the load balancing rule. Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
17789	Protocol TransportProtocol `json:"protocol,omitempty"`
17790	// LoadDistribution - The load distribution policy for this rule. Possible values include: 'LoadDistributionDefault', 'LoadDistributionSourceIP', 'LoadDistributionSourceIPProtocol'
17791	LoadDistribution LoadDistribution `json:"loadDistribution,omitempty"`
17792	// 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".
17793	FrontendPort *int32 `json:"frontendPort,omitempty"`
17794	// BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 0 and 65535. Note that value 0 enables "Any Port".
17795	BackendPort *int32 `json:"backendPort,omitempty"`
17796	// 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.
17797	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
17798	// 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.
17799	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
17800	// 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.
17801	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
17802	// DisableOutboundSnat - Configures SNAT for the VMs in the backend pool to use the publicIP address specified in the frontend of the load balancing rule.
17803	DisableOutboundSnat *bool `json:"disableOutboundSnat,omitempty"`
17804	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
17805	ProvisioningState *string `json:"provisioningState,omitempty"`
17806}
17807
17808// LocalNetworkGateway a common class for general resource information.
17809type LocalNetworkGateway struct {
17810	autorest.Response `json:"-"`
17811	// LocalNetworkGatewayPropertiesFormat - Properties of the local network gateway.
17812	*LocalNetworkGatewayPropertiesFormat `json:"properties,omitempty"`
17813	// Etag - A unique read-only string that changes whenever the resource is updated.
17814	Etag *string `json:"etag,omitempty"`
17815	// ID - Resource ID.
17816	ID *string `json:"id,omitempty"`
17817	// Name - READ-ONLY; Resource name.
17818	Name *string `json:"name,omitempty"`
17819	// Type - READ-ONLY; Resource type.
17820	Type *string `json:"type,omitempty"`
17821	// Location - Resource location.
17822	Location *string `json:"location,omitempty"`
17823	// Tags - Resource tags.
17824	Tags map[string]*string `json:"tags"`
17825}
17826
17827// MarshalJSON is the custom marshaler for LocalNetworkGateway.
17828func (lng LocalNetworkGateway) MarshalJSON() ([]byte, error) {
17829	objectMap := make(map[string]interface{})
17830	if lng.LocalNetworkGatewayPropertiesFormat != nil {
17831		objectMap["properties"] = lng.LocalNetworkGatewayPropertiesFormat
17832	}
17833	if lng.Etag != nil {
17834		objectMap["etag"] = lng.Etag
17835	}
17836	if lng.ID != nil {
17837		objectMap["id"] = lng.ID
17838	}
17839	if lng.Location != nil {
17840		objectMap["location"] = lng.Location
17841	}
17842	if lng.Tags != nil {
17843		objectMap["tags"] = lng.Tags
17844	}
17845	return json.Marshal(objectMap)
17846}
17847
17848// UnmarshalJSON is the custom unmarshaler for LocalNetworkGateway struct.
17849func (lng *LocalNetworkGateway) UnmarshalJSON(body []byte) error {
17850	var m map[string]*json.RawMessage
17851	err := json.Unmarshal(body, &m)
17852	if err != nil {
17853		return err
17854	}
17855	for k, v := range m {
17856		switch k {
17857		case "properties":
17858			if v != nil {
17859				var localNetworkGatewayPropertiesFormat LocalNetworkGatewayPropertiesFormat
17860				err = json.Unmarshal(*v, &localNetworkGatewayPropertiesFormat)
17861				if err != nil {
17862					return err
17863				}
17864				lng.LocalNetworkGatewayPropertiesFormat = &localNetworkGatewayPropertiesFormat
17865			}
17866		case "etag":
17867			if v != nil {
17868				var etag string
17869				err = json.Unmarshal(*v, &etag)
17870				if err != nil {
17871					return err
17872				}
17873				lng.Etag = &etag
17874			}
17875		case "id":
17876			if v != nil {
17877				var ID string
17878				err = json.Unmarshal(*v, &ID)
17879				if err != nil {
17880					return err
17881				}
17882				lng.ID = &ID
17883			}
17884		case "name":
17885			if v != nil {
17886				var name string
17887				err = json.Unmarshal(*v, &name)
17888				if err != nil {
17889					return err
17890				}
17891				lng.Name = &name
17892			}
17893		case "type":
17894			if v != nil {
17895				var typeVar string
17896				err = json.Unmarshal(*v, &typeVar)
17897				if err != nil {
17898					return err
17899				}
17900				lng.Type = &typeVar
17901			}
17902		case "location":
17903			if v != nil {
17904				var location string
17905				err = json.Unmarshal(*v, &location)
17906				if err != nil {
17907					return err
17908				}
17909				lng.Location = &location
17910			}
17911		case "tags":
17912			if v != nil {
17913				var tags map[string]*string
17914				err = json.Unmarshal(*v, &tags)
17915				if err != nil {
17916					return err
17917				}
17918				lng.Tags = tags
17919			}
17920		}
17921	}
17922
17923	return nil
17924}
17925
17926// LocalNetworkGatewayListResult response for ListLocalNetworkGateways API service call.
17927type LocalNetworkGatewayListResult struct {
17928	autorest.Response `json:"-"`
17929	// Value - A list of local network gateways that exists in a resource group.
17930	Value *[]LocalNetworkGateway `json:"value,omitempty"`
17931	// NextLink - READ-ONLY; The URL to get the next set of results.
17932	NextLink *string `json:"nextLink,omitempty"`
17933}
17934
17935// MarshalJSON is the custom marshaler for LocalNetworkGatewayListResult.
17936func (lnglr LocalNetworkGatewayListResult) MarshalJSON() ([]byte, error) {
17937	objectMap := make(map[string]interface{})
17938	if lnglr.Value != nil {
17939		objectMap["value"] = lnglr.Value
17940	}
17941	return json.Marshal(objectMap)
17942}
17943
17944// LocalNetworkGatewayListResultIterator provides access to a complete listing of LocalNetworkGateway
17945// values.
17946type LocalNetworkGatewayListResultIterator struct {
17947	i    int
17948	page LocalNetworkGatewayListResultPage
17949}
17950
17951// NextWithContext advances to the next value.  If there was an error making
17952// the request the iterator does not advance and the error is returned.
17953func (iter *LocalNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
17954	if tracing.IsEnabled() {
17955		ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultIterator.NextWithContext")
17956		defer func() {
17957			sc := -1
17958			if iter.Response().Response.Response != nil {
17959				sc = iter.Response().Response.Response.StatusCode
17960			}
17961			tracing.EndSpan(ctx, sc, err)
17962		}()
17963	}
17964	iter.i++
17965	if iter.i < len(iter.page.Values()) {
17966		return nil
17967	}
17968	err = iter.page.NextWithContext(ctx)
17969	if err != nil {
17970		iter.i--
17971		return err
17972	}
17973	iter.i = 0
17974	return nil
17975}
17976
17977// Next advances to the next value.  If there was an error making
17978// the request the iterator does not advance and the error is returned.
17979// Deprecated: Use NextWithContext() instead.
17980func (iter *LocalNetworkGatewayListResultIterator) Next() error {
17981	return iter.NextWithContext(context.Background())
17982}
17983
17984// NotDone returns true if the enumeration should be started or is not yet complete.
17985func (iter LocalNetworkGatewayListResultIterator) NotDone() bool {
17986	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17987}
17988
17989// Response returns the raw server response from the last page request.
17990func (iter LocalNetworkGatewayListResultIterator) Response() LocalNetworkGatewayListResult {
17991	return iter.page.Response()
17992}
17993
17994// Value returns the current value or a zero-initialized value if the
17995// iterator has advanced beyond the end of the collection.
17996func (iter LocalNetworkGatewayListResultIterator) Value() LocalNetworkGateway {
17997	if !iter.page.NotDone() {
17998		return LocalNetworkGateway{}
17999	}
18000	return iter.page.Values()[iter.i]
18001}
18002
18003// Creates a new instance of the LocalNetworkGatewayListResultIterator type.
18004func NewLocalNetworkGatewayListResultIterator(page LocalNetworkGatewayListResultPage) LocalNetworkGatewayListResultIterator {
18005	return LocalNetworkGatewayListResultIterator{page: page}
18006}
18007
18008// IsEmpty returns true if the ListResult contains no values.
18009func (lnglr LocalNetworkGatewayListResult) IsEmpty() bool {
18010	return lnglr.Value == nil || len(*lnglr.Value) == 0
18011}
18012
18013// hasNextLink returns true if the NextLink is not empty.
18014func (lnglr LocalNetworkGatewayListResult) hasNextLink() bool {
18015	return lnglr.NextLink != nil && len(*lnglr.NextLink) != 0
18016}
18017
18018// localNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results.
18019// It returns nil if no more results exist.
18020func (lnglr LocalNetworkGatewayListResult) localNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
18021	if !lnglr.hasNextLink() {
18022		return nil, nil
18023	}
18024	return autorest.Prepare((&http.Request{}).WithContext(ctx),
18025		autorest.AsJSON(),
18026		autorest.AsGet(),
18027		autorest.WithBaseURL(to.String(lnglr.NextLink)))
18028}
18029
18030// LocalNetworkGatewayListResultPage contains a page of LocalNetworkGateway values.
18031type LocalNetworkGatewayListResultPage struct {
18032	fn    func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)
18033	lnglr LocalNetworkGatewayListResult
18034}
18035
18036// NextWithContext advances to the next page of values.  If there was an error making
18037// the request the page does not advance and the error is returned.
18038func (page *LocalNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
18039	if tracing.IsEnabled() {
18040		ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultPage.NextWithContext")
18041		defer func() {
18042			sc := -1
18043			if page.Response().Response.Response != nil {
18044				sc = page.Response().Response.Response.StatusCode
18045			}
18046			tracing.EndSpan(ctx, sc, err)
18047		}()
18048	}
18049	for {
18050		next, err := page.fn(ctx, page.lnglr)
18051		if err != nil {
18052			return err
18053		}
18054		page.lnglr = next
18055		if !next.hasNextLink() || !next.IsEmpty() {
18056			break
18057		}
18058	}
18059	return nil
18060}
18061
18062// Next advances to the next page of values.  If there was an error making
18063// the request the page does not advance and the error is returned.
18064// Deprecated: Use NextWithContext() instead.
18065func (page *LocalNetworkGatewayListResultPage) Next() error {
18066	return page.NextWithContext(context.Background())
18067}
18068
18069// NotDone returns true if the page enumeration should be started or is not yet complete.
18070func (page LocalNetworkGatewayListResultPage) NotDone() bool {
18071	return !page.lnglr.IsEmpty()
18072}
18073
18074// Response returns the raw server response from the last page request.
18075func (page LocalNetworkGatewayListResultPage) Response() LocalNetworkGatewayListResult {
18076	return page.lnglr
18077}
18078
18079// Values returns the slice of values for the current page or nil if there are no values.
18080func (page LocalNetworkGatewayListResultPage) Values() []LocalNetworkGateway {
18081	if page.lnglr.IsEmpty() {
18082		return nil
18083	}
18084	return *page.lnglr.Value
18085}
18086
18087// Creates a new instance of the LocalNetworkGatewayListResultPage type.
18088func NewLocalNetworkGatewayListResultPage(cur LocalNetworkGatewayListResult, getNextPage func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)) LocalNetworkGatewayListResultPage {
18089	return LocalNetworkGatewayListResultPage{
18090		fn:    getNextPage,
18091		lnglr: cur,
18092	}
18093}
18094
18095// LocalNetworkGatewayPropertiesFormat localNetworkGateway properties.
18096type LocalNetworkGatewayPropertiesFormat struct {
18097	// LocalNetworkAddressSpace - Local network site address space.
18098	LocalNetworkAddressSpace *AddressSpace `json:"localNetworkAddressSpace,omitempty"`
18099	// GatewayIPAddress - IP address of local network gateway.
18100	GatewayIPAddress *string `json:"gatewayIpAddress,omitempty"`
18101	// BgpSettings - Local network gateway's BGP speaker settings.
18102	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
18103	// ResourceGUID - The resource GUID property of the LocalNetworkGateway resource.
18104	ResourceGUID *string `json:"resourceGuid,omitempty"`
18105	// ProvisioningState - READ-ONLY; The provisioning state of the LocalNetworkGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
18106	ProvisioningState *string `json:"provisioningState,omitempty"`
18107}
18108
18109// MarshalJSON is the custom marshaler for LocalNetworkGatewayPropertiesFormat.
18110func (lngpf LocalNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
18111	objectMap := make(map[string]interface{})
18112	if lngpf.LocalNetworkAddressSpace != nil {
18113		objectMap["localNetworkAddressSpace"] = lngpf.LocalNetworkAddressSpace
18114	}
18115	if lngpf.GatewayIPAddress != nil {
18116		objectMap["gatewayIpAddress"] = lngpf.GatewayIPAddress
18117	}
18118	if lngpf.BgpSettings != nil {
18119		objectMap["bgpSettings"] = lngpf.BgpSettings
18120	}
18121	if lngpf.ResourceGUID != nil {
18122		objectMap["resourceGuid"] = lngpf.ResourceGUID
18123	}
18124	return json.Marshal(objectMap)
18125}
18126
18127// LocalNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
18128// long-running operation.
18129type LocalNetworkGatewaysCreateOrUpdateFuture struct {
18130	azure.FutureAPI
18131	// Result returns the result of the asynchronous operation.
18132	// If the operation has not completed it will return an error.
18133	Result func(LocalNetworkGatewaysClient) (LocalNetworkGateway, error)
18134}
18135
18136// LocalNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
18137// long-running operation.
18138type LocalNetworkGatewaysDeleteFuture struct {
18139	azure.FutureAPI
18140	// Result returns the result of the asynchronous operation.
18141	// If the operation has not completed it will return an error.
18142	Result func(LocalNetworkGatewaysClient) (autorest.Response, error)
18143}
18144
18145// LocalNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
18146// long-running operation.
18147type LocalNetworkGatewaysUpdateTagsFuture struct {
18148	azure.FutureAPI
18149	// Result returns the result of the asynchronous operation.
18150	// If the operation has not completed it will return an error.
18151	Result func(LocalNetworkGatewaysClient) (LocalNetworkGateway, error)
18152}
18153
18154// LogSpecification description of logging specification.
18155type LogSpecification struct {
18156	// Name - The name of the specification.
18157	Name *string `json:"name,omitempty"`
18158	// DisplayName - The display name of the specification.
18159	DisplayName *string `json:"displayName,omitempty"`
18160	// BlobDuration - Duration of the blob.
18161	BlobDuration *string `json:"blobDuration,omitempty"`
18162}
18163
18164// ManagedServiceIdentity identity for the resource.
18165type ManagedServiceIdentity struct {
18166	// PrincipalID - READ-ONLY; The principal id of the system assigned identity. This property will only be provided for a system assigned identity.
18167	PrincipalID *string `json:"principalId,omitempty"`
18168	// TenantID - READ-ONLY; The tenant id of the system assigned identity. This property will only be provided for a system assigned identity.
18169	TenantID *string `json:"tenantId,omitempty"`
18170	// 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'
18171	Type ResourceIdentityType `json:"type,omitempty"`
18172	// 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}'.
18173	UserAssignedIdentities map[string]*ManagedServiceIdentityUserAssignedIdentitiesValue `json:"userAssignedIdentities"`
18174}
18175
18176// MarshalJSON is the custom marshaler for ManagedServiceIdentity.
18177func (msi ManagedServiceIdentity) MarshalJSON() ([]byte, error) {
18178	objectMap := make(map[string]interface{})
18179	if msi.Type != "" {
18180		objectMap["type"] = msi.Type
18181	}
18182	if msi.UserAssignedIdentities != nil {
18183		objectMap["userAssignedIdentities"] = msi.UserAssignedIdentities
18184	}
18185	return json.Marshal(objectMap)
18186}
18187
18188// ManagedServiceIdentityUserAssignedIdentitiesValue ...
18189type ManagedServiceIdentityUserAssignedIdentitiesValue struct {
18190	// PrincipalID - READ-ONLY; The principal id of user assigned identity.
18191	PrincipalID *string `json:"principalId,omitempty"`
18192	// ClientID - READ-ONLY; The client id of user assigned identity.
18193	ClientID *string `json:"clientId,omitempty"`
18194}
18195
18196// MatchCondition define match conditions.
18197type MatchCondition struct {
18198	// MatchVariables - List of match variables.
18199	MatchVariables *[]MatchVariable `json:"matchVariables,omitempty"`
18200	// Operator - Describes operator to be matched. Possible values include: 'WebApplicationFirewallOperatorIPMatch', 'WebApplicationFirewallOperatorEqual', 'WebApplicationFirewallOperatorContains', 'WebApplicationFirewallOperatorLessThan', 'WebApplicationFirewallOperatorGreaterThan', 'WebApplicationFirewallOperatorLessThanOrEqual', 'WebApplicationFirewallOperatorGreaterThanOrEqual', 'WebApplicationFirewallOperatorBeginsWith', 'WebApplicationFirewallOperatorEndsWith', 'WebApplicationFirewallOperatorRegex'
18201	Operator WebApplicationFirewallOperator `json:"operator,omitempty"`
18202	// NegationConditon - Describes if this is negate condition or not.
18203	NegationConditon *bool `json:"negationConditon,omitempty"`
18204	// MatchValues - Match value.
18205	MatchValues *[]string `json:"matchValues,omitempty"`
18206	// Transforms - List of transforms.
18207	Transforms *[]WebApplicationFirewallTransform `json:"transforms,omitempty"`
18208}
18209
18210// MatchedRule matched rule.
18211type MatchedRule struct {
18212	// RuleName - Name of the matched network security rule.
18213	RuleName *string `json:"ruleName,omitempty"`
18214	// Action - The network traffic is allowed or denied. Possible values are 'Allow' and 'Deny'.
18215	Action *string `json:"action,omitempty"`
18216}
18217
18218// MatchVariable define match variables.
18219type MatchVariable struct {
18220	// VariableName - Match Variable. Possible values include: 'RemoteAddr', 'RequestMethod', 'QueryString', 'PostArgs', 'RequestURI', 'RequestHeaders', 'RequestBody', 'RequestCookies'
18221	VariableName WebApplicationFirewallMatchVariable `json:"variableName,omitempty"`
18222	// Selector - Describes field of the matchVariable collection.
18223	Selector *string `json:"selector,omitempty"`
18224}
18225
18226// MetricSpecification description of metrics specification.
18227type MetricSpecification struct {
18228	// Name - The name of the metric.
18229	Name *string `json:"name,omitempty"`
18230	// DisplayName - The display name of the metric.
18231	DisplayName *string `json:"displayName,omitempty"`
18232	// DisplayDescription - The description of the metric.
18233	DisplayDescription *string `json:"displayDescription,omitempty"`
18234	// Unit - Units the metric to be displayed in.
18235	Unit *string `json:"unit,omitempty"`
18236	// AggregationType - The aggregation type.
18237	AggregationType *string `json:"aggregationType,omitempty"`
18238	// Availabilities - List of availability.
18239	Availabilities *[]Availability `json:"availabilities,omitempty"`
18240	// EnableRegionalMdmAccount - Whether regional MDM account enabled.
18241	EnableRegionalMdmAccount *bool `json:"enableRegionalMdmAccount,omitempty"`
18242	// FillGapWithZero - Whether gaps would be filled with zeros.
18243	FillGapWithZero *bool `json:"fillGapWithZero,omitempty"`
18244	// MetricFilterPattern - Pattern for the filter of the metric.
18245	MetricFilterPattern *string `json:"metricFilterPattern,omitempty"`
18246	// Dimensions - List of dimensions.
18247	Dimensions *[]Dimension `json:"dimensions,omitempty"`
18248	// IsInternal - Whether the metric is internal.
18249	IsInternal *bool `json:"isInternal,omitempty"`
18250	// SourceMdmAccount - The source MDM account.
18251	SourceMdmAccount *string `json:"sourceMdmAccount,omitempty"`
18252	// SourceMdmNamespace - The source MDM namespace.
18253	SourceMdmNamespace *string `json:"sourceMdmNamespace,omitempty"`
18254	// ResourceIDDimensionNameOverride - The resource Id dimension name override.
18255	ResourceIDDimensionNameOverride *string `json:"resourceIdDimensionNameOverride,omitempty"`
18256}
18257
18258// NatGateway nat Gateway resource.
18259type NatGateway struct {
18260	autorest.Response `json:"-"`
18261	// Sku - The nat gateway SKU.
18262	Sku *NatGatewaySku `json:"sku,omitempty"`
18263	// NatGatewayPropertiesFormat - Nat Gateway properties.
18264	*NatGatewayPropertiesFormat `json:"properties,omitempty"`
18265	// Zones - A list of availability zones denoting the zone in which Nat Gateway should be deployed.
18266	Zones *[]string `json:"zones,omitempty"`
18267	// Etag - A unique read-only string that changes whenever the resource is updated.
18268	Etag *string `json:"etag,omitempty"`
18269	// ID - Resource ID.
18270	ID *string `json:"id,omitempty"`
18271	// Name - READ-ONLY; Resource name.
18272	Name *string `json:"name,omitempty"`
18273	// Type - READ-ONLY; Resource type.
18274	Type *string `json:"type,omitempty"`
18275	// Location - Resource location.
18276	Location *string `json:"location,omitempty"`
18277	// Tags - Resource tags.
18278	Tags map[string]*string `json:"tags"`
18279}
18280
18281// MarshalJSON is the custom marshaler for NatGateway.
18282func (ng NatGateway) MarshalJSON() ([]byte, error) {
18283	objectMap := make(map[string]interface{})
18284	if ng.Sku != nil {
18285		objectMap["sku"] = ng.Sku
18286	}
18287	if ng.NatGatewayPropertiesFormat != nil {
18288		objectMap["properties"] = ng.NatGatewayPropertiesFormat
18289	}
18290	if ng.Zones != nil {
18291		objectMap["zones"] = ng.Zones
18292	}
18293	if ng.Etag != nil {
18294		objectMap["etag"] = ng.Etag
18295	}
18296	if ng.ID != nil {
18297		objectMap["id"] = ng.ID
18298	}
18299	if ng.Location != nil {
18300		objectMap["location"] = ng.Location
18301	}
18302	if ng.Tags != nil {
18303		objectMap["tags"] = ng.Tags
18304	}
18305	return json.Marshal(objectMap)
18306}
18307
18308// UnmarshalJSON is the custom unmarshaler for NatGateway struct.
18309func (ng *NatGateway) UnmarshalJSON(body []byte) error {
18310	var m map[string]*json.RawMessage
18311	err := json.Unmarshal(body, &m)
18312	if err != nil {
18313		return err
18314	}
18315	for k, v := range m {
18316		switch k {
18317		case "sku":
18318			if v != nil {
18319				var sku NatGatewaySku
18320				err = json.Unmarshal(*v, &sku)
18321				if err != nil {
18322					return err
18323				}
18324				ng.Sku = &sku
18325			}
18326		case "properties":
18327			if v != nil {
18328				var natGatewayPropertiesFormat NatGatewayPropertiesFormat
18329				err = json.Unmarshal(*v, &natGatewayPropertiesFormat)
18330				if err != nil {
18331					return err
18332				}
18333				ng.NatGatewayPropertiesFormat = &natGatewayPropertiesFormat
18334			}
18335		case "zones":
18336			if v != nil {
18337				var zones []string
18338				err = json.Unmarshal(*v, &zones)
18339				if err != nil {
18340					return err
18341				}
18342				ng.Zones = &zones
18343			}
18344		case "etag":
18345			if v != nil {
18346				var etag string
18347				err = json.Unmarshal(*v, &etag)
18348				if err != nil {
18349					return err
18350				}
18351				ng.Etag = &etag
18352			}
18353		case "id":
18354			if v != nil {
18355				var ID string
18356				err = json.Unmarshal(*v, &ID)
18357				if err != nil {
18358					return err
18359				}
18360				ng.ID = &ID
18361			}
18362		case "name":
18363			if v != nil {
18364				var name string
18365				err = json.Unmarshal(*v, &name)
18366				if err != nil {
18367					return err
18368				}
18369				ng.Name = &name
18370			}
18371		case "type":
18372			if v != nil {
18373				var typeVar string
18374				err = json.Unmarshal(*v, &typeVar)
18375				if err != nil {
18376					return err
18377				}
18378				ng.Type = &typeVar
18379			}
18380		case "location":
18381			if v != nil {
18382				var location string
18383				err = json.Unmarshal(*v, &location)
18384				if err != nil {
18385					return err
18386				}
18387				ng.Location = &location
18388			}
18389		case "tags":
18390			if v != nil {
18391				var tags map[string]*string
18392				err = json.Unmarshal(*v, &tags)
18393				if err != nil {
18394					return err
18395				}
18396				ng.Tags = tags
18397			}
18398		}
18399	}
18400
18401	return nil
18402}
18403
18404// NatGatewayListResult response for ListNatGateways API service call.
18405type NatGatewayListResult struct {
18406	autorest.Response `json:"-"`
18407	// Value - A list of Nat Gateways that exists in a resource group.
18408	Value *[]NatGateway `json:"value,omitempty"`
18409	// NextLink - The URL to get the next set of results.
18410	NextLink *string `json:"nextLink,omitempty"`
18411}
18412
18413// NatGatewayListResultIterator provides access to a complete listing of NatGateway values.
18414type NatGatewayListResultIterator struct {
18415	i    int
18416	page NatGatewayListResultPage
18417}
18418
18419// NextWithContext advances to the next value.  If there was an error making
18420// the request the iterator does not advance and the error is returned.
18421func (iter *NatGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
18422	if tracing.IsEnabled() {
18423		ctx = tracing.StartSpan(ctx, fqdn+"/NatGatewayListResultIterator.NextWithContext")
18424		defer func() {
18425			sc := -1
18426			if iter.Response().Response.Response != nil {
18427				sc = iter.Response().Response.Response.StatusCode
18428			}
18429			tracing.EndSpan(ctx, sc, err)
18430		}()
18431	}
18432	iter.i++
18433	if iter.i < len(iter.page.Values()) {
18434		return nil
18435	}
18436	err = iter.page.NextWithContext(ctx)
18437	if err != nil {
18438		iter.i--
18439		return err
18440	}
18441	iter.i = 0
18442	return nil
18443}
18444
18445// Next advances to the next value.  If there was an error making
18446// the request the iterator does not advance and the error is returned.
18447// Deprecated: Use NextWithContext() instead.
18448func (iter *NatGatewayListResultIterator) Next() error {
18449	return iter.NextWithContext(context.Background())
18450}
18451
18452// NotDone returns true if the enumeration should be started or is not yet complete.
18453func (iter NatGatewayListResultIterator) NotDone() bool {
18454	return iter.page.NotDone() && iter.i < len(iter.page.Values())
18455}
18456
18457// Response returns the raw server response from the last page request.
18458func (iter NatGatewayListResultIterator) Response() NatGatewayListResult {
18459	return iter.page.Response()
18460}
18461
18462// Value returns the current value or a zero-initialized value if the
18463// iterator has advanced beyond the end of the collection.
18464func (iter NatGatewayListResultIterator) Value() NatGateway {
18465	if !iter.page.NotDone() {
18466		return NatGateway{}
18467	}
18468	return iter.page.Values()[iter.i]
18469}
18470
18471// Creates a new instance of the NatGatewayListResultIterator type.
18472func NewNatGatewayListResultIterator(page NatGatewayListResultPage) NatGatewayListResultIterator {
18473	return NatGatewayListResultIterator{page: page}
18474}
18475
18476// IsEmpty returns true if the ListResult contains no values.
18477func (nglr NatGatewayListResult) IsEmpty() bool {
18478	return nglr.Value == nil || len(*nglr.Value) == 0
18479}
18480
18481// hasNextLink returns true if the NextLink is not empty.
18482func (nglr NatGatewayListResult) hasNextLink() bool {
18483	return nglr.NextLink != nil && len(*nglr.NextLink) != 0
18484}
18485
18486// natGatewayListResultPreparer prepares a request to retrieve the next set of results.
18487// It returns nil if no more results exist.
18488func (nglr NatGatewayListResult) natGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
18489	if !nglr.hasNextLink() {
18490		return nil, nil
18491	}
18492	return autorest.Prepare((&http.Request{}).WithContext(ctx),
18493		autorest.AsJSON(),
18494		autorest.AsGet(),
18495		autorest.WithBaseURL(to.String(nglr.NextLink)))
18496}
18497
18498// NatGatewayListResultPage contains a page of NatGateway values.
18499type NatGatewayListResultPage struct {
18500	fn   func(context.Context, NatGatewayListResult) (NatGatewayListResult, error)
18501	nglr NatGatewayListResult
18502}
18503
18504// NextWithContext advances to the next page of values.  If there was an error making
18505// the request the page does not advance and the error is returned.
18506func (page *NatGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
18507	if tracing.IsEnabled() {
18508		ctx = tracing.StartSpan(ctx, fqdn+"/NatGatewayListResultPage.NextWithContext")
18509		defer func() {
18510			sc := -1
18511			if page.Response().Response.Response != nil {
18512				sc = page.Response().Response.Response.StatusCode
18513			}
18514			tracing.EndSpan(ctx, sc, err)
18515		}()
18516	}
18517	for {
18518		next, err := page.fn(ctx, page.nglr)
18519		if err != nil {
18520			return err
18521		}
18522		page.nglr = next
18523		if !next.hasNextLink() || !next.IsEmpty() {
18524			break
18525		}
18526	}
18527	return nil
18528}
18529
18530// Next advances to the next page of values.  If there was an error making
18531// the request the page does not advance and the error is returned.
18532// Deprecated: Use NextWithContext() instead.
18533func (page *NatGatewayListResultPage) Next() error {
18534	return page.NextWithContext(context.Background())
18535}
18536
18537// NotDone returns true if the page enumeration should be started or is not yet complete.
18538func (page NatGatewayListResultPage) NotDone() bool {
18539	return !page.nglr.IsEmpty()
18540}
18541
18542// Response returns the raw server response from the last page request.
18543func (page NatGatewayListResultPage) Response() NatGatewayListResult {
18544	return page.nglr
18545}
18546
18547// Values returns the slice of values for the current page or nil if there are no values.
18548func (page NatGatewayListResultPage) Values() []NatGateway {
18549	if page.nglr.IsEmpty() {
18550		return nil
18551	}
18552	return *page.nglr.Value
18553}
18554
18555// Creates a new instance of the NatGatewayListResultPage type.
18556func NewNatGatewayListResultPage(cur NatGatewayListResult, getNextPage func(context.Context, NatGatewayListResult) (NatGatewayListResult, error)) NatGatewayListResultPage {
18557	return NatGatewayListResultPage{
18558		fn:   getNextPage,
18559		nglr: cur,
18560	}
18561}
18562
18563// NatGatewayPropertiesFormat nat Gateway properties.
18564type NatGatewayPropertiesFormat struct {
18565	// IdleTimeoutInMinutes - The idle timeout of the nat gateway.
18566	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
18567	// PublicIPAddresses - An array of public ip addresses associated with the nat gateway resource.
18568	PublicIPAddresses *[]SubResource `json:"publicIpAddresses,omitempty"`
18569	// PublicIPPrefixes - An array of public ip prefixes associated with the nat gateway resource.
18570	PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"`
18571	// Subnets - READ-ONLY; An array of references to the subnets using this nat gateway resource.
18572	Subnets *[]SubResource `json:"subnets,omitempty"`
18573	// ResourceGUID - The resource GUID property of the nat gateway resource.
18574	ResourceGUID *string `json:"resourceGuid,omitempty"`
18575	// ProvisioningState - The provisioning state of the NatGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
18576	ProvisioningState *string `json:"provisioningState,omitempty"`
18577}
18578
18579// MarshalJSON is the custom marshaler for NatGatewayPropertiesFormat.
18580func (ngpf NatGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
18581	objectMap := make(map[string]interface{})
18582	if ngpf.IdleTimeoutInMinutes != nil {
18583		objectMap["idleTimeoutInMinutes"] = ngpf.IdleTimeoutInMinutes
18584	}
18585	if ngpf.PublicIPAddresses != nil {
18586		objectMap["publicIpAddresses"] = ngpf.PublicIPAddresses
18587	}
18588	if ngpf.PublicIPPrefixes != nil {
18589		objectMap["publicIpPrefixes"] = ngpf.PublicIPPrefixes
18590	}
18591	if ngpf.ResourceGUID != nil {
18592		objectMap["resourceGuid"] = ngpf.ResourceGUID
18593	}
18594	if ngpf.ProvisioningState != nil {
18595		objectMap["provisioningState"] = ngpf.ProvisioningState
18596	}
18597	return json.Marshal(objectMap)
18598}
18599
18600// NatGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
18601// long-running operation.
18602type NatGatewaysCreateOrUpdateFuture struct {
18603	azure.FutureAPI
18604	// Result returns the result of the asynchronous operation.
18605	// If the operation has not completed it will return an error.
18606	Result func(NatGatewaysClient) (NatGateway, error)
18607}
18608
18609// NatGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
18610// operation.
18611type NatGatewaysDeleteFuture struct {
18612	azure.FutureAPI
18613	// Result returns the result of the asynchronous operation.
18614	// If the operation has not completed it will return an error.
18615	Result func(NatGatewaysClient) (autorest.Response, error)
18616}
18617
18618// NatGatewaySku SKU of nat gateway.
18619type NatGatewaySku struct {
18620	// Name - Name of Nat Gateway SKU. Possible values include: 'Standard'
18621	Name NatGatewaySkuName `json:"name,omitempty"`
18622}
18623
18624// NextHopParameters parameters that define the source and destination endpoint.
18625type NextHopParameters struct {
18626	// TargetResourceID - The resource identifier of the target resource against which the action is to be performed.
18627	TargetResourceID *string `json:"targetResourceId,omitempty"`
18628	// SourceIPAddress - The source IP address.
18629	SourceIPAddress *string `json:"sourceIPAddress,omitempty"`
18630	// DestinationIPAddress - The destination IP address.
18631	DestinationIPAddress *string `json:"destinationIPAddress,omitempty"`
18632	// 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).
18633	TargetNicResourceID *string `json:"targetNicResourceId,omitempty"`
18634}
18635
18636// NextHopResult the information about next hop from the specified VM.
18637type NextHopResult struct {
18638	autorest.Response `json:"-"`
18639	// NextHopType - Next hop type. Possible values include: 'NextHopTypeInternet', 'NextHopTypeVirtualAppliance', 'NextHopTypeVirtualNetworkGateway', 'NextHopTypeVnetLocal', 'NextHopTypeHyperNetGateway', 'NextHopTypeNone'
18640	NextHopType NextHopType `json:"nextHopType,omitempty"`
18641	// NextHopIPAddress - Next hop IP Address.
18642	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
18643	// 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'.
18644	RouteTableID *string `json:"routeTableId,omitempty"`
18645}
18646
18647// Operation network REST API operation definition.
18648type Operation struct {
18649	// Name - Operation name: {provider}/{resource}/{operation}.
18650	Name *string `json:"name,omitempty"`
18651	// Display - Display metadata associated with the operation.
18652	Display *OperationDisplay `json:"display,omitempty"`
18653	// Origin - Origin of the operation.
18654	Origin *string `json:"origin,omitempty"`
18655	// OperationPropertiesFormat - Operation properties format.
18656	*OperationPropertiesFormat `json:"properties,omitempty"`
18657}
18658
18659// MarshalJSON is the custom marshaler for Operation.
18660func (o Operation) MarshalJSON() ([]byte, error) {
18661	objectMap := make(map[string]interface{})
18662	if o.Name != nil {
18663		objectMap["name"] = o.Name
18664	}
18665	if o.Display != nil {
18666		objectMap["display"] = o.Display
18667	}
18668	if o.Origin != nil {
18669		objectMap["origin"] = o.Origin
18670	}
18671	if o.OperationPropertiesFormat != nil {
18672		objectMap["properties"] = o.OperationPropertiesFormat
18673	}
18674	return json.Marshal(objectMap)
18675}
18676
18677// UnmarshalJSON is the custom unmarshaler for Operation struct.
18678func (o *Operation) UnmarshalJSON(body []byte) error {
18679	var m map[string]*json.RawMessage
18680	err := json.Unmarshal(body, &m)
18681	if err != nil {
18682		return err
18683	}
18684	for k, v := range m {
18685		switch k {
18686		case "name":
18687			if v != nil {
18688				var name string
18689				err = json.Unmarshal(*v, &name)
18690				if err != nil {
18691					return err
18692				}
18693				o.Name = &name
18694			}
18695		case "display":
18696			if v != nil {
18697				var display OperationDisplay
18698				err = json.Unmarshal(*v, &display)
18699				if err != nil {
18700					return err
18701				}
18702				o.Display = &display
18703			}
18704		case "origin":
18705			if v != nil {
18706				var origin string
18707				err = json.Unmarshal(*v, &origin)
18708				if err != nil {
18709					return err
18710				}
18711				o.Origin = &origin
18712			}
18713		case "properties":
18714			if v != nil {
18715				var operationPropertiesFormat OperationPropertiesFormat
18716				err = json.Unmarshal(*v, &operationPropertiesFormat)
18717				if err != nil {
18718					return err
18719				}
18720				o.OperationPropertiesFormat = &operationPropertiesFormat
18721			}
18722		}
18723	}
18724
18725	return nil
18726}
18727
18728// OperationDisplay display metadata associated with the operation.
18729type OperationDisplay struct {
18730	// Provider - Service provider: Microsoft Network.
18731	Provider *string `json:"provider,omitempty"`
18732	// Resource - Resource on which the operation is performed.
18733	Resource *string `json:"resource,omitempty"`
18734	// Operation - Type of the operation: get, read, delete, etc.
18735	Operation *string `json:"operation,omitempty"`
18736	// Description - Description of the operation.
18737	Description *string `json:"description,omitempty"`
18738}
18739
18740// OperationListResult result of the request to list Network operations. It contains a list of operations
18741// and a URL link to get the next set of results.
18742type OperationListResult struct {
18743	autorest.Response `json:"-"`
18744	// Value - List of Network operations supported by the Network resource provider.
18745	Value *[]Operation `json:"value,omitempty"`
18746	// NextLink - URL to get the next set of operation list results if there are any.
18747	NextLink *string `json:"nextLink,omitempty"`
18748}
18749
18750// OperationListResultIterator provides access to a complete listing of Operation values.
18751type OperationListResultIterator struct {
18752	i    int
18753	page OperationListResultPage
18754}
18755
18756// NextWithContext advances to the next value.  If there was an error making
18757// the request the iterator does not advance and the error is returned.
18758func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) {
18759	if tracing.IsEnabled() {
18760		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext")
18761		defer func() {
18762			sc := -1
18763			if iter.Response().Response.Response != nil {
18764				sc = iter.Response().Response.Response.StatusCode
18765			}
18766			tracing.EndSpan(ctx, sc, err)
18767		}()
18768	}
18769	iter.i++
18770	if iter.i < len(iter.page.Values()) {
18771		return nil
18772	}
18773	err = iter.page.NextWithContext(ctx)
18774	if err != nil {
18775		iter.i--
18776		return err
18777	}
18778	iter.i = 0
18779	return nil
18780}
18781
18782// Next advances to the next value.  If there was an error making
18783// the request the iterator does not advance and the error is returned.
18784// Deprecated: Use NextWithContext() instead.
18785func (iter *OperationListResultIterator) Next() error {
18786	return iter.NextWithContext(context.Background())
18787}
18788
18789// NotDone returns true if the enumeration should be started or is not yet complete.
18790func (iter OperationListResultIterator) NotDone() bool {
18791	return iter.page.NotDone() && iter.i < len(iter.page.Values())
18792}
18793
18794// Response returns the raw server response from the last page request.
18795func (iter OperationListResultIterator) Response() OperationListResult {
18796	return iter.page.Response()
18797}
18798
18799// Value returns the current value or a zero-initialized value if the
18800// iterator has advanced beyond the end of the collection.
18801func (iter OperationListResultIterator) Value() Operation {
18802	if !iter.page.NotDone() {
18803		return Operation{}
18804	}
18805	return iter.page.Values()[iter.i]
18806}
18807
18808// Creates a new instance of the OperationListResultIterator type.
18809func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator {
18810	return OperationListResultIterator{page: page}
18811}
18812
18813// IsEmpty returns true if the ListResult contains no values.
18814func (olr OperationListResult) IsEmpty() bool {
18815	return olr.Value == nil || len(*olr.Value) == 0
18816}
18817
18818// hasNextLink returns true if the NextLink is not empty.
18819func (olr OperationListResult) hasNextLink() bool {
18820	return olr.NextLink != nil && len(*olr.NextLink) != 0
18821}
18822
18823// operationListResultPreparer prepares a request to retrieve the next set of results.
18824// It returns nil if no more results exist.
18825func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) {
18826	if !olr.hasNextLink() {
18827		return nil, nil
18828	}
18829	return autorest.Prepare((&http.Request{}).WithContext(ctx),
18830		autorest.AsJSON(),
18831		autorest.AsGet(),
18832		autorest.WithBaseURL(to.String(olr.NextLink)))
18833}
18834
18835// OperationListResultPage contains a page of Operation values.
18836type OperationListResultPage struct {
18837	fn  func(context.Context, OperationListResult) (OperationListResult, error)
18838	olr OperationListResult
18839}
18840
18841// NextWithContext advances to the next page of values.  If there was an error making
18842// the request the page does not advance and the error is returned.
18843func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) {
18844	if tracing.IsEnabled() {
18845		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext")
18846		defer func() {
18847			sc := -1
18848			if page.Response().Response.Response != nil {
18849				sc = page.Response().Response.Response.StatusCode
18850			}
18851			tracing.EndSpan(ctx, sc, err)
18852		}()
18853	}
18854	for {
18855		next, err := page.fn(ctx, page.olr)
18856		if err != nil {
18857			return err
18858		}
18859		page.olr = next
18860		if !next.hasNextLink() || !next.IsEmpty() {
18861			break
18862		}
18863	}
18864	return nil
18865}
18866
18867// Next advances to the next page of values.  If there was an error making
18868// the request the page does not advance and the error is returned.
18869// Deprecated: Use NextWithContext() instead.
18870func (page *OperationListResultPage) Next() error {
18871	return page.NextWithContext(context.Background())
18872}
18873
18874// NotDone returns true if the page enumeration should be started or is not yet complete.
18875func (page OperationListResultPage) NotDone() bool {
18876	return !page.olr.IsEmpty()
18877}
18878
18879// Response returns the raw server response from the last page request.
18880func (page OperationListResultPage) Response() OperationListResult {
18881	return page.olr
18882}
18883
18884// Values returns the slice of values for the current page or nil if there are no values.
18885func (page OperationListResultPage) Values() []Operation {
18886	if page.olr.IsEmpty() {
18887		return nil
18888	}
18889	return *page.olr.Value
18890}
18891
18892// Creates a new instance of the OperationListResultPage type.
18893func NewOperationListResultPage(cur OperationListResult, getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
18894	return OperationListResultPage{
18895		fn:  getNextPage,
18896		olr: cur,
18897	}
18898}
18899
18900// OperationPropertiesFormat description of operation properties format.
18901type OperationPropertiesFormat struct {
18902	// ServiceSpecification - Specification of the service.
18903	ServiceSpecification *OperationPropertiesFormatServiceSpecification `json:"serviceSpecification,omitempty"`
18904}
18905
18906// OperationPropertiesFormatServiceSpecification specification of the service.
18907type OperationPropertiesFormatServiceSpecification struct {
18908	// MetricSpecifications - Operation service specification.
18909	MetricSpecifications *[]MetricSpecification `json:"metricSpecifications,omitempty"`
18910	// LogSpecifications - Operation log specification.
18911	LogSpecifications *[]LogSpecification `json:"logSpecifications,omitempty"`
18912}
18913
18914// OutboundRule outbound rule of the load balancer.
18915type OutboundRule struct {
18916	autorest.Response `json:"-"`
18917	// OutboundRulePropertiesFormat - Properties of load balancer outbound rule.
18918	*OutboundRulePropertiesFormat `json:"properties,omitempty"`
18919	// Name - The name of the resource that is unique within the set of outbound rules used by the load balancer. This name can be used to access the resource.
18920	Name *string `json:"name,omitempty"`
18921	// Etag - A unique read-only string that changes whenever the resource is updated.
18922	Etag *string `json:"etag,omitempty"`
18923	// Type - READ-ONLY; Type of the resource.
18924	Type *string `json:"type,omitempty"`
18925	// ID - Resource ID.
18926	ID *string `json:"id,omitempty"`
18927}
18928
18929// MarshalJSON is the custom marshaler for OutboundRule.
18930func (or OutboundRule) MarshalJSON() ([]byte, error) {
18931	objectMap := make(map[string]interface{})
18932	if or.OutboundRulePropertiesFormat != nil {
18933		objectMap["properties"] = or.OutboundRulePropertiesFormat
18934	}
18935	if or.Name != nil {
18936		objectMap["name"] = or.Name
18937	}
18938	if or.Etag != nil {
18939		objectMap["etag"] = or.Etag
18940	}
18941	if or.ID != nil {
18942		objectMap["id"] = or.ID
18943	}
18944	return json.Marshal(objectMap)
18945}
18946
18947// UnmarshalJSON is the custom unmarshaler for OutboundRule struct.
18948func (or *OutboundRule) UnmarshalJSON(body []byte) error {
18949	var m map[string]*json.RawMessage
18950	err := json.Unmarshal(body, &m)
18951	if err != nil {
18952		return err
18953	}
18954	for k, v := range m {
18955		switch k {
18956		case "properties":
18957			if v != nil {
18958				var outboundRulePropertiesFormat OutboundRulePropertiesFormat
18959				err = json.Unmarshal(*v, &outboundRulePropertiesFormat)
18960				if err != nil {
18961					return err
18962				}
18963				or.OutboundRulePropertiesFormat = &outboundRulePropertiesFormat
18964			}
18965		case "name":
18966			if v != nil {
18967				var name string
18968				err = json.Unmarshal(*v, &name)
18969				if err != nil {
18970					return err
18971				}
18972				or.Name = &name
18973			}
18974		case "etag":
18975			if v != nil {
18976				var etag string
18977				err = json.Unmarshal(*v, &etag)
18978				if err != nil {
18979					return err
18980				}
18981				or.Etag = &etag
18982			}
18983		case "type":
18984			if v != nil {
18985				var typeVar string
18986				err = json.Unmarshal(*v, &typeVar)
18987				if err != nil {
18988					return err
18989				}
18990				or.Type = &typeVar
18991			}
18992		case "id":
18993			if v != nil {
18994				var ID string
18995				err = json.Unmarshal(*v, &ID)
18996				if err != nil {
18997					return err
18998				}
18999				or.ID = &ID
19000			}
19001		}
19002	}
19003
19004	return nil
19005}
19006
19007// OutboundRulePropertiesFormat outbound rule of the load balancer.
19008type OutboundRulePropertiesFormat struct {
19009	// AllocatedOutboundPorts - The number of outbound ports to be used for NAT.
19010	AllocatedOutboundPorts *int32 `json:"allocatedOutboundPorts,omitempty"`
19011	// FrontendIPConfigurations - The Frontend IP addresses of the load balancer.
19012	FrontendIPConfigurations *[]SubResource `json:"frontendIPConfigurations,omitempty"`
19013	// BackendAddressPool - A reference to a pool of DIPs. Outbound traffic is randomly load balanced across IPs in the backend IPs.
19014	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
19015	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
19016	ProvisioningState *string `json:"provisioningState,omitempty"`
19017	// Protocol - The protocol for the outbound rule in load balancer. Possible values include: 'LoadBalancerOutboundRuleProtocolTCP', 'LoadBalancerOutboundRuleProtocolUDP', 'LoadBalancerOutboundRuleProtocolAll'
19018	Protocol LoadBalancerOutboundRuleProtocol `json:"protocol,omitempty"`
19019	// 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.
19020	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
19021	// IdleTimeoutInMinutes - The timeout for the TCP idle connection.
19022	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
19023}
19024
19025// P2SVpnGateway p2SVpnGateway Resource.
19026type P2SVpnGateway struct {
19027	autorest.Response `json:"-"`
19028	// P2SVpnGatewayProperties - Properties of the P2SVpnGateway.
19029	*P2SVpnGatewayProperties `json:"properties,omitempty"`
19030	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
19031	Etag *string `json:"etag,omitempty"`
19032	// ID - Resource ID.
19033	ID *string `json:"id,omitempty"`
19034	// Name - READ-ONLY; Resource name.
19035	Name *string `json:"name,omitempty"`
19036	// Type - READ-ONLY; Resource type.
19037	Type *string `json:"type,omitempty"`
19038	// Location - Resource location.
19039	Location *string `json:"location,omitempty"`
19040	// Tags - Resource tags.
19041	Tags map[string]*string `json:"tags"`
19042}
19043
19044// MarshalJSON is the custom marshaler for P2SVpnGateway.
19045func (pvg P2SVpnGateway) MarshalJSON() ([]byte, error) {
19046	objectMap := make(map[string]interface{})
19047	if pvg.P2SVpnGatewayProperties != nil {
19048		objectMap["properties"] = pvg.P2SVpnGatewayProperties
19049	}
19050	if pvg.ID != nil {
19051		objectMap["id"] = pvg.ID
19052	}
19053	if pvg.Location != nil {
19054		objectMap["location"] = pvg.Location
19055	}
19056	if pvg.Tags != nil {
19057		objectMap["tags"] = pvg.Tags
19058	}
19059	return json.Marshal(objectMap)
19060}
19061
19062// UnmarshalJSON is the custom unmarshaler for P2SVpnGateway struct.
19063func (pvg *P2SVpnGateway) UnmarshalJSON(body []byte) error {
19064	var m map[string]*json.RawMessage
19065	err := json.Unmarshal(body, &m)
19066	if err != nil {
19067		return err
19068	}
19069	for k, v := range m {
19070		switch k {
19071		case "properties":
19072			if v != nil {
19073				var p2SVpnGatewayProperties P2SVpnGatewayProperties
19074				err = json.Unmarshal(*v, &p2SVpnGatewayProperties)
19075				if err != nil {
19076					return err
19077				}
19078				pvg.P2SVpnGatewayProperties = &p2SVpnGatewayProperties
19079			}
19080		case "etag":
19081			if v != nil {
19082				var etag string
19083				err = json.Unmarshal(*v, &etag)
19084				if err != nil {
19085					return err
19086				}
19087				pvg.Etag = &etag
19088			}
19089		case "id":
19090			if v != nil {
19091				var ID string
19092				err = json.Unmarshal(*v, &ID)
19093				if err != nil {
19094					return err
19095				}
19096				pvg.ID = &ID
19097			}
19098		case "name":
19099			if v != nil {
19100				var name string
19101				err = json.Unmarshal(*v, &name)
19102				if err != nil {
19103					return err
19104				}
19105				pvg.Name = &name
19106			}
19107		case "type":
19108			if v != nil {
19109				var typeVar string
19110				err = json.Unmarshal(*v, &typeVar)
19111				if err != nil {
19112					return err
19113				}
19114				pvg.Type = &typeVar
19115			}
19116		case "location":
19117			if v != nil {
19118				var location string
19119				err = json.Unmarshal(*v, &location)
19120				if err != nil {
19121					return err
19122				}
19123				pvg.Location = &location
19124			}
19125		case "tags":
19126			if v != nil {
19127				var tags map[string]*string
19128				err = json.Unmarshal(*v, &tags)
19129				if err != nil {
19130					return err
19131				}
19132				pvg.Tags = tags
19133			}
19134		}
19135	}
19136
19137	return nil
19138}
19139
19140// P2SVpnGatewayProperties parameters for P2SVpnGateway.
19141type P2SVpnGatewayProperties struct {
19142	// VirtualHub - The VirtualHub to which the gateway belongs.
19143	VirtualHub *SubResource `json:"virtualHub,omitempty"`
19144	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
19145	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
19146	// VpnGatewayScaleUnit - The scale unit for this p2s vpn gateway.
19147	VpnGatewayScaleUnit *int32 `json:"vpnGatewayScaleUnit,omitempty"`
19148	// P2SVpnServerConfiguration - The P2SVpnServerConfiguration to which the p2sVpnGateway is attached to.
19149	P2SVpnServerConfiguration *SubResource `json:"p2SVpnServerConfiguration,omitempty"`
19150	// VpnClientAddressPool - The reference of the address space resource which represents Address space for P2S VpnClient.
19151	VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"`
19152	// CustomRoutes - The reference of the address space resource which represents the custom routes specified by the customer for P2SVpnGateway and P2S VpnClient.
19153	CustomRoutes *AddressSpace `json:"customRoutes,omitempty"`
19154	// VpnClientConnectionHealth - READ-ONLY; All P2S VPN clients' connection health status.
19155	VpnClientConnectionHealth *VpnClientConnectionHealth `json:"vpnClientConnectionHealth,omitempty"`
19156}
19157
19158// MarshalJSON is the custom marshaler for P2SVpnGatewayProperties.
19159func (pvgp P2SVpnGatewayProperties) MarshalJSON() ([]byte, error) {
19160	objectMap := make(map[string]interface{})
19161	if pvgp.VirtualHub != nil {
19162		objectMap["virtualHub"] = pvgp.VirtualHub
19163	}
19164	if pvgp.ProvisioningState != "" {
19165		objectMap["provisioningState"] = pvgp.ProvisioningState
19166	}
19167	if pvgp.VpnGatewayScaleUnit != nil {
19168		objectMap["vpnGatewayScaleUnit"] = pvgp.VpnGatewayScaleUnit
19169	}
19170	if pvgp.P2SVpnServerConfiguration != nil {
19171		objectMap["p2SVpnServerConfiguration"] = pvgp.P2SVpnServerConfiguration
19172	}
19173	if pvgp.VpnClientAddressPool != nil {
19174		objectMap["vpnClientAddressPool"] = pvgp.VpnClientAddressPool
19175	}
19176	if pvgp.CustomRoutes != nil {
19177		objectMap["customRoutes"] = pvgp.CustomRoutes
19178	}
19179	return json.Marshal(objectMap)
19180}
19181
19182// P2sVpnGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
19183// long-running operation.
19184type P2sVpnGatewaysCreateOrUpdateFuture struct {
19185	azure.FutureAPI
19186	// Result returns the result of the asynchronous operation.
19187	// If the operation has not completed it will return an error.
19188	Result func(P2sVpnGatewaysClient) (P2SVpnGateway, error)
19189}
19190
19191// P2sVpnGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
19192// operation.
19193type P2sVpnGatewaysDeleteFuture struct {
19194	azure.FutureAPI
19195	// Result returns the result of the asynchronous operation.
19196	// If the operation has not completed it will return an error.
19197	Result func(P2sVpnGatewaysClient) (autorest.Response, error)
19198}
19199
19200// P2sVpnGatewaysGenerateVpnProfileFuture an abstraction for monitoring and retrieving the results of a
19201// long-running operation.
19202type P2sVpnGatewaysGenerateVpnProfileFuture struct {
19203	azure.FutureAPI
19204	// Result returns the result of the asynchronous operation.
19205	// If the operation has not completed it will return an error.
19206	Result func(P2sVpnGatewaysClient) (VpnProfileResponse, error)
19207}
19208
19209// P2sVpnGatewaysGetP2sVpnConnectionHealthFuture an abstraction for monitoring and retrieving the results
19210// of a long-running operation.
19211type P2sVpnGatewaysGetP2sVpnConnectionHealthFuture struct {
19212	azure.FutureAPI
19213	// Result returns the result of the asynchronous operation.
19214	// If the operation has not completed it will return an error.
19215	Result func(P2sVpnGatewaysClient) (P2SVpnGateway, error)
19216}
19217
19218// P2sVpnGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
19219// long-running operation.
19220type P2sVpnGatewaysUpdateTagsFuture struct {
19221	azure.FutureAPI
19222	// Result returns the result of the asynchronous operation.
19223	// If the operation has not completed it will return an error.
19224	Result func(P2sVpnGatewaysClient) (P2SVpnGateway, error)
19225}
19226
19227// P2SVpnProfileParameters vpn Client Parameters for package generation.
19228type P2SVpnProfileParameters struct {
19229	// AuthenticationMethod - VPN client authentication method. Possible values include: 'EAPTLS', 'EAPMSCHAPv2'
19230	AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"`
19231}
19232
19233// P2SVpnServerConfigRadiusClientRootCertificate radius client root certificate of
19234// P2SVpnServerConfiguration.
19235type P2SVpnServerConfigRadiusClientRootCertificate struct {
19236	// P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat - Properties of the Radius client root certificate.
19237	*P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat `json:"properties,omitempty"`
19238	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
19239	Name *string `json:"name,omitempty"`
19240	// Etag - A unique read-only string that changes whenever the resource is updated.
19241	Etag *string `json:"etag,omitempty"`
19242	// ID - Resource ID.
19243	ID *string `json:"id,omitempty"`
19244}
19245
19246// MarshalJSON is the custom marshaler for P2SVpnServerConfigRadiusClientRootCertificate.
19247func (pvscrcrc P2SVpnServerConfigRadiusClientRootCertificate) MarshalJSON() ([]byte, error) {
19248	objectMap := make(map[string]interface{})
19249	if pvscrcrc.P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat != nil {
19250		objectMap["properties"] = pvscrcrc.P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat
19251	}
19252	if pvscrcrc.Name != nil {
19253		objectMap["name"] = pvscrcrc.Name
19254	}
19255	if pvscrcrc.Etag != nil {
19256		objectMap["etag"] = pvscrcrc.Etag
19257	}
19258	if pvscrcrc.ID != nil {
19259		objectMap["id"] = pvscrcrc.ID
19260	}
19261	return json.Marshal(objectMap)
19262}
19263
19264// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfigRadiusClientRootCertificate struct.
19265func (pvscrcrc *P2SVpnServerConfigRadiusClientRootCertificate) UnmarshalJSON(body []byte) error {
19266	var m map[string]*json.RawMessage
19267	err := json.Unmarshal(body, &m)
19268	if err != nil {
19269		return err
19270	}
19271	for k, v := range m {
19272		switch k {
19273		case "properties":
19274			if v != nil {
19275				var p2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat
19276				err = json.Unmarshal(*v, &p2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat)
19277				if err != nil {
19278					return err
19279				}
19280				pvscrcrc.P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat = &p2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat
19281			}
19282		case "name":
19283			if v != nil {
19284				var name string
19285				err = json.Unmarshal(*v, &name)
19286				if err != nil {
19287					return err
19288				}
19289				pvscrcrc.Name = &name
19290			}
19291		case "etag":
19292			if v != nil {
19293				var etag string
19294				err = json.Unmarshal(*v, &etag)
19295				if err != nil {
19296					return err
19297				}
19298				pvscrcrc.Etag = &etag
19299			}
19300		case "id":
19301			if v != nil {
19302				var ID string
19303				err = json.Unmarshal(*v, &ID)
19304				if err != nil {
19305					return err
19306				}
19307				pvscrcrc.ID = &ID
19308			}
19309		}
19310	}
19311
19312	return nil
19313}
19314
19315// P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat properties of the Radius client root
19316// certificate of P2SVpnServerConfiguration.
19317type P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat struct {
19318	// Thumbprint - The Radius client root certificate thumbprint.
19319	Thumbprint *string `json:"thumbprint,omitempty"`
19320	// ProvisioningState - READ-ONLY; The provisioning state of the Radius client root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
19321	ProvisioningState *string `json:"provisioningState,omitempty"`
19322}
19323
19324// MarshalJSON is the custom marshaler for P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat.
19325func (pvscrcrcpf P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
19326	objectMap := make(map[string]interface{})
19327	if pvscrcrcpf.Thumbprint != nil {
19328		objectMap["thumbprint"] = pvscrcrcpf.Thumbprint
19329	}
19330	return json.Marshal(objectMap)
19331}
19332
19333// P2SVpnServerConfigRadiusServerRootCertificate radius Server root certificate of
19334// P2SVpnServerConfiguration.
19335type P2SVpnServerConfigRadiusServerRootCertificate struct {
19336	// P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat - Properties of the P2SVpnServerConfiguration Radius Server root certificate.
19337	*P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat `json:"properties,omitempty"`
19338	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
19339	Name *string `json:"name,omitempty"`
19340	// Etag - A unique read-only string that changes whenever the resource is updated.
19341	Etag *string `json:"etag,omitempty"`
19342	// ID - Resource ID.
19343	ID *string `json:"id,omitempty"`
19344}
19345
19346// MarshalJSON is the custom marshaler for P2SVpnServerConfigRadiusServerRootCertificate.
19347func (pvscrsrc P2SVpnServerConfigRadiusServerRootCertificate) MarshalJSON() ([]byte, error) {
19348	objectMap := make(map[string]interface{})
19349	if pvscrsrc.P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat != nil {
19350		objectMap["properties"] = pvscrsrc.P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat
19351	}
19352	if pvscrsrc.Name != nil {
19353		objectMap["name"] = pvscrsrc.Name
19354	}
19355	if pvscrsrc.Etag != nil {
19356		objectMap["etag"] = pvscrsrc.Etag
19357	}
19358	if pvscrsrc.ID != nil {
19359		objectMap["id"] = pvscrsrc.ID
19360	}
19361	return json.Marshal(objectMap)
19362}
19363
19364// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfigRadiusServerRootCertificate struct.
19365func (pvscrsrc *P2SVpnServerConfigRadiusServerRootCertificate) UnmarshalJSON(body []byte) error {
19366	var m map[string]*json.RawMessage
19367	err := json.Unmarshal(body, &m)
19368	if err != nil {
19369		return err
19370	}
19371	for k, v := range m {
19372		switch k {
19373		case "properties":
19374			if v != nil {
19375				var p2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat
19376				err = json.Unmarshal(*v, &p2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat)
19377				if err != nil {
19378					return err
19379				}
19380				pvscrsrc.P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat = &p2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat
19381			}
19382		case "name":
19383			if v != nil {
19384				var name string
19385				err = json.Unmarshal(*v, &name)
19386				if err != nil {
19387					return err
19388				}
19389				pvscrsrc.Name = &name
19390			}
19391		case "etag":
19392			if v != nil {
19393				var etag string
19394				err = json.Unmarshal(*v, &etag)
19395				if err != nil {
19396					return err
19397				}
19398				pvscrsrc.Etag = &etag
19399			}
19400		case "id":
19401			if v != nil {
19402				var ID string
19403				err = json.Unmarshal(*v, &ID)
19404				if err != nil {
19405					return err
19406				}
19407				pvscrsrc.ID = &ID
19408			}
19409		}
19410	}
19411
19412	return nil
19413}
19414
19415// P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat properties of Radius Server root
19416// certificate of P2SVpnServerConfiguration.
19417type P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat struct {
19418	// PublicCertData - The certificate public data.
19419	PublicCertData *string `json:"publicCertData,omitempty"`
19420	// ProvisioningState - READ-ONLY; The provisioning state of the P2SVpnServerConfiguration Radius Server root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
19421	ProvisioningState *string `json:"provisioningState,omitempty"`
19422}
19423
19424// MarshalJSON is the custom marshaler for P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat.
19425func (pvscrsrcpf P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
19426	objectMap := make(map[string]interface{})
19427	if pvscrsrcpf.PublicCertData != nil {
19428		objectMap["publicCertData"] = pvscrsrcpf.PublicCertData
19429	}
19430	return json.Marshal(objectMap)
19431}
19432
19433// P2SVpnServerConfiguration p2SVpnServerConfiguration Resource.
19434type P2SVpnServerConfiguration struct {
19435	autorest.Response `json:"-"`
19436	// P2SVpnServerConfigurationProperties - Properties of the P2SVpnServer configuration.
19437	*P2SVpnServerConfigurationProperties `json:"properties,omitempty"`
19438	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
19439	Name *string `json:"name,omitempty"`
19440	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
19441	Etag *string `json:"etag,omitempty"`
19442	// ID - Resource ID.
19443	ID *string `json:"id,omitempty"`
19444}
19445
19446// MarshalJSON is the custom marshaler for P2SVpnServerConfiguration.
19447func (pvsc P2SVpnServerConfiguration) MarshalJSON() ([]byte, error) {
19448	objectMap := make(map[string]interface{})
19449	if pvsc.P2SVpnServerConfigurationProperties != nil {
19450		objectMap["properties"] = pvsc.P2SVpnServerConfigurationProperties
19451	}
19452	if pvsc.Name != nil {
19453		objectMap["name"] = pvsc.Name
19454	}
19455	if pvsc.ID != nil {
19456		objectMap["id"] = pvsc.ID
19457	}
19458	return json.Marshal(objectMap)
19459}
19460
19461// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfiguration struct.
19462func (pvsc *P2SVpnServerConfiguration) UnmarshalJSON(body []byte) error {
19463	var m map[string]*json.RawMessage
19464	err := json.Unmarshal(body, &m)
19465	if err != nil {
19466		return err
19467	}
19468	for k, v := range m {
19469		switch k {
19470		case "properties":
19471			if v != nil {
19472				var p2SVpnServerConfigurationProperties P2SVpnServerConfigurationProperties
19473				err = json.Unmarshal(*v, &p2SVpnServerConfigurationProperties)
19474				if err != nil {
19475					return err
19476				}
19477				pvsc.P2SVpnServerConfigurationProperties = &p2SVpnServerConfigurationProperties
19478			}
19479		case "name":
19480			if v != nil {
19481				var name string
19482				err = json.Unmarshal(*v, &name)
19483				if err != nil {
19484					return err
19485				}
19486				pvsc.Name = &name
19487			}
19488		case "etag":
19489			if v != nil {
19490				var etag string
19491				err = json.Unmarshal(*v, &etag)
19492				if err != nil {
19493					return err
19494				}
19495				pvsc.Etag = &etag
19496			}
19497		case "id":
19498			if v != nil {
19499				var ID string
19500				err = json.Unmarshal(*v, &ID)
19501				if err != nil {
19502					return err
19503				}
19504				pvsc.ID = &ID
19505			}
19506		}
19507	}
19508
19509	return nil
19510}
19511
19512// P2SVpnServerConfigurationProperties parameters for P2SVpnServerConfiguration.
19513type P2SVpnServerConfigurationProperties struct {
19514	// 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.
19515	Name *string `json:"name,omitempty"`
19516	// VpnProtocols - VPN protocols for the P2SVpnServerConfiguration.
19517	VpnProtocols *[]VpnGatewayTunnelingProtocol `json:"vpnProtocols,omitempty"`
19518	// P2SVpnServerConfigVpnClientRootCertificates - VPN client root certificate of P2SVpnServerConfiguration.
19519	P2SVpnServerConfigVpnClientRootCertificates *[]P2SVpnServerConfigVpnClientRootCertificate `json:"p2SVpnServerConfigVpnClientRootCertificates,omitempty"`
19520	// P2SVpnServerConfigVpnClientRevokedCertificates - VPN client revoked certificate of P2SVpnServerConfiguration.
19521	P2SVpnServerConfigVpnClientRevokedCertificates *[]P2SVpnServerConfigVpnClientRevokedCertificate `json:"p2SVpnServerConfigVpnClientRevokedCertificates,omitempty"`
19522	// P2SVpnServerConfigRadiusServerRootCertificates - Radius Server root certificate of P2SVpnServerConfiguration.
19523	P2SVpnServerConfigRadiusServerRootCertificates *[]P2SVpnServerConfigRadiusServerRootCertificate `json:"p2SVpnServerConfigRadiusServerRootCertificates,omitempty"`
19524	// P2SVpnServerConfigRadiusClientRootCertificates - Radius client root certificate of P2SVpnServerConfiguration.
19525	P2SVpnServerConfigRadiusClientRootCertificates *[]P2SVpnServerConfigRadiusClientRootCertificate `json:"p2SVpnServerConfigRadiusClientRootCertificates,omitempty"`
19526	// VpnClientIpsecPolicies - VpnClientIpsecPolicies for P2SVpnServerConfiguration.
19527	VpnClientIpsecPolicies *[]IpsecPolicy `json:"vpnClientIpsecPolicies,omitempty"`
19528	// RadiusServerAddress - The radius server address property of the P2SVpnServerConfiguration resource for point to site client connection.
19529	RadiusServerAddress *string `json:"radiusServerAddress,omitempty"`
19530	// RadiusServerSecret - The radius secret property of the P2SVpnServerConfiguration resource for point to site client connection.
19531	RadiusServerSecret *string `json:"radiusServerSecret,omitempty"`
19532	// ProvisioningState - READ-ONLY; The provisioning state of the P2SVpnServerConfiguration resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
19533	ProvisioningState *string `json:"provisioningState,omitempty"`
19534	// P2SVpnGateways - READ-ONLY; List of references to P2SVpnGateways.
19535	P2SVpnGateways *[]SubResource `json:"p2SVpnGateways,omitempty"`
19536	// Etag - A unique read-only string that changes whenever the resource is updated.
19537	Etag *string `json:"etag,omitempty"`
19538}
19539
19540// MarshalJSON is the custom marshaler for P2SVpnServerConfigurationProperties.
19541func (pvscp P2SVpnServerConfigurationProperties) MarshalJSON() ([]byte, error) {
19542	objectMap := make(map[string]interface{})
19543	if pvscp.Name != nil {
19544		objectMap["name"] = pvscp.Name
19545	}
19546	if pvscp.VpnProtocols != nil {
19547		objectMap["vpnProtocols"] = pvscp.VpnProtocols
19548	}
19549	if pvscp.P2SVpnServerConfigVpnClientRootCertificates != nil {
19550		objectMap["p2SVpnServerConfigVpnClientRootCertificates"] = pvscp.P2SVpnServerConfigVpnClientRootCertificates
19551	}
19552	if pvscp.P2SVpnServerConfigVpnClientRevokedCertificates != nil {
19553		objectMap["p2SVpnServerConfigVpnClientRevokedCertificates"] = pvscp.P2SVpnServerConfigVpnClientRevokedCertificates
19554	}
19555	if pvscp.P2SVpnServerConfigRadiusServerRootCertificates != nil {
19556		objectMap["p2SVpnServerConfigRadiusServerRootCertificates"] = pvscp.P2SVpnServerConfigRadiusServerRootCertificates
19557	}
19558	if pvscp.P2SVpnServerConfigRadiusClientRootCertificates != nil {
19559		objectMap["p2SVpnServerConfigRadiusClientRootCertificates"] = pvscp.P2SVpnServerConfigRadiusClientRootCertificates
19560	}
19561	if pvscp.VpnClientIpsecPolicies != nil {
19562		objectMap["vpnClientIpsecPolicies"] = pvscp.VpnClientIpsecPolicies
19563	}
19564	if pvscp.RadiusServerAddress != nil {
19565		objectMap["radiusServerAddress"] = pvscp.RadiusServerAddress
19566	}
19567	if pvscp.RadiusServerSecret != nil {
19568		objectMap["radiusServerSecret"] = pvscp.RadiusServerSecret
19569	}
19570	if pvscp.Etag != nil {
19571		objectMap["etag"] = pvscp.Etag
19572	}
19573	return json.Marshal(objectMap)
19574}
19575
19576// P2sVpnServerConfigurationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
19577// of a long-running operation.
19578type P2sVpnServerConfigurationsCreateOrUpdateFuture struct {
19579	azure.FutureAPI
19580	// Result returns the result of the asynchronous operation.
19581	// If the operation has not completed it will return an error.
19582	Result func(P2sVpnServerConfigurationsClient) (P2SVpnServerConfiguration, error)
19583}
19584
19585// P2sVpnServerConfigurationsDeleteFuture an abstraction for monitoring and retrieving the results of a
19586// long-running operation.
19587type P2sVpnServerConfigurationsDeleteFuture struct {
19588	azure.FutureAPI
19589	// Result returns the result of the asynchronous operation.
19590	// If the operation has not completed it will return an error.
19591	Result func(P2sVpnServerConfigurationsClient) (autorest.Response, error)
19592}
19593
19594// P2SVpnServerConfigVpnClientRevokedCertificate VPN client revoked certificate of
19595// P2SVpnServerConfiguration.
19596type P2SVpnServerConfigVpnClientRevokedCertificate struct {
19597	// P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat - Properties of the vpn client revoked certificate.
19598	*P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat `json:"properties,omitempty"`
19599	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
19600	Name *string `json:"name,omitempty"`
19601	// Etag - A unique read-only string that changes whenever the resource is updated.
19602	Etag *string `json:"etag,omitempty"`
19603	// ID - Resource ID.
19604	ID *string `json:"id,omitempty"`
19605}
19606
19607// MarshalJSON is the custom marshaler for P2SVpnServerConfigVpnClientRevokedCertificate.
19608func (pvscvcrc P2SVpnServerConfigVpnClientRevokedCertificate) MarshalJSON() ([]byte, error) {
19609	objectMap := make(map[string]interface{})
19610	if pvscvcrc.P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat != nil {
19611		objectMap["properties"] = pvscvcrc.P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat
19612	}
19613	if pvscvcrc.Name != nil {
19614		objectMap["name"] = pvscvcrc.Name
19615	}
19616	if pvscvcrc.Etag != nil {
19617		objectMap["etag"] = pvscvcrc.Etag
19618	}
19619	if pvscvcrc.ID != nil {
19620		objectMap["id"] = pvscvcrc.ID
19621	}
19622	return json.Marshal(objectMap)
19623}
19624
19625// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfigVpnClientRevokedCertificate struct.
19626func (pvscvcrc *P2SVpnServerConfigVpnClientRevokedCertificate) UnmarshalJSON(body []byte) error {
19627	var m map[string]*json.RawMessage
19628	err := json.Unmarshal(body, &m)
19629	if err != nil {
19630		return err
19631	}
19632	for k, v := range m {
19633		switch k {
19634		case "properties":
19635			if v != nil {
19636				var p2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat
19637				err = json.Unmarshal(*v, &p2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat)
19638				if err != nil {
19639					return err
19640				}
19641				pvscvcrc.P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat = &p2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat
19642			}
19643		case "name":
19644			if v != nil {
19645				var name string
19646				err = json.Unmarshal(*v, &name)
19647				if err != nil {
19648					return err
19649				}
19650				pvscvcrc.Name = &name
19651			}
19652		case "etag":
19653			if v != nil {
19654				var etag string
19655				err = json.Unmarshal(*v, &etag)
19656				if err != nil {
19657					return err
19658				}
19659				pvscvcrc.Etag = &etag
19660			}
19661		case "id":
19662			if v != nil {
19663				var ID string
19664				err = json.Unmarshal(*v, &ID)
19665				if err != nil {
19666					return err
19667				}
19668				pvscvcrc.ID = &ID
19669			}
19670		}
19671	}
19672
19673	return nil
19674}
19675
19676// P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat properties of the revoked VPN client
19677// certificate of P2SVpnServerConfiguration.
19678type P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat struct {
19679	// Thumbprint - The revoked VPN client certificate thumbprint.
19680	Thumbprint *string `json:"thumbprint,omitempty"`
19681	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client revoked certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
19682	ProvisioningState *string `json:"provisioningState,omitempty"`
19683}
19684
19685// MarshalJSON is the custom marshaler for P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat.
19686func (pvscvcrcpf P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
19687	objectMap := make(map[string]interface{})
19688	if pvscvcrcpf.Thumbprint != nil {
19689		objectMap["thumbprint"] = pvscvcrcpf.Thumbprint
19690	}
19691	return json.Marshal(objectMap)
19692}
19693
19694// P2SVpnServerConfigVpnClientRootCertificate VPN client root certificate of P2SVpnServerConfiguration.
19695type P2SVpnServerConfigVpnClientRootCertificate struct {
19696	// P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat - Properties of the P2SVpnServerConfiguration VPN client root certificate.
19697	*P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat `json:"properties,omitempty"`
19698	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
19699	Name *string `json:"name,omitempty"`
19700	// Etag - A unique read-only string that changes whenever the resource is updated.
19701	Etag *string `json:"etag,omitempty"`
19702	// ID - Resource ID.
19703	ID *string `json:"id,omitempty"`
19704}
19705
19706// MarshalJSON is the custom marshaler for P2SVpnServerConfigVpnClientRootCertificate.
19707func (pvscvcrc P2SVpnServerConfigVpnClientRootCertificate) MarshalJSON() ([]byte, error) {
19708	objectMap := make(map[string]interface{})
19709	if pvscvcrc.P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat != nil {
19710		objectMap["properties"] = pvscvcrc.P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat
19711	}
19712	if pvscvcrc.Name != nil {
19713		objectMap["name"] = pvscvcrc.Name
19714	}
19715	if pvscvcrc.Etag != nil {
19716		objectMap["etag"] = pvscvcrc.Etag
19717	}
19718	if pvscvcrc.ID != nil {
19719		objectMap["id"] = pvscvcrc.ID
19720	}
19721	return json.Marshal(objectMap)
19722}
19723
19724// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfigVpnClientRootCertificate struct.
19725func (pvscvcrc *P2SVpnServerConfigVpnClientRootCertificate) UnmarshalJSON(body []byte) error {
19726	var m map[string]*json.RawMessage
19727	err := json.Unmarshal(body, &m)
19728	if err != nil {
19729		return err
19730	}
19731	for k, v := range m {
19732		switch k {
19733		case "properties":
19734			if v != nil {
19735				var p2SVpnServerConfigVpnClientRootCertificatePropertiesFormat P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat
19736				err = json.Unmarshal(*v, &p2SVpnServerConfigVpnClientRootCertificatePropertiesFormat)
19737				if err != nil {
19738					return err
19739				}
19740				pvscvcrc.P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat = &p2SVpnServerConfigVpnClientRootCertificatePropertiesFormat
19741			}
19742		case "name":
19743			if v != nil {
19744				var name string
19745				err = json.Unmarshal(*v, &name)
19746				if err != nil {
19747					return err
19748				}
19749				pvscvcrc.Name = &name
19750			}
19751		case "etag":
19752			if v != nil {
19753				var etag string
19754				err = json.Unmarshal(*v, &etag)
19755				if err != nil {
19756					return err
19757				}
19758				pvscvcrc.Etag = &etag
19759			}
19760		case "id":
19761			if v != nil {
19762				var ID string
19763				err = json.Unmarshal(*v, &ID)
19764				if err != nil {
19765					return err
19766				}
19767				pvscvcrc.ID = &ID
19768			}
19769		}
19770	}
19771
19772	return nil
19773}
19774
19775// P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat properties of VPN client root certificate of
19776// P2SVpnServerConfiguration.
19777type P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat struct {
19778	// PublicCertData - The certificate public data.
19779	PublicCertData *string `json:"publicCertData,omitempty"`
19780	// ProvisioningState - READ-ONLY; The provisioning state of the P2SVpnServerConfiguration VPN client root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
19781	ProvisioningState *string `json:"provisioningState,omitempty"`
19782}
19783
19784// MarshalJSON is the custom marshaler for P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat.
19785func (pvscvcrcpf P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
19786	objectMap := make(map[string]interface{})
19787	if pvscvcrcpf.PublicCertData != nil {
19788		objectMap["publicCertData"] = pvscvcrcpf.PublicCertData
19789	}
19790	return json.Marshal(objectMap)
19791}
19792
19793// PacketCapture parameters that define the create packet capture operation.
19794type PacketCapture struct {
19795	// PacketCaptureParameters - Properties of the packet capture.
19796	*PacketCaptureParameters `json:"properties,omitempty"`
19797}
19798
19799// MarshalJSON is the custom marshaler for PacketCapture.
19800func (pc PacketCapture) MarshalJSON() ([]byte, error) {
19801	objectMap := make(map[string]interface{})
19802	if pc.PacketCaptureParameters != nil {
19803		objectMap["properties"] = pc.PacketCaptureParameters
19804	}
19805	return json.Marshal(objectMap)
19806}
19807
19808// UnmarshalJSON is the custom unmarshaler for PacketCapture struct.
19809func (pc *PacketCapture) UnmarshalJSON(body []byte) error {
19810	var m map[string]*json.RawMessage
19811	err := json.Unmarshal(body, &m)
19812	if err != nil {
19813		return err
19814	}
19815	for k, v := range m {
19816		switch k {
19817		case "properties":
19818			if v != nil {
19819				var packetCaptureParameters PacketCaptureParameters
19820				err = json.Unmarshal(*v, &packetCaptureParameters)
19821				if err != nil {
19822					return err
19823				}
19824				pc.PacketCaptureParameters = &packetCaptureParameters
19825			}
19826		}
19827	}
19828
19829	return nil
19830}
19831
19832// PacketCaptureFilter filter that is applied to packet capture request. Multiple filters can be applied.
19833type PacketCaptureFilter struct {
19834	// Protocol - Protocol to be filtered on. Possible values include: 'PcProtocolTCP', 'PcProtocolUDP', 'PcProtocolAny'
19835	Protocol PcProtocol `json:"protocol,omitempty"`
19836	// 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.
19837	LocalIPAddress *string `json:"localIPAddress,omitempty"`
19838	// 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.
19839	RemoteIPAddress *string `json:"remoteIPAddress,omitempty"`
19840	// 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.
19841	LocalPort *string `json:"localPort,omitempty"`
19842	// 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.
19843	RemotePort *string `json:"remotePort,omitempty"`
19844}
19845
19846// PacketCaptureListResult list of packet capture sessions.
19847type PacketCaptureListResult struct {
19848	autorest.Response `json:"-"`
19849	// Value - Information about packet capture sessions.
19850	Value *[]PacketCaptureResult `json:"value,omitempty"`
19851}
19852
19853// PacketCaptureParameters parameters that define the create packet capture operation.
19854type PacketCaptureParameters struct {
19855	// Target - The ID of the targeted resource, only VM is currently supported.
19856	Target *string `json:"target,omitempty"`
19857	// BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated.
19858	BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"`
19859	// TotalBytesPerSession - Maximum size of the capture output.
19860	TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"`
19861	// TimeLimitInSeconds - Maximum duration of the capture session in seconds.
19862	TimeLimitInSeconds *int32 `json:"timeLimitInSeconds,omitempty"`
19863	// StorageLocation - Describes the storage location for a packet capture session.
19864	StorageLocation *PacketCaptureStorageLocation `json:"storageLocation,omitempty"`
19865	// Filters - A list of packet capture filters.
19866	Filters *[]PacketCaptureFilter `json:"filters,omitempty"`
19867}
19868
19869// PacketCaptureQueryStatusResult status of packet capture session.
19870type PacketCaptureQueryStatusResult struct {
19871	autorest.Response `json:"-"`
19872	// Name - The name of the packet capture resource.
19873	Name *string `json:"name,omitempty"`
19874	// ID - The ID of the packet capture resource.
19875	ID *string `json:"id,omitempty"`
19876	// CaptureStartTime - The start time of the packet capture session.
19877	CaptureStartTime *date.Time `json:"captureStartTime,omitempty"`
19878	// PacketCaptureStatus - The status of the packet capture session. Possible values include: 'PcStatusNotStarted', 'PcStatusRunning', 'PcStatusStopped', 'PcStatusError', 'PcStatusUnknown'
19879	PacketCaptureStatus PcStatus `json:"packetCaptureStatus,omitempty"`
19880	// StopReason - The reason the current packet capture session was stopped.
19881	StopReason *string `json:"stopReason,omitempty"`
19882	// PacketCaptureError - List of errors of packet capture session.
19883	PacketCaptureError *[]PcError `json:"packetCaptureError,omitempty"`
19884}
19885
19886// PacketCaptureResult information about packet capture session.
19887type PacketCaptureResult struct {
19888	autorest.Response `json:"-"`
19889	// Name - READ-ONLY; Name of the packet capture session.
19890	Name *string `json:"name,omitempty"`
19891	// ID - READ-ONLY; ID of the packet capture operation.
19892	ID *string `json:"id,omitempty"`
19893	// Etag - A unique read-only string that changes whenever the resource is updated.
19894	Etag *string `json:"etag,omitempty"`
19895	// PacketCaptureResultProperties - Properties of the packet capture result.
19896	*PacketCaptureResultProperties `json:"properties,omitempty"`
19897}
19898
19899// MarshalJSON is the custom marshaler for PacketCaptureResult.
19900func (pcr PacketCaptureResult) MarshalJSON() ([]byte, error) {
19901	objectMap := make(map[string]interface{})
19902	if pcr.Etag != nil {
19903		objectMap["etag"] = pcr.Etag
19904	}
19905	if pcr.PacketCaptureResultProperties != nil {
19906		objectMap["properties"] = pcr.PacketCaptureResultProperties
19907	}
19908	return json.Marshal(objectMap)
19909}
19910
19911// UnmarshalJSON is the custom unmarshaler for PacketCaptureResult struct.
19912func (pcr *PacketCaptureResult) UnmarshalJSON(body []byte) error {
19913	var m map[string]*json.RawMessage
19914	err := json.Unmarshal(body, &m)
19915	if err != nil {
19916		return err
19917	}
19918	for k, v := range m {
19919		switch k {
19920		case "name":
19921			if v != nil {
19922				var name string
19923				err = json.Unmarshal(*v, &name)
19924				if err != nil {
19925					return err
19926				}
19927				pcr.Name = &name
19928			}
19929		case "id":
19930			if v != nil {
19931				var ID string
19932				err = json.Unmarshal(*v, &ID)
19933				if err != nil {
19934					return err
19935				}
19936				pcr.ID = &ID
19937			}
19938		case "etag":
19939			if v != nil {
19940				var etag string
19941				err = json.Unmarshal(*v, &etag)
19942				if err != nil {
19943					return err
19944				}
19945				pcr.Etag = &etag
19946			}
19947		case "properties":
19948			if v != nil {
19949				var packetCaptureResultProperties PacketCaptureResultProperties
19950				err = json.Unmarshal(*v, &packetCaptureResultProperties)
19951				if err != nil {
19952					return err
19953				}
19954				pcr.PacketCaptureResultProperties = &packetCaptureResultProperties
19955			}
19956		}
19957	}
19958
19959	return nil
19960}
19961
19962// PacketCaptureResultProperties describes the properties of a packet capture session.
19963type PacketCaptureResultProperties struct {
19964	// ProvisioningState - The provisioning state of the packet capture session. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
19965	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
19966	// Target - The ID of the targeted resource, only VM is currently supported.
19967	Target *string `json:"target,omitempty"`
19968	// BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated.
19969	BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"`
19970	// TotalBytesPerSession - Maximum size of the capture output.
19971	TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"`
19972	// TimeLimitInSeconds - Maximum duration of the capture session in seconds.
19973	TimeLimitInSeconds *int32 `json:"timeLimitInSeconds,omitempty"`
19974	// StorageLocation - Describes the storage location for a packet capture session.
19975	StorageLocation *PacketCaptureStorageLocation `json:"storageLocation,omitempty"`
19976	// Filters - A list of packet capture filters.
19977	Filters *[]PacketCaptureFilter `json:"filters,omitempty"`
19978}
19979
19980// PacketCapturesCreateFuture an abstraction for monitoring and retrieving the results of a long-running
19981// operation.
19982type PacketCapturesCreateFuture struct {
19983	azure.FutureAPI
19984	// Result returns the result of the asynchronous operation.
19985	// If the operation has not completed it will return an error.
19986	Result func(PacketCapturesClient) (PacketCaptureResult, error)
19987}
19988
19989// PacketCapturesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
19990// operation.
19991type PacketCapturesDeleteFuture struct {
19992	azure.FutureAPI
19993	// Result returns the result of the asynchronous operation.
19994	// If the operation has not completed it will return an error.
19995	Result func(PacketCapturesClient) (autorest.Response, error)
19996}
19997
19998// PacketCapturesGetStatusFuture an abstraction for monitoring and retrieving the results of a long-running
19999// operation.
20000type PacketCapturesGetStatusFuture struct {
20001	azure.FutureAPI
20002	// Result returns the result of the asynchronous operation.
20003	// If the operation has not completed it will return an error.
20004	Result func(PacketCapturesClient) (PacketCaptureQueryStatusResult, error)
20005}
20006
20007// PacketCapturesStopFuture an abstraction for monitoring and retrieving the results of a long-running
20008// operation.
20009type PacketCapturesStopFuture struct {
20010	azure.FutureAPI
20011	// Result returns the result of the asynchronous operation.
20012	// If the operation has not completed it will return an error.
20013	Result func(PacketCapturesClient) (autorest.Response, error)
20014}
20015
20016// PacketCaptureStorageLocation describes the storage location for a packet capture session.
20017type PacketCaptureStorageLocation struct {
20018	// StorageID - The ID of the storage account to save the packet capture session. Required if no local file path is provided.
20019	StorageID *string `json:"storageId,omitempty"`
20020	// 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.
20021	StoragePath *string `json:"storagePath,omitempty"`
20022	// 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.
20023	FilePath *string `json:"filePath,omitempty"`
20024}
20025
20026// PatchRouteFilter route Filter Resource.
20027type PatchRouteFilter struct {
20028	// RouteFilterPropertiesFormat - Properties of the route filter.
20029	*RouteFilterPropertiesFormat `json:"properties,omitempty"`
20030	// Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource.
20031	Name *string `json:"name,omitempty"`
20032	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
20033	Etag *string `json:"etag,omitempty"`
20034	// Type - READ-ONLY; Resource type.
20035	Type *string `json:"type,omitempty"`
20036	// Tags - Resource tags.
20037	Tags map[string]*string `json:"tags"`
20038	// ID - Resource ID.
20039	ID *string `json:"id,omitempty"`
20040}
20041
20042// MarshalJSON is the custom marshaler for PatchRouteFilter.
20043func (prf PatchRouteFilter) MarshalJSON() ([]byte, error) {
20044	objectMap := make(map[string]interface{})
20045	if prf.RouteFilterPropertiesFormat != nil {
20046		objectMap["properties"] = prf.RouteFilterPropertiesFormat
20047	}
20048	if prf.Tags != nil {
20049		objectMap["tags"] = prf.Tags
20050	}
20051	if prf.ID != nil {
20052		objectMap["id"] = prf.ID
20053	}
20054	return json.Marshal(objectMap)
20055}
20056
20057// UnmarshalJSON is the custom unmarshaler for PatchRouteFilter struct.
20058func (prf *PatchRouteFilter) UnmarshalJSON(body []byte) error {
20059	var m map[string]*json.RawMessage
20060	err := json.Unmarshal(body, &m)
20061	if err != nil {
20062		return err
20063	}
20064	for k, v := range m {
20065		switch k {
20066		case "properties":
20067			if v != nil {
20068				var routeFilterPropertiesFormat RouteFilterPropertiesFormat
20069				err = json.Unmarshal(*v, &routeFilterPropertiesFormat)
20070				if err != nil {
20071					return err
20072				}
20073				prf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat
20074			}
20075		case "name":
20076			if v != nil {
20077				var name string
20078				err = json.Unmarshal(*v, &name)
20079				if err != nil {
20080					return err
20081				}
20082				prf.Name = &name
20083			}
20084		case "etag":
20085			if v != nil {
20086				var etag string
20087				err = json.Unmarshal(*v, &etag)
20088				if err != nil {
20089					return err
20090				}
20091				prf.Etag = &etag
20092			}
20093		case "type":
20094			if v != nil {
20095				var typeVar string
20096				err = json.Unmarshal(*v, &typeVar)
20097				if err != nil {
20098					return err
20099				}
20100				prf.Type = &typeVar
20101			}
20102		case "tags":
20103			if v != nil {
20104				var tags map[string]*string
20105				err = json.Unmarshal(*v, &tags)
20106				if err != nil {
20107					return err
20108				}
20109				prf.Tags = tags
20110			}
20111		case "id":
20112			if v != nil {
20113				var ID string
20114				err = json.Unmarshal(*v, &ID)
20115				if err != nil {
20116					return err
20117				}
20118				prf.ID = &ID
20119			}
20120		}
20121	}
20122
20123	return nil
20124}
20125
20126// PatchRouteFilterRule route Filter Rule Resource.
20127type PatchRouteFilterRule struct {
20128	// RouteFilterRulePropertiesFormat - Properties of the route filter rule.
20129	*RouteFilterRulePropertiesFormat `json:"properties,omitempty"`
20130	// Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource.
20131	Name *string `json:"name,omitempty"`
20132	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
20133	Etag *string `json:"etag,omitempty"`
20134	// ID - Resource ID.
20135	ID *string `json:"id,omitempty"`
20136}
20137
20138// MarshalJSON is the custom marshaler for PatchRouteFilterRule.
20139func (prfr PatchRouteFilterRule) MarshalJSON() ([]byte, error) {
20140	objectMap := make(map[string]interface{})
20141	if prfr.RouteFilterRulePropertiesFormat != nil {
20142		objectMap["properties"] = prfr.RouteFilterRulePropertiesFormat
20143	}
20144	if prfr.ID != nil {
20145		objectMap["id"] = prfr.ID
20146	}
20147	return json.Marshal(objectMap)
20148}
20149
20150// UnmarshalJSON is the custom unmarshaler for PatchRouteFilterRule struct.
20151func (prfr *PatchRouteFilterRule) UnmarshalJSON(body []byte) error {
20152	var m map[string]*json.RawMessage
20153	err := json.Unmarshal(body, &m)
20154	if err != nil {
20155		return err
20156	}
20157	for k, v := range m {
20158		switch k {
20159		case "properties":
20160			if v != nil {
20161				var routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat
20162				err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat)
20163				if err != nil {
20164					return err
20165				}
20166				prfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat
20167			}
20168		case "name":
20169			if v != nil {
20170				var name string
20171				err = json.Unmarshal(*v, &name)
20172				if err != nil {
20173					return err
20174				}
20175				prfr.Name = &name
20176			}
20177		case "etag":
20178			if v != nil {
20179				var etag string
20180				err = json.Unmarshal(*v, &etag)
20181				if err != nil {
20182					return err
20183				}
20184				prfr.Etag = &etag
20185			}
20186		case "id":
20187			if v != nil {
20188				var ID string
20189				err = json.Unmarshal(*v, &ID)
20190				if err != nil {
20191					return err
20192				}
20193				prfr.ID = &ID
20194			}
20195		}
20196	}
20197
20198	return nil
20199}
20200
20201// PeerExpressRouteCircuitConnection peer Express Route Circuit Connection in an ExpressRouteCircuitPeering
20202// resource.
20203type PeerExpressRouteCircuitConnection struct {
20204	autorest.Response `json:"-"`
20205	// PeerExpressRouteCircuitConnectionPropertiesFormat - Properties of the peer express route circuit connection.
20206	*PeerExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"`
20207	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
20208	Name *string `json:"name,omitempty"`
20209	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
20210	Etag *string `json:"etag,omitempty"`
20211	// Type - READ-ONLY; Type of the resource.
20212	Type *string `json:"type,omitempty"`
20213	// ID - Resource ID.
20214	ID *string `json:"id,omitempty"`
20215}
20216
20217// MarshalJSON is the custom marshaler for PeerExpressRouteCircuitConnection.
20218func (percc PeerExpressRouteCircuitConnection) MarshalJSON() ([]byte, error) {
20219	objectMap := make(map[string]interface{})
20220	if percc.PeerExpressRouteCircuitConnectionPropertiesFormat != nil {
20221		objectMap["properties"] = percc.PeerExpressRouteCircuitConnectionPropertiesFormat
20222	}
20223	if percc.Name != nil {
20224		objectMap["name"] = percc.Name
20225	}
20226	if percc.ID != nil {
20227		objectMap["id"] = percc.ID
20228	}
20229	return json.Marshal(objectMap)
20230}
20231
20232// UnmarshalJSON is the custom unmarshaler for PeerExpressRouteCircuitConnection struct.
20233func (percc *PeerExpressRouteCircuitConnection) UnmarshalJSON(body []byte) error {
20234	var m map[string]*json.RawMessage
20235	err := json.Unmarshal(body, &m)
20236	if err != nil {
20237		return err
20238	}
20239	for k, v := range m {
20240		switch k {
20241		case "properties":
20242			if v != nil {
20243				var peerExpressRouteCircuitConnectionPropertiesFormat PeerExpressRouteCircuitConnectionPropertiesFormat
20244				err = json.Unmarshal(*v, &peerExpressRouteCircuitConnectionPropertiesFormat)
20245				if err != nil {
20246					return err
20247				}
20248				percc.PeerExpressRouteCircuitConnectionPropertiesFormat = &peerExpressRouteCircuitConnectionPropertiesFormat
20249			}
20250		case "name":
20251			if v != nil {
20252				var name string
20253				err = json.Unmarshal(*v, &name)
20254				if err != nil {
20255					return err
20256				}
20257				percc.Name = &name
20258			}
20259		case "etag":
20260			if v != nil {
20261				var etag string
20262				err = json.Unmarshal(*v, &etag)
20263				if err != nil {
20264					return err
20265				}
20266				percc.Etag = &etag
20267			}
20268		case "type":
20269			if v != nil {
20270				var typeVar string
20271				err = json.Unmarshal(*v, &typeVar)
20272				if err != nil {
20273					return err
20274				}
20275				percc.Type = &typeVar
20276			}
20277		case "id":
20278			if v != nil {
20279				var ID string
20280				err = json.Unmarshal(*v, &ID)
20281				if err != nil {
20282					return err
20283				}
20284				percc.ID = &ID
20285			}
20286		}
20287	}
20288
20289	return nil
20290}
20291
20292// PeerExpressRouteCircuitConnectionListResult response for ListPeeredConnections API service call
20293// retrieves all global reach peer circuit connections that belongs to a Private Peering for an
20294// ExpressRouteCircuit.
20295type PeerExpressRouteCircuitConnectionListResult struct {
20296	autorest.Response `json:"-"`
20297	// Value - The global reach peer circuit connection associated with Private Peering in an ExpressRoute Circuit.
20298	Value *[]PeerExpressRouteCircuitConnection `json:"value,omitempty"`
20299	// NextLink - The URL to get the next set of results.
20300	NextLink *string `json:"nextLink,omitempty"`
20301}
20302
20303// PeerExpressRouteCircuitConnectionListResultIterator provides access to a complete listing of
20304// PeerExpressRouteCircuitConnection values.
20305type PeerExpressRouteCircuitConnectionListResultIterator struct {
20306	i    int
20307	page PeerExpressRouteCircuitConnectionListResultPage
20308}
20309
20310// NextWithContext advances to the next value.  If there was an error making
20311// the request the iterator does not advance and the error is returned.
20312func (iter *PeerExpressRouteCircuitConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
20313	if tracing.IsEnabled() {
20314		ctx = tracing.StartSpan(ctx, fqdn+"/PeerExpressRouteCircuitConnectionListResultIterator.NextWithContext")
20315		defer func() {
20316			sc := -1
20317			if iter.Response().Response.Response != nil {
20318				sc = iter.Response().Response.Response.StatusCode
20319			}
20320			tracing.EndSpan(ctx, sc, err)
20321		}()
20322	}
20323	iter.i++
20324	if iter.i < len(iter.page.Values()) {
20325		return nil
20326	}
20327	err = iter.page.NextWithContext(ctx)
20328	if err != nil {
20329		iter.i--
20330		return err
20331	}
20332	iter.i = 0
20333	return nil
20334}
20335
20336// Next advances to the next value.  If there was an error making
20337// the request the iterator does not advance and the error is returned.
20338// Deprecated: Use NextWithContext() instead.
20339func (iter *PeerExpressRouteCircuitConnectionListResultIterator) Next() error {
20340	return iter.NextWithContext(context.Background())
20341}
20342
20343// NotDone returns true if the enumeration should be started or is not yet complete.
20344func (iter PeerExpressRouteCircuitConnectionListResultIterator) NotDone() bool {
20345	return iter.page.NotDone() && iter.i < len(iter.page.Values())
20346}
20347
20348// Response returns the raw server response from the last page request.
20349func (iter PeerExpressRouteCircuitConnectionListResultIterator) Response() PeerExpressRouteCircuitConnectionListResult {
20350	return iter.page.Response()
20351}
20352
20353// Value returns the current value or a zero-initialized value if the
20354// iterator has advanced beyond the end of the collection.
20355func (iter PeerExpressRouteCircuitConnectionListResultIterator) Value() PeerExpressRouteCircuitConnection {
20356	if !iter.page.NotDone() {
20357		return PeerExpressRouteCircuitConnection{}
20358	}
20359	return iter.page.Values()[iter.i]
20360}
20361
20362// Creates a new instance of the PeerExpressRouteCircuitConnectionListResultIterator type.
20363func NewPeerExpressRouteCircuitConnectionListResultIterator(page PeerExpressRouteCircuitConnectionListResultPage) PeerExpressRouteCircuitConnectionListResultIterator {
20364	return PeerExpressRouteCircuitConnectionListResultIterator{page: page}
20365}
20366
20367// IsEmpty returns true if the ListResult contains no values.
20368func (percclr PeerExpressRouteCircuitConnectionListResult) IsEmpty() bool {
20369	return percclr.Value == nil || len(*percclr.Value) == 0
20370}
20371
20372// hasNextLink returns true if the NextLink is not empty.
20373func (percclr PeerExpressRouteCircuitConnectionListResult) hasNextLink() bool {
20374	return percclr.NextLink != nil && len(*percclr.NextLink) != 0
20375}
20376
20377// peerExpressRouteCircuitConnectionListResultPreparer prepares a request to retrieve the next set of results.
20378// It returns nil if no more results exist.
20379func (percclr PeerExpressRouteCircuitConnectionListResult) peerExpressRouteCircuitConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
20380	if !percclr.hasNextLink() {
20381		return nil, nil
20382	}
20383	return autorest.Prepare((&http.Request{}).WithContext(ctx),
20384		autorest.AsJSON(),
20385		autorest.AsGet(),
20386		autorest.WithBaseURL(to.String(percclr.NextLink)))
20387}
20388
20389// PeerExpressRouteCircuitConnectionListResultPage contains a page of PeerExpressRouteCircuitConnection
20390// values.
20391type PeerExpressRouteCircuitConnectionListResultPage struct {
20392	fn      func(context.Context, PeerExpressRouteCircuitConnectionListResult) (PeerExpressRouteCircuitConnectionListResult, error)
20393	percclr PeerExpressRouteCircuitConnectionListResult
20394}
20395
20396// NextWithContext advances to the next page of values.  If there was an error making
20397// the request the page does not advance and the error is returned.
20398func (page *PeerExpressRouteCircuitConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
20399	if tracing.IsEnabled() {
20400		ctx = tracing.StartSpan(ctx, fqdn+"/PeerExpressRouteCircuitConnectionListResultPage.NextWithContext")
20401		defer func() {
20402			sc := -1
20403			if page.Response().Response.Response != nil {
20404				sc = page.Response().Response.Response.StatusCode
20405			}
20406			tracing.EndSpan(ctx, sc, err)
20407		}()
20408	}
20409	for {
20410		next, err := page.fn(ctx, page.percclr)
20411		if err != nil {
20412			return err
20413		}
20414		page.percclr = next
20415		if !next.hasNextLink() || !next.IsEmpty() {
20416			break
20417		}
20418	}
20419	return nil
20420}
20421
20422// Next advances to the next page of values.  If there was an error making
20423// the request the page does not advance and the error is returned.
20424// Deprecated: Use NextWithContext() instead.
20425func (page *PeerExpressRouteCircuitConnectionListResultPage) Next() error {
20426	return page.NextWithContext(context.Background())
20427}
20428
20429// NotDone returns true if the page enumeration should be started or is not yet complete.
20430func (page PeerExpressRouteCircuitConnectionListResultPage) NotDone() bool {
20431	return !page.percclr.IsEmpty()
20432}
20433
20434// Response returns the raw server response from the last page request.
20435func (page PeerExpressRouteCircuitConnectionListResultPage) Response() PeerExpressRouteCircuitConnectionListResult {
20436	return page.percclr
20437}
20438
20439// Values returns the slice of values for the current page or nil if there are no values.
20440func (page PeerExpressRouteCircuitConnectionListResultPage) Values() []PeerExpressRouteCircuitConnection {
20441	if page.percclr.IsEmpty() {
20442		return nil
20443	}
20444	return *page.percclr.Value
20445}
20446
20447// Creates a new instance of the PeerExpressRouteCircuitConnectionListResultPage type.
20448func NewPeerExpressRouteCircuitConnectionListResultPage(cur PeerExpressRouteCircuitConnectionListResult, getNextPage func(context.Context, PeerExpressRouteCircuitConnectionListResult) (PeerExpressRouteCircuitConnectionListResult, error)) PeerExpressRouteCircuitConnectionListResultPage {
20449	return PeerExpressRouteCircuitConnectionListResultPage{
20450		fn:      getNextPage,
20451		percclr: cur,
20452	}
20453}
20454
20455// PeerExpressRouteCircuitConnectionPropertiesFormat properties of the peer express route circuit
20456// connection.
20457type PeerExpressRouteCircuitConnectionPropertiesFormat struct {
20458	// ExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the circuit.
20459	ExpressRouteCircuitPeering *SubResource `json:"expressRouteCircuitPeering,omitempty"`
20460	// PeerExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the peered circuit.
20461	PeerExpressRouteCircuitPeering *SubResource `json:"peerExpressRouteCircuitPeering,omitempty"`
20462	// AddressPrefix - /29 IP address space to carve out Customer addresses for tunnels.
20463	AddressPrefix *string `json:"addressPrefix,omitempty"`
20464	// CircuitConnectionStatus - Express Route Circuit connection state. Possible values include: 'Connected', 'Connecting', 'Disconnected'
20465	CircuitConnectionStatus CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"`
20466	// ConnectionName - The name of the express route circuit connection resource.
20467	ConnectionName *string `json:"connectionName,omitempty"`
20468	// AuthResourceGUID - The resource guid of the authorization used for the express route circuit connection.
20469	AuthResourceGUID *string `json:"authResourceGuid,omitempty"`
20470	// ProvisioningState - READ-ONLY; Provisioning state of the peer express route circuit connection resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
20471	ProvisioningState *string `json:"provisioningState,omitempty"`
20472}
20473
20474// MarshalJSON is the custom marshaler for PeerExpressRouteCircuitConnectionPropertiesFormat.
20475func (perccpf PeerExpressRouteCircuitConnectionPropertiesFormat) MarshalJSON() ([]byte, error) {
20476	objectMap := make(map[string]interface{})
20477	if perccpf.ExpressRouteCircuitPeering != nil {
20478		objectMap["expressRouteCircuitPeering"] = perccpf.ExpressRouteCircuitPeering
20479	}
20480	if perccpf.PeerExpressRouteCircuitPeering != nil {
20481		objectMap["peerExpressRouteCircuitPeering"] = perccpf.PeerExpressRouteCircuitPeering
20482	}
20483	if perccpf.AddressPrefix != nil {
20484		objectMap["addressPrefix"] = perccpf.AddressPrefix
20485	}
20486	if perccpf.CircuitConnectionStatus != "" {
20487		objectMap["circuitConnectionStatus"] = perccpf.CircuitConnectionStatus
20488	}
20489	if perccpf.ConnectionName != nil {
20490		objectMap["connectionName"] = perccpf.ConnectionName
20491	}
20492	if perccpf.AuthResourceGUID != nil {
20493		objectMap["authResourceGuid"] = perccpf.AuthResourceGUID
20494	}
20495	return json.Marshal(objectMap)
20496}
20497
20498// PolicySettings defines contents of a web application firewall global configuration.
20499type PolicySettings struct {
20500	// EnabledState - Describes if the policy is in enabled state or disabled state. Possible values include: 'WebApplicationFirewallEnabledStateDisabled', 'WebApplicationFirewallEnabledStateEnabled'
20501	EnabledState WebApplicationFirewallEnabledState `json:"enabledState,omitempty"`
20502	// Mode - Describes if it is in detection mode or prevention mode at policy level. Possible values include: 'WebApplicationFirewallModePrevention', 'WebApplicationFirewallModeDetection'
20503	Mode WebApplicationFirewallMode `json:"mode,omitempty"`
20504}
20505
20506// PrepareNetworkPoliciesRequest details of PrepareNetworkPolicies for Subnet.
20507type PrepareNetworkPoliciesRequest struct {
20508	// ServiceName - The name of the service for which subnet is being prepared for.
20509	ServiceName *string `json:"serviceName,omitempty"`
20510	// NetworkIntentPolicyConfigurations - A list of NetworkIntentPolicyConfiguration.
20511	NetworkIntentPolicyConfigurations *[]IntentPolicyConfiguration `json:"networkIntentPolicyConfigurations,omitempty"`
20512}
20513
20514// PrivateEndpoint private endpoint resource.
20515type PrivateEndpoint struct {
20516	autorest.Response `json:"-"`
20517	// PrivateEndpointProperties - Properties of the private endpoint.
20518	*PrivateEndpointProperties `json:"properties,omitempty"`
20519	// Etag - A unique read-only string that changes whenever the resource is updated.
20520	Etag *string `json:"etag,omitempty"`
20521	// ID - Resource ID.
20522	ID *string `json:"id,omitempty"`
20523	// Name - READ-ONLY; Resource name.
20524	Name *string `json:"name,omitempty"`
20525	// Type - READ-ONLY; Resource type.
20526	Type *string `json:"type,omitempty"`
20527	// Location - Resource location.
20528	Location *string `json:"location,omitempty"`
20529	// Tags - Resource tags.
20530	Tags map[string]*string `json:"tags"`
20531}
20532
20533// MarshalJSON is the custom marshaler for PrivateEndpoint.
20534func (peVar PrivateEndpoint) MarshalJSON() ([]byte, error) {
20535	objectMap := make(map[string]interface{})
20536	if peVar.PrivateEndpointProperties != nil {
20537		objectMap["properties"] = peVar.PrivateEndpointProperties
20538	}
20539	if peVar.Etag != nil {
20540		objectMap["etag"] = peVar.Etag
20541	}
20542	if peVar.ID != nil {
20543		objectMap["id"] = peVar.ID
20544	}
20545	if peVar.Location != nil {
20546		objectMap["location"] = peVar.Location
20547	}
20548	if peVar.Tags != nil {
20549		objectMap["tags"] = peVar.Tags
20550	}
20551	return json.Marshal(objectMap)
20552}
20553
20554// UnmarshalJSON is the custom unmarshaler for PrivateEndpoint struct.
20555func (peVar *PrivateEndpoint) UnmarshalJSON(body []byte) error {
20556	var m map[string]*json.RawMessage
20557	err := json.Unmarshal(body, &m)
20558	if err != nil {
20559		return err
20560	}
20561	for k, v := range m {
20562		switch k {
20563		case "properties":
20564			if v != nil {
20565				var privateEndpointProperties PrivateEndpointProperties
20566				err = json.Unmarshal(*v, &privateEndpointProperties)
20567				if err != nil {
20568					return err
20569				}
20570				peVar.PrivateEndpointProperties = &privateEndpointProperties
20571			}
20572		case "etag":
20573			if v != nil {
20574				var etag string
20575				err = json.Unmarshal(*v, &etag)
20576				if err != nil {
20577					return err
20578				}
20579				peVar.Etag = &etag
20580			}
20581		case "id":
20582			if v != nil {
20583				var ID string
20584				err = json.Unmarshal(*v, &ID)
20585				if err != nil {
20586					return err
20587				}
20588				peVar.ID = &ID
20589			}
20590		case "name":
20591			if v != nil {
20592				var name string
20593				err = json.Unmarshal(*v, &name)
20594				if err != nil {
20595					return err
20596				}
20597				peVar.Name = &name
20598			}
20599		case "type":
20600			if v != nil {
20601				var typeVar string
20602				err = json.Unmarshal(*v, &typeVar)
20603				if err != nil {
20604					return err
20605				}
20606				peVar.Type = &typeVar
20607			}
20608		case "location":
20609			if v != nil {
20610				var location string
20611				err = json.Unmarshal(*v, &location)
20612				if err != nil {
20613					return err
20614				}
20615				peVar.Location = &location
20616			}
20617		case "tags":
20618			if v != nil {
20619				var tags map[string]*string
20620				err = json.Unmarshal(*v, &tags)
20621				if err != nil {
20622					return err
20623				}
20624				peVar.Tags = tags
20625			}
20626		}
20627	}
20628
20629	return nil
20630}
20631
20632// PrivateEndpointConnection privateEndpointConnection resource.
20633type PrivateEndpointConnection struct {
20634	autorest.Response `json:"-"`
20635	// PrivateEndpointConnectionProperties - Properties of the private end point connection.
20636	*PrivateEndpointConnectionProperties `json:"properties,omitempty"`
20637	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
20638	Name *string `json:"name,omitempty"`
20639	// Type - READ-ONLY; The resource type.
20640	Type *string `json:"type,omitempty"`
20641	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
20642	Etag *string `json:"etag,omitempty"`
20643	// ID - Resource ID.
20644	ID *string `json:"id,omitempty"`
20645}
20646
20647// MarshalJSON is the custom marshaler for PrivateEndpointConnection.
20648func (pec PrivateEndpointConnection) MarshalJSON() ([]byte, error) {
20649	objectMap := make(map[string]interface{})
20650	if pec.PrivateEndpointConnectionProperties != nil {
20651		objectMap["properties"] = pec.PrivateEndpointConnectionProperties
20652	}
20653	if pec.Name != nil {
20654		objectMap["name"] = pec.Name
20655	}
20656	if pec.ID != nil {
20657		objectMap["id"] = pec.ID
20658	}
20659	return json.Marshal(objectMap)
20660}
20661
20662// UnmarshalJSON is the custom unmarshaler for PrivateEndpointConnection struct.
20663func (pec *PrivateEndpointConnection) UnmarshalJSON(body []byte) error {
20664	var m map[string]*json.RawMessage
20665	err := json.Unmarshal(body, &m)
20666	if err != nil {
20667		return err
20668	}
20669	for k, v := range m {
20670		switch k {
20671		case "properties":
20672			if v != nil {
20673				var privateEndpointConnectionProperties PrivateEndpointConnectionProperties
20674				err = json.Unmarshal(*v, &privateEndpointConnectionProperties)
20675				if err != nil {
20676					return err
20677				}
20678				pec.PrivateEndpointConnectionProperties = &privateEndpointConnectionProperties
20679			}
20680		case "name":
20681			if v != nil {
20682				var name string
20683				err = json.Unmarshal(*v, &name)
20684				if err != nil {
20685					return err
20686				}
20687				pec.Name = &name
20688			}
20689		case "type":
20690			if v != nil {
20691				var typeVar string
20692				err = json.Unmarshal(*v, &typeVar)
20693				if err != nil {
20694					return err
20695				}
20696				pec.Type = &typeVar
20697			}
20698		case "etag":
20699			if v != nil {
20700				var etag string
20701				err = json.Unmarshal(*v, &etag)
20702				if err != nil {
20703					return err
20704				}
20705				pec.Etag = &etag
20706			}
20707		case "id":
20708			if v != nil {
20709				var ID string
20710				err = json.Unmarshal(*v, &ID)
20711				if err != nil {
20712					return err
20713				}
20714				pec.ID = &ID
20715			}
20716		}
20717	}
20718
20719	return nil
20720}
20721
20722// PrivateEndpointConnectionProperties properties of the PrivateEndpointConnectProperties.
20723type PrivateEndpointConnectionProperties struct {
20724	// PrivateEndpoint - The resource of private end point.
20725	PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"`
20726	// PrivateLinkServiceConnectionState - A collection of information about the state of the connection between service consumer and provider.
20727	PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"`
20728	// ProvisioningState - The provisioning state of the private endpoint connection. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
20729	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
20730}
20731
20732// PrivateEndpointListResult response for the ListPrivateEndpoints API service call.
20733type PrivateEndpointListResult struct {
20734	autorest.Response `json:"-"`
20735	// Value - Gets a list of private endpoint resources in a resource group.
20736	Value *[]PrivateEndpoint `json:"value,omitempty"`
20737	// NextLink - READ-ONLY; The URL to get the next set of results.
20738	NextLink *string `json:"nextLink,omitempty"`
20739}
20740
20741// MarshalJSON is the custom marshaler for PrivateEndpointListResult.
20742func (pelr PrivateEndpointListResult) MarshalJSON() ([]byte, error) {
20743	objectMap := make(map[string]interface{})
20744	if pelr.Value != nil {
20745		objectMap["value"] = pelr.Value
20746	}
20747	return json.Marshal(objectMap)
20748}
20749
20750// PrivateEndpointListResultIterator provides access to a complete listing of PrivateEndpoint values.
20751type PrivateEndpointListResultIterator struct {
20752	i    int
20753	page PrivateEndpointListResultPage
20754}
20755
20756// NextWithContext advances to the next value.  If there was an error making
20757// the request the iterator does not advance and the error is returned.
20758func (iter *PrivateEndpointListResultIterator) NextWithContext(ctx context.Context) (err error) {
20759	if tracing.IsEnabled() {
20760		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointListResultIterator.NextWithContext")
20761		defer func() {
20762			sc := -1
20763			if iter.Response().Response.Response != nil {
20764				sc = iter.Response().Response.Response.StatusCode
20765			}
20766			tracing.EndSpan(ctx, sc, err)
20767		}()
20768	}
20769	iter.i++
20770	if iter.i < len(iter.page.Values()) {
20771		return nil
20772	}
20773	err = iter.page.NextWithContext(ctx)
20774	if err != nil {
20775		iter.i--
20776		return err
20777	}
20778	iter.i = 0
20779	return nil
20780}
20781
20782// Next advances to the next value.  If there was an error making
20783// the request the iterator does not advance and the error is returned.
20784// Deprecated: Use NextWithContext() instead.
20785func (iter *PrivateEndpointListResultIterator) Next() error {
20786	return iter.NextWithContext(context.Background())
20787}
20788
20789// NotDone returns true if the enumeration should be started or is not yet complete.
20790func (iter PrivateEndpointListResultIterator) NotDone() bool {
20791	return iter.page.NotDone() && iter.i < len(iter.page.Values())
20792}
20793
20794// Response returns the raw server response from the last page request.
20795func (iter PrivateEndpointListResultIterator) Response() PrivateEndpointListResult {
20796	return iter.page.Response()
20797}
20798
20799// Value returns the current value or a zero-initialized value if the
20800// iterator has advanced beyond the end of the collection.
20801func (iter PrivateEndpointListResultIterator) Value() PrivateEndpoint {
20802	if !iter.page.NotDone() {
20803		return PrivateEndpoint{}
20804	}
20805	return iter.page.Values()[iter.i]
20806}
20807
20808// Creates a new instance of the PrivateEndpointListResultIterator type.
20809func NewPrivateEndpointListResultIterator(page PrivateEndpointListResultPage) PrivateEndpointListResultIterator {
20810	return PrivateEndpointListResultIterator{page: page}
20811}
20812
20813// IsEmpty returns true if the ListResult contains no values.
20814func (pelr PrivateEndpointListResult) IsEmpty() bool {
20815	return pelr.Value == nil || len(*pelr.Value) == 0
20816}
20817
20818// hasNextLink returns true if the NextLink is not empty.
20819func (pelr PrivateEndpointListResult) hasNextLink() bool {
20820	return pelr.NextLink != nil && len(*pelr.NextLink) != 0
20821}
20822
20823// privateEndpointListResultPreparer prepares a request to retrieve the next set of results.
20824// It returns nil if no more results exist.
20825func (pelr PrivateEndpointListResult) privateEndpointListResultPreparer(ctx context.Context) (*http.Request, error) {
20826	if !pelr.hasNextLink() {
20827		return nil, nil
20828	}
20829	return autorest.Prepare((&http.Request{}).WithContext(ctx),
20830		autorest.AsJSON(),
20831		autorest.AsGet(),
20832		autorest.WithBaseURL(to.String(pelr.NextLink)))
20833}
20834
20835// PrivateEndpointListResultPage contains a page of PrivateEndpoint values.
20836type PrivateEndpointListResultPage struct {
20837	fn   func(context.Context, PrivateEndpointListResult) (PrivateEndpointListResult, error)
20838	pelr PrivateEndpointListResult
20839}
20840
20841// NextWithContext advances to the next page of values.  If there was an error making
20842// the request the page does not advance and the error is returned.
20843func (page *PrivateEndpointListResultPage) NextWithContext(ctx context.Context) (err error) {
20844	if tracing.IsEnabled() {
20845		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointListResultPage.NextWithContext")
20846		defer func() {
20847			sc := -1
20848			if page.Response().Response.Response != nil {
20849				sc = page.Response().Response.Response.StatusCode
20850			}
20851			tracing.EndSpan(ctx, sc, err)
20852		}()
20853	}
20854	for {
20855		next, err := page.fn(ctx, page.pelr)
20856		if err != nil {
20857			return err
20858		}
20859		page.pelr = next
20860		if !next.hasNextLink() || !next.IsEmpty() {
20861			break
20862		}
20863	}
20864	return nil
20865}
20866
20867// Next advances to the next page of values.  If there was an error making
20868// the request the page does not advance and the error is returned.
20869// Deprecated: Use NextWithContext() instead.
20870func (page *PrivateEndpointListResultPage) Next() error {
20871	return page.NextWithContext(context.Background())
20872}
20873
20874// NotDone returns true if the page enumeration should be started or is not yet complete.
20875func (page PrivateEndpointListResultPage) NotDone() bool {
20876	return !page.pelr.IsEmpty()
20877}
20878
20879// Response returns the raw server response from the last page request.
20880func (page PrivateEndpointListResultPage) Response() PrivateEndpointListResult {
20881	return page.pelr
20882}
20883
20884// Values returns the slice of values for the current page or nil if there are no values.
20885func (page PrivateEndpointListResultPage) Values() []PrivateEndpoint {
20886	if page.pelr.IsEmpty() {
20887		return nil
20888	}
20889	return *page.pelr.Value
20890}
20891
20892// Creates a new instance of the PrivateEndpointListResultPage type.
20893func NewPrivateEndpointListResultPage(cur PrivateEndpointListResult, getNextPage func(context.Context, PrivateEndpointListResult) (PrivateEndpointListResult, error)) PrivateEndpointListResultPage {
20894	return PrivateEndpointListResultPage{
20895		fn:   getNextPage,
20896		pelr: cur,
20897	}
20898}
20899
20900// PrivateEndpointProperties properties of the private endpoint.
20901type PrivateEndpointProperties struct {
20902	// Subnet - The ID of the subnet from which the private IP will be allocated.
20903	Subnet *Subnet `json:"subnet,omitempty"`
20904	// NetworkInterfaces - READ-ONLY; Gets an array of references to the network interfaces created for this private endpoint.
20905	NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"`
20906	// ProvisioningState - The provisioning state of the private endpoint. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
20907	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
20908	// PrivateLinkServiceConnections - A grouping of information about the connection to the remote resource.
20909	PrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"privateLinkServiceConnections,omitempty"`
20910	// ManualPrivateLinkServiceConnections - A grouping of information about the connection to the remote resource. Used when the network admin does not have access to approve connections to the remote resource.
20911	ManualPrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"manualPrivateLinkServiceConnections,omitempty"`
20912}
20913
20914// MarshalJSON is the custom marshaler for PrivateEndpointProperties.
20915func (pep PrivateEndpointProperties) MarshalJSON() ([]byte, error) {
20916	objectMap := make(map[string]interface{})
20917	if pep.Subnet != nil {
20918		objectMap["subnet"] = pep.Subnet
20919	}
20920	if pep.ProvisioningState != "" {
20921		objectMap["provisioningState"] = pep.ProvisioningState
20922	}
20923	if pep.PrivateLinkServiceConnections != nil {
20924		objectMap["privateLinkServiceConnections"] = pep.PrivateLinkServiceConnections
20925	}
20926	if pep.ManualPrivateLinkServiceConnections != nil {
20927		objectMap["manualPrivateLinkServiceConnections"] = pep.ManualPrivateLinkServiceConnections
20928	}
20929	return json.Marshal(objectMap)
20930}
20931
20932// PrivateEndpointsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
20933// long-running operation.
20934type PrivateEndpointsCreateOrUpdateFuture struct {
20935	azure.FutureAPI
20936	// Result returns the result of the asynchronous operation.
20937	// If the operation has not completed it will return an error.
20938	Result func(PrivateEndpointsClient) (PrivateEndpoint, error)
20939}
20940
20941// PrivateEndpointsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
20942// operation.
20943type PrivateEndpointsDeleteFuture struct {
20944	azure.FutureAPI
20945	// Result returns the result of the asynchronous operation.
20946	// If the operation has not completed it will return an error.
20947	Result func(PrivateEndpointsClient) (autorest.Response, error)
20948}
20949
20950// PrivateLinkService private link service resource.
20951type PrivateLinkService struct {
20952	autorest.Response `json:"-"`
20953	// PrivateLinkServiceProperties - Properties of the private link service.
20954	*PrivateLinkServiceProperties `json:"properties,omitempty"`
20955	// Etag - A unique read-only string that changes whenever the resource is updated.
20956	Etag *string `json:"etag,omitempty"`
20957	// ID - Resource ID.
20958	ID *string `json:"id,omitempty"`
20959	// Name - READ-ONLY; Resource name.
20960	Name *string `json:"name,omitempty"`
20961	// Type - READ-ONLY; Resource type.
20962	Type *string `json:"type,omitempty"`
20963	// Location - Resource location.
20964	Location *string `json:"location,omitempty"`
20965	// Tags - Resource tags.
20966	Tags map[string]*string `json:"tags"`
20967}
20968
20969// MarshalJSON is the custom marshaler for PrivateLinkService.
20970func (pls PrivateLinkService) MarshalJSON() ([]byte, error) {
20971	objectMap := make(map[string]interface{})
20972	if pls.PrivateLinkServiceProperties != nil {
20973		objectMap["properties"] = pls.PrivateLinkServiceProperties
20974	}
20975	if pls.Etag != nil {
20976		objectMap["etag"] = pls.Etag
20977	}
20978	if pls.ID != nil {
20979		objectMap["id"] = pls.ID
20980	}
20981	if pls.Location != nil {
20982		objectMap["location"] = pls.Location
20983	}
20984	if pls.Tags != nil {
20985		objectMap["tags"] = pls.Tags
20986	}
20987	return json.Marshal(objectMap)
20988}
20989
20990// UnmarshalJSON is the custom unmarshaler for PrivateLinkService struct.
20991func (pls *PrivateLinkService) UnmarshalJSON(body []byte) error {
20992	var m map[string]*json.RawMessage
20993	err := json.Unmarshal(body, &m)
20994	if err != nil {
20995		return err
20996	}
20997	for k, v := range m {
20998		switch k {
20999		case "properties":
21000			if v != nil {
21001				var privateLinkServiceProperties PrivateLinkServiceProperties
21002				err = json.Unmarshal(*v, &privateLinkServiceProperties)
21003				if err != nil {
21004					return err
21005				}
21006				pls.PrivateLinkServiceProperties = &privateLinkServiceProperties
21007			}
21008		case "etag":
21009			if v != nil {
21010				var etag string
21011				err = json.Unmarshal(*v, &etag)
21012				if err != nil {
21013					return err
21014				}
21015				pls.Etag = &etag
21016			}
21017		case "id":
21018			if v != nil {
21019				var ID string
21020				err = json.Unmarshal(*v, &ID)
21021				if err != nil {
21022					return err
21023				}
21024				pls.ID = &ID
21025			}
21026		case "name":
21027			if v != nil {
21028				var name string
21029				err = json.Unmarshal(*v, &name)
21030				if err != nil {
21031					return err
21032				}
21033				pls.Name = &name
21034			}
21035		case "type":
21036			if v != nil {
21037				var typeVar string
21038				err = json.Unmarshal(*v, &typeVar)
21039				if err != nil {
21040					return err
21041				}
21042				pls.Type = &typeVar
21043			}
21044		case "location":
21045			if v != nil {
21046				var location string
21047				err = json.Unmarshal(*v, &location)
21048				if err != nil {
21049					return err
21050				}
21051				pls.Location = &location
21052			}
21053		case "tags":
21054			if v != nil {
21055				var tags map[string]*string
21056				err = json.Unmarshal(*v, &tags)
21057				if err != nil {
21058					return err
21059				}
21060				pls.Tags = tags
21061			}
21062		}
21063	}
21064
21065	return nil
21066}
21067
21068// PrivateLinkServiceConnection privateLinkServiceConnection resource.
21069type PrivateLinkServiceConnection struct {
21070	// PrivateLinkServiceConnectionProperties - Properties of the private link service connection.
21071	*PrivateLinkServiceConnectionProperties `json:"properties,omitempty"`
21072	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
21073	Name *string `json:"name,omitempty"`
21074	// Type - READ-ONLY; The resource type.
21075	Type *string `json:"type,omitempty"`
21076	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
21077	Etag *string `json:"etag,omitempty"`
21078	// ID - Resource ID.
21079	ID *string `json:"id,omitempty"`
21080}
21081
21082// MarshalJSON is the custom marshaler for PrivateLinkServiceConnection.
21083func (plsc PrivateLinkServiceConnection) MarshalJSON() ([]byte, error) {
21084	objectMap := make(map[string]interface{})
21085	if plsc.PrivateLinkServiceConnectionProperties != nil {
21086		objectMap["properties"] = plsc.PrivateLinkServiceConnectionProperties
21087	}
21088	if plsc.Name != nil {
21089		objectMap["name"] = plsc.Name
21090	}
21091	if plsc.ID != nil {
21092		objectMap["id"] = plsc.ID
21093	}
21094	return json.Marshal(objectMap)
21095}
21096
21097// UnmarshalJSON is the custom unmarshaler for PrivateLinkServiceConnection struct.
21098func (plsc *PrivateLinkServiceConnection) UnmarshalJSON(body []byte) error {
21099	var m map[string]*json.RawMessage
21100	err := json.Unmarshal(body, &m)
21101	if err != nil {
21102		return err
21103	}
21104	for k, v := range m {
21105		switch k {
21106		case "properties":
21107			if v != nil {
21108				var privateLinkServiceConnectionProperties PrivateLinkServiceConnectionProperties
21109				err = json.Unmarshal(*v, &privateLinkServiceConnectionProperties)
21110				if err != nil {
21111					return err
21112				}
21113				plsc.PrivateLinkServiceConnectionProperties = &privateLinkServiceConnectionProperties
21114			}
21115		case "name":
21116			if v != nil {
21117				var name string
21118				err = json.Unmarshal(*v, &name)
21119				if err != nil {
21120					return err
21121				}
21122				plsc.Name = &name
21123			}
21124		case "type":
21125			if v != nil {
21126				var typeVar string
21127				err = json.Unmarshal(*v, &typeVar)
21128				if err != nil {
21129					return err
21130				}
21131				plsc.Type = &typeVar
21132			}
21133		case "etag":
21134			if v != nil {
21135				var etag string
21136				err = json.Unmarshal(*v, &etag)
21137				if err != nil {
21138					return err
21139				}
21140				plsc.Etag = &etag
21141			}
21142		case "id":
21143			if v != nil {
21144				var ID string
21145				err = json.Unmarshal(*v, &ID)
21146				if err != nil {
21147					return err
21148				}
21149				plsc.ID = &ID
21150			}
21151		}
21152	}
21153
21154	return nil
21155}
21156
21157// PrivateLinkServiceConnectionProperties properties of the PrivateLinkServiceConnection.
21158type PrivateLinkServiceConnectionProperties struct {
21159	// ProvisioningState - The provisioning state of the private link service connection. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
21160	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
21161	// PrivateLinkServiceID - The resource id of private link service.
21162	PrivateLinkServiceID *string `json:"privateLinkServiceId,omitempty"`
21163	// GroupIds - The ID(s) of the group(s) obtained from the remote resource that this private endpoint should connect to.
21164	GroupIds *[]string `json:"groupIds,omitempty"`
21165	// RequestMessage - A message passed to the owner of the remote resource with this connection request. Restricted to 140 chars.
21166	RequestMessage *string `json:"requestMessage,omitempty"`
21167	// PrivateLinkServiceConnectionState - A collection of read-only information about the state of the connection to the remote resource.
21168	PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"`
21169}
21170
21171// PrivateLinkServiceConnectionState a collection of information about the state of the connection between
21172// service consumer and provider.
21173type PrivateLinkServiceConnectionState struct {
21174	// Status - Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service.
21175	Status *string `json:"status,omitempty"`
21176	// Description - The reason for approval/rejection of the connection.
21177	Description *string `json:"description,omitempty"`
21178	// ActionsRequired - A message indicating if changes on the service provider require any updates on the consumer.
21179	ActionsRequired *string `json:"actionsRequired,omitempty"`
21180}
21181
21182// PrivateLinkServiceIPConfiguration the private link service ip configuration.
21183type PrivateLinkServiceIPConfiguration struct {
21184	// PrivateLinkServiceIPConfigurationProperties - Properties of the private link service ip configuration.
21185	*PrivateLinkServiceIPConfigurationProperties `json:"properties,omitempty"`
21186	// Name - The name of private link service ip configuration.
21187	Name *string `json:"name,omitempty"`
21188	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
21189	Etag *string `json:"etag,omitempty"`
21190	// Type - READ-ONLY; The resource type.
21191	Type *string `json:"type,omitempty"`
21192	// ID - Resource ID.
21193	ID *string `json:"id,omitempty"`
21194}
21195
21196// MarshalJSON is the custom marshaler for PrivateLinkServiceIPConfiguration.
21197func (plsic PrivateLinkServiceIPConfiguration) MarshalJSON() ([]byte, error) {
21198	objectMap := make(map[string]interface{})
21199	if plsic.PrivateLinkServiceIPConfigurationProperties != nil {
21200		objectMap["properties"] = plsic.PrivateLinkServiceIPConfigurationProperties
21201	}
21202	if plsic.Name != nil {
21203		objectMap["name"] = plsic.Name
21204	}
21205	if plsic.ID != nil {
21206		objectMap["id"] = plsic.ID
21207	}
21208	return json.Marshal(objectMap)
21209}
21210
21211// UnmarshalJSON is the custom unmarshaler for PrivateLinkServiceIPConfiguration struct.
21212func (plsic *PrivateLinkServiceIPConfiguration) UnmarshalJSON(body []byte) error {
21213	var m map[string]*json.RawMessage
21214	err := json.Unmarshal(body, &m)
21215	if err != nil {
21216		return err
21217	}
21218	for k, v := range m {
21219		switch k {
21220		case "properties":
21221			if v != nil {
21222				var privateLinkServiceIPConfigurationProperties PrivateLinkServiceIPConfigurationProperties
21223				err = json.Unmarshal(*v, &privateLinkServiceIPConfigurationProperties)
21224				if err != nil {
21225					return err
21226				}
21227				plsic.PrivateLinkServiceIPConfigurationProperties = &privateLinkServiceIPConfigurationProperties
21228			}
21229		case "name":
21230			if v != nil {
21231				var name string
21232				err = json.Unmarshal(*v, &name)
21233				if err != nil {
21234					return err
21235				}
21236				plsic.Name = &name
21237			}
21238		case "etag":
21239			if v != nil {
21240				var etag string
21241				err = json.Unmarshal(*v, &etag)
21242				if err != nil {
21243					return err
21244				}
21245				plsic.Etag = &etag
21246			}
21247		case "type":
21248			if v != nil {
21249				var typeVar string
21250				err = json.Unmarshal(*v, &typeVar)
21251				if err != nil {
21252					return err
21253				}
21254				plsic.Type = &typeVar
21255			}
21256		case "id":
21257			if v != nil {
21258				var ID string
21259				err = json.Unmarshal(*v, &ID)
21260				if err != nil {
21261					return err
21262				}
21263				plsic.ID = &ID
21264			}
21265		}
21266	}
21267
21268	return nil
21269}
21270
21271// PrivateLinkServiceIPConfigurationProperties properties of private link service IP configuration.
21272type PrivateLinkServiceIPConfigurationProperties struct {
21273	// PrivateIPAddress - The private IP address of the IP configuration.
21274	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
21275	// PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'Static', 'Dynamic'
21276	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
21277	// Subnet - The reference of the subnet resource.
21278	Subnet *Subnet `json:"subnet,omitempty"`
21279	// Primary - Whether the ip configuration is primary or not.
21280	Primary *bool `json:"primary,omitempty"`
21281	// ProvisioningState - The provisioning state of the private link service ip configuration. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
21282	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
21283	// 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'
21284	PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
21285}
21286
21287// PrivateLinkServiceListResult response for the ListPrivateLinkService API service call.
21288type PrivateLinkServiceListResult struct {
21289	autorest.Response `json:"-"`
21290	// Value - Gets a list of PrivateLinkService resources in a resource group.
21291	Value *[]PrivateLinkService `json:"value,omitempty"`
21292	// NextLink - READ-ONLY; The URL to get the next set of results.
21293	NextLink *string `json:"nextLink,omitempty"`
21294}
21295
21296// MarshalJSON is the custom marshaler for PrivateLinkServiceListResult.
21297func (plslr PrivateLinkServiceListResult) MarshalJSON() ([]byte, error) {
21298	objectMap := make(map[string]interface{})
21299	if plslr.Value != nil {
21300		objectMap["value"] = plslr.Value
21301	}
21302	return json.Marshal(objectMap)
21303}
21304
21305// PrivateLinkServiceListResultIterator provides access to a complete listing of PrivateLinkService values.
21306type PrivateLinkServiceListResultIterator struct {
21307	i    int
21308	page PrivateLinkServiceListResultPage
21309}
21310
21311// NextWithContext advances to the next value.  If there was an error making
21312// the request the iterator does not advance and the error is returned.
21313func (iter *PrivateLinkServiceListResultIterator) NextWithContext(ctx context.Context) (err error) {
21314	if tracing.IsEnabled() {
21315		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServiceListResultIterator.NextWithContext")
21316		defer func() {
21317			sc := -1
21318			if iter.Response().Response.Response != nil {
21319				sc = iter.Response().Response.Response.StatusCode
21320			}
21321			tracing.EndSpan(ctx, sc, err)
21322		}()
21323	}
21324	iter.i++
21325	if iter.i < len(iter.page.Values()) {
21326		return nil
21327	}
21328	err = iter.page.NextWithContext(ctx)
21329	if err != nil {
21330		iter.i--
21331		return err
21332	}
21333	iter.i = 0
21334	return nil
21335}
21336
21337// Next advances to the next value.  If there was an error making
21338// the request the iterator does not advance and the error is returned.
21339// Deprecated: Use NextWithContext() instead.
21340func (iter *PrivateLinkServiceListResultIterator) Next() error {
21341	return iter.NextWithContext(context.Background())
21342}
21343
21344// NotDone returns true if the enumeration should be started or is not yet complete.
21345func (iter PrivateLinkServiceListResultIterator) NotDone() bool {
21346	return iter.page.NotDone() && iter.i < len(iter.page.Values())
21347}
21348
21349// Response returns the raw server response from the last page request.
21350func (iter PrivateLinkServiceListResultIterator) Response() PrivateLinkServiceListResult {
21351	return iter.page.Response()
21352}
21353
21354// Value returns the current value or a zero-initialized value if the
21355// iterator has advanced beyond the end of the collection.
21356func (iter PrivateLinkServiceListResultIterator) Value() PrivateLinkService {
21357	if !iter.page.NotDone() {
21358		return PrivateLinkService{}
21359	}
21360	return iter.page.Values()[iter.i]
21361}
21362
21363// Creates a new instance of the PrivateLinkServiceListResultIterator type.
21364func NewPrivateLinkServiceListResultIterator(page PrivateLinkServiceListResultPage) PrivateLinkServiceListResultIterator {
21365	return PrivateLinkServiceListResultIterator{page: page}
21366}
21367
21368// IsEmpty returns true if the ListResult contains no values.
21369func (plslr PrivateLinkServiceListResult) IsEmpty() bool {
21370	return plslr.Value == nil || len(*plslr.Value) == 0
21371}
21372
21373// hasNextLink returns true if the NextLink is not empty.
21374func (plslr PrivateLinkServiceListResult) hasNextLink() bool {
21375	return plslr.NextLink != nil && len(*plslr.NextLink) != 0
21376}
21377
21378// privateLinkServiceListResultPreparer prepares a request to retrieve the next set of results.
21379// It returns nil if no more results exist.
21380func (plslr PrivateLinkServiceListResult) privateLinkServiceListResultPreparer(ctx context.Context) (*http.Request, error) {
21381	if !plslr.hasNextLink() {
21382		return nil, nil
21383	}
21384	return autorest.Prepare((&http.Request{}).WithContext(ctx),
21385		autorest.AsJSON(),
21386		autorest.AsGet(),
21387		autorest.WithBaseURL(to.String(plslr.NextLink)))
21388}
21389
21390// PrivateLinkServiceListResultPage contains a page of PrivateLinkService values.
21391type PrivateLinkServiceListResultPage struct {
21392	fn    func(context.Context, PrivateLinkServiceListResult) (PrivateLinkServiceListResult, error)
21393	plslr PrivateLinkServiceListResult
21394}
21395
21396// NextWithContext advances to the next page of values.  If there was an error making
21397// the request the page does not advance and the error is returned.
21398func (page *PrivateLinkServiceListResultPage) NextWithContext(ctx context.Context) (err error) {
21399	if tracing.IsEnabled() {
21400		ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkServiceListResultPage.NextWithContext")
21401		defer func() {
21402			sc := -1
21403			if page.Response().Response.Response != nil {
21404				sc = page.Response().Response.Response.StatusCode
21405			}
21406			tracing.EndSpan(ctx, sc, err)
21407		}()
21408	}
21409	for {
21410		next, err := page.fn(ctx, page.plslr)
21411		if err != nil {
21412			return err
21413		}
21414		page.plslr = next
21415		if !next.hasNextLink() || !next.IsEmpty() {
21416			break
21417		}
21418	}
21419	return nil
21420}
21421
21422// Next advances to the next page of values.  If there was an error making
21423// the request the page does not advance and the error is returned.
21424// Deprecated: Use NextWithContext() instead.
21425func (page *PrivateLinkServiceListResultPage) Next() error {
21426	return page.NextWithContext(context.Background())
21427}
21428
21429// NotDone returns true if the page enumeration should be started or is not yet complete.
21430func (page PrivateLinkServiceListResultPage) NotDone() bool {
21431	return !page.plslr.IsEmpty()
21432}
21433
21434// Response returns the raw server response from the last page request.
21435func (page PrivateLinkServiceListResultPage) Response() PrivateLinkServiceListResult {
21436	return page.plslr
21437}
21438
21439// Values returns the slice of values for the current page or nil if there are no values.
21440func (page PrivateLinkServiceListResultPage) Values() []PrivateLinkService {
21441	if page.plslr.IsEmpty() {
21442		return nil
21443	}
21444	return *page.plslr.Value
21445}
21446
21447// Creates a new instance of the PrivateLinkServiceListResultPage type.
21448func NewPrivateLinkServiceListResultPage(cur PrivateLinkServiceListResult, getNextPage func(context.Context, PrivateLinkServiceListResult) (PrivateLinkServiceListResult, error)) PrivateLinkServiceListResultPage {
21449	return PrivateLinkServiceListResultPage{
21450		fn:    getNextPage,
21451		plslr: cur,
21452	}
21453}
21454
21455// PrivateLinkServiceProperties properties of the private link service.
21456type PrivateLinkServiceProperties struct {
21457	// LoadBalancerFrontendIPConfigurations - An array of references to the load balancer IP configurations.
21458	LoadBalancerFrontendIPConfigurations *[]FrontendIPConfiguration `json:"loadBalancerFrontendIpConfigurations,omitempty"`
21459	// IPConfigurations - An array of references to the private link service IP configuration.
21460	IPConfigurations *[]PrivateLinkServiceIPConfiguration `json:"ipConfigurations,omitempty"`
21461	// NetworkInterfaces - READ-ONLY; Gets an array of references to the network interfaces created for this private link service.
21462	NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"`
21463	// ProvisioningState - The provisioning state of the private link service. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
21464	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
21465	// PrivateEndpointConnections - An array of list about connections to the private endpoint.
21466	PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"`
21467	// Visibility - The visibility list of the private link service.
21468	Visibility *PrivateLinkServicePropertiesVisibility `json:"visibility,omitempty"`
21469	// AutoApproval - The auto-approval list of the private link service.
21470	AutoApproval *PrivateLinkServicePropertiesAutoApproval `json:"autoApproval,omitempty"`
21471	// Fqdns - The list of Fqdn.
21472	Fqdns *[]string `json:"fqdns,omitempty"`
21473	// Alias - READ-ONLY; The alias of the private link service.
21474	Alias *string `json:"alias,omitempty"`
21475}
21476
21477// MarshalJSON is the custom marshaler for PrivateLinkServiceProperties.
21478func (plsp PrivateLinkServiceProperties) MarshalJSON() ([]byte, error) {
21479	objectMap := make(map[string]interface{})
21480	if plsp.LoadBalancerFrontendIPConfigurations != nil {
21481		objectMap["loadBalancerFrontendIpConfigurations"] = plsp.LoadBalancerFrontendIPConfigurations
21482	}
21483	if plsp.IPConfigurations != nil {
21484		objectMap["ipConfigurations"] = plsp.IPConfigurations
21485	}
21486	if plsp.ProvisioningState != "" {
21487		objectMap["provisioningState"] = plsp.ProvisioningState
21488	}
21489	if plsp.PrivateEndpointConnections != nil {
21490		objectMap["privateEndpointConnections"] = plsp.PrivateEndpointConnections
21491	}
21492	if plsp.Visibility != nil {
21493		objectMap["visibility"] = plsp.Visibility
21494	}
21495	if plsp.AutoApproval != nil {
21496		objectMap["autoApproval"] = plsp.AutoApproval
21497	}
21498	if plsp.Fqdns != nil {
21499		objectMap["fqdns"] = plsp.Fqdns
21500	}
21501	return json.Marshal(objectMap)
21502}
21503
21504// PrivateLinkServicePropertiesAutoApproval the auto-approval list of the private link service.
21505type PrivateLinkServicePropertiesAutoApproval struct {
21506	// Subscriptions - The list of subscriptions.
21507	Subscriptions *[]string `json:"subscriptions,omitempty"`
21508}
21509
21510// PrivateLinkServicePropertiesVisibility the visibility list of the private link service.
21511type PrivateLinkServicePropertiesVisibility struct {
21512	// Subscriptions - The list of subscriptions.
21513	Subscriptions *[]string `json:"subscriptions,omitempty"`
21514}
21515
21516// PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture an abstraction for monitoring
21517// and retrieving the results of a long-running operation.
21518type PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture struct {
21519	azure.FutureAPI
21520	// Result returns the result of the asynchronous operation.
21521	// If the operation has not completed it will return an error.
21522	Result func(PrivateLinkServicesClient) (PrivateLinkServiceVisibility, error)
21523}
21524
21525// PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture an abstraction for monitoring and retrieving
21526// the results of a long-running operation.
21527type PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture struct {
21528	azure.FutureAPI
21529	// Result returns the result of the asynchronous operation.
21530	// If the operation has not completed it will return an error.
21531	Result func(PrivateLinkServicesClient) (PrivateLinkServiceVisibility, error)
21532}
21533
21534// PrivateLinkServicesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
21535// long-running operation.
21536type PrivateLinkServicesCreateOrUpdateFuture struct {
21537	azure.FutureAPI
21538	// Result returns the result of the asynchronous operation.
21539	// If the operation has not completed it will return an error.
21540	Result func(PrivateLinkServicesClient) (PrivateLinkService, error)
21541}
21542
21543// PrivateLinkServicesDeleteFuture an abstraction for monitoring and retrieving the results of a
21544// long-running operation.
21545type PrivateLinkServicesDeleteFuture struct {
21546	azure.FutureAPI
21547	// Result returns the result of the asynchronous operation.
21548	// If the operation has not completed it will return an error.
21549	Result func(PrivateLinkServicesClient) (autorest.Response, error)
21550}
21551
21552// PrivateLinkServicesDeletePrivateEndpointConnectionFuture an abstraction for monitoring and retrieving
21553// the results of a long-running operation.
21554type PrivateLinkServicesDeletePrivateEndpointConnectionFuture struct {
21555	azure.FutureAPI
21556	// Result returns the result of the asynchronous operation.
21557	// If the operation has not completed it will return an error.
21558	Result func(PrivateLinkServicesClient) (autorest.Response, error)
21559}
21560
21561// PrivateLinkServiceVisibility response for the CheckPrivateLinkServiceVisibility API service call.
21562type PrivateLinkServiceVisibility struct {
21563	autorest.Response `json:"-"`
21564	// Visible - Private Link Service Visibility (True/False).
21565	Visible *bool `json:"visible,omitempty"`
21566}
21567
21568// Probe a load balancer probe.
21569type Probe struct {
21570	autorest.Response `json:"-"`
21571	// ProbePropertiesFormat - Properties of load balancer probe.
21572	*ProbePropertiesFormat `json:"properties,omitempty"`
21573	// Name - Gets name of the resource that is unique within the set of probes used by the load balancer. This name can be used to access the resource.
21574	Name *string `json:"name,omitempty"`
21575	// Etag - A unique read-only string that changes whenever the resource is updated.
21576	Etag *string `json:"etag,omitempty"`
21577	// Type - READ-ONLY; Type of the resource.
21578	Type *string `json:"type,omitempty"`
21579	// ID - Resource ID.
21580	ID *string `json:"id,omitempty"`
21581}
21582
21583// MarshalJSON is the custom marshaler for Probe.
21584func (p Probe) MarshalJSON() ([]byte, error) {
21585	objectMap := make(map[string]interface{})
21586	if p.ProbePropertiesFormat != nil {
21587		objectMap["properties"] = p.ProbePropertiesFormat
21588	}
21589	if p.Name != nil {
21590		objectMap["name"] = p.Name
21591	}
21592	if p.Etag != nil {
21593		objectMap["etag"] = p.Etag
21594	}
21595	if p.ID != nil {
21596		objectMap["id"] = p.ID
21597	}
21598	return json.Marshal(objectMap)
21599}
21600
21601// UnmarshalJSON is the custom unmarshaler for Probe struct.
21602func (p *Probe) UnmarshalJSON(body []byte) error {
21603	var m map[string]*json.RawMessage
21604	err := json.Unmarshal(body, &m)
21605	if err != nil {
21606		return err
21607	}
21608	for k, v := range m {
21609		switch k {
21610		case "properties":
21611			if v != nil {
21612				var probePropertiesFormat ProbePropertiesFormat
21613				err = json.Unmarshal(*v, &probePropertiesFormat)
21614				if err != nil {
21615					return err
21616				}
21617				p.ProbePropertiesFormat = &probePropertiesFormat
21618			}
21619		case "name":
21620			if v != nil {
21621				var name string
21622				err = json.Unmarshal(*v, &name)
21623				if err != nil {
21624					return err
21625				}
21626				p.Name = &name
21627			}
21628		case "etag":
21629			if v != nil {
21630				var etag string
21631				err = json.Unmarshal(*v, &etag)
21632				if err != nil {
21633					return err
21634				}
21635				p.Etag = &etag
21636			}
21637		case "type":
21638			if v != nil {
21639				var typeVar string
21640				err = json.Unmarshal(*v, &typeVar)
21641				if err != nil {
21642					return err
21643				}
21644				p.Type = &typeVar
21645			}
21646		case "id":
21647			if v != nil {
21648				var ID string
21649				err = json.Unmarshal(*v, &ID)
21650				if err != nil {
21651					return err
21652				}
21653				p.ID = &ID
21654			}
21655		}
21656	}
21657
21658	return nil
21659}
21660
21661// ProbePropertiesFormat load balancer probe resource.
21662type ProbePropertiesFormat struct {
21663	// LoadBalancingRules - READ-ONLY; The load balancer rules that use this probe.
21664	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
21665	// Protocol - The protocol of the end point. If 'Tcp' is specified, a received ACK is required for the probe to be successful. If 'Http' or 'Https' is specified, a 200 OK response from the specifies URI is required for the probe to be successful. Possible values include: 'ProbeProtocolHTTP', 'ProbeProtocolTCP', 'ProbeProtocolHTTPS'
21666	Protocol ProbeProtocol `json:"protocol,omitempty"`
21667	// Port - The port for communicating the probe. Possible values range from 1 to 65535, inclusive.
21668	Port *int32 `json:"port,omitempty"`
21669	// 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.
21670	IntervalInSeconds *int32 `json:"intervalInSeconds,omitempty"`
21671	// 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.
21672	NumberOfProbes *int32 `json:"numberOfProbes,omitempty"`
21673	// 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.
21674	RequestPath *string `json:"requestPath,omitempty"`
21675	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
21676	ProvisioningState *string `json:"provisioningState,omitempty"`
21677}
21678
21679// MarshalJSON is the custom marshaler for ProbePropertiesFormat.
21680func (ppf ProbePropertiesFormat) MarshalJSON() ([]byte, error) {
21681	objectMap := make(map[string]interface{})
21682	if ppf.Protocol != "" {
21683		objectMap["protocol"] = ppf.Protocol
21684	}
21685	if ppf.Port != nil {
21686		objectMap["port"] = ppf.Port
21687	}
21688	if ppf.IntervalInSeconds != nil {
21689		objectMap["intervalInSeconds"] = ppf.IntervalInSeconds
21690	}
21691	if ppf.NumberOfProbes != nil {
21692		objectMap["numberOfProbes"] = ppf.NumberOfProbes
21693	}
21694	if ppf.RequestPath != nil {
21695		objectMap["requestPath"] = ppf.RequestPath
21696	}
21697	if ppf.ProvisioningState != nil {
21698		objectMap["provisioningState"] = ppf.ProvisioningState
21699	}
21700	return json.Marshal(objectMap)
21701}
21702
21703// Profile network profile resource.
21704type Profile struct {
21705	autorest.Response `json:"-"`
21706	// ProfilePropertiesFormat - Network profile properties.
21707	*ProfilePropertiesFormat `json:"properties,omitempty"`
21708	// Etag - A unique read-only string that changes whenever the resource is updated.
21709	Etag *string `json:"etag,omitempty"`
21710	// ID - Resource ID.
21711	ID *string `json:"id,omitempty"`
21712	// Name - READ-ONLY; Resource name.
21713	Name *string `json:"name,omitempty"`
21714	// Type - READ-ONLY; Resource type.
21715	Type *string `json:"type,omitempty"`
21716	// Location - Resource location.
21717	Location *string `json:"location,omitempty"`
21718	// Tags - Resource tags.
21719	Tags map[string]*string `json:"tags"`
21720}
21721
21722// MarshalJSON is the custom marshaler for Profile.
21723func (p Profile) MarshalJSON() ([]byte, error) {
21724	objectMap := make(map[string]interface{})
21725	if p.ProfilePropertiesFormat != nil {
21726		objectMap["properties"] = p.ProfilePropertiesFormat
21727	}
21728	if p.Etag != nil {
21729		objectMap["etag"] = p.Etag
21730	}
21731	if p.ID != nil {
21732		objectMap["id"] = p.ID
21733	}
21734	if p.Location != nil {
21735		objectMap["location"] = p.Location
21736	}
21737	if p.Tags != nil {
21738		objectMap["tags"] = p.Tags
21739	}
21740	return json.Marshal(objectMap)
21741}
21742
21743// UnmarshalJSON is the custom unmarshaler for Profile struct.
21744func (p *Profile) UnmarshalJSON(body []byte) error {
21745	var m map[string]*json.RawMessage
21746	err := json.Unmarshal(body, &m)
21747	if err != nil {
21748		return err
21749	}
21750	for k, v := range m {
21751		switch k {
21752		case "properties":
21753			if v != nil {
21754				var profilePropertiesFormat ProfilePropertiesFormat
21755				err = json.Unmarshal(*v, &profilePropertiesFormat)
21756				if err != nil {
21757					return err
21758				}
21759				p.ProfilePropertiesFormat = &profilePropertiesFormat
21760			}
21761		case "etag":
21762			if v != nil {
21763				var etag string
21764				err = json.Unmarshal(*v, &etag)
21765				if err != nil {
21766					return err
21767				}
21768				p.Etag = &etag
21769			}
21770		case "id":
21771			if v != nil {
21772				var ID string
21773				err = json.Unmarshal(*v, &ID)
21774				if err != nil {
21775					return err
21776				}
21777				p.ID = &ID
21778			}
21779		case "name":
21780			if v != nil {
21781				var name string
21782				err = json.Unmarshal(*v, &name)
21783				if err != nil {
21784					return err
21785				}
21786				p.Name = &name
21787			}
21788		case "type":
21789			if v != nil {
21790				var typeVar string
21791				err = json.Unmarshal(*v, &typeVar)
21792				if err != nil {
21793					return err
21794				}
21795				p.Type = &typeVar
21796			}
21797		case "location":
21798			if v != nil {
21799				var location string
21800				err = json.Unmarshal(*v, &location)
21801				if err != nil {
21802					return err
21803				}
21804				p.Location = &location
21805			}
21806		case "tags":
21807			if v != nil {
21808				var tags map[string]*string
21809				err = json.Unmarshal(*v, &tags)
21810				if err != nil {
21811					return err
21812				}
21813				p.Tags = tags
21814			}
21815		}
21816	}
21817
21818	return nil
21819}
21820
21821// ProfileListResult response for ListNetworkProfiles API service call.
21822type ProfileListResult struct {
21823	autorest.Response `json:"-"`
21824	// Value - A list of network profiles that exist in a resource group.
21825	Value *[]Profile `json:"value,omitempty"`
21826	// NextLink - The URL to get the next set of results.
21827	NextLink *string `json:"nextLink,omitempty"`
21828}
21829
21830// ProfileListResultIterator provides access to a complete listing of Profile values.
21831type ProfileListResultIterator struct {
21832	i    int
21833	page ProfileListResultPage
21834}
21835
21836// NextWithContext advances to the next value.  If there was an error making
21837// the request the iterator does not advance and the error is returned.
21838func (iter *ProfileListResultIterator) NextWithContext(ctx context.Context) (err error) {
21839	if tracing.IsEnabled() {
21840		ctx = tracing.StartSpan(ctx, fqdn+"/ProfileListResultIterator.NextWithContext")
21841		defer func() {
21842			sc := -1
21843			if iter.Response().Response.Response != nil {
21844				sc = iter.Response().Response.Response.StatusCode
21845			}
21846			tracing.EndSpan(ctx, sc, err)
21847		}()
21848	}
21849	iter.i++
21850	if iter.i < len(iter.page.Values()) {
21851		return nil
21852	}
21853	err = iter.page.NextWithContext(ctx)
21854	if err != nil {
21855		iter.i--
21856		return err
21857	}
21858	iter.i = 0
21859	return nil
21860}
21861
21862// Next advances to the next value.  If there was an error making
21863// the request the iterator does not advance and the error is returned.
21864// Deprecated: Use NextWithContext() instead.
21865func (iter *ProfileListResultIterator) Next() error {
21866	return iter.NextWithContext(context.Background())
21867}
21868
21869// NotDone returns true if the enumeration should be started or is not yet complete.
21870func (iter ProfileListResultIterator) NotDone() bool {
21871	return iter.page.NotDone() && iter.i < len(iter.page.Values())
21872}
21873
21874// Response returns the raw server response from the last page request.
21875func (iter ProfileListResultIterator) Response() ProfileListResult {
21876	return iter.page.Response()
21877}
21878
21879// Value returns the current value or a zero-initialized value if the
21880// iterator has advanced beyond the end of the collection.
21881func (iter ProfileListResultIterator) Value() Profile {
21882	if !iter.page.NotDone() {
21883		return Profile{}
21884	}
21885	return iter.page.Values()[iter.i]
21886}
21887
21888// Creates a new instance of the ProfileListResultIterator type.
21889func NewProfileListResultIterator(page ProfileListResultPage) ProfileListResultIterator {
21890	return ProfileListResultIterator{page: page}
21891}
21892
21893// IsEmpty returns true if the ListResult contains no values.
21894func (plr ProfileListResult) IsEmpty() bool {
21895	return plr.Value == nil || len(*plr.Value) == 0
21896}
21897
21898// hasNextLink returns true if the NextLink is not empty.
21899func (plr ProfileListResult) hasNextLink() bool {
21900	return plr.NextLink != nil && len(*plr.NextLink) != 0
21901}
21902
21903// profileListResultPreparer prepares a request to retrieve the next set of results.
21904// It returns nil if no more results exist.
21905func (plr ProfileListResult) profileListResultPreparer(ctx context.Context) (*http.Request, error) {
21906	if !plr.hasNextLink() {
21907		return nil, nil
21908	}
21909	return autorest.Prepare((&http.Request{}).WithContext(ctx),
21910		autorest.AsJSON(),
21911		autorest.AsGet(),
21912		autorest.WithBaseURL(to.String(plr.NextLink)))
21913}
21914
21915// ProfileListResultPage contains a page of Profile values.
21916type ProfileListResultPage struct {
21917	fn  func(context.Context, ProfileListResult) (ProfileListResult, error)
21918	plr ProfileListResult
21919}
21920
21921// NextWithContext advances to the next page of values.  If there was an error making
21922// the request the page does not advance and the error is returned.
21923func (page *ProfileListResultPage) NextWithContext(ctx context.Context) (err error) {
21924	if tracing.IsEnabled() {
21925		ctx = tracing.StartSpan(ctx, fqdn+"/ProfileListResultPage.NextWithContext")
21926		defer func() {
21927			sc := -1
21928			if page.Response().Response.Response != nil {
21929				sc = page.Response().Response.Response.StatusCode
21930			}
21931			tracing.EndSpan(ctx, sc, err)
21932		}()
21933	}
21934	for {
21935		next, err := page.fn(ctx, page.plr)
21936		if err != nil {
21937			return err
21938		}
21939		page.plr = next
21940		if !next.hasNextLink() || !next.IsEmpty() {
21941			break
21942		}
21943	}
21944	return nil
21945}
21946
21947// Next advances to the next page of values.  If there was an error making
21948// the request the page does not advance and the error is returned.
21949// Deprecated: Use NextWithContext() instead.
21950func (page *ProfileListResultPage) Next() error {
21951	return page.NextWithContext(context.Background())
21952}
21953
21954// NotDone returns true if the page enumeration should be started or is not yet complete.
21955func (page ProfileListResultPage) NotDone() bool {
21956	return !page.plr.IsEmpty()
21957}
21958
21959// Response returns the raw server response from the last page request.
21960func (page ProfileListResultPage) Response() ProfileListResult {
21961	return page.plr
21962}
21963
21964// Values returns the slice of values for the current page or nil if there are no values.
21965func (page ProfileListResultPage) Values() []Profile {
21966	if page.plr.IsEmpty() {
21967		return nil
21968	}
21969	return *page.plr.Value
21970}
21971
21972// Creates a new instance of the ProfileListResultPage type.
21973func NewProfileListResultPage(cur ProfileListResult, getNextPage func(context.Context, ProfileListResult) (ProfileListResult, error)) ProfileListResultPage {
21974	return ProfileListResultPage{
21975		fn:  getNextPage,
21976		plr: cur,
21977	}
21978}
21979
21980// ProfilePropertiesFormat network profile properties.
21981type ProfilePropertiesFormat struct {
21982	// ContainerNetworkInterfaces - List of child container network interfaces.
21983	ContainerNetworkInterfaces *[]ContainerNetworkInterface `json:"containerNetworkInterfaces,omitempty"`
21984	// ContainerNetworkInterfaceConfigurations - List of chid container network interface configurations.
21985	ContainerNetworkInterfaceConfigurations *[]ContainerNetworkInterfaceConfiguration `json:"containerNetworkInterfaceConfigurations,omitempty"`
21986	// ResourceGUID - READ-ONLY; The resource GUID property of the network interface resource.
21987	ResourceGUID *string `json:"resourceGuid,omitempty"`
21988	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
21989	ProvisioningState *string `json:"provisioningState,omitempty"`
21990}
21991
21992// MarshalJSON is the custom marshaler for ProfilePropertiesFormat.
21993func (ppf ProfilePropertiesFormat) MarshalJSON() ([]byte, error) {
21994	objectMap := make(map[string]interface{})
21995	if ppf.ContainerNetworkInterfaces != nil {
21996		objectMap["containerNetworkInterfaces"] = ppf.ContainerNetworkInterfaces
21997	}
21998	if ppf.ContainerNetworkInterfaceConfigurations != nil {
21999		objectMap["containerNetworkInterfaceConfigurations"] = ppf.ContainerNetworkInterfaceConfigurations
22000	}
22001	return json.Marshal(objectMap)
22002}
22003
22004// ProfilesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
22005// operation.
22006type ProfilesDeleteFuture struct {
22007	azure.FutureAPI
22008	// Result returns the result of the asynchronous operation.
22009	// If the operation has not completed it will return an error.
22010	Result func(ProfilesClient) (autorest.Response, error)
22011}
22012
22013// ProtocolConfiguration configuration of the protocol.
22014type ProtocolConfiguration struct {
22015	// HTTPConfiguration - HTTP configuration of the connectivity check.
22016	HTTPConfiguration *HTTPConfiguration `json:"HTTPConfiguration,omitempty"`
22017}
22018
22019// ProtocolCustomSettingsFormat dDoS custom policy properties.
22020type ProtocolCustomSettingsFormat struct {
22021	// Protocol - The protocol for which the DDoS protection policy is being customized. Possible values include: 'DdosCustomPolicyProtocolTCP', 'DdosCustomPolicyProtocolUDP', 'DdosCustomPolicyProtocolSyn'
22022	Protocol DdosCustomPolicyProtocol `json:"protocol,omitempty"`
22023	// TriggerRateOverride - The customized DDoS protection trigger rate.
22024	TriggerRateOverride *string `json:"triggerRateOverride,omitempty"`
22025	// SourceRateOverride - The customized DDoS protection source rate.
22026	SourceRateOverride *string `json:"sourceRateOverride,omitempty"`
22027	// 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'
22028	TriggerSensitivityOverride DdosCustomPolicyTriggerSensitivityOverride `json:"triggerSensitivityOverride,omitempty"`
22029}
22030
22031// PublicIPAddress public IP address resource.
22032type PublicIPAddress struct {
22033	autorest.Response `json:"-"`
22034	// Sku - The public IP address SKU.
22035	Sku *PublicIPAddressSku `json:"sku,omitempty"`
22036	// PublicIPAddressPropertiesFormat - Public IP address properties.
22037	*PublicIPAddressPropertiesFormat `json:"properties,omitempty"`
22038	// Etag - A unique read-only string that changes whenever the resource is updated.
22039	Etag *string `json:"etag,omitempty"`
22040	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
22041	Zones *[]string `json:"zones,omitempty"`
22042	// ID - Resource ID.
22043	ID *string `json:"id,omitempty"`
22044	// Name - READ-ONLY; Resource name.
22045	Name *string `json:"name,omitempty"`
22046	// Type - READ-ONLY; Resource type.
22047	Type *string `json:"type,omitempty"`
22048	// Location - Resource location.
22049	Location *string `json:"location,omitempty"`
22050	// Tags - Resource tags.
22051	Tags map[string]*string `json:"tags"`
22052}
22053
22054// MarshalJSON is the custom marshaler for PublicIPAddress.
22055func (pia PublicIPAddress) MarshalJSON() ([]byte, error) {
22056	objectMap := make(map[string]interface{})
22057	if pia.Sku != nil {
22058		objectMap["sku"] = pia.Sku
22059	}
22060	if pia.PublicIPAddressPropertiesFormat != nil {
22061		objectMap["properties"] = pia.PublicIPAddressPropertiesFormat
22062	}
22063	if pia.Etag != nil {
22064		objectMap["etag"] = pia.Etag
22065	}
22066	if pia.Zones != nil {
22067		objectMap["zones"] = pia.Zones
22068	}
22069	if pia.ID != nil {
22070		objectMap["id"] = pia.ID
22071	}
22072	if pia.Location != nil {
22073		objectMap["location"] = pia.Location
22074	}
22075	if pia.Tags != nil {
22076		objectMap["tags"] = pia.Tags
22077	}
22078	return json.Marshal(objectMap)
22079}
22080
22081// UnmarshalJSON is the custom unmarshaler for PublicIPAddress struct.
22082func (pia *PublicIPAddress) UnmarshalJSON(body []byte) error {
22083	var m map[string]*json.RawMessage
22084	err := json.Unmarshal(body, &m)
22085	if err != nil {
22086		return err
22087	}
22088	for k, v := range m {
22089		switch k {
22090		case "sku":
22091			if v != nil {
22092				var sku PublicIPAddressSku
22093				err = json.Unmarshal(*v, &sku)
22094				if err != nil {
22095					return err
22096				}
22097				pia.Sku = &sku
22098			}
22099		case "properties":
22100			if v != nil {
22101				var publicIPAddressPropertiesFormat PublicIPAddressPropertiesFormat
22102				err = json.Unmarshal(*v, &publicIPAddressPropertiesFormat)
22103				if err != nil {
22104					return err
22105				}
22106				pia.PublicIPAddressPropertiesFormat = &publicIPAddressPropertiesFormat
22107			}
22108		case "etag":
22109			if v != nil {
22110				var etag string
22111				err = json.Unmarshal(*v, &etag)
22112				if err != nil {
22113					return err
22114				}
22115				pia.Etag = &etag
22116			}
22117		case "zones":
22118			if v != nil {
22119				var zones []string
22120				err = json.Unmarshal(*v, &zones)
22121				if err != nil {
22122					return err
22123				}
22124				pia.Zones = &zones
22125			}
22126		case "id":
22127			if v != nil {
22128				var ID string
22129				err = json.Unmarshal(*v, &ID)
22130				if err != nil {
22131					return err
22132				}
22133				pia.ID = &ID
22134			}
22135		case "name":
22136			if v != nil {
22137				var name string
22138				err = json.Unmarshal(*v, &name)
22139				if err != nil {
22140					return err
22141				}
22142				pia.Name = &name
22143			}
22144		case "type":
22145			if v != nil {
22146				var typeVar string
22147				err = json.Unmarshal(*v, &typeVar)
22148				if err != nil {
22149					return err
22150				}
22151				pia.Type = &typeVar
22152			}
22153		case "location":
22154			if v != nil {
22155				var location string
22156				err = json.Unmarshal(*v, &location)
22157				if err != nil {
22158					return err
22159				}
22160				pia.Location = &location
22161			}
22162		case "tags":
22163			if v != nil {
22164				var tags map[string]*string
22165				err = json.Unmarshal(*v, &tags)
22166				if err != nil {
22167					return err
22168				}
22169				pia.Tags = tags
22170			}
22171		}
22172	}
22173
22174	return nil
22175}
22176
22177// PublicIPAddressDNSSettings contains FQDN of the DNS record associated with the public IP address.
22178type PublicIPAddressDNSSettings struct {
22179	// 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.
22180	DomainNameLabel *string `json:"domainNameLabel,omitempty"`
22181	// 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.
22182	Fqdn *string `json:"fqdn,omitempty"`
22183	// 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.
22184	ReverseFqdn *string `json:"reverseFqdn,omitempty"`
22185}
22186
22187// PublicIPAddressesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
22188// long-running operation.
22189type PublicIPAddressesCreateOrUpdateFuture struct {
22190	azure.FutureAPI
22191	// Result returns the result of the asynchronous operation.
22192	// If the operation has not completed it will return an error.
22193	Result func(PublicIPAddressesClient) (PublicIPAddress, error)
22194}
22195
22196// PublicIPAddressesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
22197// operation.
22198type PublicIPAddressesDeleteFuture struct {
22199	azure.FutureAPI
22200	// Result returns the result of the asynchronous operation.
22201	// If the operation has not completed it will return an error.
22202	Result func(PublicIPAddressesClient) (autorest.Response, error)
22203}
22204
22205// PublicIPAddressesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
22206// long-running operation.
22207type PublicIPAddressesUpdateTagsFuture struct {
22208	azure.FutureAPI
22209	// Result returns the result of the asynchronous operation.
22210	// If the operation has not completed it will return an error.
22211	Result func(PublicIPAddressesClient) (PublicIPAddress, error)
22212}
22213
22214// PublicIPAddressListResult response for ListPublicIpAddresses API service call.
22215type PublicIPAddressListResult struct {
22216	autorest.Response `json:"-"`
22217	// Value - A list of public IP addresses that exists in a resource group.
22218	Value *[]PublicIPAddress `json:"value,omitempty"`
22219	// NextLink - The URL to get the next set of results.
22220	NextLink *string `json:"nextLink,omitempty"`
22221}
22222
22223// PublicIPAddressListResultIterator provides access to a complete listing of PublicIPAddress values.
22224type PublicIPAddressListResultIterator struct {
22225	i    int
22226	page PublicIPAddressListResultPage
22227}
22228
22229// NextWithContext advances to the next value.  If there was an error making
22230// the request the iterator does not advance and the error is returned.
22231func (iter *PublicIPAddressListResultIterator) NextWithContext(ctx context.Context) (err error) {
22232	if tracing.IsEnabled() {
22233		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultIterator.NextWithContext")
22234		defer func() {
22235			sc := -1
22236			if iter.Response().Response.Response != nil {
22237				sc = iter.Response().Response.Response.StatusCode
22238			}
22239			tracing.EndSpan(ctx, sc, err)
22240		}()
22241	}
22242	iter.i++
22243	if iter.i < len(iter.page.Values()) {
22244		return nil
22245	}
22246	err = iter.page.NextWithContext(ctx)
22247	if err != nil {
22248		iter.i--
22249		return err
22250	}
22251	iter.i = 0
22252	return nil
22253}
22254
22255// Next advances to the next value.  If there was an error making
22256// the request the iterator does not advance and the error is returned.
22257// Deprecated: Use NextWithContext() instead.
22258func (iter *PublicIPAddressListResultIterator) Next() error {
22259	return iter.NextWithContext(context.Background())
22260}
22261
22262// NotDone returns true if the enumeration should be started or is not yet complete.
22263func (iter PublicIPAddressListResultIterator) NotDone() bool {
22264	return iter.page.NotDone() && iter.i < len(iter.page.Values())
22265}
22266
22267// Response returns the raw server response from the last page request.
22268func (iter PublicIPAddressListResultIterator) Response() PublicIPAddressListResult {
22269	return iter.page.Response()
22270}
22271
22272// Value returns the current value or a zero-initialized value if the
22273// iterator has advanced beyond the end of the collection.
22274func (iter PublicIPAddressListResultIterator) Value() PublicIPAddress {
22275	if !iter.page.NotDone() {
22276		return PublicIPAddress{}
22277	}
22278	return iter.page.Values()[iter.i]
22279}
22280
22281// Creates a new instance of the PublicIPAddressListResultIterator type.
22282func NewPublicIPAddressListResultIterator(page PublicIPAddressListResultPage) PublicIPAddressListResultIterator {
22283	return PublicIPAddressListResultIterator{page: page}
22284}
22285
22286// IsEmpty returns true if the ListResult contains no values.
22287func (pialr PublicIPAddressListResult) IsEmpty() bool {
22288	return pialr.Value == nil || len(*pialr.Value) == 0
22289}
22290
22291// hasNextLink returns true if the NextLink is not empty.
22292func (pialr PublicIPAddressListResult) hasNextLink() bool {
22293	return pialr.NextLink != nil && len(*pialr.NextLink) != 0
22294}
22295
22296// publicIPAddressListResultPreparer prepares a request to retrieve the next set of results.
22297// It returns nil if no more results exist.
22298func (pialr PublicIPAddressListResult) publicIPAddressListResultPreparer(ctx context.Context) (*http.Request, error) {
22299	if !pialr.hasNextLink() {
22300		return nil, nil
22301	}
22302	return autorest.Prepare((&http.Request{}).WithContext(ctx),
22303		autorest.AsJSON(),
22304		autorest.AsGet(),
22305		autorest.WithBaseURL(to.String(pialr.NextLink)))
22306}
22307
22308// PublicIPAddressListResultPage contains a page of PublicIPAddress values.
22309type PublicIPAddressListResultPage struct {
22310	fn    func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)
22311	pialr PublicIPAddressListResult
22312}
22313
22314// NextWithContext advances to the next page of values.  If there was an error making
22315// the request the page does not advance and the error is returned.
22316func (page *PublicIPAddressListResultPage) NextWithContext(ctx context.Context) (err error) {
22317	if tracing.IsEnabled() {
22318		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultPage.NextWithContext")
22319		defer func() {
22320			sc := -1
22321			if page.Response().Response.Response != nil {
22322				sc = page.Response().Response.Response.StatusCode
22323			}
22324			tracing.EndSpan(ctx, sc, err)
22325		}()
22326	}
22327	for {
22328		next, err := page.fn(ctx, page.pialr)
22329		if err != nil {
22330			return err
22331		}
22332		page.pialr = next
22333		if !next.hasNextLink() || !next.IsEmpty() {
22334			break
22335		}
22336	}
22337	return nil
22338}
22339
22340// Next advances to the next page of values.  If there was an error making
22341// the request the page does not advance and the error is returned.
22342// Deprecated: Use NextWithContext() instead.
22343func (page *PublicIPAddressListResultPage) Next() error {
22344	return page.NextWithContext(context.Background())
22345}
22346
22347// NotDone returns true if the page enumeration should be started or is not yet complete.
22348func (page PublicIPAddressListResultPage) NotDone() bool {
22349	return !page.pialr.IsEmpty()
22350}
22351
22352// Response returns the raw server response from the last page request.
22353func (page PublicIPAddressListResultPage) Response() PublicIPAddressListResult {
22354	return page.pialr
22355}
22356
22357// Values returns the slice of values for the current page or nil if there are no values.
22358func (page PublicIPAddressListResultPage) Values() []PublicIPAddress {
22359	if page.pialr.IsEmpty() {
22360		return nil
22361	}
22362	return *page.pialr.Value
22363}
22364
22365// Creates a new instance of the PublicIPAddressListResultPage type.
22366func NewPublicIPAddressListResultPage(cur PublicIPAddressListResult, getNextPage func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)) PublicIPAddressListResultPage {
22367	return PublicIPAddressListResultPage{
22368		fn:    getNextPage,
22369		pialr: cur,
22370	}
22371}
22372
22373// PublicIPAddressPropertiesFormat public IP address properties.
22374type PublicIPAddressPropertiesFormat struct {
22375	// PublicIPAllocationMethod - The public IP address allocation method. Possible values include: 'Static', 'Dynamic'
22376	PublicIPAllocationMethod IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"`
22377	// PublicIPAddressVersion - The public IP address version. Possible values include: 'IPv4', 'IPv6'
22378	PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"`
22379	// IPConfiguration - READ-ONLY; The IP configuration associated with the public IP address.
22380	IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"`
22381	// DNSSettings - The FQDN of the DNS record associated with the public IP address.
22382	DNSSettings *PublicIPAddressDNSSettings `json:"dnsSettings,omitempty"`
22383	// DdosSettings - The DDoS protection custom policy associated with the public IP address.
22384	DdosSettings *DdosSettings `json:"ddosSettings,omitempty"`
22385	// IPTags - The list of tags associated with the public IP address.
22386	IPTags *[]IPTag `json:"ipTags,omitempty"`
22387	// IPAddress - The IP address associated with the public IP address resource.
22388	IPAddress *string `json:"ipAddress,omitempty"`
22389	// PublicIPPrefix - The Public IP Prefix this Public IP Address should be allocated from.
22390	PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"`
22391	// IdleTimeoutInMinutes - The idle timeout of the public IP address.
22392	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
22393	// ResourceGUID - The resource GUID property of the public IP resource.
22394	ResourceGUID *string `json:"resourceGuid,omitempty"`
22395	// ProvisioningState - The provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
22396	ProvisioningState *string `json:"provisioningState,omitempty"`
22397}
22398
22399// MarshalJSON is the custom marshaler for PublicIPAddressPropertiesFormat.
22400func (piapf PublicIPAddressPropertiesFormat) MarshalJSON() ([]byte, error) {
22401	objectMap := make(map[string]interface{})
22402	if piapf.PublicIPAllocationMethod != "" {
22403		objectMap["publicIPAllocationMethod"] = piapf.PublicIPAllocationMethod
22404	}
22405	if piapf.PublicIPAddressVersion != "" {
22406		objectMap["publicIPAddressVersion"] = piapf.PublicIPAddressVersion
22407	}
22408	if piapf.DNSSettings != nil {
22409		objectMap["dnsSettings"] = piapf.DNSSettings
22410	}
22411	if piapf.DdosSettings != nil {
22412		objectMap["ddosSettings"] = piapf.DdosSettings
22413	}
22414	if piapf.IPTags != nil {
22415		objectMap["ipTags"] = piapf.IPTags
22416	}
22417	if piapf.IPAddress != nil {
22418		objectMap["ipAddress"] = piapf.IPAddress
22419	}
22420	if piapf.PublicIPPrefix != nil {
22421		objectMap["publicIPPrefix"] = piapf.PublicIPPrefix
22422	}
22423	if piapf.IdleTimeoutInMinutes != nil {
22424		objectMap["idleTimeoutInMinutes"] = piapf.IdleTimeoutInMinutes
22425	}
22426	if piapf.ResourceGUID != nil {
22427		objectMap["resourceGuid"] = piapf.ResourceGUID
22428	}
22429	if piapf.ProvisioningState != nil {
22430		objectMap["provisioningState"] = piapf.ProvisioningState
22431	}
22432	return json.Marshal(objectMap)
22433}
22434
22435// PublicIPAddressSku SKU of a public IP address.
22436type PublicIPAddressSku struct {
22437	// Name - Name of a public IP address SKU. Possible values include: 'PublicIPAddressSkuNameBasic', 'PublicIPAddressSkuNameStandard'
22438	Name PublicIPAddressSkuName `json:"name,omitempty"`
22439}
22440
22441// PublicIPPrefix public IP prefix resource.
22442type PublicIPPrefix struct {
22443	autorest.Response `json:"-"`
22444	// Sku - The public IP prefix SKU.
22445	Sku *PublicIPPrefixSku `json:"sku,omitempty"`
22446	// PublicIPPrefixPropertiesFormat - Public IP prefix properties.
22447	*PublicIPPrefixPropertiesFormat `json:"properties,omitempty"`
22448	// Etag - A unique read-only string that changes whenever the resource is updated.
22449	Etag *string `json:"etag,omitempty"`
22450	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
22451	Zones *[]string `json:"zones,omitempty"`
22452	// ID - Resource ID.
22453	ID *string `json:"id,omitempty"`
22454	// Name - READ-ONLY; Resource name.
22455	Name *string `json:"name,omitempty"`
22456	// Type - READ-ONLY; Resource type.
22457	Type *string `json:"type,omitempty"`
22458	// Location - Resource location.
22459	Location *string `json:"location,omitempty"`
22460	// Tags - Resource tags.
22461	Tags map[string]*string `json:"tags"`
22462}
22463
22464// MarshalJSON is the custom marshaler for PublicIPPrefix.
22465func (pip PublicIPPrefix) MarshalJSON() ([]byte, error) {
22466	objectMap := make(map[string]interface{})
22467	if pip.Sku != nil {
22468		objectMap["sku"] = pip.Sku
22469	}
22470	if pip.PublicIPPrefixPropertiesFormat != nil {
22471		objectMap["properties"] = pip.PublicIPPrefixPropertiesFormat
22472	}
22473	if pip.Etag != nil {
22474		objectMap["etag"] = pip.Etag
22475	}
22476	if pip.Zones != nil {
22477		objectMap["zones"] = pip.Zones
22478	}
22479	if pip.ID != nil {
22480		objectMap["id"] = pip.ID
22481	}
22482	if pip.Location != nil {
22483		objectMap["location"] = pip.Location
22484	}
22485	if pip.Tags != nil {
22486		objectMap["tags"] = pip.Tags
22487	}
22488	return json.Marshal(objectMap)
22489}
22490
22491// UnmarshalJSON is the custom unmarshaler for PublicIPPrefix struct.
22492func (pip *PublicIPPrefix) UnmarshalJSON(body []byte) error {
22493	var m map[string]*json.RawMessage
22494	err := json.Unmarshal(body, &m)
22495	if err != nil {
22496		return err
22497	}
22498	for k, v := range m {
22499		switch k {
22500		case "sku":
22501			if v != nil {
22502				var sku PublicIPPrefixSku
22503				err = json.Unmarshal(*v, &sku)
22504				if err != nil {
22505					return err
22506				}
22507				pip.Sku = &sku
22508			}
22509		case "properties":
22510			if v != nil {
22511				var publicIPPrefixPropertiesFormat PublicIPPrefixPropertiesFormat
22512				err = json.Unmarshal(*v, &publicIPPrefixPropertiesFormat)
22513				if err != nil {
22514					return err
22515				}
22516				pip.PublicIPPrefixPropertiesFormat = &publicIPPrefixPropertiesFormat
22517			}
22518		case "etag":
22519			if v != nil {
22520				var etag string
22521				err = json.Unmarshal(*v, &etag)
22522				if err != nil {
22523					return err
22524				}
22525				pip.Etag = &etag
22526			}
22527		case "zones":
22528			if v != nil {
22529				var zones []string
22530				err = json.Unmarshal(*v, &zones)
22531				if err != nil {
22532					return err
22533				}
22534				pip.Zones = &zones
22535			}
22536		case "id":
22537			if v != nil {
22538				var ID string
22539				err = json.Unmarshal(*v, &ID)
22540				if err != nil {
22541					return err
22542				}
22543				pip.ID = &ID
22544			}
22545		case "name":
22546			if v != nil {
22547				var name string
22548				err = json.Unmarshal(*v, &name)
22549				if err != nil {
22550					return err
22551				}
22552				pip.Name = &name
22553			}
22554		case "type":
22555			if v != nil {
22556				var typeVar string
22557				err = json.Unmarshal(*v, &typeVar)
22558				if err != nil {
22559					return err
22560				}
22561				pip.Type = &typeVar
22562			}
22563		case "location":
22564			if v != nil {
22565				var location string
22566				err = json.Unmarshal(*v, &location)
22567				if err != nil {
22568					return err
22569				}
22570				pip.Location = &location
22571			}
22572		case "tags":
22573			if v != nil {
22574				var tags map[string]*string
22575				err = json.Unmarshal(*v, &tags)
22576				if err != nil {
22577					return err
22578				}
22579				pip.Tags = tags
22580			}
22581		}
22582	}
22583
22584	return nil
22585}
22586
22587// PublicIPPrefixesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
22588// long-running operation.
22589type PublicIPPrefixesCreateOrUpdateFuture struct {
22590	azure.FutureAPI
22591	// Result returns the result of the asynchronous operation.
22592	// If the operation has not completed it will return an error.
22593	Result func(PublicIPPrefixesClient) (PublicIPPrefix, error)
22594}
22595
22596// PublicIPPrefixesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
22597// operation.
22598type PublicIPPrefixesDeleteFuture struct {
22599	azure.FutureAPI
22600	// Result returns the result of the asynchronous operation.
22601	// If the operation has not completed it will return an error.
22602	Result func(PublicIPPrefixesClient) (autorest.Response, error)
22603}
22604
22605// PublicIPPrefixesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
22606// long-running operation.
22607type PublicIPPrefixesUpdateTagsFuture struct {
22608	azure.FutureAPI
22609	// Result returns the result of the asynchronous operation.
22610	// If the operation has not completed it will return an error.
22611	Result func(PublicIPPrefixesClient) (PublicIPPrefix, error)
22612}
22613
22614// PublicIPPrefixListResult response for ListPublicIpPrefixes API service call.
22615type PublicIPPrefixListResult struct {
22616	autorest.Response `json:"-"`
22617	// Value - A list of public IP prefixes that exists in a resource group.
22618	Value *[]PublicIPPrefix `json:"value,omitempty"`
22619	// NextLink - The URL to get the next set of results.
22620	NextLink *string `json:"nextLink,omitempty"`
22621}
22622
22623// PublicIPPrefixListResultIterator provides access to a complete listing of PublicIPPrefix values.
22624type PublicIPPrefixListResultIterator struct {
22625	i    int
22626	page PublicIPPrefixListResultPage
22627}
22628
22629// NextWithContext advances to the next value.  If there was an error making
22630// the request the iterator does not advance and the error is returned.
22631func (iter *PublicIPPrefixListResultIterator) NextWithContext(ctx context.Context) (err error) {
22632	if tracing.IsEnabled() {
22633		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixListResultIterator.NextWithContext")
22634		defer func() {
22635			sc := -1
22636			if iter.Response().Response.Response != nil {
22637				sc = iter.Response().Response.Response.StatusCode
22638			}
22639			tracing.EndSpan(ctx, sc, err)
22640		}()
22641	}
22642	iter.i++
22643	if iter.i < len(iter.page.Values()) {
22644		return nil
22645	}
22646	err = iter.page.NextWithContext(ctx)
22647	if err != nil {
22648		iter.i--
22649		return err
22650	}
22651	iter.i = 0
22652	return nil
22653}
22654
22655// Next advances to the next value.  If there was an error making
22656// the request the iterator does not advance and the error is returned.
22657// Deprecated: Use NextWithContext() instead.
22658func (iter *PublicIPPrefixListResultIterator) Next() error {
22659	return iter.NextWithContext(context.Background())
22660}
22661
22662// NotDone returns true if the enumeration should be started or is not yet complete.
22663func (iter PublicIPPrefixListResultIterator) NotDone() bool {
22664	return iter.page.NotDone() && iter.i < len(iter.page.Values())
22665}
22666
22667// Response returns the raw server response from the last page request.
22668func (iter PublicIPPrefixListResultIterator) Response() PublicIPPrefixListResult {
22669	return iter.page.Response()
22670}
22671
22672// Value returns the current value or a zero-initialized value if the
22673// iterator has advanced beyond the end of the collection.
22674func (iter PublicIPPrefixListResultIterator) Value() PublicIPPrefix {
22675	if !iter.page.NotDone() {
22676		return PublicIPPrefix{}
22677	}
22678	return iter.page.Values()[iter.i]
22679}
22680
22681// Creates a new instance of the PublicIPPrefixListResultIterator type.
22682func NewPublicIPPrefixListResultIterator(page PublicIPPrefixListResultPage) PublicIPPrefixListResultIterator {
22683	return PublicIPPrefixListResultIterator{page: page}
22684}
22685
22686// IsEmpty returns true if the ListResult contains no values.
22687func (piplr PublicIPPrefixListResult) IsEmpty() bool {
22688	return piplr.Value == nil || len(*piplr.Value) == 0
22689}
22690
22691// hasNextLink returns true if the NextLink is not empty.
22692func (piplr PublicIPPrefixListResult) hasNextLink() bool {
22693	return piplr.NextLink != nil && len(*piplr.NextLink) != 0
22694}
22695
22696// publicIPPrefixListResultPreparer prepares a request to retrieve the next set of results.
22697// It returns nil if no more results exist.
22698func (piplr PublicIPPrefixListResult) publicIPPrefixListResultPreparer(ctx context.Context) (*http.Request, error) {
22699	if !piplr.hasNextLink() {
22700		return nil, nil
22701	}
22702	return autorest.Prepare((&http.Request{}).WithContext(ctx),
22703		autorest.AsJSON(),
22704		autorest.AsGet(),
22705		autorest.WithBaseURL(to.String(piplr.NextLink)))
22706}
22707
22708// PublicIPPrefixListResultPage contains a page of PublicIPPrefix values.
22709type PublicIPPrefixListResultPage struct {
22710	fn    func(context.Context, PublicIPPrefixListResult) (PublicIPPrefixListResult, error)
22711	piplr PublicIPPrefixListResult
22712}
22713
22714// NextWithContext advances to the next page of values.  If there was an error making
22715// the request the page does not advance and the error is returned.
22716func (page *PublicIPPrefixListResultPage) NextWithContext(ctx context.Context) (err error) {
22717	if tracing.IsEnabled() {
22718		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixListResultPage.NextWithContext")
22719		defer func() {
22720			sc := -1
22721			if page.Response().Response.Response != nil {
22722				sc = page.Response().Response.Response.StatusCode
22723			}
22724			tracing.EndSpan(ctx, sc, err)
22725		}()
22726	}
22727	for {
22728		next, err := page.fn(ctx, page.piplr)
22729		if err != nil {
22730			return err
22731		}
22732		page.piplr = next
22733		if !next.hasNextLink() || !next.IsEmpty() {
22734			break
22735		}
22736	}
22737	return nil
22738}
22739
22740// Next advances to the next page of values.  If there was an error making
22741// the request the page does not advance and the error is returned.
22742// Deprecated: Use NextWithContext() instead.
22743func (page *PublicIPPrefixListResultPage) Next() error {
22744	return page.NextWithContext(context.Background())
22745}
22746
22747// NotDone returns true if the page enumeration should be started or is not yet complete.
22748func (page PublicIPPrefixListResultPage) NotDone() bool {
22749	return !page.piplr.IsEmpty()
22750}
22751
22752// Response returns the raw server response from the last page request.
22753func (page PublicIPPrefixListResultPage) Response() PublicIPPrefixListResult {
22754	return page.piplr
22755}
22756
22757// Values returns the slice of values for the current page or nil if there are no values.
22758func (page PublicIPPrefixListResultPage) Values() []PublicIPPrefix {
22759	if page.piplr.IsEmpty() {
22760		return nil
22761	}
22762	return *page.piplr.Value
22763}
22764
22765// Creates a new instance of the PublicIPPrefixListResultPage type.
22766func NewPublicIPPrefixListResultPage(cur PublicIPPrefixListResult, getNextPage func(context.Context, PublicIPPrefixListResult) (PublicIPPrefixListResult, error)) PublicIPPrefixListResultPage {
22767	return PublicIPPrefixListResultPage{
22768		fn:    getNextPage,
22769		piplr: cur,
22770	}
22771}
22772
22773// PublicIPPrefixPropertiesFormat public IP prefix properties.
22774type PublicIPPrefixPropertiesFormat struct {
22775	// PublicIPAddressVersion - The public IP address version. Possible values include: 'IPv4', 'IPv6'
22776	PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"`
22777	// IPTags - The list of tags associated with the public IP prefix.
22778	IPTags *[]IPTag `json:"ipTags,omitempty"`
22779	// PrefixLength - The Length of the Public IP Prefix.
22780	PrefixLength *int32 `json:"prefixLength,omitempty"`
22781	// IPPrefix - The allocated Prefix.
22782	IPPrefix *string `json:"ipPrefix,omitempty"`
22783	// PublicIPAddresses - The list of all referenced PublicIPAddresses.
22784	PublicIPAddresses *[]ReferencedPublicIPAddress `json:"publicIPAddresses,omitempty"`
22785	// LoadBalancerFrontendIPConfiguration - READ-ONLY; The reference to load balancer frontend IP configuration associated with the public IP prefix.
22786	LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIpConfiguration,omitempty"`
22787	// ResourceGUID - The resource GUID property of the public IP prefix resource.
22788	ResourceGUID *string `json:"resourceGuid,omitempty"`
22789	// ProvisioningState - The provisioning state of the Public IP prefix resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
22790	ProvisioningState *string `json:"provisioningState,omitempty"`
22791}
22792
22793// MarshalJSON is the custom marshaler for PublicIPPrefixPropertiesFormat.
22794func (pippf PublicIPPrefixPropertiesFormat) MarshalJSON() ([]byte, error) {
22795	objectMap := make(map[string]interface{})
22796	if pippf.PublicIPAddressVersion != "" {
22797		objectMap["publicIPAddressVersion"] = pippf.PublicIPAddressVersion
22798	}
22799	if pippf.IPTags != nil {
22800		objectMap["ipTags"] = pippf.IPTags
22801	}
22802	if pippf.PrefixLength != nil {
22803		objectMap["prefixLength"] = pippf.PrefixLength
22804	}
22805	if pippf.IPPrefix != nil {
22806		objectMap["ipPrefix"] = pippf.IPPrefix
22807	}
22808	if pippf.PublicIPAddresses != nil {
22809		objectMap["publicIPAddresses"] = pippf.PublicIPAddresses
22810	}
22811	if pippf.ResourceGUID != nil {
22812		objectMap["resourceGuid"] = pippf.ResourceGUID
22813	}
22814	if pippf.ProvisioningState != nil {
22815		objectMap["provisioningState"] = pippf.ProvisioningState
22816	}
22817	return json.Marshal(objectMap)
22818}
22819
22820// PublicIPPrefixSku SKU of a public IP prefix.
22821type PublicIPPrefixSku struct {
22822	// Name - Name of a public IP prefix SKU. Possible values include: 'PublicIPPrefixSkuNameStandard'
22823	Name PublicIPPrefixSkuName `json:"name,omitempty"`
22824}
22825
22826// QueryTroubleshootingParameters parameters that define the resource to query the troubleshooting result.
22827type QueryTroubleshootingParameters struct {
22828	// TargetResourceID - The target resource ID to query the troubleshooting result.
22829	TargetResourceID *string `json:"targetResourceId,omitempty"`
22830}
22831
22832// ReferencedPublicIPAddress reference to a public IP address.
22833type ReferencedPublicIPAddress struct {
22834	// ID - The PublicIPAddress Reference.
22835	ID *string `json:"id,omitempty"`
22836}
22837
22838// Resource common resource representation.
22839type Resource struct {
22840	// ID - Resource ID.
22841	ID *string `json:"id,omitempty"`
22842	// Name - READ-ONLY; Resource name.
22843	Name *string `json:"name,omitempty"`
22844	// Type - READ-ONLY; Resource type.
22845	Type *string `json:"type,omitempty"`
22846	// Location - Resource location.
22847	Location *string `json:"location,omitempty"`
22848	// Tags - Resource tags.
22849	Tags map[string]*string `json:"tags"`
22850}
22851
22852// MarshalJSON is the custom marshaler for Resource.
22853func (r Resource) MarshalJSON() ([]byte, error) {
22854	objectMap := make(map[string]interface{})
22855	if r.ID != nil {
22856		objectMap["id"] = r.ID
22857	}
22858	if r.Location != nil {
22859		objectMap["location"] = r.Location
22860	}
22861	if r.Tags != nil {
22862		objectMap["tags"] = r.Tags
22863	}
22864	return json.Marshal(objectMap)
22865}
22866
22867// ResourceNavigationLink resourceNavigationLink resource.
22868type ResourceNavigationLink struct {
22869	// ResourceNavigationLinkFormat - Resource navigation link properties format.
22870	*ResourceNavigationLinkFormat `json:"properties,omitempty"`
22871	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
22872	Name *string `json:"name,omitempty"`
22873	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
22874	Etag *string `json:"etag,omitempty"`
22875	// Type - READ-ONLY; Resource type.
22876	Type *string `json:"type,omitempty"`
22877	// ID - Resource ID.
22878	ID *string `json:"id,omitempty"`
22879}
22880
22881// MarshalJSON is the custom marshaler for ResourceNavigationLink.
22882func (rnl ResourceNavigationLink) MarshalJSON() ([]byte, error) {
22883	objectMap := make(map[string]interface{})
22884	if rnl.ResourceNavigationLinkFormat != nil {
22885		objectMap["properties"] = rnl.ResourceNavigationLinkFormat
22886	}
22887	if rnl.Name != nil {
22888		objectMap["name"] = rnl.Name
22889	}
22890	if rnl.ID != nil {
22891		objectMap["id"] = rnl.ID
22892	}
22893	return json.Marshal(objectMap)
22894}
22895
22896// UnmarshalJSON is the custom unmarshaler for ResourceNavigationLink struct.
22897func (rnl *ResourceNavigationLink) UnmarshalJSON(body []byte) error {
22898	var m map[string]*json.RawMessage
22899	err := json.Unmarshal(body, &m)
22900	if err != nil {
22901		return err
22902	}
22903	for k, v := range m {
22904		switch k {
22905		case "properties":
22906			if v != nil {
22907				var resourceNavigationLinkFormat ResourceNavigationLinkFormat
22908				err = json.Unmarshal(*v, &resourceNavigationLinkFormat)
22909				if err != nil {
22910					return err
22911				}
22912				rnl.ResourceNavigationLinkFormat = &resourceNavigationLinkFormat
22913			}
22914		case "name":
22915			if v != nil {
22916				var name string
22917				err = json.Unmarshal(*v, &name)
22918				if err != nil {
22919					return err
22920				}
22921				rnl.Name = &name
22922			}
22923		case "etag":
22924			if v != nil {
22925				var etag string
22926				err = json.Unmarshal(*v, &etag)
22927				if err != nil {
22928					return err
22929				}
22930				rnl.Etag = &etag
22931			}
22932		case "type":
22933			if v != nil {
22934				var typeVar string
22935				err = json.Unmarshal(*v, &typeVar)
22936				if err != nil {
22937					return err
22938				}
22939				rnl.Type = &typeVar
22940			}
22941		case "id":
22942			if v != nil {
22943				var ID string
22944				err = json.Unmarshal(*v, &ID)
22945				if err != nil {
22946					return err
22947				}
22948				rnl.ID = &ID
22949			}
22950		}
22951	}
22952
22953	return nil
22954}
22955
22956// ResourceNavigationLinkFormat properties of ResourceNavigationLink.
22957type ResourceNavigationLinkFormat struct {
22958	// LinkedResourceType - Resource type of the linked resource.
22959	LinkedResourceType *string `json:"linkedResourceType,omitempty"`
22960	// Link - Link to the external resource.
22961	Link *string `json:"link,omitempty"`
22962	// ProvisioningState - READ-ONLY; Provisioning state of the ResourceNavigationLink resource.
22963	ProvisioningState *string `json:"provisioningState,omitempty"`
22964}
22965
22966// MarshalJSON is the custom marshaler for ResourceNavigationLinkFormat.
22967func (rnlf ResourceNavigationLinkFormat) MarshalJSON() ([]byte, error) {
22968	objectMap := make(map[string]interface{})
22969	if rnlf.LinkedResourceType != nil {
22970		objectMap["linkedResourceType"] = rnlf.LinkedResourceType
22971	}
22972	if rnlf.Link != nil {
22973		objectMap["link"] = rnlf.Link
22974	}
22975	return json.Marshal(objectMap)
22976}
22977
22978// ResourceNavigationLinksListResult response for ResourceNavigationLinks_List operation.
22979type ResourceNavigationLinksListResult struct {
22980	autorest.Response `json:"-"`
22981	// Value - The resource navigation links in a subnet.
22982	Value *[]ResourceNavigationLink `json:"value,omitempty"`
22983	// NextLink - READ-ONLY; The URL to get the next set of results.
22984	NextLink *string `json:"nextLink,omitempty"`
22985}
22986
22987// MarshalJSON is the custom marshaler for ResourceNavigationLinksListResult.
22988func (rnllr ResourceNavigationLinksListResult) MarshalJSON() ([]byte, error) {
22989	objectMap := make(map[string]interface{})
22990	if rnllr.Value != nil {
22991		objectMap["value"] = rnllr.Value
22992	}
22993	return json.Marshal(objectMap)
22994}
22995
22996// ResourceSet the base resource set for visibility and auto-approval.
22997type ResourceSet struct {
22998	// Subscriptions - The list of subscriptions.
22999	Subscriptions *[]string `json:"subscriptions,omitempty"`
23000}
23001
23002// RetentionPolicyParameters parameters that define the retention policy for flow log.
23003type RetentionPolicyParameters struct {
23004	// Days - Number of days to retain flow log records.
23005	Days *int32 `json:"days,omitempty"`
23006	// Enabled - Flag to enable/disable retention.
23007	Enabled *bool `json:"enabled,omitempty"`
23008}
23009
23010// Route route resource.
23011type Route struct {
23012	autorest.Response `json:"-"`
23013	// RoutePropertiesFormat - Properties of the route.
23014	*RoutePropertiesFormat `json:"properties,omitempty"`
23015	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
23016	Name *string `json:"name,omitempty"`
23017	// Etag - A unique read-only string that changes whenever the resource is updated.
23018	Etag *string `json:"etag,omitempty"`
23019	// ID - Resource ID.
23020	ID *string `json:"id,omitempty"`
23021}
23022
23023// MarshalJSON is the custom marshaler for Route.
23024func (r Route) MarshalJSON() ([]byte, error) {
23025	objectMap := make(map[string]interface{})
23026	if r.RoutePropertiesFormat != nil {
23027		objectMap["properties"] = r.RoutePropertiesFormat
23028	}
23029	if r.Name != nil {
23030		objectMap["name"] = r.Name
23031	}
23032	if r.Etag != nil {
23033		objectMap["etag"] = r.Etag
23034	}
23035	if r.ID != nil {
23036		objectMap["id"] = r.ID
23037	}
23038	return json.Marshal(objectMap)
23039}
23040
23041// UnmarshalJSON is the custom unmarshaler for Route struct.
23042func (r *Route) UnmarshalJSON(body []byte) error {
23043	var m map[string]*json.RawMessage
23044	err := json.Unmarshal(body, &m)
23045	if err != nil {
23046		return err
23047	}
23048	for k, v := range m {
23049		switch k {
23050		case "properties":
23051			if v != nil {
23052				var routePropertiesFormat RoutePropertiesFormat
23053				err = json.Unmarshal(*v, &routePropertiesFormat)
23054				if err != nil {
23055					return err
23056				}
23057				r.RoutePropertiesFormat = &routePropertiesFormat
23058			}
23059		case "name":
23060			if v != nil {
23061				var name string
23062				err = json.Unmarshal(*v, &name)
23063				if err != nil {
23064					return err
23065				}
23066				r.Name = &name
23067			}
23068		case "etag":
23069			if v != nil {
23070				var etag string
23071				err = json.Unmarshal(*v, &etag)
23072				if err != nil {
23073					return err
23074				}
23075				r.Etag = &etag
23076			}
23077		case "id":
23078			if v != nil {
23079				var ID string
23080				err = json.Unmarshal(*v, &ID)
23081				if err != nil {
23082					return err
23083				}
23084				r.ID = &ID
23085			}
23086		}
23087	}
23088
23089	return nil
23090}
23091
23092// RouteFilter route Filter Resource.
23093type RouteFilter struct {
23094	autorest.Response `json:"-"`
23095	// RouteFilterPropertiesFormat - Properties of the route filter.
23096	*RouteFilterPropertiesFormat `json:"properties,omitempty"`
23097	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
23098	Etag *string `json:"etag,omitempty"`
23099	// ID - Resource ID.
23100	ID *string `json:"id,omitempty"`
23101	// Name - READ-ONLY; Resource name.
23102	Name *string `json:"name,omitempty"`
23103	// Type - READ-ONLY; Resource type.
23104	Type *string `json:"type,omitempty"`
23105	// Location - Resource location.
23106	Location *string `json:"location,omitempty"`
23107	// Tags - Resource tags.
23108	Tags map[string]*string `json:"tags"`
23109}
23110
23111// MarshalJSON is the custom marshaler for RouteFilter.
23112func (rf RouteFilter) MarshalJSON() ([]byte, error) {
23113	objectMap := make(map[string]interface{})
23114	if rf.RouteFilterPropertiesFormat != nil {
23115		objectMap["properties"] = rf.RouteFilterPropertiesFormat
23116	}
23117	if rf.ID != nil {
23118		objectMap["id"] = rf.ID
23119	}
23120	if rf.Location != nil {
23121		objectMap["location"] = rf.Location
23122	}
23123	if rf.Tags != nil {
23124		objectMap["tags"] = rf.Tags
23125	}
23126	return json.Marshal(objectMap)
23127}
23128
23129// UnmarshalJSON is the custom unmarshaler for RouteFilter struct.
23130func (rf *RouteFilter) UnmarshalJSON(body []byte) error {
23131	var m map[string]*json.RawMessage
23132	err := json.Unmarshal(body, &m)
23133	if err != nil {
23134		return err
23135	}
23136	for k, v := range m {
23137		switch k {
23138		case "properties":
23139			if v != nil {
23140				var routeFilterPropertiesFormat RouteFilterPropertiesFormat
23141				err = json.Unmarshal(*v, &routeFilterPropertiesFormat)
23142				if err != nil {
23143					return err
23144				}
23145				rf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat
23146			}
23147		case "etag":
23148			if v != nil {
23149				var etag string
23150				err = json.Unmarshal(*v, &etag)
23151				if err != nil {
23152					return err
23153				}
23154				rf.Etag = &etag
23155			}
23156		case "id":
23157			if v != nil {
23158				var ID string
23159				err = json.Unmarshal(*v, &ID)
23160				if err != nil {
23161					return err
23162				}
23163				rf.ID = &ID
23164			}
23165		case "name":
23166			if v != nil {
23167				var name string
23168				err = json.Unmarshal(*v, &name)
23169				if err != nil {
23170					return err
23171				}
23172				rf.Name = &name
23173			}
23174		case "type":
23175			if v != nil {
23176				var typeVar string
23177				err = json.Unmarshal(*v, &typeVar)
23178				if err != nil {
23179					return err
23180				}
23181				rf.Type = &typeVar
23182			}
23183		case "location":
23184			if v != nil {
23185				var location string
23186				err = json.Unmarshal(*v, &location)
23187				if err != nil {
23188					return err
23189				}
23190				rf.Location = &location
23191			}
23192		case "tags":
23193			if v != nil {
23194				var tags map[string]*string
23195				err = json.Unmarshal(*v, &tags)
23196				if err != nil {
23197					return err
23198				}
23199				rf.Tags = tags
23200			}
23201		}
23202	}
23203
23204	return nil
23205}
23206
23207// RouteFilterListResult response for the ListRouteFilters API service call.
23208type RouteFilterListResult struct {
23209	autorest.Response `json:"-"`
23210	// Value - Gets a list of route filters in a resource group.
23211	Value *[]RouteFilter `json:"value,omitempty"`
23212	// NextLink - The URL to get the next set of results.
23213	NextLink *string `json:"nextLink,omitempty"`
23214}
23215
23216// RouteFilterListResultIterator provides access to a complete listing of RouteFilter values.
23217type RouteFilterListResultIterator struct {
23218	i    int
23219	page RouteFilterListResultPage
23220}
23221
23222// NextWithContext advances to the next value.  If there was an error making
23223// the request the iterator does not advance and the error is returned.
23224func (iter *RouteFilterListResultIterator) NextWithContext(ctx context.Context) (err error) {
23225	if tracing.IsEnabled() {
23226		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultIterator.NextWithContext")
23227		defer func() {
23228			sc := -1
23229			if iter.Response().Response.Response != nil {
23230				sc = iter.Response().Response.Response.StatusCode
23231			}
23232			tracing.EndSpan(ctx, sc, err)
23233		}()
23234	}
23235	iter.i++
23236	if iter.i < len(iter.page.Values()) {
23237		return nil
23238	}
23239	err = iter.page.NextWithContext(ctx)
23240	if err != nil {
23241		iter.i--
23242		return err
23243	}
23244	iter.i = 0
23245	return nil
23246}
23247
23248// Next advances to the next value.  If there was an error making
23249// the request the iterator does not advance and the error is returned.
23250// Deprecated: Use NextWithContext() instead.
23251func (iter *RouteFilterListResultIterator) Next() error {
23252	return iter.NextWithContext(context.Background())
23253}
23254
23255// NotDone returns true if the enumeration should be started or is not yet complete.
23256func (iter RouteFilterListResultIterator) NotDone() bool {
23257	return iter.page.NotDone() && iter.i < len(iter.page.Values())
23258}
23259
23260// Response returns the raw server response from the last page request.
23261func (iter RouteFilterListResultIterator) Response() RouteFilterListResult {
23262	return iter.page.Response()
23263}
23264
23265// Value returns the current value or a zero-initialized value if the
23266// iterator has advanced beyond the end of the collection.
23267func (iter RouteFilterListResultIterator) Value() RouteFilter {
23268	if !iter.page.NotDone() {
23269		return RouteFilter{}
23270	}
23271	return iter.page.Values()[iter.i]
23272}
23273
23274// Creates a new instance of the RouteFilterListResultIterator type.
23275func NewRouteFilterListResultIterator(page RouteFilterListResultPage) RouteFilterListResultIterator {
23276	return RouteFilterListResultIterator{page: page}
23277}
23278
23279// IsEmpty returns true if the ListResult contains no values.
23280func (rflr RouteFilterListResult) IsEmpty() bool {
23281	return rflr.Value == nil || len(*rflr.Value) == 0
23282}
23283
23284// hasNextLink returns true if the NextLink is not empty.
23285func (rflr RouteFilterListResult) hasNextLink() bool {
23286	return rflr.NextLink != nil && len(*rflr.NextLink) != 0
23287}
23288
23289// routeFilterListResultPreparer prepares a request to retrieve the next set of results.
23290// It returns nil if no more results exist.
23291func (rflr RouteFilterListResult) routeFilterListResultPreparer(ctx context.Context) (*http.Request, error) {
23292	if !rflr.hasNextLink() {
23293		return nil, nil
23294	}
23295	return autorest.Prepare((&http.Request{}).WithContext(ctx),
23296		autorest.AsJSON(),
23297		autorest.AsGet(),
23298		autorest.WithBaseURL(to.String(rflr.NextLink)))
23299}
23300
23301// RouteFilterListResultPage contains a page of RouteFilter values.
23302type RouteFilterListResultPage struct {
23303	fn   func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)
23304	rflr RouteFilterListResult
23305}
23306
23307// NextWithContext advances to the next page of values.  If there was an error making
23308// the request the page does not advance and the error is returned.
23309func (page *RouteFilterListResultPage) NextWithContext(ctx context.Context) (err error) {
23310	if tracing.IsEnabled() {
23311		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultPage.NextWithContext")
23312		defer func() {
23313			sc := -1
23314			if page.Response().Response.Response != nil {
23315				sc = page.Response().Response.Response.StatusCode
23316			}
23317			tracing.EndSpan(ctx, sc, err)
23318		}()
23319	}
23320	for {
23321		next, err := page.fn(ctx, page.rflr)
23322		if err != nil {
23323			return err
23324		}
23325		page.rflr = next
23326		if !next.hasNextLink() || !next.IsEmpty() {
23327			break
23328		}
23329	}
23330	return nil
23331}
23332
23333// Next advances to the next page of values.  If there was an error making
23334// the request the page does not advance and the error is returned.
23335// Deprecated: Use NextWithContext() instead.
23336func (page *RouteFilterListResultPage) Next() error {
23337	return page.NextWithContext(context.Background())
23338}
23339
23340// NotDone returns true if the page enumeration should be started or is not yet complete.
23341func (page RouteFilterListResultPage) NotDone() bool {
23342	return !page.rflr.IsEmpty()
23343}
23344
23345// Response returns the raw server response from the last page request.
23346func (page RouteFilterListResultPage) Response() RouteFilterListResult {
23347	return page.rflr
23348}
23349
23350// Values returns the slice of values for the current page or nil if there are no values.
23351func (page RouteFilterListResultPage) Values() []RouteFilter {
23352	if page.rflr.IsEmpty() {
23353		return nil
23354	}
23355	return *page.rflr.Value
23356}
23357
23358// Creates a new instance of the RouteFilterListResultPage type.
23359func NewRouteFilterListResultPage(cur RouteFilterListResult, getNextPage func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)) RouteFilterListResultPage {
23360	return RouteFilterListResultPage{
23361		fn:   getNextPage,
23362		rflr: cur,
23363	}
23364}
23365
23366// RouteFilterPropertiesFormat route Filter Resource.
23367type RouteFilterPropertiesFormat struct {
23368	// Rules - Collection of RouteFilterRules contained within a route filter.
23369	Rules *[]RouteFilterRule `json:"rules,omitempty"`
23370	// Peerings - A collection of references to express route circuit peerings.
23371	Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"`
23372	// Ipv6Peerings - A collection of references to express route circuit ipv6 peerings.
23373	Ipv6Peerings *[]ExpressRouteCircuitPeering `json:"ipv6Peerings,omitempty"`
23374	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', 'Succeeded' and 'Failed'.
23375	ProvisioningState *string `json:"provisioningState,omitempty"`
23376}
23377
23378// MarshalJSON is the custom marshaler for RouteFilterPropertiesFormat.
23379func (rfpf RouteFilterPropertiesFormat) MarshalJSON() ([]byte, error) {
23380	objectMap := make(map[string]interface{})
23381	if rfpf.Rules != nil {
23382		objectMap["rules"] = rfpf.Rules
23383	}
23384	if rfpf.Peerings != nil {
23385		objectMap["peerings"] = rfpf.Peerings
23386	}
23387	if rfpf.Ipv6Peerings != nil {
23388		objectMap["ipv6Peerings"] = rfpf.Ipv6Peerings
23389	}
23390	return json.Marshal(objectMap)
23391}
23392
23393// RouteFilterRule route Filter Rule Resource.
23394type RouteFilterRule struct {
23395	autorest.Response `json:"-"`
23396	// RouteFilterRulePropertiesFormat - Properties of the route filter rule.
23397	*RouteFilterRulePropertiesFormat `json:"properties,omitempty"`
23398	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
23399	Name *string `json:"name,omitempty"`
23400	// Location - Resource location.
23401	Location *string `json:"location,omitempty"`
23402	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
23403	Etag *string `json:"etag,omitempty"`
23404	// ID - Resource ID.
23405	ID *string `json:"id,omitempty"`
23406}
23407
23408// MarshalJSON is the custom marshaler for RouteFilterRule.
23409func (rfr RouteFilterRule) MarshalJSON() ([]byte, error) {
23410	objectMap := make(map[string]interface{})
23411	if rfr.RouteFilterRulePropertiesFormat != nil {
23412		objectMap["properties"] = rfr.RouteFilterRulePropertiesFormat
23413	}
23414	if rfr.Name != nil {
23415		objectMap["name"] = rfr.Name
23416	}
23417	if rfr.Location != nil {
23418		objectMap["location"] = rfr.Location
23419	}
23420	if rfr.ID != nil {
23421		objectMap["id"] = rfr.ID
23422	}
23423	return json.Marshal(objectMap)
23424}
23425
23426// UnmarshalJSON is the custom unmarshaler for RouteFilterRule struct.
23427func (rfr *RouteFilterRule) UnmarshalJSON(body []byte) error {
23428	var m map[string]*json.RawMessage
23429	err := json.Unmarshal(body, &m)
23430	if err != nil {
23431		return err
23432	}
23433	for k, v := range m {
23434		switch k {
23435		case "properties":
23436			if v != nil {
23437				var routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat
23438				err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat)
23439				if err != nil {
23440					return err
23441				}
23442				rfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat
23443			}
23444		case "name":
23445			if v != nil {
23446				var name string
23447				err = json.Unmarshal(*v, &name)
23448				if err != nil {
23449					return err
23450				}
23451				rfr.Name = &name
23452			}
23453		case "location":
23454			if v != nil {
23455				var location string
23456				err = json.Unmarshal(*v, &location)
23457				if err != nil {
23458					return err
23459				}
23460				rfr.Location = &location
23461			}
23462		case "etag":
23463			if v != nil {
23464				var etag string
23465				err = json.Unmarshal(*v, &etag)
23466				if err != nil {
23467					return err
23468				}
23469				rfr.Etag = &etag
23470			}
23471		case "id":
23472			if v != nil {
23473				var ID string
23474				err = json.Unmarshal(*v, &ID)
23475				if err != nil {
23476					return err
23477				}
23478				rfr.ID = &ID
23479			}
23480		}
23481	}
23482
23483	return nil
23484}
23485
23486// RouteFilterRuleListResult response for the ListRouteFilterRules API service call.
23487type RouteFilterRuleListResult struct {
23488	autorest.Response `json:"-"`
23489	// Value - Gets a list of RouteFilterRules in a resource group.
23490	Value *[]RouteFilterRule `json:"value,omitempty"`
23491	// NextLink - The URL to get the next set of results.
23492	NextLink *string `json:"nextLink,omitempty"`
23493}
23494
23495// RouteFilterRuleListResultIterator provides access to a complete listing of RouteFilterRule values.
23496type RouteFilterRuleListResultIterator struct {
23497	i    int
23498	page RouteFilterRuleListResultPage
23499}
23500
23501// NextWithContext advances to the next value.  If there was an error making
23502// the request the iterator does not advance and the error is returned.
23503func (iter *RouteFilterRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
23504	if tracing.IsEnabled() {
23505		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultIterator.NextWithContext")
23506		defer func() {
23507			sc := -1
23508			if iter.Response().Response.Response != nil {
23509				sc = iter.Response().Response.Response.StatusCode
23510			}
23511			tracing.EndSpan(ctx, sc, err)
23512		}()
23513	}
23514	iter.i++
23515	if iter.i < len(iter.page.Values()) {
23516		return nil
23517	}
23518	err = iter.page.NextWithContext(ctx)
23519	if err != nil {
23520		iter.i--
23521		return err
23522	}
23523	iter.i = 0
23524	return nil
23525}
23526
23527// Next advances to the next value.  If there was an error making
23528// the request the iterator does not advance and the error is returned.
23529// Deprecated: Use NextWithContext() instead.
23530func (iter *RouteFilterRuleListResultIterator) Next() error {
23531	return iter.NextWithContext(context.Background())
23532}
23533
23534// NotDone returns true if the enumeration should be started or is not yet complete.
23535func (iter RouteFilterRuleListResultIterator) NotDone() bool {
23536	return iter.page.NotDone() && iter.i < len(iter.page.Values())
23537}
23538
23539// Response returns the raw server response from the last page request.
23540func (iter RouteFilterRuleListResultIterator) Response() RouteFilterRuleListResult {
23541	return iter.page.Response()
23542}
23543
23544// Value returns the current value or a zero-initialized value if the
23545// iterator has advanced beyond the end of the collection.
23546func (iter RouteFilterRuleListResultIterator) Value() RouteFilterRule {
23547	if !iter.page.NotDone() {
23548		return RouteFilterRule{}
23549	}
23550	return iter.page.Values()[iter.i]
23551}
23552
23553// Creates a new instance of the RouteFilterRuleListResultIterator type.
23554func NewRouteFilterRuleListResultIterator(page RouteFilterRuleListResultPage) RouteFilterRuleListResultIterator {
23555	return RouteFilterRuleListResultIterator{page: page}
23556}
23557
23558// IsEmpty returns true if the ListResult contains no values.
23559func (rfrlr RouteFilterRuleListResult) IsEmpty() bool {
23560	return rfrlr.Value == nil || len(*rfrlr.Value) == 0
23561}
23562
23563// hasNextLink returns true if the NextLink is not empty.
23564func (rfrlr RouteFilterRuleListResult) hasNextLink() bool {
23565	return rfrlr.NextLink != nil && len(*rfrlr.NextLink) != 0
23566}
23567
23568// routeFilterRuleListResultPreparer prepares a request to retrieve the next set of results.
23569// It returns nil if no more results exist.
23570func (rfrlr RouteFilterRuleListResult) routeFilterRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
23571	if !rfrlr.hasNextLink() {
23572		return nil, nil
23573	}
23574	return autorest.Prepare((&http.Request{}).WithContext(ctx),
23575		autorest.AsJSON(),
23576		autorest.AsGet(),
23577		autorest.WithBaseURL(to.String(rfrlr.NextLink)))
23578}
23579
23580// RouteFilterRuleListResultPage contains a page of RouteFilterRule values.
23581type RouteFilterRuleListResultPage struct {
23582	fn    func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)
23583	rfrlr RouteFilterRuleListResult
23584}
23585
23586// NextWithContext advances to the next page of values.  If there was an error making
23587// the request the page does not advance and the error is returned.
23588func (page *RouteFilterRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
23589	if tracing.IsEnabled() {
23590		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultPage.NextWithContext")
23591		defer func() {
23592			sc := -1
23593			if page.Response().Response.Response != nil {
23594				sc = page.Response().Response.Response.StatusCode
23595			}
23596			tracing.EndSpan(ctx, sc, err)
23597		}()
23598	}
23599	for {
23600		next, err := page.fn(ctx, page.rfrlr)
23601		if err != nil {
23602			return err
23603		}
23604		page.rfrlr = next
23605		if !next.hasNextLink() || !next.IsEmpty() {
23606			break
23607		}
23608	}
23609	return nil
23610}
23611
23612// Next advances to the next page of values.  If there was an error making
23613// the request the page does not advance and the error is returned.
23614// Deprecated: Use NextWithContext() instead.
23615func (page *RouteFilterRuleListResultPage) Next() error {
23616	return page.NextWithContext(context.Background())
23617}
23618
23619// NotDone returns true if the page enumeration should be started or is not yet complete.
23620func (page RouteFilterRuleListResultPage) NotDone() bool {
23621	return !page.rfrlr.IsEmpty()
23622}
23623
23624// Response returns the raw server response from the last page request.
23625func (page RouteFilterRuleListResultPage) Response() RouteFilterRuleListResult {
23626	return page.rfrlr
23627}
23628
23629// Values returns the slice of values for the current page or nil if there are no values.
23630func (page RouteFilterRuleListResultPage) Values() []RouteFilterRule {
23631	if page.rfrlr.IsEmpty() {
23632		return nil
23633	}
23634	return *page.rfrlr.Value
23635}
23636
23637// Creates a new instance of the RouteFilterRuleListResultPage type.
23638func NewRouteFilterRuleListResultPage(cur RouteFilterRuleListResult, getNextPage func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)) RouteFilterRuleListResultPage {
23639	return RouteFilterRuleListResultPage{
23640		fn:    getNextPage,
23641		rfrlr: cur,
23642	}
23643}
23644
23645// RouteFilterRulePropertiesFormat route Filter Rule Resource.
23646type RouteFilterRulePropertiesFormat struct {
23647	// Access - The access type of the rule. Possible values include: 'Allow', 'Deny'
23648	Access Access `json:"access,omitempty"`
23649	// RouteFilterRuleType - The rule type of the rule.
23650	RouteFilterRuleType *string `json:"routeFilterRuleType,omitempty"`
23651	// Communities - The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020'].
23652	Communities *[]string `json:"communities,omitempty"`
23653	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', 'Succeeded' and 'Failed'.
23654	ProvisioningState *string `json:"provisioningState,omitempty"`
23655}
23656
23657// MarshalJSON is the custom marshaler for RouteFilterRulePropertiesFormat.
23658func (rfrpf RouteFilterRulePropertiesFormat) MarshalJSON() ([]byte, error) {
23659	objectMap := make(map[string]interface{})
23660	if rfrpf.Access != "" {
23661		objectMap["access"] = rfrpf.Access
23662	}
23663	if rfrpf.RouteFilterRuleType != nil {
23664		objectMap["routeFilterRuleType"] = rfrpf.RouteFilterRuleType
23665	}
23666	if rfrpf.Communities != nil {
23667		objectMap["communities"] = rfrpf.Communities
23668	}
23669	return json.Marshal(objectMap)
23670}
23671
23672// RouteFilterRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
23673// long-running operation.
23674type RouteFilterRulesCreateOrUpdateFuture struct {
23675	azure.FutureAPI
23676	// Result returns the result of the asynchronous operation.
23677	// If the operation has not completed it will return an error.
23678	Result func(RouteFilterRulesClient) (RouteFilterRule, error)
23679}
23680
23681// RouteFilterRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
23682// operation.
23683type RouteFilterRulesDeleteFuture struct {
23684	azure.FutureAPI
23685	// Result returns the result of the asynchronous operation.
23686	// If the operation has not completed it will return an error.
23687	Result func(RouteFilterRulesClient) (autorest.Response, error)
23688}
23689
23690// RouteFilterRulesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
23691// operation.
23692type RouteFilterRulesUpdateFuture struct {
23693	azure.FutureAPI
23694	// Result returns the result of the asynchronous operation.
23695	// If the operation has not completed it will return an error.
23696	Result func(RouteFilterRulesClient) (RouteFilterRule, error)
23697}
23698
23699// RouteFiltersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
23700// long-running operation.
23701type RouteFiltersCreateOrUpdateFuture struct {
23702	azure.FutureAPI
23703	// Result returns the result of the asynchronous operation.
23704	// If the operation has not completed it will return an error.
23705	Result func(RouteFiltersClient) (RouteFilter, error)
23706}
23707
23708// RouteFiltersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
23709// operation.
23710type RouteFiltersDeleteFuture struct {
23711	azure.FutureAPI
23712	// Result returns the result of the asynchronous operation.
23713	// If the operation has not completed it will return an error.
23714	Result func(RouteFiltersClient) (autorest.Response, error)
23715}
23716
23717// RouteFiltersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
23718// operation.
23719type RouteFiltersUpdateFuture struct {
23720	azure.FutureAPI
23721	// Result returns the result of the asynchronous operation.
23722	// If the operation has not completed it will return an error.
23723	Result func(RouteFiltersClient) (RouteFilter, error)
23724}
23725
23726// RouteListResult response for the ListRoute API service call.
23727type RouteListResult struct {
23728	autorest.Response `json:"-"`
23729	// Value - Gets a list of routes in a resource group.
23730	Value *[]Route `json:"value,omitempty"`
23731	// NextLink - The URL to get the next set of results.
23732	NextLink *string `json:"nextLink,omitempty"`
23733}
23734
23735// RouteListResultIterator provides access to a complete listing of Route values.
23736type RouteListResultIterator struct {
23737	i    int
23738	page RouteListResultPage
23739}
23740
23741// NextWithContext advances to the next value.  If there was an error making
23742// the request the iterator does not advance and the error is returned.
23743func (iter *RouteListResultIterator) NextWithContext(ctx context.Context) (err error) {
23744	if tracing.IsEnabled() {
23745		ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultIterator.NextWithContext")
23746		defer func() {
23747			sc := -1
23748			if iter.Response().Response.Response != nil {
23749				sc = iter.Response().Response.Response.StatusCode
23750			}
23751			tracing.EndSpan(ctx, sc, err)
23752		}()
23753	}
23754	iter.i++
23755	if iter.i < len(iter.page.Values()) {
23756		return nil
23757	}
23758	err = iter.page.NextWithContext(ctx)
23759	if err != nil {
23760		iter.i--
23761		return err
23762	}
23763	iter.i = 0
23764	return nil
23765}
23766
23767// Next advances to the next value.  If there was an error making
23768// the request the iterator does not advance and the error is returned.
23769// Deprecated: Use NextWithContext() instead.
23770func (iter *RouteListResultIterator) Next() error {
23771	return iter.NextWithContext(context.Background())
23772}
23773
23774// NotDone returns true if the enumeration should be started or is not yet complete.
23775func (iter RouteListResultIterator) NotDone() bool {
23776	return iter.page.NotDone() && iter.i < len(iter.page.Values())
23777}
23778
23779// Response returns the raw server response from the last page request.
23780func (iter RouteListResultIterator) Response() RouteListResult {
23781	return iter.page.Response()
23782}
23783
23784// Value returns the current value or a zero-initialized value if the
23785// iterator has advanced beyond the end of the collection.
23786func (iter RouteListResultIterator) Value() Route {
23787	if !iter.page.NotDone() {
23788		return Route{}
23789	}
23790	return iter.page.Values()[iter.i]
23791}
23792
23793// Creates a new instance of the RouteListResultIterator type.
23794func NewRouteListResultIterator(page RouteListResultPage) RouteListResultIterator {
23795	return RouteListResultIterator{page: page}
23796}
23797
23798// IsEmpty returns true if the ListResult contains no values.
23799func (rlr RouteListResult) IsEmpty() bool {
23800	return rlr.Value == nil || len(*rlr.Value) == 0
23801}
23802
23803// hasNextLink returns true if the NextLink is not empty.
23804func (rlr RouteListResult) hasNextLink() bool {
23805	return rlr.NextLink != nil && len(*rlr.NextLink) != 0
23806}
23807
23808// routeListResultPreparer prepares a request to retrieve the next set of results.
23809// It returns nil if no more results exist.
23810func (rlr RouteListResult) routeListResultPreparer(ctx context.Context) (*http.Request, error) {
23811	if !rlr.hasNextLink() {
23812		return nil, nil
23813	}
23814	return autorest.Prepare((&http.Request{}).WithContext(ctx),
23815		autorest.AsJSON(),
23816		autorest.AsGet(),
23817		autorest.WithBaseURL(to.String(rlr.NextLink)))
23818}
23819
23820// RouteListResultPage contains a page of Route values.
23821type RouteListResultPage struct {
23822	fn  func(context.Context, RouteListResult) (RouteListResult, error)
23823	rlr RouteListResult
23824}
23825
23826// NextWithContext advances to the next page of values.  If there was an error making
23827// the request the page does not advance and the error is returned.
23828func (page *RouteListResultPage) NextWithContext(ctx context.Context) (err error) {
23829	if tracing.IsEnabled() {
23830		ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultPage.NextWithContext")
23831		defer func() {
23832			sc := -1
23833			if page.Response().Response.Response != nil {
23834				sc = page.Response().Response.Response.StatusCode
23835			}
23836			tracing.EndSpan(ctx, sc, err)
23837		}()
23838	}
23839	for {
23840		next, err := page.fn(ctx, page.rlr)
23841		if err != nil {
23842			return err
23843		}
23844		page.rlr = next
23845		if !next.hasNextLink() || !next.IsEmpty() {
23846			break
23847		}
23848	}
23849	return nil
23850}
23851
23852// Next advances to the next page of values.  If there was an error making
23853// the request the page does not advance and the error is returned.
23854// Deprecated: Use NextWithContext() instead.
23855func (page *RouteListResultPage) Next() error {
23856	return page.NextWithContext(context.Background())
23857}
23858
23859// NotDone returns true if the page enumeration should be started or is not yet complete.
23860func (page RouteListResultPage) NotDone() bool {
23861	return !page.rlr.IsEmpty()
23862}
23863
23864// Response returns the raw server response from the last page request.
23865func (page RouteListResultPage) Response() RouteListResult {
23866	return page.rlr
23867}
23868
23869// Values returns the slice of values for the current page or nil if there are no values.
23870func (page RouteListResultPage) Values() []Route {
23871	if page.rlr.IsEmpty() {
23872		return nil
23873	}
23874	return *page.rlr.Value
23875}
23876
23877// Creates a new instance of the RouteListResultPage type.
23878func NewRouteListResultPage(cur RouteListResult, getNextPage func(context.Context, RouteListResult) (RouteListResult, error)) RouteListResultPage {
23879	return RouteListResultPage{
23880		fn:  getNextPage,
23881		rlr: cur,
23882	}
23883}
23884
23885// RoutePropertiesFormat route resource.
23886type RoutePropertiesFormat struct {
23887	// AddressPrefix - The destination CIDR to which the route applies.
23888	AddressPrefix *string `json:"addressPrefix,omitempty"`
23889	// NextHopType - The type of Azure hop the packet should be sent to. Possible values include: 'RouteNextHopTypeVirtualNetworkGateway', 'RouteNextHopTypeVnetLocal', 'RouteNextHopTypeInternet', 'RouteNextHopTypeVirtualAppliance', 'RouteNextHopTypeNone'
23890	NextHopType RouteNextHopType `json:"nextHopType,omitempty"`
23891	// NextHopIPAddress - The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance.
23892	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
23893	// ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
23894	ProvisioningState *string `json:"provisioningState,omitempty"`
23895}
23896
23897// RoutesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
23898// operation.
23899type RoutesCreateOrUpdateFuture struct {
23900	azure.FutureAPI
23901	// Result returns the result of the asynchronous operation.
23902	// If the operation has not completed it will return an error.
23903	Result func(RoutesClient) (Route, error)
23904}
23905
23906// RoutesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
23907type RoutesDeleteFuture struct {
23908	azure.FutureAPI
23909	// Result returns the result of the asynchronous operation.
23910	// If the operation has not completed it will return an error.
23911	Result func(RoutesClient) (autorest.Response, error)
23912}
23913
23914// RouteTable route table resource.
23915type RouteTable struct {
23916	autorest.Response `json:"-"`
23917	// RouteTablePropertiesFormat - Properties of the route table.
23918	*RouteTablePropertiesFormat `json:"properties,omitempty"`
23919	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
23920	Etag *string `json:"etag,omitempty"`
23921	// ID - Resource ID.
23922	ID *string `json:"id,omitempty"`
23923	// Name - READ-ONLY; Resource name.
23924	Name *string `json:"name,omitempty"`
23925	// Type - READ-ONLY; Resource type.
23926	Type *string `json:"type,omitempty"`
23927	// Location - Resource location.
23928	Location *string `json:"location,omitempty"`
23929	// Tags - Resource tags.
23930	Tags map[string]*string `json:"tags"`
23931}
23932
23933// MarshalJSON is the custom marshaler for RouteTable.
23934func (rt RouteTable) MarshalJSON() ([]byte, error) {
23935	objectMap := make(map[string]interface{})
23936	if rt.RouteTablePropertiesFormat != nil {
23937		objectMap["properties"] = rt.RouteTablePropertiesFormat
23938	}
23939	if rt.Etag != nil {
23940		objectMap["etag"] = rt.Etag
23941	}
23942	if rt.ID != nil {
23943		objectMap["id"] = rt.ID
23944	}
23945	if rt.Location != nil {
23946		objectMap["location"] = rt.Location
23947	}
23948	if rt.Tags != nil {
23949		objectMap["tags"] = rt.Tags
23950	}
23951	return json.Marshal(objectMap)
23952}
23953
23954// UnmarshalJSON is the custom unmarshaler for RouteTable struct.
23955func (rt *RouteTable) UnmarshalJSON(body []byte) error {
23956	var m map[string]*json.RawMessage
23957	err := json.Unmarshal(body, &m)
23958	if err != nil {
23959		return err
23960	}
23961	for k, v := range m {
23962		switch k {
23963		case "properties":
23964			if v != nil {
23965				var routeTablePropertiesFormat RouteTablePropertiesFormat
23966				err = json.Unmarshal(*v, &routeTablePropertiesFormat)
23967				if err != nil {
23968					return err
23969				}
23970				rt.RouteTablePropertiesFormat = &routeTablePropertiesFormat
23971			}
23972		case "etag":
23973			if v != nil {
23974				var etag string
23975				err = json.Unmarshal(*v, &etag)
23976				if err != nil {
23977					return err
23978				}
23979				rt.Etag = &etag
23980			}
23981		case "id":
23982			if v != nil {
23983				var ID string
23984				err = json.Unmarshal(*v, &ID)
23985				if err != nil {
23986					return err
23987				}
23988				rt.ID = &ID
23989			}
23990		case "name":
23991			if v != nil {
23992				var name string
23993				err = json.Unmarshal(*v, &name)
23994				if err != nil {
23995					return err
23996				}
23997				rt.Name = &name
23998			}
23999		case "type":
24000			if v != nil {
24001				var typeVar string
24002				err = json.Unmarshal(*v, &typeVar)
24003				if err != nil {
24004					return err
24005				}
24006				rt.Type = &typeVar
24007			}
24008		case "location":
24009			if v != nil {
24010				var location string
24011				err = json.Unmarshal(*v, &location)
24012				if err != nil {
24013					return err
24014				}
24015				rt.Location = &location
24016			}
24017		case "tags":
24018			if v != nil {
24019				var tags map[string]*string
24020				err = json.Unmarshal(*v, &tags)
24021				if err != nil {
24022					return err
24023				}
24024				rt.Tags = tags
24025			}
24026		}
24027	}
24028
24029	return nil
24030}
24031
24032// RouteTableListResult response for the ListRouteTable API service call.
24033type RouteTableListResult struct {
24034	autorest.Response `json:"-"`
24035	// Value - Gets a list of route tables in a resource group.
24036	Value *[]RouteTable `json:"value,omitempty"`
24037	// NextLink - The URL to get the next set of results.
24038	NextLink *string `json:"nextLink,omitempty"`
24039}
24040
24041// RouteTableListResultIterator provides access to a complete listing of RouteTable values.
24042type RouteTableListResultIterator struct {
24043	i    int
24044	page RouteTableListResultPage
24045}
24046
24047// NextWithContext advances to the next value.  If there was an error making
24048// the request the iterator does not advance and the error is returned.
24049func (iter *RouteTableListResultIterator) NextWithContext(ctx context.Context) (err error) {
24050	if tracing.IsEnabled() {
24051		ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultIterator.NextWithContext")
24052		defer func() {
24053			sc := -1
24054			if iter.Response().Response.Response != nil {
24055				sc = iter.Response().Response.Response.StatusCode
24056			}
24057			tracing.EndSpan(ctx, sc, err)
24058		}()
24059	}
24060	iter.i++
24061	if iter.i < len(iter.page.Values()) {
24062		return nil
24063	}
24064	err = iter.page.NextWithContext(ctx)
24065	if err != nil {
24066		iter.i--
24067		return err
24068	}
24069	iter.i = 0
24070	return nil
24071}
24072
24073// Next advances to the next value.  If there was an error making
24074// the request the iterator does not advance and the error is returned.
24075// Deprecated: Use NextWithContext() instead.
24076func (iter *RouteTableListResultIterator) Next() error {
24077	return iter.NextWithContext(context.Background())
24078}
24079
24080// NotDone returns true if the enumeration should be started or is not yet complete.
24081func (iter RouteTableListResultIterator) NotDone() bool {
24082	return iter.page.NotDone() && iter.i < len(iter.page.Values())
24083}
24084
24085// Response returns the raw server response from the last page request.
24086func (iter RouteTableListResultIterator) Response() RouteTableListResult {
24087	return iter.page.Response()
24088}
24089
24090// Value returns the current value or a zero-initialized value if the
24091// iterator has advanced beyond the end of the collection.
24092func (iter RouteTableListResultIterator) Value() RouteTable {
24093	if !iter.page.NotDone() {
24094		return RouteTable{}
24095	}
24096	return iter.page.Values()[iter.i]
24097}
24098
24099// Creates a new instance of the RouteTableListResultIterator type.
24100func NewRouteTableListResultIterator(page RouteTableListResultPage) RouteTableListResultIterator {
24101	return RouteTableListResultIterator{page: page}
24102}
24103
24104// IsEmpty returns true if the ListResult contains no values.
24105func (rtlr RouteTableListResult) IsEmpty() bool {
24106	return rtlr.Value == nil || len(*rtlr.Value) == 0
24107}
24108
24109// hasNextLink returns true if the NextLink is not empty.
24110func (rtlr RouteTableListResult) hasNextLink() bool {
24111	return rtlr.NextLink != nil && len(*rtlr.NextLink) != 0
24112}
24113
24114// routeTableListResultPreparer prepares a request to retrieve the next set of results.
24115// It returns nil if no more results exist.
24116func (rtlr RouteTableListResult) routeTableListResultPreparer(ctx context.Context) (*http.Request, error) {
24117	if !rtlr.hasNextLink() {
24118		return nil, nil
24119	}
24120	return autorest.Prepare((&http.Request{}).WithContext(ctx),
24121		autorest.AsJSON(),
24122		autorest.AsGet(),
24123		autorest.WithBaseURL(to.String(rtlr.NextLink)))
24124}
24125
24126// RouteTableListResultPage contains a page of RouteTable values.
24127type RouteTableListResultPage struct {
24128	fn   func(context.Context, RouteTableListResult) (RouteTableListResult, error)
24129	rtlr RouteTableListResult
24130}
24131
24132// NextWithContext advances to the next page of values.  If there was an error making
24133// the request the page does not advance and the error is returned.
24134func (page *RouteTableListResultPage) NextWithContext(ctx context.Context) (err error) {
24135	if tracing.IsEnabled() {
24136		ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultPage.NextWithContext")
24137		defer func() {
24138			sc := -1
24139			if page.Response().Response.Response != nil {
24140				sc = page.Response().Response.Response.StatusCode
24141			}
24142			tracing.EndSpan(ctx, sc, err)
24143		}()
24144	}
24145	for {
24146		next, err := page.fn(ctx, page.rtlr)
24147		if err != nil {
24148			return err
24149		}
24150		page.rtlr = next
24151		if !next.hasNextLink() || !next.IsEmpty() {
24152			break
24153		}
24154	}
24155	return nil
24156}
24157
24158// Next advances to the next page of values.  If there was an error making
24159// the request the page does not advance and the error is returned.
24160// Deprecated: Use NextWithContext() instead.
24161func (page *RouteTableListResultPage) Next() error {
24162	return page.NextWithContext(context.Background())
24163}
24164
24165// NotDone returns true if the page enumeration should be started or is not yet complete.
24166func (page RouteTableListResultPage) NotDone() bool {
24167	return !page.rtlr.IsEmpty()
24168}
24169
24170// Response returns the raw server response from the last page request.
24171func (page RouteTableListResultPage) Response() RouteTableListResult {
24172	return page.rtlr
24173}
24174
24175// Values returns the slice of values for the current page or nil if there are no values.
24176func (page RouteTableListResultPage) Values() []RouteTable {
24177	if page.rtlr.IsEmpty() {
24178		return nil
24179	}
24180	return *page.rtlr.Value
24181}
24182
24183// Creates a new instance of the RouteTableListResultPage type.
24184func NewRouteTableListResultPage(cur RouteTableListResult, getNextPage func(context.Context, RouteTableListResult) (RouteTableListResult, error)) RouteTableListResultPage {
24185	return RouteTableListResultPage{
24186		fn:   getNextPage,
24187		rtlr: cur,
24188	}
24189}
24190
24191// RouteTablePropertiesFormat route Table resource.
24192type RouteTablePropertiesFormat struct {
24193	// Routes - Collection of routes contained within a route table.
24194	Routes *[]Route `json:"routes,omitempty"`
24195	// Subnets - READ-ONLY; A collection of references to subnets.
24196	Subnets *[]Subnet `json:"subnets,omitempty"`
24197	// DisableBgpRoutePropagation - Gets or sets whether to disable the routes learned by BGP on that route table. True means disable.
24198	DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"`
24199	// ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
24200	ProvisioningState *string `json:"provisioningState,omitempty"`
24201}
24202
24203// MarshalJSON is the custom marshaler for RouteTablePropertiesFormat.
24204func (rtpf RouteTablePropertiesFormat) MarshalJSON() ([]byte, error) {
24205	objectMap := make(map[string]interface{})
24206	if rtpf.Routes != nil {
24207		objectMap["routes"] = rtpf.Routes
24208	}
24209	if rtpf.DisableBgpRoutePropagation != nil {
24210		objectMap["disableBgpRoutePropagation"] = rtpf.DisableBgpRoutePropagation
24211	}
24212	if rtpf.ProvisioningState != nil {
24213		objectMap["provisioningState"] = rtpf.ProvisioningState
24214	}
24215	return json.Marshal(objectMap)
24216}
24217
24218// RouteTablesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
24219// long-running operation.
24220type RouteTablesCreateOrUpdateFuture struct {
24221	azure.FutureAPI
24222	// Result returns the result of the asynchronous operation.
24223	// If the operation has not completed it will return an error.
24224	Result func(RouteTablesClient) (RouteTable, error)
24225}
24226
24227// RouteTablesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
24228// operation.
24229type RouteTablesDeleteFuture struct {
24230	azure.FutureAPI
24231	// Result returns the result of the asynchronous operation.
24232	// If the operation has not completed it will return an error.
24233	Result func(RouteTablesClient) (autorest.Response, error)
24234}
24235
24236// RouteTablesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
24237// operation.
24238type RouteTablesUpdateTagsFuture struct {
24239	azure.FutureAPI
24240	// Result returns the result of the asynchronous operation.
24241	// If the operation has not completed it will return an error.
24242	Result func(RouteTablesClient) (RouteTable, error)
24243}
24244
24245// RuleCondition rule condition of type network
24246type RuleCondition struct {
24247	// IPProtocols - Array of FirewallPolicyRuleConditionNetworkProtocols.
24248	IPProtocols *[]FirewallPolicyRuleConditionNetworkProtocol `json:"ipProtocols,omitempty"`
24249	// SourceAddresses - List of source IP addresses for this rule.
24250	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
24251	// DestinationAddresses - List of destination IP addresses or Service Tags.
24252	DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
24253	// DestinationPorts - List of destination ports.
24254	DestinationPorts *[]string `json:"destinationPorts,omitempty"`
24255	// Name - Name of the rule condition.
24256	Name *string `json:"name,omitempty"`
24257	// Description - Description of the rule condition.
24258	Description *string `json:"description,omitempty"`
24259	// RuleConditionType - Possible values include: 'RuleConditionTypeFirewallPolicyRuleCondition', 'RuleConditionTypeApplicationRuleCondition', 'RuleConditionTypeNetworkRuleCondition'
24260	RuleConditionType RuleConditionType `json:"ruleConditionType,omitempty"`
24261}
24262
24263// MarshalJSON is the custom marshaler for RuleCondition.
24264func (rc RuleCondition) MarshalJSON() ([]byte, error) {
24265	rc.RuleConditionType = RuleConditionTypeNetworkRuleCondition
24266	objectMap := make(map[string]interface{})
24267	if rc.IPProtocols != nil {
24268		objectMap["ipProtocols"] = rc.IPProtocols
24269	}
24270	if rc.SourceAddresses != nil {
24271		objectMap["sourceAddresses"] = rc.SourceAddresses
24272	}
24273	if rc.DestinationAddresses != nil {
24274		objectMap["destinationAddresses"] = rc.DestinationAddresses
24275	}
24276	if rc.DestinationPorts != nil {
24277		objectMap["destinationPorts"] = rc.DestinationPorts
24278	}
24279	if rc.Name != nil {
24280		objectMap["name"] = rc.Name
24281	}
24282	if rc.Description != nil {
24283		objectMap["description"] = rc.Description
24284	}
24285	if rc.RuleConditionType != "" {
24286		objectMap["ruleConditionType"] = rc.RuleConditionType
24287	}
24288	return json.Marshal(objectMap)
24289}
24290
24291// AsApplicationRuleCondition is the BasicFirewallPolicyRuleCondition implementation for RuleCondition.
24292func (rc RuleCondition) AsApplicationRuleCondition() (*ApplicationRuleCondition, bool) {
24293	return nil, false
24294}
24295
24296// AsRuleCondition is the BasicFirewallPolicyRuleCondition implementation for RuleCondition.
24297func (rc RuleCondition) AsRuleCondition() (*RuleCondition, bool) {
24298	return &rc, true
24299}
24300
24301// AsFirewallPolicyRuleCondition is the BasicFirewallPolicyRuleCondition implementation for RuleCondition.
24302func (rc RuleCondition) AsFirewallPolicyRuleCondition() (*FirewallPolicyRuleCondition, bool) {
24303	return nil, false
24304}
24305
24306// AsBasicFirewallPolicyRuleCondition is the BasicFirewallPolicyRuleCondition implementation for RuleCondition.
24307func (rc RuleCondition) AsBasicFirewallPolicyRuleCondition() (BasicFirewallPolicyRuleCondition, bool) {
24308	return &rc, true
24309}
24310
24311// SecurityGroup networkSecurityGroup resource.
24312type SecurityGroup struct {
24313	autorest.Response `json:"-"`
24314	// SecurityGroupPropertiesFormat - Properties of the network security group.
24315	*SecurityGroupPropertiesFormat `json:"properties,omitempty"`
24316	// Etag - A unique read-only string that changes whenever the resource is updated.
24317	Etag *string `json:"etag,omitempty"`
24318	// ID - Resource ID.
24319	ID *string `json:"id,omitempty"`
24320	// Name - READ-ONLY; Resource name.
24321	Name *string `json:"name,omitempty"`
24322	// Type - READ-ONLY; Resource type.
24323	Type *string `json:"type,omitempty"`
24324	// Location - Resource location.
24325	Location *string `json:"location,omitempty"`
24326	// Tags - Resource tags.
24327	Tags map[string]*string `json:"tags"`
24328}
24329
24330// MarshalJSON is the custom marshaler for SecurityGroup.
24331func (sg SecurityGroup) MarshalJSON() ([]byte, error) {
24332	objectMap := make(map[string]interface{})
24333	if sg.SecurityGroupPropertiesFormat != nil {
24334		objectMap["properties"] = sg.SecurityGroupPropertiesFormat
24335	}
24336	if sg.Etag != nil {
24337		objectMap["etag"] = sg.Etag
24338	}
24339	if sg.ID != nil {
24340		objectMap["id"] = sg.ID
24341	}
24342	if sg.Location != nil {
24343		objectMap["location"] = sg.Location
24344	}
24345	if sg.Tags != nil {
24346		objectMap["tags"] = sg.Tags
24347	}
24348	return json.Marshal(objectMap)
24349}
24350
24351// UnmarshalJSON is the custom unmarshaler for SecurityGroup struct.
24352func (sg *SecurityGroup) UnmarshalJSON(body []byte) error {
24353	var m map[string]*json.RawMessage
24354	err := json.Unmarshal(body, &m)
24355	if err != nil {
24356		return err
24357	}
24358	for k, v := range m {
24359		switch k {
24360		case "properties":
24361			if v != nil {
24362				var securityGroupPropertiesFormat SecurityGroupPropertiesFormat
24363				err = json.Unmarshal(*v, &securityGroupPropertiesFormat)
24364				if err != nil {
24365					return err
24366				}
24367				sg.SecurityGroupPropertiesFormat = &securityGroupPropertiesFormat
24368			}
24369		case "etag":
24370			if v != nil {
24371				var etag string
24372				err = json.Unmarshal(*v, &etag)
24373				if err != nil {
24374					return err
24375				}
24376				sg.Etag = &etag
24377			}
24378		case "id":
24379			if v != nil {
24380				var ID string
24381				err = json.Unmarshal(*v, &ID)
24382				if err != nil {
24383					return err
24384				}
24385				sg.ID = &ID
24386			}
24387		case "name":
24388			if v != nil {
24389				var name string
24390				err = json.Unmarshal(*v, &name)
24391				if err != nil {
24392					return err
24393				}
24394				sg.Name = &name
24395			}
24396		case "type":
24397			if v != nil {
24398				var typeVar string
24399				err = json.Unmarshal(*v, &typeVar)
24400				if err != nil {
24401					return err
24402				}
24403				sg.Type = &typeVar
24404			}
24405		case "location":
24406			if v != nil {
24407				var location string
24408				err = json.Unmarshal(*v, &location)
24409				if err != nil {
24410					return err
24411				}
24412				sg.Location = &location
24413			}
24414		case "tags":
24415			if v != nil {
24416				var tags map[string]*string
24417				err = json.Unmarshal(*v, &tags)
24418				if err != nil {
24419					return err
24420				}
24421				sg.Tags = tags
24422			}
24423		}
24424	}
24425
24426	return nil
24427}
24428
24429// SecurityGroupListResult response for ListNetworkSecurityGroups API service call.
24430type SecurityGroupListResult struct {
24431	autorest.Response `json:"-"`
24432	// Value - A list of NetworkSecurityGroup resources.
24433	Value *[]SecurityGroup `json:"value,omitempty"`
24434	// NextLink - The URL to get the next set of results.
24435	NextLink *string `json:"nextLink,omitempty"`
24436}
24437
24438// SecurityGroupListResultIterator provides access to a complete listing of SecurityGroup values.
24439type SecurityGroupListResultIterator struct {
24440	i    int
24441	page SecurityGroupListResultPage
24442}
24443
24444// NextWithContext advances to the next value.  If there was an error making
24445// the request the iterator does not advance and the error is returned.
24446func (iter *SecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
24447	if tracing.IsEnabled() {
24448		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultIterator.NextWithContext")
24449		defer func() {
24450			sc := -1
24451			if iter.Response().Response.Response != nil {
24452				sc = iter.Response().Response.Response.StatusCode
24453			}
24454			tracing.EndSpan(ctx, sc, err)
24455		}()
24456	}
24457	iter.i++
24458	if iter.i < len(iter.page.Values()) {
24459		return nil
24460	}
24461	err = iter.page.NextWithContext(ctx)
24462	if err != nil {
24463		iter.i--
24464		return err
24465	}
24466	iter.i = 0
24467	return nil
24468}
24469
24470// Next advances to the next value.  If there was an error making
24471// the request the iterator does not advance and the error is returned.
24472// Deprecated: Use NextWithContext() instead.
24473func (iter *SecurityGroupListResultIterator) Next() error {
24474	return iter.NextWithContext(context.Background())
24475}
24476
24477// NotDone returns true if the enumeration should be started or is not yet complete.
24478func (iter SecurityGroupListResultIterator) NotDone() bool {
24479	return iter.page.NotDone() && iter.i < len(iter.page.Values())
24480}
24481
24482// Response returns the raw server response from the last page request.
24483func (iter SecurityGroupListResultIterator) Response() SecurityGroupListResult {
24484	return iter.page.Response()
24485}
24486
24487// Value returns the current value or a zero-initialized value if the
24488// iterator has advanced beyond the end of the collection.
24489func (iter SecurityGroupListResultIterator) Value() SecurityGroup {
24490	if !iter.page.NotDone() {
24491		return SecurityGroup{}
24492	}
24493	return iter.page.Values()[iter.i]
24494}
24495
24496// Creates a new instance of the SecurityGroupListResultIterator type.
24497func NewSecurityGroupListResultIterator(page SecurityGroupListResultPage) SecurityGroupListResultIterator {
24498	return SecurityGroupListResultIterator{page: page}
24499}
24500
24501// IsEmpty returns true if the ListResult contains no values.
24502func (sglr SecurityGroupListResult) IsEmpty() bool {
24503	return sglr.Value == nil || len(*sglr.Value) == 0
24504}
24505
24506// hasNextLink returns true if the NextLink is not empty.
24507func (sglr SecurityGroupListResult) hasNextLink() bool {
24508	return sglr.NextLink != nil && len(*sglr.NextLink) != 0
24509}
24510
24511// securityGroupListResultPreparer prepares a request to retrieve the next set of results.
24512// It returns nil if no more results exist.
24513func (sglr SecurityGroupListResult) securityGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
24514	if !sglr.hasNextLink() {
24515		return nil, nil
24516	}
24517	return autorest.Prepare((&http.Request{}).WithContext(ctx),
24518		autorest.AsJSON(),
24519		autorest.AsGet(),
24520		autorest.WithBaseURL(to.String(sglr.NextLink)))
24521}
24522
24523// SecurityGroupListResultPage contains a page of SecurityGroup values.
24524type SecurityGroupListResultPage struct {
24525	fn   func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)
24526	sglr SecurityGroupListResult
24527}
24528
24529// NextWithContext advances to the next page of values.  If there was an error making
24530// the request the page does not advance and the error is returned.
24531func (page *SecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
24532	if tracing.IsEnabled() {
24533		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultPage.NextWithContext")
24534		defer func() {
24535			sc := -1
24536			if page.Response().Response.Response != nil {
24537				sc = page.Response().Response.Response.StatusCode
24538			}
24539			tracing.EndSpan(ctx, sc, err)
24540		}()
24541	}
24542	for {
24543		next, err := page.fn(ctx, page.sglr)
24544		if err != nil {
24545			return err
24546		}
24547		page.sglr = next
24548		if !next.hasNextLink() || !next.IsEmpty() {
24549			break
24550		}
24551	}
24552	return nil
24553}
24554
24555// Next 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.
24557// Deprecated: Use NextWithContext() instead.
24558func (page *SecurityGroupListResultPage) Next() error {
24559	return page.NextWithContext(context.Background())
24560}
24561
24562// NotDone returns true if the page enumeration should be started or is not yet complete.
24563func (page SecurityGroupListResultPage) NotDone() bool {
24564	return !page.sglr.IsEmpty()
24565}
24566
24567// Response returns the raw server response from the last page request.
24568func (page SecurityGroupListResultPage) Response() SecurityGroupListResult {
24569	return page.sglr
24570}
24571
24572// Values returns the slice of values for the current page or nil if there are no values.
24573func (page SecurityGroupListResultPage) Values() []SecurityGroup {
24574	if page.sglr.IsEmpty() {
24575		return nil
24576	}
24577	return *page.sglr.Value
24578}
24579
24580// Creates a new instance of the SecurityGroupListResultPage type.
24581func NewSecurityGroupListResultPage(cur SecurityGroupListResult, getNextPage func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)) SecurityGroupListResultPage {
24582	return SecurityGroupListResultPage{
24583		fn:   getNextPage,
24584		sglr: cur,
24585	}
24586}
24587
24588// SecurityGroupNetworkInterface network interface and all its associated security rules.
24589type SecurityGroupNetworkInterface struct {
24590	// ID - ID of the network interface.
24591	ID *string `json:"id,omitempty"`
24592	// SecurityRuleAssociations - All security rules associated with the network interface.
24593	SecurityRuleAssociations *SecurityRuleAssociations `json:"securityRuleAssociations,omitempty"`
24594}
24595
24596// SecurityGroupPropertiesFormat network Security Group resource.
24597type SecurityGroupPropertiesFormat struct {
24598	// SecurityRules - A collection of security rules of the network security group.
24599	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
24600	// DefaultSecurityRules - The default security rules of network security group.
24601	DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"`
24602	// NetworkInterfaces - READ-ONLY; A collection of references to network interfaces.
24603	NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"`
24604	// Subnets - READ-ONLY; A collection of references to subnets.
24605	Subnets *[]Subnet `json:"subnets,omitempty"`
24606	// ResourceGUID - The resource GUID property of the network security group resource.
24607	ResourceGUID *string `json:"resourceGuid,omitempty"`
24608	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
24609	ProvisioningState *string `json:"provisioningState,omitempty"`
24610}
24611
24612// MarshalJSON is the custom marshaler for SecurityGroupPropertiesFormat.
24613func (sgpf SecurityGroupPropertiesFormat) MarshalJSON() ([]byte, error) {
24614	objectMap := make(map[string]interface{})
24615	if sgpf.SecurityRules != nil {
24616		objectMap["securityRules"] = sgpf.SecurityRules
24617	}
24618	if sgpf.DefaultSecurityRules != nil {
24619		objectMap["defaultSecurityRules"] = sgpf.DefaultSecurityRules
24620	}
24621	if sgpf.ResourceGUID != nil {
24622		objectMap["resourceGuid"] = sgpf.ResourceGUID
24623	}
24624	if sgpf.ProvisioningState != nil {
24625		objectMap["provisioningState"] = sgpf.ProvisioningState
24626	}
24627	return json.Marshal(objectMap)
24628}
24629
24630// SecurityGroupResult network configuration diagnostic result corresponded provided traffic query.
24631type SecurityGroupResult struct {
24632	// SecurityRuleAccessResult - The network traffic is allowed or denied. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
24633	SecurityRuleAccessResult SecurityRuleAccess `json:"securityRuleAccessResult,omitempty"`
24634	// EvaluatedNetworkSecurityGroups - READ-ONLY; List of results network security groups diagnostic.
24635	EvaluatedNetworkSecurityGroups *[]EvaluatedNetworkSecurityGroup `json:"evaluatedNetworkSecurityGroups,omitempty"`
24636}
24637
24638// MarshalJSON is the custom marshaler for SecurityGroupResult.
24639func (sgr SecurityGroupResult) MarshalJSON() ([]byte, error) {
24640	objectMap := make(map[string]interface{})
24641	if sgr.SecurityRuleAccessResult != "" {
24642		objectMap["securityRuleAccessResult"] = sgr.SecurityRuleAccessResult
24643	}
24644	return json.Marshal(objectMap)
24645}
24646
24647// SecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
24648// long-running operation.
24649type SecurityGroupsCreateOrUpdateFuture struct {
24650	azure.FutureAPI
24651	// Result returns the result of the asynchronous operation.
24652	// If the operation has not completed it will return an error.
24653	Result func(SecurityGroupsClient) (SecurityGroup, error)
24654}
24655
24656// SecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
24657// operation.
24658type SecurityGroupsDeleteFuture struct {
24659	azure.FutureAPI
24660	// Result returns the result of the asynchronous operation.
24661	// If the operation has not completed it will return an error.
24662	Result func(SecurityGroupsClient) (autorest.Response, error)
24663}
24664
24665// SecurityGroupsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
24666// long-running operation.
24667type SecurityGroupsUpdateTagsFuture struct {
24668	azure.FutureAPI
24669	// Result returns the result of the asynchronous operation.
24670	// If the operation has not completed it will return an error.
24671	Result func(SecurityGroupsClient) (SecurityGroup, error)
24672}
24673
24674// SecurityGroupViewParameters parameters that define the VM to check security groups for.
24675type SecurityGroupViewParameters struct {
24676	// TargetResourceID - ID of the target VM.
24677	TargetResourceID *string `json:"targetResourceId,omitempty"`
24678}
24679
24680// SecurityGroupViewResult the information about security rules applied to the specified VM.
24681type SecurityGroupViewResult struct {
24682	autorest.Response `json:"-"`
24683	// NetworkInterfaces - List of network interfaces on the specified VM.
24684	NetworkInterfaces *[]SecurityGroupNetworkInterface `json:"networkInterfaces,omitempty"`
24685}
24686
24687// SecurityRule network security rule.
24688type SecurityRule struct {
24689	autorest.Response `json:"-"`
24690	// SecurityRulePropertiesFormat - Properties of the security rule.
24691	*SecurityRulePropertiesFormat `json:"properties,omitempty"`
24692	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
24693	Name *string `json:"name,omitempty"`
24694	// Etag - A unique read-only string that changes whenever the resource is updated.
24695	Etag *string `json:"etag,omitempty"`
24696	// ID - Resource ID.
24697	ID *string `json:"id,omitempty"`
24698}
24699
24700// MarshalJSON is the custom marshaler for SecurityRule.
24701func (sr SecurityRule) MarshalJSON() ([]byte, error) {
24702	objectMap := make(map[string]interface{})
24703	if sr.SecurityRulePropertiesFormat != nil {
24704		objectMap["properties"] = sr.SecurityRulePropertiesFormat
24705	}
24706	if sr.Name != nil {
24707		objectMap["name"] = sr.Name
24708	}
24709	if sr.Etag != nil {
24710		objectMap["etag"] = sr.Etag
24711	}
24712	if sr.ID != nil {
24713		objectMap["id"] = sr.ID
24714	}
24715	return json.Marshal(objectMap)
24716}
24717
24718// UnmarshalJSON is the custom unmarshaler for SecurityRule struct.
24719func (sr *SecurityRule) UnmarshalJSON(body []byte) error {
24720	var m map[string]*json.RawMessage
24721	err := json.Unmarshal(body, &m)
24722	if err != nil {
24723		return err
24724	}
24725	for k, v := range m {
24726		switch k {
24727		case "properties":
24728			if v != nil {
24729				var securityRulePropertiesFormat SecurityRulePropertiesFormat
24730				err = json.Unmarshal(*v, &securityRulePropertiesFormat)
24731				if err != nil {
24732					return err
24733				}
24734				sr.SecurityRulePropertiesFormat = &securityRulePropertiesFormat
24735			}
24736		case "name":
24737			if v != nil {
24738				var name string
24739				err = json.Unmarshal(*v, &name)
24740				if err != nil {
24741					return err
24742				}
24743				sr.Name = &name
24744			}
24745		case "etag":
24746			if v != nil {
24747				var etag string
24748				err = json.Unmarshal(*v, &etag)
24749				if err != nil {
24750					return err
24751				}
24752				sr.Etag = &etag
24753			}
24754		case "id":
24755			if v != nil {
24756				var ID string
24757				err = json.Unmarshal(*v, &ID)
24758				if err != nil {
24759					return err
24760				}
24761				sr.ID = &ID
24762			}
24763		}
24764	}
24765
24766	return nil
24767}
24768
24769// SecurityRuleAssociations all security rules associated with the network interface.
24770type SecurityRuleAssociations struct {
24771	// NetworkInterfaceAssociation - Network interface and it's custom security rules.
24772	NetworkInterfaceAssociation *InterfaceAssociation `json:"networkInterfaceAssociation,omitempty"`
24773	// SubnetAssociation - Subnet and it's custom security rules.
24774	SubnetAssociation *SubnetAssociation `json:"subnetAssociation,omitempty"`
24775	// DefaultSecurityRules - Collection of default security rules of the network security group.
24776	DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"`
24777	// EffectiveSecurityRules - Collection of effective security rules.
24778	EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"`
24779}
24780
24781// SecurityRuleListResult response for ListSecurityRule API service call. Retrieves all security rules that
24782// belongs to a network security group.
24783type SecurityRuleListResult struct {
24784	autorest.Response `json:"-"`
24785	// Value - The security rules in a network security group.
24786	Value *[]SecurityRule `json:"value,omitempty"`
24787	// NextLink - The URL to get the next set of results.
24788	NextLink *string `json:"nextLink,omitempty"`
24789}
24790
24791// SecurityRuleListResultIterator provides access to a complete listing of SecurityRule values.
24792type SecurityRuleListResultIterator struct {
24793	i    int
24794	page SecurityRuleListResultPage
24795}
24796
24797// NextWithContext advances to the next value.  If there was an error making
24798// the request the iterator does not advance and the error is returned.
24799func (iter *SecurityRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
24800	if tracing.IsEnabled() {
24801		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultIterator.NextWithContext")
24802		defer func() {
24803			sc := -1
24804			if iter.Response().Response.Response != nil {
24805				sc = iter.Response().Response.Response.StatusCode
24806			}
24807			tracing.EndSpan(ctx, sc, err)
24808		}()
24809	}
24810	iter.i++
24811	if iter.i < len(iter.page.Values()) {
24812		return nil
24813	}
24814	err = iter.page.NextWithContext(ctx)
24815	if err != nil {
24816		iter.i--
24817		return err
24818	}
24819	iter.i = 0
24820	return nil
24821}
24822
24823// Next advances to the next value.  If there was an error making
24824// the request the iterator does not advance and the error is returned.
24825// Deprecated: Use NextWithContext() instead.
24826func (iter *SecurityRuleListResultIterator) Next() error {
24827	return iter.NextWithContext(context.Background())
24828}
24829
24830// NotDone returns true if the enumeration should be started or is not yet complete.
24831func (iter SecurityRuleListResultIterator) NotDone() bool {
24832	return iter.page.NotDone() && iter.i < len(iter.page.Values())
24833}
24834
24835// Response returns the raw server response from the last page request.
24836func (iter SecurityRuleListResultIterator) Response() SecurityRuleListResult {
24837	return iter.page.Response()
24838}
24839
24840// Value returns the current value or a zero-initialized value if the
24841// iterator has advanced beyond the end of the collection.
24842func (iter SecurityRuleListResultIterator) Value() SecurityRule {
24843	if !iter.page.NotDone() {
24844		return SecurityRule{}
24845	}
24846	return iter.page.Values()[iter.i]
24847}
24848
24849// Creates a new instance of the SecurityRuleListResultIterator type.
24850func NewSecurityRuleListResultIterator(page SecurityRuleListResultPage) SecurityRuleListResultIterator {
24851	return SecurityRuleListResultIterator{page: page}
24852}
24853
24854// IsEmpty returns true if the ListResult contains no values.
24855func (srlr SecurityRuleListResult) IsEmpty() bool {
24856	return srlr.Value == nil || len(*srlr.Value) == 0
24857}
24858
24859// hasNextLink returns true if the NextLink is not empty.
24860func (srlr SecurityRuleListResult) hasNextLink() bool {
24861	return srlr.NextLink != nil && len(*srlr.NextLink) != 0
24862}
24863
24864// securityRuleListResultPreparer prepares a request to retrieve the next set of results.
24865// It returns nil if no more results exist.
24866func (srlr SecurityRuleListResult) securityRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
24867	if !srlr.hasNextLink() {
24868		return nil, nil
24869	}
24870	return autorest.Prepare((&http.Request{}).WithContext(ctx),
24871		autorest.AsJSON(),
24872		autorest.AsGet(),
24873		autorest.WithBaseURL(to.String(srlr.NextLink)))
24874}
24875
24876// SecurityRuleListResultPage contains a page of SecurityRule values.
24877type SecurityRuleListResultPage struct {
24878	fn   func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)
24879	srlr SecurityRuleListResult
24880}
24881
24882// NextWithContext advances to the next page of values.  If there was an error making
24883// the request the page does not advance and the error is returned.
24884func (page *SecurityRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
24885	if tracing.IsEnabled() {
24886		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultPage.NextWithContext")
24887		defer func() {
24888			sc := -1
24889			if page.Response().Response.Response != nil {
24890				sc = page.Response().Response.Response.StatusCode
24891			}
24892			tracing.EndSpan(ctx, sc, err)
24893		}()
24894	}
24895	for {
24896		next, err := page.fn(ctx, page.srlr)
24897		if err != nil {
24898			return err
24899		}
24900		page.srlr = next
24901		if !next.hasNextLink() || !next.IsEmpty() {
24902			break
24903		}
24904	}
24905	return nil
24906}
24907
24908// Next advances to the next page of values.  If there was an error making
24909// the request the page does not advance and the error is returned.
24910// Deprecated: Use NextWithContext() instead.
24911func (page *SecurityRuleListResultPage) Next() error {
24912	return page.NextWithContext(context.Background())
24913}
24914
24915// NotDone returns true if the page enumeration should be started or is not yet complete.
24916func (page SecurityRuleListResultPage) NotDone() bool {
24917	return !page.srlr.IsEmpty()
24918}
24919
24920// Response returns the raw server response from the last page request.
24921func (page SecurityRuleListResultPage) Response() SecurityRuleListResult {
24922	return page.srlr
24923}
24924
24925// Values returns the slice of values for the current page or nil if there are no values.
24926func (page SecurityRuleListResultPage) Values() []SecurityRule {
24927	if page.srlr.IsEmpty() {
24928		return nil
24929	}
24930	return *page.srlr.Value
24931}
24932
24933// Creates a new instance of the SecurityRuleListResultPage type.
24934func NewSecurityRuleListResultPage(cur SecurityRuleListResult, getNextPage func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)) SecurityRuleListResultPage {
24935	return SecurityRuleListResultPage{
24936		fn:   getNextPage,
24937		srlr: cur,
24938	}
24939}
24940
24941// SecurityRulePropertiesFormat security rule resource.
24942type SecurityRulePropertiesFormat struct {
24943	// Description - A description for this rule. Restricted to 140 chars.
24944	Description *string `json:"description,omitempty"`
24945	// Protocol - Network protocol this rule applies to. Possible values include: 'SecurityRuleProtocolTCP', 'SecurityRuleProtocolUDP', 'SecurityRuleProtocolIcmp', 'SecurityRuleProtocolEsp', 'SecurityRuleProtocolAsterisk'
24946	Protocol SecurityRuleProtocol `json:"protocol,omitempty"`
24947	// SourcePortRange - The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
24948	SourcePortRange *string `json:"sourcePortRange,omitempty"`
24949	// DestinationPortRange - The destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
24950	DestinationPortRange *string `json:"destinationPortRange,omitempty"`
24951	// 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.
24952	SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
24953	// SourceAddressPrefixes - The CIDR or source IP ranges.
24954	SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"`
24955	// SourceApplicationSecurityGroups - The application security group specified as source.
24956	SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"`
24957	// 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.
24958	DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"`
24959	// DestinationAddressPrefixes - The destination address prefixes. CIDR or destination IP ranges.
24960	DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"`
24961	// DestinationApplicationSecurityGroups - The application security group specified as destination.
24962	DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"`
24963	// SourcePortRanges - The source port ranges.
24964	SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"`
24965	// DestinationPortRanges - The destination port ranges.
24966	DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"`
24967	// Access - The network traffic is allowed or denied. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
24968	Access SecurityRuleAccess `json:"access,omitempty"`
24969	// 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.
24970	Priority *int32 `json:"priority,omitempty"`
24971	// Direction - The direction of the rule. The direction specifies if rule will be evaluated on incoming or outgoing traffic. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound'
24972	Direction SecurityRuleDirection `json:"direction,omitempty"`
24973	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
24974	ProvisioningState *string `json:"provisioningState,omitempty"`
24975}
24976
24977// SecurityRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
24978// long-running operation.
24979type SecurityRulesCreateOrUpdateFuture struct {
24980	azure.FutureAPI
24981	// Result returns the result of the asynchronous operation.
24982	// If the operation has not completed it will return an error.
24983	Result func(SecurityRulesClient) (SecurityRule, error)
24984}
24985
24986// SecurityRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
24987// operation.
24988type SecurityRulesDeleteFuture struct {
24989	azure.FutureAPI
24990	// Result returns the result of the asynchronous operation.
24991	// If the operation has not completed it will return an error.
24992	Result func(SecurityRulesClient) (autorest.Response, error)
24993}
24994
24995// SecurityRulesEvaluationResult network security rules evaluation result.
24996type SecurityRulesEvaluationResult struct {
24997	// Name - Name of the network security rule.
24998	Name *string `json:"name,omitempty"`
24999	// ProtocolMatched - Value indicating whether protocol is matched.
25000	ProtocolMatched *bool `json:"protocolMatched,omitempty"`
25001	// SourceMatched - Value indicating whether source is matched.
25002	SourceMatched *bool `json:"sourceMatched,omitempty"`
25003	// SourcePortMatched - Value indicating whether source port is matched.
25004	SourcePortMatched *bool `json:"sourcePortMatched,omitempty"`
25005	// DestinationMatched - Value indicating whether destination is matched.
25006	DestinationMatched *bool `json:"destinationMatched,omitempty"`
25007	// DestinationPortMatched - Value indicating whether destination port is matched.
25008	DestinationPortMatched *bool `json:"destinationPortMatched,omitempty"`
25009}
25010
25011// ServiceAssociationLink serviceAssociationLink resource.
25012type ServiceAssociationLink struct {
25013	// ServiceAssociationLinkPropertiesFormat - Resource navigation link properties format.
25014	*ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"`
25015	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
25016	Name *string `json:"name,omitempty"`
25017	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
25018	Etag *string `json:"etag,omitempty"`
25019	// Type - Resource type.
25020	Type *string `json:"type,omitempty"`
25021	// ID - Resource ID.
25022	ID *string `json:"id,omitempty"`
25023}
25024
25025// MarshalJSON is the custom marshaler for ServiceAssociationLink.
25026func (sal ServiceAssociationLink) MarshalJSON() ([]byte, error) {
25027	objectMap := make(map[string]interface{})
25028	if sal.ServiceAssociationLinkPropertiesFormat != nil {
25029		objectMap["properties"] = sal.ServiceAssociationLinkPropertiesFormat
25030	}
25031	if sal.Name != nil {
25032		objectMap["name"] = sal.Name
25033	}
25034	if sal.Type != nil {
25035		objectMap["type"] = sal.Type
25036	}
25037	if sal.ID != nil {
25038		objectMap["id"] = sal.ID
25039	}
25040	return json.Marshal(objectMap)
25041}
25042
25043// UnmarshalJSON is the custom unmarshaler for ServiceAssociationLink struct.
25044func (sal *ServiceAssociationLink) UnmarshalJSON(body []byte) error {
25045	var m map[string]*json.RawMessage
25046	err := json.Unmarshal(body, &m)
25047	if err != nil {
25048		return err
25049	}
25050	for k, v := range m {
25051		switch k {
25052		case "properties":
25053			if v != nil {
25054				var serviceAssociationLinkPropertiesFormat ServiceAssociationLinkPropertiesFormat
25055				err = json.Unmarshal(*v, &serviceAssociationLinkPropertiesFormat)
25056				if err != nil {
25057					return err
25058				}
25059				sal.ServiceAssociationLinkPropertiesFormat = &serviceAssociationLinkPropertiesFormat
25060			}
25061		case "name":
25062			if v != nil {
25063				var name string
25064				err = json.Unmarshal(*v, &name)
25065				if err != nil {
25066					return err
25067				}
25068				sal.Name = &name
25069			}
25070		case "etag":
25071			if v != nil {
25072				var etag string
25073				err = json.Unmarshal(*v, &etag)
25074				if err != nil {
25075					return err
25076				}
25077				sal.Etag = &etag
25078			}
25079		case "type":
25080			if v != nil {
25081				var typeVar string
25082				err = json.Unmarshal(*v, &typeVar)
25083				if err != nil {
25084					return err
25085				}
25086				sal.Type = &typeVar
25087			}
25088		case "id":
25089			if v != nil {
25090				var ID string
25091				err = json.Unmarshal(*v, &ID)
25092				if err != nil {
25093					return err
25094				}
25095				sal.ID = &ID
25096			}
25097		}
25098	}
25099
25100	return nil
25101}
25102
25103// ServiceAssociationLinkPropertiesFormat properties of ServiceAssociationLink.
25104type ServiceAssociationLinkPropertiesFormat struct {
25105	// LinkedResourceType - Resource type of the linked resource.
25106	LinkedResourceType *string `json:"linkedResourceType,omitempty"`
25107	// Link - Link to the external resource.
25108	Link *string `json:"link,omitempty"`
25109	// ProvisioningState - READ-ONLY; Provisioning state of the ServiceAssociationLink resource.
25110	ProvisioningState *string `json:"provisioningState,omitempty"`
25111	// AllowDelete - If true, the resource can be deleted.
25112	AllowDelete *bool `json:"allowDelete,omitempty"`
25113	// Locations - A list of locations.
25114	Locations *[]string `json:"locations,omitempty"`
25115}
25116
25117// MarshalJSON is the custom marshaler for ServiceAssociationLinkPropertiesFormat.
25118func (salpf ServiceAssociationLinkPropertiesFormat) MarshalJSON() ([]byte, error) {
25119	objectMap := make(map[string]interface{})
25120	if salpf.LinkedResourceType != nil {
25121		objectMap["linkedResourceType"] = salpf.LinkedResourceType
25122	}
25123	if salpf.Link != nil {
25124		objectMap["link"] = salpf.Link
25125	}
25126	if salpf.AllowDelete != nil {
25127		objectMap["allowDelete"] = salpf.AllowDelete
25128	}
25129	if salpf.Locations != nil {
25130		objectMap["locations"] = salpf.Locations
25131	}
25132	return json.Marshal(objectMap)
25133}
25134
25135// ServiceAssociationLinksListResult response for ServiceAssociationLinks_List operation.
25136type ServiceAssociationLinksListResult struct {
25137	autorest.Response `json:"-"`
25138	// Value - The service association links in a subnet.
25139	Value *[]ServiceAssociationLink `json:"value,omitempty"`
25140	// NextLink - READ-ONLY; The URL to get the next set of results.
25141	NextLink *string `json:"nextLink,omitempty"`
25142}
25143
25144// MarshalJSON is the custom marshaler for ServiceAssociationLinksListResult.
25145func (sallr ServiceAssociationLinksListResult) MarshalJSON() ([]byte, error) {
25146	objectMap := make(map[string]interface{})
25147	if sallr.Value != nil {
25148		objectMap["value"] = sallr.Value
25149	}
25150	return json.Marshal(objectMap)
25151}
25152
25153// ServiceDelegationPropertiesFormat properties of a service delegation.
25154type ServiceDelegationPropertiesFormat struct {
25155	// ServiceName - The name of the service to whom the subnet should be delegated (e.g. Microsoft.Sql/servers).
25156	ServiceName *string `json:"serviceName,omitempty"`
25157	// Actions - Describes the actions permitted to the service upon delegation.
25158	Actions *[]string `json:"actions,omitempty"`
25159	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
25160	ProvisioningState *string `json:"provisioningState,omitempty"`
25161}
25162
25163// MarshalJSON is the custom marshaler for ServiceDelegationPropertiesFormat.
25164func (sdpf ServiceDelegationPropertiesFormat) MarshalJSON() ([]byte, error) {
25165	objectMap := make(map[string]interface{})
25166	if sdpf.ServiceName != nil {
25167		objectMap["serviceName"] = sdpf.ServiceName
25168	}
25169	if sdpf.Actions != nil {
25170		objectMap["actions"] = sdpf.Actions
25171	}
25172	return json.Marshal(objectMap)
25173}
25174
25175// ServiceEndpointPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
25176// a long-running operation.
25177type ServiceEndpointPoliciesCreateOrUpdateFuture struct {
25178	azure.FutureAPI
25179	// Result returns the result of the asynchronous operation.
25180	// If the operation has not completed it will return an error.
25181	Result func(ServiceEndpointPoliciesClient) (ServiceEndpointPolicy, error)
25182}
25183
25184// ServiceEndpointPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a
25185// long-running operation.
25186type ServiceEndpointPoliciesDeleteFuture struct {
25187	azure.FutureAPI
25188	// Result returns the result of the asynchronous operation.
25189	// If the operation has not completed it will return an error.
25190	Result func(ServiceEndpointPoliciesClient) (autorest.Response, error)
25191}
25192
25193// ServiceEndpointPoliciesUpdateFuture an abstraction for monitoring and retrieving the results of a
25194// long-running operation.
25195type ServiceEndpointPoliciesUpdateFuture struct {
25196	azure.FutureAPI
25197	// Result returns the result of the asynchronous operation.
25198	// If the operation has not completed it will return an error.
25199	Result func(ServiceEndpointPoliciesClient) (ServiceEndpointPolicy, error)
25200}
25201
25202// ServiceEndpointPolicy service End point policy resource.
25203type ServiceEndpointPolicy struct {
25204	autorest.Response `json:"-"`
25205	// ServiceEndpointPolicyPropertiesFormat - Properties of the service end point policy.
25206	*ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"`
25207	// Etag - A unique read-only string that changes whenever the resource is updated.
25208	Etag *string `json:"etag,omitempty"`
25209	// ID - Resource ID.
25210	ID *string `json:"id,omitempty"`
25211	// Name - READ-ONLY; Resource name.
25212	Name *string `json:"name,omitempty"`
25213	// Type - READ-ONLY; Resource type.
25214	Type *string `json:"type,omitempty"`
25215	// Location - Resource location.
25216	Location *string `json:"location,omitempty"`
25217	// Tags - Resource tags.
25218	Tags map[string]*string `json:"tags"`
25219}
25220
25221// MarshalJSON is the custom marshaler for ServiceEndpointPolicy.
25222func (sep ServiceEndpointPolicy) MarshalJSON() ([]byte, error) {
25223	objectMap := make(map[string]interface{})
25224	if sep.ServiceEndpointPolicyPropertiesFormat != nil {
25225		objectMap["properties"] = sep.ServiceEndpointPolicyPropertiesFormat
25226	}
25227	if sep.Etag != nil {
25228		objectMap["etag"] = sep.Etag
25229	}
25230	if sep.ID != nil {
25231		objectMap["id"] = sep.ID
25232	}
25233	if sep.Location != nil {
25234		objectMap["location"] = sep.Location
25235	}
25236	if sep.Tags != nil {
25237		objectMap["tags"] = sep.Tags
25238	}
25239	return json.Marshal(objectMap)
25240}
25241
25242// UnmarshalJSON is the custom unmarshaler for ServiceEndpointPolicy struct.
25243func (sep *ServiceEndpointPolicy) UnmarshalJSON(body []byte) error {
25244	var m map[string]*json.RawMessage
25245	err := json.Unmarshal(body, &m)
25246	if err != nil {
25247		return err
25248	}
25249	for k, v := range m {
25250		switch k {
25251		case "properties":
25252			if v != nil {
25253				var serviceEndpointPolicyPropertiesFormat ServiceEndpointPolicyPropertiesFormat
25254				err = json.Unmarshal(*v, &serviceEndpointPolicyPropertiesFormat)
25255				if err != nil {
25256					return err
25257				}
25258				sep.ServiceEndpointPolicyPropertiesFormat = &serviceEndpointPolicyPropertiesFormat
25259			}
25260		case "etag":
25261			if v != nil {
25262				var etag string
25263				err = json.Unmarshal(*v, &etag)
25264				if err != nil {
25265					return err
25266				}
25267				sep.Etag = &etag
25268			}
25269		case "id":
25270			if v != nil {
25271				var ID string
25272				err = json.Unmarshal(*v, &ID)
25273				if err != nil {
25274					return err
25275				}
25276				sep.ID = &ID
25277			}
25278		case "name":
25279			if v != nil {
25280				var name string
25281				err = json.Unmarshal(*v, &name)
25282				if err != nil {
25283					return err
25284				}
25285				sep.Name = &name
25286			}
25287		case "type":
25288			if v != nil {
25289				var typeVar string
25290				err = json.Unmarshal(*v, &typeVar)
25291				if err != nil {
25292					return err
25293				}
25294				sep.Type = &typeVar
25295			}
25296		case "location":
25297			if v != nil {
25298				var location string
25299				err = json.Unmarshal(*v, &location)
25300				if err != nil {
25301					return err
25302				}
25303				sep.Location = &location
25304			}
25305		case "tags":
25306			if v != nil {
25307				var tags map[string]*string
25308				err = json.Unmarshal(*v, &tags)
25309				if err != nil {
25310					return err
25311				}
25312				sep.Tags = tags
25313			}
25314		}
25315	}
25316
25317	return nil
25318}
25319
25320// ServiceEndpointPolicyDefinition service Endpoint policy definitions.
25321type ServiceEndpointPolicyDefinition struct {
25322	autorest.Response `json:"-"`
25323	// ServiceEndpointPolicyDefinitionPropertiesFormat - Properties of the service endpoint policy definition.
25324	*ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"`
25325	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
25326	Name *string `json:"name,omitempty"`
25327	// Etag - A unique read-only string that changes whenever the resource is updated.
25328	Etag *string `json:"etag,omitempty"`
25329	// ID - Resource ID.
25330	ID *string `json:"id,omitempty"`
25331}
25332
25333// MarshalJSON is the custom marshaler for ServiceEndpointPolicyDefinition.
25334func (sepd ServiceEndpointPolicyDefinition) MarshalJSON() ([]byte, error) {
25335	objectMap := make(map[string]interface{})
25336	if sepd.ServiceEndpointPolicyDefinitionPropertiesFormat != nil {
25337		objectMap["properties"] = sepd.ServiceEndpointPolicyDefinitionPropertiesFormat
25338	}
25339	if sepd.Name != nil {
25340		objectMap["name"] = sepd.Name
25341	}
25342	if sepd.Etag != nil {
25343		objectMap["etag"] = sepd.Etag
25344	}
25345	if sepd.ID != nil {
25346		objectMap["id"] = sepd.ID
25347	}
25348	return json.Marshal(objectMap)
25349}
25350
25351// UnmarshalJSON is the custom unmarshaler for ServiceEndpointPolicyDefinition struct.
25352func (sepd *ServiceEndpointPolicyDefinition) UnmarshalJSON(body []byte) error {
25353	var m map[string]*json.RawMessage
25354	err := json.Unmarshal(body, &m)
25355	if err != nil {
25356		return err
25357	}
25358	for k, v := range m {
25359		switch k {
25360		case "properties":
25361			if v != nil {
25362				var serviceEndpointPolicyDefinitionPropertiesFormat ServiceEndpointPolicyDefinitionPropertiesFormat
25363				err = json.Unmarshal(*v, &serviceEndpointPolicyDefinitionPropertiesFormat)
25364				if err != nil {
25365					return err
25366				}
25367				sepd.ServiceEndpointPolicyDefinitionPropertiesFormat = &serviceEndpointPolicyDefinitionPropertiesFormat
25368			}
25369		case "name":
25370			if v != nil {
25371				var name string
25372				err = json.Unmarshal(*v, &name)
25373				if err != nil {
25374					return err
25375				}
25376				sepd.Name = &name
25377			}
25378		case "etag":
25379			if v != nil {
25380				var etag string
25381				err = json.Unmarshal(*v, &etag)
25382				if err != nil {
25383					return err
25384				}
25385				sepd.Etag = &etag
25386			}
25387		case "id":
25388			if v != nil {
25389				var ID string
25390				err = json.Unmarshal(*v, &ID)
25391				if err != nil {
25392					return err
25393				}
25394				sepd.ID = &ID
25395			}
25396		}
25397	}
25398
25399	return nil
25400}
25401
25402// ServiceEndpointPolicyDefinitionListResult response for ListServiceEndpointPolicyDefinition API service
25403// call. Retrieves all service endpoint policy definition that belongs to a service endpoint policy.
25404type ServiceEndpointPolicyDefinitionListResult struct {
25405	autorest.Response `json:"-"`
25406	// Value - The service endpoint policy definition in a service endpoint policy.
25407	Value *[]ServiceEndpointPolicyDefinition `json:"value,omitempty"`
25408	// NextLink - The URL to get the next set of results.
25409	NextLink *string `json:"nextLink,omitempty"`
25410}
25411
25412// ServiceEndpointPolicyDefinitionListResultIterator provides access to a complete listing of
25413// ServiceEndpointPolicyDefinition values.
25414type ServiceEndpointPolicyDefinitionListResultIterator struct {
25415	i    int
25416	page ServiceEndpointPolicyDefinitionListResultPage
25417}
25418
25419// NextWithContext advances to the next value.  If there was an error making
25420// the request the iterator does not advance and the error is returned.
25421func (iter *ServiceEndpointPolicyDefinitionListResultIterator) NextWithContext(ctx context.Context) (err error) {
25422	if tracing.IsEnabled() {
25423		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyDefinitionListResultIterator.NextWithContext")
25424		defer func() {
25425			sc := -1
25426			if iter.Response().Response.Response != nil {
25427				sc = iter.Response().Response.Response.StatusCode
25428			}
25429			tracing.EndSpan(ctx, sc, err)
25430		}()
25431	}
25432	iter.i++
25433	if iter.i < len(iter.page.Values()) {
25434		return nil
25435	}
25436	err = iter.page.NextWithContext(ctx)
25437	if err != nil {
25438		iter.i--
25439		return err
25440	}
25441	iter.i = 0
25442	return nil
25443}
25444
25445// Next advances to the next value.  If there was an error making
25446// the request the iterator does not advance and the error is returned.
25447// Deprecated: Use NextWithContext() instead.
25448func (iter *ServiceEndpointPolicyDefinitionListResultIterator) Next() error {
25449	return iter.NextWithContext(context.Background())
25450}
25451
25452// NotDone returns true if the enumeration should be started or is not yet complete.
25453func (iter ServiceEndpointPolicyDefinitionListResultIterator) NotDone() bool {
25454	return iter.page.NotDone() && iter.i < len(iter.page.Values())
25455}
25456
25457// Response returns the raw server response from the last page request.
25458func (iter ServiceEndpointPolicyDefinitionListResultIterator) Response() ServiceEndpointPolicyDefinitionListResult {
25459	return iter.page.Response()
25460}
25461
25462// Value returns the current value or a zero-initialized value if the
25463// iterator has advanced beyond the end of the collection.
25464func (iter ServiceEndpointPolicyDefinitionListResultIterator) Value() ServiceEndpointPolicyDefinition {
25465	if !iter.page.NotDone() {
25466		return ServiceEndpointPolicyDefinition{}
25467	}
25468	return iter.page.Values()[iter.i]
25469}
25470
25471// Creates a new instance of the ServiceEndpointPolicyDefinitionListResultIterator type.
25472func NewServiceEndpointPolicyDefinitionListResultIterator(page ServiceEndpointPolicyDefinitionListResultPage) ServiceEndpointPolicyDefinitionListResultIterator {
25473	return ServiceEndpointPolicyDefinitionListResultIterator{page: page}
25474}
25475
25476// IsEmpty returns true if the ListResult contains no values.
25477func (sepdlr ServiceEndpointPolicyDefinitionListResult) IsEmpty() bool {
25478	return sepdlr.Value == nil || len(*sepdlr.Value) == 0
25479}
25480
25481// hasNextLink returns true if the NextLink is not empty.
25482func (sepdlr ServiceEndpointPolicyDefinitionListResult) hasNextLink() bool {
25483	return sepdlr.NextLink != nil && len(*sepdlr.NextLink) != 0
25484}
25485
25486// serviceEndpointPolicyDefinitionListResultPreparer prepares a request to retrieve the next set of results.
25487// It returns nil if no more results exist.
25488func (sepdlr ServiceEndpointPolicyDefinitionListResult) serviceEndpointPolicyDefinitionListResultPreparer(ctx context.Context) (*http.Request, error) {
25489	if !sepdlr.hasNextLink() {
25490		return nil, nil
25491	}
25492	return autorest.Prepare((&http.Request{}).WithContext(ctx),
25493		autorest.AsJSON(),
25494		autorest.AsGet(),
25495		autorest.WithBaseURL(to.String(sepdlr.NextLink)))
25496}
25497
25498// ServiceEndpointPolicyDefinitionListResultPage contains a page of ServiceEndpointPolicyDefinition values.
25499type ServiceEndpointPolicyDefinitionListResultPage struct {
25500	fn     func(context.Context, ServiceEndpointPolicyDefinitionListResult) (ServiceEndpointPolicyDefinitionListResult, error)
25501	sepdlr ServiceEndpointPolicyDefinitionListResult
25502}
25503
25504// NextWithContext advances to the next page of values.  If there was an error making
25505// the request the page does not advance and the error is returned.
25506func (page *ServiceEndpointPolicyDefinitionListResultPage) NextWithContext(ctx context.Context) (err error) {
25507	if tracing.IsEnabled() {
25508		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyDefinitionListResultPage.NextWithContext")
25509		defer func() {
25510			sc := -1
25511			if page.Response().Response.Response != nil {
25512				sc = page.Response().Response.Response.StatusCode
25513			}
25514			tracing.EndSpan(ctx, sc, err)
25515		}()
25516	}
25517	for {
25518		next, err := page.fn(ctx, page.sepdlr)
25519		if err != nil {
25520			return err
25521		}
25522		page.sepdlr = next
25523		if !next.hasNextLink() || !next.IsEmpty() {
25524			break
25525		}
25526	}
25527	return nil
25528}
25529
25530// Next advances to the next page of values.  If there was an error making
25531// the request the page does not advance and the error is returned.
25532// Deprecated: Use NextWithContext() instead.
25533func (page *ServiceEndpointPolicyDefinitionListResultPage) Next() error {
25534	return page.NextWithContext(context.Background())
25535}
25536
25537// NotDone returns true if the page enumeration should be started or is not yet complete.
25538func (page ServiceEndpointPolicyDefinitionListResultPage) NotDone() bool {
25539	return !page.sepdlr.IsEmpty()
25540}
25541
25542// Response returns the raw server response from the last page request.
25543func (page ServiceEndpointPolicyDefinitionListResultPage) Response() ServiceEndpointPolicyDefinitionListResult {
25544	return page.sepdlr
25545}
25546
25547// Values returns the slice of values for the current page or nil if there are no values.
25548func (page ServiceEndpointPolicyDefinitionListResultPage) Values() []ServiceEndpointPolicyDefinition {
25549	if page.sepdlr.IsEmpty() {
25550		return nil
25551	}
25552	return *page.sepdlr.Value
25553}
25554
25555// Creates a new instance of the ServiceEndpointPolicyDefinitionListResultPage type.
25556func NewServiceEndpointPolicyDefinitionListResultPage(cur ServiceEndpointPolicyDefinitionListResult, getNextPage func(context.Context, ServiceEndpointPolicyDefinitionListResult) (ServiceEndpointPolicyDefinitionListResult, error)) ServiceEndpointPolicyDefinitionListResultPage {
25557	return ServiceEndpointPolicyDefinitionListResultPage{
25558		fn:     getNextPage,
25559		sepdlr: cur,
25560	}
25561}
25562
25563// ServiceEndpointPolicyDefinitionPropertiesFormat service Endpoint policy definition resource.
25564type ServiceEndpointPolicyDefinitionPropertiesFormat struct {
25565	// Description - A description for this rule. Restricted to 140 chars.
25566	Description *string `json:"description,omitempty"`
25567	// Service - Service endpoint name.
25568	Service *string `json:"service,omitempty"`
25569	// ServiceResources - A list of service resources.
25570	ServiceResources *[]string `json:"serviceResources,omitempty"`
25571	// ProvisioningState - READ-ONLY; The provisioning state of the service end point policy definition. Possible values are: 'Updating', 'Deleting', and 'Failed'.
25572	ProvisioningState *string `json:"provisioningState,omitempty"`
25573}
25574
25575// MarshalJSON is the custom marshaler for ServiceEndpointPolicyDefinitionPropertiesFormat.
25576func (sepdpf ServiceEndpointPolicyDefinitionPropertiesFormat) MarshalJSON() ([]byte, error) {
25577	objectMap := make(map[string]interface{})
25578	if sepdpf.Description != nil {
25579		objectMap["description"] = sepdpf.Description
25580	}
25581	if sepdpf.Service != nil {
25582		objectMap["service"] = sepdpf.Service
25583	}
25584	if sepdpf.ServiceResources != nil {
25585		objectMap["serviceResources"] = sepdpf.ServiceResources
25586	}
25587	return json.Marshal(objectMap)
25588}
25589
25590// ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
25591// results of a long-running operation.
25592type ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture struct {
25593	azure.FutureAPI
25594	// Result returns the result of the asynchronous operation.
25595	// If the operation has not completed it will return an error.
25596	Result func(ServiceEndpointPolicyDefinitionsClient) (ServiceEndpointPolicyDefinition, error)
25597}
25598
25599// ServiceEndpointPolicyDefinitionsDeleteFuture an abstraction for monitoring and retrieving the results of
25600// a long-running operation.
25601type ServiceEndpointPolicyDefinitionsDeleteFuture struct {
25602	azure.FutureAPI
25603	// Result returns the result of the asynchronous operation.
25604	// If the operation has not completed it will return an error.
25605	Result func(ServiceEndpointPolicyDefinitionsClient) (autorest.Response, error)
25606}
25607
25608// ServiceEndpointPolicyListResult response for ListServiceEndpointPolicies API service call.
25609type ServiceEndpointPolicyListResult struct {
25610	autorest.Response `json:"-"`
25611	// Value - A list of ServiceEndpointPolicy resources.
25612	Value *[]ServiceEndpointPolicy `json:"value,omitempty"`
25613	// NextLink - READ-ONLY; The URL to get the next set of results.
25614	NextLink *string `json:"nextLink,omitempty"`
25615}
25616
25617// MarshalJSON is the custom marshaler for ServiceEndpointPolicyListResult.
25618func (seplr ServiceEndpointPolicyListResult) MarshalJSON() ([]byte, error) {
25619	objectMap := make(map[string]interface{})
25620	if seplr.Value != nil {
25621		objectMap["value"] = seplr.Value
25622	}
25623	return json.Marshal(objectMap)
25624}
25625
25626// ServiceEndpointPolicyListResultIterator provides access to a complete listing of ServiceEndpointPolicy
25627// values.
25628type ServiceEndpointPolicyListResultIterator struct {
25629	i    int
25630	page ServiceEndpointPolicyListResultPage
25631}
25632
25633// NextWithContext advances to the next value.  If there was an error making
25634// the request the iterator does not advance and the error is returned.
25635func (iter *ServiceEndpointPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) {
25636	if tracing.IsEnabled() {
25637		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyListResultIterator.NextWithContext")
25638		defer func() {
25639			sc := -1
25640			if iter.Response().Response.Response != nil {
25641				sc = iter.Response().Response.Response.StatusCode
25642			}
25643			tracing.EndSpan(ctx, sc, err)
25644		}()
25645	}
25646	iter.i++
25647	if iter.i < len(iter.page.Values()) {
25648		return nil
25649	}
25650	err = iter.page.NextWithContext(ctx)
25651	if err != nil {
25652		iter.i--
25653		return err
25654	}
25655	iter.i = 0
25656	return nil
25657}
25658
25659// Next advances to the next value.  If there was an error making
25660// the request the iterator does not advance and the error is returned.
25661// Deprecated: Use NextWithContext() instead.
25662func (iter *ServiceEndpointPolicyListResultIterator) Next() error {
25663	return iter.NextWithContext(context.Background())
25664}
25665
25666// NotDone returns true if the enumeration should be started or is not yet complete.
25667func (iter ServiceEndpointPolicyListResultIterator) NotDone() bool {
25668	return iter.page.NotDone() && iter.i < len(iter.page.Values())
25669}
25670
25671// Response returns the raw server response from the last page request.
25672func (iter ServiceEndpointPolicyListResultIterator) Response() ServiceEndpointPolicyListResult {
25673	return iter.page.Response()
25674}
25675
25676// Value returns the current value or a zero-initialized value if the
25677// iterator has advanced beyond the end of the collection.
25678func (iter ServiceEndpointPolicyListResultIterator) Value() ServiceEndpointPolicy {
25679	if !iter.page.NotDone() {
25680		return ServiceEndpointPolicy{}
25681	}
25682	return iter.page.Values()[iter.i]
25683}
25684
25685// Creates a new instance of the ServiceEndpointPolicyListResultIterator type.
25686func NewServiceEndpointPolicyListResultIterator(page ServiceEndpointPolicyListResultPage) ServiceEndpointPolicyListResultIterator {
25687	return ServiceEndpointPolicyListResultIterator{page: page}
25688}
25689
25690// IsEmpty returns true if the ListResult contains no values.
25691func (seplr ServiceEndpointPolicyListResult) IsEmpty() bool {
25692	return seplr.Value == nil || len(*seplr.Value) == 0
25693}
25694
25695// hasNextLink returns true if the NextLink is not empty.
25696func (seplr ServiceEndpointPolicyListResult) hasNextLink() bool {
25697	return seplr.NextLink != nil && len(*seplr.NextLink) != 0
25698}
25699
25700// serviceEndpointPolicyListResultPreparer prepares a request to retrieve the next set of results.
25701// It returns nil if no more results exist.
25702func (seplr ServiceEndpointPolicyListResult) serviceEndpointPolicyListResultPreparer(ctx context.Context) (*http.Request, error) {
25703	if !seplr.hasNextLink() {
25704		return nil, nil
25705	}
25706	return autorest.Prepare((&http.Request{}).WithContext(ctx),
25707		autorest.AsJSON(),
25708		autorest.AsGet(),
25709		autorest.WithBaseURL(to.String(seplr.NextLink)))
25710}
25711
25712// ServiceEndpointPolicyListResultPage contains a page of ServiceEndpointPolicy values.
25713type ServiceEndpointPolicyListResultPage struct {
25714	fn    func(context.Context, ServiceEndpointPolicyListResult) (ServiceEndpointPolicyListResult, error)
25715	seplr ServiceEndpointPolicyListResult
25716}
25717
25718// NextWithContext advances to the next page of values.  If there was an error making
25719// the request the page does not advance and the error is returned.
25720func (page *ServiceEndpointPolicyListResultPage) NextWithContext(ctx context.Context) (err error) {
25721	if tracing.IsEnabled() {
25722		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyListResultPage.NextWithContext")
25723		defer func() {
25724			sc := -1
25725			if page.Response().Response.Response != nil {
25726				sc = page.Response().Response.Response.StatusCode
25727			}
25728			tracing.EndSpan(ctx, sc, err)
25729		}()
25730	}
25731	for {
25732		next, err := page.fn(ctx, page.seplr)
25733		if err != nil {
25734			return err
25735		}
25736		page.seplr = next
25737		if !next.hasNextLink() || !next.IsEmpty() {
25738			break
25739		}
25740	}
25741	return nil
25742}
25743
25744// Next advances to the next page of values.  If there was an error making
25745// the request the page does not advance and the error is returned.
25746// Deprecated: Use NextWithContext() instead.
25747func (page *ServiceEndpointPolicyListResultPage) Next() error {
25748	return page.NextWithContext(context.Background())
25749}
25750
25751// NotDone returns true if the page enumeration should be started or is not yet complete.
25752func (page ServiceEndpointPolicyListResultPage) NotDone() bool {
25753	return !page.seplr.IsEmpty()
25754}
25755
25756// Response returns the raw server response from the last page request.
25757func (page ServiceEndpointPolicyListResultPage) Response() ServiceEndpointPolicyListResult {
25758	return page.seplr
25759}
25760
25761// Values returns the slice of values for the current page or nil if there are no values.
25762func (page ServiceEndpointPolicyListResultPage) Values() []ServiceEndpointPolicy {
25763	if page.seplr.IsEmpty() {
25764		return nil
25765	}
25766	return *page.seplr.Value
25767}
25768
25769// Creates a new instance of the ServiceEndpointPolicyListResultPage type.
25770func NewServiceEndpointPolicyListResultPage(cur ServiceEndpointPolicyListResult, getNextPage func(context.Context, ServiceEndpointPolicyListResult) (ServiceEndpointPolicyListResult, error)) ServiceEndpointPolicyListResultPage {
25771	return ServiceEndpointPolicyListResultPage{
25772		fn:    getNextPage,
25773		seplr: cur,
25774	}
25775}
25776
25777// ServiceEndpointPolicyPropertiesFormat service Endpoint Policy resource.
25778type ServiceEndpointPolicyPropertiesFormat struct {
25779	// ServiceEndpointPolicyDefinitions - A collection of service endpoint policy definitions of the service endpoint policy.
25780	ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"`
25781	// Subnets - READ-ONLY; A collection of references to subnets.
25782	Subnets *[]Subnet `json:"subnets,omitempty"`
25783	// ResourceGUID - READ-ONLY; The resource GUID property of the service endpoint policy resource.
25784	ResourceGUID *string `json:"resourceGuid,omitempty"`
25785	// ProvisioningState - READ-ONLY; The provisioning state of the service endpoint policy. Possible values are: 'Updating', 'Deleting', and 'Failed'.
25786	ProvisioningState *string `json:"provisioningState,omitempty"`
25787}
25788
25789// MarshalJSON is the custom marshaler for ServiceEndpointPolicyPropertiesFormat.
25790func (seppf ServiceEndpointPolicyPropertiesFormat) MarshalJSON() ([]byte, error) {
25791	objectMap := make(map[string]interface{})
25792	if seppf.ServiceEndpointPolicyDefinitions != nil {
25793		objectMap["serviceEndpointPolicyDefinitions"] = seppf.ServiceEndpointPolicyDefinitions
25794	}
25795	return json.Marshal(objectMap)
25796}
25797
25798// ServiceEndpointPropertiesFormat the service endpoint properties.
25799type ServiceEndpointPropertiesFormat struct {
25800	// Service - The type of the endpoint service.
25801	Service *string `json:"service,omitempty"`
25802	// Locations - A list of locations.
25803	Locations *[]string `json:"locations,omitempty"`
25804	// ProvisioningState - The provisioning state of the resource.
25805	ProvisioningState *string `json:"provisioningState,omitempty"`
25806}
25807
25808// ServiceTagInformation the service tag information.
25809type ServiceTagInformation struct {
25810	// Properties - READ-ONLY; Properties of the service tag information.
25811	Properties *ServiceTagInformationPropertiesFormat `json:"properties,omitempty"`
25812	// Name - READ-ONLY; The name of service tag.
25813	Name *string `json:"name,omitempty"`
25814	// ID - READ-ONLY; The ID of service tag.
25815	ID *string `json:"id,omitempty"`
25816}
25817
25818// ServiceTagInformationPropertiesFormat properties of the service tag information.
25819type ServiceTagInformationPropertiesFormat struct {
25820	// ChangeNumber - READ-ONLY; The iteration number of service tag.
25821	ChangeNumber *string `json:"changeNumber,omitempty"`
25822	// Region - READ-ONLY; The region of service tag.
25823	Region *string `json:"region,omitempty"`
25824	// SystemService - READ-ONLY; The name of system service.
25825	SystemService *string `json:"systemService,omitempty"`
25826	// AddressPrefixes - READ-ONLY; The list of IP address prefixes.
25827	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
25828}
25829
25830// ServiceTagsListResult response for the ListServiceTags API service call.
25831type ServiceTagsListResult struct {
25832	autorest.Response `json:"-"`
25833	// Name - READ-ONLY; The name of the cloud.
25834	Name *string `json:"name,omitempty"`
25835	// ID - READ-ONLY; The ID of the cloud.
25836	ID *string `json:"id,omitempty"`
25837	// Type - READ-ONLY; The azure resource type.
25838	Type *string `json:"type,omitempty"`
25839	// ChangeNumber - READ-ONLY; The iteration number.
25840	ChangeNumber *string `json:"changeNumber,omitempty"`
25841	// Cloud - READ-ONLY; The name of the cloud.
25842	Cloud *string `json:"cloud,omitempty"`
25843	// Values - READ-ONLY; The list of service tag information resources.
25844	Values *[]ServiceTagInformation `json:"values,omitempty"`
25845}
25846
25847// String ...
25848type String struct {
25849	autorest.Response `json:"-"`
25850	Value             *string `json:"value,omitempty"`
25851}
25852
25853// Subnet subnet in a virtual network resource.
25854type Subnet struct {
25855	autorest.Response `json:"-"`
25856	// SubnetPropertiesFormat - Properties of the subnet.
25857	*SubnetPropertiesFormat `json:"properties,omitempty"`
25858	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
25859	Name *string `json:"name,omitempty"`
25860	// Etag - A unique read-only string that changes whenever the resource is updated.
25861	Etag *string `json:"etag,omitempty"`
25862	// ID - Resource ID.
25863	ID *string `json:"id,omitempty"`
25864}
25865
25866// MarshalJSON is the custom marshaler for Subnet.
25867func (s Subnet) MarshalJSON() ([]byte, error) {
25868	objectMap := make(map[string]interface{})
25869	if s.SubnetPropertiesFormat != nil {
25870		objectMap["properties"] = s.SubnetPropertiesFormat
25871	}
25872	if s.Name != nil {
25873		objectMap["name"] = s.Name
25874	}
25875	if s.Etag != nil {
25876		objectMap["etag"] = s.Etag
25877	}
25878	if s.ID != nil {
25879		objectMap["id"] = s.ID
25880	}
25881	return json.Marshal(objectMap)
25882}
25883
25884// UnmarshalJSON is the custom unmarshaler for Subnet struct.
25885func (s *Subnet) UnmarshalJSON(body []byte) error {
25886	var m map[string]*json.RawMessage
25887	err := json.Unmarshal(body, &m)
25888	if err != nil {
25889		return err
25890	}
25891	for k, v := range m {
25892		switch k {
25893		case "properties":
25894			if v != nil {
25895				var subnetPropertiesFormat SubnetPropertiesFormat
25896				err = json.Unmarshal(*v, &subnetPropertiesFormat)
25897				if err != nil {
25898					return err
25899				}
25900				s.SubnetPropertiesFormat = &subnetPropertiesFormat
25901			}
25902		case "name":
25903			if v != nil {
25904				var name string
25905				err = json.Unmarshal(*v, &name)
25906				if err != nil {
25907					return err
25908				}
25909				s.Name = &name
25910			}
25911		case "etag":
25912			if v != nil {
25913				var etag string
25914				err = json.Unmarshal(*v, &etag)
25915				if err != nil {
25916					return err
25917				}
25918				s.Etag = &etag
25919			}
25920		case "id":
25921			if v != nil {
25922				var ID string
25923				err = json.Unmarshal(*v, &ID)
25924				if err != nil {
25925					return err
25926				}
25927				s.ID = &ID
25928			}
25929		}
25930	}
25931
25932	return nil
25933}
25934
25935// SubnetAssociation subnet and it's custom security rules.
25936type SubnetAssociation struct {
25937	// ID - READ-ONLY; Subnet ID.
25938	ID *string `json:"id,omitempty"`
25939	// SecurityRules - Collection of custom security rules.
25940	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
25941}
25942
25943// MarshalJSON is the custom marshaler for SubnetAssociation.
25944func (sa SubnetAssociation) MarshalJSON() ([]byte, error) {
25945	objectMap := make(map[string]interface{})
25946	if sa.SecurityRules != nil {
25947		objectMap["securityRules"] = sa.SecurityRules
25948	}
25949	return json.Marshal(objectMap)
25950}
25951
25952// SubnetListResult response for ListSubnets API service callRetrieves all subnet that belongs to a virtual
25953// network.
25954type SubnetListResult struct {
25955	autorest.Response `json:"-"`
25956	// Value - The subnets in a virtual network.
25957	Value *[]Subnet `json:"value,omitempty"`
25958	// NextLink - The URL to get the next set of results.
25959	NextLink *string `json:"nextLink,omitempty"`
25960}
25961
25962// SubnetListResultIterator provides access to a complete listing of Subnet values.
25963type SubnetListResultIterator struct {
25964	i    int
25965	page SubnetListResultPage
25966}
25967
25968// NextWithContext advances to the next value.  If there was an error making
25969// the request the iterator does not advance and the error is returned.
25970func (iter *SubnetListResultIterator) NextWithContext(ctx context.Context) (err error) {
25971	if tracing.IsEnabled() {
25972		ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultIterator.NextWithContext")
25973		defer func() {
25974			sc := -1
25975			if iter.Response().Response.Response != nil {
25976				sc = iter.Response().Response.Response.StatusCode
25977			}
25978			tracing.EndSpan(ctx, sc, err)
25979		}()
25980	}
25981	iter.i++
25982	if iter.i < len(iter.page.Values()) {
25983		return nil
25984	}
25985	err = iter.page.NextWithContext(ctx)
25986	if err != nil {
25987		iter.i--
25988		return err
25989	}
25990	iter.i = 0
25991	return nil
25992}
25993
25994// Next advances to the next value.  If there was an error making
25995// the request the iterator does not advance and the error is returned.
25996// Deprecated: Use NextWithContext() instead.
25997func (iter *SubnetListResultIterator) Next() error {
25998	return iter.NextWithContext(context.Background())
25999}
26000
26001// NotDone returns true if the enumeration should be started or is not yet complete.
26002func (iter SubnetListResultIterator) NotDone() bool {
26003	return iter.page.NotDone() && iter.i < len(iter.page.Values())
26004}
26005
26006// Response returns the raw server response from the last page request.
26007func (iter SubnetListResultIterator) Response() SubnetListResult {
26008	return iter.page.Response()
26009}
26010
26011// Value returns the current value or a zero-initialized value if the
26012// iterator has advanced beyond the end of the collection.
26013func (iter SubnetListResultIterator) Value() Subnet {
26014	if !iter.page.NotDone() {
26015		return Subnet{}
26016	}
26017	return iter.page.Values()[iter.i]
26018}
26019
26020// Creates a new instance of the SubnetListResultIterator type.
26021func NewSubnetListResultIterator(page SubnetListResultPage) SubnetListResultIterator {
26022	return SubnetListResultIterator{page: page}
26023}
26024
26025// IsEmpty returns true if the ListResult contains no values.
26026func (slr SubnetListResult) IsEmpty() bool {
26027	return slr.Value == nil || len(*slr.Value) == 0
26028}
26029
26030// hasNextLink returns true if the NextLink is not empty.
26031func (slr SubnetListResult) hasNextLink() bool {
26032	return slr.NextLink != nil && len(*slr.NextLink) != 0
26033}
26034
26035// subnetListResultPreparer prepares a request to retrieve the next set of results.
26036// It returns nil if no more results exist.
26037func (slr SubnetListResult) subnetListResultPreparer(ctx context.Context) (*http.Request, error) {
26038	if !slr.hasNextLink() {
26039		return nil, nil
26040	}
26041	return autorest.Prepare((&http.Request{}).WithContext(ctx),
26042		autorest.AsJSON(),
26043		autorest.AsGet(),
26044		autorest.WithBaseURL(to.String(slr.NextLink)))
26045}
26046
26047// SubnetListResultPage contains a page of Subnet values.
26048type SubnetListResultPage struct {
26049	fn  func(context.Context, SubnetListResult) (SubnetListResult, error)
26050	slr SubnetListResult
26051}
26052
26053// NextWithContext advances to the next page of values.  If there was an error making
26054// the request the page does not advance and the error is returned.
26055func (page *SubnetListResultPage) NextWithContext(ctx context.Context) (err error) {
26056	if tracing.IsEnabled() {
26057		ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultPage.NextWithContext")
26058		defer func() {
26059			sc := -1
26060			if page.Response().Response.Response != nil {
26061				sc = page.Response().Response.Response.StatusCode
26062			}
26063			tracing.EndSpan(ctx, sc, err)
26064		}()
26065	}
26066	for {
26067		next, err := page.fn(ctx, page.slr)
26068		if err != nil {
26069			return err
26070		}
26071		page.slr = next
26072		if !next.hasNextLink() || !next.IsEmpty() {
26073			break
26074		}
26075	}
26076	return nil
26077}
26078
26079// Next advances to the next page of values.  If there was an error making
26080// the request the page does not advance and the error is returned.
26081// Deprecated: Use NextWithContext() instead.
26082func (page *SubnetListResultPage) Next() error {
26083	return page.NextWithContext(context.Background())
26084}
26085
26086// NotDone returns true if the page enumeration should be started or is not yet complete.
26087func (page SubnetListResultPage) NotDone() bool {
26088	return !page.slr.IsEmpty()
26089}
26090
26091// Response returns the raw server response from the last page request.
26092func (page SubnetListResultPage) Response() SubnetListResult {
26093	return page.slr
26094}
26095
26096// Values returns the slice of values for the current page or nil if there are no values.
26097func (page SubnetListResultPage) Values() []Subnet {
26098	if page.slr.IsEmpty() {
26099		return nil
26100	}
26101	return *page.slr.Value
26102}
26103
26104// Creates a new instance of the SubnetListResultPage type.
26105func NewSubnetListResultPage(cur SubnetListResult, getNextPage func(context.Context, SubnetListResult) (SubnetListResult, error)) SubnetListResultPage {
26106	return SubnetListResultPage{
26107		fn:  getNextPage,
26108		slr: cur,
26109	}
26110}
26111
26112// SubnetPropertiesFormat properties of the subnet.
26113type SubnetPropertiesFormat struct {
26114	// AddressPrefix - The address prefix for the subnet.
26115	AddressPrefix *string `json:"addressPrefix,omitempty"`
26116	// AddressPrefixes - List of address prefixes for the subnet.
26117	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
26118	// NetworkSecurityGroup - The reference of the NetworkSecurityGroup resource.
26119	NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"`
26120	// RouteTable - The reference of the RouteTable resource.
26121	RouteTable *RouteTable `json:"routeTable,omitempty"`
26122	// NatGateway - Nat gateway associated with this subnet.
26123	NatGateway *SubResource `json:"natGateway,omitempty"`
26124	// ServiceEndpoints - An array of service endpoints.
26125	ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"`
26126	// ServiceEndpointPolicies - An array of service endpoint policies.
26127	ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"`
26128	// PrivateEndpoints - READ-ONLY; An array of references to private endpoints.
26129	PrivateEndpoints *[]PrivateEndpoint `json:"privateEndpoints,omitempty"`
26130	// IPConfigurations - READ-ONLY; Gets an array of references to the network interface IP configurations using subnet.
26131	IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"`
26132	// IPConfigurationProfiles - READ-ONLY; Array of IP configuration profiles which reference this subnet.
26133	IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"`
26134	// ResourceNavigationLinks - Gets an array of references to the external resources using subnet.
26135	ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"`
26136	// ServiceAssociationLinks - Gets an array of references to services injecting into this subnet.
26137	ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"`
26138	// Delegations - Gets an array of references to the delegations on the subnet.
26139	Delegations *[]Delegation `json:"delegations,omitempty"`
26140	// Purpose - READ-ONLY; A read-only string identifying the intention of use for this subnet based on delegations and other user-defined properties.
26141	Purpose *string `json:"purpose,omitempty"`
26142	// ProvisioningState - The provisioning state of the resource.
26143	ProvisioningState *string `json:"provisioningState,omitempty"`
26144	// PrivateEndpointNetworkPolicies - Enable or Disable apply network policies on private end point in the subnet.
26145	PrivateEndpointNetworkPolicies *string `json:"privateEndpointNetworkPolicies,omitempty"`
26146	// PrivateLinkServiceNetworkPolicies - Enable or Disable apply network policies on private link service in the subnet.
26147	PrivateLinkServiceNetworkPolicies *string `json:"privateLinkServiceNetworkPolicies,omitempty"`
26148}
26149
26150// MarshalJSON is the custom marshaler for SubnetPropertiesFormat.
26151func (spf SubnetPropertiesFormat) MarshalJSON() ([]byte, error) {
26152	objectMap := make(map[string]interface{})
26153	if spf.AddressPrefix != nil {
26154		objectMap["addressPrefix"] = spf.AddressPrefix
26155	}
26156	if spf.AddressPrefixes != nil {
26157		objectMap["addressPrefixes"] = spf.AddressPrefixes
26158	}
26159	if spf.NetworkSecurityGroup != nil {
26160		objectMap["networkSecurityGroup"] = spf.NetworkSecurityGroup
26161	}
26162	if spf.RouteTable != nil {
26163		objectMap["routeTable"] = spf.RouteTable
26164	}
26165	if spf.NatGateway != nil {
26166		objectMap["natGateway"] = spf.NatGateway
26167	}
26168	if spf.ServiceEndpoints != nil {
26169		objectMap["serviceEndpoints"] = spf.ServiceEndpoints
26170	}
26171	if spf.ServiceEndpointPolicies != nil {
26172		objectMap["serviceEndpointPolicies"] = spf.ServiceEndpointPolicies
26173	}
26174	if spf.ResourceNavigationLinks != nil {
26175		objectMap["resourceNavigationLinks"] = spf.ResourceNavigationLinks
26176	}
26177	if spf.ServiceAssociationLinks != nil {
26178		objectMap["serviceAssociationLinks"] = spf.ServiceAssociationLinks
26179	}
26180	if spf.Delegations != nil {
26181		objectMap["delegations"] = spf.Delegations
26182	}
26183	if spf.ProvisioningState != nil {
26184		objectMap["provisioningState"] = spf.ProvisioningState
26185	}
26186	if spf.PrivateEndpointNetworkPolicies != nil {
26187		objectMap["privateEndpointNetworkPolicies"] = spf.PrivateEndpointNetworkPolicies
26188	}
26189	if spf.PrivateLinkServiceNetworkPolicies != nil {
26190		objectMap["privateLinkServiceNetworkPolicies"] = spf.PrivateLinkServiceNetworkPolicies
26191	}
26192	return json.Marshal(objectMap)
26193}
26194
26195// SubnetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
26196// operation.
26197type SubnetsCreateOrUpdateFuture struct {
26198	azure.FutureAPI
26199	// Result returns the result of the asynchronous operation.
26200	// If the operation has not completed it will return an error.
26201	Result func(SubnetsClient) (Subnet, error)
26202}
26203
26204// SubnetsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
26205// operation.
26206type SubnetsDeleteFuture struct {
26207	azure.FutureAPI
26208	// Result returns the result of the asynchronous operation.
26209	// If the operation has not completed it will return an error.
26210	Result func(SubnetsClient) (autorest.Response, error)
26211}
26212
26213// SubnetsPrepareNetworkPoliciesFuture an abstraction for monitoring and retrieving the results of a
26214// long-running operation.
26215type SubnetsPrepareNetworkPoliciesFuture struct {
26216	azure.FutureAPI
26217	// Result returns the result of the asynchronous operation.
26218	// If the operation has not completed it will return an error.
26219	Result func(SubnetsClient) (autorest.Response, error)
26220}
26221
26222// SubnetsUnprepareNetworkPoliciesFuture an abstraction for monitoring and retrieving the results of a
26223// long-running operation.
26224type SubnetsUnprepareNetworkPoliciesFuture struct {
26225	azure.FutureAPI
26226	// Result returns the result of the asynchronous operation.
26227	// If the operation has not completed it will return an error.
26228	Result func(SubnetsClient) (autorest.Response, error)
26229}
26230
26231// SubResource reference to another subresource.
26232type SubResource struct {
26233	// ID - Resource ID.
26234	ID *string `json:"id,omitempty"`
26235}
26236
26237// TagsObject tags object for patch operations.
26238type TagsObject struct {
26239	// Tags - Resource tags.
26240	Tags map[string]*string `json:"tags"`
26241}
26242
26243// MarshalJSON is the custom marshaler for TagsObject.
26244func (toVar TagsObject) MarshalJSON() ([]byte, error) {
26245	objectMap := make(map[string]interface{})
26246	if toVar.Tags != nil {
26247		objectMap["tags"] = toVar.Tags
26248	}
26249	return json.Marshal(objectMap)
26250}
26251
26252// Topology topology of the specified resource group.
26253type Topology struct {
26254	autorest.Response `json:"-"`
26255	// ID - READ-ONLY; GUID representing the operation id.
26256	ID *string `json:"id,omitempty"`
26257	// CreatedDateTime - READ-ONLY; The datetime when the topology was initially created for the resource group.
26258	CreatedDateTime *date.Time `json:"createdDateTime,omitempty"`
26259	// LastModified - READ-ONLY; The datetime when the topology was last modified.
26260	LastModified *date.Time `json:"lastModified,omitempty"`
26261	// Resources - A list of topology resources.
26262	Resources *[]TopologyResource `json:"resources,omitempty"`
26263}
26264
26265// MarshalJSON is the custom marshaler for Topology.
26266func (t Topology) MarshalJSON() ([]byte, error) {
26267	objectMap := make(map[string]interface{})
26268	if t.Resources != nil {
26269		objectMap["resources"] = t.Resources
26270	}
26271	return json.Marshal(objectMap)
26272}
26273
26274// TopologyAssociation resources that have an association with the parent resource.
26275type TopologyAssociation struct {
26276	// Name - The name of the resource that is associated with the parent resource.
26277	Name *string `json:"name,omitempty"`
26278	// ResourceID - The ID of the resource that is associated with the parent resource.
26279	ResourceID *string `json:"resourceId,omitempty"`
26280	// AssociationType - The association type of the child resource to the parent resource. Possible values include: 'Associated', 'Contains'
26281	AssociationType AssociationType `json:"associationType,omitempty"`
26282}
26283
26284// TopologyParameters parameters that define the representation of topology.
26285type TopologyParameters struct {
26286	// TargetResourceGroupName - The name of the target resource group to perform topology on.
26287	TargetResourceGroupName *string `json:"targetResourceGroupName,omitempty"`
26288	// TargetVirtualNetwork - The reference of the Virtual Network resource.
26289	TargetVirtualNetwork *SubResource `json:"targetVirtualNetwork,omitempty"`
26290	// TargetSubnet - The reference of the Subnet resource.
26291	TargetSubnet *SubResource `json:"targetSubnet,omitempty"`
26292}
26293
26294// TopologyResource the network resource topology information for the given resource group.
26295type TopologyResource struct {
26296	// Name - Name of the resource.
26297	Name *string `json:"name,omitempty"`
26298	// ID - ID of the resource.
26299	ID *string `json:"id,omitempty"`
26300	// Location - Resource location.
26301	Location *string `json:"location,omitempty"`
26302	// Associations - Holds the associations the resource has with other resources in the resource group.
26303	Associations *[]TopologyAssociation `json:"associations,omitempty"`
26304}
26305
26306// TrafficAnalyticsConfigurationProperties parameters that define the configuration of traffic analytics.
26307type TrafficAnalyticsConfigurationProperties struct {
26308	// Enabled - Flag to enable/disable traffic analytics.
26309	Enabled *bool `json:"enabled,omitempty"`
26310	// WorkspaceID - The resource guid of the attached workspace.
26311	WorkspaceID *string `json:"workspaceId,omitempty"`
26312	// WorkspaceRegion - The location of the attached workspace.
26313	WorkspaceRegion *string `json:"workspaceRegion,omitempty"`
26314	// WorkspaceResourceID - Resource Id of the attached workspace.
26315	WorkspaceResourceID *string `json:"workspaceResourceId,omitempty"`
26316	// TrafficAnalyticsInterval - The interval in minutes which would decide how frequently TA service should do flow analytics.
26317	TrafficAnalyticsInterval *int32 `json:"trafficAnalyticsInterval,omitempty"`
26318}
26319
26320// TrafficAnalyticsProperties parameters that define the configuration of traffic analytics.
26321type TrafficAnalyticsProperties struct {
26322	// NetworkWatcherFlowAnalyticsConfiguration - Parameters that define the configuration of traffic analytics.
26323	NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"`
26324}
26325
26326// TroubleshootingDetails information gained from troubleshooting of specified resource.
26327type TroubleshootingDetails struct {
26328	// ID - The id of the get troubleshoot operation.
26329	ID *string `json:"id,omitempty"`
26330	// ReasonType - Reason type of failure.
26331	ReasonType *string `json:"reasonType,omitempty"`
26332	// Summary - A summary of troubleshooting.
26333	Summary *string `json:"summary,omitempty"`
26334	// Detail - Details on troubleshooting results.
26335	Detail *string `json:"detail,omitempty"`
26336	// RecommendedActions - List of recommended actions.
26337	RecommendedActions *[]TroubleshootingRecommendedActions `json:"recommendedActions,omitempty"`
26338}
26339
26340// TroubleshootingParameters parameters that define the resource to troubleshoot.
26341type TroubleshootingParameters struct {
26342	// TargetResourceID - The target resource to troubleshoot.
26343	TargetResourceID *string `json:"targetResourceId,omitempty"`
26344	// TroubleshootingProperties - Properties of the troubleshooting resource.
26345	*TroubleshootingProperties `json:"properties,omitempty"`
26346}
26347
26348// MarshalJSON is the custom marshaler for TroubleshootingParameters.
26349func (tp TroubleshootingParameters) MarshalJSON() ([]byte, error) {
26350	objectMap := make(map[string]interface{})
26351	if tp.TargetResourceID != nil {
26352		objectMap["targetResourceId"] = tp.TargetResourceID
26353	}
26354	if tp.TroubleshootingProperties != nil {
26355		objectMap["properties"] = tp.TroubleshootingProperties
26356	}
26357	return json.Marshal(objectMap)
26358}
26359
26360// UnmarshalJSON is the custom unmarshaler for TroubleshootingParameters struct.
26361func (tp *TroubleshootingParameters) UnmarshalJSON(body []byte) error {
26362	var m map[string]*json.RawMessage
26363	err := json.Unmarshal(body, &m)
26364	if err != nil {
26365		return err
26366	}
26367	for k, v := range m {
26368		switch k {
26369		case "targetResourceId":
26370			if v != nil {
26371				var targetResourceID string
26372				err = json.Unmarshal(*v, &targetResourceID)
26373				if err != nil {
26374					return err
26375				}
26376				tp.TargetResourceID = &targetResourceID
26377			}
26378		case "properties":
26379			if v != nil {
26380				var troubleshootingProperties TroubleshootingProperties
26381				err = json.Unmarshal(*v, &troubleshootingProperties)
26382				if err != nil {
26383					return err
26384				}
26385				tp.TroubleshootingProperties = &troubleshootingProperties
26386			}
26387		}
26388	}
26389
26390	return nil
26391}
26392
26393// TroubleshootingProperties storage location provided for troubleshoot.
26394type TroubleshootingProperties struct {
26395	// StorageID - The ID for the storage account to save the troubleshoot result.
26396	StorageID *string `json:"storageId,omitempty"`
26397	// StoragePath - The path to the blob to save the troubleshoot result in.
26398	StoragePath *string `json:"storagePath,omitempty"`
26399}
26400
26401// TroubleshootingRecommendedActions recommended actions based on discovered issues.
26402type TroubleshootingRecommendedActions struct {
26403	// ActionID - ID of the recommended action.
26404	ActionID *string `json:"actionId,omitempty"`
26405	// ActionText - Description of recommended actions.
26406	ActionText *string `json:"actionText,omitempty"`
26407	// ActionURI - The uri linking to a documentation for the recommended troubleshooting actions.
26408	ActionURI *string `json:"actionUri,omitempty"`
26409	// ActionURIText - The information from the URI for the recommended troubleshooting actions.
26410	ActionURIText *string `json:"actionUriText,omitempty"`
26411}
26412
26413// TroubleshootingResult troubleshooting information gained from specified resource.
26414type TroubleshootingResult struct {
26415	autorest.Response `json:"-"`
26416	// StartTime - The start time of the troubleshooting.
26417	StartTime *date.Time `json:"startTime,omitempty"`
26418	// EndTime - The end time of the troubleshooting.
26419	EndTime *date.Time `json:"endTime,omitempty"`
26420	// Code - The result code of the troubleshooting.
26421	Code *string `json:"code,omitempty"`
26422	// Results - Information from troubleshooting.
26423	Results *[]TroubleshootingDetails `json:"results,omitempty"`
26424}
26425
26426// TunnelConnectionHealth virtualNetworkGatewayConnection properties.
26427type TunnelConnectionHealth struct {
26428	// Tunnel - READ-ONLY; Tunnel name.
26429	Tunnel *string `json:"tunnel,omitempty"`
26430	// ConnectionStatus - READ-ONLY; Virtual Network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
26431	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
26432	// IngressBytesTransferred - READ-ONLY; The Ingress Bytes Transferred in this connection.
26433	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
26434	// EgressBytesTransferred - READ-ONLY; The Egress Bytes Transferred in this connection.
26435	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
26436	// LastConnectionEstablishedUtcTime - READ-ONLY; The time at which connection was established in Utc format.
26437	LastConnectionEstablishedUtcTime *string `json:"lastConnectionEstablishedUtcTime,omitempty"`
26438}
26439
26440// UnprepareNetworkPoliciesRequest details of UnprepareNetworkPolicies for Subnet.
26441type UnprepareNetworkPoliciesRequest struct {
26442	// ServiceName - The name of the service for which subnet is being unprepared for.
26443	ServiceName *string `json:"serviceName,omitempty"`
26444}
26445
26446// Usage describes network resource usage.
26447type Usage struct {
26448	// ID - READ-ONLY; Resource identifier.
26449	ID *string `json:"id,omitempty"`
26450	// Unit - An enum describing the unit of measurement.
26451	Unit *string `json:"unit,omitempty"`
26452	// CurrentValue - The current value of the usage.
26453	CurrentValue *int64 `json:"currentValue,omitempty"`
26454	// Limit - The limit of usage.
26455	Limit *int64 `json:"limit,omitempty"`
26456	// Name - The name of the type of usage.
26457	Name *UsageName `json:"name,omitempty"`
26458}
26459
26460// MarshalJSON is the custom marshaler for Usage.
26461func (u Usage) MarshalJSON() ([]byte, error) {
26462	objectMap := make(map[string]interface{})
26463	if u.Unit != nil {
26464		objectMap["unit"] = u.Unit
26465	}
26466	if u.CurrentValue != nil {
26467		objectMap["currentValue"] = u.CurrentValue
26468	}
26469	if u.Limit != nil {
26470		objectMap["limit"] = u.Limit
26471	}
26472	if u.Name != nil {
26473		objectMap["name"] = u.Name
26474	}
26475	return json.Marshal(objectMap)
26476}
26477
26478// UsageName the usage names.
26479type UsageName struct {
26480	// Value - A string describing the resource name.
26481	Value *string `json:"value,omitempty"`
26482	// LocalizedValue - A localized string describing the resource name.
26483	LocalizedValue *string `json:"localizedValue,omitempty"`
26484}
26485
26486// UsagesListResult the list usages operation response.
26487type UsagesListResult struct {
26488	autorest.Response `json:"-"`
26489	// Value - The list network resource usages.
26490	Value *[]Usage `json:"value,omitempty"`
26491	// NextLink - URL to get the next set of results.
26492	NextLink *string `json:"nextLink,omitempty"`
26493}
26494
26495// UsagesListResultIterator provides access to a complete listing of Usage values.
26496type UsagesListResultIterator struct {
26497	i    int
26498	page UsagesListResultPage
26499}
26500
26501// NextWithContext advances to the next value.  If there was an error making
26502// the request the iterator does not advance and the error is returned.
26503func (iter *UsagesListResultIterator) NextWithContext(ctx context.Context) (err error) {
26504	if tracing.IsEnabled() {
26505		ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultIterator.NextWithContext")
26506		defer func() {
26507			sc := -1
26508			if iter.Response().Response.Response != nil {
26509				sc = iter.Response().Response.Response.StatusCode
26510			}
26511			tracing.EndSpan(ctx, sc, err)
26512		}()
26513	}
26514	iter.i++
26515	if iter.i < len(iter.page.Values()) {
26516		return nil
26517	}
26518	err = iter.page.NextWithContext(ctx)
26519	if err != nil {
26520		iter.i--
26521		return err
26522	}
26523	iter.i = 0
26524	return nil
26525}
26526
26527// Next advances to the next value.  If there was an error making
26528// the request the iterator does not advance and the error is returned.
26529// Deprecated: Use NextWithContext() instead.
26530func (iter *UsagesListResultIterator) Next() error {
26531	return iter.NextWithContext(context.Background())
26532}
26533
26534// NotDone returns true if the enumeration should be started or is not yet complete.
26535func (iter UsagesListResultIterator) NotDone() bool {
26536	return iter.page.NotDone() && iter.i < len(iter.page.Values())
26537}
26538
26539// Response returns the raw server response from the last page request.
26540func (iter UsagesListResultIterator) Response() UsagesListResult {
26541	return iter.page.Response()
26542}
26543
26544// Value returns the current value or a zero-initialized value if the
26545// iterator has advanced beyond the end of the collection.
26546func (iter UsagesListResultIterator) Value() Usage {
26547	if !iter.page.NotDone() {
26548		return Usage{}
26549	}
26550	return iter.page.Values()[iter.i]
26551}
26552
26553// Creates a new instance of the UsagesListResultIterator type.
26554func NewUsagesListResultIterator(page UsagesListResultPage) UsagesListResultIterator {
26555	return UsagesListResultIterator{page: page}
26556}
26557
26558// IsEmpty returns true if the ListResult contains no values.
26559func (ulr UsagesListResult) IsEmpty() bool {
26560	return ulr.Value == nil || len(*ulr.Value) == 0
26561}
26562
26563// hasNextLink returns true if the NextLink is not empty.
26564func (ulr UsagesListResult) hasNextLink() bool {
26565	return ulr.NextLink != nil && len(*ulr.NextLink) != 0
26566}
26567
26568// usagesListResultPreparer prepares a request to retrieve the next set of results.
26569// It returns nil if no more results exist.
26570func (ulr UsagesListResult) usagesListResultPreparer(ctx context.Context) (*http.Request, error) {
26571	if !ulr.hasNextLink() {
26572		return nil, nil
26573	}
26574	return autorest.Prepare((&http.Request{}).WithContext(ctx),
26575		autorest.AsJSON(),
26576		autorest.AsGet(),
26577		autorest.WithBaseURL(to.String(ulr.NextLink)))
26578}
26579
26580// UsagesListResultPage contains a page of Usage values.
26581type UsagesListResultPage struct {
26582	fn  func(context.Context, UsagesListResult) (UsagesListResult, error)
26583	ulr UsagesListResult
26584}
26585
26586// NextWithContext advances to the next page of values.  If there was an error making
26587// the request the page does not advance and the error is returned.
26588func (page *UsagesListResultPage) NextWithContext(ctx context.Context) (err error) {
26589	if tracing.IsEnabled() {
26590		ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultPage.NextWithContext")
26591		defer func() {
26592			sc := -1
26593			if page.Response().Response.Response != nil {
26594				sc = page.Response().Response.Response.StatusCode
26595			}
26596			tracing.EndSpan(ctx, sc, err)
26597		}()
26598	}
26599	for {
26600		next, err := page.fn(ctx, page.ulr)
26601		if err != nil {
26602			return err
26603		}
26604		page.ulr = next
26605		if !next.hasNextLink() || !next.IsEmpty() {
26606			break
26607		}
26608	}
26609	return nil
26610}
26611
26612// Next advances to the next page of values.  If there was an error making
26613// the request the page does not advance and the error is returned.
26614// Deprecated: Use NextWithContext() instead.
26615func (page *UsagesListResultPage) Next() error {
26616	return page.NextWithContext(context.Background())
26617}
26618
26619// NotDone returns true if the page enumeration should be started or is not yet complete.
26620func (page UsagesListResultPage) NotDone() bool {
26621	return !page.ulr.IsEmpty()
26622}
26623
26624// Response returns the raw server response from the last page request.
26625func (page UsagesListResultPage) Response() UsagesListResult {
26626	return page.ulr
26627}
26628
26629// Values returns the slice of values for the current page or nil if there are no values.
26630func (page UsagesListResultPage) Values() []Usage {
26631	if page.ulr.IsEmpty() {
26632		return nil
26633	}
26634	return *page.ulr.Value
26635}
26636
26637// Creates a new instance of the UsagesListResultPage type.
26638func NewUsagesListResultPage(cur UsagesListResult, getNextPage func(context.Context, UsagesListResult) (UsagesListResult, error)) UsagesListResultPage {
26639	return UsagesListResultPage{
26640		fn:  getNextPage,
26641		ulr: cur,
26642	}
26643}
26644
26645// VerificationIPFlowParameters parameters that define the IP flow to be verified.
26646type VerificationIPFlowParameters struct {
26647	// TargetResourceID - The ID of the target resource to perform next-hop on.
26648	TargetResourceID *string `json:"targetResourceId,omitempty"`
26649	// Direction - The direction of the packet represented as a 5-tuple. Possible values include: 'Inbound', 'Outbound'
26650	Direction Direction `json:"direction,omitempty"`
26651	// Protocol - Protocol to be verified on. Possible values include: 'IPFlowProtocolTCP', 'IPFlowProtocolUDP'
26652	Protocol IPFlowProtocol `json:"protocol,omitempty"`
26653	// 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.
26654	LocalPort *string `json:"localPort,omitempty"`
26655	// 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.
26656	RemotePort *string `json:"remotePort,omitempty"`
26657	// LocalIPAddress - The local IP address. Acceptable values are valid IPv4 addresses.
26658	LocalIPAddress *string `json:"localIPAddress,omitempty"`
26659	// RemoteIPAddress - The remote IP address. Acceptable values are valid IPv4 addresses.
26660	RemoteIPAddress *string `json:"remoteIPAddress,omitempty"`
26661	// 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).
26662	TargetNicResourceID *string `json:"targetNicResourceId,omitempty"`
26663}
26664
26665// VerificationIPFlowResult results of IP flow verification on the target resource.
26666type VerificationIPFlowResult struct {
26667	autorest.Response `json:"-"`
26668	// Access - Indicates whether the traffic is allowed or denied. Possible values include: 'Allow', 'Deny'
26669	Access Access `json:"access,omitempty"`
26670	// RuleName - Name of the rule. If input is not matched against any security rule, it is not displayed.
26671	RuleName *string `json:"ruleName,omitempty"`
26672}
26673
26674// VirtualHub virtualHub Resource.
26675type VirtualHub struct {
26676	autorest.Response `json:"-"`
26677	// VirtualHubProperties - Properties of the virtual hub.
26678	*VirtualHubProperties `json:"properties,omitempty"`
26679	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
26680	Etag *string `json:"etag,omitempty"`
26681	// ID - Resource ID.
26682	ID *string `json:"id,omitempty"`
26683	// Name - READ-ONLY; Resource name.
26684	Name *string `json:"name,omitempty"`
26685	// Type - READ-ONLY; Resource type.
26686	Type *string `json:"type,omitempty"`
26687	// Location - Resource location.
26688	Location *string `json:"location,omitempty"`
26689	// Tags - Resource tags.
26690	Tags map[string]*string `json:"tags"`
26691}
26692
26693// MarshalJSON is the custom marshaler for VirtualHub.
26694func (vh VirtualHub) MarshalJSON() ([]byte, error) {
26695	objectMap := make(map[string]interface{})
26696	if vh.VirtualHubProperties != nil {
26697		objectMap["properties"] = vh.VirtualHubProperties
26698	}
26699	if vh.ID != nil {
26700		objectMap["id"] = vh.ID
26701	}
26702	if vh.Location != nil {
26703		objectMap["location"] = vh.Location
26704	}
26705	if vh.Tags != nil {
26706		objectMap["tags"] = vh.Tags
26707	}
26708	return json.Marshal(objectMap)
26709}
26710
26711// UnmarshalJSON is the custom unmarshaler for VirtualHub struct.
26712func (vh *VirtualHub) UnmarshalJSON(body []byte) error {
26713	var m map[string]*json.RawMessage
26714	err := json.Unmarshal(body, &m)
26715	if err != nil {
26716		return err
26717	}
26718	for k, v := range m {
26719		switch k {
26720		case "properties":
26721			if v != nil {
26722				var virtualHubProperties VirtualHubProperties
26723				err = json.Unmarshal(*v, &virtualHubProperties)
26724				if err != nil {
26725					return err
26726				}
26727				vh.VirtualHubProperties = &virtualHubProperties
26728			}
26729		case "etag":
26730			if v != nil {
26731				var etag string
26732				err = json.Unmarshal(*v, &etag)
26733				if err != nil {
26734					return err
26735				}
26736				vh.Etag = &etag
26737			}
26738		case "id":
26739			if v != nil {
26740				var ID string
26741				err = json.Unmarshal(*v, &ID)
26742				if err != nil {
26743					return err
26744				}
26745				vh.ID = &ID
26746			}
26747		case "name":
26748			if v != nil {
26749				var name string
26750				err = json.Unmarshal(*v, &name)
26751				if err != nil {
26752					return err
26753				}
26754				vh.Name = &name
26755			}
26756		case "type":
26757			if v != nil {
26758				var typeVar string
26759				err = json.Unmarshal(*v, &typeVar)
26760				if err != nil {
26761					return err
26762				}
26763				vh.Type = &typeVar
26764			}
26765		case "location":
26766			if v != nil {
26767				var location string
26768				err = json.Unmarshal(*v, &location)
26769				if err != nil {
26770					return err
26771				}
26772				vh.Location = &location
26773			}
26774		case "tags":
26775			if v != nil {
26776				var tags map[string]*string
26777				err = json.Unmarshal(*v, &tags)
26778				if err != nil {
26779					return err
26780				}
26781				vh.Tags = tags
26782			}
26783		}
26784	}
26785
26786	return nil
26787}
26788
26789// VirtualHubID virtual Hub identifier.
26790type VirtualHubID struct {
26791	// 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.
26792	ID *string `json:"id,omitempty"`
26793}
26794
26795// VirtualHubProperties parameters for VirtualHub.
26796type VirtualHubProperties struct {
26797	// VirtualWan - The VirtualWAN to which the VirtualHub belongs.
26798	VirtualWan *SubResource `json:"virtualWan,omitempty"`
26799	// VpnGateway - The VpnGateway associated with this VirtualHub.
26800	VpnGateway *SubResource `json:"vpnGateway,omitempty"`
26801	// P2SVpnGateway - The P2SVpnGateway associated with this VirtualHub.
26802	P2SVpnGateway *SubResource `json:"p2SVpnGateway,omitempty"`
26803	// ExpressRouteGateway - The expressRouteGateway associated with this VirtualHub.
26804	ExpressRouteGateway *SubResource `json:"expressRouteGateway,omitempty"`
26805	// VirtualNetworkConnections - List of all vnet connections with this VirtualHub.
26806	VirtualNetworkConnections *[]HubVirtualNetworkConnection `json:"virtualNetworkConnections,omitempty"`
26807	// AddressPrefix - Address-prefix for this VirtualHub.
26808	AddressPrefix *string `json:"addressPrefix,omitempty"`
26809	// RouteTable - The routeTable associated with this virtual hub.
26810	RouteTable *VirtualHubRouteTable `json:"routeTable,omitempty"`
26811	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
26812	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
26813}
26814
26815// VirtualHubRoute virtualHub route.
26816type VirtualHubRoute struct {
26817	// AddressPrefixes - List of all addressPrefixes.
26818	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
26819	// NextHopIPAddress - NextHop ip address.
26820	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
26821}
26822
26823// VirtualHubRouteTable virtualHub route table.
26824type VirtualHubRouteTable struct {
26825	// Routes - List of all routes.
26826	Routes *[]VirtualHubRoute `json:"routes,omitempty"`
26827}
26828
26829// VirtualHubsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
26830// long-running operation.
26831type VirtualHubsCreateOrUpdateFuture struct {
26832	azure.FutureAPI
26833	// Result returns the result of the asynchronous operation.
26834	// If the operation has not completed it will return an error.
26835	Result func(VirtualHubsClient) (VirtualHub, error)
26836}
26837
26838// VirtualHubsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
26839// operation.
26840type VirtualHubsDeleteFuture struct {
26841	azure.FutureAPI
26842	// Result returns the result of the asynchronous operation.
26843	// If the operation has not completed it will return an error.
26844	Result func(VirtualHubsClient) (autorest.Response, error)
26845}
26846
26847// VirtualHubsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
26848// operation.
26849type VirtualHubsUpdateTagsFuture struct {
26850	azure.FutureAPI
26851	// Result returns the result of the asynchronous operation.
26852	// If the operation has not completed it will return an error.
26853	Result func(VirtualHubsClient) (VirtualHub, error)
26854}
26855
26856// VirtualNetwork virtual Network resource.
26857type VirtualNetwork struct {
26858	autorest.Response `json:"-"`
26859	// VirtualNetworkPropertiesFormat - Properties of the virtual network.
26860	*VirtualNetworkPropertiesFormat `json:"properties,omitempty"`
26861	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
26862	Etag *string `json:"etag,omitempty"`
26863	// ID - Resource ID.
26864	ID *string `json:"id,omitempty"`
26865	// Name - READ-ONLY; Resource name.
26866	Name *string `json:"name,omitempty"`
26867	// Type - READ-ONLY; Resource type.
26868	Type *string `json:"type,omitempty"`
26869	// Location - Resource location.
26870	Location *string `json:"location,omitempty"`
26871	// Tags - Resource tags.
26872	Tags map[string]*string `json:"tags"`
26873}
26874
26875// MarshalJSON is the custom marshaler for VirtualNetwork.
26876func (vn VirtualNetwork) MarshalJSON() ([]byte, error) {
26877	objectMap := make(map[string]interface{})
26878	if vn.VirtualNetworkPropertiesFormat != nil {
26879		objectMap["properties"] = vn.VirtualNetworkPropertiesFormat
26880	}
26881	if vn.Etag != nil {
26882		objectMap["etag"] = vn.Etag
26883	}
26884	if vn.ID != nil {
26885		objectMap["id"] = vn.ID
26886	}
26887	if vn.Location != nil {
26888		objectMap["location"] = vn.Location
26889	}
26890	if vn.Tags != nil {
26891		objectMap["tags"] = vn.Tags
26892	}
26893	return json.Marshal(objectMap)
26894}
26895
26896// UnmarshalJSON is the custom unmarshaler for VirtualNetwork struct.
26897func (vn *VirtualNetwork) UnmarshalJSON(body []byte) error {
26898	var m map[string]*json.RawMessage
26899	err := json.Unmarshal(body, &m)
26900	if err != nil {
26901		return err
26902	}
26903	for k, v := range m {
26904		switch k {
26905		case "properties":
26906			if v != nil {
26907				var virtualNetworkPropertiesFormat VirtualNetworkPropertiesFormat
26908				err = json.Unmarshal(*v, &virtualNetworkPropertiesFormat)
26909				if err != nil {
26910					return err
26911				}
26912				vn.VirtualNetworkPropertiesFormat = &virtualNetworkPropertiesFormat
26913			}
26914		case "etag":
26915			if v != nil {
26916				var etag string
26917				err = json.Unmarshal(*v, &etag)
26918				if err != nil {
26919					return err
26920				}
26921				vn.Etag = &etag
26922			}
26923		case "id":
26924			if v != nil {
26925				var ID string
26926				err = json.Unmarshal(*v, &ID)
26927				if err != nil {
26928					return err
26929				}
26930				vn.ID = &ID
26931			}
26932		case "name":
26933			if v != nil {
26934				var name string
26935				err = json.Unmarshal(*v, &name)
26936				if err != nil {
26937					return err
26938				}
26939				vn.Name = &name
26940			}
26941		case "type":
26942			if v != nil {
26943				var typeVar string
26944				err = json.Unmarshal(*v, &typeVar)
26945				if err != nil {
26946					return err
26947				}
26948				vn.Type = &typeVar
26949			}
26950		case "location":
26951			if v != nil {
26952				var location string
26953				err = json.Unmarshal(*v, &location)
26954				if err != nil {
26955					return err
26956				}
26957				vn.Location = &location
26958			}
26959		case "tags":
26960			if v != nil {
26961				var tags map[string]*string
26962				err = json.Unmarshal(*v, &tags)
26963				if err != nil {
26964					return err
26965				}
26966				vn.Tags = tags
26967			}
26968		}
26969	}
26970
26971	return nil
26972}
26973
26974// VirtualNetworkConnectionGatewayReference a reference to VirtualNetworkGateway or LocalNetworkGateway
26975// resource.
26976type VirtualNetworkConnectionGatewayReference struct {
26977	// ID - The ID of VirtualNetworkGateway or LocalNetworkGateway resource.
26978	ID *string `json:"id,omitempty"`
26979}
26980
26981// VirtualNetworkGateway a common class for general resource information.
26982type VirtualNetworkGateway struct {
26983	autorest.Response `json:"-"`
26984	// VirtualNetworkGatewayPropertiesFormat - Properties of the virtual network gateway.
26985	*VirtualNetworkGatewayPropertiesFormat `json:"properties,omitempty"`
26986	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
26987	Etag *string `json:"etag,omitempty"`
26988	// ID - Resource ID.
26989	ID *string `json:"id,omitempty"`
26990	// Name - READ-ONLY; Resource name.
26991	Name *string `json:"name,omitempty"`
26992	// Type - READ-ONLY; Resource type.
26993	Type *string `json:"type,omitempty"`
26994	// Location - Resource location.
26995	Location *string `json:"location,omitempty"`
26996	// Tags - Resource tags.
26997	Tags map[string]*string `json:"tags"`
26998}
26999
27000// MarshalJSON is the custom marshaler for VirtualNetworkGateway.
27001func (vng VirtualNetworkGateway) MarshalJSON() ([]byte, error) {
27002	objectMap := make(map[string]interface{})
27003	if vng.VirtualNetworkGatewayPropertiesFormat != nil {
27004		objectMap["properties"] = vng.VirtualNetworkGatewayPropertiesFormat
27005	}
27006	if vng.Etag != nil {
27007		objectMap["etag"] = vng.Etag
27008	}
27009	if vng.ID != nil {
27010		objectMap["id"] = vng.ID
27011	}
27012	if vng.Location != nil {
27013		objectMap["location"] = vng.Location
27014	}
27015	if vng.Tags != nil {
27016		objectMap["tags"] = vng.Tags
27017	}
27018	return json.Marshal(objectMap)
27019}
27020
27021// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGateway struct.
27022func (vng *VirtualNetworkGateway) UnmarshalJSON(body []byte) error {
27023	var m map[string]*json.RawMessage
27024	err := json.Unmarshal(body, &m)
27025	if err != nil {
27026		return err
27027	}
27028	for k, v := range m {
27029		switch k {
27030		case "properties":
27031			if v != nil {
27032				var virtualNetworkGatewayPropertiesFormat VirtualNetworkGatewayPropertiesFormat
27033				err = json.Unmarshal(*v, &virtualNetworkGatewayPropertiesFormat)
27034				if err != nil {
27035					return err
27036				}
27037				vng.VirtualNetworkGatewayPropertiesFormat = &virtualNetworkGatewayPropertiesFormat
27038			}
27039		case "etag":
27040			if v != nil {
27041				var etag string
27042				err = json.Unmarshal(*v, &etag)
27043				if err != nil {
27044					return err
27045				}
27046				vng.Etag = &etag
27047			}
27048		case "id":
27049			if v != nil {
27050				var ID string
27051				err = json.Unmarshal(*v, &ID)
27052				if err != nil {
27053					return err
27054				}
27055				vng.ID = &ID
27056			}
27057		case "name":
27058			if v != nil {
27059				var name string
27060				err = json.Unmarshal(*v, &name)
27061				if err != nil {
27062					return err
27063				}
27064				vng.Name = &name
27065			}
27066		case "type":
27067			if v != nil {
27068				var typeVar string
27069				err = json.Unmarshal(*v, &typeVar)
27070				if err != nil {
27071					return err
27072				}
27073				vng.Type = &typeVar
27074			}
27075		case "location":
27076			if v != nil {
27077				var location string
27078				err = json.Unmarshal(*v, &location)
27079				if err != nil {
27080					return err
27081				}
27082				vng.Location = &location
27083			}
27084		case "tags":
27085			if v != nil {
27086				var tags map[string]*string
27087				err = json.Unmarshal(*v, &tags)
27088				if err != nil {
27089					return err
27090				}
27091				vng.Tags = tags
27092			}
27093		}
27094	}
27095
27096	return nil
27097}
27098
27099// VirtualNetworkGatewayConnection a common class for general resource information.
27100type VirtualNetworkGatewayConnection struct {
27101	autorest.Response `json:"-"`
27102	// VirtualNetworkGatewayConnectionPropertiesFormat - Properties of the virtual network gateway connection.
27103	*VirtualNetworkGatewayConnectionPropertiesFormat `json:"properties,omitempty"`
27104	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
27105	Etag *string `json:"etag,omitempty"`
27106	// ID - Resource ID.
27107	ID *string `json:"id,omitempty"`
27108	// Name - READ-ONLY; Resource name.
27109	Name *string `json:"name,omitempty"`
27110	// Type - READ-ONLY; Resource type.
27111	Type *string `json:"type,omitempty"`
27112	// Location - Resource location.
27113	Location *string `json:"location,omitempty"`
27114	// Tags - Resource tags.
27115	Tags map[string]*string `json:"tags"`
27116}
27117
27118// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnection.
27119func (vngc VirtualNetworkGatewayConnection) MarshalJSON() ([]byte, error) {
27120	objectMap := make(map[string]interface{})
27121	if vngc.VirtualNetworkGatewayConnectionPropertiesFormat != nil {
27122		objectMap["properties"] = vngc.VirtualNetworkGatewayConnectionPropertiesFormat
27123	}
27124	if vngc.Etag != nil {
27125		objectMap["etag"] = vngc.Etag
27126	}
27127	if vngc.ID != nil {
27128		objectMap["id"] = vngc.ID
27129	}
27130	if vngc.Location != nil {
27131		objectMap["location"] = vngc.Location
27132	}
27133	if vngc.Tags != nil {
27134		objectMap["tags"] = vngc.Tags
27135	}
27136	return json.Marshal(objectMap)
27137}
27138
27139// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnection struct.
27140func (vngc *VirtualNetworkGatewayConnection) UnmarshalJSON(body []byte) error {
27141	var m map[string]*json.RawMessage
27142	err := json.Unmarshal(body, &m)
27143	if err != nil {
27144		return err
27145	}
27146	for k, v := range m {
27147		switch k {
27148		case "properties":
27149			if v != nil {
27150				var virtualNetworkGatewayConnectionPropertiesFormat VirtualNetworkGatewayConnectionPropertiesFormat
27151				err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionPropertiesFormat)
27152				if err != nil {
27153					return err
27154				}
27155				vngc.VirtualNetworkGatewayConnectionPropertiesFormat = &virtualNetworkGatewayConnectionPropertiesFormat
27156			}
27157		case "etag":
27158			if v != nil {
27159				var etag string
27160				err = json.Unmarshal(*v, &etag)
27161				if err != nil {
27162					return err
27163				}
27164				vngc.Etag = &etag
27165			}
27166		case "id":
27167			if v != nil {
27168				var ID string
27169				err = json.Unmarshal(*v, &ID)
27170				if err != nil {
27171					return err
27172				}
27173				vngc.ID = &ID
27174			}
27175		case "name":
27176			if v != nil {
27177				var name string
27178				err = json.Unmarshal(*v, &name)
27179				if err != nil {
27180					return err
27181				}
27182				vngc.Name = &name
27183			}
27184		case "type":
27185			if v != nil {
27186				var typeVar string
27187				err = json.Unmarshal(*v, &typeVar)
27188				if err != nil {
27189					return err
27190				}
27191				vngc.Type = &typeVar
27192			}
27193		case "location":
27194			if v != nil {
27195				var location string
27196				err = json.Unmarshal(*v, &location)
27197				if err != nil {
27198					return err
27199				}
27200				vngc.Location = &location
27201			}
27202		case "tags":
27203			if v != nil {
27204				var tags map[string]*string
27205				err = json.Unmarshal(*v, &tags)
27206				if err != nil {
27207					return err
27208				}
27209				vngc.Tags = tags
27210			}
27211		}
27212	}
27213
27214	return nil
27215}
27216
27217// VirtualNetworkGatewayConnectionListEntity a common class for general resource information.
27218type VirtualNetworkGatewayConnectionListEntity struct {
27219	// VirtualNetworkGatewayConnectionListEntityPropertiesFormat - Properties of the virtual network gateway connection.
27220	*VirtualNetworkGatewayConnectionListEntityPropertiesFormat `json:"properties,omitempty"`
27221	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
27222	Etag *string `json:"etag,omitempty"`
27223	// ID - Resource ID.
27224	ID *string `json:"id,omitempty"`
27225	// Name - READ-ONLY; Resource name.
27226	Name *string `json:"name,omitempty"`
27227	// Type - READ-ONLY; Resource type.
27228	Type *string `json:"type,omitempty"`
27229	// Location - Resource location.
27230	Location *string `json:"location,omitempty"`
27231	// Tags - Resource tags.
27232	Tags map[string]*string `json:"tags"`
27233}
27234
27235// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListEntity.
27236func (vngcle VirtualNetworkGatewayConnectionListEntity) MarshalJSON() ([]byte, error) {
27237	objectMap := make(map[string]interface{})
27238	if vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat != nil {
27239		objectMap["properties"] = vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat
27240	}
27241	if vngcle.Etag != nil {
27242		objectMap["etag"] = vngcle.Etag
27243	}
27244	if vngcle.ID != nil {
27245		objectMap["id"] = vngcle.ID
27246	}
27247	if vngcle.Location != nil {
27248		objectMap["location"] = vngcle.Location
27249	}
27250	if vngcle.Tags != nil {
27251		objectMap["tags"] = vngcle.Tags
27252	}
27253	return json.Marshal(objectMap)
27254}
27255
27256// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnectionListEntity struct.
27257func (vngcle *VirtualNetworkGatewayConnectionListEntity) UnmarshalJSON(body []byte) error {
27258	var m map[string]*json.RawMessage
27259	err := json.Unmarshal(body, &m)
27260	if err != nil {
27261		return err
27262	}
27263	for k, v := range m {
27264		switch k {
27265		case "properties":
27266			if v != nil {
27267				var virtualNetworkGatewayConnectionListEntityPropertiesFormat VirtualNetworkGatewayConnectionListEntityPropertiesFormat
27268				err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionListEntityPropertiesFormat)
27269				if err != nil {
27270					return err
27271				}
27272				vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat = &virtualNetworkGatewayConnectionListEntityPropertiesFormat
27273			}
27274		case "etag":
27275			if v != nil {
27276				var etag string
27277				err = json.Unmarshal(*v, &etag)
27278				if err != nil {
27279					return err
27280				}
27281				vngcle.Etag = &etag
27282			}
27283		case "id":
27284			if v != nil {
27285				var ID string
27286				err = json.Unmarshal(*v, &ID)
27287				if err != nil {
27288					return err
27289				}
27290				vngcle.ID = &ID
27291			}
27292		case "name":
27293			if v != nil {
27294				var name string
27295				err = json.Unmarshal(*v, &name)
27296				if err != nil {
27297					return err
27298				}
27299				vngcle.Name = &name
27300			}
27301		case "type":
27302			if v != nil {
27303				var typeVar string
27304				err = json.Unmarshal(*v, &typeVar)
27305				if err != nil {
27306					return err
27307				}
27308				vngcle.Type = &typeVar
27309			}
27310		case "location":
27311			if v != nil {
27312				var location string
27313				err = json.Unmarshal(*v, &location)
27314				if err != nil {
27315					return err
27316				}
27317				vngcle.Location = &location
27318			}
27319		case "tags":
27320			if v != nil {
27321				var tags map[string]*string
27322				err = json.Unmarshal(*v, &tags)
27323				if err != nil {
27324					return err
27325				}
27326				vngcle.Tags = tags
27327			}
27328		}
27329	}
27330
27331	return nil
27332}
27333
27334// VirtualNetworkGatewayConnectionListEntityPropertiesFormat virtualNetworkGatewayConnection properties.
27335type VirtualNetworkGatewayConnectionListEntityPropertiesFormat struct {
27336	// AuthorizationKey - The authorizationKey.
27337	AuthorizationKey *string `json:"authorizationKey,omitempty"`
27338	// VirtualNetworkGateway1 - The reference to virtual network gateway resource.
27339	VirtualNetworkGateway1 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway1,omitempty"`
27340	// VirtualNetworkGateway2 - The reference to virtual network gateway resource.
27341	VirtualNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway2,omitempty"`
27342	// LocalNetworkGateway2 - The reference to local network gateway resource.
27343	LocalNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"localNetworkGateway2,omitempty"`
27344	// ConnectionType - Gateway connection type. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'
27345	ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"`
27346	// ConnectionProtocol - Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1'
27347	ConnectionProtocol VirtualNetworkGatewayConnectionProtocol `json:"connectionProtocol,omitempty"`
27348	// RoutingWeight - The routing weight.
27349	RoutingWeight *int32 `json:"routingWeight,omitempty"`
27350	// SharedKey - The IPSec shared key.
27351	SharedKey *string `json:"sharedKey,omitempty"`
27352	// ConnectionStatus - READ-ONLY; Virtual Network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
27353	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
27354	// TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status.
27355	TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"`
27356	// EgressBytesTransferred - READ-ONLY; The egress bytes transferred in this connection.
27357	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
27358	// IngressBytesTransferred - READ-ONLY; The ingress bytes transferred in this connection.
27359	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
27360	// Peer - The reference to peerings resource.
27361	Peer *SubResource `json:"peer,omitempty"`
27362	// EnableBgp - EnableBgp flag.
27363	EnableBgp *bool `json:"enableBgp,omitempty"`
27364	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
27365	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
27366	// IpsecPolicies - The IPSec Policies to be considered by this connection.
27367	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
27368	// ResourceGUID - The resource GUID property of the VirtualNetworkGatewayConnection resource.
27369	ResourceGUID *string `json:"resourceGuid,omitempty"`
27370	// ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGatewayConnection resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
27371	ProvisioningState *string `json:"provisioningState,omitempty"`
27372	// ExpressRouteGatewayBypass - Bypass ExpressRoute Gateway for data forwarding.
27373	ExpressRouteGatewayBypass *bool `json:"expressRouteGatewayBypass,omitempty"`
27374}
27375
27376// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListEntityPropertiesFormat.
27377func (vngclepf VirtualNetworkGatewayConnectionListEntityPropertiesFormat) MarshalJSON() ([]byte, error) {
27378	objectMap := make(map[string]interface{})
27379	if vngclepf.AuthorizationKey != nil {
27380		objectMap["authorizationKey"] = vngclepf.AuthorizationKey
27381	}
27382	if vngclepf.VirtualNetworkGateway1 != nil {
27383		objectMap["virtualNetworkGateway1"] = vngclepf.VirtualNetworkGateway1
27384	}
27385	if vngclepf.VirtualNetworkGateway2 != nil {
27386		objectMap["virtualNetworkGateway2"] = vngclepf.VirtualNetworkGateway2
27387	}
27388	if vngclepf.LocalNetworkGateway2 != nil {
27389		objectMap["localNetworkGateway2"] = vngclepf.LocalNetworkGateway2
27390	}
27391	if vngclepf.ConnectionType != "" {
27392		objectMap["connectionType"] = vngclepf.ConnectionType
27393	}
27394	if vngclepf.ConnectionProtocol != "" {
27395		objectMap["connectionProtocol"] = vngclepf.ConnectionProtocol
27396	}
27397	if vngclepf.RoutingWeight != nil {
27398		objectMap["routingWeight"] = vngclepf.RoutingWeight
27399	}
27400	if vngclepf.SharedKey != nil {
27401		objectMap["sharedKey"] = vngclepf.SharedKey
27402	}
27403	if vngclepf.Peer != nil {
27404		objectMap["peer"] = vngclepf.Peer
27405	}
27406	if vngclepf.EnableBgp != nil {
27407		objectMap["enableBgp"] = vngclepf.EnableBgp
27408	}
27409	if vngclepf.UsePolicyBasedTrafficSelectors != nil {
27410		objectMap["usePolicyBasedTrafficSelectors"] = vngclepf.UsePolicyBasedTrafficSelectors
27411	}
27412	if vngclepf.IpsecPolicies != nil {
27413		objectMap["ipsecPolicies"] = vngclepf.IpsecPolicies
27414	}
27415	if vngclepf.ResourceGUID != nil {
27416		objectMap["resourceGuid"] = vngclepf.ResourceGUID
27417	}
27418	if vngclepf.ExpressRouteGatewayBypass != nil {
27419		objectMap["expressRouteGatewayBypass"] = vngclepf.ExpressRouteGatewayBypass
27420	}
27421	return json.Marshal(objectMap)
27422}
27423
27424// VirtualNetworkGatewayConnectionListResult response for the ListVirtualNetworkGatewayConnections API
27425// service call.
27426type VirtualNetworkGatewayConnectionListResult struct {
27427	autorest.Response `json:"-"`
27428	// Value - Gets a list of VirtualNetworkGatewayConnection resources that exists in a resource group.
27429	Value *[]VirtualNetworkGatewayConnection `json:"value,omitempty"`
27430	// NextLink - READ-ONLY; The URL to get the next set of results.
27431	NextLink *string `json:"nextLink,omitempty"`
27432}
27433
27434// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListResult.
27435func (vngclr VirtualNetworkGatewayConnectionListResult) MarshalJSON() ([]byte, error) {
27436	objectMap := make(map[string]interface{})
27437	if vngclr.Value != nil {
27438		objectMap["value"] = vngclr.Value
27439	}
27440	return json.Marshal(objectMap)
27441}
27442
27443// VirtualNetworkGatewayConnectionListResultIterator provides access to a complete listing of
27444// VirtualNetworkGatewayConnection values.
27445type VirtualNetworkGatewayConnectionListResultIterator struct {
27446	i    int
27447	page VirtualNetworkGatewayConnectionListResultPage
27448}
27449
27450// NextWithContext advances to the next value.  If there was an error making
27451// the request the iterator does not advance and the error is returned.
27452func (iter *VirtualNetworkGatewayConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
27453	if tracing.IsEnabled() {
27454		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultIterator.NextWithContext")
27455		defer func() {
27456			sc := -1
27457			if iter.Response().Response.Response != nil {
27458				sc = iter.Response().Response.Response.StatusCode
27459			}
27460			tracing.EndSpan(ctx, sc, err)
27461		}()
27462	}
27463	iter.i++
27464	if iter.i < len(iter.page.Values()) {
27465		return nil
27466	}
27467	err = iter.page.NextWithContext(ctx)
27468	if err != nil {
27469		iter.i--
27470		return err
27471	}
27472	iter.i = 0
27473	return nil
27474}
27475
27476// Next advances to the next value.  If there was an error making
27477// the request the iterator does not advance and the error is returned.
27478// Deprecated: Use NextWithContext() instead.
27479func (iter *VirtualNetworkGatewayConnectionListResultIterator) Next() error {
27480	return iter.NextWithContext(context.Background())
27481}
27482
27483// NotDone returns true if the enumeration should be started or is not yet complete.
27484func (iter VirtualNetworkGatewayConnectionListResultIterator) NotDone() bool {
27485	return iter.page.NotDone() && iter.i < len(iter.page.Values())
27486}
27487
27488// Response returns the raw server response from the last page request.
27489func (iter VirtualNetworkGatewayConnectionListResultIterator) Response() VirtualNetworkGatewayConnectionListResult {
27490	return iter.page.Response()
27491}
27492
27493// Value returns the current value or a zero-initialized value if the
27494// iterator has advanced beyond the end of the collection.
27495func (iter VirtualNetworkGatewayConnectionListResultIterator) Value() VirtualNetworkGatewayConnection {
27496	if !iter.page.NotDone() {
27497		return VirtualNetworkGatewayConnection{}
27498	}
27499	return iter.page.Values()[iter.i]
27500}
27501
27502// Creates a new instance of the VirtualNetworkGatewayConnectionListResultIterator type.
27503func NewVirtualNetworkGatewayConnectionListResultIterator(page VirtualNetworkGatewayConnectionListResultPage) VirtualNetworkGatewayConnectionListResultIterator {
27504	return VirtualNetworkGatewayConnectionListResultIterator{page: page}
27505}
27506
27507// IsEmpty returns true if the ListResult contains no values.
27508func (vngclr VirtualNetworkGatewayConnectionListResult) IsEmpty() bool {
27509	return vngclr.Value == nil || len(*vngclr.Value) == 0
27510}
27511
27512// hasNextLink returns true if the NextLink is not empty.
27513func (vngclr VirtualNetworkGatewayConnectionListResult) hasNextLink() bool {
27514	return vngclr.NextLink != nil && len(*vngclr.NextLink) != 0
27515}
27516
27517// virtualNetworkGatewayConnectionListResultPreparer prepares a request to retrieve the next set of results.
27518// It returns nil if no more results exist.
27519func (vngclr VirtualNetworkGatewayConnectionListResult) virtualNetworkGatewayConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
27520	if !vngclr.hasNextLink() {
27521		return nil, nil
27522	}
27523	return autorest.Prepare((&http.Request{}).WithContext(ctx),
27524		autorest.AsJSON(),
27525		autorest.AsGet(),
27526		autorest.WithBaseURL(to.String(vngclr.NextLink)))
27527}
27528
27529// VirtualNetworkGatewayConnectionListResultPage contains a page of VirtualNetworkGatewayConnection values.
27530type VirtualNetworkGatewayConnectionListResultPage struct {
27531	fn     func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)
27532	vngclr VirtualNetworkGatewayConnectionListResult
27533}
27534
27535// NextWithContext advances to the next page of values.  If there was an error making
27536// the request the page does not advance and the error is returned.
27537func (page *VirtualNetworkGatewayConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
27538	if tracing.IsEnabled() {
27539		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultPage.NextWithContext")
27540		defer func() {
27541			sc := -1
27542			if page.Response().Response.Response != nil {
27543				sc = page.Response().Response.Response.StatusCode
27544			}
27545			tracing.EndSpan(ctx, sc, err)
27546		}()
27547	}
27548	for {
27549		next, err := page.fn(ctx, page.vngclr)
27550		if err != nil {
27551			return err
27552		}
27553		page.vngclr = next
27554		if !next.hasNextLink() || !next.IsEmpty() {
27555			break
27556		}
27557	}
27558	return nil
27559}
27560
27561// Next advances to the next page of values.  If there was an error making
27562// the request the page does not advance and the error is returned.
27563// Deprecated: Use NextWithContext() instead.
27564func (page *VirtualNetworkGatewayConnectionListResultPage) Next() error {
27565	return page.NextWithContext(context.Background())
27566}
27567
27568// NotDone returns true if the page enumeration should be started or is not yet complete.
27569func (page VirtualNetworkGatewayConnectionListResultPage) NotDone() bool {
27570	return !page.vngclr.IsEmpty()
27571}
27572
27573// Response returns the raw server response from the last page request.
27574func (page VirtualNetworkGatewayConnectionListResultPage) Response() VirtualNetworkGatewayConnectionListResult {
27575	return page.vngclr
27576}
27577
27578// Values returns the slice of values for the current page or nil if there are no values.
27579func (page VirtualNetworkGatewayConnectionListResultPage) Values() []VirtualNetworkGatewayConnection {
27580	if page.vngclr.IsEmpty() {
27581		return nil
27582	}
27583	return *page.vngclr.Value
27584}
27585
27586// Creates a new instance of the VirtualNetworkGatewayConnectionListResultPage type.
27587func NewVirtualNetworkGatewayConnectionListResultPage(cur VirtualNetworkGatewayConnectionListResult, getNextPage func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)) VirtualNetworkGatewayConnectionListResultPage {
27588	return VirtualNetworkGatewayConnectionListResultPage{
27589		fn:     getNextPage,
27590		vngclr: cur,
27591	}
27592}
27593
27594// VirtualNetworkGatewayConnectionPropertiesFormat virtualNetworkGatewayConnection properties.
27595type VirtualNetworkGatewayConnectionPropertiesFormat struct {
27596	// AuthorizationKey - The authorizationKey.
27597	AuthorizationKey *string `json:"authorizationKey,omitempty"`
27598	// VirtualNetworkGateway1 - The reference to virtual network gateway resource.
27599	VirtualNetworkGateway1 *VirtualNetworkGateway `json:"virtualNetworkGateway1,omitempty"`
27600	// VirtualNetworkGateway2 - The reference to virtual network gateway resource.
27601	VirtualNetworkGateway2 *VirtualNetworkGateway `json:"virtualNetworkGateway2,omitempty"`
27602	// LocalNetworkGateway2 - The reference to local network gateway resource.
27603	LocalNetworkGateway2 *LocalNetworkGateway `json:"localNetworkGateway2,omitempty"`
27604	// ConnectionType - Gateway connection type. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'
27605	ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"`
27606	// ConnectionProtocol - Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1'
27607	ConnectionProtocol VirtualNetworkGatewayConnectionProtocol `json:"connectionProtocol,omitempty"`
27608	// RoutingWeight - The routing weight.
27609	RoutingWeight *int32 `json:"routingWeight,omitempty"`
27610	// SharedKey - The IPSec shared key.
27611	SharedKey *string `json:"sharedKey,omitempty"`
27612	// ConnectionStatus - READ-ONLY; Virtual Network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
27613	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
27614	// TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status.
27615	TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"`
27616	// EgressBytesTransferred - READ-ONLY; The egress bytes transferred in this connection.
27617	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
27618	// IngressBytesTransferred - READ-ONLY; The ingress bytes transferred in this connection.
27619	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
27620	// Peer - The reference to peerings resource.
27621	Peer *SubResource `json:"peer,omitempty"`
27622	// EnableBgp - EnableBgp flag.
27623	EnableBgp *bool `json:"enableBgp,omitempty"`
27624	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
27625	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
27626	// IpsecPolicies - The IPSec Policies to be considered by this connection.
27627	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
27628	// ResourceGUID - The resource GUID property of the VirtualNetworkGatewayConnection resource.
27629	ResourceGUID *string `json:"resourceGuid,omitempty"`
27630	// ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGatewayConnection resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
27631	ProvisioningState *string `json:"provisioningState,omitempty"`
27632	// ExpressRouteGatewayBypass - Bypass ExpressRoute Gateway for data forwarding.
27633	ExpressRouteGatewayBypass *bool `json:"expressRouteGatewayBypass,omitempty"`
27634}
27635
27636// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionPropertiesFormat.
27637func (vngcpf VirtualNetworkGatewayConnectionPropertiesFormat) MarshalJSON() ([]byte, error) {
27638	objectMap := make(map[string]interface{})
27639	if vngcpf.AuthorizationKey != nil {
27640		objectMap["authorizationKey"] = vngcpf.AuthorizationKey
27641	}
27642	if vngcpf.VirtualNetworkGateway1 != nil {
27643		objectMap["virtualNetworkGateway1"] = vngcpf.VirtualNetworkGateway1
27644	}
27645	if vngcpf.VirtualNetworkGateway2 != nil {
27646		objectMap["virtualNetworkGateway2"] = vngcpf.VirtualNetworkGateway2
27647	}
27648	if vngcpf.LocalNetworkGateway2 != nil {
27649		objectMap["localNetworkGateway2"] = vngcpf.LocalNetworkGateway2
27650	}
27651	if vngcpf.ConnectionType != "" {
27652		objectMap["connectionType"] = vngcpf.ConnectionType
27653	}
27654	if vngcpf.ConnectionProtocol != "" {
27655		objectMap["connectionProtocol"] = vngcpf.ConnectionProtocol
27656	}
27657	if vngcpf.RoutingWeight != nil {
27658		objectMap["routingWeight"] = vngcpf.RoutingWeight
27659	}
27660	if vngcpf.SharedKey != nil {
27661		objectMap["sharedKey"] = vngcpf.SharedKey
27662	}
27663	if vngcpf.Peer != nil {
27664		objectMap["peer"] = vngcpf.Peer
27665	}
27666	if vngcpf.EnableBgp != nil {
27667		objectMap["enableBgp"] = vngcpf.EnableBgp
27668	}
27669	if vngcpf.UsePolicyBasedTrafficSelectors != nil {
27670		objectMap["usePolicyBasedTrafficSelectors"] = vngcpf.UsePolicyBasedTrafficSelectors
27671	}
27672	if vngcpf.IpsecPolicies != nil {
27673		objectMap["ipsecPolicies"] = vngcpf.IpsecPolicies
27674	}
27675	if vngcpf.ResourceGUID != nil {
27676		objectMap["resourceGuid"] = vngcpf.ResourceGUID
27677	}
27678	if vngcpf.ExpressRouteGatewayBypass != nil {
27679		objectMap["expressRouteGatewayBypass"] = vngcpf.ExpressRouteGatewayBypass
27680	}
27681	return json.Marshal(objectMap)
27682}
27683
27684// VirtualNetworkGatewayConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
27685// results of a long-running operation.
27686type VirtualNetworkGatewayConnectionsCreateOrUpdateFuture struct {
27687	azure.FutureAPI
27688	// Result returns the result of the asynchronous operation.
27689	// If the operation has not completed it will return an error.
27690	Result func(VirtualNetworkGatewayConnectionsClient) (VirtualNetworkGatewayConnection, error)
27691}
27692
27693// VirtualNetworkGatewayConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of
27694// a long-running operation.
27695type VirtualNetworkGatewayConnectionsDeleteFuture struct {
27696	azure.FutureAPI
27697	// Result returns the result of the asynchronous operation.
27698	// If the operation has not completed it will return an error.
27699	Result func(VirtualNetworkGatewayConnectionsClient) (autorest.Response, error)
27700}
27701
27702// VirtualNetworkGatewayConnectionsResetSharedKeyFuture an abstraction for monitoring and retrieving the
27703// results of a long-running operation.
27704type VirtualNetworkGatewayConnectionsResetSharedKeyFuture struct {
27705	azure.FutureAPI
27706	// Result returns the result of the asynchronous operation.
27707	// If the operation has not completed it will return an error.
27708	Result func(VirtualNetworkGatewayConnectionsClient) (ConnectionResetSharedKey, error)
27709}
27710
27711// VirtualNetworkGatewayConnectionsSetSharedKeyFuture an abstraction for monitoring and retrieving the
27712// results of a long-running operation.
27713type VirtualNetworkGatewayConnectionsSetSharedKeyFuture struct {
27714	azure.FutureAPI
27715	// Result returns the result of the asynchronous operation.
27716	// If the operation has not completed it will return an error.
27717	Result func(VirtualNetworkGatewayConnectionsClient) (ConnectionSharedKey, error)
27718}
27719
27720// VirtualNetworkGatewayConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the
27721// results of a long-running operation.
27722type VirtualNetworkGatewayConnectionsUpdateTagsFuture struct {
27723	azure.FutureAPI
27724	// Result returns the result of the asynchronous operation.
27725	// If the operation has not completed it will return an error.
27726	Result func(VirtualNetworkGatewayConnectionsClient) (VirtualNetworkGatewayConnection, error)
27727}
27728
27729// VirtualNetworkGatewayIPConfiguration IP configuration for virtual network gateway.
27730type VirtualNetworkGatewayIPConfiguration struct {
27731	// VirtualNetworkGatewayIPConfigurationPropertiesFormat - Properties of the virtual network gateway ip configuration.
27732	*VirtualNetworkGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"`
27733	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
27734	Name *string `json:"name,omitempty"`
27735	// Etag - A unique read-only string that changes whenever the resource is updated.
27736	Etag *string `json:"etag,omitempty"`
27737	// ID - Resource ID.
27738	ID *string `json:"id,omitempty"`
27739}
27740
27741// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfiguration.
27742func (vngic VirtualNetworkGatewayIPConfiguration) MarshalJSON() ([]byte, error) {
27743	objectMap := make(map[string]interface{})
27744	if vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat != nil {
27745		objectMap["properties"] = vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat
27746	}
27747	if vngic.Name != nil {
27748		objectMap["name"] = vngic.Name
27749	}
27750	if vngic.Etag != nil {
27751		objectMap["etag"] = vngic.Etag
27752	}
27753	if vngic.ID != nil {
27754		objectMap["id"] = vngic.ID
27755	}
27756	return json.Marshal(objectMap)
27757}
27758
27759// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayIPConfiguration struct.
27760func (vngic *VirtualNetworkGatewayIPConfiguration) UnmarshalJSON(body []byte) error {
27761	var m map[string]*json.RawMessage
27762	err := json.Unmarshal(body, &m)
27763	if err != nil {
27764		return err
27765	}
27766	for k, v := range m {
27767		switch k {
27768		case "properties":
27769			if v != nil {
27770				var virtualNetworkGatewayIPConfigurationPropertiesFormat VirtualNetworkGatewayIPConfigurationPropertiesFormat
27771				err = json.Unmarshal(*v, &virtualNetworkGatewayIPConfigurationPropertiesFormat)
27772				if err != nil {
27773					return err
27774				}
27775				vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat = &virtualNetworkGatewayIPConfigurationPropertiesFormat
27776			}
27777		case "name":
27778			if v != nil {
27779				var name string
27780				err = json.Unmarshal(*v, &name)
27781				if err != nil {
27782					return err
27783				}
27784				vngic.Name = &name
27785			}
27786		case "etag":
27787			if v != nil {
27788				var etag string
27789				err = json.Unmarshal(*v, &etag)
27790				if err != nil {
27791					return err
27792				}
27793				vngic.Etag = &etag
27794			}
27795		case "id":
27796			if v != nil {
27797				var ID string
27798				err = json.Unmarshal(*v, &ID)
27799				if err != nil {
27800					return err
27801				}
27802				vngic.ID = &ID
27803			}
27804		}
27805	}
27806
27807	return nil
27808}
27809
27810// VirtualNetworkGatewayIPConfigurationPropertiesFormat properties of VirtualNetworkGatewayIPConfiguration.
27811type VirtualNetworkGatewayIPConfigurationPropertiesFormat struct {
27812	// PrivateIPAllocationMethod - The private IP address allocation method. Possible values include: 'Static', 'Dynamic'
27813	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
27814	// Subnet - The reference of the subnet resource.
27815	Subnet *SubResource `json:"subnet,omitempty"`
27816	// PublicIPAddress - The reference of the public IP resource.
27817	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
27818	// ProvisioningState - READ-ONLY; The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
27819	ProvisioningState *string `json:"provisioningState,omitempty"`
27820}
27821
27822// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfigurationPropertiesFormat.
27823func (vngicpf VirtualNetworkGatewayIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
27824	objectMap := make(map[string]interface{})
27825	if vngicpf.PrivateIPAllocationMethod != "" {
27826		objectMap["privateIPAllocationMethod"] = vngicpf.PrivateIPAllocationMethod
27827	}
27828	if vngicpf.Subnet != nil {
27829		objectMap["subnet"] = vngicpf.Subnet
27830	}
27831	if vngicpf.PublicIPAddress != nil {
27832		objectMap["publicIPAddress"] = vngicpf.PublicIPAddress
27833	}
27834	return json.Marshal(objectMap)
27835}
27836
27837// VirtualNetworkGatewayListConnectionsResult response for the VirtualNetworkGatewayListConnections API
27838// service call.
27839type VirtualNetworkGatewayListConnectionsResult struct {
27840	autorest.Response `json:"-"`
27841	// Value - Gets a list of VirtualNetworkGatewayConnection resources that exists in a resource group.
27842	Value *[]VirtualNetworkGatewayConnectionListEntity `json:"value,omitempty"`
27843	// NextLink - READ-ONLY; The URL to get the next set of results.
27844	NextLink *string `json:"nextLink,omitempty"`
27845}
27846
27847// MarshalJSON is the custom marshaler for VirtualNetworkGatewayListConnectionsResult.
27848func (vnglcr VirtualNetworkGatewayListConnectionsResult) MarshalJSON() ([]byte, error) {
27849	objectMap := make(map[string]interface{})
27850	if vnglcr.Value != nil {
27851		objectMap["value"] = vnglcr.Value
27852	}
27853	return json.Marshal(objectMap)
27854}
27855
27856// VirtualNetworkGatewayListConnectionsResultIterator provides access to a complete listing of
27857// VirtualNetworkGatewayConnectionListEntity values.
27858type VirtualNetworkGatewayListConnectionsResultIterator struct {
27859	i    int
27860	page VirtualNetworkGatewayListConnectionsResultPage
27861}
27862
27863// NextWithContext advances to the next value.  If there was an error making
27864// the request the iterator does not advance and the error is returned.
27865func (iter *VirtualNetworkGatewayListConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
27866	if tracing.IsEnabled() {
27867		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultIterator.NextWithContext")
27868		defer func() {
27869			sc := -1
27870			if iter.Response().Response.Response != nil {
27871				sc = iter.Response().Response.Response.StatusCode
27872			}
27873			tracing.EndSpan(ctx, sc, err)
27874		}()
27875	}
27876	iter.i++
27877	if iter.i < len(iter.page.Values()) {
27878		return nil
27879	}
27880	err = iter.page.NextWithContext(ctx)
27881	if err != nil {
27882		iter.i--
27883		return err
27884	}
27885	iter.i = 0
27886	return nil
27887}
27888
27889// Next advances to the next value.  If there was an error making
27890// the request the iterator does not advance and the error is returned.
27891// Deprecated: Use NextWithContext() instead.
27892func (iter *VirtualNetworkGatewayListConnectionsResultIterator) Next() error {
27893	return iter.NextWithContext(context.Background())
27894}
27895
27896// NotDone returns true if the enumeration should be started or is not yet complete.
27897func (iter VirtualNetworkGatewayListConnectionsResultIterator) NotDone() bool {
27898	return iter.page.NotDone() && iter.i < len(iter.page.Values())
27899}
27900
27901// Response returns the raw server response from the last page request.
27902func (iter VirtualNetworkGatewayListConnectionsResultIterator) Response() VirtualNetworkGatewayListConnectionsResult {
27903	return iter.page.Response()
27904}
27905
27906// Value returns the current value or a zero-initialized value if the
27907// iterator has advanced beyond the end of the collection.
27908func (iter VirtualNetworkGatewayListConnectionsResultIterator) Value() VirtualNetworkGatewayConnectionListEntity {
27909	if !iter.page.NotDone() {
27910		return VirtualNetworkGatewayConnectionListEntity{}
27911	}
27912	return iter.page.Values()[iter.i]
27913}
27914
27915// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultIterator type.
27916func NewVirtualNetworkGatewayListConnectionsResultIterator(page VirtualNetworkGatewayListConnectionsResultPage) VirtualNetworkGatewayListConnectionsResultIterator {
27917	return VirtualNetworkGatewayListConnectionsResultIterator{page: page}
27918}
27919
27920// IsEmpty returns true if the ListResult contains no values.
27921func (vnglcr VirtualNetworkGatewayListConnectionsResult) IsEmpty() bool {
27922	return vnglcr.Value == nil || len(*vnglcr.Value) == 0
27923}
27924
27925// hasNextLink returns true if the NextLink is not empty.
27926func (vnglcr VirtualNetworkGatewayListConnectionsResult) hasNextLink() bool {
27927	return vnglcr.NextLink != nil && len(*vnglcr.NextLink) != 0
27928}
27929
27930// virtualNetworkGatewayListConnectionsResultPreparer prepares a request to retrieve the next set of results.
27931// It returns nil if no more results exist.
27932func (vnglcr VirtualNetworkGatewayListConnectionsResult) virtualNetworkGatewayListConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
27933	if !vnglcr.hasNextLink() {
27934		return nil, nil
27935	}
27936	return autorest.Prepare((&http.Request{}).WithContext(ctx),
27937		autorest.AsJSON(),
27938		autorest.AsGet(),
27939		autorest.WithBaseURL(to.String(vnglcr.NextLink)))
27940}
27941
27942// VirtualNetworkGatewayListConnectionsResultPage contains a page of
27943// VirtualNetworkGatewayConnectionListEntity values.
27944type VirtualNetworkGatewayListConnectionsResultPage struct {
27945	fn     func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)
27946	vnglcr VirtualNetworkGatewayListConnectionsResult
27947}
27948
27949// NextWithContext advances to the next page of values.  If there was an error making
27950// the request the page does not advance and the error is returned.
27951func (page *VirtualNetworkGatewayListConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
27952	if tracing.IsEnabled() {
27953		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultPage.NextWithContext")
27954		defer func() {
27955			sc := -1
27956			if page.Response().Response.Response != nil {
27957				sc = page.Response().Response.Response.StatusCode
27958			}
27959			tracing.EndSpan(ctx, sc, err)
27960		}()
27961	}
27962	for {
27963		next, err := page.fn(ctx, page.vnglcr)
27964		if err != nil {
27965			return err
27966		}
27967		page.vnglcr = next
27968		if !next.hasNextLink() || !next.IsEmpty() {
27969			break
27970		}
27971	}
27972	return nil
27973}
27974
27975// Next advances to the next page of values.  If there was an error making
27976// the request the page does not advance and the error is returned.
27977// Deprecated: Use NextWithContext() instead.
27978func (page *VirtualNetworkGatewayListConnectionsResultPage) Next() error {
27979	return page.NextWithContext(context.Background())
27980}
27981
27982// NotDone returns true if the page enumeration should be started or is not yet complete.
27983func (page VirtualNetworkGatewayListConnectionsResultPage) NotDone() bool {
27984	return !page.vnglcr.IsEmpty()
27985}
27986
27987// Response returns the raw server response from the last page request.
27988func (page VirtualNetworkGatewayListConnectionsResultPage) Response() VirtualNetworkGatewayListConnectionsResult {
27989	return page.vnglcr
27990}
27991
27992// Values returns the slice of values for the current page or nil if there are no values.
27993func (page VirtualNetworkGatewayListConnectionsResultPage) Values() []VirtualNetworkGatewayConnectionListEntity {
27994	if page.vnglcr.IsEmpty() {
27995		return nil
27996	}
27997	return *page.vnglcr.Value
27998}
27999
28000// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultPage type.
28001func NewVirtualNetworkGatewayListConnectionsResultPage(cur VirtualNetworkGatewayListConnectionsResult, getNextPage func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)) VirtualNetworkGatewayListConnectionsResultPage {
28002	return VirtualNetworkGatewayListConnectionsResultPage{
28003		fn:     getNextPage,
28004		vnglcr: cur,
28005	}
28006}
28007
28008// VirtualNetworkGatewayListResult response for the ListVirtualNetworkGateways API service call.
28009type VirtualNetworkGatewayListResult struct {
28010	autorest.Response `json:"-"`
28011	// Value - Gets a list of VirtualNetworkGateway resources that exists in a resource group.
28012	Value *[]VirtualNetworkGateway `json:"value,omitempty"`
28013	// NextLink - READ-ONLY; The URL to get the next set of results.
28014	NextLink *string `json:"nextLink,omitempty"`
28015}
28016
28017// MarshalJSON is the custom marshaler for VirtualNetworkGatewayListResult.
28018func (vnglr VirtualNetworkGatewayListResult) MarshalJSON() ([]byte, error) {
28019	objectMap := make(map[string]interface{})
28020	if vnglr.Value != nil {
28021		objectMap["value"] = vnglr.Value
28022	}
28023	return json.Marshal(objectMap)
28024}
28025
28026// VirtualNetworkGatewayListResultIterator provides access to a complete listing of VirtualNetworkGateway
28027// values.
28028type VirtualNetworkGatewayListResultIterator struct {
28029	i    int
28030	page VirtualNetworkGatewayListResultPage
28031}
28032
28033// NextWithContext advances to the next value.  If there was an error making
28034// the request the iterator does not advance and the error is returned.
28035func (iter *VirtualNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
28036	if tracing.IsEnabled() {
28037		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultIterator.NextWithContext")
28038		defer func() {
28039			sc := -1
28040			if iter.Response().Response.Response != nil {
28041				sc = iter.Response().Response.Response.StatusCode
28042			}
28043			tracing.EndSpan(ctx, sc, err)
28044		}()
28045	}
28046	iter.i++
28047	if iter.i < len(iter.page.Values()) {
28048		return nil
28049	}
28050	err = iter.page.NextWithContext(ctx)
28051	if err != nil {
28052		iter.i--
28053		return err
28054	}
28055	iter.i = 0
28056	return nil
28057}
28058
28059// Next advances to the next value.  If there was an error making
28060// the request the iterator does not advance and the error is returned.
28061// Deprecated: Use NextWithContext() instead.
28062func (iter *VirtualNetworkGatewayListResultIterator) Next() error {
28063	return iter.NextWithContext(context.Background())
28064}
28065
28066// NotDone returns true if the enumeration should be started or is not yet complete.
28067func (iter VirtualNetworkGatewayListResultIterator) NotDone() bool {
28068	return iter.page.NotDone() && iter.i < len(iter.page.Values())
28069}
28070
28071// Response returns the raw server response from the last page request.
28072func (iter VirtualNetworkGatewayListResultIterator) Response() VirtualNetworkGatewayListResult {
28073	return iter.page.Response()
28074}
28075
28076// Value returns the current value or a zero-initialized value if the
28077// iterator has advanced beyond the end of the collection.
28078func (iter VirtualNetworkGatewayListResultIterator) Value() VirtualNetworkGateway {
28079	if !iter.page.NotDone() {
28080		return VirtualNetworkGateway{}
28081	}
28082	return iter.page.Values()[iter.i]
28083}
28084
28085// Creates a new instance of the VirtualNetworkGatewayListResultIterator type.
28086func NewVirtualNetworkGatewayListResultIterator(page VirtualNetworkGatewayListResultPage) VirtualNetworkGatewayListResultIterator {
28087	return VirtualNetworkGatewayListResultIterator{page: page}
28088}
28089
28090// IsEmpty returns true if the ListResult contains no values.
28091func (vnglr VirtualNetworkGatewayListResult) IsEmpty() bool {
28092	return vnglr.Value == nil || len(*vnglr.Value) == 0
28093}
28094
28095// hasNextLink returns true if the NextLink is not empty.
28096func (vnglr VirtualNetworkGatewayListResult) hasNextLink() bool {
28097	return vnglr.NextLink != nil && len(*vnglr.NextLink) != 0
28098}
28099
28100// virtualNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results.
28101// It returns nil if no more results exist.
28102func (vnglr VirtualNetworkGatewayListResult) virtualNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
28103	if !vnglr.hasNextLink() {
28104		return nil, nil
28105	}
28106	return autorest.Prepare((&http.Request{}).WithContext(ctx),
28107		autorest.AsJSON(),
28108		autorest.AsGet(),
28109		autorest.WithBaseURL(to.String(vnglr.NextLink)))
28110}
28111
28112// VirtualNetworkGatewayListResultPage contains a page of VirtualNetworkGateway values.
28113type VirtualNetworkGatewayListResultPage struct {
28114	fn    func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)
28115	vnglr VirtualNetworkGatewayListResult
28116}
28117
28118// NextWithContext advances to the next page of values.  If there was an error making
28119// the request the page does not advance and the error is returned.
28120func (page *VirtualNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
28121	if tracing.IsEnabled() {
28122		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultPage.NextWithContext")
28123		defer func() {
28124			sc := -1
28125			if page.Response().Response.Response != nil {
28126				sc = page.Response().Response.Response.StatusCode
28127			}
28128			tracing.EndSpan(ctx, sc, err)
28129		}()
28130	}
28131	for {
28132		next, err := page.fn(ctx, page.vnglr)
28133		if err != nil {
28134			return err
28135		}
28136		page.vnglr = next
28137		if !next.hasNextLink() || !next.IsEmpty() {
28138			break
28139		}
28140	}
28141	return nil
28142}
28143
28144// Next advances to the next page of values.  If there was an error making
28145// the request the page does not advance and the error is returned.
28146// Deprecated: Use NextWithContext() instead.
28147func (page *VirtualNetworkGatewayListResultPage) Next() error {
28148	return page.NextWithContext(context.Background())
28149}
28150
28151// NotDone returns true if the page enumeration should be started or is not yet complete.
28152func (page VirtualNetworkGatewayListResultPage) NotDone() bool {
28153	return !page.vnglr.IsEmpty()
28154}
28155
28156// Response returns the raw server response from the last page request.
28157func (page VirtualNetworkGatewayListResultPage) Response() VirtualNetworkGatewayListResult {
28158	return page.vnglr
28159}
28160
28161// Values returns the slice of values for the current page or nil if there are no values.
28162func (page VirtualNetworkGatewayListResultPage) Values() []VirtualNetworkGateway {
28163	if page.vnglr.IsEmpty() {
28164		return nil
28165	}
28166	return *page.vnglr.Value
28167}
28168
28169// Creates a new instance of the VirtualNetworkGatewayListResultPage type.
28170func NewVirtualNetworkGatewayListResultPage(cur VirtualNetworkGatewayListResult, getNextPage func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)) VirtualNetworkGatewayListResultPage {
28171	return VirtualNetworkGatewayListResultPage{
28172		fn:    getNextPage,
28173		vnglr: cur,
28174	}
28175}
28176
28177// VirtualNetworkGatewayPropertiesFormat virtualNetworkGateway properties.
28178type VirtualNetworkGatewayPropertiesFormat struct {
28179	// IPConfigurations - IP configurations for virtual network gateway.
28180	IPConfigurations *[]VirtualNetworkGatewayIPConfiguration `json:"ipConfigurations,omitempty"`
28181	// GatewayType - The type of this virtual network gateway. Possible values include: 'VirtualNetworkGatewayTypeVpn', 'VirtualNetworkGatewayTypeExpressRoute'
28182	GatewayType VirtualNetworkGatewayType `json:"gatewayType,omitempty"`
28183	// VpnType - The type of this virtual network gateway. Possible values include: 'PolicyBased', 'RouteBased'
28184	VpnType VpnType `json:"vpnType,omitempty"`
28185	// EnableBgp - Whether BGP is enabled for this virtual network gateway or not.
28186	EnableBgp *bool `json:"enableBgp,omitempty"`
28187	// ActiveActive - ActiveActive flag.
28188	ActiveActive *bool `json:"activeActive,omitempty"`
28189	// 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.
28190	GatewayDefaultSite *SubResource `json:"gatewayDefaultSite,omitempty"`
28191	// Sku - The reference of the VirtualNetworkGatewaySku resource which represents the SKU selected for Virtual network gateway.
28192	Sku *VirtualNetworkGatewaySku `json:"sku,omitempty"`
28193	// VpnClientConfiguration - The reference of the VpnClientConfiguration resource which represents the P2S VpnClient configurations.
28194	VpnClientConfiguration *VpnClientConfiguration `json:"vpnClientConfiguration,omitempty"`
28195	// BgpSettings - Virtual network gateway's BGP speaker settings.
28196	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
28197	// 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.
28198	CustomRoutes *AddressSpace `json:"customRoutes,omitempty"`
28199	// ResourceGUID - The resource GUID property of the VirtualNetworkGateway resource.
28200	ResourceGUID *string `json:"resourceGuid,omitempty"`
28201	// ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
28202	ProvisioningState *string `json:"provisioningState,omitempty"`
28203}
28204
28205// MarshalJSON is the custom marshaler for VirtualNetworkGatewayPropertiesFormat.
28206func (vngpf VirtualNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
28207	objectMap := make(map[string]interface{})
28208	if vngpf.IPConfigurations != nil {
28209		objectMap["ipConfigurations"] = vngpf.IPConfigurations
28210	}
28211	if vngpf.GatewayType != "" {
28212		objectMap["gatewayType"] = vngpf.GatewayType
28213	}
28214	if vngpf.VpnType != "" {
28215		objectMap["vpnType"] = vngpf.VpnType
28216	}
28217	if vngpf.EnableBgp != nil {
28218		objectMap["enableBgp"] = vngpf.EnableBgp
28219	}
28220	if vngpf.ActiveActive != nil {
28221		objectMap["activeActive"] = vngpf.ActiveActive
28222	}
28223	if vngpf.GatewayDefaultSite != nil {
28224		objectMap["gatewayDefaultSite"] = vngpf.GatewayDefaultSite
28225	}
28226	if vngpf.Sku != nil {
28227		objectMap["sku"] = vngpf.Sku
28228	}
28229	if vngpf.VpnClientConfiguration != nil {
28230		objectMap["vpnClientConfiguration"] = vngpf.VpnClientConfiguration
28231	}
28232	if vngpf.BgpSettings != nil {
28233		objectMap["bgpSettings"] = vngpf.BgpSettings
28234	}
28235	if vngpf.CustomRoutes != nil {
28236		objectMap["customRoutes"] = vngpf.CustomRoutes
28237	}
28238	if vngpf.ResourceGUID != nil {
28239		objectMap["resourceGuid"] = vngpf.ResourceGUID
28240	}
28241	return json.Marshal(objectMap)
28242}
28243
28244// VirtualNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
28245// long-running operation.
28246type VirtualNetworkGatewaysCreateOrUpdateFuture struct {
28247	azure.FutureAPI
28248	// Result returns the result of the asynchronous operation.
28249	// If the operation has not completed it will return an error.
28250	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
28251}
28252
28253// VirtualNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
28254// long-running operation.
28255type VirtualNetworkGatewaysDeleteFuture struct {
28256	azure.FutureAPI
28257	// Result returns the result of the asynchronous operation.
28258	// If the operation has not completed it will return an error.
28259	Result func(VirtualNetworkGatewaysClient) (autorest.Response, error)
28260}
28261
28262// VirtualNetworkGatewaysGeneratevpnclientpackageFuture an abstraction for monitoring and retrieving the
28263// results of a long-running operation.
28264type VirtualNetworkGatewaysGeneratevpnclientpackageFuture struct {
28265	azure.FutureAPI
28266	// Result returns the result of the asynchronous operation.
28267	// If the operation has not completed it will return an error.
28268	Result func(VirtualNetworkGatewaysClient) (String, error)
28269}
28270
28271// VirtualNetworkGatewaysGenerateVpnProfileFuture an abstraction for monitoring and retrieving the results
28272// of a long-running operation.
28273type VirtualNetworkGatewaysGenerateVpnProfileFuture struct {
28274	azure.FutureAPI
28275	// Result returns the result of the asynchronous operation.
28276	// If the operation has not completed it will return an error.
28277	Result func(VirtualNetworkGatewaysClient) (String, error)
28278}
28279
28280// VirtualNetworkGatewaysGetAdvertisedRoutesFuture an abstraction for monitoring and retrieving the results
28281// of a long-running operation.
28282type VirtualNetworkGatewaysGetAdvertisedRoutesFuture struct {
28283	azure.FutureAPI
28284	// Result returns the result of the asynchronous operation.
28285	// If the operation has not completed it will return an error.
28286	Result func(VirtualNetworkGatewaysClient) (GatewayRouteListResult, error)
28287}
28288
28289// VirtualNetworkGatewaysGetBgpPeerStatusFuture an abstraction for monitoring and retrieving the results of
28290// a long-running operation.
28291type VirtualNetworkGatewaysGetBgpPeerStatusFuture struct {
28292	azure.FutureAPI
28293	// Result returns the result of the asynchronous operation.
28294	// If the operation has not completed it will return an error.
28295	Result func(VirtualNetworkGatewaysClient) (BgpPeerStatusListResult, error)
28296}
28297
28298// VirtualNetworkGatewaysGetLearnedRoutesFuture an abstraction for monitoring and retrieving the results of
28299// a long-running operation.
28300type VirtualNetworkGatewaysGetLearnedRoutesFuture struct {
28301	azure.FutureAPI
28302	// Result returns the result of the asynchronous operation.
28303	// If the operation has not completed it will return an error.
28304	Result func(VirtualNetworkGatewaysClient) (GatewayRouteListResult, error)
28305}
28306
28307// VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture an abstraction for monitoring and retrieving
28308// the results of a long-running operation.
28309type VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture struct {
28310	azure.FutureAPI
28311	// Result returns the result of the asynchronous operation.
28312	// If the operation has not completed it will return an error.
28313	Result func(VirtualNetworkGatewaysClient) (VpnClientConnectionHealthDetailListResult, error)
28314}
28315
28316// VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture an abstraction for monitoring and retrieving the
28317// results of a long-running operation.
28318type VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture struct {
28319	azure.FutureAPI
28320	// Result returns the result of the asynchronous operation.
28321	// If the operation has not completed it will return an error.
28322	Result func(VirtualNetworkGatewaysClient) (VpnClientIPsecParameters, error)
28323}
28324
28325// VirtualNetworkGatewaysGetVpnProfilePackageURLFuture an abstraction for monitoring and retrieving the
28326// results of a long-running operation.
28327type VirtualNetworkGatewaysGetVpnProfilePackageURLFuture struct {
28328	azure.FutureAPI
28329	// Result returns the result of the asynchronous operation.
28330	// If the operation has not completed it will return an error.
28331	Result func(VirtualNetworkGatewaysClient) (String, error)
28332}
28333
28334// VirtualNetworkGatewaySku virtualNetworkGatewaySku details.
28335type VirtualNetworkGatewaySku struct {
28336	// Name - Gateway SKU name. Possible values include: 'VirtualNetworkGatewaySkuNameBasic', 'VirtualNetworkGatewaySkuNameHighPerformance', 'VirtualNetworkGatewaySkuNameStandard', 'VirtualNetworkGatewaySkuNameUltraPerformance', 'VirtualNetworkGatewaySkuNameVpnGw1', 'VirtualNetworkGatewaySkuNameVpnGw2', 'VirtualNetworkGatewaySkuNameVpnGw3', 'VirtualNetworkGatewaySkuNameVpnGw1AZ', 'VirtualNetworkGatewaySkuNameVpnGw2AZ', 'VirtualNetworkGatewaySkuNameVpnGw3AZ', 'VirtualNetworkGatewaySkuNameErGw1AZ', 'VirtualNetworkGatewaySkuNameErGw2AZ', 'VirtualNetworkGatewaySkuNameErGw3AZ'
28337	Name VirtualNetworkGatewaySkuName `json:"name,omitempty"`
28338	// Tier - Gateway SKU tier. Possible values include: 'VirtualNetworkGatewaySkuTierBasic', 'VirtualNetworkGatewaySkuTierHighPerformance', 'VirtualNetworkGatewaySkuTierStandard', 'VirtualNetworkGatewaySkuTierUltraPerformance', 'VirtualNetworkGatewaySkuTierVpnGw1', 'VirtualNetworkGatewaySkuTierVpnGw2', 'VirtualNetworkGatewaySkuTierVpnGw3', 'VirtualNetworkGatewaySkuTierVpnGw1AZ', 'VirtualNetworkGatewaySkuTierVpnGw2AZ', 'VirtualNetworkGatewaySkuTierVpnGw3AZ', 'VirtualNetworkGatewaySkuTierErGw1AZ', 'VirtualNetworkGatewaySkuTierErGw2AZ', 'VirtualNetworkGatewaySkuTierErGw3AZ'
28339	Tier VirtualNetworkGatewaySkuTier `json:"tier,omitempty"`
28340	// Capacity - The capacity.
28341	Capacity *int32 `json:"capacity,omitempty"`
28342}
28343
28344// VirtualNetworkGatewaysResetFuture an abstraction for monitoring and retrieving the results of a
28345// long-running operation.
28346type VirtualNetworkGatewaysResetFuture struct {
28347	azure.FutureAPI
28348	// Result returns the result of the asynchronous operation.
28349	// If the operation has not completed it will return an error.
28350	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
28351}
28352
28353// VirtualNetworkGatewaysResetVpnClientSharedKeyFuture an abstraction for monitoring and retrieving the
28354// results of a long-running operation.
28355type VirtualNetworkGatewaysResetVpnClientSharedKeyFuture struct {
28356	azure.FutureAPI
28357	// Result returns the result of the asynchronous operation.
28358	// If the operation has not completed it will return an error.
28359	Result func(VirtualNetworkGatewaysClient) (autorest.Response, error)
28360}
28361
28362// VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture an abstraction for monitoring and retrieving the
28363// results of a long-running operation.
28364type VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture struct {
28365	azure.FutureAPI
28366	// Result returns the result of the asynchronous operation.
28367	// If the operation has not completed it will return an error.
28368	Result func(VirtualNetworkGatewaysClient) (VpnClientIPsecParameters, error)
28369}
28370
28371// VirtualNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
28372// long-running operation.
28373type VirtualNetworkGatewaysUpdateTagsFuture struct {
28374	azure.FutureAPI
28375	// Result returns the result of the asynchronous operation.
28376	// If the operation has not completed it will return an error.
28377	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
28378}
28379
28380// VirtualNetworkListResult response for the ListVirtualNetworks API service call.
28381type VirtualNetworkListResult struct {
28382	autorest.Response `json:"-"`
28383	// Value - Gets a list of VirtualNetwork resources in a resource group.
28384	Value *[]VirtualNetwork `json:"value,omitempty"`
28385	// NextLink - The URL to get the next set of results.
28386	NextLink *string `json:"nextLink,omitempty"`
28387}
28388
28389// VirtualNetworkListResultIterator provides access to a complete listing of VirtualNetwork values.
28390type VirtualNetworkListResultIterator struct {
28391	i    int
28392	page VirtualNetworkListResultPage
28393}
28394
28395// NextWithContext advances to the next value.  If there was an error making
28396// the request the iterator does not advance and the error is returned.
28397func (iter *VirtualNetworkListResultIterator) NextWithContext(ctx context.Context) (err error) {
28398	if tracing.IsEnabled() {
28399		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultIterator.NextWithContext")
28400		defer func() {
28401			sc := -1
28402			if iter.Response().Response.Response != nil {
28403				sc = iter.Response().Response.Response.StatusCode
28404			}
28405			tracing.EndSpan(ctx, sc, err)
28406		}()
28407	}
28408	iter.i++
28409	if iter.i < len(iter.page.Values()) {
28410		return nil
28411	}
28412	err = iter.page.NextWithContext(ctx)
28413	if err != nil {
28414		iter.i--
28415		return err
28416	}
28417	iter.i = 0
28418	return nil
28419}
28420
28421// Next advances to the next value.  If there was an error making
28422// the request the iterator does not advance and the error is returned.
28423// Deprecated: Use NextWithContext() instead.
28424func (iter *VirtualNetworkListResultIterator) Next() error {
28425	return iter.NextWithContext(context.Background())
28426}
28427
28428// NotDone returns true if the enumeration should be started or is not yet complete.
28429func (iter VirtualNetworkListResultIterator) NotDone() bool {
28430	return iter.page.NotDone() && iter.i < len(iter.page.Values())
28431}
28432
28433// Response returns the raw server response from the last page request.
28434func (iter VirtualNetworkListResultIterator) Response() VirtualNetworkListResult {
28435	return iter.page.Response()
28436}
28437
28438// Value returns the current value or a zero-initialized value if the
28439// iterator has advanced beyond the end of the collection.
28440func (iter VirtualNetworkListResultIterator) Value() VirtualNetwork {
28441	if !iter.page.NotDone() {
28442		return VirtualNetwork{}
28443	}
28444	return iter.page.Values()[iter.i]
28445}
28446
28447// Creates a new instance of the VirtualNetworkListResultIterator type.
28448func NewVirtualNetworkListResultIterator(page VirtualNetworkListResultPage) VirtualNetworkListResultIterator {
28449	return VirtualNetworkListResultIterator{page: page}
28450}
28451
28452// IsEmpty returns true if the ListResult contains no values.
28453func (vnlr VirtualNetworkListResult) IsEmpty() bool {
28454	return vnlr.Value == nil || len(*vnlr.Value) == 0
28455}
28456
28457// hasNextLink returns true if the NextLink is not empty.
28458func (vnlr VirtualNetworkListResult) hasNextLink() bool {
28459	return vnlr.NextLink != nil && len(*vnlr.NextLink) != 0
28460}
28461
28462// virtualNetworkListResultPreparer prepares a request to retrieve the next set of results.
28463// It returns nil if no more results exist.
28464func (vnlr VirtualNetworkListResult) virtualNetworkListResultPreparer(ctx context.Context) (*http.Request, error) {
28465	if !vnlr.hasNextLink() {
28466		return nil, nil
28467	}
28468	return autorest.Prepare((&http.Request{}).WithContext(ctx),
28469		autorest.AsJSON(),
28470		autorest.AsGet(),
28471		autorest.WithBaseURL(to.String(vnlr.NextLink)))
28472}
28473
28474// VirtualNetworkListResultPage contains a page of VirtualNetwork values.
28475type VirtualNetworkListResultPage struct {
28476	fn   func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)
28477	vnlr VirtualNetworkListResult
28478}
28479
28480// NextWithContext advances to the next page of values.  If there was an error making
28481// the request the page does not advance and the error is returned.
28482func (page *VirtualNetworkListResultPage) NextWithContext(ctx context.Context) (err error) {
28483	if tracing.IsEnabled() {
28484		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultPage.NextWithContext")
28485		defer func() {
28486			sc := -1
28487			if page.Response().Response.Response != nil {
28488				sc = page.Response().Response.Response.StatusCode
28489			}
28490			tracing.EndSpan(ctx, sc, err)
28491		}()
28492	}
28493	for {
28494		next, err := page.fn(ctx, page.vnlr)
28495		if err != nil {
28496			return err
28497		}
28498		page.vnlr = next
28499		if !next.hasNextLink() || !next.IsEmpty() {
28500			break
28501		}
28502	}
28503	return nil
28504}
28505
28506// Next advances to the next page of values.  If there was an error making
28507// the request the page does not advance and the error is returned.
28508// Deprecated: Use NextWithContext() instead.
28509func (page *VirtualNetworkListResultPage) Next() error {
28510	return page.NextWithContext(context.Background())
28511}
28512
28513// NotDone returns true if the page enumeration should be started or is not yet complete.
28514func (page VirtualNetworkListResultPage) NotDone() bool {
28515	return !page.vnlr.IsEmpty()
28516}
28517
28518// Response returns the raw server response from the last page request.
28519func (page VirtualNetworkListResultPage) Response() VirtualNetworkListResult {
28520	return page.vnlr
28521}
28522
28523// Values returns the slice of values for the current page or nil if there are no values.
28524func (page VirtualNetworkListResultPage) Values() []VirtualNetwork {
28525	if page.vnlr.IsEmpty() {
28526		return nil
28527	}
28528	return *page.vnlr.Value
28529}
28530
28531// Creates a new instance of the VirtualNetworkListResultPage type.
28532func NewVirtualNetworkListResultPage(cur VirtualNetworkListResult, getNextPage func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)) VirtualNetworkListResultPage {
28533	return VirtualNetworkListResultPage{
28534		fn:   getNextPage,
28535		vnlr: cur,
28536	}
28537}
28538
28539// VirtualNetworkListUsageResult response for the virtual networks GetUsage API service call.
28540type VirtualNetworkListUsageResult struct {
28541	autorest.Response `json:"-"`
28542	// Value - READ-ONLY; VirtualNetwork usage stats.
28543	Value *[]VirtualNetworkUsage `json:"value,omitempty"`
28544	// NextLink - The URL to get the next set of results.
28545	NextLink *string `json:"nextLink,omitempty"`
28546}
28547
28548// MarshalJSON is the custom marshaler for VirtualNetworkListUsageResult.
28549func (vnlur VirtualNetworkListUsageResult) MarshalJSON() ([]byte, error) {
28550	objectMap := make(map[string]interface{})
28551	if vnlur.NextLink != nil {
28552		objectMap["nextLink"] = vnlur.NextLink
28553	}
28554	return json.Marshal(objectMap)
28555}
28556
28557// VirtualNetworkListUsageResultIterator provides access to a complete listing of VirtualNetworkUsage
28558// values.
28559type VirtualNetworkListUsageResultIterator struct {
28560	i    int
28561	page VirtualNetworkListUsageResultPage
28562}
28563
28564// NextWithContext advances to the next value.  If there was an error making
28565// the request the iterator does not advance and the error is returned.
28566func (iter *VirtualNetworkListUsageResultIterator) NextWithContext(ctx context.Context) (err error) {
28567	if tracing.IsEnabled() {
28568		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultIterator.NextWithContext")
28569		defer func() {
28570			sc := -1
28571			if iter.Response().Response.Response != nil {
28572				sc = iter.Response().Response.Response.StatusCode
28573			}
28574			tracing.EndSpan(ctx, sc, err)
28575		}()
28576	}
28577	iter.i++
28578	if iter.i < len(iter.page.Values()) {
28579		return nil
28580	}
28581	err = iter.page.NextWithContext(ctx)
28582	if err != nil {
28583		iter.i--
28584		return err
28585	}
28586	iter.i = 0
28587	return nil
28588}
28589
28590// Next advances to the next value.  If there was an error making
28591// the request the iterator does not advance and the error is returned.
28592// Deprecated: Use NextWithContext() instead.
28593func (iter *VirtualNetworkListUsageResultIterator) Next() error {
28594	return iter.NextWithContext(context.Background())
28595}
28596
28597// NotDone returns true if the enumeration should be started or is not yet complete.
28598func (iter VirtualNetworkListUsageResultIterator) NotDone() bool {
28599	return iter.page.NotDone() && iter.i < len(iter.page.Values())
28600}
28601
28602// Response returns the raw server response from the last page request.
28603func (iter VirtualNetworkListUsageResultIterator) Response() VirtualNetworkListUsageResult {
28604	return iter.page.Response()
28605}
28606
28607// Value returns the current value or a zero-initialized value if the
28608// iterator has advanced beyond the end of the collection.
28609func (iter VirtualNetworkListUsageResultIterator) Value() VirtualNetworkUsage {
28610	if !iter.page.NotDone() {
28611		return VirtualNetworkUsage{}
28612	}
28613	return iter.page.Values()[iter.i]
28614}
28615
28616// Creates a new instance of the VirtualNetworkListUsageResultIterator type.
28617func NewVirtualNetworkListUsageResultIterator(page VirtualNetworkListUsageResultPage) VirtualNetworkListUsageResultIterator {
28618	return VirtualNetworkListUsageResultIterator{page: page}
28619}
28620
28621// IsEmpty returns true if the ListResult contains no values.
28622func (vnlur VirtualNetworkListUsageResult) IsEmpty() bool {
28623	return vnlur.Value == nil || len(*vnlur.Value) == 0
28624}
28625
28626// hasNextLink returns true if the NextLink is not empty.
28627func (vnlur VirtualNetworkListUsageResult) hasNextLink() bool {
28628	return vnlur.NextLink != nil && len(*vnlur.NextLink) != 0
28629}
28630
28631// virtualNetworkListUsageResultPreparer prepares a request to retrieve the next set of results.
28632// It returns nil if no more results exist.
28633func (vnlur VirtualNetworkListUsageResult) virtualNetworkListUsageResultPreparer(ctx context.Context) (*http.Request, error) {
28634	if !vnlur.hasNextLink() {
28635		return nil, nil
28636	}
28637	return autorest.Prepare((&http.Request{}).WithContext(ctx),
28638		autorest.AsJSON(),
28639		autorest.AsGet(),
28640		autorest.WithBaseURL(to.String(vnlur.NextLink)))
28641}
28642
28643// VirtualNetworkListUsageResultPage contains a page of VirtualNetworkUsage values.
28644type VirtualNetworkListUsageResultPage struct {
28645	fn    func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)
28646	vnlur VirtualNetworkListUsageResult
28647}
28648
28649// NextWithContext advances to the next page of values.  If there was an error making
28650// the request the page does not advance and the error is returned.
28651func (page *VirtualNetworkListUsageResultPage) NextWithContext(ctx context.Context) (err error) {
28652	if tracing.IsEnabled() {
28653		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultPage.NextWithContext")
28654		defer func() {
28655			sc := -1
28656			if page.Response().Response.Response != nil {
28657				sc = page.Response().Response.Response.StatusCode
28658			}
28659			tracing.EndSpan(ctx, sc, err)
28660		}()
28661	}
28662	for {
28663		next, err := page.fn(ctx, page.vnlur)
28664		if err != nil {
28665			return err
28666		}
28667		page.vnlur = next
28668		if !next.hasNextLink() || !next.IsEmpty() {
28669			break
28670		}
28671	}
28672	return nil
28673}
28674
28675// Next advances to the next page of values.  If there was an error making
28676// the request the page does not advance and the error is returned.
28677// Deprecated: Use NextWithContext() instead.
28678func (page *VirtualNetworkListUsageResultPage) Next() error {
28679	return page.NextWithContext(context.Background())
28680}
28681
28682// NotDone returns true if the page enumeration should be started or is not yet complete.
28683func (page VirtualNetworkListUsageResultPage) NotDone() bool {
28684	return !page.vnlur.IsEmpty()
28685}
28686
28687// Response returns the raw server response from the last page request.
28688func (page VirtualNetworkListUsageResultPage) Response() VirtualNetworkListUsageResult {
28689	return page.vnlur
28690}
28691
28692// Values returns the slice of values for the current page or nil if there are no values.
28693func (page VirtualNetworkListUsageResultPage) Values() []VirtualNetworkUsage {
28694	if page.vnlur.IsEmpty() {
28695		return nil
28696	}
28697	return *page.vnlur.Value
28698}
28699
28700// Creates a new instance of the VirtualNetworkListUsageResultPage type.
28701func NewVirtualNetworkListUsageResultPage(cur VirtualNetworkListUsageResult, getNextPage func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)) VirtualNetworkListUsageResultPage {
28702	return VirtualNetworkListUsageResultPage{
28703		fn:    getNextPage,
28704		vnlur: cur,
28705	}
28706}
28707
28708// VirtualNetworkPeering peerings in a virtual network resource.
28709type VirtualNetworkPeering struct {
28710	autorest.Response `json:"-"`
28711	// VirtualNetworkPeeringPropertiesFormat - Properties of the virtual network peering.
28712	*VirtualNetworkPeeringPropertiesFormat `json:"properties,omitempty"`
28713	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
28714	Name *string `json:"name,omitempty"`
28715	// Etag - A unique read-only string that changes whenever the resource is updated.
28716	Etag *string `json:"etag,omitempty"`
28717	// ID - Resource ID.
28718	ID *string `json:"id,omitempty"`
28719}
28720
28721// MarshalJSON is the custom marshaler for VirtualNetworkPeering.
28722func (vnp VirtualNetworkPeering) MarshalJSON() ([]byte, error) {
28723	objectMap := make(map[string]interface{})
28724	if vnp.VirtualNetworkPeeringPropertiesFormat != nil {
28725		objectMap["properties"] = vnp.VirtualNetworkPeeringPropertiesFormat
28726	}
28727	if vnp.Name != nil {
28728		objectMap["name"] = vnp.Name
28729	}
28730	if vnp.Etag != nil {
28731		objectMap["etag"] = vnp.Etag
28732	}
28733	if vnp.ID != nil {
28734		objectMap["id"] = vnp.ID
28735	}
28736	return json.Marshal(objectMap)
28737}
28738
28739// UnmarshalJSON is the custom unmarshaler for VirtualNetworkPeering struct.
28740func (vnp *VirtualNetworkPeering) UnmarshalJSON(body []byte) error {
28741	var m map[string]*json.RawMessage
28742	err := json.Unmarshal(body, &m)
28743	if err != nil {
28744		return err
28745	}
28746	for k, v := range m {
28747		switch k {
28748		case "properties":
28749			if v != nil {
28750				var virtualNetworkPeeringPropertiesFormat VirtualNetworkPeeringPropertiesFormat
28751				err = json.Unmarshal(*v, &virtualNetworkPeeringPropertiesFormat)
28752				if err != nil {
28753					return err
28754				}
28755				vnp.VirtualNetworkPeeringPropertiesFormat = &virtualNetworkPeeringPropertiesFormat
28756			}
28757		case "name":
28758			if v != nil {
28759				var name string
28760				err = json.Unmarshal(*v, &name)
28761				if err != nil {
28762					return err
28763				}
28764				vnp.Name = &name
28765			}
28766		case "etag":
28767			if v != nil {
28768				var etag string
28769				err = json.Unmarshal(*v, &etag)
28770				if err != nil {
28771					return err
28772				}
28773				vnp.Etag = &etag
28774			}
28775		case "id":
28776			if v != nil {
28777				var ID string
28778				err = json.Unmarshal(*v, &ID)
28779				if err != nil {
28780					return err
28781				}
28782				vnp.ID = &ID
28783			}
28784		}
28785	}
28786
28787	return nil
28788}
28789
28790// VirtualNetworkPeeringListResult response for ListSubnets API service call. Retrieves all subnets that
28791// belong to a virtual network.
28792type VirtualNetworkPeeringListResult struct {
28793	autorest.Response `json:"-"`
28794	// Value - The peerings in a virtual network.
28795	Value *[]VirtualNetworkPeering `json:"value,omitempty"`
28796	// NextLink - The URL to get the next set of results.
28797	NextLink *string `json:"nextLink,omitempty"`
28798}
28799
28800// VirtualNetworkPeeringListResultIterator provides access to a complete listing of VirtualNetworkPeering
28801// values.
28802type VirtualNetworkPeeringListResultIterator struct {
28803	i    int
28804	page VirtualNetworkPeeringListResultPage
28805}
28806
28807// NextWithContext advances to the next value.  If there was an error making
28808// the request the iterator does not advance and the error is returned.
28809func (iter *VirtualNetworkPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
28810	if tracing.IsEnabled() {
28811		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultIterator.NextWithContext")
28812		defer func() {
28813			sc := -1
28814			if iter.Response().Response.Response != nil {
28815				sc = iter.Response().Response.Response.StatusCode
28816			}
28817			tracing.EndSpan(ctx, sc, err)
28818		}()
28819	}
28820	iter.i++
28821	if iter.i < len(iter.page.Values()) {
28822		return nil
28823	}
28824	err = iter.page.NextWithContext(ctx)
28825	if err != nil {
28826		iter.i--
28827		return err
28828	}
28829	iter.i = 0
28830	return nil
28831}
28832
28833// Next advances to the next value.  If there was an error making
28834// the request the iterator does not advance and the error is returned.
28835// Deprecated: Use NextWithContext() instead.
28836func (iter *VirtualNetworkPeeringListResultIterator) Next() error {
28837	return iter.NextWithContext(context.Background())
28838}
28839
28840// NotDone returns true if the enumeration should be started or is not yet complete.
28841func (iter VirtualNetworkPeeringListResultIterator) NotDone() bool {
28842	return iter.page.NotDone() && iter.i < len(iter.page.Values())
28843}
28844
28845// Response returns the raw server response from the last page request.
28846func (iter VirtualNetworkPeeringListResultIterator) Response() VirtualNetworkPeeringListResult {
28847	return iter.page.Response()
28848}
28849
28850// Value returns the current value or a zero-initialized value if the
28851// iterator has advanced beyond the end of the collection.
28852func (iter VirtualNetworkPeeringListResultIterator) Value() VirtualNetworkPeering {
28853	if !iter.page.NotDone() {
28854		return VirtualNetworkPeering{}
28855	}
28856	return iter.page.Values()[iter.i]
28857}
28858
28859// Creates a new instance of the VirtualNetworkPeeringListResultIterator type.
28860func NewVirtualNetworkPeeringListResultIterator(page VirtualNetworkPeeringListResultPage) VirtualNetworkPeeringListResultIterator {
28861	return VirtualNetworkPeeringListResultIterator{page: page}
28862}
28863
28864// IsEmpty returns true if the ListResult contains no values.
28865func (vnplr VirtualNetworkPeeringListResult) IsEmpty() bool {
28866	return vnplr.Value == nil || len(*vnplr.Value) == 0
28867}
28868
28869// hasNextLink returns true if the NextLink is not empty.
28870func (vnplr VirtualNetworkPeeringListResult) hasNextLink() bool {
28871	return vnplr.NextLink != nil && len(*vnplr.NextLink) != 0
28872}
28873
28874// virtualNetworkPeeringListResultPreparer prepares a request to retrieve the next set of results.
28875// It returns nil if no more results exist.
28876func (vnplr VirtualNetworkPeeringListResult) virtualNetworkPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
28877	if !vnplr.hasNextLink() {
28878		return nil, nil
28879	}
28880	return autorest.Prepare((&http.Request{}).WithContext(ctx),
28881		autorest.AsJSON(),
28882		autorest.AsGet(),
28883		autorest.WithBaseURL(to.String(vnplr.NextLink)))
28884}
28885
28886// VirtualNetworkPeeringListResultPage contains a page of VirtualNetworkPeering values.
28887type VirtualNetworkPeeringListResultPage struct {
28888	fn    func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)
28889	vnplr VirtualNetworkPeeringListResult
28890}
28891
28892// NextWithContext advances to the next page of values.  If there was an error making
28893// the request the page does not advance and the error is returned.
28894func (page *VirtualNetworkPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
28895	if tracing.IsEnabled() {
28896		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultPage.NextWithContext")
28897		defer func() {
28898			sc := -1
28899			if page.Response().Response.Response != nil {
28900				sc = page.Response().Response.Response.StatusCode
28901			}
28902			tracing.EndSpan(ctx, sc, err)
28903		}()
28904	}
28905	for {
28906		next, err := page.fn(ctx, page.vnplr)
28907		if err != nil {
28908			return err
28909		}
28910		page.vnplr = next
28911		if !next.hasNextLink() || !next.IsEmpty() {
28912			break
28913		}
28914	}
28915	return nil
28916}
28917
28918// Next advances to the next page of values.  If there was an error making
28919// the request the page does not advance and the error is returned.
28920// Deprecated: Use NextWithContext() instead.
28921func (page *VirtualNetworkPeeringListResultPage) Next() error {
28922	return page.NextWithContext(context.Background())
28923}
28924
28925// NotDone returns true if the page enumeration should be started or is not yet complete.
28926func (page VirtualNetworkPeeringListResultPage) NotDone() bool {
28927	return !page.vnplr.IsEmpty()
28928}
28929
28930// Response returns the raw server response from the last page request.
28931func (page VirtualNetworkPeeringListResultPage) Response() VirtualNetworkPeeringListResult {
28932	return page.vnplr
28933}
28934
28935// Values returns the slice of values for the current page or nil if there are no values.
28936func (page VirtualNetworkPeeringListResultPage) Values() []VirtualNetworkPeering {
28937	if page.vnplr.IsEmpty() {
28938		return nil
28939	}
28940	return *page.vnplr.Value
28941}
28942
28943// Creates a new instance of the VirtualNetworkPeeringListResultPage type.
28944func NewVirtualNetworkPeeringListResultPage(cur VirtualNetworkPeeringListResult, getNextPage func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)) VirtualNetworkPeeringListResultPage {
28945	return VirtualNetworkPeeringListResultPage{
28946		fn:    getNextPage,
28947		vnplr: cur,
28948	}
28949}
28950
28951// VirtualNetworkPeeringPropertiesFormat properties of the virtual network peering.
28952type VirtualNetworkPeeringPropertiesFormat struct {
28953	// AllowVirtualNetworkAccess - Whether the VMs in the local virtual network space would be able to access the VMs in remote virtual network space.
28954	AllowVirtualNetworkAccess *bool `json:"allowVirtualNetworkAccess,omitempty"`
28955	// AllowForwardedTraffic - Whether the forwarded traffic from the VMs in the local virtual network will be allowed/disallowed in remote virtual network.
28956	AllowForwardedTraffic *bool `json:"allowForwardedTraffic,omitempty"`
28957	// AllowGatewayTransit - If gateway links can be used in remote virtual networking to link to this virtual network.
28958	AllowGatewayTransit *bool `json:"allowGatewayTransit,omitempty"`
28959	// 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.
28960	UseRemoteGateways *bool `json:"useRemoteGateways,omitempty"`
28961	// 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).
28962	RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"`
28963	// RemoteAddressSpace - The reference of the remote virtual network address space.
28964	RemoteAddressSpace *AddressSpace `json:"remoteAddressSpace,omitempty"`
28965	// PeeringState - The status of the virtual network peering. Possible values include: 'VirtualNetworkPeeringStateInitiated', 'VirtualNetworkPeeringStateConnected', 'VirtualNetworkPeeringStateDisconnected'
28966	PeeringState VirtualNetworkPeeringState `json:"peeringState,omitempty"`
28967	// ProvisioningState - The provisioning state of the resource.
28968	ProvisioningState *string `json:"provisioningState,omitempty"`
28969}
28970
28971// VirtualNetworkPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
28972// long-running operation.
28973type VirtualNetworkPeeringsCreateOrUpdateFuture struct {
28974	azure.FutureAPI
28975	// Result returns the result of the asynchronous operation.
28976	// If the operation has not completed it will return an error.
28977	Result func(VirtualNetworkPeeringsClient) (VirtualNetworkPeering, error)
28978}
28979
28980// VirtualNetworkPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
28981// long-running operation.
28982type VirtualNetworkPeeringsDeleteFuture struct {
28983	azure.FutureAPI
28984	// Result returns the result of the asynchronous operation.
28985	// If the operation has not completed it will return an error.
28986	Result func(VirtualNetworkPeeringsClient) (autorest.Response, error)
28987}
28988
28989// VirtualNetworkPropertiesFormat properties of the virtual network.
28990type VirtualNetworkPropertiesFormat struct {
28991	// AddressSpace - The AddressSpace that contains an array of IP address ranges that can be used by subnets.
28992	AddressSpace *AddressSpace `json:"addressSpace,omitempty"`
28993	// DhcpOptions - The dhcpOptions that contains an array of DNS servers available to VMs deployed in the virtual network.
28994	DhcpOptions *DhcpOptions `json:"dhcpOptions,omitempty"`
28995	// Subnets - A list of subnets in a Virtual Network.
28996	Subnets *[]Subnet `json:"subnets,omitempty"`
28997	// VirtualNetworkPeerings - A list of peerings in a Virtual Network.
28998	VirtualNetworkPeerings *[]VirtualNetworkPeering `json:"virtualNetworkPeerings,omitempty"`
28999	// ResourceGUID - The resourceGuid property of the Virtual Network resource.
29000	ResourceGUID *string `json:"resourceGuid,omitempty"`
29001	// ProvisioningState - The provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
29002	ProvisioningState *string `json:"provisioningState,omitempty"`
29003	// 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.
29004	EnableDdosProtection *bool `json:"enableDdosProtection,omitempty"`
29005	// EnableVMProtection - Indicates if VM protection is enabled for all the subnets in the virtual network.
29006	EnableVMProtection *bool `json:"enableVmProtection,omitempty"`
29007	// DdosProtectionPlan - The DDoS protection plan associated with the virtual network.
29008	DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"`
29009}
29010
29011// VirtualNetworksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
29012// long-running operation.
29013type VirtualNetworksCreateOrUpdateFuture struct {
29014	azure.FutureAPI
29015	// Result returns the result of the asynchronous operation.
29016	// If the operation has not completed it will return an error.
29017	Result func(VirtualNetworksClient) (VirtualNetwork, error)
29018}
29019
29020// VirtualNetworksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
29021// operation.
29022type VirtualNetworksDeleteFuture struct {
29023	azure.FutureAPI
29024	// Result returns the result of the asynchronous operation.
29025	// If the operation has not completed it will return an error.
29026	Result func(VirtualNetworksClient) (autorest.Response, error)
29027}
29028
29029// VirtualNetworksUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
29030// long-running operation.
29031type VirtualNetworksUpdateTagsFuture struct {
29032	azure.FutureAPI
29033	// Result returns the result of the asynchronous operation.
29034	// If the operation has not completed it will return an error.
29035	Result func(VirtualNetworksClient) (VirtualNetwork, error)
29036}
29037
29038// VirtualNetworkTap virtual Network Tap resource.
29039type VirtualNetworkTap struct {
29040	autorest.Response `json:"-"`
29041	// VirtualNetworkTapPropertiesFormat - Virtual Network Tap Properties.
29042	*VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"`
29043	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
29044	Etag *string `json:"etag,omitempty"`
29045	// ID - Resource ID.
29046	ID *string `json:"id,omitempty"`
29047	// Name - READ-ONLY; Resource name.
29048	Name *string `json:"name,omitempty"`
29049	// Type - READ-ONLY; Resource type.
29050	Type *string `json:"type,omitempty"`
29051	// Location - Resource location.
29052	Location *string `json:"location,omitempty"`
29053	// Tags - Resource tags.
29054	Tags map[string]*string `json:"tags"`
29055}
29056
29057// MarshalJSON is the custom marshaler for VirtualNetworkTap.
29058func (vnt VirtualNetworkTap) MarshalJSON() ([]byte, error) {
29059	objectMap := make(map[string]interface{})
29060	if vnt.VirtualNetworkTapPropertiesFormat != nil {
29061		objectMap["properties"] = vnt.VirtualNetworkTapPropertiesFormat
29062	}
29063	if vnt.Etag != nil {
29064		objectMap["etag"] = vnt.Etag
29065	}
29066	if vnt.ID != nil {
29067		objectMap["id"] = vnt.ID
29068	}
29069	if vnt.Location != nil {
29070		objectMap["location"] = vnt.Location
29071	}
29072	if vnt.Tags != nil {
29073		objectMap["tags"] = vnt.Tags
29074	}
29075	return json.Marshal(objectMap)
29076}
29077
29078// UnmarshalJSON is the custom unmarshaler for VirtualNetworkTap struct.
29079func (vnt *VirtualNetworkTap) UnmarshalJSON(body []byte) error {
29080	var m map[string]*json.RawMessage
29081	err := json.Unmarshal(body, &m)
29082	if err != nil {
29083		return err
29084	}
29085	for k, v := range m {
29086		switch k {
29087		case "properties":
29088			if v != nil {
29089				var virtualNetworkTapPropertiesFormat VirtualNetworkTapPropertiesFormat
29090				err = json.Unmarshal(*v, &virtualNetworkTapPropertiesFormat)
29091				if err != nil {
29092					return err
29093				}
29094				vnt.VirtualNetworkTapPropertiesFormat = &virtualNetworkTapPropertiesFormat
29095			}
29096		case "etag":
29097			if v != nil {
29098				var etag string
29099				err = json.Unmarshal(*v, &etag)
29100				if err != nil {
29101					return err
29102				}
29103				vnt.Etag = &etag
29104			}
29105		case "id":
29106			if v != nil {
29107				var ID string
29108				err = json.Unmarshal(*v, &ID)
29109				if err != nil {
29110					return err
29111				}
29112				vnt.ID = &ID
29113			}
29114		case "name":
29115			if v != nil {
29116				var name string
29117				err = json.Unmarshal(*v, &name)
29118				if err != nil {
29119					return err
29120				}
29121				vnt.Name = &name
29122			}
29123		case "type":
29124			if v != nil {
29125				var typeVar string
29126				err = json.Unmarshal(*v, &typeVar)
29127				if err != nil {
29128					return err
29129				}
29130				vnt.Type = &typeVar
29131			}
29132		case "location":
29133			if v != nil {
29134				var location string
29135				err = json.Unmarshal(*v, &location)
29136				if err != nil {
29137					return err
29138				}
29139				vnt.Location = &location
29140			}
29141		case "tags":
29142			if v != nil {
29143				var tags map[string]*string
29144				err = json.Unmarshal(*v, &tags)
29145				if err != nil {
29146					return err
29147				}
29148				vnt.Tags = tags
29149			}
29150		}
29151	}
29152
29153	return nil
29154}
29155
29156// VirtualNetworkTapListResult response for ListVirtualNetworkTap API service call.
29157type VirtualNetworkTapListResult struct {
29158	autorest.Response `json:"-"`
29159	// Value - A list of VirtualNetworkTaps in a resource group.
29160	Value *[]VirtualNetworkTap `json:"value,omitempty"`
29161	// NextLink - The URL to get the next set of results.
29162	NextLink *string `json:"nextLink,omitempty"`
29163}
29164
29165// VirtualNetworkTapListResultIterator provides access to a complete listing of VirtualNetworkTap values.
29166type VirtualNetworkTapListResultIterator struct {
29167	i    int
29168	page VirtualNetworkTapListResultPage
29169}
29170
29171// NextWithContext advances to the next value.  If there was an error making
29172// the request the iterator does not advance and the error is returned.
29173func (iter *VirtualNetworkTapListResultIterator) NextWithContext(ctx context.Context) (err error) {
29174	if tracing.IsEnabled() {
29175		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapListResultIterator.NextWithContext")
29176		defer func() {
29177			sc := -1
29178			if iter.Response().Response.Response != nil {
29179				sc = iter.Response().Response.Response.StatusCode
29180			}
29181			tracing.EndSpan(ctx, sc, err)
29182		}()
29183	}
29184	iter.i++
29185	if iter.i < len(iter.page.Values()) {
29186		return nil
29187	}
29188	err = iter.page.NextWithContext(ctx)
29189	if err != nil {
29190		iter.i--
29191		return err
29192	}
29193	iter.i = 0
29194	return nil
29195}
29196
29197// Next advances to the next value.  If there was an error making
29198// the request the iterator does not advance and the error is returned.
29199// Deprecated: Use NextWithContext() instead.
29200func (iter *VirtualNetworkTapListResultIterator) Next() error {
29201	return iter.NextWithContext(context.Background())
29202}
29203
29204// NotDone returns true if the enumeration should be started or is not yet complete.
29205func (iter VirtualNetworkTapListResultIterator) NotDone() bool {
29206	return iter.page.NotDone() && iter.i < len(iter.page.Values())
29207}
29208
29209// Response returns the raw server response from the last page request.
29210func (iter VirtualNetworkTapListResultIterator) Response() VirtualNetworkTapListResult {
29211	return iter.page.Response()
29212}
29213
29214// Value returns the current value or a zero-initialized value if the
29215// iterator has advanced beyond the end of the collection.
29216func (iter VirtualNetworkTapListResultIterator) Value() VirtualNetworkTap {
29217	if !iter.page.NotDone() {
29218		return VirtualNetworkTap{}
29219	}
29220	return iter.page.Values()[iter.i]
29221}
29222
29223// Creates a new instance of the VirtualNetworkTapListResultIterator type.
29224func NewVirtualNetworkTapListResultIterator(page VirtualNetworkTapListResultPage) VirtualNetworkTapListResultIterator {
29225	return VirtualNetworkTapListResultIterator{page: page}
29226}
29227
29228// IsEmpty returns true if the ListResult contains no values.
29229func (vntlr VirtualNetworkTapListResult) IsEmpty() bool {
29230	return vntlr.Value == nil || len(*vntlr.Value) == 0
29231}
29232
29233// hasNextLink returns true if the NextLink is not empty.
29234func (vntlr VirtualNetworkTapListResult) hasNextLink() bool {
29235	return vntlr.NextLink != nil && len(*vntlr.NextLink) != 0
29236}
29237
29238// virtualNetworkTapListResultPreparer prepares a request to retrieve the next set of results.
29239// It returns nil if no more results exist.
29240func (vntlr VirtualNetworkTapListResult) virtualNetworkTapListResultPreparer(ctx context.Context) (*http.Request, error) {
29241	if !vntlr.hasNextLink() {
29242		return nil, nil
29243	}
29244	return autorest.Prepare((&http.Request{}).WithContext(ctx),
29245		autorest.AsJSON(),
29246		autorest.AsGet(),
29247		autorest.WithBaseURL(to.String(vntlr.NextLink)))
29248}
29249
29250// VirtualNetworkTapListResultPage contains a page of VirtualNetworkTap values.
29251type VirtualNetworkTapListResultPage struct {
29252	fn    func(context.Context, VirtualNetworkTapListResult) (VirtualNetworkTapListResult, error)
29253	vntlr VirtualNetworkTapListResult
29254}
29255
29256// NextWithContext advances to the next page of values.  If there was an error making
29257// the request the page does not advance and the error is returned.
29258func (page *VirtualNetworkTapListResultPage) NextWithContext(ctx context.Context) (err error) {
29259	if tracing.IsEnabled() {
29260		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapListResultPage.NextWithContext")
29261		defer func() {
29262			sc := -1
29263			if page.Response().Response.Response != nil {
29264				sc = page.Response().Response.Response.StatusCode
29265			}
29266			tracing.EndSpan(ctx, sc, err)
29267		}()
29268	}
29269	for {
29270		next, err := page.fn(ctx, page.vntlr)
29271		if err != nil {
29272			return err
29273		}
29274		page.vntlr = next
29275		if !next.hasNextLink() || !next.IsEmpty() {
29276			break
29277		}
29278	}
29279	return nil
29280}
29281
29282// Next advances to the next page of values.  If there was an error making
29283// the request the page does not advance and the error is returned.
29284// Deprecated: Use NextWithContext() instead.
29285func (page *VirtualNetworkTapListResultPage) Next() error {
29286	return page.NextWithContext(context.Background())
29287}
29288
29289// NotDone returns true if the page enumeration should be started or is not yet complete.
29290func (page VirtualNetworkTapListResultPage) NotDone() bool {
29291	return !page.vntlr.IsEmpty()
29292}
29293
29294// Response returns the raw server response from the last page request.
29295func (page VirtualNetworkTapListResultPage) Response() VirtualNetworkTapListResult {
29296	return page.vntlr
29297}
29298
29299// Values returns the slice of values for the current page or nil if there are no values.
29300func (page VirtualNetworkTapListResultPage) Values() []VirtualNetworkTap {
29301	if page.vntlr.IsEmpty() {
29302		return nil
29303	}
29304	return *page.vntlr.Value
29305}
29306
29307// Creates a new instance of the VirtualNetworkTapListResultPage type.
29308func NewVirtualNetworkTapListResultPage(cur VirtualNetworkTapListResult, getNextPage func(context.Context, VirtualNetworkTapListResult) (VirtualNetworkTapListResult, error)) VirtualNetworkTapListResultPage {
29309	return VirtualNetworkTapListResultPage{
29310		fn:    getNextPage,
29311		vntlr: cur,
29312	}
29313}
29314
29315// VirtualNetworkTapPropertiesFormat virtual Network Tap properties.
29316type VirtualNetworkTapPropertiesFormat struct {
29317	// NetworkInterfaceTapConfigurations - READ-ONLY; Specifies the list of resource IDs for the network interface IP configuration that needs to be tapped.
29318	NetworkInterfaceTapConfigurations *[]InterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"`
29319	// ResourceGUID - READ-ONLY; The resourceGuid property of the virtual network tap.
29320	ResourceGUID *string `json:"resourceGuid,omitempty"`
29321	// ProvisioningState - READ-ONLY; The provisioning state of the virtual network tap. Possible values are: 'Updating', 'Deleting', and 'Failed'.
29322	ProvisioningState *string `json:"provisioningState,omitempty"`
29323	// DestinationNetworkInterfaceIPConfiguration - The reference to the private IP Address of the collector nic that will receive the tap.
29324	DestinationNetworkInterfaceIPConfiguration *InterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"`
29325	// DestinationLoadBalancerFrontEndIPConfiguration - The reference to the private IP address on the internal Load Balancer that will receive the tap.
29326	DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"`
29327	// DestinationPort - The VXLAN destination port that will receive the tapped traffic.
29328	DestinationPort *int32 `json:"destinationPort,omitempty"`
29329}
29330
29331// MarshalJSON is the custom marshaler for VirtualNetworkTapPropertiesFormat.
29332func (vntpf VirtualNetworkTapPropertiesFormat) MarshalJSON() ([]byte, error) {
29333	objectMap := make(map[string]interface{})
29334	if vntpf.DestinationNetworkInterfaceIPConfiguration != nil {
29335		objectMap["destinationNetworkInterfaceIPConfiguration"] = vntpf.DestinationNetworkInterfaceIPConfiguration
29336	}
29337	if vntpf.DestinationLoadBalancerFrontEndIPConfiguration != nil {
29338		objectMap["destinationLoadBalancerFrontEndIPConfiguration"] = vntpf.DestinationLoadBalancerFrontEndIPConfiguration
29339	}
29340	if vntpf.DestinationPort != nil {
29341		objectMap["destinationPort"] = vntpf.DestinationPort
29342	}
29343	return json.Marshal(objectMap)
29344}
29345
29346// VirtualNetworkTapsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
29347// long-running operation.
29348type VirtualNetworkTapsCreateOrUpdateFuture struct {
29349	azure.FutureAPI
29350	// Result returns the result of the asynchronous operation.
29351	// If the operation has not completed it will return an error.
29352	Result func(VirtualNetworkTapsClient) (VirtualNetworkTap, error)
29353}
29354
29355// VirtualNetworkTapsDeleteFuture an abstraction for monitoring and retrieving the results of a
29356// long-running operation.
29357type VirtualNetworkTapsDeleteFuture struct {
29358	azure.FutureAPI
29359	// Result returns the result of the asynchronous operation.
29360	// If the operation has not completed it will return an error.
29361	Result func(VirtualNetworkTapsClient) (autorest.Response, error)
29362}
29363
29364// VirtualNetworkTapsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
29365// long-running operation.
29366type VirtualNetworkTapsUpdateTagsFuture struct {
29367	azure.FutureAPI
29368	// Result returns the result of the asynchronous operation.
29369	// If the operation has not completed it will return an error.
29370	Result func(VirtualNetworkTapsClient) (VirtualNetworkTap, error)
29371}
29372
29373// VirtualNetworkUsage usage details for subnet.
29374type VirtualNetworkUsage struct {
29375	// CurrentValue - READ-ONLY; Indicates number of IPs used from the Subnet.
29376	CurrentValue *float64 `json:"currentValue,omitempty"`
29377	// ID - READ-ONLY; Subnet identifier.
29378	ID *string `json:"id,omitempty"`
29379	// Limit - READ-ONLY; Indicates the size of the subnet.
29380	Limit *float64 `json:"limit,omitempty"`
29381	// Name - READ-ONLY; The name containing common and localized value for usage.
29382	Name *VirtualNetworkUsageName `json:"name,omitempty"`
29383	// Unit - READ-ONLY; Usage units. Returns 'Count'.
29384	Unit *string `json:"unit,omitempty"`
29385}
29386
29387// VirtualNetworkUsageName usage strings container.
29388type VirtualNetworkUsageName struct {
29389	// LocalizedValue - READ-ONLY; Localized subnet size and usage string.
29390	LocalizedValue *string `json:"localizedValue,omitempty"`
29391	// Value - READ-ONLY; Subnet size and usage string.
29392	Value *string `json:"value,omitempty"`
29393}
29394
29395// VirtualWAN virtualWAN Resource.
29396type VirtualWAN struct {
29397	autorest.Response `json:"-"`
29398	// VirtualWanProperties - Properties of the virtual WAN.
29399	*VirtualWanProperties `json:"properties,omitempty"`
29400	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
29401	Etag *string `json:"etag,omitempty"`
29402	// ID - Resource ID.
29403	ID *string `json:"id,omitempty"`
29404	// Name - READ-ONLY; Resource name.
29405	Name *string `json:"name,omitempty"`
29406	// Type - READ-ONLY; Resource type.
29407	Type *string `json:"type,omitempty"`
29408	// Location - Resource location.
29409	Location *string `json:"location,omitempty"`
29410	// Tags - Resource tags.
29411	Tags map[string]*string `json:"tags"`
29412}
29413
29414// MarshalJSON is the custom marshaler for VirtualWAN.
29415func (vw VirtualWAN) MarshalJSON() ([]byte, error) {
29416	objectMap := make(map[string]interface{})
29417	if vw.VirtualWanProperties != nil {
29418		objectMap["properties"] = vw.VirtualWanProperties
29419	}
29420	if vw.ID != nil {
29421		objectMap["id"] = vw.ID
29422	}
29423	if vw.Location != nil {
29424		objectMap["location"] = vw.Location
29425	}
29426	if vw.Tags != nil {
29427		objectMap["tags"] = vw.Tags
29428	}
29429	return json.Marshal(objectMap)
29430}
29431
29432// UnmarshalJSON is the custom unmarshaler for VirtualWAN struct.
29433func (vw *VirtualWAN) UnmarshalJSON(body []byte) error {
29434	var m map[string]*json.RawMessage
29435	err := json.Unmarshal(body, &m)
29436	if err != nil {
29437		return err
29438	}
29439	for k, v := range m {
29440		switch k {
29441		case "properties":
29442			if v != nil {
29443				var virtualWanProperties VirtualWanProperties
29444				err = json.Unmarshal(*v, &virtualWanProperties)
29445				if err != nil {
29446					return err
29447				}
29448				vw.VirtualWanProperties = &virtualWanProperties
29449			}
29450		case "etag":
29451			if v != nil {
29452				var etag string
29453				err = json.Unmarshal(*v, &etag)
29454				if err != nil {
29455					return err
29456				}
29457				vw.Etag = &etag
29458			}
29459		case "id":
29460			if v != nil {
29461				var ID string
29462				err = json.Unmarshal(*v, &ID)
29463				if err != nil {
29464					return err
29465				}
29466				vw.ID = &ID
29467			}
29468		case "name":
29469			if v != nil {
29470				var name string
29471				err = json.Unmarshal(*v, &name)
29472				if err != nil {
29473					return err
29474				}
29475				vw.Name = &name
29476			}
29477		case "type":
29478			if v != nil {
29479				var typeVar string
29480				err = json.Unmarshal(*v, &typeVar)
29481				if err != nil {
29482					return err
29483				}
29484				vw.Type = &typeVar
29485			}
29486		case "location":
29487			if v != nil {
29488				var location string
29489				err = json.Unmarshal(*v, &location)
29490				if err != nil {
29491					return err
29492				}
29493				vw.Location = &location
29494			}
29495		case "tags":
29496			if v != nil {
29497				var tags map[string]*string
29498				err = json.Unmarshal(*v, &tags)
29499				if err != nil {
29500					return err
29501				}
29502				vw.Tags = tags
29503			}
29504		}
29505	}
29506
29507	return nil
29508}
29509
29510// VirtualWanProperties parameters for VirtualWAN.
29511type VirtualWanProperties struct {
29512	// DisableVpnEncryption - Vpn encryption to be disabled or not.
29513	DisableVpnEncryption *bool `json:"disableVpnEncryption,omitempty"`
29514	// VirtualHubs - READ-ONLY; List of VirtualHubs in the VirtualWAN.
29515	VirtualHubs *[]SubResource `json:"virtualHubs,omitempty"`
29516	// VpnSites - READ-ONLY; List of VpnSites in the VirtualWAN.
29517	VpnSites *[]SubResource `json:"vpnSites,omitempty"`
29518	// SecurityProviderName - The Security Provider name.
29519	SecurityProviderName *string `json:"securityProviderName,omitempty"`
29520	// AllowBranchToBranchTraffic - True if branch to branch traffic is allowed.
29521	AllowBranchToBranchTraffic *bool `json:"allowBranchToBranchTraffic,omitempty"`
29522	// AllowVnetToVnetTraffic - True if Vnet to Vnet traffic is allowed.
29523	AllowVnetToVnetTraffic *bool `json:"allowVnetToVnetTraffic,omitempty"`
29524	// Office365LocalBreakoutCategory - The office local breakout category. Possible values include: 'OfficeTrafficCategoryOptimize', 'OfficeTrafficCategoryOptimizeAndAllow', 'OfficeTrafficCategoryAll', 'OfficeTrafficCategoryNone'
29525	Office365LocalBreakoutCategory OfficeTrafficCategory `json:"office365LocalBreakoutCategory,omitempty"`
29526	// P2SVpnServerConfigurations - List of all P2SVpnServerConfigurations associated with the virtual wan.
29527	P2SVpnServerConfigurations *[]P2SVpnServerConfiguration `json:"p2SVpnServerConfigurations,omitempty"`
29528	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
29529	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
29530}
29531
29532// MarshalJSON is the custom marshaler for VirtualWanProperties.
29533func (vwp VirtualWanProperties) MarshalJSON() ([]byte, error) {
29534	objectMap := make(map[string]interface{})
29535	if vwp.DisableVpnEncryption != nil {
29536		objectMap["disableVpnEncryption"] = vwp.DisableVpnEncryption
29537	}
29538	if vwp.SecurityProviderName != nil {
29539		objectMap["securityProviderName"] = vwp.SecurityProviderName
29540	}
29541	if vwp.AllowBranchToBranchTraffic != nil {
29542		objectMap["allowBranchToBranchTraffic"] = vwp.AllowBranchToBranchTraffic
29543	}
29544	if vwp.AllowVnetToVnetTraffic != nil {
29545		objectMap["allowVnetToVnetTraffic"] = vwp.AllowVnetToVnetTraffic
29546	}
29547	if vwp.Office365LocalBreakoutCategory != "" {
29548		objectMap["office365LocalBreakoutCategory"] = vwp.Office365LocalBreakoutCategory
29549	}
29550	if vwp.P2SVpnServerConfigurations != nil {
29551		objectMap["p2SVpnServerConfigurations"] = vwp.P2SVpnServerConfigurations
29552	}
29553	if vwp.ProvisioningState != "" {
29554		objectMap["provisioningState"] = vwp.ProvisioningState
29555	}
29556	return json.Marshal(objectMap)
29557}
29558
29559// VirtualWansCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
29560// long-running operation.
29561type VirtualWansCreateOrUpdateFuture struct {
29562	azure.FutureAPI
29563	// Result returns the result of the asynchronous operation.
29564	// If the operation has not completed it will return an error.
29565	Result func(VirtualWansClient) (VirtualWAN, error)
29566}
29567
29568// VirtualWansDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
29569// operation.
29570type VirtualWansDeleteFuture struct {
29571	azure.FutureAPI
29572	// Result returns the result of the asynchronous operation.
29573	// If the operation has not completed it will return an error.
29574	Result func(VirtualWansClient) (autorest.Response, error)
29575}
29576
29577// VirtualWanSecurityProvider collection of SecurityProviders.
29578type VirtualWanSecurityProvider struct {
29579	// Name - Name of the security provider.
29580	Name *string `json:"name,omitempty"`
29581	// URL - Url of the security provider.
29582	URL *string `json:"url,omitempty"`
29583	// Type - Name of the security provider. Possible values include: 'External', 'Native'
29584	Type VirtualWanSecurityProviderType `json:"type,omitempty"`
29585}
29586
29587// VirtualWanSecurityProviders collection of SecurityProviders.
29588type VirtualWanSecurityProviders struct {
29589	autorest.Response `json:"-"`
29590	// SupportedProviders - List of VirtualWAN security providers.
29591	SupportedProviders *[]VirtualWanSecurityProvider `json:"supportedProviders,omitempty"`
29592}
29593
29594// VirtualWansUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
29595// operation.
29596type VirtualWansUpdateTagsFuture struct {
29597	azure.FutureAPI
29598	// Result returns the result of the asynchronous operation.
29599	// If the operation has not completed it will return an error.
29600	Result func(VirtualWansClient) (VirtualWAN, error)
29601}
29602
29603// VpnClientConfiguration vpnClientConfiguration for P2S client.
29604type VpnClientConfiguration struct {
29605	// VpnClientAddressPool - The reference of the address space resource which represents Address space for P2S VpnClient.
29606	VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"`
29607	// VpnClientRootCertificates - VpnClientRootCertificate for virtual network gateway.
29608	VpnClientRootCertificates *[]VpnClientRootCertificate `json:"vpnClientRootCertificates,omitempty"`
29609	// VpnClientRevokedCertificates - VpnClientRevokedCertificate for Virtual network gateway.
29610	VpnClientRevokedCertificates *[]VpnClientRevokedCertificate `json:"vpnClientRevokedCertificates,omitempty"`
29611	// VpnClientProtocols - VpnClientProtocols for Virtual network gateway.
29612	VpnClientProtocols *[]VpnClientProtocol `json:"vpnClientProtocols,omitempty"`
29613	// VpnClientIpsecPolicies - VpnClientIpsecPolicies for virtual network gateway P2S client.
29614	VpnClientIpsecPolicies *[]IpsecPolicy `json:"vpnClientIpsecPolicies,omitempty"`
29615	// RadiusServerAddress - The radius server address property of the VirtualNetworkGateway resource for vpn client connection.
29616	RadiusServerAddress *string `json:"radiusServerAddress,omitempty"`
29617	// RadiusServerSecret - The radius secret property of the VirtualNetworkGateway resource for vpn client connection.
29618	RadiusServerSecret *string `json:"radiusServerSecret,omitempty"`
29619	// AadTenant - The AADTenant property of the VirtualNetworkGateway resource for vpn client connection used for AAD authentication.
29620	AadTenant *string `json:"aadTenant,omitempty"`
29621	// AadAudience - The AADAudience property of the VirtualNetworkGateway resource for vpn client connection used for AAD authentication.
29622	AadAudience *string `json:"aadAudience,omitempty"`
29623	// AadIssuer - The AADIssuer property of the VirtualNetworkGateway resource for vpn client connection used for AAD authentication.
29624	AadIssuer *string `json:"aadIssuer,omitempty"`
29625}
29626
29627// VpnClientConnectionHealth vpnClientConnectionHealth properties.
29628type VpnClientConnectionHealth struct {
29629	// TotalIngressBytesTransferred - READ-ONLY; Total of the Ingress Bytes Transferred in this P2S Vpn connection.
29630	TotalIngressBytesTransferred *int64 `json:"totalIngressBytesTransferred,omitempty"`
29631	// TotalEgressBytesTransferred - READ-ONLY; Total of the Egress Bytes Transferred in this connection.
29632	TotalEgressBytesTransferred *int64 `json:"totalEgressBytesTransferred,omitempty"`
29633	// VpnClientConnectionsCount - The total of p2s vpn clients connected at this time to this P2SVpnGateway.
29634	VpnClientConnectionsCount *int32 `json:"vpnClientConnectionsCount,omitempty"`
29635	// AllocatedIPAddresses - List of allocated ip addresses to the connected p2s vpn clients.
29636	AllocatedIPAddresses *[]string `json:"allocatedIpAddresses,omitempty"`
29637}
29638
29639// MarshalJSON is the custom marshaler for VpnClientConnectionHealth.
29640func (vcch VpnClientConnectionHealth) MarshalJSON() ([]byte, error) {
29641	objectMap := make(map[string]interface{})
29642	if vcch.VpnClientConnectionsCount != nil {
29643		objectMap["vpnClientConnectionsCount"] = vcch.VpnClientConnectionsCount
29644	}
29645	if vcch.AllocatedIPAddresses != nil {
29646		objectMap["allocatedIpAddresses"] = vcch.AllocatedIPAddresses
29647	}
29648	return json.Marshal(objectMap)
29649}
29650
29651// VpnClientConnectionHealthDetail VPN client connection health detail.
29652type VpnClientConnectionHealthDetail struct {
29653	// VpnConnectionID - READ-ONLY; The vpn client Id.
29654	VpnConnectionID *string `json:"vpnConnectionId,omitempty"`
29655	// VpnConnectionDuration - READ-ONLY; The duration time of a connected vpn client.
29656	VpnConnectionDuration *int64 `json:"vpnConnectionDuration,omitempty"`
29657	// VpnConnectionTime - READ-ONLY; The start time of a connected vpn client.
29658	VpnConnectionTime *string `json:"vpnConnectionTime,omitempty"`
29659	// PublicIPAddress - READ-ONLY; The public Ip of a connected vpn client.
29660	PublicIPAddress *string `json:"publicIpAddress,omitempty"`
29661	// PrivateIPAddress - READ-ONLY; The assigned private Ip of a connected vpn client.
29662	PrivateIPAddress *string `json:"privateIpAddress,omitempty"`
29663	// VpnUserName - READ-ONLY; The user name of a connected vpn client.
29664	VpnUserName *string `json:"vpnUserName,omitempty"`
29665	// MaxBandwidth - READ-ONLY; The max band width.
29666	MaxBandwidth *int64 `json:"maxBandwidth,omitempty"`
29667	// EgressPacketsTransferred - READ-ONLY; The egress packets per second.
29668	EgressPacketsTransferred *int64 `json:"egressPacketsTransferred,omitempty"`
29669	// EgressBytesTransferred - READ-ONLY; The egress bytes per second.
29670	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
29671	// IngressPacketsTransferred - READ-ONLY; The ingress packets per second.
29672	IngressPacketsTransferred *int64 `json:"ingressPacketsTransferred,omitempty"`
29673	// IngressBytesTransferred - READ-ONLY; The ingress bytes per second.
29674	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
29675	// MaxPacketsPerSecond - READ-ONLY; The max packets transferred per second.
29676	MaxPacketsPerSecond *int64 `json:"maxPacketsPerSecond,omitempty"`
29677}
29678
29679// VpnClientConnectionHealthDetailListResult list of virtual network gateway vpn client connection health.
29680type VpnClientConnectionHealthDetailListResult struct {
29681	autorest.Response `json:"-"`
29682	// Value - List of vpn client connection health.
29683	Value *[]VpnClientConnectionHealthDetail `json:"value,omitempty"`
29684}
29685
29686// VpnClientIPsecParameters an IPSec parameters for a virtual network gateway P2S connection.
29687type VpnClientIPsecParameters struct {
29688	autorest.Response `json:"-"`
29689	// SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for P2S client.
29690	SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"`
29691	// SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for P2S client..
29692	SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"`
29693	// IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256'
29694	IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"`
29695	// IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256'
29696	IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"`
29697	// IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128'
29698	IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"`
29699	// IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'IkeIntegrityMD5', 'IkeIntegritySHA1', 'IkeIntegritySHA256', 'IkeIntegritySHA384', 'IkeIntegrityGCMAES256', 'IkeIntegrityGCMAES128'
29700	IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"`
29701	// DhGroup - The DH Group used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24'
29702	DhGroup DhGroup `json:"dhGroup,omitempty"`
29703	// 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'
29704	PfsGroup PfsGroup `json:"pfsGroup,omitempty"`
29705}
29706
29707// VpnClientParameters vpn Client Parameters for package generation.
29708type VpnClientParameters struct {
29709	// ProcessorArchitecture - VPN client Processor Architecture. Possible values include: 'Amd64', 'X86'
29710	ProcessorArchitecture ProcessorArchitecture `json:"processorArchitecture,omitempty"`
29711	// AuthenticationMethod - VPN client authentication method. Possible values include: 'EAPTLS', 'EAPMSCHAPv2'
29712	AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"`
29713	// 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.
29714	RadiusServerAuthCertificate *string `json:"radiusServerAuthCertificate,omitempty"`
29715	// ClientRootCertificates - A list of client root certificates public certificate data encoded as Base-64 strings. Optional parameter for external radius based authentication with EAPTLS.
29716	ClientRootCertificates *[]string `json:"clientRootCertificates,omitempty"`
29717}
29718
29719// VpnClientRevokedCertificate VPN client revoked certificate of virtual network gateway.
29720type VpnClientRevokedCertificate struct {
29721	// VpnClientRevokedCertificatePropertiesFormat - Properties of the vpn client revoked certificate.
29722	*VpnClientRevokedCertificatePropertiesFormat `json:"properties,omitempty"`
29723	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
29724	Name *string `json:"name,omitempty"`
29725	// Etag - A unique read-only string that changes whenever the resource is updated.
29726	Etag *string `json:"etag,omitempty"`
29727	// ID - Resource ID.
29728	ID *string `json:"id,omitempty"`
29729}
29730
29731// MarshalJSON is the custom marshaler for VpnClientRevokedCertificate.
29732func (vcrc VpnClientRevokedCertificate) MarshalJSON() ([]byte, error) {
29733	objectMap := make(map[string]interface{})
29734	if vcrc.VpnClientRevokedCertificatePropertiesFormat != nil {
29735		objectMap["properties"] = vcrc.VpnClientRevokedCertificatePropertiesFormat
29736	}
29737	if vcrc.Name != nil {
29738		objectMap["name"] = vcrc.Name
29739	}
29740	if vcrc.Etag != nil {
29741		objectMap["etag"] = vcrc.Etag
29742	}
29743	if vcrc.ID != nil {
29744		objectMap["id"] = vcrc.ID
29745	}
29746	return json.Marshal(objectMap)
29747}
29748
29749// UnmarshalJSON is the custom unmarshaler for VpnClientRevokedCertificate struct.
29750func (vcrc *VpnClientRevokedCertificate) UnmarshalJSON(body []byte) error {
29751	var m map[string]*json.RawMessage
29752	err := json.Unmarshal(body, &m)
29753	if err != nil {
29754		return err
29755	}
29756	for k, v := range m {
29757		switch k {
29758		case "properties":
29759			if v != nil {
29760				var vpnClientRevokedCertificatePropertiesFormat VpnClientRevokedCertificatePropertiesFormat
29761				err = json.Unmarshal(*v, &vpnClientRevokedCertificatePropertiesFormat)
29762				if err != nil {
29763					return err
29764				}
29765				vcrc.VpnClientRevokedCertificatePropertiesFormat = &vpnClientRevokedCertificatePropertiesFormat
29766			}
29767		case "name":
29768			if v != nil {
29769				var name string
29770				err = json.Unmarshal(*v, &name)
29771				if err != nil {
29772					return err
29773				}
29774				vcrc.Name = &name
29775			}
29776		case "etag":
29777			if v != nil {
29778				var etag string
29779				err = json.Unmarshal(*v, &etag)
29780				if err != nil {
29781					return err
29782				}
29783				vcrc.Etag = &etag
29784			}
29785		case "id":
29786			if v != nil {
29787				var ID string
29788				err = json.Unmarshal(*v, &ID)
29789				if err != nil {
29790					return err
29791				}
29792				vcrc.ID = &ID
29793			}
29794		}
29795	}
29796
29797	return nil
29798}
29799
29800// VpnClientRevokedCertificatePropertiesFormat properties of the revoked VPN client certificate of virtual
29801// network gateway.
29802type VpnClientRevokedCertificatePropertiesFormat struct {
29803	// Thumbprint - The revoked VPN client certificate thumbprint.
29804	Thumbprint *string `json:"thumbprint,omitempty"`
29805	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client revoked certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
29806	ProvisioningState *string `json:"provisioningState,omitempty"`
29807}
29808
29809// MarshalJSON is the custom marshaler for VpnClientRevokedCertificatePropertiesFormat.
29810func (vcrcpf VpnClientRevokedCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
29811	objectMap := make(map[string]interface{})
29812	if vcrcpf.Thumbprint != nil {
29813		objectMap["thumbprint"] = vcrcpf.Thumbprint
29814	}
29815	return json.Marshal(objectMap)
29816}
29817
29818// VpnClientRootCertificate VPN client root certificate of virtual network gateway.
29819type VpnClientRootCertificate struct {
29820	// VpnClientRootCertificatePropertiesFormat - Properties of the vpn client root certificate.
29821	*VpnClientRootCertificatePropertiesFormat `json:"properties,omitempty"`
29822	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
29823	Name *string `json:"name,omitempty"`
29824	// Etag - A unique read-only string that changes whenever the resource is updated.
29825	Etag *string `json:"etag,omitempty"`
29826	// ID - Resource ID.
29827	ID *string `json:"id,omitempty"`
29828}
29829
29830// MarshalJSON is the custom marshaler for VpnClientRootCertificate.
29831func (vcrc VpnClientRootCertificate) MarshalJSON() ([]byte, error) {
29832	objectMap := make(map[string]interface{})
29833	if vcrc.VpnClientRootCertificatePropertiesFormat != nil {
29834		objectMap["properties"] = vcrc.VpnClientRootCertificatePropertiesFormat
29835	}
29836	if vcrc.Name != nil {
29837		objectMap["name"] = vcrc.Name
29838	}
29839	if vcrc.Etag != nil {
29840		objectMap["etag"] = vcrc.Etag
29841	}
29842	if vcrc.ID != nil {
29843		objectMap["id"] = vcrc.ID
29844	}
29845	return json.Marshal(objectMap)
29846}
29847
29848// UnmarshalJSON is the custom unmarshaler for VpnClientRootCertificate struct.
29849func (vcrc *VpnClientRootCertificate) UnmarshalJSON(body []byte) error {
29850	var m map[string]*json.RawMessage
29851	err := json.Unmarshal(body, &m)
29852	if err != nil {
29853		return err
29854	}
29855	for k, v := range m {
29856		switch k {
29857		case "properties":
29858			if v != nil {
29859				var vpnClientRootCertificatePropertiesFormat VpnClientRootCertificatePropertiesFormat
29860				err = json.Unmarshal(*v, &vpnClientRootCertificatePropertiesFormat)
29861				if err != nil {
29862					return err
29863				}
29864				vcrc.VpnClientRootCertificatePropertiesFormat = &vpnClientRootCertificatePropertiesFormat
29865			}
29866		case "name":
29867			if v != nil {
29868				var name string
29869				err = json.Unmarshal(*v, &name)
29870				if err != nil {
29871					return err
29872				}
29873				vcrc.Name = &name
29874			}
29875		case "etag":
29876			if v != nil {
29877				var etag string
29878				err = json.Unmarshal(*v, &etag)
29879				if err != nil {
29880					return err
29881				}
29882				vcrc.Etag = &etag
29883			}
29884		case "id":
29885			if v != nil {
29886				var ID string
29887				err = json.Unmarshal(*v, &ID)
29888				if err != nil {
29889					return err
29890				}
29891				vcrc.ID = &ID
29892			}
29893		}
29894	}
29895
29896	return nil
29897}
29898
29899// VpnClientRootCertificatePropertiesFormat properties of SSL certificates of application gateway.
29900type VpnClientRootCertificatePropertiesFormat struct {
29901	// PublicCertData - The certificate public data.
29902	PublicCertData *string `json:"publicCertData,omitempty"`
29903	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
29904	ProvisioningState *string `json:"provisioningState,omitempty"`
29905}
29906
29907// MarshalJSON is the custom marshaler for VpnClientRootCertificatePropertiesFormat.
29908func (vcrcpf VpnClientRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
29909	objectMap := make(map[string]interface{})
29910	if vcrcpf.PublicCertData != nil {
29911		objectMap["publicCertData"] = vcrcpf.PublicCertData
29912	}
29913	return json.Marshal(objectMap)
29914}
29915
29916// VpnConnection vpnConnection Resource.
29917type VpnConnection struct {
29918	autorest.Response `json:"-"`
29919	// VpnConnectionProperties - Properties of the VPN connection.
29920	*VpnConnectionProperties `json:"properties,omitempty"`
29921	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
29922	Name *string `json:"name,omitempty"`
29923	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
29924	Etag *string `json:"etag,omitempty"`
29925	// ID - Resource ID.
29926	ID *string `json:"id,omitempty"`
29927}
29928
29929// MarshalJSON is the custom marshaler for VpnConnection.
29930func (vc VpnConnection) MarshalJSON() ([]byte, error) {
29931	objectMap := make(map[string]interface{})
29932	if vc.VpnConnectionProperties != nil {
29933		objectMap["properties"] = vc.VpnConnectionProperties
29934	}
29935	if vc.Name != nil {
29936		objectMap["name"] = vc.Name
29937	}
29938	if vc.ID != nil {
29939		objectMap["id"] = vc.ID
29940	}
29941	return json.Marshal(objectMap)
29942}
29943
29944// UnmarshalJSON is the custom unmarshaler for VpnConnection struct.
29945func (vc *VpnConnection) UnmarshalJSON(body []byte) error {
29946	var m map[string]*json.RawMessage
29947	err := json.Unmarshal(body, &m)
29948	if err != nil {
29949		return err
29950	}
29951	for k, v := range m {
29952		switch k {
29953		case "properties":
29954			if v != nil {
29955				var vpnConnectionProperties VpnConnectionProperties
29956				err = json.Unmarshal(*v, &vpnConnectionProperties)
29957				if err != nil {
29958					return err
29959				}
29960				vc.VpnConnectionProperties = &vpnConnectionProperties
29961			}
29962		case "name":
29963			if v != nil {
29964				var name string
29965				err = json.Unmarshal(*v, &name)
29966				if err != nil {
29967					return err
29968				}
29969				vc.Name = &name
29970			}
29971		case "etag":
29972			if v != nil {
29973				var etag string
29974				err = json.Unmarshal(*v, &etag)
29975				if err != nil {
29976					return err
29977				}
29978				vc.Etag = &etag
29979			}
29980		case "id":
29981			if v != nil {
29982				var ID string
29983				err = json.Unmarshal(*v, &ID)
29984				if err != nil {
29985					return err
29986				}
29987				vc.ID = &ID
29988			}
29989		}
29990	}
29991
29992	return nil
29993}
29994
29995// VpnConnectionProperties parameters for VpnConnection.
29996type VpnConnectionProperties struct {
29997	// RemoteVpnSite - Id of the connected vpn site.
29998	RemoteVpnSite *SubResource `json:"remoteVpnSite,omitempty"`
29999	// RoutingWeight - Routing weight for vpn connection.
30000	RoutingWeight *int32 `json:"routingWeight,omitempty"`
30001	// ConnectionStatus - The connection status. Possible values include: 'VpnConnectionStatusUnknown', 'VpnConnectionStatusConnecting', 'VpnConnectionStatusConnected', 'VpnConnectionStatusNotConnected'
30002	ConnectionStatus VpnConnectionStatus `json:"connectionStatus,omitempty"`
30003	// VpnConnectionProtocolType - Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1'
30004	VpnConnectionProtocolType VirtualNetworkGatewayConnectionProtocol `json:"vpnConnectionProtocolType,omitempty"`
30005	// IngressBytesTransferred - READ-ONLY; Ingress bytes transferred.
30006	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
30007	// EgressBytesTransferred - READ-ONLY; Egress bytes transferred.
30008	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
30009	// ConnectionBandwidth - Expected bandwidth in MBPS.
30010	ConnectionBandwidth *int32 `json:"connectionBandwidth,omitempty"`
30011	// SharedKey - SharedKey for the vpn connection.
30012	SharedKey *string `json:"sharedKey,omitempty"`
30013	// EnableBgp - EnableBgp flag.
30014	EnableBgp *bool `json:"enableBgp,omitempty"`
30015	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
30016	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
30017	// IpsecPolicies - The IPSec Policies to be considered by this connection.
30018	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
30019	// EnableRateLimiting - EnableBgp flag.
30020	EnableRateLimiting *bool `json:"enableRateLimiting,omitempty"`
30021	// EnableInternetSecurity - Enable internet security.
30022	EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"`
30023	// UseLocalAzureIPAddress - Use local azure ip to initiate connection.
30024	UseLocalAzureIPAddress *bool `json:"useLocalAzureIpAddress,omitempty"`
30025	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
30026	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
30027	// VpnLinkConnections - List of all vpn site link connections to the gateway.
30028	VpnLinkConnections *[]VpnSiteLinkConnection `json:"vpnLinkConnections,omitempty"`
30029}
30030
30031// MarshalJSON is the custom marshaler for VpnConnectionProperties.
30032func (vcp VpnConnectionProperties) MarshalJSON() ([]byte, error) {
30033	objectMap := make(map[string]interface{})
30034	if vcp.RemoteVpnSite != nil {
30035		objectMap["remoteVpnSite"] = vcp.RemoteVpnSite
30036	}
30037	if vcp.RoutingWeight != nil {
30038		objectMap["routingWeight"] = vcp.RoutingWeight
30039	}
30040	if vcp.ConnectionStatus != "" {
30041		objectMap["connectionStatus"] = vcp.ConnectionStatus
30042	}
30043	if vcp.VpnConnectionProtocolType != "" {
30044		objectMap["vpnConnectionProtocolType"] = vcp.VpnConnectionProtocolType
30045	}
30046	if vcp.ConnectionBandwidth != nil {
30047		objectMap["connectionBandwidth"] = vcp.ConnectionBandwidth
30048	}
30049	if vcp.SharedKey != nil {
30050		objectMap["sharedKey"] = vcp.SharedKey
30051	}
30052	if vcp.EnableBgp != nil {
30053		objectMap["enableBgp"] = vcp.EnableBgp
30054	}
30055	if vcp.UsePolicyBasedTrafficSelectors != nil {
30056		objectMap["usePolicyBasedTrafficSelectors"] = vcp.UsePolicyBasedTrafficSelectors
30057	}
30058	if vcp.IpsecPolicies != nil {
30059		objectMap["ipsecPolicies"] = vcp.IpsecPolicies
30060	}
30061	if vcp.EnableRateLimiting != nil {
30062		objectMap["enableRateLimiting"] = vcp.EnableRateLimiting
30063	}
30064	if vcp.EnableInternetSecurity != nil {
30065		objectMap["enableInternetSecurity"] = vcp.EnableInternetSecurity
30066	}
30067	if vcp.UseLocalAzureIPAddress != nil {
30068		objectMap["useLocalAzureIpAddress"] = vcp.UseLocalAzureIPAddress
30069	}
30070	if vcp.ProvisioningState != "" {
30071		objectMap["provisioningState"] = vcp.ProvisioningState
30072	}
30073	if vcp.VpnLinkConnections != nil {
30074		objectMap["vpnLinkConnections"] = vcp.VpnLinkConnections
30075	}
30076	return json.Marshal(objectMap)
30077}
30078
30079// VpnConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
30080// long-running operation.
30081type VpnConnectionsCreateOrUpdateFuture struct {
30082	azure.FutureAPI
30083	// Result returns the result of the asynchronous operation.
30084	// If the operation has not completed it will return an error.
30085	Result func(VpnConnectionsClient) (VpnConnection, error)
30086}
30087
30088// VpnConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
30089// operation.
30090type VpnConnectionsDeleteFuture struct {
30091	azure.FutureAPI
30092	// Result returns the result of the asynchronous operation.
30093	// If the operation has not completed it will return an error.
30094	Result func(VpnConnectionsClient) (autorest.Response, error)
30095}
30096
30097// VpnDeviceScriptParameters vpn device configuration script generation parameters.
30098type VpnDeviceScriptParameters struct {
30099	// Vendor - The vendor for the vpn device.
30100	Vendor *string `json:"vendor,omitempty"`
30101	// DeviceFamily - The device family for the vpn device.
30102	DeviceFamily *string `json:"deviceFamily,omitempty"`
30103	// FirmwareVersion - The firmware version for the vpn device.
30104	FirmwareVersion *string `json:"firmwareVersion,omitempty"`
30105}
30106
30107// VpnGateway vpnGateway Resource.
30108type VpnGateway struct {
30109	autorest.Response `json:"-"`
30110	// VpnGatewayProperties - Properties of the VPN gateway.
30111	*VpnGatewayProperties `json:"properties,omitempty"`
30112	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
30113	Etag *string `json:"etag,omitempty"`
30114	// ID - Resource ID.
30115	ID *string `json:"id,omitempty"`
30116	// Name - READ-ONLY; Resource name.
30117	Name *string `json:"name,omitempty"`
30118	// Type - READ-ONLY; Resource type.
30119	Type *string `json:"type,omitempty"`
30120	// Location - Resource location.
30121	Location *string `json:"location,omitempty"`
30122	// Tags - Resource tags.
30123	Tags map[string]*string `json:"tags"`
30124}
30125
30126// MarshalJSON is the custom marshaler for VpnGateway.
30127func (vg VpnGateway) MarshalJSON() ([]byte, error) {
30128	objectMap := make(map[string]interface{})
30129	if vg.VpnGatewayProperties != nil {
30130		objectMap["properties"] = vg.VpnGatewayProperties
30131	}
30132	if vg.ID != nil {
30133		objectMap["id"] = vg.ID
30134	}
30135	if vg.Location != nil {
30136		objectMap["location"] = vg.Location
30137	}
30138	if vg.Tags != nil {
30139		objectMap["tags"] = vg.Tags
30140	}
30141	return json.Marshal(objectMap)
30142}
30143
30144// UnmarshalJSON is the custom unmarshaler for VpnGateway struct.
30145func (vg *VpnGateway) UnmarshalJSON(body []byte) error {
30146	var m map[string]*json.RawMessage
30147	err := json.Unmarshal(body, &m)
30148	if err != nil {
30149		return err
30150	}
30151	for k, v := range m {
30152		switch k {
30153		case "properties":
30154			if v != nil {
30155				var vpnGatewayProperties VpnGatewayProperties
30156				err = json.Unmarshal(*v, &vpnGatewayProperties)
30157				if err != nil {
30158					return err
30159				}
30160				vg.VpnGatewayProperties = &vpnGatewayProperties
30161			}
30162		case "etag":
30163			if v != nil {
30164				var etag string
30165				err = json.Unmarshal(*v, &etag)
30166				if err != nil {
30167					return err
30168				}
30169				vg.Etag = &etag
30170			}
30171		case "id":
30172			if v != nil {
30173				var ID string
30174				err = json.Unmarshal(*v, &ID)
30175				if err != nil {
30176					return err
30177				}
30178				vg.ID = &ID
30179			}
30180		case "name":
30181			if v != nil {
30182				var name string
30183				err = json.Unmarshal(*v, &name)
30184				if err != nil {
30185					return err
30186				}
30187				vg.Name = &name
30188			}
30189		case "type":
30190			if v != nil {
30191				var typeVar string
30192				err = json.Unmarshal(*v, &typeVar)
30193				if err != nil {
30194					return err
30195				}
30196				vg.Type = &typeVar
30197			}
30198		case "location":
30199			if v != nil {
30200				var location string
30201				err = json.Unmarshal(*v, &location)
30202				if err != nil {
30203					return err
30204				}
30205				vg.Location = &location
30206			}
30207		case "tags":
30208			if v != nil {
30209				var tags map[string]*string
30210				err = json.Unmarshal(*v, &tags)
30211				if err != nil {
30212					return err
30213				}
30214				vg.Tags = tags
30215			}
30216		}
30217	}
30218
30219	return nil
30220}
30221
30222// VpnGatewayProperties parameters for VpnGateway.
30223type VpnGatewayProperties struct {
30224	// VirtualHub - The VirtualHub to which the gateway belongs.
30225	VirtualHub *SubResource `json:"virtualHub,omitempty"`
30226	// Connections - List of all vpn connections to the gateway.
30227	Connections *[]VpnConnection `json:"connections,omitempty"`
30228	// BgpSettings - Local network gateway's BGP speaker settings.
30229	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
30230	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
30231	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
30232	// VpnGatewayScaleUnit - The scale unit for this vpn gateway.
30233	VpnGatewayScaleUnit *int32 `json:"vpnGatewayScaleUnit,omitempty"`
30234}
30235
30236// VpnGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
30237// long-running operation.
30238type VpnGatewaysCreateOrUpdateFuture struct {
30239	azure.FutureAPI
30240	// Result returns the result of the asynchronous operation.
30241	// If the operation has not completed it will return an error.
30242	Result func(VpnGatewaysClient) (VpnGateway, error)
30243}
30244
30245// VpnGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
30246// operation.
30247type VpnGatewaysDeleteFuture struct {
30248	azure.FutureAPI
30249	// Result returns the result of the asynchronous operation.
30250	// If the operation has not completed it will return an error.
30251	Result func(VpnGatewaysClient) (autorest.Response, error)
30252}
30253
30254// VpnGatewaysResetFuture an abstraction for monitoring and retrieving the results of a long-running
30255// operation.
30256type VpnGatewaysResetFuture struct {
30257	azure.FutureAPI
30258	// Result returns the result of the asynchronous operation.
30259	// If the operation has not completed it will return an error.
30260	Result func(VpnGatewaysClient) (VpnGateway, error)
30261}
30262
30263// VpnGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
30264// operation.
30265type VpnGatewaysUpdateTagsFuture struct {
30266	azure.FutureAPI
30267	// Result returns the result of the asynchronous operation.
30268	// If the operation has not completed it will return an error.
30269	Result func(VpnGatewaysClient) (VpnGateway, error)
30270}
30271
30272// VpnLinkBgpSettings BGP settings details for a link.
30273type VpnLinkBgpSettings struct {
30274	// Asn - The BGP speaker's ASN.
30275	Asn *int64 `json:"asn,omitempty"`
30276	// BgpPeeringAddress - The BGP peering address and BGP identifier of this BGP speaker.
30277	BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"`
30278}
30279
30280// VpnLinkProviderProperties list of properties of a link provider.
30281type VpnLinkProviderProperties struct {
30282	// LinkProviderName - Name of the link provider.
30283	LinkProviderName *string `json:"linkProviderName,omitempty"`
30284	// LinkSpeedInMbps - Link speed.
30285	LinkSpeedInMbps *int32 `json:"linkSpeedInMbps,omitempty"`
30286}
30287
30288// VpnProfileResponse vpn Profile Response for package generation.
30289type VpnProfileResponse struct {
30290	autorest.Response `json:"-"`
30291	// ProfileURL - URL to the VPN profile.
30292	ProfileURL *string `json:"profileUrl,omitempty"`
30293}
30294
30295// VpnSite vpnSite Resource.
30296type VpnSite struct {
30297	autorest.Response `json:"-"`
30298	// VpnSiteProperties - Properties of the VPN site.
30299	*VpnSiteProperties `json:"properties,omitempty"`
30300	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
30301	Etag *string `json:"etag,omitempty"`
30302	// ID - Resource ID.
30303	ID *string `json:"id,omitempty"`
30304	// Name - READ-ONLY; Resource name.
30305	Name *string `json:"name,omitempty"`
30306	// Type - READ-ONLY; Resource type.
30307	Type *string `json:"type,omitempty"`
30308	// Location - Resource location.
30309	Location *string `json:"location,omitempty"`
30310	// Tags - Resource tags.
30311	Tags map[string]*string `json:"tags"`
30312}
30313
30314// MarshalJSON is the custom marshaler for VpnSite.
30315func (vs VpnSite) MarshalJSON() ([]byte, error) {
30316	objectMap := make(map[string]interface{})
30317	if vs.VpnSiteProperties != nil {
30318		objectMap["properties"] = vs.VpnSiteProperties
30319	}
30320	if vs.ID != nil {
30321		objectMap["id"] = vs.ID
30322	}
30323	if vs.Location != nil {
30324		objectMap["location"] = vs.Location
30325	}
30326	if vs.Tags != nil {
30327		objectMap["tags"] = vs.Tags
30328	}
30329	return json.Marshal(objectMap)
30330}
30331
30332// UnmarshalJSON is the custom unmarshaler for VpnSite struct.
30333func (vs *VpnSite) UnmarshalJSON(body []byte) error {
30334	var m map[string]*json.RawMessage
30335	err := json.Unmarshal(body, &m)
30336	if err != nil {
30337		return err
30338	}
30339	for k, v := range m {
30340		switch k {
30341		case "properties":
30342			if v != nil {
30343				var vpnSiteProperties VpnSiteProperties
30344				err = json.Unmarshal(*v, &vpnSiteProperties)
30345				if err != nil {
30346					return err
30347				}
30348				vs.VpnSiteProperties = &vpnSiteProperties
30349			}
30350		case "etag":
30351			if v != nil {
30352				var etag string
30353				err = json.Unmarshal(*v, &etag)
30354				if err != nil {
30355					return err
30356				}
30357				vs.Etag = &etag
30358			}
30359		case "id":
30360			if v != nil {
30361				var ID string
30362				err = json.Unmarshal(*v, &ID)
30363				if err != nil {
30364					return err
30365				}
30366				vs.ID = &ID
30367			}
30368		case "name":
30369			if v != nil {
30370				var name string
30371				err = json.Unmarshal(*v, &name)
30372				if err != nil {
30373					return err
30374				}
30375				vs.Name = &name
30376			}
30377		case "type":
30378			if v != nil {
30379				var typeVar string
30380				err = json.Unmarshal(*v, &typeVar)
30381				if err != nil {
30382					return err
30383				}
30384				vs.Type = &typeVar
30385			}
30386		case "location":
30387			if v != nil {
30388				var location string
30389				err = json.Unmarshal(*v, &location)
30390				if err != nil {
30391					return err
30392				}
30393				vs.Location = &location
30394			}
30395		case "tags":
30396			if v != nil {
30397				var tags map[string]*string
30398				err = json.Unmarshal(*v, &tags)
30399				if err != nil {
30400					return err
30401				}
30402				vs.Tags = tags
30403			}
30404		}
30405	}
30406
30407	return nil
30408}
30409
30410// VpnSiteID vpnSite Resource.
30411type VpnSiteID struct {
30412	// VpnSite - READ-ONLY; The resource-uri of the vpn-site for which config is to be fetched.
30413	VpnSite *string `json:"vpnSite,omitempty"`
30414}
30415
30416// VpnSiteLink vpnSiteLink Resource.
30417type VpnSiteLink struct {
30418	autorest.Response `json:"-"`
30419	// VpnSiteLinkProperties - Properties of the VPN site link.
30420	*VpnSiteLinkProperties `json:"properties,omitempty"`
30421	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
30422	Etag *string `json:"etag,omitempty"`
30423	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
30424	Name *string `json:"name,omitempty"`
30425	// Type - READ-ONLY; Resource type.
30426	Type *string `json:"type,omitempty"`
30427	// ID - Resource ID.
30428	ID *string `json:"id,omitempty"`
30429}
30430
30431// MarshalJSON is the custom marshaler for VpnSiteLink.
30432func (vsl VpnSiteLink) MarshalJSON() ([]byte, error) {
30433	objectMap := make(map[string]interface{})
30434	if vsl.VpnSiteLinkProperties != nil {
30435		objectMap["properties"] = vsl.VpnSiteLinkProperties
30436	}
30437	if vsl.Name != nil {
30438		objectMap["name"] = vsl.Name
30439	}
30440	if vsl.ID != nil {
30441		objectMap["id"] = vsl.ID
30442	}
30443	return json.Marshal(objectMap)
30444}
30445
30446// UnmarshalJSON is the custom unmarshaler for VpnSiteLink struct.
30447func (vsl *VpnSiteLink) UnmarshalJSON(body []byte) error {
30448	var m map[string]*json.RawMessage
30449	err := json.Unmarshal(body, &m)
30450	if err != nil {
30451		return err
30452	}
30453	for k, v := range m {
30454		switch k {
30455		case "properties":
30456			if v != nil {
30457				var vpnSiteLinkProperties VpnSiteLinkProperties
30458				err = json.Unmarshal(*v, &vpnSiteLinkProperties)
30459				if err != nil {
30460					return err
30461				}
30462				vsl.VpnSiteLinkProperties = &vpnSiteLinkProperties
30463			}
30464		case "etag":
30465			if v != nil {
30466				var etag string
30467				err = json.Unmarshal(*v, &etag)
30468				if err != nil {
30469					return err
30470				}
30471				vsl.Etag = &etag
30472			}
30473		case "name":
30474			if v != nil {
30475				var name string
30476				err = json.Unmarshal(*v, &name)
30477				if err != nil {
30478					return err
30479				}
30480				vsl.Name = &name
30481			}
30482		case "type":
30483			if v != nil {
30484				var typeVar string
30485				err = json.Unmarshal(*v, &typeVar)
30486				if err != nil {
30487					return err
30488				}
30489				vsl.Type = &typeVar
30490			}
30491		case "id":
30492			if v != nil {
30493				var ID string
30494				err = json.Unmarshal(*v, &ID)
30495				if err != nil {
30496					return err
30497				}
30498				vsl.ID = &ID
30499			}
30500		}
30501	}
30502
30503	return nil
30504}
30505
30506// VpnSiteLinkConnection vpnSiteLinkConnection Resource.
30507type VpnSiteLinkConnection struct {
30508	autorest.Response `json:"-"`
30509	// VpnSiteLinkConnectionProperties - Properties of the VPN site link connection.
30510	*VpnSiteLinkConnectionProperties `json:"properties,omitempty"`
30511	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
30512	Name *string `json:"name,omitempty"`
30513	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
30514	Etag *string `json:"etag,omitempty"`
30515	// Type - READ-ONLY; Resource type.
30516	Type *string `json:"type,omitempty"`
30517	// ID - Resource ID.
30518	ID *string `json:"id,omitempty"`
30519}
30520
30521// MarshalJSON is the custom marshaler for VpnSiteLinkConnection.
30522func (vslc VpnSiteLinkConnection) MarshalJSON() ([]byte, error) {
30523	objectMap := make(map[string]interface{})
30524	if vslc.VpnSiteLinkConnectionProperties != nil {
30525		objectMap["properties"] = vslc.VpnSiteLinkConnectionProperties
30526	}
30527	if vslc.Name != nil {
30528		objectMap["name"] = vslc.Name
30529	}
30530	if vslc.ID != nil {
30531		objectMap["id"] = vslc.ID
30532	}
30533	return json.Marshal(objectMap)
30534}
30535
30536// UnmarshalJSON is the custom unmarshaler for VpnSiteLinkConnection struct.
30537func (vslc *VpnSiteLinkConnection) UnmarshalJSON(body []byte) error {
30538	var m map[string]*json.RawMessage
30539	err := json.Unmarshal(body, &m)
30540	if err != nil {
30541		return err
30542	}
30543	for k, v := range m {
30544		switch k {
30545		case "properties":
30546			if v != nil {
30547				var vpnSiteLinkConnectionProperties VpnSiteLinkConnectionProperties
30548				err = json.Unmarshal(*v, &vpnSiteLinkConnectionProperties)
30549				if err != nil {
30550					return err
30551				}
30552				vslc.VpnSiteLinkConnectionProperties = &vpnSiteLinkConnectionProperties
30553			}
30554		case "name":
30555			if v != nil {
30556				var name string
30557				err = json.Unmarshal(*v, &name)
30558				if err != nil {
30559					return err
30560				}
30561				vslc.Name = &name
30562			}
30563		case "etag":
30564			if v != nil {
30565				var etag string
30566				err = json.Unmarshal(*v, &etag)
30567				if err != nil {
30568					return err
30569				}
30570				vslc.Etag = &etag
30571			}
30572		case "type":
30573			if v != nil {
30574				var typeVar string
30575				err = json.Unmarshal(*v, &typeVar)
30576				if err != nil {
30577					return err
30578				}
30579				vslc.Type = &typeVar
30580			}
30581		case "id":
30582			if v != nil {
30583				var ID string
30584				err = json.Unmarshal(*v, &ID)
30585				if err != nil {
30586					return err
30587				}
30588				vslc.ID = &ID
30589			}
30590		}
30591	}
30592
30593	return nil
30594}
30595
30596// VpnSiteLinkConnectionProperties parameters for VpnConnection.
30597type VpnSiteLinkConnectionProperties struct {
30598	// VpnSiteLink - Id of the connected vpn site link.
30599	VpnSiteLink *SubResource `json:"vpnSiteLink,omitempty"`
30600	// RoutingWeight - Routing weight for vpn connection.
30601	RoutingWeight *int32 `json:"routingWeight,omitempty"`
30602	// ConnectionStatus - The connection status. Possible values include: 'VpnConnectionStatusUnknown', 'VpnConnectionStatusConnecting', 'VpnConnectionStatusConnected', 'VpnConnectionStatusNotConnected'
30603	ConnectionStatus VpnConnectionStatus `json:"connectionStatus,omitempty"`
30604	// VpnConnectionProtocolType - Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1'
30605	VpnConnectionProtocolType VirtualNetworkGatewayConnectionProtocol `json:"vpnConnectionProtocolType,omitempty"`
30606	// IngressBytesTransferred - READ-ONLY; Ingress bytes transferred.
30607	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
30608	// EgressBytesTransferred - READ-ONLY; Egress bytes transferred.
30609	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
30610	// ConnectionBandwidth - Expected bandwidth in MBPS.
30611	ConnectionBandwidth *int32 `json:"connectionBandwidth,omitempty"`
30612	// SharedKey - SharedKey for the vpn connection.
30613	SharedKey *string `json:"sharedKey,omitempty"`
30614	// EnableBgp - EnableBgp flag.
30615	EnableBgp *bool `json:"enableBgp,omitempty"`
30616	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
30617	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
30618	// IpsecPolicies - The IPSec Policies to be considered by this connection.
30619	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
30620	// EnableRateLimiting - EnableBgp flag.
30621	EnableRateLimiting *bool `json:"enableRateLimiting,omitempty"`
30622	// UseLocalAzureIPAddress - Use local azure ip to initiate connection.
30623	UseLocalAzureIPAddress *bool `json:"useLocalAzureIpAddress,omitempty"`
30624	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
30625	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
30626}
30627
30628// MarshalJSON is the custom marshaler for VpnSiteLinkConnectionProperties.
30629func (vslcp VpnSiteLinkConnectionProperties) MarshalJSON() ([]byte, error) {
30630	objectMap := make(map[string]interface{})
30631	if vslcp.VpnSiteLink != nil {
30632		objectMap["vpnSiteLink"] = vslcp.VpnSiteLink
30633	}
30634	if vslcp.RoutingWeight != nil {
30635		objectMap["routingWeight"] = vslcp.RoutingWeight
30636	}
30637	if vslcp.ConnectionStatus != "" {
30638		objectMap["connectionStatus"] = vslcp.ConnectionStatus
30639	}
30640	if vslcp.VpnConnectionProtocolType != "" {
30641		objectMap["vpnConnectionProtocolType"] = vslcp.VpnConnectionProtocolType
30642	}
30643	if vslcp.ConnectionBandwidth != nil {
30644		objectMap["connectionBandwidth"] = vslcp.ConnectionBandwidth
30645	}
30646	if vslcp.SharedKey != nil {
30647		objectMap["sharedKey"] = vslcp.SharedKey
30648	}
30649	if vslcp.EnableBgp != nil {
30650		objectMap["enableBgp"] = vslcp.EnableBgp
30651	}
30652	if vslcp.UsePolicyBasedTrafficSelectors != nil {
30653		objectMap["usePolicyBasedTrafficSelectors"] = vslcp.UsePolicyBasedTrafficSelectors
30654	}
30655	if vslcp.IpsecPolicies != nil {
30656		objectMap["ipsecPolicies"] = vslcp.IpsecPolicies
30657	}
30658	if vslcp.EnableRateLimiting != nil {
30659		objectMap["enableRateLimiting"] = vslcp.EnableRateLimiting
30660	}
30661	if vslcp.UseLocalAzureIPAddress != nil {
30662		objectMap["useLocalAzureIpAddress"] = vslcp.UseLocalAzureIPAddress
30663	}
30664	if vslcp.ProvisioningState != "" {
30665		objectMap["provisioningState"] = vslcp.ProvisioningState
30666	}
30667	return json.Marshal(objectMap)
30668}
30669
30670// VpnSiteLinkProperties parameters for VpnSite.
30671type VpnSiteLinkProperties struct {
30672	// LinkProperties - The link provider properties.
30673	LinkProperties *VpnLinkProviderProperties `json:"linkProperties,omitempty"`
30674	// IPAddress - The ip-address for the vpn-site-link.
30675	IPAddress *string `json:"ipAddress,omitempty"`
30676	// BgpProperties - The set of bgp properties.
30677	BgpProperties *VpnLinkBgpSettings `json:"bgpProperties,omitempty"`
30678	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
30679	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
30680}
30681
30682// VpnSiteProperties parameters for VpnSite.
30683type VpnSiteProperties struct {
30684	// VirtualWan - The VirtualWAN to which the vpnSite belongs.
30685	VirtualWan *SubResource `json:"virtualWan,omitempty"`
30686	// DeviceProperties - The device properties.
30687	DeviceProperties *DeviceProperties `json:"deviceProperties,omitempty"`
30688	// IPAddress - The ip-address for the vpn-site.
30689	IPAddress *string `json:"ipAddress,omitempty"`
30690	// SiteKey - The key for vpn-site that can be used for connections.
30691	SiteKey *string `json:"siteKey,omitempty"`
30692	// AddressSpace - The AddressSpace that contains an array of IP address ranges.
30693	AddressSpace *AddressSpace `json:"addressSpace,omitempty"`
30694	// BgpProperties - The set of bgp properties.
30695	BgpProperties *BgpSettings `json:"bgpProperties,omitempty"`
30696	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
30697	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
30698	// IsSecuritySite - IsSecuritySite flag.
30699	IsSecuritySite *bool `json:"isSecuritySite,omitempty"`
30700	// VpnSiteLinks - List of all vpn site links
30701	VpnSiteLinks *[]VpnSiteLink `json:"vpnSiteLinks,omitempty"`
30702}
30703
30704// VpnSitesConfigurationDownloadFuture an abstraction for monitoring and retrieving the results of a
30705// long-running operation.
30706type VpnSitesConfigurationDownloadFuture struct {
30707	azure.FutureAPI
30708	// Result returns the result of the asynchronous operation.
30709	// If the operation has not completed it will return an error.
30710	Result func(VpnSitesConfigurationClient) (autorest.Response, error)
30711}
30712
30713// VpnSitesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
30714// operation.
30715type VpnSitesCreateOrUpdateFuture struct {
30716	azure.FutureAPI
30717	// Result returns the result of the asynchronous operation.
30718	// If the operation has not completed it will return an error.
30719	Result func(VpnSitesClient) (VpnSite, error)
30720}
30721
30722// VpnSitesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
30723// operation.
30724type VpnSitesDeleteFuture struct {
30725	azure.FutureAPI
30726	// Result returns the result of the asynchronous operation.
30727	// If the operation has not completed it will return an error.
30728	Result func(VpnSitesClient) (autorest.Response, error)
30729}
30730
30731// VpnSitesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
30732// operation.
30733type VpnSitesUpdateTagsFuture struct {
30734	azure.FutureAPI
30735	// Result returns the result of the asynchronous operation.
30736	// If the operation has not completed it will return an error.
30737	Result func(VpnSitesClient) (VpnSite, error)
30738}
30739
30740// Watcher network watcher in a resource group.
30741type Watcher struct {
30742	autorest.Response `json:"-"`
30743	// Etag - A unique read-only string that changes whenever the resource is updated.
30744	Etag *string `json:"etag,omitempty"`
30745	// WatcherPropertiesFormat - Properties of the network watcher.
30746	*WatcherPropertiesFormat `json:"properties,omitempty"`
30747	// ID - Resource ID.
30748	ID *string `json:"id,omitempty"`
30749	// Name - READ-ONLY; Resource name.
30750	Name *string `json:"name,omitempty"`
30751	// Type - READ-ONLY; Resource type.
30752	Type *string `json:"type,omitempty"`
30753	// Location - Resource location.
30754	Location *string `json:"location,omitempty"`
30755	// Tags - Resource tags.
30756	Tags map[string]*string `json:"tags"`
30757}
30758
30759// MarshalJSON is the custom marshaler for Watcher.
30760func (w Watcher) MarshalJSON() ([]byte, error) {
30761	objectMap := make(map[string]interface{})
30762	if w.Etag != nil {
30763		objectMap["etag"] = w.Etag
30764	}
30765	if w.WatcherPropertiesFormat != nil {
30766		objectMap["properties"] = w.WatcherPropertiesFormat
30767	}
30768	if w.ID != nil {
30769		objectMap["id"] = w.ID
30770	}
30771	if w.Location != nil {
30772		objectMap["location"] = w.Location
30773	}
30774	if w.Tags != nil {
30775		objectMap["tags"] = w.Tags
30776	}
30777	return json.Marshal(objectMap)
30778}
30779
30780// UnmarshalJSON is the custom unmarshaler for Watcher struct.
30781func (w *Watcher) UnmarshalJSON(body []byte) error {
30782	var m map[string]*json.RawMessage
30783	err := json.Unmarshal(body, &m)
30784	if err != nil {
30785		return err
30786	}
30787	for k, v := range m {
30788		switch k {
30789		case "etag":
30790			if v != nil {
30791				var etag string
30792				err = json.Unmarshal(*v, &etag)
30793				if err != nil {
30794					return err
30795				}
30796				w.Etag = &etag
30797			}
30798		case "properties":
30799			if v != nil {
30800				var watcherPropertiesFormat WatcherPropertiesFormat
30801				err = json.Unmarshal(*v, &watcherPropertiesFormat)
30802				if err != nil {
30803					return err
30804				}
30805				w.WatcherPropertiesFormat = &watcherPropertiesFormat
30806			}
30807		case "id":
30808			if v != nil {
30809				var ID string
30810				err = json.Unmarshal(*v, &ID)
30811				if err != nil {
30812					return err
30813				}
30814				w.ID = &ID
30815			}
30816		case "name":
30817			if v != nil {
30818				var name string
30819				err = json.Unmarshal(*v, &name)
30820				if err != nil {
30821					return err
30822				}
30823				w.Name = &name
30824			}
30825		case "type":
30826			if v != nil {
30827				var typeVar string
30828				err = json.Unmarshal(*v, &typeVar)
30829				if err != nil {
30830					return err
30831				}
30832				w.Type = &typeVar
30833			}
30834		case "location":
30835			if v != nil {
30836				var location string
30837				err = json.Unmarshal(*v, &location)
30838				if err != nil {
30839					return err
30840				}
30841				w.Location = &location
30842			}
30843		case "tags":
30844			if v != nil {
30845				var tags map[string]*string
30846				err = json.Unmarshal(*v, &tags)
30847				if err != nil {
30848					return err
30849				}
30850				w.Tags = tags
30851			}
30852		}
30853	}
30854
30855	return nil
30856}
30857
30858// WatcherListResult response for ListNetworkWatchers API service call.
30859type WatcherListResult struct {
30860	autorest.Response `json:"-"`
30861	// Value - List of network watcher resources.
30862	Value *[]Watcher `json:"value,omitempty"`
30863}
30864
30865// WatcherPropertiesFormat the network watcher properties.
30866type WatcherPropertiesFormat struct {
30867	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
30868	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
30869}
30870
30871// WatchersCheckConnectivityFuture an abstraction for monitoring and retrieving the results of a
30872// long-running operation.
30873type WatchersCheckConnectivityFuture struct {
30874	azure.FutureAPI
30875	// Result returns the result of the asynchronous operation.
30876	// If the operation has not completed it will return an error.
30877	Result func(WatchersClient) (ConnectivityInformation, error)
30878}
30879
30880// WatchersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
30881// operation.
30882type WatchersDeleteFuture struct {
30883	azure.FutureAPI
30884	// Result returns the result of the asynchronous operation.
30885	// If the operation has not completed it will return an error.
30886	Result func(WatchersClient) (autorest.Response, error)
30887}
30888
30889// WatchersGetAzureReachabilityReportFuture an abstraction for monitoring and retrieving the results of a
30890// long-running operation.
30891type WatchersGetAzureReachabilityReportFuture struct {
30892	azure.FutureAPI
30893	// Result returns the result of the asynchronous operation.
30894	// If the operation has not completed it will return an error.
30895	Result func(WatchersClient) (AzureReachabilityReport, error)
30896}
30897
30898// WatchersGetFlowLogStatusFuture an abstraction for monitoring and retrieving the results of a
30899// long-running operation.
30900type WatchersGetFlowLogStatusFuture struct {
30901	azure.FutureAPI
30902	// Result returns the result of the asynchronous operation.
30903	// If the operation has not completed it will return an error.
30904	Result func(WatchersClient) (FlowLogInformation, error)
30905}
30906
30907// WatchersGetNetworkConfigurationDiagnosticFuture an abstraction for monitoring and retrieving the results
30908// of a long-running operation.
30909type WatchersGetNetworkConfigurationDiagnosticFuture struct {
30910	azure.FutureAPI
30911	// Result returns the result of the asynchronous operation.
30912	// If the operation has not completed it will return an error.
30913	Result func(WatchersClient) (ConfigurationDiagnosticResponse, error)
30914}
30915
30916// WatchersGetNextHopFuture an abstraction for monitoring and retrieving the results of a long-running
30917// operation.
30918type WatchersGetNextHopFuture struct {
30919	azure.FutureAPI
30920	// Result returns the result of the asynchronous operation.
30921	// If the operation has not completed it will return an error.
30922	Result func(WatchersClient) (NextHopResult, error)
30923}
30924
30925// WatchersGetTroubleshootingFuture an abstraction for monitoring and retrieving the results of a
30926// long-running operation.
30927type WatchersGetTroubleshootingFuture struct {
30928	azure.FutureAPI
30929	// Result returns the result of the asynchronous operation.
30930	// If the operation has not completed it will return an error.
30931	Result func(WatchersClient) (TroubleshootingResult, error)
30932}
30933
30934// WatchersGetTroubleshootingResultFuture an abstraction for monitoring and retrieving the results of a
30935// long-running operation.
30936type WatchersGetTroubleshootingResultFuture struct {
30937	azure.FutureAPI
30938	// Result returns the result of the asynchronous operation.
30939	// If the operation has not completed it will return an error.
30940	Result func(WatchersClient) (TroubleshootingResult, error)
30941}
30942
30943// WatchersGetVMSecurityRulesFuture an abstraction for monitoring and retrieving the results of a
30944// long-running operation.
30945type WatchersGetVMSecurityRulesFuture struct {
30946	azure.FutureAPI
30947	// Result returns the result of the asynchronous operation.
30948	// If the operation has not completed it will return an error.
30949	Result func(WatchersClient) (SecurityGroupViewResult, error)
30950}
30951
30952// WatchersListAvailableProvidersFuture an abstraction for monitoring and retrieving the results of a
30953// long-running operation.
30954type WatchersListAvailableProvidersFuture struct {
30955	azure.FutureAPI
30956	// Result returns the result of the asynchronous operation.
30957	// If the operation has not completed it will return an error.
30958	Result func(WatchersClient) (AvailableProvidersList, error)
30959}
30960
30961// WatchersSetFlowLogConfigurationFuture an abstraction for monitoring and retrieving the results of a
30962// long-running operation.
30963type WatchersSetFlowLogConfigurationFuture struct {
30964	azure.FutureAPI
30965	// Result returns the result of the asynchronous operation.
30966	// If the operation has not completed it will return an error.
30967	Result func(WatchersClient) (FlowLogInformation, error)
30968}
30969
30970// WatchersVerifyIPFlowFuture an abstraction for monitoring and retrieving the results of a long-running
30971// operation.
30972type WatchersVerifyIPFlowFuture struct {
30973	azure.FutureAPI
30974	// Result returns the result of the asynchronous operation.
30975	// If the operation has not completed it will return an error.
30976	Result func(WatchersClient) (VerificationIPFlowResult, error)
30977}
30978
30979// WebApplicationFirewallCustomRule defines contents of a web application rule.
30980type WebApplicationFirewallCustomRule struct {
30981	// Name - Gets name of the resource that is unique within a policy. This name can be used to access the resource.
30982	Name *string `json:"name,omitempty"`
30983	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
30984	Etag *string `json:"etag,omitempty"`
30985	// Priority - Describes priority of the rule. Rules with a lower value will be evaluated before rules with a higher value.
30986	Priority *int32 `json:"priority,omitempty"`
30987	// RuleType - Describes type of rule. Possible values include: 'WebApplicationFirewallRuleTypeMatchRule', 'WebApplicationFirewallRuleTypeInvalid'
30988	RuleType WebApplicationFirewallRuleType `json:"ruleType,omitempty"`
30989	// MatchConditions - List of match conditions.
30990	MatchConditions *[]MatchCondition `json:"matchConditions,omitempty"`
30991	// Action - Type of Actions. Possible values include: 'WebApplicationFirewallActionAllow', 'WebApplicationFirewallActionBlock', 'WebApplicationFirewallActionLog'
30992	Action WebApplicationFirewallAction `json:"action,omitempty"`
30993}
30994
30995// MarshalJSON is the custom marshaler for WebApplicationFirewallCustomRule.
30996func (wafcr WebApplicationFirewallCustomRule) MarshalJSON() ([]byte, error) {
30997	objectMap := make(map[string]interface{})
30998	if wafcr.Name != nil {
30999		objectMap["name"] = wafcr.Name
31000	}
31001	if wafcr.Priority != nil {
31002		objectMap["priority"] = wafcr.Priority
31003	}
31004	if wafcr.RuleType != "" {
31005		objectMap["ruleType"] = wafcr.RuleType
31006	}
31007	if wafcr.MatchConditions != nil {
31008		objectMap["matchConditions"] = wafcr.MatchConditions
31009	}
31010	if wafcr.Action != "" {
31011		objectMap["action"] = wafcr.Action
31012	}
31013	return json.Marshal(objectMap)
31014}
31015
31016// WebApplicationFirewallPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a
31017// long-running operation.
31018type WebApplicationFirewallPoliciesDeleteFuture struct {
31019	azure.FutureAPI
31020	// Result returns the result of the asynchronous operation.
31021	// If the operation has not completed it will return an error.
31022	Result func(WebApplicationFirewallPoliciesClient) (autorest.Response, error)
31023}
31024
31025// WebApplicationFirewallPolicy defines web application firewall policy.
31026type WebApplicationFirewallPolicy struct {
31027	autorest.Response `json:"-"`
31028	// WebApplicationFirewallPolicyPropertiesFormat - Properties of the web application firewall policy.
31029	*WebApplicationFirewallPolicyPropertiesFormat `json:"properties,omitempty"`
31030	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
31031	Etag *string `json:"etag,omitempty"`
31032	// ID - Resource ID.
31033	ID *string `json:"id,omitempty"`
31034	// Name - READ-ONLY; Resource name.
31035	Name *string `json:"name,omitempty"`
31036	// Type - READ-ONLY; Resource type.
31037	Type *string `json:"type,omitempty"`
31038	// Location - Resource location.
31039	Location *string `json:"location,omitempty"`
31040	// Tags - Resource tags.
31041	Tags map[string]*string `json:"tags"`
31042}
31043
31044// MarshalJSON is the custom marshaler for WebApplicationFirewallPolicy.
31045func (wafp WebApplicationFirewallPolicy) MarshalJSON() ([]byte, error) {
31046	objectMap := make(map[string]interface{})
31047	if wafp.WebApplicationFirewallPolicyPropertiesFormat != nil {
31048		objectMap["properties"] = wafp.WebApplicationFirewallPolicyPropertiesFormat
31049	}
31050	if wafp.Etag != nil {
31051		objectMap["etag"] = wafp.Etag
31052	}
31053	if wafp.ID != nil {
31054		objectMap["id"] = wafp.ID
31055	}
31056	if wafp.Location != nil {
31057		objectMap["location"] = wafp.Location
31058	}
31059	if wafp.Tags != nil {
31060		objectMap["tags"] = wafp.Tags
31061	}
31062	return json.Marshal(objectMap)
31063}
31064
31065// UnmarshalJSON is the custom unmarshaler for WebApplicationFirewallPolicy struct.
31066func (wafp *WebApplicationFirewallPolicy) UnmarshalJSON(body []byte) error {
31067	var m map[string]*json.RawMessage
31068	err := json.Unmarshal(body, &m)
31069	if err != nil {
31070		return err
31071	}
31072	for k, v := range m {
31073		switch k {
31074		case "properties":
31075			if v != nil {
31076				var webApplicationFirewallPolicyPropertiesFormat WebApplicationFirewallPolicyPropertiesFormat
31077				err = json.Unmarshal(*v, &webApplicationFirewallPolicyPropertiesFormat)
31078				if err != nil {
31079					return err
31080				}
31081				wafp.WebApplicationFirewallPolicyPropertiesFormat = &webApplicationFirewallPolicyPropertiesFormat
31082			}
31083		case "etag":
31084			if v != nil {
31085				var etag string
31086				err = json.Unmarshal(*v, &etag)
31087				if err != nil {
31088					return err
31089				}
31090				wafp.Etag = &etag
31091			}
31092		case "id":
31093			if v != nil {
31094				var ID string
31095				err = json.Unmarshal(*v, &ID)
31096				if err != nil {
31097					return err
31098				}
31099				wafp.ID = &ID
31100			}
31101		case "name":
31102			if v != nil {
31103				var name string
31104				err = json.Unmarshal(*v, &name)
31105				if err != nil {
31106					return err
31107				}
31108				wafp.Name = &name
31109			}
31110		case "type":
31111			if v != nil {
31112				var typeVar string
31113				err = json.Unmarshal(*v, &typeVar)
31114				if err != nil {
31115					return err
31116				}
31117				wafp.Type = &typeVar
31118			}
31119		case "location":
31120			if v != nil {
31121				var location string
31122				err = json.Unmarshal(*v, &location)
31123				if err != nil {
31124					return err
31125				}
31126				wafp.Location = &location
31127			}
31128		case "tags":
31129			if v != nil {
31130				var tags map[string]*string
31131				err = json.Unmarshal(*v, &tags)
31132				if err != nil {
31133					return err
31134				}
31135				wafp.Tags = tags
31136			}
31137		}
31138	}
31139
31140	return nil
31141}
31142
31143// WebApplicationFirewallPolicyListResult result of the request to list WebApplicationFirewallPolicies. It
31144// contains a list of WebApplicationFirewallPolicy objects and a URL link to get the next set of results.
31145type WebApplicationFirewallPolicyListResult struct {
31146	autorest.Response `json:"-"`
31147	// Value - READ-ONLY; List of WebApplicationFirewallPolicies within a resource group.
31148	Value *[]WebApplicationFirewallPolicy `json:"value,omitempty"`
31149	// NextLink - READ-ONLY; URL to get the next set of WebApplicationFirewallPolicy objects if there are any.
31150	NextLink *string `json:"nextLink,omitempty"`
31151}
31152
31153// WebApplicationFirewallPolicyListResultIterator provides access to a complete listing of
31154// WebApplicationFirewallPolicy values.
31155type WebApplicationFirewallPolicyListResultIterator struct {
31156	i    int
31157	page WebApplicationFirewallPolicyListResultPage
31158}
31159
31160// NextWithContext advances to the next value.  If there was an error making
31161// the request the iterator does not advance and the error is returned.
31162func (iter *WebApplicationFirewallPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) {
31163	if tracing.IsEnabled() {
31164		ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPolicyListResultIterator.NextWithContext")
31165		defer func() {
31166			sc := -1
31167			if iter.Response().Response.Response != nil {
31168				sc = iter.Response().Response.Response.StatusCode
31169			}
31170			tracing.EndSpan(ctx, sc, err)
31171		}()
31172	}
31173	iter.i++
31174	if iter.i < len(iter.page.Values()) {
31175		return nil
31176	}
31177	err = iter.page.NextWithContext(ctx)
31178	if err != nil {
31179		iter.i--
31180		return err
31181	}
31182	iter.i = 0
31183	return nil
31184}
31185
31186// Next advances to the next value.  If there was an error making
31187// the request the iterator does not advance and the error is returned.
31188// Deprecated: Use NextWithContext() instead.
31189func (iter *WebApplicationFirewallPolicyListResultIterator) Next() error {
31190	return iter.NextWithContext(context.Background())
31191}
31192
31193// NotDone returns true if the enumeration should be started or is not yet complete.
31194func (iter WebApplicationFirewallPolicyListResultIterator) NotDone() bool {
31195	return iter.page.NotDone() && iter.i < len(iter.page.Values())
31196}
31197
31198// Response returns the raw server response from the last page request.
31199func (iter WebApplicationFirewallPolicyListResultIterator) Response() WebApplicationFirewallPolicyListResult {
31200	return iter.page.Response()
31201}
31202
31203// Value returns the current value or a zero-initialized value if the
31204// iterator has advanced beyond the end of the collection.
31205func (iter WebApplicationFirewallPolicyListResultIterator) Value() WebApplicationFirewallPolicy {
31206	if !iter.page.NotDone() {
31207		return WebApplicationFirewallPolicy{}
31208	}
31209	return iter.page.Values()[iter.i]
31210}
31211
31212// Creates a new instance of the WebApplicationFirewallPolicyListResultIterator type.
31213func NewWebApplicationFirewallPolicyListResultIterator(page WebApplicationFirewallPolicyListResultPage) WebApplicationFirewallPolicyListResultIterator {
31214	return WebApplicationFirewallPolicyListResultIterator{page: page}
31215}
31216
31217// IsEmpty returns true if the ListResult contains no values.
31218func (wafplr WebApplicationFirewallPolicyListResult) IsEmpty() bool {
31219	return wafplr.Value == nil || len(*wafplr.Value) == 0
31220}
31221
31222// hasNextLink returns true if the NextLink is not empty.
31223func (wafplr WebApplicationFirewallPolicyListResult) hasNextLink() bool {
31224	return wafplr.NextLink != nil && len(*wafplr.NextLink) != 0
31225}
31226
31227// webApplicationFirewallPolicyListResultPreparer prepares a request to retrieve the next set of results.
31228// It returns nil if no more results exist.
31229func (wafplr WebApplicationFirewallPolicyListResult) webApplicationFirewallPolicyListResultPreparer(ctx context.Context) (*http.Request, error) {
31230	if !wafplr.hasNextLink() {
31231		return nil, nil
31232	}
31233	return autorest.Prepare((&http.Request{}).WithContext(ctx),
31234		autorest.AsJSON(),
31235		autorest.AsGet(),
31236		autorest.WithBaseURL(to.String(wafplr.NextLink)))
31237}
31238
31239// WebApplicationFirewallPolicyListResultPage contains a page of WebApplicationFirewallPolicy values.
31240type WebApplicationFirewallPolicyListResultPage struct {
31241	fn     func(context.Context, WebApplicationFirewallPolicyListResult) (WebApplicationFirewallPolicyListResult, error)
31242	wafplr WebApplicationFirewallPolicyListResult
31243}
31244
31245// NextWithContext advances to the next page of values.  If there was an error making
31246// the request the page does not advance and the error is returned.
31247func (page *WebApplicationFirewallPolicyListResultPage) NextWithContext(ctx context.Context) (err error) {
31248	if tracing.IsEnabled() {
31249		ctx = tracing.StartSpan(ctx, fqdn+"/WebApplicationFirewallPolicyListResultPage.NextWithContext")
31250		defer func() {
31251			sc := -1
31252			if page.Response().Response.Response != nil {
31253				sc = page.Response().Response.Response.StatusCode
31254			}
31255			tracing.EndSpan(ctx, sc, err)
31256		}()
31257	}
31258	for {
31259		next, err := page.fn(ctx, page.wafplr)
31260		if err != nil {
31261			return err
31262		}
31263		page.wafplr = next
31264		if !next.hasNextLink() || !next.IsEmpty() {
31265			break
31266		}
31267	}
31268	return nil
31269}
31270
31271// Next advances to the next page of values.  If there was an error making
31272// the request the page does not advance and the error is returned.
31273// Deprecated: Use NextWithContext() instead.
31274func (page *WebApplicationFirewallPolicyListResultPage) Next() error {
31275	return page.NextWithContext(context.Background())
31276}
31277
31278// NotDone returns true if the page enumeration should be started or is not yet complete.
31279func (page WebApplicationFirewallPolicyListResultPage) NotDone() bool {
31280	return !page.wafplr.IsEmpty()
31281}
31282
31283// Response returns the raw server response from the last page request.
31284func (page WebApplicationFirewallPolicyListResultPage) Response() WebApplicationFirewallPolicyListResult {
31285	return page.wafplr
31286}
31287
31288// Values returns the slice of values for the current page or nil if there are no values.
31289func (page WebApplicationFirewallPolicyListResultPage) Values() []WebApplicationFirewallPolicy {
31290	if page.wafplr.IsEmpty() {
31291		return nil
31292	}
31293	return *page.wafplr.Value
31294}
31295
31296// Creates a new instance of the WebApplicationFirewallPolicyListResultPage type.
31297func NewWebApplicationFirewallPolicyListResultPage(cur WebApplicationFirewallPolicyListResult, getNextPage func(context.Context, WebApplicationFirewallPolicyListResult) (WebApplicationFirewallPolicyListResult, error)) WebApplicationFirewallPolicyListResultPage {
31298	return WebApplicationFirewallPolicyListResultPage{
31299		fn:     getNextPage,
31300		wafplr: cur,
31301	}
31302}
31303
31304// WebApplicationFirewallPolicyPropertiesFormat defines web application firewall policy properties.
31305type WebApplicationFirewallPolicyPropertiesFormat struct {
31306	// PolicySettings - Describes policySettings for policy.
31307	PolicySettings *PolicySettings `json:"policySettings,omitempty"`
31308	// CustomRules - Describes custom rules inside the policy.
31309	CustomRules *[]WebApplicationFirewallCustomRule `json:"customRules,omitempty"`
31310	// ApplicationGateways - READ-ONLY; A collection of references to application gateways.
31311	ApplicationGateways *[]ApplicationGateway `json:"applicationGateways,omitempty"`
31312	// ProvisioningState - READ-ONLY; Provisioning state of the WebApplicationFirewallPolicy.
31313	ProvisioningState *string `json:"provisioningState,omitempty"`
31314	// ResourceState - READ-ONLY; Resource status of the policy. Possible values include: 'WebApplicationFirewallPolicyResourceStateCreating', 'WebApplicationFirewallPolicyResourceStateEnabling', 'WebApplicationFirewallPolicyResourceStateEnabled', 'WebApplicationFirewallPolicyResourceStateDisabling', 'WebApplicationFirewallPolicyResourceStateDisabled', 'WebApplicationFirewallPolicyResourceStateDeleting'
31315	ResourceState WebApplicationFirewallPolicyResourceState `json:"resourceState,omitempty"`
31316}
31317
31318// MarshalJSON is the custom marshaler for WebApplicationFirewallPolicyPropertiesFormat.
31319func (wafppf WebApplicationFirewallPolicyPropertiesFormat) MarshalJSON() ([]byte, error) {
31320	objectMap := make(map[string]interface{})
31321	if wafppf.PolicySettings != nil {
31322		objectMap["policySettings"] = wafppf.PolicySettings
31323	}
31324	if wafppf.CustomRules != nil {
31325		objectMap["customRules"] = wafppf.CustomRules
31326	}
31327	return json.Marshal(objectMap)
31328}
31329