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-08-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	// ID - Resource ID.
39	ID *string `json:"id,omitempty"`
40	// Name - READ-ONLY; Resource name.
41	Name *string `json:"name,omitempty"`
42	// Type - READ-ONLY; Resource type.
43	Type *string `json:"type,omitempty"`
44	// Location - Resource location.
45	Location *string `json:"location,omitempty"`
46	// Tags - Resource tags.
47	Tags map[string]*string `json:"tags"`
48}
49
50// MarshalJSON is the custom marshaler for ApplicationGateway.
51func (ag ApplicationGateway) MarshalJSON() ([]byte, error) {
52	objectMap := make(map[string]interface{})
53	if ag.ApplicationGatewayPropertiesFormat != nil {
54		objectMap["properties"] = ag.ApplicationGatewayPropertiesFormat
55	}
56	if ag.Etag != nil {
57		objectMap["etag"] = ag.Etag
58	}
59	if ag.Zones != nil {
60		objectMap["zones"] = ag.Zones
61	}
62	if ag.ID != nil {
63		objectMap["id"] = ag.ID
64	}
65	if ag.Location != nil {
66		objectMap["location"] = ag.Location
67	}
68	if ag.Tags != nil {
69		objectMap["tags"] = ag.Tags
70	}
71	return json.Marshal(objectMap)
72}
73
74// UnmarshalJSON is the custom unmarshaler for ApplicationGateway struct.
75func (ag *ApplicationGateway) UnmarshalJSON(body []byte) error {
76	var m map[string]*json.RawMessage
77	err := json.Unmarshal(body, &m)
78	if err != nil {
79		return err
80	}
81	for k, v := range m {
82		switch k {
83		case "properties":
84			if v != nil {
85				var applicationGatewayPropertiesFormat ApplicationGatewayPropertiesFormat
86				err = json.Unmarshal(*v, &applicationGatewayPropertiesFormat)
87				if err != nil {
88					return err
89				}
90				ag.ApplicationGatewayPropertiesFormat = &applicationGatewayPropertiesFormat
91			}
92		case "etag":
93			if v != nil {
94				var etag string
95				err = json.Unmarshal(*v, &etag)
96				if err != nil {
97					return err
98				}
99				ag.Etag = &etag
100			}
101		case "zones":
102			if v != nil {
103				var zones []string
104				err = json.Unmarshal(*v, &zones)
105				if err != nil {
106					return err
107				}
108				ag.Zones = &zones
109			}
110		case "id":
111			if v != nil {
112				var ID string
113				err = json.Unmarshal(*v, &ID)
114				if err != nil {
115					return err
116				}
117				ag.ID = &ID
118			}
119		case "name":
120			if v != nil {
121				var name string
122				err = json.Unmarshal(*v, &name)
123				if err != nil {
124					return err
125				}
126				ag.Name = &name
127			}
128		case "type":
129			if v != nil {
130				var typeVar string
131				err = json.Unmarshal(*v, &typeVar)
132				if err != nil {
133					return err
134				}
135				ag.Type = &typeVar
136			}
137		case "location":
138			if v != nil {
139				var location string
140				err = json.Unmarshal(*v, &location)
141				if err != nil {
142					return err
143				}
144				ag.Location = &location
145			}
146		case "tags":
147			if v != nil {
148				var tags map[string]*string
149				err = json.Unmarshal(*v, &tags)
150				if err != nil {
151					return err
152				}
153				ag.Tags = tags
154			}
155		}
156	}
157
158	return nil
159}
160
161// ApplicationGatewayAuthenticationCertificate authentication certificates of an application gateway.
162type ApplicationGatewayAuthenticationCertificate struct {
163	*ApplicationGatewayAuthenticationCertificatePropertiesFormat `json:"properties,omitempty"`
164	// Name - Name of the authentication certificate that is unique within an Application Gateway.
165	Name *string `json:"name,omitempty"`
166	// Etag - A unique read-only string that changes whenever the resource is updated.
167	Etag *string `json:"etag,omitempty"`
168	// Type - Type of the resource.
169	Type *string `json:"type,omitempty"`
170	// ID - Resource ID.
171	ID *string `json:"id,omitempty"`
172}
173
174// MarshalJSON is the custom marshaler for ApplicationGatewayAuthenticationCertificate.
175func (agac ApplicationGatewayAuthenticationCertificate) MarshalJSON() ([]byte, error) {
176	objectMap := make(map[string]interface{})
177	if agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat != nil {
178		objectMap["properties"] = agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat
179	}
180	if agac.Name != nil {
181		objectMap["name"] = agac.Name
182	}
183	if agac.Etag != nil {
184		objectMap["etag"] = agac.Etag
185	}
186	if agac.Type != nil {
187		objectMap["type"] = agac.Type
188	}
189	if agac.ID != nil {
190		objectMap["id"] = agac.ID
191	}
192	return json.Marshal(objectMap)
193}
194
195// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayAuthenticationCertificate struct.
196func (agac *ApplicationGatewayAuthenticationCertificate) UnmarshalJSON(body []byte) error {
197	var m map[string]*json.RawMessage
198	err := json.Unmarshal(body, &m)
199	if err != nil {
200		return err
201	}
202	for k, v := range m {
203		switch k {
204		case "properties":
205			if v != nil {
206				var applicationGatewayAuthenticationCertificatePropertiesFormat ApplicationGatewayAuthenticationCertificatePropertiesFormat
207				err = json.Unmarshal(*v, &applicationGatewayAuthenticationCertificatePropertiesFormat)
208				if err != nil {
209					return err
210				}
211				agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat = &applicationGatewayAuthenticationCertificatePropertiesFormat
212			}
213		case "name":
214			if v != nil {
215				var name string
216				err = json.Unmarshal(*v, &name)
217				if err != nil {
218					return err
219				}
220				agac.Name = &name
221			}
222		case "etag":
223			if v != nil {
224				var etag string
225				err = json.Unmarshal(*v, &etag)
226				if err != nil {
227					return err
228				}
229				agac.Etag = &etag
230			}
231		case "type":
232			if v != nil {
233				var typeVar string
234				err = json.Unmarshal(*v, &typeVar)
235				if err != nil {
236					return err
237				}
238				agac.Type = &typeVar
239			}
240		case "id":
241			if v != nil {
242				var ID string
243				err = json.Unmarshal(*v, &ID)
244				if err != nil {
245					return err
246				}
247				agac.ID = &ID
248			}
249		}
250	}
251
252	return nil
253}
254
255// ApplicationGatewayAuthenticationCertificatePropertiesFormat authentication certificates properties of an
256// application gateway.
257type ApplicationGatewayAuthenticationCertificatePropertiesFormat struct {
258	// Data - Certificate public data.
259	Data *string `json:"data,omitempty"`
260	// ProvisioningState - Provisioning state of the authentication certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
261	ProvisioningState *string `json:"provisioningState,omitempty"`
262}
263
264// ApplicationGatewayAutoscaleConfiguration application Gateway autoscale configuration.
265type ApplicationGatewayAutoscaleConfiguration struct {
266	// MinCapacity - Lower bound on number of Application Gateway instances
267	MinCapacity *int32 `json:"minCapacity,omitempty"`
268}
269
270// ApplicationGatewayAvailableSslOptions response for ApplicationGatewayAvailableSslOptions API service
271// call.
272type ApplicationGatewayAvailableSslOptions struct {
273	autorest.Response                                      `json:"-"`
274	*ApplicationGatewayAvailableSslOptionsPropertiesFormat `json:"properties,omitempty"`
275	// ID - Resource ID.
276	ID *string `json:"id,omitempty"`
277	// Name - READ-ONLY; Resource name.
278	Name *string `json:"name,omitempty"`
279	// Type - READ-ONLY; Resource type.
280	Type *string `json:"type,omitempty"`
281	// Location - Resource location.
282	Location *string `json:"location,omitempty"`
283	// Tags - Resource tags.
284	Tags map[string]*string `json:"tags"`
285}
286
287// MarshalJSON is the custom marshaler for ApplicationGatewayAvailableSslOptions.
288func (agaso ApplicationGatewayAvailableSslOptions) MarshalJSON() ([]byte, error) {
289	objectMap := make(map[string]interface{})
290	if agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat != nil {
291		objectMap["properties"] = agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat
292	}
293	if agaso.ID != nil {
294		objectMap["id"] = agaso.ID
295	}
296	if agaso.Location != nil {
297		objectMap["location"] = agaso.Location
298	}
299	if agaso.Tags != nil {
300		objectMap["tags"] = agaso.Tags
301	}
302	return json.Marshal(objectMap)
303}
304
305// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayAvailableSslOptions struct.
306func (agaso *ApplicationGatewayAvailableSslOptions) UnmarshalJSON(body []byte) error {
307	var m map[string]*json.RawMessage
308	err := json.Unmarshal(body, &m)
309	if err != nil {
310		return err
311	}
312	for k, v := range m {
313		switch k {
314		case "properties":
315			if v != nil {
316				var applicationGatewayAvailableSslOptionsPropertiesFormat ApplicationGatewayAvailableSslOptionsPropertiesFormat
317				err = json.Unmarshal(*v, &applicationGatewayAvailableSslOptionsPropertiesFormat)
318				if err != nil {
319					return err
320				}
321				agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat = &applicationGatewayAvailableSslOptionsPropertiesFormat
322			}
323		case "id":
324			if v != nil {
325				var ID string
326				err = json.Unmarshal(*v, &ID)
327				if err != nil {
328					return err
329				}
330				agaso.ID = &ID
331			}
332		case "name":
333			if v != nil {
334				var name string
335				err = json.Unmarshal(*v, &name)
336				if err != nil {
337					return err
338				}
339				agaso.Name = &name
340			}
341		case "type":
342			if v != nil {
343				var typeVar string
344				err = json.Unmarshal(*v, &typeVar)
345				if err != nil {
346					return err
347				}
348				agaso.Type = &typeVar
349			}
350		case "location":
351			if v != nil {
352				var location string
353				err = json.Unmarshal(*v, &location)
354				if err != nil {
355					return err
356				}
357				agaso.Location = &location
358			}
359		case "tags":
360			if v != nil {
361				var tags map[string]*string
362				err = json.Unmarshal(*v, &tags)
363				if err != nil {
364					return err
365				}
366				agaso.Tags = tags
367			}
368		}
369	}
370
371	return nil
372}
373
374// ApplicationGatewayAvailableSslOptionsPropertiesFormat properties of
375// ApplicationGatewayAvailableSslOptions
376type ApplicationGatewayAvailableSslOptionsPropertiesFormat struct {
377	// PredefinedPolicies - List of available Ssl predefined policy.
378	PredefinedPolicies *[]SubResource `json:"predefinedPolicies,omitempty"`
379	// DefaultPolicy - Name of the Ssl predefined policy applied by default to application gateway. Possible values include: 'AppGwSslPolicy20150501', 'AppGwSslPolicy20170401', 'AppGwSslPolicy20170401S'
380	DefaultPolicy ApplicationGatewaySslPolicyName `json:"defaultPolicy,omitempty"`
381	// AvailableCipherSuites - List of available Ssl cipher suites.
382	AvailableCipherSuites *[]ApplicationGatewaySslCipherSuite `json:"availableCipherSuites,omitempty"`
383	// AvailableProtocols - List of available Ssl protocols.
384	AvailableProtocols *[]ApplicationGatewaySslProtocol `json:"availableProtocols,omitempty"`
385}
386
387// ApplicationGatewayAvailableSslPredefinedPolicies response for ApplicationGatewayAvailableSslOptions API
388// service call.
389type ApplicationGatewayAvailableSslPredefinedPolicies struct {
390	autorest.Response `json:"-"`
391	// Value - List of available Ssl predefined policy.
392	Value *[]ApplicationGatewaySslPredefinedPolicy `json:"value,omitempty"`
393	// NextLink - URL to get the next set of results.
394	NextLink *string `json:"nextLink,omitempty"`
395}
396
397// ApplicationGatewayAvailableSslPredefinedPoliciesIterator provides access to a complete listing of
398// ApplicationGatewaySslPredefinedPolicy values.
399type ApplicationGatewayAvailableSslPredefinedPoliciesIterator struct {
400	i    int
401	page ApplicationGatewayAvailableSslPredefinedPoliciesPage
402}
403
404// NextWithContext advances to the next value.  If there was an error making
405// the request the iterator does not advance and the error is returned.
406func (iter *ApplicationGatewayAvailableSslPredefinedPoliciesIterator) NextWithContext(ctx context.Context) (err error) {
407	if tracing.IsEnabled() {
408		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayAvailableSslPredefinedPoliciesIterator.NextWithContext")
409		defer func() {
410			sc := -1
411			if iter.Response().Response.Response != nil {
412				sc = iter.Response().Response.Response.StatusCode
413			}
414			tracing.EndSpan(ctx, sc, err)
415		}()
416	}
417	iter.i++
418	if iter.i < len(iter.page.Values()) {
419		return nil
420	}
421	err = iter.page.NextWithContext(ctx)
422	if err != nil {
423		iter.i--
424		return err
425	}
426	iter.i = 0
427	return nil
428}
429
430// Next advances to the next value.  If there was an error making
431// the request the iterator does not advance and the error is returned.
432// Deprecated: Use NextWithContext() instead.
433func (iter *ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Next() error {
434	return iter.NextWithContext(context.Background())
435}
436
437// NotDone returns true if the enumeration should be started or is not yet complete.
438func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) NotDone() bool {
439	return iter.page.NotDone() && iter.i < len(iter.page.Values())
440}
441
442// Response returns the raw server response from the last page request.
443func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Response() ApplicationGatewayAvailableSslPredefinedPolicies {
444	return iter.page.Response()
445}
446
447// Value returns the current value or a zero-initialized value if the
448// iterator has advanced beyond the end of the collection.
449func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Value() ApplicationGatewaySslPredefinedPolicy {
450	if !iter.page.NotDone() {
451		return ApplicationGatewaySslPredefinedPolicy{}
452	}
453	return iter.page.Values()[iter.i]
454}
455
456// Creates a new instance of the ApplicationGatewayAvailableSslPredefinedPoliciesIterator type.
457func NewApplicationGatewayAvailableSslPredefinedPoliciesIterator(page ApplicationGatewayAvailableSslPredefinedPoliciesPage) ApplicationGatewayAvailableSslPredefinedPoliciesIterator {
458	return ApplicationGatewayAvailableSslPredefinedPoliciesIterator{page: page}
459}
460
461// IsEmpty returns true if the ListResult contains no values.
462func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) IsEmpty() bool {
463	return agaspp.Value == nil || len(*agaspp.Value) == 0
464}
465
466// hasNextLink returns true if the NextLink is not empty.
467func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) hasNextLink() bool {
468	return agaspp.NextLink != nil && len(*agaspp.NextLink) != 0
469}
470
471// applicationGatewayAvailableSslPredefinedPoliciesPreparer prepares a request to retrieve the next set of results.
472// It returns nil if no more results exist.
473func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) applicationGatewayAvailableSslPredefinedPoliciesPreparer(ctx context.Context) (*http.Request, error) {
474	if !agaspp.hasNextLink() {
475		return nil, nil
476	}
477	return autorest.Prepare((&http.Request{}).WithContext(ctx),
478		autorest.AsJSON(),
479		autorest.AsGet(),
480		autorest.WithBaseURL(to.String(agaspp.NextLink)))
481}
482
483// ApplicationGatewayAvailableSslPredefinedPoliciesPage contains a page of
484// ApplicationGatewaySslPredefinedPolicy values.
485type ApplicationGatewayAvailableSslPredefinedPoliciesPage struct {
486	fn     func(context.Context, ApplicationGatewayAvailableSslPredefinedPolicies) (ApplicationGatewayAvailableSslPredefinedPolicies, error)
487	agaspp ApplicationGatewayAvailableSslPredefinedPolicies
488}
489
490// NextWithContext advances to the next page of values.  If there was an error making
491// the request the page does not advance and the error is returned.
492func (page *ApplicationGatewayAvailableSslPredefinedPoliciesPage) NextWithContext(ctx context.Context) (err error) {
493	if tracing.IsEnabled() {
494		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayAvailableSslPredefinedPoliciesPage.NextWithContext")
495		defer func() {
496			sc := -1
497			if page.Response().Response.Response != nil {
498				sc = page.Response().Response.Response.StatusCode
499			}
500			tracing.EndSpan(ctx, sc, err)
501		}()
502	}
503	for {
504		next, err := page.fn(ctx, page.agaspp)
505		if err != nil {
506			return err
507		}
508		page.agaspp = next
509		if !next.hasNextLink() || !next.IsEmpty() {
510			break
511		}
512	}
513	return nil
514}
515
516// Next advances to the next page of values.  If there was an error making
517// the request the page does not advance and the error is returned.
518// Deprecated: Use NextWithContext() instead.
519func (page *ApplicationGatewayAvailableSslPredefinedPoliciesPage) Next() error {
520	return page.NextWithContext(context.Background())
521}
522
523// NotDone returns true if the page enumeration should be started or is not yet complete.
524func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) NotDone() bool {
525	return !page.agaspp.IsEmpty()
526}
527
528// Response returns the raw server response from the last page request.
529func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) Response() ApplicationGatewayAvailableSslPredefinedPolicies {
530	return page.agaspp
531}
532
533// Values returns the slice of values for the current page or nil if there are no values.
534func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) Values() []ApplicationGatewaySslPredefinedPolicy {
535	if page.agaspp.IsEmpty() {
536		return nil
537	}
538	return *page.agaspp.Value
539}
540
541// Creates a new instance of the ApplicationGatewayAvailableSslPredefinedPoliciesPage type.
542func NewApplicationGatewayAvailableSslPredefinedPoliciesPage(cur ApplicationGatewayAvailableSslPredefinedPolicies, getNextPage func(context.Context, ApplicationGatewayAvailableSslPredefinedPolicies) (ApplicationGatewayAvailableSslPredefinedPolicies, error)) ApplicationGatewayAvailableSslPredefinedPoliciesPage {
543	return ApplicationGatewayAvailableSslPredefinedPoliciesPage{
544		fn:     getNextPage,
545		agaspp: cur,
546	}
547}
548
549// ApplicationGatewayAvailableWafRuleSetsResult response for ApplicationGatewayAvailableWafRuleSets API
550// service call.
551type ApplicationGatewayAvailableWafRuleSetsResult struct {
552	autorest.Response `json:"-"`
553	// Value - The list of application gateway rule sets.
554	Value *[]ApplicationGatewayFirewallRuleSet `json:"value,omitempty"`
555}
556
557// ApplicationGatewayBackendAddress backend address of an application gateway.
558type ApplicationGatewayBackendAddress struct {
559	// Fqdn - Fully qualified domain name (FQDN).
560	Fqdn *string `json:"fqdn,omitempty"`
561	// IPAddress - IP address
562	IPAddress *string `json:"ipAddress,omitempty"`
563}
564
565// ApplicationGatewayBackendAddressPool backend Address Pool of an application gateway.
566type ApplicationGatewayBackendAddressPool struct {
567	*ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"`
568	// Name - Name of the backend address pool that is unique within an Application Gateway.
569	Name *string `json:"name,omitempty"`
570	// Etag - A unique read-only string that changes whenever the resource is updated.
571	Etag *string `json:"etag,omitempty"`
572	// Type - Type of the resource.
573	Type *string `json:"type,omitempty"`
574	// ID - Resource ID.
575	ID *string `json:"id,omitempty"`
576}
577
578// MarshalJSON is the custom marshaler for ApplicationGatewayBackendAddressPool.
579func (agbap ApplicationGatewayBackendAddressPool) MarshalJSON() ([]byte, error) {
580	objectMap := make(map[string]interface{})
581	if agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat != nil {
582		objectMap["properties"] = agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat
583	}
584	if agbap.Name != nil {
585		objectMap["name"] = agbap.Name
586	}
587	if agbap.Etag != nil {
588		objectMap["etag"] = agbap.Etag
589	}
590	if agbap.Type != nil {
591		objectMap["type"] = agbap.Type
592	}
593	if agbap.ID != nil {
594		objectMap["id"] = agbap.ID
595	}
596	return json.Marshal(objectMap)
597}
598
599// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayBackendAddressPool struct.
600func (agbap *ApplicationGatewayBackendAddressPool) UnmarshalJSON(body []byte) error {
601	var m map[string]*json.RawMessage
602	err := json.Unmarshal(body, &m)
603	if err != nil {
604		return err
605	}
606	for k, v := range m {
607		switch k {
608		case "properties":
609			if v != nil {
610				var applicationGatewayBackendAddressPoolPropertiesFormat ApplicationGatewayBackendAddressPoolPropertiesFormat
611				err = json.Unmarshal(*v, &applicationGatewayBackendAddressPoolPropertiesFormat)
612				if err != nil {
613					return err
614				}
615				agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat = &applicationGatewayBackendAddressPoolPropertiesFormat
616			}
617		case "name":
618			if v != nil {
619				var name string
620				err = json.Unmarshal(*v, &name)
621				if err != nil {
622					return err
623				}
624				agbap.Name = &name
625			}
626		case "etag":
627			if v != nil {
628				var etag string
629				err = json.Unmarshal(*v, &etag)
630				if err != nil {
631					return err
632				}
633				agbap.Etag = &etag
634			}
635		case "type":
636			if v != nil {
637				var typeVar string
638				err = json.Unmarshal(*v, &typeVar)
639				if err != nil {
640					return err
641				}
642				agbap.Type = &typeVar
643			}
644		case "id":
645			if v != nil {
646				var ID string
647				err = json.Unmarshal(*v, &ID)
648				if err != nil {
649					return err
650				}
651				agbap.ID = &ID
652			}
653		}
654	}
655
656	return nil
657}
658
659// ApplicationGatewayBackendAddressPoolPropertiesFormat properties of Backend Address Pool of an
660// application gateway.
661type ApplicationGatewayBackendAddressPoolPropertiesFormat struct {
662	// BackendIPConfigurations - Collection of references to IPs defined in network interfaces.
663	BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"`
664	// BackendAddresses - Backend addresses
665	BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"`
666	// ProvisioningState - Provisioning state of the backend address pool resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
667	ProvisioningState *string `json:"provisioningState,omitempty"`
668}
669
670// ApplicationGatewayBackendHealth list of ApplicationGatewayBackendHealthPool resources.
671type ApplicationGatewayBackendHealth struct {
672	autorest.Response   `json:"-"`
673	BackendAddressPools *[]ApplicationGatewayBackendHealthPool `json:"backendAddressPools,omitempty"`
674}
675
676// ApplicationGatewayBackendHealthHTTPSettings application gateway BackendHealthHttp settings.
677type ApplicationGatewayBackendHealthHTTPSettings struct {
678	// BackendHTTPSettings - Reference of an ApplicationGatewayBackendHttpSettings resource.
679	BackendHTTPSettings *ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettings,omitempty"`
680	// Servers - List of ApplicationGatewayBackendHealthServer resources.
681	Servers *[]ApplicationGatewayBackendHealthServer `json:"servers,omitempty"`
682}
683
684// ApplicationGatewayBackendHealthPool application gateway BackendHealth pool.
685type ApplicationGatewayBackendHealthPool struct {
686	// BackendAddressPool - Reference of an ApplicationGatewayBackendAddressPool resource.
687	BackendAddressPool *ApplicationGatewayBackendAddressPool `json:"backendAddressPool,omitempty"`
688	// BackendHTTPSettingsCollection - List of ApplicationGatewayBackendHealthHttpSettings resources.
689	BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHealthHTTPSettings `json:"backendHttpSettingsCollection,omitempty"`
690}
691
692// ApplicationGatewayBackendHealthServer application gateway backendhealth http settings.
693type ApplicationGatewayBackendHealthServer struct {
694	// Address - IP address or FQDN of backend server.
695	Address *string `json:"address,omitempty"`
696	// IPConfiguration - Reference of IP configuration of backend server.
697	IPConfiguration *InterfaceIPConfiguration `json:"ipConfiguration,omitempty"`
698	// Health - Health of backend server. Possible values include: 'Unknown', 'Up', 'Down', 'Partial', 'Draining'
699	Health ApplicationGatewayBackendHealthServerHealth `json:"health,omitempty"`
700}
701
702// ApplicationGatewayBackendHTTPSettings backend address pool settings of an application gateway.
703type ApplicationGatewayBackendHTTPSettings struct {
704	*ApplicationGatewayBackendHTTPSettingsPropertiesFormat `json:"properties,omitempty"`
705	// Name - Name of the backend http settings that is unique within an Application Gateway.
706	Name *string `json:"name,omitempty"`
707	// Etag - A unique read-only string that changes whenever the resource is updated.
708	Etag *string `json:"etag,omitempty"`
709	// Type - Type of the resource.
710	Type *string `json:"type,omitempty"`
711	// ID - Resource ID.
712	ID *string `json:"id,omitempty"`
713}
714
715// MarshalJSON is the custom marshaler for ApplicationGatewayBackendHTTPSettings.
716func (agbhs ApplicationGatewayBackendHTTPSettings) MarshalJSON() ([]byte, error) {
717	objectMap := make(map[string]interface{})
718	if agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat != nil {
719		objectMap["properties"] = agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat
720	}
721	if agbhs.Name != nil {
722		objectMap["name"] = agbhs.Name
723	}
724	if agbhs.Etag != nil {
725		objectMap["etag"] = agbhs.Etag
726	}
727	if agbhs.Type != nil {
728		objectMap["type"] = agbhs.Type
729	}
730	if agbhs.ID != nil {
731		objectMap["id"] = agbhs.ID
732	}
733	return json.Marshal(objectMap)
734}
735
736// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayBackendHTTPSettings struct.
737func (agbhs *ApplicationGatewayBackendHTTPSettings) UnmarshalJSON(body []byte) error {
738	var m map[string]*json.RawMessage
739	err := json.Unmarshal(body, &m)
740	if err != nil {
741		return err
742	}
743	for k, v := range m {
744		switch k {
745		case "properties":
746			if v != nil {
747				var applicationGatewayBackendHTTPSettingsPropertiesFormat ApplicationGatewayBackendHTTPSettingsPropertiesFormat
748				err = json.Unmarshal(*v, &applicationGatewayBackendHTTPSettingsPropertiesFormat)
749				if err != nil {
750					return err
751				}
752				agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat = &applicationGatewayBackendHTTPSettingsPropertiesFormat
753			}
754		case "name":
755			if v != nil {
756				var name string
757				err = json.Unmarshal(*v, &name)
758				if err != nil {
759					return err
760				}
761				agbhs.Name = &name
762			}
763		case "etag":
764			if v != nil {
765				var etag string
766				err = json.Unmarshal(*v, &etag)
767				if err != nil {
768					return err
769				}
770				agbhs.Etag = &etag
771			}
772		case "type":
773			if v != nil {
774				var typeVar string
775				err = json.Unmarshal(*v, &typeVar)
776				if err != nil {
777					return err
778				}
779				agbhs.Type = &typeVar
780			}
781		case "id":
782			if v != nil {
783				var ID string
784				err = json.Unmarshal(*v, &ID)
785				if err != nil {
786					return err
787				}
788				agbhs.ID = &ID
789			}
790		}
791	}
792
793	return nil
794}
795
796// ApplicationGatewayBackendHTTPSettingsPropertiesFormat properties of Backend address pool settings of an
797// application gateway.
798type ApplicationGatewayBackendHTTPSettingsPropertiesFormat struct {
799	// Port - The destination port on the backend.
800	Port *int32 `json:"port,omitempty"`
801	// Protocol - The protocol used to communicate with the backend. Possible values are 'Http' and 'Https'. Possible values include: 'HTTP', 'HTTPS'
802	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
803	// CookieBasedAffinity - Cookie based affinity. Possible values include: 'Enabled', 'Disabled'
804	CookieBasedAffinity ApplicationGatewayCookieBasedAffinity `json:"cookieBasedAffinity,omitempty"`
805	// 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.
806	RequestTimeout *int32 `json:"requestTimeout,omitempty"`
807	// Probe - Probe resource of an application gateway.
808	Probe *SubResource `json:"probe,omitempty"`
809	// AuthenticationCertificates - Array of references to application gateway authentication certificates.
810	AuthenticationCertificates *[]SubResource `json:"authenticationCertificates,omitempty"`
811	// TrustedRootCertificates - Array of references to application gateway trusted root certificates.
812	TrustedRootCertificates *[]SubResource `json:"trustedRootCertificates,omitempty"`
813	// ConnectionDraining - Connection draining of the backend http settings resource.
814	ConnectionDraining *ApplicationGatewayConnectionDraining `json:"connectionDraining,omitempty"`
815	// HostName - Host header to be sent to the backend servers.
816	HostName *string `json:"hostName,omitempty"`
817	// PickHostNameFromBackendAddress - Whether to pick host header should be picked from the host name of the backend server. Default value is false.
818	PickHostNameFromBackendAddress *bool `json:"pickHostNameFromBackendAddress,omitempty"`
819	// AffinityCookieName - Cookie name to use for the affinity cookie.
820	AffinityCookieName *string `json:"affinityCookieName,omitempty"`
821	// ProbeEnabled - Whether the probe is enabled. Default value is false.
822	ProbeEnabled *bool `json:"probeEnabled,omitempty"`
823	// Path - Path which should be used as a prefix for all HTTP requests. Null means no path will be prefixed. Default value is null.
824	Path *string `json:"path,omitempty"`
825	// ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
826	ProvisioningState *string `json:"provisioningState,omitempty"`
827}
828
829// ApplicationGatewayConnectionDraining connection draining allows open connections to a backend server to
830// be active for a specified time after the backend server got removed from the configuration.
831type ApplicationGatewayConnectionDraining struct {
832	// Enabled - Whether connection draining is enabled or not.
833	Enabled *bool `json:"enabled,omitempty"`
834	// DrainTimeoutInSec - The number of seconds connection draining is active. Acceptable values are from 1 second to 3600 seconds.
835	DrainTimeoutInSec *int32 `json:"drainTimeoutInSec,omitempty"`
836}
837
838// ApplicationGatewayCustomError customer error of an application gateway.
839type ApplicationGatewayCustomError struct {
840	// StatusCode - Status code of the application gateway customer error. Possible values include: 'HTTPStatus403', 'HTTPStatus502'
841	StatusCode ApplicationGatewayCustomErrorStatusCode `json:"statusCode,omitempty"`
842	// CustomErrorPageURL - Error page URL of the application gateway customer error.
843	CustomErrorPageURL *string `json:"customErrorPageUrl,omitempty"`
844}
845
846// ApplicationGatewayFirewallDisabledRuleGroup allows to disable rules within a rule group or an entire
847// rule group.
848type ApplicationGatewayFirewallDisabledRuleGroup struct {
849	// RuleGroupName - The name of the rule group that will be disabled.
850	RuleGroupName *string `json:"ruleGroupName,omitempty"`
851	// Rules - The list of rules that will be disabled. If null, all rules of the rule group will be disabled.
852	Rules *[]int32 `json:"rules,omitempty"`
853}
854
855// ApplicationGatewayFirewallExclusion allow to exclude some variable satisfy the condition for the WAF
856// check
857type ApplicationGatewayFirewallExclusion struct {
858	// MatchVariable - The variable to be excluded.
859	MatchVariable *string `json:"matchVariable,omitempty"`
860	// SelectorMatchOperator - When matchVariable is a collection, operate on the selector to specify which elements in the collection this exclusion applies to.
861	SelectorMatchOperator *string `json:"selectorMatchOperator,omitempty"`
862	// Selector - When matchVariable is a collection, operator used to specify which elements in the collection this exclusion applies to.
863	Selector *string `json:"selector,omitempty"`
864}
865
866// ApplicationGatewayFirewallRule a web application firewall rule.
867type ApplicationGatewayFirewallRule struct {
868	// RuleID - The identifier of the web application firewall rule.
869	RuleID *int32 `json:"ruleId,omitempty"`
870	// Description - The description of the web application firewall rule.
871	Description *string `json:"description,omitempty"`
872}
873
874// ApplicationGatewayFirewallRuleGroup a web application firewall rule group.
875type ApplicationGatewayFirewallRuleGroup struct {
876	// RuleGroupName - The name of the web application firewall rule group.
877	RuleGroupName *string `json:"ruleGroupName,omitempty"`
878	// Description - The description of the web application firewall rule group.
879	Description *string `json:"description,omitempty"`
880	// Rules - The rules of the web application firewall rule group.
881	Rules *[]ApplicationGatewayFirewallRule `json:"rules,omitempty"`
882}
883
884// ApplicationGatewayFirewallRuleSet a web application firewall rule set.
885type ApplicationGatewayFirewallRuleSet struct {
886	*ApplicationGatewayFirewallRuleSetPropertiesFormat `json:"properties,omitempty"`
887	// ID - Resource ID.
888	ID *string `json:"id,omitempty"`
889	// Name - READ-ONLY; Resource name.
890	Name *string `json:"name,omitempty"`
891	// Type - READ-ONLY; Resource type.
892	Type *string `json:"type,omitempty"`
893	// Location - Resource location.
894	Location *string `json:"location,omitempty"`
895	// Tags - Resource tags.
896	Tags map[string]*string `json:"tags"`
897}
898
899// MarshalJSON is the custom marshaler for ApplicationGatewayFirewallRuleSet.
900func (agfrs ApplicationGatewayFirewallRuleSet) MarshalJSON() ([]byte, error) {
901	objectMap := make(map[string]interface{})
902	if agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat != nil {
903		objectMap["properties"] = agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat
904	}
905	if agfrs.ID != nil {
906		objectMap["id"] = agfrs.ID
907	}
908	if agfrs.Location != nil {
909		objectMap["location"] = agfrs.Location
910	}
911	if agfrs.Tags != nil {
912		objectMap["tags"] = agfrs.Tags
913	}
914	return json.Marshal(objectMap)
915}
916
917// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFirewallRuleSet struct.
918func (agfrs *ApplicationGatewayFirewallRuleSet) UnmarshalJSON(body []byte) error {
919	var m map[string]*json.RawMessage
920	err := json.Unmarshal(body, &m)
921	if err != nil {
922		return err
923	}
924	for k, v := range m {
925		switch k {
926		case "properties":
927			if v != nil {
928				var applicationGatewayFirewallRuleSetPropertiesFormat ApplicationGatewayFirewallRuleSetPropertiesFormat
929				err = json.Unmarshal(*v, &applicationGatewayFirewallRuleSetPropertiesFormat)
930				if err != nil {
931					return err
932				}
933				agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat = &applicationGatewayFirewallRuleSetPropertiesFormat
934			}
935		case "id":
936			if v != nil {
937				var ID string
938				err = json.Unmarshal(*v, &ID)
939				if err != nil {
940					return err
941				}
942				agfrs.ID = &ID
943			}
944		case "name":
945			if v != nil {
946				var name string
947				err = json.Unmarshal(*v, &name)
948				if err != nil {
949					return err
950				}
951				agfrs.Name = &name
952			}
953		case "type":
954			if v != nil {
955				var typeVar string
956				err = json.Unmarshal(*v, &typeVar)
957				if err != nil {
958					return err
959				}
960				agfrs.Type = &typeVar
961			}
962		case "location":
963			if v != nil {
964				var location string
965				err = json.Unmarshal(*v, &location)
966				if err != nil {
967					return err
968				}
969				agfrs.Location = &location
970			}
971		case "tags":
972			if v != nil {
973				var tags map[string]*string
974				err = json.Unmarshal(*v, &tags)
975				if err != nil {
976					return err
977				}
978				agfrs.Tags = tags
979			}
980		}
981	}
982
983	return nil
984}
985
986// ApplicationGatewayFirewallRuleSetPropertiesFormat properties of the web application firewall rule set.
987type ApplicationGatewayFirewallRuleSetPropertiesFormat struct {
988	// ProvisioningState - The provisioning state of the web application firewall rule set.
989	ProvisioningState *string `json:"provisioningState,omitempty"`
990	// RuleSetType - The type of the web application firewall rule set.
991	RuleSetType *string `json:"ruleSetType,omitempty"`
992	// RuleSetVersion - The version of the web application firewall rule set type.
993	RuleSetVersion *string `json:"ruleSetVersion,omitempty"`
994	// RuleGroups - The rule groups of the web application firewall rule set.
995	RuleGroups *[]ApplicationGatewayFirewallRuleGroup `json:"ruleGroups,omitempty"`
996}
997
998// ApplicationGatewayFrontendIPConfiguration frontend IP configuration of an application gateway.
999type ApplicationGatewayFrontendIPConfiguration struct {
1000	*ApplicationGatewayFrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"`
1001	// Name - Name of the frontend IP configuration that is unique within an Application Gateway.
1002	Name *string `json:"name,omitempty"`
1003	// Etag - A unique read-only string that changes whenever the resource is updated.
1004	Etag *string `json:"etag,omitempty"`
1005	// Type - Type of the resource.
1006	Type *string `json:"type,omitempty"`
1007	// ID - Resource ID.
1008	ID *string `json:"id,omitempty"`
1009}
1010
1011// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendIPConfiguration.
1012func (agfic ApplicationGatewayFrontendIPConfiguration) MarshalJSON() ([]byte, error) {
1013	objectMap := make(map[string]interface{})
1014	if agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat != nil {
1015		objectMap["properties"] = agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat
1016	}
1017	if agfic.Name != nil {
1018		objectMap["name"] = agfic.Name
1019	}
1020	if agfic.Etag != nil {
1021		objectMap["etag"] = agfic.Etag
1022	}
1023	if agfic.Type != nil {
1024		objectMap["type"] = agfic.Type
1025	}
1026	if agfic.ID != nil {
1027		objectMap["id"] = agfic.ID
1028	}
1029	return json.Marshal(objectMap)
1030}
1031
1032// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFrontendIPConfiguration struct.
1033func (agfic *ApplicationGatewayFrontendIPConfiguration) UnmarshalJSON(body []byte) error {
1034	var m map[string]*json.RawMessage
1035	err := json.Unmarshal(body, &m)
1036	if err != nil {
1037		return err
1038	}
1039	for k, v := range m {
1040		switch k {
1041		case "properties":
1042			if v != nil {
1043				var applicationGatewayFrontendIPConfigurationPropertiesFormat ApplicationGatewayFrontendIPConfigurationPropertiesFormat
1044				err = json.Unmarshal(*v, &applicationGatewayFrontendIPConfigurationPropertiesFormat)
1045				if err != nil {
1046					return err
1047				}
1048				agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat = &applicationGatewayFrontendIPConfigurationPropertiesFormat
1049			}
1050		case "name":
1051			if v != nil {
1052				var name string
1053				err = json.Unmarshal(*v, &name)
1054				if err != nil {
1055					return err
1056				}
1057				agfic.Name = &name
1058			}
1059		case "etag":
1060			if v != nil {
1061				var etag string
1062				err = json.Unmarshal(*v, &etag)
1063				if err != nil {
1064					return err
1065				}
1066				agfic.Etag = &etag
1067			}
1068		case "type":
1069			if v != nil {
1070				var typeVar string
1071				err = json.Unmarshal(*v, &typeVar)
1072				if err != nil {
1073					return err
1074				}
1075				agfic.Type = &typeVar
1076			}
1077		case "id":
1078			if v != nil {
1079				var ID string
1080				err = json.Unmarshal(*v, &ID)
1081				if err != nil {
1082					return err
1083				}
1084				agfic.ID = &ID
1085			}
1086		}
1087	}
1088
1089	return nil
1090}
1091
1092// ApplicationGatewayFrontendIPConfigurationPropertiesFormat properties of Frontend IP configuration of an
1093// application gateway.
1094type ApplicationGatewayFrontendIPConfigurationPropertiesFormat struct {
1095	// PrivateIPAddress - PrivateIPAddress of the network interface IP Configuration.
1096	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
1097	// PrivateIPAllocationMethod - PrivateIP allocation method. Possible values include: 'Static', 'Dynamic'
1098	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
1099	// Subnet - Reference of the subnet resource.
1100	Subnet *SubResource `json:"subnet,omitempty"`
1101	// PublicIPAddress - Reference of the PublicIP resource.
1102	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
1103	// ProvisioningState - Provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1104	ProvisioningState *string `json:"provisioningState,omitempty"`
1105}
1106
1107// ApplicationGatewayFrontendPort frontend port of an application gateway.
1108type ApplicationGatewayFrontendPort struct {
1109	*ApplicationGatewayFrontendPortPropertiesFormat `json:"properties,omitempty"`
1110	// Name - Name of the frontend port that is unique within an Application Gateway
1111	Name *string `json:"name,omitempty"`
1112	// Etag - A unique read-only string that changes whenever the resource is updated.
1113	Etag *string `json:"etag,omitempty"`
1114	// Type - Type of the resource.
1115	Type *string `json:"type,omitempty"`
1116	// ID - Resource ID.
1117	ID *string `json:"id,omitempty"`
1118}
1119
1120// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendPort.
1121func (agfp ApplicationGatewayFrontendPort) MarshalJSON() ([]byte, error) {
1122	objectMap := make(map[string]interface{})
1123	if agfp.ApplicationGatewayFrontendPortPropertiesFormat != nil {
1124		objectMap["properties"] = agfp.ApplicationGatewayFrontendPortPropertiesFormat
1125	}
1126	if agfp.Name != nil {
1127		objectMap["name"] = agfp.Name
1128	}
1129	if agfp.Etag != nil {
1130		objectMap["etag"] = agfp.Etag
1131	}
1132	if agfp.Type != nil {
1133		objectMap["type"] = agfp.Type
1134	}
1135	if agfp.ID != nil {
1136		objectMap["id"] = agfp.ID
1137	}
1138	return json.Marshal(objectMap)
1139}
1140
1141// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFrontendPort struct.
1142func (agfp *ApplicationGatewayFrontendPort) UnmarshalJSON(body []byte) error {
1143	var m map[string]*json.RawMessage
1144	err := json.Unmarshal(body, &m)
1145	if err != nil {
1146		return err
1147	}
1148	for k, v := range m {
1149		switch k {
1150		case "properties":
1151			if v != nil {
1152				var applicationGatewayFrontendPortPropertiesFormat ApplicationGatewayFrontendPortPropertiesFormat
1153				err = json.Unmarshal(*v, &applicationGatewayFrontendPortPropertiesFormat)
1154				if err != nil {
1155					return err
1156				}
1157				agfp.ApplicationGatewayFrontendPortPropertiesFormat = &applicationGatewayFrontendPortPropertiesFormat
1158			}
1159		case "name":
1160			if v != nil {
1161				var name string
1162				err = json.Unmarshal(*v, &name)
1163				if err != nil {
1164					return err
1165				}
1166				agfp.Name = &name
1167			}
1168		case "etag":
1169			if v != nil {
1170				var etag string
1171				err = json.Unmarshal(*v, &etag)
1172				if err != nil {
1173					return err
1174				}
1175				agfp.Etag = &etag
1176			}
1177		case "type":
1178			if v != nil {
1179				var typeVar string
1180				err = json.Unmarshal(*v, &typeVar)
1181				if err != nil {
1182					return err
1183				}
1184				agfp.Type = &typeVar
1185			}
1186		case "id":
1187			if v != nil {
1188				var ID string
1189				err = json.Unmarshal(*v, &ID)
1190				if err != nil {
1191					return err
1192				}
1193				agfp.ID = &ID
1194			}
1195		}
1196	}
1197
1198	return nil
1199}
1200
1201// ApplicationGatewayFrontendPortPropertiesFormat properties of Frontend port of an application gateway.
1202type ApplicationGatewayFrontendPortPropertiesFormat struct {
1203	// Port - Frontend port
1204	Port *int32 `json:"port,omitempty"`
1205	// ProvisioningState - Provisioning state of the frontend port resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1206	ProvisioningState *string `json:"provisioningState,omitempty"`
1207}
1208
1209// ApplicationGatewayHTTPListener http listener of an application gateway.
1210type ApplicationGatewayHTTPListener struct {
1211	*ApplicationGatewayHTTPListenerPropertiesFormat `json:"properties,omitempty"`
1212	// Name - Name of the HTTP listener that is unique within an Application Gateway.
1213	Name *string `json:"name,omitempty"`
1214	// Etag - A unique read-only string that changes whenever the resource is updated.
1215	Etag *string `json:"etag,omitempty"`
1216	// Type - Type of the resource.
1217	Type *string `json:"type,omitempty"`
1218	// ID - Resource ID.
1219	ID *string `json:"id,omitempty"`
1220}
1221
1222// MarshalJSON is the custom marshaler for ApplicationGatewayHTTPListener.
1223func (aghl ApplicationGatewayHTTPListener) MarshalJSON() ([]byte, error) {
1224	objectMap := make(map[string]interface{})
1225	if aghl.ApplicationGatewayHTTPListenerPropertiesFormat != nil {
1226		objectMap["properties"] = aghl.ApplicationGatewayHTTPListenerPropertiesFormat
1227	}
1228	if aghl.Name != nil {
1229		objectMap["name"] = aghl.Name
1230	}
1231	if aghl.Etag != nil {
1232		objectMap["etag"] = aghl.Etag
1233	}
1234	if aghl.Type != nil {
1235		objectMap["type"] = aghl.Type
1236	}
1237	if aghl.ID != nil {
1238		objectMap["id"] = aghl.ID
1239	}
1240	return json.Marshal(objectMap)
1241}
1242
1243// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayHTTPListener struct.
1244func (aghl *ApplicationGatewayHTTPListener) UnmarshalJSON(body []byte) error {
1245	var m map[string]*json.RawMessage
1246	err := json.Unmarshal(body, &m)
1247	if err != nil {
1248		return err
1249	}
1250	for k, v := range m {
1251		switch k {
1252		case "properties":
1253			if v != nil {
1254				var applicationGatewayHTTPListenerPropertiesFormat ApplicationGatewayHTTPListenerPropertiesFormat
1255				err = json.Unmarshal(*v, &applicationGatewayHTTPListenerPropertiesFormat)
1256				if err != nil {
1257					return err
1258				}
1259				aghl.ApplicationGatewayHTTPListenerPropertiesFormat = &applicationGatewayHTTPListenerPropertiesFormat
1260			}
1261		case "name":
1262			if v != nil {
1263				var name string
1264				err = json.Unmarshal(*v, &name)
1265				if err != nil {
1266					return err
1267				}
1268				aghl.Name = &name
1269			}
1270		case "etag":
1271			if v != nil {
1272				var etag string
1273				err = json.Unmarshal(*v, &etag)
1274				if err != nil {
1275					return err
1276				}
1277				aghl.Etag = &etag
1278			}
1279		case "type":
1280			if v != nil {
1281				var typeVar string
1282				err = json.Unmarshal(*v, &typeVar)
1283				if err != nil {
1284					return err
1285				}
1286				aghl.Type = &typeVar
1287			}
1288		case "id":
1289			if v != nil {
1290				var ID string
1291				err = json.Unmarshal(*v, &ID)
1292				if err != nil {
1293					return err
1294				}
1295				aghl.ID = &ID
1296			}
1297		}
1298	}
1299
1300	return nil
1301}
1302
1303// ApplicationGatewayHTTPListenerPropertiesFormat properties of HTTP listener of an application gateway.
1304type ApplicationGatewayHTTPListenerPropertiesFormat struct {
1305	// FrontendIPConfiguration - Frontend IP configuration resource of an application gateway.
1306	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
1307	// FrontendPort - Frontend port resource of an application gateway.
1308	FrontendPort *SubResource `json:"frontendPort,omitempty"`
1309	// Protocol - Protocol of the HTTP listener. Possible values are 'Http' and 'Https'. Possible values include: 'HTTP', 'HTTPS'
1310	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
1311	// HostName - Host name of HTTP listener.
1312	HostName *string `json:"hostName,omitempty"`
1313	// SslCertificate - SSL certificate resource of an application gateway.
1314	SslCertificate *SubResource `json:"sslCertificate,omitempty"`
1315	// RequireServerNameIndication - Applicable only if protocol is https. Enables SNI for multi-hosting.
1316	RequireServerNameIndication *bool `json:"requireServerNameIndication,omitempty"`
1317	// ProvisioningState - Provisioning state of the HTTP listener resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1318	ProvisioningState *string `json:"provisioningState,omitempty"`
1319	// CustomErrorConfigurations - Custom error configurations of the HTTP listener.
1320	CustomErrorConfigurations *[]ApplicationGatewayCustomError `json:"customErrorConfigurations,omitempty"`
1321}
1322
1323// ApplicationGatewayIPConfiguration IP configuration of an application gateway. Currently 1 public and 1
1324// private IP configuration is allowed.
1325type ApplicationGatewayIPConfiguration struct {
1326	*ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"`
1327	// Name - Name of the IP configuration that is unique within an Application Gateway.
1328	Name *string `json:"name,omitempty"`
1329	// Etag - A unique read-only string that changes whenever the resource is updated.
1330	Etag *string `json:"etag,omitempty"`
1331	// Type - Type of the resource.
1332	Type *string `json:"type,omitempty"`
1333	// ID - Resource ID.
1334	ID *string `json:"id,omitempty"`
1335}
1336
1337// MarshalJSON is the custom marshaler for ApplicationGatewayIPConfiguration.
1338func (agic ApplicationGatewayIPConfiguration) MarshalJSON() ([]byte, error) {
1339	objectMap := make(map[string]interface{})
1340	if agic.ApplicationGatewayIPConfigurationPropertiesFormat != nil {
1341		objectMap["properties"] = agic.ApplicationGatewayIPConfigurationPropertiesFormat
1342	}
1343	if agic.Name != nil {
1344		objectMap["name"] = agic.Name
1345	}
1346	if agic.Etag != nil {
1347		objectMap["etag"] = agic.Etag
1348	}
1349	if agic.Type != nil {
1350		objectMap["type"] = agic.Type
1351	}
1352	if agic.ID != nil {
1353		objectMap["id"] = agic.ID
1354	}
1355	return json.Marshal(objectMap)
1356}
1357
1358// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayIPConfiguration struct.
1359func (agic *ApplicationGatewayIPConfiguration) UnmarshalJSON(body []byte) error {
1360	var m map[string]*json.RawMessage
1361	err := json.Unmarshal(body, &m)
1362	if err != nil {
1363		return err
1364	}
1365	for k, v := range m {
1366		switch k {
1367		case "properties":
1368			if v != nil {
1369				var applicationGatewayIPConfigurationPropertiesFormat ApplicationGatewayIPConfigurationPropertiesFormat
1370				err = json.Unmarshal(*v, &applicationGatewayIPConfigurationPropertiesFormat)
1371				if err != nil {
1372					return err
1373				}
1374				agic.ApplicationGatewayIPConfigurationPropertiesFormat = &applicationGatewayIPConfigurationPropertiesFormat
1375			}
1376		case "name":
1377			if v != nil {
1378				var name string
1379				err = json.Unmarshal(*v, &name)
1380				if err != nil {
1381					return err
1382				}
1383				agic.Name = &name
1384			}
1385		case "etag":
1386			if v != nil {
1387				var etag string
1388				err = json.Unmarshal(*v, &etag)
1389				if err != nil {
1390					return err
1391				}
1392				agic.Etag = &etag
1393			}
1394		case "type":
1395			if v != nil {
1396				var typeVar string
1397				err = json.Unmarshal(*v, &typeVar)
1398				if err != nil {
1399					return err
1400				}
1401				agic.Type = &typeVar
1402			}
1403		case "id":
1404			if v != nil {
1405				var ID string
1406				err = json.Unmarshal(*v, &ID)
1407				if err != nil {
1408					return err
1409				}
1410				agic.ID = &ID
1411			}
1412		}
1413	}
1414
1415	return nil
1416}
1417
1418// ApplicationGatewayIPConfigurationPropertiesFormat properties of IP configuration of an application
1419// gateway.
1420type ApplicationGatewayIPConfigurationPropertiesFormat struct {
1421	// Subnet - Reference of the subnet resource. A subnet from where application gateway gets its private address.
1422	Subnet *SubResource `json:"subnet,omitempty"`
1423	// ProvisioningState - Provisioning state of the application gateway subnet resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1424	ProvisioningState *string `json:"provisioningState,omitempty"`
1425}
1426
1427// ApplicationGatewayListResult response for ListApplicationGateways API service call.
1428type ApplicationGatewayListResult struct {
1429	autorest.Response `json:"-"`
1430	// Value - List of an application gateways in a resource group.
1431	Value *[]ApplicationGateway `json:"value,omitempty"`
1432	// NextLink - URL to get the next set of results.
1433	NextLink *string `json:"nextLink,omitempty"`
1434}
1435
1436// ApplicationGatewayListResultIterator provides access to a complete listing of ApplicationGateway values.
1437type ApplicationGatewayListResultIterator struct {
1438	i    int
1439	page ApplicationGatewayListResultPage
1440}
1441
1442// NextWithContext advances to the next value.  If there was an error making
1443// the request the iterator does not advance and the error is returned.
1444func (iter *ApplicationGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
1445	if tracing.IsEnabled() {
1446		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayListResultIterator.NextWithContext")
1447		defer func() {
1448			sc := -1
1449			if iter.Response().Response.Response != nil {
1450				sc = iter.Response().Response.Response.StatusCode
1451			}
1452			tracing.EndSpan(ctx, sc, err)
1453		}()
1454	}
1455	iter.i++
1456	if iter.i < len(iter.page.Values()) {
1457		return nil
1458	}
1459	err = iter.page.NextWithContext(ctx)
1460	if err != nil {
1461		iter.i--
1462		return err
1463	}
1464	iter.i = 0
1465	return nil
1466}
1467
1468// Next advances to the next value.  If there was an error making
1469// the request the iterator does not advance and the error is returned.
1470// Deprecated: Use NextWithContext() instead.
1471func (iter *ApplicationGatewayListResultIterator) Next() error {
1472	return iter.NextWithContext(context.Background())
1473}
1474
1475// NotDone returns true if the enumeration should be started or is not yet complete.
1476func (iter ApplicationGatewayListResultIterator) NotDone() bool {
1477	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1478}
1479
1480// Response returns the raw server response from the last page request.
1481func (iter ApplicationGatewayListResultIterator) Response() ApplicationGatewayListResult {
1482	return iter.page.Response()
1483}
1484
1485// Value returns the current value or a zero-initialized value if the
1486// iterator has advanced beyond the end of the collection.
1487func (iter ApplicationGatewayListResultIterator) Value() ApplicationGateway {
1488	if !iter.page.NotDone() {
1489		return ApplicationGateway{}
1490	}
1491	return iter.page.Values()[iter.i]
1492}
1493
1494// Creates a new instance of the ApplicationGatewayListResultIterator type.
1495func NewApplicationGatewayListResultIterator(page ApplicationGatewayListResultPage) ApplicationGatewayListResultIterator {
1496	return ApplicationGatewayListResultIterator{page: page}
1497}
1498
1499// IsEmpty returns true if the ListResult contains no values.
1500func (aglr ApplicationGatewayListResult) IsEmpty() bool {
1501	return aglr.Value == nil || len(*aglr.Value) == 0
1502}
1503
1504// hasNextLink returns true if the NextLink is not empty.
1505func (aglr ApplicationGatewayListResult) hasNextLink() bool {
1506	return aglr.NextLink != nil && len(*aglr.NextLink) != 0
1507}
1508
1509// applicationGatewayListResultPreparer prepares a request to retrieve the next set of results.
1510// It returns nil if no more results exist.
1511func (aglr ApplicationGatewayListResult) applicationGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
1512	if !aglr.hasNextLink() {
1513		return nil, nil
1514	}
1515	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1516		autorest.AsJSON(),
1517		autorest.AsGet(),
1518		autorest.WithBaseURL(to.String(aglr.NextLink)))
1519}
1520
1521// ApplicationGatewayListResultPage contains a page of ApplicationGateway values.
1522type ApplicationGatewayListResultPage struct {
1523	fn   func(context.Context, ApplicationGatewayListResult) (ApplicationGatewayListResult, error)
1524	aglr ApplicationGatewayListResult
1525}
1526
1527// NextWithContext advances to the next page of values.  If there was an error making
1528// the request the page does not advance and the error is returned.
1529func (page *ApplicationGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
1530	if tracing.IsEnabled() {
1531		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayListResultPage.NextWithContext")
1532		defer func() {
1533			sc := -1
1534			if page.Response().Response.Response != nil {
1535				sc = page.Response().Response.Response.StatusCode
1536			}
1537			tracing.EndSpan(ctx, sc, err)
1538		}()
1539	}
1540	for {
1541		next, err := page.fn(ctx, page.aglr)
1542		if err != nil {
1543			return err
1544		}
1545		page.aglr = next
1546		if !next.hasNextLink() || !next.IsEmpty() {
1547			break
1548		}
1549	}
1550	return nil
1551}
1552
1553// Next advances to the next page of values.  If there was an error making
1554// the request the page does not advance and the error is returned.
1555// Deprecated: Use NextWithContext() instead.
1556func (page *ApplicationGatewayListResultPage) Next() error {
1557	return page.NextWithContext(context.Background())
1558}
1559
1560// NotDone returns true if the page enumeration should be started or is not yet complete.
1561func (page ApplicationGatewayListResultPage) NotDone() bool {
1562	return !page.aglr.IsEmpty()
1563}
1564
1565// Response returns the raw server response from the last page request.
1566func (page ApplicationGatewayListResultPage) Response() ApplicationGatewayListResult {
1567	return page.aglr
1568}
1569
1570// Values returns the slice of values for the current page or nil if there are no values.
1571func (page ApplicationGatewayListResultPage) Values() []ApplicationGateway {
1572	if page.aglr.IsEmpty() {
1573		return nil
1574	}
1575	return *page.aglr.Value
1576}
1577
1578// Creates a new instance of the ApplicationGatewayListResultPage type.
1579func NewApplicationGatewayListResultPage(cur ApplicationGatewayListResult, getNextPage func(context.Context, ApplicationGatewayListResult) (ApplicationGatewayListResult, error)) ApplicationGatewayListResultPage {
1580	return ApplicationGatewayListResultPage{
1581		fn:   getNextPage,
1582		aglr: cur,
1583	}
1584}
1585
1586// ApplicationGatewayPathRule path rule of URL path map of an application gateway.
1587type ApplicationGatewayPathRule struct {
1588	*ApplicationGatewayPathRulePropertiesFormat `json:"properties,omitempty"`
1589	// Name - Name of the path rule that is unique within an Application Gateway.
1590	Name *string `json:"name,omitempty"`
1591	// Etag - A unique read-only string that changes whenever the resource is updated.
1592	Etag *string `json:"etag,omitempty"`
1593	// Type - Type of the resource.
1594	Type *string `json:"type,omitempty"`
1595	// ID - Resource ID.
1596	ID *string `json:"id,omitempty"`
1597}
1598
1599// MarshalJSON is the custom marshaler for ApplicationGatewayPathRule.
1600func (agpr ApplicationGatewayPathRule) MarshalJSON() ([]byte, error) {
1601	objectMap := make(map[string]interface{})
1602	if agpr.ApplicationGatewayPathRulePropertiesFormat != nil {
1603		objectMap["properties"] = agpr.ApplicationGatewayPathRulePropertiesFormat
1604	}
1605	if agpr.Name != nil {
1606		objectMap["name"] = agpr.Name
1607	}
1608	if agpr.Etag != nil {
1609		objectMap["etag"] = agpr.Etag
1610	}
1611	if agpr.Type != nil {
1612		objectMap["type"] = agpr.Type
1613	}
1614	if agpr.ID != nil {
1615		objectMap["id"] = agpr.ID
1616	}
1617	return json.Marshal(objectMap)
1618}
1619
1620// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayPathRule struct.
1621func (agpr *ApplicationGatewayPathRule) UnmarshalJSON(body []byte) error {
1622	var m map[string]*json.RawMessage
1623	err := json.Unmarshal(body, &m)
1624	if err != nil {
1625		return err
1626	}
1627	for k, v := range m {
1628		switch k {
1629		case "properties":
1630			if v != nil {
1631				var applicationGatewayPathRulePropertiesFormat ApplicationGatewayPathRulePropertiesFormat
1632				err = json.Unmarshal(*v, &applicationGatewayPathRulePropertiesFormat)
1633				if err != nil {
1634					return err
1635				}
1636				agpr.ApplicationGatewayPathRulePropertiesFormat = &applicationGatewayPathRulePropertiesFormat
1637			}
1638		case "name":
1639			if v != nil {
1640				var name string
1641				err = json.Unmarshal(*v, &name)
1642				if err != nil {
1643					return err
1644				}
1645				agpr.Name = &name
1646			}
1647		case "etag":
1648			if v != nil {
1649				var etag string
1650				err = json.Unmarshal(*v, &etag)
1651				if err != nil {
1652					return err
1653				}
1654				agpr.Etag = &etag
1655			}
1656		case "type":
1657			if v != nil {
1658				var typeVar string
1659				err = json.Unmarshal(*v, &typeVar)
1660				if err != nil {
1661					return err
1662				}
1663				agpr.Type = &typeVar
1664			}
1665		case "id":
1666			if v != nil {
1667				var ID string
1668				err = json.Unmarshal(*v, &ID)
1669				if err != nil {
1670					return err
1671				}
1672				agpr.ID = &ID
1673			}
1674		}
1675	}
1676
1677	return nil
1678}
1679
1680// ApplicationGatewayPathRulePropertiesFormat properties of path rule of an application gateway.
1681type ApplicationGatewayPathRulePropertiesFormat struct {
1682	// Paths - Path rules of URL path map.
1683	Paths *[]string `json:"paths,omitempty"`
1684	// BackendAddressPool - Backend address pool resource of URL path map path rule.
1685	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
1686	// BackendHTTPSettings - Backend http settings resource of URL path map path rule.
1687	BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"`
1688	// RedirectConfiguration - Redirect configuration resource of URL path map path rule.
1689	RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"`
1690	// ProvisioningState - Path rule of URL path map resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1691	ProvisioningState *string `json:"provisioningState,omitempty"`
1692}
1693
1694// ApplicationGatewayProbe probe of the application gateway.
1695type ApplicationGatewayProbe struct {
1696	*ApplicationGatewayProbePropertiesFormat `json:"properties,omitempty"`
1697	// Name - Name of the probe that is unique within an Application Gateway.
1698	Name *string `json:"name,omitempty"`
1699	// Etag - A unique read-only string that changes whenever the resource is updated.
1700	Etag *string `json:"etag,omitempty"`
1701	// Type - Type of the resource.
1702	Type *string `json:"type,omitempty"`
1703	// ID - Resource ID.
1704	ID *string `json:"id,omitempty"`
1705}
1706
1707// MarshalJSON is the custom marshaler for ApplicationGatewayProbe.
1708func (agp ApplicationGatewayProbe) MarshalJSON() ([]byte, error) {
1709	objectMap := make(map[string]interface{})
1710	if agp.ApplicationGatewayProbePropertiesFormat != nil {
1711		objectMap["properties"] = agp.ApplicationGatewayProbePropertiesFormat
1712	}
1713	if agp.Name != nil {
1714		objectMap["name"] = agp.Name
1715	}
1716	if agp.Etag != nil {
1717		objectMap["etag"] = agp.Etag
1718	}
1719	if agp.Type != nil {
1720		objectMap["type"] = agp.Type
1721	}
1722	if agp.ID != nil {
1723		objectMap["id"] = agp.ID
1724	}
1725	return json.Marshal(objectMap)
1726}
1727
1728// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayProbe struct.
1729func (agp *ApplicationGatewayProbe) UnmarshalJSON(body []byte) error {
1730	var m map[string]*json.RawMessage
1731	err := json.Unmarshal(body, &m)
1732	if err != nil {
1733		return err
1734	}
1735	for k, v := range m {
1736		switch k {
1737		case "properties":
1738			if v != nil {
1739				var applicationGatewayProbePropertiesFormat ApplicationGatewayProbePropertiesFormat
1740				err = json.Unmarshal(*v, &applicationGatewayProbePropertiesFormat)
1741				if err != nil {
1742					return err
1743				}
1744				agp.ApplicationGatewayProbePropertiesFormat = &applicationGatewayProbePropertiesFormat
1745			}
1746		case "name":
1747			if v != nil {
1748				var name string
1749				err = json.Unmarshal(*v, &name)
1750				if err != nil {
1751					return err
1752				}
1753				agp.Name = &name
1754			}
1755		case "etag":
1756			if v != nil {
1757				var etag string
1758				err = json.Unmarshal(*v, &etag)
1759				if err != nil {
1760					return err
1761				}
1762				agp.Etag = &etag
1763			}
1764		case "type":
1765			if v != nil {
1766				var typeVar string
1767				err = json.Unmarshal(*v, &typeVar)
1768				if err != nil {
1769					return err
1770				}
1771				agp.Type = &typeVar
1772			}
1773		case "id":
1774			if v != nil {
1775				var ID string
1776				err = json.Unmarshal(*v, &ID)
1777				if err != nil {
1778					return err
1779				}
1780				agp.ID = &ID
1781			}
1782		}
1783	}
1784
1785	return nil
1786}
1787
1788// ApplicationGatewayProbeHealthResponseMatch application gateway probe health response match
1789type ApplicationGatewayProbeHealthResponseMatch struct {
1790	// Body - Body that must be contained in the health response. Default value is empty.
1791	Body *string `json:"body,omitempty"`
1792	// StatusCodes - Allowed ranges of healthy status codes. Default range of healthy status codes is 200-399.
1793	StatusCodes *[]string `json:"statusCodes,omitempty"`
1794}
1795
1796// ApplicationGatewayProbePropertiesFormat properties of probe of an application gateway.
1797type ApplicationGatewayProbePropertiesFormat struct {
1798	// Protocol - The protocol used for the probe. Possible values are 'Http' and 'Https'. Possible values include: 'HTTP', 'HTTPS'
1799	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
1800	// Host - Host name to send the probe to.
1801	Host *string `json:"host,omitempty"`
1802	// Path - Relative path of probe. Valid path starts from '/'. Probe is sent to <Protocol>://<host>:<port><path>
1803	Path *string `json:"path,omitempty"`
1804	// Interval - The probing interval in seconds. This is the time interval between two consecutive probes. Acceptable values are from 1 second to 86400 seconds.
1805	Interval *int32 `json:"interval,omitempty"`
1806	// 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.
1807	Timeout *int32 `json:"timeout,omitempty"`
1808	// 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.
1809	UnhealthyThreshold *int32 `json:"unhealthyThreshold,omitempty"`
1810	// PickHostNameFromBackendHTTPSettings - Whether the host header should be picked from the backend http settings. Default value is false.
1811	PickHostNameFromBackendHTTPSettings *bool `json:"pickHostNameFromBackendHttpSettings,omitempty"`
1812	// MinServers - Minimum number of servers that are always marked healthy. Default value is 0.
1813	MinServers *int32 `json:"minServers,omitempty"`
1814	// Match - Criterion for classifying a healthy probe response.
1815	Match *ApplicationGatewayProbeHealthResponseMatch `json:"match,omitempty"`
1816	// ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1817	ProvisioningState *string `json:"provisioningState,omitempty"`
1818}
1819
1820// ApplicationGatewayPropertiesFormat properties of the application gateway.
1821type ApplicationGatewayPropertiesFormat struct {
1822	// Sku - SKU of the application gateway resource.
1823	Sku *ApplicationGatewaySku `json:"sku,omitempty"`
1824	// SslPolicy - SSL policy of the application gateway resource.
1825	SslPolicy *ApplicationGatewaySslPolicy `json:"sslPolicy,omitempty"`
1826	// OperationalState - READ-ONLY; Operational state of the application gateway resource. Possible values include: 'Stopped', 'Starting', 'Running', 'Stopping'
1827	OperationalState ApplicationGatewayOperationalState `json:"operationalState,omitempty"`
1828	// GatewayIPConfigurations - Subnets of application the gateway resource.
1829	GatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"gatewayIPConfigurations,omitempty"`
1830	// AuthenticationCertificates - Authentication certificates of the application gateway resource.
1831	AuthenticationCertificates *[]ApplicationGatewayAuthenticationCertificate `json:"authenticationCertificates,omitempty"`
1832	// TrustedRootCertificates - Trusted Root certificates of the application gateway resource.
1833	TrustedRootCertificates *[]ApplicationGatewayTrustedRootCertificate `json:"trustedRootCertificates,omitempty"`
1834	// SslCertificates - SSL certificates of the application gateway resource.
1835	SslCertificates *[]ApplicationGatewaySslCertificate `json:"sslCertificates,omitempty"`
1836	// FrontendIPConfigurations - Frontend IP addresses of the application gateway resource.
1837	FrontendIPConfigurations *[]ApplicationGatewayFrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"`
1838	// FrontendPorts - Frontend ports of the application gateway resource.
1839	FrontendPorts *[]ApplicationGatewayFrontendPort `json:"frontendPorts,omitempty"`
1840	// Probes - Probes of the application gateway resource.
1841	Probes *[]ApplicationGatewayProbe `json:"probes,omitempty"`
1842	// BackendAddressPools - Backend address pool of the application gateway resource.
1843	BackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"backendAddressPools,omitempty"`
1844	// BackendHTTPSettingsCollection - Backend http settings of the application gateway resource.
1845	BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettingsCollection,omitempty"`
1846	// HTTPListeners - Http listeners of the application gateway resource.
1847	HTTPListeners *[]ApplicationGatewayHTTPListener `json:"httpListeners,omitempty"`
1848	// URLPathMaps - URL path map of the application gateway resource.
1849	URLPathMaps *[]ApplicationGatewayURLPathMap `json:"urlPathMaps,omitempty"`
1850	// RequestRoutingRules - Request routing rules of the application gateway resource.
1851	RequestRoutingRules *[]ApplicationGatewayRequestRoutingRule `json:"requestRoutingRules,omitempty"`
1852	// RedirectConfigurations - Redirect configurations of the application gateway resource.
1853	RedirectConfigurations *[]ApplicationGatewayRedirectConfiguration `json:"redirectConfigurations,omitempty"`
1854	// WebApplicationFirewallConfiguration - Web application firewall configuration.
1855	WebApplicationFirewallConfiguration *ApplicationGatewayWebApplicationFirewallConfiguration `json:"webApplicationFirewallConfiguration,omitempty"`
1856	// EnableHTTP2 - Whether HTTP2 is enabled on the application gateway resource.
1857	EnableHTTP2 *bool `json:"enableHttp2,omitempty"`
1858	// EnableFips - Whether FIPS is enabled on the application gateway resource.
1859	EnableFips *bool `json:"enableFips,omitempty"`
1860	// AutoscaleConfiguration - Autoscale Configuration.
1861	AutoscaleConfiguration *ApplicationGatewayAutoscaleConfiguration `json:"autoscaleConfiguration,omitempty"`
1862	// ResourceGUID - Resource GUID property of the application gateway resource.
1863	ResourceGUID *string `json:"resourceGuid,omitempty"`
1864	// ProvisioningState - Provisioning state of the application gateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1865	ProvisioningState *string `json:"provisioningState,omitempty"`
1866	// CustomErrorConfigurations - Custom error configurations of the application gateway resource.
1867	CustomErrorConfigurations *[]ApplicationGatewayCustomError `json:"customErrorConfigurations,omitempty"`
1868}
1869
1870// MarshalJSON is the custom marshaler for ApplicationGatewayPropertiesFormat.
1871func (agpf ApplicationGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
1872	objectMap := make(map[string]interface{})
1873	if agpf.Sku != nil {
1874		objectMap["sku"] = agpf.Sku
1875	}
1876	if agpf.SslPolicy != nil {
1877		objectMap["sslPolicy"] = agpf.SslPolicy
1878	}
1879	if agpf.GatewayIPConfigurations != nil {
1880		objectMap["gatewayIPConfigurations"] = agpf.GatewayIPConfigurations
1881	}
1882	if agpf.AuthenticationCertificates != nil {
1883		objectMap["authenticationCertificates"] = agpf.AuthenticationCertificates
1884	}
1885	if agpf.TrustedRootCertificates != nil {
1886		objectMap["trustedRootCertificates"] = agpf.TrustedRootCertificates
1887	}
1888	if agpf.SslCertificates != nil {
1889		objectMap["sslCertificates"] = agpf.SslCertificates
1890	}
1891	if agpf.FrontendIPConfigurations != nil {
1892		objectMap["frontendIPConfigurations"] = agpf.FrontendIPConfigurations
1893	}
1894	if agpf.FrontendPorts != nil {
1895		objectMap["frontendPorts"] = agpf.FrontendPorts
1896	}
1897	if agpf.Probes != nil {
1898		objectMap["probes"] = agpf.Probes
1899	}
1900	if agpf.BackendAddressPools != nil {
1901		objectMap["backendAddressPools"] = agpf.BackendAddressPools
1902	}
1903	if agpf.BackendHTTPSettingsCollection != nil {
1904		objectMap["backendHttpSettingsCollection"] = agpf.BackendHTTPSettingsCollection
1905	}
1906	if agpf.HTTPListeners != nil {
1907		objectMap["httpListeners"] = agpf.HTTPListeners
1908	}
1909	if agpf.URLPathMaps != nil {
1910		objectMap["urlPathMaps"] = agpf.URLPathMaps
1911	}
1912	if agpf.RequestRoutingRules != nil {
1913		objectMap["requestRoutingRules"] = agpf.RequestRoutingRules
1914	}
1915	if agpf.RedirectConfigurations != nil {
1916		objectMap["redirectConfigurations"] = agpf.RedirectConfigurations
1917	}
1918	if agpf.WebApplicationFirewallConfiguration != nil {
1919		objectMap["webApplicationFirewallConfiguration"] = agpf.WebApplicationFirewallConfiguration
1920	}
1921	if agpf.EnableHTTP2 != nil {
1922		objectMap["enableHttp2"] = agpf.EnableHTTP2
1923	}
1924	if agpf.EnableFips != nil {
1925		objectMap["enableFips"] = agpf.EnableFips
1926	}
1927	if agpf.AutoscaleConfiguration != nil {
1928		objectMap["autoscaleConfiguration"] = agpf.AutoscaleConfiguration
1929	}
1930	if agpf.ResourceGUID != nil {
1931		objectMap["resourceGuid"] = agpf.ResourceGUID
1932	}
1933	if agpf.ProvisioningState != nil {
1934		objectMap["provisioningState"] = agpf.ProvisioningState
1935	}
1936	if agpf.CustomErrorConfigurations != nil {
1937		objectMap["customErrorConfigurations"] = agpf.CustomErrorConfigurations
1938	}
1939	return json.Marshal(objectMap)
1940}
1941
1942// ApplicationGatewayRedirectConfiguration redirect configuration of an application gateway.
1943type ApplicationGatewayRedirectConfiguration struct {
1944	*ApplicationGatewayRedirectConfigurationPropertiesFormat `json:"properties,omitempty"`
1945	// Name - Name of the redirect configuration that is unique within an Application Gateway.
1946	Name *string `json:"name,omitempty"`
1947	// Etag - A unique read-only string that changes whenever the resource is updated.
1948	Etag *string `json:"etag,omitempty"`
1949	// Type - Type of the resource.
1950	Type *string `json:"type,omitempty"`
1951	// ID - Resource ID.
1952	ID *string `json:"id,omitempty"`
1953}
1954
1955// MarshalJSON is the custom marshaler for ApplicationGatewayRedirectConfiguration.
1956func (agrc ApplicationGatewayRedirectConfiguration) MarshalJSON() ([]byte, error) {
1957	objectMap := make(map[string]interface{})
1958	if agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat != nil {
1959		objectMap["properties"] = agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat
1960	}
1961	if agrc.Name != nil {
1962		objectMap["name"] = agrc.Name
1963	}
1964	if agrc.Etag != nil {
1965		objectMap["etag"] = agrc.Etag
1966	}
1967	if agrc.Type != nil {
1968		objectMap["type"] = agrc.Type
1969	}
1970	if agrc.ID != nil {
1971		objectMap["id"] = agrc.ID
1972	}
1973	return json.Marshal(objectMap)
1974}
1975
1976// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRedirectConfiguration struct.
1977func (agrc *ApplicationGatewayRedirectConfiguration) UnmarshalJSON(body []byte) error {
1978	var m map[string]*json.RawMessage
1979	err := json.Unmarshal(body, &m)
1980	if err != nil {
1981		return err
1982	}
1983	for k, v := range m {
1984		switch k {
1985		case "properties":
1986			if v != nil {
1987				var applicationGatewayRedirectConfigurationPropertiesFormat ApplicationGatewayRedirectConfigurationPropertiesFormat
1988				err = json.Unmarshal(*v, &applicationGatewayRedirectConfigurationPropertiesFormat)
1989				if err != nil {
1990					return err
1991				}
1992				agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat = &applicationGatewayRedirectConfigurationPropertiesFormat
1993			}
1994		case "name":
1995			if v != nil {
1996				var name string
1997				err = json.Unmarshal(*v, &name)
1998				if err != nil {
1999					return err
2000				}
2001				agrc.Name = &name
2002			}
2003		case "etag":
2004			if v != nil {
2005				var etag string
2006				err = json.Unmarshal(*v, &etag)
2007				if err != nil {
2008					return err
2009				}
2010				agrc.Etag = &etag
2011			}
2012		case "type":
2013			if v != nil {
2014				var typeVar string
2015				err = json.Unmarshal(*v, &typeVar)
2016				if err != nil {
2017					return err
2018				}
2019				agrc.Type = &typeVar
2020			}
2021		case "id":
2022			if v != nil {
2023				var ID string
2024				err = json.Unmarshal(*v, &ID)
2025				if err != nil {
2026					return err
2027				}
2028				agrc.ID = &ID
2029			}
2030		}
2031	}
2032
2033	return nil
2034}
2035
2036// ApplicationGatewayRedirectConfigurationPropertiesFormat properties of redirect configuration of the
2037// application gateway.
2038type ApplicationGatewayRedirectConfigurationPropertiesFormat struct {
2039	// RedirectType - Supported http redirection types - Permanent, Temporary, Found, SeeOther. Possible values include: 'Permanent', 'Found', 'SeeOther', 'Temporary'
2040	RedirectType ApplicationGatewayRedirectType `json:"redirectType,omitempty"`
2041	// TargetListener - Reference to a listener to redirect the request to.
2042	TargetListener *SubResource `json:"targetListener,omitempty"`
2043	// TargetURL - Url to redirect the request to.
2044	TargetURL *string `json:"targetUrl,omitempty"`
2045	// IncludePath - Include path in the redirected url.
2046	IncludePath *bool `json:"includePath,omitempty"`
2047	// IncludeQueryString - Include query string in the redirected url.
2048	IncludeQueryString *bool `json:"includeQueryString,omitempty"`
2049	// RequestRoutingRules - Request routing specifying redirect configuration.
2050	RequestRoutingRules *[]SubResource `json:"requestRoutingRules,omitempty"`
2051	// URLPathMaps - Url path maps specifying default redirect configuration.
2052	URLPathMaps *[]SubResource `json:"urlPathMaps,omitempty"`
2053	// PathRules - Path rules specifying redirect configuration.
2054	PathRules *[]SubResource `json:"pathRules,omitempty"`
2055}
2056
2057// ApplicationGatewayRequestRoutingRule request routing rule of an application gateway.
2058type ApplicationGatewayRequestRoutingRule struct {
2059	*ApplicationGatewayRequestRoutingRulePropertiesFormat `json:"properties,omitempty"`
2060	// Name - Name of the request routing rule that is unique within an Application Gateway.
2061	Name *string `json:"name,omitempty"`
2062	// Etag - A unique read-only string that changes whenever the resource is updated.
2063	Etag *string `json:"etag,omitempty"`
2064	// Type - Type of the resource.
2065	Type *string `json:"type,omitempty"`
2066	// ID - Resource ID.
2067	ID *string `json:"id,omitempty"`
2068}
2069
2070// MarshalJSON is the custom marshaler for ApplicationGatewayRequestRoutingRule.
2071func (agrrr ApplicationGatewayRequestRoutingRule) MarshalJSON() ([]byte, error) {
2072	objectMap := make(map[string]interface{})
2073	if agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat != nil {
2074		objectMap["properties"] = agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat
2075	}
2076	if agrrr.Name != nil {
2077		objectMap["name"] = agrrr.Name
2078	}
2079	if agrrr.Etag != nil {
2080		objectMap["etag"] = agrrr.Etag
2081	}
2082	if agrrr.Type != nil {
2083		objectMap["type"] = agrrr.Type
2084	}
2085	if agrrr.ID != nil {
2086		objectMap["id"] = agrrr.ID
2087	}
2088	return json.Marshal(objectMap)
2089}
2090
2091// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRequestRoutingRule struct.
2092func (agrrr *ApplicationGatewayRequestRoutingRule) UnmarshalJSON(body []byte) error {
2093	var m map[string]*json.RawMessage
2094	err := json.Unmarshal(body, &m)
2095	if err != nil {
2096		return err
2097	}
2098	for k, v := range m {
2099		switch k {
2100		case "properties":
2101			if v != nil {
2102				var applicationGatewayRequestRoutingRulePropertiesFormat ApplicationGatewayRequestRoutingRulePropertiesFormat
2103				err = json.Unmarshal(*v, &applicationGatewayRequestRoutingRulePropertiesFormat)
2104				if err != nil {
2105					return err
2106				}
2107				agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat = &applicationGatewayRequestRoutingRulePropertiesFormat
2108			}
2109		case "name":
2110			if v != nil {
2111				var name string
2112				err = json.Unmarshal(*v, &name)
2113				if err != nil {
2114					return err
2115				}
2116				agrrr.Name = &name
2117			}
2118		case "etag":
2119			if v != nil {
2120				var etag string
2121				err = json.Unmarshal(*v, &etag)
2122				if err != nil {
2123					return err
2124				}
2125				agrrr.Etag = &etag
2126			}
2127		case "type":
2128			if v != nil {
2129				var typeVar string
2130				err = json.Unmarshal(*v, &typeVar)
2131				if err != nil {
2132					return err
2133				}
2134				agrrr.Type = &typeVar
2135			}
2136		case "id":
2137			if v != nil {
2138				var ID string
2139				err = json.Unmarshal(*v, &ID)
2140				if err != nil {
2141					return err
2142				}
2143				agrrr.ID = &ID
2144			}
2145		}
2146	}
2147
2148	return nil
2149}
2150
2151// ApplicationGatewayRequestRoutingRulePropertiesFormat properties of request routing rule of the
2152// application gateway.
2153type ApplicationGatewayRequestRoutingRulePropertiesFormat struct {
2154	// RuleType - Rule type. Possible values include: 'Basic', 'PathBasedRouting'
2155	RuleType ApplicationGatewayRequestRoutingRuleType `json:"ruleType,omitempty"`
2156	// BackendAddressPool - Backend address pool resource of the application gateway.
2157	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
2158	// BackendHTTPSettings - Backend http settings resource of the application gateway.
2159	BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"`
2160	// HTTPListener - Http listener resource of the application gateway.
2161	HTTPListener *SubResource `json:"httpListener,omitempty"`
2162	// URLPathMap - URL path map resource of the application gateway.
2163	URLPathMap *SubResource `json:"urlPathMap,omitempty"`
2164	// RedirectConfiguration - Redirect configuration resource of the application gateway.
2165	RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"`
2166	// ProvisioningState - Provisioning state of the request routing rule resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2167	ProvisioningState *string `json:"provisioningState,omitempty"`
2168}
2169
2170// ApplicationGatewaysBackendHealthFuture an abstraction for monitoring and retrieving the results of a
2171// long-running operation.
2172type ApplicationGatewaysBackendHealthFuture struct {
2173	azure.FutureAPI
2174	// Result returns the result of the asynchronous operation.
2175	// If the operation has not completed it will return an error.
2176	Result func(ApplicationGatewaysClient) (ApplicationGatewayBackendHealth, error)
2177}
2178
2179// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2180func (future *ApplicationGatewaysBackendHealthFuture) UnmarshalJSON(body []byte) error {
2181	var azFuture azure.Future
2182	if err := json.Unmarshal(body, &azFuture); err != nil {
2183		return err
2184	}
2185	future.FutureAPI = &azFuture
2186	future.Result = future.result
2187	return nil
2188}
2189
2190// result is the default implementation for ApplicationGatewaysBackendHealthFuture.Result.
2191func (future *ApplicationGatewaysBackendHealthFuture) result(client ApplicationGatewaysClient) (agbh ApplicationGatewayBackendHealth, err error) {
2192	var done bool
2193	done, err = future.DoneWithContext(context.Background(), client)
2194	if err != nil {
2195		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", future.Response(), "Polling failure")
2196		return
2197	}
2198	if !done {
2199		agbh.Response.Response = future.Response()
2200		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysBackendHealthFuture")
2201		return
2202	}
2203	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2204	if agbh.Response.Response, err = future.GetResult(sender); err == nil && agbh.Response.Response.StatusCode != http.StatusNoContent {
2205		agbh, err = client.BackendHealthResponder(agbh.Response.Response)
2206		if err != nil {
2207			err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysBackendHealthFuture", "Result", agbh.Response.Response, "Failure responding to request")
2208		}
2209	}
2210	return
2211}
2212
2213// ApplicationGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
2214// long-running operation.
2215type ApplicationGatewaysCreateOrUpdateFuture struct {
2216	azure.FutureAPI
2217	// Result returns the result of the asynchronous operation.
2218	// If the operation has not completed it will return an error.
2219	Result func(ApplicationGatewaysClient) (ApplicationGateway, error)
2220}
2221
2222// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2223func (future *ApplicationGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
2224	var azFuture azure.Future
2225	if err := json.Unmarshal(body, &azFuture); err != nil {
2226		return err
2227	}
2228	future.FutureAPI = &azFuture
2229	future.Result = future.result
2230	return nil
2231}
2232
2233// result is the default implementation for ApplicationGatewaysCreateOrUpdateFuture.Result.
2234func (future *ApplicationGatewaysCreateOrUpdateFuture) result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
2235	var done bool
2236	done, err = future.DoneWithContext(context.Background(), client)
2237	if err != nil {
2238		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
2239		return
2240	}
2241	if !done {
2242		ag.Response.Response = future.Response()
2243		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysCreateOrUpdateFuture")
2244		return
2245	}
2246	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2247	if ag.Response.Response, err = future.GetResult(sender); err == nil && ag.Response.Response.StatusCode != http.StatusNoContent {
2248		ag, err = client.CreateOrUpdateResponder(ag.Response.Response)
2249		if err != nil {
2250			err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysCreateOrUpdateFuture", "Result", ag.Response.Response, "Failure responding to request")
2251		}
2252	}
2253	return
2254}
2255
2256// ApplicationGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
2257// long-running operation.
2258type ApplicationGatewaysDeleteFuture struct {
2259	azure.FutureAPI
2260	// Result returns the result of the asynchronous operation.
2261	// If the operation has not completed it will return an error.
2262	Result func(ApplicationGatewaysClient) (autorest.Response, error)
2263}
2264
2265// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2266func (future *ApplicationGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
2267	var azFuture azure.Future
2268	if err := json.Unmarshal(body, &azFuture); err != nil {
2269		return err
2270	}
2271	future.FutureAPI = &azFuture
2272	future.Result = future.result
2273	return nil
2274}
2275
2276// result is the default implementation for ApplicationGatewaysDeleteFuture.Result.
2277func (future *ApplicationGatewaysDeleteFuture) result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
2278	var done bool
2279	done, err = future.DoneWithContext(context.Background(), client)
2280	if err != nil {
2281		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
2282		return
2283	}
2284	if !done {
2285		ar.Response = future.Response()
2286		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysDeleteFuture")
2287		return
2288	}
2289	ar.Response = future.Response()
2290	return
2291}
2292
2293// ApplicationGatewaySku SKU of an application gateway
2294type ApplicationGatewaySku struct {
2295	// Name - Name of an application gateway SKU. Possible values include: 'StandardSmall', 'StandardMedium', 'StandardLarge', 'WAFMedium', 'WAFLarge', 'StandardV2', 'WAFV2'
2296	Name ApplicationGatewaySkuName `json:"name,omitempty"`
2297	// Tier - Tier of an application gateway. Possible values include: 'ApplicationGatewayTierStandard', 'ApplicationGatewayTierWAF', 'ApplicationGatewayTierStandardV2', 'ApplicationGatewayTierWAFV2'
2298	Tier ApplicationGatewayTier `json:"tier,omitempty"`
2299	// Capacity - Capacity (instance count) of an application gateway.
2300	Capacity *int32 `json:"capacity,omitempty"`
2301}
2302
2303// ApplicationGatewaySslCertificate SSL certificates of an application gateway.
2304type ApplicationGatewaySslCertificate struct {
2305	*ApplicationGatewaySslCertificatePropertiesFormat `json:"properties,omitempty"`
2306	// Name - Name of the SSL certificate that is unique within an Application Gateway.
2307	Name *string `json:"name,omitempty"`
2308	// Etag - A unique read-only string that changes whenever the resource is updated.
2309	Etag *string `json:"etag,omitempty"`
2310	// Type - Type of the resource.
2311	Type *string `json:"type,omitempty"`
2312	// ID - Resource ID.
2313	ID *string `json:"id,omitempty"`
2314}
2315
2316// MarshalJSON is the custom marshaler for ApplicationGatewaySslCertificate.
2317func (agsc ApplicationGatewaySslCertificate) MarshalJSON() ([]byte, error) {
2318	objectMap := make(map[string]interface{})
2319	if agsc.ApplicationGatewaySslCertificatePropertiesFormat != nil {
2320		objectMap["properties"] = agsc.ApplicationGatewaySslCertificatePropertiesFormat
2321	}
2322	if agsc.Name != nil {
2323		objectMap["name"] = agsc.Name
2324	}
2325	if agsc.Etag != nil {
2326		objectMap["etag"] = agsc.Etag
2327	}
2328	if agsc.Type != nil {
2329		objectMap["type"] = agsc.Type
2330	}
2331	if agsc.ID != nil {
2332		objectMap["id"] = agsc.ID
2333	}
2334	return json.Marshal(objectMap)
2335}
2336
2337// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslCertificate struct.
2338func (agsc *ApplicationGatewaySslCertificate) UnmarshalJSON(body []byte) error {
2339	var m map[string]*json.RawMessage
2340	err := json.Unmarshal(body, &m)
2341	if err != nil {
2342		return err
2343	}
2344	for k, v := range m {
2345		switch k {
2346		case "properties":
2347			if v != nil {
2348				var applicationGatewaySslCertificatePropertiesFormat ApplicationGatewaySslCertificatePropertiesFormat
2349				err = json.Unmarshal(*v, &applicationGatewaySslCertificatePropertiesFormat)
2350				if err != nil {
2351					return err
2352				}
2353				agsc.ApplicationGatewaySslCertificatePropertiesFormat = &applicationGatewaySslCertificatePropertiesFormat
2354			}
2355		case "name":
2356			if v != nil {
2357				var name string
2358				err = json.Unmarshal(*v, &name)
2359				if err != nil {
2360					return err
2361				}
2362				agsc.Name = &name
2363			}
2364		case "etag":
2365			if v != nil {
2366				var etag string
2367				err = json.Unmarshal(*v, &etag)
2368				if err != nil {
2369					return err
2370				}
2371				agsc.Etag = &etag
2372			}
2373		case "type":
2374			if v != nil {
2375				var typeVar string
2376				err = json.Unmarshal(*v, &typeVar)
2377				if err != nil {
2378					return err
2379				}
2380				agsc.Type = &typeVar
2381			}
2382		case "id":
2383			if v != nil {
2384				var ID string
2385				err = json.Unmarshal(*v, &ID)
2386				if err != nil {
2387					return err
2388				}
2389				agsc.ID = &ID
2390			}
2391		}
2392	}
2393
2394	return nil
2395}
2396
2397// ApplicationGatewaySslCertificatePropertiesFormat properties of SSL certificates of an application
2398// gateway.
2399type ApplicationGatewaySslCertificatePropertiesFormat struct {
2400	// Data - Base-64 encoded pfx certificate. Only applicable in PUT Request.
2401	Data *string `json:"data,omitempty"`
2402	// Password - Password for the pfx file specified in data. Only applicable in PUT request.
2403	Password *string `json:"password,omitempty"`
2404	// PublicCertData - Base-64 encoded Public cert data corresponding to pfx specified in data. Only applicable in GET request.
2405	PublicCertData *string `json:"publicCertData,omitempty"`
2406	// ProvisioningState - Provisioning state of the SSL certificate resource Possible values are: 'Updating', 'Deleting', and 'Failed'.
2407	ProvisioningState *string `json:"provisioningState,omitempty"`
2408}
2409
2410// ApplicationGatewaySslPolicy application Gateway Ssl policy.
2411type ApplicationGatewaySslPolicy struct {
2412	// DisabledSslProtocols - Ssl protocols to be disabled on application gateway.
2413	DisabledSslProtocols *[]ApplicationGatewaySslProtocol `json:"disabledSslProtocols,omitempty"`
2414	// PolicyType - Type of Ssl Policy. Possible values include: 'Predefined', 'Custom'
2415	PolicyType ApplicationGatewaySslPolicyType `json:"policyType,omitempty"`
2416	// PolicyName - Name of Ssl predefined policy. Possible values include: 'AppGwSslPolicy20150501', 'AppGwSslPolicy20170401', 'AppGwSslPolicy20170401S'
2417	PolicyName ApplicationGatewaySslPolicyName `json:"policyName,omitempty"`
2418	// CipherSuites - Ssl cipher suites to be enabled in the specified order to application gateway.
2419	CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"`
2420	// MinProtocolVersion - Minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'TLSv10', 'TLSv11', 'TLSv12'
2421	MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"`
2422}
2423
2424// ApplicationGatewaySslPredefinedPolicy an Ssl predefined policy
2425type ApplicationGatewaySslPredefinedPolicy struct {
2426	autorest.Response `json:"-"`
2427	// Name - Name of the Ssl predefined policy.
2428	Name                                                   *string `json:"name,omitempty"`
2429	*ApplicationGatewaySslPredefinedPolicyPropertiesFormat `json:"properties,omitempty"`
2430	// ID - Resource ID.
2431	ID *string `json:"id,omitempty"`
2432}
2433
2434// MarshalJSON is the custom marshaler for ApplicationGatewaySslPredefinedPolicy.
2435func (agspp ApplicationGatewaySslPredefinedPolicy) MarshalJSON() ([]byte, error) {
2436	objectMap := make(map[string]interface{})
2437	if agspp.Name != nil {
2438		objectMap["name"] = agspp.Name
2439	}
2440	if agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat != nil {
2441		objectMap["properties"] = agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat
2442	}
2443	if agspp.ID != nil {
2444		objectMap["id"] = agspp.ID
2445	}
2446	return json.Marshal(objectMap)
2447}
2448
2449// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslPredefinedPolicy struct.
2450func (agspp *ApplicationGatewaySslPredefinedPolicy) UnmarshalJSON(body []byte) error {
2451	var m map[string]*json.RawMessage
2452	err := json.Unmarshal(body, &m)
2453	if err != nil {
2454		return err
2455	}
2456	for k, v := range m {
2457		switch k {
2458		case "name":
2459			if v != nil {
2460				var name string
2461				err = json.Unmarshal(*v, &name)
2462				if err != nil {
2463					return err
2464				}
2465				agspp.Name = &name
2466			}
2467		case "properties":
2468			if v != nil {
2469				var applicationGatewaySslPredefinedPolicyPropertiesFormat ApplicationGatewaySslPredefinedPolicyPropertiesFormat
2470				err = json.Unmarshal(*v, &applicationGatewaySslPredefinedPolicyPropertiesFormat)
2471				if err != nil {
2472					return err
2473				}
2474				agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat = &applicationGatewaySslPredefinedPolicyPropertiesFormat
2475			}
2476		case "id":
2477			if v != nil {
2478				var ID string
2479				err = json.Unmarshal(*v, &ID)
2480				if err != nil {
2481					return err
2482				}
2483				agspp.ID = &ID
2484			}
2485		}
2486	}
2487
2488	return nil
2489}
2490
2491// ApplicationGatewaySslPredefinedPolicyPropertiesFormat properties of
2492// ApplicationGatewaySslPredefinedPolicy
2493type ApplicationGatewaySslPredefinedPolicyPropertiesFormat struct {
2494	// CipherSuites - Ssl cipher suites to be enabled in the specified order for application gateway.
2495	CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"`
2496	// MinProtocolVersion - Minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'TLSv10', 'TLSv11', 'TLSv12'
2497	MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"`
2498}
2499
2500// ApplicationGatewaysStartFuture an abstraction for monitoring and retrieving the results of a
2501// long-running operation.
2502type ApplicationGatewaysStartFuture struct {
2503	azure.FutureAPI
2504	// Result returns the result of the asynchronous operation.
2505	// If the operation has not completed it will return an error.
2506	Result func(ApplicationGatewaysClient) (autorest.Response, error)
2507}
2508
2509// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2510func (future *ApplicationGatewaysStartFuture) UnmarshalJSON(body []byte) error {
2511	var azFuture azure.Future
2512	if err := json.Unmarshal(body, &azFuture); err != nil {
2513		return err
2514	}
2515	future.FutureAPI = &azFuture
2516	future.Result = future.result
2517	return nil
2518}
2519
2520// result is the default implementation for ApplicationGatewaysStartFuture.Result.
2521func (future *ApplicationGatewaysStartFuture) result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
2522	var done bool
2523	done, err = future.DoneWithContext(context.Background(), client)
2524	if err != nil {
2525		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStartFuture", "Result", future.Response(), "Polling failure")
2526		return
2527	}
2528	if !done {
2529		ar.Response = future.Response()
2530		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStartFuture")
2531		return
2532	}
2533	ar.Response = future.Response()
2534	return
2535}
2536
2537// ApplicationGatewaysStopFuture an abstraction for monitoring and retrieving the results of a long-running
2538// operation.
2539type ApplicationGatewaysStopFuture struct {
2540	azure.FutureAPI
2541	// Result returns the result of the asynchronous operation.
2542	// If the operation has not completed it will return an error.
2543	Result func(ApplicationGatewaysClient) (autorest.Response, error)
2544}
2545
2546// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2547func (future *ApplicationGatewaysStopFuture) UnmarshalJSON(body []byte) error {
2548	var azFuture azure.Future
2549	if err := json.Unmarshal(body, &azFuture); err != nil {
2550		return err
2551	}
2552	future.FutureAPI = &azFuture
2553	future.Result = future.result
2554	return nil
2555}
2556
2557// result is the default implementation for ApplicationGatewaysStopFuture.Result.
2558func (future *ApplicationGatewaysStopFuture) result(client ApplicationGatewaysClient) (ar autorest.Response, err error) {
2559	var done bool
2560	done, err = future.DoneWithContext(context.Background(), client)
2561	if err != nil {
2562		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysStopFuture", "Result", future.Response(), "Polling failure")
2563		return
2564	}
2565	if !done {
2566		ar.Response = future.Response()
2567		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysStopFuture")
2568		return
2569	}
2570	ar.Response = future.Response()
2571	return
2572}
2573
2574// ApplicationGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
2575// long-running operation.
2576type ApplicationGatewaysUpdateTagsFuture struct {
2577	azure.FutureAPI
2578	// Result returns the result of the asynchronous operation.
2579	// If the operation has not completed it will return an error.
2580	Result func(ApplicationGatewaysClient) (ApplicationGateway, error)
2581}
2582
2583// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2584func (future *ApplicationGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error {
2585	var azFuture azure.Future
2586	if err := json.Unmarshal(body, &azFuture); err != nil {
2587		return err
2588	}
2589	future.FutureAPI = &azFuture
2590	future.Result = future.result
2591	return nil
2592}
2593
2594// result is the default implementation for ApplicationGatewaysUpdateTagsFuture.Result.
2595func (future *ApplicationGatewaysUpdateTagsFuture) result(client ApplicationGatewaysClient) (ag ApplicationGateway, err error) {
2596	var done bool
2597	done, err = future.DoneWithContext(context.Background(), client)
2598	if err != nil {
2599		err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
2600		return
2601	}
2602	if !done {
2603		ag.Response.Response = future.Response()
2604		err = azure.NewAsyncOpIncompleteError("network.ApplicationGatewaysUpdateTagsFuture")
2605		return
2606	}
2607	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2608	if ag.Response.Response, err = future.GetResult(sender); err == nil && ag.Response.Response.StatusCode != http.StatusNoContent {
2609		ag, err = client.UpdateTagsResponder(ag.Response.Response)
2610		if err != nil {
2611			err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysUpdateTagsFuture", "Result", ag.Response.Response, "Failure responding to request")
2612		}
2613	}
2614	return
2615}
2616
2617// ApplicationGatewayTrustedRootCertificate trusted Root certificates of an application gateway.
2618type ApplicationGatewayTrustedRootCertificate struct {
2619	*ApplicationGatewayTrustedRootCertificatePropertiesFormat `json:"properties,omitempty"`
2620	// Name - Name of the trusted root certificate that is unique within an Application Gateway.
2621	Name *string `json:"name,omitempty"`
2622	// Etag - A unique read-only string that changes whenever the resource is updated.
2623	Etag *string `json:"etag,omitempty"`
2624	// Type - Type of the resource.
2625	Type *string `json:"type,omitempty"`
2626	// ID - Resource ID.
2627	ID *string `json:"id,omitempty"`
2628}
2629
2630// MarshalJSON is the custom marshaler for ApplicationGatewayTrustedRootCertificate.
2631func (agtrc ApplicationGatewayTrustedRootCertificate) MarshalJSON() ([]byte, error) {
2632	objectMap := make(map[string]interface{})
2633	if agtrc.ApplicationGatewayTrustedRootCertificatePropertiesFormat != nil {
2634		objectMap["properties"] = agtrc.ApplicationGatewayTrustedRootCertificatePropertiesFormat
2635	}
2636	if agtrc.Name != nil {
2637		objectMap["name"] = agtrc.Name
2638	}
2639	if agtrc.Etag != nil {
2640		objectMap["etag"] = agtrc.Etag
2641	}
2642	if agtrc.Type != nil {
2643		objectMap["type"] = agtrc.Type
2644	}
2645	if agtrc.ID != nil {
2646		objectMap["id"] = agtrc.ID
2647	}
2648	return json.Marshal(objectMap)
2649}
2650
2651// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayTrustedRootCertificate struct.
2652func (agtrc *ApplicationGatewayTrustedRootCertificate) UnmarshalJSON(body []byte) error {
2653	var m map[string]*json.RawMessage
2654	err := json.Unmarshal(body, &m)
2655	if err != nil {
2656		return err
2657	}
2658	for k, v := range m {
2659		switch k {
2660		case "properties":
2661			if v != nil {
2662				var applicationGatewayTrustedRootCertificatePropertiesFormat ApplicationGatewayTrustedRootCertificatePropertiesFormat
2663				err = json.Unmarshal(*v, &applicationGatewayTrustedRootCertificatePropertiesFormat)
2664				if err != nil {
2665					return err
2666				}
2667				agtrc.ApplicationGatewayTrustedRootCertificatePropertiesFormat = &applicationGatewayTrustedRootCertificatePropertiesFormat
2668			}
2669		case "name":
2670			if v != nil {
2671				var name string
2672				err = json.Unmarshal(*v, &name)
2673				if err != nil {
2674					return err
2675				}
2676				agtrc.Name = &name
2677			}
2678		case "etag":
2679			if v != nil {
2680				var etag string
2681				err = json.Unmarshal(*v, &etag)
2682				if err != nil {
2683					return err
2684				}
2685				agtrc.Etag = &etag
2686			}
2687		case "type":
2688			if v != nil {
2689				var typeVar string
2690				err = json.Unmarshal(*v, &typeVar)
2691				if err != nil {
2692					return err
2693				}
2694				agtrc.Type = &typeVar
2695			}
2696		case "id":
2697			if v != nil {
2698				var ID string
2699				err = json.Unmarshal(*v, &ID)
2700				if err != nil {
2701					return err
2702				}
2703				agtrc.ID = &ID
2704			}
2705		}
2706	}
2707
2708	return nil
2709}
2710
2711// ApplicationGatewayTrustedRootCertificatePropertiesFormat trusted Root certificates properties of an
2712// application gateway.
2713type ApplicationGatewayTrustedRootCertificatePropertiesFormat struct {
2714	// Data - Certificate public data.
2715	Data *string `json:"data,omitempty"`
2716	// KeyvaultSecretID - KeyVault Secret Id for certificate.
2717	KeyvaultSecretID *string `json:"keyvaultSecretId,omitempty"`
2718	// ProvisioningState - Provisioning state of the trusted root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2719	ProvisioningState *string `json:"provisioningState,omitempty"`
2720}
2721
2722// ApplicationGatewayURLPathMap urlPathMaps give a url path to the backend mapping information for
2723// PathBasedRouting.
2724type ApplicationGatewayURLPathMap struct {
2725	*ApplicationGatewayURLPathMapPropertiesFormat `json:"properties,omitempty"`
2726	// Name - Name of the URL path map that is unique within an Application Gateway.
2727	Name *string `json:"name,omitempty"`
2728	// Etag - A unique read-only string that changes whenever the resource is updated.
2729	Etag *string `json:"etag,omitempty"`
2730	// Type - Type of the resource.
2731	Type *string `json:"type,omitempty"`
2732	// ID - Resource ID.
2733	ID *string `json:"id,omitempty"`
2734}
2735
2736// MarshalJSON is the custom marshaler for ApplicationGatewayURLPathMap.
2737func (agupm ApplicationGatewayURLPathMap) MarshalJSON() ([]byte, error) {
2738	objectMap := make(map[string]interface{})
2739	if agupm.ApplicationGatewayURLPathMapPropertiesFormat != nil {
2740		objectMap["properties"] = agupm.ApplicationGatewayURLPathMapPropertiesFormat
2741	}
2742	if agupm.Name != nil {
2743		objectMap["name"] = agupm.Name
2744	}
2745	if agupm.Etag != nil {
2746		objectMap["etag"] = agupm.Etag
2747	}
2748	if agupm.Type != nil {
2749		objectMap["type"] = agupm.Type
2750	}
2751	if agupm.ID != nil {
2752		objectMap["id"] = agupm.ID
2753	}
2754	return json.Marshal(objectMap)
2755}
2756
2757// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayURLPathMap struct.
2758func (agupm *ApplicationGatewayURLPathMap) UnmarshalJSON(body []byte) error {
2759	var m map[string]*json.RawMessage
2760	err := json.Unmarshal(body, &m)
2761	if err != nil {
2762		return err
2763	}
2764	for k, v := range m {
2765		switch k {
2766		case "properties":
2767			if v != nil {
2768				var applicationGatewayURLPathMapPropertiesFormat ApplicationGatewayURLPathMapPropertiesFormat
2769				err = json.Unmarshal(*v, &applicationGatewayURLPathMapPropertiesFormat)
2770				if err != nil {
2771					return err
2772				}
2773				agupm.ApplicationGatewayURLPathMapPropertiesFormat = &applicationGatewayURLPathMapPropertiesFormat
2774			}
2775		case "name":
2776			if v != nil {
2777				var name string
2778				err = json.Unmarshal(*v, &name)
2779				if err != nil {
2780					return err
2781				}
2782				agupm.Name = &name
2783			}
2784		case "etag":
2785			if v != nil {
2786				var etag string
2787				err = json.Unmarshal(*v, &etag)
2788				if err != nil {
2789					return err
2790				}
2791				agupm.Etag = &etag
2792			}
2793		case "type":
2794			if v != nil {
2795				var typeVar string
2796				err = json.Unmarshal(*v, &typeVar)
2797				if err != nil {
2798					return err
2799				}
2800				agupm.Type = &typeVar
2801			}
2802		case "id":
2803			if v != nil {
2804				var ID string
2805				err = json.Unmarshal(*v, &ID)
2806				if err != nil {
2807					return err
2808				}
2809				agupm.ID = &ID
2810			}
2811		}
2812	}
2813
2814	return nil
2815}
2816
2817// ApplicationGatewayURLPathMapPropertiesFormat properties of UrlPathMap of the application gateway.
2818type ApplicationGatewayURLPathMapPropertiesFormat struct {
2819	// DefaultBackendAddressPool - Default backend address pool resource of URL path map.
2820	DefaultBackendAddressPool *SubResource `json:"defaultBackendAddressPool,omitempty"`
2821	// DefaultBackendHTTPSettings - Default backend http settings resource of URL path map.
2822	DefaultBackendHTTPSettings *SubResource `json:"defaultBackendHttpSettings,omitempty"`
2823	// DefaultRedirectConfiguration - Default redirect configuration resource of URL path map.
2824	DefaultRedirectConfiguration *SubResource `json:"defaultRedirectConfiguration,omitempty"`
2825	// PathRules - Path rule of URL path map resource.
2826	PathRules *[]ApplicationGatewayPathRule `json:"pathRules,omitempty"`
2827	// ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2828	ProvisioningState *string `json:"provisioningState,omitempty"`
2829}
2830
2831// ApplicationGatewayWebApplicationFirewallConfiguration application gateway web application firewall
2832// configuration.
2833type ApplicationGatewayWebApplicationFirewallConfiguration struct {
2834	// Enabled - Whether the web application firewall is enabled or not.
2835	Enabled *bool `json:"enabled,omitempty"`
2836	// FirewallMode - Web application firewall mode. Possible values include: 'Detection', 'Prevention'
2837	FirewallMode ApplicationGatewayFirewallMode `json:"firewallMode,omitempty"`
2838	// RuleSetType - The type of the web application firewall rule set. Possible values are: 'OWASP'.
2839	RuleSetType *string `json:"ruleSetType,omitempty"`
2840	// RuleSetVersion - The version of the rule set type.
2841	RuleSetVersion *string `json:"ruleSetVersion,omitempty"`
2842	// DisabledRuleGroups - The disabled rule groups.
2843	DisabledRuleGroups *[]ApplicationGatewayFirewallDisabledRuleGroup `json:"disabledRuleGroups,omitempty"`
2844	// RequestBodyCheck - Whether allow WAF to check request Body.
2845	RequestBodyCheck *bool `json:"requestBodyCheck,omitempty"`
2846	// MaxRequestBodySize - Maximum request body size for WAF.
2847	MaxRequestBodySize *int32 `json:"maxRequestBodySize,omitempty"`
2848	// MaxRequestBodySizeInKb - Maximum request body size in Kb for WAF.
2849	MaxRequestBodySizeInKb *int32 `json:"maxRequestBodySizeInKb,omitempty"`
2850	// FileUploadLimitInMb - Maximum file upload size in Mb for WAF.
2851	FileUploadLimitInMb *int32 `json:"fileUploadLimitInMb,omitempty"`
2852	// Exclusions - The exclusion list.
2853	Exclusions *[]ApplicationGatewayFirewallExclusion `json:"exclusions,omitempty"`
2854}
2855
2856// ApplicationSecurityGroup an application security group in a resource group.
2857type ApplicationSecurityGroup struct {
2858	autorest.Response `json:"-"`
2859	// ApplicationSecurityGroupPropertiesFormat - Properties of the application security group.
2860	*ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"`
2861	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
2862	Etag *string `json:"etag,omitempty"`
2863	// ID - Resource ID.
2864	ID *string `json:"id,omitempty"`
2865	// Name - READ-ONLY; Resource name.
2866	Name *string `json:"name,omitempty"`
2867	// Type - READ-ONLY; Resource type.
2868	Type *string `json:"type,omitempty"`
2869	// Location - Resource location.
2870	Location *string `json:"location,omitempty"`
2871	// Tags - Resource tags.
2872	Tags map[string]*string `json:"tags"`
2873}
2874
2875// MarshalJSON is the custom marshaler for ApplicationSecurityGroup.
2876func (asg ApplicationSecurityGroup) MarshalJSON() ([]byte, error) {
2877	objectMap := make(map[string]interface{})
2878	if asg.ApplicationSecurityGroupPropertiesFormat != nil {
2879		objectMap["properties"] = asg.ApplicationSecurityGroupPropertiesFormat
2880	}
2881	if asg.ID != nil {
2882		objectMap["id"] = asg.ID
2883	}
2884	if asg.Location != nil {
2885		objectMap["location"] = asg.Location
2886	}
2887	if asg.Tags != nil {
2888		objectMap["tags"] = asg.Tags
2889	}
2890	return json.Marshal(objectMap)
2891}
2892
2893// UnmarshalJSON is the custom unmarshaler for ApplicationSecurityGroup struct.
2894func (asg *ApplicationSecurityGroup) UnmarshalJSON(body []byte) error {
2895	var m map[string]*json.RawMessage
2896	err := json.Unmarshal(body, &m)
2897	if err != nil {
2898		return err
2899	}
2900	for k, v := range m {
2901		switch k {
2902		case "properties":
2903			if v != nil {
2904				var applicationSecurityGroupPropertiesFormat ApplicationSecurityGroupPropertiesFormat
2905				err = json.Unmarshal(*v, &applicationSecurityGroupPropertiesFormat)
2906				if err != nil {
2907					return err
2908				}
2909				asg.ApplicationSecurityGroupPropertiesFormat = &applicationSecurityGroupPropertiesFormat
2910			}
2911		case "etag":
2912			if v != nil {
2913				var etag string
2914				err = json.Unmarshal(*v, &etag)
2915				if err != nil {
2916					return err
2917				}
2918				asg.Etag = &etag
2919			}
2920		case "id":
2921			if v != nil {
2922				var ID string
2923				err = json.Unmarshal(*v, &ID)
2924				if err != nil {
2925					return err
2926				}
2927				asg.ID = &ID
2928			}
2929		case "name":
2930			if v != nil {
2931				var name string
2932				err = json.Unmarshal(*v, &name)
2933				if err != nil {
2934					return err
2935				}
2936				asg.Name = &name
2937			}
2938		case "type":
2939			if v != nil {
2940				var typeVar string
2941				err = json.Unmarshal(*v, &typeVar)
2942				if err != nil {
2943					return err
2944				}
2945				asg.Type = &typeVar
2946			}
2947		case "location":
2948			if v != nil {
2949				var location string
2950				err = json.Unmarshal(*v, &location)
2951				if err != nil {
2952					return err
2953				}
2954				asg.Location = &location
2955			}
2956		case "tags":
2957			if v != nil {
2958				var tags map[string]*string
2959				err = json.Unmarshal(*v, &tags)
2960				if err != nil {
2961					return err
2962				}
2963				asg.Tags = tags
2964			}
2965		}
2966	}
2967
2968	return nil
2969}
2970
2971// ApplicationSecurityGroupListResult a list of application security groups.
2972type ApplicationSecurityGroupListResult struct {
2973	autorest.Response `json:"-"`
2974	// Value - A list of application security groups.
2975	Value *[]ApplicationSecurityGroup `json:"value,omitempty"`
2976	// NextLink - READ-ONLY; The URL to get the next set of results.
2977	NextLink *string `json:"nextLink,omitempty"`
2978}
2979
2980// MarshalJSON is the custom marshaler for ApplicationSecurityGroupListResult.
2981func (asglr ApplicationSecurityGroupListResult) MarshalJSON() ([]byte, error) {
2982	objectMap := make(map[string]interface{})
2983	if asglr.Value != nil {
2984		objectMap["value"] = asglr.Value
2985	}
2986	return json.Marshal(objectMap)
2987}
2988
2989// ApplicationSecurityGroupListResultIterator provides access to a complete listing of
2990// ApplicationSecurityGroup values.
2991type ApplicationSecurityGroupListResultIterator struct {
2992	i    int
2993	page ApplicationSecurityGroupListResultPage
2994}
2995
2996// NextWithContext advances to the next value.  If there was an error making
2997// the request the iterator does not advance and the error is returned.
2998func (iter *ApplicationSecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
2999	if tracing.IsEnabled() {
3000		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupListResultIterator.NextWithContext")
3001		defer func() {
3002			sc := -1
3003			if iter.Response().Response.Response != nil {
3004				sc = iter.Response().Response.Response.StatusCode
3005			}
3006			tracing.EndSpan(ctx, sc, err)
3007		}()
3008	}
3009	iter.i++
3010	if iter.i < len(iter.page.Values()) {
3011		return nil
3012	}
3013	err = iter.page.NextWithContext(ctx)
3014	if err != nil {
3015		iter.i--
3016		return err
3017	}
3018	iter.i = 0
3019	return nil
3020}
3021
3022// Next advances to the next value.  If there was an error making
3023// the request the iterator does not advance and the error is returned.
3024// Deprecated: Use NextWithContext() instead.
3025func (iter *ApplicationSecurityGroupListResultIterator) Next() error {
3026	return iter.NextWithContext(context.Background())
3027}
3028
3029// NotDone returns true if the enumeration should be started or is not yet complete.
3030func (iter ApplicationSecurityGroupListResultIterator) NotDone() bool {
3031	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3032}
3033
3034// Response returns the raw server response from the last page request.
3035func (iter ApplicationSecurityGroupListResultIterator) Response() ApplicationSecurityGroupListResult {
3036	return iter.page.Response()
3037}
3038
3039// Value returns the current value or a zero-initialized value if the
3040// iterator has advanced beyond the end of the collection.
3041func (iter ApplicationSecurityGroupListResultIterator) Value() ApplicationSecurityGroup {
3042	if !iter.page.NotDone() {
3043		return ApplicationSecurityGroup{}
3044	}
3045	return iter.page.Values()[iter.i]
3046}
3047
3048// Creates a new instance of the ApplicationSecurityGroupListResultIterator type.
3049func NewApplicationSecurityGroupListResultIterator(page ApplicationSecurityGroupListResultPage) ApplicationSecurityGroupListResultIterator {
3050	return ApplicationSecurityGroupListResultIterator{page: page}
3051}
3052
3053// IsEmpty returns true if the ListResult contains no values.
3054func (asglr ApplicationSecurityGroupListResult) IsEmpty() bool {
3055	return asglr.Value == nil || len(*asglr.Value) == 0
3056}
3057
3058// hasNextLink returns true if the NextLink is not empty.
3059func (asglr ApplicationSecurityGroupListResult) hasNextLink() bool {
3060	return asglr.NextLink != nil && len(*asglr.NextLink) != 0
3061}
3062
3063// applicationSecurityGroupListResultPreparer prepares a request to retrieve the next set of results.
3064// It returns nil if no more results exist.
3065func (asglr ApplicationSecurityGroupListResult) applicationSecurityGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
3066	if !asglr.hasNextLink() {
3067		return nil, nil
3068	}
3069	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3070		autorest.AsJSON(),
3071		autorest.AsGet(),
3072		autorest.WithBaseURL(to.String(asglr.NextLink)))
3073}
3074
3075// ApplicationSecurityGroupListResultPage contains a page of ApplicationSecurityGroup values.
3076type ApplicationSecurityGroupListResultPage struct {
3077	fn    func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)
3078	asglr ApplicationSecurityGroupListResult
3079}
3080
3081// NextWithContext advances to the next page of values.  If there was an error making
3082// the request the page does not advance and the error is returned.
3083func (page *ApplicationSecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
3084	if tracing.IsEnabled() {
3085		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupListResultPage.NextWithContext")
3086		defer func() {
3087			sc := -1
3088			if page.Response().Response.Response != nil {
3089				sc = page.Response().Response.Response.StatusCode
3090			}
3091			tracing.EndSpan(ctx, sc, err)
3092		}()
3093	}
3094	for {
3095		next, err := page.fn(ctx, page.asglr)
3096		if err != nil {
3097			return err
3098		}
3099		page.asglr = next
3100		if !next.hasNextLink() || !next.IsEmpty() {
3101			break
3102		}
3103	}
3104	return nil
3105}
3106
3107// Next advances to the next page of values.  If there was an error making
3108// the request the page does not advance and the error is returned.
3109// Deprecated: Use NextWithContext() instead.
3110func (page *ApplicationSecurityGroupListResultPage) Next() error {
3111	return page.NextWithContext(context.Background())
3112}
3113
3114// NotDone returns true if the page enumeration should be started or is not yet complete.
3115func (page ApplicationSecurityGroupListResultPage) NotDone() bool {
3116	return !page.asglr.IsEmpty()
3117}
3118
3119// Response returns the raw server response from the last page request.
3120func (page ApplicationSecurityGroupListResultPage) Response() ApplicationSecurityGroupListResult {
3121	return page.asglr
3122}
3123
3124// Values returns the slice of values for the current page or nil if there are no values.
3125func (page ApplicationSecurityGroupListResultPage) Values() []ApplicationSecurityGroup {
3126	if page.asglr.IsEmpty() {
3127		return nil
3128	}
3129	return *page.asglr.Value
3130}
3131
3132// Creates a new instance of the ApplicationSecurityGroupListResultPage type.
3133func NewApplicationSecurityGroupListResultPage(cur ApplicationSecurityGroupListResult, getNextPage func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)) ApplicationSecurityGroupListResultPage {
3134	return ApplicationSecurityGroupListResultPage{
3135		fn:    getNextPage,
3136		asglr: cur,
3137	}
3138}
3139
3140// ApplicationSecurityGroupPropertiesFormat application security group properties.
3141type ApplicationSecurityGroupPropertiesFormat struct {
3142	// 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.
3143	ResourceGUID *string `json:"resourceGuid,omitempty"`
3144	// ProvisioningState - READ-ONLY; The provisioning state of the application security group resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
3145	ProvisioningState *string `json:"provisioningState,omitempty"`
3146}
3147
3148// MarshalJSON is the custom marshaler for ApplicationSecurityGroupPropertiesFormat.
3149func (asgpf ApplicationSecurityGroupPropertiesFormat) MarshalJSON() ([]byte, error) {
3150	objectMap := make(map[string]interface{})
3151	return json.Marshal(objectMap)
3152}
3153
3154// ApplicationSecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
3155// of a long-running operation.
3156type ApplicationSecurityGroupsCreateOrUpdateFuture struct {
3157	azure.FutureAPI
3158	// Result returns the result of the asynchronous operation.
3159	// If the operation has not completed it will return an error.
3160	Result func(ApplicationSecurityGroupsClient) (ApplicationSecurityGroup, error)
3161}
3162
3163// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3164func (future *ApplicationSecurityGroupsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
3165	var azFuture azure.Future
3166	if err := json.Unmarshal(body, &azFuture); err != nil {
3167		return err
3168	}
3169	future.FutureAPI = &azFuture
3170	future.Result = future.result
3171	return nil
3172}
3173
3174// result is the default implementation for ApplicationSecurityGroupsCreateOrUpdateFuture.Result.
3175func (future *ApplicationSecurityGroupsCreateOrUpdateFuture) result(client ApplicationSecurityGroupsClient) (asg ApplicationSecurityGroup, err error) {
3176	var done bool
3177	done, err = future.DoneWithContext(context.Background(), client)
3178	if err != nil {
3179		err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
3180		return
3181	}
3182	if !done {
3183		asg.Response.Response = future.Response()
3184		err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsCreateOrUpdateFuture")
3185		return
3186	}
3187	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3188	if asg.Response.Response, err = future.GetResult(sender); err == nil && asg.Response.Response.StatusCode != http.StatusNoContent {
3189		asg, err = client.CreateOrUpdateResponder(asg.Response.Response)
3190		if err != nil {
3191			err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsCreateOrUpdateFuture", "Result", asg.Response.Response, "Failure responding to request")
3192		}
3193	}
3194	return
3195}
3196
3197// ApplicationSecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a
3198// long-running operation.
3199type ApplicationSecurityGroupsDeleteFuture struct {
3200	azure.FutureAPI
3201	// Result returns the result of the asynchronous operation.
3202	// If the operation has not completed it will return an error.
3203	Result func(ApplicationSecurityGroupsClient) (autorest.Response, error)
3204}
3205
3206// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3207func (future *ApplicationSecurityGroupsDeleteFuture) UnmarshalJSON(body []byte) error {
3208	var azFuture azure.Future
3209	if err := json.Unmarshal(body, &azFuture); err != nil {
3210		return err
3211	}
3212	future.FutureAPI = &azFuture
3213	future.Result = future.result
3214	return nil
3215}
3216
3217// result is the default implementation for ApplicationSecurityGroupsDeleteFuture.Result.
3218func (future *ApplicationSecurityGroupsDeleteFuture) result(client ApplicationSecurityGroupsClient) (ar autorest.Response, err error) {
3219	var done bool
3220	done, err = future.DoneWithContext(context.Background(), client)
3221	if err != nil {
3222		err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
3223		return
3224	}
3225	if !done {
3226		ar.Response = future.Response()
3227		err = azure.NewAsyncOpIncompleteError("network.ApplicationSecurityGroupsDeleteFuture")
3228		return
3229	}
3230	ar.Response = future.Response()
3231	return
3232}
3233
3234// AuthorizationListResult response for ListAuthorizations API service call retrieves all authorizations
3235// that belongs to an ExpressRouteCircuit.
3236type AuthorizationListResult struct {
3237	autorest.Response `json:"-"`
3238	// Value - The authorizations in an ExpressRoute Circuit.
3239	Value *[]ExpressRouteCircuitAuthorization `json:"value,omitempty"`
3240	// NextLink - The URL to get the next set of results.
3241	NextLink *string `json:"nextLink,omitempty"`
3242}
3243
3244// AuthorizationListResultIterator provides access to a complete listing of
3245// ExpressRouteCircuitAuthorization values.
3246type AuthorizationListResultIterator struct {
3247	i    int
3248	page AuthorizationListResultPage
3249}
3250
3251// NextWithContext advances to the next value.  If there was an error making
3252// the request the iterator does not advance and the error is returned.
3253func (iter *AuthorizationListResultIterator) NextWithContext(ctx context.Context) (err error) {
3254	if tracing.IsEnabled() {
3255		ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultIterator.NextWithContext")
3256		defer func() {
3257			sc := -1
3258			if iter.Response().Response.Response != nil {
3259				sc = iter.Response().Response.Response.StatusCode
3260			}
3261			tracing.EndSpan(ctx, sc, err)
3262		}()
3263	}
3264	iter.i++
3265	if iter.i < len(iter.page.Values()) {
3266		return nil
3267	}
3268	err = iter.page.NextWithContext(ctx)
3269	if err != nil {
3270		iter.i--
3271		return err
3272	}
3273	iter.i = 0
3274	return nil
3275}
3276
3277// Next advances to the next value.  If there was an error making
3278// the request the iterator does not advance and the error is returned.
3279// Deprecated: Use NextWithContext() instead.
3280func (iter *AuthorizationListResultIterator) Next() error {
3281	return iter.NextWithContext(context.Background())
3282}
3283
3284// NotDone returns true if the enumeration should be started or is not yet complete.
3285func (iter AuthorizationListResultIterator) NotDone() bool {
3286	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3287}
3288
3289// Response returns the raw server response from the last page request.
3290func (iter AuthorizationListResultIterator) Response() AuthorizationListResult {
3291	return iter.page.Response()
3292}
3293
3294// Value returns the current value or a zero-initialized value if the
3295// iterator has advanced beyond the end of the collection.
3296func (iter AuthorizationListResultIterator) Value() ExpressRouteCircuitAuthorization {
3297	if !iter.page.NotDone() {
3298		return ExpressRouteCircuitAuthorization{}
3299	}
3300	return iter.page.Values()[iter.i]
3301}
3302
3303// Creates a new instance of the AuthorizationListResultIterator type.
3304func NewAuthorizationListResultIterator(page AuthorizationListResultPage) AuthorizationListResultIterator {
3305	return AuthorizationListResultIterator{page: page}
3306}
3307
3308// IsEmpty returns true if the ListResult contains no values.
3309func (alr AuthorizationListResult) IsEmpty() bool {
3310	return alr.Value == nil || len(*alr.Value) == 0
3311}
3312
3313// hasNextLink returns true if the NextLink is not empty.
3314func (alr AuthorizationListResult) hasNextLink() bool {
3315	return alr.NextLink != nil && len(*alr.NextLink) != 0
3316}
3317
3318// authorizationListResultPreparer prepares a request to retrieve the next set of results.
3319// It returns nil if no more results exist.
3320func (alr AuthorizationListResult) authorizationListResultPreparer(ctx context.Context) (*http.Request, error) {
3321	if !alr.hasNextLink() {
3322		return nil, nil
3323	}
3324	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3325		autorest.AsJSON(),
3326		autorest.AsGet(),
3327		autorest.WithBaseURL(to.String(alr.NextLink)))
3328}
3329
3330// AuthorizationListResultPage contains a page of ExpressRouteCircuitAuthorization values.
3331type AuthorizationListResultPage struct {
3332	fn  func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)
3333	alr AuthorizationListResult
3334}
3335
3336// NextWithContext advances to the next page of values.  If there was an error making
3337// the request the page does not advance and the error is returned.
3338func (page *AuthorizationListResultPage) NextWithContext(ctx context.Context) (err error) {
3339	if tracing.IsEnabled() {
3340		ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultPage.NextWithContext")
3341		defer func() {
3342			sc := -1
3343			if page.Response().Response.Response != nil {
3344				sc = page.Response().Response.Response.StatusCode
3345			}
3346			tracing.EndSpan(ctx, sc, err)
3347		}()
3348	}
3349	for {
3350		next, err := page.fn(ctx, page.alr)
3351		if err != nil {
3352			return err
3353		}
3354		page.alr = next
3355		if !next.hasNextLink() || !next.IsEmpty() {
3356			break
3357		}
3358	}
3359	return nil
3360}
3361
3362// Next advances to the next page of values.  If there was an error making
3363// the request the page does not advance and the error is returned.
3364// Deprecated: Use NextWithContext() instead.
3365func (page *AuthorizationListResultPage) Next() error {
3366	return page.NextWithContext(context.Background())
3367}
3368
3369// NotDone returns true if the page enumeration should be started or is not yet complete.
3370func (page AuthorizationListResultPage) NotDone() bool {
3371	return !page.alr.IsEmpty()
3372}
3373
3374// Response returns the raw server response from the last page request.
3375func (page AuthorizationListResultPage) Response() AuthorizationListResult {
3376	return page.alr
3377}
3378
3379// Values returns the slice of values for the current page or nil if there are no values.
3380func (page AuthorizationListResultPage) Values() []ExpressRouteCircuitAuthorization {
3381	if page.alr.IsEmpty() {
3382		return nil
3383	}
3384	return *page.alr.Value
3385}
3386
3387// Creates a new instance of the AuthorizationListResultPage type.
3388func NewAuthorizationListResultPage(cur AuthorizationListResult, getNextPage func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)) AuthorizationListResultPage {
3389	return AuthorizationListResultPage{
3390		fn:  getNextPage,
3391		alr: cur,
3392	}
3393}
3394
3395// AuthorizationPropertiesFormat ...
3396type AuthorizationPropertiesFormat struct {
3397	// AuthorizationKey - The authorization key.
3398	AuthorizationKey *string `json:"authorizationKey,omitempty"`
3399	// AuthorizationUseStatus - AuthorizationUseStatus. Possible values are: 'Available' and 'InUse'. Possible values include: 'Available', 'InUse'
3400	AuthorizationUseStatus AuthorizationUseStatus `json:"authorizationUseStatus,omitempty"`
3401	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
3402	ProvisioningState *string `json:"provisioningState,omitempty"`
3403}
3404
3405// Availability availability of the metric.
3406type Availability struct {
3407	// TimeGrain - The time grain of the availability.
3408	TimeGrain *string `json:"timeGrain,omitempty"`
3409	// Retention - The retention of the availability.
3410	Retention *string `json:"retention,omitempty"`
3411	// BlobDuration - Duration of the availability blob.
3412	BlobDuration *string `json:"blobDuration,omitempty"`
3413}
3414
3415// AvailableDelegation the serviceName of an AvailableDelegation indicates a possible delegation for a
3416// subnet.
3417type AvailableDelegation struct {
3418	// Name - The name of the AvailableDelegation resource.
3419	Name *string `json:"name,omitempty"`
3420	// ID - A unique identifier of the AvailableDelegation resource.
3421	ID *string `json:"id,omitempty"`
3422	// Type - Resource type.
3423	Type *string `json:"type,omitempty"`
3424	// ServiceName - The name of the service and resource
3425	ServiceName *string `json:"serviceName,omitempty"`
3426	// Actions - Describes the actions permitted to the service upon delegation
3427	Actions *[]string `json:"actions,omitempty"`
3428}
3429
3430// AvailableDelegationsResult an array of available delegations.
3431type AvailableDelegationsResult struct {
3432	autorest.Response `json:"-"`
3433	// Value - An array of available delegations.
3434	Value *[]AvailableDelegation `json:"value,omitempty"`
3435	// NextLink - READ-ONLY; The URL to get the next set of results.
3436	NextLink *string `json:"nextLink,omitempty"`
3437}
3438
3439// MarshalJSON is the custom marshaler for AvailableDelegationsResult.
3440func (adr AvailableDelegationsResult) MarshalJSON() ([]byte, error) {
3441	objectMap := make(map[string]interface{})
3442	if adr.Value != nil {
3443		objectMap["value"] = adr.Value
3444	}
3445	return json.Marshal(objectMap)
3446}
3447
3448// AvailableDelegationsResultIterator provides access to a complete listing of AvailableDelegation values.
3449type AvailableDelegationsResultIterator struct {
3450	i    int
3451	page AvailableDelegationsResultPage
3452}
3453
3454// NextWithContext advances to the next value.  If there was an error making
3455// the request the iterator does not advance and the error is returned.
3456func (iter *AvailableDelegationsResultIterator) NextWithContext(ctx context.Context) (err error) {
3457	if tracing.IsEnabled() {
3458		ctx = tracing.StartSpan(ctx, fqdn+"/AvailableDelegationsResultIterator.NextWithContext")
3459		defer func() {
3460			sc := -1
3461			if iter.Response().Response.Response != nil {
3462				sc = iter.Response().Response.Response.StatusCode
3463			}
3464			tracing.EndSpan(ctx, sc, err)
3465		}()
3466	}
3467	iter.i++
3468	if iter.i < len(iter.page.Values()) {
3469		return nil
3470	}
3471	err = iter.page.NextWithContext(ctx)
3472	if err != nil {
3473		iter.i--
3474		return err
3475	}
3476	iter.i = 0
3477	return nil
3478}
3479
3480// Next advances to the next value.  If there was an error making
3481// the request the iterator does not advance and the error is returned.
3482// Deprecated: Use NextWithContext() instead.
3483func (iter *AvailableDelegationsResultIterator) Next() error {
3484	return iter.NextWithContext(context.Background())
3485}
3486
3487// NotDone returns true if the enumeration should be started or is not yet complete.
3488func (iter AvailableDelegationsResultIterator) NotDone() bool {
3489	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3490}
3491
3492// Response returns the raw server response from the last page request.
3493func (iter AvailableDelegationsResultIterator) Response() AvailableDelegationsResult {
3494	return iter.page.Response()
3495}
3496
3497// Value returns the current value or a zero-initialized value if the
3498// iterator has advanced beyond the end of the collection.
3499func (iter AvailableDelegationsResultIterator) Value() AvailableDelegation {
3500	if !iter.page.NotDone() {
3501		return AvailableDelegation{}
3502	}
3503	return iter.page.Values()[iter.i]
3504}
3505
3506// Creates a new instance of the AvailableDelegationsResultIterator type.
3507func NewAvailableDelegationsResultIterator(page AvailableDelegationsResultPage) AvailableDelegationsResultIterator {
3508	return AvailableDelegationsResultIterator{page: page}
3509}
3510
3511// IsEmpty returns true if the ListResult contains no values.
3512func (adr AvailableDelegationsResult) IsEmpty() bool {
3513	return adr.Value == nil || len(*adr.Value) == 0
3514}
3515
3516// hasNextLink returns true if the NextLink is not empty.
3517func (adr AvailableDelegationsResult) hasNextLink() bool {
3518	return adr.NextLink != nil && len(*adr.NextLink) != 0
3519}
3520
3521// availableDelegationsResultPreparer prepares a request to retrieve the next set of results.
3522// It returns nil if no more results exist.
3523func (adr AvailableDelegationsResult) availableDelegationsResultPreparer(ctx context.Context) (*http.Request, error) {
3524	if !adr.hasNextLink() {
3525		return nil, nil
3526	}
3527	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3528		autorest.AsJSON(),
3529		autorest.AsGet(),
3530		autorest.WithBaseURL(to.String(adr.NextLink)))
3531}
3532
3533// AvailableDelegationsResultPage contains a page of AvailableDelegation values.
3534type AvailableDelegationsResultPage struct {
3535	fn  func(context.Context, AvailableDelegationsResult) (AvailableDelegationsResult, error)
3536	adr AvailableDelegationsResult
3537}
3538
3539// NextWithContext advances to the next page of values.  If there was an error making
3540// the request the page does not advance and the error is returned.
3541func (page *AvailableDelegationsResultPage) NextWithContext(ctx context.Context) (err error) {
3542	if tracing.IsEnabled() {
3543		ctx = tracing.StartSpan(ctx, fqdn+"/AvailableDelegationsResultPage.NextWithContext")
3544		defer func() {
3545			sc := -1
3546			if page.Response().Response.Response != nil {
3547				sc = page.Response().Response.Response.StatusCode
3548			}
3549			tracing.EndSpan(ctx, sc, err)
3550		}()
3551	}
3552	for {
3553		next, err := page.fn(ctx, page.adr)
3554		if err != nil {
3555			return err
3556		}
3557		page.adr = next
3558		if !next.hasNextLink() || !next.IsEmpty() {
3559			break
3560		}
3561	}
3562	return nil
3563}
3564
3565// Next advances to the next page of values.  If there was an error making
3566// the request the page does not advance and the error is returned.
3567// Deprecated: Use NextWithContext() instead.
3568func (page *AvailableDelegationsResultPage) Next() error {
3569	return page.NextWithContext(context.Background())
3570}
3571
3572// NotDone returns true if the page enumeration should be started or is not yet complete.
3573func (page AvailableDelegationsResultPage) NotDone() bool {
3574	return !page.adr.IsEmpty()
3575}
3576
3577// Response returns the raw server response from the last page request.
3578func (page AvailableDelegationsResultPage) Response() AvailableDelegationsResult {
3579	return page.adr
3580}
3581
3582// Values returns the slice of values for the current page or nil if there are no values.
3583func (page AvailableDelegationsResultPage) Values() []AvailableDelegation {
3584	if page.adr.IsEmpty() {
3585		return nil
3586	}
3587	return *page.adr.Value
3588}
3589
3590// Creates a new instance of the AvailableDelegationsResultPage type.
3591func NewAvailableDelegationsResultPage(cur AvailableDelegationsResult, getNextPage func(context.Context, AvailableDelegationsResult) (AvailableDelegationsResult, error)) AvailableDelegationsResultPage {
3592	return AvailableDelegationsResultPage{
3593		fn:  getNextPage,
3594		adr: cur,
3595	}
3596}
3597
3598// AvailableProvidersList list of available countries with details.
3599type AvailableProvidersList struct {
3600	autorest.Response `json:"-"`
3601	// Countries - List of available countries.
3602	Countries *[]AvailableProvidersListCountry `json:"countries,omitempty"`
3603}
3604
3605// AvailableProvidersListCity city or town details.
3606type AvailableProvidersListCity struct {
3607	// CityName - The city or town name.
3608	CityName *string `json:"cityName,omitempty"`
3609	// Providers - A list of Internet service providers.
3610	Providers *[]string `json:"providers,omitempty"`
3611}
3612
3613// AvailableProvidersListCountry country details.
3614type AvailableProvidersListCountry struct {
3615	// CountryName - The country name.
3616	CountryName *string `json:"countryName,omitempty"`
3617	// Providers - A list of Internet service providers.
3618	Providers *[]string `json:"providers,omitempty"`
3619	// States - List of available states in the country.
3620	States *[]AvailableProvidersListState `json:"states,omitempty"`
3621}
3622
3623// AvailableProvidersListParameters constraints that determine the list of available Internet service
3624// providers.
3625type AvailableProvidersListParameters struct {
3626	// AzureLocations - A list of Azure regions.
3627	AzureLocations *[]string `json:"azureLocations,omitempty"`
3628	// Country - The country for available providers list.
3629	Country *string `json:"country,omitempty"`
3630	// State - The state for available providers list.
3631	State *string `json:"state,omitempty"`
3632	// City - The city or town for available providers list.
3633	City *string `json:"city,omitempty"`
3634}
3635
3636// AvailableProvidersListState state details.
3637type AvailableProvidersListState struct {
3638	// StateName - The state name.
3639	StateName *string `json:"stateName,omitempty"`
3640	// Providers - A list of Internet service providers.
3641	Providers *[]string `json:"providers,omitempty"`
3642	// Cities - List of available cities or towns in the state.
3643	Cities *[]AvailableProvidersListCity `json:"cities,omitempty"`
3644}
3645
3646// AzureAsyncOperationResult the response body contains the status of the specified asynchronous operation,
3647// indicating whether it has succeeded, is in progress, or has failed. Note that this status is distinct
3648// from the HTTP status code returned for the Get Operation Status operation itself. If the asynchronous
3649// operation succeeded, the response body includes the HTTP status code for the successful request. If the
3650// asynchronous operation failed, the response body includes the HTTP status code for the failed request
3651// and error information regarding the failure.
3652type AzureAsyncOperationResult struct {
3653	// Status - Status of the Azure async operation. Possible values are: 'InProgress', 'Succeeded', and 'Failed'. Possible values include: 'OperationStatusInProgress', 'OperationStatusSucceeded', 'OperationStatusFailed'
3654	Status OperationStatus `json:"status,omitempty"`
3655	Error  *Error          `json:"error,omitempty"`
3656}
3657
3658// AzureFirewall azure Firewall resource
3659type AzureFirewall struct {
3660	autorest.Response              `json:"-"`
3661	*AzureFirewallPropertiesFormat `json:"properties,omitempty"`
3662	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
3663	Etag *string `json:"etag,omitempty"`
3664	// ID - Resource ID.
3665	ID *string `json:"id,omitempty"`
3666	// Name - READ-ONLY; Resource name.
3667	Name *string `json:"name,omitempty"`
3668	// Type - READ-ONLY; Resource type.
3669	Type *string `json:"type,omitempty"`
3670	// Location - Resource location.
3671	Location *string `json:"location,omitempty"`
3672	// Tags - Resource tags.
3673	Tags map[string]*string `json:"tags"`
3674}
3675
3676// MarshalJSON is the custom marshaler for AzureFirewall.
3677func (af AzureFirewall) MarshalJSON() ([]byte, error) {
3678	objectMap := make(map[string]interface{})
3679	if af.AzureFirewallPropertiesFormat != nil {
3680		objectMap["properties"] = af.AzureFirewallPropertiesFormat
3681	}
3682	if af.ID != nil {
3683		objectMap["id"] = af.ID
3684	}
3685	if af.Location != nil {
3686		objectMap["location"] = af.Location
3687	}
3688	if af.Tags != nil {
3689		objectMap["tags"] = af.Tags
3690	}
3691	return json.Marshal(objectMap)
3692}
3693
3694// UnmarshalJSON is the custom unmarshaler for AzureFirewall struct.
3695func (af *AzureFirewall) UnmarshalJSON(body []byte) error {
3696	var m map[string]*json.RawMessage
3697	err := json.Unmarshal(body, &m)
3698	if err != nil {
3699		return err
3700	}
3701	for k, v := range m {
3702		switch k {
3703		case "properties":
3704			if v != nil {
3705				var azureFirewallPropertiesFormat AzureFirewallPropertiesFormat
3706				err = json.Unmarshal(*v, &azureFirewallPropertiesFormat)
3707				if err != nil {
3708					return err
3709				}
3710				af.AzureFirewallPropertiesFormat = &azureFirewallPropertiesFormat
3711			}
3712		case "etag":
3713			if v != nil {
3714				var etag string
3715				err = json.Unmarshal(*v, &etag)
3716				if err != nil {
3717					return err
3718				}
3719				af.Etag = &etag
3720			}
3721		case "id":
3722			if v != nil {
3723				var ID string
3724				err = json.Unmarshal(*v, &ID)
3725				if err != nil {
3726					return err
3727				}
3728				af.ID = &ID
3729			}
3730		case "name":
3731			if v != nil {
3732				var name string
3733				err = json.Unmarshal(*v, &name)
3734				if err != nil {
3735					return err
3736				}
3737				af.Name = &name
3738			}
3739		case "type":
3740			if v != nil {
3741				var typeVar string
3742				err = json.Unmarshal(*v, &typeVar)
3743				if err != nil {
3744					return err
3745				}
3746				af.Type = &typeVar
3747			}
3748		case "location":
3749			if v != nil {
3750				var location string
3751				err = json.Unmarshal(*v, &location)
3752				if err != nil {
3753					return err
3754				}
3755				af.Location = &location
3756			}
3757		case "tags":
3758			if v != nil {
3759				var tags map[string]*string
3760				err = json.Unmarshal(*v, &tags)
3761				if err != nil {
3762					return err
3763				}
3764				af.Tags = tags
3765			}
3766		}
3767	}
3768
3769	return nil
3770}
3771
3772// AzureFirewallApplicationRule properties of an application rule.
3773type AzureFirewallApplicationRule struct {
3774	// Name - Name of the application rule.
3775	Name *string `json:"name,omitempty"`
3776	// Description - Description of the rule.
3777	Description *string `json:"description,omitempty"`
3778	// SourceAddresses - List of source IP addresses for this rule.
3779	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
3780	// Protocols - Array of ApplicationRuleProtocols.
3781	Protocols *[]AzureFirewallApplicationRuleProtocol `json:"protocols,omitempty"`
3782	// TargetFqdns - List of FQDNs for this rule.
3783	TargetFqdns *[]string `json:"targetFqdns,omitempty"`
3784	// FqdnTags - List of FQDN Tags for this rule.
3785	FqdnTags *[]string `json:"fqdnTags,omitempty"`
3786}
3787
3788// AzureFirewallApplicationRuleCollection application rule collection resource
3789type AzureFirewallApplicationRuleCollection struct {
3790	*AzureFirewallApplicationRuleCollectionPropertiesFormat `json:"properties,omitempty"`
3791	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
3792	Name *string `json:"name,omitempty"`
3793	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
3794	Etag *string `json:"etag,omitempty"`
3795	// ID - Resource ID.
3796	ID *string `json:"id,omitempty"`
3797}
3798
3799// MarshalJSON is the custom marshaler for AzureFirewallApplicationRuleCollection.
3800func (afarc AzureFirewallApplicationRuleCollection) MarshalJSON() ([]byte, error) {
3801	objectMap := make(map[string]interface{})
3802	if afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat != nil {
3803		objectMap["properties"] = afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat
3804	}
3805	if afarc.Name != nil {
3806		objectMap["name"] = afarc.Name
3807	}
3808	if afarc.ID != nil {
3809		objectMap["id"] = afarc.ID
3810	}
3811	return json.Marshal(objectMap)
3812}
3813
3814// UnmarshalJSON is the custom unmarshaler for AzureFirewallApplicationRuleCollection struct.
3815func (afarc *AzureFirewallApplicationRuleCollection) UnmarshalJSON(body []byte) error {
3816	var m map[string]*json.RawMessage
3817	err := json.Unmarshal(body, &m)
3818	if err != nil {
3819		return err
3820	}
3821	for k, v := range m {
3822		switch k {
3823		case "properties":
3824			if v != nil {
3825				var azureFirewallApplicationRuleCollectionPropertiesFormat AzureFirewallApplicationRuleCollectionPropertiesFormat
3826				err = json.Unmarshal(*v, &azureFirewallApplicationRuleCollectionPropertiesFormat)
3827				if err != nil {
3828					return err
3829				}
3830				afarc.AzureFirewallApplicationRuleCollectionPropertiesFormat = &azureFirewallApplicationRuleCollectionPropertiesFormat
3831			}
3832		case "name":
3833			if v != nil {
3834				var name string
3835				err = json.Unmarshal(*v, &name)
3836				if err != nil {
3837					return err
3838				}
3839				afarc.Name = &name
3840			}
3841		case "etag":
3842			if v != nil {
3843				var etag string
3844				err = json.Unmarshal(*v, &etag)
3845				if err != nil {
3846					return err
3847				}
3848				afarc.Etag = &etag
3849			}
3850		case "id":
3851			if v != nil {
3852				var ID string
3853				err = json.Unmarshal(*v, &ID)
3854				if err != nil {
3855					return err
3856				}
3857				afarc.ID = &ID
3858			}
3859		}
3860	}
3861
3862	return nil
3863}
3864
3865// AzureFirewallApplicationRuleCollectionPropertiesFormat properties of the application rule collection.
3866type AzureFirewallApplicationRuleCollectionPropertiesFormat struct {
3867	// Priority - Priority of the application rule collection resource.
3868	Priority *int32 `json:"priority,omitempty"`
3869	// Action - The action type of a rule collection
3870	Action *AzureFirewallRCAction `json:"action,omitempty"`
3871	// Rules - Collection of rules used by a application rule collection.
3872	Rules *[]AzureFirewallApplicationRule `json:"rules,omitempty"`
3873	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
3874	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
3875}
3876
3877// AzureFirewallApplicationRuleProtocol properties of the application rule protocol.
3878type AzureFirewallApplicationRuleProtocol struct {
3879	// ProtocolType - Protocol type. Possible values include: 'AzureFirewallApplicationRuleProtocolTypeHTTP', 'AzureFirewallApplicationRuleProtocolTypeHTTPS'
3880	ProtocolType AzureFirewallApplicationRuleProtocolType `json:"protocolType,omitempty"`
3881	// Port - Port number for the protocol, cannot be greater than 64000. This field is optional.
3882	Port *int32 `json:"port,omitempty"`
3883}
3884
3885// AzureFirewallFqdnTag azure Firewall FQDN Tag Resource
3886type AzureFirewallFqdnTag struct {
3887	*AzureFirewallFqdnTagPropertiesFormat `json:"properties,omitempty"`
3888	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
3889	Etag *string `json:"etag,omitempty"`
3890	// ID - Resource ID.
3891	ID *string `json:"id,omitempty"`
3892	// Name - READ-ONLY; Resource name.
3893	Name *string `json:"name,omitempty"`
3894	// Type - READ-ONLY; Resource type.
3895	Type *string `json:"type,omitempty"`
3896	// Location - Resource location.
3897	Location *string `json:"location,omitempty"`
3898	// Tags - Resource tags.
3899	Tags map[string]*string `json:"tags"`
3900}
3901
3902// MarshalJSON is the custom marshaler for AzureFirewallFqdnTag.
3903func (afft AzureFirewallFqdnTag) MarshalJSON() ([]byte, error) {
3904	objectMap := make(map[string]interface{})
3905	if afft.AzureFirewallFqdnTagPropertiesFormat != nil {
3906		objectMap["properties"] = afft.AzureFirewallFqdnTagPropertiesFormat
3907	}
3908	if afft.ID != nil {
3909		objectMap["id"] = afft.ID
3910	}
3911	if afft.Location != nil {
3912		objectMap["location"] = afft.Location
3913	}
3914	if afft.Tags != nil {
3915		objectMap["tags"] = afft.Tags
3916	}
3917	return json.Marshal(objectMap)
3918}
3919
3920// UnmarshalJSON is the custom unmarshaler for AzureFirewallFqdnTag struct.
3921func (afft *AzureFirewallFqdnTag) UnmarshalJSON(body []byte) error {
3922	var m map[string]*json.RawMessage
3923	err := json.Unmarshal(body, &m)
3924	if err != nil {
3925		return err
3926	}
3927	for k, v := range m {
3928		switch k {
3929		case "properties":
3930			if v != nil {
3931				var azureFirewallFqdnTagPropertiesFormat AzureFirewallFqdnTagPropertiesFormat
3932				err = json.Unmarshal(*v, &azureFirewallFqdnTagPropertiesFormat)
3933				if err != nil {
3934					return err
3935				}
3936				afft.AzureFirewallFqdnTagPropertiesFormat = &azureFirewallFqdnTagPropertiesFormat
3937			}
3938		case "etag":
3939			if v != nil {
3940				var etag string
3941				err = json.Unmarshal(*v, &etag)
3942				if err != nil {
3943					return err
3944				}
3945				afft.Etag = &etag
3946			}
3947		case "id":
3948			if v != nil {
3949				var ID string
3950				err = json.Unmarshal(*v, &ID)
3951				if err != nil {
3952					return err
3953				}
3954				afft.ID = &ID
3955			}
3956		case "name":
3957			if v != nil {
3958				var name string
3959				err = json.Unmarshal(*v, &name)
3960				if err != nil {
3961					return err
3962				}
3963				afft.Name = &name
3964			}
3965		case "type":
3966			if v != nil {
3967				var typeVar string
3968				err = json.Unmarshal(*v, &typeVar)
3969				if err != nil {
3970					return err
3971				}
3972				afft.Type = &typeVar
3973			}
3974		case "location":
3975			if v != nil {
3976				var location string
3977				err = json.Unmarshal(*v, &location)
3978				if err != nil {
3979					return err
3980				}
3981				afft.Location = &location
3982			}
3983		case "tags":
3984			if v != nil {
3985				var tags map[string]*string
3986				err = json.Unmarshal(*v, &tags)
3987				if err != nil {
3988					return err
3989				}
3990				afft.Tags = tags
3991			}
3992		}
3993	}
3994
3995	return nil
3996}
3997
3998// AzureFirewallFqdnTagListResult response for ListAzureFirewallFqdnTags API service call.
3999type AzureFirewallFqdnTagListResult struct {
4000	autorest.Response `json:"-"`
4001	// Value - List of Azure Firewall FQDN Tags in a resource group.
4002	Value *[]AzureFirewallFqdnTag `json:"value,omitempty"`
4003	// NextLink - URL to get the next set of results.
4004	NextLink *string `json:"nextLink,omitempty"`
4005}
4006
4007// AzureFirewallFqdnTagListResultIterator provides access to a complete listing of AzureFirewallFqdnTag
4008// values.
4009type AzureFirewallFqdnTagListResultIterator struct {
4010	i    int
4011	page AzureFirewallFqdnTagListResultPage
4012}
4013
4014// NextWithContext advances to the next value.  If there was an error making
4015// the request the iterator does not advance and the error is returned.
4016func (iter *AzureFirewallFqdnTagListResultIterator) NextWithContext(ctx context.Context) (err error) {
4017	if tracing.IsEnabled() {
4018		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallFqdnTagListResultIterator.NextWithContext")
4019		defer func() {
4020			sc := -1
4021			if iter.Response().Response.Response != nil {
4022				sc = iter.Response().Response.Response.StatusCode
4023			}
4024			tracing.EndSpan(ctx, sc, err)
4025		}()
4026	}
4027	iter.i++
4028	if iter.i < len(iter.page.Values()) {
4029		return nil
4030	}
4031	err = iter.page.NextWithContext(ctx)
4032	if err != nil {
4033		iter.i--
4034		return err
4035	}
4036	iter.i = 0
4037	return nil
4038}
4039
4040// Next advances to the next value.  If there was an error making
4041// the request the iterator does not advance and the error is returned.
4042// Deprecated: Use NextWithContext() instead.
4043func (iter *AzureFirewallFqdnTagListResultIterator) Next() error {
4044	return iter.NextWithContext(context.Background())
4045}
4046
4047// NotDone returns true if the enumeration should be started or is not yet complete.
4048func (iter AzureFirewallFqdnTagListResultIterator) NotDone() bool {
4049	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4050}
4051
4052// Response returns the raw server response from the last page request.
4053func (iter AzureFirewallFqdnTagListResultIterator) Response() AzureFirewallFqdnTagListResult {
4054	return iter.page.Response()
4055}
4056
4057// Value returns the current value or a zero-initialized value if the
4058// iterator has advanced beyond the end of the collection.
4059func (iter AzureFirewallFqdnTagListResultIterator) Value() AzureFirewallFqdnTag {
4060	if !iter.page.NotDone() {
4061		return AzureFirewallFqdnTag{}
4062	}
4063	return iter.page.Values()[iter.i]
4064}
4065
4066// Creates a new instance of the AzureFirewallFqdnTagListResultIterator type.
4067func NewAzureFirewallFqdnTagListResultIterator(page AzureFirewallFqdnTagListResultPage) AzureFirewallFqdnTagListResultIterator {
4068	return AzureFirewallFqdnTagListResultIterator{page: page}
4069}
4070
4071// IsEmpty returns true if the ListResult contains no values.
4072func (afftlr AzureFirewallFqdnTagListResult) IsEmpty() bool {
4073	return afftlr.Value == nil || len(*afftlr.Value) == 0
4074}
4075
4076// hasNextLink returns true if the NextLink is not empty.
4077func (afftlr AzureFirewallFqdnTagListResult) hasNextLink() bool {
4078	return afftlr.NextLink != nil && len(*afftlr.NextLink) != 0
4079}
4080
4081// azureFirewallFqdnTagListResultPreparer prepares a request to retrieve the next set of results.
4082// It returns nil if no more results exist.
4083func (afftlr AzureFirewallFqdnTagListResult) azureFirewallFqdnTagListResultPreparer(ctx context.Context) (*http.Request, error) {
4084	if !afftlr.hasNextLink() {
4085		return nil, nil
4086	}
4087	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4088		autorest.AsJSON(),
4089		autorest.AsGet(),
4090		autorest.WithBaseURL(to.String(afftlr.NextLink)))
4091}
4092
4093// AzureFirewallFqdnTagListResultPage contains a page of AzureFirewallFqdnTag values.
4094type AzureFirewallFqdnTagListResultPage struct {
4095	fn     func(context.Context, AzureFirewallFqdnTagListResult) (AzureFirewallFqdnTagListResult, error)
4096	afftlr AzureFirewallFqdnTagListResult
4097}
4098
4099// NextWithContext advances to the next page of values.  If there was an error making
4100// the request the page does not advance and the error is returned.
4101func (page *AzureFirewallFqdnTagListResultPage) NextWithContext(ctx context.Context) (err error) {
4102	if tracing.IsEnabled() {
4103		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallFqdnTagListResultPage.NextWithContext")
4104		defer func() {
4105			sc := -1
4106			if page.Response().Response.Response != nil {
4107				sc = page.Response().Response.Response.StatusCode
4108			}
4109			tracing.EndSpan(ctx, sc, err)
4110		}()
4111	}
4112	for {
4113		next, err := page.fn(ctx, page.afftlr)
4114		if err != nil {
4115			return err
4116		}
4117		page.afftlr = next
4118		if !next.hasNextLink() || !next.IsEmpty() {
4119			break
4120		}
4121	}
4122	return nil
4123}
4124
4125// Next advances to the next page of values.  If there was an error making
4126// the request the page does not advance and the error is returned.
4127// Deprecated: Use NextWithContext() instead.
4128func (page *AzureFirewallFqdnTagListResultPage) Next() error {
4129	return page.NextWithContext(context.Background())
4130}
4131
4132// NotDone returns true if the page enumeration should be started or is not yet complete.
4133func (page AzureFirewallFqdnTagListResultPage) NotDone() bool {
4134	return !page.afftlr.IsEmpty()
4135}
4136
4137// Response returns the raw server response from the last page request.
4138func (page AzureFirewallFqdnTagListResultPage) Response() AzureFirewallFqdnTagListResult {
4139	return page.afftlr
4140}
4141
4142// Values returns the slice of values for the current page or nil if there are no values.
4143func (page AzureFirewallFqdnTagListResultPage) Values() []AzureFirewallFqdnTag {
4144	if page.afftlr.IsEmpty() {
4145		return nil
4146	}
4147	return *page.afftlr.Value
4148}
4149
4150// Creates a new instance of the AzureFirewallFqdnTagListResultPage type.
4151func NewAzureFirewallFqdnTagListResultPage(cur AzureFirewallFqdnTagListResult, getNextPage func(context.Context, AzureFirewallFqdnTagListResult) (AzureFirewallFqdnTagListResult, error)) AzureFirewallFqdnTagListResultPage {
4152	return AzureFirewallFqdnTagListResultPage{
4153		fn:     getNextPage,
4154		afftlr: cur,
4155	}
4156}
4157
4158// AzureFirewallFqdnTagPropertiesFormat azure Firewall FQDN Tag Properties
4159type AzureFirewallFqdnTagPropertiesFormat struct {
4160	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
4161	ProvisioningState *string `json:"provisioningState,omitempty"`
4162	// FqdnTagName - READ-ONLY; The name of this FQDN Tag.
4163	FqdnTagName *string `json:"fqdnTagName,omitempty"`
4164}
4165
4166// MarshalJSON is the custom marshaler for AzureFirewallFqdnTagPropertiesFormat.
4167func (afftpf AzureFirewallFqdnTagPropertiesFormat) MarshalJSON() ([]byte, error) {
4168	objectMap := make(map[string]interface{})
4169	return json.Marshal(objectMap)
4170}
4171
4172// AzureFirewallIPConfiguration IP configuration of an Azure Firewall.
4173type AzureFirewallIPConfiguration struct {
4174	*AzureFirewallIPConfigurationPropertiesFormat `json:"properties,omitempty"`
4175	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
4176	Name *string `json:"name,omitempty"`
4177	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
4178	Etag *string `json:"etag,omitempty"`
4179	// ID - Resource ID.
4180	ID *string `json:"id,omitempty"`
4181}
4182
4183// MarshalJSON is the custom marshaler for AzureFirewallIPConfiguration.
4184func (afic AzureFirewallIPConfiguration) MarshalJSON() ([]byte, error) {
4185	objectMap := make(map[string]interface{})
4186	if afic.AzureFirewallIPConfigurationPropertiesFormat != nil {
4187		objectMap["properties"] = afic.AzureFirewallIPConfigurationPropertiesFormat
4188	}
4189	if afic.Name != nil {
4190		objectMap["name"] = afic.Name
4191	}
4192	if afic.ID != nil {
4193		objectMap["id"] = afic.ID
4194	}
4195	return json.Marshal(objectMap)
4196}
4197
4198// UnmarshalJSON is the custom unmarshaler for AzureFirewallIPConfiguration struct.
4199func (afic *AzureFirewallIPConfiguration) UnmarshalJSON(body []byte) error {
4200	var m map[string]*json.RawMessage
4201	err := json.Unmarshal(body, &m)
4202	if err != nil {
4203		return err
4204	}
4205	for k, v := range m {
4206		switch k {
4207		case "properties":
4208			if v != nil {
4209				var azureFirewallIPConfigurationPropertiesFormat AzureFirewallIPConfigurationPropertiesFormat
4210				err = json.Unmarshal(*v, &azureFirewallIPConfigurationPropertiesFormat)
4211				if err != nil {
4212					return err
4213				}
4214				afic.AzureFirewallIPConfigurationPropertiesFormat = &azureFirewallIPConfigurationPropertiesFormat
4215			}
4216		case "name":
4217			if v != nil {
4218				var name string
4219				err = json.Unmarshal(*v, &name)
4220				if err != nil {
4221					return err
4222				}
4223				afic.Name = &name
4224			}
4225		case "etag":
4226			if v != nil {
4227				var etag string
4228				err = json.Unmarshal(*v, &etag)
4229				if err != nil {
4230					return err
4231				}
4232				afic.Etag = &etag
4233			}
4234		case "id":
4235			if v != nil {
4236				var ID string
4237				err = json.Unmarshal(*v, &ID)
4238				if err != nil {
4239					return err
4240				}
4241				afic.ID = &ID
4242			}
4243		}
4244	}
4245
4246	return nil
4247}
4248
4249// AzureFirewallIPConfigurationPropertiesFormat properties of IP configuration of an Azure Firewall.
4250type AzureFirewallIPConfigurationPropertiesFormat struct {
4251	// PrivateIPAddress - The Firewall Internal Load Balancer IP to be used as the next hop in User Defined Routes.
4252	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
4253	// Subnet - Reference of the subnet resource. This resource must be named 'AzureFirewallSubnet'.
4254	Subnet *SubResource `json:"subnet,omitempty"`
4255	// PublicIPAddress - Reference of the PublicIP resource. This field is a mandatory input if subnet is not null.
4256	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
4257	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
4258	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
4259}
4260
4261// AzureFirewallListResult response for ListAzureFirewalls API service call.
4262type AzureFirewallListResult struct {
4263	autorest.Response `json:"-"`
4264	// Value - List of Azure Firewalls in a resource group.
4265	Value *[]AzureFirewall `json:"value,omitempty"`
4266	// NextLink - URL to get the next set of results.
4267	NextLink *string `json:"nextLink,omitempty"`
4268}
4269
4270// AzureFirewallListResultIterator provides access to a complete listing of AzureFirewall values.
4271type AzureFirewallListResultIterator struct {
4272	i    int
4273	page AzureFirewallListResultPage
4274}
4275
4276// NextWithContext advances to the next value.  If there was an error making
4277// the request the iterator does not advance and the error is returned.
4278func (iter *AzureFirewallListResultIterator) NextWithContext(ctx context.Context) (err error) {
4279	if tracing.IsEnabled() {
4280		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallListResultIterator.NextWithContext")
4281		defer func() {
4282			sc := -1
4283			if iter.Response().Response.Response != nil {
4284				sc = iter.Response().Response.Response.StatusCode
4285			}
4286			tracing.EndSpan(ctx, sc, err)
4287		}()
4288	}
4289	iter.i++
4290	if iter.i < len(iter.page.Values()) {
4291		return nil
4292	}
4293	err = iter.page.NextWithContext(ctx)
4294	if err != nil {
4295		iter.i--
4296		return err
4297	}
4298	iter.i = 0
4299	return nil
4300}
4301
4302// Next advances to the next value.  If there was an error making
4303// the request the iterator does not advance and the error is returned.
4304// Deprecated: Use NextWithContext() instead.
4305func (iter *AzureFirewallListResultIterator) Next() error {
4306	return iter.NextWithContext(context.Background())
4307}
4308
4309// NotDone returns true if the enumeration should be started or is not yet complete.
4310func (iter AzureFirewallListResultIterator) NotDone() bool {
4311	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4312}
4313
4314// Response returns the raw server response from the last page request.
4315func (iter AzureFirewallListResultIterator) Response() AzureFirewallListResult {
4316	return iter.page.Response()
4317}
4318
4319// Value returns the current value or a zero-initialized value if the
4320// iterator has advanced beyond the end of the collection.
4321func (iter AzureFirewallListResultIterator) Value() AzureFirewall {
4322	if !iter.page.NotDone() {
4323		return AzureFirewall{}
4324	}
4325	return iter.page.Values()[iter.i]
4326}
4327
4328// Creates a new instance of the AzureFirewallListResultIterator type.
4329func NewAzureFirewallListResultIterator(page AzureFirewallListResultPage) AzureFirewallListResultIterator {
4330	return AzureFirewallListResultIterator{page: page}
4331}
4332
4333// IsEmpty returns true if the ListResult contains no values.
4334func (aflr AzureFirewallListResult) IsEmpty() bool {
4335	return aflr.Value == nil || len(*aflr.Value) == 0
4336}
4337
4338// hasNextLink returns true if the NextLink is not empty.
4339func (aflr AzureFirewallListResult) hasNextLink() bool {
4340	return aflr.NextLink != nil && len(*aflr.NextLink) != 0
4341}
4342
4343// azureFirewallListResultPreparer prepares a request to retrieve the next set of results.
4344// It returns nil if no more results exist.
4345func (aflr AzureFirewallListResult) azureFirewallListResultPreparer(ctx context.Context) (*http.Request, error) {
4346	if !aflr.hasNextLink() {
4347		return nil, nil
4348	}
4349	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4350		autorest.AsJSON(),
4351		autorest.AsGet(),
4352		autorest.WithBaseURL(to.String(aflr.NextLink)))
4353}
4354
4355// AzureFirewallListResultPage contains a page of AzureFirewall values.
4356type AzureFirewallListResultPage struct {
4357	fn   func(context.Context, AzureFirewallListResult) (AzureFirewallListResult, error)
4358	aflr AzureFirewallListResult
4359}
4360
4361// NextWithContext advances to the next page of values.  If there was an error making
4362// the request the page does not advance and the error is returned.
4363func (page *AzureFirewallListResultPage) NextWithContext(ctx context.Context) (err error) {
4364	if tracing.IsEnabled() {
4365		ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallListResultPage.NextWithContext")
4366		defer func() {
4367			sc := -1
4368			if page.Response().Response.Response != nil {
4369				sc = page.Response().Response.Response.StatusCode
4370			}
4371			tracing.EndSpan(ctx, sc, err)
4372		}()
4373	}
4374	for {
4375		next, err := page.fn(ctx, page.aflr)
4376		if err != nil {
4377			return err
4378		}
4379		page.aflr = next
4380		if !next.hasNextLink() || !next.IsEmpty() {
4381			break
4382		}
4383	}
4384	return nil
4385}
4386
4387// Next advances to the next page of values.  If there was an error making
4388// the request the page does not advance and the error is returned.
4389// Deprecated: Use NextWithContext() instead.
4390func (page *AzureFirewallListResultPage) Next() error {
4391	return page.NextWithContext(context.Background())
4392}
4393
4394// NotDone returns true if the page enumeration should be started or is not yet complete.
4395func (page AzureFirewallListResultPage) NotDone() bool {
4396	return !page.aflr.IsEmpty()
4397}
4398
4399// Response returns the raw server response from the last page request.
4400func (page AzureFirewallListResultPage) Response() AzureFirewallListResult {
4401	return page.aflr
4402}
4403
4404// Values returns the slice of values for the current page or nil if there are no values.
4405func (page AzureFirewallListResultPage) Values() []AzureFirewall {
4406	if page.aflr.IsEmpty() {
4407		return nil
4408	}
4409	return *page.aflr.Value
4410}
4411
4412// Creates a new instance of the AzureFirewallListResultPage type.
4413func NewAzureFirewallListResultPage(cur AzureFirewallListResult, getNextPage func(context.Context, AzureFirewallListResult) (AzureFirewallListResult, error)) AzureFirewallListResultPage {
4414	return AzureFirewallListResultPage{
4415		fn:   getNextPage,
4416		aflr: cur,
4417	}
4418}
4419
4420// AzureFirewallNatRCAction azureFirewall NAT Rule Collection Action.
4421type AzureFirewallNatRCAction struct {
4422	// Type - The type of action. Possible values include: 'Snat', 'Dnat'
4423	Type AzureFirewallNatRCActionType `json:"type,omitempty"`
4424}
4425
4426// AzureFirewallNatRule properties of a NAT rule.
4427type AzureFirewallNatRule struct {
4428	// Name - Name of the NAT rule.
4429	Name *string `json:"name,omitempty"`
4430	// Description - Description of the rule.
4431	Description *string `json:"description,omitempty"`
4432	// SourceAddresses - List of source IP addresses for this rule.
4433	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
4434	// DestinationAddresses - List of destination IP addresses for this rule.
4435	DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
4436	// DestinationPorts - List of destination ports.
4437	DestinationPorts *[]string `json:"destinationPorts,omitempty"`
4438	// Protocols - Array of AzureFirewallNetworkRuleProtocols applicable to this NAT rule.
4439	Protocols *[]AzureFirewallNetworkRuleProtocol `json:"protocols,omitempty"`
4440	// TranslatedAddress - The translated address for this NAT rule.
4441	TranslatedAddress *string `json:"translatedAddress,omitempty"`
4442	// TranslatedPort - The translated port for this NAT rule.
4443	TranslatedPort *string `json:"translatedPort,omitempty"`
4444}
4445
4446// AzureFirewallNatRuleCollection NAT rule collection resource
4447type AzureFirewallNatRuleCollection struct {
4448	*AzureFirewallNatRuleCollectionProperties `json:"properties,omitempty"`
4449	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
4450	Name *string `json:"name,omitempty"`
4451	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
4452	Etag *string `json:"etag,omitempty"`
4453	// ID - Resource ID.
4454	ID *string `json:"id,omitempty"`
4455}
4456
4457// MarshalJSON is the custom marshaler for AzureFirewallNatRuleCollection.
4458func (afnrc AzureFirewallNatRuleCollection) MarshalJSON() ([]byte, error) {
4459	objectMap := make(map[string]interface{})
4460	if afnrc.AzureFirewallNatRuleCollectionProperties != nil {
4461		objectMap["properties"] = afnrc.AzureFirewallNatRuleCollectionProperties
4462	}
4463	if afnrc.Name != nil {
4464		objectMap["name"] = afnrc.Name
4465	}
4466	if afnrc.ID != nil {
4467		objectMap["id"] = afnrc.ID
4468	}
4469	return json.Marshal(objectMap)
4470}
4471
4472// UnmarshalJSON is the custom unmarshaler for AzureFirewallNatRuleCollection struct.
4473func (afnrc *AzureFirewallNatRuleCollection) UnmarshalJSON(body []byte) error {
4474	var m map[string]*json.RawMessage
4475	err := json.Unmarshal(body, &m)
4476	if err != nil {
4477		return err
4478	}
4479	for k, v := range m {
4480		switch k {
4481		case "properties":
4482			if v != nil {
4483				var azureFirewallNatRuleCollectionProperties AzureFirewallNatRuleCollectionProperties
4484				err = json.Unmarshal(*v, &azureFirewallNatRuleCollectionProperties)
4485				if err != nil {
4486					return err
4487				}
4488				afnrc.AzureFirewallNatRuleCollectionProperties = &azureFirewallNatRuleCollectionProperties
4489			}
4490		case "name":
4491			if v != nil {
4492				var name string
4493				err = json.Unmarshal(*v, &name)
4494				if err != nil {
4495					return err
4496				}
4497				afnrc.Name = &name
4498			}
4499		case "etag":
4500			if v != nil {
4501				var etag string
4502				err = json.Unmarshal(*v, &etag)
4503				if err != nil {
4504					return err
4505				}
4506				afnrc.Etag = &etag
4507			}
4508		case "id":
4509			if v != nil {
4510				var ID string
4511				err = json.Unmarshal(*v, &ID)
4512				if err != nil {
4513					return err
4514				}
4515				afnrc.ID = &ID
4516			}
4517		}
4518	}
4519
4520	return nil
4521}
4522
4523// AzureFirewallNatRuleCollectionProperties properties of the NAT rule collection.
4524type AzureFirewallNatRuleCollectionProperties struct {
4525	// Priority - Priority of the NAT rule collection resource.
4526	Priority *int32 `json:"priority,omitempty"`
4527	// Action - The action type of a NAT rule collection
4528	Action *AzureFirewallNatRCAction `json:"action,omitempty"`
4529	// Rules - Collection of rules used by a NAT rule collection.
4530	Rules *[]AzureFirewallNatRule `json:"rules,omitempty"`
4531	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
4532	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
4533}
4534
4535// AzureFirewallNetworkRule properties of the network rule.
4536type AzureFirewallNetworkRule struct {
4537	// Name - Name of the network rule.
4538	Name *string `json:"name,omitempty"`
4539	// Description - Description of the rule.
4540	Description *string `json:"description,omitempty"`
4541	// Protocols - Array of AzureFirewallNetworkRuleProtocols.
4542	Protocols *[]AzureFirewallNetworkRuleProtocol `json:"protocols,omitempty"`
4543	// SourceAddresses - List of source IP addresses for this rule.
4544	SourceAddresses *[]string `json:"sourceAddresses,omitempty"`
4545	// DestinationAddresses - List of destination IP addresses.
4546	DestinationAddresses *[]string `json:"destinationAddresses,omitempty"`
4547	// DestinationPorts - List of destination ports.
4548	DestinationPorts *[]string `json:"destinationPorts,omitempty"`
4549}
4550
4551// AzureFirewallNetworkRuleCollection network rule collection resource
4552type AzureFirewallNetworkRuleCollection struct {
4553	*AzureFirewallNetworkRuleCollectionPropertiesFormat `json:"properties,omitempty"`
4554	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
4555	Name *string `json:"name,omitempty"`
4556	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
4557	Etag *string `json:"etag,omitempty"`
4558	// ID - Resource ID.
4559	ID *string `json:"id,omitempty"`
4560}
4561
4562// MarshalJSON is the custom marshaler for AzureFirewallNetworkRuleCollection.
4563func (afnrc AzureFirewallNetworkRuleCollection) MarshalJSON() ([]byte, error) {
4564	objectMap := make(map[string]interface{})
4565	if afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat != nil {
4566		objectMap["properties"] = afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat
4567	}
4568	if afnrc.Name != nil {
4569		objectMap["name"] = afnrc.Name
4570	}
4571	if afnrc.ID != nil {
4572		objectMap["id"] = afnrc.ID
4573	}
4574	return json.Marshal(objectMap)
4575}
4576
4577// UnmarshalJSON is the custom unmarshaler for AzureFirewallNetworkRuleCollection struct.
4578func (afnrc *AzureFirewallNetworkRuleCollection) UnmarshalJSON(body []byte) error {
4579	var m map[string]*json.RawMessage
4580	err := json.Unmarshal(body, &m)
4581	if err != nil {
4582		return err
4583	}
4584	for k, v := range m {
4585		switch k {
4586		case "properties":
4587			if v != nil {
4588				var azureFirewallNetworkRuleCollectionPropertiesFormat AzureFirewallNetworkRuleCollectionPropertiesFormat
4589				err = json.Unmarshal(*v, &azureFirewallNetworkRuleCollectionPropertiesFormat)
4590				if err != nil {
4591					return err
4592				}
4593				afnrc.AzureFirewallNetworkRuleCollectionPropertiesFormat = &azureFirewallNetworkRuleCollectionPropertiesFormat
4594			}
4595		case "name":
4596			if v != nil {
4597				var name string
4598				err = json.Unmarshal(*v, &name)
4599				if err != nil {
4600					return err
4601				}
4602				afnrc.Name = &name
4603			}
4604		case "etag":
4605			if v != nil {
4606				var etag string
4607				err = json.Unmarshal(*v, &etag)
4608				if err != nil {
4609					return err
4610				}
4611				afnrc.Etag = &etag
4612			}
4613		case "id":
4614			if v != nil {
4615				var ID string
4616				err = json.Unmarshal(*v, &ID)
4617				if err != nil {
4618					return err
4619				}
4620				afnrc.ID = &ID
4621			}
4622		}
4623	}
4624
4625	return nil
4626}
4627
4628// AzureFirewallNetworkRuleCollectionPropertiesFormat properties of the network rule collection.
4629type AzureFirewallNetworkRuleCollectionPropertiesFormat struct {
4630	// Priority - Priority of the network rule collection resource.
4631	Priority *int32 `json:"priority,omitempty"`
4632	// Action - The action type of a rule collection
4633	Action *AzureFirewallRCAction `json:"action,omitempty"`
4634	// Rules - Collection of rules used by a network rule collection.
4635	Rules *[]AzureFirewallNetworkRule `json:"rules,omitempty"`
4636	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
4637	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
4638}
4639
4640// AzureFirewallPropertiesFormat properties of the Azure Firewall.
4641type AzureFirewallPropertiesFormat struct {
4642	// ApplicationRuleCollections - Collection of application rule collections used by Azure Firewall.
4643	ApplicationRuleCollections *[]AzureFirewallApplicationRuleCollection `json:"applicationRuleCollections,omitempty"`
4644	// NatRuleCollections - Collection of NAT rule collections used by Azure Firewall.
4645	NatRuleCollections *[]AzureFirewallNatRuleCollection `json:"natRuleCollections,omitempty"`
4646	// NetworkRuleCollections - Collection of network rule collections used by Azure Firewall.
4647	NetworkRuleCollections *[]AzureFirewallNetworkRuleCollection `json:"networkRuleCollections,omitempty"`
4648	// IPConfigurations - IP configuration of the Azure Firewall resource.
4649	IPConfigurations *[]AzureFirewallIPConfiguration `json:"ipConfigurations,omitempty"`
4650	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
4651	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
4652}
4653
4654// AzureFirewallRCAction properties of the AzureFirewallRCAction.
4655type AzureFirewallRCAction struct {
4656	// Type - The type of action. Possible values include: 'AzureFirewallRCActionTypeAllow', 'AzureFirewallRCActionTypeDeny'
4657	Type AzureFirewallRCActionType `json:"type,omitempty"`
4658}
4659
4660// AzureFirewallsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
4661// long-running operation.
4662type AzureFirewallsCreateOrUpdateFuture struct {
4663	azure.FutureAPI
4664	// Result returns the result of the asynchronous operation.
4665	// If the operation has not completed it will return an error.
4666	Result func(AzureFirewallsClient) (AzureFirewall, error)
4667}
4668
4669// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4670func (future *AzureFirewallsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
4671	var azFuture azure.Future
4672	if err := json.Unmarshal(body, &azFuture); err != nil {
4673		return err
4674	}
4675	future.FutureAPI = &azFuture
4676	future.Result = future.result
4677	return nil
4678}
4679
4680// result is the default implementation for AzureFirewallsCreateOrUpdateFuture.Result.
4681func (future *AzureFirewallsCreateOrUpdateFuture) result(client AzureFirewallsClient) (af AzureFirewall, err error) {
4682	var done bool
4683	done, err = future.DoneWithContext(context.Background(), client)
4684	if err != nil {
4685		err = autorest.NewErrorWithError(err, "network.AzureFirewallsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
4686		return
4687	}
4688	if !done {
4689		af.Response.Response = future.Response()
4690		err = azure.NewAsyncOpIncompleteError("network.AzureFirewallsCreateOrUpdateFuture")
4691		return
4692	}
4693	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
4694	if af.Response.Response, err = future.GetResult(sender); err == nil && af.Response.Response.StatusCode != http.StatusNoContent {
4695		af, err = client.CreateOrUpdateResponder(af.Response.Response)
4696		if err != nil {
4697			err = autorest.NewErrorWithError(err, "network.AzureFirewallsCreateOrUpdateFuture", "Result", af.Response.Response, "Failure responding to request")
4698		}
4699	}
4700	return
4701}
4702
4703// AzureFirewallsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
4704// operation.
4705type AzureFirewallsDeleteFuture struct {
4706	azure.FutureAPI
4707	// Result returns the result of the asynchronous operation.
4708	// If the operation has not completed it will return an error.
4709	Result func(AzureFirewallsClient) (autorest.Response, error)
4710}
4711
4712// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4713func (future *AzureFirewallsDeleteFuture) UnmarshalJSON(body []byte) error {
4714	var azFuture azure.Future
4715	if err := json.Unmarshal(body, &azFuture); err != nil {
4716		return err
4717	}
4718	future.FutureAPI = &azFuture
4719	future.Result = future.result
4720	return nil
4721}
4722
4723// result is the default implementation for AzureFirewallsDeleteFuture.Result.
4724func (future *AzureFirewallsDeleteFuture) result(client AzureFirewallsClient) (ar autorest.Response, err error) {
4725	var done bool
4726	done, err = future.DoneWithContext(context.Background(), client)
4727	if err != nil {
4728		err = autorest.NewErrorWithError(err, "network.AzureFirewallsDeleteFuture", "Result", future.Response(), "Polling failure")
4729		return
4730	}
4731	if !done {
4732		ar.Response = future.Response()
4733		err = azure.NewAsyncOpIncompleteError("network.AzureFirewallsDeleteFuture")
4734		return
4735	}
4736	ar.Response = future.Response()
4737	return
4738}
4739
4740// AzureReachabilityReport azure reachability report details.
4741type AzureReachabilityReport struct {
4742	autorest.Response `json:"-"`
4743	// AggregationLevel - The aggregation level of Azure reachability report. Can be Country, State or City.
4744	AggregationLevel *string                          `json:"aggregationLevel,omitempty"`
4745	ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"`
4746	// ReachabilityReport - List of Azure reachability report items.
4747	ReachabilityReport *[]AzureReachabilityReportItem `json:"reachabilityReport,omitempty"`
4748}
4749
4750// AzureReachabilityReportItem azure reachability report details for a given provider location.
4751type AzureReachabilityReportItem struct {
4752	// Provider - The Internet service provider.
4753	Provider *string `json:"provider,omitempty"`
4754	// AzureLocation - The Azure region.
4755	AzureLocation *string `json:"azureLocation,omitempty"`
4756	// Latencies - List of latency details for each of the time series.
4757	Latencies *[]AzureReachabilityReportLatencyInfo `json:"latencies,omitempty"`
4758}
4759
4760// AzureReachabilityReportLatencyInfo details on latency for a time series.
4761type AzureReachabilityReportLatencyInfo struct {
4762	// TimeStamp - The time stamp.
4763	TimeStamp *date.Time `json:"timeStamp,omitempty"`
4764	// Score - The relative latency score between 1 and 100, higher values indicating a faster connection.
4765	Score *int32 `json:"score,omitempty"`
4766}
4767
4768// AzureReachabilityReportLocation parameters that define a geographic location.
4769type AzureReachabilityReportLocation struct {
4770	// Country - The name of the country.
4771	Country *string `json:"country,omitempty"`
4772	// State - The name of the state.
4773	State *string `json:"state,omitempty"`
4774	// City - The name of the city or town.
4775	City *string `json:"city,omitempty"`
4776}
4777
4778// AzureReachabilityReportParameters geographic and time constraints for Azure reachability report.
4779type AzureReachabilityReportParameters struct {
4780	ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"`
4781	// Providers - List of Internet service providers.
4782	Providers *[]string `json:"providers,omitempty"`
4783	// AzureLocations - Optional Azure regions to scope the query to.
4784	AzureLocations *[]string `json:"azureLocations,omitempty"`
4785	// StartTime - The start time for the Azure reachability report.
4786	StartTime *date.Time `json:"startTime,omitempty"`
4787	// EndTime - The end time for the Azure reachability report.
4788	EndTime *date.Time `json:"endTime,omitempty"`
4789}
4790
4791// BackendAddressPool pool of backend IP addresses.
4792type BackendAddressPool struct {
4793	autorest.Response `json:"-"`
4794	// BackendAddressPoolPropertiesFormat - Properties of load balancer backend address pool.
4795	*BackendAddressPoolPropertiesFormat `json:"properties,omitempty"`
4796	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
4797	Name *string `json:"name,omitempty"`
4798	// Etag - A unique read-only string that changes whenever the resource is updated.
4799	Etag *string `json:"etag,omitempty"`
4800	// ID - Resource ID.
4801	ID *string `json:"id,omitempty"`
4802}
4803
4804// MarshalJSON is the custom marshaler for BackendAddressPool.
4805func (bap BackendAddressPool) MarshalJSON() ([]byte, error) {
4806	objectMap := make(map[string]interface{})
4807	if bap.BackendAddressPoolPropertiesFormat != nil {
4808		objectMap["properties"] = bap.BackendAddressPoolPropertiesFormat
4809	}
4810	if bap.Name != nil {
4811		objectMap["name"] = bap.Name
4812	}
4813	if bap.Etag != nil {
4814		objectMap["etag"] = bap.Etag
4815	}
4816	if bap.ID != nil {
4817		objectMap["id"] = bap.ID
4818	}
4819	return json.Marshal(objectMap)
4820}
4821
4822// UnmarshalJSON is the custom unmarshaler for BackendAddressPool struct.
4823func (bap *BackendAddressPool) UnmarshalJSON(body []byte) error {
4824	var m map[string]*json.RawMessage
4825	err := json.Unmarshal(body, &m)
4826	if err != nil {
4827		return err
4828	}
4829	for k, v := range m {
4830		switch k {
4831		case "properties":
4832			if v != nil {
4833				var backendAddressPoolPropertiesFormat BackendAddressPoolPropertiesFormat
4834				err = json.Unmarshal(*v, &backendAddressPoolPropertiesFormat)
4835				if err != nil {
4836					return err
4837				}
4838				bap.BackendAddressPoolPropertiesFormat = &backendAddressPoolPropertiesFormat
4839			}
4840		case "name":
4841			if v != nil {
4842				var name string
4843				err = json.Unmarshal(*v, &name)
4844				if err != nil {
4845					return err
4846				}
4847				bap.Name = &name
4848			}
4849		case "etag":
4850			if v != nil {
4851				var etag string
4852				err = json.Unmarshal(*v, &etag)
4853				if err != nil {
4854					return err
4855				}
4856				bap.Etag = &etag
4857			}
4858		case "id":
4859			if v != nil {
4860				var ID string
4861				err = json.Unmarshal(*v, &ID)
4862				if err != nil {
4863					return err
4864				}
4865				bap.ID = &ID
4866			}
4867		}
4868	}
4869
4870	return nil
4871}
4872
4873// BackendAddressPoolPropertiesFormat properties of the backend address pool.
4874type BackendAddressPoolPropertiesFormat struct {
4875	// BackendIPConfigurations - READ-ONLY; Gets collection of references to IP addresses defined in network interfaces.
4876	BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"`
4877	// LoadBalancingRules - READ-ONLY; Gets load balancing rules that use this backend address pool.
4878	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
4879	// OutboundRule - READ-ONLY; Gets outbound rules that use this backend address pool.
4880	OutboundRule *SubResource `json:"outboundRule,omitempty"`
4881	// OutboundRules - READ-ONLY; Gets outbound rules that use this backend address pool.
4882	OutboundRules *[]SubResource `json:"outboundRules,omitempty"`
4883	// ProvisioningState - Get provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
4884	ProvisioningState *string `json:"provisioningState,omitempty"`
4885}
4886
4887// MarshalJSON is the custom marshaler for BackendAddressPoolPropertiesFormat.
4888func (bappf BackendAddressPoolPropertiesFormat) MarshalJSON() ([]byte, error) {
4889	objectMap := make(map[string]interface{})
4890	if bappf.ProvisioningState != nil {
4891		objectMap["provisioningState"] = bappf.ProvisioningState
4892	}
4893	return json.Marshal(objectMap)
4894}
4895
4896// BGPCommunity contains bgp community information offered in Service Community resources.
4897type BGPCommunity struct {
4898	// ServiceSupportedRegion - The region which the service support. e.g. For O365, region is Global.
4899	ServiceSupportedRegion *string `json:"serviceSupportedRegion,omitempty"`
4900	// CommunityName - The name of the bgp community. e.g. Skype.
4901	CommunityName *string `json:"communityName,omitempty"`
4902	// CommunityValue - The value of the bgp community. For more information: https://docs.microsoft.com/en-us/azure/expressroute/expressroute-routing.
4903	CommunityValue *string `json:"communityValue,omitempty"`
4904	// CommunityPrefixes - The prefixes that the bgp community contains.
4905	CommunityPrefixes *[]string `json:"communityPrefixes,omitempty"`
4906	// IsAuthorizedToUse - Customer is authorized to use bgp community or not.
4907	IsAuthorizedToUse *bool `json:"isAuthorizedToUse,omitempty"`
4908	// ServiceGroup - The service group of the bgp community contains.
4909	ServiceGroup *string `json:"serviceGroup,omitempty"`
4910}
4911
4912// BgpPeerStatus BGP peer status details
4913type BgpPeerStatus struct {
4914	// LocalAddress - READ-ONLY; The virtual network gateway's local address
4915	LocalAddress *string `json:"localAddress,omitempty"`
4916	// Neighbor - READ-ONLY; The remote BGP peer
4917	Neighbor *string `json:"neighbor,omitempty"`
4918	// Asn - READ-ONLY; The autonomous system number of the remote BGP peer
4919	Asn *int32 `json:"asn,omitempty"`
4920	// State - READ-ONLY; The BGP peer state. Possible values include: 'BgpPeerStateUnknown', 'BgpPeerStateStopped', 'BgpPeerStateIdle', 'BgpPeerStateConnecting', 'BgpPeerStateConnected'
4921	State BgpPeerState `json:"state,omitempty"`
4922	// ConnectedDuration - READ-ONLY; For how long the peering has been up
4923	ConnectedDuration *string `json:"connectedDuration,omitempty"`
4924	// RoutesReceived - READ-ONLY; The number of routes learned from this peer
4925	RoutesReceived *int64 `json:"routesReceived,omitempty"`
4926	// MessagesSent - READ-ONLY; The number of BGP messages sent
4927	MessagesSent *int64 `json:"messagesSent,omitempty"`
4928	// MessagesReceived - READ-ONLY; The number of BGP messages received
4929	MessagesReceived *int64 `json:"messagesReceived,omitempty"`
4930}
4931
4932// MarshalJSON is the custom marshaler for BgpPeerStatus.
4933func (bps BgpPeerStatus) MarshalJSON() ([]byte, error) {
4934	objectMap := make(map[string]interface{})
4935	return json.Marshal(objectMap)
4936}
4937
4938// BgpPeerStatusListResult response for list BGP peer status API service call
4939type BgpPeerStatusListResult struct {
4940	autorest.Response `json:"-"`
4941	// Value - List of BGP peers
4942	Value *[]BgpPeerStatus `json:"value,omitempty"`
4943}
4944
4945// BgpServiceCommunity service Community Properties.
4946type BgpServiceCommunity struct {
4947	*BgpServiceCommunityPropertiesFormat `json:"properties,omitempty"`
4948	// ID - Resource ID.
4949	ID *string `json:"id,omitempty"`
4950	// Name - READ-ONLY; Resource name.
4951	Name *string `json:"name,omitempty"`
4952	// Type - READ-ONLY; Resource type.
4953	Type *string `json:"type,omitempty"`
4954	// Location - Resource location.
4955	Location *string `json:"location,omitempty"`
4956	// Tags - Resource tags.
4957	Tags map[string]*string `json:"tags"`
4958}
4959
4960// MarshalJSON is the custom marshaler for BgpServiceCommunity.
4961func (bsc BgpServiceCommunity) MarshalJSON() ([]byte, error) {
4962	objectMap := make(map[string]interface{})
4963	if bsc.BgpServiceCommunityPropertiesFormat != nil {
4964		objectMap["properties"] = bsc.BgpServiceCommunityPropertiesFormat
4965	}
4966	if bsc.ID != nil {
4967		objectMap["id"] = bsc.ID
4968	}
4969	if bsc.Location != nil {
4970		objectMap["location"] = bsc.Location
4971	}
4972	if bsc.Tags != nil {
4973		objectMap["tags"] = bsc.Tags
4974	}
4975	return json.Marshal(objectMap)
4976}
4977
4978// UnmarshalJSON is the custom unmarshaler for BgpServiceCommunity struct.
4979func (bsc *BgpServiceCommunity) UnmarshalJSON(body []byte) error {
4980	var m map[string]*json.RawMessage
4981	err := json.Unmarshal(body, &m)
4982	if err != nil {
4983		return err
4984	}
4985	for k, v := range m {
4986		switch k {
4987		case "properties":
4988			if v != nil {
4989				var bgpServiceCommunityPropertiesFormat BgpServiceCommunityPropertiesFormat
4990				err = json.Unmarshal(*v, &bgpServiceCommunityPropertiesFormat)
4991				if err != nil {
4992					return err
4993				}
4994				bsc.BgpServiceCommunityPropertiesFormat = &bgpServiceCommunityPropertiesFormat
4995			}
4996		case "id":
4997			if v != nil {
4998				var ID string
4999				err = json.Unmarshal(*v, &ID)
5000				if err != nil {
5001					return err
5002				}
5003				bsc.ID = &ID
5004			}
5005		case "name":
5006			if v != nil {
5007				var name string
5008				err = json.Unmarshal(*v, &name)
5009				if err != nil {
5010					return err
5011				}
5012				bsc.Name = &name
5013			}
5014		case "type":
5015			if v != nil {
5016				var typeVar string
5017				err = json.Unmarshal(*v, &typeVar)
5018				if err != nil {
5019					return err
5020				}
5021				bsc.Type = &typeVar
5022			}
5023		case "location":
5024			if v != nil {
5025				var location string
5026				err = json.Unmarshal(*v, &location)
5027				if err != nil {
5028					return err
5029				}
5030				bsc.Location = &location
5031			}
5032		case "tags":
5033			if v != nil {
5034				var tags map[string]*string
5035				err = json.Unmarshal(*v, &tags)
5036				if err != nil {
5037					return err
5038				}
5039				bsc.Tags = tags
5040			}
5041		}
5042	}
5043
5044	return nil
5045}
5046
5047// BgpServiceCommunityListResult response for the ListServiceCommunity API service call.
5048type BgpServiceCommunityListResult struct {
5049	autorest.Response `json:"-"`
5050	// Value - A list of service community resources.
5051	Value *[]BgpServiceCommunity `json:"value,omitempty"`
5052	// NextLink - The URL to get the next set of results.
5053	NextLink *string `json:"nextLink,omitempty"`
5054}
5055
5056// BgpServiceCommunityListResultIterator provides access to a complete listing of BgpServiceCommunity
5057// values.
5058type BgpServiceCommunityListResultIterator struct {
5059	i    int
5060	page BgpServiceCommunityListResultPage
5061}
5062
5063// NextWithContext advances to the next value.  If there was an error making
5064// the request the iterator does not advance and the error is returned.
5065func (iter *BgpServiceCommunityListResultIterator) NextWithContext(ctx context.Context) (err error) {
5066	if tracing.IsEnabled() {
5067		ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultIterator.NextWithContext")
5068		defer func() {
5069			sc := -1
5070			if iter.Response().Response.Response != nil {
5071				sc = iter.Response().Response.Response.StatusCode
5072			}
5073			tracing.EndSpan(ctx, sc, err)
5074		}()
5075	}
5076	iter.i++
5077	if iter.i < len(iter.page.Values()) {
5078		return nil
5079	}
5080	err = iter.page.NextWithContext(ctx)
5081	if err != nil {
5082		iter.i--
5083		return err
5084	}
5085	iter.i = 0
5086	return nil
5087}
5088
5089// Next advances to the next value.  If there was an error making
5090// the request the iterator does not advance and the error is returned.
5091// Deprecated: Use NextWithContext() instead.
5092func (iter *BgpServiceCommunityListResultIterator) Next() error {
5093	return iter.NextWithContext(context.Background())
5094}
5095
5096// NotDone returns true if the enumeration should be started or is not yet complete.
5097func (iter BgpServiceCommunityListResultIterator) NotDone() bool {
5098	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5099}
5100
5101// Response returns the raw server response from the last page request.
5102func (iter BgpServiceCommunityListResultIterator) Response() BgpServiceCommunityListResult {
5103	return iter.page.Response()
5104}
5105
5106// Value returns the current value or a zero-initialized value if the
5107// iterator has advanced beyond the end of the collection.
5108func (iter BgpServiceCommunityListResultIterator) Value() BgpServiceCommunity {
5109	if !iter.page.NotDone() {
5110		return BgpServiceCommunity{}
5111	}
5112	return iter.page.Values()[iter.i]
5113}
5114
5115// Creates a new instance of the BgpServiceCommunityListResultIterator type.
5116func NewBgpServiceCommunityListResultIterator(page BgpServiceCommunityListResultPage) BgpServiceCommunityListResultIterator {
5117	return BgpServiceCommunityListResultIterator{page: page}
5118}
5119
5120// IsEmpty returns true if the ListResult contains no values.
5121func (bsclr BgpServiceCommunityListResult) IsEmpty() bool {
5122	return bsclr.Value == nil || len(*bsclr.Value) == 0
5123}
5124
5125// hasNextLink returns true if the NextLink is not empty.
5126func (bsclr BgpServiceCommunityListResult) hasNextLink() bool {
5127	return bsclr.NextLink != nil && len(*bsclr.NextLink) != 0
5128}
5129
5130// bgpServiceCommunityListResultPreparer prepares a request to retrieve the next set of results.
5131// It returns nil if no more results exist.
5132func (bsclr BgpServiceCommunityListResult) bgpServiceCommunityListResultPreparer(ctx context.Context) (*http.Request, error) {
5133	if !bsclr.hasNextLink() {
5134		return nil, nil
5135	}
5136	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5137		autorest.AsJSON(),
5138		autorest.AsGet(),
5139		autorest.WithBaseURL(to.String(bsclr.NextLink)))
5140}
5141
5142// BgpServiceCommunityListResultPage contains a page of BgpServiceCommunity values.
5143type BgpServiceCommunityListResultPage struct {
5144	fn    func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)
5145	bsclr BgpServiceCommunityListResult
5146}
5147
5148// NextWithContext advances to the next page of values.  If there was an error making
5149// the request the page does not advance and the error is returned.
5150func (page *BgpServiceCommunityListResultPage) NextWithContext(ctx context.Context) (err error) {
5151	if tracing.IsEnabled() {
5152		ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultPage.NextWithContext")
5153		defer func() {
5154			sc := -1
5155			if page.Response().Response.Response != nil {
5156				sc = page.Response().Response.Response.StatusCode
5157			}
5158			tracing.EndSpan(ctx, sc, err)
5159		}()
5160	}
5161	for {
5162		next, err := page.fn(ctx, page.bsclr)
5163		if err != nil {
5164			return err
5165		}
5166		page.bsclr = next
5167		if !next.hasNextLink() || !next.IsEmpty() {
5168			break
5169		}
5170	}
5171	return nil
5172}
5173
5174// Next advances to the next page of values.  If there was an error making
5175// the request the page does not advance and the error is returned.
5176// Deprecated: Use NextWithContext() instead.
5177func (page *BgpServiceCommunityListResultPage) Next() error {
5178	return page.NextWithContext(context.Background())
5179}
5180
5181// NotDone returns true if the page enumeration should be started or is not yet complete.
5182func (page BgpServiceCommunityListResultPage) NotDone() bool {
5183	return !page.bsclr.IsEmpty()
5184}
5185
5186// Response returns the raw server response from the last page request.
5187func (page BgpServiceCommunityListResultPage) Response() BgpServiceCommunityListResult {
5188	return page.bsclr
5189}
5190
5191// Values returns the slice of values for the current page or nil if there are no values.
5192func (page BgpServiceCommunityListResultPage) Values() []BgpServiceCommunity {
5193	if page.bsclr.IsEmpty() {
5194		return nil
5195	}
5196	return *page.bsclr.Value
5197}
5198
5199// Creates a new instance of the BgpServiceCommunityListResultPage type.
5200func NewBgpServiceCommunityListResultPage(cur BgpServiceCommunityListResult, getNextPage func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)) BgpServiceCommunityListResultPage {
5201	return BgpServiceCommunityListResultPage{
5202		fn:    getNextPage,
5203		bsclr: cur,
5204	}
5205}
5206
5207// BgpServiceCommunityPropertiesFormat properties of Service Community.
5208type BgpServiceCommunityPropertiesFormat struct {
5209	// ServiceName - The name of the bgp community. e.g. Skype.
5210	ServiceName *string `json:"serviceName,omitempty"`
5211	// BgpCommunities - Get a list of bgp communities.
5212	BgpCommunities *[]BGPCommunity `json:"bgpCommunities,omitempty"`
5213}
5214
5215// BgpSettings BGP settings details
5216type BgpSettings struct {
5217	// Asn - The BGP speaker's ASN.
5218	Asn *int64 `json:"asn,omitempty"`
5219	// BgpPeeringAddress - The BGP peering address and BGP identifier of this BGP speaker.
5220	BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"`
5221	// PeerWeight - The weight added to routes learned from this BGP speaker.
5222	PeerWeight *int32 `json:"peerWeight,omitempty"`
5223}
5224
5225// ConfigurationDiagnosticParameters parameters to get network configuration diagnostic.
5226type ConfigurationDiagnosticParameters struct {
5227	// TargetResourceID - The ID of the target resource to perform network configuration diagnostic. Valid options are VM, NetworkInterface, VMSS/NetworkInterface and Application Gateway.
5228	TargetResourceID *string `json:"targetResourceId,omitempty"`
5229	// VerbosityLevel - Verbosity level. Accepted values are 'Normal', 'Minimum', 'Full'. Possible values include: 'Normal', 'Minimum', 'Full'
5230	VerbosityLevel VerbosityLevel `json:"verbosityLevel,omitempty"`
5231	// Profiles - List of network configuration diagnostic profiles.
5232	Profiles *[]ConfigurationDiagnosticProfile `json:"profiles,omitempty"`
5233}
5234
5235// ConfigurationDiagnosticProfile parameters to compare with network configuration.
5236type ConfigurationDiagnosticProfile struct {
5237	// Direction - The direction of the traffic. Accepted values are 'Inbound' and 'Outbound'. Possible values include: 'Inbound', 'Outbound'
5238	Direction Direction `json:"direction,omitempty"`
5239	// Protocol - Protocol to be verified on. Accepted values are '*', TCP, UDP.
5240	Protocol *string `json:"protocol,omitempty"`
5241	// Source - Traffic source. Accepted values are '*', IP Address/CIDR, Service Tag.
5242	Source *string `json:"source,omitempty"`
5243	// Destination - Traffic destination. Accepted values are: '*', IP Address/CIDR, Service Tag.
5244	Destination *string `json:"destination,omitempty"`
5245	// DestinationPort - Traffic destination port. Accepted values are '*', port (for example, 3389) and port range (for example, 80-100).
5246	DestinationPort *string `json:"destinationPort,omitempty"`
5247}
5248
5249// ConfigurationDiagnosticResponse results of network configuration diagnostic on the target resource.
5250type ConfigurationDiagnosticResponse struct {
5251	autorest.Response `json:"-"`
5252	// Results - READ-ONLY; List of network configuration diagnostic results.
5253	Results *[]ConfigurationDiagnosticResult `json:"results,omitempty"`
5254}
5255
5256// MarshalJSON is the custom marshaler for ConfigurationDiagnosticResponse.
5257func (cdr ConfigurationDiagnosticResponse) MarshalJSON() ([]byte, error) {
5258	objectMap := make(map[string]interface{})
5259	return json.Marshal(objectMap)
5260}
5261
5262// ConfigurationDiagnosticResult network configuration diagnostic result corresponded to provided traffic
5263// query.
5264type ConfigurationDiagnosticResult struct {
5265	Profile                    *ConfigurationDiagnosticProfile `json:"profile,omitempty"`
5266	NetworkSecurityGroupResult *SecurityGroupResult            `json:"networkSecurityGroupResult,omitempty"`
5267}
5268
5269// ConnectionMonitor parameters that define the operation to create a connection monitor.
5270type ConnectionMonitor struct {
5271	// Location - Connection monitor location.
5272	Location *string `json:"location,omitempty"`
5273	// Tags - Connection monitor tags.
5274	Tags                         map[string]*string `json:"tags"`
5275	*ConnectionMonitorParameters `json:"properties,omitempty"`
5276}
5277
5278// MarshalJSON is the custom marshaler for ConnectionMonitor.
5279func (cm ConnectionMonitor) MarshalJSON() ([]byte, error) {
5280	objectMap := make(map[string]interface{})
5281	if cm.Location != nil {
5282		objectMap["location"] = cm.Location
5283	}
5284	if cm.Tags != nil {
5285		objectMap["tags"] = cm.Tags
5286	}
5287	if cm.ConnectionMonitorParameters != nil {
5288		objectMap["properties"] = cm.ConnectionMonitorParameters
5289	}
5290	return json.Marshal(objectMap)
5291}
5292
5293// UnmarshalJSON is the custom unmarshaler for ConnectionMonitor struct.
5294func (cm *ConnectionMonitor) UnmarshalJSON(body []byte) error {
5295	var m map[string]*json.RawMessage
5296	err := json.Unmarshal(body, &m)
5297	if err != nil {
5298		return err
5299	}
5300	for k, v := range m {
5301		switch k {
5302		case "location":
5303			if v != nil {
5304				var location string
5305				err = json.Unmarshal(*v, &location)
5306				if err != nil {
5307					return err
5308				}
5309				cm.Location = &location
5310			}
5311		case "tags":
5312			if v != nil {
5313				var tags map[string]*string
5314				err = json.Unmarshal(*v, &tags)
5315				if err != nil {
5316					return err
5317				}
5318				cm.Tags = tags
5319			}
5320		case "properties":
5321			if v != nil {
5322				var connectionMonitorParameters ConnectionMonitorParameters
5323				err = json.Unmarshal(*v, &connectionMonitorParameters)
5324				if err != nil {
5325					return err
5326				}
5327				cm.ConnectionMonitorParameters = &connectionMonitorParameters
5328			}
5329		}
5330	}
5331
5332	return nil
5333}
5334
5335// ConnectionMonitorDestination describes the destination of connection monitor.
5336type ConnectionMonitorDestination struct {
5337	// ResourceID - The ID of the resource used as the destination by connection monitor.
5338	ResourceID *string `json:"resourceId,omitempty"`
5339	// Address - Address of the connection monitor destination (IP or domain name).
5340	Address *string `json:"address,omitempty"`
5341	// Port - The destination port used by connection monitor.
5342	Port *int32 `json:"port,omitempty"`
5343}
5344
5345// ConnectionMonitorListResult list of connection monitors.
5346type ConnectionMonitorListResult struct {
5347	autorest.Response `json:"-"`
5348	// Value - Information about connection monitors.
5349	Value *[]ConnectionMonitorResult `json:"value,omitempty"`
5350}
5351
5352// ConnectionMonitorParameters parameters that define the operation to create a connection monitor.
5353type ConnectionMonitorParameters struct {
5354	Source      *ConnectionMonitorSource      `json:"source,omitempty"`
5355	Destination *ConnectionMonitorDestination `json:"destination,omitempty"`
5356	// AutoStart - Determines if the connection monitor will start automatically once created.
5357	AutoStart *bool `json:"autoStart,omitempty"`
5358	// MonitoringIntervalInSeconds - Monitoring interval in seconds.
5359	MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"`
5360}
5361
5362// ConnectionMonitorQueryResult list of connection states snapshots.
5363type ConnectionMonitorQueryResult struct {
5364	autorest.Response `json:"-"`
5365	// SourceStatus - Status of connection monitor source. Possible values include: 'Uknown', 'Active', 'Inactive'
5366	SourceStatus ConnectionMonitorSourceStatus `json:"sourceStatus,omitempty"`
5367	// States - Information about connection states.
5368	States *[]ConnectionStateSnapshot `json:"states,omitempty"`
5369}
5370
5371// ConnectionMonitorResult information about the connection monitor.
5372type ConnectionMonitorResult struct {
5373	autorest.Response `json:"-"`
5374	// Name - READ-ONLY; Name of the connection monitor.
5375	Name *string `json:"name,omitempty"`
5376	// ID - READ-ONLY; ID of the connection monitor.
5377	ID   *string `json:"id,omitempty"`
5378	Etag *string `json:"etag,omitempty"`
5379	// Type - READ-ONLY; Connection monitor type.
5380	Type *string `json:"type,omitempty"`
5381	// Location - Connection monitor location.
5382	Location *string `json:"location,omitempty"`
5383	// Tags - Connection monitor tags.
5384	Tags                               map[string]*string `json:"tags"`
5385	*ConnectionMonitorResultProperties `json:"properties,omitempty"`
5386}
5387
5388// MarshalJSON is the custom marshaler for ConnectionMonitorResult.
5389func (cmr ConnectionMonitorResult) MarshalJSON() ([]byte, error) {
5390	objectMap := make(map[string]interface{})
5391	if cmr.Etag != nil {
5392		objectMap["etag"] = cmr.Etag
5393	}
5394	if cmr.Location != nil {
5395		objectMap["location"] = cmr.Location
5396	}
5397	if cmr.Tags != nil {
5398		objectMap["tags"] = cmr.Tags
5399	}
5400	if cmr.ConnectionMonitorResultProperties != nil {
5401		objectMap["properties"] = cmr.ConnectionMonitorResultProperties
5402	}
5403	return json.Marshal(objectMap)
5404}
5405
5406// UnmarshalJSON is the custom unmarshaler for ConnectionMonitorResult struct.
5407func (cmr *ConnectionMonitorResult) UnmarshalJSON(body []byte) error {
5408	var m map[string]*json.RawMessage
5409	err := json.Unmarshal(body, &m)
5410	if err != nil {
5411		return err
5412	}
5413	for k, v := range m {
5414		switch k {
5415		case "name":
5416			if v != nil {
5417				var name string
5418				err = json.Unmarshal(*v, &name)
5419				if err != nil {
5420					return err
5421				}
5422				cmr.Name = &name
5423			}
5424		case "id":
5425			if v != nil {
5426				var ID string
5427				err = json.Unmarshal(*v, &ID)
5428				if err != nil {
5429					return err
5430				}
5431				cmr.ID = &ID
5432			}
5433		case "etag":
5434			if v != nil {
5435				var etag string
5436				err = json.Unmarshal(*v, &etag)
5437				if err != nil {
5438					return err
5439				}
5440				cmr.Etag = &etag
5441			}
5442		case "type":
5443			if v != nil {
5444				var typeVar string
5445				err = json.Unmarshal(*v, &typeVar)
5446				if err != nil {
5447					return err
5448				}
5449				cmr.Type = &typeVar
5450			}
5451		case "location":
5452			if v != nil {
5453				var location string
5454				err = json.Unmarshal(*v, &location)
5455				if err != nil {
5456					return err
5457				}
5458				cmr.Location = &location
5459			}
5460		case "tags":
5461			if v != nil {
5462				var tags map[string]*string
5463				err = json.Unmarshal(*v, &tags)
5464				if err != nil {
5465					return err
5466				}
5467				cmr.Tags = tags
5468			}
5469		case "properties":
5470			if v != nil {
5471				var connectionMonitorResultProperties ConnectionMonitorResultProperties
5472				err = json.Unmarshal(*v, &connectionMonitorResultProperties)
5473				if err != nil {
5474					return err
5475				}
5476				cmr.ConnectionMonitorResultProperties = &connectionMonitorResultProperties
5477			}
5478		}
5479	}
5480
5481	return nil
5482}
5483
5484// ConnectionMonitorResultProperties describes the properties of a connection monitor.
5485type ConnectionMonitorResultProperties struct {
5486	// ProvisioningState - The provisioning state of the connection monitor. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
5487	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
5488	// StartTime - The date and time when the connection monitor was started.
5489	StartTime *date.Time `json:"startTime,omitempty"`
5490	// MonitoringStatus - The monitoring status of the connection monitor.
5491	MonitoringStatus *string                       `json:"monitoringStatus,omitempty"`
5492	Source           *ConnectionMonitorSource      `json:"source,omitempty"`
5493	Destination      *ConnectionMonitorDestination `json:"destination,omitempty"`
5494	// AutoStart - Determines if the connection monitor will start automatically once created.
5495	AutoStart *bool `json:"autoStart,omitempty"`
5496	// MonitoringIntervalInSeconds - Monitoring interval in seconds.
5497	MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"`
5498}
5499
5500// ConnectionMonitorsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
5501// long-running operation.
5502type ConnectionMonitorsCreateOrUpdateFuture struct {
5503	azure.FutureAPI
5504	// Result returns the result of the asynchronous operation.
5505	// If the operation has not completed it will return an error.
5506	Result func(ConnectionMonitorsClient) (ConnectionMonitorResult, error)
5507}
5508
5509// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5510func (future *ConnectionMonitorsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
5511	var azFuture azure.Future
5512	if err := json.Unmarshal(body, &azFuture); err != nil {
5513		return err
5514	}
5515	future.FutureAPI = &azFuture
5516	future.Result = future.result
5517	return nil
5518}
5519
5520// result is the default implementation for ConnectionMonitorsCreateOrUpdateFuture.Result.
5521func (future *ConnectionMonitorsCreateOrUpdateFuture) result(client ConnectionMonitorsClient) (cmr ConnectionMonitorResult, err error) {
5522	var done bool
5523	done, err = future.DoneWithContext(context.Background(), client)
5524	if err != nil {
5525		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
5526		return
5527	}
5528	if !done {
5529		cmr.Response.Response = future.Response()
5530		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsCreateOrUpdateFuture")
5531		return
5532	}
5533	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5534	if cmr.Response.Response, err = future.GetResult(sender); err == nil && cmr.Response.Response.StatusCode != http.StatusNoContent {
5535		cmr, err = client.CreateOrUpdateResponder(cmr.Response.Response)
5536		if err != nil {
5537			err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsCreateOrUpdateFuture", "Result", cmr.Response.Response, "Failure responding to request")
5538		}
5539	}
5540	return
5541}
5542
5543// ConnectionMonitorsDeleteFuture an abstraction for monitoring and retrieving the results of a
5544// long-running operation.
5545type ConnectionMonitorsDeleteFuture struct {
5546	azure.FutureAPI
5547	// Result returns the result of the asynchronous operation.
5548	// If the operation has not completed it will return an error.
5549	Result func(ConnectionMonitorsClient) (autorest.Response, error)
5550}
5551
5552// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5553func (future *ConnectionMonitorsDeleteFuture) UnmarshalJSON(body []byte) error {
5554	var azFuture azure.Future
5555	if err := json.Unmarshal(body, &azFuture); err != nil {
5556		return err
5557	}
5558	future.FutureAPI = &azFuture
5559	future.Result = future.result
5560	return nil
5561}
5562
5563// result is the default implementation for ConnectionMonitorsDeleteFuture.Result.
5564func (future *ConnectionMonitorsDeleteFuture) result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
5565	var done bool
5566	done, err = future.DoneWithContext(context.Background(), client)
5567	if err != nil {
5568		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsDeleteFuture", "Result", future.Response(), "Polling failure")
5569		return
5570	}
5571	if !done {
5572		ar.Response = future.Response()
5573		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsDeleteFuture")
5574		return
5575	}
5576	ar.Response = future.Response()
5577	return
5578}
5579
5580// ConnectionMonitorSource describes the source of connection monitor.
5581type ConnectionMonitorSource struct {
5582	// ResourceID - The ID of the resource used as the source by connection monitor.
5583	ResourceID *string `json:"resourceId,omitempty"`
5584	// Port - The source port used by connection monitor.
5585	Port *int32 `json:"port,omitempty"`
5586}
5587
5588// ConnectionMonitorsQueryFuture an abstraction for monitoring and retrieving the results of a long-running
5589// operation.
5590type ConnectionMonitorsQueryFuture struct {
5591	azure.FutureAPI
5592	// Result returns the result of the asynchronous operation.
5593	// If the operation has not completed it will return an error.
5594	Result func(ConnectionMonitorsClient) (ConnectionMonitorQueryResult, error)
5595}
5596
5597// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5598func (future *ConnectionMonitorsQueryFuture) UnmarshalJSON(body []byte) error {
5599	var azFuture azure.Future
5600	if err := json.Unmarshal(body, &azFuture); err != nil {
5601		return err
5602	}
5603	future.FutureAPI = &azFuture
5604	future.Result = future.result
5605	return nil
5606}
5607
5608// result is the default implementation for ConnectionMonitorsQueryFuture.Result.
5609func (future *ConnectionMonitorsQueryFuture) result(client ConnectionMonitorsClient) (cmqr ConnectionMonitorQueryResult, err error) {
5610	var done bool
5611	done, err = future.DoneWithContext(context.Background(), client)
5612	if err != nil {
5613		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", future.Response(), "Polling failure")
5614		return
5615	}
5616	if !done {
5617		cmqr.Response.Response = future.Response()
5618		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsQueryFuture")
5619		return
5620	}
5621	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
5622	if cmqr.Response.Response, err = future.GetResult(sender); err == nil && cmqr.Response.Response.StatusCode != http.StatusNoContent {
5623		cmqr, err = client.QueryResponder(cmqr.Response.Response)
5624		if err != nil {
5625			err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsQueryFuture", "Result", cmqr.Response.Response, "Failure responding to request")
5626		}
5627	}
5628	return
5629}
5630
5631// ConnectionMonitorsStartFuture an abstraction for monitoring and retrieving the results of a long-running
5632// operation.
5633type ConnectionMonitorsStartFuture struct {
5634	azure.FutureAPI
5635	// Result returns the result of the asynchronous operation.
5636	// If the operation has not completed it will return an error.
5637	Result func(ConnectionMonitorsClient) (autorest.Response, error)
5638}
5639
5640// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5641func (future *ConnectionMonitorsStartFuture) UnmarshalJSON(body []byte) error {
5642	var azFuture azure.Future
5643	if err := json.Unmarshal(body, &azFuture); err != nil {
5644		return err
5645	}
5646	future.FutureAPI = &azFuture
5647	future.Result = future.result
5648	return nil
5649}
5650
5651// result is the default implementation for ConnectionMonitorsStartFuture.Result.
5652func (future *ConnectionMonitorsStartFuture) result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
5653	var done bool
5654	done, err = future.DoneWithContext(context.Background(), client)
5655	if err != nil {
5656		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStartFuture", "Result", future.Response(), "Polling failure")
5657		return
5658	}
5659	if !done {
5660		ar.Response = future.Response()
5661		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStartFuture")
5662		return
5663	}
5664	ar.Response = future.Response()
5665	return
5666}
5667
5668// ConnectionMonitorsStopFuture an abstraction for monitoring and retrieving the results of a long-running
5669// operation.
5670type ConnectionMonitorsStopFuture struct {
5671	azure.FutureAPI
5672	// Result returns the result of the asynchronous operation.
5673	// If the operation has not completed it will return an error.
5674	Result func(ConnectionMonitorsClient) (autorest.Response, error)
5675}
5676
5677// UnmarshalJSON is the custom unmarshaller for CreateFuture.
5678func (future *ConnectionMonitorsStopFuture) UnmarshalJSON(body []byte) error {
5679	var azFuture azure.Future
5680	if err := json.Unmarshal(body, &azFuture); err != nil {
5681		return err
5682	}
5683	future.FutureAPI = &azFuture
5684	future.Result = future.result
5685	return nil
5686}
5687
5688// result is the default implementation for ConnectionMonitorsStopFuture.Result.
5689func (future *ConnectionMonitorsStopFuture) result(client ConnectionMonitorsClient) (ar autorest.Response, err error) {
5690	var done bool
5691	done, err = future.DoneWithContext(context.Background(), client)
5692	if err != nil {
5693		err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsStopFuture", "Result", future.Response(), "Polling failure")
5694		return
5695	}
5696	if !done {
5697		ar.Response = future.Response()
5698		err = azure.NewAsyncOpIncompleteError("network.ConnectionMonitorsStopFuture")
5699		return
5700	}
5701	ar.Response = future.Response()
5702	return
5703}
5704
5705// ConnectionResetSharedKey the virtual network connection reset shared key
5706type ConnectionResetSharedKey struct {
5707	autorest.Response `json:"-"`
5708	// KeyLength - The virtual network connection reset shared key length, should between 1 and 128.
5709	KeyLength *int32 `json:"keyLength,omitempty"`
5710}
5711
5712// ConnectionSharedKey response for GetConnectionSharedKey API service call
5713type ConnectionSharedKey struct {
5714	autorest.Response `json:"-"`
5715	// Value - The virtual network connection shared key value.
5716	Value *string `json:"value,omitempty"`
5717	// ID - Resource ID.
5718	ID *string `json:"id,omitempty"`
5719}
5720
5721// ConnectionStateSnapshot connection state snapshot.
5722type ConnectionStateSnapshot struct {
5723	// ConnectionState - The connection state. Possible values include: 'ConnectionStateReachable', 'ConnectionStateUnreachable', 'ConnectionStateUnknown'
5724	ConnectionState ConnectionState `json:"connectionState,omitempty"`
5725	// StartTime - The start time of the connection snapshot.
5726	StartTime *date.Time `json:"startTime,omitempty"`
5727	// EndTime - The end time of the connection snapshot.
5728	EndTime *date.Time `json:"endTime,omitempty"`
5729	// EvaluationState - Connectivity analysis evaluation state. Possible values include: 'NotStarted', 'InProgress', 'Completed'
5730	EvaluationState EvaluationState `json:"evaluationState,omitempty"`
5731	// AvgLatencyInMs - Average latency in ms.
5732	AvgLatencyInMs *int32 `json:"avgLatencyInMs,omitempty"`
5733	// MinLatencyInMs - Minimum latency in ms.
5734	MinLatencyInMs *int32 `json:"minLatencyInMs,omitempty"`
5735	// MaxLatencyInMs - Maximum latency in ms.
5736	MaxLatencyInMs *int32 `json:"maxLatencyInMs,omitempty"`
5737	// ProbesSent - The number of sent probes.
5738	ProbesSent *int32 `json:"probesSent,omitempty"`
5739	// ProbesFailed - The number of failed probes.
5740	ProbesFailed *int32 `json:"probesFailed,omitempty"`
5741	// Hops - READ-ONLY; List of hops between the source and the destination.
5742	Hops *[]ConnectivityHop `json:"hops,omitempty"`
5743}
5744
5745// MarshalJSON is the custom marshaler for ConnectionStateSnapshot.
5746func (CSS ConnectionStateSnapshot) MarshalJSON() ([]byte, error) {
5747	objectMap := make(map[string]interface{})
5748	if CSS.ConnectionState != "" {
5749		objectMap["connectionState"] = CSS.ConnectionState
5750	}
5751	if CSS.StartTime != nil {
5752		objectMap["startTime"] = CSS.StartTime
5753	}
5754	if CSS.EndTime != nil {
5755		objectMap["endTime"] = CSS.EndTime
5756	}
5757	if CSS.EvaluationState != "" {
5758		objectMap["evaluationState"] = CSS.EvaluationState
5759	}
5760	if CSS.AvgLatencyInMs != nil {
5761		objectMap["avgLatencyInMs"] = CSS.AvgLatencyInMs
5762	}
5763	if CSS.MinLatencyInMs != nil {
5764		objectMap["minLatencyInMs"] = CSS.MinLatencyInMs
5765	}
5766	if CSS.MaxLatencyInMs != nil {
5767		objectMap["maxLatencyInMs"] = CSS.MaxLatencyInMs
5768	}
5769	if CSS.ProbesSent != nil {
5770		objectMap["probesSent"] = CSS.ProbesSent
5771	}
5772	if CSS.ProbesFailed != nil {
5773		objectMap["probesFailed"] = CSS.ProbesFailed
5774	}
5775	return json.Marshal(objectMap)
5776}
5777
5778// ConnectivityDestination parameters that define destination of connection.
5779type ConnectivityDestination struct {
5780	// ResourceID - The ID of the resource to which a connection attempt will be made.
5781	ResourceID *string `json:"resourceId,omitempty"`
5782	// Address - The IP address or URI the resource to which a connection attempt will be made.
5783	Address *string `json:"address,omitempty"`
5784	// Port - Port on which check connectivity will be performed.
5785	Port *int32 `json:"port,omitempty"`
5786}
5787
5788// ConnectivityHop information about a hop between the source and the destination.
5789type ConnectivityHop struct {
5790	// Type - READ-ONLY; The type of the hop.
5791	Type *string `json:"type,omitempty"`
5792	// ID - READ-ONLY; The ID of the hop.
5793	ID *string `json:"id,omitempty"`
5794	// Address - READ-ONLY; The IP address of the hop.
5795	Address *string `json:"address,omitempty"`
5796	// ResourceID - READ-ONLY; The ID of the resource corresponding to this hop.
5797	ResourceID *string `json:"resourceId,omitempty"`
5798	// NextHopIds - READ-ONLY; List of next hop identifiers.
5799	NextHopIds *[]string `json:"nextHopIds,omitempty"`
5800	// Issues - READ-ONLY; List of issues.
5801	Issues *[]ConnectivityIssue `json:"issues,omitempty"`
5802}
5803
5804// MarshalJSON is the custom marshaler for ConnectivityHop.
5805func (ch ConnectivityHop) MarshalJSON() ([]byte, error) {
5806	objectMap := make(map[string]interface{})
5807	return json.Marshal(objectMap)
5808}
5809
5810// ConnectivityInformation information on the connectivity status.
5811type ConnectivityInformation struct {
5812	autorest.Response `json:"-"`
5813	// Hops - READ-ONLY; List of hops between the source and the destination.
5814	Hops *[]ConnectivityHop `json:"hops,omitempty"`
5815	// ConnectionStatus - READ-ONLY; The connection status. Possible values include: 'ConnectionStatusUnknown', 'ConnectionStatusConnected', 'ConnectionStatusDisconnected', 'ConnectionStatusDegraded'
5816	ConnectionStatus ConnectionStatus `json:"connectionStatus,omitempty"`
5817	// AvgLatencyInMs - READ-ONLY; Average latency in milliseconds.
5818	AvgLatencyInMs *int32 `json:"avgLatencyInMs,omitempty"`
5819	// MinLatencyInMs - READ-ONLY; Minimum latency in milliseconds.
5820	MinLatencyInMs *int32 `json:"minLatencyInMs,omitempty"`
5821	// MaxLatencyInMs - READ-ONLY; Maximum latency in milliseconds.
5822	MaxLatencyInMs *int32 `json:"maxLatencyInMs,omitempty"`
5823	// ProbesSent - READ-ONLY; Total number of probes sent.
5824	ProbesSent *int32 `json:"probesSent,omitempty"`
5825	// ProbesFailed - READ-ONLY; Number of failed probes.
5826	ProbesFailed *int32 `json:"probesFailed,omitempty"`
5827}
5828
5829// MarshalJSON is the custom marshaler for ConnectivityInformation.
5830func (ci ConnectivityInformation) MarshalJSON() ([]byte, error) {
5831	objectMap := make(map[string]interface{})
5832	return json.Marshal(objectMap)
5833}
5834
5835// ConnectivityIssue information about an issue encountered in the process of checking for connectivity.
5836type ConnectivityIssue struct {
5837	// Origin - READ-ONLY; The origin of the issue. Possible values include: 'OriginLocal', 'OriginInbound', 'OriginOutbound'
5838	Origin Origin `json:"origin,omitempty"`
5839	// Severity - READ-ONLY; The severity of the issue. Possible values include: 'SeverityError', 'SeverityWarning'
5840	Severity Severity `json:"severity,omitempty"`
5841	// Type - READ-ONLY; The type of issue. Possible values include: 'IssueTypeUnknown', 'IssueTypeAgentStopped', 'IssueTypeGuestFirewall', 'IssueTypeDNSResolution', 'IssueTypeSocketBind', 'IssueTypeNetworkSecurityRule', 'IssueTypeUserDefinedRoute', 'IssueTypePortThrottled', 'IssueTypePlatform'
5842	Type IssueType `json:"type,omitempty"`
5843	// Context - READ-ONLY; Provides additional context on the issue.
5844	Context *[]map[string]*string `json:"context,omitempty"`
5845}
5846
5847// MarshalJSON is the custom marshaler for ConnectivityIssue.
5848func (ci ConnectivityIssue) MarshalJSON() ([]byte, error) {
5849	objectMap := make(map[string]interface{})
5850	return json.Marshal(objectMap)
5851}
5852
5853// ConnectivityParameters parameters that determine how the connectivity check will be performed.
5854type ConnectivityParameters struct {
5855	Source      *ConnectivitySource      `json:"source,omitempty"`
5856	Destination *ConnectivityDestination `json:"destination,omitempty"`
5857	// Protocol - Network protocol. Possible values include: 'ProtocolTCP', 'ProtocolHTTP', 'ProtocolHTTPS', 'ProtocolIcmp'
5858	Protocol              Protocol               `json:"protocol,omitempty"`
5859	ProtocolConfiguration *ProtocolConfiguration `json:"protocolConfiguration,omitempty"`
5860}
5861
5862// ConnectivitySource parameters that define the source of the connection.
5863type ConnectivitySource struct {
5864	// ResourceID - The ID of the resource from which a connectivity check will be initiated.
5865	ResourceID *string `json:"resourceId,omitempty"`
5866	// Port - The source port from which a connectivity check will be performed.
5867	Port *int32 `json:"port,omitempty"`
5868}
5869
5870// Container reference to container resource in remote resource provider.
5871type Container struct {
5872	// ID - Resource ID.
5873	ID *string `json:"id,omitempty"`
5874}
5875
5876// ContainerNetworkInterface container network interface child resource.
5877type ContainerNetworkInterface struct {
5878	// ContainerNetworkInterfacePropertiesFormat - Container network interface properties.
5879	*ContainerNetworkInterfacePropertiesFormat `json:"properties,omitempty"`
5880	// Name - The name of the resource. This name can be used to access the resource.
5881	Name *string `json:"name,omitempty"`
5882	// Type - READ-ONLY; Sub Resource type.
5883	Type *string `json:"type,omitempty"`
5884	// Etag - A unique read-only string that changes whenever the resource is updated.
5885	Etag *string `json:"etag,omitempty"`
5886	// ID - Resource ID.
5887	ID *string `json:"id,omitempty"`
5888}
5889
5890// MarshalJSON is the custom marshaler for ContainerNetworkInterface.
5891func (cni ContainerNetworkInterface) MarshalJSON() ([]byte, error) {
5892	objectMap := make(map[string]interface{})
5893	if cni.ContainerNetworkInterfacePropertiesFormat != nil {
5894		objectMap["properties"] = cni.ContainerNetworkInterfacePropertiesFormat
5895	}
5896	if cni.Name != nil {
5897		objectMap["name"] = cni.Name
5898	}
5899	if cni.Etag != nil {
5900		objectMap["etag"] = cni.Etag
5901	}
5902	if cni.ID != nil {
5903		objectMap["id"] = cni.ID
5904	}
5905	return json.Marshal(objectMap)
5906}
5907
5908// UnmarshalJSON is the custom unmarshaler for ContainerNetworkInterface struct.
5909func (cni *ContainerNetworkInterface) UnmarshalJSON(body []byte) error {
5910	var m map[string]*json.RawMessage
5911	err := json.Unmarshal(body, &m)
5912	if err != nil {
5913		return err
5914	}
5915	for k, v := range m {
5916		switch k {
5917		case "properties":
5918			if v != nil {
5919				var containerNetworkInterfacePropertiesFormat ContainerNetworkInterfacePropertiesFormat
5920				err = json.Unmarshal(*v, &containerNetworkInterfacePropertiesFormat)
5921				if err != nil {
5922					return err
5923				}
5924				cni.ContainerNetworkInterfacePropertiesFormat = &containerNetworkInterfacePropertiesFormat
5925			}
5926		case "name":
5927			if v != nil {
5928				var name string
5929				err = json.Unmarshal(*v, &name)
5930				if err != nil {
5931					return err
5932				}
5933				cni.Name = &name
5934			}
5935		case "type":
5936			if v != nil {
5937				var typeVar string
5938				err = json.Unmarshal(*v, &typeVar)
5939				if err != nil {
5940					return err
5941				}
5942				cni.Type = &typeVar
5943			}
5944		case "etag":
5945			if v != nil {
5946				var etag string
5947				err = json.Unmarshal(*v, &etag)
5948				if err != nil {
5949					return err
5950				}
5951				cni.Etag = &etag
5952			}
5953		case "id":
5954			if v != nil {
5955				var ID string
5956				err = json.Unmarshal(*v, &ID)
5957				if err != nil {
5958					return err
5959				}
5960				cni.ID = &ID
5961			}
5962		}
5963	}
5964
5965	return nil
5966}
5967
5968// ContainerNetworkInterfaceConfiguration container network interface configuration child resource.
5969type ContainerNetworkInterfaceConfiguration struct {
5970	// ContainerNetworkInterfaceConfigurationPropertiesFormat - Container network interface configuration properties.
5971	*ContainerNetworkInterfaceConfigurationPropertiesFormat `json:"properties,omitempty"`
5972	// Name - The name of the resource. This name can be used to access the resource.
5973	Name *string `json:"name,omitempty"`
5974	// Type - READ-ONLY; Sub Resource type.
5975	Type *string `json:"type,omitempty"`
5976	// Etag - A unique read-only string that changes whenever the resource is updated.
5977	Etag *string `json:"etag,omitempty"`
5978	// ID - Resource ID.
5979	ID *string `json:"id,omitempty"`
5980}
5981
5982// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceConfiguration.
5983func (cnic ContainerNetworkInterfaceConfiguration) MarshalJSON() ([]byte, error) {
5984	objectMap := make(map[string]interface{})
5985	if cnic.ContainerNetworkInterfaceConfigurationPropertiesFormat != nil {
5986		objectMap["properties"] = cnic.ContainerNetworkInterfaceConfigurationPropertiesFormat
5987	}
5988	if cnic.Name != nil {
5989		objectMap["name"] = cnic.Name
5990	}
5991	if cnic.Etag != nil {
5992		objectMap["etag"] = cnic.Etag
5993	}
5994	if cnic.ID != nil {
5995		objectMap["id"] = cnic.ID
5996	}
5997	return json.Marshal(objectMap)
5998}
5999
6000// UnmarshalJSON is the custom unmarshaler for ContainerNetworkInterfaceConfiguration struct.
6001func (cnic *ContainerNetworkInterfaceConfiguration) UnmarshalJSON(body []byte) error {
6002	var m map[string]*json.RawMessage
6003	err := json.Unmarshal(body, &m)
6004	if err != nil {
6005		return err
6006	}
6007	for k, v := range m {
6008		switch k {
6009		case "properties":
6010			if v != nil {
6011				var containerNetworkInterfaceConfigurationPropertiesFormat ContainerNetworkInterfaceConfigurationPropertiesFormat
6012				err = json.Unmarshal(*v, &containerNetworkInterfaceConfigurationPropertiesFormat)
6013				if err != nil {
6014					return err
6015				}
6016				cnic.ContainerNetworkInterfaceConfigurationPropertiesFormat = &containerNetworkInterfaceConfigurationPropertiesFormat
6017			}
6018		case "name":
6019			if v != nil {
6020				var name string
6021				err = json.Unmarshal(*v, &name)
6022				if err != nil {
6023					return err
6024				}
6025				cnic.Name = &name
6026			}
6027		case "type":
6028			if v != nil {
6029				var typeVar string
6030				err = json.Unmarshal(*v, &typeVar)
6031				if err != nil {
6032					return err
6033				}
6034				cnic.Type = &typeVar
6035			}
6036		case "etag":
6037			if v != nil {
6038				var etag string
6039				err = json.Unmarshal(*v, &etag)
6040				if err != nil {
6041					return err
6042				}
6043				cnic.Etag = &etag
6044			}
6045		case "id":
6046			if v != nil {
6047				var ID string
6048				err = json.Unmarshal(*v, &ID)
6049				if err != nil {
6050					return err
6051				}
6052				cnic.ID = &ID
6053			}
6054		}
6055	}
6056
6057	return nil
6058}
6059
6060// ContainerNetworkInterfaceConfigurationPropertiesFormat container network interface configuration
6061// properties.
6062type ContainerNetworkInterfaceConfigurationPropertiesFormat struct {
6063	// IPConfigurations - A list of ip configurations of the container network interface configuration.
6064	IPConfigurations *[]IPConfigurationProfile `json:"ipConfigurations,omitempty"`
6065	// ContainerNetworkInterfaces - A list of container network interfaces created from this container network interface configuration.
6066	ContainerNetworkInterfaces *[]ContainerNetworkInterface `json:"containerNetworkInterfaces,omitempty"`
6067	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
6068	ProvisioningState *string `json:"provisioningState,omitempty"`
6069}
6070
6071// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceConfigurationPropertiesFormat.
6072func (cnicpf ContainerNetworkInterfaceConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
6073	objectMap := make(map[string]interface{})
6074	if cnicpf.IPConfigurations != nil {
6075		objectMap["ipConfigurations"] = cnicpf.IPConfigurations
6076	}
6077	if cnicpf.ContainerNetworkInterfaces != nil {
6078		objectMap["containerNetworkInterfaces"] = cnicpf.ContainerNetworkInterfaces
6079	}
6080	return json.Marshal(objectMap)
6081}
6082
6083// ContainerNetworkInterfaceIPConfiguration the ip configuration for a container network interface.
6084type ContainerNetworkInterfaceIPConfiguration struct {
6085	// ContainerNetworkInterfaceIPConfigurationPropertiesFormat - Properties of the container network interface IP configuration.
6086	*ContainerNetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"`
6087	// Name - The name of the resource. This name can be used to access the resource.
6088	Name *string `json:"name,omitempty"`
6089	// Type - READ-ONLY; Sub Resource type.
6090	Type *string `json:"type,omitempty"`
6091	// Etag - A unique read-only string that changes whenever the resource is updated.
6092	Etag *string `json:"etag,omitempty"`
6093}
6094
6095// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceIPConfiguration.
6096func (cniic ContainerNetworkInterfaceIPConfiguration) MarshalJSON() ([]byte, error) {
6097	objectMap := make(map[string]interface{})
6098	if cniic.ContainerNetworkInterfaceIPConfigurationPropertiesFormat != nil {
6099		objectMap["properties"] = cniic.ContainerNetworkInterfaceIPConfigurationPropertiesFormat
6100	}
6101	if cniic.Name != nil {
6102		objectMap["name"] = cniic.Name
6103	}
6104	if cniic.Etag != nil {
6105		objectMap["etag"] = cniic.Etag
6106	}
6107	return json.Marshal(objectMap)
6108}
6109
6110// UnmarshalJSON is the custom unmarshaler for ContainerNetworkInterfaceIPConfiguration struct.
6111func (cniic *ContainerNetworkInterfaceIPConfiguration) UnmarshalJSON(body []byte) error {
6112	var m map[string]*json.RawMessage
6113	err := json.Unmarshal(body, &m)
6114	if err != nil {
6115		return err
6116	}
6117	for k, v := range m {
6118		switch k {
6119		case "properties":
6120			if v != nil {
6121				var containerNetworkInterfaceIPConfigurationPropertiesFormat ContainerNetworkInterfaceIPConfigurationPropertiesFormat
6122				err = json.Unmarshal(*v, &containerNetworkInterfaceIPConfigurationPropertiesFormat)
6123				if err != nil {
6124					return err
6125				}
6126				cniic.ContainerNetworkInterfaceIPConfigurationPropertiesFormat = &containerNetworkInterfaceIPConfigurationPropertiesFormat
6127			}
6128		case "name":
6129			if v != nil {
6130				var name string
6131				err = json.Unmarshal(*v, &name)
6132				if err != nil {
6133					return err
6134				}
6135				cniic.Name = &name
6136			}
6137		case "type":
6138			if v != nil {
6139				var typeVar string
6140				err = json.Unmarshal(*v, &typeVar)
6141				if err != nil {
6142					return err
6143				}
6144				cniic.Type = &typeVar
6145			}
6146		case "etag":
6147			if v != nil {
6148				var etag string
6149				err = json.Unmarshal(*v, &etag)
6150				if err != nil {
6151					return err
6152				}
6153				cniic.Etag = &etag
6154			}
6155		}
6156	}
6157
6158	return nil
6159}
6160
6161// ContainerNetworkInterfaceIPConfigurationPropertiesFormat properties of the container network interface
6162// IP configuration.
6163type ContainerNetworkInterfaceIPConfigurationPropertiesFormat struct {
6164	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
6165	ProvisioningState *string `json:"provisioningState,omitempty"`
6166}
6167
6168// MarshalJSON is the custom marshaler for ContainerNetworkInterfaceIPConfigurationPropertiesFormat.
6169func (cniicpf ContainerNetworkInterfaceIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
6170	objectMap := make(map[string]interface{})
6171	return json.Marshal(objectMap)
6172}
6173
6174// ContainerNetworkInterfacePropertiesFormat ...
6175type ContainerNetworkInterfacePropertiesFormat struct {
6176	// ContainerNetworkInterfaceConfiguration - Container network interface configuration from which this container network interface is created.
6177	ContainerNetworkInterfaceConfiguration *ContainerNetworkInterfaceConfiguration `json:"containerNetworkInterfaceConfiguration,omitempty"`
6178	// Container - Reference to the container to which this container network interface is attached.
6179	Container *Container `json:"container,omitempty"`
6180	// IPConfigurations - Reference to the ip configuration on this container nic.
6181	IPConfigurations *[]ContainerNetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"`
6182	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
6183	ProvisioningState *string `json:"provisioningState,omitempty"`
6184}
6185
6186// MarshalJSON is the custom marshaler for ContainerNetworkInterfacePropertiesFormat.
6187func (cnipf ContainerNetworkInterfacePropertiesFormat) MarshalJSON() ([]byte, error) {
6188	objectMap := make(map[string]interface{})
6189	if cnipf.ContainerNetworkInterfaceConfiguration != nil {
6190		objectMap["containerNetworkInterfaceConfiguration"] = cnipf.ContainerNetworkInterfaceConfiguration
6191	}
6192	if cnipf.Container != nil {
6193		objectMap["container"] = cnipf.Container
6194	}
6195	if cnipf.IPConfigurations != nil {
6196		objectMap["ipConfigurations"] = cnipf.IPConfigurations
6197	}
6198	return json.Marshal(objectMap)
6199}
6200
6201// DdosProtectionPlan a DDoS protection plan in a resource group.
6202type DdosProtectionPlan struct {
6203	autorest.Response `json:"-"`
6204	// ID - READ-ONLY; Resource ID.
6205	ID *string `json:"id,omitempty"`
6206	// Name - READ-ONLY; Resource name.
6207	Name *string `json:"name,omitempty"`
6208	// Type - READ-ONLY; Resource type.
6209	Type *string `json:"type,omitempty"`
6210	// Location - Resource location.
6211	Location *string `json:"location,omitempty"`
6212	// Tags - Resource tags.
6213	Tags map[string]*string `json:"tags"`
6214	// DdosProtectionPlanPropertiesFormat - Properties of the DDoS protection plan.
6215	*DdosProtectionPlanPropertiesFormat `json:"properties,omitempty"`
6216	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
6217	Etag *string `json:"etag,omitempty"`
6218}
6219
6220// MarshalJSON is the custom marshaler for DdosProtectionPlan.
6221func (dpp DdosProtectionPlan) MarshalJSON() ([]byte, error) {
6222	objectMap := make(map[string]interface{})
6223	if dpp.Location != nil {
6224		objectMap["location"] = dpp.Location
6225	}
6226	if dpp.Tags != nil {
6227		objectMap["tags"] = dpp.Tags
6228	}
6229	if dpp.DdosProtectionPlanPropertiesFormat != nil {
6230		objectMap["properties"] = dpp.DdosProtectionPlanPropertiesFormat
6231	}
6232	return json.Marshal(objectMap)
6233}
6234
6235// UnmarshalJSON is the custom unmarshaler for DdosProtectionPlan struct.
6236func (dpp *DdosProtectionPlan) UnmarshalJSON(body []byte) error {
6237	var m map[string]*json.RawMessage
6238	err := json.Unmarshal(body, &m)
6239	if err != nil {
6240		return err
6241	}
6242	for k, v := range m {
6243		switch k {
6244		case "id":
6245			if v != nil {
6246				var ID string
6247				err = json.Unmarshal(*v, &ID)
6248				if err != nil {
6249					return err
6250				}
6251				dpp.ID = &ID
6252			}
6253		case "name":
6254			if v != nil {
6255				var name string
6256				err = json.Unmarshal(*v, &name)
6257				if err != nil {
6258					return err
6259				}
6260				dpp.Name = &name
6261			}
6262		case "type":
6263			if v != nil {
6264				var typeVar string
6265				err = json.Unmarshal(*v, &typeVar)
6266				if err != nil {
6267					return err
6268				}
6269				dpp.Type = &typeVar
6270			}
6271		case "location":
6272			if v != nil {
6273				var location string
6274				err = json.Unmarshal(*v, &location)
6275				if err != nil {
6276					return err
6277				}
6278				dpp.Location = &location
6279			}
6280		case "tags":
6281			if v != nil {
6282				var tags map[string]*string
6283				err = json.Unmarshal(*v, &tags)
6284				if err != nil {
6285					return err
6286				}
6287				dpp.Tags = tags
6288			}
6289		case "properties":
6290			if v != nil {
6291				var ddosProtectionPlanPropertiesFormat DdosProtectionPlanPropertiesFormat
6292				err = json.Unmarshal(*v, &ddosProtectionPlanPropertiesFormat)
6293				if err != nil {
6294					return err
6295				}
6296				dpp.DdosProtectionPlanPropertiesFormat = &ddosProtectionPlanPropertiesFormat
6297			}
6298		case "etag":
6299			if v != nil {
6300				var etag string
6301				err = json.Unmarshal(*v, &etag)
6302				if err != nil {
6303					return err
6304				}
6305				dpp.Etag = &etag
6306			}
6307		}
6308	}
6309
6310	return nil
6311}
6312
6313// DdosProtectionPlanListResult a list of DDoS protection plans.
6314type DdosProtectionPlanListResult struct {
6315	autorest.Response `json:"-"`
6316	// Value - A list of DDoS protection plans.
6317	Value *[]DdosProtectionPlan `json:"value,omitempty"`
6318	// NextLink - READ-ONLY; The URL to get the next set of results.
6319	NextLink *string `json:"nextLink,omitempty"`
6320}
6321
6322// MarshalJSON is the custom marshaler for DdosProtectionPlanListResult.
6323func (dpplr DdosProtectionPlanListResult) MarshalJSON() ([]byte, error) {
6324	objectMap := make(map[string]interface{})
6325	if dpplr.Value != nil {
6326		objectMap["value"] = dpplr.Value
6327	}
6328	return json.Marshal(objectMap)
6329}
6330
6331// DdosProtectionPlanListResultIterator provides access to a complete listing of DdosProtectionPlan values.
6332type DdosProtectionPlanListResultIterator struct {
6333	i    int
6334	page DdosProtectionPlanListResultPage
6335}
6336
6337// NextWithContext advances to the next value.  If there was an error making
6338// the request the iterator does not advance and the error is returned.
6339func (iter *DdosProtectionPlanListResultIterator) NextWithContext(ctx context.Context) (err error) {
6340	if tracing.IsEnabled() {
6341		ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlanListResultIterator.NextWithContext")
6342		defer func() {
6343			sc := -1
6344			if iter.Response().Response.Response != nil {
6345				sc = iter.Response().Response.Response.StatusCode
6346			}
6347			tracing.EndSpan(ctx, sc, err)
6348		}()
6349	}
6350	iter.i++
6351	if iter.i < len(iter.page.Values()) {
6352		return nil
6353	}
6354	err = iter.page.NextWithContext(ctx)
6355	if err != nil {
6356		iter.i--
6357		return err
6358	}
6359	iter.i = 0
6360	return nil
6361}
6362
6363// Next advances to the next value.  If there was an error making
6364// the request the iterator does not advance and the error is returned.
6365// Deprecated: Use NextWithContext() instead.
6366func (iter *DdosProtectionPlanListResultIterator) Next() error {
6367	return iter.NextWithContext(context.Background())
6368}
6369
6370// NotDone returns true if the enumeration should be started or is not yet complete.
6371func (iter DdosProtectionPlanListResultIterator) NotDone() bool {
6372	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6373}
6374
6375// Response returns the raw server response from the last page request.
6376func (iter DdosProtectionPlanListResultIterator) Response() DdosProtectionPlanListResult {
6377	return iter.page.Response()
6378}
6379
6380// Value returns the current value or a zero-initialized value if the
6381// iterator has advanced beyond the end of the collection.
6382func (iter DdosProtectionPlanListResultIterator) Value() DdosProtectionPlan {
6383	if !iter.page.NotDone() {
6384		return DdosProtectionPlan{}
6385	}
6386	return iter.page.Values()[iter.i]
6387}
6388
6389// Creates a new instance of the DdosProtectionPlanListResultIterator type.
6390func NewDdosProtectionPlanListResultIterator(page DdosProtectionPlanListResultPage) DdosProtectionPlanListResultIterator {
6391	return DdosProtectionPlanListResultIterator{page: page}
6392}
6393
6394// IsEmpty returns true if the ListResult contains no values.
6395func (dpplr DdosProtectionPlanListResult) IsEmpty() bool {
6396	return dpplr.Value == nil || len(*dpplr.Value) == 0
6397}
6398
6399// hasNextLink returns true if the NextLink is not empty.
6400func (dpplr DdosProtectionPlanListResult) hasNextLink() bool {
6401	return dpplr.NextLink != nil && len(*dpplr.NextLink) != 0
6402}
6403
6404// ddosProtectionPlanListResultPreparer prepares a request to retrieve the next set of results.
6405// It returns nil if no more results exist.
6406func (dpplr DdosProtectionPlanListResult) ddosProtectionPlanListResultPreparer(ctx context.Context) (*http.Request, error) {
6407	if !dpplr.hasNextLink() {
6408		return nil, nil
6409	}
6410	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6411		autorest.AsJSON(),
6412		autorest.AsGet(),
6413		autorest.WithBaseURL(to.String(dpplr.NextLink)))
6414}
6415
6416// DdosProtectionPlanListResultPage contains a page of DdosProtectionPlan values.
6417type DdosProtectionPlanListResultPage struct {
6418	fn    func(context.Context, DdosProtectionPlanListResult) (DdosProtectionPlanListResult, error)
6419	dpplr DdosProtectionPlanListResult
6420}
6421
6422// NextWithContext advances to the next page of values.  If there was an error making
6423// the request the page does not advance and the error is returned.
6424func (page *DdosProtectionPlanListResultPage) NextWithContext(ctx context.Context) (err error) {
6425	if tracing.IsEnabled() {
6426		ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlanListResultPage.NextWithContext")
6427		defer func() {
6428			sc := -1
6429			if page.Response().Response.Response != nil {
6430				sc = page.Response().Response.Response.StatusCode
6431			}
6432			tracing.EndSpan(ctx, sc, err)
6433		}()
6434	}
6435	for {
6436		next, err := page.fn(ctx, page.dpplr)
6437		if err != nil {
6438			return err
6439		}
6440		page.dpplr = next
6441		if !next.hasNextLink() || !next.IsEmpty() {
6442			break
6443		}
6444	}
6445	return nil
6446}
6447
6448// Next advances to the next page of values.  If there was an error making
6449// the request the page does not advance and the error is returned.
6450// Deprecated: Use NextWithContext() instead.
6451func (page *DdosProtectionPlanListResultPage) Next() error {
6452	return page.NextWithContext(context.Background())
6453}
6454
6455// NotDone returns true if the page enumeration should be started or is not yet complete.
6456func (page DdosProtectionPlanListResultPage) NotDone() bool {
6457	return !page.dpplr.IsEmpty()
6458}
6459
6460// Response returns the raw server response from the last page request.
6461func (page DdosProtectionPlanListResultPage) Response() DdosProtectionPlanListResult {
6462	return page.dpplr
6463}
6464
6465// Values returns the slice of values for the current page or nil if there are no values.
6466func (page DdosProtectionPlanListResultPage) Values() []DdosProtectionPlan {
6467	if page.dpplr.IsEmpty() {
6468		return nil
6469	}
6470	return *page.dpplr.Value
6471}
6472
6473// Creates a new instance of the DdosProtectionPlanListResultPage type.
6474func NewDdosProtectionPlanListResultPage(cur DdosProtectionPlanListResult, getNextPage func(context.Context, DdosProtectionPlanListResult) (DdosProtectionPlanListResult, error)) DdosProtectionPlanListResultPage {
6475	return DdosProtectionPlanListResultPage{
6476		fn:    getNextPage,
6477		dpplr: cur,
6478	}
6479}
6480
6481// DdosProtectionPlanPropertiesFormat dDoS protection plan properties.
6482type DdosProtectionPlanPropertiesFormat struct {
6483	// 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.
6484	ResourceGUID *string `json:"resourceGuid,omitempty"`
6485	// ProvisioningState - READ-ONLY; The provisioning state of the DDoS protection plan resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
6486	ProvisioningState *string `json:"provisioningState,omitempty"`
6487	// VirtualNetworks - READ-ONLY; The list of virtual networks associated with the DDoS protection plan resource. This list is read-only.
6488	VirtualNetworks *[]SubResource `json:"virtualNetworks,omitempty"`
6489}
6490
6491// MarshalJSON is the custom marshaler for DdosProtectionPlanPropertiesFormat.
6492func (dpppf DdosProtectionPlanPropertiesFormat) MarshalJSON() ([]byte, error) {
6493	objectMap := make(map[string]interface{})
6494	return json.Marshal(objectMap)
6495}
6496
6497// DdosProtectionPlansCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
6498// long-running operation.
6499type DdosProtectionPlansCreateOrUpdateFuture struct {
6500	azure.FutureAPI
6501	// Result returns the result of the asynchronous operation.
6502	// If the operation has not completed it will return an error.
6503	Result func(DdosProtectionPlansClient) (DdosProtectionPlan, error)
6504}
6505
6506// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6507func (future *DdosProtectionPlansCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
6508	var azFuture azure.Future
6509	if err := json.Unmarshal(body, &azFuture); err != nil {
6510		return err
6511	}
6512	future.FutureAPI = &azFuture
6513	future.Result = future.result
6514	return nil
6515}
6516
6517// result is the default implementation for DdosProtectionPlansCreateOrUpdateFuture.Result.
6518func (future *DdosProtectionPlansCreateOrUpdateFuture) result(client DdosProtectionPlansClient) (dpp DdosProtectionPlan, err error) {
6519	var done bool
6520	done, err = future.DoneWithContext(context.Background(), client)
6521	if err != nil {
6522		err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
6523		return
6524	}
6525	if !done {
6526		dpp.Response.Response = future.Response()
6527		err = azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansCreateOrUpdateFuture")
6528		return
6529	}
6530	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6531	if dpp.Response.Response, err = future.GetResult(sender); err == nil && dpp.Response.Response.StatusCode != http.StatusNoContent {
6532		dpp, err = client.CreateOrUpdateResponder(dpp.Response.Response)
6533		if err != nil {
6534			err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansCreateOrUpdateFuture", "Result", dpp.Response.Response, "Failure responding to request")
6535		}
6536	}
6537	return
6538}
6539
6540// DdosProtectionPlansDeleteFuture an abstraction for monitoring and retrieving the results of a
6541// long-running operation.
6542type DdosProtectionPlansDeleteFuture struct {
6543	azure.FutureAPI
6544	// Result returns the result of the asynchronous operation.
6545	// If the operation has not completed it will return an error.
6546	Result func(DdosProtectionPlansClient) (autorest.Response, error)
6547}
6548
6549// UnmarshalJSON is the custom unmarshaller for CreateFuture.
6550func (future *DdosProtectionPlansDeleteFuture) UnmarshalJSON(body []byte) error {
6551	var azFuture azure.Future
6552	if err := json.Unmarshal(body, &azFuture); err != nil {
6553		return err
6554	}
6555	future.FutureAPI = &azFuture
6556	future.Result = future.result
6557	return nil
6558}
6559
6560// result is the default implementation for DdosProtectionPlansDeleteFuture.Result.
6561func (future *DdosProtectionPlansDeleteFuture) result(client DdosProtectionPlansClient) (ar autorest.Response, err error) {
6562	var done bool
6563	done, err = future.DoneWithContext(context.Background(), client)
6564	if err != nil {
6565		err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansDeleteFuture", "Result", future.Response(), "Polling failure")
6566		return
6567	}
6568	if !done {
6569		ar.Response = future.Response()
6570		err = azure.NewAsyncOpIncompleteError("network.DdosProtectionPlansDeleteFuture")
6571		return
6572	}
6573	ar.Response = future.Response()
6574	return
6575}
6576
6577// Delegation details the service to which the subnet is delegated.
6578type Delegation struct {
6579	// ServiceDelegationPropertiesFormat - Properties of the subnet.
6580	*ServiceDelegationPropertiesFormat `json:"properties,omitempty"`
6581	// Name - The name of the resource that is unique within a subnet. This name can be used to access the resource.
6582	Name *string `json:"name,omitempty"`
6583	// Etag - A unique read-only string that changes whenever the resource is updated.
6584	Etag *string `json:"etag,omitempty"`
6585	// ID - Resource ID.
6586	ID *string `json:"id,omitempty"`
6587}
6588
6589// MarshalJSON is the custom marshaler for Delegation.
6590func (d Delegation) MarshalJSON() ([]byte, error) {
6591	objectMap := make(map[string]interface{})
6592	if d.ServiceDelegationPropertiesFormat != nil {
6593		objectMap["properties"] = d.ServiceDelegationPropertiesFormat
6594	}
6595	if d.Name != nil {
6596		objectMap["name"] = d.Name
6597	}
6598	if d.Etag != nil {
6599		objectMap["etag"] = d.Etag
6600	}
6601	if d.ID != nil {
6602		objectMap["id"] = d.ID
6603	}
6604	return json.Marshal(objectMap)
6605}
6606
6607// UnmarshalJSON is the custom unmarshaler for Delegation struct.
6608func (d *Delegation) UnmarshalJSON(body []byte) error {
6609	var m map[string]*json.RawMessage
6610	err := json.Unmarshal(body, &m)
6611	if err != nil {
6612		return err
6613	}
6614	for k, v := range m {
6615		switch k {
6616		case "properties":
6617			if v != nil {
6618				var serviceDelegationPropertiesFormat ServiceDelegationPropertiesFormat
6619				err = json.Unmarshal(*v, &serviceDelegationPropertiesFormat)
6620				if err != nil {
6621					return err
6622				}
6623				d.ServiceDelegationPropertiesFormat = &serviceDelegationPropertiesFormat
6624			}
6625		case "name":
6626			if v != nil {
6627				var name string
6628				err = json.Unmarshal(*v, &name)
6629				if err != nil {
6630					return err
6631				}
6632				d.Name = &name
6633			}
6634		case "etag":
6635			if v != nil {
6636				var etag string
6637				err = json.Unmarshal(*v, &etag)
6638				if err != nil {
6639					return err
6640				}
6641				d.Etag = &etag
6642			}
6643		case "id":
6644			if v != nil {
6645				var ID string
6646				err = json.Unmarshal(*v, &ID)
6647				if err != nil {
6648					return err
6649				}
6650				d.ID = &ID
6651			}
6652		}
6653	}
6654
6655	return nil
6656}
6657
6658// DeviceProperties list of properties of the device.
6659type DeviceProperties struct {
6660	// DeviceVendor - Name of the device Vendor.
6661	DeviceVendor *string `json:"deviceVendor,omitempty"`
6662	// DeviceModel - Model of the device.
6663	DeviceModel *string `json:"deviceModel,omitempty"`
6664	// LinkSpeedInMbps - Link speed.
6665	LinkSpeedInMbps *int32 `json:"linkSpeedInMbps,omitempty"`
6666}
6667
6668// DhcpOptions dhcpOptions contains an array of DNS servers available to VMs deployed in the virtual
6669// network. Standard DHCP option for a subnet overrides VNET DHCP options.
6670type DhcpOptions struct {
6671	// DNSServers - The list of DNS servers IP addresses.
6672	DNSServers *[]string `json:"dnsServers,omitempty"`
6673}
6674
6675// Dimension dimension of the metric.
6676type Dimension struct {
6677	// Name - The name of the dimension.
6678	Name *string `json:"name,omitempty"`
6679	// DisplayName - The display name of the dimension.
6680	DisplayName *string `json:"displayName,omitempty"`
6681	// InternalName - The internal name of the dimension.
6682	InternalName *string `json:"internalName,omitempty"`
6683}
6684
6685// DNSNameAvailabilityResult response for the CheckDnsNameAvailability API service call.
6686type DNSNameAvailabilityResult struct {
6687	autorest.Response `json:"-"`
6688	// Available - Domain availability (True/False).
6689	Available *bool `json:"available,omitempty"`
6690}
6691
6692// EffectiveNetworkSecurityGroup effective network security group.
6693type EffectiveNetworkSecurityGroup struct {
6694	// NetworkSecurityGroup - The ID of network security group that is applied.
6695	NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"`
6696	// Association - Associated resources.
6697	Association *EffectiveNetworkSecurityGroupAssociation `json:"association,omitempty"`
6698	// EffectiveSecurityRules - A collection of effective security rules.
6699	EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"`
6700	// TagMap - Mapping of tags to list of IP Addresses included within the tag.
6701	TagMap map[string][]string `json:"tagMap"`
6702}
6703
6704// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroup.
6705func (ensg EffectiveNetworkSecurityGroup) MarshalJSON() ([]byte, error) {
6706	objectMap := make(map[string]interface{})
6707	if ensg.NetworkSecurityGroup != nil {
6708		objectMap["networkSecurityGroup"] = ensg.NetworkSecurityGroup
6709	}
6710	if ensg.Association != nil {
6711		objectMap["association"] = ensg.Association
6712	}
6713	if ensg.EffectiveSecurityRules != nil {
6714		objectMap["effectiveSecurityRules"] = ensg.EffectiveSecurityRules
6715	}
6716	if ensg.TagMap != nil {
6717		objectMap["tagMap"] = ensg.TagMap
6718	}
6719	return json.Marshal(objectMap)
6720}
6721
6722// EffectiveNetworkSecurityGroupAssociation the effective network security group association.
6723type EffectiveNetworkSecurityGroupAssociation struct {
6724	// Subnet - The ID of the subnet if assigned.
6725	Subnet *SubResource `json:"subnet,omitempty"`
6726	// NetworkInterface - The ID of the network interface if assigned.
6727	NetworkInterface *SubResource `json:"networkInterface,omitempty"`
6728}
6729
6730// EffectiveNetworkSecurityGroupListResult response for list effective network security groups API service
6731// call.
6732type EffectiveNetworkSecurityGroupListResult struct {
6733	autorest.Response `json:"-"`
6734	// Value - A list of effective network security groups.
6735	Value *[]EffectiveNetworkSecurityGroup `json:"value,omitempty"`
6736	// NextLink - READ-ONLY; The URL to get the next set of results.
6737	NextLink *string `json:"nextLink,omitempty"`
6738}
6739
6740// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroupListResult.
6741func (ensglr EffectiveNetworkSecurityGroupListResult) MarshalJSON() ([]byte, error) {
6742	objectMap := make(map[string]interface{})
6743	if ensglr.Value != nil {
6744		objectMap["value"] = ensglr.Value
6745	}
6746	return json.Marshal(objectMap)
6747}
6748
6749// EffectiveNetworkSecurityRule effective network security rules.
6750type EffectiveNetworkSecurityRule struct {
6751	// Name - The name of the security rule specified by the user (if created by the user).
6752	Name *string `json:"name,omitempty"`
6753	// Protocol - The network protocol this rule applies to. Possible values are: 'Tcp', 'Udp', and 'All'. Possible values include: 'EffectiveSecurityRuleProtocolTCP', 'EffectiveSecurityRuleProtocolUDP', 'EffectiveSecurityRuleProtocolAll'
6754	Protocol EffectiveSecurityRuleProtocol `json:"protocol,omitempty"`
6755	// SourcePortRange - The source port or range.
6756	SourcePortRange *string `json:"sourcePortRange,omitempty"`
6757	// DestinationPortRange - The destination port or range.
6758	DestinationPortRange *string `json:"destinationPortRange,omitempty"`
6759	// 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 (*)
6760	SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"`
6761	// 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 (*)
6762	DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"`
6763	// SourceAddressPrefix - The source address prefix.
6764	SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
6765	// DestinationAddressPrefix - The destination address prefix.
6766	DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"`
6767	// SourceAddressPrefixes - The source address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*).
6768	SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"`
6769	// DestinationAddressPrefixes - The destination address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*).
6770	DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"`
6771	// ExpandedSourceAddressPrefix - The expanded source address prefix.
6772	ExpandedSourceAddressPrefix *[]string `json:"expandedSourceAddressPrefix,omitempty"`
6773	// ExpandedDestinationAddressPrefix - Expanded destination address prefix.
6774	ExpandedDestinationAddressPrefix *[]string `json:"expandedDestinationAddressPrefix,omitempty"`
6775	// Access - Whether network traffic is allowed or denied. Possible values are: 'Allow' and 'Deny'. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
6776	Access SecurityRuleAccess `json:"access,omitempty"`
6777	// Priority - The priority of the rule.
6778	Priority *int32 `json:"priority,omitempty"`
6779	// Direction - The direction of the rule. Possible values are: 'Inbound and Outbound'. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound'
6780	Direction SecurityRuleDirection `json:"direction,omitempty"`
6781}
6782
6783// EffectiveRoute effective Route
6784type EffectiveRoute struct {
6785	// Name - The name of the user defined route. This is optional.
6786	Name *string `json:"name,omitempty"`
6787	// Source - Who created the route. Possible values are: 'Unknown', 'User', 'VirtualNetworkGateway', and 'Default'. Possible values include: 'EffectiveRouteSourceUnknown', 'EffectiveRouteSourceUser', 'EffectiveRouteSourceVirtualNetworkGateway', 'EffectiveRouteSourceDefault'
6788	Source EffectiveRouteSource `json:"source,omitempty"`
6789	// State - The value of effective route. Possible values are: 'Active' and 'Invalid'. Possible values include: 'EffectiveRouteStateActive', 'EffectiveRouteStateInvalid'
6790	State EffectiveRouteState `json:"state,omitempty"`
6791	// AddressPrefix - The address prefixes of the effective routes in CIDR notation.
6792	AddressPrefix *[]string `json:"addressPrefix,omitempty"`
6793	// NextHopIPAddress - The IP address of the next hop of the effective route.
6794	NextHopIPAddress *[]string `json:"nextHopIpAddress,omitempty"`
6795	// 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'
6796	NextHopType RouteNextHopType `json:"nextHopType,omitempty"`
6797}
6798
6799// EffectiveRouteListResult response for list effective route API service call.
6800type EffectiveRouteListResult struct {
6801	autorest.Response `json:"-"`
6802	// Value - A list of effective routes.
6803	Value *[]EffectiveRoute `json:"value,omitempty"`
6804	// NextLink - READ-ONLY; The URL to get the next set of results.
6805	NextLink *string `json:"nextLink,omitempty"`
6806}
6807
6808// MarshalJSON is the custom marshaler for EffectiveRouteListResult.
6809func (erlr EffectiveRouteListResult) MarshalJSON() ([]byte, error) {
6810	objectMap := make(map[string]interface{})
6811	if erlr.Value != nil {
6812		objectMap["value"] = erlr.Value
6813	}
6814	return json.Marshal(objectMap)
6815}
6816
6817// EndpointService identifies the service being brought into the virtual network.
6818type EndpointService struct {
6819	// ID - A unique identifier of the service being referenced by the interface endpoint.
6820	ID *string `json:"id,omitempty"`
6821}
6822
6823// EndpointServiceResult endpoint service.
6824type EndpointServiceResult struct {
6825	// Name - READ-ONLY; Name of the endpoint service.
6826	Name *string `json:"name,omitempty"`
6827	// Type - READ-ONLY; Type of the endpoint service.
6828	Type *string `json:"type,omitempty"`
6829	// ID - Resource ID.
6830	ID *string `json:"id,omitempty"`
6831}
6832
6833// MarshalJSON is the custom marshaler for EndpointServiceResult.
6834func (esr EndpointServiceResult) MarshalJSON() ([]byte, error) {
6835	objectMap := make(map[string]interface{})
6836	if esr.ID != nil {
6837		objectMap["id"] = esr.ID
6838	}
6839	return json.Marshal(objectMap)
6840}
6841
6842// EndpointServicesListResult response for the ListAvailableEndpointServices API service call.
6843type EndpointServicesListResult struct {
6844	autorest.Response `json:"-"`
6845	// Value - List of available endpoint services in a region.
6846	Value *[]EndpointServiceResult `json:"value,omitempty"`
6847	// NextLink - The URL to get the next set of results.
6848	NextLink *string `json:"nextLink,omitempty"`
6849}
6850
6851// EndpointServicesListResultIterator provides access to a complete listing of EndpointServiceResult
6852// values.
6853type EndpointServicesListResultIterator struct {
6854	i    int
6855	page EndpointServicesListResultPage
6856}
6857
6858// NextWithContext advances to the next value.  If there was an error making
6859// the request the iterator does not advance and the error is returned.
6860func (iter *EndpointServicesListResultIterator) NextWithContext(ctx context.Context) (err error) {
6861	if tracing.IsEnabled() {
6862		ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultIterator.NextWithContext")
6863		defer func() {
6864			sc := -1
6865			if iter.Response().Response.Response != nil {
6866				sc = iter.Response().Response.Response.StatusCode
6867			}
6868			tracing.EndSpan(ctx, sc, err)
6869		}()
6870	}
6871	iter.i++
6872	if iter.i < len(iter.page.Values()) {
6873		return nil
6874	}
6875	err = iter.page.NextWithContext(ctx)
6876	if err != nil {
6877		iter.i--
6878		return err
6879	}
6880	iter.i = 0
6881	return nil
6882}
6883
6884// Next advances to the next value.  If there was an error making
6885// the request the iterator does not advance and the error is returned.
6886// Deprecated: Use NextWithContext() instead.
6887func (iter *EndpointServicesListResultIterator) Next() error {
6888	return iter.NextWithContext(context.Background())
6889}
6890
6891// NotDone returns true if the enumeration should be started or is not yet complete.
6892func (iter EndpointServicesListResultIterator) NotDone() bool {
6893	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6894}
6895
6896// Response returns the raw server response from the last page request.
6897func (iter EndpointServicesListResultIterator) Response() EndpointServicesListResult {
6898	return iter.page.Response()
6899}
6900
6901// Value returns the current value or a zero-initialized value if the
6902// iterator has advanced beyond the end of the collection.
6903func (iter EndpointServicesListResultIterator) Value() EndpointServiceResult {
6904	if !iter.page.NotDone() {
6905		return EndpointServiceResult{}
6906	}
6907	return iter.page.Values()[iter.i]
6908}
6909
6910// Creates a new instance of the EndpointServicesListResultIterator type.
6911func NewEndpointServicesListResultIterator(page EndpointServicesListResultPage) EndpointServicesListResultIterator {
6912	return EndpointServicesListResultIterator{page: page}
6913}
6914
6915// IsEmpty returns true if the ListResult contains no values.
6916func (eslr EndpointServicesListResult) IsEmpty() bool {
6917	return eslr.Value == nil || len(*eslr.Value) == 0
6918}
6919
6920// hasNextLink returns true if the NextLink is not empty.
6921func (eslr EndpointServicesListResult) hasNextLink() bool {
6922	return eslr.NextLink != nil && len(*eslr.NextLink) != 0
6923}
6924
6925// endpointServicesListResultPreparer prepares a request to retrieve the next set of results.
6926// It returns nil if no more results exist.
6927func (eslr EndpointServicesListResult) endpointServicesListResultPreparer(ctx context.Context) (*http.Request, error) {
6928	if !eslr.hasNextLink() {
6929		return nil, nil
6930	}
6931	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6932		autorest.AsJSON(),
6933		autorest.AsGet(),
6934		autorest.WithBaseURL(to.String(eslr.NextLink)))
6935}
6936
6937// EndpointServicesListResultPage contains a page of EndpointServiceResult values.
6938type EndpointServicesListResultPage struct {
6939	fn   func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)
6940	eslr EndpointServicesListResult
6941}
6942
6943// NextWithContext advances to the next page of values.  If there was an error making
6944// the request the page does not advance and the error is returned.
6945func (page *EndpointServicesListResultPage) NextWithContext(ctx context.Context) (err error) {
6946	if tracing.IsEnabled() {
6947		ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultPage.NextWithContext")
6948		defer func() {
6949			sc := -1
6950			if page.Response().Response.Response != nil {
6951				sc = page.Response().Response.Response.StatusCode
6952			}
6953			tracing.EndSpan(ctx, sc, err)
6954		}()
6955	}
6956	for {
6957		next, err := page.fn(ctx, page.eslr)
6958		if err != nil {
6959			return err
6960		}
6961		page.eslr = next
6962		if !next.hasNextLink() || !next.IsEmpty() {
6963			break
6964		}
6965	}
6966	return nil
6967}
6968
6969// Next advances to the next page of values.  If there was an error making
6970// the request the page does not advance and the error is returned.
6971// Deprecated: Use NextWithContext() instead.
6972func (page *EndpointServicesListResultPage) Next() error {
6973	return page.NextWithContext(context.Background())
6974}
6975
6976// NotDone returns true if the page enumeration should be started or is not yet complete.
6977func (page EndpointServicesListResultPage) NotDone() bool {
6978	return !page.eslr.IsEmpty()
6979}
6980
6981// Response returns the raw server response from the last page request.
6982func (page EndpointServicesListResultPage) Response() EndpointServicesListResult {
6983	return page.eslr
6984}
6985
6986// Values returns the slice of values for the current page or nil if there are no values.
6987func (page EndpointServicesListResultPage) Values() []EndpointServiceResult {
6988	if page.eslr.IsEmpty() {
6989		return nil
6990	}
6991	return *page.eslr.Value
6992}
6993
6994// Creates a new instance of the EndpointServicesListResultPage type.
6995func NewEndpointServicesListResultPage(cur EndpointServicesListResult, getNextPage func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)) EndpointServicesListResultPage {
6996	return EndpointServicesListResultPage{
6997		fn:   getNextPage,
6998		eslr: cur,
6999	}
7000}
7001
7002// Error ...
7003type Error struct {
7004	Code       *string         `json:"code,omitempty"`
7005	Message    *string         `json:"message,omitempty"`
7006	Target     *string         `json:"target,omitempty"`
7007	Details    *[]ErrorDetails `json:"details,omitempty"`
7008	InnerError *string         `json:"innerError,omitempty"`
7009}
7010
7011// ErrorDetails ...
7012type ErrorDetails struct {
7013	Code    *string `json:"code,omitempty"`
7014	Target  *string `json:"target,omitempty"`
7015	Message *string `json:"message,omitempty"`
7016}
7017
7018// ErrorResponse the error object.
7019type ErrorResponse struct {
7020	Error *ErrorDetails `json:"error,omitempty"`
7021}
7022
7023// EvaluatedNetworkSecurityGroup results of network security group evaluation.
7024type EvaluatedNetworkSecurityGroup struct {
7025	// NetworkSecurityGroupID - Network security group ID.
7026	NetworkSecurityGroupID *string `json:"networkSecurityGroupId,omitempty"`
7027	// AppliedTo - Resource ID of nic or subnet to which network security group is applied.
7028	AppliedTo   *string      `json:"appliedTo,omitempty"`
7029	MatchedRule *MatchedRule `json:"matchedRule,omitempty"`
7030	// RulesEvaluationResult - READ-ONLY; List of network security rules evaluation results.
7031	RulesEvaluationResult *[]SecurityRulesEvaluationResult `json:"rulesEvaluationResult,omitempty"`
7032}
7033
7034// MarshalJSON is the custom marshaler for EvaluatedNetworkSecurityGroup.
7035func (ensg EvaluatedNetworkSecurityGroup) MarshalJSON() ([]byte, error) {
7036	objectMap := make(map[string]interface{})
7037	if ensg.NetworkSecurityGroupID != nil {
7038		objectMap["networkSecurityGroupId"] = ensg.NetworkSecurityGroupID
7039	}
7040	if ensg.AppliedTo != nil {
7041		objectMap["appliedTo"] = ensg.AppliedTo
7042	}
7043	if ensg.MatchedRule != nil {
7044		objectMap["matchedRule"] = ensg.MatchedRule
7045	}
7046	return json.Marshal(objectMap)
7047}
7048
7049// ExpressRouteCircuit expressRouteCircuit resource
7050type ExpressRouteCircuit struct {
7051	autorest.Response `json:"-"`
7052	// Sku - The SKU.
7053	Sku                                  *ExpressRouteCircuitSku `json:"sku,omitempty"`
7054	*ExpressRouteCircuitPropertiesFormat `json:"properties,omitempty"`
7055	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
7056	Etag *string `json:"etag,omitempty"`
7057	// ID - Resource ID.
7058	ID *string `json:"id,omitempty"`
7059	// Name - READ-ONLY; Resource name.
7060	Name *string `json:"name,omitempty"`
7061	// Type - READ-ONLY; Resource type.
7062	Type *string `json:"type,omitempty"`
7063	// Location - Resource location.
7064	Location *string `json:"location,omitempty"`
7065	// Tags - Resource tags.
7066	Tags map[string]*string `json:"tags"`
7067}
7068
7069// MarshalJSON is the custom marshaler for ExpressRouteCircuit.
7070func (erc ExpressRouteCircuit) MarshalJSON() ([]byte, error) {
7071	objectMap := make(map[string]interface{})
7072	if erc.Sku != nil {
7073		objectMap["sku"] = erc.Sku
7074	}
7075	if erc.ExpressRouteCircuitPropertiesFormat != nil {
7076		objectMap["properties"] = erc.ExpressRouteCircuitPropertiesFormat
7077	}
7078	if erc.ID != nil {
7079		objectMap["id"] = erc.ID
7080	}
7081	if erc.Location != nil {
7082		objectMap["location"] = erc.Location
7083	}
7084	if erc.Tags != nil {
7085		objectMap["tags"] = erc.Tags
7086	}
7087	return json.Marshal(objectMap)
7088}
7089
7090// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuit struct.
7091func (erc *ExpressRouteCircuit) UnmarshalJSON(body []byte) error {
7092	var m map[string]*json.RawMessage
7093	err := json.Unmarshal(body, &m)
7094	if err != nil {
7095		return err
7096	}
7097	for k, v := range m {
7098		switch k {
7099		case "sku":
7100			if v != nil {
7101				var sku ExpressRouteCircuitSku
7102				err = json.Unmarshal(*v, &sku)
7103				if err != nil {
7104					return err
7105				}
7106				erc.Sku = &sku
7107			}
7108		case "properties":
7109			if v != nil {
7110				var expressRouteCircuitPropertiesFormat ExpressRouteCircuitPropertiesFormat
7111				err = json.Unmarshal(*v, &expressRouteCircuitPropertiesFormat)
7112				if err != nil {
7113					return err
7114				}
7115				erc.ExpressRouteCircuitPropertiesFormat = &expressRouteCircuitPropertiesFormat
7116			}
7117		case "etag":
7118			if v != nil {
7119				var etag string
7120				err = json.Unmarshal(*v, &etag)
7121				if err != nil {
7122					return err
7123				}
7124				erc.Etag = &etag
7125			}
7126		case "id":
7127			if v != nil {
7128				var ID string
7129				err = json.Unmarshal(*v, &ID)
7130				if err != nil {
7131					return err
7132				}
7133				erc.ID = &ID
7134			}
7135		case "name":
7136			if v != nil {
7137				var name string
7138				err = json.Unmarshal(*v, &name)
7139				if err != nil {
7140					return err
7141				}
7142				erc.Name = &name
7143			}
7144		case "type":
7145			if v != nil {
7146				var typeVar string
7147				err = json.Unmarshal(*v, &typeVar)
7148				if err != nil {
7149					return err
7150				}
7151				erc.Type = &typeVar
7152			}
7153		case "location":
7154			if v != nil {
7155				var location string
7156				err = json.Unmarshal(*v, &location)
7157				if err != nil {
7158					return err
7159				}
7160				erc.Location = &location
7161			}
7162		case "tags":
7163			if v != nil {
7164				var tags map[string]*string
7165				err = json.Unmarshal(*v, &tags)
7166				if err != nil {
7167					return err
7168				}
7169				erc.Tags = tags
7170			}
7171		}
7172	}
7173
7174	return nil
7175}
7176
7177// ExpressRouteCircuitArpTable the ARP table associated with the ExpressRouteCircuit.
7178type ExpressRouteCircuitArpTable struct {
7179	// Age - Entry age in minutes
7180	Age *int32 `json:"age,omitempty"`
7181	// Interface - Interface address
7182	Interface *string `json:"interface,omitempty"`
7183	// IPAddress - The IP address.
7184	IPAddress *string `json:"ipAddress,omitempty"`
7185	// MacAddress - The MAC address.
7186	MacAddress *string `json:"macAddress,omitempty"`
7187}
7188
7189// ExpressRouteCircuitAuthorization authorization in an ExpressRouteCircuit resource.
7190type ExpressRouteCircuitAuthorization struct {
7191	autorest.Response              `json:"-"`
7192	*AuthorizationPropertiesFormat `json:"properties,omitempty"`
7193	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
7194	Name *string `json:"name,omitempty"`
7195	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
7196	Etag *string `json:"etag,omitempty"`
7197	// ID - Resource ID.
7198	ID *string `json:"id,omitempty"`
7199}
7200
7201// MarshalJSON is the custom marshaler for ExpressRouteCircuitAuthorization.
7202func (erca ExpressRouteCircuitAuthorization) MarshalJSON() ([]byte, error) {
7203	objectMap := make(map[string]interface{})
7204	if erca.AuthorizationPropertiesFormat != nil {
7205		objectMap["properties"] = erca.AuthorizationPropertiesFormat
7206	}
7207	if erca.Name != nil {
7208		objectMap["name"] = erca.Name
7209	}
7210	if erca.ID != nil {
7211		objectMap["id"] = erca.ID
7212	}
7213	return json.Marshal(objectMap)
7214}
7215
7216// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitAuthorization struct.
7217func (erca *ExpressRouteCircuitAuthorization) UnmarshalJSON(body []byte) error {
7218	var m map[string]*json.RawMessage
7219	err := json.Unmarshal(body, &m)
7220	if err != nil {
7221		return err
7222	}
7223	for k, v := range m {
7224		switch k {
7225		case "properties":
7226			if v != nil {
7227				var authorizationPropertiesFormat AuthorizationPropertiesFormat
7228				err = json.Unmarshal(*v, &authorizationPropertiesFormat)
7229				if err != nil {
7230					return err
7231				}
7232				erca.AuthorizationPropertiesFormat = &authorizationPropertiesFormat
7233			}
7234		case "name":
7235			if v != nil {
7236				var name string
7237				err = json.Unmarshal(*v, &name)
7238				if err != nil {
7239					return err
7240				}
7241				erca.Name = &name
7242			}
7243		case "etag":
7244			if v != nil {
7245				var etag string
7246				err = json.Unmarshal(*v, &etag)
7247				if err != nil {
7248					return err
7249				}
7250				erca.Etag = &etag
7251			}
7252		case "id":
7253			if v != nil {
7254				var ID string
7255				err = json.Unmarshal(*v, &ID)
7256				if err != nil {
7257					return err
7258				}
7259				erca.ID = &ID
7260			}
7261		}
7262	}
7263
7264	return nil
7265}
7266
7267// ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
7268// results of a long-running operation.
7269type ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture struct {
7270	azure.FutureAPI
7271	// Result returns the result of the asynchronous operation.
7272	// If the operation has not completed it will return an error.
7273	Result func(ExpressRouteCircuitAuthorizationsClient) (ExpressRouteCircuitAuthorization, error)
7274}
7275
7276// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7277func (future *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
7278	var azFuture azure.Future
7279	if err := json.Unmarshal(body, &azFuture); err != nil {
7280		return err
7281	}
7282	future.FutureAPI = &azFuture
7283	future.Result = future.result
7284	return nil
7285}
7286
7287// result is the default implementation for ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture.Result.
7288func (future *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) result(client ExpressRouteCircuitAuthorizationsClient) (erca ExpressRouteCircuitAuthorization, err error) {
7289	var done bool
7290	done, err = future.DoneWithContext(context.Background(), client)
7291	if err != nil {
7292		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
7293		return
7294	}
7295	if !done {
7296		erca.Response.Response = future.Response()
7297		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture")
7298		return
7299	}
7300	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7301	if erca.Response.Response, err = future.GetResult(sender); err == nil && erca.Response.Response.StatusCode != http.StatusNoContent {
7302		erca, err = client.CreateOrUpdateResponder(erca.Response.Response)
7303		if err != nil {
7304			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture", "Result", erca.Response.Response, "Failure responding to request")
7305		}
7306	}
7307	return
7308}
7309
7310// ExpressRouteCircuitAuthorizationsDeleteFuture an abstraction for monitoring and retrieving the results
7311// of a long-running operation.
7312type ExpressRouteCircuitAuthorizationsDeleteFuture struct {
7313	azure.FutureAPI
7314	// Result returns the result of the asynchronous operation.
7315	// If the operation has not completed it will return an error.
7316	Result func(ExpressRouteCircuitAuthorizationsClient) (autorest.Response, error)
7317}
7318
7319// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7320func (future *ExpressRouteCircuitAuthorizationsDeleteFuture) UnmarshalJSON(body []byte) error {
7321	var azFuture azure.Future
7322	if err := json.Unmarshal(body, &azFuture); err != nil {
7323		return err
7324	}
7325	future.FutureAPI = &azFuture
7326	future.Result = future.result
7327	return nil
7328}
7329
7330// result is the default implementation for ExpressRouteCircuitAuthorizationsDeleteFuture.Result.
7331func (future *ExpressRouteCircuitAuthorizationsDeleteFuture) result(client ExpressRouteCircuitAuthorizationsClient) (ar autorest.Response, err error) {
7332	var done bool
7333	done, err = future.DoneWithContext(context.Background(), client)
7334	if err != nil {
7335		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsDeleteFuture", "Result", future.Response(), "Polling failure")
7336		return
7337	}
7338	if !done {
7339		ar.Response = future.Response()
7340		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitAuthorizationsDeleteFuture")
7341		return
7342	}
7343	ar.Response = future.Response()
7344	return
7345}
7346
7347// ExpressRouteCircuitConnection express Route Circuit Connection in an ExpressRouteCircuitPeering
7348// resource.
7349type ExpressRouteCircuitConnection struct {
7350	autorest.Response                              `json:"-"`
7351	*ExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"`
7352	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
7353	Name *string `json:"name,omitempty"`
7354	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
7355	Etag *string `json:"etag,omitempty"`
7356	// ID - Resource ID.
7357	ID *string `json:"id,omitempty"`
7358}
7359
7360// MarshalJSON is the custom marshaler for ExpressRouteCircuitConnection.
7361func (ercc ExpressRouteCircuitConnection) MarshalJSON() ([]byte, error) {
7362	objectMap := make(map[string]interface{})
7363	if ercc.ExpressRouteCircuitConnectionPropertiesFormat != nil {
7364		objectMap["properties"] = ercc.ExpressRouteCircuitConnectionPropertiesFormat
7365	}
7366	if ercc.Name != nil {
7367		objectMap["name"] = ercc.Name
7368	}
7369	if ercc.ID != nil {
7370		objectMap["id"] = ercc.ID
7371	}
7372	return json.Marshal(objectMap)
7373}
7374
7375// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitConnection struct.
7376func (ercc *ExpressRouteCircuitConnection) UnmarshalJSON(body []byte) error {
7377	var m map[string]*json.RawMessage
7378	err := json.Unmarshal(body, &m)
7379	if err != nil {
7380		return err
7381	}
7382	for k, v := range m {
7383		switch k {
7384		case "properties":
7385			if v != nil {
7386				var expressRouteCircuitConnectionPropertiesFormat ExpressRouteCircuitConnectionPropertiesFormat
7387				err = json.Unmarshal(*v, &expressRouteCircuitConnectionPropertiesFormat)
7388				if err != nil {
7389					return err
7390				}
7391				ercc.ExpressRouteCircuitConnectionPropertiesFormat = &expressRouteCircuitConnectionPropertiesFormat
7392			}
7393		case "name":
7394			if v != nil {
7395				var name string
7396				err = json.Unmarshal(*v, &name)
7397				if err != nil {
7398					return err
7399				}
7400				ercc.Name = &name
7401			}
7402		case "etag":
7403			if v != nil {
7404				var etag string
7405				err = json.Unmarshal(*v, &etag)
7406				if err != nil {
7407					return err
7408				}
7409				ercc.Etag = &etag
7410			}
7411		case "id":
7412			if v != nil {
7413				var ID string
7414				err = json.Unmarshal(*v, &ID)
7415				if err != nil {
7416					return err
7417				}
7418				ercc.ID = &ID
7419			}
7420		}
7421	}
7422
7423	return nil
7424}
7425
7426// ExpressRouteCircuitConnectionPropertiesFormat ...
7427type ExpressRouteCircuitConnectionPropertiesFormat struct {
7428	// ExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the circuit initiating connection.
7429	ExpressRouteCircuitPeering *SubResource `json:"expressRouteCircuitPeering,omitempty"`
7430	// PeerExpressRouteCircuitPeering - Reference to Express Route Circuit Private Peering Resource of the peered circuit.
7431	PeerExpressRouteCircuitPeering *SubResource `json:"peerExpressRouteCircuitPeering,omitempty"`
7432	// AddressPrefix - /29 IP address space to carve out Customer addresses for tunnels.
7433	AddressPrefix *string `json:"addressPrefix,omitempty"`
7434	// AuthorizationKey - The authorization key.
7435	AuthorizationKey *string `json:"authorizationKey,omitempty"`
7436	// CircuitConnectionStatus - READ-ONLY; Express Route Circuit Connection State. Possible values are: 'Connected' and 'Disconnected'. Possible values include: 'Connected', 'Connecting', 'Disconnected'
7437	CircuitConnectionStatus CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"`
7438	// ProvisioningState - READ-ONLY; Provisioning state of the circuit connection resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
7439	ProvisioningState *string `json:"provisioningState,omitempty"`
7440}
7441
7442// MarshalJSON is the custom marshaler for ExpressRouteCircuitConnectionPropertiesFormat.
7443func (erccpf ExpressRouteCircuitConnectionPropertiesFormat) MarshalJSON() ([]byte, error) {
7444	objectMap := make(map[string]interface{})
7445	if erccpf.ExpressRouteCircuitPeering != nil {
7446		objectMap["expressRouteCircuitPeering"] = erccpf.ExpressRouteCircuitPeering
7447	}
7448	if erccpf.PeerExpressRouteCircuitPeering != nil {
7449		objectMap["peerExpressRouteCircuitPeering"] = erccpf.PeerExpressRouteCircuitPeering
7450	}
7451	if erccpf.AddressPrefix != nil {
7452		objectMap["addressPrefix"] = erccpf.AddressPrefix
7453	}
7454	if erccpf.AuthorizationKey != nil {
7455		objectMap["authorizationKey"] = erccpf.AuthorizationKey
7456	}
7457	return json.Marshal(objectMap)
7458}
7459
7460// ExpressRouteCircuitConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
7461// results of a long-running operation.
7462type ExpressRouteCircuitConnectionsCreateOrUpdateFuture struct {
7463	azure.FutureAPI
7464	// Result returns the result of the asynchronous operation.
7465	// If the operation has not completed it will return an error.
7466	Result func(ExpressRouteCircuitConnectionsClient) (ExpressRouteCircuitConnection, error)
7467}
7468
7469// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7470func (future *ExpressRouteCircuitConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
7471	var azFuture azure.Future
7472	if err := json.Unmarshal(body, &azFuture); err != nil {
7473		return err
7474	}
7475	future.FutureAPI = &azFuture
7476	future.Result = future.result
7477	return nil
7478}
7479
7480// result is the default implementation for ExpressRouteCircuitConnectionsCreateOrUpdateFuture.Result.
7481func (future *ExpressRouteCircuitConnectionsCreateOrUpdateFuture) result(client ExpressRouteCircuitConnectionsClient) (ercc ExpressRouteCircuitConnection, err error) {
7482	var done bool
7483	done, err = future.DoneWithContext(context.Background(), client)
7484	if err != nil {
7485		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
7486		return
7487	}
7488	if !done {
7489		ercc.Response.Response = future.Response()
7490		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture")
7491		return
7492	}
7493	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
7494	if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent {
7495		ercc, err = client.CreateOrUpdateResponder(ercc.Response.Response)
7496		if err != nil {
7497			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsCreateOrUpdateFuture", "Result", ercc.Response.Response, "Failure responding to request")
7498		}
7499	}
7500	return
7501}
7502
7503// ExpressRouteCircuitConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a
7504// long-running operation.
7505type ExpressRouteCircuitConnectionsDeleteFuture struct {
7506	azure.FutureAPI
7507	// Result returns the result of the asynchronous operation.
7508	// If the operation has not completed it will return an error.
7509	Result func(ExpressRouteCircuitConnectionsClient) (autorest.Response, error)
7510}
7511
7512// UnmarshalJSON is the custom unmarshaller for CreateFuture.
7513func (future *ExpressRouteCircuitConnectionsDeleteFuture) UnmarshalJSON(body []byte) error {
7514	var azFuture azure.Future
7515	if err := json.Unmarshal(body, &azFuture); err != nil {
7516		return err
7517	}
7518	future.FutureAPI = &azFuture
7519	future.Result = future.result
7520	return nil
7521}
7522
7523// result is the default implementation for ExpressRouteCircuitConnectionsDeleteFuture.Result.
7524func (future *ExpressRouteCircuitConnectionsDeleteFuture) result(client ExpressRouteCircuitConnectionsClient) (ar autorest.Response, err error) {
7525	var done bool
7526	done, err = future.DoneWithContext(context.Background(), client)
7527	if err != nil {
7528		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
7529		return
7530	}
7531	if !done {
7532		ar.Response = future.Response()
7533		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitConnectionsDeleteFuture")
7534		return
7535	}
7536	ar.Response = future.Response()
7537	return
7538}
7539
7540// ExpressRouteCircuitListResult response for ListExpressRouteCircuit API service call.
7541type ExpressRouteCircuitListResult struct {
7542	autorest.Response `json:"-"`
7543	// Value - A list of ExpressRouteCircuits in a resource group.
7544	Value *[]ExpressRouteCircuit `json:"value,omitempty"`
7545	// NextLink - The URL to get the next set of results.
7546	NextLink *string `json:"nextLink,omitempty"`
7547}
7548
7549// ExpressRouteCircuitListResultIterator provides access to a complete listing of ExpressRouteCircuit
7550// values.
7551type ExpressRouteCircuitListResultIterator struct {
7552	i    int
7553	page ExpressRouteCircuitListResultPage
7554}
7555
7556// NextWithContext advances to the next value.  If there was an error making
7557// the request the iterator does not advance and the error is returned.
7558func (iter *ExpressRouteCircuitListResultIterator) NextWithContext(ctx context.Context) (err error) {
7559	if tracing.IsEnabled() {
7560		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultIterator.NextWithContext")
7561		defer func() {
7562			sc := -1
7563			if iter.Response().Response.Response != nil {
7564				sc = iter.Response().Response.Response.StatusCode
7565			}
7566			tracing.EndSpan(ctx, sc, err)
7567		}()
7568	}
7569	iter.i++
7570	if iter.i < len(iter.page.Values()) {
7571		return nil
7572	}
7573	err = iter.page.NextWithContext(ctx)
7574	if err != nil {
7575		iter.i--
7576		return err
7577	}
7578	iter.i = 0
7579	return nil
7580}
7581
7582// Next advances to the next value.  If there was an error making
7583// the request the iterator does not advance and the error is returned.
7584// Deprecated: Use NextWithContext() instead.
7585func (iter *ExpressRouteCircuitListResultIterator) Next() error {
7586	return iter.NextWithContext(context.Background())
7587}
7588
7589// NotDone returns true if the enumeration should be started or is not yet complete.
7590func (iter ExpressRouteCircuitListResultIterator) NotDone() bool {
7591	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7592}
7593
7594// Response returns the raw server response from the last page request.
7595func (iter ExpressRouteCircuitListResultIterator) Response() ExpressRouteCircuitListResult {
7596	return iter.page.Response()
7597}
7598
7599// Value returns the current value or a zero-initialized value if the
7600// iterator has advanced beyond the end of the collection.
7601func (iter ExpressRouteCircuitListResultIterator) Value() ExpressRouteCircuit {
7602	if !iter.page.NotDone() {
7603		return ExpressRouteCircuit{}
7604	}
7605	return iter.page.Values()[iter.i]
7606}
7607
7608// Creates a new instance of the ExpressRouteCircuitListResultIterator type.
7609func NewExpressRouteCircuitListResultIterator(page ExpressRouteCircuitListResultPage) ExpressRouteCircuitListResultIterator {
7610	return ExpressRouteCircuitListResultIterator{page: page}
7611}
7612
7613// IsEmpty returns true if the ListResult contains no values.
7614func (erclr ExpressRouteCircuitListResult) IsEmpty() bool {
7615	return erclr.Value == nil || len(*erclr.Value) == 0
7616}
7617
7618// hasNextLink returns true if the NextLink is not empty.
7619func (erclr ExpressRouteCircuitListResult) hasNextLink() bool {
7620	return erclr.NextLink != nil && len(*erclr.NextLink) != 0
7621}
7622
7623// expressRouteCircuitListResultPreparer prepares a request to retrieve the next set of results.
7624// It returns nil if no more results exist.
7625func (erclr ExpressRouteCircuitListResult) expressRouteCircuitListResultPreparer(ctx context.Context) (*http.Request, error) {
7626	if !erclr.hasNextLink() {
7627		return nil, nil
7628	}
7629	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7630		autorest.AsJSON(),
7631		autorest.AsGet(),
7632		autorest.WithBaseURL(to.String(erclr.NextLink)))
7633}
7634
7635// ExpressRouteCircuitListResultPage contains a page of ExpressRouteCircuit values.
7636type ExpressRouteCircuitListResultPage struct {
7637	fn    func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)
7638	erclr ExpressRouteCircuitListResult
7639}
7640
7641// NextWithContext advances to the next page of values.  If there was an error making
7642// the request the page does not advance and the error is returned.
7643func (page *ExpressRouteCircuitListResultPage) NextWithContext(ctx context.Context) (err error) {
7644	if tracing.IsEnabled() {
7645		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultPage.NextWithContext")
7646		defer func() {
7647			sc := -1
7648			if page.Response().Response.Response != nil {
7649				sc = page.Response().Response.Response.StatusCode
7650			}
7651			tracing.EndSpan(ctx, sc, err)
7652		}()
7653	}
7654	for {
7655		next, err := page.fn(ctx, page.erclr)
7656		if err != nil {
7657			return err
7658		}
7659		page.erclr = next
7660		if !next.hasNextLink() || !next.IsEmpty() {
7661			break
7662		}
7663	}
7664	return nil
7665}
7666
7667// Next advances to the next page of values.  If there was an error making
7668// the request the page does not advance and the error is returned.
7669// Deprecated: Use NextWithContext() instead.
7670func (page *ExpressRouteCircuitListResultPage) Next() error {
7671	return page.NextWithContext(context.Background())
7672}
7673
7674// NotDone returns true if the page enumeration should be started or is not yet complete.
7675func (page ExpressRouteCircuitListResultPage) NotDone() bool {
7676	return !page.erclr.IsEmpty()
7677}
7678
7679// Response returns the raw server response from the last page request.
7680func (page ExpressRouteCircuitListResultPage) Response() ExpressRouteCircuitListResult {
7681	return page.erclr
7682}
7683
7684// Values returns the slice of values for the current page or nil if there are no values.
7685func (page ExpressRouteCircuitListResultPage) Values() []ExpressRouteCircuit {
7686	if page.erclr.IsEmpty() {
7687		return nil
7688	}
7689	return *page.erclr.Value
7690}
7691
7692// Creates a new instance of the ExpressRouteCircuitListResultPage type.
7693func NewExpressRouteCircuitListResultPage(cur ExpressRouteCircuitListResult, getNextPage func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)) ExpressRouteCircuitListResultPage {
7694	return ExpressRouteCircuitListResultPage{
7695		fn:    getNextPage,
7696		erclr: cur,
7697	}
7698}
7699
7700// ExpressRouteCircuitPeering peering in an ExpressRouteCircuit resource.
7701type ExpressRouteCircuitPeering struct {
7702	autorest.Response                           `json:"-"`
7703	*ExpressRouteCircuitPeeringPropertiesFormat `json:"properties,omitempty"`
7704	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
7705	Name *string `json:"name,omitempty"`
7706	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
7707	Etag *string `json:"etag,omitempty"`
7708	// ID - Resource ID.
7709	ID *string `json:"id,omitempty"`
7710}
7711
7712// MarshalJSON is the custom marshaler for ExpressRouteCircuitPeering.
7713func (ercp ExpressRouteCircuitPeering) MarshalJSON() ([]byte, error) {
7714	objectMap := make(map[string]interface{})
7715	if ercp.ExpressRouteCircuitPeeringPropertiesFormat != nil {
7716		objectMap["properties"] = ercp.ExpressRouteCircuitPeeringPropertiesFormat
7717	}
7718	if ercp.Name != nil {
7719		objectMap["name"] = ercp.Name
7720	}
7721	if ercp.ID != nil {
7722		objectMap["id"] = ercp.ID
7723	}
7724	return json.Marshal(objectMap)
7725}
7726
7727// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitPeering struct.
7728func (ercp *ExpressRouteCircuitPeering) UnmarshalJSON(body []byte) error {
7729	var m map[string]*json.RawMessage
7730	err := json.Unmarshal(body, &m)
7731	if err != nil {
7732		return err
7733	}
7734	for k, v := range m {
7735		switch k {
7736		case "properties":
7737			if v != nil {
7738				var expressRouteCircuitPeeringPropertiesFormat ExpressRouteCircuitPeeringPropertiesFormat
7739				err = json.Unmarshal(*v, &expressRouteCircuitPeeringPropertiesFormat)
7740				if err != nil {
7741					return err
7742				}
7743				ercp.ExpressRouteCircuitPeeringPropertiesFormat = &expressRouteCircuitPeeringPropertiesFormat
7744			}
7745		case "name":
7746			if v != nil {
7747				var name string
7748				err = json.Unmarshal(*v, &name)
7749				if err != nil {
7750					return err
7751				}
7752				ercp.Name = &name
7753			}
7754		case "etag":
7755			if v != nil {
7756				var etag string
7757				err = json.Unmarshal(*v, &etag)
7758				if err != nil {
7759					return err
7760				}
7761				ercp.Etag = &etag
7762			}
7763		case "id":
7764			if v != nil {
7765				var ID string
7766				err = json.Unmarshal(*v, &ID)
7767				if err != nil {
7768					return err
7769				}
7770				ercp.ID = &ID
7771			}
7772		}
7773	}
7774
7775	return nil
7776}
7777
7778// ExpressRouteCircuitPeeringConfig specifies the peering configuration.
7779type ExpressRouteCircuitPeeringConfig struct {
7780	// AdvertisedPublicPrefixes - The reference of AdvertisedPublicPrefixes.
7781	AdvertisedPublicPrefixes *[]string `json:"advertisedPublicPrefixes,omitempty"`
7782	// AdvertisedCommunities - The communities of bgp peering. Specified for microsoft peering
7783	AdvertisedCommunities *[]string `json:"advertisedCommunities,omitempty"`
7784	// AdvertisedPublicPrefixesState - AdvertisedPublicPrefixState of the Peering resource. Possible values are 'NotConfigured', 'Configuring', 'Configured', and 'ValidationNeeded'. Possible values include: 'NotConfigured', 'Configuring', 'Configured', 'ValidationNeeded'
7785	AdvertisedPublicPrefixesState ExpressRouteCircuitPeeringAdvertisedPublicPrefixState `json:"advertisedPublicPrefixesState,omitempty"`
7786	// LegacyMode - The legacy mode of the peering.
7787	LegacyMode *int32 `json:"legacyMode,omitempty"`
7788	// CustomerASN - The CustomerASN of the peering.
7789	CustomerASN *int32 `json:"customerASN,omitempty"`
7790	// RoutingRegistryName - The RoutingRegistryName of the configuration.
7791	RoutingRegistryName *string `json:"routingRegistryName,omitempty"`
7792}
7793
7794// ExpressRouteCircuitPeeringID expressRoute circuit peering identifier.
7795type ExpressRouteCircuitPeeringID struct {
7796	// ID - The ID of the ExpressRoute circuit peering.
7797	ID *string `json:"id,omitempty"`
7798}
7799
7800// ExpressRouteCircuitPeeringListResult response for ListPeering API service call retrieves all peerings
7801// that belong to an ExpressRouteCircuit.
7802type ExpressRouteCircuitPeeringListResult struct {
7803	autorest.Response `json:"-"`
7804	// Value - The peerings in an express route circuit.
7805	Value *[]ExpressRouteCircuitPeering `json:"value,omitempty"`
7806	// NextLink - The URL to get the next set of results.
7807	NextLink *string `json:"nextLink,omitempty"`
7808}
7809
7810// ExpressRouteCircuitPeeringListResultIterator provides access to a complete listing of
7811// ExpressRouteCircuitPeering values.
7812type ExpressRouteCircuitPeeringListResultIterator struct {
7813	i    int
7814	page ExpressRouteCircuitPeeringListResultPage
7815}
7816
7817// NextWithContext advances to the next value.  If there was an error making
7818// the request the iterator does not advance and the error is returned.
7819func (iter *ExpressRouteCircuitPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
7820	if tracing.IsEnabled() {
7821		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultIterator.NextWithContext")
7822		defer func() {
7823			sc := -1
7824			if iter.Response().Response.Response != nil {
7825				sc = iter.Response().Response.Response.StatusCode
7826			}
7827			tracing.EndSpan(ctx, sc, err)
7828		}()
7829	}
7830	iter.i++
7831	if iter.i < len(iter.page.Values()) {
7832		return nil
7833	}
7834	err = iter.page.NextWithContext(ctx)
7835	if err != nil {
7836		iter.i--
7837		return err
7838	}
7839	iter.i = 0
7840	return nil
7841}
7842
7843// Next advances to the next value.  If there was an error making
7844// the request the iterator does not advance and the error is returned.
7845// Deprecated: Use NextWithContext() instead.
7846func (iter *ExpressRouteCircuitPeeringListResultIterator) Next() error {
7847	return iter.NextWithContext(context.Background())
7848}
7849
7850// NotDone returns true if the enumeration should be started or is not yet complete.
7851func (iter ExpressRouteCircuitPeeringListResultIterator) NotDone() bool {
7852	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7853}
7854
7855// Response returns the raw server response from the last page request.
7856func (iter ExpressRouteCircuitPeeringListResultIterator) Response() ExpressRouteCircuitPeeringListResult {
7857	return iter.page.Response()
7858}
7859
7860// Value returns the current value or a zero-initialized value if the
7861// iterator has advanced beyond the end of the collection.
7862func (iter ExpressRouteCircuitPeeringListResultIterator) Value() ExpressRouteCircuitPeering {
7863	if !iter.page.NotDone() {
7864		return ExpressRouteCircuitPeering{}
7865	}
7866	return iter.page.Values()[iter.i]
7867}
7868
7869// Creates a new instance of the ExpressRouteCircuitPeeringListResultIterator type.
7870func NewExpressRouteCircuitPeeringListResultIterator(page ExpressRouteCircuitPeeringListResultPage) ExpressRouteCircuitPeeringListResultIterator {
7871	return ExpressRouteCircuitPeeringListResultIterator{page: page}
7872}
7873
7874// IsEmpty returns true if the ListResult contains no values.
7875func (ercplr ExpressRouteCircuitPeeringListResult) IsEmpty() bool {
7876	return ercplr.Value == nil || len(*ercplr.Value) == 0
7877}
7878
7879// hasNextLink returns true if the NextLink is not empty.
7880func (ercplr ExpressRouteCircuitPeeringListResult) hasNextLink() bool {
7881	return ercplr.NextLink != nil && len(*ercplr.NextLink) != 0
7882}
7883
7884// expressRouteCircuitPeeringListResultPreparer prepares a request to retrieve the next set of results.
7885// It returns nil if no more results exist.
7886func (ercplr ExpressRouteCircuitPeeringListResult) expressRouteCircuitPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
7887	if !ercplr.hasNextLink() {
7888		return nil, nil
7889	}
7890	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7891		autorest.AsJSON(),
7892		autorest.AsGet(),
7893		autorest.WithBaseURL(to.String(ercplr.NextLink)))
7894}
7895
7896// ExpressRouteCircuitPeeringListResultPage contains a page of ExpressRouteCircuitPeering values.
7897type ExpressRouteCircuitPeeringListResultPage struct {
7898	fn     func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)
7899	ercplr ExpressRouteCircuitPeeringListResult
7900}
7901
7902// NextWithContext advances to the next page of values.  If there was an error making
7903// the request the page does not advance and the error is returned.
7904func (page *ExpressRouteCircuitPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
7905	if tracing.IsEnabled() {
7906		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultPage.NextWithContext")
7907		defer func() {
7908			sc := -1
7909			if page.Response().Response.Response != nil {
7910				sc = page.Response().Response.Response.StatusCode
7911			}
7912			tracing.EndSpan(ctx, sc, err)
7913		}()
7914	}
7915	for {
7916		next, err := page.fn(ctx, page.ercplr)
7917		if err != nil {
7918			return err
7919		}
7920		page.ercplr = next
7921		if !next.hasNextLink() || !next.IsEmpty() {
7922			break
7923		}
7924	}
7925	return nil
7926}
7927
7928// Next advances to the next page of values.  If there was an error making
7929// the request the page does not advance and the error is returned.
7930// Deprecated: Use NextWithContext() instead.
7931func (page *ExpressRouteCircuitPeeringListResultPage) Next() error {
7932	return page.NextWithContext(context.Background())
7933}
7934
7935// NotDone returns true if the page enumeration should be started or is not yet complete.
7936func (page ExpressRouteCircuitPeeringListResultPage) NotDone() bool {
7937	return !page.ercplr.IsEmpty()
7938}
7939
7940// Response returns the raw server response from the last page request.
7941func (page ExpressRouteCircuitPeeringListResultPage) Response() ExpressRouteCircuitPeeringListResult {
7942	return page.ercplr
7943}
7944
7945// Values returns the slice of values for the current page or nil if there are no values.
7946func (page ExpressRouteCircuitPeeringListResultPage) Values() []ExpressRouteCircuitPeering {
7947	if page.ercplr.IsEmpty() {
7948		return nil
7949	}
7950	return *page.ercplr.Value
7951}
7952
7953// Creates a new instance of the ExpressRouteCircuitPeeringListResultPage type.
7954func NewExpressRouteCircuitPeeringListResultPage(cur ExpressRouteCircuitPeeringListResult, getNextPage func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)) ExpressRouteCircuitPeeringListResultPage {
7955	return ExpressRouteCircuitPeeringListResultPage{
7956		fn:     getNextPage,
7957		ercplr: cur,
7958	}
7959}
7960
7961// ExpressRouteCircuitPeeringPropertiesFormat ...
7962type ExpressRouteCircuitPeeringPropertiesFormat struct {
7963	// PeeringType - The peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'
7964	PeeringType ExpressRoutePeeringType `json:"peeringType,omitempty"`
7965	// State - The peering state. Possible values include: 'ExpressRoutePeeringStateDisabled', 'ExpressRoutePeeringStateEnabled'
7966	State ExpressRoutePeeringState `json:"state,omitempty"`
7967	// AzureASN - The Azure ASN.
7968	AzureASN *int32 `json:"azureASN,omitempty"`
7969	// PeerASN - The peer ASN.
7970	PeerASN *int64 `json:"peerASN,omitempty"`
7971	// PrimaryPeerAddressPrefix - The primary address prefix.
7972	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
7973	// SecondaryPeerAddressPrefix - The secondary address prefix.
7974	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
7975	// PrimaryAzurePort - The primary port.
7976	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
7977	// SecondaryAzurePort - The secondary port.
7978	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
7979	// SharedKey - The shared key.
7980	SharedKey *string `json:"sharedKey,omitempty"`
7981	// VlanID - The VLAN ID.
7982	VlanID *int32 `json:"vlanId,omitempty"`
7983	// MicrosoftPeeringConfig - The Microsoft peering configuration.
7984	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
7985	// Stats - Gets peering stats.
7986	Stats *ExpressRouteCircuitStats `json:"stats,omitempty"`
7987	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
7988	ProvisioningState *string `json:"provisioningState,omitempty"`
7989	// GatewayManagerEtag - The GatewayManager Etag.
7990	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
7991	// LastModifiedBy - Gets whether the provider or the customer last modified the peering.
7992	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
7993	// RouteFilter - The reference of the RouteFilter resource.
7994	RouteFilter *RouteFilter `json:"routeFilter,omitempty"`
7995	// Ipv6PeeringConfig - The IPv6 peering configuration.
7996	Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"`
7997	// ExpressRouteConnection - The ExpressRoute connection.
7998	ExpressRouteConnection *ExpressRouteConnectionID `json:"expressRouteConnection,omitempty"`
7999	// Connections - The list of circuit connections associated with Azure Private Peering for this circuit.
8000	Connections *[]ExpressRouteCircuitConnection `json:"connections,omitempty"`
8001}
8002
8003// ExpressRouteCircuitPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
8004// of a long-running operation.
8005type ExpressRouteCircuitPeeringsCreateOrUpdateFuture struct {
8006	azure.FutureAPI
8007	// Result returns the result of the asynchronous operation.
8008	// If the operation has not completed it will return an error.
8009	Result func(ExpressRouteCircuitPeeringsClient) (ExpressRouteCircuitPeering, error)
8010}
8011
8012// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8013func (future *ExpressRouteCircuitPeeringsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
8014	var azFuture azure.Future
8015	if err := json.Unmarshal(body, &azFuture); err != nil {
8016		return err
8017	}
8018	future.FutureAPI = &azFuture
8019	future.Result = future.result
8020	return nil
8021}
8022
8023// result is the default implementation for ExpressRouteCircuitPeeringsCreateOrUpdateFuture.Result.
8024func (future *ExpressRouteCircuitPeeringsCreateOrUpdateFuture) result(client ExpressRouteCircuitPeeringsClient) (ercp ExpressRouteCircuitPeering, err error) {
8025	var done bool
8026	done, err = future.DoneWithContext(context.Background(), client)
8027	if err != nil {
8028		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
8029		return
8030	}
8031	if !done {
8032		ercp.Response.Response = future.Response()
8033		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture")
8034		return
8035	}
8036	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8037	if ercp.Response.Response, err = future.GetResult(sender); err == nil && ercp.Response.Response.StatusCode != http.StatusNoContent {
8038		ercp, err = client.CreateOrUpdateResponder(ercp.Response.Response)
8039		if err != nil {
8040			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsCreateOrUpdateFuture", "Result", ercp.Response.Response, "Failure responding to request")
8041		}
8042	}
8043	return
8044}
8045
8046// ExpressRouteCircuitPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
8047// long-running operation.
8048type ExpressRouteCircuitPeeringsDeleteFuture struct {
8049	azure.FutureAPI
8050	// Result returns the result of the asynchronous operation.
8051	// If the operation has not completed it will return an error.
8052	Result func(ExpressRouteCircuitPeeringsClient) (autorest.Response, error)
8053}
8054
8055// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8056func (future *ExpressRouteCircuitPeeringsDeleteFuture) UnmarshalJSON(body []byte) error {
8057	var azFuture azure.Future
8058	if err := json.Unmarshal(body, &azFuture); err != nil {
8059		return err
8060	}
8061	future.FutureAPI = &azFuture
8062	future.Result = future.result
8063	return nil
8064}
8065
8066// result is the default implementation for ExpressRouteCircuitPeeringsDeleteFuture.Result.
8067func (future *ExpressRouteCircuitPeeringsDeleteFuture) result(client ExpressRouteCircuitPeeringsClient) (ar autorest.Response, err error) {
8068	var done bool
8069	done, err = future.DoneWithContext(context.Background(), client)
8070	if err != nil {
8071		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
8072		return
8073	}
8074	if !done {
8075		ar.Response = future.Response()
8076		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitPeeringsDeleteFuture")
8077		return
8078	}
8079	ar.Response = future.Response()
8080	return
8081}
8082
8083// ExpressRouteCircuitPropertiesFormat properties of ExpressRouteCircuit.
8084type ExpressRouteCircuitPropertiesFormat struct {
8085	// AllowClassicOperations - Allow classic operations
8086	AllowClassicOperations *bool `json:"allowClassicOperations,omitempty"`
8087	// CircuitProvisioningState - The CircuitProvisioningState state of the resource.
8088	CircuitProvisioningState *string `json:"circuitProvisioningState,omitempty"`
8089	// ServiceProviderProvisioningState - The ServiceProviderProvisioningState state of the resource. Possible values are 'NotProvisioned', 'Provisioning', 'Provisioned', and 'Deprovisioning'. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning'
8090	ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"`
8091	// Authorizations - The list of authorizations.
8092	Authorizations *[]ExpressRouteCircuitAuthorization `json:"authorizations,omitempty"`
8093	// Peerings - The list of peerings.
8094	Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"`
8095	// ServiceKey - The ServiceKey.
8096	ServiceKey *string `json:"serviceKey,omitempty"`
8097	// ServiceProviderNotes - The ServiceProviderNotes.
8098	ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"`
8099	// ServiceProviderProperties - The ServiceProviderProperties.
8100	ServiceProviderProperties *ExpressRouteCircuitServiceProviderProperties `json:"serviceProviderProperties,omitempty"`
8101	// ExpressRoutePort - The reference to the ExpressRoutePort resource when the circuit is provisioned on an ExpressRoutePort resource.
8102	ExpressRoutePort *SubResource `json:"expressRoutePort,omitempty"`
8103	// BandwidthInGbps - The bandwidth of the circuit when the circuit is provisioned on an ExpressRoutePort resource.
8104	BandwidthInGbps *float64 `json:"bandwidthInGbps,omitempty"`
8105	// Stag - READ-ONLY; The identifier of the circuit traffic. Outer tag for QinQ encapsulation.
8106	Stag *int32 `json:"stag,omitempty"`
8107	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
8108	ProvisioningState *string `json:"provisioningState,omitempty"`
8109	// GatewayManagerEtag - The GatewayManager Etag.
8110	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
8111	// AllowGlobalReach - Flag to enable Global Reach on the circuit.
8112	AllowGlobalReach *bool `json:"allowGlobalReach,omitempty"`
8113}
8114
8115// MarshalJSON is the custom marshaler for ExpressRouteCircuitPropertiesFormat.
8116func (ercpf ExpressRouteCircuitPropertiesFormat) MarshalJSON() ([]byte, error) {
8117	objectMap := make(map[string]interface{})
8118	if ercpf.AllowClassicOperations != nil {
8119		objectMap["allowClassicOperations"] = ercpf.AllowClassicOperations
8120	}
8121	if ercpf.CircuitProvisioningState != nil {
8122		objectMap["circuitProvisioningState"] = ercpf.CircuitProvisioningState
8123	}
8124	if ercpf.ServiceProviderProvisioningState != "" {
8125		objectMap["serviceProviderProvisioningState"] = ercpf.ServiceProviderProvisioningState
8126	}
8127	if ercpf.Authorizations != nil {
8128		objectMap["authorizations"] = ercpf.Authorizations
8129	}
8130	if ercpf.Peerings != nil {
8131		objectMap["peerings"] = ercpf.Peerings
8132	}
8133	if ercpf.ServiceKey != nil {
8134		objectMap["serviceKey"] = ercpf.ServiceKey
8135	}
8136	if ercpf.ServiceProviderNotes != nil {
8137		objectMap["serviceProviderNotes"] = ercpf.ServiceProviderNotes
8138	}
8139	if ercpf.ServiceProviderProperties != nil {
8140		objectMap["serviceProviderProperties"] = ercpf.ServiceProviderProperties
8141	}
8142	if ercpf.ExpressRoutePort != nil {
8143		objectMap["expressRoutePort"] = ercpf.ExpressRoutePort
8144	}
8145	if ercpf.BandwidthInGbps != nil {
8146		objectMap["bandwidthInGbps"] = ercpf.BandwidthInGbps
8147	}
8148	if ercpf.ProvisioningState != nil {
8149		objectMap["provisioningState"] = ercpf.ProvisioningState
8150	}
8151	if ercpf.GatewayManagerEtag != nil {
8152		objectMap["gatewayManagerEtag"] = ercpf.GatewayManagerEtag
8153	}
8154	if ercpf.AllowGlobalReach != nil {
8155		objectMap["allowGlobalReach"] = ercpf.AllowGlobalReach
8156	}
8157	return json.Marshal(objectMap)
8158}
8159
8160// ExpressRouteCircuitReference ...
8161type ExpressRouteCircuitReference struct {
8162	// ID - Corresponding Express Route Circuit Id.
8163	ID *string `json:"id,omitempty"`
8164}
8165
8166// ExpressRouteCircuitRoutesTable the routes table associated with the ExpressRouteCircuit
8167type ExpressRouteCircuitRoutesTable struct {
8168	// NetworkProperty - IP address of a network entity
8169	NetworkProperty *string `json:"network,omitempty"`
8170	// NextHop - NextHop address
8171	NextHop *string `json:"nextHop,omitempty"`
8172	// LocPrf - Local preference value as set with the set local-preference route-map configuration command
8173	LocPrf *string `json:"locPrf,omitempty"`
8174	// Weight - Route Weight.
8175	Weight *int32 `json:"weight,omitempty"`
8176	// Path - Autonomous system paths to the destination network.
8177	Path *string `json:"path,omitempty"`
8178}
8179
8180// ExpressRouteCircuitRoutesTableSummary the routes table associated with the ExpressRouteCircuit.
8181type ExpressRouteCircuitRoutesTableSummary struct {
8182	// Neighbor - IP address of the neighbor.
8183	Neighbor *string `json:"neighbor,omitempty"`
8184	// V - BGP version number spoken to the neighbor.
8185	V *int32 `json:"v,omitempty"`
8186	// As - Autonomous system number.
8187	As *int32 `json:"as,omitempty"`
8188	// 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.
8189	UpDown *string `json:"upDown,omitempty"`
8190	// StatePfxRcd - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group.
8191	StatePfxRcd *string `json:"statePfxRcd,omitempty"`
8192}
8193
8194// ExpressRouteCircuitsArpTableListResult response for ListArpTable associated with the Express Route
8195// Circuits API.
8196type ExpressRouteCircuitsArpTableListResult struct {
8197	autorest.Response `json:"-"`
8198	// Value - Gets list of the ARP table.
8199	Value *[]ExpressRouteCircuitArpTable `json:"value,omitempty"`
8200	// NextLink - The URL to get the next set of results.
8201	NextLink *string `json:"nextLink,omitempty"`
8202}
8203
8204// ExpressRouteCircuitsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
8205// long-running operation.
8206type ExpressRouteCircuitsCreateOrUpdateFuture struct {
8207	azure.FutureAPI
8208	// Result returns the result of the asynchronous operation.
8209	// If the operation has not completed it will return an error.
8210	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuit, error)
8211}
8212
8213// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8214func (future *ExpressRouteCircuitsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
8215	var azFuture azure.Future
8216	if err := json.Unmarshal(body, &azFuture); err != nil {
8217		return err
8218	}
8219	future.FutureAPI = &azFuture
8220	future.Result = future.result
8221	return nil
8222}
8223
8224// result is the default implementation for ExpressRouteCircuitsCreateOrUpdateFuture.Result.
8225func (future *ExpressRouteCircuitsCreateOrUpdateFuture) result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
8226	var done bool
8227	done, err = future.DoneWithContext(context.Background(), client)
8228	if err != nil {
8229		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
8230		return
8231	}
8232	if !done {
8233		erc.Response.Response = future.Response()
8234		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsCreateOrUpdateFuture")
8235		return
8236	}
8237	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8238	if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
8239		erc, err = client.CreateOrUpdateResponder(erc.Response.Response)
8240		if err != nil {
8241			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsCreateOrUpdateFuture", "Result", erc.Response.Response, "Failure responding to request")
8242		}
8243	}
8244	return
8245}
8246
8247// ExpressRouteCircuitsDeleteFuture an abstraction for monitoring and retrieving the results of a
8248// long-running operation.
8249type ExpressRouteCircuitsDeleteFuture struct {
8250	azure.FutureAPI
8251	// Result returns the result of the asynchronous operation.
8252	// If the operation has not completed it will return an error.
8253	Result func(ExpressRouteCircuitsClient) (autorest.Response, error)
8254}
8255
8256// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8257func (future *ExpressRouteCircuitsDeleteFuture) UnmarshalJSON(body []byte) error {
8258	var azFuture azure.Future
8259	if err := json.Unmarshal(body, &azFuture); err != nil {
8260		return err
8261	}
8262	future.FutureAPI = &azFuture
8263	future.Result = future.result
8264	return nil
8265}
8266
8267// result is the default implementation for ExpressRouteCircuitsDeleteFuture.Result.
8268func (future *ExpressRouteCircuitsDeleteFuture) result(client ExpressRouteCircuitsClient) (ar autorest.Response, err error) {
8269	var done bool
8270	done, err = future.DoneWithContext(context.Background(), client)
8271	if err != nil {
8272		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsDeleteFuture", "Result", future.Response(), "Polling failure")
8273		return
8274	}
8275	if !done {
8276		ar.Response = future.Response()
8277		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsDeleteFuture")
8278		return
8279	}
8280	ar.Response = future.Response()
8281	return
8282}
8283
8284// ExpressRouteCircuitServiceProviderProperties contains ServiceProviderProperties in an
8285// ExpressRouteCircuit.
8286type ExpressRouteCircuitServiceProviderProperties struct {
8287	// ServiceProviderName - The serviceProviderName.
8288	ServiceProviderName *string `json:"serviceProviderName,omitempty"`
8289	// PeeringLocation - The peering location.
8290	PeeringLocation *string `json:"peeringLocation,omitempty"`
8291	// BandwidthInMbps - The BandwidthInMbps.
8292	BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"`
8293}
8294
8295// ExpressRouteCircuitSku contains SKU in an ExpressRouteCircuit.
8296type ExpressRouteCircuitSku struct {
8297	// Name - The name of the SKU.
8298	Name *string `json:"name,omitempty"`
8299	// Tier - The tier of the SKU. Possible values are 'Standard', 'Premium' or 'Basic'. Possible values include: 'ExpressRouteCircuitSkuTierStandard', 'ExpressRouteCircuitSkuTierPremium', 'ExpressRouteCircuitSkuTierBasic'
8300	Tier ExpressRouteCircuitSkuTier `json:"tier,omitempty"`
8301	// Family - The family of the SKU. Possible values are: 'UnlimitedData' and 'MeteredData'. Possible values include: 'UnlimitedData', 'MeteredData'
8302	Family ExpressRouteCircuitSkuFamily `json:"family,omitempty"`
8303}
8304
8305// ExpressRouteCircuitsListArpTableFuture an abstraction for monitoring and retrieving the results of a
8306// long-running operation.
8307type ExpressRouteCircuitsListArpTableFuture struct {
8308	azure.FutureAPI
8309	// Result returns the result of the asynchronous operation.
8310	// If the operation has not completed it will return an error.
8311	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsArpTableListResult, error)
8312}
8313
8314// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8315func (future *ExpressRouteCircuitsListArpTableFuture) UnmarshalJSON(body []byte) error {
8316	var azFuture azure.Future
8317	if err := json.Unmarshal(body, &azFuture); err != nil {
8318		return err
8319	}
8320	future.FutureAPI = &azFuture
8321	future.Result = future.result
8322	return nil
8323}
8324
8325// result is the default implementation for ExpressRouteCircuitsListArpTableFuture.Result.
8326func (future *ExpressRouteCircuitsListArpTableFuture) result(client ExpressRouteCircuitsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
8327	var done bool
8328	done, err = future.DoneWithContext(context.Background(), client)
8329	if err != nil {
8330		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", future.Response(), "Polling failure")
8331		return
8332	}
8333	if !done {
8334		ercatlr.Response.Response = future.Response()
8335		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListArpTableFuture")
8336		return
8337	}
8338	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8339	if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent {
8340		ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response)
8341		if err != nil {
8342			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request")
8343		}
8344	}
8345	return
8346}
8347
8348// ExpressRouteCircuitsListRoutesTableFuture an abstraction for monitoring and retrieving the results of a
8349// long-running operation.
8350type ExpressRouteCircuitsListRoutesTableFuture struct {
8351	azure.FutureAPI
8352	// Result returns the result of the asynchronous operation.
8353	// If the operation has not completed it will return an error.
8354	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsRoutesTableListResult, error)
8355}
8356
8357// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8358func (future *ExpressRouteCircuitsListRoutesTableFuture) UnmarshalJSON(body []byte) error {
8359	var azFuture azure.Future
8360	if err := json.Unmarshal(body, &azFuture); err != nil {
8361		return err
8362	}
8363	future.FutureAPI = &azFuture
8364	future.Result = future.result
8365	return nil
8366}
8367
8368// result is the default implementation for ExpressRouteCircuitsListRoutesTableFuture.Result.
8369func (future *ExpressRouteCircuitsListRoutesTableFuture) result(client ExpressRouteCircuitsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
8370	var done bool
8371	done, err = future.DoneWithContext(context.Background(), client)
8372	if err != nil {
8373		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", future.Response(), "Polling failure")
8374		return
8375	}
8376	if !done {
8377		ercrtlr.Response.Response = future.Response()
8378		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableFuture")
8379		return
8380	}
8381	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8382	if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent {
8383		ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response)
8384		if err != nil {
8385			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request")
8386		}
8387	}
8388	return
8389}
8390
8391// ExpressRouteCircuitsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving the
8392// results of a long-running operation.
8393type ExpressRouteCircuitsListRoutesTableSummaryFuture struct {
8394	azure.FutureAPI
8395	// Result returns the result of the asynchronous operation.
8396	// If the operation has not completed it will return an error.
8397	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsRoutesTableSummaryListResult, error)
8398}
8399
8400// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8401func (future *ExpressRouteCircuitsListRoutesTableSummaryFuture) UnmarshalJSON(body []byte) error {
8402	var azFuture azure.Future
8403	if err := json.Unmarshal(body, &azFuture); err != nil {
8404		return err
8405	}
8406	future.FutureAPI = &azFuture
8407	future.Result = future.result
8408	return nil
8409}
8410
8411// result is the default implementation for ExpressRouteCircuitsListRoutesTableSummaryFuture.Result.
8412func (future *ExpressRouteCircuitsListRoutesTableSummaryFuture) result(client ExpressRouteCircuitsClient) (ercrtslr ExpressRouteCircuitsRoutesTableSummaryListResult, err error) {
8413	var done bool
8414	done, err = future.DoneWithContext(context.Background(), client)
8415	if err != nil {
8416		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", future.Response(), "Polling failure")
8417		return
8418	}
8419	if !done {
8420		ercrtslr.Response.Response = future.Response()
8421		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsListRoutesTableSummaryFuture")
8422		return
8423	}
8424	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8425	if ercrtslr.Response.Response, err = future.GetResult(sender); err == nil && ercrtslr.Response.Response.StatusCode != http.StatusNoContent {
8426		ercrtslr, err = client.ListRoutesTableSummaryResponder(ercrtslr.Response.Response)
8427		if err != nil {
8428			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsListRoutesTableSummaryFuture", "Result", ercrtslr.Response.Response, "Failure responding to request")
8429		}
8430	}
8431	return
8432}
8433
8434// ExpressRouteCircuitsRoutesTableListResult response for ListRoutesTable associated with the Express Route
8435// Circuits API.
8436type ExpressRouteCircuitsRoutesTableListResult struct {
8437	autorest.Response `json:"-"`
8438	// Value - The list of routes table.
8439	Value *[]ExpressRouteCircuitRoutesTable `json:"value,omitempty"`
8440	// NextLink - The URL to get the next set of results.
8441	NextLink *string `json:"nextLink,omitempty"`
8442}
8443
8444// ExpressRouteCircuitsRoutesTableSummaryListResult response for ListRoutesTable associated with the
8445// Express Route Circuits API.
8446type ExpressRouteCircuitsRoutesTableSummaryListResult struct {
8447	autorest.Response `json:"-"`
8448	// Value - A list of the routes table.
8449	Value *[]ExpressRouteCircuitRoutesTableSummary `json:"value,omitempty"`
8450	// NextLink - The URL to get the next set of results.
8451	NextLink *string `json:"nextLink,omitempty"`
8452}
8453
8454// ExpressRouteCircuitStats contains stats associated with the peering.
8455type ExpressRouteCircuitStats struct {
8456	autorest.Response `json:"-"`
8457	// PrimarybytesIn - Gets BytesIn of the peering.
8458	PrimarybytesIn *int64 `json:"primarybytesIn,omitempty"`
8459	// PrimarybytesOut - Gets BytesOut of the peering.
8460	PrimarybytesOut *int64 `json:"primarybytesOut,omitempty"`
8461	// SecondarybytesIn - Gets BytesIn of the peering.
8462	SecondarybytesIn *int64 `json:"secondarybytesIn,omitempty"`
8463	// SecondarybytesOut - Gets BytesOut of the peering.
8464	SecondarybytesOut *int64 `json:"secondarybytesOut,omitempty"`
8465}
8466
8467// ExpressRouteCircuitsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
8468// long-running operation.
8469type ExpressRouteCircuitsUpdateTagsFuture struct {
8470	azure.FutureAPI
8471	// Result returns the result of the asynchronous operation.
8472	// If the operation has not completed it will return an error.
8473	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuit, error)
8474}
8475
8476// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8477func (future *ExpressRouteCircuitsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
8478	var azFuture azure.Future
8479	if err := json.Unmarshal(body, &azFuture); err != nil {
8480		return err
8481	}
8482	future.FutureAPI = &azFuture
8483	future.Result = future.result
8484	return nil
8485}
8486
8487// result is the default implementation for ExpressRouteCircuitsUpdateTagsFuture.Result.
8488func (future *ExpressRouteCircuitsUpdateTagsFuture) result(client ExpressRouteCircuitsClient) (erc ExpressRouteCircuit, err error) {
8489	var done bool
8490	done, err = future.DoneWithContext(context.Background(), client)
8491	if err != nil {
8492		err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
8493		return
8494	}
8495	if !done {
8496		erc.Response.Response = future.Response()
8497		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCircuitsUpdateTagsFuture")
8498		return
8499	}
8500	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8501	if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
8502		erc, err = client.UpdateTagsResponder(erc.Response.Response)
8503		if err != nil {
8504			err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsUpdateTagsFuture", "Result", erc.Response.Response, "Failure responding to request")
8505		}
8506	}
8507	return
8508}
8509
8510// ExpressRouteConnection expressRouteConnection resource.
8511type ExpressRouteConnection struct {
8512	autorest.Response                 `json:"-"`
8513	*ExpressRouteConnectionProperties `json:"properties,omitempty"`
8514	// Name - The name of the resource.
8515	Name *string `json:"name,omitempty"`
8516	// ID - Resource ID.
8517	ID *string `json:"id,omitempty"`
8518}
8519
8520// MarshalJSON is the custom marshaler for ExpressRouteConnection.
8521func (erc ExpressRouteConnection) MarshalJSON() ([]byte, error) {
8522	objectMap := make(map[string]interface{})
8523	if erc.ExpressRouteConnectionProperties != nil {
8524		objectMap["properties"] = erc.ExpressRouteConnectionProperties
8525	}
8526	if erc.Name != nil {
8527		objectMap["name"] = erc.Name
8528	}
8529	if erc.ID != nil {
8530		objectMap["id"] = erc.ID
8531	}
8532	return json.Marshal(objectMap)
8533}
8534
8535// UnmarshalJSON is the custom unmarshaler for ExpressRouteConnection struct.
8536func (erc *ExpressRouteConnection) UnmarshalJSON(body []byte) error {
8537	var m map[string]*json.RawMessage
8538	err := json.Unmarshal(body, &m)
8539	if err != nil {
8540		return err
8541	}
8542	for k, v := range m {
8543		switch k {
8544		case "properties":
8545			if v != nil {
8546				var expressRouteConnectionProperties ExpressRouteConnectionProperties
8547				err = json.Unmarshal(*v, &expressRouteConnectionProperties)
8548				if err != nil {
8549					return err
8550				}
8551				erc.ExpressRouteConnectionProperties = &expressRouteConnectionProperties
8552			}
8553		case "name":
8554			if v != nil {
8555				var name string
8556				err = json.Unmarshal(*v, &name)
8557				if err != nil {
8558					return err
8559				}
8560				erc.Name = &name
8561			}
8562		case "id":
8563			if v != nil {
8564				var ID string
8565				err = json.Unmarshal(*v, &ID)
8566				if err != nil {
8567					return err
8568				}
8569				erc.ID = &ID
8570			}
8571		}
8572	}
8573
8574	return nil
8575}
8576
8577// ExpressRouteConnectionID the ID of the ExpressRouteConnection.
8578type ExpressRouteConnectionID struct {
8579	// ID - READ-ONLY; The ID of the ExpressRouteConnection.
8580	ID *string `json:"id,omitempty"`
8581}
8582
8583// MarshalJSON is the custom marshaler for ExpressRouteConnectionID.
8584func (erci ExpressRouteConnectionID) MarshalJSON() ([]byte, error) {
8585	objectMap := make(map[string]interface{})
8586	return json.Marshal(objectMap)
8587}
8588
8589// ExpressRouteConnectionList expressRouteConnection list
8590type ExpressRouteConnectionList struct {
8591	autorest.Response `json:"-"`
8592	// Value - The list of ExpressRoute connections
8593	Value *[]ExpressRouteConnection `json:"value,omitempty"`
8594}
8595
8596// ExpressRouteConnectionProperties properties of the ExpressRouteConnection subresource.
8597type ExpressRouteConnectionProperties struct {
8598	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
8599	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
8600	// ExpressRouteCircuitPeering - The ExpressRoute circuit peering.
8601	ExpressRouteCircuitPeering *ExpressRouteCircuitPeeringID `json:"expressRouteCircuitPeering,omitempty"`
8602	// AuthorizationKey - Authorization key to establish the connection.
8603	AuthorizationKey *string `json:"authorizationKey,omitempty"`
8604	// RoutingWeight - The routing weight associated to the connection.
8605	RoutingWeight *int32 `json:"routingWeight,omitempty"`
8606}
8607
8608// MarshalJSON is the custom marshaler for ExpressRouteConnectionProperties.
8609func (ercp ExpressRouteConnectionProperties) MarshalJSON() ([]byte, error) {
8610	objectMap := make(map[string]interface{})
8611	if ercp.ExpressRouteCircuitPeering != nil {
8612		objectMap["expressRouteCircuitPeering"] = ercp.ExpressRouteCircuitPeering
8613	}
8614	if ercp.AuthorizationKey != nil {
8615		objectMap["authorizationKey"] = ercp.AuthorizationKey
8616	}
8617	if ercp.RoutingWeight != nil {
8618		objectMap["routingWeight"] = ercp.RoutingWeight
8619	}
8620	return json.Marshal(objectMap)
8621}
8622
8623// ExpressRouteConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
8624// a long-running operation.
8625type ExpressRouteConnectionsCreateOrUpdateFuture struct {
8626	azure.FutureAPI
8627	// Result returns the result of the asynchronous operation.
8628	// If the operation has not completed it will return an error.
8629	Result func(ExpressRouteConnectionsClient) (ExpressRouteConnection, error)
8630}
8631
8632// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8633func (future *ExpressRouteConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
8634	var azFuture azure.Future
8635	if err := json.Unmarshal(body, &azFuture); err != nil {
8636		return err
8637	}
8638	future.FutureAPI = &azFuture
8639	future.Result = future.result
8640	return nil
8641}
8642
8643// result is the default implementation for ExpressRouteConnectionsCreateOrUpdateFuture.Result.
8644func (future *ExpressRouteConnectionsCreateOrUpdateFuture) result(client ExpressRouteConnectionsClient) (erc ExpressRouteConnection, err error) {
8645	var done bool
8646	done, err = future.DoneWithContext(context.Background(), client)
8647	if err != nil {
8648		err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
8649		return
8650	}
8651	if !done {
8652		erc.Response.Response = future.Response()
8653		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteConnectionsCreateOrUpdateFuture")
8654		return
8655	}
8656	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
8657	if erc.Response.Response, err = future.GetResult(sender); err == nil && erc.Response.Response.StatusCode != http.StatusNoContent {
8658		erc, err = client.CreateOrUpdateResponder(erc.Response.Response)
8659		if err != nil {
8660			err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsCreateOrUpdateFuture", "Result", erc.Response.Response, "Failure responding to request")
8661		}
8662	}
8663	return
8664}
8665
8666// ExpressRouteConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a
8667// long-running operation.
8668type ExpressRouteConnectionsDeleteFuture struct {
8669	azure.FutureAPI
8670	// Result returns the result of the asynchronous operation.
8671	// If the operation has not completed it will return an error.
8672	Result func(ExpressRouteConnectionsClient) (autorest.Response, error)
8673}
8674
8675// UnmarshalJSON is the custom unmarshaller for CreateFuture.
8676func (future *ExpressRouteConnectionsDeleteFuture) UnmarshalJSON(body []byte) error {
8677	var azFuture azure.Future
8678	if err := json.Unmarshal(body, &azFuture); err != nil {
8679		return err
8680	}
8681	future.FutureAPI = &azFuture
8682	future.Result = future.result
8683	return nil
8684}
8685
8686// result is the default implementation for ExpressRouteConnectionsDeleteFuture.Result.
8687func (future *ExpressRouteConnectionsDeleteFuture) result(client ExpressRouteConnectionsClient) (ar autorest.Response, err error) {
8688	var done bool
8689	done, err = future.DoneWithContext(context.Background(), client)
8690	if err != nil {
8691		err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
8692		return
8693	}
8694	if !done {
8695		ar.Response = future.Response()
8696		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteConnectionsDeleteFuture")
8697		return
8698	}
8699	ar.Response = future.Response()
8700	return
8701}
8702
8703// ExpressRouteCrossConnection expressRouteCrossConnection resource
8704type ExpressRouteCrossConnection struct {
8705	autorest.Response                      `json:"-"`
8706	*ExpressRouteCrossConnectionProperties `json:"properties,omitempty"`
8707	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
8708	Etag *string `json:"etag,omitempty"`
8709	// ID - Resource ID.
8710	ID *string `json:"id,omitempty"`
8711	// Name - READ-ONLY; Resource name.
8712	Name *string `json:"name,omitempty"`
8713	// Type - READ-ONLY; Resource type.
8714	Type *string `json:"type,omitempty"`
8715	// Location - Resource location.
8716	Location *string `json:"location,omitempty"`
8717	// Tags - Resource tags.
8718	Tags map[string]*string `json:"tags"`
8719}
8720
8721// MarshalJSON is the custom marshaler for ExpressRouteCrossConnection.
8722func (ercc ExpressRouteCrossConnection) MarshalJSON() ([]byte, error) {
8723	objectMap := make(map[string]interface{})
8724	if ercc.ExpressRouteCrossConnectionProperties != nil {
8725		objectMap["properties"] = ercc.ExpressRouteCrossConnectionProperties
8726	}
8727	if ercc.ID != nil {
8728		objectMap["id"] = ercc.ID
8729	}
8730	if ercc.Location != nil {
8731		objectMap["location"] = ercc.Location
8732	}
8733	if ercc.Tags != nil {
8734		objectMap["tags"] = ercc.Tags
8735	}
8736	return json.Marshal(objectMap)
8737}
8738
8739// UnmarshalJSON is the custom unmarshaler for ExpressRouteCrossConnection struct.
8740func (ercc *ExpressRouteCrossConnection) UnmarshalJSON(body []byte) error {
8741	var m map[string]*json.RawMessage
8742	err := json.Unmarshal(body, &m)
8743	if err != nil {
8744		return err
8745	}
8746	for k, v := range m {
8747		switch k {
8748		case "properties":
8749			if v != nil {
8750				var expressRouteCrossConnectionProperties ExpressRouteCrossConnectionProperties
8751				err = json.Unmarshal(*v, &expressRouteCrossConnectionProperties)
8752				if err != nil {
8753					return err
8754				}
8755				ercc.ExpressRouteCrossConnectionProperties = &expressRouteCrossConnectionProperties
8756			}
8757		case "etag":
8758			if v != nil {
8759				var etag string
8760				err = json.Unmarshal(*v, &etag)
8761				if err != nil {
8762					return err
8763				}
8764				ercc.Etag = &etag
8765			}
8766		case "id":
8767			if v != nil {
8768				var ID string
8769				err = json.Unmarshal(*v, &ID)
8770				if err != nil {
8771					return err
8772				}
8773				ercc.ID = &ID
8774			}
8775		case "name":
8776			if v != nil {
8777				var name string
8778				err = json.Unmarshal(*v, &name)
8779				if err != nil {
8780					return err
8781				}
8782				ercc.Name = &name
8783			}
8784		case "type":
8785			if v != nil {
8786				var typeVar string
8787				err = json.Unmarshal(*v, &typeVar)
8788				if err != nil {
8789					return err
8790				}
8791				ercc.Type = &typeVar
8792			}
8793		case "location":
8794			if v != nil {
8795				var location string
8796				err = json.Unmarshal(*v, &location)
8797				if err != nil {
8798					return err
8799				}
8800				ercc.Location = &location
8801			}
8802		case "tags":
8803			if v != nil {
8804				var tags map[string]*string
8805				err = json.Unmarshal(*v, &tags)
8806				if err != nil {
8807					return err
8808				}
8809				ercc.Tags = tags
8810			}
8811		}
8812	}
8813
8814	return nil
8815}
8816
8817// ExpressRouteCrossConnectionListResult response for ListExpressRouteCrossConnection API service call.
8818type ExpressRouteCrossConnectionListResult struct {
8819	autorest.Response `json:"-"`
8820	// Value - A list of ExpressRouteCrossConnection resources.
8821	Value *[]ExpressRouteCrossConnection `json:"value,omitempty"`
8822	// NextLink - READ-ONLY; The URL to get the next set of results.
8823	NextLink *string `json:"nextLink,omitempty"`
8824}
8825
8826// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionListResult.
8827func (ercclr ExpressRouteCrossConnectionListResult) MarshalJSON() ([]byte, error) {
8828	objectMap := make(map[string]interface{})
8829	if ercclr.Value != nil {
8830		objectMap["value"] = ercclr.Value
8831	}
8832	return json.Marshal(objectMap)
8833}
8834
8835// ExpressRouteCrossConnectionListResultIterator provides access to a complete listing of
8836// ExpressRouteCrossConnection values.
8837type ExpressRouteCrossConnectionListResultIterator struct {
8838	i    int
8839	page ExpressRouteCrossConnectionListResultPage
8840}
8841
8842// NextWithContext advances to the next value.  If there was an error making
8843// the request the iterator does not advance and the error is returned.
8844func (iter *ExpressRouteCrossConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
8845	if tracing.IsEnabled() {
8846		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionListResultIterator.NextWithContext")
8847		defer func() {
8848			sc := -1
8849			if iter.Response().Response.Response != nil {
8850				sc = iter.Response().Response.Response.StatusCode
8851			}
8852			tracing.EndSpan(ctx, sc, err)
8853		}()
8854	}
8855	iter.i++
8856	if iter.i < len(iter.page.Values()) {
8857		return nil
8858	}
8859	err = iter.page.NextWithContext(ctx)
8860	if err != nil {
8861		iter.i--
8862		return err
8863	}
8864	iter.i = 0
8865	return nil
8866}
8867
8868// Next advances to the next value.  If there was an error making
8869// the request the iterator does not advance and the error is returned.
8870// Deprecated: Use NextWithContext() instead.
8871func (iter *ExpressRouteCrossConnectionListResultIterator) Next() error {
8872	return iter.NextWithContext(context.Background())
8873}
8874
8875// NotDone returns true if the enumeration should be started or is not yet complete.
8876func (iter ExpressRouteCrossConnectionListResultIterator) NotDone() bool {
8877	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8878}
8879
8880// Response returns the raw server response from the last page request.
8881func (iter ExpressRouteCrossConnectionListResultIterator) Response() ExpressRouteCrossConnectionListResult {
8882	return iter.page.Response()
8883}
8884
8885// Value returns the current value or a zero-initialized value if the
8886// iterator has advanced beyond the end of the collection.
8887func (iter ExpressRouteCrossConnectionListResultIterator) Value() ExpressRouteCrossConnection {
8888	if !iter.page.NotDone() {
8889		return ExpressRouteCrossConnection{}
8890	}
8891	return iter.page.Values()[iter.i]
8892}
8893
8894// Creates a new instance of the ExpressRouteCrossConnectionListResultIterator type.
8895func NewExpressRouteCrossConnectionListResultIterator(page ExpressRouteCrossConnectionListResultPage) ExpressRouteCrossConnectionListResultIterator {
8896	return ExpressRouteCrossConnectionListResultIterator{page: page}
8897}
8898
8899// IsEmpty returns true if the ListResult contains no values.
8900func (ercclr ExpressRouteCrossConnectionListResult) IsEmpty() bool {
8901	return ercclr.Value == nil || len(*ercclr.Value) == 0
8902}
8903
8904// hasNextLink returns true if the NextLink is not empty.
8905func (ercclr ExpressRouteCrossConnectionListResult) hasNextLink() bool {
8906	return ercclr.NextLink != nil && len(*ercclr.NextLink) != 0
8907}
8908
8909// expressRouteCrossConnectionListResultPreparer prepares a request to retrieve the next set of results.
8910// It returns nil if no more results exist.
8911func (ercclr ExpressRouteCrossConnectionListResult) expressRouteCrossConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
8912	if !ercclr.hasNextLink() {
8913		return nil, nil
8914	}
8915	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8916		autorest.AsJSON(),
8917		autorest.AsGet(),
8918		autorest.WithBaseURL(to.String(ercclr.NextLink)))
8919}
8920
8921// ExpressRouteCrossConnectionListResultPage contains a page of ExpressRouteCrossConnection values.
8922type ExpressRouteCrossConnectionListResultPage struct {
8923	fn     func(context.Context, ExpressRouteCrossConnectionListResult) (ExpressRouteCrossConnectionListResult, error)
8924	ercclr ExpressRouteCrossConnectionListResult
8925}
8926
8927// NextWithContext advances to the next page of values.  If there was an error making
8928// the request the page does not advance and the error is returned.
8929func (page *ExpressRouteCrossConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
8930	if tracing.IsEnabled() {
8931		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionListResultPage.NextWithContext")
8932		defer func() {
8933			sc := -1
8934			if page.Response().Response.Response != nil {
8935				sc = page.Response().Response.Response.StatusCode
8936			}
8937			tracing.EndSpan(ctx, sc, err)
8938		}()
8939	}
8940	for {
8941		next, err := page.fn(ctx, page.ercclr)
8942		if err != nil {
8943			return err
8944		}
8945		page.ercclr = next
8946		if !next.hasNextLink() || !next.IsEmpty() {
8947			break
8948		}
8949	}
8950	return nil
8951}
8952
8953// Next advances to the next page of values.  If there was an error making
8954// the request the page does not advance and the error is returned.
8955// Deprecated: Use NextWithContext() instead.
8956func (page *ExpressRouteCrossConnectionListResultPage) Next() error {
8957	return page.NextWithContext(context.Background())
8958}
8959
8960// NotDone returns true if the page enumeration should be started or is not yet complete.
8961func (page ExpressRouteCrossConnectionListResultPage) NotDone() bool {
8962	return !page.ercclr.IsEmpty()
8963}
8964
8965// Response returns the raw server response from the last page request.
8966func (page ExpressRouteCrossConnectionListResultPage) Response() ExpressRouteCrossConnectionListResult {
8967	return page.ercclr
8968}
8969
8970// Values returns the slice of values for the current page or nil if there are no values.
8971func (page ExpressRouteCrossConnectionListResultPage) Values() []ExpressRouteCrossConnection {
8972	if page.ercclr.IsEmpty() {
8973		return nil
8974	}
8975	return *page.ercclr.Value
8976}
8977
8978// Creates a new instance of the ExpressRouteCrossConnectionListResultPage type.
8979func NewExpressRouteCrossConnectionListResultPage(cur ExpressRouteCrossConnectionListResult, getNextPage func(context.Context, ExpressRouteCrossConnectionListResult) (ExpressRouteCrossConnectionListResult, error)) ExpressRouteCrossConnectionListResultPage {
8980	return ExpressRouteCrossConnectionListResultPage{
8981		fn:     getNextPage,
8982		ercclr: cur,
8983	}
8984}
8985
8986// ExpressRouteCrossConnectionPeering peering in an ExpressRoute Cross Connection resource.
8987type ExpressRouteCrossConnectionPeering struct {
8988	autorest.Response                             `json:"-"`
8989	*ExpressRouteCrossConnectionPeeringProperties `json:"properties,omitempty"`
8990	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
8991	Name *string `json:"name,omitempty"`
8992	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
8993	Etag *string `json:"etag,omitempty"`
8994	// ID - Resource ID.
8995	ID *string `json:"id,omitempty"`
8996}
8997
8998// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeering.
8999func (erccp ExpressRouteCrossConnectionPeering) MarshalJSON() ([]byte, error) {
9000	objectMap := make(map[string]interface{})
9001	if erccp.ExpressRouteCrossConnectionPeeringProperties != nil {
9002		objectMap["properties"] = erccp.ExpressRouteCrossConnectionPeeringProperties
9003	}
9004	if erccp.Name != nil {
9005		objectMap["name"] = erccp.Name
9006	}
9007	if erccp.ID != nil {
9008		objectMap["id"] = erccp.ID
9009	}
9010	return json.Marshal(objectMap)
9011}
9012
9013// UnmarshalJSON is the custom unmarshaler for ExpressRouteCrossConnectionPeering struct.
9014func (erccp *ExpressRouteCrossConnectionPeering) UnmarshalJSON(body []byte) error {
9015	var m map[string]*json.RawMessage
9016	err := json.Unmarshal(body, &m)
9017	if err != nil {
9018		return err
9019	}
9020	for k, v := range m {
9021		switch k {
9022		case "properties":
9023			if v != nil {
9024				var expressRouteCrossConnectionPeeringProperties ExpressRouteCrossConnectionPeeringProperties
9025				err = json.Unmarshal(*v, &expressRouteCrossConnectionPeeringProperties)
9026				if err != nil {
9027					return err
9028				}
9029				erccp.ExpressRouteCrossConnectionPeeringProperties = &expressRouteCrossConnectionPeeringProperties
9030			}
9031		case "name":
9032			if v != nil {
9033				var name string
9034				err = json.Unmarshal(*v, &name)
9035				if err != nil {
9036					return err
9037				}
9038				erccp.Name = &name
9039			}
9040		case "etag":
9041			if v != nil {
9042				var etag string
9043				err = json.Unmarshal(*v, &etag)
9044				if err != nil {
9045					return err
9046				}
9047				erccp.Etag = &etag
9048			}
9049		case "id":
9050			if v != nil {
9051				var ID string
9052				err = json.Unmarshal(*v, &ID)
9053				if err != nil {
9054					return err
9055				}
9056				erccp.ID = &ID
9057			}
9058		}
9059	}
9060
9061	return nil
9062}
9063
9064// ExpressRouteCrossConnectionPeeringList response for ListPeering API service call retrieves all peerings
9065// that belong to an ExpressRouteCrossConnection.
9066type ExpressRouteCrossConnectionPeeringList struct {
9067	autorest.Response `json:"-"`
9068	// Value - The peerings in an express route cross connection.
9069	Value *[]ExpressRouteCrossConnectionPeering `json:"value,omitempty"`
9070	// NextLink - READ-ONLY; The URL to get the next set of results.
9071	NextLink *string `json:"nextLink,omitempty"`
9072}
9073
9074// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeeringList.
9075func (erccpl ExpressRouteCrossConnectionPeeringList) MarshalJSON() ([]byte, error) {
9076	objectMap := make(map[string]interface{})
9077	if erccpl.Value != nil {
9078		objectMap["value"] = erccpl.Value
9079	}
9080	return json.Marshal(objectMap)
9081}
9082
9083// ExpressRouteCrossConnectionPeeringListIterator provides access to a complete listing of
9084// ExpressRouteCrossConnectionPeering values.
9085type ExpressRouteCrossConnectionPeeringListIterator struct {
9086	i    int
9087	page ExpressRouteCrossConnectionPeeringListPage
9088}
9089
9090// NextWithContext advances to the next value.  If there was an error making
9091// the request the iterator does not advance and the error is returned.
9092func (iter *ExpressRouteCrossConnectionPeeringListIterator) NextWithContext(ctx context.Context) (err error) {
9093	if tracing.IsEnabled() {
9094		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringListIterator.NextWithContext")
9095		defer func() {
9096			sc := -1
9097			if iter.Response().Response.Response != nil {
9098				sc = iter.Response().Response.Response.StatusCode
9099			}
9100			tracing.EndSpan(ctx, sc, err)
9101		}()
9102	}
9103	iter.i++
9104	if iter.i < len(iter.page.Values()) {
9105		return nil
9106	}
9107	err = iter.page.NextWithContext(ctx)
9108	if err != nil {
9109		iter.i--
9110		return err
9111	}
9112	iter.i = 0
9113	return nil
9114}
9115
9116// Next advances to the next value.  If there was an error making
9117// the request the iterator does not advance and the error is returned.
9118// Deprecated: Use NextWithContext() instead.
9119func (iter *ExpressRouteCrossConnectionPeeringListIterator) Next() error {
9120	return iter.NextWithContext(context.Background())
9121}
9122
9123// NotDone returns true if the enumeration should be started or is not yet complete.
9124func (iter ExpressRouteCrossConnectionPeeringListIterator) NotDone() bool {
9125	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9126}
9127
9128// Response returns the raw server response from the last page request.
9129func (iter ExpressRouteCrossConnectionPeeringListIterator) Response() ExpressRouteCrossConnectionPeeringList {
9130	return iter.page.Response()
9131}
9132
9133// Value returns the current value or a zero-initialized value if the
9134// iterator has advanced beyond the end of the collection.
9135func (iter ExpressRouteCrossConnectionPeeringListIterator) Value() ExpressRouteCrossConnectionPeering {
9136	if !iter.page.NotDone() {
9137		return ExpressRouteCrossConnectionPeering{}
9138	}
9139	return iter.page.Values()[iter.i]
9140}
9141
9142// Creates a new instance of the ExpressRouteCrossConnectionPeeringListIterator type.
9143func NewExpressRouteCrossConnectionPeeringListIterator(page ExpressRouteCrossConnectionPeeringListPage) ExpressRouteCrossConnectionPeeringListIterator {
9144	return ExpressRouteCrossConnectionPeeringListIterator{page: page}
9145}
9146
9147// IsEmpty returns true if the ListResult contains no values.
9148func (erccpl ExpressRouteCrossConnectionPeeringList) IsEmpty() bool {
9149	return erccpl.Value == nil || len(*erccpl.Value) == 0
9150}
9151
9152// hasNextLink returns true if the NextLink is not empty.
9153func (erccpl ExpressRouteCrossConnectionPeeringList) hasNextLink() bool {
9154	return erccpl.NextLink != nil && len(*erccpl.NextLink) != 0
9155}
9156
9157// expressRouteCrossConnectionPeeringListPreparer prepares a request to retrieve the next set of results.
9158// It returns nil if no more results exist.
9159func (erccpl ExpressRouteCrossConnectionPeeringList) expressRouteCrossConnectionPeeringListPreparer(ctx context.Context) (*http.Request, error) {
9160	if !erccpl.hasNextLink() {
9161		return nil, nil
9162	}
9163	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9164		autorest.AsJSON(),
9165		autorest.AsGet(),
9166		autorest.WithBaseURL(to.String(erccpl.NextLink)))
9167}
9168
9169// ExpressRouteCrossConnectionPeeringListPage contains a page of ExpressRouteCrossConnectionPeering values.
9170type ExpressRouteCrossConnectionPeeringListPage struct {
9171	fn     func(context.Context, ExpressRouteCrossConnectionPeeringList) (ExpressRouteCrossConnectionPeeringList, error)
9172	erccpl ExpressRouteCrossConnectionPeeringList
9173}
9174
9175// NextWithContext advances to the next page of values.  If there was an error making
9176// the request the page does not advance and the error is returned.
9177func (page *ExpressRouteCrossConnectionPeeringListPage) NextWithContext(ctx context.Context) (err error) {
9178	if tracing.IsEnabled() {
9179		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringListPage.NextWithContext")
9180		defer func() {
9181			sc := -1
9182			if page.Response().Response.Response != nil {
9183				sc = page.Response().Response.Response.StatusCode
9184			}
9185			tracing.EndSpan(ctx, sc, err)
9186		}()
9187	}
9188	for {
9189		next, err := page.fn(ctx, page.erccpl)
9190		if err != nil {
9191			return err
9192		}
9193		page.erccpl = next
9194		if !next.hasNextLink() || !next.IsEmpty() {
9195			break
9196		}
9197	}
9198	return nil
9199}
9200
9201// Next advances to the next page of values.  If there was an error making
9202// the request the page does not advance and the error is returned.
9203// Deprecated: Use NextWithContext() instead.
9204func (page *ExpressRouteCrossConnectionPeeringListPage) Next() error {
9205	return page.NextWithContext(context.Background())
9206}
9207
9208// NotDone returns true if the page enumeration should be started or is not yet complete.
9209func (page ExpressRouteCrossConnectionPeeringListPage) NotDone() bool {
9210	return !page.erccpl.IsEmpty()
9211}
9212
9213// Response returns the raw server response from the last page request.
9214func (page ExpressRouteCrossConnectionPeeringListPage) Response() ExpressRouteCrossConnectionPeeringList {
9215	return page.erccpl
9216}
9217
9218// Values returns the slice of values for the current page or nil if there are no values.
9219func (page ExpressRouteCrossConnectionPeeringListPage) Values() []ExpressRouteCrossConnectionPeering {
9220	if page.erccpl.IsEmpty() {
9221		return nil
9222	}
9223	return *page.erccpl.Value
9224}
9225
9226// Creates a new instance of the ExpressRouteCrossConnectionPeeringListPage type.
9227func NewExpressRouteCrossConnectionPeeringListPage(cur ExpressRouteCrossConnectionPeeringList, getNextPage func(context.Context, ExpressRouteCrossConnectionPeeringList) (ExpressRouteCrossConnectionPeeringList, error)) ExpressRouteCrossConnectionPeeringListPage {
9228	return ExpressRouteCrossConnectionPeeringListPage{
9229		fn:     getNextPage,
9230		erccpl: cur,
9231	}
9232}
9233
9234// ExpressRouteCrossConnectionPeeringProperties ...
9235type ExpressRouteCrossConnectionPeeringProperties struct {
9236	// PeeringType - The peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'
9237	PeeringType ExpressRoutePeeringType `json:"peeringType,omitempty"`
9238	// State - The peering state. Possible values include: 'ExpressRoutePeeringStateDisabled', 'ExpressRoutePeeringStateEnabled'
9239	State ExpressRoutePeeringState `json:"state,omitempty"`
9240	// AzureASN - READ-ONLY; The Azure ASN.
9241	AzureASN *int32 `json:"azureASN,omitempty"`
9242	// PeerASN - The peer ASN.
9243	PeerASN *int64 `json:"peerASN,omitempty"`
9244	// PrimaryPeerAddressPrefix - The primary address prefix.
9245	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
9246	// SecondaryPeerAddressPrefix - The secondary address prefix.
9247	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
9248	// PrimaryAzurePort - READ-ONLY; The primary port.
9249	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
9250	// SecondaryAzurePort - READ-ONLY; The secondary port.
9251	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
9252	// SharedKey - The shared key.
9253	SharedKey *string `json:"sharedKey,omitempty"`
9254	// VlanID - The VLAN ID.
9255	VlanID *int32 `json:"vlanId,omitempty"`
9256	// MicrosoftPeeringConfig - The Microsoft peering configuration.
9257	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
9258	// ProvisioningState - READ-ONLY; Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
9259	ProvisioningState *string `json:"provisioningState,omitempty"`
9260	// GatewayManagerEtag - The GatewayManager Etag.
9261	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
9262	// LastModifiedBy - Gets whether the provider or the customer last modified the peering.
9263	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
9264	// Ipv6PeeringConfig - The IPv6 peering configuration.
9265	Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"`
9266}
9267
9268// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionPeeringProperties.
9269func (erccpp ExpressRouteCrossConnectionPeeringProperties) MarshalJSON() ([]byte, error) {
9270	objectMap := make(map[string]interface{})
9271	if erccpp.PeeringType != "" {
9272		objectMap["peeringType"] = erccpp.PeeringType
9273	}
9274	if erccpp.State != "" {
9275		objectMap["state"] = erccpp.State
9276	}
9277	if erccpp.PeerASN != nil {
9278		objectMap["peerASN"] = erccpp.PeerASN
9279	}
9280	if erccpp.PrimaryPeerAddressPrefix != nil {
9281		objectMap["primaryPeerAddressPrefix"] = erccpp.PrimaryPeerAddressPrefix
9282	}
9283	if erccpp.SecondaryPeerAddressPrefix != nil {
9284		objectMap["secondaryPeerAddressPrefix"] = erccpp.SecondaryPeerAddressPrefix
9285	}
9286	if erccpp.SharedKey != nil {
9287		objectMap["sharedKey"] = erccpp.SharedKey
9288	}
9289	if erccpp.VlanID != nil {
9290		objectMap["vlanId"] = erccpp.VlanID
9291	}
9292	if erccpp.MicrosoftPeeringConfig != nil {
9293		objectMap["microsoftPeeringConfig"] = erccpp.MicrosoftPeeringConfig
9294	}
9295	if erccpp.GatewayManagerEtag != nil {
9296		objectMap["gatewayManagerEtag"] = erccpp.GatewayManagerEtag
9297	}
9298	if erccpp.LastModifiedBy != nil {
9299		objectMap["lastModifiedBy"] = erccpp.LastModifiedBy
9300	}
9301	if erccpp.Ipv6PeeringConfig != nil {
9302		objectMap["ipv6PeeringConfig"] = erccpp.Ipv6PeeringConfig
9303	}
9304	return json.Marshal(objectMap)
9305}
9306
9307// ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
9308// results of a long-running operation.
9309type ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture struct {
9310	azure.FutureAPI
9311	// Result returns the result of the asynchronous operation.
9312	// If the operation has not completed it will return an error.
9313	Result func(ExpressRouteCrossConnectionPeeringsClient) (ExpressRouteCrossConnectionPeering, error)
9314}
9315
9316// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9317func (future *ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
9318	var azFuture azure.Future
9319	if err := json.Unmarshal(body, &azFuture); err != nil {
9320		return err
9321	}
9322	future.FutureAPI = &azFuture
9323	future.Result = future.result
9324	return nil
9325}
9326
9327// result is the default implementation for ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture.Result.
9328func (future *ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture) result(client ExpressRouteCrossConnectionPeeringsClient) (erccp ExpressRouteCrossConnectionPeering, err error) {
9329	var done bool
9330	done, err = future.DoneWithContext(context.Background(), client)
9331	if err != nil {
9332		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
9333		return
9334	}
9335	if !done {
9336		erccp.Response.Response = future.Response()
9337		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture")
9338		return
9339	}
9340	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9341	if erccp.Response.Response, err = future.GetResult(sender); err == nil && erccp.Response.Response.StatusCode != http.StatusNoContent {
9342		erccp, err = client.CreateOrUpdateResponder(erccp.Response.Response)
9343		if err != nil {
9344			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture", "Result", erccp.Response.Response, "Failure responding to request")
9345		}
9346	}
9347	return
9348}
9349
9350// ExpressRouteCrossConnectionPeeringsDeleteFuture an abstraction for monitoring and retrieving the results
9351// of a long-running operation.
9352type ExpressRouteCrossConnectionPeeringsDeleteFuture struct {
9353	azure.FutureAPI
9354	// Result returns the result of the asynchronous operation.
9355	// If the operation has not completed it will return an error.
9356	Result func(ExpressRouteCrossConnectionPeeringsClient) (autorest.Response, error)
9357}
9358
9359// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9360func (future *ExpressRouteCrossConnectionPeeringsDeleteFuture) UnmarshalJSON(body []byte) error {
9361	var azFuture azure.Future
9362	if err := json.Unmarshal(body, &azFuture); err != nil {
9363		return err
9364	}
9365	future.FutureAPI = &azFuture
9366	future.Result = future.result
9367	return nil
9368}
9369
9370// result is the default implementation for ExpressRouteCrossConnectionPeeringsDeleteFuture.Result.
9371func (future *ExpressRouteCrossConnectionPeeringsDeleteFuture) result(client ExpressRouteCrossConnectionPeeringsClient) (ar autorest.Response, err error) {
9372	var done bool
9373	done, err = future.DoneWithContext(context.Background(), client)
9374	if err != nil {
9375		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
9376		return
9377	}
9378	if !done {
9379		ar.Response = future.Response()
9380		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionPeeringsDeleteFuture")
9381		return
9382	}
9383	ar.Response = future.Response()
9384	return
9385}
9386
9387// ExpressRouteCrossConnectionProperties properties of ExpressRouteCrossConnection.
9388type ExpressRouteCrossConnectionProperties struct {
9389	// PrimaryAzurePort - READ-ONLY; The name of the primary  port.
9390	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
9391	// SecondaryAzurePort - READ-ONLY; The name of the secondary  port.
9392	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
9393	// STag - READ-ONLY; The identifier of the circuit traffic.
9394	STag *int32 `json:"sTag,omitempty"`
9395	// PeeringLocation - The peering location of the ExpressRoute circuit.
9396	PeeringLocation *string `json:"peeringLocation,omitempty"`
9397	// BandwidthInMbps - The circuit bandwidth In Mbps.
9398	BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"`
9399	// ExpressRouteCircuit - The ExpressRouteCircuit
9400	ExpressRouteCircuit *ExpressRouteCircuitReference `json:"expressRouteCircuit,omitempty"`
9401	// 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'
9402	ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"`
9403	// ServiceProviderNotes - Additional read only notes set by the connectivity provider.
9404	ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"`
9405	// ProvisioningState - READ-ONLY; Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
9406	ProvisioningState *string `json:"provisioningState,omitempty"`
9407	// Peerings - The list of peerings.
9408	Peerings *[]ExpressRouteCrossConnectionPeering `json:"peerings,omitempty"`
9409}
9410
9411// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionProperties.
9412func (erccp ExpressRouteCrossConnectionProperties) MarshalJSON() ([]byte, error) {
9413	objectMap := make(map[string]interface{})
9414	if erccp.PeeringLocation != nil {
9415		objectMap["peeringLocation"] = erccp.PeeringLocation
9416	}
9417	if erccp.BandwidthInMbps != nil {
9418		objectMap["bandwidthInMbps"] = erccp.BandwidthInMbps
9419	}
9420	if erccp.ExpressRouteCircuit != nil {
9421		objectMap["expressRouteCircuit"] = erccp.ExpressRouteCircuit
9422	}
9423	if erccp.ServiceProviderProvisioningState != "" {
9424		objectMap["serviceProviderProvisioningState"] = erccp.ServiceProviderProvisioningState
9425	}
9426	if erccp.ServiceProviderNotes != nil {
9427		objectMap["serviceProviderNotes"] = erccp.ServiceProviderNotes
9428	}
9429	if erccp.Peerings != nil {
9430		objectMap["peerings"] = erccp.Peerings
9431	}
9432	return json.Marshal(objectMap)
9433}
9434
9435// ExpressRouteCrossConnectionRoutesTableSummary the routes table associated with the ExpressRouteCircuit.
9436type ExpressRouteCrossConnectionRoutesTableSummary struct {
9437	// Neighbor - IP address of Neighbor router
9438	Neighbor *string `json:"neighbor,omitempty"`
9439	// Asn - Autonomous system number.
9440	Asn *int32 `json:"asn,omitempty"`
9441	// 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.
9442	UpDown *string `json:"upDown,omitempty"`
9443	// StateOrPrefixesReceived - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group.
9444	StateOrPrefixesReceived *string `json:"stateOrPrefixesReceived,omitempty"`
9445}
9446
9447// ExpressRouteCrossConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
9448// results of a long-running operation.
9449type ExpressRouteCrossConnectionsCreateOrUpdateFuture struct {
9450	azure.FutureAPI
9451	// Result returns the result of the asynchronous operation.
9452	// If the operation has not completed it will return an error.
9453	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCrossConnection, error)
9454}
9455
9456// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9457func (future *ExpressRouteCrossConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
9458	var azFuture azure.Future
9459	if err := json.Unmarshal(body, &azFuture); err != nil {
9460		return err
9461	}
9462	future.FutureAPI = &azFuture
9463	future.Result = future.result
9464	return nil
9465}
9466
9467// result is the default implementation for ExpressRouteCrossConnectionsCreateOrUpdateFuture.Result.
9468func (future *ExpressRouteCrossConnectionsCreateOrUpdateFuture) result(client ExpressRouteCrossConnectionsClient) (ercc ExpressRouteCrossConnection, err error) {
9469	var done bool
9470	done, err = future.DoneWithContext(context.Background(), client)
9471	if err != nil {
9472		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
9473		return
9474	}
9475	if !done {
9476		ercc.Response.Response = future.Response()
9477		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsCreateOrUpdateFuture")
9478		return
9479	}
9480	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9481	if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent {
9482		ercc, err = client.CreateOrUpdateResponder(ercc.Response.Response)
9483		if err != nil {
9484			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsCreateOrUpdateFuture", "Result", ercc.Response.Response, "Failure responding to request")
9485		}
9486	}
9487	return
9488}
9489
9490// ExpressRouteCrossConnectionsListArpTableFuture an abstraction for monitoring and retrieving the results
9491// of a long-running operation.
9492type ExpressRouteCrossConnectionsListArpTableFuture struct {
9493	azure.FutureAPI
9494	// Result returns the result of the asynchronous operation.
9495	// If the operation has not completed it will return an error.
9496	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCircuitsArpTableListResult, error)
9497}
9498
9499// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9500func (future *ExpressRouteCrossConnectionsListArpTableFuture) UnmarshalJSON(body []byte) error {
9501	var azFuture azure.Future
9502	if err := json.Unmarshal(body, &azFuture); err != nil {
9503		return err
9504	}
9505	future.FutureAPI = &azFuture
9506	future.Result = future.result
9507	return nil
9508}
9509
9510// result is the default implementation for ExpressRouteCrossConnectionsListArpTableFuture.Result.
9511func (future *ExpressRouteCrossConnectionsListArpTableFuture) result(client ExpressRouteCrossConnectionsClient) (ercatlr ExpressRouteCircuitsArpTableListResult, err error) {
9512	var done bool
9513	done, err = future.DoneWithContext(context.Background(), client)
9514	if err != nil {
9515		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListArpTableFuture", "Result", future.Response(), "Polling failure")
9516		return
9517	}
9518	if !done {
9519		ercatlr.Response.Response = future.Response()
9520		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListArpTableFuture")
9521		return
9522	}
9523	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9524	if ercatlr.Response.Response, err = future.GetResult(sender); err == nil && ercatlr.Response.Response.StatusCode != http.StatusNoContent {
9525		ercatlr, err = client.ListArpTableResponder(ercatlr.Response.Response)
9526		if err != nil {
9527			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListArpTableFuture", "Result", ercatlr.Response.Response, "Failure responding to request")
9528		}
9529	}
9530	return
9531}
9532
9533// ExpressRouteCrossConnectionsListRoutesTableFuture an abstraction for monitoring and retrieving the
9534// results of a long-running operation.
9535type ExpressRouteCrossConnectionsListRoutesTableFuture struct {
9536	azure.FutureAPI
9537	// Result returns the result of the asynchronous operation.
9538	// If the operation has not completed it will return an error.
9539	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCircuitsRoutesTableListResult, error)
9540}
9541
9542// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9543func (future *ExpressRouteCrossConnectionsListRoutesTableFuture) UnmarshalJSON(body []byte) error {
9544	var azFuture azure.Future
9545	if err := json.Unmarshal(body, &azFuture); err != nil {
9546		return err
9547	}
9548	future.FutureAPI = &azFuture
9549	future.Result = future.result
9550	return nil
9551}
9552
9553// result is the default implementation for ExpressRouteCrossConnectionsListRoutesTableFuture.Result.
9554func (future *ExpressRouteCrossConnectionsListRoutesTableFuture) result(client ExpressRouteCrossConnectionsClient) (ercrtlr ExpressRouteCircuitsRoutesTableListResult, err error) {
9555	var done bool
9556	done, err = future.DoneWithContext(context.Background(), client)
9557	if err != nil {
9558		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableFuture", "Result", future.Response(), "Polling failure")
9559		return
9560	}
9561	if !done {
9562		ercrtlr.Response.Response = future.Response()
9563		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListRoutesTableFuture")
9564		return
9565	}
9566	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9567	if ercrtlr.Response.Response, err = future.GetResult(sender); err == nil && ercrtlr.Response.Response.StatusCode != http.StatusNoContent {
9568		ercrtlr, err = client.ListRoutesTableResponder(ercrtlr.Response.Response)
9569		if err != nil {
9570			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableFuture", "Result", ercrtlr.Response.Response, "Failure responding to request")
9571		}
9572	}
9573	return
9574}
9575
9576// ExpressRouteCrossConnectionsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving
9577// the results of a long-running operation.
9578type ExpressRouteCrossConnectionsListRoutesTableSummaryFuture struct {
9579	azure.FutureAPI
9580	// Result returns the result of the asynchronous operation.
9581	// If the operation has not completed it will return an error.
9582	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCrossConnectionsRoutesTableSummaryListResult, error)
9583}
9584
9585// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9586func (future *ExpressRouteCrossConnectionsListRoutesTableSummaryFuture) UnmarshalJSON(body []byte) error {
9587	var azFuture azure.Future
9588	if err := json.Unmarshal(body, &azFuture); err != nil {
9589		return err
9590	}
9591	future.FutureAPI = &azFuture
9592	future.Result = future.result
9593	return nil
9594}
9595
9596// result is the default implementation for ExpressRouteCrossConnectionsListRoutesTableSummaryFuture.Result.
9597func (future *ExpressRouteCrossConnectionsListRoutesTableSummaryFuture) result(client ExpressRouteCrossConnectionsClient) (erccrtslr ExpressRouteCrossConnectionsRoutesTableSummaryListResult, err error) {
9598	var done bool
9599	done, err = future.DoneWithContext(context.Background(), client)
9600	if err != nil {
9601		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture", "Result", future.Response(), "Polling failure")
9602		return
9603	}
9604	if !done {
9605		erccrtslr.Response.Response = future.Response()
9606		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture")
9607		return
9608	}
9609	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9610	if erccrtslr.Response.Response, err = future.GetResult(sender); err == nil && erccrtslr.Response.Response.StatusCode != http.StatusNoContent {
9611		erccrtslr, err = client.ListRoutesTableSummaryResponder(erccrtslr.Response.Response)
9612		if err != nil {
9613			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsListRoutesTableSummaryFuture", "Result", erccrtslr.Response.Response, "Failure responding to request")
9614		}
9615	}
9616	return
9617}
9618
9619// ExpressRouteCrossConnectionsRoutesTableSummaryListResult response for ListRoutesTable associated with
9620// the Express Route Cross Connections.
9621type ExpressRouteCrossConnectionsRoutesTableSummaryListResult struct {
9622	autorest.Response `json:"-"`
9623	// Value - A list of the routes table.
9624	Value *[]ExpressRouteCrossConnectionRoutesTableSummary `json:"value,omitempty"`
9625	// NextLink - READ-ONLY; The URL to get the next set of results.
9626	NextLink *string `json:"nextLink,omitempty"`
9627}
9628
9629// MarshalJSON is the custom marshaler for ExpressRouteCrossConnectionsRoutesTableSummaryListResult.
9630func (erccrtslr ExpressRouteCrossConnectionsRoutesTableSummaryListResult) MarshalJSON() ([]byte, error) {
9631	objectMap := make(map[string]interface{})
9632	if erccrtslr.Value != nil {
9633		objectMap["value"] = erccrtslr.Value
9634	}
9635	return json.Marshal(objectMap)
9636}
9637
9638// ExpressRouteCrossConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the results of
9639// a long-running operation.
9640type ExpressRouteCrossConnectionsUpdateTagsFuture struct {
9641	azure.FutureAPI
9642	// Result returns the result of the asynchronous operation.
9643	// If the operation has not completed it will return an error.
9644	Result func(ExpressRouteCrossConnectionsClient) (ExpressRouteCrossConnection, error)
9645}
9646
9647// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9648func (future *ExpressRouteCrossConnectionsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
9649	var azFuture azure.Future
9650	if err := json.Unmarshal(body, &azFuture); err != nil {
9651		return err
9652	}
9653	future.FutureAPI = &azFuture
9654	future.Result = future.result
9655	return nil
9656}
9657
9658// result is the default implementation for ExpressRouteCrossConnectionsUpdateTagsFuture.Result.
9659func (future *ExpressRouteCrossConnectionsUpdateTagsFuture) result(client ExpressRouteCrossConnectionsClient) (ercc ExpressRouteCrossConnection, err error) {
9660	var done bool
9661	done, err = future.DoneWithContext(context.Background(), client)
9662	if err != nil {
9663		err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
9664		return
9665	}
9666	if !done {
9667		ercc.Response.Response = future.Response()
9668		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteCrossConnectionsUpdateTagsFuture")
9669		return
9670	}
9671	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9672	if ercc.Response.Response, err = future.GetResult(sender); err == nil && ercc.Response.Response.StatusCode != http.StatusNoContent {
9673		ercc, err = client.UpdateTagsResponder(ercc.Response.Response)
9674		if err != nil {
9675			err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsUpdateTagsFuture", "Result", ercc.Response.Response, "Failure responding to request")
9676		}
9677	}
9678	return
9679}
9680
9681// ExpressRouteGateway expressRoute gateway resource.
9682type ExpressRouteGateway struct {
9683	autorest.Response              `json:"-"`
9684	*ExpressRouteGatewayProperties `json:"properties,omitempty"`
9685	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
9686	Etag *string `json:"etag,omitempty"`
9687	// ID - Resource ID.
9688	ID *string `json:"id,omitempty"`
9689	// Name - READ-ONLY; Resource name.
9690	Name *string `json:"name,omitempty"`
9691	// Type - READ-ONLY; Resource type.
9692	Type *string `json:"type,omitempty"`
9693	// Location - Resource location.
9694	Location *string `json:"location,omitempty"`
9695	// Tags - Resource tags.
9696	Tags map[string]*string `json:"tags"`
9697}
9698
9699// MarshalJSON is the custom marshaler for ExpressRouteGateway.
9700func (erg ExpressRouteGateway) MarshalJSON() ([]byte, error) {
9701	objectMap := make(map[string]interface{})
9702	if erg.ExpressRouteGatewayProperties != nil {
9703		objectMap["properties"] = erg.ExpressRouteGatewayProperties
9704	}
9705	if erg.ID != nil {
9706		objectMap["id"] = erg.ID
9707	}
9708	if erg.Location != nil {
9709		objectMap["location"] = erg.Location
9710	}
9711	if erg.Tags != nil {
9712		objectMap["tags"] = erg.Tags
9713	}
9714	return json.Marshal(objectMap)
9715}
9716
9717// UnmarshalJSON is the custom unmarshaler for ExpressRouteGateway struct.
9718func (erg *ExpressRouteGateway) UnmarshalJSON(body []byte) error {
9719	var m map[string]*json.RawMessage
9720	err := json.Unmarshal(body, &m)
9721	if err != nil {
9722		return err
9723	}
9724	for k, v := range m {
9725		switch k {
9726		case "properties":
9727			if v != nil {
9728				var expressRouteGatewayProperties ExpressRouteGatewayProperties
9729				err = json.Unmarshal(*v, &expressRouteGatewayProperties)
9730				if err != nil {
9731					return err
9732				}
9733				erg.ExpressRouteGatewayProperties = &expressRouteGatewayProperties
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				erg.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				erg.ID = &ID
9752			}
9753		case "name":
9754			if v != nil {
9755				var name string
9756				err = json.Unmarshal(*v, &name)
9757				if err != nil {
9758					return err
9759				}
9760				erg.Name = &name
9761			}
9762		case "type":
9763			if v != nil {
9764				var typeVar string
9765				err = json.Unmarshal(*v, &typeVar)
9766				if err != nil {
9767					return err
9768				}
9769				erg.Type = &typeVar
9770			}
9771		case "location":
9772			if v != nil {
9773				var location string
9774				err = json.Unmarshal(*v, &location)
9775				if err != nil {
9776					return err
9777				}
9778				erg.Location = &location
9779			}
9780		case "tags":
9781			if v != nil {
9782				var tags map[string]*string
9783				err = json.Unmarshal(*v, &tags)
9784				if err != nil {
9785					return err
9786				}
9787				erg.Tags = tags
9788			}
9789		}
9790	}
9791
9792	return nil
9793}
9794
9795// ExpressRouteGatewayList list of ExpressRoute gateways.
9796type ExpressRouteGatewayList struct {
9797	autorest.Response `json:"-"`
9798	// Value - List of ExpressRoute gateways.
9799	Value *[]ExpressRouteGateway `json:"value,omitempty"`
9800}
9801
9802// ExpressRouteGatewayProperties expressRoute gateway resource properties.
9803type ExpressRouteGatewayProperties struct {
9804	// AutoScaleConfiguration - Configuration for auto scaling.
9805	AutoScaleConfiguration *ExpressRouteGatewayPropertiesAutoScaleConfiguration `json:"autoScaleConfiguration,omitempty"`
9806	// ExpressRouteConnections - READ-ONLY; List of ExpressRoute connections to the ExpressRoute gateway.
9807	ExpressRouteConnections *[]ExpressRouteConnection `json:"expressRouteConnections,omitempty"`
9808	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
9809	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
9810	// VirtualHub - The Virtual Hub where the ExpressRoute gateway is or will be deployed.
9811	VirtualHub *VirtualHubID `json:"virtualHub,omitempty"`
9812}
9813
9814// MarshalJSON is the custom marshaler for ExpressRouteGatewayProperties.
9815func (ergp ExpressRouteGatewayProperties) MarshalJSON() ([]byte, error) {
9816	objectMap := make(map[string]interface{})
9817	if ergp.AutoScaleConfiguration != nil {
9818		objectMap["autoScaleConfiguration"] = ergp.AutoScaleConfiguration
9819	}
9820	if ergp.VirtualHub != nil {
9821		objectMap["virtualHub"] = ergp.VirtualHub
9822	}
9823	return json.Marshal(objectMap)
9824}
9825
9826// ExpressRouteGatewayPropertiesAutoScaleConfiguration configuration for auto scaling.
9827type ExpressRouteGatewayPropertiesAutoScaleConfiguration struct {
9828	// Bounds - Minimum and maximum number of scale units to deploy.
9829	Bounds *ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds `json:"bounds,omitempty"`
9830}
9831
9832// ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds minimum and maximum number of scale units to
9833// deploy.
9834type ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds struct {
9835	// Min - Minimum number of scale units deployed for ExpressRoute gateway.
9836	Min *int32 `json:"min,omitempty"`
9837	// Max - Maximum number of scale units deployed for ExpressRoute gateway.
9838	Max *int32 `json:"max,omitempty"`
9839}
9840
9841// ExpressRouteGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
9842// long-running operation.
9843type ExpressRouteGatewaysCreateOrUpdateFuture struct {
9844	azure.FutureAPI
9845	// Result returns the result of the asynchronous operation.
9846	// If the operation has not completed it will return an error.
9847	Result func(ExpressRouteGatewaysClient) (ExpressRouteGateway, error)
9848}
9849
9850// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9851func (future *ExpressRouteGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
9852	var azFuture azure.Future
9853	if err := json.Unmarshal(body, &azFuture); err != nil {
9854		return err
9855	}
9856	future.FutureAPI = &azFuture
9857	future.Result = future.result
9858	return nil
9859}
9860
9861// result is the default implementation for ExpressRouteGatewaysCreateOrUpdateFuture.Result.
9862func (future *ExpressRouteGatewaysCreateOrUpdateFuture) result(client ExpressRouteGatewaysClient) (erg ExpressRouteGateway, err error) {
9863	var done bool
9864	done, err = future.DoneWithContext(context.Background(), client)
9865	if err != nil {
9866		err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
9867		return
9868	}
9869	if !done {
9870		erg.Response.Response = future.Response()
9871		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteGatewaysCreateOrUpdateFuture")
9872		return
9873	}
9874	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9875	if erg.Response.Response, err = future.GetResult(sender); err == nil && erg.Response.Response.StatusCode != http.StatusNoContent {
9876		erg, err = client.CreateOrUpdateResponder(erg.Response.Response)
9877		if err != nil {
9878			err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysCreateOrUpdateFuture", "Result", erg.Response.Response, "Failure responding to request")
9879		}
9880	}
9881	return
9882}
9883
9884// ExpressRouteGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
9885// long-running operation.
9886type ExpressRouteGatewaysDeleteFuture struct {
9887	azure.FutureAPI
9888	// Result returns the result of the asynchronous operation.
9889	// If the operation has not completed it will return an error.
9890	Result func(ExpressRouteGatewaysClient) (autorest.Response, error)
9891}
9892
9893// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9894func (future *ExpressRouteGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
9895	var azFuture azure.Future
9896	if err := json.Unmarshal(body, &azFuture); err != nil {
9897		return err
9898	}
9899	future.FutureAPI = &azFuture
9900	future.Result = future.result
9901	return nil
9902}
9903
9904// result is the default implementation for ExpressRouteGatewaysDeleteFuture.Result.
9905func (future *ExpressRouteGatewaysDeleteFuture) result(client ExpressRouteGatewaysClient) (ar autorest.Response, err error) {
9906	var done bool
9907	done, err = future.DoneWithContext(context.Background(), client)
9908	if err != nil {
9909		err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
9910		return
9911	}
9912	if !done {
9913		ar.Response = future.Response()
9914		err = azure.NewAsyncOpIncompleteError("network.ExpressRouteGatewaysDeleteFuture")
9915		return
9916	}
9917	ar.Response = future.Response()
9918	return
9919}
9920
9921// ExpressRouteLink expressRouteLink child resource definition.
9922type ExpressRouteLink struct {
9923	autorest.Response `json:"-"`
9924	// ExpressRouteLinkPropertiesFormat - ExpressRouteLink properties
9925	*ExpressRouteLinkPropertiesFormat `json:"properties,omitempty"`
9926	// Name - Name of child port resource that is unique among child port resources of the parent.
9927	Name *string `json:"name,omitempty"`
9928	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
9929	Etag *string `json:"etag,omitempty"`
9930	// ID - Resource ID.
9931	ID *string `json:"id,omitempty"`
9932}
9933
9934// MarshalJSON is the custom marshaler for ExpressRouteLink.
9935func (erl ExpressRouteLink) MarshalJSON() ([]byte, error) {
9936	objectMap := make(map[string]interface{})
9937	if erl.ExpressRouteLinkPropertiesFormat != nil {
9938		objectMap["properties"] = erl.ExpressRouteLinkPropertiesFormat
9939	}
9940	if erl.Name != nil {
9941		objectMap["name"] = erl.Name
9942	}
9943	if erl.ID != nil {
9944		objectMap["id"] = erl.ID
9945	}
9946	return json.Marshal(objectMap)
9947}
9948
9949// UnmarshalJSON is the custom unmarshaler for ExpressRouteLink struct.
9950func (erl *ExpressRouteLink) UnmarshalJSON(body []byte) error {
9951	var m map[string]*json.RawMessage
9952	err := json.Unmarshal(body, &m)
9953	if err != nil {
9954		return err
9955	}
9956	for k, v := range m {
9957		switch k {
9958		case "properties":
9959			if v != nil {
9960				var expressRouteLinkPropertiesFormat ExpressRouteLinkPropertiesFormat
9961				err = json.Unmarshal(*v, &expressRouteLinkPropertiesFormat)
9962				if err != nil {
9963					return err
9964				}
9965				erl.ExpressRouteLinkPropertiesFormat = &expressRouteLinkPropertiesFormat
9966			}
9967		case "name":
9968			if v != nil {
9969				var name string
9970				err = json.Unmarshal(*v, &name)
9971				if err != nil {
9972					return err
9973				}
9974				erl.Name = &name
9975			}
9976		case "etag":
9977			if v != nil {
9978				var etag string
9979				err = json.Unmarshal(*v, &etag)
9980				if err != nil {
9981					return err
9982				}
9983				erl.Etag = &etag
9984			}
9985		case "id":
9986			if v != nil {
9987				var ID string
9988				err = json.Unmarshal(*v, &ID)
9989				if err != nil {
9990					return err
9991				}
9992				erl.ID = &ID
9993			}
9994		}
9995	}
9996
9997	return nil
9998}
9999
10000// ExpressRouteLinkListResult response for ListExpressRouteLinks API service call.
10001type ExpressRouteLinkListResult struct {
10002	autorest.Response `json:"-"`
10003	// Value - The list of ExpressRouteLink sub-resources.
10004	Value *[]ExpressRouteLink `json:"value,omitempty"`
10005	// NextLink - The URL to get the next set of results.
10006	NextLink *string `json:"nextLink,omitempty"`
10007}
10008
10009// ExpressRouteLinkListResultIterator provides access to a complete listing of ExpressRouteLink values.
10010type ExpressRouteLinkListResultIterator struct {
10011	i    int
10012	page ExpressRouteLinkListResultPage
10013}
10014
10015// NextWithContext advances to the next value.  If there was an error making
10016// the request the iterator does not advance and the error is returned.
10017func (iter *ExpressRouteLinkListResultIterator) NextWithContext(ctx context.Context) (err error) {
10018	if tracing.IsEnabled() {
10019		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteLinkListResultIterator.NextWithContext")
10020		defer func() {
10021			sc := -1
10022			if iter.Response().Response.Response != nil {
10023				sc = iter.Response().Response.Response.StatusCode
10024			}
10025			tracing.EndSpan(ctx, sc, err)
10026		}()
10027	}
10028	iter.i++
10029	if iter.i < len(iter.page.Values()) {
10030		return nil
10031	}
10032	err = iter.page.NextWithContext(ctx)
10033	if err != nil {
10034		iter.i--
10035		return err
10036	}
10037	iter.i = 0
10038	return nil
10039}
10040
10041// Next advances to the next value.  If there was an error making
10042// the request the iterator does not advance and the error is returned.
10043// Deprecated: Use NextWithContext() instead.
10044func (iter *ExpressRouteLinkListResultIterator) Next() error {
10045	return iter.NextWithContext(context.Background())
10046}
10047
10048// NotDone returns true if the enumeration should be started or is not yet complete.
10049func (iter ExpressRouteLinkListResultIterator) NotDone() bool {
10050	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10051}
10052
10053// Response returns the raw server response from the last page request.
10054func (iter ExpressRouteLinkListResultIterator) Response() ExpressRouteLinkListResult {
10055	return iter.page.Response()
10056}
10057
10058// Value returns the current value or a zero-initialized value if the
10059// iterator has advanced beyond the end of the collection.
10060func (iter ExpressRouteLinkListResultIterator) Value() ExpressRouteLink {
10061	if !iter.page.NotDone() {
10062		return ExpressRouteLink{}
10063	}
10064	return iter.page.Values()[iter.i]
10065}
10066
10067// Creates a new instance of the ExpressRouteLinkListResultIterator type.
10068func NewExpressRouteLinkListResultIterator(page ExpressRouteLinkListResultPage) ExpressRouteLinkListResultIterator {
10069	return ExpressRouteLinkListResultIterator{page: page}
10070}
10071
10072// IsEmpty returns true if the ListResult contains no values.
10073func (erllr ExpressRouteLinkListResult) IsEmpty() bool {
10074	return erllr.Value == nil || len(*erllr.Value) == 0
10075}
10076
10077// hasNextLink returns true if the NextLink is not empty.
10078func (erllr ExpressRouteLinkListResult) hasNextLink() bool {
10079	return erllr.NextLink != nil && len(*erllr.NextLink) != 0
10080}
10081
10082// expressRouteLinkListResultPreparer prepares a request to retrieve the next set of results.
10083// It returns nil if no more results exist.
10084func (erllr ExpressRouteLinkListResult) expressRouteLinkListResultPreparer(ctx context.Context) (*http.Request, error) {
10085	if !erllr.hasNextLink() {
10086		return nil, nil
10087	}
10088	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10089		autorest.AsJSON(),
10090		autorest.AsGet(),
10091		autorest.WithBaseURL(to.String(erllr.NextLink)))
10092}
10093
10094// ExpressRouteLinkListResultPage contains a page of ExpressRouteLink values.
10095type ExpressRouteLinkListResultPage struct {
10096	fn    func(context.Context, ExpressRouteLinkListResult) (ExpressRouteLinkListResult, error)
10097	erllr ExpressRouteLinkListResult
10098}
10099
10100// NextWithContext advances to the next page of values.  If there was an error making
10101// the request the page does not advance and the error is returned.
10102func (page *ExpressRouteLinkListResultPage) NextWithContext(ctx context.Context) (err error) {
10103	if tracing.IsEnabled() {
10104		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteLinkListResultPage.NextWithContext")
10105		defer func() {
10106			sc := -1
10107			if page.Response().Response.Response != nil {
10108				sc = page.Response().Response.Response.StatusCode
10109			}
10110			tracing.EndSpan(ctx, sc, err)
10111		}()
10112	}
10113	for {
10114		next, err := page.fn(ctx, page.erllr)
10115		if err != nil {
10116			return err
10117		}
10118		page.erllr = next
10119		if !next.hasNextLink() || !next.IsEmpty() {
10120			break
10121		}
10122	}
10123	return nil
10124}
10125
10126// Next advances to the next page of values.  If there was an error making
10127// the request the page does not advance and the error is returned.
10128// Deprecated: Use NextWithContext() instead.
10129func (page *ExpressRouteLinkListResultPage) Next() error {
10130	return page.NextWithContext(context.Background())
10131}
10132
10133// NotDone returns true if the page enumeration should be started or is not yet complete.
10134func (page ExpressRouteLinkListResultPage) NotDone() bool {
10135	return !page.erllr.IsEmpty()
10136}
10137
10138// Response returns the raw server response from the last page request.
10139func (page ExpressRouteLinkListResultPage) Response() ExpressRouteLinkListResult {
10140	return page.erllr
10141}
10142
10143// Values returns the slice of values for the current page or nil if there are no values.
10144func (page ExpressRouteLinkListResultPage) Values() []ExpressRouteLink {
10145	if page.erllr.IsEmpty() {
10146		return nil
10147	}
10148	return *page.erllr.Value
10149}
10150
10151// Creates a new instance of the ExpressRouteLinkListResultPage type.
10152func NewExpressRouteLinkListResultPage(cur ExpressRouteLinkListResult, getNextPage func(context.Context, ExpressRouteLinkListResult) (ExpressRouteLinkListResult, error)) ExpressRouteLinkListResultPage {
10153	return ExpressRouteLinkListResultPage{
10154		fn:    getNextPage,
10155		erllr: cur,
10156	}
10157}
10158
10159// ExpressRouteLinkPropertiesFormat properties specific to ExpressRouteLink resources.
10160type ExpressRouteLinkPropertiesFormat struct {
10161	// RouterName - READ-ONLY; Name of Azure router associated with physical port.
10162	RouterName *string `json:"routerName,omitempty"`
10163	// InterfaceName - READ-ONLY; Name of Azure router interface.
10164	InterfaceName *string `json:"interfaceName,omitempty"`
10165	// PatchPanelID - READ-ONLY; Mapping between physical port to patch panel port.
10166	PatchPanelID *string `json:"patchPanelId,omitempty"`
10167	// RackID - READ-ONLY; Mapping of physical patch panel to rack.
10168	RackID *string `json:"rackId,omitempty"`
10169	// ConnectorType - READ-ONLY; Physical fiber port type. Possible values include: 'LC', 'SC'
10170	ConnectorType ExpressRouteLinkConnectorType `json:"connectorType,omitempty"`
10171	// AdminState - Administrative state of the physical port. Possible values include: 'ExpressRouteLinkAdminStateEnabled', 'ExpressRouteLinkAdminStateDisabled'
10172	AdminState ExpressRouteLinkAdminState `json:"adminState,omitempty"`
10173	// ProvisioningState - READ-ONLY; The provisioning state of the ExpressRouteLink resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
10174	ProvisioningState *string `json:"provisioningState,omitempty"`
10175}
10176
10177// MarshalJSON is the custom marshaler for ExpressRouteLinkPropertiesFormat.
10178func (erlpf ExpressRouteLinkPropertiesFormat) MarshalJSON() ([]byte, error) {
10179	objectMap := make(map[string]interface{})
10180	if erlpf.AdminState != "" {
10181		objectMap["adminState"] = erlpf.AdminState
10182	}
10183	return json.Marshal(objectMap)
10184}
10185
10186// ExpressRoutePort expressRoutePort resource definition.
10187type ExpressRoutePort struct {
10188	autorest.Response `json:"-"`
10189	// ExpressRoutePortPropertiesFormat - ExpressRoutePort properties
10190	*ExpressRoutePortPropertiesFormat `json:"properties,omitempty"`
10191	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
10192	Etag *string `json:"etag,omitempty"`
10193	// ID - Resource ID.
10194	ID *string `json:"id,omitempty"`
10195	// Name - READ-ONLY; Resource name.
10196	Name *string `json:"name,omitempty"`
10197	// Type - READ-ONLY; Resource type.
10198	Type *string `json:"type,omitempty"`
10199	// Location - Resource location.
10200	Location *string `json:"location,omitempty"`
10201	// Tags - Resource tags.
10202	Tags map[string]*string `json:"tags"`
10203}
10204
10205// MarshalJSON is the custom marshaler for ExpressRoutePort.
10206func (erp ExpressRoutePort) MarshalJSON() ([]byte, error) {
10207	objectMap := make(map[string]interface{})
10208	if erp.ExpressRoutePortPropertiesFormat != nil {
10209		objectMap["properties"] = erp.ExpressRoutePortPropertiesFormat
10210	}
10211	if erp.ID != nil {
10212		objectMap["id"] = erp.ID
10213	}
10214	if erp.Location != nil {
10215		objectMap["location"] = erp.Location
10216	}
10217	if erp.Tags != nil {
10218		objectMap["tags"] = erp.Tags
10219	}
10220	return json.Marshal(objectMap)
10221}
10222
10223// UnmarshalJSON is the custom unmarshaler for ExpressRoutePort struct.
10224func (erp *ExpressRoutePort) UnmarshalJSON(body []byte) error {
10225	var m map[string]*json.RawMessage
10226	err := json.Unmarshal(body, &m)
10227	if err != nil {
10228		return err
10229	}
10230	for k, v := range m {
10231		switch k {
10232		case "properties":
10233			if v != nil {
10234				var expressRoutePortPropertiesFormat ExpressRoutePortPropertiesFormat
10235				err = json.Unmarshal(*v, &expressRoutePortPropertiesFormat)
10236				if err != nil {
10237					return err
10238				}
10239				erp.ExpressRoutePortPropertiesFormat = &expressRoutePortPropertiesFormat
10240			}
10241		case "etag":
10242			if v != nil {
10243				var etag string
10244				err = json.Unmarshal(*v, &etag)
10245				if err != nil {
10246					return err
10247				}
10248				erp.Etag = &etag
10249			}
10250		case "id":
10251			if v != nil {
10252				var ID string
10253				err = json.Unmarshal(*v, &ID)
10254				if err != nil {
10255					return err
10256				}
10257				erp.ID = &ID
10258			}
10259		case "name":
10260			if v != nil {
10261				var name string
10262				err = json.Unmarshal(*v, &name)
10263				if err != nil {
10264					return err
10265				}
10266				erp.Name = &name
10267			}
10268		case "type":
10269			if v != nil {
10270				var typeVar string
10271				err = json.Unmarshal(*v, &typeVar)
10272				if err != nil {
10273					return err
10274				}
10275				erp.Type = &typeVar
10276			}
10277		case "location":
10278			if v != nil {
10279				var location string
10280				err = json.Unmarshal(*v, &location)
10281				if err != nil {
10282					return err
10283				}
10284				erp.Location = &location
10285			}
10286		case "tags":
10287			if v != nil {
10288				var tags map[string]*string
10289				err = json.Unmarshal(*v, &tags)
10290				if err != nil {
10291					return err
10292				}
10293				erp.Tags = tags
10294			}
10295		}
10296	}
10297
10298	return nil
10299}
10300
10301// ExpressRoutePortListResult response for ListExpressRoutePorts API service call.
10302type ExpressRoutePortListResult struct {
10303	autorest.Response `json:"-"`
10304	// Value - A list of ExpressRoutePort resources.
10305	Value *[]ExpressRoutePort `json:"value,omitempty"`
10306	// NextLink - The URL to get the next set of results.
10307	NextLink *string `json:"nextLink,omitempty"`
10308}
10309
10310// ExpressRoutePortListResultIterator provides access to a complete listing of ExpressRoutePort values.
10311type ExpressRoutePortListResultIterator struct {
10312	i    int
10313	page ExpressRoutePortListResultPage
10314}
10315
10316// NextWithContext advances to the next value.  If there was an error making
10317// the request the iterator does not advance and the error is returned.
10318func (iter *ExpressRoutePortListResultIterator) NextWithContext(ctx context.Context) (err error) {
10319	if tracing.IsEnabled() {
10320		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortListResultIterator.NextWithContext")
10321		defer func() {
10322			sc := -1
10323			if iter.Response().Response.Response != nil {
10324				sc = iter.Response().Response.Response.StatusCode
10325			}
10326			tracing.EndSpan(ctx, sc, err)
10327		}()
10328	}
10329	iter.i++
10330	if iter.i < len(iter.page.Values()) {
10331		return nil
10332	}
10333	err = iter.page.NextWithContext(ctx)
10334	if err != nil {
10335		iter.i--
10336		return err
10337	}
10338	iter.i = 0
10339	return nil
10340}
10341
10342// Next advances to the next value.  If there was an error making
10343// the request the iterator does not advance and the error is returned.
10344// Deprecated: Use NextWithContext() instead.
10345func (iter *ExpressRoutePortListResultIterator) Next() error {
10346	return iter.NextWithContext(context.Background())
10347}
10348
10349// NotDone returns true if the enumeration should be started or is not yet complete.
10350func (iter ExpressRoutePortListResultIterator) NotDone() bool {
10351	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10352}
10353
10354// Response returns the raw server response from the last page request.
10355func (iter ExpressRoutePortListResultIterator) Response() ExpressRoutePortListResult {
10356	return iter.page.Response()
10357}
10358
10359// Value returns the current value or a zero-initialized value if the
10360// iterator has advanced beyond the end of the collection.
10361func (iter ExpressRoutePortListResultIterator) Value() ExpressRoutePort {
10362	if !iter.page.NotDone() {
10363		return ExpressRoutePort{}
10364	}
10365	return iter.page.Values()[iter.i]
10366}
10367
10368// Creates a new instance of the ExpressRoutePortListResultIterator type.
10369func NewExpressRoutePortListResultIterator(page ExpressRoutePortListResultPage) ExpressRoutePortListResultIterator {
10370	return ExpressRoutePortListResultIterator{page: page}
10371}
10372
10373// IsEmpty returns true if the ListResult contains no values.
10374func (erplr ExpressRoutePortListResult) IsEmpty() bool {
10375	return erplr.Value == nil || len(*erplr.Value) == 0
10376}
10377
10378// hasNextLink returns true if the NextLink is not empty.
10379func (erplr ExpressRoutePortListResult) hasNextLink() bool {
10380	return erplr.NextLink != nil && len(*erplr.NextLink) != 0
10381}
10382
10383// expressRoutePortListResultPreparer prepares a request to retrieve the next set of results.
10384// It returns nil if no more results exist.
10385func (erplr ExpressRoutePortListResult) expressRoutePortListResultPreparer(ctx context.Context) (*http.Request, error) {
10386	if !erplr.hasNextLink() {
10387		return nil, nil
10388	}
10389	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10390		autorest.AsJSON(),
10391		autorest.AsGet(),
10392		autorest.WithBaseURL(to.String(erplr.NextLink)))
10393}
10394
10395// ExpressRoutePortListResultPage contains a page of ExpressRoutePort values.
10396type ExpressRoutePortListResultPage struct {
10397	fn    func(context.Context, ExpressRoutePortListResult) (ExpressRoutePortListResult, error)
10398	erplr ExpressRoutePortListResult
10399}
10400
10401// NextWithContext advances to the next page of values.  If there was an error making
10402// the request the page does not advance and the error is returned.
10403func (page *ExpressRoutePortListResultPage) NextWithContext(ctx context.Context) (err error) {
10404	if tracing.IsEnabled() {
10405		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortListResultPage.NextWithContext")
10406		defer func() {
10407			sc := -1
10408			if page.Response().Response.Response != nil {
10409				sc = page.Response().Response.Response.StatusCode
10410			}
10411			tracing.EndSpan(ctx, sc, err)
10412		}()
10413	}
10414	for {
10415		next, err := page.fn(ctx, page.erplr)
10416		if err != nil {
10417			return err
10418		}
10419		page.erplr = next
10420		if !next.hasNextLink() || !next.IsEmpty() {
10421			break
10422		}
10423	}
10424	return nil
10425}
10426
10427// Next advances to the next page of values.  If there was an error making
10428// the request the page does not advance and the error is returned.
10429// Deprecated: Use NextWithContext() instead.
10430func (page *ExpressRoutePortListResultPage) Next() error {
10431	return page.NextWithContext(context.Background())
10432}
10433
10434// NotDone returns true if the page enumeration should be started or is not yet complete.
10435func (page ExpressRoutePortListResultPage) NotDone() bool {
10436	return !page.erplr.IsEmpty()
10437}
10438
10439// Response returns the raw server response from the last page request.
10440func (page ExpressRoutePortListResultPage) Response() ExpressRoutePortListResult {
10441	return page.erplr
10442}
10443
10444// Values returns the slice of values for the current page or nil if there are no values.
10445func (page ExpressRoutePortListResultPage) Values() []ExpressRoutePort {
10446	if page.erplr.IsEmpty() {
10447		return nil
10448	}
10449	return *page.erplr.Value
10450}
10451
10452// Creates a new instance of the ExpressRoutePortListResultPage type.
10453func NewExpressRoutePortListResultPage(cur ExpressRoutePortListResult, getNextPage func(context.Context, ExpressRoutePortListResult) (ExpressRoutePortListResult, error)) ExpressRoutePortListResultPage {
10454	return ExpressRoutePortListResultPage{
10455		fn:    getNextPage,
10456		erplr: cur,
10457	}
10458}
10459
10460// ExpressRoutePortPropertiesFormat properties specific to ExpressRoutePort resources.
10461type ExpressRoutePortPropertiesFormat struct {
10462	// PeeringLocation - The name of the peering location that the ExpressRoutePort is mapped to physically.
10463	PeeringLocation *string `json:"peeringLocation,omitempty"`
10464	// BandwidthInGbps - Bandwidth of procured ports in Gbps
10465	BandwidthInGbps *int32 `json:"bandwidthInGbps,omitempty"`
10466	// ProvisionedBandwidthInGbps - READ-ONLY; Aggregate Gbps of associated circuit bandwidths.
10467	ProvisionedBandwidthInGbps *float64 `json:"provisionedBandwidthInGbps,omitempty"`
10468	// Mtu - READ-ONLY; Maximum transmission unit of the physical port pair(s)
10469	Mtu *string `json:"mtu,omitempty"`
10470	// Encapsulation - Encapsulation method on physical ports. Possible values include: 'Dot1Q', 'QinQ'
10471	Encapsulation ExpressRoutePortsEncapsulation `json:"encapsulation,omitempty"`
10472	// EtherType - READ-ONLY; Ether type of the physical port.
10473	EtherType *string `json:"etherType,omitempty"`
10474	// AllocationDate - READ-ONLY; Date of the physical port allocation to be used in Letter of Authorization.
10475	AllocationDate *string `json:"allocationDate,omitempty"`
10476	// Links - The set of physical links of the ExpressRoutePort resource
10477	Links *[]ExpressRouteLink `json:"links,omitempty"`
10478	// Circuits - READ-ONLY; Reference the ExpressRoute circuit(s) that are provisioned on this ExpressRoutePort resource.
10479	Circuits *[]SubResource `json:"circuits,omitempty"`
10480	// ProvisioningState - READ-ONLY; The provisioning state of the ExpressRoutePort resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
10481	ProvisioningState *string `json:"provisioningState,omitempty"`
10482	// ResourceGUID - The resource GUID property of the ExpressRoutePort resource.
10483	ResourceGUID *string `json:"resourceGuid,omitempty"`
10484}
10485
10486// MarshalJSON is the custom marshaler for ExpressRoutePortPropertiesFormat.
10487func (erppf ExpressRoutePortPropertiesFormat) MarshalJSON() ([]byte, error) {
10488	objectMap := make(map[string]interface{})
10489	if erppf.PeeringLocation != nil {
10490		objectMap["peeringLocation"] = erppf.PeeringLocation
10491	}
10492	if erppf.BandwidthInGbps != nil {
10493		objectMap["bandwidthInGbps"] = erppf.BandwidthInGbps
10494	}
10495	if erppf.Encapsulation != "" {
10496		objectMap["encapsulation"] = erppf.Encapsulation
10497	}
10498	if erppf.Links != nil {
10499		objectMap["links"] = erppf.Links
10500	}
10501	if erppf.ResourceGUID != nil {
10502		objectMap["resourceGuid"] = erppf.ResourceGUID
10503	}
10504	return json.Marshal(objectMap)
10505}
10506
10507// ExpressRoutePortsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
10508// long-running operation.
10509type ExpressRoutePortsCreateOrUpdateFuture struct {
10510	azure.FutureAPI
10511	// Result returns the result of the asynchronous operation.
10512	// If the operation has not completed it will return an error.
10513	Result func(ExpressRoutePortsClient) (ExpressRoutePort, error)
10514}
10515
10516// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10517func (future *ExpressRoutePortsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
10518	var azFuture azure.Future
10519	if err := json.Unmarshal(body, &azFuture); err != nil {
10520		return err
10521	}
10522	future.FutureAPI = &azFuture
10523	future.Result = future.result
10524	return nil
10525}
10526
10527// result is the default implementation for ExpressRoutePortsCreateOrUpdateFuture.Result.
10528func (future *ExpressRoutePortsCreateOrUpdateFuture) result(client ExpressRoutePortsClient) (erp ExpressRoutePort, err error) {
10529	var done bool
10530	done, err = future.DoneWithContext(context.Background(), client)
10531	if err != nil {
10532		err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
10533		return
10534	}
10535	if !done {
10536		erp.Response.Response = future.Response()
10537		err = azure.NewAsyncOpIncompleteError("network.ExpressRoutePortsCreateOrUpdateFuture")
10538		return
10539	}
10540	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10541	if erp.Response.Response, err = future.GetResult(sender); err == nil && erp.Response.Response.StatusCode != http.StatusNoContent {
10542		erp, err = client.CreateOrUpdateResponder(erp.Response.Response)
10543		if err != nil {
10544			err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsCreateOrUpdateFuture", "Result", erp.Response.Response, "Failure responding to request")
10545		}
10546	}
10547	return
10548}
10549
10550// ExpressRoutePortsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
10551// operation.
10552type ExpressRoutePortsDeleteFuture struct {
10553	azure.FutureAPI
10554	// Result returns the result of the asynchronous operation.
10555	// If the operation has not completed it will return an error.
10556	Result func(ExpressRoutePortsClient) (autorest.Response, error)
10557}
10558
10559// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10560func (future *ExpressRoutePortsDeleteFuture) UnmarshalJSON(body []byte) error {
10561	var azFuture azure.Future
10562	if err := json.Unmarshal(body, &azFuture); err != nil {
10563		return err
10564	}
10565	future.FutureAPI = &azFuture
10566	future.Result = future.result
10567	return nil
10568}
10569
10570// result is the default implementation for ExpressRoutePortsDeleteFuture.Result.
10571func (future *ExpressRoutePortsDeleteFuture) result(client ExpressRoutePortsClient) (ar autorest.Response, err error) {
10572	var done bool
10573	done, err = future.DoneWithContext(context.Background(), client)
10574	if err != nil {
10575		err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsDeleteFuture", "Result", future.Response(), "Polling failure")
10576		return
10577	}
10578	if !done {
10579		ar.Response = future.Response()
10580		err = azure.NewAsyncOpIncompleteError("network.ExpressRoutePortsDeleteFuture")
10581		return
10582	}
10583	ar.Response = future.Response()
10584	return
10585}
10586
10587// ExpressRoutePortsLocation definition of the ExpressRoutePorts peering location resource.
10588type ExpressRoutePortsLocation struct {
10589	autorest.Response `json:"-"`
10590	// ExpressRoutePortsLocationPropertiesFormat - ExpressRoutePort peering location properties
10591	*ExpressRoutePortsLocationPropertiesFormat `json:"properties,omitempty"`
10592	// ID - Resource ID.
10593	ID *string `json:"id,omitempty"`
10594	// Name - READ-ONLY; Resource name.
10595	Name *string `json:"name,omitempty"`
10596	// Type - READ-ONLY; Resource type.
10597	Type *string `json:"type,omitempty"`
10598	// Location - Resource location.
10599	Location *string `json:"location,omitempty"`
10600	// Tags - Resource tags.
10601	Tags map[string]*string `json:"tags"`
10602}
10603
10604// MarshalJSON is the custom marshaler for ExpressRoutePortsLocation.
10605func (erpl ExpressRoutePortsLocation) MarshalJSON() ([]byte, error) {
10606	objectMap := make(map[string]interface{})
10607	if erpl.ExpressRoutePortsLocationPropertiesFormat != nil {
10608		objectMap["properties"] = erpl.ExpressRoutePortsLocationPropertiesFormat
10609	}
10610	if erpl.ID != nil {
10611		objectMap["id"] = erpl.ID
10612	}
10613	if erpl.Location != nil {
10614		objectMap["location"] = erpl.Location
10615	}
10616	if erpl.Tags != nil {
10617		objectMap["tags"] = erpl.Tags
10618	}
10619	return json.Marshal(objectMap)
10620}
10621
10622// UnmarshalJSON is the custom unmarshaler for ExpressRoutePortsLocation struct.
10623func (erpl *ExpressRoutePortsLocation) UnmarshalJSON(body []byte) error {
10624	var m map[string]*json.RawMessage
10625	err := json.Unmarshal(body, &m)
10626	if err != nil {
10627		return err
10628	}
10629	for k, v := range m {
10630		switch k {
10631		case "properties":
10632			if v != nil {
10633				var expressRoutePortsLocationPropertiesFormat ExpressRoutePortsLocationPropertiesFormat
10634				err = json.Unmarshal(*v, &expressRoutePortsLocationPropertiesFormat)
10635				if err != nil {
10636					return err
10637				}
10638				erpl.ExpressRoutePortsLocationPropertiesFormat = &expressRoutePortsLocationPropertiesFormat
10639			}
10640		case "id":
10641			if v != nil {
10642				var ID string
10643				err = json.Unmarshal(*v, &ID)
10644				if err != nil {
10645					return err
10646				}
10647				erpl.ID = &ID
10648			}
10649		case "name":
10650			if v != nil {
10651				var name string
10652				err = json.Unmarshal(*v, &name)
10653				if err != nil {
10654					return err
10655				}
10656				erpl.Name = &name
10657			}
10658		case "type":
10659			if v != nil {
10660				var typeVar string
10661				err = json.Unmarshal(*v, &typeVar)
10662				if err != nil {
10663					return err
10664				}
10665				erpl.Type = &typeVar
10666			}
10667		case "location":
10668			if v != nil {
10669				var location string
10670				err = json.Unmarshal(*v, &location)
10671				if err != nil {
10672					return err
10673				}
10674				erpl.Location = &location
10675			}
10676		case "tags":
10677			if v != nil {
10678				var tags map[string]*string
10679				err = json.Unmarshal(*v, &tags)
10680				if err != nil {
10681					return err
10682				}
10683				erpl.Tags = tags
10684			}
10685		}
10686	}
10687
10688	return nil
10689}
10690
10691// ExpressRoutePortsLocationBandwidths real-time inventory of available ExpressRoute port bandwidths.
10692type ExpressRoutePortsLocationBandwidths struct {
10693	// OfferName - READ-ONLY; Bandwidth descriptive name
10694	OfferName *string `json:"offerName,omitempty"`
10695	// ValueInGbps - READ-ONLY; Bandwidth value in Gbps
10696	ValueInGbps *int32 `json:"valueInGbps,omitempty"`
10697}
10698
10699// MarshalJSON is the custom marshaler for ExpressRoutePortsLocationBandwidths.
10700func (erplb ExpressRoutePortsLocationBandwidths) MarshalJSON() ([]byte, error) {
10701	objectMap := make(map[string]interface{})
10702	return json.Marshal(objectMap)
10703}
10704
10705// ExpressRoutePortsLocationListResult response for ListExpressRoutePortsLocations API service call.
10706type ExpressRoutePortsLocationListResult struct {
10707	autorest.Response `json:"-"`
10708	// Value - The list of all ExpressRoutePort peering locations.
10709	Value *[]ExpressRoutePortsLocation `json:"value,omitempty"`
10710	// NextLink - The URL to get the next set of results.
10711	NextLink *string `json:"nextLink,omitempty"`
10712}
10713
10714// ExpressRoutePortsLocationListResultIterator provides access to a complete listing of
10715// ExpressRoutePortsLocation values.
10716type ExpressRoutePortsLocationListResultIterator struct {
10717	i    int
10718	page ExpressRoutePortsLocationListResultPage
10719}
10720
10721// NextWithContext advances to the next value.  If there was an error making
10722// the request the iterator does not advance and the error is returned.
10723func (iter *ExpressRoutePortsLocationListResultIterator) NextWithContext(ctx context.Context) (err error) {
10724	if tracing.IsEnabled() {
10725		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsLocationListResultIterator.NextWithContext")
10726		defer func() {
10727			sc := -1
10728			if iter.Response().Response.Response != nil {
10729				sc = iter.Response().Response.Response.StatusCode
10730			}
10731			tracing.EndSpan(ctx, sc, err)
10732		}()
10733	}
10734	iter.i++
10735	if iter.i < len(iter.page.Values()) {
10736		return nil
10737	}
10738	err = iter.page.NextWithContext(ctx)
10739	if err != nil {
10740		iter.i--
10741		return err
10742	}
10743	iter.i = 0
10744	return nil
10745}
10746
10747// Next advances to the next value.  If there was an error making
10748// the request the iterator does not advance and the error is returned.
10749// Deprecated: Use NextWithContext() instead.
10750func (iter *ExpressRoutePortsLocationListResultIterator) Next() error {
10751	return iter.NextWithContext(context.Background())
10752}
10753
10754// NotDone returns true if the enumeration should be started or is not yet complete.
10755func (iter ExpressRoutePortsLocationListResultIterator) NotDone() bool {
10756	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10757}
10758
10759// Response returns the raw server response from the last page request.
10760func (iter ExpressRoutePortsLocationListResultIterator) Response() ExpressRoutePortsLocationListResult {
10761	return iter.page.Response()
10762}
10763
10764// Value returns the current value or a zero-initialized value if the
10765// iterator has advanced beyond the end of the collection.
10766func (iter ExpressRoutePortsLocationListResultIterator) Value() ExpressRoutePortsLocation {
10767	if !iter.page.NotDone() {
10768		return ExpressRoutePortsLocation{}
10769	}
10770	return iter.page.Values()[iter.i]
10771}
10772
10773// Creates a new instance of the ExpressRoutePortsLocationListResultIterator type.
10774func NewExpressRoutePortsLocationListResultIterator(page ExpressRoutePortsLocationListResultPage) ExpressRoutePortsLocationListResultIterator {
10775	return ExpressRoutePortsLocationListResultIterator{page: page}
10776}
10777
10778// IsEmpty returns true if the ListResult contains no values.
10779func (erpllr ExpressRoutePortsLocationListResult) IsEmpty() bool {
10780	return erpllr.Value == nil || len(*erpllr.Value) == 0
10781}
10782
10783// hasNextLink returns true if the NextLink is not empty.
10784func (erpllr ExpressRoutePortsLocationListResult) hasNextLink() bool {
10785	return erpllr.NextLink != nil && len(*erpllr.NextLink) != 0
10786}
10787
10788// expressRoutePortsLocationListResultPreparer prepares a request to retrieve the next set of results.
10789// It returns nil if no more results exist.
10790func (erpllr ExpressRoutePortsLocationListResult) expressRoutePortsLocationListResultPreparer(ctx context.Context) (*http.Request, error) {
10791	if !erpllr.hasNextLink() {
10792		return nil, nil
10793	}
10794	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10795		autorest.AsJSON(),
10796		autorest.AsGet(),
10797		autorest.WithBaseURL(to.String(erpllr.NextLink)))
10798}
10799
10800// ExpressRoutePortsLocationListResultPage contains a page of ExpressRoutePortsLocation values.
10801type ExpressRoutePortsLocationListResultPage struct {
10802	fn     func(context.Context, ExpressRoutePortsLocationListResult) (ExpressRoutePortsLocationListResult, error)
10803	erpllr ExpressRoutePortsLocationListResult
10804}
10805
10806// NextWithContext advances to the next page of values.  If there was an error making
10807// the request the page does not advance and the error is returned.
10808func (page *ExpressRoutePortsLocationListResultPage) NextWithContext(ctx context.Context) (err error) {
10809	if tracing.IsEnabled() {
10810		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsLocationListResultPage.NextWithContext")
10811		defer func() {
10812			sc := -1
10813			if page.Response().Response.Response != nil {
10814				sc = page.Response().Response.Response.StatusCode
10815			}
10816			tracing.EndSpan(ctx, sc, err)
10817		}()
10818	}
10819	for {
10820		next, err := page.fn(ctx, page.erpllr)
10821		if err != nil {
10822			return err
10823		}
10824		page.erpllr = next
10825		if !next.hasNextLink() || !next.IsEmpty() {
10826			break
10827		}
10828	}
10829	return nil
10830}
10831
10832// Next advances to the next page of values.  If there was an error making
10833// the request the page does not advance and the error is returned.
10834// Deprecated: Use NextWithContext() instead.
10835func (page *ExpressRoutePortsLocationListResultPage) Next() error {
10836	return page.NextWithContext(context.Background())
10837}
10838
10839// NotDone returns true if the page enumeration should be started or is not yet complete.
10840func (page ExpressRoutePortsLocationListResultPage) NotDone() bool {
10841	return !page.erpllr.IsEmpty()
10842}
10843
10844// Response returns the raw server response from the last page request.
10845func (page ExpressRoutePortsLocationListResultPage) Response() ExpressRoutePortsLocationListResult {
10846	return page.erpllr
10847}
10848
10849// Values returns the slice of values for the current page or nil if there are no values.
10850func (page ExpressRoutePortsLocationListResultPage) Values() []ExpressRoutePortsLocation {
10851	if page.erpllr.IsEmpty() {
10852		return nil
10853	}
10854	return *page.erpllr.Value
10855}
10856
10857// Creates a new instance of the ExpressRoutePortsLocationListResultPage type.
10858func NewExpressRoutePortsLocationListResultPage(cur ExpressRoutePortsLocationListResult, getNextPage func(context.Context, ExpressRoutePortsLocationListResult) (ExpressRoutePortsLocationListResult, error)) ExpressRoutePortsLocationListResultPage {
10859	return ExpressRoutePortsLocationListResultPage{
10860		fn:     getNextPage,
10861		erpllr: cur,
10862	}
10863}
10864
10865// ExpressRoutePortsLocationPropertiesFormat properties specific to ExpressRoutePorts peering location
10866// resources.
10867type ExpressRoutePortsLocationPropertiesFormat struct {
10868	// Address - READ-ONLY; Address of peering location.
10869	Address *string `json:"address,omitempty"`
10870	// Contact - READ-ONLY; Contact details of peering locations.
10871	Contact *string `json:"contact,omitempty"`
10872	// AvailableBandwidths - The inventory of available ExpressRoutePort bandwidths.
10873	AvailableBandwidths *[]ExpressRoutePortsLocationBandwidths `json:"availableBandwidths,omitempty"`
10874	// ProvisioningState - READ-ONLY; The provisioning state of the ExpressRoutePortLocation resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
10875	ProvisioningState *string `json:"provisioningState,omitempty"`
10876}
10877
10878// MarshalJSON is the custom marshaler for ExpressRoutePortsLocationPropertiesFormat.
10879func (erplpf ExpressRoutePortsLocationPropertiesFormat) MarshalJSON() ([]byte, error) {
10880	objectMap := make(map[string]interface{})
10881	if erplpf.AvailableBandwidths != nil {
10882		objectMap["availableBandwidths"] = erplpf.AvailableBandwidths
10883	}
10884	return json.Marshal(objectMap)
10885}
10886
10887// ExpressRoutePortsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
10888// long-running operation.
10889type ExpressRoutePortsUpdateTagsFuture struct {
10890	azure.FutureAPI
10891	// Result returns the result of the asynchronous operation.
10892	// If the operation has not completed it will return an error.
10893	Result func(ExpressRoutePortsClient) (ExpressRoutePort, error)
10894}
10895
10896// UnmarshalJSON is the custom unmarshaller for CreateFuture.
10897func (future *ExpressRoutePortsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
10898	var azFuture azure.Future
10899	if err := json.Unmarshal(body, &azFuture); err != nil {
10900		return err
10901	}
10902	future.FutureAPI = &azFuture
10903	future.Result = future.result
10904	return nil
10905}
10906
10907// result is the default implementation for ExpressRoutePortsUpdateTagsFuture.Result.
10908func (future *ExpressRoutePortsUpdateTagsFuture) result(client ExpressRoutePortsClient) (erp ExpressRoutePort, err error) {
10909	var done bool
10910	done, err = future.DoneWithContext(context.Background(), client)
10911	if err != nil {
10912		err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
10913		return
10914	}
10915	if !done {
10916		erp.Response.Response = future.Response()
10917		err = azure.NewAsyncOpIncompleteError("network.ExpressRoutePortsUpdateTagsFuture")
10918		return
10919	}
10920	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
10921	if erp.Response.Response, err = future.GetResult(sender); err == nil && erp.Response.Response.StatusCode != http.StatusNoContent {
10922		erp, err = client.UpdateTagsResponder(erp.Response.Response)
10923		if err != nil {
10924			err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsUpdateTagsFuture", "Result", erp.Response.Response, "Failure responding to request")
10925		}
10926	}
10927	return
10928}
10929
10930// ExpressRouteServiceProvider a ExpressRouteResourceProvider object.
10931type ExpressRouteServiceProvider struct {
10932	*ExpressRouteServiceProviderPropertiesFormat `json:"properties,omitempty"`
10933	// ID - Resource ID.
10934	ID *string `json:"id,omitempty"`
10935	// Name - READ-ONLY; Resource name.
10936	Name *string `json:"name,omitempty"`
10937	// Type - READ-ONLY; Resource type.
10938	Type *string `json:"type,omitempty"`
10939	// Location - Resource location.
10940	Location *string `json:"location,omitempty"`
10941	// Tags - Resource tags.
10942	Tags map[string]*string `json:"tags"`
10943}
10944
10945// MarshalJSON is the custom marshaler for ExpressRouteServiceProvider.
10946func (ersp ExpressRouteServiceProvider) MarshalJSON() ([]byte, error) {
10947	objectMap := make(map[string]interface{})
10948	if ersp.ExpressRouteServiceProviderPropertiesFormat != nil {
10949		objectMap["properties"] = ersp.ExpressRouteServiceProviderPropertiesFormat
10950	}
10951	if ersp.ID != nil {
10952		objectMap["id"] = ersp.ID
10953	}
10954	if ersp.Location != nil {
10955		objectMap["location"] = ersp.Location
10956	}
10957	if ersp.Tags != nil {
10958		objectMap["tags"] = ersp.Tags
10959	}
10960	return json.Marshal(objectMap)
10961}
10962
10963// UnmarshalJSON is the custom unmarshaler for ExpressRouteServiceProvider struct.
10964func (ersp *ExpressRouteServiceProvider) UnmarshalJSON(body []byte) error {
10965	var m map[string]*json.RawMessage
10966	err := json.Unmarshal(body, &m)
10967	if err != nil {
10968		return err
10969	}
10970	for k, v := range m {
10971		switch k {
10972		case "properties":
10973			if v != nil {
10974				var expressRouteServiceProviderPropertiesFormat ExpressRouteServiceProviderPropertiesFormat
10975				err = json.Unmarshal(*v, &expressRouteServiceProviderPropertiesFormat)
10976				if err != nil {
10977					return err
10978				}
10979				ersp.ExpressRouteServiceProviderPropertiesFormat = &expressRouteServiceProviderPropertiesFormat
10980			}
10981		case "id":
10982			if v != nil {
10983				var ID string
10984				err = json.Unmarshal(*v, &ID)
10985				if err != nil {
10986					return err
10987				}
10988				ersp.ID = &ID
10989			}
10990		case "name":
10991			if v != nil {
10992				var name string
10993				err = json.Unmarshal(*v, &name)
10994				if err != nil {
10995					return err
10996				}
10997				ersp.Name = &name
10998			}
10999		case "type":
11000			if v != nil {
11001				var typeVar string
11002				err = json.Unmarshal(*v, &typeVar)
11003				if err != nil {
11004					return err
11005				}
11006				ersp.Type = &typeVar
11007			}
11008		case "location":
11009			if v != nil {
11010				var location string
11011				err = json.Unmarshal(*v, &location)
11012				if err != nil {
11013					return err
11014				}
11015				ersp.Location = &location
11016			}
11017		case "tags":
11018			if v != nil {
11019				var tags map[string]*string
11020				err = json.Unmarshal(*v, &tags)
11021				if err != nil {
11022					return err
11023				}
11024				ersp.Tags = tags
11025			}
11026		}
11027	}
11028
11029	return nil
11030}
11031
11032// ExpressRouteServiceProviderBandwidthsOffered contains bandwidths offered in ExpressRouteServiceProvider
11033// resources.
11034type ExpressRouteServiceProviderBandwidthsOffered struct {
11035	// OfferName - The OfferName.
11036	OfferName *string `json:"offerName,omitempty"`
11037	// ValueInMbps - The ValueInMbps.
11038	ValueInMbps *int32 `json:"valueInMbps,omitempty"`
11039}
11040
11041// ExpressRouteServiceProviderListResult response for the ListExpressRouteServiceProvider API service call.
11042type ExpressRouteServiceProviderListResult struct {
11043	autorest.Response `json:"-"`
11044	// Value - A list of ExpressRouteResourceProvider resources.
11045	Value *[]ExpressRouteServiceProvider `json:"value,omitempty"`
11046	// NextLink - The URL to get the next set of results.
11047	NextLink *string `json:"nextLink,omitempty"`
11048}
11049
11050// ExpressRouteServiceProviderListResultIterator provides access to a complete listing of
11051// ExpressRouteServiceProvider values.
11052type ExpressRouteServiceProviderListResultIterator struct {
11053	i    int
11054	page ExpressRouteServiceProviderListResultPage
11055}
11056
11057// NextWithContext advances to the next value.  If there was an error making
11058// the request the iterator does not advance and the error is returned.
11059func (iter *ExpressRouteServiceProviderListResultIterator) NextWithContext(ctx context.Context) (err error) {
11060	if tracing.IsEnabled() {
11061		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultIterator.NextWithContext")
11062		defer func() {
11063			sc := -1
11064			if iter.Response().Response.Response != nil {
11065				sc = iter.Response().Response.Response.StatusCode
11066			}
11067			tracing.EndSpan(ctx, sc, err)
11068		}()
11069	}
11070	iter.i++
11071	if iter.i < len(iter.page.Values()) {
11072		return nil
11073	}
11074	err = iter.page.NextWithContext(ctx)
11075	if err != nil {
11076		iter.i--
11077		return err
11078	}
11079	iter.i = 0
11080	return nil
11081}
11082
11083// Next advances to the next value.  If there was an error making
11084// the request the iterator does not advance and the error is returned.
11085// Deprecated: Use NextWithContext() instead.
11086func (iter *ExpressRouteServiceProviderListResultIterator) Next() error {
11087	return iter.NextWithContext(context.Background())
11088}
11089
11090// NotDone returns true if the enumeration should be started or is not yet complete.
11091func (iter ExpressRouteServiceProviderListResultIterator) NotDone() bool {
11092	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11093}
11094
11095// Response returns the raw server response from the last page request.
11096func (iter ExpressRouteServiceProviderListResultIterator) Response() ExpressRouteServiceProviderListResult {
11097	return iter.page.Response()
11098}
11099
11100// Value returns the current value or a zero-initialized value if the
11101// iterator has advanced beyond the end of the collection.
11102func (iter ExpressRouteServiceProviderListResultIterator) Value() ExpressRouteServiceProvider {
11103	if !iter.page.NotDone() {
11104		return ExpressRouteServiceProvider{}
11105	}
11106	return iter.page.Values()[iter.i]
11107}
11108
11109// Creates a new instance of the ExpressRouteServiceProviderListResultIterator type.
11110func NewExpressRouteServiceProviderListResultIterator(page ExpressRouteServiceProviderListResultPage) ExpressRouteServiceProviderListResultIterator {
11111	return ExpressRouteServiceProviderListResultIterator{page: page}
11112}
11113
11114// IsEmpty returns true if the ListResult contains no values.
11115func (ersplr ExpressRouteServiceProviderListResult) IsEmpty() bool {
11116	return ersplr.Value == nil || len(*ersplr.Value) == 0
11117}
11118
11119// hasNextLink returns true if the NextLink is not empty.
11120func (ersplr ExpressRouteServiceProviderListResult) hasNextLink() bool {
11121	return ersplr.NextLink != nil && len(*ersplr.NextLink) != 0
11122}
11123
11124// expressRouteServiceProviderListResultPreparer prepares a request to retrieve the next set of results.
11125// It returns nil if no more results exist.
11126func (ersplr ExpressRouteServiceProviderListResult) expressRouteServiceProviderListResultPreparer(ctx context.Context) (*http.Request, error) {
11127	if !ersplr.hasNextLink() {
11128		return nil, nil
11129	}
11130	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11131		autorest.AsJSON(),
11132		autorest.AsGet(),
11133		autorest.WithBaseURL(to.String(ersplr.NextLink)))
11134}
11135
11136// ExpressRouteServiceProviderListResultPage contains a page of ExpressRouteServiceProvider values.
11137type ExpressRouteServiceProviderListResultPage struct {
11138	fn     func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)
11139	ersplr ExpressRouteServiceProviderListResult
11140}
11141
11142// NextWithContext advances to the next page of values.  If there was an error making
11143// the request the page does not advance and the error is returned.
11144func (page *ExpressRouteServiceProviderListResultPage) NextWithContext(ctx context.Context) (err error) {
11145	if tracing.IsEnabled() {
11146		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultPage.NextWithContext")
11147		defer func() {
11148			sc := -1
11149			if page.Response().Response.Response != nil {
11150				sc = page.Response().Response.Response.StatusCode
11151			}
11152			tracing.EndSpan(ctx, sc, err)
11153		}()
11154	}
11155	for {
11156		next, err := page.fn(ctx, page.ersplr)
11157		if err != nil {
11158			return err
11159		}
11160		page.ersplr = next
11161		if !next.hasNextLink() || !next.IsEmpty() {
11162			break
11163		}
11164	}
11165	return nil
11166}
11167
11168// Next advances to the next page of values.  If there was an error making
11169// the request the page does not advance and the error is returned.
11170// Deprecated: Use NextWithContext() instead.
11171func (page *ExpressRouteServiceProviderListResultPage) Next() error {
11172	return page.NextWithContext(context.Background())
11173}
11174
11175// NotDone returns true if the page enumeration should be started or is not yet complete.
11176func (page ExpressRouteServiceProviderListResultPage) NotDone() bool {
11177	return !page.ersplr.IsEmpty()
11178}
11179
11180// Response returns the raw server response from the last page request.
11181func (page ExpressRouteServiceProviderListResultPage) Response() ExpressRouteServiceProviderListResult {
11182	return page.ersplr
11183}
11184
11185// Values returns the slice of values for the current page or nil if there are no values.
11186func (page ExpressRouteServiceProviderListResultPage) Values() []ExpressRouteServiceProvider {
11187	if page.ersplr.IsEmpty() {
11188		return nil
11189	}
11190	return *page.ersplr.Value
11191}
11192
11193// Creates a new instance of the ExpressRouteServiceProviderListResultPage type.
11194func NewExpressRouteServiceProviderListResultPage(cur ExpressRouteServiceProviderListResult, getNextPage func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)) ExpressRouteServiceProviderListResultPage {
11195	return ExpressRouteServiceProviderListResultPage{
11196		fn:     getNextPage,
11197		ersplr: cur,
11198	}
11199}
11200
11201// ExpressRouteServiceProviderPropertiesFormat properties of ExpressRouteServiceProvider.
11202type ExpressRouteServiceProviderPropertiesFormat struct {
11203	// PeeringLocations - Get a list of peering locations.
11204	PeeringLocations *[]string `json:"peeringLocations,omitempty"`
11205	// BandwidthsOffered - Gets bandwidths offered.
11206	BandwidthsOffered *[]ExpressRouteServiceProviderBandwidthsOffered `json:"bandwidthsOffered,omitempty"`
11207	// ProvisioningState - Gets the provisioning state of the resource.
11208	ProvisioningState *string `json:"provisioningState,omitempty"`
11209}
11210
11211// FlowLogInformation information on the configuration of flow log and traffic analytics (optional) .
11212type FlowLogInformation struct {
11213	autorest.Response `json:"-"`
11214	// TargetResourceID - The ID of the resource to configure for flow log and traffic analytics (optional) .
11215	TargetResourceID           *string `json:"targetResourceId,omitempty"`
11216	*FlowLogProperties         `json:"properties,omitempty"`
11217	FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"`
11218}
11219
11220// MarshalJSON is the custom marshaler for FlowLogInformation.
11221func (fli FlowLogInformation) MarshalJSON() ([]byte, error) {
11222	objectMap := make(map[string]interface{})
11223	if fli.TargetResourceID != nil {
11224		objectMap["targetResourceId"] = fli.TargetResourceID
11225	}
11226	if fli.FlowLogProperties != nil {
11227		objectMap["properties"] = fli.FlowLogProperties
11228	}
11229	if fli.FlowAnalyticsConfiguration != nil {
11230		objectMap["flowAnalyticsConfiguration"] = fli.FlowAnalyticsConfiguration
11231	}
11232	return json.Marshal(objectMap)
11233}
11234
11235// UnmarshalJSON is the custom unmarshaler for FlowLogInformation struct.
11236func (fli *FlowLogInformation) UnmarshalJSON(body []byte) error {
11237	var m map[string]*json.RawMessage
11238	err := json.Unmarshal(body, &m)
11239	if err != nil {
11240		return err
11241	}
11242	for k, v := range m {
11243		switch k {
11244		case "targetResourceId":
11245			if v != nil {
11246				var targetResourceID string
11247				err = json.Unmarshal(*v, &targetResourceID)
11248				if err != nil {
11249					return err
11250				}
11251				fli.TargetResourceID = &targetResourceID
11252			}
11253		case "properties":
11254			if v != nil {
11255				var flowLogProperties FlowLogProperties
11256				err = json.Unmarshal(*v, &flowLogProperties)
11257				if err != nil {
11258					return err
11259				}
11260				fli.FlowLogProperties = &flowLogProperties
11261			}
11262		case "flowAnalyticsConfiguration":
11263			if v != nil {
11264				var flowAnalyticsConfiguration TrafficAnalyticsProperties
11265				err = json.Unmarshal(*v, &flowAnalyticsConfiguration)
11266				if err != nil {
11267					return err
11268				}
11269				fli.FlowAnalyticsConfiguration = &flowAnalyticsConfiguration
11270			}
11271		}
11272	}
11273
11274	return nil
11275}
11276
11277// FlowLogProperties parameters that define the configuration of flow log.
11278type FlowLogProperties struct {
11279	// StorageID - ID of the storage account which is used to store the flow log.
11280	StorageID *string `json:"storageId,omitempty"`
11281	// Enabled - Flag to enable/disable flow logging.
11282	Enabled         *bool                      `json:"enabled,omitempty"`
11283	RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"`
11284}
11285
11286// FlowLogStatusParameters parameters that define a resource to query flow log and traffic analytics
11287// (optional) status.
11288type FlowLogStatusParameters struct {
11289	// TargetResourceID - The target resource where getting the flow log and traffic analytics (optional) status.
11290	TargetResourceID *string `json:"targetResourceId,omitempty"`
11291}
11292
11293// FrontendIPConfiguration frontend IP address of the load balancer.
11294type FrontendIPConfiguration struct {
11295	autorest.Response `json:"-"`
11296	// FrontendIPConfigurationPropertiesFormat - Properties of the load balancer probe.
11297	*FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"`
11298	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
11299	Name *string `json:"name,omitempty"`
11300	// Etag - A unique read-only string that changes whenever the resource is updated.
11301	Etag *string `json:"etag,omitempty"`
11302	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
11303	Zones *[]string `json:"zones,omitempty"`
11304	// ID - Resource ID.
11305	ID *string `json:"id,omitempty"`
11306}
11307
11308// MarshalJSON is the custom marshaler for FrontendIPConfiguration.
11309func (fic FrontendIPConfiguration) MarshalJSON() ([]byte, error) {
11310	objectMap := make(map[string]interface{})
11311	if fic.FrontendIPConfigurationPropertiesFormat != nil {
11312		objectMap["properties"] = fic.FrontendIPConfigurationPropertiesFormat
11313	}
11314	if fic.Name != nil {
11315		objectMap["name"] = fic.Name
11316	}
11317	if fic.Etag != nil {
11318		objectMap["etag"] = fic.Etag
11319	}
11320	if fic.Zones != nil {
11321		objectMap["zones"] = fic.Zones
11322	}
11323	if fic.ID != nil {
11324		objectMap["id"] = fic.ID
11325	}
11326	return json.Marshal(objectMap)
11327}
11328
11329// UnmarshalJSON is the custom unmarshaler for FrontendIPConfiguration struct.
11330func (fic *FrontendIPConfiguration) UnmarshalJSON(body []byte) error {
11331	var m map[string]*json.RawMessage
11332	err := json.Unmarshal(body, &m)
11333	if err != nil {
11334		return err
11335	}
11336	for k, v := range m {
11337		switch k {
11338		case "properties":
11339			if v != nil {
11340				var frontendIPConfigurationPropertiesFormat FrontendIPConfigurationPropertiesFormat
11341				err = json.Unmarshal(*v, &frontendIPConfigurationPropertiesFormat)
11342				if err != nil {
11343					return err
11344				}
11345				fic.FrontendIPConfigurationPropertiesFormat = &frontendIPConfigurationPropertiesFormat
11346			}
11347		case "name":
11348			if v != nil {
11349				var name string
11350				err = json.Unmarshal(*v, &name)
11351				if err != nil {
11352					return err
11353				}
11354				fic.Name = &name
11355			}
11356		case "etag":
11357			if v != nil {
11358				var etag string
11359				err = json.Unmarshal(*v, &etag)
11360				if err != nil {
11361					return err
11362				}
11363				fic.Etag = &etag
11364			}
11365		case "zones":
11366			if v != nil {
11367				var zones []string
11368				err = json.Unmarshal(*v, &zones)
11369				if err != nil {
11370					return err
11371				}
11372				fic.Zones = &zones
11373			}
11374		case "id":
11375			if v != nil {
11376				var ID string
11377				err = json.Unmarshal(*v, &ID)
11378				if err != nil {
11379					return err
11380				}
11381				fic.ID = &ID
11382			}
11383		}
11384	}
11385
11386	return nil
11387}
11388
11389// FrontendIPConfigurationPropertiesFormat properties of Frontend IP Configuration of the load balancer.
11390type FrontendIPConfigurationPropertiesFormat struct {
11391	// InboundNatRules - READ-ONLY; Read only. Inbound rules URIs that use this frontend IP.
11392	InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"`
11393	// InboundNatPools - READ-ONLY; Read only. Inbound pools URIs that use this frontend IP.
11394	InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"`
11395	// OutboundRules - READ-ONLY; Read only. Outbound rules URIs that use this frontend IP.
11396	OutboundRules *[]SubResource `json:"outboundRules,omitempty"`
11397	// LoadBalancingRules - READ-ONLY; Gets load balancing rules URIs that use this frontend IP.
11398	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
11399	// PrivateIPAddress - The private IP address of the IP configuration.
11400	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
11401	// PrivateIPAllocationMethod - The Private IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
11402	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
11403	// Subnet - The reference of the subnet resource.
11404	Subnet *Subnet `json:"subnet,omitempty"`
11405	// PublicIPAddress - The reference of the Public IP resource.
11406	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
11407	// PublicIPPrefix - The reference of the Public IP Prefix resource.
11408	PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"`
11409	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
11410	ProvisioningState *string `json:"provisioningState,omitempty"`
11411}
11412
11413// MarshalJSON is the custom marshaler for FrontendIPConfigurationPropertiesFormat.
11414func (ficpf FrontendIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
11415	objectMap := make(map[string]interface{})
11416	if ficpf.PrivateIPAddress != nil {
11417		objectMap["privateIPAddress"] = ficpf.PrivateIPAddress
11418	}
11419	if ficpf.PrivateIPAllocationMethod != "" {
11420		objectMap["privateIPAllocationMethod"] = ficpf.PrivateIPAllocationMethod
11421	}
11422	if ficpf.Subnet != nil {
11423		objectMap["subnet"] = ficpf.Subnet
11424	}
11425	if ficpf.PublicIPAddress != nil {
11426		objectMap["publicIPAddress"] = ficpf.PublicIPAddress
11427	}
11428	if ficpf.PublicIPPrefix != nil {
11429		objectMap["publicIPPrefix"] = ficpf.PublicIPPrefix
11430	}
11431	if ficpf.ProvisioningState != nil {
11432		objectMap["provisioningState"] = ficpf.ProvisioningState
11433	}
11434	return json.Marshal(objectMap)
11435}
11436
11437// GatewayRoute gateway routing details
11438type GatewayRoute struct {
11439	// LocalAddress - READ-ONLY; The gateway's local address
11440	LocalAddress *string `json:"localAddress,omitempty"`
11441	// NetworkProperty - READ-ONLY; The route's network prefix
11442	NetworkProperty *string `json:"network,omitempty"`
11443	// NextHop - READ-ONLY; The route's next hop
11444	NextHop *string `json:"nextHop,omitempty"`
11445	// SourcePeer - READ-ONLY; The peer this route was learned from
11446	SourcePeer *string `json:"sourcePeer,omitempty"`
11447	// Origin - READ-ONLY; The source this route was learned from
11448	Origin *string `json:"origin,omitempty"`
11449	// AsPath - READ-ONLY; The route's AS path sequence
11450	AsPath *string `json:"asPath,omitempty"`
11451	// Weight - READ-ONLY; The route's weight
11452	Weight *int32 `json:"weight,omitempty"`
11453}
11454
11455// MarshalJSON is the custom marshaler for GatewayRoute.
11456func (gr GatewayRoute) MarshalJSON() ([]byte, error) {
11457	objectMap := make(map[string]interface{})
11458	return json.Marshal(objectMap)
11459}
11460
11461// GatewayRouteListResult list of virtual network gateway routes
11462type GatewayRouteListResult struct {
11463	autorest.Response `json:"-"`
11464	// Value - List of gateway routes
11465	Value *[]GatewayRoute `json:"value,omitempty"`
11466}
11467
11468// GetVpnSitesConfigurationRequest list of Vpn-Sites
11469type GetVpnSitesConfigurationRequest struct {
11470	// VpnSites - List of resource-ids of the vpn-sites for which config is to be downloaded.
11471	VpnSites *[]string `json:"vpnSites,omitempty"`
11472	// OutputBlobSasURL - The sas-url to download the configurations for vpn-sites
11473	OutputBlobSasURL *string `json:"outputBlobSasUrl,omitempty"`
11474}
11475
11476// HTTPConfiguration HTTP configuration of the connectivity check.
11477type HTTPConfiguration struct {
11478	// Method - HTTP method. Possible values include: 'Get'
11479	Method HTTPMethod `json:"method,omitempty"`
11480	// Headers - List of HTTP headers.
11481	Headers *[]HTTPHeader `json:"headers,omitempty"`
11482	// ValidStatusCodes - Valid status codes.
11483	ValidStatusCodes *[]int32 `json:"validStatusCodes,omitempty"`
11484}
11485
11486// HTTPHeader describes the HTTP header.
11487type HTTPHeader struct {
11488	// Name - The name in HTTP header.
11489	Name *string `json:"name,omitempty"`
11490	// Value - The value in HTTP header.
11491	Value *string `json:"value,omitempty"`
11492}
11493
11494// HubVirtualNetworkConnection hubVirtualNetworkConnection Resource.
11495type HubVirtualNetworkConnection struct {
11496	autorest.Response                      `json:"-"`
11497	*HubVirtualNetworkConnectionProperties `json:"properties,omitempty"`
11498	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
11499	Name *string `json:"name,omitempty"`
11500	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
11501	Etag *string `json:"etag,omitempty"`
11502	// ID - Resource ID.
11503	ID *string `json:"id,omitempty"`
11504}
11505
11506// MarshalJSON is the custom marshaler for HubVirtualNetworkConnection.
11507func (hvnc HubVirtualNetworkConnection) MarshalJSON() ([]byte, error) {
11508	objectMap := make(map[string]interface{})
11509	if hvnc.HubVirtualNetworkConnectionProperties != nil {
11510		objectMap["properties"] = hvnc.HubVirtualNetworkConnectionProperties
11511	}
11512	if hvnc.Name != nil {
11513		objectMap["name"] = hvnc.Name
11514	}
11515	if hvnc.ID != nil {
11516		objectMap["id"] = hvnc.ID
11517	}
11518	return json.Marshal(objectMap)
11519}
11520
11521// UnmarshalJSON is the custom unmarshaler for HubVirtualNetworkConnection struct.
11522func (hvnc *HubVirtualNetworkConnection) UnmarshalJSON(body []byte) error {
11523	var m map[string]*json.RawMessage
11524	err := json.Unmarshal(body, &m)
11525	if err != nil {
11526		return err
11527	}
11528	for k, v := range m {
11529		switch k {
11530		case "properties":
11531			if v != nil {
11532				var hubVirtualNetworkConnectionProperties HubVirtualNetworkConnectionProperties
11533				err = json.Unmarshal(*v, &hubVirtualNetworkConnectionProperties)
11534				if err != nil {
11535					return err
11536				}
11537				hvnc.HubVirtualNetworkConnectionProperties = &hubVirtualNetworkConnectionProperties
11538			}
11539		case "name":
11540			if v != nil {
11541				var name string
11542				err = json.Unmarshal(*v, &name)
11543				if err != nil {
11544					return err
11545				}
11546				hvnc.Name = &name
11547			}
11548		case "etag":
11549			if v != nil {
11550				var etag string
11551				err = json.Unmarshal(*v, &etag)
11552				if err != nil {
11553					return err
11554				}
11555				hvnc.Etag = &etag
11556			}
11557		case "id":
11558			if v != nil {
11559				var ID string
11560				err = json.Unmarshal(*v, &ID)
11561				if err != nil {
11562					return err
11563				}
11564				hvnc.ID = &ID
11565			}
11566		}
11567	}
11568
11569	return nil
11570}
11571
11572// HubVirtualNetworkConnectionProperties parameters for HubVirtualNetworkConnection
11573type HubVirtualNetworkConnectionProperties struct {
11574	// RemoteVirtualNetwork - Reference to the remote virtual network.
11575	RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"`
11576	// AllowHubToRemoteVnetTransit - VirtualHub to RemoteVnet transit to enabled or not.
11577	AllowHubToRemoteVnetTransit *bool `json:"allowHubToRemoteVnetTransit,omitempty"`
11578	// AllowRemoteVnetToUseHubVnetGateways - Allow RemoteVnet to use Virtual Hub's gateways.
11579	AllowRemoteVnetToUseHubVnetGateways *bool `json:"allowRemoteVnetToUseHubVnetGateways,omitempty"`
11580	// EnableInternetSecurity - Enable internet security
11581	EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"`
11582	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
11583	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
11584}
11585
11586// InboundNatPool inbound NAT pool of the load balancer.
11587type InboundNatPool struct {
11588	// InboundNatPoolPropertiesFormat - Properties of load balancer inbound nat pool.
11589	*InboundNatPoolPropertiesFormat `json:"properties,omitempty"`
11590	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
11591	Name *string `json:"name,omitempty"`
11592	// Etag - A unique read-only string that changes whenever the resource is updated.
11593	Etag *string `json:"etag,omitempty"`
11594	// ID - Resource ID.
11595	ID *string `json:"id,omitempty"`
11596}
11597
11598// MarshalJSON is the custom marshaler for InboundNatPool.
11599func (inp InboundNatPool) MarshalJSON() ([]byte, error) {
11600	objectMap := make(map[string]interface{})
11601	if inp.InboundNatPoolPropertiesFormat != nil {
11602		objectMap["properties"] = inp.InboundNatPoolPropertiesFormat
11603	}
11604	if inp.Name != nil {
11605		objectMap["name"] = inp.Name
11606	}
11607	if inp.Etag != nil {
11608		objectMap["etag"] = inp.Etag
11609	}
11610	if inp.ID != nil {
11611		objectMap["id"] = inp.ID
11612	}
11613	return json.Marshal(objectMap)
11614}
11615
11616// UnmarshalJSON is the custom unmarshaler for InboundNatPool struct.
11617func (inp *InboundNatPool) UnmarshalJSON(body []byte) error {
11618	var m map[string]*json.RawMessage
11619	err := json.Unmarshal(body, &m)
11620	if err != nil {
11621		return err
11622	}
11623	for k, v := range m {
11624		switch k {
11625		case "properties":
11626			if v != nil {
11627				var inboundNatPoolPropertiesFormat InboundNatPoolPropertiesFormat
11628				err = json.Unmarshal(*v, &inboundNatPoolPropertiesFormat)
11629				if err != nil {
11630					return err
11631				}
11632				inp.InboundNatPoolPropertiesFormat = &inboundNatPoolPropertiesFormat
11633			}
11634		case "name":
11635			if v != nil {
11636				var name string
11637				err = json.Unmarshal(*v, &name)
11638				if err != nil {
11639					return err
11640				}
11641				inp.Name = &name
11642			}
11643		case "etag":
11644			if v != nil {
11645				var etag string
11646				err = json.Unmarshal(*v, &etag)
11647				if err != nil {
11648					return err
11649				}
11650				inp.Etag = &etag
11651			}
11652		case "id":
11653			if v != nil {
11654				var ID string
11655				err = json.Unmarshal(*v, &ID)
11656				if err != nil {
11657					return err
11658				}
11659				inp.ID = &ID
11660			}
11661		}
11662	}
11663
11664	return nil
11665}
11666
11667// InboundNatPoolPropertiesFormat properties of Inbound NAT pool.
11668type InboundNatPoolPropertiesFormat struct {
11669	// FrontendIPConfiguration - A reference to frontend IP addresses.
11670	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
11671	// Protocol - Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
11672	Protocol TransportProtocol `json:"protocol,omitempty"`
11673	// 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.
11674	FrontendPortRangeStart *int32 `json:"frontendPortRangeStart,omitempty"`
11675	// 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.
11676	FrontendPortRangeEnd *int32 `json:"frontendPortRangeEnd,omitempty"`
11677	// BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 1 and 65535.
11678	BackendPort *int32 `json:"backendPort,omitempty"`
11679	// 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.
11680	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
11681	// 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.
11682	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
11683	// 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.
11684	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
11685	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
11686	ProvisioningState *string `json:"provisioningState,omitempty"`
11687}
11688
11689// InboundNatRule inbound NAT rule of the load balancer.
11690type InboundNatRule struct {
11691	autorest.Response `json:"-"`
11692	// InboundNatRulePropertiesFormat - Properties of load balancer inbound nat rule.
11693	*InboundNatRulePropertiesFormat `json:"properties,omitempty"`
11694	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
11695	Name *string `json:"name,omitempty"`
11696	// Etag - A unique read-only string that changes whenever the resource is updated.
11697	Etag *string `json:"etag,omitempty"`
11698	// ID - Resource ID.
11699	ID *string `json:"id,omitempty"`
11700}
11701
11702// MarshalJSON is the custom marshaler for InboundNatRule.
11703func (inr InboundNatRule) MarshalJSON() ([]byte, error) {
11704	objectMap := make(map[string]interface{})
11705	if inr.InboundNatRulePropertiesFormat != nil {
11706		objectMap["properties"] = inr.InboundNatRulePropertiesFormat
11707	}
11708	if inr.Name != nil {
11709		objectMap["name"] = inr.Name
11710	}
11711	if inr.Etag != nil {
11712		objectMap["etag"] = inr.Etag
11713	}
11714	if inr.ID != nil {
11715		objectMap["id"] = inr.ID
11716	}
11717	return json.Marshal(objectMap)
11718}
11719
11720// UnmarshalJSON is the custom unmarshaler for InboundNatRule struct.
11721func (inr *InboundNatRule) UnmarshalJSON(body []byte) error {
11722	var m map[string]*json.RawMessage
11723	err := json.Unmarshal(body, &m)
11724	if err != nil {
11725		return err
11726	}
11727	for k, v := range m {
11728		switch k {
11729		case "properties":
11730			if v != nil {
11731				var inboundNatRulePropertiesFormat InboundNatRulePropertiesFormat
11732				err = json.Unmarshal(*v, &inboundNatRulePropertiesFormat)
11733				if err != nil {
11734					return err
11735				}
11736				inr.InboundNatRulePropertiesFormat = &inboundNatRulePropertiesFormat
11737			}
11738		case "name":
11739			if v != nil {
11740				var name string
11741				err = json.Unmarshal(*v, &name)
11742				if err != nil {
11743					return err
11744				}
11745				inr.Name = &name
11746			}
11747		case "etag":
11748			if v != nil {
11749				var etag string
11750				err = json.Unmarshal(*v, &etag)
11751				if err != nil {
11752					return err
11753				}
11754				inr.Etag = &etag
11755			}
11756		case "id":
11757			if v != nil {
11758				var ID string
11759				err = json.Unmarshal(*v, &ID)
11760				if err != nil {
11761					return err
11762				}
11763				inr.ID = &ID
11764			}
11765		}
11766	}
11767
11768	return nil
11769}
11770
11771// InboundNatRuleListResult response for ListInboundNatRule API service call.
11772type InboundNatRuleListResult struct {
11773	autorest.Response `json:"-"`
11774	// Value - A list of inbound nat rules in a load balancer.
11775	Value *[]InboundNatRule `json:"value,omitempty"`
11776	// NextLink - READ-ONLY; The URL to get the next set of results.
11777	NextLink *string `json:"nextLink,omitempty"`
11778}
11779
11780// MarshalJSON is the custom marshaler for InboundNatRuleListResult.
11781func (inrlr InboundNatRuleListResult) MarshalJSON() ([]byte, error) {
11782	objectMap := make(map[string]interface{})
11783	if inrlr.Value != nil {
11784		objectMap["value"] = inrlr.Value
11785	}
11786	return json.Marshal(objectMap)
11787}
11788
11789// InboundNatRuleListResultIterator provides access to a complete listing of InboundNatRule values.
11790type InboundNatRuleListResultIterator struct {
11791	i    int
11792	page InboundNatRuleListResultPage
11793}
11794
11795// NextWithContext advances to the next value.  If there was an error making
11796// the request the iterator does not advance and the error is returned.
11797func (iter *InboundNatRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
11798	if tracing.IsEnabled() {
11799		ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultIterator.NextWithContext")
11800		defer func() {
11801			sc := -1
11802			if iter.Response().Response.Response != nil {
11803				sc = iter.Response().Response.Response.StatusCode
11804			}
11805			tracing.EndSpan(ctx, sc, err)
11806		}()
11807	}
11808	iter.i++
11809	if iter.i < len(iter.page.Values()) {
11810		return nil
11811	}
11812	err = iter.page.NextWithContext(ctx)
11813	if err != nil {
11814		iter.i--
11815		return err
11816	}
11817	iter.i = 0
11818	return nil
11819}
11820
11821// Next advances to the next value.  If there was an error making
11822// the request the iterator does not advance and the error is returned.
11823// Deprecated: Use NextWithContext() instead.
11824func (iter *InboundNatRuleListResultIterator) Next() error {
11825	return iter.NextWithContext(context.Background())
11826}
11827
11828// NotDone returns true if the enumeration should be started or is not yet complete.
11829func (iter InboundNatRuleListResultIterator) NotDone() bool {
11830	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11831}
11832
11833// Response returns the raw server response from the last page request.
11834func (iter InboundNatRuleListResultIterator) Response() InboundNatRuleListResult {
11835	return iter.page.Response()
11836}
11837
11838// Value returns the current value or a zero-initialized value if the
11839// iterator has advanced beyond the end of the collection.
11840func (iter InboundNatRuleListResultIterator) Value() InboundNatRule {
11841	if !iter.page.NotDone() {
11842		return InboundNatRule{}
11843	}
11844	return iter.page.Values()[iter.i]
11845}
11846
11847// Creates a new instance of the InboundNatRuleListResultIterator type.
11848func NewInboundNatRuleListResultIterator(page InboundNatRuleListResultPage) InboundNatRuleListResultIterator {
11849	return InboundNatRuleListResultIterator{page: page}
11850}
11851
11852// IsEmpty returns true if the ListResult contains no values.
11853func (inrlr InboundNatRuleListResult) IsEmpty() bool {
11854	return inrlr.Value == nil || len(*inrlr.Value) == 0
11855}
11856
11857// hasNextLink returns true if the NextLink is not empty.
11858func (inrlr InboundNatRuleListResult) hasNextLink() bool {
11859	return inrlr.NextLink != nil && len(*inrlr.NextLink) != 0
11860}
11861
11862// inboundNatRuleListResultPreparer prepares a request to retrieve the next set of results.
11863// It returns nil if no more results exist.
11864func (inrlr InboundNatRuleListResult) inboundNatRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
11865	if !inrlr.hasNextLink() {
11866		return nil, nil
11867	}
11868	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11869		autorest.AsJSON(),
11870		autorest.AsGet(),
11871		autorest.WithBaseURL(to.String(inrlr.NextLink)))
11872}
11873
11874// InboundNatRuleListResultPage contains a page of InboundNatRule values.
11875type InboundNatRuleListResultPage struct {
11876	fn    func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)
11877	inrlr InboundNatRuleListResult
11878}
11879
11880// NextWithContext advances to the next page of values.  If there was an error making
11881// the request the page does not advance and the error is returned.
11882func (page *InboundNatRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
11883	if tracing.IsEnabled() {
11884		ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultPage.NextWithContext")
11885		defer func() {
11886			sc := -1
11887			if page.Response().Response.Response != nil {
11888				sc = page.Response().Response.Response.StatusCode
11889			}
11890			tracing.EndSpan(ctx, sc, err)
11891		}()
11892	}
11893	for {
11894		next, err := page.fn(ctx, page.inrlr)
11895		if err != nil {
11896			return err
11897		}
11898		page.inrlr = next
11899		if !next.hasNextLink() || !next.IsEmpty() {
11900			break
11901		}
11902	}
11903	return nil
11904}
11905
11906// Next advances to the next page of values.  If there was an error making
11907// the request the page does not advance and the error is returned.
11908// Deprecated: Use NextWithContext() instead.
11909func (page *InboundNatRuleListResultPage) Next() error {
11910	return page.NextWithContext(context.Background())
11911}
11912
11913// NotDone returns true if the page enumeration should be started or is not yet complete.
11914func (page InboundNatRuleListResultPage) NotDone() bool {
11915	return !page.inrlr.IsEmpty()
11916}
11917
11918// Response returns the raw server response from the last page request.
11919func (page InboundNatRuleListResultPage) Response() InboundNatRuleListResult {
11920	return page.inrlr
11921}
11922
11923// Values returns the slice of values for the current page or nil if there are no values.
11924func (page InboundNatRuleListResultPage) Values() []InboundNatRule {
11925	if page.inrlr.IsEmpty() {
11926		return nil
11927	}
11928	return *page.inrlr.Value
11929}
11930
11931// Creates a new instance of the InboundNatRuleListResultPage type.
11932func NewInboundNatRuleListResultPage(cur InboundNatRuleListResult, getNextPage func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)) InboundNatRuleListResultPage {
11933	return InboundNatRuleListResultPage{
11934		fn:    getNextPage,
11935		inrlr: cur,
11936	}
11937}
11938
11939// InboundNatRulePropertiesFormat properties of the inbound NAT rule.
11940type InboundNatRulePropertiesFormat struct {
11941	// FrontendIPConfiguration - A reference to frontend IP addresses.
11942	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
11943	// 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.
11944	BackendIPConfiguration *InterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"`
11945	// Protocol - Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
11946	Protocol TransportProtocol `json:"protocol,omitempty"`
11947	// 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.
11948	FrontendPort *int32 `json:"frontendPort,omitempty"`
11949	// BackendPort - The port used for the internal endpoint. Acceptable values range from 1 to 65535.
11950	BackendPort *int32 `json:"backendPort,omitempty"`
11951	// 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.
11952	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
11953	// 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.
11954	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
11955	// 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.
11956	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
11957	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
11958	ProvisioningState *string `json:"provisioningState,omitempty"`
11959}
11960
11961// MarshalJSON is the custom marshaler for InboundNatRulePropertiesFormat.
11962func (inrpf InboundNatRulePropertiesFormat) MarshalJSON() ([]byte, error) {
11963	objectMap := make(map[string]interface{})
11964	if inrpf.FrontendIPConfiguration != nil {
11965		objectMap["frontendIPConfiguration"] = inrpf.FrontendIPConfiguration
11966	}
11967	if inrpf.Protocol != "" {
11968		objectMap["protocol"] = inrpf.Protocol
11969	}
11970	if inrpf.FrontendPort != nil {
11971		objectMap["frontendPort"] = inrpf.FrontendPort
11972	}
11973	if inrpf.BackendPort != nil {
11974		objectMap["backendPort"] = inrpf.BackendPort
11975	}
11976	if inrpf.IdleTimeoutInMinutes != nil {
11977		objectMap["idleTimeoutInMinutes"] = inrpf.IdleTimeoutInMinutes
11978	}
11979	if inrpf.EnableFloatingIP != nil {
11980		objectMap["enableFloatingIP"] = inrpf.EnableFloatingIP
11981	}
11982	if inrpf.EnableTCPReset != nil {
11983		objectMap["enableTcpReset"] = inrpf.EnableTCPReset
11984	}
11985	if inrpf.ProvisioningState != nil {
11986		objectMap["provisioningState"] = inrpf.ProvisioningState
11987	}
11988	return json.Marshal(objectMap)
11989}
11990
11991// InboundNatRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
11992// long-running operation.
11993type InboundNatRulesCreateOrUpdateFuture struct {
11994	azure.FutureAPI
11995	// Result returns the result of the asynchronous operation.
11996	// If the operation has not completed it will return an error.
11997	Result func(InboundNatRulesClient) (InboundNatRule, error)
11998}
11999
12000// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12001func (future *InboundNatRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
12002	var azFuture azure.Future
12003	if err := json.Unmarshal(body, &azFuture); err != nil {
12004		return err
12005	}
12006	future.FutureAPI = &azFuture
12007	future.Result = future.result
12008	return nil
12009}
12010
12011// result is the default implementation for InboundNatRulesCreateOrUpdateFuture.Result.
12012func (future *InboundNatRulesCreateOrUpdateFuture) result(client InboundNatRulesClient) (inr InboundNatRule, err error) {
12013	var done bool
12014	done, err = future.DoneWithContext(context.Background(), client)
12015	if err != nil {
12016		err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
12017		return
12018	}
12019	if !done {
12020		inr.Response.Response = future.Response()
12021		err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesCreateOrUpdateFuture")
12022		return
12023	}
12024	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12025	if inr.Response.Response, err = future.GetResult(sender); err == nil && inr.Response.Response.StatusCode != http.StatusNoContent {
12026		inr, err = client.CreateOrUpdateResponder(inr.Response.Response)
12027		if err != nil {
12028			err = autorest.NewErrorWithError(err, "network.InboundNatRulesCreateOrUpdateFuture", "Result", inr.Response.Response, "Failure responding to request")
12029		}
12030	}
12031	return
12032}
12033
12034// InboundNatRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
12035// operation.
12036type InboundNatRulesDeleteFuture struct {
12037	azure.FutureAPI
12038	// Result returns the result of the asynchronous operation.
12039	// If the operation has not completed it will return an error.
12040	Result func(InboundNatRulesClient) (autorest.Response, error)
12041}
12042
12043// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12044func (future *InboundNatRulesDeleteFuture) UnmarshalJSON(body []byte) error {
12045	var azFuture azure.Future
12046	if err := json.Unmarshal(body, &azFuture); err != nil {
12047		return err
12048	}
12049	future.FutureAPI = &azFuture
12050	future.Result = future.result
12051	return nil
12052}
12053
12054// result is the default implementation for InboundNatRulesDeleteFuture.Result.
12055func (future *InboundNatRulesDeleteFuture) result(client InboundNatRulesClient) (ar autorest.Response, err error) {
12056	var done bool
12057	done, err = future.DoneWithContext(context.Background(), client)
12058	if err != nil {
12059		err = autorest.NewErrorWithError(err, "network.InboundNatRulesDeleteFuture", "Result", future.Response(), "Polling failure")
12060		return
12061	}
12062	if !done {
12063		ar.Response = future.Response()
12064		err = azure.NewAsyncOpIncompleteError("network.InboundNatRulesDeleteFuture")
12065		return
12066	}
12067	ar.Response = future.Response()
12068	return
12069}
12070
12071// Interface a network interface in a resource group.
12072type Interface struct {
12073	autorest.Response `json:"-"`
12074	// InterfacePropertiesFormat - Properties of the network interface.
12075	*InterfacePropertiesFormat `json:"properties,omitempty"`
12076	// Etag - A unique read-only string that changes whenever the resource is updated.
12077	Etag *string `json:"etag,omitempty"`
12078	// ID - Resource ID.
12079	ID *string `json:"id,omitempty"`
12080	// Name - READ-ONLY; Resource name.
12081	Name *string `json:"name,omitempty"`
12082	// Type - READ-ONLY; Resource type.
12083	Type *string `json:"type,omitempty"`
12084	// Location - Resource location.
12085	Location *string `json:"location,omitempty"`
12086	// Tags - Resource tags.
12087	Tags map[string]*string `json:"tags"`
12088}
12089
12090// MarshalJSON is the custom marshaler for Interface.
12091func (i Interface) MarshalJSON() ([]byte, error) {
12092	objectMap := make(map[string]interface{})
12093	if i.InterfacePropertiesFormat != nil {
12094		objectMap["properties"] = i.InterfacePropertiesFormat
12095	}
12096	if i.Etag != nil {
12097		objectMap["etag"] = i.Etag
12098	}
12099	if i.ID != nil {
12100		objectMap["id"] = i.ID
12101	}
12102	if i.Location != nil {
12103		objectMap["location"] = i.Location
12104	}
12105	if i.Tags != nil {
12106		objectMap["tags"] = i.Tags
12107	}
12108	return json.Marshal(objectMap)
12109}
12110
12111// UnmarshalJSON is the custom unmarshaler for Interface struct.
12112func (i *Interface) UnmarshalJSON(body []byte) error {
12113	var m map[string]*json.RawMessage
12114	err := json.Unmarshal(body, &m)
12115	if err != nil {
12116		return err
12117	}
12118	for k, v := range m {
12119		switch k {
12120		case "properties":
12121			if v != nil {
12122				var interfacePropertiesFormat InterfacePropertiesFormat
12123				err = json.Unmarshal(*v, &interfacePropertiesFormat)
12124				if err != nil {
12125					return err
12126				}
12127				i.InterfacePropertiesFormat = &interfacePropertiesFormat
12128			}
12129		case "etag":
12130			if v != nil {
12131				var etag string
12132				err = json.Unmarshal(*v, &etag)
12133				if err != nil {
12134					return err
12135				}
12136				i.Etag = &etag
12137			}
12138		case "id":
12139			if v != nil {
12140				var ID string
12141				err = json.Unmarshal(*v, &ID)
12142				if err != nil {
12143					return err
12144				}
12145				i.ID = &ID
12146			}
12147		case "name":
12148			if v != nil {
12149				var name string
12150				err = json.Unmarshal(*v, &name)
12151				if err != nil {
12152					return err
12153				}
12154				i.Name = &name
12155			}
12156		case "type":
12157			if v != nil {
12158				var typeVar string
12159				err = json.Unmarshal(*v, &typeVar)
12160				if err != nil {
12161					return err
12162				}
12163				i.Type = &typeVar
12164			}
12165		case "location":
12166			if v != nil {
12167				var location string
12168				err = json.Unmarshal(*v, &location)
12169				if err != nil {
12170					return err
12171				}
12172				i.Location = &location
12173			}
12174		case "tags":
12175			if v != nil {
12176				var tags map[string]*string
12177				err = json.Unmarshal(*v, &tags)
12178				if err != nil {
12179					return err
12180				}
12181				i.Tags = tags
12182			}
12183		}
12184	}
12185
12186	return nil
12187}
12188
12189// InterfaceAssociation network interface and its custom security rules.
12190type InterfaceAssociation struct {
12191	// ID - READ-ONLY; Network interface ID.
12192	ID *string `json:"id,omitempty"`
12193	// SecurityRules - Collection of custom security rules.
12194	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
12195}
12196
12197// MarshalJSON is the custom marshaler for InterfaceAssociation.
12198func (ia InterfaceAssociation) MarshalJSON() ([]byte, error) {
12199	objectMap := make(map[string]interface{})
12200	if ia.SecurityRules != nil {
12201		objectMap["securityRules"] = ia.SecurityRules
12202	}
12203	return json.Marshal(objectMap)
12204}
12205
12206// InterfaceDNSSettings DNS settings of a network interface.
12207type InterfaceDNSSettings struct {
12208	// 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.
12209	DNSServers *[]string `json:"dnsServers,omitempty"`
12210	// 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.
12211	AppliedDNSServers *[]string `json:"appliedDnsServers,omitempty"`
12212	// InternalDNSNameLabel - Relative DNS name for this NIC used for internal communications between VMs in the same virtual network.
12213	InternalDNSNameLabel *string `json:"internalDnsNameLabel,omitempty"`
12214	// InternalFqdn - Fully qualified DNS name supporting internal communications between VMs in the same virtual network.
12215	InternalFqdn *string `json:"internalFqdn,omitempty"`
12216	// 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.
12217	InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"`
12218}
12219
12220// InterfaceEndpoint interface endpoint resource.
12221type InterfaceEndpoint struct {
12222	autorest.Response `json:"-"`
12223	// InterfaceEndpointProperties - Properties of the interface endpoint.
12224	*InterfaceEndpointProperties `json:"properties,omitempty"`
12225	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
12226	Etag *string `json:"etag,omitempty"`
12227	// ID - Resource ID.
12228	ID *string `json:"id,omitempty"`
12229	// Name - READ-ONLY; Resource name.
12230	Name *string `json:"name,omitempty"`
12231	// Type - READ-ONLY; Resource type.
12232	Type *string `json:"type,omitempty"`
12233	// Location - Resource location.
12234	Location *string `json:"location,omitempty"`
12235	// Tags - Resource tags.
12236	Tags map[string]*string `json:"tags"`
12237}
12238
12239// MarshalJSON is the custom marshaler for InterfaceEndpoint.
12240func (ie InterfaceEndpoint) MarshalJSON() ([]byte, error) {
12241	objectMap := make(map[string]interface{})
12242	if ie.InterfaceEndpointProperties != nil {
12243		objectMap["properties"] = ie.InterfaceEndpointProperties
12244	}
12245	if ie.Etag != nil {
12246		objectMap["etag"] = ie.Etag
12247	}
12248	if ie.ID != nil {
12249		objectMap["id"] = ie.ID
12250	}
12251	if ie.Location != nil {
12252		objectMap["location"] = ie.Location
12253	}
12254	if ie.Tags != nil {
12255		objectMap["tags"] = ie.Tags
12256	}
12257	return json.Marshal(objectMap)
12258}
12259
12260// UnmarshalJSON is the custom unmarshaler for InterfaceEndpoint struct.
12261func (ie *InterfaceEndpoint) UnmarshalJSON(body []byte) error {
12262	var m map[string]*json.RawMessage
12263	err := json.Unmarshal(body, &m)
12264	if err != nil {
12265		return err
12266	}
12267	for k, v := range m {
12268		switch k {
12269		case "properties":
12270			if v != nil {
12271				var interfaceEndpointProperties InterfaceEndpointProperties
12272				err = json.Unmarshal(*v, &interfaceEndpointProperties)
12273				if err != nil {
12274					return err
12275				}
12276				ie.InterfaceEndpointProperties = &interfaceEndpointProperties
12277			}
12278		case "etag":
12279			if v != nil {
12280				var etag string
12281				err = json.Unmarshal(*v, &etag)
12282				if err != nil {
12283					return err
12284				}
12285				ie.Etag = &etag
12286			}
12287		case "id":
12288			if v != nil {
12289				var ID string
12290				err = json.Unmarshal(*v, &ID)
12291				if err != nil {
12292					return err
12293				}
12294				ie.ID = &ID
12295			}
12296		case "name":
12297			if v != nil {
12298				var name string
12299				err = json.Unmarshal(*v, &name)
12300				if err != nil {
12301					return err
12302				}
12303				ie.Name = &name
12304			}
12305		case "type":
12306			if v != nil {
12307				var typeVar string
12308				err = json.Unmarshal(*v, &typeVar)
12309				if err != nil {
12310					return err
12311				}
12312				ie.Type = &typeVar
12313			}
12314		case "location":
12315			if v != nil {
12316				var location string
12317				err = json.Unmarshal(*v, &location)
12318				if err != nil {
12319					return err
12320				}
12321				ie.Location = &location
12322			}
12323		case "tags":
12324			if v != nil {
12325				var tags map[string]*string
12326				err = json.Unmarshal(*v, &tags)
12327				if err != nil {
12328					return err
12329				}
12330				ie.Tags = tags
12331			}
12332		}
12333	}
12334
12335	return nil
12336}
12337
12338// InterfaceEndpointListResult response for the ListInterfaceEndpoints API service call.
12339type InterfaceEndpointListResult struct {
12340	autorest.Response `json:"-"`
12341	// Value - Gets a list of InterfaceEndpoint resources in a resource group.
12342	Value *[]InterfaceEndpoint `json:"value,omitempty"`
12343	// NextLink - READ-ONLY; The URL to get the next set of results.
12344	NextLink *string `json:"nextLink,omitempty"`
12345}
12346
12347// MarshalJSON is the custom marshaler for InterfaceEndpointListResult.
12348func (ielr InterfaceEndpointListResult) MarshalJSON() ([]byte, error) {
12349	objectMap := make(map[string]interface{})
12350	if ielr.Value != nil {
12351		objectMap["value"] = ielr.Value
12352	}
12353	return json.Marshal(objectMap)
12354}
12355
12356// InterfaceEndpointListResultIterator provides access to a complete listing of InterfaceEndpoint values.
12357type InterfaceEndpointListResultIterator struct {
12358	i    int
12359	page InterfaceEndpointListResultPage
12360}
12361
12362// NextWithContext advances to the next value.  If there was an error making
12363// the request the iterator does not advance and the error is returned.
12364func (iter *InterfaceEndpointListResultIterator) NextWithContext(ctx context.Context) (err error) {
12365	if tracing.IsEnabled() {
12366		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceEndpointListResultIterator.NextWithContext")
12367		defer func() {
12368			sc := -1
12369			if iter.Response().Response.Response != nil {
12370				sc = iter.Response().Response.Response.StatusCode
12371			}
12372			tracing.EndSpan(ctx, sc, err)
12373		}()
12374	}
12375	iter.i++
12376	if iter.i < len(iter.page.Values()) {
12377		return nil
12378	}
12379	err = iter.page.NextWithContext(ctx)
12380	if err != nil {
12381		iter.i--
12382		return err
12383	}
12384	iter.i = 0
12385	return nil
12386}
12387
12388// Next advances to the next value.  If there was an error making
12389// the request the iterator does not advance and the error is returned.
12390// Deprecated: Use NextWithContext() instead.
12391func (iter *InterfaceEndpointListResultIterator) Next() error {
12392	return iter.NextWithContext(context.Background())
12393}
12394
12395// NotDone returns true if the enumeration should be started or is not yet complete.
12396func (iter InterfaceEndpointListResultIterator) NotDone() bool {
12397	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12398}
12399
12400// Response returns the raw server response from the last page request.
12401func (iter InterfaceEndpointListResultIterator) Response() InterfaceEndpointListResult {
12402	return iter.page.Response()
12403}
12404
12405// Value returns the current value or a zero-initialized value if the
12406// iterator has advanced beyond the end of the collection.
12407func (iter InterfaceEndpointListResultIterator) Value() InterfaceEndpoint {
12408	if !iter.page.NotDone() {
12409		return InterfaceEndpoint{}
12410	}
12411	return iter.page.Values()[iter.i]
12412}
12413
12414// Creates a new instance of the InterfaceEndpointListResultIterator type.
12415func NewInterfaceEndpointListResultIterator(page InterfaceEndpointListResultPage) InterfaceEndpointListResultIterator {
12416	return InterfaceEndpointListResultIterator{page: page}
12417}
12418
12419// IsEmpty returns true if the ListResult contains no values.
12420func (ielr InterfaceEndpointListResult) IsEmpty() bool {
12421	return ielr.Value == nil || len(*ielr.Value) == 0
12422}
12423
12424// hasNextLink returns true if the NextLink is not empty.
12425func (ielr InterfaceEndpointListResult) hasNextLink() bool {
12426	return ielr.NextLink != nil && len(*ielr.NextLink) != 0
12427}
12428
12429// interfaceEndpointListResultPreparer prepares a request to retrieve the next set of results.
12430// It returns nil if no more results exist.
12431func (ielr InterfaceEndpointListResult) interfaceEndpointListResultPreparer(ctx context.Context) (*http.Request, error) {
12432	if !ielr.hasNextLink() {
12433		return nil, nil
12434	}
12435	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12436		autorest.AsJSON(),
12437		autorest.AsGet(),
12438		autorest.WithBaseURL(to.String(ielr.NextLink)))
12439}
12440
12441// InterfaceEndpointListResultPage contains a page of InterfaceEndpoint values.
12442type InterfaceEndpointListResultPage struct {
12443	fn   func(context.Context, InterfaceEndpointListResult) (InterfaceEndpointListResult, error)
12444	ielr InterfaceEndpointListResult
12445}
12446
12447// NextWithContext advances to the next page of values.  If there was an error making
12448// the request the page does not advance and the error is returned.
12449func (page *InterfaceEndpointListResultPage) NextWithContext(ctx context.Context) (err error) {
12450	if tracing.IsEnabled() {
12451		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceEndpointListResultPage.NextWithContext")
12452		defer func() {
12453			sc := -1
12454			if page.Response().Response.Response != nil {
12455				sc = page.Response().Response.Response.StatusCode
12456			}
12457			tracing.EndSpan(ctx, sc, err)
12458		}()
12459	}
12460	for {
12461		next, err := page.fn(ctx, page.ielr)
12462		if err != nil {
12463			return err
12464		}
12465		page.ielr = next
12466		if !next.hasNextLink() || !next.IsEmpty() {
12467			break
12468		}
12469	}
12470	return nil
12471}
12472
12473// Next advances to the next page of values.  If there was an error making
12474// the request the page does not advance and the error is returned.
12475// Deprecated: Use NextWithContext() instead.
12476func (page *InterfaceEndpointListResultPage) Next() error {
12477	return page.NextWithContext(context.Background())
12478}
12479
12480// NotDone returns true if the page enumeration should be started or is not yet complete.
12481func (page InterfaceEndpointListResultPage) NotDone() bool {
12482	return !page.ielr.IsEmpty()
12483}
12484
12485// Response returns the raw server response from the last page request.
12486func (page InterfaceEndpointListResultPage) Response() InterfaceEndpointListResult {
12487	return page.ielr
12488}
12489
12490// Values returns the slice of values for the current page or nil if there are no values.
12491func (page InterfaceEndpointListResultPage) Values() []InterfaceEndpoint {
12492	if page.ielr.IsEmpty() {
12493		return nil
12494	}
12495	return *page.ielr.Value
12496}
12497
12498// Creates a new instance of the InterfaceEndpointListResultPage type.
12499func NewInterfaceEndpointListResultPage(cur InterfaceEndpointListResult, getNextPage func(context.Context, InterfaceEndpointListResult) (InterfaceEndpointListResult, error)) InterfaceEndpointListResultPage {
12500	return InterfaceEndpointListResultPage{
12501		fn:   getNextPage,
12502		ielr: cur,
12503	}
12504}
12505
12506// InterfaceEndpointProperties properties of the interface endpoint.
12507type InterfaceEndpointProperties struct {
12508	// Fqdn - A first-party service's FQDN that is mapped to the private IP allocated via this interface endpoint.
12509	Fqdn *string `json:"fqdn,omitempty"`
12510	// EndpointService - A reference to the service being brought into the virtual network.
12511	EndpointService *EndpointService `json:"endpointService,omitempty"`
12512	// Subnet - The ID of the subnet from which the private IP will be allocated.
12513	Subnet *Subnet `json:"subnet,omitempty"`
12514	// NetworkInterfaces - READ-ONLY; Gets an array of references to the network interfaces created for this interface endpoint.
12515	NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"`
12516	// Owner - READ-ONLY; A read-only property that identifies who created this interface endpoint.
12517	Owner *string `json:"owner,omitempty"`
12518	// ProvisioningState - READ-ONLY; The provisioning state of the interface endpoint. Possible values are: 'Updating', 'Deleting', and 'Failed'.
12519	ProvisioningState *string `json:"provisioningState,omitempty"`
12520}
12521
12522// MarshalJSON is the custom marshaler for InterfaceEndpointProperties.
12523func (iep InterfaceEndpointProperties) MarshalJSON() ([]byte, error) {
12524	objectMap := make(map[string]interface{})
12525	if iep.Fqdn != nil {
12526		objectMap["fqdn"] = iep.Fqdn
12527	}
12528	if iep.EndpointService != nil {
12529		objectMap["endpointService"] = iep.EndpointService
12530	}
12531	if iep.Subnet != nil {
12532		objectMap["subnet"] = iep.Subnet
12533	}
12534	return json.Marshal(objectMap)
12535}
12536
12537// InterfaceEndpointsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
12538// long-running operation.
12539type InterfaceEndpointsCreateOrUpdateFuture struct {
12540	azure.FutureAPI
12541	// Result returns the result of the asynchronous operation.
12542	// If the operation has not completed it will return an error.
12543	Result func(InterfaceEndpointsClient) (InterfaceEndpoint, error)
12544}
12545
12546// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12547func (future *InterfaceEndpointsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
12548	var azFuture azure.Future
12549	if err := json.Unmarshal(body, &azFuture); err != nil {
12550		return err
12551	}
12552	future.FutureAPI = &azFuture
12553	future.Result = future.result
12554	return nil
12555}
12556
12557// result is the default implementation for InterfaceEndpointsCreateOrUpdateFuture.Result.
12558func (future *InterfaceEndpointsCreateOrUpdateFuture) result(client InterfaceEndpointsClient) (ie InterfaceEndpoint, err error) {
12559	var done bool
12560	done, err = future.DoneWithContext(context.Background(), client)
12561	if err != nil {
12562		err = autorest.NewErrorWithError(err, "network.InterfaceEndpointsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
12563		return
12564	}
12565	if !done {
12566		ie.Response.Response = future.Response()
12567		err = azure.NewAsyncOpIncompleteError("network.InterfaceEndpointsCreateOrUpdateFuture")
12568		return
12569	}
12570	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
12571	if ie.Response.Response, err = future.GetResult(sender); err == nil && ie.Response.Response.StatusCode != http.StatusNoContent {
12572		ie, err = client.CreateOrUpdateResponder(ie.Response.Response)
12573		if err != nil {
12574			err = autorest.NewErrorWithError(err, "network.InterfaceEndpointsCreateOrUpdateFuture", "Result", ie.Response.Response, "Failure responding to request")
12575		}
12576	}
12577	return
12578}
12579
12580// InterfaceEndpointsDeleteFuture an abstraction for monitoring and retrieving the results of a
12581// long-running operation.
12582type InterfaceEndpointsDeleteFuture struct {
12583	azure.FutureAPI
12584	// Result returns the result of the asynchronous operation.
12585	// If the operation has not completed it will return an error.
12586	Result func(InterfaceEndpointsClient) (autorest.Response, error)
12587}
12588
12589// UnmarshalJSON is the custom unmarshaller for CreateFuture.
12590func (future *InterfaceEndpointsDeleteFuture) UnmarshalJSON(body []byte) error {
12591	var azFuture azure.Future
12592	if err := json.Unmarshal(body, &azFuture); err != nil {
12593		return err
12594	}
12595	future.FutureAPI = &azFuture
12596	future.Result = future.result
12597	return nil
12598}
12599
12600// result is the default implementation for InterfaceEndpointsDeleteFuture.Result.
12601func (future *InterfaceEndpointsDeleteFuture) result(client InterfaceEndpointsClient) (ar autorest.Response, err error) {
12602	var done bool
12603	done, err = future.DoneWithContext(context.Background(), client)
12604	if err != nil {
12605		err = autorest.NewErrorWithError(err, "network.InterfaceEndpointsDeleteFuture", "Result", future.Response(), "Polling failure")
12606		return
12607	}
12608	if !done {
12609		ar.Response = future.Response()
12610		err = azure.NewAsyncOpIncompleteError("network.InterfaceEndpointsDeleteFuture")
12611		return
12612	}
12613	ar.Response = future.Response()
12614	return
12615}
12616
12617// InterfaceIPConfiguration iPConfiguration in a network interface.
12618type InterfaceIPConfiguration struct {
12619	autorest.Response `json:"-"`
12620	// InterfaceIPConfigurationPropertiesFormat - Network interface IP configuration properties.
12621	*InterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"`
12622	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
12623	Name *string `json:"name,omitempty"`
12624	// Etag - A unique read-only string that changes whenever the resource is updated.
12625	Etag *string `json:"etag,omitempty"`
12626	// ID - Resource ID.
12627	ID *string `json:"id,omitempty"`
12628}
12629
12630// MarshalJSON is the custom marshaler for InterfaceIPConfiguration.
12631func (iic InterfaceIPConfiguration) MarshalJSON() ([]byte, error) {
12632	objectMap := make(map[string]interface{})
12633	if iic.InterfaceIPConfigurationPropertiesFormat != nil {
12634		objectMap["properties"] = iic.InterfaceIPConfigurationPropertiesFormat
12635	}
12636	if iic.Name != nil {
12637		objectMap["name"] = iic.Name
12638	}
12639	if iic.Etag != nil {
12640		objectMap["etag"] = iic.Etag
12641	}
12642	if iic.ID != nil {
12643		objectMap["id"] = iic.ID
12644	}
12645	return json.Marshal(objectMap)
12646}
12647
12648// UnmarshalJSON is the custom unmarshaler for InterfaceIPConfiguration struct.
12649func (iic *InterfaceIPConfiguration) UnmarshalJSON(body []byte) error {
12650	var m map[string]*json.RawMessage
12651	err := json.Unmarshal(body, &m)
12652	if err != nil {
12653		return err
12654	}
12655	for k, v := range m {
12656		switch k {
12657		case "properties":
12658			if v != nil {
12659				var interfaceIPConfigurationPropertiesFormat InterfaceIPConfigurationPropertiesFormat
12660				err = json.Unmarshal(*v, &interfaceIPConfigurationPropertiesFormat)
12661				if err != nil {
12662					return err
12663				}
12664				iic.InterfaceIPConfigurationPropertiesFormat = &interfaceIPConfigurationPropertiesFormat
12665			}
12666		case "name":
12667			if v != nil {
12668				var name string
12669				err = json.Unmarshal(*v, &name)
12670				if err != nil {
12671					return err
12672				}
12673				iic.Name = &name
12674			}
12675		case "etag":
12676			if v != nil {
12677				var etag string
12678				err = json.Unmarshal(*v, &etag)
12679				if err != nil {
12680					return err
12681				}
12682				iic.Etag = &etag
12683			}
12684		case "id":
12685			if v != nil {
12686				var ID string
12687				err = json.Unmarshal(*v, &ID)
12688				if err != nil {
12689					return err
12690				}
12691				iic.ID = &ID
12692			}
12693		}
12694	}
12695
12696	return nil
12697}
12698
12699// InterfaceIPConfigurationListResult response for list ip configurations API service call.
12700type InterfaceIPConfigurationListResult struct {
12701	autorest.Response `json:"-"`
12702	// Value - A list of ip configurations.
12703	Value *[]InterfaceIPConfiguration `json:"value,omitempty"`
12704	// NextLink - READ-ONLY; The URL to get the next set of results.
12705	NextLink *string `json:"nextLink,omitempty"`
12706}
12707
12708// MarshalJSON is the custom marshaler for InterfaceIPConfigurationListResult.
12709func (iiclr InterfaceIPConfigurationListResult) MarshalJSON() ([]byte, error) {
12710	objectMap := make(map[string]interface{})
12711	if iiclr.Value != nil {
12712		objectMap["value"] = iiclr.Value
12713	}
12714	return json.Marshal(objectMap)
12715}
12716
12717// InterfaceIPConfigurationListResultIterator provides access to a complete listing of
12718// InterfaceIPConfiguration values.
12719type InterfaceIPConfigurationListResultIterator struct {
12720	i    int
12721	page InterfaceIPConfigurationListResultPage
12722}
12723
12724// NextWithContext advances to the next value.  If there was an error making
12725// the request the iterator does not advance and the error is returned.
12726func (iter *InterfaceIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
12727	if tracing.IsEnabled() {
12728		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultIterator.NextWithContext")
12729		defer func() {
12730			sc := -1
12731			if iter.Response().Response.Response != nil {
12732				sc = iter.Response().Response.Response.StatusCode
12733			}
12734			tracing.EndSpan(ctx, sc, err)
12735		}()
12736	}
12737	iter.i++
12738	if iter.i < len(iter.page.Values()) {
12739		return nil
12740	}
12741	err = iter.page.NextWithContext(ctx)
12742	if err != nil {
12743		iter.i--
12744		return err
12745	}
12746	iter.i = 0
12747	return nil
12748}
12749
12750// Next advances to the next value.  If there was an error making
12751// the request the iterator does not advance and the error is returned.
12752// Deprecated: Use NextWithContext() instead.
12753func (iter *InterfaceIPConfigurationListResultIterator) Next() error {
12754	return iter.NextWithContext(context.Background())
12755}
12756
12757// NotDone returns true if the enumeration should be started or is not yet complete.
12758func (iter InterfaceIPConfigurationListResultIterator) NotDone() bool {
12759	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12760}
12761
12762// Response returns the raw server response from the last page request.
12763func (iter InterfaceIPConfigurationListResultIterator) Response() InterfaceIPConfigurationListResult {
12764	return iter.page.Response()
12765}
12766
12767// Value returns the current value or a zero-initialized value if the
12768// iterator has advanced beyond the end of the collection.
12769func (iter InterfaceIPConfigurationListResultIterator) Value() InterfaceIPConfiguration {
12770	if !iter.page.NotDone() {
12771		return InterfaceIPConfiguration{}
12772	}
12773	return iter.page.Values()[iter.i]
12774}
12775
12776// Creates a new instance of the InterfaceIPConfigurationListResultIterator type.
12777func NewInterfaceIPConfigurationListResultIterator(page InterfaceIPConfigurationListResultPage) InterfaceIPConfigurationListResultIterator {
12778	return InterfaceIPConfigurationListResultIterator{page: page}
12779}
12780
12781// IsEmpty returns true if the ListResult contains no values.
12782func (iiclr InterfaceIPConfigurationListResult) IsEmpty() bool {
12783	return iiclr.Value == nil || len(*iiclr.Value) == 0
12784}
12785
12786// hasNextLink returns true if the NextLink is not empty.
12787func (iiclr InterfaceIPConfigurationListResult) hasNextLink() bool {
12788	return iiclr.NextLink != nil && len(*iiclr.NextLink) != 0
12789}
12790
12791// interfaceIPConfigurationListResultPreparer prepares a request to retrieve the next set of results.
12792// It returns nil if no more results exist.
12793func (iiclr InterfaceIPConfigurationListResult) interfaceIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
12794	if !iiclr.hasNextLink() {
12795		return nil, nil
12796	}
12797	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12798		autorest.AsJSON(),
12799		autorest.AsGet(),
12800		autorest.WithBaseURL(to.String(iiclr.NextLink)))
12801}
12802
12803// InterfaceIPConfigurationListResultPage contains a page of InterfaceIPConfiguration values.
12804type InterfaceIPConfigurationListResultPage struct {
12805	fn    func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)
12806	iiclr InterfaceIPConfigurationListResult
12807}
12808
12809// NextWithContext advances to the next page of values.  If there was an error making
12810// the request the page does not advance and the error is returned.
12811func (page *InterfaceIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
12812	if tracing.IsEnabled() {
12813		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultPage.NextWithContext")
12814		defer func() {
12815			sc := -1
12816			if page.Response().Response.Response != nil {
12817				sc = page.Response().Response.Response.StatusCode
12818			}
12819			tracing.EndSpan(ctx, sc, err)
12820		}()
12821	}
12822	for {
12823		next, err := page.fn(ctx, page.iiclr)
12824		if err != nil {
12825			return err
12826		}
12827		page.iiclr = next
12828		if !next.hasNextLink() || !next.IsEmpty() {
12829			break
12830		}
12831	}
12832	return nil
12833}
12834
12835// Next advances to the next page of values.  If there was an error making
12836// the request the page does not advance and the error is returned.
12837// Deprecated: Use NextWithContext() instead.
12838func (page *InterfaceIPConfigurationListResultPage) Next() error {
12839	return page.NextWithContext(context.Background())
12840}
12841
12842// NotDone returns true if the page enumeration should be started or is not yet complete.
12843func (page InterfaceIPConfigurationListResultPage) NotDone() bool {
12844	return !page.iiclr.IsEmpty()
12845}
12846
12847// Response returns the raw server response from the last page request.
12848func (page InterfaceIPConfigurationListResultPage) Response() InterfaceIPConfigurationListResult {
12849	return page.iiclr
12850}
12851
12852// Values returns the slice of values for the current page or nil if there are no values.
12853func (page InterfaceIPConfigurationListResultPage) Values() []InterfaceIPConfiguration {
12854	if page.iiclr.IsEmpty() {
12855		return nil
12856	}
12857	return *page.iiclr.Value
12858}
12859
12860// Creates a new instance of the InterfaceIPConfigurationListResultPage type.
12861func NewInterfaceIPConfigurationListResultPage(cur InterfaceIPConfigurationListResult, getNextPage func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)) InterfaceIPConfigurationListResultPage {
12862	return InterfaceIPConfigurationListResultPage{
12863		fn:    getNextPage,
12864		iiclr: cur,
12865	}
12866}
12867
12868// InterfaceIPConfigurationPropertiesFormat properties of IP configuration.
12869type InterfaceIPConfigurationPropertiesFormat struct {
12870	// VirtualNetworkTaps - The reference to Virtual Network Taps.
12871	VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"`
12872	// ApplicationGatewayBackendAddressPools - The reference of ApplicationGatewayBackendAddressPool resource.
12873	ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"`
12874	// LoadBalancerBackendAddressPools - The reference of LoadBalancerBackendAddressPool resource.
12875	LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"`
12876	// LoadBalancerInboundNatRules - A list of references of LoadBalancerInboundNatRules.
12877	LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"`
12878	// PrivateIPAddress - Private IP address of the IP configuration.
12879	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
12880	// PrivateIPAllocationMethod - Defines how a private IP address is assigned. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
12881	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
12882	// 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'
12883	PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
12884	// Subnet - Subnet bound to the IP configuration.
12885	Subnet *Subnet `json:"subnet,omitempty"`
12886	// Primary - Gets whether this is a primary customer address on the network interface.
12887	Primary *bool `json:"primary,omitempty"`
12888	// PublicIPAddress - Public IP address bound to the IP configuration.
12889	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
12890	// ApplicationSecurityGroups - Application security groups in which the IP configuration is included.
12891	ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"`
12892	// ProvisioningState - The provisioning state of the network interface IP configuration. Possible values are: 'Updating', 'Deleting', and 'Failed'.
12893	ProvisioningState *string `json:"provisioningState,omitempty"`
12894}
12895
12896// InterfaceListResult response for the ListNetworkInterface API service call.
12897type InterfaceListResult struct {
12898	autorest.Response `json:"-"`
12899	// Value - A list of network interfaces in a resource group.
12900	Value *[]Interface `json:"value,omitempty"`
12901	// NextLink - READ-ONLY; The URL to get the next set of results.
12902	NextLink *string `json:"nextLink,omitempty"`
12903}
12904
12905// MarshalJSON is the custom marshaler for InterfaceListResult.
12906func (ilr InterfaceListResult) MarshalJSON() ([]byte, error) {
12907	objectMap := make(map[string]interface{})
12908	if ilr.Value != nil {
12909		objectMap["value"] = ilr.Value
12910	}
12911	return json.Marshal(objectMap)
12912}
12913
12914// InterfaceListResultIterator provides access to a complete listing of Interface values.
12915type InterfaceListResultIterator struct {
12916	i    int
12917	page InterfaceListResultPage
12918}
12919
12920// NextWithContext advances to the next value.  If there was an error making
12921// the request the iterator does not advance and the error is returned.
12922func (iter *InterfaceListResultIterator) NextWithContext(ctx context.Context) (err error) {
12923	if tracing.IsEnabled() {
12924		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultIterator.NextWithContext")
12925		defer func() {
12926			sc := -1
12927			if iter.Response().Response.Response != nil {
12928				sc = iter.Response().Response.Response.StatusCode
12929			}
12930			tracing.EndSpan(ctx, sc, err)
12931		}()
12932	}
12933	iter.i++
12934	if iter.i < len(iter.page.Values()) {
12935		return nil
12936	}
12937	err = iter.page.NextWithContext(ctx)
12938	if err != nil {
12939		iter.i--
12940		return err
12941	}
12942	iter.i = 0
12943	return nil
12944}
12945
12946// Next advances to the next value.  If there was an error making
12947// the request the iterator does not advance and the error is returned.
12948// Deprecated: Use NextWithContext() instead.
12949func (iter *InterfaceListResultIterator) Next() error {
12950	return iter.NextWithContext(context.Background())
12951}
12952
12953// NotDone returns true if the enumeration should be started or is not yet complete.
12954func (iter InterfaceListResultIterator) NotDone() bool {
12955	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12956}
12957
12958// Response returns the raw server response from the last page request.
12959func (iter InterfaceListResultIterator) Response() InterfaceListResult {
12960	return iter.page.Response()
12961}
12962
12963// Value returns the current value or a zero-initialized value if the
12964// iterator has advanced beyond the end of the collection.
12965func (iter InterfaceListResultIterator) Value() Interface {
12966	if !iter.page.NotDone() {
12967		return Interface{}
12968	}
12969	return iter.page.Values()[iter.i]
12970}
12971
12972// Creates a new instance of the InterfaceListResultIterator type.
12973func NewInterfaceListResultIterator(page InterfaceListResultPage) InterfaceListResultIterator {
12974	return InterfaceListResultIterator{page: page}
12975}
12976
12977// IsEmpty returns true if the ListResult contains no values.
12978func (ilr InterfaceListResult) IsEmpty() bool {
12979	return ilr.Value == nil || len(*ilr.Value) == 0
12980}
12981
12982// hasNextLink returns true if the NextLink is not empty.
12983func (ilr InterfaceListResult) hasNextLink() bool {
12984	return ilr.NextLink != nil && len(*ilr.NextLink) != 0
12985}
12986
12987// interfaceListResultPreparer prepares a request to retrieve the next set of results.
12988// It returns nil if no more results exist.
12989func (ilr InterfaceListResult) interfaceListResultPreparer(ctx context.Context) (*http.Request, error) {
12990	if !ilr.hasNextLink() {
12991		return nil, nil
12992	}
12993	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12994		autorest.AsJSON(),
12995		autorest.AsGet(),
12996		autorest.WithBaseURL(to.String(ilr.NextLink)))
12997}
12998
12999// InterfaceListResultPage contains a page of Interface values.
13000type InterfaceListResultPage struct {
13001	fn  func(context.Context, InterfaceListResult) (InterfaceListResult, error)
13002	ilr InterfaceListResult
13003}
13004
13005// NextWithContext advances to the next page of values.  If there was an error making
13006// the request the page does not advance and the error is returned.
13007func (page *InterfaceListResultPage) NextWithContext(ctx context.Context) (err error) {
13008	if tracing.IsEnabled() {
13009		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultPage.NextWithContext")
13010		defer func() {
13011			sc := -1
13012			if page.Response().Response.Response != nil {
13013				sc = page.Response().Response.Response.StatusCode
13014			}
13015			tracing.EndSpan(ctx, sc, err)
13016		}()
13017	}
13018	for {
13019		next, err := page.fn(ctx, page.ilr)
13020		if err != nil {
13021			return err
13022		}
13023		page.ilr = next
13024		if !next.hasNextLink() || !next.IsEmpty() {
13025			break
13026		}
13027	}
13028	return nil
13029}
13030
13031// Next advances to the next page of values.  If there was an error making
13032// the request the page does not advance and the error is returned.
13033// Deprecated: Use NextWithContext() instead.
13034func (page *InterfaceListResultPage) Next() error {
13035	return page.NextWithContext(context.Background())
13036}
13037
13038// NotDone returns true if the page enumeration should be started or is not yet complete.
13039func (page InterfaceListResultPage) NotDone() bool {
13040	return !page.ilr.IsEmpty()
13041}
13042
13043// Response returns the raw server response from the last page request.
13044func (page InterfaceListResultPage) Response() InterfaceListResult {
13045	return page.ilr
13046}
13047
13048// Values returns the slice of values for the current page or nil if there are no values.
13049func (page InterfaceListResultPage) Values() []Interface {
13050	if page.ilr.IsEmpty() {
13051		return nil
13052	}
13053	return *page.ilr.Value
13054}
13055
13056// Creates a new instance of the InterfaceListResultPage type.
13057func NewInterfaceListResultPage(cur InterfaceListResult, getNextPage func(context.Context, InterfaceListResult) (InterfaceListResult, error)) InterfaceListResultPage {
13058	return InterfaceListResultPage{
13059		fn:  getNextPage,
13060		ilr: cur,
13061	}
13062}
13063
13064// InterfaceLoadBalancerListResult response for list ip configurations API service call.
13065type InterfaceLoadBalancerListResult struct {
13066	autorest.Response `json:"-"`
13067	// Value - A list of load balancers.
13068	Value *[]LoadBalancer `json:"value,omitempty"`
13069	// NextLink - READ-ONLY; The URL to get the next set of results.
13070	NextLink *string `json:"nextLink,omitempty"`
13071}
13072
13073// MarshalJSON is the custom marshaler for InterfaceLoadBalancerListResult.
13074func (ilblr InterfaceLoadBalancerListResult) MarshalJSON() ([]byte, error) {
13075	objectMap := make(map[string]interface{})
13076	if ilblr.Value != nil {
13077		objectMap["value"] = ilblr.Value
13078	}
13079	return json.Marshal(objectMap)
13080}
13081
13082// InterfaceLoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values.
13083type InterfaceLoadBalancerListResultIterator struct {
13084	i    int
13085	page InterfaceLoadBalancerListResultPage
13086}
13087
13088// NextWithContext advances to the next value.  If there was an error making
13089// the request the iterator does not advance and the error is returned.
13090func (iter *InterfaceLoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) {
13091	if tracing.IsEnabled() {
13092		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultIterator.NextWithContext")
13093		defer func() {
13094			sc := -1
13095			if iter.Response().Response.Response != nil {
13096				sc = iter.Response().Response.Response.StatusCode
13097			}
13098			tracing.EndSpan(ctx, sc, err)
13099		}()
13100	}
13101	iter.i++
13102	if iter.i < len(iter.page.Values()) {
13103		return nil
13104	}
13105	err = iter.page.NextWithContext(ctx)
13106	if err != nil {
13107		iter.i--
13108		return err
13109	}
13110	iter.i = 0
13111	return nil
13112}
13113
13114// Next advances to the next value.  If there was an error making
13115// the request the iterator does not advance and the error is returned.
13116// Deprecated: Use NextWithContext() instead.
13117func (iter *InterfaceLoadBalancerListResultIterator) Next() error {
13118	return iter.NextWithContext(context.Background())
13119}
13120
13121// NotDone returns true if the enumeration should be started or is not yet complete.
13122func (iter InterfaceLoadBalancerListResultIterator) NotDone() bool {
13123	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13124}
13125
13126// Response returns the raw server response from the last page request.
13127func (iter InterfaceLoadBalancerListResultIterator) Response() InterfaceLoadBalancerListResult {
13128	return iter.page.Response()
13129}
13130
13131// Value returns the current value or a zero-initialized value if the
13132// iterator has advanced beyond the end of the collection.
13133func (iter InterfaceLoadBalancerListResultIterator) Value() LoadBalancer {
13134	if !iter.page.NotDone() {
13135		return LoadBalancer{}
13136	}
13137	return iter.page.Values()[iter.i]
13138}
13139
13140// Creates a new instance of the InterfaceLoadBalancerListResultIterator type.
13141func NewInterfaceLoadBalancerListResultIterator(page InterfaceLoadBalancerListResultPage) InterfaceLoadBalancerListResultIterator {
13142	return InterfaceLoadBalancerListResultIterator{page: page}
13143}
13144
13145// IsEmpty returns true if the ListResult contains no values.
13146func (ilblr InterfaceLoadBalancerListResult) IsEmpty() bool {
13147	return ilblr.Value == nil || len(*ilblr.Value) == 0
13148}
13149
13150// hasNextLink returns true if the NextLink is not empty.
13151func (ilblr InterfaceLoadBalancerListResult) hasNextLink() bool {
13152	return ilblr.NextLink != nil && len(*ilblr.NextLink) != 0
13153}
13154
13155// interfaceLoadBalancerListResultPreparer prepares a request to retrieve the next set of results.
13156// It returns nil if no more results exist.
13157func (ilblr InterfaceLoadBalancerListResult) interfaceLoadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) {
13158	if !ilblr.hasNextLink() {
13159		return nil, nil
13160	}
13161	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13162		autorest.AsJSON(),
13163		autorest.AsGet(),
13164		autorest.WithBaseURL(to.String(ilblr.NextLink)))
13165}
13166
13167// InterfaceLoadBalancerListResultPage contains a page of LoadBalancer values.
13168type InterfaceLoadBalancerListResultPage struct {
13169	fn    func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)
13170	ilblr InterfaceLoadBalancerListResult
13171}
13172
13173// NextWithContext advances to the next page of values.  If there was an error making
13174// the request the page does not advance and the error is returned.
13175func (page *InterfaceLoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) {
13176	if tracing.IsEnabled() {
13177		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultPage.NextWithContext")
13178		defer func() {
13179			sc := -1
13180			if page.Response().Response.Response != nil {
13181				sc = page.Response().Response.Response.StatusCode
13182			}
13183			tracing.EndSpan(ctx, sc, err)
13184		}()
13185	}
13186	for {
13187		next, err := page.fn(ctx, page.ilblr)
13188		if err != nil {
13189			return err
13190		}
13191		page.ilblr = next
13192		if !next.hasNextLink() || !next.IsEmpty() {
13193			break
13194		}
13195	}
13196	return nil
13197}
13198
13199// Next advances to the next page of values.  If there was an error making
13200// the request the page does not advance and the error is returned.
13201// Deprecated: Use NextWithContext() instead.
13202func (page *InterfaceLoadBalancerListResultPage) Next() error {
13203	return page.NextWithContext(context.Background())
13204}
13205
13206// NotDone returns true if the page enumeration should be started or is not yet complete.
13207func (page InterfaceLoadBalancerListResultPage) NotDone() bool {
13208	return !page.ilblr.IsEmpty()
13209}
13210
13211// Response returns the raw server response from the last page request.
13212func (page InterfaceLoadBalancerListResultPage) Response() InterfaceLoadBalancerListResult {
13213	return page.ilblr
13214}
13215
13216// Values returns the slice of values for the current page or nil if there are no values.
13217func (page InterfaceLoadBalancerListResultPage) Values() []LoadBalancer {
13218	if page.ilblr.IsEmpty() {
13219		return nil
13220	}
13221	return *page.ilblr.Value
13222}
13223
13224// Creates a new instance of the InterfaceLoadBalancerListResultPage type.
13225func NewInterfaceLoadBalancerListResultPage(cur InterfaceLoadBalancerListResult, getNextPage func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)) InterfaceLoadBalancerListResultPage {
13226	return InterfaceLoadBalancerListResultPage{
13227		fn:    getNextPage,
13228		ilblr: cur,
13229	}
13230}
13231
13232// InterfacePropertiesFormat networkInterface properties.
13233type InterfacePropertiesFormat struct {
13234	// VirtualMachine - READ-ONLY; The reference of a virtual machine.
13235	VirtualMachine *SubResource `json:"virtualMachine,omitempty"`
13236	// NetworkSecurityGroup - The reference of the NetworkSecurityGroup resource.
13237	NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"`
13238	// InterfaceEndpoint - READ-ONLY; A reference to the interface endpoint to which the network interface is linked.
13239	InterfaceEndpoint *InterfaceEndpoint `json:"interfaceEndpoint,omitempty"`
13240	// IPConfigurations - A list of IPConfigurations of the network interface.
13241	IPConfigurations *[]InterfaceIPConfiguration `json:"ipConfigurations,omitempty"`
13242	// TapConfigurations - A list of TapConfigurations of the network interface.
13243	TapConfigurations *[]InterfaceTapConfiguration `json:"tapConfigurations,omitempty"`
13244	// DNSSettings - The DNS settings in network interface.
13245	DNSSettings *InterfaceDNSSettings `json:"dnsSettings,omitempty"`
13246	// MacAddress - The MAC address of the network interface.
13247	MacAddress *string `json:"macAddress,omitempty"`
13248	// Primary - Gets whether this is a primary network interface on a virtual machine.
13249	Primary *bool `json:"primary,omitempty"`
13250	// EnableAcceleratedNetworking - If the network interface is accelerated networking enabled.
13251	EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"`
13252	// EnableIPForwarding - Indicates whether IP forwarding is enabled on this network interface.
13253	EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"`
13254	// HostedWorkloads - READ-ONLY; A list of references to linked BareMetal resources
13255	HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"`
13256	// ResourceGUID - The resource GUID property of the network interface resource.
13257	ResourceGUID *string `json:"resourceGuid,omitempty"`
13258	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
13259	ProvisioningState *string `json:"provisioningState,omitempty"`
13260}
13261
13262// MarshalJSON is the custom marshaler for InterfacePropertiesFormat.
13263func (ipf InterfacePropertiesFormat) MarshalJSON() ([]byte, error) {
13264	objectMap := make(map[string]interface{})
13265	if ipf.NetworkSecurityGroup != nil {
13266		objectMap["networkSecurityGroup"] = ipf.NetworkSecurityGroup
13267	}
13268	if ipf.IPConfigurations != nil {
13269		objectMap["ipConfigurations"] = ipf.IPConfigurations
13270	}
13271	if ipf.TapConfigurations != nil {
13272		objectMap["tapConfigurations"] = ipf.TapConfigurations
13273	}
13274	if ipf.DNSSettings != nil {
13275		objectMap["dnsSettings"] = ipf.DNSSettings
13276	}
13277	if ipf.MacAddress != nil {
13278		objectMap["macAddress"] = ipf.MacAddress
13279	}
13280	if ipf.Primary != nil {
13281		objectMap["primary"] = ipf.Primary
13282	}
13283	if ipf.EnableAcceleratedNetworking != nil {
13284		objectMap["enableAcceleratedNetworking"] = ipf.EnableAcceleratedNetworking
13285	}
13286	if ipf.EnableIPForwarding != nil {
13287		objectMap["enableIPForwarding"] = ipf.EnableIPForwarding
13288	}
13289	if ipf.ResourceGUID != nil {
13290		objectMap["resourceGuid"] = ipf.ResourceGUID
13291	}
13292	if ipf.ProvisioningState != nil {
13293		objectMap["provisioningState"] = ipf.ProvisioningState
13294	}
13295	return json.Marshal(objectMap)
13296}
13297
13298// InterfacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
13299// long-running operation.
13300type InterfacesCreateOrUpdateFuture struct {
13301	azure.FutureAPI
13302	// Result returns the result of the asynchronous operation.
13303	// If the operation has not completed it will return an error.
13304	Result func(InterfacesClient) (Interface, error)
13305}
13306
13307// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13308func (future *InterfacesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
13309	var azFuture azure.Future
13310	if err := json.Unmarshal(body, &azFuture); err != nil {
13311		return err
13312	}
13313	future.FutureAPI = &azFuture
13314	future.Result = future.result
13315	return nil
13316}
13317
13318// result is the default implementation for InterfacesCreateOrUpdateFuture.Result.
13319func (future *InterfacesCreateOrUpdateFuture) result(client InterfacesClient) (i Interface, err error) {
13320	var done bool
13321	done, err = future.DoneWithContext(context.Background(), client)
13322	if err != nil {
13323		err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
13324		return
13325	}
13326	if !done {
13327		i.Response.Response = future.Response()
13328		err = azure.NewAsyncOpIncompleteError("network.InterfacesCreateOrUpdateFuture")
13329		return
13330	}
13331	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
13332	if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
13333		i, err = client.CreateOrUpdateResponder(i.Response.Response)
13334		if err != nil {
13335			err = autorest.NewErrorWithError(err, "network.InterfacesCreateOrUpdateFuture", "Result", i.Response.Response, "Failure responding to request")
13336		}
13337	}
13338	return
13339}
13340
13341// InterfacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
13342// operation.
13343type InterfacesDeleteFuture struct {
13344	azure.FutureAPI
13345	// Result returns the result of the asynchronous operation.
13346	// If the operation has not completed it will return an error.
13347	Result func(InterfacesClient) (autorest.Response, error)
13348}
13349
13350// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13351func (future *InterfacesDeleteFuture) UnmarshalJSON(body []byte) error {
13352	var azFuture azure.Future
13353	if err := json.Unmarshal(body, &azFuture); err != nil {
13354		return err
13355	}
13356	future.FutureAPI = &azFuture
13357	future.Result = future.result
13358	return nil
13359}
13360
13361// result is the default implementation for InterfacesDeleteFuture.Result.
13362func (future *InterfacesDeleteFuture) result(client InterfacesClient) (ar autorest.Response, err error) {
13363	var done bool
13364	done, err = future.DoneWithContext(context.Background(), client)
13365	if err != nil {
13366		err = autorest.NewErrorWithError(err, "network.InterfacesDeleteFuture", "Result", future.Response(), "Polling failure")
13367		return
13368	}
13369	if !done {
13370		ar.Response = future.Response()
13371		err = azure.NewAsyncOpIncompleteError("network.InterfacesDeleteFuture")
13372		return
13373	}
13374	ar.Response = future.Response()
13375	return
13376}
13377
13378// InterfacesGetEffectiveRouteTableFuture an abstraction for monitoring and retrieving the results of a
13379// long-running operation.
13380type InterfacesGetEffectiveRouteTableFuture struct {
13381	azure.FutureAPI
13382	// Result returns the result of the asynchronous operation.
13383	// If the operation has not completed it will return an error.
13384	Result func(InterfacesClient) (EffectiveRouteListResult, error)
13385}
13386
13387// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13388func (future *InterfacesGetEffectiveRouteTableFuture) UnmarshalJSON(body []byte) error {
13389	var azFuture azure.Future
13390	if err := json.Unmarshal(body, &azFuture); err != nil {
13391		return err
13392	}
13393	future.FutureAPI = &azFuture
13394	future.Result = future.result
13395	return nil
13396}
13397
13398// result is the default implementation for InterfacesGetEffectiveRouteTableFuture.Result.
13399func (future *InterfacesGetEffectiveRouteTableFuture) result(client InterfacesClient) (erlr EffectiveRouteListResult, err error) {
13400	var done bool
13401	done, err = future.DoneWithContext(context.Background(), client)
13402	if err != nil {
13403		err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", future.Response(), "Polling failure")
13404		return
13405	}
13406	if !done {
13407		erlr.Response.Response = future.Response()
13408		err = azure.NewAsyncOpIncompleteError("network.InterfacesGetEffectiveRouteTableFuture")
13409		return
13410	}
13411	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
13412	if erlr.Response.Response, err = future.GetResult(sender); err == nil && erlr.Response.Response.StatusCode != http.StatusNoContent {
13413		erlr, err = client.GetEffectiveRouteTableResponder(erlr.Response.Response)
13414		if err != nil {
13415			err = autorest.NewErrorWithError(err, "network.InterfacesGetEffectiveRouteTableFuture", "Result", erlr.Response.Response, "Failure responding to request")
13416		}
13417	}
13418	return
13419}
13420
13421// InterfacesListEffectiveNetworkSecurityGroupsFuture an abstraction for monitoring and retrieving the
13422// results of a long-running operation.
13423type InterfacesListEffectiveNetworkSecurityGroupsFuture struct {
13424	azure.FutureAPI
13425	// Result returns the result of the asynchronous operation.
13426	// If the operation has not completed it will return an error.
13427	Result func(InterfacesClient) (EffectiveNetworkSecurityGroupListResult, error)
13428}
13429
13430// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13431func (future *InterfacesListEffectiveNetworkSecurityGroupsFuture) UnmarshalJSON(body []byte) error {
13432	var azFuture azure.Future
13433	if err := json.Unmarshal(body, &azFuture); err != nil {
13434		return err
13435	}
13436	future.FutureAPI = &azFuture
13437	future.Result = future.result
13438	return nil
13439}
13440
13441// result is the default implementation for InterfacesListEffectiveNetworkSecurityGroupsFuture.Result.
13442func (future *InterfacesListEffectiveNetworkSecurityGroupsFuture) result(client InterfacesClient) (ensglr EffectiveNetworkSecurityGroupListResult, err error) {
13443	var done bool
13444	done, err = future.DoneWithContext(context.Background(), client)
13445	if err != nil {
13446		err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", future.Response(), "Polling failure")
13447		return
13448	}
13449	if !done {
13450		ensglr.Response.Response = future.Response()
13451		err = azure.NewAsyncOpIncompleteError("network.InterfacesListEffectiveNetworkSecurityGroupsFuture")
13452		return
13453	}
13454	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
13455	if ensglr.Response.Response, err = future.GetResult(sender); err == nil && ensglr.Response.Response.StatusCode != http.StatusNoContent {
13456		ensglr, err = client.ListEffectiveNetworkSecurityGroupsResponder(ensglr.Response.Response)
13457		if err != nil {
13458			err = autorest.NewErrorWithError(err, "network.InterfacesListEffectiveNetworkSecurityGroupsFuture", "Result", ensglr.Response.Response, "Failure responding to request")
13459		}
13460	}
13461	return
13462}
13463
13464// InterfacesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
13465// operation.
13466type InterfacesUpdateTagsFuture struct {
13467	azure.FutureAPI
13468	// Result returns the result of the asynchronous operation.
13469	// If the operation has not completed it will return an error.
13470	Result func(InterfacesClient) (Interface, error)
13471}
13472
13473// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13474func (future *InterfacesUpdateTagsFuture) UnmarshalJSON(body []byte) error {
13475	var azFuture azure.Future
13476	if err := json.Unmarshal(body, &azFuture); err != nil {
13477		return err
13478	}
13479	future.FutureAPI = &azFuture
13480	future.Result = future.result
13481	return nil
13482}
13483
13484// result is the default implementation for InterfacesUpdateTagsFuture.Result.
13485func (future *InterfacesUpdateTagsFuture) result(client InterfacesClient) (i Interface, err error) {
13486	var done bool
13487	done, err = future.DoneWithContext(context.Background(), client)
13488	if err != nil {
13489		err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
13490		return
13491	}
13492	if !done {
13493		i.Response.Response = future.Response()
13494		err = azure.NewAsyncOpIncompleteError("network.InterfacesUpdateTagsFuture")
13495		return
13496	}
13497	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
13498	if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
13499		i, err = client.UpdateTagsResponder(i.Response.Response)
13500		if err != nil {
13501			err = autorest.NewErrorWithError(err, "network.InterfacesUpdateTagsFuture", "Result", i.Response.Response, "Failure responding to request")
13502		}
13503	}
13504	return
13505}
13506
13507// InterfaceTapConfiguration tap configuration in a Network Interface
13508type InterfaceTapConfiguration struct {
13509	autorest.Response `json:"-"`
13510	// InterfaceTapConfigurationPropertiesFormat - Properties of the Virtual Network Tap configuration
13511	*InterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"`
13512	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
13513	Name *string `json:"name,omitempty"`
13514	// Etag - A unique read-only string that changes whenever the resource is updated.
13515	Etag *string `json:"etag,omitempty"`
13516	// Type - READ-ONLY; Sub Resource type.
13517	Type *string `json:"type,omitempty"`
13518	// ID - Resource ID.
13519	ID *string `json:"id,omitempty"`
13520}
13521
13522// MarshalJSON is the custom marshaler for InterfaceTapConfiguration.
13523func (itc InterfaceTapConfiguration) MarshalJSON() ([]byte, error) {
13524	objectMap := make(map[string]interface{})
13525	if itc.InterfaceTapConfigurationPropertiesFormat != nil {
13526		objectMap["properties"] = itc.InterfaceTapConfigurationPropertiesFormat
13527	}
13528	if itc.Name != nil {
13529		objectMap["name"] = itc.Name
13530	}
13531	if itc.Etag != nil {
13532		objectMap["etag"] = itc.Etag
13533	}
13534	if itc.ID != nil {
13535		objectMap["id"] = itc.ID
13536	}
13537	return json.Marshal(objectMap)
13538}
13539
13540// UnmarshalJSON is the custom unmarshaler for InterfaceTapConfiguration struct.
13541func (itc *InterfaceTapConfiguration) UnmarshalJSON(body []byte) error {
13542	var m map[string]*json.RawMessage
13543	err := json.Unmarshal(body, &m)
13544	if err != nil {
13545		return err
13546	}
13547	for k, v := range m {
13548		switch k {
13549		case "properties":
13550			if v != nil {
13551				var interfaceTapConfigurationPropertiesFormat InterfaceTapConfigurationPropertiesFormat
13552				err = json.Unmarshal(*v, &interfaceTapConfigurationPropertiesFormat)
13553				if err != nil {
13554					return err
13555				}
13556				itc.InterfaceTapConfigurationPropertiesFormat = &interfaceTapConfigurationPropertiesFormat
13557			}
13558		case "name":
13559			if v != nil {
13560				var name string
13561				err = json.Unmarshal(*v, &name)
13562				if err != nil {
13563					return err
13564				}
13565				itc.Name = &name
13566			}
13567		case "etag":
13568			if v != nil {
13569				var etag string
13570				err = json.Unmarshal(*v, &etag)
13571				if err != nil {
13572					return err
13573				}
13574				itc.Etag = &etag
13575			}
13576		case "type":
13577			if v != nil {
13578				var typeVar string
13579				err = json.Unmarshal(*v, &typeVar)
13580				if err != nil {
13581					return err
13582				}
13583				itc.Type = &typeVar
13584			}
13585		case "id":
13586			if v != nil {
13587				var ID string
13588				err = json.Unmarshal(*v, &ID)
13589				if err != nil {
13590					return err
13591				}
13592				itc.ID = &ID
13593			}
13594		}
13595	}
13596
13597	return nil
13598}
13599
13600// InterfaceTapConfigurationListResult response for list tap configurations API service call.
13601type InterfaceTapConfigurationListResult struct {
13602	autorest.Response `json:"-"`
13603	// Value - A list of tap configurations.
13604	Value *[]InterfaceTapConfiguration `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 InterfaceTapConfigurationListResult.
13610func (itclr InterfaceTapConfigurationListResult) MarshalJSON() ([]byte, error) {
13611	objectMap := make(map[string]interface{})
13612	if itclr.Value != nil {
13613		objectMap["value"] = itclr.Value
13614	}
13615	return json.Marshal(objectMap)
13616}
13617
13618// InterfaceTapConfigurationListResultIterator provides access to a complete listing of
13619// InterfaceTapConfiguration values.
13620type InterfaceTapConfigurationListResultIterator struct {
13621	i    int
13622	page InterfaceTapConfigurationListResultPage
13623}
13624
13625// NextWithContext advances to the next value.  If there was an error making
13626// the request the iterator does not advance and the error is returned.
13627func (iter *InterfaceTapConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
13628	if tracing.IsEnabled() {
13629		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationListResultIterator.NextWithContext")
13630		defer func() {
13631			sc := -1
13632			if iter.Response().Response.Response != nil {
13633				sc = iter.Response().Response.Response.StatusCode
13634			}
13635			tracing.EndSpan(ctx, sc, err)
13636		}()
13637	}
13638	iter.i++
13639	if iter.i < len(iter.page.Values()) {
13640		return nil
13641	}
13642	err = iter.page.NextWithContext(ctx)
13643	if err != nil {
13644		iter.i--
13645		return err
13646	}
13647	iter.i = 0
13648	return nil
13649}
13650
13651// Next advances to the next value.  If there was an error making
13652// the request the iterator does not advance and the error is returned.
13653// Deprecated: Use NextWithContext() instead.
13654func (iter *InterfaceTapConfigurationListResultIterator) Next() error {
13655	return iter.NextWithContext(context.Background())
13656}
13657
13658// NotDone returns true if the enumeration should be started or is not yet complete.
13659func (iter InterfaceTapConfigurationListResultIterator) NotDone() bool {
13660	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13661}
13662
13663// Response returns the raw server response from the last page request.
13664func (iter InterfaceTapConfigurationListResultIterator) Response() InterfaceTapConfigurationListResult {
13665	return iter.page.Response()
13666}
13667
13668// Value returns the current value or a zero-initialized value if the
13669// iterator has advanced beyond the end of the collection.
13670func (iter InterfaceTapConfigurationListResultIterator) Value() InterfaceTapConfiguration {
13671	if !iter.page.NotDone() {
13672		return InterfaceTapConfiguration{}
13673	}
13674	return iter.page.Values()[iter.i]
13675}
13676
13677// Creates a new instance of the InterfaceTapConfigurationListResultIterator type.
13678func NewInterfaceTapConfigurationListResultIterator(page InterfaceTapConfigurationListResultPage) InterfaceTapConfigurationListResultIterator {
13679	return InterfaceTapConfigurationListResultIterator{page: page}
13680}
13681
13682// IsEmpty returns true if the ListResult contains no values.
13683func (itclr InterfaceTapConfigurationListResult) IsEmpty() bool {
13684	return itclr.Value == nil || len(*itclr.Value) == 0
13685}
13686
13687// hasNextLink returns true if the NextLink is not empty.
13688func (itclr InterfaceTapConfigurationListResult) hasNextLink() bool {
13689	return itclr.NextLink != nil && len(*itclr.NextLink) != 0
13690}
13691
13692// interfaceTapConfigurationListResultPreparer prepares a request to retrieve the next set of results.
13693// It returns nil if no more results exist.
13694func (itclr InterfaceTapConfigurationListResult) interfaceTapConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
13695	if !itclr.hasNextLink() {
13696		return nil, nil
13697	}
13698	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13699		autorest.AsJSON(),
13700		autorest.AsGet(),
13701		autorest.WithBaseURL(to.String(itclr.NextLink)))
13702}
13703
13704// InterfaceTapConfigurationListResultPage contains a page of InterfaceTapConfiguration values.
13705type InterfaceTapConfigurationListResultPage struct {
13706	fn    func(context.Context, InterfaceTapConfigurationListResult) (InterfaceTapConfigurationListResult, error)
13707	itclr InterfaceTapConfigurationListResult
13708}
13709
13710// NextWithContext advances to the next page of values.  If there was an error making
13711// the request the page does not advance and the error is returned.
13712func (page *InterfaceTapConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
13713	if tracing.IsEnabled() {
13714		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationListResultPage.NextWithContext")
13715		defer func() {
13716			sc := -1
13717			if page.Response().Response.Response != nil {
13718				sc = page.Response().Response.Response.StatusCode
13719			}
13720			tracing.EndSpan(ctx, sc, err)
13721		}()
13722	}
13723	for {
13724		next, err := page.fn(ctx, page.itclr)
13725		if err != nil {
13726			return err
13727		}
13728		page.itclr = next
13729		if !next.hasNextLink() || !next.IsEmpty() {
13730			break
13731		}
13732	}
13733	return nil
13734}
13735
13736// Next advances to the next page of values.  If there was an error making
13737// the request the page does not advance and the error is returned.
13738// Deprecated: Use NextWithContext() instead.
13739func (page *InterfaceTapConfigurationListResultPage) Next() error {
13740	return page.NextWithContext(context.Background())
13741}
13742
13743// NotDone returns true if the page enumeration should be started or is not yet complete.
13744func (page InterfaceTapConfigurationListResultPage) NotDone() bool {
13745	return !page.itclr.IsEmpty()
13746}
13747
13748// Response returns the raw server response from the last page request.
13749func (page InterfaceTapConfigurationListResultPage) Response() InterfaceTapConfigurationListResult {
13750	return page.itclr
13751}
13752
13753// Values returns the slice of values for the current page or nil if there are no values.
13754func (page InterfaceTapConfigurationListResultPage) Values() []InterfaceTapConfiguration {
13755	if page.itclr.IsEmpty() {
13756		return nil
13757	}
13758	return *page.itclr.Value
13759}
13760
13761// Creates a new instance of the InterfaceTapConfigurationListResultPage type.
13762func NewInterfaceTapConfigurationListResultPage(cur InterfaceTapConfigurationListResult, getNextPage func(context.Context, InterfaceTapConfigurationListResult) (InterfaceTapConfigurationListResult, error)) InterfaceTapConfigurationListResultPage {
13763	return InterfaceTapConfigurationListResultPage{
13764		fn:    getNextPage,
13765		itclr: cur,
13766	}
13767}
13768
13769// InterfaceTapConfigurationPropertiesFormat properties of Virtual Network Tap configuration.
13770type InterfaceTapConfigurationPropertiesFormat struct {
13771	// VirtualNetworkTap - The reference of the Virtual Network Tap resource.
13772	VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"`
13773	// ProvisioningState - READ-ONLY; The provisioning state of the network interface tap configuration. Possible values are: 'Updating', 'Deleting', and 'Failed'.
13774	ProvisioningState *string `json:"provisioningState,omitempty"`
13775}
13776
13777// MarshalJSON is the custom marshaler for InterfaceTapConfigurationPropertiesFormat.
13778func (itcpf InterfaceTapConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
13779	objectMap := make(map[string]interface{})
13780	if itcpf.VirtualNetworkTap != nil {
13781		objectMap["virtualNetworkTap"] = itcpf.VirtualNetworkTap
13782	}
13783	return json.Marshal(objectMap)
13784}
13785
13786// InterfaceTapConfigurationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
13787// of a long-running operation.
13788type InterfaceTapConfigurationsCreateOrUpdateFuture struct {
13789	azure.FutureAPI
13790	// Result returns the result of the asynchronous operation.
13791	// If the operation has not completed it will return an error.
13792	Result func(InterfaceTapConfigurationsClient) (InterfaceTapConfiguration, error)
13793}
13794
13795// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13796func (future *InterfaceTapConfigurationsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
13797	var azFuture azure.Future
13798	if err := json.Unmarshal(body, &azFuture); err != nil {
13799		return err
13800	}
13801	future.FutureAPI = &azFuture
13802	future.Result = future.result
13803	return nil
13804}
13805
13806// result is the default implementation for InterfaceTapConfigurationsCreateOrUpdateFuture.Result.
13807func (future *InterfaceTapConfigurationsCreateOrUpdateFuture) result(client InterfaceTapConfigurationsClient) (itc InterfaceTapConfiguration, err error) {
13808	var done bool
13809	done, err = future.DoneWithContext(context.Background(), client)
13810	if err != nil {
13811		err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
13812		return
13813	}
13814	if !done {
13815		itc.Response.Response = future.Response()
13816		err = azure.NewAsyncOpIncompleteError("network.InterfaceTapConfigurationsCreateOrUpdateFuture")
13817		return
13818	}
13819	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
13820	if itc.Response.Response, err = future.GetResult(sender); err == nil && itc.Response.Response.StatusCode != http.StatusNoContent {
13821		itc, err = client.CreateOrUpdateResponder(itc.Response.Response)
13822		if err != nil {
13823			err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsCreateOrUpdateFuture", "Result", itc.Response.Response, "Failure responding to request")
13824		}
13825	}
13826	return
13827}
13828
13829// InterfaceTapConfigurationsDeleteFuture an abstraction for monitoring and retrieving the results of a
13830// long-running operation.
13831type InterfaceTapConfigurationsDeleteFuture struct {
13832	azure.FutureAPI
13833	// Result returns the result of the asynchronous operation.
13834	// If the operation has not completed it will return an error.
13835	Result func(InterfaceTapConfigurationsClient) (autorest.Response, error)
13836}
13837
13838// UnmarshalJSON is the custom unmarshaller for CreateFuture.
13839func (future *InterfaceTapConfigurationsDeleteFuture) UnmarshalJSON(body []byte) error {
13840	var azFuture azure.Future
13841	if err := json.Unmarshal(body, &azFuture); err != nil {
13842		return err
13843	}
13844	future.FutureAPI = &azFuture
13845	future.Result = future.result
13846	return nil
13847}
13848
13849// result is the default implementation for InterfaceTapConfigurationsDeleteFuture.Result.
13850func (future *InterfaceTapConfigurationsDeleteFuture) result(client InterfaceTapConfigurationsClient) (ar autorest.Response, err error) {
13851	var done bool
13852	done, err = future.DoneWithContext(context.Background(), client)
13853	if err != nil {
13854		err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsDeleteFuture", "Result", future.Response(), "Polling failure")
13855		return
13856	}
13857	if !done {
13858		ar.Response = future.Response()
13859		err = azure.NewAsyncOpIncompleteError("network.InterfaceTapConfigurationsDeleteFuture")
13860		return
13861	}
13862	ar.Response = future.Response()
13863	return
13864}
13865
13866// IPAddressAvailabilityResult response for CheckIPAddressAvailability API service call
13867type IPAddressAvailabilityResult struct {
13868	autorest.Response `json:"-"`
13869	// Available - Private IP address availability.
13870	Available *bool `json:"available,omitempty"`
13871	// AvailableIPAddresses - Contains other available private IP addresses if the asked for address is taken.
13872	AvailableIPAddresses *[]string `json:"availableIPAddresses,omitempty"`
13873}
13874
13875// IPConfiguration IP configuration
13876type IPConfiguration struct {
13877	// IPConfigurationPropertiesFormat - Properties of the IP configuration
13878	*IPConfigurationPropertiesFormat `json:"properties,omitempty"`
13879	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
13880	Name *string `json:"name,omitempty"`
13881	// Etag - A unique read-only string that changes whenever the resource is updated.
13882	Etag *string `json:"etag,omitempty"`
13883	// ID - Resource ID.
13884	ID *string `json:"id,omitempty"`
13885}
13886
13887// MarshalJSON is the custom marshaler for IPConfiguration.
13888func (ic IPConfiguration) MarshalJSON() ([]byte, error) {
13889	objectMap := make(map[string]interface{})
13890	if ic.IPConfigurationPropertiesFormat != nil {
13891		objectMap["properties"] = ic.IPConfigurationPropertiesFormat
13892	}
13893	if ic.Name != nil {
13894		objectMap["name"] = ic.Name
13895	}
13896	if ic.Etag != nil {
13897		objectMap["etag"] = ic.Etag
13898	}
13899	if ic.ID != nil {
13900		objectMap["id"] = ic.ID
13901	}
13902	return json.Marshal(objectMap)
13903}
13904
13905// UnmarshalJSON is the custom unmarshaler for IPConfiguration struct.
13906func (ic *IPConfiguration) UnmarshalJSON(body []byte) error {
13907	var m map[string]*json.RawMessage
13908	err := json.Unmarshal(body, &m)
13909	if err != nil {
13910		return err
13911	}
13912	for k, v := range m {
13913		switch k {
13914		case "properties":
13915			if v != nil {
13916				var IPConfigurationPropertiesFormat IPConfigurationPropertiesFormat
13917				err = json.Unmarshal(*v, &IPConfigurationPropertiesFormat)
13918				if err != nil {
13919					return err
13920				}
13921				ic.IPConfigurationPropertiesFormat = &IPConfigurationPropertiesFormat
13922			}
13923		case "name":
13924			if v != nil {
13925				var name string
13926				err = json.Unmarshal(*v, &name)
13927				if err != nil {
13928					return err
13929				}
13930				ic.Name = &name
13931			}
13932		case "etag":
13933			if v != nil {
13934				var etag string
13935				err = json.Unmarshal(*v, &etag)
13936				if err != nil {
13937					return err
13938				}
13939				ic.Etag = &etag
13940			}
13941		case "id":
13942			if v != nil {
13943				var ID string
13944				err = json.Unmarshal(*v, &ID)
13945				if err != nil {
13946					return err
13947				}
13948				ic.ID = &ID
13949			}
13950		}
13951	}
13952
13953	return nil
13954}
13955
13956// IPConfigurationProfile IP configuration profile child resource.
13957type IPConfigurationProfile struct {
13958	// IPConfigurationProfilePropertiesFormat - Properties of the IP configuration profile.
13959	*IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"`
13960	// Name - The name of the resource. This name can be used to access the resource.
13961	Name *string `json:"name,omitempty"`
13962	// Type - READ-ONLY; Sub Resource type.
13963	Type *string `json:"type,omitempty"`
13964	// Etag - A unique read-only string that changes whenever the resource is updated.
13965	Etag *string `json:"etag,omitempty"`
13966	// ID - Resource ID.
13967	ID *string `json:"id,omitempty"`
13968}
13969
13970// MarshalJSON is the custom marshaler for IPConfigurationProfile.
13971func (icp IPConfigurationProfile) MarshalJSON() ([]byte, error) {
13972	objectMap := make(map[string]interface{})
13973	if icp.IPConfigurationProfilePropertiesFormat != nil {
13974		objectMap["properties"] = icp.IPConfigurationProfilePropertiesFormat
13975	}
13976	if icp.Name != nil {
13977		objectMap["name"] = icp.Name
13978	}
13979	if icp.Etag != nil {
13980		objectMap["etag"] = icp.Etag
13981	}
13982	if icp.ID != nil {
13983		objectMap["id"] = icp.ID
13984	}
13985	return json.Marshal(objectMap)
13986}
13987
13988// UnmarshalJSON is the custom unmarshaler for IPConfigurationProfile struct.
13989func (icp *IPConfigurationProfile) UnmarshalJSON(body []byte) error {
13990	var m map[string]*json.RawMessage
13991	err := json.Unmarshal(body, &m)
13992	if err != nil {
13993		return err
13994	}
13995	for k, v := range m {
13996		switch k {
13997		case "properties":
13998			if v != nil {
13999				var IPConfigurationProfilePropertiesFormat IPConfigurationProfilePropertiesFormat
14000				err = json.Unmarshal(*v, &IPConfigurationProfilePropertiesFormat)
14001				if err != nil {
14002					return err
14003				}
14004				icp.IPConfigurationProfilePropertiesFormat = &IPConfigurationProfilePropertiesFormat
14005			}
14006		case "name":
14007			if v != nil {
14008				var name string
14009				err = json.Unmarshal(*v, &name)
14010				if err != nil {
14011					return err
14012				}
14013				icp.Name = &name
14014			}
14015		case "type":
14016			if v != nil {
14017				var typeVar string
14018				err = json.Unmarshal(*v, &typeVar)
14019				if err != nil {
14020					return err
14021				}
14022				icp.Type = &typeVar
14023			}
14024		case "etag":
14025			if v != nil {
14026				var etag string
14027				err = json.Unmarshal(*v, &etag)
14028				if err != nil {
14029					return err
14030				}
14031				icp.Etag = &etag
14032			}
14033		case "id":
14034			if v != nil {
14035				var ID string
14036				err = json.Unmarshal(*v, &ID)
14037				if err != nil {
14038					return err
14039				}
14040				icp.ID = &ID
14041			}
14042		}
14043	}
14044
14045	return nil
14046}
14047
14048// IPConfigurationProfilePropertiesFormat IP configuration profile properties.
14049type IPConfigurationProfilePropertiesFormat struct {
14050	// Subnet - The reference of the subnet resource to create a container network interface ip configuration.
14051	Subnet *Subnet `json:"subnet,omitempty"`
14052	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
14053	ProvisioningState *string `json:"provisioningState,omitempty"`
14054}
14055
14056// MarshalJSON is the custom marshaler for IPConfigurationProfilePropertiesFormat.
14057func (icppf IPConfigurationProfilePropertiesFormat) MarshalJSON() ([]byte, error) {
14058	objectMap := make(map[string]interface{})
14059	if icppf.Subnet != nil {
14060		objectMap["subnet"] = icppf.Subnet
14061	}
14062	return json.Marshal(objectMap)
14063}
14064
14065// IPConfigurationPropertiesFormat properties of IP configuration.
14066type IPConfigurationPropertiesFormat struct {
14067	// PrivateIPAddress - The private IP address of the IP configuration.
14068	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
14069	// PrivateIPAllocationMethod - The private IP allocation method. Possible values are 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
14070	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
14071	// Subnet - The reference of the subnet resource.
14072	Subnet *Subnet `json:"subnet,omitempty"`
14073	// PublicIPAddress - The reference of the public IP resource.
14074	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
14075	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
14076	ProvisioningState *string `json:"provisioningState,omitempty"`
14077}
14078
14079// IpsecPolicy an IPSec Policy configuration for a virtual network gateway connection
14080type IpsecPolicy struct {
14081	// SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for a site to site VPN tunnel.
14082	SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"`
14083	// SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for a site to site VPN tunnel.
14084	SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"`
14085	// IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256'
14086	IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"`
14087	// IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256'
14088	IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"`
14089	// IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128'
14090	IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"`
14091	// IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'IkeIntegrityMD5', 'IkeIntegritySHA1', 'IkeIntegritySHA256', 'IkeIntegritySHA384', 'IkeIntegrityGCMAES256', 'IkeIntegrityGCMAES128'
14092	IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"`
14093	// DhGroup - The DH Groups used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24'
14094	DhGroup DhGroup `json:"dhGroup,omitempty"`
14095	// 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'
14096	PfsGroup PfsGroup `json:"pfsGroup,omitempty"`
14097}
14098
14099// IPTag contains the IpTag associated with the object
14100type IPTag struct {
14101	// IPTagType - Gets or sets the ipTag type: Example FirstPartyUsage.
14102	IPTagType *string `json:"ipTagType,omitempty"`
14103	// Tag - Gets or sets value of the IpTag associated with the public IP. Example SQL, Storage etc
14104	Tag *string `json:"tag,omitempty"`
14105}
14106
14107// Ipv6ExpressRouteCircuitPeeringConfig contains IPv6 peering config.
14108type Ipv6ExpressRouteCircuitPeeringConfig struct {
14109	// PrimaryPeerAddressPrefix - The primary address prefix.
14110	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
14111	// SecondaryPeerAddressPrefix - The secondary address prefix.
14112	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
14113	// MicrosoftPeeringConfig - The Microsoft peering configuration.
14114	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
14115	// RouteFilter - The reference of the RouteFilter resource.
14116	RouteFilter *RouteFilter `json:"routeFilter,omitempty"`
14117	// State - The state of peering. Possible values are: 'Disabled' and 'Enabled'. Possible values include: 'ExpressRouteCircuitPeeringStateDisabled', 'ExpressRouteCircuitPeeringStateEnabled'
14118	State ExpressRouteCircuitPeeringState `json:"state,omitempty"`
14119}
14120
14121// ListHubVirtualNetworkConnectionsResult list of HubVirtualNetworkConnections and a URL nextLink to get
14122// the next set of results.
14123type ListHubVirtualNetworkConnectionsResult struct {
14124	autorest.Response `json:"-"`
14125	// Value - List of HubVirtualNetworkConnections.
14126	Value *[]HubVirtualNetworkConnection `json:"value,omitempty"`
14127	// NextLink - URL to get the next set of operation list results if there are any.
14128	NextLink *string `json:"nextLink,omitempty"`
14129}
14130
14131// ListHubVirtualNetworkConnectionsResultIterator provides access to a complete listing of
14132// HubVirtualNetworkConnection values.
14133type ListHubVirtualNetworkConnectionsResultIterator struct {
14134	i    int
14135	page ListHubVirtualNetworkConnectionsResultPage
14136}
14137
14138// NextWithContext advances to the next value.  If there was an error making
14139// the request the iterator does not advance and the error is returned.
14140func (iter *ListHubVirtualNetworkConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
14141	if tracing.IsEnabled() {
14142		ctx = tracing.StartSpan(ctx, fqdn+"/ListHubVirtualNetworkConnectionsResultIterator.NextWithContext")
14143		defer func() {
14144			sc := -1
14145			if iter.Response().Response.Response != nil {
14146				sc = iter.Response().Response.Response.StatusCode
14147			}
14148			tracing.EndSpan(ctx, sc, err)
14149		}()
14150	}
14151	iter.i++
14152	if iter.i < len(iter.page.Values()) {
14153		return nil
14154	}
14155	err = iter.page.NextWithContext(ctx)
14156	if err != nil {
14157		iter.i--
14158		return err
14159	}
14160	iter.i = 0
14161	return nil
14162}
14163
14164// Next advances to the next value.  If there was an error making
14165// the request the iterator does not advance and the error is returned.
14166// Deprecated: Use NextWithContext() instead.
14167func (iter *ListHubVirtualNetworkConnectionsResultIterator) Next() error {
14168	return iter.NextWithContext(context.Background())
14169}
14170
14171// NotDone returns true if the enumeration should be started or is not yet complete.
14172func (iter ListHubVirtualNetworkConnectionsResultIterator) NotDone() bool {
14173	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14174}
14175
14176// Response returns the raw server response from the last page request.
14177func (iter ListHubVirtualNetworkConnectionsResultIterator) Response() ListHubVirtualNetworkConnectionsResult {
14178	return iter.page.Response()
14179}
14180
14181// Value returns the current value or a zero-initialized value if the
14182// iterator has advanced beyond the end of the collection.
14183func (iter ListHubVirtualNetworkConnectionsResultIterator) Value() HubVirtualNetworkConnection {
14184	if !iter.page.NotDone() {
14185		return HubVirtualNetworkConnection{}
14186	}
14187	return iter.page.Values()[iter.i]
14188}
14189
14190// Creates a new instance of the ListHubVirtualNetworkConnectionsResultIterator type.
14191func NewListHubVirtualNetworkConnectionsResultIterator(page ListHubVirtualNetworkConnectionsResultPage) ListHubVirtualNetworkConnectionsResultIterator {
14192	return ListHubVirtualNetworkConnectionsResultIterator{page: page}
14193}
14194
14195// IsEmpty returns true if the ListResult contains no values.
14196func (lhvncr ListHubVirtualNetworkConnectionsResult) IsEmpty() bool {
14197	return lhvncr.Value == nil || len(*lhvncr.Value) == 0
14198}
14199
14200// hasNextLink returns true if the NextLink is not empty.
14201func (lhvncr ListHubVirtualNetworkConnectionsResult) hasNextLink() bool {
14202	return lhvncr.NextLink != nil && len(*lhvncr.NextLink) != 0
14203}
14204
14205// listHubVirtualNetworkConnectionsResultPreparer prepares a request to retrieve the next set of results.
14206// It returns nil if no more results exist.
14207func (lhvncr ListHubVirtualNetworkConnectionsResult) listHubVirtualNetworkConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
14208	if !lhvncr.hasNextLink() {
14209		return nil, nil
14210	}
14211	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14212		autorest.AsJSON(),
14213		autorest.AsGet(),
14214		autorest.WithBaseURL(to.String(lhvncr.NextLink)))
14215}
14216
14217// ListHubVirtualNetworkConnectionsResultPage contains a page of HubVirtualNetworkConnection values.
14218type ListHubVirtualNetworkConnectionsResultPage struct {
14219	fn     func(context.Context, ListHubVirtualNetworkConnectionsResult) (ListHubVirtualNetworkConnectionsResult, error)
14220	lhvncr ListHubVirtualNetworkConnectionsResult
14221}
14222
14223// NextWithContext advances to the next page of values.  If there was an error making
14224// the request the page does not advance and the error is returned.
14225func (page *ListHubVirtualNetworkConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
14226	if tracing.IsEnabled() {
14227		ctx = tracing.StartSpan(ctx, fqdn+"/ListHubVirtualNetworkConnectionsResultPage.NextWithContext")
14228		defer func() {
14229			sc := -1
14230			if page.Response().Response.Response != nil {
14231				sc = page.Response().Response.Response.StatusCode
14232			}
14233			tracing.EndSpan(ctx, sc, err)
14234		}()
14235	}
14236	for {
14237		next, err := page.fn(ctx, page.lhvncr)
14238		if err != nil {
14239			return err
14240		}
14241		page.lhvncr = next
14242		if !next.hasNextLink() || !next.IsEmpty() {
14243			break
14244		}
14245	}
14246	return nil
14247}
14248
14249// Next advances to the next page of values.  If there was an error making
14250// the request the page does not advance and the error is returned.
14251// Deprecated: Use NextWithContext() instead.
14252func (page *ListHubVirtualNetworkConnectionsResultPage) Next() error {
14253	return page.NextWithContext(context.Background())
14254}
14255
14256// NotDone returns true if the page enumeration should be started or is not yet complete.
14257func (page ListHubVirtualNetworkConnectionsResultPage) NotDone() bool {
14258	return !page.lhvncr.IsEmpty()
14259}
14260
14261// Response returns the raw server response from the last page request.
14262func (page ListHubVirtualNetworkConnectionsResultPage) Response() ListHubVirtualNetworkConnectionsResult {
14263	return page.lhvncr
14264}
14265
14266// Values returns the slice of values for the current page or nil if there are no values.
14267func (page ListHubVirtualNetworkConnectionsResultPage) Values() []HubVirtualNetworkConnection {
14268	if page.lhvncr.IsEmpty() {
14269		return nil
14270	}
14271	return *page.lhvncr.Value
14272}
14273
14274// Creates a new instance of the ListHubVirtualNetworkConnectionsResultPage type.
14275func NewListHubVirtualNetworkConnectionsResultPage(cur ListHubVirtualNetworkConnectionsResult, getNextPage func(context.Context, ListHubVirtualNetworkConnectionsResult) (ListHubVirtualNetworkConnectionsResult, error)) ListHubVirtualNetworkConnectionsResultPage {
14276	return ListHubVirtualNetworkConnectionsResultPage{
14277		fn:     getNextPage,
14278		lhvncr: cur,
14279	}
14280}
14281
14282// ListP2SVpnGatewaysResult result of the request to list P2SVpnGateways. It contains a list of
14283// P2SVpnGateways and a URL nextLink to get the next set of results.
14284type ListP2SVpnGatewaysResult struct {
14285	autorest.Response `json:"-"`
14286	// Value - List of P2SVpnGateways.
14287	Value *[]P2SVpnGateway `json:"value,omitempty"`
14288	// NextLink - URL to get the next set of operation list results if there are any.
14289	NextLink *string `json:"nextLink,omitempty"`
14290}
14291
14292// ListP2SVpnGatewaysResultIterator provides access to a complete listing of P2SVpnGateway values.
14293type ListP2SVpnGatewaysResultIterator struct {
14294	i    int
14295	page ListP2SVpnGatewaysResultPage
14296}
14297
14298// NextWithContext advances to the next value.  If there was an error making
14299// the request the iterator does not advance and the error is returned.
14300func (iter *ListP2SVpnGatewaysResultIterator) NextWithContext(ctx context.Context) (err error) {
14301	if tracing.IsEnabled() {
14302		ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnGatewaysResultIterator.NextWithContext")
14303		defer func() {
14304			sc := -1
14305			if iter.Response().Response.Response != nil {
14306				sc = iter.Response().Response.Response.StatusCode
14307			}
14308			tracing.EndSpan(ctx, sc, err)
14309		}()
14310	}
14311	iter.i++
14312	if iter.i < len(iter.page.Values()) {
14313		return nil
14314	}
14315	err = iter.page.NextWithContext(ctx)
14316	if err != nil {
14317		iter.i--
14318		return err
14319	}
14320	iter.i = 0
14321	return nil
14322}
14323
14324// Next advances to the next value.  If there was an error making
14325// the request the iterator does not advance and the error is returned.
14326// Deprecated: Use NextWithContext() instead.
14327func (iter *ListP2SVpnGatewaysResultIterator) Next() error {
14328	return iter.NextWithContext(context.Background())
14329}
14330
14331// NotDone returns true if the enumeration should be started or is not yet complete.
14332func (iter ListP2SVpnGatewaysResultIterator) NotDone() bool {
14333	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14334}
14335
14336// Response returns the raw server response from the last page request.
14337func (iter ListP2SVpnGatewaysResultIterator) Response() ListP2SVpnGatewaysResult {
14338	return iter.page.Response()
14339}
14340
14341// Value returns the current value or a zero-initialized value if the
14342// iterator has advanced beyond the end of the collection.
14343func (iter ListP2SVpnGatewaysResultIterator) Value() P2SVpnGateway {
14344	if !iter.page.NotDone() {
14345		return P2SVpnGateway{}
14346	}
14347	return iter.page.Values()[iter.i]
14348}
14349
14350// Creates a new instance of the ListP2SVpnGatewaysResultIterator type.
14351func NewListP2SVpnGatewaysResultIterator(page ListP2SVpnGatewaysResultPage) ListP2SVpnGatewaysResultIterator {
14352	return ListP2SVpnGatewaysResultIterator{page: page}
14353}
14354
14355// IsEmpty returns true if the ListResult contains no values.
14356func (lpvgr ListP2SVpnGatewaysResult) IsEmpty() bool {
14357	return lpvgr.Value == nil || len(*lpvgr.Value) == 0
14358}
14359
14360// hasNextLink returns true if the NextLink is not empty.
14361func (lpvgr ListP2SVpnGatewaysResult) hasNextLink() bool {
14362	return lpvgr.NextLink != nil && len(*lpvgr.NextLink) != 0
14363}
14364
14365// listP2SVpnGatewaysResultPreparer prepares a request to retrieve the next set of results.
14366// It returns nil if no more results exist.
14367func (lpvgr ListP2SVpnGatewaysResult) listP2SVpnGatewaysResultPreparer(ctx context.Context) (*http.Request, error) {
14368	if !lpvgr.hasNextLink() {
14369		return nil, nil
14370	}
14371	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14372		autorest.AsJSON(),
14373		autorest.AsGet(),
14374		autorest.WithBaseURL(to.String(lpvgr.NextLink)))
14375}
14376
14377// ListP2SVpnGatewaysResultPage contains a page of P2SVpnGateway values.
14378type ListP2SVpnGatewaysResultPage struct {
14379	fn    func(context.Context, ListP2SVpnGatewaysResult) (ListP2SVpnGatewaysResult, error)
14380	lpvgr ListP2SVpnGatewaysResult
14381}
14382
14383// NextWithContext advances to the next page of values.  If there was an error making
14384// the request the page does not advance and the error is returned.
14385func (page *ListP2SVpnGatewaysResultPage) NextWithContext(ctx context.Context) (err error) {
14386	if tracing.IsEnabled() {
14387		ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnGatewaysResultPage.NextWithContext")
14388		defer func() {
14389			sc := -1
14390			if page.Response().Response.Response != nil {
14391				sc = page.Response().Response.Response.StatusCode
14392			}
14393			tracing.EndSpan(ctx, sc, err)
14394		}()
14395	}
14396	for {
14397		next, err := page.fn(ctx, page.lpvgr)
14398		if err != nil {
14399			return err
14400		}
14401		page.lpvgr = next
14402		if !next.hasNextLink() || !next.IsEmpty() {
14403			break
14404		}
14405	}
14406	return nil
14407}
14408
14409// Next advances to the next page of values.  If there was an error making
14410// the request the page does not advance and the error is returned.
14411// Deprecated: Use NextWithContext() instead.
14412func (page *ListP2SVpnGatewaysResultPage) Next() error {
14413	return page.NextWithContext(context.Background())
14414}
14415
14416// NotDone returns true if the page enumeration should be started or is not yet complete.
14417func (page ListP2SVpnGatewaysResultPage) NotDone() bool {
14418	return !page.lpvgr.IsEmpty()
14419}
14420
14421// Response returns the raw server response from the last page request.
14422func (page ListP2SVpnGatewaysResultPage) Response() ListP2SVpnGatewaysResult {
14423	return page.lpvgr
14424}
14425
14426// Values returns the slice of values for the current page or nil if there are no values.
14427func (page ListP2SVpnGatewaysResultPage) Values() []P2SVpnGateway {
14428	if page.lpvgr.IsEmpty() {
14429		return nil
14430	}
14431	return *page.lpvgr.Value
14432}
14433
14434// Creates a new instance of the ListP2SVpnGatewaysResultPage type.
14435func NewListP2SVpnGatewaysResultPage(cur ListP2SVpnGatewaysResult, getNextPage func(context.Context, ListP2SVpnGatewaysResult) (ListP2SVpnGatewaysResult, error)) ListP2SVpnGatewaysResultPage {
14436	return ListP2SVpnGatewaysResultPage{
14437		fn:    getNextPage,
14438		lpvgr: cur,
14439	}
14440}
14441
14442// ListP2SVpnServerConfigurationsResult result of the request to list all P2SVpnServerConfigurations
14443// associated to a VirtualWan. It contains a list of P2SVpnServerConfigurations and a URL nextLink to get
14444// the next set of results.
14445type ListP2SVpnServerConfigurationsResult struct {
14446	autorest.Response `json:"-"`
14447	// Value - List of P2SVpnServerConfigurations.
14448	Value *[]P2SVpnServerConfiguration `json:"value,omitempty"`
14449	// NextLink - URL to get the next set of operation list results if there are any.
14450	NextLink *string `json:"nextLink,omitempty"`
14451}
14452
14453// ListP2SVpnServerConfigurationsResultIterator provides access to a complete listing of
14454// P2SVpnServerConfiguration values.
14455type ListP2SVpnServerConfigurationsResultIterator struct {
14456	i    int
14457	page ListP2SVpnServerConfigurationsResultPage
14458}
14459
14460// NextWithContext advances to the next value.  If there was an error making
14461// the request the iterator does not advance and the error is returned.
14462func (iter *ListP2SVpnServerConfigurationsResultIterator) NextWithContext(ctx context.Context) (err error) {
14463	if tracing.IsEnabled() {
14464		ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnServerConfigurationsResultIterator.NextWithContext")
14465		defer func() {
14466			sc := -1
14467			if iter.Response().Response.Response != nil {
14468				sc = iter.Response().Response.Response.StatusCode
14469			}
14470			tracing.EndSpan(ctx, sc, err)
14471		}()
14472	}
14473	iter.i++
14474	if iter.i < len(iter.page.Values()) {
14475		return nil
14476	}
14477	err = iter.page.NextWithContext(ctx)
14478	if err != nil {
14479		iter.i--
14480		return err
14481	}
14482	iter.i = 0
14483	return nil
14484}
14485
14486// Next advances to the next value.  If there was an error making
14487// the request the iterator does not advance and the error is returned.
14488// Deprecated: Use NextWithContext() instead.
14489func (iter *ListP2SVpnServerConfigurationsResultIterator) Next() error {
14490	return iter.NextWithContext(context.Background())
14491}
14492
14493// NotDone returns true if the enumeration should be started or is not yet complete.
14494func (iter ListP2SVpnServerConfigurationsResultIterator) NotDone() bool {
14495	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14496}
14497
14498// Response returns the raw server response from the last page request.
14499func (iter ListP2SVpnServerConfigurationsResultIterator) Response() ListP2SVpnServerConfigurationsResult {
14500	return iter.page.Response()
14501}
14502
14503// Value returns the current value or a zero-initialized value if the
14504// iterator has advanced beyond the end of the collection.
14505func (iter ListP2SVpnServerConfigurationsResultIterator) Value() P2SVpnServerConfiguration {
14506	if !iter.page.NotDone() {
14507		return P2SVpnServerConfiguration{}
14508	}
14509	return iter.page.Values()[iter.i]
14510}
14511
14512// Creates a new instance of the ListP2SVpnServerConfigurationsResultIterator type.
14513func NewListP2SVpnServerConfigurationsResultIterator(page ListP2SVpnServerConfigurationsResultPage) ListP2SVpnServerConfigurationsResultIterator {
14514	return ListP2SVpnServerConfigurationsResultIterator{page: page}
14515}
14516
14517// IsEmpty returns true if the ListResult contains no values.
14518func (lpvscr ListP2SVpnServerConfigurationsResult) IsEmpty() bool {
14519	return lpvscr.Value == nil || len(*lpvscr.Value) == 0
14520}
14521
14522// hasNextLink returns true if the NextLink is not empty.
14523func (lpvscr ListP2SVpnServerConfigurationsResult) hasNextLink() bool {
14524	return lpvscr.NextLink != nil && len(*lpvscr.NextLink) != 0
14525}
14526
14527// listP2SVpnServerConfigurationsResultPreparer prepares a request to retrieve the next set of results.
14528// It returns nil if no more results exist.
14529func (lpvscr ListP2SVpnServerConfigurationsResult) listP2SVpnServerConfigurationsResultPreparer(ctx context.Context) (*http.Request, error) {
14530	if !lpvscr.hasNextLink() {
14531		return nil, nil
14532	}
14533	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14534		autorest.AsJSON(),
14535		autorest.AsGet(),
14536		autorest.WithBaseURL(to.String(lpvscr.NextLink)))
14537}
14538
14539// ListP2SVpnServerConfigurationsResultPage contains a page of P2SVpnServerConfiguration values.
14540type ListP2SVpnServerConfigurationsResultPage struct {
14541	fn     func(context.Context, ListP2SVpnServerConfigurationsResult) (ListP2SVpnServerConfigurationsResult, error)
14542	lpvscr ListP2SVpnServerConfigurationsResult
14543}
14544
14545// NextWithContext advances to the next page of values.  If there was an error making
14546// the request the page does not advance and the error is returned.
14547func (page *ListP2SVpnServerConfigurationsResultPage) NextWithContext(ctx context.Context) (err error) {
14548	if tracing.IsEnabled() {
14549		ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnServerConfigurationsResultPage.NextWithContext")
14550		defer func() {
14551			sc := -1
14552			if page.Response().Response.Response != nil {
14553				sc = page.Response().Response.Response.StatusCode
14554			}
14555			tracing.EndSpan(ctx, sc, err)
14556		}()
14557	}
14558	for {
14559		next, err := page.fn(ctx, page.lpvscr)
14560		if err != nil {
14561			return err
14562		}
14563		page.lpvscr = next
14564		if !next.hasNextLink() || !next.IsEmpty() {
14565			break
14566		}
14567	}
14568	return nil
14569}
14570
14571// Next advances to the next page of values.  If there was an error making
14572// the request the page does not advance and the error is returned.
14573// Deprecated: Use NextWithContext() instead.
14574func (page *ListP2SVpnServerConfigurationsResultPage) Next() error {
14575	return page.NextWithContext(context.Background())
14576}
14577
14578// NotDone returns true if the page enumeration should be started or is not yet complete.
14579func (page ListP2SVpnServerConfigurationsResultPage) NotDone() bool {
14580	return !page.lpvscr.IsEmpty()
14581}
14582
14583// Response returns the raw server response from the last page request.
14584func (page ListP2SVpnServerConfigurationsResultPage) Response() ListP2SVpnServerConfigurationsResult {
14585	return page.lpvscr
14586}
14587
14588// Values returns the slice of values for the current page or nil if there are no values.
14589func (page ListP2SVpnServerConfigurationsResultPage) Values() []P2SVpnServerConfiguration {
14590	if page.lpvscr.IsEmpty() {
14591		return nil
14592	}
14593	return *page.lpvscr.Value
14594}
14595
14596// Creates a new instance of the ListP2SVpnServerConfigurationsResultPage type.
14597func NewListP2SVpnServerConfigurationsResultPage(cur ListP2SVpnServerConfigurationsResult, getNextPage func(context.Context, ListP2SVpnServerConfigurationsResult) (ListP2SVpnServerConfigurationsResult, error)) ListP2SVpnServerConfigurationsResultPage {
14598	return ListP2SVpnServerConfigurationsResultPage{
14599		fn:     getNextPage,
14600		lpvscr: cur,
14601	}
14602}
14603
14604// ListVirtualHubsResult result of the request to list VirtualHubs. It contains a list of VirtualHubs and a
14605// URL nextLink to get the next set of results.
14606type ListVirtualHubsResult struct {
14607	autorest.Response `json:"-"`
14608	// Value - List of VirtualHubs.
14609	Value *[]VirtualHub `json:"value,omitempty"`
14610	// NextLink - URL to get the next set of operation list results if there are any.
14611	NextLink *string `json:"nextLink,omitempty"`
14612}
14613
14614// ListVirtualHubsResultIterator provides access to a complete listing of VirtualHub values.
14615type ListVirtualHubsResultIterator struct {
14616	i    int
14617	page ListVirtualHubsResultPage
14618}
14619
14620// NextWithContext advances to the next value.  If there was an error making
14621// the request the iterator does not advance and the error is returned.
14622func (iter *ListVirtualHubsResultIterator) NextWithContext(ctx context.Context) (err error) {
14623	if tracing.IsEnabled() {
14624		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubsResultIterator.NextWithContext")
14625		defer func() {
14626			sc := -1
14627			if iter.Response().Response.Response != nil {
14628				sc = iter.Response().Response.Response.StatusCode
14629			}
14630			tracing.EndSpan(ctx, sc, err)
14631		}()
14632	}
14633	iter.i++
14634	if iter.i < len(iter.page.Values()) {
14635		return nil
14636	}
14637	err = iter.page.NextWithContext(ctx)
14638	if err != nil {
14639		iter.i--
14640		return err
14641	}
14642	iter.i = 0
14643	return nil
14644}
14645
14646// Next advances to the next value.  If there was an error making
14647// the request the iterator does not advance and the error is returned.
14648// Deprecated: Use NextWithContext() instead.
14649func (iter *ListVirtualHubsResultIterator) Next() error {
14650	return iter.NextWithContext(context.Background())
14651}
14652
14653// NotDone returns true if the enumeration should be started or is not yet complete.
14654func (iter ListVirtualHubsResultIterator) NotDone() bool {
14655	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14656}
14657
14658// Response returns the raw server response from the last page request.
14659func (iter ListVirtualHubsResultIterator) Response() ListVirtualHubsResult {
14660	return iter.page.Response()
14661}
14662
14663// Value returns the current value or a zero-initialized value if the
14664// iterator has advanced beyond the end of the collection.
14665func (iter ListVirtualHubsResultIterator) Value() VirtualHub {
14666	if !iter.page.NotDone() {
14667		return VirtualHub{}
14668	}
14669	return iter.page.Values()[iter.i]
14670}
14671
14672// Creates a new instance of the ListVirtualHubsResultIterator type.
14673func NewListVirtualHubsResultIterator(page ListVirtualHubsResultPage) ListVirtualHubsResultIterator {
14674	return ListVirtualHubsResultIterator{page: page}
14675}
14676
14677// IsEmpty returns true if the ListResult contains no values.
14678func (lvhr ListVirtualHubsResult) IsEmpty() bool {
14679	return lvhr.Value == nil || len(*lvhr.Value) == 0
14680}
14681
14682// hasNextLink returns true if the NextLink is not empty.
14683func (lvhr ListVirtualHubsResult) hasNextLink() bool {
14684	return lvhr.NextLink != nil && len(*lvhr.NextLink) != 0
14685}
14686
14687// listVirtualHubsResultPreparer prepares a request to retrieve the next set of results.
14688// It returns nil if no more results exist.
14689func (lvhr ListVirtualHubsResult) listVirtualHubsResultPreparer(ctx context.Context) (*http.Request, error) {
14690	if !lvhr.hasNextLink() {
14691		return nil, nil
14692	}
14693	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14694		autorest.AsJSON(),
14695		autorest.AsGet(),
14696		autorest.WithBaseURL(to.String(lvhr.NextLink)))
14697}
14698
14699// ListVirtualHubsResultPage contains a page of VirtualHub values.
14700type ListVirtualHubsResultPage struct {
14701	fn   func(context.Context, ListVirtualHubsResult) (ListVirtualHubsResult, error)
14702	lvhr ListVirtualHubsResult
14703}
14704
14705// NextWithContext advances to the next page of values.  If there was an error making
14706// the request the page does not advance and the error is returned.
14707func (page *ListVirtualHubsResultPage) NextWithContext(ctx context.Context) (err error) {
14708	if tracing.IsEnabled() {
14709		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubsResultPage.NextWithContext")
14710		defer func() {
14711			sc := -1
14712			if page.Response().Response.Response != nil {
14713				sc = page.Response().Response.Response.StatusCode
14714			}
14715			tracing.EndSpan(ctx, sc, err)
14716		}()
14717	}
14718	for {
14719		next, err := page.fn(ctx, page.lvhr)
14720		if err != nil {
14721			return err
14722		}
14723		page.lvhr = next
14724		if !next.hasNextLink() || !next.IsEmpty() {
14725			break
14726		}
14727	}
14728	return nil
14729}
14730
14731// Next advances to the next page of values.  If there was an error making
14732// the request the page does not advance and the error is returned.
14733// Deprecated: Use NextWithContext() instead.
14734func (page *ListVirtualHubsResultPage) Next() error {
14735	return page.NextWithContext(context.Background())
14736}
14737
14738// NotDone returns true if the page enumeration should be started or is not yet complete.
14739func (page ListVirtualHubsResultPage) NotDone() bool {
14740	return !page.lvhr.IsEmpty()
14741}
14742
14743// Response returns the raw server response from the last page request.
14744func (page ListVirtualHubsResultPage) Response() ListVirtualHubsResult {
14745	return page.lvhr
14746}
14747
14748// Values returns the slice of values for the current page or nil if there are no values.
14749func (page ListVirtualHubsResultPage) Values() []VirtualHub {
14750	if page.lvhr.IsEmpty() {
14751		return nil
14752	}
14753	return *page.lvhr.Value
14754}
14755
14756// Creates a new instance of the ListVirtualHubsResultPage type.
14757func NewListVirtualHubsResultPage(cur ListVirtualHubsResult, getNextPage func(context.Context, ListVirtualHubsResult) (ListVirtualHubsResult, error)) ListVirtualHubsResultPage {
14758	return ListVirtualHubsResultPage{
14759		fn:   getNextPage,
14760		lvhr: cur,
14761	}
14762}
14763
14764// ListVirtualWANsResult result of the request to list VirtualWANs. It contains a list of VirtualWANs and a
14765// URL nextLink to get the next set of results.
14766type ListVirtualWANsResult struct {
14767	autorest.Response `json:"-"`
14768	// Value - List of VirtualWANs.
14769	Value *[]VirtualWAN `json:"value,omitempty"`
14770	// NextLink - URL to get the next set of operation list results if there are any.
14771	NextLink *string `json:"nextLink,omitempty"`
14772}
14773
14774// ListVirtualWANsResultIterator provides access to a complete listing of VirtualWAN values.
14775type ListVirtualWANsResultIterator struct {
14776	i    int
14777	page ListVirtualWANsResultPage
14778}
14779
14780// NextWithContext advances to the next value.  If there was an error making
14781// the request the iterator does not advance and the error is returned.
14782func (iter *ListVirtualWANsResultIterator) NextWithContext(ctx context.Context) (err error) {
14783	if tracing.IsEnabled() {
14784		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualWANsResultIterator.NextWithContext")
14785		defer func() {
14786			sc := -1
14787			if iter.Response().Response.Response != nil {
14788				sc = iter.Response().Response.Response.StatusCode
14789			}
14790			tracing.EndSpan(ctx, sc, err)
14791		}()
14792	}
14793	iter.i++
14794	if iter.i < len(iter.page.Values()) {
14795		return nil
14796	}
14797	err = iter.page.NextWithContext(ctx)
14798	if err != nil {
14799		iter.i--
14800		return err
14801	}
14802	iter.i = 0
14803	return nil
14804}
14805
14806// Next advances to the next value.  If there was an error making
14807// the request the iterator does not advance and the error is returned.
14808// Deprecated: Use NextWithContext() instead.
14809func (iter *ListVirtualWANsResultIterator) Next() error {
14810	return iter.NextWithContext(context.Background())
14811}
14812
14813// NotDone returns true if the enumeration should be started or is not yet complete.
14814func (iter ListVirtualWANsResultIterator) NotDone() bool {
14815	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14816}
14817
14818// Response returns the raw server response from the last page request.
14819func (iter ListVirtualWANsResultIterator) Response() ListVirtualWANsResult {
14820	return iter.page.Response()
14821}
14822
14823// Value returns the current value or a zero-initialized value if the
14824// iterator has advanced beyond the end of the collection.
14825func (iter ListVirtualWANsResultIterator) Value() VirtualWAN {
14826	if !iter.page.NotDone() {
14827		return VirtualWAN{}
14828	}
14829	return iter.page.Values()[iter.i]
14830}
14831
14832// Creates a new instance of the ListVirtualWANsResultIterator type.
14833func NewListVirtualWANsResultIterator(page ListVirtualWANsResultPage) ListVirtualWANsResultIterator {
14834	return ListVirtualWANsResultIterator{page: page}
14835}
14836
14837// IsEmpty returns true if the ListResult contains no values.
14838func (lvwnr ListVirtualWANsResult) IsEmpty() bool {
14839	return lvwnr.Value == nil || len(*lvwnr.Value) == 0
14840}
14841
14842// hasNextLink returns true if the NextLink is not empty.
14843func (lvwnr ListVirtualWANsResult) hasNextLink() bool {
14844	return lvwnr.NextLink != nil && len(*lvwnr.NextLink) != 0
14845}
14846
14847// listVirtualWANsResultPreparer prepares a request to retrieve the next set of results.
14848// It returns nil if no more results exist.
14849func (lvwnr ListVirtualWANsResult) listVirtualWANsResultPreparer(ctx context.Context) (*http.Request, error) {
14850	if !lvwnr.hasNextLink() {
14851		return nil, nil
14852	}
14853	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14854		autorest.AsJSON(),
14855		autorest.AsGet(),
14856		autorest.WithBaseURL(to.String(lvwnr.NextLink)))
14857}
14858
14859// ListVirtualWANsResultPage contains a page of VirtualWAN values.
14860type ListVirtualWANsResultPage struct {
14861	fn    func(context.Context, ListVirtualWANsResult) (ListVirtualWANsResult, error)
14862	lvwnr ListVirtualWANsResult
14863}
14864
14865// NextWithContext advances to the next page of values.  If there was an error making
14866// the request the page does not advance and the error is returned.
14867func (page *ListVirtualWANsResultPage) NextWithContext(ctx context.Context) (err error) {
14868	if tracing.IsEnabled() {
14869		ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualWANsResultPage.NextWithContext")
14870		defer func() {
14871			sc := -1
14872			if page.Response().Response.Response != nil {
14873				sc = page.Response().Response.Response.StatusCode
14874			}
14875			tracing.EndSpan(ctx, sc, err)
14876		}()
14877	}
14878	for {
14879		next, err := page.fn(ctx, page.lvwnr)
14880		if err != nil {
14881			return err
14882		}
14883		page.lvwnr = next
14884		if !next.hasNextLink() || !next.IsEmpty() {
14885			break
14886		}
14887	}
14888	return nil
14889}
14890
14891// Next advances to the next page of values.  If there was an error making
14892// the request the page does not advance and the error is returned.
14893// Deprecated: Use NextWithContext() instead.
14894func (page *ListVirtualWANsResultPage) Next() error {
14895	return page.NextWithContext(context.Background())
14896}
14897
14898// NotDone returns true if the page enumeration should be started or is not yet complete.
14899func (page ListVirtualWANsResultPage) NotDone() bool {
14900	return !page.lvwnr.IsEmpty()
14901}
14902
14903// Response returns the raw server response from the last page request.
14904func (page ListVirtualWANsResultPage) Response() ListVirtualWANsResult {
14905	return page.lvwnr
14906}
14907
14908// Values returns the slice of values for the current page or nil if there are no values.
14909func (page ListVirtualWANsResultPage) Values() []VirtualWAN {
14910	if page.lvwnr.IsEmpty() {
14911		return nil
14912	}
14913	return *page.lvwnr.Value
14914}
14915
14916// Creates a new instance of the ListVirtualWANsResultPage type.
14917func NewListVirtualWANsResultPage(cur ListVirtualWANsResult, getNextPage func(context.Context, ListVirtualWANsResult) (ListVirtualWANsResult, error)) ListVirtualWANsResultPage {
14918	return ListVirtualWANsResultPage{
14919		fn:    getNextPage,
14920		lvwnr: cur,
14921	}
14922}
14923
14924// ListVpnConnectionsResult result of the request to list all vpn connections to a virtual wan vpn gateway.
14925// It contains a list of Vpn Connections and a URL nextLink to get the next set of results.
14926type ListVpnConnectionsResult struct {
14927	autorest.Response `json:"-"`
14928	// Value - List of Vpn Connections.
14929	Value *[]VpnConnection `json:"value,omitempty"`
14930	// NextLink - URL to get the next set of operation list results if there are any.
14931	NextLink *string `json:"nextLink,omitempty"`
14932}
14933
14934// ListVpnConnectionsResultIterator provides access to a complete listing of VpnConnection values.
14935type ListVpnConnectionsResultIterator struct {
14936	i    int
14937	page ListVpnConnectionsResultPage
14938}
14939
14940// NextWithContext advances to the next value.  If there was an error making
14941// the request the iterator does not advance and the error is returned.
14942func (iter *ListVpnConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
14943	if tracing.IsEnabled() {
14944		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnConnectionsResultIterator.NextWithContext")
14945		defer func() {
14946			sc := -1
14947			if iter.Response().Response.Response != nil {
14948				sc = iter.Response().Response.Response.StatusCode
14949			}
14950			tracing.EndSpan(ctx, sc, err)
14951		}()
14952	}
14953	iter.i++
14954	if iter.i < len(iter.page.Values()) {
14955		return nil
14956	}
14957	err = iter.page.NextWithContext(ctx)
14958	if err != nil {
14959		iter.i--
14960		return err
14961	}
14962	iter.i = 0
14963	return nil
14964}
14965
14966// Next advances to the next value.  If there was an error making
14967// the request the iterator does not advance and the error is returned.
14968// Deprecated: Use NextWithContext() instead.
14969func (iter *ListVpnConnectionsResultIterator) Next() error {
14970	return iter.NextWithContext(context.Background())
14971}
14972
14973// NotDone returns true if the enumeration should be started or is not yet complete.
14974func (iter ListVpnConnectionsResultIterator) NotDone() bool {
14975	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14976}
14977
14978// Response returns the raw server response from the last page request.
14979func (iter ListVpnConnectionsResultIterator) Response() ListVpnConnectionsResult {
14980	return iter.page.Response()
14981}
14982
14983// Value returns the current value or a zero-initialized value if the
14984// iterator has advanced beyond the end of the collection.
14985func (iter ListVpnConnectionsResultIterator) Value() VpnConnection {
14986	if !iter.page.NotDone() {
14987		return VpnConnection{}
14988	}
14989	return iter.page.Values()[iter.i]
14990}
14991
14992// Creates a new instance of the ListVpnConnectionsResultIterator type.
14993func NewListVpnConnectionsResultIterator(page ListVpnConnectionsResultPage) ListVpnConnectionsResultIterator {
14994	return ListVpnConnectionsResultIterator{page: page}
14995}
14996
14997// IsEmpty returns true if the ListResult contains no values.
14998func (lvcr ListVpnConnectionsResult) IsEmpty() bool {
14999	return lvcr.Value == nil || len(*lvcr.Value) == 0
15000}
15001
15002// hasNextLink returns true if the NextLink is not empty.
15003func (lvcr ListVpnConnectionsResult) hasNextLink() bool {
15004	return lvcr.NextLink != nil && len(*lvcr.NextLink) != 0
15005}
15006
15007// listVpnConnectionsResultPreparer prepares a request to retrieve the next set of results.
15008// It returns nil if no more results exist.
15009func (lvcr ListVpnConnectionsResult) listVpnConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
15010	if !lvcr.hasNextLink() {
15011		return nil, nil
15012	}
15013	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15014		autorest.AsJSON(),
15015		autorest.AsGet(),
15016		autorest.WithBaseURL(to.String(lvcr.NextLink)))
15017}
15018
15019// ListVpnConnectionsResultPage contains a page of VpnConnection values.
15020type ListVpnConnectionsResultPage struct {
15021	fn   func(context.Context, ListVpnConnectionsResult) (ListVpnConnectionsResult, error)
15022	lvcr ListVpnConnectionsResult
15023}
15024
15025// NextWithContext advances to the next page of values.  If there was an error making
15026// the request the page does not advance and the error is returned.
15027func (page *ListVpnConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
15028	if tracing.IsEnabled() {
15029		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnConnectionsResultPage.NextWithContext")
15030		defer func() {
15031			sc := -1
15032			if page.Response().Response.Response != nil {
15033				sc = page.Response().Response.Response.StatusCode
15034			}
15035			tracing.EndSpan(ctx, sc, err)
15036		}()
15037	}
15038	for {
15039		next, err := page.fn(ctx, page.lvcr)
15040		if err != nil {
15041			return err
15042		}
15043		page.lvcr = next
15044		if !next.hasNextLink() || !next.IsEmpty() {
15045			break
15046		}
15047	}
15048	return nil
15049}
15050
15051// Next advances to the next page of values.  If there was an error making
15052// the request the page does not advance and the error is returned.
15053// Deprecated: Use NextWithContext() instead.
15054func (page *ListVpnConnectionsResultPage) Next() error {
15055	return page.NextWithContext(context.Background())
15056}
15057
15058// NotDone returns true if the page enumeration should be started or is not yet complete.
15059func (page ListVpnConnectionsResultPage) NotDone() bool {
15060	return !page.lvcr.IsEmpty()
15061}
15062
15063// Response returns the raw server response from the last page request.
15064func (page ListVpnConnectionsResultPage) Response() ListVpnConnectionsResult {
15065	return page.lvcr
15066}
15067
15068// Values returns the slice of values for the current page or nil if there are no values.
15069func (page ListVpnConnectionsResultPage) Values() []VpnConnection {
15070	if page.lvcr.IsEmpty() {
15071		return nil
15072	}
15073	return *page.lvcr.Value
15074}
15075
15076// Creates a new instance of the ListVpnConnectionsResultPage type.
15077func NewListVpnConnectionsResultPage(cur ListVpnConnectionsResult, getNextPage func(context.Context, ListVpnConnectionsResult) (ListVpnConnectionsResult, error)) ListVpnConnectionsResultPage {
15078	return ListVpnConnectionsResultPage{
15079		fn:   getNextPage,
15080		lvcr: cur,
15081	}
15082}
15083
15084// ListVpnGatewaysResult result of the request to list VpnGateways. It contains a list of VpnGateways and a
15085// URL nextLink to get the next set of results.
15086type ListVpnGatewaysResult struct {
15087	autorest.Response `json:"-"`
15088	// Value - List of VpnGateways.
15089	Value *[]VpnGateway `json:"value,omitempty"`
15090	// NextLink - URL to get the next set of operation list results if there are any.
15091	NextLink *string `json:"nextLink,omitempty"`
15092}
15093
15094// ListVpnGatewaysResultIterator provides access to a complete listing of VpnGateway values.
15095type ListVpnGatewaysResultIterator struct {
15096	i    int
15097	page ListVpnGatewaysResultPage
15098}
15099
15100// NextWithContext advances to the next value.  If there was an error making
15101// the request the iterator does not advance and the error is returned.
15102func (iter *ListVpnGatewaysResultIterator) NextWithContext(ctx context.Context) (err error) {
15103	if tracing.IsEnabled() {
15104		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnGatewaysResultIterator.NextWithContext")
15105		defer func() {
15106			sc := -1
15107			if iter.Response().Response.Response != nil {
15108				sc = iter.Response().Response.Response.StatusCode
15109			}
15110			tracing.EndSpan(ctx, sc, err)
15111		}()
15112	}
15113	iter.i++
15114	if iter.i < len(iter.page.Values()) {
15115		return nil
15116	}
15117	err = iter.page.NextWithContext(ctx)
15118	if err != nil {
15119		iter.i--
15120		return err
15121	}
15122	iter.i = 0
15123	return nil
15124}
15125
15126// Next advances to the next value.  If there was an error making
15127// the request the iterator does not advance and the error is returned.
15128// Deprecated: Use NextWithContext() instead.
15129func (iter *ListVpnGatewaysResultIterator) Next() error {
15130	return iter.NextWithContext(context.Background())
15131}
15132
15133// NotDone returns true if the enumeration should be started or is not yet complete.
15134func (iter ListVpnGatewaysResultIterator) NotDone() bool {
15135	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15136}
15137
15138// Response returns the raw server response from the last page request.
15139func (iter ListVpnGatewaysResultIterator) Response() ListVpnGatewaysResult {
15140	return iter.page.Response()
15141}
15142
15143// Value returns the current value or a zero-initialized value if the
15144// iterator has advanced beyond the end of the collection.
15145func (iter ListVpnGatewaysResultIterator) Value() VpnGateway {
15146	if !iter.page.NotDone() {
15147		return VpnGateway{}
15148	}
15149	return iter.page.Values()[iter.i]
15150}
15151
15152// Creates a new instance of the ListVpnGatewaysResultIterator type.
15153func NewListVpnGatewaysResultIterator(page ListVpnGatewaysResultPage) ListVpnGatewaysResultIterator {
15154	return ListVpnGatewaysResultIterator{page: page}
15155}
15156
15157// IsEmpty returns true if the ListResult contains no values.
15158func (lvgr ListVpnGatewaysResult) IsEmpty() bool {
15159	return lvgr.Value == nil || len(*lvgr.Value) == 0
15160}
15161
15162// hasNextLink returns true if the NextLink is not empty.
15163func (lvgr ListVpnGatewaysResult) hasNextLink() bool {
15164	return lvgr.NextLink != nil && len(*lvgr.NextLink) != 0
15165}
15166
15167// listVpnGatewaysResultPreparer prepares a request to retrieve the next set of results.
15168// It returns nil if no more results exist.
15169func (lvgr ListVpnGatewaysResult) listVpnGatewaysResultPreparer(ctx context.Context) (*http.Request, error) {
15170	if !lvgr.hasNextLink() {
15171		return nil, nil
15172	}
15173	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15174		autorest.AsJSON(),
15175		autorest.AsGet(),
15176		autorest.WithBaseURL(to.String(lvgr.NextLink)))
15177}
15178
15179// ListVpnGatewaysResultPage contains a page of VpnGateway values.
15180type ListVpnGatewaysResultPage struct {
15181	fn   func(context.Context, ListVpnGatewaysResult) (ListVpnGatewaysResult, error)
15182	lvgr ListVpnGatewaysResult
15183}
15184
15185// NextWithContext advances to the next page of values.  If there was an error making
15186// the request the page does not advance and the error is returned.
15187func (page *ListVpnGatewaysResultPage) NextWithContext(ctx context.Context) (err error) {
15188	if tracing.IsEnabled() {
15189		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnGatewaysResultPage.NextWithContext")
15190		defer func() {
15191			sc := -1
15192			if page.Response().Response.Response != nil {
15193				sc = page.Response().Response.Response.StatusCode
15194			}
15195			tracing.EndSpan(ctx, sc, err)
15196		}()
15197	}
15198	for {
15199		next, err := page.fn(ctx, page.lvgr)
15200		if err != nil {
15201			return err
15202		}
15203		page.lvgr = next
15204		if !next.hasNextLink() || !next.IsEmpty() {
15205			break
15206		}
15207	}
15208	return nil
15209}
15210
15211// Next advances to the next page of values.  If there was an error making
15212// the request the page does not advance and the error is returned.
15213// Deprecated: Use NextWithContext() instead.
15214func (page *ListVpnGatewaysResultPage) Next() error {
15215	return page.NextWithContext(context.Background())
15216}
15217
15218// NotDone returns true if the page enumeration should be started or is not yet complete.
15219func (page ListVpnGatewaysResultPage) NotDone() bool {
15220	return !page.lvgr.IsEmpty()
15221}
15222
15223// Response returns the raw server response from the last page request.
15224func (page ListVpnGatewaysResultPage) Response() ListVpnGatewaysResult {
15225	return page.lvgr
15226}
15227
15228// Values returns the slice of values for the current page or nil if there are no values.
15229func (page ListVpnGatewaysResultPage) Values() []VpnGateway {
15230	if page.lvgr.IsEmpty() {
15231		return nil
15232	}
15233	return *page.lvgr.Value
15234}
15235
15236// Creates a new instance of the ListVpnGatewaysResultPage type.
15237func NewListVpnGatewaysResultPage(cur ListVpnGatewaysResult, getNextPage func(context.Context, ListVpnGatewaysResult) (ListVpnGatewaysResult, error)) ListVpnGatewaysResultPage {
15238	return ListVpnGatewaysResultPage{
15239		fn:   getNextPage,
15240		lvgr: cur,
15241	}
15242}
15243
15244// ListVpnSitesResult result of the request to list VpnSites. It contains a list of VpnSites and a URL
15245// nextLink to get the next set of results.
15246type ListVpnSitesResult struct {
15247	autorest.Response `json:"-"`
15248	// Value - List of VpnSites.
15249	Value *[]VpnSite `json:"value,omitempty"`
15250	// NextLink - URL to get the next set of operation list results if there are any.
15251	NextLink *string `json:"nextLink,omitempty"`
15252}
15253
15254// ListVpnSitesResultIterator provides access to a complete listing of VpnSite values.
15255type ListVpnSitesResultIterator struct {
15256	i    int
15257	page ListVpnSitesResultPage
15258}
15259
15260// NextWithContext advances to the next value.  If there was an error making
15261// the request the iterator does not advance and the error is returned.
15262func (iter *ListVpnSitesResultIterator) NextWithContext(ctx context.Context) (err error) {
15263	if tracing.IsEnabled() {
15264		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSitesResultIterator.NextWithContext")
15265		defer func() {
15266			sc := -1
15267			if iter.Response().Response.Response != nil {
15268				sc = iter.Response().Response.Response.StatusCode
15269			}
15270			tracing.EndSpan(ctx, sc, err)
15271		}()
15272	}
15273	iter.i++
15274	if iter.i < len(iter.page.Values()) {
15275		return nil
15276	}
15277	err = iter.page.NextWithContext(ctx)
15278	if err != nil {
15279		iter.i--
15280		return err
15281	}
15282	iter.i = 0
15283	return nil
15284}
15285
15286// Next advances to the next value.  If there was an error making
15287// the request the iterator does not advance and the error is returned.
15288// Deprecated: Use NextWithContext() instead.
15289func (iter *ListVpnSitesResultIterator) Next() error {
15290	return iter.NextWithContext(context.Background())
15291}
15292
15293// NotDone returns true if the enumeration should be started or is not yet complete.
15294func (iter ListVpnSitesResultIterator) NotDone() bool {
15295	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15296}
15297
15298// Response returns the raw server response from the last page request.
15299func (iter ListVpnSitesResultIterator) Response() ListVpnSitesResult {
15300	return iter.page.Response()
15301}
15302
15303// Value returns the current value or a zero-initialized value if the
15304// iterator has advanced beyond the end of the collection.
15305func (iter ListVpnSitesResultIterator) Value() VpnSite {
15306	if !iter.page.NotDone() {
15307		return VpnSite{}
15308	}
15309	return iter.page.Values()[iter.i]
15310}
15311
15312// Creates a new instance of the ListVpnSitesResultIterator type.
15313func NewListVpnSitesResultIterator(page ListVpnSitesResultPage) ListVpnSitesResultIterator {
15314	return ListVpnSitesResultIterator{page: page}
15315}
15316
15317// IsEmpty returns true if the ListResult contains no values.
15318func (lvsr ListVpnSitesResult) IsEmpty() bool {
15319	return lvsr.Value == nil || len(*lvsr.Value) == 0
15320}
15321
15322// hasNextLink returns true if the NextLink is not empty.
15323func (lvsr ListVpnSitesResult) hasNextLink() bool {
15324	return lvsr.NextLink != nil && len(*lvsr.NextLink) != 0
15325}
15326
15327// listVpnSitesResultPreparer prepares a request to retrieve the next set of results.
15328// It returns nil if no more results exist.
15329func (lvsr ListVpnSitesResult) listVpnSitesResultPreparer(ctx context.Context) (*http.Request, error) {
15330	if !lvsr.hasNextLink() {
15331		return nil, nil
15332	}
15333	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15334		autorest.AsJSON(),
15335		autorest.AsGet(),
15336		autorest.WithBaseURL(to.String(lvsr.NextLink)))
15337}
15338
15339// ListVpnSitesResultPage contains a page of VpnSite values.
15340type ListVpnSitesResultPage struct {
15341	fn   func(context.Context, ListVpnSitesResult) (ListVpnSitesResult, error)
15342	lvsr ListVpnSitesResult
15343}
15344
15345// NextWithContext advances to the next page of values.  If there was an error making
15346// the request the page does not advance and the error is returned.
15347func (page *ListVpnSitesResultPage) NextWithContext(ctx context.Context) (err error) {
15348	if tracing.IsEnabled() {
15349		ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSitesResultPage.NextWithContext")
15350		defer func() {
15351			sc := -1
15352			if page.Response().Response.Response != nil {
15353				sc = page.Response().Response.Response.StatusCode
15354			}
15355			tracing.EndSpan(ctx, sc, err)
15356		}()
15357	}
15358	for {
15359		next, err := page.fn(ctx, page.lvsr)
15360		if err != nil {
15361			return err
15362		}
15363		page.lvsr = next
15364		if !next.hasNextLink() || !next.IsEmpty() {
15365			break
15366		}
15367	}
15368	return nil
15369}
15370
15371// Next advances to the next page of values.  If there was an error making
15372// the request the page does not advance and the error is returned.
15373// Deprecated: Use NextWithContext() instead.
15374func (page *ListVpnSitesResultPage) Next() error {
15375	return page.NextWithContext(context.Background())
15376}
15377
15378// NotDone returns true if the page enumeration should be started or is not yet complete.
15379func (page ListVpnSitesResultPage) NotDone() bool {
15380	return !page.lvsr.IsEmpty()
15381}
15382
15383// Response returns the raw server response from the last page request.
15384func (page ListVpnSitesResultPage) Response() ListVpnSitesResult {
15385	return page.lvsr
15386}
15387
15388// Values returns the slice of values for the current page or nil if there are no values.
15389func (page ListVpnSitesResultPage) Values() []VpnSite {
15390	if page.lvsr.IsEmpty() {
15391		return nil
15392	}
15393	return *page.lvsr.Value
15394}
15395
15396// Creates a new instance of the ListVpnSitesResultPage type.
15397func NewListVpnSitesResultPage(cur ListVpnSitesResult, getNextPage func(context.Context, ListVpnSitesResult) (ListVpnSitesResult, error)) ListVpnSitesResultPage {
15398	return ListVpnSitesResultPage{
15399		fn:   getNextPage,
15400		lvsr: cur,
15401	}
15402}
15403
15404// LoadBalancer loadBalancer resource
15405type LoadBalancer struct {
15406	autorest.Response `json:"-"`
15407	// Sku - The load balancer SKU.
15408	Sku *LoadBalancerSku `json:"sku,omitempty"`
15409	// LoadBalancerPropertiesFormat - Properties of load balancer.
15410	*LoadBalancerPropertiesFormat `json:"properties,omitempty"`
15411	// Etag - A unique read-only string that changes whenever the resource is updated.
15412	Etag *string `json:"etag,omitempty"`
15413	// ID - Resource ID.
15414	ID *string `json:"id,omitempty"`
15415	// Name - READ-ONLY; Resource name.
15416	Name *string `json:"name,omitempty"`
15417	// Type - READ-ONLY; Resource type.
15418	Type *string `json:"type,omitempty"`
15419	// Location - Resource location.
15420	Location *string `json:"location,omitempty"`
15421	// Tags - Resource tags.
15422	Tags map[string]*string `json:"tags"`
15423}
15424
15425// MarshalJSON is the custom marshaler for LoadBalancer.
15426func (lb LoadBalancer) MarshalJSON() ([]byte, error) {
15427	objectMap := make(map[string]interface{})
15428	if lb.Sku != nil {
15429		objectMap["sku"] = lb.Sku
15430	}
15431	if lb.LoadBalancerPropertiesFormat != nil {
15432		objectMap["properties"] = lb.LoadBalancerPropertiesFormat
15433	}
15434	if lb.Etag != nil {
15435		objectMap["etag"] = lb.Etag
15436	}
15437	if lb.ID != nil {
15438		objectMap["id"] = lb.ID
15439	}
15440	if lb.Location != nil {
15441		objectMap["location"] = lb.Location
15442	}
15443	if lb.Tags != nil {
15444		objectMap["tags"] = lb.Tags
15445	}
15446	return json.Marshal(objectMap)
15447}
15448
15449// UnmarshalJSON is the custom unmarshaler for LoadBalancer struct.
15450func (lb *LoadBalancer) UnmarshalJSON(body []byte) error {
15451	var m map[string]*json.RawMessage
15452	err := json.Unmarshal(body, &m)
15453	if err != nil {
15454		return err
15455	}
15456	for k, v := range m {
15457		switch k {
15458		case "sku":
15459			if v != nil {
15460				var sku LoadBalancerSku
15461				err = json.Unmarshal(*v, &sku)
15462				if err != nil {
15463					return err
15464				}
15465				lb.Sku = &sku
15466			}
15467		case "properties":
15468			if v != nil {
15469				var loadBalancerPropertiesFormat LoadBalancerPropertiesFormat
15470				err = json.Unmarshal(*v, &loadBalancerPropertiesFormat)
15471				if err != nil {
15472					return err
15473				}
15474				lb.LoadBalancerPropertiesFormat = &loadBalancerPropertiesFormat
15475			}
15476		case "etag":
15477			if v != nil {
15478				var etag string
15479				err = json.Unmarshal(*v, &etag)
15480				if err != nil {
15481					return err
15482				}
15483				lb.Etag = &etag
15484			}
15485		case "id":
15486			if v != nil {
15487				var ID string
15488				err = json.Unmarshal(*v, &ID)
15489				if err != nil {
15490					return err
15491				}
15492				lb.ID = &ID
15493			}
15494		case "name":
15495			if v != nil {
15496				var name string
15497				err = json.Unmarshal(*v, &name)
15498				if err != nil {
15499					return err
15500				}
15501				lb.Name = &name
15502			}
15503		case "type":
15504			if v != nil {
15505				var typeVar string
15506				err = json.Unmarshal(*v, &typeVar)
15507				if err != nil {
15508					return err
15509				}
15510				lb.Type = &typeVar
15511			}
15512		case "location":
15513			if v != nil {
15514				var location string
15515				err = json.Unmarshal(*v, &location)
15516				if err != nil {
15517					return err
15518				}
15519				lb.Location = &location
15520			}
15521		case "tags":
15522			if v != nil {
15523				var tags map[string]*string
15524				err = json.Unmarshal(*v, &tags)
15525				if err != nil {
15526					return err
15527				}
15528				lb.Tags = tags
15529			}
15530		}
15531	}
15532
15533	return nil
15534}
15535
15536// LoadBalancerBackendAddressPoolListResult response for ListBackendAddressPool API service call.
15537type LoadBalancerBackendAddressPoolListResult struct {
15538	autorest.Response `json:"-"`
15539	// Value - A list of backend address pools in a load balancer.
15540	Value *[]BackendAddressPool `json:"value,omitempty"`
15541	// NextLink - READ-ONLY; The URL to get the next set of results.
15542	NextLink *string `json:"nextLink,omitempty"`
15543}
15544
15545// MarshalJSON is the custom marshaler for LoadBalancerBackendAddressPoolListResult.
15546func (lbbaplr LoadBalancerBackendAddressPoolListResult) MarshalJSON() ([]byte, error) {
15547	objectMap := make(map[string]interface{})
15548	if lbbaplr.Value != nil {
15549		objectMap["value"] = lbbaplr.Value
15550	}
15551	return json.Marshal(objectMap)
15552}
15553
15554// LoadBalancerBackendAddressPoolListResultIterator provides access to a complete listing of
15555// BackendAddressPool values.
15556type LoadBalancerBackendAddressPoolListResultIterator struct {
15557	i    int
15558	page LoadBalancerBackendAddressPoolListResultPage
15559}
15560
15561// NextWithContext advances to the next value.  If there was an error making
15562// the request the iterator does not advance and the error is returned.
15563func (iter *LoadBalancerBackendAddressPoolListResultIterator) NextWithContext(ctx context.Context) (err error) {
15564	if tracing.IsEnabled() {
15565		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultIterator.NextWithContext")
15566		defer func() {
15567			sc := -1
15568			if iter.Response().Response.Response != nil {
15569				sc = iter.Response().Response.Response.StatusCode
15570			}
15571			tracing.EndSpan(ctx, sc, err)
15572		}()
15573	}
15574	iter.i++
15575	if iter.i < len(iter.page.Values()) {
15576		return nil
15577	}
15578	err = iter.page.NextWithContext(ctx)
15579	if err != nil {
15580		iter.i--
15581		return err
15582	}
15583	iter.i = 0
15584	return nil
15585}
15586
15587// Next advances to the next value.  If there was an error making
15588// the request the iterator does not advance and the error is returned.
15589// Deprecated: Use NextWithContext() instead.
15590func (iter *LoadBalancerBackendAddressPoolListResultIterator) Next() error {
15591	return iter.NextWithContext(context.Background())
15592}
15593
15594// NotDone returns true if the enumeration should be started or is not yet complete.
15595func (iter LoadBalancerBackendAddressPoolListResultIterator) NotDone() bool {
15596	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15597}
15598
15599// Response returns the raw server response from the last page request.
15600func (iter LoadBalancerBackendAddressPoolListResultIterator) Response() LoadBalancerBackendAddressPoolListResult {
15601	return iter.page.Response()
15602}
15603
15604// Value returns the current value or a zero-initialized value if the
15605// iterator has advanced beyond the end of the collection.
15606func (iter LoadBalancerBackendAddressPoolListResultIterator) Value() BackendAddressPool {
15607	if !iter.page.NotDone() {
15608		return BackendAddressPool{}
15609	}
15610	return iter.page.Values()[iter.i]
15611}
15612
15613// Creates a new instance of the LoadBalancerBackendAddressPoolListResultIterator type.
15614func NewLoadBalancerBackendAddressPoolListResultIterator(page LoadBalancerBackendAddressPoolListResultPage) LoadBalancerBackendAddressPoolListResultIterator {
15615	return LoadBalancerBackendAddressPoolListResultIterator{page: page}
15616}
15617
15618// IsEmpty returns true if the ListResult contains no values.
15619func (lbbaplr LoadBalancerBackendAddressPoolListResult) IsEmpty() bool {
15620	return lbbaplr.Value == nil || len(*lbbaplr.Value) == 0
15621}
15622
15623// hasNextLink returns true if the NextLink is not empty.
15624func (lbbaplr LoadBalancerBackendAddressPoolListResult) hasNextLink() bool {
15625	return lbbaplr.NextLink != nil && len(*lbbaplr.NextLink) != 0
15626}
15627
15628// loadBalancerBackendAddressPoolListResultPreparer prepares a request to retrieve the next set of results.
15629// It returns nil if no more results exist.
15630func (lbbaplr LoadBalancerBackendAddressPoolListResult) loadBalancerBackendAddressPoolListResultPreparer(ctx context.Context) (*http.Request, error) {
15631	if !lbbaplr.hasNextLink() {
15632		return nil, nil
15633	}
15634	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15635		autorest.AsJSON(),
15636		autorest.AsGet(),
15637		autorest.WithBaseURL(to.String(lbbaplr.NextLink)))
15638}
15639
15640// LoadBalancerBackendAddressPoolListResultPage contains a page of BackendAddressPool values.
15641type LoadBalancerBackendAddressPoolListResultPage struct {
15642	fn      func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)
15643	lbbaplr LoadBalancerBackendAddressPoolListResult
15644}
15645
15646// NextWithContext advances to the next page of values.  If there was an error making
15647// the request the page does not advance and the error is returned.
15648func (page *LoadBalancerBackendAddressPoolListResultPage) NextWithContext(ctx context.Context) (err error) {
15649	if tracing.IsEnabled() {
15650		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultPage.NextWithContext")
15651		defer func() {
15652			sc := -1
15653			if page.Response().Response.Response != nil {
15654				sc = page.Response().Response.Response.StatusCode
15655			}
15656			tracing.EndSpan(ctx, sc, err)
15657		}()
15658	}
15659	for {
15660		next, err := page.fn(ctx, page.lbbaplr)
15661		if err != nil {
15662			return err
15663		}
15664		page.lbbaplr = next
15665		if !next.hasNextLink() || !next.IsEmpty() {
15666			break
15667		}
15668	}
15669	return nil
15670}
15671
15672// Next advances to the next page of values.  If there was an error making
15673// the request the page does not advance and the error is returned.
15674// Deprecated: Use NextWithContext() instead.
15675func (page *LoadBalancerBackendAddressPoolListResultPage) Next() error {
15676	return page.NextWithContext(context.Background())
15677}
15678
15679// NotDone returns true if the page enumeration should be started or is not yet complete.
15680func (page LoadBalancerBackendAddressPoolListResultPage) NotDone() bool {
15681	return !page.lbbaplr.IsEmpty()
15682}
15683
15684// Response returns the raw server response from the last page request.
15685func (page LoadBalancerBackendAddressPoolListResultPage) Response() LoadBalancerBackendAddressPoolListResult {
15686	return page.lbbaplr
15687}
15688
15689// Values returns the slice of values for the current page or nil if there are no values.
15690func (page LoadBalancerBackendAddressPoolListResultPage) Values() []BackendAddressPool {
15691	if page.lbbaplr.IsEmpty() {
15692		return nil
15693	}
15694	return *page.lbbaplr.Value
15695}
15696
15697// Creates a new instance of the LoadBalancerBackendAddressPoolListResultPage type.
15698func NewLoadBalancerBackendAddressPoolListResultPage(cur LoadBalancerBackendAddressPoolListResult, getNextPage func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)) LoadBalancerBackendAddressPoolListResultPage {
15699	return LoadBalancerBackendAddressPoolListResultPage{
15700		fn:      getNextPage,
15701		lbbaplr: cur,
15702	}
15703}
15704
15705// LoadBalancerFrontendIPConfigurationListResult response for ListFrontendIPConfiguration API service call.
15706type LoadBalancerFrontendIPConfigurationListResult struct {
15707	autorest.Response `json:"-"`
15708	// Value - A list of frontend IP configurations in a load balancer.
15709	Value *[]FrontendIPConfiguration `json:"value,omitempty"`
15710	// NextLink - READ-ONLY; The URL to get the next set of results.
15711	NextLink *string `json:"nextLink,omitempty"`
15712}
15713
15714// MarshalJSON is the custom marshaler for LoadBalancerFrontendIPConfigurationListResult.
15715func (lbficlr LoadBalancerFrontendIPConfigurationListResult) MarshalJSON() ([]byte, error) {
15716	objectMap := make(map[string]interface{})
15717	if lbficlr.Value != nil {
15718		objectMap["value"] = lbficlr.Value
15719	}
15720	return json.Marshal(objectMap)
15721}
15722
15723// LoadBalancerFrontendIPConfigurationListResultIterator provides access to a complete listing of
15724// FrontendIPConfiguration values.
15725type LoadBalancerFrontendIPConfigurationListResultIterator struct {
15726	i    int
15727	page LoadBalancerFrontendIPConfigurationListResultPage
15728}
15729
15730// NextWithContext advances to the next value.  If there was an error making
15731// the request the iterator does not advance and the error is returned.
15732func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
15733	if tracing.IsEnabled() {
15734		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultIterator.NextWithContext")
15735		defer func() {
15736			sc := -1
15737			if iter.Response().Response.Response != nil {
15738				sc = iter.Response().Response.Response.StatusCode
15739			}
15740			tracing.EndSpan(ctx, sc, err)
15741		}()
15742	}
15743	iter.i++
15744	if iter.i < len(iter.page.Values()) {
15745		return nil
15746	}
15747	err = iter.page.NextWithContext(ctx)
15748	if err != nil {
15749		iter.i--
15750		return err
15751	}
15752	iter.i = 0
15753	return nil
15754}
15755
15756// Next advances to the next value.  If there was an error making
15757// the request the iterator does not advance and the error is returned.
15758// Deprecated: Use NextWithContext() instead.
15759func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) Next() error {
15760	return iter.NextWithContext(context.Background())
15761}
15762
15763// NotDone returns true if the enumeration should be started or is not yet complete.
15764func (iter LoadBalancerFrontendIPConfigurationListResultIterator) NotDone() bool {
15765	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15766}
15767
15768// Response returns the raw server response from the last page request.
15769func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Response() LoadBalancerFrontendIPConfigurationListResult {
15770	return iter.page.Response()
15771}
15772
15773// Value returns the current value or a zero-initialized value if the
15774// iterator has advanced beyond the end of the collection.
15775func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Value() FrontendIPConfiguration {
15776	if !iter.page.NotDone() {
15777		return FrontendIPConfiguration{}
15778	}
15779	return iter.page.Values()[iter.i]
15780}
15781
15782// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultIterator type.
15783func NewLoadBalancerFrontendIPConfigurationListResultIterator(page LoadBalancerFrontendIPConfigurationListResultPage) LoadBalancerFrontendIPConfigurationListResultIterator {
15784	return LoadBalancerFrontendIPConfigurationListResultIterator{page: page}
15785}
15786
15787// IsEmpty returns true if the ListResult contains no values.
15788func (lbficlr LoadBalancerFrontendIPConfigurationListResult) IsEmpty() bool {
15789	return lbficlr.Value == nil || len(*lbficlr.Value) == 0
15790}
15791
15792// hasNextLink returns true if the NextLink is not empty.
15793func (lbficlr LoadBalancerFrontendIPConfigurationListResult) hasNextLink() bool {
15794	return lbficlr.NextLink != nil && len(*lbficlr.NextLink) != 0
15795}
15796
15797// loadBalancerFrontendIPConfigurationListResultPreparer prepares a request to retrieve the next set of results.
15798// It returns nil if no more results exist.
15799func (lbficlr LoadBalancerFrontendIPConfigurationListResult) loadBalancerFrontendIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
15800	if !lbficlr.hasNextLink() {
15801		return nil, nil
15802	}
15803	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15804		autorest.AsJSON(),
15805		autorest.AsGet(),
15806		autorest.WithBaseURL(to.String(lbficlr.NextLink)))
15807}
15808
15809// LoadBalancerFrontendIPConfigurationListResultPage contains a page of FrontendIPConfiguration values.
15810type LoadBalancerFrontendIPConfigurationListResultPage struct {
15811	fn      func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)
15812	lbficlr LoadBalancerFrontendIPConfigurationListResult
15813}
15814
15815// NextWithContext advances to the next page of values.  If there was an error making
15816// the request the page does not advance and the error is returned.
15817func (page *LoadBalancerFrontendIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
15818	if tracing.IsEnabled() {
15819		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultPage.NextWithContext")
15820		defer func() {
15821			sc := -1
15822			if page.Response().Response.Response != nil {
15823				sc = page.Response().Response.Response.StatusCode
15824			}
15825			tracing.EndSpan(ctx, sc, err)
15826		}()
15827	}
15828	for {
15829		next, err := page.fn(ctx, page.lbficlr)
15830		if err != nil {
15831			return err
15832		}
15833		page.lbficlr = next
15834		if !next.hasNextLink() || !next.IsEmpty() {
15835			break
15836		}
15837	}
15838	return nil
15839}
15840
15841// Next advances to the next page of values.  If there was an error making
15842// the request the page does not advance and the error is returned.
15843// Deprecated: Use NextWithContext() instead.
15844func (page *LoadBalancerFrontendIPConfigurationListResultPage) Next() error {
15845	return page.NextWithContext(context.Background())
15846}
15847
15848// NotDone returns true if the page enumeration should be started or is not yet complete.
15849func (page LoadBalancerFrontendIPConfigurationListResultPage) NotDone() bool {
15850	return !page.lbficlr.IsEmpty()
15851}
15852
15853// Response returns the raw server response from the last page request.
15854func (page LoadBalancerFrontendIPConfigurationListResultPage) Response() LoadBalancerFrontendIPConfigurationListResult {
15855	return page.lbficlr
15856}
15857
15858// Values returns the slice of values for the current page or nil if there are no values.
15859func (page LoadBalancerFrontendIPConfigurationListResultPage) Values() []FrontendIPConfiguration {
15860	if page.lbficlr.IsEmpty() {
15861		return nil
15862	}
15863	return *page.lbficlr.Value
15864}
15865
15866// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultPage type.
15867func NewLoadBalancerFrontendIPConfigurationListResultPage(cur LoadBalancerFrontendIPConfigurationListResult, getNextPage func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)) LoadBalancerFrontendIPConfigurationListResultPage {
15868	return LoadBalancerFrontendIPConfigurationListResultPage{
15869		fn:      getNextPage,
15870		lbficlr: cur,
15871	}
15872}
15873
15874// LoadBalancerListResult response for ListLoadBalancers API service call.
15875type LoadBalancerListResult struct {
15876	autorest.Response `json:"-"`
15877	// Value - A list of load balancers in a resource group.
15878	Value *[]LoadBalancer `json:"value,omitempty"`
15879	// NextLink - READ-ONLY; The URL to get the next set of results.
15880	NextLink *string `json:"nextLink,omitempty"`
15881}
15882
15883// MarshalJSON is the custom marshaler for LoadBalancerListResult.
15884func (lblr LoadBalancerListResult) MarshalJSON() ([]byte, error) {
15885	objectMap := make(map[string]interface{})
15886	if lblr.Value != nil {
15887		objectMap["value"] = lblr.Value
15888	}
15889	return json.Marshal(objectMap)
15890}
15891
15892// LoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values.
15893type LoadBalancerListResultIterator struct {
15894	i    int
15895	page LoadBalancerListResultPage
15896}
15897
15898// NextWithContext advances to the next value.  If there was an error making
15899// the request the iterator does not advance and the error is returned.
15900func (iter *LoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) {
15901	if tracing.IsEnabled() {
15902		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultIterator.NextWithContext")
15903		defer func() {
15904			sc := -1
15905			if iter.Response().Response.Response != nil {
15906				sc = iter.Response().Response.Response.StatusCode
15907			}
15908			tracing.EndSpan(ctx, sc, err)
15909		}()
15910	}
15911	iter.i++
15912	if iter.i < len(iter.page.Values()) {
15913		return nil
15914	}
15915	err = iter.page.NextWithContext(ctx)
15916	if err != nil {
15917		iter.i--
15918		return err
15919	}
15920	iter.i = 0
15921	return nil
15922}
15923
15924// Next advances to the next value.  If there was an error making
15925// the request the iterator does not advance and the error is returned.
15926// Deprecated: Use NextWithContext() instead.
15927func (iter *LoadBalancerListResultIterator) Next() error {
15928	return iter.NextWithContext(context.Background())
15929}
15930
15931// NotDone returns true if the enumeration should be started or is not yet complete.
15932func (iter LoadBalancerListResultIterator) NotDone() bool {
15933	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15934}
15935
15936// Response returns the raw server response from the last page request.
15937func (iter LoadBalancerListResultIterator) Response() LoadBalancerListResult {
15938	return iter.page.Response()
15939}
15940
15941// Value returns the current value or a zero-initialized value if the
15942// iterator has advanced beyond the end of the collection.
15943func (iter LoadBalancerListResultIterator) Value() LoadBalancer {
15944	if !iter.page.NotDone() {
15945		return LoadBalancer{}
15946	}
15947	return iter.page.Values()[iter.i]
15948}
15949
15950// Creates a new instance of the LoadBalancerListResultIterator type.
15951func NewLoadBalancerListResultIterator(page LoadBalancerListResultPage) LoadBalancerListResultIterator {
15952	return LoadBalancerListResultIterator{page: page}
15953}
15954
15955// IsEmpty returns true if the ListResult contains no values.
15956func (lblr LoadBalancerListResult) IsEmpty() bool {
15957	return lblr.Value == nil || len(*lblr.Value) == 0
15958}
15959
15960// hasNextLink returns true if the NextLink is not empty.
15961func (lblr LoadBalancerListResult) hasNextLink() bool {
15962	return lblr.NextLink != nil && len(*lblr.NextLink) != 0
15963}
15964
15965// loadBalancerListResultPreparer prepares a request to retrieve the next set of results.
15966// It returns nil if no more results exist.
15967func (lblr LoadBalancerListResult) loadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) {
15968	if !lblr.hasNextLink() {
15969		return nil, nil
15970	}
15971	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15972		autorest.AsJSON(),
15973		autorest.AsGet(),
15974		autorest.WithBaseURL(to.String(lblr.NextLink)))
15975}
15976
15977// LoadBalancerListResultPage contains a page of LoadBalancer values.
15978type LoadBalancerListResultPage struct {
15979	fn   func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)
15980	lblr LoadBalancerListResult
15981}
15982
15983// NextWithContext advances to the next page of values.  If there was an error making
15984// the request the page does not advance and the error is returned.
15985func (page *LoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) {
15986	if tracing.IsEnabled() {
15987		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultPage.NextWithContext")
15988		defer func() {
15989			sc := -1
15990			if page.Response().Response.Response != nil {
15991				sc = page.Response().Response.Response.StatusCode
15992			}
15993			tracing.EndSpan(ctx, sc, err)
15994		}()
15995	}
15996	for {
15997		next, err := page.fn(ctx, page.lblr)
15998		if err != nil {
15999			return err
16000		}
16001		page.lblr = next
16002		if !next.hasNextLink() || !next.IsEmpty() {
16003			break
16004		}
16005	}
16006	return nil
16007}
16008
16009// Next advances to the next page of values.  If there was an error making
16010// the request the page does not advance and the error is returned.
16011// Deprecated: Use NextWithContext() instead.
16012func (page *LoadBalancerListResultPage) Next() error {
16013	return page.NextWithContext(context.Background())
16014}
16015
16016// NotDone returns true if the page enumeration should be started or is not yet complete.
16017func (page LoadBalancerListResultPage) NotDone() bool {
16018	return !page.lblr.IsEmpty()
16019}
16020
16021// Response returns the raw server response from the last page request.
16022func (page LoadBalancerListResultPage) Response() LoadBalancerListResult {
16023	return page.lblr
16024}
16025
16026// Values returns the slice of values for the current page or nil if there are no values.
16027func (page LoadBalancerListResultPage) Values() []LoadBalancer {
16028	if page.lblr.IsEmpty() {
16029		return nil
16030	}
16031	return *page.lblr.Value
16032}
16033
16034// Creates a new instance of the LoadBalancerListResultPage type.
16035func NewLoadBalancerListResultPage(cur LoadBalancerListResult, getNextPage func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)) LoadBalancerListResultPage {
16036	return LoadBalancerListResultPage{
16037		fn:   getNextPage,
16038		lblr: cur,
16039	}
16040}
16041
16042// LoadBalancerLoadBalancingRuleListResult response for ListLoadBalancingRule API service call.
16043type LoadBalancerLoadBalancingRuleListResult struct {
16044	autorest.Response `json:"-"`
16045	// Value - A list of load balancing rules in a load balancer.
16046	Value *[]LoadBalancingRule `json:"value,omitempty"`
16047	// NextLink - READ-ONLY; The URL to get the next set of results.
16048	NextLink *string `json:"nextLink,omitempty"`
16049}
16050
16051// MarshalJSON is the custom marshaler for LoadBalancerLoadBalancingRuleListResult.
16052func (lblbrlr LoadBalancerLoadBalancingRuleListResult) MarshalJSON() ([]byte, error) {
16053	objectMap := make(map[string]interface{})
16054	if lblbrlr.Value != nil {
16055		objectMap["value"] = lblbrlr.Value
16056	}
16057	return json.Marshal(objectMap)
16058}
16059
16060// LoadBalancerLoadBalancingRuleListResultIterator provides access to a complete listing of
16061// LoadBalancingRule values.
16062type LoadBalancerLoadBalancingRuleListResultIterator struct {
16063	i    int
16064	page LoadBalancerLoadBalancingRuleListResultPage
16065}
16066
16067// NextWithContext advances to the next value.  If there was an error making
16068// the request the iterator does not advance and the error is returned.
16069func (iter *LoadBalancerLoadBalancingRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
16070	if tracing.IsEnabled() {
16071		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultIterator.NextWithContext")
16072		defer func() {
16073			sc := -1
16074			if iter.Response().Response.Response != nil {
16075				sc = iter.Response().Response.Response.StatusCode
16076			}
16077			tracing.EndSpan(ctx, sc, err)
16078		}()
16079	}
16080	iter.i++
16081	if iter.i < len(iter.page.Values()) {
16082		return nil
16083	}
16084	err = iter.page.NextWithContext(ctx)
16085	if err != nil {
16086		iter.i--
16087		return err
16088	}
16089	iter.i = 0
16090	return nil
16091}
16092
16093// Next advances to the next value.  If there was an error making
16094// the request the iterator does not advance and the error is returned.
16095// Deprecated: Use NextWithContext() instead.
16096func (iter *LoadBalancerLoadBalancingRuleListResultIterator) Next() error {
16097	return iter.NextWithContext(context.Background())
16098}
16099
16100// NotDone returns true if the enumeration should be started or is not yet complete.
16101func (iter LoadBalancerLoadBalancingRuleListResultIterator) NotDone() bool {
16102	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16103}
16104
16105// Response returns the raw server response from the last page request.
16106func (iter LoadBalancerLoadBalancingRuleListResultIterator) Response() LoadBalancerLoadBalancingRuleListResult {
16107	return iter.page.Response()
16108}
16109
16110// Value returns the current value or a zero-initialized value if the
16111// iterator has advanced beyond the end of the collection.
16112func (iter LoadBalancerLoadBalancingRuleListResultIterator) Value() LoadBalancingRule {
16113	if !iter.page.NotDone() {
16114		return LoadBalancingRule{}
16115	}
16116	return iter.page.Values()[iter.i]
16117}
16118
16119// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultIterator type.
16120func NewLoadBalancerLoadBalancingRuleListResultIterator(page LoadBalancerLoadBalancingRuleListResultPage) LoadBalancerLoadBalancingRuleListResultIterator {
16121	return LoadBalancerLoadBalancingRuleListResultIterator{page: page}
16122}
16123
16124// IsEmpty returns true if the ListResult contains no values.
16125func (lblbrlr LoadBalancerLoadBalancingRuleListResult) IsEmpty() bool {
16126	return lblbrlr.Value == nil || len(*lblbrlr.Value) == 0
16127}
16128
16129// hasNextLink returns true if the NextLink is not empty.
16130func (lblbrlr LoadBalancerLoadBalancingRuleListResult) hasNextLink() bool {
16131	return lblbrlr.NextLink != nil && len(*lblbrlr.NextLink) != 0
16132}
16133
16134// loadBalancerLoadBalancingRuleListResultPreparer prepares a request to retrieve the next set of results.
16135// It returns nil if no more results exist.
16136func (lblbrlr LoadBalancerLoadBalancingRuleListResult) loadBalancerLoadBalancingRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
16137	if !lblbrlr.hasNextLink() {
16138		return nil, nil
16139	}
16140	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16141		autorest.AsJSON(),
16142		autorest.AsGet(),
16143		autorest.WithBaseURL(to.String(lblbrlr.NextLink)))
16144}
16145
16146// LoadBalancerLoadBalancingRuleListResultPage contains a page of LoadBalancingRule values.
16147type LoadBalancerLoadBalancingRuleListResultPage struct {
16148	fn      func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)
16149	lblbrlr LoadBalancerLoadBalancingRuleListResult
16150}
16151
16152// NextWithContext advances to the next page of values.  If there was an error making
16153// the request the page does not advance and the error is returned.
16154func (page *LoadBalancerLoadBalancingRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
16155	if tracing.IsEnabled() {
16156		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultPage.NextWithContext")
16157		defer func() {
16158			sc := -1
16159			if page.Response().Response.Response != nil {
16160				sc = page.Response().Response.Response.StatusCode
16161			}
16162			tracing.EndSpan(ctx, sc, err)
16163		}()
16164	}
16165	for {
16166		next, err := page.fn(ctx, page.lblbrlr)
16167		if err != nil {
16168			return err
16169		}
16170		page.lblbrlr = next
16171		if !next.hasNextLink() || !next.IsEmpty() {
16172			break
16173		}
16174	}
16175	return nil
16176}
16177
16178// Next advances to the next page of values.  If there was an error making
16179// the request the page does not advance and the error is returned.
16180// Deprecated: Use NextWithContext() instead.
16181func (page *LoadBalancerLoadBalancingRuleListResultPage) Next() error {
16182	return page.NextWithContext(context.Background())
16183}
16184
16185// NotDone returns true if the page enumeration should be started or is not yet complete.
16186func (page LoadBalancerLoadBalancingRuleListResultPage) NotDone() bool {
16187	return !page.lblbrlr.IsEmpty()
16188}
16189
16190// Response returns the raw server response from the last page request.
16191func (page LoadBalancerLoadBalancingRuleListResultPage) Response() LoadBalancerLoadBalancingRuleListResult {
16192	return page.lblbrlr
16193}
16194
16195// Values returns the slice of values for the current page or nil if there are no values.
16196func (page LoadBalancerLoadBalancingRuleListResultPage) Values() []LoadBalancingRule {
16197	if page.lblbrlr.IsEmpty() {
16198		return nil
16199	}
16200	return *page.lblbrlr.Value
16201}
16202
16203// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultPage type.
16204func NewLoadBalancerLoadBalancingRuleListResultPage(cur LoadBalancerLoadBalancingRuleListResult, getNextPage func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)) LoadBalancerLoadBalancingRuleListResultPage {
16205	return LoadBalancerLoadBalancingRuleListResultPage{
16206		fn:      getNextPage,
16207		lblbrlr: cur,
16208	}
16209}
16210
16211// LoadBalancerOutboundRuleListResult response for ListOutboundRule API service call.
16212type LoadBalancerOutboundRuleListResult struct {
16213	autorest.Response `json:"-"`
16214	// Value - A list of outbound rules in a load balancer.
16215	Value *[]OutboundRule `json:"value,omitempty"`
16216	// NextLink - READ-ONLY; The URL to get the next set of results.
16217	NextLink *string `json:"nextLink,omitempty"`
16218}
16219
16220// MarshalJSON is the custom marshaler for LoadBalancerOutboundRuleListResult.
16221func (lborlr LoadBalancerOutboundRuleListResult) MarshalJSON() ([]byte, error) {
16222	objectMap := make(map[string]interface{})
16223	if lborlr.Value != nil {
16224		objectMap["value"] = lborlr.Value
16225	}
16226	return json.Marshal(objectMap)
16227}
16228
16229// LoadBalancerOutboundRuleListResultIterator provides access to a complete listing of OutboundRule values.
16230type LoadBalancerOutboundRuleListResultIterator struct {
16231	i    int
16232	page LoadBalancerOutboundRuleListResultPage
16233}
16234
16235// NextWithContext advances to the next value.  If there was an error making
16236// the request the iterator does not advance and the error is returned.
16237func (iter *LoadBalancerOutboundRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
16238	if tracing.IsEnabled() {
16239		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerOutboundRuleListResultIterator.NextWithContext")
16240		defer func() {
16241			sc := -1
16242			if iter.Response().Response.Response != nil {
16243				sc = iter.Response().Response.Response.StatusCode
16244			}
16245			tracing.EndSpan(ctx, sc, err)
16246		}()
16247	}
16248	iter.i++
16249	if iter.i < len(iter.page.Values()) {
16250		return nil
16251	}
16252	err = iter.page.NextWithContext(ctx)
16253	if err != nil {
16254		iter.i--
16255		return err
16256	}
16257	iter.i = 0
16258	return nil
16259}
16260
16261// Next advances to the next value.  If there was an error making
16262// the request the iterator does not advance and the error is returned.
16263// Deprecated: Use NextWithContext() instead.
16264func (iter *LoadBalancerOutboundRuleListResultIterator) Next() error {
16265	return iter.NextWithContext(context.Background())
16266}
16267
16268// NotDone returns true if the enumeration should be started or is not yet complete.
16269func (iter LoadBalancerOutboundRuleListResultIterator) NotDone() bool {
16270	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16271}
16272
16273// Response returns the raw server response from the last page request.
16274func (iter LoadBalancerOutboundRuleListResultIterator) Response() LoadBalancerOutboundRuleListResult {
16275	return iter.page.Response()
16276}
16277
16278// Value returns the current value or a zero-initialized value if the
16279// iterator has advanced beyond the end of the collection.
16280func (iter LoadBalancerOutboundRuleListResultIterator) Value() OutboundRule {
16281	if !iter.page.NotDone() {
16282		return OutboundRule{}
16283	}
16284	return iter.page.Values()[iter.i]
16285}
16286
16287// Creates a new instance of the LoadBalancerOutboundRuleListResultIterator type.
16288func NewLoadBalancerOutboundRuleListResultIterator(page LoadBalancerOutboundRuleListResultPage) LoadBalancerOutboundRuleListResultIterator {
16289	return LoadBalancerOutboundRuleListResultIterator{page: page}
16290}
16291
16292// IsEmpty returns true if the ListResult contains no values.
16293func (lborlr LoadBalancerOutboundRuleListResult) IsEmpty() bool {
16294	return lborlr.Value == nil || len(*lborlr.Value) == 0
16295}
16296
16297// hasNextLink returns true if the NextLink is not empty.
16298func (lborlr LoadBalancerOutboundRuleListResult) hasNextLink() bool {
16299	return lborlr.NextLink != nil && len(*lborlr.NextLink) != 0
16300}
16301
16302// loadBalancerOutboundRuleListResultPreparer prepares a request to retrieve the next set of results.
16303// It returns nil if no more results exist.
16304func (lborlr LoadBalancerOutboundRuleListResult) loadBalancerOutboundRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
16305	if !lborlr.hasNextLink() {
16306		return nil, nil
16307	}
16308	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16309		autorest.AsJSON(),
16310		autorest.AsGet(),
16311		autorest.WithBaseURL(to.String(lborlr.NextLink)))
16312}
16313
16314// LoadBalancerOutboundRuleListResultPage contains a page of OutboundRule values.
16315type LoadBalancerOutboundRuleListResultPage struct {
16316	fn     func(context.Context, LoadBalancerOutboundRuleListResult) (LoadBalancerOutboundRuleListResult, error)
16317	lborlr LoadBalancerOutboundRuleListResult
16318}
16319
16320// NextWithContext advances to the next page of values.  If there was an error making
16321// the request the page does not advance and the error is returned.
16322func (page *LoadBalancerOutboundRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
16323	if tracing.IsEnabled() {
16324		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerOutboundRuleListResultPage.NextWithContext")
16325		defer func() {
16326			sc := -1
16327			if page.Response().Response.Response != nil {
16328				sc = page.Response().Response.Response.StatusCode
16329			}
16330			tracing.EndSpan(ctx, sc, err)
16331		}()
16332	}
16333	for {
16334		next, err := page.fn(ctx, page.lborlr)
16335		if err != nil {
16336			return err
16337		}
16338		page.lborlr = next
16339		if !next.hasNextLink() || !next.IsEmpty() {
16340			break
16341		}
16342	}
16343	return nil
16344}
16345
16346// Next advances to the next page of values.  If there was an error making
16347// the request the page does not advance and the error is returned.
16348// Deprecated: Use NextWithContext() instead.
16349func (page *LoadBalancerOutboundRuleListResultPage) Next() error {
16350	return page.NextWithContext(context.Background())
16351}
16352
16353// NotDone returns true if the page enumeration should be started or is not yet complete.
16354func (page LoadBalancerOutboundRuleListResultPage) NotDone() bool {
16355	return !page.lborlr.IsEmpty()
16356}
16357
16358// Response returns the raw server response from the last page request.
16359func (page LoadBalancerOutboundRuleListResultPage) Response() LoadBalancerOutboundRuleListResult {
16360	return page.lborlr
16361}
16362
16363// Values returns the slice of values for the current page or nil if there are no values.
16364func (page LoadBalancerOutboundRuleListResultPage) Values() []OutboundRule {
16365	if page.lborlr.IsEmpty() {
16366		return nil
16367	}
16368	return *page.lborlr.Value
16369}
16370
16371// Creates a new instance of the LoadBalancerOutboundRuleListResultPage type.
16372func NewLoadBalancerOutboundRuleListResultPage(cur LoadBalancerOutboundRuleListResult, getNextPage func(context.Context, LoadBalancerOutboundRuleListResult) (LoadBalancerOutboundRuleListResult, error)) LoadBalancerOutboundRuleListResultPage {
16373	return LoadBalancerOutboundRuleListResultPage{
16374		fn:     getNextPage,
16375		lborlr: cur,
16376	}
16377}
16378
16379// LoadBalancerProbeListResult response for ListProbe API service call.
16380type LoadBalancerProbeListResult struct {
16381	autorest.Response `json:"-"`
16382	// Value - A list of probes in a load balancer.
16383	Value *[]Probe `json:"value,omitempty"`
16384	// NextLink - READ-ONLY; The URL to get the next set of results.
16385	NextLink *string `json:"nextLink,omitempty"`
16386}
16387
16388// MarshalJSON is the custom marshaler for LoadBalancerProbeListResult.
16389func (lbplr LoadBalancerProbeListResult) MarshalJSON() ([]byte, error) {
16390	objectMap := make(map[string]interface{})
16391	if lbplr.Value != nil {
16392		objectMap["value"] = lbplr.Value
16393	}
16394	return json.Marshal(objectMap)
16395}
16396
16397// LoadBalancerProbeListResultIterator provides access to a complete listing of Probe values.
16398type LoadBalancerProbeListResultIterator struct {
16399	i    int
16400	page LoadBalancerProbeListResultPage
16401}
16402
16403// NextWithContext advances to the next value.  If there was an error making
16404// the request the iterator does not advance and the error is returned.
16405func (iter *LoadBalancerProbeListResultIterator) NextWithContext(ctx context.Context) (err error) {
16406	if tracing.IsEnabled() {
16407		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultIterator.NextWithContext")
16408		defer func() {
16409			sc := -1
16410			if iter.Response().Response.Response != nil {
16411				sc = iter.Response().Response.Response.StatusCode
16412			}
16413			tracing.EndSpan(ctx, sc, err)
16414		}()
16415	}
16416	iter.i++
16417	if iter.i < len(iter.page.Values()) {
16418		return nil
16419	}
16420	err = iter.page.NextWithContext(ctx)
16421	if err != nil {
16422		iter.i--
16423		return err
16424	}
16425	iter.i = 0
16426	return nil
16427}
16428
16429// Next advances to the next value.  If there was an error making
16430// the request the iterator does not advance and the error is returned.
16431// Deprecated: Use NextWithContext() instead.
16432func (iter *LoadBalancerProbeListResultIterator) Next() error {
16433	return iter.NextWithContext(context.Background())
16434}
16435
16436// NotDone returns true if the enumeration should be started or is not yet complete.
16437func (iter LoadBalancerProbeListResultIterator) NotDone() bool {
16438	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16439}
16440
16441// Response returns the raw server response from the last page request.
16442func (iter LoadBalancerProbeListResultIterator) Response() LoadBalancerProbeListResult {
16443	return iter.page.Response()
16444}
16445
16446// Value returns the current value or a zero-initialized value if the
16447// iterator has advanced beyond the end of the collection.
16448func (iter LoadBalancerProbeListResultIterator) Value() Probe {
16449	if !iter.page.NotDone() {
16450		return Probe{}
16451	}
16452	return iter.page.Values()[iter.i]
16453}
16454
16455// Creates a new instance of the LoadBalancerProbeListResultIterator type.
16456func NewLoadBalancerProbeListResultIterator(page LoadBalancerProbeListResultPage) LoadBalancerProbeListResultIterator {
16457	return LoadBalancerProbeListResultIterator{page: page}
16458}
16459
16460// IsEmpty returns true if the ListResult contains no values.
16461func (lbplr LoadBalancerProbeListResult) IsEmpty() bool {
16462	return lbplr.Value == nil || len(*lbplr.Value) == 0
16463}
16464
16465// hasNextLink returns true if the NextLink is not empty.
16466func (lbplr LoadBalancerProbeListResult) hasNextLink() bool {
16467	return lbplr.NextLink != nil && len(*lbplr.NextLink) != 0
16468}
16469
16470// loadBalancerProbeListResultPreparer prepares a request to retrieve the next set of results.
16471// It returns nil if no more results exist.
16472func (lbplr LoadBalancerProbeListResult) loadBalancerProbeListResultPreparer(ctx context.Context) (*http.Request, error) {
16473	if !lbplr.hasNextLink() {
16474		return nil, nil
16475	}
16476	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16477		autorest.AsJSON(),
16478		autorest.AsGet(),
16479		autorest.WithBaseURL(to.String(lbplr.NextLink)))
16480}
16481
16482// LoadBalancerProbeListResultPage contains a page of Probe values.
16483type LoadBalancerProbeListResultPage struct {
16484	fn    func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)
16485	lbplr LoadBalancerProbeListResult
16486}
16487
16488// NextWithContext advances to the next page of values.  If there was an error making
16489// the request the page does not advance and the error is returned.
16490func (page *LoadBalancerProbeListResultPage) NextWithContext(ctx context.Context) (err error) {
16491	if tracing.IsEnabled() {
16492		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultPage.NextWithContext")
16493		defer func() {
16494			sc := -1
16495			if page.Response().Response.Response != nil {
16496				sc = page.Response().Response.Response.StatusCode
16497			}
16498			tracing.EndSpan(ctx, sc, err)
16499		}()
16500	}
16501	for {
16502		next, err := page.fn(ctx, page.lbplr)
16503		if err != nil {
16504			return err
16505		}
16506		page.lbplr = next
16507		if !next.hasNextLink() || !next.IsEmpty() {
16508			break
16509		}
16510	}
16511	return nil
16512}
16513
16514// Next advances to the next page of values.  If there was an error making
16515// the request the page does not advance and the error is returned.
16516// Deprecated: Use NextWithContext() instead.
16517func (page *LoadBalancerProbeListResultPage) Next() error {
16518	return page.NextWithContext(context.Background())
16519}
16520
16521// NotDone returns true if the page enumeration should be started or is not yet complete.
16522func (page LoadBalancerProbeListResultPage) NotDone() bool {
16523	return !page.lbplr.IsEmpty()
16524}
16525
16526// Response returns the raw server response from the last page request.
16527func (page LoadBalancerProbeListResultPage) Response() LoadBalancerProbeListResult {
16528	return page.lbplr
16529}
16530
16531// Values returns the slice of values for the current page or nil if there are no values.
16532func (page LoadBalancerProbeListResultPage) Values() []Probe {
16533	if page.lbplr.IsEmpty() {
16534		return nil
16535	}
16536	return *page.lbplr.Value
16537}
16538
16539// Creates a new instance of the LoadBalancerProbeListResultPage type.
16540func NewLoadBalancerProbeListResultPage(cur LoadBalancerProbeListResult, getNextPage func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)) LoadBalancerProbeListResultPage {
16541	return LoadBalancerProbeListResultPage{
16542		fn:    getNextPage,
16543		lbplr: cur,
16544	}
16545}
16546
16547// LoadBalancerPropertiesFormat properties of the load balancer.
16548type LoadBalancerPropertiesFormat struct {
16549	// FrontendIPConfigurations - Object representing the frontend IPs to be used for the load balancer
16550	FrontendIPConfigurations *[]FrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"`
16551	// BackendAddressPools - Collection of backend address pools used by a load balancer
16552	BackendAddressPools *[]BackendAddressPool `json:"backendAddressPools,omitempty"`
16553	// LoadBalancingRules - Object collection representing the load balancing rules Gets the provisioning
16554	LoadBalancingRules *[]LoadBalancingRule `json:"loadBalancingRules,omitempty"`
16555	// Probes - Collection of probe objects used in the load balancer
16556	Probes *[]Probe `json:"probes,omitempty"`
16557	// 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.
16558	InboundNatRules *[]InboundNatRule `json:"inboundNatRules,omitempty"`
16559	// 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.
16560	InboundNatPools *[]InboundNatPool `json:"inboundNatPools,omitempty"`
16561	// OutboundRules - The outbound rules.
16562	OutboundRules *[]OutboundRule `json:"outboundRules,omitempty"`
16563	// ResourceGUID - The resource GUID property of the load balancer resource.
16564	ResourceGUID *string `json:"resourceGuid,omitempty"`
16565	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
16566	ProvisioningState *string `json:"provisioningState,omitempty"`
16567}
16568
16569// LoadBalancersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
16570// long-running operation.
16571type LoadBalancersCreateOrUpdateFuture struct {
16572	azure.FutureAPI
16573	// Result returns the result of the asynchronous operation.
16574	// If the operation has not completed it will return an error.
16575	Result func(LoadBalancersClient) (LoadBalancer, error)
16576}
16577
16578// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16579func (future *LoadBalancersCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
16580	var azFuture azure.Future
16581	if err := json.Unmarshal(body, &azFuture); err != nil {
16582		return err
16583	}
16584	future.FutureAPI = &azFuture
16585	future.Result = future.result
16586	return nil
16587}
16588
16589// result is the default implementation for LoadBalancersCreateOrUpdateFuture.Result.
16590func (future *LoadBalancersCreateOrUpdateFuture) result(client LoadBalancersClient) (lb LoadBalancer, err error) {
16591	var done bool
16592	done, err = future.DoneWithContext(context.Background(), client)
16593	if err != nil {
16594		err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
16595		return
16596	}
16597	if !done {
16598		lb.Response.Response = future.Response()
16599		err = azure.NewAsyncOpIncompleteError("network.LoadBalancersCreateOrUpdateFuture")
16600		return
16601	}
16602	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16603	if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent {
16604		lb, err = client.CreateOrUpdateResponder(lb.Response.Response)
16605		if err != nil {
16606			err = autorest.NewErrorWithError(err, "network.LoadBalancersCreateOrUpdateFuture", "Result", lb.Response.Response, "Failure responding to request")
16607		}
16608	}
16609	return
16610}
16611
16612// LoadBalancersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
16613// operation.
16614type LoadBalancersDeleteFuture struct {
16615	azure.FutureAPI
16616	// Result returns the result of the asynchronous operation.
16617	// If the operation has not completed it will return an error.
16618	Result func(LoadBalancersClient) (autorest.Response, error)
16619}
16620
16621// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16622func (future *LoadBalancersDeleteFuture) UnmarshalJSON(body []byte) error {
16623	var azFuture azure.Future
16624	if err := json.Unmarshal(body, &azFuture); err != nil {
16625		return err
16626	}
16627	future.FutureAPI = &azFuture
16628	future.Result = future.result
16629	return nil
16630}
16631
16632// result is the default implementation for LoadBalancersDeleteFuture.Result.
16633func (future *LoadBalancersDeleteFuture) result(client LoadBalancersClient) (ar autorest.Response, err error) {
16634	var done bool
16635	done, err = future.DoneWithContext(context.Background(), client)
16636	if err != nil {
16637		err = autorest.NewErrorWithError(err, "network.LoadBalancersDeleteFuture", "Result", future.Response(), "Polling failure")
16638		return
16639	}
16640	if !done {
16641		ar.Response = future.Response()
16642		err = azure.NewAsyncOpIncompleteError("network.LoadBalancersDeleteFuture")
16643		return
16644	}
16645	ar.Response = future.Response()
16646	return
16647}
16648
16649// LoadBalancerSku SKU of a load balancer
16650type LoadBalancerSku struct {
16651	// Name - Name of a load balancer SKU. Possible values include: 'LoadBalancerSkuNameBasic', 'LoadBalancerSkuNameStandard'
16652	Name LoadBalancerSkuName `json:"name,omitempty"`
16653}
16654
16655// LoadBalancersUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
16656// operation.
16657type LoadBalancersUpdateTagsFuture struct {
16658	azure.FutureAPI
16659	// Result returns the result of the asynchronous operation.
16660	// If the operation has not completed it will return an error.
16661	Result func(LoadBalancersClient) (LoadBalancer, error)
16662}
16663
16664// UnmarshalJSON is the custom unmarshaller for CreateFuture.
16665func (future *LoadBalancersUpdateTagsFuture) UnmarshalJSON(body []byte) error {
16666	var azFuture azure.Future
16667	if err := json.Unmarshal(body, &azFuture); err != nil {
16668		return err
16669	}
16670	future.FutureAPI = &azFuture
16671	future.Result = future.result
16672	return nil
16673}
16674
16675// result is the default implementation for LoadBalancersUpdateTagsFuture.Result.
16676func (future *LoadBalancersUpdateTagsFuture) result(client LoadBalancersClient) (lb LoadBalancer, err error) {
16677	var done bool
16678	done, err = future.DoneWithContext(context.Background(), client)
16679	if err != nil {
16680		err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", future.Response(), "Polling failure")
16681		return
16682	}
16683	if !done {
16684		lb.Response.Response = future.Response()
16685		err = azure.NewAsyncOpIncompleteError("network.LoadBalancersUpdateTagsFuture")
16686		return
16687	}
16688	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
16689	if lb.Response.Response, err = future.GetResult(sender); err == nil && lb.Response.Response.StatusCode != http.StatusNoContent {
16690		lb, err = client.UpdateTagsResponder(lb.Response.Response)
16691		if err != nil {
16692			err = autorest.NewErrorWithError(err, "network.LoadBalancersUpdateTagsFuture", "Result", lb.Response.Response, "Failure responding to request")
16693		}
16694	}
16695	return
16696}
16697
16698// LoadBalancingRule a load balancing rule for a load balancer.
16699type LoadBalancingRule struct {
16700	autorest.Response `json:"-"`
16701	// LoadBalancingRulePropertiesFormat - Properties of load balancer load balancing rule.
16702	*LoadBalancingRulePropertiesFormat `json:"properties,omitempty"`
16703	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
16704	Name *string `json:"name,omitempty"`
16705	// Etag - A unique read-only string that changes whenever the resource is updated.
16706	Etag *string `json:"etag,omitempty"`
16707	// ID - Resource ID.
16708	ID *string `json:"id,omitempty"`
16709}
16710
16711// MarshalJSON is the custom marshaler for LoadBalancingRule.
16712func (lbr LoadBalancingRule) MarshalJSON() ([]byte, error) {
16713	objectMap := make(map[string]interface{})
16714	if lbr.LoadBalancingRulePropertiesFormat != nil {
16715		objectMap["properties"] = lbr.LoadBalancingRulePropertiesFormat
16716	}
16717	if lbr.Name != nil {
16718		objectMap["name"] = lbr.Name
16719	}
16720	if lbr.Etag != nil {
16721		objectMap["etag"] = lbr.Etag
16722	}
16723	if lbr.ID != nil {
16724		objectMap["id"] = lbr.ID
16725	}
16726	return json.Marshal(objectMap)
16727}
16728
16729// UnmarshalJSON is the custom unmarshaler for LoadBalancingRule struct.
16730func (lbr *LoadBalancingRule) UnmarshalJSON(body []byte) error {
16731	var m map[string]*json.RawMessage
16732	err := json.Unmarshal(body, &m)
16733	if err != nil {
16734		return err
16735	}
16736	for k, v := range m {
16737		switch k {
16738		case "properties":
16739			if v != nil {
16740				var loadBalancingRulePropertiesFormat LoadBalancingRulePropertiesFormat
16741				err = json.Unmarshal(*v, &loadBalancingRulePropertiesFormat)
16742				if err != nil {
16743					return err
16744				}
16745				lbr.LoadBalancingRulePropertiesFormat = &loadBalancingRulePropertiesFormat
16746			}
16747		case "name":
16748			if v != nil {
16749				var name string
16750				err = json.Unmarshal(*v, &name)
16751				if err != nil {
16752					return err
16753				}
16754				lbr.Name = &name
16755			}
16756		case "etag":
16757			if v != nil {
16758				var etag string
16759				err = json.Unmarshal(*v, &etag)
16760				if err != nil {
16761					return err
16762				}
16763				lbr.Etag = &etag
16764			}
16765		case "id":
16766			if v != nil {
16767				var ID string
16768				err = json.Unmarshal(*v, &ID)
16769				if err != nil {
16770					return err
16771				}
16772				lbr.ID = &ID
16773			}
16774		}
16775	}
16776
16777	return nil
16778}
16779
16780// LoadBalancingRulePropertiesFormat properties of the load balancer.
16781type LoadBalancingRulePropertiesFormat struct {
16782	// FrontendIPConfiguration - A reference to frontend IP addresses.
16783	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
16784	// BackendAddressPool - A reference to a pool of DIPs. Inbound traffic is randomly load balanced across IPs in the backend IPs.
16785	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
16786	// Probe - The reference of the load balancer probe used by the load balancing rule.
16787	Probe *SubResource `json:"probe,omitempty"`
16788	// Protocol - Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
16789	Protocol TransportProtocol `json:"protocol,omitempty"`
16790	// LoadDistribution - The load distribution policy for this rule. Possible values are 'Default', 'SourceIP', and 'SourceIPProtocol'. Possible values include: 'Default', 'SourceIP', 'SourceIPProtocol'
16791	LoadDistribution LoadDistribution `json:"loadDistribution,omitempty"`
16792	// 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"
16793	FrontendPort *int32 `json:"frontendPort,omitempty"`
16794	// BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 0 and 65535. Note that value 0 enables "Any Port"
16795	BackendPort *int32 `json:"backendPort,omitempty"`
16796	// 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.
16797	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
16798	// 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.
16799	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
16800	// 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.
16801	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
16802	// DisableOutboundSnat - Configures SNAT for the VMs in the backend pool to use the publicIP address specified in the frontend of the load balancing rule.
16803	DisableOutboundSnat *bool `json:"disableOutboundSnat,omitempty"`
16804	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
16805	ProvisioningState *string `json:"provisioningState,omitempty"`
16806}
16807
16808// LocalNetworkGateway a common class for general resource information
16809type LocalNetworkGateway struct {
16810	autorest.Response `json:"-"`
16811	// LocalNetworkGatewayPropertiesFormat - Properties of the local network gateway.
16812	*LocalNetworkGatewayPropertiesFormat `json:"properties,omitempty"`
16813	// Etag - A unique read-only string that changes whenever the resource is updated.
16814	Etag *string `json:"etag,omitempty"`
16815	// ID - Resource ID.
16816	ID *string `json:"id,omitempty"`
16817	// Name - READ-ONLY; Resource name.
16818	Name *string `json:"name,omitempty"`
16819	// Type - READ-ONLY; Resource type.
16820	Type *string `json:"type,omitempty"`
16821	// Location - Resource location.
16822	Location *string `json:"location,omitempty"`
16823	// Tags - Resource tags.
16824	Tags map[string]*string `json:"tags"`
16825}
16826
16827// MarshalJSON is the custom marshaler for LocalNetworkGateway.
16828func (lng LocalNetworkGateway) MarshalJSON() ([]byte, error) {
16829	objectMap := make(map[string]interface{})
16830	if lng.LocalNetworkGatewayPropertiesFormat != nil {
16831		objectMap["properties"] = lng.LocalNetworkGatewayPropertiesFormat
16832	}
16833	if lng.Etag != nil {
16834		objectMap["etag"] = lng.Etag
16835	}
16836	if lng.ID != nil {
16837		objectMap["id"] = lng.ID
16838	}
16839	if lng.Location != nil {
16840		objectMap["location"] = lng.Location
16841	}
16842	if lng.Tags != nil {
16843		objectMap["tags"] = lng.Tags
16844	}
16845	return json.Marshal(objectMap)
16846}
16847
16848// UnmarshalJSON is the custom unmarshaler for LocalNetworkGateway struct.
16849func (lng *LocalNetworkGateway) UnmarshalJSON(body []byte) error {
16850	var m map[string]*json.RawMessage
16851	err := json.Unmarshal(body, &m)
16852	if err != nil {
16853		return err
16854	}
16855	for k, v := range m {
16856		switch k {
16857		case "properties":
16858			if v != nil {
16859				var localNetworkGatewayPropertiesFormat LocalNetworkGatewayPropertiesFormat
16860				err = json.Unmarshal(*v, &localNetworkGatewayPropertiesFormat)
16861				if err != nil {
16862					return err
16863				}
16864				lng.LocalNetworkGatewayPropertiesFormat = &localNetworkGatewayPropertiesFormat
16865			}
16866		case "etag":
16867			if v != nil {
16868				var etag string
16869				err = json.Unmarshal(*v, &etag)
16870				if err != nil {
16871					return err
16872				}
16873				lng.Etag = &etag
16874			}
16875		case "id":
16876			if v != nil {
16877				var ID string
16878				err = json.Unmarshal(*v, &ID)
16879				if err != nil {
16880					return err
16881				}
16882				lng.ID = &ID
16883			}
16884		case "name":
16885			if v != nil {
16886				var name string
16887				err = json.Unmarshal(*v, &name)
16888				if err != nil {
16889					return err
16890				}
16891				lng.Name = &name
16892			}
16893		case "type":
16894			if v != nil {
16895				var typeVar string
16896				err = json.Unmarshal(*v, &typeVar)
16897				if err != nil {
16898					return err
16899				}
16900				lng.Type = &typeVar
16901			}
16902		case "location":
16903			if v != nil {
16904				var location string
16905				err = json.Unmarshal(*v, &location)
16906				if err != nil {
16907					return err
16908				}
16909				lng.Location = &location
16910			}
16911		case "tags":
16912			if v != nil {
16913				var tags map[string]*string
16914				err = json.Unmarshal(*v, &tags)
16915				if err != nil {
16916					return err
16917				}
16918				lng.Tags = tags
16919			}
16920		}
16921	}
16922
16923	return nil
16924}
16925
16926// LocalNetworkGatewayListResult response for ListLocalNetworkGateways API service call.
16927type LocalNetworkGatewayListResult struct {
16928	autorest.Response `json:"-"`
16929	// Value - A list of local network gateways that exists in a resource group.
16930	Value *[]LocalNetworkGateway `json:"value,omitempty"`
16931	// NextLink - READ-ONLY; The URL to get the next set of results.
16932	NextLink *string `json:"nextLink,omitempty"`
16933}
16934
16935// MarshalJSON is the custom marshaler for LocalNetworkGatewayListResult.
16936func (lnglr LocalNetworkGatewayListResult) MarshalJSON() ([]byte, error) {
16937	objectMap := make(map[string]interface{})
16938	if lnglr.Value != nil {
16939		objectMap["value"] = lnglr.Value
16940	}
16941	return json.Marshal(objectMap)
16942}
16943
16944// LocalNetworkGatewayListResultIterator provides access to a complete listing of LocalNetworkGateway
16945// values.
16946type LocalNetworkGatewayListResultIterator struct {
16947	i    int
16948	page LocalNetworkGatewayListResultPage
16949}
16950
16951// NextWithContext advances to the next value.  If there was an error making
16952// the request the iterator does not advance and the error is returned.
16953func (iter *LocalNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
16954	if tracing.IsEnabled() {
16955		ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultIterator.NextWithContext")
16956		defer func() {
16957			sc := -1
16958			if iter.Response().Response.Response != nil {
16959				sc = iter.Response().Response.Response.StatusCode
16960			}
16961			tracing.EndSpan(ctx, sc, err)
16962		}()
16963	}
16964	iter.i++
16965	if iter.i < len(iter.page.Values()) {
16966		return nil
16967	}
16968	err = iter.page.NextWithContext(ctx)
16969	if err != nil {
16970		iter.i--
16971		return err
16972	}
16973	iter.i = 0
16974	return nil
16975}
16976
16977// Next advances to the next value.  If there was an error making
16978// the request the iterator does not advance and the error is returned.
16979// Deprecated: Use NextWithContext() instead.
16980func (iter *LocalNetworkGatewayListResultIterator) Next() error {
16981	return iter.NextWithContext(context.Background())
16982}
16983
16984// NotDone returns true if the enumeration should be started or is not yet complete.
16985func (iter LocalNetworkGatewayListResultIterator) NotDone() bool {
16986	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16987}
16988
16989// Response returns the raw server response from the last page request.
16990func (iter LocalNetworkGatewayListResultIterator) Response() LocalNetworkGatewayListResult {
16991	return iter.page.Response()
16992}
16993
16994// Value returns the current value or a zero-initialized value if the
16995// iterator has advanced beyond the end of the collection.
16996func (iter LocalNetworkGatewayListResultIterator) Value() LocalNetworkGateway {
16997	if !iter.page.NotDone() {
16998		return LocalNetworkGateway{}
16999	}
17000	return iter.page.Values()[iter.i]
17001}
17002
17003// Creates a new instance of the LocalNetworkGatewayListResultIterator type.
17004func NewLocalNetworkGatewayListResultIterator(page LocalNetworkGatewayListResultPage) LocalNetworkGatewayListResultIterator {
17005	return LocalNetworkGatewayListResultIterator{page: page}
17006}
17007
17008// IsEmpty returns true if the ListResult contains no values.
17009func (lnglr LocalNetworkGatewayListResult) IsEmpty() bool {
17010	return lnglr.Value == nil || len(*lnglr.Value) == 0
17011}
17012
17013// hasNextLink returns true if the NextLink is not empty.
17014func (lnglr LocalNetworkGatewayListResult) hasNextLink() bool {
17015	return lnglr.NextLink != nil && len(*lnglr.NextLink) != 0
17016}
17017
17018// localNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results.
17019// It returns nil if no more results exist.
17020func (lnglr LocalNetworkGatewayListResult) localNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
17021	if !lnglr.hasNextLink() {
17022		return nil, nil
17023	}
17024	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17025		autorest.AsJSON(),
17026		autorest.AsGet(),
17027		autorest.WithBaseURL(to.String(lnglr.NextLink)))
17028}
17029
17030// LocalNetworkGatewayListResultPage contains a page of LocalNetworkGateway values.
17031type LocalNetworkGatewayListResultPage struct {
17032	fn    func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)
17033	lnglr LocalNetworkGatewayListResult
17034}
17035
17036// NextWithContext advances to the next page of values.  If there was an error making
17037// the request the page does not advance and the error is returned.
17038func (page *LocalNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
17039	if tracing.IsEnabled() {
17040		ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultPage.NextWithContext")
17041		defer func() {
17042			sc := -1
17043			if page.Response().Response.Response != nil {
17044				sc = page.Response().Response.Response.StatusCode
17045			}
17046			tracing.EndSpan(ctx, sc, err)
17047		}()
17048	}
17049	for {
17050		next, err := page.fn(ctx, page.lnglr)
17051		if err != nil {
17052			return err
17053		}
17054		page.lnglr = next
17055		if !next.hasNextLink() || !next.IsEmpty() {
17056			break
17057		}
17058	}
17059	return nil
17060}
17061
17062// Next advances to the next page of values.  If there was an error making
17063// the request the page does not advance and the error is returned.
17064// Deprecated: Use NextWithContext() instead.
17065func (page *LocalNetworkGatewayListResultPage) Next() error {
17066	return page.NextWithContext(context.Background())
17067}
17068
17069// NotDone returns true if the page enumeration should be started or is not yet complete.
17070func (page LocalNetworkGatewayListResultPage) NotDone() bool {
17071	return !page.lnglr.IsEmpty()
17072}
17073
17074// Response returns the raw server response from the last page request.
17075func (page LocalNetworkGatewayListResultPage) Response() LocalNetworkGatewayListResult {
17076	return page.lnglr
17077}
17078
17079// Values returns the slice of values for the current page or nil if there are no values.
17080func (page LocalNetworkGatewayListResultPage) Values() []LocalNetworkGateway {
17081	if page.lnglr.IsEmpty() {
17082		return nil
17083	}
17084	return *page.lnglr.Value
17085}
17086
17087// Creates a new instance of the LocalNetworkGatewayListResultPage type.
17088func NewLocalNetworkGatewayListResultPage(cur LocalNetworkGatewayListResult, getNextPage func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)) LocalNetworkGatewayListResultPage {
17089	return LocalNetworkGatewayListResultPage{
17090		fn:    getNextPage,
17091		lnglr: cur,
17092	}
17093}
17094
17095// LocalNetworkGatewayPropertiesFormat localNetworkGateway properties
17096type LocalNetworkGatewayPropertiesFormat struct {
17097	// LocalNetworkAddressSpace - Local network site address space.
17098	LocalNetworkAddressSpace *AddressSpace `json:"localNetworkAddressSpace,omitempty"`
17099	// GatewayIPAddress - IP address of local network gateway.
17100	GatewayIPAddress *string `json:"gatewayIpAddress,omitempty"`
17101	// BgpSettings - Local network gateway's BGP speaker settings.
17102	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
17103	// ResourceGUID - The resource GUID property of the LocalNetworkGateway resource.
17104	ResourceGUID *string `json:"resourceGuid,omitempty"`
17105	// ProvisioningState - READ-ONLY; The provisioning state of the LocalNetworkGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
17106	ProvisioningState *string `json:"provisioningState,omitempty"`
17107}
17108
17109// MarshalJSON is the custom marshaler for LocalNetworkGatewayPropertiesFormat.
17110func (lngpf LocalNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
17111	objectMap := make(map[string]interface{})
17112	if lngpf.LocalNetworkAddressSpace != nil {
17113		objectMap["localNetworkAddressSpace"] = lngpf.LocalNetworkAddressSpace
17114	}
17115	if lngpf.GatewayIPAddress != nil {
17116		objectMap["gatewayIpAddress"] = lngpf.GatewayIPAddress
17117	}
17118	if lngpf.BgpSettings != nil {
17119		objectMap["bgpSettings"] = lngpf.BgpSettings
17120	}
17121	if lngpf.ResourceGUID != nil {
17122		objectMap["resourceGuid"] = lngpf.ResourceGUID
17123	}
17124	return json.Marshal(objectMap)
17125}
17126
17127// LocalNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
17128// long-running operation.
17129type LocalNetworkGatewaysCreateOrUpdateFuture struct {
17130	azure.FutureAPI
17131	// Result returns the result of the asynchronous operation.
17132	// If the operation has not completed it will return an error.
17133	Result func(LocalNetworkGatewaysClient) (LocalNetworkGateway, error)
17134}
17135
17136// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17137func (future *LocalNetworkGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
17138	var azFuture azure.Future
17139	if err := json.Unmarshal(body, &azFuture); err != nil {
17140		return err
17141	}
17142	future.FutureAPI = &azFuture
17143	future.Result = future.result
17144	return nil
17145}
17146
17147// result is the default implementation for LocalNetworkGatewaysCreateOrUpdateFuture.Result.
17148func (future *LocalNetworkGatewaysCreateOrUpdateFuture) result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
17149	var done bool
17150	done, err = future.DoneWithContext(context.Background(), client)
17151	if err != nil {
17152		err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
17153		return
17154	}
17155	if !done {
17156		lng.Response.Response = future.Response()
17157		err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysCreateOrUpdateFuture")
17158		return
17159	}
17160	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17161	if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent {
17162		lng, err = client.CreateOrUpdateResponder(lng.Response.Response)
17163		if err != nil {
17164			err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysCreateOrUpdateFuture", "Result", lng.Response.Response, "Failure responding to request")
17165		}
17166	}
17167	return
17168}
17169
17170// LocalNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
17171// long-running operation.
17172type LocalNetworkGatewaysDeleteFuture struct {
17173	azure.FutureAPI
17174	// Result returns the result of the asynchronous operation.
17175	// If the operation has not completed it will return an error.
17176	Result func(LocalNetworkGatewaysClient) (autorest.Response, error)
17177}
17178
17179// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17180func (future *LocalNetworkGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
17181	var azFuture azure.Future
17182	if err := json.Unmarshal(body, &azFuture); err != nil {
17183		return err
17184	}
17185	future.FutureAPI = &azFuture
17186	future.Result = future.result
17187	return nil
17188}
17189
17190// result is the default implementation for LocalNetworkGatewaysDeleteFuture.Result.
17191func (future *LocalNetworkGatewaysDeleteFuture) result(client LocalNetworkGatewaysClient) (ar autorest.Response, err error) {
17192	var done bool
17193	done, err = future.DoneWithContext(context.Background(), client)
17194	if err != nil {
17195		err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
17196		return
17197	}
17198	if !done {
17199		ar.Response = future.Response()
17200		err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysDeleteFuture")
17201		return
17202	}
17203	ar.Response = future.Response()
17204	return
17205}
17206
17207// LocalNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
17208// long-running operation.
17209type LocalNetworkGatewaysUpdateTagsFuture struct {
17210	azure.FutureAPI
17211	// Result returns the result of the asynchronous operation.
17212	// If the operation has not completed it will return an error.
17213	Result func(LocalNetworkGatewaysClient) (LocalNetworkGateway, error)
17214}
17215
17216// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17217func (future *LocalNetworkGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error {
17218	var azFuture azure.Future
17219	if err := json.Unmarshal(body, &azFuture); err != nil {
17220		return err
17221	}
17222	future.FutureAPI = &azFuture
17223	future.Result = future.result
17224	return nil
17225}
17226
17227// result is the default implementation for LocalNetworkGatewaysUpdateTagsFuture.Result.
17228func (future *LocalNetworkGatewaysUpdateTagsFuture) result(client LocalNetworkGatewaysClient) (lng LocalNetworkGateway, err error) {
17229	var done bool
17230	done, err = future.DoneWithContext(context.Background(), client)
17231	if err != nil {
17232		err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
17233		return
17234	}
17235	if !done {
17236		lng.Response.Response = future.Response()
17237		err = azure.NewAsyncOpIncompleteError("network.LocalNetworkGatewaysUpdateTagsFuture")
17238		return
17239	}
17240	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17241	if lng.Response.Response, err = future.GetResult(sender); err == nil && lng.Response.Response.StatusCode != http.StatusNoContent {
17242		lng, err = client.UpdateTagsResponder(lng.Response.Response)
17243		if err != nil {
17244			err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysUpdateTagsFuture", "Result", lng.Response.Response, "Failure responding to request")
17245		}
17246	}
17247	return
17248}
17249
17250// LogSpecification description of logging specification.
17251type LogSpecification struct {
17252	// Name - The name of the specification.
17253	Name *string `json:"name,omitempty"`
17254	// DisplayName - The display name of the specification.
17255	DisplayName *string `json:"displayName,omitempty"`
17256	// BlobDuration - Duration of the blob.
17257	BlobDuration *string `json:"blobDuration,omitempty"`
17258}
17259
17260// MatchedRule matched rule.
17261type MatchedRule struct {
17262	// RuleName - Name of the matched network security rule.
17263	RuleName *string `json:"ruleName,omitempty"`
17264	// Action - The network traffic is allowed or denied. Possible values are 'Allow' and 'Deny'.
17265	Action *string `json:"action,omitempty"`
17266}
17267
17268// MetricSpecification description of metrics specification.
17269type MetricSpecification struct {
17270	// Name - The name of the metric.
17271	Name *string `json:"name,omitempty"`
17272	// DisplayName - The display name of the metric.
17273	DisplayName *string `json:"displayName,omitempty"`
17274	// DisplayDescription - The description of the metric.
17275	DisplayDescription *string `json:"displayDescription,omitempty"`
17276	// Unit - Units the metric to be displayed in.
17277	Unit *string `json:"unit,omitempty"`
17278	// AggregationType - The aggregation type.
17279	AggregationType *string `json:"aggregationType,omitempty"`
17280	// Availabilities - List of availability.
17281	Availabilities *[]Availability `json:"availabilities,omitempty"`
17282	// EnableRegionalMdmAccount - Whether regional MDM account enabled.
17283	EnableRegionalMdmAccount *bool `json:"enableRegionalMdmAccount,omitempty"`
17284	// FillGapWithZero - Whether gaps would be filled with zeros.
17285	FillGapWithZero *bool `json:"fillGapWithZero,omitempty"`
17286	// MetricFilterPattern - Pattern for the filter of the metric.
17287	MetricFilterPattern *string `json:"metricFilterPattern,omitempty"`
17288	// Dimensions - List of dimensions.
17289	Dimensions *[]Dimension `json:"dimensions,omitempty"`
17290	// IsInternal - Whether the metric is internal.
17291	IsInternal *bool `json:"isInternal,omitempty"`
17292	// SourceMdmAccount - The source MDM account.
17293	SourceMdmAccount *string `json:"sourceMdmAccount,omitempty"`
17294	// SourceMdmNamespace - The source MDM namespace.
17295	SourceMdmNamespace *string `json:"sourceMdmNamespace,omitempty"`
17296	// ResourceIDDimensionNameOverride - The resource Id dimension name override.
17297	ResourceIDDimensionNameOverride *string `json:"resourceIdDimensionNameOverride,omitempty"`
17298}
17299
17300// NextHopParameters parameters that define the source and destination endpoint.
17301type NextHopParameters struct {
17302	// TargetResourceID - The resource identifier of the target resource against which the action is to be performed.
17303	TargetResourceID *string `json:"targetResourceId,omitempty"`
17304	// SourceIPAddress - The source IP address.
17305	SourceIPAddress *string `json:"sourceIPAddress,omitempty"`
17306	// DestinationIPAddress - The destination IP address.
17307	DestinationIPAddress *string `json:"destinationIPAddress,omitempty"`
17308	// 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).
17309	TargetNicResourceID *string `json:"targetNicResourceId,omitempty"`
17310}
17311
17312// NextHopResult the information about next hop from the specified VM.
17313type NextHopResult struct {
17314	autorest.Response `json:"-"`
17315	// NextHopType - Next hop type. Possible values include: 'NextHopTypeInternet', 'NextHopTypeVirtualAppliance', 'NextHopTypeVirtualNetworkGateway', 'NextHopTypeVnetLocal', 'NextHopTypeHyperNetGateway', 'NextHopTypeNone'
17316	NextHopType NextHopType `json:"nextHopType,omitempty"`
17317	// NextHopIPAddress - Next hop IP Address
17318	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
17319	// 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'.
17320	RouteTableID *string `json:"routeTableId,omitempty"`
17321}
17322
17323// Operation network REST API operation definition.
17324type Operation struct {
17325	// Name - Operation name: {provider}/{resource}/{operation}
17326	Name *string `json:"name,omitempty"`
17327	// Display - Display metadata associated with the operation.
17328	Display *OperationDisplay `json:"display,omitempty"`
17329	// Origin - Origin of the operation.
17330	Origin *string `json:"origin,omitempty"`
17331	// OperationPropertiesFormat - Operation properties format.
17332	*OperationPropertiesFormat `json:"properties,omitempty"`
17333}
17334
17335// MarshalJSON is the custom marshaler for Operation.
17336func (o Operation) MarshalJSON() ([]byte, error) {
17337	objectMap := make(map[string]interface{})
17338	if o.Name != nil {
17339		objectMap["name"] = o.Name
17340	}
17341	if o.Display != nil {
17342		objectMap["display"] = o.Display
17343	}
17344	if o.Origin != nil {
17345		objectMap["origin"] = o.Origin
17346	}
17347	if o.OperationPropertiesFormat != nil {
17348		objectMap["properties"] = o.OperationPropertiesFormat
17349	}
17350	return json.Marshal(objectMap)
17351}
17352
17353// UnmarshalJSON is the custom unmarshaler for Operation struct.
17354func (o *Operation) UnmarshalJSON(body []byte) error {
17355	var m map[string]*json.RawMessage
17356	err := json.Unmarshal(body, &m)
17357	if err != nil {
17358		return err
17359	}
17360	for k, v := range m {
17361		switch k {
17362		case "name":
17363			if v != nil {
17364				var name string
17365				err = json.Unmarshal(*v, &name)
17366				if err != nil {
17367					return err
17368				}
17369				o.Name = &name
17370			}
17371		case "display":
17372			if v != nil {
17373				var display OperationDisplay
17374				err = json.Unmarshal(*v, &display)
17375				if err != nil {
17376					return err
17377				}
17378				o.Display = &display
17379			}
17380		case "origin":
17381			if v != nil {
17382				var origin string
17383				err = json.Unmarshal(*v, &origin)
17384				if err != nil {
17385					return err
17386				}
17387				o.Origin = &origin
17388			}
17389		case "properties":
17390			if v != nil {
17391				var operationPropertiesFormat OperationPropertiesFormat
17392				err = json.Unmarshal(*v, &operationPropertiesFormat)
17393				if err != nil {
17394					return err
17395				}
17396				o.OperationPropertiesFormat = &operationPropertiesFormat
17397			}
17398		}
17399	}
17400
17401	return nil
17402}
17403
17404// OperationDisplay display metadata associated with the operation.
17405type OperationDisplay struct {
17406	// Provider - Service provider: Microsoft Network.
17407	Provider *string `json:"provider,omitempty"`
17408	// Resource - Resource on which the operation is performed.
17409	Resource *string `json:"resource,omitempty"`
17410	// Operation - Type of the operation: get, read, delete, etc.
17411	Operation *string `json:"operation,omitempty"`
17412	// Description - Description of the operation.
17413	Description *string `json:"description,omitempty"`
17414}
17415
17416// OperationListResult result of the request to list Network operations. It contains a list of operations
17417// and a URL link to get the next set of results.
17418type OperationListResult struct {
17419	autorest.Response `json:"-"`
17420	// Value - List of Network operations supported by the Network resource provider.
17421	Value *[]Operation `json:"value,omitempty"`
17422	// NextLink - URL to get the next set of operation list results if there are any.
17423	NextLink *string `json:"nextLink,omitempty"`
17424}
17425
17426// OperationListResultIterator provides access to a complete listing of Operation values.
17427type OperationListResultIterator struct {
17428	i    int
17429	page OperationListResultPage
17430}
17431
17432// NextWithContext advances to the next value.  If there was an error making
17433// the request the iterator does not advance and the error is returned.
17434func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) {
17435	if tracing.IsEnabled() {
17436		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext")
17437		defer func() {
17438			sc := -1
17439			if iter.Response().Response.Response != nil {
17440				sc = iter.Response().Response.Response.StatusCode
17441			}
17442			tracing.EndSpan(ctx, sc, err)
17443		}()
17444	}
17445	iter.i++
17446	if iter.i < len(iter.page.Values()) {
17447		return nil
17448	}
17449	err = iter.page.NextWithContext(ctx)
17450	if err != nil {
17451		iter.i--
17452		return err
17453	}
17454	iter.i = 0
17455	return nil
17456}
17457
17458// Next advances to the next value.  If there was an error making
17459// the request the iterator does not advance and the error is returned.
17460// Deprecated: Use NextWithContext() instead.
17461func (iter *OperationListResultIterator) Next() error {
17462	return iter.NextWithContext(context.Background())
17463}
17464
17465// NotDone returns true if the enumeration should be started or is not yet complete.
17466func (iter OperationListResultIterator) NotDone() bool {
17467	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17468}
17469
17470// Response returns the raw server response from the last page request.
17471func (iter OperationListResultIterator) Response() OperationListResult {
17472	return iter.page.Response()
17473}
17474
17475// Value returns the current value or a zero-initialized value if the
17476// iterator has advanced beyond the end of the collection.
17477func (iter OperationListResultIterator) Value() Operation {
17478	if !iter.page.NotDone() {
17479		return Operation{}
17480	}
17481	return iter.page.Values()[iter.i]
17482}
17483
17484// Creates a new instance of the OperationListResultIterator type.
17485func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator {
17486	return OperationListResultIterator{page: page}
17487}
17488
17489// IsEmpty returns true if the ListResult contains no values.
17490func (olr OperationListResult) IsEmpty() bool {
17491	return olr.Value == nil || len(*olr.Value) == 0
17492}
17493
17494// hasNextLink returns true if the NextLink is not empty.
17495func (olr OperationListResult) hasNextLink() bool {
17496	return olr.NextLink != nil && len(*olr.NextLink) != 0
17497}
17498
17499// operationListResultPreparer prepares a request to retrieve the next set of results.
17500// It returns nil if no more results exist.
17501func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) {
17502	if !olr.hasNextLink() {
17503		return nil, nil
17504	}
17505	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17506		autorest.AsJSON(),
17507		autorest.AsGet(),
17508		autorest.WithBaseURL(to.String(olr.NextLink)))
17509}
17510
17511// OperationListResultPage contains a page of Operation values.
17512type OperationListResultPage struct {
17513	fn  func(context.Context, OperationListResult) (OperationListResult, error)
17514	olr OperationListResult
17515}
17516
17517// NextWithContext advances to the next page of values.  If there was an error making
17518// the request the page does not advance and the error is returned.
17519func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) {
17520	if tracing.IsEnabled() {
17521		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext")
17522		defer func() {
17523			sc := -1
17524			if page.Response().Response.Response != nil {
17525				sc = page.Response().Response.Response.StatusCode
17526			}
17527			tracing.EndSpan(ctx, sc, err)
17528		}()
17529	}
17530	for {
17531		next, err := page.fn(ctx, page.olr)
17532		if err != nil {
17533			return err
17534		}
17535		page.olr = next
17536		if !next.hasNextLink() || !next.IsEmpty() {
17537			break
17538		}
17539	}
17540	return nil
17541}
17542
17543// Next advances to the next page of values.  If there was an error making
17544// the request the page does not advance and the error is returned.
17545// Deprecated: Use NextWithContext() instead.
17546func (page *OperationListResultPage) Next() error {
17547	return page.NextWithContext(context.Background())
17548}
17549
17550// NotDone returns true if the page enumeration should be started or is not yet complete.
17551func (page OperationListResultPage) NotDone() bool {
17552	return !page.olr.IsEmpty()
17553}
17554
17555// Response returns the raw server response from the last page request.
17556func (page OperationListResultPage) Response() OperationListResult {
17557	return page.olr
17558}
17559
17560// Values returns the slice of values for the current page or nil if there are no values.
17561func (page OperationListResultPage) Values() []Operation {
17562	if page.olr.IsEmpty() {
17563		return nil
17564	}
17565	return *page.olr.Value
17566}
17567
17568// Creates a new instance of the OperationListResultPage type.
17569func NewOperationListResultPage(cur OperationListResult, getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
17570	return OperationListResultPage{
17571		fn:  getNextPage,
17572		olr: cur,
17573	}
17574}
17575
17576// OperationPropertiesFormat description of operation properties format.
17577type OperationPropertiesFormat struct {
17578	// ServiceSpecification - Specification of the service.
17579	ServiceSpecification *OperationPropertiesFormatServiceSpecification `json:"serviceSpecification,omitempty"`
17580}
17581
17582// OperationPropertiesFormatServiceSpecification specification of the service.
17583type OperationPropertiesFormatServiceSpecification struct {
17584	// MetricSpecifications - Operation service specification.
17585	MetricSpecifications *[]MetricSpecification `json:"metricSpecifications,omitempty"`
17586	// LogSpecifications - Operation log specification.
17587	LogSpecifications *[]LogSpecification `json:"logSpecifications,omitempty"`
17588}
17589
17590// OutboundRule outbound rule of the load balancer.
17591type OutboundRule struct {
17592	autorest.Response `json:"-"`
17593	// OutboundRulePropertiesFormat - Properties of load balancer outbound rule.
17594	*OutboundRulePropertiesFormat `json:"properties,omitempty"`
17595	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
17596	Name *string `json:"name,omitempty"`
17597	// Etag - A unique read-only string that changes whenever the resource is updated.
17598	Etag *string `json:"etag,omitempty"`
17599	// ID - Resource ID.
17600	ID *string `json:"id,omitempty"`
17601}
17602
17603// MarshalJSON is the custom marshaler for OutboundRule.
17604func (or OutboundRule) MarshalJSON() ([]byte, error) {
17605	objectMap := make(map[string]interface{})
17606	if or.OutboundRulePropertiesFormat != nil {
17607		objectMap["properties"] = or.OutboundRulePropertiesFormat
17608	}
17609	if or.Name != nil {
17610		objectMap["name"] = or.Name
17611	}
17612	if or.Etag != nil {
17613		objectMap["etag"] = or.Etag
17614	}
17615	if or.ID != nil {
17616		objectMap["id"] = or.ID
17617	}
17618	return json.Marshal(objectMap)
17619}
17620
17621// UnmarshalJSON is the custom unmarshaler for OutboundRule struct.
17622func (or *OutboundRule) UnmarshalJSON(body []byte) error {
17623	var m map[string]*json.RawMessage
17624	err := json.Unmarshal(body, &m)
17625	if err != nil {
17626		return err
17627	}
17628	for k, v := range m {
17629		switch k {
17630		case "properties":
17631			if v != nil {
17632				var outboundRulePropertiesFormat OutboundRulePropertiesFormat
17633				err = json.Unmarshal(*v, &outboundRulePropertiesFormat)
17634				if err != nil {
17635					return err
17636				}
17637				or.OutboundRulePropertiesFormat = &outboundRulePropertiesFormat
17638			}
17639		case "name":
17640			if v != nil {
17641				var name string
17642				err = json.Unmarshal(*v, &name)
17643				if err != nil {
17644					return err
17645				}
17646				or.Name = &name
17647			}
17648		case "etag":
17649			if v != nil {
17650				var etag string
17651				err = json.Unmarshal(*v, &etag)
17652				if err != nil {
17653					return err
17654				}
17655				or.Etag = &etag
17656			}
17657		case "id":
17658			if v != nil {
17659				var ID string
17660				err = json.Unmarshal(*v, &ID)
17661				if err != nil {
17662					return err
17663				}
17664				or.ID = &ID
17665			}
17666		}
17667	}
17668
17669	return nil
17670}
17671
17672// OutboundRulePropertiesFormat outbound rule of the load balancer.
17673type OutboundRulePropertiesFormat struct {
17674	// AllocatedOutboundPorts - The number of outbound ports to be used for NAT.
17675	AllocatedOutboundPorts *int32 `json:"allocatedOutboundPorts,omitempty"`
17676	// FrontendIPConfigurations - The Frontend IP addresses of the load balancer.
17677	FrontendIPConfigurations *[]SubResource `json:"frontendIPConfigurations,omitempty"`
17678	// BackendAddressPool - A reference to a pool of DIPs. Outbound traffic is randomly load balanced across IPs in the backend IPs.
17679	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
17680	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
17681	ProvisioningState *string `json:"provisioningState,omitempty"`
17682	// Protocol - Protocol - TCP, UDP or All. Possible values include: 'Protocol1TCP', 'Protocol1UDP', 'Protocol1All'
17683	Protocol Protocol1 `json:"protocol,omitempty"`
17684	// 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.
17685	EnableTCPReset *bool `json:"enableTcpReset,omitempty"`
17686	// IdleTimeoutInMinutes - The timeout for the TCP idle connection
17687	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
17688}
17689
17690// P2SVpnGateway p2SVpnGateway Resource.
17691type P2SVpnGateway struct {
17692	autorest.Response        `json:"-"`
17693	*P2SVpnGatewayProperties `json:"properties,omitempty"`
17694	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
17695	Etag *string `json:"etag,omitempty"`
17696	// ID - Resource ID.
17697	ID *string `json:"id,omitempty"`
17698	// Name - READ-ONLY; Resource name.
17699	Name *string `json:"name,omitempty"`
17700	// Type - READ-ONLY; Resource type.
17701	Type *string `json:"type,omitempty"`
17702	// Location - Resource location.
17703	Location *string `json:"location,omitempty"`
17704	// Tags - Resource tags.
17705	Tags map[string]*string `json:"tags"`
17706}
17707
17708// MarshalJSON is the custom marshaler for P2SVpnGateway.
17709func (pvg P2SVpnGateway) MarshalJSON() ([]byte, error) {
17710	objectMap := make(map[string]interface{})
17711	if pvg.P2SVpnGatewayProperties != nil {
17712		objectMap["properties"] = pvg.P2SVpnGatewayProperties
17713	}
17714	if pvg.ID != nil {
17715		objectMap["id"] = pvg.ID
17716	}
17717	if pvg.Location != nil {
17718		objectMap["location"] = pvg.Location
17719	}
17720	if pvg.Tags != nil {
17721		objectMap["tags"] = pvg.Tags
17722	}
17723	return json.Marshal(objectMap)
17724}
17725
17726// UnmarshalJSON is the custom unmarshaler for P2SVpnGateway struct.
17727func (pvg *P2SVpnGateway) UnmarshalJSON(body []byte) error {
17728	var m map[string]*json.RawMessage
17729	err := json.Unmarshal(body, &m)
17730	if err != nil {
17731		return err
17732	}
17733	for k, v := range m {
17734		switch k {
17735		case "properties":
17736			if v != nil {
17737				var p2SVpnGatewayProperties P2SVpnGatewayProperties
17738				err = json.Unmarshal(*v, &p2SVpnGatewayProperties)
17739				if err != nil {
17740					return err
17741				}
17742				pvg.P2SVpnGatewayProperties = &p2SVpnGatewayProperties
17743			}
17744		case "etag":
17745			if v != nil {
17746				var etag string
17747				err = json.Unmarshal(*v, &etag)
17748				if err != nil {
17749					return err
17750				}
17751				pvg.Etag = &etag
17752			}
17753		case "id":
17754			if v != nil {
17755				var ID string
17756				err = json.Unmarshal(*v, &ID)
17757				if err != nil {
17758					return err
17759				}
17760				pvg.ID = &ID
17761			}
17762		case "name":
17763			if v != nil {
17764				var name string
17765				err = json.Unmarshal(*v, &name)
17766				if err != nil {
17767					return err
17768				}
17769				pvg.Name = &name
17770			}
17771		case "type":
17772			if v != nil {
17773				var typeVar string
17774				err = json.Unmarshal(*v, &typeVar)
17775				if err != nil {
17776					return err
17777				}
17778				pvg.Type = &typeVar
17779			}
17780		case "location":
17781			if v != nil {
17782				var location string
17783				err = json.Unmarshal(*v, &location)
17784				if err != nil {
17785					return err
17786				}
17787				pvg.Location = &location
17788			}
17789		case "tags":
17790			if v != nil {
17791				var tags map[string]*string
17792				err = json.Unmarshal(*v, &tags)
17793				if err != nil {
17794					return err
17795				}
17796				pvg.Tags = tags
17797			}
17798		}
17799	}
17800
17801	return nil
17802}
17803
17804// P2SVpnGatewayProperties parameters for P2SVpnGateway
17805type P2SVpnGatewayProperties struct {
17806	// VirtualHub - The VirtualHub to which the gateway belongs
17807	VirtualHub *SubResource `json:"virtualHub,omitempty"`
17808	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
17809	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
17810	// VpnGatewayScaleUnit - The scale unit for this p2s vpn gateway.
17811	VpnGatewayScaleUnit *int32 `json:"vpnGatewayScaleUnit,omitempty"`
17812	// P2SVpnServerConfiguration - The P2SVpnServerConfiguration to which the p2sVpnGateway is attached to.
17813	P2SVpnServerConfiguration *SubResource `json:"p2SVpnServerConfiguration,omitempty"`
17814	// VpnClientAddressPool - The reference of the address space resource which represents Address space for P2S VpnClient.
17815	VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"`
17816	// VpnClientConnectionHealth - READ-ONLY; All P2S VPN clients' connection health status.
17817	VpnClientConnectionHealth *VpnClientConnectionHealth `json:"vpnClientConnectionHealth,omitempty"`
17818}
17819
17820// MarshalJSON is the custom marshaler for P2SVpnGatewayProperties.
17821func (pvgp P2SVpnGatewayProperties) MarshalJSON() ([]byte, error) {
17822	objectMap := make(map[string]interface{})
17823	if pvgp.VirtualHub != nil {
17824		objectMap["virtualHub"] = pvgp.VirtualHub
17825	}
17826	if pvgp.ProvisioningState != "" {
17827		objectMap["provisioningState"] = pvgp.ProvisioningState
17828	}
17829	if pvgp.VpnGatewayScaleUnit != nil {
17830		objectMap["vpnGatewayScaleUnit"] = pvgp.VpnGatewayScaleUnit
17831	}
17832	if pvgp.P2SVpnServerConfiguration != nil {
17833		objectMap["p2SVpnServerConfiguration"] = pvgp.P2SVpnServerConfiguration
17834	}
17835	if pvgp.VpnClientAddressPool != nil {
17836		objectMap["vpnClientAddressPool"] = pvgp.VpnClientAddressPool
17837	}
17838	return json.Marshal(objectMap)
17839}
17840
17841// P2sVpnGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
17842// long-running operation.
17843type P2sVpnGatewaysCreateOrUpdateFuture struct {
17844	azure.FutureAPI
17845	// Result returns the result of the asynchronous operation.
17846	// If the operation has not completed it will return an error.
17847	Result func(P2sVpnGatewaysClient) (P2SVpnGateway, error)
17848}
17849
17850// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17851func (future *P2sVpnGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
17852	var azFuture azure.Future
17853	if err := json.Unmarshal(body, &azFuture); err != nil {
17854		return err
17855	}
17856	future.FutureAPI = &azFuture
17857	future.Result = future.result
17858	return nil
17859}
17860
17861// result is the default implementation for P2sVpnGatewaysCreateOrUpdateFuture.Result.
17862func (future *P2sVpnGatewaysCreateOrUpdateFuture) result(client P2sVpnGatewaysClient) (pvg P2SVpnGateway, err error) {
17863	var done bool
17864	done, err = future.DoneWithContext(context.Background(), client)
17865	if err != nil {
17866		err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
17867		return
17868	}
17869	if !done {
17870		pvg.Response.Response = future.Response()
17871		err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysCreateOrUpdateFuture")
17872		return
17873	}
17874	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17875	if pvg.Response.Response, err = future.GetResult(sender); err == nil && pvg.Response.Response.StatusCode != http.StatusNoContent {
17876		pvg, err = client.CreateOrUpdateResponder(pvg.Response.Response)
17877		if err != nil {
17878			err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysCreateOrUpdateFuture", "Result", pvg.Response.Response, "Failure responding to request")
17879		}
17880	}
17881	return
17882}
17883
17884// P2sVpnGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
17885// operation.
17886type P2sVpnGatewaysDeleteFuture struct {
17887	azure.FutureAPI
17888	// Result returns the result of the asynchronous operation.
17889	// If the operation has not completed it will return an error.
17890	Result func(P2sVpnGatewaysClient) (autorest.Response, error)
17891}
17892
17893// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17894func (future *P2sVpnGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
17895	var azFuture azure.Future
17896	if err := json.Unmarshal(body, &azFuture); err != nil {
17897		return err
17898	}
17899	future.FutureAPI = &azFuture
17900	future.Result = future.result
17901	return nil
17902}
17903
17904// result is the default implementation for P2sVpnGatewaysDeleteFuture.Result.
17905func (future *P2sVpnGatewaysDeleteFuture) result(client P2sVpnGatewaysClient) (ar autorest.Response, err error) {
17906	var done bool
17907	done, err = future.DoneWithContext(context.Background(), client)
17908	if err != nil {
17909		err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
17910		return
17911	}
17912	if !done {
17913		ar.Response = future.Response()
17914		err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysDeleteFuture")
17915		return
17916	}
17917	ar.Response = future.Response()
17918	return
17919}
17920
17921// P2sVpnGatewaysGenerateVpnProfileFuture an abstraction for monitoring and retrieving the results of a
17922// long-running operation.
17923type P2sVpnGatewaysGenerateVpnProfileFuture struct {
17924	azure.FutureAPI
17925	// Result returns the result of the asynchronous operation.
17926	// If the operation has not completed it will return an error.
17927	Result func(P2sVpnGatewaysClient) (VpnProfileResponse, error)
17928}
17929
17930// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17931func (future *P2sVpnGatewaysGenerateVpnProfileFuture) UnmarshalJSON(body []byte) error {
17932	var azFuture azure.Future
17933	if err := json.Unmarshal(body, &azFuture); err != nil {
17934		return err
17935	}
17936	future.FutureAPI = &azFuture
17937	future.Result = future.result
17938	return nil
17939}
17940
17941// result is the default implementation for P2sVpnGatewaysGenerateVpnProfileFuture.Result.
17942func (future *P2sVpnGatewaysGenerateVpnProfileFuture) result(client P2sVpnGatewaysClient) (vpr VpnProfileResponse, err error) {
17943	var done bool
17944	done, err = future.DoneWithContext(context.Background(), client)
17945	if err != nil {
17946		err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGenerateVpnProfileFuture", "Result", future.Response(), "Polling failure")
17947		return
17948	}
17949	if !done {
17950		vpr.Response.Response = future.Response()
17951		err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysGenerateVpnProfileFuture")
17952		return
17953	}
17954	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17955	if vpr.Response.Response, err = future.GetResult(sender); err == nil && vpr.Response.Response.StatusCode != http.StatusNoContent {
17956		vpr, err = client.GenerateVpnProfileResponder(vpr.Response.Response)
17957		if err != nil {
17958			err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysGenerateVpnProfileFuture", "Result", vpr.Response.Response, "Failure responding to request")
17959		}
17960	}
17961	return
17962}
17963
17964// P2sVpnGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
17965// long-running operation.
17966type P2sVpnGatewaysUpdateTagsFuture struct {
17967	azure.FutureAPI
17968	// Result returns the result of the asynchronous operation.
17969	// If the operation has not completed it will return an error.
17970	Result func(P2sVpnGatewaysClient) (P2SVpnGateway, error)
17971}
17972
17973// UnmarshalJSON is the custom unmarshaller for CreateFuture.
17974func (future *P2sVpnGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error {
17975	var azFuture azure.Future
17976	if err := json.Unmarshal(body, &azFuture); err != nil {
17977		return err
17978	}
17979	future.FutureAPI = &azFuture
17980	future.Result = future.result
17981	return nil
17982}
17983
17984// result is the default implementation for P2sVpnGatewaysUpdateTagsFuture.Result.
17985func (future *P2sVpnGatewaysUpdateTagsFuture) result(client P2sVpnGatewaysClient) (pvg P2SVpnGateway, err error) {
17986	var done bool
17987	done, err = future.DoneWithContext(context.Background(), client)
17988	if err != nil {
17989		err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
17990		return
17991	}
17992	if !done {
17993		pvg.Response.Response = future.Response()
17994		err = azure.NewAsyncOpIncompleteError("network.P2sVpnGatewaysUpdateTagsFuture")
17995		return
17996	}
17997	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17998	if pvg.Response.Response, err = future.GetResult(sender); err == nil && pvg.Response.Response.StatusCode != http.StatusNoContent {
17999		pvg, err = client.UpdateTagsResponder(pvg.Response.Response)
18000		if err != nil {
18001			err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysUpdateTagsFuture", "Result", pvg.Response.Response, "Failure responding to request")
18002		}
18003	}
18004	return
18005}
18006
18007// P2SVpnProfileParameters vpn Client Parameters for package generation
18008type P2SVpnProfileParameters struct {
18009	// AuthenticationMethod - VPN client Authentication Method. Possible values are: 'EAPTLS' and 'EAPMSCHAPv2'. Possible values include: 'EAPTLS', 'EAPMSCHAPv2'
18010	AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"`
18011}
18012
18013// P2SVpnServerConfigRadiusClientRootCertificate radius client root certificate of
18014// P2SVpnServerConfiguration.
18015type P2SVpnServerConfigRadiusClientRootCertificate struct {
18016	// P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat - Properties of the Radius client root certificate.
18017	*P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat `json:"properties,omitempty"`
18018	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
18019	Name *string `json:"name,omitempty"`
18020	// Etag - A unique read-only string that changes whenever the resource is updated.
18021	Etag *string `json:"etag,omitempty"`
18022	// ID - Resource ID.
18023	ID *string `json:"id,omitempty"`
18024}
18025
18026// MarshalJSON is the custom marshaler for P2SVpnServerConfigRadiusClientRootCertificate.
18027func (pvscrcrc P2SVpnServerConfigRadiusClientRootCertificate) MarshalJSON() ([]byte, error) {
18028	objectMap := make(map[string]interface{})
18029	if pvscrcrc.P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat != nil {
18030		objectMap["properties"] = pvscrcrc.P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat
18031	}
18032	if pvscrcrc.Name != nil {
18033		objectMap["name"] = pvscrcrc.Name
18034	}
18035	if pvscrcrc.Etag != nil {
18036		objectMap["etag"] = pvscrcrc.Etag
18037	}
18038	if pvscrcrc.ID != nil {
18039		objectMap["id"] = pvscrcrc.ID
18040	}
18041	return json.Marshal(objectMap)
18042}
18043
18044// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfigRadiusClientRootCertificate struct.
18045func (pvscrcrc *P2SVpnServerConfigRadiusClientRootCertificate) UnmarshalJSON(body []byte) error {
18046	var m map[string]*json.RawMessage
18047	err := json.Unmarshal(body, &m)
18048	if err != nil {
18049		return err
18050	}
18051	for k, v := range m {
18052		switch k {
18053		case "properties":
18054			if v != nil {
18055				var p2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat
18056				err = json.Unmarshal(*v, &p2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat)
18057				if err != nil {
18058					return err
18059				}
18060				pvscrcrc.P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat = &p2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat
18061			}
18062		case "name":
18063			if v != nil {
18064				var name string
18065				err = json.Unmarshal(*v, &name)
18066				if err != nil {
18067					return err
18068				}
18069				pvscrcrc.Name = &name
18070			}
18071		case "etag":
18072			if v != nil {
18073				var etag string
18074				err = json.Unmarshal(*v, &etag)
18075				if err != nil {
18076					return err
18077				}
18078				pvscrcrc.Etag = &etag
18079			}
18080		case "id":
18081			if v != nil {
18082				var ID string
18083				err = json.Unmarshal(*v, &ID)
18084				if err != nil {
18085					return err
18086				}
18087				pvscrcrc.ID = &ID
18088			}
18089		}
18090	}
18091
18092	return nil
18093}
18094
18095// P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat properties of the Radius client root
18096// certificate of P2SVpnServerConfiguration.
18097type P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat struct {
18098	// Thumbprint - The Radius client root certificate thumbprint.
18099	Thumbprint *string `json:"thumbprint,omitempty"`
18100	// ProvisioningState - READ-ONLY; The provisioning state of the Radius client root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
18101	ProvisioningState *string `json:"provisioningState,omitempty"`
18102}
18103
18104// MarshalJSON is the custom marshaler for P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat.
18105func (pvscrcrcpf P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
18106	objectMap := make(map[string]interface{})
18107	if pvscrcrcpf.Thumbprint != nil {
18108		objectMap["thumbprint"] = pvscrcrcpf.Thumbprint
18109	}
18110	return json.Marshal(objectMap)
18111}
18112
18113// P2SVpnServerConfigRadiusServerRootCertificate radius Server root certificate of
18114// P2SVpnServerConfiguration.
18115type P2SVpnServerConfigRadiusServerRootCertificate struct {
18116	// P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat - Properties of the P2SVpnServerConfiguration Radius Server root certificate.
18117	*P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat `json:"properties,omitempty"`
18118	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
18119	Name *string `json:"name,omitempty"`
18120	// Etag - A unique read-only string that changes whenever the resource is updated.
18121	Etag *string `json:"etag,omitempty"`
18122	// ID - Resource ID.
18123	ID *string `json:"id,omitempty"`
18124}
18125
18126// MarshalJSON is the custom marshaler for P2SVpnServerConfigRadiusServerRootCertificate.
18127func (pvscrsrc P2SVpnServerConfigRadiusServerRootCertificate) MarshalJSON() ([]byte, error) {
18128	objectMap := make(map[string]interface{})
18129	if pvscrsrc.P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat != nil {
18130		objectMap["properties"] = pvscrsrc.P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat
18131	}
18132	if pvscrsrc.Name != nil {
18133		objectMap["name"] = pvscrsrc.Name
18134	}
18135	if pvscrsrc.Etag != nil {
18136		objectMap["etag"] = pvscrsrc.Etag
18137	}
18138	if pvscrsrc.ID != nil {
18139		objectMap["id"] = pvscrsrc.ID
18140	}
18141	return json.Marshal(objectMap)
18142}
18143
18144// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfigRadiusServerRootCertificate struct.
18145func (pvscrsrc *P2SVpnServerConfigRadiusServerRootCertificate) UnmarshalJSON(body []byte) error {
18146	var m map[string]*json.RawMessage
18147	err := json.Unmarshal(body, &m)
18148	if err != nil {
18149		return err
18150	}
18151	for k, v := range m {
18152		switch k {
18153		case "properties":
18154			if v != nil {
18155				var p2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat
18156				err = json.Unmarshal(*v, &p2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat)
18157				if err != nil {
18158					return err
18159				}
18160				pvscrsrc.P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat = &p2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat
18161			}
18162		case "name":
18163			if v != nil {
18164				var name string
18165				err = json.Unmarshal(*v, &name)
18166				if err != nil {
18167					return err
18168				}
18169				pvscrsrc.Name = &name
18170			}
18171		case "etag":
18172			if v != nil {
18173				var etag string
18174				err = json.Unmarshal(*v, &etag)
18175				if err != nil {
18176					return err
18177				}
18178				pvscrsrc.Etag = &etag
18179			}
18180		case "id":
18181			if v != nil {
18182				var ID string
18183				err = json.Unmarshal(*v, &ID)
18184				if err != nil {
18185					return err
18186				}
18187				pvscrsrc.ID = &ID
18188			}
18189		}
18190	}
18191
18192	return nil
18193}
18194
18195// P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat properties of Radius Server root
18196// certificate of P2SVpnServerConfiguration.
18197type P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat struct {
18198	// PublicCertData - The certificate public data.
18199	PublicCertData *string `json:"publicCertData,omitempty"`
18200	// ProvisioningState - READ-ONLY; The provisioning state of the P2SVpnServerConfiguration Radius Server root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
18201	ProvisioningState *string `json:"provisioningState,omitempty"`
18202}
18203
18204// MarshalJSON is the custom marshaler for P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat.
18205func (pvscrsrcpf P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
18206	objectMap := make(map[string]interface{})
18207	if pvscrsrcpf.PublicCertData != nil {
18208		objectMap["publicCertData"] = pvscrsrcpf.PublicCertData
18209	}
18210	return json.Marshal(objectMap)
18211}
18212
18213// P2SVpnServerConfiguration p2SVpnServerConfiguration Resource.
18214type P2SVpnServerConfiguration struct {
18215	autorest.Response                    `json:"-"`
18216	*P2SVpnServerConfigurationProperties `json:"properties,omitempty"`
18217	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
18218	Name *string `json:"name,omitempty"`
18219	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
18220	Etag *string `json:"etag,omitempty"`
18221	// ID - Resource ID.
18222	ID *string `json:"id,omitempty"`
18223}
18224
18225// MarshalJSON is the custom marshaler for P2SVpnServerConfiguration.
18226func (pvsc P2SVpnServerConfiguration) MarshalJSON() ([]byte, error) {
18227	objectMap := make(map[string]interface{})
18228	if pvsc.P2SVpnServerConfigurationProperties != nil {
18229		objectMap["properties"] = pvsc.P2SVpnServerConfigurationProperties
18230	}
18231	if pvsc.Name != nil {
18232		objectMap["name"] = pvsc.Name
18233	}
18234	if pvsc.ID != nil {
18235		objectMap["id"] = pvsc.ID
18236	}
18237	return json.Marshal(objectMap)
18238}
18239
18240// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfiguration struct.
18241func (pvsc *P2SVpnServerConfiguration) UnmarshalJSON(body []byte) error {
18242	var m map[string]*json.RawMessage
18243	err := json.Unmarshal(body, &m)
18244	if err != nil {
18245		return err
18246	}
18247	for k, v := range m {
18248		switch k {
18249		case "properties":
18250			if v != nil {
18251				var p2SVpnServerConfigurationProperties P2SVpnServerConfigurationProperties
18252				err = json.Unmarshal(*v, &p2SVpnServerConfigurationProperties)
18253				if err != nil {
18254					return err
18255				}
18256				pvsc.P2SVpnServerConfigurationProperties = &p2SVpnServerConfigurationProperties
18257			}
18258		case "name":
18259			if v != nil {
18260				var name string
18261				err = json.Unmarshal(*v, &name)
18262				if err != nil {
18263					return err
18264				}
18265				pvsc.Name = &name
18266			}
18267		case "etag":
18268			if v != nil {
18269				var etag string
18270				err = json.Unmarshal(*v, &etag)
18271				if err != nil {
18272					return err
18273				}
18274				pvsc.Etag = &etag
18275			}
18276		case "id":
18277			if v != nil {
18278				var ID string
18279				err = json.Unmarshal(*v, &ID)
18280				if err != nil {
18281					return err
18282				}
18283				pvsc.ID = &ID
18284			}
18285		}
18286	}
18287
18288	return nil
18289}
18290
18291// P2SVpnServerConfigurationProperties parameters for P2SVpnServerConfiguration
18292type P2SVpnServerConfigurationProperties struct {
18293	// 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 Parent VirtualWan resource name.
18294	Name *string `json:"name,omitempty"`
18295	// VpnProtocols - vpnProtocols for the P2SVpnServerConfiguration.
18296	VpnProtocols *[]VpnGatewayTunnelingProtocol `json:"vpnProtocols,omitempty"`
18297	// P2SVpnServerConfigVpnClientRootCertificates - VPN client root certificate of P2SVpnServerConfiguration.
18298	P2SVpnServerConfigVpnClientRootCertificates *[]P2SVpnServerConfigVpnClientRootCertificate `json:"p2SVpnServerConfigVpnClientRootCertificates,omitempty"`
18299	// P2SVpnServerConfigVpnClientRevokedCertificates - VPN client revoked certificate of P2SVpnServerConfiguration.
18300	P2SVpnServerConfigVpnClientRevokedCertificates *[]P2SVpnServerConfigVpnClientRevokedCertificate `json:"p2SVpnServerConfigVpnClientRevokedCertificates,omitempty"`
18301	// P2SVpnServerConfigRadiusServerRootCertificates - Radius Server root certificate of P2SVpnServerConfiguration.
18302	P2SVpnServerConfigRadiusServerRootCertificates *[]P2SVpnServerConfigRadiusServerRootCertificate `json:"p2SVpnServerConfigRadiusServerRootCertificates,omitempty"`
18303	// P2SVpnServerConfigRadiusClientRootCertificates - Radius client root certificate of P2SVpnServerConfiguration.
18304	P2SVpnServerConfigRadiusClientRootCertificates *[]P2SVpnServerConfigRadiusClientRootCertificate `json:"p2SVpnServerConfigRadiusClientRootCertificates,omitempty"`
18305	// VpnClientIpsecPolicies - VpnClientIpsecPolicies for P2SVpnServerConfiguration.
18306	VpnClientIpsecPolicies *[]IpsecPolicy `json:"vpnClientIpsecPolicies,omitempty"`
18307	// RadiusServerAddress - The radius server address property of the P2SVpnServerConfiguration resource for point to site client connection.
18308	RadiusServerAddress *string `json:"radiusServerAddress,omitempty"`
18309	// RadiusServerSecret - The radius secret property of the P2SVpnServerConfiguration resource for point to site client connection.
18310	RadiusServerSecret *string `json:"radiusServerSecret,omitempty"`
18311	// ProvisioningState - READ-ONLY; The provisioning state of the P2SVpnServerConfiguration resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
18312	ProvisioningState *string `json:"provisioningState,omitempty"`
18313	// P2SVpnGateways - READ-ONLY
18314	P2SVpnGateways *[]SubResource `json:"p2SVpnGateways,omitempty"`
18315	// Etag - A unique read-only string that changes whenever the resource is updated.
18316	Etag *string `json:"etag,omitempty"`
18317}
18318
18319// MarshalJSON is the custom marshaler for P2SVpnServerConfigurationProperties.
18320func (pvscp P2SVpnServerConfigurationProperties) MarshalJSON() ([]byte, error) {
18321	objectMap := make(map[string]interface{})
18322	if pvscp.Name != nil {
18323		objectMap["name"] = pvscp.Name
18324	}
18325	if pvscp.VpnProtocols != nil {
18326		objectMap["vpnProtocols"] = pvscp.VpnProtocols
18327	}
18328	if pvscp.P2SVpnServerConfigVpnClientRootCertificates != nil {
18329		objectMap["p2SVpnServerConfigVpnClientRootCertificates"] = pvscp.P2SVpnServerConfigVpnClientRootCertificates
18330	}
18331	if pvscp.P2SVpnServerConfigVpnClientRevokedCertificates != nil {
18332		objectMap["p2SVpnServerConfigVpnClientRevokedCertificates"] = pvscp.P2SVpnServerConfigVpnClientRevokedCertificates
18333	}
18334	if pvscp.P2SVpnServerConfigRadiusServerRootCertificates != nil {
18335		objectMap["p2SVpnServerConfigRadiusServerRootCertificates"] = pvscp.P2SVpnServerConfigRadiusServerRootCertificates
18336	}
18337	if pvscp.P2SVpnServerConfigRadiusClientRootCertificates != nil {
18338		objectMap["p2SVpnServerConfigRadiusClientRootCertificates"] = pvscp.P2SVpnServerConfigRadiusClientRootCertificates
18339	}
18340	if pvscp.VpnClientIpsecPolicies != nil {
18341		objectMap["vpnClientIpsecPolicies"] = pvscp.VpnClientIpsecPolicies
18342	}
18343	if pvscp.RadiusServerAddress != nil {
18344		objectMap["radiusServerAddress"] = pvscp.RadiusServerAddress
18345	}
18346	if pvscp.RadiusServerSecret != nil {
18347		objectMap["radiusServerSecret"] = pvscp.RadiusServerSecret
18348	}
18349	if pvscp.Etag != nil {
18350		objectMap["etag"] = pvscp.Etag
18351	}
18352	return json.Marshal(objectMap)
18353}
18354
18355// P2sVpnServerConfigurationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
18356// of a long-running operation.
18357type P2sVpnServerConfigurationsCreateOrUpdateFuture struct {
18358	azure.FutureAPI
18359	// Result returns the result of the asynchronous operation.
18360	// If the operation has not completed it will return an error.
18361	Result func(P2sVpnServerConfigurationsClient) (P2SVpnServerConfiguration, error)
18362}
18363
18364// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18365func (future *P2sVpnServerConfigurationsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
18366	var azFuture azure.Future
18367	if err := json.Unmarshal(body, &azFuture); err != nil {
18368		return err
18369	}
18370	future.FutureAPI = &azFuture
18371	future.Result = future.result
18372	return nil
18373}
18374
18375// result is the default implementation for P2sVpnServerConfigurationsCreateOrUpdateFuture.Result.
18376func (future *P2sVpnServerConfigurationsCreateOrUpdateFuture) result(client P2sVpnServerConfigurationsClient) (pvsc P2SVpnServerConfiguration, err error) {
18377	var done bool
18378	done, err = future.DoneWithContext(context.Background(), client)
18379	if err != nil {
18380		err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
18381		return
18382	}
18383	if !done {
18384		pvsc.Response.Response = future.Response()
18385		err = azure.NewAsyncOpIncompleteError("network.P2sVpnServerConfigurationsCreateOrUpdateFuture")
18386		return
18387	}
18388	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18389	if pvsc.Response.Response, err = future.GetResult(sender); err == nil && pvsc.Response.Response.StatusCode != http.StatusNoContent {
18390		pvsc, err = client.CreateOrUpdateResponder(pvsc.Response.Response)
18391		if err != nil {
18392			err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsCreateOrUpdateFuture", "Result", pvsc.Response.Response, "Failure responding to request")
18393		}
18394	}
18395	return
18396}
18397
18398// P2sVpnServerConfigurationsDeleteFuture an abstraction for monitoring and retrieving the results of a
18399// long-running operation.
18400type P2sVpnServerConfigurationsDeleteFuture struct {
18401	azure.FutureAPI
18402	// Result returns the result of the asynchronous operation.
18403	// If the operation has not completed it will return an error.
18404	Result func(P2sVpnServerConfigurationsClient) (autorest.Response, error)
18405}
18406
18407// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18408func (future *P2sVpnServerConfigurationsDeleteFuture) UnmarshalJSON(body []byte) error {
18409	var azFuture azure.Future
18410	if err := json.Unmarshal(body, &azFuture); err != nil {
18411		return err
18412	}
18413	future.FutureAPI = &azFuture
18414	future.Result = future.result
18415	return nil
18416}
18417
18418// result is the default implementation for P2sVpnServerConfigurationsDeleteFuture.Result.
18419func (future *P2sVpnServerConfigurationsDeleteFuture) result(client P2sVpnServerConfigurationsClient) (ar autorest.Response, err error) {
18420	var done bool
18421	done, err = future.DoneWithContext(context.Background(), client)
18422	if err != nil {
18423		err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsDeleteFuture", "Result", future.Response(), "Polling failure")
18424		return
18425	}
18426	if !done {
18427		ar.Response = future.Response()
18428		err = azure.NewAsyncOpIncompleteError("network.P2sVpnServerConfigurationsDeleteFuture")
18429		return
18430	}
18431	ar.Response = future.Response()
18432	return
18433}
18434
18435// P2SVpnServerConfigVpnClientRevokedCertificate VPN client revoked certificate of
18436// P2SVpnServerConfiguration.
18437type P2SVpnServerConfigVpnClientRevokedCertificate struct {
18438	// P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat - Properties of the vpn client revoked certificate.
18439	*P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat `json:"properties,omitempty"`
18440	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
18441	Name *string `json:"name,omitempty"`
18442	// Etag - 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}
18447
18448// MarshalJSON is the custom marshaler for P2SVpnServerConfigVpnClientRevokedCertificate.
18449func (pvscvcrc P2SVpnServerConfigVpnClientRevokedCertificate) MarshalJSON() ([]byte, error) {
18450	objectMap := make(map[string]interface{})
18451	if pvscvcrc.P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat != nil {
18452		objectMap["properties"] = pvscvcrc.P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat
18453	}
18454	if pvscvcrc.Name != nil {
18455		objectMap["name"] = pvscvcrc.Name
18456	}
18457	if pvscvcrc.Etag != nil {
18458		objectMap["etag"] = pvscvcrc.Etag
18459	}
18460	if pvscvcrc.ID != nil {
18461		objectMap["id"] = pvscvcrc.ID
18462	}
18463	return json.Marshal(objectMap)
18464}
18465
18466// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfigVpnClientRevokedCertificate struct.
18467func (pvscvcrc *P2SVpnServerConfigVpnClientRevokedCertificate) UnmarshalJSON(body []byte) error {
18468	var m map[string]*json.RawMessage
18469	err := json.Unmarshal(body, &m)
18470	if err != nil {
18471		return err
18472	}
18473	for k, v := range m {
18474		switch k {
18475		case "properties":
18476			if v != nil {
18477				var p2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat
18478				err = json.Unmarshal(*v, &p2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat)
18479				if err != nil {
18480					return err
18481				}
18482				pvscvcrc.P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat = &p2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat
18483			}
18484		case "name":
18485			if v != nil {
18486				var name string
18487				err = json.Unmarshal(*v, &name)
18488				if err != nil {
18489					return err
18490				}
18491				pvscvcrc.Name = &name
18492			}
18493		case "etag":
18494			if v != nil {
18495				var etag string
18496				err = json.Unmarshal(*v, &etag)
18497				if err != nil {
18498					return err
18499				}
18500				pvscvcrc.Etag = &etag
18501			}
18502		case "id":
18503			if v != nil {
18504				var ID string
18505				err = json.Unmarshal(*v, &ID)
18506				if err != nil {
18507					return err
18508				}
18509				pvscvcrc.ID = &ID
18510			}
18511		}
18512	}
18513
18514	return nil
18515}
18516
18517// P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat properties of the revoked VPN client
18518// certificate of P2SVpnServerConfiguration.
18519type P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat struct {
18520	// Thumbprint - The revoked VPN client certificate thumbprint.
18521	Thumbprint *string `json:"thumbprint,omitempty"`
18522	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client revoked certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
18523	ProvisioningState *string `json:"provisioningState,omitempty"`
18524}
18525
18526// MarshalJSON is the custom marshaler for P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat.
18527func (pvscvcrcpf P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
18528	objectMap := make(map[string]interface{})
18529	if pvscvcrcpf.Thumbprint != nil {
18530		objectMap["thumbprint"] = pvscvcrcpf.Thumbprint
18531	}
18532	return json.Marshal(objectMap)
18533}
18534
18535// P2SVpnServerConfigVpnClientRootCertificate VPN client root certificate of P2SVpnServerConfiguration.
18536type P2SVpnServerConfigVpnClientRootCertificate struct {
18537	// P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat - Properties of the P2SVpnServerConfiguration VPN client root certificate.
18538	*P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat `json:"properties,omitempty"`
18539	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
18540	Name *string `json:"name,omitempty"`
18541	// Etag - A unique read-only string that changes whenever the resource is updated.
18542	Etag *string `json:"etag,omitempty"`
18543	// ID - Resource ID.
18544	ID *string `json:"id,omitempty"`
18545}
18546
18547// MarshalJSON is the custom marshaler for P2SVpnServerConfigVpnClientRootCertificate.
18548func (pvscvcrc P2SVpnServerConfigVpnClientRootCertificate) MarshalJSON() ([]byte, error) {
18549	objectMap := make(map[string]interface{})
18550	if pvscvcrc.P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat != nil {
18551		objectMap["properties"] = pvscvcrc.P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat
18552	}
18553	if pvscvcrc.Name != nil {
18554		objectMap["name"] = pvscvcrc.Name
18555	}
18556	if pvscvcrc.Etag != nil {
18557		objectMap["etag"] = pvscvcrc.Etag
18558	}
18559	if pvscvcrc.ID != nil {
18560		objectMap["id"] = pvscvcrc.ID
18561	}
18562	return json.Marshal(objectMap)
18563}
18564
18565// UnmarshalJSON is the custom unmarshaler for P2SVpnServerConfigVpnClientRootCertificate struct.
18566func (pvscvcrc *P2SVpnServerConfigVpnClientRootCertificate) UnmarshalJSON(body []byte) error {
18567	var m map[string]*json.RawMessage
18568	err := json.Unmarshal(body, &m)
18569	if err != nil {
18570		return err
18571	}
18572	for k, v := range m {
18573		switch k {
18574		case "properties":
18575			if v != nil {
18576				var p2SVpnServerConfigVpnClientRootCertificatePropertiesFormat P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat
18577				err = json.Unmarshal(*v, &p2SVpnServerConfigVpnClientRootCertificatePropertiesFormat)
18578				if err != nil {
18579					return err
18580				}
18581				pvscvcrc.P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat = &p2SVpnServerConfigVpnClientRootCertificatePropertiesFormat
18582			}
18583		case "name":
18584			if v != nil {
18585				var name string
18586				err = json.Unmarshal(*v, &name)
18587				if err != nil {
18588					return err
18589				}
18590				pvscvcrc.Name = &name
18591			}
18592		case "etag":
18593			if v != nil {
18594				var etag string
18595				err = json.Unmarshal(*v, &etag)
18596				if err != nil {
18597					return err
18598				}
18599				pvscvcrc.Etag = &etag
18600			}
18601		case "id":
18602			if v != nil {
18603				var ID string
18604				err = json.Unmarshal(*v, &ID)
18605				if err != nil {
18606					return err
18607				}
18608				pvscvcrc.ID = &ID
18609			}
18610		}
18611	}
18612
18613	return nil
18614}
18615
18616// P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat properties of VPN client root certificate of
18617// P2SVpnServerConfiguration.
18618type P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat struct {
18619	// PublicCertData - The certificate public data.
18620	PublicCertData *string `json:"publicCertData,omitempty"`
18621	// ProvisioningState - READ-ONLY; The provisioning state of the P2SVpnServerConfiguration VPN client root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
18622	ProvisioningState *string `json:"provisioningState,omitempty"`
18623}
18624
18625// MarshalJSON is the custom marshaler for P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat.
18626func (pvscvcrcpf P2SVpnServerConfigVpnClientRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
18627	objectMap := make(map[string]interface{})
18628	if pvscvcrcpf.PublicCertData != nil {
18629		objectMap["publicCertData"] = pvscvcrcpf.PublicCertData
18630	}
18631	return json.Marshal(objectMap)
18632}
18633
18634// PacketCapture parameters that define the create packet capture operation.
18635type PacketCapture struct {
18636	*PacketCaptureParameters `json:"properties,omitempty"`
18637}
18638
18639// MarshalJSON is the custom marshaler for PacketCapture.
18640func (pc PacketCapture) MarshalJSON() ([]byte, error) {
18641	objectMap := make(map[string]interface{})
18642	if pc.PacketCaptureParameters != nil {
18643		objectMap["properties"] = pc.PacketCaptureParameters
18644	}
18645	return json.Marshal(objectMap)
18646}
18647
18648// UnmarshalJSON is the custom unmarshaler for PacketCapture struct.
18649func (pc *PacketCapture) UnmarshalJSON(body []byte) error {
18650	var m map[string]*json.RawMessage
18651	err := json.Unmarshal(body, &m)
18652	if err != nil {
18653		return err
18654	}
18655	for k, v := range m {
18656		switch k {
18657		case "properties":
18658			if v != nil {
18659				var packetCaptureParameters PacketCaptureParameters
18660				err = json.Unmarshal(*v, &packetCaptureParameters)
18661				if err != nil {
18662					return err
18663				}
18664				pc.PacketCaptureParameters = &packetCaptureParameters
18665			}
18666		}
18667	}
18668
18669	return nil
18670}
18671
18672// PacketCaptureFilter filter that is applied to packet capture request. Multiple filters can be applied.
18673type PacketCaptureFilter struct {
18674	// Protocol - Protocol to be filtered on. Possible values include: 'PcProtocolTCP', 'PcProtocolUDP', 'PcProtocolAny'
18675	Protocol PcProtocol `json:"protocol,omitempty"`
18676	// 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.
18677	LocalIPAddress *string `json:"localIPAddress,omitempty"`
18678	// 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.
18679	RemoteIPAddress *string `json:"remoteIPAddress,omitempty"`
18680	// 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.
18681	LocalPort *string `json:"localPort,omitempty"`
18682	// 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.
18683	RemotePort *string `json:"remotePort,omitempty"`
18684}
18685
18686// PacketCaptureListResult list of packet capture sessions.
18687type PacketCaptureListResult struct {
18688	autorest.Response `json:"-"`
18689	// Value - Information about packet capture sessions.
18690	Value *[]PacketCaptureResult `json:"value,omitempty"`
18691}
18692
18693// PacketCaptureParameters parameters that define the create packet capture operation.
18694type PacketCaptureParameters struct {
18695	// Target - The ID of the targeted resource, only VM is currently supported.
18696	Target *string `json:"target,omitempty"`
18697	// BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated.
18698	BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"`
18699	// TotalBytesPerSession - Maximum size of the capture output.
18700	TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"`
18701	// TimeLimitInSeconds - Maximum duration of the capture session in seconds.
18702	TimeLimitInSeconds *int32                        `json:"timeLimitInSeconds,omitempty"`
18703	StorageLocation    *PacketCaptureStorageLocation `json:"storageLocation,omitempty"`
18704	Filters            *[]PacketCaptureFilter        `json:"filters,omitempty"`
18705}
18706
18707// PacketCaptureQueryStatusResult status of packet capture session.
18708type PacketCaptureQueryStatusResult struct {
18709	autorest.Response `json:"-"`
18710	// Name - The name of the packet capture resource.
18711	Name *string `json:"name,omitempty"`
18712	// ID - The ID of the packet capture resource.
18713	ID *string `json:"id,omitempty"`
18714	// CaptureStartTime - The start time of the packet capture session.
18715	CaptureStartTime *date.Time `json:"captureStartTime,omitempty"`
18716	// PacketCaptureStatus - The status of the packet capture session. Possible values include: 'PcStatusNotStarted', 'PcStatusRunning', 'PcStatusStopped', 'PcStatusError', 'PcStatusUnknown'
18717	PacketCaptureStatus PcStatus `json:"packetCaptureStatus,omitempty"`
18718	// StopReason - The reason the current packet capture session was stopped.
18719	StopReason *string `json:"stopReason,omitempty"`
18720	// PacketCaptureError - List of errors of packet capture session.
18721	PacketCaptureError *[]PcError `json:"packetCaptureError,omitempty"`
18722}
18723
18724// PacketCaptureResult information about packet capture session.
18725type PacketCaptureResult struct {
18726	autorest.Response `json:"-"`
18727	// Name - READ-ONLY; Name of the packet capture session.
18728	Name *string `json:"name,omitempty"`
18729	// ID - READ-ONLY; ID of the packet capture operation.
18730	ID                             *string `json:"id,omitempty"`
18731	Etag                           *string `json:"etag,omitempty"`
18732	*PacketCaptureResultProperties `json:"properties,omitempty"`
18733}
18734
18735// MarshalJSON is the custom marshaler for PacketCaptureResult.
18736func (pcr PacketCaptureResult) MarshalJSON() ([]byte, error) {
18737	objectMap := make(map[string]interface{})
18738	if pcr.Etag != nil {
18739		objectMap["etag"] = pcr.Etag
18740	}
18741	if pcr.PacketCaptureResultProperties != nil {
18742		objectMap["properties"] = pcr.PacketCaptureResultProperties
18743	}
18744	return json.Marshal(objectMap)
18745}
18746
18747// UnmarshalJSON is the custom unmarshaler for PacketCaptureResult struct.
18748func (pcr *PacketCaptureResult) UnmarshalJSON(body []byte) error {
18749	var m map[string]*json.RawMessage
18750	err := json.Unmarshal(body, &m)
18751	if err != nil {
18752		return err
18753	}
18754	for k, v := range m {
18755		switch k {
18756		case "name":
18757			if v != nil {
18758				var name string
18759				err = json.Unmarshal(*v, &name)
18760				if err != nil {
18761					return err
18762				}
18763				pcr.Name = &name
18764			}
18765		case "id":
18766			if v != nil {
18767				var ID string
18768				err = json.Unmarshal(*v, &ID)
18769				if err != nil {
18770					return err
18771				}
18772				pcr.ID = &ID
18773			}
18774		case "etag":
18775			if v != nil {
18776				var etag string
18777				err = json.Unmarshal(*v, &etag)
18778				if err != nil {
18779					return err
18780				}
18781				pcr.Etag = &etag
18782			}
18783		case "properties":
18784			if v != nil {
18785				var packetCaptureResultProperties PacketCaptureResultProperties
18786				err = json.Unmarshal(*v, &packetCaptureResultProperties)
18787				if err != nil {
18788					return err
18789				}
18790				pcr.PacketCaptureResultProperties = &packetCaptureResultProperties
18791			}
18792		}
18793	}
18794
18795	return nil
18796}
18797
18798// PacketCaptureResultProperties describes the properties of a packet capture session.
18799type PacketCaptureResultProperties struct {
18800	// ProvisioningState - The provisioning state of the packet capture session. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
18801	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
18802	// Target - The ID of the targeted resource, only VM is currently supported.
18803	Target *string `json:"target,omitempty"`
18804	// BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated.
18805	BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"`
18806	// TotalBytesPerSession - Maximum size of the capture output.
18807	TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"`
18808	// TimeLimitInSeconds - Maximum duration of the capture session in seconds.
18809	TimeLimitInSeconds *int32                        `json:"timeLimitInSeconds,omitempty"`
18810	StorageLocation    *PacketCaptureStorageLocation `json:"storageLocation,omitempty"`
18811	Filters            *[]PacketCaptureFilter        `json:"filters,omitempty"`
18812}
18813
18814// PacketCapturesCreateFuture an abstraction for monitoring and retrieving the results of a long-running
18815// operation.
18816type PacketCapturesCreateFuture struct {
18817	azure.FutureAPI
18818	// Result returns the result of the asynchronous operation.
18819	// If the operation has not completed it will return an error.
18820	Result func(PacketCapturesClient) (PacketCaptureResult, error)
18821}
18822
18823// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18824func (future *PacketCapturesCreateFuture) UnmarshalJSON(body []byte) error {
18825	var azFuture azure.Future
18826	if err := json.Unmarshal(body, &azFuture); err != nil {
18827		return err
18828	}
18829	future.FutureAPI = &azFuture
18830	future.Result = future.result
18831	return nil
18832}
18833
18834// result is the default implementation for PacketCapturesCreateFuture.Result.
18835func (future *PacketCapturesCreateFuture) result(client PacketCapturesClient) (pcr PacketCaptureResult, err error) {
18836	var done bool
18837	done, err = future.DoneWithContext(context.Background(), client)
18838	if err != nil {
18839		err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", future.Response(), "Polling failure")
18840		return
18841	}
18842	if !done {
18843		pcr.Response.Response = future.Response()
18844		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesCreateFuture")
18845		return
18846	}
18847	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18848	if pcr.Response.Response, err = future.GetResult(sender); err == nil && pcr.Response.Response.StatusCode != http.StatusNoContent {
18849		pcr, err = client.CreateResponder(pcr.Response.Response)
18850		if err != nil {
18851			err = autorest.NewErrorWithError(err, "network.PacketCapturesCreateFuture", "Result", pcr.Response.Response, "Failure responding to request")
18852		}
18853	}
18854	return
18855}
18856
18857// PacketCapturesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
18858// operation.
18859type PacketCapturesDeleteFuture struct {
18860	azure.FutureAPI
18861	// Result returns the result of the asynchronous operation.
18862	// If the operation has not completed it will return an error.
18863	Result func(PacketCapturesClient) (autorest.Response, error)
18864}
18865
18866// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18867func (future *PacketCapturesDeleteFuture) UnmarshalJSON(body []byte) error {
18868	var azFuture azure.Future
18869	if err := json.Unmarshal(body, &azFuture); err != nil {
18870		return err
18871	}
18872	future.FutureAPI = &azFuture
18873	future.Result = future.result
18874	return nil
18875}
18876
18877// result is the default implementation for PacketCapturesDeleteFuture.Result.
18878func (future *PacketCapturesDeleteFuture) result(client PacketCapturesClient) (ar autorest.Response, err error) {
18879	var done bool
18880	done, err = future.DoneWithContext(context.Background(), client)
18881	if err != nil {
18882		err = autorest.NewErrorWithError(err, "network.PacketCapturesDeleteFuture", "Result", future.Response(), "Polling failure")
18883		return
18884	}
18885	if !done {
18886		ar.Response = future.Response()
18887		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesDeleteFuture")
18888		return
18889	}
18890	ar.Response = future.Response()
18891	return
18892}
18893
18894// PacketCapturesGetStatusFuture an abstraction for monitoring and retrieving the results of a long-running
18895// operation.
18896type PacketCapturesGetStatusFuture struct {
18897	azure.FutureAPI
18898	// Result returns the result of the asynchronous operation.
18899	// If the operation has not completed it will return an error.
18900	Result func(PacketCapturesClient) (PacketCaptureQueryStatusResult, error)
18901}
18902
18903// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18904func (future *PacketCapturesGetStatusFuture) UnmarshalJSON(body []byte) error {
18905	var azFuture azure.Future
18906	if err := json.Unmarshal(body, &azFuture); err != nil {
18907		return err
18908	}
18909	future.FutureAPI = &azFuture
18910	future.Result = future.result
18911	return nil
18912}
18913
18914// result is the default implementation for PacketCapturesGetStatusFuture.Result.
18915func (future *PacketCapturesGetStatusFuture) result(client PacketCapturesClient) (pcqsr PacketCaptureQueryStatusResult, err error) {
18916	var done bool
18917	done, err = future.DoneWithContext(context.Background(), client)
18918	if err != nil {
18919		err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", future.Response(), "Polling failure")
18920		return
18921	}
18922	if !done {
18923		pcqsr.Response.Response = future.Response()
18924		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesGetStatusFuture")
18925		return
18926	}
18927	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
18928	if pcqsr.Response.Response, err = future.GetResult(sender); err == nil && pcqsr.Response.Response.StatusCode != http.StatusNoContent {
18929		pcqsr, err = client.GetStatusResponder(pcqsr.Response.Response)
18930		if err != nil {
18931			err = autorest.NewErrorWithError(err, "network.PacketCapturesGetStatusFuture", "Result", pcqsr.Response.Response, "Failure responding to request")
18932		}
18933	}
18934	return
18935}
18936
18937// PacketCapturesStopFuture an abstraction for monitoring and retrieving the results of a long-running
18938// operation.
18939type PacketCapturesStopFuture struct {
18940	azure.FutureAPI
18941	// Result returns the result of the asynchronous operation.
18942	// If the operation has not completed it will return an error.
18943	Result func(PacketCapturesClient) (autorest.Response, error)
18944}
18945
18946// UnmarshalJSON is the custom unmarshaller for CreateFuture.
18947func (future *PacketCapturesStopFuture) UnmarshalJSON(body []byte) error {
18948	var azFuture azure.Future
18949	if err := json.Unmarshal(body, &azFuture); err != nil {
18950		return err
18951	}
18952	future.FutureAPI = &azFuture
18953	future.Result = future.result
18954	return nil
18955}
18956
18957// result is the default implementation for PacketCapturesStopFuture.Result.
18958func (future *PacketCapturesStopFuture) result(client PacketCapturesClient) (ar autorest.Response, err error) {
18959	var done bool
18960	done, err = future.DoneWithContext(context.Background(), client)
18961	if err != nil {
18962		err = autorest.NewErrorWithError(err, "network.PacketCapturesStopFuture", "Result", future.Response(), "Polling failure")
18963		return
18964	}
18965	if !done {
18966		ar.Response = future.Response()
18967		err = azure.NewAsyncOpIncompleteError("network.PacketCapturesStopFuture")
18968		return
18969	}
18970	ar.Response = future.Response()
18971	return
18972}
18973
18974// PacketCaptureStorageLocation describes the storage location for a packet capture session.
18975type PacketCaptureStorageLocation struct {
18976	// StorageID - The ID of the storage account to save the packet capture session. Required if no local file path is provided.
18977	StorageID *string `json:"storageId,omitempty"`
18978	// 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.
18979	StoragePath *string `json:"storagePath,omitempty"`
18980	// 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.
18981	FilePath *string `json:"filePath,omitempty"`
18982}
18983
18984// PatchRouteFilter route Filter Resource.
18985type PatchRouteFilter struct {
18986	*RouteFilterPropertiesFormat `json:"properties,omitempty"`
18987	// Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource.
18988	Name *string `json:"name,omitempty"`
18989	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
18990	Etag *string `json:"etag,omitempty"`
18991	// Type - READ-ONLY; Resource type.
18992	Type *string `json:"type,omitempty"`
18993	// Tags - Resource tags.
18994	Tags map[string]*string `json:"tags"`
18995	// ID - Resource ID.
18996	ID *string `json:"id,omitempty"`
18997}
18998
18999// MarshalJSON is the custom marshaler for PatchRouteFilter.
19000func (prf PatchRouteFilter) MarshalJSON() ([]byte, error) {
19001	objectMap := make(map[string]interface{})
19002	if prf.RouteFilterPropertiesFormat != nil {
19003		objectMap["properties"] = prf.RouteFilterPropertiesFormat
19004	}
19005	if prf.Tags != nil {
19006		objectMap["tags"] = prf.Tags
19007	}
19008	if prf.ID != nil {
19009		objectMap["id"] = prf.ID
19010	}
19011	return json.Marshal(objectMap)
19012}
19013
19014// UnmarshalJSON is the custom unmarshaler for PatchRouteFilter struct.
19015func (prf *PatchRouteFilter) UnmarshalJSON(body []byte) error {
19016	var m map[string]*json.RawMessage
19017	err := json.Unmarshal(body, &m)
19018	if err != nil {
19019		return err
19020	}
19021	for k, v := range m {
19022		switch k {
19023		case "properties":
19024			if v != nil {
19025				var routeFilterPropertiesFormat RouteFilterPropertiesFormat
19026				err = json.Unmarshal(*v, &routeFilterPropertiesFormat)
19027				if err != nil {
19028					return err
19029				}
19030				prf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat
19031			}
19032		case "name":
19033			if v != nil {
19034				var name string
19035				err = json.Unmarshal(*v, &name)
19036				if err != nil {
19037					return err
19038				}
19039				prf.Name = &name
19040			}
19041		case "etag":
19042			if v != nil {
19043				var etag string
19044				err = json.Unmarshal(*v, &etag)
19045				if err != nil {
19046					return err
19047				}
19048				prf.Etag = &etag
19049			}
19050		case "type":
19051			if v != nil {
19052				var typeVar string
19053				err = json.Unmarshal(*v, &typeVar)
19054				if err != nil {
19055					return err
19056				}
19057				prf.Type = &typeVar
19058			}
19059		case "tags":
19060			if v != nil {
19061				var tags map[string]*string
19062				err = json.Unmarshal(*v, &tags)
19063				if err != nil {
19064					return err
19065				}
19066				prf.Tags = tags
19067			}
19068		case "id":
19069			if v != nil {
19070				var ID string
19071				err = json.Unmarshal(*v, &ID)
19072				if err != nil {
19073					return err
19074				}
19075				prf.ID = &ID
19076			}
19077		}
19078	}
19079
19080	return nil
19081}
19082
19083// PatchRouteFilterRule route Filter Rule Resource
19084type PatchRouteFilterRule struct {
19085	*RouteFilterRulePropertiesFormat `json:"properties,omitempty"`
19086	// Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource.
19087	Name *string `json:"name,omitempty"`
19088	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
19089	Etag *string `json:"etag,omitempty"`
19090	// ID - Resource ID.
19091	ID *string `json:"id,omitempty"`
19092}
19093
19094// MarshalJSON is the custom marshaler for PatchRouteFilterRule.
19095func (prfr PatchRouteFilterRule) MarshalJSON() ([]byte, error) {
19096	objectMap := make(map[string]interface{})
19097	if prfr.RouteFilterRulePropertiesFormat != nil {
19098		objectMap["properties"] = prfr.RouteFilterRulePropertiesFormat
19099	}
19100	if prfr.ID != nil {
19101		objectMap["id"] = prfr.ID
19102	}
19103	return json.Marshal(objectMap)
19104}
19105
19106// UnmarshalJSON is the custom unmarshaler for PatchRouteFilterRule struct.
19107func (prfr *PatchRouteFilterRule) UnmarshalJSON(body []byte) error {
19108	var m map[string]*json.RawMessage
19109	err := json.Unmarshal(body, &m)
19110	if err != nil {
19111		return err
19112	}
19113	for k, v := range m {
19114		switch k {
19115		case "properties":
19116			if v != nil {
19117				var routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat
19118				err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat)
19119				if err != nil {
19120					return err
19121				}
19122				prfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat
19123			}
19124		case "name":
19125			if v != nil {
19126				var name string
19127				err = json.Unmarshal(*v, &name)
19128				if err != nil {
19129					return err
19130				}
19131				prfr.Name = &name
19132			}
19133		case "etag":
19134			if v != nil {
19135				var etag string
19136				err = json.Unmarshal(*v, &etag)
19137				if err != nil {
19138					return err
19139				}
19140				prfr.Etag = &etag
19141			}
19142		case "id":
19143			if v != nil {
19144				var ID string
19145				err = json.Unmarshal(*v, &ID)
19146				if err != nil {
19147					return err
19148				}
19149				prfr.ID = &ID
19150			}
19151		}
19152	}
19153
19154	return nil
19155}
19156
19157// Probe a load balancer probe.
19158type Probe struct {
19159	autorest.Response `json:"-"`
19160	// ProbePropertiesFormat - Properties of load balancer probe.
19161	*ProbePropertiesFormat `json:"properties,omitempty"`
19162	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
19163	Name *string `json:"name,omitempty"`
19164	// Etag - A unique read-only string that changes whenever the resource is updated.
19165	Etag *string `json:"etag,omitempty"`
19166	// ID - Resource ID.
19167	ID *string `json:"id,omitempty"`
19168}
19169
19170// MarshalJSON is the custom marshaler for Probe.
19171func (p Probe) MarshalJSON() ([]byte, error) {
19172	objectMap := make(map[string]interface{})
19173	if p.ProbePropertiesFormat != nil {
19174		objectMap["properties"] = p.ProbePropertiesFormat
19175	}
19176	if p.Name != nil {
19177		objectMap["name"] = p.Name
19178	}
19179	if p.Etag != nil {
19180		objectMap["etag"] = p.Etag
19181	}
19182	if p.ID != nil {
19183		objectMap["id"] = p.ID
19184	}
19185	return json.Marshal(objectMap)
19186}
19187
19188// UnmarshalJSON is the custom unmarshaler for Probe struct.
19189func (p *Probe) UnmarshalJSON(body []byte) error {
19190	var m map[string]*json.RawMessage
19191	err := json.Unmarshal(body, &m)
19192	if err != nil {
19193		return err
19194	}
19195	for k, v := range m {
19196		switch k {
19197		case "properties":
19198			if v != nil {
19199				var probePropertiesFormat ProbePropertiesFormat
19200				err = json.Unmarshal(*v, &probePropertiesFormat)
19201				if err != nil {
19202					return err
19203				}
19204				p.ProbePropertiesFormat = &probePropertiesFormat
19205			}
19206		case "name":
19207			if v != nil {
19208				var name string
19209				err = json.Unmarshal(*v, &name)
19210				if err != nil {
19211					return err
19212				}
19213				p.Name = &name
19214			}
19215		case "etag":
19216			if v != nil {
19217				var etag string
19218				err = json.Unmarshal(*v, &etag)
19219				if err != nil {
19220					return err
19221				}
19222				p.Etag = &etag
19223			}
19224		case "id":
19225			if v != nil {
19226				var ID string
19227				err = json.Unmarshal(*v, &ID)
19228				if err != nil {
19229					return err
19230				}
19231				p.ID = &ID
19232			}
19233		}
19234	}
19235
19236	return nil
19237}
19238
19239// ProbePropertiesFormat load balancer probe resource.
19240type ProbePropertiesFormat struct {
19241	// LoadBalancingRules - READ-ONLY; The load balancer rules that use this probe.
19242	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
19243	// 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'
19244	Protocol ProbeProtocol `json:"protocol,omitempty"`
19245	// Port - The port for communicating the probe. Possible values range from 1 to 65535, inclusive.
19246	Port *int32 `json:"port,omitempty"`
19247	// 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.
19248	IntervalInSeconds *int32 `json:"intervalInSeconds,omitempty"`
19249	// 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.
19250	NumberOfProbes *int32 `json:"numberOfProbes,omitempty"`
19251	// 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.
19252	RequestPath *string `json:"requestPath,omitempty"`
19253	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
19254	ProvisioningState *string `json:"provisioningState,omitempty"`
19255}
19256
19257// MarshalJSON is the custom marshaler for ProbePropertiesFormat.
19258func (ppf ProbePropertiesFormat) MarshalJSON() ([]byte, error) {
19259	objectMap := make(map[string]interface{})
19260	if ppf.Protocol != "" {
19261		objectMap["protocol"] = ppf.Protocol
19262	}
19263	if ppf.Port != nil {
19264		objectMap["port"] = ppf.Port
19265	}
19266	if ppf.IntervalInSeconds != nil {
19267		objectMap["intervalInSeconds"] = ppf.IntervalInSeconds
19268	}
19269	if ppf.NumberOfProbes != nil {
19270		objectMap["numberOfProbes"] = ppf.NumberOfProbes
19271	}
19272	if ppf.RequestPath != nil {
19273		objectMap["requestPath"] = ppf.RequestPath
19274	}
19275	if ppf.ProvisioningState != nil {
19276		objectMap["provisioningState"] = ppf.ProvisioningState
19277	}
19278	return json.Marshal(objectMap)
19279}
19280
19281// Profile network profile resource.
19282type Profile struct {
19283	autorest.Response `json:"-"`
19284	// ProfilePropertiesFormat - Network profile properties.
19285	*ProfilePropertiesFormat `json:"properties,omitempty"`
19286	// Etag - A unique read-only string that changes whenever the resource is updated.
19287	Etag *string `json:"etag,omitempty"`
19288	// ID - Resource ID.
19289	ID *string `json:"id,omitempty"`
19290	// Name - READ-ONLY; Resource name.
19291	Name *string `json:"name,omitempty"`
19292	// Type - READ-ONLY; Resource type.
19293	Type *string `json:"type,omitempty"`
19294	// Location - Resource location.
19295	Location *string `json:"location,omitempty"`
19296	// Tags - Resource tags.
19297	Tags map[string]*string `json:"tags"`
19298}
19299
19300// MarshalJSON is the custom marshaler for Profile.
19301func (p Profile) MarshalJSON() ([]byte, error) {
19302	objectMap := make(map[string]interface{})
19303	if p.ProfilePropertiesFormat != nil {
19304		objectMap["properties"] = p.ProfilePropertiesFormat
19305	}
19306	if p.Etag != nil {
19307		objectMap["etag"] = p.Etag
19308	}
19309	if p.ID != nil {
19310		objectMap["id"] = p.ID
19311	}
19312	if p.Location != nil {
19313		objectMap["location"] = p.Location
19314	}
19315	if p.Tags != nil {
19316		objectMap["tags"] = p.Tags
19317	}
19318	return json.Marshal(objectMap)
19319}
19320
19321// UnmarshalJSON is the custom unmarshaler for Profile struct.
19322func (p *Profile) UnmarshalJSON(body []byte) error {
19323	var m map[string]*json.RawMessage
19324	err := json.Unmarshal(body, &m)
19325	if err != nil {
19326		return err
19327	}
19328	for k, v := range m {
19329		switch k {
19330		case "properties":
19331			if v != nil {
19332				var profilePropertiesFormat ProfilePropertiesFormat
19333				err = json.Unmarshal(*v, &profilePropertiesFormat)
19334				if err != nil {
19335					return err
19336				}
19337				p.ProfilePropertiesFormat = &profilePropertiesFormat
19338			}
19339		case "etag":
19340			if v != nil {
19341				var etag string
19342				err = json.Unmarshal(*v, &etag)
19343				if err != nil {
19344					return err
19345				}
19346				p.Etag = &etag
19347			}
19348		case "id":
19349			if v != nil {
19350				var ID string
19351				err = json.Unmarshal(*v, &ID)
19352				if err != nil {
19353					return err
19354				}
19355				p.ID = &ID
19356			}
19357		case "name":
19358			if v != nil {
19359				var name string
19360				err = json.Unmarshal(*v, &name)
19361				if err != nil {
19362					return err
19363				}
19364				p.Name = &name
19365			}
19366		case "type":
19367			if v != nil {
19368				var typeVar string
19369				err = json.Unmarshal(*v, &typeVar)
19370				if err != nil {
19371					return err
19372				}
19373				p.Type = &typeVar
19374			}
19375		case "location":
19376			if v != nil {
19377				var location string
19378				err = json.Unmarshal(*v, &location)
19379				if err != nil {
19380					return err
19381				}
19382				p.Location = &location
19383			}
19384		case "tags":
19385			if v != nil {
19386				var tags map[string]*string
19387				err = json.Unmarshal(*v, &tags)
19388				if err != nil {
19389					return err
19390				}
19391				p.Tags = tags
19392			}
19393		}
19394	}
19395
19396	return nil
19397}
19398
19399// ProfileListResult response for ListNetworkProfiles API service call.
19400type ProfileListResult struct {
19401	autorest.Response `json:"-"`
19402	// Value - A list of network profiles that exist in a resource group.
19403	Value *[]Profile `json:"value,omitempty"`
19404	// NextLink - The URL to get the next set of results.
19405	NextLink *string `json:"nextLink,omitempty"`
19406}
19407
19408// ProfileListResultIterator provides access to a complete listing of Profile values.
19409type ProfileListResultIterator struct {
19410	i    int
19411	page ProfileListResultPage
19412}
19413
19414// NextWithContext advances to the next value.  If there was an error making
19415// the request the iterator does not advance and the error is returned.
19416func (iter *ProfileListResultIterator) NextWithContext(ctx context.Context) (err error) {
19417	if tracing.IsEnabled() {
19418		ctx = tracing.StartSpan(ctx, fqdn+"/ProfileListResultIterator.NextWithContext")
19419		defer func() {
19420			sc := -1
19421			if iter.Response().Response.Response != nil {
19422				sc = iter.Response().Response.Response.StatusCode
19423			}
19424			tracing.EndSpan(ctx, sc, err)
19425		}()
19426	}
19427	iter.i++
19428	if iter.i < len(iter.page.Values()) {
19429		return nil
19430	}
19431	err = iter.page.NextWithContext(ctx)
19432	if err != nil {
19433		iter.i--
19434		return err
19435	}
19436	iter.i = 0
19437	return nil
19438}
19439
19440// Next advances to the next value.  If there was an error making
19441// the request the iterator does not advance and the error is returned.
19442// Deprecated: Use NextWithContext() instead.
19443func (iter *ProfileListResultIterator) Next() error {
19444	return iter.NextWithContext(context.Background())
19445}
19446
19447// NotDone returns true if the enumeration should be started or is not yet complete.
19448func (iter ProfileListResultIterator) NotDone() bool {
19449	return iter.page.NotDone() && iter.i < len(iter.page.Values())
19450}
19451
19452// Response returns the raw server response from the last page request.
19453func (iter ProfileListResultIterator) Response() ProfileListResult {
19454	return iter.page.Response()
19455}
19456
19457// Value returns the current value or a zero-initialized value if the
19458// iterator has advanced beyond the end of the collection.
19459func (iter ProfileListResultIterator) Value() Profile {
19460	if !iter.page.NotDone() {
19461		return Profile{}
19462	}
19463	return iter.page.Values()[iter.i]
19464}
19465
19466// Creates a new instance of the ProfileListResultIterator type.
19467func NewProfileListResultIterator(page ProfileListResultPage) ProfileListResultIterator {
19468	return ProfileListResultIterator{page: page}
19469}
19470
19471// IsEmpty returns true if the ListResult contains no values.
19472func (plr ProfileListResult) IsEmpty() bool {
19473	return plr.Value == nil || len(*plr.Value) == 0
19474}
19475
19476// hasNextLink returns true if the NextLink is not empty.
19477func (plr ProfileListResult) hasNextLink() bool {
19478	return plr.NextLink != nil && len(*plr.NextLink) != 0
19479}
19480
19481// profileListResultPreparer prepares a request to retrieve the next set of results.
19482// It returns nil if no more results exist.
19483func (plr ProfileListResult) profileListResultPreparer(ctx context.Context) (*http.Request, error) {
19484	if !plr.hasNextLink() {
19485		return nil, nil
19486	}
19487	return autorest.Prepare((&http.Request{}).WithContext(ctx),
19488		autorest.AsJSON(),
19489		autorest.AsGet(),
19490		autorest.WithBaseURL(to.String(plr.NextLink)))
19491}
19492
19493// ProfileListResultPage contains a page of Profile values.
19494type ProfileListResultPage struct {
19495	fn  func(context.Context, ProfileListResult) (ProfileListResult, error)
19496	plr ProfileListResult
19497}
19498
19499// NextWithContext advances to the next page of values.  If there was an error making
19500// the request the page does not advance and the error is returned.
19501func (page *ProfileListResultPage) NextWithContext(ctx context.Context) (err error) {
19502	if tracing.IsEnabled() {
19503		ctx = tracing.StartSpan(ctx, fqdn+"/ProfileListResultPage.NextWithContext")
19504		defer func() {
19505			sc := -1
19506			if page.Response().Response.Response != nil {
19507				sc = page.Response().Response.Response.StatusCode
19508			}
19509			tracing.EndSpan(ctx, sc, err)
19510		}()
19511	}
19512	for {
19513		next, err := page.fn(ctx, page.plr)
19514		if err != nil {
19515			return err
19516		}
19517		page.plr = next
19518		if !next.hasNextLink() || !next.IsEmpty() {
19519			break
19520		}
19521	}
19522	return nil
19523}
19524
19525// Next advances to the next page of values.  If there was an error making
19526// the request the page does not advance and the error is returned.
19527// Deprecated: Use NextWithContext() instead.
19528func (page *ProfileListResultPage) Next() error {
19529	return page.NextWithContext(context.Background())
19530}
19531
19532// NotDone returns true if the page enumeration should be started or is not yet complete.
19533func (page ProfileListResultPage) NotDone() bool {
19534	return !page.plr.IsEmpty()
19535}
19536
19537// Response returns the raw server response from the last page request.
19538func (page ProfileListResultPage) Response() ProfileListResult {
19539	return page.plr
19540}
19541
19542// Values returns the slice of values for the current page or nil if there are no values.
19543func (page ProfileListResultPage) Values() []Profile {
19544	if page.plr.IsEmpty() {
19545		return nil
19546	}
19547	return *page.plr.Value
19548}
19549
19550// Creates a new instance of the ProfileListResultPage type.
19551func NewProfileListResultPage(cur ProfileListResult, getNextPage func(context.Context, ProfileListResult) (ProfileListResult, error)) ProfileListResultPage {
19552	return ProfileListResultPage{
19553		fn:  getNextPage,
19554		plr: cur,
19555	}
19556}
19557
19558// ProfilePropertiesFormat network profile properties.
19559type ProfilePropertiesFormat struct {
19560	// ContainerNetworkInterfaces - List of child container network interfaces.
19561	ContainerNetworkInterfaces *[]ContainerNetworkInterface `json:"containerNetworkInterfaces,omitempty"`
19562	// ContainerNetworkInterfaceConfigurations - List of chid container network interface configurations.
19563	ContainerNetworkInterfaceConfigurations *[]ContainerNetworkInterfaceConfiguration `json:"containerNetworkInterfaceConfigurations,omitempty"`
19564	// ResourceGUID - READ-ONLY; The resource GUID property of the network interface resource.
19565	ResourceGUID *string `json:"resourceGuid,omitempty"`
19566	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
19567	ProvisioningState *string `json:"provisioningState,omitempty"`
19568}
19569
19570// MarshalJSON is the custom marshaler for ProfilePropertiesFormat.
19571func (ppf ProfilePropertiesFormat) MarshalJSON() ([]byte, error) {
19572	objectMap := make(map[string]interface{})
19573	if ppf.ContainerNetworkInterfaces != nil {
19574		objectMap["containerNetworkInterfaces"] = ppf.ContainerNetworkInterfaces
19575	}
19576	if ppf.ContainerNetworkInterfaceConfigurations != nil {
19577		objectMap["containerNetworkInterfaceConfigurations"] = ppf.ContainerNetworkInterfaceConfigurations
19578	}
19579	return json.Marshal(objectMap)
19580}
19581
19582// ProfilesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
19583// operation.
19584type ProfilesDeleteFuture struct {
19585	azure.FutureAPI
19586	// Result returns the result of the asynchronous operation.
19587	// If the operation has not completed it will return an error.
19588	Result func(ProfilesClient) (autorest.Response, error)
19589}
19590
19591// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19592func (future *ProfilesDeleteFuture) UnmarshalJSON(body []byte) error {
19593	var azFuture azure.Future
19594	if err := json.Unmarshal(body, &azFuture); err != nil {
19595		return err
19596	}
19597	future.FutureAPI = &azFuture
19598	future.Result = future.result
19599	return nil
19600}
19601
19602// result is the default implementation for ProfilesDeleteFuture.Result.
19603func (future *ProfilesDeleteFuture) result(client ProfilesClient) (ar autorest.Response, err error) {
19604	var done bool
19605	done, err = future.DoneWithContext(context.Background(), client)
19606	if err != nil {
19607		err = autorest.NewErrorWithError(err, "network.ProfilesDeleteFuture", "Result", future.Response(), "Polling failure")
19608		return
19609	}
19610	if !done {
19611		ar.Response = future.Response()
19612		err = azure.NewAsyncOpIncompleteError("network.ProfilesDeleteFuture")
19613		return
19614	}
19615	ar.Response = future.Response()
19616	return
19617}
19618
19619// ProtocolConfiguration configuration of the protocol.
19620type ProtocolConfiguration struct {
19621	HTTPConfiguration *HTTPConfiguration `json:"HTTPConfiguration,omitempty"`
19622}
19623
19624// PublicIPAddress public IP address resource.
19625type PublicIPAddress struct {
19626	autorest.Response `json:"-"`
19627	// Sku - The public IP address SKU.
19628	Sku *PublicIPAddressSku `json:"sku,omitempty"`
19629	// PublicIPAddressPropertiesFormat - Public IP address properties.
19630	*PublicIPAddressPropertiesFormat `json:"properties,omitempty"`
19631	// Etag - A unique read-only string that changes whenever the resource is updated.
19632	Etag *string `json:"etag,omitempty"`
19633	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
19634	Zones *[]string `json:"zones,omitempty"`
19635	// ID - Resource ID.
19636	ID *string `json:"id,omitempty"`
19637	// Name - READ-ONLY; Resource name.
19638	Name *string `json:"name,omitempty"`
19639	// Type - READ-ONLY; Resource type.
19640	Type *string `json:"type,omitempty"`
19641	// Location - Resource location.
19642	Location *string `json:"location,omitempty"`
19643	// Tags - Resource tags.
19644	Tags map[string]*string `json:"tags"`
19645}
19646
19647// MarshalJSON is the custom marshaler for PublicIPAddress.
19648func (pia PublicIPAddress) MarshalJSON() ([]byte, error) {
19649	objectMap := make(map[string]interface{})
19650	if pia.Sku != nil {
19651		objectMap["sku"] = pia.Sku
19652	}
19653	if pia.PublicIPAddressPropertiesFormat != nil {
19654		objectMap["properties"] = pia.PublicIPAddressPropertiesFormat
19655	}
19656	if pia.Etag != nil {
19657		objectMap["etag"] = pia.Etag
19658	}
19659	if pia.Zones != nil {
19660		objectMap["zones"] = pia.Zones
19661	}
19662	if pia.ID != nil {
19663		objectMap["id"] = pia.ID
19664	}
19665	if pia.Location != nil {
19666		objectMap["location"] = pia.Location
19667	}
19668	if pia.Tags != nil {
19669		objectMap["tags"] = pia.Tags
19670	}
19671	return json.Marshal(objectMap)
19672}
19673
19674// UnmarshalJSON is the custom unmarshaler for PublicIPAddress struct.
19675func (pia *PublicIPAddress) UnmarshalJSON(body []byte) error {
19676	var m map[string]*json.RawMessage
19677	err := json.Unmarshal(body, &m)
19678	if err != nil {
19679		return err
19680	}
19681	for k, v := range m {
19682		switch k {
19683		case "sku":
19684			if v != nil {
19685				var sku PublicIPAddressSku
19686				err = json.Unmarshal(*v, &sku)
19687				if err != nil {
19688					return err
19689				}
19690				pia.Sku = &sku
19691			}
19692		case "properties":
19693			if v != nil {
19694				var publicIPAddressPropertiesFormat PublicIPAddressPropertiesFormat
19695				err = json.Unmarshal(*v, &publicIPAddressPropertiesFormat)
19696				if err != nil {
19697					return err
19698				}
19699				pia.PublicIPAddressPropertiesFormat = &publicIPAddressPropertiesFormat
19700			}
19701		case "etag":
19702			if v != nil {
19703				var etag string
19704				err = json.Unmarshal(*v, &etag)
19705				if err != nil {
19706					return err
19707				}
19708				pia.Etag = &etag
19709			}
19710		case "zones":
19711			if v != nil {
19712				var zones []string
19713				err = json.Unmarshal(*v, &zones)
19714				if err != nil {
19715					return err
19716				}
19717				pia.Zones = &zones
19718			}
19719		case "id":
19720			if v != nil {
19721				var ID string
19722				err = json.Unmarshal(*v, &ID)
19723				if err != nil {
19724					return err
19725				}
19726				pia.ID = &ID
19727			}
19728		case "name":
19729			if v != nil {
19730				var name string
19731				err = json.Unmarshal(*v, &name)
19732				if err != nil {
19733					return err
19734				}
19735				pia.Name = &name
19736			}
19737		case "type":
19738			if v != nil {
19739				var typeVar string
19740				err = json.Unmarshal(*v, &typeVar)
19741				if err != nil {
19742					return err
19743				}
19744				pia.Type = &typeVar
19745			}
19746		case "location":
19747			if v != nil {
19748				var location string
19749				err = json.Unmarshal(*v, &location)
19750				if err != nil {
19751					return err
19752				}
19753				pia.Location = &location
19754			}
19755		case "tags":
19756			if v != nil {
19757				var tags map[string]*string
19758				err = json.Unmarshal(*v, &tags)
19759				if err != nil {
19760					return err
19761				}
19762				pia.Tags = tags
19763			}
19764		}
19765	}
19766
19767	return nil
19768}
19769
19770// PublicIPAddressDNSSettings contains FQDN of the DNS record associated with the public IP address
19771type PublicIPAddressDNSSettings struct {
19772	// 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.
19773	DomainNameLabel *string `json:"domainNameLabel,omitempty"`
19774	// 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.
19775	Fqdn *string `json:"fqdn,omitempty"`
19776	// 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.
19777	ReverseFqdn *string `json:"reverseFqdn,omitempty"`
19778}
19779
19780// PublicIPAddressesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
19781// long-running operation.
19782type PublicIPAddressesCreateOrUpdateFuture struct {
19783	azure.FutureAPI
19784	// Result returns the result of the asynchronous operation.
19785	// If the operation has not completed it will return an error.
19786	Result func(PublicIPAddressesClient) (PublicIPAddress, error)
19787}
19788
19789// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19790func (future *PublicIPAddressesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
19791	var azFuture azure.Future
19792	if err := json.Unmarshal(body, &azFuture); err != nil {
19793		return err
19794	}
19795	future.FutureAPI = &azFuture
19796	future.Result = future.result
19797	return nil
19798}
19799
19800// result is the default implementation for PublicIPAddressesCreateOrUpdateFuture.Result.
19801func (future *PublicIPAddressesCreateOrUpdateFuture) result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
19802	var done bool
19803	done, err = future.DoneWithContext(context.Background(), client)
19804	if err != nil {
19805		err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
19806		return
19807	}
19808	if !done {
19809		pia.Response.Response = future.Response()
19810		err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesCreateOrUpdateFuture")
19811		return
19812	}
19813	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
19814	if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent {
19815		pia, err = client.CreateOrUpdateResponder(pia.Response.Response)
19816		if err != nil {
19817			err = autorest.NewErrorWithError(err, "network.PublicIPAddressesCreateOrUpdateFuture", "Result", pia.Response.Response, "Failure responding to request")
19818		}
19819	}
19820	return
19821}
19822
19823// PublicIPAddressesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
19824// operation.
19825type PublicIPAddressesDeleteFuture struct {
19826	azure.FutureAPI
19827	// Result returns the result of the asynchronous operation.
19828	// If the operation has not completed it will return an error.
19829	Result func(PublicIPAddressesClient) (autorest.Response, error)
19830}
19831
19832// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19833func (future *PublicIPAddressesDeleteFuture) UnmarshalJSON(body []byte) error {
19834	var azFuture azure.Future
19835	if err := json.Unmarshal(body, &azFuture); err != nil {
19836		return err
19837	}
19838	future.FutureAPI = &azFuture
19839	future.Result = future.result
19840	return nil
19841}
19842
19843// result is the default implementation for PublicIPAddressesDeleteFuture.Result.
19844func (future *PublicIPAddressesDeleteFuture) result(client PublicIPAddressesClient) (ar autorest.Response, err error) {
19845	var done bool
19846	done, err = future.DoneWithContext(context.Background(), client)
19847	if err != nil {
19848		err = autorest.NewErrorWithError(err, "network.PublicIPAddressesDeleteFuture", "Result", future.Response(), "Polling failure")
19849		return
19850	}
19851	if !done {
19852		ar.Response = future.Response()
19853		err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesDeleteFuture")
19854		return
19855	}
19856	ar.Response = future.Response()
19857	return
19858}
19859
19860// PublicIPAddressesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
19861// long-running operation.
19862type PublicIPAddressesUpdateTagsFuture struct {
19863	azure.FutureAPI
19864	// Result returns the result of the asynchronous operation.
19865	// If the operation has not completed it will return an error.
19866	Result func(PublicIPAddressesClient) (PublicIPAddress, error)
19867}
19868
19869// UnmarshalJSON is the custom unmarshaller for CreateFuture.
19870func (future *PublicIPAddressesUpdateTagsFuture) UnmarshalJSON(body []byte) error {
19871	var azFuture azure.Future
19872	if err := json.Unmarshal(body, &azFuture); err != nil {
19873		return err
19874	}
19875	future.FutureAPI = &azFuture
19876	future.Result = future.result
19877	return nil
19878}
19879
19880// result is the default implementation for PublicIPAddressesUpdateTagsFuture.Result.
19881func (future *PublicIPAddressesUpdateTagsFuture) result(client PublicIPAddressesClient) (pia PublicIPAddress, err error) {
19882	var done bool
19883	done, err = future.DoneWithContext(context.Background(), client)
19884	if err != nil {
19885		err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
19886		return
19887	}
19888	if !done {
19889		pia.Response.Response = future.Response()
19890		err = azure.NewAsyncOpIncompleteError("network.PublicIPAddressesUpdateTagsFuture")
19891		return
19892	}
19893	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
19894	if pia.Response.Response, err = future.GetResult(sender); err == nil && pia.Response.Response.StatusCode != http.StatusNoContent {
19895		pia, err = client.UpdateTagsResponder(pia.Response.Response)
19896		if err != nil {
19897			err = autorest.NewErrorWithError(err, "network.PublicIPAddressesUpdateTagsFuture", "Result", pia.Response.Response, "Failure responding to request")
19898		}
19899	}
19900	return
19901}
19902
19903// PublicIPAddressListResult response for ListPublicIpAddresses API service call.
19904type PublicIPAddressListResult struct {
19905	autorest.Response `json:"-"`
19906	// Value - A list of public IP addresses that exists in a resource group.
19907	Value *[]PublicIPAddress `json:"value,omitempty"`
19908	// NextLink - The URL to get the next set of results.
19909	NextLink *string `json:"nextLink,omitempty"`
19910}
19911
19912// PublicIPAddressListResultIterator provides access to a complete listing of PublicIPAddress values.
19913type PublicIPAddressListResultIterator struct {
19914	i    int
19915	page PublicIPAddressListResultPage
19916}
19917
19918// NextWithContext advances to the next value.  If there was an error making
19919// the request the iterator does not advance and the error is returned.
19920func (iter *PublicIPAddressListResultIterator) NextWithContext(ctx context.Context) (err error) {
19921	if tracing.IsEnabled() {
19922		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultIterator.NextWithContext")
19923		defer func() {
19924			sc := -1
19925			if iter.Response().Response.Response != nil {
19926				sc = iter.Response().Response.Response.StatusCode
19927			}
19928			tracing.EndSpan(ctx, sc, err)
19929		}()
19930	}
19931	iter.i++
19932	if iter.i < len(iter.page.Values()) {
19933		return nil
19934	}
19935	err = iter.page.NextWithContext(ctx)
19936	if err != nil {
19937		iter.i--
19938		return err
19939	}
19940	iter.i = 0
19941	return nil
19942}
19943
19944// Next advances to the next value.  If there was an error making
19945// the request the iterator does not advance and the error is returned.
19946// Deprecated: Use NextWithContext() instead.
19947func (iter *PublicIPAddressListResultIterator) Next() error {
19948	return iter.NextWithContext(context.Background())
19949}
19950
19951// NotDone returns true if the enumeration should be started or is not yet complete.
19952func (iter PublicIPAddressListResultIterator) NotDone() bool {
19953	return iter.page.NotDone() && iter.i < len(iter.page.Values())
19954}
19955
19956// Response returns the raw server response from the last page request.
19957func (iter PublicIPAddressListResultIterator) Response() PublicIPAddressListResult {
19958	return iter.page.Response()
19959}
19960
19961// Value returns the current value or a zero-initialized value if the
19962// iterator has advanced beyond the end of the collection.
19963func (iter PublicIPAddressListResultIterator) Value() PublicIPAddress {
19964	if !iter.page.NotDone() {
19965		return PublicIPAddress{}
19966	}
19967	return iter.page.Values()[iter.i]
19968}
19969
19970// Creates a new instance of the PublicIPAddressListResultIterator type.
19971func NewPublicIPAddressListResultIterator(page PublicIPAddressListResultPage) PublicIPAddressListResultIterator {
19972	return PublicIPAddressListResultIterator{page: page}
19973}
19974
19975// IsEmpty returns true if the ListResult contains no values.
19976func (pialr PublicIPAddressListResult) IsEmpty() bool {
19977	return pialr.Value == nil || len(*pialr.Value) == 0
19978}
19979
19980// hasNextLink returns true if the NextLink is not empty.
19981func (pialr PublicIPAddressListResult) hasNextLink() bool {
19982	return pialr.NextLink != nil && len(*pialr.NextLink) != 0
19983}
19984
19985// publicIPAddressListResultPreparer prepares a request to retrieve the next set of results.
19986// It returns nil if no more results exist.
19987func (pialr PublicIPAddressListResult) publicIPAddressListResultPreparer(ctx context.Context) (*http.Request, error) {
19988	if !pialr.hasNextLink() {
19989		return nil, nil
19990	}
19991	return autorest.Prepare((&http.Request{}).WithContext(ctx),
19992		autorest.AsJSON(),
19993		autorest.AsGet(),
19994		autorest.WithBaseURL(to.String(pialr.NextLink)))
19995}
19996
19997// PublicIPAddressListResultPage contains a page of PublicIPAddress values.
19998type PublicIPAddressListResultPage struct {
19999	fn    func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)
20000	pialr PublicIPAddressListResult
20001}
20002
20003// NextWithContext advances to the next page of values.  If there was an error making
20004// the request the page does not advance and the error is returned.
20005func (page *PublicIPAddressListResultPage) NextWithContext(ctx context.Context) (err error) {
20006	if tracing.IsEnabled() {
20007		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultPage.NextWithContext")
20008		defer func() {
20009			sc := -1
20010			if page.Response().Response.Response != nil {
20011				sc = page.Response().Response.Response.StatusCode
20012			}
20013			tracing.EndSpan(ctx, sc, err)
20014		}()
20015	}
20016	for {
20017		next, err := page.fn(ctx, page.pialr)
20018		if err != nil {
20019			return err
20020		}
20021		page.pialr = next
20022		if !next.hasNextLink() || !next.IsEmpty() {
20023			break
20024		}
20025	}
20026	return nil
20027}
20028
20029// Next advances to the next page of values.  If there was an error making
20030// the request the page does not advance and the error is returned.
20031// Deprecated: Use NextWithContext() instead.
20032func (page *PublicIPAddressListResultPage) Next() error {
20033	return page.NextWithContext(context.Background())
20034}
20035
20036// NotDone returns true if the page enumeration should be started or is not yet complete.
20037func (page PublicIPAddressListResultPage) NotDone() bool {
20038	return !page.pialr.IsEmpty()
20039}
20040
20041// Response returns the raw server response from the last page request.
20042func (page PublicIPAddressListResultPage) Response() PublicIPAddressListResult {
20043	return page.pialr
20044}
20045
20046// Values returns the slice of values for the current page or nil if there are no values.
20047func (page PublicIPAddressListResultPage) Values() []PublicIPAddress {
20048	if page.pialr.IsEmpty() {
20049		return nil
20050	}
20051	return *page.pialr.Value
20052}
20053
20054// Creates a new instance of the PublicIPAddressListResultPage type.
20055func NewPublicIPAddressListResultPage(cur PublicIPAddressListResult, getNextPage func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)) PublicIPAddressListResultPage {
20056	return PublicIPAddressListResultPage{
20057		fn:    getNextPage,
20058		pialr: cur,
20059	}
20060}
20061
20062// PublicIPAddressPropertiesFormat public IP address properties.
20063type PublicIPAddressPropertiesFormat struct {
20064	// PublicIPAllocationMethod - The public IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
20065	PublicIPAllocationMethod IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"`
20066	// PublicIPAddressVersion - The public IP address version. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6'
20067	PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"`
20068	// IPConfiguration - READ-ONLY; The IP configuration associated with the public IP address.
20069	IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"`
20070	// DNSSettings - The FQDN of the DNS record associated with the public IP address.
20071	DNSSettings *PublicIPAddressDNSSettings `json:"dnsSettings,omitempty"`
20072	// IPTags - The list of tags associated with the public IP address.
20073	IPTags *[]IPTag `json:"ipTags,omitempty"`
20074	// IPAddress - The IP address associated with the public IP address resource.
20075	IPAddress *string `json:"ipAddress,omitempty"`
20076	// PublicIPPrefix - The Public IP Prefix this Public IP Address should be allocated from.
20077	PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"`
20078	// IdleTimeoutInMinutes - The idle timeout of the public IP address.
20079	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
20080	// ResourceGUID - The resource GUID property of the public IP resource.
20081	ResourceGUID *string `json:"resourceGuid,omitempty"`
20082	// ProvisioningState - The provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
20083	ProvisioningState *string `json:"provisioningState,omitempty"`
20084}
20085
20086// MarshalJSON is the custom marshaler for PublicIPAddressPropertiesFormat.
20087func (piapf PublicIPAddressPropertiesFormat) MarshalJSON() ([]byte, error) {
20088	objectMap := make(map[string]interface{})
20089	if piapf.PublicIPAllocationMethod != "" {
20090		objectMap["publicIPAllocationMethod"] = piapf.PublicIPAllocationMethod
20091	}
20092	if piapf.PublicIPAddressVersion != "" {
20093		objectMap["publicIPAddressVersion"] = piapf.PublicIPAddressVersion
20094	}
20095	if piapf.DNSSettings != nil {
20096		objectMap["dnsSettings"] = piapf.DNSSettings
20097	}
20098	if piapf.IPTags != nil {
20099		objectMap["ipTags"] = piapf.IPTags
20100	}
20101	if piapf.IPAddress != nil {
20102		objectMap["ipAddress"] = piapf.IPAddress
20103	}
20104	if piapf.PublicIPPrefix != nil {
20105		objectMap["publicIPPrefix"] = piapf.PublicIPPrefix
20106	}
20107	if piapf.IdleTimeoutInMinutes != nil {
20108		objectMap["idleTimeoutInMinutes"] = piapf.IdleTimeoutInMinutes
20109	}
20110	if piapf.ResourceGUID != nil {
20111		objectMap["resourceGuid"] = piapf.ResourceGUID
20112	}
20113	if piapf.ProvisioningState != nil {
20114		objectMap["provisioningState"] = piapf.ProvisioningState
20115	}
20116	return json.Marshal(objectMap)
20117}
20118
20119// PublicIPAddressSku SKU of a public IP address
20120type PublicIPAddressSku struct {
20121	// Name - Name of a public IP address SKU. Possible values include: 'PublicIPAddressSkuNameBasic', 'PublicIPAddressSkuNameStandard'
20122	Name PublicIPAddressSkuName `json:"name,omitempty"`
20123}
20124
20125// PublicIPPrefix public IP prefix resource.
20126type PublicIPPrefix struct {
20127	autorest.Response `json:"-"`
20128	// Sku - The public IP prefix SKU.
20129	Sku *PublicIPPrefixSku `json:"sku,omitempty"`
20130	// PublicIPPrefixPropertiesFormat - Public IP prefix properties.
20131	*PublicIPPrefixPropertiesFormat `json:"properties,omitempty"`
20132	// Etag - A unique read-only string that changes whenever the resource is updated.
20133	Etag *string `json:"etag,omitempty"`
20134	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
20135	Zones *[]string `json:"zones,omitempty"`
20136	// ID - Resource ID.
20137	ID *string `json:"id,omitempty"`
20138	// Name - READ-ONLY; Resource name.
20139	Name *string `json:"name,omitempty"`
20140	// Type - READ-ONLY; Resource type.
20141	Type *string `json:"type,omitempty"`
20142	// Location - Resource location.
20143	Location *string `json:"location,omitempty"`
20144	// Tags - Resource tags.
20145	Tags map[string]*string `json:"tags"`
20146}
20147
20148// MarshalJSON is the custom marshaler for PublicIPPrefix.
20149func (pip PublicIPPrefix) MarshalJSON() ([]byte, error) {
20150	objectMap := make(map[string]interface{})
20151	if pip.Sku != nil {
20152		objectMap["sku"] = pip.Sku
20153	}
20154	if pip.PublicIPPrefixPropertiesFormat != nil {
20155		objectMap["properties"] = pip.PublicIPPrefixPropertiesFormat
20156	}
20157	if pip.Etag != nil {
20158		objectMap["etag"] = pip.Etag
20159	}
20160	if pip.Zones != nil {
20161		objectMap["zones"] = pip.Zones
20162	}
20163	if pip.ID != nil {
20164		objectMap["id"] = pip.ID
20165	}
20166	if pip.Location != nil {
20167		objectMap["location"] = pip.Location
20168	}
20169	if pip.Tags != nil {
20170		objectMap["tags"] = pip.Tags
20171	}
20172	return json.Marshal(objectMap)
20173}
20174
20175// UnmarshalJSON is the custom unmarshaler for PublicIPPrefix struct.
20176func (pip *PublicIPPrefix) UnmarshalJSON(body []byte) error {
20177	var m map[string]*json.RawMessage
20178	err := json.Unmarshal(body, &m)
20179	if err != nil {
20180		return err
20181	}
20182	for k, v := range m {
20183		switch k {
20184		case "sku":
20185			if v != nil {
20186				var sku PublicIPPrefixSku
20187				err = json.Unmarshal(*v, &sku)
20188				if err != nil {
20189					return err
20190				}
20191				pip.Sku = &sku
20192			}
20193		case "properties":
20194			if v != nil {
20195				var publicIPPrefixPropertiesFormat PublicIPPrefixPropertiesFormat
20196				err = json.Unmarshal(*v, &publicIPPrefixPropertiesFormat)
20197				if err != nil {
20198					return err
20199				}
20200				pip.PublicIPPrefixPropertiesFormat = &publicIPPrefixPropertiesFormat
20201			}
20202		case "etag":
20203			if v != nil {
20204				var etag string
20205				err = json.Unmarshal(*v, &etag)
20206				if err != nil {
20207					return err
20208				}
20209				pip.Etag = &etag
20210			}
20211		case "zones":
20212			if v != nil {
20213				var zones []string
20214				err = json.Unmarshal(*v, &zones)
20215				if err != nil {
20216					return err
20217				}
20218				pip.Zones = &zones
20219			}
20220		case "id":
20221			if v != nil {
20222				var ID string
20223				err = json.Unmarshal(*v, &ID)
20224				if err != nil {
20225					return err
20226				}
20227				pip.ID = &ID
20228			}
20229		case "name":
20230			if v != nil {
20231				var name string
20232				err = json.Unmarshal(*v, &name)
20233				if err != nil {
20234					return err
20235				}
20236				pip.Name = &name
20237			}
20238		case "type":
20239			if v != nil {
20240				var typeVar string
20241				err = json.Unmarshal(*v, &typeVar)
20242				if err != nil {
20243					return err
20244				}
20245				pip.Type = &typeVar
20246			}
20247		case "location":
20248			if v != nil {
20249				var location string
20250				err = json.Unmarshal(*v, &location)
20251				if err != nil {
20252					return err
20253				}
20254				pip.Location = &location
20255			}
20256		case "tags":
20257			if v != nil {
20258				var tags map[string]*string
20259				err = json.Unmarshal(*v, &tags)
20260				if err != nil {
20261					return err
20262				}
20263				pip.Tags = tags
20264			}
20265		}
20266	}
20267
20268	return nil
20269}
20270
20271// PublicIPPrefixesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
20272// long-running operation.
20273type PublicIPPrefixesCreateOrUpdateFuture struct {
20274	azure.FutureAPI
20275	// Result returns the result of the asynchronous operation.
20276	// If the operation has not completed it will return an error.
20277	Result func(PublicIPPrefixesClient) (PublicIPPrefix, error)
20278}
20279
20280// UnmarshalJSON is the custom unmarshaller for CreateFuture.
20281func (future *PublicIPPrefixesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
20282	var azFuture azure.Future
20283	if err := json.Unmarshal(body, &azFuture); err != nil {
20284		return err
20285	}
20286	future.FutureAPI = &azFuture
20287	future.Result = future.result
20288	return nil
20289}
20290
20291// result is the default implementation for PublicIPPrefixesCreateOrUpdateFuture.Result.
20292func (future *PublicIPPrefixesCreateOrUpdateFuture) result(client PublicIPPrefixesClient) (pip PublicIPPrefix, err error) {
20293	var done bool
20294	done, err = future.DoneWithContext(context.Background(), client)
20295	if err != nil {
20296		err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
20297		return
20298	}
20299	if !done {
20300		pip.Response.Response = future.Response()
20301		err = azure.NewAsyncOpIncompleteError("network.PublicIPPrefixesCreateOrUpdateFuture")
20302		return
20303	}
20304	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20305	if pip.Response.Response, err = future.GetResult(sender); err == nil && pip.Response.Response.StatusCode != http.StatusNoContent {
20306		pip, err = client.CreateOrUpdateResponder(pip.Response.Response)
20307		if err != nil {
20308			err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesCreateOrUpdateFuture", "Result", pip.Response.Response, "Failure responding to request")
20309		}
20310	}
20311	return
20312}
20313
20314// PublicIPPrefixesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
20315// operation.
20316type PublicIPPrefixesDeleteFuture struct {
20317	azure.FutureAPI
20318	// Result returns the result of the asynchronous operation.
20319	// If the operation has not completed it will return an error.
20320	Result func(PublicIPPrefixesClient) (autorest.Response, error)
20321}
20322
20323// UnmarshalJSON is the custom unmarshaller for CreateFuture.
20324func (future *PublicIPPrefixesDeleteFuture) UnmarshalJSON(body []byte) error {
20325	var azFuture azure.Future
20326	if err := json.Unmarshal(body, &azFuture); err != nil {
20327		return err
20328	}
20329	future.FutureAPI = &azFuture
20330	future.Result = future.result
20331	return nil
20332}
20333
20334// result is the default implementation for PublicIPPrefixesDeleteFuture.Result.
20335func (future *PublicIPPrefixesDeleteFuture) result(client PublicIPPrefixesClient) (ar autorest.Response, err error) {
20336	var done bool
20337	done, err = future.DoneWithContext(context.Background(), client)
20338	if err != nil {
20339		err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesDeleteFuture", "Result", future.Response(), "Polling failure")
20340		return
20341	}
20342	if !done {
20343		ar.Response = future.Response()
20344		err = azure.NewAsyncOpIncompleteError("network.PublicIPPrefixesDeleteFuture")
20345		return
20346	}
20347	ar.Response = future.Response()
20348	return
20349}
20350
20351// PublicIPPrefixesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
20352// long-running operation.
20353type PublicIPPrefixesUpdateTagsFuture struct {
20354	azure.FutureAPI
20355	// Result returns the result of the asynchronous operation.
20356	// If the operation has not completed it will return an error.
20357	Result func(PublicIPPrefixesClient) (PublicIPPrefix, error)
20358}
20359
20360// UnmarshalJSON is the custom unmarshaller for CreateFuture.
20361func (future *PublicIPPrefixesUpdateTagsFuture) UnmarshalJSON(body []byte) error {
20362	var azFuture azure.Future
20363	if err := json.Unmarshal(body, &azFuture); err != nil {
20364		return err
20365	}
20366	future.FutureAPI = &azFuture
20367	future.Result = future.result
20368	return nil
20369}
20370
20371// result is the default implementation for PublicIPPrefixesUpdateTagsFuture.Result.
20372func (future *PublicIPPrefixesUpdateTagsFuture) result(client PublicIPPrefixesClient) (pip PublicIPPrefix, err error) {
20373	var done bool
20374	done, err = future.DoneWithContext(context.Background(), client)
20375	if err != nil {
20376		err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
20377		return
20378	}
20379	if !done {
20380		pip.Response.Response = future.Response()
20381		err = azure.NewAsyncOpIncompleteError("network.PublicIPPrefixesUpdateTagsFuture")
20382		return
20383	}
20384	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
20385	if pip.Response.Response, err = future.GetResult(sender); err == nil && pip.Response.Response.StatusCode != http.StatusNoContent {
20386		pip, err = client.UpdateTagsResponder(pip.Response.Response)
20387		if err != nil {
20388			err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesUpdateTagsFuture", "Result", pip.Response.Response, "Failure responding to request")
20389		}
20390	}
20391	return
20392}
20393
20394// PublicIPPrefixListResult response for ListPublicIpPrefixes API service call.
20395type PublicIPPrefixListResult struct {
20396	autorest.Response `json:"-"`
20397	// Value - A list of public IP prefixes that exists in a resource group.
20398	Value *[]PublicIPPrefix `json:"value,omitempty"`
20399	// NextLink - The URL to get the next set of results.
20400	NextLink *string `json:"nextLink,omitempty"`
20401}
20402
20403// PublicIPPrefixListResultIterator provides access to a complete listing of PublicIPPrefix values.
20404type PublicIPPrefixListResultIterator struct {
20405	i    int
20406	page PublicIPPrefixListResultPage
20407}
20408
20409// NextWithContext advances to the next value.  If there was an error making
20410// the request the iterator does not advance and the error is returned.
20411func (iter *PublicIPPrefixListResultIterator) NextWithContext(ctx context.Context) (err error) {
20412	if tracing.IsEnabled() {
20413		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixListResultIterator.NextWithContext")
20414		defer func() {
20415			sc := -1
20416			if iter.Response().Response.Response != nil {
20417				sc = iter.Response().Response.Response.StatusCode
20418			}
20419			tracing.EndSpan(ctx, sc, err)
20420		}()
20421	}
20422	iter.i++
20423	if iter.i < len(iter.page.Values()) {
20424		return nil
20425	}
20426	err = iter.page.NextWithContext(ctx)
20427	if err != nil {
20428		iter.i--
20429		return err
20430	}
20431	iter.i = 0
20432	return nil
20433}
20434
20435// Next advances to the next value.  If there was an error making
20436// the request the iterator does not advance and the error is returned.
20437// Deprecated: Use NextWithContext() instead.
20438func (iter *PublicIPPrefixListResultIterator) Next() error {
20439	return iter.NextWithContext(context.Background())
20440}
20441
20442// NotDone returns true if the enumeration should be started or is not yet complete.
20443func (iter PublicIPPrefixListResultIterator) NotDone() bool {
20444	return iter.page.NotDone() && iter.i < len(iter.page.Values())
20445}
20446
20447// Response returns the raw server response from the last page request.
20448func (iter PublicIPPrefixListResultIterator) Response() PublicIPPrefixListResult {
20449	return iter.page.Response()
20450}
20451
20452// Value returns the current value or a zero-initialized value if the
20453// iterator has advanced beyond the end of the collection.
20454func (iter PublicIPPrefixListResultIterator) Value() PublicIPPrefix {
20455	if !iter.page.NotDone() {
20456		return PublicIPPrefix{}
20457	}
20458	return iter.page.Values()[iter.i]
20459}
20460
20461// Creates a new instance of the PublicIPPrefixListResultIterator type.
20462func NewPublicIPPrefixListResultIterator(page PublicIPPrefixListResultPage) PublicIPPrefixListResultIterator {
20463	return PublicIPPrefixListResultIterator{page: page}
20464}
20465
20466// IsEmpty returns true if the ListResult contains no values.
20467func (piplr PublicIPPrefixListResult) IsEmpty() bool {
20468	return piplr.Value == nil || len(*piplr.Value) == 0
20469}
20470
20471// hasNextLink returns true if the NextLink is not empty.
20472func (piplr PublicIPPrefixListResult) hasNextLink() bool {
20473	return piplr.NextLink != nil && len(*piplr.NextLink) != 0
20474}
20475
20476// publicIPPrefixListResultPreparer prepares a request to retrieve the next set of results.
20477// It returns nil if no more results exist.
20478func (piplr PublicIPPrefixListResult) publicIPPrefixListResultPreparer(ctx context.Context) (*http.Request, error) {
20479	if !piplr.hasNextLink() {
20480		return nil, nil
20481	}
20482	return autorest.Prepare((&http.Request{}).WithContext(ctx),
20483		autorest.AsJSON(),
20484		autorest.AsGet(),
20485		autorest.WithBaseURL(to.String(piplr.NextLink)))
20486}
20487
20488// PublicIPPrefixListResultPage contains a page of PublicIPPrefix values.
20489type PublicIPPrefixListResultPage struct {
20490	fn    func(context.Context, PublicIPPrefixListResult) (PublicIPPrefixListResult, error)
20491	piplr PublicIPPrefixListResult
20492}
20493
20494// NextWithContext advances to the next page of values.  If there was an error making
20495// the request the page does not advance and the error is returned.
20496func (page *PublicIPPrefixListResultPage) NextWithContext(ctx context.Context) (err error) {
20497	if tracing.IsEnabled() {
20498		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixListResultPage.NextWithContext")
20499		defer func() {
20500			sc := -1
20501			if page.Response().Response.Response != nil {
20502				sc = page.Response().Response.Response.StatusCode
20503			}
20504			tracing.EndSpan(ctx, sc, err)
20505		}()
20506	}
20507	for {
20508		next, err := page.fn(ctx, page.piplr)
20509		if err != nil {
20510			return err
20511		}
20512		page.piplr = next
20513		if !next.hasNextLink() || !next.IsEmpty() {
20514			break
20515		}
20516	}
20517	return nil
20518}
20519
20520// Next advances to the next page of values.  If there was an error making
20521// the request the page does not advance and the error is returned.
20522// Deprecated: Use NextWithContext() instead.
20523func (page *PublicIPPrefixListResultPage) Next() error {
20524	return page.NextWithContext(context.Background())
20525}
20526
20527// NotDone returns true if the page enumeration should be started or is not yet complete.
20528func (page PublicIPPrefixListResultPage) NotDone() bool {
20529	return !page.piplr.IsEmpty()
20530}
20531
20532// Response returns the raw server response from the last page request.
20533func (page PublicIPPrefixListResultPage) Response() PublicIPPrefixListResult {
20534	return page.piplr
20535}
20536
20537// Values returns the slice of values for the current page or nil if there are no values.
20538func (page PublicIPPrefixListResultPage) Values() []PublicIPPrefix {
20539	if page.piplr.IsEmpty() {
20540		return nil
20541	}
20542	return *page.piplr.Value
20543}
20544
20545// Creates a new instance of the PublicIPPrefixListResultPage type.
20546func NewPublicIPPrefixListResultPage(cur PublicIPPrefixListResult, getNextPage func(context.Context, PublicIPPrefixListResult) (PublicIPPrefixListResult, error)) PublicIPPrefixListResultPage {
20547	return PublicIPPrefixListResultPage{
20548		fn:    getNextPage,
20549		piplr: cur,
20550	}
20551}
20552
20553// PublicIPPrefixPropertiesFormat public IP prefix properties.
20554type PublicIPPrefixPropertiesFormat struct {
20555	// PublicIPAddressVersion - The public IP address version. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6'
20556	PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"`
20557	// IPTags - The list of tags associated with the public IP prefix.
20558	IPTags *[]IPTag `json:"ipTags,omitempty"`
20559	// PrefixLength - The Length of the Public IP Prefix.
20560	PrefixLength *int32 `json:"prefixLength,omitempty"`
20561	// IPPrefix - The allocated Prefix
20562	IPPrefix *string `json:"ipPrefix,omitempty"`
20563	// PublicIPAddresses - The list of all referenced PublicIPAddresses
20564	PublicIPAddresses *[]ReferencedPublicIPAddress `json:"publicIPAddresses,omitempty"`
20565	// LoadBalancerFrontendIPConfiguration - READ-ONLY; The reference to load balancer frontend IP configuration associated with the public IP prefix.
20566	LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIpConfiguration,omitempty"`
20567	// ResourceGUID - The resource GUID property of the public IP prefix resource.
20568	ResourceGUID *string `json:"resourceGuid,omitempty"`
20569	// ProvisioningState - The provisioning state of the Public IP prefix resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
20570	ProvisioningState *string `json:"provisioningState,omitempty"`
20571}
20572
20573// MarshalJSON is the custom marshaler for PublicIPPrefixPropertiesFormat.
20574func (pippf PublicIPPrefixPropertiesFormat) MarshalJSON() ([]byte, error) {
20575	objectMap := make(map[string]interface{})
20576	if pippf.PublicIPAddressVersion != "" {
20577		objectMap["publicIPAddressVersion"] = pippf.PublicIPAddressVersion
20578	}
20579	if pippf.IPTags != nil {
20580		objectMap["ipTags"] = pippf.IPTags
20581	}
20582	if pippf.PrefixLength != nil {
20583		objectMap["prefixLength"] = pippf.PrefixLength
20584	}
20585	if pippf.IPPrefix != nil {
20586		objectMap["ipPrefix"] = pippf.IPPrefix
20587	}
20588	if pippf.PublicIPAddresses != nil {
20589		objectMap["publicIPAddresses"] = pippf.PublicIPAddresses
20590	}
20591	if pippf.ResourceGUID != nil {
20592		objectMap["resourceGuid"] = pippf.ResourceGUID
20593	}
20594	if pippf.ProvisioningState != nil {
20595		objectMap["provisioningState"] = pippf.ProvisioningState
20596	}
20597	return json.Marshal(objectMap)
20598}
20599
20600// PublicIPPrefixSku SKU of a public IP prefix
20601type PublicIPPrefixSku struct {
20602	// Name - Name of a public IP prefix SKU. Possible values include: 'Standard'
20603	Name PublicIPPrefixSkuName `json:"name,omitempty"`
20604}
20605
20606// QueryTroubleshootingParameters parameters that define the resource to query the troubleshooting result.
20607type QueryTroubleshootingParameters struct {
20608	// TargetResourceID - The target resource ID to query the troubleshooting result.
20609	TargetResourceID *string `json:"targetResourceId,omitempty"`
20610}
20611
20612// ReferencedPublicIPAddress ...
20613type ReferencedPublicIPAddress struct {
20614	// ID - The PublicIPAddress Reference
20615	ID *string `json:"id,omitempty"`
20616}
20617
20618// Resource common resource representation.
20619type Resource struct {
20620	// ID - Resource ID.
20621	ID *string `json:"id,omitempty"`
20622	// Name - READ-ONLY; Resource name.
20623	Name *string `json:"name,omitempty"`
20624	// Type - READ-ONLY; Resource type.
20625	Type *string `json:"type,omitempty"`
20626	// Location - Resource location.
20627	Location *string `json:"location,omitempty"`
20628	// Tags - Resource tags.
20629	Tags map[string]*string `json:"tags"`
20630}
20631
20632// MarshalJSON is the custom marshaler for Resource.
20633func (r Resource) MarshalJSON() ([]byte, error) {
20634	objectMap := make(map[string]interface{})
20635	if r.ID != nil {
20636		objectMap["id"] = r.ID
20637	}
20638	if r.Location != nil {
20639		objectMap["location"] = r.Location
20640	}
20641	if r.Tags != nil {
20642		objectMap["tags"] = r.Tags
20643	}
20644	return json.Marshal(objectMap)
20645}
20646
20647// ResourceNavigationLink resourceNavigationLink resource.
20648type ResourceNavigationLink struct {
20649	// ResourceNavigationLinkFormat - Resource navigation link properties format.
20650	*ResourceNavigationLinkFormat `json:"properties,omitempty"`
20651	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
20652	Name *string `json:"name,omitempty"`
20653	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
20654	Etag *string `json:"etag,omitempty"`
20655	// ID - Resource ID.
20656	ID *string `json:"id,omitempty"`
20657}
20658
20659// MarshalJSON is the custom marshaler for ResourceNavigationLink.
20660func (rnl ResourceNavigationLink) MarshalJSON() ([]byte, error) {
20661	objectMap := make(map[string]interface{})
20662	if rnl.ResourceNavigationLinkFormat != nil {
20663		objectMap["properties"] = rnl.ResourceNavigationLinkFormat
20664	}
20665	if rnl.Name != nil {
20666		objectMap["name"] = rnl.Name
20667	}
20668	if rnl.ID != nil {
20669		objectMap["id"] = rnl.ID
20670	}
20671	return json.Marshal(objectMap)
20672}
20673
20674// UnmarshalJSON is the custom unmarshaler for ResourceNavigationLink struct.
20675func (rnl *ResourceNavigationLink) UnmarshalJSON(body []byte) error {
20676	var m map[string]*json.RawMessage
20677	err := json.Unmarshal(body, &m)
20678	if err != nil {
20679		return err
20680	}
20681	for k, v := range m {
20682		switch k {
20683		case "properties":
20684			if v != nil {
20685				var resourceNavigationLinkFormat ResourceNavigationLinkFormat
20686				err = json.Unmarshal(*v, &resourceNavigationLinkFormat)
20687				if err != nil {
20688					return err
20689				}
20690				rnl.ResourceNavigationLinkFormat = &resourceNavigationLinkFormat
20691			}
20692		case "name":
20693			if v != nil {
20694				var name string
20695				err = json.Unmarshal(*v, &name)
20696				if err != nil {
20697					return err
20698				}
20699				rnl.Name = &name
20700			}
20701		case "etag":
20702			if v != nil {
20703				var etag string
20704				err = json.Unmarshal(*v, &etag)
20705				if err != nil {
20706					return err
20707				}
20708				rnl.Etag = &etag
20709			}
20710		case "id":
20711			if v != nil {
20712				var ID string
20713				err = json.Unmarshal(*v, &ID)
20714				if err != nil {
20715					return err
20716				}
20717				rnl.ID = &ID
20718			}
20719		}
20720	}
20721
20722	return nil
20723}
20724
20725// ResourceNavigationLinkFormat properties of ResourceNavigationLink.
20726type ResourceNavigationLinkFormat struct {
20727	// LinkedResourceType - Resource type of the linked resource.
20728	LinkedResourceType *string `json:"linkedResourceType,omitempty"`
20729	// Link - Link to the external resource
20730	Link *string `json:"link,omitempty"`
20731	// ProvisioningState - READ-ONLY; Provisioning state of the ResourceNavigationLink resource.
20732	ProvisioningState *string `json:"provisioningState,omitempty"`
20733}
20734
20735// MarshalJSON is the custom marshaler for ResourceNavigationLinkFormat.
20736func (rnlf ResourceNavigationLinkFormat) MarshalJSON() ([]byte, error) {
20737	objectMap := make(map[string]interface{})
20738	if rnlf.LinkedResourceType != nil {
20739		objectMap["linkedResourceType"] = rnlf.LinkedResourceType
20740	}
20741	if rnlf.Link != nil {
20742		objectMap["link"] = rnlf.Link
20743	}
20744	return json.Marshal(objectMap)
20745}
20746
20747// RetentionPolicyParameters parameters that define the retention policy for flow log.
20748type RetentionPolicyParameters struct {
20749	// Days - Number of days to retain flow log records.
20750	Days *int32 `json:"days,omitempty"`
20751	// Enabled - Flag to enable/disable retention.
20752	Enabled *bool `json:"enabled,omitempty"`
20753}
20754
20755// Route route resource
20756type Route struct {
20757	autorest.Response `json:"-"`
20758	// RoutePropertiesFormat - Properties of the route.
20759	*RoutePropertiesFormat `json:"properties,omitempty"`
20760	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
20761	Name *string `json:"name,omitempty"`
20762	// Etag - A unique read-only string that changes whenever the resource is updated.
20763	Etag *string `json:"etag,omitempty"`
20764	// ID - Resource ID.
20765	ID *string `json:"id,omitempty"`
20766}
20767
20768// MarshalJSON is the custom marshaler for Route.
20769func (r Route) MarshalJSON() ([]byte, error) {
20770	objectMap := make(map[string]interface{})
20771	if r.RoutePropertiesFormat != nil {
20772		objectMap["properties"] = r.RoutePropertiesFormat
20773	}
20774	if r.Name != nil {
20775		objectMap["name"] = r.Name
20776	}
20777	if r.Etag != nil {
20778		objectMap["etag"] = r.Etag
20779	}
20780	if r.ID != nil {
20781		objectMap["id"] = r.ID
20782	}
20783	return json.Marshal(objectMap)
20784}
20785
20786// UnmarshalJSON is the custom unmarshaler for Route struct.
20787func (r *Route) UnmarshalJSON(body []byte) error {
20788	var m map[string]*json.RawMessage
20789	err := json.Unmarshal(body, &m)
20790	if err != nil {
20791		return err
20792	}
20793	for k, v := range m {
20794		switch k {
20795		case "properties":
20796			if v != nil {
20797				var routePropertiesFormat RoutePropertiesFormat
20798				err = json.Unmarshal(*v, &routePropertiesFormat)
20799				if err != nil {
20800					return err
20801				}
20802				r.RoutePropertiesFormat = &routePropertiesFormat
20803			}
20804		case "name":
20805			if v != nil {
20806				var name string
20807				err = json.Unmarshal(*v, &name)
20808				if err != nil {
20809					return err
20810				}
20811				r.Name = &name
20812			}
20813		case "etag":
20814			if v != nil {
20815				var etag string
20816				err = json.Unmarshal(*v, &etag)
20817				if err != nil {
20818					return err
20819				}
20820				r.Etag = &etag
20821			}
20822		case "id":
20823			if v != nil {
20824				var ID string
20825				err = json.Unmarshal(*v, &ID)
20826				if err != nil {
20827					return err
20828				}
20829				r.ID = &ID
20830			}
20831		}
20832	}
20833
20834	return nil
20835}
20836
20837// RouteFilter route Filter Resource.
20838type RouteFilter struct {
20839	autorest.Response            `json:"-"`
20840	*RouteFilterPropertiesFormat `json:"properties,omitempty"`
20841	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
20842	Etag *string `json:"etag,omitempty"`
20843	// ID - Resource ID.
20844	ID *string `json:"id,omitempty"`
20845	// Name - READ-ONLY; Resource name.
20846	Name *string `json:"name,omitempty"`
20847	// Type - READ-ONLY; Resource type.
20848	Type *string `json:"type,omitempty"`
20849	// Location - Resource location.
20850	Location *string `json:"location,omitempty"`
20851	// Tags - Resource tags.
20852	Tags map[string]*string `json:"tags"`
20853}
20854
20855// MarshalJSON is the custom marshaler for RouteFilter.
20856func (rf RouteFilter) MarshalJSON() ([]byte, error) {
20857	objectMap := make(map[string]interface{})
20858	if rf.RouteFilterPropertiesFormat != nil {
20859		objectMap["properties"] = rf.RouteFilterPropertiesFormat
20860	}
20861	if rf.ID != nil {
20862		objectMap["id"] = rf.ID
20863	}
20864	if rf.Location != nil {
20865		objectMap["location"] = rf.Location
20866	}
20867	if rf.Tags != nil {
20868		objectMap["tags"] = rf.Tags
20869	}
20870	return json.Marshal(objectMap)
20871}
20872
20873// UnmarshalJSON is the custom unmarshaler for RouteFilter struct.
20874func (rf *RouteFilter) UnmarshalJSON(body []byte) error {
20875	var m map[string]*json.RawMessage
20876	err := json.Unmarshal(body, &m)
20877	if err != nil {
20878		return err
20879	}
20880	for k, v := range m {
20881		switch k {
20882		case "properties":
20883			if v != nil {
20884				var routeFilterPropertiesFormat RouteFilterPropertiesFormat
20885				err = json.Unmarshal(*v, &routeFilterPropertiesFormat)
20886				if err != nil {
20887					return err
20888				}
20889				rf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat
20890			}
20891		case "etag":
20892			if v != nil {
20893				var etag string
20894				err = json.Unmarshal(*v, &etag)
20895				if err != nil {
20896					return err
20897				}
20898				rf.Etag = &etag
20899			}
20900		case "id":
20901			if v != nil {
20902				var ID string
20903				err = json.Unmarshal(*v, &ID)
20904				if err != nil {
20905					return err
20906				}
20907				rf.ID = &ID
20908			}
20909		case "name":
20910			if v != nil {
20911				var name string
20912				err = json.Unmarshal(*v, &name)
20913				if err != nil {
20914					return err
20915				}
20916				rf.Name = &name
20917			}
20918		case "type":
20919			if v != nil {
20920				var typeVar string
20921				err = json.Unmarshal(*v, &typeVar)
20922				if err != nil {
20923					return err
20924				}
20925				rf.Type = &typeVar
20926			}
20927		case "location":
20928			if v != nil {
20929				var location string
20930				err = json.Unmarshal(*v, &location)
20931				if err != nil {
20932					return err
20933				}
20934				rf.Location = &location
20935			}
20936		case "tags":
20937			if v != nil {
20938				var tags map[string]*string
20939				err = json.Unmarshal(*v, &tags)
20940				if err != nil {
20941					return err
20942				}
20943				rf.Tags = tags
20944			}
20945		}
20946	}
20947
20948	return nil
20949}
20950
20951// RouteFilterListResult response for the ListRouteFilters API service call.
20952type RouteFilterListResult struct {
20953	autorest.Response `json:"-"`
20954	// Value - Gets a list of route filters in a resource group.
20955	Value *[]RouteFilter `json:"value,omitempty"`
20956	// NextLink - The URL to get the next set of results.
20957	NextLink *string `json:"nextLink,omitempty"`
20958}
20959
20960// RouteFilterListResultIterator provides access to a complete listing of RouteFilter values.
20961type RouteFilterListResultIterator struct {
20962	i    int
20963	page RouteFilterListResultPage
20964}
20965
20966// NextWithContext advances to the next value.  If there was an error making
20967// the request the iterator does not advance and the error is returned.
20968func (iter *RouteFilterListResultIterator) NextWithContext(ctx context.Context) (err error) {
20969	if tracing.IsEnabled() {
20970		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultIterator.NextWithContext")
20971		defer func() {
20972			sc := -1
20973			if iter.Response().Response.Response != nil {
20974				sc = iter.Response().Response.Response.StatusCode
20975			}
20976			tracing.EndSpan(ctx, sc, err)
20977		}()
20978	}
20979	iter.i++
20980	if iter.i < len(iter.page.Values()) {
20981		return nil
20982	}
20983	err = iter.page.NextWithContext(ctx)
20984	if err != nil {
20985		iter.i--
20986		return err
20987	}
20988	iter.i = 0
20989	return nil
20990}
20991
20992// Next advances to the next value.  If there was an error making
20993// the request the iterator does not advance and the error is returned.
20994// Deprecated: Use NextWithContext() instead.
20995func (iter *RouteFilterListResultIterator) Next() error {
20996	return iter.NextWithContext(context.Background())
20997}
20998
20999// NotDone returns true if the enumeration should be started or is not yet complete.
21000func (iter RouteFilterListResultIterator) NotDone() bool {
21001	return iter.page.NotDone() && iter.i < len(iter.page.Values())
21002}
21003
21004// Response returns the raw server response from the last page request.
21005func (iter RouteFilterListResultIterator) Response() RouteFilterListResult {
21006	return iter.page.Response()
21007}
21008
21009// Value returns the current value or a zero-initialized value if the
21010// iterator has advanced beyond the end of the collection.
21011func (iter RouteFilterListResultIterator) Value() RouteFilter {
21012	if !iter.page.NotDone() {
21013		return RouteFilter{}
21014	}
21015	return iter.page.Values()[iter.i]
21016}
21017
21018// Creates a new instance of the RouteFilterListResultIterator type.
21019func NewRouteFilterListResultIterator(page RouteFilterListResultPage) RouteFilterListResultIterator {
21020	return RouteFilterListResultIterator{page: page}
21021}
21022
21023// IsEmpty returns true if the ListResult contains no values.
21024func (rflr RouteFilterListResult) IsEmpty() bool {
21025	return rflr.Value == nil || len(*rflr.Value) == 0
21026}
21027
21028// hasNextLink returns true if the NextLink is not empty.
21029func (rflr RouteFilterListResult) hasNextLink() bool {
21030	return rflr.NextLink != nil && len(*rflr.NextLink) != 0
21031}
21032
21033// routeFilterListResultPreparer prepares a request to retrieve the next set of results.
21034// It returns nil if no more results exist.
21035func (rflr RouteFilterListResult) routeFilterListResultPreparer(ctx context.Context) (*http.Request, error) {
21036	if !rflr.hasNextLink() {
21037		return nil, nil
21038	}
21039	return autorest.Prepare((&http.Request{}).WithContext(ctx),
21040		autorest.AsJSON(),
21041		autorest.AsGet(),
21042		autorest.WithBaseURL(to.String(rflr.NextLink)))
21043}
21044
21045// RouteFilterListResultPage contains a page of RouteFilter values.
21046type RouteFilterListResultPage struct {
21047	fn   func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)
21048	rflr RouteFilterListResult
21049}
21050
21051// NextWithContext advances to the next page of values.  If there was an error making
21052// the request the page does not advance and the error is returned.
21053func (page *RouteFilterListResultPage) NextWithContext(ctx context.Context) (err error) {
21054	if tracing.IsEnabled() {
21055		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultPage.NextWithContext")
21056		defer func() {
21057			sc := -1
21058			if page.Response().Response.Response != nil {
21059				sc = page.Response().Response.Response.StatusCode
21060			}
21061			tracing.EndSpan(ctx, sc, err)
21062		}()
21063	}
21064	for {
21065		next, err := page.fn(ctx, page.rflr)
21066		if err != nil {
21067			return err
21068		}
21069		page.rflr = next
21070		if !next.hasNextLink() || !next.IsEmpty() {
21071			break
21072		}
21073	}
21074	return nil
21075}
21076
21077// Next advances to the next page of values.  If there was an error making
21078// the request the page does not advance and the error is returned.
21079// Deprecated: Use NextWithContext() instead.
21080func (page *RouteFilterListResultPage) Next() error {
21081	return page.NextWithContext(context.Background())
21082}
21083
21084// NotDone returns true if the page enumeration should be started or is not yet complete.
21085func (page RouteFilterListResultPage) NotDone() bool {
21086	return !page.rflr.IsEmpty()
21087}
21088
21089// Response returns the raw server response from the last page request.
21090func (page RouteFilterListResultPage) Response() RouteFilterListResult {
21091	return page.rflr
21092}
21093
21094// Values returns the slice of values for the current page or nil if there are no values.
21095func (page RouteFilterListResultPage) Values() []RouteFilter {
21096	if page.rflr.IsEmpty() {
21097		return nil
21098	}
21099	return *page.rflr.Value
21100}
21101
21102// Creates a new instance of the RouteFilterListResultPage type.
21103func NewRouteFilterListResultPage(cur RouteFilterListResult, getNextPage func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)) RouteFilterListResultPage {
21104	return RouteFilterListResultPage{
21105		fn:   getNextPage,
21106		rflr: cur,
21107	}
21108}
21109
21110// RouteFilterPropertiesFormat route Filter Resource
21111type RouteFilterPropertiesFormat struct {
21112	// Rules - Collection of RouteFilterRules contained within a route filter.
21113	Rules *[]RouteFilterRule `json:"rules,omitempty"`
21114	// Peerings - A collection of references to express route circuit peerings.
21115	Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"`
21116	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', 'Succeeded' and 'Failed'.
21117	ProvisioningState *string `json:"provisioningState,omitempty"`
21118}
21119
21120// MarshalJSON is the custom marshaler for RouteFilterPropertiesFormat.
21121func (rfpf RouteFilterPropertiesFormat) MarshalJSON() ([]byte, error) {
21122	objectMap := make(map[string]interface{})
21123	if rfpf.Rules != nil {
21124		objectMap["rules"] = rfpf.Rules
21125	}
21126	if rfpf.Peerings != nil {
21127		objectMap["peerings"] = rfpf.Peerings
21128	}
21129	return json.Marshal(objectMap)
21130}
21131
21132// RouteFilterRule route Filter Rule Resource
21133type RouteFilterRule struct {
21134	autorest.Response                `json:"-"`
21135	*RouteFilterRulePropertiesFormat `json:"properties,omitempty"`
21136	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
21137	Name *string `json:"name,omitempty"`
21138	// Location - Resource location.
21139	Location *string `json:"location,omitempty"`
21140	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
21141	Etag *string `json:"etag,omitempty"`
21142	// ID - Resource ID.
21143	ID *string `json:"id,omitempty"`
21144}
21145
21146// MarshalJSON is the custom marshaler for RouteFilterRule.
21147func (rfr RouteFilterRule) MarshalJSON() ([]byte, error) {
21148	objectMap := make(map[string]interface{})
21149	if rfr.RouteFilterRulePropertiesFormat != nil {
21150		objectMap["properties"] = rfr.RouteFilterRulePropertiesFormat
21151	}
21152	if rfr.Name != nil {
21153		objectMap["name"] = rfr.Name
21154	}
21155	if rfr.Location != nil {
21156		objectMap["location"] = rfr.Location
21157	}
21158	if rfr.ID != nil {
21159		objectMap["id"] = rfr.ID
21160	}
21161	return json.Marshal(objectMap)
21162}
21163
21164// UnmarshalJSON is the custom unmarshaler for RouteFilterRule struct.
21165func (rfr *RouteFilterRule) UnmarshalJSON(body []byte) error {
21166	var m map[string]*json.RawMessage
21167	err := json.Unmarshal(body, &m)
21168	if err != nil {
21169		return err
21170	}
21171	for k, v := range m {
21172		switch k {
21173		case "properties":
21174			if v != nil {
21175				var routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat
21176				err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat)
21177				if err != nil {
21178					return err
21179				}
21180				rfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat
21181			}
21182		case "name":
21183			if v != nil {
21184				var name string
21185				err = json.Unmarshal(*v, &name)
21186				if err != nil {
21187					return err
21188				}
21189				rfr.Name = &name
21190			}
21191		case "location":
21192			if v != nil {
21193				var location string
21194				err = json.Unmarshal(*v, &location)
21195				if err != nil {
21196					return err
21197				}
21198				rfr.Location = &location
21199			}
21200		case "etag":
21201			if v != nil {
21202				var etag string
21203				err = json.Unmarshal(*v, &etag)
21204				if err != nil {
21205					return err
21206				}
21207				rfr.Etag = &etag
21208			}
21209		case "id":
21210			if v != nil {
21211				var ID string
21212				err = json.Unmarshal(*v, &ID)
21213				if err != nil {
21214					return err
21215				}
21216				rfr.ID = &ID
21217			}
21218		}
21219	}
21220
21221	return nil
21222}
21223
21224// RouteFilterRuleListResult response for the ListRouteFilterRules API service call
21225type RouteFilterRuleListResult struct {
21226	autorest.Response `json:"-"`
21227	// Value - Gets a list of RouteFilterRules in a resource group.
21228	Value *[]RouteFilterRule `json:"value,omitempty"`
21229	// NextLink - The URL to get the next set of results.
21230	NextLink *string `json:"nextLink,omitempty"`
21231}
21232
21233// RouteFilterRuleListResultIterator provides access to a complete listing of RouteFilterRule values.
21234type RouteFilterRuleListResultIterator struct {
21235	i    int
21236	page RouteFilterRuleListResultPage
21237}
21238
21239// NextWithContext advances to the next value.  If there was an error making
21240// the request the iterator does not advance and the error is returned.
21241func (iter *RouteFilterRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
21242	if tracing.IsEnabled() {
21243		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultIterator.NextWithContext")
21244		defer func() {
21245			sc := -1
21246			if iter.Response().Response.Response != nil {
21247				sc = iter.Response().Response.Response.StatusCode
21248			}
21249			tracing.EndSpan(ctx, sc, err)
21250		}()
21251	}
21252	iter.i++
21253	if iter.i < len(iter.page.Values()) {
21254		return nil
21255	}
21256	err = iter.page.NextWithContext(ctx)
21257	if err != nil {
21258		iter.i--
21259		return err
21260	}
21261	iter.i = 0
21262	return nil
21263}
21264
21265// Next advances to the next value.  If there was an error making
21266// the request the iterator does not advance and the error is returned.
21267// Deprecated: Use NextWithContext() instead.
21268func (iter *RouteFilterRuleListResultIterator) Next() error {
21269	return iter.NextWithContext(context.Background())
21270}
21271
21272// NotDone returns true if the enumeration should be started or is not yet complete.
21273func (iter RouteFilterRuleListResultIterator) NotDone() bool {
21274	return iter.page.NotDone() && iter.i < len(iter.page.Values())
21275}
21276
21277// Response returns the raw server response from the last page request.
21278func (iter RouteFilterRuleListResultIterator) Response() RouteFilterRuleListResult {
21279	return iter.page.Response()
21280}
21281
21282// Value returns the current value or a zero-initialized value if the
21283// iterator has advanced beyond the end of the collection.
21284func (iter RouteFilterRuleListResultIterator) Value() RouteFilterRule {
21285	if !iter.page.NotDone() {
21286		return RouteFilterRule{}
21287	}
21288	return iter.page.Values()[iter.i]
21289}
21290
21291// Creates a new instance of the RouteFilterRuleListResultIterator type.
21292func NewRouteFilterRuleListResultIterator(page RouteFilterRuleListResultPage) RouteFilterRuleListResultIterator {
21293	return RouteFilterRuleListResultIterator{page: page}
21294}
21295
21296// IsEmpty returns true if the ListResult contains no values.
21297func (rfrlr RouteFilterRuleListResult) IsEmpty() bool {
21298	return rfrlr.Value == nil || len(*rfrlr.Value) == 0
21299}
21300
21301// hasNextLink returns true if the NextLink is not empty.
21302func (rfrlr RouteFilterRuleListResult) hasNextLink() bool {
21303	return rfrlr.NextLink != nil && len(*rfrlr.NextLink) != 0
21304}
21305
21306// routeFilterRuleListResultPreparer prepares a request to retrieve the next set of results.
21307// It returns nil if no more results exist.
21308func (rfrlr RouteFilterRuleListResult) routeFilterRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
21309	if !rfrlr.hasNextLink() {
21310		return nil, nil
21311	}
21312	return autorest.Prepare((&http.Request{}).WithContext(ctx),
21313		autorest.AsJSON(),
21314		autorest.AsGet(),
21315		autorest.WithBaseURL(to.String(rfrlr.NextLink)))
21316}
21317
21318// RouteFilterRuleListResultPage contains a page of RouteFilterRule values.
21319type RouteFilterRuleListResultPage struct {
21320	fn    func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)
21321	rfrlr RouteFilterRuleListResult
21322}
21323
21324// NextWithContext advances to the next page of values.  If there was an error making
21325// the request the page does not advance and the error is returned.
21326func (page *RouteFilterRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
21327	if tracing.IsEnabled() {
21328		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultPage.NextWithContext")
21329		defer func() {
21330			sc := -1
21331			if page.Response().Response.Response != nil {
21332				sc = page.Response().Response.Response.StatusCode
21333			}
21334			tracing.EndSpan(ctx, sc, err)
21335		}()
21336	}
21337	for {
21338		next, err := page.fn(ctx, page.rfrlr)
21339		if err != nil {
21340			return err
21341		}
21342		page.rfrlr = next
21343		if !next.hasNextLink() || !next.IsEmpty() {
21344			break
21345		}
21346	}
21347	return nil
21348}
21349
21350// Next advances to the next page of values.  If there was an error making
21351// the request the page does not advance and the error is returned.
21352// Deprecated: Use NextWithContext() instead.
21353func (page *RouteFilterRuleListResultPage) Next() error {
21354	return page.NextWithContext(context.Background())
21355}
21356
21357// NotDone returns true if the page enumeration should be started or is not yet complete.
21358func (page RouteFilterRuleListResultPage) NotDone() bool {
21359	return !page.rfrlr.IsEmpty()
21360}
21361
21362// Response returns the raw server response from the last page request.
21363func (page RouteFilterRuleListResultPage) Response() RouteFilterRuleListResult {
21364	return page.rfrlr
21365}
21366
21367// Values returns the slice of values for the current page or nil if there are no values.
21368func (page RouteFilterRuleListResultPage) Values() []RouteFilterRule {
21369	if page.rfrlr.IsEmpty() {
21370		return nil
21371	}
21372	return *page.rfrlr.Value
21373}
21374
21375// Creates a new instance of the RouteFilterRuleListResultPage type.
21376func NewRouteFilterRuleListResultPage(cur RouteFilterRuleListResult, getNextPage func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)) RouteFilterRuleListResultPage {
21377	return RouteFilterRuleListResultPage{
21378		fn:    getNextPage,
21379		rfrlr: cur,
21380	}
21381}
21382
21383// RouteFilterRulePropertiesFormat route Filter Rule Resource
21384type RouteFilterRulePropertiesFormat struct {
21385	// Access - The access type of the rule. Valid values are: 'Allow', 'Deny'. Possible values include: 'Allow', 'Deny'
21386	Access Access `json:"access,omitempty"`
21387	// RouteFilterRuleType - The rule type of the rule. Valid value is: 'Community'
21388	RouteFilterRuleType *string `json:"routeFilterRuleType,omitempty"`
21389	// Communities - The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020']
21390	Communities *[]string `json:"communities,omitempty"`
21391	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', 'Succeeded' and 'Failed'.
21392	ProvisioningState *string `json:"provisioningState,omitempty"`
21393}
21394
21395// MarshalJSON is the custom marshaler for RouteFilterRulePropertiesFormat.
21396func (rfrpf RouteFilterRulePropertiesFormat) MarshalJSON() ([]byte, error) {
21397	objectMap := make(map[string]interface{})
21398	if rfrpf.Access != "" {
21399		objectMap["access"] = rfrpf.Access
21400	}
21401	if rfrpf.RouteFilterRuleType != nil {
21402		objectMap["routeFilterRuleType"] = rfrpf.RouteFilterRuleType
21403	}
21404	if rfrpf.Communities != nil {
21405		objectMap["communities"] = rfrpf.Communities
21406	}
21407	return json.Marshal(objectMap)
21408}
21409
21410// RouteFilterRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
21411// long-running operation.
21412type RouteFilterRulesCreateOrUpdateFuture struct {
21413	azure.FutureAPI
21414	// Result returns the result of the asynchronous operation.
21415	// If the operation has not completed it will return an error.
21416	Result func(RouteFilterRulesClient) (RouteFilterRule, error)
21417}
21418
21419// UnmarshalJSON is the custom unmarshaller for CreateFuture.
21420func (future *RouteFilterRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
21421	var azFuture azure.Future
21422	if err := json.Unmarshal(body, &azFuture); err != nil {
21423		return err
21424	}
21425	future.FutureAPI = &azFuture
21426	future.Result = future.result
21427	return nil
21428}
21429
21430// result is the default implementation for RouteFilterRulesCreateOrUpdateFuture.Result.
21431func (future *RouteFilterRulesCreateOrUpdateFuture) result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
21432	var done bool
21433	done, err = future.DoneWithContext(context.Background(), client)
21434	if err != nil {
21435		err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
21436		return
21437	}
21438	if !done {
21439		rfr.Response.Response = future.Response()
21440		err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesCreateOrUpdateFuture")
21441		return
21442	}
21443	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
21444	if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent {
21445		rfr, err = client.CreateOrUpdateResponder(rfr.Response.Response)
21446		if err != nil {
21447			err = autorest.NewErrorWithError(err, "network.RouteFilterRulesCreateOrUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request")
21448		}
21449	}
21450	return
21451}
21452
21453// RouteFilterRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
21454// operation.
21455type RouteFilterRulesDeleteFuture struct {
21456	azure.FutureAPI
21457	// Result returns the result of the asynchronous operation.
21458	// If the operation has not completed it will return an error.
21459	Result func(RouteFilterRulesClient) (autorest.Response, error)
21460}
21461
21462// UnmarshalJSON is the custom unmarshaller for CreateFuture.
21463func (future *RouteFilterRulesDeleteFuture) UnmarshalJSON(body []byte) error {
21464	var azFuture azure.Future
21465	if err := json.Unmarshal(body, &azFuture); err != nil {
21466		return err
21467	}
21468	future.FutureAPI = &azFuture
21469	future.Result = future.result
21470	return nil
21471}
21472
21473// result is the default implementation for RouteFilterRulesDeleteFuture.Result.
21474func (future *RouteFilterRulesDeleteFuture) result(client RouteFilterRulesClient) (ar autorest.Response, err error) {
21475	var done bool
21476	done, err = future.DoneWithContext(context.Background(), client)
21477	if err != nil {
21478		err = autorest.NewErrorWithError(err, "network.RouteFilterRulesDeleteFuture", "Result", future.Response(), "Polling failure")
21479		return
21480	}
21481	if !done {
21482		ar.Response = future.Response()
21483		err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesDeleteFuture")
21484		return
21485	}
21486	ar.Response = future.Response()
21487	return
21488}
21489
21490// RouteFilterRulesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
21491// operation.
21492type RouteFilterRulesUpdateFuture struct {
21493	azure.FutureAPI
21494	// Result returns the result of the asynchronous operation.
21495	// If the operation has not completed it will return an error.
21496	Result func(RouteFilterRulesClient) (RouteFilterRule, error)
21497}
21498
21499// UnmarshalJSON is the custom unmarshaller for CreateFuture.
21500func (future *RouteFilterRulesUpdateFuture) UnmarshalJSON(body []byte) error {
21501	var azFuture azure.Future
21502	if err := json.Unmarshal(body, &azFuture); err != nil {
21503		return err
21504	}
21505	future.FutureAPI = &azFuture
21506	future.Result = future.result
21507	return nil
21508}
21509
21510// result is the default implementation for RouteFilterRulesUpdateFuture.Result.
21511func (future *RouteFilterRulesUpdateFuture) result(client RouteFilterRulesClient) (rfr RouteFilterRule, err error) {
21512	var done bool
21513	done, err = future.DoneWithContext(context.Background(), client)
21514	if err != nil {
21515		err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", future.Response(), "Polling failure")
21516		return
21517	}
21518	if !done {
21519		rfr.Response.Response = future.Response()
21520		err = azure.NewAsyncOpIncompleteError("network.RouteFilterRulesUpdateFuture")
21521		return
21522	}
21523	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
21524	if rfr.Response.Response, err = future.GetResult(sender); err == nil && rfr.Response.Response.StatusCode != http.StatusNoContent {
21525		rfr, err = client.UpdateResponder(rfr.Response.Response)
21526		if err != nil {
21527			err = autorest.NewErrorWithError(err, "network.RouteFilterRulesUpdateFuture", "Result", rfr.Response.Response, "Failure responding to request")
21528		}
21529	}
21530	return
21531}
21532
21533// RouteFiltersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
21534// long-running operation.
21535type RouteFiltersCreateOrUpdateFuture struct {
21536	azure.FutureAPI
21537	// Result returns the result of the asynchronous operation.
21538	// If the operation has not completed it will return an error.
21539	Result func(RouteFiltersClient) (RouteFilter, error)
21540}
21541
21542// UnmarshalJSON is the custom unmarshaller for CreateFuture.
21543func (future *RouteFiltersCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
21544	var azFuture azure.Future
21545	if err := json.Unmarshal(body, &azFuture); err != nil {
21546		return err
21547	}
21548	future.FutureAPI = &azFuture
21549	future.Result = future.result
21550	return nil
21551}
21552
21553// result is the default implementation for RouteFiltersCreateOrUpdateFuture.Result.
21554func (future *RouteFiltersCreateOrUpdateFuture) result(client RouteFiltersClient) (rf RouteFilter, err error) {
21555	var done bool
21556	done, err = future.DoneWithContext(context.Background(), client)
21557	if err != nil {
21558		err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
21559		return
21560	}
21561	if !done {
21562		rf.Response.Response = future.Response()
21563		err = azure.NewAsyncOpIncompleteError("network.RouteFiltersCreateOrUpdateFuture")
21564		return
21565	}
21566	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
21567	if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent {
21568		rf, err = client.CreateOrUpdateResponder(rf.Response.Response)
21569		if err != nil {
21570			err = autorest.NewErrorWithError(err, "network.RouteFiltersCreateOrUpdateFuture", "Result", rf.Response.Response, "Failure responding to request")
21571		}
21572	}
21573	return
21574}
21575
21576// RouteFiltersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
21577// operation.
21578type RouteFiltersDeleteFuture struct {
21579	azure.FutureAPI
21580	// Result returns the result of the asynchronous operation.
21581	// If the operation has not completed it will return an error.
21582	Result func(RouteFiltersClient) (autorest.Response, error)
21583}
21584
21585// UnmarshalJSON is the custom unmarshaller for CreateFuture.
21586func (future *RouteFiltersDeleteFuture) UnmarshalJSON(body []byte) error {
21587	var azFuture azure.Future
21588	if err := json.Unmarshal(body, &azFuture); err != nil {
21589		return err
21590	}
21591	future.FutureAPI = &azFuture
21592	future.Result = future.result
21593	return nil
21594}
21595
21596// result is the default implementation for RouteFiltersDeleteFuture.Result.
21597func (future *RouteFiltersDeleteFuture) result(client RouteFiltersClient) (ar autorest.Response, err error) {
21598	var done bool
21599	done, err = future.DoneWithContext(context.Background(), client)
21600	if err != nil {
21601		err = autorest.NewErrorWithError(err, "network.RouteFiltersDeleteFuture", "Result", future.Response(), "Polling failure")
21602		return
21603	}
21604	if !done {
21605		ar.Response = future.Response()
21606		err = azure.NewAsyncOpIncompleteError("network.RouteFiltersDeleteFuture")
21607		return
21608	}
21609	ar.Response = future.Response()
21610	return
21611}
21612
21613// RouteFiltersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
21614// operation.
21615type RouteFiltersUpdateFuture struct {
21616	azure.FutureAPI
21617	// Result returns the result of the asynchronous operation.
21618	// If the operation has not completed it will return an error.
21619	Result func(RouteFiltersClient) (RouteFilter, error)
21620}
21621
21622// UnmarshalJSON is the custom unmarshaller for CreateFuture.
21623func (future *RouteFiltersUpdateFuture) UnmarshalJSON(body []byte) error {
21624	var azFuture azure.Future
21625	if err := json.Unmarshal(body, &azFuture); err != nil {
21626		return err
21627	}
21628	future.FutureAPI = &azFuture
21629	future.Result = future.result
21630	return nil
21631}
21632
21633// result is the default implementation for RouteFiltersUpdateFuture.Result.
21634func (future *RouteFiltersUpdateFuture) result(client RouteFiltersClient) (rf RouteFilter, err error) {
21635	var done bool
21636	done, err = future.DoneWithContext(context.Background(), client)
21637	if err != nil {
21638		err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", future.Response(), "Polling failure")
21639		return
21640	}
21641	if !done {
21642		rf.Response.Response = future.Response()
21643		err = azure.NewAsyncOpIncompleteError("network.RouteFiltersUpdateFuture")
21644		return
21645	}
21646	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
21647	if rf.Response.Response, err = future.GetResult(sender); err == nil && rf.Response.Response.StatusCode != http.StatusNoContent {
21648		rf, err = client.UpdateResponder(rf.Response.Response)
21649		if err != nil {
21650			err = autorest.NewErrorWithError(err, "network.RouteFiltersUpdateFuture", "Result", rf.Response.Response, "Failure responding to request")
21651		}
21652	}
21653	return
21654}
21655
21656// RouteListResult response for the ListRoute API service call
21657type RouteListResult struct {
21658	autorest.Response `json:"-"`
21659	// Value - Gets a list of routes in a resource group.
21660	Value *[]Route `json:"value,omitempty"`
21661	// NextLink - The URL to get the next set of results.
21662	NextLink *string `json:"nextLink,omitempty"`
21663}
21664
21665// RouteListResultIterator provides access to a complete listing of Route values.
21666type RouteListResultIterator struct {
21667	i    int
21668	page RouteListResultPage
21669}
21670
21671// NextWithContext advances to the next value.  If there was an error making
21672// the request the iterator does not advance and the error is returned.
21673func (iter *RouteListResultIterator) NextWithContext(ctx context.Context) (err error) {
21674	if tracing.IsEnabled() {
21675		ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultIterator.NextWithContext")
21676		defer func() {
21677			sc := -1
21678			if iter.Response().Response.Response != nil {
21679				sc = iter.Response().Response.Response.StatusCode
21680			}
21681			tracing.EndSpan(ctx, sc, err)
21682		}()
21683	}
21684	iter.i++
21685	if iter.i < len(iter.page.Values()) {
21686		return nil
21687	}
21688	err = iter.page.NextWithContext(ctx)
21689	if err != nil {
21690		iter.i--
21691		return err
21692	}
21693	iter.i = 0
21694	return nil
21695}
21696
21697// Next advances to the next value.  If there was an error making
21698// the request the iterator does not advance and the error is returned.
21699// Deprecated: Use NextWithContext() instead.
21700func (iter *RouteListResultIterator) Next() error {
21701	return iter.NextWithContext(context.Background())
21702}
21703
21704// NotDone returns true if the enumeration should be started or is not yet complete.
21705func (iter RouteListResultIterator) NotDone() bool {
21706	return iter.page.NotDone() && iter.i < len(iter.page.Values())
21707}
21708
21709// Response returns the raw server response from the last page request.
21710func (iter RouteListResultIterator) Response() RouteListResult {
21711	return iter.page.Response()
21712}
21713
21714// Value returns the current value or a zero-initialized value if the
21715// iterator has advanced beyond the end of the collection.
21716func (iter RouteListResultIterator) Value() Route {
21717	if !iter.page.NotDone() {
21718		return Route{}
21719	}
21720	return iter.page.Values()[iter.i]
21721}
21722
21723// Creates a new instance of the RouteListResultIterator type.
21724func NewRouteListResultIterator(page RouteListResultPage) RouteListResultIterator {
21725	return RouteListResultIterator{page: page}
21726}
21727
21728// IsEmpty returns true if the ListResult contains no values.
21729func (rlr RouteListResult) IsEmpty() bool {
21730	return rlr.Value == nil || len(*rlr.Value) == 0
21731}
21732
21733// hasNextLink returns true if the NextLink is not empty.
21734func (rlr RouteListResult) hasNextLink() bool {
21735	return rlr.NextLink != nil && len(*rlr.NextLink) != 0
21736}
21737
21738// routeListResultPreparer prepares a request to retrieve the next set of results.
21739// It returns nil if no more results exist.
21740func (rlr RouteListResult) routeListResultPreparer(ctx context.Context) (*http.Request, error) {
21741	if !rlr.hasNextLink() {
21742		return nil, nil
21743	}
21744	return autorest.Prepare((&http.Request{}).WithContext(ctx),
21745		autorest.AsJSON(),
21746		autorest.AsGet(),
21747		autorest.WithBaseURL(to.String(rlr.NextLink)))
21748}
21749
21750// RouteListResultPage contains a page of Route values.
21751type RouteListResultPage struct {
21752	fn  func(context.Context, RouteListResult) (RouteListResult, error)
21753	rlr RouteListResult
21754}
21755
21756// NextWithContext advances to the next page of values.  If there was an error making
21757// the request the page does not advance and the error is returned.
21758func (page *RouteListResultPage) NextWithContext(ctx context.Context) (err error) {
21759	if tracing.IsEnabled() {
21760		ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultPage.NextWithContext")
21761		defer func() {
21762			sc := -1
21763			if page.Response().Response.Response != nil {
21764				sc = page.Response().Response.Response.StatusCode
21765			}
21766			tracing.EndSpan(ctx, sc, err)
21767		}()
21768	}
21769	for {
21770		next, err := page.fn(ctx, page.rlr)
21771		if err != nil {
21772			return err
21773		}
21774		page.rlr = next
21775		if !next.hasNextLink() || !next.IsEmpty() {
21776			break
21777		}
21778	}
21779	return nil
21780}
21781
21782// Next advances to the next page of values.  If there was an error making
21783// the request the page does not advance and the error is returned.
21784// Deprecated: Use NextWithContext() instead.
21785func (page *RouteListResultPage) Next() error {
21786	return page.NextWithContext(context.Background())
21787}
21788
21789// NotDone returns true if the page enumeration should be started or is not yet complete.
21790func (page RouteListResultPage) NotDone() bool {
21791	return !page.rlr.IsEmpty()
21792}
21793
21794// Response returns the raw server response from the last page request.
21795func (page RouteListResultPage) Response() RouteListResult {
21796	return page.rlr
21797}
21798
21799// Values returns the slice of values for the current page or nil if there are no values.
21800func (page RouteListResultPage) Values() []Route {
21801	if page.rlr.IsEmpty() {
21802		return nil
21803	}
21804	return *page.rlr.Value
21805}
21806
21807// Creates a new instance of the RouteListResultPage type.
21808func NewRouteListResultPage(cur RouteListResult, getNextPage func(context.Context, RouteListResult) (RouteListResult, error)) RouteListResultPage {
21809	return RouteListResultPage{
21810		fn:  getNextPage,
21811		rlr: cur,
21812	}
21813}
21814
21815// RoutePropertiesFormat route resource
21816type RoutePropertiesFormat struct {
21817	// AddressPrefix - The destination CIDR to which the route applies.
21818	AddressPrefix *string `json:"addressPrefix,omitempty"`
21819	// 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'
21820	NextHopType RouteNextHopType `json:"nextHopType,omitempty"`
21821	// NextHopIPAddress - The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance.
21822	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
21823	// ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
21824	ProvisioningState *string `json:"provisioningState,omitempty"`
21825}
21826
21827// RoutesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
21828// operation.
21829type RoutesCreateOrUpdateFuture struct {
21830	azure.FutureAPI
21831	// Result returns the result of the asynchronous operation.
21832	// If the operation has not completed it will return an error.
21833	Result func(RoutesClient) (Route, error)
21834}
21835
21836// UnmarshalJSON is the custom unmarshaller for CreateFuture.
21837func (future *RoutesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
21838	var azFuture azure.Future
21839	if err := json.Unmarshal(body, &azFuture); err != nil {
21840		return err
21841	}
21842	future.FutureAPI = &azFuture
21843	future.Result = future.result
21844	return nil
21845}
21846
21847// result is the default implementation for RoutesCreateOrUpdateFuture.Result.
21848func (future *RoutesCreateOrUpdateFuture) result(client RoutesClient) (r Route, err error) {
21849	var done bool
21850	done, err = future.DoneWithContext(context.Background(), client)
21851	if err != nil {
21852		err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
21853		return
21854	}
21855	if !done {
21856		r.Response.Response = future.Response()
21857		err = azure.NewAsyncOpIncompleteError("network.RoutesCreateOrUpdateFuture")
21858		return
21859	}
21860	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
21861	if r.Response.Response, err = future.GetResult(sender); err == nil && r.Response.Response.StatusCode != http.StatusNoContent {
21862		r, err = client.CreateOrUpdateResponder(r.Response.Response)
21863		if err != nil {
21864			err = autorest.NewErrorWithError(err, "network.RoutesCreateOrUpdateFuture", "Result", r.Response.Response, "Failure responding to request")
21865		}
21866	}
21867	return
21868}
21869
21870// RoutesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
21871type RoutesDeleteFuture struct {
21872	azure.FutureAPI
21873	// Result returns the result of the asynchronous operation.
21874	// If the operation has not completed it will return an error.
21875	Result func(RoutesClient) (autorest.Response, error)
21876}
21877
21878// UnmarshalJSON is the custom unmarshaller for CreateFuture.
21879func (future *RoutesDeleteFuture) UnmarshalJSON(body []byte) error {
21880	var azFuture azure.Future
21881	if err := json.Unmarshal(body, &azFuture); err != nil {
21882		return err
21883	}
21884	future.FutureAPI = &azFuture
21885	future.Result = future.result
21886	return nil
21887}
21888
21889// result is the default implementation for RoutesDeleteFuture.Result.
21890func (future *RoutesDeleteFuture) result(client RoutesClient) (ar autorest.Response, err error) {
21891	var done bool
21892	done, err = future.DoneWithContext(context.Background(), client)
21893	if err != nil {
21894		err = autorest.NewErrorWithError(err, "network.RoutesDeleteFuture", "Result", future.Response(), "Polling failure")
21895		return
21896	}
21897	if !done {
21898		ar.Response = future.Response()
21899		err = azure.NewAsyncOpIncompleteError("network.RoutesDeleteFuture")
21900		return
21901	}
21902	ar.Response = future.Response()
21903	return
21904}
21905
21906// RouteTable route table resource.
21907type RouteTable struct {
21908	autorest.Response `json:"-"`
21909	// RouteTablePropertiesFormat - Properties of the route table.
21910	*RouteTablePropertiesFormat `json:"properties,omitempty"`
21911	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
21912	Etag *string `json:"etag,omitempty"`
21913	// ID - Resource ID.
21914	ID *string `json:"id,omitempty"`
21915	// Name - READ-ONLY; Resource name.
21916	Name *string `json:"name,omitempty"`
21917	// Type - READ-ONLY; Resource type.
21918	Type *string `json:"type,omitempty"`
21919	// Location - Resource location.
21920	Location *string `json:"location,omitempty"`
21921	// Tags - Resource tags.
21922	Tags map[string]*string `json:"tags"`
21923}
21924
21925// MarshalJSON is the custom marshaler for RouteTable.
21926func (rt RouteTable) MarshalJSON() ([]byte, error) {
21927	objectMap := make(map[string]interface{})
21928	if rt.RouteTablePropertiesFormat != nil {
21929		objectMap["properties"] = rt.RouteTablePropertiesFormat
21930	}
21931	if rt.Etag != nil {
21932		objectMap["etag"] = rt.Etag
21933	}
21934	if rt.ID != nil {
21935		objectMap["id"] = rt.ID
21936	}
21937	if rt.Location != nil {
21938		objectMap["location"] = rt.Location
21939	}
21940	if rt.Tags != nil {
21941		objectMap["tags"] = rt.Tags
21942	}
21943	return json.Marshal(objectMap)
21944}
21945
21946// UnmarshalJSON is the custom unmarshaler for RouteTable struct.
21947func (rt *RouteTable) UnmarshalJSON(body []byte) error {
21948	var m map[string]*json.RawMessage
21949	err := json.Unmarshal(body, &m)
21950	if err != nil {
21951		return err
21952	}
21953	for k, v := range m {
21954		switch k {
21955		case "properties":
21956			if v != nil {
21957				var routeTablePropertiesFormat RouteTablePropertiesFormat
21958				err = json.Unmarshal(*v, &routeTablePropertiesFormat)
21959				if err != nil {
21960					return err
21961				}
21962				rt.RouteTablePropertiesFormat = &routeTablePropertiesFormat
21963			}
21964		case "etag":
21965			if v != nil {
21966				var etag string
21967				err = json.Unmarshal(*v, &etag)
21968				if err != nil {
21969					return err
21970				}
21971				rt.Etag = &etag
21972			}
21973		case "id":
21974			if v != nil {
21975				var ID string
21976				err = json.Unmarshal(*v, &ID)
21977				if err != nil {
21978					return err
21979				}
21980				rt.ID = &ID
21981			}
21982		case "name":
21983			if v != nil {
21984				var name string
21985				err = json.Unmarshal(*v, &name)
21986				if err != nil {
21987					return err
21988				}
21989				rt.Name = &name
21990			}
21991		case "type":
21992			if v != nil {
21993				var typeVar string
21994				err = json.Unmarshal(*v, &typeVar)
21995				if err != nil {
21996					return err
21997				}
21998				rt.Type = &typeVar
21999			}
22000		case "location":
22001			if v != nil {
22002				var location string
22003				err = json.Unmarshal(*v, &location)
22004				if err != nil {
22005					return err
22006				}
22007				rt.Location = &location
22008			}
22009		case "tags":
22010			if v != nil {
22011				var tags map[string]*string
22012				err = json.Unmarshal(*v, &tags)
22013				if err != nil {
22014					return err
22015				}
22016				rt.Tags = tags
22017			}
22018		}
22019	}
22020
22021	return nil
22022}
22023
22024// RouteTableListResult response for the ListRouteTable API service call.
22025type RouteTableListResult struct {
22026	autorest.Response `json:"-"`
22027	// Value - Gets a list of route tables in a resource group.
22028	Value *[]RouteTable `json:"value,omitempty"`
22029	// NextLink - The URL to get the next set of results.
22030	NextLink *string `json:"nextLink,omitempty"`
22031}
22032
22033// RouteTableListResultIterator provides access to a complete listing of RouteTable values.
22034type RouteTableListResultIterator struct {
22035	i    int
22036	page RouteTableListResultPage
22037}
22038
22039// NextWithContext advances to the next value.  If there was an error making
22040// the request the iterator does not advance and the error is returned.
22041func (iter *RouteTableListResultIterator) NextWithContext(ctx context.Context) (err error) {
22042	if tracing.IsEnabled() {
22043		ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultIterator.NextWithContext")
22044		defer func() {
22045			sc := -1
22046			if iter.Response().Response.Response != nil {
22047				sc = iter.Response().Response.Response.StatusCode
22048			}
22049			tracing.EndSpan(ctx, sc, err)
22050		}()
22051	}
22052	iter.i++
22053	if iter.i < len(iter.page.Values()) {
22054		return nil
22055	}
22056	err = iter.page.NextWithContext(ctx)
22057	if err != nil {
22058		iter.i--
22059		return err
22060	}
22061	iter.i = 0
22062	return nil
22063}
22064
22065// Next advances to the next value.  If there was an error making
22066// the request the iterator does not advance and the error is returned.
22067// Deprecated: Use NextWithContext() instead.
22068func (iter *RouteTableListResultIterator) Next() error {
22069	return iter.NextWithContext(context.Background())
22070}
22071
22072// NotDone returns true if the enumeration should be started or is not yet complete.
22073func (iter RouteTableListResultIterator) NotDone() bool {
22074	return iter.page.NotDone() && iter.i < len(iter.page.Values())
22075}
22076
22077// Response returns the raw server response from the last page request.
22078func (iter RouteTableListResultIterator) Response() RouteTableListResult {
22079	return iter.page.Response()
22080}
22081
22082// Value returns the current value or a zero-initialized value if the
22083// iterator has advanced beyond the end of the collection.
22084func (iter RouteTableListResultIterator) Value() RouteTable {
22085	if !iter.page.NotDone() {
22086		return RouteTable{}
22087	}
22088	return iter.page.Values()[iter.i]
22089}
22090
22091// Creates a new instance of the RouteTableListResultIterator type.
22092func NewRouteTableListResultIterator(page RouteTableListResultPage) RouteTableListResultIterator {
22093	return RouteTableListResultIterator{page: page}
22094}
22095
22096// IsEmpty returns true if the ListResult contains no values.
22097func (rtlr RouteTableListResult) IsEmpty() bool {
22098	return rtlr.Value == nil || len(*rtlr.Value) == 0
22099}
22100
22101// hasNextLink returns true if the NextLink is not empty.
22102func (rtlr RouteTableListResult) hasNextLink() bool {
22103	return rtlr.NextLink != nil && len(*rtlr.NextLink) != 0
22104}
22105
22106// routeTableListResultPreparer prepares a request to retrieve the next set of results.
22107// It returns nil if no more results exist.
22108func (rtlr RouteTableListResult) routeTableListResultPreparer(ctx context.Context) (*http.Request, error) {
22109	if !rtlr.hasNextLink() {
22110		return nil, nil
22111	}
22112	return autorest.Prepare((&http.Request{}).WithContext(ctx),
22113		autorest.AsJSON(),
22114		autorest.AsGet(),
22115		autorest.WithBaseURL(to.String(rtlr.NextLink)))
22116}
22117
22118// RouteTableListResultPage contains a page of RouteTable values.
22119type RouteTableListResultPage struct {
22120	fn   func(context.Context, RouteTableListResult) (RouteTableListResult, error)
22121	rtlr RouteTableListResult
22122}
22123
22124// NextWithContext advances to the next page of values.  If there was an error making
22125// the request the page does not advance and the error is returned.
22126func (page *RouteTableListResultPage) NextWithContext(ctx context.Context) (err error) {
22127	if tracing.IsEnabled() {
22128		ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultPage.NextWithContext")
22129		defer func() {
22130			sc := -1
22131			if page.Response().Response.Response != nil {
22132				sc = page.Response().Response.Response.StatusCode
22133			}
22134			tracing.EndSpan(ctx, sc, err)
22135		}()
22136	}
22137	for {
22138		next, err := page.fn(ctx, page.rtlr)
22139		if err != nil {
22140			return err
22141		}
22142		page.rtlr = next
22143		if !next.hasNextLink() || !next.IsEmpty() {
22144			break
22145		}
22146	}
22147	return nil
22148}
22149
22150// Next advances to the next page of values.  If there was an error making
22151// the request the page does not advance and the error is returned.
22152// Deprecated: Use NextWithContext() instead.
22153func (page *RouteTableListResultPage) Next() error {
22154	return page.NextWithContext(context.Background())
22155}
22156
22157// NotDone returns true if the page enumeration should be started or is not yet complete.
22158func (page RouteTableListResultPage) NotDone() bool {
22159	return !page.rtlr.IsEmpty()
22160}
22161
22162// Response returns the raw server response from the last page request.
22163func (page RouteTableListResultPage) Response() RouteTableListResult {
22164	return page.rtlr
22165}
22166
22167// Values returns the slice of values for the current page or nil if there are no values.
22168func (page RouteTableListResultPage) Values() []RouteTable {
22169	if page.rtlr.IsEmpty() {
22170		return nil
22171	}
22172	return *page.rtlr.Value
22173}
22174
22175// Creates a new instance of the RouteTableListResultPage type.
22176func NewRouteTableListResultPage(cur RouteTableListResult, getNextPage func(context.Context, RouteTableListResult) (RouteTableListResult, error)) RouteTableListResultPage {
22177	return RouteTableListResultPage{
22178		fn:   getNextPage,
22179		rtlr: cur,
22180	}
22181}
22182
22183// RouteTablePropertiesFormat route Table resource
22184type RouteTablePropertiesFormat struct {
22185	// Routes - Collection of routes contained within a route table.
22186	Routes *[]Route `json:"routes,omitempty"`
22187	// Subnets - READ-ONLY; A collection of references to subnets.
22188	Subnets *[]Subnet `json:"subnets,omitempty"`
22189	// DisableBgpRoutePropagation - Gets or sets whether to disable the routes learned by BGP on that route table. True means disable.
22190	DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"`
22191	// ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
22192	ProvisioningState *string `json:"provisioningState,omitempty"`
22193}
22194
22195// MarshalJSON is the custom marshaler for RouteTablePropertiesFormat.
22196func (rtpf RouteTablePropertiesFormat) MarshalJSON() ([]byte, error) {
22197	objectMap := make(map[string]interface{})
22198	if rtpf.Routes != nil {
22199		objectMap["routes"] = rtpf.Routes
22200	}
22201	if rtpf.DisableBgpRoutePropagation != nil {
22202		objectMap["disableBgpRoutePropagation"] = rtpf.DisableBgpRoutePropagation
22203	}
22204	if rtpf.ProvisioningState != nil {
22205		objectMap["provisioningState"] = rtpf.ProvisioningState
22206	}
22207	return json.Marshal(objectMap)
22208}
22209
22210// RouteTablesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
22211// long-running operation.
22212type RouteTablesCreateOrUpdateFuture struct {
22213	azure.FutureAPI
22214	// Result returns the result of the asynchronous operation.
22215	// If the operation has not completed it will return an error.
22216	Result func(RouteTablesClient) (RouteTable, error)
22217}
22218
22219// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22220func (future *RouteTablesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
22221	var azFuture azure.Future
22222	if err := json.Unmarshal(body, &azFuture); err != nil {
22223		return err
22224	}
22225	future.FutureAPI = &azFuture
22226	future.Result = future.result
22227	return nil
22228}
22229
22230// result is the default implementation for RouteTablesCreateOrUpdateFuture.Result.
22231func (future *RouteTablesCreateOrUpdateFuture) result(client RouteTablesClient) (rt RouteTable, err error) {
22232	var done bool
22233	done, err = future.DoneWithContext(context.Background(), client)
22234	if err != nil {
22235		err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
22236		return
22237	}
22238	if !done {
22239		rt.Response.Response = future.Response()
22240		err = azure.NewAsyncOpIncompleteError("network.RouteTablesCreateOrUpdateFuture")
22241		return
22242	}
22243	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
22244	if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
22245		rt, err = client.CreateOrUpdateResponder(rt.Response.Response)
22246		if err != nil {
22247			err = autorest.NewErrorWithError(err, "network.RouteTablesCreateOrUpdateFuture", "Result", rt.Response.Response, "Failure responding to request")
22248		}
22249	}
22250	return
22251}
22252
22253// RouteTablesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
22254// operation.
22255type RouteTablesDeleteFuture struct {
22256	azure.FutureAPI
22257	// Result returns the result of the asynchronous operation.
22258	// If the operation has not completed it will return an error.
22259	Result func(RouteTablesClient) (autorest.Response, error)
22260}
22261
22262// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22263func (future *RouteTablesDeleteFuture) UnmarshalJSON(body []byte) error {
22264	var azFuture azure.Future
22265	if err := json.Unmarshal(body, &azFuture); err != nil {
22266		return err
22267	}
22268	future.FutureAPI = &azFuture
22269	future.Result = future.result
22270	return nil
22271}
22272
22273// result is the default implementation for RouteTablesDeleteFuture.Result.
22274func (future *RouteTablesDeleteFuture) result(client RouteTablesClient) (ar autorest.Response, err error) {
22275	var done bool
22276	done, err = future.DoneWithContext(context.Background(), client)
22277	if err != nil {
22278		err = autorest.NewErrorWithError(err, "network.RouteTablesDeleteFuture", "Result", future.Response(), "Polling failure")
22279		return
22280	}
22281	if !done {
22282		ar.Response = future.Response()
22283		err = azure.NewAsyncOpIncompleteError("network.RouteTablesDeleteFuture")
22284		return
22285	}
22286	ar.Response = future.Response()
22287	return
22288}
22289
22290// RouteTablesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
22291// operation.
22292type RouteTablesUpdateTagsFuture struct {
22293	azure.FutureAPI
22294	// Result returns the result of the asynchronous operation.
22295	// If the operation has not completed it will return an error.
22296	Result func(RouteTablesClient) (RouteTable, error)
22297}
22298
22299// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22300func (future *RouteTablesUpdateTagsFuture) UnmarshalJSON(body []byte) error {
22301	var azFuture azure.Future
22302	if err := json.Unmarshal(body, &azFuture); err != nil {
22303		return err
22304	}
22305	future.FutureAPI = &azFuture
22306	future.Result = future.result
22307	return nil
22308}
22309
22310// result is the default implementation for RouteTablesUpdateTagsFuture.Result.
22311func (future *RouteTablesUpdateTagsFuture) result(client RouteTablesClient) (rt RouteTable, err error) {
22312	var done bool
22313	done, err = future.DoneWithContext(context.Background(), client)
22314	if err != nil {
22315		err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
22316		return
22317	}
22318	if !done {
22319		rt.Response.Response = future.Response()
22320		err = azure.NewAsyncOpIncompleteError("network.RouteTablesUpdateTagsFuture")
22321		return
22322	}
22323	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
22324	if rt.Response.Response, err = future.GetResult(sender); err == nil && rt.Response.Response.StatusCode != http.StatusNoContent {
22325		rt, err = client.UpdateTagsResponder(rt.Response.Response)
22326		if err != nil {
22327			err = autorest.NewErrorWithError(err, "network.RouteTablesUpdateTagsFuture", "Result", rt.Response.Response, "Failure responding to request")
22328		}
22329	}
22330	return
22331}
22332
22333// SecurityGroup networkSecurityGroup resource.
22334type SecurityGroup struct {
22335	autorest.Response `json:"-"`
22336	// SecurityGroupPropertiesFormat - Properties of the network security group
22337	*SecurityGroupPropertiesFormat `json:"properties,omitempty"`
22338	// Etag - A unique read-only string that changes whenever the resource is updated.
22339	Etag *string `json:"etag,omitempty"`
22340	// ID - Resource ID.
22341	ID *string `json:"id,omitempty"`
22342	// Name - READ-ONLY; Resource name.
22343	Name *string `json:"name,omitempty"`
22344	// Type - READ-ONLY; Resource type.
22345	Type *string `json:"type,omitempty"`
22346	// Location - Resource location.
22347	Location *string `json:"location,omitempty"`
22348	// Tags - Resource tags.
22349	Tags map[string]*string `json:"tags"`
22350}
22351
22352// MarshalJSON is the custom marshaler for SecurityGroup.
22353func (sg SecurityGroup) MarshalJSON() ([]byte, error) {
22354	objectMap := make(map[string]interface{})
22355	if sg.SecurityGroupPropertiesFormat != nil {
22356		objectMap["properties"] = sg.SecurityGroupPropertiesFormat
22357	}
22358	if sg.Etag != nil {
22359		objectMap["etag"] = sg.Etag
22360	}
22361	if sg.ID != nil {
22362		objectMap["id"] = sg.ID
22363	}
22364	if sg.Location != nil {
22365		objectMap["location"] = sg.Location
22366	}
22367	if sg.Tags != nil {
22368		objectMap["tags"] = sg.Tags
22369	}
22370	return json.Marshal(objectMap)
22371}
22372
22373// UnmarshalJSON is the custom unmarshaler for SecurityGroup struct.
22374func (sg *SecurityGroup) UnmarshalJSON(body []byte) error {
22375	var m map[string]*json.RawMessage
22376	err := json.Unmarshal(body, &m)
22377	if err != nil {
22378		return err
22379	}
22380	for k, v := range m {
22381		switch k {
22382		case "properties":
22383			if v != nil {
22384				var securityGroupPropertiesFormat SecurityGroupPropertiesFormat
22385				err = json.Unmarshal(*v, &securityGroupPropertiesFormat)
22386				if err != nil {
22387					return err
22388				}
22389				sg.SecurityGroupPropertiesFormat = &securityGroupPropertiesFormat
22390			}
22391		case "etag":
22392			if v != nil {
22393				var etag string
22394				err = json.Unmarshal(*v, &etag)
22395				if err != nil {
22396					return err
22397				}
22398				sg.Etag = &etag
22399			}
22400		case "id":
22401			if v != nil {
22402				var ID string
22403				err = json.Unmarshal(*v, &ID)
22404				if err != nil {
22405					return err
22406				}
22407				sg.ID = &ID
22408			}
22409		case "name":
22410			if v != nil {
22411				var name string
22412				err = json.Unmarshal(*v, &name)
22413				if err != nil {
22414					return err
22415				}
22416				sg.Name = &name
22417			}
22418		case "type":
22419			if v != nil {
22420				var typeVar string
22421				err = json.Unmarshal(*v, &typeVar)
22422				if err != nil {
22423					return err
22424				}
22425				sg.Type = &typeVar
22426			}
22427		case "location":
22428			if v != nil {
22429				var location string
22430				err = json.Unmarshal(*v, &location)
22431				if err != nil {
22432					return err
22433				}
22434				sg.Location = &location
22435			}
22436		case "tags":
22437			if v != nil {
22438				var tags map[string]*string
22439				err = json.Unmarshal(*v, &tags)
22440				if err != nil {
22441					return err
22442				}
22443				sg.Tags = tags
22444			}
22445		}
22446	}
22447
22448	return nil
22449}
22450
22451// SecurityGroupListResult response for ListNetworkSecurityGroups API service call.
22452type SecurityGroupListResult struct {
22453	autorest.Response `json:"-"`
22454	// Value - A list of NetworkSecurityGroup resources.
22455	Value *[]SecurityGroup `json:"value,omitempty"`
22456	// NextLink - The URL to get the next set of results.
22457	NextLink *string `json:"nextLink,omitempty"`
22458}
22459
22460// SecurityGroupListResultIterator provides access to a complete listing of SecurityGroup values.
22461type SecurityGroupListResultIterator struct {
22462	i    int
22463	page SecurityGroupListResultPage
22464}
22465
22466// NextWithContext advances to the next value.  If there was an error making
22467// the request the iterator does not advance and the error is returned.
22468func (iter *SecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
22469	if tracing.IsEnabled() {
22470		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultIterator.NextWithContext")
22471		defer func() {
22472			sc := -1
22473			if iter.Response().Response.Response != nil {
22474				sc = iter.Response().Response.Response.StatusCode
22475			}
22476			tracing.EndSpan(ctx, sc, err)
22477		}()
22478	}
22479	iter.i++
22480	if iter.i < len(iter.page.Values()) {
22481		return nil
22482	}
22483	err = iter.page.NextWithContext(ctx)
22484	if err != nil {
22485		iter.i--
22486		return err
22487	}
22488	iter.i = 0
22489	return nil
22490}
22491
22492// Next advances to the next value.  If there was an error making
22493// the request the iterator does not advance and the error is returned.
22494// Deprecated: Use NextWithContext() instead.
22495func (iter *SecurityGroupListResultIterator) Next() error {
22496	return iter.NextWithContext(context.Background())
22497}
22498
22499// NotDone returns true if the enumeration should be started or is not yet complete.
22500func (iter SecurityGroupListResultIterator) NotDone() bool {
22501	return iter.page.NotDone() && iter.i < len(iter.page.Values())
22502}
22503
22504// Response returns the raw server response from the last page request.
22505func (iter SecurityGroupListResultIterator) Response() SecurityGroupListResult {
22506	return iter.page.Response()
22507}
22508
22509// Value returns the current value or a zero-initialized value if the
22510// iterator has advanced beyond the end of the collection.
22511func (iter SecurityGroupListResultIterator) Value() SecurityGroup {
22512	if !iter.page.NotDone() {
22513		return SecurityGroup{}
22514	}
22515	return iter.page.Values()[iter.i]
22516}
22517
22518// Creates a new instance of the SecurityGroupListResultIterator type.
22519func NewSecurityGroupListResultIterator(page SecurityGroupListResultPage) SecurityGroupListResultIterator {
22520	return SecurityGroupListResultIterator{page: page}
22521}
22522
22523// IsEmpty returns true if the ListResult contains no values.
22524func (sglr SecurityGroupListResult) IsEmpty() bool {
22525	return sglr.Value == nil || len(*sglr.Value) == 0
22526}
22527
22528// hasNextLink returns true if the NextLink is not empty.
22529func (sglr SecurityGroupListResult) hasNextLink() bool {
22530	return sglr.NextLink != nil && len(*sglr.NextLink) != 0
22531}
22532
22533// securityGroupListResultPreparer prepares a request to retrieve the next set of results.
22534// It returns nil if no more results exist.
22535func (sglr SecurityGroupListResult) securityGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
22536	if !sglr.hasNextLink() {
22537		return nil, nil
22538	}
22539	return autorest.Prepare((&http.Request{}).WithContext(ctx),
22540		autorest.AsJSON(),
22541		autorest.AsGet(),
22542		autorest.WithBaseURL(to.String(sglr.NextLink)))
22543}
22544
22545// SecurityGroupListResultPage contains a page of SecurityGroup values.
22546type SecurityGroupListResultPage struct {
22547	fn   func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)
22548	sglr SecurityGroupListResult
22549}
22550
22551// NextWithContext advances to the next page of values.  If there was an error making
22552// the request the page does not advance and the error is returned.
22553func (page *SecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
22554	if tracing.IsEnabled() {
22555		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultPage.NextWithContext")
22556		defer func() {
22557			sc := -1
22558			if page.Response().Response.Response != nil {
22559				sc = page.Response().Response.Response.StatusCode
22560			}
22561			tracing.EndSpan(ctx, sc, err)
22562		}()
22563	}
22564	for {
22565		next, err := page.fn(ctx, page.sglr)
22566		if err != nil {
22567			return err
22568		}
22569		page.sglr = next
22570		if !next.hasNextLink() || !next.IsEmpty() {
22571			break
22572		}
22573	}
22574	return nil
22575}
22576
22577// Next advances to the next page of values.  If there was an error making
22578// the request the page does not advance and the error is returned.
22579// Deprecated: Use NextWithContext() instead.
22580func (page *SecurityGroupListResultPage) Next() error {
22581	return page.NextWithContext(context.Background())
22582}
22583
22584// NotDone returns true if the page enumeration should be started or is not yet complete.
22585func (page SecurityGroupListResultPage) NotDone() bool {
22586	return !page.sglr.IsEmpty()
22587}
22588
22589// Response returns the raw server response from the last page request.
22590func (page SecurityGroupListResultPage) Response() SecurityGroupListResult {
22591	return page.sglr
22592}
22593
22594// Values returns the slice of values for the current page or nil if there are no values.
22595func (page SecurityGroupListResultPage) Values() []SecurityGroup {
22596	if page.sglr.IsEmpty() {
22597		return nil
22598	}
22599	return *page.sglr.Value
22600}
22601
22602// Creates a new instance of the SecurityGroupListResultPage type.
22603func NewSecurityGroupListResultPage(cur SecurityGroupListResult, getNextPage func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)) SecurityGroupListResultPage {
22604	return SecurityGroupListResultPage{
22605		fn:   getNextPage,
22606		sglr: cur,
22607	}
22608}
22609
22610// SecurityGroupNetworkInterface network interface and all its associated security rules.
22611type SecurityGroupNetworkInterface struct {
22612	// ID - ID of the network interface.
22613	ID                       *string                   `json:"id,omitempty"`
22614	SecurityRuleAssociations *SecurityRuleAssociations `json:"securityRuleAssociations,omitempty"`
22615}
22616
22617// SecurityGroupPropertiesFormat network Security Group resource.
22618type SecurityGroupPropertiesFormat struct {
22619	// SecurityRules - A collection of security rules of the network security group.
22620	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
22621	// DefaultSecurityRules - The default security rules of network security group.
22622	DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"`
22623	// NetworkInterfaces - READ-ONLY; A collection of references to network interfaces.
22624	NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"`
22625	// Subnets - READ-ONLY; A collection of references to subnets.
22626	Subnets *[]Subnet `json:"subnets,omitempty"`
22627	// ResourceGUID - The resource GUID property of the network security group resource.
22628	ResourceGUID *string `json:"resourceGuid,omitempty"`
22629	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
22630	ProvisioningState *string `json:"provisioningState,omitempty"`
22631}
22632
22633// MarshalJSON is the custom marshaler for SecurityGroupPropertiesFormat.
22634func (sgpf SecurityGroupPropertiesFormat) MarshalJSON() ([]byte, error) {
22635	objectMap := make(map[string]interface{})
22636	if sgpf.SecurityRules != nil {
22637		objectMap["securityRules"] = sgpf.SecurityRules
22638	}
22639	if sgpf.DefaultSecurityRules != nil {
22640		objectMap["defaultSecurityRules"] = sgpf.DefaultSecurityRules
22641	}
22642	if sgpf.ResourceGUID != nil {
22643		objectMap["resourceGuid"] = sgpf.ResourceGUID
22644	}
22645	if sgpf.ProvisioningState != nil {
22646		objectMap["provisioningState"] = sgpf.ProvisioningState
22647	}
22648	return json.Marshal(objectMap)
22649}
22650
22651// SecurityGroupResult network configuration diagnostic result corresponded provided traffic query.
22652type SecurityGroupResult struct {
22653	// SecurityRuleAccessResult - The network traffic is allowed or denied. Possible values are 'Allow' and 'Deny'. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
22654	SecurityRuleAccessResult SecurityRuleAccess `json:"securityRuleAccessResult,omitempty"`
22655	// EvaluatedNetworkSecurityGroups - READ-ONLY; List of results network security groups diagnostic.
22656	EvaluatedNetworkSecurityGroups *[]EvaluatedNetworkSecurityGroup `json:"evaluatedNetworkSecurityGroups,omitempty"`
22657}
22658
22659// MarshalJSON is the custom marshaler for SecurityGroupResult.
22660func (sgr SecurityGroupResult) MarshalJSON() ([]byte, error) {
22661	objectMap := make(map[string]interface{})
22662	if sgr.SecurityRuleAccessResult != "" {
22663		objectMap["securityRuleAccessResult"] = sgr.SecurityRuleAccessResult
22664	}
22665	return json.Marshal(objectMap)
22666}
22667
22668// SecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
22669// long-running operation.
22670type SecurityGroupsCreateOrUpdateFuture struct {
22671	azure.FutureAPI
22672	// Result returns the result of the asynchronous operation.
22673	// If the operation has not completed it will return an error.
22674	Result func(SecurityGroupsClient) (SecurityGroup, error)
22675}
22676
22677// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22678func (future *SecurityGroupsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
22679	var azFuture azure.Future
22680	if err := json.Unmarshal(body, &azFuture); err != nil {
22681		return err
22682	}
22683	future.FutureAPI = &azFuture
22684	future.Result = future.result
22685	return nil
22686}
22687
22688// result is the default implementation for SecurityGroupsCreateOrUpdateFuture.Result.
22689func (future *SecurityGroupsCreateOrUpdateFuture) result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
22690	var done bool
22691	done, err = future.DoneWithContext(context.Background(), client)
22692	if err != nil {
22693		err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
22694		return
22695	}
22696	if !done {
22697		sg.Response.Response = future.Response()
22698		err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsCreateOrUpdateFuture")
22699		return
22700	}
22701	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
22702	if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
22703		sg, err = client.CreateOrUpdateResponder(sg.Response.Response)
22704		if err != nil {
22705			err = autorest.NewErrorWithError(err, "network.SecurityGroupsCreateOrUpdateFuture", "Result", sg.Response.Response, "Failure responding to request")
22706		}
22707	}
22708	return
22709}
22710
22711// SecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
22712// operation.
22713type SecurityGroupsDeleteFuture struct {
22714	azure.FutureAPI
22715	// Result returns the result of the asynchronous operation.
22716	// If the operation has not completed it will return an error.
22717	Result func(SecurityGroupsClient) (autorest.Response, error)
22718}
22719
22720// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22721func (future *SecurityGroupsDeleteFuture) UnmarshalJSON(body []byte) error {
22722	var azFuture azure.Future
22723	if err := json.Unmarshal(body, &azFuture); err != nil {
22724		return err
22725	}
22726	future.FutureAPI = &azFuture
22727	future.Result = future.result
22728	return nil
22729}
22730
22731// result is the default implementation for SecurityGroupsDeleteFuture.Result.
22732func (future *SecurityGroupsDeleteFuture) result(client SecurityGroupsClient) (ar autorest.Response, err error) {
22733	var done bool
22734	done, err = future.DoneWithContext(context.Background(), client)
22735	if err != nil {
22736		err = autorest.NewErrorWithError(err, "network.SecurityGroupsDeleteFuture", "Result", future.Response(), "Polling failure")
22737		return
22738	}
22739	if !done {
22740		ar.Response = future.Response()
22741		err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsDeleteFuture")
22742		return
22743	}
22744	ar.Response = future.Response()
22745	return
22746}
22747
22748// SecurityGroupsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
22749// long-running operation.
22750type SecurityGroupsUpdateTagsFuture struct {
22751	azure.FutureAPI
22752	// Result returns the result of the asynchronous operation.
22753	// If the operation has not completed it will return an error.
22754	Result func(SecurityGroupsClient) (SecurityGroup, error)
22755}
22756
22757// UnmarshalJSON is the custom unmarshaller for CreateFuture.
22758func (future *SecurityGroupsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
22759	var azFuture azure.Future
22760	if err := json.Unmarshal(body, &azFuture); err != nil {
22761		return err
22762	}
22763	future.FutureAPI = &azFuture
22764	future.Result = future.result
22765	return nil
22766}
22767
22768// result is the default implementation for SecurityGroupsUpdateTagsFuture.Result.
22769func (future *SecurityGroupsUpdateTagsFuture) result(client SecurityGroupsClient) (sg SecurityGroup, err error) {
22770	var done bool
22771	done, err = future.DoneWithContext(context.Background(), client)
22772	if err != nil {
22773		err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
22774		return
22775	}
22776	if !done {
22777		sg.Response.Response = future.Response()
22778		err = azure.NewAsyncOpIncompleteError("network.SecurityGroupsUpdateTagsFuture")
22779		return
22780	}
22781	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
22782	if sg.Response.Response, err = future.GetResult(sender); err == nil && sg.Response.Response.StatusCode != http.StatusNoContent {
22783		sg, err = client.UpdateTagsResponder(sg.Response.Response)
22784		if err != nil {
22785			err = autorest.NewErrorWithError(err, "network.SecurityGroupsUpdateTagsFuture", "Result", sg.Response.Response, "Failure responding to request")
22786		}
22787	}
22788	return
22789}
22790
22791// SecurityGroupViewParameters parameters that define the VM to check security groups for.
22792type SecurityGroupViewParameters struct {
22793	// TargetResourceID - ID of the target VM.
22794	TargetResourceID *string `json:"targetResourceId,omitempty"`
22795}
22796
22797// SecurityGroupViewResult the information about security rules applied to the specified VM.
22798type SecurityGroupViewResult struct {
22799	autorest.Response `json:"-"`
22800	// NetworkInterfaces - List of network interfaces on the specified VM.
22801	NetworkInterfaces *[]SecurityGroupNetworkInterface `json:"networkInterfaces,omitempty"`
22802}
22803
22804// SecurityRule network security rule.
22805type SecurityRule struct {
22806	autorest.Response `json:"-"`
22807	// SecurityRulePropertiesFormat - Properties of the security rule
22808	*SecurityRulePropertiesFormat `json:"properties,omitempty"`
22809	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
22810	Name *string `json:"name,omitempty"`
22811	// Etag - A unique read-only string that changes whenever the resource is updated.
22812	Etag *string `json:"etag,omitempty"`
22813	// ID - Resource ID.
22814	ID *string `json:"id,omitempty"`
22815}
22816
22817// MarshalJSON is the custom marshaler for SecurityRule.
22818func (sr SecurityRule) MarshalJSON() ([]byte, error) {
22819	objectMap := make(map[string]interface{})
22820	if sr.SecurityRulePropertiesFormat != nil {
22821		objectMap["properties"] = sr.SecurityRulePropertiesFormat
22822	}
22823	if sr.Name != nil {
22824		objectMap["name"] = sr.Name
22825	}
22826	if sr.Etag != nil {
22827		objectMap["etag"] = sr.Etag
22828	}
22829	if sr.ID != nil {
22830		objectMap["id"] = sr.ID
22831	}
22832	return json.Marshal(objectMap)
22833}
22834
22835// UnmarshalJSON is the custom unmarshaler for SecurityRule struct.
22836func (sr *SecurityRule) UnmarshalJSON(body []byte) error {
22837	var m map[string]*json.RawMessage
22838	err := json.Unmarshal(body, &m)
22839	if err != nil {
22840		return err
22841	}
22842	for k, v := range m {
22843		switch k {
22844		case "properties":
22845			if v != nil {
22846				var securityRulePropertiesFormat SecurityRulePropertiesFormat
22847				err = json.Unmarshal(*v, &securityRulePropertiesFormat)
22848				if err != nil {
22849					return err
22850				}
22851				sr.SecurityRulePropertiesFormat = &securityRulePropertiesFormat
22852			}
22853		case "name":
22854			if v != nil {
22855				var name string
22856				err = json.Unmarshal(*v, &name)
22857				if err != nil {
22858					return err
22859				}
22860				sr.Name = &name
22861			}
22862		case "etag":
22863			if v != nil {
22864				var etag string
22865				err = json.Unmarshal(*v, &etag)
22866				if err != nil {
22867					return err
22868				}
22869				sr.Etag = &etag
22870			}
22871		case "id":
22872			if v != nil {
22873				var ID string
22874				err = json.Unmarshal(*v, &ID)
22875				if err != nil {
22876					return err
22877				}
22878				sr.ID = &ID
22879			}
22880		}
22881	}
22882
22883	return nil
22884}
22885
22886// SecurityRuleAssociations all security rules associated with the network interface.
22887type SecurityRuleAssociations struct {
22888	NetworkInterfaceAssociation *InterfaceAssociation `json:"networkInterfaceAssociation,omitempty"`
22889	SubnetAssociation           *SubnetAssociation    `json:"subnetAssociation,omitempty"`
22890	// DefaultSecurityRules - Collection of default security rules of the network security group.
22891	DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"`
22892	// EffectiveSecurityRules - Collection of effective security rules.
22893	EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"`
22894}
22895
22896// SecurityRuleListResult response for ListSecurityRule API service call. Retrieves all security rules that
22897// belongs to a network security group.
22898type SecurityRuleListResult struct {
22899	autorest.Response `json:"-"`
22900	// Value - The security rules in a network security group.
22901	Value *[]SecurityRule `json:"value,omitempty"`
22902	// NextLink - The URL to get the next set of results.
22903	NextLink *string `json:"nextLink,omitempty"`
22904}
22905
22906// SecurityRuleListResultIterator provides access to a complete listing of SecurityRule values.
22907type SecurityRuleListResultIterator struct {
22908	i    int
22909	page SecurityRuleListResultPage
22910}
22911
22912// NextWithContext advances to the next value.  If there was an error making
22913// the request the iterator does not advance and the error is returned.
22914func (iter *SecurityRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
22915	if tracing.IsEnabled() {
22916		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultIterator.NextWithContext")
22917		defer func() {
22918			sc := -1
22919			if iter.Response().Response.Response != nil {
22920				sc = iter.Response().Response.Response.StatusCode
22921			}
22922			tracing.EndSpan(ctx, sc, err)
22923		}()
22924	}
22925	iter.i++
22926	if iter.i < len(iter.page.Values()) {
22927		return nil
22928	}
22929	err = iter.page.NextWithContext(ctx)
22930	if err != nil {
22931		iter.i--
22932		return err
22933	}
22934	iter.i = 0
22935	return nil
22936}
22937
22938// Next advances to the next value.  If there was an error making
22939// the request the iterator does not advance and the error is returned.
22940// Deprecated: Use NextWithContext() instead.
22941func (iter *SecurityRuleListResultIterator) Next() error {
22942	return iter.NextWithContext(context.Background())
22943}
22944
22945// NotDone returns true if the enumeration should be started or is not yet complete.
22946func (iter SecurityRuleListResultIterator) NotDone() bool {
22947	return iter.page.NotDone() && iter.i < len(iter.page.Values())
22948}
22949
22950// Response returns the raw server response from the last page request.
22951func (iter SecurityRuleListResultIterator) Response() SecurityRuleListResult {
22952	return iter.page.Response()
22953}
22954
22955// Value returns the current value or a zero-initialized value if the
22956// iterator has advanced beyond the end of the collection.
22957func (iter SecurityRuleListResultIterator) Value() SecurityRule {
22958	if !iter.page.NotDone() {
22959		return SecurityRule{}
22960	}
22961	return iter.page.Values()[iter.i]
22962}
22963
22964// Creates a new instance of the SecurityRuleListResultIterator type.
22965func NewSecurityRuleListResultIterator(page SecurityRuleListResultPage) SecurityRuleListResultIterator {
22966	return SecurityRuleListResultIterator{page: page}
22967}
22968
22969// IsEmpty returns true if the ListResult contains no values.
22970func (srlr SecurityRuleListResult) IsEmpty() bool {
22971	return srlr.Value == nil || len(*srlr.Value) == 0
22972}
22973
22974// hasNextLink returns true if the NextLink is not empty.
22975func (srlr SecurityRuleListResult) hasNextLink() bool {
22976	return srlr.NextLink != nil && len(*srlr.NextLink) != 0
22977}
22978
22979// securityRuleListResultPreparer prepares a request to retrieve the next set of results.
22980// It returns nil if no more results exist.
22981func (srlr SecurityRuleListResult) securityRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
22982	if !srlr.hasNextLink() {
22983		return nil, nil
22984	}
22985	return autorest.Prepare((&http.Request{}).WithContext(ctx),
22986		autorest.AsJSON(),
22987		autorest.AsGet(),
22988		autorest.WithBaseURL(to.String(srlr.NextLink)))
22989}
22990
22991// SecurityRuleListResultPage contains a page of SecurityRule values.
22992type SecurityRuleListResultPage struct {
22993	fn   func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)
22994	srlr SecurityRuleListResult
22995}
22996
22997// NextWithContext advances to the next page of values.  If there was an error making
22998// the request the page does not advance and the error is returned.
22999func (page *SecurityRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
23000	if tracing.IsEnabled() {
23001		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultPage.NextWithContext")
23002		defer func() {
23003			sc := -1
23004			if page.Response().Response.Response != nil {
23005				sc = page.Response().Response.Response.StatusCode
23006			}
23007			tracing.EndSpan(ctx, sc, err)
23008		}()
23009	}
23010	for {
23011		next, err := page.fn(ctx, page.srlr)
23012		if err != nil {
23013			return err
23014		}
23015		page.srlr = next
23016		if !next.hasNextLink() || !next.IsEmpty() {
23017			break
23018		}
23019	}
23020	return nil
23021}
23022
23023// Next advances to the next page of values.  If there was an error making
23024// the request the page does not advance and the error is returned.
23025// Deprecated: Use NextWithContext() instead.
23026func (page *SecurityRuleListResultPage) Next() error {
23027	return page.NextWithContext(context.Background())
23028}
23029
23030// NotDone returns true if the page enumeration should be started or is not yet complete.
23031func (page SecurityRuleListResultPage) NotDone() bool {
23032	return !page.srlr.IsEmpty()
23033}
23034
23035// Response returns the raw server response from the last page request.
23036func (page SecurityRuleListResultPage) Response() SecurityRuleListResult {
23037	return page.srlr
23038}
23039
23040// Values returns the slice of values for the current page or nil if there are no values.
23041func (page SecurityRuleListResultPage) Values() []SecurityRule {
23042	if page.srlr.IsEmpty() {
23043		return nil
23044	}
23045	return *page.srlr.Value
23046}
23047
23048// Creates a new instance of the SecurityRuleListResultPage type.
23049func NewSecurityRuleListResultPage(cur SecurityRuleListResult, getNextPage func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)) SecurityRuleListResultPage {
23050	return SecurityRuleListResultPage{
23051		fn:   getNextPage,
23052		srlr: cur,
23053	}
23054}
23055
23056// SecurityRulePropertiesFormat security rule resource.
23057type SecurityRulePropertiesFormat struct {
23058	// Description - A description for this rule. Restricted to 140 chars.
23059	Description *string `json:"description,omitempty"`
23060	// Protocol - Network protocol this rule applies to. Possible values are 'Tcp', 'Udp', and '*'. Possible values include: 'SecurityRuleProtocolTCP', 'SecurityRuleProtocolUDP', 'SecurityRuleProtocolAsterisk'
23061	Protocol SecurityRuleProtocol `json:"protocol,omitempty"`
23062	// SourcePortRange - The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
23063	SourcePortRange *string `json:"sourcePortRange,omitempty"`
23064	// DestinationPortRange - The destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
23065	DestinationPortRange *string `json:"destinationPortRange,omitempty"`
23066	// SourceAddressPrefix - The CIDR or source IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. If this is an ingress rule, specifies where network traffic originates from.
23067	SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
23068	// SourceAddressPrefixes - The CIDR or source IP ranges.
23069	SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"`
23070	// SourceApplicationSecurityGroups - The application security group specified as source.
23071	SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"`
23072	// DestinationAddressPrefix - The destination address prefix. CIDR or destination IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used.
23073	DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"`
23074	// DestinationAddressPrefixes - The destination address prefixes. CIDR or destination IP ranges.
23075	DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"`
23076	// DestinationApplicationSecurityGroups - The application security group specified as destination.
23077	DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"`
23078	// SourcePortRanges - The source port ranges.
23079	SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"`
23080	// DestinationPortRanges - The destination port ranges.
23081	DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"`
23082	// Access - The network traffic is allowed or denied. Possible values are: 'Allow' and 'Deny'. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
23083	Access SecurityRuleAccess `json:"access,omitempty"`
23084	// 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.
23085	Priority *int32 `json:"priority,omitempty"`
23086	// 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'
23087	Direction SecurityRuleDirection `json:"direction,omitempty"`
23088	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
23089	ProvisioningState *string `json:"provisioningState,omitempty"`
23090}
23091
23092// SecurityRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
23093// long-running operation.
23094type SecurityRulesCreateOrUpdateFuture struct {
23095	azure.FutureAPI
23096	// Result returns the result of the asynchronous operation.
23097	// If the operation has not completed it will return an error.
23098	Result func(SecurityRulesClient) (SecurityRule, error)
23099}
23100
23101// UnmarshalJSON is the custom unmarshaller for CreateFuture.
23102func (future *SecurityRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
23103	var azFuture azure.Future
23104	if err := json.Unmarshal(body, &azFuture); err != nil {
23105		return err
23106	}
23107	future.FutureAPI = &azFuture
23108	future.Result = future.result
23109	return nil
23110}
23111
23112// result is the default implementation for SecurityRulesCreateOrUpdateFuture.Result.
23113func (future *SecurityRulesCreateOrUpdateFuture) result(client SecurityRulesClient) (sr SecurityRule, err error) {
23114	var done bool
23115	done, err = future.DoneWithContext(context.Background(), client)
23116	if err != nil {
23117		err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
23118		return
23119	}
23120	if !done {
23121		sr.Response.Response = future.Response()
23122		err = azure.NewAsyncOpIncompleteError("network.SecurityRulesCreateOrUpdateFuture")
23123		return
23124	}
23125	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
23126	if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
23127		sr, err = client.CreateOrUpdateResponder(sr.Response.Response)
23128		if err != nil {
23129			err = autorest.NewErrorWithError(err, "network.SecurityRulesCreateOrUpdateFuture", "Result", sr.Response.Response, "Failure responding to request")
23130		}
23131	}
23132	return
23133}
23134
23135// SecurityRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
23136// operation.
23137type SecurityRulesDeleteFuture struct {
23138	azure.FutureAPI
23139	// Result returns the result of the asynchronous operation.
23140	// If the operation has not completed it will return an error.
23141	Result func(SecurityRulesClient) (autorest.Response, error)
23142}
23143
23144// UnmarshalJSON is the custom unmarshaller for CreateFuture.
23145func (future *SecurityRulesDeleteFuture) UnmarshalJSON(body []byte) error {
23146	var azFuture azure.Future
23147	if err := json.Unmarshal(body, &azFuture); err != nil {
23148		return err
23149	}
23150	future.FutureAPI = &azFuture
23151	future.Result = future.result
23152	return nil
23153}
23154
23155// result is the default implementation for SecurityRulesDeleteFuture.Result.
23156func (future *SecurityRulesDeleteFuture) result(client SecurityRulesClient) (ar autorest.Response, err error) {
23157	var done bool
23158	done, err = future.DoneWithContext(context.Background(), client)
23159	if err != nil {
23160		err = autorest.NewErrorWithError(err, "network.SecurityRulesDeleteFuture", "Result", future.Response(), "Polling failure")
23161		return
23162	}
23163	if !done {
23164		ar.Response = future.Response()
23165		err = azure.NewAsyncOpIncompleteError("network.SecurityRulesDeleteFuture")
23166		return
23167	}
23168	ar.Response = future.Response()
23169	return
23170}
23171
23172// SecurityRulesEvaluationResult network security rules evaluation result.
23173type SecurityRulesEvaluationResult struct {
23174	// Name - Name of the network security rule.
23175	Name *string `json:"name,omitempty"`
23176	// ProtocolMatched - Value indicating whether protocol is matched.
23177	ProtocolMatched *bool `json:"protocolMatched,omitempty"`
23178	// SourceMatched - Value indicating whether source is matched.
23179	SourceMatched *bool `json:"sourceMatched,omitempty"`
23180	// SourcePortMatched - Value indicating whether source port is matched.
23181	SourcePortMatched *bool `json:"sourcePortMatched,omitempty"`
23182	// DestinationMatched - Value indicating whether destination is matched.
23183	DestinationMatched *bool `json:"destinationMatched,omitempty"`
23184	// DestinationPortMatched - Value indicating whether destination port is matched.
23185	DestinationPortMatched *bool `json:"destinationPortMatched,omitempty"`
23186}
23187
23188// ServiceAssociationLink serviceAssociationLink resource.
23189type ServiceAssociationLink struct {
23190	// ServiceAssociationLinkPropertiesFormat - Resource navigation link properties format.
23191	*ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"`
23192	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
23193	Name *string `json:"name,omitempty"`
23194	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
23195	Etag *string `json:"etag,omitempty"`
23196	// ID - Resource ID.
23197	ID *string `json:"id,omitempty"`
23198}
23199
23200// MarshalJSON is the custom marshaler for ServiceAssociationLink.
23201func (sal ServiceAssociationLink) MarshalJSON() ([]byte, error) {
23202	objectMap := make(map[string]interface{})
23203	if sal.ServiceAssociationLinkPropertiesFormat != nil {
23204		objectMap["properties"] = sal.ServiceAssociationLinkPropertiesFormat
23205	}
23206	if sal.Name != nil {
23207		objectMap["name"] = sal.Name
23208	}
23209	if sal.ID != nil {
23210		objectMap["id"] = sal.ID
23211	}
23212	return json.Marshal(objectMap)
23213}
23214
23215// UnmarshalJSON is the custom unmarshaler for ServiceAssociationLink struct.
23216func (sal *ServiceAssociationLink) UnmarshalJSON(body []byte) error {
23217	var m map[string]*json.RawMessage
23218	err := json.Unmarshal(body, &m)
23219	if err != nil {
23220		return err
23221	}
23222	for k, v := range m {
23223		switch k {
23224		case "properties":
23225			if v != nil {
23226				var serviceAssociationLinkPropertiesFormat ServiceAssociationLinkPropertiesFormat
23227				err = json.Unmarshal(*v, &serviceAssociationLinkPropertiesFormat)
23228				if err != nil {
23229					return err
23230				}
23231				sal.ServiceAssociationLinkPropertiesFormat = &serviceAssociationLinkPropertiesFormat
23232			}
23233		case "name":
23234			if v != nil {
23235				var name string
23236				err = json.Unmarshal(*v, &name)
23237				if err != nil {
23238					return err
23239				}
23240				sal.Name = &name
23241			}
23242		case "etag":
23243			if v != nil {
23244				var etag string
23245				err = json.Unmarshal(*v, &etag)
23246				if err != nil {
23247					return err
23248				}
23249				sal.Etag = &etag
23250			}
23251		case "id":
23252			if v != nil {
23253				var ID string
23254				err = json.Unmarshal(*v, &ID)
23255				if err != nil {
23256					return err
23257				}
23258				sal.ID = &ID
23259			}
23260		}
23261	}
23262
23263	return nil
23264}
23265
23266// ServiceAssociationLinkPropertiesFormat properties of ServiceAssociationLink.
23267type ServiceAssociationLinkPropertiesFormat struct {
23268	// LinkedResourceType - Resource type of the linked resource.
23269	LinkedResourceType *string `json:"linkedResourceType,omitempty"`
23270	// Link - Link to the external resource.
23271	Link *string `json:"link,omitempty"`
23272	// ProvisioningState - READ-ONLY; Provisioning state of the ServiceAssociationLink resource.
23273	ProvisioningState *string `json:"provisioningState,omitempty"`
23274}
23275
23276// MarshalJSON is the custom marshaler for ServiceAssociationLinkPropertiesFormat.
23277func (salpf ServiceAssociationLinkPropertiesFormat) MarshalJSON() ([]byte, error) {
23278	objectMap := make(map[string]interface{})
23279	if salpf.LinkedResourceType != nil {
23280		objectMap["linkedResourceType"] = salpf.LinkedResourceType
23281	}
23282	if salpf.Link != nil {
23283		objectMap["link"] = salpf.Link
23284	}
23285	return json.Marshal(objectMap)
23286}
23287
23288// ServiceDelegationPropertiesFormat properties of a service delegation.
23289type ServiceDelegationPropertiesFormat struct {
23290	// ServiceName - The name of the service to whom the subnet should be delegated (e.g. Microsoft.Sql/servers)
23291	ServiceName *string `json:"serviceName,omitempty"`
23292	// Actions - Describes the actions permitted to the service upon delegation
23293	Actions *[]string `json:"actions,omitempty"`
23294	// ProvisioningState - READ-ONLY; The provisioning state of the resource.
23295	ProvisioningState *string `json:"provisioningState,omitempty"`
23296}
23297
23298// MarshalJSON is the custom marshaler for ServiceDelegationPropertiesFormat.
23299func (sdpf ServiceDelegationPropertiesFormat) MarshalJSON() ([]byte, error) {
23300	objectMap := make(map[string]interface{})
23301	if sdpf.ServiceName != nil {
23302		objectMap["serviceName"] = sdpf.ServiceName
23303	}
23304	if sdpf.Actions != nil {
23305		objectMap["actions"] = sdpf.Actions
23306	}
23307	return json.Marshal(objectMap)
23308}
23309
23310// ServiceEndpointPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
23311// a long-running operation.
23312type ServiceEndpointPoliciesCreateOrUpdateFuture struct {
23313	azure.FutureAPI
23314	// Result returns the result of the asynchronous operation.
23315	// If the operation has not completed it will return an error.
23316	Result func(ServiceEndpointPoliciesClient) (ServiceEndpointPolicy, error)
23317}
23318
23319// UnmarshalJSON is the custom unmarshaller for CreateFuture.
23320func (future *ServiceEndpointPoliciesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
23321	var azFuture azure.Future
23322	if err := json.Unmarshal(body, &azFuture); err != nil {
23323		return err
23324	}
23325	future.FutureAPI = &azFuture
23326	future.Result = future.result
23327	return nil
23328}
23329
23330// result is the default implementation for ServiceEndpointPoliciesCreateOrUpdateFuture.Result.
23331func (future *ServiceEndpointPoliciesCreateOrUpdateFuture) result(client ServiceEndpointPoliciesClient) (sep ServiceEndpointPolicy, err error) {
23332	var done bool
23333	done, err = future.DoneWithContext(context.Background(), client)
23334	if err != nil {
23335		err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
23336		return
23337	}
23338	if !done {
23339		sep.Response.Response = future.Response()
23340		err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPoliciesCreateOrUpdateFuture")
23341		return
23342	}
23343	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
23344	if sep.Response.Response, err = future.GetResult(sender); err == nil && sep.Response.Response.StatusCode != http.StatusNoContent {
23345		sep, err = client.CreateOrUpdateResponder(sep.Response.Response)
23346		if err != nil {
23347			err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesCreateOrUpdateFuture", "Result", sep.Response.Response, "Failure responding to request")
23348		}
23349	}
23350	return
23351}
23352
23353// ServiceEndpointPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a
23354// long-running operation.
23355type ServiceEndpointPoliciesDeleteFuture struct {
23356	azure.FutureAPI
23357	// Result returns the result of the asynchronous operation.
23358	// If the operation has not completed it will return an error.
23359	Result func(ServiceEndpointPoliciesClient) (autorest.Response, error)
23360}
23361
23362// UnmarshalJSON is the custom unmarshaller for CreateFuture.
23363func (future *ServiceEndpointPoliciesDeleteFuture) UnmarshalJSON(body []byte) error {
23364	var azFuture azure.Future
23365	if err := json.Unmarshal(body, &azFuture); err != nil {
23366		return err
23367	}
23368	future.FutureAPI = &azFuture
23369	future.Result = future.result
23370	return nil
23371}
23372
23373// result is the default implementation for ServiceEndpointPoliciesDeleteFuture.Result.
23374func (future *ServiceEndpointPoliciesDeleteFuture) result(client ServiceEndpointPoliciesClient) (ar autorest.Response, err error) {
23375	var done bool
23376	done, err = future.DoneWithContext(context.Background(), client)
23377	if err != nil {
23378		err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesDeleteFuture", "Result", future.Response(), "Polling failure")
23379		return
23380	}
23381	if !done {
23382		ar.Response = future.Response()
23383		err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPoliciesDeleteFuture")
23384		return
23385	}
23386	ar.Response = future.Response()
23387	return
23388}
23389
23390// ServiceEndpointPoliciesUpdateFuture an abstraction for monitoring and retrieving the results of a
23391// long-running operation.
23392type ServiceEndpointPoliciesUpdateFuture struct {
23393	azure.FutureAPI
23394	// Result returns the result of the asynchronous operation.
23395	// If the operation has not completed it will return an error.
23396	Result func(ServiceEndpointPoliciesClient) (ServiceEndpointPolicy, error)
23397}
23398
23399// UnmarshalJSON is the custom unmarshaller for CreateFuture.
23400func (future *ServiceEndpointPoliciesUpdateFuture) UnmarshalJSON(body []byte) error {
23401	var azFuture azure.Future
23402	if err := json.Unmarshal(body, &azFuture); err != nil {
23403		return err
23404	}
23405	future.FutureAPI = &azFuture
23406	future.Result = future.result
23407	return nil
23408}
23409
23410// result is the default implementation for ServiceEndpointPoliciesUpdateFuture.Result.
23411func (future *ServiceEndpointPoliciesUpdateFuture) result(client ServiceEndpointPoliciesClient) (sep ServiceEndpointPolicy, err error) {
23412	var done bool
23413	done, err = future.DoneWithContext(context.Background(), client)
23414	if err != nil {
23415		err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesUpdateFuture", "Result", future.Response(), "Polling failure")
23416		return
23417	}
23418	if !done {
23419		sep.Response.Response = future.Response()
23420		err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPoliciesUpdateFuture")
23421		return
23422	}
23423	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
23424	if sep.Response.Response, err = future.GetResult(sender); err == nil && sep.Response.Response.StatusCode != http.StatusNoContent {
23425		sep, err = client.UpdateResponder(sep.Response.Response)
23426		if err != nil {
23427			err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesUpdateFuture", "Result", sep.Response.Response, "Failure responding to request")
23428		}
23429	}
23430	return
23431}
23432
23433// ServiceEndpointPolicy service End point policy resource.
23434type ServiceEndpointPolicy struct {
23435	autorest.Response `json:"-"`
23436	// ServiceEndpointPolicyPropertiesFormat - Properties of the service end point policy
23437	*ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"`
23438	// Etag - A unique read-only string that changes whenever the resource is updated.
23439	Etag *string `json:"etag,omitempty"`
23440	// ID - Resource ID.
23441	ID *string `json:"id,omitempty"`
23442	// Name - READ-ONLY; Resource name.
23443	Name *string `json:"name,omitempty"`
23444	// Type - READ-ONLY; Resource type.
23445	Type *string `json:"type,omitempty"`
23446	// Location - Resource location.
23447	Location *string `json:"location,omitempty"`
23448	// Tags - Resource tags.
23449	Tags map[string]*string `json:"tags"`
23450}
23451
23452// MarshalJSON is the custom marshaler for ServiceEndpointPolicy.
23453func (sep ServiceEndpointPolicy) MarshalJSON() ([]byte, error) {
23454	objectMap := make(map[string]interface{})
23455	if sep.ServiceEndpointPolicyPropertiesFormat != nil {
23456		objectMap["properties"] = sep.ServiceEndpointPolicyPropertiesFormat
23457	}
23458	if sep.Etag != nil {
23459		objectMap["etag"] = sep.Etag
23460	}
23461	if sep.ID != nil {
23462		objectMap["id"] = sep.ID
23463	}
23464	if sep.Location != nil {
23465		objectMap["location"] = sep.Location
23466	}
23467	if sep.Tags != nil {
23468		objectMap["tags"] = sep.Tags
23469	}
23470	return json.Marshal(objectMap)
23471}
23472
23473// UnmarshalJSON is the custom unmarshaler for ServiceEndpointPolicy struct.
23474func (sep *ServiceEndpointPolicy) UnmarshalJSON(body []byte) error {
23475	var m map[string]*json.RawMessage
23476	err := json.Unmarshal(body, &m)
23477	if err != nil {
23478		return err
23479	}
23480	for k, v := range m {
23481		switch k {
23482		case "properties":
23483			if v != nil {
23484				var serviceEndpointPolicyPropertiesFormat ServiceEndpointPolicyPropertiesFormat
23485				err = json.Unmarshal(*v, &serviceEndpointPolicyPropertiesFormat)
23486				if err != nil {
23487					return err
23488				}
23489				sep.ServiceEndpointPolicyPropertiesFormat = &serviceEndpointPolicyPropertiesFormat
23490			}
23491		case "etag":
23492			if v != nil {
23493				var etag string
23494				err = json.Unmarshal(*v, &etag)
23495				if err != nil {
23496					return err
23497				}
23498				sep.Etag = &etag
23499			}
23500		case "id":
23501			if v != nil {
23502				var ID string
23503				err = json.Unmarshal(*v, &ID)
23504				if err != nil {
23505					return err
23506				}
23507				sep.ID = &ID
23508			}
23509		case "name":
23510			if v != nil {
23511				var name string
23512				err = json.Unmarshal(*v, &name)
23513				if err != nil {
23514					return err
23515				}
23516				sep.Name = &name
23517			}
23518		case "type":
23519			if v != nil {
23520				var typeVar string
23521				err = json.Unmarshal(*v, &typeVar)
23522				if err != nil {
23523					return err
23524				}
23525				sep.Type = &typeVar
23526			}
23527		case "location":
23528			if v != nil {
23529				var location string
23530				err = json.Unmarshal(*v, &location)
23531				if err != nil {
23532					return err
23533				}
23534				sep.Location = &location
23535			}
23536		case "tags":
23537			if v != nil {
23538				var tags map[string]*string
23539				err = json.Unmarshal(*v, &tags)
23540				if err != nil {
23541					return err
23542				}
23543				sep.Tags = tags
23544			}
23545		}
23546	}
23547
23548	return nil
23549}
23550
23551// ServiceEndpointPolicyDefinition service Endpoint policy definitions.
23552type ServiceEndpointPolicyDefinition struct {
23553	autorest.Response `json:"-"`
23554	// ServiceEndpointPolicyDefinitionPropertiesFormat - Properties of the service endpoint policy definition
23555	*ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"`
23556	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
23557	Name *string `json:"name,omitempty"`
23558	// Etag - A unique read-only string that changes whenever the resource is updated.
23559	Etag *string `json:"etag,omitempty"`
23560	// ID - Resource ID.
23561	ID *string `json:"id,omitempty"`
23562}
23563
23564// MarshalJSON is the custom marshaler for ServiceEndpointPolicyDefinition.
23565func (sepd ServiceEndpointPolicyDefinition) MarshalJSON() ([]byte, error) {
23566	objectMap := make(map[string]interface{})
23567	if sepd.ServiceEndpointPolicyDefinitionPropertiesFormat != nil {
23568		objectMap["properties"] = sepd.ServiceEndpointPolicyDefinitionPropertiesFormat
23569	}
23570	if sepd.Name != nil {
23571		objectMap["name"] = sepd.Name
23572	}
23573	if sepd.Etag != nil {
23574		objectMap["etag"] = sepd.Etag
23575	}
23576	if sepd.ID != nil {
23577		objectMap["id"] = sepd.ID
23578	}
23579	return json.Marshal(objectMap)
23580}
23581
23582// UnmarshalJSON is the custom unmarshaler for ServiceEndpointPolicyDefinition struct.
23583func (sepd *ServiceEndpointPolicyDefinition) UnmarshalJSON(body []byte) error {
23584	var m map[string]*json.RawMessage
23585	err := json.Unmarshal(body, &m)
23586	if err != nil {
23587		return err
23588	}
23589	for k, v := range m {
23590		switch k {
23591		case "properties":
23592			if v != nil {
23593				var serviceEndpointPolicyDefinitionPropertiesFormat ServiceEndpointPolicyDefinitionPropertiesFormat
23594				err = json.Unmarshal(*v, &serviceEndpointPolicyDefinitionPropertiesFormat)
23595				if err != nil {
23596					return err
23597				}
23598				sepd.ServiceEndpointPolicyDefinitionPropertiesFormat = &serviceEndpointPolicyDefinitionPropertiesFormat
23599			}
23600		case "name":
23601			if v != nil {
23602				var name string
23603				err = json.Unmarshal(*v, &name)
23604				if err != nil {
23605					return err
23606				}
23607				sepd.Name = &name
23608			}
23609		case "etag":
23610			if v != nil {
23611				var etag string
23612				err = json.Unmarshal(*v, &etag)
23613				if err != nil {
23614					return err
23615				}
23616				sepd.Etag = &etag
23617			}
23618		case "id":
23619			if v != nil {
23620				var ID string
23621				err = json.Unmarshal(*v, &ID)
23622				if err != nil {
23623					return err
23624				}
23625				sepd.ID = &ID
23626			}
23627		}
23628	}
23629
23630	return nil
23631}
23632
23633// ServiceEndpointPolicyDefinitionListResult response for ListServiceEndpointPolicyDefinition API service
23634// call. Retrieves all service endpoint policy definition that belongs to a service endpoint policy.
23635type ServiceEndpointPolicyDefinitionListResult struct {
23636	autorest.Response `json:"-"`
23637	// Value - The service endpoint policy definition in a service endpoint policy.
23638	Value *[]ServiceEndpointPolicyDefinition `json:"value,omitempty"`
23639	// NextLink - The URL to get the next set of results.
23640	NextLink *string `json:"nextLink,omitempty"`
23641}
23642
23643// ServiceEndpointPolicyDefinitionListResultIterator provides access to a complete listing of
23644// ServiceEndpointPolicyDefinition values.
23645type ServiceEndpointPolicyDefinitionListResultIterator struct {
23646	i    int
23647	page ServiceEndpointPolicyDefinitionListResultPage
23648}
23649
23650// NextWithContext advances to the next value.  If there was an error making
23651// the request the iterator does not advance and the error is returned.
23652func (iter *ServiceEndpointPolicyDefinitionListResultIterator) NextWithContext(ctx context.Context) (err error) {
23653	if tracing.IsEnabled() {
23654		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyDefinitionListResultIterator.NextWithContext")
23655		defer func() {
23656			sc := -1
23657			if iter.Response().Response.Response != nil {
23658				sc = iter.Response().Response.Response.StatusCode
23659			}
23660			tracing.EndSpan(ctx, sc, err)
23661		}()
23662	}
23663	iter.i++
23664	if iter.i < len(iter.page.Values()) {
23665		return nil
23666	}
23667	err = iter.page.NextWithContext(ctx)
23668	if err != nil {
23669		iter.i--
23670		return err
23671	}
23672	iter.i = 0
23673	return nil
23674}
23675
23676// Next advances to the next value.  If there was an error making
23677// the request the iterator does not advance and the error is returned.
23678// Deprecated: Use NextWithContext() instead.
23679func (iter *ServiceEndpointPolicyDefinitionListResultIterator) Next() error {
23680	return iter.NextWithContext(context.Background())
23681}
23682
23683// NotDone returns true if the enumeration should be started or is not yet complete.
23684func (iter ServiceEndpointPolicyDefinitionListResultIterator) NotDone() bool {
23685	return iter.page.NotDone() && iter.i < len(iter.page.Values())
23686}
23687
23688// Response returns the raw server response from the last page request.
23689func (iter ServiceEndpointPolicyDefinitionListResultIterator) Response() ServiceEndpointPolicyDefinitionListResult {
23690	return iter.page.Response()
23691}
23692
23693// Value returns the current value or a zero-initialized value if the
23694// iterator has advanced beyond the end of the collection.
23695func (iter ServiceEndpointPolicyDefinitionListResultIterator) Value() ServiceEndpointPolicyDefinition {
23696	if !iter.page.NotDone() {
23697		return ServiceEndpointPolicyDefinition{}
23698	}
23699	return iter.page.Values()[iter.i]
23700}
23701
23702// Creates a new instance of the ServiceEndpointPolicyDefinitionListResultIterator type.
23703func NewServiceEndpointPolicyDefinitionListResultIterator(page ServiceEndpointPolicyDefinitionListResultPage) ServiceEndpointPolicyDefinitionListResultIterator {
23704	return ServiceEndpointPolicyDefinitionListResultIterator{page: page}
23705}
23706
23707// IsEmpty returns true if the ListResult contains no values.
23708func (sepdlr ServiceEndpointPolicyDefinitionListResult) IsEmpty() bool {
23709	return sepdlr.Value == nil || len(*sepdlr.Value) == 0
23710}
23711
23712// hasNextLink returns true if the NextLink is not empty.
23713func (sepdlr ServiceEndpointPolicyDefinitionListResult) hasNextLink() bool {
23714	return sepdlr.NextLink != nil && len(*sepdlr.NextLink) != 0
23715}
23716
23717// serviceEndpointPolicyDefinitionListResultPreparer prepares a request to retrieve the next set of results.
23718// It returns nil if no more results exist.
23719func (sepdlr ServiceEndpointPolicyDefinitionListResult) serviceEndpointPolicyDefinitionListResultPreparer(ctx context.Context) (*http.Request, error) {
23720	if !sepdlr.hasNextLink() {
23721		return nil, nil
23722	}
23723	return autorest.Prepare((&http.Request{}).WithContext(ctx),
23724		autorest.AsJSON(),
23725		autorest.AsGet(),
23726		autorest.WithBaseURL(to.String(sepdlr.NextLink)))
23727}
23728
23729// ServiceEndpointPolicyDefinitionListResultPage contains a page of ServiceEndpointPolicyDefinition values.
23730type ServiceEndpointPolicyDefinitionListResultPage struct {
23731	fn     func(context.Context, ServiceEndpointPolicyDefinitionListResult) (ServiceEndpointPolicyDefinitionListResult, error)
23732	sepdlr ServiceEndpointPolicyDefinitionListResult
23733}
23734
23735// NextWithContext advances to the next page of values.  If there was an error making
23736// the request the page does not advance and the error is returned.
23737func (page *ServiceEndpointPolicyDefinitionListResultPage) NextWithContext(ctx context.Context) (err error) {
23738	if tracing.IsEnabled() {
23739		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyDefinitionListResultPage.NextWithContext")
23740		defer func() {
23741			sc := -1
23742			if page.Response().Response.Response != nil {
23743				sc = page.Response().Response.Response.StatusCode
23744			}
23745			tracing.EndSpan(ctx, sc, err)
23746		}()
23747	}
23748	for {
23749		next, err := page.fn(ctx, page.sepdlr)
23750		if err != nil {
23751			return err
23752		}
23753		page.sepdlr = next
23754		if !next.hasNextLink() || !next.IsEmpty() {
23755			break
23756		}
23757	}
23758	return nil
23759}
23760
23761// Next advances to the next page of values.  If there was an error making
23762// the request the page does not advance and the error is returned.
23763// Deprecated: Use NextWithContext() instead.
23764func (page *ServiceEndpointPolicyDefinitionListResultPage) Next() error {
23765	return page.NextWithContext(context.Background())
23766}
23767
23768// NotDone returns true if the page enumeration should be started or is not yet complete.
23769func (page ServiceEndpointPolicyDefinitionListResultPage) NotDone() bool {
23770	return !page.sepdlr.IsEmpty()
23771}
23772
23773// Response returns the raw server response from the last page request.
23774func (page ServiceEndpointPolicyDefinitionListResultPage) Response() ServiceEndpointPolicyDefinitionListResult {
23775	return page.sepdlr
23776}
23777
23778// Values returns the slice of values for the current page or nil if there are no values.
23779func (page ServiceEndpointPolicyDefinitionListResultPage) Values() []ServiceEndpointPolicyDefinition {
23780	if page.sepdlr.IsEmpty() {
23781		return nil
23782	}
23783	return *page.sepdlr.Value
23784}
23785
23786// Creates a new instance of the ServiceEndpointPolicyDefinitionListResultPage type.
23787func NewServiceEndpointPolicyDefinitionListResultPage(cur ServiceEndpointPolicyDefinitionListResult, getNextPage func(context.Context, ServiceEndpointPolicyDefinitionListResult) (ServiceEndpointPolicyDefinitionListResult, error)) ServiceEndpointPolicyDefinitionListResultPage {
23788	return ServiceEndpointPolicyDefinitionListResultPage{
23789		fn:     getNextPage,
23790		sepdlr: cur,
23791	}
23792}
23793
23794// ServiceEndpointPolicyDefinitionPropertiesFormat service Endpoint policy definition resource.
23795type ServiceEndpointPolicyDefinitionPropertiesFormat struct {
23796	// Description - A description for this rule. Restricted to 140 chars.
23797	Description *string `json:"description,omitempty"`
23798	// Service - service endpoint name.
23799	Service *string `json:"service,omitempty"`
23800	// ServiceResources - A list of service resources.
23801	ServiceResources *[]string `json:"serviceResources,omitempty"`
23802	// ProvisioningState - READ-ONLY; The provisioning state of the service end point policy definition. Possible values are: 'Updating', 'Deleting', and 'Failed'.
23803	ProvisioningState *string `json:"provisioningState,omitempty"`
23804}
23805
23806// MarshalJSON is the custom marshaler for ServiceEndpointPolicyDefinitionPropertiesFormat.
23807func (sepdpf ServiceEndpointPolicyDefinitionPropertiesFormat) MarshalJSON() ([]byte, error) {
23808	objectMap := make(map[string]interface{})
23809	if sepdpf.Description != nil {
23810		objectMap["description"] = sepdpf.Description
23811	}
23812	if sepdpf.Service != nil {
23813		objectMap["service"] = sepdpf.Service
23814	}
23815	if sepdpf.ServiceResources != nil {
23816		objectMap["serviceResources"] = sepdpf.ServiceResources
23817	}
23818	return json.Marshal(objectMap)
23819}
23820
23821// ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
23822// results of a long-running operation.
23823type ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture struct {
23824	azure.FutureAPI
23825	// Result returns the result of the asynchronous operation.
23826	// If the operation has not completed it will return an error.
23827	Result func(ServiceEndpointPolicyDefinitionsClient) (ServiceEndpointPolicyDefinition, error)
23828}
23829
23830// UnmarshalJSON is the custom unmarshaller for CreateFuture.
23831func (future *ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
23832	var azFuture azure.Future
23833	if err := json.Unmarshal(body, &azFuture); err != nil {
23834		return err
23835	}
23836	future.FutureAPI = &azFuture
23837	future.Result = future.result
23838	return nil
23839}
23840
23841// result is the default implementation for ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture.Result.
23842func (future *ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture) result(client ServiceEndpointPolicyDefinitionsClient) (sepd ServiceEndpointPolicyDefinition, err error) {
23843	var done bool
23844	done, err = future.DoneWithContext(context.Background(), client)
23845	if err != nil {
23846		err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
23847		return
23848	}
23849	if !done {
23850		sepd.Response.Response = future.Response()
23851		err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture")
23852		return
23853	}
23854	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
23855	if sepd.Response.Response, err = future.GetResult(sender); err == nil && sepd.Response.Response.StatusCode != http.StatusNoContent {
23856		sepd, err = client.CreateOrUpdateResponder(sepd.Response.Response)
23857		if err != nil {
23858			err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture", "Result", sepd.Response.Response, "Failure responding to request")
23859		}
23860	}
23861	return
23862}
23863
23864// ServiceEndpointPolicyDefinitionsDeleteFuture an abstraction for monitoring and retrieving the results of
23865// a long-running operation.
23866type ServiceEndpointPolicyDefinitionsDeleteFuture struct {
23867	azure.FutureAPI
23868	// Result returns the result of the asynchronous operation.
23869	// If the operation has not completed it will return an error.
23870	Result func(ServiceEndpointPolicyDefinitionsClient) (autorest.Response, error)
23871}
23872
23873// UnmarshalJSON is the custom unmarshaller for CreateFuture.
23874func (future *ServiceEndpointPolicyDefinitionsDeleteFuture) UnmarshalJSON(body []byte) error {
23875	var azFuture azure.Future
23876	if err := json.Unmarshal(body, &azFuture); err != nil {
23877		return err
23878	}
23879	future.FutureAPI = &azFuture
23880	future.Result = future.result
23881	return nil
23882}
23883
23884// result is the default implementation for ServiceEndpointPolicyDefinitionsDeleteFuture.Result.
23885func (future *ServiceEndpointPolicyDefinitionsDeleteFuture) result(client ServiceEndpointPolicyDefinitionsClient) (ar autorest.Response, err error) {
23886	var done bool
23887	done, err = future.DoneWithContext(context.Background(), client)
23888	if err != nil {
23889		err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsDeleteFuture", "Result", future.Response(), "Polling failure")
23890		return
23891	}
23892	if !done {
23893		ar.Response = future.Response()
23894		err = azure.NewAsyncOpIncompleteError("network.ServiceEndpointPolicyDefinitionsDeleteFuture")
23895		return
23896	}
23897	ar.Response = future.Response()
23898	return
23899}
23900
23901// ServiceEndpointPolicyListResult response for ListServiceEndpointPolicies API service call.
23902type ServiceEndpointPolicyListResult struct {
23903	autorest.Response `json:"-"`
23904	// Value - A list of ServiceEndpointPolicy resources.
23905	Value *[]ServiceEndpointPolicy `json:"value,omitempty"`
23906	// NextLink - READ-ONLY; The URL to get the next set of results.
23907	NextLink *string `json:"nextLink,omitempty"`
23908}
23909
23910// MarshalJSON is the custom marshaler for ServiceEndpointPolicyListResult.
23911func (seplr ServiceEndpointPolicyListResult) MarshalJSON() ([]byte, error) {
23912	objectMap := make(map[string]interface{})
23913	if seplr.Value != nil {
23914		objectMap["value"] = seplr.Value
23915	}
23916	return json.Marshal(objectMap)
23917}
23918
23919// ServiceEndpointPolicyListResultIterator provides access to a complete listing of ServiceEndpointPolicy
23920// values.
23921type ServiceEndpointPolicyListResultIterator struct {
23922	i    int
23923	page ServiceEndpointPolicyListResultPage
23924}
23925
23926// NextWithContext advances to the next value.  If there was an error making
23927// the request the iterator does not advance and the error is returned.
23928func (iter *ServiceEndpointPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) {
23929	if tracing.IsEnabled() {
23930		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyListResultIterator.NextWithContext")
23931		defer func() {
23932			sc := -1
23933			if iter.Response().Response.Response != nil {
23934				sc = iter.Response().Response.Response.StatusCode
23935			}
23936			tracing.EndSpan(ctx, sc, err)
23937		}()
23938	}
23939	iter.i++
23940	if iter.i < len(iter.page.Values()) {
23941		return nil
23942	}
23943	err = iter.page.NextWithContext(ctx)
23944	if err != nil {
23945		iter.i--
23946		return err
23947	}
23948	iter.i = 0
23949	return nil
23950}
23951
23952// Next advances to the next value.  If there was an error making
23953// the request the iterator does not advance and the error is returned.
23954// Deprecated: Use NextWithContext() instead.
23955func (iter *ServiceEndpointPolicyListResultIterator) Next() error {
23956	return iter.NextWithContext(context.Background())
23957}
23958
23959// NotDone returns true if the enumeration should be started or is not yet complete.
23960func (iter ServiceEndpointPolicyListResultIterator) NotDone() bool {
23961	return iter.page.NotDone() && iter.i < len(iter.page.Values())
23962}
23963
23964// Response returns the raw server response from the last page request.
23965func (iter ServiceEndpointPolicyListResultIterator) Response() ServiceEndpointPolicyListResult {
23966	return iter.page.Response()
23967}
23968
23969// Value returns the current value or a zero-initialized value if the
23970// iterator has advanced beyond the end of the collection.
23971func (iter ServiceEndpointPolicyListResultIterator) Value() ServiceEndpointPolicy {
23972	if !iter.page.NotDone() {
23973		return ServiceEndpointPolicy{}
23974	}
23975	return iter.page.Values()[iter.i]
23976}
23977
23978// Creates a new instance of the ServiceEndpointPolicyListResultIterator type.
23979func NewServiceEndpointPolicyListResultIterator(page ServiceEndpointPolicyListResultPage) ServiceEndpointPolicyListResultIterator {
23980	return ServiceEndpointPolicyListResultIterator{page: page}
23981}
23982
23983// IsEmpty returns true if the ListResult contains no values.
23984func (seplr ServiceEndpointPolicyListResult) IsEmpty() bool {
23985	return seplr.Value == nil || len(*seplr.Value) == 0
23986}
23987
23988// hasNextLink returns true if the NextLink is not empty.
23989func (seplr ServiceEndpointPolicyListResult) hasNextLink() bool {
23990	return seplr.NextLink != nil && len(*seplr.NextLink) != 0
23991}
23992
23993// serviceEndpointPolicyListResultPreparer prepares a request to retrieve the next set of results.
23994// It returns nil if no more results exist.
23995func (seplr ServiceEndpointPolicyListResult) serviceEndpointPolicyListResultPreparer(ctx context.Context) (*http.Request, error) {
23996	if !seplr.hasNextLink() {
23997		return nil, nil
23998	}
23999	return autorest.Prepare((&http.Request{}).WithContext(ctx),
24000		autorest.AsJSON(),
24001		autorest.AsGet(),
24002		autorest.WithBaseURL(to.String(seplr.NextLink)))
24003}
24004
24005// ServiceEndpointPolicyListResultPage contains a page of ServiceEndpointPolicy values.
24006type ServiceEndpointPolicyListResultPage struct {
24007	fn    func(context.Context, ServiceEndpointPolicyListResult) (ServiceEndpointPolicyListResult, error)
24008	seplr ServiceEndpointPolicyListResult
24009}
24010
24011// NextWithContext advances to the next page of values.  If there was an error making
24012// the request the page does not advance and the error is returned.
24013func (page *ServiceEndpointPolicyListResultPage) NextWithContext(ctx context.Context) (err error) {
24014	if tracing.IsEnabled() {
24015		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyListResultPage.NextWithContext")
24016		defer func() {
24017			sc := -1
24018			if page.Response().Response.Response != nil {
24019				sc = page.Response().Response.Response.StatusCode
24020			}
24021			tracing.EndSpan(ctx, sc, err)
24022		}()
24023	}
24024	for {
24025		next, err := page.fn(ctx, page.seplr)
24026		if err != nil {
24027			return err
24028		}
24029		page.seplr = next
24030		if !next.hasNextLink() || !next.IsEmpty() {
24031			break
24032		}
24033	}
24034	return nil
24035}
24036
24037// Next advances to the next page of values.  If there was an error making
24038// the request the page does not advance and the error is returned.
24039// Deprecated: Use NextWithContext() instead.
24040func (page *ServiceEndpointPolicyListResultPage) Next() error {
24041	return page.NextWithContext(context.Background())
24042}
24043
24044// NotDone returns true if the page enumeration should be started or is not yet complete.
24045func (page ServiceEndpointPolicyListResultPage) NotDone() bool {
24046	return !page.seplr.IsEmpty()
24047}
24048
24049// Response returns the raw server response from the last page request.
24050func (page ServiceEndpointPolicyListResultPage) Response() ServiceEndpointPolicyListResult {
24051	return page.seplr
24052}
24053
24054// Values returns the slice of values for the current page or nil if there are no values.
24055func (page ServiceEndpointPolicyListResultPage) Values() []ServiceEndpointPolicy {
24056	if page.seplr.IsEmpty() {
24057		return nil
24058	}
24059	return *page.seplr.Value
24060}
24061
24062// Creates a new instance of the ServiceEndpointPolicyListResultPage type.
24063func NewServiceEndpointPolicyListResultPage(cur ServiceEndpointPolicyListResult, getNextPage func(context.Context, ServiceEndpointPolicyListResult) (ServiceEndpointPolicyListResult, error)) ServiceEndpointPolicyListResultPage {
24064	return ServiceEndpointPolicyListResultPage{
24065		fn:    getNextPage,
24066		seplr: cur,
24067	}
24068}
24069
24070// ServiceEndpointPolicyPropertiesFormat service Endpoint Policy resource.
24071type ServiceEndpointPolicyPropertiesFormat struct {
24072	// ServiceEndpointPolicyDefinitions - A collection of service endpoint policy definitions of the service endpoint policy.
24073	ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"`
24074	// Subnets - READ-ONLY; A collection of references to subnets.
24075	Subnets *[]Subnet `json:"subnets,omitempty"`
24076	// ResourceGUID - READ-ONLY; The resource GUID property of the service endpoint policy resource.
24077	ResourceGUID *string `json:"resourceGuid,omitempty"`
24078	// ProvisioningState - READ-ONLY; The provisioning state of the service endpoint policy. Possible values are: 'Updating', 'Deleting', and 'Failed'.
24079	ProvisioningState *string `json:"provisioningState,omitempty"`
24080}
24081
24082// MarshalJSON is the custom marshaler for ServiceEndpointPolicyPropertiesFormat.
24083func (seppf ServiceEndpointPolicyPropertiesFormat) MarshalJSON() ([]byte, error) {
24084	objectMap := make(map[string]interface{})
24085	if seppf.ServiceEndpointPolicyDefinitions != nil {
24086		objectMap["serviceEndpointPolicyDefinitions"] = seppf.ServiceEndpointPolicyDefinitions
24087	}
24088	return json.Marshal(objectMap)
24089}
24090
24091// ServiceEndpointPropertiesFormat the service endpoint properties.
24092type ServiceEndpointPropertiesFormat struct {
24093	// Service - The type of the endpoint service.
24094	Service *string `json:"service,omitempty"`
24095	// Locations - A list of locations.
24096	Locations *[]string `json:"locations,omitempty"`
24097	// ProvisioningState - The provisioning state of the resource.
24098	ProvisioningState *string `json:"provisioningState,omitempty"`
24099}
24100
24101// String ...
24102type String struct {
24103	autorest.Response `json:"-"`
24104	Value             *string `json:"value,omitempty"`
24105}
24106
24107// Subnet subnet in a virtual network resource.
24108type Subnet struct {
24109	autorest.Response `json:"-"`
24110	// SubnetPropertiesFormat - Properties of the subnet.
24111	*SubnetPropertiesFormat `json:"properties,omitempty"`
24112	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
24113	Name *string `json:"name,omitempty"`
24114	// Etag - A unique read-only string that changes whenever the resource is updated.
24115	Etag *string `json:"etag,omitempty"`
24116	// ID - Resource ID.
24117	ID *string `json:"id,omitempty"`
24118}
24119
24120// MarshalJSON is the custom marshaler for Subnet.
24121func (s Subnet) MarshalJSON() ([]byte, error) {
24122	objectMap := make(map[string]interface{})
24123	if s.SubnetPropertiesFormat != nil {
24124		objectMap["properties"] = s.SubnetPropertiesFormat
24125	}
24126	if s.Name != nil {
24127		objectMap["name"] = s.Name
24128	}
24129	if s.Etag != nil {
24130		objectMap["etag"] = s.Etag
24131	}
24132	if s.ID != nil {
24133		objectMap["id"] = s.ID
24134	}
24135	return json.Marshal(objectMap)
24136}
24137
24138// UnmarshalJSON is the custom unmarshaler for Subnet struct.
24139func (s *Subnet) UnmarshalJSON(body []byte) error {
24140	var m map[string]*json.RawMessage
24141	err := json.Unmarshal(body, &m)
24142	if err != nil {
24143		return err
24144	}
24145	for k, v := range m {
24146		switch k {
24147		case "properties":
24148			if v != nil {
24149				var subnetPropertiesFormat SubnetPropertiesFormat
24150				err = json.Unmarshal(*v, &subnetPropertiesFormat)
24151				if err != nil {
24152					return err
24153				}
24154				s.SubnetPropertiesFormat = &subnetPropertiesFormat
24155			}
24156		case "name":
24157			if v != nil {
24158				var name string
24159				err = json.Unmarshal(*v, &name)
24160				if err != nil {
24161					return err
24162				}
24163				s.Name = &name
24164			}
24165		case "etag":
24166			if v != nil {
24167				var etag string
24168				err = json.Unmarshal(*v, &etag)
24169				if err != nil {
24170					return err
24171				}
24172				s.Etag = &etag
24173			}
24174		case "id":
24175			if v != nil {
24176				var ID string
24177				err = json.Unmarshal(*v, &ID)
24178				if err != nil {
24179					return err
24180				}
24181				s.ID = &ID
24182			}
24183		}
24184	}
24185
24186	return nil
24187}
24188
24189// SubnetAssociation network interface and its custom security rules.
24190type SubnetAssociation struct {
24191	// ID - READ-ONLY; Subnet ID.
24192	ID *string `json:"id,omitempty"`
24193	// SecurityRules - Collection of custom security rules.
24194	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
24195}
24196
24197// MarshalJSON is the custom marshaler for SubnetAssociation.
24198func (sa SubnetAssociation) MarshalJSON() ([]byte, error) {
24199	objectMap := make(map[string]interface{})
24200	if sa.SecurityRules != nil {
24201		objectMap["securityRules"] = sa.SecurityRules
24202	}
24203	return json.Marshal(objectMap)
24204}
24205
24206// SubnetListResult response for ListSubnets API service callRetrieves all subnet that belongs to a virtual
24207// network
24208type SubnetListResult struct {
24209	autorest.Response `json:"-"`
24210	// Value - The subnets in a virtual network.
24211	Value *[]Subnet `json:"value,omitempty"`
24212	// NextLink - The URL to get the next set of results.
24213	NextLink *string `json:"nextLink,omitempty"`
24214}
24215
24216// SubnetListResultIterator provides access to a complete listing of Subnet values.
24217type SubnetListResultIterator struct {
24218	i    int
24219	page SubnetListResultPage
24220}
24221
24222// NextWithContext advances to the next value.  If there was an error making
24223// the request the iterator does not advance and the error is returned.
24224func (iter *SubnetListResultIterator) NextWithContext(ctx context.Context) (err error) {
24225	if tracing.IsEnabled() {
24226		ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultIterator.NextWithContext")
24227		defer func() {
24228			sc := -1
24229			if iter.Response().Response.Response != nil {
24230				sc = iter.Response().Response.Response.StatusCode
24231			}
24232			tracing.EndSpan(ctx, sc, err)
24233		}()
24234	}
24235	iter.i++
24236	if iter.i < len(iter.page.Values()) {
24237		return nil
24238	}
24239	err = iter.page.NextWithContext(ctx)
24240	if err != nil {
24241		iter.i--
24242		return err
24243	}
24244	iter.i = 0
24245	return nil
24246}
24247
24248// Next advances to the next value.  If there was an error making
24249// the request the iterator does not advance and the error is returned.
24250// Deprecated: Use NextWithContext() instead.
24251func (iter *SubnetListResultIterator) Next() error {
24252	return iter.NextWithContext(context.Background())
24253}
24254
24255// NotDone returns true if the enumeration should be started or is not yet complete.
24256func (iter SubnetListResultIterator) NotDone() bool {
24257	return iter.page.NotDone() && iter.i < len(iter.page.Values())
24258}
24259
24260// Response returns the raw server response from the last page request.
24261func (iter SubnetListResultIterator) Response() SubnetListResult {
24262	return iter.page.Response()
24263}
24264
24265// Value returns the current value or a zero-initialized value if the
24266// iterator has advanced beyond the end of the collection.
24267func (iter SubnetListResultIterator) Value() Subnet {
24268	if !iter.page.NotDone() {
24269		return Subnet{}
24270	}
24271	return iter.page.Values()[iter.i]
24272}
24273
24274// Creates a new instance of the SubnetListResultIterator type.
24275func NewSubnetListResultIterator(page SubnetListResultPage) SubnetListResultIterator {
24276	return SubnetListResultIterator{page: page}
24277}
24278
24279// IsEmpty returns true if the ListResult contains no values.
24280func (slr SubnetListResult) IsEmpty() bool {
24281	return slr.Value == nil || len(*slr.Value) == 0
24282}
24283
24284// hasNextLink returns true if the NextLink is not empty.
24285func (slr SubnetListResult) hasNextLink() bool {
24286	return slr.NextLink != nil && len(*slr.NextLink) != 0
24287}
24288
24289// subnetListResultPreparer prepares a request to retrieve the next set of results.
24290// It returns nil if no more results exist.
24291func (slr SubnetListResult) subnetListResultPreparer(ctx context.Context) (*http.Request, error) {
24292	if !slr.hasNextLink() {
24293		return nil, nil
24294	}
24295	return autorest.Prepare((&http.Request{}).WithContext(ctx),
24296		autorest.AsJSON(),
24297		autorest.AsGet(),
24298		autorest.WithBaseURL(to.String(slr.NextLink)))
24299}
24300
24301// SubnetListResultPage contains a page of Subnet values.
24302type SubnetListResultPage struct {
24303	fn  func(context.Context, SubnetListResult) (SubnetListResult, error)
24304	slr SubnetListResult
24305}
24306
24307// NextWithContext advances to the next page of values.  If there was an error making
24308// the request the page does not advance and the error is returned.
24309func (page *SubnetListResultPage) NextWithContext(ctx context.Context) (err error) {
24310	if tracing.IsEnabled() {
24311		ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultPage.NextWithContext")
24312		defer func() {
24313			sc := -1
24314			if page.Response().Response.Response != nil {
24315				sc = page.Response().Response.Response.StatusCode
24316			}
24317			tracing.EndSpan(ctx, sc, err)
24318		}()
24319	}
24320	for {
24321		next, err := page.fn(ctx, page.slr)
24322		if err != nil {
24323			return err
24324		}
24325		page.slr = next
24326		if !next.hasNextLink() || !next.IsEmpty() {
24327			break
24328		}
24329	}
24330	return nil
24331}
24332
24333// Next advances to the next page of values.  If there was an error making
24334// the request the page does not advance and the error is returned.
24335// Deprecated: Use NextWithContext() instead.
24336func (page *SubnetListResultPage) Next() error {
24337	return page.NextWithContext(context.Background())
24338}
24339
24340// NotDone returns true if the page enumeration should be started or is not yet complete.
24341func (page SubnetListResultPage) NotDone() bool {
24342	return !page.slr.IsEmpty()
24343}
24344
24345// Response returns the raw server response from the last page request.
24346func (page SubnetListResultPage) Response() SubnetListResult {
24347	return page.slr
24348}
24349
24350// Values returns the slice of values for the current page or nil if there are no values.
24351func (page SubnetListResultPage) Values() []Subnet {
24352	if page.slr.IsEmpty() {
24353		return nil
24354	}
24355	return *page.slr.Value
24356}
24357
24358// Creates a new instance of the SubnetListResultPage type.
24359func NewSubnetListResultPage(cur SubnetListResult, getNextPage func(context.Context, SubnetListResult) (SubnetListResult, error)) SubnetListResultPage {
24360	return SubnetListResultPage{
24361		fn:  getNextPage,
24362		slr: cur,
24363	}
24364}
24365
24366// SubnetPropertiesFormat properties of the subnet.
24367type SubnetPropertiesFormat struct {
24368	// AddressPrefix - The address prefix for the subnet.
24369	AddressPrefix *string `json:"addressPrefix,omitempty"`
24370	// AddressPrefixes - List of  address prefixes for the subnet.
24371	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
24372	// NetworkSecurityGroup - The reference of the NetworkSecurityGroup resource.
24373	NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"`
24374	// RouteTable - The reference of the RouteTable resource.
24375	RouteTable *RouteTable `json:"routeTable,omitempty"`
24376	// ServiceEndpoints - An array of service endpoints.
24377	ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"`
24378	// ServiceEndpointPolicies - An array of service endpoint policies.
24379	ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"`
24380	// InterfaceEndpoints - READ-ONLY; An array of references to interface endpoints
24381	InterfaceEndpoints *[]InterfaceEndpoint `json:"interfaceEndpoints,omitempty"`
24382	// IPConfigurations - READ-ONLY; Gets an array of references to the network interface IP configurations using subnet.
24383	IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"`
24384	// IPConfigurationProfiles - READ-ONLY; Array of IP configuration profiles which reference this subnet.
24385	IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"`
24386	// ResourceNavigationLinks - Gets an array of references to the external resources using subnet.
24387	ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"`
24388	// ServiceAssociationLinks - Gets an array of references to services injecting into this subnet.
24389	ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"`
24390	// Delegations - Gets an array of references to the delegations on the subnet.
24391	Delegations *[]Delegation `json:"delegations,omitempty"`
24392	// Purpose - READ-ONLY; A read-only string identifying the intention of use for this subnet based on delegations and other user-defined properties.
24393	Purpose *string `json:"purpose,omitempty"`
24394	// ProvisioningState - The provisioning state of the resource.
24395	ProvisioningState *string `json:"provisioningState,omitempty"`
24396}
24397
24398// MarshalJSON is the custom marshaler for SubnetPropertiesFormat.
24399func (spf SubnetPropertiesFormat) MarshalJSON() ([]byte, error) {
24400	objectMap := make(map[string]interface{})
24401	if spf.AddressPrefix != nil {
24402		objectMap["addressPrefix"] = spf.AddressPrefix
24403	}
24404	if spf.AddressPrefixes != nil {
24405		objectMap["addressPrefixes"] = spf.AddressPrefixes
24406	}
24407	if spf.NetworkSecurityGroup != nil {
24408		objectMap["networkSecurityGroup"] = spf.NetworkSecurityGroup
24409	}
24410	if spf.RouteTable != nil {
24411		objectMap["routeTable"] = spf.RouteTable
24412	}
24413	if spf.ServiceEndpoints != nil {
24414		objectMap["serviceEndpoints"] = spf.ServiceEndpoints
24415	}
24416	if spf.ServiceEndpointPolicies != nil {
24417		objectMap["serviceEndpointPolicies"] = spf.ServiceEndpointPolicies
24418	}
24419	if spf.ResourceNavigationLinks != nil {
24420		objectMap["resourceNavigationLinks"] = spf.ResourceNavigationLinks
24421	}
24422	if spf.ServiceAssociationLinks != nil {
24423		objectMap["serviceAssociationLinks"] = spf.ServiceAssociationLinks
24424	}
24425	if spf.Delegations != nil {
24426		objectMap["delegations"] = spf.Delegations
24427	}
24428	if spf.ProvisioningState != nil {
24429		objectMap["provisioningState"] = spf.ProvisioningState
24430	}
24431	return json.Marshal(objectMap)
24432}
24433
24434// SubnetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
24435// operation.
24436type SubnetsCreateOrUpdateFuture struct {
24437	azure.FutureAPI
24438	// Result returns the result of the asynchronous operation.
24439	// If the operation has not completed it will return an error.
24440	Result func(SubnetsClient) (Subnet, error)
24441}
24442
24443// UnmarshalJSON is the custom unmarshaller for CreateFuture.
24444func (future *SubnetsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
24445	var azFuture azure.Future
24446	if err := json.Unmarshal(body, &azFuture); err != nil {
24447		return err
24448	}
24449	future.FutureAPI = &azFuture
24450	future.Result = future.result
24451	return nil
24452}
24453
24454// result is the default implementation for SubnetsCreateOrUpdateFuture.Result.
24455func (future *SubnetsCreateOrUpdateFuture) result(client SubnetsClient) (s Subnet, err error) {
24456	var done bool
24457	done, err = future.DoneWithContext(context.Background(), client)
24458	if err != nil {
24459		err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
24460		return
24461	}
24462	if !done {
24463		s.Response.Response = future.Response()
24464		err = azure.NewAsyncOpIncompleteError("network.SubnetsCreateOrUpdateFuture")
24465		return
24466	}
24467	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
24468	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
24469		s, err = client.CreateOrUpdateResponder(s.Response.Response)
24470		if err != nil {
24471			err = autorest.NewErrorWithError(err, "network.SubnetsCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
24472		}
24473	}
24474	return
24475}
24476
24477// SubnetsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
24478// operation.
24479type SubnetsDeleteFuture struct {
24480	azure.FutureAPI
24481	// Result returns the result of the asynchronous operation.
24482	// If the operation has not completed it will return an error.
24483	Result func(SubnetsClient) (autorest.Response, error)
24484}
24485
24486// UnmarshalJSON is the custom unmarshaller for CreateFuture.
24487func (future *SubnetsDeleteFuture) UnmarshalJSON(body []byte) error {
24488	var azFuture azure.Future
24489	if err := json.Unmarshal(body, &azFuture); err != nil {
24490		return err
24491	}
24492	future.FutureAPI = &azFuture
24493	future.Result = future.result
24494	return nil
24495}
24496
24497// result is the default implementation for SubnetsDeleteFuture.Result.
24498func (future *SubnetsDeleteFuture) result(client SubnetsClient) (ar autorest.Response, err error) {
24499	var done bool
24500	done, err = future.DoneWithContext(context.Background(), client)
24501	if err != nil {
24502		err = autorest.NewErrorWithError(err, "network.SubnetsDeleteFuture", "Result", future.Response(), "Polling failure")
24503		return
24504	}
24505	if !done {
24506		ar.Response = future.Response()
24507		err = azure.NewAsyncOpIncompleteError("network.SubnetsDeleteFuture")
24508		return
24509	}
24510	ar.Response = future.Response()
24511	return
24512}
24513
24514// SubResource reference to another subresource.
24515type SubResource struct {
24516	// ID - Resource ID.
24517	ID *string `json:"id,omitempty"`
24518}
24519
24520// TagsObject tags object for patch operations.
24521type TagsObject struct {
24522	// Tags - Resource tags.
24523	Tags map[string]*string `json:"tags"`
24524}
24525
24526// MarshalJSON is the custom marshaler for TagsObject.
24527func (toVar TagsObject) MarshalJSON() ([]byte, error) {
24528	objectMap := make(map[string]interface{})
24529	if toVar.Tags != nil {
24530		objectMap["tags"] = toVar.Tags
24531	}
24532	return json.Marshal(objectMap)
24533}
24534
24535// Topology topology of the specified resource group.
24536type Topology struct {
24537	autorest.Response `json:"-"`
24538	// ID - READ-ONLY; GUID representing the operation id.
24539	ID *string `json:"id,omitempty"`
24540	// CreatedDateTime - READ-ONLY; The datetime when the topology was initially created for the resource group.
24541	CreatedDateTime *date.Time `json:"createdDateTime,omitempty"`
24542	// LastModified - READ-ONLY; The datetime when the topology was last modified.
24543	LastModified *date.Time          `json:"lastModified,omitempty"`
24544	Resources    *[]TopologyResource `json:"resources,omitempty"`
24545}
24546
24547// MarshalJSON is the custom marshaler for Topology.
24548func (t Topology) MarshalJSON() ([]byte, error) {
24549	objectMap := make(map[string]interface{})
24550	if t.Resources != nil {
24551		objectMap["resources"] = t.Resources
24552	}
24553	return json.Marshal(objectMap)
24554}
24555
24556// TopologyAssociation resources that have an association with the parent resource.
24557type TopologyAssociation struct {
24558	// Name - The name of the resource that is associated with the parent resource.
24559	Name *string `json:"name,omitempty"`
24560	// ResourceID - The ID of the resource that is associated with the parent resource.
24561	ResourceID *string `json:"resourceId,omitempty"`
24562	// AssociationType - The association type of the child resource to the parent resource. Possible values include: 'Associated', 'Contains'
24563	AssociationType AssociationType `json:"associationType,omitempty"`
24564}
24565
24566// TopologyParameters parameters that define the representation of topology.
24567type TopologyParameters struct {
24568	// TargetResourceGroupName - The name of the target resource group to perform topology on.
24569	TargetResourceGroupName *string `json:"targetResourceGroupName,omitempty"`
24570	// TargetVirtualNetwork - The reference of the Virtual Network resource.
24571	TargetVirtualNetwork *SubResource `json:"targetVirtualNetwork,omitempty"`
24572	// TargetSubnet - The reference of the Subnet resource.
24573	TargetSubnet *SubResource `json:"targetSubnet,omitempty"`
24574}
24575
24576// TopologyResource the network resource topology information for the given resource group.
24577type TopologyResource struct {
24578	// Name - Name of the resource.
24579	Name *string `json:"name,omitempty"`
24580	// ID - ID of the resource.
24581	ID *string `json:"id,omitempty"`
24582	// Location - Resource location.
24583	Location *string `json:"location,omitempty"`
24584	// Associations - Holds the associations the resource has with other resources in the resource group.
24585	Associations *[]TopologyAssociation `json:"associations,omitempty"`
24586}
24587
24588// TrafficAnalyticsConfigurationProperties parameters that define the configuration of traffic analytics.
24589type TrafficAnalyticsConfigurationProperties struct {
24590	// Enabled - Flag to enable/disable traffic analytics.
24591	Enabled *bool `json:"enabled,omitempty"`
24592	// WorkspaceID - The resource guid of the attached workspace
24593	WorkspaceID *string `json:"workspaceId,omitempty"`
24594	// WorkspaceRegion - The location of the attached workspace
24595	WorkspaceRegion *string `json:"workspaceRegion,omitempty"`
24596	// WorkspaceResourceID - Resource Id of the attached workspace
24597	WorkspaceResourceID *string `json:"workspaceResourceId,omitempty"`
24598}
24599
24600// TrafficAnalyticsProperties parameters that define the configuration of traffic analytics.
24601type TrafficAnalyticsProperties struct {
24602	NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"`
24603}
24604
24605// TroubleshootingDetails information gained from troubleshooting of specified resource.
24606type TroubleshootingDetails struct {
24607	// ID - The id of the get troubleshoot operation.
24608	ID *string `json:"id,omitempty"`
24609	// ReasonType - Reason type of failure.
24610	ReasonType *string `json:"reasonType,omitempty"`
24611	// Summary - A summary of troubleshooting.
24612	Summary *string `json:"summary,omitempty"`
24613	// Detail - Details on troubleshooting results.
24614	Detail *string `json:"detail,omitempty"`
24615	// RecommendedActions - List of recommended actions.
24616	RecommendedActions *[]TroubleshootingRecommendedActions `json:"recommendedActions,omitempty"`
24617}
24618
24619// TroubleshootingParameters parameters that define the resource to troubleshoot.
24620type TroubleshootingParameters struct {
24621	// TargetResourceID - The target resource to troubleshoot.
24622	TargetResourceID           *string `json:"targetResourceId,omitempty"`
24623	*TroubleshootingProperties `json:"properties,omitempty"`
24624}
24625
24626// MarshalJSON is the custom marshaler for TroubleshootingParameters.
24627func (tp TroubleshootingParameters) MarshalJSON() ([]byte, error) {
24628	objectMap := make(map[string]interface{})
24629	if tp.TargetResourceID != nil {
24630		objectMap["targetResourceId"] = tp.TargetResourceID
24631	}
24632	if tp.TroubleshootingProperties != nil {
24633		objectMap["properties"] = tp.TroubleshootingProperties
24634	}
24635	return json.Marshal(objectMap)
24636}
24637
24638// UnmarshalJSON is the custom unmarshaler for TroubleshootingParameters struct.
24639func (tp *TroubleshootingParameters) UnmarshalJSON(body []byte) error {
24640	var m map[string]*json.RawMessage
24641	err := json.Unmarshal(body, &m)
24642	if err != nil {
24643		return err
24644	}
24645	for k, v := range m {
24646		switch k {
24647		case "targetResourceId":
24648			if v != nil {
24649				var targetResourceID string
24650				err = json.Unmarshal(*v, &targetResourceID)
24651				if err != nil {
24652					return err
24653				}
24654				tp.TargetResourceID = &targetResourceID
24655			}
24656		case "properties":
24657			if v != nil {
24658				var troubleshootingProperties TroubleshootingProperties
24659				err = json.Unmarshal(*v, &troubleshootingProperties)
24660				if err != nil {
24661					return err
24662				}
24663				tp.TroubleshootingProperties = &troubleshootingProperties
24664			}
24665		}
24666	}
24667
24668	return nil
24669}
24670
24671// TroubleshootingProperties storage location provided for troubleshoot.
24672type TroubleshootingProperties struct {
24673	// StorageID - The ID for the storage account to save the troubleshoot result.
24674	StorageID *string `json:"storageId,omitempty"`
24675	// StoragePath - The path to the blob to save the troubleshoot result in.
24676	StoragePath *string `json:"storagePath,omitempty"`
24677}
24678
24679// TroubleshootingRecommendedActions recommended actions based on discovered issues.
24680type TroubleshootingRecommendedActions struct {
24681	// ActionID - ID of the recommended action.
24682	ActionID *string `json:"actionId,omitempty"`
24683	// ActionText - Description of recommended actions.
24684	ActionText *string `json:"actionText,omitempty"`
24685	// ActionURI - The uri linking to a documentation for the recommended troubleshooting actions.
24686	ActionURI *string `json:"actionUri,omitempty"`
24687	// ActionURIText - The information from the URI for the recommended troubleshooting actions.
24688	ActionURIText *string `json:"actionUriText,omitempty"`
24689}
24690
24691// TroubleshootingResult troubleshooting information gained from specified resource.
24692type TroubleshootingResult struct {
24693	autorest.Response `json:"-"`
24694	// StartTime - The start time of the troubleshooting.
24695	StartTime *date.Time `json:"startTime,omitempty"`
24696	// EndTime - The end time of the troubleshooting.
24697	EndTime *date.Time `json:"endTime,omitempty"`
24698	// Code - The result code of the troubleshooting.
24699	Code *string `json:"code,omitempty"`
24700	// Results - Information from troubleshooting.
24701	Results *[]TroubleshootingDetails `json:"results,omitempty"`
24702}
24703
24704// TunnelConnectionHealth virtualNetworkGatewayConnection properties
24705type TunnelConnectionHealth struct {
24706	// Tunnel - READ-ONLY; Tunnel name.
24707	Tunnel *string `json:"tunnel,omitempty"`
24708	// ConnectionStatus - READ-ONLY; Virtual network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
24709	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
24710	// IngressBytesTransferred - READ-ONLY; The Ingress Bytes Transferred in this connection
24711	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
24712	// EgressBytesTransferred - READ-ONLY; The Egress Bytes Transferred in this connection
24713	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
24714	// LastConnectionEstablishedUtcTime - READ-ONLY; The time at which connection was established in Utc format.
24715	LastConnectionEstablishedUtcTime *string `json:"lastConnectionEstablishedUtcTime,omitempty"`
24716}
24717
24718// MarshalJSON is the custom marshaler for TunnelConnectionHealth.
24719func (tch TunnelConnectionHealth) MarshalJSON() ([]byte, error) {
24720	objectMap := make(map[string]interface{})
24721	return json.Marshal(objectMap)
24722}
24723
24724// Usage describes network resource usage.
24725type Usage struct {
24726	// ID - READ-ONLY; Resource identifier.
24727	ID *string `json:"id,omitempty"`
24728	// Unit - An enum describing the unit of measurement.
24729	Unit *string `json:"unit,omitempty"`
24730	// CurrentValue - The current value of the usage.
24731	CurrentValue *int64 `json:"currentValue,omitempty"`
24732	// Limit - The limit of usage.
24733	Limit *int64 `json:"limit,omitempty"`
24734	// Name - The name of the type of usage.
24735	Name *UsageName `json:"name,omitempty"`
24736}
24737
24738// MarshalJSON is the custom marshaler for Usage.
24739func (u Usage) MarshalJSON() ([]byte, error) {
24740	objectMap := make(map[string]interface{})
24741	if u.Unit != nil {
24742		objectMap["unit"] = u.Unit
24743	}
24744	if u.CurrentValue != nil {
24745		objectMap["currentValue"] = u.CurrentValue
24746	}
24747	if u.Limit != nil {
24748		objectMap["limit"] = u.Limit
24749	}
24750	if u.Name != nil {
24751		objectMap["name"] = u.Name
24752	}
24753	return json.Marshal(objectMap)
24754}
24755
24756// UsageName the usage names.
24757type UsageName struct {
24758	// Value - A string describing the resource name.
24759	Value *string `json:"value,omitempty"`
24760	// LocalizedValue - A localized string describing the resource name.
24761	LocalizedValue *string `json:"localizedValue,omitempty"`
24762}
24763
24764// UsagesListResult the list usages operation response.
24765type UsagesListResult struct {
24766	autorest.Response `json:"-"`
24767	// Value - The list network resource usages.
24768	Value *[]Usage `json:"value,omitempty"`
24769	// NextLink - URL to get the next set of results.
24770	NextLink *string `json:"nextLink,omitempty"`
24771}
24772
24773// UsagesListResultIterator provides access to a complete listing of Usage values.
24774type UsagesListResultIterator struct {
24775	i    int
24776	page UsagesListResultPage
24777}
24778
24779// NextWithContext advances to the next value.  If there was an error making
24780// the request the iterator does not advance and the error is returned.
24781func (iter *UsagesListResultIterator) NextWithContext(ctx context.Context) (err error) {
24782	if tracing.IsEnabled() {
24783		ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultIterator.NextWithContext")
24784		defer func() {
24785			sc := -1
24786			if iter.Response().Response.Response != nil {
24787				sc = iter.Response().Response.Response.StatusCode
24788			}
24789			tracing.EndSpan(ctx, sc, err)
24790		}()
24791	}
24792	iter.i++
24793	if iter.i < len(iter.page.Values()) {
24794		return nil
24795	}
24796	err = iter.page.NextWithContext(ctx)
24797	if err != nil {
24798		iter.i--
24799		return err
24800	}
24801	iter.i = 0
24802	return nil
24803}
24804
24805// Next advances to the next value.  If there was an error making
24806// the request the iterator does not advance and the error is returned.
24807// Deprecated: Use NextWithContext() instead.
24808func (iter *UsagesListResultIterator) Next() error {
24809	return iter.NextWithContext(context.Background())
24810}
24811
24812// NotDone returns true if the enumeration should be started or is not yet complete.
24813func (iter UsagesListResultIterator) NotDone() bool {
24814	return iter.page.NotDone() && iter.i < len(iter.page.Values())
24815}
24816
24817// Response returns the raw server response from the last page request.
24818func (iter UsagesListResultIterator) Response() UsagesListResult {
24819	return iter.page.Response()
24820}
24821
24822// Value returns the current value or a zero-initialized value if the
24823// iterator has advanced beyond the end of the collection.
24824func (iter UsagesListResultIterator) Value() Usage {
24825	if !iter.page.NotDone() {
24826		return Usage{}
24827	}
24828	return iter.page.Values()[iter.i]
24829}
24830
24831// Creates a new instance of the UsagesListResultIterator type.
24832func NewUsagesListResultIterator(page UsagesListResultPage) UsagesListResultIterator {
24833	return UsagesListResultIterator{page: page}
24834}
24835
24836// IsEmpty returns true if the ListResult contains no values.
24837func (ulr UsagesListResult) IsEmpty() bool {
24838	return ulr.Value == nil || len(*ulr.Value) == 0
24839}
24840
24841// hasNextLink returns true if the NextLink is not empty.
24842func (ulr UsagesListResult) hasNextLink() bool {
24843	return ulr.NextLink != nil && len(*ulr.NextLink) != 0
24844}
24845
24846// usagesListResultPreparer prepares a request to retrieve the next set of results.
24847// It returns nil if no more results exist.
24848func (ulr UsagesListResult) usagesListResultPreparer(ctx context.Context) (*http.Request, error) {
24849	if !ulr.hasNextLink() {
24850		return nil, nil
24851	}
24852	return autorest.Prepare((&http.Request{}).WithContext(ctx),
24853		autorest.AsJSON(),
24854		autorest.AsGet(),
24855		autorest.WithBaseURL(to.String(ulr.NextLink)))
24856}
24857
24858// UsagesListResultPage contains a page of Usage values.
24859type UsagesListResultPage struct {
24860	fn  func(context.Context, UsagesListResult) (UsagesListResult, error)
24861	ulr UsagesListResult
24862}
24863
24864// NextWithContext advances to the next page of values.  If there was an error making
24865// the request the page does not advance and the error is returned.
24866func (page *UsagesListResultPage) NextWithContext(ctx context.Context) (err error) {
24867	if tracing.IsEnabled() {
24868		ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultPage.NextWithContext")
24869		defer func() {
24870			sc := -1
24871			if page.Response().Response.Response != nil {
24872				sc = page.Response().Response.Response.StatusCode
24873			}
24874			tracing.EndSpan(ctx, sc, err)
24875		}()
24876	}
24877	for {
24878		next, err := page.fn(ctx, page.ulr)
24879		if err != nil {
24880			return err
24881		}
24882		page.ulr = next
24883		if !next.hasNextLink() || !next.IsEmpty() {
24884			break
24885		}
24886	}
24887	return nil
24888}
24889
24890// Next advances to the next page of values.  If there was an error making
24891// the request the page does not advance and the error is returned.
24892// Deprecated: Use NextWithContext() instead.
24893func (page *UsagesListResultPage) Next() error {
24894	return page.NextWithContext(context.Background())
24895}
24896
24897// NotDone returns true if the page enumeration should be started or is not yet complete.
24898func (page UsagesListResultPage) NotDone() bool {
24899	return !page.ulr.IsEmpty()
24900}
24901
24902// Response returns the raw server response from the last page request.
24903func (page UsagesListResultPage) Response() UsagesListResult {
24904	return page.ulr
24905}
24906
24907// Values returns the slice of values for the current page or nil if there are no values.
24908func (page UsagesListResultPage) Values() []Usage {
24909	if page.ulr.IsEmpty() {
24910		return nil
24911	}
24912	return *page.ulr.Value
24913}
24914
24915// Creates a new instance of the UsagesListResultPage type.
24916func NewUsagesListResultPage(cur UsagesListResult, getNextPage func(context.Context, UsagesListResult) (UsagesListResult, error)) UsagesListResultPage {
24917	return UsagesListResultPage{
24918		fn:  getNextPage,
24919		ulr: cur,
24920	}
24921}
24922
24923// VerificationIPFlowParameters parameters that define the IP flow to be verified.
24924type VerificationIPFlowParameters struct {
24925	// TargetResourceID - The ID of the target resource to perform next-hop on.
24926	TargetResourceID *string `json:"targetResourceId,omitempty"`
24927	// Direction - The direction of the packet represented as a 5-tuple. Possible values include: 'Inbound', 'Outbound'
24928	Direction Direction `json:"direction,omitempty"`
24929	// Protocol - Protocol to be verified on. Possible values include: 'IPFlowProtocolTCP', 'IPFlowProtocolUDP'
24930	Protocol IPFlowProtocol `json:"protocol,omitempty"`
24931	// 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.
24932	LocalPort *string `json:"localPort,omitempty"`
24933	// 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.
24934	RemotePort *string `json:"remotePort,omitempty"`
24935	// LocalIPAddress - The local IP address. Acceptable values are valid IPv4 addresses.
24936	LocalIPAddress *string `json:"localIPAddress,omitempty"`
24937	// RemoteIPAddress - The remote IP address. Acceptable values are valid IPv4 addresses.
24938	RemoteIPAddress *string `json:"remoteIPAddress,omitempty"`
24939	// 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).
24940	TargetNicResourceID *string `json:"targetNicResourceId,omitempty"`
24941}
24942
24943// VerificationIPFlowResult results of IP flow verification on the target resource.
24944type VerificationIPFlowResult struct {
24945	autorest.Response `json:"-"`
24946	// Access - Indicates whether the traffic is allowed or denied. Possible values include: 'Allow', 'Deny'
24947	Access Access `json:"access,omitempty"`
24948	// RuleName - Name of the rule. If input is not matched against any security rule, it is not displayed.
24949	RuleName *string `json:"ruleName,omitempty"`
24950}
24951
24952// VirtualHub virtualHub Resource.
24953type VirtualHub struct {
24954	autorest.Response     `json:"-"`
24955	*VirtualHubProperties `json:"properties,omitempty"`
24956	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
24957	Etag *string `json:"etag,omitempty"`
24958	// ID - Resource ID.
24959	ID *string `json:"id,omitempty"`
24960	// Name - READ-ONLY; Resource name.
24961	Name *string `json:"name,omitempty"`
24962	// Type - READ-ONLY; Resource type.
24963	Type *string `json:"type,omitempty"`
24964	// Location - Resource location.
24965	Location *string `json:"location,omitempty"`
24966	// Tags - Resource tags.
24967	Tags map[string]*string `json:"tags"`
24968}
24969
24970// MarshalJSON is the custom marshaler for VirtualHub.
24971func (vh VirtualHub) MarshalJSON() ([]byte, error) {
24972	objectMap := make(map[string]interface{})
24973	if vh.VirtualHubProperties != nil {
24974		objectMap["properties"] = vh.VirtualHubProperties
24975	}
24976	if vh.ID != nil {
24977		objectMap["id"] = vh.ID
24978	}
24979	if vh.Location != nil {
24980		objectMap["location"] = vh.Location
24981	}
24982	if vh.Tags != nil {
24983		objectMap["tags"] = vh.Tags
24984	}
24985	return json.Marshal(objectMap)
24986}
24987
24988// UnmarshalJSON is the custom unmarshaler for VirtualHub struct.
24989func (vh *VirtualHub) UnmarshalJSON(body []byte) error {
24990	var m map[string]*json.RawMessage
24991	err := json.Unmarshal(body, &m)
24992	if err != nil {
24993		return err
24994	}
24995	for k, v := range m {
24996		switch k {
24997		case "properties":
24998			if v != nil {
24999				var virtualHubProperties VirtualHubProperties
25000				err = json.Unmarshal(*v, &virtualHubProperties)
25001				if err != nil {
25002					return err
25003				}
25004				vh.VirtualHubProperties = &virtualHubProperties
25005			}
25006		case "etag":
25007			if v != nil {
25008				var etag string
25009				err = json.Unmarshal(*v, &etag)
25010				if err != nil {
25011					return err
25012				}
25013				vh.Etag = &etag
25014			}
25015		case "id":
25016			if v != nil {
25017				var ID string
25018				err = json.Unmarshal(*v, &ID)
25019				if err != nil {
25020					return err
25021				}
25022				vh.ID = &ID
25023			}
25024		case "name":
25025			if v != nil {
25026				var name string
25027				err = json.Unmarshal(*v, &name)
25028				if err != nil {
25029					return err
25030				}
25031				vh.Name = &name
25032			}
25033		case "type":
25034			if v != nil {
25035				var typeVar string
25036				err = json.Unmarshal(*v, &typeVar)
25037				if err != nil {
25038					return err
25039				}
25040				vh.Type = &typeVar
25041			}
25042		case "location":
25043			if v != nil {
25044				var location string
25045				err = json.Unmarshal(*v, &location)
25046				if err != nil {
25047					return err
25048				}
25049				vh.Location = &location
25050			}
25051		case "tags":
25052			if v != nil {
25053				var tags map[string]*string
25054				err = json.Unmarshal(*v, &tags)
25055				if err != nil {
25056					return err
25057				}
25058				vh.Tags = tags
25059			}
25060		}
25061	}
25062
25063	return nil
25064}
25065
25066// VirtualHubID virtual Hub identifier.
25067type VirtualHubID struct {
25068	// 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.
25069	ID *string `json:"id,omitempty"`
25070}
25071
25072// VirtualHubProperties parameters for VirtualHub
25073type VirtualHubProperties struct {
25074	// VirtualWan - The VirtualWAN to which the VirtualHub belongs
25075	VirtualWan *SubResource `json:"virtualWan,omitempty"`
25076	// VpnGateway - The VpnGateway associated with this VirtualHub
25077	VpnGateway *SubResource `json:"vpnGateway,omitempty"`
25078	// P2SVpnGateway - The P2SVpnGateway associated with this VirtualHub
25079	P2SVpnGateway *SubResource `json:"p2SVpnGateway,omitempty"`
25080	// ExpressRouteGateway - The expressRouteGateway associated with this VirtualHub
25081	ExpressRouteGateway *SubResource `json:"expressRouteGateway,omitempty"`
25082	// VirtualNetworkConnections - list of all vnet connections with this VirtualHub.
25083	VirtualNetworkConnections *[]HubVirtualNetworkConnection `json:"virtualNetworkConnections,omitempty"`
25084	// AddressPrefix - Address-prefix for this VirtualHub.
25085	AddressPrefix *string `json:"addressPrefix,omitempty"`
25086	// RouteTable - The routeTable associated with this virtual hub.
25087	RouteTable *VirtualHubRouteTable `json:"routeTable,omitempty"`
25088	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
25089	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
25090}
25091
25092// VirtualHubRoute virtualHub route
25093type VirtualHubRoute struct {
25094	// AddressPrefixes - list of all addressPrefixes.
25095	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
25096	// NextHopIPAddress - NextHop ip address.
25097	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
25098}
25099
25100// VirtualHubRouteTable virtualHub route table
25101type VirtualHubRouteTable struct {
25102	// Routes - list of all routes.
25103	Routes *[]VirtualHubRoute `json:"routes,omitempty"`
25104}
25105
25106// VirtualHubsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
25107// long-running operation.
25108type VirtualHubsCreateOrUpdateFuture struct {
25109	azure.FutureAPI
25110	// Result returns the result of the asynchronous operation.
25111	// If the operation has not completed it will return an error.
25112	Result func(VirtualHubsClient) (VirtualHub, error)
25113}
25114
25115// UnmarshalJSON is the custom unmarshaller for CreateFuture.
25116func (future *VirtualHubsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
25117	var azFuture azure.Future
25118	if err := json.Unmarshal(body, &azFuture); err != nil {
25119		return err
25120	}
25121	future.FutureAPI = &azFuture
25122	future.Result = future.result
25123	return nil
25124}
25125
25126// result is the default implementation for VirtualHubsCreateOrUpdateFuture.Result.
25127func (future *VirtualHubsCreateOrUpdateFuture) result(client VirtualHubsClient) (vh VirtualHub, err error) {
25128	var done bool
25129	done, err = future.DoneWithContext(context.Background(), client)
25130	if err != nil {
25131		err = autorest.NewErrorWithError(err, "network.VirtualHubsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
25132		return
25133	}
25134	if !done {
25135		vh.Response.Response = future.Response()
25136		err = azure.NewAsyncOpIncompleteError("network.VirtualHubsCreateOrUpdateFuture")
25137		return
25138	}
25139	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
25140	if vh.Response.Response, err = future.GetResult(sender); err == nil && vh.Response.Response.StatusCode != http.StatusNoContent {
25141		vh, err = client.CreateOrUpdateResponder(vh.Response.Response)
25142		if err != nil {
25143			err = autorest.NewErrorWithError(err, "network.VirtualHubsCreateOrUpdateFuture", "Result", vh.Response.Response, "Failure responding to request")
25144		}
25145	}
25146	return
25147}
25148
25149// VirtualHubsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
25150// operation.
25151type VirtualHubsDeleteFuture struct {
25152	azure.FutureAPI
25153	// Result returns the result of the asynchronous operation.
25154	// If the operation has not completed it will return an error.
25155	Result func(VirtualHubsClient) (autorest.Response, error)
25156}
25157
25158// UnmarshalJSON is the custom unmarshaller for CreateFuture.
25159func (future *VirtualHubsDeleteFuture) UnmarshalJSON(body []byte) error {
25160	var azFuture azure.Future
25161	if err := json.Unmarshal(body, &azFuture); err != nil {
25162		return err
25163	}
25164	future.FutureAPI = &azFuture
25165	future.Result = future.result
25166	return nil
25167}
25168
25169// result is the default implementation for VirtualHubsDeleteFuture.Result.
25170func (future *VirtualHubsDeleteFuture) result(client VirtualHubsClient) (ar autorest.Response, err error) {
25171	var done bool
25172	done, err = future.DoneWithContext(context.Background(), client)
25173	if err != nil {
25174		err = autorest.NewErrorWithError(err, "network.VirtualHubsDeleteFuture", "Result", future.Response(), "Polling failure")
25175		return
25176	}
25177	if !done {
25178		ar.Response = future.Response()
25179		err = azure.NewAsyncOpIncompleteError("network.VirtualHubsDeleteFuture")
25180		return
25181	}
25182	ar.Response = future.Response()
25183	return
25184}
25185
25186// VirtualHubsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
25187// operation.
25188type VirtualHubsUpdateTagsFuture struct {
25189	azure.FutureAPI
25190	// Result returns the result of the asynchronous operation.
25191	// If the operation has not completed it will return an error.
25192	Result func(VirtualHubsClient) (VirtualHub, error)
25193}
25194
25195// UnmarshalJSON is the custom unmarshaller for CreateFuture.
25196func (future *VirtualHubsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
25197	var azFuture azure.Future
25198	if err := json.Unmarshal(body, &azFuture); err != nil {
25199		return err
25200	}
25201	future.FutureAPI = &azFuture
25202	future.Result = future.result
25203	return nil
25204}
25205
25206// result is the default implementation for VirtualHubsUpdateTagsFuture.Result.
25207func (future *VirtualHubsUpdateTagsFuture) result(client VirtualHubsClient) (vh VirtualHub, err error) {
25208	var done bool
25209	done, err = future.DoneWithContext(context.Background(), client)
25210	if err != nil {
25211		err = autorest.NewErrorWithError(err, "network.VirtualHubsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
25212		return
25213	}
25214	if !done {
25215		vh.Response.Response = future.Response()
25216		err = azure.NewAsyncOpIncompleteError("network.VirtualHubsUpdateTagsFuture")
25217		return
25218	}
25219	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
25220	if vh.Response.Response, err = future.GetResult(sender); err == nil && vh.Response.Response.StatusCode != http.StatusNoContent {
25221		vh, err = client.UpdateTagsResponder(vh.Response.Response)
25222		if err != nil {
25223			err = autorest.NewErrorWithError(err, "network.VirtualHubsUpdateTagsFuture", "Result", vh.Response.Response, "Failure responding to request")
25224		}
25225	}
25226	return
25227}
25228
25229// VirtualNetwork virtual Network resource.
25230type VirtualNetwork struct {
25231	autorest.Response `json:"-"`
25232	// VirtualNetworkPropertiesFormat - Properties of the virtual network.
25233	*VirtualNetworkPropertiesFormat `json:"properties,omitempty"`
25234	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
25235	Etag *string `json:"etag,omitempty"`
25236	// ID - Resource ID.
25237	ID *string `json:"id,omitempty"`
25238	// Name - READ-ONLY; Resource name.
25239	Name *string `json:"name,omitempty"`
25240	// Type - READ-ONLY; Resource type.
25241	Type *string `json:"type,omitempty"`
25242	// Location - Resource location.
25243	Location *string `json:"location,omitempty"`
25244	// Tags - Resource tags.
25245	Tags map[string]*string `json:"tags"`
25246}
25247
25248// MarshalJSON is the custom marshaler for VirtualNetwork.
25249func (vn VirtualNetwork) MarshalJSON() ([]byte, error) {
25250	objectMap := make(map[string]interface{})
25251	if vn.VirtualNetworkPropertiesFormat != nil {
25252		objectMap["properties"] = vn.VirtualNetworkPropertiesFormat
25253	}
25254	if vn.Etag != nil {
25255		objectMap["etag"] = vn.Etag
25256	}
25257	if vn.ID != nil {
25258		objectMap["id"] = vn.ID
25259	}
25260	if vn.Location != nil {
25261		objectMap["location"] = vn.Location
25262	}
25263	if vn.Tags != nil {
25264		objectMap["tags"] = vn.Tags
25265	}
25266	return json.Marshal(objectMap)
25267}
25268
25269// UnmarshalJSON is the custom unmarshaler for VirtualNetwork struct.
25270func (vn *VirtualNetwork) UnmarshalJSON(body []byte) error {
25271	var m map[string]*json.RawMessage
25272	err := json.Unmarshal(body, &m)
25273	if err != nil {
25274		return err
25275	}
25276	for k, v := range m {
25277		switch k {
25278		case "properties":
25279			if v != nil {
25280				var virtualNetworkPropertiesFormat VirtualNetworkPropertiesFormat
25281				err = json.Unmarshal(*v, &virtualNetworkPropertiesFormat)
25282				if err != nil {
25283					return err
25284				}
25285				vn.VirtualNetworkPropertiesFormat = &virtualNetworkPropertiesFormat
25286			}
25287		case "etag":
25288			if v != nil {
25289				var etag string
25290				err = json.Unmarshal(*v, &etag)
25291				if err != nil {
25292					return err
25293				}
25294				vn.Etag = &etag
25295			}
25296		case "id":
25297			if v != nil {
25298				var ID string
25299				err = json.Unmarshal(*v, &ID)
25300				if err != nil {
25301					return err
25302				}
25303				vn.ID = &ID
25304			}
25305		case "name":
25306			if v != nil {
25307				var name string
25308				err = json.Unmarshal(*v, &name)
25309				if err != nil {
25310					return err
25311				}
25312				vn.Name = &name
25313			}
25314		case "type":
25315			if v != nil {
25316				var typeVar string
25317				err = json.Unmarshal(*v, &typeVar)
25318				if err != nil {
25319					return err
25320				}
25321				vn.Type = &typeVar
25322			}
25323		case "location":
25324			if v != nil {
25325				var location string
25326				err = json.Unmarshal(*v, &location)
25327				if err != nil {
25328					return err
25329				}
25330				vn.Location = &location
25331			}
25332		case "tags":
25333			if v != nil {
25334				var tags map[string]*string
25335				err = json.Unmarshal(*v, &tags)
25336				if err != nil {
25337					return err
25338				}
25339				vn.Tags = tags
25340			}
25341		}
25342	}
25343
25344	return nil
25345}
25346
25347// VirtualNetworkConnectionGatewayReference a reference to VirtualNetworkGateway or LocalNetworkGateway
25348// resource.
25349type VirtualNetworkConnectionGatewayReference struct {
25350	// ID - The ID of VirtualNetworkGateway or LocalNetworkGateway resource.
25351	ID *string `json:"id,omitempty"`
25352}
25353
25354// VirtualNetworkGateway a common class for general resource information
25355type VirtualNetworkGateway struct {
25356	autorest.Response `json:"-"`
25357	// VirtualNetworkGatewayPropertiesFormat - Properties of the virtual network gateway.
25358	*VirtualNetworkGatewayPropertiesFormat `json:"properties,omitempty"`
25359	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
25360	Etag *string `json:"etag,omitempty"`
25361	// ID - Resource ID.
25362	ID *string `json:"id,omitempty"`
25363	// Name - READ-ONLY; Resource name.
25364	Name *string `json:"name,omitempty"`
25365	// Type - READ-ONLY; Resource type.
25366	Type *string `json:"type,omitempty"`
25367	// Location - Resource location.
25368	Location *string `json:"location,omitempty"`
25369	// Tags - Resource tags.
25370	Tags map[string]*string `json:"tags"`
25371}
25372
25373// MarshalJSON is the custom marshaler for VirtualNetworkGateway.
25374func (vng VirtualNetworkGateway) MarshalJSON() ([]byte, error) {
25375	objectMap := make(map[string]interface{})
25376	if vng.VirtualNetworkGatewayPropertiesFormat != nil {
25377		objectMap["properties"] = vng.VirtualNetworkGatewayPropertiesFormat
25378	}
25379	if vng.Etag != nil {
25380		objectMap["etag"] = vng.Etag
25381	}
25382	if vng.ID != nil {
25383		objectMap["id"] = vng.ID
25384	}
25385	if vng.Location != nil {
25386		objectMap["location"] = vng.Location
25387	}
25388	if vng.Tags != nil {
25389		objectMap["tags"] = vng.Tags
25390	}
25391	return json.Marshal(objectMap)
25392}
25393
25394// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGateway struct.
25395func (vng *VirtualNetworkGateway) UnmarshalJSON(body []byte) error {
25396	var m map[string]*json.RawMessage
25397	err := json.Unmarshal(body, &m)
25398	if err != nil {
25399		return err
25400	}
25401	for k, v := range m {
25402		switch k {
25403		case "properties":
25404			if v != nil {
25405				var virtualNetworkGatewayPropertiesFormat VirtualNetworkGatewayPropertiesFormat
25406				err = json.Unmarshal(*v, &virtualNetworkGatewayPropertiesFormat)
25407				if err != nil {
25408					return err
25409				}
25410				vng.VirtualNetworkGatewayPropertiesFormat = &virtualNetworkGatewayPropertiesFormat
25411			}
25412		case "etag":
25413			if v != nil {
25414				var etag string
25415				err = json.Unmarshal(*v, &etag)
25416				if err != nil {
25417					return err
25418				}
25419				vng.Etag = &etag
25420			}
25421		case "id":
25422			if v != nil {
25423				var ID string
25424				err = json.Unmarshal(*v, &ID)
25425				if err != nil {
25426					return err
25427				}
25428				vng.ID = &ID
25429			}
25430		case "name":
25431			if v != nil {
25432				var name string
25433				err = json.Unmarshal(*v, &name)
25434				if err != nil {
25435					return err
25436				}
25437				vng.Name = &name
25438			}
25439		case "type":
25440			if v != nil {
25441				var typeVar string
25442				err = json.Unmarshal(*v, &typeVar)
25443				if err != nil {
25444					return err
25445				}
25446				vng.Type = &typeVar
25447			}
25448		case "location":
25449			if v != nil {
25450				var location string
25451				err = json.Unmarshal(*v, &location)
25452				if err != nil {
25453					return err
25454				}
25455				vng.Location = &location
25456			}
25457		case "tags":
25458			if v != nil {
25459				var tags map[string]*string
25460				err = json.Unmarshal(*v, &tags)
25461				if err != nil {
25462					return err
25463				}
25464				vng.Tags = tags
25465			}
25466		}
25467	}
25468
25469	return nil
25470}
25471
25472// VirtualNetworkGatewayConnection a common class for general resource information
25473type VirtualNetworkGatewayConnection struct {
25474	autorest.Response `json:"-"`
25475	// VirtualNetworkGatewayConnectionPropertiesFormat - Properties of the virtual network gateway connection.
25476	*VirtualNetworkGatewayConnectionPropertiesFormat `json:"properties,omitempty"`
25477	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
25478	Etag *string `json:"etag,omitempty"`
25479	// ID - Resource ID.
25480	ID *string `json:"id,omitempty"`
25481	// Name - READ-ONLY; Resource name.
25482	Name *string `json:"name,omitempty"`
25483	// Type - READ-ONLY; Resource type.
25484	Type *string `json:"type,omitempty"`
25485	// Location - Resource location.
25486	Location *string `json:"location,omitempty"`
25487	// Tags - Resource tags.
25488	Tags map[string]*string `json:"tags"`
25489}
25490
25491// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnection.
25492func (vngc VirtualNetworkGatewayConnection) MarshalJSON() ([]byte, error) {
25493	objectMap := make(map[string]interface{})
25494	if vngc.VirtualNetworkGatewayConnectionPropertiesFormat != nil {
25495		objectMap["properties"] = vngc.VirtualNetworkGatewayConnectionPropertiesFormat
25496	}
25497	if vngc.Etag != nil {
25498		objectMap["etag"] = vngc.Etag
25499	}
25500	if vngc.ID != nil {
25501		objectMap["id"] = vngc.ID
25502	}
25503	if vngc.Location != nil {
25504		objectMap["location"] = vngc.Location
25505	}
25506	if vngc.Tags != nil {
25507		objectMap["tags"] = vngc.Tags
25508	}
25509	return json.Marshal(objectMap)
25510}
25511
25512// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnection struct.
25513func (vngc *VirtualNetworkGatewayConnection) UnmarshalJSON(body []byte) error {
25514	var m map[string]*json.RawMessage
25515	err := json.Unmarshal(body, &m)
25516	if err != nil {
25517		return err
25518	}
25519	for k, v := range m {
25520		switch k {
25521		case "properties":
25522			if v != nil {
25523				var virtualNetworkGatewayConnectionPropertiesFormat VirtualNetworkGatewayConnectionPropertiesFormat
25524				err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionPropertiesFormat)
25525				if err != nil {
25526					return err
25527				}
25528				vngc.VirtualNetworkGatewayConnectionPropertiesFormat = &virtualNetworkGatewayConnectionPropertiesFormat
25529			}
25530		case "etag":
25531			if v != nil {
25532				var etag string
25533				err = json.Unmarshal(*v, &etag)
25534				if err != nil {
25535					return err
25536				}
25537				vngc.Etag = &etag
25538			}
25539		case "id":
25540			if v != nil {
25541				var ID string
25542				err = json.Unmarshal(*v, &ID)
25543				if err != nil {
25544					return err
25545				}
25546				vngc.ID = &ID
25547			}
25548		case "name":
25549			if v != nil {
25550				var name string
25551				err = json.Unmarshal(*v, &name)
25552				if err != nil {
25553					return err
25554				}
25555				vngc.Name = &name
25556			}
25557		case "type":
25558			if v != nil {
25559				var typeVar string
25560				err = json.Unmarshal(*v, &typeVar)
25561				if err != nil {
25562					return err
25563				}
25564				vngc.Type = &typeVar
25565			}
25566		case "location":
25567			if v != nil {
25568				var location string
25569				err = json.Unmarshal(*v, &location)
25570				if err != nil {
25571					return err
25572				}
25573				vngc.Location = &location
25574			}
25575		case "tags":
25576			if v != nil {
25577				var tags map[string]*string
25578				err = json.Unmarshal(*v, &tags)
25579				if err != nil {
25580					return err
25581				}
25582				vngc.Tags = tags
25583			}
25584		}
25585	}
25586
25587	return nil
25588}
25589
25590// VirtualNetworkGatewayConnectionListEntity a common class for general resource information
25591type VirtualNetworkGatewayConnectionListEntity struct {
25592	// VirtualNetworkGatewayConnectionListEntityPropertiesFormat - Properties of the virtual network gateway connection.
25593	*VirtualNetworkGatewayConnectionListEntityPropertiesFormat `json:"properties,omitempty"`
25594	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
25595	Etag *string `json:"etag,omitempty"`
25596	// ID - Resource ID.
25597	ID *string `json:"id,omitempty"`
25598	// Name - READ-ONLY; Resource name.
25599	Name *string `json:"name,omitempty"`
25600	// Type - READ-ONLY; Resource type.
25601	Type *string `json:"type,omitempty"`
25602	// Location - Resource location.
25603	Location *string `json:"location,omitempty"`
25604	// Tags - Resource tags.
25605	Tags map[string]*string `json:"tags"`
25606}
25607
25608// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListEntity.
25609func (vngcle VirtualNetworkGatewayConnectionListEntity) MarshalJSON() ([]byte, error) {
25610	objectMap := make(map[string]interface{})
25611	if vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat != nil {
25612		objectMap["properties"] = vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat
25613	}
25614	if vngcle.Etag != nil {
25615		objectMap["etag"] = vngcle.Etag
25616	}
25617	if vngcle.ID != nil {
25618		objectMap["id"] = vngcle.ID
25619	}
25620	if vngcle.Location != nil {
25621		objectMap["location"] = vngcle.Location
25622	}
25623	if vngcle.Tags != nil {
25624		objectMap["tags"] = vngcle.Tags
25625	}
25626	return json.Marshal(objectMap)
25627}
25628
25629// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnectionListEntity struct.
25630func (vngcle *VirtualNetworkGatewayConnectionListEntity) UnmarshalJSON(body []byte) error {
25631	var m map[string]*json.RawMessage
25632	err := json.Unmarshal(body, &m)
25633	if err != nil {
25634		return err
25635	}
25636	for k, v := range m {
25637		switch k {
25638		case "properties":
25639			if v != nil {
25640				var virtualNetworkGatewayConnectionListEntityPropertiesFormat VirtualNetworkGatewayConnectionListEntityPropertiesFormat
25641				err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionListEntityPropertiesFormat)
25642				if err != nil {
25643					return err
25644				}
25645				vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat = &virtualNetworkGatewayConnectionListEntityPropertiesFormat
25646			}
25647		case "etag":
25648			if v != nil {
25649				var etag string
25650				err = json.Unmarshal(*v, &etag)
25651				if err != nil {
25652					return err
25653				}
25654				vngcle.Etag = &etag
25655			}
25656		case "id":
25657			if v != nil {
25658				var ID string
25659				err = json.Unmarshal(*v, &ID)
25660				if err != nil {
25661					return err
25662				}
25663				vngcle.ID = &ID
25664			}
25665		case "name":
25666			if v != nil {
25667				var name string
25668				err = json.Unmarshal(*v, &name)
25669				if err != nil {
25670					return err
25671				}
25672				vngcle.Name = &name
25673			}
25674		case "type":
25675			if v != nil {
25676				var typeVar string
25677				err = json.Unmarshal(*v, &typeVar)
25678				if err != nil {
25679					return err
25680				}
25681				vngcle.Type = &typeVar
25682			}
25683		case "location":
25684			if v != nil {
25685				var location string
25686				err = json.Unmarshal(*v, &location)
25687				if err != nil {
25688					return err
25689				}
25690				vngcle.Location = &location
25691			}
25692		case "tags":
25693			if v != nil {
25694				var tags map[string]*string
25695				err = json.Unmarshal(*v, &tags)
25696				if err != nil {
25697					return err
25698				}
25699				vngcle.Tags = tags
25700			}
25701		}
25702	}
25703
25704	return nil
25705}
25706
25707// VirtualNetworkGatewayConnectionListEntityPropertiesFormat virtualNetworkGatewayConnection properties
25708type VirtualNetworkGatewayConnectionListEntityPropertiesFormat struct {
25709	// AuthorizationKey - The authorizationKey.
25710	AuthorizationKey *string `json:"authorizationKey,omitempty"`
25711	// VirtualNetworkGateway1 - The reference to virtual network gateway resource.
25712	VirtualNetworkGateway1 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway1,omitempty"`
25713	// VirtualNetworkGateway2 - The reference to virtual network gateway resource.
25714	VirtualNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway2,omitempty"`
25715	// LocalNetworkGateway2 - The reference to local network gateway resource.
25716	LocalNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"localNetworkGateway2,omitempty"`
25717	// ConnectionType - Gateway connection type. Possible values are: 'IPsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'
25718	ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"`
25719	// ConnectionProtocol - Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1'
25720	ConnectionProtocol VirtualNetworkGatewayConnectionProtocol `json:"connectionProtocol,omitempty"`
25721	// RoutingWeight - The routing weight.
25722	RoutingWeight *int32 `json:"routingWeight,omitempty"`
25723	// SharedKey - The IPSec shared key.
25724	SharedKey *string `json:"sharedKey,omitempty"`
25725	// ConnectionStatus - READ-ONLY; Virtual network Gateway connection status. Possible values are 'Unknown', 'Connecting', 'Connected' and 'NotConnected'. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
25726	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
25727	// TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status.
25728	TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"`
25729	// EgressBytesTransferred - READ-ONLY; The egress bytes transferred in this connection.
25730	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
25731	// IngressBytesTransferred - READ-ONLY; The ingress bytes transferred in this connection.
25732	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
25733	// Peer - The reference to peerings resource.
25734	Peer *SubResource `json:"peer,omitempty"`
25735	// EnableBgp - EnableBgp flag
25736	EnableBgp *bool `json:"enableBgp,omitempty"`
25737	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
25738	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
25739	// IpsecPolicies - The IPSec Policies to be considered by this connection.
25740	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
25741	// ResourceGUID - The resource GUID property of the VirtualNetworkGatewayConnection resource.
25742	ResourceGUID *string `json:"resourceGuid,omitempty"`
25743	// ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGatewayConnection resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
25744	ProvisioningState *string `json:"provisioningState,omitempty"`
25745	// ExpressRouteGatewayBypass - Bypass ExpressRoute Gateway for data forwarding
25746	ExpressRouteGatewayBypass *bool `json:"expressRouteGatewayBypass,omitempty"`
25747}
25748
25749// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListEntityPropertiesFormat.
25750func (vngclepf VirtualNetworkGatewayConnectionListEntityPropertiesFormat) MarshalJSON() ([]byte, error) {
25751	objectMap := make(map[string]interface{})
25752	if vngclepf.AuthorizationKey != nil {
25753		objectMap["authorizationKey"] = vngclepf.AuthorizationKey
25754	}
25755	if vngclepf.VirtualNetworkGateway1 != nil {
25756		objectMap["virtualNetworkGateway1"] = vngclepf.VirtualNetworkGateway1
25757	}
25758	if vngclepf.VirtualNetworkGateway2 != nil {
25759		objectMap["virtualNetworkGateway2"] = vngclepf.VirtualNetworkGateway2
25760	}
25761	if vngclepf.LocalNetworkGateway2 != nil {
25762		objectMap["localNetworkGateway2"] = vngclepf.LocalNetworkGateway2
25763	}
25764	if vngclepf.ConnectionType != "" {
25765		objectMap["connectionType"] = vngclepf.ConnectionType
25766	}
25767	if vngclepf.ConnectionProtocol != "" {
25768		objectMap["connectionProtocol"] = vngclepf.ConnectionProtocol
25769	}
25770	if vngclepf.RoutingWeight != nil {
25771		objectMap["routingWeight"] = vngclepf.RoutingWeight
25772	}
25773	if vngclepf.SharedKey != nil {
25774		objectMap["sharedKey"] = vngclepf.SharedKey
25775	}
25776	if vngclepf.Peer != nil {
25777		objectMap["peer"] = vngclepf.Peer
25778	}
25779	if vngclepf.EnableBgp != nil {
25780		objectMap["enableBgp"] = vngclepf.EnableBgp
25781	}
25782	if vngclepf.UsePolicyBasedTrafficSelectors != nil {
25783		objectMap["usePolicyBasedTrafficSelectors"] = vngclepf.UsePolicyBasedTrafficSelectors
25784	}
25785	if vngclepf.IpsecPolicies != nil {
25786		objectMap["ipsecPolicies"] = vngclepf.IpsecPolicies
25787	}
25788	if vngclepf.ResourceGUID != nil {
25789		objectMap["resourceGuid"] = vngclepf.ResourceGUID
25790	}
25791	if vngclepf.ExpressRouteGatewayBypass != nil {
25792		objectMap["expressRouteGatewayBypass"] = vngclepf.ExpressRouteGatewayBypass
25793	}
25794	return json.Marshal(objectMap)
25795}
25796
25797// VirtualNetworkGatewayConnectionListResult response for the ListVirtualNetworkGatewayConnections API
25798// service call
25799type VirtualNetworkGatewayConnectionListResult struct {
25800	autorest.Response `json:"-"`
25801	// Value - Gets a list of VirtualNetworkGatewayConnection resources that exists in a resource group.
25802	Value *[]VirtualNetworkGatewayConnection `json:"value,omitempty"`
25803	// NextLink - READ-ONLY; The URL to get the next set of results.
25804	NextLink *string `json:"nextLink,omitempty"`
25805}
25806
25807// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListResult.
25808func (vngclr VirtualNetworkGatewayConnectionListResult) MarshalJSON() ([]byte, error) {
25809	objectMap := make(map[string]interface{})
25810	if vngclr.Value != nil {
25811		objectMap["value"] = vngclr.Value
25812	}
25813	return json.Marshal(objectMap)
25814}
25815
25816// VirtualNetworkGatewayConnectionListResultIterator provides access to a complete listing of
25817// VirtualNetworkGatewayConnection values.
25818type VirtualNetworkGatewayConnectionListResultIterator struct {
25819	i    int
25820	page VirtualNetworkGatewayConnectionListResultPage
25821}
25822
25823// NextWithContext advances to the next value.  If there was an error making
25824// the request the iterator does not advance and the error is returned.
25825func (iter *VirtualNetworkGatewayConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
25826	if tracing.IsEnabled() {
25827		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultIterator.NextWithContext")
25828		defer func() {
25829			sc := -1
25830			if iter.Response().Response.Response != nil {
25831				sc = iter.Response().Response.Response.StatusCode
25832			}
25833			tracing.EndSpan(ctx, sc, err)
25834		}()
25835	}
25836	iter.i++
25837	if iter.i < len(iter.page.Values()) {
25838		return nil
25839	}
25840	err = iter.page.NextWithContext(ctx)
25841	if err != nil {
25842		iter.i--
25843		return err
25844	}
25845	iter.i = 0
25846	return nil
25847}
25848
25849// Next advances to the next value.  If there was an error making
25850// the request the iterator does not advance and the error is returned.
25851// Deprecated: Use NextWithContext() instead.
25852func (iter *VirtualNetworkGatewayConnectionListResultIterator) Next() error {
25853	return iter.NextWithContext(context.Background())
25854}
25855
25856// NotDone returns true if the enumeration should be started or is not yet complete.
25857func (iter VirtualNetworkGatewayConnectionListResultIterator) NotDone() bool {
25858	return iter.page.NotDone() && iter.i < len(iter.page.Values())
25859}
25860
25861// Response returns the raw server response from the last page request.
25862func (iter VirtualNetworkGatewayConnectionListResultIterator) Response() VirtualNetworkGatewayConnectionListResult {
25863	return iter.page.Response()
25864}
25865
25866// Value returns the current value or a zero-initialized value if the
25867// iterator has advanced beyond the end of the collection.
25868func (iter VirtualNetworkGatewayConnectionListResultIterator) Value() VirtualNetworkGatewayConnection {
25869	if !iter.page.NotDone() {
25870		return VirtualNetworkGatewayConnection{}
25871	}
25872	return iter.page.Values()[iter.i]
25873}
25874
25875// Creates a new instance of the VirtualNetworkGatewayConnectionListResultIterator type.
25876func NewVirtualNetworkGatewayConnectionListResultIterator(page VirtualNetworkGatewayConnectionListResultPage) VirtualNetworkGatewayConnectionListResultIterator {
25877	return VirtualNetworkGatewayConnectionListResultIterator{page: page}
25878}
25879
25880// IsEmpty returns true if the ListResult contains no values.
25881func (vngclr VirtualNetworkGatewayConnectionListResult) IsEmpty() bool {
25882	return vngclr.Value == nil || len(*vngclr.Value) == 0
25883}
25884
25885// hasNextLink returns true if the NextLink is not empty.
25886func (vngclr VirtualNetworkGatewayConnectionListResult) hasNextLink() bool {
25887	return vngclr.NextLink != nil && len(*vngclr.NextLink) != 0
25888}
25889
25890// virtualNetworkGatewayConnectionListResultPreparer prepares a request to retrieve the next set of results.
25891// It returns nil if no more results exist.
25892func (vngclr VirtualNetworkGatewayConnectionListResult) virtualNetworkGatewayConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
25893	if !vngclr.hasNextLink() {
25894		return nil, nil
25895	}
25896	return autorest.Prepare((&http.Request{}).WithContext(ctx),
25897		autorest.AsJSON(),
25898		autorest.AsGet(),
25899		autorest.WithBaseURL(to.String(vngclr.NextLink)))
25900}
25901
25902// VirtualNetworkGatewayConnectionListResultPage contains a page of VirtualNetworkGatewayConnection values.
25903type VirtualNetworkGatewayConnectionListResultPage struct {
25904	fn     func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)
25905	vngclr VirtualNetworkGatewayConnectionListResult
25906}
25907
25908// NextWithContext advances to the next page of values.  If there was an error making
25909// the request the page does not advance and the error is returned.
25910func (page *VirtualNetworkGatewayConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
25911	if tracing.IsEnabled() {
25912		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultPage.NextWithContext")
25913		defer func() {
25914			sc := -1
25915			if page.Response().Response.Response != nil {
25916				sc = page.Response().Response.Response.StatusCode
25917			}
25918			tracing.EndSpan(ctx, sc, err)
25919		}()
25920	}
25921	for {
25922		next, err := page.fn(ctx, page.vngclr)
25923		if err != nil {
25924			return err
25925		}
25926		page.vngclr = next
25927		if !next.hasNextLink() || !next.IsEmpty() {
25928			break
25929		}
25930	}
25931	return nil
25932}
25933
25934// Next advances to the next page of values.  If there was an error making
25935// the request the page does not advance and the error is returned.
25936// Deprecated: Use NextWithContext() instead.
25937func (page *VirtualNetworkGatewayConnectionListResultPage) Next() error {
25938	return page.NextWithContext(context.Background())
25939}
25940
25941// NotDone returns true if the page enumeration should be started or is not yet complete.
25942func (page VirtualNetworkGatewayConnectionListResultPage) NotDone() bool {
25943	return !page.vngclr.IsEmpty()
25944}
25945
25946// Response returns the raw server response from the last page request.
25947func (page VirtualNetworkGatewayConnectionListResultPage) Response() VirtualNetworkGatewayConnectionListResult {
25948	return page.vngclr
25949}
25950
25951// Values returns the slice of values for the current page or nil if there are no values.
25952func (page VirtualNetworkGatewayConnectionListResultPage) Values() []VirtualNetworkGatewayConnection {
25953	if page.vngclr.IsEmpty() {
25954		return nil
25955	}
25956	return *page.vngclr.Value
25957}
25958
25959// Creates a new instance of the VirtualNetworkGatewayConnectionListResultPage type.
25960func NewVirtualNetworkGatewayConnectionListResultPage(cur VirtualNetworkGatewayConnectionListResult, getNextPage func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)) VirtualNetworkGatewayConnectionListResultPage {
25961	return VirtualNetworkGatewayConnectionListResultPage{
25962		fn:     getNextPage,
25963		vngclr: cur,
25964	}
25965}
25966
25967// VirtualNetworkGatewayConnectionPropertiesFormat virtualNetworkGatewayConnection properties
25968type VirtualNetworkGatewayConnectionPropertiesFormat struct {
25969	// AuthorizationKey - The authorizationKey.
25970	AuthorizationKey *string `json:"authorizationKey,omitempty"`
25971	// VirtualNetworkGateway1 - The reference to virtual network gateway resource.
25972	VirtualNetworkGateway1 *VirtualNetworkGateway `json:"virtualNetworkGateway1,omitempty"`
25973	// VirtualNetworkGateway2 - The reference to virtual network gateway resource.
25974	VirtualNetworkGateway2 *VirtualNetworkGateway `json:"virtualNetworkGateway2,omitempty"`
25975	// LocalNetworkGateway2 - The reference to local network gateway resource.
25976	LocalNetworkGateway2 *LocalNetworkGateway `json:"localNetworkGateway2,omitempty"`
25977	// ConnectionType - Gateway connection type. Possible values are: 'IPsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'
25978	ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"`
25979	// ConnectionProtocol - Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1'
25980	ConnectionProtocol VirtualNetworkGatewayConnectionProtocol `json:"connectionProtocol,omitempty"`
25981	// RoutingWeight - The routing weight.
25982	RoutingWeight *int32 `json:"routingWeight,omitempty"`
25983	// SharedKey - The IPSec shared key.
25984	SharedKey *string `json:"sharedKey,omitempty"`
25985	// ConnectionStatus - READ-ONLY; Virtual network Gateway connection status. Possible values are 'Unknown', 'Connecting', 'Connected' and 'NotConnected'. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
25986	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
25987	// TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status.
25988	TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"`
25989	// EgressBytesTransferred - READ-ONLY; The egress bytes transferred in this connection.
25990	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
25991	// IngressBytesTransferred - READ-ONLY; The ingress bytes transferred in this connection.
25992	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
25993	// Peer - The reference to peerings resource.
25994	Peer *SubResource `json:"peer,omitempty"`
25995	// EnableBgp - EnableBgp flag
25996	EnableBgp *bool `json:"enableBgp,omitempty"`
25997	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
25998	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
25999	// IpsecPolicies - The IPSec Policies to be considered by this connection.
26000	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
26001	// ResourceGUID - The resource GUID property of the VirtualNetworkGatewayConnection resource.
26002	ResourceGUID *string `json:"resourceGuid,omitempty"`
26003	// ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGatewayConnection resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
26004	ProvisioningState *string `json:"provisioningState,omitempty"`
26005	// ExpressRouteGatewayBypass - Bypass ExpressRoute Gateway for data forwarding
26006	ExpressRouteGatewayBypass *bool `json:"expressRouteGatewayBypass,omitempty"`
26007}
26008
26009// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionPropertiesFormat.
26010func (vngcpf VirtualNetworkGatewayConnectionPropertiesFormat) MarshalJSON() ([]byte, error) {
26011	objectMap := make(map[string]interface{})
26012	if vngcpf.AuthorizationKey != nil {
26013		objectMap["authorizationKey"] = vngcpf.AuthorizationKey
26014	}
26015	if vngcpf.VirtualNetworkGateway1 != nil {
26016		objectMap["virtualNetworkGateway1"] = vngcpf.VirtualNetworkGateway1
26017	}
26018	if vngcpf.VirtualNetworkGateway2 != nil {
26019		objectMap["virtualNetworkGateway2"] = vngcpf.VirtualNetworkGateway2
26020	}
26021	if vngcpf.LocalNetworkGateway2 != nil {
26022		objectMap["localNetworkGateway2"] = vngcpf.LocalNetworkGateway2
26023	}
26024	if vngcpf.ConnectionType != "" {
26025		objectMap["connectionType"] = vngcpf.ConnectionType
26026	}
26027	if vngcpf.ConnectionProtocol != "" {
26028		objectMap["connectionProtocol"] = vngcpf.ConnectionProtocol
26029	}
26030	if vngcpf.RoutingWeight != nil {
26031		objectMap["routingWeight"] = vngcpf.RoutingWeight
26032	}
26033	if vngcpf.SharedKey != nil {
26034		objectMap["sharedKey"] = vngcpf.SharedKey
26035	}
26036	if vngcpf.Peer != nil {
26037		objectMap["peer"] = vngcpf.Peer
26038	}
26039	if vngcpf.EnableBgp != nil {
26040		objectMap["enableBgp"] = vngcpf.EnableBgp
26041	}
26042	if vngcpf.UsePolicyBasedTrafficSelectors != nil {
26043		objectMap["usePolicyBasedTrafficSelectors"] = vngcpf.UsePolicyBasedTrafficSelectors
26044	}
26045	if vngcpf.IpsecPolicies != nil {
26046		objectMap["ipsecPolicies"] = vngcpf.IpsecPolicies
26047	}
26048	if vngcpf.ResourceGUID != nil {
26049		objectMap["resourceGuid"] = vngcpf.ResourceGUID
26050	}
26051	if vngcpf.ExpressRouteGatewayBypass != nil {
26052		objectMap["expressRouteGatewayBypass"] = vngcpf.ExpressRouteGatewayBypass
26053	}
26054	return json.Marshal(objectMap)
26055}
26056
26057// VirtualNetworkGatewayConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
26058// results of a long-running operation.
26059type VirtualNetworkGatewayConnectionsCreateOrUpdateFuture struct {
26060	azure.FutureAPI
26061	// Result returns the result of the asynchronous operation.
26062	// If the operation has not completed it will return an error.
26063	Result func(VirtualNetworkGatewayConnectionsClient) (VirtualNetworkGatewayConnection, error)
26064}
26065
26066// UnmarshalJSON is the custom unmarshaller for CreateFuture.
26067func (future *VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
26068	var azFuture azure.Future
26069	if err := json.Unmarshal(body, &azFuture); err != nil {
26070		return err
26071	}
26072	future.FutureAPI = &azFuture
26073	future.Result = future.result
26074	return nil
26075}
26076
26077// result is the default implementation for VirtualNetworkGatewayConnectionsCreateOrUpdateFuture.Result.
26078func (future *VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
26079	var done bool
26080	done, err = future.DoneWithContext(context.Background(), client)
26081	if err != nil {
26082		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
26083		return
26084	}
26085	if !done {
26086		vngc.Response.Response = future.Response()
26087		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture")
26088		return
26089	}
26090	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
26091	if vngc.Response.Response, err = future.GetResult(sender); err == nil && vngc.Response.Response.StatusCode != http.StatusNoContent {
26092		vngc, err = client.CreateOrUpdateResponder(vngc.Response.Response)
26093		if err != nil {
26094			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsCreateOrUpdateFuture", "Result", vngc.Response.Response, "Failure responding to request")
26095		}
26096	}
26097	return
26098}
26099
26100// VirtualNetworkGatewayConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of
26101// a long-running operation.
26102type VirtualNetworkGatewayConnectionsDeleteFuture struct {
26103	azure.FutureAPI
26104	// Result returns the result of the asynchronous operation.
26105	// If the operation has not completed it will return an error.
26106	Result func(VirtualNetworkGatewayConnectionsClient) (autorest.Response, error)
26107}
26108
26109// UnmarshalJSON is the custom unmarshaller for CreateFuture.
26110func (future *VirtualNetworkGatewayConnectionsDeleteFuture) UnmarshalJSON(body []byte) error {
26111	var azFuture azure.Future
26112	if err := json.Unmarshal(body, &azFuture); err != nil {
26113		return err
26114	}
26115	future.FutureAPI = &azFuture
26116	future.Result = future.result
26117	return nil
26118}
26119
26120// result is the default implementation for VirtualNetworkGatewayConnectionsDeleteFuture.Result.
26121func (future *VirtualNetworkGatewayConnectionsDeleteFuture) result(client VirtualNetworkGatewayConnectionsClient) (ar autorest.Response, err error) {
26122	var done bool
26123	done, err = future.DoneWithContext(context.Background(), client)
26124	if err != nil {
26125		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
26126		return
26127	}
26128	if !done {
26129		ar.Response = future.Response()
26130		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsDeleteFuture")
26131		return
26132	}
26133	ar.Response = future.Response()
26134	return
26135}
26136
26137// VirtualNetworkGatewayConnectionsResetSharedKeyFuture an abstraction for monitoring and retrieving the
26138// results of a long-running operation.
26139type VirtualNetworkGatewayConnectionsResetSharedKeyFuture struct {
26140	azure.FutureAPI
26141	// Result returns the result of the asynchronous operation.
26142	// If the operation has not completed it will return an error.
26143	Result func(VirtualNetworkGatewayConnectionsClient) (ConnectionResetSharedKey, error)
26144}
26145
26146// UnmarshalJSON is the custom unmarshaller for CreateFuture.
26147func (future *VirtualNetworkGatewayConnectionsResetSharedKeyFuture) UnmarshalJSON(body []byte) error {
26148	var azFuture azure.Future
26149	if err := json.Unmarshal(body, &azFuture); err != nil {
26150		return err
26151	}
26152	future.FutureAPI = &azFuture
26153	future.Result = future.result
26154	return nil
26155}
26156
26157// result is the default implementation for VirtualNetworkGatewayConnectionsResetSharedKeyFuture.Result.
26158func (future *VirtualNetworkGatewayConnectionsResetSharedKeyFuture) result(client VirtualNetworkGatewayConnectionsClient) (crsk ConnectionResetSharedKey, err error) {
26159	var done bool
26160	done, err = future.DoneWithContext(context.Background(), client)
26161	if err != nil {
26162		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", future.Response(), "Polling failure")
26163		return
26164	}
26165	if !done {
26166		crsk.Response.Response = future.Response()
26167		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture")
26168		return
26169	}
26170	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
26171	if crsk.Response.Response, err = future.GetResult(sender); err == nil && crsk.Response.Response.StatusCode != http.StatusNoContent {
26172		crsk, err = client.ResetSharedKeyResponder(crsk.Response.Response)
26173		if err != nil {
26174			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsResetSharedKeyFuture", "Result", crsk.Response.Response, "Failure responding to request")
26175		}
26176	}
26177	return
26178}
26179
26180// VirtualNetworkGatewayConnectionsSetSharedKeyFuture an abstraction for monitoring and retrieving the
26181// results of a long-running operation.
26182type VirtualNetworkGatewayConnectionsSetSharedKeyFuture struct {
26183	azure.FutureAPI
26184	// Result returns the result of the asynchronous operation.
26185	// If the operation has not completed it will return an error.
26186	Result func(VirtualNetworkGatewayConnectionsClient) (ConnectionSharedKey, error)
26187}
26188
26189// UnmarshalJSON is the custom unmarshaller for CreateFuture.
26190func (future *VirtualNetworkGatewayConnectionsSetSharedKeyFuture) UnmarshalJSON(body []byte) error {
26191	var azFuture azure.Future
26192	if err := json.Unmarshal(body, &azFuture); err != nil {
26193		return err
26194	}
26195	future.FutureAPI = &azFuture
26196	future.Result = future.result
26197	return nil
26198}
26199
26200// result is the default implementation for VirtualNetworkGatewayConnectionsSetSharedKeyFuture.Result.
26201func (future *VirtualNetworkGatewayConnectionsSetSharedKeyFuture) result(client VirtualNetworkGatewayConnectionsClient) (csk ConnectionSharedKey, err error) {
26202	var done bool
26203	done, err = future.DoneWithContext(context.Background(), client)
26204	if err != nil {
26205		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", future.Response(), "Polling failure")
26206		return
26207	}
26208	if !done {
26209		csk.Response.Response = future.Response()
26210		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture")
26211		return
26212	}
26213	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
26214	if csk.Response.Response, err = future.GetResult(sender); err == nil && csk.Response.Response.StatusCode != http.StatusNoContent {
26215		csk, err = client.SetSharedKeyResponder(csk.Response.Response)
26216		if err != nil {
26217			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsSetSharedKeyFuture", "Result", csk.Response.Response, "Failure responding to request")
26218		}
26219	}
26220	return
26221}
26222
26223// VirtualNetworkGatewayConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the
26224// results of a long-running operation.
26225type VirtualNetworkGatewayConnectionsUpdateTagsFuture struct {
26226	azure.FutureAPI
26227	// Result returns the result of the asynchronous operation.
26228	// If the operation has not completed it will return an error.
26229	Result func(VirtualNetworkGatewayConnectionsClient) (VirtualNetworkGatewayConnection, error)
26230}
26231
26232// UnmarshalJSON is the custom unmarshaller for CreateFuture.
26233func (future *VirtualNetworkGatewayConnectionsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
26234	var azFuture azure.Future
26235	if err := json.Unmarshal(body, &azFuture); err != nil {
26236		return err
26237	}
26238	future.FutureAPI = &azFuture
26239	future.Result = future.result
26240	return nil
26241}
26242
26243// result is the default implementation for VirtualNetworkGatewayConnectionsUpdateTagsFuture.Result.
26244func (future *VirtualNetworkGatewayConnectionsUpdateTagsFuture) result(client VirtualNetworkGatewayConnectionsClient) (vngc VirtualNetworkGatewayConnection, err error) {
26245	var done bool
26246	done, err = future.DoneWithContext(context.Background(), client)
26247	if err != nil {
26248		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
26249		return
26250	}
26251	if !done {
26252		vngc.Response.Response = future.Response()
26253		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayConnectionsUpdateTagsFuture")
26254		return
26255	}
26256	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
26257	if vngc.Response.Response, err = future.GetResult(sender); err == nil && vngc.Response.Response.StatusCode != http.StatusNoContent {
26258		vngc, err = client.UpdateTagsResponder(vngc.Response.Response)
26259		if err != nil {
26260			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsUpdateTagsFuture", "Result", vngc.Response.Response, "Failure responding to request")
26261		}
26262	}
26263	return
26264}
26265
26266// VirtualNetworkGatewayIPConfiguration IP configuration for virtual network gateway
26267type VirtualNetworkGatewayIPConfiguration struct {
26268	// VirtualNetworkGatewayIPConfigurationPropertiesFormat - Properties of the virtual network gateway ip configuration.
26269	*VirtualNetworkGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"`
26270	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
26271	Name *string `json:"name,omitempty"`
26272	// Etag - A unique read-only string that changes whenever the resource is updated.
26273	Etag *string `json:"etag,omitempty"`
26274	// ID - Resource ID.
26275	ID *string `json:"id,omitempty"`
26276}
26277
26278// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfiguration.
26279func (vngic VirtualNetworkGatewayIPConfiguration) MarshalJSON() ([]byte, error) {
26280	objectMap := make(map[string]interface{})
26281	if vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat != nil {
26282		objectMap["properties"] = vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat
26283	}
26284	if vngic.Name != nil {
26285		objectMap["name"] = vngic.Name
26286	}
26287	if vngic.Etag != nil {
26288		objectMap["etag"] = vngic.Etag
26289	}
26290	if vngic.ID != nil {
26291		objectMap["id"] = vngic.ID
26292	}
26293	return json.Marshal(objectMap)
26294}
26295
26296// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayIPConfiguration struct.
26297func (vngic *VirtualNetworkGatewayIPConfiguration) UnmarshalJSON(body []byte) error {
26298	var m map[string]*json.RawMessage
26299	err := json.Unmarshal(body, &m)
26300	if err != nil {
26301		return err
26302	}
26303	for k, v := range m {
26304		switch k {
26305		case "properties":
26306			if v != nil {
26307				var virtualNetworkGatewayIPConfigurationPropertiesFormat VirtualNetworkGatewayIPConfigurationPropertiesFormat
26308				err = json.Unmarshal(*v, &virtualNetworkGatewayIPConfigurationPropertiesFormat)
26309				if err != nil {
26310					return err
26311				}
26312				vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat = &virtualNetworkGatewayIPConfigurationPropertiesFormat
26313			}
26314		case "name":
26315			if v != nil {
26316				var name string
26317				err = json.Unmarshal(*v, &name)
26318				if err != nil {
26319					return err
26320				}
26321				vngic.Name = &name
26322			}
26323		case "etag":
26324			if v != nil {
26325				var etag string
26326				err = json.Unmarshal(*v, &etag)
26327				if err != nil {
26328					return err
26329				}
26330				vngic.Etag = &etag
26331			}
26332		case "id":
26333			if v != nil {
26334				var ID string
26335				err = json.Unmarshal(*v, &ID)
26336				if err != nil {
26337					return err
26338				}
26339				vngic.ID = &ID
26340			}
26341		}
26342	}
26343
26344	return nil
26345}
26346
26347// VirtualNetworkGatewayIPConfigurationPropertiesFormat properties of VirtualNetworkGatewayIPConfiguration
26348type VirtualNetworkGatewayIPConfigurationPropertiesFormat struct {
26349	// PrivateIPAllocationMethod - The private IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
26350	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
26351	// Subnet - The reference of the subnet resource.
26352	Subnet *SubResource `json:"subnet,omitempty"`
26353	// PublicIPAddress - The reference of the public IP resource.
26354	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
26355	// ProvisioningState - READ-ONLY; The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
26356	ProvisioningState *string `json:"provisioningState,omitempty"`
26357}
26358
26359// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfigurationPropertiesFormat.
26360func (vngicpf VirtualNetworkGatewayIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
26361	objectMap := make(map[string]interface{})
26362	if vngicpf.PrivateIPAllocationMethod != "" {
26363		objectMap["privateIPAllocationMethod"] = vngicpf.PrivateIPAllocationMethod
26364	}
26365	if vngicpf.Subnet != nil {
26366		objectMap["subnet"] = vngicpf.Subnet
26367	}
26368	if vngicpf.PublicIPAddress != nil {
26369		objectMap["publicIPAddress"] = vngicpf.PublicIPAddress
26370	}
26371	return json.Marshal(objectMap)
26372}
26373
26374// VirtualNetworkGatewayListConnectionsResult response for the VirtualNetworkGatewayListConnections API
26375// service call
26376type VirtualNetworkGatewayListConnectionsResult struct {
26377	autorest.Response `json:"-"`
26378	// Value - Gets a list of VirtualNetworkGatewayConnection resources that exists in a resource group.
26379	Value *[]VirtualNetworkGatewayConnectionListEntity `json:"value,omitempty"`
26380	// NextLink - READ-ONLY; The URL to get the next set of results.
26381	NextLink *string `json:"nextLink,omitempty"`
26382}
26383
26384// MarshalJSON is the custom marshaler for VirtualNetworkGatewayListConnectionsResult.
26385func (vnglcr VirtualNetworkGatewayListConnectionsResult) MarshalJSON() ([]byte, error) {
26386	objectMap := make(map[string]interface{})
26387	if vnglcr.Value != nil {
26388		objectMap["value"] = vnglcr.Value
26389	}
26390	return json.Marshal(objectMap)
26391}
26392
26393// VirtualNetworkGatewayListConnectionsResultIterator provides access to a complete listing of
26394// VirtualNetworkGatewayConnectionListEntity values.
26395type VirtualNetworkGatewayListConnectionsResultIterator struct {
26396	i    int
26397	page VirtualNetworkGatewayListConnectionsResultPage
26398}
26399
26400// NextWithContext advances to the next value.  If there was an error making
26401// the request the iterator does not advance and the error is returned.
26402func (iter *VirtualNetworkGatewayListConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
26403	if tracing.IsEnabled() {
26404		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultIterator.NextWithContext")
26405		defer func() {
26406			sc := -1
26407			if iter.Response().Response.Response != nil {
26408				sc = iter.Response().Response.Response.StatusCode
26409			}
26410			tracing.EndSpan(ctx, sc, err)
26411		}()
26412	}
26413	iter.i++
26414	if iter.i < len(iter.page.Values()) {
26415		return nil
26416	}
26417	err = iter.page.NextWithContext(ctx)
26418	if err != nil {
26419		iter.i--
26420		return err
26421	}
26422	iter.i = 0
26423	return nil
26424}
26425
26426// Next advances to the next value.  If there was an error making
26427// the request the iterator does not advance and the error is returned.
26428// Deprecated: Use NextWithContext() instead.
26429func (iter *VirtualNetworkGatewayListConnectionsResultIterator) Next() error {
26430	return iter.NextWithContext(context.Background())
26431}
26432
26433// NotDone returns true if the enumeration should be started or is not yet complete.
26434func (iter VirtualNetworkGatewayListConnectionsResultIterator) NotDone() bool {
26435	return iter.page.NotDone() && iter.i < len(iter.page.Values())
26436}
26437
26438// Response returns the raw server response from the last page request.
26439func (iter VirtualNetworkGatewayListConnectionsResultIterator) Response() VirtualNetworkGatewayListConnectionsResult {
26440	return iter.page.Response()
26441}
26442
26443// Value returns the current value or a zero-initialized value if the
26444// iterator has advanced beyond the end of the collection.
26445func (iter VirtualNetworkGatewayListConnectionsResultIterator) Value() VirtualNetworkGatewayConnectionListEntity {
26446	if !iter.page.NotDone() {
26447		return VirtualNetworkGatewayConnectionListEntity{}
26448	}
26449	return iter.page.Values()[iter.i]
26450}
26451
26452// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultIterator type.
26453func NewVirtualNetworkGatewayListConnectionsResultIterator(page VirtualNetworkGatewayListConnectionsResultPage) VirtualNetworkGatewayListConnectionsResultIterator {
26454	return VirtualNetworkGatewayListConnectionsResultIterator{page: page}
26455}
26456
26457// IsEmpty returns true if the ListResult contains no values.
26458func (vnglcr VirtualNetworkGatewayListConnectionsResult) IsEmpty() bool {
26459	return vnglcr.Value == nil || len(*vnglcr.Value) == 0
26460}
26461
26462// hasNextLink returns true if the NextLink is not empty.
26463func (vnglcr VirtualNetworkGatewayListConnectionsResult) hasNextLink() bool {
26464	return vnglcr.NextLink != nil && len(*vnglcr.NextLink) != 0
26465}
26466
26467// virtualNetworkGatewayListConnectionsResultPreparer prepares a request to retrieve the next set of results.
26468// It returns nil if no more results exist.
26469func (vnglcr VirtualNetworkGatewayListConnectionsResult) virtualNetworkGatewayListConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
26470	if !vnglcr.hasNextLink() {
26471		return nil, nil
26472	}
26473	return autorest.Prepare((&http.Request{}).WithContext(ctx),
26474		autorest.AsJSON(),
26475		autorest.AsGet(),
26476		autorest.WithBaseURL(to.String(vnglcr.NextLink)))
26477}
26478
26479// VirtualNetworkGatewayListConnectionsResultPage contains a page of
26480// VirtualNetworkGatewayConnectionListEntity values.
26481type VirtualNetworkGatewayListConnectionsResultPage struct {
26482	fn     func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)
26483	vnglcr VirtualNetworkGatewayListConnectionsResult
26484}
26485
26486// NextWithContext advances to the next page of values.  If there was an error making
26487// the request the page does not advance and the error is returned.
26488func (page *VirtualNetworkGatewayListConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
26489	if tracing.IsEnabled() {
26490		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultPage.NextWithContext")
26491		defer func() {
26492			sc := -1
26493			if page.Response().Response.Response != nil {
26494				sc = page.Response().Response.Response.StatusCode
26495			}
26496			tracing.EndSpan(ctx, sc, err)
26497		}()
26498	}
26499	for {
26500		next, err := page.fn(ctx, page.vnglcr)
26501		if err != nil {
26502			return err
26503		}
26504		page.vnglcr = next
26505		if !next.hasNextLink() || !next.IsEmpty() {
26506			break
26507		}
26508	}
26509	return nil
26510}
26511
26512// Next advances to the next page of values.  If there was an error making
26513// the request the page does not advance and the error is returned.
26514// Deprecated: Use NextWithContext() instead.
26515func (page *VirtualNetworkGatewayListConnectionsResultPage) Next() error {
26516	return page.NextWithContext(context.Background())
26517}
26518
26519// NotDone returns true if the page enumeration should be started or is not yet complete.
26520func (page VirtualNetworkGatewayListConnectionsResultPage) NotDone() bool {
26521	return !page.vnglcr.IsEmpty()
26522}
26523
26524// Response returns the raw server response from the last page request.
26525func (page VirtualNetworkGatewayListConnectionsResultPage) Response() VirtualNetworkGatewayListConnectionsResult {
26526	return page.vnglcr
26527}
26528
26529// Values returns the slice of values for the current page or nil if there are no values.
26530func (page VirtualNetworkGatewayListConnectionsResultPage) Values() []VirtualNetworkGatewayConnectionListEntity {
26531	if page.vnglcr.IsEmpty() {
26532		return nil
26533	}
26534	return *page.vnglcr.Value
26535}
26536
26537// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultPage type.
26538func NewVirtualNetworkGatewayListConnectionsResultPage(cur VirtualNetworkGatewayListConnectionsResult, getNextPage func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)) VirtualNetworkGatewayListConnectionsResultPage {
26539	return VirtualNetworkGatewayListConnectionsResultPage{
26540		fn:     getNextPage,
26541		vnglcr: cur,
26542	}
26543}
26544
26545// VirtualNetworkGatewayListResult response for the ListVirtualNetworkGateways API service call.
26546type VirtualNetworkGatewayListResult struct {
26547	autorest.Response `json:"-"`
26548	// Value - Gets a list of VirtualNetworkGateway resources that exists in a resource group.
26549	Value *[]VirtualNetworkGateway `json:"value,omitempty"`
26550	// NextLink - READ-ONLY; The URL to get the next set of results.
26551	NextLink *string `json:"nextLink,omitempty"`
26552}
26553
26554// MarshalJSON is the custom marshaler for VirtualNetworkGatewayListResult.
26555func (vnglr VirtualNetworkGatewayListResult) MarshalJSON() ([]byte, error) {
26556	objectMap := make(map[string]interface{})
26557	if vnglr.Value != nil {
26558		objectMap["value"] = vnglr.Value
26559	}
26560	return json.Marshal(objectMap)
26561}
26562
26563// VirtualNetworkGatewayListResultIterator provides access to a complete listing of VirtualNetworkGateway
26564// values.
26565type VirtualNetworkGatewayListResultIterator struct {
26566	i    int
26567	page VirtualNetworkGatewayListResultPage
26568}
26569
26570// NextWithContext advances to the next value.  If there was an error making
26571// the request the iterator does not advance and the error is returned.
26572func (iter *VirtualNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
26573	if tracing.IsEnabled() {
26574		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultIterator.NextWithContext")
26575		defer func() {
26576			sc := -1
26577			if iter.Response().Response.Response != nil {
26578				sc = iter.Response().Response.Response.StatusCode
26579			}
26580			tracing.EndSpan(ctx, sc, err)
26581		}()
26582	}
26583	iter.i++
26584	if iter.i < len(iter.page.Values()) {
26585		return nil
26586	}
26587	err = iter.page.NextWithContext(ctx)
26588	if err != nil {
26589		iter.i--
26590		return err
26591	}
26592	iter.i = 0
26593	return nil
26594}
26595
26596// Next advances to the next value.  If there was an error making
26597// the request the iterator does not advance and the error is returned.
26598// Deprecated: Use NextWithContext() instead.
26599func (iter *VirtualNetworkGatewayListResultIterator) Next() error {
26600	return iter.NextWithContext(context.Background())
26601}
26602
26603// NotDone returns true if the enumeration should be started or is not yet complete.
26604func (iter VirtualNetworkGatewayListResultIterator) NotDone() bool {
26605	return iter.page.NotDone() && iter.i < len(iter.page.Values())
26606}
26607
26608// Response returns the raw server response from the last page request.
26609func (iter VirtualNetworkGatewayListResultIterator) Response() VirtualNetworkGatewayListResult {
26610	return iter.page.Response()
26611}
26612
26613// Value returns the current value or a zero-initialized value if the
26614// iterator has advanced beyond the end of the collection.
26615func (iter VirtualNetworkGatewayListResultIterator) Value() VirtualNetworkGateway {
26616	if !iter.page.NotDone() {
26617		return VirtualNetworkGateway{}
26618	}
26619	return iter.page.Values()[iter.i]
26620}
26621
26622// Creates a new instance of the VirtualNetworkGatewayListResultIterator type.
26623func NewVirtualNetworkGatewayListResultIterator(page VirtualNetworkGatewayListResultPage) VirtualNetworkGatewayListResultIterator {
26624	return VirtualNetworkGatewayListResultIterator{page: page}
26625}
26626
26627// IsEmpty returns true if the ListResult contains no values.
26628func (vnglr VirtualNetworkGatewayListResult) IsEmpty() bool {
26629	return vnglr.Value == nil || len(*vnglr.Value) == 0
26630}
26631
26632// hasNextLink returns true if the NextLink is not empty.
26633func (vnglr VirtualNetworkGatewayListResult) hasNextLink() bool {
26634	return vnglr.NextLink != nil && len(*vnglr.NextLink) != 0
26635}
26636
26637// virtualNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results.
26638// It returns nil if no more results exist.
26639func (vnglr VirtualNetworkGatewayListResult) virtualNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
26640	if !vnglr.hasNextLink() {
26641		return nil, nil
26642	}
26643	return autorest.Prepare((&http.Request{}).WithContext(ctx),
26644		autorest.AsJSON(),
26645		autorest.AsGet(),
26646		autorest.WithBaseURL(to.String(vnglr.NextLink)))
26647}
26648
26649// VirtualNetworkGatewayListResultPage contains a page of VirtualNetworkGateway values.
26650type VirtualNetworkGatewayListResultPage struct {
26651	fn    func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)
26652	vnglr VirtualNetworkGatewayListResult
26653}
26654
26655// NextWithContext advances to the next page of values.  If there was an error making
26656// the request the page does not advance and the error is returned.
26657func (page *VirtualNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
26658	if tracing.IsEnabled() {
26659		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultPage.NextWithContext")
26660		defer func() {
26661			sc := -1
26662			if page.Response().Response.Response != nil {
26663				sc = page.Response().Response.Response.StatusCode
26664			}
26665			tracing.EndSpan(ctx, sc, err)
26666		}()
26667	}
26668	for {
26669		next, err := page.fn(ctx, page.vnglr)
26670		if err != nil {
26671			return err
26672		}
26673		page.vnglr = next
26674		if !next.hasNextLink() || !next.IsEmpty() {
26675			break
26676		}
26677	}
26678	return nil
26679}
26680
26681// Next advances to the next page of values.  If there was an error making
26682// the request the page does not advance and the error is returned.
26683// Deprecated: Use NextWithContext() instead.
26684func (page *VirtualNetworkGatewayListResultPage) Next() error {
26685	return page.NextWithContext(context.Background())
26686}
26687
26688// NotDone returns true if the page enumeration should be started or is not yet complete.
26689func (page VirtualNetworkGatewayListResultPage) NotDone() bool {
26690	return !page.vnglr.IsEmpty()
26691}
26692
26693// Response returns the raw server response from the last page request.
26694func (page VirtualNetworkGatewayListResultPage) Response() VirtualNetworkGatewayListResult {
26695	return page.vnglr
26696}
26697
26698// Values returns the slice of values for the current page or nil if there are no values.
26699func (page VirtualNetworkGatewayListResultPage) Values() []VirtualNetworkGateway {
26700	if page.vnglr.IsEmpty() {
26701		return nil
26702	}
26703	return *page.vnglr.Value
26704}
26705
26706// Creates a new instance of the VirtualNetworkGatewayListResultPage type.
26707func NewVirtualNetworkGatewayListResultPage(cur VirtualNetworkGatewayListResult, getNextPage func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)) VirtualNetworkGatewayListResultPage {
26708	return VirtualNetworkGatewayListResultPage{
26709		fn:    getNextPage,
26710		vnglr: cur,
26711	}
26712}
26713
26714// VirtualNetworkGatewayPropertiesFormat virtualNetworkGateway properties
26715type VirtualNetworkGatewayPropertiesFormat struct {
26716	// IPConfigurations - IP configurations for virtual network gateway.
26717	IPConfigurations *[]VirtualNetworkGatewayIPConfiguration `json:"ipConfigurations,omitempty"`
26718	// GatewayType - The type of this virtual network gateway. Possible values are: 'Vpn' and 'ExpressRoute'. Possible values include: 'VirtualNetworkGatewayTypeVpn', 'VirtualNetworkGatewayTypeExpressRoute'
26719	GatewayType VirtualNetworkGatewayType `json:"gatewayType,omitempty"`
26720	// VpnType - The type of this virtual network gateway. Possible values are: 'PolicyBased' and 'RouteBased'. Possible values include: 'PolicyBased', 'RouteBased'
26721	VpnType VpnType `json:"vpnType,omitempty"`
26722	// EnableBgp - Whether BGP is enabled for this virtual network gateway or not.
26723	EnableBgp *bool `json:"enableBgp,omitempty"`
26724	// ActiveActive - ActiveActive flag
26725	ActiveActive *bool `json:"activeActive,omitempty"`
26726	// 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.
26727	GatewayDefaultSite *SubResource `json:"gatewayDefaultSite,omitempty"`
26728	// Sku - The reference of the VirtualNetworkGatewaySku resource which represents the SKU selected for Virtual network gateway.
26729	Sku *VirtualNetworkGatewaySku `json:"sku,omitempty"`
26730	// VpnClientConfiguration - The reference of the VpnClientConfiguration resource which represents the P2S VpnClient configurations.
26731	VpnClientConfiguration *VpnClientConfiguration `json:"vpnClientConfiguration,omitempty"`
26732	// BgpSettings - Virtual network gateway's BGP speaker settings.
26733	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
26734	// ResourceGUID - The resource GUID property of the VirtualNetworkGateway resource.
26735	ResourceGUID *string `json:"resourceGuid,omitempty"`
26736	// ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
26737	ProvisioningState *string `json:"provisioningState,omitempty"`
26738}
26739
26740// MarshalJSON is the custom marshaler for VirtualNetworkGatewayPropertiesFormat.
26741func (vngpf VirtualNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
26742	objectMap := make(map[string]interface{})
26743	if vngpf.IPConfigurations != nil {
26744		objectMap["ipConfigurations"] = vngpf.IPConfigurations
26745	}
26746	if vngpf.GatewayType != "" {
26747		objectMap["gatewayType"] = vngpf.GatewayType
26748	}
26749	if vngpf.VpnType != "" {
26750		objectMap["vpnType"] = vngpf.VpnType
26751	}
26752	if vngpf.EnableBgp != nil {
26753		objectMap["enableBgp"] = vngpf.EnableBgp
26754	}
26755	if vngpf.ActiveActive != nil {
26756		objectMap["activeActive"] = vngpf.ActiveActive
26757	}
26758	if vngpf.GatewayDefaultSite != nil {
26759		objectMap["gatewayDefaultSite"] = vngpf.GatewayDefaultSite
26760	}
26761	if vngpf.Sku != nil {
26762		objectMap["sku"] = vngpf.Sku
26763	}
26764	if vngpf.VpnClientConfiguration != nil {
26765		objectMap["vpnClientConfiguration"] = vngpf.VpnClientConfiguration
26766	}
26767	if vngpf.BgpSettings != nil {
26768		objectMap["bgpSettings"] = vngpf.BgpSettings
26769	}
26770	if vngpf.ResourceGUID != nil {
26771		objectMap["resourceGuid"] = vngpf.ResourceGUID
26772	}
26773	return json.Marshal(objectMap)
26774}
26775
26776// VirtualNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
26777// long-running operation.
26778type VirtualNetworkGatewaysCreateOrUpdateFuture struct {
26779	azure.FutureAPI
26780	// Result returns the result of the asynchronous operation.
26781	// If the operation has not completed it will return an error.
26782	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
26783}
26784
26785// UnmarshalJSON is the custom unmarshaller for CreateFuture.
26786func (future *VirtualNetworkGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
26787	var azFuture azure.Future
26788	if err := json.Unmarshal(body, &azFuture); err != nil {
26789		return err
26790	}
26791	future.FutureAPI = &azFuture
26792	future.Result = future.result
26793	return nil
26794}
26795
26796// result is the default implementation for VirtualNetworkGatewaysCreateOrUpdateFuture.Result.
26797func (future *VirtualNetworkGatewaysCreateOrUpdateFuture) result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
26798	var done bool
26799	done, err = future.DoneWithContext(context.Background(), client)
26800	if err != nil {
26801		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
26802		return
26803	}
26804	if !done {
26805		vng.Response.Response = future.Response()
26806		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysCreateOrUpdateFuture")
26807		return
26808	}
26809	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
26810	if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
26811		vng, err = client.CreateOrUpdateResponder(vng.Response.Response)
26812		if err != nil {
26813			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysCreateOrUpdateFuture", "Result", vng.Response.Response, "Failure responding to request")
26814		}
26815	}
26816	return
26817}
26818
26819// VirtualNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
26820// long-running operation.
26821type VirtualNetworkGatewaysDeleteFuture struct {
26822	azure.FutureAPI
26823	// Result returns the result of the asynchronous operation.
26824	// If the operation has not completed it will return an error.
26825	Result func(VirtualNetworkGatewaysClient) (autorest.Response, error)
26826}
26827
26828// UnmarshalJSON is the custom unmarshaller for CreateFuture.
26829func (future *VirtualNetworkGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
26830	var azFuture azure.Future
26831	if err := json.Unmarshal(body, &azFuture); err != nil {
26832		return err
26833	}
26834	future.FutureAPI = &azFuture
26835	future.Result = future.result
26836	return nil
26837}
26838
26839// result is the default implementation for VirtualNetworkGatewaysDeleteFuture.Result.
26840func (future *VirtualNetworkGatewaysDeleteFuture) result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
26841	var done bool
26842	done, err = future.DoneWithContext(context.Background(), client)
26843	if err != nil {
26844		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
26845		return
26846	}
26847	if !done {
26848		ar.Response = future.Response()
26849		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysDeleteFuture")
26850		return
26851	}
26852	ar.Response = future.Response()
26853	return
26854}
26855
26856// VirtualNetworkGatewaysGeneratevpnclientpackageFuture an abstraction for monitoring and retrieving the
26857// results of a long-running operation.
26858type VirtualNetworkGatewaysGeneratevpnclientpackageFuture struct {
26859	azure.FutureAPI
26860	// Result returns the result of the asynchronous operation.
26861	// If the operation has not completed it will return an error.
26862	Result func(VirtualNetworkGatewaysClient) (String, error)
26863}
26864
26865// UnmarshalJSON is the custom unmarshaller for CreateFuture.
26866func (future *VirtualNetworkGatewaysGeneratevpnclientpackageFuture) UnmarshalJSON(body []byte) error {
26867	var azFuture azure.Future
26868	if err := json.Unmarshal(body, &azFuture); err != nil {
26869		return err
26870	}
26871	future.FutureAPI = &azFuture
26872	future.Result = future.result
26873	return nil
26874}
26875
26876// result is the default implementation for VirtualNetworkGatewaysGeneratevpnclientpackageFuture.Result.
26877func (future *VirtualNetworkGatewaysGeneratevpnclientpackageFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) {
26878	var done bool
26879	done, err = future.DoneWithContext(context.Background(), client)
26880	if err != nil {
26881		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", future.Response(), "Polling failure")
26882		return
26883	}
26884	if !done {
26885		s.Response.Response = future.Response()
26886		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture")
26887		return
26888	}
26889	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
26890	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
26891		s, err = client.GeneratevpnclientpackageResponder(s.Response.Response)
26892		if err != nil {
26893			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGeneratevpnclientpackageFuture", "Result", s.Response.Response, "Failure responding to request")
26894		}
26895	}
26896	return
26897}
26898
26899// VirtualNetworkGatewaysGenerateVpnProfileFuture an abstraction for monitoring and retrieving the results
26900// of a long-running operation.
26901type VirtualNetworkGatewaysGenerateVpnProfileFuture struct {
26902	azure.FutureAPI
26903	// Result returns the result of the asynchronous operation.
26904	// If the operation has not completed it will return an error.
26905	Result func(VirtualNetworkGatewaysClient) (String, error)
26906}
26907
26908// UnmarshalJSON is the custom unmarshaller for CreateFuture.
26909func (future *VirtualNetworkGatewaysGenerateVpnProfileFuture) UnmarshalJSON(body []byte) error {
26910	var azFuture azure.Future
26911	if err := json.Unmarshal(body, &azFuture); err != nil {
26912		return err
26913	}
26914	future.FutureAPI = &azFuture
26915	future.Result = future.result
26916	return nil
26917}
26918
26919// result is the default implementation for VirtualNetworkGatewaysGenerateVpnProfileFuture.Result.
26920func (future *VirtualNetworkGatewaysGenerateVpnProfileFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) {
26921	var done bool
26922	done, err = future.DoneWithContext(context.Background(), client)
26923	if err != nil {
26924		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", future.Response(), "Polling failure")
26925		return
26926	}
26927	if !done {
26928		s.Response.Response = future.Response()
26929		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGenerateVpnProfileFuture")
26930		return
26931	}
26932	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
26933	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
26934		s, err = client.GenerateVpnProfileResponder(s.Response.Response)
26935		if err != nil {
26936			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGenerateVpnProfileFuture", "Result", s.Response.Response, "Failure responding to request")
26937		}
26938	}
26939	return
26940}
26941
26942// VirtualNetworkGatewaysGetAdvertisedRoutesFuture an abstraction for monitoring and retrieving the results
26943// of a long-running operation.
26944type VirtualNetworkGatewaysGetAdvertisedRoutesFuture struct {
26945	azure.FutureAPI
26946	// Result returns the result of the asynchronous operation.
26947	// If the operation has not completed it will return an error.
26948	Result func(VirtualNetworkGatewaysClient) (GatewayRouteListResult, error)
26949}
26950
26951// UnmarshalJSON is the custom unmarshaller for CreateFuture.
26952func (future *VirtualNetworkGatewaysGetAdvertisedRoutesFuture) UnmarshalJSON(body []byte) error {
26953	var azFuture azure.Future
26954	if err := json.Unmarshal(body, &azFuture); err != nil {
26955		return err
26956	}
26957	future.FutureAPI = &azFuture
26958	future.Result = future.result
26959	return nil
26960}
26961
26962// result is the default implementation for VirtualNetworkGatewaysGetAdvertisedRoutesFuture.Result.
26963func (future *VirtualNetworkGatewaysGetAdvertisedRoutesFuture) result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
26964	var done bool
26965	done, err = future.DoneWithContext(context.Background(), client)
26966	if err != nil {
26967		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", future.Response(), "Polling failure")
26968		return
26969	}
26970	if !done {
26971		grlr.Response.Response = future.Response()
26972		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture")
26973		return
26974	}
26975	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
26976	if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
26977		grlr, err = client.GetAdvertisedRoutesResponder(grlr.Response.Response)
26978		if err != nil {
26979			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetAdvertisedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
26980		}
26981	}
26982	return
26983}
26984
26985// VirtualNetworkGatewaysGetBgpPeerStatusFuture an abstraction for monitoring and retrieving the results of
26986// a long-running operation.
26987type VirtualNetworkGatewaysGetBgpPeerStatusFuture struct {
26988	azure.FutureAPI
26989	// Result returns the result of the asynchronous operation.
26990	// If the operation has not completed it will return an error.
26991	Result func(VirtualNetworkGatewaysClient) (BgpPeerStatusListResult, error)
26992}
26993
26994// UnmarshalJSON is the custom unmarshaller for CreateFuture.
26995func (future *VirtualNetworkGatewaysGetBgpPeerStatusFuture) UnmarshalJSON(body []byte) error {
26996	var azFuture azure.Future
26997	if err := json.Unmarshal(body, &azFuture); err != nil {
26998		return err
26999	}
27000	future.FutureAPI = &azFuture
27001	future.Result = future.result
27002	return nil
27003}
27004
27005// result is the default implementation for VirtualNetworkGatewaysGetBgpPeerStatusFuture.Result.
27006func (future *VirtualNetworkGatewaysGetBgpPeerStatusFuture) result(client VirtualNetworkGatewaysClient) (bpslr BgpPeerStatusListResult, err error) {
27007	var done bool
27008	done, err = future.DoneWithContext(context.Background(), client)
27009	if err != nil {
27010		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", future.Response(), "Polling failure")
27011		return
27012	}
27013	if !done {
27014		bpslr.Response.Response = future.Response()
27015		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetBgpPeerStatusFuture")
27016		return
27017	}
27018	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
27019	if bpslr.Response.Response, err = future.GetResult(sender); err == nil && bpslr.Response.Response.StatusCode != http.StatusNoContent {
27020		bpslr, err = client.GetBgpPeerStatusResponder(bpslr.Response.Response)
27021		if err != nil {
27022			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetBgpPeerStatusFuture", "Result", bpslr.Response.Response, "Failure responding to request")
27023		}
27024	}
27025	return
27026}
27027
27028// VirtualNetworkGatewaysGetLearnedRoutesFuture an abstraction for monitoring and retrieving the results of
27029// a long-running operation.
27030type VirtualNetworkGatewaysGetLearnedRoutesFuture struct {
27031	azure.FutureAPI
27032	// Result returns the result of the asynchronous operation.
27033	// If the operation has not completed it will return an error.
27034	Result func(VirtualNetworkGatewaysClient) (GatewayRouteListResult, error)
27035}
27036
27037// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27038func (future *VirtualNetworkGatewaysGetLearnedRoutesFuture) UnmarshalJSON(body []byte) error {
27039	var azFuture azure.Future
27040	if err := json.Unmarshal(body, &azFuture); err != nil {
27041		return err
27042	}
27043	future.FutureAPI = &azFuture
27044	future.Result = future.result
27045	return nil
27046}
27047
27048// result is the default implementation for VirtualNetworkGatewaysGetLearnedRoutesFuture.Result.
27049func (future *VirtualNetworkGatewaysGetLearnedRoutesFuture) result(client VirtualNetworkGatewaysClient) (grlr GatewayRouteListResult, err error) {
27050	var done bool
27051	done, err = future.DoneWithContext(context.Background(), client)
27052	if err != nil {
27053		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", future.Response(), "Polling failure")
27054		return
27055	}
27056	if !done {
27057		grlr.Response.Response = future.Response()
27058		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetLearnedRoutesFuture")
27059		return
27060	}
27061	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
27062	if grlr.Response.Response, err = future.GetResult(sender); err == nil && grlr.Response.Response.StatusCode != http.StatusNoContent {
27063		grlr, err = client.GetLearnedRoutesResponder(grlr.Response.Response)
27064		if err != nil {
27065			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetLearnedRoutesFuture", "Result", grlr.Response.Response, "Failure responding to request")
27066		}
27067	}
27068	return
27069}
27070
27071// VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture an abstraction for monitoring and retrieving the
27072// results of a long-running operation.
27073type VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture struct {
27074	azure.FutureAPI
27075	// Result returns the result of the asynchronous operation.
27076	// If the operation has not completed it will return an error.
27077	Result func(VirtualNetworkGatewaysClient) (VpnClientIPsecParameters, error)
27078}
27079
27080// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27081func (future *VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture) UnmarshalJSON(body []byte) error {
27082	var azFuture azure.Future
27083	if err := json.Unmarshal(body, &azFuture); err != nil {
27084		return err
27085	}
27086	future.FutureAPI = &azFuture
27087	future.Result = future.result
27088	return nil
27089}
27090
27091// result is the default implementation for VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture.Result.
27092func (future *VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture) result(client VirtualNetworkGatewaysClient) (vcipp VpnClientIPsecParameters, err error) {
27093	var done bool
27094	done, err = future.DoneWithContext(context.Background(), client)
27095	if err != nil {
27096		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture", "Result", future.Response(), "Polling failure")
27097		return
27098	}
27099	if !done {
27100		vcipp.Response.Response = future.Response()
27101		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture")
27102		return
27103	}
27104	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
27105	if vcipp.Response.Response, err = future.GetResult(sender); err == nil && vcipp.Response.Response.StatusCode != http.StatusNoContent {
27106		vcipp, err = client.GetVpnclientIpsecParametersResponder(vcipp.Response.Response)
27107		if err != nil {
27108			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture", "Result", vcipp.Response.Response, "Failure responding to request")
27109		}
27110	}
27111	return
27112}
27113
27114// VirtualNetworkGatewaysGetVpnProfilePackageURLFuture an abstraction for monitoring and retrieving the
27115// results of a long-running operation.
27116type VirtualNetworkGatewaysGetVpnProfilePackageURLFuture struct {
27117	azure.FutureAPI
27118	// Result returns the result of the asynchronous operation.
27119	// If the operation has not completed it will return an error.
27120	Result func(VirtualNetworkGatewaysClient) (String, error)
27121}
27122
27123// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27124func (future *VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) UnmarshalJSON(body []byte) error {
27125	var azFuture azure.Future
27126	if err := json.Unmarshal(body, &azFuture); err != nil {
27127		return err
27128	}
27129	future.FutureAPI = &azFuture
27130	future.Result = future.result
27131	return nil
27132}
27133
27134// result is the default implementation for VirtualNetworkGatewaysGetVpnProfilePackageURLFuture.Result.
27135func (future *VirtualNetworkGatewaysGetVpnProfilePackageURLFuture) result(client VirtualNetworkGatewaysClient) (s String, err error) {
27136	var done bool
27137	done, err = future.DoneWithContext(context.Background(), client)
27138	if err != nil {
27139		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", future.Response(), "Polling failure")
27140		return
27141	}
27142	if !done {
27143		s.Response.Response = future.Response()
27144		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture")
27145		return
27146	}
27147	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
27148	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
27149		s, err = client.GetVpnProfilePackageURLResponder(s.Response.Response)
27150		if err != nil {
27151			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysGetVpnProfilePackageURLFuture", "Result", s.Response.Response, "Failure responding to request")
27152		}
27153	}
27154	return
27155}
27156
27157// VirtualNetworkGatewaySku virtualNetworkGatewaySku details
27158type VirtualNetworkGatewaySku struct {
27159	// Name - Gateway SKU name. Possible values include: 'VirtualNetworkGatewaySkuNameBasic', 'VirtualNetworkGatewaySkuNameHighPerformance', 'VirtualNetworkGatewaySkuNameStandard', 'VirtualNetworkGatewaySkuNameUltraPerformance', 'VirtualNetworkGatewaySkuNameVpnGw1', 'VirtualNetworkGatewaySkuNameVpnGw2', 'VirtualNetworkGatewaySkuNameVpnGw3', 'VirtualNetworkGatewaySkuNameVpnGw1AZ', 'VirtualNetworkGatewaySkuNameVpnGw2AZ', 'VirtualNetworkGatewaySkuNameVpnGw3AZ', 'VirtualNetworkGatewaySkuNameErGw1AZ', 'VirtualNetworkGatewaySkuNameErGw2AZ', 'VirtualNetworkGatewaySkuNameErGw3AZ'
27160	Name VirtualNetworkGatewaySkuName `json:"name,omitempty"`
27161	// Tier - Gateway SKU tier. Possible values include: 'VirtualNetworkGatewaySkuTierBasic', 'VirtualNetworkGatewaySkuTierHighPerformance', 'VirtualNetworkGatewaySkuTierStandard', 'VirtualNetworkGatewaySkuTierUltraPerformance', 'VirtualNetworkGatewaySkuTierVpnGw1', 'VirtualNetworkGatewaySkuTierVpnGw2', 'VirtualNetworkGatewaySkuTierVpnGw3', 'VirtualNetworkGatewaySkuTierVpnGw1AZ', 'VirtualNetworkGatewaySkuTierVpnGw2AZ', 'VirtualNetworkGatewaySkuTierVpnGw3AZ', 'VirtualNetworkGatewaySkuTierErGw1AZ', 'VirtualNetworkGatewaySkuTierErGw2AZ', 'VirtualNetworkGatewaySkuTierErGw3AZ'
27162	Tier VirtualNetworkGatewaySkuTier `json:"tier,omitempty"`
27163	// Capacity - The capacity.
27164	Capacity *int32 `json:"capacity,omitempty"`
27165}
27166
27167// VirtualNetworkGatewaysResetFuture an abstraction for monitoring and retrieving the results of a
27168// long-running operation.
27169type VirtualNetworkGatewaysResetFuture struct {
27170	azure.FutureAPI
27171	// Result returns the result of the asynchronous operation.
27172	// If the operation has not completed it will return an error.
27173	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
27174}
27175
27176// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27177func (future *VirtualNetworkGatewaysResetFuture) UnmarshalJSON(body []byte) error {
27178	var azFuture azure.Future
27179	if err := json.Unmarshal(body, &azFuture); err != nil {
27180		return err
27181	}
27182	future.FutureAPI = &azFuture
27183	future.Result = future.result
27184	return nil
27185}
27186
27187// result is the default implementation for VirtualNetworkGatewaysResetFuture.Result.
27188func (future *VirtualNetworkGatewaysResetFuture) result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
27189	var done bool
27190	done, err = future.DoneWithContext(context.Background(), client)
27191	if err != nil {
27192		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", future.Response(), "Polling failure")
27193		return
27194	}
27195	if !done {
27196		vng.Response.Response = future.Response()
27197		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetFuture")
27198		return
27199	}
27200	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
27201	if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
27202		vng, err = client.ResetResponder(vng.Response.Response)
27203		if err != nil {
27204			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetFuture", "Result", vng.Response.Response, "Failure responding to request")
27205		}
27206	}
27207	return
27208}
27209
27210// VirtualNetworkGatewaysResetVpnClientSharedKeyFuture an abstraction for monitoring and retrieving the
27211// results of a long-running operation.
27212type VirtualNetworkGatewaysResetVpnClientSharedKeyFuture struct {
27213	azure.FutureAPI
27214	// Result returns the result of the asynchronous operation.
27215	// If the operation has not completed it will return an error.
27216	Result func(VirtualNetworkGatewaysClient) (autorest.Response, error)
27217}
27218
27219// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27220func (future *VirtualNetworkGatewaysResetVpnClientSharedKeyFuture) UnmarshalJSON(body []byte) error {
27221	var azFuture azure.Future
27222	if err := json.Unmarshal(body, &azFuture); err != nil {
27223		return err
27224	}
27225	future.FutureAPI = &azFuture
27226	future.Result = future.result
27227	return nil
27228}
27229
27230// result is the default implementation for VirtualNetworkGatewaysResetVpnClientSharedKeyFuture.Result.
27231func (future *VirtualNetworkGatewaysResetVpnClientSharedKeyFuture) result(client VirtualNetworkGatewaysClient) (ar autorest.Response, err error) {
27232	var done bool
27233	done, err = future.DoneWithContext(context.Background(), client)
27234	if err != nil {
27235		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysResetVpnClientSharedKeyFuture", "Result", future.Response(), "Polling failure")
27236		return
27237	}
27238	if !done {
27239		ar.Response = future.Response()
27240		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysResetVpnClientSharedKeyFuture")
27241		return
27242	}
27243	ar.Response = future.Response()
27244	return
27245}
27246
27247// VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture an abstraction for monitoring and retrieving the
27248// results of a long-running operation.
27249type VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture struct {
27250	azure.FutureAPI
27251	// Result returns the result of the asynchronous operation.
27252	// If the operation has not completed it will return an error.
27253	Result func(VirtualNetworkGatewaysClient) (VpnClientIPsecParameters, error)
27254}
27255
27256// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27257func (future *VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture) UnmarshalJSON(body []byte) error {
27258	var azFuture azure.Future
27259	if err := json.Unmarshal(body, &azFuture); err != nil {
27260		return err
27261	}
27262	future.FutureAPI = &azFuture
27263	future.Result = future.result
27264	return nil
27265}
27266
27267// result is the default implementation for VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture.Result.
27268func (future *VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture) result(client VirtualNetworkGatewaysClient) (vcipp VpnClientIPsecParameters, err error) {
27269	var done bool
27270	done, err = future.DoneWithContext(context.Background(), client)
27271	if err != nil {
27272		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture", "Result", future.Response(), "Polling failure")
27273		return
27274	}
27275	if !done {
27276		vcipp.Response.Response = future.Response()
27277		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture")
27278		return
27279	}
27280	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
27281	if vcipp.Response.Response, err = future.GetResult(sender); err == nil && vcipp.Response.Response.StatusCode != http.StatusNoContent {
27282		vcipp, err = client.SetVpnclientIpsecParametersResponder(vcipp.Response.Response)
27283		if err != nil {
27284			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture", "Result", vcipp.Response.Response, "Failure responding to request")
27285		}
27286	}
27287	return
27288}
27289
27290// VirtualNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
27291// long-running operation.
27292type VirtualNetworkGatewaysUpdateTagsFuture struct {
27293	azure.FutureAPI
27294	// Result returns the result of the asynchronous operation.
27295	// If the operation has not completed it will return an error.
27296	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
27297}
27298
27299// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27300func (future *VirtualNetworkGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error {
27301	var azFuture azure.Future
27302	if err := json.Unmarshal(body, &azFuture); err != nil {
27303		return err
27304	}
27305	future.FutureAPI = &azFuture
27306	future.Result = future.result
27307	return nil
27308}
27309
27310// result is the default implementation for VirtualNetworkGatewaysUpdateTagsFuture.Result.
27311func (future *VirtualNetworkGatewaysUpdateTagsFuture) result(client VirtualNetworkGatewaysClient) (vng VirtualNetworkGateway, err error) {
27312	var done bool
27313	done, err = future.DoneWithContext(context.Background(), client)
27314	if err != nil {
27315		err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
27316		return
27317	}
27318	if !done {
27319		vng.Response.Response = future.Response()
27320		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewaysUpdateTagsFuture")
27321		return
27322	}
27323	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
27324	if vng.Response.Response, err = future.GetResult(sender); err == nil && vng.Response.Response.StatusCode != http.StatusNoContent {
27325		vng, err = client.UpdateTagsResponder(vng.Response.Response)
27326		if err != nil {
27327			err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysUpdateTagsFuture", "Result", vng.Response.Response, "Failure responding to request")
27328		}
27329	}
27330	return
27331}
27332
27333// VirtualNetworkListResult response for the ListVirtualNetworks API service call.
27334type VirtualNetworkListResult struct {
27335	autorest.Response `json:"-"`
27336	// Value - Gets a list of VirtualNetwork resources in a resource group.
27337	Value *[]VirtualNetwork `json:"value,omitempty"`
27338	// NextLink - The URL to get the next set of results.
27339	NextLink *string `json:"nextLink,omitempty"`
27340}
27341
27342// VirtualNetworkListResultIterator provides access to a complete listing of VirtualNetwork values.
27343type VirtualNetworkListResultIterator struct {
27344	i    int
27345	page VirtualNetworkListResultPage
27346}
27347
27348// NextWithContext advances to the next value.  If there was an error making
27349// the request the iterator does not advance and the error is returned.
27350func (iter *VirtualNetworkListResultIterator) NextWithContext(ctx context.Context) (err error) {
27351	if tracing.IsEnabled() {
27352		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultIterator.NextWithContext")
27353		defer func() {
27354			sc := -1
27355			if iter.Response().Response.Response != nil {
27356				sc = iter.Response().Response.Response.StatusCode
27357			}
27358			tracing.EndSpan(ctx, sc, err)
27359		}()
27360	}
27361	iter.i++
27362	if iter.i < len(iter.page.Values()) {
27363		return nil
27364	}
27365	err = iter.page.NextWithContext(ctx)
27366	if err != nil {
27367		iter.i--
27368		return err
27369	}
27370	iter.i = 0
27371	return nil
27372}
27373
27374// Next advances to the next value.  If there was an error making
27375// the request the iterator does not advance and the error is returned.
27376// Deprecated: Use NextWithContext() instead.
27377func (iter *VirtualNetworkListResultIterator) Next() error {
27378	return iter.NextWithContext(context.Background())
27379}
27380
27381// NotDone returns true if the enumeration should be started or is not yet complete.
27382func (iter VirtualNetworkListResultIterator) NotDone() bool {
27383	return iter.page.NotDone() && iter.i < len(iter.page.Values())
27384}
27385
27386// Response returns the raw server response from the last page request.
27387func (iter VirtualNetworkListResultIterator) Response() VirtualNetworkListResult {
27388	return iter.page.Response()
27389}
27390
27391// Value returns the current value or a zero-initialized value if the
27392// iterator has advanced beyond the end of the collection.
27393func (iter VirtualNetworkListResultIterator) Value() VirtualNetwork {
27394	if !iter.page.NotDone() {
27395		return VirtualNetwork{}
27396	}
27397	return iter.page.Values()[iter.i]
27398}
27399
27400// Creates a new instance of the VirtualNetworkListResultIterator type.
27401func NewVirtualNetworkListResultIterator(page VirtualNetworkListResultPage) VirtualNetworkListResultIterator {
27402	return VirtualNetworkListResultIterator{page: page}
27403}
27404
27405// IsEmpty returns true if the ListResult contains no values.
27406func (vnlr VirtualNetworkListResult) IsEmpty() bool {
27407	return vnlr.Value == nil || len(*vnlr.Value) == 0
27408}
27409
27410// hasNextLink returns true if the NextLink is not empty.
27411func (vnlr VirtualNetworkListResult) hasNextLink() bool {
27412	return vnlr.NextLink != nil && len(*vnlr.NextLink) != 0
27413}
27414
27415// virtualNetworkListResultPreparer prepares a request to retrieve the next set of results.
27416// It returns nil if no more results exist.
27417func (vnlr VirtualNetworkListResult) virtualNetworkListResultPreparer(ctx context.Context) (*http.Request, error) {
27418	if !vnlr.hasNextLink() {
27419		return nil, nil
27420	}
27421	return autorest.Prepare((&http.Request{}).WithContext(ctx),
27422		autorest.AsJSON(),
27423		autorest.AsGet(),
27424		autorest.WithBaseURL(to.String(vnlr.NextLink)))
27425}
27426
27427// VirtualNetworkListResultPage contains a page of VirtualNetwork values.
27428type VirtualNetworkListResultPage struct {
27429	fn   func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)
27430	vnlr VirtualNetworkListResult
27431}
27432
27433// NextWithContext advances to the next page of values.  If there was an error making
27434// the request the page does not advance and the error is returned.
27435func (page *VirtualNetworkListResultPage) NextWithContext(ctx context.Context) (err error) {
27436	if tracing.IsEnabled() {
27437		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultPage.NextWithContext")
27438		defer func() {
27439			sc := -1
27440			if page.Response().Response.Response != nil {
27441				sc = page.Response().Response.Response.StatusCode
27442			}
27443			tracing.EndSpan(ctx, sc, err)
27444		}()
27445	}
27446	for {
27447		next, err := page.fn(ctx, page.vnlr)
27448		if err != nil {
27449			return err
27450		}
27451		page.vnlr = next
27452		if !next.hasNextLink() || !next.IsEmpty() {
27453			break
27454		}
27455	}
27456	return nil
27457}
27458
27459// Next advances to the next page of values.  If there was an error making
27460// the request the page does not advance and the error is returned.
27461// Deprecated: Use NextWithContext() instead.
27462func (page *VirtualNetworkListResultPage) Next() error {
27463	return page.NextWithContext(context.Background())
27464}
27465
27466// NotDone returns true if the page enumeration should be started or is not yet complete.
27467func (page VirtualNetworkListResultPage) NotDone() bool {
27468	return !page.vnlr.IsEmpty()
27469}
27470
27471// Response returns the raw server response from the last page request.
27472func (page VirtualNetworkListResultPage) Response() VirtualNetworkListResult {
27473	return page.vnlr
27474}
27475
27476// Values returns the slice of values for the current page or nil if there are no values.
27477func (page VirtualNetworkListResultPage) Values() []VirtualNetwork {
27478	if page.vnlr.IsEmpty() {
27479		return nil
27480	}
27481	return *page.vnlr.Value
27482}
27483
27484// Creates a new instance of the VirtualNetworkListResultPage type.
27485func NewVirtualNetworkListResultPage(cur VirtualNetworkListResult, getNextPage func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)) VirtualNetworkListResultPage {
27486	return VirtualNetworkListResultPage{
27487		fn:   getNextPage,
27488		vnlr: cur,
27489	}
27490}
27491
27492// VirtualNetworkListUsageResult response for the virtual networks GetUsage API service call.
27493type VirtualNetworkListUsageResult struct {
27494	autorest.Response `json:"-"`
27495	// Value - READ-ONLY; VirtualNetwork usage stats.
27496	Value *[]VirtualNetworkUsage `json:"value,omitempty"`
27497	// NextLink - The URL to get the next set of results.
27498	NextLink *string `json:"nextLink,omitempty"`
27499}
27500
27501// MarshalJSON is the custom marshaler for VirtualNetworkListUsageResult.
27502func (vnlur VirtualNetworkListUsageResult) MarshalJSON() ([]byte, error) {
27503	objectMap := make(map[string]interface{})
27504	if vnlur.NextLink != nil {
27505		objectMap["nextLink"] = vnlur.NextLink
27506	}
27507	return json.Marshal(objectMap)
27508}
27509
27510// VirtualNetworkListUsageResultIterator provides access to a complete listing of VirtualNetworkUsage
27511// values.
27512type VirtualNetworkListUsageResultIterator struct {
27513	i    int
27514	page VirtualNetworkListUsageResultPage
27515}
27516
27517// NextWithContext advances to the next value.  If there was an error making
27518// the request the iterator does not advance and the error is returned.
27519func (iter *VirtualNetworkListUsageResultIterator) NextWithContext(ctx context.Context) (err error) {
27520	if tracing.IsEnabled() {
27521		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultIterator.NextWithContext")
27522		defer func() {
27523			sc := -1
27524			if iter.Response().Response.Response != nil {
27525				sc = iter.Response().Response.Response.StatusCode
27526			}
27527			tracing.EndSpan(ctx, sc, err)
27528		}()
27529	}
27530	iter.i++
27531	if iter.i < len(iter.page.Values()) {
27532		return nil
27533	}
27534	err = iter.page.NextWithContext(ctx)
27535	if err != nil {
27536		iter.i--
27537		return err
27538	}
27539	iter.i = 0
27540	return nil
27541}
27542
27543// Next advances to the next value.  If there was an error making
27544// the request the iterator does not advance and the error is returned.
27545// Deprecated: Use NextWithContext() instead.
27546func (iter *VirtualNetworkListUsageResultIterator) Next() error {
27547	return iter.NextWithContext(context.Background())
27548}
27549
27550// NotDone returns true if the enumeration should be started or is not yet complete.
27551func (iter VirtualNetworkListUsageResultIterator) NotDone() bool {
27552	return iter.page.NotDone() && iter.i < len(iter.page.Values())
27553}
27554
27555// Response returns the raw server response from the last page request.
27556func (iter VirtualNetworkListUsageResultIterator) Response() VirtualNetworkListUsageResult {
27557	return iter.page.Response()
27558}
27559
27560// Value returns the current value or a zero-initialized value if the
27561// iterator has advanced beyond the end of the collection.
27562func (iter VirtualNetworkListUsageResultIterator) Value() VirtualNetworkUsage {
27563	if !iter.page.NotDone() {
27564		return VirtualNetworkUsage{}
27565	}
27566	return iter.page.Values()[iter.i]
27567}
27568
27569// Creates a new instance of the VirtualNetworkListUsageResultIterator type.
27570func NewVirtualNetworkListUsageResultIterator(page VirtualNetworkListUsageResultPage) VirtualNetworkListUsageResultIterator {
27571	return VirtualNetworkListUsageResultIterator{page: page}
27572}
27573
27574// IsEmpty returns true if the ListResult contains no values.
27575func (vnlur VirtualNetworkListUsageResult) IsEmpty() bool {
27576	return vnlur.Value == nil || len(*vnlur.Value) == 0
27577}
27578
27579// hasNextLink returns true if the NextLink is not empty.
27580func (vnlur VirtualNetworkListUsageResult) hasNextLink() bool {
27581	return vnlur.NextLink != nil && len(*vnlur.NextLink) != 0
27582}
27583
27584// virtualNetworkListUsageResultPreparer prepares a request to retrieve the next set of results.
27585// It returns nil if no more results exist.
27586func (vnlur VirtualNetworkListUsageResult) virtualNetworkListUsageResultPreparer(ctx context.Context) (*http.Request, error) {
27587	if !vnlur.hasNextLink() {
27588		return nil, nil
27589	}
27590	return autorest.Prepare((&http.Request{}).WithContext(ctx),
27591		autorest.AsJSON(),
27592		autorest.AsGet(),
27593		autorest.WithBaseURL(to.String(vnlur.NextLink)))
27594}
27595
27596// VirtualNetworkListUsageResultPage contains a page of VirtualNetworkUsage values.
27597type VirtualNetworkListUsageResultPage struct {
27598	fn    func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)
27599	vnlur VirtualNetworkListUsageResult
27600}
27601
27602// NextWithContext advances to the next page of values.  If there was an error making
27603// the request the page does not advance and the error is returned.
27604func (page *VirtualNetworkListUsageResultPage) NextWithContext(ctx context.Context) (err error) {
27605	if tracing.IsEnabled() {
27606		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultPage.NextWithContext")
27607		defer func() {
27608			sc := -1
27609			if page.Response().Response.Response != nil {
27610				sc = page.Response().Response.Response.StatusCode
27611			}
27612			tracing.EndSpan(ctx, sc, err)
27613		}()
27614	}
27615	for {
27616		next, err := page.fn(ctx, page.vnlur)
27617		if err != nil {
27618			return err
27619		}
27620		page.vnlur = next
27621		if !next.hasNextLink() || !next.IsEmpty() {
27622			break
27623		}
27624	}
27625	return nil
27626}
27627
27628// Next advances to the next page of values.  If there was an error making
27629// the request the page does not advance and the error is returned.
27630// Deprecated: Use NextWithContext() instead.
27631func (page *VirtualNetworkListUsageResultPage) Next() error {
27632	return page.NextWithContext(context.Background())
27633}
27634
27635// NotDone returns true if the page enumeration should be started or is not yet complete.
27636func (page VirtualNetworkListUsageResultPage) NotDone() bool {
27637	return !page.vnlur.IsEmpty()
27638}
27639
27640// Response returns the raw server response from the last page request.
27641func (page VirtualNetworkListUsageResultPage) Response() VirtualNetworkListUsageResult {
27642	return page.vnlur
27643}
27644
27645// Values returns the slice of values for the current page or nil if there are no values.
27646func (page VirtualNetworkListUsageResultPage) Values() []VirtualNetworkUsage {
27647	if page.vnlur.IsEmpty() {
27648		return nil
27649	}
27650	return *page.vnlur.Value
27651}
27652
27653// Creates a new instance of the VirtualNetworkListUsageResultPage type.
27654func NewVirtualNetworkListUsageResultPage(cur VirtualNetworkListUsageResult, getNextPage func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)) VirtualNetworkListUsageResultPage {
27655	return VirtualNetworkListUsageResultPage{
27656		fn:    getNextPage,
27657		vnlur: cur,
27658	}
27659}
27660
27661// VirtualNetworkPeering peerings in a virtual network resource.
27662type VirtualNetworkPeering struct {
27663	autorest.Response `json:"-"`
27664	// VirtualNetworkPeeringPropertiesFormat - Properties of the virtual network peering.
27665	*VirtualNetworkPeeringPropertiesFormat `json:"properties,omitempty"`
27666	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
27667	Name *string `json:"name,omitempty"`
27668	// Etag - A unique read-only string that changes whenever the resource is updated.
27669	Etag *string `json:"etag,omitempty"`
27670	// ID - Resource ID.
27671	ID *string `json:"id,omitempty"`
27672}
27673
27674// MarshalJSON is the custom marshaler for VirtualNetworkPeering.
27675func (vnp VirtualNetworkPeering) MarshalJSON() ([]byte, error) {
27676	objectMap := make(map[string]interface{})
27677	if vnp.VirtualNetworkPeeringPropertiesFormat != nil {
27678		objectMap["properties"] = vnp.VirtualNetworkPeeringPropertiesFormat
27679	}
27680	if vnp.Name != nil {
27681		objectMap["name"] = vnp.Name
27682	}
27683	if vnp.Etag != nil {
27684		objectMap["etag"] = vnp.Etag
27685	}
27686	if vnp.ID != nil {
27687		objectMap["id"] = vnp.ID
27688	}
27689	return json.Marshal(objectMap)
27690}
27691
27692// UnmarshalJSON is the custom unmarshaler for VirtualNetworkPeering struct.
27693func (vnp *VirtualNetworkPeering) UnmarshalJSON(body []byte) error {
27694	var m map[string]*json.RawMessage
27695	err := json.Unmarshal(body, &m)
27696	if err != nil {
27697		return err
27698	}
27699	for k, v := range m {
27700		switch k {
27701		case "properties":
27702			if v != nil {
27703				var virtualNetworkPeeringPropertiesFormat VirtualNetworkPeeringPropertiesFormat
27704				err = json.Unmarshal(*v, &virtualNetworkPeeringPropertiesFormat)
27705				if err != nil {
27706					return err
27707				}
27708				vnp.VirtualNetworkPeeringPropertiesFormat = &virtualNetworkPeeringPropertiesFormat
27709			}
27710		case "name":
27711			if v != nil {
27712				var name string
27713				err = json.Unmarshal(*v, &name)
27714				if err != nil {
27715					return err
27716				}
27717				vnp.Name = &name
27718			}
27719		case "etag":
27720			if v != nil {
27721				var etag string
27722				err = json.Unmarshal(*v, &etag)
27723				if err != nil {
27724					return err
27725				}
27726				vnp.Etag = &etag
27727			}
27728		case "id":
27729			if v != nil {
27730				var ID string
27731				err = json.Unmarshal(*v, &ID)
27732				if err != nil {
27733					return err
27734				}
27735				vnp.ID = &ID
27736			}
27737		}
27738	}
27739
27740	return nil
27741}
27742
27743// VirtualNetworkPeeringListResult response for ListSubnets API service call. Retrieves all subnets that
27744// belong to a virtual network.
27745type VirtualNetworkPeeringListResult struct {
27746	autorest.Response `json:"-"`
27747	// Value - The peerings in a virtual network.
27748	Value *[]VirtualNetworkPeering `json:"value,omitempty"`
27749	// NextLink - The URL to get the next set of results.
27750	NextLink *string `json:"nextLink,omitempty"`
27751}
27752
27753// VirtualNetworkPeeringListResultIterator provides access to a complete listing of VirtualNetworkPeering
27754// values.
27755type VirtualNetworkPeeringListResultIterator struct {
27756	i    int
27757	page VirtualNetworkPeeringListResultPage
27758}
27759
27760// NextWithContext advances to the next value.  If there was an error making
27761// the request the iterator does not advance and the error is returned.
27762func (iter *VirtualNetworkPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
27763	if tracing.IsEnabled() {
27764		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultIterator.NextWithContext")
27765		defer func() {
27766			sc := -1
27767			if iter.Response().Response.Response != nil {
27768				sc = iter.Response().Response.Response.StatusCode
27769			}
27770			tracing.EndSpan(ctx, sc, err)
27771		}()
27772	}
27773	iter.i++
27774	if iter.i < len(iter.page.Values()) {
27775		return nil
27776	}
27777	err = iter.page.NextWithContext(ctx)
27778	if err != nil {
27779		iter.i--
27780		return err
27781	}
27782	iter.i = 0
27783	return nil
27784}
27785
27786// Next advances to the next value.  If there was an error making
27787// the request the iterator does not advance and the error is returned.
27788// Deprecated: Use NextWithContext() instead.
27789func (iter *VirtualNetworkPeeringListResultIterator) Next() error {
27790	return iter.NextWithContext(context.Background())
27791}
27792
27793// NotDone returns true if the enumeration should be started or is not yet complete.
27794func (iter VirtualNetworkPeeringListResultIterator) NotDone() bool {
27795	return iter.page.NotDone() && iter.i < len(iter.page.Values())
27796}
27797
27798// Response returns the raw server response from the last page request.
27799func (iter VirtualNetworkPeeringListResultIterator) Response() VirtualNetworkPeeringListResult {
27800	return iter.page.Response()
27801}
27802
27803// Value returns the current value or a zero-initialized value if the
27804// iterator has advanced beyond the end of the collection.
27805func (iter VirtualNetworkPeeringListResultIterator) Value() VirtualNetworkPeering {
27806	if !iter.page.NotDone() {
27807		return VirtualNetworkPeering{}
27808	}
27809	return iter.page.Values()[iter.i]
27810}
27811
27812// Creates a new instance of the VirtualNetworkPeeringListResultIterator type.
27813func NewVirtualNetworkPeeringListResultIterator(page VirtualNetworkPeeringListResultPage) VirtualNetworkPeeringListResultIterator {
27814	return VirtualNetworkPeeringListResultIterator{page: page}
27815}
27816
27817// IsEmpty returns true if the ListResult contains no values.
27818func (vnplr VirtualNetworkPeeringListResult) IsEmpty() bool {
27819	return vnplr.Value == nil || len(*vnplr.Value) == 0
27820}
27821
27822// hasNextLink returns true if the NextLink is not empty.
27823func (vnplr VirtualNetworkPeeringListResult) hasNextLink() bool {
27824	return vnplr.NextLink != nil && len(*vnplr.NextLink) != 0
27825}
27826
27827// virtualNetworkPeeringListResultPreparer prepares a request to retrieve the next set of results.
27828// It returns nil if no more results exist.
27829func (vnplr VirtualNetworkPeeringListResult) virtualNetworkPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
27830	if !vnplr.hasNextLink() {
27831		return nil, nil
27832	}
27833	return autorest.Prepare((&http.Request{}).WithContext(ctx),
27834		autorest.AsJSON(),
27835		autorest.AsGet(),
27836		autorest.WithBaseURL(to.String(vnplr.NextLink)))
27837}
27838
27839// VirtualNetworkPeeringListResultPage contains a page of VirtualNetworkPeering values.
27840type VirtualNetworkPeeringListResultPage struct {
27841	fn    func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)
27842	vnplr VirtualNetworkPeeringListResult
27843}
27844
27845// NextWithContext advances to the next page of values.  If there was an error making
27846// the request the page does not advance and the error is returned.
27847func (page *VirtualNetworkPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
27848	if tracing.IsEnabled() {
27849		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultPage.NextWithContext")
27850		defer func() {
27851			sc := -1
27852			if page.Response().Response.Response != nil {
27853				sc = page.Response().Response.Response.StatusCode
27854			}
27855			tracing.EndSpan(ctx, sc, err)
27856		}()
27857	}
27858	for {
27859		next, err := page.fn(ctx, page.vnplr)
27860		if err != nil {
27861			return err
27862		}
27863		page.vnplr = next
27864		if !next.hasNextLink() || !next.IsEmpty() {
27865			break
27866		}
27867	}
27868	return nil
27869}
27870
27871// Next advances to the next page of values.  If there was an error making
27872// the request the page does not advance and the error is returned.
27873// Deprecated: Use NextWithContext() instead.
27874func (page *VirtualNetworkPeeringListResultPage) Next() error {
27875	return page.NextWithContext(context.Background())
27876}
27877
27878// NotDone returns true if the page enumeration should be started or is not yet complete.
27879func (page VirtualNetworkPeeringListResultPage) NotDone() bool {
27880	return !page.vnplr.IsEmpty()
27881}
27882
27883// Response returns the raw server response from the last page request.
27884func (page VirtualNetworkPeeringListResultPage) Response() VirtualNetworkPeeringListResult {
27885	return page.vnplr
27886}
27887
27888// Values returns the slice of values for the current page or nil if there are no values.
27889func (page VirtualNetworkPeeringListResultPage) Values() []VirtualNetworkPeering {
27890	if page.vnplr.IsEmpty() {
27891		return nil
27892	}
27893	return *page.vnplr.Value
27894}
27895
27896// Creates a new instance of the VirtualNetworkPeeringListResultPage type.
27897func NewVirtualNetworkPeeringListResultPage(cur VirtualNetworkPeeringListResult, getNextPage func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)) VirtualNetworkPeeringListResultPage {
27898	return VirtualNetworkPeeringListResultPage{
27899		fn:    getNextPage,
27900		vnplr: cur,
27901	}
27902}
27903
27904// VirtualNetworkPeeringPropertiesFormat properties of the virtual network peering.
27905type VirtualNetworkPeeringPropertiesFormat struct {
27906	// AllowVirtualNetworkAccess - Whether the VMs in the linked virtual network space would be able to access all the VMs in local Virtual network space.
27907	AllowVirtualNetworkAccess *bool `json:"allowVirtualNetworkAccess,omitempty"`
27908	// AllowForwardedTraffic - Whether the forwarded traffic from the VMs in the remote virtual network will be allowed/disallowed.
27909	AllowForwardedTraffic *bool `json:"allowForwardedTraffic,omitempty"`
27910	// AllowGatewayTransit - If gateway links can be used in remote virtual networking to link to this virtual network.
27911	AllowGatewayTransit *bool `json:"allowGatewayTransit,omitempty"`
27912	// 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.
27913	UseRemoteGateways *bool `json:"useRemoteGateways,omitempty"`
27914	// 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).
27915	RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"`
27916	// RemoteAddressSpace - The reference of the remote virtual network address space.
27917	RemoteAddressSpace *AddressSpace `json:"remoteAddressSpace,omitempty"`
27918	// PeeringState - The status of the virtual network peering. Possible values are 'Initiated', 'Connected', and 'Disconnected'. Possible values include: 'VirtualNetworkPeeringStateInitiated', 'VirtualNetworkPeeringStateConnected', 'VirtualNetworkPeeringStateDisconnected'
27919	PeeringState VirtualNetworkPeeringState `json:"peeringState,omitempty"`
27920	// ProvisioningState - The provisioning state of the resource.
27921	ProvisioningState *string `json:"provisioningState,omitempty"`
27922}
27923
27924// VirtualNetworkPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
27925// long-running operation.
27926type VirtualNetworkPeeringsCreateOrUpdateFuture struct {
27927	azure.FutureAPI
27928	// Result returns the result of the asynchronous operation.
27929	// If the operation has not completed it will return an error.
27930	Result func(VirtualNetworkPeeringsClient) (VirtualNetworkPeering, error)
27931}
27932
27933// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27934func (future *VirtualNetworkPeeringsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
27935	var azFuture azure.Future
27936	if err := json.Unmarshal(body, &azFuture); err != nil {
27937		return err
27938	}
27939	future.FutureAPI = &azFuture
27940	future.Result = future.result
27941	return nil
27942}
27943
27944// result is the default implementation for VirtualNetworkPeeringsCreateOrUpdateFuture.Result.
27945func (future *VirtualNetworkPeeringsCreateOrUpdateFuture) result(client VirtualNetworkPeeringsClient) (vnp VirtualNetworkPeering, err error) {
27946	var done bool
27947	done, err = future.DoneWithContext(context.Background(), client)
27948	if err != nil {
27949		err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
27950		return
27951	}
27952	if !done {
27953		vnp.Response.Response = future.Response()
27954		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsCreateOrUpdateFuture")
27955		return
27956	}
27957	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
27958	if vnp.Response.Response, err = future.GetResult(sender); err == nil && vnp.Response.Response.StatusCode != http.StatusNoContent {
27959		vnp, err = client.CreateOrUpdateResponder(vnp.Response.Response)
27960		if err != nil {
27961			err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsCreateOrUpdateFuture", "Result", vnp.Response.Response, "Failure responding to request")
27962		}
27963	}
27964	return
27965}
27966
27967// VirtualNetworkPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
27968// long-running operation.
27969type VirtualNetworkPeeringsDeleteFuture struct {
27970	azure.FutureAPI
27971	// Result returns the result of the asynchronous operation.
27972	// If the operation has not completed it will return an error.
27973	Result func(VirtualNetworkPeeringsClient) (autorest.Response, error)
27974}
27975
27976// UnmarshalJSON is the custom unmarshaller for CreateFuture.
27977func (future *VirtualNetworkPeeringsDeleteFuture) UnmarshalJSON(body []byte) error {
27978	var azFuture azure.Future
27979	if err := json.Unmarshal(body, &azFuture); err != nil {
27980		return err
27981	}
27982	future.FutureAPI = &azFuture
27983	future.Result = future.result
27984	return nil
27985}
27986
27987// result is the default implementation for VirtualNetworkPeeringsDeleteFuture.Result.
27988func (future *VirtualNetworkPeeringsDeleteFuture) result(client VirtualNetworkPeeringsClient) (ar autorest.Response, err error) {
27989	var done bool
27990	done, err = future.DoneWithContext(context.Background(), client)
27991	if err != nil {
27992		err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsDeleteFuture", "Result", future.Response(), "Polling failure")
27993		return
27994	}
27995	if !done {
27996		ar.Response = future.Response()
27997		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkPeeringsDeleteFuture")
27998		return
27999	}
28000	ar.Response = future.Response()
28001	return
28002}
28003
28004// VirtualNetworkPropertiesFormat properties of the virtual network.
28005type VirtualNetworkPropertiesFormat struct {
28006	// AddressSpace - The AddressSpace that contains an array of IP address ranges that can be used by subnets.
28007	AddressSpace *AddressSpace `json:"addressSpace,omitempty"`
28008	// DhcpOptions - The dhcpOptions that contains an array of DNS servers available to VMs deployed in the virtual network.
28009	DhcpOptions *DhcpOptions `json:"dhcpOptions,omitempty"`
28010	// Subnets - A list of subnets in a Virtual Network.
28011	Subnets *[]Subnet `json:"subnets,omitempty"`
28012	// VirtualNetworkPeerings - A list of peerings in a Virtual Network.
28013	VirtualNetworkPeerings *[]VirtualNetworkPeering `json:"virtualNetworkPeerings,omitempty"`
28014	// ResourceGUID - The resourceGuid property of the Virtual Network resource.
28015	ResourceGUID *string `json:"resourceGuid,omitempty"`
28016	// ProvisioningState - The provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
28017	ProvisioningState *string `json:"provisioningState,omitempty"`
28018	// 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.
28019	EnableDdosProtection *bool `json:"enableDdosProtection,omitempty"`
28020	// EnableVMProtection - Indicates if VM protection is enabled for all the subnets in the virtual network.
28021	EnableVMProtection *bool `json:"enableVmProtection,omitempty"`
28022	// DdosProtectionPlan - The DDoS protection plan associated with the virtual network.
28023	DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"`
28024}
28025
28026// VirtualNetworksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
28027// long-running operation.
28028type VirtualNetworksCreateOrUpdateFuture struct {
28029	azure.FutureAPI
28030	// Result returns the result of the asynchronous operation.
28031	// If the operation has not completed it will return an error.
28032	Result func(VirtualNetworksClient) (VirtualNetwork, error)
28033}
28034
28035// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28036func (future *VirtualNetworksCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
28037	var azFuture azure.Future
28038	if err := json.Unmarshal(body, &azFuture); err != nil {
28039		return err
28040	}
28041	future.FutureAPI = &azFuture
28042	future.Result = future.result
28043	return nil
28044}
28045
28046// result is the default implementation for VirtualNetworksCreateOrUpdateFuture.Result.
28047func (future *VirtualNetworksCreateOrUpdateFuture) result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
28048	var done bool
28049	done, err = future.DoneWithContext(context.Background(), client)
28050	if err != nil {
28051		err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
28052		return
28053	}
28054	if !done {
28055		vn.Response.Response = future.Response()
28056		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksCreateOrUpdateFuture")
28057		return
28058	}
28059	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
28060	if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
28061		vn, err = client.CreateOrUpdateResponder(vn.Response.Response)
28062		if err != nil {
28063			err = autorest.NewErrorWithError(err, "network.VirtualNetworksCreateOrUpdateFuture", "Result", vn.Response.Response, "Failure responding to request")
28064		}
28065	}
28066	return
28067}
28068
28069// VirtualNetworksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
28070// operation.
28071type VirtualNetworksDeleteFuture struct {
28072	azure.FutureAPI
28073	// Result returns the result of the asynchronous operation.
28074	// If the operation has not completed it will return an error.
28075	Result func(VirtualNetworksClient) (autorest.Response, error)
28076}
28077
28078// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28079func (future *VirtualNetworksDeleteFuture) UnmarshalJSON(body []byte) error {
28080	var azFuture azure.Future
28081	if err := json.Unmarshal(body, &azFuture); err != nil {
28082		return err
28083	}
28084	future.FutureAPI = &azFuture
28085	future.Result = future.result
28086	return nil
28087}
28088
28089// result is the default implementation for VirtualNetworksDeleteFuture.Result.
28090func (future *VirtualNetworksDeleteFuture) result(client VirtualNetworksClient) (ar autorest.Response, err error) {
28091	var done bool
28092	done, err = future.DoneWithContext(context.Background(), client)
28093	if err != nil {
28094		err = autorest.NewErrorWithError(err, "network.VirtualNetworksDeleteFuture", "Result", future.Response(), "Polling failure")
28095		return
28096	}
28097	if !done {
28098		ar.Response = future.Response()
28099		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksDeleteFuture")
28100		return
28101	}
28102	ar.Response = future.Response()
28103	return
28104}
28105
28106// VirtualNetworksUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
28107// long-running operation.
28108type VirtualNetworksUpdateTagsFuture struct {
28109	azure.FutureAPI
28110	// Result returns the result of the asynchronous operation.
28111	// If the operation has not completed it will return an error.
28112	Result func(VirtualNetworksClient) (VirtualNetwork, error)
28113}
28114
28115// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28116func (future *VirtualNetworksUpdateTagsFuture) UnmarshalJSON(body []byte) error {
28117	var azFuture azure.Future
28118	if err := json.Unmarshal(body, &azFuture); err != nil {
28119		return err
28120	}
28121	future.FutureAPI = &azFuture
28122	future.Result = future.result
28123	return nil
28124}
28125
28126// result is the default implementation for VirtualNetworksUpdateTagsFuture.Result.
28127func (future *VirtualNetworksUpdateTagsFuture) result(client VirtualNetworksClient) (vn VirtualNetwork, err error) {
28128	var done bool
28129	done, err = future.DoneWithContext(context.Background(), client)
28130	if err != nil {
28131		err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", future.Response(), "Polling failure")
28132		return
28133	}
28134	if !done {
28135		vn.Response.Response = future.Response()
28136		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworksUpdateTagsFuture")
28137		return
28138	}
28139	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
28140	if vn.Response.Response, err = future.GetResult(sender); err == nil && vn.Response.Response.StatusCode != http.StatusNoContent {
28141		vn, err = client.UpdateTagsResponder(vn.Response.Response)
28142		if err != nil {
28143			err = autorest.NewErrorWithError(err, "network.VirtualNetworksUpdateTagsFuture", "Result", vn.Response.Response, "Failure responding to request")
28144		}
28145	}
28146	return
28147}
28148
28149// VirtualNetworkTap virtual Network Tap resource
28150type VirtualNetworkTap struct {
28151	autorest.Response `json:"-"`
28152	// VirtualNetworkTapPropertiesFormat - Virtual Network Tap Properties.
28153	*VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"`
28154	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
28155	Etag *string `json:"etag,omitempty"`
28156	// ID - Resource ID.
28157	ID *string `json:"id,omitempty"`
28158	// Name - READ-ONLY; Resource name.
28159	Name *string `json:"name,omitempty"`
28160	// Type - READ-ONLY; Resource type.
28161	Type *string `json:"type,omitempty"`
28162	// Location - Resource location.
28163	Location *string `json:"location,omitempty"`
28164	// Tags - Resource tags.
28165	Tags map[string]*string `json:"tags"`
28166}
28167
28168// MarshalJSON is the custom marshaler for VirtualNetworkTap.
28169func (vnt VirtualNetworkTap) MarshalJSON() ([]byte, error) {
28170	objectMap := make(map[string]interface{})
28171	if vnt.VirtualNetworkTapPropertiesFormat != nil {
28172		objectMap["properties"] = vnt.VirtualNetworkTapPropertiesFormat
28173	}
28174	if vnt.Etag != nil {
28175		objectMap["etag"] = vnt.Etag
28176	}
28177	if vnt.ID != nil {
28178		objectMap["id"] = vnt.ID
28179	}
28180	if vnt.Location != nil {
28181		objectMap["location"] = vnt.Location
28182	}
28183	if vnt.Tags != nil {
28184		objectMap["tags"] = vnt.Tags
28185	}
28186	return json.Marshal(objectMap)
28187}
28188
28189// UnmarshalJSON is the custom unmarshaler for VirtualNetworkTap struct.
28190func (vnt *VirtualNetworkTap) UnmarshalJSON(body []byte) error {
28191	var m map[string]*json.RawMessage
28192	err := json.Unmarshal(body, &m)
28193	if err != nil {
28194		return err
28195	}
28196	for k, v := range m {
28197		switch k {
28198		case "properties":
28199			if v != nil {
28200				var virtualNetworkTapPropertiesFormat VirtualNetworkTapPropertiesFormat
28201				err = json.Unmarshal(*v, &virtualNetworkTapPropertiesFormat)
28202				if err != nil {
28203					return err
28204				}
28205				vnt.VirtualNetworkTapPropertiesFormat = &virtualNetworkTapPropertiesFormat
28206			}
28207		case "etag":
28208			if v != nil {
28209				var etag string
28210				err = json.Unmarshal(*v, &etag)
28211				if err != nil {
28212					return err
28213				}
28214				vnt.Etag = &etag
28215			}
28216		case "id":
28217			if v != nil {
28218				var ID string
28219				err = json.Unmarshal(*v, &ID)
28220				if err != nil {
28221					return err
28222				}
28223				vnt.ID = &ID
28224			}
28225		case "name":
28226			if v != nil {
28227				var name string
28228				err = json.Unmarshal(*v, &name)
28229				if err != nil {
28230					return err
28231				}
28232				vnt.Name = &name
28233			}
28234		case "type":
28235			if v != nil {
28236				var typeVar string
28237				err = json.Unmarshal(*v, &typeVar)
28238				if err != nil {
28239					return err
28240				}
28241				vnt.Type = &typeVar
28242			}
28243		case "location":
28244			if v != nil {
28245				var location string
28246				err = json.Unmarshal(*v, &location)
28247				if err != nil {
28248					return err
28249				}
28250				vnt.Location = &location
28251			}
28252		case "tags":
28253			if v != nil {
28254				var tags map[string]*string
28255				err = json.Unmarshal(*v, &tags)
28256				if err != nil {
28257					return err
28258				}
28259				vnt.Tags = tags
28260			}
28261		}
28262	}
28263
28264	return nil
28265}
28266
28267// VirtualNetworkTapListResult response for ListVirtualNetworkTap API service call.
28268type VirtualNetworkTapListResult struct {
28269	autorest.Response `json:"-"`
28270	// Value - A list of VirtualNetworkTaps in a resource group.
28271	Value *[]VirtualNetworkTap `json:"value,omitempty"`
28272	// NextLink - The URL to get the next set of results.
28273	NextLink *string `json:"nextLink,omitempty"`
28274}
28275
28276// VirtualNetworkTapListResultIterator provides access to a complete listing of VirtualNetworkTap values.
28277type VirtualNetworkTapListResultIterator struct {
28278	i    int
28279	page VirtualNetworkTapListResultPage
28280}
28281
28282// NextWithContext advances to the next value.  If there was an error making
28283// the request the iterator does not advance and the error is returned.
28284func (iter *VirtualNetworkTapListResultIterator) NextWithContext(ctx context.Context) (err error) {
28285	if tracing.IsEnabled() {
28286		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapListResultIterator.NextWithContext")
28287		defer func() {
28288			sc := -1
28289			if iter.Response().Response.Response != nil {
28290				sc = iter.Response().Response.Response.StatusCode
28291			}
28292			tracing.EndSpan(ctx, sc, err)
28293		}()
28294	}
28295	iter.i++
28296	if iter.i < len(iter.page.Values()) {
28297		return nil
28298	}
28299	err = iter.page.NextWithContext(ctx)
28300	if err != nil {
28301		iter.i--
28302		return err
28303	}
28304	iter.i = 0
28305	return nil
28306}
28307
28308// Next advances to the next value.  If there was an error making
28309// the request the iterator does not advance and the error is returned.
28310// Deprecated: Use NextWithContext() instead.
28311func (iter *VirtualNetworkTapListResultIterator) Next() error {
28312	return iter.NextWithContext(context.Background())
28313}
28314
28315// NotDone returns true if the enumeration should be started or is not yet complete.
28316func (iter VirtualNetworkTapListResultIterator) NotDone() bool {
28317	return iter.page.NotDone() && iter.i < len(iter.page.Values())
28318}
28319
28320// Response returns the raw server response from the last page request.
28321func (iter VirtualNetworkTapListResultIterator) Response() VirtualNetworkTapListResult {
28322	return iter.page.Response()
28323}
28324
28325// Value returns the current value or a zero-initialized value if the
28326// iterator has advanced beyond the end of the collection.
28327func (iter VirtualNetworkTapListResultIterator) Value() VirtualNetworkTap {
28328	if !iter.page.NotDone() {
28329		return VirtualNetworkTap{}
28330	}
28331	return iter.page.Values()[iter.i]
28332}
28333
28334// Creates a new instance of the VirtualNetworkTapListResultIterator type.
28335func NewVirtualNetworkTapListResultIterator(page VirtualNetworkTapListResultPage) VirtualNetworkTapListResultIterator {
28336	return VirtualNetworkTapListResultIterator{page: page}
28337}
28338
28339// IsEmpty returns true if the ListResult contains no values.
28340func (vntlr VirtualNetworkTapListResult) IsEmpty() bool {
28341	return vntlr.Value == nil || len(*vntlr.Value) == 0
28342}
28343
28344// hasNextLink returns true if the NextLink is not empty.
28345func (vntlr VirtualNetworkTapListResult) hasNextLink() bool {
28346	return vntlr.NextLink != nil && len(*vntlr.NextLink) != 0
28347}
28348
28349// virtualNetworkTapListResultPreparer prepares a request to retrieve the next set of results.
28350// It returns nil if no more results exist.
28351func (vntlr VirtualNetworkTapListResult) virtualNetworkTapListResultPreparer(ctx context.Context) (*http.Request, error) {
28352	if !vntlr.hasNextLink() {
28353		return nil, nil
28354	}
28355	return autorest.Prepare((&http.Request{}).WithContext(ctx),
28356		autorest.AsJSON(),
28357		autorest.AsGet(),
28358		autorest.WithBaseURL(to.String(vntlr.NextLink)))
28359}
28360
28361// VirtualNetworkTapListResultPage contains a page of VirtualNetworkTap values.
28362type VirtualNetworkTapListResultPage struct {
28363	fn    func(context.Context, VirtualNetworkTapListResult) (VirtualNetworkTapListResult, error)
28364	vntlr VirtualNetworkTapListResult
28365}
28366
28367// NextWithContext advances to the next page of values.  If there was an error making
28368// the request the page does not advance and the error is returned.
28369func (page *VirtualNetworkTapListResultPage) NextWithContext(ctx context.Context) (err error) {
28370	if tracing.IsEnabled() {
28371		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapListResultPage.NextWithContext")
28372		defer func() {
28373			sc := -1
28374			if page.Response().Response.Response != nil {
28375				sc = page.Response().Response.Response.StatusCode
28376			}
28377			tracing.EndSpan(ctx, sc, err)
28378		}()
28379	}
28380	for {
28381		next, err := page.fn(ctx, page.vntlr)
28382		if err != nil {
28383			return err
28384		}
28385		page.vntlr = next
28386		if !next.hasNextLink() || !next.IsEmpty() {
28387			break
28388		}
28389	}
28390	return nil
28391}
28392
28393// Next advances to the next page of values.  If there was an error making
28394// the request the page does not advance and the error is returned.
28395// Deprecated: Use NextWithContext() instead.
28396func (page *VirtualNetworkTapListResultPage) Next() error {
28397	return page.NextWithContext(context.Background())
28398}
28399
28400// NotDone returns true if the page enumeration should be started or is not yet complete.
28401func (page VirtualNetworkTapListResultPage) NotDone() bool {
28402	return !page.vntlr.IsEmpty()
28403}
28404
28405// Response returns the raw server response from the last page request.
28406func (page VirtualNetworkTapListResultPage) Response() VirtualNetworkTapListResult {
28407	return page.vntlr
28408}
28409
28410// Values returns the slice of values for the current page or nil if there are no values.
28411func (page VirtualNetworkTapListResultPage) Values() []VirtualNetworkTap {
28412	if page.vntlr.IsEmpty() {
28413		return nil
28414	}
28415	return *page.vntlr.Value
28416}
28417
28418// Creates a new instance of the VirtualNetworkTapListResultPage type.
28419func NewVirtualNetworkTapListResultPage(cur VirtualNetworkTapListResult, getNextPage func(context.Context, VirtualNetworkTapListResult) (VirtualNetworkTapListResult, error)) VirtualNetworkTapListResultPage {
28420	return VirtualNetworkTapListResultPage{
28421		fn:    getNextPage,
28422		vntlr: cur,
28423	}
28424}
28425
28426// VirtualNetworkTapPropertiesFormat virtual Network Tap properties.
28427type VirtualNetworkTapPropertiesFormat struct {
28428	// NetworkInterfaceTapConfigurations - READ-ONLY; Specifies the list of resource IDs for the network interface IP configuration that needs to be tapped.
28429	NetworkInterfaceTapConfigurations *[]InterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"`
28430	// ResourceGUID - READ-ONLY; The resourceGuid property of the virtual network tap.
28431	ResourceGUID *string `json:"resourceGuid,omitempty"`
28432	// ProvisioningState - READ-ONLY; The provisioning state of the virtual network tap. Possible values are: 'Updating', 'Deleting', and 'Failed'.
28433	ProvisioningState *string `json:"provisioningState,omitempty"`
28434	// DestinationNetworkInterfaceIPConfiguration - The reference to the private IP Address of the collector nic that will receive the tap
28435	DestinationNetworkInterfaceIPConfiguration *InterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"`
28436	// DestinationLoadBalancerFrontEndIPConfiguration - The reference to the private IP address on the internal Load Balancer that will receive the tap
28437	DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"`
28438	// DestinationPort - The VXLAN destination port that will receive the tapped traffic.
28439	DestinationPort *int32 `json:"destinationPort,omitempty"`
28440}
28441
28442// MarshalJSON is the custom marshaler for VirtualNetworkTapPropertiesFormat.
28443func (vntpf VirtualNetworkTapPropertiesFormat) MarshalJSON() ([]byte, error) {
28444	objectMap := make(map[string]interface{})
28445	if vntpf.DestinationNetworkInterfaceIPConfiguration != nil {
28446		objectMap["destinationNetworkInterfaceIPConfiguration"] = vntpf.DestinationNetworkInterfaceIPConfiguration
28447	}
28448	if vntpf.DestinationLoadBalancerFrontEndIPConfiguration != nil {
28449		objectMap["destinationLoadBalancerFrontEndIPConfiguration"] = vntpf.DestinationLoadBalancerFrontEndIPConfiguration
28450	}
28451	if vntpf.DestinationPort != nil {
28452		objectMap["destinationPort"] = vntpf.DestinationPort
28453	}
28454	return json.Marshal(objectMap)
28455}
28456
28457// VirtualNetworkTapsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
28458// long-running operation.
28459type VirtualNetworkTapsCreateOrUpdateFuture struct {
28460	azure.FutureAPI
28461	// Result returns the result of the asynchronous operation.
28462	// If the operation has not completed it will return an error.
28463	Result func(VirtualNetworkTapsClient) (VirtualNetworkTap, error)
28464}
28465
28466// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28467func (future *VirtualNetworkTapsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
28468	var azFuture azure.Future
28469	if err := json.Unmarshal(body, &azFuture); err != nil {
28470		return err
28471	}
28472	future.FutureAPI = &azFuture
28473	future.Result = future.result
28474	return nil
28475}
28476
28477// result is the default implementation for VirtualNetworkTapsCreateOrUpdateFuture.Result.
28478func (future *VirtualNetworkTapsCreateOrUpdateFuture) result(client VirtualNetworkTapsClient) (vnt VirtualNetworkTap, err error) {
28479	var done bool
28480	done, err = future.DoneWithContext(context.Background(), client)
28481	if err != nil {
28482		err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
28483		return
28484	}
28485	if !done {
28486		vnt.Response.Response = future.Response()
28487		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkTapsCreateOrUpdateFuture")
28488		return
28489	}
28490	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
28491	if vnt.Response.Response, err = future.GetResult(sender); err == nil && vnt.Response.Response.StatusCode != http.StatusNoContent {
28492		vnt, err = client.CreateOrUpdateResponder(vnt.Response.Response)
28493		if err != nil {
28494			err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsCreateOrUpdateFuture", "Result", vnt.Response.Response, "Failure responding to request")
28495		}
28496	}
28497	return
28498}
28499
28500// VirtualNetworkTapsDeleteFuture an abstraction for monitoring and retrieving the results of a
28501// long-running operation.
28502type VirtualNetworkTapsDeleteFuture struct {
28503	azure.FutureAPI
28504	// Result returns the result of the asynchronous operation.
28505	// If the operation has not completed it will return an error.
28506	Result func(VirtualNetworkTapsClient) (autorest.Response, error)
28507}
28508
28509// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28510func (future *VirtualNetworkTapsDeleteFuture) UnmarshalJSON(body []byte) error {
28511	var azFuture azure.Future
28512	if err := json.Unmarshal(body, &azFuture); err != nil {
28513		return err
28514	}
28515	future.FutureAPI = &azFuture
28516	future.Result = future.result
28517	return nil
28518}
28519
28520// result is the default implementation for VirtualNetworkTapsDeleteFuture.Result.
28521func (future *VirtualNetworkTapsDeleteFuture) result(client VirtualNetworkTapsClient) (ar autorest.Response, err error) {
28522	var done bool
28523	done, err = future.DoneWithContext(context.Background(), client)
28524	if err != nil {
28525		err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsDeleteFuture", "Result", future.Response(), "Polling failure")
28526		return
28527	}
28528	if !done {
28529		ar.Response = future.Response()
28530		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkTapsDeleteFuture")
28531		return
28532	}
28533	ar.Response = future.Response()
28534	return
28535}
28536
28537// VirtualNetworkTapsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
28538// long-running operation.
28539type VirtualNetworkTapsUpdateTagsFuture struct {
28540	azure.FutureAPI
28541	// Result returns the result of the asynchronous operation.
28542	// If the operation has not completed it will return an error.
28543	Result func(VirtualNetworkTapsClient) (VirtualNetworkTap, error)
28544}
28545
28546// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28547func (future *VirtualNetworkTapsUpdateTagsFuture) UnmarshalJSON(body []byte) error {
28548	var azFuture azure.Future
28549	if err := json.Unmarshal(body, &azFuture); err != nil {
28550		return err
28551	}
28552	future.FutureAPI = &azFuture
28553	future.Result = future.result
28554	return nil
28555}
28556
28557// result is the default implementation for VirtualNetworkTapsUpdateTagsFuture.Result.
28558func (future *VirtualNetworkTapsUpdateTagsFuture) result(client VirtualNetworkTapsClient) (vnt VirtualNetworkTap, err error) {
28559	var done bool
28560	done, err = future.DoneWithContext(context.Background(), client)
28561	if err != nil {
28562		err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
28563		return
28564	}
28565	if !done {
28566		vnt.Response.Response = future.Response()
28567		err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkTapsUpdateTagsFuture")
28568		return
28569	}
28570	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
28571	if vnt.Response.Response, err = future.GetResult(sender); err == nil && vnt.Response.Response.StatusCode != http.StatusNoContent {
28572		vnt, err = client.UpdateTagsResponder(vnt.Response.Response)
28573		if err != nil {
28574			err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsUpdateTagsFuture", "Result", vnt.Response.Response, "Failure responding to request")
28575		}
28576	}
28577	return
28578}
28579
28580// VirtualNetworkUsage usage details for subnet.
28581type VirtualNetworkUsage struct {
28582	// CurrentValue - READ-ONLY; Indicates number of IPs used from the Subnet.
28583	CurrentValue *float64 `json:"currentValue,omitempty"`
28584	// ID - READ-ONLY; Subnet identifier.
28585	ID *string `json:"id,omitempty"`
28586	// Limit - READ-ONLY; Indicates the size of the subnet.
28587	Limit *float64 `json:"limit,omitempty"`
28588	// Name - READ-ONLY; The name containing common and localized value for usage.
28589	Name *VirtualNetworkUsageName `json:"name,omitempty"`
28590	// Unit - READ-ONLY; Usage units. Returns 'Count'
28591	Unit *string `json:"unit,omitempty"`
28592}
28593
28594// MarshalJSON is the custom marshaler for VirtualNetworkUsage.
28595func (vnu VirtualNetworkUsage) MarshalJSON() ([]byte, error) {
28596	objectMap := make(map[string]interface{})
28597	return json.Marshal(objectMap)
28598}
28599
28600// VirtualNetworkUsageName usage strings container.
28601type VirtualNetworkUsageName struct {
28602	// LocalizedValue - READ-ONLY; Localized subnet size and usage string.
28603	LocalizedValue *string `json:"localizedValue,omitempty"`
28604	// Value - READ-ONLY; Subnet size and usage string.
28605	Value *string `json:"value,omitempty"`
28606}
28607
28608// MarshalJSON is the custom marshaler for VirtualNetworkUsageName.
28609func (vnun VirtualNetworkUsageName) MarshalJSON() ([]byte, error) {
28610	objectMap := make(map[string]interface{})
28611	return json.Marshal(objectMap)
28612}
28613
28614// VirtualWAN virtualWAN Resource.
28615type VirtualWAN struct {
28616	autorest.Response     `json:"-"`
28617	*VirtualWanProperties `json:"properties,omitempty"`
28618	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
28619	Etag *string `json:"etag,omitempty"`
28620	// ID - Resource ID.
28621	ID *string `json:"id,omitempty"`
28622	// Name - READ-ONLY; Resource name.
28623	Name *string `json:"name,omitempty"`
28624	// Type - READ-ONLY; Resource type.
28625	Type *string `json:"type,omitempty"`
28626	// Location - Resource location.
28627	Location *string `json:"location,omitempty"`
28628	// Tags - Resource tags.
28629	Tags map[string]*string `json:"tags"`
28630}
28631
28632// MarshalJSON is the custom marshaler for VirtualWAN.
28633func (vw VirtualWAN) MarshalJSON() ([]byte, error) {
28634	objectMap := make(map[string]interface{})
28635	if vw.VirtualWanProperties != nil {
28636		objectMap["properties"] = vw.VirtualWanProperties
28637	}
28638	if vw.ID != nil {
28639		objectMap["id"] = vw.ID
28640	}
28641	if vw.Location != nil {
28642		objectMap["location"] = vw.Location
28643	}
28644	if vw.Tags != nil {
28645		objectMap["tags"] = vw.Tags
28646	}
28647	return json.Marshal(objectMap)
28648}
28649
28650// UnmarshalJSON is the custom unmarshaler for VirtualWAN struct.
28651func (vw *VirtualWAN) UnmarshalJSON(body []byte) error {
28652	var m map[string]*json.RawMessage
28653	err := json.Unmarshal(body, &m)
28654	if err != nil {
28655		return err
28656	}
28657	for k, v := range m {
28658		switch k {
28659		case "properties":
28660			if v != nil {
28661				var virtualWanProperties VirtualWanProperties
28662				err = json.Unmarshal(*v, &virtualWanProperties)
28663				if err != nil {
28664					return err
28665				}
28666				vw.VirtualWanProperties = &virtualWanProperties
28667			}
28668		case "etag":
28669			if v != nil {
28670				var etag string
28671				err = json.Unmarshal(*v, &etag)
28672				if err != nil {
28673					return err
28674				}
28675				vw.Etag = &etag
28676			}
28677		case "id":
28678			if v != nil {
28679				var ID string
28680				err = json.Unmarshal(*v, &ID)
28681				if err != nil {
28682					return err
28683				}
28684				vw.ID = &ID
28685			}
28686		case "name":
28687			if v != nil {
28688				var name string
28689				err = json.Unmarshal(*v, &name)
28690				if err != nil {
28691					return err
28692				}
28693				vw.Name = &name
28694			}
28695		case "type":
28696			if v != nil {
28697				var typeVar string
28698				err = json.Unmarshal(*v, &typeVar)
28699				if err != nil {
28700					return err
28701				}
28702				vw.Type = &typeVar
28703			}
28704		case "location":
28705			if v != nil {
28706				var location string
28707				err = json.Unmarshal(*v, &location)
28708				if err != nil {
28709					return err
28710				}
28711				vw.Location = &location
28712			}
28713		case "tags":
28714			if v != nil {
28715				var tags map[string]*string
28716				err = json.Unmarshal(*v, &tags)
28717				if err != nil {
28718					return err
28719				}
28720				vw.Tags = tags
28721			}
28722		}
28723	}
28724
28725	return nil
28726}
28727
28728// VirtualWanProperties parameters for VirtualWAN
28729type VirtualWanProperties struct {
28730	// DisableVpnEncryption - Vpn encryption to be disabled or not.
28731	DisableVpnEncryption *bool `json:"disableVpnEncryption,omitempty"`
28732	// VirtualHubs - READ-ONLY; List of VirtualHubs in the VirtualWAN.
28733	VirtualHubs *[]SubResource `json:"virtualHubs,omitempty"`
28734	// VpnSites - READ-ONLY
28735	VpnSites *[]SubResource `json:"vpnSites,omitempty"`
28736	// SecurityProviderName - The Security Provider name.
28737	SecurityProviderName *string `json:"securityProviderName,omitempty"`
28738	// AllowBranchToBranchTraffic - True if branch to branch traffic is allowed.
28739	AllowBranchToBranchTraffic *bool `json:"allowBranchToBranchTraffic,omitempty"`
28740	// AllowVnetToVnetTraffic - True if Vnet to Vnet traffic is allowed.
28741	AllowVnetToVnetTraffic *bool `json:"allowVnetToVnetTraffic,omitempty"`
28742	// Office365LocalBreakoutCategory - The office local breakout category. Possible values include: 'OfficeTrafficCategoryOptimize', 'OfficeTrafficCategoryOptimizeAndAllow', 'OfficeTrafficCategoryAll', 'OfficeTrafficCategoryNone'
28743	Office365LocalBreakoutCategory OfficeTrafficCategory `json:"office365LocalBreakoutCategory,omitempty"`
28744	// P2SVpnServerConfigurations - list of all P2SVpnServerConfigurations associated with the virtual wan.
28745	P2SVpnServerConfigurations *[]P2SVpnServerConfiguration `json:"p2SVpnServerConfigurations,omitempty"`
28746	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
28747	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
28748}
28749
28750// MarshalJSON is the custom marshaler for VirtualWanProperties.
28751func (vwp VirtualWanProperties) MarshalJSON() ([]byte, error) {
28752	objectMap := make(map[string]interface{})
28753	if vwp.DisableVpnEncryption != nil {
28754		objectMap["disableVpnEncryption"] = vwp.DisableVpnEncryption
28755	}
28756	if vwp.SecurityProviderName != nil {
28757		objectMap["securityProviderName"] = vwp.SecurityProviderName
28758	}
28759	if vwp.AllowBranchToBranchTraffic != nil {
28760		objectMap["allowBranchToBranchTraffic"] = vwp.AllowBranchToBranchTraffic
28761	}
28762	if vwp.AllowVnetToVnetTraffic != nil {
28763		objectMap["allowVnetToVnetTraffic"] = vwp.AllowVnetToVnetTraffic
28764	}
28765	if vwp.Office365LocalBreakoutCategory != "" {
28766		objectMap["office365LocalBreakoutCategory"] = vwp.Office365LocalBreakoutCategory
28767	}
28768	if vwp.P2SVpnServerConfigurations != nil {
28769		objectMap["p2SVpnServerConfigurations"] = vwp.P2SVpnServerConfigurations
28770	}
28771	if vwp.ProvisioningState != "" {
28772		objectMap["provisioningState"] = vwp.ProvisioningState
28773	}
28774	return json.Marshal(objectMap)
28775}
28776
28777// VirtualWansCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
28778// long-running operation.
28779type VirtualWansCreateOrUpdateFuture struct {
28780	azure.FutureAPI
28781	// Result returns the result of the asynchronous operation.
28782	// If the operation has not completed it will return an error.
28783	Result func(VirtualWansClient) (VirtualWAN, error)
28784}
28785
28786// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28787func (future *VirtualWansCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
28788	var azFuture azure.Future
28789	if err := json.Unmarshal(body, &azFuture); err != nil {
28790		return err
28791	}
28792	future.FutureAPI = &azFuture
28793	future.Result = future.result
28794	return nil
28795}
28796
28797// result is the default implementation for VirtualWansCreateOrUpdateFuture.Result.
28798func (future *VirtualWansCreateOrUpdateFuture) result(client VirtualWansClient) (vw VirtualWAN, err error) {
28799	var done bool
28800	done, err = future.DoneWithContext(context.Background(), client)
28801	if err != nil {
28802		err = autorest.NewErrorWithError(err, "network.VirtualWansCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
28803		return
28804	}
28805	if !done {
28806		vw.Response.Response = future.Response()
28807		err = azure.NewAsyncOpIncompleteError("network.VirtualWansCreateOrUpdateFuture")
28808		return
28809	}
28810	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
28811	if vw.Response.Response, err = future.GetResult(sender); err == nil && vw.Response.Response.StatusCode != http.StatusNoContent {
28812		vw, err = client.CreateOrUpdateResponder(vw.Response.Response)
28813		if err != nil {
28814			err = autorest.NewErrorWithError(err, "network.VirtualWansCreateOrUpdateFuture", "Result", vw.Response.Response, "Failure responding to request")
28815		}
28816	}
28817	return
28818}
28819
28820// VirtualWansDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
28821// operation.
28822type VirtualWansDeleteFuture struct {
28823	azure.FutureAPI
28824	// Result returns the result of the asynchronous operation.
28825	// If the operation has not completed it will return an error.
28826	Result func(VirtualWansClient) (autorest.Response, error)
28827}
28828
28829// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28830func (future *VirtualWansDeleteFuture) UnmarshalJSON(body []byte) error {
28831	var azFuture azure.Future
28832	if err := json.Unmarshal(body, &azFuture); err != nil {
28833		return err
28834	}
28835	future.FutureAPI = &azFuture
28836	future.Result = future.result
28837	return nil
28838}
28839
28840// result is the default implementation for VirtualWansDeleteFuture.Result.
28841func (future *VirtualWansDeleteFuture) result(client VirtualWansClient) (ar autorest.Response, err error) {
28842	var done bool
28843	done, err = future.DoneWithContext(context.Background(), client)
28844	if err != nil {
28845		err = autorest.NewErrorWithError(err, "network.VirtualWansDeleteFuture", "Result", future.Response(), "Polling failure")
28846		return
28847	}
28848	if !done {
28849		ar.Response = future.Response()
28850		err = azure.NewAsyncOpIncompleteError("network.VirtualWansDeleteFuture")
28851		return
28852	}
28853	ar.Response = future.Response()
28854	return
28855}
28856
28857// VirtualWanSecurityProvider collection of SecurityProviders.
28858type VirtualWanSecurityProvider struct {
28859	// Name - Name of the security provider.
28860	Name *string `json:"name,omitempty"`
28861	// URL - Url of the security provider.
28862	URL *string `json:"url,omitempty"`
28863	// Type - Name of the security provider. Possible values include: 'External', 'Native'
28864	Type VirtualWanSecurityProviderType `json:"type,omitempty"`
28865}
28866
28867// VirtualWanSecurityProviders collection of SecurityProviders.
28868type VirtualWanSecurityProviders struct {
28869	autorest.Response  `json:"-"`
28870	SupportedProviders *[]VirtualWanSecurityProvider `json:"supportedProviders,omitempty"`
28871}
28872
28873// VirtualWansUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
28874// operation.
28875type VirtualWansUpdateTagsFuture 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(VirtualWansClient) (VirtualWAN, error)
28880}
28881
28882// UnmarshalJSON is the custom unmarshaller for CreateFuture.
28883func (future *VirtualWansUpdateTagsFuture) 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 VirtualWansUpdateTagsFuture.Result.
28894func (future *VirtualWansUpdateTagsFuture) result(client VirtualWansClient) (vw VirtualWAN, err error) {
28895	var done bool
28896	done, err = future.DoneWithContext(context.Background(), client)
28897	if err != nil {
28898		err = autorest.NewErrorWithError(err, "network.VirtualWansUpdateTagsFuture", "Result", future.Response(), "Polling failure")
28899		return
28900	}
28901	if !done {
28902		vw.Response.Response = future.Response()
28903		err = azure.NewAsyncOpIncompleteError("network.VirtualWansUpdateTagsFuture")
28904		return
28905	}
28906	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
28907	if vw.Response.Response, err = future.GetResult(sender); err == nil && vw.Response.Response.StatusCode != http.StatusNoContent {
28908		vw, err = client.UpdateTagsResponder(vw.Response.Response)
28909		if err != nil {
28910			err = autorest.NewErrorWithError(err, "network.VirtualWansUpdateTagsFuture", "Result", vw.Response.Response, "Failure responding to request")
28911		}
28912	}
28913	return
28914}
28915
28916// VpnClientConfiguration vpnClientConfiguration for P2S client.
28917type VpnClientConfiguration struct {
28918	// VpnClientAddressPool - The reference of the address space resource which represents Address space for P2S VpnClient.
28919	VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"`
28920	// VpnClientRootCertificates - VpnClientRootCertificate for virtual network gateway.
28921	VpnClientRootCertificates *[]VpnClientRootCertificate `json:"vpnClientRootCertificates,omitempty"`
28922	// VpnClientRevokedCertificates - VpnClientRevokedCertificate for Virtual network gateway.
28923	VpnClientRevokedCertificates *[]VpnClientRevokedCertificate `json:"vpnClientRevokedCertificates,omitempty"`
28924	// VpnClientProtocols - VpnClientProtocols for Virtual network gateway.
28925	VpnClientProtocols *[]VpnClientProtocol `json:"vpnClientProtocols,omitempty"`
28926	// VpnClientIpsecPolicies - VpnClientIpsecPolicies for virtual network gateway P2S client.
28927	VpnClientIpsecPolicies *[]IpsecPolicy `json:"vpnClientIpsecPolicies,omitempty"`
28928	// RadiusServerAddress - The radius server address property of the VirtualNetworkGateway resource for vpn client connection.
28929	RadiusServerAddress *string `json:"radiusServerAddress,omitempty"`
28930	// RadiusServerSecret - The radius secret property of the VirtualNetworkGateway resource for vpn client connection.
28931	RadiusServerSecret *string `json:"radiusServerSecret,omitempty"`
28932}
28933
28934// VpnClientConnectionHealth vpnClientConnectionHealth properties
28935type VpnClientConnectionHealth struct {
28936	// TotalIngressBytesTransferred - READ-ONLY; Total of the Ingress Bytes Transferred in this P2S Vpn connection
28937	TotalIngressBytesTransferred *int64 `json:"totalIngressBytesTransferred,omitempty"`
28938	// TotalEgressBytesTransferred - READ-ONLY; Total of the Egress Bytes Transferred in this connection
28939	TotalEgressBytesTransferred *int64 `json:"totalEgressBytesTransferred,omitempty"`
28940	// VpnClientConnectionsCount - The total of p2s vpn clients connected at this time to this P2SVpnGateway.
28941	VpnClientConnectionsCount *int32 `json:"vpnClientConnectionsCount,omitempty"`
28942	// AllocatedIPAddresses - List of allocated ip addresses to the connected p2s vpn clients.
28943	AllocatedIPAddresses *[]string `json:"allocatedIpAddresses,omitempty"`
28944}
28945
28946// MarshalJSON is the custom marshaler for VpnClientConnectionHealth.
28947func (vcch VpnClientConnectionHealth) MarshalJSON() ([]byte, error) {
28948	objectMap := make(map[string]interface{})
28949	if vcch.VpnClientConnectionsCount != nil {
28950		objectMap["vpnClientConnectionsCount"] = vcch.VpnClientConnectionsCount
28951	}
28952	if vcch.AllocatedIPAddresses != nil {
28953		objectMap["allocatedIpAddresses"] = vcch.AllocatedIPAddresses
28954	}
28955	return json.Marshal(objectMap)
28956}
28957
28958// VpnClientIPsecParameters an IPSec parameters for a virtual network gateway P2S connection.
28959type VpnClientIPsecParameters struct {
28960	autorest.Response `json:"-"`
28961	// SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for P2S client.
28962	SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"`
28963	// SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for P2S client..
28964	SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"`
28965	// IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256'
28966	IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"`
28967	// IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256'
28968	IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"`
28969	// IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128'
28970	IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"`
28971	// IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'IkeIntegrityMD5', 'IkeIntegritySHA1', 'IkeIntegritySHA256', 'IkeIntegritySHA384', 'IkeIntegrityGCMAES256', 'IkeIntegrityGCMAES128'
28972	IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"`
28973	// DhGroup - The DH Groups used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24'
28974	DhGroup DhGroup `json:"dhGroup,omitempty"`
28975	// 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'
28976	PfsGroup PfsGroup `json:"pfsGroup,omitempty"`
28977}
28978
28979// VpnClientParameters vpn Client Parameters for package generation
28980type VpnClientParameters struct {
28981	// ProcessorArchitecture - VPN client Processor Architecture. Possible values are: 'AMD64' and 'X86'. Possible values include: 'Amd64', 'X86'
28982	ProcessorArchitecture ProcessorArchitecture `json:"processorArchitecture,omitempty"`
28983	// AuthenticationMethod - VPN client Authentication Method. Possible values are: 'EAPTLS' and 'EAPMSCHAPv2'. Possible values include: 'EAPTLS', 'EAPMSCHAPv2'
28984	AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"`
28985	// 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.
28986	RadiusServerAuthCertificate *string `json:"radiusServerAuthCertificate,omitempty"`
28987	// ClientRootCertificates - A list of client root certificates public certificate data encoded as Base-64 strings. Optional parameter for external radius based authentication with EAPTLS.
28988	ClientRootCertificates *[]string `json:"clientRootCertificates,omitempty"`
28989}
28990
28991// VpnClientRevokedCertificate VPN client revoked certificate of virtual network gateway.
28992type VpnClientRevokedCertificate struct {
28993	// VpnClientRevokedCertificatePropertiesFormat - Properties of the vpn client revoked certificate.
28994	*VpnClientRevokedCertificatePropertiesFormat `json:"properties,omitempty"`
28995	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
28996	Name *string `json:"name,omitempty"`
28997	// Etag - A unique read-only string that changes whenever the resource is updated.
28998	Etag *string `json:"etag,omitempty"`
28999	// ID - Resource ID.
29000	ID *string `json:"id,omitempty"`
29001}
29002
29003// MarshalJSON is the custom marshaler for VpnClientRevokedCertificate.
29004func (vcrc VpnClientRevokedCertificate) MarshalJSON() ([]byte, error) {
29005	objectMap := make(map[string]interface{})
29006	if vcrc.VpnClientRevokedCertificatePropertiesFormat != nil {
29007		objectMap["properties"] = vcrc.VpnClientRevokedCertificatePropertiesFormat
29008	}
29009	if vcrc.Name != nil {
29010		objectMap["name"] = vcrc.Name
29011	}
29012	if vcrc.Etag != nil {
29013		objectMap["etag"] = vcrc.Etag
29014	}
29015	if vcrc.ID != nil {
29016		objectMap["id"] = vcrc.ID
29017	}
29018	return json.Marshal(objectMap)
29019}
29020
29021// UnmarshalJSON is the custom unmarshaler for VpnClientRevokedCertificate struct.
29022func (vcrc *VpnClientRevokedCertificate) UnmarshalJSON(body []byte) error {
29023	var m map[string]*json.RawMessage
29024	err := json.Unmarshal(body, &m)
29025	if err != nil {
29026		return err
29027	}
29028	for k, v := range m {
29029		switch k {
29030		case "properties":
29031			if v != nil {
29032				var vpnClientRevokedCertificatePropertiesFormat VpnClientRevokedCertificatePropertiesFormat
29033				err = json.Unmarshal(*v, &vpnClientRevokedCertificatePropertiesFormat)
29034				if err != nil {
29035					return err
29036				}
29037				vcrc.VpnClientRevokedCertificatePropertiesFormat = &vpnClientRevokedCertificatePropertiesFormat
29038			}
29039		case "name":
29040			if v != nil {
29041				var name string
29042				err = json.Unmarshal(*v, &name)
29043				if err != nil {
29044					return err
29045				}
29046				vcrc.Name = &name
29047			}
29048		case "etag":
29049			if v != nil {
29050				var etag string
29051				err = json.Unmarshal(*v, &etag)
29052				if err != nil {
29053					return err
29054				}
29055				vcrc.Etag = &etag
29056			}
29057		case "id":
29058			if v != nil {
29059				var ID string
29060				err = json.Unmarshal(*v, &ID)
29061				if err != nil {
29062					return err
29063				}
29064				vcrc.ID = &ID
29065			}
29066		}
29067	}
29068
29069	return nil
29070}
29071
29072// VpnClientRevokedCertificatePropertiesFormat properties of the revoked VPN client certificate of virtual
29073// network gateway.
29074type VpnClientRevokedCertificatePropertiesFormat struct {
29075	// Thumbprint - The revoked VPN client certificate thumbprint.
29076	Thumbprint *string `json:"thumbprint,omitempty"`
29077	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client revoked certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
29078	ProvisioningState *string `json:"provisioningState,omitempty"`
29079}
29080
29081// MarshalJSON is the custom marshaler for VpnClientRevokedCertificatePropertiesFormat.
29082func (vcrcpf VpnClientRevokedCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
29083	objectMap := make(map[string]interface{})
29084	if vcrcpf.Thumbprint != nil {
29085		objectMap["thumbprint"] = vcrcpf.Thumbprint
29086	}
29087	return json.Marshal(objectMap)
29088}
29089
29090// VpnClientRootCertificate VPN client root certificate of virtual network gateway
29091type VpnClientRootCertificate struct {
29092	// VpnClientRootCertificatePropertiesFormat - Properties of the vpn client root certificate.
29093	*VpnClientRootCertificatePropertiesFormat `json:"properties,omitempty"`
29094	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
29095	Name *string `json:"name,omitempty"`
29096	// Etag - A unique read-only string that changes whenever the resource is updated.
29097	Etag *string `json:"etag,omitempty"`
29098	// ID - Resource ID.
29099	ID *string `json:"id,omitempty"`
29100}
29101
29102// MarshalJSON is the custom marshaler for VpnClientRootCertificate.
29103func (vcrc VpnClientRootCertificate) MarshalJSON() ([]byte, error) {
29104	objectMap := make(map[string]interface{})
29105	if vcrc.VpnClientRootCertificatePropertiesFormat != nil {
29106		objectMap["properties"] = vcrc.VpnClientRootCertificatePropertiesFormat
29107	}
29108	if vcrc.Name != nil {
29109		objectMap["name"] = vcrc.Name
29110	}
29111	if vcrc.Etag != nil {
29112		objectMap["etag"] = vcrc.Etag
29113	}
29114	if vcrc.ID != nil {
29115		objectMap["id"] = vcrc.ID
29116	}
29117	return json.Marshal(objectMap)
29118}
29119
29120// UnmarshalJSON is the custom unmarshaler for VpnClientRootCertificate struct.
29121func (vcrc *VpnClientRootCertificate) UnmarshalJSON(body []byte) error {
29122	var m map[string]*json.RawMessage
29123	err := json.Unmarshal(body, &m)
29124	if err != nil {
29125		return err
29126	}
29127	for k, v := range m {
29128		switch k {
29129		case "properties":
29130			if v != nil {
29131				var vpnClientRootCertificatePropertiesFormat VpnClientRootCertificatePropertiesFormat
29132				err = json.Unmarshal(*v, &vpnClientRootCertificatePropertiesFormat)
29133				if err != nil {
29134					return err
29135				}
29136				vcrc.VpnClientRootCertificatePropertiesFormat = &vpnClientRootCertificatePropertiesFormat
29137			}
29138		case "name":
29139			if v != nil {
29140				var name string
29141				err = json.Unmarshal(*v, &name)
29142				if err != nil {
29143					return err
29144				}
29145				vcrc.Name = &name
29146			}
29147		case "etag":
29148			if v != nil {
29149				var etag string
29150				err = json.Unmarshal(*v, &etag)
29151				if err != nil {
29152					return err
29153				}
29154				vcrc.Etag = &etag
29155			}
29156		case "id":
29157			if v != nil {
29158				var ID string
29159				err = json.Unmarshal(*v, &ID)
29160				if err != nil {
29161					return err
29162				}
29163				vcrc.ID = &ID
29164			}
29165		}
29166	}
29167
29168	return nil
29169}
29170
29171// VpnClientRootCertificatePropertiesFormat properties of SSL certificates of application gateway
29172type VpnClientRootCertificatePropertiesFormat struct {
29173	// PublicCertData - The certificate public data.
29174	PublicCertData *string `json:"publicCertData,omitempty"`
29175	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
29176	ProvisioningState *string `json:"provisioningState,omitempty"`
29177}
29178
29179// MarshalJSON is the custom marshaler for VpnClientRootCertificatePropertiesFormat.
29180func (vcrcpf VpnClientRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
29181	objectMap := make(map[string]interface{})
29182	if vcrcpf.PublicCertData != nil {
29183		objectMap["publicCertData"] = vcrcpf.PublicCertData
29184	}
29185	return json.Marshal(objectMap)
29186}
29187
29188// VpnConnection vpnConnection Resource.
29189type VpnConnection struct {
29190	autorest.Response        `json:"-"`
29191	*VpnConnectionProperties `json:"properties,omitempty"`
29192	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
29193	Name *string `json:"name,omitempty"`
29194	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
29195	Etag *string `json:"etag,omitempty"`
29196	// ID - Resource ID.
29197	ID *string `json:"id,omitempty"`
29198}
29199
29200// MarshalJSON is the custom marshaler for VpnConnection.
29201func (vc VpnConnection) MarshalJSON() ([]byte, error) {
29202	objectMap := make(map[string]interface{})
29203	if vc.VpnConnectionProperties != nil {
29204		objectMap["properties"] = vc.VpnConnectionProperties
29205	}
29206	if vc.Name != nil {
29207		objectMap["name"] = vc.Name
29208	}
29209	if vc.ID != nil {
29210		objectMap["id"] = vc.ID
29211	}
29212	return json.Marshal(objectMap)
29213}
29214
29215// UnmarshalJSON is the custom unmarshaler for VpnConnection struct.
29216func (vc *VpnConnection) UnmarshalJSON(body []byte) error {
29217	var m map[string]*json.RawMessage
29218	err := json.Unmarshal(body, &m)
29219	if err != nil {
29220		return err
29221	}
29222	for k, v := range m {
29223		switch k {
29224		case "properties":
29225			if v != nil {
29226				var vpnConnectionProperties VpnConnectionProperties
29227				err = json.Unmarshal(*v, &vpnConnectionProperties)
29228				if err != nil {
29229					return err
29230				}
29231				vc.VpnConnectionProperties = &vpnConnectionProperties
29232			}
29233		case "name":
29234			if v != nil {
29235				var name string
29236				err = json.Unmarshal(*v, &name)
29237				if err != nil {
29238					return err
29239				}
29240				vc.Name = &name
29241			}
29242		case "etag":
29243			if v != nil {
29244				var etag string
29245				err = json.Unmarshal(*v, &etag)
29246				if err != nil {
29247					return err
29248				}
29249				vc.Etag = &etag
29250			}
29251		case "id":
29252			if v != nil {
29253				var ID string
29254				err = json.Unmarshal(*v, &ID)
29255				if err != nil {
29256					return err
29257				}
29258				vc.ID = &ID
29259			}
29260		}
29261	}
29262
29263	return nil
29264}
29265
29266// VpnConnectionProperties parameters for VpnConnection
29267type VpnConnectionProperties struct {
29268	// RemoteVpnSite - Id of the connected vpn site.
29269	RemoteVpnSite *SubResource `json:"remoteVpnSite,omitempty"`
29270	// RoutingWeight - routing weight for vpn connection.
29271	RoutingWeight *int32 `json:"routingWeight,omitempty"`
29272	// ConnectionStatus - The connection status. Possible values include: 'VpnConnectionStatusUnknown', 'VpnConnectionStatusConnecting', 'VpnConnectionStatusConnected', 'VpnConnectionStatusNotConnected'
29273	ConnectionStatus VpnConnectionStatus `json:"connectionStatus,omitempty"`
29274	// VpnConnectionProtocolType - Connection protocol used for this connection. Possible values include: 'IKEv2', 'IKEv1'
29275	VpnConnectionProtocolType VirtualNetworkGatewayConnectionProtocol `json:"vpnConnectionProtocolType,omitempty"`
29276	// IngressBytesTransferred - READ-ONLY; Ingress bytes transferred.
29277	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
29278	// EgressBytesTransferred - READ-ONLY; Egress bytes transferred.
29279	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
29280	// ConnectionBandwidth - Expected bandwidth in MBPS.
29281	ConnectionBandwidth *int32 `json:"connectionBandwidth,omitempty"`
29282	// SharedKey - SharedKey for the vpn connection.
29283	SharedKey *string `json:"sharedKey,omitempty"`
29284	// EnableBgp - EnableBgp flag
29285	EnableBgp *bool `json:"enableBgp,omitempty"`
29286	// IpsecPolicies - The IPSec Policies to be considered by this connection.
29287	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
29288	// EnableRateLimiting - EnableBgp flag
29289	EnableRateLimiting *bool `json:"enableRateLimiting,omitempty"`
29290	// EnableInternetSecurity - Enable internet security
29291	EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"`
29292	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
29293	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
29294}
29295
29296// MarshalJSON is the custom marshaler for VpnConnectionProperties.
29297func (vcp VpnConnectionProperties) MarshalJSON() ([]byte, error) {
29298	objectMap := make(map[string]interface{})
29299	if vcp.RemoteVpnSite != nil {
29300		objectMap["remoteVpnSite"] = vcp.RemoteVpnSite
29301	}
29302	if vcp.RoutingWeight != nil {
29303		objectMap["routingWeight"] = vcp.RoutingWeight
29304	}
29305	if vcp.ConnectionStatus != "" {
29306		objectMap["connectionStatus"] = vcp.ConnectionStatus
29307	}
29308	if vcp.VpnConnectionProtocolType != "" {
29309		objectMap["vpnConnectionProtocolType"] = vcp.VpnConnectionProtocolType
29310	}
29311	if vcp.ConnectionBandwidth != nil {
29312		objectMap["connectionBandwidth"] = vcp.ConnectionBandwidth
29313	}
29314	if vcp.SharedKey != nil {
29315		objectMap["sharedKey"] = vcp.SharedKey
29316	}
29317	if vcp.EnableBgp != nil {
29318		objectMap["enableBgp"] = vcp.EnableBgp
29319	}
29320	if vcp.IpsecPolicies != nil {
29321		objectMap["ipsecPolicies"] = vcp.IpsecPolicies
29322	}
29323	if vcp.EnableRateLimiting != nil {
29324		objectMap["enableRateLimiting"] = vcp.EnableRateLimiting
29325	}
29326	if vcp.EnableInternetSecurity != nil {
29327		objectMap["enableInternetSecurity"] = vcp.EnableInternetSecurity
29328	}
29329	if vcp.ProvisioningState != "" {
29330		objectMap["provisioningState"] = vcp.ProvisioningState
29331	}
29332	return json.Marshal(objectMap)
29333}
29334
29335// VpnConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
29336// long-running operation.
29337type VpnConnectionsCreateOrUpdateFuture struct {
29338	azure.FutureAPI
29339	// Result returns the result of the asynchronous operation.
29340	// If the operation has not completed it will return an error.
29341	Result func(VpnConnectionsClient) (VpnConnection, error)
29342}
29343
29344// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29345func (future *VpnConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
29346	var azFuture azure.Future
29347	if err := json.Unmarshal(body, &azFuture); err != nil {
29348		return err
29349	}
29350	future.FutureAPI = &azFuture
29351	future.Result = future.result
29352	return nil
29353}
29354
29355// result is the default implementation for VpnConnectionsCreateOrUpdateFuture.Result.
29356func (future *VpnConnectionsCreateOrUpdateFuture) result(client VpnConnectionsClient) (vc VpnConnection, err error) {
29357	var done bool
29358	done, err = future.DoneWithContext(context.Background(), client)
29359	if err != nil {
29360		err = autorest.NewErrorWithError(err, "network.VpnConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
29361		return
29362	}
29363	if !done {
29364		vc.Response.Response = future.Response()
29365		err = azure.NewAsyncOpIncompleteError("network.VpnConnectionsCreateOrUpdateFuture")
29366		return
29367	}
29368	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
29369	if vc.Response.Response, err = future.GetResult(sender); err == nil && vc.Response.Response.StatusCode != http.StatusNoContent {
29370		vc, err = client.CreateOrUpdateResponder(vc.Response.Response)
29371		if err != nil {
29372			err = autorest.NewErrorWithError(err, "network.VpnConnectionsCreateOrUpdateFuture", "Result", vc.Response.Response, "Failure responding to request")
29373		}
29374	}
29375	return
29376}
29377
29378// VpnConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
29379// operation.
29380type VpnConnectionsDeleteFuture struct {
29381	azure.FutureAPI
29382	// Result returns the result of the asynchronous operation.
29383	// If the operation has not completed it will return an error.
29384	Result func(VpnConnectionsClient) (autorest.Response, error)
29385}
29386
29387// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29388func (future *VpnConnectionsDeleteFuture) UnmarshalJSON(body []byte) error {
29389	var azFuture azure.Future
29390	if err := json.Unmarshal(body, &azFuture); err != nil {
29391		return err
29392	}
29393	future.FutureAPI = &azFuture
29394	future.Result = future.result
29395	return nil
29396}
29397
29398// result is the default implementation for VpnConnectionsDeleteFuture.Result.
29399func (future *VpnConnectionsDeleteFuture) result(client VpnConnectionsClient) (ar autorest.Response, err error) {
29400	var done bool
29401	done, err = future.DoneWithContext(context.Background(), client)
29402	if err != nil {
29403		err = autorest.NewErrorWithError(err, "network.VpnConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
29404		return
29405	}
29406	if !done {
29407		ar.Response = future.Response()
29408		err = azure.NewAsyncOpIncompleteError("network.VpnConnectionsDeleteFuture")
29409		return
29410	}
29411	ar.Response = future.Response()
29412	return
29413}
29414
29415// VpnDeviceScriptParameters vpn device configuration script generation parameters
29416type VpnDeviceScriptParameters struct {
29417	// Vendor - The vendor for the vpn device.
29418	Vendor *string `json:"vendor,omitempty"`
29419	// DeviceFamily - The device family for the vpn device.
29420	DeviceFamily *string `json:"deviceFamily,omitempty"`
29421	// FirmwareVersion - The firmware version for the vpn device.
29422	FirmwareVersion *string `json:"firmwareVersion,omitempty"`
29423}
29424
29425// VpnGateway vpnGateway Resource.
29426type VpnGateway struct {
29427	autorest.Response     `json:"-"`
29428	*VpnGatewayProperties `json:"properties,omitempty"`
29429	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
29430	Etag *string `json:"etag,omitempty"`
29431	// ID - Resource ID.
29432	ID *string `json:"id,omitempty"`
29433	// Name - READ-ONLY; Resource name.
29434	Name *string `json:"name,omitempty"`
29435	// Type - READ-ONLY; Resource type.
29436	Type *string `json:"type,omitempty"`
29437	// Location - Resource location.
29438	Location *string `json:"location,omitempty"`
29439	// Tags - Resource tags.
29440	Tags map[string]*string `json:"tags"`
29441}
29442
29443// MarshalJSON is the custom marshaler for VpnGateway.
29444func (vg VpnGateway) MarshalJSON() ([]byte, error) {
29445	objectMap := make(map[string]interface{})
29446	if vg.VpnGatewayProperties != nil {
29447		objectMap["properties"] = vg.VpnGatewayProperties
29448	}
29449	if vg.ID != nil {
29450		objectMap["id"] = vg.ID
29451	}
29452	if vg.Location != nil {
29453		objectMap["location"] = vg.Location
29454	}
29455	if vg.Tags != nil {
29456		objectMap["tags"] = vg.Tags
29457	}
29458	return json.Marshal(objectMap)
29459}
29460
29461// UnmarshalJSON is the custom unmarshaler for VpnGateway struct.
29462func (vg *VpnGateway) UnmarshalJSON(body []byte) error {
29463	var m map[string]*json.RawMessage
29464	err := json.Unmarshal(body, &m)
29465	if err != nil {
29466		return err
29467	}
29468	for k, v := range m {
29469		switch k {
29470		case "properties":
29471			if v != nil {
29472				var vpnGatewayProperties VpnGatewayProperties
29473				err = json.Unmarshal(*v, &vpnGatewayProperties)
29474				if err != nil {
29475					return err
29476				}
29477				vg.VpnGatewayProperties = &vpnGatewayProperties
29478			}
29479		case "etag":
29480			if v != nil {
29481				var etag string
29482				err = json.Unmarshal(*v, &etag)
29483				if err != nil {
29484					return err
29485				}
29486				vg.Etag = &etag
29487			}
29488		case "id":
29489			if v != nil {
29490				var ID string
29491				err = json.Unmarshal(*v, &ID)
29492				if err != nil {
29493					return err
29494				}
29495				vg.ID = &ID
29496			}
29497		case "name":
29498			if v != nil {
29499				var name string
29500				err = json.Unmarshal(*v, &name)
29501				if err != nil {
29502					return err
29503				}
29504				vg.Name = &name
29505			}
29506		case "type":
29507			if v != nil {
29508				var typeVar string
29509				err = json.Unmarshal(*v, &typeVar)
29510				if err != nil {
29511					return err
29512				}
29513				vg.Type = &typeVar
29514			}
29515		case "location":
29516			if v != nil {
29517				var location string
29518				err = json.Unmarshal(*v, &location)
29519				if err != nil {
29520					return err
29521				}
29522				vg.Location = &location
29523			}
29524		case "tags":
29525			if v != nil {
29526				var tags map[string]*string
29527				err = json.Unmarshal(*v, &tags)
29528				if err != nil {
29529					return err
29530				}
29531				vg.Tags = tags
29532			}
29533		}
29534	}
29535
29536	return nil
29537}
29538
29539// VpnGatewayProperties parameters for VpnGateway
29540type VpnGatewayProperties struct {
29541	// VirtualHub - The VirtualHub to which the gateway belongs
29542	VirtualHub *SubResource `json:"virtualHub,omitempty"`
29543	// Connections - list of all vpn connections to the gateway.
29544	Connections *[]VpnConnection `json:"connections,omitempty"`
29545	// BgpSettings - Local network gateway's BGP speaker settings.
29546	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
29547	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
29548	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
29549	// VpnGatewayScaleUnit - The scale unit for this vpn gateway.
29550	VpnGatewayScaleUnit *int32 `json:"vpnGatewayScaleUnit,omitempty"`
29551}
29552
29553// VpnGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
29554// long-running operation.
29555type VpnGatewaysCreateOrUpdateFuture struct {
29556	azure.FutureAPI
29557	// Result returns the result of the asynchronous operation.
29558	// If the operation has not completed it will return an error.
29559	Result func(VpnGatewaysClient) (VpnGateway, error)
29560}
29561
29562// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29563func (future *VpnGatewaysCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
29564	var azFuture azure.Future
29565	if err := json.Unmarshal(body, &azFuture); err != nil {
29566		return err
29567	}
29568	future.FutureAPI = &azFuture
29569	future.Result = future.result
29570	return nil
29571}
29572
29573// result is the default implementation for VpnGatewaysCreateOrUpdateFuture.Result.
29574func (future *VpnGatewaysCreateOrUpdateFuture) result(client VpnGatewaysClient) (vg VpnGateway, err error) {
29575	var done bool
29576	done, err = future.DoneWithContext(context.Background(), client)
29577	if err != nil {
29578		err = autorest.NewErrorWithError(err, "network.VpnGatewaysCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
29579		return
29580	}
29581	if !done {
29582		vg.Response.Response = future.Response()
29583		err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysCreateOrUpdateFuture")
29584		return
29585	}
29586	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
29587	if vg.Response.Response, err = future.GetResult(sender); err == nil && vg.Response.Response.StatusCode != http.StatusNoContent {
29588		vg, err = client.CreateOrUpdateResponder(vg.Response.Response)
29589		if err != nil {
29590			err = autorest.NewErrorWithError(err, "network.VpnGatewaysCreateOrUpdateFuture", "Result", vg.Response.Response, "Failure responding to request")
29591		}
29592	}
29593	return
29594}
29595
29596// VpnGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
29597// operation.
29598type VpnGatewaysDeleteFuture struct {
29599	azure.FutureAPI
29600	// Result returns the result of the asynchronous operation.
29601	// If the operation has not completed it will return an error.
29602	Result func(VpnGatewaysClient) (autorest.Response, error)
29603}
29604
29605// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29606func (future *VpnGatewaysDeleteFuture) UnmarshalJSON(body []byte) error {
29607	var azFuture azure.Future
29608	if err := json.Unmarshal(body, &azFuture); err != nil {
29609		return err
29610	}
29611	future.FutureAPI = &azFuture
29612	future.Result = future.result
29613	return nil
29614}
29615
29616// result is the default implementation for VpnGatewaysDeleteFuture.Result.
29617func (future *VpnGatewaysDeleteFuture) result(client VpnGatewaysClient) (ar autorest.Response, err error) {
29618	var done bool
29619	done, err = future.DoneWithContext(context.Background(), client)
29620	if err != nil {
29621		err = autorest.NewErrorWithError(err, "network.VpnGatewaysDeleteFuture", "Result", future.Response(), "Polling failure")
29622		return
29623	}
29624	if !done {
29625		ar.Response = future.Response()
29626		err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysDeleteFuture")
29627		return
29628	}
29629	ar.Response = future.Response()
29630	return
29631}
29632
29633// VpnGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
29634// operation.
29635type VpnGatewaysUpdateTagsFuture struct {
29636	azure.FutureAPI
29637	// Result returns the result of the asynchronous operation.
29638	// If the operation has not completed it will return an error.
29639	Result func(VpnGatewaysClient) (VpnGateway, error)
29640}
29641
29642// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29643func (future *VpnGatewaysUpdateTagsFuture) UnmarshalJSON(body []byte) error {
29644	var azFuture azure.Future
29645	if err := json.Unmarshal(body, &azFuture); err != nil {
29646		return err
29647	}
29648	future.FutureAPI = &azFuture
29649	future.Result = future.result
29650	return nil
29651}
29652
29653// result is the default implementation for VpnGatewaysUpdateTagsFuture.Result.
29654func (future *VpnGatewaysUpdateTagsFuture) result(client VpnGatewaysClient) (vg VpnGateway, err error) {
29655	var done bool
29656	done, err = future.DoneWithContext(context.Background(), client)
29657	if err != nil {
29658		err = autorest.NewErrorWithError(err, "network.VpnGatewaysUpdateTagsFuture", "Result", future.Response(), "Polling failure")
29659		return
29660	}
29661	if !done {
29662		vg.Response.Response = future.Response()
29663		err = azure.NewAsyncOpIncompleteError("network.VpnGatewaysUpdateTagsFuture")
29664		return
29665	}
29666	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
29667	if vg.Response.Response, err = future.GetResult(sender); err == nil && vg.Response.Response.StatusCode != http.StatusNoContent {
29668		vg, err = client.UpdateTagsResponder(vg.Response.Response)
29669		if err != nil {
29670			err = autorest.NewErrorWithError(err, "network.VpnGatewaysUpdateTagsFuture", "Result", vg.Response.Response, "Failure responding to request")
29671		}
29672	}
29673	return
29674}
29675
29676// VpnProfileResponse vpn Profile Response for package generation
29677type VpnProfileResponse struct {
29678	autorest.Response `json:"-"`
29679	// ProfileURL - URL to the VPN profile
29680	ProfileURL *string `json:"profileUrl,omitempty"`
29681}
29682
29683// VpnSite vpnSite Resource.
29684type VpnSite struct {
29685	autorest.Response  `json:"-"`
29686	*VpnSiteProperties `json:"properties,omitempty"`
29687	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
29688	Etag *string `json:"etag,omitempty"`
29689	// ID - Resource ID.
29690	ID *string `json:"id,omitempty"`
29691	// Name - READ-ONLY; Resource name.
29692	Name *string `json:"name,omitempty"`
29693	// Type - READ-ONLY; Resource type.
29694	Type *string `json:"type,omitempty"`
29695	// Location - Resource location.
29696	Location *string `json:"location,omitempty"`
29697	// Tags - Resource tags.
29698	Tags map[string]*string `json:"tags"`
29699}
29700
29701// MarshalJSON is the custom marshaler for VpnSite.
29702func (vs VpnSite) MarshalJSON() ([]byte, error) {
29703	objectMap := make(map[string]interface{})
29704	if vs.VpnSiteProperties != nil {
29705		objectMap["properties"] = vs.VpnSiteProperties
29706	}
29707	if vs.ID != nil {
29708		objectMap["id"] = vs.ID
29709	}
29710	if vs.Location != nil {
29711		objectMap["location"] = vs.Location
29712	}
29713	if vs.Tags != nil {
29714		objectMap["tags"] = vs.Tags
29715	}
29716	return json.Marshal(objectMap)
29717}
29718
29719// UnmarshalJSON is the custom unmarshaler for VpnSite struct.
29720func (vs *VpnSite) UnmarshalJSON(body []byte) error {
29721	var m map[string]*json.RawMessage
29722	err := json.Unmarshal(body, &m)
29723	if err != nil {
29724		return err
29725	}
29726	for k, v := range m {
29727		switch k {
29728		case "properties":
29729			if v != nil {
29730				var vpnSiteProperties VpnSiteProperties
29731				err = json.Unmarshal(*v, &vpnSiteProperties)
29732				if err != nil {
29733					return err
29734				}
29735				vs.VpnSiteProperties = &vpnSiteProperties
29736			}
29737		case "etag":
29738			if v != nil {
29739				var etag string
29740				err = json.Unmarshal(*v, &etag)
29741				if err != nil {
29742					return err
29743				}
29744				vs.Etag = &etag
29745			}
29746		case "id":
29747			if v != nil {
29748				var ID string
29749				err = json.Unmarshal(*v, &ID)
29750				if err != nil {
29751					return err
29752				}
29753				vs.ID = &ID
29754			}
29755		case "name":
29756			if v != nil {
29757				var name string
29758				err = json.Unmarshal(*v, &name)
29759				if err != nil {
29760					return err
29761				}
29762				vs.Name = &name
29763			}
29764		case "type":
29765			if v != nil {
29766				var typeVar string
29767				err = json.Unmarshal(*v, &typeVar)
29768				if err != nil {
29769					return err
29770				}
29771				vs.Type = &typeVar
29772			}
29773		case "location":
29774			if v != nil {
29775				var location string
29776				err = json.Unmarshal(*v, &location)
29777				if err != nil {
29778					return err
29779				}
29780				vs.Location = &location
29781			}
29782		case "tags":
29783			if v != nil {
29784				var tags map[string]*string
29785				err = json.Unmarshal(*v, &tags)
29786				if err != nil {
29787					return err
29788				}
29789				vs.Tags = tags
29790			}
29791		}
29792	}
29793
29794	return nil
29795}
29796
29797// VpnSiteID vpnSite Resource.
29798type VpnSiteID struct {
29799	// VpnSite - READ-ONLY; The resource-uri of the vpn-site for which config is to be fetched.
29800	VpnSite *string `json:"vpnSite,omitempty"`
29801}
29802
29803// MarshalJSON is the custom marshaler for VpnSiteID.
29804func (vsi VpnSiteID) MarshalJSON() ([]byte, error) {
29805	objectMap := make(map[string]interface{})
29806	return json.Marshal(objectMap)
29807}
29808
29809// VpnSiteProperties parameters for VpnSite
29810type VpnSiteProperties struct {
29811	// VirtualWan - The VirtualWAN to which the vpnSite belongs
29812	VirtualWan *SubResource `json:"virtualWan,omitempty"`
29813	// DeviceProperties - The device properties
29814	DeviceProperties *DeviceProperties `json:"deviceProperties,omitempty"`
29815	// IPAddress - The ip-address for the vpn-site.
29816	IPAddress *string `json:"ipAddress,omitempty"`
29817	// SiteKey - The key for vpn-site that can be used for connections.
29818	SiteKey *string `json:"siteKey,omitempty"`
29819	// AddressSpace - The AddressSpace that contains an array of IP address ranges.
29820	AddressSpace *AddressSpace `json:"addressSpace,omitempty"`
29821	// BgpProperties - The set of bgp properties.
29822	BgpProperties *BgpSettings `json:"bgpProperties,omitempty"`
29823	// ProvisioningState - The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
29824	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
29825	// IsSecuritySite - IsSecuritySite flag
29826	IsSecuritySite *bool `json:"isSecuritySite,omitempty"`
29827}
29828
29829// VpnSitesConfigurationDownloadFuture an abstraction for monitoring and retrieving the results of a
29830// long-running operation.
29831type VpnSitesConfigurationDownloadFuture struct {
29832	azure.FutureAPI
29833	// Result returns the result of the asynchronous operation.
29834	// If the operation has not completed it will return an error.
29835	Result func(VpnSitesConfigurationClient) (autorest.Response, error)
29836}
29837
29838// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29839func (future *VpnSitesConfigurationDownloadFuture) UnmarshalJSON(body []byte) error {
29840	var azFuture azure.Future
29841	if err := json.Unmarshal(body, &azFuture); err != nil {
29842		return err
29843	}
29844	future.FutureAPI = &azFuture
29845	future.Result = future.result
29846	return nil
29847}
29848
29849// result is the default implementation for VpnSitesConfigurationDownloadFuture.Result.
29850func (future *VpnSitesConfigurationDownloadFuture) result(client VpnSitesConfigurationClient) (ar autorest.Response, err error) {
29851	var done bool
29852	done, err = future.DoneWithContext(context.Background(), client)
29853	if err != nil {
29854		err = autorest.NewErrorWithError(err, "network.VpnSitesConfigurationDownloadFuture", "Result", future.Response(), "Polling failure")
29855		return
29856	}
29857	if !done {
29858		ar.Response = future.Response()
29859		err = azure.NewAsyncOpIncompleteError("network.VpnSitesConfigurationDownloadFuture")
29860		return
29861	}
29862	ar.Response = future.Response()
29863	return
29864}
29865
29866// VpnSitesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
29867// operation.
29868type VpnSitesCreateOrUpdateFuture struct {
29869	azure.FutureAPI
29870	// Result returns the result of the asynchronous operation.
29871	// If the operation has not completed it will return an error.
29872	Result func(VpnSitesClient) (VpnSite, error)
29873}
29874
29875// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29876func (future *VpnSitesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
29877	var azFuture azure.Future
29878	if err := json.Unmarshal(body, &azFuture); err != nil {
29879		return err
29880	}
29881	future.FutureAPI = &azFuture
29882	future.Result = future.result
29883	return nil
29884}
29885
29886// result is the default implementation for VpnSitesCreateOrUpdateFuture.Result.
29887func (future *VpnSitesCreateOrUpdateFuture) result(client VpnSitesClient) (vs VpnSite, err error) {
29888	var done bool
29889	done, err = future.DoneWithContext(context.Background(), client)
29890	if err != nil {
29891		err = autorest.NewErrorWithError(err, "network.VpnSitesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
29892		return
29893	}
29894	if !done {
29895		vs.Response.Response = future.Response()
29896		err = azure.NewAsyncOpIncompleteError("network.VpnSitesCreateOrUpdateFuture")
29897		return
29898	}
29899	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
29900	if vs.Response.Response, err = future.GetResult(sender); err == nil && vs.Response.Response.StatusCode != http.StatusNoContent {
29901		vs, err = client.CreateOrUpdateResponder(vs.Response.Response)
29902		if err != nil {
29903			err = autorest.NewErrorWithError(err, "network.VpnSitesCreateOrUpdateFuture", "Result", vs.Response.Response, "Failure responding to request")
29904		}
29905	}
29906	return
29907}
29908
29909// VpnSitesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
29910// operation.
29911type VpnSitesDeleteFuture struct {
29912	azure.FutureAPI
29913	// Result returns the result of the asynchronous operation.
29914	// If the operation has not completed it will return an error.
29915	Result func(VpnSitesClient) (autorest.Response, error)
29916}
29917
29918// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29919func (future *VpnSitesDeleteFuture) UnmarshalJSON(body []byte) error {
29920	var azFuture azure.Future
29921	if err := json.Unmarshal(body, &azFuture); err != nil {
29922		return err
29923	}
29924	future.FutureAPI = &azFuture
29925	future.Result = future.result
29926	return nil
29927}
29928
29929// result is the default implementation for VpnSitesDeleteFuture.Result.
29930func (future *VpnSitesDeleteFuture) result(client VpnSitesClient) (ar autorest.Response, err error) {
29931	var done bool
29932	done, err = future.DoneWithContext(context.Background(), client)
29933	if err != nil {
29934		err = autorest.NewErrorWithError(err, "network.VpnSitesDeleteFuture", "Result", future.Response(), "Polling failure")
29935		return
29936	}
29937	if !done {
29938		ar.Response = future.Response()
29939		err = azure.NewAsyncOpIncompleteError("network.VpnSitesDeleteFuture")
29940		return
29941	}
29942	ar.Response = future.Response()
29943	return
29944}
29945
29946// VpnSitesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
29947// operation.
29948type VpnSitesUpdateTagsFuture struct {
29949	azure.FutureAPI
29950	// Result returns the result of the asynchronous operation.
29951	// If the operation has not completed it will return an error.
29952	Result func(VpnSitesClient) (VpnSite, error)
29953}
29954
29955// UnmarshalJSON is the custom unmarshaller for CreateFuture.
29956func (future *VpnSitesUpdateTagsFuture) UnmarshalJSON(body []byte) error {
29957	var azFuture azure.Future
29958	if err := json.Unmarshal(body, &azFuture); err != nil {
29959		return err
29960	}
29961	future.FutureAPI = &azFuture
29962	future.Result = future.result
29963	return nil
29964}
29965
29966// result is the default implementation for VpnSitesUpdateTagsFuture.Result.
29967func (future *VpnSitesUpdateTagsFuture) result(client VpnSitesClient) (vs VpnSite, err error) {
29968	var done bool
29969	done, err = future.DoneWithContext(context.Background(), client)
29970	if err != nil {
29971		err = autorest.NewErrorWithError(err, "network.VpnSitesUpdateTagsFuture", "Result", future.Response(), "Polling failure")
29972		return
29973	}
29974	if !done {
29975		vs.Response.Response = future.Response()
29976		err = azure.NewAsyncOpIncompleteError("network.VpnSitesUpdateTagsFuture")
29977		return
29978	}
29979	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
29980	if vs.Response.Response, err = future.GetResult(sender); err == nil && vs.Response.Response.StatusCode != http.StatusNoContent {
29981		vs, err = client.UpdateTagsResponder(vs.Response.Response)
29982		if err != nil {
29983			err = autorest.NewErrorWithError(err, "network.VpnSitesUpdateTagsFuture", "Result", vs.Response.Response, "Failure responding to request")
29984		}
29985	}
29986	return
29987}
29988
29989// Watcher network watcher in a resource group.
29990type Watcher struct {
29991	autorest.Response `json:"-"`
29992	// Etag - A unique read-only string that changes whenever the resource is updated.
29993	Etag                     *string `json:"etag,omitempty"`
29994	*WatcherPropertiesFormat `json:"properties,omitempty"`
29995	// ID - Resource ID.
29996	ID *string `json:"id,omitempty"`
29997	// Name - READ-ONLY; Resource name.
29998	Name *string `json:"name,omitempty"`
29999	// Type - READ-ONLY; Resource type.
30000	Type *string `json:"type,omitempty"`
30001	// Location - Resource location.
30002	Location *string `json:"location,omitempty"`
30003	// Tags - Resource tags.
30004	Tags map[string]*string `json:"tags"`
30005}
30006
30007// MarshalJSON is the custom marshaler for Watcher.
30008func (w Watcher) MarshalJSON() ([]byte, error) {
30009	objectMap := make(map[string]interface{})
30010	if w.Etag != nil {
30011		objectMap["etag"] = w.Etag
30012	}
30013	if w.WatcherPropertiesFormat != nil {
30014		objectMap["properties"] = w.WatcherPropertiesFormat
30015	}
30016	if w.ID != nil {
30017		objectMap["id"] = w.ID
30018	}
30019	if w.Location != nil {
30020		objectMap["location"] = w.Location
30021	}
30022	if w.Tags != nil {
30023		objectMap["tags"] = w.Tags
30024	}
30025	return json.Marshal(objectMap)
30026}
30027
30028// UnmarshalJSON is the custom unmarshaler for Watcher struct.
30029func (w *Watcher) UnmarshalJSON(body []byte) error {
30030	var m map[string]*json.RawMessage
30031	err := json.Unmarshal(body, &m)
30032	if err != nil {
30033		return err
30034	}
30035	for k, v := range m {
30036		switch k {
30037		case "etag":
30038			if v != nil {
30039				var etag string
30040				err = json.Unmarshal(*v, &etag)
30041				if err != nil {
30042					return err
30043				}
30044				w.Etag = &etag
30045			}
30046		case "properties":
30047			if v != nil {
30048				var watcherPropertiesFormat WatcherPropertiesFormat
30049				err = json.Unmarshal(*v, &watcherPropertiesFormat)
30050				if err != nil {
30051					return err
30052				}
30053				w.WatcherPropertiesFormat = &watcherPropertiesFormat
30054			}
30055		case "id":
30056			if v != nil {
30057				var ID string
30058				err = json.Unmarshal(*v, &ID)
30059				if err != nil {
30060					return err
30061				}
30062				w.ID = &ID
30063			}
30064		case "name":
30065			if v != nil {
30066				var name string
30067				err = json.Unmarshal(*v, &name)
30068				if err != nil {
30069					return err
30070				}
30071				w.Name = &name
30072			}
30073		case "type":
30074			if v != nil {
30075				var typeVar string
30076				err = json.Unmarshal(*v, &typeVar)
30077				if err != nil {
30078					return err
30079				}
30080				w.Type = &typeVar
30081			}
30082		case "location":
30083			if v != nil {
30084				var location string
30085				err = json.Unmarshal(*v, &location)
30086				if err != nil {
30087					return err
30088				}
30089				w.Location = &location
30090			}
30091		case "tags":
30092			if v != nil {
30093				var tags map[string]*string
30094				err = json.Unmarshal(*v, &tags)
30095				if err != nil {
30096					return err
30097				}
30098				w.Tags = tags
30099			}
30100		}
30101	}
30102
30103	return nil
30104}
30105
30106// WatcherListResult list of network watcher resources.
30107type WatcherListResult struct {
30108	autorest.Response `json:"-"`
30109	Value             *[]Watcher `json:"value,omitempty"`
30110}
30111
30112// WatcherPropertiesFormat the network watcher properties.
30113type WatcherPropertiesFormat struct {
30114	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
30115	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
30116}
30117
30118// MarshalJSON is the custom marshaler for WatcherPropertiesFormat.
30119func (wpf WatcherPropertiesFormat) MarshalJSON() ([]byte, error) {
30120	objectMap := make(map[string]interface{})
30121	return json.Marshal(objectMap)
30122}
30123
30124// WatchersCheckConnectivityFuture an abstraction for monitoring and retrieving the results of a
30125// long-running operation.
30126type WatchersCheckConnectivityFuture struct {
30127	azure.FutureAPI
30128	// Result returns the result of the asynchronous operation.
30129	// If the operation has not completed it will return an error.
30130	Result func(WatchersClient) (ConnectivityInformation, error)
30131}
30132
30133// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30134func (future *WatchersCheckConnectivityFuture) UnmarshalJSON(body []byte) error {
30135	var azFuture azure.Future
30136	if err := json.Unmarshal(body, &azFuture); err != nil {
30137		return err
30138	}
30139	future.FutureAPI = &azFuture
30140	future.Result = future.result
30141	return nil
30142}
30143
30144// result is the default implementation for WatchersCheckConnectivityFuture.Result.
30145func (future *WatchersCheckConnectivityFuture) result(client WatchersClient) (ci ConnectivityInformation, err error) {
30146	var done bool
30147	done, err = future.DoneWithContext(context.Background(), client)
30148	if err != nil {
30149		err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", future.Response(), "Polling failure")
30150		return
30151	}
30152	if !done {
30153		ci.Response.Response = future.Response()
30154		err = azure.NewAsyncOpIncompleteError("network.WatchersCheckConnectivityFuture")
30155		return
30156	}
30157	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
30158	if ci.Response.Response, err = future.GetResult(sender); err == nil && ci.Response.Response.StatusCode != http.StatusNoContent {
30159		ci, err = client.CheckConnectivityResponder(ci.Response.Response)
30160		if err != nil {
30161			err = autorest.NewErrorWithError(err, "network.WatchersCheckConnectivityFuture", "Result", ci.Response.Response, "Failure responding to request")
30162		}
30163	}
30164	return
30165}
30166
30167// WatchersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
30168// operation.
30169type WatchersDeleteFuture struct {
30170	azure.FutureAPI
30171	// Result returns the result of the asynchronous operation.
30172	// If the operation has not completed it will return an error.
30173	Result func(WatchersClient) (autorest.Response, error)
30174}
30175
30176// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30177func (future *WatchersDeleteFuture) UnmarshalJSON(body []byte) error {
30178	var azFuture azure.Future
30179	if err := json.Unmarshal(body, &azFuture); err != nil {
30180		return err
30181	}
30182	future.FutureAPI = &azFuture
30183	future.Result = future.result
30184	return nil
30185}
30186
30187// result is the default implementation for WatchersDeleteFuture.Result.
30188func (future *WatchersDeleteFuture) result(client WatchersClient) (ar autorest.Response, err error) {
30189	var done bool
30190	done, err = future.DoneWithContext(context.Background(), client)
30191	if err != nil {
30192		err = autorest.NewErrorWithError(err, "network.WatchersDeleteFuture", "Result", future.Response(), "Polling failure")
30193		return
30194	}
30195	if !done {
30196		ar.Response = future.Response()
30197		err = azure.NewAsyncOpIncompleteError("network.WatchersDeleteFuture")
30198		return
30199	}
30200	ar.Response = future.Response()
30201	return
30202}
30203
30204// WatchersGetAzureReachabilityReportFuture an abstraction for monitoring and retrieving the results of a
30205// long-running operation.
30206type WatchersGetAzureReachabilityReportFuture struct {
30207	azure.FutureAPI
30208	// Result returns the result of the asynchronous operation.
30209	// If the operation has not completed it will return an error.
30210	Result func(WatchersClient) (AzureReachabilityReport, error)
30211}
30212
30213// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30214func (future *WatchersGetAzureReachabilityReportFuture) UnmarshalJSON(body []byte) error {
30215	var azFuture azure.Future
30216	if err := json.Unmarshal(body, &azFuture); err != nil {
30217		return err
30218	}
30219	future.FutureAPI = &azFuture
30220	future.Result = future.result
30221	return nil
30222}
30223
30224// result is the default implementation for WatchersGetAzureReachabilityReportFuture.Result.
30225func (future *WatchersGetAzureReachabilityReportFuture) result(client WatchersClient) (arr AzureReachabilityReport, err error) {
30226	var done bool
30227	done, err = future.DoneWithContext(context.Background(), client)
30228	if err != nil {
30229		err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", future.Response(), "Polling failure")
30230		return
30231	}
30232	if !done {
30233		arr.Response.Response = future.Response()
30234		err = azure.NewAsyncOpIncompleteError("network.WatchersGetAzureReachabilityReportFuture")
30235		return
30236	}
30237	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
30238	if arr.Response.Response, err = future.GetResult(sender); err == nil && arr.Response.Response.StatusCode != http.StatusNoContent {
30239		arr, err = client.GetAzureReachabilityReportResponder(arr.Response.Response)
30240		if err != nil {
30241			err = autorest.NewErrorWithError(err, "network.WatchersGetAzureReachabilityReportFuture", "Result", arr.Response.Response, "Failure responding to request")
30242		}
30243	}
30244	return
30245}
30246
30247// WatchersGetFlowLogStatusFuture an abstraction for monitoring and retrieving the results of a
30248// long-running operation.
30249type WatchersGetFlowLogStatusFuture struct {
30250	azure.FutureAPI
30251	// Result returns the result of the asynchronous operation.
30252	// If the operation has not completed it will return an error.
30253	Result func(WatchersClient) (FlowLogInformation, error)
30254}
30255
30256// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30257func (future *WatchersGetFlowLogStatusFuture) UnmarshalJSON(body []byte) error {
30258	var azFuture azure.Future
30259	if err := json.Unmarshal(body, &azFuture); err != nil {
30260		return err
30261	}
30262	future.FutureAPI = &azFuture
30263	future.Result = future.result
30264	return nil
30265}
30266
30267// result is the default implementation for WatchersGetFlowLogStatusFuture.Result.
30268func (future *WatchersGetFlowLogStatusFuture) result(client WatchersClient) (fli FlowLogInformation, err error) {
30269	var done bool
30270	done, err = future.DoneWithContext(context.Background(), client)
30271	if err != nil {
30272		err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", future.Response(), "Polling failure")
30273		return
30274	}
30275	if !done {
30276		fli.Response.Response = future.Response()
30277		err = azure.NewAsyncOpIncompleteError("network.WatchersGetFlowLogStatusFuture")
30278		return
30279	}
30280	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
30281	if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
30282		fli, err = client.GetFlowLogStatusResponder(fli.Response.Response)
30283		if err != nil {
30284			err = autorest.NewErrorWithError(err, "network.WatchersGetFlowLogStatusFuture", "Result", fli.Response.Response, "Failure responding to request")
30285		}
30286	}
30287	return
30288}
30289
30290// WatchersGetNetworkConfigurationDiagnosticFuture an abstraction for monitoring and retrieving the results
30291// of a long-running operation.
30292type WatchersGetNetworkConfigurationDiagnosticFuture struct {
30293	azure.FutureAPI
30294	// Result returns the result of the asynchronous operation.
30295	// If the operation has not completed it will return an error.
30296	Result func(WatchersClient) (ConfigurationDiagnosticResponse, error)
30297}
30298
30299// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30300func (future *WatchersGetNetworkConfigurationDiagnosticFuture) UnmarshalJSON(body []byte) error {
30301	var azFuture azure.Future
30302	if err := json.Unmarshal(body, &azFuture); err != nil {
30303		return err
30304	}
30305	future.FutureAPI = &azFuture
30306	future.Result = future.result
30307	return nil
30308}
30309
30310// result is the default implementation for WatchersGetNetworkConfigurationDiagnosticFuture.Result.
30311func (future *WatchersGetNetworkConfigurationDiagnosticFuture) result(client WatchersClient) (cdr ConfigurationDiagnosticResponse, err error) {
30312	var done bool
30313	done, err = future.DoneWithContext(context.Background(), client)
30314	if err != nil {
30315		err = autorest.NewErrorWithError(err, "network.WatchersGetNetworkConfigurationDiagnosticFuture", "Result", future.Response(), "Polling failure")
30316		return
30317	}
30318	if !done {
30319		cdr.Response.Response = future.Response()
30320		err = azure.NewAsyncOpIncompleteError("network.WatchersGetNetworkConfigurationDiagnosticFuture")
30321		return
30322	}
30323	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
30324	if cdr.Response.Response, err = future.GetResult(sender); err == nil && cdr.Response.Response.StatusCode != http.StatusNoContent {
30325		cdr, err = client.GetNetworkConfigurationDiagnosticResponder(cdr.Response.Response)
30326		if err != nil {
30327			err = autorest.NewErrorWithError(err, "network.WatchersGetNetworkConfigurationDiagnosticFuture", "Result", cdr.Response.Response, "Failure responding to request")
30328		}
30329	}
30330	return
30331}
30332
30333// WatchersGetNextHopFuture an abstraction for monitoring and retrieving the results of a long-running
30334// operation.
30335type WatchersGetNextHopFuture struct {
30336	azure.FutureAPI
30337	// Result returns the result of the asynchronous operation.
30338	// If the operation has not completed it will return an error.
30339	Result func(WatchersClient) (NextHopResult, error)
30340}
30341
30342// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30343func (future *WatchersGetNextHopFuture) UnmarshalJSON(body []byte) error {
30344	var azFuture azure.Future
30345	if err := json.Unmarshal(body, &azFuture); err != nil {
30346		return err
30347	}
30348	future.FutureAPI = &azFuture
30349	future.Result = future.result
30350	return nil
30351}
30352
30353// result is the default implementation for WatchersGetNextHopFuture.Result.
30354func (future *WatchersGetNextHopFuture) result(client WatchersClient) (nhr NextHopResult, err error) {
30355	var done bool
30356	done, err = future.DoneWithContext(context.Background(), client)
30357	if err != nil {
30358		err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", future.Response(), "Polling failure")
30359		return
30360	}
30361	if !done {
30362		nhr.Response.Response = future.Response()
30363		err = azure.NewAsyncOpIncompleteError("network.WatchersGetNextHopFuture")
30364		return
30365	}
30366	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
30367	if nhr.Response.Response, err = future.GetResult(sender); err == nil && nhr.Response.Response.StatusCode != http.StatusNoContent {
30368		nhr, err = client.GetNextHopResponder(nhr.Response.Response)
30369		if err != nil {
30370			err = autorest.NewErrorWithError(err, "network.WatchersGetNextHopFuture", "Result", nhr.Response.Response, "Failure responding to request")
30371		}
30372	}
30373	return
30374}
30375
30376// WatchersGetTroubleshootingFuture an abstraction for monitoring and retrieving the results of a
30377// long-running operation.
30378type WatchersGetTroubleshootingFuture struct {
30379	azure.FutureAPI
30380	// Result returns the result of the asynchronous operation.
30381	// If the operation has not completed it will return an error.
30382	Result func(WatchersClient) (TroubleshootingResult, error)
30383}
30384
30385// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30386func (future *WatchersGetTroubleshootingFuture) UnmarshalJSON(body []byte) error {
30387	var azFuture azure.Future
30388	if err := json.Unmarshal(body, &azFuture); err != nil {
30389		return err
30390	}
30391	future.FutureAPI = &azFuture
30392	future.Result = future.result
30393	return nil
30394}
30395
30396// result is the default implementation for WatchersGetTroubleshootingFuture.Result.
30397func (future *WatchersGetTroubleshootingFuture) result(client WatchersClient) (tr TroubleshootingResult, err error) {
30398	var done bool
30399	done, err = future.DoneWithContext(context.Background(), client)
30400	if err != nil {
30401		err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", future.Response(), "Polling failure")
30402		return
30403	}
30404	if !done {
30405		tr.Response.Response = future.Response()
30406		err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingFuture")
30407		return
30408	}
30409	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
30410	if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
30411		tr, err = client.GetTroubleshootingResponder(tr.Response.Response)
30412		if err != nil {
30413			err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingFuture", "Result", tr.Response.Response, "Failure responding to request")
30414		}
30415	}
30416	return
30417}
30418
30419// WatchersGetTroubleshootingResultFuture an abstraction for monitoring and retrieving the results of a
30420// long-running operation.
30421type WatchersGetTroubleshootingResultFuture struct {
30422	azure.FutureAPI
30423	// Result returns the result of the asynchronous operation.
30424	// If the operation has not completed it will return an error.
30425	Result func(WatchersClient) (TroubleshootingResult, error)
30426}
30427
30428// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30429func (future *WatchersGetTroubleshootingResultFuture) UnmarshalJSON(body []byte) error {
30430	var azFuture azure.Future
30431	if err := json.Unmarshal(body, &azFuture); err != nil {
30432		return err
30433	}
30434	future.FutureAPI = &azFuture
30435	future.Result = future.result
30436	return nil
30437}
30438
30439// result is the default implementation for WatchersGetTroubleshootingResultFuture.Result.
30440func (future *WatchersGetTroubleshootingResultFuture) result(client WatchersClient) (tr TroubleshootingResult, err error) {
30441	var done bool
30442	done, err = future.DoneWithContext(context.Background(), client)
30443	if err != nil {
30444		err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", future.Response(), "Polling failure")
30445		return
30446	}
30447	if !done {
30448		tr.Response.Response = future.Response()
30449		err = azure.NewAsyncOpIncompleteError("network.WatchersGetTroubleshootingResultFuture")
30450		return
30451	}
30452	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
30453	if tr.Response.Response, err = future.GetResult(sender); err == nil && tr.Response.Response.StatusCode != http.StatusNoContent {
30454		tr, err = client.GetTroubleshootingResultResponder(tr.Response.Response)
30455		if err != nil {
30456			err = autorest.NewErrorWithError(err, "network.WatchersGetTroubleshootingResultFuture", "Result", tr.Response.Response, "Failure responding to request")
30457		}
30458	}
30459	return
30460}
30461
30462// WatchersGetVMSecurityRulesFuture an abstraction for monitoring and retrieving the results of a
30463// long-running operation.
30464type WatchersGetVMSecurityRulesFuture struct {
30465	azure.FutureAPI
30466	// Result returns the result of the asynchronous operation.
30467	// If the operation has not completed it will return an error.
30468	Result func(WatchersClient) (SecurityGroupViewResult, error)
30469}
30470
30471// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30472func (future *WatchersGetVMSecurityRulesFuture) UnmarshalJSON(body []byte) error {
30473	var azFuture azure.Future
30474	if err := json.Unmarshal(body, &azFuture); err != nil {
30475		return err
30476	}
30477	future.FutureAPI = &azFuture
30478	future.Result = future.result
30479	return nil
30480}
30481
30482// result is the default implementation for WatchersGetVMSecurityRulesFuture.Result.
30483func (future *WatchersGetVMSecurityRulesFuture) result(client WatchersClient) (sgvr SecurityGroupViewResult, err error) {
30484	var done bool
30485	done, err = future.DoneWithContext(context.Background(), client)
30486	if err != nil {
30487		err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", future.Response(), "Polling failure")
30488		return
30489	}
30490	if !done {
30491		sgvr.Response.Response = future.Response()
30492		err = azure.NewAsyncOpIncompleteError("network.WatchersGetVMSecurityRulesFuture")
30493		return
30494	}
30495	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
30496	if sgvr.Response.Response, err = future.GetResult(sender); err == nil && sgvr.Response.Response.StatusCode != http.StatusNoContent {
30497		sgvr, err = client.GetVMSecurityRulesResponder(sgvr.Response.Response)
30498		if err != nil {
30499			err = autorest.NewErrorWithError(err, "network.WatchersGetVMSecurityRulesFuture", "Result", sgvr.Response.Response, "Failure responding to request")
30500		}
30501	}
30502	return
30503}
30504
30505// WatchersListAvailableProvidersFuture an abstraction for monitoring and retrieving the results of a
30506// long-running operation.
30507type WatchersListAvailableProvidersFuture struct {
30508	azure.FutureAPI
30509	// Result returns the result of the asynchronous operation.
30510	// If the operation has not completed it will return an error.
30511	Result func(WatchersClient) (AvailableProvidersList, error)
30512}
30513
30514// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30515func (future *WatchersListAvailableProvidersFuture) UnmarshalJSON(body []byte) error {
30516	var azFuture azure.Future
30517	if err := json.Unmarshal(body, &azFuture); err != nil {
30518		return err
30519	}
30520	future.FutureAPI = &azFuture
30521	future.Result = future.result
30522	return nil
30523}
30524
30525// result is the default implementation for WatchersListAvailableProvidersFuture.Result.
30526func (future *WatchersListAvailableProvidersFuture) result(client WatchersClient) (apl AvailableProvidersList, err error) {
30527	var done bool
30528	done, err = future.DoneWithContext(context.Background(), client)
30529	if err != nil {
30530		err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", future.Response(), "Polling failure")
30531		return
30532	}
30533	if !done {
30534		apl.Response.Response = future.Response()
30535		err = azure.NewAsyncOpIncompleteError("network.WatchersListAvailableProvidersFuture")
30536		return
30537	}
30538	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
30539	if apl.Response.Response, err = future.GetResult(sender); err == nil && apl.Response.Response.StatusCode != http.StatusNoContent {
30540		apl, err = client.ListAvailableProvidersResponder(apl.Response.Response)
30541		if err != nil {
30542			err = autorest.NewErrorWithError(err, "network.WatchersListAvailableProvidersFuture", "Result", apl.Response.Response, "Failure responding to request")
30543		}
30544	}
30545	return
30546}
30547
30548// WatchersSetFlowLogConfigurationFuture an abstraction for monitoring and retrieving the results of a
30549// long-running operation.
30550type WatchersSetFlowLogConfigurationFuture struct {
30551	azure.FutureAPI
30552	// Result returns the result of the asynchronous operation.
30553	// If the operation has not completed it will return an error.
30554	Result func(WatchersClient) (FlowLogInformation, error)
30555}
30556
30557// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30558func (future *WatchersSetFlowLogConfigurationFuture) UnmarshalJSON(body []byte) error {
30559	var azFuture azure.Future
30560	if err := json.Unmarshal(body, &azFuture); err != nil {
30561		return err
30562	}
30563	future.FutureAPI = &azFuture
30564	future.Result = future.result
30565	return nil
30566}
30567
30568// result is the default implementation for WatchersSetFlowLogConfigurationFuture.Result.
30569func (future *WatchersSetFlowLogConfigurationFuture) result(client WatchersClient) (fli FlowLogInformation, err error) {
30570	var done bool
30571	done, err = future.DoneWithContext(context.Background(), client)
30572	if err != nil {
30573		err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", future.Response(), "Polling failure")
30574		return
30575	}
30576	if !done {
30577		fli.Response.Response = future.Response()
30578		err = azure.NewAsyncOpIncompleteError("network.WatchersSetFlowLogConfigurationFuture")
30579		return
30580	}
30581	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
30582	if fli.Response.Response, err = future.GetResult(sender); err == nil && fli.Response.Response.StatusCode != http.StatusNoContent {
30583		fli, err = client.SetFlowLogConfigurationResponder(fli.Response.Response)
30584		if err != nil {
30585			err = autorest.NewErrorWithError(err, "network.WatchersSetFlowLogConfigurationFuture", "Result", fli.Response.Response, "Failure responding to request")
30586		}
30587	}
30588	return
30589}
30590
30591// WatchersVerifyIPFlowFuture an abstraction for monitoring and retrieving the results of a long-running
30592// operation.
30593type WatchersVerifyIPFlowFuture struct {
30594	azure.FutureAPI
30595	// Result returns the result of the asynchronous operation.
30596	// If the operation has not completed it will return an error.
30597	Result func(WatchersClient) (VerificationIPFlowResult, error)
30598}
30599
30600// UnmarshalJSON is the custom unmarshaller for CreateFuture.
30601func (future *WatchersVerifyIPFlowFuture) UnmarshalJSON(body []byte) error {
30602	var azFuture azure.Future
30603	if err := json.Unmarshal(body, &azFuture); err != nil {
30604		return err
30605	}
30606	future.FutureAPI = &azFuture
30607	future.Result = future.result
30608	return nil
30609}
30610
30611// result is the default implementation for WatchersVerifyIPFlowFuture.Result.
30612func (future *WatchersVerifyIPFlowFuture) result(client WatchersClient) (vifr VerificationIPFlowResult, err error) {
30613	var done bool
30614	done, err = future.DoneWithContext(context.Background(), client)
30615	if err != nil {
30616		err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", future.Response(), "Polling failure")
30617		return
30618	}
30619	if !done {
30620		vifr.Response.Response = future.Response()
30621		err = azure.NewAsyncOpIncompleteError("network.WatchersVerifyIPFlowFuture")
30622		return
30623	}
30624	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
30625	if vifr.Response.Response, err = future.GetResult(sender); err == nil && vifr.Response.Response.StatusCode != http.StatusNoContent {
30626		vifr, err = client.VerifyIPFlowResponder(vifr.Response.Response)
30627		if err != nil {
30628			err = autorest.NewErrorWithError(err, "network.WatchersVerifyIPFlowFuture", "Result", vifr.Response.Response, "Failure responding to request")
30629		}
30630	}
30631	return
30632}
30633