1package network
2
3// Copyright (c) Microsoft Corporation. All rights reserved.
4// Licensed under the MIT License. See License.txt in the project root for license information.
5//
6// Code generated by Microsoft (R) AutoRest Code Generator.
7// Changes may cause incorrect behavior and will be lost if the code is regenerated.
8
9import (
10	"context"
11	"encoding/json"
12	"github.com/Azure/go-autorest/autorest"
13	"github.com/Azure/go-autorest/autorest/azure"
14	"github.com/Azure/go-autorest/autorest/date"
15	"github.com/Azure/go-autorest/autorest/to"
16	"github.com/Azure/go-autorest/tracing"
17	"net/http"
18)
19
20// The package's fully qualified name.
21const fqdn = "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-11-01/network"
22
23// AddressSpace addressSpace contains an array of IP address ranges that can be used by subnets of the
24// virtual network.
25type AddressSpace struct {
26	// AddressPrefixes - A list of address blocks reserved for this virtual network in CIDR notation.
27	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
28}
29
30// ApplicationGateway application gateway resource
31type ApplicationGateway struct {
32	autorest.Response                   `json:"-"`
33	*ApplicationGatewayPropertiesFormat `json:"properties,omitempty"`
34	// Etag - A unique read-only string that changes whenever the resource is updated.
35	Etag *string `json:"etag,omitempty"`
36	// Zones - A list of availability zones denoting where the resource needs to come from.
37	Zones *[]string `json:"zones,omitempty"`
38	// Identity - The identity of the application gateway, if configured.
39	Identity *ManagedServiceIdentity `json:"identity,omitempty"`
40	// ID - Resource ID.
41	ID *string `json:"id,omitempty"`
42	// Name - READ-ONLY; Resource name.
43	Name *string `json:"name,omitempty"`
44	// Type - READ-ONLY; Resource type.
45	Type *string `json:"type,omitempty"`
46	// Location - Resource location.
47	Location *string `json:"location,omitempty"`
48	// Tags - Resource tags.
49	Tags map[string]*string `json:"tags"`
50}
51
52// MarshalJSON is the custom marshaler for ApplicationGateway.
53func (ag ApplicationGateway) MarshalJSON() ([]byte, error) {
54	objectMap := make(map[string]interface{})
55	if ag.ApplicationGatewayPropertiesFormat != nil {
56		objectMap["properties"] = ag.ApplicationGatewayPropertiesFormat
57	}
58	if ag.Etag != nil {
59		objectMap["etag"] = ag.Etag
60	}
61	if ag.Zones != nil {
62		objectMap["zones"] = ag.Zones
63	}
64	if ag.Identity != nil {
65		objectMap["identity"] = ag.Identity
66	}
67	if ag.ID != nil {
68		objectMap["id"] = ag.ID
69	}
70	if ag.Location != nil {
71		objectMap["location"] = ag.Location
72	}
73	if ag.Tags != nil {
74		objectMap["tags"] = ag.Tags
75	}
76	return json.Marshal(objectMap)
77}
78
79// UnmarshalJSON is the custom unmarshaler for ApplicationGateway struct.
80func (ag *ApplicationGateway) UnmarshalJSON(body []byte) error {
81	var m map[string]*json.RawMessage
82	err := json.Unmarshal(body, &m)
83	if err != nil {
84		return err
85	}
86	for k, v := range m {
87		switch k {
88		case "properties":
89			if v != nil {
90				var applicationGatewayPropertiesFormat ApplicationGatewayPropertiesFormat
91				err = json.Unmarshal(*v, &applicationGatewayPropertiesFormat)
92				if err != nil {
93					return err
94				}
95				ag.ApplicationGatewayPropertiesFormat = &applicationGatewayPropertiesFormat
96			}
97		case "etag":
98			if v != nil {
99				var etag string
100				err = json.Unmarshal(*v, &etag)
101				if err != nil {
102					return err
103				}
104				ag.Etag = &etag
105			}
106		case "zones":
107			if v != nil {
108				var zones []string
109				err = json.Unmarshal(*v, &zones)
110				if err != nil {
111					return err
112				}
113				ag.Zones = &zones
114			}
115		case "identity":
116			if v != nil {
117				var identity ManagedServiceIdentity
118				err = json.Unmarshal(*v, &identity)
119				if err != nil {
120					return err
121				}
122				ag.Identity = &identity
123			}
124		case "id":
125			if v != nil {
126				var ID string
127				err = json.Unmarshal(*v, &ID)
128				if err != nil {
129					return err
130				}
131				ag.ID = &ID
132			}
133		case "name":
134			if v != nil {
135				var name string
136				err = json.Unmarshal(*v, &name)
137				if err != nil {
138					return err
139				}
140				ag.Name = &name
141			}
142		case "type":
143			if v != nil {
144				var typeVar string
145				err = json.Unmarshal(*v, &typeVar)
146				if err != nil {
147					return err
148				}
149				ag.Type = &typeVar
150			}
151		case "location":
152			if v != nil {
153				var location string
154				err = json.Unmarshal(*v, &location)
155				if err != nil {
156					return err
157				}
158				ag.Location = &location
159			}
160		case "tags":
161			if v != nil {
162				var tags map[string]*string
163				err = json.Unmarshal(*v, &tags)
164				if err != nil {
165					return err
166				}
167				ag.Tags = tags
168			}
169		}
170	}
171
172	return nil
173}
174
175// ApplicationGatewayAuthenticationCertificate authentication certificates of an application gateway.
176type ApplicationGatewayAuthenticationCertificate struct {
177	*ApplicationGatewayAuthenticationCertificatePropertiesFormat `json:"properties,omitempty"`
178	// Name - Name of the authentication certificate that is unique within an Application Gateway.
179	Name *string `json:"name,omitempty"`
180	// Etag - A unique read-only string that changes whenever the resource is updated.
181	Etag *string `json:"etag,omitempty"`
182	// Type - Type of the resource.
183	Type *string `json:"type,omitempty"`
184	// ID - Resource ID.
185	ID *string `json:"id,omitempty"`
186}
187
188// MarshalJSON is the custom marshaler for ApplicationGatewayAuthenticationCertificate.
189func (agac ApplicationGatewayAuthenticationCertificate) MarshalJSON() ([]byte, error) {
190	objectMap := make(map[string]interface{})
191	if agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat != nil {
192		objectMap["properties"] = agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat
193	}
194	if agac.Name != nil {
195		objectMap["name"] = agac.Name
196	}
197	if agac.Etag != nil {
198		objectMap["etag"] = agac.Etag
199	}
200	if agac.Type != nil {
201		objectMap["type"] = agac.Type
202	}
203	if agac.ID != nil {
204		objectMap["id"] = agac.ID
205	}
206	return json.Marshal(objectMap)
207}
208
209// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayAuthenticationCertificate struct.
210func (agac *ApplicationGatewayAuthenticationCertificate) UnmarshalJSON(body []byte) error {
211	var m map[string]*json.RawMessage
212	err := json.Unmarshal(body, &m)
213	if err != nil {
214		return err
215	}
216	for k, v := range m {
217		switch k {
218		case "properties":
219			if v != nil {
220				var applicationGatewayAuthenticationCertificatePropertiesFormat ApplicationGatewayAuthenticationCertificatePropertiesFormat
221				err = json.Unmarshal(*v, &applicationGatewayAuthenticationCertificatePropertiesFormat)
222				if err != nil {
223					return err
224				}
225				agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat = &applicationGatewayAuthenticationCertificatePropertiesFormat
226			}
227		case "name":
228			if v != nil {
229				var name string
230				err = json.Unmarshal(*v, &name)
231				if err != nil {
232					return err
233				}
234				agac.Name = &name
235			}
236		case "etag":
237			if v != nil {
238				var etag string
239				err = json.Unmarshal(*v, &etag)
240				if err != nil {
241					return err
242				}
243				agac.Etag = &etag
244			}
245		case "type":
246			if v != nil {
247				var typeVar string
248				err = json.Unmarshal(*v, &typeVar)
249				if err != nil {
250					return err
251				}
252				agac.Type = &typeVar
253			}
254		case "id":
255			if v != nil {
256				var ID string
257				err = json.Unmarshal(*v, &ID)
258				if err != nil {
259					return err
260				}
261				agac.ID = &ID
262			}
263		}
264	}
265
266	return nil
267}
268
269// ApplicationGatewayAuthenticationCertificatePropertiesFormat authentication certificates properties of an
270// application gateway.
271type ApplicationGatewayAuthenticationCertificatePropertiesFormat struct {
272	// Data - Certificate public data.
273	Data *string `json:"data,omitempty"`
274	// ProvisioningState - Provisioning state of the authentication certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
275	ProvisioningState *string `json:"provisioningState,omitempty"`
276}
277
278// ApplicationGatewayAutoscaleConfiguration application Gateway autoscale configuration.
279type ApplicationGatewayAutoscaleConfiguration struct {
280	// MinCapacity - Lower bound on number of Application Gateway capacity
281	MinCapacity *int32 `json:"minCapacity,omitempty"`
282	// MaxCapacity - Upper bound on number of Application Gateway capacity
283	MaxCapacity *int32 `json:"maxCapacity,omitempty"`
284}
285
286// ApplicationGatewayAvailableSslOptions response for ApplicationGatewayAvailableSslOptions API service
287// call.
288type ApplicationGatewayAvailableSslOptions struct {
289	autorest.Response                                      `json:"-"`
290	*ApplicationGatewayAvailableSslOptionsPropertiesFormat `json:"properties,omitempty"`
291	// ID - Resource ID.
292	ID *string `json:"id,omitempty"`
293	// Name - READ-ONLY; Resource name.
294	Name *string `json:"name,omitempty"`
295	// Type - READ-ONLY; Resource type.
296	Type *string `json:"type,omitempty"`
297	// Location - Resource location.
298	Location *string `json:"location,omitempty"`
299	// Tags - Resource tags.
300	Tags map[string]*string `json:"tags"`
301}
302
303// MarshalJSON is the custom marshaler for ApplicationGatewayAvailableSslOptions.
304func (agaso ApplicationGatewayAvailableSslOptions) MarshalJSON() ([]byte, error) {
305	objectMap := make(map[string]interface{})
306	if agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat != nil {
307		objectMap["properties"] = agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat
308	}
309	if agaso.ID != nil {
310		objectMap["id"] = agaso.ID
311	}
312	if agaso.Location != nil {
313		objectMap["location"] = agaso.Location
314	}
315	if agaso.Tags != nil {
316		objectMap["tags"] = agaso.Tags
317	}
318	return json.Marshal(objectMap)
319}
320
321// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayAvailableSslOptions struct.
322func (agaso *ApplicationGatewayAvailableSslOptions) UnmarshalJSON(body []byte) error {
323	var m map[string]*json.RawMessage
324	err := json.Unmarshal(body, &m)
325	if err != nil {
326		return err
327	}
328	for k, v := range m {
329		switch k {
330		case "properties":
331			if v != nil {
332				var applicationGatewayAvailableSslOptionsPropertiesFormat ApplicationGatewayAvailableSslOptionsPropertiesFormat
333				err = json.Unmarshal(*v, &applicationGatewayAvailableSslOptionsPropertiesFormat)
334				if err != nil {
335					return err
336				}
337				agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat = &applicationGatewayAvailableSslOptionsPropertiesFormat
338			}
339		case "id":
340			if v != nil {
341				var ID string
342				err = json.Unmarshal(*v, &ID)
343				if err != nil {
344					return err
345				}
346				agaso.ID = &ID
347			}
348		case "name":
349			if v != nil {
350				var name string
351				err = json.Unmarshal(*v, &name)
352				if err != nil {
353					return err
354				}
355				agaso.Name = &name
356			}
357		case "type":
358			if v != nil {
359				var typeVar string
360				err = json.Unmarshal(*v, &typeVar)
361				if err != nil {
362					return err
363				}
364				agaso.Type = &typeVar
365			}
366		case "location":
367			if v != nil {
368				var location string
369				err = json.Unmarshal(*v, &location)
370				if err != nil {
371					return err
372				}
373				agaso.Location = &location
374			}
375		case "tags":
376			if v != nil {
377				var tags map[string]*string
378				err = json.Unmarshal(*v, &tags)
379				if err != nil {
380					return err
381				}
382				agaso.Tags = tags
383			}
384		}
385	}
386
387	return nil
388}
389
390// ApplicationGatewayAvailableSslOptionsPropertiesFormat properties of
391// ApplicationGatewayAvailableSslOptions
392type ApplicationGatewayAvailableSslOptionsPropertiesFormat struct {
393	// PredefinedPolicies - List of available Ssl predefined policy.
394	PredefinedPolicies *[]SubResource `json:"predefinedPolicies,omitempty"`
395	// DefaultPolicy - Name of the Ssl predefined policy applied by default to application gateway. Possible values include: 'AppGwSslPolicy20150501', 'AppGwSslPolicy20170401', 'AppGwSslPolicy20170401S'
396	DefaultPolicy ApplicationGatewaySslPolicyName `json:"defaultPolicy,omitempty"`
397	// AvailableCipherSuites - List of available Ssl cipher suites.
398	AvailableCipherSuites *[]ApplicationGatewaySslCipherSuite `json:"availableCipherSuites,omitempty"`
399	// AvailableProtocols - List of available Ssl protocols.
400	AvailableProtocols *[]ApplicationGatewaySslProtocol `json:"availableProtocols,omitempty"`
401}
402
403// ApplicationGatewayAvailableSslPredefinedPolicies response for ApplicationGatewayAvailableSslOptions API
404// service call.
405type ApplicationGatewayAvailableSslPredefinedPolicies struct {
406	autorest.Response `json:"-"`
407	// Value - List of available Ssl predefined policy.
408	Value *[]ApplicationGatewaySslPredefinedPolicy `json:"value,omitempty"`
409	// NextLink - URL to get the next set of results.
410	NextLink *string `json:"nextLink,omitempty"`
411}
412
413// ApplicationGatewayAvailableSslPredefinedPoliciesIterator provides access to a complete listing of
414// ApplicationGatewaySslPredefinedPolicy values.
415type ApplicationGatewayAvailableSslPredefinedPoliciesIterator struct {
416	i    int
417	page ApplicationGatewayAvailableSslPredefinedPoliciesPage
418}
419
420// NextWithContext advances to the next value.  If there was an error making
421// the request the iterator does not advance and the error is returned.
422func (iter *ApplicationGatewayAvailableSslPredefinedPoliciesIterator) NextWithContext(ctx context.Context) (err error) {
423	if tracing.IsEnabled() {
424		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayAvailableSslPredefinedPoliciesIterator.NextWithContext")
425		defer func() {
426			sc := -1
427			if iter.Response().Response.Response != nil {
428				sc = iter.Response().Response.Response.StatusCode
429			}
430			tracing.EndSpan(ctx, sc, err)
431		}()
432	}
433	iter.i++
434	if iter.i < len(iter.page.Values()) {
435		return nil
436	}
437	err = iter.page.NextWithContext(ctx)
438	if err != nil {
439		iter.i--
440		return err
441	}
442	iter.i = 0
443	return nil
444}
445
446// Next advances to the next value.  If there was an error making
447// the request the iterator does not advance and the error is returned.
448// Deprecated: Use NextWithContext() instead.
449func (iter *ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Next() error {
450	return iter.NextWithContext(context.Background())
451}
452
453// NotDone returns true if the enumeration should be started or is not yet complete.
454func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) NotDone() bool {
455	return iter.page.NotDone() && iter.i < len(iter.page.Values())
456}
457
458// Response returns the raw server response from the last page request.
459func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Response() ApplicationGatewayAvailableSslPredefinedPolicies {
460	return iter.page.Response()
461}
462
463// Value returns the current value or a zero-initialized value if the
464// iterator has advanced beyond the end of the collection.
465func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Value() ApplicationGatewaySslPredefinedPolicy {
466	if !iter.page.NotDone() {
467		return ApplicationGatewaySslPredefinedPolicy{}
468	}
469	return iter.page.Values()[iter.i]
470}
471
472// Creates a new instance of the ApplicationGatewayAvailableSslPredefinedPoliciesIterator type.
473func NewApplicationGatewayAvailableSslPredefinedPoliciesIterator(page ApplicationGatewayAvailableSslPredefinedPoliciesPage) ApplicationGatewayAvailableSslPredefinedPoliciesIterator {
474	return ApplicationGatewayAvailableSslPredefinedPoliciesIterator{page: page}
475}
476
477// IsEmpty returns true if the ListResult contains no values.
478func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) IsEmpty() bool {
479	return agaspp.Value == nil || len(*agaspp.Value) == 0
480}
481
482// hasNextLink returns true if the NextLink is not empty.
483func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) hasNextLink() bool {
484	return agaspp.NextLink != nil && len(*agaspp.NextLink) != 0
485}
486
487// applicationGatewayAvailableSslPredefinedPoliciesPreparer prepares a request to retrieve the next set of results.
488// It returns nil if no more results exist.
489func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) applicationGatewayAvailableSslPredefinedPoliciesPreparer(ctx context.Context) (*http.Request, error) {
490	if !agaspp.hasNextLink() {
491		return nil, nil
492	}
493	return autorest.Prepare((&http.Request{}).WithContext(ctx),
494		autorest.AsJSON(),
495		autorest.AsGet(),
496		autorest.WithBaseURL(to.String(agaspp.NextLink)))
497}
498
499// ApplicationGatewayAvailableSslPredefinedPoliciesPage contains a page of
500// ApplicationGatewaySslPredefinedPolicy values.
501type ApplicationGatewayAvailableSslPredefinedPoliciesPage struct {
502	fn     func(context.Context, ApplicationGatewayAvailableSslPredefinedPolicies) (ApplicationGatewayAvailableSslPredefinedPolicies, error)
503	agaspp ApplicationGatewayAvailableSslPredefinedPolicies
504}
505
506// NextWithContext advances to the next page of values.  If there was an error making
507// the request the page does not advance and the error is returned.
508func (page *ApplicationGatewayAvailableSslPredefinedPoliciesPage) NextWithContext(ctx context.Context) (err error) {
509	if tracing.IsEnabled() {
510		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayAvailableSslPredefinedPoliciesPage.NextWithContext")
511		defer func() {
512			sc := -1
513			if page.Response().Response.Response != nil {
514				sc = page.Response().Response.Response.StatusCode
515			}
516			tracing.EndSpan(ctx, sc, err)
517		}()
518	}
519	for {
520		next, err := page.fn(ctx, page.agaspp)
521		if err != nil {
522			return err
523		}
524		page.agaspp = next
525		if !next.hasNextLink() || !next.IsEmpty() {
526			break
527		}
528	}
529	return nil
530}
531
532// Next advances to the next page of values.  If there was an error making
533// the request the page does not advance and the error is returned.
534// Deprecated: Use NextWithContext() instead.
535func (page *ApplicationGatewayAvailableSslPredefinedPoliciesPage) Next() error {
536	return page.NextWithContext(context.Background())
537}
538
539// NotDone returns true if the page enumeration should be started or is not yet complete.
540func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) NotDone() bool {
541	return !page.agaspp.IsEmpty()
542}
543
544// Response returns the raw server response from the last page request.
545func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) Response() ApplicationGatewayAvailableSslPredefinedPolicies {
546	return page.agaspp
547}
548
549// Values returns the slice of values for the current page or nil if there are no values.
550func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) Values() []ApplicationGatewaySslPredefinedPolicy {
551	if page.agaspp.IsEmpty() {
552		return nil
553	}
554	return *page.agaspp.Value
555}
556
557// Creates a new instance of the ApplicationGatewayAvailableSslPredefinedPoliciesPage type.
558func NewApplicationGatewayAvailableSslPredefinedPoliciesPage(cur ApplicationGatewayAvailableSslPredefinedPolicies, getNextPage func(context.Context, ApplicationGatewayAvailableSslPredefinedPolicies) (ApplicationGatewayAvailableSslPredefinedPolicies, error)) ApplicationGatewayAvailableSslPredefinedPoliciesPage {
559	return ApplicationGatewayAvailableSslPredefinedPoliciesPage{
560		fn:     getNextPage,
561		agaspp: cur,
562	}
563}
564
565// ApplicationGatewayAvailableWafRuleSetsResult response for ApplicationGatewayAvailableWafRuleSets API
566// service call.
567type ApplicationGatewayAvailableWafRuleSetsResult struct {
568	autorest.Response `json:"-"`
569	// Value - The list of application gateway rule sets.
570	Value *[]ApplicationGatewayFirewallRuleSet `json:"value,omitempty"`
571}
572
573// ApplicationGatewayBackendAddress backend address of an application gateway.
574type ApplicationGatewayBackendAddress struct {
575	// Fqdn - Fully qualified domain name (FQDN).
576	Fqdn *string `json:"fqdn,omitempty"`
577	// IPAddress - IP address
578	IPAddress *string `json:"ipAddress,omitempty"`
579}
580
581// ApplicationGatewayBackendAddressPool backend Address Pool of an application gateway.
582type ApplicationGatewayBackendAddressPool struct {
583	*ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"`
584	// Name - Name of the backend address pool that is unique within an Application Gateway.
585	Name *string `json:"name,omitempty"`
586	// Etag - A unique read-only string that changes whenever the resource is updated.
587	Etag *string `json:"etag,omitempty"`
588	// Type - Type of the resource.
589	Type *string `json:"type,omitempty"`
590	// ID - Resource ID.
591	ID *string `json:"id,omitempty"`
592}
593
594// MarshalJSON is the custom marshaler for ApplicationGatewayBackendAddressPool.
595func (agbap ApplicationGatewayBackendAddressPool) MarshalJSON() ([]byte, error) {
596	objectMap := make(map[string]interface{})
597	if agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat != nil {
598		objectMap["properties"] = agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat
599	}
600	if agbap.Name != nil {
601		objectMap["name"] = agbap.Name
602	}
603	if agbap.Etag != nil {
604		objectMap["etag"] = agbap.Etag
605	}
606	if agbap.Type != nil {
607		objectMap["type"] = agbap.Type
608	}
609	if agbap.ID != nil {
610		objectMap["id"] = agbap.ID
611	}
612	return json.Marshal(objectMap)
613}
614
615// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayBackendAddressPool struct.
616func (agbap *ApplicationGatewayBackendAddressPool) UnmarshalJSON(body []byte) error {
617	var m map[string]*json.RawMessage
618	err := json.Unmarshal(body, &m)
619	if err != nil {
620		return err
621	}
622	for k, v := range m {
623		switch k {
624		case "properties":
625			if v != nil {
626				var applicationGatewayBackendAddressPoolPropertiesFormat ApplicationGatewayBackendAddressPoolPropertiesFormat
627				err = json.Unmarshal(*v, &applicationGatewayBackendAddressPoolPropertiesFormat)
628				if err != nil {
629					return err
630				}
631				agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat = &applicationGatewayBackendAddressPoolPropertiesFormat
632			}
633		case "name":
634			if v != nil {
635				var name string
636				err = json.Unmarshal(*v, &name)
637				if err != nil {
638					return err
639				}
640				agbap.Name = &name
641			}
642		case "etag":
643			if v != nil {
644				var etag string
645				err = json.Unmarshal(*v, &etag)
646				if err != nil {
647					return err
648				}
649				agbap.Etag = &etag
650			}
651		case "type":
652			if v != nil {
653				var typeVar string
654				err = json.Unmarshal(*v, &typeVar)
655				if err != nil {
656					return err
657				}
658				agbap.Type = &typeVar
659			}
660		case "id":
661			if v != nil {
662				var ID string
663				err = json.Unmarshal(*v, &ID)
664				if err != nil {
665					return err
666				}
667				agbap.ID = &ID
668			}
669		}
670	}
671
672	return nil
673}
674
675// ApplicationGatewayBackendAddressPoolPropertiesFormat properties of Backend Address Pool of an
676// application gateway.
677type ApplicationGatewayBackendAddressPoolPropertiesFormat struct {
678	// BackendIPConfigurations - Collection of references to IPs defined in network interfaces.
679	BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"`
680	// BackendAddresses - Backend addresses
681	BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"`
682	// ProvisioningState - Provisioning state of the backend address pool resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
683	ProvisioningState *string `json:"provisioningState,omitempty"`
684}
685
686// ApplicationGatewayBackendHealth list of ApplicationGatewayBackendHealthPool resources.
687type ApplicationGatewayBackendHealth struct {
688	autorest.Response   `json:"-"`
689	BackendAddressPools *[]ApplicationGatewayBackendHealthPool `json:"backendAddressPools,omitempty"`
690}
691
692// ApplicationGatewayBackendHealthHTTPSettings application gateway BackendHealthHttp settings.
693type ApplicationGatewayBackendHealthHTTPSettings struct {
694	// BackendHTTPSettings - Reference of an ApplicationGatewayBackendHttpSettings resource.
695	BackendHTTPSettings *ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettings,omitempty"`
696	// Servers - List of ApplicationGatewayBackendHealthServer resources.
697	Servers *[]ApplicationGatewayBackendHealthServer `json:"servers,omitempty"`
698}
699
700// ApplicationGatewayBackendHealthPool application gateway BackendHealth pool.
701type ApplicationGatewayBackendHealthPool struct {
702	// BackendAddressPool - Reference of an ApplicationGatewayBackendAddressPool resource.
703	BackendAddressPool *ApplicationGatewayBackendAddressPool `json:"backendAddressPool,omitempty"`
704	// BackendHTTPSettingsCollection - List of ApplicationGatewayBackendHealthHttpSettings resources.
705	BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHealthHTTPSettings `json:"backendHttpSettingsCollection,omitempty"`
706}
707
708// ApplicationGatewayBackendHealthServer application gateway backendhealth http settings.
709type ApplicationGatewayBackendHealthServer struct {
710	// Address - IP address or FQDN of backend server.
711	Address *string `json:"address,omitempty"`
712	// IPConfiguration - Reference of IP configuration of backend server.
713	IPConfiguration *InterfaceIPConfiguration `json:"ipConfiguration,omitempty"`
714	// Health - Health of backend server. Possible values include: 'Unknown', 'Up', 'Down', 'Partial', 'Draining'
715	Health ApplicationGatewayBackendHealthServerHealth `json:"health,omitempty"`
716}
717
718// ApplicationGatewayBackendHTTPSettings backend address pool settings of an application gateway.
719type ApplicationGatewayBackendHTTPSettings struct {
720	*ApplicationGatewayBackendHTTPSettingsPropertiesFormat `json:"properties,omitempty"`
721	// Name - Name of the backend http settings that is unique within an Application Gateway.
722	Name *string `json:"name,omitempty"`
723	// Etag - A unique read-only string that changes whenever the resource is updated.
724	Etag *string `json:"etag,omitempty"`
725	// Type - Type of the resource.
726	Type *string `json:"type,omitempty"`
727	// ID - Resource ID.
728	ID *string `json:"id,omitempty"`
729}
730
731// MarshalJSON is the custom marshaler for ApplicationGatewayBackendHTTPSettings.
732func (agbhs ApplicationGatewayBackendHTTPSettings) MarshalJSON() ([]byte, error) {
733	objectMap := make(map[string]interface{})
734	if agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat != nil {
735		objectMap["properties"] = agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat
736	}
737	if agbhs.Name != nil {
738		objectMap["name"] = agbhs.Name
739	}
740	if agbhs.Etag != nil {
741		objectMap["etag"] = agbhs.Etag
742	}
743	if agbhs.Type != nil {
744		objectMap["type"] = agbhs.Type
745	}
746	if agbhs.ID != nil {
747		objectMap["id"] = agbhs.ID
748	}
749	return json.Marshal(objectMap)
750}
751
752// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayBackendHTTPSettings struct.
753func (agbhs *ApplicationGatewayBackendHTTPSettings) UnmarshalJSON(body []byte) error {
754	var m map[string]*json.RawMessage
755	err := json.Unmarshal(body, &m)
756	if err != nil {
757		return err
758	}
759	for k, v := range m {
760		switch k {
761		case "properties":
762			if v != nil {
763				var applicationGatewayBackendHTTPSettingsPropertiesFormat ApplicationGatewayBackendHTTPSettingsPropertiesFormat
764				err = json.Unmarshal(*v, &applicationGatewayBackendHTTPSettingsPropertiesFormat)
765				if err != nil {
766					return err
767				}
768				agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat = &applicationGatewayBackendHTTPSettingsPropertiesFormat
769			}
770		case "name":
771			if v != nil {
772				var name string
773				err = json.Unmarshal(*v, &name)
774				if err != nil {
775					return err
776				}
777				agbhs.Name = &name
778			}
779		case "etag":
780			if v != nil {
781				var etag string
782				err = json.Unmarshal(*v, &etag)
783				if err != nil {
784					return err
785				}
786				agbhs.Etag = &etag
787			}
788		case "type":
789			if v != nil {
790				var typeVar string
791				err = json.Unmarshal(*v, &typeVar)
792				if err != nil {
793					return err
794				}
795				agbhs.Type = &typeVar
796			}
797		case "id":
798			if v != nil {
799				var ID string
800				err = json.Unmarshal(*v, &ID)
801				if err != nil {
802					return err
803				}
804				agbhs.ID = &ID
805			}
806		}
807	}
808
809	return nil
810}
811
812// ApplicationGatewayBackendHTTPSettingsPropertiesFormat properties of Backend address pool settings of an
813// application gateway.
814type ApplicationGatewayBackendHTTPSettingsPropertiesFormat struct {
815	// Port - The destination port on the backend.
816	Port *int32 `json:"port,omitempty"`
817	// Protocol - The protocol used to communicate with the backend. Possible values are 'Http' and 'Https'. Possible values include: 'HTTP', 'HTTPS'
818	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
819	// CookieBasedAffinity - Cookie based affinity. Possible values include: 'Enabled', 'Disabled'
820	CookieBasedAffinity ApplicationGatewayCookieBasedAffinity `json:"cookieBasedAffinity,omitempty"`
821	// 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.
822	RequestTimeout *int32 `json:"requestTimeout,omitempty"`
823	// Probe - Probe resource of an application gateway.
824	Probe *SubResource `json:"probe,omitempty"`
825	// AuthenticationCertificates - Array of references to application gateway authentication certificates.
826	AuthenticationCertificates *[]SubResource `json:"authenticationCertificates,omitempty"`
827	// TrustedRootCertificates - Array of references to application gateway trusted root certificates.
828	TrustedRootCertificates *[]SubResource `json:"trustedRootCertificates,omitempty"`
829	// ConnectionDraining - Connection draining of the backend http settings resource.
830	ConnectionDraining *ApplicationGatewayConnectionDraining `json:"connectionDraining,omitempty"`
831	// HostName - Host header to be sent to the backend servers.
832	HostName *string `json:"hostName,omitempty"`
833	// PickHostNameFromBackendAddress - Whether to pick host header should be picked from the host name of the backend server. Default value is false.
834	PickHostNameFromBackendAddress *bool `json:"pickHostNameFromBackendAddress,omitempty"`
835	// AffinityCookieName - Cookie name to use for the affinity cookie.
836	AffinityCookieName *string `json:"affinityCookieName,omitempty"`
837	// ProbeEnabled - Whether the probe is enabled. Default value is false.
838	ProbeEnabled *bool `json:"probeEnabled,omitempty"`
839	// Path - Path which should be used as a prefix for all HTTP requests. Null means no path will be prefixed. Default value is null.
840	Path *string `json:"path,omitempty"`
841	// ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
842	ProvisioningState *string `json:"provisioningState,omitempty"`
843}
844
845// ApplicationGatewayConnectionDraining connection draining allows open connections to a backend server to
846// be active for a specified time after the backend server got removed from the configuration.
847type ApplicationGatewayConnectionDraining struct {
848	// Enabled - Whether connection draining is enabled or not.
849	Enabled *bool `json:"enabled,omitempty"`
850	// DrainTimeoutInSec - The number of seconds connection draining is active. Acceptable values are from 1 second to 3600 seconds.
851	DrainTimeoutInSec *int32 `json:"drainTimeoutInSec,omitempty"`
852}
853
854// ApplicationGatewayCustomError customer error of an application gateway.
855type ApplicationGatewayCustomError struct {
856	// StatusCode - Status code of the application gateway customer error. Possible values include: 'HTTPStatus403', 'HTTPStatus502'
857	StatusCode ApplicationGatewayCustomErrorStatusCode `json:"statusCode,omitempty"`
858	// CustomErrorPageURL - Error page URL of the application gateway customer error.
859	CustomErrorPageURL *string `json:"customErrorPageUrl,omitempty"`
860}
861
862// ApplicationGatewayFirewallDisabledRuleGroup allows to disable rules within a rule group or an entire
863// rule group.
864type ApplicationGatewayFirewallDisabledRuleGroup struct {
865	// RuleGroupName - The name of the rule group that will be disabled.
866	RuleGroupName *string `json:"ruleGroupName,omitempty"`
867	// Rules - The list of rules that will be disabled. If null, all rules of the rule group will be disabled.
868	Rules *[]int32 `json:"rules,omitempty"`
869}
870
871// ApplicationGatewayFirewallExclusion allow to exclude some variable satisfy the condition for the WAF
872// check
873type ApplicationGatewayFirewallExclusion struct {
874	// MatchVariable - The variable to be excluded.
875	MatchVariable *string `json:"matchVariable,omitempty"`
876	// SelectorMatchOperator - When matchVariable is a collection, operate on the selector to specify which elements in the collection this exclusion applies to.
877	SelectorMatchOperator *string `json:"selectorMatchOperator,omitempty"`
878	// Selector - When matchVariable is a collection, operator used to specify which elements in the collection this exclusion applies to.
879	Selector *string `json:"selector,omitempty"`
880}
881
882// ApplicationGatewayFirewallRule a web application firewall rule.
883type ApplicationGatewayFirewallRule struct {
884	// RuleID - The identifier of the web application firewall rule.
885	RuleID *int32 `json:"ruleId,omitempty"`
886	// Description - The description of the web application firewall rule.
887	Description *string `json:"description,omitempty"`
888}
889
890// ApplicationGatewayFirewallRuleGroup a web application firewall rule group.
891type ApplicationGatewayFirewallRuleGroup struct {
892	// RuleGroupName - The name of the web application firewall rule group.
893	RuleGroupName *string `json:"ruleGroupName,omitempty"`
894	// Description - The description of the web application firewall rule group.
895	Description *string `json:"description,omitempty"`
896	// Rules - The rules of the web application firewall rule group.
897	Rules *[]ApplicationGatewayFirewallRule `json:"rules,omitempty"`
898}
899
900// ApplicationGatewayFirewallRuleSet a web application firewall rule set.
901type ApplicationGatewayFirewallRuleSet struct {
902	*ApplicationGatewayFirewallRuleSetPropertiesFormat `json:"properties,omitempty"`
903	// ID - Resource ID.
904	ID *string `json:"id,omitempty"`
905	// Name - READ-ONLY; Resource name.
906	Name *string `json:"name,omitempty"`
907	// Type - READ-ONLY; Resource type.
908	Type *string `json:"type,omitempty"`
909	// Location - Resource location.
910	Location *string `json:"location,omitempty"`
911	// Tags - Resource tags.
912	Tags map[string]*string `json:"tags"`
913}
914
915// MarshalJSON is the custom marshaler for ApplicationGatewayFirewallRuleSet.
916func (agfrs ApplicationGatewayFirewallRuleSet) MarshalJSON() ([]byte, error) {
917	objectMap := make(map[string]interface{})
918	if agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat != nil {
919		objectMap["properties"] = agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat
920	}
921	if agfrs.ID != nil {
922		objectMap["id"] = agfrs.ID
923	}
924	if agfrs.Location != nil {
925		objectMap["location"] = agfrs.Location
926	}
927	if agfrs.Tags != nil {
928		objectMap["tags"] = agfrs.Tags
929	}
930	return json.Marshal(objectMap)
931}
932
933// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFirewallRuleSet struct.
934func (agfrs *ApplicationGatewayFirewallRuleSet) UnmarshalJSON(body []byte) error {
935	var m map[string]*json.RawMessage
936	err := json.Unmarshal(body, &m)
937	if err != nil {
938		return err
939	}
940	for k, v := range m {
941		switch k {
942		case "properties":
943			if v != nil {
944				var applicationGatewayFirewallRuleSetPropertiesFormat ApplicationGatewayFirewallRuleSetPropertiesFormat
945				err = json.Unmarshal(*v, &applicationGatewayFirewallRuleSetPropertiesFormat)
946				if err != nil {
947					return err
948				}
949				agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat = &applicationGatewayFirewallRuleSetPropertiesFormat
950			}
951		case "id":
952			if v != nil {
953				var ID string
954				err = json.Unmarshal(*v, &ID)
955				if err != nil {
956					return err
957				}
958				agfrs.ID = &ID
959			}
960		case "name":
961			if v != nil {
962				var name string
963				err = json.Unmarshal(*v, &name)
964				if err != nil {
965					return err
966				}
967				agfrs.Name = &name
968			}
969		case "type":
970			if v != nil {
971				var typeVar string
972				err = json.Unmarshal(*v, &typeVar)
973				if err != nil {
974					return err
975				}
976				agfrs.Type = &typeVar
977			}
978		case "location":
979			if v != nil {
980				var location string
981				err = json.Unmarshal(*v, &location)
982				if err != nil {
983					return err
984				}
985				agfrs.Location = &location
986			}
987		case "tags":
988			if v != nil {
989				var tags map[string]*string
990				err = json.Unmarshal(*v, &tags)
991				if err != nil {
992					return err
993				}
994				agfrs.Tags = tags
995			}
996		}
997	}
998
999	return nil
1000}
1001
1002// ApplicationGatewayFirewallRuleSetPropertiesFormat properties of the web application firewall rule set.
1003type ApplicationGatewayFirewallRuleSetPropertiesFormat struct {
1004	// ProvisioningState - The provisioning state of the web application firewall rule set.
1005	ProvisioningState *string `json:"provisioningState,omitempty"`
1006	// RuleSetType - The type of the web application firewall rule set.
1007	RuleSetType *string `json:"ruleSetType,omitempty"`
1008	// RuleSetVersion - The version of the web application firewall rule set type.
1009	RuleSetVersion *string `json:"ruleSetVersion,omitempty"`
1010	// RuleGroups - The rule groups of the web application firewall rule set.
1011	RuleGroups *[]ApplicationGatewayFirewallRuleGroup `json:"ruleGroups,omitempty"`
1012}
1013
1014// ApplicationGatewayFrontendIPConfiguration frontend IP configuration of an application gateway.
1015type ApplicationGatewayFrontendIPConfiguration struct {
1016	*ApplicationGatewayFrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"`
1017	// Name - Name of the frontend IP configuration that is unique within an Application Gateway.
1018	Name *string `json:"name,omitempty"`
1019	// Etag - A unique read-only string that changes whenever the resource is updated.
1020	Etag *string `json:"etag,omitempty"`
1021	// Type - Type of the resource.
1022	Type *string `json:"type,omitempty"`
1023	// ID - Resource ID.
1024	ID *string `json:"id,omitempty"`
1025}
1026
1027// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendIPConfiguration.
1028func (agfic ApplicationGatewayFrontendIPConfiguration) MarshalJSON() ([]byte, error) {
1029	objectMap := make(map[string]interface{})
1030	if agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat != nil {
1031		objectMap["properties"] = agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat
1032	}
1033	if agfic.Name != nil {
1034		objectMap["name"] = agfic.Name
1035	}
1036	if agfic.Etag != nil {
1037		objectMap["etag"] = agfic.Etag
1038	}
1039	if agfic.Type != nil {
1040		objectMap["type"] = agfic.Type
1041	}
1042	if agfic.ID != nil {
1043		objectMap["id"] = agfic.ID
1044	}
1045	return json.Marshal(objectMap)
1046}
1047
1048// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFrontendIPConfiguration struct.
1049func (agfic *ApplicationGatewayFrontendIPConfiguration) UnmarshalJSON(body []byte) error {
1050	var m map[string]*json.RawMessage
1051	err := json.Unmarshal(body, &m)
1052	if err != nil {
1053		return err
1054	}
1055	for k, v := range m {
1056		switch k {
1057		case "properties":
1058			if v != nil {
1059				var applicationGatewayFrontendIPConfigurationPropertiesFormat ApplicationGatewayFrontendIPConfigurationPropertiesFormat
1060				err = json.Unmarshal(*v, &applicationGatewayFrontendIPConfigurationPropertiesFormat)
1061				if err != nil {
1062					return err
1063				}
1064				agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat = &applicationGatewayFrontendIPConfigurationPropertiesFormat
1065			}
1066		case "name":
1067			if v != nil {
1068				var name string
1069				err = json.Unmarshal(*v, &name)
1070				if err != nil {
1071					return err
1072				}
1073				agfic.Name = &name
1074			}
1075		case "etag":
1076			if v != nil {
1077				var etag string
1078				err = json.Unmarshal(*v, &etag)
1079				if err != nil {
1080					return err
1081				}
1082				agfic.Etag = &etag
1083			}
1084		case "type":
1085			if v != nil {
1086				var typeVar string
1087				err = json.Unmarshal(*v, &typeVar)
1088				if err != nil {
1089					return err
1090				}
1091				agfic.Type = &typeVar
1092			}
1093		case "id":
1094			if v != nil {
1095				var ID string
1096				err = json.Unmarshal(*v, &ID)
1097				if err != nil {
1098					return err
1099				}
1100				agfic.ID = &ID
1101			}
1102		}
1103	}
1104
1105	return nil
1106}
1107
1108// ApplicationGatewayFrontendIPConfigurationPropertiesFormat properties of Frontend IP configuration of an
1109// application gateway.
1110type ApplicationGatewayFrontendIPConfigurationPropertiesFormat struct {
1111	// PrivateIPAddress - PrivateIPAddress of the network interface IP Configuration.
1112	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
1113	// PrivateIPAllocationMethod - PrivateIP allocation method. Possible values include: 'Static', 'Dynamic'
1114	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
1115	// Subnet - Reference of the subnet resource.
1116	Subnet *SubResource `json:"subnet,omitempty"`
1117	// PublicIPAddress - Reference of the PublicIP resource.
1118	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
1119	// ProvisioningState - Provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1120	ProvisioningState *string `json:"provisioningState,omitempty"`
1121}
1122
1123// ApplicationGatewayFrontendPort frontend port of an application gateway.
1124type ApplicationGatewayFrontendPort struct {
1125	*ApplicationGatewayFrontendPortPropertiesFormat `json:"properties,omitempty"`
1126	// Name - Name of the frontend port that is unique within an Application Gateway
1127	Name *string `json:"name,omitempty"`
1128	// Etag - A unique read-only string that changes whenever the resource is updated.
1129	Etag *string `json:"etag,omitempty"`
1130	// Type - Type of the resource.
1131	Type *string `json:"type,omitempty"`
1132	// ID - Resource ID.
1133	ID *string `json:"id,omitempty"`
1134}
1135
1136// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendPort.
1137func (agfp ApplicationGatewayFrontendPort) MarshalJSON() ([]byte, error) {
1138	objectMap := make(map[string]interface{})
1139	if agfp.ApplicationGatewayFrontendPortPropertiesFormat != nil {
1140		objectMap["properties"] = agfp.ApplicationGatewayFrontendPortPropertiesFormat
1141	}
1142	if agfp.Name != nil {
1143		objectMap["name"] = agfp.Name
1144	}
1145	if agfp.Etag != nil {
1146		objectMap["etag"] = agfp.Etag
1147	}
1148	if agfp.Type != nil {
1149		objectMap["type"] = agfp.Type
1150	}
1151	if agfp.ID != nil {
1152		objectMap["id"] = agfp.ID
1153	}
1154	return json.Marshal(objectMap)
1155}
1156
1157// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFrontendPort struct.
1158func (agfp *ApplicationGatewayFrontendPort) UnmarshalJSON(body []byte) error {
1159	var m map[string]*json.RawMessage
1160	err := json.Unmarshal(body, &m)
1161	if err != nil {
1162		return err
1163	}
1164	for k, v := range m {
1165		switch k {
1166		case "properties":
1167			if v != nil {
1168				var applicationGatewayFrontendPortPropertiesFormat ApplicationGatewayFrontendPortPropertiesFormat
1169				err = json.Unmarshal(*v, &applicationGatewayFrontendPortPropertiesFormat)
1170				if err != nil {
1171					return err
1172				}
1173				agfp.ApplicationGatewayFrontendPortPropertiesFormat = &applicationGatewayFrontendPortPropertiesFormat
1174			}
1175		case "name":
1176			if v != nil {
1177				var name string
1178				err = json.Unmarshal(*v, &name)
1179				if err != nil {
1180					return err
1181				}
1182				agfp.Name = &name
1183			}
1184		case "etag":
1185			if v != nil {
1186				var etag string
1187				err = json.Unmarshal(*v, &etag)
1188				if err != nil {
1189					return err
1190				}
1191				agfp.Etag = &etag
1192			}
1193		case "type":
1194			if v != nil {
1195				var typeVar string
1196				err = json.Unmarshal(*v, &typeVar)
1197				if err != nil {
1198					return err
1199				}
1200				agfp.Type = &typeVar
1201			}
1202		case "id":
1203			if v != nil {
1204				var ID string
1205				err = json.Unmarshal(*v, &ID)
1206				if err != nil {
1207					return err
1208				}
1209				agfp.ID = &ID
1210			}
1211		}
1212	}
1213
1214	return nil
1215}
1216
1217// ApplicationGatewayFrontendPortPropertiesFormat properties of Frontend port of an application gateway.
1218type ApplicationGatewayFrontendPortPropertiesFormat struct {
1219	// Port - Frontend port
1220	Port *int32 `json:"port,omitempty"`
1221	// ProvisioningState - Provisioning state of the frontend port resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1222	ProvisioningState *string `json:"provisioningState,omitempty"`
1223}
1224
1225// ApplicationGatewayHeaderConfiguration header configuration of the Actions set in Application Gateway.
1226type ApplicationGatewayHeaderConfiguration struct {
1227	// HeaderName - Header name of the header configuration
1228	HeaderName *string `json:"headerName,omitempty"`
1229	// HeaderValue - Header value of the header configuration
1230	HeaderValue *string `json:"headerValue,omitempty"`
1231}
1232
1233// ApplicationGatewayHTTPListener http listener of an application gateway.
1234type ApplicationGatewayHTTPListener struct {
1235	*ApplicationGatewayHTTPListenerPropertiesFormat `json:"properties,omitempty"`
1236	// Name - Name of the HTTP listener that is unique within an Application Gateway.
1237	Name *string `json:"name,omitempty"`
1238	// Etag - A unique read-only string that changes whenever the resource is updated.
1239	Etag *string `json:"etag,omitempty"`
1240	// Type - Type of the resource.
1241	Type *string `json:"type,omitempty"`
1242	// ID - Resource ID.
1243	ID *string `json:"id,omitempty"`
1244}
1245
1246// MarshalJSON is the custom marshaler for ApplicationGatewayHTTPListener.
1247func (aghl ApplicationGatewayHTTPListener) MarshalJSON() ([]byte, error) {
1248	objectMap := make(map[string]interface{})
1249	if aghl.ApplicationGatewayHTTPListenerPropertiesFormat != nil {
1250		objectMap["properties"] = aghl.ApplicationGatewayHTTPListenerPropertiesFormat
1251	}
1252	if aghl.Name != nil {
1253		objectMap["name"] = aghl.Name
1254	}
1255	if aghl.Etag != nil {
1256		objectMap["etag"] = aghl.Etag
1257	}
1258	if aghl.Type != nil {
1259		objectMap["type"] = aghl.Type
1260	}
1261	if aghl.ID != nil {
1262		objectMap["id"] = aghl.ID
1263	}
1264	return json.Marshal(objectMap)
1265}
1266
1267// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayHTTPListener struct.
1268func (aghl *ApplicationGatewayHTTPListener) UnmarshalJSON(body []byte) error {
1269	var m map[string]*json.RawMessage
1270	err := json.Unmarshal(body, &m)
1271	if err != nil {
1272		return err
1273	}
1274	for k, v := range m {
1275		switch k {
1276		case "properties":
1277			if v != nil {
1278				var applicationGatewayHTTPListenerPropertiesFormat ApplicationGatewayHTTPListenerPropertiesFormat
1279				err = json.Unmarshal(*v, &applicationGatewayHTTPListenerPropertiesFormat)
1280				if err != nil {
1281					return err
1282				}
1283				aghl.ApplicationGatewayHTTPListenerPropertiesFormat = &applicationGatewayHTTPListenerPropertiesFormat
1284			}
1285		case "name":
1286			if v != nil {
1287				var name string
1288				err = json.Unmarshal(*v, &name)
1289				if err != nil {
1290					return err
1291				}
1292				aghl.Name = &name
1293			}
1294		case "etag":
1295			if v != nil {
1296				var etag string
1297				err = json.Unmarshal(*v, &etag)
1298				if err != nil {
1299					return err
1300				}
1301				aghl.Etag = &etag
1302			}
1303		case "type":
1304			if v != nil {
1305				var typeVar string
1306				err = json.Unmarshal(*v, &typeVar)
1307				if err != nil {
1308					return err
1309				}
1310				aghl.Type = &typeVar
1311			}
1312		case "id":
1313			if v != nil {
1314				var ID string
1315				err = json.Unmarshal(*v, &ID)
1316				if err != nil {
1317					return err
1318				}
1319				aghl.ID = &ID
1320			}
1321		}
1322	}
1323
1324	return nil
1325}
1326
1327// ApplicationGatewayHTTPListenerPropertiesFormat properties of HTTP listener of an application gateway.
1328type ApplicationGatewayHTTPListenerPropertiesFormat struct {
1329	// FrontendIPConfiguration - Frontend IP configuration resource of an application gateway.
1330	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
1331	// FrontendPort - Frontend port resource of an application gateway.
1332	FrontendPort *SubResource `json:"frontendPort,omitempty"`
1333	// Protocol - Protocol of the HTTP listener. Possible values are 'Http' and 'Https'. Possible values include: 'HTTP', 'HTTPS'
1334	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
1335	// HostName - Host name of HTTP listener.
1336	HostName *string `json:"hostName,omitempty"`
1337	// SslCertificate - SSL certificate resource of an application gateway.
1338	SslCertificate *SubResource `json:"sslCertificate,omitempty"`
1339	// RequireServerNameIndication - Applicable only if protocol is https. Enables SNI for multi-hosting.
1340	RequireServerNameIndication *bool `json:"requireServerNameIndication,omitempty"`
1341	// ProvisioningState - Provisioning state of the HTTP listener resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1342	ProvisioningState *string `json:"provisioningState,omitempty"`
1343	// CustomErrorConfigurations - Custom error configurations of the HTTP listener.
1344	CustomErrorConfigurations *[]ApplicationGatewayCustomError `json:"customErrorConfigurations,omitempty"`
1345}
1346
1347// ApplicationGatewayIPConfiguration IP configuration of an application gateway. Currently 1 public and 1
1348// private IP configuration is allowed.
1349type ApplicationGatewayIPConfiguration struct {
1350	*ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"`
1351	// Name - Name of the IP configuration that is unique within an Application Gateway.
1352	Name *string `json:"name,omitempty"`
1353	// Etag - A unique read-only string that changes whenever the resource is updated.
1354	Etag *string `json:"etag,omitempty"`
1355	// Type - Type of the resource.
1356	Type *string `json:"type,omitempty"`
1357	// ID - Resource ID.
1358	ID *string `json:"id,omitempty"`
1359}
1360
1361// MarshalJSON is the custom marshaler for ApplicationGatewayIPConfiguration.
1362func (agic ApplicationGatewayIPConfiguration) MarshalJSON() ([]byte, error) {
1363	objectMap := make(map[string]interface{})
1364	if agic.ApplicationGatewayIPConfigurationPropertiesFormat != nil {
1365		objectMap["properties"] = agic.ApplicationGatewayIPConfigurationPropertiesFormat
1366	}
1367	if agic.Name != nil {
1368		objectMap["name"] = agic.Name
1369	}
1370	if agic.Etag != nil {
1371		objectMap["etag"] = agic.Etag
1372	}
1373	if agic.Type != nil {
1374		objectMap["type"] = agic.Type
1375	}
1376	if agic.ID != nil {
1377		objectMap["id"] = agic.ID
1378	}
1379	return json.Marshal(objectMap)
1380}
1381
1382// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayIPConfiguration struct.
1383func (agic *ApplicationGatewayIPConfiguration) UnmarshalJSON(body []byte) error {
1384	var m map[string]*json.RawMessage
1385	err := json.Unmarshal(body, &m)
1386	if err != nil {
1387		return err
1388	}
1389	for k, v := range m {
1390		switch k {
1391		case "properties":
1392			if v != nil {
1393				var applicationGatewayIPConfigurationPropertiesFormat ApplicationGatewayIPConfigurationPropertiesFormat
1394				err = json.Unmarshal(*v, &applicationGatewayIPConfigurationPropertiesFormat)
1395				if err != nil {
1396					return err
1397				}
1398				agic.ApplicationGatewayIPConfigurationPropertiesFormat = &applicationGatewayIPConfigurationPropertiesFormat
1399			}
1400		case "name":
1401			if v != nil {
1402				var name string
1403				err = json.Unmarshal(*v, &name)
1404				if err != nil {
1405					return err
1406				}
1407				agic.Name = &name
1408			}
1409		case "etag":
1410			if v != nil {
1411				var etag string
1412				err = json.Unmarshal(*v, &etag)
1413				if err != nil {
1414					return err
1415				}
1416				agic.Etag = &etag
1417			}
1418		case "type":
1419			if v != nil {
1420				var typeVar string
1421				err = json.Unmarshal(*v, &typeVar)
1422				if err != nil {
1423					return err
1424				}
1425				agic.Type = &typeVar
1426			}
1427		case "id":
1428			if v != nil {
1429				var ID string
1430				err = json.Unmarshal(*v, &ID)
1431				if err != nil {
1432					return err
1433				}
1434				agic.ID = &ID
1435			}
1436		}
1437	}
1438
1439	return nil
1440}
1441
1442// ApplicationGatewayIPConfigurationPropertiesFormat properties of IP configuration of an application
1443// gateway.
1444type ApplicationGatewayIPConfigurationPropertiesFormat struct {
1445	// Subnet - Reference of the subnet resource. A subnet from where application gateway gets its private address.
1446	Subnet *SubResource `json:"subnet,omitempty"`
1447	// ProvisioningState - Provisioning state of the application gateway subnet resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1448	ProvisioningState *string `json:"provisioningState,omitempty"`
1449}
1450
1451// ApplicationGatewayListResult response for ListApplicationGateways API service call.
1452type ApplicationGatewayListResult struct {
1453	autorest.Response `json:"-"`
1454	// Value - List of an application gateways in a resource group.
1455	Value *[]ApplicationGateway `json:"value,omitempty"`
1456	// NextLink - URL to get the next set of results.
1457	NextLink *string `json:"nextLink,omitempty"`
1458}
1459
1460// ApplicationGatewayListResultIterator provides access to a complete listing of ApplicationGateway values.
1461type ApplicationGatewayListResultIterator struct {
1462	i    int
1463	page ApplicationGatewayListResultPage
1464}
1465
1466// NextWithContext advances to the next value.  If there was an error making
1467// the request the iterator does not advance and the error is returned.
1468func (iter *ApplicationGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
1469	if tracing.IsEnabled() {
1470		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayListResultIterator.NextWithContext")
1471		defer func() {
1472			sc := -1
1473			if iter.Response().Response.Response != nil {
1474				sc = iter.Response().Response.Response.StatusCode
1475			}
1476			tracing.EndSpan(ctx, sc, err)
1477		}()
1478	}
1479	iter.i++
1480	if iter.i < len(iter.page.Values()) {
1481		return nil
1482	}
1483	err = iter.page.NextWithContext(ctx)
1484	if err != nil {
1485		iter.i--
1486		return err
1487	}
1488	iter.i = 0
1489	return nil
1490}
1491
1492// Next advances to the next value.  If there was an error making
1493// the request the iterator does not advance and the error is returned.
1494// Deprecated: Use NextWithContext() instead.
1495func (iter *ApplicationGatewayListResultIterator) Next() error {
1496	return iter.NextWithContext(context.Background())
1497}
1498
1499// NotDone returns true if the enumeration should be started or is not yet complete.
1500func (iter ApplicationGatewayListResultIterator) NotDone() bool {
1501	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1502}
1503
1504// Response returns the raw server response from the last page request.
1505func (iter ApplicationGatewayListResultIterator) Response() ApplicationGatewayListResult {
1506	return iter.page.Response()
1507}
1508
1509// Value returns the current value or a zero-initialized value if the
1510// iterator has advanced beyond the end of the collection.
1511func (iter ApplicationGatewayListResultIterator) Value() ApplicationGateway {
1512	if !iter.page.NotDone() {
1513		return ApplicationGateway{}
1514	}
1515	return iter.page.Values()[iter.i]
1516}
1517
1518// Creates a new instance of the ApplicationGatewayListResultIterator type.
1519func NewApplicationGatewayListResultIterator(page ApplicationGatewayListResultPage) ApplicationGatewayListResultIterator {
1520	return ApplicationGatewayListResultIterator{page: page}
1521}
1522
1523// IsEmpty returns true if the ListResult contains no values.
1524func (aglr ApplicationGatewayListResult) IsEmpty() bool {
1525	return aglr.Value == nil || len(*aglr.Value) == 0
1526}
1527
1528// hasNextLink returns true if the NextLink is not empty.
1529func (aglr ApplicationGatewayListResult) hasNextLink() bool {
1530	return aglr.NextLink != nil && len(*aglr.NextLink) != 0
1531}
1532
1533// applicationGatewayListResultPreparer prepares a request to retrieve the next set of results.
1534// It returns nil if no more results exist.
1535func (aglr ApplicationGatewayListResult) applicationGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
1536	if !aglr.hasNextLink() {
1537		return nil, nil
1538	}
1539	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1540		autorest.AsJSON(),
1541		autorest.AsGet(),
1542		autorest.WithBaseURL(to.String(aglr.NextLink)))
1543}
1544
1545// ApplicationGatewayListResultPage contains a page of ApplicationGateway values.
1546type ApplicationGatewayListResultPage struct {
1547	fn   func(context.Context, ApplicationGatewayListResult) (ApplicationGatewayListResult, error)
1548	aglr ApplicationGatewayListResult
1549}
1550
1551// NextWithContext advances to the next page of values.  If there was an error making
1552// the request the page does not advance and the error is returned.
1553func (page *ApplicationGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
1554	if tracing.IsEnabled() {
1555		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayListResultPage.NextWithContext")
1556		defer func() {
1557			sc := -1
1558			if page.Response().Response.Response != nil {
1559				sc = page.Response().Response.Response.StatusCode
1560			}
1561			tracing.EndSpan(ctx, sc, err)
1562		}()
1563	}
1564	for {
1565		next, err := page.fn(ctx, page.aglr)
1566		if err != nil {
1567			return err
1568		}
1569		page.aglr = next
1570		if !next.hasNextLink() || !next.IsEmpty() {
1571			break
1572		}
1573	}
1574	return nil
1575}
1576
1577// Next advances to the next page of values.  If there was an error making
1578// the request the page does not advance and the error is returned.
1579// Deprecated: Use NextWithContext() instead.
1580func (page *ApplicationGatewayListResultPage) Next() error {
1581	return page.NextWithContext(context.Background())
1582}
1583
1584// NotDone returns true if the page enumeration should be started or is not yet complete.
1585func (page ApplicationGatewayListResultPage) NotDone() bool {
1586	return !page.aglr.IsEmpty()
1587}
1588
1589// Response returns the raw server response from the last page request.
1590func (page ApplicationGatewayListResultPage) Response() ApplicationGatewayListResult {
1591	return page.aglr
1592}
1593
1594// Values returns the slice of values for the current page or nil if there are no values.
1595func (page ApplicationGatewayListResultPage) Values() []ApplicationGateway {
1596	if page.aglr.IsEmpty() {
1597		return nil
1598	}
1599	return *page.aglr.Value
1600}
1601
1602// Creates a new instance of the ApplicationGatewayListResultPage type.
1603func NewApplicationGatewayListResultPage(cur ApplicationGatewayListResult, getNextPage func(context.Context, ApplicationGatewayListResult) (ApplicationGatewayListResult, error)) ApplicationGatewayListResultPage {
1604	return ApplicationGatewayListResultPage{
1605		fn:   getNextPage,
1606		aglr: cur,
1607	}
1608}
1609
1610// ApplicationGatewayPathRule path rule of URL path map of an application gateway.
1611type ApplicationGatewayPathRule struct {
1612	*ApplicationGatewayPathRulePropertiesFormat `json:"properties,omitempty"`
1613	// Name - Name of the path rule that is unique within an Application Gateway.
1614	Name *string `json:"name,omitempty"`
1615	// Etag - A unique read-only string that changes whenever the resource is updated.
1616	Etag *string `json:"etag,omitempty"`
1617	// Type - Type of the resource.
1618	Type *string `json:"type,omitempty"`
1619	// ID - Resource ID.
1620	ID *string `json:"id,omitempty"`
1621}
1622
1623// MarshalJSON is the custom marshaler for ApplicationGatewayPathRule.
1624func (agpr ApplicationGatewayPathRule) MarshalJSON() ([]byte, error) {
1625	objectMap := make(map[string]interface{})
1626	if agpr.ApplicationGatewayPathRulePropertiesFormat != nil {
1627		objectMap["properties"] = agpr.ApplicationGatewayPathRulePropertiesFormat
1628	}
1629	if agpr.Name != nil {
1630		objectMap["name"] = agpr.Name
1631	}
1632	if agpr.Etag != nil {
1633		objectMap["etag"] = agpr.Etag
1634	}
1635	if agpr.Type != nil {
1636		objectMap["type"] = agpr.Type
1637	}
1638	if agpr.ID != nil {
1639		objectMap["id"] = agpr.ID
1640	}
1641	return json.Marshal(objectMap)
1642}
1643
1644// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayPathRule struct.
1645func (agpr *ApplicationGatewayPathRule) UnmarshalJSON(body []byte) error {
1646	var m map[string]*json.RawMessage
1647	err := json.Unmarshal(body, &m)
1648	if err != nil {
1649		return err
1650	}
1651	for k, v := range m {
1652		switch k {
1653		case "properties":
1654			if v != nil {
1655				var applicationGatewayPathRulePropertiesFormat ApplicationGatewayPathRulePropertiesFormat
1656				err = json.Unmarshal(*v, &applicationGatewayPathRulePropertiesFormat)
1657				if err != nil {
1658					return err
1659				}
1660				agpr.ApplicationGatewayPathRulePropertiesFormat = &applicationGatewayPathRulePropertiesFormat
1661			}
1662		case "name":
1663			if v != nil {
1664				var name string
1665				err = json.Unmarshal(*v, &name)
1666				if err != nil {
1667					return err
1668				}
1669				agpr.Name = &name
1670			}
1671		case "etag":
1672			if v != nil {
1673				var etag string
1674				err = json.Unmarshal(*v, &etag)
1675				if err != nil {
1676					return err
1677				}
1678				agpr.Etag = &etag
1679			}
1680		case "type":
1681			if v != nil {
1682				var typeVar string
1683				err = json.Unmarshal(*v, &typeVar)
1684				if err != nil {
1685					return err
1686				}
1687				agpr.Type = &typeVar
1688			}
1689		case "id":
1690			if v != nil {
1691				var ID string
1692				err = json.Unmarshal(*v, &ID)
1693				if err != nil {
1694					return err
1695				}
1696				agpr.ID = &ID
1697			}
1698		}
1699	}
1700
1701	return nil
1702}
1703
1704// ApplicationGatewayPathRulePropertiesFormat properties of path rule of an application gateway.
1705type ApplicationGatewayPathRulePropertiesFormat struct {
1706	// Paths - Path rules of URL path map.
1707	Paths *[]string `json:"paths,omitempty"`
1708	// BackendAddressPool - Backend address pool resource of URL path map path rule.
1709	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
1710	// BackendHTTPSettings - Backend http settings resource of URL path map path rule.
1711	BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"`
1712	// RedirectConfiguration - Redirect configuration resource of URL path map path rule.
1713	RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"`
1714	// RewriteRuleSet - Rewrite rule set resource of URL path map path rule.
1715	RewriteRuleSet *SubResource `json:"rewriteRuleSet,omitempty"`
1716	// ProvisioningState - Path rule of URL path map resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1717	ProvisioningState *string `json:"provisioningState,omitempty"`
1718}
1719
1720// ApplicationGatewayProbe probe of the application gateway.
1721type ApplicationGatewayProbe struct {
1722	*ApplicationGatewayProbePropertiesFormat `json:"properties,omitempty"`
1723	// Name - Name of the probe that is unique within an Application Gateway.
1724	Name *string `json:"name,omitempty"`
1725	// Etag - A unique read-only string that changes whenever the resource is updated.
1726	Etag *string `json:"etag,omitempty"`
1727	// Type - Type of the resource.
1728	Type *string `json:"type,omitempty"`
1729	// ID - Resource ID.
1730	ID *string `json:"id,omitempty"`
1731}
1732
1733// MarshalJSON is the custom marshaler for ApplicationGatewayProbe.
1734func (agp ApplicationGatewayProbe) MarshalJSON() ([]byte, error) {
1735	objectMap := make(map[string]interface{})
1736	if agp.ApplicationGatewayProbePropertiesFormat != nil {
1737		objectMap["properties"] = agp.ApplicationGatewayProbePropertiesFormat
1738	}
1739	if agp.Name != nil {
1740		objectMap["name"] = agp.Name
1741	}
1742	if agp.Etag != nil {
1743		objectMap["etag"] = agp.Etag
1744	}
1745	if agp.Type != nil {
1746		objectMap["type"] = agp.Type
1747	}
1748	if agp.ID != nil {
1749		objectMap["id"] = agp.ID
1750	}
1751	return json.Marshal(objectMap)
1752}
1753
1754// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayProbe struct.
1755func (agp *ApplicationGatewayProbe) UnmarshalJSON(body []byte) error {
1756	var m map[string]*json.RawMessage
1757	err := json.Unmarshal(body, &m)
1758	if err != nil {
1759		return err
1760	}
1761	for k, v := range m {
1762		switch k {
1763		case "properties":
1764			if v != nil {
1765				var applicationGatewayProbePropertiesFormat ApplicationGatewayProbePropertiesFormat
1766				err = json.Unmarshal(*v, &applicationGatewayProbePropertiesFormat)
1767				if err != nil {
1768					return err
1769				}
1770				agp.ApplicationGatewayProbePropertiesFormat = &applicationGatewayProbePropertiesFormat
1771			}
1772		case "name":
1773			if v != nil {
1774				var name string
1775				err = json.Unmarshal(*v, &name)
1776				if err != nil {
1777					return err
1778				}
1779				agp.Name = &name
1780			}
1781		case "etag":
1782			if v != nil {
1783				var etag string
1784				err = json.Unmarshal(*v, &etag)
1785				if err != nil {
1786					return err
1787				}
1788				agp.Etag = &etag
1789			}
1790		case "type":
1791			if v != nil {
1792				var typeVar string
1793				err = json.Unmarshal(*v, &typeVar)
1794				if err != nil {
1795					return err
1796				}
1797				agp.Type = &typeVar
1798			}
1799		case "id":
1800			if v != nil {
1801				var ID string
1802				err = json.Unmarshal(*v, &ID)
1803				if err != nil {
1804					return err
1805				}
1806				agp.ID = &ID
1807			}
1808		}
1809	}
1810
1811	return nil
1812}
1813
1814// ApplicationGatewayProbeHealthResponseMatch application gateway probe health response match
1815type ApplicationGatewayProbeHealthResponseMatch struct {
1816	// Body - Body that must be contained in the health response. Default value is empty.
1817	Body *string `json:"body,omitempty"`
1818	// StatusCodes - Allowed ranges of healthy status codes. Default range of healthy status codes is 200-399.
1819	StatusCodes *[]string `json:"statusCodes,omitempty"`
1820}
1821
1822// ApplicationGatewayProbePropertiesFormat properties of probe of an application gateway.
1823type ApplicationGatewayProbePropertiesFormat struct {
1824	// Protocol - The protocol used for the probe. Possible values are 'Http' and 'Https'. Possible values include: 'HTTP', 'HTTPS'
1825	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
1826	// Host - Host name to send the probe to.
1827	Host *string `json:"host,omitempty"`
1828	// Path - Relative path of probe. Valid path starts from '/'. Probe is sent to <Protocol>://<host>:<port><path>
1829	Path *string `json:"path,omitempty"`
1830	// Interval - The probing interval in seconds. This is the time interval between two consecutive probes. Acceptable values are from 1 second to 86400 seconds.
1831	Interval *int32 `json:"interval,omitempty"`
1832	// 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.
1833	Timeout *int32 `json:"timeout,omitempty"`
1834	// 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.
1835	UnhealthyThreshold *int32 `json:"unhealthyThreshold,omitempty"`
1836	// PickHostNameFromBackendHTTPSettings - Whether the host header should be picked from the backend http settings. Default value is false.
1837	PickHostNameFromBackendHTTPSettings *bool `json:"pickHostNameFromBackendHttpSettings,omitempty"`
1838	// MinServers - Minimum number of servers that are always marked healthy. Default value is 0.
1839	MinServers *int32 `json:"minServers,omitempty"`
1840	// Match - Criterion for classifying a healthy probe response.
1841	Match *ApplicationGatewayProbeHealthResponseMatch `json:"match,omitempty"`
1842	// ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1843	ProvisioningState *string `json:"provisioningState,omitempty"`
1844}
1845
1846// ApplicationGatewayPropertiesFormat properties of the application gateway.
1847type ApplicationGatewayPropertiesFormat struct {
1848	// Sku - SKU of the application gateway resource.
1849	Sku *ApplicationGatewaySku `json:"sku,omitempty"`
1850	// SslPolicy - SSL policy of the application gateway resource.
1851	SslPolicy *ApplicationGatewaySslPolicy `json:"sslPolicy,omitempty"`
1852	// OperationalState - READ-ONLY; Operational state of the application gateway resource. Possible values include: 'Stopped', 'Starting', 'Running', 'Stopping'
1853	OperationalState ApplicationGatewayOperationalState `json:"operationalState,omitempty"`
1854	// GatewayIPConfigurations - Subnets of application the gateway resource.
1855	GatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"gatewayIPConfigurations,omitempty"`
1856	// AuthenticationCertificates - Authentication certificates of the application gateway resource.
1857	AuthenticationCertificates *[]ApplicationGatewayAuthenticationCertificate `json:"authenticationCertificates,omitempty"`
1858	// TrustedRootCertificates - Trusted Root certificates of the application gateway resource.
1859	TrustedRootCertificates *[]ApplicationGatewayTrustedRootCertificate `json:"trustedRootCertificates,omitempty"`
1860	// SslCertificates - SSL certificates of the application gateway resource.
1861	SslCertificates *[]ApplicationGatewaySslCertificate `json:"sslCertificates,omitempty"`
1862	// FrontendIPConfigurations - Frontend IP addresses of the application gateway resource.
1863	FrontendIPConfigurations *[]ApplicationGatewayFrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"`
1864	// FrontendPorts - Frontend ports of the application gateway resource.
1865	FrontendPorts *[]ApplicationGatewayFrontendPort `json:"frontendPorts,omitempty"`
1866	// Probes - Probes of the application gateway resource.
1867	Probes *[]ApplicationGatewayProbe `json:"probes,omitempty"`
1868	// BackendAddressPools - Backend address pool of the application gateway resource.
1869	BackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"backendAddressPools,omitempty"`
1870	// BackendHTTPSettingsCollection - Backend http settings of the application gateway resource.
1871	BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettingsCollection,omitempty"`
1872	// HTTPListeners - Http listeners of the application gateway resource.
1873	HTTPListeners *[]ApplicationGatewayHTTPListener `json:"httpListeners,omitempty"`
1874	// URLPathMaps - URL path map of the application gateway resource.
1875	URLPathMaps *[]ApplicationGatewayURLPathMap `json:"urlPathMaps,omitempty"`
1876	// RequestRoutingRules - Request routing rules of the application gateway resource.
1877	RequestRoutingRules *[]ApplicationGatewayRequestRoutingRule `json:"requestRoutingRules,omitempty"`
1878	// RewriteRuleSets - Rewrite rules for the application gateway resource.
1879	RewriteRuleSets *[]ApplicationGatewayRewriteRuleSet `json:"rewriteRuleSets,omitempty"`
1880	// RedirectConfigurations - Redirect configurations of the application gateway resource.
1881	RedirectConfigurations *[]ApplicationGatewayRedirectConfiguration `json:"redirectConfigurations,omitempty"`
1882	// WebApplicationFirewallConfiguration - Web application firewall configuration.
1883	WebApplicationFirewallConfiguration *ApplicationGatewayWebApplicationFirewallConfiguration `json:"webApplicationFirewallConfiguration,omitempty"`
1884	// EnableHTTP2 - Whether HTTP2 is enabled on the application gateway resource.
1885	EnableHTTP2 *bool `json:"enableHttp2,omitempty"`
1886	// EnableFips - Whether FIPS is enabled on the application gateway resource.
1887	EnableFips *bool `json:"enableFips,omitempty"`
1888	// AutoscaleConfiguration - Autoscale Configuration.
1889	AutoscaleConfiguration *ApplicationGatewayAutoscaleConfiguration `json:"autoscaleConfiguration,omitempty"`
1890	// ResourceGUID - Resource GUID property of the application gateway resource.
1891	ResourceGUID *string `json:"resourceGuid,omitempty"`
1892	// ProvisioningState - Provisioning state of the application gateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1893	ProvisioningState *string `json:"provisioningState,omitempty"`
1894	// CustomErrorConfigurations - Custom error configurations of the application gateway resource.
1895	CustomErrorConfigurations *[]ApplicationGatewayCustomError `json:"customErrorConfigurations,omitempty"`
1896}
1897
1898// MarshalJSON is the custom marshaler for ApplicationGatewayPropertiesFormat.
1899func (agpf ApplicationGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
1900	objectMap := make(map[string]interface{})
1901	if agpf.Sku != nil {
1902		objectMap["sku"] = agpf.Sku
1903	}
1904	if agpf.SslPolicy != nil {
1905		objectMap["sslPolicy"] = agpf.SslPolicy
1906	}
1907	if agpf.GatewayIPConfigurations != nil {
1908		objectMap["gatewayIPConfigurations"] = agpf.GatewayIPConfigurations
1909	}
1910	if agpf.AuthenticationCertificates != nil {
1911		objectMap["authenticationCertificates"] = agpf.AuthenticationCertificates
1912	}
1913	if agpf.TrustedRootCertificates != nil {
1914		objectMap["trustedRootCertificates"] = agpf.TrustedRootCertificates
1915	}
1916	if agpf.SslCertificates != nil {
1917		objectMap["sslCertificates"] = agpf.SslCertificates
1918	}
1919	if agpf.FrontendIPConfigurations != nil {
1920		objectMap["frontendIPConfigurations"] = agpf.FrontendIPConfigurations
1921	}
1922	if agpf.FrontendPorts != nil {
1923		objectMap["frontendPorts"] = agpf.FrontendPorts
1924	}
1925	if agpf.Probes != nil {
1926		objectMap["probes"] = agpf.Probes
1927	}
1928	if agpf.BackendAddressPools != nil {
1929		objectMap["backendAddressPools"] = agpf.BackendAddressPools
1930	}
1931	if agpf.BackendHTTPSettingsCollection != nil {
1932		objectMap["backendHttpSettingsCollection"] = agpf.BackendHTTPSettingsCollection
1933	}
1934	if agpf.HTTPListeners != nil {
1935		objectMap["httpListeners"] = agpf.HTTPListeners
1936	}
1937	if agpf.URLPathMaps != nil {
1938		objectMap["urlPathMaps"] = agpf.URLPathMaps
1939	}
1940	if agpf.RequestRoutingRules != nil {
1941		objectMap["requestRoutingRules"] = agpf.RequestRoutingRules
1942	}
1943	if agpf.RewriteRuleSets != nil {
1944		objectMap["rewriteRuleSets"] = agpf.RewriteRuleSets
1945	}
1946	if agpf.RedirectConfigurations != nil {
1947		objectMap["redirectConfigurations"] = agpf.RedirectConfigurations
1948	}
1949	if agpf.WebApplicationFirewallConfiguration != nil {
1950		objectMap["webApplicationFirewallConfiguration"] = agpf.WebApplicationFirewallConfiguration
1951	}
1952	if agpf.EnableHTTP2 != nil {
1953		objectMap["enableHttp2"] = agpf.EnableHTTP2
1954	}
1955	if agpf.EnableFips != nil {
1956		objectMap["enableFips"] = agpf.EnableFips
1957	}
1958	if agpf.AutoscaleConfiguration != nil {
1959		objectMap["autoscaleConfiguration"] = agpf.AutoscaleConfiguration
1960	}
1961	if agpf.ResourceGUID != nil {
1962		objectMap["resourceGuid"] = agpf.ResourceGUID
1963	}
1964	if agpf.ProvisioningState != nil {
1965		objectMap["provisioningState"] = agpf.ProvisioningState
1966	}
1967	if agpf.CustomErrorConfigurations != nil {
1968		objectMap["customErrorConfigurations"] = agpf.CustomErrorConfigurations
1969	}
1970	return json.Marshal(objectMap)
1971}
1972
1973// ApplicationGatewayRedirectConfiguration redirect configuration of an application gateway.
1974type ApplicationGatewayRedirectConfiguration struct {
1975	*ApplicationGatewayRedirectConfigurationPropertiesFormat `json:"properties,omitempty"`
1976	// Name - Name of the redirect configuration that is unique within an Application Gateway.
1977	Name *string `json:"name,omitempty"`
1978	// Etag - A unique read-only string that changes whenever the resource is updated.
1979	Etag *string `json:"etag,omitempty"`
1980	// Type - Type of the resource.
1981	Type *string `json:"type,omitempty"`
1982	// ID - Resource ID.
1983	ID *string `json:"id,omitempty"`
1984}
1985
1986// MarshalJSON is the custom marshaler for ApplicationGatewayRedirectConfiguration.
1987func (agrc ApplicationGatewayRedirectConfiguration) MarshalJSON() ([]byte, error) {
1988	objectMap := make(map[string]interface{})
1989	if agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat != nil {
1990		objectMap["properties"] = agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat
1991	}
1992	if agrc.Name != nil {
1993		objectMap["name"] = agrc.Name
1994	}
1995	if agrc.Etag != nil {
1996		objectMap["etag"] = agrc.Etag
1997	}
1998	if agrc.Type != nil {
1999		objectMap["type"] = agrc.Type
2000	}
2001	if agrc.ID != nil {
2002		objectMap["id"] = agrc.ID
2003	}
2004	return json.Marshal(objectMap)
2005}
2006
2007// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRedirectConfiguration struct.
2008func (agrc *ApplicationGatewayRedirectConfiguration) UnmarshalJSON(body []byte) error {
2009	var m map[string]*json.RawMessage
2010	err := json.Unmarshal(body, &m)
2011	if err != nil {
2012		return err
2013	}
2014	for k, v := range m {
2015		switch k {
2016		case "properties":
2017			if v != nil {
2018				var applicationGatewayRedirectConfigurationPropertiesFormat ApplicationGatewayRedirectConfigurationPropertiesFormat
2019				err = json.Unmarshal(*v, &applicationGatewayRedirectConfigurationPropertiesFormat)
2020				if err != nil {
2021					return err
2022				}
2023				agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat = &applicationGatewayRedirectConfigurationPropertiesFormat
2024			}
2025		case "name":
2026			if v != nil {
2027				var name string
2028				err = json.Unmarshal(*v, &name)
2029				if err != nil {
2030					return err
2031				}
2032				agrc.Name = &name
2033			}
2034		case "etag":
2035			if v != nil {
2036				var etag string
2037				err = json.Unmarshal(*v, &etag)
2038				if err != nil {
2039					return err
2040				}
2041				agrc.Etag = &etag
2042			}
2043		case "type":
2044			if v != nil {
2045				var typeVar string
2046				err = json.Unmarshal(*v, &typeVar)
2047				if err != nil {
2048					return err
2049				}
2050				agrc.Type = &typeVar
2051			}
2052		case "id":
2053			if v != nil {
2054				var ID string
2055				err = json.Unmarshal(*v, &ID)
2056				if err != nil {
2057					return err
2058				}
2059				agrc.ID = &ID
2060			}
2061		}
2062	}
2063
2064	return nil
2065}
2066
2067// ApplicationGatewayRedirectConfigurationPropertiesFormat properties of redirect configuration of the
2068// application gateway.
2069type ApplicationGatewayRedirectConfigurationPropertiesFormat struct {
2070	// RedirectType - Supported http redirection types - Permanent, Temporary, Found, SeeOther. Possible values include: 'Permanent', 'Found', 'SeeOther', 'Temporary'
2071	RedirectType ApplicationGatewayRedirectType `json:"redirectType,omitempty"`
2072	// TargetListener - Reference to a listener to redirect the request to.
2073	TargetListener *SubResource `json:"targetListener,omitempty"`
2074	// TargetURL - Url to redirect the request to.
2075	TargetURL *string `json:"targetUrl,omitempty"`
2076	// IncludePath - Include path in the redirected url.
2077	IncludePath *bool `json:"includePath,omitempty"`
2078	// IncludeQueryString - Include query string in the redirected url.
2079	IncludeQueryString *bool `json:"includeQueryString,omitempty"`
2080	// RequestRoutingRules - Request routing specifying redirect configuration.
2081	RequestRoutingRules *[]SubResource `json:"requestRoutingRules,omitempty"`
2082	// URLPathMaps - Url path maps specifying default redirect configuration.
2083	URLPathMaps *[]SubResource `json:"urlPathMaps,omitempty"`
2084	// PathRules - Path rules specifying redirect configuration.
2085	PathRules *[]SubResource `json:"pathRules,omitempty"`
2086}
2087
2088// ApplicationGatewayRequestRoutingRule request routing rule of an application gateway.
2089type ApplicationGatewayRequestRoutingRule struct {
2090	*ApplicationGatewayRequestRoutingRulePropertiesFormat `json:"properties,omitempty"`
2091	// Name - Name of the request routing rule that is unique within an Application Gateway.
2092	Name *string `json:"name,omitempty"`
2093	// Etag - A unique read-only string that changes whenever the resource is updated.
2094	Etag *string `json:"etag,omitempty"`
2095	// Type - Type of the resource.
2096	Type *string `json:"type,omitempty"`
2097	// ID - Resource ID.
2098	ID *string `json:"id,omitempty"`
2099}
2100
2101// MarshalJSON is the custom marshaler for ApplicationGatewayRequestRoutingRule.
2102func (agrrr ApplicationGatewayRequestRoutingRule) MarshalJSON() ([]byte, error) {
2103	objectMap := make(map[string]interface{})
2104	if agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat != nil {
2105		objectMap["properties"] = agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat
2106	}
2107	if agrrr.Name != nil {
2108		objectMap["name"] = agrrr.Name
2109	}
2110	if agrrr.Etag != nil {
2111		objectMap["etag"] = agrrr.Etag
2112	}
2113	if agrrr.Type != nil {
2114		objectMap["type"] = agrrr.Type
2115	}
2116	if agrrr.ID != nil {
2117		objectMap["id"] = agrrr.ID
2118	}
2119	return json.Marshal(objectMap)
2120}
2121
2122// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRequestRoutingRule struct.
2123func (agrrr *ApplicationGatewayRequestRoutingRule) UnmarshalJSON(body []byte) error {
2124	var m map[string]*json.RawMessage
2125	err := json.Unmarshal(body, &m)
2126	if err != nil {
2127		return err
2128	}
2129	for k, v := range m {
2130		switch k {
2131		case "properties":
2132			if v != nil {
2133				var applicationGatewayRequestRoutingRulePropertiesFormat ApplicationGatewayRequestRoutingRulePropertiesFormat
2134				err = json.Unmarshal(*v, &applicationGatewayRequestRoutingRulePropertiesFormat)
2135				if err != nil {
2136					return err
2137				}
2138				agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat = &applicationGatewayRequestRoutingRulePropertiesFormat
2139			}
2140		case "name":
2141			if v != nil {
2142				var name string
2143				err = json.Unmarshal(*v, &name)
2144				if err != nil {
2145					return err
2146				}
2147				agrrr.Name = &name
2148			}
2149		case "etag":
2150			if v != nil {
2151				var etag string
2152				err = json.Unmarshal(*v, &etag)
2153				if err != nil {
2154					return err
2155				}
2156				agrrr.Etag = &etag
2157			}
2158		case "type":
2159			if v != nil {
2160				var typeVar string
2161				err = json.Unmarshal(*v, &typeVar)
2162				if err != nil {
2163					return err
2164				}
2165				agrrr.Type = &typeVar
2166			}
2167		case "id":
2168			if v != nil {
2169				var ID string
2170				err = json.Unmarshal(*v, &ID)
2171				if err != nil {
2172					return err
2173				}
2174				agrrr.ID = &ID
2175			}
2176		}
2177	}
2178
2179	return nil
2180}
2181
2182// ApplicationGatewayRequestRoutingRulePropertiesFormat properties of request routing rule of the
2183// application gateway.
2184type ApplicationGatewayRequestRoutingRulePropertiesFormat struct {
2185	// RuleType - Rule type. Possible values include: 'Basic', 'PathBasedRouting'
2186	RuleType ApplicationGatewayRequestRoutingRuleType `json:"ruleType,omitempty"`
2187	// BackendAddressPool - Backend address pool resource of the application gateway.
2188	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
2189	// BackendHTTPSettings - Backend http settings resource of the application gateway.
2190	BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"`
2191	// HTTPListener - Http listener resource of the application gateway.
2192	HTTPListener *SubResource `json:"httpListener,omitempty"`
2193	// URLPathMap - URL path map resource of the application gateway.
2194	URLPathMap *SubResource `json:"urlPathMap,omitempty"`
2195	// RewriteRuleSet - Rewrite Rule Set resource in Basic rule of the application gateway.
2196	RewriteRuleSet *SubResource `json:"rewriteRuleSet,omitempty"`
2197	// RedirectConfiguration - Redirect configuration resource of the application gateway.
2198	RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"`
2199	// ProvisioningState - Provisioning state of the request routing rule resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2200	ProvisioningState *string `json:"provisioningState,omitempty"`
2201}
2202
2203// ApplicationGatewayRewriteRule rewrite rule of an application gateway.
2204type ApplicationGatewayRewriteRule struct {
2205	// Name - Name of the rewrite rule that is unique within an Application Gateway.
2206	Name *string `json:"name,omitempty"`
2207	// ActionSet - Set of actions to be done as part of the rewrite Rule.
2208	ActionSet *ApplicationGatewayRewriteRuleActionSet `json:"actionSet,omitempty"`
2209}
2210
2211// ApplicationGatewayRewriteRuleActionSet set of actions in the Rewrite Rule in Application Gateway.
2212type ApplicationGatewayRewriteRuleActionSet struct {
2213	// RequestHeaderConfigurations - Request Header Actions in the Action Set
2214	RequestHeaderConfigurations *[]ApplicationGatewayHeaderConfiguration `json:"requestHeaderConfigurations,omitempty"`
2215	// ResponseHeaderConfigurations - Response Header Actions in the Action Set
2216	ResponseHeaderConfigurations *[]ApplicationGatewayHeaderConfiguration `json:"responseHeaderConfigurations,omitempty"`
2217}
2218
2219// ApplicationGatewayRewriteRuleSet rewrite rule set of an application gateway.
2220type ApplicationGatewayRewriteRuleSet struct {
2221	*ApplicationGatewayRewriteRuleSetPropertiesFormat `json:"properties,omitempty"`
2222	// Name - Name of the rewrite rule set that is unique within an Application Gateway.
2223	Name *string `json:"name,omitempty"`
2224	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
2225	Etag *string `json:"etag,omitempty"`
2226	// ID - Resource ID.
2227	ID *string `json:"id,omitempty"`
2228}
2229
2230// MarshalJSON is the custom marshaler for ApplicationGatewayRewriteRuleSet.
2231func (agrrs ApplicationGatewayRewriteRuleSet) MarshalJSON() ([]byte, error) {
2232	objectMap := make(map[string]interface{})
2233	if agrrs.ApplicationGatewayRewriteRuleSetPropertiesFormat != nil {
2234		objectMap["properties"] = agrrs.ApplicationGatewayRewriteRuleSetPropertiesFormat
2235	}
2236	if agrrs.Name != nil {
2237		objectMap["name"] = agrrs.Name
2238	}
2239	if agrrs.ID != nil {
2240		objectMap["id"] = agrrs.ID
2241	}
2242	return json.Marshal(objectMap)
2243}
2244
2245// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRewriteRuleSet struct.
2246func (agrrs *ApplicationGatewayRewriteRuleSet) UnmarshalJSON(body []byte) error {
2247	var m map[string]*json.RawMessage
2248	err := json.Unmarshal(body, &m)
2249	if err != nil {
2250		return err
2251	}
2252	for k, v := range m {
2253		switch k {
2254		case "properties":
2255			if v != nil {
2256				var applicationGatewayRewriteRuleSetPropertiesFormat ApplicationGatewayRewriteRuleSetPropertiesFormat
2257				err = json.Unmarshal(*v, &applicationGatewayRewriteRuleSetPropertiesFormat)
2258				if err != nil {
2259					return err
2260				}
2261				agrrs.ApplicationGatewayRewriteRuleSetPropertiesFormat = &applicationGatewayRewriteRuleSetPropertiesFormat
2262			}
2263		case "name":
2264			if v != nil {
2265				var name string
2266				err = json.Unmarshal(*v, &name)
2267				if err != nil {
2268					return err
2269				}
2270				agrrs.Name = &name
2271			}
2272		case "etag":
2273			if v != nil {
2274				var etag string
2275				err = json.Unmarshal(*v, &etag)
2276				if err != nil {
2277					return err
2278				}
2279				agrrs.Etag = &etag
2280			}
2281		case "id":
2282			if v != nil {
2283				var ID string
2284				err = json.Unmarshal(*v, &ID)
2285				if err != nil {
2286					return err
2287				}
2288				agrrs.ID = &ID
2289			}
2290		}
2291	}
2292
2293	return nil
2294}
2295
2296// ApplicationGatewayRewriteRuleSetPropertiesFormat properties of rewrite rule set of the application
2297// gateway.
2298type ApplicationGatewayRewriteRuleSetPropertiesFormat struct {
2299	// RewriteRules - Rewrite rules in the rewrite rule set.
2300	RewriteRules *[]ApplicationGatewayRewriteRule `json:"rewriteRules,omitempty"`
2301	// ProvisioningState - READ-ONLY; Provisioning state of the rewrite rule set resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2302	ProvisioningState *string `json:"provisioningState,omitempty"`
2303}
2304
2305// MarshalJSON is the custom marshaler for ApplicationGatewayRewriteRuleSetPropertiesFormat.
2306func (agrrspf ApplicationGatewayRewriteRuleSetPropertiesFormat) MarshalJSON() ([]byte, error) {
2307	objectMap := make(map[string]interface{})
2308	if agrrspf.RewriteRules != nil {
2309		objectMap["rewriteRules"] = agrrspf.RewriteRules
2310	}
2311	return json.Marshal(objectMap)
2312}
2313
2314// ApplicationGatewaysBackendHealthFuture an abstraction for monitoring and retrieving the results of a
2315// long-running operation.
2316type ApplicationGatewaysBackendHealthFuture struct {
2317	azure.FutureAPI
2318	// Result returns the result of the asynchronous operation.
2319	// If the operation has not completed it will return an error.
2320	Result func(ApplicationGatewaysClient) (ApplicationGatewayBackendHealth, error)
2321}
2322
2323// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2324func (future *ApplicationGatewaysBackendHealthFuture) UnmarshalJSON(body []byte) error {
2325	var azFuture azure.Future
2326	if err := json.Unmarshal(body, &azFuture); err != nil {
2327		return err
2328	}
2329	future.FutureAPI = &azFuture
2330	future.Result = future.result
2331	return nil
2332}
2333
2334// result is the default implementation for ApplicationGatewaysBackendHealthFuture.Result.
2335func (future *ApplicationGatewaysBackendHealthFuture) result(client ApplicationGatewaysClient) (agbh ApplicationGatewayBackendHealth, err error) {
2336	var done bool
2337	done, err = future.DoneWithContext(context.Background(), client)
2338	if err != nil {
2339		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", future.Response(), "Polling failure")
2340		return
2341	}
2342	if !done {
2343		agbh.Response.Response = future.Response()
2344		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysBackendHealthFuture")
2345		return
2346	}
2347	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2348	if agbh.Response.Response, err = future.GetResult(sender); err == nil && agbh.Response.Response.StatusCode != http.StatusNoContent {
2349		agbh, err = client.BackendHealthResponder(agbh.Response.Response)
2350		if err != nil {
2351			err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", agbh.Response.Response, "Failure responding to request")
2352		}
2353	}
2354	return
2355}
2356
2357// ApplicationGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
2358// long-running operation.
2359type ApplicationGatewaysCreateOrUpdateFuture struct {
2360	azure.FutureAPI
2361	// Result returns the result of the asynchronous operation.
2362	// If the operation has not completed it will return an error.
2363	Result func(ApplicationGatewaysClient) (ApplicationGateway, error)
2364}
2365
2366// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2367func (future *ApplicationGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
2368	var azFuture azure.Future
2369	if err := json.Unmarshal(body, &azFuture); err != nil {
2370		return err
2371	}
2372	future.FutureAPI = &azFuture
2373	future.Result = future.result
2374	return nil
2375}
2376
2377// result is the default implementation for ApplicationGatewaysCreateOrUpdateFuture.Result.
2378func (future *ApplicationGatewaysCreateOrUpdateFuture) result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
2379	var done bool
2380	done, err = future.DoneWithContext(context.Background(), client)
2381	if err != nil {
2382		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
2383		return
2384	}
2385	if !done {
2386		ag.Response.Response = future.Response()
2387		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysCreateOrUpdateFuture")
2388		return
2389	}
2390	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2391	if ag.Response.Response, err = future.GetResult(sender); err == nil && ag.Response.Response.StatusCode != http.StatusNoContent {
2392		ag, err = client.CreateOrUpdateResponder(ag.Response.Response)
2393		if err != nil {
2394			err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", ag.Response.Response, "Failure responding to request")
2395		}
2396	}
2397	return
2398}
2399
2400// ApplicationGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
2401// long-running operation.
2402type ApplicationGatewaysDeleteFuture struct {
2403	azure.FutureAPI
2404	// Result returns the result of the asynchronous operation.
2405	// If the operation has not completed it will return an error.
2406	Result func(ApplicationGatewaysClient) (autorest.Response, error)
2407}
2408
2409// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2410func (future *ApplicationGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
2411	var azFuture azure.Future
2412	if err := json.Unmarshal(body, &azFuture); err != nil {
2413		return err
2414	}
2415	future.FutureAPI = &azFuture
2416	future.Result = future.result
2417	return nil
2418}
2419
2420// result is the default implementation for ApplicationGatewaysDeleteFuture.Result.
2421func (future *ApplicationGatewaysDeleteFuture) result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
2422	var done bool
2423	done, err = future.DoneWithContext(context.Background(), client)
2424	if err != nil {
2425		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
2426		return
2427	}
2428	if !done {
2429		ar.Response = future.Response()
2430		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysDeleteFuture")
2431		return
2432	}
2433	ar.Response = future.Response()
2434	return
2435}
2436
2437// ApplicationGatewaySku SKU of an application gateway
2438type ApplicationGatewaySku struct {
2439	// Name - Name of an application gateway SKU. Possible values include: 'StandardSmall', 'StandardMedium', 'StandardLarge', 'WAFMedium', 'WAFLarge', 'StandardV2', 'WAFV2'
2440	Name ApplicationGatewaySkuName `json:"name,omitempty"`
2441	// Tier - Tier of an application gateway. Possible values include: 'ApplicationGatewayTierStandard', 'ApplicationGatewayTierWAF', 'ApplicationGatewayTierStandardV2', 'ApplicationGatewayTierWAFV2'
2442	Tier ApplicationGatewayTier `json:"tier,omitempty"`
2443	// Capacity - Capacity (instance count) of an application gateway.
2444	Capacity *int32 `json:"capacity,omitempty"`
2445}
2446
2447// ApplicationGatewaySslCertificate SSL certificates of an application gateway.
2448type ApplicationGatewaySslCertificate struct {
2449	*ApplicationGatewaySslCertificatePropertiesFormat `json:"properties,omitempty"`
2450	// Name - Name of the SSL certificate that is unique within an Application Gateway.
2451	Name *string `json:"name,omitempty"`
2452	// Etag - A unique read-only string that changes whenever the resource is updated.
2453	Etag *string `json:"etag,omitempty"`
2454	// Type - Type of the resource.
2455	Type *string `json:"type,omitempty"`
2456	// ID - Resource ID.
2457	ID *string `json:"id,omitempty"`
2458}
2459
2460// MarshalJSON is the custom marshaler for ApplicationGatewaySslCertificate.
2461func (agsc ApplicationGatewaySslCertificate) MarshalJSON() ([]byte, error) {
2462	objectMap := make(map[string]interface{})
2463	if agsc.ApplicationGatewaySslCertificatePropertiesFormat != nil {
2464		objectMap["properties"] = agsc.ApplicationGatewaySslCertificatePropertiesFormat
2465	}
2466	if agsc.Name != nil {
2467		objectMap["name"] = agsc.Name
2468	}
2469	if agsc.Etag != nil {
2470		objectMap["etag"] = agsc.Etag
2471	}
2472	if agsc.Type != nil {
2473		objectMap["type"] = agsc.Type
2474	}
2475	if agsc.ID != nil {
2476		objectMap["id"] = agsc.ID
2477	}
2478	return json.Marshal(objectMap)
2479}
2480
2481// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslCertificate struct.
2482func (agsc *ApplicationGatewaySslCertificate) UnmarshalJSON(body []byte) error {
2483	var m map[string]*json.RawMessage
2484	err := json.Unmarshal(body, &m)
2485	if err != nil {
2486		return err
2487	}
2488	for k, v := range m {
2489		switch k {
2490		case "properties":
2491			if v != nil {
2492				var applicationGatewaySslCertificatePropertiesFormat ApplicationGatewaySslCertificatePropertiesFormat
2493				err = json.Unmarshal(*v, &applicationGatewaySslCertificatePropertiesFormat)
2494				if err != nil {
2495					return err
2496				}
2497				agsc.ApplicationGatewaySslCertificatePropertiesFormat = &applicationGatewaySslCertificatePropertiesFormat
2498			}
2499		case "name":
2500			if v != nil {
2501				var name string
2502				err = json.Unmarshal(*v, &name)
2503				if err != nil {
2504					return err
2505				}
2506				agsc.Name = &name
2507			}
2508		case "etag":
2509			if v != nil {
2510				var etag string
2511				err = json.Unmarshal(*v, &etag)
2512				if err != nil {
2513					return err
2514				}
2515				agsc.Etag = &etag
2516			}
2517		case "type":
2518			if v != nil {
2519				var typeVar string
2520				err = json.Unmarshal(*v, &typeVar)
2521				if err != nil {
2522					return err
2523				}
2524				agsc.Type = &typeVar
2525			}
2526		case "id":
2527			if v != nil {
2528				var ID string
2529				err = json.Unmarshal(*v, &ID)
2530				if err != nil {
2531					return err
2532				}
2533				agsc.ID = &ID
2534			}
2535		}
2536	}
2537
2538	return nil
2539}
2540
2541// ApplicationGatewaySslCertificatePropertiesFormat properties of SSL certificates of an application
2542// gateway.
2543type ApplicationGatewaySslCertificatePropertiesFormat struct {
2544	// Data - Base-64 encoded pfx certificate. Only applicable in PUT Request.
2545	Data *string `json:"data,omitempty"`
2546	// Password - Password for the pfx file specified in data. Only applicable in PUT request.
2547	Password *string `json:"password,omitempty"`
2548	// PublicCertData - Base-64 encoded Public cert data corresponding to pfx specified in data. Only applicable in GET request.
2549	PublicCertData *string `json:"publicCertData,omitempty"`
2550	// KeyVaultSecretID - Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault.
2551	KeyVaultSecretID *string `json:"keyVaultSecretId,omitempty"`
2552	// ProvisioningState - Provisioning state of the SSL certificate resource Possible values are: 'Updating', 'Deleting', and 'Failed'.
2553	ProvisioningState *string `json:"provisioningState,omitempty"`
2554}
2555
2556// ApplicationGatewaySslPolicy application Gateway Ssl policy.
2557type ApplicationGatewaySslPolicy struct {
2558	// DisabledSslProtocols - Ssl protocols to be disabled on application gateway.
2559	DisabledSslProtocols *[]ApplicationGatewaySslProtocol `json:"disabledSslProtocols,omitempty"`
2560	// PolicyType - Type of Ssl Policy. Possible values include: 'Predefined', 'Custom'
2561	PolicyType ApplicationGatewaySslPolicyType `json:"policyType,omitempty"`
2562	// PolicyName - Name of Ssl predefined policy. Possible values include: 'AppGwSslPolicy20150501', 'AppGwSslPolicy20170401', 'AppGwSslPolicy20170401S'
2563	PolicyName ApplicationGatewaySslPolicyName `json:"policyName,omitempty"`
2564	// CipherSuites - Ssl cipher suites to be enabled in the specified order to application gateway.
2565	CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"`
2566	// MinProtocolVersion - Minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'TLSv10', 'TLSv11', 'TLSv12'
2567	MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"`
2568}
2569
2570// ApplicationGatewaySslPredefinedPolicy an Ssl predefined policy
2571type ApplicationGatewaySslPredefinedPolicy struct {
2572	autorest.Response `json:"-"`
2573	// Name - Name of the Ssl predefined policy.
2574	Name                                                   *string `json:"name,omitempty"`
2575	*ApplicationGatewaySslPredefinedPolicyPropertiesFormat `json:"properties,omitempty"`
2576	// ID - Resource ID.
2577	ID *string `json:"id,omitempty"`
2578}
2579
2580// MarshalJSON is the custom marshaler for ApplicationGatewaySslPredefinedPolicy.
2581func (agspp ApplicationGatewaySslPredefinedPolicy) MarshalJSON() ([]byte, error) {
2582	objectMap := make(map[string]interface{})
2583	if agspp.Name != nil {
2584		objectMap["name"] = agspp.Name
2585	}
2586	if agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat != nil {
2587		objectMap["properties"] = agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat
2588	}
2589	if agspp.ID != nil {
2590		objectMap["id"] = agspp.ID
2591	}
2592	return json.Marshal(objectMap)
2593}
2594
2595// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslPredefinedPolicy struct.
2596func (agspp *ApplicationGatewaySslPredefinedPolicy) UnmarshalJSON(body []byte) error {
2597	var m map[string]*json.RawMessage
2598	err := json.Unmarshal(body, &m)
2599	if err != nil {
2600		return err
2601	}
2602	for k, v := range m {
2603		switch k {
2604		case "name":
2605			if v != nil {
2606				var name string
2607				err = json.Unmarshal(*v, &name)
2608				if err != nil {
2609					return err
2610				}
2611				agspp.Name = &name
2612			}
2613		case "properties":
2614			if v != nil {
2615				var applicationGatewaySslPredefinedPolicyPropertiesFormat ApplicationGatewaySslPredefinedPolicyPropertiesFormat
2616				err = json.Unmarshal(*v, &applicationGatewaySslPredefinedPolicyPropertiesFormat)
2617				if err != nil {
2618					return err
2619				}
2620				agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat = &applicationGatewaySslPredefinedPolicyPropertiesFormat
2621			}
2622		case "id":
2623			if v != nil {
2624				var ID string
2625				err = json.Unmarshal(*v, &ID)
2626				if err != nil {
2627					return err
2628				}
2629				agspp.ID = &ID
2630			}
2631		}
2632	}
2633
2634	return nil
2635}
2636
2637// ApplicationGatewaySslPredefinedPolicyPropertiesFormat properties of
2638// ApplicationGatewaySslPredefinedPolicy
2639type ApplicationGatewaySslPredefinedPolicyPropertiesFormat struct {
2640	// CipherSuites - Ssl cipher suites to be enabled in the specified order for application gateway.
2641	CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"`
2642	// MinProtocolVersion - Minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'TLSv10', 'TLSv11', 'TLSv12'
2643	MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"`
2644}
2645
2646// ApplicationGatewaysStartFuture an abstraction for monitoring and retrieving the results of a
2647// long-running operation.
2648type ApplicationGatewaysStartFuture struct {
2649	azure.FutureAPI
2650	// Result returns the result of the asynchronous operation.
2651	// If the operation has not completed it will return an error.
2652	Result func(ApplicationGatewaysClient) (autorest.Response, error)
2653}
2654
2655// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2656func (future *ApplicationGatewaysStartFuture) UnmarshalJSON(body []byte) error {
2657	var azFuture azure.Future
2658	if err := json.Unmarshal(body, &azFuture); err != nil {
2659		return err
2660	}
2661	future.FutureAPI = &azFuture
2662	future.Result = future.result
2663	return nil
2664}
2665
2666// result is the default implementation for ApplicationGatewaysStartFuture.Result.
2667func (future *ApplicationGatewaysStartFuture) result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
2668	var done bool
2669	done, err = future.DoneWithContext(context.Background(), client)
2670	if err != nil {
2671		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", future.Response(), "Polling failure")
2672		return
2673	}
2674	if !done {
2675		ar.Response = future.Response()
2676		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStartFuture")
2677		return
2678	}
2679	ar.Response = future.Response()
2680	return
2681}
2682
2683// ApplicationGatewaysStopFuture an abstraction for monitoring and retrieving the results of a long-running
2684// operation.
2685type ApplicationGatewaysStopFuture struct {
2686	azure.FutureAPI
2687	// Result returns the result of the asynchronous operation.
2688	// If the operation has not completed it will return an error.
2689	Result func(ApplicationGatewaysClient) (autorest.Response, error)
2690}
2691
2692// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2693func (future *ApplicationGatewaysStopFuture) UnmarshalJSON(body []byte) error {
2694	var azFuture azure.Future
2695	if err := json.Unmarshal(body, &azFuture); err != nil {
2696		return err
2697	}
2698	future.FutureAPI = &azFuture
2699	future.Result = future.result
2700	return nil
2701}
2702
2703// result is the default implementation for ApplicationGatewaysStopFuture.Result.
2704func (future *ApplicationGatewaysStopFuture) result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
2705	var done bool
2706	done, err = future.DoneWithContext(context.Background(), client)
2707	if err != nil {
2708		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", future.Response(), "Polling failure")
2709		return
2710	}
2711	if !done {
2712		ar.Response = future.Response()
2713		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStopFuture")
2714		return
2715	}
2716	ar.Response = future.Response()
2717	return
2718}
2719
2720// ApplicationGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
2721// long-running operation.
2722type ApplicationGatewaysUpdateTagsFuture struct {
2723	azure.FutureAPI
2724	// Result returns the result of the asynchronous operation.
2725	// If the operation has not completed it will return an error.
2726	Result func(ApplicationGatewaysClient) (ApplicationGateway, error)
2727}
2728
2729// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2730func (future *ApplicationGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error {
2731	var azFuture azure.Future
2732	if err := json.Unmarshal(body, &azFuture); err != nil {
2733		return err
2734	}
2735	future.FutureAPI = &azFuture
2736	future.Result = future.result
2737	return nil
2738}
2739
2740// result is the default implementation for ApplicationGatewaysUpdateTagsFuture.Result.
2741func (future *ApplicationGatewaysUpdateTagsFuture) result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
2742	var done bool
2743	done, err = future.DoneWithContext(context.Background(), client)
2744	if err != nil {
2745		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
2746		return
2747	}
2748	if !done {
2749		ag.Response.Response = future.Response()
2750		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysUpdateTagsFuture")
2751		return
2752	}
2753	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2754	if ag.Response.Response, err = future.GetResult(sender); err == nil && ag.Response.Response.StatusCode != http.StatusNoContent {
2755		ag, err = client.UpdateTagsResponder(ag.Response.Response)
2756		if err != nil {
2757			err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", ag.Response.Response, "Failure responding to request")
2758		}
2759	}
2760	return
2761}
2762
2763// ApplicationGatewayTrustedRootCertificate trusted Root certificates of an application gateway.
2764type ApplicationGatewayTrustedRootCertificate struct {
2765	*ApplicationGatewayTrustedRootCertificatePropertiesFormat `json:"properties,omitempty"`
2766	// Name - Name of the trusted root certificate that is unique within an Application Gateway.
2767	Name *string `json:"name,omitempty"`
2768	// Etag - A unique read-only string that changes whenever the resource is updated.
2769	Etag *string `json:"etag,omitempty"`
2770	// Type - Type of the resource.
2771	Type *string `json:"type,omitempty"`
2772	// ID - Resource ID.
2773	ID *string `json:"id,omitempty"`
2774}
2775
2776// MarshalJSON is the custom marshaler for ApplicationGatewayTrustedRootCertificate.
2777func (agtrc ApplicationGatewayTrustedRootCertificate) MarshalJSON() ([]byte, error) {
2778	objectMap := make(map[string]interface{})
2779	if agtrc.ApplicationGatewayTrustedRootCertificatePropertiesFormat != nil {
2780		objectMap["properties"] = agtrc.ApplicationGatewayTrustedRootCertificatePropertiesFormat
2781	}
2782	if agtrc.Name != nil {
2783		objectMap["name"] = agtrc.Name
2784	}
2785	if agtrc.Etag != nil {
2786		objectMap["etag"] = agtrc.Etag
2787	}
2788	if agtrc.Type != nil {
2789		objectMap["type"] = agtrc.Type
2790	}
2791	if agtrc.ID != nil {
2792		objectMap["id"] = agtrc.ID
2793	}
2794	return json.Marshal(objectMap)
2795}
2796
2797// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayTrustedRootCertificate struct.
2798func (agtrc *ApplicationGatewayTrustedRootCertificate) UnmarshalJSON(body []byte) error {
2799	var m map[string]*json.RawMessage
2800	err := json.Unmarshal(body, &m)
2801	if err != nil {
2802		return err
2803	}
2804	for k, v := range m {
2805		switch k {
2806		case "properties":
2807			if v != nil {
2808				var applicationGatewayTrustedRootCertificatePropertiesFormat ApplicationGatewayTrustedRootCertificatePropertiesFormat
2809				err = json.Unmarshal(*v, &applicationGatewayTrustedRootCertificatePropertiesFormat)
2810				if err != nil {
2811					return err
2812				}
2813				agtrc.ApplicationGatewayTrustedRootCertificatePropertiesFormat = &applicationGatewayTrustedRootCertificatePropertiesFormat
2814			}
2815		case "name":
2816			if v != nil {
2817				var name string
2818				err = json.Unmarshal(*v, &name)
2819				if err != nil {
2820					return err
2821				}
2822				agtrc.Name = &name
2823			}
2824		case "etag":
2825			if v != nil {
2826				var etag string
2827				err = json.Unmarshal(*v, &etag)
2828				if err != nil {
2829					return err
2830				}
2831				agtrc.Etag = &etag
2832			}
2833		case "type":
2834			if v != nil {
2835				var typeVar string
2836				err = json.Unmarshal(*v, &typeVar)
2837				if err != nil {
2838					return err
2839				}
2840				agtrc.Type = &typeVar
2841			}
2842		case "id":
2843			if v != nil {
2844				var ID string
2845				err = json.Unmarshal(*v, &ID)
2846				if err != nil {
2847					return err
2848				}
2849				agtrc.ID = &ID
2850			}
2851		}
2852	}
2853
2854	return nil
2855}
2856
2857// ApplicationGatewayTrustedRootCertificatePropertiesFormat trusted Root certificates properties of an
2858// application gateway.
2859type ApplicationGatewayTrustedRootCertificatePropertiesFormat struct {
2860	// Data - Certificate public data.
2861	Data *string `json:"data,omitempty"`
2862	// KeyVaultSecretID - Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault.
2863	KeyVaultSecretID *string `json:"keyVaultSecretId,omitempty"`
2864	// ProvisioningState - Provisioning state of the trusted root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2865	ProvisioningState *string `json:"provisioningState,omitempty"`
2866}
2867
2868// ApplicationGatewayURLPathMap urlPathMaps give a url path to the backend mapping information for
2869// PathBasedRouting.
2870type ApplicationGatewayURLPathMap struct {
2871	*ApplicationGatewayURLPathMapPropertiesFormat `json:"properties,omitempty"`
2872	// Name - Name of the URL path map that is unique within an Application Gateway.
2873	Name *string `json:"name,omitempty"`
2874	// Etag - A unique read-only string that changes whenever the resource is updated.
2875	Etag *string `json:"etag,omitempty"`
2876	// Type - Type of the resource.
2877	Type *string `json:"type,omitempty"`
2878	// ID - Resource ID.
2879	ID *string `json:"id,omitempty"`
2880}
2881
2882// MarshalJSON is the custom marshaler for ApplicationGatewayURLPathMap.
2883func (agupm ApplicationGatewayURLPathMap) MarshalJSON() ([]byte, error) {
2884	objectMap := make(map[string]interface{})
2885	if agupm.ApplicationGatewayURLPathMapPropertiesFormat != nil {
2886		objectMap["properties"] = agupm.ApplicationGatewayURLPathMapPropertiesFormat
2887	}
2888	if agupm.Name != nil {
2889		objectMap["name"] = agupm.Name
2890	}
2891	if agupm.Etag != nil {
2892		objectMap["etag"] = agupm.Etag
2893	}
2894	if agupm.Type != nil {
2895		objectMap["type"] = agupm.Type
2896	}
2897	if agupm.ID != nil {
2898		objectMap["id"] = agupm.ID
2899	}
2900	return json.Marshal(objectMap)
2901}
2902
2903// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayURLPathMap struct.
2904func (agupm *ApplicationGatewayURLPathMap) UnmarshalJSON(body []byte) error {
2905	var m map[string]*json.RawMessage
2906	err := json.Unmarshal(body, &m)
2907	if err != nil {
2908		return err
2909	}
2910	for k, v := range m {
2911		switch k {
2912		case "properties":
2913			if v != nil {
2914				var applicationGatewayURLPathMapPropertiesFormat ApplicationGatewayURLPathMapPropertiesFormat
2915				err = json.Unmarshal(*v, &applicationGatewayURLPathMapPropertiesFormat)
2916				if err != nil {
2917					return err
2918				}
2919				agupm.ApplicationGatewayURLPathMapPropertiesFormat = &applicationGatewayURLPathMapPropertiesFormat
2920			}
2921		case "name":
2922			if v != nil {
2923				var name string
2924				err = json.Unmarshal(*v, &name)
2925				if err != nil {
2926					return err
2927				}
2928				agupm.Name = &name
2929			}
2930		case "etag":
2931			if v != nil {
2932				var etag string
2933				err = json.Unmarshal(*v, &etag)
2934				if err != nil {
2935					return err
2936				}
2937				agupm.Etag = &etag
2938			}
2939		case "type":
2940			if v != nil {
2941				var typeVar string
2942				err = json.Unmarshal(*v, &typeVar)
2943				if err != nil {
2944					return err
2945				}
2946				agupm.Type = &typeVar
2947			}
2948		case "id":
2949			if v != nil {
2950				var ID string
2951				err = json.Unmarshal(*v, &ID)
2952				if err != nil {
2953					return err
2954				}
2955				agupm.ID = &ID
2956			}
2957		}
2958	}
2959
2960	return nil
2961}
2962
2963// ApplicationGatewayURLPathMapPropertiesFormat properties of UrlPathMap of the application gateway.
2964type ApplicationGatewayURLPathMapPropertiesFormat struct {
2965	// DefaultBackendAddressPool - Default backend address pool resource of URL path map.
2966	DefaultBackendAddressPool *SubResource `json:"defaultBackendAddressPool,omitempty"`
2967	// DefaultBackendHTTPSettings - Default backend http settings resource of URL path map.
2968	DefaultBackendHTTPSettings *SubResource `json:"defaultBackendHttpSettings,omitempty"`
2969	// DefaultRewriteRuleSet - Default Rewrite rule set resource of URL path map.
2970	DefaultRewriteRuleSet *SubResource `json:"defaultRewriteRuleSet,omitempty"`
2971	// DefaultRedirectConfiguration - Default redirect configuration resource of URL path map.
2972	DefaultRedirectConfiguration *SubResource `json:"defaultRedirectConfiguration,omitempty"`
2973	// PathRules - Path rule of URL path map resource.
2974	PathRules *[]ApplicationGatewayPathRule `json:"pathRules,omitempty"`
2975	// ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2976	ProvisioningState *string `json:"provisioningState,omitempty"`
2977}
2978
2979// ApplicationGatewayWebApplicationFirewallConfiguration application gateway web application firewall
2980// configuration.
2981type ApplicationGatewayWebApplicationFirewallConfiguration struct {
2982	// Enabled - Whether the web application firewall is enabled or not.
2983	Enabled *bool `json:"enabled,omitempty"`
2984	// FirewallMode - Web application firewall mode. Possible values include: 'Detection', 'Prevention'
2985	FirewallMode ApplicationGatewayFirewallMode `json:"firewallMode,omitempty"`
2986	// RuleSetType - The type of the web application firewall rule set. Possible values are: 'OWASP'.
2987	RuleSetType *string `json:"ruleSetType,omitempty"`
2988	// RuleSetVersion - The version of the rule set type.
2989	RuleSetVersion *string `json:"ruleSetVersion,omitempty"`
2990	// DisabledRuleGroups - The disabled rule groups.
2991	DisabledRuleGroups *[]ApplicationGatewayFirewallDisabledRuleGroup `json:"disabledRuleGroups,omitempty"`
2992	// RequestBodyCheck - Whether allow WAF to check request Body.
2993	RequestBodyCheck *bool `json:"requestBodyCheck,omitempty"`
2994	// MaxRequestBodySize - Maximum request body size for WAF.
2995	MaxRequestBodySize *int32 `json:"maxRequestBodySize,omitempty"`
2996	// MaxRequestBodySizeInKb - Maximum request body size in Kb for WAF.
2997	MaxRequestBodySizeInKb *int32 `json:"maxRequestBodySizeInKb,omitempty"`
2998	// FileUploadLimitInMb - Maximum file upload size in Mb for WAF.
2999	FileUploadLimitInMb *int32 `json:"fileUploadLimitInMb,omitempty"`
3000	// Exclusions - The exclusion list.
3001	Exclusions *[]ApplicationGatewayFirewallExclusion `json:"exclusions,omitempty"`
3002}
3003
3004// ApplicationSecurityGroup an application security group in a resource group.
3005type ApplicationSecurityGroup struct {
3006	autorest.Response `json:"-"`
3007	// ApplicationSecurityGroupPropertiesFormat - Properties of the application security group.
3008	*ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"`
3009	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
3010	Etag *string `json:"etag,omitempty"`
3011	// ID - Resource ID.
3012	ID *string `json:"id,omitempty"`
3013	// Name - READ-ONLY; Resource name.
3014	Name *string `json:"name,omitempty"`
3015	// Type - READ-ONLY; Resource type.
3016	Type *string `json:"type,omitempty"`
3017	// Location - Resource location.
3018	Location *string `json:"location,omitempty"`
3019	// Tags - Resource tags.
3020	Tags map[string]*string `json:"tags"`
3021}
3022
3023// MarshalJSON is the custom marshaler for ApplicationSecurityGroup.
3024func (asg ApplicationSecurityGroup) MarshalJSON() ([]byte, error) {
3025	objectMap := make(map[string]interface{})
3026	if asg.ApplicationSecurityGroupPropertiesFormat != nil {
3027		objectMap["properties"] = asg.ApplicationSecurityGroupPropertiesFormat
3028	}
3029	if asg.ID != nil {
3030		objectMap["id"] = asg.ID
3031	}
3032	if asg.Location != nil {
3033		objectMap["location"] = asg.Location
3034	}
3035	if asg.Tags != nil {
3036		objectMap["tags"] = asg.Tags
3037	}
3038	return json.Marshal(objectMap)
3039}
3040
3041// UnmarshalJSON is the custom unmarshaler for ApplicationSecurityGroup struct.
3042func (asg *ApplicationSecurityGroup) UnmarshalJSON(body []byte) error {
3043	var m map[string]*json.RawMessage
3044	err := json.Unmarshal(body, &m)
3045	if err != nil {
3046		return err
3047	}
3048	for k, v := range m {
3049		switch k {
3050		case "properties":
3051			if v != nil {
3052				var applicationSecurityGroupPropertiesFormat ApplicationSecurityGroupPropertiesFormat
3053				err = json.Unmarshal(*v, &applicationSecurityGroupPropertiesFormat)
3054				if err != nil {
3055					return err
3056				}
3057				asg.ApplicationSecurityGroupPropertiesFormat = &applicationSecurityGroupPropertiesFormat
3058			}
3059		case "etag":
3060			if v != nil {
3061				var etag string
3062				err = json.Unmarshal(*v, &etag)
3063				if err != nil {
3064					return err
3065				}
3066				asg.Etag = &etag
3067			}
3068		case "id":
3069			if v != nil {
3070				var ID string
3071				err = json.Unmarshal(*v, &ID)
3072				if err != nil {
3073					return err
3074				}
3075				asg.ID = &ID
3076			}
3077		case "name":
3078			if v != nil {
3079				var name string
3080				err = json.Unmarshal(*v, &name)
3081				if err != nil {
3082					return err
3083				}
3084				asg.Name = &name
3085			}
3086		case "type":
3087			if v != nil {
3088				var typeVar string
3089				err = json.Unmarshal(*v, &typeVar)
3090				if err != nil {
3091					return err
3092				}
3093				asg.Type = &typeVar
3094			}
3095		case "location":
3096			if v != nil {
3097				var location string
3098				err = json.Unmarshal(*v, &location)
3099				if err != nil {
3100					return err
3101				}
3102				asg.Location = &location
3103			}
3104		case "tags":
3105			if v != nil {
3106				var tags map[string]*string
3107				err = json.Unmarshal(*v, &tags)
3108				if err != nil {
3109					return err
3110				}
3111				asg.Tags = tags
3112			}
3113		}
3114	}
3115
3116	return nil
3117}
3118
3119// ApplicationSecurityGroupListResult a list of application security groups.
3120type ApplicationSecurityGroupListResult struct {
3121	autorest.Response `json:"-"`
3122	// Value - A list of application security groups.
3123	Value *[]ApplicationSecurityGroup `json:"value,omitempty"`
3124	// NextLink - READ-ONLY; The URL to get the next set of results.
3125	NextLink *string `json:"nextLink,omitempty"`
3126}
3127
3128// MarshalJSON is the custom marshaler for ApplicationSecurityGroupListResult.
3129func (asglr ApplicationSecurityGroupListResult) MarshalJSON() ([]byte, error) {
3130	objectMap := make(map[string]interface{})
3131	if asglr.Value != nil {
3132		objectMap["value"] = asglr.Value
3133	}
3134	return json.Marshal(objectMap)
3135}
3136
3137// ApplicationSecurityGroupListResultIterator provides access to a complete listing of
3138// ApplicationSecurityGroup values.
3139type ApplicationSecurityGroupListResultIterator struct {
3140	i    int
3141	page ApplicationSecurityGroupListResultPage
3142}
3143
3144// NextWithContext advances to the next value.  If there was an error making
3145// the request the iterator does not advance and the error is returned.
3146func (iter *ApplicationSecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
3147	if tracing.IsEnabled() {
3148		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupListResultIterator.NextWithContext")
3149		defer func() {
3150			sc := -1
3151			if iter.Response().Response.Response != nil {
3152				sc = iter.Response().Response.Response.StatusCode
3153			}
3154			tracing.EndSpan(ctx, sc, err)
3155		}()
3156	}
3157	iter.i++
3158	if iter.i < len(iter.page.Values()) {
3159		return nil
3160	}
3161	err = iter.page.NextWithContext(ctx)
3162	if err != nil {
3163		iter.i--
3164		return err
3165	}
3166	iter.i = 0
3167	return nil
3168}
3169
3170// Next advances to the next value.  If there was an error making
3171// the request the iterator does not advance and the error is returned.
3172// Deprecated: Use NextWithContext() instead.
3173func (iter *ApplicationSecurityGroupListResultIterator) Next() error {
3174	return iter.NextWithContext(context.Background())
3175}
3176
3177// NotDone returns true if the enumeration should be started or is not yet complete.
3178func (iter ApplicationSecurityGroupListResultIterator) NotDone() bool {
3179	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3180}
3181
3182// Response returns the raw server response from the last page request.
3183func (iter ApplicationSecurityGroupListResultIterator) Response() ApplicationSecurityGroupListResult {
3184	return iter.page.Response()
3185}
3186
3187// Value returns the current value or a zero-initialized value if the
3188// iterator has advanced beyond the end of the collection.
3189func (iter ApplicationSecurityGroupListResultIterator) Value() ApplicationSecurityGroup {
3190	if !iter.page.NotDone() {
3191		return ApplicationSecurityGroup{}
3192	}
3193	return iter.page.Values()[iter.i]
3194}
3195
3196// Creates a new instance of the ApplicationSecurityGroupListResultIterator type.
3197func NewApplicationSecurityGroupListResultIterator(page ApplicationSecurityGroupListResultPage) ApplicationSecurityGroupListResultIterator {
3198	return ApplicationSecurityGroupListResultIterator{page: page}
3199}
3200
3201// IsEmpty returns true if the ListResult contains no values.
3202func (asglr ApplicationSecurityGroupListResult) IsEmpty() bool {
3203	return asglr.Value == nil || len(*asglr.Value) == 0
3204}
3205
3206// hasNextLink returns true if the NextLink is not empty.
3207func (asglr ApplicationSecurityGroupListResult) hasNextLink() bool {
3208	return asglr.NextLink != nil && len(*asglr.NextLink) != 0
3209}
3210
3211// applicationSecurityGroupListResultPreparer prepares a request to retrieve the next set of results.
3212// It returns nil if no more results exist.
3213func (asglr ApplicationSecurityGroupListResult) applicationSecurityGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
3214	if !asglr.hasNextLink() {
3215		return nil, nil
3216	}
3217	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3218		autorest.AsJSON(),
3219		autorest.AsGet(),
3220		autorest.WithBaseURL(to.String(asglr.NextLink)))
3221}
3222
3223// ApplicationSecurityGroupListResultPage contains a page of ApplicationSecurityGroup values.
3224type ApplicationSecurityGroupListResultPage struct {
3225	fn    func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)
3226	asglr ApplicationSecurityGroupListResult
3227}
3228
3229// NextWithContext advances to the next page of values.  If there was an error making
3230// the request the page does not advance and the error is returned.
3231func (page *ApplicationSecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
3232	if tracing.IsEnabled() {
3233		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupListResultPage.NextWithContext")
3234		defer func() {
3235			sc := -1
3236			if page.Response().Response.Response != nil {
3237				sc = page.Response().Response.Response.StatusCode
3238			}
3239			tracing.EndSpan(ctx, sc, err)
3240		}()
3241	}
3242	for {
3243		next, err := page.fn(ctx, page.asglr)
3244		if err != nil {
3245			return err
3246		}
3247		page.asglr = next
3248		if !next.hasNextLink() || !next.IsEmpty() {
3249			break
3250		}
3251	}
3252	return nil
3253}
3254
3255// Next advances to the next page of values.  If there was an error making
3256// the request the page does not advance and the error is returned.
3257// Deprecated: Use NextWithContext() instead.
3258func (page *ApplicationSecurityGroupListResultPage) Next() error {
3259	return page.NextWithContext(context.Background())
3260}
3261
3262// NotDone returns true if the page enumeration should be started or is not yet complete.
3263func (page ApplicationSecurityGroupListResultPage) NotDone() bool {
3264	return !page.asglr.IsEmpty()
3265}
3266
3267// Response returns the raw server response from the last page request.
3268func (page ApplicationSecurityGroupListResultPage) Response() ApplicationSecurityGroupListResult {
3269	return page.asglr
3270}
3271
3272// Values returns the slice of values for the current page or nil if there are no values.
3273func (page ApplicationSecurityGroupListResultPage) Values() []ApplicationSecurityGroup {
3274	if page.asglr.IsEmpty() {
3275		return nil
3276	}
3277	return *page.asglr.Value
3278}
3279
3280// Creates a new instance of the ApplicationSecurityGroupListResultPage type.
3281func NewApplicationSecurityGroupListResultPage(cur ApplicationSecurityGroupListResult, getNextPage func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)) ApplicationSecurityGroupListResultPage {
3282	return ApplicationSecurityGroupListResultPage{
3283		fn:    getNextPage,
3284		asglr: cur,
3285	}
3286}
3287
3288// ApplicationSecurityGroupPropertiesFormat application security group properties.
3289type ApplicationSecurityGroupPropertiesFormat struct {
3290	// 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.
3291	ResourceGUID *string `json:"resourceGuid,omitempty"`
3292	// ProvisioningState - READ-ONLY; The provisioning state of the application security group resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
3293	ProvisioningState *string `json:"provisioningState,omitempty"`
3294}
3295
3296// MarshalJSON is the custom marshaler for ApplicationSecurityGroupPropertiesFormat.
3297func (asgpf ApplicationSecurityGroupPropertiesFormat) MarshalJSON() ([]byte, error) {
3298	objectMap := make(map[string]interface{})
3299	return json.Marshal(objectMap)
3300}
3301
3302// ApplicationSecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
3303// of a long-running operation.
3304type ApplicationSecurityGroupsCreateOrUpdateFuture struct {
3305	azure.FutureAPI
3306	// Result returns the result of the asynchronous operation.
3307	// If the operation has not completed it will return an error.
3308	Result func(ApplicationSecurityGroupsClient) (ApplicationSecurityGroup, error)
3309}
3310
3311// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3312func (future *ApplicationSecurityGroupsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
3313	var azFuture azure.Future
3314	if err := json.Unmarshal(body, &azFuture); err != nil {
3315		return err
3316	}
3317	future.FutureAPI = &azFuture
3318	future.Result = future.result
3319	return nil
3320}
3321
3322// result is the default implementation for ApplicationSecurityGroupsCreateOrUpdateFuture.Result.
3323func (future *ApplicationSecurityGroupsCreateOrUpdateFuture) result(client ApplicationSecurityGroupsClient) (asg ApplicationSecurityGroup, err error) {
3324	var done bool
3325	done, err = future.DoneWithContext(context.Background(), client)
3326	if err != nil {
3327		err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
3328		return
3329	}
3330	if !done {
3331		asg.Response.Response = future.Response()
3332		err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsCreateOrUpdateFuture")
3333		return
3334	}
3335	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3336	if asg.Response.Response, err = future.GetResult(sender); err == nil && asg.Response.Response.StatusCode != http.StatusNoContent {
3337		asg, err = client.CreateOrUpdateResponder(asg.Response.Response)
3338		if err != nil {
3339			err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", asg.Response.Response, "Failure responding to request")
3340		}
3341	}
3342	return
3343}
3344
3345// ApplicationSecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a
3346// long-running operation.
3347type ApplicationSecurityGroupsDeleteFuture struct {
3348	azure.FutureAPI
3349	// Result returns the result of the asynchronous operation.
3350	// If the operation has not completed it will return an error.
3351	Result func(ApplicationSecurityGroupsClient) (autorest.Response, error)
3352}
3353
3354// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3355func (future *ApplicationSecurityGroupsDeleteFuture) UnmarshalJSON(body []byte) error {
3356	var azFuture azure.Future
3357	if err := json.Unmarshal(body, &azFuture); err != nil {
3358		return err
3359	}
3360	future.FutureAPI = &azFuture
3361	future.Result = future.result
3362	return nil
3363}
3364
3365// result is the default implementation for ApplicationSecurityGroupsDeleteFuture.Result.
3366func (future *ApplicationSecurityGroupsDeleteFuture) result(client ApplicationSecurityGroupsClient) (ar autorest.Response, err error) {
3367	var done bool
3368	done, err = future.DoneWithContext(context.Background(), client)
3369	if err != nil {
3370		err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
3371		return
3372	}
3373	if !done {
3374		ar.Response = future.Response()
3375		err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsDeleteFuture")
3376		return
3377	}
3378	ar.Response = future.Response()
3379	return
3380}
3381
3382// ApplicationSecurityGroupsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
3383// long-running operation.
3384type ApplicationSecurityGroupsUpdateTagsFuture struct {
3385	azure.FutureAPI
3386	// Result returns the result of the asynchronous operation.
3387	// If the operation has not completed it will return an error.
3388	Result func(ApplicationSecurityGroupsClient) (ApplicationSecurityGroup, error)
3389}
3390
3391// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3392func (future *ApplicationSecurityGroupsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
3393	var azFuture azure.Future
3394	if err := json.Unmarshal(body, &azFuture); err != nil {
3395		return err
3396	}
3397	future.FutureAPI = &azFuture
3398	future.Result = future.result
3399	return nil
3400}
3401
3402// result is the default implementation for ApplicationSecurityGroupsUpdateTagsFuture.Result.
3403func (future *ApplicationSecurityGroupsUpdateTagsFuture) result(client ApplicationSecurityGroupsClient) (asg ApplicationSecurityGroup, err error) {
3404	var done bool
3405	done, err = future.DoneWithContext(context.Background(), client)
3406	if err != nil {
3407		err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
3408		return
3409	}
3410	if !done {
3411		asg.Response.Response = future.Response()
3412		err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsUpdateTagsFuture")
3413		return
3414	}
3415	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3416	if asg.Response.Response, err = future.GetResult(sender); err == nil && asg.Response.Response.StatusCode != http.StatusNoContent {
3417		asg, err = client.UpdateTagsResponder(asg.Response.Response)
3418		if err != nil {
3419			err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsUpdateTagsFuture", "Result", asg.Response.Response, "Failure responding to request")
3420		}
3421	}
3422	return
3423}
3424
3425// AuthorizationListResult response for ListAuthorizations API service call retrieves all authorizations
3426// that belongs to an ExpressRouteCircuit.
3427type AuthorizationListResult struct {
3428	autorest.Response `json:"-"`
3429	// Value - The authorizations in an ExpressRoute Circuit.
3430	Value *[]ExpressRouteCircuitAuthorization `json:"value,omitempty"`
3431	// NextLink - The URL to get the next set of results.
3432	NextLink *string `json:"nextLink,omitempty"`
3433}
3434
3435// AuthorizationListResultIterator provides access to a complete listing of
3436// ExpressRouteCircuitAuthorization values.
3437type AuthorizationListResultIterator struct {
3438	i    int
3439	page AuthorizationListResultPage
3440}
3441
3442// NextWithContext advances to the next value.  If there was an error making
3443// the request the iterator does not advance and the error is returned.
3444func (iter *AuthorizationListResultIterator) NextWithContext(ctx context.Context) (err error) {
3445	if tracing.IsEnabled() {
3446		ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultIterator.NextWithContext")
3447		defer func() {
3448			sc := -1
3449			if iter.Response().Response.Response != nil {
3450				sc = iter.Response().Response.Response.StatusCode
3451			}
3452			tracing.EndSpan(ctx, sc, err)
3453		}()
3454	}
3455	iter.i++
3456	if iter.i < len(iter.page.Values()) {
3457		return nil
3458	}
3459	err = iter.page.NextWithContext(ctx)
3460	if err != nil {
3461		iter.i--
3462		return err
3463	}
3464	iter.i = 0
3465	return nil
3466}
3467
3468// Next advances to the next value.  If there was an error making
3469// the request the iterator does not advance and the error is returned.
3470// Deprecated: Use NextWithContext() instead.
3471func (iter *AuthorizationListResultIterator) Next() error {
3472	return iter.NextWithContext(context.Background())
3473}
3474
3475// NotDone returns true if the enumeration should be started or is not yet complete.
3476func (iter AuthorizationListResultIterator) NotDone() bool {
3477	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3478}
3479
3480// Response returns the raw server response from the last page request.
3481func (iter AuthorizationListResultIterator) Response() AuthorizationListResult {
3482	return iter.page.Response()
3483}
3484
3485// Value returns the current value or a zero-initialized value if the
3486// iterator has advanced beyond the end of the collection.
3487func (iter AuthorizationListResultIterator) Value() ExpressRouteCircuitAuthorization {
3488	if !iter.page.NotDone() {
3489		return ExpressRouteCircuitAuthorization{}
3490	}
3491	return iter.page.Values()[iter.i]
3492}
3493
3494// Creates a new instance of the AuthorizationListResultIterator type.
3495func NewAuthorizationListResultIterator(page AuthorizationListResultPage) AuthorizationListResultIterator {
3496	return AuthorizationListResultIterator{page: page}
3497}
3498
3499// IsEmpty returns true if the ListResult contains no values.
3500func (alr AuthorizationListResult) IsEmpty() bool {
3501	return alr.Value == nil || len(*alr.Value) == 0
3502}
3503
3504// hasNextLink returns true if the NextLink is not empty.
3505func (alr AuthorizationListResult) hasNextLink() bool {
3506	return alr.NextLink != nil && len(*alr.NextLink) != 0
3507}
3508
3509// authorizationListResultPreparer prepares a request to retrieve the next set of results.
3510// It returns nil if no more results exist.
3511func (alr AuthorizationListResult) authorizationListResultPreparer(ctx context.Context) (*http.Request, error) {
3512	if !alr.hasNextLink() {
3513		return nil, nil
3514	}
3515	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3516		autorest.AsJSON(),
3517		autorest.AsGet(),
3518		autorest.WithBaseURL(to.String(alr.NextLink)))
3519}
3520
3521// AuthorizationListResultPage contains a page of ExpressRouteCircuitAuthorization values.
3522type AuthorizationListResultPage struct {
3523	fn  func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)
3524	alr AuthorizationListResult
3525}
3526
3527// NextWithContext advances to the next page of values.  If there was an error making
3528// the request the page does not advance and the error is returned.
3529func (page *AuthorizationListResultPage) NextWithContext(ctx context.Context) (err error) {
3530	if tracing.IsEnabled() {
3531		ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultPage.NextWithContext")
3532		defer func() {
3533			sc := -1
3534			if page.Response().Response.Response != nil {
3535				sc = page.Response().Response.Response.StatusCode
3536			}
3537			tracing.EndSpan(ctx, sc, err)
3538		}()
3539	}
3540	for {
3541		next, err := page.fn(ctx, page.alr)
3542		if err != nil {
3543			return err
3544		}
3545		page.alr = next
3546		if !next.hasNextLink() || !next.IsEmpty() {
3547			break
3548		}
3549	}
3550	return nil
3551}
3552
3553// Next advances to the next page of values.  If there was an error making
3554// the request the page does not advance and the error is returned.
3555// Deprecated: Use NextWithContext() instead.
3556func (page *AuthorizationListResultPage) Next() error {
3557	return page.NextWithContext(context.Background())
3558}
3559
3560// NotDone returns true if the page enumeration should be started or is not yet complete.
3561func (page AuthorizationListResultPage) NotDone() bool {
3562	return !page.alr.IsEmpty()
3563}
3564
3565// Response returns the raw server response from the last page request.
3566func (page AuthorizationListResultPage) Response() AuthorizationListResult {
3567	return page.alr
3568}
3569
3570// Values returns the slice of values for the current page or nil if there are no values.
3571func (page AuthorizationListResultPage) Values() []ExpressRouteCircuitAuthorization {
3572	if page.alr.IsEmpty() {
3573		return nil
3574	}
3575	return *page.alr.Value
3576}
3577
3578// Creates a new instance of the AuthorizationListResultPage type.
3579func NewAuthorizationListResultPage(cur AuthorizationListResult, getNextPage func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)) AuthorizationListResultPage {
3580	return AuthorizationListResultPage{
3581		fn:  getNextPage,
3582		alr: cur,
3583	}
3584}
3585
3586// AuthorizationPropertiesFormat ...
3587type AuthorizationPropertiesFormat struct {
3588	// AuthorizationKey - The authorization key.
3589	AuthorizationKey *string `json:"authorizationKey,omitempty"`
3590	// AuthorizationUseStatus - AuthorizationUseStatus. Possible values are: 'Available' and 'InUse'. Possible values include: 'Available', 'InUse'
3591	AuthorizationUseStatus AuthorizationUseStatus `json:"authorizationUseStatus,omitempty"`
3592	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
3593	ProvisioningState *string `json:"provisioningState,omitempty"`
3594}
3595
3596// Availability availability of the metric.
3597type Availability struct {
3598	// TimeGrain - The time grain of the availability.
3599	TimeGrain *string `json:"timeGrain,omitempty"`
3600	// Retention - The retention of the availability.
3601	Retention *string `json:"retention,omitempty"`
3602	// BlobDuration - Duration of the availability blob.
3603	BlobDuration *string `json:"blobDuration,omitempty"`
3604}
3605
3606// AvailableDelegation the serviceName of an AvailableDelegation indicates a possible delegation for a
3607// subnet.
3608type AvailableDelegation struct {
3609	// Name - The name of the AvailableDelegation resource.
3610	Name *string `json:"name,omitempty"`
3611	// ID - A unique identifier of the AvailableDelegation resource.
3612	ID *string `json:"id,omitempty"`
3613	// Type - Resource type.
3614	Type *string `json:"type,omitempty"`
3615	// ServiceName - The name of the service and resource
3616	ServiceName *string `json:"serviceName,omitempty"`
3617	// Actions - Describes the actions permitted to the service upon delegation
3618	Actions *[]string `json:"actions,omitempty"`
3619}
3620
3621// AvailableDelegationsResult an array of available delegations.
3622type AvailableDelegationsResult struct {
3623	autorest.Response `json:"-"`
3624	// Value - An array of available delegations.
3625	Value *[]AvailableDelegation `json:"value,omitempty"`
3626	// NextLink - READ-ONLY; The URL to get the next set of results.
3627	NextLink *string `json:"nextLink,omitempty"`
3628}
3629
3630// MarshalJSON is the custom marshaler for AvailableDelegationsResult.
3631func (adr AvailableDelegationsResult) MarshalJSON() ([]byte, error) {
3632	objectMap := make(map[string]interface{})
3633	if adr.Value != nil {
3634		objectMap["value"] = adr.Value
3635	}
3636	return json.Marshal(objectMap)
3637}
3638
3639// AvailableDelegationsResultIterator provides access to a complete listing of AvailableDelegation values.
3640type AvailableDelegationsResultIterator struct {
3641	i    int
3642	page AvailableDelegationsResultPage
3643}
3644
3645// NextWithContext advances to the next value.  If there was an error making
3646// the request the iterator does not advance and the error is returned.
3647func (iter *AvailableDelegationsResultIterator) NextWithContext(ctx context.Context) (err error) {
3648	if tracing.IsEnabled() {
3649		ctx = tracing.StartSpan(ctx, fqdn+"/AvailableDelegationsResultIterator.NextWithContext")
3650		defer func() {
3651			sc := -1
3652			if iter.Response().Response.Response != nil {
3653				sc = iter.Response().Response.Response.StatusCode
3654			}
3655			tracing.EndSpan(ctx, sc, err)
3656		}()
3657	}
3658	iter.i++
3659	if iter.i < len(iter.page.Values()) {
3660		return nil
3661	}
3662	err = iter.page.NextWithContext(ctx)
3663	if err != nil {
3664		iter.i--
3665		return err
3666	}
3667	iter.i = 0
3668	return nil
3669}
3670
3671// Next advances to the next value.  If there was an error making
3672// the request the iterator does not advance and the error is returned.
3673// Deprecated: Use NextWithContext() instead.
3674func (iter *AvailableDelegationsResultIterator) Next() error {
3675	return iter.NextWithContext(context.Background())
3676}
3677
3678// NotDone returns true if the enumeration should be started or is not yet complete.
3679func (iter AvailableDelegationsResultIterator) NotDone() bool {
3680	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3681}
3682
3683// Response returns the raw server response from the last page request.
3684func (iter AvailableDelegationsResultIterator) Response() AvailableDelegationsResult {
3685	return iter.page.Response()
3686}
3687
3688// Value returns the current value or a zero-initialized value if the
3689// iterator has advanced beyond the end of the collection.
3690func (iter AvailableDelegationsResultIterator) Value() AvailableDelegation {
3691	if !iter.page.NotDone() {
3692		return AvailableDelegation{}
3693	}
3694	return iter.page.Values()[iter.i]
3695}
3696
3697// Creates a new instance of the AvailableDelegationsResultIterator type.
3698func NewAvailableDelegationsResultIterator(page AvailableDelegationsResultPage) AvailableDelegationsResultIterator {
3699	return AvailableDelegationsResultIterator{page: page}
3700}
3701
3702// IsEmpty returns true if the ListResult contains no values.
3703func (adr AvailableDelegationsResult) IsEmpty() bool {
3704	return adr.Value == nil || len(*adr.Value) == 0
3705}
3706
3707// hasNextLink returns true if the NextLink is not empty.
3708func (adr AvailableDelegationsResult) hasNextLink() bool {
3709	return adr.NextLink != nil && len(*adr.NextLink) != 0
3710}
3711
3712// availableDelegationsResultPreparer prepares a request to retrieve the next set of results.
3713// It returns nil if no more results exist.
3714func (adr AvailableDelegationsResult) availableDelegationsResultPreparer(ctx context.Context) (*http.Request, error) {
3715	if !adr.hasNextLink() {
3716		return nil, nil
3717	}
3718	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3719		autorest.AsJSON(),
3720		autorest.AsGet(),
3721		autorest.WithBaseURL(to.String(adr.NextLink)))
3722}
3723
3724// AvailableDelegationsResultPage contains a page of AvailableDelegation values.
3725type AvailableDelegationsResultPage struct {
3726	fn  func(context.Context, AvailableDelegationsResult) (AvailableDelegationsResult, error)
3727	adr AvailableDelegationsResult
3728}
3729
3730// NextWithContext advances to the next page of values.  If there was an error making
3731// the request the page does not advance and the error is returned.
3732func (page *AvailableDelegationsResultPage) NextWithContext(ctx context.Context) (err error) {
3733	if tracing.IsEnabled() {
3734		ctx = tracing.StartSpan(ctx, fqdn+"/AvailableDelegationsResultPage.NextWithContext")
3735		defer func() {
3736			sc := -1
3737			if page.Response().Response.Response != nil {
3738				sc = page.Response().Response.Response.StatusCode
3739			}
3740			tracing.EndSpan(ctx, sc, err)
3741		}()
3742	}
3743	for {
3744		next, err := page.fn(ctx, page.adr)
3745		if err != nil {
3746			return err
3747		}
3748		page.adr = next
3749		if !next.hasNextLink() || !next.IsEmpty() {
3750			break
3751		}
3752	}
3753	return nil
3754}
3755
3756// Next advances to the next page of values.  If there was an error making
3757// the request the page does not advance and the error is returned.
3758// Deprecated: Use NextWithContext() instead.
3759func (page *AvailableDelegationsResultPage) Next() error {
3760	return page.NextWithContext(context.Background())
3761}
3762
3763// NotDone returns true if the page enumeration should be started or is not yet complete.
3764func (page AvailableDelegationsResultPage) NotDone() bool {
3765	return !page.adr.IsEmpty()
3766}
3767
3768// Response returns the raw server response from the last page request.
3769func (page AvailableDelegationsResultPage) Response() AvailableDelegationsResult {
3770	return page.adr
3771}
3772
3773// Values returns the slice of values for the current page or nil if there are no values.
3774func (page AvailableDelegationsResultPage) Values() []AvailableDelegation {
3775	if page.adr.IsEmpty() {
3776		return nil
3777	}
3778	return *page.adr.Value
3779}
3780
3781// Creates a new instance of the AvailableDelegationsResultPage type.
3782func NewAvailableDelegationsResultPage(cur AvailableDelegationsResult, getNextPage func(context.Context, AvailableDelegationsResult) (AvailableDelegationsResult, error)) AvailableDelegationsResultPage {
3783	return AvailableDelegationsResultPage{
3784		fn:  getNextPage,
3785		adr: cur,
3786	}
3787}
3788
3789// AvailableProvidersList list of available countries with details.
3790type AvailableProvidersList struct {
3791	autorest.Response `json:"-"`
3792	// Countries - List of available countries.
3793	Countries *[]AvailableProvidersListCountry `json:"countries,omitempty"`
3794}
3795
3796// AvailableProvidersListCity city or town details.
3797type AvailableProvidersListCity struct {
3798	// CityName - The city or town name.
3799	CityName *string `json:"cityName,omitempty"`
3800	// Providers - A list of Internet service providers.
3801	Providers *[]string `json:"providers,omitempty"`
3802}
3803
3804// AvailableProvidersListCountry country details.
3805type AvailableProvidersListCountry struct {
3806	// CountryName - The country name.
3807	CountryName *string `json:"countryName,omitempty"`
3808	// Providers - A list of Internet service providers.
3809	Providers *[]string `json:"providers,omitempty"`
3810	// States - List of available states in the country.
3811	States *[]AvailableProvidersListState `json:"states,omitempty"`
3812}
3813
3814// AvailableProvidersListParameters constraints that determine the list of available Internet service
3815// providers.
3816type AvailableProvidersListParameters struct {
3817	// AzureLocations - A list of Azure regions.
3818	AzureLocations *[]string `json:"azureLocations,omitempty"`
3819	// Country - The country for available providers list.
3820	Country *string `json:"country,omitempty"`
3821	// State - The state for available providers list.
3822	State *string `json:"state,omitempty"`
3823	// City - The city or town for available providers list.
3824	City *string `json:"city,omitempty"`
3825}
3826
3827// AvailableProvidersListState state details.
3828type AvailableProvidersListState struct {
3829	// StateName - The state name.
3830	StateName *string `json:"stateName,omitempty"`
3831	// Providers - A list of Internet service providers.
3832	Providers *[]string `json:"providers,omitempty"`
3833	// Cities - List of available cities or towns in the state.
3834	Cities *[]AvailableProvidersListCity `json:"cities,omitempty"`
3835}
3836
3837// AzureAsyncOperationResult the response body contains the status of the specified asynchronous operation,
3838// indicating whether it has succeeded, is in progress, or has failed. Note that this status is distinct
3839// from the HTTP status code returned for the Get Operation Status operation itself. If the asynchronous
3840// operation succeeded, the response body includes the HTTP status code for the successful request. If the
3841// asynchronous operation failed, the response body includes the HTTP status code for the failed request
3842// and error information regarding the failure.
3843type AzureAsyncOperationResult struct {
3844	// Status - Status of the Azure async operation. Possible values are: 'InProgress', 'Succeeded', and 'Failed'. Possible values include: 'OperationStatusInProgress', 'OperationStatusSucceeded', 'OperationStatusFailed'
3845	Status OperationStatus `json:"status,omitempty"`
3846	Error  *Error          `json:"error,omitempty"`
3847}
3848
3849// AzureFirewall azure Firewall resource
3850type AzureFirewall struct {
3851	autorest.Response              `json:"-"`
3852	*AzureFirewallPropertiesFormat `json:"properties,omitempty"`
3853	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
3854	Etag *string `json:"etag,omitempty"`
3855	// ID - Resource ID.
3856	ID *string `json:"id,omitempty"`
3857	// Name - READ-ONLY; Resource name.
3858	Name *string `json:"name,omitempty"`
3859	// Type - READ-ONLY; Resource type.
3860	Type *string `json:"type,omitempty"`
3861	// Location - Resource location.
3862	Location *string `json:"location,omitempty"`
3863	// Tags - Resource tags.
3864	Tags map[string]*string `json:"tags"`
3865}
3866
3867// MarshalJSON is the custom marshaler for AzureFirewall.
3868func (af AzureFirewall) MarshalJSON() ([]byte, error) {
3869	objectMap := make(map[string]interface{})
3870	if af.AzureFirewallPropertiesFormat != nil {
3871		objectMap["properties"] = af.AzureFirewallPropertiesFormat
3872	}
3873	if af.ID != nil {
3874		objectMap["id"] = af.ID
3875	}
3876	if af.Location != nil {
3877		objectMap["location"] = af.Location
3878	}
3879	if af.Tags != nil {
3880		objectMap["tags"] = af.Tags
3881	}
3882	return json.Marshal(objectMap)
3883}
3884
3885// UnmarshalJSON is the custom unmarshaler for AzureFirewall struct.
3886func (af *AzureFirewall) UnmarshalJSON(body []byte) error {
3887	var m map[string]*json.RawMessage
3888	err := json.Unmarshal(body, &m)
3889	if err != nil {
3890		return err
3891	}
3892	for k, v := range m {
3893		switch k {
3894		case "properties":
3895			if v != nil {
3896				var azureFirewallPropertiesFormat AzureFirewallPropertiesFormat
3897				err = json.Unmarshal(*v, &azureFirewallPropertiesFormat)
3898				if err != nil {
3899					return err
3900				}
3901				af.AzureFirewallPropertiesFormat = &azureFirewallPropertiesFormat
3902			}
3903		case "etag":
3904			if v != nil {
3905				var etag string
3906				err = json.Unmarshal(*v, &etag)
3907				if err != nil {
3908					return err
3909				}
3910				af.Etag = &etag
3911			}
3912		case "id":
3913			if v != nil {
3914				var ID string
3915				err = json.Unmarshal(*v, &ID)
3916				if err != nil {
3917					return err
3918				}
3919				af.ID = &ID
3920			}
3921		case "name":
3922			if v != nil {
3923				var name string
3924				err = json.Unmarshal(*v, &name)
3925				if err != nil {
3926					return err
3927				}
3928				af.Name = &name
3929			}
3930		case "type":
3931			if v != nil {
3932				var typeVar string
3933				err = json.Unmarshal(*v, &typeVar)
3934				if err != nil {
3935					return err
3936				}
3937				af.Type = &typeVar
3938			}
3939		case "location":
3940			if v != nil {
3941				var location string
3942				err = json.Unmarshal(*v, &location)
3943				if err != nil {
3944					return err
3945				}
3946				af.Location = &location
3947			}
3948		case "tags":
3949			if v != nil {
3950				var tags map[string]*string
3951				err = json.Unmarshal(*v, &tags)
3952				if err != nil {
3953					return err
3954				}
3955				af.Tags = tags
3956			}
3957		}
3958	}
3959
3960	return nil
3961}
3962
3963// AzureFirewallApplicationRule properties of an application rule.
3964type AzureFirewallApplicationRule struct {
3965	// Name - Name of the application rule.
3966	Name *string `json:"name,omitempty"`
3967	// Description - Description of the rule.
3968	Description *string `json:"description,omitempty"`
3969	// SourceAddresses - List of source IP addresses for this rule.
3970	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
3971	// Protocols - Array of ApplicationRuleProtocols.
3972	Protocols *[]AzureFirewallApplicationRuleProtocol `json:"protocols,omitempty"`
3973	// TargetFqdns - List of FQDNs for this rule.
3974	TargetFqdns *[]string `json:"targetFqdns,omitempty"`
3975	// FqdnTags - List of FQDN Tags for this rule.
3976	FqdnTags *[]string `json:"fqdnTags,omitempty"`
3977}
3978
3979// AzureFirewallApplicationRuleCollection application rule collection resource
3980type AzureFirewallApplicationRuleCollection struct {
3981	*AzureFirewallApplicationRuleCollectionPropertiesFormat `json:"properties,omitempty"`
3982	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
3983	Name *string `json:"name,omitempty"`
3984	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
3985	Etag *string `json:"etag,omitempty"`
3986	// ID - Resource ID.
3987	ID *string `json:"id,omitempty"`
3988}
3989
3990// MarshalJSON is the custom marshaler for AzureFirewallApplicationRuleCollection.
3991func (afarc AzureFirewallApplicationRuleCollection) MarshalJSON() ([]byte, error) {
3992	objectMap := make(map[string]interface{})
3993	if afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat != nil {
3994		objectMap["properties"] = afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat
3995	}
3996	if afarc.Name != nil {
3997		objectMap["name"] = afarc.Name
3998	}
3999	if afarc.ID != nil {
4000		objectMap["id"] = afarc.ID
4001	}
4002	return json.Marshal(objectMap)
4003}
4004
4005// UnmarshalJSON is the custom unmarshaler for AzureFirewallApplicationRuleCollection struct.
4006func (afarc *AzureFirewallApplicationRuleCollection) UnmarshalJSON(body []byte) error {
4007	var m map[string]*json.RawMessage
4008	err := json.Unmarshal(body, &m)
4009	if err != nil {
4010		return err
4011	}
4012	for k, v := range m {
4013		switch k {
4014		case "properties":
4015			if v != nil {
4016				var azureFirewallApplicationRuleCollectionPropertiesFormat AzureFirewallApplicationRuleCollectionPropertiesFormat
4017				err = json.Unmarshal(*v, &azureFirewallApplicationRuleCollectionPropertiesFormat)
4018				if err != nil {
4019					return err
4020				}
4021				afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat = &azureFirewallApplicationRuleCollectionPropertiesFormat
4022			}
4023		case "name":
4024			if v != nil {
4025				var name string
4026				err = json.Unmarshal(*v, &name)
4027				if err != nil {
4028					return err
4029				}
4030				afarc.Name = &name
4031			}
4032		case "etag":
4033			if v != nil {
4034				var etag string
4035				err = json.Unmarshal(*v, &etag)
4036				if err != nil {
4037					return err
4038				}
4039				afarc.Etag = &etag
4040			}
4041		case "id":
4042			if v != nil {
4043				var ID string
4044				err = json.Unmarshal(*v, &ID)
4045				if err != nil {
4046					return err
4047				}
4048				afarc.ID = &ID
4049			}
4050		}
4051	}
4052
4053	return nil
4054}
4055
4056// AzureFirewallApplicationRuleCollectionPropertiesFormat properties of the application rule collection.
4057type AzureFirewallApplicationRuleCollectionPropertiesFormat struct {
4058	// Priority - Priority of the application rule collection resource.
4059	Priority *int32 `json:"priority,omitempty"`
4060	// Action - The action type of a rule collection
4061	Action *AzureFirewallRCAction `json:"action,omitempty"`
4062	// Rules - Collection of rules used by a application rule collection.
4063	Rules *[]AzureFirewallApplicationRule `json:"rules,omitempty"`
4064	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
4065	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
4066}
4067
4068// AzureFirewallApplicationRuleProtocol properties of the application rule protocol.
4069type AzureFirewallApplicationRuleProtocol struct {
4070	// ProtocolType - Protocol type. Possible values include: 'AzureFirewallApplicationRuleProtocolTypeHTTP', 'AzureFirewallApplicationRuleProtocolTypeHTTPS'
4071	ProtocolType AzureFirewallApplicationRuleProtocolType `json:"protocolType,omitempty"`
4072	// Port - Port number for the protocol, cannot be greater than 64000. This field is optional.
4073	Port *int32 `json:"port,omitempty"`
4074}
4075
4076// AzureFirewallFqdnTag azure Firewall FQDN Tag Resource
4077type AzureFirewallFqdnTag struct {
4078	*AzureFirewallFqdnTagPropertiesFormat `json:"properties,omitempty"`
4079	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
4080	Etag *string `json:"etag,omitempty"`
4081	// ID - Resource ID.
4082	ID *string `json:"id,omitempty"`
4083	// Name - READ-ONLY; Resource name.
4084	Name *string `json:"name,omitempty"`
4085	// Type - READ-ONLY; Resource type.
4086	Type *string `json:"type,omitempty"`
4087	// Location - Resource location.
4088	Location *string `json:"location,omitempty"`
4089	// Tags - Resource tags.
4090	Tags map[string]*string `json:"tags"`
4091}
4092
4093// MarshalJSON is the custom marshaler for AzureFirewallFqdnTag.
4094func (afft AzureFirewallFqdnTag) MarshalJSON() ([]byte, error) {
4095	objectMap := make(map[string]interface{})
4096	if afft.AzureFirewallFqdnTagPropertiesFormat != nil {
4097		objectMap["properties"] = afft.AzureFirewallFqdnTagPropertiesFormat
4098	}
4099	if afft.ID != nil {
4100		objectMap["id"] = afft.ID
4101	}
4102	if afft.Location != nil {
4103		objectMap["location"] = afft.Location
4104	}
4105	if afft.Tags != nil {
4106		objectMap["tags"] = afft.Tags
4107	}
4108	return json.Marshal(objectMap)
4109}
4110
4111// UnmarshalJSON is the custom unmarshaler for AzureFirewallFqdnTag struct.
4112func (afft *AzureFirewallFqdnTag) UnmarshalJSON(body []byte) error {
4113	var m map[string]*json.RawMessage
4114	err := json.Unmarshal(body, &m)
4115	if err != nil {
4116		return err
4117	}
4118	for k, v := range m {
4119		switch k {
4120		case "properties":
4121			if v != nil {
4122				var azureFirewallFqdnTagPropertiesFormat AzureFirewallFqdnTagPropertiesFormat
4123				err = json.Unmarshal(*v, &azureFirewallFqdnTagPropertiesFormat)
4124				if err != nil {
4125					return err
4126				}
4127				afft.AzureFirewallFqdnTagPropertiesFormat = &azureFirewallFqdnTagPropertiesFormat
4128			}
4129		case "etag":
4130			if v != nil {
4131				var etag string
4132				err = json.Unmarshal(*v, &etag)
4133				if err != nil {
4134					return err
4135				}
4136				afft.Etag = &etag
4137			}
4138		case "id":
4139			if v != nil {
4140				var ID string
4141				err = json.Unmarshal(*v, &ID)
4142				if err != nil {
4143					return err
4144				}
4145				afft.ID = &ID
4146			}
4147		case "name":
4148			if v != nil {
4149				var name string
4150				err = json.Unmarshal(*v, &name)
4151				if err != nil {
4152					return err
4153				}
4154				afft.Name = &name
4155			}
4156		case "type":
4157			if v != nil {
4158				var typeVar string
4159				err = json.Unmarshal(*v, &typeVar)
4160				if err != nil {
4161					return err
4162				}
4163				afft.Type = &typeVar
4164			}
4165		case "location":
4166			if v != nil {
4167				var location string
4168				err = json.Unmarshal(*v, &location)
4169				if err != nil {
4170					return err
4171				}
4172				afft.Location = &location
4173			}
4174		case "tags":
4175			if v != nil {
4176				var tags map[string]*string
4177				err = json.Unmarshal(*v, &tags)
4178				if err != nil {
4179					return err
4180				}
4181				afft.Tags = tags
4182			}
4183		}
4184	}
4185
4186	return nil
4187}
4188
4189// AzureFirewallFqdnTagListResult response for ListAzureFirewallFqdnTags API service call.
4190type AzureFirewallFqdnTagListResult struct {
4191	autorest.Response `json:"-"`
4192	// Value - List of Azure Firewall FQDN Tags in a resource group.
4193	Value *[]AzureFirewallFqdnTag `json:"value,omitempty"`
4194	// NextLink - URL to get the next set of results.
4195	NextLink *string `json:"nextLink,omitempty"`
4196}
4197
4198// AzureFirewallFqdnTagListResultIterator provides access to a complete listing of AzureFirewallFqdnTag
4199// values.
4200type AzureFirewallFqdnTagListResultIterator struct {
4201	i    int
4202	page AzureFirewallFqdnTagListResultPage
4203}
4204
4205// NextWithContext advances to the next value.  If there was an error making
4206// the request the iterator does not advance and the error is returned.
4207func (iter *AzureFirewallFqdnTagListResultIterator) NextWithContext(ctx context.Context) (err error) {
4208	if tracing.IsEnabled() {
4209		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallFqdnTagListResultIterator.NextWithContext")
4210		defer func() {
4211			sc := -1
4212			if iter.Response().Response.Response != nil {
4213				sc = iter.Response().Response.Response.StatusCode
4214			}
4215			tracing.EndSpan(ctx, sc, err)
4216		}()
4217	}
4218	iter.i++
4219	if iter.i < len(iter.page.Values()) {
4220		return nil
4221	}
4222	err = iter.page.NextWithContext(ctx)
4223	if err != nil {
4224		iter.i--
4225		return err
4226	}
4227	iter.i = 0
4228	return nil
4229}
4230
4231// Next advances to the next value.  If there was an error making
4232// the request the iterator does not advance and the error is returned.
4233// Deprecated: Use NextWithContext() instead.
4234func (iter *AzureFirewallFqdnTagListResultIterator) Next() error {
4235	return iter.NextWithContext(context.Background())
4236}
4237
4238// NotDone returns true if the enumeration should be started or is not yet complete.
4239func (iter AzureFirewallFqdnTagListResultIterator) NotDone() bool {
4240	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4241}
4242
4243// Response returns the raw server response from the last page request.
4244func (iter AzureFirewallFqdnTagListResultIterator) Response() AzureFirewallFqdnTagListResult {
4245	return iter.page.Response()
4246}
4247
4248// Value returns the current value or a zero-initialized value if the
4249// iterator has advanced beyond the end of the collection.
4250func (iter AzureFirewallFqdnTagListResultIterator) Value() AzureFirewallFqdnTag {
4251	if !iter.page.NotDone() {
4252		return AzureFirewallFqdnTag{}
4253	}
4254	return iter.page.Values()[iter.i]
4255}
4256
4257// Creates a new instance of the AzureFirewallFqdnTagListResultIterator type.
4258func NewAzureFirewallFqdnTagListResultIterator(page AzureFirewallFqdnTagListResultPage) AzureFirewallFqdnTagListResultIterator {
4259	return AzureFirewallFqdnTagListResultIterator{page: page}
4260}
4261
4262// IsEmpty returns true if the ListResult contains no values.
4263func (afftlr AzureFirewallFqdnTagListResult) IsEmpty() bool {
4264	return afftlr.Value == nil || len(*afftlr.Value) == 0
4265}
4266
4267// hasNextLink returns true if the NextLink is not empty.
4268func (afftlr AzureFirewallFqdnTagListResult) hasNextLink() bool {
4269	return afftlr.NextLink != nil && len(*afftlr.NextLink) != 0
4270}
4271
4272// azureFirewallFqdnTagListResultPreparer prepares a request to retrieve the next set of results.
4273// It returns nil if no more results exist.
4274func (afftlr AzureFirewallFqdnTagListResult) azureFirewallFqdnTagListResultPreparer(ctx context.Context) (*http.Request, error) {
4275	if !afftlr.hasNextLink() {
4276		return nil, nil
4277	}
4278	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4279		autorest.AsJSON(),
4280		autorest.AsGet(),
4281		autorest.WithBaseURL(to.String(afftlr.NextLink)))
4282}
4283
4284// AzureFirewallFqdnTagListResultPage contains a page of AzureFirewallFqdnTag values.
4285type AzureFirewallFqdnTagListResultPage struct {
4286	fn     func(context.Context, AzureFirewallFqdnTagListResult) (AzureFirewallFqdnTagListResult, error)
4287	afftlr AzureFirewallFqdnTagListResult
4288}
4289
4290// NextWithContext advances to the next page of values.  If there was an error making
4291// the request the page does not advance and the error is returned.
4292func (page *AzureFirewallFqdnTagListResultPage) NextWithContext(ctx context.Context) (err error) {
4293	if tracing.IsEnabled() {
4294		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallFqdnTagListResultPage.NextWithContext")
4295		defer func() {
4296			sc := -1
4297			if page.Response().Response.Response != nil {
4298				sc = page.Response().Response.Response.StatusCode
4299			}
4300			tracing.EndSpan(ctx, sc, err)
4301		}()
4302	}
4303	for {
4304		next, err := page.fn(ctx, page.afftlr)
4305		if err != nil {
4306			return err
4307		}
4308		page.afftlr = next
4309		if !next.hasNextLink() || !next.IsEmpty() {
4310			break
4311		}
4312	}
4313	return nil
4314}
4315
4316// Next advances to the next page of values.  If there was an error making
4317// the request the page does not advance and the error is returned.
4318// Deprecated: Use NextWithContext() instead.
4319func (page *AzureFirewallFqdnTagListResultPage) Next() error {
4320	return page.NextWithContext(context.Background())
4321}
4322
4323// NotDone returns true if the page enumeration should be started or is not yet complete.
4324func (page AzureFirewallFqdnTagListResultPage) NotDone() bool {
4325	return !page.afftlr.IsEmpty()
4326}
4327
4328// Response returns the raw server response from the last page request.
4329func (page AzureFirewallFqdnTagListResultPage) Response() AzureFirewallFqdnTagListResult {
4330	return page.afftlr
4331}
4332
4333// Values returns the slice of values for the current page or nil if there are no values.
4334func (page AzureFirewallFqdnTagListResultPage) Values() []AzureFirewallFqdnTag {
4335	if page.afftlr.IsEmpty() {
4336		return nil
4337	}
4338	return *page.afftlr.Value
4339}
4340
4341// Creates a new instance of the AzureFirewallFqdnTagListResultPage type.
4342func NewAzureFirewallFqdnTagListResultPage(cur AzureFirewallFqdnTagListResult, getNextPage func(context.Context, AzureFirewallFqdnTagListResult) (AzureFirewallFqdnTagListResult, error)) AzureFirewallFqdnTagListResultPage {
4343	return AzureFirewallFqdnTagListResultPage{
4344		fn:     getNextPage,
4345		afftlr: cur,
4346	}
4347}
4348
4349// AzureFirewallFqdnTagPropertiesFormat azure Firewall FQDN Tag Properties
4350type AzureFirewallFqdnTagPropertiesFormat struct {
4351	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
4352	ProvisioningState *string `json:"provisioningState,omitempty"`
4353	// FqdnTagName - READ-ONLY; The name of this FQDN Tag.
4354	FqdnTagName *string `json:"fqdnTagName,omitempty"`
4355}
4356
4357// MarshalJSON is the custom marshaler for AzureFirewallFqdnTagPropertiesFormat.
4358func (afftpf AzureFirewallFqdnTagPropertiesFormat) MarshalJSON() ([]byte, error) {
4359	objectMap := make(map[string]interface{})
4360	return json.Marshal(objectMap)
4361}
4362
4363// AzureFirewallIPConfiguration IP configuration of an Azure Firewall.
4364type AzureFirewallIPConfiguration struct {
4365	*AzureFirewallIPConfigurationPropertiesFormat `json:"properties,omitempty"`
4366	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
4367	Name *string `json:"name,omitempty"`
4368	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
4369	Etag *string `json:"etag,omitempty"`
4370	// ID - Resource ID.
4371	ID *string `json:"id,omitempty"`
4372}
4373
4374// MarshalJSON is the custom marshaler for AzureFirewallIPConfiguration.
4375func (afic AzureFirewallIPConfiguration) MarshalJSON() ([]byte, error) {
4376	objectMap := make(map[string]interface{})
4377	if afic.AzureFirewallIPConfigurationPropertiesFormat != nil {
4378		objectMap["properties"] = afic.AzureFirewallIPConfigurationPropertiesFormat
4379	}
4380	if afic.Name != nil {
4381		objectMap["name"] = afic.Name
4382	}
4383	if afic.ID != nil {
4384		objectMap["id"] = afic.ID
4385	}
4386	return json.Marshal(objectMap)
4387}
4388
4389// UnmarshalJSON is the custom unmarshaler for AzureFirewallIPConfiguration struct.
4390func (afic *AzureFirewallIPConfiguration) UnmarshalJSON(body []byte) error {
4391	var m map[string]*json.RawMessage
4392	err := json.Unmarshal(body, &m)
4393	if err != nil {
4394		return err
4395	}
4396	for k, v := range m {
4397		switch k {
4398		case "properties":
4399			if v != nil {
4400				var azureFirewallIPConfigurationPropertiesFormat AzureFirewallIPConfigurationPropertiesFormat
4401				err = json.Unmarshal(*v, &azureFirewallIPConfigurationPropertiesFormat)
4402				if err != nil {
4403					return err
4404				}
4405				afic.AzureFirewallIPConfigurationPropertiesFormat = &azureFirewallIPConfigurationPropertiesFormat
4406			}
4407		case "name":
4408			if v != nil {
4409				var name string
4410				err = json.Unmarshal(*v, &name)
4411				if err != nil {
4412					return err
4413				}
4414				afic.Name = &name
4415			}
4416		case "etag":
4417			if v != nil {
4418				var etag string
4419				err = json.Unmarshal(*v, &etag)
4420				if err != nil {
4421					return err
4422				}
4423				afic.Etag = &etag
4424			}
4425		case "id":
4426			if v != nil {
4427				var ID string
4428				err = json.Unmarshal(*v, &ID)
4429				if err != nil {
4430					return err
4431				}
4432				afic.ID = &ID
4433			}
4434		}
4435	}
4436
4437	return nil
4438}
4439
4440// AzureFirewallIPConfigurationPropertiesFormat properties of IP configuration of an Azure Firewall.
4441type AzureFirewallIPConfigurationPropertiesFormat struct {
4442	// PrivateIPAddress - READ-ONLY; The Firewall Internal Load Balancer IP to be used as the next hop in User Defined Routes.
4443	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
4444	// Subnet - Reference of the subnet resource. This resource must be named 'AzureFirewallSubnet'.
4445	Subnet *SubResource `json:"subnet,omitempty"`
4446	// PublicIPAddress - Reference of the PublicIP resource. This field is a mandatory input if subnet is not null.
4447	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
4448	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
4449	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
4450}
4451
4452// MarshalJSON is the custom marshaler for AzureFirewallIPConfigurationPropertiesFormat.
4453func (aficpf AzureFirewallIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
4454	objectMap := make(map[string]interface{})
4455	if aficpf.Subnet != nil {
4456		objectMap["subnet"] = aficpf.Subnet
4457	}
4458	if aficpf.PublicIPAddress != nil {
4459		objectMap["publicIPAddress"] = aficpf.PublicIPAddress
4460	}
4461	if aficpf.ProvisioningState != "" {
4462		objectMap["provisioningState"] = aficpf.ProvisioningState
4463	}
4464	return json.Marshal(objectMap)
4465}
4466
4467// AzureFirewallListResult response for ListAzureFirewalls API service call.
4468type AzureFirewallListResult struct {
4469	autorest.Response `json:"-"`
4470	// Value - List of Azure Firewalls in a resource group.
4471	Value *[]AzureFirewall `json:"value,omitempty"`
4472	// NextLink - URL to get the next set of results.
4473	NextLink *string `json:"nextLink,omitempty"`
4474}
4475
4476// AzureFirewallListResultIterator provides access to a complete listing of AzureFirewall values.
4477type AzureFirewallListResultIterator struct {
4478	i    int
4479	page AzureFirewallListResultPage
4480}
4481
4482// NextWithContext advances to the next value.  If there was an error making
4483// the request the iterator does not advance and the error is returned.
4484func (iter *AzureFirewallListResultIterator) NextWithContext(ctx context.Context) (err error) {
4485	if tracing.IsEnabled() {
4486		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallListResultIterator.NextWithContext")
4487		defer func() {
4488			sc := -1
4489			if iter.Response().Response.Response != nil {
4490				sc = iter.Response().Response.Response.StatusCode
4491			}
4492			tracing.EndSpan(ctx, sc, err)
4493		}()
4494	}
4495	iter.i++
4496	if iter.i < len(iter.page.Values()) {
4497		return nil
4498	}
4499	err = iter.page.NextWithContext(ctx)
4500	if err != nil {
4501		iter.i--
4502		return err
4503	}
4504	iter.i = 0
4505	return nil
4506}
4507
4508// Next advances to the next value.  If there was an error making
4509// the request the iterator does not advance and the error is returned.
4510// Deprecated: Use NextWithContext() instead.
4511func (iter *AzureFirewallListResultIterator) Next() error {
4512	return iter.NextWithContext(context.Background())
4513}
4514
4515// NotDone returns true if the enumeration should be started or is not yet complete.
4516func (iter AzureFirewallListResultIterator) NotDone() bool {
4517	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4518}
4519
4520// Response returns the raw server response from the last page request.
4521func (iter AzureFirewallListResultIterator) Response() AzureFirewallListResult {
4522	return iter.page.Response()
4523}
4524
4525// Value returns the current value or a zero-initialized value if the
4526// iterator has advanced beyond the end of the collection.
4527func (iter AzureFirewallListResultIterator) Value() AzureFirewall {
4528	if !iter.page.NotDone() {
4529		return AzureFirewall{}
4530	}
4531	return iter.page.Values()[iter.i]
4532}
4533
4534// Creates a new instance of the AzureFirewallListResultIterator type.
4535func NewAzureFirewallListResultIterator(page AzureFirewallListResultPage) AzureFirewallListResultIterator {
4536	return AzureFirewallListResultIterator{page: page}
4537}
4538
4539// IsEmpty returns true if the ListResult contains no values.
4540func (aflr AzureFirewallListResult) IsEmpty() bool {
4541	return aflr.Value == nil || len(*aflr.Value) == 0
4542}
4543
4544// hasNextLink returns true if the NextLink is not empty.
4545func (aflr AzureFirewallListResult) hasNextLink() bool {
4546	return aflr.NextLink != nil && len(*aflr.NextLink) != 0
4547}
4548
4549// azureFirewallListResultPreparer prepares a request to retrieve the next set of results.
4550// It returns nil if no more results exist.
4551func (aflr AzureFirewallListResult) azureFirewallListResultPreparer(ctx context.Context) (*http.Request, error) {
4552	if !aflr.hasNextLink() {
4553		return nil, nil
4554	}
4555	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4556		autorest.AsJSON(),
4557		autorest.AsGet(),
4558		autorest.WithBaseURL(to.String(aflr.NextLink)))
4559}
4560
4561// AzureFirewallListResultPage contains a page of AzureFirewall values.
4562type AzureFirewallListResultPage struct {
4563	fn   func(context.Context, AzureFirewallListResult) (AzureFirewallListResult, error)
4564	aflr AzureFirewallListResult
4565}
4566
4567// NextWithContext advances to the next page of values.  If there was an error making
4568// the request the page does not advance and the error is returned.
4569func (page *AzureFirewallListResultPage) NextWithContext(ctx context.Context) (err error) {
4570	if tracing.IsEnabled() {
4571		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallListResultPage.NextWithContext")
4572		defer func() {
4573			sc := -1
4574			if page.Response().Response.Response != nil {
4575				sc = page.Response().Response.Response.StatusCode
4576			}
4577			tracing.EndSpan(ctx, sc, err)
4578		}()
4579	}
4580	for {
4581		next, err := page.fn(ctx, page.aflr)
4582		if err != nil {
4583			return err
4584		}
4585		page.aflr = next
4586		if !next.hasNextLink() || !next.IsEmpty() {
4587			break
4588		}
4589	}
4590	return nil
4591}
4592
4593// Next advances to the next page of values.  If there was an error making
4594// the request the page does not advance and the error is returned.
4595// Deprecated: Use NextWithContext() instead.
4596func (page *AzureFirewallListResultPage) Next() error {
4597	return page.NextWithContext(context.Background())
4598}
4599
4600// NotDone returns true if the page enumeration should be started or is not yet complete.
4601func (page AzureFirewallListResultPage) NotDone() bool {
4602	return !page.aflr.IsEmpty()
4603}
4604
4605// Response returns the raw server response from the last page request.
4606func (page AzureFirewallListResultPage) Response() AzureFirewallListResult {
4607	return page.aflr
4608}
4609
4610// Values returns the slice of values for the current page or nil if there are no values.
4611func (page AzureFirewallListResultPage) Values() []AzureFirewall {
4612	if page.aflr.IsEmpty() {
4613		return nil
4614	}
4615	return *page.aflr.Value
4616}
4617
4618// Creates a new instance of the AzureFirewallListResultPage type.
4619func NewAzureFirewallListResultPage(cur AzureFirewallListResult, getNextPage func(context.Context, AzureFirewallListResult) (AzureFirewallListResult, error)) AzureFirewallListResultPage {
4620	return AzureFirewallListResultPage{
4621		fn:   getNextPage,
4622		aflr: cur,
4623	}
4624}
4625
4626// AzureFirewallNatRCAction azureFirewall NAT Rule Collection Action.
4627type AzureFirewallNatRCAction struct {
4628	// Type - The type of action. Possible values include: 'Snat', 'Dnat'
4629	Type AzureFirewallNatRCActionType `json:"type,omitempty"`
4630}
4631
4632// AzureFirewallNatRule properties of a NAT rule.
4633type AzureFirewallNatRule struct {
4634	// Name - Name of the NAT rule.
4635	Name *string `json:"name,omitempty"`
4636	// Description - Description of the rule.
4637	Description *string `json:"description,omitempty"`
4638	// SourceAddresses - List of source IP addresses for this rule.
4639	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
4640	// DestinationAddresses - List of destination IP addresses for this rule.
4641	DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
4642	// DestinationPorts - List of destination ports.
4643	DestinationPorts *[]string `json:"destinationPorts,omitempty"`
4644	// Protocols - Array of AzureFirewallNetworkRuleProtocols applicable to this NAT rule.
4645	Protocols *[]AzureFirewallNetworkRuleProtocol `json:"protocols,omitempty"`
4646	// TranslatedAddress - The translated address for this NAT rule.
4647	TranslatedAddress *string `json:"translatedAddress,omitempty"`
4648	// TranslatedPort - The translated port for this NAT rule.
4649	TranslatedPort *string `json:"translatedPort,omitempty"`
4650}
4651
4652// AzureFirewallNatRuleCollection NAT rule collection resource
4653type AzureFirewallNatRuleCollection struct {
4654	*AzureFirewallNatRuleCollectionProperties `json:"properties,omitempty"`
4655	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
4656	Name *string `json:"name,omitempty"`
4657	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
4658	Etag *string `json:"etag,omitempty"`
4659	// ID - Resource ID.
4660	ID *string `json:"id,omitempty"`
4661}
4662
4663// MarshalJSON is the custom marshaler for AzureFirewallNatRuleCollection.
4664func (afnrc AzureFirewallNatRuleCollection) MarshalJSON() ([]byte, error) {
4665	objectMap := make(map[string]interface{})
4666	if afnrc.AzureFirewallNatRuleCollectionProperties != nil {
4667		objectMap["properties"] = afnrc.AzureFirewallNatRuleCollectionProperties
4668	}
4669	if afnrc.Name != nil {
4670		objectMap["name"] = afnrc.Name
4671	}
4672	if afnrc.ID != nil {
4673		objectMap["id"] = afnrc.ID
4674	}
4675	return json.Marshal(objectMap)
4676}
4677
4678// UnmarshalJSON is the custom unmarshaler for AzureFirewallNatRuleCollection struct.
4679func (afnrc *AzureFirewallNatRuleCollection) UnmarshalJSON(body []byte) error {
4680	var m map[string]*json.RawMessage
4681	err := json.Unmarshal(body, &m)
4682	if err != nil {
4683		return err
4684	}
4685	for k, v := range m {
4686		switch k {
4687		case "properties":
4688			if v != nil {
4689				var azureFirewallNatRuleCollectionProperties AzureFirewallNatRuleCollectionProperties
4690				err = json.Unmarshal(*v, &azureFirewallNatRuleCollectionProperties)
4691				if err != nil {
4692					return err
4693				}
4694				afnrc.AzureFirewallNatRuleCollectionProperties = &azureFirewallNatRuleCollectionProperties
4695			}
4696		case "name":
4697			if v != nil {
4698				var name string
4699				err = json.Unmarshal(*v, &name)
4700				if err != nil {
4701					return err
4702				}
4703				afnrc.Name = &name
4704			}
4705		case "etag":
4706			if v != nil {
4707				var etag string
4708				err = json.Unmarshal(*v, &etag)
4709				if err != nil {
4710					return err
4711				}
4712				afnrc.Etag = &etag
4713			}
4714		case "id":
4715			if v != nil {
4716				var ID string
4717				err = json.Unmarshal(*v, &ID)
4718				if err != nil {
4719					return err
4720				}
4721				afnrc.ID = &ID
4722			}
4723		}
4724	}
4725
4726	return nil
4727}
4728
4729// AzureFirewallNatRuleCollectionProperties properties of the NAT rule collection.
4730type AzureFirewallNatRuleCollectionProperties struct {
4731	// Priority - Priority of the NAT rule collection resource.
4732	Priority *int32 `json:"priority,omitempty"`
4733	// Action - The action type of a NAT rule collection
4734	Action *AzureFirewallNatRCAction `json:"action,omitempty"`
4735	// Rules - Collection of rules used by a NAT rule collection.
4736	Rules *[]AzureFirewallNatRule `json:"rules,omitempty"`
4737	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
4738	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
4739}
4740
4741// AzureFirewallNetworkRule properties of the network rule.
4742type AzureFirewallNetworkRule struct {
4743	// Name - Name of the network rule.
4744	Name *string `json:"name,omitempty"`
4745	// Description - Description of the rule.
4746	Description *string `json:"description,omitempty"`
4747	// Protocols - Array of AzureFirewallNetworkRuleProtocols.
4748	Protocols *[]AzureFirewallNetworkRuleProtocol `json:"protocols,omitempty"`
4749	// SourceAddresses - List of source IP addresses for this rule.
4750	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
4751	// DestinationAddresses - List of destination IP addresses.
4752	DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
4753	// DestinationPorts - List of destination ports.
4754	DestinationPorts *[]string `json:"destinationPorts,omitempty"`
4755}
4756
4757// AzureFirewallNetworkRuleCollection network rule collection resource
4758type AzureFirewallNetworkRuleCollection struct {
4759	*AzureFirewallNetworkRuleCollectionPropertiesFormat `json:"properties,omitempty"`
4760	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
4761	Name *string `json:"name,omitempty"`
4762	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
4763	Etag *string `json:"etag,omitempty"`
4764	// ID - Resource ID.
4765	ID *string `json:"id,omitempty"`
4766}
4767
4768// MarshalJSON is the custom marshaler for AzureFirewallNetworkRuleCollection.
4769func (afnrc AzureFirewallNetworkRuleCollection) MarshalJSON() ([]byte, error) {
4770	objectMap := make(map[string]interface{})
4771	if afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat != nil {
4772		objectMap["properties"] = afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat
4773	}
4774	if afnrc.Name != nil {
4775		objectMap["name"] = afnrc.Name
4776	}
4777	if afnrc.ID != nil {
4778		objectMap["id"] = afnrc.ID
4779	}
4780	return json.Marshal(objectMap)
4781}
4782
4783// UnmarshalJSON is the custom unmarshaler for AzureFirewallNetworkRuleCollection struct.
4784func (afnrc *AzureFirewallNetworkRuleCollection) UnmarshalJSON(body []byte) error {
4785	var m map[string]*json.RawMessage
4786	err := json.Unmarshal(body, &m)
4787	if err != nil {
4788		return err
4789	}
4790	for k, v := range m {
4791		switch k {
4792		case "properties":
4793			if v != nil {
4794				var azureFirewallNetworkRuleCollectionPropertiesFormat AzureFirewallNetworkRuleCollectionPropertiesFormat
4795				err = json.Unmarshal(*v, &azureFirewallNetworkRuleCollectionPropertiesFormat)
4796				if err != nil {
4797					return err
4798				}
4799				afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat = &azureFirewallNetworkRuleCollectionPropertiesFormat
4800			}
4801		case "name":
4802			if v != nil {
4803				var name string
4804				err = json.Unmarshal(*v, &name)
4805				if err != nil {
4806					return err
4807				}
4808				afnrc.Name = &name
4809			}
4810		case "etag":
4811			if v != nil {
4812				var etag string
4813				err = json.Unmarshal(*v, &etag)
4814				if err != nil {
4815					return err
4816				}
4817				afnrc.Etag = &etag
4818			}
4819		case "id":
4820			if v != nil {
4821				var ID string
4822				err = json.Unmarshal(*v, &ID)
4823				if err != nil {
4824					return err
4825				}
4826				afnrc.ID = &ID
4827			}
4828		}
4829	}
4830
4831	return nil
4832}
4833
4834// AzureFirewallNetworkRuleCollectionPropertiesFormat properties of the network rule collection.
4835type AzureFirewallNetworkRuleCollectionPropertiesFormat struct {
4836	// Priority - Priority of the network rule collection resource.
4837	Priority *int32 `json:"priority,omitempty"`
4838	// Action - The action type of a rule collection
4839	Action *AzureFirewallRCAction `json:"action,omitempty"`
4840	// Rules - Collection of rules used by a network rule collection.
4841	Rules *[]AzureFirewallNetworkRule `json:"rules,omitempty"`
4842	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
4843	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
4844}
4845
4846// AzureFirewallPropertiesFormat properties of the Azure Firewall.
4847type AzureFirewallPropertiesFormat struct {
4848	// ApplicationRuleCollections - Collection of application rule collections used by Azure Firewall.
4849	ApplicationRuleCollections *[]AzureFirewallApplicationRuleCollection `json:"applicationRuleCollections,omitempty"`
4850	// NatRuleCollections - Collection of NAT rule collections used by Azure Firewall.
4851	NatRuleCollections *[]AzureFirewallNatRuleCollection `json:"natRuleCollections,omitempty"`
4852	// NetworkRuleCollections - Collection of network rule collections used by Azure Firewall.
4853	NetworkRuleCollections *[]AzureFirewallNetworkRuleCollection `json:"networkRuleCollections,omitempty"`
4854	// IPConfigurations - IP configuration of the Azure Firewall resource.
4855	IPConfigurations *[]AzureFirewallIPConfiguration `json:"ipConfigurations,omitempty"`
4856	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
4857	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
4858}
4859
4860// AzureFirewallRCAction properties of the AzureFirewallRCAction.
4861type AzureFirewallRCAction struct {
4862	// Type - The type of action. Possible values include: 'AzureFirewallRCActionTypeAllow', 'AzureFirewallRCActionTypeDeny'
4863	Type AzureFirewallRCActionType `json:"type,omitempty"`
4864}
4865
4866// AzureFirewallsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
4867// long-running operation.
4868type AzureFirewallsCreateOrUpdateFuture struct {
4869	azure.FutureAPI
4870	// Result returns the result of the asynchronous operation.
4871	// If the operation has not completed it will return an error.
4872	Result func(AzureFirewallsClient) (AzureFirewall, error)
4873}
4874
4875// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4876func (future *AzureFirewallsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
4877	var azFuture azure.Future
4878	if err := json.Unmarshal(body, &azFuture); err != nil {
4879		return err
4880	}
4881	future.FutureAPI = &azFuture
4882	future.Result = future.result
4883	return nil
4884}
4885
4886// result is the default implementation for AzureFirewallsCreateOrUpdateFuture.Result.
4887func (future *AzureFirewallsCreateOrUpdateFuture) result(client AzureFirewallsClient) (af AzureFirewall, err error) {
4888	var done bool
4889	done, err = future.DoneWithContext(context.Background(), client)
4890	if err != nil {
4891		err = autorest.NewErrorWithError(err, "network.AzureFirewallsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
4892		return
4893	}
4894	if !done {
4895		af.Response.Response = future.Response()
4896		err = azure.NewAsyncOpIncompleteError("network.AzureFirewallsCreateOrUpdateFuture")
4897		return
4898	}
4899	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
4900	if af.Response.Response, err = future.GetResult(sender); err == nil && af.Response.Response.StatusCode != http.StatusNoContent {
4901		af, err = client.CreateOrUpdateResponder(af.Response.Response)
4902		if err != nil {
4903			err = autorest.NewErrorWithError(err, "network.AzureFirewallsCreateOrUpdateFuture", "Result", af.Response.Response, "Failure responding to request")
4904		}
4905	}
4906	return
4907}
4908
4909// AzureFirewallsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
4910// operation.
4911type AzureFirewallsDeleteFuture struct {
4912	azure.FutureAPI
4913	// Result returns the result of the asynchronous operation.
4914	// If the operation has not completed it will return an error.
4915	Result func(AzureFirewallsClient) (autorest.Response, error)
4916}
4917
4918// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4919func (future *AzureFirewallsDeleteFuture) UnmarshalJSON(body []byte) error {
4920	var azFuture azure.Future
4921	if err := json.Unmarshal(body, &azFuture); err != nil {
4922		return err
4923	}
4924	future.FutureAPI = &azFuture
4925	future.Result = future.result
4926	return nil
4927}
4928
4929// result is the default implementation for AzureFirewallsDeleteFuture.Result.
4930func (future *AzureFirewallsDeleteFuture) result(client AzureFirewallsClient) (ar autorest.Response, err error) {
4931	var done bool
4932	done, err = future.DoneWithContext(context.Background(), client)
4933	if err != nil {
4934		err = autorest.NewErrorWithError(err, "network.AzureFirewallsDeleteFuture", "Result", future.Response(), "Polling failure")
4935		return
4936	}
4937	if !done {
4938		ar.Response = future.Response()
4939		err = azure.NewAsyncOpIncompleteError("network.AzureFirewallsDeleteFuture")
4940		return
4941	}
4942	ar.Response = future.Response()
4943	return
4944}
4945
4946// AzureReachabilityReport azure reachability report details.
4947type AzureReachabilityReport struct {
4948	autorest.Response `json:"-"`
4949	// AggregationLevel - The aggregation level of Azure reachability report. Can be Country, State or City.
4950	AggregationLevel *string                          `json:"aggregationLevel,omitempty"`
4951	ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"`
4952	// ReachabilityReport - List of Azure reachability report items.
4953	ReachabilityReport *[]AzureReachabilityReportItem `json:"reachabilityReport,omitempty"`
4954}
4955
4956// AzureReachabilityReportItem azure reachability report details for a given provider location.
4957type AzureReachabilityReportItem struct {
4958	// Provider - The Internet service provider.
4959	Provider *string `json:"provider,omitempty"`
4960	// AzureLocation - The Azure region.
4961	AzureLocation *string `json:"azureLocation,omitempty"`
4962	// Latencies - List of latency details for each of the time series.
4963	Latencies *[]AzureReachabilityReportLatencyInfo `json:"latencies,omitempty"`
4964}
4965
4966// AzureReachabilityReportLatencyInfo details on latency for a time series.
4967type AzureReachabilityReportLatencyInfo struct {
4968	// TimeStamp - The time stamp.
4969	TimeStamp *date.Time `json:"timeStamp,omitempty"`
4970	// Score - The relative latency score between 1 and 100, higher values indicating a faster connection.
4971	Score *int32 `json:"score,omitempty"`
4972}
4973
4974// AzureReachabilityReportLocation parameters that define a geographic location.
4975type AzureReachabilityReportLocation struct {
4976	// Country - The name of the country.
4977	Country *string `json:"country,omitempty"`
4978	// State - The name of the state.
4979	State *string `json:"state,omitempty"`
4980	// City - The name of the city or town.
4981	City *string `json:"city,omitempty"`
4982}
4983
4984// AzureReachabilityReportParameters geographic and time constraints for Azure reachability report.
4985type AzureReachabilityReportParameters struct {
4986	ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"`
4987	// Providers - List of Internet service providers.
4988	Providers *[]string `json:"providers,omitempty"`
4989	// AzureLocations - Optional Azure regions to scope the query to.
4990	AzureLocations *[]string `json:"azureLocations,omitempty"`
4991	// StartTime - The start time for the Azure reachability report.
4992	StartTime *date.Time `json:"startTime,omitempty"`
4993	// EndTime - The end time for the Azure reachability report.
4994	EndTime *date.Time `json:"endTime,omitempty"`
4995}
4996
4997// BackendAddressPool pool of backend IP addresses.
4998type BackendAddressPool struct {
4999	autorest.Response `json:"-"`
5000	// BackendAddressPoolPropertiesFormat - Properties of load balancer backend address pool.
5001	*BackendAddressPoolPropertiesFormat `json:"properties,omitempty"`
5002	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
5003	Name *string `json:"name,omitempty"`
5004	// Etag - A unique read-only string that changes whenever the resource is updated.
5005	Etag *string `json:"etag,omitempty"`
5006	// ID - Resource ID.
5007	ID *string `json:"id,omitempty"`
5008}
5009
5010// MarshalJSON is the custom marshaler for BackendAddressPool.
5011func (bap BackendAddressPool) MarshalJSON() ([]byte, error) {
5012	objectMap := make(map[string]interface{})
5013	if bap.BackendAddressPoolPropertiesFormat != nil {
5014		objectMap["properties"] = bap.BackendAddressPoolPropertiesFormat
5015	}
5016	if bap.Name != nil {
5017		objectMap["name"] = bap.Name
5018	}
5019	if bap.Etag != nil {
5020		objectMap["etag"] = bap.Etag
5021	}
5022	if bap.ID != nil {
5023		objectMap["id"] = bap.ID
5024	}
5025	return json.Marshal(objectMap)
5026}
5027
5028// UnmarshalJSON is the custom unmarshaler for BackendAddressPool struct.
5029func (bap *BackendAddressPool) UnmarshalJSON(body []byte) error {
5030	var m map[string]*json.RawMessage
5031	err := json.Unmarshal(body, &m)
5032	if err != nil {
5033		return err
5034	}
5035	for k, v := range m {
5036		switch k {
5037		case "properties":
5038			if v != nil {
5039				var backendAddressPoolPropertiesFormat BackendAddressPoolPropertiesFormat
5040				err = json.Unmarshal(*v, &backendAddressPoolPropertiesFormat)
5041				if err != nil {
5042					return err
5043				}
5044				bap.BackendAddressPoolPropertiesFormat = &backendAddressPoolPropertiesFormat
5045			}
5046		case "name":
5047			if v != nil {
5048				var name string
5049				err = json.Unmarshal(*v, &name)
5050				if err != nil {
5051					return err
5052				}
5053				bap.Name = &name
5054			}
5055		case "etag":
5056			if v != nil {
5057				var etag string
5058				err = json.Unmarshal(*v, &etag)
5059				if err != nil {
5060					return err
5061				}
5062				bap.Etag = &etag
5063			}
5064		case "id":
5065			if v != nil {
5066				var ID string
5067				err = json.Unmarshal(*v, &ID)
5068				if err != nil {
5069					return err
5070				}
5071				bap.ID = &ID
5072			}
5073		}
5074	}
5075
5076	return nil
5077}
5078
5079// BackendAddressPoolPropertiesFormat properties of the backend address pool.
5080type BackendAddressPoolPropertiesFormat struct {
5081	// BackendIPConfigurations - READ-ONLY; Gets collection of references to IP addresses defined in network interfaces.
5082	BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"`
5083	// LoadBalancingRules - READ-ONLY; Gets load balancing rules that use this backend address pool.
5084	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
5085	// OutboundRule - READ-ONLY; Gets outbound rules that use this backend address pool.
5086	OutboundRule *SubResource `json:"outboundRule,omitempty"`
5087	// OutboundRules - READ-ONLY; Gets outbound rules that use this backend address pool.
5088	OutboundRules *[]SubResource `json:"outboundRules,omitempty"`
5089	// ProvisioningState - Get provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
5090	ProvisioningState *string `json:"provisioningState,omitempty"`
5091}
5092
5093// MarshalJSON is the custom marshaler for BackendAddressPoolPropertiesFormat.
5094func (bappf BackendAddressPoolPropertiesFormat) MarshalJSON() ([]byte, error) {
5095	objectMap := make(map[string]interface{})
5096	if bappf.ProvisioningState != nil {
5097		objectMap["provisioningState"] = bappf.ProvisioningState
5098	}
5099	return json.Marshal(objectMap)
5100}
5101
5102// BGPCommunity contains bgp community information offered in Service Community resources.
5103type BGPCommunity struct {
5104	// ServiceSupportedRegion - The region which the service support. e.g. For O365, region is Global.
5105	ServiceSupportedRegion *string `json:"serviceSupportedRegion,omitempty"`
5106	// CommunityName - The name of the bgp community. e.g. Skype.
5107	CommunityName *string `json:"communityName,omitempty"`
5108	// CommunityValue - The value of the bgp community. For more information: https://docs.microsoft.com/en-us/azure/expressroute/expressroute-routing.
5109	CommunityValue *string `json:"communityValue,omitempty"`
5110	// CommunityPrefixes - The prefixes that the bgp community contains.
5111	CommunityPrefixes *[]string `json:"communityPrefixes,omitempty"`
5112	// IsAuthorizedToUse - Customer is authorized to use bgp community or not.
5113	IsAuthorizedToUse *bool `json:"isAuthorizedToUse,omitempty"`
5114	// ServiceGroup - The service group of the bgp community contains.
5115	ServiceGroup *string `json:"serviceGroup,omitempty"`
5116}
5117
5118// BgpPeerStatus BGP peer status details
5119type BgpPeerStatus struct {
5120	// LocalAddress - READ-ONLY; The virtual network gateway's local address
5121	LocalAddress *string `json:"localAddress,omitempty"`
5122	// Neighbor - READ-ONLY; The remote BGP peer
5123	Neighbor *string `json:"neighbor,omitempty"`
5124	// Asn - READ-ONLY; The autonomous system number of the remote BGP peer
5125	Asn *int32 `json:"asn,omitempty"`
5126	// State - READ-ONLY; The BGP peer state. Possible values include: 'BgpPeerStateUnknown', 'BgpPeerStateStopped', 'BgpPeerStateIdle', 'BgpPeerStateConnecting', 'BgpPeerStateConnected'
5127	State BgpPeerState `json:"state,omitempty"`
5128	// ConnectedDuration - READ-ONLY; For how long the peering has been up
5129	ConnectedDuration *string `json:"connectedDuration,omitempty"`
5130	// RoutesReceived - READ-ONLY; The number of routes learned from this peer
5131	RoutesReceived *int64 `json:"routesReceived,omitempty"`
5132	// MessagesSent - READ-ONLY; The number of BGP messages sent
5133	MessagesSent *int64 `json:"messagesSent,omitempty"`
5134	// MessagesReceived - READ-ONLY; The number of BGP messages received
5135	MessagesReceived *int64 `json:"messagesReceived,omitempty"`
5136}
5137
5138// MarshalJSON is the custom marshaler for BgpPeerStatus.
5139func (bps BgpPeerStatus) MarshalJSON() ([]byte, error) {
5140	objectMap := make(map[string]interface{})
5141	return json.Marshal(objectMap)
5142}
5143
5144// BgpPeerStatusListResult response for list BGP peer status API service call
5145type BgpPeerStatusListResult struct {
5146	autorest.Response `json:"-"`
5147	// Value - List of BGP peers
5148	Value *[]BgpPeerStatus `json:"value,omitempty"`
5149}
5150
5151// BgpServiceCommunity service Community Properties.
5152type BgpServiceCommunity struct {
5153	*BgpServiceCommunityPropertiesFormat `json:"properties,omitempty"`
5154	// ID - Resource ID.
5155	ID *string `json:"id,omitempty"`
5156	// Name - READ-ONLY; Resource name.
5157	Name *string `json:"name,omitempty"`
5158	// Type - READ-ONLY; Resource type.
5159	Type *string `json:"type,omitempty"`
5160	// Location - Resource location.
5161	Location *string `json:"location,omitempty"`
5162	// Tags - Resource tags.
5163	Tags map[string]*string `json:"tags"`
5164}
5165
5166// MarshalJSON is the custom marshaler for BgpServiceCommunity.
5167func (bsc BgpServiceCommunity) MarshalJSON() ([]byte, error) {
5168	objectMap := make(map[string]interface{})
5169	if bsc.BgpServiceCommunityPropertiesFormat != nil {
5170		objectMap["properties"] = bsc.BgpServiceCommunityPropertiesFormat
5171	}
5172	if bsc.ID != nil {
5173		objectMap["id"] = bsc.ID
5174	}
5175	if bsc.Location != nil {
5176		objectMap["location"] = bsc.Location
5177	}
5178	if bsc.Tags != nil {
5179		objectMap["tags"] = bsc.Tags
5180	}
5181	return json.Marshal(objectMap)
5182}
5183
5184// UnmarshalJSON is the custom unmarshaler for BgpServiceCommunity struct.
5185func (bsc *BgpServiceCommunity) UnmarshalJSON(body []byte) error {
5186	var m map[string]*json.RawMessage
5187	err := json.Unmarshal(body, &m)
5188	if err != nil {
5189		return err
5190	}
5191	for k, v := range m {
5192		switch k {
5193		case "properties":
5194			if v != nil {
5195				var bgpServiceCommunityPropertiesFormat BgpServiceCommunityPropertiesFormat
5196				err = json.Unmarshal(*v, &bgpServiceCommunityPropertiesFormat)
5197				if err != nil {
5198					return err
5199				}
5200				bsc.BgpServiceCommunityPropertiesFormat = &bgpServiceCommunityPropertiesFormat
5201			}
5202		case "id":
5203			if v != nil {
5204				var ID string
5205				err = json.Unmarshal(*v, &ID)
5206				if err != nil {
5207					return err
5208				}
5209				bsc.ID = &ID
5210			}
5211		case "name":
5212			if v != nil {
5213				var name string
5214				err = json.Unmarshal(*v, &name)
5215				if err != nil {
5216					return err
5217				}
5218				bsc.Name = &name
5219			}
5220		case "type":
5221			if v != nil {
5222				var typeVar string
5223				err = json.Unmarshal(*v, &typeVar)
5224				if err != nil {
5225					return err
5226				}
5227				bsc.Type = &typeVar
5228			}
5229		case "location":
5230			if v != nil {
5231				var location string
5232				err = json.Unmarshal(*v, &location)
5233				if err != nil {
5234					return err
5235				}
5236				bsc.Location = &location
5237			}
5238		case "tags":
5239			if v != nil {
5240				var tags map[string]*string
5241				err = json.Unmarshal(*v, &tags)
5242				if err != nil {
5243					return err
5244				}
5245				bsc.Tags = tags
5246			}
5247		}
5248	}
5249
5250	return nil
5251}
5252
5253// BgpServiceCommunityListResult response for the ListServiceCommunity API service call.
5254type BgpServiceCommunityListResult struct {
5255	autorest.Response `json:"-"`
5256	// Value - A list of service community resources.
5257	Value *[]BgpServiceCommunity `json:"value,omitempty"`
5258	// NextLink - The URL to get the next set of results.
5259	NextLink *string `json:"nextLink,omitempty"`
5260}
5261
5262// BgpServiceCommunityListResultIterator provides access to a complete listing of BgpServiceCommunity
5263// values.
5264type BgpServiceCommunityListResultIterator struct {
5265	i    int
5266	page BgpServiceCommunityListResultPage
5267}
5268
5269// NextWithContext advances to the next value.  If there was an error making
5270// the request the iterator does not advance and the error is returned.
5271func (iter *BgpServiceCommunityListResultIterator) NextWithContext(ctx context.Context) (err error) {
5272	if tracing.IsEnabled() {
5273		ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultIterator.NextWithContext")
5274		defer func() {
5275			sc := -1
5276			if iter.Response().Response.Response != nil {
5277				sc = iter.Response().Response.Response.StatusCode
5278			}
5279			tracing.EndSpan(ctx, sc, err)
5280		}()
5281	}
5282	iter.i++
5283	if iter.i < len(iter.page.Values()) {
5284		return nil
5285	}
5286	err = iter.page.NextWithContext(ctx)
5287	if err != nil {
5288		iter.i--
5289		return err
5290	}
5291	iter.i = 0
5292	return nil
5293}
5294
5295// Next advances to the next value.  If there was an error making
5296// the request the iterator does not advance and the error is returned.
5297// Deprecated: Use NextWithContext() instead.
5298func (iter *BgpServiceCommunityListResultIterator) Next() error {
5299	return iter.NextWithContext(context.Background())
5300}
5301
5302// NotDone returns true if the enumeration should be started or is not yet complete.
5303func (iter BgpServiceCommunityListResultIterator) NotDone() bool {
5304	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5305}
5306
5307// Response returns the raw server response from the last page request.
5308func (iter BgpServiceCommunityListResultIterator) Response() BgpServiceCommunityListResult {
5309	return iter.page.Response()
5310}
5311
5312// Value returns the current value or a zero-initialized value if the
5313// iterator has advanced beyond the end of the collection.
5314func (iter BgpServiceCommunityListResultIterator) Value() BgpServiceCommunity {
5315	if !iter.page.NotDone() {
5316		return BgpServiceCommunity{}
5317	}
5318	return iter.page.Values()[iter.i]
5319}
5320
5321// Creates a new instance of the BgpServiceCommunityListResultIterator type.
5322func NewBgpServiceCommunityListResultIterator(page BgpServiceCommunityListResultPage) BgpServiceCommunityListResultIterator {
5323	return BgpServiceCommunityListResultIterator{page: page}
5324}
5325
5326// IsEmpty returns true if the ListResult contains no values.
5327func (bsclr BgpServiceCommunityListResult) IsEmpty() bool {
5328	return bsclr.Value == nil || len(*bsclr.Value) == 0
5329}
5330
5331// hasNextLink returns true if the NextLink is not empty.
5332func (bsclr BgpServiceCommunityListResult) hasNextLink() bool {
5333	return bsclr.NextLink != nil && len(*bsclr.NextLink) != 0
5334}
5335
5336// bgpServiceCommunityListResultPreparer prepares a request to retrieve the next set of results.
5337// It returns nil if no more results exist.
5338func (bsclr BgpServiceCommunityListResult) bgpServiceCommunityListResultPreparer(ctx context.Context) (*http.Request, error) {
5339	if !bsclr.hasNextLink() {
5340		return nil, nil
5341	}
5342	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5343		autorest.AsJSON(),
5344		autorest.AsGet(),
5345		autorest.WithBaseURL(to.String(bsclr.NextLink)))
5346}
5347
5348// BgpServiceCommunityListResultPage contains a page of BgpServiceCommunity values.
5349type BgpServiceCommunityListResultPage struct {
5350	fn    func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)
5351	bsclr BgpServiceCommunityListResult
5352}
5353
5354// NextWithContext advances to the next page of values.  If there was an error making
5355// the request the page does not advance and the error is returned.
5356func (page *BgpServiceCommunityListResultPage) NextWithContext(ctx context.Context) (err error) {
5357	if tracing.IsEnabled() {
5358		ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultPage.NextWithContext")
5359		defer func() {
5360			sc := -1
5361			if page.Response().Response.Response != nil {
5362				sc = page.Response().Response.Response.StatusCode
5363			}
5364			tracing.EndSpan(ctx, sc, err)
5365		}()
5366	}
5367	for {
5368		next, err := page.fn(ctx, page.bsclr)
5369		if err != nil {
5370			return err
5371		}
5372		page.bsclr = next
5373		if !next.hasNextLink() || !next.IsEmpty() {
5374			break
5375		}
5376	}
5377	return nil
5378}
5379
5380// Next advances to the next page of values.  If there was an error making
5381// the request the page does not advance and the error is returned.
5382// Deprecated: Use NextWithContext() instead.
5383func (page *BgpServiceCommunityListResultPage) Next() error {
5384	return page.NextWithContext(context.Background())
5385}
5386
5387// NotDone returns true if the page enumeration should be started or is not yet complete.
5388func (page BgpServiceCommunityListResultPage) NotDone() bool {
5389	return !page.bsclr.IsEmpty()
5390}
5391
5392// Response returns the raw server response from the last page request.
5393func (page BgpServiceCommunityListResultPage) Response() BgpServiceCommunityListResult {
5394	return page.bsclr
5395}
5396
5397// Values returns the slice of values for the current page or nil if there are no values.
5398func (page BgpServiceCommunityListResultPage) Values() []BgpServiceCommunity {
5399	if page.bsclr.IsEmpty() {
5400		return nil
5401	}
5402	return *page.bsclr.Value
5403}
5404
5405// Creates a new instance of the BgpServiceCommunityListResultPage type.
5406func NewBgpServiceCommunityListResultPage(cur BgpServiceCommunityListResult, getNextPage func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)) BgpServiceCommunityListResultPage {
5407	return BgpServiceCommunityListResultPage{
5408		fn:    getNextPage,
5409		bsclr: cur,
5410	}
5411}
5412
5413// BgpServiceCommunityPropertiesFormat properties of Service Community.
5414type BgpServiceCommunityPropertiesFormat struct {
5415	// ServiceName - The name of the bgp community. e.g. Skype.
5416	ServiceName *string `json:"serviceName,omitempty"`
5417	// BgpCommunities - Get a list of bgp communities.
5418	BgpCommunities *[]BGPCommunity `json:"bgpCommunities,omitempty"`
5419}
5420
5421// BgpSettings BGP settings details
5422type BgpSettings struct {
5423	// Asn - The BGP speaker's ASN.
5424	Asn *int64 `json:"asn,omitempty"`
5425	// BgpPeeringAddress - The BGP peering address and BGP identifier of this BGP speaker.
5426	BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"`
5427	// PeerWeight - The weight added to routes learned from this BGP speaker.
5428	PeerWeight *int32 `json:"peerWeight,omitempty"`
5429}
5430
5431// CloudError an error response from the Batch service.
5432type CloudError struct {
5433	// Error - Cloud error body.
5434	Error *CloudErrorBody `json:"error,omitempty"`
5435}
5436
5437// CloudErrorBody an error response from the Batch service.
5438type CloudErrorBody struct {
5439	// Code - An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
5440	Code *string `json:"code,omitempty"`
5441	// Message - A message describing the error, intended to be suitable for display in a user interface.
5442	Message *string `json:"message,omitempty"`
5443	// Target - The target of the particular error. For example, the name of the property in error.
5444	Target *string `json:"target,omitempty"`
5445	// Details - A list of additional details about the error.
5446	Details *[]CloudErrorBody `json:"details,omitempty"`
5447}
5448
5449// ConfigurationDiagnosticParameters parameters to get network configuration diagnostic.
5450type ConfigurationDiagnosticParameters struct {
5451	// TargetResourceID - The ID of the target resource to perform network configuration diagnostic. Valid options are VM, NetworkInterface, VMSS/NetworkInterface and Application Gateway.
5452	TargetResourceID *string `json:"targetResourceId,omitempty"`
5453	// VerbosityLevel - Verbosity level. Accepted values are 'Normal', 'Minimum', 'Full'. Possible values include: 'Normal', 'Minimum', 'Full'
5454	VerbosityLevel VerbosityLevel `json:"verbosityLevel,omitempty"`
5455	// Profiles - List of network configuration diagnostic profiles.
5456	Profiles *[]ConfigurationDiagnosticProfile `json:"profiles,omitempty"`
5457}
5458
5459// ConfigurationDiagnosticProfile parameters to compare with network configuration.
5460type ConfigurationDiagnosticProfile struct {
5461	// Direction - The direction of the traffic. Accepted values are 'Inbound' and 'Outbound'. Possible values include: 'Inbound', 'Outbound'
5462	Direction Direction `json:"direction,omitempty"`
5463	// Protocol - Protocol to be verified on. Accepted values are '*', TCP, UDP.
5464	Protocol *string `json:"protocol,omitempty"`
5465	// Source - Traffic source. Accepted values are '*', IP Address/CIDR, Service Tag.
5466	Source *string `json:"source,omitempty"`
5467	// Destination - Traffic destination. Accepted values are: '*', IP Address/CIDR, Service Tag.
5468	Destination *string `json:"destination,omitempty"`
5469	// DestinationPort - Traffic destination port. Accepted values are '*', port (for example, 3389) and port range (for example, 80-100).
5470	DestinationPort *string `json:"destinationPort,omitempty"`
5471}
5472
5473// ConfigurationDiagnosticResponse results of network configuration diagnostic on the target resource.
5474type ConfigurationDiagnosticResponse struct {
5475	autorest.Response `json:"-"`
5476	// Results - READ-ONLY; List of network configuration diagnostic results.
5477	Results *[]ConfigurationDiagnosticResult `json:"results,omitempty"`
5478}
5479
5480// MarshalJSON is the custom marshaler for ConfigurationDiagnosticResponse.
5481func (cdr ConfigurationDiagnosticResponse) MarshalJSON() ([]byte, error) {
5482	objectMap := make(map[string]interface{})
5483	return json.Marshal(objectMap)
5484}
5485
5486// ConfigurationDiagnosticResult network configuration diagnostic result corresponded to provided traffic
5487// query.
5488type ConfigurationDiagnosticResult struct {
5489	Profile                    *ConfigurationDiagnosticProfile `json:"profile,omitempty"`
5490	NetworkSecurityGroupResult *SecurityGroupResult            `json:"networkSecurityGroupResult,omitempty"`
5491}
5492
5493// ConnectionMonitor parameters that define the operation to create a connection monitor.
5494type ConnectionMonitor struct {
5495	// Location - Connection monitor location.
5496	Location *string `json:"location,omitempty"`
5497	// Tags - Connection monitor tags.
5498	Tags                         map[string]*string `json:"tags"`
5499	*ConnectionMonitorParameters `json:"properties,omitempty"`
5500}
5501
5502// MarshalJSON is the custom marshaler for ConnectionMonitor.
5503func (cm ConnectionMonitor) MarshalJSON() ([]byte, error) {
5504	objectMap := make(map[string]interface{})
5505	if cm.Location != nil {
5506		objectMap["location"] = cm.Location
5507	}
5508	if cm.Tags != nil {
5509		objectMap["tags"] = cm.Tags
5510	}
5511	if cm.ConnectionMonitorParameters != nil {
5512		objectMap["properties"] = cm.ConnectionMonitorParameters
5513	}
5514	return json.Marshal(objectMap)
5515}
5516
5517// UnmarshalJSON is the custom unmarshaler for ConnectionMonitor struct.
5518func (cm *ConnectionMonitor) UnmarshalJSON(body []byte) error {
5519	var m map[string]*json.RawMessage
5520	err := json.Unmarshal(body, &m)
5521	if err != nil {
5522		return err
5523	}
5524	for k, v := range m {
5525		switch k {
5526		case "location":
5527			if v != nil {
5528				var location string
5529				err = json.Unmarshal(*v, &location)
5530				if err != nil {
5531					return err
5532				}
5533				cm.Location = &location
5534			}
5535		case "tags":
5536			if v != nil {
5537				var tags map[string]*string
5538				err = json.Unmarshal(*v, &tags)
5539				if err != nil {
5540					return err
5541				}
5542				cm.Tags = tags
5543			}
5544		case "properties":
5545			if v != nil {
5546				var connectionMonitorParameters ConnectionMonitorParameters
5547				err = json.Unmarshal(*v, &connectionMonitorParameters)
5548				if err != nil {
5549					return err
5550				}
5551				cm.ConnectionMonitorParameters = &connectionMonitorParameters
5552			}
5553		}
5554	}
5555
5556	return nil
5557}
5558
5559// ConnectionMonitorDestination describes the destination of connection monitor.
5560type ConnectionMonitorDestination struct {
5561	// ResourceID - The ID of the resource used as the destination by connection monitor.
5562	ResourceID *string `json:"resourceId,omitempty"`
5563	// Address - Address of the connection monitor destination (IP or domain name).
5564	Address *string `json:"address,omitempty"`
5565	// Port - The destination port used by connection monitor.
5566	Port *int32 `json:"port,omitempty"`
5567}
5568
5569// ConnectionMonitorListResult list of connection monitors.
5570type ConnectionMonitorListResult struct {
5571	autorest.Response `json:"-"`
5572	// Value - Information about connection monitors.
5573	Value *[]ConnectionMonitorResult `json:"value,omitempty"`
5574}
5575
5576// ConnectionMonitorParameters parameters that define the operation to create a connection monitor.
5577type ConnectionMonitorParameters struct {
5578	Source      *ConnectionMonitorSource      `json:"source,omitempty"`
5579	Destination *ConnectionMonitorDestination `json:"destination,omitempty"`
5580	// AutoStart - Determines if the connection monitor will start automatically once created.
5581	AutoStart *bool `json:"autoStart,omitempty"`
5582	// MonitoringIntervalInSeconds - Monitoring interval in seconds.
5583	MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"`
5584}
5585
5586// ConnectionMonitorQueryResult list of connection states snapshots.
5587type ConnectionMonitorQueryResult struct {
5588	autorest.Response `json:"-"`
5589	// SourceStatus - Status of connection monitor source. Possible values include: 'Uknown', 'Active', 'Inactive'
5590	SourceStatus ConnectionMonitorSourceStatus `json:"sourceStatus,omitempty"`
5591	// States - Information about connection states.
5592	States *[]ConnectionStateSnapshot `json:"states,omitempty"`
5593}
5594
5595// ConnectionMonitorResult information about the connection monitor.
5596type ConnectionMonitorResult struct {
5597	autorest.Response `json:"-"`
5598	// Name - READ-ONLY; Name of the connection monitor.
5599	Name *string `json:"name,omitempty"`
5600	// ID - READ-ONLY; ID of the connection monitor.
5601	ID   *string `json:"id,omitempty"`
5602	Etag *string `json:"etag,omitempty"`
5603	// Type - READ-ONLY; Connection monitor type.
5604	Type *string `json:"type,omitempty"`
5605	// Location - Connection monitor location.
5606	Location *string `json:"location,omitempty"`
5607	// Tags - Connection monitor tags.
5608	Tags                               map[string]*string `json:"tags"`
5609	*ConnectionMonitorResultProperties `json:"properties,omitempty"`
5610}
5611
5612// MarshalJSON is the custom marshaler for ConnectionMonitorResult.
5613func (cmr ConnectionMonitorResult) MarshalJSON() ([]byte, error) {
5614	objectMap := make(map[string]interface{})
5615	if cmr.Etag != nil {
5616		objectMap["etag"] = cmr.Etag
5617	}
5618	if cmr.Location != nil {
5619		objectMap["location"] = cmr.Location
5620	}
5621	if cmr.Tags != nil {
5622		objectMap["tags"] = cmr.Tags
5623	}
5624	if cmr.ConnectionMonitorResultProperties != nil {
5625		objectMap["properties"] = cmr.ConnectionMonitorResultProperties
5626	}
5627	return json.Marshal(objectMap)
5628}
5629
5630// UnmarshalJSON is the custom unmarshaler for ConnectionMonitorResult struct.
5631func (cmr *ConnectionMonitorResult) UnmarshalJSON(body []byte) error {
5632	var m map[string]*json.RawMessage
5633	err := json.Unmarshal(body, &m)
5634	if err != nil {
5635		return err
5636	}
5637	for k, v := range m {
5638		switch k {
5639		case "name":
5640			if v != nil {
5641				var name string
5642				err = json.Unmarshal(*v, &name)
5643				if err != nil {
5644					return err
5645				}
5646				cmr.Name = &name
5647			}
5648		case "id":
5649			if v != nil {
5650				var ID string
5651				err = json.Unmarshal(*v, &ID)
5652				if err != nil {
5653					return err
5654				}
5655				cmr.ID = &ID
5656			}
5657		case "etag":
5658			if v != nil {
5659				var etag string
5660				err = json.Unmarshal(*v, &etag)
5661				if err != nil {
5662					return err
5663				}
5664				cmr.Etag = &etag
5665			}
5666		case "type":
5667			if v != nil {
5668				var typeVar string
5669				err = json.Unmarshal(*v, &typeVar)
5670				if err != nil {
5671					return err
5672				}
5673				cmr.Type = &typeVar
5674			}
5675		case "location":
5676			if v != nil {
5677				var location string
5678				err = json.Unmarshal(*v, &location)
5679				if err != nil {
5680					return err
5681				}
5682				cmr.Location = &location
5683			}
5684		case "tags":
5685			if v != nil {
5686				var tags map[string]*string
5687				err = json.Unmarshal(*v, &tags)
5688				if err != nil {
5689					return err
5690				}
5691				cmr.Tags = tags
5692			}
5693		case "properties":
5694			if v != nil {
5695				var connectionMonitorResultProperties ConnectionMonitorResultProperties
5696				err = json.Unmarshal(*v, &connectionMonitorResultProperties)
5697				if err != nil {
5698					return err
5699				}
5700				cmr.ConnectionMonitorResultProperties = &connectionMonitorResultProperties
5701			}
5702		}
5703	}
5704
5705	return nil
5706}
5707
5708// ConnectionMonitorResultProperties describes the properties of a connection monitor.
5709type ConnectionMonitorResultProperties struct {
5710	// ProvisioningState - The provisioning state of the connection monitor. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
5711	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
5712	// StartTime - The date and time when the connection monitor was started.
5713	StartTime *date.Time `json:"startTime,omitempty"`
5714	// MonitoringStatus - The monitoring status of the connection monitor.
5715	MonitoringStatus *string                       `json:"monitoringStatus,omitempty"`
5716	Source           *ConnectionMonitorSource      `json:"source,omitempty"`
5717	Destination      *ConnectionMonitorDestination `json:"destination,omitempty"`
5718	// AutoStart - Determines if the connection monitor will start automatically once created.
5719	AutoStart *bool `json:"autoStart,omitempty"`
5720	// MonitoringIntervalInSeconds - Monitoring interval in seconds.
5721	MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"`
5722}
5723
5724// ConnectionMonitorsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
5725// long-running operation.
5726type ConnectionMonitorsCreateOrUpdateFuture struct {
5727	azure.FutureAPI
5728	// Result returns the result of the asynchronous operation.
5729	// If the operation has not completed it will return an error.
5730	Result func(ConnectionMonitorsClient) (ConnectionMonitorResult, error)
5731}
5732
5733// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5734func (future *ConnectionMonitorsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
5735	var azFuture azure.Future
5736	if err := json.Unmarshal(body, &azFuture); err != nil {
5737		return err
5738	}
5739	future.FutureAPI = &azFuture
5740	future.Result = future.result
5741	return nil
5742}
5743
5744// result is the default implementation for ConnectionMonitorsCreateOrUpdateFuture.Result.
5745func (future *ConnectionMonitorsCreateOrUpdateFuture) result(client ConnectionMonitorsClient) (cmr ConnectionMonitorResult, err error) {
5746	var done bool
5747	done, err = future.DoneWithContext(context.Background(), client)
5748	if err != nil {
5749		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
5750		return
5751	}
5752	if !done {
5753		cmr.Response.Response = future.Response()
5754		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsCreateOrUpdateFuture")
5755		return
5756	}
5757	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5758	if cmr.Response.Response, err = future.GetResult(sender); err == nil && cmr.Response.Response.StatusCode != http.StatusNoContent {
5759		cmr, err = client.CreateOrUpdateResponder(cmr.Response.Response)
5760		if err != nil {
5761			err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", cmr.Response.Response, "Failure responding to request")
5762		}
5763	}
5764	return
5765}
5766
5767// ConnectionMonitorsDeleteFuture an abstraction for monitoring and retrieving the results of a
5768// long-running operation.
5769type ConnectionMonitorsDeleteFuture struct {
5770	azure.FutureAPI
5771	// Result returns the result of the asynchronous operation.
5772	// If the operation has not completed it will return an error.
5773	Result func(ConnectionMonitorsClient) (autorest.Response, error)
5774}
5775
5776// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5777func (future *ConnectionMonitorsDeleteFuture) UnmarshalJSON(body []byte) error {
5778	var azFuture azure.Future
5779	if err := json.Unmarshal(body, &azFuture); err != nil {
5780		return err
5781	}
5782	future.FutureAPI = &azFuture
5783	future.Result = future.result
5784	return nil
5785}
5786
5787// result is the default implementation for ConnectionMonitorsDeleteFuture.Result.
5788func (future *ConnectionMonitorsDeleteFuture) result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
5789	var done bool
5790	done, err = future.DoneWithContext(context.Background(), client)
5791	if err != nil {
5792		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsDeleteFuture", "Result", future.Response(), "Polling failure")
5793		return
5794	}
5795	if !done {
5796		ar.Response = future.Response()
5797		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsDeleteFuture")
5798		return
5799	}
5800	ar.Response = future.Response()
5801	return
5802}
5803
5804// ConnectionMonitorSource describes the source of connection monitor.
5805type ConnectionMonitorSource struct {
5806	// ResourceID - The ID of the resource used as the source by connection monitor.
5807	ResourceID *string `json:"resourceId,omitempty"`
5808	// Port - The source port used by connection monitor.
5809	Port *int32 `json:"port,omitempty"`
5810}
5811
5812// ConnectionMonitorsQueryFuture an abstraction for monitoring and retrieving the results of a long-running
5813// operation.
5814type ConnectionMonitorsQueryFuture struct {
5815	azure.FutureAPI
5816	// Result returns the result of the asynchronous operation.
5817	// If the operation has not completed it will return an error.
5818	Result func(ConnectionMonitorsClient) (ConnectionMonitorQueryResult, error)
5819}
5820
5821// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5822func (future *ConnectionMonitorsQueryFuture) UnmarshalJSON(body []byte) error {
5823	var azFuture azure.Future
5824	if err := json.Unmarshal(body, &azFuture); err != nil {
5825		return err
5826	}
5827	future.FutureAPI = &azFuture
5828	future.Result = future.result
5829	return nil
5830}
5831
5832// result is the default implementation for ConnectionMonitorsQueryFuture.Result.
5833func (future *ConnectionMonitorsQueryFuture) result(client ConnectionMonitorsClient) (cmqr ConnectionMonitorQueryResult, err error) {
5834	var done bool
5835	done, err = future.DoneWithContext(context.Background(), client)
5836	if err != nil {
5837		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", future.Response(), "Polling failure")
5838		return
5839	}
5840	if !done {
5841		cmqr.Response.Response = future.Response()
5842		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsQueryFuture")
5843		return
5844	}
5845	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5846	if cmqr.Response.Response, err = future.GetResult(sender); err == nil && cmqr.Response.Response.StatusCode != http.StatusNoContent {
5847		cmqr, err = client.QueryResponder(cmqr.Response.Response)
5848		if err != nil {
5849			err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", cmqr.Response.Response, "Failure responding to request")
5850		}
5851	}
5852	return
5853}
5854
5855// ConnectionMonitorsStartFuture an abstraction for monitoring and retrieving the results of a long-running
5856// operation.
5857type ConnectionMonitorsStartFuture struct {
5858	azure.FutureAPI
5859	// Result returns the result of the asynchronous operation.
5860	// If the operation has not completed it will return an error.
5861	Result func(ConnectionMonitorsClient) (autorest.Response, error)
5862}
5863
5864// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5865func (future *ConnectionMonitorsStartFuture) UnmarshalJSON(body []byte) error {
5866	var azFuture azure.Future
5867	if err := json.Unmarshal(body, &azFuture); err != nil {
5868		return err
5869	}
5870	future.FutureAPI = &azFuture
5871	future.Result = future.result
5872	return nil
5873}
5874
5875// result is the default implementation for ConnectionMonitorsStartFuture.Result.
5876func (future *ConnectionMonitorsStartFuture) result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
5877	var done bool
5878	done, err = future.DoneWithContext(context.Background(), client)
5879	if err != nil {
5880		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStartFuture", "Result", future.Response(), "Polling failure")
5881		return
5882	}
5883	if !done {
5884		ar.Response = future.Response()
5885		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStartFuture")
5886		return
5887	}
5888	ar.Response = future.Response()
5889	return
5890}
5891
5892// ConnectionMonitorsStopFuture an abstraction for monitoring and retrieving the results of a long-running
5893// operation.
5894type ConnectionMonitorsStopFuture struct {
5895	azure.FutureAPI
5896	// Result returns the result of the asynchronous operation.
5897	// If the operation has not completed it will return an error.
5898	Result func(ConnectionMonitorsClient) (autorest.Response, error)
5899}
5900
5901// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5902func (future *ConnectionMonitorsStopFuture) UnmarshalJSON(body []byte) error {
5903	var azFuture azure.Future
5904	if err := json.Unmarshal(body, &azFuture); err != nil {
5905		return err
5906	}
5907	future.FutureAPI = &azFuture
5908	future.Result = future.result
5909	return nil
5910}
5911
5912// result is the default implementation for ConnectionMonitorsStopFuture.Result.
5913func (future *ConnectionMonitorsStopFuture) result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
5914	var done bool
5915	done, err = future.DoneWithContext(context.Background(), client)
5916	if err != nil {
5917		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStopFuture", "Result", future.Response(), "Polling failure")
5918		return
5919	}
5920	if !done {
5921		ar.Response = future.Response()
5922		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStopFuture")
5923		return
5924	}
5925	ar.Response = future.Response()
5926	return
5927}
5928
5929// ConnectionResetSharedKey the virtual network connection reset shared key
5930type ConnectionResetSharedKey struct {
5931	autorest.Response `json:"-"`
5932	// KeyLength - The virtual network connection reset shared key length, should between 1 and 128.
5933	KeyLength *int32 `json:"keyLength,omitempty"`
5934}
5935
5936// ConnectionSharedKey response for GetConnectionSharedKey API service call
5937type ConnectionSharedKey struct {
5938	autorest.Response `json:"-"`
5939	// Value - The virtual network connection shared key value.
5940	Value *string `json:"value,omitempty"`
5941	// ID - Resource ID.
5942	ID *string `json:"id,omitempty"`
5943}
5944
5945// ConnectionStateSnapshot connection state snapshot.
5946type ConnectionStateSnapshot struct {
5947	// ConnectionState - The connection state. Possible values include: 'ConnectionStateReachable', 'ConnectionStateUnreachable', 'ConnectionStateUnknown'
5948	ConnectionState ConnectionState `json:"connectionState,omitempty"`
5949	// StartTime - The start time of the connection snapshot.
5950	StartTime *date.Time `json:"startTime,omitempty"`
5951	// EndTime - The end time of the connection snapshot.
5952	EndTime *date.Time `json:"endTime,omitempty"`
5953	// EvaluationState - Connectivity analysis evaluation state. Possible values include: 'NotStarted', 'InProgress', 'Completed'
5954	EvaluationState EvaluationState `json:"evaluationState,omitempty"`
5955	// AvgLatencyInMs - Average latency in ms.
5956	AvgLatencyInMs *int32 `json:"avgLatencyInMs,omitempty"`
5957	// MinLatencyInMs - Minimum latency in ms.
5958	MinLatencyInMs *int32 `json:"minLatencyInMs,omitempty"`
5959	// MaxLatencyInMs - Maximum latency in ms.
5960	MaxLatencyInMs *int32 `json:"maxLatencyInMs,omitempty"`
5961	// ProbesSent - The number of sent probes.
5962	ProbesSent *int32 `json:"probesSent,omitempty"`
5963	// ProbesFailed - The number of failed probes.
5964	ProbesFailed *int32 `json:"probesFailed,omitempty"`
5965	// Hops - READ-ONLY; List of hops between the source and the destination.
5966	Hops *[]ConnectivityHop `json:"hops,omitempty"`
5967}
5968
5969// MarshalJSON is the custom marshaler for ConnectionStateSnapshot.
5970func (CSS ConnectionStateSnapshot) MarshalJSON() ([]byte, error) {
5971	objectMap := make(map[string]interface{})
5972	if CSS.ConnectionState != "" {
5973		objectMap["connectionState"] = CSS.ConnectionState
5974	}
5975	if CSS.StartTime != nil {
5976		objectMap["startTime"] = CSS.StartTime
5977	}
5978	if CSS.EndTime != nil {
5979		objectMap["endTime"] = CSS.EndTime
5980	}
5981	if CSS.EvaluationState != "" {
5982		objectMap["evaluationState"] = CSS.EvaluationState
5983	}
5984	if CSS.AvgLatencyInMs != nil {
5985		objectMap["avgLatencyInMs"] = CSS.AvgLatencyInMs
5986	}
5987	if CSS.MinLatencyInMs != nil {
5988		objectMap["minLatencyInMs"] = CSS.MinLatencyInMs
5989	}
5990	if CSS.MaxLatencyInMs != nil {
5991		objectMap["maxLatencyInMs"] = CSS.MaxLatencyInMs
5992	}
5993	if CSS.ProbesSent != nil {
5994		objectMap["probesSent"] = CSS.ProbesSent
5995	}
5996	if CSS.ProbesFailed != nil {
5997		objectMap["probesFailed"] = CSS.ProbesFailed
5998	}
5999	return json.Marshal(objectMap)
6000}
6001
6002// ConnectivityDestination parameters that define destination of connection.
6003type ConnectivityDestination struct {
6004	// ResourceID - The ID of the resource to which a connection attempt will be made.
6005	ResourceID *string `json:"resourceId,omitempty"`
6006	// Address - The IP address or URI the resource to which a connection attempt will be made.
6007	Address *string `json:"address,omitempty"`
6008	// Port - Port on which check connectivity will be performed.
6009	Port *int32 `json:"port,omitempty"`
6010}
6011
6012// ConnectivityHop information about a hop between the source and the destination.
6013type ConnectivityHop struct {
6014	// Type - READ-ONLY; The type of the hop.
6015	Type *string `json:"type,omitempty"`
6016	// ID - READ-ONLY; The ID of the hop.
6017	ID *string `json:"id,omitempty"`
6018	// Address - READ-ONLY; The IP address of the hop.
6019	Address *string `json:"address,omitempty"`
6020	// ResourceID - READ-ONLY; The ID of the resource corresponding to this hop.
6021	ResourceID *string `json:"resourceId,omitempty"`
6022	// NextHopIds - READ-ONLY; List of next hop identifiers.
6023	NextHopIds *[]string `json:"nextHopIds,omitempty"`
6024	// Issues - READ-ONLY; List of issues.
6025	Issues *[]ConnectivityIssue `json:"issues,omitempty"`
6026}
6027
6028// MarshalJSON is the custom marshaler for ConnectivityHop.
6029func (ch ConnectivityHop) MarshalJSON() ([]byte, error) {
6030	objectMap := make(map[string]interface{})
6031	return json.Marshal(objectMap)
6032}
6033
6034// ConnectivityInformation information on the connectivity status.
6035type ConnectivityInformation struct {
6036	autorest.Response `json:"-"`
6037	// Hops - READ-ONLY; List of hops between the source and the destination.
6038	Hops *[]ConnectivityHop `json:"hops,omitempty"`
6039	// ConnectionStatus - READ-ONLY; The connection status. Possible values include: 'ConnectionStatusUnknown', 'ConnectionStatusConnected', 'ConnectionStatusDisconnected', 'ConnectionStatusDegraded'
6040	ConnectionStatus ConnectionStatus `json:"connectionStatus,omitempty"`
6041	// AvgLatencyInMs - READ-ONLY; Average latency in milliseconds.
6042	AvgLatencyInMs *int32 `json:"avgLatencyInMs,omitempty"`
6043	// MinLatencyInMs - READ-ONLY; Minimum latency in milliseconds.
6044	MinLatencyInMs *int32 `json:"minLatencyInMs,omitempty"`
6045	// MaxLatencyInMs - READ-ONLY; Maximum latency in milliseconds.
6046	MaxLatencyInMs *int32 `json:"maxLatencyInMs,omitempty"`
6047	// ProbesSent - READ-ONLY; Total number of probes sent.
6048	ProbesSent *int32 `json:"probesSent,omitempty"`
6049	// ProbesFailed - READ-ONLY; Number of failed probes.
6050	ProbesFailed *int32 `json:"probesFailed,omitempty"`
6051}
6052
6053// MarshalJSON is the custom marshaler for ConnectivityInformation.
6054func (ci ConnectivityInformation) MarshalJSON() ([]byte, error) {
6055	objectMap := make(map[string]interface{})
6056	return json.Marshal(objectMap)
6057}
6058
6059// ConnectivityIssue information about an issue encountered in the process of checking for connectivity.
6060type ConnectivityIssue struct {
6061	// Origin - READ-ONLY; The origin of the issue. Possible values include: 'OriginLocal', 'OriginInbound', 'OriginOutbound'
6062	Origin Origin `json:"origin,omitempty"`
6063	// Severity - READ-ONLY; The severity of the issue. Possible values include: 'SeverityError', 'SeverityWarning'
6064	Severity Severity `json:"severity,omitempty"`
6065	// Type - READ-ONLY; The type of issue. Possible values include: 'IssueTypeUnknown', 'IssueTypeAgentStopped', 'IssueTypeGuestFirewall', 'IssueTypeDNSResolution', 'IssueTypeSocketBind', 'IssueTypeNetworkSecurityRule', 'IssueTypeUserDefinedRoute', 'IssueTypePortThrottled', 'IssueTypePlatform'
6066	Type IssueType `json:"type,omitempty"`
6067	// Context - READ-ONLY; Provides additional context on the issue.
6068	Context *[]map[string]*string `json:"context,omitempty"`
6069}
6070
6071// MarshalJSON is the custom marshaler for ConnectivityIssue.
6072func (ci ConnectivityIssue) MarshalJSON() ([]byte, error) {
6073	objectMap := make(map[string]interface{})
6074	return json.Marshal(objectMap)
6075}
6076
6077// ConnectivityParameters parameters that determine how the connectivity check will be performed.
6078type ConnectivityParameters struct {
6079	Source      *ConnectivitySource      `json:"source,omitempty"`
6080	Destination *ConnectivityDestination `json:"destination,omitempty"`
6081	// Protocol - Network protocol. Possible values include: 'ProtocolTCP', 'ProtocolHTTP', 'ProtocolHTTPS', 'ProtocolIcmp'
6082	Protocol              Protocol               `json:"protocol,omitempty"`
6083	ProtocolConfiguration *ProtocolConfiguration `json:"protocolConfiguration,omitempty"`
6084}
6085
6086// ConnectivitySource parameters that define the source of the connection.
6087type ConnectivitySource struct {
6088	// ResourceID - The ID of the resource from which a connectivity check will be initiated.
6089	ResourceID *string `json:"resourceId,omitempty"`
6090	// Port - The source port from which a connectivity check will be performed.
6091	Port *int32 `json:"port,omitempty"`
6092}
6093
6094// Container reference to container resource in remote resource provider.
6095type Container struct {
6096	// ID - Resource ID.
6097	ID *string `json:"id,omitempty"`
6098}
6099
6100// ContainerNetworkInterface container network interface child resource.
6101type ContainerNetworkInterface struct {
6102	// ContainerNetworkInterfacePropertiesFormat - Container network interface properties.
6103	*ContainerNetworkInterfacePropertiesFormat `json:"properties,omitempty"`
6104	// Name - The name of the resource. This name can be used to access the resource.
6105	Name *string `json:"name,omitempty"`
6106	// Type - READ-ONLY; Sub Resource type.
6107	Type *string `json:"type,omitempty"`
6108	// Etag - A unique read-only string that changes whenever the resource is updated.
6109	Etag *string `json:"etag,omitempty"`
6110	// ID - Resource ID.
6111	ID *string `json:"id,omitempty"`
6112}
6113
6114// MarshalJSON is the custom marshaler for ContainerNetworkInterface.
6115func (cni ContainerNetworkInterface) MarshalJSON() ([]byte, error) {
6116	objectMap := make(map[string]interface{})
6117	if cni.ContainerNetworkInterfacePropertiesFormat != nil {
6118		objectMap["properties"] = cni.ContainerNetworkInterfacePropertiesFormat
6119	}
6120	if cni.Name != nil {
6121		objectMap["name"] = cni.Name
6122	}
6123	if cni.Etag != nil {
6124		objectMap["etag"] = cni.Etag
6125	}
6126	if cni.ID != nil {
6127		objectMap["id"] = cni.ID
6128	}
6129	return json.Marshal(objectMap)
6130}
6131
6132// UnmarshalJSON is the custom unmarshaler for ContainerNetworkInterface struct.
6133func (cni *ContainerNetworkInterface) UnmarshalJSON(body []byte) error {
6134	var m map[string]*json.RawMessage
6135	err := json.Unmarshal(body, &m)
6136	if err != nil {
6137		return err
6138	}
6139	for k, v := range m {
6140		switch k {
6141		case "properties":
6142			if v != nil {
6143				var containerNetworkInterfacePropertiesFormat ContainerNetworkInterfacePropertiesFormat
6144				err = json.Unmarshal(*v, &containerNetworkInterfacePropertiesFormat)
6145				if err != nil {
6146					return err
6147				}
6148				cni.ContainerNetworkInterfacePropertiesFormat = &containerNetworkInterfacePropertiesFormat
6149			}
6150		case "name":
6151			if v != nil {
6152				var name string
6153				err = json.Unmarshal(*v, &name)
6154				if err != nil {
6155					return err
6156				}
6157				cni.Name = &name
6158			}
6159		case "type":
6160			if v != nil {
6161				var typeVar string
6162				err = json.Unmarshal(*v, &typeVar)
6163				if err != nil {
6164					return err
6165				}
6166				cni.Type = &typeVar
6167			}
6168		case "etag":
6169			if v != nil {
6170				var etag string
6171				err = json.Unmarshal(*v, &etag)
6172				if err != nil {
6173					return err
6174				}
6175				cni.Etag = &etag
6176			}
6177		case "id":
6178			if v != nil {
6179				var ID string
6180				err = json.Unmarshal(*v, &ID)
6181				if err != nil {
6182					return err
6183				}
6184				cni.ID = &ID
6185			}
6186		}
6187	}
6188
6189	return nil
6190}
6191
6192// ContainerNetworkInterfaceConfiguration container network interface configuration child resource.
6193type ContainerNetworkInterfaceConfiguration struct {
6194	// ContainerNetworkInterfaceConfigurationPropertiesFormat - Container network interface configuration properties.
6195	*ContainerNetworkInterfaceConfigurationPropertiesFormat `json:"properties,omitempty"`
6196	// Name - The name of the resource. This name can be used to access the resource.
6197	Name *string `json:"name,omitempty"`
6198	// Type - READ-ONLY; Sub Resource type.
6199	Type *string `json:"type,omitempty"`
6200	// Etag - A unique read-only string that changes whenever the resource is updated.
6201	Etag *string `json:"etag,omitempty"`
6202	// ID - Resource ID.
6203	ID *string `json:"id,omitempty"`
6204}
6205
6206// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceConfiguration.
6207func (cnic ContainerNetworkInterfaceConfiguration) MarshalJSON() ([]byte, error) {
6208	objectMap := make(map[string]interface{})
6209	if cnic.ContainerNetworkInterfaceConfigurationPropertiesFormat != nil {
6210		objectMap["properties"] = cnic.ContainerNetworkInterfaceConfigurationPropertiesFormat
6211	}
6212	if cnic.Name != nil {
6213		objectMap["name"] = cnic.Name
6214	}
6215	if cnic.Etag != nil {
6216		objectMap["etag"] = cnic.Etag
6217	}
6218	if cnic.ID != nil {
6219		objectMap["id"] = cnic.ID
6220	}
6221	return json.Marshal(objectMap)
6222}
6223
6224// UnmarshalJSON is the custom unmarshaler for ContainerNetworkInterfaceConfiguration struct.
6225func (cnic *ContainerNetworkInterfaceConfiguration) UnmarshalJSON(body []byte) error {
6226	var m map[string]*json.RawMessage
6227	err := json.Unmarshal(body, &m)
6228	if err != nil {
6229		return err
6230	}
6231	for k, v := range m {
6232		switch k {
6233		case "properties":
6234			if v != nil {
6235				var containerNetworkInterfaceConfigurationPropertiesFormat ContainerNetworkInterfaceConfigurationPropertiesFormat
6236				err = json.Unmarshal(*v, &containerNetworkInterfaceConfigurationPropertiesFormat)
6237				if err != nil {
6238					return err
6239				}
6240				cnic.ContainerNetworkInterfaceConfigurationPropertiesFormat = &containerNetworkInterfaceConfigurationPropertiesFormat
6241			}
6242		case "name":
6243			if v != nil {
6244				var name string
6245				err = json.Unmarshal(*v, &name)
6246				if err != nil {
6247					return err
6248				}
6249				cnic.Name = &name
6250			}
6251		case "type":
6252			if v != nil {
6253				var typeVar string
6254				err = json.Unmarshal(*v, &typeVar)
6255				if err != nil {
6256					return err
6257				}
6258				cnic.Type = &typeVar
6259			}
6260		case "etag":
6261			if v != nil {
6262				var etag string
6263				err = json.Unmarshal(*v, &etag)
6264				if err != nil {
6265					return err
6266				}
6267				cnic.Etag = &etag
6268			}
6269		case "id":
6270			if v != nil {
6271				var ID string
6272				err = json.Unmarshal(*v, &ID)
6273				if err != nil {
6274					return err
6275				}
6276				cnic.ID = &ID
6277			}
6278		}
6279	}
6280
6281	return nil
6282}
6283
6284// ContainerNetworkInterfaceConfigurationPropertiesFormat container network interface configuration
6285// properties.
6286type ContainerNetworkInterfaceConfigurationPropertiesFormat struct {
6287	// IPConfigurations - A list of ip configurations of the container network interface configuration.
6288	IPConfigurations *[]IPConfigurationProfile `json:"ipConfigurations,omitempty"`
6289	// ContainerNetworkInterfaces - A list of container network interfaces created from this container network interface configuration.
6290	ContainerNetworkInterfaces *[]SubResource `json:"containerNetworkInterfaces,omitempty"`
6291	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
6292	ProvisioningState *string `json:"provisioningState,omitempty"`
6293}
6294
6295// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceConfigurationPropertiesFormat.
6296func (cnicpf ContainerNetworkInterfaceConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
6297	objectMap := make(map[string]interface{})
6298	if cnicpf.IPConfigurations != nil {
6299		objectMap["ipConfigurations"] = cnicpf.IPConfigurations
6300	}
6301	if cnicpf.ContainerNetworkInterfaces != nil {
6302		objectMap["containerNetworkInterfaces"] = cnicpf.ContainerNetworkInterfaces
6303	}
6304	return json.Marshal(objectMap)
6305}
6306
6307// ContainerNetworkInterfaceIPConfiguration the ip configuration for a container network interface.
6308type ContainerNetworkInterfaceIPConfiguration struct {
6309	// ContainerNetworkInterfaceIPConfigurationPropertiesFormat - Properties of the container network interface IP configuration.
6310	*ContainerNetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"`
6311	// Name - The name of the resource. This name can be used to access the resource.
6312	Name *string `json:"name,omitempty"`
6313	// Type - READ-ONLY; Sub Resource type.
6314	Type *string `json:"type,omitempty"`
6315	// Etag - A unique read-only string that changes whenever the resource is updated.
6316	Etag *string `json:"etag,omitempty"`
6317}
6318
6319// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceIPConfiguration.
6320func (cniic ContainerNetworkInterfaceIPConfiguration) MarshalJSON() ([]byte, error) {
6321	objectMap := make(map[string]interface{})
6322	if cniic.ContainerNetworkInterfaceIPConfigurationPropertiesFormat != nil {
6323		objectMap["properties"] = cniic.ContainerNetworkInterfaceIPConfigurationPropertiesFormat
6324	}
6325	if cniic.Name != nil {
6326		objectMap["name"] = cniic.Name
6327	}
6328	if cniic.Etag != nil {
6329		objectMap["etag"] = cniic.Etag
6330	}
6331	return json.Marshal(objectMap)
6332}
6333
6334// UnmarshalJSON is the custom unmarshaler for ContainerNetworkInterfaceIPConfiguration struct.
6335func (cniic *ContainerNetworkInterfaceIPConfiguration) UnmarshalJSON(body []byte) error {
6336	var m map[string]*json.RawMessage
6337	err := json.Unmarshal(body, &m)
6338	if err != nil {
6339		return err
6340	}
6341	for k, v := range m {
6342		switch k {
6343		case "properties":
6344			if v != nil {
6345				var containerNetworkInterfaceIPConfigurationPropertiesFormat ContainerNetworkInterfaceIPConfigurationPropertiesFormat
6346				err = json.Unmarshal(*v, &containerNetworkInterfaceIPConfigurationPropertiesFormat)
6347				if err != nil {
6348					return err
6349				}
6350				cniic.ContainerNetworkInterfaceIPConfigurationPropertiesFormat = &containerNetworkInterfaceIPConfigurationPropertiesFormat
6351			}
6352		case "name":
6353			if v != nil {
6354				var name string
6355				err = json.Unmarshal(*v, &name)
6356				if err != nil {
6357					return err
6358				}
6359				cniic.Name = &name
6360			}
6361		case "type":
6362			if v != nil {
6363				var typeVar string
6364				err = json.Unmarshal(*v, &typeVar)
6365				if err != nil {
6366					return err
6367				}
6368				cniic.Type = &typeVar
6369			}
6370		case "etag":
6371			if v != nil {
6372				var etag string
6373				err = json.Unmarshal(*v, &etag)
6374				if err != nil {
6375					return err
6376				}
6377				cniic.Etag = &etag
6378			}
6379		}
6380	}
6381
6382	return nil
6383}
6384
6385// ContainerNetworkInterfaceIPConfigurationPropertiesFormat properties of the container network interface
6386// IP configuration.
6387type ContainerNetworkInterfaceIPConfigurationPropertiesFormat struct {
6388	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
6389	ProvisioningState *string `json:"provisioningState,omitempty"`
6390}
6391
6392// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceIPConfigurationPropertiesFormat.
6393func (cniicpf ContainerNetworkInterfaceIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
6394	objectMap := make(map[string]interface{})
6395	return json.Marshal(objectMap)
6396}
6397
6398// ContainerNetworkInterfacePropertiesFormat ...
6399type ContainerNetworkInterfacePropertiesFormat struct {
6400	// ContainerNetworkInterfaceConfiguration - Container network interface configuration from which this container network interface is created.
6401	ContainerNetworkInterfaceConfiguration *ContainerNetworkInterfaceConfiguration `json:"containerNetworkInterfaceConfiguration,omitempty"`
6402	// Container - Reference to the container to which this container network interface is attached.
6403	Container *Container `json:"container,omitempty"`
6404	// IPConfigurations - Reference to the ip configuration on this container nic.
6405	IPConfigurations *[]ContainerNetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"`
6406	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
6407	ProvisioningState *string `json:"provisioningState,omitempty"`
6408}
6409
6410// MarshalJSON is the custom marshaler for ContainerNetworkInterfacePropertiesFormat.
6411func (cnipf ContainerNetworkInterfacePropertiesFormat) MarshalJSON() ([]byte, error) {
6412	objectMap := make(map[string]interface{})
6413	if cnipf.ContainerNetworkInterfaceConfiguration != nil {
6414		objectMap["containerNetworkInterfaceConfiguration"] = cnipf.ContainerNetworkInterfaceConfiguration
6415	}
6416	if cnipf.Container != nil {
6417		objectMap["container"] = cnipf.Container
6418	}
6419	if cnipf.IPConfigurations != nil {
6420		objectMap["ipConfigurations"] = cnipf.IPConfigurations
6421	}
6422	return json.Marshal(objectMap)
6423}
6424
6425// DdosCustomPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
6426// long-running operation.
6427type DdosCustomPoliciesCreateOrUpdateFuture struct {
6428	azure.FutureAPI
6429	// Result returns the result of the asynchronous operation.
6430	// If the operation has not completed it will return an error.
6431	Result func(DdosCustomPoliciesClient) (DdosCustomPolicy, error)
6432}
6433
6434// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6435func (future *DdosCustomPoliciesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
6436	var azFuture azure.Future
6437	if err := json.Unmarshal(body, &azFuture); err != nil {
6438		return err
6439	}
6440	future.FutureAPI = &azFuture
6441	future.Result = future.result
6442	return nil
6443}
6444
6445// result is the default implementation for DdosCustomPoliciesCreateOrUpdateFuture.Result.
6446func (future *DdosCustomPoliciesCreateOrUpdateFuture) result(client DdosCustomPoliciesClient) (dcp DdosCustomPolicy, err error) {
6447	var done bool
6448	done, err = future.DoneWithContext(context.Background(), client)
6449	if err != nil {
6450		err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
6451		return
6452	}
6453	if !done {
6454		dcp.Response.Response = future.Response()
6455		err = azure.NewAsyncOpIncompleteError("network.DdosCustomPoliciesCreateOrUpdateFuture")
6456		return
6457	}
6458	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6459	if dcp.Response.Response, err = future.GetResult(sender); err == nil && dcp.Response.Response.StatusCode != http.StatusNoContent {
6460		dcp, err = client.CreateOrUpdateResponder(dcp.Response.Response)
6461		if err != nil {
6462			err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesCreateOrUpdateFuture", "Result", dcp.Response.Response, "Failure responding to request")
6463		}
6464	}
6465	return
6466}
6467
6468// DdosCustomPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a
6469// long-running operation.
6470type DdosCustomPoliciesDeleteFuture struct {
6471	azure.FutureAPI
6472	// Result returns the result of the asynchronous operation.
6473	// If the operation has not completed it will return an error.
6474	Result func(DdosCustomPoliciesClient) (autorest.Response, error)
6475}
6476
6477// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6478func (future *DdosCustomPoliciesDeleteFuture) UnmarshalJSON(body []byte) error {
6479	var azFuture azure.Future
6480	if err := json.Unmarshal(body, &azFuture); err != nil {
6481		return err
6482	}
6483	future.FutureAPI = &azFuture
6484	future.Result = future.result
6485	return nil
6486}
6487
6488// result is the default implementation for DdosCustomPoliciesDeleteFuture.Result.
6489func (future *DdosCustomPoliciesDeleteFuture) result(client DdosCustomPoliciesClient) (ar autorest.Response, err error) {
6490	var done bool
6491	done, err = future.DoneWithContext(context.Background(), client)
6492	if err != nil {
6493		err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesDeleteFuture", "Result", future.Response(), "Polling failure")
6494		return
6495	}
6496	if !done {
6497		ar.Response = future.Response()
6498		err = azure.NewAsyncOpIncompleteError("network.DdosCustomPoliciesDeleteFuture")
6499		return
6500	}
6501	ar.Response = future.Response()
6502	return
6503}
6504
6505// DdosCustomPoliciesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
6506// long-running operation.
6507type DdosCustomPoliciesUpdateTagsFuture struct {
6508	azure.FutureAPI
6509	// Result returns the result of the asynchronous operation.
6510	// If the operation has not completed it will return an error.
6511	Result func(DdosCustomPoliciesClient) (DdosCustomPolicy, error)
6512}
6513
6514// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6515func (future *DdosCustomPoliciesUpdateTagsFuture) UnmarshalJSON(body []byte) error {
6516	var azFuture azure.Future
6517	if err := json.Unmarshal(body, &azFuture); err != nil {
6518		return err
6519	}
6520	future.FutureAPI = &azFuture
6521	future.Result = future.result
6522	return nil
6523}
6524
6525// result is the default implementation for DdosCustomPoliciesUpdateTagsFuture.Result.
6526func (future *DdosCustomPoliciesUpdateTagsFuture) result(client DdosCustomPoliciesClient) (dcp DdosCustomPolicy, err error) {
6527	var done bool
6528	done, err = future.DoneWithContext(context.Background(), client)
6529	if err != nil {
6530		err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
6531		return
6532	}
6533	if !done {
6534		dcp.Response.Response = future.Response()
6535		err = azure.NewAsyncOpIncompleteError("network.DdosCustomPoliciesUpdateTagsFuture")
6536		return
6537	}
6538	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6539	if dcp.Response.Response, err = future.GetResult(sender); err == nil && dcp.Response.Response.StatusCode != http.StatusNoContent {
6540		dcp, err = client.UpdateTagsResponder(dcp.Response.Response)
6541		if err != nil {
6542			err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesUpdateTagsFuture", "Result", dcp.Response.Response, "Failure responding to request")
6543		}
6544	}
6545	return
6546}
6547
6548// DdosCustomPolicy a DDoS custom policy in a resource group.
6549type DdosCustomPolicy struct {
6550	autorest.Response `json:"-"`
6551	// DdosCustomPolicyPropertiesFormat - Properties of the DDoS custom policy.
6552	*DdosCustomPolicyPropertiesFormat `json:"properties,omitempty"`
6553	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
6554	Etag *string `json:"etag,omitempty"`
6555	// ID - Resource ID.
6556	ID *string `json:"id,omitempty"`
6557	// Name - READ-ONLY; Resource name.
6558	Name *string `json:"name,omitempty"`
6559	// Type - READ-ONLY; Resource type.
6560	Type *string `json:"type,omitempty"`
6561	// Location - Resource location.
6562	Location *string `json:"location,omitempty"`
6563	// Tags - Resource tags.
6564	Tags map[string]*string `json:"tags"`
6565}
6566
6567// MarshalJSON is the custom marshaler for DdosCustomPolicy.
6568func (dcp DdosCustomPolicy) MarshalJSON() ([]byte, error) {
6569	objectMap := make(map[string]interface{})
6570	if dcp.DdosCustomPolicyPropertiesFormat != nil {
6571		objectMap["properties"] = dcp.DdosCustomPolicyPropertiesFormat
6572	}
6573	if dcp.ID != nil {
6574		objectMap["id"] = dcp.ID
6575	}
6576	if dcp.Location != nil {
6577		objectMap["location"] = dcp.Location
6578	}
6579	if dcp.Tags != nil {
6580		objectMap["tags"] = dcp.Tags
6581	}
6582	return json.Marshal(objectMap)
6583}
6584
6585// UnmarshalJSON is the custom unmarshaler for DdosCustomPolicy struct.
6586func (dcp *DdosCustomPolicy) UnmarshalJSON(body []byte) error {
6587	var m map[string]*json.RawMessage
6588	err := json.Unmarshal(body, &m)
6589	if err != nil {
6590		return err
6591	}
6592	for k, v := range m {
6593		switch k {
6594		case "properties":
6595			if v != nil {
6596				var ddosCustomPolicyPropertiesFormat DdosCustomPolicyPropertiesFormat
6597				err = json.Unmarshal(*v, &ddosCustomPolicyPropertiesFormat)
6598				if err != nil {
6599					return err
6600				}
6601				dcp.DdosCustomPolicyPropertiesFormat = &ddosCustomPolicyPropertiesFormat
6602			}
6603		case "etag":
6604			if v != nil {
6605				var etag string
6606				err = json.Unmarshal(*v, &etag)
6607				if err != nil {
6608					return err
6609				}
6610				dcp.Etag = &etag
6611			}
6612		case "id":
6613			if v != nil {
6614				var ID string
6615				err = json.Unmarshal(*v, &ID)
6616				if err != nil {
6617					return err
6618				}
6619				dcp.ID = &ID
6620			}
6621		case "name":
6622			if v != nil {
6623				var name string
6624				err = json.Unmarshal(*v, &name)
6625				if err != nil {
6626					return err
6627				}
6628				dcp.Name = &name
6629			}
6630		case "type":
6631			if v != nil {
6632				var typeVar string
6633				err = json.Unmarshal(*v, &typeVar)
6634				if err != nil {
6635					return err
6636				}
6637				dcp.Type = &typeVar
6638			}
6639		case "location":
6640			if v != nil {
6641				var location string
6642				err = json.Unmarshal(*v, &location)
6643				if err != nil {
6644					return err
6645				}
6646				dcp.Location = &location
6647			}
6648		case "tags":
6649			if v != nil {
6650				var tags map[string]*string
6651				err = json.Unmarshal(*v, &tags)
6652				if err != nil {
6653					return err
6654				}
6655				dcp.Tags = tags
6656			}
6657		}
6658	}
6659
6660	return nil
6661}
6662
6663// DdosCustomPolicyPropertiesFormat dDoS custom policy properties.
6664type DdosCustomPolicyPropertiesFormat struct {
6665	// 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.
6666	ResourceGUID *string `json:"resourceGuid,omitempty"`
6667	// ProvisioningState - READ-ONLY; The provisioning state of the DDoS custom policy resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
6668	ProvisioningState *string `json:"provisioningState,omitempty"`
6669	// PublicIPAddresses - READ-ONLY; The list of public IPs associated with the DDoS custom policy resource. This list is read-only.
6670	PublicIPAddresses *[]SubResource `json:"publicIPAddresses,omitempty"`
6671	// ProtocolCustomSettings - The protocol-specific DDoS policy customization parameters.
6672	ProtocolCustomSettings *[]ProtocolCustomSettingsFormat `json:"protocolCustomSettings,omitempty"`
6673}
6674
6675// MarshalJSON is the custom marshaler for DdosCustomPolicyPropertiesFormat.
6676func (dcppf DdosCustomPolicyPropertiesFormat) MarshalJSON() ([]byte, error) {
6677	objectMap := make(map[string]interface{})
6678	if dcppf.ProtocolCustomSettings != nil {
6679		objectMap["protocolCustomSettings"] = dcppf.ProtocolCustomSettings
6680	}
6681	return json.Marshal(objectMap)
6682}
6683
6684// DdosProtectionPlan a DDoS protection plan in a resource group.
6685type DdosProtectionPlan struct {
6686	autorest.Response `json:"-"`
6687	// ID - READ-ONLY; Resource ID.
6688	ID *string `json:"id,omitempty"`
6689	// Name - READ-ONLY; Resource name.
6690	Name *string `json:"name,omitempty"`
6691	// Type - READ-ONLY; Resource type.
6692	Type *string `json:"type,omitempty"`
6693	// Location - Resource location.
6694	Location *string `json:"location,omitempty"`
6695	// Tags - Resource tags.
6696	Tags map[string]*string `json:"tags"`
6697	// DdosProtectionPlanPropertiesFormat - Properties of the DDoS protection plan.
6698	*DdosProtectionPlanPropertiesFormat `json:"properties,omitempty"`
6699	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
6700	Etag *string `json:"etag,omitempty"`
6701}
6702
6703// MarshalJSON is the custom marshaler for DdosProtectionPlan.
6704func (dpp DdosProtectionPlan) MarshalJSON() ([]byte, error) {
6705	objectMap := make(map[string]interface{})
6706	if dpp.Location != nil {
6707		objectMap["location"] = dpp.Location
6708	}
6709	if dpp.Tags != nil {
6710		objectMap["tags"] = dpp.Tags
6711	}
6712	if dpp.DdosProtectionPlanPropertiesFormat != nil {
6713		objectMap["properties"] = dpp.DdosProtectionPlanPropertiesFormat
6714	}
6715	return json.Marshal(objectMap)
6716}
6717
6718// UnmarshalJSON is the custom unmarshaler for DdosProtectionPlan struct.
6719func (dpp *DdosProtectionPlan) 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 "id":
6728			if v != nil {
6729				var ID string
6730				err = json.Unmarshal(*v, &ID)
6731				if err != nil {
6732					return err
6733				}
6734				dpp.ID = &ID
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				dpp.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				dpp.Type = &typeVar
6753			}
6754		case "location":
6755			if v != nil {
6756				var location string
6757				err = json.Unmarshal(*v, &location)
6758				if err != nil {
6759					return err
6760				}
6761				dpp.Location = &location
6762			}
6763		case "tags":
6764			if v != nil {
6765				var tags map[string]*string
6766				err = json.Unmarshal(*v, &tags)
6767				if err != nil {
6768					return err
6769				}
6770				dpp.Tags = tags
6771			}
6772		case "properties":
6773			if v != nil {
6774				var ddosProtectionPlanPropertiesFormat DdosProtectionPlanPropertiesFormat
6775				err = json.Unmarshal(*v, &ddosProtectionPlanPropertiesFormat)
6776				if err != nil {
6777					return err
6778				}
6779				dpp.DdosProtectionPlanPropertiesFormat = &ddosProtectionPlanPropertiesFormat
6780			}
6781		case "etag":
6782			if v != nil {
6783				var etag string
6784				err = json.Unmarshal(*v, &etag)
6785				if err != nil {
6786					return err
6787				}
6788				dpp.Etag = &etag
6789			}
6790		}
6791	}
6792
6793	return nil
6794}
6795
6796// DdosProtectionPlanListResult a list of DDoS protection plans.
6797type DdosProtectionPlanListResult struct {
6798	autorest.Response `json:"-"`
6799	// Value - A list of DDoS protection plans.
6800	Value *[]DdosProtectionPlan `json:"value,omitempty"`
6801	// NextLink - READ-ONLY; The URL to get the next set of results.
6802	NextLink *string `json:"nextLink,omitempty"`
6803}
6804
6805// MarshalJSON is the custom marshaler for DdosProtectionPlanListResult.
6806func (dpplr DdosProtectionPlanListResult) MarshalJSON() ([]byte, error) {
6807	objectMap := make(map[string]interface{})
6808	if dpplr.Value != nil {
6809		objectMap["value"] = dpplr.Value
6810	}
6811	return json.Marshal(objectMap)
6812}
6813
6814// DdosProtectionPlanListResultIterator provides access to a complete listing of DdosProtectionPlan values.
6815type DdosProtectionPlanListResultIterator struct {
6816	i    int
6817	page DdosProtectionPlanListResultPage
6818}
6819
6820// NextWithContext advances to the next value.  If there was an error making
6821// the request the iterator does not advance and the error is returned.
6822func (iter *DdosProtectionPlanListResultIterator) NextWithContext(ctx context.Context) (err error) {
6823	if tracing.IsEnabled() {
6824		ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlanListResultIterator.NextWithContext")
6825		defer func() {
6826			sc := -1
6827			if iter.Response().Response.Response != nil {
6828				sc = iter.Response().Response.Response.StatusCode
6829			}
6830			tracing.EndSpan(ctx, sc, err)
6831		}()
6832	}
6833	iter.i++
6834	if iter.i < len(iter.page.Values()) {
6835		return nil
6836	}
6837	err = iter.page.NextWithContext(ctx)
6838	if err != nil {
6839		iter.i--
6840		return err
6841	}
6842	iter.i = 0
6843	return nil
6844}
6845
6846// Next advances to the next value.  If there was an error making
6847// the request the iterator does not advance and the error is returned.
6848// Deprecated: Use NextWithContext() instead.
6849func (iter *DdosProtectionPlanListResultIterator) Next() error {
6850	return iter.NextWithContext(context.Background())
6851}
6852
6853// NotDone returns true if the enumeration should be started or is not yet complete.
6854func (iter DdosProtectionPlanListResultIterator) NotDone() bool {
6855	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6856}
6857
6858// Response returns the raw server response from the last page request.
6859func (iter DdosProtectionPlanListResultIterator) Response() DdosProtectionPlanListResult {
6860	return iter.page.Response()
6861}
6862
6863// Value returns the current value or a zero-initialized value if the
6864// iterator has advanced beyond the end of the collection.
6865func (iter DdosProtectionPlanListResultIterator) Value() DdosProtectionPlan {
6866	if !iter.page.NotDone() {
6867		return DdosProtectionPlan{}
6868	}
6869	return iter.page.Values()[iter.i]
6870}
6871
6872// Creates a new instance of the DdosProtectionPlanListResultIterator type.
6873func NewDdosProtectionPlanListResultIterator(page DdosProtectionPlanListResultPage) DdosProtectionPlanListResultIterator {
6874	return DdosProtectionPlanListResultIterator{page: page}
6875}
6876
6877// IsEmpty returns true if the ListResult contains no values.
6878func (dpplr DdosProtectionPlanListResult) IsEmpty() bool {
6879	return dpplr.Value == nil || len(*dpplr.Value) == 0
6880}
6881
6882// hasNextLink returns true if the NextLink is not empty.
6883func (dpplr DdosProtectionPlanListResult) hasNextLink() bool {
6884	return dpplr.NextLink != nil && len(*dpplr.NextLink) != 0
6885}
6886
6887// ddosProtectionPlanListResultPreparer prepares a request to retrieve the next set of results.
6888// It returns nil if no more results exist.
6889func (dpplr DdosProtectionPlanListResult) ddosProtectionPlanListResultPreparer(ctx context.Context) (*http.Request, error) {
6890	if !dpplr.hasNextLink() {
6891		return nil, nil
6892	}
6893	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6894		autorest.AsJSON(),
6895		autorest.AsGet(),
6896		autorest.WithBaseURL(to.String(dpplr.NextLink)))
6897}
6898
6899// DdosProtectionPlanListResultPage contains a page of DdosProtectionPlan values.
6900type DdosProtectionPlanListResultPage struct {
6901	fn    func(context.Context, DdosProtectionPlanListResult) (DdosProtectionPlanListResult, error)
6902	dpplr DdosProtectionPlanListResult
6903}
6904
6905// NextWithContext advances to the next page of values.  If there was an error making
6906// the request the page does not advance and the error is returned.
6907func (page *DdosProtectionPlanListResultPage) NextWithContext(ctx context.Context) (err error) {
6908	if tracing.IsEnabled() {
6909		ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlanListResultPage.NextWithContext")
6910		defer func() {
6911			sc := -1
6912			if page.Response().Response.Response != nil {
6913				sc = page.Response().Response.Response.StatusCode
6914			}
6915			tracing.EndSpan(ctx, sc, err)
6916		}()
6917	}
6918	for {
6919		next, err := page.fn(ctx, page.dpplr)
6920		if err != nil {
6921			return err
6922		}
6923		page.dpplr = next
6924		if !next.hasNextLink() || !next.IsEmpty() {
6925			break
6926		}
6927	}
6928	return nil
6929}
6930
6931// Next advances to the next page of values.  If there was an error making
6932// the request the page does not advance and the error is returned.
6933// Deprecated: Use NextWithContext() instead.
6934func (page *DdosProtectionPlanListResultPage) Next() error {
6935	return page.NextWithContext(context.Background())
6936}
6937
6938// NotDone returns true if the page enumeration should be started or is not yet complete.
6939func (page DdosProtectionPlanListResultPage) NotDone() bool {
6940	return !page.dpplr.IsEmpty()
6941}
6942
6943// Response returns the raw server response from the last page request.
6944func (page DdosProtectionPlanListResultPage) Response() DdosProtectionPlanListResult {
6945	return page.dpplr
6946}
6947
6948// Values returns the slice of values for the current page or nil if there are no values.
6949func (page DdosProtectionPlanListResultPage) Values() []DdosProtectionPlan {
6950	if page.dpplr.IsEmpty() {
6951		return nil
6952	}
6953	return *page.dpplr.Value
6954}
6955
6956// Creates a new instance of the DdosProtectionPlanListResultPage type.
6957func NewDdosProtectionPlanListResultPage(cur DdosProtectionPlanListResult, getNextPage func(context.Context, DdosProtectionPlanListResult) (DdosProtectionPlanListResult, error)) DdosProtectionPlanListResultPage {
6958	return DdosProtectionPlanListResultPage{
6959		fn:    getNextPage,
6960		dpplr: cur,
6961	}
6962}
6963
6964// DdosProtectionPlanPropertiesFormat dDoS protection plan properties.
6965type DdosProtectionPlanPropertiesFormat struct {
6966	// 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.
6967	ResourceGUID *string `json:"resourceGuid,omitempty"`
6968	// ProvisioningState - READ-ONLY; The provisioning state of the DDoS protection plan resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
6969	ProvisioningState *string `json:"provisioningState,omitempty"`
6970	// VirtualNetworks - READ-ONLY; The list of virtual networks associated with the DDoS protection plan resource. This list is read-only.
6971	VirtualNetworks *[]SubResource `json:"virtualNetworks,omitempty"`
6972}
6973
6974// MarshalJSON is the custom marshaler for DdosProtectionPlanPropertiesFormat.
6975func (dpppf DdosProtectionPlanPropertiesFormat) MarshalJSON() ([]byte, error) {
6976	objectMap := make(map[string]interface{})
6977	return json.Marshal(objectMap)
6978}
6979
6980// DdosProtectionPlansCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
6981// long-running operation.
6982type DdosProtectionPlansCreateOrUpdateFuture struct {
6983	azure.FutureAPI
6984	// Result returns the result of the asynchronous operation.
6985	// If the operation has not completed it will return an error.
6986	Result func(DdosProtectionPlansClient) (DdosProtectionPlan, error)
6987}
6988
6989// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6990func (future *DdosProtectionPlansCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
6991	var azFuture azure.Future
6992	if err := json.Unmarshal(body, &azFuture); err != nil {
6993		return err
6994	}
6995	future.FutureAPI = &azFuture
6996	future.Result = future.result
6997	return nil
6998}
6999
7000// result is the default implementation for DdosProtectionPlansCreateOrUpdateFuture.Result.
7001func (future *DdosProtectionPlansCreateOrUpdateFuture) result(client DdosProtectionPlansClient) (dpp DdosProtectionPlan, err error) {
7002	var done bool
7003	done, err = future.DoneWithContext(context.Background(), client)
7004	if err != nil {
7005		err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
7006		return
7007	}
7008	if !done {
7009		dpp.Response.Response = future.Response()
7010		err = azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansCreateOrUpdateFuture")
7011		return
7012	}
7013	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7014	if dpp.Response.Response, err = future.GetResult(sender); err == nil && dpp.Response.Response.StatusCode != http.StatusNoContent {
7015		dpp, err = client.CreateOrUpdateResponder(dpp.Response.Response)
7016		if err != nil {
7017			err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansCreateOrUpdateFuture", "Result", dpp.Response.Response, "Failure responding to request")
7018		}
7019	}
7020	return
7021}
7022
7023// DdosProtectionPlansDeleteFuture an abstraction for monitoring and retrieving the results of a
7024// long-running operation.
7025type DdosProtectionPlansDeleteFuture struct {
7026	azure.FutureAPI
7027	// Result returns the result of the asynchronous operation.
7028	// If the operation has not completed it will return an error.
7029	Result func(DdosProtectionPlansClient) (autorest.Response, error)
7030}
7031
7032// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7033func (future *DdosProtectionPlansDeleteFuture) UnmarshalJSON(body []byte) error {
7034	var azFuture azure.Future
7035	if err := json.Unmarshal(body, &azFuture); err != nil {
7036		return err
7037	}
7038	future.FutureAPI = &azFuture
7039	future.Result = future.result
7040	return nil
7041}
7042
7043// result is the default implementation for DdosProtectionPlansDeleteFuture.Result.
7044func (future *DdosProtectionPlansDeleteFuture) result(client DdosProtectionPlansClient) (ar autorest.Response, err error) {
7045	var done bool
7046	done, err = future.DoneWithContext(context.Background(), client)
7047	if err != nil {
7048		err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansDeleteFuture", "Result", future.Response(), "Polling failure")
7049		return
7050	}
7051	if !done {
7052		ar.Response = future.Response()
7053		err = azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansDeleteFuture")
7054		return
7055	}
7056	ar.Response = future.Response()
7057	return
7058}
7059
7060// DdosProtectionPlansUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
7061// long-running operation.
7062type DdosProtectionPlansUpdateTagsFuture struct {
7063	azure.FutureAPI
7064	// Result returns the result of the asynchronous operation.
7065	// If the operation has not completed it will return an error.
7066	Result func(DdosProtectionPlansClient) (DdosProtectionPlan, error)
7067}
7068
7069// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7070func (future *DdosProtectionPlansUpdateTagsFuture) UnmarshalJSON(body []byte) error {
7071	var azFuture azure.Future
7072	if err := json.Unmarshal(body, &azFuture); err != nil {
7073		return err
7074	}
7075	future.FutureAPI = &azFuture
7076	future.Result = future.result
7077	return nil
7078}
7079
7080// result is the default implementation for DdosProtectionPlansUpdateTagsFuture.Result.
7081func (future *DdosProtectionPlansUpdateTagsFuture) result(client DdosProtectionPlansClient) (dpp DdosProtectionPlan, err error) {
7082	var done bool
7083	done, err = future.DoneWithContext(context.Background(), client)
7084	if err != nil {
7085		err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansUpdateTagsFuture", "Result", future.Response(), "Polling failure")
7086		return
7087	}
7088	if !done {
7089		dpp.Response.Response = future.Response()
7090		err = azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansUpdateTagsFuture")
7091		return
7092	}
7093	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7094	if dpp.Response.Response, err = future.GetResult(sender); err == nil && dpp.Response.Response.StatusCode != http.StatusNoContent {
7095		dpp, err = client.UpdateTagsResponder(dpp.Response.Response)
7096		if err != nil {
7097			err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansUpdateTagsFuture", "Result", dpp.Response.Response, "Failure responding to request")
7098		}
7099	}
7100	return
7101}
7102
7103// DdosSettings contains the DDoS protection settings of the public IP.
7104type DdosSettings struct {
7105	// DdosCustomPolicy - The DDoS custom policy associated with the public IP.
7106	DdosCustomPolicy *SubResource `json:"ddosCustomPolicy,omitempty"`
7107	// ProtectionCoverage - The DDoS protection policy customizability of the public IP. Only standard coverage will have the ability to be customized. Possible values include: 'ProtectionCoverageBasic', 'ProtectionCoverageStandard'
7108	ProtectionCoverage ProtectionCoverage `json:"protectionCoverage,omitempty"`
7109}
7110
7111// Delegation details the service to which the subnet is delegated.
7112type Delegation struct {
7113	// ServiceDelegationPropertiesFormat - Properties of the subnet.
7114	*ServiceDelegationPropertiesFormat `json:"properties,omitempty"`
7115	// Name - The name of the resource that is unique within a subnet. This name can be used to access the resource.
7116	Name *string `json:"name,omitempty"`
7117	// Etag - A unique read-only string that changes whenever the resource is updated.
7118	Etag *string `json:"etag,omitempty"`
7119	// ID - Resource ID.
7120	ID *string `json:"id,omitempty"`
7121}
7122
7123// MarshalJSON is the custom marshaler for Delegation.
7124func (d Delegation) MarshalJSON() ([]byte, error) {
7125	objectMap := make(map[string]interface{})
7126	if d.ServiceDelegationPropertiesFormat != nil {
7127		objectMap["properties"] = d.ServiceDelegationPropertiesFormat
7128	}
7129	if d.Name != nil {
7130		objectMap["name"] = d.Name
7131	}
7132	if d.Etag != nil {
7133		objectMap["etag"] = d.Etag
7134	}
7135	if d.ID != nil {
7136		objectMap["id"] = d.ID
7137	}
7138	return json.Marshal(objectMap)
7139}
7140
7141// UnmarshalJSON is the custom unmarshaler for Delegation struct.
7142func (d *Delegation) UnmarshalJSON(body []byte) error {
7143	var m map[string]*json.RawMessage
7144	err := json.Unmarshal(body, &m)
7145	if err != nil {
7146		return err
7147	}
7148	for k, v := range m {
7149		switch k {
7150		case "properties":
7151			if v != nil {
7152				var serviceDelegationPropertiesFormat ServiceDelegationPropertiesFormat
7153				err = json.Unmarshal(*v, &serviceDelegationPropertiesFormat)
7154				if err != nil {
7155					return err
7156				}
7157				d.ServiceDelegationPropertiesFormat = &serviceDelegationPropertiesFormat
7158			}
7159		case "name":
7160			if v != nil {
7161				var name string
7162				err = json.Unmarshal(*v, &name)
7163				if err != nil {
7164					return err
7165				}
7166				d.Name = &name
7167			}
7168		case "etag":
7169			if v != nil {
7170				var etag string
7171				err = json.Unmarshal(*v, &etag)
7172				if err != nil {
7173					return err
7174				}
7175				d.Etag = &etag
7176			}
7177		case "id":
7178			if v != nil {
7179				var ID string
7180				err = json.Unmarshal(*v, &ID)
7181				if err != nil {
7182					return err
7183				}
7184				d.ID = &ID
7185			}
7186		}
7187	}
7188
7189	return nil
7190}
7191
7192// DeviceProperties list of properties of the device.
7193type DeviceProperties struct {
7194	// DeviceVendor - Name of the device Vendor.
7195	DeviceVendor *string `json:"deviceVendor,omitempty"`
7196	// DeviceModel - Model of the device.
7197	DeviceModel *string `json:"deviceModel,omitempty"`
7198	// LinkSpeedInMbps - Link speed.
7199	LinkSpeedInMbps *int32 `json:"linkSpeedInMbps,omitempty"`
7200}
7201
7202// DhcpOptions dhcpOptions contains an array of DNS servers available to VMs deployed in the virtual
7203// network. Standard DHCP option for a subnet overrides VNET DHCP options.
7204type DhcpOptions struct {
7205	// DNSServers - The list of DNS servers IP addresses.
7206	DNSServers *[]string `json:"dnsServers,omitempty"`
7207}
7208
7209// Dimension dimension of the metric.
7210type Dimension struct {
7211	// Name - The name of the dimension.
7212	Name *string `json:"name,omitempty"`
7213	// DisplayName - The display name of the dimension.
7214	DisplayName *string `json:"displayName,omitempty"`
7215	// InternalName - The internal name of the dimension.
7216	InternalName *string `json:"internalName,omitempty"`
7217}
7218
7219// DNSNameAvailabilityResult response for the CheckDnsNameAvailability API service call.
7220type DNSNameAvailabilityResult struct {
7221	autorest.Response `json:"-"`
7222	// Available - Domain availability (True/False).
7223	Available *bool `json:"available,omitempty"`
7224}
7225
7226// EffectiveNetworkSecurityGroup effective network security group.
7227type EffectiveNetworkSecurityGroup struct {
7228	// NetworkSecurityGroup - The ID of network security group that is applied.
7229	NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"`
7230	// Association - Associated resources.
7231	Association *EffectiveNetworkSecurityGroupAssociation `json:"association,omitempty"`
7232	// EffectiveSecurityRules - A collection of effective security rules.
7233	EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"`
7234	// TagMap - Mapping of tags to list of IP Addresses included within the tag.
7235	TagMap map[string][]string `json:"tagMap"`
7236}
7237
7238// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroup.
7239func (ensg EffectiveNetworkSecurityGroup) MarshalJSON() ([]byte, error) {
7240	objectMap := make(map[string]interface{})
7241	if ensg.NetworkSecurityGroup != nil {
7242		objectMap["networkSecurityGroup"] = ensg.NetworkSecurityGroup
7243	}
7244	if ensg.Association != nil {
7245		objectMap["association"] = ensg.Association
7246	}
7247	if ensg.EffectiveSecurityRules != nil {
7248		objectMap["effectiveSecurityRules"] = ensg.EffectiveSecurityRules
7249	}
7250	if ensg.TagMap != nil {
7251		objectMap["tagMap"] = ensg.TagMap
7252	}
7253	return json.Marshal(objectMap)
7254}
7255
7256// EffectiveNetworkSecurityGroupAssociation the effective network security group association.
7257type EffectiveNetworkSecurityGroupAssociation struct {
7258	// Subnet - The ID of the subnet if assigned.
7259	Subnet *SubResource `json:"subnet,omitempty"`
7260	// NetworkInterface - The ID of the network interface if assigned.
7261	NetworkInterface *SubResource `json:"networkInterface,omitempty"`
7262}
7263
7264// EffectiveNetworkSecurityGroupListResult response for list effective network security groups API service
7265// call.
7266type EffectiveNetworkSecurityGroupListResult struct {
7267	autorest.Response `json:"-"`
7268	// Value - A list of effective network security groups.
7269	Value *[]EffectiveNetworkSecurityGroup `json:"value,omitempty"`
7270	// NextLink - READ-ONLY; The URL to get the next set of results.
7271	NextLink *string `json:"nextLink,omitempty"`
7272}
7273
7274// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroupListResult.
7275func (ensglr EffectiveNetworkSecurityGroupListResult) MarshalJSON() ([]byte, error) {
7276	objectMap := make(map[string]interface{})
7277	if ensglr.Value != nil {
7278		objectMap["value"] = ensglr.Value
7279	}
7280	return json.Marshal(objectMap)
7281}
7282
7283// EffectiveNetworkSecurityRule effective network security rules.
7284type EffectiveNetworkSecurityRule struct {
7285	// Name - The name of the security rule specified by the user (if created by the user).
7286	Name *string `json:"name,omitempty"`
7287	// Protocol - The network protocol this rule applies to. Possible values are: 'Tcp', 'Udp', and 'All'. Possible values include: 'EffectiveSecurityRuleProtocolTCP', 'EffectiveSecurityRuleProtocolUDP', 'EffectiveSecurityRuleProtocolAll'
7288	Protocol EffectiveSecurityRuleProtocol `json:"protocol,omitempty"`
7289	// SourcePortRange - The source port or range.
7290	SourcePortRange *string `json:"sourcePortRange,omitempty"`
7291	// DestinationPortRange - The destination port or range.
7292	DestinationPortRange *string `json:"destinationPortRange,omitempty"`
7293	// 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 (*)
7294	SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"`
7295	// 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 (*)
7296	DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"`
7297	// SourceAddressPrefix - The source address prefix.
7298	SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
7299	// DestinationAddressPrefix - The destination address prefix.
7300	DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"`
7301	// SourceAddressPrefixes - The source address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*).
7302	SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"`
7303	// DestinationAddressPrefixes - The destination address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*).
7304	DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"`
7305	// ExpandedSourceAddressPrefix - The expanded source address prefix.
7306	ExpandedSourceAddressPrefix *[]string `json:"expandedSourceAddressPrefix,omitempty"`
7307	// ExpandedDestinationAddressPrefix - Expanded destination address prefix.
7308	ExpandedDestinationAddressPrefix *[]string `json:"expandedDestinationAddressPrefix,omitempty"`
7309	// Access - Whether network traffic is allowed or denied. Possible values are: 'Allow' and 'Deny'. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
7310	Access SecurityRuleAccess `json:"access,omitempty"`
7311	// Priority - The priority of the rule.
7312	Priority *int32 `json:"priority,omitempty"`
7313	// Direction - The direction of the rule. Possible values are: 'Inbound and Outbound'. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound'
7314	Direction SecurityRuleDirection `json:"direction,omitempty"`
7315}
7316
7317// EffectiveRoute effective Route
7318type EffectiveRoute struct {
7319	// Name - The name of the user defined route. This is optional.
7320	Name *string `json:"name,omitempty"`
7321	// Source - Who created the route. Possible values are: 'Unknown', 'User', 'VirtualNetworkGateway', and 'Default'. Possible values include: 'EffectiveRouteSourceUnknown', 'EffectiveRouteSourceUser', 'EffectiveRouteSourceVirtualNetworkGateway', 'EffectiveRouteSourceDefault'
7322	Source EffectiveRouteSource `json:"source,omitempty"`
7323	// State - The value of effective route. Possible values are: 'Active' and 'Invalid'. Possible values include: 'EffectiveRouteStateActive', 'EffectiveRouteStateInvalid'
7324	State EffectiveRouteState `json:"state,omitempty"`
7325	// AddressPrefix - The address prefixes of the effective routes in CIDR notation.
7326	AddressPrefix *[]string `json:"addressPrefix,omitempty"`
7327	// NextHopIPAddress - The IP address of the next hop of the effective route.
7328	NextHopIPAddress *[]string `json:"nextHopIpAddress,omitempty"`
7329	// NextHopType - The type of Azure hop the packet should be sent to. Possible values are: 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', and 'None'. Possible values include: 'RouteNextHopTypeVirtualNetworkGateway', 'RouteNextHopTypeVnetLocal', 'RouteNextHopTypeInternet', 'RouteNextHopTypeVirtualAppliance', 'RouteNextHopTypeNone'
7330	NextHopType RouteNextHopType `json:"nextHopType,omitempty"`
7331}
7332
7333// EffectiveRouteListResult response for list effective route API service call.
7334type EffectiveRouteListResult struct {
7335	autorest.Response `json:"-"`
7336	// Value - A list of effective routes.
7337	Value *[]EffectiveRoute `json:"value,omitempty"`
7338	// NextLink - READ-ONLY; The URL to get the next set of results.
7339	NextLink *string `json:"nextLink,omitempty"`
7340}
7341
7342// MarshalJSON is the custom marshaler for EffectiveRouteListResult.
7343func (erlr EffectiveRouteListResult) MarshalJSON() ([]byte, error) {
7344	objectMap := make(map[string]interface{})
7345	if erlr.Value != nil {
7346		objectMap["value"] = erlr.Value
7347	}
7348	return json.Marshal(objectMap)
7349}
7350
7351// EndpointService identifies the service being brought into the virtual network.
7352type EndpointService struct {
7353	// ID - A unique identifier of the service being referenced by the interface endpoint.
7354	ID *string `json:"id,omitempty"`
7355}
7356
7357// EndpointServiceResult endpoint service.
7358type EndpointServiceResult struct {
7359	// Name - READ-ONLY; Name of the endpoint service.
7360	Name *string `json:"name,omitempty"`
7361	// Type - READ-ONLY; Type of the endpoint service.
7362	Type *string `json:"type,omitempty"`
7363	// ID - Resource ID.
7364	ID *string `json:"id,omitempty"`
7365}
7366
7367// MarshalJSON is the custom marshaler for EndpointServiceResult.
7368func (esr EndpointServiceResult) MarshalJSON() ([]byte, error) {
7369	objectMap := make(map[string]interface{})
7370	if esr.ID != nil {
7371		objectMap["id"] = esr.ID
7372	}
7373	return json.Marshal(objectMap)
7374}
7375
7376// EndpointServicesListResult response for the ListAvailableEndpointServices API service call.
7377type EndpointServicesListResult struct {
7378	autorest.Response `json:"-"`
7379	// Value - List of available endpoint services in a region.
7380	Value *[]EndpointServiceResult `json:"value,omitempty"`
7381	// NextLink - The URL to get the next set of results.
7382	NextLink *string `json:"nextLink,omitempty"`
7383}
7384
7385// EndpointServicesListResultIterator provides access to a complete listing of EndpointServiceResult
7386// values.
7387type EndpointServicesListResultIterator struct {
7388	i    int
7389	page EndpointServicesListResultPage
7390}
7391
7392// NextWithContext advances to the next value.  If there was an error making
7393// the request the iterator does not advance and the error is returned.
7394func (iter *EndpointServicesListResultIterator) NextWithContext(ctx context.Context) (err error) {
7395	if tracing.IsEnabled() {
7396		ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultIterator.NextWithContext")
7397		defer func() {
7398			sc := -1
7399			if iter.Response().Response.Response != nil {
7400				sc = iter.Response().Response.Response.StatusCode
7401			}
7402			tracing.EndSpan(ctx, sc, err)
7403		}()
7404	}
7405	iter.i++
7406	if iter.i < len(iter.page.Values()) {
7407		return nil
7408	}
7409	err = iter.page.NextWithContext(ctx)
7410	if err != nil {
7411		iter.i--
7412		return err
7413	}
7414	iter.i = 0
7415	return nil
7416}
7417
7418// Next advances to the next value.  If there was an error making
7419// the request the iterator does not advance and the error is returned.
7420// Deprecated: Use NextWithContext() instead.
7421func (iter *EndpointServicesListResultIterator) Next() error {
7422	return iter.NextWithContext(context.Background())
7423}
7424
7425// NotDone returns true if the enumeration should be started or is not yet complete.
7426func (iter EndpointServicesListResultIterator) NotDone() bool {
7427	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7428}
7429
7430// Response returns the raw server response from the last page request.
7431func (iter EndpointServicesListResultIterator) Response() EndpointServicesListResult {
7432	return iter.page.Response()
7433}
7434
7435// Value returns the current value or a zero-initialized value if the
7436// iterator has advanced beyond the end of the collection.
7437func (iter EndpointServicesListResultIterator) Value() EndpointServiceResult {
7438	if !iter.page.NotDone() {
7439		return EndpointServiceResult{}
7440	}
7441	return iter.page.Values()[iter.i]
7442}
7443
7444// Creates a new instance of the EndpointServicesListResultIterator type.
7445func NewEndpointServicesListResultIterator(page EndpointServicesListResultPage) EndpointServicesListResultIterator {
7446	return EndpointServicesListResultIterator{page: page}
7447}
7448
7449// IsEmpty returns true if the ListResult contains no values.
7450func (eslr EndpointServicesListResult) IsEmpty() bool {
7451	return eslr.Value == nil || len(*eslr.Value) == 0
7452}
7453
7454// hasNextLink returns true if the NextLink is not empty.
7455func (eslr EndpointServicesListResult) hasNextLink() bool {
7456	return eslr.NextLink != nil && len(*eslr.NextLink) != 0
7457}
7458
7459// endpointServicesListResultPreparer prepares a request to retrieve the next set of results.
7460// It returns nil if no more results exist.
7461func (eslr EndpointServicesListResult) endpointServicesListResultPreparer(ctx context.Context) (*http.Request, error) {
7462	if !eslr.hasNextLink() {
7463		return nil, nil
7464	}
7465	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7466		autorest.AsJSON(),
7467		autorest.AsGet(),
7468		autorest.WithBaseURL(to.String(eslr.NextLink)))
7469}
7470
7471// EndpointServicesListResultPage contains a page of EndpointServiceResult values.
7472type EndpointServicesListResultPage struct {
7473	fn   func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)
7474	eslr EndpointServicesListResult
7475}
7476
7477// NextWithContext advances to the next page of values.  If there was an error making
7478// the request the page does not advance and the error is returned.
7479func (page *EndpointServicesListResultPage) NextWithContext(ctx context.Context) (err error) {
7480	if tracing.IsEnabled() {
7481		ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultPage.NextWithContext")
7482		defer func() {
7483			sc := -1
7484			if page.Response().Response.Response != nil {
7485				sc = page.Response().Response.Response.StatusCode
7486			}
7487			tracing.EndSpan(ctx, sc, err)
7488		}()
7489	}
7490	for {
7491		next, err := page.fn(ctx, page.eslr)
7492		if err != nil {
7493			return err
7494		}
7495		page.eslr = next
7496		if !next.hasNextLink() || !next.IsEmpty() {
7497			break
7498		}
7499	}
7500	return nil
7501}
7502
7503// Next advances to the next page of values.  If there was an error making
7504// the request the page does not advance and the error is returned.
7505// Deprecated: Use NextWithContext() instead.
7506func (page *EndpointServicesListResultPage) Next() error {
7507	return page.NextWithContext(context.Background())
7508}
7509
7510// NotDone returns true if the page enumeration should be started or is not yet complete.
7511func (page EndpointServicesListResultPage) NotDone() bool {
7512	return !page.eslr.IsEmpty()
7513}
7514
7515// Response returns the raw server response from the last page request.
7516func (page EndpointServicesListResultPage) Response() EndpointServicesListResult {
7517	return page.eslr
7518}
7519
7520// Values returns the slice of values for the current page or nil if there are no values.
7521func (page EndpointServicesListResultPage) Values() []EndpointServiceResult {
7522	if page.eslr.IsEmpty() {
7523		return nil
7524	}
7525	return *page.eslr.Value
7526}
7527
7528// Creates a new instance of the EndpointServicesListResultPage type.
7529func NewEndpointServicesListResultPage(cur EndpointServicesListResult, getNextPage func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)) EndpointServicesListResultPage {
7530	return EndpointServicesListResultPage{
7531		fn:   getNextPage,
7532		eslr: cur,
7533	}
7534}
7535
7536// Error ...
7537type Error struct {
7538	Code       *string         `json:"code,omitempty"`
7539	Message    *string         `json:"message,omitempty"`
7540	Target     *string         `json:"target,omitempty"`
7541	Details    *[]ErrorDetails `json:"details,omitempty"`
7542	InnerError *string         `json:"innerError,omitempty"`
7543}
7544
7545// ErrorDetails ...
7546type ErrorDetails struct {
7547	Code    *string `json:"code,omitempty"`
7548	Target  *string `json:"target,omitempty"`
7549	Message *string `json:"message,omitempty"`
7550}
7551
7552// ErrorResponse the error object.
7553type ErrorResponse struct {
7554	Error *ErrorDetails `json:"error,omitempty"`
7555}
7556
7557// EvaluatedNetworkSecurityGroup results of network security group evaluation.
7558type EvaluatedNetworkSecurityGroup struct {
7559	// NetworkSecurityGroupID - Network security group ID.
7560	NetworkSecurityGroupID *string `json:"networkSecurityGroupId,omitempty"`
7561	// AppliedTo - Resource ID of nic or subnet to which network security group is applied.
7562	AppliedTo   *string      `json:"appliedTo,omitempty"`
7563	MatchedRule *MatchedRule `json:"matchedRule,omitempty"`
7564	// RulesEvaluationResult - READ-ONLY; List of network security rules evaluation results.
7565	RulesEvaluationResult *[]SecurityRulesEvaluationResult `json:"rulesEvaluationResult,omitempty"`
7566}
7567
7568// MarshalJSON is the custom marshaler for EvaluatedNetworkSecurityGroup.
7569func (ensg EvaluatedNetworkSecurityGroup) MarshalJSON() ([]byte, error) {
7570	objectMap := make(map[string]interface{})
7571	if ensg.NetworkSecurityGroupID != nil {
7572		objectMap["networkSecurityGroupId"] = ensg.NetworkSecurityGroupID
7573	}
7574	if ensg.AppliedTo != nil {
7575		objectMap["appliedTo"] = ensg.AppliedTo
7576	}
7577	if ensg.MatchedRule != nil {
7578		objectMap["matchedRule"] = ensg.MatchedRule
7579	}
7580	return json.Marshal(objectMap)
7581}
7582
7583// ExpressRouteCircuit expressRouteCircuit resource
7584type ExpressRouteCircuit struct {
7585	autorest.Response `json:"-"`
7586	// Sku - The SKU.
7587	Sku                                  *ExpressRouteCircuitSku `json:"sku,omitempty"`
7588	*ExpressRouteCircuitPropertiesFormat `json:"properties,omitempty"`
7589	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
7590	Etag *string `json:"etag,omitempty"`
7591	// ID - Resource ID.
7592	ID *string `json:"id,omitempty"`
7593	// Name - READ-ONLY; Resource name.
7594	Name *string `json:"name,omitempty"`
7595	// Type - READ-ONLY; Resource type.
7596	Type *string `json:"type,omitempty"`
7597	// Location - Resource location.
7598	Location *string `json:"location,omitempty"`
7599	// Tags - Resource tags.
7600	Tags map[string]*string `json:"tags"`
7601}
7602
7603// MarshalJSON is the custom marshaler for ExpressRouteCircuit.
7604func (erc ExpressRouteCircuit) MarshalJSON() ([]byte, error) {
7605	objectMap := make(map[string]interface{})
7606	if erc.Sku != nil {
7607		objectMap["sku"] = erc.Sku
7608	}
7609	if erc.ExpressRouteCircuitPropertiesFormat != nil {
7610		objectMap["properties"] = erc.ExpressRouteCircuitPropertiesFormat
7611	}
7612	if erc.ID != nil {
7613		objectMap["id"] = erc.ID
7614	}
7615	if erc.Location != nil {
7616		objectMap["location"] = erc.Location
7617	}
7618	if erc.Tags != nil {
7619		objectMap["tags"] = erc.Tags
7620	}
7621	return json.Marshal(objectMap)
7622}
7623
7624// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuit struct.
7625func (erc *ExpressRouteCircuit) UnmarshalJSON(body []byte) error {
7626	var m map[string]*json.RawMessage
7627	err := json.Unmarshal(body, &m)
7628	if err != nil {
7629		return err
7630	}
7631	for k, v := range m {
7632		switch k {
7633		case "sku":
7634			if v != nil {
7635				var sku ExpressRouteCircuitSku
7636				err = json.Unmarshal(*v, &sku)
7637				if err != nil {
7638					return err
7639				}
7640				erc.Sku = &sku
7641			}
7642		case "properties":
7643			if v != nil {
7644				var expressRouteCircuitPropertiesFormat ExpressRouteCircuitPropertiesFormat
7645				err = json.Unmarshal(*v, &expressRouteCircuitPropertiesFormat)
7646				if err != nil {
7647					return err
7648				}
7649				erc.ExpressRouteCircuitPropertiesFormat = &expressRouteCircuitPropertiesFormat
7650			}
7651		case "etag":
7652			if v != nil {
7653				var etag string
7654				err = json.Unmarshal(*v, &etag)
7655				if err != nil {
7656					return err
7657				}
7658				erc.Etag = &etag
7659			}
7660		case "id":
7661			if v != nil {
7662				var ID string
7663				err = json.Unmarshal(*v, &ID)
7664				if err != nil {
7665					return err
7666				}
7667				erc.ID = &ID
7668			}
7669		case "name":
7670			if v != nil {
7671				var name string
7672				err = json.Unmarshal(*v, &name)
7673				if err != nil {
7674					return err
7675				}
7676				erc.Name = &name
7677			}
7678		case "type":
7679			if v != nil {
7680				var typeVar string
7681				err = json.Unmarshal(*v, &typeVar)
7682				if err != nil {
7683					return err
7684				}
7685				erc.Type = &typeVar
7686			}
7687		case "location":
7688			if v != nil {
7689				var location string
7690				err = json.Unmarshal(*v, &location)
7691				if err != nil {
7692					return err
7693				}
7694				erc.Location = &location
7695			}
7696		case "tags":
7697			if v != nil {
7698				var tags map[string]*string
7699				err = json.Unmarshal(*v, &tags)
7700				if err != nil {
7701					return err
7702				}
7703				erc.Tags = tags
7704			}
7705		}
7706	}
7707
7708	return nil
7709}
7710
7711// ExpressRouteCircuitArpTable the ARP table associated with the ExpressRouteCircuit.
7712type ExpressRouteCircuitArpTable struct {
7713	// Age - Entry age in minutes
7714	Age *int32 `json:"age,omitempty"`
7715	// Interface - Interface address
7716	Interface *string `json:"interface,omitempty"`
7717	// IPAddress - The IP address.
7718	IPAddress *string `json:"ipAddress,omitempty"`
7719	// MacAddress - The MAC address.
7720	MacAddress *string `json:"macAddress,omitempty"`
7721}
7722
7723// ExpressRouteCircuitAuthorization authorization in an ExpressRouteCircuit resource.
7724type ExpressRouteCircuitAuthorization struct {
7725	autorest.Response              `json:"-"`
7726	*AuthorizationPropertiesFormat `json:"properties,omitempty"`
7727	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
7728	Name *string `json:"name,omitempty"`
7729	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
7730	Etag *string `json:"etag,omitempty"`
7731	// ID - Resource ID.
7732	ID *string `json:"id,omitempty"`
7733}
7734
7735// MarshalJSON is the custom marshaler for ExpressRouteCircuitAuthorization.
7736func (erca ExpressRouteCircuitAuthorization) MarshalJSON() ([]byte, error) {
7737	objectMap := make(map[string]interface{})
7738	if erca.AuthorizationPropertiesFormat != nil {
7739		objectMap["properties"] = erca.AuthorizationPropertiesFormat
7740	}
7741	if erca.Name != nil {
7742		objectMap["name"] = erca.Name
7743	}
7744	if erca.ID != nil {
7745		objectMap["id"] = erca.ID
7746	}
7747	return json.Marshal(objectMap)
7748}
7749
7750// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitAuthorization struct.
7751func (erca *ExpressRouteCircuitAuthorization) UnmarshalJSON(body []byte) error {
7752	var m map[string]*json.RawMessage
7753	err := json.Unmarshal(body, &m)
7754	if err != nil {
7755		return err
7756	}
7757	for k, v := range m {
7758		switch k {
7759		case "properties":
7760			if v != nil {
7761				var authorizationPropertiesFormat AuthorizationPropertiesFormat
7762				err = json.Unmarshal(*v, &authorizationPropertiesFormat)
7763				if err != nil {
7764					return err
7765				}
7766				erca.AuthorizationPropertiesFormat = &authorizationPropertiesFormat
7767			}
7768		case "name":
7769			if v != nil {
7770				var name string
7771				err = json.Unmarshal(*v, &name)
7772				if err != nil {
7773					return err
7774				}
7775				erca.Name = &name
7776			}
7777		case "etag":
7778			if v != nil {
7779				var etag string
7780				err = json.Unmarshal(*v, &etag)
7781				if err != nil {
7782					return err
7783				}
7784				erca.Etag = &etag
7785			}
7786		case "id":
7787			if v != nil {
7788				var ID string
7789				err = json.Unmarshal(*v, &ID)
7790				if err != nil {
7791					return err
7792				}
7793				erca.ID = &ID
7794			}
7795		}
7796	}
7797
7798	return nil
7799}
7800
7801// ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
7802// results of a long-running operation.
7803type ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture struct {
7804	azure.FutureAPI
7805	// Result returns the result of the asynchronous operation.
7806	// If the operation has not completed it will return an error.
7807	Result func(ExpressRouteCircuitAuthorizationsClient) (ExpressRouteCircuitAuthorization, error)
7808}
7809
7810// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7811func (future *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
7812	var azFuture azure.Future
7813	if err := json.Unmarshal(body, &azFuture); err != nil {
7814		return err
7815	}
7816	future.FutureAPI = &azFuture
7817	future.Result = future.result
7818	return nil
7819}
7820
7821// result is the default implementation for ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture.Result.
7822func (future *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) result(client ExpressRouteCircuitAuthorizationsClient) (erca ExpressRouteCircuitAuthorization, err error) {
7823	var done bool
7824	done, err = future.DoneWithContext(context.Background(), client)
7825	if err != nil {
7826		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
7827		return
7828	}
7829	if !done {
7830		erca.Response.Response = future.Response()
7831		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture")
7832		return
7833	}
7834	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7835	if erca.Response.Response, err = future.GetResult(sender); err == nil && erca.Response.Response.StatusCode != http.StatusNoContent {
7836		erca, err = client.CreateOrUpdateResponder(erca.Response.Response)
7837		if err != nil {
7838			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", erca.Response.Response, "Failure responding to request")
7839		}
7840	}
7841	return
7842}
7843
7844// ExpressRouteCircuitAuthorizationsDeleteFuture an abstraction for monitoring and retrieving the results
7845// of a long-running operation.
7846type ExpressRouteCircuitAuthorizationsDeleteFuture struct {
7847	azure.FutureAPI
7848	// Result returns the result of the asynchronous operation.
7849	// If the operation has not completed it will return an error.
7850	Result func(ExpressRouteCircuitAuthorizationsClient) (autorest.Response, error)
7851}
7852
7853// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7854func (future *ExpressRouteCircuitAuthorizationsDeleteFuture) UnmarshalJSON(body []byte) error {
7855	var azFuture azure.Future
7856	if err := json.Unmarshal(body, &azFuture); err != nil {
7857		return err
7858	}
7859	future.FutureAPI = &azFuture
7860	future.Result = future.result
7861	return nil
7862}
7863
7864// result is the default implementation for ExpressRouteCircuitAuthorizationsDeleteFuture.Result.
7865func (future *ExpressRouteCircuitAuthorizationsDeleteFuture) result(client ExpressRouteCircuitAuthorizationsClient) (ar autorest.Response, err error) {
7866	var done bool
7867	done, err = future.DoneWithContext(context.Background(), client)
7868	if err != nil {
7869		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", future.Response(), "Polling failure")
7870		return
7871	}
7872	if !done {
7873		ar.Response = future.Response()
7874		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsDeleteFuture")
7875		return
7876	}
7877	ar.Response = future.Response()
7878	return
7879}
7880
7881// ExpressRouteCircuitConnection express Route Circuit Connection in an ExpressRouteCircuitPeering
7882// resource.
7883type ExpressRouteCircuitConnection struct {
7884	autorest.Response                              `json:"-"`
7885	*ExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"`
7886	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
7887	Name *string `json:"name,omitempty"`
7888	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
7889	Etag *string `json:"etag,omitempty"`
7890	// ID - Resource ID.
7891	ID *string `json:"id,omitempty"`
7892}
7893
7894// MarshalJSON is the custom marshaler for ExpressRouteCircuitConnection.
7895func (ercc ExpressRouteCircuitConnection) MarshalJSON() ([]byte, error) {
7896	objectMap := make(map[string]interface{})
7897	if ercc.ExpressRouteCircuitConnectionPropertiesFormat != nil {
7898		objectMap["properties"] = ercc.ExpressRouteCircuitConnectionPropertiesFormat
7899	}
7900	if ercc.Name != nil {
7901		objectMap["name"] = ercc.Name
7902	}
7903	if ercc.ID != nil {
7904		objectMap["id"] = ercc.ID
7905	}
7906	return json.Marshal(objectMap)
7907}
7908
7909// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitConnection struct.
7910func (ercc *ExpressRouteCircuitConnection) UnmarshalJSON(body []byte) error {
7911	var m map[string]*json.RawMessage
7912	err := json.Unmarshal(body, &m)
7913	if err != nil {
7914		return err
7915	}
7916	for k, v := range m {
7917		switch k {
7918		case "properties":
7919			if v != nil {
7920				var expressRouteCircuitConnectionPropertiesFormat ExpressRouteCircuitConnectionPropertiesFormat
7921				err = json.Unmarshal(*v, &expressRouteCircuitConnectionPropertiesFormat)
7922				if err != nil {
7923					return err
7924				}
7925				ercc.ExpressRouteCircuitConnectionPropertiesFormat = &expressRouteCircuitConnectionPropertiesFormat
7926			}
7927		case "name":
7928			if v != nil {
7929				var name string
7930				err = json.Unmarshal(*v, &name)
7931				if err != nil {
7932					return err
7933				}
7934				ercc.Name = &name
7935			}
7936		case "etag":
7937			if v != nil {
7938				var etag string
7939				err = json.Unmarshal(*v, &etag)
7940				if err != nil {
7941					return err
7942				}
7943				ercc.Etag = &etag
7944			}
7945		case "id":
7946			if v != nil {
7947				var ID string
7948				err = json.Unmarshal(*v, &ID)
7949				if err != nil {
7950					return err
7951				}
7952				ercc.ID = &ID
7953			}
7954		}
7955	}
7956
7957	return nil
7958}
7959
7960// ExpressRouteCircuitConnectionListResult response for ListConnections API service call retrieves all
7961// global reach connections that belongs to a Private Peering for an ExpressRouteCircuit.
7962type ExpressRouteCircuitConnectionListResult struct {
7963	autorest.Response `json:"-"`
7964	// Value - The global reach connection associated with Private Peering in an ExpressRoute Circuit.
7965	Value *[]ExpressRouteCircuitConnection `json:"value,omitempty"`
7966	// NextLink - The URL to get the next set of results.
7967	NextLink *string `json:"nextLink,omitempty"`
7968}
7969
7970// ExpressRouteCircuitConnectionListResultIterator provides access to a complete listing of
7971// ExpressRouteCircuitConnection values.
7972type ExpressRouteCircuitConnectionListResultIterator struct {
7973	i    int
7974	page ExpressRouteCircuitConnectionListResultPage
7975}
7976
7977// NextWithContext advances to the next value.  If there was an error making
7978// the request the iterator does not advance and the error is returned.
7979func (iter *ExpressRouteCircuitConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
7980	if tracing.IsEnabled() {
7981		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitConnectionListResultIterator.NextWithContext")
7982		defer func() {
7983			sc := -1
7984			if iter.Response().Response.Response != nil {
7985				sc = iter.Response().Response.Response.StatusCode
7986			}
7987			tracing.EndSpan(ctx, sc, err)
7988		}()
7989	}
7990	iter.i++
7991	if iter.i < len(iter.page.Values()) {
7992		return nil
7993	}
7994	err = iter.page.NextWithContext(ctx)
7995	if err != nil {
7996		iter.i--
7997		return err
7998	}
7999	iter.i = 0
8000	return nil
8001}
8002
8003// Next advances to the next value.  If there was an error making
8004// the request the iterator does not advance and the error is returned.
8005// Deprecated: Use NextWithContext() instead.
8006func (iter *ExpressRouteCircuitConnectionListResultIterator) Next() error {
8007	return iter.NextWithContext(context.Background())
8008}
8009
8010// NotDone returns true if the enumeration should be started or is not yet complete.
8011func (iter ExpressRouteCircuitConnectionListResultIterator) NotDone() bool {
8012	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8013}
8014
8015// Response returns the raw server response from the last page request.
8016func (iter ExpressRouteCircuitConnectionListResultIterator) Response() ExpressRouteCircuitConnectionListResult {
8017	return iter.page.Response()
8018}
8019
8020// Value returns the current value or a zero-initialized value if the
8021// iterator has advanced beyond the end of the collection.
8022func (iter ExpressRouteCircuitConnectionListResultIterator) Value() ExpressRouteCircuitConnection {
8023	if !iter.page.NotDone() {
8024		return ExpressRouteCircuitConnection{}
8025	}
8026	return iter.page.Values()[iter.i]
8027}
8028
8029// Creates a new instance of the ExpressRouteCircuitConnectionListResultIterator type.
8030func NewExpressRouteCircuitConnectionListResultIterator(page ExpressRouteCircuitConnectionListResultPage) ExpressRouteCircuitConnectionListResultIterator {
8031	return ExpressRouteCircuitConnectionListResultIterator{page: page}
8032}
8033
8034// IsEmpty returns true if the ListResult contains no values.
8035func (ercclr ExpressRouteCircuitConnectionListResult) IsEmpty() bool {
8036	return ercclr.Value == nil || len(*ercclr.Value) == 0
8037}
8038
8039// hasNextLink returns true if the NextLink is not empty.
8040func (ercclr ExpressRouteCircuitConnectionListResult) hasNextLink() bool {
8041	return ercclr.NextLink != nil && len(*ercclr.NextLink) != 0
8042}
8043
8044// expressRouteCircuitConnectionListResultPreparer prepares a request to retrieve the next set of results.
8045// It returns nil if no more results exist.
8046func (ercclr ExpressRouteCircuitConnectionListResult) expressRouteCircuitConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
8047	if !ercclr.hasNextLink() {
8048		return nil, nil
8049	}
8050	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8051		autorest.AsJSON(),
8052		autorest.AsGet(),
8053		autorest.WithBaseURL(to.String(ercclr.NextLink)))
8054}
8055
8056// ExpressRouteCircuitConnectionListResultPage contains a page of ExpressRouteCircuitConnection values.
8057type ExpressRouteCircuitConnectionListResultPage struct {
8058	fn     func(context.Context, ExpressRouteCircuitConnectionListResult) (ExpressRouteCircuitConnectionListResult, error)
8059	ercclr ExpressRouteCircuitConnectionListResult
8060}
8061
8062// NextWithContext advances to the next page of values.  If there was an error making
8063// the request the page does not advance and the error is returned.
8064func (page *ExpressRouteCircuitConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
8065	if tracing.IsEnabled() {
8066		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitConnectionListResultPage.NextWithContext")
8067		defer func() {
8068			sc := -1
8069			if page.Response().Response.Response != nil {
8070				sc = page.Response().Response.Response.StatusCode
8071			}
8072			tracing.EndSpan(ctx, sc, err)
8073		}()
8074	}
8075	for {
8076		next, err := page.fn(ctx, page.ercclr)
8077		if err != nil {
8078			return err
8079		}
8080		page.ercclr = next
8081		if !next.hasNextLink() || !next.IsEmpty() {
8082			break
8083		}
8084	}
8085	return nil
8086}
8087
8088// Next advances to the next page of values.  If there was an error making
8089// the request the page does not advance and the error is returned.
8090// Deprecated: Use NextWithContext() instead.
8091func (page *ExpressRouteCircuitConnectionListResultPage) Next() error {
8092	return page.NextWithContext(context.Background())
8093}
8094
8095// NotDone returns true if the page enumeration should be started or is not yet complete.
8096func (page ExpressRouteCircuitConnectionListResultPage) NotDone() bool {
8097	return !page.ercclr.IsEmpty()
8098}
8099
8100// Response returns the raw server response from the last page request.
8101func (page ExpressRouteCircuitConnectionListResultPage) Response() ExpressRouteCircuitConnectionListResult {
8102	return page.ercclr
8103}
8104
8105// Values returns the slice of values for the current page or nil if there are no values.
8106func (page ExpressRouteCircuitConnectionListResultPage) Values() []ExpressRouteCircuitConnection {
8107	if page.ercclr.IsEmpty() {
8108		return nil
8109	}
8110	return *page.ercclr.Value
8111}
8112
8113// Creates a new instance of the ExpressRouteCircuitConnectionListResultPage type.
8114func NewExpressRouteCircuitConnectionListResultPage(cur ExpressRouteCircuitConnectionListResult, getNextPage func(context.Context, ExpressRouteCircuitConnectionListResult) (ExpressRouteCircuitConnectionListResult, error)) ExpressRouteCircuitConnectionListResultPage {
8115	return ExpressRouteCircuitConnectionListResultPage{
8116		fn:     getNextPage,
8117		ercclr: cur,
8118	}
8119}
8120
8121// ExpressRouteCircuitConnectionPropertiesFormat ...
8122type ExpressRouteCircuitConnectionPropertiesFormat struct {
8123	// ExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the circuit initiating connection.
8124	ExpressRouteCircuitPeering *SubResource `json:"expressRouteCircuitPeering,omitempty"`
8125	// PeerExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the peered circuit.
8126	PeerExpressRouteCircuitPeering *SubResource `json:"peerExpressRouteCircuitPeering,omitempty"`
8127	// AddressPrefix - /29 IP address space to carve out Customer addresses for tunnels.
8128	AddressPrefix *string `json:"addressPrefix,omitempty"`
8129	// AuthorizationKey - The authorization key.
8130	AuthorizationKey *string `json:"authorizationKey,omitempty"`
8131	// CircuitConnectionStatus - READ-ONLY; Express Route Circuit Connection State. Possible values are: 'Connected' and 'Disconnected'. Possible values include: 'Connected', 'Connecting', 'Disconnected'
8132	CircuitConnectionStatus CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"`
8133	// ProvisioningState - READ-ONLY; Provisioning state of the circuit connection resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
8134	ProvisioningState *string `json:"provisioningState,omitempty"`
8135}
8136
8137// MarshalJSON is the custom marshaler for ExpressRouteCircuitConnectionPropertiesFormat.
8138func (erccpf ExpressRouteCircuitConnectionPropertiesFormat) MarshalJSON() ([]byte, error) {
8139	objectMap := make(map[string]interface{})
8140	if erccpf.ExpressRouteCircuitPeering != nil {
8141		objectMap["expressRouteCircuitPeering"] = erccpf.ExpressRouteCircuitPeering
8142	}
8143	if erccpf.PeerExpressRouteCircuitPeering != nil {
8144		objectMap["peerExpressRouteCircuitPeering"] = erccpf.PeerExpressRouteCircuitPeering
8145	}
8146	if erccpf.AddressPrefix != nil {
8147		objectMap["addressPrefix"] = erccpf.AddressPrefix
8148	}
8149	if erccpf.AuthorizationKey != nil {
8150		objectMap["authorizationKey"] = erccpf.AuthorizationKey
8151	}
8152	return json.Marshal(objectMap)
8153}
8154
8155// ExpressRouteCircuitConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
8156// results of a long-running operation.
8157type ExpressRouteCircuitConnectionsCreateOrUpdateFuture struct {
8158	azure.FutureAPI
8159	// Result returns the result of the asynchronous operation.
8160	// If the operation has not completed it will return an error.
8161	Result func(ExpressRouteCircuitConnectionsClient) (ExpressRouteCircuitConnection, error)
8162}
8163
8164// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8165func (future *ExpressRouteCircuitConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
8166	var azFuture azure.Future
8167	if err := json.Unmarshal(body, &azFuture); err != nil {
8168		return err
8169	}
8170	future.FutureAPI = &azFuture
8171	future.Result = future.result
8172	return nil
8173}
8174
8175// result is the default implementation for ExpressRouteCircuitConnectionsCreateOrUpdateFuture.Result.
8176func (future *ExpressRouteCircuitConnectionsCreateOrUpdateFuture) result(client ExpressRouteCircuitConnectionsClient) (ercc ExpressRouteCircuitConnection, err error) {
8177	var done bool
8178	done, err = future.DoneWithContext(context.Background(), client)
8179	if err != nil {
8180		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
8181		return
8182	}
8183	if !done {
8184		ercc.Response.Response = future.Response()
8185		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture")
8186		return
8187	}
8188	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8189	if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent {
8190		ercc, err = client.CreateOrUpdateResponder(ercc.Response.Response)
8191		if err != nil {
8192			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture", "Result", ercc.Response.Response, "Failure responding to request")
8193		}
8194	}
8195	return
8196}
8197
8198// ExpressRouteCircuitConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a
8199// long-running operation.
8200type ExpressRouteCircuitConnectionsDeleteFuture struct {
8201	azure.FutureAPI
8202	// Result returns the result of the asynchronous operation.
8203	// If the operation has not completed it will return an error.
8204	Result func(ExpressRouteCircuitConnectionsClient) (autorest.Response, error)
8205}
8206
8207// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8208func (future *ExpressRouteCircuitConnectionsDeleteFuture) UnmarshalJSON(body []byte) error {
8209	var azFuture azure.Future
8210	if err := json.Unmarshal(body, &azFuture); err != nil {
8211		return err
8212	}
8213	future.FutureAPI = &azFuture
8214	future.Result = future.result
8215	return nil
8216}
8217
8218// result is the default implementation for ExpressRouteCircuitConnectionsDeleteFuture.Result.
8219func (future *ExpressRouteCircuitConnectionsDeleteFuture) result(client ExpressRouteCircuitConnectionsClient) (ar autorest.Response, err error) {
8220	var done bool
8221	done, err = future.DoneWithContext(context.Background(), client)
8222	if err != nil {
8223		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
8224		return
8225	}
8226	if !done {
8227		ar.Response = future.Response()
8228		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitConnectionsDeleteFuture")
8229		return
8230	}
8231	ar.Response = future.Response()
8232	return
8233}
8234
8235// ExpressRouteCircuitListResult response for ListExpressRouteCircuit API service call.
8236type ExpressRouteCircuitListResult struct {
8237	autorest.Response `json:"-"`
8238	// Value - A list of ExpressRouteCircuits in a resource group.
8239	Value *[]ExpressRouteCircuit `json:"value,omitempty"`
8240	// NextLink - The URL to get the next set of results.
8241	NextLink *string `json:"nextLink,omitempty"`
8242}
8243
8244// ExpressRouteCircuitListResultIterator provides access to a complete listing of ExpressRouteCircuit
8245// values.
8246type ExpressRouteCircuitListResultIterator struct {
8247	i    int
8248	page ExpressRouteCircuitListResultPage
8249}
8250
8251// NextWithContext advances to the next value.  If there was an error making
8252// the request the iterator does not advance and the error is returned.
8253func (iter *ExpressRouteCircuitListResultIterator) NextWithContext(ctx context.Context) (err error) {
8254	if tracing.IsEnabled() {
8255		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultIterator.NextWithContext")
8256		defer func() {
8257			sc := -1
8258			if iter.Response().Response.Response != nil {
8259				sc = iter.Response().Response.Response.StatusCode
8260			}
8261			tracing.EndSpan(ctx, sc, err)
8262		}()
8263	}
8264	iter.i++
8265	if iter.i < len(iter.page.Values()) {
8266		return nil
8267	}
8268	err = iter.page.NextWithContext(ctx)
8269	if err != nil {
8270		iter.i--
8271		return err
8272	}
8273	iter.i = 0
8274	return nil
8275}
8276
8277// Next advances to the next value.  If there was an error making
8278// the request the iterator does not advance and the error is returned.
8279// Deprecated: Use NextWithContext() instead.
8280func (iter *ExpressRouteCircuitListResultIterator) Next() error {
8281	return iter.NextWithContext(context.Background())
8282}
8283
8284// NotDone returns true if the enumeration should be started or is not yet complete.
8285func (iter ExpressRouteCircuitListResultIterator) NotDone() bool {
8286	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8287}
8288
8289// Response returns the raw server response from the last page request.
8290func (iter ExpressRouteCircuitListResultIterator) Response() ExpressRouteCircuitListResult {
8291	return iter.page.Response()
8292}
8293
8294// Value returns the current value or a zero-initialized value if the
8295// iterator has advanced beyond the end of the collection.
8296func (iter ExpressRouteCircuitListResultIterator) Value() ExpressRouteCircuit {
8297	if !iter.page.NotDone() {
8298		return ExpressRouteCircuit{}
8299	}
8300	return iter.page.Values()[iter.i]
8301}
8302
8303// Creates a new instance of the ExpressRouteCircuitListResultIterator type.
8304func NewExpressRouteCircuitListResultIterator(page ExpressRouteCircuitListResultPage) ExpressRouteCircuitListResultIterator {
8305	return ExpressRouteCircuitListResultIterator{page: page}
8306}
8307
8308// IsEmpty returns true if the ListResult contains no values.
8309func (erclr ExpressRouteCircuitListResult) IsEmpty() bool {
8310	return erclr.Value == nil || len(*erclr.Value) == 0
8311}
8312
8313// hasNextLink returns true if the NextLink is not empty.
8314func (erclr ExpressRouteCircuitListResult) hasNextLink() bool {
8315	return erclr.NextLink != nil && len(*erclr.NextLink) != 0
8316}
8317
8318// expressRouteCircuitListResultPreparer prepares a request to retrieve the next set of results.
8319// It returns nil if no more results exist.
8320func (erclr ExpressRouteCircuitListResult) expressRouteCircuitListResultPreparer(ctx context.Context) (*http.Request, error) {
8321	if !erclr.hasNextLink() {
8322		return nil, nil
8323	}
8324	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8325		autorest.AsJSON(),
8326		autorest.AsGet(),
8327		autorest.WithBaseURL(to.String(erclr.NextLink)))
8328}
8329
8330// ExpressRouteCircuitListResultPage contains a page of ExpressRouteCircuit values.
8331type ExpressRouteCircuitListResultPage struct {
8332	fn    func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)
8333	erclr ExpressRouteCircuitListResult
8334}
8335
8336// NextWithContext advances to the next page of values.  If there was an error making
8337// the request the page does not advance and the error is returned.
8338func (page *ExpressRouteCircuitListResultPage) NextWithContext(ctx context.Context) (err error) {
8339	if tracing.IsEnabled() {
8340		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultPage.NextWithContext")
8341		defer func() {
8342			sc := -1
8343			if page.Response().Response.Response != nil {
8344				sc = page.Response().Response.Response.StatusCode
8345			}
8346			tracing.EndSpan(ctx, sc, err)
8347		}()
8348	}
8349	for {
8350		next, err := page.fn(ctx, page.erclr)
8351		if err != nil {
8352			return err
8353		}
8354		page.erclr = next
8355		if !next.hasNextLink() || !next.IsEmpty() {
8356			break
8357		}
8358	}
8359	return nil
8360}
8361
8362// Next advances to the next page of values.  If there was an error making
8363// the request the page does not advance and the error is returned.
8364// Deprecated: Use NextWithContext() instead.
8365func (page *ExpressRouteCircuitListResultPage) Next() error {
8366	return page.NextWithContext(context.Background())
8367}
8368
8369// NotDone returns true if the page enumeration should be started or is not yet complete.
8370func (page ExpressRouteCircuitListResultPage) NotDone() bool {
8371	return !page.erclr.IsEmpty()
8372}
8373
8374// Response returns the raw server response from the last page request.
8375func (page ExpressRouteCircuitListResultPage) Response() ExpressRouteCircuitListResult {
8376	return page.erclr
8377}
8378
8379// Values returns the slice of values for the current page or nil if there are no values.
8380func (page ExpressRouteCircuitListResultPage) Values() []ExpressRouteCircuit {
8381	if page.erclr.IsEmpty() {
8382		return nil
8383	}
8384	return *page.erclr.Value
8385}
8386
8387// Creates a new instance of the ExpressRouteCircuitListResultPage type.
8388func NewExpressRouteCircuitListResultPage(cur ExpressRouteCircuitListResult, getNextPage func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)) ExpressRouteCircuitListResultPage {
8389	return ExpressRouteCircuitListResultPage{
8390		fn:    getNextPage,
8391		erclr: cur,
8392	}
8393}
8394
8395// ExpressRouteCircuitPeering peering in an ExpressRouteCircuit resource.
8396type ExpressRouteCircuitPeering struct {
8397	autorest.Response                           `json:"-"`
8398	*ExpressRouteCircuitPeeringPropertiesFormat `json:"properties,omitempty"`
8399	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
8400	Name *string `json:"name,omitempty"`
8401	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
8402	Etag *string `json:"etag,omitempty"`
8403	// ID - Resource ID.
8404	ID *string `json:"id,omitempty"`
8405}
8406
8407// MarshalJSON is the custom marshaler for ExpressRouteCircuitPeering.
8408func (ercp ExpressRouteCircuitPeering) MarshalJSON() ([]byte, error) {
8409	objectMap := make(map[string]interface{})
8410	if ercp.ExpressRouteCircuitPeeringPropertiesFormat != nil {
8411		objectMap["properties"] = ercp.ExpressRouteCircuitPeeringPropertiesFormat
8412	}
8413	if ercp.Name != nil {
8414		objectMap["name"] = ercp.Name
8415	}
8416	if ercp.ID != nil {
8417		objectMap["id"] = ercp.ID
8418	}
8419	return json.Marshal(objectMap)
8420}
8421
8422// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitPeering struct.
8423func (ercp *ExpressRouteCircuitPeering) UnmarshalJSON(body []byte) error {
8424	var m map[string]*json.RawMessage
8425	err := json.Unmarshal(body, &m)
8426	if err != nil {
8427		return err
8428	}
8429	for k, v := range m {
8430		switch k {
8431		case "properties":
8432			if v != nil {
8433				var expressRouteCircuitPeeringPropertiesFormat ExpressRouteCircuitPeeringPropertiesFormat
8434				err = json.Unmarshal(*v, &expressRouteCircuitPeeringPropertiesFormat)
8435				if err != nil {
8436					return err
8437				}
8438				ercp.ExpressRouteCircuitPeeringPropertiesFormat = &expressRouteCircuitPeeringPropertiesFormat
8439			}
8440		case "name":
8441			if v != nil {
8442				var name string
8443				err = json.Unmarshal(*v, &name)
8444				if err != nil {
8445					return err
8446				}
8447				ercp.Name = &name
8448			}
8449		case "etag":
8450			if v != nil {
8451				var etag string
8452				err = json.Unmarshal(*v, &etag)
8453				if err != nil {
8454					return err
8455				}
8456				ercp.Etag = &etag
8457			}
8458		case "id":
8459			if v != nil {
8460				var ID string
8461				err = json.Unmarshal(*v, &ID)
8462				if err != nil {
8463					return err
8464				}
8465				ercp.ID = &ID
8466			}
8467		}
8468	}
8469
8470	return nil
8471}
8472
8473// ExpressRouteCircuitPeeringConfig specifies the peering configuration.
8474type ExpressRouteCircuitPeeringConfig struct {
8475	// AdvertisedPublicPrefixes - The reference of AdvertisedPublicPrefixes.
8476	AdvertisedPublicPrefixes *[]string `json:"advertisedPublicPrefixes,omitempty"`
8477	// AdvertisedCommunities - The communities of bgp peering. Specified for microsoft peering
8478	AdvertisedCommunities *[]string `json:"advertisedCommunities,omitempty"`
8479	// AdvertisedPublicPrefixesState - AdvertisedPublicPrefixState of the Peering resource. Possible values are 'NotConfigured', 'Configuring', 'Configured', and 'ValidationNeeded'. Possible values include: 'NotConfigured', 'Configuring', 'Configured', 'ValidationNeeded'
8480	AdvertisedPublicPrefixesState ExpressRouteCircuitPeeringAdvertisedPublicPrefixState `json:"advertisedPublicPrefixesState,omitempty"`
8481	// LegacyMode - The legacy mode of the peering.
8482	LegacyMode *int32 `json:"legacyMode,omitempty"`
8483	// CustomerASN - The CustomerASN of the peering.
8484	CustomerASN *int32 `json:"customerASN,omitempty"`
8485	// RoutingRegistryName - The RoutingRegistryName of the configuration.
8486	RoutingRegistryName *string `json:"routingRegistryName,omitempty"`
8487}
8488
8489// ExpressRouteCircuitPeeringID expressRoute circuit peering identifier.
8490type ExpressRouteCircuitPeeringID struct {
8491	// ID - The ID of the ExpressRoute circuit peering.
8492	ID *string `json:"id,omitempty"`
8493}
8494
8495// ExpressRouteCircuitPeeringListResult response for ListPeering API service call retrieves all peerings
8496// that belong to an ExpressRouteCircuit.
8497type ExpressRouteCircuitPeeringListResult struct {
8498	autorest.Response `json:"-"`
8499	// Value - The peerings in an express route circuit.
8500	Value *[]ExpressRouteCircuitPeering `json:"value,omitempty"`
8501	// NextLink - The URL to get the next set of results.
8502	NextLink *string `json:"nextLink,omitempty"`
8503}
8504
8505// ExpressRouteCircuitPeeringListResultIterator provides access to a complete listing of
8506// ExpressRouteCircuitPeering values.
8507type ExpressRouteCircuitPeeringListResultIterator struct {
8508	i    int
8509	page ExpressRouteCircuitPeeringListResultPage
8510}
8511
8512// NextWithContext advances to the next value.  If there was an error making
8513// the request the iterator does not advance and the error is returned.
8514func (iter *ExpressRouteCircuitPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
8515	if tracing.IsEnabled() {
8516		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultIterator.NextWithContext")
8517		defer func() {
8518			sc := -1
8519			if iter.Response().Response.Response != nil {
8520				sc = iter.Response().Response.Response.StatusCode
8521			}
8522			tracing.EndSpan(ctx, sc, err)
8523		}()
8524	}
8525	iter.i++
8526	if iter.i < len(iter.page.Values()) {
8527		return nil
8528	}
8529	err = iter.page.NextWithContext(ctx)
8530	if err != nil {
8531		iter.i--
8532		return err
8533	}
8534	iter.i = 0
8535	return nil
8536}
8537
8538// Next advances to the next value.  If there was an error making
8539// the request the iterator does not advance and the error is returned.
8540// Deprecated: Use NextWithContext() instead.
8541func (iter *ExpressRouteCircuitPeeringListResultIterator) Next() error {
8542	return iter.NextWithContext(context.Background())
8543}
8544
8545// NotDone returns true if the enumeration should be started or is not yet complete.
8546func (iter ExpressRouteCircuitPeeringListResultIterator) NotDone() bool {
8547	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8548}
8549
8550// Response returns the raw server response from the last page request.
8551func (iter ExpressRouteCircuitPeeringListResultIterator) Response() ExpressRouteCircuitPeeringListResult {
8552	return iter.page.Response()
8553}
8554
8555// Value returns the current value or a zero-initialized value if the
8556// iterator has advanced beyond the end of the collection.
8557func (iter ExpressRouteCircuitPeeringListResultIterator) Value() ExpressRouteCircuitPeering {
8558	if !iter.page.NotDone() {
8559		return ExpressRouteCircuitPeering{}
8560	}
8561	return iter.page.Values()[iter.i]
8562}
8563
8564// Creates a new instance of the ExpressRouteCircuitPeeringListResultIterator type.
8565func NewExpressRouteCircuitPeeringListResultIterator(page ExpressRouteCircuitPeeringListResultPage) ExpressRouteCircuitPeeringListResultIterator {
8566	return ExpressRouteCircuitPeeringListResultIterator{page: page}
8567}
8568
8569// IsEmpty returns true if the ListResult contains no values.
8570func (ercplr ExpressRouteCircuitPeeringListResult) IsEmpty() bool {
8571	return ercplr.Value == nil || len(*ercplr.Value) == 0
8572}
8573
8574// hasNextLink returns true if the NextLink is not empty.
8575func (ercplr ExpressRouteCircuitPeeringListResult) hasNextLink() bool {
8576	return ercplr.NextLink != nil && len(*ercplr.NextLink) != 0
8577}
8578
8579// expressRouteCircuitPeeringListResultPreparer prepares a request to retrieve the next set of results.
8580// It returns nil if no more results exist.
8581func (ercplr ExpressRouteCircuitPeeringListResult) expressRouteCircuitPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
8582	if !ercplr.hasNextLink() {
8583		return nil, nil
8584	}
8585	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8586		autorest.AsJSON(),
8587		autorest.AsGet(),
8588		autorest.WithBaseURL(to.String(ercplr.NextLink)))
8589}
8590
8591// ExpressRouteCircuitPeeringListResultPage contains a page of ExpressRouteCircuitPeering values.
8592type ExpressRouteCircuitPeeringListResultPage struct {
8593	fn     func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)
8594	ercplr ExpressRouteCircuitPeeringListResult
8595}
8596
8597// NextWithContext advances to the next page of values.  If there was an error making
8598// the request the page does not advance and the error is returned.
8599func (page *ExpressRouteCircuitPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
8600	if tracing.IsEnabled() {
8601		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultPage.NextWithContext")
8602		defer func() {
8603			sc := -1
8604			if page.Response().Response.Response != nil {
8605				sc = page.Response().Response.Response.StatusCode
8606			}
8607			tracing.EndSpan(ctx, sc, err)
8608		}()
8609	}
8610	for {
8611		next, err := page.fn(ctx, page.ercplr)
8612		if err != nil {
8613			return err
8614		}
8615		page.ercplr = next
8616		if !next.hasNextLink() || !next.IsEmpty() {
8617			break
8618		}
8619	}
8620	return nil
8621}
8622
8623// Next advances to the next page of values.  If there was an error making
8624// the request the page does not advance and the error is returned.
8625// Deprecated: Use NextWithContext() instead.
8626func (page *ExpressRouteCircuitPeeringListResultPage) Next() error {
8627	return page.NextWithContext(context.Background())
8628}
8629
8630// NotDone returns true if the page enumeration should be started or is not yet complete.
8631func (page ExpressRouteCircuitPeeringListResultPage) NotDone() bool {
8632	return !page.ercplr.IsEmpty()
8633}
8634
8635// Response returns the raw server response from the last page request.
8636func (page ExpressRouteCircuitPeeringListResultPage) Response() ExpressRouteCircuitPeeringListResult {
8637	return page.ercplr
8638}
8639
8640// Values returns the slice of values for the current page or nil if there are no values.
8641func (page ExpressRouteCircuitPeeringListResultPage) Values() []ExpressRouteCircuitPeering {
8642	if page.ercplr.IsEmpty() {
8643		return nil
8644	}
8645	return *page.ercplr.Value
8646}
8647
8648// Creates a new instance of the ExpressRouteCircuitPeeringListResultPage type.
8649func NewExpressRouteCircuitPeeringListResultPage(cur ExpressRouteCircuitPeeringListResult, getNextPage func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)) ExpressRouteCircuitPeeringListResultPage {
8650	return ExpressRouteCircuitPeeringListResultPage{
8651		fn:     getNextPage,
8652		ercplr: cur,
8653	}
8654}
8655
8656// ExpressRouteCircuitPeeringPropertiesFormat ...
8657type ExpressRouteCircuitPeeringPropertiesFormat struct {
8658	// PeeringType - The peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'
8659	PeeringType ExpressRoutePeeringType `json:"peeringType,omitempty"`
8660	// State - The peering state. Possible values include: 'ExpressRoutePeeringStateDisabled', 'ExpressRoutePeeringStateEnabled'
8661	State ExpressRoutePeeringState `json:"state,omitempty"`
8662	// AzureASN - The Azure ASN.
8663	AzureASN *int32 `json:"azureASN,omitempty"`
8664	// PeerASN - The peer ASN.
8665	PeerASN *int64 `json:"peerASN,omitempty"`
8666	// PrimaryPeerAddressPrefix - The primary address prefix.
8667	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
8668	// SecondaryPeerAddressPrefix - The secondary address prefix.
8669	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
8670	// PrimaryAzurePort - The primary port.
8671	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
8672	// SecondaryAzurePort - The secondary port.
8673	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
8674	// SharedKey - The shared key.
8675	SharedKey *string `json:"sharedKey,omitempty"`
8676	// VlanID - The VLAN ID.
8677	VlanID *int32 `json:"vlanId,omitempty"`
8678	// MicrosoftPeeringConfig - The Microsoft peering configuration.
8679	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
8680	// Stats - Gets peering stats.
8681	Stats *ExpressRouteCircuitStats `json:"stats,omitempty"`
8682	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
8683	ProvisioningState *string `json:"provisioningState,omitempty"`
8684	// GatewayManagerEtag - The GatewayManager Etag.
8685	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
8686	// LastModifiedBy - Gets whether the provider or the customer last modified the peering.
8687	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
8688	// RouteFilter - The reference of the RouteFilter resource.
8689	RouteFilter *RouteFilter `json:"routeFilter,omitempty"`
8690	// Ipv6PeeringConfig - The IPv6 peering configuration.
8691	Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"`
8692	// ExpressRouteConnection - The ExpressRoute connection.
8693	ExpressRouteConnection *ExpressRouteConnectionID `json:"expressRouteConnection,omitempty"`
8694	// Connections - The list of circuit connections associated with Azure Private Peering for this circuit.
8695	Connections *[]ExpressRouteCircuitConnection `json:"connections,omitempty"`
8696}
8697
8698// ExpressRouteCircuitPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
8699// of a long-running operation.
8700type ExpressRouteCircuitPeeringsCreateOrUpdateFuture struct {
8701	azure.FutureAPI
8702	// Result returns the result of the asynchronous operation.
8703	// If the operation has not completed it will return an error.
8704	Result func(ExpressRouteCircuitPeeringsClient) (ExpressRouteCircuitPeering, error)
8705}
8706
8707// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8708func (future *ExpressRouteCircuitPeeringsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
8709	var azFuture azure.Future
8710	if err := json.Unmarshal(body, &azFuture); err != nil {
8711		return err
8712	}
8713	future.FutureAPI = &azFuture
8714	future.Result = future.result
8715	return nil
8716}
8717
8718// result is the default implementation for ExpressRouteCircuitPeeringsCreateOrUpdateFuture.Result.
8719func (future *ExpressRouteCircuitPeeringsCreateOrUpdateFuture) result(client ExpressRouteCircuitPeeringsClient) (ercp ExpressRouteCircuitPeering, err error) {
8720	var done bool
8721	done, err = future.DoneWithContext(context.Background(), client)
8722	if err != nil {
8723		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
8724		return
8725	}
8726	if !done {
8727		ercp.Response.Response = future.Response()
8728		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture")
8729		return
8730	}
8731	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8732	if ercp.Response.Response, err = future.GetResult(sender); err == nil && ercp.Response.Response.StatusCode != http.StatusNoContent {
8733		ercp, err = client.CreateOrUpdateResponder(ercp.Response.Response)
8734		if err != nil {
8735			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", ercp.Response.Response, "Failure responding to request")
8736		}
8737	}
8738	return
8739}
8740
8741// ExpressRouteCircuitPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
8742// long-running operation.
8743type ExpressRouteCircuitPeeringsDeleteFuture struct {
8744	azure.FutureAPI
8745	// Result returns the result of the asynchronous operation.
8746	// If the operation has not completed it will return an error.
8747	Result func(ExpressRouteCircuitPeeringsClient) (autorest.Response, error)
8748}
8749
8750// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8751func (future *ExpressRouteCircuitPeeringsDeleteFuture) UnmarshalJSON(body []byte) error {
8752	var azFuture azure.Future
8753	if err := json.Unmarshal(body, &azFuture); err != nil {
8754		return err
8755	}
8756	future.FutureAPI = &azFuture
8757	future.Result = future.result
8758	return nil
8759}
8760
8761// result is the default implementation for ExpressRouteCircuitPeeringsDeleteFuture.Result.
8762func (future *ExpressRouteCircuitPeeringsDeleteFuture) result(client ExpressRouteCircuitPeeringsClient) (ar autorest.Response, err error) {
8763	var done bool
8764	done, err = future.DoneWithContext(context.Background(), client)
8765	if err != nil {
8766		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
8767		return
8768	}
8769	if !done {
8770		ar.Response = future.Response()
8771		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsDeleteFuture")
8772		return
8773	}
8774	ar.Response = future.Response()
8775	return
8776}
8777
8778// ExpressRouteCircuitPropertiesFormat properties of ExpressRouteCircuit.
8779type ExpressRouteCircuitPropertiesFormat struct {
8780	// AllowClassicOperations - Allow classic operations
8781	AllowClassicOperations *bool `json:"allowClassicOperations,omitempty"`
8782	// CircuitProvisioningState - The CircuitProvisioningState state of the resource.
8783	CircuitProvisioningState *string `json:"circuitProvisioningState,omitempty"`
8784	// ServiceProviderProvisioningState - The ServiceProviderProvisioningState state of the resource. Possible values are 'NotProvisioned', 'Provisioning', 'Provisioned', and 'Deprovisioning'. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning'
8785	ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"`
8786	// Authorizations - The list of authorizations.
8787	Authorizations *[]ExpressRouteCircuitAuthorization `json:"authorizations,omitempty"`
8788	// Peerings - The list of peerings.
8789	Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"`
8790	// ServiceKey - The ServiceKey.
8791	ServiceKey *string `json:"serviceKey,omitempty"`
8792	// ServiceProviderNotes - The ServiceProviderNotes.
8793	ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"`
8794	// ServiceProviderProperties - The ServiceProviderProperties.
8795	ServiceProviderProperties *ExpressRouteCircuitServiceProviderProperties `json:"serviceProviderProperties,omitempty"`
8796	// ExpressRoutePort - The reference to the ExpressRoutePort resource when the circuit is provisioned on an ExpressRoutePort resource.
8797	ExpressRoutePort *SubResource `json:"expressRoutePort,omitempty"`
8798	// BandwidthInGbps - The bandwidth of the circuit when the circuit is provisioned on an ExpressRoutePort resource.
8799	BandwidthInGbps *float64 `json:"bandwidthInGbps,omitempty"`
8800	// Stag - READ-ONLY; The identifier of the circuit traffic. Outer tag for QinQ encapsulation.
8801	Stag *int32 `json:"stag,omitempty"`
8802	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
8803	ProvisioningState *string `json:"provisioningState,omitempty"`
8804	// GatewayManagerEtag - The GatewayManager Etag.
8805	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
8806	// AllowGlobalReach - Flag to enable Global Reach on the circuit.
8807	AllowGlobalReach *bool `json:"allowGlobalReach,omitempty"`
8808}
8809
8810// MarshalJSON is the custom marshaler for ExpressRouteCircuitPropertiesFormat.
8811func (ercpf ExpressRouteCircuitPropertiesFormat) MarshalJSON() ([]byte, error) {
8812	objectMap := make(map[string]interface{})
8813	if ercpf.AllowClassicOperations != nil {
8814		objectMap["allowClassicOperations"] = ercpf.AllowClassicOperations
8815	}
8816	if ercpf.CircuitProvisioningState != nil {
8817		objectMap["circuitProvisioningState"] = ercpf.CircuitProvisioningState
8818	}
8819	if ercpf.ServiceProviderProvisioningState != "" {
8820		objectMap["serviceProviderProvisioningState"] = ercpf.ServiceProviderProvisioningState
8821	}
8822	if ercpf.Authorizations != nil {
8823		objectMap["authorizations"] = ercpf.Authorizations
8824	}
8825	if ercpf.Peerings != nil {
8826		objectMap["peerings"] = ercpf.Peerings
8827	}
8828	if ercpf.ServiceKey != nil {
8829		objectMap["serviceKey"] = ercpf.ServiceKey
8830	}
8831	if ercpf.ServiceProviderNotes != nil {
8832		objectMap["serviceProviderNotes"] = ercpf.ServiceProviderNotes
8833	}
8834	if ercpf.ServiceProviderProperties != nil {
8835		objectMap["serviceProviderProperties"] = ercpf.ServiceProviderProperties
8836	}
8837	if ercpf.ExpressRoutePort != nil {
8838		objectMap["expressRoutePort"] = ercpf.ExpressRoutePort
8839	}
8840	if ercpf.BandwidthInGbps != nil {
8841		objectMap["bandwidthInGbps"] = ercpf.BandwidthInGbps
8842	}
8843	if ercpf.ProvisioningState != nil {
8844		objectMap["provisioningState"] = ercpf.ProvisioningState
8845	}
8846	if ercpf.GatewayManagerEtag != nil {
8847		objectMap["gatewayManagerEtag"] = ercpf.GatewayManagerEtag
8848	}
8849	if ercpf.AllowGlobalReach != nil {
8850		objectMap["allowGlobalReach"] = ercpf.AllowGlobalReach
8851	}
8852	return json.Marshal(objectMap)
8853}
8854
8855// ExpressRouteCircuitReference ...
8856type ExpressRouteCircuitReference struct {
8857	// ID - Corresponding Express Route Circuit Id.
8858	ID *string `json:"id,omitempty"`
8859}
8860
8861// ExpressRouteCircuitRoutesTable the routes table associated with the ExpressRouteCircuit
8862type ExpressRouteCircuitRoutesTable struct {
8863	// NetworkProperty - IP address of a network entity
8864	NetworkProperty *string `json:"network,omitempty"`
8865	// NextHop - NextHop address
8866	NextHop *string `json:"nextHop,omitempty"`
8867	// LocPrf - Local preference value as set with the set local-preference route-map configuration command
8868	LocPrf *string `json:"locPrf,omitempty"`
8869	// Weight - Route Weight.
8870	Weight *int32 `json:"weight,omitempty"`
8871	// Path - Autonomous system paths to the destination network.
8872	Path *string `json:"path,omitempty"`
8873}
8874
8875// ExpressRouteCircuitRoutesTableSummary the routes table associated with the ExpressRouteCircuit.
8876type ExpressRouteCircuitRoutesTableSummary struct {
8877	// Neighbor - IP address of the neighbor.
8878	Neighbor *string `json:"neighbor,omitempty"`
8879	// V - BGP version number spoken to the neighbor.
8880	V *int32 `json:"v,omitempty"`
8881	// As - Autonomous system number.
8882	As *int32 `json:"as,omitempty"`
8883	// 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.
8884	UpDown *string `json:"upDown,omitempty"`
8885	// StatePfxRcd - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group.
8886	StatePfxRcd *string `json:"statePfxRcd,omitempty"`
8887}
8888
8889// ExpressRouteCircuitsArpTableListResult response for ListArpTable associated with the Express Route
8890// Circuits API.
8891type ExpressRouteCircuitsArpTableListResult struct {
8892	autorest.Response `json:"-"`
8893	// Value - Gets list of the ARP table.
8894	Value *[]ExpressRouteCircuitArpTable `json:"value,omitempty"`
8895	// NextLink - The URL to get the next set of results.
8896	NextLink *string `json:"nextLink,omitempty"`
8897}
8898
8899// ExpressRouteCircuitsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
8900// long-running operation.
8901type ExpressRouteCircuitsCreateOrUpdateFuture struct {
8902	azure.FutureAPI
8903	// Result returns the result of the asynchronous operation.
8904	// If the operation has not completed it will return an error.
8905	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuit, error)
8906}
8907
8908// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8909func (future *ExpressRouteCircuitsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
8910	var azFuture azure.Future
8911	if err := json.Unmarshal(body, &azFuture); err != nil {
8912		return err
8913	}
8914	future.FutureAPI = &azFuture
8915	future.Result = future.result
8916	return nil
8917}
8918
8919// result is the default implementation for ExpressRouteCircuitsCreateOrUpdateFuture.Result.
8920func (future *ExpressRouteCircuitsCreateOrUpdateFuture) result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
8921	var done bool
8922	done, err = future.DoneWithContext(context.Background(), client)
8923	if err != nil {
8924		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
8925		return
8926	}
8927	if !done {
8928		erc.Response.Response = future.Response()
8929		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsCreateOrUpdateFuture")
8930		return
8931	}
8932	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8933	if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
8934		erc, err = client.CreateOrUpdateResponder(erc.Response.Response)
8935		if err != nil {
8936			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", erc.Response.Response, "Failure responding to request")
8937		}
8938	}
8939	return
8940}
8941
8942// ExpressRouteCircuitsDeleteFuture an abstraction for monitoring and retrieving the results of a
8943// long-running operation.
8944type ExpressRouteCircuitsDeleteFuture struct {
8945	azure.FutureAPI
8946	// Result returns the result of the asynchronous operation.
8947	// If the operation has not completed it will return an error.
8948	Result func(ExpressRouteCircuitsClient) (autorest.Response, error)
8949}
8950
8951// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8952func (future *ExpressRouteCircuitsDeleteFuture) UnmarshalJSON(body []byte) error {
8953	var azFuture azure.Future
8954	if err := json.Unmarshal(body, &azFuture); err != nil {
8955		return err
8956	}
8957	future.FutureAPI = &azFuture
8958	future.Result = future.result
8959	return nil
8960}
8961
8962// result is the default implementation for ExpressRouteCircuitsDeleteFuture.Result.
8963func (future *ExpressRouteCircuitsDeleteFuture) result(client ExpressRouteCircuitsClient) (ar autorest.Response, err error) {
8964	var done bool
8965	done, err = future.DoneWithContext(context.Background(), client)
8966	if err != nil {
8967		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", future.Response(), "Polling failure")
8968		return
8969	}
8970	if !done {
8971		ar.Response = future.Response()
8972		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsDeleteFuture")
8973		return
8974	}
8975	ar.Response = future.Response()
8976	return
8977}
8978
8979// ExpressRouteCircuitServiceProviderProperties contains ServiceProviderProperties in an
8980// ExpressRouteCircuit.
8981type ExpressRouteCircuitServiceProviderProperties struct {
8982	// ServiceProviderName - The serviceProviderName.
8983	ServiceProviderName *string `json:"serviceProviderName,omitempty"`
8984	// PeeringLocation - The peering location.
8985	PeeringLocation *string `json:"peeringLocation,omitempty"`
8986	// BandwidthInMbps - The BandwidthInMbps.
8987	BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"`
8988}
8989
8990// ExpressRouteCircuitSku contains SKU in an ExpressRouteCircuit.
8991type ExpressRouteCircuitSku struct {
8992	// Name - The name of the SKU.
8993	Name *string `json:"name,omitempty"`
8994	// Tier - The tier of the SKU. Possible values are 'Standard', 'Premium' or 'Basic'. Possible values include: 'ExpressRouteCircuitSkuTierStandard', 'ExpressRouteCircuitSkuTierPremium', 'ExpressRouteCircuitSkuTierBasic'
8995	Tier ExpressRouteCircuitSkuTier `json:"tier,omitempty"`
8996	// Family - The family of the SKU. Possible values are: 'UnlimitedData' and 'MeteredData'. Possible values include: 'UnlimitedData', 'MeteredData'
8997	Family ExpressRouteCircuitSkuFamily `json:"family,omitempty"`
8998}
8999
9000// ExpressRouteCircuitsListArpTableFuture an abstraction for monitoring and retrieving the results of a
9001// long-running operation.
9002type ExpressRouteCircuitsListArpTableFuture struct {
9003	azure.FutureAPI
9004	// Result returns the result of the asynchronous operation.
9005	// If the operation has not completed it will return an error.
9006	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsArpTableListResult, error)
9007}
9008
9009// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9010func (future *ExpressRouteCircuitsListArpTableFuture) UnmarshalJSON(body []byte) error {
9011	var azFuture azure.Future
9012	if err := json.Unmarshal(body, &azFuture); err != nil {
9013		return err
9014	}
9015	future.FutureAPI = &azFuture
9016	future.Result = future.result
9017	return nil
9018}
9019
9020// result is the default implementation for ExpressRouteCircuitsListArpTableFuture.Result.
9021func (future *ExpressRouteCircuitsListArpTableFuture) result(client ExpressRouteCircuitsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
9022	var done bool
9023	done, err = future.DoneWithContext(context.Background(), client)
9024	if err != nil {
9025		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", future.Response(), "Polling failure")
9026		return
9027	}
9028	if !done {
9029		ercatlr.Response.Response = future.Response()
9030		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListArpTableFuture")
9031		return
9032	}
9033	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9034	if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent {
9035		ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response)
9036		if err != nil {
9037			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request")
9038		}
9039	}
9040	return
9041}
9042
9043// ExpressRouteCircuitsListRoutesTableFuture an abstraction for monitoring and retrieving the results of a
9044// long-running operation.
9045type ExpressRouteCircuitsListRoutesTableFuture struct {
9046	azure.FutureAPI
9047	// Result returns the result of the asynchronous operation.
9048	// If the operation has not completed it will return an error.
9049	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsRoutesTableListResult, error)
9050}
9051
9052// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9053func (future *ExpressRouteCircuitsListRoutesTableFuture) UnmarshalJSON(body []byte) error {
9054	var azFuture azure.Future
9055	if err := json.Unmarshal(body, &azFuture); err != nil {
9056		return err
9057	}
9058	future.FutureAPI = &azFuture
9059	future.Result = future.result
9060	return nil
9061}
9062
9063// result is the default implementation for ExpressRouteCircuitsListRoutesTableFuture.Result.
9064func (future *ExpressRouteCircuitsListRoutesTableFuture) result(client ExpressRouteCircuitsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
9065	var done bool
9066	done, err = future.DoneWithContext(context.Background(), client)
9067	if err != nil {
9068		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", future.Response(), "Polling failure")
9069		return
9070	}
9071	if !done {
9072		ercrtlr.Response.Response = future.Response()
9073		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableFuture")
9074		return
9075	}
9076	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9077	if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent {
9078		ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response)
9079		if err != nil {
9080			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request")
9081		}
9082	}
9083	return
9084}
9085
9086// ExpressRouteCircuitsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving the
9087// results of a long-running operation.
9088type ExpressRouteCircuitsListRoutesTableSummaryFuture struct {
9089	azure.FutureAPI
9090	// Result returns the result of the asynchronous operation.
9091	// If the operation has not completed it will return an error.
9092	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsRoutesTableSummaryListResult, error)
9093}
9094
9095// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9096func (future *ExpressRouteCircuitsListRoutesTableSummaryFuture) UnmarshalJSON(body []byte) error {
9097	var azFuture azure.Future
9098	if err := json.Unmarshal(body, &azFuture); err != nil {
9099		return err
9100	}
9101	future.FutureAPI = &azFuture
9102	future.Result = future.result
9103	return nil
9104}
9105
9106// result is the default implementation for ExpressRouteCircuitsListRoutesTableSummaryFuture.Result.
9107func (future *ExpressRouteCircuitsListRoutesTableSummaryFuture) result(client ExpressRouteCircuitsClient) (ercrtslr ExpressRouteCircuitsRoutesTableSummaryListResult, err error) {
9108	var done bool
9109	done, err = future.DoneWithContext(context.Background(), client)
9110	if err != nil {
9111		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", future.Response(), "Polling failure")
9112		return
9113	}
9114	if !done {
9115		ercrtslr.Response.Response = future.Response()
9116		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableSummaryFuture")
9117		return
9118	}
9119	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9120	if ercrtslr.Response.Response, err = future.GetResult(sender); err == nil && ercrtslr.Response.Response.StatusCode != http.StatusNoContent {
9121		ercrtslr, err = client.ListRoutesTableSummaryResponder(ercrtslr.Response.Response)
9122		if err != nil {
9123			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", ercrtslr.Response.Response, "Failure responding to request")
9124		}
9125	}
9126	return
9127}
9128
9129// ExpressRouteCircuitsRoutesTableListResult response for ListRoutesTable associated with the Express Route
9130// Circuits API.
9131type ExpressRouteCircuitsRoutesTableListResult struct {
9132	autorest.Response `json:"-"`
9133	// Value - The list of routes table.
9134	Value *[]ExpressRouteCircuitRoutesTable `json:"value,omitempty"`
9135	// NextLink - The URL to get the next set of results.
9136	NextLink *string `json:"nextLink,omitempty"`
9137}
9138
9139// ExpressRouteCircuitsRoutesTableSummaryListResult response for ListRoutesTable associated with the
9140// Express Route Circuits API.
9141type ExpressRouteCircuitsRoutesTableSummaryListResult struct {
9142	autorest.Response `json:"-"`
9143	// Value - A list of the routes table.
9144	Value *[]ExpressRouteCircuitRoutesTableSummary `json:"value,omitempty"`
9145	// NextLink - The URL to get the next set of results.
9146	NextLink *string `json:"nextLink,omitempty"`
9147}
9148
9149// ExpressRouteCircuitStats contains stats associated with the peering.
9150type ExpressRouteCircuitStats struct {
9151	autorest.Response `json:"-"`
9152	// PrimarybytesIn - Gets BytesIn of the peering.
9153	PrimarybytesIn *int64 `json:"primarybytesIn,omitempty"`
9154	// PrimarybytesOut - Gets BytesOut of the peering.
9155	PrimarybytesOut *int64 `json:"primarybytesOut,omitempty"`
9156	// SecondarybytesIn - Gets BytesIn of the peering.
9157	SecondarybytesIn *int64 `json:"secondarybytesIn,omitempty"`
9158	// SecondarybytesOut - Gets BytesOut of the peering.
9159	SecondarybytesOut *int64 `json:"secondarybytesOut,omitempty"`
9160}
9161
9162// ExpressRouteCircuitsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
9163// long-running operation.
9164type ExpressRouteCircuitsUpdateTagsFuture 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) (ExpressRouteCircuit, error)
9169}
9170
9171// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9172func (future *ExpressRouteCircuitsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
9173	var azFuture azure.Future
9174	if err := json.Unmarshal(body, &azFuture); err != nil {
9175		return err
9176	}
9177	future.FutureAPI = &azFuture
9178	future.Result = future.result
9179	return nil
9180}
9181
9182// result is the default implementation for ExpressRouteCircuitsUpdateTagsFuture.Result.
9183func (future *ExpressRouteCircuitsUpdateTagsFuture) result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
9184	var done bool
9185	done, err = future.DoneWithContext(context.Background(), client)
9186	if err != nil {
9187		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
9188		return
9189	}
9190	if !done {
9191		erc.Response.Response = future.Response()
9192		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsUpdateTagsFuture")
9193		return
9194	}
9195	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9196	if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
9197		erc, err = client.UpdateTagsResponder(erc.Response.Response)
9198		if err != nil {
9199			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", erc.Response.Response, "Failure responding to request")
9200		}
9201	}
9202	return
9203}
9204
9205// ExpressRouteConnection expressRouteConnection resource.
9206type ExpressRouteConnection struct {
9207	autorest.Response                 `json:"-"`
9208	*ExpressRouteConnectionProperties `json:"properties,omitempty"`
9209	// Name - The name of the resource.
9210	Name *string `json:"name,omitempty"`
9211	// ID - Resource ID.
9212	ID *string `json:"id,omitempty"`
9213}
9214
9215// MarshalJSON is the custom marshaler for ExpressRouteConnection.
9216func (erc ExpressRouteConnection) MarshalJSON() ([]byte, error) {
9217	objectMap := make(map[string]interface{})
9218	if erc.ExpressRouteConnectionProperties != nil {
9219		objectMap["properties"] = erc.ExpressRouteConnectionProperties
9220	}
9221	if erc.Name != nil {
9222		objectMap["name"] = erc.Name
9223	}
9224	if erc.ID != nil {
9225		objectMap["id"] = erc.ID
9226	}
9227	return json.Marshal(objectMap)
9228}
9229
9230// UnmarshalJSON is the custom unmarshaler for ExpressRouteConnection struct.
9231func (erc *ExpressRouteConnection) UnmarshalJSON(body []byte) error {
9232	var m map[string]*json.RawMessage
9233	err := json.Unmarshal(body, &m)
9234	if err != nil {
9235		return err
9236	}
9237	for k, v := range m {
9238		switch k {
9239		case "properties":
9240			if v != nil {
9241				var expressRouteConnectionProperties ExpressRouteConnectionProperties
9242				err = json.Unmarshal(*v, &expressRouteConnectionProperties)
9243				if err != nil {
9244					return err
9245				}
9246				erc.ExpressRouteConnectionProperties = &expressRouteConnectionProperties
9247			}
9248		case "name":
9249			if v != nil {
9250				var name string
9251				err = json.Unmarshal(*v, &name)
9252				if err != nil {
9253					return err
9254				}
9255				erc.Name = &name
9256			}
9257		case "id":
9258			if v != nil {
9259				var ID string
9260				err = json.Unmarshal(*v, &ID)
9261				if err != nil {
9262					return err
9263				}
9264				erc.ID = &ID
9265			}
9266		}
9267	}
9268
9269	return nil
9270}
9271
9272// ExpressRouteConnectionID the ID of the ExpressRouteConnection.
9273type ExpressRouteConnectionID struct {
9274	// ID - READ-ONLY; The ID of the ExpressRouteConnection.
9275	ID *string `json:"id,omitempty"`
9276}
9277
9278// MarshalJSON is the custom marshaler for ExpressRouteConnectionID.
9279func (erci ExpressRouteConnectionID) MarshalJSON() ([]byte, error) {
9280	objectMap := make(map[string]interface{})
9281	return json.Marshal(objectMap)
9282}
9283
9284// ExpressRouteConnectionList expressRouteConnection list
9285type ExpressRouteConnectionList struct {
9286	autorest.Response `json:"-"`
9287	// Value - The list of ExpressRoute connections
9288	Value *[]ExpressRouteConnection `json:"value,omitempty"`
9289}
9290
9291// ExpressRouteConnectionProperties properties of the ExpressRouteConnection subresource.
9292type ExpressRouteConnectionProperties struct {
9293	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
9294	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
9295	// ExpressRouteCircuitPeering - The ExpressRoute circuit peering.
9296	ExpressRouteCircuitPeering *ExpressRouteCircuitPeeringID `json:"expressRouteCircuitPeering,omitempty"`
9297	// AuthorizationKey - Authorization key to establish the connection.
9298	AuthorizationKey *string `json:"authorizationKey,omitempty"`
9299	// RoutingWeight - The routing weight associated to the connection.
9300	RoutingWeight *int32 `json:"routingWeight,omitempty"`
9301}
9302
9303// MarshalJSON is the custom marshaler for ExpressRouteConnectionProperties.
9304func (ercp ExpressRouteConnectionProperties) MarshalJSON() ([]byte, error) {
9305	objectMap := make(map[string]interface{})
9306	if ercp.ExpressRouteCircuitPeering != nil {
9307		objectMap["expressRouteCircuitPeering"] = ercp.ExpressRouteCircuitPeering
9308	}
9309	if ercp.AuthorizationKey != nil {
9310		objectMap["authorizationKey"] = ercp.AuthorizationKey
9311	}
9312	if ercp.RoutingWeight != nil {
9313		objectMap["routingWeight"] = ercp.RoutingWeight
9314	}
9315	return json.Marshal(objectMap)
9316}
9317
9318// ExpressRouteConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
9319// a long-running operation.
9320type ExpressRouteConnectionsCreateOrUpdateFuture struct {
9321	azure.FutureAPI
9322	// Result returns the result of the asynchronous operation.
9323	// If the operation has not completed it will return an error.
9324	Result func(ExpressRouteConnectionsClient) (ExpressRouteConnection, error)
9325}
9326
9327// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9328func (future *ExpressRouteConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
9329	var azFuture azure.Future
9330	if err := json.Unmarshal(body, &azFuture); err != nil {
9331		return err
9332	}
9333	future.FutureAPI = &azFuture
9334	future.Result = future.result
9335	return nil
9336}
9337
9338// result is the default implementation for ExpressRouteConnectionsCreateOrUpdateFuture.Result.
9339func (future *ExpressRouteConnectionsCreateOrUpdateFuture) result(client ExpressRouteConnectionsClient) (erc ExpressRouteConnection, err error) {
9340	var done bool
9341	done, err = future.DoneWithContext(context.Background(), client)
9342	if err != nil {
9343		err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
9344		return
9345	}
9346	if !done {
9347		erc.Response.Response = future.Response()
9348		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteConnectionsCreateOrUpdateFuture")
9349		return
9350	}
9351	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9352	if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
9353		erc, err = client.CreateOrUpdateResponder(erc.Response.Response)
9354		if err != nil {
9355			err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsCreateOrUpdateFuture", "Result", erc.Response.Response, "Failure responding to request")
9356		}
9357	}
9358	return
9359}
9360
9361// ExpressRouteConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a
9362// long-running operation.
9363type ExpressRouteConnectionsDeleteFuture struct {
9364	azure.FutureAPI
9365	// Result returns the result of the asynchronous operation.
9366	// If the operation has not completed it will return an error.
9367	Result func(ExpressRouteConnectionsClient) (autorest.Response, error)
9368}
9369
9370// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9371func (future *ExpressRouteConnectionsDeleteFuture) UnmarshalJSON(body []byte) error {
9372	var azFuture azure.Future
9373	if err := json.Unmarshal(body, &azFuture); err != nil {
9374		return err
9375	}
9376	future.FutureAPI = &azFuture
9377	future.Result = future.result
9378	return nil
9379}
9380
9381// result is the default implementation for ExpressRouteConnectionsDeleteFuture.Result.
9382func (future *ExpressRouteConnectionsDeleteFuture) result(client ExpressRouteConnectionsClient) (ar autorest.Response, err error) {
9383	var done bool
9384	done, err = future.DoneWithContext(context.Background(), client)
9385	if err != nil {
9386		err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
9387		return
9388	}
9389	if !done {
9390		ar.Response = future.Response()
9391		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteConnectionsDeleteFuture")
9392		return
9393	}
9394	ar.Response = future.Response()
9395	return
9396}
9397
9398// ExpressRouteCrossConnection expressRouteCrossConnection resource
9399type ExpressRouteCrossConnection struct {
9400	autorest.Response                      `json:"-"`
9401	*ExpressRouteCrossConnectionProperties `json:"properties,omitempty"`
9402	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
9403	Etag *string `json:"etag,omitempty"`
9404	// ID - Resource ID.
9405	ID *string `json:"id,omitempty"`
9406	// Name - READ-ONLY; Resource name.
9407	Name *string `json:"name,omitempty"`
9408	// Type - READ-ONLY; Resource type.
9409	Type *string `json:"type,omitempty"`
9410	// Location - Resource location.
9411	Location *string `json:"location,omitempty"`
9412	// Tags - Resource tags.
9413	Tags map[string]*string `json:"tags"`
9414}
9415
9416// MarshalJSON is the custom marshaler for ExpressRouteCrossConnection.
9417func (ercc ExpressRouteCrossConnection) MarshalJSON() ([]byte, error) {
9418	objectMap := make(map[string]interface{})
9419	if ercc.ExpressRouteCrossConnectionProperties != nil {
9420		objectMap["properties"] = ercc.ExpressRouteCrossConnectionProperties
9421	}
9422	if ercc.ID != nil {
9423		objectMap["id"] = ercc.ID
9424	}
9425	if ercc.Location != nil {
9426		objectMap["location"] = ercc.Location
9427	}
9428	if ercc.Tags != nil {
9429		objectMap["tags"] = ercc.Tags
9430	}
9431	return json.Marshal(objectMap)
9432}
9433
9434// UnmarshalJSON is the custom unmarshaler for ExpressRouteCrossConnection struct.
9435func (ercc *ExpressRouteCrossConnection) UnmarshalJSON(body []byte) error {
9436	var m map[string]*json.RawMessage
9437	err := json.Unmarshal(body, &m)
9438	if err != nil {
9439		return err
9440	}
9441	for k, v := range m {
9442		switch k {
9443		case "properties":
9444			if v != nil {
9445				var expressRouteCrossConnectionProperties ExpressRouteCrossConnectionProperties
9446				err = json.Unmarshal(*v, &expressRouteCrossConnectionProperties)
9447				if err != nil {
9448					return err
9449				}
9450				ercc.ExpressRouteCrossConnectionProperties = &expressRouteCrossConnectionProperties
9451			}
9452		case "etag":
9453			if v != nil {
9454				var etag string
9455				err = json.Unmarshal(*v, &etag)
9456				if err != nil {
9457					return err
9458				}
9459				ercc.Etag = &etag
9460			}
9461		case "id":
9462			if v != nil {
9463				var ID string
9464				err = json.Unmarshal(*v, &ID)
9465				if err != nil {
9466					return err
9467				}
9468				ercc.ID = &ID
9469			}
9470		case "name":
9471			if v != nil {
9472				var name string
9473				err = json.Unmarshal(*v, &name)
9474				if err != nil {
9475					return err
9476				}
9477				ercc.Name = &name
9478			}
9479		case "type":
9480			if v != nil {
9481				var typeVar string
9482				err = json.Unmarshal(*v, &typeVar)
9483				if err != nil {
9484					return err
9485				}
9486				ercc.Type = &typeVar
9487			}
9488		case "location":
9489			if v != nil {
9490				var location string
9491				err = json.Unmarshal(*v, &location)
9492				if err != nil {
9493					return err
9494				}
9495				ercc.Location = &location
9496			}
9497		case "tags":
9498			if v != nil {
9499				var tags map[string]*string
9500				err = json.Unmarshal(*v, &tags)
9501				if err != nil {
9502					return err
9503				}
9504				ercc.Tags = tags
9505			}
9506		}
9507	}
9508
9509	return nil
9510}
9511
9512// ExpressRouteCrossConnectionListResult response for ListExpressRouteCrossConnection API service call.
9513type ExpressRouteCrossConnectionListResult struct {
9514	autorest.Response `json:"-"`
9515	// Value - A list of ExpressRouteCrossConnection resources.
9516	Value *[]ExpressRouteCrossConnection `json:"value,omitempty"`
9517	// NextLink - READ-ONLY; The URL to get the next set of results.
9518	NextLink *string `json:"nextLink,omitempty"`
9519}
9520
9521// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionListResult.
9522func (ercclr ExpressRouteCrossConnectionListResult) MarshalJSON() ([]byte, error) {
9523	objectMap := make(map[string]interface{})
9524	if ercclr.Value != nil {
9525		objectMap["value"] = ercclr.Value
9526	}
9527	return json.Marshal(objectMap)
9528}
9529
9530// ExpressRouteCrossConnectionListResultIterator provides access to a complete listing of
9531// ExpressRouteCrossConnection values.
9532type ExpressRouteCrossConnectionListResultIterator struct {
9533	i    int
9534	page ExpressRouteCrossConnectionListResultPage
9535}
9536
9537// NextWithContext advances to the next value.  If there was an error making
9538// the request the iterator does not advance and the error is returned.
9539func (iter *ExpressRouteCrossConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
9540	if tracing.IsEnabled() {
9541		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionListResultIterator.NextWithContext")
9542		defer func() {
9543			sc := -1
9544			if iter.Response().Response.Response != nil {
9545				sc = iter.Response().Response.Response.StatusCode
9546			}
9547			tracing.EndSpan(ctx, sc, err)
9548		}()
9549	}
9550	iter.i++
9551	if iter.i < len(iter.page.Values()) {
9552		return nil
9553	}
9554	err = iter.page.NextWithContext(ctx)
9555	if err != nil {
9556		iter.i--
9557		return err
9558	}
9559	iter.i = 0
9560	return nil
9561}
9562
9563// Next advances to the next value.  If there was an error making
9564// the request the iterator does not advance and the error is returned.
9565// Deprecated: Use NextWithContext() instead.
9566func (iter *ExpressRouteCrossConnectionListResultIterator) Next() error {
9567	return iter.NextWithContext(context.Background())
9568}
9569
9570// NotDone returns true if the enumeration should be started or is not yet complete.
9571func (iter ExpressRouteCrossConnectionListResultIterator) NotDone() bool {
9572	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9573}
9574
9575// Response returns the raw server response from the last page request.
9576func (iter ExpressRouteCrossConnectionListResultIterator) Response() ExpressRouteCrossConnectionListResult {
9577	return iter.page.Response()
9578}
9579
9580// Value returns the current value or a zero-initialized value if the
9581// iterator has advanced beyond the end of the collection.
9582func (iter ExpressRouteCrossConnectionListResultIterator) Value() ExpressRouteCrossConnection {
9583	if !iter.page.NotDone() {
9584		return ExpressRouteCrossConnection{}
9585	}
9586	return iter.page.Values()[iter.i]
9587}
9588
9589// Creates a new instance of the ExpressRouteCrossConnectionListResultIterator type.
9590func NewExpressRouteCrossConnectionListResultIterator(page ExpressRouteCrossConnectionListResultPage) ExpressRouteCrossConnectionListResultIterator {
9591	return ExpressRouteCrossConnectionListResultIterator{page: page}
9592}
9593
9594// IsEmpty returns true if the ListResult contains no values.
9595func (ercclr ExpressRouteCrossConnectionListResult) IsEmpty() bool {
9596	return ercclr.Value == nil || len(*ercclr.Value) == 0
9597}
9598
9599// hasNextLink returns true if the NextLink is not empty.
9600func (ercclr ExpressRouteCrossConnectionListResult) hasNextLink() bool {
9601	return ercclr.NextLink != nil && len(*ercclr.NextLink) != 0
9602}
9603
9604// expressRouteCrossConnectionListResultPreparer prepares a request to retrieve the next set of results.
9605// It returns nil if no more results exist.
9606func (ercclr ExpressRouteCrossConnectionListResult) expressRouteCrossConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
9607	if !ercclr.hasNextLink() {
9608		return nil, nil
9609	}
9610	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9611		autorest.AsJSON(),
9612		autorest.AsGet(),
9613		autorest.WithBaseURL(to.String(ercclr.NextLink)))
9614}
9615
9616// ExpressRouteCrossConnectionListResultPage contains a page of ExpressRouteCrossConnection values.
9617type ExpressRouteCrossConnectionListResultPage struct {
9618	fn     func(context.Context, ExpressRouteCrossConnectionListResult) (ExpressRouteCrossConnectionListResult, error)
9619	ercclr ExpressRouteCrossConnectionListResult
9620}
9621
9622// NextWithContext advances to the next page of values.  If there was an error making
9623// the request the page does not advance and the error is returned.
9624func (page *ExpressRouteCrossConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
9625	if tracing.IsEnabled() {
9626		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionListResultPage.NextWithContext")
9627		defer func() {
9628			sc := -1
9629			if page.Response().Response.Response != nil {
9630				sc = page.Response().Response.Response.StatusCode
9631			}
9632			tracing.EndSpan(ctx, sc, err)
9633		}()
9634	}
9635	for {
9636		next, err := page.fn(ctx, page.ercclr)
9637		if err != nil {
9638			return err
9639		}
9640		page.ercclr = next
9641		if !next.hasNextLink() || !next.IsEmpty() {
9642			break
9643		}
9644	}
9645	return nil
9646}
9647
9648// Next advances to the next page of values.  If there was an error making
9649// the request the page does not advance and the error is returned.
9650// Deprecated: Use NextWithContext() instead.
9651func (page *ExpressRouteCrossConnectionListResultPage) Next() error {
9652	return page.NextWithContext(context.Background())
9653}
9654
9655// NotDone returns true if the page enumeration should be started or is not yet complete.
9656func (page ExpressRouteCrossConnectionListResultPage) NotDone() bool {
9657	return !page.ercclr.IsEmpty()
9658}
9659
9660// Response returns the raw server response from the last page request.
9661func (page ExpressRouteCrossConnectionListResultPage) Response() ExpressRouteCrossConnectionListResult {
9662	return page.ercclr
9663}
9664
9665// Values returns the slice of values for the current page or nil if there are no values.
9666func (page ExpressRouteCrossConnectionListResultPage) Values() []ExpressRouteCrossConnection {
9667	if page.ercclr.IsEmpty() {
9668		return nil
9669	}
9670	return *page.ercclr.Value
9671}
9672
9673// Creates a new instance of the ExpressRouteCrossConnectionListResultPage type.
9674func NewExpressRouteCrossConnectionListResultPage(cur ExpressRouteCrossConnectionListResult, getNextPage func(context.Context, ExpressRouteCrossConnectionListResult) (ExpressRouteCrossConnectionListResult, error)) ExpressRouteCrossConnectionListResultPage {
9675	return ExpressRouteCrossConnectionListResultPage{
9676		fn:     getNextPage,
9677		ercclr: cur,
9678	}
9679}
9680
9681// ExpressRouteCrossConnectionPeering peering in an ExpressRoute Cross Connection resource.
9682type ExpressRouteCrossConnectionPeering struct {
9683	autorest.Response                             `json:"-"`
9684	*ExpressRouteCrossConnectionPeeringProperties `json:"properties,omitempty"`
9685	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
9686	Name *string `json:"name,omitempty"`
9687	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
9688	Etag *string `json:"etag,omitempty"`
9689	// ID - Resource ID.
9690	ID *string `json:"id,omitempty"`
9691}
9692
9693// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeering.
9694func (erccp ExpressRouteCrossConnectionPeering) MarshalJSON() ([]byte, error) {
9695	objectMap := make(map[string]interface{})
9696	if erccp.ExpressRouteCrossConnectionPeeringProperties != nil {
9697		objectMap["properties"] = erccp.ExpressRouteCrossConnectionPeeringProperties
9698	}
9699	if erccp.Name != nil {
9700		objectMap["name"] = erccp.Name
9701	}
9702	if erccp.ID != nil {
9703		objectMap["id"] = erccp.ID
9704	}
9705	return json.Marshal(objectMap)
9706}
9707
9708// UnmarshalJSON is the custom unmarshaler for ExpressRouteCrossConnectionPeering struct.
9709func (erccp *ExpressRouteCrossConnectionPeering) UnmarshalJSON(body []byte) error {
9710	var m map[string]*json.RawMessage
9711	err := json.Unmarshal(body, &m)
9712	if err != nil {
9713		return err
9714	}
9715	for k, v := range m {
9716		switch k {
9717		case "properties":
9718			if v != nil {
9719				var expressRouteCrossConnectionPeeringProperties ExpressRouteCrossConnectionPeeringProperties
9720				err = json.Unmarshal(*v, &expressRouteCrossConnectionPeeringProperties)
9721				if err != nil {
9722					return err
9723				}
9724				erccp.ExpressRouteCrossConnectionPeeringProperties = &expressRouteCrossConnectionPeeringProperties
9725			}
9726		case "name":
9727			if v != nil {
9728				var name string
9729				err = json.Unmarshal(*v, &name)
9730				if err != nil {
9731					return err
9732				}
9733				erccp.Name = &name
9734			}
9735		case "etag":
9736			if v != nil {
9737				var etag string
9738				err = json.Unmarshal(*v, &etag)
9739				if err != nil {
9740					return err
9741				}
9742				erccp.Etag = &etag
9743			}
9744		case "id":
9745			if v != nil {
9746				var ID string
9747				err = json.Unmarshal(*v, &ID)
9748				if err != nil {
9749					return err
9750				}
9751				erccp.ID = &ID
9752			}
9753		}
9754	}
9755
9756	return nil
9757}
9758
9759// ExpressRouteCrossConnectionPeeringList response for ListPeering API service call retrieves all peerings
9760// that belong to an ExpressRouteCrossConnection.
9761type ExpressRouteCrossConnectionPeeringList struct {
9762	autorest.Response `json:"-"`
9763	// Value - The peerings in an express route cross connection.
9764	Value *[]ExpressRouteCrossConnectionPeering `json:"value,omitempty"`
9765	// NextLink - READ-ONLY; The URL to get the next set of results.
9766	NextLink *string `json:"nextLink,omitempty"`
9767}
9768
9769// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeeringList.
9770func (erccpl ExpressRouteCrossConnectionPeeringList) MarshalJSON() ([]byte, error) {
9771	objectMap := make(map[string]interface{})
9772	if erccpl.Value != nil {
9773		objectMap["value"] = erccpl.Value
9774	}
9775	return json.Marshal(objectMap)
9776}
9777
9778// ExpressRouteCrossConnectionPeeringListIterator provides access to a complete listing of
9779// ExpressRouteCrossConnectionPeering values.
9780type ExpressRouteCrossConnectionPeeringListIterator struct {
9781	i    int
9782	page ExpressRouteCrossConnectionPeeringListPage
9783}
9784
9785// NextWithContext advances to the next value.  If there was an error making
9786// the request the iterator does not advance and the error is returned.
9787func (iter *ExpressRouteCrossConnectionPeeringListIterator) NextWithContext(ctx context.Context) (err error) {
9788	if tracing.IsEnabled() {
9789		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringListIterator.NextWithContext")
9790		defer func() {
9791			sc := -1
9792			if iter.Response().Response.Response != nil {
9793				sc = iter.Response().Response.Response.StatusCode
9794			}
9795			tracing.EndSpan(ctx, sc, err)
9796		}()
9797	}
9798	iter.i++
9799	if iter.i < len(iter.page.Values()) {
9800		return nil
9801	}
9802	err = iter.page.NextWithContext(ctx)
9803	if err != nil {
9804		iter.i--
9805		return err
9806	}
9807	iter.i = 0
9808	return nil
9809}
9810
9811// Next advances to the next value.  If there was an error making
9812// the request the iterator does not advance and the error is returned.
9813// Deprecated: Use NextWithContext() instead.
9814func (iter *ExpressRouteCrossConnectionPeeringListIterator) Next() error {
9815	return iter.NextWithContext(context.Background())
9816}
9817
9818// NotDone returns true if the enumeration should be started or is not yet complete.
9819func (iter ExpressRouteCrossConnectionPeeringListIterator) NotDone() bool {
9820	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9821}
9822
9823// Response returns the raw server response from the last page request.
9824func (iter ExpressRouteCrossConnectionPeeringListIterator) Response() ExpressRouteCrossConnectionPeeringList {
9825	return iter.page.Response()
9826}
9827
9828// Value returns the current value or a zero-initialized value if the
9829// iterator has advanced beyond the end of the collection.
9830func (iter ExpressRouteCrossConnectionPeeringListIterator) Value() ExpressRouteCrossConnectionPeering {
9831	if !iter.page.NotDone() {
9832		return ExpressRouteCrossConnectionPeering{}
9833	}
9834	return iter.page.Values()[iter.i]
9835}
9836
9837// Creates a new instance of the ExpressRouteCrossConnectionPeeringListIterator type.
9838func NewExpressRouteCrossConnectionPeeringListIterator(page ExpressRouteCrossConnectionPeeringListPage) ExpressRouteCrossConnectionPeeringListIterator {
9839	return ExpressRouteCrossConnectionPeeringListIterator{page: page}
9840}
9841
9842// IsEmpty returns true if the ListResult contains no values.
9843func (erccpl ExpressRouteCrossConnectionPeeringList) IsEmpty() bool {
9844	return erccpl.Value == nil || len(*erccpl.Value) == 0
9845}
9846
9847// hasNextLink returns true if the NextLink is not empty.
9848func (erccpl ExpressRouteCrossConnectionPeeringList) hasNextLink() bool {
9849	return erccpl.NextLink != nil && len(*erccpl.NextLink) != 0
9850}
9851
9852// expressRouteCrossConnectionPeeringListPreparer prepares a request to retrieve the next set of results.
9853// It returns nil if no more results exist.
9854func (erccpl ExpressRouteCrossConnectionPeeringList) expressRouteCrossConnectionPeeringListPreparer(ctx context.Context) (*http.Request, error) {
9855	if !erccpl.hasNextLink() {
9856		return nil, nil
9857	}
9858	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9859		autorest.AsJSON(),
9860		autorest.AsGet(),
9861		autorest.WithBaseURL(to.String(erccpl.NextLink)))
9862}
9863
9864// ExpressRouteCrossConnectionPeeringListPage contains a page of ExpressRouteCrossConnectionPeering values.
9865type ExpressRouteCrossConnectionPeeringListPage struct {
9866	fn     func(context.Context, ExpressRouteCrossConnectionPeeringList) (ExpressRouteCrossConnectionPeeringList, error)
9867	erccpl ExpressRouteCrossConnectionPeeringList
9868}
9869
9870// NextWithContext advances to the next page of values.  If there was an error making
9871// the request the page does not advance and the error is returned.
9872func (page *ExpressRouteCrossConnectionPeeringListPage) NextWithContext(ctx context.Context) (err error) {
9873	if tracing.IsEnabled() {
9874		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringListPage.NextWithContext")
9875		defer func() {
9876			sc := -1
9877			if page.Response().Response.Response != nil {
9878				sc = page.Response().Response.Response.StatusCode
9879			}
9880			tracing.EndSpan(ctx, sc, err)
9881		}()
9882	}
9883	for {
9884		next, err := page.fn(ctx, page.erccpl)
9885		if err != nil {
9886			return err
9887		}
9888		page.erccpl = next
9889		if !next.hasNextLink() || !next.IsEmpty() {
9890			break
9891		}
9892	}
9893	return nil
9894}
9895
9896// Next advances to the next page of values.  If there was an error making
9897// the request the page does not advance and the error is returned.
9898// Deprecated: Use NextWithContext() instead.
9899func (page *ExpressRouteCrossConnectionPeeringListPage) Next() error {
9900	return page.NextWithContext(context.Background())
9901}
9902
9903// NotDone returns true if the page enumeration should be started or is not yet complete.
9904func (page ExpressRouteCrossConnectionPeeringListPage) NotDone() bool {
9905	return !page.erccpl.IsEmpty()
9906}
9907
9908// Response returns the raw server response from the last page request.
9909func (page ExpressRouteCrossConnectionPeeringListPage) Response() ExpressRouteCrossConnectionPeeringList {
9910	return page.erccpl
9911}
9912
9913// Values returns the slice of values for the current page or nil if there are no values.
9914func (page ExpressRouteCrossConnectionPeeringListPage) Values() []ExpressRouteCrossConnectionPeering {
9915	if page.erccpl.IsEmpty() {
9916		return nil
9917	}
9918	return *page.erccpl.Value
9919}
9920
9921// Creates a new instance of the ExpressRouteCrossConnectionPeeringListPage type.
9922func NewExpressRouteCrossConnectionPeeringListPage(cur ExpressRouteCrossConnectionPeeringList, getNextPage func(context.Context, ExpressRouteCrossConnectionPeeringList) (ExpressRouteCrossConnectionPeeringList, error)) ExpressRouteCrossConnectionPeeringListPage {
9923	return ExpressRouteCrossConnectionPeeringListPage{
9924		fn:     getNextPage,
9925		erccpl: cur,
9926	}
9927}
9928
9929// ExpressRouteCrossConnectionPeeringProperties ...
9930type ExpressRouteCrossConnectionPeeringProperties struct {
9931	// PeeringType - The peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'
9932	PeeringType ExpressRoutePeeringType `json:"peeringType,omitempty"`
9933	// State - The peering state. Possible values include: 'ExpressRoutePeeringStateDisabled', 'ExpressRoutePeeringStateEnabled'
9934	State ExpressRoutePeeringState `json:"state,omitempty"`
9935	// AzureASN - READ-ONLY; The Azure ASN.
9936	AzureASN *int32 `json:"azureASN,omitempty"`
9937	// PeerASN - The peer ASN.
9938	PeerASN *int64 `json:"peerASN,omitempty"`
9939	// PrimaryPeerAddressPrefix - The primary address prefix.
9940	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
9941	// SecondaryPeerAddressPrefix - The secondary address prefix.
9942	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
9943	// PrimaryAzurePort - READ-ONLY; The primary port.
9944	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
9945	// SecondaryAzurePort - READ-ONLY; The secondary port.
9946	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
9947	// SharedKey - The shared key.
9948	SharedKey *string `json:"sharedKey,omitempty"`
9949	// VlanID - The VLAN ID.
9950	VlanID *int32 `json:"vlanId,omitempty"`
9951	// MicrosoftPeeringConfig - The Microsoft peering configuration.
9952	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
9953	// ProvisioningState - READ-ONLY; Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
9954	ProvisioningState *string `json:"provisioningState,omitempty"`
9955	// GatewayManagerEtag - The GatewayManager Etag.
9956	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
9957	// LastModifiedBy - Gets whether the provider or the customer last modified the peering.
9958	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
9959	// Ipv6PeeringConfig - The IPv6 peering configuration.
9960	Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"`
9961}
9962
9963// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeeringProperties.
9964func (erccpp ExpressRouteCrossConnectionPeeringProperties) MarshalJSON() ([]byte, error) {
9965	objectMap := make(map[string]interface{})
9966	if erccpp.PeeringType != "" {
9967		objectMap["peeringType"] = erccpp.PeeringType
9968	}
9969	if erccpp.State != "" {
9970		objectMap["state"] = erccpp.State
9971	}
9972	if erccpp.PeerASN != nil {
9973		objectMap["peerASN"] = erccpp.PeerASN
9974	}
9975	if erccpp.PrimaryPeerAddressPrefix != nil {
9976		objectMap["primaryPeerAddressPrefix"] = erccpp.PrimaryPeerAddressPrefix
9977	}
9978	if erccpp.SecondaryPeerAddressPrefix != nil {
9979		objectMap["secondaryPeerAddressPrefix"] = erccpp.SecondaryPeerAddressPrefix
9980	}
9981	if erccpp.SharedKey != nil {
9982		objectMap["sharedKey"] = erccpp.SharedKey
9983	}
9984	if erccpp.VlanID != nil {
9985		objectMap["vlanId"] = erccpp.VlanID
9986	}
9987	if erccpp.MicrosoftPeeringConfig != nil {
9988		objectMap["microsoftPeeringConfig"] = erccpp.MicrosoftPeeringConfig
9989	}
9990	if erccpp.GatewayManagerEtag != nil {
9991		objectMap["gatewayManagerEtag"] = erccpp.GatewayManagerEtag
9992	}
9993	if erccpp.LastModifiedBy != nil {
9994		objectMap["lastModifiedBy"] = erccpp.LastModifiedBy
9995	}
9996	if erccpp.Ipv6PeeringConfig != nil {
9997		objectMap["ipv6PeeringConfig"] = erccpp.Ipv6PeeringConfig
9998	}
9999	return json.Marshal(objectMap)
10000}
10001
10002// ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
10003// results of a long-running operation.
10004type ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture struct {
10005	azure.FutureAPI
10006	// Result returns the result of the asynchronous operation.
10007	// If the operation has not completed it will return an error.
10008	Result func(ExpressRouteCrossConnectionPeeringsClient) (ExpressRouteCrossConnectionPeering, error)
10009}
10010
10011// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10012func (future *ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
10013	var azFuture azure.Future
10014	if err := json.Unmarshal(body, &azFuture); err != nil {
10015		return err
10016	}
10017	future.FutureAPI = &azFuture
10018	future.Result = future.result
10019	return nil
10020}
10021
10022// result is the default implementation for ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture.Result.
10023func (future *ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture) result(client ExpressRouteCrossConnectionPeeringsClient) (erccp ExpressRouteCrossConnectionPeering, err error) {
10024	var done bool
10025	done, err = future.DoneWithContext(context.Background(), client)
10026	if err != nil {
10027		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
10028		return
10029	}
10030	if !done {
10031		erccp.Response.Response = future.Response()
10032		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture")
10033		return
10034	}
10035	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10036	if erccp.Response.Response, err = future.GetResult(sender); err == nil && erccp.Response.Response.StatusCode != http.StatusNoContent {
10037		erccp, err = client.CreateOrUpdateResponder(erccp.Response.Response)
10038		if err != nil {
10039			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture", "Result", erccp.Response.Response, "Failure responding to request")
10040		}
10041	}
10042	return
10043}
10044
10045// ExpressRouteCrossConnectionPeeringsDeleteFuture an abstraction for monitoring and retrieving the results
10046// of a long-running operation.
10047type ExpressRouteCrossConnectionPeeringsDeleteFuture struct {
10048	azure.FutureAPI
10049	// Result returns the result of the asynchronous operation.
10050	// If the operation has not completed it will return an error.
10051	Result func(ExpressRouteCrossConnectionPeeringsClient) (autorest.Response, error)
10052}
10053
10054// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10055func (future *ExpressRouteCrossConnectionPeeringsDeleteFuture) UnmarshalJSON(body []byte) error {
10056	var azFuture azure.Future
10057	if err := json.Unmarshal(body, &azFuture); err != nil {
10058		return err
10059	}
10060	future.FutureAPI = &azFuture
10061	future.Result = future.result
10062	return nil
10063}
10064
10065// result is the default implementation for ExpressRouteCrossConnectionPeeringsDeleteFuture.Result.
10066func (future *ExpressRouteCrossConnectionPeeringsDeleteFuture) result(client ExpressRouteCrossConnectionPeeringsClient) (ar autorest.Response, err error) {
10067	var done bool
10068	done, err = future.DoneWithContext(context.Background(), client)
10069	if err != nil {
10070		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
10071		return
10072	}
10073	if !done {
10074		ar.Response = future.Response()
10075		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionPeeringsDeleteFuture")
10076		return
10077	}
10078	ar.Response = future.Response()
10079	return
10080}
10081
10082// ExpressRouteCrossConnectionProperties properties of ExpressRouteCrossConnection.
10083type ExpressRouteCrossConnectionProperties struct {
10084	// PrimaryAzurePort - READ-ONLY; The name of the primary  port.
10085	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
10086	// SecondaryAzurePort - READ-ONLY; The name of the secondary  port.
10087	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
10088	// STag - READ-ONLY; The identifier of the circuit traffic.
10089	STag *int32 `json:"sTag,omitempty"`
10090	// PeeringLocation - The peering location of the ExpressRoute circuit.
10091	PeeringLocation *string `json:"peeringLocation,omitempty"`
10092	// BandwidthInMbps - The circuit bandwidth In Mbps.
10093	BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"`
10094	// ExpressRouteCircuit - The ExpressRouteCircuit
10095	ExpressRouteCircuit *ExpressRouteCircuitReference `json:"expressRouteCircuit,omitempty"`
10096	// ServiceProviderProvisioningState - The provisioning state of the circuit in the connectivity provider system. Possible values are 'NotProvisioned', 'Provisioning', 'Provisioned'. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning'
10097	ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"`
10098	// ServiceProviderNotes - Additional read only notes set by the connectivity provider.
10099	ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"`
10100	// ProvisioningState - READ-ONLY; Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
10101	ProvisioningState *string `json:"provisioningState,omitempty"`
10102	// Peerings - The list of peerings.
10103	Peerings *[]ExpressRouteCrossConnectionPeering `json:"peerings,omitempty"`
10104}
10105
10106// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionProperties.
10107func (erccp ExpressRouteCrossConnectionProperties) MarshalJSON() ([]byte, error) {
10108	objectMap := make(map[string]interface{})
10109	if erccp.PeeringLocation != nil {
10110		objectMap["peeringLocation"] = erccp.PeeringLocation
10111	}
10112	if erccp.BandwidthInMbps != nil {
10113		objectMap["bandwidthInMbps"] = erccp.BandwidthInMbps
10114	}
10115	if erccp.ExpressRouteCircuit != nil {
10116		objectMap["expressRouteCircuit"] = erccp.ExpressRouteCircuit
10117	}
10118	if erccp.ServiceProviderProvisioningState != "" {
10119		objectMap["serviceProviderProvisioningState"] = erccp.ServiceProviderProvisioningState
10120	}
10121	if erccp.ServiceProviderNotes != nil {
10122		objectMap["serviceProviderNotes"] = erccp.ServiceProviderNotes
10123	}
10124	if erccp.Peerings != nil {
10125		objectMap["peerings"] = erccp.Peerings
10126	}
10127	return json.Marshal(objectMap)
10128}
10129
10130// ExpressRouteCrossConnectionRoutesTableSummary the routes table associated with the ExpressRouteCircuit.
10131type ExpressRouteCrossConnectionRoutesTableSummary struct {
10132	// Neighbor - IP address of Neighbor router
10133	Neighbor *string `json:"neighbor,omitempty"`
10134	// Asn - Autonomous system number.
10135	Asn *int32 `json:"asn,omitempty"`
10136	// 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.
10137	UpDown *string `json:"upDown,omitempty"`
10138	// StateOrPrefixesReceived - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group.
10139	StateOrPrefixesReceived *string `json:"stateOrPrefixesReceived,omitempty"`
10140}
10141
10142// ExpressRouteCrossConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
10143// results of a long-running operation.
10144type ExpressRouteCrossConnectionsCreateOrUpdateFuture struct {
10145	azure.FutureAPI
10146	// Result returns the result of the asynchronous operation.
10147	// If the operation has not completed it will return an error.
10148	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCrossConnection, error)
10149}
10150
10151// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10152func (future *ExpressRouteCrossConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
10153	var azFuture azure.Future
10154	if err := json.Unmarshal(body, &azFuture); err != nil {
10155		return err
10156	}
10157	future.FutureAPI = &azFuture
10158	future.Result = future.result
10159	return nil
10160}
10161
10162// result is the default implementation for ExpressRouteCrossConnectionsCreateOrUpdateFuture.Result.
10163func (future *ExpressRouteCrossConnectionsCreateOrUpdateFuture) result(client ExpressRouteCrossConnectionsClient) (ercc ExpressRouteCrossConnection, err error) {
10164	var done bool
10165	done, err = future.DoneWithContext(context.Background(), client)
10166	if err != nil {
10167		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
10168		return
10169	}
10170	if !done {
10171		ercc.Response.Response = future.Response()
10172		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsCreateOrUpdateFuture")
10173		return
10174	}
10175	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10176	if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent {
10177		ercc, err = client.CreateOrUpdateResponder(ercc.Response.Response)
10178		if err != nil {
10179			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsCreateOrUpdateFuture", "Result", ercc.Response.Response, "Failure responding to request")
10180		}
10181	}
10182	return
10183}
10184
10185// ExpressRouteCrossConnectionsListArpTableFuture an abstraction for monitoring and retrieving the results
10186// of a long-running operation.
10187type ExpressRouteCrossConnectionsListArpTableFuture struct {
10188	azure.FutureAPI
10189	// Result returns the result of the asynchronous operation.
10190	// If the operation has not completed it will return an error.
10191	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCircuitsArpTableListResult, error)
10192}
10193
10194// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10195func (future *ExpressRouteCrossConnectionsListArpTableFuture) UnmarshalJSON(body []byte) error {
10196	var azFuture azure.Future
10197	if err := json.Unmarshal(body, &azFuture); err != nil {
10198		return err
10199	}
10200	future.FutureAPI = &azFuture
10201	future.Result = future.result
10202	return nil
10203}
10204
10205// result is the default implementation for ExpressRouteCrossConnectionsListArpTableFuture.Result.
10206func (future *ExpressRouteCrossConnectionsListArpTableFuture) result(client ExpressRouteCrossConnectionsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
10207	var done bool
10208	done, err = future.DoneWithContext(context.Background(), client)
10209	if err != nil {
10210		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListArpTableFuture", "Result", future.Response(), "Polling failure")
10211		return
10212	}
10213	if !done {
10214		ercatlr.Response.Response = future.Response()
10215		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListArpTableFuture")
10216		return
10217	}
10218	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10219	if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent {
10220		ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response)
10221		if err != nil {
10222			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request")
10223		}
10224	}
10225	return
10226}
10227
10228// ExpressRouteCrossConnectionsListRoutesTableFuture an abstraction for monitoring and retrieving the
10229// results of a long-running operation.
10230type ExpressRouteCrossConnectionsListRoutesTableFuture struct {
10231	azure.FutureAPI
10232	// Result returns the result of the asynchronous operation.
10233	// If the operation has not completed it will return an error.
10234	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCircuitsRoutesTableListResult, error)
10235}
10236
10237// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10238func (future *ExpressRouteCrossConnectionsListRoutesTableFuture) UnmarshalJSON(body []byte) error {
10239	var azFuture azure.Future
10240	if err := json.Unmarshal(body, &azFuture); err != nil {
10241		return err
10242	}
10243	future.FutureAPI = &azFuture
10244	future.Result = future.result
10245	return nil
10246}
10247
10248// result is the default implementation for ExpressRouteCrossConnectionsListRoutesTableFuture.Result.
10249func (future *ExpressRouteCrossConnectionsListRoutesTableFuture) result(client ExpressRouteCrossConnectionsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
10250	var done bool
10251	done, err = future.DoneWithContext(context.Background(), client)
10252	if err != nil {
10253		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableFuture", "Result", future.Response(), "Polling failure")
10254		return
10255	}
10256	if !done {
10257		ercrtlr.Response.Response = future.Response()
10258		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListRoutesTableFuture")
10259		return
10260	}
10261	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10262	if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent {
10263		ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response)
10264		if err != nil {
10265			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request")
10266		}
10267	}
10268	return
10269}
10270
10271// ExpressRouteCrossConnectionsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving
10272// the results of a long-running operation.
10273type ExpressRouteCrossConnectionsListRoutesTableSummaryFuture struct {
10274	azure.FutureAPI
10275	// Result returns the result of the asynchronous operation.
10276	// If the operation has not completed it will return an error.
10277	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCrossConnectionsRoutesTableSummaryListResult, error)
10278}
10279
10280// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10281func (future *ExpressRouteCrossConnectionsListRoutesTableSummaryFuture) UnmarshalJSON(body []byte) error {
10282	var azFuture azure.Future
10283	if err := json.Unmarshal(body, &azFuture); err != nil {
10284		return err
10285	}
10286	future.FutureAPI = &azFuture
10287	future.Result = future.result
10288	return nil
10289}
10290
10291// result is the default implementation for ExpressRouteCrossConnectionsListRoutesTableSummaryFuture.Result.
10292func (future *ExpressRouteCrossConnectionsListRoutesTableSummaryFuture) result(client ExpressRouteCrossConnectionsClient) (erccrtslr ExpressRouteCrossConnectionsRoutesTableSummaryListResult, err error) {
10293	var done bool
10294	done, err = future.DoneWithContext(context.Background(), client)
10295	if err != nil {
10296		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture", "Result", future.Response(), "Polling failure")
10297		return
10298	}
10299	if !done {
10300		erccrtslr.Response.Response = future.Response()
10301		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture")
10302		return
10303	}
10304	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10305	if erccrtslr.Response.Response, err = future.GetResult(sender); err == nil && erccrtslr.Response.Response.StatusCode != http.StatusNoContent {
10306		erccrtslr, err = client.ListRoutesTableSummaryResponder(erccrtslr.Response.Response)
10307		if err != nil {
10308			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture", "Result", erccrtslr.Response.Response, "Failure responding to request")
10309		}
10310	}
10311	return
10312}
10313
10314// ExpressRouteCrossConnectionsRoutesTableSummaryListResult response for ListRoutesTable associated with
10315// the Express Route Cross Connections.
10316type ExpressRouteCrossConnectionsRoutesTableSummaryListResult struct {
10317	autorest.Response `json:"-"`
10318	// Value - A list of the routes table.
10319	Value *[]ExpressRouteCrossConnectionRoutesTableSummary `json:"value,omitempty"`
10320	// NextLink - READ-ONLY; The URL to get the next set of results.
10321	NextLink *string `json:"nextLink,omitempty"`
10322}
10323
10324// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionsRoutesTableSummaryListResult.
10325func (erccrtslr ExpressRouteCrossConnectionsRoutesTableSummaryListResult) MarshalJSON() ([]byte, error) {
10326	objectMap := make(map[string]interface{})
10327	if erccrtslr.Value != nil {
10328		objectMap["value"] = erccrtslr.Value
10329	}
10330	return json.Marshal(objectMap)
10331}
10332
10333// ExpressRouteCrossConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the results of
10334// a long-running operation.
10335type ExpressRouteCrossConnectionsUpdateTagsFuture struct {
10336	azure.FutureAPI
10337	// Result returns the result of the asynchronous operation.
10338	// If the operation has not completed it will return an error.
10339	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCrossConnection, error)
10340}
10341
10342// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10343func (future *ExpressRouteCrossConnectionsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
10344	var azFuture azure.Future
10345	if err := json.Unmarshal(body, &azFuture); err != nil {
10346		return err
10347	}
10348	future.FutureAPI = &azFuture
10349	future.Result = future.result
10350	return nil
10351}
10352
10353// result is the default implementation for ExpressRouteCrossConnectionsUpdateTagsFuture.Result.
10354func (future *ExpressRouteCrossConnectionsUpdateTagsFuture) result(client ExpressRouteCrossConnectionsClient) (ercc ExpressRouteCrossConnection, err error) {
10355	var done bool
10356	done, err = future.DoneWithContext(context.Background(), client)
10357	if err != nil {
10358		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
10359		return
10360	}
10361	if !done {
10362		ercc.Response.Response = future.Response()
10363		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsUpdateTagsFuture")
10364		return
10365	}
10366	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10367	if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent {
10368		ercc, err = client.UpdateTagsResponder(ercc.Response.Response)
10369		if err != nil {
10370			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsUpdateTagsFuture", "Result", ercc.Response.Response, "Failure responding to request")
10371		}
10372	}
10373	return
10374}
10375
10376// ExpressRouteGateway expressRoute gateway resource.
10377type ExpressRouteGateway struct {
10378	autorest.Response              `json:"-"`
10379	*ExpressRouteGatewayProperties `json:"properties,omitempty"`
10380	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
10381	Etag *string `json:"etag,omitempty"`
10382	// ID - Resource ID.
10383	ID *string `json:"id,omitempty"`
10384	// Name - READ-ONLY; Resource name.
10385	Name *string `json:"name,omitempty"`
10386	// Type - READ-ONLY; Resource type.
10387	Type *string `json:"type,omitempty"`
10388	// Location - Resource location.
10389	Location *string `json:"location,omitempty"`
10390	// Tags - Resource tags.
10391	Tags map[string]*string `json:"tags"`
10392}
10393
10394// MarshalJSON is the custom marshaler for ExpressRouteGateway.
10395func (erg ExpressRouteGateway) MarshalJSON() ([]byte, error) {
10396	objectMap := make(map[string]interface{})
10397	if erg.ExpressRouteGatewayProperties != nil {
10398		objectMap["properties"] = erg.ExpressRouteGatewayProperties
10399	}
10400	if erg.ID != nil {
10401		objectMap["id"] = erg.ID
10402	}
10403	if erg.Location != nil {
10404		objectMap["location"] = erg.Location
10405	}
10406	if erg.Tags != nil {
10407		objectMap["tags"] = erg.Tags
10408	}
10409	return json.Marshal(objectMap)
10410}
10411
10412// UnmarshalJSON is the custom unmarshaler for ExpressRouteGateway struct.
10413func (erg *ExpressRouteGateway) UnmarshalJSON(body []byte) error {
10414	var m map[string]*json.RawMessage
10415	err := json.Unmarshal(body, &m)
10416	if err != nil {
10417		return err
10418	}
10419	for k, v := range m {
10420		switch k {
10421		case "properties":
10422			if v != nil {
10423				var expressRouteGatewayProperties ExpressRouteGatewayProperties
10424				err = json.Unmarshal(*v, &expressRouteGatewayProperties)
10425				if err != nil {
10426					return err
10427				}
10428				erg.ExpressRouteGatewayProperties = &expressRouteGatewayProperties
10429			}
10430		case "etag":
10431			if v != nil {
10432				var etag string
10433				err = json.Unmarshal(*v, &etag)
10434				if err != nil {
10435					return err
10436				}
10437				erg.Etag = &etag
10438			}
10439		case "id":
10440			if v != nil {
10441				var ID string
10442				err = json.Unmarshal(*v, &ID)
10443				if err != nil {
10444					return err
10445				}
10446				erg.ID = &ID
10447			}
10448		case "name":
10449			if v != nil {
10450				var name string
10451				err = json.Unmarshal(*v, &name)
10452				if err != nil {
10453					return err
10454				}
10455				erg.Name = &name
10456			}
10457		case "type":
10458			if v != nil {
10459				var typeVar string
10460				err = json.Unmarshal(*v, &typeVar)
10461				if err != nil {
10462					return err
10463				}
10464				erg.Type = &typeVar
10465			}
10466		case "location":
10467			if v != nil {
10468				var location string
10469				err = json.Unmarshal(*v, &location)
10470				if err != nil {
10471					return err
10472				}
10473				erg.Location = &location
10474			}
10475		case "tags":
10476			if v != nil {
10477				var tags map[string]*string
10478				err = json.Unmarshal(*v, &tags)
10479				if err != nil {
10480					return err
10481				}
10482				erg.Tags = tags
10483			}
10484		}
10485	}
10486
10487	return nil
10488}
10489
10490// ExpressRouteGatewayList list of ExpressRoute gateways.
10491type ExpressRouteGatewayList struct {
10492	autorest.Response `json:"-"`
10493	// Value - List of ExpressRoute gateways.
10494	Value *[]ExpressRouteGateway `json:"value,omitempty"`
10495}
10496
10497// ExpressRouteGatewayProperties expressRoute gateway resource properties.
10498type ExpressRouteGatewayProperties struct {
10499	// AutoScaleConfiguration - Configuration for auto scaling.
10500	AutoScaleConfiguration *ExpressRouteGatewayPropertiesAutoScaleConfiguration `json:"autoScaleConfiguration,omitempty"`
10501	// ExpressRouteConnections - READ-ONLY; List of ExpressRoute connections to the ExpressRoute gateway.
10502	ExpressRouteConnections *[]ExpressRouteConnection `json:"expressRouteConnections,omitempty"`
10503	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
10504	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
10505	// VirtualHub - The Virtual Hub where the ExpressRoute gateway is or will be deployed.
10506	VirtualHub *VirtualHubID `json:"virtualHub,omitempty"`
10507}
10508
10509// MarshalJSON is the custom marshaler for ExpressRouteGatewayProperties.
10510func (ergp ExpressRouteGatewayProperties) MarshalJSON() ([]byte, error) {
10511	objectMap := make(map[string]interface{})
10512	if ergp.AutoScaleConfiguration != nil {
10513		objectMap["autoScaleConfiguration"] = ergp.AutoScaleConfiguration
10514	}
10515	if ergp.VirtualHub != nil {
10516		objectMap["virtualHub"] = ergp.VirtualHub
10517	}
10518	return json.Marshal(objectMap)
10519}
10520
10521// ExpressRouteGatewayPropertiesAutoScaleConfiguration configuration for auto scaling.
10522type ExpressRouteGatewayPropertiesAutoScaleConfiguration struct {
10523	// Bounds - Minimum and maximum number of scale units to deploy.
10524	Bounds *ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds `json:"bounds,omitempty"`
10525}
10526
10527// ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds minimum and maximum number of scale units to
10528// deploy.
10529type ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds struct {
10530	// Min - Minimum number of scale units deployed for ExpressRoute gateway.
10531	Min *int32 `json:"min,omitempty"`
10532	// Max - Maximum number of scale units deployed for ExpressRoute gateway.
10533	Max *int32 `json:"max,omitempty"`
10534}
10535
10536// ExpressRouteGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
10537// long-running operation.
10538type ExpressRouteGatewaysCreateOrUpdateFuture struct {
10539	azure.FutureAPI
10540	// Result returns the result of the asynchronous operation.
10541	// If the operation has not completed it will return an error.
10542	Result func(ExpressRouteGatewaysClient) (ExpressRouteGateway, error)
10543}
10544
10545// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10546func (future *ExpressRouteGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
10547	var azFuture azure.Future
10548	if err := json.Unmarshal(body, &azFuture); err != nil {
10549		return err
10550	}
10551	future.FutureAPI = &azFuture
10552	future.Result = future.result
10553	return nil
10554}
10555
10556// result is the default implementation for ExpressRouteGatewaysCreateOrUpdateFuture.Result.
10557func (future *ExpressRouteGatewaysCreateOrUpdateFuture) result(client ExpressRouteGatewaysClient) (erg ExpressRouteGateway, err error) {
10558	var done bool
10559	done, err = future.DoneWithContext(context.Background(), client)
10560	if err != nil {
10561		err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
10562		return
10563	}
10564	if !done {
10565		erg.Response.Response = future.Response()
10566		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteGatewaysCreateOrUpdateFuture")
10567		return
10568	}
10569	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10570	if erg.Response.Response, err = future.GetResult(sender); err == nil && erg.Response.Response.StatusCode != http.StatusNoContent {
10571		erg, err = client.CreateOrUpdateResponder(erg.Response.Response)
10572		if err != nil {
10573			err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysCreateOrUpdateFuture", "Result", erg.Response.Response, "Failure responding to request")
10574		}
10575	}
10576	return
10577}
10578
10579// ExpressRouteGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
10580// long-running operation.
10581type ExpressRouteGatewaysDeleteFuture struct {
10582	azure.FutureAPI
10583	// Result returns the result of the asynchronous operation.
10584	// If the operation has not completed it will return an error.
10585	Result func(ExpressRouteGatewaysClient) (autorest.Response, error)
10586}
10587
10588// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10589func (future *ExpressRouteGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
10590	var azFuture azure.Future
10591	if err := json.Unmarshal(body, &azFuture); err != nil {
10592		return err
10593	}
10594	future.FutureAPI = &azFuture
10595	future.Result = future.result
10596	return nil
10597}
10598
10599// result is the default implementation for ExpressRouteGatewaysDeleteFuture.Result.
10600func (future *ExpressRouteGatewaysDeleteFuture) result(client ExpressRouteGatewaysClient) (ar autorest.Response, err error) {
10601	var done bool
10602	done, err = future.DoneWithContext(context.Background(), client)
10603	if err != nil {
10604		err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
10605		return
10606	}
10607	if !done {
10608		ar.Response = future.Response()
10609		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteGatewaysDeleteFuture")
10610		return
10611	}
10612	ar.Response = future.Response()
10613	return
10614}
10615
10616// ExpressRouteLink expressRouteLink child resource definition.
10617type ExpressRouteLink struct {
10618	autorest.Response `json:"-"`
10619	// ExpressRouteLinkPropertiesFormat - ExpressRouteLink properties
10620	*ExpressRouteLinkPropertiesFormat `json:"properties,omitempty"`
10621	// Name - Name of child port resource that is unique among child port resources of the parent.
10622	Name *string `json:"name,omitempty"`
10623	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
10624	Etag *string `json:"etag,omitempty"`
10625	// ID - Resource ID.
10626	ID *string `json:"id,omitempty"`
10627}
10628
10629// MarshalJSON is the custom marshaler for ExpressRouteLink.
10630func (erl ExpressRouteLink) MarshalJSON() ([]byte, error) {
10631	objectMap := make(map[string]interface{})
10632	if erl.ExpressRouteLinkPropertiesFormat != nil {
10633		objectMap["properties"] = erl.ExpressRouteLinkPropertiesFormat
10634	}
10635	if erl.Name != nil {
10636		objectMap["name"] = erl.Name
10637	}
10638	if erl.ID != nil {
10639		objectMap["id"] = erl.ID
10640	}
10641	return json.Marshal(objectMap)
10642}
10643
10644// UnmarshalJSON is the custom unmarshaler for ExpressRouteLink struct.
10645func (erl *ExpressRouteLink) UnmarshalJSON(body []byte) error {
10646	var m map[string]*json.RawMessage
10647	err := json.Unmarshal(body, &m)
10648	if err != nil {
10649		return err
10650	}
10651	for k, v := range m {
10652		switch k {
10653		case "properties":
10654			if v != nil {
10655				var expressRouteLinkPropertiesFormat ExpressRouteLinkPropertiesFormat
10656				err = json.Unmarshal(*v, &expressRouteLinkPropertiesFormat)
10657				if err != nil {
10658					return err
10659				}
10660				erl.ExpressRouteLinkPropertiesFormat = &expressRouteLinkPropertiesFormat
10661			}
10662		case "name":
10663			if v != nil {
10664				var name string
10665				err = json.Unmarshal(*v, &name)
10666				if err != nil {
10667					return err
10668				}
10669				erl.Name = &name
10670			}
10671		case "etag":
10672			if v != nil {
10673				var etag string
10674				err = json.Unmarshal(*v, &etag)
10675				if err != nil {
10676					return err
10677				}
10678				erl.Etag = &etag
10679			}
10680		case "id":
10681			if v != nil {
10682				var ID string
10683				err = json.Unmarshal(*v, &ID)
10684				if err != nil {
10685					return err
10686				}
10687				erl.ID = &ID
10688			}
10689		}
10690	}
10691
10692	return nil
10693}
10694
10695// ExpressRouteLinkListResult response for ListExpressRouteLinks API service call.
10696type ExpressRouteLinkListResult struct {
10697	autorest.Response `json:"-"`
10698	// Value - The list of ExpressRouteLink sub-resources.
10699	Value *[]ExpressRouteLink `json:"value,omitempty"`
10700	// NextLink - The URL to get the next set of results.
10701	NextLink *string `json:"nextLink,omitempty"`
10702}
10703
10704// ExpressRouteLinkListResultIterator provides access to a complete listing of ExpressRouteLink values.
10705type ExpressRouteLinkListResultIterator struct {
10706	i    int
10707	page ExpressRouteLinkListResultPage
10708}
10709
10710// NextWithContext advances to the next value.  If there was an error making
10711// the request the iterator does not advance and the error is returned.
10712func (iter *ExpressRouteLinkListResultIterator) NextWithContext(ctx context.Context) (err error) {
10713	if tracing.IsEnabled() {
10714		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteLinkListResultIterator.NextWithContext")
10715		defer func() {
10716			sc := -1
10717			if iter.Response().Response.Response != nil {
10718				sc = iter.Response().Response.Response.StatusCode
10719			}
10720			tracing.EndSpan(ctx, sc, err)
10721		}()
10722	}
10723	iter.i++
10724	if iter.i < len(iter.page.Values()) {
10725		return nil
10726	}
10727	err = iter.page.NextWithContext(ctx)
10728	if err != nil {
10729		iter.i--
10730		return err
10731	}
10732	iter.i = 0
10733	return nil
10734}
10735
10736// Next advances to the next value.  If there was an error making
10737// the request the iterator does not advance and the error is returned.
10738// Deprecated: Use NextWithContext() instead.
10739func (iter *ExpressRouteLinkListResultIterator) Next() error {
10740	return iter.NextWithContext(context.Background())
10741}
10742
10743// NotDone returns true if the enumeration should be started or is not yet complete.
10744func (iter ExpressRouteLinkListResultIterator) NotDone() bool {
10745	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10746}
10747
10748// Response returns the raw server response from the last page request.
10749func (iter ExpressRouteLinkListResultIterator) Response() ExpressRouteLinkListResult {
10750	return iter.page.Response()
10751}
10752
10753// Value returns the current value or a zero-initialized value if the
10754// iterator has advanced beyond the end of the collection.
10755func (iter ExpressRouteLinkListResultIterator) Value() ExpressRouteLink {
10756	if !iter.page.NotDone() {
10757		return ExpressRouteLink{}
10758	}
10759	return iter.page.Values()[iter.i]
10760}
10761
10762// Creates a new instance of the ExpressRouteLinkListResultIterator type.
10763func NewExpressRouteLinkListResultIterator(page ExpressRouteLinkListResultPage) ExpressRouteLinkListResultIterator {
10764	return ExpressRouteLinkListResultIterator{page: page}
10765}
10766
10767// IsEmpty returns true if the ListResult contains no values.
10768func (erllr ExpressRouteLinkListResult) IsEmpty() bool {
10769	return erllr.Value == nil || len(*erllr.Value) == 0
10770}
10771
10772// hasNextLink returns true if the NextLink is not empty.
10773func (erllr ExpressRouteLinkListResult) hasNextLink() bool {
10774	return erllr.NextLink != nil && len(*erllr.NextLink) != 0
10775}
10776
10777// expressRouteLinkListResultPreparer prepares a request to retrieve the next set of results.
10778// It returns nil if no more results exist.
10779func (erllr ExpressRouteLinkListResult) expressRouteLinkListResultPreparer(ctx context.Context) (*http.Request, error) {
10780	if !erllr.hasNextLink() {
10781		return nil, nil
10782	}
10783	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10784		autorest.AsJSON(),
10785		autorest.AsGet(),
10786		autorest.WithBaseURL(to.String(erllr.NextLink)))
10787}
10788
10789// ExpressRouteLinkListResultPage contains a page of ExpressRouteLink values.
10790type ExpressRouteLinkListResultPage struct {
10791	fn    func(context.Context, ExpressRouteLinkListResult) (ExpressRouteLinkListResult, error)
10792	erllr ExpressRouteLinkListResult
10793}
10794
10795// NextWithContext advances to the next page of values.  If there was an error making
10796// the request the page does not advance and the error is returned.
10797func (page *ExpressRouteLinkListResultPage) NextWithContext(ctx context.Context) (err error) {
10798	if tracing.IsEnabled() {
10799		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteLinkListResultPage.NextWithContext")
10800		defer func() {
10801			sc := -1
10802			if page.Response().Response.Response != nil {
10803				sc = page.Response().Response.Response.StatusCode
10804			}
10805			tracing.EndSpan(ctx, sc, err)
10806		}()
10807	}
10808	for {
10809		next, err := page.fn(ctx, page.erllr)
10810		if err != nil {
10811			return err
10812		}
10813		page.erllr = next
10814		if !next.hasNextLink() || !next.IsEmpty() {
10815			break
10816		}
10817	}
10818	return nil
10819}
10820
10821// Next advances to the next page of values.  If there was an error making
10822// the request the page does not advance and the error is returned.
10823// Deprecated: Use NextWithContext() instead.
10824func (page *ExpressRouteLinkListResultPage) Next() error {
10825	return page.NextWithContext(context.Background())
10826}
10827
10828// NotDone returns true if the page enumeration should be started or is not yet complete.
10829func (page ExpressRouteLinkListResultPage) NotDone() bool {
10830	return !page.erllr.IsEmpty()
10831}
10832
10833// Response returns the raw server response from the last page request.
10834func (page ExpressRouteLinkListResultPage) Response() ExpressRouteLinkListResult {
10835	return page.erllr
10836}
10837
10838// Values returns the slice of values for the current page or nil if there are no values.
10839func (page ExpressRouteLinkListResultPage) Values() []ExpressRouteLink {
10840	if page.erllr.IsEmpty() {
10841		return nil
10842	}
10843	return *page.erllr.Value
10844}
10845
10846// Creates a new instance of the ExpressRouteLinkListResultPage type.
10847func NewExpressRouteLinkListResultPage(cur ExpressRouteLinkListResult, getNextPage func(context.Context, ExpressRouteLinkListResult) (ExpressRouteLinkListResult, error)) ExpressRouteLinkListResultPage {
10848	return ExpressRouteLinkListResultPage{
10849		fn:    getNextPage,
10850		erllr: cur,
10851	}
10852}
10853
10854// ExpressRouteLinkPropertiesFormat properties specific to ExpressRouteLink resources.
10855type ExpressRouteLinkPropertiesFormat struct {
10856	// RouterName - READ-ONLY; Name of Azure router associated with physical port.
10857	RouterName *string `json:"routerName,omitempty"`
10858	// InterfaceName - READ-ONLY; Name of Azure router interface.
10859	InterfaceName *string `json:"interfaceName,omitempty"`
10860	// PatchPanelID - READ-ONLY; Mapping between physical port to patch panel port.
10861	PatchPanelID *string `json:"patchPanelId,omitempty"`
10862	// RackID - READ-ONLY; Mapping of physical patch panel to rack.
10863	RackID *string `json:"rackId,omitempty"`
10864	// ConnectorType - READ-ONLY; Physical fiber port type. Possible values include: 'LC', 'SC'
10865	ConnectorType ExpressRouteLinkConnectorType `json:"connectorType,omitempty"`
10866	// AdminState - Administrative state of the physical port. Possible values include: 'ExpressRouteLinkAdminStateEnabled', 'ExpressRouteLinkAdminStateDisabled'
10867	AdminState ExpressRouteLinkAdminState `json:"adminState,omitempty"`
10868	// ProvisioningState - READ-ONLY; The provisioning state of the ExpressRouteLink resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
10869	ProvisioningState *string `json:"provisioningState,omitempty"`
10870}
10871
10872// MarshalJSON is the custom marshaler for ExpressRouteLinkPropertiesFormat.
10873func (erlpf ExpressRouteLinkPropertiesFormat) MarshalJSON() ([]byte, error) {
10874	objectMap := make(map[string]interface{})
10875	if erlpf.AdminState != "" {
10876		objectMap["adminState"] = erlpf.AdminState
10877	}
10878	return json.Marshal(objectMap)
10879}
10880
10881// ExpressRoutePort expressRoutePort resource definition.
10882type ExpressRoutePort struct {
10883	autorest.Response `json:"-"`
10884	// ExpressRoutePortPropertiesFormat - ExpressRoutePort properties
10885	*ExpressRoutePortPropertiesFormat `json:"properties,omitempty"`
10886	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
10887	Etag *string `json:"etag,omitempty"`
10888	// ID - Resource ID.
10889	ID *string `json:"id,omitempty"`
10890	// Name - READ-ONLY; Resource name.
10891	Name *string `json:"name,omitempty"`
10892	// Type - READ-ONLY; Resource type.
10893	Type *string `json:"type,omitempty"`
10894	// Location - Resource location.
10895	Location *string `json:"location,omitempty"`
10896	// Tags - Resource tags.
10897	Tags map[string]*string `json:"tags"`
10898}
10899
10900// MarshalJSON is the custom marshaler for ExpressRoutePort.
10901func (erp ExpressRoutePort) MarshalJSON() ([]byte, error) {
10902	objectMap := make(map[string]interface{})
10903	if erp.ExpressRoutePortPropertiesFormat != nil {
10904		objectMap["properties"] = erp.ExpressRoutePortPropertiesFormat
10905	}
10906	if erp.ID != nil {
10907		objectMap["id"] = erp.ID
10908	}
10909	if erp.Location != nil {
10910		objectMap["location"] = erp.Location
10911	}
10912	if erp.Tags != nil {
10913		objectMap["tags"] = erp.Tags
10914	}
10915	return json.Marshal(objectMap)
10916}
10917
10918// UnmarshalJSON is the custom unmarshaler for ExpressRoutePort struct.
10919func (erp *ExpressRoutePort) UnmarshalJSON(body []byte) error {
10920	var m map[string]*json.RawMessage
10921	err := json.Unmarshal(body, &m)
10922	if err != nil {
10923		return err
10924	}
10925	for k, v := range m {
10926		switch k {
10927		case "properties":
10928			if v != nil {
10929				var expressRoutePortPropertiesFormat ExpressRoutePortPropertiesFormat
10930				err = json.Unmarshal(*v, &expressRoutePortPropertiesFormat)
10931				if err != nil {
10932					return err
10933				}
10934				erp.ExpressRoutePortPropertiesFormat = &expressRoutePortPropertiesFormat
10935			}
10936		case "etag":
10937			if v != nil {
10938				var etag string
10939				err = json.Unmarshal(*v, &etag)
10940				if err != nil {
10941					return err
10942				}
10943				erp.Etag = &etag
10944			}
10945		case "id":
10946			if v != nil {
10947				var ID string
10948				err = json.Unmarshal(*v, &ID)
10949				if err != nil {
10950					return err
10951				}
10952				erp.ID = &ID
10953			}
10954		case "name":
10955			if v != nil {
10956				var name string
10957				err = json.Unmarshal(*v, &name)
10958				if err != nil {
10959					return err
10960				}
10961				erp.Name = &name
10962			}
10963		case "type":
10964			if v != nil {
10965				var typeVar string
10966				err = json.Unmarshal(*v, &typeVar)
10967				if err != nil {
10968					return err
10969				}
10970				erp.Type = &typeVar
10971			}
10972		case "location":
10973			if v != nil {
10974				var location string
10975				err = json.Unmarshal(*v, &location)
10976				if err != nil {
10977					return err
10978				}
10979				erp.Location = &location
10980			}
10981		case "tags":
10982			if v != nil {
10983				var tags map[string]*string
10984				err = json.Unmarshal(*v, &tags)
10985				if err != nil {
10986					return err
10987				}
10988				erp.Tags = tags
10989			}
10990		}
10991	}
10992
10993	return nil
10994}
10995
10996// ExpressRoutePortListResult response for ListExpressRoutePorts API service call.
10997type ExpressRoutePortListResult struct {
10998	autorest.Response `json:"-"`
10999	// Value - A list of ExpressRoutePort resources.
11000	Value *[]ExpressRoutePort `json:"value,omitempty"`
11001	// NextLink - The URL to get the next set of results.
11002	NextLink *string `json:"nextLink,omitempty"`
11003}
11004
11005// ExpressRoutePortListResultIterator provides access to a complete listing of ExpressRoutePort values.
11006type ExpressRoutePortListResultIterator struct {
11007	i    int
11008	page ExpressRoutePortListResultPage
11009}
11010
11011// NextWithContext advances to the next value.  If there was an error making
11012// the request the iterator does not advance and the error is returned.
11013func (iter *ExpressRoutePortListResultIterator) NextWithContext(ctx context.Context) (err error) {
11014	if tracing.IsEnabled() {
11015		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortListResultIterator.NextWithContext")
11016		defer func() {
11017			sc := -1
11018			if iter.Response().Response.Response != nil {
11019				sc = iter.Response().Response.Response.StatusCode
11020			}
11021			tracing.EndSpan(ctx, sc, err)
11022		}()
11023	}
11024	iter.i++
11025	if iter.i < len(iter.page.Values()) {
11026		return nil
11027	}
11028	err = iter.page.NextWithContext(ctx)
11029	if err != nil {
11030		iter.i--
11031		return err
11032	}
11033	iter.i = 0
11034	return nil
11035}
11036
11037// Next advances to the next value.  If there was an error making
11038// the request the iterator does not advance and the error is returned.
11039// Deprecated: Use NextWithContext() instead.
11040func (iter *ExpressRoutePortListResultIterator) Next() error {
11041	return iter.NextWithContext(context.Background())
11042}
11043
11044// NotDone returns true if the enumeration should be started or is not yet complete.
11045func (iter ExpressRoutePortListResultIterator) NotDone() bool {
11046	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11047}
11048
11049// Response returns the raw server response from the last page request.
11050func (iter ExpressRoutePortListResultIterator) Response() ExpressRoutePortListResult {
11051	return iter.page.Response()
11052}
11053
11054// Value returns the current value or a zero-initialized value if the
11055// iterator has advanced beyond the end of the collection.
11056func (iter ExpressRoutePortListResultIterator) Value() ExpressRoutePort {
11057	if !iter.page.NotDone() {
11058		return ExpressRoutePort{}
11059	}
11060	return iter.page.Values()[iter.i]
11061}
11062
11063// Creates a new instance of the ExpressRoutePortListResultIterator type.
11064func NewExpressRoutePortListResultIterator(page ExpressRoutePortListResultPage) ExpressRoutePortListResultIterator {
11065	return ExpressRoutePortListResultIterator{page: page}
11066}
11067
11068// IsEmpty returns true if the ListResult contains no values.
11069func (erplr ExpressRoutePortListResult) IsEmpty() bool {
11070	return erplr.Value == nil || len(*erplr.Value) == 0
11071}
11072
11073// hasNextLink returns true if the NextLink is not empty.
11074func (erplr ExpressRoutePortListResult) hasNextLink() bool {
11075	return erplr.NextLink != nil && len(*erplr.NextLink) != 0
11076}
11077
11078// expressRoutePortListResultPreparer prepares a request to retrieve the next set of results.
11079// It returns nil if no more results exist.
11080func (erplr ExpressRoutePortListResult) expressRoutePortListResultPreparer(ctx context.Context) (*http.Request, error) {
11081	if !erplr.hasNextLink() {
11082		return nil, nil
11083	}
11084	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11085		autorest.AsJSON(),
11086		autorest.AsGet(),
11087		autorest.WithBaseURL(to.String(erplr.NextLink)))
11088}
11089
11090// ExpressRoutePortListResultPage contains a page of ExpressRoutePort values.
11091type ExpressRoutePortListResultPage struct {
11092	fn    func(context.Context, ExpressRoutePortListResult) (ExpressRoutePortListResult, error)
11093	erplr ExpressRoutePortListResult
11094}
11095
11096// NextWithContext advances to the next page of values.  If there was an error making
11097// the request the page does not advance and the error is returned.
11098func (page *ExpressRoutePortListResultPage) NextWithContext(ctx context.Context) (err error) {
11099	if tracing.IsEnabled() {
11100		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortListResultPage.NextWithContext")
11101		defer func() {
11102			sc := -1
11103			if page.Response().Response.Response != nil {
11104				sc = page.Response().Response.Response.StatusCode
11105			}
11106			tracing.EndSpan(ctx, sc, err)
11107		}()
11108	}
11109	for {
11110		next, err := page.fn(ctx, page.erplr)
11111		if err != nil {
11112			return err
11113		}
11114		page.erplr = next
11115		if !next.hasNextLink() || !next.IsEmpty() {
11116			break
11117		}
11118	}
11119	return nil
11120}
11121
11122// Next advances to the next page of values.  If there was an error making
11123// the request the page does not advance and the error is returned.
11124// Deprecated: Use NextWithContext() instead.
11125func (page *ExpressRoutePortListResultPage) Next() error {
11126	return page.NextWithContext(context.Background())
11127}
11128
11129// NotDone returns true if the page enumeration should be started or is not yet complete.
11130func (page ExpressRoutePortListResultPage) NotDone() bool {
11131	return !page.erplr.IsEmpty()
11132}
11133
11134// Response returns the raw server response from the last page request.
11135func (page ExpressRoutePortListResultPage) Response() ExpressRoutePortListResult {
11136	return page.erplr
11137}
11138
11139// Values returns the slice of values for the current page or nil if there are no values.
11140func (page ExpressRoutePortListResultPage) Values() []ExpressRoutePort {
11141	if page.erplr.IsEmpty() {
11142		return nil
11143	}
11144	return *page.erplr.Value
11145}
11146
11147// Creates a new instance of the ExpressRoutePortListResultPage type.
11148func NewExpressRoutePortListResultPage(cur ExpressRoutePortListResult, getNextPage func(context.Context, ExpressRoutePortListResult) (ExpressRoutePortListResult, error)) ExpressRoutePortListResultPage {
11149	return ExpressRoutePortListResultPage{
11150		fn:    getNextPage,
11151		erplr: cur,
11152	}
11153}
11154
11155// ExpressRoutePortPropertiesFormat properties specific to ExpressRoutePort resources.
11156type ExpressRoutePortPropertiesFormat struct {
11157	// PeeringLocation - The name of the peering location that the ExpressRoutePort is mapped to physically.
11158	PeeringLocation *string `json:"peeringLocation,omitempty"`
11159	// BandwidthInGbps - Bandwidth of procured ports in Gbps
11160	BandwidthInGbps *int32 `json:"bandwidthInGbps,omitempty"`
11161	// ProvisionedBandwidthInGbps - READ-ONLY; Aggregate Gbps of associated circuit bandwidths.
11162	ProvisionedBandwidthInGbps *float64 `json:"provisionedBandwidthInGbps,omitempty"`
11163	// Mtu - READ-ONLY; Maximum transmission unit of the physical port pair(s)
11164	Mtu *string `json:"mtu,omitempty"`
11165	// Encapsulation - Encapsulation method on physical ports. Possible values include: 'Dot1Q', 'QinQ'
11166	Encapsulation ExpressRoutePortsEncapsulation `json:"encapsulation,omitempty"`
11167	// EtherType - READ-ONLY; Ether type of the physical port.
11168	EtherType *string `json:"etherType,omitempty"`
11169	// AllocationDate - READ-ONLY; Date of the physical port allocation to be used in Letter of Authorization.
11170	AllocationDate *string `json:"allocationDate,omitempty"`
11171	// Links - The set of physical links of the ExpressRoutePort resource
11172	Links *[]ExpressRouteLink `json:"links,omitempty"`
11173	// Circuits - READ-ONLY; Reference the ExpressRoute circuit(s) that are provisioned on this ExpressRoutePort resource.
11174	Circuits *[]SubResource `json:"circuits,omitempty"`
11175	// ProvisioningState - READ-ONLY; The provisioning state of the ExpressRoutePort resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
11176	ProvisioningState *string `json:"provisioningState,omitempty"`
11177	// ResourceGUID - The resource GUID property of the ExpressRoutePort resource.
11178	ResourceGUID *string `json:"resourceGuid,omitempty"`
11179}
11180
11181// MarshalJSON is the custom marshaler for ExpressRoutePortPropertiesFormat.
11182func (erppf ExpressRoutePortPropertiesFormat) MarshalJSON() ([]byte, error) {
11183	objectMap := make(map[string]interface{})
11184	if erppf.PeeringLocation != nil {
11185		objectMap["peeringLocation"] = erppf.PeeringLocation
11186	}
11187	if erppf.BandwidthInGbps != nil {
11188		objectMap["bandwidthInGbps"] = erppf.BandwidthInGbps
11189	}
11190	if erppf.Encapsulation != "" {
11191		objectMap["encapsulation"] = erppf.Encapsulation
11192	}
11193	if erppf.Links != nil {
11194		objectMap["links"] = erppf.Links
11195	}
11196	if erppf.ResourceGUID != nil {
11197		objectMap["resourceGuid"] = erppf.ResourceGUID
11198	}
11199	return json.Marshal(objectMap)
11200}
11201
11202// ExpressRoutePortsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
11203// long-running operation.
11204type ExpressRoutePortsCreateOrUpdateFuture struct {
11205	azure.FutureAPI
11206	// Result returns the result of the asynchronous operation.
11207	// If the operation has not completed it will return an error.
11208	Result func(ExpressRoutePortsClient) (ExpressRoutePort, error)
11209}
11210
11211// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11212func (future *ExpressRoutePortsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
11213	var azFuture azure.Future
11214	if err := json.Unmarshal(body, &azFuture); err != nil {
11215		return err
11216	}
11217	future.FutureAPI = &azFuture
11218	future.Result = future.result
11219	return nil
11220}
11221
11222// result is the default implementation for ExpressRoutePortsCreateOrUpdateFuture.Result.
11223func (future *ExpressRoutePortsCreateOrUpdateFuture) result(client ExpressRoutePortsClient) (erp ExpressRoutePort, err error) {
11224	var done bool
11225	done, err = future.DoneWithContext(context.Background(), client)
11226	if err != nil {
11227		err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
11228		return
11229	}
11230	if !done {
11231		erp.Response.Response = future.Response()
11232		err = azure.NewAsyncOpIncompleteError("network.ExpressRoutePortsCreateOrUpdateFuture")
11233		return
11234	}
11235	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
11236	if erp.Response.Response, err = future.GetResult(sender); err == nil && erp.Response.Response.StatusCode != http.StatusNoContent {
11237		erp, err = client.CreateOrUpdateResponder(erp.Response.Response)
11238		if err != nil {
11239			err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsCreateOrUpdateFuture", "Result", erp.Response.Response, "Failure responding to request")
11240		}
11241	}
11242	return
11243}
11244
11245// ExpressRoutePortsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
11246// operation.
11247type ExpressRoutePortsDeleteFuture struct {
11248	azure.FutureAPI
11249	// Result returns the result of the asynchronous operation.
11250	// If the operation has not completed it will return an error.
11251	Result func(ExpressRoutePortsClient) (autorest.Response, error)
11252}
11253
11254// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11255func (future *ExpressRoutePortsDeleteFuture) UnmarshalJSON(body []byte) error {
11256	var azFuture azure.Future
11257	if err := json.Unmarshal(body, &azFuture); err != nil {
11258		return err
11259	}
11260	future.FutureAPI = &azFuture
11261	future.Result = future.result
11262	return nil
11263}
11264
11265// result is the default implementation for ExpressRoutePortsDeleteFuture.Result.
11266func (future *ExpressRoutePortsDeleteFuture) result(client ExpressRoutePortsClient) (ar autorest.Response, err error) {
11267	var done bool
11268	done, err = future.DoneWithContext(context.Background(), client)
11269	if err != nil {
11270		err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsDeleteFuture", "Result", future.Response(), "Polling failure")
11271		return
11272	}
11273	if !done {
11274		ar.Response = future.Response()
11275		err = azure.NewAsyncOpIncompleteError("network.ExpressRoutePortsDeleteFuture")
11276		return
11277	}
11278	ar.Response = future.Response()
11279	return
11280}
11281
11282// ExpressRoutePortsLocation definition of the ExpressRoutePorts peering location resource.
11283type ExpressRoutePortsLocation struct {
11284	autorest.Response `json:"-"`
11285	// ExpressRoutePortsLocationPropertiesFormat - ExpressRoutePort peering location properties
11286	*ExpressRoutePortsLocationPropertiesFormat `json:"properties,omitempty"`
11287	// ID - Resource ID.
11288	ID *string `json:"id,omitempty"`
11289	// Name - READ-ONLY; Resource name.
11290	Name *string `json:"name,omitempty"`
11291	// Type - READ-ONLY; Resource type.
11292	Type *string `json:"type,omitempty"`
11293	// Location - Resource location.
11294	Location *string `json:"location,omitempty"`
11295	// Tags - Resource tags.
11296	Tags map[string]*string `json:"tags"`
11297}
11298
11299// MarshalJSON is the custom marshaler for ExpressRoutePortsLocation.
11300func (erpl ExpressRoutePortsLocation) MarshalJSON() ([]byte, error) {
11301	objectMap := make(map[string]interface{})
11302	if erpl.ExpressRoutePortsLocationPropertiesFormat != nil {
11303		objectMap["properties"] = erpl.ExpressRoutePortsLocationPropertiesFormat
11304	}
11305	if erpl.ID != nil {
11306		objectMap["id"] = erpl.ID
11307	}
11308	if erpl.Location != nil {
11309		objectMap["location"] = erpl.Location
11310	}
11311	if erpl.Tags != nil {
11312		objectMap["tags"] = erpl.Tags
11313	}
11314	return json.Marshal(objectMap)
11315}
11316
11317// UnmarshalJSON is the custom unmarshaler for ExpressRoutePortsLocation struct.
11318func (erpl *ExpressRoutePortsLocation) UnmarshalJSON(body []byte) error {
11319	var m map[string]*json.RawMessage
11320	err := json.Unmarshal(body, &m)
11321	if err != nil {
11322		return err
11323	}
11324	for k, v := range m {
11325		switch k {
11326		case "properties":
11327			if v != nil {
11328				var expressRoutePortsLocationPropertiesFormat ExpressRoutePortsLocationPropertiesFormat
11329				err = json.Unmarshal(*v, &expressRoutePortsLocationPropertiesFormat)
11330				if err != nil {
11331					return err
11332				}
11333				erpl.ExpressRoutePortsLocationPropertiesFormat = &expressRoutePortsLocationPropertiesFormat
11334			}
11335		case "id":
11336			if v != nil {
11337				var ID string
11338				err = json.Unmarshal(*v, &ID)
11339				if err != nil {
11340					return err
11341				}
11342				erpl.ID = &ID
11343			}
11344		case "name":
11345			if v != nil {
11346				var name string
11347				err = json.Unmarshal(*v, &name)
11348				if err != nil {
11349					return err
11350				}
11351				erpl.Name = &name
11352			}
11353		case "type":
11354			if v != nil {
11355				var typeVar string
11356				err = json.Unmarshal(*v, &typeVar)
11357				if err != nil {
11358					return err
11359				}
11360				erpl.Type = &typeVar
11361			}
11362		case "location":
11363			if v != nil {
11364				var location string
11365				err = json.Unmarshal(*v, &location)
11366				if err != nil {
11367					return err
11368				}
11369				erpl.Location = &location
11370			}
11371		case "tags":
11372			if v != nil {
11373				var tags map[string]*string
11374				err = json.Unmarshal(*v, &tags)
11375				if err != nil {
11376					return err
11377				}
11378				erpl.Tags = tags
11379			}
11380		}
11381	}
11382
11383	return nil
11384}
11385
11386// ExpressRoutePortsLocationBandwidths real-time inventory of available ExpressRoute port bandwidths.
11387type ExpressRoutePortsLocationBandwidths struct {
11388	// OfferName - READ-ONLY; Bandwidth descriptive name
11389	OfferName *string `json:"offerName,omitempty"`
11390	// ValueInGbps - READ-ONLY; Bandwidth value in Gbps
11391	ValueInGbps *int32 `json:"valueInGbps,omitempty"`
11392}
11393
11394// MarshalJSON is the custom marshaler for ExpressRoutePortsLocationBandwidths.
11395func (erplb ExpressRoutePortsLocationBandwidths) MarshalJSON() ([]byte, error) {
11396	objectMap := make(map[string]interface{})
11397	return json.Marshal(objectMap)
11398}
11399
11400// ExpressRoutePortsLocationListResult response for ListExpressRoutePortsLocations API service call.
11401type ExpressRoutePortsLocationListResult struct {
11402	autorest.Response `json:"-"`
11403	// Value - The list of all ExpressRoutePort peering locations.
11404	Value *[]ExpressRoutePortsLocation `json:"value,omitempty"`
11405	// NextLink - The URL to get the next set of results.
11406	NextLink *string `json:"nextLink,omitempty"`
11407}
11408
11409// ExpressRoutePortsLocationListResultIterator provides access to a complete listing of
11410// ExpressRoutePortsLocation values.
11411type ExpressRoutePortsLocationListResultIterator struct {
11412	i    int
11413	page ExpressRoutePortsLocationListResultPage
11414}
11415
11416// NextWithContext advances to the next value.  If there was an error making
11417// the request the iterator does not advance and the error is returned.
11418func (iter *ExpressRoutePortsLocationListResultIterator) NextWithContext(ctx context.Context) (err error) {
11419	if tracing.IsEnabled() {
11420		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsLocationListResultIterator.NextWithContext")
11421		defer func() {
11422			sc := -1
11423			if iter.Response().Response.Response != nil {
11424				sc = iter.Response().Response.Response.StatusCode
11425			}
11426			tracing.EndSpan(ctx, sc, err)
11427		}()
11428	}
11429	iter.i++
11430	if iter.i < len(iter.page.Values()) {
11431		return nil
11432	}
11433	err = iter.page.NextWithContext(ctx)
11434	if err != nil {
11435		iter.i--
11436		return err
11437	}
11438	iter.i = 0
11439	return nil
11440}
11441
11442// Next advances to the next value.  If there was an error making
11443// the request the iterator does not advance and the error is returned.
11444// Deprecated: Use NextWithContext() instead.
11445func (iter *ExpressRoutePortsLocationListResultIterator) Next() error {
11446	return iter.NextWithContext(context.Background())
11447}
11448
11449// NotDone returns true if the enumeration should be started or is not yet complete.
11450func (iter ExpressRoutePortsLocationListResultIterator) NotDone() bool {
11451	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11452}
11453
11454// Response returns the raw server response from the last page request.
11455func (iter ExpressRoutePortsLocationListResultIterator) Response() ExpressRoutePortsLocationListResult {
11456	return iter.page.Response()
11457}
11458
11459// Value returns the current value or a zero-initialized value if the
11460// iterator has advanced beyond the end of the collection.
11461func (iter ExpressRoutePortsLocationListResultIterator) Value() ExpressRoutePortsLocation {
11462	if !iter.page.NotDone() {
11463		return ExpressRoutePortsLocation{}
11464	}
11465	return iter.page.Values()[iter.i]
11466}
11467
11468// Creates a new instance of the ExpressRoutePortsLocationListResultIterator type.
11469func NewExpressRoutePortsLocationListResultIterator(page ExpressRoutePortsLocationListResultPage) ExpressRoutePortsLocationListResultIterator {
11470	return ExpressRoutePortsLocationListResultIterator{page: page}
11471}
11472
11473// IsEmpty returns true if the ListResult contains no values.
11474func (erpllr ExpressRoutePortsLocationListResult) IsEmpty() bool {
11475	return erpllr.Value == nil || len(*erpllr.Value) == 0
11476}
11477
11478// hasNextLink returns true if the NextLink is not empty.
11479func (erpllr ExpressRoutePortsLocationListResult) hasNextLink() bool {
11480	return erpllr.NextLink != nil && len(*erpllr.NextLink) != 0
11481}
11482
11483// expressRoutePortsLocationListResultPreparer prepares a request to retrieve the next set of results.
11484// It returns nil if no more results exist.
11485func (erpllr ExpressRoutePortsLocationListResult) expressRoutePortsLocationListResultPreparer(ctx context.Context) (*http.Request, error) {
11486	if !erpllr.hasNextLink() {
11487		return nil, nil
11488	}
11489	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11490		autorest.AsJSON(),
11491		autorest.AsGet(),
11492		autorest.WithBaseURL(to.String(erpllr.NextLink)))
11493}
11494
11495// ExpressRoutePortsLocationListResultPage contains a page of ExpressRoutePortsLocation values.
11496type ExpressRoutePortsLocationListResultPage struct {
11497	fn     func(context.Context, ExpressRoutePortsLocationListResult) (ExpressRoutePortsLocationListResult, error)
11498	erpllr ExpressRoutePortsLocationListResult
11499}
11500
11501// NextWithContext advances to the next page of values.  If there was an error making
11502// the request the page does not advance and the error is returned.
11503func (page *ExpressRoutePortsLocationListResultPage) NextWithContext(ctx context.Context) (err error) {
11504	if tracing.IsEnabled() {
11505		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsLocationListResultPage.NextWithContext")
11506		defer func() {
11507			sc := -1
11508			if page.Response().Response.Response != nil {
11509				sc = page.Response().Response.Response.StatusCode
11510			}
11511			tracing.EndSpan(ctx, sc, err)
11512		}()
11513	}
11514	for {
11515		next, err := page.fn(ctx, page.erpllr)
11516		if err != nil {
11517			return err
11518		}
11519		page.erpllr = next
11520		if !next.hasNextLink() || !next.IsEmpty() {
11521			break
11522		}
11523	}
11524	return nil
11525}
11526
11527// Next advances to the next page of values.  If there was an error making
11528// the request the page does not advance and the error is returned.
11529// Deprecated: Use NextWithContext() instead.
11530func (page *ExpressRoutePortsLocationListResultPage) Next() error {
11531	return page.NextWithContext(context.Background())
11532}
11533
11534// NotDone returns true if the page enumeration should be started or is not yet complete.
11535func (page ExpressRoutePortsLocationListResultPage) NotDone() bool {
11536	return !page.erpllr.IsEmpty()
11537}
11538
11539// Response returns the raw server response from the last page request.
11540func (page ExpressRoutePortsLocationListResultPage) Response() ExpressRoutePortsLocationListResult {
11541	return page.erpllr
11542}
11543
11544// Values returns the slice of values for the current page or nil if there are no values.
11545func (page ExpressRoutePortsLocationListResultPage) Values() []ExpressRoutePortsLocation {
11546	if page.erpllr.IsEmpty() {
11547		return nil
11548	}
11549	return *page.erpllr.Value
11550}
11551
11552// Creates a new instance of the ExpressRoutePortsLocationListResultPage type.
11553func NewExpressRoutePortsLocationListResultPage(cur ExpressRoutePortsLocationListResult, getNextPage func(context.Context, ExpressRoutePortsLocationListResult) (ExpressRoutePortsLocationListResult, error)) ExpressRoutePortsLocationListResultPage {
11554	return ExpressRoutePortsLocationListResultPage{
11555		fn:     getNextPage,
11556		erpllr: cur,
11557	}
11558}
11559
11560// ExpressRoutePortsLocationPropertiesFormat properties specific to ExpressRoutePorts peering location
11561// resources.
11562type ExpressRoutePortsLocationPropertiesFormat struct {
11563	// Address - READ-ONLY; Address of peering location.
11564	Address *string `json:"address,omitempty"`
11565	// Contact - READ-ONLY; Contact details of peering locations.
11566	Contact *string `json:"contact,omitempty"`
11567	// AvailableBandwidths - The inventory of available ExpressRoutePort bandwidths.
11568	AvailableBandwidths *[]ExpressRoutePortsLocationBandwidths `json:"availableBandwidths,omitempty"`
11569	// ProvisioningState - READ-ONLY; The provisioning state of the ExpressRoutePortLocation resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
11570	ProvisioningState *string `json:"provisioningState,omitempty"`
11571}
11572
11573// MarshalJSON is the custom marshaler for ExpressRoutePortsLocationPropertiesFormat.
11574func (erplpf ExpressRoutePortsLocationPropertiesFormat) MarshalJSON() ([]byte, error) {
11575	objectMap := make(map[string]interface{})
11576	if erplpf.AvailableBandwidths != nil {
11577		objectMap["availableBandwidths"] = erplpf.AvailableBandwidths
11578	}
11579	return json.Marshal(objectMap)
11580}
11581
11582// ExpressRoutePortsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
11583// long-running operation.
11584type ExpressRoutePortsUpdateTagsFuture struct {
11585	azure.FutureAPI
11586	// Result returns the result of the asynchronous operation.
11587	// If the operation has not completed it will return an error.
11588	Result func(ExpressRoutePortsClient) (ExpressRoutePort, error)
11589}
11590
11591// UnmarshalJSON is the custom unmarshaller for CreateFuture.
11592func (future *ExpressRoutePortsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
11593	var azFuture azure.Future
11594	if err := json.Unmarshal(body, &azFuture); err != nil {
11595		return err
11596	}
11597	future.FutureAPI = &azFuture
11598	future.Result = future.result
11599	return nil
11600}
11601
11602// result is the default implementation for ExpressRoutePortsUpdateTagsFuture.Result.
11603func (future *ExpressRoutePortsUpdateTagsFuture) result(client ExpressRoutePortsClient) (erp ExpressRoutePort, err error) {
11604	var done bool
11605	done, err = future.DoneWithContext(context.Background(), client)
11606	if err != nil {
11607		err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
11608		return
11609	}
11610	if !done {
11611		erp.Response.Response = future.Response()
11612		err = azure.NewAsyncOpIncompleteError("network.ExpressRoutePortsUpdateTagsFuture")
11613		return
11614	}
11615	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
11616	if erp.Response.Response, err = future.GetResult(sender); err == nil && erp.Response.Response.StatusCode != http.StatusNoContent {
11617		erp, err = client.UpdateTagsResponder(erp.Response.Response)
11618		if err != nil {
11619			err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsUpdateTagsFuture", "Result", erp.Response.Response, "Failure responding to request")
11620		}
11621	}
11622	return
11623}
11624
11625// ExpressRouteServiceProvider a ExpressRouteResourceProvider object.
11626type ExpressRouteServiceProvider struct {
11627	*ExpressRouteServiceProviderPropertiesFormat `json:"properties,omitempty"`
11628	// ID - Resource ID.
11629	ID *string `json:"id,omitempty"`
11630	// Name - READ-ONLY; Resource name.
11631	Name *string `json:"name,omitempty"`
11632	// Type - READ-ONLY; Resource type.
11633	Type *string `json:"type,omitempty"`
11634	// Location - Resource location.
11635	Location *string `json:"location,omitempty"`
11636	// Tags - Resource tags.
11637	Tags map[string]*string `json:"tags"`
11638}
11639
11640// MarshalJSON is the custom marshaler for ExpressRouteServiceProvider.
11641func (ersp ExpressRouteServiceProvider) MarshalJSON() ([]byte, error) {
11642	objectMap := make(map[string]interface{})
11643	if ersp.ExpressRouteServiceProviderPropertiesFormat != nil {
11644		objectMap["properties"] = ersp.ExpressRouteServiceProviderPropertiesFormat
11645	}
11646	if ersp.ID != nil {
11647		objectMap["id"] = ersp.ID
11648	}
11649	if ersp.Location != nil {
11650		objectMap["location"] = ersp.Location
11651	}
11652	if ersp.Tags != nil {
11653		objectMap["tags"] = ersp.Tags
11654	}
11655	return json.Marshal(objectMap)
11656}
11657
11658// UnmarshalJSON is the custom unmarshaler for ExpressRouteServiceProvider struct.
11659func (ersp *ExpressRouteServiceProvider) UnmarshalJSON(body []byte) error {
11660	var m map[string]*json.RawMessage
11661	err := json.Unmarshal(body, &m)
11662	if err != nil {
11663		return err
11664	}
11665	for k, v := range m {
11666		switch k {
11667		case "properties":
11668			if v != nil {
11669				var expressRouteServiceProviderPropertiesFormat ExpressRouteServiceProviderPropertiesFormat
11670				err = json.Unmarshal(*v, &expressRouteServiceProviderPropertiesFormat)
11671				if err != nil {
11672					return err
11673				}
11674				ersp.ExpressRouteServiceProviderPropertiesFormat = &expressRouteServiceProviderPropertiesFormat
11675			}
11676		case "id":
11677			if v != nil {
11678				var ID string
11679				err = json.Unmarshal(*v, &ID)
11680				if err != nil {
11681					return err
11682				}
11683				ersp.ID = &ID
11684			}
11685		case "name":
11686			if v != nil {
11687				var name string
11688				err = json.Unmarshal(*v, &name)
11689				if err != nil {
11690					return err
11691				}
11692				ersp.Name = &name
11693			}
11694		case "type":
11695			if v != nil {
11696				var typeVar string
11697				err = json.Unmarshal(*v, &typeVar)
11698				if err != nil {
11699					return err
11700				}
11701				ersp.Type = &typeVar
11702			}
11703		case "location":
11704			if v != nil {
11705				var location string
11706				err = json.Unmarshal(*v, &location)
11707				if err != nil {
11708					return err
11709				}
11710				ersp.Location = &location
11711			}
11712		case "tags":
11713			if v != nil {
11714				var tags map[string]*string
11715				err = json.Unmarshal(*v, &tags)
11716				if err != nil {
11717					return err
11718				}
11719				ersp.Tags = tags
11720			}
11721		}
11722	}
11723
11724	return nil
11725}
11726
11727// ExpressRouteServiceProviderBandwidthsOffered contains bandwidths offered in ExpressRouteServiceProvider
11728// resources.
11729type ExpressRouteServiceProviderBandwidthsOffered struct {
11730	// OfferName - The OfferName.
11731	OfferName *string `json:"offerName,omitempty"`
11732	// ValueInMbps - The ValueInMbps.
11733	ValueInMbps *int32 `json:"valueInMbps,omitempty"`
11734}
11735
11736// ExpressRouteServiceProviderListResult response for the ListExpressRouteServiceProvider API service call.
11737type ExpressRouteServiceProviderListResult struct {
11738	autorest.Response `json:"-"`
11739	// Value - A list of ExpressRouteResourceProvider resources.
11740	Value *[]ExpressRouteServiceProvider `json:"value,omitempty"`
11741	// NextLink - The URL to get the next set of results.
11742	NextLink *string `json:"nextLink,omitempty"`
11743}
11744
11745// ExpressRouteServiceProviderListResultIterator provides access to a complete listing of
11746// ExpressRouteServiceProvider values.
11747type ExpressRouteServiceProviderListResultIterator struct {
11748	i    int
11749	page ExpressRouteServiceProviderListResultPage
11750}
11751
11752// NextWithContext advances to the next value.  If there was an error making
11753// the request the iterator does not advance and the error is returned.
11754func (iter *ExpressRouteServiceProviderListResultIterator) NextWithContext(ctx context.Context) (err error) {
11755	if tracing.IsEnabled() {
11756		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultIterator.NextWithContext")
11757		defer func() {
11758			sc := -1
11759			if iter.Response().Response.Response != nil {
11760				sc = iter.Response().Response.Response.StatusCode
11761			}
11762			tracing.EndSpan(ctx, sc, err)
11763		}()
11764	}
11765	iter.i++
11766	if iter.i < len(iter.page.Values()) {
11767		return nil
11768	}
11769	err = iter.page.NextWithContext(ctx)
11770	if err != nil {
11771		iter.i--
11772		return err
11773	}
11774	iter.i = 0
11775	return nil
11776}
11777
11778// Next advances to the next value.  If there was an error making
11779// the request the iterator does not advance and the error is returned.
11780// Deprecated: Use NextWithContext() instead.
11781func (iter *ExpressRouteServiceProviderListResultIterator) Next() error {
11782	return iter.NextWithContext(context.Background())
11783}
11784
11785// NotDone returns true if the enumeration should be started or is not yet complete.
11786func (iter ExpressRouteServiceProviderListResultIterator) NotDone() bool {
11787	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11788}
11789
11790// Response returns the raw server response from the last page request.
11791func (iter ExpressRouteServiceProviderListResultIterator) Response() ExpressRouteServiceProviderListResult {
11792	return iter.page.Response()
11793}
11794
11795// Value returns the current value or a zero-initialized value if the
11796// iterator has advanced beyond the end of the collection.
11797func (iter ExpressRouteServiceProviderListResultIterator) Value() ExpressRouteServiceProvider {
11798	if !iter.page.NotDone() {
11799		return ExpressRouteServiceProvider{}
11800	}
11801	return iter.page.Values()[iter.i]
11802}
11803
11804// Creates a new instance of the ExpressRouteServiceProviderListResultIterator type.
11805func NewExpressRouteServiceProviderListResultIterator(page ExpressRouteServiceProviderListResultPage) ExpressRouteServiceProviderListResultIterator {
11806	return ExpressRouteServiceProviderListResultIterator{page: page}
11807}
11808
11809// IsEmpty returns true if the ListResult contains no values.
11810func (ersplr ExpressRouteServiceProviderListResult) IsEmpty() bool {
11811	return ersplr.Value == nil || len(*ersplr.Value) == 0
11812}
11813
11814// hasNextLink returns true if the NextLink is not empty.
11815func (ersplr ExpressRouteServiceProviderListResult) hasNextLink() bool {
11816	return ersplr.NextLink != nil && len(*ersplr.NextLink) != 0
11817}
11818
11819// expressRouteServiceProviderListResultPreparer prepares a request to retrieve the next set of results.
11820// It returns nil if no more results exist.
11821func (ersplr ExpressRouteServiceProviderListResult) expressRouteServiceProviderListResultPreparer(ctx context.Context) (*http.Request, error) {
11822	if !ersplr.hasNextLink() {
11823		return nil, nil
11824	}
11825	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11826		autorest.AsJSON(),
11827		autorest.AsGet(),
11828		autorest.WithBaseURL(to.String(ersplr.NextLink)))
11829}
11830
11831// ExpressRouteServiceProviderListResultPage contains a page of ExpressRouteServiceProvider values.
11832type ExpressRouteServiceProviderListResultPage struct {
11833	fn     func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)
11834	ersplr ExpressRouteServiceProviderListResult
11835}
11836
11837// NextWithContext advances to the next page of values.  If there was an error making
11838// the request the page does not advance and the error is returned.
11839func (page *ExpressRouteServiceProviderListResultPage) NextWithContext(ctx context.Context) (err error) {
11840	if tracing.IsEnabled() {
11841		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultPage.NextWithContext")
11842		defer func() {
11843			sc := -1
11844			if page.Response().Response.Response != nil {
11845				sc = page.Response().Response.Response.StatusCode
11846			}
11847			tracing.EndSpan(ctx, sc, err)
11848		}()
11849	}
11850	for {
11851		next, err := page.fn(ctx, page.ersplr)
11852		if err != nil {
11853			return err
11854		}
11855		page.ersplr = next
11856		if !next.hasNextLink() || !next.IsEmpty() {
11857			break
11858		}
11859	}
11860	return nil
11861}
11862
11863// Next advances to the next page of values.  If there was an error making
11864// the request the page does not advance and the error is returned.
11865// Deprecated: Use NextWithContext() instead.
11866func (page *ExpressRouteServiceProviderListResultPage) Next() error {
11867	return page.NextWithContext(context.Background())
11868}
11869
11870// NotDone returns true if the page enumeration should be started or is not yet complete.
11871func (page ExpressRouteServiceProviderListResultPage) NotDone() bool {
11872	return !page.ersplr.IsEmpty()
11873}
11874
11875// Response returns the raw server response from the last page request.
11876func (page ExpressRouteServiceProviderListResultPage) Response() ExpressRouteServiceProviderListResult {
11877	return page.ersplr
11878}
11879
11880// Values returns the slice of values for the current page or nil if there are no values.
11881func (page ExpressRouteServiceProviderListResultPage) Values() []ExpressRouteServiceProvider {
11882	if page.ersplr.IsEmpty() {
11883		return nil
11884	}
11885	return *page.ersplr.Value
11886}
11887
11888// Creates a new instance of the ExpressRouteServiceProviderListResultPage type.
11889func NewExpressRouteServiceProviderListResultPage(cur ExpressRouteServiceProviderListResult, getNextPage func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)) ExpressRouteServiceProviderListResultPage {
11890	return ExpressRouteServiceProviderListResultPage{
11891		fn:     getNextPage,
11892		ersplr: cur,
11893	}
11894}
11895
11896// ExpressRouteServiceProviderPropertiesFormat properties of ExpressRouteServiceProvider.
11897type ExpressRouteServiceProviderPropertiesFormat struct {
11898	// PeeringLocations - Get a list of peering locations.
11899	PeeringLocations *[]string `json:"peeringLocations,omitempty"`
11900	// BandwidthsOffered - Gets bandwidths offered.
11901	BandwidthsOffered *[]ExpressRouteServiceProviderBandwidthsOffered `json:"bandwidthsOffered,omitempty"`
11902	// ProvisioningState - Gets the provisioning state of the resource.
11903	ProvisioningState *string `json:"provisioningState,omitempty"`
11904}
11905
11906// FlowLogFormatParameters parameters that define the flow log format.
11907type FlowLogFormatParameters struct {
11908	// Type - The file type of flow log. Possible values include: 'JSON'
11909	Type FlowLogFormatType `json:"type,omitempty"`
11910	// Version - The version (revision) of the flow log.
11911	Version *int32 `json:"version,omitempty"`
11912}
11913
11914// FlowLogInformation information on the configuration of flow log and traffic analytics (optional) .
11915type FlowLogInformation struct {
11916	autorest.Response `json:"-"`
11917	// TargetResourceID - The ID of the resource to configure for flow log and traffic analytics (optional) .
11918	TargetResourceID           *string `json:"targetResourceId,omitempty"`
11919	*FlowLogProperties         `json:"properties,omitempty"`
11920	FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"`
11921}
11922
11923// MarshalJSON is the custom marshaler for FlowLogInformation.
11924func (fli FlowLogInformation) MarshalJSON() ([]byte, error) {
11925	objectMap := make(map[string]interface{})
11926	if fli.TargetResourceID != nil {
11927		objectMap["targetResourceId"] = fli.TargetResourceID
11928	}
11929	if fli.FlowLogProperties != nil {
11930		objectMap["properties"] = fli.FlowLogProperties
11931	}
11932	if fli.FlowAnalyticsConfiguration != nil {
11933		objectMap["flowAnalyticsConfiguration"] = fli.FlowAnalyticsConfiguration
11934	}
11935	return json.Marshal(objectMap)
11936}
11937
11938// UnmarshalJSON is the custom unmarshaler for FlowLogInformation struct.
11939func (fli *FlowLogInformation) UnmarshalJSON(body []byte) error {
11940	var m map[string]*json.RawMessage
11941	err := json.Unmarshal(body, &m)
11942	if err != nil {
11943		return err
11944	}
11945	for k, v := range m {
11946		switch k {
11947		case "targetResourceId":
11948			if v != nil {
11949				var targetResourceID string
11950				err = json.Unmarshal(*v, &targetResourceID)
11951				if err != nil {
11952					return err
11953				}
11954				fli.TargetResourceID = &targetResourceID
11955			}
11956		case "properties":
11957			if v != nil {
11958				var flowLogProperties FlowLogProperties
11959				err = json.Unmarshal(*v, &flowLogProperties)
11960				if err != nil {
11961					return err
11962				}
11963				fli.FlowLogProperties = &flowLogProperties
11964			}
11965		case "flowAnalyticsConfiguration":
11966			if v != nil {
11967				var flowAnalyticsConfiguration TrafficAnalyticsProperties
11968				err = json.Unmarshal(*v, &flowAnalyticsConfiguration)
11969				if err != nil {
11970					return err
11971				}
11972				fli.FlowAnalyticsConfiguration = &flowAnalyticsConfiguration
11973			}
11974		}
11975	}
11976
11977	return nil
11978}
11979
11980// FlowLogProperties parameters that define the configuration of flow log.
11981type FlowLogProperties struct {
11982	// StorageID - ID of the storage account which is used to store the flow log.
11983	StorageID *string `json:"storageId,omitempty"`
11984	// Enabled - Flag to enable/disable flow logging.
11985	Enabled         *bool                      `json:"enabled,omitempty"`
11986	RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"`
11987	Format          *FlowLogFormatParameters   `json:"format,omitempty"`
11988}
11989
11990// FlowLogStatusParameters parameters that define a resource to query flow log and traffic analytics
11991// (optional) status.
11992type FlowLogStatusParameters struct {
11993	// TargetResourceID - The target resource where getting the flow log and traffic analytics (optional) status.
11994	TargetResourceID *string `json:"targetResourceId,omitempty"`
11995}
11996
11997// FrontendIPConfiguration frontend IP address of the load balancer.
11998type FrontendIPConfiguration struct {
11999	autorest.Response `json:"-"`
12000	// FrontendIPConfigurationPropertiesFormat - Properties of the load balancer probe.
12001	*FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"`
12002	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
12003	Name *string `json:"name,omitempty"`
12004	// Etag - A unique read-only string that changes whenever the resource is updated.
12005	Etag *string `json:"etag,omitempty"`
12006	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
12007	Zones *[]string `json:"zones,omitempty"`
12008	// ID - Resource ID.
12009	ID *string `json:"id,omitempty"`
12010}
12011
12012// MarshalJSON is the custom marshaler for FrontendIPConfiguration.
12013func (fic FrontendIPConfiguration) MarshalJSON() ([]byte, error) {
12014	objectMap := make(map[string]interface{})
12015	if fic.FrontendIPConfigurationPropertiesFormat != nil {
12016		objectMap["properties"] = fic.FrontendIPConfigurationPropertiesFormat
12017	}
12018	if fic.Name != nil {
12019		objectMap["name"] = fic.Name
12020	}
12021	if fic.Etag != nil {
12022		objectMap["etag"] = fic.Etag
12023	}
12024	if fic.Zones != nil {
12025		objectMap["zones"] = fic.Zones
12026	}
12027	if fic.ID != nil {
12028		objectMap["id"] = fic.ID
12029	}
12030	return json.Marshal(objectMap)
12031}
12032
12033// UnmarshalJSON is the custom unmarshaler for FrontendIPConfiguration struct.
12034func (fic *FrontendIPConfiguration) UnmarshalJSON(body []byte) error {
12035	var m map[string]*json.RawMessage
12036	err := json.Unmarshal(body, &m)
12037	if err != nil {
12038		return err
12039	}
12040	for k, v := range m {
12041		switch k {
12042		case "properties":
12043			if v != nil {
12044				var frontendIPConfigurationPropertiesFormat FrontendIPConfigurationPropertiesFormat
12045				err = json.Unmarshal(*v, &frontendIPConfigurationPropertiesFormat)
12046				if err != nil {
12047					return err
12048				}
12049				fic.FrontendIPConfigurationPropertiesFormat = &frontendIPConfigurationPropertiesFormat
12050			}
12051		case "name":
12052			if v != nil {
12053				var name string
12054				err = json.Unmarshal(*v, &name)
12055				if err != nil {
12056					return err
12057				}
12058				fic.Name = &name
12059			}
12060		case "etag":
12061			if v != nil {
12062				var etag string
12063				err = json.Unmarshal(*v, &etag)
12064				if err != nil {
12065					return err
12066				}
12067				fic.Etag = &etag
12068			}
12069		case "zones":
12070			if v != nil {
12071				var zones []string
12072				err = json.Unmarshal(*v, &zones)
12073				if err != nil {
12074					return err
12075				}
12076				fic.Zones = &zones
12077			}
12078		case "id":
12079			if v != nil {
12080				var ID string
12081				err = json.Unmarshal(*v, &ID)
12082				if err != nil {
12083					return err
12084				}
12085				fic.ID = &ID
12086			}
12087		}
12088	}
12089
12090	return nil
12091}
12092
12093// FrontendIPConfigurationPropertiesFormat properties of Frontend IP Configuration of the load balancer.
12094type FrontendIPConfigurationPropertiesFormat struct {
12095	// InboundNatRules - READ-ONLY; Read only. Inbound rules URIs that use this frontend IP.
12096	InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"`
12097	// InboundNatPools - READ-ONLY; Read only. Inbound pools URIs that use this frontend IP.
12098	InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"`
12099	// OutboundRules - READ-ONLY; Read only. Outbound rules URIs that use this frontend IP.
12100	OutboundRules *[]SubResource `json:"outboundRules,omitempty"`
12101	// LoadBalancingRules - READ-ONLY; Gets load balancing rules URIs that use this frontend IP.
12102	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
12103	// PrivateIPAddress - The private IP address of the IP configuration.
12104	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
12105	// PrivateIPAllocationMethod - The Private IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
12106	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
12107	// Subnet - The reference of the subnet resource.
12108	Subnet *Subnet `json:"subnet,omitempty"`
12109	// PublicIPAddress - The reference of the Public IP resource.
12110	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
12111	// PublicIPPrefix - The reference of the Public IP Prefix resource.
12112	PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"`
12113	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
12114	ProvisioningState *string `json:"provisioningState,omitempty"`
12115}
12116
12117// MarshalJSON is the custom marshaler for FrontendIPConfigurationPropertiesFormat.
12118func (ficpf FrontendIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
12119	objectMap := make(map[string]interface{})
12120	if ficpf.PrivateIPAddress != nil {
12121		objectMap["privateIPAddress"] = ficpf.PrivateIPAddress
12122	}
12123	if ficpf.PrivateIPAllocationMethod != "" {
12124		objectMap["privateIPAllocationMethod"] = ficpf.PrivateIPAllocationMethod
12125	}
12126	if ficpf.Subnet != nil {
12127		objectMap["subnet"] = ficpf.Subnet
12128	}
12129	if ficpf.PublicIPAddress != nil {
12130		objectMap["publicIPAddress"] = ficpf.PublicIPAddress
12131	}
12132	if ficpf.PublicIPPrefix != nil {
12133		objectMap["publicIPPrefix"] = ficpf.PublicIPPrefix
12134	}
12135	if ficpf.ProvisioningState != nil {
12136		objectMap["provisioningState"] = ficpf.ProvisioningState
12137	}
12138	return json.Marshal(objectMap)
12139}
12140
12141// GatewayRoute gateway routing details
12142type GatewayRoute struct {
12143	// LocalAddress - READ-ONLY; The gateway's local address
12144	LocalAddress *string `json:"localAddress,omitempty"`
12145	// NetworkProperty - READ-ONLY; The route's network prefix
12146	NetworkProperty *string `json:"network,omitempty"`
12147	// NextHop - READ-ONLY; The route's next hop
12148	NextHop *string `json:"nextHop,omitempty"`
12149	// SourcePeer - READ-ONLY; The peer this route was learned from
12150	SourcePeer *string `json:"sourcePeer,omitempty"`
12151	// Origin - READ-ONLY; The source this route was learned from
12152	Origin *string `json:"origin,omitempty"`
12153	// AsPath - READ-ONLY; The route's AS path sequence
12154	AsPath *string `json:"asPath,omitempty"`
12155	// Weight - READ-ONLY; The route's weight
12156	Weight *int32 `json:"weight,omitempty"`
12157}
12158
12159// MarshalJSON is the custom marshaler for GatewayRoute.
12160func (gr GatewayRoute) MarshalJSON() ([]byte, error) {
12161	objectMap := make(map[string]interface{})
12162	return json.Marshal(objectMap)
12163}
12164
12165// GatewayRouteListResult list of virtual network gateway routes
12166type GatewayRouteListResult struct {
12167	autorest.Response `json:"-"`
12168	// Value - List of gateway routes
12169	Value *[]GatewayRoute `json:"value,omitempty"`
12170}
12171
12172// GetVpnSitesConfigurationRequest list of Vpn-Sites
12173type GetVpnSitesConfigurationRequest struct {
12174	// VpnSites - List of resource-ids of the vpn-sites for which config is to be downloaded.
12175	VpnSites *[]string `json:"vpnSites,omitempty"`
12176	// OutputBlobSasURL - The sas-url to download the configurations for vpn-sites
12177	OutputBlobSasURL *string `json:"outputBlobSasUrl,omitempty"`
12178}
12179
12180// HTTPConfiguration HTTP configuration of the connectivity check.
12181type HTTPConfiguration struct {
12182	// Method - HTTP method. Possible values include: 'Get'
12183	Method HTTPMethod `json:"method,omitempty"`
12184	// Headers - List of HTTP headers.
12185	Headers *[]HTTPHeader `json:"headers,omitempty"`
12186	// ValidStatusCodes - Valid status codes.
12187	ValidStatusCodes *[]int32 `json:"validStatusCodes,omitempty"`
12188}
12189
12190// HTTPHeader describes the HTTP header.
12191type HTTPHeader struct {
12192	// Name - The name in HTTP header.
12193	Name *string `json:"name,omitempty"`
12194	// Value - The value in HTTP header.
12195	Value *string `json:"value,omitempty"`
12196}
12197
12198// HubVirtualNetworkConnection hubVirtualNetworkConnection Resource.
12199type HubVirtualNetworkConnection struct {
12200	autorest.Response                      `json:"-"`
12201	*HubVirtualNetworkConnectionProperties `json:"properties,omitempty"`
12202	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
12203	Name *string `json:"name,omitempty"`
12204	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
12205	Etag *string `json:"etag,omitempty"`
12206	// ID - Resource ID.
12207	ID *string `json:"id,omitempty"`
12208}
12209
12210// MarshalJSON is the custom marshaler for HubVirtualNetworkConnection.
12211func (hvnc HubVirtualNetworkConnection) MarshalJSON() ([]byte, error) {
12212	objectMap := make(map[string]interface{})
12213	if hvnc.HubVirtualNetworkConnectionProperties != nil {
12214		objectMap["properties"] = hvnc.HubVirtualNetworkConnectionProperties
12215	}
12216	if hvnc.Name != nil {
12217		objectMap["name"] = hvnc.Name
12218	}
12219	if hvnc.ID != nil {
12220		objectMap["id"] = hvnc.ID
12221	}
12222	return json.Marshal(objectMap)
12223}
12224
12225// UnmarshalJSON is the custom unmarshaler for HubVirtualNetworkConnection struct.
12226func (hvnc *HubVirtualNetworkConnection) UnmarshalJSON(body []byte) error {
12227	var m map[string]*json.RawMessage
12228	err := json.Unmarshal(body, &m)
12229	if err != nil {
12230		return err
12231	}
12232	for k, v := range m {
12233		switch k {
12234		case "properties":
12235			if v != nil {
12236				var hubVirtualNetworkConnectionProperties HubVirtualNetworkConnectionProperties
12237				err = json.Unmarshal(*v, &hubVirtualNetworkConnectionProperties)
12238				if err != nil {
12239					return err
12240				}
12241				hvnc.HubVirtualNetworkConnectionProperties = &hubVirtualNetworkConnectionProperties
12242			}
12243		case "name":
12244			if v != nil {
12245				var name string
12246				err = json.Unmarshal(*v, &name)
12247				if err != nil {
12248					return err
12249				}
12250				hvnc.Name = &name
12251			}
12252		case "etag":
12253			if v != nil {
12254				var etag string
12255				err = json.Unmarshal(*v, &etag)
12256				if err != nil {
12257					return err
12258				}
12259				hvnc.Etag = &etag
12260			}
12261		case "id":
12262			if v != nil {
12263				var ID string
12264				err = json.Unmarshal(*v, &ID)
12265				if err != nil {
12266					return err
12267				}
12268				hvnc.ID = &ID
12269			}
12270		}
12271	}
12272
12273	return nil
12274}
12275
12276// HubVirtualNetworkConnectionProperties parameters for HubVirtualNetworkConnection
12277type HubVirtualNetworkConnectionProperties struct {
12278	// RemoteVirtualNetwork - Reference to the remote virtual network.
12279	RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"`
12280	// AllowHubToRemoteVnetTransit - VirtualHub to RemoteVnet transit to enabled or not.
12281	AllowHubToRemoteVnetTransit *bool `json:"allowHubToRemoteVnetTransit,omitempty"`
12282	// AllowRemoteVnetToUseHubVnetGateways - Allow RemoteVnet to use Virtual Hub's gateways.
12283	AllowRemoteVnetToUseHubVnetGateways *bool `json:"allowRemoteVnetToUseHubVnetGateways,omitempty"`
12284	// EnableInternetSecurity - Enable internet security
12285	EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"`
12286	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
12287	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
12288}
12289
12290// InboundNatPool inbound NAT pool of the load balancer.
12291type InboundNatPool struct {
12292	// InboundNatPoolPropertiesFormat - Properties of load balancer inbound nat pool.
12293	*InboundNatPoolPropertiesFormat `json:"properties,omitempty"`
12294	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
12295	Name *string `json:"name,omitempty"`
12296	// Etag - A unique read-only string that changes whenever the resource is updated.
12297	Etag *string `json:"etag,omitempty"`
12298	// ID - Resource ID.
12299	ID *string `json:"id,omitempty"`
12300}
12301
12302// MarshalJSON is the custom marshaler for InboundNatPool.
12303func (inp InboundNatPool) MarshalJSON() ([]byte, error) {
12304	objectMap := make(map[string]interface{})
12305	if inp.InboundNatPoolPropertiesFormat != nil {
12306		objectMap["properties"] = inp.InboundNatPoolPropertiesFormat
12307	}
12308	if inp.Name != nil {
12309		objectMap["name"] = inp.Name
12310	}
12311	if inp.Etag != nil {
12312		objectMap["etag"] = inp.Etag
12313	}
12314	if inp.ID != nil {
12315		objectMap["id"] = inp.ID
12316	}
12317	return json.Marshal(objectMap)
12318}
12319
12320// UnmarshalJSON is the custom unmarshaler for InboundNatPool struct.
12321func (inp *InboundNatPool) UnmarshalJSON(body []byte) error {
12322	var m map[string]*json.RawMessage
12323	err := json.Unmarshal(body, &m)
12324	if err != nil {
12325		return err
12326	}
12327	for k, v := range m {
12328		switch k {
12329		case "properties":
12330			if v != nil {
12331				var inboundNatPoolPropertiesFormat InboundNatPoolPropertiesFormat
12332				err = json.Unmarshal(*v, &inboundNatPoolPropertiesFormat)
12333				if err != nil {
12334					return err
12335				}
12336				inp.InboundNatPoolPropertiesFormat = &inboundNatPoolPropertiesFormat
12337			}
12338		case "name":
12339			if v != nil {
12340				var name string
12341				err = json.Unmarshal(*v, &name)
12342				if err != nil {
12343					return err
12344				}
12345				inp.Name = &name
12346			}
12347		case "etag":
12348			if v != nil {
12349				var etag string
12350				err = json.Unmarshal(*v, &etag)
12351				if err != nil {
12352					return err
12353				}
12354				inp.Etag = &etag
12355			}
12356		case "id":
12357			if v != nil {
12358				var ID string
12359				err = json.Unmarshal(*v, &ID)
12360				if err != nil {
12361					return err
12362				}
12363				inp.ID = &ID
12364			}
12365		}
12366	}
12367
12368	return nil
12369}
12370
12371// InboundNatPoolPropertiesFormat properties of Inbound NAT pool.
12372type InboundNatPoolPropertiesFormat struct {
12373	// FrontendIPConfiguration - A reference to frontend IP addresses.
12374	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
12375	// Protocol - Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
12376	Protocol TransportProtocol `json:"protocol,omitempty"`
12377	// 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.
12378	FrontendPortRangeStart *int32 `json:"frontendPortRangeStart,omitempty"`
12379	// 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.
12380	FrontendPortRangeEnd *int32 `json:"frontendPortRangeEnd,omitempty"`
12381	// BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 1 and 65535.
12382	BackendPort *int32 `json:"backendPort,omitempty"`
12383	// 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.
12384	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
12385	// 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.
12386	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
12387	// 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.
12388	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
12389	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
12390	ProvisioningState *string `json:"provisioningState,omitempty"`
12391}
12392
12393// InboundNatRule inbound NAT rule of the load balancer.
12394type InboundNatRule struct {
12395	autorest.Response `json:"-"`
12396	// InboundNatRulePropertiesFormat - Properties of load balancer inbound nat rule.
12397	*InboundNatRulePropertiesFormat `json:"properties,omitempty"`
12398	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
12399	Name *string `json:"name,omitempty"`
12400	// Etag - A unique read-only string that changes whenever the resource is updated.
12401	Etag *string `json:"etag,omitempty"`
12402	// ID - Resource ID.
12403	ID *string `json:"id,omitempty"`
12404}
12405
12406// MarshalJSON is the custom marshaler for InboundNatRule.
12407func (inr InboundNatRule) MarshalJSON() ([]byte, error) {
12408	objectMap := make(map[string]interface{})
12409	if inr.InboundNatRulePropertiesFormat != nil {
12410		objectMap["properties"] = inr.InboundNatRulePropertiesFormat
12411	}
12412	if inr.Name != nil {
12413		objectMap["name"] = inr.Name
12414	}
12415	if inr.Etag != nil {
12416		objectMap["etag"] = inr.Etag
12417	}
12418	if inr.ID != nil {
12419		objectMap["id"] = inr.ID
12420	}
12421	return json.Marshal(objectMap)
12422}
12423
12424// UnmarshalJSON is the custom unmarshaler for InboundNatRule struct.
12425func (inr *InboundNatRule) UnmarshalJSON(body []byte) error {
12426	var m map[string]*json.RawMessage
12427	err := json.Unmarshal(body, &m)
12428	if err != nil {
12429		return err
12430	}
12431	for k, v := range m {
12432		switch k {
12433		case "properties":
12434			if v != nil {
12435				var inboundNatRulePropertiesFormat InboundNatRulePropertiesFormat
12436				err = json.Unmarshal(*v, &inboundNatRulePropertiesFormat)
12437				if err != nil {
12438					return err
12439				}
12440				inr.InboundNatRulePropertiesFormat = &inboundNatRulePropertiesFormat
12441			}
12442		case "name":
12443			if v != nil {
12444				var name string
12445				err = json.Unmarshal(*v, &name)
12446				if err != nil {
12447					return err
12448				}
12449				inr.Name = &name
12450			}
12451		case "etag":
12452			if v != nil {
12453				var etag string
12454				err = json.Unmarshal(*v, &etag)
12455				if err != nil {
12456					return err
12457				}
12458				inr.Etag = &etag
12459			}
12460		case "id":
12461			if v != nil {
12462				var ID string
12463				err = json.Unmarshal(*v, &ID)
12464				if err != nil {
12465					return err
12466				}
12467				inr.ID = &ID
12468			}
12469		}
12470	}
12471
12472	return nil
12473}
12474
12475// InboundNatRuleListResult response for ListInboundNatRule API service call.
12476type InboundNatRuleListResult struct {
12477	autorest.Response `json:"-"`
12478	// Value - A list of inbound nat rules in a load balancer.
12479	Value *[]InboundNatRule `json:"value,omitempty"`
12480	// NextLink - READ-ONLY; The URL to get the next set of results.
12481	NextLink *string `json:"nextLink,omitempty"`
12482}
12483
12484// MarshalJSON is the custom marshaler for InboundNatRuleListResult.
12485func (inrlr InboundNatRuleListResult) MarshalJSON() ([]byte, error) {
12486	objectMap := make(map[string]interface{})
12487	if inrlr.Value != nil {
12488		objectMap["value"] = inrlr.Value
12489	}
12490	return json.Marshal(objectMap)
12491}
12492
12493// InboundNatRuleListResultIterator provides access to a complete listing of InboundNatRule values.
12494type InboundNatRuleListResultIterator struct {
12495	i    int
12496	page InboundNatRuleListResultPage
12497}
12498
12499// NextWithContext advances to the next value.  If there was an error making
12500// the request the iterator does not advance and the error is returned.
12501func (iter *InboundNatRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
12502	if tracing.IsEnabled() {
12503		ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultIterator.NextWithContext")
12504		defer func() {
12505			sc := -1
12506			if iter.Response().Response.Response != nil {
12507				sc = iter.Response().Response.Response.StatusCode
12508			}
12509			tracing.EndSpan(ctx, sc, err)
12510		}()
12511	}
12512	iter.i++
12513	if iter.i < len(iter.page.Values()) {
12514		return nil
12515	}
12516	err = iter.page.NextWithContext(ctx)
12517	if err != nil {
12518		iter.i--
12519		return err
12520	}
12521	iter.i = 0
12522	return nil
12523}
12524
12525// Next advances to the next value.  If there was an error making
12526// the request the iterator does not advance and the error is returned.
12527// Deprecated: Use NextWithContext() instead.
12528func (iter *InboundNatRuleListResultIterator) Next() error {
12529	return iter.NextWithContext(context.Background())
12530}
12531
12532// NotDone returns true if the enumeration should be started or is not yet complete.
12533func (iter InboundNatRuleListResultIterator) NotDone() bool {
12534	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12535}
12536
12537// Response returns the raw server response from the last page request.
12538func (iter InboundNatRuleListResultIterator) Response() InboundNatRuleListResult {
12539	return iter.page.Response()
12540}
12541
12542// Value returns the current value or a zero-initialized value if the
12543// iterator has advanced beyond the end of the collection.
12544func (iter InboundNatRuleListResultIterator) Value() InboundNatRule {
12545	if !iter.page.NotDone() {
12546		return InboundNatRule{}
12547	}
12548	return iter.page.Values()[iter.i]
12549}
12550
12551// Creates a new instance of the InboundNatRuleListResultIterator type.
12552func NewInboundNatRuleListResultIterator(page InboundNatRuleListResultPage) InboundNatRuleListResultIterator {
12553	return InboundNatRuleListResultIterator{page: page}
12554}
12555
12556// IsEmpty returns true if the ListResult contains no values.
12557func (inrlr InboundNatRuleListResult) IsEmpty() bool {
12558	return inrlr.Value == nil || len(*inrlr.Value) == 0
12559}
12560
12561// hasNextLink returns true if the NextLink is not empty.
12562func (inrlr InboundNatRuleListResult) hasNextLink() bool {
12563	return inrlr.NextLink != nil && len(*inrlr.NextLink) != 0
12564}
12565
12566// inboundNatRuleListResultPreparer prepares a request to retrieve the next set of results.
12567// It returns nil if no more results exist.
12568func (inrlr InboundNatRuleListResult) inboundNatRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
12569	if !inrlr.hasNextLink() {
12570		return nil, nil
12571	}
12572	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12573		autorest.AsJSON(),
12574		autorest.AsGet(),
12575		autorest.WithBaseURL(to.String(inrlr.NextLink)))
12576}
12577
12578// InboundNatRuleListResultPage contains a page of InboundNatRule values.
12579type InboundNatRuleListResultPage struct {
12580	fn    func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)
12581	inrlr InboundNatRuleListResult
12582}
12583
12584// NextWithContext advances to the next page of values.  If there was an error making
12585// the request the page does not advance and the error is returned.
12586func (page *InboundNatRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
12587	if tracing.IsEnabled() {
12588		ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultPage.NextWithContext")
12589		defer func() {
12590			sc := -1
12591			if page.Response().Response.Response != nil {
12592				sc = page.Response().Response.Response.StatusCode
12593			}
12594			tracing.EndSpan(ctx, sc, err)
12595		}()
12596	}
12597	for {
12598		next, err := page.fn(ctx, page.inrlr)
12599		if err != nil {
12600			return err
12601		}
12602		page.inrlr = next
12603		if !next.hasNextLink() || !next.IsEmpty() {
12604			break
12605		}
12606	}
12607	return nil
12608}
12609
12610// Next advances to the next page of values.  If there was an error making
12611// the request the page does not advance and the error is returned.
12612// Deprecated: Use NextWithContext() instead.
12613func (page *InboundNatRuleListResultPage) Next() error {
12614	return page.NextWithContext(context.Background())
12615}
12616
12617// NotDone returns true if the page enumeration should be started or is not yet complete.
12618func (page InboundNatRuleListResultPage) NotDone() bool {
12619	return !page.inrlr.IsEmpty()
12620}
12621
12622// Response returns the raw server response from the last page request.
12623func (page InboundNatRuleListResultPage) Response() InboundNatRuleListResult {
12624	return page.inrlr
12625}
12626
12627// Values returns the slice of values for the current page or nil if there are no values.
12628func (page InboundNatRuleListResultPage) Values() []InboundNatRule {
12629	if page.inrlr.IsEmpty() {
12630		return nil
12631	}
12632	return *page.inrlr.Value
12633}
12634
12635// Creates a new instance of the InboundNatRuleListResultPage type.
12636func NewInboundNatRuleListResultPage(cur InboundNatRuleListResult, getNextPage func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)) InboundNatRuleListResultPage {
12637	return InboundNatRuleListResultPage{
12638		fn:    getNextPage,
12639		inrlr: cur,
12640	}
12641}
12642
12643// InboundNatRulePropertiesFormat properties of the inbound NAT rule.
12644type InboundNatRulePropertiesFormat struct {
12645	// FrontendIPConfiguration - A reference to frontend IP addresses.
12646	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
12647	// 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.
12648	BackendIPConfiguration *InterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"`
12649	// Protocol - Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
12650	Protocol TransportProtocol `json:"protocol,omitempty"`
12651	// 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.
12652	FrontendPort *int32 `json:"frontendPort,omitempty"`
12653	// BackendPort - The port used for the internal endpoint. Acceptable values range from 1 to 65535.
12654	BackendPort *int32 `json:"backendPort,omitempty"`
12655	// 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.
12656	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
12657	// 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.
12658	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
12659	// 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.
12660	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
12661	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
12662	ProvisioningState *string `json:"provisioningState,omitempty"`
12663}
12664
12665// MarshalJSON is the custom marshaler for InboundNatRulePropertiesFormat.
12666func (inrpf InboundNatRulePropertiesFormat) MarshalJSON() ([]byte, error) {
12667	objectMap := make(map[string]interface{})
12668	if inrpf.FrontendIPConfiguration != nil {
12669		objectMap["frontendIPConfiguration"] = inrpf.FrontendIPConfiguration
12670	}
12671	if inrpf.Protocol != "" {
12672		objectMap["protocol"] = inrpf.Protocol
12673	}
12674	if inrpf.FrontendPort != nil {
12675		objectMap["frontendPort"] = inrpf.FrontendPort
12676	}
12677	if inrpf.BackendPort != nil {
12678		objectMap["backendPort"] = inrpf.BackendPort
12679	}
12680	if inrpf.IdleTimeoutInMinutes != nil {
12681		objectMap["idleTimeoutInMinutes"] = inrpf.IdleTimeoutInMinutes
12682	}
12683	if inrpf.EnableFloatingIP != nil {
12684		objectMap["enableFloatingIP"] = inrpf.EnableFloatingIP
12685	}
12686	if inrpf.EnableTCPReset != nil {
12687		objectMap["enableTcpReset"] = inrpf.EnableTCPReset
12688	}
12689	if inrpf.ProvisioningState != nil {
12690		objectMap["provisioningState"] = inrpf.ProvisioningState
12691	}
12692	return json.Marshal(objectMap)
12693}
12694
12695// InboundNatRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
12696// long-running operation.
12697type InboundNatRulesCreateOrUpdateFuture struct {
12698	azure.FutureAPI
12699	// Result returns the result of the asynchronous operation.
12700	// If the operation has not completed it will return an error.
12701	Result func(InboundNatRulesClient) (InboundNatRule, error)
12702}
12703
12704// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12705func (future *InboundNatRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
12706	var azFuture azure.Future
12707	if err := json.Unmarshal(body, &azFuture); err != nil {
12708		return err
12709	}
12710	future.FutureAPI = &azFuture
12711	future.Result = future.result
12712	return nil
12713}
12714
12715// result is the default implementation for InboundNatRulesCreateOrUpdateFuture.Result.
12716func (future *InboundNatRulesCreateOrUpdateFuture) result(client InboundNatRulesClient) (inr InboundNatRule, err error) {
12717	var done bool
12718	done, err = future.DoneWithContext(context.Background(), client)
12719	if err != nil {
12720		err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
12721		return
12722	}
12723	if !done {
12724		inr.Response.Response = future.Response()
12725		err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesCreateOrUpdateFuture")
12726		return
12727	}
12728	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12729	if inr.Response.Response, err = future.GetResult(sender); err == nil && inr.Response.Response.StatusCode != http.StatusNoContent {
12730		inr, err = client.CreateOrUpdateResponder(inr.Response.Response)
12731		if err != nil {
12732			err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", inr.Response.Response, "Failure responding to request")
12733		}
12734	}
12735	return
12736}
12737
12738// InboundNatRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
12739// operation.
12740type InboundNatRulesDeleteFuture struct {
12741	azure.FutureAPI
12742	// Result returns the result of the asynchronous operation.
12743	// If the operation has not completed it will return an error.
12744	Result func(InboundNatRulesClient) (autorest.Response, error)
12745}
12746
12747// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12748func (future *InboundNatRulesDeleteFuture) UnmarshalJSON(body []byte) error {
12749	var azFuture azure.Future
12750	if err := json.Unmarshal(body, &azFuture); err != nil {
12751		return err
12752	}
12753	future.FutureAPI = &azFuture
12754	future.Result = future.result
12755	return nil
12756}
12757
12758// result is the default implementation for InboundNatRulesDeleteFuture.Result.
12759func (future *InboundNatRulesDeleteFuture) result(client InboundNatRulesClient) (ar autorest.Response, err error) {
12760	var done bool
12761	done, err = future.DoneWithContext(context.Background(), client)
12762	if err != nil {
12763		err = autorest.NewErrorWithError(err, "network.InboundNatRulesDeleteFuture", "Result", future.Response(), "Polling failure")
12764		return
12765	}
12766	if !done {
12767		ar.Response = future.Response()
12768		err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesDeleteFuture")
12769		return
12770	}
12771	ar.Response = future.Response()
12772	return
12773}
12774
12775// Interface a network interface in a resource group.
12776type Interface struct {
12777	autorest.Response `json:"-"`
12778	// InterfacePropertiesFormat - Properties of the network interface.
12779	*InterfacePropertiesFormat `json:"properties,omitempty"`
12780	// Etag - A unique read-only string that changes whenever the resource is updated.
12781	Etag *string `json:"etag,omitempty"`
12782	// ID - Resource ID.
12783	ID *string `json:"id,omitempty"`
12784	// Name - READ-ONLY; Resource name.
12785	Name *string `json:"name,omitempty"`
12786	// Type - READ-ONLY; Resource type.
12787	Type *string `json:"type,omitempty"`
12788	// Location - Resource location.
12789	Location *string `json:"location,omitempty"`
12790	// Tags - Resource tags.
12791	Tags map[string]*string `json:"tags"`
12792}
12793
12794// MarshalJSON is the custom marshaler for Interface.
12795func (i Interface) MarshalJSON() ([]byte, error) {
12796	objectMap := make(map[string]interface{})
12797	if i.InterfacePropertiesFormat != nil {
12798		objectMap["properties"] = i.InterfacePropertiesFormat
12799	}
12800	if i.Etag != nil {
12801		objectMap["etag"] = i.Etag
12802	}
12803	if i.ID != nil {
12804		objectMap["id"] = i.ID
12805	}
12806	if i.Location != nil {
12807		objectMap["location"] = i.Location
12808	}
12809	if i.Tags != nil {
12810		objectMap["tags"] = i.Tags
12811	}
12812	return json.Marshal(objectMap)
12813}
12814
12815// UnmarshalJSON is the custom unmarshaler for Interface struct.
12816func (i *Interface) UnmarshalJSON(body []byte) error {
12817	var m map[string]*json.RawMessage
12818	err := json.Unmarshal(body, &m)
12819	if err != nil {
12820		return err
12821	}
12822	for k, v := range m {
12823		switch k {
12824		case "properties":
12825			if v != nil {
12826				var interfacePropertiesFormat InterfacePropertiesFormat
12827				err = json.Unmarshal(*v, &interfacePropertiesFormat)
12828				if err != nil {
12829					return err
12830				}
12831				i.InterfacePropertiesFormat = &interfacePropertiesFormat
12832			}
12833		case "etag":
12834			if v != nil {
12835				var etag string
12836				err = json.Unmarshal(*v, &etag)
12837				if err != nil {
12838					return err
12839				}
12840				i.Etag = &etag
12841			}
12842		case "id":
12843			if v != nil {
12844				var ID string
12845				err = json.Unmarshal(*v, &ID)
12846				if err != nil {
12847					return err
12848				}
12849				i.ID = &ID
12850			}
12851		case "name":
12852			if v != nil {
12853				var name string
12854				err = json.Unmarshal(*v, &name)
12855				if err != nil {
12856					return err
12857				}
12858				i.Name = &name
12859			}
12860		case "type":
12861			if v != nil {
12862				var typeVar string
12863				err = json.Unmarshal(*v, &typeVar)
12864				if err != nil {
12865					return err
12866				}
12867				i.Type = &typeVar
12868			}
12869		case "location":
12870			if v != nil {
12871				var location string
12872				err = json.Unmarshal(*v, &location)
12873				if err != nil {
12874					return err
12875				}
12876				i.Location = &location
12877			}
12878		case "tags":
12879			if v != nil {
12880				var tags map[string]*string
12881				err = json.Unmarshal(*v, &tags)
12882				if err != nil {
12883					return err
12884				}
12885				i.Tags = tags
12886			}
12887		}
12888	}
12889
12890	return nil
12891}
12892
12893// InterfaceAssociation network interface and its custom security rules.
12894type InterfaceAssociation struct {
12895	// ID - READ-ONLY; Network interface ID.
12896	ID *string `json:"id,omitempty"`
12897	// SecurityRules - Collection of custom security rules.
12898	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
12899}
12900
12901// MarshalJSON is the custom marshaler for InterfaceAssociation.
12902func (ia InterfaceAssociation) MarshalJSON() ([]byte, error) {
12903	objectMap := make(map[string]interface{})
12904	if ia.SecurityRules != nil {
12905		objectMap["securityRules"] = ia.SecurityRules
12906	}
12907	return json.Marshal(objectMap)
12908}
12909
12910// InterfaceDNSSettings DNS settings of a network interface.
12911type InterfaceDNSSettings struct {
12912	// 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.
12913	DNSServers *[]string `json:"dnsServers,omitempty"`
12914	// 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.
12915	AppliedDNSServers *[]string `json:"appliedDnsServers,omitempty"`
12916	// InternalDNSNameLabel - Relative DNS name for this NIC used for internal communications between VMs in the same virtual network.
12917	InternalDNSNameLabel *string `json:"internalDnsNameLabel,omitempty"`
12918	// InternalFqdn - Fully qualified DNS name supporting internal communications between VMs in the same virtual network.
12919	InternalFqdn *string `json:"internalFqdn,omitempty"`
12920	// 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.
12921	InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"`
12922}
12923
12924// InterfaceEndpoint interface endpoint resource.
12925type InterfaceEndpoint struct {
12926	autorest.Response `json:"-"`
12927	// InterfaceEndpointProperties - Properties of the interface endpoint.
12928	*InterfaceEndpointProperties `json:"properties,omitempty"`
12929	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
12930	Etag *string `json:"etag,omitempty"`
12931	// ID - Resource ID.
12932	ID *string `json:"id,omitempty"`
12933	// Name - READ-ONLY; Resource name.
12934	Name *string `json:"name,omitempty"`
12935	// Type - READ-ONLY; Resource type.
12936	Type *string `json:"type,omitempty"`
12937	// Location - Resource location.
12938	Location *string `json:"location,omitempty"`
12939	// Tags - Resource tags.
12940	Tags map[string]*string `json:"tags"`
12941}
12942
12943// MarshalJSON is the custom marshaler for InterfaceEndpoint.
12944func (ie InterfaceEndpoint) MarshalJSON() ([]byte, error) {
12945	objectMap := make(map[string]interface{})
12946	if ie.InterfaceEndpointProperties != nil {
12947		objectMap["properties"] = ie.InterfaceEndpointProperties
12948	}
12949	if ie.Etag != nil {
12950		objectMap["etag"] = ie.Etag
12951	}
12952	if ie.ID != nil {
12953		objectMap["id"] = ie.ID
12954	}
12955	if ie.Location != nil {
12956		objectMap["location"] = ie.Location
12957	}
12958	if ie.Tags != nil {
12959		objectMap["tags"] = ie.Tags
12960	}
12961	return json.Marshal(objectMap)
12962}
12963
12964// UnmarshalJSON is the custom unmarshaler for InterfaceEndpoint struct.
12965func (ie *InterfaceEndpoint) UnmarshalJSON(body []byte) error {
12966	var m map[string]*json.RawMessage
12967	err := json.Unmarshal(body, &m)
12968	if err != nil {
12969		return err
12970	}
12971	for k, v := range m {
12972		switch k {
12973		case "properties":
12974			if v != nil {
12975				var interfaceEndpointProperties InterfaceEndpointProperties
12976				err = json.Unmarshal(*v, &interfaceEndpointProperties)
12977				if err != nil {
12978					return err
12979				}
12980				ie.InterfaceEndpointProperties = &interfaceEndpointProperties
12981			}
12982		case "etag":
12983			if v != nil {
12984				var etag string
12985				err = json.Unmarshal(*v, &etag)
12986				if err != nil {
12987					return err
12988				}
12989				ie.Etag = &etag
12990			}
12991		case "id":
12992			if v != nil {
12993				var ID string
12994				err = json.Unmarshal(*v, &ID)
12995				if err != nil {
12996					return err
12997				}
12998				ie.ID = &ID
12999			}
13000		case "name":
13001			if v != nil {
13002				var name string
13003				err = json.Unmarshal(*v, &name)
13004				if err != nil {
13005					return err
13006				}
13007				ie.Name = &name
13008			}
13009		case "type":
13010			if v != nil {
13011				var typeVar string
13012				err = json.Unmarshal(*v, &typeVar)
13013				if err != nil {
13014					return err
13015				}
13016				ie.Type = &typeVar
13017			}
13018		case "location":
13019			if v != nil {
13020				var location string
13021				err = json.Unmarshal(*v, &location)
13022				if err != nil {
13023					return err
13024				}
13025				ie.Location = &location
13026			}
13027		case "tags":
13028			if v != nil {
13029				var tags map[string]*string
13030				err = json.Unmarshal(*v, &tags)
13031				if err != nil {
13032					return err
13033				}
13034				ie.Tags = tags
13035			}
13036		}
13037	}
13038
13039	return nil
13040}
13041
13042// InterfaceEndpointListResult response for the ListInterfaceEndpoints API service call.
13043type InterfaceEndpointListResult struct {
13044	autorest.Response `json:"-"`
13045	// Value - Gets a list of InterfaceEndpoint resources in a resource group.
13046	Value *[]InterfaceEndpoint `json:"value,omitempty"`
13047	// NextLink - READ-ONLY; The URL to get the next set of results.
13048	NextLink *string `json:"nextLink,omitempty"`
13049}
13050
13051// MarshalJSON is the custom marshaler for InterfaceEndpointListResult.
13052func (ielr InterfaceEndpointListResult) MarshalJSON() ([]byte, error) {
13053	objectMap := make(map[string]interface{})
13054	if ielr.Value != nil {
13055		objectMap["value"] = ielr.Value
13056	}
13057	return json.Marshal(objectMap)
13058}
13059
13060// InterfaceEndpointListResultIterator provides access to a complete listing of InterfaceEndpoint values.
13061type InterfaceEndpointListResultIterator struct {
13062	i    int
13063	page InterfaceEndpointListResultPage
13064}
13065
13066// NextWithContext advances to the next value.  If there was an error making
13067// the request the iterator does not advance and the error is returned.
13068func (iter *InterfaceEndpointListResultIterator) NextWithContext(ctx context.Context) (err error) {
13069	if tracing.IsEnabled() {
13070		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceEndpointListResultIterator.NextWithContext")
13071		defer func() {
13072			sc := -1
13073			if iter.Response().Response.Response != nil {
13074				sc = iter.Response().Response.Response.StatusCode
13075			}
13076			tracing.EndSpan(ctx, sc, err)
13077		}()
13078	}
13079	iter.i++
13080	if iter.i < len(iter.page.Values()) {
13081		return nil
13082	}
13083	err = iter.page.NextWithContext(ctx)
13084	if err != nil {
13085		iter.i--
13086		return err
13087	}
13088	iter.i = 0
13089	return nil
13090}
13091
13092// Next advances to the next value.  If there was an error making
13093// the request the iterator does not advance and the error is returned.
13094// Deprecated: Use NextWithContext() instead.
13095func (iter *InterfaceEndpointListResultIterator) Next() error {
13096	return iter.NextWithContext(context.Background())
13097}
13098
13099// NotDone returns true if the enumeration should be started or is not yet complete.
13100func (iter InterfaceEndpointListResultIterator) NotDone() bool {
13101	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13102}
13103
13104// Response returns the raw server response from the last page request.
13105func (iter InterfaceEndpointListResultIterator) Response() InterfaceEndpointListResult {
13106	return iter.page.Response()
13107}
13108
13109// Value returns the current value or a zero-initialized value if the
13110// iterator has advanced beyond the end of the collection.
13111func (iter InterfaceEndpointListResultIterator) Value() InterfaceEndpoint {
13112	if !iter.page.NotDone() {
13113		return InterfaceEndpoint{}
13114	}
13115	return iter.page.Values()[iter.i]
13116}
13117
13118// Creates a new instance of the InterfaceEndpointListResultIterator type.
13119func NewInterfaceEndpointListResultIterator(page InterfaceEndpointListResultPage) InterfaceEndpointListResultIterator {
13120	return InterfaceEndpointListResultIterator{page: page}
13121}
13122
13123// IsEmpty returns true if the ListResult contains no values.
13124func (ielr InterfaceEndpointListResult) IsEmpty() bool {
13125	return ielr.Value == nil || len(*ielr.Value) == 0
13126}
13127
13128// hasNextLink returns true if the NextLink is not empty.
13129func (ielr InterfaceEndpointListResult) hasNextLink() bool {
13130	return ielr.NextLink != nil && len(*ielr.NextLink) != 0
13131}
13132
13133// interfaceEndpointListResultPreparer prepares a request to retrieve the next set of results.
13134// It returns nil if no more results exist.
13135func (ielr InterfaceEndpointListResult) interfaceEndpointListResultPreparer(ctx context.Context) (*http.Request, error) {
13136	if !ielr.hasNextLink() {
13137		return nil, nil
13138	}
13139	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13140		autorest.AsJSON(),
13141		autorest.AsGet(),
13142		autorest.WithBaseURL(to.String(ielr.NextLink)))
13143}
13144
13145// InterfaceEndpointListResultPage contains a page of InterfaceEndpoint values.
13146type InterfaceEndpointListResultPage struct {
13147	fn   func(context.Context, InterfaceEndpointListResult) (InterfaceEndpointListResult, error)
13148	ielr InterfaceEndpointListResult
13149}
13150
13151// NextWithContext advances to the next page of values.  If there was an error making
13152// the request the page does not advance and the error is returned.
13153func (page *InterfaceEndpointListResultPage) NextWithContext(ctx context.Context) (err error) {
13154	if tracing.IsEnabled() {
13155		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceEndpointListResultPage.NextWithContext")
13156		defer func() {
13157			sc := -1
13158			if page.Response().Response.Response != nil {
13159				sc = page.Response().Response.Response.StatusCode
13160			}
13161			tracing.EndSpan(ctx, sc, err)
13162		}()
13163	}
13164	for {
13165		next, err := page.fn(ctx, page.ielr)
13166		if err != nil {
13167			return err
13168		}
13169		page.ielr = next
13170		if !next.hasNextLink() || !next.IsEmpty() {
13171			break
13172		}
13173	}
13174	return nil
13175}
13176
13177// Next advances to the next page of values.  If there was an error making
13178// the request the page does not advance and the error is returned.
13179// Deprecated: Use NextWithContext() instead.
13180func (page *InterfaceEndpointListResultPage) Next() error {
13181	return page.NextWithContext(context.Background())
13182}
13183
13184// NotDone returns true if the page enumeration should be started or is not yet complete.
13185func (page InterfaceEndpointListResultPage) NotDone() bool {
13186	return !page.ielr.IsEmpty()
13187}
13188
13189// Response returns the raw server response from the last page request.
13190func (page InterfaceEndpointListResultPage) Response() InterfaceEndpointListResult {
13191	return page.ielr
13192}
13193
13194// Values returns the slice of values for the current page or nil if there are no values.
13195func (page InterfaceEndpointListResultPage) Values() []InterfaceEndpoint {
13196	if page.ielr.IsEmpty() {
13197		return nil
13198	}
13199	return *page.ielr.Value
13200}
13201
13202// Creates a new instance of the InterfaceEndpointListResultPage type.
13203func NewInterfaceEndpointListResultPage(cur InterfaceEndpointListResult, getNextPage func(context.Context, InterfaceEndpointListResult) (InterfaceEndpointListResult, error)) InterfaceEndpointListResultPage {
13204	return InterfaceEndpointListResultPage{
13205		fn:   getNextPage,
13206		ielr: cur,
13207	}
13208}
13209
13210// InterfaceEndpointProperties properties of the interface endpoint.
13211type InterfaceEndpointProperties struct {
13212	// Fqdn - A first-party service's FQDN that is mapped to the private IP allocated via this interface endpoint.
13213	Fqdn *string `json:"fqdn,omitempty"`
13214	// EndpointService - A reference to the service being brought into the virtual network.
13215	EndpointService *EndpointService `json:"endpointService,omitempty"`
13216	// Subnet - The ID of the subnet from which the private IP will be allocated.
13217	Subnet *Subnet `json:"subnet,omitempty"`
13218	// NetworkInterfaces - READ-ONLY; Gets an array of references to the network interfaces created for this interface endpoint.
13219	NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"`
13220	// Owner - READ-ONLY; A read-only property that identifies who created this interface endpoint.
13221	Owner *string `json:"owner,omitempty"`
13222	// ProvisioningState - READ-ONLY; The provisioning state of the interface endpoint. Possible values are: 'Updating', 'Deleting', and 'Failed'.
13223	ProvisioningState *string `json:"provisioningState,omitempty"`
13224}
13225
13226// MarshalJSON is the custom marshaler for InterfaceEndpointProperties.
13227func (iep InterfaceEndpointProperties) MarshalJSON() ([]byte, error) {
13228	objectMap := make(map[string]interface{})
13229	if iep.Fqdn != nil {
13230		objectMap["fqdn"] = iep.Fqdn
13231	}
13232	if iep.EndpointService != nil {
13233		objectMap["endpointService"] = iep.EndpointService
13234	}
13235	if iep.Subnet != nil {
13236		objectMap["subnet"] = iep.Subnet
13237	}
13238	return json.Marshal(objectMap)
13239}
13240
13241// InterfaceEndpointsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
13242// long-running operation.
13243type InterfaceEndpointsCreateOrUpdateFuture struct {
13244	azure.FutureAPI
13245	// Result returns the result of the asynchronous operation.
13246	// If the operation has not completed it will return an error.
13247	Result func(InterfaceEndpointsClient) (InterfaceEndpoint, error)
13248}
13249
13250// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13251func (future *InterfaceEndpointsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
13252	var azFuture azure.Future
13253	if err := json.Unmarshal(body, &azFuture); err != nil {
13254		return err
13255	}
13256	future.FutureAPI = &azFuture
13257	future.Result = future.result
13258	return nil
13259}
13260
13261// result is the default implementation for InterfaceEndpointsCreateOrUpdateFuture.Result.
13262func (future *InterfaceEndpointsCreateOrUpdateFuture) result(client InterfaceEndpointsClient) (ie InterfaceEndpoint, err error) {
13263	var done bool
13264	done, err = future.DoneWithContext(context.Background(), client)
13265	if err != nil {
13266		err = autorest.NewErrorWithError(err, "network.InterfaceEndpointsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
13267		return
13268	}
13269	if !done {
13270		ie.Response.Response = future.Response()
13271		err = azure.NewAsyncOpIncompleteError("network.InterfaceEndpointsCreateOrUpdateFuture")
13272		return
13273	}
13274	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
13275	if ie.Response.Response, err = future.GetResult(sender); err == nil && ie.Response.Response.StatusCode != http.StatusNoContent {
13276		ie, err = client.CreateOrUpdateResponder(ie.Response.Response)
13277		if err != nil {
13278			err = autorest.NewErrorWithError(err, "network.InterfaceEndpointsCreateOrUpdateFuture", "Result", ie.Response.Response, "Failure responding to request")
13279		}
13280	}
13281	return
13282}
13283
13284// InterfaceEndpointsDeleteFuture an abstraction for monitoring and retrieving the results of a
13285// long-running operation.
13286type InterfaceEndpointsDeleteFuture struct {
13287	azure.FutureAPI
13288	// Result returns the result of the asynchronous operation.
13289	// If the operation has not completed it will return an error.
13290	Result func(InterfaceEndpointsClient) (autorest.Response, error)
13291}
13292
13293// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13294func (future *InterfaceEndpointsDeleteFuture) UnmarshalJSON(body []byte) error {
13295	var azFuture azure.Future
13296	if err := json.Unmarshal(body, &azFuture); err != nil {
13297		return err
13298	}
13299	future.FutureAPI = &azFuture
13300	future.Result = future.result
13301	return nil
13302}
13303
13304// result is the default implementation for InterfaceEndpointsDeleteFuture.Result.
13305func (future *InterfaceEndpointsDeleteFuture) result(client InterfaceEndpointsClient) (ar autorest.Response, err error) {
13306	var done bool
13307	done, err = future.DoneWithContext(context.Background(), client)
13308	if err != nil {
13309		err = autorest.NewErrorWithError(err, "network.InterfaceEndpointsDeleteFuture", "Result", future.Response(), "Polling failure")
13310		return
13311	}
13312	if !done {
13313		ar.Response = future.Response()
13314		err = azure.NewAsyncOpIncompleteError("network.InterfaceEndpointsDeleteFuture")
13315		return
13316	}
13317	ar.Response = future.Response()
13318	return
13319}
13320
13321// InterfaceIPConfiguration iPConfiguration in a network interface.
13322type InterfaceIPConfiguration struct {
13323	autorest.Response `json:"-"`
13324	// InterfaceIPConfigurationPropertiesFormat - Network interface IP configuration properties.
13325	*InterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"`
13326	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
13327	Name *string `json:"name,omitempty"`
13328	// Etag - A unique read-only string that changes whenever the resource is updated.
13329	Etag *string `json:"etag,omitempty"`
13330	// ID - Resource ID.
13331	ID *string `json:"id,omitempty"`
13332}
13333
13334// MarshalJSON is the custom marshaler for InterfaceIPConfiguration.
13335func (iic InterfaceIPConfiguration) MarshalJSON() ([]byte, error) {
13336	objectMap := make(map[string]interface{})
13337	if iic.InterfaceIPConfigurationPropertiesFormat != nil {
13338		objectMap["properties"] = iic.InterfaceIPConfigurationPropertiesFormat
13339	}
13340	if iic.Name != nil {
13341		objectMap["name"] = iic.Name
13342	}
13343	if iic.Etag != nil {
13344		objectMap["etag"] = iic.Etag
13345	}
13346	if iic.ID != nil {
13347		objectMap["id"] = iic.ID
13348	}
13349	return json.Marshal(objectMap)
13350}
13351
13352// UnmarshalJSON is the custom unmarshaler for InterfaceIPConfiguration struct.
13353func (iic *InterfaceIPConfiguration) UnmarshalJSON(body []byte) error {
13354	var m map[string]*json.RawMessage
13355	err := json.Unmarshal(body, &m)
13356	if err != nil {
13357		return err
13358	}
13359	for k, v := range m {
13360		switch k {
13361		case "properties":
13362			if v != nil {
13363				var interfaceIPConfigurationPropertiesFormat InterfaceIPConfigurationPropertiesFormat
13364				err = json.Unmarshal(*v, &interfaceIPConfigurationPropertiesFormat)
13365				if err != nil {
13366					return err
13367				}
13368				iic.InterfaceIPConfigurationPropertiesFormat = &interfaceIPConfigurationPropertiesFormat
13369			}
13370		case "name":
13371			if v != nil {
13372				var name string
13373				err = json.Unmarshal(*v, &name)
13374				if err != nil {
13375					return err
13376				}
13377				iic.Name = &name
13378			}
13379		case "etag":
13380			if v != nil {
13381				var etag string
13382				err = json.Unmarshal(*v, &etag)
13383				if err != nil {
13384					return err
13385				}
13386				iic.Etag = &etag
13387			}
13388		case "id":
13389			if v != nil {
13390				var ID string
13391				err = json.Unmarshal(*v, &ID)
13392				if err != nil {
13393					return err
13394				}
13395				iic.ID = &ID
13396			}
13397		}
13398	}
13399
13400	return nil
13401}
13402
13403// InterfaceIPConfigurationListResult response for list ip configurations API service call.
13404type InterfaceIPConfigurationListResult struct {
13405	autorest.Response `json:"-"`
13406	// Value - A list of ip configurations.
13407	Value *[]InterfaceIPConfiguration `json:"value,omitempty"`
13408	// NextLink - READ-ONLY; The URL to get the next set of results.
13409	NextLink *string `json:"nextLink,omitempty"`
13410}
13411
13412// MarshalJSON is the custom marshaler for InterfaceIPConfigurationListResult.
13413func (iiclr InterfaceIPConfigurationListResult) MarshalJSON() ([]byte, error) {
13414	objectMap := make(map[string]interface{})
13415	if iiclr.Value != nil {
13416		objectMap["value"] = iiclr.Value
13417	}
13418	return json.Marshal(objectMap)
13419}
13420
13421// InterfaceIPConfigurationListResultIterator provides access to a complete listing of
13422// InterfaceIPConfiguration values.
13423type InterfaceIPConfigurationListResultIterator struct {
13424	i    int
13425	page InterfaceIPConfigurationListResultPage
13426}
13427
13428// NextWithContext advances to the next value.  If there was an error making
13429// the request the iterator does not advance and the error is returned.
13430func (iter *InterfaceIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
13431	if tracing.IsEnabled() {
13432		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultIterator.NextWithContext")
13433		defer func() {
13434			sc := -1
13435			if iter.Response().Response.Response != nil {
13436				sc = iter.Response().Response.Response.StatusCode
13437			}
13438			tracing.EndSpan(ctx, sc, err)
13439		}()
13440	}
13441	iter.i++
13442	if iter.i < len(iter.page.Values()) {
13443		return nil
13444	}
13445	err = iter.page.NextWithContext(ctx)
13446	if err != nil {
13447		iter.i--
13448		return err
13449	}
13450	iter.i = 0
13451	return nil
13452}
13453
13454// Next advances to the next value.  If there was an error making
13455// the request the iterator does not advance and the error is returned.
13456// Deprecated: Use NextWithContext() instead.
13457func (iter *InterfaceIPConfigurationListResultIterator) Next() error {
13458	return iter.NextWithContext(context.Background())
13459}
13460
13461// NotDone returns true if the enumeration should be started or is not yet complete.
13462func (iter InterfaceIPConfigurationListResultIterator) NotDone() bool {
13463	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13464}
13465
13466// Response returns the raw server response from the last page request.
13467func (iter InterfaceIPConfigurationListResultIterator) Response() InterfaceIPConfigurationListResult {
13468	return iter.page.Response()
13469}
13470
13471// Value returns the current value or a zero-initialized value if the
13472// iterator has advanced beyond the end of the collection.
13473func (iter InterfaceIPConfigurationListResultIterator) Value() InterfaceIPConfiguration {
13474	if !iter.page.NotDone() {
13475		return InterfaceIPConfiguration{}
13476	}
13477	return iter.page.Values()[iter.i]
13478}
13479
13480// Creates a new instance of the InterfaceIPConfigurationListResultIterator type.
13481func NewInterfaceIPConfigurationListResultIterator(page InterfaceIPConfigurationListResultPage) InterfaceIPConfigurationListResultIterator {
13482	return InterfaceIPConfigurationListResultIterator{page: page}
13483}
13484
13485// IsEmpty returns true if the ListResult contains no values.
13486func (iiclr InterfaceIPConfigurationListResult) IsEmpty() bool {
13487	return iiclr.Value == nil || len(*iiclr.Value) == 0
13488}
13489
13490// hasNextLink returns true if the NextLink is not empty.
13491func (iiclr InterfaceIPConfigurationListResult) hasNextLink() bool {
13492	return iiclr.NextLink != nil && len(*iiclr.NextLink) != 0
13493}
13494
13495// interfaceIPConfigurationListResultPreparer prepares a request to retrieve the next set of results.
13496// It returns nil if no more results exist.
13497func (iiclr InterfaceIPConfigurationListResult) interfaceIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
13498	if !iiclr.hasNextLink() {
13499		return nil, nil
13500	}
13501	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13502		autorest.AsJSON(),
13503		autorest.AsGet(),
13504		autorest.WithBaseURL(to.String(iiclr.NextLink)))
13505}
13506
13507// InterfaceIPConfigurationListResultPage contains a page of InterfaceIPConfiguration values.
13508type InterfaceIPConfigurationListResultPage struct {
13509	fn    func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)
13510	iiclr InterfaceIPConfigurationListResult
13511}
13512
13513// NextWithContext advances to the next page of values.  If there was an error making
13514// the request the page does not advance and the error is returned.
13515func (page *InterfaceIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
13516	if tracing.IsEnabled() {
13517		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultPage.NextWithContext")
13518		defer func() {
13519			sc := -1
13520			if page.Response().Response.Response != nil {
13521				sc = page.Response().Response.Response.StatusCode
13522			}
13523			tracing.EndSpan(ctx, sc, err)
13524		}()
13525	}
13526	for {
13527		next, err := page.fn(ctx, page.iiclr)
13528		if err != nil {
13529			return err
13530		}
13531		page.iiclr = next
13532		if !next.hasNextLink() || !next.IsEmpty() {
13533			break
13534		}
13535	}
13536	return nil
13537}
13538
13539// Next advances to the next page of values.  If there was an error making
13540// the request the page does not advance and the error is returned.
13541// Deprecated: Use NextWithContext() instead.
13542func (page *InterfaceIPConfigurationListResultPage) Next() error {
13543	return page.NextWithContext(context.Background())
13544}
13545
13546// NotDone returns true if the page enumeration should be started or is not yet complete.
13547func (page InterfaceIPConfigurationListResultPage) NotDone() bool {
13548	return !page.iiclr.IsEmpty()
13549}
13550
13551// Response returns the raw server response from the last page request.
13552func (page InterfaceIPConfigurationListResultPage) Response() InterfaceIPConfigurationListResult {
13553	return page.iiclr
13554}
13555
13556// Values returns the slice of values for the current page or nil if there are no values.
13557func (page InterfaceIPConfigurationListResultPage) Values() []InterfaceIPConfiguration {
13558	if page.iiclr.IsEmpty() {
13559		return nil
13560	}
13561	return *page.iiclr.Value
13562}
13563
13564// Creates a new instance of the InterfaceIPConfigurationListResultPage type.
13565func NewInterfaceIPConfigurationListResultPage(cur InterfaceIPConfigurationListResult, getNextPage func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)) InterfaceIPConfigurationListResultPage {
13566	return InterfaceIPConfigurationListResultPage{
13567		fn:    getNextPage,
13568		iiclr: cur,
13569	}
13570}
13571
13572// InterfaceIPConfigurationPropertiesFormat properties of IP configuration.
13573type InterfaceIPConfigurationPropertiesFormat struct {
13574	// VirtualNetworkTaps - The reference to Virtual Network Taps.
13575	VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"`
13576	// ApplicationGatewayBackendAddressPools - The reference of ApplicationGatewayBackendAddressPool resource.
13577	ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"`
13578	// LoadBalancerBackendAddressPools - The reference of LoadBalancerBackendAddressPool resource.
13579	LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"`
13580	// LoadBalancerInboundNatRules - A list of references of LoadBalancerInboundNatRules.
13581	LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"`
13582	// PrivateIPAddress - Private IP address of the IP configuration.
13583	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
13584	// PrivateIPAllocationMethod - Defines how a private IP address is assigned. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
13585	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
13586	// PrivateIPAddressVersion - Available from Api-Version 2016-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4.  Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6'
13587	PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
13588	// Subnet - Subnet bound to the IP configuration.
13589	Subnet *Subnet `json:"subnet,omitempty"`
13590	// Primary - Gets whether this is a primary customer address on the network interface.
13591	Primary *bool `json:"primary,omitempty"`
13592	// PublicIPAddress - Public IP address bound to the IP configuration.
13593	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
13594	// ApplicationSecurityGroups - Application security groups in which the IP configuration is included.
13595	ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"`
13596	// ProvisioningState - The provisioning state of the network interface IP configuration. Possible values are: 'Updating', 'Deleting', and 'Failed'.
13597	ProvisioningState *string `json:"provisioningState,omitempty"`
13598}
13599
13600// InterfaceListResult response for the ListNetworkInterface API service call.
13601type InterfaceListResult struct {
13602	autorest.Response `json:"-"`
13603	// Value - A list of network interfaces in a resource group.
13604	Value *[]Interface `json:"value,omitempty"`
13605	// NextLink - READ-ONLY; The URL to get the next set of results.
13606	NextLink *string `json:"nextLink,omitempty"`
13607}
13608
13609// MarshalJSON is the custom marshaler for InterfaceListResult.
13610func (ilr InterfaceListResult) MarshalJSON() ([]byte, error) {
13611	objectMap := make(map[string]interface{})
13612	if ilr.Value != nil {
13613		objectMap["value"] = ilr.Value
13614	}
13615	return json.Marshal(objectMap)
13616}
13617
13618// InterfaceListResultIterator provides access to a complete listing of Interface values.
13619type InterfaceListResultIterator struct {
13620	i    int
13621	page InterfaceListResultPage
13622}
13623
13624// NextWithContext advances to the next value.  If there was an error making
13625// the request the iterator does not advance and the error is returned.
13626func (iter *InterfaceListResultIterator) NextWithContext(ctx context.Context) (err error) {
13627	if tracing.IsEnabled() {
13628		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultIterator.NextWithContext")
13629		defer func() {
13630			sc := -1
13631			if iter.Response().Response.Response != nil {
13632				sc = iter.Response().Response.Response.StatusCode
13633			}
13634			tracing.EndSpan(ctx, sc, err)
13635		}()
13636	}
13637	iter.i++
13638	if iter.i < len(iter.page.Values()) {
13639		return nil
13640	}
13641	err = iter.page.NextWithContext(ctx)
13642	if err != nil {
13643		iter.i--
13644		return err
13645	}
13646	iter.i = 0
13647	return nil
13648}
13649
13650// Next advances to the next value.  If there was an error making
13651// the request the iterator does not advance and the error is returned.
13652// Deprecated: Use NextWithContext() instead.
13653func (iter *InterfaceListResultIterator) Next() error {
13654	return iter.NextWithContext(context.Background())
13655}
13656
13657// NotDone returns true if the enumeration should be started or is not yet complete.
13658func (iter InterfaceListResultIterator) NotDone() bool {
13659	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13660}
13661
13662// Response returns the raw server response from the last page request.
13663func (iter InterfaceListResultIterator) Response() InterfaceListResult {
13664	return iter.page.Response()
13665}
13666
13667// Value returns the current value or a zero-initialized value if the
13668// iterator has advanced beyond the end of the collection.
13669func (iter InterfaceListResultIterator) Value() Interface {
13670	if !iter.page.NotDone() {
13671		return Interface{}
13672	}
13673	return iter.page.Values()[iter.i]
13674}
13675
13676// Creates a new instance of the InterfaceListResultIterator type.
13677func NewInterfaceListResultIterator(page InterfaceListResultPage) InterfaceListResultIterator {
13678	return InterfaceListResultIterator{page: page}
13679}
13680
13681// IsEmpty returns true if the ListResult contains no values.
13682func (ilr InterfaceListResult) IsEmpty() bool {
13683	return ilr.Value == nil || len(*ilr.Value) == 0
13684}
13685
13686// hasNextLink returns true if the NextLink is not empty.
13687func (ilr InterfaceListResult) hasNextLink() bool {
13688	return ilr.NextLink != nil && len(*ilr.NextLink) != 0
13689}
13690
13691// interfaceListResultPreparer prepares a request to retrieve the next set of results.
13692// It returns nil if no more results exist.
13693func (ilr InterfaceListResult) interfaceListResultPreparer(ctx context.Context) (*http.Request, error) {
13694	if !ilr.hasNextLink() {
13695		return nil, nil
13696	}
13697	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13698		autorest.AsJSON(),
13699		autorest.AsGet(),
13700		autorest.WithBaseURL(to.String(ilr.NextLink)))
13701}
13702
13703// InterfaceListResultPage contains a page of Interface values.
13704type InterfaceListResultPage struct {
13705	fn  func(context.Context, InterfaceListResult) (InterfaceListResult, error)
13706	ilr InterfaceListResult
13707}
13708
13709// NextWithContext advances to the next page of values.  If there was an error making
13710// the request the page does not advance and the error is returned.
13711func (page *InterfaceListResultPage) NextWithContext(ctx context.Context) (err error) {
13712	if tracing.IsEnabled() {
13713		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultPage.NextWithContext")
13714		defer func() {
13715			sc := -1
13716			if page.Response().Response.Response != nil {
13717				sc = page.Response().Response.Response.StatusCode
13718			}
13719			tracing.EndSpan(ctx, sc, err)
13720		}()
13721	}
13722	for {
13723		next, err := page.fn(ctx, page.ilr)
13724		if err != nil {
13725			return err
13726		}
13727		page.ilr = next
13728		if !next.hasNextLink() || !next.IsEmpty() {
13729			break
13730		}
13731	}
13732	return nil
13733}
13734
13735// Next advances to the next page of values.  If there was an error making
13736// the request the page does not advance and the error is returned.
13737// Deprecated: Use NextWithContext() instead.
13738func (page *InterfaceListResultPage) Next() error {
13739	return page.NextWithContext(context.Background())
13740}
13741
13742// NotDone returns true if the page enumeration should be started or is not yet complete.
13743func (page InterfaceListResultPage) NotDone() bool {
13744	return !page.ilr.IsEmpty()
13745}
13746
13747// Response returns the raw server response from the last page request.
13748func (page InterfaceListResultPage) Response() InterfaceListResult {
13749	return page.ilr
13750}
13751
13752// Values returns the slice of values for the current page or nil if there are no values.
13753func (page InterfaceListResultPage) Values() []Interface {
13754	if page.ilr.IsEmpty() {
13755		return nil
13756	}
13757	return *page.ilr.Value
13758}
13759
13760// Creates a new instance of the InterfaceListResultPage type.
13761func NewInterfaceListResultPage(cur InterfaceListResult, getNextPage func(context.Context, InterfaceListResult) (InterfaceListResult, error)) InterfaceListResultPage {
13762	return InterfaceListResultPage{
13763		fn:  getNextPage,
13764		ilr: cur,
13765	}
13766}
13767
13768// InterfaceLoadBalancerListResult response for list ip configurations API service call.
13769type InterfaceLoadBalancerListResult struct {
13770	autorest.Response `json:"-"`
13771	// Value - A list of load balancers.
13772	Value *[]LoadBalancer `json:"value,omitempty"`
13773	// NextLink - READ-ONLY; The URL to get the next set of results.
13774	NextLink *string `json:"nextLink,omitempty"`
13775}
13776
13777// MarshalJSON is the custom marshaler for InterfaceLoadBalancerListResult.
13778func (ilblr InterfaceLoadBalancerListResult) MarshalJSON() ([]byte, error) {
13779	objectMap := make(map[string]interface{})
13780	if ilblr.Value != nil {
13781		objectMap["value"] = ilblr.Value
13782	}
13783	return json.Marshal(objectMap)
13784}
13785
13786// InterfaceLoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values.
13787type InterfaceLoadBalancerListResultIterator struct {
13788	i    int
13789	page InterfaceLoadBalancerListResultPage
13790}
13791
13792// NextWithContext advances to the next value.  If there was an error making
13793// the request the iterator does not advance and the error is returned.
13794func (iter *InterfaceLoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) {
13795	if tracing.IsEnabled() {
13796		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultIterator.NextWithContext")
13797		defer func() {
13798			sc := -1
13799			if iter.Response().Response.Response != nil {
13800				sc = iter.Response().Response.Response.StatusCode
13801			}
13802			tracing.EndSpan(ctx, sc, err)
13803		}()
13804	}
13805	iter.i++
13806	if iter.i < len(iter.page.Values()) {
13807		return nil
13808	}
13809	err = iter.page.NextWithContext(ctx)
13810	if err != nil {
13811		iter.i--
13812		return err
13813	}
13814	iter.i = 0
13815	return nil
13816}
13817
13818// Next advances to the next value.  If there was an error making
13819// the request the iterator does not advance and the error is returned.
13820// Deprecated: Use NextWithContext() instead.
13821func (iter *InterfaceLoadBalancerListResultIterator) Next() error {
13822	return iter.NextWithContext(context.Background())
13823}
13824
13825// NotDone returns true if the enumeration should be started or is not yet complete.
13826func (iter InterfaceLoadBalancerListResultIterator) NotDone() bool {
13827	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13828}
13829
13830// Response returns the raw server response from the last page request.
13831func (iter InterfaceLoadBalancerListResultIterator) Response() InterfaceLoadBalancerListResult {
13832	return iter.page.Response()
13833}
13834
13835// Value returns the current value or a zero-initialized value if the
13836// iterator has advanced beyond the end of the collection.
13837func (iter InterfaceLoadBalancerListResultIterator) Value() LoadBalancer {
13838	if !iter.page.NotDone() {
13839		return LoadBalancer{}
13840	}
13841	return iter.page.Values()[iter.i]
13842}
13843
13844// Creates a new instance of the InterfaceLoadBalancerListResultIterator type.
13845func NewInterfaceLoadBalancerListResultIterator(page InterfaceLoadBalancerListResultPage) InterfaceLoadBalancerListResultIterator {
13846	return InterfaceLoadBalancerListResultIterator{page: page}
13847}
13848
13849// IsEmpty returns true if the ListResult contains no values.
13850func (ilblr InterfaceLoadBalancerListResult) IsEmpty() bool {
13851	return ilblr.Value == nil || len(*ilblr.Value) == 0
13852}
13853
13854// hasNextLink returns true if the NextLink is not empty.
13855func (ilblr InterfaceLoadBalancerListResult) hasNextLink() bool {
13856	return ilblr.NextLink != nil && len(*ilblr.NextLink) != 0
13857}
13858
13859// interfaceLoadBalancerListResultPreparer prepares a request to retrieve the next set of results.
13860// It returns nil if no more results exist.
13861func (ilblr InterfaceLoadBalancerListResult) interfaceLoadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) {
13862	if !ilblr.hasNextLink() {
13863		return nil, nil
13864	}
13865	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13866		autorest.AsJSON(),
13867		autorest.AsGet(),
13868		autorest.WithBaseURL(to.String(ilblr.NextLink)))
13869}
13870
13871// InterfaceLoadBalancerListResultPage contains a page of LoadBalancer values.
13872type InterfaceLoadBalancerListResultPage struct {
13873	fn    func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)
13874	ilblr InterfaceLoadBalancerListResult
13875}
13876
13877// NextWithContext advances to the next page of values.  If there was an error making
13878// the request the page does not advance and the error is returned.
13879func (page *InterfaceLoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) {
13880	if tracing.IsEnabled() {
13881		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultPage.NextWithContext")
13882		defer func() {
13883			sc := -1
13884			if page.Response().Response.Response != nil {
13885				sc = page.Response().Response.Response.StatusCode
13886			}
13887			tracing.EndSpan(ctx, sc, err)
13888		}()
13889	}
13890	for {
13891		next, err := page.fn(ctx, page.ilblr)
13892		if err != nil {
13893			return err
13894		}
13895		page.ilblr = next
13896		if !next.hasNextLink() || !next.IsEmpty() {
13897			break
13898		}
13899	}
13900	return nil
13901}
13902
13903// Next advances to the next page of values.  If there was an error making
13904// the request the page does not advance and the error is returned.
13905// Deprecated: Use NextWithContext() instead.
13906func (page *InterfaceLoadBalancerListResultPage) Next() error {
13907	return page.NextWithContext(context.Background())
13908}
13909
13910// NotDone returns true if the page enumeration should be started or is not yet complete.
13911func (page InterfaceLoadBalancerListResultPage) NotDone() bool {
13912	return !page.ilblr.IsEmpty()
13913}
13914
13915// Response returns the raw server response from the last page request.
13916func (page InterfaceLoadBalancerListResultPage) Response() InterfaceLoadBalancerListResult {
13917	return page.ilblr
13918}
13919
13920// Values returns the slice of values for the current page or nil if there are no values.
13921func (page InterfaceLoadBalancerListResultPage) Values() []LoadBalancer {
13922	if page.ilblr.IsEmpty() {
13923		return nil
13924	}
13925	return *page.ilblr.Value
13926}
13927
13928// Creates a new instance of the InterfaceLoadBalancerListResultPage type.
13929func NewInterfaceLoadBalancerListResultPage(cur InterfaceLoadBalancerListResult, getNextPage func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)) InterfaceLoadBalancerListResultPage {
13930	return InterfaceLoadBalancerListResultPage{
13931		fn:    getNextPage,
13932		ilblr: cur,
13933	}
13934}
13935
13936// InterfacePropertiesFormat networkInterface properties.
13937type InterfacePropertiesFormat struct {
13938	// VirtualMachine - READ-ONLY; The reference of a virtual machine.
13939	VirtualMachine *SubResource `json:"virtualMachine,omitempty"`
13940	// NetworkSecurityGroup - The reference of the NetworkSecurityGroup resource.
13941	NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"`
13942	// InterfaceEndpoint - READ-ONLY; A reference to the interface endpoint to which the network interface is linked.
13943	InterfaceEndpoint *InterfaceEndpoint `json:"interfaceEndpoint,omitempty"`
13944	// IPConfigurations - A list of IPConfigurations of the network interface.
13945	IPConfigurations *[]InterfaceIPConfiguration `json:"ipConfigurations,omitempty"`
13946	// TapConfigurations - A list of TapConfigurations of the network interface.
13947	TapConfigurations *[]InterfaceTapConfiguration `json:"tapConfigurations,omitempty"`
13948	// DNSSettings - The DNS settings in network interface.
13949	DNSSettings *InterfaceDNSSettings `json:"dnsSettings,omitempty"`
13950	// MacAddress - The MAC address of the network interface.
13951	MacAddress *string `json:"macAddress,omitempty"`
13952	// Primary - Gets whether this is a primary network interface on a virtual machine.
13953	Primary *bool `json:"primary,omitempty"`
13954	// EnableAcceleratedNetworking - If the network interface is accelerated networking enabled.
13955	EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"`
13956	// EnableIPForwarding - Indicates whether IP forwarding is enabled on this network interface.
13957	EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"`
13958	// HostedWorkloads - READ-ONLY; A list of references to linked BareMetal resources
13959	HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"`
13960	// ResourceGUID - The resource GUID property of the network interface resource.
13961	ResourceGUID *string `json:"resourceGuid,omitempty"`
13962	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
13963	ProvisioningState *string `json:"provisioningState,omitempty"`
13964}
13965
13966// MarshalJSON is the custom marshaler for InterfacePropertiesFormat.
13967func (ipf InterfacePropertiesFormat) MarshalJSON() ([]byte, error) {
13968	objectMap := make(map[string]interface{})
13969	if ipf.NetworkSecurityGroup != nil {
13970		objectMap["networkSecurityGroup"] = ipf.NetworkSecurityGroup
13971	}
13972	if ipf.IPConfigurations != nil {
13973		objectMap["ipConfigurations"] = ipf.IPConfigurations
13974	}
13975	if ipf.TapConfigurations != nil {
13976		objectMap["tapConfigurations"] = ipf.TapConfigurations
13977	}
13978	if ipf.DNSSettings != nil {
13979		objectMap["dnsSettings"] = ipf.DNSSettings
13980	}
13981	if ipf.MacAddress != nil {
13982		objectMap["macAddress"] = ipf.MacAddress
13983	}
13984	if ipf.Primary != nil {
13985		objectMap["primary"] = ipf.Primary
13986	}
13987	if ipf.EnableAcceleratedNetworking != nil {
13988		objectMap["enableAcceleratedNetworking"] = ipf.EnableAcceleratedNetworking
13989	}
13990	if ipf.EnableIPForwarding != nil {
13991		objectMap["enableIPForwarding"] = ipf.EnableIPForwarding
13992	}
13993	if ipf.ResourceGUID != nil {
13994		objectMap["resourceGuid"] = ipf.ResourceGUID
13995	}
13996	if ipf.ProvisioningState != nil {
13997		objectMap["provisioningState"] = ipf.ProvisioningState
13998	}
13999	return json.Marshal(objectMap)
14000}
14001
14002// InterfacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
14003// long-running operation.
14004type InterfacesCreateOrUpdateFuture struct {
14005	azure.FutureAPI
14006	// Result returns the result of the asynchronous operation.
14007	// If the operation has not completed it will return an error.
14008	Result func(InterfacesClient) (Interface, error)
14009}
14010
14011// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14012func (future *InterfacesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
14013	var azFuture azure.Future
14014	if err := json.Unmarshal(body, &azFuture); err != nil {
14015		return err
14016	}
14017	future.FutureAPI = &azFuture
14018	future.Result = future.result
14019	return nil
14020}
14021
14022// result is the default implementation for InterfacesCreateOrUpdateFuture.Result.
14023func (future *InterfacesCreateOrUpdateFuture) result(client InterfacesClient) (i Interface, err error) {
14024	var done bool
14025	done, err = future.DoneWithContext(context.Background(), client)
14026	if err != nil {
14027		err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
14028		return
14029	}
14030	if !done {
14031		i.Response.Response = future.Response()
14032		err = azure.NewAsyncOpIncompleteError("network.InterfacesCreateOrUpdateFuture")
14033		return
14034	}
14035	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
14036	if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
14037		i, err = client.CreateOrUpdateResponder(i.Response.Response)
14038		if err != nil {
14039			err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", i.Response.Response, "Failure responding to request")
14040		}
14041	}
14042	return
14043}
14044
14045// InterfacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
14046// operation.
14047type InterfacesDeleteFuture struct {
14048	azure.FutureAPI
14049	// Result returns the result of the asynchronous operation.
14050	// If the operation has not completed it will return an error.
14051	Result func(InterfacesClient) (autorest.Response, error)
14052}
14053
14054// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14055func (future *InterfacesDeleteFuture) UnmarshalJSON(body []byte) error {
14056	var azFuture azure.Future
14057	if err := json.Unmarshal(body, &azFuture); err != nil {
14058		return err
14059	}
14060	future.FutureAPI = &azFuture
14061	future.Result = future.result
14062	return nil
14063}
14064
14065// result is the default implementation for InterfacesDeleteFuture.Result.
14066func (future *InterfacesDeleteFuture) result(client InterfacesClient) (ar autorest.Response, err error) {
14067	var done bool
14068	done, err = future.DoneWithContext(context.Background(), client)
14069	if err != nil {
14070		err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", future.Response(), "Polling failure")
14071		return
14072	}
14073	if !done {
14074		ar.Response = future.Response()
14075		err = azure.NewAsyncOpIncompleteError("network.InterfacesDeleteFuture")
14076		return
14077	}
14078	ar.Response = future.Response()
14079	return
14080}
14081
14082// InterfacesGetEffectiveRouteTableFuture an abstraction for monitoring and retrieving the results of a
14083// long-running operation.
14084type InterfacesGetEffectiveRouteTableFuture struct {
14085	azure.FutureAPI
14086	// Result returns the result of the asynchronous operation.
14087	// If the operation has not completed it will return an error.
14088	Result func(InterfacesClient) (EffectiveRouteListResult, error)
14089}
14090
14091// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14092func (future *InterfacesGetEffectiveRouteTableFuture) UnmarshalJSON(body []byte) error {
14093	var azFuture azure.Future
14094	if err := json.Unmarshal(body, &azFuture); err != nil {
14095		return err
14096	}
14097	future.FutureAPI = &azFuture
14098	future.Result = future.result
14099	return nil
14100}
14101
14102// result is the default implementation for InterfacesGetEffectiveRouteTableFuture.Result.
14103func (future *InterfacesGetEffectiveRouteTableFuture) result(client InterfacesClient) (erlr EffectiveRouteListResult, err error) {
14104	var done bool
14105	done, err = future.DoneWithContext(context.Background(), client)
14106	if err != nil {
14107		err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", future.Response(), "Polling failure")
14108		return
14109	}
14110	if !done {
14111		erlr.Response.Response = future.Response()
14112		err = azure.NewAsyncOpIncompleteError("network.InterfacesGetEffectiveRouteTableFuture")
14113		return
14114	}
14115	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
14116	if erlr.Response.Response, err = future.GetResult(sender); err == nil && erlr.Response.Response.StatusCode != http.StatusNoContent {
14117		erlr, err = client.GetEffectiveRouteTableResponder(erlr.Response.Response)
14118		if err != nil {
14119			err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", erlr.Response.Response, "Failure responding to request")
14120		}
14121	}
14122	return
14123}
14124
14125// InterfacesListEffectiveNetworkSecurityGroupsFuture an abstraction for monitoring and retrieving the
14126// results of a long-running operation.
14127type InterfacesListEffectiveNetworkSecurityGroupsFuture struct {
14128	azure.FutureAPI
14129	// Result returns the result of the asynchronous operation.
14130	// If the operation has not completed it will return an error.
14131	Result func(InterfacesClient) (EffectiveNetworkSecurityGroupListResult, error)
14132}
14133
14134// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14135func (future *InterfacesListEffectiveNetworkSecurityGroupsFuture) UnmarshalJSON(body []byte) error {
14136	var azFuture azure.Future
14137	if err := json.Unmarshal(body, &azFuture); err != nil {
14138		return err
14139	}
14140	future.FutureAPI = &azFuture
14141	future.Result = future.result
14142	return nil
14143}
14144
14145// result is the default implementation for InterfacesListEffectiveNetworkSecurityGroupsFuture.Result.
14146func (future *InterfacesListEffectiveNetworkSecurityGroupsFuture) result(client InterfacesClient) (ensglr EffectiveNetworkSecurityGroupListResult, err error) {
14147	var done bool
14148	done, err = future.DoneWithContext(context.Background(), client)
14149	if err != nil {
14150		err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", future.Response(), "Polling failure")
14151		return
14152	}
14153	if !done {
14154		ensglr.Response.Response = future.Response()
14155		err = azure.NewAsyncOpIncompleteError("network.InterfacesListEffectiveNetworkSecurityGroupsFuture")
14156		return
14157	}
14158	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
14159	if ensglr.Response.Response, err = future.GetResult(sender); err == nil && ensglr.Response.Response.StatusCode != http.StatusNoContent {
14160		ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(ensglr.Response.Response)
14161		if err != nil {
14162			err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", ensglr.Response.Response, "Failure responding to request")
14163		}
14164	}
14165	return
14166}
14167
14168// InterfacesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
14169// operation.
14170type InterfacesUpdateTagsFuture struct {
14171	azure.FutureAPI
14172	// Result returns the result of the asynchronous operation.
14173	// If the operation has not completed it will return an error.
14174	Result func(InterfacesClient) (Interface, error)
14175}
14176
14177// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14178func (future *InterfacesUpdateTagsFuture) UnmarshalJSON(body []byte) error {
14179	var azFuture azure.Future
14180	if err := json.Unmarshal(body, &azFuture); err != nil {
14181		return err
14182	}
14183	future.FutureAPI = &azFuture
14184	future.Result = future.result
14185	return nil
14186}
14187
14188// result is the default implementation for InterfacesUpdateTagsFuture.Result.
14189func (future *InterfacesUpdateTagsFuture) result(client InterfacesClient) (i Interface, err error) {
14190	var done bool
14191	done, err = future.DoneWithContext(context.Background(), client)
14192	if err != nil {
14193		err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
14194		return
14195	}
14196	if !done {
14197		i.Response.Response = future.Response()
14198		err = azure.NewAsyncOpIncompleteError("network.InterfacesUpdateTagsFuture")
14199		return
14200	}
14201	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
14202	if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
14203		i, err = client.UpdateTagsResponder(i.Response.Response)
14204		if err != nil {
14205			err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", i.Response.Response, "Failure responding to request")
14206		}
14207	}
14208	return
14209}
14210
14211// InterfaceTapConfiguration tap configuration in a Network Interface
14212type InterfaceTapConfiguration struct {
14213	autorest.Response `json:"-"`
14214	// InterfaceTapConfigurationPropertiesFormat - Properties of the Virtual Network Tap configuration
14215	*InterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"`
14216	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
14217	Name *string `json:"name,omitempty"`
14218	// Etag - A unique read-only string that changes whenever the resource is updated.
14219	Etag *string `json:"etag,omitempty"`
14220	// Type - READ-ONLY; Sub Resource type.
14221	Type *string `json:"type,omitempty"`
14222	// ID - Resource ID.
14223	ID *string `json:"id,omitempty"`
14224}
14225
14226// MarshalJSON is the custom marshaler for InterfaceTapConfiguration.
14227func (itc InterfaceTapConfiguration) MarshalJSON() ([]byte, error) {
14228	objectMap := make(map[string]interface{})
14229	if itc.InterfaceTapConfigurationPropertiesFormat != nil {
14230		objectMap["properties"] = itc.InterfaceTapConfigurationPropertiesFormat
14231	}
14232	if itc.Name != nil {
14233		objectMap["name"] = itc.Name
14234	}
14235	if itc.Etag != nil {
14236		objectMap["etag"] = itc.Etag
14237	}
14238	if itc.ID != nil {
14239		objectMap["id"] = itc.ID
14240	}
14241	return json.Marshal(objectMap)
14242}
14243
14244// UnmarshalJSON is the custom unmarshaler for InterfaceTapConfiguration struct.
14245func (itc *InterfaceTapConfiguration) UnmarshalJSON(body []byte) error {
14246	var m map[string]*json.RawMessage
14247	err := json.Unmarshal(body, &m)
14248	if err != nil {
14249		return err
14250	}
14251	for k, v := range m {
14252		switch k {
14253		case "properties":
14254			if v != nil {
14255				var interfaceTapConfigurationPropertiesFormat InterfaceTapConfigurationPropertiesFormat
14256				err = json.Unmarshal(*v, &interfaceTapConfigurationPropertiesFormat)
14257				if err != nil {
14258					return err
14259				}
14260				itc.InterfaceTapConfigurationPropertiesFormat = &interfaceTapConfigurationPropertiesFormat
14261			}
14262		case "name":
14263			if v != nil {
14264				var name string
14265				err = json.Unmarshal(*v, &name)
14266				if err != nil {
14267					return err
14268				}
14269				itc.Name = &name
14270			}
14271		case "etag":
14272			if v != nil {
14273				var etag string
14274				err = json.Unmarshal(*v, &etag)
14275				if err != nil {
14276					return err
14277				}
14278				itc.Etag = &etag
14279			}
14280		case "type":
14281			if v != nil {
14282				var typeVar string
14283				err = json.Unmarshal(*v, &typeVar)
14284				if err != nil {
14285					return err
14286				}
14287				itc.Type = &typeVar
14288			}
14289		case "id":
14290			if v != nil {
14291				var ID string
14292				err = json.Unmarshal(*v, &ID)
14293				if err != nil {
14294					return err
14295				}
14296				itc.ID = &ID
14297			}
14298		}
14299	}
14300
14301	return nil
14302}
14303
14304// InterfaceTapConfigurationListResult response for list tap configurations API service call.
14305type InterfaceTapConfigurationListResult struct {
14306	autorest.Response `json:"-"`
14307	// Value - A list of tap configurations.
14308	Value *[]InterfaceTapConfiguration `json:"value,omitempty"`
14309	// NextLink - READ-ONLY; The URL to get the next set of results.
14310	NextLink *string `json:"nextLink,omitempty"`
14311}
14312
14313// MarshalJSON is the custom marshaler for InterfaceTapConfigurationListResult.
14314func (itclr InterfaceTapConfigurationListResult) MarshalJSON() ([]byte, error) {
14315	objectMap := make(map[string]interface{})
14316	if itclr.Value != nil {
14317		objectMap["value"] = itclr.Value
14318	}
14319	return json.Marshal(objectMap)
14320}
14321
14322// InterfaceTapConfigurationListResultIterator provides access to a complete listing of
14323// InterfaceTapConfiguration values.
14324type InterfaceTapConfigurationListResultIterator struct {
14325	i    int
14326	page InterfaceTapConfigurationListResultPage
14327}
14328
14329// NextWithContext advances to the next value.  If there was an error making
14330// the request the iterator does not advance and the error is returned.
14331func (iter *InterfaceTapConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
14332	if tracing.IsEnabled() {
14333		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationListResultIterator.NextWithContext")
14334		defer func() {
14335			sc := -1
14336			if iter.Response().Response.Response != nil {
14337				sc = iter.Response().Response.Response.StatusCode
14338			}
14339			tracing.EndSpan(ctx, sc, err)
14340		}()
14341	}
14342	iter.i++
14343	if iter.i < len(iter.page.Values()) {
14344		return nil
14345	}
14346	err = iter.page.NextWithContext(ctx)
14347	if err != nil {
14348		iter.i--
14349		return err
14350	}
14351	iter.i = 0
14352	return nil
14353}
14354
14355// Next advances to the next value.  If there was an error making
14356// the request the iterator does not advance and the error is returned.
14357// Deprecated: Use NextWithContext() instead.
14358func (iter *InterfaceTapConfigurationListResultIterator) Next() error {
14359	return iter.NextWithContext(context.Background())
14360}
14361
14362// NotDone returns true if the enumeration should be started or is not yet complete.
14363func (iter InterfaceTapConfigurationListResultIterator) NotDone() bool {
14364	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14365}
14366
14367// Response returns the raw server response from the last page request.
14368func (iter InterfaceTapConfigurationListResultIterator) Response() InterfaceTapConfigurationListResult {
14369	return iter.page.Response()
14370}
14371
14372// Value returns the current value or a zero-initialized value if the
14373// iterator has advanced beyond the end of the collection.
14374func (iter InterfaceTapConfigurationListResultIterator) Value() InterfaceTapConfiguration {
14375	if !iter.page.NotDone() {
14376		return InterfaceTapConfiguration{}
14377	}
14378	return iter.page.Values()[iter.i]
14379}
14380
14381// Creates a new instance of the InterfaceTapConfigurationListResultIterator type.
14382func NewInterfaceTapConfigurationListResultIterator(page InterfaceTapConfigurationListResultPage) InterfaceTapConfigurationListResultIterator {
14383	return InterfaceTapConfigurationListResultIterator{page: page}
14384}
14385
14386// IsEmpty returns true if the ListResult contains no values.
14387func (itclr InterfaceTapConfigurationListResult) IsEmpty() bool {
14388	return itclr.Value == nil || len(*itclr.Value) == 0
14389}
14390
14391// hasNextLink returns true if the NextLink is not empty.
14392func (itclr InterfaceTapConfigurationListResult) hasNextLink() bool {
14393	return itclr.NextLink != nil && len(*itclr.NextLink) != 0
14394}
14395
14396// interfaceTapConfigurationListResultPreparer prepares a request to retrieve the next set of results.
14397// It returns nil if no more results exist.
14398func (itclr InterfaceTapConfigurationListResult) interfaceTapConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
14399	if !itclr.hasNextLink() {
14400		return nil, nil
14401	}
14402	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14403		autorest.AsJSON(),
14404		autorest.AsGet(),
14405		autorest.WithBaseURL(to.String(itclr.NextLink)))
14406}
14407
14408// InterfaceTapConfigurationListResultPage contains a page of InterfaceTapConfiguration values.
14409type InterfaceTapConfigurationListResultPage struct {
14410	fn    func(context.Context, InterfaceTapConfigurationListResult) (InterfaceTapConfigurationListResult, error)
14411	itclr InterfaceTapConfigurationListResult
14412}
14413
14414// NextWithContext advances to the next page of values.  If there was an error making
14415// the request the page does not advance and the error is returned.
14416func (page *InterfaceTapConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
14417	if tracing.IsEnabled() {
14418		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationListResultPage.NextWithContext")
14419		defer func() {
14420			sc := -1
14421			if page.Response().Response.Response != nil {
14422				sc = page.Response().Response.Response.StatusCode
14423			}
14424			tracing.EndSpan(ctx, sc, err)
14425		}()
14426	}
14427	for {
14428		next, err := page.fn(ctx, page.itclr)
14429		if err != nil {
14430			return err
14431		}
14432		page.itclr = next
14433		if !next.hasNextLink() || !next.IsEmpty() {
14434			break
14435		}
14436	}
14437	return nil
14438}
14439
14440// Next advances to the next page of values.  If there was an error making
14441// the request the page does not advance and the error is returned.
14442// Deprecated: Use NextWithContext() instead.
14443func (page *InterfaceTapConfigurationListResultPage) Next() error {
14444	return page.NextWithContext(context.Background())
14445}
14446
14447// NotDone returns true if the page enumeration should be started or is not yet complete.
14448func (page InterfaceTapConfigurationListResultPage) NotDone() bool {
14449	return !page.itclr.IsEmpty()
14450}
14451
14452// Response returns the raw server response from the last page request.
14453func (page InterfaceTapConfigurationListResultPage) Response() InterfaceTapConfigurationListResult {
14454	return page.itclr
14455}
14456
14457// Values returns the slice of values for the current page or nil if there are no values.
14458func (page InterfaceTapConfigurationListResultPage) Values() []InterfaceTapConfiguration {
14459	if page.itclr.IsEmpty() {
14460		return nil
14461	}
14462	return *page.itclr.Value
14463}
14464
14465// Creates a new instance of the InterfaceTapConfigurationListResultPage type.
14466func NewInterfaceTapConfigurationListResultPage(cur InterfaceTapConfigurationListResult, getNextPage func(context.Context, InterfaceTapConfigurationListResult) (InterfaceTapConfigurationListResult, error)) InterfaceTapConfigurationListResultPage {
14467	return InterfaceTapConfigurationListResultPage{
14468		fn:    getNextPage,
14469		itclr: cur,
14470	}
14471}
14472
14473// InterfaceTapConfigurationPropertiesFormat properties of Virtual Network Tap configuration.
14474type InterfaceTapConfigurationPropertiesFormat struct {
14475	// VirtualNetworkTap - The reference of the Virtual Network Tap resource.
14476	VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"`
14477	// ProvisioningState - READ-ONLY; The provisioning state of the network interface tap configuration. Possible values are: 'Updating', 'Deleting', and 'Failed'.
14478	ProvisioningState *string `json:"provisioningState,omitempty"`
14479}
14480
14481// MarshalJSON is the custom marshaler for InterfaceTapConfigurationPropertiesFormat.
14482func (itcpf InterfaceTapConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
14483	objectMap := make(map[string]interface{})
14484	if itcpf.VirtualNetworkTap != nil {
14485		objectMap["virtualNetworkTap"] = itcpf.VirtualNetworkTap
14486	}
14487	return json.Marshal(objectMap)
14488}
14489
14490// InterfaceTapConfigurationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
14491// of a long-running operation.
14492type InterfaceTapConfigurationsCreateOrUpdateFuture struct {
14493	azure.FutureAPI
14494	// Result returns the result of the asynchronous operation.
14495	// If the operation has not completed it will return an error.
14496	Result func(InterfaceTapConfigurationsClient) (InterfaceTapConfiguration, error)
14497}
14498
14499// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14500func (future *InterfaceTapConfigurationsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
14501	var azFuture azure.Future
14502	if err := json.Unmarshal(body, &azFuture); err != nil {
14503		return err
14504	}
14505	future.FutureAPI = &azFuture
14506	future.Result = future.result
14507	return nil
14508}
14509
14510// result is the default implementation for InterfaceTapConfigurationsCreateOrUpdateFuture.Result.
14511func (future *InterfaceTapConfigurationsCreateOrUpdateFuture) result(client InterfaceTapConfigurationsClient) (itc InterfaceTapConfiguration, err error) {
14512	var done bool
14513	done, err = future.DoneWithContext(context.Background(), client)
14514	if err != nil {
14515		err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
14516		return
14517	}
14518	if !done {
14519		itc.Response.Response = future.Response()
14520		err = azure.NewAsyncOpIncompleteError("network.InterfaceTapConfigurationsCreateOrUpdateFuture")
14521		return
14522	}
14523	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
14524	if itc.Response.Response, err = future.GetResult(sender); err == nil && itc.Response.Response.StatusCode != http.StatusNoContent {
14525		itc, err = client.CreateOrUpdateResponder(itc.Response.Response)
14526		if err != nil {
14527			err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsCreateOrUpdateFuture", "Result", itc.Response.Response, "Failure responding to request")
14528		}
14529	}
14530	return
14531}
14532
14533// InterfaceTapConfigurationsDeleteFuture an abstraction for monitoring and retrieving the results of a
14534// long-running operation.
14535type InterfaceTapConfigurationsDeleteFuture struct {
14536	azure.FutureAPI
14537	// Result returns the result of the asynchronous operation.
14538	// If the operation has not completed it will return an error.
14539	Result func(InterfaceTapConfigurationsClient) (autorest.Response, error)
14540}
14541
14542// UnmarshalJSON is the custom unmarshaller for CreateFuture.
14543func (future *InterfaceTapConfigurationsDeleteFuture) UnmarshalJSON(body []byte) error {
14544	var azFuture azure.Future
14545	if err := json.Unmarshal(body, &azFuture); err != nil {
14546		return err
14547	}
14548	future.FutureAPI = &azFuture
14549	future.Result = future.result
14550	return nil
14551}
14552
14553// result is the default implementation for InterfaceTapConfigurationsDeleteFuture.Result.
14554func (future *InterfaceTapConfigurationsDeleteFuture) result(client InterfaceTapConfigurationsClient) (ar autorest.Response, err error) {
14555	var done bool
14556	done, err = future.DoneWithContext(context.Background(), client)
14557	if err != nil {
14558		err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsDeleteFuture", "Result", future.Response(), "Polling failure")
14559		return
14560	}
14561	if !done {
14562		ar.Response = future.Response()
14563		err = azure.NewAsyncOpIncompleteError("network.InterfaceTapConfigurationsDeleteFuture")
14564		return
14565	}
14566	ar.Response = future.Response()
14567	return
14568}
14569
14570// IPAddressAvailabilityResult response for CheckIPAddressAvailability API service call
14571type IPAddressAvailabilityResult struct {
14572	autorest.Response `json:"-"`
14573	// Available - Private IP address availability.
14574	Available *bool `json:"available,omitempty"`
14575	// AvailableIPAddresses - Contains other available private IP addresses if the asked for address is taken.
14576	AvailableIPAddresses *[]string `json:"availableIPAddresses,omitempty"`
14577}
14578
14579// IPConfiguration IP configuration
14580type IPConfiguration struct {
14581	// IPConfigurationPropertiesFormat - Properties of the IP configuration
14582	*IPConfigurationPropertiesFormat `json:"properties,omitempty"`
14583	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
14584	Name *string `json:"name,omitempty"`
14585	// Etag - A unique read-only string that changes whenever the resource is updated.
14586	Etag *string `json:"etag,omitempty"`
14587	// ID - Resource ID.
14588	ID *string `json:"id,omitempty"`
14589}
14590
14591// MarshalJSON is the custom marshaler for IPConfiguration.
14592func (ic IPConfiguration) MarshalJSON() ([]byte, error) {
14593	objectMap := make(map[string]interface{})
14594	if ic.IPConfigurationPropertiesFormat != nil {
14595		objectMap["properties"] = ic.IPConfigurationPropertiesFormat
14596	}
14597	if ic.Name != nil {
14598		objectMap["name"] = ic.Name
14599	}
14600	if ic.Etag != nil {
14601		objectMap["etag"] = ic.Etag
14602	}
14603	if ic.ID != nil {
14604		objectMap["id"] = ic.ID
14605	}
14606	return json.Marshal(objectMap)
14607}
14608
14609// UnmarshalJSON is the custom unmarshaler for IPConfiguration struct.
14610func (ic *IPConfiguration) UnmarshalJSON(body []byte) error {
14611	var m map[string]*json.RawMessage
14612	err := json.Unmarshal(body, &m)
14613	if err != nil {
14614		return err
14615	}
14616	for k, v := range m {
14617		switch k {
14618		case "properties":
14619			if v != nil {
14620				var IPConfigurationPropertiesFormat IPConfigurationPropertiesFormat
14621				err = json.Unmarshal(*v, &IPConfigurationPropertiesFormat)
14622				if err != nil {
14623					return err
14624				}
14625				ic.IPConfigurationPropertiesFormat = &IPConfigurationPropertiesFormat
14626			}
14627		case "name":
14628			if v != nil {
14629				var name string
14630				err = json.Unmarshal(*v, &name)
14631				if err != nil {
14632					return err
14633				}
14634				ic.Name = &name
14635			}
14636		case "etag":
14637			if v != nil {
14638				var etag string
14639				err = json.Unmarshal(*v, &etag)
14640				if err != nil {
14641					return err
14642				}
14643				ic.Etag = &etag
14644			}
14645		case "id":
14646			if v != nil {
14647				var ID string
14648				err = json.Unmarshal(*v, &ID)
14649				if err != nil {
14650					return err
14651				}
14652				ic.ID = &ID
14653			}
14654		}
14655	}
14656
14657	return nil
14658}
14659
14660// IPConfigurationProfile IP configuration profile child resource.
14661type IPConfigurationProfile struct {
14662	// IPConfigurationProfilePropertiesFormat - Properties of the IP configuration profile.
14663	*IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"`
14664	// Name - The name of the resource. This name can be used to access the resource.
14665	Name *string `json:"name,omitempty"`
14666	// Type - READ-ONLY; Sub Resource type.
14667	Type *string `json:"type,omitempty"`
14668	// Etag - A unique read-only string that changes whenever the resource is updated.
14669	Etag *string `json:"etag,omitempty"`
14670	// ID - Resource ID.
14671	ID *string `json:"id,omitempty"`
14672}
14673
14674// MarshalJSON is the custom marshaler for IPConfigurationProfile.
14675func (icp IPConfigurationProfile) MarshalJSON() ([]byte, error) {
14676	objectMap := make(map[string]interface{})
14677	if icp.IPConfigurationProfilePropertiesFormat != nil {
14678		objectMap["properties"] = icp.IPConfigurationProfilePropertiesFormat
14679	}
14680	if icp.Name != nil {
14681		objectMap["name"] = icp.Name
14682	}
14683	if icp.Etag != nil {
14684		objectMap["etag"] = icp.Etag
14685	}
14686	if icp.ID != nil {
14687		objectMap["id"] = icp.ID
14688	}
14689	return json.Marshal(objectMap)
14690}
14691
14692// UnmarshalJSON is the custom unmarshaler for IPConfigurationProfile struct.
14693func (icp *IPConfigurationProfile) UnmarshalJSON(body []byte) error {
14694	var m map[string]*json.RawMessage
14695	err := json.Unmarshal(body, &m)
14696	if err != nil {
14697		return err
14698	}
14699	for k, v := range m {
14700		switch k {
14701		case "properties":
14702			if v != nil {
14703				var IPConfigurationProfilePropertiesFormat IPConfigurationProfilePropertiesFormat
14704				err = json.Unmarshal(*v, &IPConfigurationProfilePropertiesFormat)
14705				if err != nil {
14706					return err
14707				}
14708				icp.IPConfigurationProfilePropertiesFormat = &IPConfigurationProfilePropertiesFormat
14709			}
14710		case "name":
14711			if v != nil {
14712				var name string
14713				err = json.Unmarshal(*v, &name)
14714				if err != nil {
14715					return err
14716				}
14717				icp.Name = &name
14718			}
14719		case "type":
14720			if v != nil {
14721				var typeVar string
14722				err = json.Unmarshal(*v, &typeVar)
14723				if err != nil {
14724					return err
14725				}
14726				icp.Type = &typeVar
14727			}
14728		case "etag":
14729			if v != nil {
14730				var etag string
14731				err = json.Unmarshal(*v, &etag)
14732				if err != nil {
14733					return err
14734				}
14735				icp.Etag = &etag
14736			}
14737		case "id":
14738			if v != nil {
14739				var ID string
14740				err = json.Unmarshal(*v, &ID)
14741				if err != nil {
14742					return err
14743				}
14744				icp.ID = &ID
14745			}
14746		}
14747	}
14748
14749	return nil
14750}
14751
14752// IPConfigurationProfilePropertiesFormat IP configuration profile properties.
14753type IPConfigurationProfilePropertiesFormat struct {
14754	// Subnet - The reference of the subnet resource to create a container network interface ip configuration.
14755	Subnet *Subnet `json:"subnet,omitempty"`
14756	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
14757	ProvisioningState *string `json:"provisioningState,omitempty"`
14758}
14759
14760// MarshalJSON is the custom marshaler for IPConfigurationProfilePropertiesFormat.
14761func (icppf IPConfigurationProfilePropertiesFormat) MarshalJSON() ([]byte, error) {
14762	objectMap := make(map[string]interface{})
14763	if icppf.Subnet != nil {
14764		objectMap["subnet"] = icppf.Subnet
14765	}
14766	return json.Marshal(objectMap)
14767}
14768
14769// IPConfigurationPropertiesFormat properties of IP configuration.
14770type IPConfigurationPropertiesFormat struct {
14771	// PrivateIPAddress - The private IP address of the IP configuration.
14772	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
14773	// PrivateIPAllocationMethod - The private IP allocation method. Possible values are 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
14774	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
14775	// Subnet - The reference of the subnet resource.
14776	Subnet *Subnet `json:"subnet,omitempty"`
14777	// PublicIPAddress - The reference of the public IP resource.
14778	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
14779	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
14780	ProvisioningState *string `json:"provisioningState,omitempty"`
14781}
14782
14783// IpsecPolicy an IPSec Policy configuration for a virtual network gateway connection
14784type IpsecPolicy struct {
14785	// SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for a site to site VPN tunnel.
14786	SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"`
14787	// SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for a site to site VPN tunnel.
14788	SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"`
14789	// IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256'
14790	IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"`
14791	// IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256'
14792	IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"`
14793	// IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128'
14794	IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"`
14795	// IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'IkeIntegrityMD5', 'IkeIntegritySHA1', 'IkeIntegritySHA256', 'IkeIntegritySHA384', 'IkeIntegrityGCMAES256', 'IkeIntegrityGCMAES128'
14796	IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"`
14797	// DhGroup - The DH Groups used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24'
14798	DhGroup DhGroup `json:"dhGroup,omitempty"`
14799	// PfsGroup - The Pfs Groups used in IKE Phase 2 for new child SA. Possible values include: 'PfsGroupNone', 'PfsGroupPFS1', 'PfsGroupPFS2', 'PfsGroupPFS2048', 'PfsGroupECP256', 'PfsGroupECP384', 'PfsGroupPFS24', 'PfsGroupPFS14', 'PfsGroupPFSMM'
14800	PfsGroup PfsGroup `json:"pfsGroup,omitempty"`
14801}
14802
14803// IPTag contains the IpTag associated with the object
14804type IPTag struct {
14805	// IPTagType - Gets or sets the ipTag type: Example FirstPartyUsage.
14806	IPTagType *string `json:"ipTagType,omitempty"`
14807	// Tag - Gets or sets value of the IpTag associated with the public IP. Example SQL, Storage etc
14808	Tag *string `json:"tag,omitempty"`
14809}
14810
14811// Ipv6ExpressRouteCircuitPeeringConfig contains IPv6 peering config.
14812type Ipv6ExpressRouteCircuitPeeringConfig struct {
14813	// PrimaryPeerAddressPrefix - The primary address prefix.
14814	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
14815	// SecondaryPeerAddressPrefix - The secondary address prefix.
14816	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
14817	// MicrosoftPeeringConfig - The Microsoft peering configuration.
14818	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
14819	// RouteFilter - The reference of the RouteFilter resource.
14820	RouteFilter *RouteFilter `json:"routeFilter,omitempty"`
14821	// State - The state of peering. Possible values are: 'Disabled' and 'Enabled'. Possible values include: 'ExpressRouteCircuitPeeringStateDisabled', 'ExpressRouteCircuitPeeringStateEnabled'
14822	State ExpressRouteCircuitPeeringState `json:"state,omitempty"`
14823}
14824
14825// ListHubVirtualNetworkConnectionsResult list of HubVirtualNetworkConnections and a URL nextLink to get
14826// the next set of results.
14827type ListHubVirtualNetworkConnectionsResult struct {
14828	autorest.Response `json:"-"`
14829	// Value - List of HubVirtualNetworkConnections.
14830	Value *[]HubVirtualNetworkConnection `json:"value,omitempty"`
14831	// NextLink - URL to get the next set of operation list results if there are any.
14832	NextLink *string `json:"nextLink,omitempty"`
14833}
14834
14835// ListHubVirtualNetworkConnectionsResultIterator provides access to a complete listing of
14836// HubVirtualNetworkConnection values.
14837type ListHubVirtualNetworkConnectionsResultIterator struct {
14838	i    int
14839	page ListHubVirtualNetworkConnectionsResultPage
14840}
14841
14842// NextWithContext advances to the next value.  If there was an error making
14843// the request the iterator does not advance and the error is returned.
14844func (iter *ListHubVirtualNetworkConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
14845	if tracing.IsEnabled() {
14846		ctx = tracing.StartSpan(ctx, fqdn+"/ListHubVirtualNetworkConnectionsResultIterator.NextWithContext")
14847		defer func() {
14848			sc := -1
14849			if iter.Response().Response.Response != nil {
14850				sc = iter.Response().Response.Response.StatusCode
14851			}
14852			tracing.EndSpan(ctx, sc, err)
14853		}()
14854	}
14855	iter.i++
14856	if iter.i < len(iter.page.Values()) {
14857		return nil
14858	}
14859	err = iter.page.NextWithContext(ctx)
14860	if err != nil {
14861		iter.i--
14862		return err
14863	}
14864	iter.i = 0
14865	return nil
14866}
14867
14868// Next advances to the next value.  If there was an error making
14869// the request the iterator does not advance and the error is returned.
14870// Deprecated: Use NextWithContext() instead.
14871func (iter *ListHubVirtualNetworkConnectionsResultIterator) Next() error {
14872	return iter.NextWithContext(context.Background())
14873}
14874
14875// NotDone returns true if the enumeration should be started or is not yet complete.
14876func (iter ListHubVirtualNetworkConnectionsResultIterator) NotDone() bool {
14877	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14878}
14879
14880// Response returns the raw server response from the last page request.
14881func (iter ListHubVirtualNetworkConnectionsResultIterator) Response() ListHubVirtualNetworkConnectionsResult {
14882	return iter.page.Response()
14883}
14884
14885// Value returns the current value or a zero-initialized value if the
14886// iterator has advanced beyond the end of the collection.
14887func (iter ListHubVirtualNetworkConnectionsResultIterator) Value() HubVirtualNetworkConnection {
14888	if !iter.page.NotDone() {
14889		return HubVirtualNetworkConnection{}
14890	}
14891	return iter.page.Values()[iter.i]
14892}
14893
14894// Creates a new instance of the ListHubVirtualNetworkConnectionsResultIterator type.
14895func NewListHubVirtualNetworkConnectionsResultIterator(page ListHubVirtualNetworkConnectionsResultPage) ListHubVirtualNetworkConnectionsResultIterator {
14896	return ListHubVirtualNetworkConnectionsResultIterator{page: page}
14897}
14898
14899// IsEmpty returns true if the ListResult contains no values.
14900func (lhvncr ListHubVirtualNetworkConnectionsResult) IsEmpty() bool {
14901	return lhvncr.Value == nil || len(*lhvncr.Value) == 0
14902}
14903
14904// hasNextLink returns true if the NextLink is not empty.
14905func (lhvncr ListHubVirtualNetworkConnectionsResult) hasNextLink() bool {
14906	return lhvncr.NextLink != nil && len(*lhvncr.NextLink) != 0
14907}
14908
14909// listHubVirtualNetworkConnectionsResultPreparer prepares a request to retrieve the next set of results.
14910// It returns nil if no more results exist.
14911func (lhvncr ListHubVirtualNetworkConnectionsResult) listHubVirtualNetworkConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
14912	if !lhvncr.hasNextLink() {
14913		return nil, nil
14914	}
14915	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14916		autorest.AsJSON(),
14917		autorest.AsGet(),
14918		autorest.WithBaseURL(to.String(lhvncr.NextLink)))
14919}
14920
14921// ListHubVirtualNetworkConnectionsResultPage contains a page of HubVirtualNetworkConnection values.
14922type ListHubVirtualNetworkConnectionsResultPage struct {
14923	fn     func(context.Context, ListHubVirtualNetworkConnectionsResult) (ListHubVirtualNetworkConnectionsResult, error)
14924	lhvncr ListHubVirtualNetworkConnectionsResult
14925}
14926
14927// NextWithContext advances to the next page of values.  If there was an error making
14928// the request the page does not advance and the error is returned.
14929func (page *ListHubVirtualNetworkConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
14930	if tracing.IsEnabled() {
14931		ctx = tracing.StartSpan(ctx, fqdn+"/ListHubVirtualNetworkConnectionsResultPage.NextWithContext")
14932		defer func() {
14933			sc := -1
14934			if page.Response().Response.Response != nil {
14935				sc = page.Response().Response.Response.StatusCode
14936			}
14937			tracing.EndSpan(ctx, sc, err)
14938		}()
14939	}
14940	for {
14941		next, err := page.fn(ctx, page.lhvncr)
14942		if err != nil {
14943			return err
14944		}
14945		page.lhvncr = next
14946		if !next.hasNextLink() || !next.IsEmpty() {
14947			break
14948		}
14949	}
14950	return nil
14951}
14952
14953// Next advances to the next page of values.  If there was an error making
14954// the request the page does not advance and the error is returned.
14955// Deprecated: Use NextWithContext() instead.
14956func (page *ListHubVirtualNetworkConnectionsResultPage) Next() error {
14957	return page.NextWithContext(context.Background())
14958}
14959
14960// NotDone returns true if the page enumeration should be started or is not yet complete.
14961func (page ListHubVirtualNetworkConnectionsResultPage) NotDone() bool {
14962	return !page.lhvncr.IsEmpty()
14963}
14964
14965// Response returns the raw server response from the last page request.
14966func (page ListHubVirtualNetworkConnectionsResultPage) Response() ListHubVirtualNetworkConnectionsResult {
14967	return page.lhvncr
14968}
14969
14970// Values returns the slice of values for the current page or nil if there are no values.
14971func (page ListHubVirtualNetworkConnectionsResultPage) Values() []HubVirtualNetworkConnection {
14972	if page.lhvncr.IsEmpty() {
14973		return nil
14974	}
14975	return *page.lhvncr.Value
14976}
14977
14978// Creates a new instance of the ListHubVirtualNetworkConnectionsResultPage type.
14979func NewListHubVirtualNetworkConnectionsResultPage(cur ListHubVirtualNetworkConnectionsResult, getNextPage func(context.Context, ListHubVirtualNetworkConnectionsResult) (ListHubVirtualNetworkConnectionsResult, error)) ListHubVirtualNetworkConnectionsResultPage {
14980	return ListHubVirtualNetworkConnectionsResultPage{
14981		fn:     getNextPage,
14982		lhvncr: cur,
14983	}
14984}
14985
14986// ListP2SVpnGatewaysResult result of the request to list P2SVpnGateways. It contains a list of
14987// P2SVpnGateways and a URL nextLink to get the next set of results.
14988type ListP2SVpnGatewaysResult struct {
14989	autorest.Response `json:"-"`
14990	// Value - List of P2SVpnGateways.
14991	Value *[]P2SVpnGateway `json:"value,omitempty"`
14992	// NextLink - URL to get the next set of operation list results if there are any.
14993	NextLink *string `json:"nextLink,omitempty"`
14994}
14995
14996// ListP2SVpnGatewaysResultIterator provides access to a complete listing of P2SVpnGateway values.
14997type ListP2SVpnGatewaysResultIterator struct {
14998	i    int
14999	page ListP2SVpnGatewaysResultPage
15000}
15001
15002// NextWithContext advances to the next value.  If there was an error making
15003// the request the iterator does not advance and the error is returned.
15004func (iter *ListP2SVpnGatewaysResultIterator) NextWithContext(ctx context.Context) (err error) {
15005	if tracing.IsEnabled() {
15006		ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnGatewaysResultIterator.NextWithContext")
15007		defer func() {
15008			sc := -1
15009			if iter.Response().Response.Response != nil {
15010				sc = iter.Response().Response.Response.StatusCode
15011			}
15012			tracing.EndSpan(ctx, sc, err)
15013		}()
15014	}
15015	iter.i++
15016	if iter.i < len(iter.page.Values()) {
15017		return nil
15018	}
15019	err = iter.page.NextWithContext(ctx)
15020	if err != nil {
15021		iter.i--
15022		return err
15023	}
15024	iter.i = 0
15025	return nil
15026}
15027
15028// Next advances to the next value.  If there was an error making
15029// the request the iterator does not advance and the error is returned.
15030// Deprecated: Use NextWithContext() instead.
15031func (iter *ListP2SVpnGatewaysResultIterator) Next() error {
15032	return iter.NextWithContext(context.Background())
15033}
15034
15035// NotDone returns true if the enumeration should be started or is not yet complete.
15036func (iter ListP2SVpnGatewaysResultIterator) NotDone() bool {
15037	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15038}
15039
15040// Response returns the raw server response from the last page request.
15041func (iter ListP2SVpnGatewaysResultIterator) Response() ListP2SVpnGatewaysResult {
15042	return iter.page.Response()
15043}
15044
15045// Value returns the current value or a zero-initialized value if the
15046// iterator has advanced beyond the end of the collection.
15047func (iter ListP2SVpnGatewaysResultIterator) Value() P2SVpnGateway {
15048	if !iter.page.NotDone() {
15049		return P2SVpnGateway{}
15050	}
15051	return iter.page.Values()[iter.i]
15052}
15053
15054// Creates a new instance of the ListP2SVpnGatewaysResultIterator type.
15055func NewListP2SVpnGatewaysResultIterator(page ListP2SVpnGatewaysResultPage) ListP2SVpnGatewaysResultIterator {
15056	return ListP2SVpnGatewaysResultIterator{page: page}
15057}
15058
15059// IsEmpty returns true if the ListResult contains no values.
15060func (lpvgr ListP2SVpnGatewaysResult) IsEmpty() bool {
15061	return lpvgr.Value == nil || len(*lpvgr.Value) == 0
15062}
15063
15064// hasNextLink returns true if the NextLink is not empty.
15065func (lpvgr ListP2SVpnGatewaysResult) hasNextLink() bool {
15066	return lpvgr.NextLink != nil && len(*lpvgr.NextLink) != 0
15067}
15068
15069// listP2SVpnGatewaysResultPreparer prepares a request to retrieve the next set of results.
15070// It returns nil if no more results exist.
15071func (lpvgr ListP2SVpnGatewaysResult) listP2SVpnGatewaysResultPreparer(ctx context.Context) (*http.Request, error) {
15072	if !lpvgr.hasNextLink() {
15073		return nil, nil
15074	}
15075	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15076		autorest.AsJSON(),
15077		autorest.AsGet(),
15078		autorest.WithBaseURL(to.String(lpvgr.NextLink)))
15079}
15080
15081// ListP2SVpnGatewaysResultPage contains a page of P2SVpnGateway values.
15082type ListP2SVpnGatewaysResultPage struct {
15083	fn    func(context.Context, ListP2SVpnGatewaysResult) (ListP2SVpnGatewaysResult, error)
15084	lpvgr ListP2SVpnGatewaysResult
15085}
15086
15087// NextWithContext advances to the next page of values.  If there was an error making
15088// the request the page does not advance and the error is returned.
15089func (page *ListP2SVpnGatewaysResultPage) NextWithContext(ctx context.Context) (err error) {
15090	if tracing.IsEnabled() {
15091		ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnGatewaysResultPage.NextWithContext")
15092		defer func() {
15093			sc := -1
15094			if page.Response().Response.Response != nil {
15095				sc = page.Response().Response.Response.StatusCode
15096			}
15097			tracing.EndSpan(ctx, sc, err)
15098		}()
15099	}
15100	for {
15101		next, err := page.fn(ctx, page.lpvgr)
15102		if err != nil {
15103			return err
15104		}
15105		page.lpvgr = next
15106		if !next.hasNextLink() || !next.IsEmpty() {
15107			break
15108		}
15109	}
15110	return nil
15111}
15112
15113// Next advances to the next page of values.  If there was an error making
15114// the request the page does not advance and the error is returned.
15115// Deprecated: Use NextWithContext() instead.
15116func (page *ListP2SVpnGatewaysResultPage) Next() error {
15117	return page.NextWithContext(context.Background())
15118}
15119
15120// NotDone returns true if the page enumeration should be started or is not yet complete.
15121func (page ListP2SVpnGatewaysResultPage) NotDone() bool {
15122	return !page.lpvgr.IsEmpty()
15123}
15124
15125// Response returns the raw server response from the last page request.
15126func (page ListP2SVpnGatewaysResultPage) Response() ListP2SVpnGatewaysResult {
15127	return page.lpvgr
15128}
15129
15130// Values returns the slice of values for the current page or nil if there are no values.
15131func (page ListP2SVpnGatewaysResultPage) Values() []P2SVpnGateway {
15132	if page.lpvgr.IsEmpty() {
15133		return nil
15134	}
15135	return *page.lpvgr.Value
15136}
15137
15138// Creates a new instance of the ListP2SVpnGatewaysResultPage type.
15139func NewListP2SVpnGatewaysResultPage(cur ListP2SVpnGatewaysResult, getNextPage func(context.Context, ListP2SVpnGatewaysResult) (ListP2SVpnGatewaysResult, error)) ListP2SVpnGatewaysResultPage {
15140	return ListP2SVpnGatewaysResultPage{
15141		fn:    getNextPage,
15142		lpvgr: cur,
15143	}
15144}
15145
15146// ListP2SVpnServerConfigurationsResult result of the request to list all P2SVpnServerConfigurations
15147// associated to a VirtualWan. It contains a list of P2SVpnServerConfigurations and a URL nextLink to get
15148// the next set of results.
15149type ListP2SVpnServerConfigurationsResult struct {
15150	autorest.Response `json:"-"`
15151	// Value - List of P2SVpnServerConfigurations.
15152	Value *[]P2SVpnServerConfiguration `json:"value,omitempty"`
15153	// NextLink - URL to get the next set of operation list results if there are any.
15154	NextLink *string `json:"nextLink,omitempty"`
15155}
15156
15157// ListP2SVpnServerConfigurationsResultIterator provides access to a complete listing of
15158// P2SVpnServerConfiguration values.
15159type ListP2SVpnServerConfigurationsResultIterator struct {
15160	i    int
15161	page ListP2SVpnServerConfigurationsResultPage
15162}
15163
15164// NextWithContext advances to the next value.  If there was an error making
15165// the request the iterator does not advance and the error is returned.
15166func (iter *ListP2SVpnServerConfigurationsResultIterator) NextWithContext(ctx context.Context) (err error) {
15167	if tracing.IsEnabled() {
15168		ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnServerConfigurationsResultIterator.NextWithContext")
15169		defer func() {
15170			sc := -1
15171			if iter.Response().Response.Response != nil {
15172				sc = iter.Response().Response.Response.StatusCode
15173			}
15174			tracing.EndSpan(ctx, sc, err)
15175		}()
15176	}
15177	iter.i++
15178	if iter.i < len(iter.page.Values()) {
15179		return nil
15180	}
15181	err = iter.page.NextWithContext(ctx)
15182	if err != nil {
15183		iter.i--
15184		return err
15185	}
15186	iter.i = 0
15187	return nil
15188}
15189
15190// Next advances to the next value.  If there was an error making
15191// the request the iterator does not advance and the error is returned.
15192// Deprecated: Use NextWithContext() instead.
15193func (iter *ListP2SVpnServerConfigurationsResultIterator) Next() error {
15194	return iter.NextWithContext(context.Background())
15195}
15196
15197// NotDone returns true if the enumeration should be started or is not yet complete.
15198func (iter ListP2SVpnServerConfigurationsResultIterator) NotDone() bool {
15199	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15200}
15201
15202// Response returns the raw server response from the last page request.
15203func (iter ListP2SVpnServerConfigurationsResultIterator) Response() ListP2SVpnServerConfigurationsResult {
15204	return iter.page.Response()
15205}
15206
15207// Value returns the current value or a zero-initialized value if the
15208// iterator has advanced beyond the end of the collection.
15209func (iter ListP2SVpnServerConfigurationsResultIterator) Value() P2SVpnServerConfiguration {
15210	if !iter.page.NotDone() {
15211		return P2SVpnServerConfiguration{}
15212	}
15213	return iter.page.Values()[iter.i]
15214}
15215
15216// Creates a new instance of the ListP2SVpnServerConfigurationsResultIterator type.
15217func NewListP2SVpnServerConfigurationsResultIterator(page ListP2SVpnServerConfigurationsResultPage) ListP2SVpnServerConfigurationsResultIterator {
15218	return ListP2SVpnServerConfigurationsResultIterator{page: page}
15219}
15220
15221// IsEmpty returns true if the ListResult contains no values.
15222func (lpvscr ListP2SVpnServerConfigurationsResult) IsEmpty() bool {
15223	return lpvscr.Value == nil || len(*lpvscr.Value) == 0
15224}
15225
15226// hasNextLink returns true if the NextLink is not empty.
15227func (lpvscr ListP2SVpnServerConfigurationsResult) hasNextLink() bool {
15228	return lpvscr.NextLink != nil && len(*lpvscr.NextLink) != 0
15229}
15230
15231// listP2SVpnServerConfigurationsResultPreparer prepares a request to retrieve the next set of results.
15232// It returns nil if no more results exist.
15233func (lpvscr ListP2SVpnServerConfigurationsResult) listP2SVpnServerConfigurationsResultPreparer(ctx context.Context) (*http.Request, error) {
15234	if !lpvscr.hasNextLink() {
15235		return nil, nil
15236	}
15237	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15238		autorest.AsJSON(),
15239		autorest.AsGet(),
15240		autorest.WithBaseURL(to.String(lpvscr.NextLink)))
15241}
15242
15243// ListP2SVpnServerConfigurationsResultPage contains a page of P2SVpnServerConfiguration values.
15244type ListP2SVpnServerConfigurationsResultPage struct {
15245	fn     func(context.Context, ListP2SVpnServerConfigurationsResult) (ListP2SVpnServerConfigurationsResult, error)
15246	lpvscr ListP2SVpnServerConfigurationsResult
15247}
15248
15249// NextWithContext advances to the next page of values.  If there was an error making
15250// the request the page does not advance and the error is returned.
15251func (page *ListP2SVpnServerConfigurationsResultPage) NextWithContext(ctx context.Context) (err error) {
15252	if tracing.IsEnabled() {
15253		ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnServerConfigurationsResultPage.NextWithContext")
15254		defer func() {
15255			sc := -1
15256			if page.Response().Response.Response != nil {
15257				sc = page.Response().Response.Response.StatusCode
15258			}
15259			tracing.EndSpan(ctx, sc, err)
15260		}()
15261	}
15262	for {
15263		next, err := page.fn(ctx, page.lpvscr)
15264		if err != nil {
15265			return err
15266		}
15267		page.lpvscr = next
15268		if !next.hasNextLink() || !next.IsEmpty() {
15269			break
15270		}
15271	}
15272	return nil
15273}
15274
15275// Next advances to the next page of values.  If there was an error making
15276// the request the page does not advance and the error is returned.
15277// Deprecated: Use NextWithContext() instead.
15278func (page *ListP2SVpnServerConfigurationsResultPage) Next() error {
15279	return page.NextWithContext(context.Background())
15280}
15281
15282// NotDone returns true if the page enumeration should be started or is not yet complete.
15283func (page ListP2SVpnServerConfigurationsResultPage) NotDone() bool {
15284	return !page.lpvscr.IsEmpty()
15285}
15286
15287// Response returns the raw server response from the last page request.
15288func (page ListP2SVpnServerConfigurationsResultPage) Response() ListP2SVpnServerConfigurationsResult {
15289	return page.lpvscr
15290}
15291
15292// Values returns the slice of values for the current page or nil if there are no values.
15293func (page ListP2SVpnServerConfigurationsResultPage) Values() []P2SVpnServerConfiguration {
15294	if page.lpvscr.IsEmpty() {
15295		return nil
15296	}
15297	return *page.lpvscr.Value
15298}
15299
15300// Creates a new instance of the ListP2SVpnServerConfigurationsResultPage type.
15301func NewListP2SVpnServerConfigurationsResultPage(cur ListP2SVpnServerConfigurationsResult, getNextPage func(context.Context, ListP2SVpnServerConfigurationsResult) (ListP2SVpnServerConfigurationsResult, error)) ListP2SVpnServerConfigurationsResultPage {
15302	return ListP2SVpnServerConfigurationsResultPage{
15303		fn:     getNextPage,
15304		lpvscr: cur,
15305	}
15306}
15307
15308// ListString ...
15309type ListString struct {
15310	autorest.Response `json:"-"`
15311	Value             *[]string `json:"value,omitempty"`
15312}
15313
15314// ListVirtualHubsResult result of the request to list VirtualHubs. It contains a list of VirtualHubs and a
15315// URL nextLink to get the next set of results.
15316type ListVirtualHubsResult struct {
15317	autorest.Response `json:"-"`
15318	// Value - List of VirtualHubs.
15319	Value *[]VirtualHub `json:"value,omitempty"`
15320	// NextLink - URL to get the next set of operation list results if there are any.
15321	NextLink *string `json:"nextLink,omitempty"`
15322}
15323
15324// ListVirtualHubsResultIterator provides access to a complete listing of VirtualHub values.
15325type ListVirtualHubsResultIterator struct {
15326	i    int
15327	page ListVirtualHubsResultPage
15328}
15329
15330// NextWithContext advances to the next value.  If there was an error making
15331// the request the iterator does not advance and the error is returned.
15332func (iter *ListVirtualHubsResultIterator) NextWithContext(ctx context.Context) (err error) {
15333	if tracing.IsEnabled() {
15334		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubsResultIterator.NextWithContext")
15335		defer func() {
15336			sc := -1
15337			if iter.Response().Response.Response != nil {
15338				sc = iter.Response().Response.Response.StatusCode
15339			}
15340			tracing.EndSpan(ctx, sc, err)
15341		}()
15342	}
15343	iter.i++
15344	if iter.i < len(iter.page.Values()) {
15345		return nil
15346	}
15347	err = iter.page.NextWithContext(ctx)
15348	if err != nil {
15349		iter.i--
15350		return err
15351	}
15352	iter.i = 0
15353	return nil
15354}
15355
15356// Next advances to the next value.  If there was an error making
15357// the request the iterator does not advance and the error is returned.
15358// Deprecated: Use NextWithContext() instead.
15359func (iter *ListVirtualHubsResultIterator) Next() error {
15360	return iter.NextWithContext(context.Background())
15361}
15362
15363// NotDone returns true if the enumeration should be started or is not yet complete.
15364func (iter ListVirtualHubsResultIterator) NotDone() bool {
15365	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15366}
15367
15368// Response returns the raw server response from the last page request.
15369func (iter ListVirtualHubsResultIterator) Response() ListVirtualHubsResult {
15370	return iter.page.Response()
15371}
15372
15373// Value returns the current value or a zero-initialized value if the
15374// iterator has advanced beyond the end of the collection.
15375func (iter ListVirtualHubsResultIterator) Value() VirtualHub {
15376	if !iter.page.NotDone() {
15377		return VirtualHub{}
15378	}
15379	return iter.page.Values()[iter.i]
15380}
15381
15382// Creates a new instance of the ListVirtualHubsResultIterator type.
15383func NewListVirtualHubsResultIterator(page ListVirtualHubsResultPage) ListVirtualHubsResultIterator {
15384	return ListVirtualHubsResultIterator{page: page}
15385}
15386
15387// IsEmpty returns true if the ListResult contains no values.
15388func (lvhr ListVirtualHubsResult) IsEmpty() bool {
15389	return lvhr.Value == nil || len(*lvhr.Value) == 0
15390}
15391
15392// hasNextLink returns true if the NextLink is not empty.
15393func (lvhr ListVirtualHubsResult) hasNextLink() bool {
15394	return lvhr.NextLink != nil && len(*lvhr.NextLink) != 0
15395}
15396
15397// listVirtualHubsResultPreparer prepares a request to retrieve the next set of results.
15398// It returns nil if no more results exist.
15399func (lvhr ListVirtualHubsResult) listVirtualHubsResultPreparer(ctx context.Context) (*http.Request, error) {
15400	if !lvhr.hasNextLink() {
15401		return nil, nil
15402	}
15403	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15404		autorest.AsJSON(),
15405		autorest.AsGet(),
15406		autorest.WithBaseURL(to.String(lvhr.NextLink)))
15407}
15408
15409// ListVirtualHubsResultPage contains a page of VirtualHub values.
15410type ListVirtualHubsResultPage struct {
15411	fn   func(context.Context, ListVirtualHubsResult) (ListVirtualHubsResult, error)
15412	lvhr ListVirtualHubsResult
15413}
15414
15415// NextWithContext advances to the next page of values.  If there was an error making
15416// the request the page does not advance and the error is returned.
15417func (page *ListVirtualHubsResultPage) NextWithContext(ctx context.Context) (err error) {
15418	if tracing.IsEnabled() {
15419		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubsResultPage.NextWithContext")
15420		defer func() {
15421			sc := -1
15422			if page.Response().Response.Response != nil {
15423				sc = page.Response().Response.Response.StatusCode
15424			}
15425			tracing.EndSpan(ctx, sc, err)
15426		}()
15427	}
15428	for {
15429		next, err := page.fn(ctx, page.lvhr)
15430		if err != nil {
15431			return err
15432		}
15433		page.lvhr = next
15434		if !next.hasNextLink() || !next.IsEmpty() {
15435			break
15436		}
15437	}
15438	return nil
15439}
15440
15441// Next advances to the next page of values.  If there was an error making
15442// the request the page does not advance and the error is returned.
15443// Deprecated: Use NextWithContext() instead.
15444func (page *ListVirtualHubsResultPage) Next() error {
15445	return page.NextWithContext(context.Background())
15446}
15447
15448// NotDone returns true if the page enumeration should be started or is not yet complete.
15449func (page ListVirtualHubsResultPage) NotDone() bool {
15450	return !page.lvhr.IsEmpty()
15451}
15452
15453// Response returns the raw server response from the last page request.
15454func (page ListVirtualHubsResultPage) Response() ListVirtualHubsResult {
15455	return page.lvhr
15456}
15457
15458// Values returns the slice of values for the current page or nil if there are no values.
15459func (page ListVirtualHubsResultPage) Values() []VirtualHub {
15460	if page.lvhr.IsEmpty() {
15461		return nil
15462	}
15463	return *page.lvhr.Value
15464}
15465
15466// Creates a new instance of the ListVirtualHubsResultPage type.
15467func NewListVirtualHubsResultPage(cur ListVirtualHubsResult, getNextPage func(context.Context, ListVirtualHubsResult) (ListVirtualHubsResult, error)) ListVirtualHubsResultPage {
15468	return ListVirtualHubsResultPage{
15469		fn:   getNextPage,
15470		lvhr: cur,
15471	}
15472}
15473
15474// ListVirtualWANsResult result of the request to list VirtualWANs. It contains a list of VirtualWANs and a
15475// URL nextLink to get the next set of results.
15476type ListVirtualWANsResult struct {
15477	autorest.Response `json:"-"`
15478	// Value - List of VirtualWANs.
15479	Value *[]VirtualWAN `json:"value,omitempty"`
15480	// NextLink - URL to get the next set of operation list results if there are any.
15481	NextLink *string `json:"nextLink,omitempty"`
15482}
15483
15484// ListVirtualWANsResultIterator provides access to a complete listing of VirtualWAN values.
15485type ListVirtualWANsResultIterator struct {
15486	i    int
15487	page ListVirtualWANsResultPage
15488}
15489
15490// NextWithContext advances to the next value.  If there was an error making
15491// the request the iterator does not advance and the error is returned.
15492func (iter *ListVirtualWANsResultIterator) NextWithContext(ctx context.Context) (err error) {
15493	if tracing.IsEnabled() {
15494		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualWANsResultIterator.NextWithContext")
15495		defer func() {
15496			sc := -1
15497			if iter.Response().Response.Response != nil {
15498				sc = iter.Response().Response.Response.StatusCode
15499			}
15500			tracing.EndSpan(ctx, sc, err)
15501		}()
15502	}
15503	iter.i++
15504	if iter.i < len(iter.page.Values()) {
15505		return nil
15506	}
15507	err = iter.page.NextWithContext(ctx)
15508	if err != nil {
15509		iter.i--
15510		return err
15511	}
15512	iter.i = 0
15513	return nil
15514}
15515
15516// Next advances to the next value.  If there was an error making
15517// the request the iterator does not advance and the error is returned.
15518// Deprecated: Use NextWithContext() instead.
15519func (iter *ListVirtualWANsResultIterator) Next() error {
15520	return iter.NextWithContext(context.Background())
15521}
15522
15523// NotDone returns true if the enumeration should be started or is not yet complete.
15524func (iter ListVirtualWANsResultIterator) NotDone() bool {
15525	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15526}
15527
15528// Response returns the raw server response from the last page request.
15529func (iter ListVirtualWANsResultIterator) Response() ListVirtualWANsResult {
15530	return iter.page.Response()
15531}
15532
15533// Value returns the current value or a zero-initialized value if the
15534// iterator has advanced beyond the end of the collection.
15535func (iter ListVirtualWANsResultIterator) Value() VirtualWAN {
15536	if !iter.page.NotDone() {
15537		return VirtualWAN{}
15538	}
15539	return iter.page.Values()[iter.i]
15540}
15541
15542// Creates a new instance of the ListVirtualWANsResultIterator type.
15543func NewListVirtualWANsResultIterator(page ListVirtualWANsResultPage) ListVirtualWANsResultIterator {
15544	return ListVirtualWANsResultIterator{page: page}
15545}
15546
15547// IsEmpty returns true if the ListResult contains no values.
15548func (lvwnr ListVirtualWANsResult) IsEmpty() bool {
15549	return lvwnr.Value == nil || len(*lvwnr.Value) == 0
15550}
15551
15552// hasNextLink returns true if the NextLink is not empty.
15553func (lvwnr ListVirtualWANsResult) hasNextLink() bool {
15554	return lvwnr.NextLink != nil && len(*lvwnr.NextLink) != 0
15555}
15556
15557// listVirtualWANsResultPreparer prepares a request to retrieve the next set of results.
15558// It returns nil if no more results exist.
15559func (lvwnr ListVirtualWANsResult) listVirtualWANsResultPreparer(ctx context.Context) (*http.Request, error) {
15560	if !lvwnr.hasNextLink() {
15561		return nil, nil
15562	}
15563	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15564		autorest.AsJSON(),
15565		autorest.AsGet(),
15566		autorest.WithBaseURL(to.String(lvwnr.NextLink)))
15567}
15568
15569// ListVirtualWANsResultPage contains a page of VirtualWAN values.
15570type ListVirtualWANsResultPage struct {
15571	fn    func(context.Context, ListVirtualWANsResult) (ListVirtualWANsResult, error)
15572	lvwnr ListVirtualWANsResult
15573}
15574
15575// NextWithContext advances to the next page of values.  If there was an error making
15576// the request the page does not advance and the error is returned.
15577func (page *ListVirtualWANsResultPage) NextWithContext(ctx context.Context) (err error) {
15578	if tracing.IsEnabled() {
15579		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualWANsResultPage.NextWithContext")
15580		defer func() {
15581			sc := -1
15582			if page.Response().Response.Response != nil {
15583				sc = page.Response().Response.Response.StatusCode
15584			}
15585			tracing.EndSpan(ctx, sc, err)
15586		}()
15587	}
15588	for {
15589		next, err := page.fn(ctx, page.lvwnr)
15590		if err != nil {
15591			return err
15592		}
15593		page.lvwnr = next
15594		if !next.hasNextLink() || !next.IsEmpty() {
15595			break
15596		}
15597	}
15598	return nil
15599}
15600
15601// Next advances to the next page of values.  If there was an error making
15602// the request the page does not advance and the error is returned.
15603// Deprecated: Use NextWithContext() instead.
15604func (page *ListVirtualWANsResultPage) Next() error {
15605	return page.NextWithContext(context.Background())
15606}
15607
15608// NotDone returns true if the page enumeration should be started or is not yet complete.
15609func (page ListVirtualWANsResultPage) NotDone() bool {
15610	return !page.lvwnr.IsEmpty()
15611}
15612
15613// Response returns the raw server response from the last page request.
15614func (page ListVirtualWANsResultPage) Response() ListVirtualWANsResult {
15615	return page.lvwnr
15616}
15617
15618// Values returns the slice of values for the current page or nil if there are no values.
15619func (page ListVirtualWANsResultPage) Values() []VirtualWAN {
15620	if page.lvwnr.IsEmpty() {
15621		return nil
15622	}
15623	return *page.lvwnr.Value
15624}
15625
15626// Creates a new instance of the ListVirtualWANsResultPage type.
15627func NewListVirtualWANsResultPage(cur ListVirtualWANsResult, getNextPage func(context.Context, ListVirtualWANsResult) (ListVirtualWANsResult, error)) ListVirtualWANsResultPage {
15628	return ListVirtualWANsResultPage{
15629		fn:    getNextPage,
15630		lvwnr: cur,
15631	}
15632}
15633
15634// ListVpnConnectionsResult result of the request to list all vpn connections to a virtual wan vpn gateway.
15635// It contains a list of Vpn Connections and a URL nextLink to get the next set of results.
15636type ListVpnConnectionsResult struct {
15637	autorest.Response `json:"-"`
15638	// Value - List of Vpn Connections.
15639	Value *[]VpnConnection `json:"value,omitempty"`
15640	// NextLink - URL to get the next set of operation list results if there are any.
15641	NextLink *string `json:"nextLink,omitempty"`
15642}
15643
15644// ListVpnConnectionsResultIterator provides access to a complete listing of VpnConnection values.
15645type ListVpnConnectionsResultIterator struct {
15646	i    int
15647	page ListVpnConnectionsResultPage
15648}
15649
15650// NextWithContext advances to the next value.  If there was an error making
15651// the request the iterator does not advance and the error is returned.
15652func (iter *ListVpnConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
15653	if tracing.IsEnabled() {
15654		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnConnectionsResultIterator.NextWithContext")
15655		defer func() {
15656			sc := -1
15657			if iter.Response().Response.Response != nil {
15658				sc = iter.Response().Response.Response.StatusCode
15659			}
15660			tracing.EndSpan(ctx, sc, err)
15661		}()
15662	}
15663	iter.i++
15664	if iter.i < len(iter.page.Values()) {
15665		return nil
15666	}
15667	err = iter.page.NextWithContext(ctx)
15668	if err != nil {
15669		iter.i--
15670		return err
15671	}
15672	iter.i = 0
15673	return nil
15674}
15675
15676// Next advances to the next value.  If there was an error making
15677// the request the iterator does not advance and the error is returned.
15678// Deprecated: Use NextWithContext() instead.
15679func (iter *ListVpnConnectionsResultIterator) Next() error {
15680	return iter.NextWithContext(context.Background())
15681}
15682
15683// NotDone returns true if the enumeration should be started or is not yet complete.
15684func (iter ListVpnConnectionsResultIterator) NotDone() bool {
15685	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15686}
15687
15688// Response returns the raw server response from the last page request.
15689func (iter ListVpnConnectionsResultIterator) Response() ListVpnConnectionsResult {
15690	return iter.page.Response()
15691}
15692
15693// Value returns the current value or a zero-initialized value if the
15694// iterator has advanced beyond the end of the collection.
15695func (iter ListVpnConnectionsResultIterator) Value() VpnConnection {
15696	if !iter.page.NotDone() {
15697		return VpnConnection{}
15698	}
15699	return iter.page.Values()[iter.i]
15700}
15701
15702// Creates a new instance of the ListVpnConnectionsResultIterator type.
15703func NewListVpnConnectionsResultIterator(page ListVpnConnectionsResultPage) ListVpnConnectionsResultIterator {
15704	return ListVpnConnectionsResultIterator{page: page}
15705}
15706
15707// IsEmpty returns true if the ListResult contains no values.
15708func (lvcr ListVpnConnectionsResult) IsEmpty() bool {
15709	return lvcr.Value == nil || len(*lvcr.Value) == 0
15710}
15711
15712// hasNextLink returns true if the NextLink is not empty.
15713func (lvcr ListVpnConnectionsResult) hasNextLink() bool {
15714	return lvcr.NextLink != nil && len(*lvcr.NextLink) != 0
15715}
15716
15717// listVpnConnectionsResultPreparer prepares a request to retrieve the next set of results.
15718// It returns nil if no more results exist.
15719func (lvcr ListVpnConnectionsResult) listVpnConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
15720	if !lvcr.hasNextLink() {
15721		return nil, nil
15722	}
15723	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15724		autorest.AsJSON(),
15725		autorest.AsGet(),
15726		autorest.WithBaseURL(to.String(lvcr.NextLink)))
15727}
15728
15729// ListVpnConnectionsResultPage contains a page of VpnConnection values.
15730type ListVpnConnectionsResultPage struct {
15731	fn   func(context.Context, ListVpnConnectionsResult) (ListVpnConnectionsResult, error)
15732	lvcr ListVpnConnectionsResult
15733}
15734
15735// NextWithContext advances to the next page of values.  If there was an error making
15736// the request the page does not advance and the error is returned.
15737func (page *ListVpnConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
15738	if tracing.IsEnabled() {
15739		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnConnectionsResultPage.NextWithContext")
15740		defer func() {
15741			sc := -1
15742			if page.Response().Response.Response != nil {
15743				sc = page.Response().Response.Response.StatusCode
15744			}
15745			tracing.EndSpan(ctx, sc, err)
15746		}()
15747	}
15748	for {
15749		next, err := page.fn(ctx, page.lvcr)
15750		if err != nil {
15751			return err
15752		}
15753		page.lvcr = next
15754		if !next.hasNextLink() || !next.IsEmpty() {
15755			break
15756		}
15757	}
15758	return nil
15759}
15760
15761// Next advances to the next page of values.  If there was an error making
15762// the request the page does not advance and the error is returned.
15763// Deprecated: Use NextWithContext() instead.
15764func (page *ListVpnConnectionsResultPage) Next() error {
15765	return page.NextWithContext(context.Background())
15766}
15767
15768// NotDone returns true if the page enumeration should be started or is not yet complete.
15769func (page ListVpnConnectionsResultPage) NotDone() bool {
15770	return !page.lvcr.IsEmpty()
15771}
15772
15773// Response returns the raw server response from the last page request.
15774func (page ListVpnConnectionsResultPage) Response() ListVpnConnectionsResult {
15775	return page.lvcr
15776}
15777
15778// Values returns the slice of values for the current page or nil if there are no values.
15779func (page ListVpnConnectionsResultPage) Values() []VpnConnection {
15780	if page.lvcr.IsEmpty() {
15781		return nil
15782	}
15783	return *page.lvcr.Value
15784}
15785
15786// Creates a new instance of the ListVpnConnectionsResultPage type.
15787func NewListVpnConnectionsResultPage(cur ListVpnConnectionsResult, getNextPage func(context.Context, ListVpnConnectionsResult) (ListVpnConnectionsResult, error)) ListVpnConnectionsResultPage {
15788	return ListVpnConnectionsResultPage{
15789		fn:   getNextPage,
15790		lvcr: cur,
15791	}
15792}
15793
15794// ListVpnGatewaysResult result of the request to list VpnGateways. It contains a list of VpnGateways and a
15795// URL nextLink to get the next set of results.
15796type ListVpnGatewaysResult struct {
15797	autorest.Response `json:"-"`
15798	// Value - List of VpnGateways.
15799	Value *[]VpnGateway `json:"value,omitempty"`
15800	// NextLink - URL to get the next set of operation list results if there are any.
15801	NextLink *string `json:"nextLink,omitempty"`
15802}
15803
15804// ListVpnGatewaysResultIterator provides access to a complete listing of VpnGateway values.
15805type ListVpnGatewaysResultIterator struct {
15806	i    int
15807	page ListVpnGatewaysResultPage
15808}
15809
15810// NextWithContext advances to the next value.  If there was an error making
15811// the request the iterator does not advance and the error is returned.
15812func (iter *ListVpnGatewaysResultIterator) NextWithContext(ctx context.Context) (err error) {
15813	if tracing.IsEnabled() {
15814		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnGatewaysResultIterator.NextWithContext")
15815		defer func() {
15816			sc := -1
15817			if iter.Response().Response.Response != nil {
15818				sc = iter.Response().Response.Response.StatusCode
15819			}
15820			tracing.EndSpan(ctx, sc, err)
15821		}()
15822	}
15823	iter.i++
15824	if iter.i < len(iter.page.Values()) {
15825		return nil
15826	}
15827	err = iter.page.NextWithContext(ctx)
15828	if err != nil {
15829		iter.i--
15830		return err
15831	}
15832	iter.i = 0
15833	return nil
15834}
15835
15836// Next advances to the next value.  If there was an error making
15837// the request the iterator does not advance and the error is returned.
15838// Deprecated: Use NextWithContext() instead.
15839func (iter *ListVpnGatewaysResultIterator) Next() error {
15840	return iter.NextWithContext(context.Background())
15841}
15842
15843// NotDone returns true if the enumeration should be started or is not yet complete.
15844func (iter ListVpnGatewaysResultIterator) NotDone() bool {
15845	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15846}
15847
15848// Response returns the raw server response from the last page request.
15849func (iter ListVpnGatewaysResultIterator) Response() ListVpnGatewaysResult {
15850	return iter.page.Response()
15851}
15852
15853// Value returns the current value or a zero-initialized value if the
15854// iterator has advanced beyond the end of the collection.
15855func (iter ListVpnGatewaysResultIterator) Value() VpnGateway {
15856	if !iter.page.NotDone() {
15857		return VpnGateway{}
15858	}
15859	return iter.page.Values()[iter.i]
15860}
15861
15862// Creates a new instance of the ListVpnGatewaysResultIterator type.
15863func NewListVpnGatewaysResultIterator(page ListVpnGatewaysResultPage) ListVpnGatewaysResultIterator {
15864	return ListVpnGatewaysResultIterator{page: page}
15865}
15866
15867// IsEmpty returns true if the ListResult contains no values.
15868func (lvgr ListVpnGatewaysResult) IsEmpty() bool {
15869	return lvgr.Value == nil || len(*lvgr.Value) == 0
15870}
15871
15872// hasNextLink returns true if the NextLink is not empty.
15873func (lvgr ListVpnGatewaysResult) hasNextLink() bool {
15874	return lvgr.NextLink != nil && len(*lvgr.NextLink) != 0
15875}
15876
15877// listVpnGatewaysResultPreparer prepares a request to retrieve the next set of results.
15878// It returns nil if no more results exist.
15879func (lvgr ListVpnGatewaysResult) listVpnGatewaysResultPreparer(ctx context.Context) (*http.Request, error) {
15880	if !lvgr.hasNextLink() {
15881		return nil, nil
15882	}
15883	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15884		autorest.AsJSON(),
15885		autorest.AsGet(),
15886		autorest.WithBaseURL(to.String(lvgr.NextLink)))
15887}
15888
15889// ListVpnGatewaysResultPage contains a page of VpnGateway values.
15890type ListVpnGatewaysResultPage struct {
15891	fn   func(context.Context, ListVpnGatewaysResult) (ListVpnGatewaysResult, error)
15892	lvgr ListVpnGatewaysResult
15893}
15894
15895// NextWithContext advances to the next page of values.  If there was an error making
15896// the request the page does not advance and the error is returned.
15897func (page *ListVpnGatewaysResultPage) NextWithContext(ctx context.Context) (err error) {
15898	if tracing.IsEnabled() {
15899		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnGatewaysResultPage.NextWithContext")
15900		defer func() {
15901			sc := -1
15902			if page.Response().Response.Response != nil {
15903				sc = page.Response().Response.Response.StatusCode
15904			}
15905			tracing.EndSpan(ctx, sc, err)
15906		}()
15907	}
15908	for {
15909		next, err := page.fn(ctx, page.lvgr)
15910		if err != nil {
15911			return err
15912		}
15913		page.lvgr = next
15914		if !next.hasNextLink() || !next.IsEmpty() {
15915			break
15916		}
15917	}
15918	return nil
15919}
15920
15921// Next advances to the next page of values.  If there was an error making
15922// the request the page does not advance and the error is returned.
15923// Deprecated: Use NextWithContext() instead.
15924func (page *ListVpnGatewaysResultPage) Next() error {
15925	return page.NextWithContext(context.Background())
15926}
15927
15928// NotDone returns true if the page enumeration should be started or is not yet complete.
15929func (page ListVpnGatewaysResultPage) NotDone() bool {
15930	return !page.lvgr.IsEmpty()
15931}
15932
15933// Response returns the raw server response from the last page request.
15934func (page ListVpnGatewaysResultPage) Response() ListVpnGatewaysResult {
15935	return page.lvgr
15936}
15937
15938// Values returns the slice of values for the current page or nil if there are no values.
15939func (page ListVpnGatewaysResultPage) Values() []VpnGateway {
15940	if page.lvgr.IsEmpty() {
15941		return nil
15942	}
15943	return *page.lvgr.Value
15944}
15945
15946// Creates a new instance of the ListVpnGatewaysResultPage type.
15947func NewListVpnGatewaysResultPage(cur ListVpnGatewaysResult, getNextPage func(context.Context, ListVpnGatewaysResult) (ListVpnGatewaysResult, error)) ListVpnGatewaysResultPage {
15948	return ListVpnGatewaysResultPage{
15949		fn:   getNextPage,
15950		lvgr: cur,
15951	}
15952}
15953
15954// ListVpnSitesResult result of the request to list VpnSites. It contains a list of VpnSites and a URL
15955// nextLink to get the next set of results.
15956type ListVpnSitesResult struct {
15957	autorest.Response `json:"-"`
15958	// Value - List of VpnSites.
15959	Value *[]VpnSite `json:"value,omitempty"`
15960	// NextLink - URL to get the next set of operation list results if there are any.
15961	NextLink *string `json:"nextLink,omitempty"`
15962}
15963
15964// ListVpnSitesResultIterator provides access to a complete listing of VpnSite values.
15965type ListVpnSitesResultIterator struct {
15966	i    int
15967	page ListVpnSitesResultPage
15968}
15969
15970// NextWithContext advances to the next value.  If there was an error making
15971// the request the iterator does not advance and the error is returned.
15972func (iter *ListVpnSitesResultIterator) NextWithContext(ctx context.Context) (err error) {
15973	if tracing.IsEnabled() {
15974		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSitesResultIterator.NextWithContext")
15975		defer func() {
15976			sc := -1
15977			if iter.Response().Response.Response != nil {
15978				sc = iter.Response().Response.Response.StatusCode
15979			}
15980			tracing.EndSpan(ctx, sc, err)
15981		}()
15982	}
15983	iter.i++
15984	if iter.i < len(iter.page.Values()) {
15985		return nil
15986	}
15987	err = iter.page.NextWithContext(ctx)
15988	if err != nil {
15989		iter.i--
15990		return err
15991	}
15992	iter.i = 0
15993	return nil
15994}
15995
15996// Next advances to the next value.  If there was an error making
15997// the request the iterator does not advance and the error is returned.
15998// Deprecated: Use NextWithContext() instead.
15999func (iter *ListVpnSitesResultIterator) Next() error {
16000	return iter.NextWithContext(context.Background())
16001}
16002
16003// NotDone returns true if the enumeration should be started or is not yet complete.
16004func (iter ListVpnSitesResultIterator) NotDone() bool {
16005	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16006}
16007
16008// Response returns the raw server response from the last page request.
16009func (iter ListVpnSitesResultIterator) Response() ListVpnSitesResult {
16010	return iter.page.Response()
16011}
16012
16013// Value returns the current value or a zero-initialized value if the
16014// iterator has advanced beyond the end of the collection.
16015func (iter ListVpnSitesResultIterator) Value() VpnSite {
16016	if !iter.page.NotDone() {
16017		return VpnSite{}
16018	}
16019	return iter.page.Values()[iter.i]
16020}
16021
16022// Creates a new instance of the ListVpnSitesResultIterator type.
16023func NewListVpnSitesResultIterator(page ListVpnSitesResultPage) ListVpnSitesResultIterator {
16024	return ListVpnSitesResultIterator{page: page}
16025}
16026
16027// IsEmpty returns true if the ListResult contains no values.
16028func (lvsr ListVpnSitesResult) IsEmpty() bool {
16029	return lvsr.Value == nil || len(*lvsr.Value) == 0
16030}
16031
16032// hasNextLink returns true if the NextLink is not empty.
16033func (lvsr ListVpnSitesResult) hasNextLink() bool {
16034	return lvsr.NextLink != nil && len(*lvsr.NextLink) != 0
16035}
16036
16037// listVpnSitesResultPreparer prepares a request to retrieve the next set of results.
16038// It returns nil if no more results exist.
16039func (lvsr ListVpnSitesResult) listVpnSitesResultPreparer(ctx context.Context) (*http.Request, error) {
16040	if !lvsr.hasNextLink() {
16041		return nil, nil
16042	}
16043	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16044		autorest.AsJSON(),
16045		autorest.AsGet(),
16046		autorest.WithBaseURL(to.String(lvsr.NextLink)))
16047}
16048
16049// ListVpnSitesResultPage contains a page of VpnSite values.
16050type ListVpnSitesResultPage struct {
16051	fn   func(context.Context, ListVpnSitesResult) (ListVpnSitesResult, error)
16052	lvsr ListVpnSitesResult
16053}
16054
16055// NextWithContext advances to the next page of values.  If there was an error making
16056// the request the page does not advance and the error is returned.
16057func (page *ListVpnSitesResultPage) NextWithContext(ctx context.Context) (err error) {
16058	if tracing.IsEnabled() {
16059		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSitesResultPage.NextWithContext")
16060		defer func() {
16061			sc := -1
16062			if page.Response().Response.Response != nil {
16063				sc = page.Response().Response.Response.StatusCode
16064			}
16065			tracing.EndSpan(ctx, sc, err)
16066		}()
16067	}
16068	for {
16069		next, err := page.fn(ctx, page.lvsr)
16070		if err != nil {
16071			return err
16072		}
16073		page.lvsr = next
16074		if !next.hasNextLink() || !next.IsEmpty() {
16075			break
16076		}
16077	}
16078	return nil
16079}
16080
16081// Next advances to the next page of values.  If there was an error making
16082// the request the page does not advance and the error is returned.
16083// Deprecated: Use NextWithContext() instead.
16084func (page *ListVpnSitesResultPage) Next() error {
16085	return page.NextWithContext(context.Background())
16086}
16087
16088// NotDone returns true if the page enumeration should be started or is not yet complete.
16089func (page ListVpnSitesResultPage) NotDone() bool {
16090	return !page.lvsr.IsEmpty()
16091}
16092
16093// Response returns the raw server response from the last page request.
16094func (page ListVpnSitesResultPage) Response() ListVpnSitesResult {
16095	return page.lvsr
16096}
16097
16098// Values returns the slice of values for the current page or nil if there are no values.
16099func (page ListVpnSitesResultPage) Values() []VpnSite {
16100	if page.lvsr.IsEmpty() {
16101		return nil
16102	}
16103	return *page.lvsr.Value
16104}
16105
16106// Creates a new instance of the ListVpnSitesResultPage type.
16107func NewListVpnSitesResultPage(cur ListVpnSitesResult, getNextPage func(context.Context, ListVpnSitesResult) (ListVpnSitesResult, error)) ListVpnSitesResultPage {
16108	return ListVpnSitesResultPage{
16109		fn:   getNextPage,
16110		lvsr: cur,
16111	}
16112}
16113
16114// LoadBalancer loadBalancer resource
16115type LoadBalancer struct {
16116	autorest.Response `json:"-"`
16117	// Sku - The load balancer SKU.
16118	Sku *LoadBalancerSku `json:"sku,omitempty"`
16119	// LoadBalancerPropertiesFormat - Properties of load balancer.
16120	*LoadBalancerPropertiesFormat `json:"properties,omitempty"`
16121	// Etag - A unique read-only string that changes whenever the resource is updated.
16122	Etag *string `json:"etag,omitempty"`
16123	// ID - Resource ID.
16124	ID *string `json:"id,omitempty"`
16125	// Name - READ-ONLY; Resource name.
16126	Name *string `json:"name,omitempty"`
16127	// Type - READ-ONLY; Resource type.
16128	Type *string `json:"type,omitempty"`
16129	// Location - Resource location.
16130	Location *string `json:"location,omitempty"`
16131	// Tags - Resource tags.
16132	Tags map[string]*string `json:"tags"`
16133}
16134
16135// MarshalJSON is the custom marshaler for LoadBalancer.
16136func (lb LoadBalancer) MarshalJSON() ([]byte, error) {
16137	objectMap := make(map[string]interface{})
16138	if lb.Sku != nil {
16139		objectMap["sku"] = lb.Sku
16140	}
16141	if lb.LoadBalancerPropertiesFormat != nil {
16142		objectMap["properties"] = lb.LoadBalancerPropertiesFormat
16143	}
16144	if lb.Etag != nil {
16145		objectMap["etag"] = lb.Etag
16146	}
16147	if lb.ID != nil {
16148		objectMap["id"] = lb.ID
16149	}
16150	if lb.Location != nil {
16151		objectMap["location"] = lb.Location
16152	}
16153	if lb.Tags != nil {
16154		objectMap["tags"] = lb.Tags
16155	}
16156	return json.Marshal(objectMap)
16157}
16158
16159// UnmarshalJSON is the custom unmarshaler for LoadBalancer struct.
16160func (lb *LoadBalancer) UnmarshalJSON(body []byte) error {
16161	var m map[string]*json.RawMessage
16162	err := json.Unmarshal(body, &m)
16163	if err != nil {
16164		return err
16165	}
16166	for k, v := range m {
16167		switch k {
16168		case "sku":
16169			if v != nil {
16170				var sku LoadBalancerSku
16171				err = json.Unmarshal(*v, &sku)
16172				if err != nil {
16173					return err
16174				}
16175				lb.Sku = &sku
16176			}
16177		case "properties":
16178			if v != nil {
16179				var loadBalancerPropertiesFormat LoadBalancerPropertiesFormat
16180				err = json.Unmarshal(*v, &loadBalancerPropertiesFormat)
16181				if err != nil {
16182					return err
16183				}
16184				lb.LoadBalancerPropertiesFormat = &loadBalancerPropertiesFormat
16185			}
16186		case "etag":
16187			if v != nil {
16188				var etag string
16189				err = json.Unmarshal(*v, &etag)
16190				if err != nil {
16191					return err
16192				}
16193				lb.Etag = &etag
16194			}
16195		case "id":
16196			if v != nil {
16197				var ID string
16198				err = json.Unmarshal(*v, &ID)
16199				if err != nil {
16200					return err
16201				}
16202				lb.ID = &ID
16203			}
16204		case "name":
16205			if v != nil {
16206				var name string
16207				err = json.Unmarshal(*v, &name)
16208				if err != nil {
16209					return err
16210				}
16211				lb.Name = &name
16212			}
16213		case "type":
16214			if v != nil {
16215				var typeVar string
16216				err = json.Unmarshal(*v, &typeVar)
16217				if err != nil {
16218					return err
16219				}
16220				lb.Type = &typeVar
16221			}
16222		case "location":
16223			if v != nil {
16224				var location string
16225				err = json.Unmarshal(*v, &location)
16226				if err != nil {
16227					return err
16228				}
16229				lb.Location = &location
16230			}
16231		case "tags":
16232			if v != nil {
16233				var tags map[string]*string
16234				err = json.Unmarshal(*v, &tags)
16235				if err != nil {
16236					return err
16237				}
16238				lb.Tags = tags
16239			}
16240		}
16241	}
16242
16243	return nil
16244}
16245
16246// LoadBalancerBackendAddressPoolListResult response for ListBackendAddressPool API service call.
16247type LoadBalancerBackendAddressPoolListResult struct {
16248	autorest.Response `json:"-"`
16249	// Value - A list of backend address pools in a load balancer.
16250	Value *[]BackendAddressPool `json:"value,omitempty"`
16251	// NextLink - READ-ONLY; The URL to get the next set of results.
16252	NextLink *string `json:"nextLink,omitempty"`
16253}
16254
16255// MarshalJSON is the custom marshaler for LoadBalancerBackendAddressPoolListResult.
16256func (lbbaplr LoadBalancerBackendAddressPoolListResult) MarshalJSON() ([]byte, error) {
16257	objectMap := make(map[string]interface{})
16258	if lbbaplr.Value != nil {
16259		objectMap["value"] = lbbaplr.Value
16260	}
16261	return json.Marshal(objectMap)
16262}
16263
16264// LoadBalancerBackendAddressPoolListResultIterator provides access to a complete listing of
16265// BackendAddressPool values.
16266type LoadBalancerBackendAddressPoolListResultIterator struct {
16267	i    int
16268	page LoadBalancerBackendAddressPoolListResultPage
16269}
16270
16271// NextWithContext advances to the next value.  If there was an error making
16272// the request the iterator does not advance and the error is returned.
16273func (iter *LoadBalancerBackendAddressPoolListResultIterator) NextWithContext(ctx context.Context) (err error) {
16274	if tracing.IsEnabled() {
16275		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultIterator.NextWithContext")
16276		defer func() {
16277			sc := -1
16278			if iter.Response().Response.Response != nil {
16279				sc = iter.Response().Response.Response.StatusCode
16280			}
16281			tracing.EndSpan(ctx, sc, err)
16282		}()
16283	}
16284	iter.i++
16285	if iter.i < len(iter.page.Values()) {
16286		return nil
16287	}
16288	err = iter.page.NextWithContext(ctx)
16289	if err != nil {
16290		iter.i--
16291		return err
16292	}
16293	iter.i = 0
16294	return nil
16295}
16296
16297// Next advances to the next value.  If there was an error making
16298// the request the iterator does not advance and the error is returned.
16299// Deprecated: Use NextWithContext() instead.
16300func (iter *LoadBalancerBackendAddressPoolListResultIterator) Next() error {
16301	return iter.NextWithContext(context.Background())
16302}
16303
16304// NotDone returns true if the enumeration should be started or is not yet complete.
16305func (iter LoadBalancerBackendAddressPoolListResultIterator) NotDone() bool {
16306	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16307}
16308
16309// Response returns the raw server response from the last page request.
16310func (iter LoadBalancerBackendAddressPoolListResultIterator) Response() LoadBalancerBackendAddressPoolListResult {
16311	return iter.page.Response()
16312}
16313
16314// Value returns the current value or a zero-initialized value if the
16315// iterator has advanced beyond the end of the collection.
16316func (iter LoadBalancerBackendAddressPoolListResultIterator) Value() BackendAddressPool {
16317	if !iter.page.NotDone() {
16318		return BackendAddressPool{}
16319	}
16320	return iter.page.Values()[iter.i]
16321}
16322
16323// Creates a new instance of the LoadBalancerBackendAddressPoolListResultIterator type.
16324func NewLoadBalancerBackendAddressPoolListResultIterator(page LoadBalancerBackendAddressPoolListResultPage) LoadBalancerBackendAddressPoolListResultIterator {
16325	return LoadBalancerBackendAddressPoolListResultIterator{page: page}
16326}
16327
16328// IsEmpty returns true if the ListResult contains no values.
16329func (lbbaplr LoadBalancerBackendAddressPoolListResult) IsEmpty() bool {
16330	return lbbaplr.Value == nil || len(*lbbaplr.Value) == 0
16331}
16332
16333// hasNextLink returns true if the NextLink is not empty.
16334func (lbbaplr LoadBalancerBackendAddressPoolListResult) hasNextLink() bool {
16335	return lbbaplr.NextLink != nil && len(*lbbaplr.NextLink) != 0
16336}
16337
16338// loadBalancerBackendAddressPoolListResultPreparer prepares a request to retrieve the next set of results.
16339// It returns nil if no more results exist.
16340func (lbbaplr LoadBalancerBackendAddressPoolListResult) loadBalancerBackendAddressPoolListResultPreparer(ctx context.Context) (*http.Request, error) {
16341	if !lbbaplr.hasNextLink() {
16342		return nil, nil
16343	}
16344	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16345		autorest.AsJSON(),
16346		autorest.AsGet(),
16347		autorest.WithBaseURL(to.String(lbbaplr.NextLink)))
16348}
16349
16350// LoadBalancerBackendAddressPoolListResultPage contains a page of BackendAddressPool values.
16351type LoadBalancerBackendAddressPoolListResultPage struct {
16352	fn      func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)
16353	lbbaplr LoadBalancerBackendAddressPoolListResult
16354}
16355
16356// NextWithContext advances to the next page of values.  If there was an error making
16357// the request the page does not advance and the error is returned.
16358func (page *LoadBalancerBackendAddressPoolListResultPage) NextWithContext(ctx context.Context) (err error) {
16359	if tracing.IsEnabled() {
16360		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultPage.NextWithContext")
16361		defer func() {
16362			sc := -1
16363			if page.Response().Response.Response != nil {
16364				sc = page.Response().Response.Response.StatusCode
16365			}
16366			tracing.EndSpan(ctx, sc, err)
16367		}()
16368	}
16369	for {
16370		next, err := page.fn(ctx, page.lbbaplr)
16371		if err != nil {
16372			return err
16373		}
16374		page.lbbaplr = next
16375		if !next.hasNextLink() || !next.IsEmpty() {
16376			break
16377		}
16378	}
16379	return nil
16380}
16381
16382// Next advances to the next page of values.  If there was an error making
16383// the request the page does not advance and the error is returned.
16384// Deprecated: Use NextWithContext() instead.
16385func (page *LoadBalancerBackendAddressPoolListResultPage) Next() error {
16386	return page.NextWithContext(context.Background())
16387}
16388
16389// NotDone returns true if the page enumeration should be started or is not yet complete.
16390func (page LoadBalancerBackendAddressPoolListResultPage) NotDone() bool {
16391	return !page.lbbaplr.IsEmpty()
16392}
16393
16394// Response returns the raw server response from the last page request.
16395func (page LoadBalancerBackendAddressPoolListResultPage) Response() LoadBalancerBackendAddressPoolListResult {
16396	return page.lbbaplr
16397}
16398
16399// Values returns the slice of values for the current page or nil if there are no values.
16400func (page LoadBalancerBackendAddressPoolListResultPage) Values() []BackendAddressPool {
16401	if page.lbbaplr.IsEmpty() {
16402		return nil
16403	}
16404	return *page.lbbaplr.Value
16405}
16406
16407// Creates a new instance of the LoadBalancerBackendAddressPoolListResultPage type.
16408func NewLoadBalancerBackendAddressPoolListResultPage(cur LoadBalancerBackendAddressPoolListResult, getNextPage func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)) LoadBalancerBackendAddressPoolListResultPage {
16409	return LoadBalancerBackendAddressPoolListResultPage{
16410		fn:      getNextPage,
16411		lbbaplr: cur,
16412	}
16413}
16414
16415// LoadBalancerFrontendIPConfigurationListResult response for ListFrontendIPConfiguration API service call.
16416type LoadBalancerFrontendIPConfigurationListResult struct {
16417	autorest.Response `json:"-"`
16418	// Value - A list of frontend IP configurations in a load balancer.
16419	Value *[]FrontendIPConfiguration `json:"value,omitempty"`
16420	// NextLink - READ-ONLY; The URL to get the next set of results.
16421	NextLink *string `json:"nextLink,omitempty"`
16422}
16423
16424// MarshalJSON is the custom marshaler for LoadBalancerFrontendIPConfigurationListResult.
16425func (lbficlr LoadBalancerFrontendIPConfigurationListResult) MarshalJSON() ([]byte, error) {
16426	objectMap := make(map[string]interface{})
16427	if lbficlr.Value != nil {
16428		objectMap["value"] = lbficlr.Value
16429	}
16430	return json.Marshal(objectMap)
16431}
16432
16433// LoadBalancerFrontendIPConfigurationListResultIterator provides access to a complete listing of
16434// FrontendIPConfiguration values.
16435type LoadBalancerFrontendIPConfigurationListResultIterator struct {
16436	i    int
16437	page LoadBalancerFrontendIPConfigurationListResultPage
16438}
16439
16440// NextWithContext advances to the next value.  If there was an error making
16441// the request the iterator does not advance and the error is returned.
16442func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
16443	if tracing.IsEnabled() {
16444		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultIterator.NextWithContext")
16445		defer func() {
16446			sc := -1
16447			if iter.Response().Response.Response != nil {
16448				sc = iter.Response().Response.Response.StatusCode
16449			}
16450			tracing.EndSpan(ctx, sc, err)
16451		}()
16452	}
16453	iter.i++
16454	if iter.i < len(iter.page.Values()) {
16455		return nil
16456	}
16457	err = iter.page.NextWithContext(ctx)
16458	if err != nil {
16459		iter.i--
16460		return err
16461	}
16462	iter.i = 0
16463	return nil
16464}
16465
16466// Next advances to the next value.  If there was an error making
16467// the request the iterator does not advance and the error is returned.
16468// Deprecated: Use NextWithContext() instead.
16469func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) Next() error {
16470	return iter.NextWithContext(context.Background())
16471}
16472
16473// NotDone returns true if the enumeration should be started or is not yet complete.
16474func (iter LoadBalancerFrontendIPConfigurationListResultIterator) NotDone() bool {
16475	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16476}
16477
16478// Response returns the raw server response from the last page request.
16479func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Response() LoadBalancerFrontendIPConfigurationListResult {
16480	return iter.page.Response()
16481}
16482
16483// Value returns the current value or a zero-initialized value if the
16484// iterator has advanced beyond the end of the collection.
16485func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Value() FrontendIPConfiguration {
16486	if !iter.page.NotDone() {
16487		return FrontendIPConfiguration{}
16488	}
16489	return iter.page.Values()[iter.i]
16490}
16491
16492// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultIterator type.
16493func NewLoadBalancerFrontendIPConfigurationListResultIterator(page LoadBalancerFrontendIPConfigurationListResultPage) LoadBalancerFrontendIPConfigurationListResultIterator {
16494	return LoadBalancerFrontendIPConfigurationListResultIterator{page: page}
16495}
16496
16497// IsEmpty returns true if the ListResult contains no values.
16498func (lbficlr LoadBalancerFrontendIPConfigurationListResult) IsEmpty() bool {
16499	return lbficlr.Value == nil || len(*lbficlr.Value) == 0
16500}
16501
16502// hasNextLink returns true if the NextLink is not empty.
16503func (lbficlr LoadBalancerFrontendIPConfigurationListResult) hasNextLink() bool {
16504	return lbficlr.NextLink != nil && len(*lbficlr.NextLink) != 0
16505}
16506
16507// loadBalancerFrontendIPConfigurationListResultPreparer prepares a request to retrieve the next set of results.
16508// It returns nil if no more results exist.
16509func (lbficlr LoadBalancerFrontendIPConfigurationListResult) loadBalancerFrontendIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
16510	if !lbficlr.hasNextLink() {
16511		return nil, nil
16512	}
16513	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16514		autorest.AsJSON(),
16515		autorest.AsGet(),
16516		autorest.WithBaseURL(to.String(lbficlr.NextLink)))
16517}
16518
16519// LoadBalancerFrontendIPConfigurationListResultPage contains a page of FrontendIPConfiguration values.
16520type LoadBalancerFrontendIPConfigurationListResultPage struct {
16521	fn      func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)
16522	lbficlr LoadBalancerFrontendIPConfigurationListResult
16523}
16524
16525// NextWithContext advances to the next page of values.  If there was an error making
16526// the request the page does not advance and the error is returned.
16527func (page *LoadBalancerFrontendIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
16528	if tracing.IsEnabled() {
16529		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultPage.NextWithContext")
16530		defer func() {
16531			sc := -1
16532			if page.Response().Response.Response != nil {
16533				sc = page.Response().Response.Response.StatusCode
16534			}
16535			tracing.EndSpan(ctx, sc, err)
16536		}()
16537	}
16538	for {
16539		next, err := page.fn(ctx, page.lbficlr)
16540		if err != nil {
16541			return err
16542		}
16543		page.lbficlr = next
16544		if !next.hasNextLink() || !next.IsEmpty() {
16545			break
16546		}
16547	}
16548	return nil
16549}
16550
16551// Next advances to the next page of values.  If there was an error making
16552// the request the page does not advance and the error is returned.
16553// Deprecated: Use NextWithContext() instead.
16554func (page *LoadBalancerFrontendIPConfigurationListResultPage) Next() error {
16555	return page.NextWithContext(context.Background())
16556}
16557
16558// NotDone returns true if the page enumeration should be started or is not yet complete.
16559func (page LoadBalancerFrontendIPConfigurationListResultPage) NotDone() bool {
16560	return !page.lbficlr.IsEmpty()
16561}
16562
16563// Response returns the raw server response from the last page request.
16564func (page LoadBalancerFrontendIPConfigurationListResultPage) Response() LoadBalancerFrontendIPConfigurationListResult {
16565	return page.lbficlr
16566}
16567
16568// Values returns the slice of values for the current page or nil if there are no values.
16569func (page LoadBalancerFrontendIPConfigurationListResultPage) Values() []FrontendIPConfiguration {
16570	if page.lbficlr.IsEmpty() {
16571		return nil
16572	}
16573	return *page.lbficlr.Value
16574}
16575
16576// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultPage type.
16577func NewLoadBalancerFrontendIPConfigurationListResultPage(cur LoadBalancerFrontendIPConfigurationListResult, getNextPage func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)) LoadBalancerFrontendIPConfigurationListResultPage {
16578	return LoadBalancerFrontendIPConfigurationListResultPage{
16579		fn:      getNextPage,
16580		lbficlr: cur,
16581	}
16582}
16583
16584// LoadBalancerListResult response for ListLoadBalancers API service call.
16585type LoadBalancerListResult struct {
16586	autorest.Response `json:"-"`
16587	// Value - A list of load balancers in a resource group.
16588	Value *[]LoadBalancer `json:"value,omitempty"`
16589	// NextLink - READ-ONLY; The URL to get the next set of results.
16590	NextLink *string `json:"nextLink,omitempty"`
16591}
16592
16593// MarshalJSON is the custom marshaler for LoadBalancerListResult.
16594func (lblr LoadBalancerListResult) MarshalJSON() ([]byte, error) {
16595	objectMap := make(map[string]interface{})
16596	if lblr.Value != nil {
16597		objectMap["value"] = lblr.Value
16598	}
16599	return json.Marshal(objectMap)
16600}
16601
16602// LoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values.
16603type LoadBalancerListResultIterator struct {
16604	i    int
16605	page LoadBalancerListResultPage
16606}
16607
16608// NextWithContext advances to the next value.  If there was an error making
16609// the request the iterator does not advance and the error is returned.
16610func (iter *LoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) {
16611	if tracing.IsEnabled() {
16612		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultIterator.NextWithContext")
16613		defer func() {
16614			sc := -1
16615			if iter.Response().Response.Response != nil {
16616				sc = iter.Response().Response.Response.StatusCode
16617			}
16618			tracing.EndSpan(ctx, sc, err)
16619		}()
16620	}
16621	iter.i++
16622	if iter.i < len(iter.page.Values()) {
16623		return nil
16624	}
16625	err = iter.page.NextWithContext(ctx)
16626	if err != nil {
16627		iter.i--
16628		return err
16629	}
16630	iter.i = 0
16631	return nil
16632}
16633
16634// Next advances to the next value.  If there was an error making
16635// the request the iterator does not advance and the error is returned.
16636// Deprecated: Use NextWithContext() instead.
16637func (iter *LoadBalancerListResultIterator) Next() error {
16638	return iter.NextWithContext(context.Background())
16639}
16640
16641// NotDone returns true if the enumeration should be started or is not yet complete.
16642func (iter LoadBalancerListResultIterator) NotDone() bool {
16643	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16644}
16645
16646// Response returns the raw server response from the last page request.
16647func (iter LoadBalancerListResultIterator) Response() LoadBalancerListResult {
16648	return iter.page.Response()
16649}
16650
16651// Value returns the current value or a zero-initialized value if the
16652// iterator has advanced beyond the end of the collection.
16653func (iter LoadBalancerListResultIterator) Value() LoadBalancer {
16654	if !iter.page.NotDone() {
16655		return LoadBalancer{}
16656	}
16657	return iter.page.Values()[iter.i]
16658}
16659
16660// Creates a new instance of the LoadBalancerListResultIterator type.
16661func NewLoadBalancerListResultIterator(page LoadBalancerListResultPage) LoadBalancerListResultIterator {
16662	return LoadBalancerListResultIterator{page: page}
16663}
16664
16665// IsEmpty returns true if the ListResult contains no values.
16666func (lblr LoadBalancerListResult) IsEmpty() bool {
16667	return lblr.Value == nil || len(*lblr.Value) == 0
16668}
16669
16670// hasNextLink returns true if the NextLink is not empty.
16671func (lblr LoadBalancerListResult) hasNextLink() bool {
16672	return lblr.NextLink != nil && len(*lblr.NextLink) != 0
16673}
16674
16675// loadBalancerListResultPreparer prepares a request to retrieve the next set of results.
16676// It returns nil if no more results exist.
16677func (lblr LoadBalancerListResult) loadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) {
16678	if !lblr.hasNextLink() {
16679		return nil, nil
16680	}
16681	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16682		autorest.AsJSON(),
16683		autorest.AsGet(),
16684		autorest.WithBaseURL(to.String(lblr.NextLink)))
16685}
16686
16687// LoadBalancerListResultPage contains a page of LoadBalancer values.
16688type LoadBalancerListResultPage struct {
16689	fn   func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)
16690	lblr LoadBalancerListResult
16691}
16692
16693// NextWithContext advances to the next page of values.  If there was an error making
16694// the request the page does not advance and the error is returned.
16695func (page *LoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) {
16696	if tracing.IsEnabled() {
16697		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultPage.NextWithContext")
16698		defer func() {
16699			sc := -1
16700			if page.Response().Response.Response != nil {
16701				sc = page.Response().Response.Response.StatusCode
16702			}
16703			tracing.EndSpan(ctx, sc, err)
16704		}()
16705	}
16706	for {
16707		next, err := page.fn(ctx, page.lblr)
16708		if err != nil {
16709			return err
16710		}
16711		page.lblr = next
16712		if !next.hasNextLink() || !next.IsEmpty() {
16713			break
16714		}
16715	}
16716	return nil
16717}
16718
16719// Next advances to the next page of values.  If there was an error making
16720// the request the page does not advance and the error is returned.
16721// Deprecated: Use NextWithContext() instead.
16722func (page *LoadBalancerListResultPage) Next() error {
16723	return page.NextWithContext(context.Background())
16724}
16725
16726// NotDone returns true if the page enumeration should be started or is not yet complete.
16727func (page LoadBalancerListResultPage) NotDone() bool {
16728	return !page.lblr.IsEmpty()
16729}
16730
16731// Response returns the raw server response from the last page request.
16732func (page LoadBalancerListResultPage) Response() LoadBalancerListResult {
16733	return page.lblr
16734}
16735
16736// Values returns the slice of values for the current page or nil if there are no values.
16737func (page LoadBalancerListResultPage) Values() []LoadBalancer {
16738	if page.lblr.IsEmpty() {
16739		return nil
16740	}
16741	return *page.lblr.Value
16742}
16743
16744// Creates a new instance of the LoadBalancerListResultPage type.
16745func NewLoadBalancerListResultPage(cur LoadBalancerListResult, getNextPage func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)) LoadBalancerListResultPage {
16746	return LoadBalancerListResultPage{
16747		fn:   getNextPage,
16748		lblr: cur,
16749	}
16750}
16751
16752// LoadBalancerLoadBalancingRuleListResult response for ListLoadBalancingRule API service call.
16753type LoadBalancerLoadBalancingRuleListResult struct {
16754	autorest.Response `json:"-"`
16755	// Value - A list of load balancing rules in a load balancer.
16756	Value *[]LoadBalancingRule `json:"value,omitempty"`
16757	// NextLink - READ-ONLY; The URL to get the next set of results.
16758	NextLink *string `json:"nextLink,omitempty"`
16759}
16760
16761// MarshalJSON is the custom marshaler for LoadBalancerLoadBalancingRuleListResult.
16762func (lblbrlr LoadBalancerLoadBalancingRuleListResult) MarshalJSON() ([]byte, error) {
16763	objectMap := make(map[string]interface{})
16764	if lblbrlr.Value != nil {
16765		objectMap["value"] = lblbrlr.Value
16766	}
16767	return json.Marshal(objectMap)
16768}
16769
16770// LoadBalancerLoadBalancingRuleListResultIterator provides access to a complete listing of
16771// LoadBalancingRule values.
16772type LoadBalancerLoadBalancingRuleListResultIterator struct {
16773	i    int
16774	page LoadBalancerLoadBalancingRuleListResultPage
16775}
16776
16777// NextWithContext advances to the next value.  If there was an error making
16778// the request the iterator does not advance and the error is returned.
16779func (iter *LoadBalancerLoadBalancingRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
16780	if tracing.IsEnabled() {
16781		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultIterator.NextWithContext")
16782		defer func() {
16783			sc := -1
16784			if iter.Response().Response.Response != nil {
16785				sc = iter.Response().Response.Response.StatusCode
16786			}
16787			tracing.EndSpan(ctx, sc, err)
16788		}()
16789	}
16790	iter.i++
16791	if iter.i < len(iter.page.Values()) {
16792		return nil
16793	}
16794	err = iter.page.NextWithContext(ctx)
16795	if err != nil {
16796		iter.i--
16797		return err
16798	}
16799	iter.i = 0
16800	return nil
16801}
16802
16803// Next advances to the next value.  If there was an error making
16804// the request the iterator does not advance and the error is returned.
16805// Deprecated: Use NextWithContext() instead.
16806func (iter *LoadBalancerLoadBalancingRuleListResultIterator) Next() error {
16807	return iter.NextWithContext(context.Background())
16808}
16809
16810// NotDone returns true if the enumeration should be started or is not yet complete.
16811func (iter LoadBalancerLoadBalancingRuleListResultIterator) NotDone() bool {
16812	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16813}
16814
16815// Response returns the raw server response from the last page request.
16816func (iter LoadBalancerLoadBalancingRuleListResultIterator) Response() LoadBalancerLoadBalancingRuleListResult {
16817	return iter.page.Response()
16818}
16819
16820// Value returns the current value or a zero-initialized value if the
16821// iterator has advanced beyond the end of the collection.
16822func (iter LoadBalancerLoadBalancingRuleListResultIterator) Value() LoadBalancingRule {
16823	if !iter.page.NotDone() {
16824		return LoadBalancingRule{}
16825	}
16826	return iter.page.Values()[iter.i]
16827}
16828
16829// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultIterator type.
16830func NewLoadBalancerLoadBalancingRuleListResultIterator(page LoadBalancerLoadBalancingRuleListResultPage) LoadBalancerLoadBalancingRuleListResultIterator {
16831	return LoadBalancerLoadBalancingRuleListResultIterator{page: page}
16832}
16833
16834// IsEmpty returns true if the ListResult contains no values.
16835func (lblbrlr LoadBalancerLoadBalancingRuleListResult) IsEmpty() bool {
16836	return lblbrlr.Value == nil || len(*lblbrlr.Value) == 0
16837}
16838
16839// hasNextLink returns true if the NextLink is not empty.
16840func (lblbrlr LoadBalancerLoadBalancingRuleListResult) hasNextLink() bool {
16841	return lblbrlr.NextLink != nil && len(*lblbrlr.NextLink) != 0
16842}
16843
16844// loadBalancerLoadBalancingRuleListResultPreparer prepares a request to retrieve the next set of results.
16845// It returns nil if no more results exist.
16846func (lblbrlr LoadBalancerLoadBalancingRuleListResult) loadBalancerLoadBalancingRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
16847	if !lblbrlr.hasNextLink() {
16848		return nil, nil
16849	}
16850	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16851		autorest.AsJSON(),
16852		autorest.AsGet(),
16853		autorest.WithBaseURL(to.String(lblbrlr.NextLink)))
16854}
16855
16856// LoadBalancerLoadBalancingRuleListResultPage contains a page of LoadBalancingRule values.
16857type LoadBalancerLoadBalancingRuleListResultPage struct {
16858	fn      func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)
16859	lblbrlr LoadBalancerLoadBalancingRuleListResult
16860}
16861
16862// NextWithContext advances to the next page of values.  If there was an error making
16863// the request the page does not advance and the error is returned.
16864func (page *LoadBalancerLoadBalancingRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
16865	if tracing.IsEnabled() {
16866		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultPage.NextWithContext")
16867		defer func() {
16868			sc := -1
16869			if page.Response().Response.Response != nil {
16870				sc = page.Response().Response.Response.StatusCode
16871			}
16872			tracing.EndSpan(ctx, sc, err)
16873		}()
16874	}
16875	for {
16876		next, err := page.fn(ctx, page.lblbrlr)
16877		if err != nil {
16878			return err
16879		}
16880		page.lblbrlr = next
16881		if !next.hasNextLink() || !next.IsEmpty() {
16882			break
16883		}
16884	}
16885	return nil
16886}
16887
16888// Next advances to the next page of values.  If there was an error making
16889// the request the page does not advance and the error is returned.
16890// Deprecated: Use NextWithContext() instead.
16891func (page *LoadBalancerLoadBalancingRuleListResultPage) Next() error {
16892	return page.NextWithContext(context.Background())
16893}
16894
16895// NotDone returns true if the page enumeration should be started or is not yet complete.
16896func (page LoadBalancerLoadBalancingRuleListResultPage) NotDone() bool {
16897	return !page.lblbrlr.IsEmpty()
16898}
16899
16900// Response returns the raw server response from the last page request.
16901func (page LoadBalancerLoadBalancingRuleListResultPage) Response() LoadBalancerLoadBalancingRuleListResult {
16902	return page.lblbrlr
16903}
16904
16905// Values returns the slice of values for the current page or nil if there are no values.
16906func (page LoadBalancerLoadBalancingRuleListResultPage) Values() []LoadBalancingRule {
16907	if page.lblbrlr.IsEmpty() {
16908		return nil
16909	}
16910	return *page.lblbrlr.Value
16911}
16912
16913// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultPage type.
16914func NewLoadBalancerLoadBalancingRuleListResultPage(cur LoadBalancerLoadBalancingRuleListResult, getNextPage func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)) LoadBalancerLoadBalancingRuleListResultPage {
16915	return LoadBalancerLoadBalancingRuleListResultPage{
16916		fn:      getNextPage,
16917		lblbrlr: cur,
16918	}
16919}
16920
16921// LoadBalancerOutboundRuleListResult response for ListOutboundRule API service call.
16922type LoadBalancerOutboundRuleListResult struct {
16923	autorest.Response `json:"-"`
16924	// Value - A list of outbound rules in a load balancer.
16925	Value *[]OutboundRule `json:"value,omitempty"`
16926	// NextLink - READ-ONLY; The URL to get the next set of results.
16927	NextLink *string `json:"nextLink,omitempty"`
16928}
16929
16930// MarshalJSON is the custom marshaler for LoadBalancerOutboundRuleListResult.
16931func (lborlr LoadBalancerOutboundRuleListResult) MarshalJSON() ([]byte, error) {
16932	objectMap := make(map[string]interface{})
16933	if lborlr.Value != nil {
16934		objectMap["value"] = lborlr.Value
16935	}
16936	return json.Marshal(objectMap)
16937}
16938
16939// LoadBalancerOutboundRuleListResultIterator provides access to a complete listing of OutboundRule values.
16940type LoadBalancerOutboundRuleListResultIterator struct {
16941	i    int
16942	page LoadBalancerOutboundRuleListResultPage
16943}
16944
16945// NextWithContext advances to the next value.  If there was an error making
16946// the request the iterator does not advance and the error is returned.
16947func (iter *LoadBalancerOutboundRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
16948	if tracing.IsEnabled() {
16949		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerOutboundRuleListResultIterator.NextWithContext")
16950		defer func() {
16951			sc := -1
16952			if iter.Response().Response.Response != nil {
16953				sc = iter.Response().Response.Response.StatusCode
16954			}
16955			tracing.EndSpan(ctx, sc, err)
16956		}()
16957	}
16958	iter.i++
16959	if iter.i < len(iter.page.Values()) {
16960		return nil
16961	}
16962	err = iter.page.NextWithContext(ctx)
16963	if err != nil {
16964		iter.i--
16965		return err
16966	}
16967	iter.i = 0
16968	return nil
16969}
16970
16971// Next advances to the next value.  If there was an error making
16972// the request the iterator does not advance and the error is returned.
16973// Deprecated: Use NextWithContext() instead.
16974func (iter *LoadBalancerOutboundRuleListResultIterator) Next() error {
16975	return iter.NextWithContext(context.Background())
16976}
16977
16978// NotDone returns true if the enumeration should be started or is not yet complete.
16979func (iter LoadBalancerOutboundRuleListResultIterator) NotDone() bool {
16980	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16981}
16982
16983// Response returns the raw server response from the last page request.
16984func (iter LoadBalancerOutboundRuleListResultIterator) Response() LoadBalancerOutboundRuleListResult {
16985	return iter.page.Response()
16986}
16987
16988// Value returns the current value or a zero-initialized value if the
16989// iterator has advanced beyond the end of the collection.
16990func (iter LoadBalancerOutboundRuleListResultIterator) Value() OutboundRule {
16991	if !iter.page.NotDone() {
16992		return OutboundRule{}
16993	}
16994	return iter.page.Values()[iter.i]
16995}
16996
16997// Creates a new instance of the LoadBalancerOutboundRuleListResultIterator type.
16998func NewLoadBalancerOutboundRuleListResultIterator(page LoadBalancerOutboundRuleListResultPage) LoadBalancerOutboundRuleListResultIterator {
16999	return LoadBalancerOutboundRuleListResultIterator{page: page}
17000}
17001
17002// IsEmpty returns true if the ListResult contains no values.
17003func (lborlr LoadBalancerOutboundRuleListResult) IsEmpty() bool {
17004	return lborlr.Value == nil || len(*lborlr.Value) == 0
17005}
17006
17007// hasNextLink returns true if the NextLink is not empty.
17008func (lborlr LoadBalancerOutboundRuleListResult) hasNextLink() bool {
17009	return lborlr.NextLink != nil && len(*lborlr.NextLink) != 0
17010}
17011
17012// loadBalancerOutboundRuleListResultPreparer prepares a request to retrieve the next set of results.
17013// It returns nil if no more results exist.
17014func (lborlr LoadBalancerOutboundRuleListResult) loadBalancerOutboundRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
17015	if !lborlr.hasNextLink() {
17016		return nil, nil
17017	}
17018	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17019		autorest.AsJSON(),
17020		autorest.AsGet(),
17021		autorest.WithBaseURL(to.String(lborlr.NextLink)))
17022}
17023
17024// LoadBalancerOutboundRuleListResultPage contains a page of OutboundRule values.
17025type LoadBalancerOutboundRuleListResultPage struct {
17026	fn     func(context.Context, LoadBalancerOutboundRuleListResult) (LoadBalancerOutboundRuleListResult, error)
17027	lborlr LoadBalancerOutboundRuleListResult
17028}
17029
17030// NextWithContext advances to the next page of values.  If there was an error making
17031// the request the page does not advance and the error is returned.
17032func (page *LoadBalancerOutboundRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
17033	if tracing.IsEnabled() {
17034		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerOutboundRuleListResultPage.NextWithContext")
17035		defer func() {
17036			sc := -1
17037			if page.Response().Response.Response != nil {
17038				sc = page.Response().Response.Response.StatusCode
17039			}
17040			tracing.EndSpan(ctx, sc, err)
17041		}()
17042	}
17043	for {
17044		next, err := page.fn(ctx, page.lborlr)
17045		if err != nil {
17046			return err
17047		}
17048		page.lborlr = next
17049		if !next.hasNextLink() || !next.IsEmpty() {
17050			break
17051		}
17052	}
17053	return nil
17054}
17055
17056// Next advances to the next page of values.  If there was an error making
17057// the request the page does not advance and the error is returned.
17058// Deprecated: Use NextWithContext() instead.
17059func (page *LoadBalancerOutboundRuleListResultPage) Next() error {
17060	return page.NextWithContext(context.Background())
17061}
17062
17063// NotDone returns true if the page enumeration should be started or is not yet complete.
17064func (page LoadBalancerOutboundRuleListResultPage) NotDone() bool {
17065	return !page.lborlr.IsEmpty()
17066}
17067
17068// Response returns the raw server response from the last page request.
17069func (page LoadBalancerOutboundRuleListResultPage) Response() LoadBalancerOutboundRuleListResult {
17070	return page.lborlr
17071}
17072
17073// Values returns the slice of values for the current page or nil if there are no values.
17074func (page LoadBalancerOutboundRuleListResultPage) Values() []OutboundRule {
17075	if page.lborlr.IsEmpty() {
17076		return nil
17077	}
17078	return *page.lborlr.Value
17079}
17080
17081// Creates a new instance of the LoadBalancerOutboundRuleListResultPage type.
17082func NewLoadBalancerOutboundRuleListResultPage(cur LoadBalancerOutboundRuleListResult, getNextPage func(context.Context, LoadBalancerOutboundRuleListResult) (LoadBalancerOutboundRuleListResult, error)) LoadBalancerOutboundRuleListResultPage {
17083	return LoadBalancerOutboundRuleListResultPage{
17084		fn:     getNextPage,
17085		lborlr: cur,
17086	}
17087}
17088
17089// LoadBalancerProbeListResult response for ListProbe API service call.
17090type LoadBalancerProbeListResult struct {
17091	autorest.Response `json:"-"`
17092	// Value - A list of probes in a load balancer.
17093	Value *[]Probe `json:"value,omitempty"`
17094	// NextLink - READ-ONLY; The URL to get the next set of results.
17095	NextLink *string `json:"nextLink,omitempty"`
17096}
17097
17098// MarshalJSON is the custom marshaler for LoadBalancerProbeListResult.
17099func (lbplr LoadBalancerProbeListResult) MarshalJSON() ([]byte, error) {
17100	objectMap := make(map[string]interface{})
17101	if lbplr.Value != nil {
17102		objectMap["value"] = lbplr.Value
17103	}
17104	return json.Marshal(objectMap)
17105}
17106
17107// LoadBalancerProbeListResultIterator provides access to a complete listing of Probe values.
17108type LoadBalancerProbeListResultIterator struct {
17109	i    int
17110	page LoadBalancerProbeListResultPage
17111}
17112
17113// NextWithContext advances to the next value.  If there was an error making
17114// the request the iterator does not advance and the error is returned.
17115func (iter *LoadBalancerProbeListResultIterator) NextWithContext(ctx context.Context) (err error) {
17116	if tracing.IsEnabled() {
17117		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultIterator.NextWithContext")
17118		defer func() {
17119			sc := -1
17120			if iter.Response().Response.Response != nil {
17121				sc = iter.Response().Response.Response.StatusCode
17122			}
17123			tracing.EndSpan(ctx, sc, err)
17124		}()
17125	}
17126	iter.i++
17127	if iter.i < len(iter.page.Values()) {
17128		return nil
17129	}
17130	err = iter.page.NextWithContext(ctx)
17131	if err != nil {
17132		iter.i--
17133		return err
17134	}
17135	iter.i = 0
17136	return nil
17137}
17138
17139// Next advances to the next value.  If there was an error making
17140// the request the iterator does not advance and the error is returned.
17141// Deprecated: Use NextWithContext() instead.
17142func (iter *LoadBalancerProbeListResultIterator) Next() error {
17143	return iter.NextWithContext(context.Background())
17144}
17145
17146// NotDone returns true if the enumeration should be started or is not yet complete.
17147func (iter LoadBalancerProbeListResultIterator) NotDone() bool {
17148	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17149}
17150
17151// Response returns the raw server response from the last page request.
17152func (iter LoadBalancerProbeListResultIterator) Response() LoadBalancerProbeListResult {
17153	return iter.page.Response()
17154}
17155
17156// Value returns the current value or a zero-initialized value if the
17157// iterator has advanced beyond the end of the collection.
17158func (iter LoadBalancerProbeListResultIterator) Value() Probe {
17159	if !iter.page.NotDone() {
17160		return Probe{}
17161	}
17162	return iter.page.Values()[iter.i]
17163}
17164
17165// Creates a new instance of the LoadBalancerProbeListResultIterator type.
17166func NewLoadBalancerProbeListResultIterator(page LoadBalancerProbeListResultPage) LoadBalancerProbeListResultIterator {
17167	return LoadBalancerProbeListResultIterator{page: page}
17168}
17169
17170// IsEmpty returns true if the ListResult contains no values.
17171func (lbplr LoadBalancerProbeListResult) IsEmpty() bool {
17172	return lbplr.Value == nil || len(*lbplr.Value) == 0
17173}
17174
17175// hasNextLink returns true if the NextLink is not empty.
17176func (lbplr LoadBalancerProbeListResult) hasNextLink() bool {
17177	return lbplr.NextLink != nil && len(*lbplr.NextLink) != 0
17178}
17179
17180// loadBalancerProbeListResultPreparer prepares a request to retrieve the next set of results.
17181// It returns nil if no more results exist.
17182func (lbplr LoadBalancerProbeListResult) loadBalancerProbeListResultPreparer(ctx context.Context) (*http.Request, error) {
17183	if !lbplr.hasNextLink() {
17184		return nil, nil
17185	}
17186	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17187		autorest.AsJSON(),
17188		autorest.AsGet(),
17189		autorest.WithBaseURL(to.String(lbplr.NextLink)))
17190}
17191
17192// LoadBalancerProbeListResultPage contains a page of Probe values.
17193type LoadBalancerProbeListResultPage struct {
17194	fn    func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)
17195	lbplr LoadBalancerProbeListResult
17196}
17197
17198// NextWithContext advances to the next page of values.  If there was an error making
17199// the request the page does not advance and the error is returned.
17200func (page *LoadBalancerProbeListResultPage) NextWithContext(ctx context.Context) (err error) {
17201	if tracing.IsEnabled() {
17202		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultPage.NextWithContext")
17203		defer func() {
17204			sc := -1
17205			if page.Response().Response.Response != nil {
17206				sc = page.Response().Response.Response.StatusCode
17207			}
17208			tracing.EndSpan(ctx, sc, err)
17209		}()
17210	}
17211	for {
17212		next, err := page.fn(ctx, page.lbplr)
17213		if err != nil {
17214			return err
17215		}
17216		page.lbplr = next
17217		if !next.hasNextLink() || !next.IsEmpty() {
17218			break
17219		}
17220	}
17221	return nil
17222}
17223
17224// Next advances to the next page of values.  If there was an error making
17225// the request the page does not advance and the error is returned.
17226// Deprecated: Use NextWithContext() instead.
17227func (page *LoadBalancerProbeListResultPage) Next() error {
17228	return page.NextWithContext(context.Background())
17229}
17230
17231// NotDone returns true if the page enumeration should be started or is not yet complete.
17232func (page LoadBalancerProbeListResultPage) NotDone() bool {
17233	return !page.lbplr.IsEmpty()
17234}
17235
17236// Response returns the raw server response from the last page request.
17237func (page LoadBalancerProbeListResultPage) Response() LoadBalancerProbeListResult {
17238	return page.lbplr
17239}
17240
17241// Values returns the slice of values for the current page or nil if there are no values.
17242func (page LoadBalancerProbeListResultPage) Values() []Probe {
17243	if page.lbplr.IsEmpty() {
17244		return nil
17245	}
17246	return *page.lbplr.Value
17247}
17248
17249// Creates a new instance of the LoadBalancerProbeListResultPage type.
17250func NewLoadBalancerProbeListResultPage(cur LoadBalancerProbeListResult, getNextPage func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)) LoadBalancerProbeListResultPage {
17251	return LoadBalancerProbeListResultPage{
17252		fn:    getNextPage,
17253		lbplr: cur,
17254	}
17255}
17256
17257// LoadBalancerPropertiesFormat properties of the load balancer.
17258type LoadBalancerPropertiesFormat struct {
17259	// FrontendIPConfigurations - Object representing the frontend IPs to be used for the load balancer
17260	FrontendIPConfigurations *[]FrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"`
17261	// BackendAddressPools - Collection of backend address pools used by a load balancer
17262	BackendAddressPools *[]BackendAddressPool `json:"backendAddressPools,omitempty"`
17263	// LoadBalancingRules - Object collection representing the load balancing rules Gets the provisioning
17264	LoadBalancingRules *[]LoadBalancingRule `json:"loadBalancingRules,omitempty"`
17265	// Probes - Collection of probe objects used in the load balancer
17266	Probes *[]Probe `json:"probes,omitempty"`
17267	// 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.
17268	InboundNatRules *[]InboundNatRule `json:"inboundNatRules,omitempty"`
17269	// 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.
17270	InboundNatPools *[]InboundNatPool `json:"inboundNatPools,omitempty"`
17271	// OutboundRules - The outbound rules.
17272	OutboundRules *[]OutboundRule `json:"outboundRules,omitempty"`
17273	// ResourceGUID - The resource GUID property of the load balancer resource.
17274	ResourceGUID *string `json:"resourceGuid,omitempty"`
17275	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
17276	ProvisioningState *string `json:"provisioningState,omitempty"`
17277}
17278
17279// LoadBalancersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
17280// long-running operation.
17281type LoadBalancersCreateOrUpdateFuture struct {
17282	azure.FutureAPI
17283	// Result returns the result of the asynchronous operation.
17284	// If the operation has not completed it will return an error.
17285	Result func(LoadBalancersClient) (LoadBalancer, error)
17286}
17287
17288// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17289func (future *LoadBalancersCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
17290	var azFuture azure.Future
17291	if err := json.Unmarshal(body, &azFuture); err != nil {
17292		return err
17293	}
17294	future.FutureAPI = &azFuture
17295	future.Result = future.result
17296	return nil
17297}
17298
17299// result is the default implementation for LoadBalancersCreateOrUpdateFuture.Result.
17300func (future *LoadBalancersCreateOrUpdateFuture) result(client LoadBalancersClient) (lb LoadBalancer, err error) {
17301	var done bool
17302	done, err = future.DoneWithContext(context.Background(), client)
17303	if err != nil {
17304		err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
17305		return
17306	}
17307	if !done {
17308		lb.Response.Response = future.Response()
17309		err = azure.NewAsyncOpIncompleteError("network.LoadBalancersCreateOrUpdateFuture")
17310		return
17311	}
17312	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17313	if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent {
17314		lb, err = client.CreateOrUpdateResponder(lb.Response.Response)
17315		if err != nil {
17316			err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", lb.Response.Response, "Failure responding to request")
17317		}
17318	}
17319	return
17320}
17321
17322// LoadBalancersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
17323// operation.
17324type LoadBalancersDeleteFuture struct {
17325	azure.FutureAPI
17326	// Result returns the result of the asynchronous operation.
17327	// If the operation has not completed it will return an error.
17328	Result func(LoadBalancersClient) (autorest.Response, error)
17329}
17330
17331// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17332func (future *LoadBalancersDeleteFuture) UnmarshalJSON(body []byte) error {
17333	var azFuture azure.Future
17334	if err := json.Unmarshal(body, &azFuture); err != nil {
17335		return err
17336	}
17337	future.FutureAPI = &azFuture
17338	future.Result = future.result
17339	return nil
17340}
17341
17342// result is the default implementation for LoadBalancersDeleteFuture.Result.
17343func (future *LoadBalancersDeleteFuture) result(client LoadBalancersClient) (ar autorest.Response, err error) {
17344	var done bool
17345	done, err = future.DoneWithContext(context.Background(), client)
17346	if err != nil {
17347		err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", future.Response(), "Polling failure")
17348		return
17349	}
17350	if !done {
17351		ar.Response = future.Response()
17352		err = azure.NewAsyncOpIncompleteError("network.LoadBalancersDeleteFuture")
17353		return
17354	}
17355	ar.Response = future.Response()
17356	return
17357}
17358
17359// LoadBalancerSku SKU of a load balancer
17360type LoadBalancerSku struct {
17361	// Name - Name of a load balancer SKU. Possible values include: 'LoadBalancerSkuNameBasic', 'LoadBalancerSkuNameStandard'
17362	Name LoadBalancerSkuName `json:"name,omitempty"`
17363}
17364
17365// LoadBalancersUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
17366// operation.
17367type LoadBalancersUpdateTagsFuture struct {
17368	azure.FutureAPI
17369	// Result returns the result of the asynchronous operation.
17370	// If the operation has not completed it will return an error.
17371	Result func(LoadBalancersClient) (LoadBalancer, error)
17372}
17373
17374// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17375func (future *LoadBalancersUpdateTagsFuture) UnmarshalJSON(body []byte) error {
17376	var azFuture azure.Future
17377	if err := json.Unmarshal(body, &azFuture); err != nil {
17378		return err
17379	}
17380	future.FutureAPI = &azFuture
17381	future.Result = future.result
17382	return nil
17383}
17384
17385// result is the default implementation for LoadBalancersUpdateTagsFuture.Result.
17386func (future *LoadBalancersUpdateTagsFuture) result(client LoadBalancersClient) (lb LoadBalancer, err error) {
17387	var done bool
17388	done, err = future.DoneWithContext(context.Background(), client)
17389	if err != nil {
17390		err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", future.Response(), "Polling failure")
17391		return
17392	}
17393	if !done {
17394		lb.Response.Response = future.Response()
17395		err = azure.NewAsyncOpIncompleteError("network.LoadBalancersUpdateTagsFuture")
17396		return
17397	}
17398	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17399	if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent {
17400		lb, err = client.UpdateTagsResponder(lb.Response.Response)
17401		if err != nil {
17402			err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", lb.Response.Response, "Failure responding to request")
17403		}
17404	}
17405	return
17406}
17407
17408// LoadBalancingRule a load balancing rule for a load balancer.
17409type LoadBalancingRule struct {
17410	autorest.Response `json:"-"`
17411	// LoadBalancingRulePropertiesFormat - Properties of load balancer load balancing rule.
17412	*LoadBalancingRulePropertiesFormat `json:"properties,omitempty"`
17413	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
17414	Name *string `json:"name,omitempty"`
17415	// Etag - A unique read-only string that changes whenever the resource is updated.
17416	Etag *string `json:"etag,omitempty"`
17417	// ID - Resource ID.
17418	ID *string `json:"id,omitempty"`
17419}
17420
17421// MarshalJSON is the custom marshaler for LoadBalancingRule.
17422func (lbr LoadBalancingRule) MarshalJSON() ([]byte, error) {
17423	objectMap := make(map[string]interface{})
17424	if lbr.LoadBalancingRulePropertiesFormat != nil {
17425		objectMap["properties"] = lbr.LoadBalancingRulePropertiesFormat
17426	}
17427	if lbr.Name != nil {
17428		objectMap["name"] = lbr.Name
17429	}
17430	if lbr.Etag != nil {
17431		objectMap["etag"] = lbr.Etag
17432	}
17433	if lbr.ID != nil {
17434		objectMap["id"] = lbr.ID
17435	}
17436	return json.Marshal(objectMap)
17437}
17438
17439// UnmarshalJSON is the custom unmarshaler for LoadBalancingRule struct.
17440func (lbr *LoadBalancingRule) UnmarshalJSON(body []byte) error {
17441	var m map[string]*json.RawMessage
17442	err := json.Unmarshal(body, &m)
17443	if err != nil {
17444		return err
17445	}
17446	for k, v := range m {
17447		switch k {
17448		case "properties":
17449			if v != nil {
17450				var loadBalancingRulePropertiesFormat LoadBalancingRulePropertiesFormat
17451				err = json.Unmarshal(*v, &loadBalancingRulePropertiesFormat)
17452				if err != nil {
17453					return err
17454				}
17455				lbr.LoadBalancingRulePropertiesFormat = &loadBalancingRulePropertiesFormat
17456			}
17457		case "name":
17458			if v != nil {
17459				var name string
17460				err = json.Unmarshal(*v, &name)
17461				if err != nil {
17462					return err
17463				}
17464				lbr.Name = &name
17465			}
17466		case "etag":
17467			if v != nil {
17468				var etag string
17469				err = json.Unmarshal(*v, &etag)
17470				if err != nil {
17471					return err
17472				}
17473				lbr.Etag = &etag
17474			}
17475		case "id":
17476			if v != nil {
17477				var ID string
17478				err = json.Unmarshal(*v, &ID)
17479				if err != nil {
17480					return err
17481				}
17482				lbr.ID = &ID
17483			}
17484		}
17485	}
17486
17487	return nil
17488}
17489
17490// LoadBalancingRulePropertiesFormat properties of the load balancer.
17491type LoadBalancingRulePropertiesFormat struct {
17492	// FrontendIPConfiguration - A reference to frontend IP addresses.
17493	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
17494	// BackendAddressPool - A reference to a pool of DIPs. Inbound traffic is randomly load balanced across IPs in the backend IPs.
17495	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
17496	// Probe - The reference of the load balancer probe used by the load balancing rule.
17497	Probe *SubResource `json:"probe,omitempty"`
17498	// Protocol - Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
17499	Protocol TransportProtocol `json:"protocol,omitempty"`
17500	// LoadDistribution - The load distribution policy for this rule. Possible values are 'Default', 'SourceIP', and 'SourceIPProtocol'. Possible values include: 'LoadDistributionDefault', 'LoadDistributionSourceIP', 'LoadDistributionSourceIPProtocol'
17501	LoadDistribution LoadDistribution `json:"loadDistribution,omitempty"`
17502	// 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"
17503	FrontendPort *int32 `json:"frontendPort,omitempty"`
17504	// BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 0 and 65535. Note that value 0 enables "Any Port"
17505	BackendPort *int32 `json:"backendPort,omitempty"`
17506	// 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.
17507	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
17508	// 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.
17509	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
17510	// 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.
17511	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
17512	// DisableOutboundSnat - Configures SNAT for the VMs in the backend pool to use the publicIP address specified in the frontend of the load balancing rule.
17513	DisableOutboundSnat *bool `json:"disableOutboundSnat,omitempty"`
17514	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
17515	ProvisioningState *string `json:"provisioningState,omitempty"`
17516}
17517
17518// LocalNetworkGateway a common class for general resource information
17519type LocalNetworkGateway struct {
17520	autorest.Response `json:"-"`
17521	// LocalNetworkGatewayPropertiesFormat - Properties of the local network gateway.
17522	*LocalNetworkGatewayPropertiesFormat `json:"properties,omitempty"`
17523	// Etag - A unique read-only string that changes whenever the resource is updated.
17524	Etag *string `json:"etag,omitempty"`
17525	// ID - Resource ID.
17526	ID *string `json:"id,omitempty"`
17527	// Name - READ-ONLY; Resource name.
17528	Name *string `json:"name,omitempty"`
17529	// Type - READ-ONLY; Resource type.
17530	Type *string `json:"type,omitempty"`
17531	// Location - Resource location.
17532	Location *string `json:"location,omitempty"`
17533	// Tags - Resource tags.
17534	Tags map[string]*string `json:"tags"`
17535}
17536
17537// MarshalJSON is the custom marshaler for LocalNetworkGateway.
17538func (lng LocalNetworkGateway) MarshalJSON() ([]byte, error) {
17539	objectMap := make(map[string]interface{})
17540	if lng.LocalNetworkGatewayPropertiesFormat != nil {
17541		objectMap["properties"] = lng.LocalNetworkGatewayPropertiesFormat
17542	}
17543	if lng.Etag != nil {
17544		objectMap["etag"] = lng.Etag
17545	}
17546	if lng.ID != nil {
17547		objectMap["id"] = lng.ID
17548	}
17549	if lng.Location != nil {
17550		objectMap["location"] = lng.Location
17551	}
17552	if lng.Tags != nil {
17553		objectMap["tags"] = lng.Tags
17554	}
17555	return json.Marshal(objectMap)
17556}
17557
17558// UnmarshalJSON is the custom unmarshaler for LocalNetworkGateway struct.
17559func (lng *LocalNetworkGateway) UnmarshalJSON(body []byte) error {
17560	var m map[string]*json.RawMessage
17561	err := json.Unmarshal(body, &m)
17562	if err != nil {
17563		return err
17564	}
17565	for k, v := range m {
17566		switch k {
17567		case "properties":
17568			if v != nil {
17569				var localNetworkGatewayPropertiesFormat LocalNetworkGatewayPropertiesFormat
17570				err = json.Unmarshal(*v, &localNetworkGatewayPropertiesFormat)
17571				if err != nil {
17572					return err
17573				}
17574				lng.LocalNetworkGatewayPropertiesFormat = &localNetworkGatewayPropertiesFormat
17575			}
17576		case "etag":
17577			if v != nil {
17578				var etag string
17579				err = json.Unmarshal(*v, &etag)
17580				if err != nil {
17581					return err
17582				}
17583				lng.Etag = &etag
17584			}
17585		case "id":
17586			if v != nil {
17587				var ID string
17588				err = json.Unmarshal(*v, &ID)
17589				if err != nil {
17590					return err
17591				}
17592				lng.ID = &ID
17593			}
17594		case "name":
17595			if v != nil {
17596				var name string
17597				err = json.Unmarshal(*v, &name)
17598				if err != nil {
17599					return err
17600				}
17601				lng.Name = &name
17602			}
17603		case "type":
17604			if v != nil {
17605				var typeVar string
17606				err = json.Unmarshal(*v, &typeVar)
17607				if err != nil {
17608					return err
17609				}
17610				lng.Type = &typeVar
17611			}
17612		case "location":
17613			if v != nil {
17614				var location string
17615				err = json.Unmarshal(*v, &location)
17616				if err != nil {
17617					return err
17618				}
17619				lng.Location = &location
17620			}
17621		case "tags":
17622			if v != nil {
17623				var tags map[string]*string
17624				err = json.Unmarshal(*v, &tags)
17625				if err != nil {
17626					return err
17627				}
17628				lng.Tags = tags
17629			}
17630		}
17631	}
17632
17633	return nil
17634}
17635
17636// LocalNetworkGatewayListResult response for ListLocalNetworkGateways API service call.
17637type LocalNetworkGatewayListResult struct {
17638	autorest.Response `json:"-"`
17639	// Value - A list of local network gateways that exists in a resource group.
17640	Value *[]LocalNetworkGateway `json:"value,omitempty"`
17641	// NextLink - READ-ONLY; The URL to get the next set of results.
17642	NextLink *string `json:"nextLink,omitempty"`
17643}
17644
17645// MarshalJSON is the custom marshaler for LocalNetworkGatewayListResult.
17646func (lnglr LocalNetworkGatewayListResult) MarshalJSON() ([]byte, error) {
17647	objectMap := make(map[string]interface{})
17648	if lnglr.Value != nil {
17649		objectMap["value"] = lnglr.Value
17650	}
17651	return json.Marshal(objectMap)
17652}
17653
17654// LocalNetworkGatewayListResultIterator provides access to a complete listing of LocalNetworkGateway
17655// values.
17656type LocalNetworkGatewayListResultIterator struct {
17657	i    int
17658	page LocalNetworkGatewayListResultPage
17659}
17660
17661// NextWithContext advances to the next value.  If there was an error making
17662// the request the iterator does not advance and the error is returned.
17663func (iter *LocalNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
17664	if tracing.IsEnabled() {
17665		ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultIterator.NextWithContext")
17666		defer func() {
17667			sc := -1
17668			if iter.Response().Response.Response != nil {
17669				sc = iter.Response().Response.Response.StatusCode
17670			}
17671			tracing.EndSpan(ctx, sc, err)
17672		}()
17673	}
17674	iter.i++
17675	if iter.i < len(iter.page.Values()) {
17676		return nil
17677	}
17678	err = iter.page.NextWithContext(ctx)
17679	if err != nil {
17680		iter.i--
17681		return err
17682	}
17683	iter.i = 0
17684	return nil
17685}
17686
17687// Next advances to the next value.  If there was an error making
17688// the request the iterator does not advance and the error is returned.
17689// Deprecated: Use NextWithContext() instead.
17690func (iter *LocalNetworkGatewayListResultIterator) Next() error {
17691	return iter.NextWithContext(context.Background())
17692}
17693
17694// NotDone returns true if the enumeration should be started or is not yet complete.
17695func (iter LocalNetworkGatewayListResultIterator) NotDone() bool {
17696	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17697}
17698
17699// Response returns the raw server response from the last page request.
17700func (iter LocalNetworkGatewayListResultIterator) Response() LocalNetworkGatewayListResult {
17701	return iter.page.Response()
17702}
17703
17704// Value returns the current value or a zero-initialized value if the
17705// iterator has advanced beyond the end of the collection.
17706func (iter LocalNetworkGatewayListResultIterator) Value() LocalNetworkGateway {
17707	if !iter.page.NotDone() {
17708		return LocalNetworkGateway{}
17709	}
17710	return iter.page.Values()[iter.i]
17711}
17712
17713// Creates a new instance of the LocalNetworkGatewayListResultIterator type.
17714func NewLocalNetworkGatewayListResultIterator(page LocalNetworkGatewayListResultPage) LocalNetworkGatewayListResultIterator {
17715	return LocalNetworkGatewayListResultIterator{page: page}
17716}
17717
17718// IsEmpty returns true if the ListResult contains no values.
17719func (lnglr LocalNetworkGatewayListResult) IsEmpty() bool {
17720	return lnglr.Value == nil || len(*lnglr.Value) == 0
17721}
17722
17723// hasNextLink returns true if the NextLink is not empty.
17724func (lnglr LocalNetworkGatewayListResult) hasNextLink() bool {
17725	return lnglr.NextLink != nil && len(*lnglr.NextLink) != 0
17726}
17727
17728// localNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results.
17729// It returns nil if no more results exist.
17730func (lnglr LocalNetworkGatewayListResult) localNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
17731	if !lnglr.hasNextLink() {
17732		return nil, nil
17733	}
17734	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17735		autorest.AsJSON(),
17736		autorest.AsGet(),
17737		autorest.WithBaseURL(to.String(lnglr.NextLink)))
17738}
17739
17740// LocalNetworkGatewayListResultPage contains a page of LocalNetworkGateway values.
17741type LocalNetworkGatewayListResultPage struct {
17742	fn    func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)
17743	lnglr LocalNetworkGatewayListResult
17744}
17745
17746// NextWithContext advances to the next page of values.  If there was an error making
17747// the request the page does not advance and the error is returned.
17748func (page *LocalNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
17749	if tracing.IsEnabled() {
17750		ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultPage.NextWithContext")
17751		defer func() {
17752			sc := -1
17753			if page.Response().Response.Response != nil {
17754				sc = page.Response().Response.Response.StatusCode
17755			}
17756			tracing.EndSpan(ctx, sc, err)
17757		}()
17758	}
17759	for {
17760		next, err := page.fn(ctx, page.lnglr)
17761		if err != nil {
17762			return err
17763		}
17764		page.lnglr = next
17765		if !next.hasNextLink() || !next.IsEmpty() {
17766			break
17767		}
17768	}
17769	return nil
17770}
17771
17772// Next advances to the next page of values.  If there was an error making
17773// the request the page does not advance and the error is returned.
17774// Deprecated: Use NextWithContext() instead.
17775func (page *LocalNetworkGatewayListResultPage) Next() error {
17776	return page.NextWithContext(context.Background())
17777}
17778
17779// NotDone returns true if the page enumeration should be started or is not yet complete.
17780func (page LocalNetworkGatewayListResultPage) NotDone() bool {
17781	return !page.lnglr.IsEmpty()
17782}
17783
17784// Response returns the raw server response from the last page request.
17785func (page LocalNetworkGatewayListResultPage) Response() LocalNetworkGatewayListResult {
17786	return page.lnglr
17787}
17788
17789// Values returns the slice of values for the current page or nil if there are no values.
17790func (page LocalNetworkGatewayListResultPage) Values() []LocalNetworkGateway {
17791	if page.lnglr.IsEmpty() {
17792		return nil
17793	}
17794	return *page.lnglr.Value
17795}
17796
17797// Creates a new instance of the LocalNetworkGatewayListResultPage type.
17798func NewLocalNetworkGatewayListResultPage(cur LocalNetworkGatewayListResult, getNextPage func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)) LocalNetworkGatewayListResultPage {
17799	return LocalNetworkGatewayListResultPage{
17800		fn:    getNextPage,
17801		lnglr: cur,
17802	}
17803}
17804
17805// LocalNetworkGatewayPropertiesFormat localNetworkGateway properties
17806type LocalNetworkGatewayPropertiesFormat struct {
17807	// LocalNetworkAddressSpace - Local network site address space.
17808	LocalNetworkAddressSpace *AddressSpace `json:"localNetworkAddressSpace,omitempty"`
17809	// GatewayIPAddress - IP address of local network gateway.
17810	GatewayIPAddress *string `json:"gatewayIpAddress,omitempty"`
17811	// BgpSettings - Local network gateway's BGP speaker settings.
17812	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
17813	// ResourceGUID - The resource GUID property of the LocalNetworkGateway resource.
17814	ResourceGUID *string `json:"resourceGuid,omitempty"`
17815	// ProvisioningState - READ-ONLY; The provisioning state of the LocalNetworkGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
17816	ProvisioningState *string `json:"provisioningState,omitempty"`
17817}
17818
17819// MarshalJSON is the custom marshaler for LocalNetworkGatewayPropertiesFormat.
17820func (lngpf LocalNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
17821	objectMap := make(map[string]interface{})
17822	if lngpf.LocalNetworkAddressSpace != nil {
17823		objectMap["localNetworkAddressSpace"] = lngpf.LocalNetworkAddressSpace
17824	}
17825	if lngpf.GatewayIPAddress != nil {
17826		objectMap["gatewayIpAddress"] = lngpf.GatewayIPAddress
17827	}
17828	if lngpf.BgpSettings != nil {
17829		objectMap["bgpSettings"] = lngpf.BgpSettings
17830	}
17831	if lngpf.ResourceGUID != nil {
17832		objectMap["resourceGuid"] = lngpf.ResourceGUID
17833	}
17834	return json.Marshal(objectMap)
17835}
17836
17837// LocalNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
17838// long-running operation.
17839type LocalNetworkGatewaysCreateOrUpdateFuture struct {
17840	azure.FutureAPI
17841	// Result returns the result of the asynchronous operation.
17842	// If the operation has not completed it will return an error.
17843	Result func(LocalNetworkGatewaysClient) (LocalNetworkGateway, error)
17844}
17845
17846// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17847func (future *LocalNetworkGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
17848	var azFuture azure.Future
17849	if err := json.Unmarshal(body, &azFuture); err != nil {
17850		return err
17851	}
17852	future.FutureAPI = &azFuture
17853	future.Result = future.result
17854	return nil
17855}
17856
17857// result is the default implementation for LocalNetworkGatewaysCreateOrUpdateFuture.Result.
17858func (future *LocalNetworkGatewaysCreateOrUpdateFuture) result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
17859	var done bool
17860	done, err = future.DoneWithContext(context.Background(), client)
17861	if err != nil {
17862		err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
17863		return
17864	}
17865	if !done {
17866		lng.Response.Response = future.Response()
17867		err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysCreateOrUpdateFuture")
17868		return
17869	}
17870	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17871	if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent {
17872		lng, err = client.CreateOrUpdateResponder(lng.Response.Response)
17873		if err != nil {
17874			err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", lng.Response.Response, "Failure responding to request")
17875		}
17876	}
17877	return
17878}
17879
17880// LocalNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
17881// long-running operation.
17882type LocalNetworkGatewaysDeleteFuture struct {
17883	azure.FutureAPI
17884	// Result returns the result of the asynchronous operation.
17885	// If the operation has not completed it will return an error.
17886	Result func(LocalNetworkGatewaysClient) (autorest.Response, error)
17887}
17888
17889// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17890func (future *LocalNetworkGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
17891	var azFuture azure.Future
17892	if err := json.Unmarshal(body, &azFuture); err != nil {
17893		return err
17894	}
17895	future.FutureAPI = &azFuture
17896	future.Result = future.result
17897	return nil
17898}
17899
17900// result is the default implementation for LocalNetworkGatewaysDeleteFuture.Result.
17901func (future *LocalNetworkGatewaysDeleteFuture) result(client LocalNetworkGatewaysClient) (ar autorest.Response, err error) {
17902	var done bool
17903	done, err = future.DoneWithContext(context.Background(), client)
17904	if err != nil {
17905		err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
17906		return
17907	}
17908	if !done {
17909		ar.Response = future.Response()
17910		err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysDeleteFuture")
17911		return
17912	}
17913	ar.Response = future.Response()
17914	return
17915}
17916
17917// LocalNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
17918// long-running operation.
17919type LocalNetworkGatewaysUpdateTagsFuture struct {
17920	azure.FutureAPI
17921	// Result returns the result of the asynchronous operation.
17922	// If the operation has not completed it will return an error.
17923	Result func(LocalNetworkGatewaysClient) (LocalNetworkGateway, error)
17924}
17925
17926// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17927func (future *LocalNetworkGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error {
17928	var azFuture azure.Future
17929	if err := json.Unmarshal(body, &azFuture); err != nil {
17930		return err
17931	}
17932	future.FutureAPI = &azFuture
17933	future.Result = future.result
17934	return nil
17935}
17936
17937// result is the default implementation for LocalNetworkGatewaysUpdateTagsFuture.Result.
17938func (future *LocalNetworkGatewaysUpdateTagsFuture) result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
17939	var done bool
17940	done, err = future.DoneWithContext(context.Background(), client)
17941	if err != nil {
17942		err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
17943		return
17944	}
17945	if !done {
17946		lng.Response.Response = future.Response()
17947		err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysUpdateTagsFuture")
17948		return
17949	}
17950	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17951	if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent {
17952		lng, err = client.UpdateTagsResponder(lng.Response.Response)
17953		if err != nil {
17954			err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", lng.Response.Response, "Failure responding to request")
17955		}
17956	}
17957	return
17958}
17959
17960// LogSpecification description of logging specification.
17961type LogSpecification struct {
17962	// Name - The name of the specification.
17963	Name *string `json:"name,omitempty"`
17964	// DisplayName - The display name of the specification.
17965	DisplayName *string `json:"displayName,omitempty"`
17966	// BlobDuration - Duration of the blob.
17967	BlobDuration *string `json:"blobDuration,omitempty"`
17968}
17969
17970// ManagedServiceIdentity identity for the resource.
17971type ManagedServiceIdentity struct {
17972	// PrincipalID - READ-ONLY; The principal id of the system assigned identity. This property will only be provided for a system assigned identity.
17973	PrincipalID *string `json:"principalId,omitempty"`
17974	// TenantID - READ-ONLY; The tenant id of the system assigned identity. This property will only be provided for a system assigned identity.
17975	TenantID *string `json:"tenantId,omitempty"`
17976	// 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'
17977	Type ResourceIdentityType `json:"type,omitempty"`
17978	// 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}'.
17979	UserAssignedIdentities map[string]*ManagedServiceIdentityUserAssignedIdentitiesValue `json:"userAssignedIdentities"`
17980}
17981
17982// MarshalJSON is the custom marshaler for ManagedServiceIdentity.
17983func (msi ManagedServiceIdentity) MarshalJSON() ([]byte, error) {
17984	objectMap := make(map[string]interface{})
17985	if msi.Type != "" {
17986		objectMap["type"] = msi.Type
17987	}
17988	if msi.UserAssignedIdentities != nil {
17989		objectMap["userAssignedIdentities"] = msi.UserAssignedIdentities
17990	}
17991	return json.Marshal(objectMap)
17992}
17993
17994// ManagedServiceIdentityUserAssignedIdentitiesValue ...
17995type ManagedServiceIdentityUserAssignedIdentitiesValue struct {
17996	// PrincipalID - READ-ONLY; The principal id of user assigned identity.
17997	PrincipalID *string `json:"principalId,omitempty"`
17998	// ClientID - READ-ONLY; The client id of user assigned identity.
17999	ClientID *string `json:"clientId,omitempty"`
18000}
18001
18002// MarshalJSON is the custom marshaler for ManagedServiceIdentityUserAssignedIdentitiesValue.
18003func (msiAiv ManagedServiceIdentityUserAssignedIdentitiesValue) MarshalJSON() ([]byte, error) {
18004	objectMap := make(map[string]interface{})
18005	return json.Marshal(objectMap)
18006}
18007
18008// MatchedRule matched rule.
18009type MatchedRule struct {
18010	// RuleName - Name of the matched network security rule.
18011	RuleName *string `json:"ruleName,omitempty"`
18012	// Action - The network traffic is allowed or denied. Possible values are 'Allow' and 'Deny'.
18013	Action *string `json:"action,omitempty"`
18014}
18015
18016// MetricSpecification description of metrics specification.
18017type MetricSpecification struct {
18018	// Name - The name of the metric.
18019	Name *string `json:"name,omitempty"`
18020	// DisplayName - The display name of the metric.
18021	DisplayName *string `json:"displayName,omitempty"`
18022	// DisplayDescription - The description of the metric.
18023	DisplayDescription *string `json:"displayDescription,omitempty"`
18024	// Unit - Units the metric to be displayed in.
18025	Unit *string `json:"unit,omitempty"`
18026	// AggregationType - The aggregation type.
18027	AggregationType *string `json:"aggregationType,omitempty"`
18028	// Availabilities - List of availability.
18029	Availabilities *[]Availability `json:"availabilities,omitempty"`
18030	// EnableRegionalMdmAccount - Whether regional MDM account enabled.
18031	EnableRegionalMdmAccount *bool `json:"enableRegionalMdmAccount,omitempty"`
18032	// FillGapWithZero - Whether gaps would be filled with zeros.
18033	FillGapWithZero *bool `json:"fillGapWithZero,omitempty"`
18034	// MetricFilterPattern - Pattern for the filter of the metric.
18035	MetricFilterPattern *string `json:"metricFilterPattern,omitempty"`
18036	// Dimensions - List of dimensions.
18037	Dimensions *[]Dimension `json:"dimensions,omitempty"`
18038	// IsInternal - Whether the metric is internal.
18039	IsInternal *bool `json:"isInternal,omitempty"`
18040	// SourceMdmAccount - The source MDM account.
18041	SourceMdmAccount *string `json:"sourceMdmAccount,omitempty"`
18042	// SourceMdmNamespace - The source MDM namespace.
18043	SourceMdmNamespace *string `json:"sourceMdmNamespace,omitempty"`
18044	// ResourceIDDimensionNameOverride - The resource Id dimension name override.
18045	ResourceIDDimensionNameOverride *string `json:"resourceIdDimensionNameOverride,omitempty"`
18046}
18047
18048// NextHopParameters parameters that define the source and destination endpoint.
18049type NextHopParameters struct {
18050	// TargetResourceID - The resource identifier of the target resource against which the action is to be performed.
18051	TargetResourceID *string `json:"targetResourceId,omitempty"`
18052	// SourceIPAddress - The source IP address.
18053	SourceIPAddress *string `json:"sourceIPAddress,omitempty"`
18054	// DestinationIPAddress - The destination IP address.
18055	DestinationIPAddress *string `json:"destinationIPAddress,omitempty"`
18056	// 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).
18057	TargetNicResourceID *string `json:"targetNicResourceId,omitempty"`
18058}
18059
18060// NextHopResult the information about next hop from the specified VM.
18061type NextHopResult struct {
18062	autorest.Response `json:"-"`
18063	// NextHopType - Next hop type. Possible values include: 'NextHopTypeInternet', 'NextHopTypeVirtualAppliance', 'NextHopTypeVirtualNetworkGateway', 'NextHopTypeVnetLocal', 'NextHopTypeHyperNetGateway', 'NextHopTypeNone'
18064	NextHopType NextHopType `json:"nextHopType,omitempty"`
18065	// NextHopIPAddress - Next hop IP Address
18066	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
18067	// 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'.
18068	RouteTableID *string `json:"routeTableId,omitempty"`
18069}
18070
18071// Operation network REST API operation definition.
18072type Operation struct {
18073	// Name - Operation name: {provider}/{resource}/{operation}
18074	Name *string `json:"name,omitempty"`
18075	// Display - Display metadata associated with the operation.
18076	Display *OperationDisplay `json:"display,omitempty"`
18077	// Origin - Origin of the operation.
18078	Origin *string `json:"origin,omitempty"`
18079	// OperationPropertiesFormat - Operation properties format.
18080	*OperationPropertiesFormat `json:"properties,omitempty"`
18081}
18082
18083// MarshalJSON is the custom marshaler for Operation.
18084func (o Operation) MarshalJSON() ([]byte, error) {
18085	objectMap := make(map[string]interface{})
18086	if o.Name != nil {
18087		objectMap["name"] = o.Name
18088	}
18089	if o.Display != nil {
18090		objectMap["display"] = o.Display
18091	}
18092	if o.Origin != nil {
18093		objectMap["origin"] = o.Origin
18094	}
18095	if o.OperationPropertiesFormat != nil {
18096		objectMap["properties"] = o.OperationPropertiesFormat
18097	}
18098	return json.Marshal(objectMap)
18099}
18100
18101// UnmarshalJSON is the custom unmarshaler for Operation struct.
18102func (o *Operation) UnmarshalJSON(body []byte) error {
18103	var m map[string]*json.RawMessage
18104	err := json.Unmarshal(body, &m)
18105	if err != nil {
18106		return err
18107	}
18108	for k, v := range m {
18109		switch k {
18110		case "name":
18111			if v != nil {
18112				var name string
18113				err = json.Unmarshal(*v, &name)
18114				if err != nil {
18115					return err
18116				}
18117				o.Name = &name
18118			}
18119		case "display":
18120			if v != nil {
18121				var display OperationDisplay
18122				err = json.Unmarshal(*v, &display)
18123				if err != nil {
18124					return err
18125				}
18126				o.Display = &display
18127			}
18128		case "origin":
18129			if v != nil {
18130				var origin string
18131				err = json.Unmarshal(*v, &origin)
18132				if err != nil {
18133					return err
18134				}
18135				o.Origin = &origin
18136			}
18137		case "properties":
18138			if v != nil {
18139				var operationPropertiesFormat OperationPropertiesFormat
18140				err = json.Unmarshal(*v, &operationPropertiesFormat)
18141				if err != nil {
18142					return err
18143				}
18144				o.OperationPropertiesFormat = &operationPropertiesFormat
18145			}
18146		}
18147	}
18148
18149	return nil
18150}
18151
18152// OperationDisplay display metadata associated with the operation.
18153type OperationDisplay struct {
18154	// Provider - Service provider: Microsoft Network.
18155	Provider *string `json:"provider,omitempty"`
18156	// Resource - Resource on which the operation is performed.
18157	Resource *string `json:"resource,omitempty"`
18158	// Operation - Type of the operation: get, read, delete, etc.
18159	Operation *string `json:"operation,omitempty"`
18160	// Description - Description of the operation.
18161	Description *string `json:"description,omitempty"`
18162}
18163
18164// OperationListResult result of the request to list Network operations. It contains a list of operations
18165// and a URL link to get the next set of results.
18166type OperationListResult struct {
18167	autorest.Response `json:"-"`
18168	// Value - List of Network operations supported by the Network resource provider.
18169	Value *[]Operation `json:"value,omitempty"`
18170	// NextLink - URL to get the next set of operation list results if there are any.
18171	NextLink *string `json:"nextLink,omitempty"`
18172}
18173
18174// OperationListResultIterator provides access to a complete listing of Operation values.
18175type OperationListResultIterator struct {
18176	i    int
18177	page OperationListResultPage
18178}
18179
18180// NextWithContext advances to the next value.  If there was an error making
18181// the request the iterator does not advance and the error is returned.
18182func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) {
18183	if tracing.IsEnabled() {
18184		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext")
18185		defer func() {
18186			sc := -1
18187			if iter.Response().Response.Response != nil {
18188				sc = iter.Response().Response.Response.StatusCode
18189			}
18190			tracing.EndSpan(ctx, sc, err)
18191		}()
18192	}
18193	iter.i++
18194	if iter.i < len(iter.page.Values()) {
18195		return nil
18196	}
18197	err = iter.page.NextWithContext(ctx)
18198	if err != nil {
18199		iter.i--
18200		return err
18201	}
18202	iter.i = 0
18203	return nil
18204}
18205
18206// Next advances to the next value.  If there was an error making
18207// the request the iterator does not advance and the error is returned.
18208// Deprecated: Use NextWithContext() instead.
18209func (iter *OperationListResultIterator) Next() error {
18210	return iter.NextWithContext(context.Background())
18211}
18212
18213// NotDone returns true if the enumeration should be started or is not yet complete.
18214func (iter OperationListResultIterator) NotDone() bool {
18215	return iter.page.NotDone() && iter.i < len(iter.page.Values())
18216}
18217
18218// Response returns the raw server response from the last page request.
18219func (iter OperationListResultIterator) Response() OperationListResult {
18220	return iter.page.Response()
18221}
18222
18223// Value returns the current value or a zero-initialized value if the
18224// iterator has advanced beyond the end of the collection.
18225func (iter OperationListResultIterator) Value() Operation {
18226	if !iter.page.NotDone() {
18227		return Operation{}
18228	}
18229	return iter.page.Values()[iter.i]
18230}
18231
18232// Creates a new instance of the OperationListResultIterator type.
18233func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator {
18234	return OperationListResultIterator{page: page}
18235}
18236
18237// IsEmpty returns true if the ListResult contains no values.
18238func (olr OperationListResult) IsEmpty() bool {
18239	return olr.Value == nil || len(*olr.Value) == 0
18240}
18241
18242// hasNextLink returns true if the NextLink is not empty.
18243func (olr OperationListResult) hasNextLink() bool {
18244	return olr.NextLink != nil && len(*olr.NextLink) != 0
18245}
18246
18247// operationListResultPreparer prepares a request to retrieve the next set of results.
18248// It returns nil if no more results exist.
18249func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) {
18250	if !olr.hasNextLink() {
18251		return nil, nil
18252	}
18253	return autorest.Prepare((&http.Request{}).WithContext(ctx),
18254		autorest.AsJSON(),
18255		autorest.AsGet(),
18256		autorest.WithBaseURL(to.String(olr.NextLink)))
18257}
18258
18259// OperationListResultPage contains a page of Operation values.
18260type OperationListResultPage struct {
18261	fn  func(context.Context, OperationListResult) (OperationListResult, error)
18262	olr OperationListResult
18263}
18264
18265// NextWithContext advances to the next page of values.  If there was an error making
18266// the request the page does not advance and the error is returned.
18267func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) {
18268	if tracing.IsEnabled() {
18269		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext")
18270		defer func() {
18271			sc := -1
18272			if page.Response().Response.Response != nil {
18273				sc = page.Response().Response.Response.StatusCode
18274			}
18275			tracing.EndSpan(ctx, sc, err)
18276		}()
18277	}
18278	for {
18279		next, err := page.fn(ctx, page.olr)
18280		if err != nil {
18281			return err
18282		}
18283		page.olr = next
18284		if !next.hasNextLink() || !next.IsEmpty() {
18285			break
18286		}
18287	}
18288	return nil
18289}
18290
18291// Next advances to the next page of values.  If there was an error making
18292// the request the page does not advance and the error is returned.
18293// Deprecated: Use NextWithContext() instead.
18294func (page *OperationListResultPage) Next() error {
18295	return page.NextWithContext(context.Background())
18296}
18297
18298// NotDone returns true if the page enumeration should be started or is not yet complete.
18299func (page OperationListResultPage) NotDone() bool {
18300	return !page.olr.IsEmpty()
18301}
18302
18303// Response returns the raw server response from the last page request.
18304func (page OperationListResultPage) Response() OperationListResult {
18305	return page.olr
18306}
18307
18308// Values returns the slice of values for the current page or nil if there are no values.
18309func (page OperationListResultPage) Values() []Operation {
18310	if page.olr.IsEmpty() {
18311		return nil
18312	}
18313	return *page.olr.Value
18314}
18315
18316// Creates a new instance of the OperationListResultPage type.
18317func NewOperationListResultPage(cur OperationListResult, getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
18318	return OperationListResultPage{
18319		fn:  getNextPage,
18320		olr: cur,
18321	}
18322}
18323
18324// OperationPropertiesFormat description of operation properties format.
18325type OperationPropertiesFormat struct {
18326	// ServiceSpecification - Specification of the service.
18327	ServiceSpecification *OperationPropertiesFormatServiceSpecification `json:"serviceSpecification,omitempty"`
18328}
18329
18330// OperationPropertiesFormatServiceSpecification specification of the service.
18331type OperationPropertiesFormatServiceSpecification struct {
18332	// MetricSpecifications - Operation service specification.
18333	MetricSpecifications *[]MetricSpecification `json:"metricSpecifications,omitempty"`
18334	// LogSpecifications - Operation log specification.
18335	LogSpecifications *[]LogSpecification `json:"logSpecifications,omitempty"`
18336}
18337
18338// OutboundRule outbound rule of the load balancer.
18339type OutboundRule struct {
18340	autorest.Response `json:"-"`
18341	// OutboundRulePropertiesFormat - Properties of load balancer outbound rule.
18342	*OutboundRulePropertiesFormat `json:"properties,omitempty"`
18343	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
18344	Name *string `json:"name,omitempty"`
18345	// Etag - A unique read-only string that changes whenever the resource is updated.
18346	Etag *string `json:"etag,omitempty"`
18347	// ID - Resource ID.
18348	ID *string `json:"id,omitempty"`
18349}
18350
18351// MarshalJSON is the custom marshaler for OutboundRule.
18352func (or OutboundRule) MarshalJSON() ([]byte, error) {
18353	objectMap := make(map[string]interface{})
18354	if or.OutboundRulePropertiesFormat != nil {
18355		objectMap["properties"] = or.OutboundRulePropertiesFormat
18356	}
18357	if or.Name != nil {
18358		objectMap["name"] = or.Name
18359	}
18360	if or.Etag != nil {
18361		objectMap["etag"] = or.Etag
18362	}
18363	if or.ID != nil {
18364		objectMap["id"] = or.ID
18365	}
18366	return json.Marshal(objectMap)
18367}
18368
18369// UnmarshalJSON is the custom unmarshaler for OutboundRule struct.
18370func (or *OutboundRule) UnmarshalJSON(body []byte) error {
18371	var m map[string]*json.RawMessage
18372	err := json.Unmarshal(body, &m)
18373	if err != nil {
18374		return err
18375	}
18376	for k, v := range m {
18377		switch k {
18378		case "properties":
18379			if v != nil {
18380				var outboundRulePropertiesFormat OutboundRulePropertiesFormat
18381				err = json.Unmarshal(*v, &outboundRulePropertiesFormat)
18382				if err != nil {
18383					return err
18384				}
18385				or.OutboundRulePropertiesFormat = &outboundRulePropertiesFormat
18386			}
18387		case "name":
18388			if v != nil {
18389				var name string
18390				err = json.Unmarshal(*v, &name)
18391				if err != nil {
18392					return err
18393				}
18394				or.Name = &name
18395			}
18396		case "etag":
18397			if v != nil {
18398				var etag string
18399				err = json.Unmarshal(*v, &etag)
18400				if err != nil {
18401					return err
18402				}
18403				or.Etag = &etag
18404			}
18405		case "id":
18406			if v != nil {
18407				var ID string
18408				err = json.Unmarshal(*v, &ID)
18409				if err != nil {
18410					return err
18411				}
18412				or.ID = &ID
18413			}
18414		}
18415	}
18416
18417	return nil
18418}
18419
18420// OutboundRulePropertiesFormat outbound rule of the load balancer.
18421type OutboundRulePropertiesFormat struct {
18422	// AllocatedOutboundPorts - The number of outbound ports to be used for NAT.
18423	AllocatedOutboundPorts *int32 `json:"allocatedOutboundPorts,omitempty"`
18424	// FrontendIPConfigurations - The Frontend IP addresses of the load balancer.
18425	FrontendIPConfigurations *[]SubResource `json:"frontendIPConfigurations,omitempty"`
18426	// BackendAddressPool - A reference to a pool of DIPs. Outbound traffic is randomly load balanced across IPs in the backend IPs.
18427	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
18428	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
18429	ProvisioningState *string `json:"provisioningState,omitempty"`
18430	// Protocol - Protocol - TCP, UDP or All. Possible values include: 'Protocol1TCP', 'Protocol1UDP', 'Protocol1All'
18431	Protocol Protocol1 `json:"protocol,omitempty"`
18432	// 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.
18433	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
18434	// IdleTimeoutInMinutes - The timeout for the TCP idle connection
18435	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
18436}
18437
18438// P2SVpnGateway p2SVpnGateway Resource.
18439type P2SVpnGateway struct {
18440	autorest.Response        `json:"-"`
18441	*P2SVpnGatewayProperties `json:"properties,omitempty"`
18442	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
18443	Etag *string `json:"etag,omitempty"`
18444	// ID - Resource ID.
18445	ID *string `json:"id,omitempty"`
18446	// Name - READ-ONLY; Resource name.
18447	Name *string `json:"name,omitempty"`
18448	// Type - READ-ONLY; Resource type.
18449	Type *string `json:"type,omitempty"`
18450	// Location - Resource location.
18451	Location *string `json:"location,omitempty"`
18452	// Tags - Resource tags.
18453	Tags map[string]*string `json:"tags"`
18454}
18455
18456// MarshalJSON is the custom marshaler for P2SVpnGateway.
18457func (pvg P2SVpnGateway) MarshalJSON() ([]byte, error) {
18458	objectMap := make(map[string]interface{})
18459	if pvg.P2SVpnGatewayProperties != nil {
18460		objectMap["properties"] = pvg.P2SVpnGatewayProperties
18461	}
18462	if pvg.ID != nil {
18463		objectMap["id"] = pvg.ID
18464	}
18465	if pvg.Location != nil {
18466		objectMap["location"] = pvg.Location
18467	}
18468	if pvg.Tags != nil {
18469		objectMap["tags"] = pvg.Tags
18470	}
18471	return json.Marshal(objectMap)
18472}
18473
18474// UnmarshalJSON is the custom unmarshaler for P2SVpnGateway struct.
18475func (pvg *P2SVpnGateway) UnmarshalJSON(body []byte) error {
18476	var m map[string]*json.RawMessage
18477	err := json.Unmarshal(body, &m)
18478	if err != nil {
18479		return err
18480	}
18481	for k, v := range m {
18482		switch k {
18483		case "properties":
18484			if v != nil {
18485				var p2SVpnGatewayProperties P2SVpnGatewayProperties
18486				err = json.Unmarshal(*v, &p2SVpnGatewayProperties)
18487				if err != nil {
18488					return err
18489				}
18490				pvg.P2SVpnGatewayProperties = &p2SVpnGatewayProperties
18491			}
18492		case "etag":
18493			if v != nil {
18494				var etag string
18495				err = json.Unmarshal(*v, &etag)
18496				if err != nil {
18497					return err
18498				}
18499				pvg.Etag = &etag
18500			}
18501		case "id":
18502			if v != nil {
18503				var ID string
18504				err = json.Unmarshal(*v, &ID)
18505				if err != nil {
18506					return err
18507				}
18508				pvg.ID = &ID
18509			}
18510		case "name":
18511			if v != nil {
18512				var name string
18513				err = json.Unmarshal(*v, &name)
18514				if err != nil {
18515					return err
18516				}
18517				pvg.Name = &name
18518			}
18519		case "type":
18520			if v != nil {
18521				var typeVar string
18522				err = json.Unmarshal(*v, &typeVar)
18523				if err != nil {
18524					return err
18525				}
18526				pvg.Type = &typeVar
18527			}
18528		case "location":
18529			if v != nil {
18530				var location string
18531				err = json.Unmarshal(*v, &location)
18532				if err != nil {
18533					return err
18534				}
18535				pvg.Location = &location
18536			}
18537		case "tags":
18538			if v != nil {
18539				var tags map[string]*string
18540				err = json.Unmarshal(*v, &tags)
18541				if err != nil {
18542					return err
18543				}
18544				pvg.Tags = tags
18545			}
18546		}
18547	}
18548
18549	return nil
18550}
18551
18552// P2SVpnGatewayProperties parameters for P2SVpnGateway
18553type P2SVpnGatewayProperties struct {
18554	// VirtualHub - The VirtualHub to which the gateway belongs
18555	VirtualHub *SubResource `json:"virtualHub,omitempty"`
18556	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
18557	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
18558	// VpnGatewayScaleUnit - The scale unit for this p2s vpn gateway.
18559	VpnGatewayScaleUnit *int32 `json:"vpnGatewayScaleUnit,omitempty"`
18560	// P2SVpnServerConfiguration - The P2SVpnServerConfiguration to which the p2sVpnGateway is attached to.
18561	P2SVpnServerConfiguration *SubResource `json:"p2SVpnServerConfiguration,omitempty"`
18562	// VpnClientAddressPool - The reference of the address space resource which represents Address space for P2S VpnClient.
18563	VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"`
18564	// VpnClientConnectionHealth - READ-ONLY; All P2S VPN clients' connection health status.
18565	VpnClientConnectionHealth *VpnClientConnectionHealth `json:"vpnClientConnectionHealth,omitempty"`
18566}
18567
18568// MarshalJSON is the custom marshaler for P2SVpnGatewayProperties.
18569func (pvgp P2SVpnGatewayProperties) MarshalJSON() ([]byte, error) {
18570	objectMap := make(map[string]interface{})
18571	if pvgp.VirtualHub != nil {
18572		objectMap["virtualHub"] = pvgp.VirtualHub
18573	}
18574	if pvgp.ProvisioningState != "" {
18575		objectMap["provisioningState"] = pvgp.ProvisioningState
18576	}
18577	if pvgp.VpnGatewayScaleUnit != nil {
18578		objectMap["vpnGatewayScaleUnit"] = pvgp.VpnGatewayScaleUnit
18579	}
18580	if pvgp.P2SVpnServerConfiguration != nil {
18581		objectMap["p2SVpnServerConfiguration"] = pvgp.P2SVpnServerConfiguration
18582	}
18583	if pvgp.VpnClientAddressPool != nil {
18584		objectMap["vpnClientAddressPool"] = pvgp.VpnClientAddressPool
18585	}
18586	return json.Marshal(objectMap)
18587}
18588
18589// P2sVpnGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
18590// long-running operation.
18591type P2sVpnGatewaysCreateOrUpdateFuture struct {
18592	azure.FutureAPI
18593	// Result returns the result of the asynchronous operation.
18594	// If the operation has not completed it will return an error.
18595	Result func(P2sVpnGatewaysClient) (P2SVpnGateway, error)
18596}
18597
18598// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18599func (future *P2sVpnGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
18600	var azFuture azure.Future
18601	if err := json.Unmarshal(body, &azFuture); err != nil {
18602		return err
18603	}
18604	future.FutureAPI = &azFuture
18605	future.Result = future.result
18606	return nil
18607}
18608
18609// result is the default implementation for P2sVpnGatewaysCreateOrUpdateFuture.Result.
18610func (future *P2sVpnGatewaysCreateOrUpdateFuture) result(client P2sVpnGatewaysClient) (pvg P2SVpnGateway, err error) {
18611	var done bool
18612	done, err = future.DoneWithContext(context.Background(), client)
18613	if err != nil {
18614		err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
18615		return
18616	}
18617	if !done {
18618		pvg.Response.Response = future.Response()
18619		err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysCreateOrUpdateFuture")
18620		return
18621	}
18622	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18623	if pvg.Response.Response, err = future.GetResult(sender); err == nil && pvg.Response.Response.StatusCode != http.StatusNoContent {
18624		pvg, err = client.CreateOrUpdateResponder(pvg.Response.Response)
18625		if err != nil {
18626			err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysCreateOrUpdateFuture", "Result", pvg.Response.Response, "Failure responding to request")
18627		}
18628	}
18629	return
18630}
18631
18632// P2sVpnGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
18633// operation.
18634type P2sVpnGatewaysDeleteFuture struct {
18635	azure.FutureAPI
18636	// Result returns the result of the asynchronous operation.
18637	// If the operation has not completed it will return an error.
18638	Result func(P2sVpnGatewaysClient) (autorest.Response, error)
18639}
18640
18641// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18642func (future *P2sVpnGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
18643	var azFuture azure.Future
18644	if err := json.Unmarshal(body, &azFuture); err != nil {
18645		return err
18646	}
18647	future.FutureAPI = &azFuture
18648	future.Result = future.result
18649	return nil
18650}
18651
18652// result is the default implementation for P2sVpnGatewaysDeleteFuture.Result.
18653func (future *P2sVpnGatewaysDeleteFuture) result(client P2sVpnGatewaysClient) (ar autorest.Response, err error) {
18654	var done bool
18655	done, err = future.DoneWithContext(context.Background(), client)
18656	if err != nil {
18657		err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
18658		return
18659	}
18660	if !done {
18661		ar.Response = future.Response()
18662		err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysDeleteFuture")
18663		return
18664	}
18665	ar.Response = future.Response()
18666	return
18667}
18668
18669// P2sVpnGatewaysGenerateVpnProfileFuture an abstraction for monitoring and retrieving the results of a
18670// long-running operation.
18671type P2sVpnGatewaysGenerateVpnProfileFuture struct {
18672	azure.FutureAPI
18673	// Result returns the result of the asynchronous operation.
18674	// If the operation has not completed it will return an error.
18675	Result func(P2sVpnGatewaysClient) (VpnProfileResponse, error)
18676}
18677
18678// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18679func (future *P2sVpnGatewaysGenerateVpnProfileFuture) UnmarshalJSON(body []byte) error {
18680	var azFuture azure.Future
18681	if err := json.Unmarshal(body, &azFuture); err != nil {
18682		return err
18683	}
18684	future.FutureAPI = &azFuture
18685	future.Result = future.result
18686	return nil
18687}
18688
18689// result is the default implementation for P2sVpnGatewaysGenerateVpnProfileFuture.Result.
18690func (future *P2sVpnGatewaysGenerateVpnProfileFuture) result(client P2sVpnGatewaysClient) (vpr VpnProfileResponse, err error) {
18691	var done bool
18692	done, err = future.DoneWithContext(context.Background(), client)
18693	if err != nil {
18694		err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGenerateVpnProfileFuture", "Result", future.Response(), "Polling failure")
18695		return
18696	}
18697	if !done {
18698		vpr.Response.Response = future.Response()
18699		err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysGenerateVpnProfileFuture")
18700		return
18701	}
18702	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18703	if vpr.Response.Response, err = future.GetResult(sender); err == nil && vpr.Response.Response.StatusCode != http.StatusNoContent {
18704		vpr, err = client.GenerateVpnProfileResponder(vpr.Response.Response)
18705		if err != nil {
18706			err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGenerateVpnProfileFuture", "Result", vpr.Response.Response, "Failure responding to request")
18707		}
18708	}
18709	return
18710}
18711
18712// P2sVpnGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
18713// long-running operation.
18714type P2sVpnGatewaysUpdateTagsFuture struct {
18715	azure.FutureAPI
18716	// Result returns the result of the asynchronous operation.
18717	// If the operation has not completed it will return an error.
18718	Result func(P2sVpnGatewaysClient) (P2SVpnGateway, error)
18719}
18720
18721// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18722func (future *P2sVpnGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error {
18723	var azFuture azure.Future
18724	if err := json.Unmarshal(body, &azFuture); err != nil {
18725		return err
18726	}
18727	future.FutureAPI = &azFuture
18728	future.Result = future.result
18729	return nil
18730}
18731
18732// result is the default implementation for P2sVpnGatewaysUpdateTagsFuture.Result.
18733func (future *P2sVpnGatewaysUpdateTagsFuture) result(client P2sVpnGatewaysClient) (pvg P2SVpnGateway, err error) {
18734	var done bool
18735	done, err = future.DoneWithContext(context.Background(), client)
18736	if err != nil {
18737		err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
18738		return
18739	}
18740	if !done {
18741		pvg.Response.Response = future.Response()
18742		err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysUpdateTagsFuture")
18743		return
18744	}
18745	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18746	if pvg.Response.Response, err = future.GetResult(sender); err == nil && pvg.Response.Response.StatusCode != http.StatusNoContent {
18747		pvg, err = client.UpdateTagsResponder(pvg.Response.Response)
18748		if err != nil {
18749			err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysUpdateTagsFuture", "Result", pvg.Response.Response, "Failure responding to request")
18750		}
18751	}
18752	return
18753}
18754
18755// P2SVpnProfileParameters vpn Client Parameters for package generation
18756type P2SVpnProfileParameters struct {
18757	// AuthenticationMethod - VPN client Authentication Method. Possible values are: 'EAPTLS' and 'EAPMSCHAPv2'. Possible values include: 'EAPTLS', 'EAPMSCHAPv2'
18758	AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"`
18759}
18760
18761// P2SVpnServerConfigRadiusClientRootCertificate radius client root certificate of
18762// P2SVpnServerConfiguration.
18763type P2SVpnServerConfigRadiusClientRootCertificate struct {
18764	// P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat - Properties of the Radius client root certificate.
18765	*P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat `json:"properties,omitempty"`
18766	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
18767	Name *string `json:"name,omitempty"`
18768	// Etag - A unique read-only string that changes whenever the resource is updated.
18769	Etag *string `json:"etag,omitempty"`
18770	// ID - Resource ID.
18771	ID *string `json:"id,omitempty"`
18772}
18773
18774// MarshalJSON is the custom marshaler for P2SVpnServerConfigRadiusClientRootCertificate.
18775func (pvscrcrc P2SVpnServerConfigRadiusClientRootCertificate) MarshalJSON() ([]byte, error) {
18776	objectMap := make(map[string]interface{})
18777	if pvscrcrc.P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat != nil {
18778		objectMap["properties"] = pvscrcrc.P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat
18779	}
18780	if pvscrcrc.Name != nil {
18781		objectMap["name"] = pvscrcrc.Name
18782	}
18783	if pvscrcrc.Etag != nil {
18784		objectMap["etag"] = pvscrcrc.Etag
18785	}
18786	if pvscrcrc.ID != nil {
18787		objectMap["id"] = pvscrcrc.ID
18788	}
18789	return json.Marshal(objectMap)
18790}
18791
18792// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfigRadiusClientRootCertificate struct.
18793func (pvscrcrc *P2SVpnServerConfigRadiusClientRootCertificate) UnmarshalJSON(body []byte) error {
18794	var m map[string]*json.RawMessage
18795	err := json.Unmarshal(body, &m)
18796	if err != nil {
18797		return err
18798	}
18799	for k, v := range m {
18800		switch k {
18801		case "properties":
18802			if v != nil {
18803				var p2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat
18804				err = json.Unmarshal(*v, &p2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat)
18805				if err != nil {
18806					return err
18807				}
18808				pvscrcrc.P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat = &p2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat
18809			}
18810		case "name":
18811			if v != nil {
18812				var name string
18813				err = json.Unmarshal(*v, &name)
18814				if err != nil {
18815					return err
18816				}
18817				pvscrcrc.Name = &name
18818			}
18819		case "etag":
18820			if v != nil {
18821				var etag string
18822				err = json.Unmarshal(*v, &etag)
18823				if err != nil {
18824					return err
18825				}
18826				pvscrcrc.Etag = &etag
18827			}
18828		case "id":
18829			if v != nil {
18830				var ID string
18831				err = json.Unmarshal(*v, &ID)
18832				if err != nil {
18833					return err
18834				}
18835				pvscrcrc.ID = &ID
18836			}
18837		}
18838	}
18839
18840	return nil
18841}
18842
18843// P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat properties of the Radius client root
18844// certificate of P2SVpnServerConfiguration.
18845type P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat struct {
18846	// Thumbprint - The Radius client root certificate thumbprint.
18847	Thumbprint *string `json:"thumbprint,omitempty"`
18848	// ProvisioningState - READ-ONLY; The provisioning state of the Radius client root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
18849	ProvisioningState *string `json:"provisioningState,omitempty"`
18850}
18851
18852// MarshalJSON is the custom marshaler for P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat.
18853func (pvscrcrcpf P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
18854	objectMap := make(map[string]interface{})
18855	if pvscrcrcpf.Thumbprint != nil {
18856		objectMap["thumbprint"] = pvscrcrcpf.Thumbprint
18857	}
18858	return json.Marshal(objectMap)
18859}
18860
18861// P2SVpnServerConfigRadiusServerRootCertificate radius Server root certificate of
18862// P2SVpnServerConfiguration.
18863type P2SVpnServerConfigRadiusServerRootCertificate struct {
18864	// P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat - Properties of the P2SVpnServerConfiguration Radius Server root certificate.
18865	*P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat `json:"properties,omitempty"`
18866	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
18867	Name *string `json:"name,omitempty"`
18868	// Etag - A unique read-only string that changes whenever the resource is updated.
18869	Etag *string `json:"etag,omitempty"`
18870	// ID - Resource ID.
18871	ID *string `json:"id,omitempty"`
18872}
18873
18874// MarshalJSON is the custom marshaler for P2SVpnServerConfigRadiusServerRootCertificate.
18875func (pvscrsrc P2SVpnServerConfigRadiusServerRootCertificate) MarshalJSON() ([]byte, error) {
18876	objectMap := make(map[string]interface{})
18877	if pvscrsrc.P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat != nil {
18878		objectMap["properties"] = pvscrsrc.P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat
18879	}
18880	if pvscrsrc.Name != nil {
18881		objectMap["name"] = pvscrsrc.Name
18882	}
18883	if pvscrsrc.Etag != nil {
18884		objectMap["etag"] = pvscrsrc.Etag
18885	}
18886	if pvscrsrc.ID != nil {
18887		objectMap["id"] = pvscrsrc.ID
18888	}
18889	return json.Marshal(objectMap)
18890}
18891
18892// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfigRadiusServerRootCertificate struct.
18893func (pvscrsrc *P2SVpnServerConfigRadiusServerRootCertificate) UnmarshalJSON(body []byte) error {
18894	var m map[string]*json.RawMessage
18895	err := json.Unmarshal(body, &m)
18896	if err != nil {
18897		return err
18898	}
18899	for k, v := range m {
18900		switch k {
18901		case "properties":
18902			if v != nil {
18903				var p2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat
18904				err = json.Unmarshal(*v, &p2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat)
18905				if err != nil {
18906					return err
18907				}
18908				pvscrsrc.P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat = &p2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat
18909			}
18910		case "name":
18911			if v != nil {
18912				var name string
18913				err = json.Unmarshal(*v, &name)
18914				if err != nil {
18915					return err
18916				}
18917				pvscrsrc.Name = &name
18918			}
18919		case "etag":
18920			if v != nil {
18921				var etag string
18922				err = json.Unmarshal(*v, &etag)
18923				if err != nil {
18924					return err
18925				}
18926				pvscrsrc.Etag = &etag
18927			}
18928		case "id":
18929			if v != nil {
18930				var ID string
18931				err = json.Unmarshal(*v, &ID)
18932				if err != nil {
18933					return err
18934				}
18935				pvscrsrc.ID = &ID
18936			}
18937		}
18938	}
18939
18940	return nil
18941}
18942
18943// P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat properties of Radius Server root
18944// certificate of P2SVpnServerConfiguration.
18945type P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat struct {
18946	// PublicCertData - The certificate public data.
18947	PublicCertData *string `json:"publicCertData,omitempty"`
18948	// ProvisioningState - READ-ONLY; The provisioning state of the P2SVpnServerConfiguration Radius Server root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
18949	ProvisioningState *string `json:"provisioningState,omitempty"`
18950}
18951
18952// MarshalJSON is the custom marshaler for P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat.
18953func (pvscrsrcpf P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
18954	objectMap := make(map[string]interface{})
18955	if pvscrsrcpf.PublicCertData != nil {
18956		objectMap["publicCertData"] = pvscrsrcpf.PublicCertData
18957	}
18958	return json.Marshal(objectMap)
18959}
18960
18961// P2SVpnServerConfiguration p2SVpnServerConfiguration Resource.
18962type P2SVpnServerConfiguration struct {
18963	autorest.Response                    `json:"-"`
18964	*P2SVpnServerConfigurationProperties `json:"properties,omitempty"`
18965	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
18966	Name *string `json:"name,omitempty"`
18967	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
18968	Etag *string `json:"etag,omitempty"`
18969	// ID - Resource ID.
18970	ID *string `json:"id,omitempty"`
18971}
18972
18973// MarshalJSON is the custom marshaler for P2SVpnServerConfiguration.
18974func (pvsc P2SVpnServerConfiguration) MarshalJSON() ([]byte, error) {
18975	objectMap := make(map[string]interface{})
18976	if pvsc.P2SVpnServerConfigurationProperties != nil {
18977		objectMap["properties"] = pvsc.P2SVpnServerConfigurationProperties
18978	}
18979	if pvsc.Name != nil {
18980		objectMap["name"] = pvsc.Name
18981	}
18982	if pvsc.ID != nil {
18983		objectMap["id"] = pvsc.ID
18984	}
18985	return json.Marshal(objectMap)
18986}
18987
18988// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfiguration struct.
18989func (pvsc *P2SVpnServerConfiguration) UnmarshalJSON(body []byte) error {
18990	var m map[string]*json.RawMessage
18991	err := json.Unmarshal(body, &m)
18992	if err != nil {
18993		return err
18994	}
18995	for k, v := range m {
18996		switch k {
18997		case "properties":
18998			if v != nil {
18999				var p2SVpnServerConfigurationProperties P2SVpnServerConfigurationProperties
19000				err = json.Unmarshal(*v, &p2SVpnServerConfigurationProperties)
19001				if err != nil {
19002					return err
19003				}
19004				pvsc.P2SVpnServerConfigurationProperties = &p2SVpnServerConfigurationProperties
19005			}
19006		case "name":
19007			if v != nil {
19008				var name string
19009				err = json.Unmarshal(*v, &name)
19010				if err != nil {
19011					return err
19012				}
19013				pvsc.Name = &name
19014			}
19015		case "etag":
19016			if v != nil {
19017				var etag string
19018				err = json.Unmarshal(*v, &etag)
19019				if err != nil {
19020					return err
19021				}
19022				pvsc.Etag = &etag
19023			}
19024		case "id":
19025			if v != nil {
19026				var ID string
19027				err = json.Unmarshal(*v, &ID)
19028				if err != nil {
19029					return err
19030				}
19031				pvsc.ID = &ID
19032			}
19033		}
19034	}
19035
19036	return nil
19037}
19038
19039// P2SVpnServerConfigurationProperties parameters for P2SVpnServerConfiguration
19040type P2SVpnServerConfigurationProperties struct {
19041	// 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.
19042	Name *string `json:"name,omitempty"`
19043	// VpnProtocols - vpnProtocols for the P2SVpnServerConfiguration.
19044	VpnProtocols *[]VpnGatewayTunnelingProtocol `json:"vpnProtocols,omitempty"`
19045	// P2SVpnServerConfigVpnClientRootCertificates - VPN client root certificate of P2SVpnServerConfiguration.
19046	P2SVpnServerConfigVpnClientRootCertificates *[]P2SVpnServerConfigVpnClientRootCertificate `json:"p2SVpnServerConfigVpnClientRootCertificates,omitempty"`
19047	// P2SVpnServerConfigVpnClientRevokedCertificates - VPN client revoked certificate of P2SVpnServerConfiguration.
19048	P2SVpnServerConfigVpnClientRevokedCertificates *[]P2SVpnServerConfigVpnClientRevokedCertificate `json:"p2SVpnServerConfigVpnClientRevokedCertificates,omitempty"`
19049	// P2SVpnServerConfigRadiusServerRootCertificates - Radius Server root certificate of P2SVpnServerConfiguration.
19050	P2SVpnServerConfigRadiusServerRootCertificates *[]P2SVpnServerConfigRadiusServerRootCertificate `json:"p2SVpnServerConfigRadiusServerRootCertificates,omitempty"`
19051	// P2SVpnServerConfigRadiusClientRootCertificates - Radius client root certificate of P2SVpnServerConfiguration.
19052	P2SVpnServerConfigRadiusClientRootCertificates *[]P2SVpnServerConfigRadiusClientRootCertificate `json:"p2SVpnServerConfigRadiusClientRootCertificates,omitempty"`
19053	// VpnClientIpsecPolicies - VpnClientIpsecPolicies for P2SVpnServerConfiguration.
19054	VpnClientIpsecPolicies *[]IpsecPolicy `json:"vpnClientIpsecPolicies,omitempty"`
19055	// RadiusServerAddress - The radius server address property of the P2SVpnServerConfiguration resource for point to site client connection.
19056	RadiusServerAddress *string `json:"radiusServerAddress,omitempty"`
19057	// RadiusServerSecret - The radius secret property of the P2SVpnServerConfiguration resource for point to site client connection.
19058	RadiusServerSecret *string `json:"radiusServerSecret,omitempty"`
19059	// ProvisioningState - READ-ONLY; The provisioning state of the P2SVpnServerConfiguration resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
19060	ProvisioningState *string `json:"provisioningState,omitempty"`
19061	// P2SVpnGateways - READ-ONLY
19062	P2SVpnGateways *[]SubResource `json:"p2SVpnGateways,omitempty"`
19063	// Etag - A unique read-only string that changes whenever the resource is updated.
19064	Etag *string `json:"etag,omitempty"`
19065}
19066
19067// MarshalJSON is the custom marshaler for P2SVpnServerConfigurationProperties.
19068func (pvscp P2SVpnServerConfigurationProperties) MarshalJSON() ([]byte, error) {
19069	objectMap := make(map[string]interface{})
19070	if pvscp.Name != nil {
19071		objectMap["name"] = pvscp.Name
19072	}
19073	if pvscp.VpnProtocols != nil {
19074		objectMap["vpnProtocols"] = pvscp.VpnProtocols
19075	}
19076	if pvscp.P2SVpnServerConfigVpnClientRootCertificates != nil {
19077		objectMap["p2SVpnServerConfigVpnClientRootCertificates"] = pvscp.P2SVpnServerConfigVpnClientRootCertificates
19078	}
19079	if pvscp.P2SVpnServerConfigVpnClientRevokedCertificates != nil {
19080		objectMap["p2SVpnServerConfigVpnClientRevokedCertificates"] = pvscp.P2SVpnServerConfigVpnClientRevokedCertificates
19081	}
19082	if pvscp.P2SVpnServerConfigRadiusServerRootCertificates != nil {
19083		objectMap["p2SVpnServerConfigRadiusServerRootCertificates"] = pvscp.P2SVpnServerConfigRadiusServerRootCertificates
19084	}
19085	if pvscp.P2SVpnServerConfigRadiusClientRootCertificates != nil {
19086		objectMap["p2SVpnServerConfigRadiusClientRootCertificates"] = pvscp.P2SVpnServerConfigRadiusClientRootCertificates
19087	}
19088	if pvscp.VpnClientIpsecPolicies != nil {
19089		objectMap["vpnClientIpsecPolicies"] = pvscp.VpnClientIpsecPolicies
19090	}
19091	if pvscp.RadiusServerAddress != nil {
19092		objectMap["radiusServerAddress"] = pvscp.RadiusServerAddress
19093	}
19094	if pvscp.RadiusServerSecret != nil {
19095		objectMap["radiusServerSecret"] = pvscp.RadiusServerSecret
19096	}
19097	if pvscp.Etag != nil {
19098		objectMap["etag"] = pvscp.Etag
19099	}
19100	return json.Marshal(objectMap)
19101}
19102
19103// P2sVpnServerConfigurationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
19104// of a long-running operation.
19105type P2sVpnServerConfigurationsCreateOrUpdateFuture struct {
19106	azure.FutureAPI
19107	// Result returns the result of the asynchronous operation.
19108	// If the operation has not completed it will return an error.
19109	Result func(P2sVpnServerConfigurationsClient) (P2SVpnServerConfiguration, error)
19110}
19111
19112// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19113func (future *P2sVpnServerConfigurationsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
19114	var azFuture azure.Future
19115	if err := json.Unmarshal(body, &azFuture); err != nil {
19116		return err
19117	}
19118	future.FutureAPI = &azFuture
19119	future.Result = future.result
19120	return nil
19121}
19122
19123// result is the default implementation for P2sVpnServerConfigurationsCreateOrUpdateFuture.Result.
19124func (future *P2sVpnServerConfigurationsCreateOrUpdateFuture) result(client P2sVpnServerConfigurationsClient) (pvsc P2SVpnServerConfiguration, err error) {
19125	var done bool
19126	done, err = future.DoneWithContext(context.Background(), client)
19127	if err != nil {
19128		err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
19129		return
19130	}
19131	if !done {
19132		pvsc.Response.Response = future.Response()
19133		err = azure.NewAsyncOpIncompleteError("network.P2sVpnServerConfigurationsCreateOrUpdateFuture")
19134		return
19135	}
19136	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
19137	if pvsc.Response.Response, err = future.GetResult(sender); err == nil && pvsc.Response.Response.StatusCode != http.StatusNoContent {
19138		pvsc, err = client.CreateOrUpdateResponder(pvsc.Response.Response)
19139		if err != nil {
19140			err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsCreateOrUpdateFuture", "Result", pvsc.Response.Response, "Failure responding to request")
19141		}
19142	}
19143	return
19144}
19145
19146// P2sVpnServerConfigurationsDeleteFuture an abstraction for monitoring and retrieving the results of a
19147// long-running operation.
19148type P2sVpnServerConfigurationsDeleteFuture struct {
19149	azure.FutureAPI
19150	// Result returns the result of the asynchronous operation.
19151	// If the operation has not completed it will return an error.
19152	Result func(P2sVpnServerConfigurationsClient) (autorest.Response, error)
19153}
19154
19155// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19156func (future *P2sVpnServerConfigurationsDeleteFuture) UnmarshalJSON(body []byte) error {
19157	var azFuture azure.Future
19158	if err := json.Unmarshal(body, &azFuture); err != nil {
19159		return err
19160	}
19161	future.FutureAPI = &azFuture
19162	future.Result = future.result
19163	return nil
19164}
19165
19166// result is the default implementation for P2sVpnServerConfigurationsDeleteFuture.Result.
19167func (future *P2sVpnServerConfigurationsDeleteFuture) result(client P2sVpnServerConfigurationsClient) (ar autorest.Response, err error) {
19168	var done bool
19169	done, err = future.DoneWithContext(context.Background(), client)
19170	if err != nil {
19171		err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsDeleteFuture", "Result", future.Response(), "Polling failure")
19172		return
19173	}
19174	if !done {
19175		ar.Response = future.Response()
19176		err = azure.NewAsyncOpIncompleteError("network.P2sVpnServerConfigurationsDeleteFuture")
19177		return
19178	}
19179	ar.Response = future.Response()
19180	return
19181}
19182
19183// P2SVpnServerConfigVpnClientRevokedCertificate VPN client revoked certificate of
19184// P2SVpnServerConfiguration.
19185type P2SVpnServerConfigVpnClientRevokedCertificate struct {
19186	// P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat - Properties of the vpn client revoked certificate.
19187	*P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat `json:"properties,omitempty"`
19188	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
19189	Name *string `json:"name,omitempty"`
19190	// Etag - A unique read-only string that changes whenever the resource is updated.
19191	Etag *string `json:"etag,omitempty"`
19192	// ID - Resource ID.
19193	ID *string `json:"id,omitempty"`
19194}
19195
19196// MarshalJSON is the custom marshaler for P2SVpnServerConfigVpnClientRevokedCertificate.
19197func (pvscvcrc P2SVpnServerConfigVpnClientRevokedCertificate) MarshalJSON() ([]byte, error) {
19198	objectMap := make(map[string]interface{})
19199	if pvscvcrc.P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat != nil {
19200		objectMap["properties"] = pvscvcrc.P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat
19201	}
19202	if pvscvcrc.Name != nil {
19203		objectMap["name"] = pvscvcrc.Name
19204	}
19205	if pvscvcrc.Etag != nil {
19206		objectMap["etag"] = pvscvcrc.Etag
19207	}
19208	if pvscvcrc.ID != nil {
19209		objectMap["id"] = pvscvcrc.ID
19210	}
19211	return json.Marshal(objectMap)
19212}
19213
19214// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfigVpnClientRevokedCertificate struct.
19215func (pvscvcrc *P2SVpnServerConfigVpnClientRevokedCertificate) UnmarshalJSON(body []byte) error {
19216	var m map[string]*json.RawMessage
19217	err := json.Unmarshal(body, &m)
19218	if err != nil {
19219		return err
19220	}
19221	for k, v := range m {
19222		switch k {
19223		case "properties":
19224			if v != nil {
19225				var p2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat
19226				err = json.Unmarshal(*v, &p2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat)
19227				if err != nil {
19228					return err
19229				}
19230				pvscvcrc.P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat = &p2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat
19231			}
19232		case "name":
19233			if v != nil {
19234				var name string
19235				err = json.Unmarshal(*v, &name)
19236				if err != nil {
19237					return err
19238				}
19239				pvscvcrc.Name = &name
19240			}
19241		case "etag":
19242			if v != nil {
19243				var etag string
19244				err = json.Unmarshal(*v, &etag)
19245				if err != nil {
19246					return err
19247				}
19248				pvscvcrc.Etag = &etag
19249			}
19250		case "id":
19251			if v != nil {
19252				var ID string
19253				err = json.Unmarshal(*v, &ID)
19254				if err != nil {
19255					return err
19256				}
19257				pvscvcrc.ID = &ID
19258			}
19259		}
19260	}
19261
19262	return nil
19263}
19264
19265// P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat properties of the revoked VPN client
19266// certificate of P2SVpnServerConfiguration.
19267type P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat struct {
19268	// Thumbprint - The revoked VPN client certificate thumbprint.
19269	Thumbprint *string `json:"thumbprint,omitempty"`
19270	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client revoked certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
19271	ProvisioningState *string `json:"provisioningState,omitempty"`
19272}
19273
19274// MarshalJSON is the custom marshaler for P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat.
19275func (pvscvcrcpf P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
19276	objectMap := make(map[string]interface{})
19277	if pvscvcrcpf.Thumbprint != nil {
19278		objectMap["thumbprint"] = pvscvcrcpf.Thumbprint
19279	}
19280	return json.Marshal(objectMap)
19281}
19282
19283// P2SVpnServerConfigVpnClientRootCertificate VPN client root certificate of P2SVpnServerConfiguration.
19284type P2SVpnServerConfigVpnClientRootCertificate struct {
19285	// P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat - Properties of the P2SVpnServerConfiguration VPN client root certificate.
19286	*P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat `json:"properties,omitempty"`
19287	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
19288	Name *string `json:"name,omitempty"`
19289	// Etag - A unique read-only string that changes whenever the resource is updated.
19290	Etag *string `json:"etag,omitempty"`
19291	// ID - Resource ID.
19292	ID *string `json:"id,omitempty"`
19293}
19294
19295// MarshalJSON is the custom marshaler for P2SVpnServerConfigVpnClientRootCertificate.
19296func (pvscvcrc P2SVpnServerConfigVpnClientRootCertificate) MarshalJSON() ([]byte, error) {
19297	objectMap := make(map[string]interface{})
19298	if pvscvcrc.P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat != nil {
19299		objectMap["properties"] = pvscvcrc.P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat
19300	}
19301	if pvscvcrc.Name != nil {
19302		objectMap["name"] = pvscvcrc.Name
19303	}
19304	if pvscvcrc.Etag != nil {
19305		objectMap["etag"] = pvscvcrc.Etag
19306	}
19307	if pvscvcrc.ID != nil {
19308		objectMap["id"] = pvscvcrc.ID
19309	}
19310	return json.Marshal(objectMap)
19311}
19312
19313// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfigVpnClientRootCertificate struct.
19314func (pvscvcrc *P2SVpnServerConfigVpnClientRootCertificate) UnmarshalJSON(body []byte) error {
19315	var m map[string]*json.RawMessage
19316	err := json.Unmarshal(body, &m)
19317	if err != nil {
19318		return err
19319	}
19320	for k, v := range m {
19321		switch k {
19322		case "properties":
19323			if v != nil {
19324				var p2SVpnServerConfigVpnClientRootCertificatePropertiesFormat P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat
19325				err = json.Unmarshal(*v, &p2SVpnServerConfigVpnClientRootCertificatePropertiesFormat)
19326				if err != nil {
19327					return err
19328				}
19329				pvscvcrc.P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat = &p2SVpnServerConfigVpnClientRootCertificatePropertiesFormat
19330			}
19331		case "name":
19332			if v != nil {
19333				var name string
19334				err = json.Unmarshal(*v, &name)
19335				if err != nil {
19336					return err
19337				}
19338				pvscvcrc.Name = &name
19339			}
19340		case "etag":
19341			if v != nil {
19342				var etag string
19343				err = json.Unmarshal(*v, &etag)
19344				if err != nil {
19345					return err
19346				}
19347				pvscvcrc.Etag = &etag
19348			}
19349		case "id":
19350			if v != nil {
19351				var ID string
19352				err = json.Unmarshal(*v, &ID)
19353				if err != nil {
19354					return err
19355				}
19356				pvscvcrc.ID = &ID
19357			}
19358		}
19359	}
19360
19361	return nil
19362}
19363
19364// P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat properties of VPN client root certificate of
19365// P2SVpnServerConfiguration.
19366type P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat struct {
19367	// PublicCertData - The certificate public data.
19368	PublicCertData *string `json:"publicCertData,omitempty"`
19369	// ProvisioningState - READ-ONLY; The provisioning state of the P2SVpnServerConfiguration VPN client root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
19370	ProvisioningState *string `json:"provisioningState,omitempty"`
19371}
19372
19373// MarshalJSON is the custom marshaler for P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat.
19374func (pvscvcrcpf P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
19375	objectMap := make(map[string]interface{})
19376	if pvscvcrcpf.PublicCertData != nil {
19377		objectMap["publicCertData"] = pvscvcrcpf.PublicCertData
19378	}
19379	return json.Marshal(objectMap)
19380}
19381
19382// PacketCapture parameters that define the create packet capture operation.
19383type PacketCapture struct {
19384	*PacketCaptureParameters `json:"properties,omitempty"`
19385}
19386
19387// MarshalJSON is the custom marshaler for PacketCapture.
19388func (pc PacketCapture) MarshalJSON() ([]byte, error) {
19389	objectMap := make(map[string]interface{})
19390	if pc.PacketCaptureParameters != nil {
19391		objectMap["properties"] = pc.PacketCaptureParameters
19392	}
19393	return json.Marshal(objectMap)
19394}
19395
19396// UnmarshalJSON is the custom unmarshaler for PacketCapture struct.
19397func (pc *PacketCapture) UnmarshalJSON(body []byte) error {
19398	var m map[string]*json.RawMessage
19399	err := json.Unmarshal(body, &m)
19400	if err != nil {
19401		return err
19402	}
19403	for k, v := range m {
19404		switch k {
19405		case "properties":
19406			if v != nil {
19407				var packetCaptureParameters PacketCaptureParameters
19408				err = json.Unmarshal(*v, &packetCaptureParameters)
19409				if err != nil {
19410					return err
19411				}
19412				pc.PacketCaptureParameters = &packetCaptureParameters
19413			}
19414		}
19415	}
19416
19417	return nil
19418}
19419
19420// PacketCaptureFilter filter that is applied to packet capture request. Multiple filters can be applied.
19421type PacketCaptureFilter struct {
19422	// Protocol - Protocol to be filtered on. Possible values include: 'PcProtocolTCP', 'PcProtocolUDP', 'PcProtocolAny'
19423	Protocol PcProtocol `json:"protocol,omitempty"`
19424	// 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.
19425	LocalIPAddress *string `json:"localIPAddress,omitempty"`
19426	// 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.
19427	RemoteIPAddress *string `json:"remoteIPAddress,omitempty"`
19428	// 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.
19429	LocalPort *string `json:"localPort,omitempty"`
19430	// 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.
19431	RemotePort *string `json:"remotePort,omitempty"`
19432}
19433
19434// PacketCaptureListResult list of packet capture sessions.
19435type PacketCaptureListResult struct {
19436	autorest.Response `json:"-"`
19437	// Value - Information about packet capture sessions.
19438	Value *[]PacketCaptureResult `json:"value,omitempty"`
19439}
19440
19441// PacketCaptureParameters parameters that define the create packet capture operation.
19442type PacketCaptureParameters struct {
19443	// Target - The ID of the targeted resource, only VM is currently supported.
19444	Target *string `json:"target,omitempty"`
19445	// BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated.
19446	BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"`
19447	// TotalBytesPerSession - Maximum size of the capture output.
19448	TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"`
19449	// TimeLimitInSeconds - Maximum duration of the capture session in seconds.
19450	TimeLimitInSeconds *int32                        `json:"timeLimitInSeconds,omitempty"`
19451	StorageLocation    *PacketCaptureStorageLocation `json:"storageLocation,omitempty"`
19452	Filters            *[]PacketCaptureFilter        `json:"filters,omitempty"`
19453}
19454
19455// PacketCaptureQueryStatusResult status of packet capture session.
19456type PacketCaptureQueryStatusResult struct {
19457	autorest.Response `json:"-"`
19458	// Name - The name of the packet capture resource.
19459	Name *string `json:"name,omitempty"`
19460	// ID - The ID of the packet capture resource.
19461	ID *string `json:"id,omitempty"`
19462	// CaptureStartTime - The start time of the packet capture session.
19463	CaptureStartTime *date.Time `json:"captureStartTime,omitempty"`
19464	// PacketCaptureStatus - The status of the packet capture session. Possible values include: 'PcStatusNotStarted', 'PcStatusRunning', 'PcStatusStopped', 'PcStatusError', 'PcStatusUnknown'
19465	PacketCaptureStatus PcStatus `json:"packetCaptureStatus,omitempty"`
19466	// StopReason - The reason the current packet capture session was stopped.
19467	StopReason *string `json:"stopReason,omitempty"`
19468	// PacketCaptureError - List of errors of packet capture session.
19469	PacketCaptureError *[]PcError `json:"packetCaptureError,omitempty"`
19470}
19471
19472// PacketCaptureResult information about packet capture session.
19473type PacketCaptureResult struct {
19474	autorest.Response `json:"-"`
19475	// Name - READ-ONLY; Name of the packet capture session.
19476	Name *string `json:"name,omitempty"`
19477	// ID - READ-ONLY; ID of the packet capture operation.
19478	ID                             *string `json:"id,omitempty"`
19479	Etag                           *string `json:"etag,omitempty"`
19480	*PacketCaptureResultProperties `json:"properties,omitempty"`
19481}
19482
19483// MarshalJSON is the custom marshaler for PacketCaptureResult.
19484func (pcr PacketCaptureResult) MarshalJSON() ([]byte, error) {
19485	objectMap := make(map[string]interface{})
19486	if pcr.Etag != nil {
19487		objectMap["etag"] = pcr.Etag
19488	}
19489	if pcr.PacketCaptureResultProperties != nil {
19490		objectMap["properties"] = pcr.PacketCaptureResultProperties
19491	}
19492	return json.Marshal(objectMap)
19493}
19494
19495// UnmarshalJSON is the custom unmarshaler for PacketCaptureResult struct.
19496func (pcr *PacketCaptureResult) UnmarshalJSON(body []byte) error {
19497	var m map[string]*json.RawMessage
19498	err := json.Unmarshal(body, &m)
19499	if err != nil {
19500		return err
19501	}
19502	for k, v := range m {
19503		switch k {
19504		case "name":
19505			if v != nil {
19506				var name string
19507				err = json.Unmarshal(*v, &name)
19508				if err != nil {
19509					return err
19510				}
19511				pcr.Name = &name
19512			}
19513		case "id":
19514			if v != nil {
19515				var ID string
19516				err = json.Unmarshal(*v, &ID)
19517				if err != nil {
19518					return err
19519				}
19520				pcr.ID = &ID
19521			}
19522		case "etag":
19523			if v != nil {
19524				var etag string
19525				err = json.Unmarshal(*v, &etag)
19526				if err != nil {
19527					return err
19528				}
19529				pcr.Etag = &etag
19530			}
19531		case "properties":
19532			if v != nil {
19533				var packetCaptureResultProperties PacketCaptureResultProperties
19534				err = json.Unmarshal(*v, &packetCaptureResultProperties)
19535				if err != nil {
19536					return err
19537				}
19538				pcr.PacketCaptureResultProperties = &packetCaptureResultProperties
19539			}
19540		}
19541	}
19542
19543	return nil
19544}
19545
19546// PacketCaptureResultProperties describes the properties of a packet capture session.
19547type PacketCaptureResultProperties struct {
19548	// ProvisioningState - The provisioning state of the packet capture session. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
19549	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
19550	// Target - The ID of the targeted resource, only VM is currently supported.
19551	Target *string `json:"target,omitempty"`
19552	// BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated.
19553	BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"`
19554	// TotalBytesPerSession - Maximum size of the capture output.
19555	TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"`
19556	// TimeLimitInSeconds - Maximum duration of the capture session in seconds.
19557	TimeLimitInSeconds *int32                        `json:"timeLimitInSeconds,omitempty"`
19558	StorageLocation    *PacketCaptureStorageLocation `json:"storageLocation,omitempty"`
19559	Filters            *[]PacketCaptureFilter        `json:"filters,omitempty"`
19560}
19561
19562// PacketCapturesCreateFuture an abstraction for monitoring and retrieving the results of a long-running
19563// operation.
19564type PacketCapturesCreateFuture struct {
19565	azure.FutureAPI
19566	// Result returns the result of the asynchronous operation.
19567	// If the operation has not completed it will return an error.
19568	Result func(PacketCapturesClient) (PacketCaptureResult, error)
19569}
19570
19571// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19572func (future *PacketCapturesCreateFuture) UnmarshalJSON(body []byte) error {
19573	var azFuture azure.Future
19574	if err := json.Unmarshal(body, &azFuture); err != nil {
19575		return err
19576	}
19577	future.FutureAPI = &azFuture
19578	future.Result = future.result
19579	return nil
19580}
19581
19582// result is the default implementation for PacketCapturesCreateFuture.Result.
19583func (future *PacketCapturesCreateFuture) result(client PacketCapturesClient) (pcr PacketCaptureResult, err error) {
19584	var done bool
19585	done, err = future.DoneWithContext(context.Background(), client)
19586	if err != nil {
19587		err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", future.Response(), "Polling failure")
19588		return
19589	}
19590	if !done {
19591		pcr.Response.Response = future.Response()
19592		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesCreateFuture")
19593		return
19594	}
19595	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
19596	if pcr.Response.Response, err = future.GetResult(sender); err == nil && pcr.Response.Response.StatusCode != http.StatusNoContent {
19597		pcr, err = client.CreateResponder(pcr.Response.Response)
19598		if err != nil {
19599			err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", pcr.Response.Response, "Failure responding to request")
19600		}
19601	}
19602	return
19603}
19604
19605// PacketCapturesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
19606// operation.
19607type PacketCapturesDeleteFuture struct {
19608	azure.FutureAPI
19609	// Result returns the result of the asynchronous operation.
19610	// If the operation has not completed it will return an error.
19611	Result func(PacketCapturesClient) (autorest.Response, error)
19612}
19613
19614// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19615func (future *PacketCapturesDeleteFuture) UnmarshalJSON(body []byte) error {
19616	var azFuture azure.Future
19617	if err := json.Unmarshal(body, &azFuture); err != nil {
19618		return err
19619	}
19620	future.FutureAPI = &azFuture
19621	future.Result = future.result
19622	return nil
19623}
19624
19625// result is the default implementation for PacketCapturesDeleteFuture.Result.
19626func (future *PacketCapturesDeleteFuture) result(client PacketCapturesClient) (ar autorest.Response, err error) {
19627	var done bool
19628	done, err = future.DoneWithContext(context.Background(), client)
19629	if err != nil {
19630		err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", future.Response(), "Polling failure")
19631		return
19632	}
19633	if !done {
19634		ar.Response = future.Response()
19635		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesDeleteFuture")
19636		return
19637	}
19638	ar.Response = future.Response()
19639	return
19640}
19641
19642// PacketCapturesGetStatusFuture an abstraction for monitoring and retrieving the results of a long-running
19643// operation.
19644type PacketCapturesGetStatusFuture struct {
19645	azure.FutureAPI
19646	// Result returns the result of the asynchronous operation.
19647	// If the operation has not completed it will return an error.
19648	Result func(PacketCapturesClient) (PacketCaptureQueryStatusResult, error)
19649}
19650
19651// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19652func (future *PacketCapturesGetStatusFuture) UnmarshalJSON(body []byte) error {
19653	var azFuture azure.Future
19654	if err := json.Unmarshal(body, &azFuture); err != nil {
19655		return err
19656	}
19657	future.FutureAPI = &azFuture
19658	future.Result = future.result
19659	return nil
19660}
19661
19662// result is the default implementation for PacketCapturesGetStatusFuture.Result.
19663func (future *PacketCapturesGetStatusFuture) result(client PacketCapturesClient) (pcqsr PacketCaptureQueryStatusResult, err error) {
19664	var done bool
19665	done, err = future.DoneWithContext(context.Background(), client)
19666	if err != nil {
19667		err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", future.Response(), "Polling failure")
19668		return
19669	}
19670	if !done {
19671		pcqsr.Response.Response = future.Response()
19672		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesGetStatusFuture")
19673		return
19674	}
19675	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
19676	if pcqsr.Response.Response, err = future.GetResult(sender); err == nil && pcqsr.Response.Response.StatusCode != http.StatusNoContent {
19677		pcqsr, err = client.GetStatusResponder(pcqsr.Response.Response)
19678		if err != nil {
19679			err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", pcqsr.Response.Response, "Failure responding to request")
19680		}
19681	}
19682	return
19683}
19684
19685// PacketCapturesStopFuture an abstraction for monitoring and retrieving the results of a long-running
19686// operation.
19687type PacketCapturesStopFuture struct {
19688	azure.FutureAPI
19689	// Result returns the result of the asynchronous operation.
19690	// If the operation has not completed it will return an error.
19691	Result func(PacketCapturesClient) (autorest.Response, error)
19692}
19693
19694// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19695func (future *PacketCapturesStopFuture) UnmarshalJSON(body []byte) error {
19696	var azFuture azure.Future
19697	if err := json.Unmarshal(body, &azFuture); err != nil {
19698		return err
19699	}
19700	future.FutureAPI = &azFuture
19701	future.Result = future.result
19702	return nil
19703}
19704
19705// result is the default implementation for PacketCapturesStopFuture.Result.
19706func (future *PacketCapturesStopFuture) result(client PacketCapturesClient) (ar autorest.Response, err error) {
19707	var done bool
19708	done, err = future.DoneWithContext(context.Background(), client)
19709	if err != nil {
19710		err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", future.Response(), "Polling failure")
19711		return
19712	}
19713	if !done {
19714		ar.Response = future.Response()
19715		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesStopFuture")
19716		return
19717	}
19718	ar.Response = future.Response()
19719	return
19720}
19721
19722// PacketCaptureStorageLocation describes the storage location for a packet capture session.
19723type PacketCaptureStorageLocation struct {
19724	// StorageID - The ID of the storage account to save the packet capture session. Required if no local file path is provided.
19725	StorageID *string `json:"storageId,omitempty"`
19726	// 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.
19727	StoragePath *string `json:"storagePath,omitempty"`
19728	// 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.
19729	FilePath *string `json:"filePath,omitempty"`
19730}
19731
19732// PatchRouteFilter route Filter Resource.
19733type PatchRouteFilter struct {
19734	*RouteFilterPropertiesFormat `json:"properties,omitempty"`
19735	// Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource.
19736	Name *string `json:"name,omitempty"`
19737	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
19738	Etag *string `json:"etag,omitempty"`
19739	// Type - READ-ONLY; Resource type.
19740	Type *string `json:"type,omitempty"`
19741	// Tags - Resource tags.
19742	Tags map[string]*string `json:"tags"`
19743	// ID - Resource ID.
19744	ID *string `json:"id,omitempty"`
19745}
19746
19747// MarshalJSON is the custom marshaler for PatchRouteFilter.
19748func (prf PatchRouteFilter) MarshalJSON() ([]byte, error) {
19749	objectMap := make(map[string]interface{})
19750	if prf.RouteFilterPropertiesFormat != nil {
19751		objectMap["properties"] = prf.RouteFilterPropertiesFormat
19752	}
19753	if prf.Tags != nil {
19754		objectMap["tags"] = prf.Tags
19755	}
19756	if prf.ID != nil {
19757		objectMap["id"] = prf.ID
19758	}
19759	return json.Marshal(objectMap)
19760}
19761
19762// UnmarshalJSON is the custom unmarshaler for PatchRouteFilter struct.
19763func (prf *PatchRouteFilter) UnmarshalJSON(body []byte) error {
19764	var m map[string]*json.RawMessage
19765	err := json.Unmarshal(body, &m)
19766	if err != nil {
19767		return err
19768	}
19769	for k, v := range m {
19770		switch k {
19771		case "properties":
19772			if v != nil {
19773				var routeFilterPropertiesFormat RouteFilterPropertiesFormat
19774				err = json.Unmarshal(*v, &routeFilterPropertiesFormat)
19775				if err != nil {
19776					return err
19777				}
19778				prf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat
19779			}
19780		case "name":
19781			if v != nil {
19782				var name string
19783				err = json.Unmarshal(*v, &name)
19784				if err != nil {
19785					return err
19786				}
19787				prf.Name = &name
19788			}
19789		case "etag":
19790			if v != nil {
19791				var etag string
19792				err = json.Unmarshal(*v, &etag)
19793				if err != nil {
19794					return err
19795				}
19796				prf.Etag = &etag
19797			}
19798		case "type":
19799			if v != nil {
19800				var typeVar string
19801				err = json.Unmarshal(*v, &typeVar)
19802				if err != nil {
19803					return err
19804				}
19805				prf.Type = &typeVar
19806			}
19807		case "tags":
19808			if v != nil {
19809				var tags map[string]*string
19810				err = json.Unmarshal(*v, &tags)
19811				if err != nil {
19812					return err
19813				}
19814				prf.Tags = tags
19815			}
19816		case "id":
19817			if v != nil {
19818				var ID string
19819				err = json.Unmarshal(*v, &ID)
19820				if err != nil {
19821					return err
19822				}
19823				prf.ID = &ID
19824			}
19825		}
19826	}
19827
19828	return nil
19829}
19830
19831// PatchRouteFilterRule route Filter Rule Resource
19832type PatchRouteFilterRule struct {
19833	*RouteFilterRulePropertiesFormat `json:"properties,omitempty"`
19834	// Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource.
19835	Name *string `json:"name,omitempty"`
19836	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
19837	Etag *string `json:"etag,omitempty"`
19838	// ID - Resource ID.
19839	ID *string `json:"id,omitempty"`
19840}
19841
19842// MarshalJSON is the custom marshaler for PatchRouteFilterRule.
19843func (prfr PatchRouteFilterRule) MarshalJSON() ([]byte, error) {
19844	objectMap := make(map[string]interface{})
19845	if prfr.RouteFilterRulePropertiesFormat != nil {
19846		objectMap["properties"] = prfr.RouteFilterRulePropertiesFormat
19847	}
19848	if prfr.ID != nil {
19849		objectMap["id"] = prfr.ID
19850	}
19851	return json.Marshal(objectMap)
19852}
19853
19854// UnmarshalJSON is the custom unmarshaler for PatchRouteFilterRule struct.
19855func (prfr *PatchRouteFilterRule) UnmarshalJSON(body []byte) error {
19856	var m map[string]*json.RawMessage
19857	err := json.Unmarshal(body, &m)
19858	if err != nil {
19859		return err
19860	}
19861	for k, v := range m {
19862		switch k {
19863		case "properties":
19864			if v != nil {
19865				var routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat
19866				err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat)
19867				if err != nil {
19868					return err
19869				}
19870				prfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat
19871			}
19872		case "name":
19873			if v != nil {
19874				var name string
19875				err = json.Unmarshal(*v, &name)
19876				if err != nil {
19877					return err
19878				}
19879				prfr.Name = &name
19880			}
19881		case "etag":
19882			if v != nil {
19883				var etag string
19884				err = json.Unmarshal(*v, &etag)
19885				if err != nil {
19886					return err
19887				}
19888				prfr.Etag = &etag
19889			}
19890		case "id":
19891			if v != nil {
19892				var ID string
19893				err = json.Unmarshal(*v, &ID)
19894				if err != nil {
19895					return err
19896				}
19897				prfr.ID = &ID
19898			}
19899		}
19900	}
19901
19902	return nil
19903}
19904
19905// Probe a load balancer probe.
19906type Probe struct {
19907	autorest.Response `json:"-"`
19908	// ProbePropertiesFormat - Properties of load balancer probe.
19909	*ProbePropertiesFormat `json:"properties,omitempty"`
19910	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
19911	Name *string `json:"name,omitempty"`
19912	// Etag - A unique read-only string that changes whenever the resource is updated.
19913	Etag *string `json:"etag,omitempty"`
19914	// ID - Resource ID.
19915	ID *string `json:"id,omitempty"`
19916}
19917
19918// MarshalJSON is the custom marshaler for Probe.
19919func (p Probe) MarshalJSON() ([]byte, error) {
19920	objectMap := make(map[string]interface{})
19921	if p.ProbePropertiesFormat != nil {
19922		objectMap["properties"] = p.ProbePropertiesFormat
19923	}
19924	if p.Name != nil {
19925		objectMap["name"] = p.Name
19926	}
19927	if p.Etag != nil {
19928		objectMap["etag"] = p.Etag
19929	}
19930	if p.ID != nil {
19931		objectMap["id"] = p.ID
19932	}
19933	return json.Marshal(objectMap)
19934}
19935
19936// UnmarshalJSON is the custom unmarshaler for Probe struct.
19937func (p *Probe) UnmarshalJSON(body []byte) error {
19938	var m map[string]*json.RawMessage
19939	err := json.Unmarshal(body, &m)
19940	if err != nil {
19941		return err
19942	}
19943	for k, v := range m {
19944		switch k {
19945		case "properties":
19946			if v != nil {
19947				var probePropertiesFormat ProbePropertiesFormat
19948				err = json.Unmarshal(*v, &probePropertiesFormat)
19949				if err != nil {
19950					return err
19951				}
19952				p.ProbePropertiesFormat = &probePropertiesFormat
19953			}
19954		case "name":
19955			if v != nil {
19956				var name string
19957				err = json.Unmarshal(*v, &name)
19958				if err != nil {
19959					return err
19960				}
19961				p.Name = &name
19962			}
19963		case "etag":
19964			if v != nil {
19965				var etag string
19966				err = json.Unmarshal(*v, &etag)
19967				if err != nil {
19968					return err
19969				}
19970				p.Etag = &etag
19971			}
19972		case "id":
19973			if v != nil {
19974				var ID string
19975				err = json.Unmarshal(*v, &ID)
19976				if err != nil {
19977					return err
19978				}
19979				p.ID = &ID
19980			}
19981		}
19982	}
19983
19984	return nil
19985}
19986
19987// ProbePropertiesFormat load balancer probe resource.
19988type ProbePropertiesFormat struct {
19989	// LoadBalancingRules - READ-ONLY; The load balancer rules that use this probe.
19990	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
19991	// Protocol - The protocol of the end point. Possible values are: 'Http', 'Tcp', or 'Https'. If 'Tcp' is specified, a received ACK is required for the probe to be successful. If 'Http' or 'Https' is specified, a 200 OK response from the specifies URI is required for the probe to be successful. Possible values include: 'ProbeProtocolHTTP', 'ProbeProtocolTCP', 'ProbeProtocolHTTPS'
19992	Protocol ProbeProtocol `json:"protocol,omitempty"`
19993	// Port - The port for communicating the probe. Possible values range from 1 to 65535, inclusive.
19994	Port *int32 `json:"port,omitempty"`
19995	// 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.
19996	IntervalInSeconds *int32 `json:"intervalInSeconds,omitempty"`
19997	// 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.
19998	NumberOfProbes *int32 `json:"numberOfProbes,omitempty"`
19999	// 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.
20000	RequestPath *string `json:"requestPath,omitempty"`
20001	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
20002	ProvisioningState *string `json:"provisioningState,omitempty"`
20003}
20004
20005// MarshalJSON is the custom marshaler for ProbePropertiesFormat.
20006func (ppf ProbePropertiesFormat) MarshalJSON() ([]byte, error) {
20007	objectMap := make(map[string]interface{})
20008	if ppf.Protocol != "" {
20009		objectMap["protocol"] = ppf.Protocol
20010	}
20011	if ppf.Port != nil {
20012		objectMap["port"] = ppf.Port
20013	}
20014	if ppf.IntervalInSeconds != nil {
20015		objectMap["intervalInSeconds"] = ppf.IntervalInSeconds
20016	}
20017	if ppf.NumberOfProbes != nil {
20018		objectMap["numberOfProbes"] = ppf.NumberOfProbes
20019	}
20020	if ppf.RequestPath != nil {
20021		objectMap["requestPath"] = ppf.RequestPath
20022	}
20023	if ppf.ProvisioningState != nil {
20024		objectMap["provisioningState"] = ppf.ProvisioningState
20025	}
20026	return json.Marshal(objectMap)
20027}
20028
20029// Profile network profile resource.
20030type Profile struct {
20031	autorest.Response `json:"-"`
20032	// ProfilePropertiesFormat - Network profile properties.
20033	*ProfilePropertiesFormat `json:"properties,omitempty"`
20034	// Etag - A unique read-only string that changes whenever the resource is updated.
20035	Etag *string `json:"etag,omitempty"`
20036	// ID - Resource ID.
20037	ID *string `json:"id,omitempty"`
20038	// Name - READ-ONLY; Resource name.
20039	Name *string `json:"name,omitempty"`
20040	// Type - READ-ONLY; Resource type.
20041	Type *string `json:"type,omitempty"`
20042	// Location - Resource location.
20043	Location *string `json:"location,omitempty"`
20044	// Tags - Resource tags.
20045	Tags map[string]*string `json:"tags"`
20046}
20047
20048// MarshalJSON is the custom marshaler for Profile.
20049func (p Profile) MarshalJSON() ([]byte, error) {
20050	objectMap := make(map[string]interface{})
20051	if p.ProfilePropertiesFormat != nil {
20052		objectMap["properties"] = p.ProfilePropertiesFormat
20053	}
20054	if p.Etag != nil {
20055		objectMap["etag"] = p.Etag
20056	}
20057	if p.ID != nil {
20058		objectMap["id"] = p.ID
20059	}
20060	if p.Location != nil {
20061		objectMap["location"] = p.Location
20062	}
20063	if p.Tags != nil {
20064		objectMap["tags"] = p.Tags
20065	}
20066	return json.Marshal(objectMap)
20067}
20068
20069// UnmarshalJSON is the custom unmarshaler for Profile struct.
20070func (p *Profile) UnmarshalJSON(body []byte) error {
20071	var m map[string]*json.RawMessage
20072	err := json.Unmarshal(body, &m)
20073	if err != nil {
20074		return err
20075	}
20076	for k, v := range m {
20077		switch k {
20078		case "properties":
20079			if v != nil {
20080				var profilePropertiesFormat ProfilePropertiesFormat
20081				err = json.Unmarshal(*v, &profilePropertiesFormat)
20082				if err != nil {
20083					return err
20084				}
20085				p.ProfilePropertiesFormat = &profilePropertiesFormat
20086			}
20087		case "etag":
20088			if v != nil {
20089				var etag string
20090				err = json.Unmarshal(*v, &etag)
20091				if err != nil {
20092					return err
20093				}
20094				p.Etag = &etag
20095			}
20096		case "id":
20097			if v != nil {
20098				var ID string
20099				err = json.Unmarshal(*v, &ID)
20100				if err != nil {
20101					return err
20102				}
20103				p.ID = &ID
20104			}
20105		case "name":
20106			if v != nil {
20107				var name string
20108				err = json.Unmarshal(*v, &name)
20109				if err != nil {
20110					return err
20111				}
20112				p.Name = &name
20113			}
20114		case "type":
20115			if v != nil {
20116				var typeVar string
20117				err = json.Unmarshal(*v, &typeVar)
20118				if err != nil {
20119					return err
20120				}
20121				p.Type = &typeVar
20122			}
20123		case "location":
20124			if v != nil {
20125				var location string
20126				err = json.Unmarshal(*v, &location)
20127				if err != nil {
20128					return err
20129				}
20130				p.Location = &location
20131			}
20132		case "tags":
20133			if v != nil {
20134				var tags map[string]*string
20135				err = json.Unmarshal(*v, &tags)
20136				if err != nil {
20137					return err
20138				}
20139				p.Tags = tags
20140			}
20141		}
20142	}
20143
20144	return nil
20145}
20146
20147// ProfileListResult response for ListNetworkProfiles API service call.
20148type ProfileListResult struct {
20149	autorest.Response `json:"-"`
20150	// Value - A list of network profiles that exist in a resource group.
20151	Value *[]Profile `json:"value,omitempty"`
20152	// NextLink - The URL to get the next set of results.
20153	NextLink *string `json:"nextLink,omitempty"`
20154}
20155
20156// ProfileListResultIterator provides access to a complete listing of Profile values.
20157type ProfileListResultIterator struct {
20158	i    int
20159	page ProfileListResultPage
20160}
20161
20162// NextWithContext advances to the next value.  If there was an error making
20163// the request the iterator does not advance and the error is returned.
20164func (iter *ProfileListResultIterator) NextWithContext(ctx context.Context) (err error) {
20165	if tracing.IsEnabled() {
20166		ctx = tracing.StartSpan(ctx, fqdn+"/ProfileListResultIterator.NextWithContext")
20167		defer func() {
20168			sc := -1
20169			if iter.Response().Response.Response != nil {
20170				sc = iter.Response().Response.Response.StatusCode
20171			}
20172			tracing.EndSpan(ctx, sc, err)
20173		}()
20174	}
20175	iter.i++
20176	if iter.i < len(iter.page.Values()) {
20177		return nil
20178	}
20179	err = iter.page.NextWithContext(ctx)
20180	if err != nil {
20181		iter.i--
20182		return err
20183	}
20184	iter.i = 0
20185	return nil
20186}
20187
20188// Next advances to the next value.  If there was an error making
20189// the request the iterator does not advance and the error is returned.
20190// Deprecated: Use NextWithContext() instead.
20191func (iter *ProfileListResultIterator) Next() error {
20192	return iter.NextWithContext(context.Background())
20193}
20194
20195// NotDone returns true if the enumeration should be started or is not yet complete.
20196func (iter ProfileListResultIterator) NotDone() bool {
20197	return iter.page.NotDone() && iter.i < len(iter.page.Values())
20198}
20199
20200// Response returns the raw server response from the last page request.
20201func (iter ProfileListResultIterator) Response() ProfileListResult {
20202	return iter.page.Response()
20203}
20204
20205// Value returns the current value or a zero-initialized value if the
20206// iterator has advanced beyond the end of the collection.
20207func (iter ProfileListResultIterator) Value() Profile {
20208	if !iter.page.NotDone() {
20209		return Profile{}
20210	}
20211	return iter.page.Values()[iter.i]
20212}
20213
20214// Creates a new instance of the ProfileListResultIterator type.
20215func NewProfileListResultIterator(page ProfileListResultPage) ProfileListResultIterator {
20216	return ProfileListResultIterator{page: page}
20217}
20218
20219// IsEmpty returns true if the ListResult contains no values.
20220func (plr ProfileListResult) IsEmpty() bool {
20221	return plr.Value == nil || len(*plr.Value) == 0
20222}
20223
20224// hasNextLink returns true if the NextLink is not empty.
20225func (plr ProfileListResult) hasNextLink() bool {
20226	return plr.NextLink != nil && len(*plr.NextLink) != 0
20227}
20228
20229// profileListResultPreparer prepares a request to retrieve the next set of results.
20230// It returns nil if no more results exist.
20231func (plr ProfileListResult) profileListResultPreparer(ctx context.Context) (*http.Request, error) {
20232	if !plr.hasNextLink() {
20233		return nil, nil
20234	}
20235	return autorest.Prepare((&http.Request{}).WithContext(ctx),
20236		autorest.AsJSON(),
20237		autorest.AsGet(),
20238		autorest.WithBaseURL(to.String(plr.NextLink)))
20239}
20240
20241// ProfileListResultPage contains a page of Profile values.
20242type ProfileListResultPage struct {
20243	fn  func(context.Context, ProfileListResult) (ProfileListResult, error)
20244	plr ProfileListResult
20245}
20246
20247// NextWithContext advances to the next page of values.  If there was an error making
20248// the request the page does not advance and the error is returned.
20249func (page *ProfileListResultPage) NextWithContext(ctx context.Context) (err error) {
20250	if tracing.IsEnabled() {
20251		ctx = tracing.StartSpan(ctx, fqdn+"/ProfileListResultPage.NextWithContext")
20252		defer func() {
20253			sc := -1
20254			if page.Response().Response.Response != nil {
20255				sc = page.Response().Response.Response.StatusCode
20256			}
20257			tracing.EndSpan(ctx, sc, err)
20258		}()
20259	}
20260	for {
20261		next, err := page.fn(ctx, page.plr)
20262		if err != nil {
20263			return err
20264		}
20265		page.plr = next
20266		if !next.hasNextLink() || !next.IsEmpty() {
20267			break
20268		}
20269	}
20270	return nil
20271}
20272
20273// Next advances to the next page of values.  If there was an error making
20274// the request the page does not advance and the error is returned.
20275// Deprecated: Use NextWithContext() instead.
20276func (page *ProfileListResultPage) Next() error {
20277	return page.NextWithContext(context.Background())
20278}
20279
20280// NotDone returns true if the page enumeration should be started or is not yet complete.
20281func (page ProfileListResultPage) NotDone() bool {
20282	return !page.plr.IsEmpty()
20283}
20284
20285// Response returns the raw server response from the last page request.
20286func (page ProfileListResultPage) Response() ProfileListResult {
20287	return page.plr
20288}
20289
20290// Values returns the slice of values for the current page or nil if there are no values.
20291func (page ProfileListResultPage) Values() []Profile {
20292	if page.plr.IsEmpty() {
20293		return nil
20294	}
20295	return *page.plr.Value
20296}
20297
20298// Creates a new instance of the ProfileListResultPage type.
20299func NewProfileListResultPage(cur ProfileListResult, getNextPage func(context.Context, ProfileListResult) (ProfileListResult, error)) ProfileListResultPage {
20300	return ProfileListResultPage{
20301		fn:  getNextPage,
20302		plr: cur,
20303	}
20304}
20305
20306// ProfilePropertiesFormat network profile properties.
20307type ProfilePropertiesFormat struct {
20308	// ContainerNetworkInterfaces - List of child container network interfaces.
20309	ContainerNetworkInterfaces *[]ContainerNetworkInterface `json:"containerNetworkInterfaces,omitempty"`
20310	// ContainerNetworkInterfaceConfigurations - List of chid container network interface configurations.
20311	ContainerNetworkInterfaceConfigurations *[]ContainerNetworkInterfaceConfiguration `json:"containerNetworkInterfaceConfigurations,omitempty"`
20312	// ResourceGUID - READ-ONLY; The resource GUID property of the network interface resource.
20313	ResourceGUID *string `json:"resourceGuid,omitempty"`
20314	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
20315	ProvisioningState *string `json:"provisioningState,omitempty"`
20316}
20317
20318// MarshalJSON is the custom marshaler for ProfilePropertiesFormat.
20319func (ppf ProfilePropertiesFormat) MarshalJSON() ([]byte, error) {
20320	objectMap := make(map[string]interface{})
20321	if ppf.ContainerNetworkInterfaces != nil {
20322		objectMap["containerNetworkInterfaces"] = ppf.ContainerNetworkInterfaces
20323	}
20324	if ppf.ContainerNetworkInterfaceConfigurations != nil {
20325		objectMap["containerNetworkInterfaceConfigurations"] = ppf.ContainerNetworkInterfaceConfigurations
20326	}
20327	return json.Marshal(objectMap)
20328}
20329
20330// ProfilesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
20331// operation.
20332type ProfilesDeleteFuture struct {
20333	azure.FutureAPI
20334	// Result returns the result of the asynchronous operation.
20335	// If the operation has not completed it will return an error.
20336	Result func(ProfilesClient) (autorest.Response, error)
20337}
20338
20339// UnmarshalJSON is the custom unmarshaller for CreateFuture.
20340func (future *ProfilesDeleteFuture) UnmarshalJSON(body []byte) error {
20341	var azFuture azure.Future
20342	if err := json.Unmarshal(body, &azFuture); err != nil {
20343		return err
20344	}
20345	future.FutureAPI = &azFuture
20346	future.Result = future.result
20347	return nil
20348}
20349
20350// result is the default implementation for ProfilesDeleteFuture.Result.
20351func (future *ProfilesDeleteFuture) result(client ProfilesClient) (ar autorest.Response, err error) {
20352	var done bool
20353	done, err = future.DoneWithContext(context.Background(), client)
20354	if err != nil {
20355		err = autorest.NewErrorWithError(err, "network.ProfilesDeleteFuture", "Result", future.Response(), "Polling failure")
20356		return
20357	}
20358	if !done {
20359		ar.Response = future.Response()
20360		err = azure.NewAsyncOpIncompleteError("network.ProfilesDeleteFuture")
20361		return
20362	}
20363	ar.Response = future.Response()
20364	return
20365}
20366
20367// ProtocolConfiguration configuration of the protocol.
20368type ProtocolConfiguration struct {
20369	HTTPConfiguration *HTTPConfiguration `json:"HTTPConfiguration,omitempty"`
20370}
20371
20372// ProtocolCustomSettingsFormat dDoS custom policy properties.
20373type ProtocolCustomSettingsFormat struct {
20374	// Protocol - The protocol for which the DDoS protection policy is being customized. Possible values include: 'DdosCustomPolicyProtocolTCP', 'DdosCustomPolicyProtocolUDP', 'DdosCustomPolicyProtocolSyn'
20375	Protocol DdosCustomPolicyProtocol `json:"protocol,omitempty"`
20376	// TriggerRateOverride - The customized DDoS protection trigger rate.
20377	TriggerRateOverride *string `json:"triggerRateOverride,omitempty"`
20378	// SourceRateOverride - The customized DDoS protection source rate.
20379	SourceRateOverride *string `json:"sourceRateOverride,omitempty"`
20380	// 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'
20381	TriggerSensitivityOverride DdosCustomPolicyTriggerSensitivityOverride `json:"triggerSensitivityOverride,omitempty"`
20382}
20383
20384// PublicIPAddress public IP address resource.
20385type PublicIPAddress struct {
20386	autorest.Response `json:"-"`
20387	// Sku - The public IP address SKU.
20388	Sku *PublicIPAddressSku `json:"sku,omitempty"`
20389	// PublicIPAddressPropertiesFormat - Public IP address properties.
20390	*PublicIPAddressPropertiesFormat `json:"properties,omitempty"`
20391	// Etag - A unique read-only string that changes whenever the resource is updated.
20392	Etag *string `json:"etag,omitempty"`
20393	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
20394	Zones *[]string `json:"zones,omitempty"`
20395	// ID - Resource ID.
20396	ID *string `json:"id,omitempty"`
20397	// Name - READ-ONLY; Resource name.
20398	Name *string `json:"name,omitempty"`
20399	// Type - READ-ONLY; Resource type.
20400	Type *string `json:"type,omitempty"`
20401	// Location - Resource location.
20402	Location *string `json:"location,omitempty"`
20403	// Tags - Resource tags.
20404	Tags map[string]*string `json:"tags"`
20405}
20406
20407// MarshalJSON is the custom marshaler for PublicIPAddress.
20408func (pia PublicIPAddress) MarshalJSON() ([]byte, error) {
20409	objectMap := make(map[string]interface{})
20410	if pia.Sku != nil {
20411		objectMap["sku"] = pia.Sku
20412	}
20413	if pia.PublicIPAddressPropertiesFormat != nil {
20414		objectMap["properties"] = pia.PublicIPAddressPropertiesFormat
20415	}
20416	if pia.Etag != nil {
20417		objectMap["etag"] = pia.Etag
20418	}
20419	if pia.Zones != nil {
20420		objectMap["zones"] = pia.Zones
20421	}
20422	if pia.ID != nil {
20423		objectMap["id"] = pia.ID
20424	}
20425	if pia.Location != nil {
20426		objectMap["location"] = pia.Location
20427	}
20428	if pia.Tags != nil {
20429		objectMap["tags"] = pia.Tags
20430	}
20431	return json.Marshal(objectMap)
20432}
20433
20434// UnmarshalJSON is the custom unmarshaler for PublicIPAddress struct.
20435func (pia *PublicIPAddress) UnmarshalJSON(body []byte) error {
20436	var m map[string]*json.RawMessage
20437	err := json.Unmarshal(body, &m)
20438	if err != nil {
20439		return err
20440	}
20441	for k, v := range m {
20442		switch k {
20443		case "sku":
20444			if v != nil {
20445				var sku PublicIPAddressSku
20446				err = json.Unmarshal(*v, &sku)
20447				if err != nil {
20448					return err
20449				}
20450				pia.Sku = &sku
20451			}
20452		case "properties":
20453			if v != nil {
20454				var publicIPAddressPropertiesFormat PublicIPAddressPropertiesFormat
20455				err = json.Unmarshal(*v, &publicIPAddressPropertiesFormat)
20456				if err != nil {
20457					return err
20458				}
20459				pia.PublicIPAddressPropertiesFormat = &publicIPAddressPropertiesFormat
20460			}
20461		case "etag":
20462			if v != nil {
20463				var etag string
20464				err = json.Unmarshal(*v, &etag)
20465				if err != nil {
20466					return err
20467				}
20468				pia.Etag = &etag
20469			}
20470		case "zones":
20471			if v != nil {
20472				var zones []string
20473				err = json.Unmarshal(*v, &zones)
20474				if err != nil {
20475					return err
20476				}
20477				pia.Zones = &zones
20478			}
20479		case "id":
20480			if v != nil {
20481				var ID string
20482				err = json.Unmarshal(*v, &ID)
20483				if err != nil {
20484					return err
20485				}
20486				pia.ID = &ID
20487			}
20488		case "name":
20489			if v != nil {
20490				var name string
20491				err = json.Unmarshal(*v, &name)
20492				if err != nil {
20493					return err
20494				}
20495				pia.Name = &name
20496			}
20497		case "type":
20498			if v != nil {
20499				var typeVar string
20500				err = json.Unmarshal(*v, &typeVar)
20501				if err != nil {
20502					return err
20503				}
20504				pia.Type = &typeVar
20505			}
20506		case "location":
20507			if v != nil {
20508				var location string
20509				err = json.Unmarshal(*v, &location)
20510				if err != nil {
20511					return err
20512				}
20513				pia.Location = &location
20514			}
20515		case "tags":
20516			if v != nil {
20517				var tags map[string]*string
20518				err = json.Unmarshal(*v, &tags)
20519				if err != nil {
20520					return err
20521				}
20522				pia.Tags = tags
20523			}
20524		}
20525	}
20526
20527	return nil
20528}
20529
20530// PublicIPAddressDNSSettings contains FQDN of the DNS record associated with the public IP address
20531type PublicIPAddressDNSSettings struct {
20532	// 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.
20533	DomainNameLabel *string `json:"domainNameLabel,omitempty"`
20534	// 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.
20535	Fqdn *string `json:"fqdn,omitempty"`
20536	// 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.
20537	ReverseFqdn *string `json:"reverseFqdn,omitempty"`
20538}
20539
20540// PublicIPAddressesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
20541// long-running operation.
20542type PublicIPAddressesCreateOrUpdateFuture struct {
20543	azure.FutureAPI
20544	// Result returns the result of the asynchronous operation.
20545	// If the operation has not completed it will return an error.
20546	Result func(PublicIPAddressesClient) (PublicIPAddress, error)
20547}
20548
20549// UnmarshalJSON is the custom unmarshaller for CreateFuture.
20550func (future *PublicIPAddressesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
20551	var azFuture azure.Future
20552	if err := json.Unmarshal(body, &azFuture); err != nil {
20553		return err
20554	}
20555	future.FutureAPI = &azFuture
20556	future.Result = future.result
20557	return nil
20558}
20559
20560// result is the default implementation for PublicIPAddressesCreateOrUpdateFuture.Result.
20561func (future *PublicIPAddressesCreateOrUpdateFuture) result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
20562	var done bool
20563	done, err = future.DoneWithContext(context.Background(), client)
20564	if err != nil {
20565		err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
20566		return
20567	}
20568	if !done {
20569		pia.Response.Response = future.Response()
20570		err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesCreateOrUpdateFuture")
20571		return
20572	}
20573	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20574	if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent {
20575		pia, err = client.CreateOrUpdateResponder(pia.Response.Response)
20576		if err != nil {
20577			err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", pia.Response.Response, "Failure responding to request")
20578		}
20579	}
20580	return
20581}
20582
20583// PublicIPAddressesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
20584// operation.
20585type PublicIPAddressesDeleteFuture struct {
20586	azure.FutureAPI
20587	// Result returns the result of the asynchronous operation.
20588	// If the operation has not completed it will return an error.
20589	Result func(PublicIPAddressesClient) (autorest.Response, error)
20590}
20591
20592// UnmarshalJSON is the custom unmarshaller for CreateFuture.
20593func (future *PublicIPAddressesDeleteFuture) UnmarshalJSON(body []byte) error {
20594	var azFuture azure.Future
20595	if err := json.Unmarshal(body, &azFuture); err != nil {
20596		return err
20597	}
20598	future.FutureAPI = &azFuture
20599	future.Result = future.result
20600	return nil
20601}
20602
20603// result is the default implementation for PublicIPAddressesDeleteFuture.Result.
20604func (future *PublicIPAddressesDeleteFuture) result(client PublicIPAddressesClient) (ar autorest.Response, err error) {
20605	var done bool
20606	done, err = future.DoneWithContext(context.Background(), client)
20607	if err != nil {
20608		err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", future.Response(), "Polling failure")
20609		return
20610	}
20611	if !done {
20612		ar.Response = future.Response()
20613		err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesDeleteFuture")
20614		return
20615	}
20616	ar.Response = future.Response()
20617	return
20618}
20619
20620// PublicIPAddressesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
20621// long-running operation.
20622type PublicIPAddressesUpdateTagsFuture struct {
20623	azure.FutureAPI
20624	// Result returns the result of the asynchronous operation.
20625	// If the operation has not completed it will return an error.
20626	Result func(PublicIPAddressesClient) (PublicIPAddress, error)
20627}
20628
20629// UnmarshalJSON is the custom unmarshaller for CreateFuture.
20630func (future *PublicIPAddressesUpdateTagsFuture) UnmarshalJSON(body []byte) error {
20631	var azFuture azure.Future
20632	if err := json.Unmarshal(body, &azFuture); err != nil {
20633		return err
20634	}
20635	future.FutureAPI = &azFuture
20636	future.Result = future.result
20637	return nil
20638}
20639
20640// result is the default implementation for PublicIPAddressesUpdateTagsFuture.Result.
20641func (future *PublicIPAddressesUpdateTagsFuture) result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
20642	var done bool
20643	done, err = future.DoneWithContext(context.Background(), client)
20644	if err != nil {
20645		err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
20646		return
20647	}
20648	if !done {
20649		pia.Response.Response = future.Response()
20650		err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesUpdateTagsFuture")
20651		return
20652	}
20653	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20654	if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent {
20655		pia, err = client.UpdateTagsResponder(pia.Response.Response)
20656		if err != nil {
20657			err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", pia.Response.Response, "Failure responding to request")
20658		}
20659	}
20660	return
20661}
20662
20663// PublicIPAddressListResult response for ListPublicIpAddresses API service call.
20664type PublicIPAddressListResult struct {
20665	autorest.Response `json:"-"`
20666	// Value - A list of public IP addresses that exists in a resource group.
20667	Value *[]PublicIPAddress `json:"value,omitempty"`
20668	// NextLink - The URL to get the next set of results.
20669	NextLink *string `json:"nextLink,omitempty"`
20670}
20671
20672// PublicIPAddressListResultIterator provides access to a complete listing of PublicIPAddress values.
20673type PublicIPAddressListResultIterator struct {
20674	i    int
20675	page PublicIPAddressListResultPage
20676}
20677
20678// NextWithContext advances to the next value.  If there was an error making
20679// the request the iterator does not advance and the error is returned.
20680func (iter *PublicIPAddressListResultIterator) NextWithContext(ctx context.Context) (err error) {
20681	if tracing.IsEnabled() {
20682		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultIterator.NextWithContext")
20683		defer func() {
20684			sc := -1
20685			if iter.Response().Response.Response != nil {
20686				sc = iter.Response().Response.Response.StatusCode
20687			}
20688			tracing.EndSpan(ctx, sc, err)
20689		}()
20690	}
20691	iter.i++
20692	if iter.i < len(iter.page.Values()) {
20693		return nil
20694	}
20695	err = iter.page.NextWithContext(ctx)
20696	if err != nil {
20697		iter.i--
20698		return err
20699	}
20700	iter.i = 0
20701	return nil
20702}
20703
20704// Next advances to the next value.  If there was an error making
20705// the request the iterator does not advance and the error is returned.
20706// Deprecated: Use NextWithContext() instead.
20707func (iter *PublicIPAddressListResultIterator) Next() error {
20708	return iter.NextWithContext(context.Background())
20709}
20710
20711// NotDone returns true if the enumeration should be started or is not yet complete.
20712func (iter PublicIPAddressListResultIterator) NotDone() bool {
20713	return iter.page.NotDone() && iter.i < len(iter.page.Values())
20714}
20715
20716// Response returns the raw server response from the last page request.
20717func (iter PublicIPAddressListResultIterator) Response() PublicIPAddressListResult {
20718	return iter.page.Response()
20719}
20720
20721// Value returns the current value or a zero-initialized value if the
20722// iterator has advanced beyond the end of the collection.
20723func (iter PublicIPAddressListResultIterator) Value() PublicIPAddress {
20724	if !iter.page.NotDone() {
20725		return PublicIPAddress{}
20726	}
20727	return iter.page.Values()[iter.i]
20728}
20729
20730// Creates a new instance of the PublicIPAddressListResultIterator type.
20731func NewPublicIPAddressListResultIterator(page PublicIPAddressListResultPage) PublicIPAddressListResultIterator {
20732	return PublicIPAddressListResultIterator{page: page}
20733}
20734
20735// IsEmpty returns true if the ListResult contains no values.
20736func (pialr PublicIPAddressListResult) IsEmpty() bool {
20737	return pialr.Value == nil || len(*pialr.Value) == 0
20738}
20739
20740// hasNextLink returns true if the NextLink is not empty.
20741func (pialr PublicIPAddressListResult) hasNextLink() bool {
20742	return pialr.NextLink != nil && len(*pialr.NextLink) != 0
20743}
20744
20745// publicIPAddressListResultPreparer prepares a request to retrieve the next set of results.
20746// It returns nil if no more results exist.
20747func (pialr PublicIPAddressListResult) publicIPAddressListResultPreparer(ctx context.Context) (*http.Request, error) {
20748	if !pialr.hasNextLink() {
20749		return nil, nil
20750	}
20751	return autorest.Prepare((&http.Request{}).WithContext(ctx),
20752		autorest.AsJSON(),
20753		autorest.AsGet(),
20754		autorest.WithBaseURL(to.String(pialr.NextLink)))
20755}
20756
20757// PublicIPAddressListResultPage contains a page of PublicIPAddress values.
20758type PublicIPAddressListResultPage struct {
20759	fn    func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)
20760	pialr PublicIPAddressListResult
20761}
20762
20763// NextWithContext advances to the next page of values.  If there was an error making
20764// the request the page does not advance and the error is returned.
20765func (page *PublicIPAddressListResultPage) NextWithContext(ctx context.Context) (err error) {
20766	if tracing.IsEnabled() {
20767		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultPage.NextWithContext")
20768		defer func() {
20769			sc := -1
20770			if page.Response().Response.Response != nil {
20771				sc = page.Response().Response.Response.StatusCode
20772			}
20773			tracing.EndSpan(ctx, sc, err)
20774		}()
20775	}
20776	for {
20777		next, err := page.fn(ctx, page.pialr)
20778		if err != nil {
20779			return err
20780		}
20781		page.pialr = next
20782		if !next.hasNextLink() || !next.IsEmpty() {
20783			break
20784		}
20785	}
20786	return nil
20787}
20788
20789// Next advances to the next page of values.  If there was an error making
20790// the request the page does not advance and the error is returned.
20791// Deprecated: Use NextWithContext() instead.
20792func (page *PublicIPAddressListResultPage) Next() error {
20793	return page.NextWithContext(context.Background())
20794}
20795
20796// NotDone returns true if the page enumeration should be started or is not yet complete.
20797func (page PublicIPAddressListResultPage) NotDone() bool {
20798	return !page.pialr.IsEmpty()
20799}
20800
20801// Response returns the raw server response from the last page request.
20802func (page PublicIPAddressListResultPage) Response() PublicIPAddressListResult {
20803	return page.pialr
20804}
20805
20806// Values returns the slice of values for the current page or nil if there are no values.
20807func (page PublicIPAddressListResultPage) Values() []PublicIPAddress {
20808	if page.pialr.IsEmpty() {
20809		return nil
20810	}
20811	return *page.pialr.Value
20812}
20813
20814// Creates a new instance of the PublicIPAddressListResultPage type.
20815func NewPublicIPAddressListResultPage(cur PublicIPAddressListResult, getNextPage func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)) PublicIPAddressListResultPage {
20816	return PublicIPAddressListResultPage{
20817		fn:    getNextPage,
20818		pialr: cur,
20819	}
20820}
20821
20822// PublicIPAddressPropertiesFormat public IP address properties.
20823type PublicIPAddressPropertiesFormat struct {
20824	// PublicIPAllocationMethod - The public IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
20825	PublicIPAllocationMethod IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"`
20826	// PublicIPAddressVersion - The public IP address version. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6'
20827	PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"`
20828	// IPConfiguration - READ-ONLY; The IP configuration associated with the public IP address.
20829	IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"`
20830	// DNSSettings - The FQDN of the DNS record associated with the public IP address.
20831	DNSSettings *PublicIPAddressDNSSettings `json:"dnsSettings,omitempty"`
20832	// DdosSettings - The DDoS protection custom policy associated with the public IP address.
20833	DdosSettings *DdosSettings `json:"ddosSettings,omitempty"`
20834	// IPTags - The list of tags associated with the public IP address.
20835	IPTags *[]IPTag `json:"ipTags,omitempty"`
20836	// IPAddress - The IP address associated with the public IP address resource.
20837	IPAddress *string `json:"ipAddress,omitempty"`
20838	// PublicIPPrefix - The Public IP Prefix this Public IP Address should be allocated from.
20839	PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"`
20840	// IdleTimeoutInMinutes - The idle timeout of the public IP address.
20841	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
20842	// ResourceGUID - The resource GUID property of the public IP resource.
20843	ResourceGUID *string `json:"resourceGuid,omitempty"`
20844	// ProvisioningState - The provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
20845	ProvisioningState *string `json:"provisioningState,omitempty"`
20846}
20847
20848// MarshalJSON is the custom marshaler for PublicIPAddressPropertiesFormat.
20849func (piapf PublicIPAddressPropertiesFormat) MarshalJSON() ([]byte, error) {
20850	objectMap := make(map[string]interface{})
20851	if piapf.PublicIPAllocationMethod != "" {
20852		objectMap["publicIPAllocationMethod"] = piapf.PublicIPAllocationMethod
20853	}
20854	if piapf.PublicIPAddressVersion != "" {
20855		objectMap["publicIPAddressVersion"] = piapf.PublicIPAddressVersion
20856	}
20857	if piapf.DNSSettings != nil {
20858		objectMap["dnsSettings"] = piapf.DNSSettings
20859	}
20860	if piapf.DdosSettings != nil {
20861		objectMap["ddosSettings"] = piapf.DdosSettings
20862	}
20863	if piapf.IPTags != nil {
20864		objectMap["ipTags"] = piapf.IPTags
20865	}
20866	if piapf.IPAddress != nil {
20867		objectMap["ipAddress"] = piapf.IPAddress
20868	}
20869	if piapf.PublicIPPrefix != nil {
20870		objectMap["publicIPPrefix"] = piapf.PublicIPPrefix
20871	}
20872	if piapf.IdleTimeoutInMinutes != nil {
20873		objectMap["idleTimeoutInMinutes"] = piapf.IdleTimeoutInMinutes
20874	}
20875	if piapf.ResourceGUID != nil {
20876		objectMap["resourceGuid"] = piapf.ResourceGUID
20877	}
20878	if piapf.ProvisioningState != nil {
20879		objectMap["provisioningState"] = piapf.ProvisioningState
20880	}
20881	return json.Marshal(objectMap)
20882}
20883
20884// PublicIPAddressSku SKU of a public IP address
20885type PublicIPAddressSku struct {
20886	// Name - Name of a public IP address SKU. Possible values include: 'PublicIPAddressSkuNameBasic', 'PublicIPAddressSkuNameStandard'
20887	Name PublicIPAddressSkuName `json:"name,omitempty"`
20888}
20889
20890// PublicIPPrefix public IP prefix resource.
20891type PublicIPPrefix struct {
20892	autorest.Response `json:"-"`
20893	// Sku - The public IP prefix SKU.
20894	Sku *PublicIPPrefixSku `json:"sku,omitempty"`
20895	// PublicIPPrefixPropertiesFormat - Public IP prefix properties.
20896	*PublicIPPrefixPropertiesFormat `json:"properties,omitempty"`
20897	// Etag - A unique read-only string that changes whenever the resource is updated.
20898	Etag *string `json:"etag,omitempty"`
20899	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
20900	Zones *[]string `json:"zones,omitempty"`
20901	// ID - Resource ID.
20902	ID *string `json:"id,omitempty"`
20903	// Name - READ-ONLY; Resource name.
20904	Name *string `json:"name,omitempty"`
20905	// Type - READ-ONLY; Resource type.
20906	Type *string `json:"type,omitempty"`
20907	// Location - Resource location.
20908	Location *string `json:"location,omitempty"`
20909	// Tags - Resource tags.
20910	Tags map[string]*string `json:"tags"`
20911}
20912
20913// MarshalJSON is the custom marshaler for PublicIPPrefix.
20914func (pip PublicIPPrefix) MarshalJSON() ([]byte, error) {
20915	objectMap := make(map[string]interface{})
20916	if pip.Sku != nil {
20917		objectMap["sku"] = pip.Sku
20918	}
20919	if pip.PublicIPPrefixPropertiesFormat != nil {
20920		objectMap["properties"] = pip.PublicIPPrefixPropertiesFormat
20921	}
20922	if pip.Etag != nil {
20923		objectMap["etag"] = pip.Etag
20924	}
20925	if pip.Zones != nil {
20926		objectMap["zones"] = pip.Zones
20927	}
20928	if pip.ID != nil {
20929		objectMap["id"] = pip.ID
20930	}
20931	if pip.Location != nil {
20932		objectMap["location"] = pip.Location
20933	}
20934	if pip.Tags != nil {
20935		objectMap["tags"] = pip.Tags
20936	}
20937	return json.Marshal(objectMap)
20938}
20939
20940// UnmarshalJSON is the custom unmarshaler for PublicIPPrefix struct.
20941func (pip *PublicIPPrefix) UnmarshalJSON(body []byte) error {
20942	var m map[string]*json.RawMessage
20943	err := json.Unmarshal(body, &m)
20944	if err != nil {
20945		return err
20946	}
20947	for k, v := range m {
20948		switch k {
20949		case "sku":
20950			if v != nil {
20951				var sku PublicIPPrefixSku
20952				err = json.Unmarshal(*v, &sku)
20953				if err != nil {
20954					return err
20955				}
20956				pip.Sku = &sku
20957			}
20958		case "properties":
20959			if v != nil {
20960				var publicIPPrefixPropertiesFormat PublicIPPrefixPropertiesFormat
20961				err = json.Unmarshal(*v, &publicIPPrefixPropertiesFormat)
20962				if err != nil {
20963					return err
20964				}
20965				pip.PublicIPPrefixPropertiesFormat = &publicIPPrefixPropertiesFormat
20966			}
20967		case "etag":
20968			if v != nil {
20969				var etag string
20970				err = json.Unmarshal(*v, &etag)
20971				if err != nil {
20972					return err
20973				}
20974				pip.Etag = &etag
20975			}
20976		case "zones":
20977			if v != nil {
20978				var zones []string
20979				err = json.Unmarshal(*v, &zones)
20980				if err != nil {
20981					return err
20982				}
20983				pip.Zones = &zones
20984			}
20985		case "id":
20986			if v != nil {
20987				var ID string
20988				err = json.Unmarshal(*v, &ID)
20989				if err != nil {
20990					return err
20991				}
20992				pip.ID = &ID
20993			}
20994		case "name":
20995			if v != nil {
20996				var name string
20997				err = json.Unmarshal(*v, &name)
20998				if err != nil {
20999					return err
21000				}
21001				pip.Name = &name
21002			}
21003		case "type":
21004			if v != nil {
21005				var typeVar string
21006				err = json.Unmarshal(*v, &typeVar)
21007				if err != nil {
21008					return err
21009				}
21010				pip.Type = &typeVar
21011			}
21012		case "location":
21013			if v != nil {
21014				var location string
21015				err = json.Unmarshal(*v, &location)
21016				if err != nil {
21017					return err
21018				}
21019				pip.Location = &location
21020			}
21021		case "tags":
21022			if v != nil {
21023				var tags map[string]*string
21024				err = json.Unmarshal(*v, &tags)
21025				if err != nil {
21026					return err
21027				}
21028				pip.Tags = tags
21029			}
21030		}
21031	}
21032
21033	return nil
21034}
21035
21036// PublicIPPrefixesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
21037// long-running operation.
21038type PublicIPPrefixesCreateOrUpdateFuture struct {
21039	azure.FutureAPI
21040	// Result returns the result of the asynchronous operation.
21041	// If the operation has not completed it will return an error.
21042	Result func(PublicIPPrefixesClient) (PublicIPPrefix, error)
21043}
21044
21045// UnmarshalJSON is the custom unmarshaller for CreateFuture.
21046func (future *PublicIPPrefixesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
21047	var azFuture azure.Future
21048	if err := json.Unmarshal(body, &azFuture); err != nil {
21049		return err
21050	}
21051	future.FutureAPI = &azFuture
21052	future.Result = future.result
21053	return nil
21054}
21055
21056// result is the default implementation for PublicIPPrefixesCreateOrUpdateFuture.Result.
21057func (future *PublicIPPrefixesCreateOrUpdateFuture) result(client PublicIPPrefixesClient) (pip PublicIPPrefix, err error) {
21058	var done bool
21059	done, err = future.DoneWithContext(context.Background(), client)
21060	if err != nil {
21061		err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
21062		return
21063	}
21064	if !done {
21065		pip.Response.Response = future.Response()
21066		err = azure.NewAsyncOpIncompleteError("network.PublicIPPrefixesCreateOrUpdateFuture")
21067		return
21068	}
21069	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
21070	if pip.Response.Response, err = future.GetResult(sender); err == nil && pip.Response.Response.StatusCode != http.StatusNoContent {
21071		pip, err = client.CreateOrUpdateResponder(pip.Response.Response)
21072		if err != nil {
21073			err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesCreateOrUpdateFuture", "Result", pip.Response.Response, "Failure responding to request")
21074		}
21075	}
21076	return
21077}
21078
21079// PublicIPPrefixesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
21080// operation.
21081type PublicIPPrefixesDeleteFuture struct {
21082	azure.FutureAPI
21083	// Result returns the result of the asynchronous operation.
21084	// If the operation has not completed it will return an error.
21085	Result func(PublicIPPrefixesClient) (autorest.Response, error)
21086}
21087
21088// UnmarshalJSON is the custom unmarshaller for CreateFuture.
21089func (future *PublicIPPrefixesDeleteFuture) UnmarshalJSON(body []byte) error {
21090	var azFuture azure.Future
21091	if err := json.Unmarshal(body, &azFuture); err != nil {
21092		return err
21093	}
21094	future.FutureAPI = &azFuture
21095	future.Result = future.result
21096	return nil
21097}
21098
21099// result is the default implementation for PublicIPPrefixesDeleteFuture.Result.
21100func (future *PublicIPPrefixesDeleteFuture) result(client PublicIPPrefixesClient) (ar autorest.Response, err error) {
21101	var done bool
21102	done, err = future.DoneWithContext(context.Background(), client)
21103	if err != nil {
21104		err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesDeleteFuture", "Result", future.Response(), "Polling failure")
21105		return
21106	}
21107	if !done {
21108		ar.Response = future.Response()
21109		err = azure.NewAsyncOpIncompleteError("network.PublicIPPrefixesDeleteFuture")
21110		return
21111	}
21112	ar.Response = future.Response()
21113	return
21114}
21115
21116// PublicIPPrefixesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
21117// long-running operation.
21118type PublicIPPrefixesUpdateTagsFuture struct {
21119	azure.FutureAPI
21120	// Result returns the result of the asynchronous operation.
21121	// If the operation has not completed it will return an error.
21122	Result func(PublicIPPrefixesClient) (PublicIPPrefix, error)
21123}
21124
21125// UnmarshalJSON is the custom unmarshaller for CreateFuture.
21126func (future *PublicIPPrefixesUpdateTagsFuture) UnmarshalJSON(body []byte) error {
21127	var azFuture azure.Future
21128	if err := json.Unmarshal(body, &azFuture); err != nil {
21129		return err
21130	}
21131	future.FutureAPI = &azFuture
21132	future.Result = future.result
21133	return nil
21134}
21135
21136// result is the default implementation for PublicIPPrefixesUpdateTagsFuture.Result.
21137func (future *PublicIPPrefixesUpdateTagsFuture) result(client PublicIPPrefixesClient) (pip PublicIPPrefix, err error) {
21138	var done bool
21139	done, err = future.DoneWithContext(context.Background(), client)
21140	if err != nil {
21141		err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
21142		return
21143	}
21144	if !done {
21145		pip.Response.Response = future.Response()
21146		err = azure.NewAsyncOpIncompleteError("network.PublicIPPrefixesUpdateTagsFuture")
21147		return
21148	}
21149	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
21150	if pip.Response.Response, err = future.GetResult(sender); err == nil && pip.Response.Response.StatusCode != http.StatusNoContent {
21151		pip, err = client.UpdateTagsResponder(pip.Response.Response)
21152		if err != nil {
21153			err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesUpdateTagsFuture", "Result", pip.Response.Response, "Failure responding to request")
21154		}
21155	}
21156	return
21157}
21158
21159// PublicIPPrefixListResult response for ListPublicIpPrefixes API service call.
21160type PublicIPPrefixListResult struct {
21161	autorest.Response `json:"-"`
21162	// Value - A list of public IP prefixes that exists in a resource group.
21163	Value *[]PublicIPPrefix `json:"value,omitempty"`
21164	// NextLink - The URL to get the next set of results.
21165	NextLink *string `json:"nextLink,omitempty"`
21166}
21167
21168// PublicIPPrefixListResultIterator provides access to a complete listing of PublicIPPrefix values.
21169type PublicIPPrefixListResultIterator struct {
21170	i    int
21171	page PublicIPPrefixListResultPage
21172}
21173
21174// NextWithContext advances to the next value.  If there was an error making
21175// the request the iterator does not advance and the error is returned.
21176func (iter *PublicIPPrefixListResultIterator) NextWithContext(ctx context.Context) (err error) {
21177	if tracing.IsEnabled() {
21178		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixListResultIterator.NextWithContext")
21179		defer func() {
21180			sc := -1
21181			if iter.Response().Response.Response != nil {
21182				sc = iter.Response().Response.Response.StatusCode
21183			}
21184			tracing.EndSpan(ctx, sc, err)
21185		}()
21186	}
21187	iter.i++
21188	if iter.i < len(iter.page.Values()) {
21189		return nil
21190	}
21191	err = iter.page.NextWithContext(ctx)
21192	if err != nil {
21193		iter.i--
21194		return err
21195	}
21196	iter.i = 0
21197	return nil
21198}
21199
21200// Next advances to the next value.  If there was an error making
21201// the request the iterator does not advance and the error is returned.
21202// Deprecated: Use NextWithContext() instead.
21203func (iter *PublicIPPrefixListResultIterator) Next() error {
21204	return iter.NextWithContext(context.Background())
21205}
21206
21207// NotDone returns true if the enumeration should be started or is not yet complete.
21208func (iter PublicIPPrefixListResultIterator) NotDone() bool {
21209	return iter.page.NotDone() && iter.i < len(iter.page.Values())
21210}
21211
21212// Response returns the raw server response from the last page request.
21213func (iter PublicIPPrefixListResultIterator) Response() PublicIPPrefixListResult {
21214	return iter.page.Response()
21215}
21216
21217// Value returns the current value or a zero-initialized value if the
21218// iterator has advanced beyond the end of the collection.
21219func (iter PublicIPPrefixListResultIterator) Value() PublicIPPrefix {
21220	if !iter.page.NotDone() {
21221		return PublicIPPrefix{}
21222	}
21223	return iter.page.Values()[iter.i]
21224}
21225
21226// Creates a new instance of the PublicIPPrefixListResultIterator type.
21227func NewPublicIPPrefixListResultIterator(page PublicIPPrefixListResultPage) PublicIPPrefixListResultIterator {
21228	return PublicIPPrefixListResultIterator{page: page}
21229}
21230
21231// IsEmpty returns true if the ListResult contains no values.
21232func (piplr PublicIPPrefixListResult) IsEmpty() bool {
21233	return piplr.Value == nil || len(*piplr.Value) == 0
21234}
21235
21236// hasNextLink returns true if the NextLink is not empty.
21237func (piplr PublicIPPrefixListResult) hasNextLink() bool {
21238	return piplr.NextLink != nil && len(*piplr.NextLink) != 0
21239}
21240
21241// publicIPPrefixListResultPreparer prepares a request to retrieve the next set of results.
21242// It returns nil if no more results exist.
21243func (piplr PublicIPPrefixListResult) publicIPPrefixListResultPreparer(ctx context.Context) (*http.Request, error) {
21244	if !piplr.hasNextLink() {
21245		return nil, nil
21246	}
21247	return autorest.Prepare((&http.Request{}).WithContext(ctx),
21248		autorest.AsJSON(),
21249		autorest.AsGet(),
21250		autorest.WithBaseURL(to.String(piplr.NextLink)))
21251}
21252
21253// PublicIPPrefixListResultPage contains a page of PublicIPPrefix values.
21254type PublicIPPrefixListResultPage struct {
21255	fn    func(context.Context, PublicIPPrefixListResult) (PublicIPPrefixListResult, error)
21256	piplr PublicIPPrefixListResult
21257}
21258
21259// NextWithContext advances to the next page of values.  If there was an error making
21260// the request the page does not advance and the error is returned.
21261func (page *PublicIPPrefixListResultPage) NextWithContext(ctx context.Context) (err error) {
21262	if tracing.IsEnabled() {
21263		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixListResultPage.NextWithContext")
21264		defer func() {
21265			sc := -1
21266			if page.Response().Response.Response != nil {
21267				sc = page.Response().Response.Response.StatusCode
21268			}
21269			tracing.EndSpan(ctx, sc, err)
21270		}()
21271	}
21272	for {
21273		next, err := page.fn(ctx, page.piplr)
21274		if err != nil {
21275			return err
21276		}
21277		page.piplr = next
21278		if !next.hasNextLink() || !next.IsEmpty() {
21279			break
21280		}
21281	}
21282	return nil
21283}
21284
21285// Next advances to the next page of values.  If there was an error making
21286// the request the page does not advance and the error is returned.
21287// Deprecated: Use NextWithContext() instead.
21288func (page *PublicIPPrefixListResultPage) Next() error {
21289	return page.NextWithContext(context.Background())
21290}
21291
21292// NotDone returns true if the page enumeration should be started or is not yet complete.
21293func (page PublicIPPrefixListResultPage) NotDone() bool {
21294	return !page.piplr.IsEmpty()
21295}
21296
21297// Response returns the raw server response from the last page request.
21298func (page PublicIPPrefixListResultPage) Response() PublicIPPrefixListResult {
21299	return page.piplr
21300}
21301
21302// Values returns the slice of values for the current page or nil if there are no values.
21303func (page PublicIPPrefixListResultPage) Values() []PublicIPPrefix {
21304	if page.piplr.IsEmpty() {
21305		return nil
21306	}
21307	return *page.piplr.Value
21308}
21309
21310// Creates a new instance of the PublicIPPrefixListResultPage type.
21311func NewPublicIPPrefixListResultPage(cur PublicIPPrefixListResult, getNextPage func(context.Context, PublicIPPrefixListResult) (PublicIPPrefixListResult, error)) PublicIPPrefixListResultPage {
21312	return PublicIPPrefixListResultPage{
21313		fn:    getNextPage,
21314		piplr: cur,
21315	}
21316}
21317
21318// PublicIPPrefixPropertiesFormat public IP prefix properties.
21319type PublicIPPrefixPropertiesFormat struct {
21320	// PublicIPAddressVersion - The public IP address version. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6'
21321	PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"`
21322	// IPTags - The list of tags associated with the public IP prefix.
21323	IPTags *[]IPTag `json:"ipTags,omitempty"`
21324	// PrefixLength - The Length of the Public IP Prefix.
21325	PrefixLength *int32 `json:"prefixLength,omitempty"`
21326	// IPPrefix - The allocated Prefix
21327	IPPrefix *string `json:"ipPrefix,omitempty"`
21328	// PublicIPAddresses - The list of all referenced PublicIPAddresses
21329	PublicIPAddresses *[]ReferencedPublicIPAddress `json:"publicIPAddresses,omitempty"`
21330	// LoadBalancerFrontendIPConfiguration - READ-ONLY; The reference to load balancer frontend IP configuration associated with the public IP prefix.
21331	LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIpConfiguration,omitempty"`
21332	// ResourceGUID - The resource GUID property of the public IP prefix resource.
21333	ResourceGUID *string `json:"resourceGuid,omitempty"`
21334	// ProvisioningState - The provisioning state of the Public IP prefix resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
21335	ProvisioningState *string `json:"provisioningState,omitempty"`
21336}
21337
21338// MarshalJSON is the custom marshaler for PublicIPPrefixPropertiesFormat.
21339func (pippf PublicIPPrefixPropertiesFormat) MarshalJSON() ([]byte, error) {
21340	objectMap := make(map[string]interface{})
21341	if pippf.PublicIPAddressVersion != "" {
21342		objectMap["publicIPAddressVersion"] = pippf.PublicIPAddressVersion
21343	}
21344	if pippf.IPTags != nil {
21345		objectMap["ipTags"] = pippf.IPTags
21346	}
21347	if pippf.PrefixLength != nil {
21348		objectMap["prefixLength"] = pippf.PrefixLength
21349	}
21350	if pippf.IPPrefix != nil {
21351		objectMap["ipPrefix"] = pippf.IPPrefix
21352	}
21353	if pippf.PublicIPAddresses != nil {
21354		objectMap["publicIPAddresses"] = pippf.PublicIPAddresses
21355	}
21356	if pippf.ResourceGUID != nil {
21357		objectMap["resourceGuid"] = pippf.ResourceGUID
21358	}
21359	if pippf.ProvisioningState != nil {
21360		objectMap["provisioningState"] = pippf.ProvisioningState
21361	}
21362	return json.Marshal(objectMap)
21363}
21364
21365// PublicIPPrefixSku SKU of a public IP prefix
21366type PublicIPPrefixSku struct {
21367	// Name - Name of a public IP prefix SKU. Possible values include: 'Standard'
21368	Name PublicIPPrefixSkuName `json:"name,omitempty"`
21369}
21370
21371// QueryTroubleshootingParameters parameters that define the resource to query the troubleshooting result.
21372type QueryTroubleshootingParameters struct {
21373	// TargetResourceID - The target resource ID to query the troubleshooting result.
21374	TargetResourceID *string `json:"targetResourceId,omitempty"`
21375}
21376
21377// ReferencedPublicIPAddress ...
21378type ReferencedPublicIPAddress struct {
21379	// ID - The PublicIPAddress Reference
21380	ID *string `json:"id,omitempty"`
21381}
21382
21383// Resource common resource representation.
21384type Resource struct {
21385	// ID - Resource ID.
21386	ID *string `json:"id,omitempty"`
21387	// Name - READ-ONLY; Resource name.
21388	Name *string `json:"name,omitempty"`
21389	// Type - READ-ONLY; Resource type.
21390	Type *string `json:"type,omitempty"`
21391	// Location - Resource location.
21392	Location *string `json:"location,omitempty"`
21393	// Tags - Resource tags.
21394	Tags map[string]*string `json:"tags"`
21395}
21396
21397// MarshalJSON is the custom marshaler for Resource.
21398func (r Resource) MarshalJSON() ([]byte, error) {
21399	objectMap := make(map[string]interface{})
21400	if r.ID != nil {
21401		objectMap["id"] = r.ID
21402	}
21403	if r.Location != nil {
21404		objectMap["location"] = r.Location
21405	}
21406	if r.Tags != nil {
21407		objectMap["tags"] = r.Tags
21408	}
21409	return json.Marshal(objectMap)
21410}
21411
21412// ResourceNavigationLink resourceNavigationLink resource.
21413type ResourceNavigationLink struct {
21414	// ResourceNavigationLinkFormat - Resource navigation link properties format.
21415	*ResourceNavigationLinkFormat `json:"properties,omitempty"`
21416	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
21417	Name *string `json:"name,omitempty"`
21418	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
21419	Etag *string `json:"etag,omitempty"`
21420	// ID - Resource ID.
21421	ID *string `json:"id,omitempty"`
21422}
21423
21424// MarshalJSON is the custom marshaler for ResourceNavigationLink.
21425func (rnl ResourceNavigationLink) MarshalJSON() ([]byte, error) {
21426	objectMap := make(map[string]interface{})
21427	if rnl.ResourceNavigationLinkFormat != nil {
21428		objectMap["properties"] = rnl.ResourceNavigationLinkFormat
21429	}
21430	if rnl.Name != nil {
21431		objectMap["name"] = rnl.Name
21432	}
21433	if rnl.ID != nil {
21434		objectMap["id"] = rnl.ID
21435	}
21436	return json.Marshal(objectMap)
21437}
21438
21439// UnmarshalJSON is the custom unmarshaler for ResourceNavigationLink struct.
21440func (rnl *ResourceNavigationLink) UnmarshalJSON(body []byte) error {
21441	var m map[string]*json.RawMessage
21442	err := json.Unmarshal(body, &m)
21443	if err != nil {
21444		return err
21445	}
21446	for k, v := range m {
21447		switch k {
21448		case "properties":
21449			if v != nil {
21450				var resourceNavigationLinkFormat ResourceNavigationLinkFormat
21451				err = json.Unmarshal(*v, &resourceNavigationLinkFormat)
21452				if err != nil {
21453					return err
21454				}
21455				rnl.ResourceNavigationLinkFormat = &resourceNavigationLinkFormat
21456			}
21457		case "name":
21458			if v != nil {
21459				var name string
21460				err = json.Unmarshal(*v, &name)
21461				if err != nil {
21462					return err
21463				}
21464				rnl.Name = &name
21465			}
21466		case "etag":
21467			if v != nil {
21468				var etag string
21469				err = json.Unmarshal(*v, &etag)
21470				if err != nil {
21471					return err
21472				}
21473				rnl.Etag = &etag
21474			}
21475		case "id":
21476			if v != nil {
21477				var ID string
21478				err = json.Unmarshal(*v, &ID)
21479				if err != nil {
21480					return err
21481				}
21482				rnl.ID = &ID
21483			}
21484		}
21485	}
21486
21487	return nil
21488}
21489
21490// ResourceNavigationLinkFormat properties of ResourceNavigationLink.
21491type ResourceNavigationLinkFormat struct {
21492	// LinkedResourceType - Resource type of the linked resource.
21493	LinkedResourceType *string `json:"linkedResourceType,omitempty"`
21494	// Link - Link to the external resource
21495	Link *string `json:"link,omitempty"`
21496	// ProvisioningState - READ-ONLY; Provisioning state of the ResourceNavigationLink resource.
21497	ProvisioningState *string `json:"provisioningState,omitempty"`
21498}
21499
21500// MarshalJSON is the custom marshaler for ResourceNavigationLinkFormat.
21501func (rnlf ResourceNavigationLinkFormat) MarshalJSON() ([]byte, error) {
21502	objectMap := make(map[string]interface{})
21503	if rnlf.LinkedResourceType != nil {
21504		objectMap["linkedResourceType"] = rnlf.LinkedResourceType
21505	}
21506	if rnlf.Link != nil {
21507		objectMap["link"] = rnlf.Link
21508	}
21509	return json.Marshal(objectMap)
21510}
21511
21512// RetentionPolicyParameters parameters that define the retention policy for flow log.
21513type RetentionPolicyParameters struct {
21514	// Days - Number of days to retain flow log records.
21515	Days *int32 `json:"days,omitempty"`
21516	// Enabled - Flag to enable/disable retention.
21517	Enabled *bool `json:"enabled,omitempty"`
21518}
21519
21520// Route route resource
21521type Route struct {
21522	autorest.Response `json:"-"`
21523	// RoutePropertiesFormat - Properties of the route.
21524	*RoutePropertiesFormat `json:"properties,omitempty"`
21525	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
21526	Name *string `json:"name,omitempty"`
21527	// Etag - A unique read-only string that changes whenever the resource is updated.
21528	Etag *string `json:"etag,omitempty"`
21529	// ID - Resource ID.
21530	ID *string `json:"id,omitempty"`
21531}
21532
21533// MarshalJSON is the custom marshaler for Route.
21534func (r Route) MarshalJSON() ([]byte, error) {
21535	objectMap := make(map[string]interface{})
21536	if r.RoutePropertiesFormat != nil {
21537		objectMap["properties"] = r.RoutePropertiesFormat
21538	}
21539	if r.Name != nil {
21540		objectMap["name"] = r.Name
21541	}
21542	if r.Etag != nil {
21543		objectMap["etag"] = r.Etag
21544	}
21545	if r.ID != nil {
21546		objectMap["id"] = r.ID
21547	}
21548	return json.Marshal(objectMap)
21549}
21550
21551// UnmarshalJSON is the custom unmarshaler for Route struct.
21552func (r *Route) UnmarshalJSON(body []byte) error {
21553	var m map[string]*json.RawMessage
21554	err := json.Unmarshal(body, &m)
21555	if err != nil {
21556		return err
21557	}
21558	for k, v := range m {
21559		switch k {
21560		case "properties":
21561			if v != nil {
21562				var routePropertiesFormat RoutePropertiesFormat
21563				err = json.Unmarshal(*v, &routePropertiesFormat)
21564				if err != nil {
21565					return err
21566				}
21567				r.RoutePropertiesFormat = &routePropertiesFormat
21568			}
21569		case "name":
21570			if v != nil {
21571				var name string
21572				err = json.Unmarshal(*v, &name)
21573				if err != nil {
21574					return err
21575				}
21576				r.Name = &name
21577			}
21578		case "etag":
21579			if v != nil {
21580				var etag string
21581				err = json.Unmarshal(*v, &etag)
21582				if err != nil {
21583					return err
21584				}
21585				r.Etag = &etag
21586			}
21587		case "id":
21588			if v != nil {
21589				var ID string
21590				err = json.Unmarshal(*v, &ID)
21591				if err != nil {
21592					return err
21593				}
21594				r.ID = &ID
21595			}
21596		}
21597	}
21598
21599	return nil
21600}
21601
21602// RouteFilter route Filter Resource.
21603type RouteFilter struct {
21604	autorest.Response            `json:"-"`
21605	*RouteFilterPropertiesFormat `json:"properties,omitempty"`
21606	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
21607	Etag *string `json:"etag,omitempty"`
21608	// ID - Resource ID.
21609	ID *string `json:"id,omitempty"`
21610	// Name - READ-ONLY; Resource name.
21611	Name *string `json:"name,omitempty"`
21612	// Type - READ-ONLY; Resource type.
21613	Type *string `json:"type,omitempty"`
21614	// Location - Resource location.
21615	Location *string `json:"location,omitempty"`
21616	// Tags - Resource tags.
21617	Tags map[string]*string `json:"tags"`
21618}
21619
21620// MarshalJSON is the custom marshaler for RouteFilter.
21621func (rf RouteFilter) MarshalJSON() ([]byte, error) {
21622	objectMap := make(map[string]interface{})
21623	if rf.RouteFilterPropertiesFormat != nil {
21624		objectMap["properties"] = rf.RouteFilterPropertiesFormat
21625	}
21626	if rf.ID != nil {
21627		objectMap["id"] = rf.ID
21628	}
21629	if rf.Location != nil {
21630		objectMap["location"] = rf.Location
21631	}
21632	if rf.Tags != nil {
21633		objectMap["tags"] = rf.Tags
21634	}
21635	return json.Marshal(objectMap)
21636}
21637
21638// UnmarshalJSON is the custom unmarshaler for RouteFilter struct.
21639func (rf *RouteFilter) UnmarshalJSON(body []byte) error {
21640	var m map[string]*json.RawMessage
21641	err := json.Unmarshal(body, &m)
21642	if err != nil {
21643		return err
21644	}
21645	for k, v := range m {
21646		switch k {
21647		case "properties":
21648			if v != nil {
21649				var routeFilterPropertiesFormat RouteFilterPropertiesFormat
21650				err = json.Unmarshal(*v, &routeFilterPropertiesFormat)
21651				if err != nil {
21652					return err
21653				}
21654				rf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat
21655			}
21656		case "etag":
21657			if v != nil {
21658				var etag string
21659				err = json.Unmarshal(*v, &etag)
21660				if err != nil {
21661					return err
21662				}
21663				rf.Etag = &etag
21664			}
21665		case "id":
21666			if v != nil {
21667				var ID string
21668				err = json.Unmarshal(*v, &ID)
21669				if err != nil {
21670					return err
21671				}
21672				rf.ID = &ID
21673			}
21674		case "name":
21675			if v != nil {
21676				var name string
21677				err = json.Unmarshal(*v, &name)
21678				if err != nil {
21679					return err
21680				}
21681				rf.Name = &name
21682			}
21683		case "type":
21684			if v != nil {
21685				var typeVar string
21686				err = json.Unmarshal(*v, &typeVar)
21687				if err != nil {
21688					return err
21689				}
21690				rf.Type = &typeVar
21691			}
21692		case "location":
21693			if v != nil {
21694				var location string
21695				err = json.Unmarshal(*v, &location)
21696				if err != nil {
21697					return err
21698				}
21699				rf.Location = &location
21700			}
21701		case "tags":
21702			if v != nil {
21703				var tags map[string]*string
21704				err = json.Unmarshal(*v, &tags)
21705				if err != nil {
21706					return err
21707				}
21708				rf.Tags = tags
21709			}
21710		}
21711	}
21712
21713	return nil
21714}
21715
21716// RouteFilterListResult response for the ListRouteFilters API service call.
21717type RouteFilterListResult struct {
21718	autorest.Response `json:"-"`
21719	// Value - Gets a list of route filters in a resource group.
21720	Value *[]RouteFilter `json:"value,omitempty"`
21721	// NextLink - The URL to get the next set of results.
21722	NextLink *string `json:"nextLink,omitempty"`
21723}
21724
21725// RouteFilterListResultIterator provides access to a complete listing of RouteFilter values.
21726type RouteFilterListResultIterator struct {
21727	i    int
21728	page RouteFilterListResultPage
21729}
21730
21731// NextWithContext advances to the next value.  If there was an error making
21732// the request the iterator does not advance and the error is returned.
21733func (iter *RouteFilterListResultIterator) NextWithContext(ctx context.Context) (err error) {
21734	if tracing.IsEnabled() {
21735		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultIterator.NextWithContext")
21736		defer func() {
21737			sc := -1
21738			if iter.Response().Response.Response != nil {
21739				sc = iter.Response().Response.Response.StatusCode
21740			}
21741			tracing.EndSpan(ctx, sc, err)
21742		}()
21743	}
21744	iter.i++
21745	if iter.i < len(iter.page.Values()) {
21746		return nil
21747	}
21748	err = iter.page.NextWithContext(ctx)
21749	if err != nil {
21750		iter.i--
21751		return err
21752	}
21753	iter.i = 0
21754	return nil
21755}
21756
21757// Next advances to the next value.  If there was an error making
21758// the request the iterator does not advance and the error is returned.
21759// Deprecated: Use NextWithContext() instead.
21760func (iter *RouteFilterListResultIterator) Next() error {
21761	return iter.NextWithContext(context.Background())
21762}
21763
21764// NotDone returns true if the enumeration should be started or is not yet complete.
21765func (iter RouteFilterListResultIterator) NotDone() bool {
21766	return iter.page.NotDone() && iter.i < len(iter.page.Values())
21767}
21768
21769// Response returns the raw server response from the last page request.
21770func (iter RouteFilterListResultIterator) Response() RouteFilterListResult {
21771	return iter.page.Response()
21772}
21773
21774// Value returns the current value or a zero-initialized value if the
21775// iterator has advanced beyond the end of the collection.
21776func (iter RouteFilterListResultIterator) Value() RouteFilter {
21777	if !iter.page.NotDone() {
21778		return RouteFilter{}
21779	}
21780	return iter.page.Values()[iter.i]
21781}
21782
21783// Creates a new instance of the RouteFilterListResultIterator type.
21784func NewRouteFilterListResultIterator(page RouteFilterListResultPage) RouteFilterListResultIterator {
21785	return RouteFilterListResultIterator{page: page}
21786}
21787
21788// IsEmpty returns true if the ListResult contains no values.
21789func (rflr RouteFilterListResult) IsEmpty() bool {
21790	return rflr.Value == nil || len(*rflr.Value) == 0
21791}
21792
21793// hasNextLink returns true if the NextLink is not empty.
21794func (rflr RouteFilterListResult) hasNextLink() bool {
21795	return rflr.NextLink != nil && len(*rflr.NextLink) != 0
21796}
21797
21798// routeFilterListResultPreparer prepares a request to retrieve the next set of results.
21799// It returns nil if no more results exist.
21800func (rflr RouteFilterListResult) routeFilterListResultPreparer(ctx context.Context) (*http.Request, error) {
21801	if !rflr.hasNextLink() {
21802		return nil, nil
21803	}
21804	return autorest.Prepare((&http.Request{}).WithContext(ctx),
21805		autorest.AsJSON(),
21806		autorest.AsGet(),
21807		autorest.WithBaseURL(to.String(rflr.NextLink)))
21808}
21809
21810// RouteFilterListResultPage contains a page of RouteFilter values.
21811type RouteFilterListResultPage struct {
21812	fn   func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)
21813	rflr RouteFilterListResult
21814}
21815
21816// NextWithContext advances to the next page of values.  If there was an error making
21817// the request the page does not advance and the error is returned.
21818func (page *RouteFilterListResultPage) NextWithContext(ctx context.Context) (err error) {
21819	if tracing.IsEnabled() {
21820		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultPage.NextWithContext")
21821		defer func() {
21822			sc := -1
21823			if page.Response().Response.Response != nil {
21824				sc = page.Response().Response.Response.StatusCode
21825			}
21826			tracing.EndSpan(ctx, sc, err)
21827		}()
21828	}
21829	for {
21830		next, err := page.fn(ctx, page.rflr)
21831		if err != nil {
21832			return err
21833		}
21834		page.rflr = next
21835		if !next.hasNextLink() || !next.IsEmpty() {
21836			break
21837		}
21838	}
21839	return nil
21840}
21841
21842// Next advances to the next page of values.  If there was an error making
21843// the request the page does not advance and the error is returned.
21844// Deprecated: Use NextWithContext() instead.
21845func (page *RouteFilterListResultPage) Next() error {
21846	return page.NextWithContext(context.Background())
21847}
21848
21849// NotDone returns true if the page enumeration should be started or is not yet complete.
21850func (page RouteFilterListResultPage) NotDone() bool {
21851	return !page.rflr.IsEmpty()
21852}
21853
21854// Response returns the raw server response from the last page request.
21855func (page RouteFilterListResultPage) Response() RouteFilterListResult {
21856	return page.rflr
21857}
21858
21859// Values returns the slice of values for the current page or nil if there are no values.
21860func (page RouteFilterListResultPage) Values() []RouteFilter {
21861	if page.rflr.IsEmpty() {
21862		return nil
21863	}
21864	return *page.rflr.Value
21865}
21866
21867// Creates a new instance of the RouteFilterListResultPage type.
21868func NewRouteFilterListResultPage(cur RouteFilterListResult, getNextPage func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)) RouteFilterListResultPage {
21869	return RouteFilterListResultPage{
21870		fn:   getNextPage,
21871		rflr: cur,
21872	}
21873}
21874
21875// RouteFilterPropertiesFormat route Filter Resource
21876type RouteFilterPropertiesFormat struct {
21877	// Rules - Collection of RouteFilterRules contained within a route filter.
21878	Rules *[]RouteFilterRule `json:"rules,omitempty"`
21879	// Peerings - A collection of references to express route circuit peerings.
21880	Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"`
21881	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', 'Succeeded' and 'Failed'.
21882	ProvisioningState *string `json:"provisioningState,omitempty"`
21883}
21884
21885// MarshalJSON is the custom marshaler for RouteFilterPropertiesFormat.
21886func (rfpf RouteFilterPropertiesFormat) MarshalJSON() ([]byte, error) {
21887	objectMap := make(map[string]interface{})
21888	if rfpf.Rules != nil {
21889		objectMap["rules"] = rfpf.Rules
21890	}
21891	if rfpf.Peerings != nil {
21892		objectMap["peerings"] = rfpf.Peerings
21893	}
21894	return json.Marshal(objectMap)
21895}
21896
21897// RouteFilterRule route Filter Rule Resource
21898type RouteFilterRule struct {
21899	autorest.Response                `json:"-"`
21900	*RouteFilterRulePropertiesFormat `json:"properties,omitempty"`
21901	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
21902	Name *string `json:"name,omitempty"`
21903	// Location - Resource location.
21904	Location *string `json:"location,omitempty"`
21905	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
21906	Etag *string `json:"etag,omitempty"`
21907	// ID - Resource ID.
21908	ID *string `json:"id,omitempty"`
21909}
21910
21911// MarshalJSON is the custom marshaler for RouteFilterRule.
21912func (rfr RouteFilterRule) MarshalJSON() ([]byte, error) {
21913	objectMap := make(map[string]interface{})
21914	if rfr.RouteFilterRulePropertiesFormat != nil {
21915		objectMap["properties"] = rfr.RouteFilterRulePropertiesFormat
21916	}
21917	if rfr.Name != nil {
21918		objectMap["name"] = rfr.Name
21919	}
21920	if rfr.Location != nil {
21921		objectMap["location"] = rfr.Location
21922	}
21923	if rfr.ID != nil {
21924		objectMap["id"] = rfr.ID
21925	}
21926	return json.Marshal(objectMap)
21927}
21928
21929// UnmarshalJSON is the custom unmarshaler for RouteFilterRule struct.
21930func (rfr *RouteFilterRule) UnmarshalJSON(body []byte) error {
21931	var m map[string]*json.RawMessage
21932	err := json.Unmarshal(body, &m)
21933	if err != nil {
21934		return err
21935	}
21936	for k, v := range m {
21937		switch k {
21938		case "properties":
21939			if v != nil {
21940				var routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat
21941				err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat)
21942				if err != nil {
21943					return err
21944				}
21945				rfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat
21946			}
21947		case "name":
21948			if v != nil {
21949				var name string
21950				err = json.Unmarshal(*v, &name)
21951				if err != nil {
21952					return err
21953				}
21954				rfr.Name = &name
21955			}
21956		case "location":
21957			if v != nil {
21958				var location string
21959				err = json.Unmarshal(*v, &location)
21960				if err != nil {
21961					return err
21962				}
21963				rfr.Location = &location
21964			}
21965		case "etag":
21966			if v != nil {
21967				var etag string
21968				err = json.Unmarshal(*v, &etag)
21969				if err != nil {
21970					return err
21971				}
21972				rfr.Etag = &etag
21973			}
21974		case "id":
21975			if v != nil {
21976				var ID string
21977				err = json.Unmarshal(*v, &ID)
21978				if err != nil {
21979					return err
21980				}
21981				rfr.ID = &ID
21982			}
21983		}
21984	}
21985
21986	return nil
21987}
21988
21989// RouteFilterRuleListResult response for the ListRouteFilterRules API service call
21990type RouteFilterRuleListResult struct {
21991	autorest.Response `json:"-"`
21992	// Value - Gets a list of RouteFilterRules in a resource group.
21993	Value *[]RouteFilterRule `json:"value,omitempty"`
21994	// NextLink - The URL to get the next set of results.
21995	NextLink *string `json:"nextLink,omitempty"`
21996}
21997
21998// RouteFilterRuleListResultIterator provides access to a complete listing of RouteFilterRule values.
21999type RouteFilterRuleListResultIterator struct {
22000	i    int
22001	page RouteFilterRuleListResultPage
22002}
22003
22004// NextWithContext advances to the next value.  If there was an error making
22005// the request the iterator does not advance and the error is returned.
22006func (iter *RouteFilterRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
22007	if tracing.IsEnabled() {
22008		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultIterator.NextWithContext")
22009		defer func() {
22010			sc := -1
22011			if iter.Response().Response.Response != nil {
22012				sc = iter.Response().Response.Response.StatusCode
22013			}
22014			tracing.EndSpan(ctx, sc, err)
22015		}()
22016	}
22017	iter.i++
22018	if iter.i < len(iter.page.Values()) {
22019		return nil
22020	}
22021	err = iter.page.NextWithContext(ctx)
22022	if err != nil {
22023		iter.i--
22024		return err
22025	}
22026	iter.i = 0
22027	return nil
22028}
22029
22030// Next advances to the next value.  If there was an error making
22031// the request the iterator does not advance and the error is returned.
22032// Deprecated: Use NextWithContext() instead.
22033func (iter *RouteFilterRuleListResultIterator) Next() error {
22034	return iter.NextWithContext(context.Background())
22035}
22036
22037// NotDone returns true if the enumeration should be started or is not yet complete.
22038func (iter RouteFilterRuleListResultIterator) NotDone() bool {
22039	return iter.page.NotDone() && iter.i < len(iter.page.Values())
22040}
22041
22042// Response returns the raw server response from the last page request.
22043func (iter RouteFilterRuleListResultIterator) Response() RouteFilterRuleListResult {
22044	return iter.page.Response()
22045}
22046
22047// Value returns the current value or a zero-initialized value if the
22048// iterator has advanced beyond the end of the collection.
22049func (iter RouteFilterRuleListResultIterator) Value() RouteFilterRule {
22050	if !iter.page.NotDone() {
22051		return RouteFilterRule{}
22052	}
22053	return iter.page.Values()[iter.i]
22054}
22055
22056// Creates a new instance of the RouteFilterRuleListResultIterator type.
22057func NewRouteFilterRuleListResultIterator(page RouteFilterRuleListResultPage) RouteFilterRuleListResultIterator {
22058	return RouteFilterRuleListResultIterator{page: page}
22059}
22060
22061// IsEmpty returns true if the ListResult contains no values.
22062func (rfrlr RouteFilterRuleListResult) IsEmpty() bool {
22063	return rfrlr.Value == nil || len(*rfrlr.Value) == 0
22064}
22065
22066// hasNextLink returns true if the NextLink is not empty.
22067func (rfrlr RouteFilterRuleListResult) hasNextLink() bool {
22068	return rfrlr.NextLink != nil && len(*rfrlr.NextLink) != 0
22069}
22070
22071// routeFilterRuleListResultPreparer prepares a request to retrieve the next set of results.
22072// It returns nil if no more results exist.
22073func (rfrlr RouteFilterRuleListResult) routeFilterRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
22074	if !rfrlr.hasNextLink() {
22075		return nil, nil
22076	}
22077	return autorest.Prepare((&http.Request{}).WithContext(ctx),
22078		autorest.AsJSON(),
22079		autorest.AsGet(),
22080		autorest.WithBaseURL(to.String(rfrlr.NextLink)))
22081}
22082
22083// RouteFilterRuleListResultPage contains a page of RouteFilterRule values.
22084type RouteFilterRuleListResultPage struct {
22085	fn    func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)
22086	rfrlr RouteFilterRuleListResult
22087}
22088
22089// NextWithContext advances to the next page of values.  If there was an error making
22090// the request the page does not advance and the error is returned.
22091func (page *RouteFilterRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
22092	if tracing.IsEnabled() {
22093		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultPage.NextWithContext")
22094		defer func() {
22095			sc := -1
22096			if page.Response().Response.Response != nil {
22097				sc = page.Response().Response.Response.StatusCode
22098			}
22099			tracing.EndSpan(ctx, sc, err)
22100		}()
22101	}
22102	for {
22103		next, err := page.fn(ctx, page.rfrlr)
22104		if err != nil {
22105			return err
22106		}
22107		page.rfrlr = next
22108		if !next.hasNextLink() || !next.IsEmpty() {
22109			break
22110		}
22111	}
22112	return nil
22113}
22114
22115// Next advances to the next page of values.  If there was an error making
22116// the request the page does not advance and the error is returned.
22117// Deprecated: Use NextWithContext() instead.
22118func (page *RouteFilterRuleListResultPage) Next() error {
22119	return page.NextWithContext(context.Background())
22120}
22121
22122// NotDone returns true if the page enumeration should be started or is not yet complete.
22123func (page RouteFilterRuleListResultPage) NotDone() bool {
22124	return !page.rfrlr.IsEmpty()
22125}
22126
22127// Response returns the raw server response from the last page request.
22128func (page RouteFilterRuleListResultPage) Response() RouteFilterRuleListResult {
22129	return page.rfrlr
22130}
22131
22132// Values returns the slice of values for the current page or nil if there are no values.
22133func (page RouteFilterRuleListResultPage) Values() []RouteFilterRule {
22134	if page.rfrlr.IsEmpty() {
22135		return nil
22136	}
22137	return *page.rfrlr.Value
22138}
22139
22140// Creates a new instance of the RouteFilterRuleListResultPage type.
22141func NewRouteFilterRuleListResultPage(cur RouteFilterRuleListResult, getNextPage func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)) RouteFilterRuleListResultPage {
22142	return RouteFilterRuleListResultPage{
22143		fn:    getNextPage,
22144		rfrlr: cur,
22145	}
22146}
22147
22148// RouteFilterRulePropertiesFormat route Filter Rule Resource
22149type RouteFilterRulePropertiesFormat struct {
22150	// Access - The access type of the rule. Valid values are: 'Allow', 'Deny'. Possible values include: 'Allow', 'Deny'
22151	Access Access `json:"access,omitempty"`
22152	// RouteFilterRuleType - The rule type of the rule. Valid value is: 'Community'
22153	RouteFilterRuleType *string `json:"routeFilterRuleType,omitempty"`
22154	// Communities - The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020']
22155	Communities *[]string `json:"communities,omitempty"`
22156	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', 'Succeeded' and 'Failed'.
22157	ProvisioningState *string `json:"provisioningState,omitempty"`
22158}
22159
22160// MarshalJSON is the custom marshaler for RouteFilterRulePropertiesFormat.
22161func (rfrpf RouteFilterRulePropertiesFormat) MarshalJSON() ([]byte, error) {
22162	objectMap := make(map[string]interface{})
22163	if rfrpf.Access != "" {
22164		objectMap["access"] = rfrpf.Access
22165	}
22166	if rfrpf.RouteFilterRuleType != nil {
22167		objectMap["routeFilterRuleType"] = rfrpf.RouteFilterRuleType
22168	}
22169	if rfrpf.Communities != nil {
22170		objectMap["communities"] = rfrpf.Communities
22171	}
22172	return json.Marshal(objectMap)
22173}
22174
22175// RouteFilterRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
22176// long-running operation.
22177type RouteFilterRulesCreateOrUpdateFuture struct {
22178	azure.FutureAPI
22179	// Result returns the result of the asynchronous operation.
22180	// If the operation has not completed it will return an error.
22181	Result func(RouteFilterRulesClient) (RouteFilterRule, error)
22182}
22183
22184// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22185func (future *RouteFilterRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
22186	var azFuture azure.Future
22187	if err := json.Unmarshal(body, &azFuture); err != nil {
22188		return err
22189	}
22190	future.FutureAPI = &azFuture
22191	future.Result = future.result
22192	return nil
22193}
22194
22195// result is the default implementation for RouteFilterRulesCreateOrUpdateFuture.Result.
22196func (future *RouteFilterRulesCreateOrUpdateFuture) result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
22197	var done bool
22198	done, err = future.DoneWithContext(context.Background(), client)
22199	if err != nil {
22200		err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
22201		return
22202	}
22203	if !done {
22204		rfr.Response.Response = future.Response()
22205		err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesCreateOrUpdateFuture")
22206		return
22207	}
22208	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
22209	if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent {
22210		rfr, err = client.CreateOrUpdateResponder(rfr.Response.Response)
22211		if err != nil {
22212			err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request")
22213		}
22214	}
22215	return
22216}
22217
22218// RouteFilterRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
22219// operation.
22220type RouteFilterRulesDeleteFuture struct {
22221	azure.FutureAPI
22222	// Result returns the result of the asynchronous operation.
22223	// If the operation has not completed it will return an error.
22224	Result func(RouteFilterRulesClient) (autorest.Response, error)
22225}
22226
22227// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22228func (future *RouteFilterRulesDeleteFuture) UnmarshalJSON(body []byte) error {
22229	var azFuture azure.Future
22230	if err := json.Unmarshal(body, &azFuture); err != nil {
22231		return err
22232	}
22233	future.FutureAPI = &azFuture
22234	future.Result = future.result
22235	return nil
22236}
22237
22238// result is the default implementation for RouteFilterRulesDeleteFuture.Result.
22239func (future *RouteFilterRulesDeleteFuture) result(client RouteFilterRulesClient) (ar autorest.Response, err error) {
22240	var done bool
22241	done, err = future.DoneWithContext(context.Background(), client)
22242	if err != nil {
22243		err = autorest.NewErrorWithError(err, "network.RouteFilterRulesDeleteFuture", "Result", future.Response(), "Polling failure")
22244		return
22245	}
22246	if !done {
22247		ar.Response = future.Response()
22248		err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesDeleteFuture")
22249		return
22250	}
22251	ar.Response = future.Response()
22252	return
22253}
22254
22255// RouteFilterRulesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
22256// operation.
22257type RouteFilterRulesUpdateFuture struct {
22258	azure.FutureAPI
22259	// Result returns the result of the asynchronous operation.
22260	// If the operation has not completed it will return an error.
22261	Result func(RouteFilterRulesClient) (RouteFilterRule, error)
22262}
22263
22264// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22265func (future *RouteFilterRulesUpdateFuture) UnmarshalJSON(body []byte) error {
22266	var azFuture azure.Future
22267	if err := json.Unmarshal(body, &azFuture); err != nil {
22268		return err
22269	}
22270	future.FutureAPI = &azFuture
22271	future.Result = future.result
22272	return nil
22273}
22274
22275// result is the default implementation for RouteFilterRulesUpdateFuture.Result.
22276func (future *RouteFilterRulesUpdateFuture) result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
22277	var done bool
22278	done, err = future.DoneWithContext(context.Background(), client)
22279	if err != nil {
22280		err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", future.Response(), "Polling failure")
22281		return
22282	}
22283	if !done {
22284		rfr.Response.Response = future.Response()
22285		err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesUpdateFuture")
22286		return
22287	}
22288	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
22289	if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent {
22290		rfr, err = client.UpdateResponder(rfr.Response.Response)
22291		if err != nil {
22292			err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request")
22293		}
22294	}
22295	return
22296}
22297
22298// RouteFiltersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
22299// long-running operation.
22300type RouteFiltersCreateOrUpdateFuture struct {
22301	azure.FutureAPI
22302	// Result returns the result of the asynchronous operation.
22303	// If the operation has not completed it will return an error.
22304	Result func(RouteFiltersClient) (RouteFilter, error)
22305}
22306
22307// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22308func (future *RouteFiltersCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
22309	var azFuture azure.Future
22310	if err := json.Unmarshal(body, &azFuture); err != nil {
22311		return err
22312	}
22313	future.FutureAPI = &azFuture
22314	future.Result = future.result
22315	return nil
22316}
22317
22318// result is the default implementation for RouteFiltersCreateOrUpdateFuture.Result.
22319func (future *RouteFiltersCreateOrUpdateFuture) result(client RouteFiltersClient) (rf RouteFilter, err error) {
22320	var done bool
22321	done, err = future.DoneWithContext(context.Background(), client)
22322	if err != nil {
22323		err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
22324		return
22325	}
22326	if !done {
22327		rf.Response.Response = future.Response()
22328		err = azure.NewAsyncOpIncompleteError("network.RouteFiltersCreateOrUpdateFuture")
22329		return
22330	}
22331	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
22332	if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent {
22333		rf, err = client.CreateOrUpdateResponder(rf.Response.Response)
22334		if err != nil {
22335			err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", rf.Response.Response, "Failure responding to request")
22336		}
22337	}
22338	return
22339}
22340
22341// RouteFiltersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
22342// operation.
22343type RouteFiltersDeleteFuture struct {
22344	azure.FutureAPI
22345	// Result returns the result of the asynchronous operation.
22346	// If the operation has not completed it will return an error.
22347	Result func(RouteFiltersClient) (autorest.Response, error)
22348}
22349
22350// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22351func (future *RouteFiltersDeleteFuture) UnmarshalJSON(body []byte) error {
22352	var azFuture azure.Future
22353	if err := json.Unmarshal(body, &azFuture); err != nil {
22354		return err
22355	}
22356	future.FutureAPI = &azFuture
22357	future.Result = future.result
22358	return nil
22359}
22360
22361// result is the default implementation for RouteFiltersDeleteFuture.Result.
22362func (future *RouteFiltersDeleteFuture) result(client RouteFiltersClient) (ar autorest.Response, err error) {
22363	var done bool
22364	done, err = future.DoneWithContext(context.Background(), client)
22365	if err != nil {
22366		err = autorest.NewErrorWithError(err, "network.RouteFiltersDeleteFuture", "Result", future.Response(), "Polling failure")
22367		return
22368	}
22369	if !done {
22370		ar.Response = future.Response()
22371		err = azure.NewAsyncOpIncompleteError("network.RouteFiltersDeleteFuture")
22372		return
22373	}
22374	ar.Response = future.Response()
22375	return
22376}
22377
22378// RouteFiltersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
22379// operation.
22380type RouteFiltersUpdateFuture struct {
22381	azure.FutureAPI
22382	// Result returns the result of the asynchronous operation.
22383	// If the operation has not completed it will return an error.
22384	Result func(RouteFiltersClient) (RouteFilter, error)
22385}
22386
22387// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22388func (future *RouteFiltersUpdateFuture) UnmarshalJSON(body []byte) error {
22389	var azFuture azure.Future
22390	if err := json.Unmarshal(body, &azFuture); err != nil {
22391		return err
22392	}
22393	future.FutureAPI = &azFuture
22394	future.Result = future.result
22395	return nil
22396}
22397
22398// result is the default implementation for RouteFiltersUpdateFuture.Result.
22399func (future *RouteFiltersUpdateFuture) result(client RouteFiltersClient) (rf RouteFilter, err error) {
22400	var done bool
22401	done, err = future.DoneWithContext(context.Background(), client)
22402	if err != nil {
22403		err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", future.Response(), "Polling failure")
22404		return
22405	}
22406	if !done {
22407		rf.Response.Response = future.Response()
22408		err = azure.NewAsyncOpIncompleteError("network.RouteFiltersUpdateFuture")
22409		return
22410	}
22411	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
22412	if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent {
22413		rf, err = client.UpdateResponder(rf.Response.Response)
22414		if err != nil {
22415			err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", rf.Response.Response, "Failure responding to request")
22416		}
22417	}
22418	return
22419}
22420
22421// RouteListResult response for the ListRoute API service call
22422type RouteListResult struct {
22423	autorest.Response `json:"-"`
22424	// Value - Gets a list of routes in a resource group.
22425	Value *[]Route `json:"value,omitempty"`
22426	// NextLink - The URL to get the next set of results.
22427	NextLink *string `json:"nextLink,omitempty"`
22428}
22429
22430// RouteListResultIterator provides access to a complete listing of Route values.
22431type RouteListResultIterator struct {
22432	i    int
22433	page RouteListResultPage
22434}
22435
22436// NextWithContext advances to the next value.  If there was an error making
22437// the request the iterator does not advance and the error is returned.
22438func (iter *RouteListResultIterator) NextWithContext(ctx context.Context) (err error) {
22439	if tracing.IsEnabled() {
22440		ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultIterator.NextWithContext")
22441		defer func() {
22442			sc := -1
22443			if iter.Response().Response.Response != nil {
22444				sc = iter.Response().Response.Response.StatusCode
22445			}
22446			tracing.EndSpan(ctx, sc, err)
22447		}()
22448	}
22449	iter.i++
22450	if iter.i < len(iter.page.Values()) {
22451		return nil
22452	}
22453	err = iter.page.NextWithContext(ctx)
22454	if err != nil {
22455		iter.i--
22456		return err
22457	}
22458	iter.i = 0
22459	return nil
22460}
22461
22462// Next advances to the next value.  If there was an error making
22463// the request the iterator does not advance and the error is returned.
22464// Deprecated: Use NextWithContext() instead.
22465func (iter *RouteListResultIterator) Next() error {
22466	return iter.NextWithContext(context.Background())
22467}
22468
22469// NotDone returns true if the enumeration should be started or is not yet complete.
22470func (iter RouteListResultIterator) NotDone() bool {
22471	return iter.page.NotDone() && iter.i < len(iter.page.Values())
22472}
22473
22474// Response returns the raw server response from the last page request.
22475func (iter RouteListResultIterator) Response() RouteListResult {
22476	return iter.page.Response()
22477}
22478
22479// Value returns the current value or a zero-initialized value if the
22480// iterator has advanced beyond the end of the collection.
22481func (iter RouteListResultIterator) Value() Route {
22482	if !iter.page.NotDone() {
22483		return Route{}
22484	}
22485	return iter.page.Values()[iter.i]
22486}
22487
22488// Creates a new instance of the RouteListResultIterator type.
22489func NewRouteListResultIterator(page RouteListResultPage) RouteListResultIterator {
22490	return RouteListResultIterator{page: page}
22491}
22492
22493// IsEmpty returns true if the ListResult contains no values.
22494func (rlr RouteListResult) IsEmpty() bool {
22495	return rlr.Value == nil || len(*rlr.Value) == 0
22496}
22497
22498// hasNextLink returns true if the NextLink is not empty.
22499func (rlr RouteListResult) hasNextLink() bool {
22500	return rlr.NextLink != nil && len(*rlr.NextLink) != 0
22501}
22502
22503// routeListResultPreparer prepares a request to retrieve the next set of results.
22504// It returns nil if no more results exist.
22505func (rlr RouteListResult) routeListResultPreparer(ctx context.Context) (*http.Request, error) {
22506	if !rlr.hasNextLink() {
22507		return nil, nil
22508	}
22509	return autorest.Prepare((&http.Request{}).WithContext(ctx),
22510		autorest.AsJSON(),
22511		autorest.AsGet(),
22512		autorest.WithBaseURL(to.String(rlr.NextLink)))
22513}
22514
22515// RouteListResultPage contains a page of Route values.
22516type RouteListResultPage struct {
22517	fn  func(context.Context, RouteListResult) (RouteListResult, error)
22518	rlr RouteListResult
22519}
22520
22521// NextWithContext advances to the next page of values.  If there was an error making
22522// the request the page does not advance and the error is returned.
22523func (page *RouteListResultPage) NextWithContext(ctx context.Context) (err error) {
22524	if tracing.IsEnabled() {
22525		ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultPage.NextWithContext")
22526		defer func() {
22527			sc := -1
22528			if page.Response().Response.Response != nil {
22529				sc = page.Response().Response.Response.StatusCode
22530			}
22531			tracing.EndSpan(ctx, sc, err)
22532		}()
22533	}
22534	for {
22535		next, err := page.fn(ctx, page.rlr)
22536		if err != nil {
22537			return err
22538		}
22539		page.rlr = next
22540		if !next.hasNextLink() || !next.IsEmpty() {
22541			break
22542		}
22543	}
22544	return nil
22545}
22546
22547// Next advances to the next page of values.  If there was an error making
22548// the request the page does not advance and the error is returned.
22549// Deprecated: Use NextWithContext() instead.
22550func (page *RouteListResultPage) Next() error {
22551	return page.NextWithContext(context.Background())
22552}
22553
22554// NotDone returns true if the page enumeration should be started or is not yet complete.
22555func (page RouteListResultPage) NotDone() bool {
22556	return !page.rlr.IsEmpty()
22557}
22558
22559// Response returns the raw server response from the last page request.
22560func (page RouteListResultPage) Response() RouteListResult {
22561	return page.rlr
22562}
22563
22564// Values returns the slice of values for the current page or nil if there are no values.
22565func (page RouteListResultPage) Values() []Route {
22566	if page.rlr.IsEmpty() {
22567		return nil
22568	}
22569	return *page.rlr.Value
22570}
22571
22572// Creates a new instance of the RouteListResultPage type.
22573func NewRouteListResultPage(cur RouteListResult, getNextPage func(context.Context, RouteListResult) (RouteListResult, error)) RouteListResultPage {
22574	return RouteListResultPage{
22575		fn:  getNextPage,
22576		rlr: cur,
22577	}
22578}
22579
22580// RoutePropertiesFormat route resource
22581type RoutePropertiesFormat struct {
22582	// AddressPrefix - The destination CIDR to which the route applies.
22583	AddressPrefix *string `json:"addressPrefix,omitempty"`
22584	// NextHopType - The type of Azure hop the packet should be sent to. Possible values are: 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', and 'None'. Possible values include: 'RouteNextHopTypeVirtualNetworkGateway', 'RouteNextHopTypeVnetLocal', 'RouteNextHopTypeInternet', 'RouteNextHopTypeVirtualAppliance', 'RouteNextHopTypeNone'
22585	NextHopType RouteNextHopType `json:"nextHopType,omitempty"`
22586	// NextHopIPAddress - The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance.
22587	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
22588	// ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
22589	ProvisioningState *string `json:"provisioningState,omitempty"`
22590}
22591
22592// RoutesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
22593// operation.
22594type RoutesCreateOrUpdateFuture struct {
22595	azure.FutureAPI
22596	// Result returns the result of the asynchronous operation.
22597	// If the operation has not completed it will return an error.
22598	Result func(RoutesClient) (Route, error)
22599}
22600
22601// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22602func (future *RoutesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
22603	var azFuture azure.Future
22604	if err := json.Unmarshal(body, &azFuture); err != nil {
22605		return err
22606	}
22607	future.FutureAPI = &azFuture
22608	future.Result = future.result
22609	return nil
22610}
22611
22612// result is the default implementation for RoutesCreateOrUpdateFuture.Result.
22613func (future *RoutesCreateOrUpdateFuture) result(client RoutesClient) (r Route, err error) {
22614	var done bool
22615	done, err = future.DoneWithContext(context.Background(), client)
22616	if err != nil {
22617		err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
22618		return
22619	}
22620	if !done {
22621		r.Response.Response = future.Response()
22622		err = azure.NewAsyncOpIncompleteError("network.RoutesCreateOrUpdateFuture")
22623		return
22624	}
22625	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
22626	if r.Response.Response, err = future.GetResult(sender); err == nil && r.Response.Response.StatusCode != http.StatusNoContent {
22627		r, err = client.CreateOrUpdateResponder(r.Response.Response)
22628		if err != nil {
22629			err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", r.Response.Response, "Failure responding to request")
22630		}
22631	}
22632	return
22633}
22634
22635// RoutesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
22636type RoutesDeleteFuture struct {
22637	azure.FutureAPI
22638	// Result returns the result of the asynchronous operation.
22639	// If the operation has not completed it will return an error.
22640	Result func(RoutesClient) (autorest.Response, error)
22641}
22642
22643// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22644func (future *RoutesDeleteFuture) UnmarshalJSON(body []byte) error {
22645	var azFuture azure.Future
22646	if err := json.Unmarshal(body, &azFuture); err != nil {
22647		return err
22648	}
22649	future.FutureAPI = &azFuture
22650	future.Result = future.result
22651	return nil
22652}
22653
22654// result is the default implementation for RoutesDeleteFuture.Result.
22655func (future *RoutesDeleteFuture) result(client RoutesClient) (ar autorest.Response, err error) {
22656	var done bool
22657	done, err = future.DoneWithContext(context.Background(), client)
22658	if err != nil {
22659		err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", future.Response(), "Polling failure")
22660		return
22661	}
22662	if !done {
22663		ar.Response = future.Response()
22664		err = azure.NewAsyncOpIncompleteError("network.RoutesDeleteFuture")
22665		return
22666	}
22667	ar.Response = future.Response()
22668	return
22669}
22670
22671// RouteTable route table resource.
22672type RouteTable struct {
22673	autorest.Response `json:"-"`
22674	// RouteTablePropertiesFormat - Properties of the route table.
22675	*RouteTablePropertiesFormat `json:"properties,omitempty"`
22676	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
22677	Etag *string `json:"etag,omitempty"`
22678	// ID - Resource ID.
22679	ID *string `json:"id,omitempty"`
22680	// Name - READ-ONLY; Resource name.
22681	Name *string `json:"name,omitempty"`
22682	// Type - READ-ONLY; Resource type.
22683	Type *string `json:"type,omitempty"`
22684	// Location - Resource location.
22685	Location *string `json:"location,omitempty"`
22686	// Tags - Resource tags.
22687	Tags map[string]*string `json:"tags"`
22688}
22689
22690// MarshalJSON is the custom marshaler for RouteTable.
22691func (rt RouteTable) MarshalJSON() ([]byte, error) {
22692	objectMap := make(map[string]interface{})
22693	if rt.RouteTablePropertiesFormat != nil {
22694		objectMap["properties"] = rt.RouteTablePropertiesFormat
22695	}
22696	if rt.Etag != nil {
22697		objectMap["etag"] = rt.Etag
22698	}
22699	if rt.ID != nil {
22700		objectMap["id"] = rt.ID
22701	}
22702	if rt.Location != nil {
22703		objectMap["location"] = rt.Location
22704	}
22705	if rt.Tags != nil {
22706		objectMap["tags"] = rt.Tags
22707	}
22708	return json.Marshal(objectMap)
22709}
22710
22711// UnmarshalJSON is the custom unmarshaler for RouteTable struct.
22712func (rt *RouteTable) UnmarshalJSON(body []byte) error {
22713	var m map[string]*json.RawMessage
22714	err := json.Unmarshal(body, &m)
22715	if err != nil {
22716		return err
22717	}
22718	for k, v := range m {
22719		switch k {
22720		case "properties":
22721			if v != nil {
22722				var routeTablePropertiesFormat RouteTablePropertiesFormat
22723				err = json.Unmarshal(*v, &routeTablePropertiesFormat)
22724				if err != nil {
22725					return err
22726				}
22727				rt.RouteTablePropertiesFormat = &routeTablePropertiesFormat
22728			}
22729		case "etag":
22730			if v != nil {
22731				var etag string
22732				err = json.Unmarshal(*v, &etag)
22733				if err != nil {
22734					return err
22735				}
22736				rt.Etag = &etag
22737			}
22738		case "id":
22739			if v != nil {
22740				var ID string
22741				err = json.Unmarshal(*v, &ID)
22742				if err != nil {
22743					return err
22744				}
22745				rt.ID = &ID
22746			}
22747		case "name":
22748			if v != nil {
22749				var name string
22750				err = json.Unmarshal(*v, &name)
22751				if err != nil {
22752					return err
22753				}
22754				rt.Name = &name
22755			}
22756		case "type":
22757			if v != nil {
22758				var typeVar string
22759				err = json.Unmarshal(*v, &typeVar)
22760				if err != nil {
22761					return err
22762				}
22763				rt.Type = &typeVar
22764			}
22765		case "location":
22766			if v != nil {
22767				var location string
22768				err = json.Unmarshal(*v, &location)
22769				if err != nil {
22770					return err
22771				}
22772				rt.Location = &location
22773			}
22774		case "tags":
22775			if v != nil {
22776				var tags map[string]*string
22777				err = json.Unmarshal(*v, &tags)
22778				if err != nil {
22779					return err
22780				}
22781				rt.Tags = tags
22782			}
22783		}
22784	}
22785
22786	return nil
22787}
22788
22789// RouteTableListResult response for the ListRouteTable API service call.
22790type RouteTableListResult struct {
22791	autorest.Response `json:"-"`
22792	// Value - Gets a list of route tables in a resource group.
22793	Value *[]RouteTable `json:"value,omitempty"`
22794	// NextLink - The URL to get the next set of results.
22795	NextLink *string `json:"nextLink,omitempty"`
22796}
22797
22798// RouteTableListResultIterator provides access to a complete listing of RouteTable values.
22799type RouteTableListResultIterator struct {
22800	i    int
22801	page RouteTableListResultPage
22802}
22803
22804// NextWithContext advances to the next value.  If there was an error making
22805// the request the iterator does not advance and the error is returned.
22806func (iter *RouteTableListResultIterator) NextWithContext(ctx context.Context) (err error) {
22807	if tracing.IsEnabled() {
22808		ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultIterator.NextWithContext")
22809		defer func() {
22810			sc := -1
22811			if iter.Response().Response.Response != nil {
22812				sc = iter.Response().Response.Response.StatusCode
22813			}
22814			tracing.EndSpan(ctx, sc, err)
22815		}()
22816	}
22817	iter.i++
22818	if iter.i < len(iter.page.Values()) {
22819		return nil
22820	}
22821	err = iter.page.NextWithContext(ctx)
22822	if err != nil {
22823		iter.i--
22824		return err
22825	}
22826	iter.i = 0
22827	return nil
22828}
22829
22830// Next advances to the next value.  If there was an error making
22831// the request the iterator does not advance and the error is returned.
22832// Deprecated: Use NextWithContext() instead.
22833func (iter *RouteTableListResultIterator) Next() error {
22834	return iter.NextWithContext(context.Background())
22835}
22836
22837// NotDone returns true if the enumeration should be started or is not yet complete.
22838func (iter RouteTableListResultIterator) NotDone() bool {
22839	return iter.page.NotDone() && iter.i < len(iter.page.Values())
22840}
22841
22842// Response returns the raw server response from the last page request.
22843func (iter RouteTableListResultIterator) Response() RouteTableListResult {
22844	return iter.page.Response()
22845}
22846
22847// Value returns the current value or a zero-initialized value if the
22848// iterator has advanced beyond the end of the collection.
22849func (iter RouteTableListResultIterator) Value() RouteTable {
22850	if !iter.page.NotDone() {
22851		return RouteTable{}
22852	}
22853	return iter.page.Values()[iter.i]
22854}
22855
22856// Creates a new instance of the RouteTableListResultIterator type.
22857func NewRouteTableListResultIterator(page RouteTableListResultPage) RouteTableListResultIterator {
22858	return RouteTableListResultIterator{page: page}
22859}
22860
22861// IsEmpty returns true if the ListResult contains no values.
22862func (rtlr RouteTableListResult) IsEmpty() bool {
22863	return rtlr.Value == nil || len(*rtlr.Value) == 0
22864}
22865
22866// hasNextLink returns true if the NextLink is not empty.
22867func (rtlr RouteTableListResult) hasNextLink() bool {
22868	return rtlr.NextLink != nil && len(*rtlr.NextLink) != 0
22869}
22870
22871// routeTableListResultPreparer prepares a request to retrieve the next set of results.
22872// It returns nil if no more results exist.
22873func (rtlr RouteTableListResult) routeTableListResultPreparer(ctx context.Context) (*http.Request, error) {
22874	if !rtlr.hasNextLink() {
22875		return nil, nil
22876	}
22877	return autorest.Prepare((&http.Request{}).WithContext(ctx),
22878		autorest.AsJSON(),
22879		autorest.AsGet(),
22880		autorest.WithBaseURL(to.String(rtlr.NextLink)))
22881}
22882
22883// RouteTableListResultPage contains a page of RouteTable values.
22884type RouteTableListResultPage struct {
22885	fn   func(context.Context, RouteTableListResult) (RouteTableListResult, error)
22886	rtlr RouteTableListResult
22887}
22888
22889// NextWithContext advances to the next page of values.  If there was an error making
22890// the request the page does not advance and the error is returned.
22891func (page *RouteTableListResultPage) NextWithContext(ctx context.Context) (err error) {
22892	if tracing.IsEnabled() {
22893		ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultPage.NextWithContext")
22894		defer func() {
22895			sc := -1
22896			if page.Response().Response.Response != nil {
22897				sc = page.Response().Response.Response.StatusCode
22898			}
22899			tracing.EndSpan(ctx, sc, err)
22900		}()
22901	}
22902	for {
22903		next, err := page.fn(ctx, page.rtlr)
22904		if err != nil {
22905			return err
22906		}
22907		page.rtlr = next
22908		if !next.hasNextLink() || !next.IsEmpty() {
22909			break
22910		}
22911	}
22912	return nil
22913}
22914
22915// Next advances to the next page of values.  If there was an error making
22916// the request the page does not advance and the error is returned.
22917// Deprecated: Use NextWithContext() instead.
22918func (page *RouteTableListResultPage) Next() error {
22919	return page.NextWithContext(context.Background())
22920}
22921
22922// NotDone returns true if the page enumeration should be started or is not yet complete.
22923func (page RouteTableListResultPage) NotDone() bool {
22924	return !page.rtlr.IsEmpty()
22925}
22926
22927// Response returns the raw server response from the last page request.
22928func (page RouteTableListResultPage) Response() RouteTableListResult {
22929	return page.rtlr
22930}
22931
22932// Values returns the slice of values for the current page or nil if there are no values.
22933func (page RouteTableListResultPage) Values() []RouteTable {
22934	if page.rtlr.IsEmpty() {
22935		return nil
22936	}
22937	return *page.rtlr.Value
22938}
22939
22940// Creates a new instance of the RouteTableListResultPage type.
22941func NewRouteTableListResultPage(cur RouteTableListResult, getNextPage func(context.Context, RouteTableListResult) (RouteTableListResult, error)) RouteTableListResultPage {
22942	return RouteTableListResultPage{
22943		fn:   getNextPage,
22944		rtlr: cur,
22945	}
22946}
22947
22948// RouteTablePropertiesFormat route Table resource
22949type RouteTablePropertiesFormat struct {
22950	// Routes - Collection of routes contained within a route table.
22951	Routes *[]Route `json:"routes,omitempty"`
22952	// Subnets - READ-ONLY; A collection of references to subnets.
22953	Subnets *[]Subnet `json:"subnets,omitempty"`
22954	// DisableBgpRoutePropagation - Gets or sets whether to disable the routes learned by BGP on that route table. True means disable.
22955	DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"`
22956	// ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
22957	ProvisioningState *string `json:"provisioningState,omitempty"`
22958}
22959
22960// MarshalJSON is the custom marshaler for RouteTablePropertiesFormat.
22961func (rtpf RouteTablePropertiesFormat) MarshalJSON() ([]byte, error) {
22962	objectMap := make(map[string]interface{})
22963	if rtpf.Routes != nil {
22964		objectMap["routes"] = rtpf.Routes
22965	}
22966	if rtpf.DisableBgpRoutePropagation != nil {
22967		objectMap["disableBgpRoutePropagation"] = rtpf.DisableBgpRoutePropagation
22968	}
22969	if rtpf.ProvisioningState != nil {
22970		objectMap["provisioningState"] = rtpf.ProvisioningState
22971	}
22972	return json.Marshal(objectMap)
22973}
22974
22975// RouteTablesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
22976// long-running operation.
22977type RouteTablesCreateOrUpdateFuture struct {
22978	azure.FutureAPI
22979	// Result returns the result of the asynchronous operation.
22980	// If the operation has not completed it will return an error.
22981	Result func(RouteTablesClient) (RouteTable, error)
22982}
22983
22984// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22985func (future *RouteTablesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
22986	var azFuture azure.Future
22987	if err := json.Unmarshal(body, &azFuture); err != nil {
22988		return err
22989	}
22990	future.FutureAPI = &azFuture
22991	future.Result = future.result
22992	return nil
22993}
22994
22995// result is the default implementation for RouteTablesCreateOrUpdateFuture.Result.
22996func (future *RouteTablesCreateOrUpdateFuture) result(client RouteTablesClient) (rt RouteTable, err error) {
22997	var done bool
22998	done, err = future.DoneWithContext(context.Background(), client)
22999	if err != nil {
23000		err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
23001		return
23002	}
23003	if !done {
23004		rt.Response.Response = future.Response()
23005		err = azure.NewAsyncOpIncompleteError("network.RouteTablesCreateOrUpdateFuture")
23006		return
23007	}
23008	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
23009	if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
23010		rt, err = client.CreateOrUpdateResponder(rt.Response.Response)
23011		if err != nil {
23012			err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", rt.Response.Response, "Failure responding to request")
23013		}
23014	}
23015	return
23016}
23017
23018// RouteTablesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
23019// operation.
23020type RouteTablesDeleteFuture struct {
23021	azure.FutureAPI
23022	// Result returns the result of the asynchronous operation.
23023	// If the operation has not completed it will return an error.
23024	Result func(RouteTablesClient) (autorest.Response, error)
23025}
23026
23027// UnmarshalJSON is the custom unmarshaller for CreateFuture.
23028func (future *RouteTablesDeleteFuture) UnmarshalJSON(body []byte) error {
23029	var azFuture azure.Future
23030	if err := json.Unmarshal(body, &azFuture); err != nil {
23031		return err
23032	}
23033	future.FutureAPI = &azFuture
23034	future.Result = future.result
23035	return nil
23036}
23037
23038// result is the default implementation for RouteTablesDeleteFuture.Result.
23039func (future *RouteTablesDeleteFuture) result(client RouteTablesClient) (ar autorest.Response, err error) {
23040	var done bool
23041	done, err = future.DoneWithContext(context.Background(), client)
23042	if err != nil {
23043		err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", future.Response(), "Polling failure")
23044		return
23045	}
23046	if !done {
23047		ar.Response = future.Response()
23048		err = azure.NewAsyncOpIncompleteError("network.RouteTablesDeleteFuture")
23049		return
23050	}
23051	ar.Response = future.Response()
23052	return
23053}
23054
23055// RouteTablesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
23056// operation.
23057type RouteTablesUpdateTagsFuture struct {
23058	azure.FutureAPI
23059	// Result returns the result of the asynchronous operation.
23060	// If the operation has not completed it will return an error.
23061	Result func(RouteTablesClient) (RouteTable, error)
23062}
23063
23064// UnmarshalJSON is the custom unmarshaller for CreateFuture.
23065func (future *RouteTablesUpdateTagsFuture) UnmarshalJSON(body []byte) error {
23066	var azFuture azure.Future
23067	if err := json.Unmarshal(body, &azFuture); err != nil {
23068		return err
23069	}
23070	future.FutureAPI = &azFuture
23071	future.Result = future.result
23072	return nil
23073}
23074
23075// result is the default implementation for RouteTablesUpdateTagsFuture.Result.
23076func (future *RouteTablesUpdateTagsFuture) result(client RouteTablesClient) (rt RouteTable, err error) {
23077	var done bool
23078	done, err = future.DoneWithContext(context.Background(), client)
23079	if err != nil {
23080		err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
23081		return
23082	}
23083	if !done {
23084		rt.Response.Response = future.Response()
23085		err = azure.NewAsyncOpIncompleteError("network.RouteTablesUpdateTagsFuture")
23086		return
23087	}
23088	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
23089	if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
23090		rt, err = client.UpdateTagsResponder(rt.Response.Response)
23091		if err != nil {
23092			err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", rt.Response.Response, "Failure responding to request")
23093		}
23094	}
23095	return
23096}
23097
23098// SecurityGroup networkSecurityGroup resource.
23099type SecurityGroup struct {
23100	autorest.Response `json:"-"`
23101	// SecurityGroupPropertiesFormat - Properties of the network security group
23102	*SecurityGroupPropertiesFormat `json:"properties,omitempty"`
23103	// Etag - A unique read-only string that changes whenever the resource is updated.
23104	Etag *string `json:"etag,omitempty"`
23105	// ID - Resource ID.
23106	ID *string `json:"id,omitempty"`
23107	// Name - READ-ONLY; Resource name.
23108	Name *string `json:"name,omitempty"`
23109	// Type - READ-ONLY; Resource type.
23110	Type *string `json:"type,omitempty"`
23111	// Location - Resource location.
23112	Location *string `json:"location,omitempty"`
23113	// Tags - Resource tags.
23114	Tags map[string]*string `json:"tags"`
23115}
23116
23117// MarshalJSON is the custom marshaler for SecurityGroup.
23118func (sg SecurityGroup) MarshalJSON() ([]byte, error) {
23119	objectMap := make(map[string]interface{})
23120	if sg.SecurityGroupPropertiesFormat != nil {
23121		objectMap["properties"] = sg.SecurityGroupPropertiesFormat
23122	}
23123	if sg.Etag != nil {
23124		objectMap["etag"] = sg.Etag
23125	}
23126	if sg.ID != nil {
23127		objectMap["id"] = sg.ID
23128	}
23129	if sg.Location != nil {
23130		objectMap["location"] = sg.Location
23131	}
23132	if sg.Tags != nil {
23133		objectMap["tags"] = sg.Tags
23134	}
23135	return json.Marshal(objectMap)
23136}
23137
23138// UnmarshalJSON is the custom unmarshaler for SecurityGroup struct.
23139func (sg *SecurityGroup) UnmarshalJSON(body []byte) error {
23140	var m map[string]*json.RawMessage
23141	err := json.Unmarshal(body, &m)
23142	if err != nil {
23143		return err
23144	}
23145	for k, v := range m {
23146		switch k {
23147		case "properties":
23148			if v != nil {
23149				var securityGroupPropertiesFormat SecurityGroupPropertiesFormat
23150				err = json.Unmarshal(*v, &securityGroupPropertiesFormat)
23151				if err != nil {
23152					return err
23153				}
23154				sg.SecurityGroupPropertiesFormat = &securityGroupPropertiesFormat
23155			}
23156		case "etag":
23157			if v != nil {
23158				var etag string
23159				err = json.Unmarshal(*v, &etag)
23160				if err != nil {
23161					return err
23162				}
23163				sg.Etag = &etag
23164			}
23165		case "id":
23166			if v != nil {
23167				var ID string
23168				err = json.Unmarshal(*v, &ID)
23169				if err != nil {
23170					return err
23171				}
23172				sg.ID = &ID
23173			}
23174		case "name":
23175			if v != nil {
23176				var name string
23177				err = json.Unmarshal(*v, &name)
23178				if err != nil {
23179					return err
23180				}
23181				sg.Name = &name
23182			}
23183		case "type":
23184			if v != nil {
23185				var typeVar string
23186				err = json.Unmarshal(*v, &typeVar)
23187				if err != nil {
23188					return err
23189				}
23190				sg.Type = &typeVar
23191			}
23192		case "location":
23193			if v != nil {
23194				var location string
23195				err = json.Unmarshal(*v, &location)
23196				if err != nil {
23197					return err
23198				}
23199				sg.Location = &location
23200			}
23201		case "tags":
23202			if v != nil {
23203				var tags map[string]*string
23204				err = json.Unmarshal(*v, &tags)
23205				if err != nil {
23206					return err
23207				}
23208				sg.Tags = tags
23209			}
23210		}
23211	}
23212
23213	return nil
23214}
23215
23216// SecurityGroupListResult response for ListNetworkSecurityGroups API service call.
23217type SecurityGroupListResult struct {
23218	autorest.Response `json:"-"`
23219	// Value - A list of NetworkSecurityGroup resources.
23220	Value *[]SecurityGroup `json:"value,omitempty"`
23221	// NextLink - The URL to get the next set of results.
23222	NextLink *string `json:"nextLink,omitempty"`
23223}
23224
23225// SecurityGroupListResultIterator provides access to a complete listing of SecurityGroup values.
23226type SecurityGroupListResultIterator struct {
23227	i    int
23228	page SecurityGroupListResultPage
23229}
23230
23231// NextWithContext advances to the next value.  If there was an error making
23232// the request the iterator does not advance and the error is returned.
23233func (iter *SecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
23234	if tracing.IsEnabled() {
23235		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultIterator.NextWithContext")
23236		defer func() {
23237			sc := -1
23238			if iter.Response().Response.Response != nil {
23239				sc = iter.Response().Response.Response.StatusCode
23240			}
23241			tracing.EndSpan(ctx, sc, err)
23242		}()
23243	}
23244	iter.i++
23245	if iter.i < len(iter.page.Values()) {
23246		return nil
23247	}
23248	err = iter.page.NextWithContext(ctx)
23249	if err != nil {
23250		iter.i--
23251		return err
23252	}
23253	iter.i = 0
23254	return nil
23255}
23256
23257// Next advances to the next value.  If there was an error making
23258// the request the iterator does not advance and the error is returned.
23259// Deprecated: Use NextWithContext() instead.
23260func (iter *SecurityGroupListResultIterator) Next() error {
23261	return iter.NextWithContext(context.Background())
23262}
23263
23264// NotDone returns true if the enumeration should be started or is not yet complete.
23265func (iter SecurityGroupListResultIterator) NotDone() bool {
23266	return iter.page.NotDone() && iter.i < len(iter.page.Values())
23267}
23268
23269// Response returns the raw server response from the last page request.
23270func (iter SecurityGroupListResultIterator) Response() SecurityGroupListResult {
23271	return iter.page.Response()
23272}
23273
23274// Value returns the current value or a zero-initialized value if the
23275// iterator has advanced beyond the end of the collection.
23276func (iter SecurityGroupListResultIterator) Value() SecurityGroup {
23277	if !iter.page.NotDone() {
23278		return SecurityGroup{}
23279	}
23280	return iter.page.Values()[iter.i]
23281}
23282
23283// Creates a new instance of the SecurityGroupListResultIterator type.
23284func NewSecurityGroupListResultIterator(page SecurityGroupListResultPage) SecurityGroupListResultIterator {
23285	return SecurityGroupListResultIterator{page: page}
23286}
23287
23288// IsEmpty returns true if the ListResult contains no values.
23289func (sglr SecurityGroupListResult) IsEmpty() bool {
23290	return sglr.Value == nil || len(*sglr.Value) == 0
23291}
23292
23293// hasNextLink returns true if the NextLink is not empty.
23294func (sglr SecurityGroupListResult) hasNextLink() bool {
23295	return sglr.NextLink != nil && len(*sglr.NextLink) != 0
23296}
23297
23298// securityGroupListResultPreparer prepares a request to retrieve the next set of results.
23299// It returns nil if no more results exist.
23300func (sglr SecurityGroupListResult) securityGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
23301	if !sglr.hasNextLink() {
23302		return nil, nil
23303	}
23304	return autorest.Prepare((&http.Request{}).WithContext(ctx),
23305		autorest.AsJSON(),
23306		autorest.AsGet(),
23307		autorest.WithBaseURL(to.String(sglr.NextLink)))
23308}
23309
23310// SecurityGroupListResultPage contains a page of SecurityGroup values.
23311type SecurityGroupListResultPage struct {
23312	fn   func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)
23313	sglr SecurityGroupListResult
23314}
23315
23316// NextWithContext advances to the next page of values.  If there was an error making
23317// the request the page does not advance and the error is returned.
23318func (page *SecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
23319	if tracing.IsEnabled() {
23320		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultPage.NextWithContext")
23321		defer func() {
23322			sc := -1
23323			if page.Response().Response.Response != nil {
23324				sc = page.Response().Response.Response.StatusCode
23325			}
23326			tracing.EndSpan(ctx, sc, err)
23327		}()
23328	}
23329	for {
23330		next, err := page.fn(ctx, page.sglr)
23331		if err != nil {
23332			return err
23333		}
23334		page.sglr = next
23335		if !next.hasNextLink() || !next.IsEmpty() {
23336			break
23337		}
23338	}
23339	return nil
23340}
23341
23342// Next advances to the next page of values.  If there was an error making
23343// the request the page does not advance and the error is returned.
23344// Deprecated: Use NextWithContext() instead.
23345func (page *SecurityGroupListResultPage) Next() error {
23346	return page.NextWithContext(context.Background())
23347}
23348
23349// NotDone returns true if the page enumeration should be started or is not yet complete.
23350func (page SecurityGroupListResultPage) NotDone() bool {
23351	return !page.sglr.IsEmpty()
23352}
23353
23354// Response returns the raw server response from the last page request.
23355func (page SecurityGroupListResultPage) Response() SecurityGroupListResult {
23356	return page.sglr
23357}
23358
23359// Values returns the slice of values for the current page or nil if there are no values.
23360func (page SecurityGroupListResultPage) Values() []SecurityGroup {
23361	if page.sglr.IsEmpty() {
23362		return nil
23363	}
23364	return *page.sglr.Value
23365}
23366
23367// Creates a new instance of the SecurityGroupListResultPage type.
23368func NewSecurityGroupListResultPage(cur SecurityGroupListResult, getNextPage func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)) SecurityGroupListResultPage {
23369	return SecurityGroupListResultPage{
23370		fn:   getNextPage,
23371		sglr: cur,
23372	}
23373}
23374
23375// SecurityGroupNetworkInterface network interface and all its associated security rules.
23376type SecurityGroupNetworkInterface struct {
23377	// ID - ID of the network interface.
23378	ID                       *string                   `json:"id,omitempty"`
23379	SecurityRuleAssociations *SecurityRuleAssociations `json:"securityRuleAssociations,omitempty"`
23380}
23381
23382// SecurityGroupPropertiesFormat network Security Group resource.
23383type SecurityGroupPropertiesFormat struct {
23384	// SecurityRules - A collection of security rules of the network security group.
23385	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
23386	// DefaultSecurityRules - The default security rules of network security group.
23387	DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"`
23388	// NetworkInterfaces - READ-ONLY; A collection of references to network interfaces.
23389	NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"`
23390	// Subnets - READ-ONLY; A collection of references to subnets.
23391	Subnets *[]Subnet `json:"subnets,omitempty"`
23392	// ResourceGUID - The resource GUID property of the network security group resource.
23393	ResourceGUID *string `json:"resourceGuid,omitempty"`
23394	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
23395	ProvisioningState *string `json:"provisioningState,omitempty"`
23396}
23397
23398// MarshalJSON is the custom marshaler for SecurityGroupPropertiesFormat.
23399func (sgpf SecurityGroupPropertiesFormat) MarshalJSON() ([]byte, error) {
23400	objectMap := make(map[string]interface{})
23401	if sgpf.SecurityRules != nil {
23402		objectMap["securityRules"] = sgpf.SecurityRules
23403	}
23404	if sgpf.DefaultSecurityRules != nil {
23405		objectMap["defaultSecurityRules"] = sgpf.DefaultSecurityRules
23406	}
23407	if sgpf.ResourceGUID != nil {
23408		objectMap["resourceGuid"] = sgpf.ResourceGUID
23409	}
23410	if sgpf.ProvisioningState != nil {
23411		objectMap["provisioningState"] = sgpf.ProvisioningState
23412	}
23413	return json.Marshal(objectMap)
23414}
23415
23416// SecurityGroupResult network configuration diagnostic result corresponded provided traffic query.
23417type SecurityGroupResult struct {
23418	// SecurityRuleAccessResult - The network traffic is allowed or denied. Possible values are 'Allow' and 'Deny'. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
23419	SecurityRuleAccessResult SecurityRuleAccess `json:"securityRuleAccessResult,omitempty"`
23420	// EvaluatedNetworkSecurityGroups - READ-ONLY; List of results network security groups diagnostic.
23421	EvaluatedNetworkSecurityGroups *[]EvaluatedNetworkSecurityGroup `json:"evaluatedNetworkSecurityGroups,omitempty"`
23422}
23423
23424// MarshalJSON is the custom marshaler for SecurityGroupResult.
23425func (sgr SecurityGroupResult) MarshalJSON() ([]byte, error) {
23426	objectMap := make(map[string]interface{})
23427	if sgr.SecurityRuleAccessResult != "" {
23428		objectMap["securityRuleAccessResult"] = sgr.SecurityRuleAccessResult
23429	}
23430	return json.Marshal(objectMap)
23431}
23432
23433// SecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
23434// long-running operation.
23435type SecurityGroupsCreateOrUpdateFuture struct {
23436	azure.FutureAPI
23437	// Result returns the result of the asynchronous operation.
23438	// If the operation has not completed it will return an error.
23439	Result func(SecurityGroupsClient) (SecurityGroup, error)
23440}
23441
23442// UnmarshalJSON is the custom unmarshaller for CreateFuture.
23443func (future *SecurityGroupsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
23444	var azFuture azure.Future
23445	if err := json.Unmarshal(body, &azFuture); err != nil {
23446		return err
23447	}
23448	future.FutureAPI = &azFuture
23449	future.Result = future.result
23450	return nil
23451}
23452
23453// result is the default implementation for SecurityGroupsCreateOrUpdateFuture.Result.
23454func (future *SecurityGroupsCreateOrUpdateFuture) result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
23455	var done bool
23456	done, err = future.DoneWithContext(context.Background(), client)
23457	if err != nil {
23458		err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
23459		return
23460	}
23461	if !done {
23462		sg.Response.Response = future.Response()
23463		err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsCreateOrUpdateFuture")
23464		return
23465	}
23466	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
23467	if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
23468		sg, err = client.CreateOrUpdateResponder(sg.Response.Response)
23469		if err != nil {
23470			err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", sg.Response.Response, "Failure responding to request")
23471		}
23472	}
23473	return
23474}
23475
23476// SecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
23477// operation.
23478type SecurityGroupsDeleteFuture struct {
23479	azure.FutureAPI
23480	// Result returns the result of the asynchronous operation.
23481	// If the operation has not completed it will return an error.
23482	Result func(SecurityGroupsClient) (autorest.Response, error)
23483}
23484
23485// UnmarshalJSON is the custom unmarshaller for CreateFuture.
23486func (future *SecurityGroupsDeleteFuture) UnmarshalJSON(body []byte) error {
23487	var azFuture azure.Future
23488	if err := json.Unmarshal(body, &azFuture); err != nil {
23489		return err
23490	}
23491	future.FutureAPI = &azFuture
23492	future.Result = future.result
23493	return nil
23494}
23495
23496// result is the default implementation for SecurityGroupsDeleteFuture.Result.
23497func (future *SecurityGroupsDeleteFuture) result(client SecurityGroupsClient) (ar autorest.Response, err error) {
23498	var done bool
23499	done, err = future.DoneWithContext(context.Background(), client)
23500	if err != nil {
23501		err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
23502		return
23503	}
23504	if !done {
23505		ar.Response = future.Response()
23506		err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsDeleteFuture")
23507		return
23508	}
23509	ar.Response = future.Response()
23510	return
23511}
23512
23513// SecurityGroupsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
23514// long-running operation.
23515type SecurityGroupsUpdateTagsFuture struct {
23516	azure.FutureAPI
23517	// Result returns the result of the asynchronous operation.
23518	// If the operation has not completed it will return an error.
23519	Result func(SecurityGroupsClient) (SecurityGroup, error)
23520}
23521
23522// UnmarshalJSON is the custom unmarshaller for CreateFuture.
23523func (future *SecurityGroupsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
23524	var azFuture azure.Future
23525	if err := json.Unmarshal(body, &azFuture); err != nil {
23526		return err
23527	}
23528	future.FutureAPI = &azFuture
23529	future.Result = future.result
23530	return nil
23531}
23532
23533// result is the default implementation for SecurityGroupsUpdateTagsFuture.Result.
23534func (future *SecurityGroupsUpdateTagsFuture) result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
23535	var done bool
23536	done, err = future.DoneWithContext(context.Background(), client)
23537	if err != nil {
23538		err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
23539		return
23540	}
23541	if !done {
23542		sg.Response.Response = future.Response()
23543		err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsUpdateTagsFuture")
23544		return
23545	}
23546	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
23547	if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
23548		sg, err = client.UpdateTagsResponder(sg.Response.Response)
23549		if err != nil {
23550			err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", sg.Response.Response, "Failure responding to request")
23551		}
23552	}
23553	return
23554}
23555
23556// SecurityGroupViewParameters parameters that define the VM to check security groups for.
23557type SecurityGroupViewParameters struct {
23558	// TargetResourceID - ID of the target VM.
23559	TargetResourceID *string `json:"targetResourceId,omitempty"`
23560}
23561
23562// SecurityGroupViewResult the information about security rules applied to the specified VM.
23563type SecurityGroupViewResult struct {
23564	autorest.Response `json:"-"`
23565	// NetworkInterfaces - List of network interfaces on the specified VM.
23566	NetworkInterfaces *[]SecurityGroupNetworkInterface `json:"networkInterfaces,omitempty"`
23567}
23568
23569// SecurityRule network security rule.
23570type SecurityRule struct {
23571	autorest.Response `json:"-"`
23572	// SecurityRulePropertiesFormat - Properties of the security rule
23573	*SecurityRulePropertiesFormat `json:"properties,omitempty"`
23574	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
23575	Name *string `json:"name,omitempty"`
23576	// Etag - A unique read-only string that changes whenever the resource is updated.
23577	Etag *string `json:"etag,omitempty"`
23578	// ID - Resource ID.
23579	ID *string `json:"id,omitempty"`
23580}
23581
23582// MarshalJSON is the custom marshaler for SecurityRule.
23583func (sr SecurityRule) MarshalJSON() ([]byte, error) {
23584	objectMap := make(map[string]interface{})
23585	if sr.SecurityRulePropertiesFormat != nil {
23586		objectMap["properties"] = sr.SecurityRulePropertiesFormat
23587	}
23588	if sr.Name != nil {
23589		objectMap["name"] = sr.Name
23590	}
23591	if sr.Etag != nil {
23592		objectMap["etag"] = sr.Etag
23593	}
23594	if sr.ID != nil {
23595		objectMap["id"] = sr.ID
23596	}
23597	return json.Marshal(objectMap)
23598}
23599
23600// UnmarshalJSON is the custom unmarshaler for SecurityRule struct.
23601func (sr *SecurityRule) UnmarshalJSON(body []byte) error {
23602	var m map[string]*json.RawMessage
23603	err := json.Unmarshal(body, &m)
23604	if err != nil {
23605		return err
23606	}
23607	for k, v := range m {
23608		switch k {
23609		case "properties":
23610			if v != nil {
23611				var securityRulePropertiesFormat SecurityRulePropertiesFormat
23612				err = json.Unmarshal(*v, &securityRulePropertiesFormat)
23613				if err != nil {
23614					return err
23615				}
23616				sr.SecurityRulePropertiesFormat = &securityRulePropertiesFormat
23617			}
23618		case "name":
23619			if v != nil {
23620				var name string
23621				err = json.Unmarshal(*v, &name)
23622				if err != nil {
23623					return err
23624				}
23625				sr.Name = &name
23626			}
23627		case "etag":
23628			if v != nil {
23629				var etag string
23630				err = json.Unmarshal(*v, &etag)
23631				if err != nil {
23632					return err
23633				}
23634				sr.Etag = &etag
23635			}
23636		case "id":
23637			if v != nil {
23638				var ID string
23639				err = json.Unmarshal(*v, &ID)
23640				if err != nil {
23641					return err
23642				}
23643				sr.ID = &ID
23644			}
23645		}
23646	}
23647
23648	return nil
23649}
23650
23651// SecurityRuleAssociations all security rules associated with the network interface.
23652type SecurityRuleAssociations struct {
23653	NetworkInterfaceAssociation *InterfaceAssociation `json:"networkInterfaceAssociation,omitempty"`
23654	SubnetAssociation           *SubnetAssociation    `json:"subnetAssociation,omitempty"`
23655	// DefaultSecurityRules - Collection of default security rules of the network security group.
23656	DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"`
23657	// EffectiveSecurityRules - Collection of effective security rules.
23658	EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"`
23659}
23660
23661// SecurityRuleListResult response for ListSecurityRule API service call. Retrieves all security rules that
23662// belongs to a network security group.
23663type SecurityRuleListResult struct {
23664	autorest.Response `json:"-"`
23665	// Value - The security rules in a network security group.
23666	Value *[]SecurityRule `json:"value,omitempty"`
23667	// NextLink - The URL to get the next set of results.
23668	NextLink *string `json:"nextLink,omitempty"`
23669}
23670
23671// SecurityRuleListResultIterator provides access to a complete listing of SecurityRule values.
23672type SecurityRuleListResultIterator struct {
23673	i    int
23674	page SecurityRuleListResultPage
23675}
23676
23677// NextWithContext advances to the next value.  If there was an error making
23678// the request the iterator does not advance and the error is returned.
23679func (iter *SecurityRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
23680	if tracing.IsEnabled() {
23681		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultIterator.NextWithContext")
23682		defer func() {
23683			sc := -1
23684			if iter.Response().Response.Response != nil {
23685				sc = iter.Response().Response.Response.StatusCode
23686			}
23687			tracing.EndSpan(ctx, sc, err)
23688		}()
23689	}
23690	iter.i++
23691	if iter.i < len(iter.page.Values()) {
23692		return nil
23693	}
23694	err = iter.page.NextWithContext(ctx)
23695	if err != nil {
23696		iter.i--
23697		return err
23698	}
23699	iter.i = 0
23700	return nil
23701}
23702
23703// Next advances to the next value.  If there was an error making
23704// the request the iterator does not advance and the error is returned.
23705// Deprecated: Use NextWithContext() instead.
23706func (iter *SecurityRuleListResultIterator) Next() error {
23707	return iter.NextWithContext(context.Background())
23708}
23709
23710// NotDone returns true if the enumeration should be started or is not yet complete.
23711func (iter SecurityRuleListResultIterator) NotDone() bool {
23712	return iter.page.NotDone() && iter.i < len(iter.page.Values())
23713}
23714
23715// Response returns the raw server response from the last page request.
23716func (iter SecurityRuleListResultIterator) Response() SecurityRuleListResult {
23717	return iter.page.Response()
23718}
23719
23720// Value returns the current value or a zero-initialized value if the
23721// iterator has advanced beyond the end of the collection.
23722func (iter SecurityRuleListResultIterator) Value() SecurityRule {
23723	if !iter.page.NotDone() {
23724		return SecurityRule{}
23725	}
23726	return iter.page.Values()[iter.i]
23727}
23728
23729// Creates a new instance of the SecurityRuleListResultIterator type.
23730func NewSecurityRuleListResultIterator(page SecurityRuleListResultPage) SecurityRuleListResultIterator {
23731	return SecurityRuleListResultIterator{page: page}
23732}
23733
23734// IsEmpty returns true if the ListResult contains no values.
23735func (srlr SecurityRuleListResult) IsEmpty() bool {
23736	return srlr.Value == nil || len(*srlr.Value) == 0
23737}
23738
23739// hasNextLink returns true if the NextLink is not empty.
23740func (srlr SecurityRuleListResult) hasNextLink() bool {
23741	return srlr.NextLink != nil && len(*srlr.NextLink) != 0
23742}
23743
23744// securityRuleListResultPreparer prepares a request to retrieve the next set of results.
23745// It returns nil if no more results exist.
23746func (srlr SecurityRuleListResult) securityRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
23747	if !srlr.hasNextLink() {
23748		return nil, nil
23749	}
23750	return autorest.Prepare((&http.Request{}).WithContext(ctx),
23751		autorest.AsJSON(),
23752		autorest.AsGet(),
23753		autorest.WithBaseURL(to.String(srlr.NextLink)))
23754}
23755
23756// SecurityRuleListResultPage contains a page of SecurityRule values.
23757type SecurityRuleListResultPage struct {
23758	fn   func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)
23759	srlr SecurityRuleListResult
23760}
23761
23762// NextWithContext advances to the next page of values.  If there was an error making
23763// the request the page does not advance and the error is returned.
23764func (page *SecurityRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
23765	if tracing.IsEnabled() {
23766		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultPage.NextWithContext")
23767		defer func() {
23768			sc := -1
23769			if page.Response().Response.Response != nil {
23770				sc = page.Response().Response.Response.StatusCode
23771			}
23772			tracing.EndSpan(ctx, sc, err)
23773		}()
23774	}
23775	for {
23776		next, err := page.fn(ctx, page.srlr)
23777		if err != nil {
23778			return err
23779		}
23780		page.srlr = next
23781		if !next.hasNextLink() || !next.IsEmpty() {
23782			break
23783		}
23784	}
23785	return nil
23786}
23787
23788// Next advances to the next page of values.  If there was an error making
23789// the request the page does not advance and the error is returned.
23790// Deprecated: Use NextWithContext() instead.
23791func (page *SecurityRuleListResultPage) Next() error {
23792	return page.NextWithContext(context.Background())
23793}
23794
23795// NotDone returns true if the page enumeration should be started or is not yet complete.
23796func (page SecurityRuleListResultPage) NotDone() bool {
23797	return !page.srlr.IsEmpty()
23798}
23799
23800// Response returns the raw server response from the last page request.
23801func (page SecurityRuleListResultPage) Response() SecurityRuleListResult {
23802	return page.srlr
23803}
23804
23805// Values returns the slice of values for the current page or nil if there are no values.
23806func (page SecurityRuleListResultPage) Values() []SecurityRule {
23807	if page.srlr.IsEmpty() {
23808		return nil
23809	}
23810	return *page.srlr.Value
23811}
23812
23813// Creates a new instance of the SecurityRuleListResultPage type.
23814func NewSecurityRuleListResultPage(cur SecurityRuleListResult, getNextPage func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)) SecurityRuleListResultPage {
23815	return SecurityRuleListResultPage{
23816		fn:   getNextPage,
23817		srlr: cur,
23818	}
23819}
23820
23821// SecurityRulePropertiesFormat security rule resource.
23822type SecurityRulePropertiesFormat struct {
23823	// Description - A description for this rule. Restricted to 140 chars.
23824	Description *string `json:"description,omitempty"`
23825	// Protocol - Network protocol this rule applies to. Possible values are 'Tcp', 'Udp', and '*'. Possible values include: 'SecurityRuleProtocolTCP', 'SecurityRuleProtocolUDP', 'SecurityRuleProtocolAsterisk'
23826	Protocol SecurityRuleProtocol `json:"protocol,omitempty"`
23827	// SourcePortRange - The source port or range. Integer or range between 0 and 65535. Asterisks '*' can also be used to match all ports.
23828	SourcePortRange *string `json:"sourcePortRange,omitempty"`
23829	// DestinationPortRange - The destination port or range. Integer or range between 0 and 65535. Asterisks '*' can also be used to match all ports.
23830	DestinationPortRange *string `json:"destinationPortRange,omitempty"`
23831	// SourceAddressPrefix - The CIDR or source IP range. Asterisks '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. If this is an ingress rule, specifies where network traffic originates from.
23832	SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
23833	// SourceAddressPrefixes - The CIDR or source IP ranges.
23834	SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"`
23835	// SourceApplicationSecurityGroups - The application security group specified as source.
23836	SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"`
23837	// DestinationAddressPrefix - The destination address prefix. CIDR or destination IP range. Asterisks '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used.
23838	DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"`
23839	// DestinationAddressPrefixes - The destination address prefixes. CIDR or destination IP ranges.
23840	DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"`
23841	// DestinationApplicationSecurityGroups - The application security group specified as destination.
23842	DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"`
23843	// SourcePortRanges - The source port ranges.
23844	SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"`
23845	// DestinationPortRanges - The destination port ranges.
23846	DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"`
23847	// Access - The network traffic is allowed or denied. Possible values are: 'Allow' and 'Deny'. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
23848	Access SecurityRuleAccess `json:"access,omitempty"`
23849	// 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.
23850	Priority *int32 `json:"priority,omitempty"`
23851	// Direction - The direction of the rule. The direction specifies if rule will be evaluated on incoming or outgoing traffic. Possible values are: 'Inbound' and 'Outbound'. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound'
23852	Direction SecurityRuleDirection `json:"direction,omitempty"`
23853	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
23854	ProvisioningState *string `json:"provisioningState,omitempty"`
23855}
23856
23857// SecurityRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
23858// long-running operation.
23859type SecurityRulesCreateOrUpdateFuture struct {
23860	azure.FutureAPI
23861	// Result returns the result of the asynchronous operation.
23862	// If the operation has not completed it will return an error.
23863	Result func(SecurityRulesClient) (SecurityRule, error)
23864}
23865
23866// UnmarshalJSON is the custom unmarshaller for CreateFuture.
23867func (future *SecurityRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
23868	var azFuture azure.Future
23869	if err := json.Unmarshal(body, &azFuture); err != nil {
23870		return err
23871	}
23872	future.FutureAPI = &azFuture
23873	future.Result = future.result
23874	return nil
23875}
23876
23877// result is the default implementation for SecurityRulesCreateOrUpdateFuture.Result.
23878func (future *SecurityRulesCreateOrUpdateFuture) result(client SecurityRulesClient) (sr SecurityRule, err error) {
23879	var done bool
23880	done, err = future.DoneWithContext(context.Background(), client)
23881	if err != nil {
23882		err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
23883		return
23884	}
23885	if !done {
23886		sr.Response.Response = future.Response()
23887		err = azure.NewAsyncOpIncompleteError("network.SecurityRulesCreateOrUpdateFuture")
23888		return
23889	}
23890	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
23891	if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
23892		sr, err = client.CreateOrUpdateResponder(sr.Response.Response)
23893		if err != nil {
23894			err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", sr.Response.Response, "Failure responding to request")
23895		}
23896	}
23897	return
23898}
23899
23900// SecurityRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
23901// operation.
23902type SecurityRulesDeleteFuture struct {
23903	azure.FutureAPI
23904	// Result returns the result of the asynchronous operation.
23905	// If the operation has not completed it will return an error.
23906	Result func(SecurityRulesClient) (autorest.Response, error)
23907}
23908
23909// UnmarshalJSON is the custom unmarshaller for CreateFuture.
23910func (future *SecurityRulesDeleteFuture) UnmarshalJSON(body []byte) error {
23911	var azFuture azure.Future
23912	if err := json.Unmarshal(body, &azFuture); err != nil {
23913		return err
23914	}
23915	future.FutureAPI = &azFuture
23916	future.Result = future.result
23917	return nil
23918}
23919
23920// result is the default implementation for SecurityRulesDeleteFuture.Result.
23921func (future *SecurityRulesDeleteFuture) result(client SecurityRulesClient) (ar autorest.Response, err error) {
23922	var done bool
23923	done, err = future.DoneWithContext(context.Background(), client)
23924	if err != nil {
23925		err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", future.Response(), "Polling failure")
23926		return
23927	}
23928	if !done {
23929		ar.Response = future.Response()
23930		err = azure.NewAsyncOpIncompleteError("network.SecurityRulesDeleteFuture")
23931		return
23932	}
23933	ar.Response = future.Response()
23934	return
23935}
23936
23937// SecurityRulesEvaluationResult network security rules evaluation result.
23938type SecurityRulesEvaluationResult struct {
23939	// Name - Name of the network security rule.
23940	Name *string `json:"name,omitempty"`
23941	// ProtocolMatched - Value indicating whether protocol is matched.
23942	ProtocolMatched *bool `json:"protocolMatched,omitempty"`
23943	// SourceMatched - Value indicating whether source is matched.
23944	SourceMatched *bool `json:"sourceMatched,omitempty"`
23945	// SourcePortMatched - Value indicating whether source port is matched.
23946	SourcePortMatched *bool `json:"sourcePortMatched,omitempty"`
23947	// DestinationMatched - Value indicating whether destination is matched.
23948	DestinationMatched *bool `json:"destinationMatched,omitempty"`
23949	// DestinationPortMatched - Value indicating whether destination port is matched.
23950	DestinationPortMatched *bool `json:"destinationPortMatched,omitempty"`
23951}
23952
23953// ServiceAssociationLink serviceAssociationLink resource.
23954type ServiceAssociationLink struct {
23955	// ServiceAssociationLinkPropertiesFormat - Resource navigation link properties format.
23956	*ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"`
23957	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
23958	Name *string `json:"name,omitempty"`
23959	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
23960	Etag *string `json:"etag,omitempty"`
23961	// ID - Resource ID.
23962	ID *string `json:"id,omitempty"`
23963}
23964
23965// MarshalJSON is the custom marshaler for ServiceAssociationLink.
23966func (sal ServiceAssociationLink) MarshalJSON() ([]byte, error) {
23967	objectMap := make(map[string]interface{})
23968	if sal.ServiceAssociationLinkPropertiesFormat != nil {
23969		objectMap["properties"] = sal.ServiceAssociationLinkPropertiesFormat
23970	}
23971	if sal.Name != nil {
23972		objectMap["name"] = sal.Name
23973	}
23974	if sal.ID != nil {
23975		objectMap["id"] = sal.ID
23976	}
23977	return json.Marshal(objectMap)
23978}
23979
23980// UnmarshalJSON is the custom unmarshaler for ServiceAssociationLink struct.
23981func (sal *ServiceAssociationLink) UnmarshalJSON(body []byte) error {
23982	var m map[string]*json.RawMessage
23983	err := json.Unmarshal(body, &m)
23984	if err != nil {
23985		return err
23986	}
23987	for k, v := range m {
23988		switch k {
23989		case "properties":
23990			if v != nil {
23991				var serviceAssociationLinkPropertiesFormat ServiceAssociationLinkPropertiesFormat
23992				err = json.Unmarshal(*v, &serviceAssociationLinkPropertiesFormat)
23993				if err != nil {
23994					return err
23995				}
23996				sal.ServiceAssociationLinkPropertiesFormat = &serviceAssociationLinkPropertiesFormat
23997			}
23998		case "name":
23999			if v != nil {
24000				var name string
24001				err = json.Unmarshal(*v, &name)
24002				if err != nil {
24003					return err
24004				}
24005				sal.Name = &name
24006			}
24007		case "etag":
24008			if v != nil {
24009				var etag string
24010				err = json.Unmarshal(*v, &etag)
24011				if err != nil {
24012					return err
24013				}
24014				sal.Etag = &etag
24015			}
24016		case "id":
24017			if v != nil {
24018				var ID string
24019				err = json.Unmarshal(*v, &ID)
24020				if err != nil {
24021					return err
24022				}
24023				sal.ID = &ID
24024			}
24025		}
24026	}
24027
24028	return nil
24029}
24030
24031// ServiceAssociationLinkPropertiesFormat properties of ServiceAssociationLink.
24032type ServiceAssociationLinkPropertiesFormat struct {
24033	// LinkedResourceType - Resource type of the linked resource.
24034	LinkedResourceType *string `json:"linkedResourceType,omitempty"`
24035	// Link - Link to the external resource.
24036	Link *string `json:"link,omitempty"`
24037	// ProvisioningState - READ-ONLY; Provisioning state of the ServiceAssociationLink resource.
24038	ProvisioningState *string `json:"provisioningState,omitempty"`
24039}
24040
24041// MarshalJSON is the custom marshaler for ServiceAssociationLinkPropertiesFormat.
24042func (salpf ServiceAssociationLinkPropertiesFormat) MarshalJSON() ([]byte, error) {
24043	objectMap := make(map[string]interface{})
24044	if salpf.LinkedResourceType != nil {
24045		objectMap["linkedResourceType"] = salpf.LinkedResourceType
24046	}
24047	if salpf.Link != nil {
24048		objectMap["link"] = salpf.Link
24049	}
24050	return json.Marshal(objectMap)
24051}
24052
24053// ServiceDelegationPropertiesFormat properties of a service delegation.
24054type ServiceDelegationPropertiesFormat struct {
24055	// ServiceName - The name of the service to whom the subnet should be delegated (e.g. Microsoft.Sql/servers)
24056	ServiceName *string `json:"serviceName,omitempty"`
24057	// Actions - Describes the actions permitted to the service upon delegation
24058	Actions *[]string `json:"actions,omitempty"`
24059	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
24060	ProvisioningState *string `json:"provisioningState,omitempty"`
24061}
24062
24063// MarshalJSON is the custom marshaler for ServiceDelegationPropertiesFormat.
24064func (sdpf ServiceDelegationPropertiesFormat) MarshalJSON() ([]byte, error) {
24065	objectMap := make(map[string]interface{})
24066	if sdpf.ServiceName != nil {
24067		objectMap["serviceName"] = sdpf.ServiceName
24068	}
24069	if sdpf.Actions != nil {
24070		objectMap["actions"] = sdpf.Actions
24071	}
24072	return json.Marshal(objectMap)
24073}
24074
24075// ServiceEndpointPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
24076// a long-running operation.
24077type ServiceEndpointPoliciesCreateOrUpdateFuture struct {
24078	azure.FutureAPI
24079	// Result returns the result of the asynchronous operation.
24080	// If the operation has not completed it will return an error.
24081	Result func(ServiceEndpointPoliciesClient) (ServiceEndpointPolicy, error)
24082}
24083
24084// UnmarshalJSON is the custom unmarshaller for CreateFuture.
24085func (future *ServiceEndpointPoliciesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
24086	var azFuture azure.Future
24087	if err := json.Unmarshal(body, &azFuture); err != nil {
24088		return err
24089	}
24090	future.FutureAPI = &azFuture
24091	future.Result = future.result
24092	return nil
24093}
24094
24095// result is the default implementation for ServiceEndpointPoliciesCreateOrUpdateFuture.Result.
24096func (future *ServiceEndpointPoliciesCreateOrUpdateFuture) result(client ServiceEndpointPoliciesClient) (sep ServiceEndpointPolicy, err error) {
24097	var done bool
24098	done, err = future.DoneWithContext(context.Background(), client)
24099	if err != nil {
24100		err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
24101		return
24102	}
24103	if !done {
24104		sep.Response.Response = future.Response()
24105		err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPoliciesCreateOrUpdateFuture")
24106		return
24107	}
24108	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
24109	if sep.Response.Response, err = future.GetResult(sender); err == nil && sep.Response.Response.StatusCode != http.StatusNoContent {
24110		sep, err = client.CreateOrUpdateResponder(sep.Response.Response)
24111		if err != nil {
24112			err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesCreateOrUpdateFuture", "Result", sep.Response.Response, "Failure responding to request")
24113		}
24114	}
24115	return
24116}
24117
24118// ServiceEndpointPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a
24119// long-running operation.
24120type ServiceEndpointPoliciesDeleteFuture struct {
24121	azure.FutureAPI
24122	// Result returns the result of the asynchronous operation.
24123	// If the operation has not completed it will return an error.
24124	Result func(ServiceEndpointPoliciesClient) (autorest.Response, error)
24125}
24126
24127// UnmarshalJSON is the custom unmarshaller for CreateFuture.
24128func (future *ServiceEndpointPoliciesDeleteFuture) UnmarshalJSON(body []byte) error {
24129	var azFuture azure.Future
24130	if err := json.Unmarshal(body, &azFuture); err != nil {
24131		return err
24132	}
24133	future.FutureAPI = &azFuture
24134	future.Result = future.result
24135	return nil
24136}
24137
24138// result is the default implementation for ServiceEndpointPoliciesDeleteFuture.Result.
24139func (future *ServiceEndpointPoliciesDeleteFuture) result(client ServiceEndpointPoliciesClient) (ar autorest.Response, err error) {
24140	var done bool
24141	done, err = future.DoneWithContext(context.Background(), client)
24142	if err != nil {
24143		err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesDeleteFuture", "Result", future.Response(), "Polling failure")
24144		return
24145	}
24146	if !done {
24147		ar.Response = future.Response()
24148		err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPoliciesDeleteFuture")
24149		return
24150	}
24151	ar.Response = future.Response()
24152	return
24153}
24154
24155// ServiceEndpointPoliciesUpdateFuture an abstraction for monitoring and retrieving the results of a
24156// long-running operation.
24157type ServiceEndpointPoliciesUpdateFuture struct {
24158	azure.FutureAPI
24159	// Result returns the result of the asynchronous operation.
24160	// If the operation has not completed it will return an error.
24161	Result func(ServiceEndpointPoliciesClient) (ServiceEndpointPolicy, error)
24162}
24163
24164// UnmarshalJSON is the custom unmarshaller for CreateFuture.
24165func (future *ServiceEndpointPoliciesUpdateFuture) UnmarshalJSON(body []byte) error {
24166	var azFuture azure.Future
24167	if err := json.Unmarshal(body, &azFuture); err != nil {
24168		return err
24169	}
24170	future.FutureAPI = &azFuture
24171	future.Result = future.result
24172	return nil
24173}
24174
24175// result is the default implementation for ServiceEndpointPoliciesUpdateFuture.Result.
24176func (future *ServiceEndpointPoliciesUpdateFuture) result(client ServiceEndpointPoliciesClient) (sep ServiceEndpointPolicy, err error) {
24177	var done bool
24178	done, err = future.DoneWithContext(context.Background(), client)
24179	if err != nil {
24180		err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesUpdateFuture", "Result", future.Response(), "Polling failure")
24181		return
24182	}
24183	if !done {
24184		sep.Response.Response = future.Response()
24185		err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPoliciesUpdateFuture")
24186		return
24187	}
24188	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
24189	if sep.Response.Response, err = future.GetResult(sender); err == nil && sep.Response.Response.StatusCode != http.StatusNoContent {
24190		sep, err = client.UpdateResponder(sep.Response.Response)
24191		if err != nil {
24192			err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesUpdateFuture", "Result", sep.Response.Response, "Failure responding to request")
24193		}
24194	}
24195	return
24196}
24197
24198// ServiceEndpointPolicy service End point policy resource.
24199type ServiceEndpointPolicy struct {
24200	autorest.Response `json:"-"`
24201	// ServiceEndpointPolicyPropertiesFormat - Properties of the service end point policy
24202	*ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"`
24203	// Etag - A unique read-only string that changes whenever the resource is updated.
24204	Etag *string `json:"etag,omitempty"`
24205	// ID - Resource ID.
24206	ID *string `json:"id,omitempty"`
24207	// Name - READ-ONLY; Resource name.
24208	Name *string `json:"name,omitempty"`
24209	// Type - READ-ONLY; Resource type.
24210	Type *string `json:"type,omitempty"`
24211	// Location - Resource location.
24212	Location *string `json:"location,omitempty"`
24213	// Tags - Resource tags.
24214	Tags map[string]*string `json:"tags"`
24215}
24216
24217// MarshalJSON is the custom marshaler for ServiceEndpointPolicy.
24218func (sep ServiceEndpointPolicy) MarshalJSON() ([]byte, error) {
24219	objectMap := make(map[string]interface{})
24220	if sep.ServiceEndpointPolicyPropertiesFormat != nil {
24221		objectMap["properties"] = sep.ServiceEndpointPolicyPropertiesFormat
24222	}
24223	if sep.Etag != nil {
24224		objectMap["etag"] = sep.Etag
24225	}
24226	if sep.ID != nil {
24227		objectMap["id"] = sep.ID
24228	}
24229	if sep.Location != nil {
24230		objectMap["location"] = sep.Location
24231	}
24232	if sep.Tags != nil {
24233		objectMap["tags"] = sep.Tags
24234	}
24235	return json.Marshal(objectMap)
24236}
24237
24238// UnmarshalJSON is the custom unmarshaler for ServiceEndpointPolicy struct.
24239func (sep *ServiceEndpointPolicy) UnmarshalJSON(body []byte) error {
24240	var m map[string]*json.RawMessage
24241	err := json.Unmarshal(body, &m)
24242	if err != nil {
24243		return err
24244	}
24245	for k, v := range m {
24246		switch k {
24247		case "properties":
24248			if v != nil {
24249				var serviceEndpointPolicyPropertiesFormat ServiceEndpointPolicyPropertiesFormat
24250				err = json.Unmarshal(*v, &serviceEndpointPolicyPropertiesFormat)
24251				if err != nil {
24252					return err
24253				}
24254				sep.ServiceEndpointPolicyPropertiesFormat = &serviceEndpointPolicyPropertiesFormat
24255			}
24256		case "etag":
24257			if v != nil {
24258				var etag string
24259				err = json.Unmarshal(*v, &etag)
24260				if err != nil {
24261					return err
24262				}
24263				sep.Etag = &etag
24264			}
24265		case "id":
24266			if v != nil {
24267				var ID string
24268				err = json.Unmarshal(*v, &ID)
24269				if err != nil {
24270					return err
24271				}
24272				sep.ID = &ID
24273			}
24274		case "name":
24275			if v != nil {
24276				var name string
24277				err = json.Unmarshal(*v, &name)
24278				if err != nil {
24279					return err
24280				}
24281				sep.Name = &name
24282			}
24283		case "type":
24284			if v != nil {
24285				var typeVar string
24286				err = json.Unmarshal(*v, &typeVar)
24287				if err != nil {
24288					return err
24289				}
24290				sep.Type = &typeVar
24291			}
24292		case "location":
24293			if v != nil {
24294				var location string
24295				err = json.Unmarshal(*v, &location)
24296				if err != nil {
24297					return err
24298				}
24299				sep.Location = &location
24300			}
24301		case "tags":
24302			if v != nil {
24303				var tags map[string]*string
24304				err = json.Unmarshal(*v, &tags)
24305				if err != nil {
24306					return err
24307				}
24308				sep.Tags = tags
24309			}
24310		}
24311	}
24312
24313	return nil
24314}
24315
24316// ServiceEndpointPolicyDefinition service Endpoint policy definitions.
24317type ServiceEndpointPolicyDefinition struct {
24318	autorest.Response `json:"-"`
24319	// ServiceEndpointPolicyDefinitionPropertiesFormat - Properties of the service endpoint policy definition
24320	*ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"`
24321	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
24322	Name *string `json:"name,omitempty"`
24323	// Etag - A unique read-only string that changes whenever the resource is updated.
24324	Etag *string `json:"etag,omitempty"`
24325	// ID - Resource ID.
24326	ID *string `json:"id,omitempty"`
24327}
24328
24329// MarshalJSON is the custom marshaler for ServiceEndpointPolicyDefinition.
24330func (sepd ServiceEndpointPolicyDefinition) MarshalJSON() ([]byte, error) {
24331	objectMap := make(map[string]interface{})
24332	if sepd.ServiceEndpointPolicyDefinitionPropertiesFormat != nil {
24333		objectMap["properties"] = sepd.ServiceEndpointPolicyDefinitionPropertiesFormat
24334	}
24335	if sepd.Name != nil {
24336		objectMap["name"] = sepd.Name
24337	}
24338	if sepd.Etag != nil {
24339		objectMap["etag"] = sepd.Etag
24340	}
24341	if sepd.ID != nil {
24342		objectMap["id"] = sepd.ID
24343	}
24344	return json.Marshal(objectMap)
24345}
24346
24347// UnmarshalJSON is the custom unmarshaler for ServiceEndpointPolicyDefinition struct.
24348func (sepd *ServiceEndpointPolicyDefinition) UnmarshalJSON(body []byte) error {
24349	var m map[string]*json.RawMessage
24350	err := json.Unmarshal(body, &m)
24351	if err != nil {
24352		return err
24353	}
24354	for k, v := range m {
24355		switch k {
24356		case "properties":
24357			if v != nil {
24358				var serviceEndpointPolicyDefinitionPropertiesFormat ServiceEndpointPolicyDefinitionPropertiesFormat
24359				err = json.Unmarshal(*v, &serviceEndpointPolicyDefinitionPropertiesFormat)
24360				if err != nil {
24361					return err
24362				}
24363				sepd.ServiceEndpointPolicyDefinitionPropertiesFormat = &serviceEndpointPolicyDefinitionPropertiesFormat
24364			}
24365		case "name":
24366			if v != nil {
24367				var name string
24368				err = json.Unmarshal(*v, &name)
24369				if err != nil {
24370					return err
24371				}
24372				sepd.Name = &name
24373			}
24374		case "etag":
24375			if v != nil {
24376				var etag string
24377				err = json.Unmarshal(*v, &etag)
24378				if err != nil {
24379					return err
24380				}
24381				sepd.Etag = &etag
24382			}
24383		case "id":
24384			if v != nil {
24385				var ID string
24386				err = json.Unmarshal(*v, &ID)
24387				if err != nil {
24388					return err
24389				}
24390				sepd.ID = &ID
24391			}
24392		}
24393	}
24394
24395	return nil
24396}
24397
24398// ServiceEndpointPolicyDefinitionListResult response for ListServiceEndpointPolicyDefinition API service
24399// call. Retrieves all service endpoint policy definition that belongs to a service endpoint policy.
24400type ServiceEndpointPolicyDefinitionListResult struct {
24401	autorest.Response `json:"-"`
24402	// Value - The service endpoint policy definition in a service endpoint policy.
24403	Value *[]ServiceEndpointPolicyDefinition `json:"value,omitempty"`
24404	// NextLink - The URL to get the next set of results.
24405	NextLink *string `json:"nextLink,omitempty"`
24406}
24407
24408// ServiceEndpointPolicyDefinitionListResultIterator provides access to a complete listing of
24409// ServiceEndpointPolicyDefinition values.
24410type ServiceEndpointPolicyDefinitionListResultIterator struct {
24411	i    int
24412	page ServiceEndpointPolicyDefinitionListResultPage
24413}
24414
24415// NextWithContext advances to the next value.  If there was an error making
24416// the request the iterator does not advance and the error is returned.
24417func (iter *ServiceEndpointPolicyDefinitionListResultIterator) NextWithContext(ctx context.Context) (err error) {
24418	if tracing.IsEnabled() {
24419		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyDefinitionListResultIterator.NextWithContext")
24420		defer func() {
24421			sc := -1
24422			if iter.Response().Response.Response != nil {
24423				sc = iter.Response().Response.Response.StatusCode
24424			}
24425			tracing.EndSpan(ctx, sc, err)
24426		}()
24427	}
24428	iter.i++
24429	if iter.i < len(iter.page.Values()) {
24430		return nil
24431	}
24432	err = iter.page.NextWithContext(ctx)
24433	if err != nil {
24434		iter.i--
24435		return err
24436	}
24437	iter.i = 0
24438	return nil
24439}
24440
24441// Next advances to the next value.  If there was an error making
24442// the request the iterator does not advance and the error is returned.
24443// Deprecated: Use NextWithContext() instead.
24444func (iter *ServiceEndpointPolicyDefinitionListResultIterator) Next() error {
24445	return iter.NextWithContext(context.Background())
24446}
24447
24448// NotDone returns true if the enumeration should be started or is not yet complete.
24449func (iter ServiceEndpointPolicyDefinitionListResultIterator) NotDone() bool {
24450	return iter.page.NotDone() && iter.i < len(iter.page.Values())
24451}
24452
24453// Response returns the raw server response from the last page request.
24454func (iter ServiceEndpointPolicyDefinitionListResultIterator) Response() ServiceEndpointPolicyDefinitionListResult {
24455	return iter.page.Response()
24456}
24457
24458// Value returns the current value or a zero-initialized value if the
24459// iterator has advanced beyond the end of the collection.
24460func (iter ServiceEndpointPolicyDefinitionListResultIterator) Value() ServiceEndpointPolicyDefinition {
24461	if !iter.page.NotDone() {
24462		return ServiceEndpointPolicyDefinition{}
24463	}
24464	return iter.page.Values()[iter.i]
24465}
24466
24467// Creates a new instance of the ServiceEndpointPolicyDefinitionListResultIterator type.
24468func NewServiceEndpointPolicyDefinitionListResultIterator(page ServiceEndpointPolicyDefinitionListResultPage) ServiceEndpointPolicyDefinitionListResultIterator {
24469	return ServiceEndpointPolicyDefinitionListResultIterator{page: page}
24470}
24471
24472// IsEmpty returns true if the ListResult contains no values.
24473func (sepdlr ServiceEndpointPolicyDefinitionListResult) IsEmpty() bool {
24474	return sepdlr.Value == nil || len(*sepdlr.Value) == 0
24475}
24476
24477// hasNextLink returns true if the NextLink is not empty.
24478func (sepdlr ServiceEndpointPolicyDefinitionListResult) hasNextLink() bool {
24479	return sepdlr.NextLink != nil && len(*sepdlr.NextLink) != 0
24480}
24481
24482// serviceEndpointPolicyDefinitionListResultPreparer prepares a request to retrieve the next set of results.
24483// It returns nil if no more results exist.
24484func (sepdlr ServiceEndpointPolicyDefinitionListResult) serviceEndpointPolicyDefinitionListResultPreparer(ctx context.Context) (*http.Request, error) {
24485	if !sepdlr.hasNextLink() {
24486		return nil, nil
24487	}
24488	return autorest.Prepare((&http.Request{}).WithContext(ctx),
24489		autorest.AsJSON(),
24490		autorest.AsGet(),
24491		autorest.WithBaseURL(to.String(sepdlr.NextLink)))
24492}
24493
24494// ServiceEndpointPolicyDefinitionListResultPage contains a page of ServiceEndpointPolicyDefinition values.
24495type ServiceEndpointPolicyDefinitionListResultPage struct {
24496	fn     func(context.Context, ServiceEndpointPolicyDefinitionListResult) (ServiceEndpointPolicyDefinitionListResult, error)
24497	sepdlr ServiceEndpointPolicyDefinitionListResult
24498}
24499
24500// NextWithContext advances to the next page of values.  If there was an error making
24501// the request the page does not advance and the error is returned.
24502func (page *ServiceEndpointPolicyDefinitionListResultPage) NextWithContext(ctx context.Context) (err error) {
24503	if tracing.IsEnabled() {
24504		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyDefinitionListResultPage.NextWithContext")
24505		defer func() {
24506			sc := -1
24507			if page.Response().Response.Response != nil {
24508				sc = page.Response().Response.Response.StatusCode
24509			}
24510			tracing.EndSpan(ctx, sc, err)
24511		}()
24512	}
24513	for {
24514		next, err := page.fn(ctx, page.sepdlr)
24515		if err != nil {
24516			return err
24517		}
24518		page.sepdlr = next
24519		if !next.hasNextLink() || !next.IsEmpty() {
24520			break
24521		}
24522	}
24523	return nil
24524}
24525
24526// Next advances to the next page of values.  If there was an error making
24527// the request the page does not advance and the error is returned.
24528// Deprecated: Use NextWithContext() instead.
24529func (page *ServiceEndpointPolicyDefinitionListResultPage) Next() error {
24530	return page.NextWithContext(context.Background())
24531}
24532
24533// NotDone returns true if the page enumeration should be started or is not yet complete.
24534func (page ServiceEndpointPolicyDefinitionListResultPage) NotDone() bool {
24535	return !page.sepdlr.IsEmpty()
24536}
24537
24538// Response returns the raw server response from the last page request.
24539func (page ServiceEndpointPolicyDefinitionListResultPage) Response() ServiceEndpointPolicyDefinitionListResult {
24540	return page.sepdlr
24541}
24542
24543// Values returns the slice of values for the current page or nil if there are no values.
24544func (page ServiceEndpointPolicyDefinitionListResultPage) Values() []ServiceEndpointPolicyDefinition {
24545	if page.sepdlr.IsEmpty() {
24546		return nil
24547	}
24548	return *page.sepdlr.Value
24549}
24550
24551// Creates a new instance of the ServiceEndpointPolicyDefinitionListResultPage type.
24552func NewServiceEndpointPolicyDefinitionListResultPage(cur ServiceEndpointPolicyDefinitionListResult, getNextPage func(context.Context, ServiceEndpointPolicyDefinitionListResult) (ServiceEndpointPolicyDefinitionListResult, error)) ServiceEndpointPolicyDefinitionListResultPage {
24553	return ServiceEndpointPolicyDefinitionListResultPage{
24554		fn:     getNextPage,
24555		sepdlr: cur,
24556	}
24557}
24558
24559// ServiceEndpointPolicyDefinitionPropertiesFormat service Endpoint policy definition resource.
24560type ServiceEndpointPolicyDefinitionPropertiesFormat struct {
24561	// Description - A description for this rule. Restricted to 140 chars.
24562	Description *string `json:"description,omitempty"`
24563	// Service - service endpoint name.
24564	Service *string `json:"service,omitempty"`
24565	// ServiceResources - A list of service resources.
24566	ServiceResources *[]string `json:"serviceResources,omitempty"`
24567	// ProvisioningState - READ-ONLY; The provisioning state of the service end point policy definition. Possible values are: 'Updating', 'Deleting', and 'Failed'.
24568	ProvisioningState *string `json:"provisioningState,omitempty"`
24569}
24570
24571// MarshalJSON is the custom marshaler for ServiceEndpointPolicyDefinitionPropertiesFormat.
24572func (sepdpf ServiceEndpointPolicyDefinitionPropertiesFormat) MarshalJSON() ([]byte, error) {
24573	objectMap := make(map[string]interface{})
24574	if sepdpf.Description != nil {
24575		objectMap["description"] = sepdpf.Description
24576	}
24577	if sepdpf.Service != nil {
24578		objectMap["service"] = sepdpf.Service
24579	}
24580	if sepdpf.ServiceResources != nil {
24581		objectMap["serviceResources"] = sepdpf.ServiceResources
24582	}
24583	return json.Marshal(objectMap)
24584}
24585
24586// ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
24587// results of a long-running operation.
24588type ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture struct {
24589	azure.FutureAPI
24590	// Result returns the result of the asynchronous operation.
24591	// If the operation has not completed it will return an error.
24592	Result func(ServiceEndpointPolicyDefinitionsClient) (ServiceEndpointPolicyDefinition, error)
24593}
24594
24595// UnmarshalJSON is the custom unmarshaller for CreateFuture.
24596func (future *ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
24597	var azFuture azure.Future
24598	if err := json.Unmarshal(body, &azFuture); err != nil {
24599		return err
24600	}
24601	future.FutureAPI = &azFuture
24602	future.Result = future.result
24603	return nil
24604}
24605
24606// result is the default implementation for ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture.Result.
24607func (future *ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture) result(client ServiceEndpointPolicyDefinitionsClient) (sepd ServiceEndpointPolicyDefinition, err error) {
24608	var done bool
24609	done, err = future.DoneWithContext(context.Background(), client)
24610	if err != nil {
24611		err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
24612		return
24613	}
24614	if !done {
24615		sepd.Response.Response = future.Response()
24616		err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture")
24617		return
24618	}
24619	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
24620	if sepd.Response.Response, err = future.GetResult(sender); err == nil && sepd.Response.Response.StatusCode != http.StatusNoContent {
24621		sepd, err = client.CreateOrUpdateResponder(sepd.Response.Response)
24622		if err != nil {
24623			err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture", "Result", sepd.Response.Response, "Failure responding to request")
24624		}
24625	}
24626	return
24627}
24628
24629// ServiceEndpointPolicyDefinitionsDeleteFuture an abstraction for monitoring and retrieving the results of
24630// a long-running operation.
24631type ServiceEndpointPolicyDefinitionsDeleteFuture struct {
24632	azure.FutureAPI
24633	// Result returns the result of the asynchronous operation.
24634	// If the operation has not completed it will return an error.
24635	Result func(ServiceEndpointPolicyDefinitionsClient) (autorest.Response, error)
24636}
24637
24638// UnmarshalJSON is the custom unmarshaller for CreateFuture.
24639func (future *ServiceEndpointPolicyDefinitionsDeleteFuture) UnmarshalJSON(body []byte) error {
24640	var azFuture azure.Future
24641	if err := json.Unmarshal(body, &azFuture); err != nil {
24642		return err
24643	}
24644	future.FutureAPI = &azFuture
24645	future.Result = future.result
24646	return nil
24647}
24648
24649// result is the default implementation for ServiceEndpointPolicyDefinitionsDeleteFuture.Result.
24650func (future *ServiceEndpointPolicyDefinitionsDeleteFuture) result(client ServiceEndpointPolicyDefinitionsClient) (ar autorest.Response, err error) {
24651	var done bool
24652	done, err = future.DoneWithContext(context.Background(), client)
24653	if err != nil {
24654		err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsDeleteFuture", "Result", future.Response(), "Polling failure")
24655		return
24656	}
24657	if !done {
24658		ar.Response = future.Response()
24659		err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPolicyDefinitionsDeleteFuture")
24660		return
24661	}
24662	ar.Response = future.Response()
24663	return
24664}
24665
24666// ServiceEndpointPolicyListResult response for ListServiceEndpointPolicies API service call.
24667type ServiceEndpointPolicyListResult struct {
24668	autorest.Response `json:"-"`
24669	// Value - A list of ServiceEndpointPolicy resources.
24670	Value *[]ServiceEndpointPolicy `json:"value,omitempty"`
24671	// NextLink - READ-ONLY; The URL to get the next set of results.
24672	NextLink *string `json:"nextLink,omitempty"`
24673}
24674
24675// MarshalJSON is the custom marshaler for ServiceEndpointPolicyListResult.
24676func (seplr ServiceEndpointPolicyListResult) MarshalJSON() ([]byte, error) {
24677	objectMap := make(map[string]interface{})
24678	if seplr.Value != nil {
24679		objectMap["value"] = seplr.Value
24680	}
24681	return json.Marshal(objectMap)
24682}
24683
24684// ServiceEndpointPolicyListResultIterator provides access to a complete listing of ServiceEndpointPolicy
24685// values.
24686type ServiceEndpointPolicyListResultIterator struct {
24687	i    int
24688	page ServiceEndpointPolicyListResultPage
24689}
24690
24691// NextWithContext advances to the next value.  If there was an error making
24692// the request the iterator does not advance and the error is returned.
24693func (iter *ServiceEndpointPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) {
24694	if tracing.IsEnabled() {
24695		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyListResultIterator.NextWithContext")
24696		defer func() {
24697			sc := -1
24698			if iter.Response().Response.Response != nil {
24699				sc = iter.Response().Response.Response.StatusCode
24700			}
24701			tracing.EndSpan(ctx, sc, err)
24702		}()
24703	}
24704	iter.i++
24705	if iter.i < len(iter.page.Values()) {
24706		return nil
24707	}
24708	err = iter.page.NextWithContext(ctx)
24709	if err != nil {
24710		iter.i--
24711		return err
24712	}
24713	iter.i = 0
24714	return nil
24715}
24716
24717// Next advances to the next value.  If there was an error making
24718// the request the iterator does not advance and the error is returned.
24719// Deprecated: Use NextWithContext() instead.
24720func (iter *ServiceEndpointPolicyListResultIterator) Next() error {
24721	return iter.NextWithContext(context.Background())
24722}
24723
24724// NotDone returns true if the enumeration should be started or is not yet complete.
24725func (iter ServiceEndpointPolicyListResultIterator) NotDone() bool {
24726	return iter.page.NotDone() && iter.i < len(iter.page.Values())
24727}
24728
24729// Response returns the raw server response from the last page request.
24730func (iter ServiceEndpointPolicyListResultIterator) Response() ServiceEndpointPolicyListResult {
24731	return iter.page.Response()
24732}
24733
24734// Value returns the current value or a zero-initialized value if the
24735// iterator has advanced beyond the end of the collection.
24736func (iter ServiceEndpointPolicyListResultIterator) Value() ServiceEndpointPolicy {
24737	if !iter.page.NotDone() {
24738		return ServiceEndpointPolicy{}
24739	}
24740	return iter.page.Values()[iter.i]
24741}
24742
24743// Creates a new instance of the ServiceEndpointPolicyListResultIterator type.
24744func NewServiceEndpointPolicyListResultIterator(page ServiceEndpointPolicyListResultPage) ServiceEndpointPolicyListResultIterator {
24745	return ServiceEndpointPolicyListResultIterator{page: page}
24746}
24747
24748// IsEmpty returns true if the ListResult contains no values.
24749func (seplr ServiceEndpointPolicyListResult) IsEmpty() bool {
24750	return seplr.Value == nil || len(*seplr.Value) == 0
24751}
24752
24753// hasNextLink returns true if the NextLink is not empty.
24754func (seplr ServiceEndpointPolicyListResult) hasNextLink() bool {
24755	return seplr.NextLink != nil && len(*seplr.NextLink) != 0
24756}
24757
24758// serviceEndpointPolicyListResultPreparer prepares a request to retrieve the next set of results.
24759// It returns nil if no more results exist.
24760func (seplr ServiceEndpointPolicyListResult) serviceEndpointPolicyListResultPreparer(ctx context.Context) (*http.Request, error) {
24761	if !seplr.hasNextLink() {
24762		return nil, nil
24763	}
24764	return autorest.Prepare((&http.Request{}).WithContext(ctx),
24765		autorest.AsJSON(),
24766		autorest.AsGet(),
24767		autorest.WithBaseURL(to.String(seplr.NextLink)))
24768}
24769
24770// ServiceEndpointPolicyListResultPage contains a page of ServiceEndpointPolicy values.
24771type ServiceEndpointPolicyListResultPage struct {
24772	fn    func(context.Context, ServiceEndpointPolicyListResult) (ServiceEndpointPolicyListResult, error)
24773	seplr ServiceEndpointPolicyListResult
24774}
24775
24776// NextWithContext advances to the next page of values.  If there was an error making
24777// the request the page does not advance and the error is returned.
24778func (page *ServiceEndpointPolicyListResultPage) NextWithContext(ctx context.Context) (err error) {
24779	if tracing.IsEnabled() {
24780		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyListResultPage.NextWithContext")
24781		defer func() {
24782			sc := -1
24783			if page.Response().Response.Response != nil {
24784				sc = page.Response().Response.Response.StatusCode
24785			}
24786			tracing.EndSpan(ctx, sc, err)
24787		}()
24788	}
24789	for {
24790		next, err := page.fn(ctx, page.seplr)
24791		if err != nil {
24792			return err
24793		}
24794		page.seplr = next
24795		if !next.hasNextLink() || !next.IsEmpty() {
24796			break
24797		}
24798	}
24799	return nil
24800}
24801
24802// Next advances to the next page of values.  If there was an error making
24803// the request the page does not advance and the error is returned.
24804// Deprecated: Use NextWithContext() instead.
24805func (page *ServiceEndpointPolicyListResultPage) Next() error {
24806	return page.NextWithContext(context.Background())
24807}
24808
24809// NotDone returns true if the page enumeration should be started or is not yet complete.
24810func (page ServiceEndpointPolicyListResultPage) NotDone() bool {
24811	return !page.seplr.IsEmpty()
24812}
24813
24814// Response returns the raw server response from the last page request.
24815func (page ServiceEndpointPolicyListResultPage) Response() ServiceEndpointPolicyListResult {
24816	return page.seplr
24817}
24818
24819// Values returns the slice of values for the current page or nil if there are no values.
24820func (page ServiceEndpointPolicyListResultPage) Values() []ServiceEndpointPolicy {
24821	if page.seplr.IsEmpty() {
24822		return nil
24823	}
24824	return *page.seplr.Value
24825}
24826
24827// Creates a new instance of the ServiceEndpointPolicyListResultPage type.
24828func NewServiceEndpointPolicyListResultPage(cur ServiceEndpointPolicyListResult, getNextPage func(context.Context, ServiceEndpointPolicyListResult) (ServiceEndpointPolicyListResult, error)) ServiceEndpointPolicyListResultPage {
24829	return ServiceEndpointPolicyListResultPage{
24830		fn:    getNextPage,
24831		seplr: cur,
24832	}
24833}
24834
24835// ServiceEndpointPolicyPropertiesFormat service Endpoint Policy resource.
24836type ServiceEndpointPolicyPropertiesFormat struct {
24837	// ServiceEndpointPolicyDefinitions - A collection of service endpoint policy definitions of the service endpoint policy.
24838	ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"`
24839	// Subnets - READ-ONLY; A collection of references to subnets.
24840	Subnets *[]Subnet `json:"subnets,omitempty"`
24841	// ResourceGUID - READ-ONLY; The resource GUID property of the service endpoint policy resource.
24842	ResourceGUID *string `json:"resourceGuid,omitempty"`
24843	// ProvisioningState - READ-ONLY; The provisioning state of the service endpoint policy. Possible values are: 'Updating', 'Deleting', and 'Failed'.
24844	ProvisioningState *string `json:"provisioningState,omitempty"`
24845}
24846
24847// MarshalJSON is the custom marshaler for ServiceEndpointPolicyPropertiesFormat.
24848func (seppf ServiceEndpointPolicyPropertiesFormat) MarshalJSON() ([]byte, error) {
24849	objectMap := make(map[string]interface{})
24850	if seppf.ServiceEndpointPolicyDefinitions != nil {
24851		objectMap["serviceEndpointPolicyDefinitions"] = seppf.ServiceEndpointPolicyDefinitions
24852	}
24853	return json.Marshal(objectMap)
24854}
24855
24856// ServiceEndpointPropertiesFormat the service endpoint properties.
24857type ServiceEndpointPropertiesFormat struct {
24858	// Service - The type of the endpoint service.
24859	Service *string `json:"service,omitempty"`
24860	// Locations - A list of locations.
24861	Locations *[]string `json:"locations,omitempty"`
24862	// ProvisioningState - The provisioning state of the resource.
24863	ProvisioningState *string `json:"provisioningState,omitempty"`
24864}
24865
24866// String ...
24867type String struct {
24868	autorest.Response `json:"-"`
24869	Value             *string `json:"value,omitempty"`
24870}
24871
24872// Subnet subnet in a virtual network resource.
24873type Subnet struct {
24874	autorest.Response `json:"-"`
24875	// SubnetPropertiesFormat - Properties of the subnet.
24876	*SubnetPropertiesFormat `json:"properties,omitempty"`
24877	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
24878	Name *string `json:"name,omitempty"`
24879	// Etag - A unique read-only string that changes whenever the resource is updated.
24880	Etag *string `json:"etag,omitempty"`
24881	// ID - Resource ID.
24882	ID *string `json:"id,omitempty"`
24883}
24884
24885// MarshalJSON is the custom marshaler for Subnet.
24886func (s Subnet) MarshalJSON() ([]byte, error) {
24887	objectMap := make(map[string]interface{})
24888	if s.SubnetPropertiesFormat != nil {
24889		objectMap["properties"] = s.SubnetPropertiesFormat
24890	}
24891	if s.Name != nil {
24892		objectMap["name"] = s.Name
24893	}
24894	if s.Etag != nil {
24895		objectMap["etag"] = s.Etag
24896	}
24897	if s.ID != nil {
24898		objectMap["id"] = s.ID
24899	}
24900	return json.Marshal(objectMap)
24901}
24902
24903// UnmarshalJSON is the custom unmarshaler for Subnet struct.
24904func (s *Subnet) UnmarshalJSON(body []byte) error {
24905	var m map[string]*json.RawMessage
24906	err := json.Unmarshal(body, &m)
24907	if err != nil {
24908		return err
24909	}
24910	for k, v := range m {
24911		switch k {
24912		case "properties":
24913			if v != nil {
24914				var subnetPropertiesFormat SubnetPropertiesFormat
24915				err = json.Unmarshal(*v, &subnetPropertiesFormat)
24916				if err != nil {
24917					return err
24918				}
24919				s.SubnetPropertiesFormat = &subnetPropertiesFormat
24920			}
24921		case "name":
24922			if v != nil {
24923				var name string
24924				err = json.Unmarshal(*v, &name)
24925				if err != nil {
24926					return err
24927				}
24928				s.Name = &name
24929			}
24930		case "etag":
24931			if v != nil {
24932				var etag string
24933				err = json.Unmarshal(*v, &etag)
24934				if err != nil {
24935					return err
24936				}
24937				s.Etag = &etag
24938			}
24939		case "id":
24940			if v != nil {
24941				var ID string
24942				err = json.Unmarshal(*v, &ID)
24943				if err != nil {
24944					return err
24945				}
24946				s.ID = &ID
24947			}
24948		}
24949	}
24950
24951	return nil
24952}
24953
24954// SubnetAssociation network interface and its custom security rules.
24955type SubnetAssociation struct {
24956	// ID - READ-ONLY; Subnet ID.
24957	ID *string `json:"id,omitempty"`
24958	// SecurityRules - Collection of custom security rules.
24959	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
24960}
24961
24962// MarshalJSON is the custom marshaler for SubnetAssociation.
24963func (sa SubnetAssociation) MarshalJSON() ([]byte, error) {
24964	objectMap := make(map[string]interface{})
24965	if sa.SecurityRules != nil {
24966		objectMap["securityRules"] = sa.SecurityRules
24967	}
24968	return json.Marshal(objectMap)
24969}
24970
24971// SubnetListResult response for ListSubnets API service callRetrieves all subnet that belongs to a virtual
24972// network
24973type SubnetListResult struct {
24974	autorest.Response `json:"-"`
24975	// Value - The subnets in a virtual network.
24976	Value *[]Subnet `json:"value,omitempty"`
24977	// NextLink - The URL to get the next set of results.
24978	NextLink *string `json:"nextLink,omitempty"`
24979}
24980
24981// SubnetListResultIterator provides access to a complete listing of Subnet values.
24982type SubnetListResultIterator struct {
24983	i    int
24984	page SubnetListResultPage
24985}
24986
24987// NextWithContext advances to the next value.  If there was an error making
24988// the request the iterator does not advance and the error is returned.
24989func (iter *SubnetListResultIterator) NextWithContext(ctx context.Context) (err error) {
24990	if tracing.IsEnabled() {
24991		ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultIterator.NextWithContext")
24992		defer func() {
24993			sc := -1
24994			if iter.Response().Response.Response != nil {
24995				sc = iter.Response().Response.Response.StatusCode
24996			}
24997			tracing.EndSpan(ctx, sc, err)
24998		}()
24999	}
25000	iter.i++
25001	if iter.i < len(iter.page.Values()) {
25002		return nil
25003	}
25004	err = iter.page.NextWithContext(ctx)
25005	if err != nil {
25006		iter.i--
25007		return err
25008	}
25009	iter.i = 0
25010	return nil
25011}
25012
25013// Next advances to the next value.  If there was an error making
25014// the request the iterator does not advance and the error is returned.
25015// Deprecated: Use NextWithContext() instead.
25016func (iter *SubnetListResultIterator) Next() error {
25017	return iter.NextWithContext(context.Background())
25018}
25019
25020// NotDone returns true if the enumeration should be started or is not yet complete.
25021func (iter SubnetListResultIterator) NotDone() bool {
25022	return iter.page.NotDone() && iter.i < len(iter.page.Values())
25023}
25024
25025// Response returns the raw server response from the last page request.
25026func (iter SubnetListResultIterator) Response() SubnetListResult {
25027	return iter.page.Response()
25028}
25029
25030// Value returns the current value or a zero-initialized value if the
25031// iterator has advanced beyond the end of the collection.
25032func (iter SubnetListResultIterator) Value() Subnet {
25033	if !iter.page.NotDone() {
25034		return Subnet{}
25035	}
25036	return iter.page.Values()[iter.i]
25037}
25038
25039// Creates a new instance of the SubnetListResultIterator type.
25040func NewSubnetListResultIterator(page SubnetListResultPage) SubnetListResultIterator {
25041	return SubnetListResultIterator{page: page}
25042}
25043
25044// IsEmpty returns true if the ListResult contains no values.
25045func (slr SubnetListResult) IsEmpty() bool {
25046	return slr.Value == nil || len(*slr.Value) == 0
25047}
25048
25049// hasNextLink returns true if the NextLink is not empty.
25050func (slr SubnetListResult) hasNextLink() bool {
25051	return slr.NextLink != nil && len(*slr.NextLink) != 0
25052}
25053
25054// subnetListResultPreparer prepares a request to retrieve the next set of results.
25055// It returns nil if no more results exist.
25056func (slr SubnetListResult) subnetListResultPreparer(ctx context.Context) (*http.Request, error) {
25057	if !slr.hasNextLink() {
25058		return nil, nil
25059	}
25060	return autorest.Prepare((&http.Request{}).WithContext(ctx),
25061		autorest.AsJSON(),
25062		autorest.AsGet(),
25063		autorest.WithBaseURL(to.String(slr.NextLink)))
25064}
25065
25066// SubnetListResultPage contains a page of Subnet values.
25067type SubnetListResultPage struct {
25068	fn  func(context.Context, SubnetListResult) (SubnetListResult, error)
25069	slr SubnetListResult
25070}
25071
25072// NextWithContext advances to the next page of values.  If there was an error making
25073// the request the page does not advance and the error is returned.
25074func (page *SubnetListResultPage) NextWithContext(ctx context.Context) (err error) {
25075	if tracing.IsEnabled() {
25076		ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultPage.NextWithContext")
25077		defer func() {
25078			sc := -1
25079			if page.Response().Response.Response != nil {
25080				sc = page.Response().Response.Response.StatusCode
25081			}
25082			tracing.EndSpan(ctx, sc, err)
25083		}()
25084	}
25085	for {
25086		next, err := page.fn(ctx, page.slr)
25087		if err != nil {
25088			return err
25089		}
25090		page.slr = next
25091		if !next.hasNextLink() || !next.IsEmpty() {
25092			break
25093		}
25094	}
25095	return nil
25096}
25097
25098// Next advances to the next page of values.  If there was an error making
25099// the request the page does not advance and the error is returned.
25100// Deprecated: Use NextWithContext() instead.
25101func (page *SubnetListResultPage) Next() error {
25102	return page.NextWithContext(context.Background())
25103}
25104
25105// NotDone returns true if the page enumeration should be started or is not yet complete.
25106func (page SubnetListResultPage) NotDone() bool {
25107	return !page.slr.IsEmpty()
25108}
25109
25110// Response returns the raw server response from the last page request.
25111func (page SubnetListResultPage) Response() SubnetListResult {
25112	return page.slr
25113}
25114
25115// Values returns the slice of values for the current page or nil if there are no values.
25116func (page SubnetListResultPage) Values() []Subnet {
25117	if page.slr.IsEmpty() {
25118		return nil
25119	}
25120	return *page.slr.Value
25121}
25122
25123// Creates a new instance of the SubnetListResultPage type.
25124func NewSubnetListResultPage(cur SubnetListResult, getNextPage func(context.Context, SubnetListResult) (SubnetListResult, error)) SubnetListResultPage {
25125	return SubnetListResultPage{
25126		fn:  getNextPage,
25127		slr: cur,
25128	}
25129}
25130
25131// SubnetPropertiesFormat properties of the subnet.
25132type SubnetPropertiesFormat struct {
25133	// AddressPrefix - The address prefix for the subnet.
25134	AddressPrefix *string `json:"addressPrefix,omitempty"`
25135	// AddressPrefixes - List of  address prefixes for the subnet.
25136	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
25137	// NetworkSecurityGroup - The reference of the NetworkSecurityGroup resource.
25138	NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"`
25139	// RouteTable - The reference of the RouteTable resource.
25140	RouteTable *RouteTable `json:"routeTable,omitempty"`
25141	// ServiceEndpoints - An array of service endpoints.
25142	ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"`
25143	// ServiceEndpointPolicies - An array of service endpoint policies.
25144	ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"`
25145	// InterfaceEndpoints - READ-ONLY; An array of references to interface endpoints
25146	InterfaceEndpoints *[]InterfaceEndpoint `json:"interfaceEndpoints,omitempty"`
25147	// IPConfigurations - READ-ONLY; Gets an array of references to the network interface IP configurations using subnet.
25148	IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"`
25149	// IPConfigurationProfiles - READ-ONLY; Array of IP configuration profiles which reference this subnet.
25150	IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"`
25151	// ResourceNavigationLinks - Gets an array of references to the external resources using subnet.
25152	ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"`
25153	// ServiceAssociationLinks - Gets an array of references to services injecting into this subnet.
25154	ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"`
25155	// Delegations - Gets an array of references to the delegations on the subnet.
25156	Delegations *[]Delegation `json:"delegations,omitempty"`
25157	// Purpose - READ-ONLY; A read-only string identifying the intention of use for this subnet based on delegations and other user-defined properties.
25158	Purpose *string `json:"purpose,omitempty"`
25159	// ProvisioningState - The provisioning state of the resource.
25160	ProvisioningState *string `json:"provisioningState,omitempty"`
25161}
25162
25163// MarshalJSON is the custom marshaler for SubnetPropertiesFormat.
25164func (spf SubnetPropertiesFormat) MarshalJSON() ([]byte, error) {
25165	objectMap := make(map[string]interface{})
25166	if spf.AddressPrefix != nil {
25167		objectMap["addressPrefix"] = spf.AddressPrefix
25168	}
25169	if spf.AddressPrefixes != nil {
25170		objectMap["addressPrefixes"] = spf.AddressPrefixes
25171	}
25172	if spf.NetworkSecurityGroup != nil {
25173		objectMap["networkSecurityGroup"] = spf.NetworkSecurityGroup
25174	}
25175	if spf.RouteTable != nil {
25176		objectMap["routeTable"] = spf.RouteTable
25177	}
25178	if spf.ServiceEndpoints != nil {
25179		objectMap["serviceEndpoints"] = spf.ServiceEndpoints
25180	}
25181	if spf.ServiceEndpointPolicies != nil {
25182		objectMap["serviceEndpointPolicies"] = spf.ServiceEndpointPolicies
25183	}
25184	if spf.ResourceNavigationLinks != nil {
25185		objectMap["resourceNavigationLinks"] = spf.ResourceNavigationLinks
25186	}
25187	if spf.ServiceAssociationLinks != nil {
25188		objectMap["serviceAssociationLinks"] = spf.ServiceAssociationLinks
25189	}
25190	if spf.Delegations != nil {
25191		objectMap["delegations"] = spf.Delegations
25192	}
25193	if spf.ProvisioningState != nil {
25194		objectMap["provisioningState"] = spf.ProvisioningState
25195	}
25196	return json.Marshal(objectMap)
25197}
25198
25199// SubnetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
25200// operation.
25201type SubnetsCreateOrUpdateFuture struct {
25202	azure.FutureAPI
25203	// Result returns the result of the asynchronous operation.
25204	// If the operation has not completed it will return an error.
25205	Result func(SubnetsClient) (Subnet, error)
25206}
25207
25208// UnmarshalJSON is the custom unmarshaller for CreateFuture.
25209func (future *SubnetsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
25210	var azFuture azure.Future
25211	if err := json.Unmarshal(body, &azFuture); err != nil {
25212		return err
25213	}
25214	future.FutureAPI = &azFuture
25215	future.Result = future.result
25216	return nil
25217}
25218
25219// result is the default implementation for SubnetsCreateOrUpdateFuture.Result.
25220func (future *SubnetsCreateOrUpdateFuture) result(client SubnetsClient) (s Subnet, err error) {
25221	var done bool
25222	done, err = future.DoneWithContext(context.Background(), client)
25223	if err != nil {
25224		err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
25225		return
25226	}
25227	if !done {
25228		s.Response.Response = future.Response()
25229		err = azure.NewAsyncOpIncompleteError("network.SubnetsCreateOrUpdateFuture")
25230		return
25231	}
25232	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
25233	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
25234		s, err = client.CreateOrUpdateResponder(s.Response.Response)
25235		if err != nil {
25236			err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
25237		}
25238	}
25239	return
25240}
25241
25242// SubnetsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
25243// operation.
25244type SubnetsDeleteFuture struct {
25245	azure.FutureAPI
25246	// Result returns the result of the asynchronous operation.
25247	// If the operation has not completed it will return an error.
25248	Result func(SubnetsClient) (autorest.Response, error)
25249}
25250
25251// UnmarshalJSON is the custom unmarshaller for CreateFuture.
25252func (future *SubnetsDeleteFuture) UnmarshalJSON(body []byte) error {
25253	var azFuture azure.Future
25254	if err := json.Unmarshal(body, &azFuture); err != nil {
25255		return err
25256	}
25257	future.FutureAPI = &azFuture
25258	future.Result = future.result
25259	return nil
25260}
25261
25262// result is the default implementation for SubnetsDeleteFuture.Result.
25263func (future *SubnetsDeleteFuture) result(client SubnetsClient) (ar autorest.Response, err error) {
25264	var done bool
25265	done, err = future.DoneWithContext(context.Background(), client)
25266	if err != nil {
25267		err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", future.Response(), "Polling failure")
25268		return
25269	}
25270	if !done {
25271		ar.Response = future.Response()
25272		err = azure.NewAsyncOpIncompleteError("network.SubnetsDeleteFuture")
25273		return
25274	}
25275	ar.Response = future.Response()
25276	return
25277}
25278
25279// SubResource reference to another subresource.
25280type SubResource struct {
25281	// ID - Resource ID.
25282	ID *string `json:"id,omitempty"`
25283}
25284
25285// TagsObject tags object for patch operations.
25286type TagsObject struct {
25287	// Tags - Resource tags.
25288	Tags map[string]*string `json:"tags"`
25289}
25290
25291// MarshalJSON is the custom marshaler for TagsObject.
25292func (toVar TagsObject) MarshalJSON() ([]byte, error) {
25293	objectMap := make(map[string]interface{})
25294	if toVar.Tags != nil {
25295		objectMap["tags"] = toVar.Tags
25296	}
25297	return json.Marshal(objectMap)
25298}
25299
25300// Topology topology of the specified resource group.
25301type Topology struct {
25302	autorest.Response `json:"-"`
25303	// ID - READ-ONLY; GUID representing the operation id.
25304	ID *string `json:"id,omitempty"`
25305	// CreatedDateTime - READ-ONLY; The datetime when the topology was initially created for the resource group.
25306	CreatedDateTime *date.Time `json:"createdDateTime,omitempty"`
25307	// LastModified - READ-ONLY; The datetime when the topology was last modified.
25308	LastModified *date.Time          `json:"lastModified,omitempty"`
25309	Resources    *[]TopologyResource `json:"resources,omitempty"`
25310}
25311
25312// MarshalJSON is the custom marshaler for Topology.
25313func (t Topology) MarshalJSON() ([]byte, error) {
25314	objectMap := make(map[string]interface{})
25315	if t.Resources != nil {
25316		objectMap["resources"] = t.Resources
25317	}
25318	return json.Marshal(objectMap)
25319}
25320
25321// TopologyAssociation resources that have an association with the parent resource.
25322type TopologyAssociation struct {
25323	// Name - The name of the resource that is associated with the parent resource.
25324	Name *string `json:"name,omitempty"`
25325	// ResourceID - The ID of the resource that is associated with the parent resource.
25326	ResourceID *string `json:"resourceId,omitempty"`
25327	// AssociationType - The association type of the child resource to the parent resource. Possible values include: 'Associated', 'Contains'
25328	AssociationType AssociationType `json:"associationType,omitempty"`
25329}
25330
25331// TopologyParameters parameters that define the representation of topology.
25332type TopologyParameters struct {
25333	// TargetResourceGroupName - The name of the target resource group to perform topology on.
25334	TargetResourceGroupName *string `json:"targetResourceGroupName,omitempty"`
25335	// TargetVirtualNetwork - The reference of the Virtual Network resource.
25336	TargetVirtualNetwork *SubResource `json:"targetVirtualNetwork,omitempty"`
25337	// TargetSubnet - The reference of the Subnet resource.
25338	TargetSubnet *SubResource `json:"targetSubnet,omitempty"`
25339}
25340
25341// TopologyResource the network resource topology information for the given resource group.
25342type TopologyResource struct {
25343	// Name - Name of the resource.
25344	Name *string `json:"name,omitempty"`
25345	// ID - ID of the resource.
25346	ID *string `json:"id,omitempty"`
25347	// Location - Resource location.
25348	Location *string `json:"location,omitempty"`
25349	// Associations - Holds the associations the resource has with other resources in the resource group.
25350	Associations *[]TopologyAssociation `json:"associations,omitempty"`
25351}
25352
25353// TrafficAnalyticsConfigurationProperties parameters that define the configuration of traffic analytics.
25354type TrafficAnalyticsConfigurationProperties struct {
25355	// Enabled - Flag to enable/disable traffic analytics.
25356	Enabled *bool `json:"enabled,omitempty"`
25357	// WorkspaceID - The resource guid of the attached workspace
25358	WorkspaceID *string `json:"workspaceId,omitempty"`
25359	// WorkspaceRegion - The location of the attached workspace
25360	WorkspaceRegion *string `json:"workspaceRegion,omitempty"`
25361	// WorkspaceResourceID - Resource Id of the attached workspace
25362	WorkspaceResourceID *string `json:"workspaceResourceId,omitempty"`
25363	// TrafficAnalyticsInterval - The interval in minutes which would decide how frequently TA service should do flow analytics
25364	TrafficAnalyticsInterval *int32 `json:"trafficAnalyticsInterval,omitempty"`
25365}
25366
25367// TrafficAnalyticsProperties parameters that define the configuration of traffic analytics.
25368type TrafficAnalyticsProperties struct {
25369	NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"`
25370}
25371
25372// TroubleshootingDetails information gained from troubleshooting of specified resource.
25373type TroubleshootingDetails struct {
25374	// ID - The id of the get troubleshoot operation.
25375	ID *string `json:"id,omitempty"`
25376	// ReasonType - Reason type of failure.
25377	ReasonType *string `json:"reasonType,omitempty"`
25378	// Summary - A summary of troubleshooting.
25379	Summary *string `json:"summary,omitempty"`
25380	// Detail - Details on troubleshooting results.
25381	Detail *string `json:"detail,omitempty"`
25382	// RecommendedActions - List of recommended actions.
25383	RecommendedActions *[]TroubleshootingRecommendedActions `json:"recommendedActions,omitempty"`
25384}
25385
25386// TroubleshootingParameters parameters that define the resource to troubleshoot.
25387type TroubleshootingParameters struct {
25388	// TargetResourceID - The target resource to troubleshoot.
25389	TargetResourceID           *string `json:"targetResourceId,omitempty"`
25390	*TroubleshootingProperties `json:"properties,omitempty"`
25391}
25392
25393// MarshalJSON is the custom marshaler for TroubleshootingParameters.
25394func (tp TroubleshootingParameters) MarshalJSON() ([]byte, error) {
25395	objectMap := make(map[string]interface{})
25396	if tp.TargetResourceID != nil {
25397		objectMap["targetResourceId"] = tp.TargetResourceID
25398	}
25399	if tp.TroubleshootingProperties != nil {
25400		objectMap["properties"] = tp.TroubleshootingProperties
25401	}
25402	return json.Marshal(objectMap)
25403}
25404
25405// UnmarshalJSON is the custom unmarshaler for TroubleshootingParameters struct.
25406func (tp *TroubleshootingParameters) UnmarshalJSON(body []byte) error {
25407	var m map[string]*json.RawMessage
25408	err := json.Unmarshal(body, &m)
25409	if err != nil {
25410		return err
25411	}
25412	for k, v := range m {
25413		switch k {
25414		case "targetResourceId":
25415			if v != nil {
25416				var targetResourceID string
25417				err = json.Unmarshal(*v, &targetResourceID)
25418				if err != nil {
25419					return err
25420				}
25421				tp.TargetResourceID = &targetResourceID
25422			}
25423		case "properties":
25424			if v != nil {
25425				var troubleshootingProperties TroubleshootingProperties
25426				err = json.Unmarshal(*v, &troubleshootingProperties)
25427				if err != nil {
25428					return err
25429				}
25430				tp.TroubleshootingProperties = &troubleshootingProperties
25431			}
25432		}
25433	}
25434
25435	return nil
25436}
25437
25438// TroubleshootingProperties storage location provided for troubleshoot.
25439type TroubleshootingProperties struct {
25440	// StorageID - The ID for the storage account to save the troubleshoot result.
25441	StorageID *string `json:"storageId,omitempty"`
25442	// StoragePath - The path to the blob to save the troubleshoot result in.
25443	StoragePath *string `json:"storagePath,omitempty"`
25444}
25445
25446// TroubleshootingRecommendedActions recommended actions based on discovered issues.
25447type TroubleshootingRecommendedActions struct {
25448	// ActionID - ID of the recommended action.
25449	ActionID *string `json:"actionId,omitempty"`
25450	// ActionText - Description of recommended actions.
25451	ActionText *string `json:"actionText,omitempty"`
25452	// ActionURI - The uri linking to a documentation for the recommended troubleshooting actions.
25453	ActionURI *string `json:"actionUri,omitempty"`
25454	// ActionURIText - The information from the URI for the recommended troubleshooting actions.
25455	ActionURIText *string `json:"actionUriText,omitempty"`
25456}
25457
25458// TroubleshootingResult troubleshooting information gained from specified resource.
25459type TroubleshootingResult struct {
25460	autorest.Response `json:"-"`
25461	// StartTime - The start time of the troubleshooting.
25462	StartTime *date.Time `json:"startTime,omitempty"`
25463	// EndTime - The end time of the troubleshooting.
25464	EndTime *date.Time `json:"endTime,omitempty"`
25465	// Code - The result code of the troubleshooting.
25466	Code *string `json:"code,omitempty"`
25467	// Results - Information from troubleshooting.
25468	Results *[]TroubleshootingDetails `json:"results,omitempty"`
25469}
25470
25471// TunnelConnectionHealth virtualNetworkGatewayConnection properties
25472type TunnelConnectionHealth struct {
25473	// Tunnel - READ-ONLY; Tunnel name.
25474	Tunnel *string `json:"tunnel,omitempty"`
25475	// ConnectionStatus - READ-ONLY; Virtual network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
25476	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
25477	// IngressBytesTransferred - READ-ONLY; The Ingress Bytes Transferred in this connection
25478	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
25479	// EgressBytesTransferred - READ-ONLY; The Egress Bytes Transferred in this connection
25480	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
25481	// LastConnectionEstablishedUtcTime - READ-ONLY; The time at which connection was established in Utc format.
25482	LastConnectionEstablishedUtcTime *string `json:"lastConnectionEstablishedUtcTime,omitempty"`
25483}
25484
25485// MarshalJSON is the custom marshaler for TunnelConnectionHealth.
25486func (tch TunnelConnectionHealth) MarshalJSON() ([]byte, error) {
25487	objectMap := make(map[string]interface{})
25488	return json.Marshal(objectMap)
25489}
25490
25491// Usage describes network resource usage.
25492type Usage struct {
25493	// ID - READ-ONLY; Resource identifier.
25494	ID *string `json:"id,omitempty"`
25495	// Unit - An enum describing the unit of measurement.
25496	Unit *string `json:"unit,omitempty"`
25497	// CurrentValue - The current value of the usage.
25498	CurrentValue *int64 `json:"currentValue,omitempty"`
25499	// Limit - The limit of usage.
25500	Limit *int64 `json:"limit,omitempty"`
25501	// Name - The name of the type of usage.
25502	Name *UsageName `json:"name,omitempty"`
25503}
25504
25505// MarshalJSON is the custom marshaler for Usage.
25506func (u Usage) MarshalJSON() ([]byte, error) {
25507	objectMap := make(map[string]interface{})
25508	if u.Unit != nil {
25509		objectMap["unit"] = u.Unit
25510	}
25511	if u.CurrentValue != nil {
25512		objectMap["currentValue"] = u.CurrentValue
25513	}
25514	if u.Limit != nil {
25515		objectMap["limit"] = u.Limit
25516	}
25517	if u.Name != nil {
25518		objectMap["name"] = u.Name
25519	}
25520	return json.Marshal(objectMap)
25521}
25522
25523// UsageName the usage names.
25524type UsageName struct {
25525	// Value - A string describing the resource name.
25526	Value *string `json:"value,omitempty"`
25527	// LocalizedValue - A localized string describing the resource name.
25528	LocalizedValue *string `json:"localizedValue,omitempty"`
25529}
25530
25531// UsagesListResult the list usages operation response.
25532type UsagesListResult struct {
25533	autorest.Response `json:"-"`
25534	// Value - The list network resource usages.
25535	Value *[]Usage `json:"value,omitempty"`
25536	// NextLink - URL to get the next set of results.
25537	NextLink *string `json:"nextLink,omitempty"`
25538}
25539
25540// UsagesListResultIterator provides access to a complete listing of Usage values.
25541type UsagesListResultIterator struct {
25542	i    int
25543	page UsagesListResultPage
25544}
25545
25546// NextWithContext advances to the next value.  If there was an error making
25547// the request the iterator does not advance and the error is returned.
25548func (iter *UsagesListResultIterator) NextWithContext(ctx context.Context) (err error) {
25549	if tracing.IsEnabled() {
25550		ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultIterator.NextWithContext")
25551		defer func() {
25552			sc := -1
25553			if iter.Response().Response.Response != nil {
25554				sc = iter.Response().Response.Response.StatusCode
25555			}
25556			tracing.EndSpan(ctx, sc, err)
25557		}()
25558	}
25559	iter.i++
25560	if iter.i < len(iter.page.Values()) {
25561		return nil
25562	}
25563	err = iter.page.NextWithContext(ctx)
25564	if err != nil {
25565		iter.i--
25566		return err
25567	}
25568	iter.i = 0
25569	return nil
25570}
25571
25572// Next advances to the next value.  If there was an error making
25573// the request the iterator does not advance and the error is returned.
25574// Deprecated: Use NextWithContext() instead.
25575func (iter *UsagesListResultIterator) Next() error {
25576	return iter.NextWithContext(context.Background())
25577}
25578
25579// NotDone returns true if the enumeration should be started or is not yet complete.
25580func (iter UsagesListResultIterator) NotDone() bool {
25581	return iter.page.NotDone() && iter.i < len(iter.page.Values())
25582}
25583
25584// Response returns the raw server response from the last page request.
25585func (iter UsagesListResultIterator) Response() UsagesListResult {
25586	return iter.page.Response()
25587}
25588
25589// Value returns the current value or a zero-initialized value if the
25590// iterator has advanced beyond the end of the collection.
25591func (iter UsagesListResultIterator) Value() Usage {
25592	if !iter.page.NotDone() {
25593		return Usage{}
25594	}
25595	return iter.page.Values()[iter.i]
25596}
25597
25598// Creates a new instance of the UsagesListResultIterator type.
25599func NewUsagesListResultIterator(page UsagesListResultPage) UsagesListResultIterator {
25600	return UsagesListResultIterator{page: page}
25601}
25602
25603// IsEmpty returns true if the ListResult contains no values.
25604func (ulr UsagesListResult) IsEmpty() bool {
25605	return ulr.Value == nil || len(*ulr.Value) == 0
25606}
25607
25608// hasNextLink returns true if the NextLink is not empty.
25609func (ulr UsagesListResult) hasNextLink() bool {
25610	return ulr.NextLink != nil && len(*ulr.NextLink) != 0
25611}
25612
25613// usagesListResultPreparer prepares a request to retrieve the next set of results.
25614// It returns nil if no more results exist.
25615func (ulr UsagesListResult) usagesListResultPreparer(ctx context.Context) (*http.Request, error) {
25616	if !ulr.hasNextLink() {
25617		return nil, nil
25618	}
25619	return autorest.Prepare((&http.Request{}).WithContext(ctx),
25620		autorest.AsJSON(),
25621		autorest.AsGet(),
25622		autorest.WithBaseURL(to.String(ulr.NextLink)))
25623}
25624
25625// UsagesListResultPage contains a page of Usage values.
25626type UsagesListResultPage struct {
25627	fn  func(context.Context, UsagesListResult) (UsagesListResult, error)
25628	ulr UsagesListResult
25629}
25630
25631// NextWithContext advances to the next page of values.  If there was an error making
25632// the request the page does not advance and the error is returned.
25633func (page *UsagesListResultPage) NextWithContext(ctx context.Context) (err error) {
25634	if tracing.IsEnabled() {
25635		ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultPage.NextWithContext")
25636		defer func() {
25637			sc := -1
25638			if page.Response().Response.Response != nil {
25639				sc = page.Response().Response.Response.StatusCode
25640			}
25641			tracing.EndSpan(ctx, sc, err)
25642		}()
25643	}
25644	for {
25645		next, err := page.fn(ctx, page.ulr)
25646		if err != nil {
25647			return err
25648		}
25649		page.ulr = next
25650		if !next.hasNextLink() || !next.IsEmpty() {
25651			break
25652		}
25653	}
25654	return nil
25655}
25656
25657// Next advances to the next page of values.  If there was an error making
25658// the request the page does not advance and the error is returned.
25659// Deprecated: Use NextWithContext() instead.
25660func (page *UsagesListResultPage) Next() error {
25661	return page.NextWithContext(context.Background())
25662}
25663
25664// NotDone returns true if the page enumeration should be started or is not yet complete.
25665func (page UsagesListResultPage) NotDone() bool {
25666	return !page.ulr.IsEmpty()
25667}
25668
25669// Response returns the raw server response from the last page request.
25670func (page UsagesListResultPage) Response() UsagesListResult {
25671	return page.ulr
25672}
25673
25674// Values returns the slice of values for the current page or nil if there are no values.
25675func (page UsagesListResultPage) Values() []Usage {
25676	if page.ulr.IsEmpty() {
25677		return nil
25678	}
25679	return *page.ulr.Value
25680}
25681
25682// Creates a new instance of the UsagesListResultPage type.
25683func NewUsagesListResultPage(cur UsagesListResult, getNextPage func(context.Context, UsagesListResult) (UsagesListResult, error)) UsagesListResultPage {
25684	return UsagesListResultPage{
25685		fn:  getNextPage,
25686		ulr: cur,
25687	}
25688}
25689
25690// VerificationIPFlowParameters parameters that define the IP flow to be verified.
25691type VerificationIPFlowParameters struct {
25692	// TargetResourceID - The ID of the target resource to perform next-hop on.
25693	TargetResourceID *string `json:"targetResourceId,omitempty"`
25694	// Direction - The direction of the packet represented as a 5-tuple. Possible values include: 'Inbound', 'Outbound'
25695	Direction Direction `json:"direction,omitempty"`
25696	// Protocol - Protocol to be verified on. Possible values include: 'IPFlowProtocolTCP', 'IPFlowProtocolUDP'
25697	Protocol IPFlowProtocol `json:"protocol,omitempty"`
25698	// 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.
25699	LocalPort *string `json:"localPort,omitempty"`
25700	// 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.
25701	RemotePort *string `json:"remotePort,omitempty"`
25702	// LocalIPAddress - The local IP address. Acceptable values are valid IPv4 addresses.
25703	LocalIPAddress *string `json:"localIPAddress,omitempty"`
25704	// RemoteIPAddress - The remote IP address. Acceptable values are valid IPv4 addresses.
25705	RemoteIPAddress *string `json:"remoteIPAddress,omitempty"`
25706	// 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).
25707	TargetNicResourceID *string `json:"targetNicResourceId,omitempty"`
25708}
25709
25710// VerificationIPFlowResult results of IP flow verification on the target resource.
25711type VerificationIPFlowResult struct {
25712	autorest.Response `json:"-"`
25713	// Access - Indicates whether the traffic is allowed or denied. Possible values include: 'Allow', 'Deny'
25714	Access Access `json:"access,omitempty"`
25715	// RuleName - Name of the rule. If input is not matched against any security rule, it is not displayed.
25716	RuleName *string `json:"ruleName,omitempty"`
25717}
25718
25719// VirtualHub virtualHub Resource.
25720type VirtualHub struct {
25721	autorest.Response     `json:"-"`
25722	*VirtualHubProperties `json:"properties,omitempty"`
25723	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
25724	Etag *string `json:"etag,omitempty"`
25725	// ID - Resource ID.
25726	ID *string `json:"id,omitempty"`
25727	// Name - READ-ONLY; Resource name.
25728	Name *string `json:"name,omitempty"`
25729	// Type - READ-ONLY; Resource type.
25730	Type *string `json:"type,omitempty"`
25731	// Location - Resource location.
25732	Location *string `json:"location,omitempty"`
25733	// Tags - Resource tags.
25734	Tags map[string]*string `json:"tags"`
25735}
25736
25737// MarshalJSON is the custom marshaler for VirtualHub.
25738func (vh VirtualHub) MarshalJSON() ([]byte, error) {
25739	objectMap := make(map[string]interface{})
25740	if vh.VirtualHubProperties != nil {
25741		objectMap["properties"] = vh.VirtualHubProperties
25742	}
25743	if vh.ID != nil {
25744		objectMap["id"] = vh.ID
25745	}
25746	if vh.Location != nil {
25747		objectMap["location"] = vh.Location
25748	}
25749	if vh.Tags != nil {
25750		objectMap["tags"] = vh.Tags
25751	}
25752	return json.Marshal(objectMap)
25753}
25754
25755// UnmarshalJSON is the custom unmarshaler for VirtualHub struct.
25756func (vh *VirtualHub) UnmarshalJSON(body []byte) error {
25757	var m map[string]*json.RawMessage
25758	err := json.Unmarshal(body, &m)
25759	if err != nil {
25760		return err
25761	}
25762	for k, v := range m {
25763		switch k {
25764		case "properties":
25765			if v != nil {
25766				var virtualHubProperties VirtualHubProperties
25767				err = json.Unmarshal(*v, &virtualHubProperties)
25768				if err != nil {
25769					return err
25770				}
25771				vh.VirtualHubProperties = &virtualHubProperties
25772			}
25773		case "etag":
25774			if v != nil {
25775				var etag string
25776				err = json.Unmarshal(*v, &etag)
25777				if err != nil {
25778					return err
25779				}
25780				vh.Etag = &etag
25781			}
25782		case "id":
25783			if v != nil {
25784				var ID string
25785				err = json.Unmarshal(*v, &ID)
25786				if err != nil {
25787					return err
25788				}
25789				vh.ID = &ID
25790			}
25791		case "name":
25792			if v != nil {
25793				var name string
25794				err = json.Unmarshal(*v, &name)
25795				if err != nil {
25796					return err
25797				}
25798				vh.Name = &name
25799			}
25800		case "type":
25801			if v != nil {
25802				var typeVar string
25803				err = json.Unmarshal(*v, &typeVar)
25804				if err != nil {
25805					return err
25806				}
25807				vh.Type = &typeVar
25808			}
25809		case "location":
25810			if v != nil {
25811				var location string
25812				err = json.Unmarshal(*v, &location)
25813				if err != nil {
25814					return err
25815				}
25816				vh.Location = &location
25817			}
25818		case "tags":
25819			if v != nil {
25820				var tags map[string]*string
25821				err = json.Unmarshal(*v, &tags)
25822				if err != nil {
25823					return err
25824				}
25825				vh.Tags = tags
25826			}
25827		}
25828	}
25829
25830	return nil
25831}
25832
25833// VirtualHubID virtual Hub identifier.
25834type VirtualHubID struct {
25835	// 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.
25836	ID *string `json:"id,omitempty"`
25837}
25838
25839// VirtualHubProperties parameters for VirtualHub
25840type VirtualHubProperties struct {
25841	// VirtualWan - The VirtualWAN to which the VirtualHub belongs
25842	VirtualWan *SubResource `json:"virtualWan,omitempty"`
25843	// VpnGateway - The VpnGateway associated with this VirtualHub
25844	VpnGateway *SubResource `json:"vpnGateway,omitempty"`
25845	// P2SVpnGateway - The P2SVpnGateway associated with this VirtualHub
25846	P2SVpnGateway *SubResource `json:"p2SVpnGateway,omitempty"`
25847	// ExpressRouteGateway - The expressRouteGateway associated with this VirtualHub
25848	ExpressRouteGateway *SubResource `json:"expressRouteGateway,omitempty"`
25849	// VirtualNetworkConnections - list of all vnet connections with this VirtualHub.
25850	VirtualNetworkConnections *[]HubVirtualNetworkConnection `json:"virtualNetworkConnections,omitempty"`
25851	// AddressPrefix - Address-prefix for this VirtualHub.
25852	AddressPrefix *string `json:"addressPrefix,omitempty"`
25853	// RouteTable - The routeTable associated with this virtual hub.
25854	RouteTable *VirtualHubRouteTable `json:"routeTable,omitempty"`
25855	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
25856	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
25857}
25858
25859// VirtualHubRoute virtualHub route
25860type VirtualHubRoute struct {
25861	// AddressPrefixes - list of all addressPrefixes.
25862	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
25863	// NextHopIPAddress - NextHop ip address.
25864	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
25865}
25866
25867// VirtualHubRouteTable virtualHub route table
25868type VirtualHubRouteTable struct {
25869	// Routes - list of all routes.
25870	Routes *[]VirtualHubRoute `json:"routes,omitempty"`
25871}
25872
25873// VirtualHubsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
25874// long-running operation.
25875type VirtualHubsCreateOrUpdateFuture struct {
25876	azure.FutureAPI
25877	// Result returns the result of the asynchronous operation.
25878	// If the operation has not completed it will return an error.
25879	Result func(VirtualHubsClient) (VirtualHub, error)
25880}
25881
25882// UnmarshalJSON is the custom unmarshaller for CreateFuture.
25883func (future *VirtualHubsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
25884	var azFuture azure.Future
25885	if err := json.Unmarshal(body, &azFuture); err != nil {
25886		return err
25887	}
25888	future.FutureAPI = &azFuture
25889	future.Result = future.result
25890	return nil
25891}
25892
25893// result is the default implementation for VirtualHubsCreateOrUpdateFuture.Result.
25894func (future *VirtualHubsCreateOrUpdateFuture) result(client VirtualHubsClient) (vh VirtualHub, err error) {
25895	var done bool
25896	done, err = future.DoneWithContext(context.Background(), client)
25897	if err != nil {
25898		err = autorest.NewErrorWithError(err, "network.VirtualHubsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
25899		return
25900	}
25901	if !done {
25902		vh.Response.Response = future.Response()
25903		err = azure.NewAsyncOpIncompleteError("network.VirtualHubsCreateOrUpdateFuture")
25904		return
25905	}
25906	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
25907	if vh.Response.Response, err = future.GetResult(sender); err == nil && vh.Response.Response.StatusCode != http.StatusNoContent {
25908		vh, err = client.CreateOrUpdateResponder(vh.Response.Response)
25909		if err != nil {
25910			err = autorest.NewErrorWithError(err, "network.VirtualHubsCreateOrUpdateFuture", "Result", vh.Response.Response, "Failure responding to request")
25911		}
25912	}
25913	return
25914}
25915
25916// VirtualHubsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
25917// operation.
25918type VirtualHubsDeleteFuture struct {
25919	azure.FutureAPI
25920	// Result returns the result of the asynchronous operation.
25921	// If the operation has not completed it will return an error.
25922	Result func(VirtualHubsClient) (autorest.Response, error)
25923}
25924
25925// UnmarshalJSON is the custom unmarshaller for CreateFuture.
25926func (future *VirtualHubsDeleteFuture) UnmarshalJSON(body []byte) error {
25927	var azFuture azure.Future
25928	if err := json.Unmarshal(body, &azFuture); err != nil {
25929		return err
25930	}
25931	future.FutureAPI = &azFuture
25932	future.Result = future.result
25933	return nil
25934}
25935
25936// result is the default implementation for VirtualHubsDeleteFuture.Result.
25937func (future *VirtualHubsDeleteFuture) result(client VirtualHubsClient) (ar autorest.Response, err error) {
25938	var done bool
25939	done, err = future.DoneWithContext(context.Background(), client)
25940	if err != nil {
25941		err = autorest.NewErrorWithError(err, "network.VirtualHubsDeleteFuture", "Result", future.Response(), "Polling failure")
25942		return
25943	}
25944	if !done {
25945		ar.Response = future.Response()
25946		err = azure.NewAsyncOpIncompleteError("network.VirtualHubsDeleteFuture")
25947		return
25948	}
25949	ar.Response = future.Response()
25950	return
25951}
25952
25953// VirtualHubsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
25954// operation.
25955type VirtualHubsUpdateTagsFuture struct {
25956	azure.FutureAPI
25957	// Result returns the result of the asynchronous operation.
25958	// If the operation has not completed it will return an error.
25959	Result func(VirtualHubsClient) (VirtualHub, error)
25960}
25961
25962// UnmarshalJSON is the custom unmarshaller for CreateFuture.
25963func (future *VirtualHubsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
25964	var azFuture azure.Future
25965	if err := json.Unmarshal(body, &azFuture); err != nil {
25966		return err
25967	}
25968	future.FutureAPI = &azFuture
25969	future.Result = future.result
25970	return nil
25971}
25972
25973// result is the default implementation for VirtualHubsUpdateTagsFuture.Result.
25974func (future *VirtualHubsUpdateTagsFuture) result(client VirtualHubsClient) (vh VirtualHub, err error) {
25975	var done bool
25976	done, err = future.DoneWithContext(context.Background(), client)
25977	if err != nil {
25978		err = autorest.NewErrorWithError(err, "network.VirtualHubsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
25979		return
25980	}
25981	if !done {
25982		vh.Response.Response = future.Response()
25983		err = azure.NewAsyncOpIncompleteError("network.VirtualHubsUpdateTagsFuture")
25984		return
25985	}
25986	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
25987	if vh.Response.Response, err = future.GetResult(sender); err == nil && vh.Response.Response.StatusCode != http.StatusNoContent {
25988		vh, err = client.UpdateTagsResponder(vh.Response.Response)
25989		if err != nil {
25990			err = autorest.NewErrorWithError(err, "network.VirtualHubsUpdateTagsFuture", "Result", vh.Response.Response, "Failure responding to request")
25991		}
25992	}
25993	return
25994}
25995
25996// VirtualNetwork virtual Network resource.
25997type VirtualNetwork struct {
25998	autorest.Response `json:"-"`
25999	// VirtualNetworkPropertiesFormat - Properties of the virtual network.
26000	*VirtualNetworkPropertiesFormat `json:"properties,omitempty"`
26001	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
26002	Etag *string `json:"etag,omitempty"`
26003	// ID - Resource ID.
26004	ID *string `json:"id,omitempty"`
26005	// Name - READ-ONLY; Resource name.
26006	Name *string `json:"name,omitempty"`
26007	// Type - READ-ONLY; Resource type.
26008	Type *string `json:"type,omitempty"`
26009	// Location - Resource location.
26010	Location *string `json:"location,omitempty"`
26011	// Tags - Resource tags.
26012	Tags map[string]*string `json:"tags"`
26013}
26014
26015// MarshalJSON is the custom marshaler for VirtualNetwork.
26016func (vn VirtualNetwork) MarshalJSON() ([]byte, error) {
26017	objectMap := make(map[string]interface{})
26018	if vn.VirtualNetworkPropertiesFormat != nil {
26019		objectMap["properties"] = vn.VirtualNetworkPropertiesFormat
26020	}
26021	if vn.Etag != nil {
26022		objectMap["etag"] = vn.Etag
26023	}
26024	if vn.ID != nil {
26025		objectMap["id"] = vn.ID
26026	}
26027	if vn.Location != nil {
26028		objectMap["location"] = vn.Location
26029	}
26030	if vn.Tags != nil {
26031		objectMap["tags"] = vn.Tags
26032	}
26033	return json.Marshal(objectMap)
26034}
26035
26036// UnmarshalJSON is the custom unmarshaler for VirtualNetwork struct.
26037func (vn *VirtualNetwork) UnmarshalJSON(body []byte) error {
26038	var m map[string]*json.RawMessage
26039	err := json.Unmarshal(body, &m)
26040	if err != nil {
26041		return err
26042	}
26043	for k, v := range m {
26044		switch k {
26045		case "properties":
26046			if v != nil {
26047				var virtualNetworkPropertiesFormat VirtualNetworkPropertiesFormat
26048				err = json.Unmarshal(*v, &virtualNetworkPropertiesFormat)
26049				if err != nil {
26050					return err
26051				}
26052				vn.VirtualNetworkPropertiesFormat = &virtualNetworkPropertiesFormat
26053			}
26054		case "etag":
26055			if v != nil {
26056				var etag string
26057				err = json.Unmarshal(*v, &etag)
26058				if err != nil {
26059					return err
26060				}
26061				vn.Etag = &etag
26062			}
26063		case "id":
26064			if v != nil {
26065				var ID string
26066				err = json.Unmarshal(*v, &ID)
26067				if err != nil {
26068					return err
26069				}
26070				vn.ID = &ID
26071			}
26072		case "name":
26073			if v != nil {
26074				var name string
26075				err = json.Unmarshal(*v, &name)
26076				if err != nil {
26077					return err
26078				}
26079				vn.Name = &name
26080			}
26081		case "type":
26082			if v != nil {
26083				var typeVar string
26084				err = json.Unmarshal(*v, &typeVar)
26085				if err != nil {
26086					return err
26087				}
26088				vn.Type = &typeVar
26089			}
26090		case "location":
26091			if v != nil {
26092				var location string
26093				err = json.Unmarshal(*v, &location)
26094				if err != nil {
26095					return err
26096				}
26097				vn.Location = &location
26098			}
26099		case "tags":
26100			if v != nil {
26101				var tags map[string]*string
26102				err = json.Unmarshal(*v, &tags)
26103				if err != nil {
26104					return err
26105				}
26106				vn.Tags = tags
26107			}
26108		}
26109	}
26110
26111	return nil
26112}
26113
26114// VirtualNetworkConnectionGatewayReference a reference to VirtualNetworkGateway or LocalNetworkGateway
26115// resource.
26116type VirtualNetworkConnectionGatewayReference struct {
26117	// ID - The ID of VirtualNetworkGateway or LocalNetworkGateway resource.
26118	ID *string `json:"id,omitempty"`
26119}
26120
26121// VirtualNetworkGateway a common class for general resource information
26122type VirtualNetworkGateway struct {
26123	autorest.Response `json:"-"`
26124	// VirtualNetworkGatewayPropertiesFormat - Properties of the virtual network gateway.
26125	*VirtualNetworkGatewayPropertiesFormat `json:"properties,omitempty"`
26126	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
26127	Etag *string `json:"etag,omitempty"`
26128	// ID - Resource ID.
26129	ID *string `json:"id,omitempty"`
26130	// Name - READ-ONLY; Resource name.
26131	Name *string `json:"name,omitempty"`
26132	// Type - READ-ONLY; Resource type.
26133	Type *string `json:"type,omitempty"`
26134	// Location - Resource location.
26135	Location *string `json:"location,omitempty"`
26136	// Tags - Resource tags.
26137	Tags map[string]*string `json:"tags"`
26138}
26139
26140// MarshalJSON is the custom marshaler for VirtualNetworkGateway.
26141func (vng VirtualNetworkGateway) MarshalJSON() ([]byte, error) {
26142	objectMap := make(map[string]interface{})
26143	if vng.VirtualNetworkGatewayPropertiesFormat != nil {
26144		objectMap["properties"] = vng.VirtualNetworkGatewayPropertiesFormat
26145	}
26146	if vng.Etag != nil {
26147		objectMap["etag"] = vng.Etag
26148	}
26149	if vng.ID != nil {
26150		objectMap["id"] = vng.ID
26151	}
26152	if vng.Location != nil {
26153		objectMap["location"] = vng.Location
26154	}
26155	if vng.Tags != nil {
26156		objectMap["tags"] = vng.Tags
26157	}
26158	return json.Marshal(objectMap)
26159}
26160
26161// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGateway struct.
26162func (vng *VirtualNetworkGateway) UnmarshalJSON(body []byte) error {
26163	var m map[string]*json.RawMessage
26164	err := json.Unmarshal(body, &m)
26165	if err != nil {
26166		return err
26167	}
26168	for k, v := range m {
26169		switch k {
26170		case "properties":
26171			if v != nil {
26172				var virtualNetworkGatewayPropertiesFormat VirtualNetworkGatewayPropertiesFormat
26173				err = json.Unmarshal(*v, &virtualNetworkGatewayPropertiesFormat)
26174				if err != nil {
26175					return err
26176				}
26177				vng.VirtualNetworkGatewayPropertiesFormat = &virtualNetworkGatewayPropertiesFormat
26178			}
26179		case "etag":
26180			if v != nil {
26181				var etag string
26182				err = json.Unmarshal(*v, &etag)
26183				if err != nil {
26184					return err
26185				}
26186				vng.Etag = &etag
26187			}
26188		case "id":
26189			if v != nil {
26190				var ID string
26191				err = json.Unmarshal(*v, &ID)
26192				if err != nil {
26193					return err
26194				}
26195				vng.ID = &ID
26196			}
26197		case "name":
26198			if v != nil {
26199				var name string
26200				err = json.Unmarshal(*v, &name)
26201				if err != nil {
26202					return err
26203				}
26204				vng.Name = &name
26205			}
26206		case "type":
26207			if v != nil {
26208				var typeVar string
26209				err = json.Unmarshal(*v, &typeVar)
26210				if err != nil {
26211					return err
26212				}
26213				vng.Type = &typeVar
26214			}
26215		case "location":
26216			if v != nil {
26217				var location string
26218				err = json.Unmarshal(*v, &location)
26219				if err != nil {
26220					return err
26221				}
26222				vng.Location = &location
26223			}
26224		case "tags":
26225			if v != nil {
26226				var tags map[string]*string
26227				err = json.Unmarshal(*v, &tags)
26228				if err != nil {
26229					return err
26230				}
26231				vng.Tags = tags
26232			}
26233		}
26234	}
26235
26236	return nil
26237}
26238
26239// VirtualNetworkGatewayConnection a common class for general resource information
26240type VirtualNetworkGatewayConnection struct {
26241	autorest.Response `json:"-"`
26242	// VirtualNetworkGatewayConnectionPropertiesFormat - Properties of the virtual network gateway connection.
26243	*VirtualNetworkGatewayConnectionPropertiesFormat `json:"properties,omitempty"`
26244	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
26245	Etag *string `json:"etag,omitempty"`
26246	// ID - Resource ID.
26247	ID *string `json:"id,omitempty"`
26248	// Name - READ-ONLY; Resource name.
26249	Name *string `json:"name,omitempty"`
26250	// Type - READ-ONLY; Resource type.
26251	Type *string `json:"type,omitempty"`
26252	// Location - Resource location.
26253	Location *string `json:"location,omitempty"`
26254	// Tags - Resource tags.
26255	Tags map[string]*string `json:"tags"`
26256}
26257
26258// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnection.
26259func (vngc VirtualNetworkGatewayConnection) MarshalJSON() ([]byte, error) {
26260	objectMap := make(map[string]interface{})
26261	if vngc.VirtualNetworkGatewayConnectionPropertiesFormat != nil {
26262		objectMap["properties"] = vngc.VirtualNetworkGatewayConnectionPropertiesFormat
26263	}
26264	if vngc.Etag != nil {
26265		objectMap["etag"] = vngc.Etag
26266	}
26267	if vngc.ID != nil {
26268		objectMap["id"] = vngc.ID
26269	}
26270	if vngc.Location != nil {
26271		objectMap["location"] = vngc.Location
26272	}
26273	if vngc.Tags != nil {
26274		objectMap["tags"] = vngc.Tags
26275	}
26276	return json.Marshal(objectMap)
26277}
26278
26279// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnection struct.
26280func (vngc *VirtualNetworkGatewayConnection) UnmarshalJSON(body []byte) error {
26281	var m map[string]*json.RawMessage
26282	err := json.Unmarshal(body, &m)
26283	if err != nil {
26284		return err
26285	}
26286	for k, v := range m {
26287		switch k {
26288		case "properties":
26289			if v != nil {
26290				var virtualNetworkGatewayConnectionPropertiesFormat VirtualNetworkGatewayConnectionPropertiesFormat
26291				err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionPropertiesFormat)
26292				if err != nil {
26293					return err
26294				}
26295				vngc.VirtualNetworkGatewayConnectionPropertiesFormat = &virtualNetworkGatewayConnectionPropertiesFormat
26296			}
26297		case "etag":
26298			if v != nil {
26299				var etag string
26300				err = json.Unmarshal(*v, &etag)
26301				if err != nil {
26302					return err
26303				}
26304				vngc.Etag = &etag
26305			}
26306		case "id":
26307			if v != nil {
26308				var ID string
26309				err = json.Unmarshal(*v, &ID)
26310				if err != nil {
26311					return err
26312				}
26313				vngc.ID = &ID
26314			}
26315		case "name":
26316			if v != nil {
26317				var name string
26318				err = json.Unmarshal(*v, &name)
26319				if err != nil {
26320					return err
26321				}
26322				vngc.Name = &name
26323			}
26324		case "type":
26325			if v != nil {
26326				var typeVar string
26327				err = json.Unmarshal(*v, &typeVar)
26328				if err != nil {
26329					return err
26330				}
26331				vngc.Type = &typeVar
26332			}
26333		case "location":
26334			if v != nil {
26335				var location string
26336				err = json.Unmarshal(*v, &location)
26337				if err != nil {
26338					return err
26339				}
26340				vngc.Location = &location
26341			}
26342		case "tags":
26343			if v != nil {
26344				var tags map[string]*string
26345				err = json.Unmarshal(*v, &tags)
26346				if err != nil {
26347					return err
26348				}
26349				vngc.Tags = tags
26350			}
26351		}
26352	}
26353
26354	return nil
26355}
26356
26357// VirtualNetworkGatewayConnectionListEntity a common class for general resource information
26358type VirtualNetworkGatewayConnectionListEntity struct {
26359	// VirtualNetworkGatewayConnectionListEntityPropertiesFormat - Properties of the virtual network gateway connection.
26360	*VirtualNetworkGatewayConnectionListEntityPropertiesFormat `json:"properties,omitempty"`
26361	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
26362	Etag *string `json:"etag,omitempty"`
26363	// ID - Resource ID.
26364	ID *string `json:"id,omitempty"`
26365	// Name - READ-ONLY; Resource name.
26366	Name *string `json:"name,omitempty"`
26367	// Type - READ-ONLY; Resource type.
26368	Type *string `json:"type,omitempty"`
26369	// Location - Resource location.
26370	Location *string `json:"location,omitempty"`
26371	// Tags - Resource tags.
26372	Tags map[string]*string `json:"tags"`
26373}
26374
26375// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListEntity.
26376func (vngcle VirtualNetworkGatewayConnectionListEntity) MarshalJSON() ([]byte, error) {
26377	objectMap := make(map[string]interface{})
26378	if vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat != nil {
26379		objectMap["properties"] = vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat
26380	}
26381	if vngcle.Etag != nil {
26382		objectMap["etag"] = vngcle.Etag
26383	}
26384	if vngcle.ID != nil {
26385		objectMap["id"] = vngcle.ID
26386	}
26387	if vngcle.Location != nil {
26388		objectMap["location"] = vngcle.Location
26389	}
26390	if vngcle.Tags != nil {
26391		objectMap["tags"] = vngcle.Tags
26392	}
26393	return json.Marshal(objectMap)
26394}
26395
26396// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnectionListEntity struct.
26397func (vngcle *VirtualNetworkGatewayConnectionListEntity) UnmarshalJSON(body []byte) error {
26398	var m map[string]*json.RawMessage
26399	err := json.Unmarshal(body, &m)
26400	if err != nil {
26401		return err
26402	}
26403	for k, v := range m {
26404		switch k {
26405		case "properties":
26406			if v != nil {
26407				var virtualNetworkGatewayConnectionListEntityPropertiesFormat VirtualNetworkGatewayConnectionListEntityPropertiesFormat
26408				err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionListEntityPropertiesFormat)
26409				if err != nil {
26410					return err
26411				}
26412				vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat = &virtualNetworkGatewayConnectionListEntityPropertiesFormat
26413			}
26414		case "etag":
26415			if v != nil {
26416				var etag string
26417				err = json.Unmarshal(*v, &etag)
26418				if err != nil {
26419					return err
26420				}
26421				vngcle.Etag = &etag
26422			}
26423		case "id":
26424			if v != nil {
26425				var ID string
26426				err = json.Unmarshal(*v, &ID)
26427				if err != nil {
26428					return err
26429				}
26430				vngcle.ID = &ID
26431			}
26432		case "name":
26433			if v != nil {
26434				var name string
26435				err = json.Unmarshal(*v, &name)
26436				if err != nil {
26437					return err
26438				}
26439				vngcle.Name = &name
26440			}
26441		case "type":
26442			if v != nil {
26443				var typeVar string
26444				err = json.Unmarshal(*v, &typeVar)
26445				if err != nil {
26446					return err
26447				}
26448				vngcle.Type = &typeVar
26449			}
26450		case "location":
26451			if v != nil {
26452				var location string
26453				err = json.Unmarshal(*v, &location)
26454				if err != nil {
26455					return err
26456				}
26457				vngcle.Location = &location
26458			}
26459		case "tags":
26460			if v != nil {
26461				var tags map[string]*string
26462				err = json.Unmarshal(*v, &tags)
26463				if err != nil {
26464					return err
26465				}
26466				vngcle.Tags = tags
26467			}
26468		}
26469	}
26470
26471	return nil
26472}
26473
26474// VirtualNetworkGatewayConnectionListEntityPropertiesFormat virtualNetworkGatewayConnection properties
26475type VirtualNetworkGatewayConnectionListEntityPropertiesFormat struct {
26476	// AuthorizationKey - The authorizationKey.
26477	AuthorizationKey *string `json:"authorizationKey,omitempty"`
26478	// VirtualNetworkGateway1 - The reference to virtual network gateway resource.
26479	VirtualNetworkGateway1 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway1,omitempty"`
26480	// VirtualNetworkGateway2 - The reference to virtual network gateway resource.
26481	VirtualNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway2,omitempty"`
26482	// LocalNetworkGateway2 - The reference to local network gateway resource.
26483	LocalNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"localNetworkGateway2,omitempty"`
26484	// ConnectionType - Gateway connection type. Possible values are: 'Ipsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'
26485	ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"`
26486	// ConnectionProtocol - Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1'
26487	ConnectionProtocol VirtualNetworkGatewayConnectionProtocol `json:"connectionProtocol,omitempty"`
26488	// RoutingWeight - The routing weight.
26489	RoutingWeight *int32 `json:"routingWeight,omitempty"`
26490	// SharedKey - The IPSec shared key.
26491	SharedKey *string `json:"sharedKey,omitempty"`
26492	// ConnectionStatus - READ-ONLY; Virtual network Gateway connection status. Possible values are 'Unknown', 'Connecting', 'Connected' and 'NotConnected'. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
26493	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
26494	// TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status.
26495	TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"`
26496	// EgressBytesTransferred - READ-ONLY; The egress bytes transferred in this connection.
26497	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
26498	// IngressBytesTransferred - READ-ONLY; The ingress bytes transferred in this connection.
26499	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
26500	// Peer - The reference to peerings resource.
26501	Peer *SubResource `json:"peer,omitempty"`
26502	// EnableBgp - EnableBgp flag
26503	EnableBgp *bool `json:"enableBgp,omitempty"`
26504	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
26505	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
26506	// IpsecPolicies - The IPSec Policies to be considered by this connection.
26507	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
26508	// ResourceGUID - The resource GUID property of the VirtualNetworkGatewayConnection resource.
26509	ResourceGUID *string `json:"resourceGuid,omitempty"`
26510	// ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGatewayConnection resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
26511	ProvisioningState *string `json:"provisioningState,omitempty"`
26512	// ExpressRouteGatewayBypass - Bypass ExpressRoute Gateway for data forwarding
26513	ExpressRouteGatewayBypass *bool `json:"expressRouteGatewayBypass,omitempty"`
26514}
26515
26516// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListEntityPropertiesFormat.
26517func (vngclepf VirtualNetworkGatewayConnectionListEntityPropertiesFormat) MarshalJSON() ([]byte, error) {
26518	objectMap := make(map[string]interface{})
26519	if vngclepf.AuthorizationKey != nil {
26520		objectMap["authorizationKey"] = vngclepf.AuthorizationKey
26521	}
26522	if vngclepf.VirtualNetworkGateway1 != nil {
26523		objectMap["virtualNetworkGateway1"] = vngclepf.VirtualNetworkGateway1
26524	}
26525	if vngclepf.VirtualNetworkGateway2 != nil {
26526		objectMap["virtualNetworkGateway2"] = vngclepf.VirtualNetworkGateway2
26527	}
26528	if vngclepf.LocalNetworkGateway2 != nil {
26529		objectMap["localNetworkGateway2"] = vngclepf.LocalNetworkGateway2
26530	}
26531	if vngclepf.ConnectionType != "" {
26532		objectMap["connectionType"] = vngclepf.ConnectionType
26533	}
26534	if vngclepf.ConnectionProtocol != "" {
26535		objectMap["connectionProtocol"] = vngclepf.ConnectionProtocol
26536	}
26537	if vngclepf.RoutingWeight != nil {
26538		objectMap["routingWeight"] = vngclepf.RoutingWeight
26539	}
26540	if vngclepf.SharedKey != nil {
26541		objectMap["sharedKey"] = vngclepf.SharedKey
26542	}
26543	if vngclepf.Peer != nil {
26544		objectMap["peer"] = vngclepf.Peer
26545	}
26546	if vngclepf.EnableBgp != nil {
26547		objectMap["enableBgp"] = vngclepf.EnableBgp
26548	}
26549	if vngclepf.UsePolicyBasedTrafficSelectors != nil {
26550		objectMap["usePolicyBasedTrafficSelectors"] = vngclepf.UsePolicyBasedTrafficSelectors
26551	}
26552	if vngclepf.IpsecPolicies != nil {
26553		objectMap["ipsecPolicies"] = vngclepf.IpsecPolicies
26554	}
26555	if vngclepf.ResourceGUID != nil {
26556		objectMap["resourceGuid"] = vngclepf.ResourceGUID
26557	}
26558	if vngclepf.ExpressRouteGatewayBypass != nil {
26559		objectMap["expressRouteGatewayBypass"] = vngclepf.ExpressRouteGatewayBypass
26560	}
26561	return json.Marshal(objectMap)
26562}
26563
26564// VirtualNetworkGatewayConnectionListResult response for the ListVirtualNetworkGatewayConnections API
26565// service call
26566type VirtualNetworkGatewayConnectionListResult struct {
26567	autorest.Response `json:"-"`
26568	// Value - Gets a list of VirtualNetworkGatewayConnection resources that exists in a resource group.
26569	Value *[]VirtualNetworkGatewayConnection `json:"value,omitempty"`
26570	// NextLink - READ-ONLY; The URL to get the next set of results.
26571	NextLink *string `json:"nextLink,omitempty"`
26572}
26573
26574// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListResult.
26575func (vngclr VirtualNetworkGatewayConnectionListResult) MarshalJSON() ([]byte, error) {
26576	objectMap := make(map[string]interface{})
26577	if vngclr.Value != nil {
26578		objectMap["value"] = vngclr.Value
26579	}
26580	return json.Marshal(objectMap)
26581}
26582
26583// VirtualNetworkGatewayConnectionListResultIterator provides access to a complete listing of
26584// VirtualNetworkGatewayConnection values.
26585type VirtualNetworkGatewayConnectionListResultIterator struct {
26586	i    int
26587	page VirtualNetworkGatewayConnectionListResultPage
26588}
26589
26590// NextWithContext advances to the next value.  If there was an error making
26591// the request the iterator does not advance and the error is returned.
26592func (iter *VirtualNetworkGatewayConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
26593	if tracing.IsEnabled() {
26594		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultIterator.NextWithContext")
26595		defer func() {
26596			sc := -1
26597			if iter.Response().Response.Response != nil {
26598				sc = iter.Response().Response.Response.StatusCode
26599			}
26600			tracing.EndSpan(ctx, sc, err)
26601		}()
26602	}
26603	iter.i++
26604	if iter.i < len(iter.page.Values()) {
26605		return nil
26606	}
26607	err = iter.page.NextWithContext(ctx)
26608	if err != nil {
26609		iter.i--
26610		return err
26611	}
26612	iter.i = 0
26613	return nil
26614}
26615
26616// Next advances to the next value.  If there was an error making
26617// the request the iterator does not advance and the error is returned.
26618// Deprecated: Use NextWithContext() instead.
26619func (iter *VirtualNetworkGatewayConnectionListResultIterator) Next() error {
26620	return iter.NextWithContext(context.Background())
26621}
26622
26623// NotDone returns true if the enumeration should be started or is not yet complete.
26624func (iter VirtualNetworkGatewayConnectionListResultIterator) NotDone() bool {
26625	return iter.page.NotDone() && iter.i < len(iter.page.Values())
26626}
26627
26628// Response returns the raw server response from the last page request.
26629func (iter VirtualNetworkGatewayConnectionListResultIterator) Response() VirtualNetworkGatewayConnectionListResult {
26630	return iter.page.Response()
26631}
26632
26633// Value returns the current value or a zero-initialized value if the
26634// iterator has advanced beyond the end of the collection.
26635func (iter VirtualNetworkGatewayConnectionListResultIterator) Value() VirtualNetworkGatewayConnection {
26636	if !iter.page.NotDone() {
26637		return VirtualNetworkGatewayConnection{}
26638	}
26639	return iter.page.Values()[iter.i]
26640}
26641
26642// Creates a new instance of the VirtualNetworkGatewayConnectionListResultIterator type.
26643func NewVirtualNetworkGatewayConnectionListResultIterator(page VirtualNetworkGatewayConnectionListResultPage) VirtualNetworkGatewayConnectionListResultIterator {
26644	return VirtualNetworkGatewayConnectionListResultIterator{page: page}
26645}
26646
26647// IsEmpty returns true if the ListResult contains no values.
26648func (vngclr VirtualNetworkGatewayConnectionListResult) IsEmpty() bool {
26649	return vngclr.Value == nil || len(*vngclr.Value) == 0
26650}
26651
26652// hasNextLink returns true if the NextLink is not empty.
26653func (vngclr VirtualNetworkGatewayConnectionListResult) hasNextLink() bool {
26654	return vngclr.NextLink != nil && len(*vngclr.NextLink) != 0
26655}
26656
26657// virtualNetworkGatewayConnectionListResultPreparer prepares a request to retrieve the next set of results.
26658// It returns nil if no more results exist.
26659func (vngclr VirtualNetworkGatewayConnectionListResult) virtualNetworkGatewayConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
26660	if !vngclr.hasNextLink() {
26661		return nil, nil
26662	}
26663	return autorest.Prepare((&http.Request{}).WithContext(ctx),
26664		autorest.AsJSON(),
26665		autorest.AsGet(),
26666		autorest.WithBaseURL(to.String(vngclr.NextLink)))
26667}
26668
26669// VirtualNetworkGatewayConnectionListResultPage contains a page of VirtualNetworkGatewayConnection values.
26670type VirtualNetworkGatewayConnectionListResultPage struct {
26671	fn     func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)
26672	vngclr VirtualNetworkGatewayConnectionListResult
26673}
26674
26675// NextWithContext advances to the next page of values.  If there was an error making
26676// the request the page does not advance and the error is returned.
26677func (page *VirtualNetworkGatewayConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
26678	if tracing.IsEnabled() {
26679		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultPage.NextWithContext")
26680		defer func() {
26681			sc := -1
26682			if page.Response().Response.Response != nil {
26683				sc = page.Response().Response.Response.StatusCode
26684			}
26685			tracing.EndSpan(ctx, sc, err)
26686		}()
26687	}
26688	for {
26689		next, err := page.fn(ctx, page.vngclr)
26690		if err != nil {
26691			return err
26692		}
26693		page.vngclr = next
26694		if !next.hasNextLink() || !next.IsEmpty() {
26695			break
26696		}
26697	}
26698	return nil
26699}
26700
26701// Next advances to the next page of values.  If there was an error making
26702// the request the page does not advance and the error is returned.
26703// Deprecated: Use NextWithContext() instead.
26704func (page *VirtualNetworkGatewayConnectionListResultPage) Next() error {
26705	return page.NextWithContext(context.Background())
26706}
26707
26708// NotDone returns true if the page enumeration should be started or is not yet complete.
26709func (page VirtualNetworkGatewayConnectionListResultPage) NotDone() bool {
26710	return !page.vngclr.IsEmpty()
26711}
26712
26713// Response returns the raw server response from the last page request.
26714func (page VirtualNetworkGatewayConnectionListResultPage) Response() VirtualNetworkGatewayConnectionListResult {
26715	return page.vngclr
26716}
26717
26718// Values returns the slice of values for the current page or nil if there are no values.
26719func (page VirtualNetworkGatewayConnectionListResultPage) Values() []VirtualNetworkGatewayConnection {
26720	if page.vngclr.IsEmpty() {
26721		return nil
26722	}
26723	return *page.vngclr.Value
26724}
26725
26726// Creates a new instance of the VirtualNetworkGatewayConnectionListResultPage type.
26727func NewVirtualNetworkGatewayConnectionListResultPage(cur VirtualNetworkGatewayConnectionListResult, getNextPage func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)) VirtualNetworkGatewayConnectionListResultPage {
26728	return VirtualNetworkGatewayConnectionListResultPage{
26729		fn:     getNextPage,
26730		vngclr: cur,
26731	}
26732}
26733
26734// VirtualNetworkGatewayConnectionPropertiesFormat virtualNetworkGatewayConnection properties
26735type VirtualNetworkGatewayConnectionPropertiesFormat struct {
26736	// AuthorizationKey - The authorizationKey.
26737	AuthorizationKey *string `json:"authorizationKey,omitempty"`
26738	// VirtualNetworkGateway1 - The reference to virtual network gateway resource.
26739	VirtualNetworkGateway1 *VirtualNetworkGateway `json:"virtualNetworkGateway1,omitempty"`
26740	// VirtualNetworkGateway2 - The reference to virtual network gateway resource.
26741	VirtualNetworkGateway2 *VirtualNetworkGateway `json:"virtualNetworkGateway2,omitempty"`
26742	// LocalNetworkGateway2 - The reference to local network gateway resource.
26743	LocalNetworkGateway2 *LocalNetworkGateway `json:"localNetworkGateway2,omitempty"`
26744	// ConnectionType - Gateway connection type. Possible values are: 'Ipsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'
26745	ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"`
26746	// ConnectionProtocol - Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1'
26747	ConnectionProtocol VirtualNetworkGatewayConnectionProtocol `json:"connectionProtocol,omitempty"`
26748	// RoutingWeight - The routing weight.
26749	RoutingWeight *int32 `json:"routingWeight,omitempty"`
26750	// SharedKey - The IPSec shared key.
26751	SharedKey *string `json:"sharedKey,omitempty"`
26752	// ConnectionStatus - READ-ONLY; Virtual network Gateway connection status. Possible values are 'Unknown', 'Connecting', 'Connected' and 'NotConnected'. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
26753	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
26754	// TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status.
26755	TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"`
26756	// EgressBytesTransferred - READ-ONLY; The egress bytes transferred in this connection.
26757	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
26758	// IngressBytesTransferred - READ-ONLY; The ingress bytes transferred in this connection.
26759	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
26760	// Peer - The reference to peerings resource.
26761	Peer *SubResource `json:"peer,omitempty"`
26762	// EnableBgp - EnableBgp flag
26763	EnableBgp *bool `json:"enableBgp,omitempty"`
26764	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
26765	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
26766	// IpsecPolicies - The IPSec Policies to be considered by this connection.
26767	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
26768	// ResourceGUID - The resource GUID property of the VirtualNetworkGatewayConnection resource.
26769	ResourceGUID *string `json:"resourceGuid,omitempty"`
26770	// ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGatewayConnection resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
26771	ProvisioningState *string `json:"provisioningState,omitempty"`
26772	// ExpressRouteGatewayBypass - Bypass ExpressRoute Gateway for data forwarding
26773	ExpressRouteGatewayBypass *bool `json:"expressRouteGatewayBypass,omitempty"`
26774}
26775
26776// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionPropertiesFormat.
26777func (vngcpf VirtualNetworkGatewayConnectionPropertiesFormat) MarshalJSON() ([]byte, error) {
26778	objectMap := make(map[string]interface{})
26779	if vngcpf.AuthorizationKey != nil {
26780		objectMap["authorizationKey"] = vngcpf.AuthorizationKey
26781	}
26782	if vngcpf.VirtualNetworkGateway1 != nil {
26783		objectMap["virtualNetworkGateway1"] = vngcpf.VirtualNetworkGateway1
26784	}
26785	if vngcpf.VirtualNetworkGateway2 != nil {
26786		objectMap["virtualNetworkGateway2"] = vngcpf.VirtualNetworkGateway2
26787	}
26788	if vngcpf.LocalNetworkGateway2 != nil {
26789		objectMap["localNetworkGateway2"] = vngcpf.LocalNetworkGateway2
26790	}
26791	if vngcpf.ConnectionType != "" {
26792		objectMap["connectionType"] = vngcpf.ConnectionType
26793	}
26794	if vngcpf.ConnectionProtocol != "" {
26795		objectMap["connectionProtocol"] = vngcpf.ConnectionProtocol
26796	}
26797	if vngcpf.RoutingWeight != nil {
26798		objectMap["routingWeight"] = vngcpf.RoutingWeight
26799	}
26800	if vngcpf.SharedKey != nil {
26801		objectMap["sharedKey"] = vngcpf.SharedKey
26802	}
26803	if vngcpf.Peer != nil {
26804		objectMap["peer"] = vngcpf.Peer
26805	}
26806	if vngcpf.EnableBgp != nil {
26807		objectMap["enableBgp"] = vngcpf.EnableBgp
26808	}
26809	if vngcpf.UsePolicyBasedTrafficSelectors != nil {
26810		objectMap["usePolicyBasedTrafficSelectors"] = vngcpf.UsePolicyBasedTrafficSelectors
26811	}
26812	if vngcpf.IpsecPolicies != nil {
26813		objectMap["ipsecPolicies"] = vngcpf.IpsecPolicies
26814	}
26815	if vngcpf.ResourceGUID != nil {
26816		objectMap["resourceGuid"] = vngcpf.ResourceGUID
26817	}
26818	if vngcpf.ExpressRouteGatewayBypass != nil {
26819		objectMap["expressRouteGatewayBypass"] = vngcpf.ExpressRouteGatewayBypass
26820	}
26821	return json.Marshal(objectMap)
26822}
26823
26824// VirtualNetworkGatewayConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
26825// results of a long-running operation.
26826type VirtualNetworkGatewayConnectionsCreateOrUpdateFuture struct {
26827	azure.FutureAPI
26828	// Result returns the result of the asynchronous operation.
26829	// If the operation has not completed it will return an error.
26830	Result func(VirtualNetworkGatewayConnectionsClient) (VirtualNetworkGatewayConnection, error)
26831}
26832
26833// UnmarshalJSON is the custom unmarshaller for CreateFuture.
26834func (future *VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
26835	var azFuture azure.Future
26836	if err := json.Unmarshal(body, &azFuture); err != nil {
26837		return err
26838	}
26839	future.FutureAPI = &azFuture
26840	future.Result = future.result
26841	return nil
26842}
26843
26844// result is the default implementation for VirtualNetworkGatewayConnectionsCreateOrUpdateFuture.Result.
26845func (future *VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
26846	var done bool
26847	done, err = future.DoneWithContext(context.Background(), client)
26848	if err != nil {
26849		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
26850		return
26851	}
26852	if !done {
26853		vngc.Response.Response = future.Response()
26854		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture")
26855		return
26856	}
26857	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
26858	if vngc.Response.Response, err = future.GetResult(sender); err == nil && vngc.Response.Response.StatusCode != http.StatusNoContent {
26859		vngc, err = client.CreateOrUpdateResponder(vngc.Response.Response)
26860		if err != nil {
26861			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", vngc.Response.Response, "Failure responding to request")
26862		}
26863	}
26864	return
26865}
26866
26867// VirtualNetworkGatewayConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of
26868// a long-running operation.
26869type VirtualNetworkGatewayConnectionsDeleteFuture struct {
26870	azure.FutureAPI
26871	// Result returns the result of the asynchronous operation.
26872	// If the operation has not completed it will return an error.
26873	Result func(VirtualNetworkGatewayConnectionsClient) (autorest.Response, error)
26874}
26875
26876// UnmarshalJSON is the custom unmarshaller for CreateFuture.
26877func (future *VirtualNetworkGatewayConnectionsDeleteFuture) UnmarshalJSON(body []byte) error {
26878	var azFuture azure.Future
26879	if err := json.Unmarshal(body, &azFuture); err != nil {
26880		return err
26881	}
26882	future.FutureAPI = &azFuture
26883	future.Result = future.result
26884	return nil
26885}
26886
26887// result is the default implementation for VirtualNetworkGatewayConnectionsDeleteFuture.Result.
26888func (future *VirtualNetworkGatewayConnectionsDeleteFuture) result(client VirtualNetworkGatewayConnectionsClient) (ar autorest.Response, err error) {
26889	var done bool
26890	done, err = future.DoneWithContext(context.Background(), client)
26891	if err != nil {
26892		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
26893		return
26894	}
26895	if !done {
26896		ar.Response = future.Response()
26897		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsDeleteFuture")
26898		return
26899	}
26900	ar.Response = future.Response()
26901	return
26902}
26903
26904// VirtualNetworkGatewayConnectionsResetSharedKeyFuture an abstraction for monitoring and retrieving the
26905// results of a long-running operation.
26906type VirtualNetworkGatewayConnectionsResetSharedKeyFuture struct {
26907	azure.FutureAPI
26908	// Result returns the result of the asynchronous operation.
26909	// If the operation has not completed it will return an error.
26910	Result func(VirtualNetworkGatewayConnectionsClient) (ConnectionResetSharedKey, error)
26911}
26912
26913// UnmarshalJSON is the custom unmarshaller for CreateFuture.
26914func (future *VirtualNetworkGatewayConnectionsResetSharedKeyFuture) UnmarshalJSON(body []byte) error {
26915	var azFuture azure.Future
26916	if err := json.Unmarshal(body, &azFuture); err != nil {
26917		return err
26918	}
26919	future.FutureAPI = &azFuture
26920	future.Result = future.result
26921	return nil
26922}
26923
26924// result is the default implementation for VirtualNetworkGatewayConnectionsResetSharedKeyFuture.Result.
26925func (future *VirtualNetworkGatewayConnectionsResetSharedKeyFuture) result(client VirtualNetworkGatewayConnectionsClient) (crsk ConnectionResetSharedKey, err error) {
26926	var done bool
26927	done, err = future.DoneWithContext(context.Background(), client)
26928	if err != nil {
26929		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", future.Response(), "Polling failure")
26930		return
26931	}
26932	if !done {
26933		crsk.Response.Response = future.Response()
26934		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture")
26935		return
26936	}
26937	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
26938	if crsk.Response.Response, err = future.GetResult(sender); err == nil && crsk.Response.Response.StatusCode != http.StatusNoContent {
26939		crsk, err = client.ResetSharedKeyResponder(crsk.Response.Response)
26940		if err != nil {
26941			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", crsk.Response.Response, "Failure responding to request")
26942		}
26943	}
26944	return
26945}
26946
26947// VirtualNetworkGatewayConnectionsSetSharedKeyFuture an abstraction for monitoring and retrieving the
26948// results of a long-running operation.
26949type VirtualNetworkGatewayConnectionsSetSharedKeyFuture struct {
26950	azure.FutureAPI
26951	// Result returns the result of the asynchronous operation.
26952	// If the operation has not completed it will return an error.
26953	Result func(VirtualNetworkGatewayConnectionsClient) (ConnectionSharedKey, error)
26954}
26955
26956// UnmarshalJSON is the custom unmarshaller for CreateFuture.
26957func (future *VirtualNetworkGatewayConnectionsSetSharedKeyFuture) UnmarshalJSON(body []byte) error {
26958	var azFuture azure.Future
26959	if err := json.Unmarshal(body, &azFuture); err != nil {
26960		return err
26961	}
26962	future.FutureAPI = &azFuture
26963	future.Result = future.result
26964	return nil
26965}
26966
26967// result is the default implementation for VirtualNetworkGatewayConnectionsSetSharedKeyFuture.Result.
26968func (future *VirtualNetworkGatewayConnectionsSetSharedKeyFuture) result(client VirtualNetworkGatewayConnectionsClient) (csk ConnectionSharedKey, err error) {
26969	var done bool
26970	done, err = future.DoneWithContext(context.Background(), client)
26971	if err != nil {
26972		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", future.Response(), "Polling failure")
26973		return
26974	}
26975	if !done {
26976		csk.Response.Response = future.Response()
26977		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture")
26978		return
26979	}
26980	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
26981	if csk.Response.Response, err = future.GetResult(sender); err == nil && csk.Response.Response.StatusCode != http.StatusNoContent {
26982		csk, err = client.SetSharedKeyResponder(csk.Response.Response)
26983		if err != nil {
26984			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", csk.Response.Response, "Failure responding to request")
26985		}
26986	}
26987	return
26988}
26989
26990// VirtualNetworkGatewayConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the
26991// results of a long-running operation.
26992type VirtualNetworkGatewayConnectionsUpdateTagsFuture struct {
26993	azure.FutureAPI
26994	// Result returns the result of the asynchronous operation.
26995	// If the operation has not completed it will return an error.
26996	Result func(VirtualNetworkGatewayConnectionsClient) (VirtualNetworkGatewayConnection, error)
26997}
26998
26999// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27000func (future *VirtualNetworkGatewayConnectionsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
27001	var azFuture azure.Future
27002	if err := json.Unmarshal(body, &azFuture); err != nil {
27003		return err
27004	}
27005	future.FutureAPI = &azFuture
27006	future.Result = future.result
27007	return nil
27008}
27009
27010// result is the default implementation for VirtualNetworkGatewayConnectionsUpdateTagsFuture.Result.
27011func (future *VirtualNetworkGatewayConnectionsUpdateTagsFuture) result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
27012	var done bool
27013	done, err = future.DoneWithContext(context.Background(), client)
27014	if err != nil {
27015		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
27016		return
27017	}
27018	if !done {
27019		vngc.Response.Response = future.Response()
27020		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsUpdateTagsFuture")
27021		return
27022	}
27023	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
27024	if vngc.Response.Response, err = future.GetResult(sender); err == nil && vngc.Response.Response.StatusCode != http.StatusNoContent {
27025		vngc, err = client.UpdateTagsResponder(vngc.Response.Response)
27026		if err != nil {
27027			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", vngc.Response.Response, "Failure responding to request")
27028		}
27029	}
27030	return
27031}
27032
27033// VirtualNetworkGatewayIPConfiguration IP configuration for virtual network gateway
27034type VirtualNetworkGatewayIPConfiguration struct {
27035	// VirtualNetworkGatewayIPConfigurationPropertiesFormat - Properties of the virtual network gateway ip configuration.
27036	*VirtualNetworkGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"`
27037	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
27038	Name *string `json:"name,omitempty"`
27039	// Etag - A unique read-only string that changes whenever the resource is updated.
27040	Etag *string `json:"etag,omitempty"`
27041	// ID - Resource ID.
27042	ID *string `json:"id,omitempty"`
27043}
27044
27045// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfiguration.
27046func (vngic VirtualNetworkGatewayIPConfiguration) MarshalJSON() ([]byte, error) {
27047	objectMap := make(map[string]interface{})
27048	if vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat != nil {
27049		objectMap["properties"] = vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat
27050	}
27051	if vngic.Name != nil {
27052		objectMap["name"] = vngic.Name
27053	}
27054	if vngic.Etag != nil {
27055		objectMap["etag"] = vngic.Etag
27056	}
27057	if vngic.ID != nil {
27058		objectMap["id"] = vngic.ID
27059	}
27060	return json.Marshal(objectMap)
27061}
27062
27063// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayIPConfiguration struct.
27064func (vngic *VirtualNetworkGatewayIPConfiguration) UnmarshalJSON(body []byte) error {
27065	var m map[string]*json.RawMessage
27066	err := json.Unmarshal(body, &m)
27067	if err != nil {
27068		return err
27069	}
27070	for k, v := range m {
27071		switch k {
27072		case "properties":
27073			if v != nil {
27074				var virtualNetworkGatewayIPConfigurationPropertiesFormat VirtualNetworkGatewayIPConfigurationPropertiesFormat
27075				err = json.Unmarshal(*v, &virtualNetworkGatewayIPConfigurationPropertiesFormat)
27076				if err != nil {
27077					return err
27078				}
27079				vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat = &virtualNetworkGatewayIPConfigurationPropertiesFormat
27080			}
27081		case "name":
27082			if v != nil {
27083				var name string
27084				err = json.Unmarshal(*v, &name)
27085				if err != nil {
27086					return err
27087				}
27088				vngic.Name = &name
27089			}
27090		case "etag":
27091			if v != nil {
27092				var etag string
27093				err = json.Unmarshal(*v, &etag)
27094				if err != nil {
27095					return err
27096				}
27097				vngic.Etag = &etag
27098			}
27099		case "id":
27100			if v != nil {
27101				var ID string
27102				err = json.Unmarshal(*v, &ID)
27103				if err != nil {
27104					return err
27105				}
27106				vngic.ID = &ID
27107			}
27108		}
27109	}
27110
27111	return nil
27112}
27113
27114// VirtualNetworkGatewayIPConfigurationPropertiesFormat properties of VirtualNetworkGatewayIPConfiguration
27115type VirtualNetworkGatewayIPConfigurationPropertiesFormat struct {
27116	// PrivateIPAllocationMethod - The private IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
27117	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
27118	// Subnet - The reference of the subnet resource.
27119	Subnet *SubResource `json:"subnet,omitempty"`
27120	// PublicIPAddress - The reference of the public IP resource.
27121	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
27122	// ProvisioningState - READ-ONLY; The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
27123	ProvisioningState *string `json:"provisioningState,omitempty"`
27124}
27125
27126// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfigurationPropertiesFormat.
27127func (vngicpf VirtualNetworkGatewayIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
27128	objectMap := make(map[string]interface{})
27129	if vngicpf.PrivateIPAllocationMethod != "" {
27130		objectMap["privateIPAllocationMethod"] = vngicpf.PrivateIPAllocationMethod
27131	}
27132	if vngicpf.Subnet != nil {
27133		objectMap["subnet"] = vngicpf.Subnet
27134	}
27135	if vngicpf.PublicIPAddress != nil {
27136		objectMap["publicIPAddress"] = vngicpf.PublicIPAddress
27137	}
27138	return json.Marshal(objectMap)
27139}
27140
27141// VirtualNetworkGatewayListConnectionsResult response for the VirtualNetworkGatewayListConnections API
27142// service call
27143type VirtualNetworkGatewayListConnectionsResult struct {
27144	autorest.Response `json:"-"`
27145	// Value - Gets a list of VirtualNetworkGatewayConnection resources that exists in a resource group.
27146	Value *[]VirtualNetworkGatewayConnectionListEntity `json:"value,omitempty"`
27147	// NextLink - READ-ONLY; The URL to get the next set of results.
27148	NextLink *string `json:"nextLink,omitempty"`
27149}
27150
27151// MarshalJSON is the custom marshaler for VirtualNetworkGatewayListConnectionsResult.
27152func (vnglcr VirtualNetworkGatewayListConnectionsResult) MarshalJSON() ([]byte, error) {
27153	objectMap := make(map[string]interface{})
27154	if vnglcr.Value != nil {
27155		objectMap["value"] = vnglcr.Value
27156	}
27157	return json.Marshal(objectMap)
27158}
27159
27160// VirtualNetworkGatewayListConnectionsResultIterator provides access to a complete listing of
27161// VirtualNetworkGatewayConnectionListEntity values.
27162type VirtualNetworkGatewayListConnectionsResultIterator struct {
27163	i    int
27164	page VirtualNetworkGatewayListConnectionsResultPage
27165}
27166
27167// NextWithContext advances to the next value.  If there was an error making
27168// the request the iterator does not advance and the error is returned.
27169func (iter *VirtualNetworkGatewayListConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
27170	if tracing.IsEnabled() {
27171		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultIterator.NextWithContext")
27172		defer func() {
27173			sc := -1
27174			if iter.Response().Response.Response != nil {
27175				sc = iter.Response().Response.Response.StatusCode
27176			}
27177			tracing.EndSpan(ctx, sc, err)
27178		}()
27179	}
27180	iter.i++
27181	if iter.i < len(iter.page.Values()) {
27182		return nil
27183	}
27184	err = iter.page.NextWithContext(ctx)
27185	if err != nil {
27186		iter.i--
27187		return err
27188	}
27189	iter.i = 0
27190	return nil
27191}
27192
27193// Next advances to the next value.  If there was an error making
27194// the request the iterator does not advance and the error is returned.
27195// Deprecated: Use NextWithContext() instead.
27196func (iter *VirtualNetworkGatewayListConnectionsResultIterator) Next() error {
27197	return iter.NextWithContext(context.Background())
27198}
27199
27200// NotDone returns true if the enumeration should be started or is not yet complete.
27201func (iter VirtualNetworkGatewayListConnectionsResultIterator) NotDone() bool {
27202	return iter.page.NotDone() && iter.i < len(iter.page.Values())
27203}
27204
27205// Response returns the raw server response from the last page request.
27206func (iter VirtualNetworkGatewayListConnectionsResultIterator) Response() VirtualNetworkGatewayListConnectionsResult {
27207	return iter.page.Response()
27208}
27209
27210// Value returns the current value or a zero-initialized value if the
27211// iterator has advanced beyond the end of the collection.
27212func (iter VirtualNetworkGatewayListConnectionsResultIterator) Value() VirtualNetworkGatewayConnectionListEntity {
27213	if !iter.page.NotDone() {
27214		return VirtualNetworkGatewayConnectionListEntity{}
27215	}
27216	return iter.page.Values()[iter.i]
27217}
27218
27219// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultIterator type.
27220func NewVirtualNetworkGatewayListConnectionsResultIterator(page VirtualNetworkGatewayListConnectionsResultPage) VirtualNetworkGatewayListConnectionsResultIterator {
27221	return VirtualNetworkGatewayListConnectionsResultIterator{page: page}
27222}
27223
27224// IsEmpty returns true if the ListResult contains no values.
27225func (vnglcr VirtualNetworkGatewayListConnectionsResult) IsEmpty() bool {
27226	return vnglcr.Value == nil || len(*vnglcr.Value) == 0
27227}
27228
27229// hasNextLink returns true if the NextLink is not empty.
27230func (vnglcr VirtualNetworkGatewayListConnectionsResult) hasNextLink() bool {
27231	return vnglcr.NextLink != nil && len(*vnglcr.NextLink) != 0
27232}
27233
27234// virtualNetworkGatewayListConnectionsResultPreparer prepares a request to retrieve the next set of results.
27235// It returns nil if no more results exist.
27236func (vnglcr VirtualNetworkGatewayListConnectionsResult) virtualNetworkGatewayListConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
27237	if !vnglcr.hasNextLink() {
27238		return nil, nil
27239	}
27240	return autorest.Prepare((&http.Request{}).WithContext(ctx),
27241		autorest.AsJSON(),
27242		autorest.AsGet(),
27243		autorest.WithBaseURL(to.String(vnglcr.NextLink)))
27244}
27245
27246// VirtualNetworkGatewayListConnectionsResultPage contains a page of
27247// VirtualNetworkGatewayConnectionListEntity values.
27248type VirtualNetworkGatewayListConnectionsResultPage struct {
27249	fn     func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)
27250	vnglcr VirtualNetworkGatewayListConnectionsResult
27251}
27252
27253// NextWithContext advances to the next page of values.  If there was an error making
27254// the request the page does not advance and the error is returned.
27255func (page *VirtualNetworkGatewayListConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
27256	if tracing.IsEnabled() {
27257		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultPage.NextWithContext")
27258		defer func() {
27259			sc := -1
27260			if page.Response().Response.Response != nil {
27261				sc = page.Response().Response.Response.StatusCode
27262			}
27263			tracing.EndSpan(ctx, sc, err)
27264		}()
27265	}
27266	for {
27267		next, err := page.fn(ctx, page.vnglcr)
27268		if err != nil {
27269			return err
27270		}
27271		page.vnglcr = next
27272		if !next.hasNextLink() || !next.IsEmpty() {
27273			break
27274		}
27275	}
27276	return nil
27277}
27278
27279// Next advances to the next page of values.  If there was an error making
27280// the request the page does not advance and the error is returned.
27281// Deprecated: Use NextWithContext() instead.
27282func (page *VirtualNetworkGatewayListConnectionsResultPage) Next() error {
27283	return page.NextWithContext(context.Background())
27284}
27285
27286// NotDone returns true if the page enumeration should be started or is not yet complete.
27287func (page VirtualNetworkGatewayListConnectionsResultPage) NotDone() bool {
27288	return !page.vnglcr.IsEmpty()
27289}
27290
27291// Response returns the raw server response from the last page request.
27292func (page VirtualNetworkGatewayListConnectionsResultPage) Response() VirtualNetworkGatewayListConnectionsResult {
27293	return page.vnglcr
27294}
27295
27296// Values returns the slice of values for the current page or nil if there are no values.
27297func (page VirtualNetworkGatewayListConnectionsResultPage) Values() []VirtualNetworkGatewayConnectionListEntity {
27298	if page.vnglcr.IsEmpty() {
27299		return nil
27300	}
27301	return *page.vnglcr.Value
27302}
27303
27304// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultPage type.
27305func NewVirtualNetworkGatewayListConnectionsResultPage(cur VirtualNetworkGatewayListConnectionsResult, getNextPage func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)) VirtualNetworkGatewayListConnectionsResultPage {
27306	return VirtualNetworkGatewayListConnectionsResultPage{
27307		fn:     getNextPage,
27308		vnglcr: cur,
27309	}
27310}
27311
27312// VirtualNetworkGatewayListResult response for the ListVirtualNetworkGateways API service call.
27313type VirtualNetworkGatewayListResult struct {
27314	autorest.Response `json:"-"`
27315	// Value - Gets a list of VirtualNetworkGateway resources that exists in a resource group.
27316	Value *[]VirtualNetworkGateway `json:"value,omitempty"`
27317	// NextLink - READ-ONLY; The URL to get the next set of results.
27318	NextLink *string `json:"nextLink,omitempty"`
27319}
27320
27321// MarshalJSON is the custom marshaler for VirtualNetworkGatewayListResult.
27322func (vnglr VirtualNetworkGatewayListResult) MarshalJSON() ([]byte, error) {
27323	objectMap := make(map[string]interface{})
27324	if vnglr.Value != nil {
27325		objectMap["value"] = vnglr.Value
27326	}
27327	return json.Marshal(objectMap)
27328}
27329
27330// VirtualNetworkGatewayListResultIterator provides access to a complete listing of VirtualNetworkGateway
27331// values.
27332type VirtualNetworkGatewayListResultIterator struct {
27333	i    int
27334	page VirtualNetworkGatewayListResultPage
27335}
27336
27337// NextWithContext advances to the next value.  If there was an error making
27338// the request the iterator does not advance and the error is returned.
27339func (iter *VirtualNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
27340	if tracing.IsEnabled() {
27341		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultIterator.NextWithContext")
27342		defer func() {
27343			sc := -1
27344			if iter.Response().Response.Response != nil {
27345				sc = iter.Response().Response.Response.StatusCode
27346			}
27347			tracing.EndSpan(ctx, sc, err)
27348		}()
27349	}
27350	iter.i++
27351	if iter.i < len(iter.page.Values()) {
27352		return nil
27353	}
27354	err = iter.page.NextWithContext(ctx)
27355	if err != nil {
27356		iter.i--
27357		return err
27358	}
27359	iter.i = 0
27360	return nil
27361}
27362
27363// Next advances to the next value.  If there was an error making
27364// the request the iterator does not advance and the error is returned.
27365// Deprecated: Use NextWithContext() instead.
27366func (iter *VirtualNetworkGatewayListResultIterator) Next() error {
27367	return iter.NextWithContext(context.Background())
27368}
27369
27370// NotDone returns true if the enumeration should be started or is not yet complete.
27371func (iter VirtualNetworkGatewayListResultIterator) NotDone() bool {
27372	return iter.page.NotDone() && iter.i < len(iter.page.Values())
27373}
27374
27375// Response returns the raw server response from the last page request.
27376func (iter VirtualNetworkGatewayListResultIterator) Response() VirtualNetworkGatewayListResult {
27377	return iter.page.Response()
27378}
27379
27380// Value returns the current value or a zero-initialized value if the
27381// iterator has advanced beyond the end of the collection.
27382func (iter VirtualNetworkGatewayListResultIterator) Value() VirtualNetworkGateway {
27383	if !iter.page.NotDone() {
27384		return VirtualNetworkGateway{}
27385	}
27386	return iter.page.Values()[iter.i]
27387}
27388
27389// Creates a new instance of the VirtualNetworkGatewayListResultIterator type.
27390func NewVirtualNetworkGatewayListResultIterator(page VirtualNetworkGatewayListResultPage) VirtualNetworkGatewayListResultIterator {
27391	return VirtualNetworkGatewayListResultIterator{page: page}
27392}
27393
27394// IsEmpty returns true if the ListResult contains no values.
27395func (vnglr VirtualNetworkGatewayListResult) IsEmpty() bool {
27396	return vnglr.Value == nil || len(*vnglr.Value) == 0
27397}
27398
27399// hasNextLink returns true if the NextLink is not empty.
27400func (vnglr VirtualNetworkGatewayListResult) hasNextLink() bool {
27401	return vnglr.NextLink != nil && len(*vnglr.NextLink) != 0
27402}
27403
27404// virtualNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results.
27405// It returns nil if no more results exist.
27406func (vnglr VirtualNetworkGatewayListResult) virtualNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
27407	if !vnglr.hasNextLink() {
27408		return nil, nil
27409	}
27410	return autorest.Prepare((&http.Request{}).WithContext(ctx),
27411		autorest.AsJSON(),
27412		autorest.AsGet(),
27413		autorest.WithBaseURL(to.String(vnglr.NextLink)))
27414}
27415
27416// VirtualNetworkGatewayListResultPage contains a page of VirtualNetworkGateway values.
27417type VirtualNetworkGatewayListResultPage struct {
27418	fn    func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)
27419	vnglr VirtualNetworkGatewayListResult
27420}
27421
27422// NextWithContext advances to the next page of values.  If there was an error making
27423// the request the page does not advance and the error is returned.
27424func (page *VirtualNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
27425	if tracing.IsEnabled() {
27426		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultPage.NextWithContext")
27427		defer func() {
27428			sc := -1
27429			if page.Response().Response.Response != nil {
27430				sc = page.Response().Response.Response.StatusCode
27431			}
27432			tracing.EndSpan(ctx, sc, err)
27433		}()
27434	}
27435	for {
27436		next, err := page.fn(ctx, page.vnglr)
27437		if err != nil {
27438			return err
27439		}
27440		page.vnglr = next
27441		if !next.hasNextLink() || !next.IsEmpty() {
27442			break
27443		}
27444	}
27445	return nil
27446}
27447
27448// Next advances to the next page of values.  If there was an error making
27449// the request the page does not advance and the error is returned.
27450// Deprecated: Use NextWithContext() instead.
27451func (page *VirtualNetworkGatewayListResultPage) Next() error {
27452	return page.NextWithContext(context.Background())
27453}
27454
27455// NotDone returns true if the page enumeration should be started or is not yet complete.
27456func (page VirtualNetworkGatewayListResultPage) NotDone() bool {
27457	return !page.vnglr.IsEmpty()
27458}
27459
27460// Response returns the raw server response from the last page request.
27461func (page VirtualNetworkGatewayListResultPage) Response() VirtualNetworkGatewayListResult {
27462	return page.vnglr
27463}
27464
27465// Values returns the slice of values for the current page or nil if there are no values.
27466func (page VirtualNetworkGatewayListResultPage) Values() []VirtualNetworkGateway {
27467	if page.vnglr.IsEmpty() {
27468		return nil
27469	}
27470	return *page.vnglr.Value
27471}
27472
27473// Creates a new instance of the VirtualNetworkGatewayListResultPage type.
27474func NewVirtualNetworkGatewayListResultPage(cur VirtualNetworkGatewayListResult, getNextPage func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)) VirtualNetworkGatewayListResultPage {
27475	return VirtualNetworkGatewayListResultPage{
27476		fn:    getNextPage,
27477		vnglr: cur,
27478	}
27479}
27480
27481// VirtualNetworkGatewayPropertiesFormat virtualNetworkGateway properties
27482type VirtualNetworkGatewayPropertiesFormat struct {
27483	// IPConfigurations - IP configurations for virtual network gateway.
27484	IPConfigurations *[]VirtualNetworkGatewayIPConfiguration `json:"ipConfigurations,omitempty"`
27485	// GatewayType - The type of this virtual network gateway. Possible values are: 'Vpn' and 'ExpressRoute'. Possible values include: 'VirtualNetworkGatewayTypeVpn', 'VirtualNetworkGatewayTypeExpressRoute'
27486	GatewayType VirtualNetworkGatewayType `json:"gatewayType,omitempty"`
27487	// VpnType - The type of this virtual network gateway. Possible values are: 'PolicyBased' and 'RouteBased'. Possible values include: 'PolicyBased', 'RouteBased'
27488	VpnType VpnType `json:"vpnType,omitempty"`
27489	// EnableBgp - Whether BGP is enabled for this virtual network gateway or not.
27490	EnableBgp *bool `json:"enableBgp,omitempty"`
27491	// ActiveActive - ActiveActive flag
27492	ActiveActive *bool `json:"activeActive,omitempty"`
27493	// 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.
27494	GatewayDefaultSite *SubResource `json:"gatewayDefaultSite,omitempty"`
27495	// Sku - The reference of the VirtualNetworkGatewaySku resource which represents the SKU selected for Virtual network gateway.
27496	Sku *VirtualNetworkGatewaySku `json:"sku,omitempty"`
27497	// VpnClientConfiguration - The reference of the VpnClientConfiguration resource which represents the P2S VpnClient configurations.
27498	VpnClientConfiguration *VpnClientConfiguration `json:"vpnClientConfiguration,omitempty"`
27499	// BgpSettings - Virtual network gateway's BGP speaker settings.
27500	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
27501	// ResourceGUID - The resource GUID property of the VirtualNetworkGateway resource.
27502	ResourceGUID *string `json:"resourceGuid,omitempty"`
27503	// ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
27504	ProvisioningState *string `json:"provisioningState,omitempty"`
27505}
27506
27507// MarshalJSON is the custom marshaler for VirtualNetworkGatewayPropertiesFormat.
27508func (vngpf VirtualNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
27509	objectMap := make(map[string]interface{})
27510	if vngpf.IPConfigurations != nil {
27511		objectMap["ipConfigurations"] = vngpf.IPConfigurations
27512	}
27513	if vngpf.GatewayType != "" {
27514		objectMap["gatewayType"] = vngpf.GatewayType
27515	}
27516	if vngpf.VpnType != "" {
27517		objectMap["vpnType"] = vngpf.VpnType
27518	}
27519	if vngpf.EnableBgp != nil {
27520		objectMap["enableBgp"] = vngpf.EnableBgp
27521	}
27522	if vngpf.ActiveActive != nil {
27523		objectMap["activeActive"] = vngpf.ActiveActive
27524	}
27525	if vngpf.GatewayDefaultSite != nil {
27526		objectMap["gatewayDefaultSite"] = vngpf.GatewayDefaultSite
27527	}
27528	if vngpf.Sku != nil {
27529		objectMap["sku"] = vngpf.Sku
27530	}
27531	if vngpf.VpnClientConfiguration != nil {
27532		objectMap["vpnClientConfiguration"] = vngpf.VpnClientConfiguration
27533	}
27534	if vngpf.BgpSettings != nil {
27535		objectMap["bgpSettings"] = vngpf.BgpSettings
27536	}
27537	if vngpf.ResourceGUID != nil {
27538		objectMap["resourceGuid"] = vngpf.ResourceGUID
27539	}
27540	return json.Marshal(objectMap)
27541}
27542
27543// VirtualNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
27544// long-running operation.
27545type VirtualNetworkGatewaysCreateOrUpdateFuture struct {
27546	azure.FutureAPI
27547	// Result returns the result of the asynchronous operation.
27548	// If the operation has not completed it will return an error.
27549	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
27550}
27551
27552// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27553func (future *VirtualNetworkGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
27554	var azFuture azure.Future
27555	if err := json.Unmarshal(body, &azFuture); err != nil {
27556		return err
27557	}
27558	future.FutureAPI = &azFuture
27559	future.Result = future.result
27560	return nil
27561}
27562
27563// result is the default implementation for VirtualNetworkGatewaysCreateOrUpdateFuture.Result.
27564func (future *VirtualNetworkGatewaysCreateOrUpdateFuture) result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
27565	var done bool
27566	done, err = future.DoneWithContext(context.Background(), client)
27567	if err != nil {
27568		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
27569		return
27570	}
27571	if !done {
27572		vng.Response.Response = future.Response()
27573		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysCreateOrUpdateFuture")
27574		return
27575	}
27576	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
27577	if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
27578		vng, err = client.CreateOrUpdateResponder(vng.Response.Response)
27579		if err != nil {
27580			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", vng.Response.Response, "Failure responding to request")
27581		}
27582	}
27583	return
27584}
27585
27586// VirtualNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
27587// long-running operation.
27588type VirtualNetworkGatewaysDeleteFuture struct {
27589	azure.FutureAPI
27590	// Result returns the result of the asynchronous operation.
27591	// If the operation has not completed it will return an error.
27592	Result func(VirtualNetworkGatewaysClient) (autorest.Response, error)
27593}
27594
27595// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27596func (future *VirtualNetworkGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
27597	var azFuture azure.Future
27598	if err := json.Unmarshal(body, &azFuture); err != nil {
27599		return err
27600	}
27601	future.FutureAPI = &azFuture
27602	future.Result = future.result
27603	return nil
27604}
27605
27606// result is the default implementation for VirtualNetworkGatewaysDeleteFuture.Result.
27607func (future *VirtualNetworkGatewaysDeleteFuture) result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
27608	var done bool
27609	done, err = future.DoneWithContext(context.Background(), client)
27610	if err != nil {
27611		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
27612		return
27613	}
27614	if !done {
27615		ar.Response = future.Response()
27616		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDeleteFuture")
27617		return
27618	}
27619	ar.Response = future.Response()
27620	return
27621}
27622
27623// VirtualNetworkGatewaysGeneratevpnclientpackageFuture an abstraction for monitoring and retrieving the
27624// results of a long-running operation.
27625type VirtualNetworkGatewaysGeneratevpnclientpackageFuture struct {
27626	azure.FutureAPI
27627	// Result returns the result of the asynchronous operation.
27628	// If the operation has not completed it will return an error.
27629	Result func(VirtualNetworkGatewaysClient) (String, error)
27630}
27631
27632// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27633func (future *VirtualNetworkGatewaysGeneratevpnclientpackageFuture) UnmarshalJSON(body []byte) error {
27634	var azFuture azure.Future
27635	if err := json.Unmarshal(body, &azFuture); err != nil {
27636		return err
27637	}
27638	future.FutureAPI = &azFuture
27639	future.Result = future.result
27640	return nil
27641}
27642
27643// result is the default implementation for VirtualNetworkGatewaysGeneratevpnclientpackageFuture.Result.
27644func (future *VirtualNetworkGatewaysGeneratevpnclientpackageFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) {
27645	var done bool
27646	done, err = future.DoneWithContext(context.Background(), client)
27647	if err != nil {
27648		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", future.Response(), "Polling failure")
27649		return
27650	}
27651	if !done {
27652		s.Response.Response = future.Response()
27653		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture")
27654		return
27655	}
27656	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
27657	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
27658		s, err = client.GeneratevpnclientpackageResponder(s.Response.Response)
27659		if err != nil {
27660			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", s.Response.Response, "Failure responding to request")
27661		}
27662	}
27663	return
27664}
27665
27666// VirtualNetworkGatewaysGenerateVpnProfileFuture an abstraction for monitoring and retrieving the results
27667// of a long-running operation.
27668type VirtualNetworkGatewaysGenerateVpnProfileFuture struct {
27669	azure.FutureAPI
27670	// Result returns the result of the asynchronous operation.
27671	// If the operation has not completed it will return an error.
27672	Result func(VirtualNetworkGatewaysClient) (String, error)
27673}
27674
27675// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27676func (future *VirtualNetworkGatewaysGenerateVpnProfileFuture) UnmarshalJSON(body []byte) error {
27677	var azFuture azure.Future
27678	if err := json.Unmarshal(body, &azFuture); err != nil {
27679		return err
27680	}
27681	future.FutureAPI = &azFuture
27682	future.Result = future.result
27683	return nil
27684}
27685
27686// result is the default implementation for VirtualNetworkGatewaysGenerateVpnProfileFuture.Result.
27687func (future *VirtualNetworkGatewaysGenerateVpnProfileFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) {
27688	var done bool
27689	done, err = future.DoneWithContext(context.Background(), client)
27690	if err != nil {
27691		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", future.Response(), "Polling failure")
27692		return
27693	}
27694	if !done {
27695		s.Response.Response = future.Response()
27696		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGenerateVpnProfileFuture")
27697		return
27698	}
27699	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
27700	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
27701		s, err = client.GenerateVpnProfileResponder(s.Response.Response)
27702		if err != nil {
27703			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", s.Response.Response, "Failure responding to request")
27704		}
27705	}
27706	return
27707}
27708
27709// VirtualNetworkGatewaysGetAdvertisedRoutesFuture an abstraction for monitoring and retrieving the results
27710// of a long-running operation.
27711type VirtualNetworkGatewaysGetAdvertisedRoutesFuture struct {
27712	azure.FutureAPI
27713	// Result returns the result of the asynchronous operation.
27714	// If the operation has not completed it will return an error.
27715	Result func(VirtualNetworkGatewaysClient) (GatewayRouteListResult, error)
27716}
27717
27718// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27719func (future *VirtualNetworkGatewaysGetAdvertisedRoutesFuture) UnmarshalJSON(body []byte) error {
27720	var azFuture azure.Future
27721	if err := json.Unmarshal(body, &azFuture); err != nil {
27722		return err
27723	}
27724	future.FutureAPI = &azFuture
27725	future.Result = future.result
27726	return nil
27727}
27728
27729// result is the default implementation for VirtualNetworkGatewaysGetAdvertisedRoutesFuture.Result.
27730func (future *VirtualNetworkGatewaysGetAdvertisedRoutesFuture) result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
27731	var done bool
27732	done, err = future.DoneWithContext(context.Background(), client)
27733	if err != nil {
27734		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", future.Response(), "Polling failure")
27735		return
27736	}
27737	if !done {
27738		grlr.Response.Response = future.Response()
27739		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture")
27740		return
27741	}
27742	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
27743	if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
27744		grlr, err = client.GetAdvertisedRoutesResponder(grlr.Response.Response)
27745		if err != nil {
27746			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
27747		}
27748	}
27749	return
27750}
27751
27752// VirtualNetworkGatewaysGetBgpPeerStatusFuture an abstraction for monitoring and retrieving the results of
27753// a long-running operation.
27754type VirtualNetworkGatewaysGetBgpPeerStatusFuture struct {
27755	azure.FutureAPI
27756	// Result returns the result of the asynchronous operation.
27757	// If the operation has not completed it will return an error.
27758	Result func(VirtualNetworkGatewaysClient) (BgpPeerStatusListResult, error)
27759}
27760
27761// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27762func (future *VirtualNetworkGatewaysGetBgpPeerStatusFuture) UnmarshalJSON(body []byte) error {
27763	var azFuture azure.Future
27764	if err := json.Unmarshal(body, &azFuture); err != nil {
27765		return err
27766	}
27767	future.FutureAPI = &azFuture
27768	future.Result = future.result
27769	return nil
27770}
27771
27772// result is the default implementation for VirtualNetworkGatewaysGetBgpPeerStatusFuture.Result.
27773func (future *VirtualNetworkGatewaysGetBgpPeerStatusFuture) result(client VirtualNetworkGatewaysClient) (bpslr BgpPeerStatusListResult, err error) {
27774	var done bool
27775	done, err = future.DoneWithContext(context.Background(), client)
27776	if err != nil {
27777		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", future.Response(), "Polling failure")
27778		return
27779	}
27780	if !done {
27781		bpslr.Response.Response = future.Response()
27782		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetBgpPeerStatusFuture")
27783		return
27784	}
27785	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
27786	if bpslr.Response.Response, err = future.GetResult(sender); err == nil && bpslr.Response.Response.StatusCode != http.StatusNoContent {
27787		bpslr, err = client.GetBgpPeerStatusResponder(bpslr.Response.Response)
27788		if err != nil {
27789			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", bpslr.Response.Response, "Failure responding to request")
27790		}
27791	}
27792	return
27793}
27794
27795// VirtualNetworkGatewaysGetLearnedRoutesFuture an abstraction for monitoring and retrieving the results of
27796// a long-running operation.
27797type VirtualNetworkGatewaysGetLearnedRoutesFuture struct {
27798	azure.FutureAPI
27799	// Result returns the result of the asynchronous operation.
27800	// If the operation has not completed it will return an error.
27801	Result func(VirtualNetworkGatewaysClient) (GatewayRouteListResult, error)
27802}
27803
27804// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27805func (future *VirtualNetworkGatewaysGetLearnedRoutesFuture) UnmarshalJSON(body []byte) error {
27806	var azFuture azure.Future
27807	if err := json.Unmarshal(body, &azFuture); err != nil {
27808		return err
27809	}
27810	future.FutureAPI = &azFuture
27811	future.Result = future.result
27812	return nil
27813}
27814
27815// result is the default implementation for VirtualNetworkGatewaysGetLearnedRoutesFuture.Result.
27816func (future *VirtualNetworkGatewaysGetLearnedRoutesFuture) result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
27817	var done bool
27818	done, err = future.DoneWithContext(context.Background(), client)
27819	if err != nil {
27820		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", future.Response(), "Polling failure")
27821		return
27822	}
27823	if !done {
27824		grlr.Response.Response = future.Response()
27825		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetLearnedRoutesFuture")
27826		return
27827	}
27828	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
27829	if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
27830		grlr, err = client.GetLearnedRoutesResponder(grlr.Response.Response)
27831		if err != nil {
27832			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
27833		}
27834	}
27835	return
27836}
27837
27838// VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture an abstraction for monitoring and retrieving the
27839// results of a long-running operation.
27840type VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture struct {
27841	azure.FutureAPI
27842	// Result returns the result of the asynchronous operation.
27843	// If the operation has not completed it will return an error.
27844	Result func(VirtualNetworkGatewaysClient) (VpnClientIPsecParameters, error)
27845}
27846
27847// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27848func (future *VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture) UnmarshalJSON(body []byte) error {
27849	var azFuture azure.Future
27850	if err := json.Unmarshal(body, &azFuture); err != nil {
27851		return err
27852	}
27853	future.FutureAPI = &azFuture
27854	future.Result = future.result
27855	return nil
27856}
27857
27858// result is the default implementation for VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture.Result.
27859func (future *VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture) result(client VirtualNetworkGatewaysClient) (vcipp VpnClientIPsecParameters, err error) {
27860	var done bool
27861	done, err = future.DoneWithContext(context.Background(), client)
27862	if err != nil {
27863		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture", "Result", future.Response(), "Polling failure")
27864		return
27865	}
27866	if !done {
27867		vcipp.Response.Response = future.Response()
27868		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture")
27869		return
27870	}
27871	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
27872	if vcipp.Response.Response, err = future.GetResult(sender); err == nil && vcipp.Response.Response.StatusCode != http.StatusNoContent {
27873		vcipp, err = client.GetVpnclientIpsecParametersResponder(vcipp.Response.Response)
27874		if err != nil {
27875			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture", "Result", vcipp.Response.Response, "Failure responding to request")
27876		}
27877	}
27878	return
27879}
27880
27881// VirtualNetworkGatewaysGetVpnProfilePackageURLFuture an abstraction for monitoring and retrieving the
27882// results of a long-running operation.
27883type VirtualNetworkGatewaysGetVpnProfilePackageURLFuture struct {
27884	azure.FutureAPI
27885	// Result returns the result of the asynchronous operation.
27886	// If the operation has not completed it will return an error.
27887	Result func(VirtualNetworkGatewaysClient) (String, error)
27888}
27889
27890// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27891func (future *VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) UnmarshalJSON(body []byte) error {
27892	var azFuture azure.Future
27893	if err := json.Unmarshal(body, &azFuture); err != nil {
27894		return err
27895	}
27896	future.FutureAPI = &azFuture
27897	future.Result = future.result
27898	return nil
27899}
27900
27901// result is the default implementation for VirtualNetworkGatewaysGetVpnProfilePackageURLFuture.Result.
27902func (future *VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) {
27903	var done bool
27904	done, err = future.DoneWithContext(context.Background(), client)
27905	if err != nil {
27906		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", future.Response(), "Polling failure")
27907		return
27908	}
27909	if !done {
27910		s.Response.Response = future.Response()
27911		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture")
27912		return
27913	}
27914	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
27915	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
27916		s, err = client.GetVpnProfilePackageURLResponder(s.Response.Response)
27917		if err != nil {
27918			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", s.Response.Response, "Failure responding to request")
27919		}
27920	}
27921	return
27922}
27923
27924// VirtualNetworkGatewaySku virtualNetworkGatewaySku details
27925type VirtualNetworkGatewaySku struct {
27926	// Name - Gateway SKU name. Possible values include: 'VirtualNetworkGatewaySkuNameBasic', 'VirtualNetworkGatewaySkuNameHighPerformance', 'VirtualNetworkGatewaySkuNameStandard', 'VirtualNetworkGatewaySkuNameUltraPerformance', 'VirtualNetworkGatewaySkuNameVpnGw1', 'VirtualNetworkGatewaySkuNameVpnGw2', 'VirtualNetworkGatewaySkuNameVpnGw3', 'VirtualNetworkGatewaySkuNameVpnGw1AZ', 'VirtualNetworkGatewaySkuNameVpnGw2AZ', 'VirtualNetworkGatewaySkuNameVpnGw3AZ', 'VirtualNetworkGatewaySkuNameErGw1AZ', 'VirtualNetworkGatewaySkuNameErGw2AZ', 'VirtualNetworkGatewaySkuNameErGw3AZ'
27927	Name VirtualNetworkGatewaySkuName `json:"name,omitempty"`
27928	// Tier - Gateway SKU tier. Possible values include: 'VirtualNetworkGatewaySkuTierBasic', 'VirtualNetworkGatewaySkuTierHighPerformance', 'VirtualNetworkGatewaySkuTierStandard', 'VirtualNetworkGatewaySkuTierUltraPerformance', 'VirtualNetworkGatewaySkuTierVpnGw1', 'VirtualNetworkGatewaySkuTierVpnGw2', 'VirtualNetworkGatewaySkuTierVpnGw3', 'VirtualNetworkGatewaySkuTierVpnGw1AZ', 'VirtualNetworkGatewaySkuTierVpnGw2AZ', 'VirtualNetworkGatewaySkuTierVpnGw3AZ', 'VirtualNetworkGatewaySkuTierErGw1AZ', 'VirtualNetworkGatewaySkuTierErGw2AZ', 'VirtualNetworkGatewaySkuTierErGw3AZ'
27929	Tier VirtualNetworkGatewaySkuTier `json:"tier,omitempty"`
27930	// Capacity - The capacity.
27931	Capacity *int32 `json:"capacity,omitempty"`
27932}
27933
27934// VirtualNetworkGatewaysResetFuture an abstraction for monitoring and retrieving the results of a
27935// long-running operation.
27936type VirtualNetworkGatewaysResetFuture struct {
27937	azure.FutureAPI
27938	// Result returns the result of the asynchronous operation.
27939	// If the operation has not completed it will return an error.
27940	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
27941}
27942
27943// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27944func (future *VirtualNetworkGatewaysResetFuture) UnmarshalJSON(body []byte) error {
27945	var azFuture azure.Future
27946	if err := json.Unmarshal(body, &azFuture); err != nil {
27947		return err
27948	}
27949	future.FutureAPI = &azFuture
27950	future.Result = future.result
27951	return nil
27952}
27953
27954// result is the default implementation for VirtualNetworkGatewaysResetFuture.Result.
27955func (future *VirtualNetworkGatewaysResetFuture) result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
27956	var done bool
27957	done, err = future.DoneWithContext(context.Background(), client)
27958	if err != nil {
27959		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", future.Response(), "Polling failure")
27960		return
27961	}
27962	if !done {
27963		vng.Response.Response = future.Response()
27964		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetFuture")
27965		return
27966	}
27967	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
27968	if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
27969		vng, err = client.ResetResponder(vng.Response.Response)
27970		if err != nil {
27971			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", vng.Response.Response, "Failure responding to request")
27972		}
27973	}
27974	return
27975}
27976
27977// VirtualNetworkGatewaysResetVpnClientSharedKeyFuture an abstraction for monitoring and retrieving the
27978// results of a long-running operation.
27979type VirtualNetworkGatewaysResetVpnClientSharedKeyFuture struct {
27980	azure.FutureAPI
27981	// Result returns the result of the asynchronous operation.
27982	// If the operation has not completed it will return an error.
27983	Result func(VirtualNetworkGatewaysClient) (autorest.Response, error)
27984}
27985
27986// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27987func (future *VirtualNetworkGatewaysResetVpnClientSharedKeyFuture) UnmarshalJSON(body []byte) error {
27988	var azFuture azure.Future
27989	if err := json.Unmarshal(body, &azFuture); err != nil {
27990		return err
27991	}
27992	future.FutureAPI = &azFuture
27993	future.Result = future.result
27994	return nil
27995}
27996
27997// result is the default implementation for VirtualNetworkGatewaysResetVpnClientSharedKeyFuture.Result.
27998func (future *VirtualNetworkGatewaysResetVpnClientSharedKeyFuture) result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
27999	var done bool
28000	done, err = future.DoneWithContext(context.Background(), client)
28001	if err != nil {
28002		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetVpnClientSharedKeyFuture", "Result", future.Response(), "Polling failure")
28003		return
28004	}
28005	if !done {
28006		ar.Response = future.Response()
28007		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetVpnClientSharedKeyFuture")
28008		return
28009	}
28010	ar.Response = future.Response()
28011	return
28012}
28013
28014// VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture an abstraction for monitoring and retrieving the
28015// results of a long-running operation.
28016type VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture struct {
28017	azure.FutureAPI
28018	// Result returns the result of the asynchronous operation.
28019	// If the operation has not completed it will return an error.
28020	Result func(VirtualNetworkGatewaysClient) (VpnClientIPsecParameters, error)
28021}
28022
28023// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28024func (future *VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture) UnmarshalJSON(body []byte) error {
28025	var azFuture azure.Future
28026	if err := json.Unmarshal(body, &azFuture); err != nil {
28027		return err
28028	}
28029	future.FutureAPI = &azFuture
28030	future.Result = future.result
28031	return nil
28032}
28033
28034// result is the default implementation for VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture.Result.
28035func (future *VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture) result(client VirtualNetworkGatewaysClient) (vcipp VpnClientIPsecParameters, err error) {
28036	var done bool
28037	done, err = future.DoneWithContext(context.Background(), client)
28038	if err != nil {
28039		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture", "Result", future.Response(), "Polling failure")
28040		return
28041	}
28042	if !done {
28043		vcipp.Response.Response = future.Response()
28044		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture")
28045		return
28046	}
28047	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
28048	if vcipp.Response.Response, err = future.GetResult(sender); err == nil && vcipp.Response.Response.StatusCode != http.StatusNoContent {
28049		vcipp, err = client.SetVpnclientIpsecParametersResponder(vcipp.Response.Response)
28050		if err != nil {
28051			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture", "Result", vcipp.Response.Response, "Failure responding to request")
28052		}
28053	}
28054	return
28055}
28056
28057// VirtualNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
28058// long-running operation.
28059type VirtualNetworkGatewaysUpdateTagsFuture struct {
28060	azure.FutureAPI
28061	// Result returns the result of the asynchronous operation.
28062	// If the operation has not completed it will return an error.
28063	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
28064}
28065
28066// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28067func (future *VirtualNetworkGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error {
28068	var azFuture azure.Future
28069	if err := json.Unmarshal(body, &azFuture); err != nil {
28070		return err
28071	}
28072	future.FutureAPI = &azFuture
28073	future.Result = future.result
28074	return nil
28075}
28076
28077// result is the default implementation for VirtualNetworkGatewaysUpdateTagsFuture.Result.
28078func (future *VirtualNetworkGatewaysUpdateTagsFuture) result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
28079	var done bool
28080	done, err = future.DoneWithContext(context.Background(), client)
28081	if err != nil {
28082		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
28083		return
28084	}
28085	if !done {
28086		vng.Response.Response = future.Response()
28087		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysUpdateTagsFuture")
28088		return
28089	}
28090	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
28091	if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
28092		vng, err = client.UpdateTagsResponder(vng.Response.Response)
28093		if err != nil {
28094			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", vng.Response.Response, "Failure responding to request")
28095		}
28096	}
28097	return
28098}
28099
28100// VirtualNetworkListResult response for the ListVirtualNetworks API service call.
28101type VirtualNetworkListResult struct {
28102	autorest.Response `json:"-"`
28103	// Value - Gets a list of VirtualNetwork resources in a resource group.
28104	Value *[]VirtualNetwork `json:"value,omitempty"`
28105	// NextLink - The URL to get the next set of results.
28106	NextLink *string `json:"nextLink,omitempty"`
28107}
28108
28109// VirtualNetworkListResultIterator provides access to a complete listing of VirtualNetwork values.
28110type VirtualNetworkListResultIterator struct {
28111	i    int
28112	page VirtualNetworkListResultPage
28113}
28114
28115// NextWithContext advances to the next value.  If there was an error making
28116// the request the iterator does not advance and the error is returned.
28117func (iter *VirtualNetworkListResultIterator) NextWithContext(ctx context.Context) (err error) {
28118	if tracing.IsEnabled() {
28119		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultIterator.NextWithContext")
28120		defer func() {
28121			sc := -1
28122			if iter.Response().Response.Response != nil {
28123				sc = iter.Response().Response.Response.StatusCode
28124			}
28125			tracing.EndSpan(ctx, sc, err)
28126		}()
28127	}
28128	iter.i++
28129	if iter.i < len(iter.page.Values()) {
28130		return nil
28131	}
28132	err = iter.page.NextWithContext(ctx)
28133	if err != nil {
28134		iter.i--
28135		return err
28136	}
28137	iter.i = 0
28138	return nil
28139}
28140
28141// Next advances to the next value.  If there was an error making
28142// the request the iterator does not advance and the error is returned.
28143// Deprecated: Use NextWithContext() instead.
28144func (iter *VirtualNetworkListResultIterator) Next() error {
28145	return iter.NextWithContext(context.Background())
28146}
28147
28148// NotDone returns true if the enumeration should be started or is not yet complete.
28149func (iter VirtualNetworkListResultIterator) NotDone() bool {
28150	return iter.page.NotDone() && iter.i < len(iter.page.Values())
28151}
28152
28153// Response returns the raw server response from the last page request.
28154func (iter VirtualNetworkListResultIterator) Response() VirtualNetworkListResult {
28155	return iter.page.Response()
28156}
28157
28158// Value returns the current value or a zero-initialized value if the
28159// iterator has advanced beyond the end of the collection.
28160func (iter VirtualNetworkListResultIterator) Value() VirtualNetwork {
28161	if !iter.page.NotDone() {
28162		return VirtualNetwork{}
28163	}
28164	return iter.page.Values()[iter.i]
28165}
28166
28167// Creates a new instance of the VirtualNetworkListResultIterator type.
28168func NewVirtualNetworkListResultIterator(page VirtualNetworkListResultPage) VirtualNetworkListResultIterator {
28169	return VirtualNetworkListResultIterator{page: page}
28170}
28171
28172// IsEmpty returns true if the ListResult contains no values.
28173func (vnlr VirtualNetworkListResult) IsEmpty() bool {
28174	return vnlr.Value == nil || len(*vnlr.Value) == 0
28175}
28176
28177// hasNextLink returns true if the NextLink is not empty.
28178func (vnlr VirtualNetworkListResult) hasNextLink() bool {
28179	return vnlr.NextLink != nil && len(*vnlr.NextLink) != 0
28180}
28181
28182// virtualNetworkListResultPreparer prepares a request to retrieve the next set of results.
28183// It returns nil if no more results exist.
28184func (vnlr VirtualNetworkListResult) virtualNetworkListResultPreparer(ctx context.Context) (*http.Request, error) {
28185	if !vnlr.hasNextLink() {
28186		return nil, nil
28187	}
28188	return autorest.Prepare((&http.Request{}).WithContext(ctx),
28189		autorest.AsJSON(),
28190		autorest.AsGet(),
28191		autorest.WithBaseURL(to.String(vnlr.NextLink)))
28192}
28193
28194// VirtualNetworkListResultPage contains a page of VirtualNetwork values.
28195type VirtualNetworkListResultPage struct {
28196	fn   func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)
28197	vnlr VirtualNetworkListResult
28198}
28199
28200// NextWithContext advances to the next page of values.  If there was an error making
28201// the request the page does not advance and the error is returned.
28202func (page *VirtualNetworkListResultPage) NextWithContext(ctx context.Context) (err error) {
28203	if tracing.IsEnabled() {
28204		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultPage.NextWithContext")
28205		defer func() {
28206			sc := -1
28207			if page.Response().Response.Response != nil {
28208				sc = page.Response().Response.Response.StatusCode
28209			}
28210			tracing.EndSpan(ctx, sc, err)
28211		}()
28212	}
28213	for {
28214		next, err := page.fn(ctx, page.vnlr)
28215		if err != nil {
28216			return err
28217		}
28218		page.vnlr = next
28219		if !next.hasNextLink() || !next.IsEmpty() {
28220			break
28221		}
28222	}
28223	return nil
28224}
28225
28226// Next advances to the next page of values.  If there was an error making
28227// the request the page does not advance and the error is returned.
28228// Deprecated: Use NextWithContext() instead.
28229func (page *VirtualNetworkListResultPage) Next() error {
28230	return page.NextWithContext(context.Background())
28231}
28232
28233// NotDone returns true if the page enumeration should be started or is not yet complete.
28234func (page VirtualNetworkListResultPage) NotDone() bool {
28235	return !page.vnlr.IsEmpty()
28236}
28237
28238// Response returns the raw server response from the last page request.
28239func (page VirtualNetworkListResultPage) Response() VirtualNetworkListResult {
28240	return page.vnlr
28241}
28242
28243// Values returns the slice of values for the current page or nil if there are no values.
28244func (page VirtualNetworkListResultPage) Values() []VirtualNetwork {
28245	if page.vnlr.IsEmpty() {
28246		return nil
28247	}
28248	return *page.vnlr.Value
28249}
28250
28251// Creates a new instance of the VirtualNetworkListResultPage type.
28252func NewVirtualNetworkListResultPage(cur VirtualNetworkListResult, getNextPage func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)) VirtualNetworkListResultPage {
28253	return VirtualNetworkListResultPage{
28254		fn:   getNextPage,
28255		vnlr: cur,
28256	}
28257}
28258
28259// VirtualNetworkListUsageResult response for the virtual networks GetUsage API service call.
28260type VirtualNetworkListUsageResult struct {
28261	autorest.Response `json:"-"`
28262	// Value - READ-ONLY; VirtualNetwork usage stats.
28263	Value *[]VirtualNetworkUsage `json:"value,omitempty"`
28264	// NextLink - The URL to get the next set of results.
28265	NextLink *string `json:"nextLink,omitempty"`
28266}
28267
28268// MarshalJSON is the custom marshaler for VirtualNetworkListUsageResult.
28269func (vnlur VirtualNetworkListUsageResult) MarshalJSON() ([]byte, error) {
28270	objectMap := make(map[string]interface{})
28271	if vnlur.NextLink != nil {
28272		objectMap["nextLink"] = vnlur.NextLink
28273	}
28274	return json.Marshal(objectMap)
28275}
28276
28277// VirtualNetworkListUsageResultIterator provides access to a complete listing of VirtualNetworkUsage
28278// values.
28279type VirtualNetworkListUsageResultIterator struct {
28280	i    int
28281	page VirtualNetworkListUsageResultPage
28282}
28283
28284// NextWithContext advances to the next value.  If there was an error making
28285// the request the iterator does not advance and the error is returned.
28286func (iter *VirtualNetworkListUsageResultIterator) NextWithContext(ctx context.Context) (err error) {
28287	if tracing.IsEnabled() {
28288		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultIterator.NextWithContext")
28289		defer func() {
28290			sc := -1
28291			if iter.Response().Response.Response != nil {
28292				sc = iter.Response().Response.Response.StatusCode
28293			}
28294			tracing.EndSpan(ctx, sc, err)
28295		}()
28296	}
28297	iter.i++
28298	if iter.i < len(iter.page.Values()) {
28299		return nil
28300	}
28301	err = iter.page.NextWithContext(ctx)
28302	if err != nil {
28303		iter.i--
28304		return err
28305	}
28306	iter.i = 0
28307	return nil
28308}
28309
28310// Next advances to the next value.  If there was an error making
28311// the request the iterator does not advance and the error is returned.
28312// Deprecated: Use NextWithContext() instead.
28313func (iter *VirtualNetworkListUsageResultIterator) Next() error {
28314	return iter.NextWithContext(context.Background())
28315}
28316
28317// NotDone returns true if the enumeration should be started or is not yet complete.
28318func (iter VirtualNetworkListUsageResultIterator) NotDone() bool {
28319	return iter.page.NotDone() && iter.i < len(iter.page.Values())
28320}
28321
28322// Response returns the raw server response from the last page request.
28323func (iter VirtualNetworkListUsageResultIterator) Response() VirtualNetworkListUsageResult {
28324	return iter.page.Response()
28325}
28326
28327// Value returns the current value or a zero-initialized value if the
28328// iterator has advanced beyond the end of the collection.
28329func (iter VirtualNetworkListUsageResultIterator) Value() VirtualNetworkUsage {
28330	if !iter.page.NotDone() {
28331		return VirtualNetworkUsage{}
28332	}
28333	return iter.page.Values()[iter.i]
28334}
28335
28336// Creates a new instance of the VirtualNetworkListUsageResultIterator type.
28337func NewVirtualNetworkListUsageResultIterator(page VirtualNetworkListUsageResultPage) VirtualNetworkListUsageResultIterator {
28338	return VirtualNetworkListUsageResultIterator{page: page}
28339}
28340
28341// IsEmpty returns true if the ListResult contains no values.
28342func (vnlur VirtualNetworkListUsageResult) IsEmpty() bool {
28343	return vnlur.Value == nil || len(*vnlur.Value) == 0
28344}
28345
28346// hasNextLink returns true if the NextLink is not empty.
28347func (vnlur VirtualNetworkListUsageResult) hasNextLink() bool {
28348	return vnlur.NextLink != nil && len(*vnlur.NextLink) != 0
28349}
28350
28351// virtualNetworkListUsageResultPreparer prepares a request to retrieve the next set of results.
28352// It returns nil if no more results exist.
28353func (vnlur VirtualNetworkListUsageResult) virtualNetworkListUsageResultPreparer(ctx context.Context) (*http.Request, error) {
28354	if !vnlur.hasNextLink() {
28355		return nil, nil
28356	}
28357	return autorest.Prepare((&http.Request{}).WithContext(ctx),
28358		autorest.AsJSON(),
28359		autorest.AsGet(),
28360		autorest.WithBaseURL(to.String(vnlur.NextLink)))
28361}
28362
28363// VirtualNetworkListUsageResultPage contains a page of VirtualNetworkUsage values.
28364type VirtualNetworkListUsageResultPage struct {
28365	fn    func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)
28366	vnlur VirtualNetworkListUsageResult
28367}
28368
28369// NextWithContext advances to the next page of values.  If there was an error making
28370// the request the page does not advance and the error is returned.
28371func (page *VirtualNetworkListUsageResultPage) NextWithContext(ctx context.Context) (err error) {
28372	if tracing.IsEnabled() {
28373		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultPage.NextWithContext")
28374		defer func() {
28375			sc := -1
28376			if page.Response().Response.Response != nil {
28377				sc = page.Response().Response.Response.StatusCode
28378			}
28379			tracing.EndSpan(ctx, sc, err)
28380		}()
28381	}
28382	for {
28383		next, err := page.fn(ctx, page.vnlur)
28384		if err != nil {
28385			return err
28386		}
28387		page.vnlur = next
28388		if !next.hasNextLink() || !next.IsEmpty() {
28389			break
28390		}
28391	}
28392	return nil
28393}
28394
28395// Next advances to the next page of values.  If there was an error making
28396// the request the page does not advance and the error is returned.
28397// Deprecated: Use NextWithContext() instead.
28398func (page *VirtualNetworkListUsageResultPage) Next() error {
28399	return page.NextWithContext(context.Background())
28400}
28401
28402// NotDone returns true if the page enumeration should be started or is not yet complete.
28403func (page VirtualNetworkListUsageResultPage) NotDone() bool {
28404	return !page.vnlur.IsEmpty()
28405}
28406
28407// Response returns the raw server response from the last page request.
28408func (page VirtualNetworkListUsageResultPage) Response() VirtualNetworkListUsageResult {
28409	return page.vnlur
28410}
28411
28412// Values returns the slice of values for the current page or nil if there are no values.
28413func (page VirtualNetworkListUsageResultPage) Values() []VirtualNetworkUsage {
28414	if page.vnlur.IsEmpty() {
28415		return nil
28416	}
28417	return *page.vnlur.Value
28418}
28419
28420// Creates a new instance of the VirtualNetworkListUsageResultPage type.
28421func NewVirtualNetworkListUsageResultPage(cur VirtualNetworkListUsageResult, getNextPage func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)) VirtualNetworkListUsageResultPage {
28422	return VirtualNetworkListUsageResultPage{
28423		fn:    getNextPage,
28424		vnlur: cur,
28425	}
28426}
28427
28428// VirtualNetworkPeering peerings in a virtual network resource.
28429type VirtualNetworkPeering struct {
28430	autorest.Response `json:"-"`
28431	// VirtualNetworkPeeringPropertiesFormat - Properties of the virtual network peering.
28432	*VirtualNetworkPeeringPropertiesFormat `json:"properties,omitempty"`
28433	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
28434	Name *string `json:"name,omitempty"`
28435	// Etag - A unique read-only string that changes whenever the resource is updated.
28436	Etag *string `json:"etag,omitempty"`
28437	// ID - Resource ID.
28438	ID *string `json:"id,omitempty"`
28439}
28440
28441// MarshalJSON is the custom marshaler for VirtualNetworkPeering.
28442func (vnp VirtualNetworkPeering) MarshalJSON() ([]byte, error) {
28443	objectMap := make(map[string]interface{})
28444	if vnp.VirtualNetworkPeeringPropertiesFormat != nil {
28445		objectMap["properties"] = vnp.VirtualNetworkPeeringPropertiesFormat
28446	}
28447	if vnp.Name != nil {
28448		objectMap["name"] = vnp.Name
28449	}
28450	if vnp.Etag != nil {
28451		objectMap["etag"] = vnp.Etag
28452	}
28453	if vnp.ID != nil {
28454		objectMap["id"] = vnp.ID
28455	}
28456	return json.Marshal(objectMap)
28457}
28458
28459// UnmarshalJSON is the custom unmarshaler for VirtualNetworkPeering struct.
28460func (vnp *VirtualNetworkPeering) UnmarshalJSON(body []byte) error {
28461	var m map[string]*json.RawMessage
28462	err := json.Unmarshal(body, &m)
28463	if err != nil {
28464		return err
28465	}
28466	for k, v := range m {
28467		switch k {
28468		case "properties":
28469			if v != nil {
28470				var virtualNetworkPeeringPropertiesFormat VirtualNetworkPeeringPropertiesFormat
28471				err = json.Unmarshal(*v, &virtualNetworkPeeringPropertiesFormat)
28472				if err != nil {
28473					return err
28474				}
28475				vnp.VirtualNetworkPeeringPropertiesFormat = &virtualNetworkPeeringPropertiesFormat
28476			}
28477		case "name":
28478			if v != nil {
28479				var name string
28480				err = json.Unmarshal(*v, &name)
28481				if err != nil {
28482					return err
28483				}
28484				vnp.Name = &name
28485			}
28486		case "etag":
28487			if v != nil {
28488				var etag string
28489				err = json.Unmarshal(*v, &etag)
28490				if err != nil {
28491					return err
28492				}
28493				vnp.Etag = &etag
28494			}
28495		case "id":
28496			if v != nil {
28497				var ID string
28498				err = json.Unmarshal(*v, &ID)
28499				if err != nil {
28500					return err
28501				}
28502				vnp.ID = &ID
28503			}
28504		}
28505	}
28506
28507	return nil
28508}
28509
28510// VirtualNetworkPeeringListResult response for ListSubnets API service call. Retrieves all subnets that
28511// belong to a virtual network.
28512type VirtualNetworkPeeringListResult struct {
28513	autorest.Response `json:"-"`
28514	// Value - The peerings in a virtual network.
28515	Value *[]VirtualNetworkPeering `json:"value,omitempty"`
28516	// NextLink - The URL to get the next set of results.
28517	NextLink *string `json:"nextLink,omitempty"`
28518}
28519
28520// VirtualNetworkPeeringListResultIterator provides access to a complete listing of VirtualNetworkPeering
28521// values.
28522type VirtualNetworkPeeringListResultIterator struct {
28523	i    int
28524	page VirtualNetworkPeeringListResultPage
28525}
28526
28527// NextWithContext advances to the next value.  If there was an error making
28528// the request the iterator does not advance and the error is returned.
28529func (iter *VirtualNetworkPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
28530	if tracing.IsEnabled() {
28531		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultIterator.NextWithContext")
28532		defer func() {
28533			sc := -1
28534			if iter.Response().Response.Response != nil {
28535				sc = iter.Response().Response.Response.StatusCode
28536			}
28537			tracing.EndSpan(ctx, sc, err)
28538		}()
28539	}
28540	iter.i++
28541	if iter.i < len(iter.page.Values()) {
28542		return nil
28543	}
28544	err = iter.page.NextWithContext(ctx)
28545	if err != nil {
28546		iter.i--
28547		return err
28548	}
28549	iter.i = 0
28550	return nil
28551}
28552
28553// Next advances to the next value.  If there was an error making
28554// the request the iterator does not advance and the error is returned.
28555// Deprecated: Use NextWithContext() instead.
28556func (iter *VirtualNetworkPeeringListResultIterator) Next() error {
28557	return iter.NextWithContext(context.Background())
28558}
28559
28560// NotDone returns true if the enumeration should be started or is not yet complete.
28561func (iter VirtualNetworkPeeringListResultIterator) NotDone() bool {
28562	return iter.page.NotDone() && iter.i < len(iter.page.Values())
28563}
28564
28565// Response returns the raw server response from the last page request.
28566func (iter VirtualNetworkPeeringListResultIterator) Response() VirtualNetworkPeeringListResult {
28567	return iter.page.Response()
28568}
28569
28570// Value returns the current value or a zero-initialized value if the
28571// iterator has advanced beyond the end of the collection.
28572func (iter VirtualNetworkPeeringListResultIterator) Value() VirtualNetworkPeering {
28573	if !iter.page.NotDone() {
28574		return VirtualNetworkPeering{}
28575	}
28576	return iter.page.Values()[iter.i]
28577}
28578
28579// Creates a new instance of the VirtualNetworkPeeringListResultIterator type.
28580func NewVirtualNetworkPeeringListResultIterator(page VirtualNetworkPeeringListResultPage) VirtualNetworkPeeringListResultIterator {
28581	return VirtualNetworkPeeringListResultIterator{page: page}
28582}
28583
28584// IsEmpty returns true if the ListResult contains no values.
28585func (vnplr VirtualNetworkPeeringListResult) IsEmpty() bool {
28586	return vnplr.Value == nil || len(*vnplr.Value) == 0
28587}
28588
28589// hasNextLink returns true if the NextLink is not empty.
28590func (vnplr VirtualNetworkPeeringListResult) hasNextLink() bool {
28591	return vnplr.NextLink != nil && len(*vnplr.NextLink) != 0
28592}
28593
28594// virtualNetworkPeeringListResultPreparer prepares a request to retrieve the next set of results.
28595// It returns nil if no more results exist.
28596func (vnplr VirtualNetworkPeeringListResult) virtualNetworkPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
28597	if !vnplr.hasNextLink() {
28598		return nil, nil
28599	}
28600	return autorest.Prepare((&http.Request{}).WithContext(ctx),
28601		autorest.AsJSON(),
28602		autorest.AsGet(),
28603		autorest.WithBaseURL(to.String(vnplr.NextLink)))
28604}
28605
28606// VirtualNetworkPeeringListResultPage contains a page of VirtualNetworkPeering values.
28607type VirtualNetworkPeeringListResultPage struct {
28608	fn    func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)
28609	vnplr VirtualNetworkPeeringListResult
28610}
28611
28612// NextWithContext advances to the next page of values.  If there was an error making
28613// the request the page does not advance and the error is returned.
28614func (page *VirtualNetworkPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
28615	if tracing.IsEnabled() {
28616		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultPage.NextWithContext")
28617		defer func() {
28618			sc := -1
28619			if page.Response().Response.Response != nil {
28620				sc = page.Response().Response.Response.StatusCode
28621			}
28622			tracing.EndSpan(ctx, sc, err)
28623		}()
28624	}
28625	for {
28626		next, err := page.fn(ctx, page.vnplr)
28627		if err != nil {
28628			return err
28629		}
28630		page.vnplr = next
28631		if !next.hasNextLink() || !next.IsEmpty() {
28632			break
28633		}
28634	}
28635	return nil
28636}
28637
28638// Next advances to the next page of values.  If there was an error making
28639// the request the page does not advance and the error is returned.
28640// Deprecated: Use NextWithContext() instead.
28641func (page *VirtualNetworkPeeringListResultPage) Next() error {
28642	return page.NextWithContext(context.Background())
28643}
28644
28645// NotDone returns true if the page enumeration should be started or is not yet complete.
28646func (page VirtualNetworkPeeringListResultPage) NotDone() bool {
28647	return !page.vnplr.IsEmpty()
28648}
28649
28650// Response returns the raw server response from the last page request.
28651func (page VirtualNetworkPeeringListResultPage) Response() VirtualNetworkPeeringListResult {
28652	return page.vnplr
28653}
28654
28655// Values returns the slice of values for the current page or nil if there are no values.
28656func (page VirtualNetworkPeeringListResultPage) Values() []VirtualNetworkPeering {
28657	if page.vnplr.IsEmpty() {
28658		return nil
28659	}
28660	return *page.vnplr.Value
28661}
28662
28663// Creates a new instance of the VirtualNetworkPeeringListResultPage type.
28664func NewVirtualNetworkPeeringListResultPage(cur VirtualNetworkPeeringListResult, getNextPage func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)) VirtualNetworkPeeringListResultPage {
28665	return VirtualNetworkPeeringListResultPage{
28666		fn:    getNextPage,
28667		vnplr: cur,
28668	}
28669}
28670
28671// VirtualNetworkPeeringPropertiesFormat properties of the virtual network peering.
28672type VirtualNetworkPeeringPropertiesFormat struct {
28673	// AllowVirtualNetworkAccess - Whether the VMs in the linked virtual network space would be able to access all the VMs in local Virtual network space.
28674	AllowVirtualNetworkAccess *bool `json:"allowVirtualNetworkAccess,omitempty"`
28675	// AllowForwardedTraffic - Whether the forwarded traffic from the VMs in the remote virtual network will be allowed/disallowed.
28676	AllowForwardedTraffic *bool `json:"allowForwardedTraffic,omitempty"`
28677	// AllowGatewayTransit - If gateway links can be used in remote virtual networking to link to this virtual network.
28678	AllowGatewayTransit *bool `json:"allowGatewayTransit,omitempty"`
28679	// 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.
28680	UseRemoteGateways *bool `json:"useRemoteGateways,omitempty"`
28681	// 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).
28682	RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"`
28683	// RemoteAddressSpace - The reference of the remote virtual network address space.
28684	RemoteAddressSpace *AddressSpace `json:"remoteAddressSpace,omitempty"`
28685	// PeeringState - The status of the virtual network peering. Possible values are 'Initiated', 'Connected', and 'Disconnected'. Possible values include: 'VirtualNetworkPeeringStateInitiated', 'VirtualNetworkPeeringStateConnected', 'VirtualNetworkPeeringStateDisconnected'
28686	PeeringState VirtualNetworkPeeringState `json:"peeringState,omitempty"`
28687	// ProvisioningState - The provisioning state of the resource.
28688	ProvisioningState *string `json:"provisioningState,omitempty"`
28689}
28690
28691// VirtualNetworkPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
28692// long-running operation.
28693type VirtualNetworkPeeringsCreateOrUpdateFuture struct {
28694	azure.FutureAPI
28695	// Result returns the result of the asynchronous operation.
28696	// If the operation has not completed it will return an error.
28697	Result func(VirtualNetworkPeeringsClient) (VirtualNetworkPeering, error)
28698}
28699
28700// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28701func (future *VirtualNetworkPeeringsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
28702	var azFuture azure.Future
28703	if err := json.Unmarshal(body, &azFuture); err != nil {
28704		return err
28705	}
28706	future.FutureAPI = &azFuture
28707	future.Result = future.result
28708	return nil
28709}
28710
28711// result is the default implementation for VirtualNetworkPeeringsCreateOrUpdateFuture.Result.
28712func (future *VirtualNetworkPeeringsCreateOrUpdateFuture) result(client VirtualNetworkPeeringsClient) (vnp VirtualNetworkPeering, err error) {
28713	var done bool
28714	done, err = future.DoneWithContext(context.Background(), client)
28715	if err != nil {
28716		err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
28717		return
28718	}
28719	if !done {
28720		vnp.Response.Response = future.Response()
28721		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsCreateOrUpdateFuture")
28722		return
28723	}
28724	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
28725	if vnp.Response.Response, err = future.GetResult(sender); err == nil && vnp.Response.Response.StatusCode != http.StatusNoContent {
28726		vnp, err = client.CreateOrUpdateResponder(vnp.Response.Response)
28727		if err != nil {
28728			err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", vnp.Response.Response, "Failure responding to request")
28729		}
28730	}
28731	return
28732}
28733
28734// VirtualNetworkPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
28735// long-running operation.
28736type VirtualNetworkPeeringsDeleteFuture struct {
28737	azure.FutureAPI
28738	// Result returns the result of the asynchronous operation.
28739	// If the operation has not completed it will return an error.
28740	Result func(VirtualNetworkPeeringsClient) (autorest.Response, error)
28741}
28742
28743// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28744func (future *VirtualNetworkPeeringsDeleteFuture) UnmarshalJSON(body []byte) error {
28745	var azFuture azure.Future
28746	if err := json.Unmarshal(body, &azFuture); err != nil {
28747		return err
28748	}
28749	future.FutureAPI = &azFuture
28750	future.Result = future.result
28751	return nil
28752}
28753
28754// result is the default implementation for VirtualNetworkPeeringsDeleteFuture.Result.
28755func (future *VirtualNetworkPeeringsDeleteFuture) result(client VirtualNetworkPeeringsClient) (ar autorest.Response, err error) {
28756	var done bool
28757	done, err = future.DoneWithContext(context.Background(), client)
28758	if err != nil {
28759		err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
28760		return
28761	}
28762	if !done {
28763		ar.Response = future.Response()
28764		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsDeleteFuture")
28765		return
28766	}
28767	ar.Response = future.Response()
28768	return
28769}
28770
28771// VirtualNetworkPropertiesFormat properties of the virtual network.
28772type VirtualNetworkPropertiesFormat struct {
28773	// AddressSpace - The AddressSpace that contains an array of IP address ranges that can be used by subnets.
28774	AddressSpace *AddressSpace `json:"addressSpace,omitempty"`
28775	// DhcpOptions - The dhcpOptions that contains an array of DNS servers available to VMs deployed in the virtual network.
28776	DhcpOptions *DhcpOptions `json:"dhcpOptions,omitempty"`
28777	// Subnets - A list of subnets in a Virtual Network.
28778	Subnets *[]Subnet `json:"subnets,omitempty"`
28779	// VirtualNetworkPeerings - A list of peerings in a Virtual Network.
28780	VirtualNetworkPeerings *[]VirtualNetworkPeering `json:"virtualNetworkPeerings,omitempty"`
28781	// ResourceGUID - The resourceGuid property of the Virtual Network resource.
28782	ResourceGUID *string `json:"resourceGuid,omitempty"`
28783	// ProvisioningState - The provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
28784	ProvisioningState *string `json:"provisioningState,omitempty"`
28785	// 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.
28786	EnableDdosProtection *bool `json:"enableDdosProtection,omitempty"`
28787	// EnableVMProtection - Indicates if VM protection is enabled for all the subnets in the virtual network.
28788	EnableVMProtection *bool `json:"enableVmProtection,omitempty"`
28789	// DdosProtectionPlan - The DDoS protection plan associated with the virtual network.
28790	DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"`
28791}
28792
28793// VirtualNetworksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
28794// long-running operation.
28795type VirtualNetworksCreateOrUpdateFuture struct {
28796	azure.FutureAPI
28797	// Result returns the result of the asynchronous operation.
28798	// If the operation has not completed it will return an error.
28799	Result func(VirtualNetworksClient) (VirtualNetwork, error)
28800}
28801
28802// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28803func (future *VirtualNetworksCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
28804	var azFuture azure.Future
28805	if err := json.Unmarshal(body, &azFuture); err != nil {
28806		return err
28807	}
28808	future.FutureAPI = &azFuture
28809	future.Result = future.result
28810	return nil
28811}
28812
28813// result is the default implementation for VirtualNetworksCreateOrUpdateFuture.Result.
28814func (future *VirtualNetworksCreateOrUpdateFuture) result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
28815	var done bool
28816	done, err = future.DoneWithContext(context.Background(), client)
28817	if err != nil {
28818		err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
28819		return
28820	}
28821	if !done {
28822		vn.Response.Response = future.Response()
28823		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksCreateOrUpdateFuture")
28824		return
28825	}
28826	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
28827	if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
28828		vn, err = client.CreateOrUpdateResponder(vn.Response.Response)
28829		if err != nil {
28830			err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", vn.Response.Response, "Failure responding to request")
28831		}
28832	}
28833	return
28834}
28835
28836// VirtualNetworksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
28837// operation.
28838type VirtualNetworksDeleteFuture struct {
28839	azure.FutureAPI
28840	// Result returns the result of the asynchronous operation.
28841	// If the operation has not completed it will return an error.
28842	Result func(VirtualNetworksClient) (autorest.Response, error)
28843}
28844
28845// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28846func (future *VirtualNetworksDeleteFuture) UnmarshalJSON(body []byte) error {
28847	var azFuture azure.Future
28848	if err := json.Unmarshal(body, &azFuture); err != nil {
28849		return err
28850	}
28851	future.FutureAPI = &azFuture
28852	future.Result = future.result
28853	return nil
28854}
28855
28856// result is the default implementation for VirtualNetworksDeleteFuture.Result.
28857func (future *VirtualNetworksDeleteFuture) result(client VirtualNetworksClient) (ar autorest.Response, err error) {
28858	var done bool
28859	done, err = future.DoneWithContext(context.Background(), client)
28860	if err != nil {
28861		err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", future.Response(), "Polling failure")
28862		return
28863	}
28864	if !done {
28865		ar.Response = future.Response()
28866		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksDeleteFuture")
28867		return
28868	}
28869	ar.Response = future.Response()
28870	return
28871}
28872
28873// VirtualNetworksUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
28874// long-running operation.
28875type VirtualNetworksUpdateTagsFuture struct {
28876	azure.FutureAPI
28877	// Result returns the result of the asynchronous operation.
28878	// If the operation has not completed it will return an error.
28879	Result func(VirtualNetworksClient) (VirtualNetwork, error)
28880}
28881
28882// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28883func (future *VirtualNetworksUpdateTagsFuture) UnmarshalJSON(body []byte) error {
28884	var azFuture azure.Future
28885	if err := json.Unmarshal(body, &azFuture); err != nil {
28886		return err
28887	}
28888	future.FutureAPI = &azFuture
28889	future.Result = future.result
28890	return nil
28891}
28892
28893// result is the default implementation for VirtualNetworksUpdateTagsFuture.Result.
28894func (future *VirtualNetworksUpdateTagsFuture) result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
28895	var done bool
28896	done, err = future.DoneWithContext(context.Background(), client)
28897	if err != nil {
28898		err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", future.Response(), "Polling failure")
28899		return
28900	}
28901	if !done {
28902		vn.Response.Response = future.Response()
28903		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksUpdateTagsFuture")
28904		return
28905	}
28906	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
28907	if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
28908		vn, err = client.UpdateTagsResponder(vn.Response.Response)
28909		if err != nil {
28910			err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", vn.Response.Response, "Failure responding to request")
28911		}
28912	}
28913	return
28914}
28915
28916// VirtualNetworkTap virtual Network Tap resource
28917type VirtualNetworkTap struct {
28918	autorest.Response `json:"-"`
28919	// VirtualNetworkTapPropertiesFormat - Virtual Network Tap Properties.
28920	*VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"`
28921	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
28922	Etag *string `json:"etag,omitempty"`
28923	// ID - Resource ID.
28924	ID *string `json:"id,omitempty"`
28925	// Name - READ-ONLY; Resource name.
28926	Name *string `json:"name,omitempty"`
28927	// Type - READ-ONLY; Resource type.
28928	Type *string `json:"type,omitempty"`
28929	// Location - Resource location.
28930	Location *string `json:"location,omitempty"`
28931	// Tags - Resource tags.
28932	Tags map[string]*string `json:"tags"`
28933}
28934
28935// MarshalJSON is the custom marshaler for VirtualNetworkTap.
28936func (vnt VirtualNetworkTap) MarshalJSON() ([]byte, error) {
28937	objectMap := make(map[string]interface{})
28938	if vnt.VirtualNetworkTapPropertiesFormat != nil {
28939		objectMap["properties"] = vnt.VirtualNetworkTapPropertiesFormat
28940	}
28941	if vnt.Etag != nil {
28942		objectMap["etag"] = vnt.Etag
28943	}
28944	if vnt.ID != nil {
28945		objectMap["id"] = vnt.ID
28946	}
28947	if vnt.Location != nil {
28948		objectMap["location"] = vnt.Location
28949	}
28950	if vnt.Tags != nil {
28951		objectMap["tags"] = vnt.Tags
28952	}
28953	return json.Marshal(objectMap)
28954}
28955
28956// UnmarshalJSON is the custom unmarshaler for VirtualNetworkTap struct.
28957func (vnt *VirtualNetworkTap) UnmarshalJSON(body []byte) error {
28958	var m map[string]*json.RawMessage
28959	err := json.Unmarshal(body, &m)
28960	if err != nil {
28961		return err
28962	}
28963	for k, v := range m {
28964		switch k {
28965		case "properties":
28966			if v != nil {
28967				var virtualNetworkTapPropertiesFormat VirtualNetworkTapPropertiesFormat
28968				err = json.Unmarshal(*v, &virtualNetworkTapPropertiesFormat)
28969				if err != nil {
28970					return err
28971				}
28972				vnt.VirtualNetworkTapPropertiesFormat = &virtualNetworkTapPropertiesFormat
28973			}
28974		case "etag":
28975			if v != nil {
28976				var etag string
28977				err = json.Unmarshal(*v, &etag)
28978				if err != nil {
28979					return err
28980				}
28981				vnt.Etag = &etag
28982			}
28983		case "id":
28984			if v != nil {
28985				var ID string
28986				err = json.Unmarshal(*v, &ID)
28987				if err != nil {
28988					return err
28989				}
28990				vnt.ID = &ID
28991			}
28992		case "name":
28993			if v != nil {
28994				var name string
28995				err = json.Unmarshal(*v, &name)
28996				if err != nil {
28997					return err
28998				}
28999				vnt.Name = &name
29000			}
29001		case "type":
29002			if v != nil {
29003				var typeVar string
29004				err = json.Unmarshal(*v, &typeVar)
29005				if err != nil {
29006					return err
29007				}
29008				vnt.Type = &typeVar
29009			}
29010		case "location":
29011			if v != nil {
29012				var location string
29013				err = json.Unmarshal(*v, &location)
29014				if err != nil {
29015					return err
29016				}
29017				vnt.Location = &location
29018			}
29019		case "tags":
29020			if v != nil {
29021				var tags map[string]*string
29022				err = json.Unmarshal(*v, &tags)
29023				if err != nil {
29024					return err
29025				}
29026				vnt.Tags = tags
29027			}
29028		}
29029	}
29030
29031	return nil
29032}
29033
29034// VirtualNetworkTapListResult response for ListVirtualNetworkTap API service call.
29035type VirtualNetworkTapListResult struct {
29036	autorest.Response `json:"-"`
29037	// Value - A list of VirtualNetworkTaps in a resource group.
29038	Value *[]VirtualNetworkTap `json:"value,omitempty"`
29039	// NextLink - The URL to get the next set of results.
29040	NextLink *string `json:"nextLink,omitempty"`
29041}
29042
29043// VirtualNetworkTapListResultIterator provides access to a complete listing of VirtualNetworkTap values.
29044type VirtualNetworkTapListResultIterator struct {
29045	i    int
29046	page VirtualNetworkTapListResultPage
29047}
29048
29049// NextWithContext advances to the next value.  If there was an error making
29050// the request the iterator does not advance and the error is returned.
29051func (iter *VirtualNetworkTapListResultIterator) NextWithContext(ctx context.Context) (err error) {
29052	if tracing.IsEnabled() {
29053		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapListResultIterator.NextWithContext")
29054		defer func() {
29055			sc := -1
29056			if iter.Response().Response.Response != nil {
29057				sc = iter.Response().Response.Response.StatusCode
29058			}
29059			tracing.EndSpan(ctx, sc, err)
29060		}()
29061	}
29062	iter.i++
29063	if iter.i < len(iter.page.Values()) {
29064		return nil
29065	}
29066	err = iter.page.NextWithContext(ctx)
29067	if err != nil {
29068		iter.i--
29069		return err
29070	}
29071	iter.i = 0
29072	return nil
29073}
29074
29075// Next advances to the next value.  If there was an error making
29076// the request the iterator does not advance and the error is returned.
29077// Deprecated: Use NextWithContext() instead.
29078func (iter *VirtualNetworkTapListResultIterator) Next() error {
29079	return iter.NextWithContext(context.Background())
29080}
29081
29082// NotDone returns true if the enumeration should be started or is not yet complete.
29083func (iter VirtualNetworkTapListResultIterator) NotDone() bool {
29084	return iter.page.NotDone() && iter.i < len(iter.page.Values())
29085}
29086
29087// Response returns the raw server response from the last page request.
29088func (iter VirtualNetworkTapListResultIterator) Response() VirtualNetworkTapListResult {
29089	return iter.page.Response()
29090}
29091
29092// Value returns the current value or a zero-initialized value if the
29093// iterator has advanced beyond the end of the collection.
29094func (iter VirtualNetworkTapListResultIterator) Value() VirtualNetworkTap {
29095	if !iter.page.NotDone() {
29096		return VirtualNetworkTap{}
29097	}
29098	return iter.page.Values()[iter.i]
29099}
29100
29101// Creates a new instance of the VirtualNetworkTapListResultIterator type.
29102func NewVirtualNetworkTapListResultIterator(page VirtualNetworkTapListResultPage) VirtualNetworkTapListResultIterator {
29103	return VirtualNetworkTapListResultIterator{page: page}
29104}
29105
29106// IsEmpty returns true if the ListResult contains no values.
29107func (vntlr VirtualNetworkTapListResult) IsEmpty() bool {
29108	return vntlr.Value == nil || len(*vntlr.Value) == 0
29109}
29110
29111// hasNextLink returns true if the NextLink is not empty.
29112func (vntlr VirtualNetworkTapListResult) hasNextLink() bool {
29113	return vntlr.NextLink != nil && len(*vntlr.NextLink) != 0
29114}
29115
29116// virtualNetworkTapListResultPreparer prepares a request to retrieve the next set of results.
29117// It returns nil if no more results exist.
29118func (vntlr VirtualNetworkTapListResult) virtualNetworkTapListResultPreparer(ctx context.Context) (*http.Request, error) {
29119	if !vntlr.hasNextLink() {
29120		return nil, nil
29121	}
29122	return autorest.Prepare((&http.Request{}).WithContext(ctx),
29123		autorest.AsJSON(),
29124		autorest.AsGet(),
29125		autorest.WithBaseURL(to.String(vntlr.NextLink)))
29126}
29127
29128// VirtualNetworkTapListResultPage contains a page of VirtualNetworkTap values.
29129type VirtualNetworkTapListResultPage struct {
29130	fn    func(context.Context, VirtualNetworkTapListResult) (VirtualNetworkTapListResult, error)
29131	vntlr VirtualNetworkTapListResult
29132}
29133
29134// NextWithContext advances to the next page of values.  If there was an error making
29135// the request the page does not advance and the error is returned.
29136func (page *VirtualNetworkTapListResultPage) NextWithContext(ctx context.Context) (err error) {
29137	if tracing.IsEnabled() {
29138		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapListResultPage.NextWithContext")
29139		defer func() {
29140			sc := -1
29141			if page.Response().Response.Response != nil {
29142				sc = page.Response().Response.Response.StatusCode
29143			}
29144			tracing.EndSpan(ctx, sc, err)
29145		}()
29146	}
29147	for {
29148		next, err := page.fn(ctx, page.vntlr)
29149		if err != nil {
29150			return err
29151		}
29152		page.vntlr = next
29153		if !next.hasNextLink() || !next.IsEmpty() {
29154			break
29155		}
29156	}
29157	return nil
29158}
29159
29160// Next advances to the next page of values.  If there was an error making
29161// the request the page does not advance and the error is returned.
29162// Deprecated: Use NextWithContext() instead.
29163func (page *VirtualNetworkTapListResultPage) Next() error {
29164	return page.NextWithContext(context.Background())
29165}
29166
29167// NotDone returns true if the page enumeration should be started or is not yet complete.
29168func (page VirtualNetworkTapListResultPage) NotDone() bool {
29169	return !page.vntlr.IsEmpty()
29170}
29171
29172// Response returns the raw server response from the last page request.
29173func (page VirtualNetworkTapListResultPage) Response() VirtualNetworkTapListResult {
29174	return page.vntlr
29175}
29176
29177// Values returns the slice of values for the current page or nil if there are no values.
29178func (page VirtualNetworkTapListResultPage) Values() []VirtualNetworkTap {
29179	if page.vntlr.IsEmpty() {
29180		return nil
29181	}
29182	return *page.vntlr.Value
29183}
29184
29185// Creates a new instance of the VirtualNetworkTapListResultPage type.
29186func NewVirtualNetworkTapListResultPage(cur VirtualNetworkTapListResult, getNextPage func(context.Context, VirtualNetworkTapListResult) (VirtualNetworkTapListResult, error)) VirtualNetworkTapListResultPage {
29187	return VirtualNetworkTapListResultPage{
29188		fn:    getNextPage,
29189		vntlr: cur,
29190	}
29191}
29192
29193// VirtualNetworkTapPropertiesFormat virtual Network Tap properties.
29194type VirtualNetworkTapPropertiesFormat struct {
29195	// NetworkInterfaceTapConfigurations - READ-ONLY; Specifies the list of resource IDs for the network interface IP configuration that needs to be tapped.
29196	NetworkInterfaceTapConfigurations *[]InterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"`
29197	// ResourceGUID - READ-ONLY; The resourceGuid property of the virtual network tap.
29198	ResourceGUID *string `json:"resourceGuid,omitempty"`
29199	// ProvisioningState - READ-ONLY; The provisioning state of the virtual network tap. Possible values are: 'Updating', 'Deleting', and 'Failed'.
29200	ProvisioningState *string `json:"provisioningState,omitempty"`
29201	// DestinationNetworkInterfaceIPConfiguration - The reference to the private IP Address of the collector nic that will receive the tap
29202	DestinationNetworkInterfaceIPConfiguration *InterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"`
29203	// DestinationLoadBalancerFrontEndIPConfiguration - The reference to the private IP address on the internal Load Balancer that will receive the tap
29204	DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"`
29205	// DestinationPort - The VXLAN destination port that will receive the tapped traffic.
29206	DestinationPort *int32 `json:"destinationPort,omitempty"`
29207}
29208
29209// MarshalJSON is the custom marshaler for VirtualNetworkTapPropertiesFormat.
29210func (vntpf VirtualNetworkTapPropertiesFormat) MarshalJSON() ([]byte, error) {
29211	objectMap := make(map[string]interface{})
29212	if vntpf.DestinationNetworkInterfaceIPConfiguration != nil {
29213		objectMap["destinationNetworkInterfaceIPConfiguration"] = vntpf.DestinationNetworkInterfaceIPConfiguration
29214	}
29215	if vntpf.DestinationLoadBalancerFrontEndIPConfiguration != nil {
29216		objectMap["destinationLoadBalancerFrontEndIPConfiguration"] = vntpf.DestinationLoadBalancerFrontEndIPConfiguration
29217	}
29218	if vntpf.DestinationPort != nil {
29219		objectMap["destinationPort"] = vntpf.DestinationPort
29220	}
29221	return json.Marshal(objectMap)
29222}
29223
29224// VirtualNetworkTapsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
29225// long-running operation.
29226type VirtualNetworkTapsCreateOrUpdateFuture struct {
29227	azure.FutureAPI
29228	// Result returns the result of the asynchronous operation.
29229	// If the operation has not completed it will return an error.
29230	Result func(VirtualNetworkTapsClient) (VirtualNetworkTap, error)
29231}
29232
29233// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29234func (future *VirtualNetworkTapsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
29235	var azFuture azure.Future
29236	if err := json.Unmarshal(body, &azFuture); err != nil {
29237		return err
29238	}
29239	future.FutureAPI = &azFuture
29240	future.Result = future.result
29241	return nil
29242}
29243
29244// result is the default implementation for VirtualNetworkTapsCreateOrUpdateFuture.Result.
29245func (future *VirtualNetworkTapsCreateOrUpdateFuture) result(client VirtualNetworkTapsClient) (vnt VirtualNetworkTap, err error) {
29246	var done bool
29247	done, err = future.DoneWithContext(context.Background(), client)
29248	if err != nil {
29249		err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
29250		return
29251	}
29252	if !done {
29253		vnt.Response.Response = future.Response()
29254		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkTapsCreateOrUpdateFuture")
29255		return
29256	}
29257	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
29258	if vnt.Response.Response, err = future.GetResult(sender); err == nil && vnt.Response.Response.StatusCode != http.StatusNoContent {
29259		vnt, err = client.CreateOrUpdateResponder(vnt.Response.Response)
29260		if err != nil {
29261			err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsCreateOrUpdateFuture", "Result", vnt.Response.Response, "Failure responding to request")
29262		}
29263	}
29264	return
29265}
29266
29267// VirtualNetworkTapsDeleteFuture an abstraction for monitoring and retrieving the results of a
29268// long-running operation.
29269type VirtualNetworkTapsDeleteFuture struct {
29270	azure.FutureAPI
29271	// Result returns the result of the asynchronous operation.
29272	// If the operation has not completed it will return an error.
29273	Result func(VirtualNetworkTapsClient) (autorest.Response, error)
29274}
29275
29276// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29277func (future *VirtualNetworkTapsDeleteFuture) UnmarshalJSON(body []byte) error {
29278	var azFuture azure.Future
29279	if err := json.Unmarshal(body, &azFuture); err != nil {
29280		return err
29281	}
29282	future.FutureAPI = &azFuture
29283	future.Result = future.result
29284	return nil
29285}
29286
29287// result is the default implementation for VirtualNetworkTapsDeleteFuture.Result.
29288func (future *VirtualNetworkTapsDeleteFuture) result(client VirtualNetworkTapsClient) (ar autorest.Response, err error) {
29289	var done bool
29290	done, err = future.DoneWithContext(context.Background(), client)
29291	if err != nil {
29292		err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsDeleteFuture", "Result", future.Response(), "Polling failure")
29293		return
29294	}
29295	if !done {
29296		ar.Response = future.Response()
29297		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkTapsDeleteFuture")
29298		return
29299	}
29300	ar.Response = future.Response()
29301	return
29302}
29303
29304// VirtualNetworkTapsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
29305// long-running operation.
29306type VirtualNetworkTapsUpdateTagsFuture struct {
29307	azure.FutureAPI
29308	// Result returns the result of the asynchronous operation.
29309	// If the operation has not completed it will return an error.
29310	Result func(VirtualNetworkTapsClient) (VirtualNetworkTap, error)
29311}
29312
29313// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29314func (future *VirtualNetworkTapsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
29315	var azFuture azure.Future
29316	if err := json.Unmarshal(body, &azFuture); err != nil {
29317		return err
29318	}
29319	future.FutureAPI = &azFuture
29320	future.Result = future.result
29321	return nil
29322}
29323
29324// result is the default implementation for VirtualNetworkTapsUpdateTagsFuture.Result.
29325func (future *VirtualNetworkTapsUpdateTagsFuture) result(client VirtualNetworkTapsClient) (vnt VirtualNetworkTap, err error) {
29326	var done bool
29327	done, err = future.DoneWithContext(context.Background(), client)
29328	if err != nil {
29329		err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
29330		return
29331	}
29332	if !done {
29333		vnt.Response.Response = future.Response()
29334		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkTapsUpdateTagsFuture")
29335		return
29336	}
29337	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
29338	if vnt.Response.Response, err = future.GetResult(sender); err == nil && vnt.Response.Response.StatusCode != http.StatusNoContent {
29339		vnt, err = client.UpdateTagsResponder(vnt.Response.Response)
29340		if err != nil {
29341			err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsUpdateTagsFuture", "Result", vnt.Response.Response, "Failure responding to request")
29342		}
29343	}
29344	return
29345}
29346
29347// VirtualNetworkUsage usage details for subnet.
29348type VirtualNetworkUsage struct {
29349	// CurrentValue - READ-ONLY; Indicates number of IPs used from the Subnet.
29350	CurrentValue *float64 `json:"currentValue,omitempty"`
29351	// ID - READ-ONLY; Subnet identifier.
29352	ID *string `json:"id,omitempty"`
29353	// Limit - READ-ONLY; Indicates the size of the subnet.
29354	Limit *float64 `json:"limit,omitempty"`
29355	// Name - READ-ONLY; The name containing common and localized value for usage.
29356	Name *VirtualNetworkUsageName `json:"name,omitempty"`
29357	// Unit - READ-ONLY; Usage units. Returns 'Count'
29358	Unit *string `json:"unit,omitempty"`
29359}
29360
29361// MarshalJSON is the custom marshaler for VirtualNetworkUsage.
29362func (vnu VirtualNetworkUsage) MarshalJSON() ([]byte, error) {
29363	objectMap := make(map[string]interface{})
29364	return json.Marshal(objectMap)
29365}
29366
29367// VirtualNetworkUsageName usage strings container.
29368type VirtualNetworkUsageName struct {
29369	// LocalizedValue - READ-ONLY; Localized subnet size and usage string.
29370	LocalizedValue *string `json:"localizedValue,omitempty"`
29371	// Value - READ-ONLY; Subnet size and usage string.
29372	Value *string `json:"value,omitempty"`
29373}
29374
29375// MarshalJSON is the custom marshaler for VirtualNetworkUsageName.
29376func (vnun VirtualNetworkUsageName) MarshalJSON() ([]byte, error) {
29377	objectMap := make(map[string]interface{})
29378	return json.Marshal(objectMap)
29379}
29380
29381// VirtualWAN virtualWAN Resource.
29382type VirtualWAN struct {
29383	autorest.Response     `json:"-"`
29384	*VirtualWanProperties `json:"properties,omitempty"`
29385	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
29386	Etag *string `json:"etag,omitempty"`
29387	// ID - Resource ID.
29388	ID *string `json:"id,omitempty"`
29389	// Name - READ-ONLY; Resource name.
29390	Name *string `json:"name,omitempty"`
29391	// Type - READ-ONLY; Resource type.
29392	Type *string `json:"type,omitempty"`
29393	// Location - Resource location.
29394	Location *string `json:"location,omitempty"`
29395	// Tags - Resource tags.
29396	Tags map[string]*string `json:"tags"`
29397}
29398
29399// MarshalJSON is the custom marshaler for VirtualWAN.
29400func (vw VirtualWAN) MarshalJSON() ([]byte, error) {
29401	objectMap := make(map[string]interface{})
29402	if vw.VirtualWanProperties != nil {
29403		objectMap["properties"] = vw.VirtualWanProperties
29404	}
29405	if vw.ID != nil {
29406		objectMap["id"] = vw.ID
29407	}
29408	if vw.Location != nil {
29409		objectMap["location"] = vw.Location
29410	}
29411	if vw.Tags != nil {
29412		objectMap["tags"] = vw.Tags
29413	}
29414	return json.Marshal(objectMap)
29415}
29416
29417// UnmarshalJSON is the custom unmarshaler for VirtualWAN struct.
29418func (vw *VirtualWAN) UnmarshalJSON(body []byte) error {
29419	var m map[string]*json.RawMessage
29420	err := json.Unmarshal(body, &m)
29421	if err != nil {
29422		return err
29423	}
29424	for k, v := range m {
29425		switch k {
29426		case "properties":
29427			if v != nil {
29428				var virtualWanProperties VirtualWanProperties
29429				err = json.Unmarshal(*v, &virtualWanProperties)
29430				if err != nil {
29431					return err
29432				}
29433				vw.VirtualWanProperties = &virtualWanProperties
29434			}
29435		case "etag":
29436			if v != nil {
29437				var etag string
29438				err = json.Unmarshal(*v, &etag)
29439				if err != nil {
29440					return err
29441				}
29442				vw.Etag = &etag
29443			}
29444		case "id":
29445			if v != nil {
29446				var ID string
29447				err = json.Unmarshal(*v, &ID)
29448				if err != nil {
29449					return err
29450				}
29451				vw.ID = &ID
29452			}
29453		case "name":
29454			if v != nil {
29455				var name string
29456				err = json.Unmarshal(*v, &name)
29457				if err != nil {
29458					return err
29459				}
29460				vw.Name = &name
29461			}
29462		case "type":
29463			if v != nil {
29464				var typeVar string
29465				err = json.Unmarshal(*v, &typeVar)
29466				if err != nil {
29467					return err
29468				}
29469				vw.Type = &typeVar
29470			}
29471		case "location":
29472			if v != nil {
29473				var location string
29474				err = json.Unmarshal(*v, &location)
29475				if err != nil {
29476					return err
29477				}
29478				vw.Location = &location
29479			}
29480		case "tags":
29481			if v != nil {
29482				var tags map[string]*string
29483				err = json.Unmarshal(*v, &tags)
29484				if err != nil {
29485					return err
29486				}
29487				vw.Tags = tags
29488			}
29489		}
29490	}
29491
29492	return nil
29493}
29494
29495// VirtualWanProperties parameters for VirtualWAN
29496type VirtualWanProperties struct {
29497	// DisableVpnEncryption - Vpn encryption to be disabled or not.
29498	DisableVpnEncryption *bool `json:"disableVpnEncryption,omitempty"`
29499	// VirtualHubs - READ-ONLY; List of VirtualHubs in the VirtualWAN.
29500	VirtualHubs *[]SubResource `json:"virtualHubs,omitempty"`
29501	// VpnSites - READ-ONLY
29502	VpnSites *[]SubResource `json:"vpnSites,omitempty"`
29503	// SecurityProviderName - The Security Provider name.
29504	SecurityProviderName *string `json:"securityProviderName,omitempty"`
29505	// AllowBranchToBranchTraffic - True if branch to branch traffic is allowed.
29506	AllowBranchToBranchTraffic *bool `json:"allowBranchToBranchTraffic,omitempty"`
29507	// AllowVnetToVnetTraffic - True if Vnet to Vnet traffic is allowed.
29508	AllowVnetToVnetTraffic *bool `json:"allowVnetToVnetTraffic,omitempty"`
29509	// Office365LocalBreakoutCategory - The office local breakout category. Possible values include: 'OfficeTrafficCategoryOptimize', 'OfficeTrafficCategoryOptimizeAndAllow', 'OfficeTrafficCategoryAll', 'OfficeTrafficCategoryNone'
29510	Office365LocalBreakoutCategory OfficeTrafficCategory `json:"office365LocalBreakoutCategory,omitempty"`
29511	// P2SVpnServerConfigurations - list of all P2SVpnServerConfigurations associated with the virtual wan.
29512	P2SVpnServerConfigurations *[]P2SVpnServerConfiguration `json:"p2SVpnServerConfigurations,omitempty"`
29513	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
29514	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
29515}
29516
29517// MarshalJSON is the custom marshaler for VirtualWanProperties.
29518func (vwp VirtualWanProperties) MarshalJSON() ([]byte, error) {
29519	objectMap := make(map[string]interface{})
29520	if vwp.DisableVpnEncryption != nil {
29521		objectMap["disableVpnEncryption"] = vwp.DisableVpnEncryption
29522	}
29523	if vwp.SecurityProviderName != nil {
29524		objectMap["securityProviderName"] = vwp.SecurityProviderName
29525	}
29526	if vwp.AllowBranchToBranchTraffic != nil {
29527		objectMap["allowBranchToBranchTraffic"] = vwp.AllowBranchToBranchTraffic
29528	}
29529	if vwp.AllowVnetToVnetTraffic != nil {
29530		objectMap["allowVnetToVnetTraffic"] = vwp.AllowVnetToVnetTraffic
29531	}
29532	if vwp.Office365LocalBreakoutCategory != "" {
29533		objectMap["office365LocalBreakoutCategory"] = vwp.Office365LocalBreakoutCategory
29534	}
29535	if vwp.P2SVpnServerConfigurations != nil {
29536		objectMap["p2SVpnServerConfigurations"] = vwp.P2SVpnServerConfigurations
29537	}
29538	if vwp.ProvisioningState != "" {
29539		objectMap["provisioningState"] = vwp.ProvisioningState
29540	}
29541	return json.Marshal(objectMap)
29542}
29543
29544// VirtualWansCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
29545// long-running operation.
29546type VirtualWansCreateOrUpdateFuture struct {
29547	azure.FutureAPI
29548	// Result returns the result of the asynchronous operation.
29549	// If the operation has not completed it will return an error.
29550	Result func(VirtualWansClient) (VirtualWAN, error)
29551}
29552
29553// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29554func (future *VirtualWansCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
29555	var azFuture azure.Future
29556	if err := json.Unmarshal(body, &azFuture); err != nil {
29557		return err
29558	}
29559	future.FutureAPI = &azFuture
29560	future.Result = future.result
29561	return nil
29562}
29563
29564// result is the default implementation for VirtualWansCreateOrUpdateFuture.Result.
29565func (future *VirtualWansCreateOrUpdateFuture) result(client VirtualWansClient) (vw VirtualWAN, err error) {
29566	var done bool
29567	done, err = future.DoneWithContext(context.Background(), client)
29568	if err != nil {
29569		err = autorest.NewErrorWithError(err, "network.VirtualWansCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
29570		return
29571	}
29572	if !done {
29573		vw.Response.Response = future.Response()
29574		err = azure.NewAsyncOpIncompleteError("network.VirtualWansCreateOrUpdateFuture")
29575		return
29576	}
29577	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
29578	if vw.Response.Response, err = future.GetResult(sender); err == nil && vw.Response.Response.StatusCode != http.StatusNoContent {
29579		vw, err = client.CreateOrUpdateResponder(vw.Response.Response)
29580		if err != nil {
29581			err = autorest.NewErrorWithError(err, "network.VirtualWansCreateOrUpdateFuture", "Result", vw.Response.Response, "Failure responding to request")
29582		}
29583	}
29584	return
29585}
29586
29587// VirtualWansDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
29588// operation.
29589type VirtualWansDeleteFuture struct {
29590	azure.FutureAPI
29591	// Result returns the result of the asynchronous operation.
29592	// If the operation has not completed it will return an error.
29593	Result func(VirtualWansClient) (autorest.Response, error)
29594}
29595
29596// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29597func (future *VirtualWansDeleteFuture) UnmarshalJSON(body []byte) error {
29598	var azFuture azure.Future
29599	if err := json.Unmarshal(body, &azFuture); err != nil {
29600		return err
29601	}
29602	future.FutureAPI = &azFuture
29603	future.Result = future.result
29604	return nil
29605}
29606
29607// result is the default implementation for VirtualWansDeleteFuture.Result.
29608func (future *VirtualWansDeleteFuture) result(client VirtualWansClient) (ar autorest.Response, err error) {
29609	var done bool
29610	done, err = future.DoneWithContext(context.Background(), client)
29611	if err != nil {
29612		err = autorest.NewErrorWithError(err, "network.VirtualWansDeleteFuture", "Result", future.Response(), "Polling failure")
29613		return
29614	}
29615	if !done {
29616		ar.Response = future.Response()
29617		err = azure.NewAsyncOpIncompleteError("network.VirtualWansDeleteFuture")
29618		return
29619	}
29620	ar.Response = future.Response()
29621	return
29622}
29623
29624// VirtualWanSecurityProvider collection of SecurityProviders.
29625type VirtualWanSecurityProvider struct {
29626	// Name - Name of the security provider.
29627	Name *string `json:"name,omitempty"`
29628	// URL - Url of the security provider.
29629	URL *string `json:"url,omitempty"`
29630	// Type - Name of the security provider. Possible values include: 'External', 'Native'
29631	Type VirtualWanSecurityProviderType `json:"type,omitempty"`
29632}
29633
29634// VirtualWanSecurityProviders collection of SecurityProviders.
29635type VirtualWanSecurityProviders struct {
29636	autorest.Response  `json:"-"`
29637	SupportedProviders *[]VirtualWanSecurityProvider `json:"supportedProviders,omitempty"`
29638}
29639
29640// VirtualWansUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
29641// operation.
29642type VirtualWansUpdateTagsFuture struct {
29643	azure.FutureAPI
29644	// Result returns the result of the asynchronous operation.
29645	// If the operation has not completed it will return an error.
29646	Result func(VirtualWansClient) (VirtualWAN, error)
29647}
29648
29649// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29650func (future *VirtualWansUpdateTagsFuture) UnmarshalJSON(body []byte) error {
29651	var azFuture azure.Future
29652	if err := json.Unmarshal(body, &azFuture); err != nil {
29653		return err
29654	}
29655	future.FutureAPI = &azFuture
29656	future.Result = future.result
29657	return nil
29658}
29659
29660// result is the default implementation for VirtualWansUpdateTagsFuture.Result.
29661func (future *VirtualWansUpdateTagsFuture) result(client VirtualWansClient) (vw VirtualWAN, err error) {
29662	var done bool
29663	done, err = future.DoneWithContext(context.Background(), client)
29664	if err != nil {
29665		err = autorest.NewErrorWithError(err, "network.VirtualWansUpdateTagsFuture", "Result", future.Response(), "Polling failure")
29666		return
29667	}
29668	if !done {
29669		vw.Response.Response = future.Response()
29670		err = azure.NewAsyncOpIncompleteError("network.VirtualWansUpdateTagsFuture")
29671		return
29672	}
29673	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
29674	if vw.Response.Response, err = future.GetResult(sender); err == nil && vw.Response.Response.StatusCode != http.StatusNoContent {
29675		vw, err = client.UpdateTagsResponder(vw.Response.Response)
29676		if err != nil {
29677			err = autorest.NewErrorWithError(err, "network.VirtualWansUpdateTagsFuture", "Result", vw.Response.Response, "Failure responding to request")
29678		}
29679	}
29680	return
29681}
29682
29683// VpnClientConfiguration vpnClientConfiguration for P2S client.
29684type VpnClientConfiguration struct {
29685	// VpnClientAddressPool - The reference of the address space resource which represents Address space for P2S VpnClient.
29686	VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"`
29687	// VpnClientRootCertificates - VpnClientRootCertificate for virtual network gateway.
29688	VpnClientRootCertificates *[]VpnClientRootCertificate `json:"vpnClientRootCertificates,omitempty"`
29689	// VpnClientRevokedCertificates - VpnClientRevokedCertificate for Virtual network gateway.
29690	VpnClientRevokedCertificates *[]VpnClientRevokedCertificate `json:"vpnClientRevokedCertificates,omitempty"`
29691	// VpnClientProtocols - VpnClientProtocols for Virtual network gateway.
29692	VpnClientProtocols *[]VpnClientProtocol `json:"vpnClientProtocols,omitempty"`
29693	// VpnClientIpsecPolicies - VpnClientIpsecPolicies for virtual network gateway P2S client.
29694	VpnClientIpsecPolicies *[]IpsecPolicy `json:"vpnClientIpsecPolicies,omitempty"`
29695	// RadiusServerAddress - The radius server address property of the VirtualNetworkGateway resource for vpn client connection.
29696	RadiusServerAddress *string `json:"radiusServerAddress,omitempty"`
29697	// RadiusServerSecret - The radius secret property of the VirtualNetworkGateway resource for vpn client connection.
29698	RadiusServerSecret *string `json:"radiusServerSecret,omitempty"`
29699}
29700
29701// VpnClientConnectionHealth vpnClientConnectionHealth properties
29702type VpnClientConnectionHealth struct {
29703	// TotalIngressBytesTransferred - READ-ONLY; Total of the Ingress Bytes Transferred in this P2S Vpn connection
29704	TotalIngressBytesTransferred *int64 `json:"totalIngressBytesTransferred,omitempty"`
29705	// TotalEgressBytesTransferred - READ-ONLY; Total of the Egress Bytes Transferred in this connection
29706	TotalEgressBytesTransferred *int64 `json:"totalEgressBytesTransferred,omitempty"`
29707	// VpnClientConnectionsCount - The total of p2s vpn clients connected at this time to this P2SVpnGateway.
29708	VpnClientConnectionsCount *int32 `json:"vpnClientConnectionsCount,omitempty"`
29709	// AllocatedIPAddresses - List of allocated ip addresses to the connected p2s vpn clients.
29710	AllocatedIPAddresses *[]string `json:"allocatedIpAddresses,omitempty"`
29711}
29712
29713// MarshalJSON is the custom marshaler for VpnClientConnectionHealth.
29714func (vcch VpnClientConnectionHealth) MarshalJSON() ([]byte, error) {
29715	objectMap := make(map[string]interface{})
29716	if vcch.VpnClientConnectionsCount != nil {
29717		objectMap["vpnClientConnectionsCount"] = vcch.VpnClientConnectionsCount
29718	}
29719	if vcch.AllocatedIPAddresses != nil {
29720		objectMap["allocatedIpAddresses"] = vcch.AllocatedIPAddresses
29721	}
29722	return json.Marshal(objectMap)
29723}
29724
29725// VpnClientIPsecParameters an IPSec parameters for a virtual network gateway P2S connection.
29726type VpnClientIPsecParameters struct {
29727	autorest.Response `json:"-"`
29728	// SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for P2S client.
29729	SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"`
29730	// SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for P2S client..
29731	SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"`
29732	// IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256'
29733	IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"`
29734	// IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256'
29735	IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"`
29736	// IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128'
29737	IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"`
29738	// IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'IkeIntegrityMD5', 'IkeIntegritySHA1', 'IkeIntegritySHA256', 'IkeIntegritySHA384', 'IkeIntegrityGCMAES256', 'IkeIntegrityGCMAES128'
29739	IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"`
29740	// DhGroup - The DH Groups used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24'
29741	DhGroup DhGroup `json:"dhGroup,omitempty"`
29742	// PfsGroup - The Pfs Groups used in IKE Phase 2 for new child SA. Possible values include: 'PfsGroupNone', 'PfsGroupPFS1', 'PfsGroupPFS2', 'PfsGroupPFS2048', 'PfsGroupECP256', 'PfsGroupECP384', 'PfsGroupPFS24', 'PfsGroupPFS14', 'PfsGroupPFSMM'
29743	PfsGroup PfsGroup `json:"pfsGroup,omitempty"`
29744}
29745
29746// VpnClientParameters vpn Client Parameters for package generation
29747type VpnClientParameters struct {
29748	// ProcessorArchitecture - VPN client Processor Architecture. Possible values are: 'AMD64' and 'X86'. Possible values include: 'Amd64', 'X86'
29749	ProcessorArchitecture ProcessorArchitecture `json:"processorArchitecture,omitempty"`
29750	// AuthenticationMethod - VPN client Authentication Method. Possible values are: 'EAPTLS' and 'EAPMSCHAPv2'. Possible values include: 'EAPTLS', 'EAPMSCHAPv2'
29751	AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"`
29752	// 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.
29753	RadiusServerAuthCertificate *string `json:"radiusServerAuthCertificate,omitempty"`
29754	// ClientRootCertificates - A list of client root certificates public certificate data encoded as Base-64 strings. Optional parameter for external radius based authentication with EAPTLS.
29755	ClientRootCertificates *[]string `json:"clientRootCertificates,omitempty"`
29756}
29757
29758// VpnClientRevokedCertificate VPN client revoked certificate of virtual network gateway.
29759type VpnClientRevokedCertificate struct {
29760	// VpnClientRevokedCertificatePropertiesFormat - Properties of the vpn client revoked certificate.
29761	*VpnClientRevokedCertificatePropertiesFormat `json:"properties,omitempty"`
29762	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
29763	Name *string `json:"name,omitempty"`
29764	// Etag - A unique read-only string that changes whenever the resource is updated.
29765	Etag *string `json:"etag,omitempty"`
29766	// ID - Resource ID.
29767	ID *string `json:"id,omitempty"`
29768}
29769
29770// MarshalJSON is the custom marshaler for VpnClientRevokedCertificate.
29771func (vcrc VpnClientRevokedCertificate) MarshalJSON() ([]byte, error) {
29772	objectMap := make(map[string]interface{})
29773	if vcrc.VpnClientRevokedCertificatePropertiesFormat != nil {
29774		objectMap["properties"] = vcrc.VpnClientRevokedCertificatePropertiesFormat
29775	}
29776	if vcrc.Name != nil {
29777		objectMap["name"] = vcrc.Name
29778	}
29779	if vcrc.Etag != nil {
29780		objectMap["etag"] = vcrc.Etag
29781	}
29782	if vcrc.ID != nil {
29783		objectMap["id"] = vcrc.ID
29784	}
29785	return json.Marshal(objectMap)
29786}
29787
29788// UnmarshalJSON is the custom unmarshaler for VpnClientRevokedCertificate struct.
29789func (vcrc *VpnClientRevokedCertificate) UnmarshalJSON(body []byte) error {
29790	var m map[string]*json.RawMessage
29791	err := json.Unmarshal(body, &m)
29792	if err != nil {
29793		return err
29794	}
29795	for k, v := range m {
29796		switch k {
29797		case "properties":
29798			if v != nil {
29799				var vpnClientRevokedCertificatePropertiesFormat VpnClientRevokedCertificatePropertiesFormat
29800				err = json.Unmarshal(*v, &vpnClientRevokedCertificatePropertiesFormat)
29801				if err != nil {
29802					return err
29803				}
29804				vcrc.VpnClientRevokedCertificatePropertiesFormat = &vpnClientRevokedCertificatePropertiesFormat
29805			}
29806		case "name":
29807			if v != nil {
29808				var name string
29809				err = json.Unmarshal(*v, &name)
29810				if err != nil {
29811					return err
29812				}
29813				vcrc.Name = &name
29814			}
29815		case "etag":
29816			if v != nil {
29817				var etag string
29818				err = json.Unmarshal(*v, &etag)
29819				if err != nil {
29820					return err
29821				}
29822				vcrc.Etag = &etag
29823			}
29824		case "id":
29825			if v != nil {
29826				var ID string
29827				err = json.Unmarshal(*v, &ID)
29828				if err != nil {
29829					return err
29830				}
29831				vcrc.ID = &ID
29832			}
29833		}
29834	}
29835
29836	return nil
29837}
29838
29839// VpnClientRevokedCertificatePropertiesFormat properties of the revoked VPN client certificate of virtual
29840// network gateway.
29841type VpnClientRevokedCertificatePropertiesFormat struct {
29842	// Thumbprint - The revoked VPN client certificate thumbprint.
29843	Thumbprint *string `json:"thumbprint,omitempty"`
29844	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client revoked certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
29845	ProvisioningState *string `json:"provisioningState,omitempty"`
29846}
29847
29848// MarshalJSON is the custom marshaler for VpnClientRevokedCertificatePropertiesFormat.
29849func (vcrcpf VpnClientRevokedCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
29850	objectMap := make(map[string]interface{})
29851	if vcrcpf.Thumbprint != nil {
29852		objectMap["thumbprint"] = vcrcpf.Thumbprint
29853	}
29854	return json.Marshal(objectMap)
29855}
29856
29857// VpnClientRootCertificate VPN client root certificate of virtual network gateway
29858type VpnClientRootCertificate struct {
29859	// VpnClientRootCertificatePropertiesFormat - Properties of the vpn client root certificate.
29860	*VpnClientRootCertificatePropertiesFormat `json:"properties,omitempty"`
29861	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
29862	Name *string `json:"name,omitempty"`
29863	// Etag - A unique read-only string that changes whenever the resource is updated.
29864	Etag *string `json:"etag,omitempty"`
29865	// ID - Resource ID.
29866	ID *string `json:"id,omitempty"`
29867}
29868
29869// MarshalJSON is the custom marshaler for VpnClientRootCertificate.
29870func (vcrc VpnClientRootCertificate) MarshalJSON() ([]byte, error) {
29871	objectMap := make(map[string]interface{})
29872	if vcrc.VpnClientRootCertificatePropertiesFormat != nil {
29873		objectMap["properties"] = vcrc.VpnClientRootCertificatePropertiesFormat
29874	}
29875	if vcrc.Name != nil {
29876		objectMap["name"] = vcrc.Name
29877	}
29878	if vcrc.Etag != nil {
29879		objectMap["etag"] = vcrc.Etag
29880	}
29881	if vcrc.ID != nil {
29882		objectMap["id"] = vcrc.ID
29883	}
29884	return json.Marshal(objectMap)
29885}
29886
29887// UnmarshalJSON is the custom unmarshaler for VpnClientRootCertificate struct.
29888func (vcrc *VpnClientRootCertificate) UnmarshalJSON(body []byte) error {
29889	var m map[string]*json.RawMessage
29890	err := json.Unmarshal(body, &m)
29891	if err != nil {
29892		return err
29893	}
29894	for k, v := range m {
29895		switch k {
29896		case "properties":
29897			if v != nil {
29898				var vpnClientRootCertificatePropertiesFormat VpnClientRootCertificatePropertiesFormat
29899				err = json.Unmarshal(*v, &vpnClientRootCertificatePropertiesFormat)
29900				if err != nil {
29901					return err
29902				}
29903				vcrc.VpnClientRootCertificatePropertiesFormat = &vpnClientRootCertificatePropertiesFormat
29904			}
29905		case "name":
29906			if v != nil {
29907				var name string
29908				err = json.Unmarshal(*v, &name)
29909				if err != nil {
29910					return err
29911				}
29912				vcrc.Name = &name
29913			}
29914		case "etag":
29915			if v != nil {
29916				var etag string
29917				err = json.Unmarshal(*v, &etag)
29918				if err != nil {
29919					return err
29920				}
29921				vcrc.Etag = &etag
29922			}
29923		case "id":
29924			if v != nil {
29925				var ID string
29926				err = json.Unmarshal(*v, &ID)
29927				if err != nil {
29928					return err
29929				}
29930				vcrc.ID = &ID
29931			}
29932		}
29933	}
29934
29935	return nil
29936}
29937
29938// VpnClientRootCertificatePropertiesFormat properties of SSL certificates of application gateway
29939type VpnClientRootCertificatePropertiesFormat struct {
29940	// PublicCertData - The certificate public data.
29941	PublicCertData *string `json:"publicCertData,omitempty"`
29942	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
29943	ProvisioningState *string `json:"provisioningState,omitempty"`
29944}
29945
29946// MarshalJSON is the custom marshaler for VpnClientRootCertificatePropertiesFormat.
29947func (vcrcpf VpnClientRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
29948	objectMap := make(map[string]interface{})
29949	if vcrcpf.PublicCertData != nil {
29950		objectMap["publicCertData"] = vcrcpf.PublicCertData
29951	}
29952	return json.Marshal(objectMap)
29953}
29954
29955// VpnConnection vpnConnection Resource.
29956type VpnConnection struct {
29957	autorest.Response        `json:"-"`
29958	*VpnConnectionProperties `json:"properties,omitempty"`
29959	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
29960	Name *string `json:"name,omitempty"`
29961	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
29962	Etag *string `json:"etag,omitempty"`
29963	// ID - Resource ID.
29964	ID *string `json:"id,omitempty"`
29965}
29966
29967// MarshalJSON is the custom marshaler for VpnConnection.
29968func (vc VpnConnection) MarshalJSON() ([]byte, error) {
29969	objectMap := make(map[string]interface{})
29970	if vc.VpnConnectionProperties != nil {
29971		objectMap["properties"] = vc.VpnConnectionProperties
29972	}
29973	if vc.Name != nil {
29974		objectMap["name"] = vc.Name
29975	}
29976	if vc.ID != nil {
29977		objectMap["id"] = vc.ID
29978	}
29979	return json.Marshal(objectMap)
29980}
29981
29982// UnmarshalJSON is the custom unmarshaler for VpnConnection struct.
29983func (vc *VpnConnection) UnmarshalJSON(body []byte) error {
29984	var m map[string]*json.RawMessage
29985	err := json.Unmarshal(body, &m)
29986	if err != nil {
29987		return err
29988	}
29989	for k, v := range m {
29990		switch k {
29991		case "properties":
29992			if v != nil {
29993				var vpnConnectionProperties VpnConnectionProperties
29994				err = json.Unmarshal(*v, &vpnConnectionProperties)
29995				if err != nil {
29996					return err
29997				}
29998				vc.VpnConnectionProperties = &vpnConnectionProperties
29999			}
30000		case "name":
30001			if v != nil {
30002				var name string
30003				err = json.Unmarshal(*v, &name)
30004				if err != nil {
30005					return err
30006				}
30007				vc.Name = &name
30008			}
30009		case "etag":
30010			if v != nil {
30011				var etag string
30012				err = json.Unmarshal(*v, &etag)
30013				if err != nil {
30014					return err
30015				}
30016				vc.Etag = &etag
30017			}
30018		case "id":
30019			if v != nil {
30020				var ID string
30021				err = json.Unmarshal(*v, &ID)
30022				if err != nil {
30023					return err
30024				}
30025				vc.ID = &ID
30026			}
30027		}
30028	}
30029
30030	return nil
30031}
30032
30033// VpnConnectionProperties parameters for VpnConnection
30034type VpnConnectionProperties struct {
30035	// RemoteVpnSite - Id of the connected vpn site.
30036	RemoteVpnSite *SubResource `json:"remoteVpnSite,omitempty"`
30037	// RoutingWeight - routing weight for vpn connection.
30038	RoutingWeight *int32 `json:"routingWeight,omitempty"`
30039	// ConnectionStatus - The connection status. Possible values include: 'VpnConnectionStatusUnknown', 'VpnConnectionStatusConnecting', 'VpnConnectionStatusConnected', 'VpnConnectionStatusNotConnected'
30040	ConnectionStatus VpnConnectionStatus `json:"connectionStatus,omitempty"`
30041	// VpnConnectionProtocolType - Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1'
30042	VpnConnectionProtocolType VirtualNetworkGatewayConnectionProtocol `json:"vpnConnectionProtocolType,omitempty"`
30043	// IngressBytesTransferred - READ-ONLY; Ingress bytes transferred.
30044	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
30045	// EgressBytesTransferred - READ-ONLY; Egress bytes transferred.
30046	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
30047	// ConnectionBandwidth - Expected bandwidth in MBPS.
30048	ConnectionBandwidth *int32 `json:"connectionBandwidth,omitempty"`
30049	// SharedKey - SharedKey for the vpn connection.
30050	SharedKey *string `json:"sharedKey,omitempty"`
30051	// EnableBgp - EnableBgp flag
30052	EnableBgp *bool `json:"enableBgp,omitempty"`
30053	// IpsecPolicies - The IPSec Policies to be considered by this connection.
30054	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
30055	// EnableRateLimiting - EnableBgp flag
30056	EnableRateLimiting *bool `json:"enableRateLimiting,omitempty"`
30057	// EnableInternetSecurity - Enable internet security
30058	EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"`
30059	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
30060	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
30061}
30062
30063// MarshalJSON is the custom marshaler for VpnConnectionProperties.
30064func (vcp VpnConnectionProperties) MarshalJSON() ([]byte, error) {
30065	objectMap := make(map[string]interface{})
30066	if vcp.RemoteVpnSite != nil {
30067		objectMap["remoteVpnSite"] = vcp.RemoteVpnSite
30068	}
30069	if vcp.RoutingWeight != nil {
30070		objectMap["routingWeight"] = vcp.RoutingWeight
30071	}
30072	if vcp.ConnectionStatus != "" {
30073		objectMap["connectionStatus"] = vcp.ConnectionStatus
30074	}
30075	if vcp.VpnConnectionProtocolType != "" {
30076		objectMap["vpnConnectionProtocolType"] = vcp.VpnConnectionProtocolType
30077	}
30078	if vcp.ConnectionBandwidth != nil {
30079		objectMap["connectionBandwidth"] = vcp.ConnectionBandwidth
30080	}
30081	if vcp.SharedKey != nil {
30082		objectMap["sharedKey"] = vcp.SharedKey
30083	}
30084	if vcp.EnableBgp != nil {
30085		objectMap["enableBgp"] = vcp.EnableBgp
30086	}
30087	if vcp.IpsecPolicies != nil {
30088		objectMap["ipsecPolicies"] = vcp.IpsecPolicies
30089	}
30090	if vcp.EnableRateLimiting != nil {
30091		objectMap["enableRateLimiting"] = vcp.EnableRateLimiting
30092	}
30093	if vcp.EnableInternetSecurity != nil {
30094		objectMap["enableInternetSecurity"] = vcp.EnableInternetSecurity
30095	}
30096	if vcp.ProvisioningState != "" {
30097		objectMap["provisioningState"] = vcp.ProvisioningState
30098	}
30099	return json.Marshal(objectMap)
30100}
30101
30102// VpnConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
30103// long-running operation.
30104type VpnConnectionsCreateOrUpdateFuture struct {
30105	azure.FutureAPI
30106	// Result returns the result of the asynchronous operation.
30107	// If the operation has not completed it will return an error.
30108	Result func(VpnConnectionsClient) (VpnConnection, error)
30109}
30110
30111// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30112func (future *VpnConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
30113	var azFuture azure.Future
30114	if err := json.Unmarshal(body, &azFuture); err != nil {
30115		return err
30116	}
30117	future.FutureAPI = &azFuture
30118	future.Result = future.result
30119	return nil
30120}
30121
30122// result is the default implementation for VpnConnectionsCreateOrUpdateFuture.Result.
30123func (future *VpnConnectionsCreateOrUpdateFuture) result(client VpnConnectionsClient) (vc VpnConnection, err error) {
30124	var done bool
30125	done, err = future.DoneWithContext(context.Background(), client)
30126	if err != nil {
30127		err = autorest.NewErrorWithError(err, "network.VpnConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
30128		return
30129	}
30130	if !done {
30131		vc.Response.Response = future.Response()
30132		err = azure.NewAsyncOpIncompleteError("network.VpnConnectionsCreateOrUpdateFuture")
30133		return
30134	}
30135	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
30136	if vc.Response.Response, err = future.GetResult(sender); err == nil && vc.Response.Response.StatusCode != http.StatusNoContent {
30137		vc, err = client.CreateOrUpdateResponder(vc.Response.Response)
30138		if err != nil {
30139			err = autorest.NewErrorWithError(err, "network.VpnConnectionsCreateOrUpdateFuture", "Result", vc.Response.Response, "Failure responding to request")
30140		}
30141	}
30142	return
30143}
30144
30145// VpnConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
30146// operation.
30147type VpnConnectionsDeleteFuture struct {
30148	azure.FutureAPI
30149	// Result returns the result of the asynchronous operation.
30150	// If the operation has not completed it will return an error.
30151	Result func(VpnConnectionsClient) (autorest.Response, error)
30152}
30153
30154// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30155func (future *VpnConnectionsDeleteFuture) UnmarshalJSON(body []byte) error {
30156	var azFuture azure.Future
30157	if err := json.Unmarshal(body, &azFuture); err != nil {
30158		return err
30159	}
30160	future.FutureAPI = &azFuture
30161	future.Result = future.result
30162	return nil
30163}
30164
30165// result is the default implementation for VpnConnectionsDeleteFuture.Result.
30166func (future *VpnConnectionsDeleteFuture) result(client VpnConnectionsClient) (ar autorest.Response, err error) {
30167	var done bool
30168	done, err = future.DoneWithContext(context.Background(), client)
30169	if err != nil {
30170		err = autorest.NewErrorWithError(err, "network.VpnConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
30171		return
30172	}
30173	if !done {
30174		ar.Response = future.Response()
30175		err = azure.NewAsyncOpIncompleteError("network.VpnConnectionsDeleteFuture")
30176		return
30177	}
30178	ar.Response = future.Response()
30179	return
30180}
30181
30182// VpnDeviceScriptParameters vpn device configuration script generation parameters
30183type VpnDeviceScriptParameters struct {
30184	// Vendor - The vendor for the vpn device.
30185	Vendor *string `json:"vendor,omitempty"`
30186	// DeviceFamily - The device family for the vpn device.
30187	DeviceFamily *string `json:"deviceFamily,omitempty"`
30188	// FirmwareVersion - The firmware version for the vpn device.
30189	FirmwareVersion *string `json:"firmwareVersion,omitempty"`
30190}
30191
30192// VpnGateway vpnGateway Resource.
30193type VpnGateway struct {
30194	autorest.Response     `json:"-"`
30195	*VpnGatewayProperties `json:"properties,omitempty"`
30196	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
30197	Etag *string `json:"etag,omitempty"`
30198	// ID - Resource ID.
30199	ID *string `json:"id,omitempty"`
30200	// Name - READ-ONLY; Resource name.
30201	Name *string `json:"name,omitempty"`
30202	// Type - READ-ONLY; Resource type.
30203	Type *string `json:"type,omitempty"`
30204	// Location - Resource location.
30205	Location *string `json:"location,omitempty"`
30206	// Tags - Resource tags.
30207	Tags map[string]*string `json:"tags"`
30208}
30209
30210// MarshalJSON is the custom marshaler for VpnGateway.
30211func (vg VpnGateway) MarshalJSON() ([]byte, error) {
30212	objectMap := make(map[string]interface{})
30213	if vg.VpnGatewayProperties != nil {
30214		objectMap["properties"] = vg.VpnGatewayProperties
30215	}
30216	if vg.ID != nil {
30217		objectMap["id"] = vg.ID
30218	}
30219	if vg.Location != nil {
30220		objectMap["location"] = vg.Location
30221	}
30222	if vg.Tags != nil {
30223		objectMap["tags"] = vg.Tags
30224	}
30225	return json.Marshal(objectMap)
30226}
30227
30228// UnmarshalJSON is the custom unmarshaler for VpnGateway struct.
30229func (vg *VpnGateway) UnmarshalJSON(body []byte) error {
30230	var m map[string]*json.RawMessage
30231	err := json.Unmarshal(body, &m)
30232	if err != nil {
30233		return err
30234	}
30235	for k, v := range m {
30236		switch k {
30237		case "properties":
30238			if v != nil {
30239				var vpnGatewayProperties VpnGatewayProperties
30240				err = json.Unmarshal(*v, &vpnGatewayProperties)
30241				if err != nil {
30242					return err
30243				}
30244				vg.VpnGatewayProperties = &vpnGatewayProperties
30245			}
30246		case "etag":
30247			if v != nil {
30248				var etag string
30249				err = json.Unmarshal(*v, &etag)
30250				if err != nil {
30251					return err
30252				}
30253				vg.Etag = &etag
30254			}
30255		case "id":
30256			if v != nil {
30257				var ID string
30258				err = json.Unmarshal(*v, &ID)
30259				if err != nil {
30260					return err
30261				}
30262				vg.ID = &ID
30263			}
30264		case "name":
30265			if v != nil {
30266				var name string
30267				err = json.Unmarshal(*v, &name)
30268				if err != nil {
30269					return err
30270				}
30271				vg.Name = &name
30272			}
30273		case "type":
30274			if v != nil {
30275				var typeVar string
30276				err = json.Unmarshal(*v, &typeVar)
30277				if err != nil {
30278					return err
30279				}
30280				vg.Type = &typeVar
30281			}
30282		case "location":
30283			if v != nil {
30284				var location string
30285				err = json.Unmarshal(*v, &location)
30286				if err != nil {
30287					return err
30288				}
30289				vg.Location = &location
30290			}
30291		case "tags":
30292			if v != nil {
30293				var tags map[string]*string
30294				err = json.Unmarshal(*v, &tags)
30295				if err != nil {
30296					return err
30297				}
30298				vg.Tags = tags
30299			}
30300		}
30301	}
30302
30303	return nil
30304}
30305
30306// VpnGatewayProperties parameters for VpnGateway
30307type VpnGatewayProperties struct {
30308	// VirtualHub - The VirtualHub to which the gateway belongs
30309	VirtualHub *SubResource `json:"virtualHub,omitempty"`
30310	// Connections - list of all vpn connections to the gateway.
30311	Connections *[]VpnConnection `json:"connections,omitempty"`
30312	// BgpSettings - Local network gateway's BGP speaker settings.
30313	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
30314	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
30315	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
30316	// VpnGatewayScaleUnit - The scale unit for this vpn gateway.
30317	VpnGatewayScaleUnit *int32 `json:"vpnGatewayScaleUnit,omitempty"`
30318}
30319
30320// VpnGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
30321// long-running operation.
30322type VpnGatewaysCreateOrUpdateFuture struct {
30323	azure.FutureAPI
30324	// Result returns the result of the asynchronous operation.
30325	// If the operation has not completed it will return an error.
30326	Result func(VpnGatewaysClient) (VpnGateway, error)
30327}
30328
30329// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30330func (future *VpnGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
30331	var azFuture azure.Future
30332	if err := json.Unmarshal(body, &azFuture); err != nil {
30333		return err
30334	}
30335	future.FutureAPI = &azFuture
30336	future.Result = future.result
30337	return nil
30338}
30339
30340// result is the default implementation for VpnGatewaysCreateOrUpdateFuture.Result.
30341func (future *VpnGatewaysCreateOrUpdateFuture) result(client VpnGatewaysClient) (vg VpnGateway, err error) {
30342	var done bool
30343	done, err = future.DoneWithContext(context.Background(), client)
30344	if err != nil {
30345		err = autorest.NewErrorWithError(err, "network.VpnGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
30346		return
30347	}
30348	if !done {
30349		vg.Response.Response = future.Response()
30350		err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysCreateOrUpdateFuture")
30351		return
30352	}
30353	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
30354	if vg.Response.Response, err = future.GetResult(sender); err == nil && vg.Response.Response.StatusCode != http.StatusNoContent {
30355		vg, err = client.CreateOrUpdateResponder(vg.Response.Response)
30356		if err != nil {
30357			err = autorest.NewErrorWithError(err, "network.VpnGatewaysCreateOrUpdateFuture", "Result", vg.Response.Response, "Failure responding to request")
30358		}
30359	}
30360	return
30361}
30362
30363// VpnGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
30364// operation.
30365type VpnGatewaysDeleteFuture struct {
30366	azure.FutureAPI
30367	// Result returns the result of the asynchronous operation.
30368	// If the operation has not completed it will return an error.
30369	Result func(VpnGatewaysClient) (autorest.Response, error)
30370}
30371
30372// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30373func (future *VpnGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
30374	var azFuture azure.Future
30375	if err := json.Unmarshal(body, &azFuture); err != nil {
30376		return err
30377	}
30378	future.FutureAPI = &azFuture
30379	future.Result = future.result
30380	return nil
30381}
30382
30383// result is the default implementation for VpnGatewaysDeleteFuture.Result.
30384func (future *VpnGatewaysDeleteFuture) result(client VpnGatewaysClient) (ar autorest.Response, err error) {
30385	var done bool
30386	done, err = future.DoneWithContext(context.Background(), client)
30387	if err != nil {
30388		err = autorest.NewErrorWithError(err, "network.VpnGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
30389		return
30390	}
30391	if !done {
30392		ar.Response = future.Response()
30393		err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysDeleteFuture")
30394		return
30395	}
30396	ar.Response = future.Response()
30397	return
30398}
30399
30400// VpnGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
30401// operation.
30402type VpnGatewaysUpdateTagsFuture struct {
30403	azure.FutureAPI
30404	// Result returns the result of the asynchronous operation.
30405	// If the operation has not completed it will return an error.
30406	Result func(VpnGatewaysClient) (VpnGateway, error)
30407}
30408
30409// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30410func (future *VpnGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error {
30411	var azFuture azure.Future
30412	if err := json.Unmarshal(body, &azFuture); err != nil {
30413		return err
30414	}
30415	future.FutureAPI = &azFuture
30416	future.Result = future.result
30417	return nil
30418}
30419
30420// result is the default implementation for VpnGatewaysUpdateTagsFuture.Result.
30421func (future *VpnGatewaysUpdateTagsFuture) result(client VpnGatewaysClient) (vg VpnGateway, err error) {
30422	var done bool
30423	done, err = future.DoneWithContext(context.Background(), client)
30424	if err != nil {
30425		err = autorest.NewErrorWithError(err, "network.VpnGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
30426		return
30427	}
30428	if !done {
30429		vg.Response.Response = future.Response()
30430		err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysUpdateTagsFuture")
30431		return
30432	}
30433	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
30434	if vg.Response.Response, err = future.GetResult(sender); err == nil && vg.Response.Response.StatusCode != http.StatusNoContent {
30435		vg, err = client.UpdateTagsResponder(vg.Response.Response)
30436		if err != nil {
30437			err = autorest.NewErrorWithError(err, "network.VpnGatewaysUpdateTagsFuture", "Result", vg.Response.Response, "Failure responding to request")
30438		}
30439	}
30440	return
30441}
30442
30443// VpnProfileResponse vpn Profile Response for package generation
30444type VpnProfileResponse struct {
30445	autorest.Response `json:"-"`
30446	// ProfileURL - URL to the VPN profile
30447	ProfileURL *string `json:"profileUrl,omitempty"`
30448}
30449
30450// VpnSite vpnSite Resource.
30451type VpnSite struct {
30452	autorest.Response  `json:"-"`
30453	*VpnSiteProperties `json:"properties,omitempty"`
30454	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
30455	Etag *string `json:"etag,omitempty"`
30456	// ID - Resource ID.
30457	ID *string `json:"id,omitempty"`
30458	// Name - READ-ONLY; Resource name.
30459	Name *string `json:"name,omitempty"`
30460	// Type - READ-ONLY; Resource type.
30461	Type *string `json:"type,omitempty"`
30462	// Location - Resource location.
30463	Location *string `json:"location,omitempty"`
30464	// Tags - Resource tags.
30465	Tags map[string]*string `json:"tags"`
30466}
30467
30468// MarshalJSON is the custom marshaler for VpnSite.
30469func (vs VpnSite) MarshalJSON() ([]byte, error) {
30470	objectMap := make(map[string]interface{})
30471	if vs.VpnSiteProperties != nil {
30472		objectMap["properties"] = vs.VpnSiteProperties
30473	}
30474	if vs.ID != nil {
30475		objectMap["id"] = vs.ID
30476	}
30477	if vs.Location != nil {
30478		objectMap["location"] = vs.Location
30479	}
30480	if vs.Tags != nil {
30481		objectMap["tags"] = vs.Tags
30482	}
30483	return json.Marshal(objectMap)
30484}
30485
30486// UnmarshalJSON is the custom unmarshaler for VpnSite struct.
30487func (vs *VpnSite) UnmarshalJSON(body []byte) error {
30488	var m map[string]*json.RawMessage
30489	err := json.Unmarshal(body, &m)
30490	if err != nil {
30491		return err
30492	}
30493	for k, v := range m {
30494		switch k {
30495		case "properties":
30496			if v != nil {
30497				var vpnSiteProperties VpnSiteProperties
30498				err = json.Unmarshal(*v, &vpnSiteProperties)
30499				if err != nil {
30500					return err
30501				}
30502				vs.VpnSiteProperties = &vpnSiteProperties
30503			}
30504		case "etag":
30505			if v != nil {
30506				var etag string
30507				err = json.Unmarshal(*v, &etag)
30508				if err != nil {
30509					return err
30510				}
30511				vs.Etag = &etag
30512			}
30513		case "id":
30514			if v != nil {
30515				var ID string
30516				err = json.Unmarshal(*v, &ID)
30517				if err != nil {
30518					return err
30519				}
30520				vs.ID = &ID
30521			}
30522		case "name":
30523			if v != nil {
30524				var name string
30525				err = json.Unmarshal(*v, &name)
30526				if err != nil {
30527					return err
30528				}
30529				vs.Name = &name
30530			}
30531		case "type":
30532			if v != nil {
30533				var typeVar string
30534				err = json.Unmarshal(*v, &typeVar)
30535				if err != nil {
30536					return err
30537				}
30538				vs.Type = &typeVar
30539			}
30540		case "location":
30541			if v != nil {
30542				var location string
30543				err = json.Unmarshal(*v, &location)
30544				if err != nil {
30545					return err
30546				}
30547				vs.Location = &location
30548			}
30549		case "tags":
30550			if v != nil {
30551				var tags map[string]*string
30552				err = json.Unmarshal(*v, &tags)
30553				if err != nil {
30554					return err
30555				}
30556				vs.Tags = tags
30557			}
30558		}
30559	}
30560
30561	return nil
30562}
30563
30564// VpnSiteID vpnSite Resource.
30565type VpnSiteID struct {
30566	// VpnSite - READ-ONLY; The resource-uri of the vpn-site for which config is to be fetched.
30567	VpnSite *string `json:"vpnSite,omitempty"`
30568}
30569
30570// MarshalJSON is the custom marshaler for VpnSiteID.
30571func (vsi VpnSiteID) MarshalJSON() ([]byte, error) {
30572	objectMap := make(map[string]interface{})
30573	return json.Marshal(objectMap)
30574}
30575
30576// VpnSiteProperties parameters for VpnSite
30577type VpnSiteProperties struct {
30578	// VirtualWan - The VirtualWAN to which the vpnSite belongs
30579	VirtualWan *SubResource `json:"virtualWan,omitempty"`
30580	// DeviceProperties - The device properties
30581	DeviceProperties *DeviceProperties `json:"deviceProperties,omitempty"`
30582	// IPAddress - The ip-address for the vpn-site.
30583	IPAddress *string `json:"ipAddress,omitempty"`
30584	// SiteKey - The key for vpn-site that can be used for connections.
30585	SiteKey *string `json:"siteKey,omitempty"`
30586	// AddressSpace - The AddressSpace that contains an array of IP address ranges.
30587	AddressSpace *AddressSpace `json:"addressSpace,omitempty"`
30588	// BgpProperties - The set of bgp properties.
30589	BgpProperties *BgpSettings `json:"bgpProperties,omitempty"`
30590	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
30591	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
30592	// IsSecuritySite - IsSecuritySite flag
30593	IsSecuritySite *bool `json:"isSecuritySite,omitempty"`
30594}
30595
30596// VpnSitesConfigurationDownloadFuture an abstraction for monitoring and retrieving the results of a
30597// long-running operation.
30598type VpnSitesConfigurationDownloadFuture struct {
30599	azure.FutureAPI
30600	// Result returns the result of the asynchronous operation.
30601	// If the operation has not completed it will return an error.
30602	Result func(VpnSitesConfigurationClient) (autorest.Response, error)
30603}
30604
30605// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30606func (future *VpnSitesConfigurationDownloadFuture) UnmarshalJSON(body []byte) error {
30607	var azFuture azure.Future
30608	if err := json.Unmarshal(body, &azFuture); err != nil {
30609		return err
30610	}
30611	future.FutureAPI = &azFuture
30612	future.Result = future.result
30613	return nil
30614}
30615
30616// result is the default implementation for VpnSitesConfigurationDownloadFuture.Result.
30617func (future *VpnSitesConfigurationDownloadFuture) result(client VpnSitesConfigurationClient) (ar autorest.Response, err error) {
30618	var done bool
30619	done, err = future.DoneWithContext(context.Background(), client)
30620	if err != nil {
30621		err = autorest.NewErrorWithError(err, "network.VpnSitesConfigurationDownloadFuture", "Result", future.Response(), "Polling failure")
30622		return
30623	}
30624	if !done {
30625		ar.Response = future.Response()
30626		err = azure.NewAsyncOpIncompleteError("network.VpnSitesConfigurationDownloadFuture")
30627		return
30628	}
30629	ar.Response = future.Response()
30630	return
30631}
30632
30633// VpnSitesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
30634// operation.
30635type VpnSitesCreateOrUpdateFuture struct {
30636	azure.FutureAPI
30637	// Result returns the result of the asynchronous operation.
30638	// If the operation has not completed it will return an error.
30639	Result func(VpnSitesClient) (VpnSite, error)
30640}
30641
30642// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30643func (future *VpnSitesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
30644	var azFuture azure.Future
30645	if err := json.Unmarshal(body, &azFuture); err != nil {
30646		return err
30647	}
30648	future.FutureAPI = &azFuture
30649	future.Result = future.result
30650	return nil
30651}
30652
30653// result is the default implementation for VpnSitesCreateOrUpdateFuture.Result.
30654func (future *VpnSitesCreateOrUpdateFuture) result(client VpnSitesClient) (vs VpnSite, err error) {
30655	var done bool
30656	done, err = future.DoneWithContext(context.Background(), client)
30657	if err != nil {
30658		err = autorest.NewErrorWithError(err, "network.VpnSitesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
30659		return
30660	}
30661	if !done {
30662		vs.Response.Response = future.Response()
30663		err = azure.NewAsyncOpIncompleteError("network.VpnSitesCreateOrUpdateFuture")
30664		return
30665	}
30666	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
30667	if vs.Response.Response, err = future.GetResult(sender); err == nil && vs.Response.Response.StatusCode != http.StatusNoContent {
30668		vs, err = client.CreateOrUpdateResponder(vs.Response.Response)
30669		if err != nil {
30670			err = autorest.NewErrorWithError(err, "network.VpnSitesCreateOrUpdateFuture", "Result", vs.Response.Response, "Failure responding to request")
30671		}
30672	}
30673	return
30674}
30675
30676// VpnSitesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
30677// operation.
30678type VpnSitesDeleteFuture struct {
30679	azure.FutureAPI
30680	// Result returns the result of the asynchronous operation.
30681	// If the operation has not completed it will return an error.
30682	Result func(VpnSitesClient) (autorest.Response, error)
30683}
30684
30685// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30686func (future *VpnSitesDeleteFuture) UnmarshalJSON(body []byte) error {
30687	var azFuture azure.Future
30688	if err := json.Unmarshal(body, &azFuture); err != nil {
30689		return err
30690	}
30691	future.FutureAPI = &azFuture
30692	future.Result = future.result
30693	return nil
30694}
30695
30696// result is the default implementation for VpnSitesDeleteFuture.Result.
30697func (future *VpnSitesDeleteFuture) result(client VpnSitesClient) (ar autorest.Response, err error) {
30698	var done bool
30699	done, err = future.DoneWithContext(context.Background(), client)
30700	if err != nil {
30701		err = autorest.NewErrorWithError(err, "network.VpnSitesDeleteFuture", "Result", future.Response(), "Polling failure")
30702		return
30703	}
30704	if !done {
30705		ar.Response = future.Response()
30706		err = azure.NewAsyncOpIncompleteError("network.VpnSitesDeleteFuture")
30707		return
30708	}
30709	ar.Response = future.Response()
30710	return
30711}
30712
30713// VpnSitesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
30714// operation.
30715type VpnSitesUpdateTagsFuture 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// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30723func (future *VpnSitesUpdateTagsFuture) UnmarshalJSON(body []byte) error {
30724	var azFuture azure.Future
30725	if err := json.Unmarshal(body, &azFuture); err != nil {
30726		return err
30727	}
30728	future.FutureAPI = &azFuture
30729	future.Result = future.result
30730	return nil
30731}
30732
30733// result is the default implementation for VpnSitesUpdateTagsFuture.Result.
30734func (future *VpnSitesUpdateTagsFuture) result(client VpnSitesClient) (vs VpnSite, err error) {
30735	var done bool
30736	done, err = future.DoneWithContext(context.Background(), client)
30737	if err != nil {
30738		err = autorest.NewErrorWithError(err, "network.VpnSitesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
30739		return
30740	}
30741	if !done {
30742		vs.Response.Response = future.Response()
30743		err = azure.NewAsyncOpIncompleteError("network.VpnSitesUpdateTagsFuture")
30744		return
30745	}
30746	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
30747	if vs.Response.Response, err = future.GetResult(sender); err == nil && vs.Response.Response.StatusCode != http.StatusNoContent {
30748		vs, err = client.UpdateTagsResponder(vs.Response.Response)
30749		if err != nil {
30750			err = autorest.NewErrorWithError(err, "network.VpnSitesUpdateTagsFuture", "Result", vs.Response.Response, "Failure responding to request")
30751		}
30752	}
30753	return
30754}
30755
30756// Watcher network watcher in a resource group.
30757type Watcher struct {
30758	autorest.Response `json:"-"`
30759	// Etag - A unique read-only string that changes whenever the resource is updated.
30760	Etag                     *string `json:"etag,omitempty"`
30761	*WatcherPropertiesFormat `json:"properties,omitempty"`
30762	// ID - Resource ID.
30763	ID *string `json:"id,omitempty"`
30764	// Name - READ-ONLY; Resource name.
30765	Name *string `json:"name,omitempty"`
30766	// Type - READ-ONLY; Resource type.
30767	Type *string `json:"type,omitempty"`
30768	// Location - Resource location.
30769	Location *string `json:"location,omitempty"`
30770	// Tags - Resource tags.
30771	Tags map[string]*string `json:"tags"`
30772}
30773
30774// MarshalJSON is the custom marshaler for Watcher.
30775func (w Watcher) MarshalJSON() ([]byte, error) {
30776	objectMap := make(map[string]interface{})
30777	if w.Etag != nil {
30778		objectMap["etag"] = w.Etag
30779	}
30780	if w.WatcherPropertiesFormat != nil {
30781		objectMap["properties"] = w.WatcherPropertiesFormat
30782	}
30783	if w.ID != nil {
30784		objectMap["id"] = w.ID
30785	}
30786	if w.Location != nil {
30787		objectMap["location"] = w.Location
30788	}
30789	if w.Tags != nil {
30790		objectMap["tags"] = w.Tags
30791	}
30792	return json.Marshal(objectMap)
30793}
30794
30795// UnmarshalJSON is the custom unmarshaler for Watcher struct.
30796func (w *Watcher) UnmarshalJSON(body []byte) error {
30797	var m map[string]*json.RawMessage
30798	err := json.Unmarshal(body, &m)
30799	if err != nil {
30800		return err
30801	}
30802	for k, v := range m {
30803		switch k {
30804		case "etag":
30805			if v != nil {
30806				var etag string
30807				err = json.Unmarshal(*v, &etag)
30808				if err != nil {
30809					return err
30810				}
30811				w.Etag = &etag
30812			}
30813		case "properties":
30814			if v != nil {
30815				var watcherPropertiesFormat WatcherPropertiesFormat
30816				err = json.Unmarshal(*v, &watcherPropertiesFormat)
30817				if err != nil {
30818					return err
30819				}
30820				w.WatcherPropertiesFormat = &watcherPropertiesFormat
30821			}
30822		case "id":
30823			if v != nil {
30824				var ID string
30825				err = json.Unmarshal(*v, &ID)
30826				if err != nil {
30827					return err
30828				}
30829				w.ID = &ID
30830			}
30831		case "name":
30832			if v != nil {
30833				var name string
30834				err = json.Unmarshal(*v, &name)
30835				if err != nil {
30836					return err
30837				}
30838				w.Name = &name
30839			}
30840		case "type":
30841			if v != nil {
30842				var typeVar string
30843				err = json.Unmarshal(*v, &typeVar)
30844				if err != nil {
30845					return err
30846				}
30847				w.Type = &typeVar
30848			}
30849		case "location":
30850			if v != nil {
30851				var location string
30852				err = json.Unmarshal(*v, &location)
30853				if err != nil {
30854					return err
30855				}
30856				w.Location = &location
30857			}
30858		case "tags":
30859			if v != nil {
30860				var tags map[string]*string
30861				err = json.Unmarshal(*v, &tags)
30862				if err != nil {
30863					return err
30864				}
30865				w.Tags = tags
30866			}
30867		}
30868	}
30869
30870	return nil
30871}
30872
30873// WatcherListResult list of network watcher resources.
30874type WatcherListResult struct {
30875	autorest.Response `json:"-"`
30876	Value             *[]Watcher `json:"value,omitempty"`
30877}
30878
30879// WatcherPropertiesFormat the network watcher properties.
30880type WatcherPropertiesFormat struct {
30881	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
30882	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
30883}
30884
30885// MarshalJSON is the custom marshaler for WatcherPropertiesFormat.
30886func (wpf WatcherPropertiesFormat) MarshalJSON() ([]byte, error) {
30887	objectMap := make(map[string]interface{})
30888	return json.Marshal(objectMap)
30889}
30890
30891// WatchersCheckConnectivityFuture an abstraction for monitoring and retrieving the results of a
30892// long-running operation.
30893type WatchersCheckConnectivityFuture struct {
30894	azure.FutureAPI
30895	// Result returns the result of the asynchronous operation.
30896	// If the operation has not completed it will return an error.
30897	Result func(WatchersClient) (ConnectivityInformation, error)
30898}
30899
30900// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30901func (future *WatchersCheckConnectivityFuture) UnmarshalJSON(body []byte) error {
30902	var azFuture azure.Future
30903	if err := json.Unmarshal(body, &azFuture); err != nil {
30904		return err
30905	}
30906	future.FutureAPI = &azFuture
30907	future.Result = future.result
30908	return nil
30909}
30910
30911// result is the default implementation for WatchersCheckConnectivityFuture.Result.
30912func (future *WatchersCheckConnectivityFuture) result(client WatchersClient) (ci ConnectivityInformation, err error) {
30913	var done bool
30914	done, err = future.DoneWithContext(context.Background(), client)
30915	if err != nil {
30916		err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", future.Response(), "Polling failure")
30917		return
30918	}
30919	if !done {
30920		ci.Response.Response = future.Response()
30921		err = azure.NewAsyncOpIncompleteError("network.WatchersCheckConnectivityFuture")
30922		return
30923	}
30924	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
30925	if ci.Response.Response, err = future.GetResult(sender); err == nil && ci.Response.Response.StatusCode != http.StatusNoContent {
30926		ci, err = client.CheckConnectivityResponder(ci.Response.Response)
30927		if err != nil {
30928			err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", ci.Response.Response, "Failure responding to request")
30929		}
30930	}
30931	return
30932}
30933
30934// WatchersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
30935// operation.
30936type WatchersDeleteFuture 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) (autorest.Response, error)
30941}
30942
30943// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30944func (future *WatchersDeleteFuture) UnmarshalJSON(body []byte) error {
30945	var azFuture azure.Future
30946	if err := json.Unmarshal(body, &azFuture); err != nil {
30947		return err
30948	}
30949	future.FutureAPI = &azFuture
30950	future.Result = future.result
30951	return nil
30952}
30953
30954// result is the default implementation for WatchersDeleteFuture.Result.
30955func (future *WatchersDeleteFuture) result(client WatchersClient) (ar autorest.Response, err error) {
30956	var done bool
30957	done, err = future.DoneWithContext(context.Background(), client)
30958	if err != nil {
30959		err = autorest.NewErrorWithError(err, "network.WatchersDeleteFuture", "Result", future.Response(), "Polling failure")
30960		return
30961	}
30962	if !done {
30963		ar.Response = future.Response()
30964		err = azure.NewAsyncOpIncompleteError("network.WatchersDeleteFuture")
30965		return
30966	}
30967	ar.Response = future.Response()
30968	return
30969}
30970
30971// WatchersGetAzureReachabilityReportFuture an abstraction for monitoring and retrieving the results of a
30972// long-running operation.
30973type WatchersGetAzureReachabilityReportFuture struct {
30974	azure.FutureAPI
30975	// Result returns the result of the asynchronous operation.
30976	// If the operation has not completed it will return an error.
30977	Result func(WatchersClient) (AzureReachabilityReport, error)
30978}
30979
30980// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30981func (future *WatchersGetAzureReachabilityReportFuture) UnmarshalJSON(body []byte) error {
30982	var azFuture azure.Future
30983	if err := json.Unmarshal(body, &azFuture); err != nil {
30984		return err
30985	}
30986	future.FutureAPI = &azFuture
30987	future.Result = future.result
30988	return nil
30989}
30990
30991// result is the default implementation for WatchersGetAzureReachabilityReportFuture.Result.
30992func (future *WatchersGetAzureReachabilityReportFuture) result(client WatchersClient) (arr AzureReachabilityReport, err error) {
30993	var done bool
30994	done, err = future.DoneWithContext(context.Background(), client)
30995	if err != nil {
30996		err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", future.Response(), "Polling failure")
30997		return
30998	}
30999	if !done {
31000		arr.Response.Response = future.Response()
31001		err = azure.NewAsyncOpIncompleteError("network.WatchersGetAzureReachabilityReportFuture")
31002		return
31003	}
31004	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
31005	if arr.Response.Response, err = future.GetResult(sender); err == nil && arr.Response.Response.StatusCode != http.StatusNoContent {
31006		arr, err = client.GetAzureReachabilityReportResponder(arr.Response.Response)
31007		if err != nil {
31008			err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", arr.Response.Response, "Failure responding to request")
31009		}
31010	}
31011	return
31012}
31013
31014// WatchersGetFlowLogStatusFuture an abstraction for monitoring and retrieving the results of a
31015// long-running operation.
31016type WatchersGetFlowLogStatusFuture struct {
31017	azure.FutureAPI
31018	// Result returns the result of the asynchronous operation.
31019	// If the operation has not completed it will return an error.
31020	Result func(WatchersClient) (FlowLogInformation, error)
31021}
31022
31023// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31024func (future *WatchersGetFlowLogStatusFuture) UnmarshalJSON(body []byte) error {
31025	var azFuture azure.Future
31026	if err := json.Unmarshal(body, &azFuture); err != nil {
31027		return err
31028	}
31029	future.FutureAPI = &azFuture
31030	future.Result = future.result
31031	return nil
31032}
31033
31034// result is the default implementation for WatchersGetFlowLogStatusFuture.Result.
31035func (future *WatchersGetFlowLogStatusFuture) result(client WatchersClient) (fli FlowLogInformation, err error) {
31036	var done bool
31037	done, err = future.DoneWithContext(context.Background(), client)
31038	if err != nil {
31039		err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", future.Response(), "Polling failure")
31040		return
31041	}
31042	if !done {
31043		fli.Response.Response = future.Response()
31044		err = azure.NewAsyncOpIncompleteError("network.WatchersGetFlowLogStatusFuture")
31045		return
31046	}
31047	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
31048	if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
31049		fli, err = client.GetFlowLogStatusResponder(fli.Response.Response)
31050		if err != nil {
31051			err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", fli.Response.Response, "Failure responding to request")
31052		}
31053	}
31054	return
31055}
31056
31057// WatchersGetNetworkConfigurationDiagnosticFuture an abstraction for monitoring and retrieving the results
31058// of a long-running operation.
31059type WatchersGetNetworkConfigurationDiagnosticFuture struct {
31060	azure.FutureAPI
31061	// Result returns the result of the asynchronous operation.
31062	// If the operation has not completed it will return an error.
31063	Result func(WatchersClient) (ConfigurationDiagnosticResponse, error)
31064}
31065
31066// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31067func (future *WatchersGetNetworkConfigurationDiagnosticFuture) UnmarshalJSON(body []byte) error {
31068	var azFuture azure.Future
31069	if err := json.Unmarshal(body, &azFuture); err != nil {
31070		return err
31071	}
31072	future.FutureAPI = &azFuture
31073	future.Result = future.result
31074	return nil
31075}
31076
31077// result is the default implementation for WatchersGetNetworkConfigurationDiagnosticFuture.Result.
31078func (future *WatchersGetNetworkConfigurationDiagnosticFuture) result(client WatchersClient) (cdr ConfigurationDiagnosticResponse, err error) {
31079	var done bool
31080	done, err = future.DoneWithContext(context.Background(), client)
31081	if err != nil {
31082		err = autorest.NewErrorWithError(err, "network.WatchersGetNetworkConfigurationDiagnosticFuture", "Result", future.Response(), "Polling failure")
31083		return
31084	}
31085	if !done {
31086		cdr.Response.Response = future.Response()
31087		err = azure.NewAsyncOpIncompleteError("network.WatchersGetNetworkConfigurationDiagnosticFuture")
31088		return
31089	}
31090	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
31091	if cdr.Response.Response, err = future.GetResult(sender); err == nil && cdr.Response.Response.StatusCode != http.StatusNoContent {
31092		cdr, err = client.GetNetworkConfigurationDiagnosticResponder(cdr.Response.Response)
31093		if err != nil {
31094			err = autorest.NewErrorWithError(err, "network.WatchersGetNetworkConfigurationDiagnosticFuture", "Result", cdr.Response.Response, "Failure responding to request")
31095		}
31096	}
31097	return
31098}
31099
31100// WatchersGetNextHopFuture an abstraction for monitoring and retrieving the results of a long-running
31101// operation.
31102type WatchersGetNextHopFuture struct {
31103	azure.FutureAPI
31104	// Result returns the result of the asynchronous operation.
31105	// If the operation has not completed it will return an error.
31106	Result func(WatchersClient) (NextHopResult, error)
31107}
31108
31109// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31110func (future *WatchersGetNextHopFuture) UnmarshalJSON(body []byte) error {
31111	var azFuture azure.Future
31112	if err := json.Unmarshal(body, &azFuture); err != nil {
31113		return err
31114	}
31115	future.FutureAPI = &azFuture
31116	future.Result = future.result
31117	return nil
31118}
31119
31120// result is the default implementation for WatchersGetNextHopFuture.Result.
31121func (future *WatchersGetNextHopFuture) result(client WatchersClient) (nhr NextHopResult, err error) {
31122	var done bool
31123	done, err = future.DoneWithContext(context.Background(), client)
31124	if err != nil {
31125		err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", future.Response(), "Polling failure")
31126		return
31127	}
31128	if !done {
31129		nhr.Response.Response = future.Response()
31130		err = azure.NewAsyncOpIncompleteError("network.WatchersGetNextHopFuture")
31131		return
31132	}
31133	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
31134	if nhr.Response.Response, err = future.GetResult(sender); err == nil && nhr.Response.Response.StatusCode != http.StatusNoContent {
31135		nhr, err = client.GetNextHopResponder(nhr.Response.Response)
31136		if err != nil {
31137			err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", nhr.Response.Response, "Failure responding to request")
31138		}
31139	}
31140	return
31141}
31142
31143// WatchersGetTroubleshootingFuture an abstraction for monitoring and retrieving the results of a
31144// long-running operation.
31145type WatchersGetTroubleshootingFuture struct {
31146	azure.FutureAPI
31147	// Result returns the result of the asynchronous operation.
31148	// If the operation has not completed it will return an error.
31149	Result func(WatchersClient) (TroubleshootingResult, error)
31150}
31151
31152// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31153func (future *WatchersGetTroubleshootingFuture) UnmarshalJSON(body []byte) error {
31154	var azFuture azure.Future
31155	if err := json.Unmarshal(body, &azFuture); err != nil {
31156		return err
31157	}
31158	future.FutureAPI = &azFuture
31159	future.Result = future.result
31160	return nil
31161}
31162
31163// result is the default implementation for WatchersGetTroubleshootingFuture.Result.
31164func (future *WatchersGetTroubleshootingFuture) result(client WatchersClient) (tr TroubleshootingResult, err error) {
31165	var done bool
31166	done, err = future.DoneWithContext(context.Background(), client)
31167	if err != nil {
31168		err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", future.Response(), "Polling failure")
31169		return
31170	}
31171	if !done {
31172		tr.Response.Response = future.Response()
31173		err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingFuture")
31174		return
31175	}
31176	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
31177	if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
31178		tr, err = client.GetTroubleshootingResponder(tr.Response.Response)
31179		if err != nil {
31180			err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", tr.Response.Response, "Failure responding to request")
31181		}
31182	}
31183	return
31184}
31185
31186// WatchersGetTroubleshootingResultFuture an abstraction for monitoring and retrieving the results of a
31187// long-running operation.
31188type WatchersGetTroubleshootingResultFuture struct {
31189	azure.FutureAPI
31190	// Result returns the result of the asynchronous operation.
31191	// If the operation has not completed it will return an error.
31192	Result func(WatchersClient) (TroubleshootingResult, error)
31193}
31194
31195// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31196func (future *WatchersGetTroubleshootingResultFuture) UnmarshalJSON(body []byte) error {
31197	var azFuture azure.Future
31198	if err := json.Unmarshal(body, &azFuture); err != nil {
31199		return err
31200	}
31201	future.FutureAPI = &azFuture
31202	future.Result = future.result
31203	return nil
31204}
31205
31206// result is the default implementation for WatchersGetTroubleshootingResultFuture.Result.
31207func (future *WatchersGetTroubleshootingResultFuture) result(client WatchersClient) (tr TroubleshootingResult, err error) {
31208	var done bool
31209	done, err = future.DoneWithContext(context.Background(), client)
31210	if err != nil {
31211		err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", future.Response(), "Polling failure")
31212		return
31213	}
31214	if !done {
31215		tr.Response.Response = future.Response()
31216		err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingResultFuture")
31217		return
31218	}
31219	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
31220	if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
31221		tr, err = client.GetTroubleshootingResultResponder(tr.Response.Response)
31222		if err != nil {
31223			err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", tr.Response.Response, "Failure responding to request")
31224		}
31225	}
31226	return
31227}
31228
31229// WatchersGetVMSecurityRulesFuture an abstraction for monitoring and retrieving the results of a
31230// long-running operation.
31231type WatchersGetVMSecurityRulesFuture struct {
31232	azure.FutureAPI
31233	// Result returns the result of the asynchronous operation.
31234	// If the operation has not completed it will return an error.
31235	Result func(WatchersClient) (SecurityGroupViewResult, error)
31236}
31237
31238// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31239func (future *WatchersGetVMSecurityRulesFuture) UnmarshalJSON(body []byte) error {
31240	var azFuture azure.Future
31241	if err := json.Unmarshal(body, &azFuture); err != nil {
31242		return err
31243	}
31244	future.FutureAPI = &azFuture
31245	future.Result = future.result
31246	return nil
31247}
31248
31249// result is the default implementation for WatchersGetVMSecurityRulesFuture.Result.
31250func (future *WatchersGetVMSecurityRulesFuture) result(client WatchersClient) (sgvr SecurityGroupViewResult, err error) {
31251	var done bool
31252	done, err = future.DoneWithContext(context.Background(), client)
31253	if err != nil {
31254		err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", future.Response(), "Polling failure")
31255		return
31256	}
31257	if !done {
31258		sgvr.Response.Response = future.Response()
31259		err = azure.NewAsyncOpIncompleteError("network.WatchersGetVMSecurityRulesFuture")
31260		return
31261	}
31262	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
31263	if sgvr.Response.Response, err = future.GetResult(sender); err == nil && sgvr.Response.Response.StatusCode != http.StatusNoContent {
31264		sgvr, err = client.GetVMSecurityRulesResponder(sgvr.Response.Response)
31265		if err != nil {
31266			err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", sgvr.Response.Response, "Failure responding to request")
31267		}
31268	}
31269	return
31270}
31271
31272// WatchersListAvailableProvidersFuture an abstraction for monitoring and retrieving the results of a
31273// long-running operation.
31274type WatchersListAvailableProvidersFuture struct {
31275	azure.FutureAPI
31276	// Result returns the result of the asynchronous operation.
31277	// If the operation has not completed it will return an error.
31278	Result func(WatchersClient) (AvailableProvidersList, error)
31279}
31280
31281// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31282func (future *WatchersListAvailableProvidersFuture) UnmarshalJSON(body []byte) error {
31283	var azFuture azure.Future
31284	if err := json.Unmarshal(body, &azFuture); err != nil {
31285		return err
31286	}
31287	future.FutureAPI = &azFuture
31288	future.Result = future.result
31289	return nil
31290}
31291
31292// result is the default implementation for WatchersListAvailableProvidersFuture.Result.
31293func (future *WatchersListAvailableProvidersFuture) result(client WatchersClient) (apl AvailableProvidersList, err error) {
31294	var done bool
31295	done, err = future.DoneWithContext(context.Background(), client)
31296	if err != nil {
31297		err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", future.Response(), "Polling failure")
31298		return
31299	}
31300	if !done {
31301		apl.Response.Response = future.Response()
31302		err = azure.NewAsyncOpIncompleteError("network.WatchersListAvailableProvidersFuture")
31303		return
31304	}
31305	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
31306	if apl.Response.Response, err = future.GetResult(sender); err == nil && apl.Response.Response.StatusCode != http.StatusNoContent {
31307		apl, err = client.ListAvailableProvidersResponder(apl.Response.Response)
31308		if err != nil {
31309			err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", apl.Response.Response, "Failure responding to request")
31310		}
31311	}
31312	return
31313}
31314
31315// WatchersSetFlowLogConfigurationFuture an abstraction for monitoring and retrieving the results of a
31316// long-running operation.
31317type WatchersSetFlowLogConfigurationFuture struct {
31318	azure.FutureAPI
31319	// Result returns the result of the asynchronous operation.
31320	// If the operation has not completed it will return an error.
31321	Result func(WatchersClient) (FlowLogInformation, error)
31322}
31323
31324// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31325func (future *WatchersSetFlowLogConfigurationFuture) UnmarshalJSON(body []byte) error {
31326	var azFuture azure.Future
31327	if err := json.Unmarshal(body, &azFuture); err != nil {
31328		return err
31329	}
31330	future.FutureAPI = &azFuture
31331	future.Result = future.result
31332	return nil
31333}
31334
31335// result is the default implementation for WatchersSetFlowLogConfigurationFuture.Result.
31336func (future *WatchersSetFlowLogConfigurationFuture) result(client WatchersClient) (fli FlowLogInformation, err error) {
31337	var done bool
31338	done, err = future.DoneWithContext(context.Background(), client)
31339	if err != nil {
31340		err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", future.Response(), "Polling failure")
31341		return
31342	}
31343	if !done {
31344		fli.Response.Response = future.Response()
31345		err = azure.NewAsyncOpIncompleteError("network.WatchersSetFlowLogConfigurationFuture")
31346		return
31347	}
31348	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
31349	if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
31350		fli, err = client.SetFlowLogConfigurationResponder(fli.Response.Response)
31351		if err != nil {
31352			err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", fli.Response.Response, "Failure responding to request")
31353		}
31354	}
31355	return
31356}
31357
31358// WatchersVerifyIPFlowFuture an abstraction for monitoring and retrieving the results of a long-running
31359// operation.
31360type WatchersVerifyIPFlowFuture struct {
31361	azure.FutureAPI
31362	// Result returns the result of the asynchronous operation.
31363	// If the operation has not completed it will return an error.
31364	Result func(WatchersClient) (VerificationIPFlowResult, error)
31365}
31366
31367// UnmarshalJSON is the custom unmarshaller for CreateFuture.
31368func (future *WatchersVerifyIPFlowFuture) UnmarshalJSON(body []byte) error {
31369	var azFuture azure.Future
31370	if err := json.Unmarshal(body, &azFuture); err != nil {
31371		return err
31372	}
31373	future.FutureAPI = &azFuture
31374	future.Result = future.result
31375	return nil
31376}
31377
31378// result is the default implementation for WatchersVerifyIPFlowFuture.Result.
31379func (future *WatchersVerifyIPFlowFuture) result(client WatchersClient) (vifr VerificationIPFlowResult, err error) {
31380	var done bool
31381	done, err = future.DoneWithContext(context.Background(), client)
31382	if err != nil {
31383		err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", future.Response(), "Polling failure")
31384		return
31385	}
31386	if !done {
31387		vifr.Response.Response = future.Response()
31388		err = azure.NewAsyncOpIncompleteError("network.WatchersVerifyIPFlowFuture")
31389		return
31390	}
31391	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
31392	if vifr.Response.Response, err = future.GetResult(sender); err == nil && vifr.Response.Response.StatusCode != http.StatusNoContent {
31393		vifr, err = client.VerifyIPFlowResponder(vifr.Response.Response)
31394		if err != nil {
31395			err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", vifr.Response.Response, "Failure responding to request")
31396		}
31397	}
31398	return
31399}
31400