1package network
2
3// Copyright (c) Microsoft and contributors.  All rights reserved.
4//
5// Licensed under the Apache License, Version 2.0 (the "License");
6// you may not use this file except in compliance with the License.
7// You may obtain a copy of the License at
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13//
14// See the License for the specific language governing permissions and
15// limitations under the License.
16//
17// Code generated by Microsoft (R) AutoRest Code Generator.
18// Changes may cause incorrect behavior and will be lost if the code is regenerated.
19
20import (
21	"context"
22	"encoding/json"
23	"github.com/Azure/go-autorest/autorest"
24	"github.com/Azure/go-autorest/autorest/azure"
25	"github.com/Azure/go-autorest/autorest/date"
26	"github.com/Azure/go-autorest/autorest/to"
27	"github.com/Azure/go-autorest/tracing"
28	"net/http"
29)
30
31// The package's fully qualified name.
32const fqdn = "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2017-06-01/network"
33
34// AddressSpace addressSpace contains an array of IP address ranges that can be used by subnets of the
35// virtual network.
36type AddressSpace struct {
37	// AddressPrefixes - A list of address blocks reserved for this virtual network in CIDR notation.
38	AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
39}
40
41// ApplicationGateway application gateway resource
42type ApplicationGateway struct {
43	autorest.Response                   `json:"-"`
44	*ApplicationGatewayPropertiesFormat `json:"properties,omitempty"`
45	// Etag - A unique read-only string that changes whenever the resource is updated.
46	Etag *string `json:"etag,omitempty"`
47	// ID - Resource ID.
48	ID *string `json:"id,omitempty"`
49	// Name - READ-ONLY; Resource name.
50	Name *string `json:"name,omitempty"`
51	// Type - READ-ONLY; Resource type.
52	Type *string `json:"type,omitempty"`
53	// Location - Resource location.
54	Location *string `json:"location,omitempty"`
55	// Tags - Resource tags.
56	Tags map[string]*string `json:"tags"`
57}
58
59// MarshalJSON is the custom marshaler for ApplicationGateway.
60func (ag ApplicationGateway) MarshalJSON() ([]byte, error) {
61	objectMap := make(map[string]interface{})
62	if ag.ApplicationGatewayPropertiesFormat != nil {
63		objectMap["properties"] = ag.ApplicationGatewayPropertiesFormat
64	}
65	if ag.Etag != nil {
66		objectMap["etag"] = ag.Etag
67	}
68	if ag.ID != nil {
69		objectMap["id"] = ag.ID
70	}
71	if ag.Location != nil {
72		objectMap["location"] = ag.Location
73	}
74	if ag.Tags != nil {
75		objectMap["tags"] = ag.Tags
76	}
77	return json.Marshal(objectMap)
78}
79
80// UnmarshalJSON is the custom unmarshaler for ApplicationGateway struct.
81func (ag *ApplicationGateway) UnmarshalJSON(body []byte) error {
82	var m map[string]*json.RawMessage
83	err := json.Unmarshal(body, &m)
84	if err != nil {
85		return err
86	}
87	for k, v := range m {
88		switch k {
89		case "properties":
90			if v != nil {
91				var applicationGatewayPropertiesFormat ApplicationGatewayPropertiesFormat
92				err = json.Unmarshal(*v, &applicationGatewayPropertiesFormat)
93				if err != nil {
94					return err
95				}
96				ag.ApplicationGatewayPropertiesFormat = &applicationGatewayPropertiesFormat
97			}
98		case "etag":
99			if v != nil {
100				var etag string
101				err = json.Unmarshal(*v, &etag)
102				if err != nil {
103					return err
104				}
105				ag.Etag = &etag
106			}
107		case "id":
108			if v != nil {
109				var ID string
110				err = json.Unmarshal(*v, &ID)
111				if err != nil {
112					return err
113				}
114				ag.ID = &ID
115			}
116		case "name":
117			if v != nil {
118				var name string
119				err = json.Unmarshal(*v, &name)
120				if err != nil {
121					return err
122				}
123				ag.Name = &name
124			}
125		case "type":
126			if v != nil {
127				var typeVar string
128				err = json.Unmarshal(*v, &typeVar)
129				if err != nil {
130					return err
131				}
132				ag.Type = &typeVar
133			}
134		case "location":
135			if v != nil {
136				var location string
137				err = json.Unmarshal(*v, &location)
138				if err != nil {
139					return err
140				}
141				ag.Location = &location
142			}
143		case "tags":
144			if v != nil {
145				var tags map[string]*string
146				err = json.Unmarshal(*v, &tags)
147				if err != nil {
148					return err
149				}
150				ag.Tags = tags
151			}
152		}
153	}
154
155	return nil
156}
157
158// ApplicationGatewayAuthenticationCertificate authentication certificates of an application gateway.
159type ApplicationGatewayAuthenticationCertificate struct {
160	*ApplicationGatewayAuthenticationCertificatePropertiesFormat `json:"properties,omitempty"`
161	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
162	Name *string `json:"name,omitempty"`
163	// Etag - A unique read-only string that changes whenever the resource is updated.
164	Etag *string `json:"etag,omitempty"`
165	// Type - Type of the resource.
166	Type *string `json:"type,omitempty"`
167	// ID - Resource ID.
168	ID *string `json:"id,omitempty"`
169}
170
171// MarshalJSON is the custom marshaler for ApplicationGatewayAuthenticationCertificate.
172func (agac ApplicationGatewayAuthenticationCertificate) MarshalJSON() ([]byte, error) {
173	objectMap := make(map[string]interface{})
174	if agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat != nil {
175		objectMap["properties"] = agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat
176	}
177	if agac.Name != nil {
178		objectMap["name"] = agac.Name
179	}
180	if agac.Etag != nil {
181		objectMap["etag"] = agac.Etag
182	}
183	if agac.Type != nil {
184		objectMap["type"] = agac.Type
185	}
186	if agac.ID != nil {
187		objectMap["id"] = agac.ID
188	}
189	return json.Marshal(objectMap)
190}
191
192// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayAuthenticationCertificate struct.
193func (agac *ApplicationGatewayAuthenticationCertificate) UnmarshalJSON(body []byte) error {
194	var m map[string]*json.RawMessage
195	err := json.Unmarshal(body, &m)
196	if err != nil {
197		return err
198	}
199	for k, v := range m {
200		switch k {
201		case "properties":
202			if v != nil {
203				var applicationGatewayAuthenticationCertificatePropertiesFormat ApplicationGatewayAuthenticationCertificatePropertiesFormat
204				err = json.Unmarshal(*v, &applicationGatewayAuthenticationCertificatePropertiesFormat)
205				if err != nil {
206					return err
207				}
208				agac.ApplicationGatewayAuthenticationCertificatePropertiesFormat = &applicationGatewayAuthenticationCertificatePropertiesFormat
209			}
210		case "name":
211			if v != nil {
212				var name string
213				err = json.Unmarshal(*v, &name)
214				if err != nil {
215					return err
216				}
217				agac.Name = &name
218			}
219		case "etag":
220			if v != nil {
221				var etag string
222				err = json.Unmarshal(*v, &etag)
223				if err != nil {
224					return err
225				}
226				agac.Etag = &etag
227			}
228		case "type":
229			if v != nil {
230				var typeVar string
231				err = json.Unmarshal(*v, &typeVar)
232				if err != nil {
233					return err
234				}
235				agac.Type = &typeVar
236			}
237		case "id":
238			if v != nil {
239				var ID string
240				err = json.Unmarshal(*v, &ID)
241				if err != nil {
242					return err
243				}
244				agac.ID = &ID
245			}
246		}
247	}
248
249	return nil
250}
251
252// ApplicationGatewayAuthenticationCertificatePropertiesFormat authentication certificates properties of an
253// application gateway.
254type ApplicationGatewayAuthenticationCertificatePropertiesFormat struct {
255	// Data - Certificate public data.
256	Data *string `json:"data,omitempty"`
257	// ProvisioningState - Provisioning state of the authentication certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
258	ProvisioningState *string `json:"provisioningState,omitempty"`
259}
260
261// ApplicationGatewayAvailableSslOptions response for ApplicationGatewayAvailableSslOptions API service
262// call.
263type ApplicationGatewayAvailableSslOptions struct {
264	autorest.Response                                      `json:"-"`
265	*ApplicationGatewayAvailableSslOptionsPropertiesFormat `json:"properties,omitempty"`
266	// ID - Resource ID.
267	ID *string `json:"id,omitempty"`
268	// Name - READ-ONLY; Resource name.
269	Name *string `json:"name,omitempty"`
270	// Type - READ-ONLY; Resource type.
271	Type *string `json:"type,omitempty"`
272	// Location - Resource location.
273	Location *string `json:"location,omitempty"`
274	// Tags - Resource tags.
275	Tags map[string]*string `json:"tags"`
276}
277
278// MarshalJSON is the custom marshaler for ApplicationGatewayAvailableSslOptions.
279func (agaso ApplicationGatewayAvailableSslOptions) MarshalJSON() ([]byte, error) {
280	objectMap := make(map[string]interface{})
281	if agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat != nil {
282		objectMap["properties"] = agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat
283	}
284	if agaso.ID != nil {
285		objectMap["id"] = agaso.ID
286	}
287	if agaso.Location != nil {
288		objectMap["location"] = agaso.Location
289	}
290	if agaso.Tags != nil {
291		objectMap["tags"] = agaso.Tags
292	}
293	return json.Marshal(objectMap)
294}
295
296// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayAvailableSslOptions struct.
297func (agaso *ApplicationGatewayAvailableSslOptions) UnmarshalJSON(body []byte) error {
298	var m map[string]*json.RawMessage
299	err := json.Unmarshal(body, &m)
300	if err != nil {
301		return err
302	}
303	for k, v := range m {
304		switch k {
305		case "properties":
306			if v != nil {
307				var applicationGatewayAvailableSslOptionsPropertiesFormat ApplicationGatewayAvailableSslOptionsPropertiesFormat
308				err = json.Unmarshal(*v, &applicationGatewayAvailableSslOptionsPropertiesFormat)
309				if err != nil {
310					return err
311				}
312				agaso.ApplicationGatewayAvailableSslOptionsPropertiesFormat = &applicationGatewayAvailableSslOptionsPropertiesFormat
313			}
314		case "id":
315			if v != nil {
316				var ID string
317				err = json.Unmarshal(*v, &ID)
318				if err != nil {
319					return err
320				}
321				agaso.ID = &ID
322			}
323		case "name":
324			if v != nil {
325				var name string
326				err = json.Unmarshal(*v, &name)
327				if err != nil {
328					return err
329				}
330				agaso.Name = &name
331			}
332		case "type":
333			if v != nil {
334				var typeVar string
335				err = json.Unmarshal(*v, &typeVar)
336				if err != nil {
337					return err
338				}
339				agaso.Type = &typeVar
340			}
341		case "location":
342			if v != nil {
343				var location string
344				err = json.Unmarshal(*v, &location)
345				if err != nil {
346					return err
347				}
348				agaso.Location = &location
349			}
350		case "tags":
351			if v != nil {
352				var tags map[string]*string
353				err = json.Unmarshal(*v, &tags)
354				if err != nil {
355					return err
356				}
357				agaso.Tags = tags
358			}
359		}
360	}
361
362	return nil
363}
364
365// ApplicationGatewayAvailableSslOptionsPropertiesFormat properties of
366// ApplicationGatewayAvailableSslOptions
367type ApplicationGatewayAvailableSslOptionsPropertiesFormat struct {
368	// PredefinedPolicies - List of available Ssl predefined policy.
369	PredefinedPolicies *[]SubResource `json:"predefinedPolicies,omitempty"`
370	// DefaultPolicy - Name of the Ssl predefined policy applied by default to application gateway. Possible values include: 'AppGwSslPolicy20150501', 'AppGwSslPolicy20170401', 'AppGwSslPolicy20170401S'
371	DefaultPolicy ApplicationGatewaySslPolicyName `json:"defaultPolicy,omitempty"`
372	// AvailableCipherSuites - List of available Ssl cipher suites.
373	AvailableCipherSuites *[]ApplicationGatewaySslCipherSuite `json:"availableCipherSuites,omitempty"`
374	// AvailableProtocols - List of available Ssl protocols.
375	AvailableProtocols *[]ApplicationGatewaySslProtocol `json:"availableProtocols,omitempty"`
376}
377
378// ApplicationGatewayAvailableSslPredefinedPolicies response for ApplicationGatewayAvailableSslOptions API
379// service call.
380type ApplicationGatewayAvailableSslPredefinedPolicies struct {
381	autorest.Response `json:"-"`
382	// Value - List of available Ssl predefined policy.
383	Value *[]ApplicationGatewaySslPredefinedPolicy `json:"value,omitempty"`
384	// NextLink - URL to get the next set of results.
385	NextLink *string `json:"nextLink,omitempty"`
386}
387
388// ApplicationGatewayAvailableSslPredefinedPoliciesIterator provides access to a complete listing of
389// ApplicationGatewaySslPredefinedPolicy values.
390type ApplicationGatewayAvailableSslPredefinedPoliciesIterator struct {
391	i    int
392	page ApplicationGatewayAvailableSslPredefinedPoliciesPage
393}
394
395// NextWithContext advances to the next value.  If there was an error making
396// the request the iterator does not advance and the error is returned.
397func (iter *ApplicationGatewayAvailableSslPredefinedPoliciesIterator) NextWithContext(ctx context.Context) (err error) {
398	if tracing.IsEnabled() {
399		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayAvailableSslPredefinedPoliciesIterator.NextWithContext")
400		defer func() {
401			sc := -1
402			if iter.Response().Response.Response != nil {
403				sc = iter.Response().Response.Response.StatusCode
404			}
405			tracing.EndSpan(ctx, sc, err)
406		}()
407	}
408	iter.i++
409	if iter.i < len(iter.page.Values()) {
410		return nil
411	}
412	err = iter.page.NextWithContext(ctx)
413	if err != nil {
414		iter.i--
415		return err
416	}
417	iter.i = 0
418	return nil
419}
420
421// Next advances to the next value.  If there was an error making
422// the request the iterator does not advance and the error is returned.
423// Deprecated: Use NextWithContext() instead.
424func (iter *ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Next() error {
425	return iter.NextWithContext(context.Background())
426}
427
428// NotDone returns true if the enumeration should be started or is not yet complete.
429func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) NotDone() bool {
430	return iter.page.NotDone() && iter.i < len(iter.page.Values())
431}
432
433// Response returns the raw server response from the last page request.
434func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Response() ApplicationGatewayAvailableSslPredefinedPolicies {
435	return iter.page.Response()
436}
437
438// Value returns the current value or a zero-initialized value if the
439// iterator has advanced beyond the end of the collection.
440func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Value() ApplicationGatewaySslPredefinedPolicy {
441	if !iter.page.NotDone() {
442		return ApplicationGatewaySslPredefinedPolicy{}
443	}
444	return iter.page.Values()[iter.i]
445}
446
447// Creates a new instance of the ApplicationGatewayAvailableSslPredefinedPoliciesIterator type.
448func NewApplicationGatewayAvailableSslPredefinedPoliciesIterator(page ApplicationGatewayAvailableSslPredefinedPoliciesPage) ApplicationGatewayAvailableSslPredefinedPoliciesIterator {
449	return ApplicationGatewayAvailableSslPredefinedPoliciesIterator{page: page}
450}
451
452// IsEmpty returns true if the ListResult contains no values.
453func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) IsEmpty() bool {
454	return agaspp.Value == nil || len(*agaspp.Value) == 0
455}
456
457// hasNextLink returns true if the NextLink is not empty.
458func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) hasNextLink() bool {
459	return agaspp.NextLink != nil && len(*agaspp.NextLink) != 0
460}
461
462// applicationGatewayAvailableSslPredefinedPoliciesPreparer prepares a request to retrieve the next set of results.
463// It returns nil if no more results exist.
464func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) applicationGatewayAvailableSslPredefinedPoliciesPreparer(ctx context.Context) (*http.Request, error) {
465	if !agaspp.hasNextLink() {
466		return nil, nil
467	}
468	return autorest.Prepare((&http.Request{}).WithContext(ctx),
469		autorest.AsJSON(),
470		autorest.AsGet(),
471		autorest.WithBaseURL(to.String(agaspp.NextLink)))
472}
473
474// ApplicationGatewayAvailableSslPredefinedPoliciesPage contains a page of
475// ApplicationGatewaySslPredefinedPolicy values.
476type ApplicationGatewayAvailableSslPredefinedPoliciesPage struct {
477	fn     func(context.Context, ApplicationGatewayAvailableSslPredefinedPolicies) (ApplicationGatewayAvailableSslPredefinedPolicies, error)
478	agaspp ApplicationGatewayAvailableSslPredefinedPolicies
479}
480
481// NextWithContext advances to the next page of values.  If there was an error making
482// the request the page does not advance and the error is returned.
483func (page *ApplicationGatewayAvailableSslPredefinedPoliciesPage) NextWithContext(ctx context.Context) (err error) {
484	if tracing.IsEnabled() {
485		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayAvailableSslPredefinedPoliciesPage.NextWithContext")
486		defer func() {
487			sc := -1
488			if page.Response().Response.Response != nil {
489				sc = page.Response().Response.Response.StatusCode
490			}
491			tracing.EndSpan(ctx, sc, err)
492		}()
493	}
494	for {
495		next, err := page.fn(ctx, page.agaspp)
496		if err != nil {
497			return err
498		}
499		page.agaspp = next
500		if !next.hasNextLink() || !next.IsEmpty() {
501			break
502		}
503	}
504	return nil
505}
506
507// Next advances to the next page of values.  If there was an error making
508// the request the page does not advance and the error is returned.
509// Deprecated: Use NextWithContext() instead.
510func (page *ApplicationGatewayAvailableSslPredefinedPoliciesPage) Next() error {
511	return page.NextWithContext(context.Background())
512}
513
514// NotDone returns true if the page enumeration should be started or is not yet complete.
515func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) NotDone() bool {
516	return !page.agaspp.IsEmpty()
517}
518
519// Response returns the raw server response from the last page request.
520func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) Response() ApplicationGatewayAvailableSslPredefinedPolicies {
521	return page.agaspp
522}
523
524// Values returns the slice of values for the current page or nil if there are no values.
525func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) Values() []ApplicationGatewaySslPredefinedPolicy {
526	if page.agaspp.IsEmpty() {
527		return nil
528	}
529	return *page.agaspp.Value
530}
531
532// Creates a new instance of the ApplicationGatewayAvailableSslPredefinedPoliciesPage type.
533func NewApplicationGatewayAvailableSslPredefinedPoliciesPage(cur ApplicationGatewayAvailableSslPredefinedPolicies, getNextPage func(context.Context, ApplicationGatewayAvailableSslPredefinedPolicies) (ApplicationGatewayAvailableSslPredefinedPolicies, error)) ApplicationGatewayAvailableSslPredefinedPoliciesPage {
534	return ApplicationGatewayAvailableSslPredefinedPoliciesPage{
535		fn:     getNextPage,
536		agaspp: cur,
537	}
538}
539
540// ApplicationGatewayAvailableWafRuleSetsResult response for ApplicationGatewayAvailableWafRuleSets API
541// service call.
542type ApplicationGatewayAvailableWafRuleSetsResult struct {
543	autorest.Response `json:"-"`
544	// Value - The list of application gateway rule sets.
545	Value *[]ApplicationGatewayFirewallRuleSet `json:"value,omitempty"`
546}
547
548// ApplicationGatewayBackendAddress backend address of an application gateway.
549type ApplicationGatewayBackendAddress struct {
550	// Fqdn - Fully qualified domain name (FQDN).
551	Fqdn *string `json:"fqdn,omitempty"`
552	// IPAddress - IP address
553	IPAddress *string `json:"ipAddress,omitempty"`
554}
555
556// ApplicationGatewayBackendAddressPool backend Address Pool of an application gateway.
557type ApplicationGatewayBackendAddressPool struct {
558	*ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"`
559	// Name - Resource that is unique within a resource group. This name can be used to access the resource.
560	Name *string `json:"name,omitempty"`
561	// Etag - A unique read-only string that changes whenever the resource is updated.
562	Etag *string `json:"etag,omitempty"`
563	// Type - Type of the resource.
564	Type *string `json:"type,omitempty"`
565	// ID - Resource ID.
566	ID *string `json:"id,omitempty"`
567}
568
569// MarshalJSON is the custom marshaler for ApplicationGatewayBackendAddressPool.
570func (agbap ApplicationGatewayBackendAddressPool) MarshalJSON() ([]byte, error) {
571	objectMap := make(map[string]interface{})
572	if agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat != nil {
573		objectMap["properties"] = agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat
574	}
575	if agbap.Name != nil {
576		objectMap["name"] = agbap.Name
577	}
578	if agbap.Etag != nil {
579		objectMap["etag"] = agbap.Etag
580	}
581	if agbap.Type != nil {
582		objectMap["type"] = agbap.Type
583	}
584	if agbap.ID != nil {
585		objectMap["id"] = agbap.ID
586	}
587	return json.Marshal(objectMap)
588}
589
590// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayBackendAddressPool struct.
591func (agbap *ApplicationGatewayBackendAddressPool) UnmarshalJSON(body []byte) error {
592	var m map[string]*json.RawMessage
593	err := json.Unmarshal(body, &m)
594	if err != nil {
595		return err
596	}
597	for k, v := range m {
598		switch k {
599		case "properties":
600			if v != nil {
601				var applicationGatewayBackendAddressPoolPropertiesFormat ApplicationGatewayBackendAddressPoolPropertiesFormat
602				err = json.Unmarshal(*v, &applicationGatewayBackendAddressPoolPropertiesFormat)
603				if err != nil {
604					return err
605				}
606				agbap.ApplicationGatewayBackendAddressPoolPropertiesFormat = &applicationGatewayBackendAddressPoolPropertiesFormat
607			}
608		case "name":
609			if v != nil {
610				var name string
611				err = json.Unmarshal(*v, &name)
612				if err != nil {
613					return err
614				}
615				agbap.Name = &name
616			}
617		case "etag":
618			if v != nil {
619				var etag string
620				err = json.Unmarshal(*v, &etag)
621				if err != nil {
622					return err
623				}
624				agbap.Etag = &etag
625			}
626		case "type":
627			if v != nil {
628				var typeVar string
629				err = json.Unmarshal(*v, &typeVar)
630				if err != nil {
631					return err
632				}
633				agbap.Type = &typeVar
634			}
635		case "id":
636			if v != nil {
637				var ID string
638				err = json.Unmarshal(*v, &ID)
639				if err != nil {
640					return err
641				}
642				agbap.ID = &ID
643			}
644		}
645	}
646
647	return nil
648}
649
650// ApplicationGatewayBackendAddressPoolPropertiesFormat properties of Backend Address Pool of an
651// application gateway.
652type ApplicationGatewayBackendAddressPoolPropertiesFormat struct {
653	// BackendIPConfigurations - Collection of references to IPs defined in network interfaces.
654	BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"`
655	// BackendAddresses - Backend addresses
656	BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"`
657	// ProvisioningState - Provisioning state of the backend address pool resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
658	ProvisioningState *string `json:"provisioningState,omitempty"`
659}
660
661// ApplicationGatewayBackendHealth list of ApplicationGatewayBackendHealthPool resources.
662type ApplicationGatewayBackendHealth struct {
663	autorest.Response   `json:"-"`
664	BackendAddressPools *[]ApplicationGatewayBackendHealthPool `json:"backendAddressPools,omitempty"`
665}
666
667// ApplicationGatewayBackendHealthHTTPSettings application gateway BackendHealthHttp settings.
668type ApplicationGatewayBackendHealthHTTPSettings struct {
669	// BackendHTTPSettings - Reference of an ApplicationGatewayBackendHttpSettings resource.
670	BackendHTTPSettings *ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettings,omitempty"`
671	// Servers - List of ApplicationGatewayBackendHealthServer resources.
672	Servers *[]ApplicationGatewayBackendHealthServer `json:"servers,omitempty"`
673}
674
675// ApplicationGatewayBackendHealthPool application gateway BackendHealth pool.
676type ApplicationGatewayBackendHealthPool struct {
677	// BackendAddressPool - Reference of an ApplicationGatewayBackendAddressPool resource.
678	BackendAddressPool *ApplicationGatewayBackendAddressPool `json:"backendAddressPool,omitempty"`
679	// BackendHTTPSettingsCollection - List of ApplicationGatewayBackendHealthHttpSettings resources.
680	BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHealthHTTPSettings `json:"backendHttpSettingsCollection,omitempty"`
681}
682
683// ApplicationGatewayBackendHealthServer application gateway backendhealth http settings.
684type ApplicationGatewayBackendHealthServer struct {
685	// Address - IP address or FQDN of backend server.
686	Address *string `json:"address,omitempty"`
687	// IPConfiguration - Reference of IP configuration of backend server.
688	IPConfiguration *InterfaceIPConfiguration `json:"ipConfiguration,omitempty"`
689	// Health - Health of backend server. Possible values include: 'Unknown', 'Up', 'Down', 'Partial', 'Draining'
690	Health ApplicationGatewayBackendHealthServerHealth `json:"health,omitempty"`
691}
692
693// ApplicationGatewayBackendHTTPSettings backend address pool settings of an application gateway.
694type ApplicationGatewayBackendHTTPSettings struct {
695	*ApplicationGatewayBackendHTTPSettingsPropertiesFormat `json:"properties,omitempty"`
696	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
697	Name *string `json:"name,omitempty"`
698	// Etag - A unique read-only string that changes whenever the resource is updated.
699	Etag *string `json:"etag,omitempty"`
700	// Type - Type of the resource.
701	Type *string `json:"type,omitempty"`
702	// ID - Resource ID.
703	ID *string `json:"id,omitempty"`
704}
705
706// MarshalJSON is the custom marshaler for ApplicationGatewayBackendHTTPSettings.
707func (agbhs ApplicationGatewayBackendHTTPSettings) MarshalJSON() ([]byte, error) {
708	objectMap := make(map[string]interface{})
709	if agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat != nil {
710		objectMap["properties"] = agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat
711	}
712	if agbhs.Name != nil {
713		objectMap["name"] = agbhs.Name
714	}
715	if agbhs.Etag != nil {
716		objectMap["etag"] = agbhs.Etag
717	}
718	if agbhs.Type != nil {
719		objectMap["type"] = agbhs.Type
720	}
721	if agbhs.ID != nil {
722		objectMap["id"] = agbhs.ID
723	}
724	return json.Marshal(objectMap)
725}
726
727// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayBackendHTTPSettings struct.
728func (agbhs *ApplicationGatewayBackendHTTPSettings) UnmarshalJSON(body []byte) error {
729	var m map[string]*json.RawMessage
730	err := json.Unmarshal(body, &m)
731	if err != nil {
732		return err
733	}
734	for k, v := range m {
735		switch k {
736		case "properties":
737			if v != nil {
738				var applicationGatewayBackendHTTPSettingsPropertiesFormat ApplicationGatewayBackendHTTPSettingsPropertiesFormat
739				err = json.Unmarshal(*v, &applicationGatewayBackendHTTPSettingsPropertiesFormat)
740				if err != nil {
741					return err
742				}
743				agbhs.ApplicationGatewayBackendHTTPSettingsPropertiesFormat = &applicationGatewayBackendHTTPSettingsPropertiesFormat
744			}
745		case "name":
746			if v != nil {
747				var name string
748				err = json.Unmarshal(*v, &name)
749				if err != nil {
750					return err
751				}
752				agbhs.Name = &name
753			}
754		case "etag":
755			if v != nil {
756				var etag string
757				err = json.Unmarshal(*v, &etag)
758				if err != nil {
759					return err
760				}
761				agbhs.Etag = &etag
762			}
763		case "type":
764			if v != nil {
765				var typeVar string
766				err = json.Unmarshal(*v, &typeVar)
767				if err != nil {
768					return err
769				}
770				agbhs.Type = &typeVar
771			}
772		case "id":
773			if v != nil {
774				var ID string
775				err = json.Unmarshal(*v, &ID)
776				if err != nil {
777					return err
778				}
779				agbhs.ID = &ID
780			}
781		}
782	}
783
784	return nil
785}
786
787// ApplicationGatewayBackendHTTPSettingsPropertiesFormat properties of Backend address pool settings of an
788// application gateway.
789type ApplicationGatewayBackendHTTPSettingsPropertiesFormat struct {
790	// Port - Port
791	Port *int32 `json:"port,omitempty"`
792	// Protocol - Protocol. Possible values include: 'HTTP', 'HTTPS'
793	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
794	// CookieBasedAffinity - Cookie based affinity. Possible values include: 'Enabled', 'Disabled'
795	CookieBasedAffinity ApplicationGatewayCookieBasedAffinity `json:"cookieBasedAffinity,omitempty"`
796	// 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.
797	RequestTimeout *int32 `json:"requestTimeout,omitempty"`
798	// Probe - Probe resource of an application gateway.
799	Probe *SubResource `json:"probe,omitempty"`
800	// AuthenticationCertificates - Array of references to application gateway authentication certificates.
801	AuthenticationCertificates *[]SubResource `json:"authenticationCertificates,omitempty"`
802	// ConnectionDraining - Connection draining of the backend http settings resource.
803	ConnectionDraining *ApplicationGatewayConnectionDraining `json:"connectionDraining,omitempty"`
804	// HostName - Host header to be sent to the backend servers.
805	HostName *string `json:"hostName,omitempty"`
806	// PickHostNameFromBackendAddress - Whether to pick host header should be picked from the host name of the backend server. Default value is false.
807	PickHostNameFromBackendAddress *bool `json:"pickHostNameFromBackendAddress,omitempty"`
808	// AffinityCookieName - Cookie name to use for the affinity cookie.
809	AffinityCookieName *string `json:"affinityCookieName,omitempty"`
810	// ProbeEnabled - Whether the probe is enabled. Default value is false.
811	ProbeEnabled *bool `json:"probeEnabled,omitempty"`
812	// Path - Path which should be used as a prefix for all HTTP requests. Null means no path will be prefixed. Default value is null.
813	Path *string `json:"path,omitempty"`
814	// ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
815	ProvisioningState *string `json:"provisioningState,omitempty"`
816}
817
818// ApplicationGatewayConnectionDraining connection draining allows open connections to a backend server to
819// be active for a specified time after the backend server got removed from the configuration.
820type ApplicationGatewayConnectionDraining struct {
821	// Enabled - Whether connection draining is enabled or not.
822	Enabled *bool `json:"enabled,omitempty"`
823	// DrainTimeoutInSec - The number of seconds connection draining is active. Acceptable values are from 1 second to 3600 seconds.
824	DrainTimeoutInSec *int32 `json:"drainTimeoutInSec,omitempty"`
825}
826
827// ApplicationGatewayFirewallDisabledRuleGroup allows to disable rules within a rule group or an entire
828// rule group.
829type ApplicationGatewayFirewallDisabledRuleGroup struct {
830	// RuleGroupName - The name of the rule group that will be disabled.
831	RuleGroupName *string `json:"ruleGroupName,omitempty"`
832	// Rules - The list of rules that will be disabled. If null, all rules of the rule group will be disabled.
833	Rules *[]int32 `json:"rules,omitempty"`
834}
835
836// ApplicationGatewayFirewallRule a web application firewall rule.
837type ApplicationGatewayFirewallRule struct {
838	// RuleID - The identifier of the web application firewall rule.
839	RuleID *int32 `json:"ruleId,omitempty"`
840	// Description - The description of the web application firewall rule.
841	Description *string `json:"description,omitempty"`
842}
843
844// ApplicationGatewayFirewallRuleGroup a web application firewall rule group.
845type ApplicationGatewayFirewallRuleGroup struct {
846	// RuleGroupName - The name of the web application firewall rule group.
847	RuleGroupName *string `json:"ruleGroupName,omitempty"`
848	// Description - The description of the web application firewall rule group.
849	Description *string `json:"description,omitempty"`
850	// Rules - The rules of the web application firewall rule group.
851	Rules *[]ApplicationGatewayFirewallRule `json:"rules,omitempty"`
852}
853
854// ApplicationGatewayFirewallRuleSet a web application firewall rule set.
855type ApplicationGatewayFirewallRuleSet struct {
856	*ApplicationGatewayFirewallRuleSetPropertiesFormat `json:"properties,omitempty"`
857	// ID - Resource ID.
858	ID *string `json:"id,omitempty"`
859	// Name - READ-ONLY; Resource name.
860	Name *string `json:"name,omitempty"`
861	// Type - READ-ONLY; Resource type.
862	Type *string `json:"type,omitempty"`
863	// Location - Resource location.
864	Location *string `json:"location,omitempty"`
865	// Tags - Resource tags.
866	Tags map[string]*string `json:"tags"`
867}
868
869// MarshalJSON is the custom marshaler for ApplicationGatewayFirewallRuleSet.
870func (agfrs ApplicationGatewayFirewallRuleSet) MarshalJSON() ([]byte, error) {
871	objectMap := make(map[string]interface{})
872	if agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat != nil {
873		objectMap["properties"] = agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat
874	}
875	if agfrs.ID != nil {
876		objectMap["id"] = agfrs.ID
877	}
878	if agfrs.Location != nil {
879		objectMap["location"] = agfrs.Location
880	}
881	if agfrs.Tags != nil {
882		objectMap["tags"] = agfrs.Tags
883	}
884	return json.Marshal(objectMap)
885}
886
887// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFirewallRuleSet struct.
888func (agfrs *ApplicationGatewayFirewallRuleSet) UnmarshalJSON(body []byte) error {
889	var m map[string]*json.RawMessage
890	err := json.Unmarshal(body, &m)
891	if err != nil {
892		return err
893	}
894	for k, v := range m {
895		switch k {
896		case "properties":
897			if v != nil {
898				var applicationGatewayFirewallRuleSetPropertiesFormat ApplicationGatewayFirewallRuleSetPropertiesFormat
899				err = json.Unmarshal(*v, &applicationGatewayFirewallRuleSetPropertiesFormat)
900				if err != nil {
901					return err
902				}
903				agfrs.ApplicationGatewayFirewallRuleSetPropertiesFormat = &applicationGatewayFirewallRuleSetPropertiesFormat
904			}
905		case "id":
906			if v != nil {
907				var ID string
908				err = json.Unmarshal(*v, &ID)
909				if err != nil {
910					return err
911				}
912				agfrs.ID = &ID
913			}
914		case "name":
915			if v != nil {
916				var name string
917				err = json.Unmarshal(*v, &name)
918				if err != nil {
919					return err
920				}
921				agfrs.Name = &name
922			}
923		case "type":
924			if v != nil {
925				var typeVar string
926				err = json.Unmarshal(*v, &typeVar)
927				if err != nil {
928					return err
929				}
930				agfrs.Type = &typeVar
931			}
932		case "location":
933			if v != nil {
934				var location string
935				err = json.Unmarshal(*v, &location)
936				if err != nil {
937					return err
938				}
939				agfrs.Location = &location
940			}
941		case "tags":
942			if v != nil {
943				var tags map[string]*string
944				err = json.Unmarshal(*v, &tags)
945				if err != nil {
946					return err
947				}
948				agfrs.Tags = tags
949			}
950		}
951	}
952
953	return nil
954}
955
956// ApplicationGatewayFirewallRuleSetPropertiesFormat properties of the web application firewall rule set.
957type ApplicationGatewayFirewallRuleSetPropertiesFormat struct {
958	// ProvisioningState - The provisioning state of the web application firewall rule set.
959	ProvisioningState *string `json:"provisioningState,omitempty"`
960	// RuleSetType - The type of the web application firewall rule set.
961	RuleSetType *string `json:"ruleSetType,omitempty"`
962	// RuleSetVersion - The version of the web application firewall rule set type.
963	RuleSetVersion *string `json:"ruleSetVersion,omitempty"`
964	// RuleGroups - The rule groups of the web application firewall rule set.
965	RuleGroups *[]ApplicationGatewayFirewallRuleGroup `json:"ruleGroups,omitempty"`
966}
967
968// ApplicationGatewayFrontendIPConfiguration frontend IP configuration of an application gateway.
969type ApplicationGatewayFrontendIPConfiguration struct {
970	*ApplicationGatewayFrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"`
971	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
972	Name *string `json:"name,omitempty"`
973	// Etag - A unique read-only string that changes whenever the resource is updated.
974	Etag *string `json:"etag,omitempty"`
975	// Type - Type of the resource.
976	Type *string `json:"type,omitempty"`
977	// ID - Resource ID.
978	ID *string `json:"id,omitempty"`
979}
980
981// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendIPConfiguration.
982func (agfic ApplicationGatewayFrontendIPConfiguration) MarshalJSON() ([]byte, error) {
983	objectMap := make(map[string]interface{})
984	if agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat != nil {
985		objectMap["properties"] = agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat
986	}
987	if agfic.Name != nil {
988		objectMap["name"] = agfic.Name
989	}
990	if agfic.Etag != nil {
991		objectMap["etag"] = agfic.Etag
992	}
993	if agfic.Type != nil {
994		objectMap["type"] = agfic.Type
995	}
996	if agfic.ID != nil {
997		objectMap["id"] = agfic.ID
998	}
999	return json.Marshal(objectMap)
1000}
1001
1002// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFrontendIPConfiguration struct.
1003func (agfic *ApplicationGatewayFrontendIPConfiguration) UnmarshalJSON(body []byte) error {
1004	var m map[string]*json.RawMessage
1005	err := json.Unmarshal(body, &m)
1006	if err != nil {
1007		return err
1008	}
1009	for k, v := range m {
1010		switch k {
1011		case "properties":
1012			if v != nil {
1013				var applicationGatewayFrontendIPConfigurationPropertiesFormat ApplicationGatewayFrontendIPConfigurationPropertiesFormat
1014				err = json.Unmarshal(*v, &applicationGatewayFrontendIPConfigurationPropertiesFormat)
1015				if err != nil {
1016					return err
1017				}
1018				agfic.ApplicationGatewayFrontendIPConfigurationPropertiesFormat = &applicationGatewayFrontendIPConfigurationPropertiesFormat
1019			}
1020		case "name":
1021			if v != nil {
1022				var name string
1023				err = json.Unmarshal(*v, &name)
1024				if err != nil {
1025					return err
1026				}
1027				agfic.Name = &name
1028			}
1029		case "etag":
1030			if v != nil {
1031				var etag string
1032				err = json.Unmarshal(*v, &etag)
1033				if err != nil {
1034					return err
1035				}
1036				agfic.Etag = &etag
1037			}
1038		case "type":
1039			if v != nil {
1040				var typeVar string
1041				err = json.Unmarshal(*v, &typeVar)
1042				if err != nil {
1043					return err
1044				}
1045				agfic.Type = &typeVar
1046			}
1047		case "id":
1048			if v != nil {
1049				var ID string
1050				err = json.Unmarshal(*v, &ID)
1051				if err != nil {
1052					return err
1053				}
1054				agfic.ID = &ID
1055			}
1056		}
1057	}
1058
1059	return nil
1060}
1061
1062// ApplicationGatewayFrontendIPConfigurationPropertiesFormat properties of Frontend IP configuration of an
1063// application gateway.
1064type ApplicationGatewayFrontendIPConfigurationPropertiesFormat struct {
1065	// PrivateIPAddress - PrivateIPAddress of the network interface IP Configuration.
1066	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
1067	// PrivateIPAllocationMethod - PrivateIP allocation method. Possible values include: 'Static', 'Dynamic'
1068	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
1069	// Subnet - Reference of the subnet resource.
1070	Subnet *SubResource `json:"subnet,omitempty"`
1071	// PublicIPAddress - Reference of the PublicIP resource.
1072	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
1073	// ProvisioningState - Provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1074	ProvisioningState *string `json:"provisioningState,omitempty"`
1075}
1076
1077// ApplicationGatewayFrontendPort frontend port of an application gateway.
1078type ApplicationGatewayFrontendPort struct {
1079	*ApplicationGatewayFrontendPortPropertiesFormat `json:"properties,omitempty"`
1080	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
1081	Name *string `json:"name,omitempty"`
1082	// Etag - A unique read-only string that changes whenever the resource is updated.
1083	Etag *string `json:"etag,omitempty"`
1084	// Type - Type of the resource.
1085	Type *string `json:"type,omitempty"`
1086	// ID - Resource ID.
1087	ID *string `json:"id,omitempty"`
1088}
1089
1090// MarshalJSON is the custom marshaler for ApplicationGatewayFrontendPort.
1091func (agfp ApplicationGatewayFrontendPort) MarshalJSON() ([]byte, error) {
1092	objectMap := make(map[string]interface{})
1093	if agfp.ApplicationGatewayFrontendPortPropertiesFormat != nil {
1094		objectMap["properties"] = agfp.ApplicationGatewayFrontendPortPropertiesFormat
1095	}
1096	if agfp.Name != nil {
1097		objectMap["name"] = agfp.Name
1098	}
1099	if agfp.Etag != nil {
1100		objectMap["etag"] = agfp.Etag
1101	}
1102	if agfp.Type != nil {
1103		objectMap["type"] = agfp.Type
1104	}
1105	if agfp.ID != nil {
1106		objectMap["id"] = agfp.ID
1107	}
1108	return json.Marshal(objectMap)
1109}
1110
1111// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayFrontendPort struct.
1112func (agfp *ApplicationGatewayFrontendPort) UnmarshalJSON(body []byte) error {
1113	var m map[string]*json.RawMessage
1114	err := json.Unmarshal(body, &m)
1115	if err != nil {
1116		return err
1117	}
1118	for k, v := range m {
1119		switch k {
1120		case "properties":
1121			if v != nil {
1122				var applicationGatewayFrontendPortPropertiesFormat ApplicationGatewayFrontendPortPropertiesFormat
1123				err = json.Unmarshal(*v, &applicationGatewayFrontendPortPropertiesFormat)
1124				if err != nil {
1125					return err
1126				}
1127				agfp.ApplicationGatewayFrontendPortPropertiesFormat = &applicationGatewayFrontendPortPropertiesFormat
1128			}
1129		case "name":
1130			if v != nil {
1131				var name string
1132				err = json.Unmarshal(*v, &name)
1133				if err != nil {
1134					return err
1135				}
1136				agfp.Name = &name
1137			}
1138		case "etag":
1139			if v != nil {
1140				var etag string
1141				err = json.Unmarshal(*v, &etag)
1142				if err != nil {
1143					return err
1144				}
1145				agfp.Etag = &etag
1146			}
1147		case "type":
1148			if v != nil {
1149				var typeVar string
1150				err = json.Unmarshal(*v, &typeVar)
1151				if err != nil {
1152					return err
1153				}
1154				agfp.Type = &typeVar
1155			}
1156		case "id":
1157			if v != nil {
1158				var ID string
1159				err = json.Unmarshal(*v, &ID)
1160				if err != nil {
1161					return err
1162				}
1163				agfp.ID = &ID
1164			}
1165		}
1166	}
1167
1168	return nil
1169}
1170
1171// ApplicationGatewayFrontendPortPropertiesFormat properties of Frontend port of an application gateway.
1172type ApplicationGatewayFrontendPortPropertiesFormat struct {
1173	// Port - Frontend port
1174	Port *int32 `json:"port,omitempty"`
1175	// ProvisioningState - Provisioning state of the frontend port resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1176	ProvisioningState *string `json:"provisioningState,omitempty"`
1177}
1178
1179// ApplicationGatewayHTTPListener http listener of an application gateway.
1180type ApplicationGatewayHTTPListener struct {
1181	*ApplicationGatewayHTTPListenerPropertiesFormat `json:"properties,omitempty"`
1182	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
1183	Name *string `json:"name,omitempty"`
1184	// Etag - A unique read-only string that changes whenever the resource is updated.
1185	Etag *string `json:"etag,omitempty"`
1186	// Type - Type of the resource.
1187	Type *string `json:"type,omitempty"`
1188	// ID - Resource ID.
1189	ID *string `json:"id,omitempty"`
1190}
1191
1192// MarshalJSON is the custom marshaler for ApplicationGatewayHTTPListener.
1193func (aghl ApplicationGatewayHTTPListener) MarshalJSON() ([]byte, error) {
1194	objectMap := make(map[string]interface{})
1195	if aghl.ApplicationGatewayHTTPListenerPropertiesFormat != nil {
1196		objectMap["properties"] = aghl.ApplicationGatewayHTTPListenerPropertiesFormat
1197	}
1198	if aghl.Name != nil {
1199		objectMap["name"] = aghl.Name
1200	}
1201	if aghl.Etag != nil {
1202		objectMap["etag"] = aghl.Etag
1203	}
1204	if aghl.Type != nil {
1205		objectMap["type"] = aghl.Type
1206	}
1207	if aghl.ID != nil {
1208		objectMap["id"] = aghl.ID
1209	}
1210	return json.Marshal(objectMap)
1211}
1212
1213// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayHTTPListener struct.
1214func (aghl *ApplicationGatewayHTTPListener) UnmarshalJSON(body []byte) error {
1215	var m map[string]*json.RawMessage
1216	err := json.Unmarshal(body, &m)
1217	if err != nil {
1218		return err
1219	}
1220	for k, v := range m {
1221		switch k {
1222		case "properties":
1223			if v != nil {
1224				var applicationGatewayHTTPListenerPropertiesFormat ApplicationGatewayHTTPListenerPropertiesFormat
1225				err = json.Unmarshal(*v, &applicationGatewayHTTPListenerPropertiesFormat)
1226				if err != nil {
1227					return err
1228				}
1229				aghl.ApplicationGatewayHTTPListenerPropertiesFormat = &applicationGatewayHTTPListenerPropertiesFormat
1230			}
1231		case "name":
1232			if v != nil {
1233				var name string
1234				err = json.Unmarshal(*v, &name)
1235				if err != nil {
1236					return err
1237				}
1238				aghl.Name = &name
1239			}
1240		case "etag":
1241			if v != nil {
1242				var etag string
1243				err = json.Unmarshal(*v, &etag)
1244				if err != nil {
1245					return err
1246				}
1247				aghl.Etag = &etag
1248			}
1249		case "type":
1250			if v != nil {
1251				var typeVar string
1252				err = json.Unmarshal(*v, &typeVar)
1253				if err != nil {
1254					return err
1255				}
1256				aghl.Type = &typeVar
1257			}
1258		case "id":
1259			if v != nil {
1260				var ID string
1261				err = json.Unmarshal(*v, &ID)
1262				if err != nil {
1263					return err
1264				}
1265				aghl.ID = &ID
1266			}
1267		}
1268	}
1269
1270	return nil
1271}
1272
1273// ApplicationGatewayHTTPListenerPropertiesFormat properties of HTTP listener of an application gateway.
1274type ApplicationGatewayHTTPListenerPropertiesFormat struct {
1275	// FrontendIPConfiguration - Frontend IP configuration resource of an application gateway.
1276	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
1277	// FrontendPort - Frontend port resource of an application gateway.
1278	FrontendPort *SubResource `json:"frontendPort,omitempty"`
1279	// Protocol - Protocol. Possible values include: 'HTTP', 'HTTPS'
1280	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
1281	// HostName - Host name of HTTP listener.
1282	HostName *string `json:"hostName,omitempty"`
1283	// SslCertificate - SSL certificate resource of an application gateway.
1284	SslCertificate *SubResource `json:"sslCertificate,omitempty"`
1285	// RequireServerNameIndication - Applicable only if protocol is https. Enables SNI for multi-hosting.
1286	RequireServerNameIndication *bool `json:"requireServerNameIndication,omitempty"`
1287	// ProvisioningState - Provisioning state of the HTTP listener resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1288	ProvisioningState *string `json:"provisioningState,omitempty"`
1289}
1290
1291// ApplicationGatewayIPConfiguration IP configuration of an application gateway. Currently 1 public and 1
1292// private IP configuration is allowed.
1293type ApplicationGatewayIPConfiguration struct {
1294	*ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"`
1295	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
1296	Name *string `json:"name,omitempty"`
1297	// Etag - A unique read-only string that changes whenever the resource is updated.
1298	Etag *string `json:"etag,omitempty"`
1299	// Type - Type of the resource.
1300	Type *string `json:"type,omitempty"`
1301	// ID - Resource ID.
1302	ID *string `json:"id,omitempty"`
1303}
1304
1305// MarshalJSON is the custom marshaler for ApplicationGatewayIPConfiguration.
1306func (agic ApplicationGatewayIPConfiguration) MarshalJSON() ([]byte, error) {
1307	objectMap := make(map[string]interface{})
1308	if agic.ApplicationGatewayIPConfigurationPropertiesFormat != nil {
1309		objectMap["properties"] = agic.ApplicationGatewayIPConfigurationPropertiesFormat
1310	}
1311	if agic.Name != nil {
1312		objectMap["name"] = agic.Name
1313	}
1314	if agic.Etag != nil {
1315		objectMap["etag"] = agic.Etag
1316	}
1317	if agic.Type != nil {
1318		objectMap["type"] = agic.Type
1319	}
1320	if agic.ID != nil {
1321		objectMap["id"] = agic.ID
1322	}
1323	return json.Marshal(objectMap)
1324}
1325
1326// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayIPConfiguration struct.
1327func (agic *ApplicationGatewayIPConfiguration) UnmarshalJSON(body []byte) error {
1328	var m map[string]*json.RawMessage
1329	err := json.Unmarshal(body, &m)
1330	if err != nil {
1331		return err
1332	}
1333	for k, v := range m {
1334		switch k {
1335		case "properties":
1336			if v != nil {
1337				var applicationGatewayIPConfigurationPropertiesFormat ApplicationGatewayIPConfigurationPropertiesFormat
1338				err = json.Unmarshal(*v, &applicationGatewayIPConfigurationPropertiesFormat)
1339				if err != nil {
1340					return err
1341				}
1342				agic.ApplicationGatewayIPConfigurationPropertiesFormat = &applicationGatewayIPConfigurationPropertiesFormat
1343			}
1344		case "name":
1345			if v != nil {
1346				var name string
1347				err = json.Unmarshal(*v, &name)
1348				if err != nil {
1349					return err
1350				}
1351				agic.Name = &name
1352			}
1353		case "etag":
1354			if v != nil {
1355				var etag string
1356				err = json.Unmarshal(*v, &etag)
1357				if err != nil {
1358					return err
1359				}
1360				agic.Etag = &etag
1361			}
1362		case "type":
1363			if v != nil {
1364				var typeVar string
1365				err = json.Unmarshal(*v, &typeVar)
1366				if err != nil {
1367					return err
1368				}
1369				agic.Type = &typeVar
1370			}
1371		case "id":
1372			if v != nil {
1373				var ID string
1374				err = json.Unmarshal(*v, &ID)
1375				if err != nil {
1376					return err
1377				}
1378				agic.ID = &ID
1379			}
1380		}
1381	}
1382
1383	return nil
1384}
1385
1386// ApplicationGatewayIPConfigurationPropertiesFormat properties of IP configuration of an application
1387// gateway.
1388type ApplicationGatewayIPConfigurationPropertiesFormat struct {
1389	// Subnet - Reference of the subnet resource. A subnet from where application gateway gets its private address.
1390	Subnet *SubResource `json:"subnet,omitempty"`
1391	// ProvisioningState - Provisioning state of the application gateway subnet resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1392	ProvisioningState *string `json:"provisioningState,omitempty"`
1393}
1394
1395// ApplicationGatewayListResult response for ListApplicationGateways API service call.
1396type ApplicationGatewayListResult struct {
1397	autorest.Response `json:"-"`
1398	// Value - List of an application gateways in a resource group.
1399	Value *[]ApplicationGateway `json:"value,omitempty"`
1400	// NextLink - URL to get the next set of results.
1401	NextLink *string `json:"nextLink,omitempty"`
1402}
1403
1404// ApplicationGatewayListResultIterator provides access to a complete listing of ApplicationGateway values.
1405type ApplicationGatewayListResultIterator struct {
1406	i    int
1407	page ApplicationGatewayListResultPage
1408}
1409
1410// NextWithContext advances to the next value.  If there was an error making
1411// the request the iterator does not advance and the error is returned.
1412func (iter *ApplicationGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
1413	if tracing.IsEnabled() {
1414		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayListResultIterator.NextWithContext")
1415		defer func() {
1416			sc := -1
1417			if iter.Response().Response.Response != nil {
1418				sc = iter.Response().Response.Response.StatusCode
1419			}
1420			tracing.EndSpan(ctx, sc, err)
1421		}()
1422	}
1423	iter.i++
1424	if iter.i < len(iter.page.Values()) {
1425		return nil
1426	}
1427	err = iter.page.NextWithContext(ctx)
1428	if err != nil {
1429		iter.i--
1430		return err
1431	}
1432	iter.i = 0
1433	return nil
1434}
1435
1436// Next advances to the next value.  If there was an error making
1437// the request the iterator does not advance and the error is returned.
1438// Deprecated: Use NextWithContext() instead.
1439func (iter *ApplicationGatewayListResultIterator) Next() error {
1440	return iter.NextWithContext(context.Background())
1441}
1442
1443// NotDone returns true if the enumeration should be started or is not yet complete.
1444func (iter ApplicationGatewayListResultIterator) NotDone() bool {
1445	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1446}
1447
1448// Response returns the raw server response from the last page request.
1449func (iter ApplicationGatewayListResultIterator) Response() ApplicationGatewayListResult {
1450	return iter.page.Response()
1451}
1452
1453// Value returns the current value or a zero-initialized value if the
1454// iterator has advanced beyond the end of the collection.
1455func (iter ApplicationGatewayListResultIterator) Value() ApplicationGateway {
1456	if !iter.page.NotDone() {
1457		return ApplicationGateway{}
1458	}
1459	return iter.page.Values()[iter.i]
1460}
1461
1462// Creates a new instance of the ApplicationGatewayListResultIterator type.
1463func NewApplicationGatewayListResultIterator(page ApplicationGatewayListResultPage) ApplicationGatewayListResultIterator {
1464	return ApplicationGatewayListResultIterator{page: page}
1465}
1466
1467// IsEmpty returns true if the ListResult contains no values.
1468func (aglr ApplicationGatewayListResult) IsEmpty() bool {
1469	return aglr.Value == nil || len(*aglr.Value) == 0
1470}
1471
1472// hasNextLink returns true if the NextLink is not empty.
1473func (aglr ApplicationGatewayListResult) hasNextLink() bool {
1474	return aglr.NextLink != nil && len(*aglr.NextLink) != 0
1475}
1476
1477// applicationGatewayListResultPreparer prepares a request to retrieve the next set of results.
1478// It returns nil if no more results exist.
1479func (aglr ApplicationGatewayListResult) applicationGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
1480	if !aglr.hasNextLink() {
1481		return nil, nil
1482	}
1483	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1484		autorest.AsJSON(),
1485		autorest.AsGet(),
1486		autorest.WithBaseURL(to.String(aglr.NextLink)))
1487}
1488
1489// ApplicationGatewayListResultPage contains a page of ApplicationGateway values.
1490type ApplicationGatewayListResultPage struct {
1491	fn   func(context.Context, ApplicationGatewayListResult) (ApplicationGatewayListResult, error)
1492	aglr ApplicationGatewayListResult
1493}
1494
1495// NextWithContext advances to the next page of values.  If there was an error making
1496// the request the page does not advance and the error is returned.
1497func (page *ApplicationGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
1498	if tracing.IsEnabled() {
1499		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayListResultPage.NextWithContext")
1500		defer func() {
1501			sc := -1
1502			if page.Response().Response.Response != nil {
1503				sc = page.Response().Response.Response.StatusCode
1504			}
1505			tracing.EndSpan(ctx, sc, err)
1506		}()
1507	}
1508	for {
1509		next, err := page.fn(ctx, page.aglr)
1510		if err != nil {
1511			return err
1512		}
1513		page.aglr = next
1514		if !next.hasNextLink() || !next.IsEmpty() {
1515			break
1516		}
1517	}
1518	return nil
1519}
1520
1521// Next advances to the next page of values.  If there was an error making
1522// the request the page does not advance and the error is returned.
1523// Deprecated: Use NextWithContext() instead.
1524func (page *ApplicationGatewayListResultPage) Next() error {
1525	return page.NextWithContext(context.Background())
1526}
1527
1528// NotDone returns true if the page enumeration should be started or is not yet complete.
1529func (page ApplicationGatewayListResultPage) NotDone() bool {
1530	return !page.aglr.IsEmpty()
1531}
1532
1533// Response returns the raw server response from the last page request.
1534func (page ApplicationGatewayListResultPage) Response() ApplicationGatewayListResult {
1535	return page.aglr
1536}
1537
1538// Values returns the slice of values for the current page or nil if there are no values.
1539func (page ApplicationGatewayListResultPage) Values() []ApplicationGateway {
1540	if page.aglr.IsEmpty() {
1541		return nil
1542	}
1543	return *page.aglr.Value
1544}
1545
1546// Creates a new instance of the ApplicationGatewayListResultPage type.
1547func NewApplicationGatewayListResultPage(cur ApplicationGatewayListResult, getNextPage func(context.Context, ApplicationGatewayListResult) (ApplicationGatewayListResult, error)) ApplicationGatewayListResultPage {
1548	return ApplicationGatewayListResultPage{
1549		fn:   getNextPage,
1550		aglr: cur,
1551	}
1552}
1553
1554// ApplicationGatewayPathRule path rule of URL path map of an application gateway.
1555type ApplicationGatewayPathRule struct {
1556	*ApplicationGatewayPathRulePropertiesFormat `json:"properties,omitempty"`
1557	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
1558	Name *string `json:"name,omitempty"`
1559	// Etag - A unique read-only string that changes whenever the resource is updated.
1560	Etag *string `json:"etag,omitempty"`
1561	// Type - Type of the resource.
1562	Type *string `json:"type,omitempty"`
1563	// ID - Resource ID.
1564	ID *string `json:"id,omitempty"`
1565}
1566
1567// MarshalJSON is the custom marshaler for ApplicationGatewayPathRule.
1568func (agpr ApplicationGatewayPathRule) MarshalJSON() ([]byte, error) {
1569	objectMap := make(map[string]interface{})
1570	if agpr.ApplicationGatewayPathRulePropertiesFormat != nil {
1571		objectMap["properties"] = agpr.ApplicationGatewayPathRulePropertiesFormat
1572	}
1573	if agpr.Name != nil {
1574		objectMap["name"] = agpr.Name
1575	}
1576	if agpr.Etag != nil {
1577		objectMap["etag"] = agpr.Etag
1578	}
1579	if agpr.Type != nil {
1580		objectMap["type"] = agpr.Type
1581	}
1582	if agpr.ID != nil {
1583		objectMap["id"] = agpr.ID
1584	}
1585	return json.Marshal(objectMap)
1586}
1587
1588// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayPathRule struct.
1589func (agpr *ApplicationGatewayPathRule) UnmarshalJSON(body []byte) error {
1590	var m map[string]*json.RawMessage
1591	err := json.Unmarshal(body, &m)
1592	if err != nil {
1593		return err
1594	}
1595	for k, v := range m {
1596		switch k {
1597		case "properties":
1598			if v != nil {
1599				var applicationGatewayPathRulePropertiesFormat ApplicationGatewayPathRulePropertiesFormat
1600				err = json.Unmarshal(*v, &applicationGatewayPathRulePropertiesFormat)
1601				if err != nil {
1602					return err
1603				}
1604				agpr.ApplicationGatewayPathRulePropertiesFormat = &applicationGatewayPathRulePropertiesFormat
1605			}
1606		case "name":
1607			if v != nil {
1608				var name string
1609				err = json.Unmarshal(*v, &name)
1610				if err != nil {
1611					return err
1612				}
1613				agpr.Name = &name
1614			}
1615		case "etag":
1616			if v != nil {
1617				var etag string
1618				err = json.Unmarshal(*v, &etag)
1619				if err != nil {
1620					return err
1621				}
1622				agpr.Etag = &etag
1623			}
1624		case "type":
1625			if v != nil {
1626				var typeVar string
1627				err = json.Unmarshal(*v, &typeVar)
1628				if err != nil {
1629					return err
1630				}
1631				agpr.Type = &typeVar
1632			}
1633		case "id":
1634			if v != nil {
1635				var ID string
1636				err = json.Unmarshal(*v, &ID)
1637				if err != nil {
1638					return err
1639				}
1640				agpr.ID = &ID
1641			}
1642		}
1643	}
1644
1645	return nil
1646}
1647
1648// ApplicationGatewayPathRulePropertiesFormat properties of path rule of an application gateway.
1649type ApplicationGatewayPathRulePropertiesFormat struct {
1650	// Paths - Path rules of URL path map.
1651	Paths *[]string `json:"paths,omitempty"`
1652	// BackendAddressPool - Backend address pool resource of URL path map path rule.
1653	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
1654	// BackendHTTPSettings - Backend http settings resource of URL path map path rule.
1655	BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"`
1656	// RedirectConfiguration - Redirect configuration resource of URL path map path rule.
1657	RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"`
1658	// ProvisioningState - Path rule of URL path map resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1659	ProvisioningState *string `json:"provisioningState,omitempty"`
1660}
1661
1662// ApplicationGatewayProbe probe of the application gateway.
1663type ApplicationGatewayProbe struct {
1664	*ApplicationGatewayProbePropertiesFormat `json:"properties,omitempty"`
1665	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
1666	Name *string `json:"name,omitempty"`
1667	// Etag - A unique read-only string that changes whenever the resource is updated.
1668	Etag *string `json:"etag,omitempty"`
1669	// Type - Type of the resource.
1670	Type *string `json:"type,omitempty"`
1671	// ID - Resource ID.
1672	ID *string `json:"id,omitempty"`
1673}
1674
1675// MarshalJSON is the custom marshaler for ApplicationGatewayProbe.
1676func (agp ApplicationGatewayProbe) MarshalJSON() ([]byte, error) {
1677	objectMap := make(map[string]interface{})
1678	if agp.ApplicationGatewayProbePropertiesFormat != nil {
1679		objectMap["properties"] = agp.ApplicationGatewayProbePropertiesFormat
1680	}
1681	if agp.Name != nil {
1682		objectMap["name"] = agp.Name
1683	}
1684	if agp.Etag != nil {
1685		objectMap["etag"] = agp.Etag
1686	}
1687	if agp.Type != nil {
1688		objectMap["type"] = agp.Type
1689	}
1690	if agp.ID != nil {
1691		objectMap["id"] = agp.ID
1692	}
1693	return json.Marshal(objectMap)
1694}
1695
1696// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayProbe struct.
1697func (agp *ApplicationGatewayProbe) UnmarshalJSON(body []byte) error {
1698	var m map[string]*json.RawMessage
1699	err := json.Unmarshal(body, &m)
1700	if err != nil {
1701		return err
1702	}
1703	for k, v := range m {
1704		switch k {
1705		case "properties":
1706			if v != nil {
1707				var applicationGatewayProbePropertiesFormat ApplicationGatewayProbePropertiesFormat
1708				err = json.Unmarshal(*v, &applicationGatewayProbePropertiesFormat)
1709				if err != nil {
1710					return err
1711				}
1712				agp.ApplicationGatewayProbePropertiesFormat = &applicationGatewayProbePropertiesFormat
1713			}
1714		case "name":
1715			if v != nil {
1716				var name string
1717				err = json.Unmarshal(*v, &name)
1718				if err != nil {
1719					return err
1720				}
1721				agp.Name = &name
1722			}
1723		case "etag":
1724			if v != nil {
1725				var etag string
1726				err = json.Unmarshal(*v, &etag)
1727				if err != nil {
1728					return err
1729				}
1730				agp.Etag = &etag
1731			}
1732		case "type":
1733			if v != nil {
1734				var typeVar string
1735				err = json.Unmarshal(*v, &typeVar)
1736				if err != nil {
1737					return err
1738				}
1739				agp.Type = &typeVar
1740			}
1741		case "id":
1742			if v != nil {
1743				var ID string
1744				err = json.Unmarshal(*v, &ID)
1745				if err != nil {
1746					return err
1747				}
1748				agp.ID = &ID
1749			}
1750		}
1751	}
1752
1753	return nil
1754}
1755
1756// ApplicationGatewayProbeHealthResponseMatch application gateway probe health response match
1757type ApplicationGatewayProbeHealthResponseMatch struct {
1758	// Body - Body that must be contained in the health response. Default value is empty.
1759	Body *string `json:"body,omitempty"`
1760	// StatusCodes - Allowed ranges of healthy status codes. Default range of healthy status codes is 200-399.
1761	StatusCodes *[]string `json:"statusCodes,omitempty"`
1762}
1763
1764// ApplicationGatewayProbePropertiesFormat properties of probe of an application gateway.
1765type ApplicationGatewayProbePropertiesFormat struct {
1766	// Protocol - Protocol. Possible values include: 'HTTP', 'HTTPS'
1767	Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"`
1768	// Host - Host name to send the probe to.
1769	Host *string `json:"host,omitempty"`
1770	// Path - Relative path of probe. Valid path starts from '/'. Probe is sent to <Protocol>://<host>:<port><path>
1771	Path *string `json:"path,omitempty"`
1772	// Interval - The probing interval in seconds. This is the time interval between two consecutive probes. Acceptable values are from 1 second to 86400 seconds.
1773	Interval *int32 `json:"interval,omitempty"`
1774	// 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.
1775	Timeout *int32 `json:"timeout,omitempty"`
1776	// 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.
1777	UnhealthyThreshold *int32 `json:"unhealthyThreshold,omitempty"`
1778	// PickHostNameFromBackendHTTPSettings - Whether the host header should be picked from the backend http settings. Default value is false.
1779	PickHostNameFromBackendHTTPSettings *bool `json:"pickHostNameFromBackendHttpSettings,omitempty"`
1780	// MinServers - Minimum number of servers that are always marked healthy. Default value is 0.
1781	MinServers *int32 `json:"minServers,omitempty"`
1782	// Match - Criterion for classifying a healthy probe response.
1783	Match *ApplicationGatewayProbeHealthResponseMatch `json:"match,omitempty"`
1784	// ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1785	ProvisioningState *string `json:"provisioningState,omitempty"`
1786}
1787
1788// ApplicationGatewayPropertiesFormat properties of the application gateway.
1789type ApplicationGatewayPropertiesFormat struct {
1790	// Sku - SKU of the application gateway resource.
1791	Sku *ApplicationGatewaySku `json:"sku,omitempty"`
1792	// SslPolicy - SSL policy of the application gateway resource.
1793	SslPolicy *ApplicationGatewaySslPolicy `json:"sslPolicy,omitempty"`
1794	// OperationalState - READ-ONLY; Operational state of the application gateway resource. Possible values include: 'Stopped', 'Starting', 'Running', 'Stopping'
1795	OperationalState ApplicationGatewayOperationalState `json:"operationalState,omitempty"`
1796	// GatewayIPConfigurations - Subnets of application the gateway resource.
1797	GatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"gatewayIPConfigurations,omitempty"`
1798	// AuthenticationCertificates - Authentication certificates of the application gateway resource.
1799	AuthenticationCertificates *[]ApplicationGatewayAuthenticationCertificate `json:"authenticationCertificates,omitempty"`
1800	// SslCertificates - SSL certificates of the application gateway resource.
1801	SslCertificates *[]ApplicationGatewaySslCertificate `json:"sslCertificates,omitempty"`
1802	// FrontendIPConfigurations - Frontend IP addresses of the application gateway resource.
1803	FrontendIPConfigurations *[]ApplicationGatewayFrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"`
1804	// FrontendPorts - Frontend ports of the application gateway resource.
1805	FrontendPorts *[]ApplicationGatewayFrontendPort `json:"frontendPorts,omitempty"`
1806	// Probes - Probes of the application gateway resource.
1807	Probes *[]ApplicationGatewayProbe `json:"probes,omitempty"`
1808	// BackendAddressPools - Backend address pool of the application gateway resource.
1809	BackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"backendAddressPools,omitempty"`
1810	// BackendHTTPSettingsCollection - Backend http settings of the application gateway resource.
1811	BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettingsCollection,omitempty"`
1812	// HTTPListeners - Http listeners of the application gateway resource.
1813	HTTPListeners *[]ApplicationGatewayHTTPListener `json:"httpListeners,omitempty"`
1814	// URLPathMaps - URL path map of the application gateway resource.
1815	URLPathMaps *[]ApplicationGatewayURLPathMap `json:"urlPathMaps,omitempty"`
1816	// RequestRoutingRules - Request routing rules of the application gateway resource.
1817	RequestRoutingRules *[]ApplicationGatewayRequestRoutingRule `json:"requestRoutingRules,omitempty"`
1818	// RedirectConfigurations - Redirect configurations of the application gateway resource.
1819	RedirectConfigurations *[]ApplicationGatewayRedirectConfiguration `json:"redirectConfigurations,omitempty"`
1820	// WebApplicationFirewallConfiguration - Web application firewall configuration.
1821	WebApplicationFirewallConfiguration *ApplicationGatewayWebApplicationFirewallConfiguration `json:"webApplicationFirewallConfiguration,omitempty"`
1822	// ResourceGUID - Resource GUID property of the application gateway resource.
1823	ResourceGUID *string `json:"resourceGuid,omitempty"`
1824	// ProvisioningState - Provisioning state of the application gateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1825	ProvisioningState *string `json:"provisioningState,omitempty"`
1826}
1827
1828// MarshalJSON is the custom marshaler for ApplicationGatewayPropertiesFormat.
1829func (agpf ApplicationGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
1830	objectMap := make(map[string]interface{})
1831	if agpf.Sku != nil {
1832		objectMap["sku"] = agpf.Sku
1833	}
1834	if agpf.SslPolicy != nil {
1835		objectMap["sslPolicy"] = agpf.SslPolicy
1836	}
1837	if agpf.GatewayIPConfigurations != nil {
1838		objectMap["gatewayIPConfigurations"] = agpf.GatewayIPConfigurations
1839	}
1840	if agpf.AuthenticationCertificates != nil {
1841		objectMap["authenticationCertificates"] = agpf.AuthenticationCertificates
1842	}
1843	if agpf.SslCertificates != nil {
1844		objectMap["sslCertificates"] = agpf.SslCertificates
1845	}
1846	if agpf.FrontendIPConfigurations != nil {
1847		objectMap["frontendIPConfigurations"] = agpf.FrontendIPConfigurations
1848	}
1849	if agpf.FrontendPorts != nil {
1850		objectMap["frontendPorts"] = agpf.FrontendPorts
1851	}
1852	if agpf.Probes != nil {
1853		objectMap["probes"] = agpf.Probes
1854	}
1855	if agpf.BackendAddressPools != nil {
1856		objectMap["backendAddressPools"] = agpf.BackendAddressPools
1857	}
1858	if agpf.BackendHTTPSettingsCollection != nil {
1859		objectMap["backendHttpSettingsCollection"] = agpf.BackendHTTPSettingsCollection
1860	}
1861	if agpf.HTTPListeners != nil {
1862		objectMap["httpListeners"] = agpf.HTTPListeners
1863	}
1864	if agpf.URLPathMaps != nil {
1865		objectMap["urlPathMaps"] = agpf.URLPathMaps
1866	}
1867	if agpf.RequestRoutingRules != nil {
1868		objectMap["requestRoutingRules"] = agpf.RequestRoutingRules
1869	}
1870	if agpf.RedirectConfigurations != nil {
1871		objectMap["redirectConfigurations"] = agpf.RedirectConfigurations
1872	}
1873	if agpf.WebApplicationFirewallConfiguration != nil {
1874		objectMap["webApplicationFirewallConfiguration"] = agpf.WebApplicationFirewallConfiguration
1875	}
1876	if agpf.ResourceGUID != nil {
1877		objectMap["resourceGuid"] = agpf.ResourceGUID
1878	}
1879	if agpf.ProvisioningState != nil {
1880		objectMap["provisioningState"] = agpf.ProvisioningState
1881	}
1882	return json.Marshal(objectMap)
1883}
1884
1885// ApplicationGatewayRedirectConfiguration redirect configuration of an application gateway.
1886type ApplicationGatewayRedirectConfiguration struct {
1887	*ApplicationGatewayRedirectConfigurationPropertiesFormat `json:"properties,omitempty"`
1888	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
1889	Name *string `json:"name,omitempty"`
1890	// Etag - A unique read-only string that changes whenever the resource is updated.
1891	Etag *string `json:"etag,omitempty"`
1892	// Type - Type of the resource.
1893	Type *string `json:"type,omitempty"`
1894	// ID - Resource ID.
1895	ID *string `json:"id,omitempty"`
1896}
1897
1898// MarshalJSON is the custom marshaler for ApplicationGatewayRedirectConfiguration.
1899func (agrc ApplicationGatewayRedirectConfiguration) MarshalJSON() ([]byte, error) {
1900	objectMap := make(map[string]interface{})
1901	if agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat != nil {
1902		objectMap["properties"] = agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat
1903	}
1904	if agrc.Name != nil {
1905		objectMap["name"] = agrc.Name
1906	}
1907	if agrc.Etag != nil {
1908		objectMap["etag"] = agrc.Etag
1909	}
1910	if agrc.Type != nil {
1911		objectMap["type"] = agrc.Type
1912	}
1913	if agrc.ID != nil {
1914		objectMap["id"] = agrc.ID
1915	}
1916	return json.Marshal(objectMap)
1917}
1918
1919// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRedirectConfiguration struct.
1920func (agrc *ApplicationGatewayRedirectConfiguration) UnmarshalJSON(body []byte) error {
1921	var m map[string]*json.RawMessage
1922	err := json.Unmarshal(body, &m)
1923	if err != nil {
1924		return err
1925	}
1926	for k, v := range m {
1927		switch k {
1928		case "properties":
1929			if v != nil {
1930				var applicationGatewayRedirectConfigurationPropertiesFormat ApplicationGatewayRedirectConfigurationPropertiesFormat
1931				err = json.Unmarshal(*v, &applicationGatewayRedirectConfigurationPropertiesFormat)
1932				if err != nil {
1933					return err
1934				}
1935				agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat = &applicationGatewayRedirectConfigurationPropertiesFormat
1936			}
1937		case "name":
1938			if v != nil {
1939				var name string
1940				err = json.Unmarshal(*v, &name)
1941				if err != nil {
1942					return err
1943				}
1944				agrc.Name = &name
1945			}
1946		case "etag":
1947			if v != nil {
1948				var etag string
1949				err = json.Unmarshal(*v, &etag)
1950				if err != nil {
1951					return err
1952				}
1953				agrc.Etag = &etag
1954			}
1955		case "type":
1956			if v != nil {
1957				var typeVar string
1958				err = json.Unmarshal(*v, &typeVar)
1959				if err != nil {
1960					return err
1961				}
1962				agrc.Type = &typeVar
1963			}
1964		case "id":
1965			if v != nil {
1966				var ID string
1967				err = json.Unmarshal(*v, &ID)
1968				if err != nil {
1969					return err
1970				}
1971				agrc.ID = &ID
1972			}
1973		}
1974	}
1975
1976	return nil
1977}
1978
1979// ApplicationGatewayRedirectConfigurationPropertiesFormat properties of redirect configuration of the
1980// application gateway.
1981type ApplicationGatewayRedirectConfigurationPropertiesFormat struct {
1982	// RedirectType - Supported http redirection types - Permanent, Temporary, Found, SeeOther. Possible values include: 'Permanent', 'Found', 'SeeOther', 'Temporary'
1983	RedirectType ApplicationGatewayRedirectType `json:"redirectType,omitempty"`
1984	// TargetListener - Reference to a listener to redirect the request to.
1985	TargetListener *SubResource `json:"targetListener,omitempty"`
1986	// TargetURL - Url to redirect the request to.
1987	TargetURL *string `json:"targetUrl,omitempty"`
1988	// IncludePath - Include path in the redirected url.
1989	IncludePath *bool `json:"includePath,omitempty"`
1990	// IncludeQueryString - Include query string in the redirected url.
1991	IncludeQueryString *bool `json:"includeQueryString,omitempty"`
1992	// RequestRoutingRules - Request routing specifying redirect configuration.
1993	RequestRoutingRules *[]SubResource `json:"requestRoutingRules,omitempty"`
1994	// URLPathMaps - Url path maps specifying default redirect configuration.
1995	URLPathMaps *[]SubResource `json:"urlPathMaps,omitempty"`
1996	// PathRules - Path rules specifying redirect configuration.
1997	PathRules *[]SubResource `json:"pathRules,omitempty"`
1998}
1999
2000// ApplicationGatewayRequestRoutingRule request routing rule of an application gateway.
2001type ApplicationGatewayRequestRoutingRule struct {
2002	*ApplicationGatewayRequestRoutingRulePropertiesFormat `json:"properties,omitempty"`
2003	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
2004	Name *string `json:"name,omitempty"`
2005	// Etag - A unique read-only string that changes whenever the resource is updated.
2006	Etag *string `json:"etag,omitempty"`
2007	// Type - Type of the resource.
2008	Type *string `json:"type,omitempty"`
2009	// ID - Resource ID.
2010	ID *string `json:"id,omitempty"`
2011}
2012
2013// MarshalJSON is the custom marshaler for ApplicationGatewayRequestRoutingRule.
2014func (agrrr ApplicationGatewayRequestRoutingRule) MarshalJSON() ([]byte, error) {
2015	objectMap := make(map[string]interface{})
2016	if agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat != nil {
2017		objectMap["properties"] = agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat
2018	}
2019	if agrrr.Name != nil {
2020		objectMap["name"] = agrrr.Name
2021	}
2022	if agrrr.Etag != nil {
2023		objectMap["etag"] = agrrr.Etag
2024	}
2025	if agrrr.Type != nil {
2026		objectMap["type"] = agrrr.Type
2027	}
2028	if agrrr.ID != nil {
2029		objectMap["id"] = agrrr.ID
2030	}
2031	return json.Marshal(objectMap)
2032}
2033
2034// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRequestRoutingRule struct.
2035func (agrrr *ApplicationGatewayRequestRoutingRule) UnmarshalJSON(body []byte) error {
2036	var m map[string]*json.RawMessage
2037	err := json.Unmarshal(body, &m)
2038	if err != nil {
2039		return err
2040	}
2041	for k, v := range m {
2042		switch k {
2043		case "properties":
2044			if v != nil {
2045				var applicationGatewayRequestRoutingRulePropertiesFormat ApplicationGatewayRequestRoutingRulePropertiesFormat
2046				err = json.Unmarshal(*v, &applicationGatewayRequestRoutingRulePropertiesFormat)
2047				if err != nil {
2048					return err
2049				}
2050				agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat = &applicationGatewayRequestRoutingRulePropertiesFormat
2051			}
2052		case "name":
2053			if v != nil {
2054				var name string
2055				err = json.Unmarshal(*v, &name)
2056				if err != nil {
2057					return err
2058				}
2059				agrrr.Name = &name
2060			}
2061		case "etag":
2062			if v != nil {
2063				var etag string
2064				err = json.Unmarshal(*v, &etag)
2065				if err != nil {
2066					return err
2067				}
2068				agrrr.Etag = &etag
2069			}
2070		case "type":
2071			if v != nil {
2072				var typeVar string
2073				err = json.Unmarshal(*v, &typeVar)
2074				if err != nil {
2075					return err
2076				}
2077				agrrr.Type = &typeVar
2078			}
2079		case "id":
2080			if v != nil {
2081				var ID string
2082				err = json.Unmarshal(*v, &ID)
2083				if err != nil {
2084					return err
2085				}
2086				agrrr.ID = &ID
2087			}
2088		}
2089	}
2090
2091	return nil
2092}
2093
2094// ApplicationGatewayRequestRoutingRulePropertiesFormat properties of request routing rule of the
2095// application gateway.
2096type ApplicationGatewayRequestRoutingRulePropertiesFormat struct {
2097	// RuleType - Rule type. Possible values include: 'Basic', 'PathBasedRouting'
2098	RuleType ApplicationGatewayRequestRoutingRuleType `json:"ruleType,omitempty"`
2099	// BackendAddressPool - Backend address pool resource of the application gateway.
2100	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
2101	// BackendHTTPSettings - Frontend port resource of the application gateway.
2102	BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"`
2103	// HTTPListener - Http listener resource of the application gateway.
2104	HTTPListener *SubResource `json:"httpListener,omitempty"`
2105	// URLPathMap - URL path map resource of the application gateway.
2106	URLPathMap *SubResource `json:"urlPathMap,omitempty"`
2107	// RedirectConfiguration - Redirect configuration resource of the application gateway.
2108	RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"`
2109	// ProvisioningState - Provisioning state of the request routing rule resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2110	ProvisioningState *string `json:"provisioningState,omitempty"`
2111}
2112
2113// ApplicationGatewaysBackendHealthFuture an abstraction for monitoring and retrieving the results of a
2114// long-running operation.
2115type ApplicationGatewaysBackendHealthFuture struct {
2116	azure.FutureAPI
2117	// Result returns the result of the asynchronous operation.
2118	// If the operation has not completed it will return an error.
2119	Result func(ApplicationGatewaysClient) (ApplicationGatewayBackendHealth, error)
2120}
2121
2122// ApplicationGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
2123// long-running operation.
2124type ApplicationGatewaysCreateOrUpdateFuture struct {
2125	azure.FutureAPI
2126	// Result returns the result of the asynchronous operation.
2127	// If the operation has not completed it will return an error.
2128	Result func(ApplicationGatewaysClient) (ApplicationGateway, error)
2129}
2130
2131// ApplicationGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
2132// long-running operation.
2133type ApplicationGatewaysDeleteFuture struct {
2134	azure.FutureAPI
2135	// Result returns the result of the asynchronous operation.
2136	// If the operation has not completed it will return an error.
2137	Result func(ApplicationGatewaysClient) (autorest.Response, error)
2138}
2139
2140// ApplicationGatewaySku SKU of an application gateway
2141type ApplicationGatewaySku struct {
2142	// Name - Name of an application gateway SKU. Possible values include: 'StandardSmall', 'StandardMedium', 'StandardLarge', 'WAFMedium', 'WAFLarge'
2143	Name ApplicationGatewaySkuName `json:"name,omitempty"`
2144	// Tier - Tier of an application gateway. Possible values include: 'Standard', 'WAF'
2145	Tier ApplicationGatewayTier `json:"tier,omitempty"`
2146	// Capacity - Capacity (instance count) of an application gateway.
2147	Capacity *int32 `json:"capacity,omitempty"`
2148}
2149
2150// ApplicationGatewaySslCertificate SSL certificates of an application gateway.
2151type ApplicationGatewaySslCertificate struct {
2152	*ApplicationGatewaySslCertificatePropertiesFormat `json:"properties,omitempty"`
2153	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
2154	Name *string `json:"name,omitempty"`
2155	// Etag - A unique read-only string that changes whenever the resource is updated.
2156	Etag *string `json:"etag,omitempty"`
2157	// Type - Type of the resource.
2158	Type *string `json:"type,omitempty"`
2159	// ID - Resource ID.
2160	ID *string `json:"id,omitempty"`
2161}
2162
2163// MarshalJSON is the custom marshaler for ApplicationGatewaySslCertificate.
2164func (agsc ApplicationGatewaySslCertificate) MarshalJSON() ([]byte, error) {
2165	objectMap := make(map[string]interface{})
2166	if agsc.ApplicationGatewaySslCertificatePropertiesFormat != nil {
2167		objectMap["properties"] = agsc.ApplicationGatewaySslCertificatePropertiesFormat
2168	}
2169	if agsc.Name != nil {
2170		objectMap["name"] = agsc.Name
2171	}
2172	if agsc.Etag != nil {
2173		objectMap["etag"] = agsc.Etag
2174	}
2175	if agsc.Type != nil {
2176		objectMap["type"] = agsc.Type
2177	}
2178	if agsc.ID != nil {
2179		objectMap["id"] = agsc.ID
2180	}
2181	return json.Marshal(objectMap)
2182}
2183
2184// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslCertificate struct.
2185func (agsc *ApplicationGatewaySslCertificate) UnmarshalJSON(body []byte) error {
2186	var m map[string]*json.RawMessage
2187	err := json.Unmarshal(body, &m)
2188	if err != nil {
2189		return err
2190	}
2191	for k, v := range m {
2192		switch k {
2193		case "properties":
2194			if v != nil {
2195				var applicationGatewaySslCertificatePropertiesFormat ApplicationGatewaySslCertificatePropertiesFormat
2196				err = json.Unmarshal(*v, &applicationGatewaySslCertificatePropertiesFormat)
2197				if err != nil {
2198					return err
2199				}
2200				agsc.ApplicationGatewaySslCertificatePropertiesFormat = &applicationGatewaySslCertificatePropertiesFormat
2201			}
2202		case "name":
2203			if v != nil {
2204				var name string
2205				err = json.Unmarshal(*v, &name)
2206				if err != nil {
2207					return err
2208				}
2209				agsc.Name = &name
2210			}
2211		case "etag":
2212			if v != nil {
2213				var etag string
2214				err = json.Unmarshal(*v, &etag)
2215				if err != nil {
2216					return err
2217				}
2218				agsc.Etag = &etag
2219			}
2220		case "type":
2221			if v != nil {
2222				var typeVar string
2223				err = json.Unmarshal(*v, &typeVar)
2224				if err != nil {
2225					return err
2226				}
2227				agsc.Type = &typeVar
2228			}
2229		case "id":
2230			if v != nil {
2231				var ID string
2232				err = json.Unmarshal(*v, &ID)
2233				if err != nil {
2234					return err
2235				}
2236				agsc.ID = &ID
2237			}
2238		}
2239	}
2240
2241	return nil
2242}
2243
2244// ApplicationGatewaySslCertificatePropertiesFormat properties of SSL certificates of an application
2245// gateway.
2246type ApplicationGatewaySslCertificatePropertiesFormat struct {
2247	// Data - Base-64 encoded pfx certificate. Only applicable in PUT Request.
2248	Data *string `json:"data,omitempty"`
2249	// Password - Password for the pfx file specified in data. Only applicable in PUT request.
2250	Password *string `json:"password,omitempty"`
2251	// PublicCertData - Base-64 encoded Public cert data corresponding to pfx specified in data. Only applicable in GET request.
2252	PublicCertData *string `json:"publicCertData,omitempty"`
2253	// ProvisioningState - Provisioning state of the SSL certificate resource Possible values are: 'Updating', 'Deleting', and 'Failed'.
2254	ProvisioningState *string `json:"provisioningState,omitempty"`
2255}
2256
2257// ApplicationGatewaySslPolicy application Gateway Ssl policy.
2258type ApplicationGatewaySslPolicy struct {
2259	// DisabledSslProtocols - Ssl protocols to be disabled on application gateway.
2260	DisabledSslProtocols *[]ApplicationGatewaySslProtocol `json:"disabledSslProtocols,omitempty"`
2261	// PolicyType - Type of Ssl Policy. Possible values include: 'Predefined', 'Custom'
2262	PolicyType ApplicationGatewaySslPolicyType `json:"policyType,omitempty"`
2263	// PolicyName - Name of Ssl predefined policy. Possible values include: 'AppGwSslPolicy20150501', 'AppGwSslPolicy20170401', 'AppGwSslPolicy20170401S'
2264	PolicyName ApplicationGatewaySslPolicyName `json:"policyName,omitempty"`
2265	// CipherSuites - Ssl cipher suites to be enabled in the specified order to application gateway.
2266	CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"`
2267	// MinProtocolVersion - Minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'TLSv10', 'TLSv11', 'TLSv12'
2268	MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"`
2269}
2270
2271// ApplicationGatewaySslPredefinedPolicy an Ssl predefined policy
2272type ApplicationGatewaySslPredefinedPolicy struct {
2273	autorest.Response `json:"-"`
2274	// Name - Name of Ssl predefined policy.
2275	Name                                                   *string `json:"name,omitempty"`
2276	*ApplicationGatewaySslPredefinedPolicyPropertiesFormat `json:"properties,omitempty"`
2277	// ID - Resource ID.
2278	ID *string `json:"id,omitempty"`
2279}
2280
2281// MarshalJSON is the custom marshaler for ApplicationGatewaySslPredefinedPolicy.
2282func (agspp ApplicationGatewaySslPredefinedPolicy) MarshalJSON() ([]byte, error) {
2283	objectMap := make(map[string]interface{})
2284	if agspp.Name != nil {
2285		objectMap["name"] = agspp.Name
2286	}
2287	if agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat != nil {
2288		objectMap["properties"] = agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat
2289	}
2290	if agspp.ID != nil {
2291		objectMap["id"] = agspp.ID
2292	}
2293	return json.Marshal(objectMap)
2294}
2295
2296// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslPredefinedPolicy struct.
2297func (agspp *ApplicationGatewaySslPredefinedPolicy) UnmarshalJSON(body []byte) error {
2298	var m map[string]*json.RawMessage
2299	err := json.Unmarshal(body, &m)
2300	if err != nil {
2301		return err
2302	}
2303	for k, v := range m {
2304		switch k {
2305		case "name":
2306			if v != nil {
2307				var name string
2308				err = json.Unmarshal(*v, &name)
2309				if err != nil {
2310					return err
2311				}
2312				agspp.Name = &name
2313			}
2314		case "properties":
2315			if v != nil {
2316				var applicationGatewaySslPredefinedPolicyPropertiesFormat ApplicationGatewaySslPredefinedPolicyPropertiesFormat
2317				err = json.Unmarshal(*v, &applicationGatewaySslPredefinedPolicyPropertiesFormat)
2318				if err != nil {
2319					return err
2320				}
2321				agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat = &applicationGatewaySslPredefinedPolicyPropertiesFormat
2322			}
2323		case "id":
2324			if v != nil {
2325				var ID string
2326				err = json.Unmarshal(*v, &ID)
2327				if err != nil {
2328					return err
2329				}
2330				agspp.ID = &ID
2331			}
2332		}
2333	}
2334
2335	return nil
2336}
2337
2338// ApplicationGatewaySslPredefinedPolicyPropertiesFormat properties of
2339// ApplicationGatewaySslPredefinedPolicy
2340type ApplicationGatewaySslPredefinedPolicyPropertiesFormat struct {
2341	// CipherSuites - Ssl cipher suites to be enabled in the specified order for application gateway.
2342	CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"`
2343	// MinProtocolVersion - Minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'TLSv10', 'TLSv11', 'TLSv12'
2344	MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"`
2345}
2346
2347// ApplicationGatewaysStartFuture an abstraction for monitoring and retrieving the results of a
2348// long-running operation.
2349type ApplicationGatewaysStartFuture struct {
2350	azure.FutureAPI
2351	// Result returns the result of the asynchronous operation.
2352	// If the operation has not completed it will return an error.
2353	Result func(ApplicationGatewaysClient) (autorest.Response, error)
2354}
2355
2356// ApplicationGatewaysStopFuture an abstraction for monitoring and retrieving the results of a long-running
2357// operation.
2358type ApplicationGatewaysStopFuture struct {
2359	azure.FutureAPI
2360	// Result returns the result of the asynchronous operation.
2361	// If the operation has not completed it will return an error.
2362	Result func(ApplicationGatewaysClient) (autorest.Response, error)
2363}
2364
2365// ApplicationGatewayURLPathMap urlPathMaps give a url path to the backend mapping information for
2366// PathBasedRouting.
2367type ApplicationGatewayURLPathMap struct {
2368	*ApplicationGatewayURLPathMapPropertiesFormat `json:"properties,omitempty"`
2369	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
2370	Name *string `json:"name,omitempty"`
2371	// Etag - A unique read-only string that changes whenever the resource is updated.
2372	Etag *string `json:"etag,omitempty"`
2373	// Type - Type of the resource.
2374	Type *string `json:"type,omitempty"`
2375	// ID - Resource ID.
2376	ID *string `json:"id,omitempty"`
2377}
2378
2379// MarshalJSON is the custom marshaler for ApplicationGatewayURLPathMap.
2380func (agupm ApplicationGatewayURLPathMap) MarshalJSON() ([]byte, error) {
2381	objectMap := make(map[string]interface{})
2382	if agupm.ApplicationGatewayURLPathMapPropertiesFormat != nil {
2383		objectMap["properties"] = agupm.ApplicationGatewayURLPathMapPropertiesFormat
2384	}
2385	if agupm.Name != nil {
2386		objectMap["name"] = agupm.Name
2387	}
2388	if agupm.Etag != nil {
2389		objectMap["etag"] = agupm.Etag
2390	}
2391	if agupm.Type != nil {
2392		objectMap["type"] = agupm.Type
2393	}
2394	if agupm.ID != nil {
2395		objectMap["id"] = agupm.ID
2396	}
2397	return json.Marshal(objectMap)
2398}
2399
2400// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayURLPathMap struct.
2401func (agupm *ApplicationGatewayURLPathMap) UnmarshalJSON(body []byte) error {
2402	var m map[string]*json.RawMessage
2403	err := json.Unmarshal(body, &m)
2404	if err != nil {
2405		return err
2406	}
2407	for k, v := range m {
2408		switch k {
2409		case "properties":
2410			if v != nil {
2411				var applicationGatewayURLPathMapPropertiesFormat ApplicationGatewayURLPathMapPropertiesFormat
2412				err = json.Unmarshal(*v, &applicationGatewayURLPathMapPropertiesFormat)
2413				if err != nil {
2414					return err
2415				}
2416				agupm.ApplicationGatewayURLPathMapPropertiesFormat = &applicationGatewayURLPathMapPropertiesFormat
2417			}
2418		case "name":
2419			if v != nil {
2420				var name string
2421				err = json.Unmarshal(*v, &name)
2422				if err != nil {
2423					return err
2424				}
2425				agupm.Name = &name
2426			}
2427		case "etag":
2428			if v != nil {
2429				var etag string
2430				err = json.Unmarshal(*v, &etag)
2431				if err != nil {
2432					return err
2433				}
2434				agupm.Etag = &etag
2435			}
2436		case "type":
2437			if v != nil {
2438				var typeVar string
2439				err = json.Unmarshal(*v, &typeVar)
2440				if err != nil {
2441					return err
2442				}
2443				agupm.Type = &typeVar
2444			}
2445		case "id":
2446			if v != nil {
2447				var ID string
2448				err = json.Unmarshal(*v, &ID)
2449				if err != nil {
2450					return err
2451				}
2452				agupm.ID = &ID
2453			}
2454		}
2455	}
2456
2457	return nil
2458}
2459
2460// ApplicationGatewayURLPathMapPropertiesFormat properties of UrlPathMap of the application gateway.
2461type ApplicationGatewayURLPathMapPropertiesFormat struct {
2462	// DefaultBackendAddressPool - Default backend address pool resource of URL path map.
2463	DefaultBackendAddressPool *SubResource `json:"defaultBackendAddressPool,omitempty"`
2464	// DefaultBackendHTTPSettings - Default backend http settings resource of URL path map.
2465	DefaultBackendHTTPSettings *SubResource `json:"defaultBackendHttpSettings,omitempty"`
2466	// DefaultRedirectConfiguration - Default redirect configuration resource of URL path map.
2467	DefaultRedirectConfiguration *SubResource `json:"defaultRedirectConfiguration,omitempty"`
2468	// PathRules - Path rule of URL path map resource.
2469	PathRules *[]ApplicationGatewayPathRule `json:"pathRules,omitempty"`
2470	// ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2471	ProvisioningState *string `json:"provisioningState,omitempty"`
2472}
2473
2474// ApplicationGatewayWebApplicationFirewallConfiguration application gateway web application firewall
2475// configuration.
2476type ApplicationGatewayWebApplicationFirewallConfiguration struct {
2477	// Enabled - Whether the web application firewall is enabled or not.
2478	Enabled *bool `json:"enabled,omitempty"`
2479	// FirewallMode - Web application firewall mode. Possible values include: 'Detection', 'Prevention'
2480	FirewallMode ApplicationGatewayFirewallMode `json:"firewallMode,omitempty"`
2481	// RuleSetType - The type of the web application firewall rule set. Possible values are: 'OWASP'.
2482	RuleSetType *string `json:"ruleSetType,omitempty"`
2483	// RuleSetVersion - The version of the rule set type.
2484	RuleSetVersion *string `json:"ruleSetVersion,omitempty"`
2485	// DisabledRuleGroups - The disabled rule groups.
2486	DisabledRuleGroups *[]ApplicationGatewayFirewallDisabledRuleGroup `json:"disabledRuleGroups,omitempty"`
2487}
2488
2489// AuthorizationListResult response for ListAuthorizations API service call retrieves all authorizations
2490// that belongs to an ExpressRouteCircuit.
2491type AuthorizationListResult struct {
2492	autorest.Response `json:"-"`
2493	// Value - The authorizations in an ExpressRoute Circuit.
2494	Value *[]ExpressRouteCircuitAuthorization `json:"value,omitempty"`
2495	// NextLink - The URL to get the next set of results.
2496	NextLink *string `json:"nextLink,omitempty"`
2497}
2498
2499// AuthorizationListResultIterator provides access to a complete listing of
2500// ExpressRouteCircuitAuthorization values.
2501type AuthorizationListResultIterator struct {
2502	i    int
2503	page AuthorizationListResultPage
2504}
2505
2506// NextWithContext advances to the next value.  If there was an error making
2507// the request the iterator does not advance and the error is returned.
2508func (iter *AuthorizationListResultIterator) NextWithContext(ctx context.Context) (err error) {
2509	if tracing.IsEnabled() {
2510		ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultIterator.NextWithContext")
2511		defer func() {
2512			sc := -1
2513			if iter.Response().Response.Response != nil {
2514				sc = iter.Response().Response.Response.StatusCode
2515			}
2516			tracing.EndSpan(ctx, sc, err)
2517		}()
2518	}
2519	iter.i++
2520	if iter.i < len(iter.page.Values()) {
2521		return nil
2522	}
2523	err = iter.page.NextWithContext(ctx)
2524	if err != nil {
2525		iter.i--
2526		return err
2527	}
2528	iter.i = 0
2529	return nil
2530}
2531
2532// Next advances to the next value.  If there was an error making
2533// the request the iterator does not advance and the error is returned.
2534// Deprecated: Use NextWithContext() instead.
2535func (iter *AuthorizationListResultIterator) Next() error {
2536	return iter.NextWithContext(context.Background())
2537}
2538
2539// NotDone returns true if the enumeration should be started or is not yet complete.
2540func (iter AuthorizationListResultIterator) NotDone() bool {
2541	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2542}
2543
2544// Response returns the raw server response from the last page request.
2545func (iter AuthorizationListResultIterator) Response() AuthorizationListResult {
2546	return iter.page.Response()
2547}
2548
2549// Value returns the current value or a zero-initialized value if the
2550// iterator has advanced beyond the end of the collection.
2551func (iter AuthorizationListResultIterator) Value() ExpressRouteCircuitAuthorization {
2552	if !iter.page.NotDone() {
2553		return ExpressRouteCircuitAuthorization{}
2554	}
2555	return iter.page.Values()[iter.i]
2556}
2557
2558// Creates a new instance of the AuthorizationListResultIterator type.
2559func NewAuthorizationListResultIterator(page AuthorizationListResultPage) AuthorizationListResultIterator {
2560	return AuthorizationListResultIterator{page: page}
2561}
2562
2563// IsEmpty returns true if the ListResult contains no values.
2564func (alr AuthorizationListResult) IsEmpty() bool {
2565	return alr.Value == nil || len(*alr.Value) == 0
2566}
2567
2568// hasNextLink returns true if the NextLink is not empty.
2569func (alr AuthorizationListResult) hasNextLink() bool {
2570	return alr.NextLink != nil && len(*alr.NextLink) != 0
2571}
2572
2573// authorizationListResultPreparer prepares a request to retrieve the next set of results.
2574// It returns nil if no more results exist.
2575func (alr AuthorizationListResult) authorizationListResultPreparer(ctx context.Context) (*http.Request, error) {
2576	if !alr.hasNextLink() {
2577		return nil, nil
2578	}
2579	return autorest.Prepare((&http.Request{}).WithContext(ctx),
2580		autorest.AsJSON(),
2581		autorest.AsGet(),
2582		autorest.WithBaseURL(to.String(alr.NextLink)))
2583}
2584
2585// AuthorizationListResultPage contains a page of ExpressRouteCircuitAuthorization values.
2586type AuthorizationListResultPage struct {
2587	fn  func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)
2588	alr AuthorizationListResult
2589}
2590
2591// NextWithContext advances to the next page of values.  If there was an error making
2592// the request the page does not advance and the error is returned.
2593func (page *AuthorizationListResultPage) NextWithContext(ctx context.Context) (err error) {
2594	if tracing.IsEnabled() {
2595		ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultPage.NextWithContext")
2596		defer func() {
2597			sc := -1
2598			if page.Response().Response.Response != nil {
2599				sc = page.Response().Response.Response.StatusCode
2600			}
2601			tracing.EndSpan(ctx, sc, err)
2602		}()
2603	}
2604	for {
2605		next, err := page.fn(ctx, page.alr)
2606		if err != nil {
2607			return err
2608		}
2609		page.alr = next
2610		if !next.hasNextLink() || !next.IsEmpty() {
2611			break
2612		}
2613	}
2614	return nil
2615}
2616
2617// Next advances to the next page of values.  If there was an error making
2618// the request the page does not advance and the error is returned.
2619// Deprecated: Use NextWithContext() instead.
2620func (page *AuthorizationListResultPage) Next() error {
2621	return page.NextWithContext(context.Background())
2622}
2623
2624// NotDone returns true if the page enumeration should be started or is not yet complete.
2625func (page AuthorizationListResultPage) NotDone() bool {
2626	return !page.alr.IsEmpty()
2627}
2628
2629// Response returns the raw server response from the last page request.
2630func (page AuthorizationListResultPage) Response() AuthorizationListResult {
2631	return page.alr
2632}
2633
2634// Values returns the slice of values for the current page or nil if there are no values.
2635func (page AuthorizationListResultPage) Values() []ExpressRouteCircuitAuthorization {
2636	if page.alr.IsEmpty() {
2637		return nil
2638	}
2639	return *page.alr.Value
2640}
2641
2642// Creates a new instance of the AuthorizationListResultPage type.
2643func NewAuthorizationListResultPage(cur AuthorizationListResult, getNextPage func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)) AuthorizationListResultPage {
2644	return AuthorizationListResultPage{
2645		fn:  getNextPage,
2646		alr: cur,
2647	}
2648}
2649
2650// AuthorizationPropertiesFormat ...
2651type AuthorizationPropertiesFormat struct {
2652	// AuthorizationKey - The authorization key.
2653	AuthorizationKey *string `json:"authorizationKey,omitempty"`
2654	// AuthorizationUseStatus - AuthorizationUseStatus. Possible values are: 'Available' and 'InUse'. Possible values include: 'Available', 'InUse'
2655	AuthorizationUseStatus AuthorizationUseStatus `json:"authorizationUseStatus,omitempty"`
2656	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2657	ProvisioningState *string `json:"provisioningState,omitempty"`
2658}
2659
2660// AzureAsyncOperationResult the response body contains the status of the specified asynchronous operation,
2661// indicating whether it has succeeded, is in progress, or has failed. Note that this status is distinct
2662// from the HTTP status code returned for the Get Operation Status operation itself. If the asynchronous
2663// operation succeeded, the response body includes the HTTP status code for the successful request. If the
2664// asynchronous operation failed, the response body includes the HTTP status code for the failed request
2665// and error information regarding the failure.
2666type AzureAsyncOperationResult struct {
2667	// Status - Status of the Azure async operation. Possible values are: 'InProgress', 'Succeeded', and 'Failed'. Possible values include: 'InProgress', 'Succeeded', 'Failed'
2668	Status OperationStatus `json:"status,omitempty"`
2669	Error  *Error          `json:"error,omitempty"`
2670}
2671
2672// BackendAddressPool pool of backend IP addresses.
2673type BackendAddressPool struct {
2674	autorest.Response `json:"-"`
2675	// BackendAddressPoolPropertiesFormat - Properties of load balancer backend address pool.
2676	*BackendAddressPoolPropertiesFormat `json:"properties,omitempty"`
2677	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
2678	Name *string `json:"name,omitempty"`
2679	// Etag - A unique read-only string that changes whenever the resource is updated.
2680	Etag *string `json:"etag,omitempty"`
2681	// ID - Resource ID.
2682	ID *string `json:"id,omitempty"`
2683}
2684
2685// MarshalJSON is the custom marshaler for BackendAddressPool.
2686func (bap BackendAddressPool) MarshalJSON() ([]byte, error) {
2687	objectMap := make(map[string]interface{})
2688	if bap.BackendAddressPoolPropertiesFormat != nil {
2689		objectMap["properties"] = bap.BackendAddressPoolPropertiesFormat
2690	}
2691	if bap.Name != nil {
2692		objectMap["name"] = bap.Name
2693	}
2694	if bap.Etag != nil {
2695		objectMap["etag"] = bap.Etag
2696	}
2697	if bap.ID != nil {
2698		objectMap["id"] = bap.ID
2699	}
2700	return json.Marshal(objectMap)
2701}
2702
2703// UnmarshalJSON is the custom unmarshaler for BackendAddressPool struct.
2704func (bap *BackendAddressPool) UnmarshalJSON(body []byte) error {
2705	var m map[string]*json.RawMessage
2706	err := json.Unmarshal(body, &m)
2707	if err != nil {
2708		return err
2709	}
2710	for k, v := range m {
2711		switch k {
2712		case "properties":
2713			if v != nil {
2714				var backendAddressPoolPropertiesFormat BackendAddressPoolPropertiesFormat
2715				err = json.Unmarshal(*v, &backendAddressPoolPropertiesFormat)
2716				if err != nil {
2717					return err
2718				}
2719				bap.BackendAddressPoolPropertiesFormat = &backendAddressPoolPropertiesFormat
2720			}
2721		case "name":
2722			if v != nil {
2723				var name string
2724				err = json.Unmarshal(*v, &name)
2725				if err != nil {
2726					return err
2727				}
2728				bap.Name = &name
2729			}
2730		case "etag":
2731			if v != nil {
2732				var etag string
2733				err = json.Unmarshal(*v, &etag)
2734				if err != nil {
2735					return err
2736				}
2737				bap.Etag = &etag
2738			}
2739		case "id":
2740			if v != nil {
2741				var ID string
2742				err = json.Unmarshal(*v, &ID)
2743				if err != nil {
2744					return err
2745				}
2746				bap.ID = &ID
2747			}
2748		}
2749	}
2750
2751	return nil
2752}
2753
2754// BackendAddressPoolPropertiesFormat properties of the backend address pool.
2755type BackendAddressPoolPropertiesFormat struct {
2756	// BackendIPConfigurations - READ-ONLY; Gets collection of references to IP addresses defined in network interfaces.
2757	BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"`
2758	// LoadBalancingRules - READ-ONLY; Gets load balancing rules that use this backend address pool.
2759	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
2760	// OutboundNatRule - READ-ONLY; Gets outbound rules that use this backend address pool.
2761	OutboundNatRule *SubResource `json:"outboundNatRule,omitempty"`
2762	// ProvisioningState - Get provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2763	ProvisioningState *string `json:"provisioningState,omitempty"`
2764}
2765
2766// MarshalJSON is the custom marshaler for BackendAddressPoolPropertiesFormat.
2767func (bappf BackendAddressPoolPropertiesFormat) MarshalJSON() ([]byte, error) {
2768	objectMap := make(map[string]interface{})
2769	if bappf.ProvisioningState != nil {
2770		objectMap["provisioningState"] = bappf.ProvisioningState
2771	}
2772	return json.Marshal(objectMap)
2773}
2774
2775// BGPCommunity contains bgp community information offered in Service Community resources.
2776type BGPCommunity struct {
2777	// ServiceSupportedRegion - The region which the service support. e.g. For O365, region is Global.
2778	ServiceSupportedRegion *string `json:"serviceSupportedRegion,omitempty"`
2779	// CommunityName - The name of the bgp community. e.g. Skype.
2780	CommunityName *string `json:"communityName,omitempty"`
2781	// CommunityValue - The value of the bgp community. For more information: https://docs.microsoft.com/en-us/azure/expressroute/expressroute-routing.
2782	CommunityValue *string `json:"communityValue,omitempty"`
2783	// CommunityPrefixes - The prefixes that the bgp community contains.
2784	CommunityPrefixes *[]string `json:"communityPrefixes,omitempty"`
2785	// IsAuthorizedToUse - Customer is authorized to use bgp community or not.
2786	IsAuthorizedToUse *bool `json:"isAuthorizedToUse,omitempty"`
2787	// ServiceGroup - The service group of the bgp community contains.
2788	ServiceGroup *string `json:"serviceGroup,omitempty"`
2789}
2790
2791// BgpPeerStatus BGP peer status details
2792type BgpPeerStatus struct {
2793	// LocalAddress - READ-ONLY; The virtual network gateway's local address
2794	LocalAddress *string `json:"localAddress,omitempty"`
2795	// Neighbor - READ-ONLY; The remote BGP peer
2796	Neighbor *string `json:"neighbor,omitempty"`
2797	// Asn - READ-ONLY; The autonomous system number of the remote BGP peer
2798	Asn *int32 `json:"asn,omitempty"`
2799	// State - READ-ONLY; The BGP peer state. Possible values include: 'BgpPeerStateUnknown', 'BgpPeerStateStopped', 'BgpPeerStateIdle', 'BgpPeerStateConnecting', 'BgpPeerStateConnected'
2800	State BgpPeerState `json:"state,omitempty"`
2801	// ConnectedDuration - READ-ONLY; For how long the peering has been up
2802	ConnectedDuration *string `json:"connectedDuration,omitempty"`
2803	// RoutesReceived - READ-ONLY; The number of routes learned from this peer
2804	RoutesReceived *int64 `json:"routesReceived,omitempty"`
2805	// MessagesSent - READ-ONLY; The number of BGP messages sent
2806	MessagesSent *int64 `json:"messagesSent,omitempty"`
2807	// MessagesReceived - READ-ONLY; The number of BGP messages received
2808	MessagesReceived *int64 `json:"messagesReceived,omitempty"`
2809}
2810
2811// BgpPeerStatusListResult response for list BGP peer status API service call
2812type BgpPeerStatusListResult struct {
2813	autorest.Response `json:"-"`
2814	// Value - List of BGP peers
2815	Value *[]BgpPeerStatus `json:"value,omitempty"`
2816}
2817
2818// BgpServiceCommunity service Community Properties.
2819type BgpServiceCommunity struct {
2820	*BgpServiceCommunityPropertiesFormat `json:"properties,omitempty"`
2821	// ID - Resource ID.
2822	ID *string `json:"id,omitempty"`
2823	// Name - READ-ONLY; Resource name.
2824	Name *string `json:"name,omitempty"`
2825	// Type - READ-ONLY; Resource type.
2826	Type *string `json:"type,omitempty"`
2827	// Location - Resource location.
2828	Location *string `json:"location,omitempty"`
2829	// Tags - Resource tags.
2830	Tags map[string]*string `json:"tags"`
2831}
2832
2833// MarshalJSON is the custom marshaler for BgpServiceCommunity.
2834func (bsc BgpServiceCommunity) MarshalJSON() ([]byte, error) {
2835	objectMap := make(map[string]interface{})
2836	if bsc.BgpServiceCommunityPropertiesFormat != nil {
2837		objectMap["properties"] = bsc.BgpServiceCommunityPropertiesFormat
2838	}
2839	if bsc.ID != nil {
2840		objectMap["id"] = bsc.ID
2841	}
2842	if bsc.Location != nil {
2843		objectMap["location"] = bsc.Location
2844	}
2845	if bsc.Tags != nil {
2846		objectMap["tags"] = bsc.Tags
2847	}
2848	return json.Marshal(objectMap)
2849}
2850
2851// UnmarshalJSON is the custom unmarshaler for BgpServiceCommunity struct.
2852func (bsc *BgpServiceCommunity) UnmarshalJSON(body []byte) error {
2853	var m map[string]*json.RawMessage
2854	err := json.Unmarshal(body, &m)
2855	if err != nil {
2856		return err
2857	}
2858	for k, v := range m {
2859		switch k {
2860		case "properties":
2861			if v != nil {
2862				var bgpServiceCommunityPropertiesFormat BgpServiceCommunityPropertiesFormat
2863				err = json.Unmarshal(*v, &bgpServiceCommunityPropertiesFormat)
2864				if err != nil {
2865					return err
2866				}
2867				bsc.BgpServiceCommunityPropertiesFormat = &bgpServiceCommunityPropertiesFormat
2868			}
2869		case "id":
2870			if v != nil {
2871				var ID string
2872				err = json.Unmarshal(*v, &ID)
2873				if err != nil {
2874					return err
2875				}
2876				bsc.ID = &ID
2877			}
2878		case "name":
2879			if v != nil {
2880				var name string
2881				err = json.Unmarshal(*v, &name)
2882				if err != nil {
2883					return err
2884				}
2885				bsc.Name = &name
2886			}
2887		case "type":
2888			if v != nil {
2889				var typeVar string
2890				err = json.Unmarshal(*v, &typeVar)
2891				if err != nil {
2892					return err
2893				}
2894				bsc.Type = &typeVar
2895			}
2896		case "location":
2897			if v != nil {
2898				var location string
2899				err = json.Unmarshal(*v, &location)
2900				if err != nil {
2901					return err
2902				}
2903				bsc.Location = &location
2904			}
2905		case "tags":
2906			if v != nil {
2907				var tags map[string]*string
2908				err = json.Unmarshal(*v, &tags)
2909				if err != nil {
2910					return err
2911				}
2912				bsc.Tags = tags
2913			}
2914		}
2915	}
2916
2917	return nil
2918}
2919
2920// BgpServiceCommunityListResult response for the ListServiceCommunity API service call.
2921type BgpServiceCommunityListResult struct {
2922	autorest.Response `json:"-"`
2923	// Value - A list of service community resources.
2924	Value *[]BgpServiceCommunity `json:"value,omitempty"`
2925	// NextLink - The URL to get the next set of results.
2926	NextLink *string `json:"nextLink,omitempty"`
2927}
2928
2929// BgpServiceCommunityListResultIterator provides access to a complete listing of BgpServiceCommunity
2930// values.
2931type BgpServiceCommunityListResultIterator struct {
2932	i    int
2933	page BgpServiceCommunityListResultPage
2934}
2935
2936// NextWithContext advances to the next value.  If there was an error making
2937// the request the iterator does not advance and the error is returned.
2938func (iter *BgpServiceCommunityListResultIterator) NextWithContext(ctx context.Context) (err error) {
2939	if tracing.IsEnabled() {
2940		ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultIterator.NextWithContext")
2941		defer func() {
2942			sc := -1
2943			if iter.Response().Response.Response != nil {
2944				sc = iter.Response().Response.Response.StatusCode
2945			}
2946			tracing.EndSpan(ctx, sc, err)
2947		}()
2948	}
2949	iter.i++
2950	if iter.i < len(iter.page.Values()) {
2951		return nil
2952	}
2953	err = iter.page.NextWithContext(ctx)
2954	if err != nil {
2955		iter.i--
2956		return err
2957	}
2958	iter.i = 0
2959	return nil
2960}
2961
2962// Next advances to the next value.  If there was an error making
2963// the request the iterator does not advance and the error is returned.
2964// Deprecated: Use NextWithContext() instead.
2965func (iter *BgpServiceCommunityListResultIterator) Next() error {
2966	return iter.NextWithContext(context.Background())
2967}
2968
2969// NotDone returns true if the enumeration should be started or is not yet complete.
2970func (iter BgpServiceCommunityListResultIterator) NotDone() bool {
2971	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2972}
2973
2974// Response returns the raw server response from the last page request.
2975func (iter BgpServiceCommunityListResultIterator) Response() BgpServiceCommunityListResult {
2976	return iter.page.Response()
2977}
2978
2979// Value returns the current value or a zero-initialized value if the
2980// iterator has advanced beyond the end of the collection.
2981func (iter BgpServiceCommunityListResultIterator) Value() BgpServiceCommunity {
2982	if !iter.page.NotDone() {
2983		return BgpServiceCommunity{}
2984	}
2985	return iter.page.Values()[iter.i]
2986}
2987
2988// Creates a new instance of the BgpServiceCommunityListResultIterator type.
2989func NewBgpServiceCommunityListResultIterator(page BgpServiceCommunityListResultPage) BgpServiceCommunityListResultIterator {
2990	return BgpServiceCommunityListResultIterator{page: page}
2991}
2992
2993// IsEmpty returns true if the ListResult contains no values.
2994func (bsclr BgpServiceCommunityListResult) IsEmpty() bool {
2995	return bsclr.Value == nil || len(*bsclr.Value) == 0
2996}
2997
2998// hasNextLink returns true if the NextLink is not empty.
2999func (bsclr BgpServiceCommunityListResult) hasNextLink() bool {
3000	return bsclr.NextLink != nil && len(*bsclr.NextLink) != 0
3001}
3002
3003// bgpServiceCommunityListResultPreparer prepares a request to retrieve the next set of results.
3004// It returns nil if no more results exist.
3005func (bsclr BgpServiceCommunityListResult) bgpServiceCommunityListResultPreparer(ctx context.Context) (*http.Request, error) {
3006	if !bsclr.hasNextLink() {
3007		return nil, nil
3008	}
3009	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3010		autorest.AsJSON(),
3011		autorest.AsGet(),
3012		autorest.WithBaseURL(to.String(bsclr.NextLink)))
3013}
3014
3015// BgpServiceCommunityListResultPage contains a page of BgpServiceCommunity values.
3016type BgpServiceCommunityListResultPage struct {
3017	fn    func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)
3018	bsclr BgpServiceCommunityListResult
3019}
3020
3021// NextWithContext advances to the next page of values.  If there was an error making
3022// the request the page does not advance and the error is returned.
3023func (page *BgpServiceCommunityListResultPage) NextWithContext(ctx context.Context) (err error) {
3024	if tracing.IsEnabled() {
3025		ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultPage.NextWithContext")
3026		defer func() {
3027			sc := -1
3028			if page.Response().Response.Response != nil {
3029				sc = page.Response().Response.Response.StatusCode
3030			}
3031			tracing.EndSpan(ctx, sc, err)
3032		}()
3033	}
3034	for {
3035		next, err := page.fn(ctx, page.bsclr)
3036		if err != nil {
3037			return err
3038		}
3039		page.bsclr = next
3040		if !next.hasNextLink() || !next.IsEmpty() {
3041			break
3042		}
3043	}
3044	return nil
3045}
3046
3047// Next advances to the next page of values.  If there was an error making
3048// the request the page does not advance and the error is returned.
3049// Deprecated: Use NextWithContext() instead.
3050func (page *BgpServiceCommunityListResultPage) Next() error {
3051	return page.NextWithContext(context.Background())
3052}
3053
3054// NotDone returns true if the page enumeration should be started or is not yet complete.
3055func (page BgpServiceCommunityListResultPage) NotDone() bool {
3056	return !page.bsclr.IsEmpty()
3057}
3058
3059// Response returns the raw server response from the last page request.
3060func (page BgpServiceCommunityListResultPage) Response() BgpServiceCommunityListResult {
3061	return page.bsclr
3062}
3063
3064// Values returns the slice of values for the current page or nil if there are no values.
3065func (page BgpServiceCommunityListResultPage) Values() []BgpServiceCommunity {
3066	if page.bsclr.IsEmpty() {
3067		return nil
3068	}
3069	return *page.bsclr.Value
3070}
3071
3072// Creates a new instance of the BgpServiceCommunityListResultPage type.
3073func NewBgpServiceCommunityListResultPage(cur BgpServiceCommunityListResult, getNextPage func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)) BgpServiceCommunityListResultPage {
3074	return BgpServiceCommunityListResultPage{
3075		fn:    getNextPage,
3076		bsclr: cur,
3077	}
3078}
3079
3080// BgpServiceCommunityPropertiesFormat properties of Service Community.
3081type BgpServiceCommunityPropertiesFormat struct {
3082	// ServiceName - The name of the bgp community. e.g. Skype.
3083	ServiceName *string `json:"serviceName,omitempty"`
3084	// BgpCommunities - Get a list of bgp communities.
3085	BgpCommunities *[]BGPCommunity `json:"bgpCommunities,omitempty"`
3086}
3087
3088// BgpSettings BGP settings details
3089type BgpSettings struct {
3090	// Asn - The BGP speaker's ASN.
3091	Asn *int64 `json:"asn,omitempty"`
3092	// BgpPeeringAddress - The BGP peering address and BGP identifier of this BGP speaker.
3093	BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"`
3094	// PeerWeight - The weight added to routes learned from this BGP speaker.
3095	PeerWeight *int32 `json:"peerWeight,omitempty"`
3096}
3097
3098// ConnectionResetSharedKey the virtual network connection reset shared key
3099type ConnectionResetSharedKey struct {
3100	autorest.Response `json:"-"`
3101	// KeyLength - The virtual network connection reset shared key length, should between 1 and 128.
3102	KeyLength *int32 `json:"keyLength,omitempty"`
3103}
3104
3105// ConnectionSharedKey response for GetConnectionSharedKey API service call
3106type ConnectionSharedKey struct {
3107	autorest.Response `json:"-"`
3108	// Value - The virtual network connection shared key value.
3109	Value *string `json:"value,omitempty"`
3110}
3111
3112// ConnectivityDestination parameters that define destination of connection.
3113type ConnectivityDestination struct {
3114	// ResourceID - The ID of the resource to which a connection attempt will be made.
3115	ResourceID *string `json:"resourceId,omitempty"`
3116	// Address - The IP address or URI the resource to which a connection attempt will be made.
3117	Address *string `json:"address,omitempty"`
3118	// Port - Port on which check connectivity will be performed.
3119	Port *int32 `json:"port,omitempty"`
3120}
3121
3122// ConnectivityHop information about a hop between the source and the destination.
3123type ConnectivityHop struct {
3124	// Type - READ-ONLY; The type of the hop.
3125	Type *string `json:"type,omitempty"`
3126	// ID - READ-ONLY; The ID of the hop.
3127	ID *string `json:"id,omitempty"`
3128	// Address - READ-ONLY; The IP address of the hop.
3129	Address *string `json:"address,omitempty"`
3130	// ResourceID - READ-ONLY; The ID of the resource corresponding to this hop.
3131	ResourceID *string `json:"resourceId,omitempty"`
3132	// NextHopIds - READ-ONLY; List of next hop identifiers.
3133	NextHopIds *[]string `json:"nextHopIds,omitempty"`
3134	// Issues - READ-ONLY; List of issues.
3135	Issues *[]ConnectivityIssue `json:"issues,omitempty"`
3136}
3137
3138// ConnectivityInformation information on the connectivity status.
3139type ConnectivityInformation struct {
3140	autorest.Response `json:"-"`
3141	// Hops - READ-ONLY; List of hops between the source and the destination.
3142	Hops *[]ConnectivityHop `json:"hops,omitempty"`
3143	// ConnectionStatus - READ-ONLY; The connection status. Possible values include: 'ConnectionStatusUnknown', 'ConnectionStatusConnected', 'ConnectionStatusDisconnected', 'ConnectionStatusDegraded'
3144	ConnectionStatus ConnectionStatus `json:"connectionStatus,omitempty"`
3145	// AvgLatencyInMs - READ-ONLY; Average latency in milliseconds.
3146	AvgLatencyInMs *int32 `json:"avgLatencyInMs,omitempty"`
3147	// MinLatencyInMs - READ-ONLY; Minimum latency in milliseconds.
3148	MinLatencyInMs *int32 `json:"minLatencyInMs,omitempty"`
3149	// MaxLatencyInMs - READ-ONLY; Maximum latency in milliseconds.
3150	MaxLatencyInMs *int32 `json:"maxLatencyInMs,omitempty"`
3151	// ProbesSent - READ-ONLY; Total number of probes sent.
3152	ProbesSent *int32 `json:"probesSent,omitempty"`
3153	// ProbesFailed - READ-ONLY; Number of failed probes.
3154	ProbesFailed *int32 `json:"probesFailed,omitempty"`
3155}
3156
3157// ConnectivityIssue information about an issue encountered in the process of checking for connectivity.
3158type ConnectivityIssue struct {
3159	// Origin - READ-ONLY; The origin of the issue. Possible values include: 'OriginLocal', 'OriginInbound', 'OriginOutbound'
3160	Origin Origin `json:"origin,omitempty"`
3161	// Severity - READ-ONLY; The severity of the issue. Possible values include: 'SeverityError', 'SeverityWarning'
3162	Severity Severity `json:"severity,omitempty"`
3163	// Type - READ-ONLY; The type of issue. Possible values include: 'IssueTypeUnknown', 'IssueTypeAgentStopped', 'IssueTypeGuestFirewall', 'IssueTypeDNSResolution', 'IssueTypeSocketBind', 'IssueTypeNetworkSecurityRule', 'IssueTypeUserDefinedRoute', 'IssueTypePortThrottled', 'IssueTypePlatform'
3164	Type IssueType `json:"type,omitempty"`
3165	// Context - READ-ONLY; Provides additional context on the issue.
3166	Context *[]map[string]*string `json:"context,omitempty"`
3167}
3168
3169// ConnectivityParameters parameters that determine how the connectivity check will be performed.
3170type ConnectivityParameters struct {
3171	Source      *ConnectivitySource      `json:"source,omitempty"`
3172	Destination *ConnectivityDestination `json:"destination,omitempty"`
3173}
3174
3175// ConnectivitySource parameters that define the source of the connection.
3176type ConnectivitySource struct {
3177	// ResourceID - The ID of the resource from which a connectivity check will be initiated.
3178	ResourceID *string `json:"resourceId,omitempty"`
3179	// Port - The source port from which a connectivity check will be performed.
3180	Port *int32 `json:"port,omitempty"`
3181}
3182
3183// DhcpOptions dhcpOptions contains an array of DNS servers available to VMs deployed in the virtual
3184// network. Standard DHCP option for a subnet overrides VNET DHCP options.
3185type DhcpOptions struct {
3186	// DNSServers - The list of DNS servers IP addresses.
3187	DNSServers *[]string `json:"dnsServers,omitempty"`
3188}
3189
3190// DNSNameAvailabilityResult response for the CheckDnsNameAvailability API service call.
3191type DNSNameAvailabilityResult struct {
3192	autorest.Response `json:"-"`
3193	// Available - Domain availability (True/False).
3194	Available *bool `json:"available,omitempty"`
3195}
3196
3197// EffectiveNetworkSecurityGroup effective network security group.
3198type EffectiveNetworkSecurityGroup struct {
3199	// NetworkSecurityGroup - The ID of network security group that is applied.
3200	NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"`
3201	// Association - Associated resources.
3202	Association *EffectiveNetworkSecurityGroupAssociation `json:"association,omitempty"`
3203	// EffectiveSecurityRules - A collection of effective security rules.
3204	EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"`
3205	// TagMap - Mapping of tags to list of IP Addresses included within the tag.
3206	TagMap map[string][]string `json:"tagMap"`
3207}
3208
3209// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroup.
3210func (ensg EffectiveNetworkSecurityGroup) MarshalJSON() ([]byte, error) {
3211	objectMap := make(map[string]interface{})
3212	if ensg.NetworkSecurityGroup != nil {
3213		objectMap["networkSecurityGroup"] = ensg.NetworkSecurityGroup
3214	}
3215	if ensg.Association != nil {
3216		objectMap["association"] = ensg.Association
3217	}
3218	if ensg.EffectiveSecurityRules != nil {
3219		objectMap["effectiveSecurityRules"] = ensg.EffectiveSecurityRules
3220	}
3221	if ensg.TagMap != nil {
3222		objectMap["tagMap"] = ensg.TagMap
3223	}
3224	return json.Marshal(objectMap)
3225}
3226
3227// EffectiveNetworkSecurityGroupAssociation the effective network security group association.
3228type EffectiveNetworkSecurityGroupAssociation struct {
3229	// Subnet - The ID of the subnet if assigned.
3230	Subnet *SubResource `json:"subnet,omitempty"`
3231	// NetworkInterface - The ID of the network interface if assigned.
3232	NetworkInterface *SubResource `json:"networkInterface,omitempty"`
3233}
3234
3235// EffectiveNetworkSecurityGroupListResult response for list effective network security groups API service
3236// call.
3237type EffectiveNetworkSecurityGroupListResult struct {
3238	autorest.Response `json:"-"`
3239	// Value - A list of effective network security groups.
3240	Value *[]EffectiveNetworkSecurityGroup `json:"value,omitempty"`
3241	// NextLink - READ-ONLY; The URL to get the next set of results.
3242	NextLink *string `json:"nextLink,omitempty"`
3243}
3244
3245// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroupListResult.
3246func (ensglr EffectiveNetworkSecurityGroupListResult) MarshalJSON() ([]byte, error) {
3247	objectMap := make(map[string]interface{})
3248	if ensglr.Value != nil {
3249		objectMap["value"] = ensglr.Value
3250	}
3251	return json.Marshal(objectMap)
3252}
3253
3254// EffectiveNetworkSecurityRule effective network security rules.
3255type EffectiveNetworkSecurityRule struct {
3256	// Name - The name of the security rule specified by the user (if created by the user).
3257	Name *string `json:"name,omitempty"`
3258	// Protocol - The network protocol this rule applies to. Possible values are: 'Tcp', 'Udp', and 'All'. Possible values include: 'TCP', 'UDP', 'All'
3259	Protocol EffectiveSecurityRuleProtocol `json:"protocol,omitempty"`
3260	// SourcePortRange - The source port or range.
3261	SourcePortRange *string `json:"sourcePortRange,omitempty"`
3262	// DestinationPortRange - The destination port or range.
3263	DestinationPortRange *string `json:"destinationPortRange,omitempty"`
3264	// 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 (*)
3265	SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"`
3266	// 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 (*)
3267	DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"`
3268	// SourceAddressPrefix - The source address prefix.
3269	SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
3270	// DestinationAddressPrefix - The destination address prefix.
3271	DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"`
3272	// SourceAddressPrefixes - The source address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*).
3273	SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"`
3274	// DestinationAddressPrefixes - The destination address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*).
3275	DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"`
3276	// ExpandedSourceAddressPrefix - The expanded source address prefix.
3277	ExpandedSourceAddressPrefix *[]string `json:"expandedSourceAddressPrefix,omitempty"`
3278	// ExpandedDestinationAddressPrefix - Expanded destination address prefix.
3279	ExpandedDestinationAddressPrefix *[]string `json:"expandedDestinationAddressPrefix,omitempty"`
3280	// Access - Whether network traffic is allowed or denied. Possible values are: 'Allow' and 'Deny'. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
3281	Access SecurityRuleAccess `json:"access,omitempty"`
3282	// Priority - The priority of the rule.
3283	Priority *int32 `json:"priority,omitempty"`
3284	// Direction - The direction of the rule. Possible values are: 'Inbound and Outbound'. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound'
3285	Direction SecurityRuleDirection `json:"direction,omitempty"`
3286}
3287
3288// EffectiveRoute effective Route
3289type EffectiveRoute struct {
3290	// Name - The name of the user defined route. This is optional.
3291	Name *string `json:"name,omitempty"`
3292	// Source - Who created the route. Possible values are: 'Unknown', 'User', 'VirtualNetworkGateway', and 'Default'. Possible values include: 'EffectiveRouteSourceUnknown', 'EffectiveRouteSourceUser', 'EffectiveRouteSourceVirtualNetworkGateway', 'EffectiveRouteSourceDefault'
3293	Source EffectiveRouteSource `json:"source,omitempty"`
3294	// State - The value of effective route. Possible values are: 'Active' and 'Invalid'. Possible values include: 'Active', 'Invalid'
3295	State EffectiveRouteState `json:"state,omitempty"`
3296	// AddressPrefix - The address prefixes of the effective routes in CIDR notation.
3297	AddressPrefix *[]string `json:"addressPrefix,omitempty"`
3298	// NextHopIPAddress - The IP address of the next hop of the effective route.
3299	NextHopIPAddress *[]string `json:"nextHopIpAddress,omitempty"`
3300	// 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'
3301	NextHopType RouteNextHopType `json:"nextHopType,omitempty"`
3302}
3303
3304// EffectiveRouteListResult response for list effective route API service call.
3305type EffectiveRouteListResult struct {
3306	autorest.Response `json:"-"`
3307	// Value - A list of effective routes.
3308	Value *[]EffectiveRoute `json:"value,omitempty"`
3309	// NextLink - READ-ONLY; The URL to get the next set of results.
3310	NextLink *string `json:"nextLink,omitempty"`
3311}
3312
3313// MarshalJSON is the custom marshaler for EffectiveRouteListResult.
3314func (erlr EffectiveRouteListResult) MarshalJSON() ([]byte, error) {
3315	objectMap := make(map[string]interface{})
3316	if erlr.Value != nil {
3317		objectMap["value"] = erlr.Value
3318	}
3319	return json.Marshal(objectMap)
3320}
3321
3322// EndpointServiceResult endpoint service.
3323type EndpointServiceResult struct {
3324	// Name - READ-ONLY; Name of the endpoint service.
3325	Name *string `json:"name,omitempty"`
3326	// Type - READ-ONLY; Type of the endpoint service.
3327	Type *string `json:"type,omitempty"`
3328	// ID - Resource ID.
3329	ID *string `json:"id,omitempty"`
3330}
3331
3332// MarshalJSON is the custom marshaler for EndpointServiceResult.
3333func (esr EndpointServiceResult) MarshalJSON() ([]byte, error) {
3334	objectMap := make(map[string]interface{})
3335	if esr.ID != nil {
3336		objectMap["id"] = esr.ID
3337	}
3338	return json.Marshal(objectMap)
3339}
3340
3341// EndpointServicesListResult response for the ListAvailableEndpointServices API service call.
3342type EndpointServicesListResult struct {
3343	autorest.Response `json:"-"`
3344	// Value - List of available endpoint services in a region.
3345	Value *[]EndpointServiceResult `json:"value,omitempty"`
3346	// NextLink - The URL to get the next set of results.
3347	NextLink *string `json:"nextLink,omitempty"`
3348}
3349
3350// EndpointServicesListResultIterator provides access to a complete listing of EndpointServiceResult
3351// values.
3352type EndpointServicesListResultIterator struct {
3353	i    int
3354	page EndpointServicesListResultPage
3355}
3356
3357// NextWithContext advances to the next value.  If there was an error making
3358// the request the iterator does not advance and the error is returned.
3359func (iter *EndpointServicesListResultIterator) NextWithContext(ctx context.Context) (err error) {
3360	if tracing.IsEnabled() {
3361		ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultIterator.NextWithContext")
3362		defer func() {
3363			sc := -1
3364			if iter.Response().Response.Response != nil {
3365				sc = iter.Response().Response.Response.StatusCode
3366			}
3367			tracing.EndSpan(ctx, sc, err)
3368		}()
3369	}
3370	iter.i++
3371	if iter.i < len(iter.page.Values()) {
3372		return nil
3373	}
3374	err = iter.page.NextWithContext(ctx)
3375	if err != nil {
3376		iter.i--
3377		return err
3378	}
3379	iter.i = 0
3380	return nil
3381}
3382
3383// Next advances to the next value.  If there was an error making
3384// the request the iterator does not advance and the error is returned.
3385// Deprecated: Use NextWithContext() instead.
3386func (iter *EndpointServicesListResultIterator) Next() error {
3387	return iter.NextWithContext(context.Background())
3388}
3389
3390// NotDone returns true if the enumeration should be started or is not yet complete.
3391func (iter EndpointServicesListResultIterator) NotDone() bool {
3392	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3393}
3394
3395// Response returns the raw server response from the last page request.
3396func (iter EndpointServicesListResultIterator) Response() EndpointServicesListResult {
3397	return iter.page.Response()
3398}
3399
3400// Value returns the current value or a zero-initialized value if the
3401// iterator has advanced beyond the end of the collection.
3402func (iter EndpointServicesListResultIterator) Value() EndpointServiceResult {
3403	if !iter.page.NotDone() {
3404		return EndpointServiceResult{}
3405	}
3406	return iter.page.Values()[iter.i]
3407}
3408
3409// Creates a new instance of the EndpointServicesListResultIterator type.
3410func NewEndpointServicesListResultIterator(page EndpointServicesListResultPage) EndpointServicesListResultIterator {
3411	return EndpointServicesListResultIterator{page: page}
3412}
3413
3414// IsEmpty returns true if the ListResult contains no values.
3415func (eslr EndpointServicesListResult) IsEmpty() bool {
3416	return eslr.Value == nil || len(*eslr.Value) == 0
3417}
3418
3419// hasNextLink returns true if the NextLink is not empty.
3420func (eslr EndpointServicesListResult) hasNextLink() bool {
3421	return eslr.NextLink != nil && len(*eslr.NextLink) != 0
3422}
3423
3424// endpointServicesListResultPreparer prepares a request to retrieve the next set of results.
3425// It returns nil if no more results exist.
3426func (eslr EndpointServicesListResult) endpointServicesListResultPreparer(ctx context.Context) (*http.Request, error) {
3427	if !eslr.hasNextLink() {
3428		return nil, nil
3429	}
3430	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3431		autorest.AsJSON(),
3432		autorest.AsGet(),
3433		autorest.WithBaseURL(to.String(eslr.NextLink)))
3434}
3435
3436// EndpointServicesListResultPage contains a page of EndpointServiceResult values.
3437type EndpointServicesListResultPage struct {
3438	fn   func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)
3439	eslr EndpointServicesListResult
3440}
3441
3442// NextWithContext advances to the next page of values.  If there was an error making
3443// the request the page does not advance and the error is returned.
3444func (page *EndpointServicesListResultPage) NextWithContext(ctx context.Context) (err error) {
3445	if tracing.IsEnabled() {
3446		ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultPage.NextWithContext")
3447		defer func() {
3448			sc := -1
3449			if page.Response().Response.Response != nil {
3450				sc = page.Response().Response.Response.StatusCode
3451			}
3452			tracing.EndSpan(ctx, sc, err)
3453		}()
3454	}
3455	for {
3456		next, err := page.fn(ctx, page.eslr)
3457		if err != nil {
3458			return err
3459		}
3460		page.eslr = next
3461		if !next.hasNextLink() || !next.IsEmpty() {
3462			break
3463		}
3464	}
3465	return nil
3466}
3467
3468// Next advances to the next page of values.  If there was an error making
3469// the request the page does not advance and the error is returned.
3470// Deprecated: Use NextWithContext() instead.
3471func (page *EndpointServicesListResultPage) Next() error {
3472	return page.NextWithContext(context.Background())
3473}
3474
3475// NotDone returns true if the page enumeration should be started or is not yet complete.
3476func (page EndpointServicesListResultPage) NotDone() bool {
3477	return !page.eslr.IsEmpty()
3478}
3479
3480// Response returns the raw server response from the last page request.
3481func (page EndpointServicesListResultPage) Response() EndpointServicesListResult {
3482	return page.eslr
3483}
3484
3485// Values returns the slice of values for the current page or nil if there are no values.
3486func (page EndpointServicesListResultPage) Values() []EndpointServiceResult {
3487	if page.eslr.IsEmpty() {
3488		return nil
3489	}
3490	return *page.eslr.Value
3491}
3492
3493// Creates a new instance of the EndpointServicesListResultPage type.
3494func NewEndpointServicesListResultPage(cur EndpointServicesListResult, getNextPage func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)) EndpointServicesListResultPage {
3495	return EndpointServicesListResultPage{
3496		fn:   getNextPage,
3497		eslr: cur,
3498	}
3499}
3500
3501// Error ...
3502type Error struct {
3503	Code       *string         `json:"code,omitempty"`
3504	Message    *string         `json:"message,omitempty"`
3505	Target     *string         `json:"target,omitempty"`
3506	Details    *[]ErrorDetails `json:"details,omitempty"`
3507	InnerError *string         `json:"innerError,omitempty"`
3508}
3509
3510// ErrorDetails ...
3511type ErrorDetails struct {
3512	Code    *string `json:"code,omitempty"`
3513	Target  *string `json:"target,omitempty"`
3514	Message *string `json:"message,omitempty"`
3515}
3516
3517// ExpressRouteCircuit expressRouteCircuit resource
3518type ExpressRouteCircuit struct {
3519	autorest.Response `json:"-"`
3520	// Sku - The SKU.
3521	Sku                                  *ExpressRouteCircuitSku `json:"sku,omitempty"`
3522	*ExpressRouteCircuitPropertiesFormat `json:"properties,omitempty"`
3523	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
3524	Etag *string `json:"etag,omitempty"`
3525	// ID - Resource ID.
3526	ID *string `json:"id,omitempty"`
3527	// Name - READ-ONLY; Resource name.
3528	Name *string `json:"name,omitempty"`
3529	// Type - READ-ONLY; Resource type.
3530	Type *string `json:"type,omitempty"`
3531	// Location - Resource location.
3532	Location *string `json:"location,omitempty"`
3533	// Tags - Resource tags.
3534	Tags map[string]*string `json:"tags"`
3535}
3536
3537// MarshalJSON is the custom marshaler for ExpressRouteCircuit.
3538func (erc ExpressRouteCircuit) MarshalJSON() ([]byte, error) {
3539	objectMap := make(map[string]interface{})
3540	if erc.Sku != nil {
3541		objectMap["sku"] = erc.Sku
3542	}
3543	if erc.ExpressRouteCircuitPropertiesFormat != nil {
3544		objectMap["properties"] = erc.ExpressRouteCircuitPropertiesFormat
3545	}
3546	if erc.ID != nil {
3547		objectMap["id"] = erc.ID
3548	}
3549	if erc.Location != nil {
3550		objectMap["location"] = erc.Location
3551	}
3552	if erc.Tags != nil {
3553		objectMap["tags"] = erc.Tags
3554	}
3555	return json.Marshal(objectMap)
3556}
3557
3558// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuit struct.
3559func (erc *ExpressRouteCircuit) UnmarshalJSON(body []byte) error {
3560	var m map[string]*json.RawMessage
3561	err := json.Unmarshal(body, &m)
3562	if err != nil {
3563		return err
3564	}
3565	for k, v := range m {
3566		switch k {
3567		case "sku":
3568			if v != nil {
3569				var sku ExpressRouteCircuitSku
3570				err = json.Unmarshal(*v, &sku)
3571				if err != nil {
3572					return err
3573				}
3574				erc.Sku = &sku
3575			}
3576		case "properties":
3577			if v != nil {
3578				var expressRouteCircuitPropertiesFormat ExpressRouteCircuitPropertiesFormat
3579				err = json.Unmarshal(*v, &expressRouteCircuitPropertiesFormat)
3580				if err != nil {
3581					return err
3582				}
3583				erc.ExpressRouteCircuitPropertiesFormat = &expressRouteCircuitPropertiesFormat
3584			}
3585		case "etag":
3586			if v != nil {
3587				var etag string
3588				err = json.Unmarshal(*v, &etag)
3589				if err != nil {
3590					return err
3591				}
3592				erc.Etag = &etag
3593			}
3594		case "id":
3595			if v != nil {
3596				var ID string
3597				err = json.Unmarshal(*v, &ID)
3598				if err != nil {
3599					return err
3600				}
3601				erc.ID = &ID
3602			}
3603		case "name":
3604			if v != nil {
3605				var name string
3606				err = json.Unmarshal(*v, &name)
3607				if err != nil {
3608					return err
3609				}
3610				erc.Name = &name
3611			}
3612		case "type":
3613			if v != nil {
3614				var typeVar string
3615				err = json.Unmarshal(*v, &typeVar)
3616				if err != nil {
3617					return err
3618				}
3619				erc.Type = &typeVar
3620			}
3621		case "location":
3622			if v != nil {
3623				var location string
3624				err = json.Unmarshal(*v, &location)
3625				if err != nil {
3626					return err
3627				}
3628				erc.Location = &location
3629			}
3630		case "tags":
3631			if v != nil {
3632				var tags map[string]*string
3633				err = json.Unmarshal(*v, &tags)
3634				if err != nil {
3635					return err
3636				}
3637				erc.Tags = tags
3638			}
3639		}
3640	}
3641
3642	return nil
3643}
3644
3645// ExpressRouteCircuitArpTable the ARP table associated with the ExpressRouteCircuit.
3646type ExpressRouteCircuitArpTable struct {
3647	// Age - Age
3648	Age *int32 `json:"age,omitempty"`
3649	// Interface - Interface
3650	Interface *string `json:"interface,omitempty"`
3651	// IPAddress - The IP address.
3652	IPAddress *string `json:"ipAddress,omitempty"`
3653	// MacAddress - The MAC address.
3654	MacAddress *string `json:"macAddress,omitempty"`
3655}
3656
3657// ExpressRouteCircuitAuthorization authorization in an ExpressRouteCircuit resource.
3658type ExpressRouteCircuitAuthorization struct {
3659	autorest.Response              `json:"-"`
3660	*AuthorizationPropertiesFormat `json:"properties,omitempty"`
3661	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
3662	Name *string `json:"name,omitempty"`
3663	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
3664	Etag *string `json:"etag,omitempty"`
3665	// ID - Resource ID.
3666	ID *string `json:"id,omitempty"`
3667}
3668
3669// MarshalJSON is the custom marshaler for ExpressRouteCircuitAuthorization.
3670func (erca ExpressRouteCircuitAuthorization) MarshalJSON() ([]byte, error) {
3671	objectMap := make(map[string]interface{})
3672	if erca.AuthorizationPropertiesFormat != nil {
3673		objectMap["properties"] = erca.AuthorizationPropertiesFormat
3674	}
3675	if erca.Name != nil {
3676		objectMap["name"] = erca.Name
3677	}
3678	if erca.ID != nil {
3679		objectMap["id"] = erca.ID
3680	}
3681	return json.Marshal(objectMap)
3682}
3683
3684// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitAuthorization struct.
3685func (erca *ExpressRouteCircuitAuthorization) UnmarshalJSON(body []byte) error {
3686	var m map[string]*json.RawMessage
3687	err := json.Unmarshal(body, &m)
3688	if err != nil {
3689		return err
3690	}
3691	for k, v := range m {
3692		switch k {
3693		case "properties":
3694			if v != nil {
3695				var authorizationPropertiesFormat AuthorizationPropertiesFormat
3696				err = json.Unmarshal(*v, &authorizationPropertiesFormat)
3697				if err != nil {
3698					return err
3699				}
3700				erca.AuthorizationPropertiesFormat = &authorizationPropertiesFormat
3701			}
3702		case "name":
3703			if v != nil {
3704				var name string
3705				err = json.Unmarshal(*v, &name)
3706				if err != nil {
3707					return err
3708				}
3709				erca.Name = &name
3710			}
3711		case "etag":
3712			if v != nil {
3713				var etag string
3714				err = json.Unmarshal(*v, &etag)
3715				if err != nil {
3716					return err
3717				}
3718				erca.Etag = &etag
3719			}
3720		case "id":
3721			if v != nil {
3722				var ID string
3723				err = json.Unmarshal(*v, &ID)
3724				if err != nil {
3725					return err
3726				}
3727				erca.ID = &ID
3728			}
3729		}
3730	}
3731
3732	return nil
3733}
3734
3735// ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
3736// results of a long-running operation.
3737type ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture struct {
3738	azure.FutureAPI
3739	// Result returns the result of the asynchronous operation.
3740	// If the operation has not completed it will return an error.
3741	Result func(ExpressRouteCircuitAuthorizationsClient) (ExpressRouteCircuitAuthorization, error)
3742}
3743
3744// ExpressRouteCircuitAuthorizationsDeleteFuture an abstraction for monitoring and retrieving the results
3745// of a long-running operation.
3746type ExpressRouteCircuitAuthorizationsDeleteFuture struct {
3747	azure.FutureAPI
3748	// Result returns the result of the asynchronous operation.
3749	// If the operation has not completed it will return an error.
3750	Result func(ExpressRouteCircuitAuthorizationsClient) (autorest.Response, error)
3751}
3752
3753// ExpressRouteCircuitListResult response for ListExpressRouteCircuit API service call.
3754type ExpressRouteCircuitListResult struct {
3755	autorest.Response `json:"-"`
3756	// Value - A list of ExpressRouteCircuits in a resource group.
3757	Value *[]ExpressRouteCircuit `json:"value,omitempty"`
3758	// NextLink - The URL to get the next set of results.
3759	NextLink *string `json:"nextLink,omitempty"`
3760}
3761
3762// ExpressRouteCircuitListResultIterator provides access to a complete listing of ExpressRouteCircuit
3763// values.
3764type ExpressRouteCircuitListResultIterator struct {
3765	i    int
3766	page ExpressRouteCircuitListResultPage
3767}
3768
3769// NextWithContext advances to the next value.  If there was an error making
3770// the request the iterator does not advance and the error is returned.
3771func (iter *ExpressRouteCircuitListResultIterator) NextWithContext(ctx context.Context) (err error) {
3772	if tracing.IsEnabled() {
3773		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultIterator.NextWithContext")
3774		defer func() {
3775			sc := -1
3776			if iter.Response().Response.Response != nil {
3777				sc = iter.Response().Response.Response.StatusCode
3778			}
3779			tracing.EndSpan(ctx, sc, err)
3780		}()
3781	}
3782	iter.i++
3783	if iter.i < len(iter.page.Values()) {
3784		return nil
3785	}
3786	err = iter.page.NextWithContext(ctx)
3787	if err != nil {
3788		iter.i--
3789		return err
3790	}
3791	iter.i = 0
3792	return nil
3793}
3794
3795// Next advances to the next value.  If there was an error making
3796// the request the iterator does not advance and the error is returned.
3797// Deprecated: Use NextWithContext() instead.
3798func (iter *ExpressRouteCircuitListResultIterator) Next() error {
3799	return iter.NextWithContext(context.Background())
3800}
3801
3802// NotDone returns true if the enumeration should be started or is not yet complete.
3803func (iter ExpressRouteCircuitListResultIterator) NotDone() bool {
3804	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3805}
3806
3807// Response returns the raw server response from the last page request.
3808func (iter ExpressRouteCircuitListResultIterator) Response() ExpressRouteCircuitListResult {
3809	return iter.page.Response()
3810}
3811
3812// Value returns the current value or a zero-initialized value if the
3813// iterator has advanced beyond the end of the collection.
3814func (iter ExpressRouteCircuitListResultIterator) Value() ExpressRouteCircuit {
3815	if !iter.page.NotDone() {
3816		return ExpressRouteCircuit{}
3817	}
3818	return iter.page.Values()[iter.i]
3819}
3820
3821// Creates a new instance of the ExpressRouteCircuitListResultIterator type.
3822func NewExpressRouteCircuitListResultIterator(page ExpressRouteCircuitListResultPage) ExpressRouteCircuitListResultIterator {
3823	return ExpressRouteCircuitListResultIterator{page: page}
3824}
3825
3826// IsEmpty returns true if the ListResult contains no values.
3827func (erclr ExpressRouteCircuitListResult) IsEmpty() bool {
3828	return erclr.Value == nil || len(*erclr.Value) == 0
3829}
3830
3831// hasNextLink returns true if the NextLink is not empty.
3832func (erclr ExpressRouteCircuitListResult) hasNextLink() bool {
3833	return erclr.NextLink != nil && len(*erclr.NextLink) != 0
3834}
3835
3836// expressRouteCircuitListResultPreparer prepares a request to retrieve the next set of results.
3837// It returns nil if no more results exist.
3838func (erclr ExpressRouteCircuitListResult) expressRouteCircuitListResultPreparer(ctx context.Context) (*http.Request, error) {
3839	if !erclr.hasNextLink() {
3840		return nil, nil
3841	}
3842	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3843		autorest.AsJSON(),
3844		autorest.AsGet(),
3845		autorest.WithBaseURL(to.String(erclr.NextLink)))
3846}
3847
3848// ExpressRouteCircuitListResultPage contains a page of ExpressRouteCircuit values.
3849type ExpressRouteCircuitListResultPage struct {
3850	fn    func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)
3851	erclr ExpressRouteCircuitListResult
3852}
3853
3854// NextWithContext advances to the next page of values.  If there was an error making
3855// the request the page does not advance and the error is returned.
3856func (page *ExpressRouteCircuitListResultPage) NextWithContext(ctx context.Context) (err error) {
3857	if tracing.IsEnabled() {
3858		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultPage.NextWithContext")
3859		defer func() {
3860			sc := -1
3861			if page.Response().Response.Response != nil {
3862				sc = page.Response().Response.Response.StatusCode
3863			}
3864			tracing.EndSpan(ctx, sc, err)
3865		}()
3866	}
3867	for {
3868		next, err := page.fn(ctx, page.erclr)
3869		if err != nil {
3870			return err
3871		}
3872		page.erclr = next
3873		if !next.hasNextLink() || !next.IsEmpty() {
3874			break
3875		}
3876	}
3877	return nil
3878}
3879
3880// Next advances to the next page of values.  If there was an error making
3881// the request the page does not advance and the error is returned.
3882// Deprecated: Use NextWithContext() instead.
3883func (page *ExpressRouteCircuitListResultPage) Next() error {
3884	return page.NextWithContext(context.Background())
3885}
3886
3887// NotDone returns true if the page enumeration should be started or is not yet complete.
3888func (page ExpressRouteCircuitListResultPage) NotDone() bool {
3889	return !page.erclr.IsEmpty()
3890}
3891
3892// Response returns the raw server response from the last page request.
3893func (page ExpressRouteCircuitListResultPage) Response() ExpressRouteCircuitListResult {
3894	return page.erclr
3895}
3896
3897// Values returns the slice of values for the current page or nil if there are no values.
3898func (page ExpressRouteCircuitListResultPage) Values() []ExpressRouteCircuit {
3899	if page.erclr.IsEmpty() {
3900		return nil
3901	}
3902	return *page.erclr.Value
3903}
3904
3905// Creates a new instance of the ExpressRouteCircuitListResultPage type.
3906func NewExpressRouteCircuitListResultPage(cur ExpressRouteCircuitListResult, getNextPage func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)) ExpressRouteCircuitListResultPage {
3907	return ExpressRouteCircuitListResultPage{
3908		fn:    getNextPage,
3909		erclr: cur,
3910	}
3911}
3912
3913// ExpressRouteCircuitPeering peering in an ExpressRouteCircuit resource.
3914type ExpressRouteCircuitPeering struct {
3915	autorest.Response                           `json:"-"`
3916	*ExpressRouteCircuitPeeringPropertiesFormat `json:"properties,omitempty"`
3917	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
3918	Name *string `json:"name,omitempty"`
3919	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
3920	Etag *string `json:"etag,omitempty"`
3921	// ID - Resource ID.
3922	ID *string `json:"id,omitempty"`
3923}
3924
3925// MarshalJSON is the custom marshaler for ExpressRouteCircuitPeering.
3926func (ercp ExpressRouteCircuitPeering) MarshalJSON() ([]byte, error) {
3927	objectMap := make(map[string]interface{})
3928	if ercp.ExpressRouteCircuitPeeringPropertiesFormat != nil {
3929		objectMap["properties"] = ercp.ExpressRouteCircuitPeeringPropertiesFormat
3930	}
3931	if ercp.Name != nil {
3932		objectMap["name"] = ercp.Name
3933	}
3934	if ercp.ID != nil {
3935		objectMap["id"] = ercp.ID
3936	}
3937	return json.Marshal(objectMap)
3938}
3939
3940// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitPeering struct.
3941func (ercp *ExpressRouteCircuitPeering) UnmarshalJSON(body []byte) error {
3942	var m map[string]*json.RawMessage
3943	err := json.Unmarshal(body, &m)
3944	if err != nil {
3945		return err
3946	}
3947	for k, v := range m {
3948		switch k {
3949		case "properties":
3950			if v != nil {
3951				var expressRouteCircuitPeeringPropertiesFormat ExpressRouteCircuitPeeringPropertiesFormat
3952				err = json.Unmarshal(*v, &expressRouteCircuitPeeringPropertiesFormat)
3953				if err != nil {
3954					return err
3955				}
3956				ercp.ExpressRouteCircuitPeeringPropertiesFormat = &expressRouteCircuitPeeringPropertiesFormat
3957			}
3958		case "name":
3959			if v != nil {
3960				var name string
3961				err = json.Unmarshal(*v, &name)
3962				if err != nil {
3963					return err
3964				}
3965				ercp.Name = &name
3966			}
3967		case "etag":
3968			if v != nil {
3969				var etag string
3970				err = json.Unmarshal(*v, &etag)
3971				if err != nil {
3972					return err
3973				}
3974				ercp.Etag = &etag
3975			}
3976		case "id":
3977			if v != nil {
3978				var ID string
3979				err = json.Unmarshal(*v, &ID)
3980				if err != nil {
3981					return err
3982				}
3983				ercp.ID = &ID
3984			}
3985		}
3986	}
3987
3988	return nil
3989}
3990
3991// ExpressRouteCircuitPeeringConfig specifies the peering configuration.
3992type ExpressRouteCircuitPeeringConfig struct {
3993	// AdvertisedPublicPrefixes - The reference of AdvertisedPublicPrefixes.
3994	AdvertisedPublicPrefixes *[]string `json:"advertisedPublicPrefixes,omitempty"`
3995	// AdvertisedCommunities - The communities of bgp peering. Specified for microsoft peering
3996	AdvertisedCommunities *[]string `json:"advertisedCommunities,omitempty"`
3997	// AdvertisedPublicPrefixesState - AdvertisedPublicPrefixState of the Peering resource. Possible values are 'NotConfigured', 'Configuring', 'Configured', and 'ValidationNeeded'. Possible values include: 'NotConfigured', 'Configuring', 'Configured', 'ValidationNeeded'
3998	AdvertisedPublicPrefixesState ExpressRouteCircuitPeeringAdvertisedPublicPrefixState `json:"advertisedPublicPrefixesState,omitempty"`
3999	// LegacyMode - The legacy mode of the peering.
4000	LegacyMode *int32 `json:"legacyMode,omitempty"`
4001	// CustomerASN - The CustomerASN of the peering.
4002	CustomerASN *int32 `json:"customerASN,omitempty"`
4003	// RoutingRegistryName - The RoutingRegistryName of the configuration.
4004	RoutingRegistryName *string `json:"routingRegistryName,omitempty"`
4005}
4006
4007// ExpressRouteCircuitPeeringListResult response for ListPeering API service call retrieves all peerings
4008// that belong to an ExpressRouteCircuit.
4009type ExpressRouteCircuitPeeringListResult struct {
4010	autorest.Response `json:"-"`
4011	// Value - The peerings in an express route circuit.
4012	Value *[]ExpressRouteCircuitPeering `json:"value,omitempty"`
4013	// NextLink - The URL to get the next set of results.
4014	NextLink *string `json:"nextLink,omitempty"`
4015}
4016
4017// ExpressRouteCircuitPeeringListResultIterator provides access to a complete listing of
4018// ExpressRouteCircuitPeering values.
4019type ExpressRouteCircuitPeeringListResultIterator struct {
4020	i    int
4021	page ExpressRouteCircuitPeeringListResultPage
4022}
4023
4024// NextWithContext advances to the next value.  If there was an error making
4025// the request the iterator does not advance and the error is returned.
4026func (iter *ExpressRouteCircuitPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
4027	if tracing.IsEnabled() {
4028		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultIterator.NextWithContext")
4029		defer func() {
4030			sc := -1
4031			if iter.Response().Response.Response != nil {
4032				sc = iter.Response().Response.Response.StatusCode
4033			}
4034			tracing.EndSpan(ctx, sc, err)
4035		}()
4036	}
4037	iter.i++
4038	if iter.i < len(iter.page.Values()) {
4039		return nil
4040	}
4041	err = iter.page.NextWithContext(ctx)
4042	if err != nil {
4043		iter.i--
4044		return err
4045	}
4046	iter.i = 0
4047	return nil
4048}
4049
4050// Next advances to the next value.  If there was an error making
4051// the request the iterator does not advance and the error is returned.
4052// Deprecated: Use NextWithContext() instead.
4053func (iter *ExpressRouteCircuitPeeringListResultIterator) Next() error {
4054	return iter.NextWithContext(context.Background())
4055}
4056
4057// NotDone returns true if the enumeration should be started or is not yet complete.
4058func (iter ExpressRouteCircuitPeeringListResultIterator) NotDone() bool {
4059	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4060}
4061
4062// Response returns the raw server response from the last page request.
4063func (iter ExpressRouteCircuitPeeringListResultIterator) Response() ExpressRouteCircuitPeeringListResult {
4064	return iter.page.Response()
4065}
4066
4067// Value returns the current value or a zero-initialized value if the
4068// iterator has advanced beyond the end of the collection.
4069func (iter ExpressRouteCircuitPeeringListResultIterator) Value() ExpressRouteCircuitPeering {
4070	if !iter.page.NotDone() {
4071		return ExpressRouteCircuitPeering{}
4072	}
4073	return iter.page.Values()[iter.i]
4074}
4075
4076// Creates a new instance of the ExpressRouteCircuitPeeringListResultIterator type.
4077func NewExpressRouteCircuitPeeringListResultIterator(page ExpressRouteCircuitPeeringListResultPage) ExpressRouteCircuitPeeringListResultIterator {
4078	return ExpressRouteCircuitPeeringListResultIterator{page: page}
4079}
4080
4081// IsEmpty returns true if the ListResult contains no values.
4082func (ercplr ExpressRouteCircuitPeeringListResult) IsEmpty() bool {
4083	return ercplr.Value == nil || len(*ercplr.Value) == 0
4084}
4085
4086// hasNextLink returns true if the NextLink is not empty.
4087func (ercplr ExpressRouteCircuitPeeringListResult) hasNextLink() bool {
4088	return ercplr.NextLink != nil && len(*ercplr.NextLink) != 0
4089}
4090
4091// expressRouteCircuitPeeringListResultPreparer prepares a request to retrieve the next set of results.
4092// It returns nil if no more results exist.
4093func (ercplr ExpressRouteCircuitPeeringListResult) expressRouteCircuitPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
4094	if !ercplr.hasNextLink() {
4095		return nil, nil
4096	}
4097	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4098		autorest.AsJSON(),
4099		autorest.AsGet(),
4100		autorest.WithBaseURL(to.String(ercplr.NextLink)))
4101}
4102
4103// ExpressRouteCircuitPeeringListResultPage contains a page of ExpressRouteCircuitPeering values.
4104type ExpressRouteCircuitPeeringListResultPage struct {
4105	fn     func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)
4106	ercplr ExpressRouteCircuitPeeringListResult
4107}
4108
4109// NextWithContext advances to the next page of values.  If there was an error making
4110// the request the page does not advance and the error is returned.
4111func (page *ExpressRouteCircuitPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
4112	if tracing.IsEnabled() {
4113		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultPage.NextWithContext")
4114		defer func() {
4115			sc := -1
4116			if page.Response().Response.Response != nil {
4117				sc = page.Response().Response.Response.StatusCode
4118			}
4119			tracing.EndSpan(ctx, sc, err)
4120		}()
4121	}
4122	for {
4123		next, err := page.fn(ctx, page.ercplr)
4124		if err != nil {
4125			return err
4126		}
4127		page.ercplr = next
4128		if !next.hasNextLink() || !next.IsEmpty() {
4129			break
4130		}
4131	}
4132	return nil
4133}
4134
4135// Next advances to the next page of values.  If there was an error making
4136// the request the page does not advance and the error is returned.
4137// Deprecated: Use NextWithContext() instead.
4138func (page *ExpressRouteCircuitPeeringListResultPage) Next() error {
4139	return page.NextWithContext(context.Background())
4140}
4141
4142// NotDone returns true if the page enumeration should be started or is not yet complete.
4143func (page ExpressRouteCircuitPeeringListResultPage) NotDone() bool {
4144	return !page.ercplr.IsEmpty()
4145}
4146
4147// Response returns the raw server response from the last page request.
4148func (page ExpressRouteCircuitPeeringListResultPage) Response() ExpressRouteCircuitPeeringListResult {
4149	return page.ercplr
4150}
4151
4152// Values returns the slice of values for the current page or nil if there are no values.
4153func (page ExpressRouteCircuitPeeringListResultPage) Values() []ExpressRouteCircuitPeering {
4154	if page.ercplr.IsEmpty() {
4155		return nil
4156	}
4157	return *page.ercplr.Value
4158}
4159
4160// Creates a new instance of the ExpressRouteCircuitPeeringListResultPage type.
4161func NewExpressRouteCircuitPeeringListResultPage(cur ExpressRouteCircuitPeeringListResult, getNextPage func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)) ExpressRouteCircuitPeeringListResultPage {
4162	return ExpressRouteCircuitPeeringListResultPage{
4163		fn:     getNextPage,
4164		ercplr: cur,
4165	}
4166}
4167
4168// ExpressRouteCircuitPeeringPropertiesFormat ...
4169type ExpressRouteCircuitPeeringPropertiesFormat struct {
4170	// PeeringType - The PeeringType. Possible values are: 'AzurePublicPeering', 'AzurePrivatePeering', and 'MicrosoftPeering'. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'
4171	PeeringType ExpressRouteCircuitPeeringType `json:"peeringType,omitempty"`
4172	// State - The state of peering. Possible values are: 'Disabled' and 'Enabled'. Possible values include: 'ExpressRouteCircuitPeeringStateDisabled', 'ExpressRouteCircuitPeeringStateEnabled'
4173	State ExpressRouteCircuitPeeringState `json:"state,omitempty"`
4174	// AzureASN - The Azure ASN.
4175	AzureASN *int32 `json:"azureASN,omitempty"`
4176	// PeerASN - The peer ASN.
4177	PeerASN *int32 `json:"peerASN,omitempty"`
4178	// PrimaryPeerAddressPrefix - The primary address prefix.
4179	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
4180	// SecondaryPeerAddressPrefix - The secondary address prefix.
4181	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
4182	// PrimaryAzurePort - The primary port.
4183	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
4184	// SecondaryAzurePort - The secondary port.
4185	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
4186	// SharedKey - The shared key.
4187	SharedKey *string `json:"sharedKey,omitempty"`
4188	// VlanID - The VLAN ID.
4189	VlanID *int32 `json:"vlanId,omitempty"`
4190	// MicrosoftPeeringConfig - The Microsoft peering configuration.
4191	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
4192	// Stats - Gets peering stats.
4193	Stats *ExpressRouteCircuitStats `json:"stats,omitempty"`
4194	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
4195	ProvisioningState *string `json:"provisioningState,omitempty"`
4196	// GatewayManagerEtag - The GatewayManager Etag.
4197	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
4198	// LastModifiedBy - Gets whether the provider or the customer last modified the peering.
4199	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
4200	// RouteFilter - The reference of the RouteFilter resource.
4201	RouteFilter *RouteFilter `json:"routeFilter,omitempty"`
4202	// Ipv6PeeringConfig - The IPv6 peering configuration.
4203	Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"`
4204}
4205
4206// ExpressRouteCircuitPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
4207// of a long-running operation.
4208type ExpressRouteCircuitPeeringsCreateOrUpdateFuture struct {
4209	azure.FutureAPI
4210	// Result returns the result of the asynchronous operation.
4211	// If the operation has not completed it will return an error.
4212	Result func(ExpressRouteCircuitPeeringsClient) (ExpressRouteCircuitPeering, error)
4213}
4214
4215// ExpressRouteCircuitPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
4216// long-running operation.
4217type ExpressRouteCircuitPeeringsDeleteFuture struct {
4218	azure.FutureAPI
4219	// Result returns the result of the asynchronous operation.
4220	// If the operation has not completed it will return an error.
4221	Result func(ExpressRouteCircuitPeeringsClient) (autorest.Response, error)
4222}
4223
4224// ExpressRouteCircuitPropertiesFormat properties of ExpressRouteCircuit.
4225type ExpressRouteCircuitPropertiesFormat struct {
4226	// AllowClassicOperations - Allow classic operations
4227	AllowClassicOperations *bool `json:"allowClassicOperations,omitempty"`
4228	// CircuitProvisioningState - The CircuitProvisioningState state of the resource.
4229	CircuitProvisioningState *string `json:"circuitProvisioningState,omitempty"`
4230	// ServiceProviderProvisioningState - The ServiceProviderProvisioningState state of the resource. Possible values are 'NotProvisioned', 'Provisioning', 'Provisioned', and 'Deprovisioning'. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning'
4231	ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"`
4232	// Authorizations - The list of authorizations.
4233	Authorizations *[]ExpressRouteCircuitAuthorization `json:"authorizations,omitempty"`
4234	// Peerings - The list of peerings.
4235	Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"`
4236	// ServiceKey - The ServiceKey.
4237	ServiceKey *string `json:"serviceKey,omitempty"`
4238	// ServiceProviderNotes - The ServiceProviderNotes.
4239	ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"`
4240	// ServiceProviderProperties - The ServiceProviderProperties.
4241	ServiceProviderProperties *ExpressRouteCircuitServiceProviderProperties `json:"serviceProviderProperties,omitempty"`
4242	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
4243	ProvisioningState *string `json:"provisioningState,omitempty"`
4244	// GatewayManagerEtag - The GatewayManager Etag.
4245	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
4246}
4247
4248// ExpressRouteCircuitRoutesTable the routes table associated with the ExpressRouteCircuit
4249type ExpressRouteCircuitRoutesTable struct {
4250	// NetworkProperty - network
4251	NetworkProperty *string `json:"network,omitempty"`
4252	// NextHop - nextHop
4253	NextHop *string `json:"nextHop,omitempty"`
4254	// LocPrf - locPrf
4255	LocPrf *string `json:"locPrf,omitempty"`
4256	// Weight - weight.
4257	Weight *int32 `json:"weight,omitempty"`
4258	// Path - path
4259	Path *string `json:"path,omitempty"`
4260}
4261
4262// ExpressRouteCircuitRoutesTableSummary the routes table associated with the ExpressRouteCircuit.
4263type ExpressRouteCircuitRoutesTableSummary struct {
4264	// Neighbor - Neighbor
4265	Neighbor *string `json:"neighbor,omitempty"`
4266	// V - BGP version number spoken to the neighbor.
4267	V *int32 `json:"v,omitempty"`
4268	// As - Autonomous system number.
4269	As *int32 `json:"as,omitempty"`
4270	// 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.
4271	UpDown *string `json:"upDown,omitempty"`
4272	// StatePfxRcd - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group.
4273	StatePfxRcd *string `json:"statePfxRcd,omitempty"`
4274}
4275
4276// ExpressRouteCircuitsArpTableListResult response for ListArpTable associated with the Express Route
4277// Circuits API.
4278type ExpressRouteCircuitsArpTableListResult struct {
4279	autorest.Response `json:"-"`
4280	// Value - Gets list of the ARP table.
4281	Value *[]ExpressRouteCircuitArpTable `json:"value,omitempty"`
4282	// NextLink - The URL to get the next set of results.
4283	NextLink *string `json:"nextLink,omitempty"`
4284}
4285
4286// ExpressRouteCircuitsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
4287// long-running operation.
4288type ExpressRouteCircuitsCreateOrUpdateFuture struct {
4289	azure.FutureAPI
4290	// Result returns the result of the asynchronous operation.
4291	// If the operation has not completed it will return an error.
4292	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuit, error)
4293}
4294
4295// ExpressRouteCircuitsDeleteFuture an abstraction for monitoring and retrieving the results of a
4296// long-running operation.
4297type ExpressRouteCircuitsDeleteFuture struct {
4298	azure.FutureAPI
4299	// Result returns the result of the asynchronous operation.
4300	// If the operation has not completed it will return an error.
4301	Result func(ExpressRouteCircuitsClient) (autorest.Response, error)
4302}
4303
4304// ExpressRouteCircuitServiceProviderProperties contains ServiceProviderProperties in an
4305// ExpressRouteCircuit.
4306type ExpressRouteCircuitServiceProviderProperties struct {
4307	// ServiceProviderName - The serviceProviderName.
4308	ServiceProviderName *string `json:"serviceProviderName,omitempty"`
4309	// PeeringLocation - The peering location.
4310	PeeringLocation *string `json:"peeringLocation,omitempty"`
4311	// BandwidthInMbps - The BandwidthInMbps.
4312	BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"`
4313}
4314
4315// ExpressRouteCircuitSku contains SKU in an ExpressRouteCircuit.
4316type ExpressRouteCircuitSku struct {
4317	// Name - The name of the SKU.
4318	Name *string `json:"name,omitempty"`
4319	// Tier - The tier of the SKU. Possible values are 'Standard' and 'Premium'. Possible values include: 'ExpressRouteCircuitSkuTierStandard', 'ExpressRouteCircuitSkuTierPremium', 'ExpressRouteCircuitSkuTierTransport'
4320	Tier ExpressRouteCircuitSkuTier `json:"tier,omitempty"`
4321	// Family - The family of the SKU. Possible values are: 'UnlimitedData' and 'MeteredData'. Possible values include: 'UnlimitedData', 'MeteredData'
4322	Family ExpressRouteCircuitSkuFamily `json:"family,omitempty"`
4323}
4324
4325// ExpressRouteCircuitsListArpTableFuture an abstraction for monitoring and retrieving the results of a
4326// long-running operation.
4327type ExpressRouteCircuitsListArpTableFuture struct {
4328	azure.FutureAPI
4329	// Result returns the result of the asynchronous operation.
4330	// If the operation has not completed it will return an error.
4331	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsArpTableListResult, error)
4332}
4333
4334// ExpressRouteCircuitsListRoutesTableFuture an abstraction for monitoring and retrieving the results of a
4335// long-running operation.
4336type ExpressRouteCircuitsListRoutesTableFuture struct {
4337	azure.FutureAPI
4338	// Result returns the result of the asynchronous operation.
4339	// If the operation has not completed it will return an error.
4340	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsRoutesTableListResult, error)
4341}
4342
4343// ExpressRouteCircuitsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving the
4344// results of a long-running operation.
4345type ExpressRouteCircuitsListRoutesTableSummaryFuture struct {
4346	azure.FutureAPI
4347	// Result returns the result of the asynchronous operation.
4348	// If the operation has not completed it will return an error.
4349	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsRoutesTableSummaryListResult, error)
4350}
4351
4352// ExpressRouteCircuitsRoutesTableListResult response for ListRoutesTable associated with the Express Route
4353// Circuits API.
4354type ExpressRouteCircuitsRoutesTableListResult struct {
4355	autorest.Response `json:"-"`
4356	// Value - The list of routes table.
4357	Value *[]ExpressRouteCircuitRoutesTable `json:"value,omitempty"`
4358	// NextLink - The URL to get the next set of results.
4359	NextLink *string `json:"nextLink,omitempty"`
4360}
4361
4362// ExpressRouteCircuitsRoutesTableSummaryListResult response for ListRoutesTable associated with the
4363// Express Route Circuits API.
4364type ExpressRouteCircuitsRoutesTableSummaryListResult struct {
4365	autorest.Response `json:"-"`
4366	// Value - A list of the routes table.
4367	Value *[]ExpressRouteCircuitRoutesTableSummary `json:"value,omitempty"`
4368	// NextLink - The URL to get the next set of results.
4369	NextLink *string `json:"nextLink,omitempty"`
4370}
4371
4372// ExpressRouteCircuitStats contains stats associated with the peering.
4373type ExpressRouteCircuitStats struct {
4374	autorest.Response `json:"-"`
4375	// PrimarybytesIn - Gets BytesIn of the peering.
4376	PrimarybytesIn *int64 `json:"primarybytesIn,omitempty"`
4377	// PrimarybytesOut - Gets BytesOut of the peering.
4378	PrimarybytesOut *int64 `json:"primarybytesOut,omitempty"`
4379	// SecondarybytesIn - Gets BytesIn of the peering.
4380	SecondarybytesIn *int64 `json:"secondarybytesIn,omitempty"`
4381	// SecondarybytesOut - Gets BytesOut of the peering.
4382	SecondarybytesOut *int64 `json:"secondarybytesOut,omitempty"`
4383}
4384
4385// ExpressRouteServiceProvider a ExpressRouteResourceProvider object.
4386type ExpressRouteServiceProvider struct {
4387	*ExpressRouteServiceProviderPropertiesFormat `json:"properties,omitempty"`
4388	// ID - Resource ID.
4389	ID *string `json:"id,omitempty"`
4390	// Name - READ-ONLY; Resource name.
4391	Name *string `json:"name,omitempty"`
4392	// Type - READ-ONLY; Resource type.
4393	Type *string `json:"type,omitempty"`
4394	// Location - Resource location.
4395	Location *string `json:"location,omitempty"`
4396	// Tags - Resource tags.
4397	Tags map[string]*string `json:"tags"`
4398}
4399
4400// MarshalJSON is the custom marshaler for ExpressRouteServiceProvider.
4401func (ersp ExpressRouteServiceProvider) MarshalJSON() ([]byte, error) {
4402	objectMap := make(map[string]interface{})
4403	if ersp.ExpressRouteServiceProviderPropertiesFormat != nil {
4404		objectMap["properties"] = ersp.ExpressRouteServiceProviderPropertiesFormat
4405	}
4406	if ersp.ID != nil {
4407		objectMap["id"] = ersp.ID
4408	}
4409	if ersp.Location != nil {
4410		objectMap["location"] = ersp.Location
4411	}
4412	if ersp.Tags != nil {
4413		objectMap["tags"] = ersp.Tags
4414	}
4415	return json.Marshal(objectMap)
4416}
4417
4418// UnmarshalJSON is the custom unmarshaler for ExpressRouteServiceProvider struct.
4419func (ersp *ExpressRouteServiceProvider) UnmarshalJSON(body []byte) error {
4420	var m map[string]*json.RawMessage
4421	err := json.Unmarshal(body, &m)
4422	if err != nil {
4423		return err
4424	}
4425	for k, v := range m {
4426		switch k {
4427		case "properties":
4428			if v != nil {
4429				var expressRouteServiceProviderPropertiesFormat ExpressRouteServiceProviderPropertiesFormat
4430				err = json.Unmarshal(*v, &expressRouteServiceProviderPropertiesFormat)
4431				if err != nil {
4432					return err
4433				}
4434				ersp.ExpressRouteServiceProviderPropertiesFormat = &expressRouteServiceProviderPropertiesFormat
4435			}
4436		case "id":
4437			if v != nil {
4438				var ID string
4439				err = json.Unmarshal(*v, &ID)
4440				if err != nil {
4441					return err
4442				}
4443				ersp.ID = &ID
4444			}
4445		case "name":
4446			if v != nil {
4447				var name string
4448				err = json.Unmarshal(*v, &name)
4449				if err != nil {
4450					return err
4451				}
4452				ersp.Name = &name
4453			}
4454		case "type":
4455			if v != nil {
4456				var typeVar string
4457				err = json.Unmarshal(*v, &typeVar)
4458				if err != nil {
4459					return err
4460				}
4461				ersp.Type = &typeVar
4462			}
4463		case "location":
4464			if v != nil {
4465				var location string
4466				err = json.Unmarshal(*v, &location)
4467				if err != nil {
4468					return err
4469				}
4470				ersp.Location = &location
4471			}
4472		case "tags":
4473			if v != nil {
4474				var tags map[string]*string
4475				err = json.Unmarshal(*v, &tags)
4476				if err != nil {
4477					return err
4478				}
4479				ersp.Tags = tags
4480			}
4481		}
4482	}
4483
4484	return nil
4485}
4486
4487// ExpressRouteServiceProviderBandwidthsOffered contains bandwidths offered in ExpressRouteServiceProvider
4488// resources.
4489type ExpressRouteServiceProviderBandwidthsOffered struct {
4490	// OfferName - The OfferName.
4491	OfferName *string `json:"offerName,omitempty"`
4492	// ValueInMbps - The ValueInMbps.
4493	ValueInMbps *int32 `json:"valueInMbps,omitempty"`
4494}
4495
4496// ExpressRouteServiceProviderListResult response for the ListExpressRouteServiceProvider API service call.
4497type ExpressRouteServiceProviderListResult struct {
4498	autorest.Response `json:"-"`
4499	// Value - A list of ExpressRouteResourceProvider resources.
4500	Value *[]ExpressRouteServiceProvider `json:"value,omitempty"`
4501	// NextLink - The URL to get the next set of results.
4502	NextLink *string `json:"nextLink,omitempty"`
4503}
4504
4505// ExpressRouteServiceProviderListResultIterator provides access to a complete listing of
4506// ExpressRouteServiceProvider values.
4507type ExpressRouteServiceProviderListResultIterator struct {
4508	i    int
4509	page ExpressRouteServiceProviderListResultPage
4510}
4511
4512// NextWithContext advances to the next value.  If there was an error making
4513// the request the iterator does not advance and the error is returned.
4514func (iter *ExpressRouteServiceProviderListResultIterator) NextWithContext(ctx context.Context) (err error) {
4515	if tracing.IsEnabled() {
4516		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultIterator.NextWithContext")
4517		defer func() {
4518			sc := -1
4519			if iter.Response().Response.Response != nil {
4520				sc = iter.Response().Response.Response.StatusCode
4521			}
4522			tracing.EndSpan(ctx, sc, err)
4523		}()
4524	}
4525	iter.i++
4526	if iter.i < len(iter.page.Values()) {
4527		return nil
4528	}
4529	err = iter.page.NextWithContext(ctx)
4530	if err != nil {
4531		iter.i--
4532		return err
4533	}
4534	iter.i = 0
4535	return nil
4536}
4537
4538// Next advances to the next value.  If there was an error making
4539// the request the iterator does not advance and the error is returned.
4540// Deprecated: Use NextWithContext() instead.
4541func (iter *ExpressRouteServiceProviderListResultIterator) Next() error {
4542	return iter.NextWithContext(context.Background())
4543}
4544
4545// NotDone returns true if the enumeration should be started or is not yet complete.
4546func (iter ExpressRouteServiceProviderListResultIterator) NotDone() bool {
4547	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4548}
4549
4550// Response returns the raw server response from the last page request.
4551func (iter ExpressRouteServiceProviderListResultIterator) Response() ExpressRouteServiceProviderListResult {
4552	return iter.page.Response()
4553}
4554
4555// Value returns the current value or a zero-initialized value if the
4556// iterator has advanced beyond the end of the collection.
4557func (iter ExpressRouteServiceProviderListResultIterator) Value() ExpressRouteServiceProvider {
4558	if !iter.page.NotDone() {
4559		return ExpressRouteServiceProvider{}
4560	}
4561	return iter.page.Values()[iter.i]
4562}
4563
4564// Creates a new instance of the ExpressRouteServiceProviderListResultIterator type.
4565func NewExpressRouteServiceProviderListResultIterator(page ExpressRouteServiceProviderListResultPage) ExpressRouteServiceProviderListResultIterator {
4566	return ExpressRouteServiceProviderListResultIterator{page: page}
4567}
4568
4569// IsEmpty returns true if the ListResult contains no values.
4570func (ersplr ExpressRouteServiceProviderListResult) IsEmpty() bool {
4571	return ersplr.Value == nil || len(*ersplr.Value) == 0
4572}
4573
4574// hasNextLink returns true if the NextLink is not empty.
4575func (ersplr ExpressRouteServiceProviderListResult) hasNextLink() bool {
4576	return ersplr.NextLink != nil && len(*ersplr.NextLink) != 0
4577}
4578
4579// expressRouteServiceProviderListResultPreparer prepares a request to retrieve the next set of results.
4580// It returns nil if no more results exist.
4581func (ersplr ExpressRouteServiceProviderListResult) expressRouteServiceProviderListResultPreparer(ctx context.Context) (*http.Request, error) {
4582	if !ersplr.hasNextLink() {
4583		return nil, nil
4584	}
4585	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4586		autorest.AsJSON(),
4587		autorest.AsGet(),
4588		autorest.WithBaseURL(to.String(ersplr.NextLink)))
4589}
4590
4591// ExpressRouteServiceProviderListResultPage contains a page of ExpressRouteServiceProvider values.
4592type ExpressRouteServiceProviderListResultPage struct {
4593	fn     func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)
4594	ersplr ExpressRouteServiceProviderListResult
4595}
4596
4597// NextWithContext advances to the next page of values.  If there was an error making
4598// the request the page does not advance and the error is returned.
4599func (page *ExpressRouteServiceProviderListResultPage) NextWithContext(ctx context.Context) (err error) {
4600	if tracing.IsEnabled() {
4601		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultPage.NextWithContext")
4602		defer func() {
4603			sc := -1
4604			if page.Response().Response.Response != nil {
4605				sc = page.Response().Response.Response.StatusCode
4606			}
4607			tracing.EndSpan(ctx, sc, err)
4608		}()
4609	}
4610	for {
4611		next, err := page.fn(ctx, page.ersplr)
4612		if err != nil {
4613			return err
4614		}
4615		page.ersplr = next
4616		if !next.hasNextLink() || !next.IsEmpty() {
4617			break
4618		}
4619	}
4620	return nil
4621}
4622
4623// Next advances to the next page of values.  If there was an error making
4624// the request the page does not advance and the error is returned.
4625// Deprecated: Use NextWithContext() instead.
4626func (page *ExpressRouteServiceProviderListResultPage) Next() error {
4627	return page.NextWithContext(context.Background())
4628}
4629
4630// NotDone returns true if the page enumeration should be started or is not yet complete.
4631func (page ExpressRouteServiceProviderListResultPage) NotDone() bool {
4632	return !page.ersplr.IsEmpty()
4633}
4634
4635// Response returns the raw server response from the last page request.
4636func (page ExpressRouteServiceProviderListResultPage) Response() ExpressRouteServiceProviderListResult {
4637	return page.ersplr
4638}
4639
4640// Values returns the slice of values for the current page or nil if there are no values.
4641func (page ExpressRouteServiceProviderListResultPage) Values() []ExpressRouteServiceProvider {
4642	if page.ersplr.IsEmpty() {
4643		return nil
4644	}
4645	return *page.ersplr.Value
4646}
4647
4648// Creates a new instance of the ExpressRouteServiceProviderListResultPage type.
4649func NewExpressRouteServiceProviderListResultPage(cur ExpressRouteServiceProviderListResult, getNextPage func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)) ExpressRouteServiceProviderListResultPage {
4650	return ExpressRouteServiceProviderListResultPage{
4651		fn:     getNextPage,
4652		ersplr: cur,
4653	}
4654}
4655
4656// ExpressRouteServiceProviderPropertiesFormat properties of ExpressRouteServiceProvider.
4657type ExpressRouteServiceProviderPropertiesFormat struct {
4658	// PeeringLocations - Get a list of peering locations.
4659	PeeringLocations *[]string `json:"peeringLocations,omitempty"`
4660	// BandwidthsOffered - Gets bandwidths offered.
4661	BandwidthsOffered *[]ExpressRouteServiceProviderBandwidthsOffered `json:"bandwidthsOffered,omitempty"`
4662	// ProvisioningState - Gets the provisioning state of the resource.
4663	ProvisioningState *string `json:"provisioningState,omitempty"`
4664}
4665
4666// FlowLogInformation information on the configuration of flow log.
4667type FlowLogInformation struct {
4668	autorest.Response `json:"-"`
4669	// TargetResourceID - The ID of the resource to configure for flow logging.
4670	TargetResourceID   *string `json:"targetResourceId,omitempty"`
4671	*FlowLogProperties `json:"properties,omitempty"`
4672}
4673
4674// MarshalJSON is the custom marshaler for FlowLogInformation.
4675func (fli FlowLogInformation) MarshalJSON() ([]byte, error) {
4676	objectMap := make(map[string]interface{})
4677	if fli.TargetResourceID != nil {
4678		objectMap["targetResourceId"] = fli.TargetResourceID
4679	}
4680	if fli.FlowLogProperties != nil {
4681		objectMap["properties"] = fli.FlowLogProperties
4682	}
4683	return json.Marshal(objectMap)
4684}
4685
4686// UnmarshalJSON is the custom unmarshaler for FlowLogInformation struct.
4687func (fli *FlowLogInformation) UnmarshalJSON(body []byte) error {
4688	var m map[string]*json.RawMessage
4689	err := json.Unmarshal(body, &m)
4690	if err != nil {
4691		return err
4692	}
4693	for k, v := range m {
4694		switch k {
4695		case "targetResourceId":
4696			if v != nil {
4697				var targetResourceID string
4698				err = json.Unmarshal(*v, &targetResourceID)
4699				if err != nil {
4700					return err
4701				}
4702				fli.TargetResourceID = &targetResourceID
4703			}
4704		case "properties":
4705			if v != nil {
4706				var flowLogProperties FlowLogProperties
4707				err = json.Unmarshal(*v, &flowLogProperties)
4708				if err != nil {
4709					return err
4710				}
4711				fli.FlowLogProperties = &flowLogProperties
4712			}
4713		}
4714	}
4715
4716	return nil
4717}
4718
4719// FlowLogProperties parameters that define the configuration of flow log.
4720type FlowLogProperties struct {
4721	// StorageID - ID of the storage account which is used to store the flow log.
4722	StorageID *string `json:"storageId,omitempty"`
4723	// Enabled - Flag to enable/disable flow logging.
4724	Enabled         *bool                      `json:"enabled,omitempty"`
4725	RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"`
4726}
4727
4728// FlowLogStatusParameters parameters that define a resource to query flow log status.
4729type FlowLogStatusParameters struct {
4730	// TargetResourceID - The target resource where getting the flow logging status.
4731	TargetResourceID *string `json:"targetResourceId,omitempty"`
4732}
4733
4734// FrontendIPConfiguration frontend IP address of the load balancer.
4735type FrontendIPConfiguration struct {
4736	autorest.Response `json:"-"`
4737	// FrontendIPConfigurationPropertiesFormat - Properties of the load balancer probe.
4738	*FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"`
4739	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
4740	Name *string `json:"name,omitempty"`
4741	// Etag - A unique read-only string that changes whenever the resource is updated.
4742	Etag *string `json:"etag,omitempty"`
4743	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
4744	Zones *[]string `json:"zones,omitempty"`
4745	// ID - Resource ID.
4746	ID *string `json:"id,omitempty"`
4747}
4748
4749// MarshalJSON is the custom marshaler for FrontendIPConfiguration.
4750func (fic FrontendIPConfiguration) MarshalJSON() ([]byte, error) {
4751	objectMap := make(map[string]interface{})
4752	if fic.FrontendIPConfigurationPropertiesFormat != nil {
4753		objectMap["properties"] = fic.FrontendIPConfigurationPropertiesFormat
4754	}
4755	if fic.Name != nil {
4756		objectMap["name"] = fic.Name
4757	}
4758	if fic.Etag != nil {
4759		objectMap["etag"] = fic.Etag
4760	}
4761	if fic.Zones != nil {
4762		objectMap["zones"] = fic.Zones
4763	}
4764	if fic.ID != nil {
4765		objectMap["id"] = fic.ID
4766	}
4767	return json.Marshal(objectMap)
4768}
4769
4770// UnmarshalJSON is the custom unmarshaler for FrontendIPConfiguration struct.
4771func (fic *FrontendIPConfiguration) UnmarshalJSON(body []byte) error {
4772	var m map[string]*json.RawMessage
4773	err := json.Unmarshal(body, &m)
4774	if err != nil {
4775		return err
4776	}
4777	for k, v := range m {
4778		switch k {
4779		case "properties":
4780			if v != nil {
4781				var frontendIPConfigurationPropertiesFormat FrontendIPConfigurationPropertiesFormat
4782				err = json.Unmarshal(*v, &frontendIPConfigurationPropertiesFormat)
4783				if err != nil {
4784					return err
4785				}
4786				fic.FrontendIPConfigurationPropertiesFormat = &frontendIPConfigurationPropertiesFormat
4787			}
4788		case "name":
4789			if v != nil {
4790				var name string
4791				err = json.Unmarshal(*v, &name)
4792				if err != nil {
4793					return err
4794				}
4795				fic.Name = &name
4796			}
4797		case "etag":
4798			if v != nil {
4799				var etag string
4800				err = json.Unmarshal(*v, &etag)
4801				if err != nil {
4802					return err
4803				}
4804				fic.Etag = &etag
4805			}
4806		case "zones":
4807			if v != nil {
4808				var zones []string
4809				err = json.Unmarshal(*v, &zones)
4810				if err != nil {
4811					return err
4812				}
4813				fic.Zones = &zones
4814			}
4815		case "id":
4816			if v != nil {
4817				var ID string
4818				err = json.Unmarshal(*v, &ID)
4819				if err != nil {
4820					return err
4821				}
4822				fic.ID = &ID
4823			}
4824		}
4825	}
4826
4827	return nil
4828}
4829
4830// FrontendIPConfigurationPropertiesFormat properties of Frontend IP Configuration of the load balancer.
4831type FrontendIPConfigurationPropertiesFormat struct {
4832	// InboundNatRules - READ-ONLY; Read only. Inbound rules URIs that use this frontend IP.
4833	InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"`
4834	// InboundNatPools - READ-ONLY; Read only. Inbound pools URIs that use this frontend IP.
4835	InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"`
4836	// OutboundNatRules - READ-ONLY; Read only. Outbound rules URIs that use this frontend IP.
4837	OutboundNatRules *[]SubResource `json:"outboundNatRules,omitempty"`
4838	// LoadBalancingRules - READ-ONLY; Gets load balancing rules URIs that use this frontend IP.
4839	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
4840	// PrivateIPAddress - The private IP address of the IP configuration.
4841	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
4842	// PrivateIPAllocationMethod - The Private IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
4843	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
4844	// Subnet - The reference of the subnet resource.
4845	Subnet *Subnet `json:"subnet,omitempty"`
4846	// PublicIPAddress - The reference of the Public IP resource.
4847	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
4848	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
4849	ProvisioningState *string `json:"provisioningState,omitempty"`
4850}
4851
4852// MarshalJSON is the custom marshaler for FrontendIPConfigurationPropertiesFormat.
4853func (ficpf FrontendIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
4854	objectMap := make(map[string]interface{})
4855	if ficpf.PrivateIPAddress != nil {
4856		objectMap["privateIPAddress"] = ficpf.PrivateIPAddress
4857	}
4858	if ficpf.PrivateIPAllocationMethod != "" {
4859		objectMap["privateIPAllocationMethod"] = ficpf.PrivateIPAllocationMethod
4860	}
4861	if ficpf.Subnet != nil {
4862		objectMap["subnet"] = ficpf.Subnet
4863	}
4864	if ficpf.PublicIPAddress != nil {
4865		objectMap["publicIPAddress"] = ficpf.PublicIPAddress
4866	}
4867	if ficpf.ProvisioningState != nil {
4868		objectMap["provisioningState"] = ficpf.ProvisioningState
4869	}
4870	return json.Marshal(objectMap)
4871}
4872
4873// GatewayRoute gateway routing details
4874type GatewayRoute struct {
4875	// LocalAddress - READ-ONLY; The gateway's local address
4876	LocalAddress *string `json:"localAddress,omitempty"`
4877	// NetworkProperty - READ-ONLY; The route's network prefix
4878	NetworkProperty *string `json:"network,omitempty"`
4879	// NextHop - READ-ONLY; The route's next hop
4880	NextHop *string `json:"nextHop,omitempty"`
4881	// SourcePeer - READ-ONLY; The peer this route was learned from
4882	SourcePeer *string `json:"sourcePeer,omitempty"`
4883	// Origin - READ-ONLY; The source this route was learned from
4884	Origin *string `json:"origin,omitempty"`
4885	// AsPath - READ-ONLY; The route's AS path sequence
4886	AsPath *string `json:"asPath,omitempty"`
4887	// Weight - READ-ONLY; The route's weight
4888	Weight *int32 `json:"weight,omitempty"`
4889}
4890
4891// GatewayRouteListResult list of virtual network gateway routes
4892type GatewayRouteListResult struct {
4893	autorest.Response `json:"-"`
4894	// Value - List of gateway routes
4895	Value *[]GatewayRoute `json:"value,omitempty"`
4896}
4897
4898// InboundNatPool inbound NAT pool of the load balancer.
4899type InboundNatPool struct {
4900	// InboundNatPoolPropertiesFormat - Properties of load balancer inbound nat pool.
4901	*InboundNatPoolPropertiesFormat `json:"properties,omitempty"`
4902	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
4903	Name *string `json:"name,omitempty"`
4904	// Etag - A unique read-only string that changes whenever the resource is updated.
4905	Etag *string `json:"etag,omitempty"`
4906	// ID - Resource ID.
4907	ID *string `json:"id,omitempty"`
4908}
4909
4910// MarshalJSON is the custom marshaler for InboundNatPool.
4911func (inp InboundNatPool) MarshalJSON() ([]byte, error) {
4912	objectMap := make(map[string]interface{})
4913	if inp.InboundNatPoolPropertiesFormat != nil {
4914		objectMap["properties"] = inp.InboundNatPoolPropertiesFormat
4915	}
4916	if inp.Name != nil {
4917		objectMap["name"] = inp.Name
4918	}
4919	if inp.Etag != nil {
4920		objectMap["etag"] = inp.Etag
4921	}
4922	if inp.ID != nil {
4923		objectMap["id"] = inp.ID
4924	}
4925	return json.Marshal(objectMap)
4926}
4927
4928// UnmarshalJSON is the custom unmarshaler for InboundNatPool struct.
4929func (inp *InboundNatPool) UnmarshalJSON(body []byte) error {
4930	var m map[string]*json.RawMessage
4931	err := json.Unmarshal(body, &m)
4932	if err != nil {
4933		return err
4934	}
4935	for k, v := range m {
4936		switch k {
4937		case "properties":
4938			if v != nil {
4939				var inboundNatPoolPropertiesFormat InboundNatPoolPropertiesFormat
4940				err = json.Unmarshal(*v, &inboundNatPoolPropertiesFormat)
4941				if err != nil {
4942					return err
4943				}
4944				inp.InboundNatPoolPropertiesFormat = &inboundNatPoolPropertiesFormat
4945			}
4946		case "name":
4947			if v != nil {
4948				var name string
4949				err = json.Unmarshal(*v, &name)
4950				if err != nil {
4951					return err
4952				}
4953				inp.Name = &name
4954			}
4955		case "etag":
4956			if v != nil {
4957				var etag string
4958				err = json.Unmarshal(*v, &etag)
4959				if err != nil {
4960					return err
4961				}
4962				inp.Etag = &etag
4963			}
4964		case "id":
4965			if v != nil {
4966				var ID string
4967				err = json.Unmarshal(*v, &ID)
4968				if err != nil {
4969					return err
4970				}
4971				inp.ID = &ID
4972			}
4973		}
4974	}
4975
4976	return nil
4977}
4978
4979// InboundNatPoolPropertiesFormat properties of Inbound NAT pool.
4980type InboundNatPoolPropertiesFormat struct {
4981	// FrontendIPConfiguration - A reference to frontend IP addresses.
4982	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
4983	// Protocol - The transport protocol for the endpoint. Possible values are: 'Udp' or 'Tcp'. Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP'
4984	Protocol TransportProtocol `json:"protocol,omitempty"`
4985	// 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.
4986	FrontendPortRangeStart *int32 `json:"frontendPortRangeStart,omitempty"`
4987	// 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.
4988	FrontendPortRangeEnd *int32 `json:"frontendPortRangeEnd,omitempty"`
4989	// BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 1 and 65535.
4990	BackendPort *int32 `json:"backendPort,omitempty"`
4991	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
4992	ProvisioningState *string `json:"provisioningState,omitempty"`
4993}
4994
4995// InboundNatRule inbound NAT rule of the load balancer.
4996type InboundNatRule struct {
4997	autorest.Response `json:"-"`
4998	// InboundNatRulePropertiesFormat - Properties of load balancer inbound nat rule.
4999	*InboundNatRulePropertiesFormat `json:"properties,omitempty"`
5000	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
5001	Name *string `json:"name,omitempty"`
5002	// Etag - A unique read-only string that changes whenever the resource is updated.
5003	Etag *string `json:"etag,omitempty"`
5004	// ID - Resource ID.
5005	ID *string `json:"id,omitempty"`
5006}
5007
5008// MarshalJSON is the custom marshaler for InboundNatRule.
5009func (inr InboundNatRule) MarshalJSON() ([]byte, error) {
5010	objectMap := make(map[string]interface{})
5011	if inr.InboundNatRulePropertiesFormat != nil {
5012		objectMap["properties"] = inr.InboundNatRulePropertiesFormat
5013	}
5014	if inr.Name != nil {
5015		objectMap["name"] = inr.Name
5016	}
5017	if inr.Etag != nil {
5018		objectMap["etag"] = inr.Etag
5019	}
5020	if inr.ID != nil {
5021		objectMap["id"] = inr.ID
5022	}
5023	return json.Marshal(objectMap)
5024}
5025
5026// UnmarshalJSON is the custom unmarshaler for InboundNatRule struct.
5027func (inr *InboundNatRule) UnmarshalJSON(body []byte) error {
5028	var m map[string]*json.RawMessage
5029	err := json.Unmarshal(body, &m)
5030	if err != nil {
5031		return err
5032	}
5033	for k, v := range m {
5034		switch k {
5035		case "properties":
5036			if v != nil {
5037				var inboundNatRulePropertiesFormat InboundNatRulePropertiesFormat
5038				err = json.Unmarshal(*v, &inboundNatRulePropertiesFormat)
5039				if err != nil {
5040					return err
5041				}
5042				inr.InboundNatRulePropertiesFormat = &inboundNatRulePropertiesFormat
5043			}
5044		case "name":
5045			if v != nil {
5046				var name string
5047				err = json.Unmarshal(*v, &name)
5048				if err != nil {
5049					return err
5050				}
5051				inr.Name = &name
5052			}
5053		case "etag":
5054			if v != nil {
5055				var etag string
5056				err = json.Unmarshal(*v, &etag)
5057				if err != nil {
5058					return err
5059				}
5060				inr.Etag = &etag
5061			}
5062		case "id":
5063			if v != nil {
5064				var ID string
5065				err = json.Unmarshal(*v, &ID)
5066				if err != nil {
5067					return err
5068				}
5069				inr.ID = &ID
5070			}
5071		}
5072	}
5073
5074	return nil
5075}
5076
5077// InboundNatRuleListResult response for ListInboundNatRule API service call.
5078type InboundNatRuleListResult struct {
5079	autorest.Response `json:"-"`
5080	// Value - A list of inbound nat rules in a load balancer.
5081	Value *[]InboundNatRule `json:"value,omitempty"`
5082	// NextLink - READ-ONLY; The URL to get the next set of results.
5083	NextLink *string `json:"nextLink,omitempty"`
5084}
5085
5086// MarshalJSON is the custom marshaler for InboundNatRuleListResult.
5087func (inrlr InboundNatRuleListResult) MarshalJSON() ([]byte, error) {
5088	objectMap := make(map[string]interface{})
5089	if inrlr.Value != nil {
5090		objectMap["value"] = inrlr.Value
5091	}
5092	return json.Marshal(objectMap)
5093}
5094
5095// InboundNatRuleListResultIterator provides access to a complete listing of InboundNatRule values.
5096type InboundNatRuleListResultIterator struct {
5097	i    int
5098	page InboundNatRuleListResultPage
5099}
5100
5101// NextWithContext advances to the next value.  If there was an error making
5102// the request the iterator does not advance and the error is returned.
5103func (iter *InboundNatRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
5104	if tracing.IsEnabled() {
5105		ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultIterator.NextWithContext")
5106		defer func() {
5107			sc := -1
5108			if iter.Response().Response.Response != nil {
5109				sc = iter.Response().Response.Response.StatusCode
5110			}
5111			tracing.EndSpan(ctx, sc, err)
5112		}()
5113	}
5114	iter.i++
5115	if iter.i < len(iter.page.Values()) {
5116		return nil
5117	}
5118	err = iter.page.NextWithContext(ctx)
5119	if err != nil {
5120		iter.i--
5121		return err
5122	}
5123	iter.i = 0
5124	return nil
5125}
5126
5127// Next advances to the next value.  If there was an error making
5128// the request the iterator does not advance and the error is returned.
5129// Deprecated: Use NextWithContext() instead.
5130func (iter *InboundNatRuleListResultIterator) Next() error {
5131	return iter.NextWithContext(context.Background())
5132}
5133
5134// NotDone returns true if the enumeration should be started or is not yet complete.
5135func (iter InboundNatRuleListResultIterator) NotDone() bool {
5136	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5137}
5138
5139// Response returns the raw server response from the last page request.
5140func (iter InboundNatRuleListResultIterator) Response() InboundNatRuleListResult {
5141	return iter.page.Response()
5142}
5143
5144// Value returns the current value or a zero-initialized value if the
5145// iterator has advanced beyond the end of the collection.
5146func (iter InboundNatRuleListResultIterator) Value() InboundNatRule {
5147	if !iter.page.NotDone() {
5148		return InboundNatRule{}
5149	}
5150	return iter.page.Values()[iter.i]
5151}
5152
5153// Creates a new instance of the InboundNatRuleListResultIterator type.
5154func NewInboundNatRuleListResultIterator(page InboundNatRuleListResultPage) InboundNatRuleListResultIterator {
5155	return InboundNatRuleListResultIterator{page: page}
5156}
5157
5158// IsEmpty returns true if the ListResult contains no values.
5159func (inrlr InboundNatRuleListResult) IsEmpty() bool {
5160	return inrlr.Value == nil || len(*inrlr.Value) == 0
5161}
5162
5163// hasNextLink returns true if the NextLink is not empty.
5164func (inrlr InboundNatRuleListResult) hasNextLink() bool {
5165	return inrlr.NextLink != nil && len(*inrlr.NextLink) != 0
5166}
5167
5168// inboundNatRuleListResultPreparer prepares a request to retrieve the next set of results.
5169// It returns nil if no more results exist.
5170func (inrlr InboundNatRuleListResult) inboundNatRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
5171	if !inrlr.hasNextLink() {
5172		return nil, nil
5173	}
5174	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5175		autorest.AsJSON(),
5176		autorest.AsGet(),
5177		autorest.WithBaseURL(to.String(inrlr.NextLink)))
5178}
5179
5180// InboundNatRuleListResultPage contains a page of InboundNatRule values.
5181type InboundNatRuleListResultPage struct {
5182	fn    func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)
5183	inrlr InboundNatRuleListResult
5184}
5185
5186// NextWithContext advances to the next page of values.  If there was an error making
5187// the request the page does not advance and the error is returned.
5188func (page *InboundNatRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
5189	if tracing.IsEnabled() {
5190		ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultPage.NextWithContext")
5191		defer func() {
5192			sc := -1
5193			if page.Response().Response.Response != nil {
5194				sc = page.Response().Response.Response.StatusCode
5195			}
5196			tracing.EndSpan(ctx, sc, err)
5197		}()
5198	}
5199	for {
5200		next, err := page.fn(ctx, page.inrlr)
5201		if err != nil {
5202			return err
5203		}
5204		page.inrlr = next
5205		if !next.hasNextLink() || !next.IsEmpty() {
5206			break
5207		}
5208	}
5209	return nil
5210}
5211
5212// Next advances to the next page of values.  If there was an error making
5213// the request the page does not advance and the error is returned.
5214// Deprecated: Use NextWithContext() instead.
5215func (page *InboundNatRuleListResultPage) Next() error {
5216	return page.NextWithContext(context.Background())
5217}
5218
5219// NotDone returns true if the page enumeration should be started or is not yet complete.
5220func (page InboundNatRuleListResultPage) NotDone() bool {
5221	return !page.inrlr.IsEmpty()
5222}
5223
5224// Response returns the raw server response from the last page request.
5225func (page InboundNatRuleListResultPage) Response() InboundNatRuleListResult {
5226	return page.inrlr
5227}
5228
5229// Values returns the slice of values for the current page or nil if there are no values.
5230func (page InboundNatRuleListResultPage) Values() []InboundNatRule {
5231	if page.inrlr.IsEmpty() {
5232		return nil
5233	}
5234	return *page.inrlr.Value
5235}
5236
5237// Creates a new instance of the InboundNatRuleListResultPage type.
5238func NewInboundNatRuleListResultPage(cur InboundNatRuleListResult, getNextPage func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)) InboundNatRuleListResultPage {
5239	return InboundNatRuleListResultPage{
5240		fn:    getNextPage,
5241		inrlr: cur,
5242	}
5243}
5244
5245// InboundNatRulePropertiesFormat properties of the inbound NAT rule.
5246type InboundNatRulePropertiesFormat struct {
5247	// FrontendIPConfiguration - A reference to frontend IP addresses.
5248	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
5249	// 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.
5250	BackendIPConfiguration *InterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"`
5251	// Protocol - The transport protocol for the endpoint. Possible values are: 'Udp' or 'Tcp'. Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP'
5252	Protocol TransportProtocol `json:"protocol,omitempty"`
5253	// 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.
5254	FrontendPort *int32 `json:"frontendPort,omitempty"`
5255	// BackendPort - The port used for the internal endpoint. Acceptable values range from 1 to 65535.
5256	BackendPort *int32 `json:"backendPort,omitempty"`
5257	// 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.
5258	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
5259	// 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.
5260	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
5261	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
5262	ProvisioningState *string `json:"provisioningState,omitempty"`
5263}
5264
5265// MarshalJSON is the custom marshaler for InboundNatRulePropertiesFormat.
5266func (inrpf InboundNatRulePropertiesFormat) MarshalJSON() ([]byte, error) {
5267	objectMap := make(map[string]interface{})
5268	if inrpf.FrontendIPConfiguration != nil {
5269		objectMap["frontendIPConfiguration"] = inrpf.FrontendIPConfiguration
5270	}
5271	if inrpf.Protocol != "" {
5272		objectMap["protocol"] = inrpf.Protocol
5273	}
5274	if inrpf.FrontendPort != nil {
5275		objectMap["frontendPort"] = inrpf.FrontendPort
5276	}
5277	if inrpf.BackendPort != nil {
5278		objectMap["backendPort"] = inrpf.BackendPort
5279	}
5280	if inrpf.IdleTimeoutInMinutes != nil {
5281		objectMap["idleTimeoutInMinutes"] = inrpf.IdleTimeoutInMinutes
5282	}
5283	if inrpf.EnableFloatingIP != nil {
5284		objectMap["enableFloatingIP"] = inrpf.EnableFloatingIP
5285	}
5286	if inrpf.ProvisioningState != nil {
5287		objectMap["provisioningState"] = inrpf.ProvisioningState
5288	}
5289	return json.Marshal(objectMap)
5290}
5291
5292// InboundNatRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
5293// long-running operation.
5294type InboundNatRulesCreateOrUpdateFuture struct {
5295	azure.FutureAPI
5296	// Result returns the result of the asynchronous operation.
5297	// If the operation has not completed it will return an error.
5298	Result func(InboundNatRulesClient) (InboundNatRule, error)
5299}
5300
5301// InboundNatRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
5302// operation.
5303type InboundNatRulesDeleteFuture struct {
5304	azure.FutureAPI
5305	// Result returns the result of the asynchronous operation.
5306	// If the operation has not completed it will return an error.
5307	Result func(InboundNatRulesClient) (autorest.Response, error)
5308}
5309
5310// Interface a network interface in a resource group.
5311type Interface struct {
5312	autorest.Response `json:"-"`
5313	// InterfacePropertiesFormat - Properties of the network interface.
5314	*InterfacePropertiesFormat `json:"properties,omitempty"`
5315	// Etag - A unique read-only string that changes whenever the resource is updated.
5316	Etag *string `json:"etag,omitempty"`
5317	// ID - Resource ID.
5318	ID *string `json:"id,omitempty"`
5319	// Name - READ-ONLY; Resource name.
5320	Name *string `json:"name,omitempty"`
5321	// Type - READ-ONLY; Resource type.
5322	Type *string `json:"type,omitempty"`
5323	// Location - Resource location.
5324	Location *string `json:"location,omitempty"`
5325	// Tags - Resource tags.
5326	Tags map[string]*string `json:"tags"`
5327}
5328
5329// MarshalJSON is the custom marshaler for Interface.
5330func (i Interface) MarshalJSON() ([]byte, error) {
5331	objectMap := make(map[string]interface{})
5332	if i.InterfacePropertiesFormat != nil {
5333		objectMap["properties"] = i.InterfacePropertiesFormat
5334	}
5335	if i.Etag != nil {
5336		objectMap["etag"] = i.Etag
5337	}
5338	if i.ID != nil {
5339		objectMap["id"] = i.ID
5340	}
5341	if i.Location != nil {
5342		objectMap["location"] = i.Location
5343	}
5344	if i.Tags != nil {
5345		objectMap["tags"] = i.Tags
5346	}
5347	return json.Marshal(objectMap)
5348}
5349
5350// UnmarshalJSON is the custom unmarshaler for Interface struct.
5351func (i *Interface) UnmarshalJSON(body []byte) error {
5352	var m map[string]*json.RawMessage
5353	err := json.Unmarshal(body, &m)
5354	if err != nil {
5355		return err
5356	}
5357	for k, v := range m {
5358		switch k {
5359		case "properties":
5360			if v != nil {
5361				var interfacePropertiesFormat InterfacePropertiesFormat
5362				err = json.Unmarshal(*v, &interfacePropertiesFormat)
5363				if err != nil {
5364					return err
5365				}
5366				i.InterfacePropertiesFormat = &interfacePropertiesFormat
5367			}
5368		case "etag":
5369			if v != nil {
5370				var etag string
5371				err = json.Unmarshal(*v, &etag)
5372				if err != nil {
5373					return err
5374				}
5375				i.Etag = &etag
5376			}
5377		case "id":
5378			if v != nil {
5379				var ID string
5380				err = json.Unmarshal(*v, &ID)
5381				if err != nil {
5382					return err
5383				}
5384				i.ID = &ID
5385			}
5386		case "name":
5387			if v != nil {
5388				var name string
5389				err = json.Unmarshal(*v, &name)
5390				if err != nil {
5391					return err
5392				}
5393				i.Name = &name
5394			}
5395		case "type":
5396			if v != nil {
5397				var typeVar string
5398				err = json.Unmarshal(*v, &typeVar)
5399				if err != nil {
5400					return err
5401				}
5402				i.Type = &typeVar
5403			}
5404		case "location":
5405			if v != nil {
5406				var location string
5407				err = json.Unmarshal(*v, &location)
5408				if err != nil {
5409					return err
5410				}
5411				i.Location = &location
5412			}
5413		case "tags":
5414			if v != nil {
5415				var tags map[string]*string
5416				err = json.Unmarshal(*v, &tags)
5417				if err != nil {
5418					return err
5419				}
5420				i.Tags = tags
5421			}
5422		}
5423	}
5424
5425	return nil
5426}
5427
5428// InterfaceAssociation network interface and its custom security rules.
5429type InterfaceAssociation struct {
5430	// ID - READ-ONLY; Network interface ID.
5431	ID *string `json:"id,omitempty"`
5432	// SecurityRules - Collection of custom security rules.
5433	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
5434}
5435
5436// MarshalJSON is the custom marshaler for InterfaceAssociation.
5437func (ia InterfaceAssociation) MarshalJSON() ([]byte, error) {
5438	objectMap := make(map[string]interface{})
5439	if ia.SecurityRules != nil {
5440		objectMap["securityRules"] = ia.SecurityRules
5441	}
5442	return json.Marshal(objectMap)
5443}
5444
5445// InterfaceDNSSettings DNS settings of a network interface.
5446type InterfaceDNSSettings struct {
5447	// 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.
5448	DNSServers *[]string `json:"dnsServers,omitempty"`
5449	// 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.
5450	AppliedDNSServers *[]string `json:"appliedDnsServers,omitempty"`
5451	// InternalDNSNameLabel - Relative DNS name for this NIC used for internal communications between VMs in the same virtual network.
5452	InternalDNSNameLabel *string `json:"internalDnsNameLabel,omitempty"`
5453	// InternalFqdn - Fully qualified DNS name supporting internal communications between VMs in the same virtual network.
5454	InternalFqdn *string `json:"internalFqdn,omitempty"`
5455	// 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.
5456	InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"`
5457}
5458
5459// InterfaceIPConfiguration iPConfiguration in a network interface.
5460type InterfaceIPConfiguration struct {
5461	autorest.Response `json:"-"`
5462	// InterfaceIPConfigurationPropertiesFormat - Network interface IP configuration properties.
5463	*InterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"`
5464	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
5465	Name *string `json:"name,omitempty"`
5466	// Etag - A unique read-only string that changes whenever the resource is updated.
5467	Etag *string `json:"etag,omitempty"`
5468	// ID - Resource ID.
5469	ID *string `json:"id,omitempty"`
5470}
5471
5472// MarshalJSON is the custom marshaler for InterfaceIPConfiguration.
5473func (iic InterfaceIPConfiguration) MarshalJSON() ([]byte, error) {
5474	objectMap := make(map[string]interface{})
5475	if iic.InterfaceIPConfigurationPropertiesFormat != nil {
5476		objectMap["properties"] = iic.InterfaceIPConfigurationPropertiesFormat
5477	}
5478	if iic.Name != nil {
5479		objectMap["name"] = iic.Name
5480	}
5481	if iic.Etag != nil {
5482		objectMap["etag"] = iic.Etag
5483	}
5484	if iic.ID != nil {
5485		objectMap["id"] = iic.ID
5486	}
5487	return json.Marshal(objectMap)
5488}
5489
5490// UnmarshalJSON is the custom unmarshaler for InterfaceIPConfiguration struct.
5491func (iic *InterfaceIPConfiguration) UnmarshalJSON(body []byte) error {
5492	var m map[string]*json.RawMessage
5493	err := json.Unmarshal(body, &m)
5494	if err != nil {
5495		return err
5496	}
5497	for k, v := range m {
5498		switch k {
5499		case "properties":
5500			if v != nil {
5501				var interfaceIPConfigurationPropertiesFormat InterfaceIPConfigurationPropertiesFormat
5502				err = json.Unmarshal(*v, &interfaceIPConfigurationPropertiesFormat)
5503				if err != nil {
5504					return err
5505				}
5506				iic.InterfaceIPConfigurationPropertiesFormat = &interfaceIPConfigurationPropertiesFormat
5507			}
5508		case "name":
5509			if v != nil {
5510				var name string
5511				err = json.Unmarshal(*v, &name)
5512				if err != nil {
5513					return err
5514				}
5515				iic.Name = &name
5516			}
5517		case "etag":
5518			if v != nil {
5519				var etag string
5520				err = json.Unmarshal(*v, &etag)
5521				if err != nil {
5522					return err
5523				}
5524				iic.Etag = &etag
5525			}
5526		case "id":
5527			if v != nil {
5528				var ID string
5529				err = json.Unmarshal(*v, &ID)
5530				if err != nil {
5531					return err
5532				}
5533				iic.ID = &ID
5534			}
5535		}
5536	}
5537
5538	return nil
5539}
5540
5541// InterfaceIPConfigurationListResult response for list ip configurations API service call.
5542type InterfaceIPConfigurationListResult struct {
5543	autorest.Response `json:"-"`
5544	// Value - A list of ip configurations.
5545	Value *[]InterfaceIPConfiguration `json:"value,omitempty"`
5546	// NextLink - READ-ONLY; The URL to get the next set of results.
5547	NextLink *string `json:"nextLink,omitempty"`
5548}
5549
5550// MarshalJSON is the custom marshaler for InterfaceIPConfigurationListResult.
5551func (iiclr InterfaceIPConfigurationListResult) MarshalJSON() ([]byte, error) {
5552	objectMap := make(map[string]interface{})
5553	if iiclr.Value != nil {
5554		objectMap["value"] = iiclr.Value
5555	}
5556	return json.Marshal(objectMap)
5557}
5558
5559// InterfaceIPConfigurationListResultIterator provides access to a complete listing of
5560// InterfaceIPConfiguration values.
5561type InterfaceIPConfigurationListResultIterator struct {
5562	i    int
5563	page InterfaceIPConfigurationListResultPage
5564}
5565
5566// NextWithContext advances to the next value.  If there was an error making
5567// the request the iterator does not advance and the error is returned.
5568func (iter *InterfaceIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
5569	if tracing.IsEnabled() {
5570		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultIterator.NextWithContext")
5571		defer func() {
5572			sc := -1
5573			if iter.Response().Response.Response != nil {
5574				sc = iter.Response().Response.Response.StatusCode
5575			}
5576			tracing.EndSpan(ctx, sc, err)
5577		}()
5578	}
5579	iter.i++
5580	if iter.i < len(iter.page.Values()) {
5581		return nil
5582	}
5583	err = iter.page.NextWithContext(ctx)
5584	if err != nil {
5585		iter.i--
5586		return err
5587	}
5588	iter.i = 0
5589	return nil
5590}
5591
5592// Next advances to the next value.  If there was an error making
5593// the request the iterator does not advance and the error is returned.
5594// Deprecated: Use NextWithContext() instead.
5595func (iter *InterfaceIPConfigurationListResultIterator) Next() error {
5596	return iter.NextWithContext(context.Background())
5597}
5598
5599// NotDone returns true if the enumeration should be started or is not yet complete.
5600func (iter InterfaceIPConfigurationListResultIterator) NotDone() bool {
5601	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5602}
5603
5604// Response returns the raw server response from the last page request.
5605func (iter InterfaceIPConfigurationListResultIterator) Response() InterfaceIPConfigurationListResult {
5606	return iter.page.Response()
5607}
5608
5609// Value returns the current value or a zero-initialized value if the
5610// iterator has advanced beyond the end of the collection.
5611func (iter InterfaceIPConfigurationListResultIterator) Value() InterfaceIPConfiguration {
5612	if !iter.page.NotDone() {
5613		return InterfaceIPConfiguration{}
5614	}
5615	return iter.page.Values()[iter.i]
5616}
5617
5618// Creates a new instance of the InterfaceIPConfigurationListResultIterator type.
5619func NewInterfaceIPConfigurationListResultIterator(page InterfaceIPConfigurationListResultPage) InterfaceIPConfigurationListResultIterator {
5620	return InterfaceIPConfigurationListResultIterator{page: page}
5621}
5622
5623// IsEmpty returns true if the ListResult contains no values.
5624func (iiclr InterfaceIPConfigurationListResult) IsEmpty() bool {
5625	return iiclr.Value == nil || len(*iiclr.Value) == 0
5626}
5627
5628// hasNextLink returns true if the NextLink is not empty.
5629func (iiclr InterfaceIPConfigurationListResult) hasNextLink() bool {
5630	return iiclr.NextLink != nil && len(*iiclr.NextLink) != 0
5631}
5632
5633// interfaceIPConfigurationListResultPreparer prepares a request to retrieve the next set of results.
5634// It returns nil if no more results exist.
5635func (iiclr InterfaceIPConfigurationListResult) interfaceIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
5636	if !iiclr.hasNextLink() {
5637		return nil, nil
5638	}
5639	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5640		autorest.AsJSON(),
5641		autorest.AsGet(),
5642		autorest.WithBaseURL(to.String(iiclr.NextLink)))
5643}
5644
5645// InterfaceIPConfigurationListResultPage contains a page of InterfaceIPConfiguration values.
5646type InterfaceIPConfigurationListResultPage struct {
5647	fn    func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)
5648	iiclr InterfaceIPConfigurationListResult
5649}
5650
5651// NextWithContext advances to the next page of values.  If there was an error making
5652// the request the page does not advance and the error is returned.
5653func (page *InterfaceIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
5654	if tracing.IsEnabled() {
5655		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultPage.NextWithContext")
5656		defer func() {
5657			sc := -1
5658			if page.Response().Response.Response != nil {
5659				sc = page.Response().Response.Response.StatusCode
5660			}
5661			tracing.EndSpan(ctx, sc, err)
5662		}()
5663	}
5664	for {
5665		next, err := page.fn(ctx, page.iiclr)
5666		if err != nil {
5667			return err
5668		}
5669		page.iiclr = next
5670		if !next.hasNextLink() || !next.IsEmpty() {
5671			break
5672		}
5673	}
5674	return nil
5675}
5676
5677// Next advances to the next page of values.  If there was an error making
5678// the request the page does not advance and the error is returned.
5679// Deprecated: Use NextWithContext() instead.
5680func (page *InterfaceIPConfigurationListResultPage) Next() error {
5681	return page.NextWithContext(context.Background())
5682}
5683
5684// NotDone returns true if the page enumeration should be started or is not yet complete.
5685func (page InterfaceIPConfigurationListResultPage) NotDone() bool {
5686	return !page.iiclr.IsEmpty()
5687}
5688
5689// Response returns the raw server response from the last page request.
5690func (page InterfaceIPConfigurationListResultPage) Response() InterfaceIPConfigurationListResult {
5691	return page.iiclr
5692}
5693
5694// Values returns the slice of values for the current page or nil if there are no values.
5695func (page InterfaceIPConfigurationListResultPage) Values() []InterfaceIPConfiguration {
5696	if page.iiclr.IsEmpty() {
5697		return nil
5698	}
5699	return *page.iiclr.Value
5700}
5701
5702// Creates a new instance of the InterfaceIPConfigurationListResultPage type.
5703func NewInterfaceIPConfigurationListResultPage(cur InterfaceIPConfigurationListResult, getNextPage func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)) InterfaceIPConfigurationListResultPage {
5704	return InterfaceIPConfigurationListResultPage{
5705		fn:    getNextPage,
5706		iiclr: cur,
5707	}
5708}
5709
5710// InterfaceIPConfigurationPropertiesFormat properties of IP configuration.
5711type InterfaceIPConfigurationPropertiesFormat struct {
5712	// ApplicationGatewayBackendAddressPools - The reference of ApplicationGatewayBackendAddressPool resource.
5713	ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"`
5714	// LoadBalancerBackendAddressPools - The reference of LoadBalancerBackendAddressPool resource.
5715	LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"`
5716	// LoadBalancerInboundNatRules - A list of references of LoadBalancerInboundNatRules.
5717	LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"`
5718	// PrivateIPAddress - Private IP address of the IP configuration.
5719	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
5720	// PrivateIPAllocationMethod - Defines how a private IP address is assigned. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
5721	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
5722	// 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'
5723	PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
5724	// Subnet - Subnet bound to the IP configuration.
5725	Subnet *Subnet `json:"subnet,omitempty"`
5726	// Primary - Gets whether this is a primary customer address on the network interface.
5727	Primary *bool `json:"primary,omitempty"`
5728	// PublicIPAddress - Public IP address bound to the IP configuration.
5729	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
5730	// ProvisioningState - The provisioning state of the network interface IP configuration. Possible values are: 'Updating', 'Deleting', and 'Failed'.
5731	ProvisioningState *string `json:"provisioningState,omitempty"`
5732}
5733
5734// InterfaceListResult response for the ListNetworkInterface API service call.
5735type InterfaceListResult struct {
5736	autorest.Response `json:"-"`
5737	// Value - A list of network interfaces in a resource group.
5738	Value *[]Interface `json:"value,omitempty"`
5739	// NextLink - READ-ONLY; The URL to get the next set of results.
5740	NextLink *string `json:"nextLink,omitempty"`
5741}
5742
5743// MarshalJSON is the custom marshaler for InterfaceListResult.
5744func (ilr InterfaceListResult) MarshalJSON() ([]byte, error) {
5745	objectMap := make(map[string]interface{})
5746	if ilr.Value != nil {
5747		objectMap["value"] = ilr.Value
5748	}
5749	return json.Marshal(objectMap)
5750}
5751
5752// InterfaceListResultIterator provides access to a complete listing of Interface values.
5753type InterfaceListResultIterator struct {
5754	i    int
5755	page InterfaceListResultPage
5756}
5757
5758// NextWithContext advances to the next value.  If there was an error making
5759// the request the iterator does not advance and the error is returned.
5760func (iter *InterfaceListResultIterator) NextWithContext(ctx context.Context) (err error) {
5761	if tracing.IsEnabled() {
5762		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultIterator.NextWithContext")
5763		defer func() {
5764			sc := -1
5765			if iter.Response().Response.Response != nil {
5766				sc = iter.Response().Response.Response.StatusCode
5767			}
5768			tracing.EndSpan(ctx, sc, err)
5769		}()
5770	}
5771	iter.i++
5772	if iter.i < len(iter.page.Values()) {
5773		return nil
5774	}
5775	err = iter.page.NextWithContext(ctx)
5776	if err != nil {
5777		iter.i--
5778		return err
5779	}
5780	iter.i = 0
5781	return nil
5782}
5783
5784// Next advances to the next value.  If there was an error making
5785// the request the iterator does not advance and the error is returned.
5786// Deprecated: Use NextWithContext() instead.
5787func (iter *InterfaceListResultIterator) Next() error {
5788	return iter.NextWithContext(context.Background())
5789}
5790
5791// NotDone returns true if the enumeration should be started or is not yet complete.
5792func (iter InterfaceListResultIterator) NotDone() bool {
5793	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5794}
5795
5796// Response returns the raw server response from the last page request.
5797func (iter InterfaceListResultIterator) Response() InterfaceListResult {
5798	return iter.page.Response()
5799}
5800
5801// Value returns the current value or a zero-initialized value if the
5802// iterator has advanced beyond the end of the collection.
5803func (iter InterfaceListResultIterator) Value() Interface {
5804	if !iter.page.NotDone() {
5805		return Interface{}
5806	}
5807	return iter.page.Values()[iter.i]
5808}
5809
5810// Creates a new instance of the InterfaceListResultIterator type.
5811func NewInterfaceListResultIterator(page InterfaceListResultPage) InterfaceListResultIterator {
5812	return InterfaceListResultIterator{page: page}
5813}
5814
5815// IsEmpty returns true if the ListResult contains no values.
5816func (ilr InterfaceListResult) IsEmpty() bool {
5817	return ilr.Value == nil || len(*ilr.Value) == 0
5818}
5819
5820// hasNextLink returns true if the NextLink is not empty.
5821func (ilr InterfaceListResult) hasNextLink() bool {
5822	return ilr.NextLink != nil && len(*ilr.NextLink) != 0
5823}
5824
5825// interfaceListResultPreparer prepares a request to retrieve the next set of results.
5826// It returns nil if no more results exist.
5827func (ilr InterfaceListResult) interfaceListResultPreparer(ctx context.Context) (*http.Request, error) {
5828	if !ilr.hasNextLink() {
5829		return nil, nil
5830	}
5831	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5832		autorest.AsJSON(),
5833		autorest.AsGet(),
5834		autorest.WithBaseURL(to.String(ilr.NextLink)))
5835}
5836
5837// InterfaceListResultPage contains a page of Interface values.
5838type InterfaceListResultPage struct {
5839	fn  func(context.Context, InterfaceListResult) (InterfaceListResult, error)
5840	ilr InterfaceListResult
5841}
5842
5843// NextWithContext advances to the next page of values.  If there was an error making
5844// the request the page does not advance and the error is returned.
5845func (page *InterfaceListResultPage) NextWithContext(ctx context.Context) (err error) {
5846	if tracing.IsEnabled() {
5847		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultPage.NextWithContext")
5848		defer func() {
5849			sc := -1
5850			if page.Response().Response.Response != nil {
5851				sc = page.Response().Response.Response.StatusCode
5852			}
5853			tracing.EndSpan(ctx, sc, err)
5854		}()
5855	}
5856	for {
5857		next, err := page.fn(ctx, page.ilr)
5858		if err != nil {
5859			return err
5860		}
5861		page.ilr = next
5862		if !next.hasNextLink() || !next.IsEmpty() {
5863			break
5864		}
5865	}
5866	return nil
5867}
5868
5869// Next advances to the next page of values.  If there was an error making
5870// the request the page does not advance and the error is returned.
5871// Deprecated: Use NextWithContext() instead.
5872func (page *InterfaceListResultPage) Next() error {
5873	return page.NextWithContext(context.Background())
5874}
5875
5876// NotDone returns true if the page enumeration should be started or is not yet complete.
5877func (page InterfaceListResultPage) NotDone() bool {
5878	return !page.ilr.IsEmpty()
5879}
5880
5881// Response returns the raw server response from the last page request.
5882func (page InterfaceListResultPage) Response() InterfaceListResult {
5883	return page.ilr
5884}
5885
5886// Values returns the slice of values for the current page or nil if there are no values.
5887func (page InterfaceListResultPage) Values() []Interface {
5888	if page.ilr.IsEmpty() {
5889		return nil
5890	}
5891	return *page.ilr.Value
5892}
5893
5894// Creates a new instance of the InterfaceListResultPage type.
5895func NewInterfaceListResultPage(cur InterfaceListResult, getNextPage func(context.Context, InterfaceListResult) (InterfaceListResult, error)) InterfaceListResultPage {
5896	return InterfaceListResultPage{
5897		fn:  getNextPage,
5898		ilr: cur,
5899	}
5900}
5901
5902// InterfaceLoadBalancerListResult response for list ip configurations API service call.
5903type InterfaceLoadBalancerListResult struct {
5904	autorest.Response `json:"-"`
5905	// Value - A list of load balancers.
5906	Value *[]LoadBalancer `json:"value,omitempty"`
5907	// NextLink - READ-ONLY; The URL to get the next set of results.
5908	NextLink *string `json:"nextLink,omitempty"`
5909}
5910
5911// MarshalJSON is the custom marshaler for InterfaceLoadBalancerListResult.
5912func (ilblr InterfaceLoadBalancerListResult) MarshalJSON() ([]byte, error) {
5913	objectMap := make(map[string]interface{})
5914	if ilblr.Value != nil {
5915		objectMap["value"] = ilblr.Value
5916	}
5917	return json.Marshal(objectMap)
5918}
5919
5920// InterfaceLoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values.
5921type InterfaceLoadBalancerListResultIterator struct {
5922	i    int
5923	page InterfaceLoadBalancerListResultPage
5924}
5925
5926// NextWithContext advances to the next value.  If there was an error making
5927// the request the iterator does not advance and the error is returned.
5928func (iter *InterfaceLoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) {
5929	if tracing.IsEnabled() {
5930		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultIterator.NextWithContext")
5931		defer func() {
5932			sc := -1
5933			if iter.Response().Response.Response != nil {
5934				sc = iter.Response().Response.Response.StatusCode
5935			}
5936			tracing.EndSpan(ctx, sc, err)
5937		}()
5938	}
5939	iter.i++
5940	if iter.i < len(iter.page.Values()) {
5941		return nil
5942	}
5943	err = iter.page.NextWithContext(ctx)
5944	if err != nil {
5945		iter.i--
5946		return err
5947	}
5948	iter.i = 0
5949	return nil
5950}
5951
5952// Next advances to the next value.  If there was an error making
5953// the request the iterator does not advance and the error is returned.
5954// Deprecated: Use NextWithContext() instead.
5955func (iter *InterfaceLoadBalancerListResultIterator) Next() error {
5956	return iter.NextWithContext(context.Background())
5957}
5958
5959// NotDone returns true if the enumeration should be started or is not yet complete.
5960func (iter InterfaceLoadBalancerListResultIterator) NotDone() bool {
5961	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5962}
5963
5964// Response returns the raw server response from the last page request.
5965func (iter InterfaceLoadBalancerListResultIterator) Response() InterfaceLoadBalancerListResult {
5966	return iter.page.Response()
5967}
5968
5969// Value returns the current value or a zero-initialized value if the
5970// iterator has advanced beyond the end of the collection.
5971func (iter InterfaceLoadBalancerListResultIterator) Value() LoadBalancer {
5972	if !iter.page.NotDone() {
5973		return LoadBalancer{}
5974	}
5975	return iter.page.Values()[iter.i]
5976}
5977
5978// Creates a new instance of the InterfaceLoadBalancerListResultIterator type.
5979func NewInterfaceLoadBalancerListResultIterator(page InterfaceLoadBalancerListResultPage) InterfaceLoadBalancerListResultIterator {
5980	return InterfaceLoadBalancerListResultIterator{page: page}
5981}
5982
5983// IsEmpty returns true if the ListResult contains no values.
5984func (ilblr InterfaceLoadBalancerListResult) IsEmpty() bool {
5985	return ilblr.Value == nil || len(*ilblr.Value) == 0
5986}
5987
5988// hasNextLink returns true if the NextLink is not empty.
5989func (ilblr InterfaceLoadBalancerListResult) hasNextLink() bool {
5990	return ilblr.NextLink != nil && len(*ilblr.NextLink) != 0
5991}
5992
5993// interfaceLoadBalancerListResultPreparer prepares a request to retrieve the next set of results.
5994// It returns nil if no more results exist.
5995func (ilblr InterfaceLoadBalancerListResult) interfaceLoadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) {
5996	if !ilblr.hasNextLink() {
5997		return nil, nil
5998	}
5999	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6000		autorest.AsJSON(),
6001		autorest.AsGet(),
6002		autorest.WithBaseURL(to.String(ilblr.NextLink)))
6003}
6004
6005// InterfaceLoadBalancerListResultPage contains a page of LoadBalancer values.
6006type InterfaceLoadBalancerListResultPage struct {
6007	fn    func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)
6008	ilblr InterfaceLoadBalancerListResult
6009}
6010
6011// NextWithContext advances to the next page of values.  If there was an error making
6012// the request the page does not advance and the error is returned.
6013func (page *InterfaceLoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) {
6014	if tracing.IsEnabled() {
6015		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultPage.NextWithContext")
6016		defer func() {
6017			sc := -1
6018			if page.Response().Response.Response != nil {
6019				sc = page.Response().Response.Response.StatusCode
6020			}
6021			tracing.EndSpan(ctx, sc, err)
6022		}()
6023	}
6024	for {
6025		next, err := page.fn(ctx, page.ilblr)
6026		if err != nil {
6027			return err
6028		}
6029		page.ilblr = next
6030		if !next.hasNextLink() || !next.IsEmpty() {
6031			break
6032		}
6033	}
6034	return nil
6035}
6036
6037// Next advances to the next page of values.  If there was an error making
6038// the request the page does not advance and the error is returned.
6039// Deprecated: Use NextWithContext() instead.
6040func (page *InterfaceLoadBalancerListResultPage) Next() error {
6041	return page.NextWithContext(context.Background())
6042}
6043
6044// NotDone returns true if the page enumeration should be started or is not yet complete.
6045func (page InterfaceLoadBalancerListResultPage) NotDone() bool {
6046	return !page.ilblr.IsEmpty()
6047}
6048
6049// Response returns the raw server response from the last page request.
6050func (page InterfaceLoadBalancerListResultPage) Response() InterfaceLoadBalancerListResult {
6051	return page.ilblr
6052}
6053
6054// Values returns the slice of values for the current page or nil if there are no values.
6055func (page InterfaceLoadBalancerListResultPage) Values() []LoadBalancer {
6056	if page.ilblr.IsEmpty() {
6057		return nil
6058	}
6059	return *page.ilblr.Value
6060}
6061
6062// Creates a new instance of the InterfaceLoadBalancerListResultPage type.
6063func NewInterfaceLoadBalancerListResultPage(cur InterfaceLoadBalancerListResult, getNextPage func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)) InterfaceLoadBalancerListResultPage {
6064	return InterfaceLoadBalancerListResultPage{
6065		fn:    getNextPage,
6066		ilblr: cur,
6067	}
6068}
6069
6070// InterfacePropertiesFormat networkInterface properties.
6071type InterfacePropertiesFormat struct {
6072	// VirtualMachine - The reference of a virtual machine.
6073	VirtualMachine *SubResource `json:"virtualMachine,omitempty"`
6074	// NetworkSecurityGroup - The reference of the NetworkSecurityGroup resource.
6075	NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"`
6076	// IPConfigurations - A list of IPConfigurations of the network interface.
6077	IPConfigurations *[]InterfaceIPConfiguration `json:"ipConfigurations,omitempty"`
6078	// DNSSettings - The DNS settings in network interface.
6079	DNSSettings *InterfaceDNSSettings `json:"dnsSettings,omitempty"`
6080	// MacAddress - The MAC address of the network interface.
6081	MacAddress *string `json:"macAddress,omitempty"`
6082	// Primary - Gets whether this is a primary network interface on a virtual machine.
6083	Primary *bool `json:"primary,omitempty"`
6084	// EnableAcceleratedNetworking - If the network interface is accelerated networking enabled.
6085	EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"`
6086	// EnableIPForwarding - Indicates whether IP forwarding is enabled on this network interface.
6087	EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"`
6088	// ResourceGUID - The resource GUID property of the network interface resource.
6089	ResourceGUID *string `json:"resourceGuid,omitempty"`
6090	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
6091	ProvisioningState *string `json:"provisioningState,omitempty"`
6092}
6093
6094// InterfacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
6095// long-running operation.
6096type InterfacesCreateOrUpdateFuture struct {
6097	azure.FutureAPI
6098	// Result returns the result of the asynchronous operation.
6099	// If the operation has not completed it will return an error.
6100	Result func(InterfacesClient) (Interface, error)
6101}
6102
6103// InterfacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
6104// operation.
6105type InterfacesDeleteFuture struct {
6106	azure.FutureAPI
6107	// Result returns the result of the asynchronous operation.
6108	// If the operation has not completed it will return an error.
6109	Result func(InterfacesClient) (autorest.Response, error)
6110}
6111
6112// InterfacesGetEffectiveRouteTableFuture an abstraction for monitoring and retrieving the results of a
6113// long-running operation.
6114type InterfacesGetEffectiveRouteTableFuture struct {
6115	azure.FutureAPI
6116	// Result returns the result of the asynchronous operation.
6117	// If the operation has not completed it will return an error.
6118	Result func(InterfacesClient) (EffectiveRouteListResult, error)
6119}
6120
6121// InterfacesListEffectiveNetworkSecurityGroupsFuture an abstraction for monitoring and retrieving the
6122// results of a long-running operation.
6123type InterfacesListEffectiveNetworkSecurityGroupsFuture struct {
6124	azure.FutureAPI
6125	// Result returns the result of the asynchronous operation.
6126	// If the operation has not completed it will return an error.
6127	Result func(InterfacesClient) (EffectiveNetworkSecurityGroupListResult, error)
6128}
6129
6130// IPAddressAvailabilityResult response for CheckIPAddressAvailability API service call
6131type IPAddressAvailabilityResult struct {
6132	autorest.Response `json:"-"`
6133	// Available - Private IP address availability.
6134	Available *bool `json:"available,omitempty"`
6135	// AvailableIPAddresses - Contains other available private IP addresses if the asked for address is taken.
6136	AvailableIPAddresses *[]string `json:"availableIPAddresses,omitempty"`
6137}
6138
6139// IPConfiguration IP configuration
6140type IPConfiguration struct {
6141	// IPConfigurationPropertiesFormat - Properties of the IP configuration
6142	*IPConfigurationPropertiesFormat `json:"properties,omitempty"`
6143	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
6144	Name *string `json:"name,omitempty"`
6145	// Etag - A unique read-only string that changes whenever the resource is updated.
6146	Etag *string `json:"etag,omitempty"`
6147	// ID - Resource ID.
6148	ID *string `json:"id,omitempty"`
6149}
6150
6151// MarshalJSON is the custom marshaler for IPConfiguration.
6152func (ic IPConfiguration) MarshalJSON() ([]byte, error) {
6153	objectMap := make(map[string]interface{})
6154	if ic.IPConfigurationPropertiesFormat != nil {
6155		objectMap["properties"] = ic.IPConfigurationPropertiesFormat
6156	}
6157	if ic.Name != nil {
6158		objectMap["name"] = ic.Name
6159	}
6160	if ic.Etag != nil {
6161		objectMap["etag"] = ic.Etag
6162	}
6163	if ic.ID != nil {
6164		objectMap["id"] = ic.ID
6165	}
6166	return json.Marshal(objectMap)
6167}
6168
6169// UnmarshalJSON is the custom unmarshaler for IPConfiguration struct.
6170func (ic *IPConfiguration) UnmarshalJSON(body []byte) error {
6171	var m map[string]*json.RawMessage
6172	err := json.Unmarshal(body, &m)
6173	if err != nil {
6174		return err
6175	}
6176	for k, v := range m {
6177		switch k {
6178		case "properties":
6179			if v != nil {
6180				var IPConfigurationPropertiesFormat IPConfigurationPropertiesFormat
6181				err = json.Unmarshal(*v, &IPConfigurationPropertiesFormat)
6182				if err != nil {
6183					return err
6184				}
6185				ic.IPConfigurationPropertiesFormat = &IPConfigurationPropertiesFormat
6186			}
6187		case "name":
6188			if v != nil {
6189				var name string
6190				err = json.Unmarshal(*v, &name)
6191				if err != nil {
6192					return err
6193				}
6194				ic.Name = &name
6195			}
6196		case "etag":
6197			if v != nil {
6198				var etag string
6199				err = json.Unmarshal(*v, &etag)
6200				if err != nil {
6201					return err
6202				}
6203				ic.Etag = &etag
6204			}
6205		case "id":
6206			if v != nil {
6207				var ID string
6208				err = json.Unmarshal(*v, &ID)
6209				if err != nil {
6210					return err
6211				}
6212				ic.ID = &ID
6213			}
6214		}
6215	}
6216
6217	return nil
6218}
6219
6220// IPConfigurationPropertiesFormat properties of IP configuration.
6221type IPConfigurationPropertiesFormat struct {
6222	// PrivateIPAddress - The private IP address of the IP configuration.
6223	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
6224	// PrivateIPAllocationMethod - The private IP allocation method. Possible values are 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
6225	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
6226	// Subnet - The reference of the subnet resource.
6227	Subnet *Subnet `json:"subnet,omitempty"`
6228	// PublicIPAddress - The reference of the public IP resource.
6229	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
6230	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
6231	ProvisioningState *string `json:"provisioningState,omitempty"`
6232}
6233
6234// IpsecPolicy an IPSec Policy configuration for a virtual network gateway connection
6235type IpsecPolicy struct {
6236	// SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for a site to site VPN tunnel.
6237	SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"`
6238	// SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for a site to site VPN tunnel.
6239	SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"`
6240	// IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256'
6241	IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"`
6242	// IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256'
6243	IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"`
6244	// IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256'
6245	IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"`
6246	// IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'MD5', 'SHA1', 'SHA256', 'SHA384'
6247	IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"`
6248	// DhGroup - The DH Groups used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24'
6249	DhGroup DhGroup `json:"dhGroup,omitempty"`
6250	// PfsGroup - The DH Groups used in IKE Phase 2 for new child SA. Possible values include: 'PfsGroupNone', 'PfsGroupPFS1', 'PfsGroupPFS2', 'PfsGroupPFS2048', 'PfsGroupECP256', 'PfsGroupECP384', 'PfsGroupPFS24'
6251	PfsGroup PfsGroup `json:"pfsGroup,omitempty"`
6252}
6253
6254// Ipv6ExpressRouteCircuitPeeringConfig contains IPv6 peering config.
6255type Ipv6ExpressRouteCircuitPeeringConfig struct {
6256	// PrimaryPeerAddressPrefix - The primary address prefix.
6257	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
6258	// SecondaryPeerAddressPrefix - The secondary address prefix.
6259	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
6260	// MicrosoftPeeringConfig - The Microsoft peering configuration.
6261	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
6262	// RouteFilter - The reference of the RouteFilter resource.
6263	RouteFilter *RouteFilter `json:"routeFilter,omitempty"`
6264	// State - The state of peering. Possible values are: 'Disabled' and 'Enabled'. Possible values include: 'ExpressRouteCircuitPeeringStateDisabled', 'ExpressRouteCircuitPeeringStateEnabled'
6265	State ExpressRouteCircuitPeeringState `json:"state,omitempty"`
6266}
6267
6268// LoadBalancer loadBalancer resource
6269type LoadBalancer struct {
6270	autorest.Response `json:"-"`
6271	// LoadBalancerPropertiesFormat - Properties of load balancer.
6272	*LoadBalancerPropertiesFormat `json:"properties,omitempty"`
6273	// Etag - A unique read-only string that changes whenever the resource is updated.
6274	Etag *string `json:"etag,omitempty"`
6275	// ID - Resource ID.
6276	ID *string `json:"id,omitempty"`
6277	// Name - READ-ONLY; Resource name.
6278	Name *string `json:"name,omitempty"`
6279	// Type - READ-ONLY; Resource type.
6280	Type *string `json:"type,omitempty"`
6281	// Location - Resource location.
6282	Location *string `json:"location,omitempty"`
6283	// Tags - Resource tags.
6284	Tags map[string]*string `json:"tags"`
6285}
6286
6287// MarshalJSON is the custom marshaler for LoadBalancer.
6288func (lb LoadBalancer) MarshalJSON() ([]byte, error) {
6289	objectMap := make(map[string]interface{})
6290	if lb.LoadBalancerPropertiesFormat != nil {
6291		objectMap["properties"] = lb.LoadBalancerPropertiesFormat
6292	}
6293	if lb.Etag != nil {
6294		objectMap["etag"] = lb.Etag
6295	}
6296	if lb.ID != nil {
6297		objectMap["id"] = lb.ID
6298	}
6299	if lb.Location != nil {
6300		objectMap["location"] = lb.Location
6301	}
6302	if lb.Tags != nil {
6303		objectMap["tags"] = lb.Tags
6304	}
6305	return json.Marshal(objectMap)
6306}
6307
6308// UnmarshalJSON is the custom unmarshaler for LoadBalancer struct.
6309func (lb *LoadBalancer) UnmarshalJSON(body []byte) error {
6310	var m map[string]*json.RawMessage
6311	err := json.Unmarshal(body, &m)
6312	if err != nil {
6313		return err
6314	}
6315	for k, v := range m {
6316		switch k {
6317		case "properties":
6318			if v != nil {
6319				var loadBalancerPropertiesFormat LoadBalancerPropertiesFormat
6320				err = json.Unmarshal(*v, &loadBalancerPropertiesFormat)
6321				if err != nil {
6322					return err
6323				}
6324				lb.LoadBalancerPropertiesFormat = &loadBalancerPropertiesFormat
6325			}
6326		case "etag":
6327			if v != nil {
6328				var etag string
6329				err = json.Unmarshal(*v, &etag)
6330				if err != nil {
6331					return err
6332				}
6333				lb.Etag = &etag
6334			}
6335		case "id":
6336			if v != nil {
6337				var ID string
6338				err = json.Unmarshal(*v, &ID)
6339				if err != nil {
6340					return err
6341				}
6342				lb.ID = &ID
6343			}
6344		case "name":
6345			if v != nil {
6346				var name string
6347				err = json.Unmarshal(*v, &name)
6348				if err != nil {
6349					return err
6350				}
6351				lb.Name = &name
6352			}
6353		case "type":
6354			if v != nil {
6355				var typeVar string
6356				err = json.Unmarshal(*v, &typeVar)
6357				if err != nil {
6358					return err
6359				}
6360				lb.Type = &typeVar
6361			}
6362		case "location":
6363			if v != nil {
6364				var location string
6365				err = json.Unmarshal(*v, &location)
6366				if err != nil {
6367					return err
6368				}
6369				lb.Location = &location
6370			}
6371		case "tags":
6372			if v != nil {
6373				var tags map[string]*string
6374				err = json.Unmarshal(*v, &tags)
6375				if err != nil {
6376					return err
6377				}
6378				lb.Tags = tags
6379			}
6380		}
6381	}
6382
6383	return nil
6384}
6385
6386// LoadBalancerBackendAddressPoolListResult response for ListBackendAddressPool API service call.
6387type LoadBalancerBackendAddressPoolListResult struct {
6388	autorest.Response `json:"-"`
6389	// Value - A list of backend address pools in a load balancer.
6390	Value *[]BackendAddressPool `json:"value,omitempty"`
6391	// NextLink - READ-ONLY; The URL to get the next set of results.
6392	NextLink *string `json:"nextLink,omitempty"`
6393}
6394
6395// MarshalJSON is the custom marshaler for LoadBalancerBackendAddressPoolListResult.
6396func (lbbaplr LoadBalancerBackendAddressPoolListResult) MarshalJSON() ([]byte, error) {
6397	objectMap := make(map[string]interface{})
6398	if lbbaplr.Value != nil {
6399		objectMap["value"] = lbbaplr.Value
6400	}
6401	return json.Marshal(objectMap)
6402}
6403
6404// LoadBalancerBackendAddressPoolListResultIterator provides access to a complete listing of
6405// BackendAddressPool values.
6406type LoadBalancerBackendAddressPoolListResultIterator struct {
6407	i    int
6408	page LoadBalancerBackendAddressPoolListResultPage
6409}
6410
6411// NextWithContext advances to the next value.  If there was an error making
6412// the request the iterator does not advance and the error is returned.
6413func (iter *LoadBalancerBackendAddressPoolListResultIterator) NextWithContext(ctx context.Context) (err error) {
6414	if tracing.IsEnabled() {
6415		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultIterator.NextWithContext")
6416		defer func() {
6417			sc := -1
6418			if iter.Response().Response.Response != nil {
6419				sc = iter.Response().Response.Response.StatusCode
6420			}
6421			tracing.EndSpan(ctx, sc, err)
6422		}()
6423	}
6424	iter.i++
6425	if iter.i < len(iter.page.Values()) {
6426		return nil
6427	}
6428	err = iter.page.NextWithContext(ctx)
6429	if err != nil {
6430		iter.i--
6431		return err
6432	}
6433	iter.i = 0
6434	return nil
6435}
6436
6437// Next advances to the next value.  If there was an error making
6438// the request the iterator does not advance and the error is returned.
6439// Deprecated: Use NextWithContext() instead.
6440func (iter *LoadBalancerBackendAddressPoolListResultIterator) Next() error {
6441	return iter.NextWithContext(context.Background())
6442}
6443
6444// NotDone returns true if the enumeration should be started or is not yet complete.
6445func (iter LoadBalancerBackendAddressPoolListResultIterator) NotDone() bool {
6446	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6447}
6448
6449// Response returns the raw server response from the last page request.
6450func (iter LoadBalancerBackendAddressPoolListResultIterator) Response() LoadBalancerBackendAddressPoolListResult {
6451	return iter.page.Response()
6452}
6453
6454// Value returns the current value or a zero-initialized value if the
6455// iterator has advanced beyond the end of the collection.
6456func (iter LoadBalancerBackendAddressPoolListResultIterator) Value() BackendAddressPool {
6457	if !iter.page.NotDone() {
6458		return BackendAddressPool{}
6459	}
6460	return iter.page.Values()[iter.i]
6461}
6462
6463// Creates a new instance of the LoadBalancerBackendAddressPoolListResultIterator type.
6464func NewLoadBalancerBackendAddressPoolListResultIterator(page LoadBalancerBackendAddressPoolListResultPage) LoadBalancerBackendAddressPoolListResultIterator {
6465	return LoadBalancerBackendAddressPoolListResultIterator{page: page}
6466}
6467
6468// IsEmpty returns true if the ListResult contains no values.
6469func (lbbaplr LoadBalancerBackendAddressPoolListResult) IsEmpty() bool {
6470	return lbbaplr.Value == nil || len(*lbbaplr.Value) == 0
6471}
6472
6473// hasNextLink returns true if the NextLink is not empty.
6474func (lbbaplr LoadBalancerBackendAddressPoolListResult) hasNextLink() bool {
6475	return lbbaplr.NextLink != nil && len(*lbbaplr.NextLink) != 0
6476}
6477
6478// loadBalancerBackendAddressPoolListResultPreparer prepares a request to retrieve the next set of results.
6479// It returns nil if no more results exist.
6480func (lbbaplr LoadBalancerBackendAddressPoolListResult) loadBalancerBackendAddressPoolListResultPreparer(ctx context.Context) (*http.Request, error) {
6481	if !lbbaplr.hasNextLink() {
6482		return nil, nil
6483	}
6484	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6485		autorest.AsJSON(),
6486		autorest.AsGet(),
6487		autorest.WithBaseURL(to.String(lbbaplr.NextLink)))
6488}
6489
6490// LoadBalancerBackendAddressPoolListResultPage contains a page of BackendAddressPool values.
6491type LoadBalancerBackendAddressPoolListResultPage struct {
6492	fn      func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)
6493	lbbaplr LoadBalancerBackendAddressPoolListResult
6494}
6495
6496// NextWithContext advances to the next page of values.  If there was an error making
6497// the request the page does not advance and the error is returned.
6498func (page *LoadBalancerBackendAddressPoolListResultPage) NextWithContext(ctx context.Context) (err error) {
6499	if tracing.IsEnabled() {
6500		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultPage.NextWithContext")
6501		defer func() {
6502			sc := -1
6503			if page.Response().Response.Response != nil {
6504				sc = page.Response().Response.Response.StatusCode
6505			}
6506			tracing.EndSpan(ctx, sc, err)
6507		}()
6508	}
6509	for {
6510		next, err := page.fn(ctx, page.lbbaplr)
6511		if err != nil {
6512			return err
6513		}
6514		page.lbbaplr = next
6515		if !next.hasNextLink() || !next.IsEmpty() {
6516			break
6517		}
6518	}
6519	return nil
6520}
6521
6522// Next advances to the next page of values.  If there was an error making
6523// the request the page does not advance and the error is returned.
6524// Deprecated: Use NextWithContext() instead.
6525func (page *LoadBalancerBackendAddressPoolListResultPage) Next() error {
6526	return page.NextWithContext(context.Background())
6527}
6528
6529// NotDone returns true if the page enumeration should be started or is not yet complete.
6530func (page LoadBalancerBackendAddressPoolListResultPage) NotDone() bool {
6531	return !page.lbbaplr.IsEmpty()
6532}
6533
6534// Response returns the raw server response from the last page request.
6535func (page LoadBalancerBackendAddressPoolListResultPage) Response() LoadBalancerBackendAddressPoolListResult {
6536	return page.lbbaplr
6537}
6538
6539// Values returns the slice of values for the current page or nil if there are no values.
6540func (page LoadBalancerBackendAddressPoolListResultPage) Values() []BackendAddressPool {
6541	if page.lbbaplr.IsEmpty() {
6542		return nil
6543	}
6544	return *page.lbbaplr.Value
6545}
6546
6547// Creates a new instance of the LoadBalancerBackendAddressPoolListResultPage type.
6548func NewLoadBalancerBackendAddressPoolListResultPage(cur LoadBalancerBackendAddressPoolListResult, getNextPage func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)) LoadBalancerBackendAddressPoolListResultPage {
6549	return LoadBalancerBackendAddressPoolListResultPage{
6550		fn:      getNextPage,
6551		lbbaplr: cur,
6552	}
6553}
6554
6555// LoadBalancerFrontendIPConfigurationListResult response for ListFrontendIPConfiguration API service call.
6556type LoadBalancerFrontendIPConfigurationListResult struct {
6557	autorest.Response `json:"-"`
6558	// Value - A list of frontend IP configurations in a load balancer.
6559	Value *[]FrontendIPConfiguration `json:"value,omitempty"`
6560	// NextLink - READ-ONLY; The URL to get the next set of results.
6561	NextLink *string `json:"nextLink,omitempty"`
6562}
6563
6564// MarshalJSON is the custom marshaler for LoadBalancerFrontendIPConfigurationListResult.
6565func (lbficlr LoadBalancerFrontendIPConfigurationListResult) MarshalJSON() ([]byte, error) {
6566	objectMap := make(map[string]interface{})
6567	if lbficlr.Value != nil {
6568		objectMap["value"] = lbficlr.Value
6569	}
6570	return json.Marshal(objectMap)
6571}
6572
6573// LoadBalancerFrontendIPConfigurationListResultIterator provides access to a complete listing of
6574// FrontendIPConfiguration values.
6575type LoadBalancerFrontendIPConfigurationListResultIterator struct {
6576	i    int
6577	page LoadBalancerFrontendIPConfigurationListResultPage
6578}
6579
6580// NextWithContext advances to the next value.  If there was an error making
6581// the request the iterator does not advance and the error is returned.
6582func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
6583	if tracing.IsEnabled() {
6584		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultIterator.NextWithContext")
6585		defer func() {
6586			sc := -1
6587			if iter.Response().Response.Response != nil {
6588				sc = iter.Response().Response.Response.StatusCode
6589			}
6590			tracing.EndSpan(ctx, sc, err)
6591		}()
6592	}
6593	iter.i++
6594	if iter.i < len(iter.page.Values()) {
6595		return nil
6596	}
6597	err = iter.page.NextWithContext(ctx)
6598	if err != nil {
6599		iter.i--
6600		return err
6601	}
6602	iter.i = 0
6603	return nil
6604}
6605
6606// Next advances to the next value.  If there was an error making
6607// the request the iterator does not advance and the error is returned.
6608// Deprecated: Use NextWithContext() instead.
6609func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) Next() error {
6610	return iter.NextWithContext(context.Background())
6611}
6612
6613// NotDone returns true if the enumeration should be started or is not yet complete.
6614func (iter LoadBalancerFrontendIPConfigurationListResultIterator) NotDone() bool {
6615	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6616}
6617
6618// Response returns the raw server response from the last page request.
6619func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Response() LoadBalancerFrontendIPConfigurationListResult {
6620	return iter.page.Response()
6621}
6622
6623// Value returns the current value or a zero-initialized value if the
6624// iterator has advanced beyond the end of the collection.
6625func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Value() FrontendIPConfiguration {
6626	if !iter.page.NotDone() {
6627		return FrontendIPConfiguration{}
6628	}
6629	return iter.page.Values()[iter.i]
6630}
6631
6632// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultIterator type.
6633func NewLoadBalancerFrontendIPConfigurationListResultIterator(page LoadBalancerFrontendIPConfigurationListResultPage) LoadBalancerFrontendIPConfigurationListResultIterator {
6634	return LoadBalancerFrontendIPConfigurationListResultIterator{page: page}
6635}
6636
6637// IsEmpty returns true if the ListResult contains no values.
6638func (lbficlr LoadBalancerFrontendIPConfigurationListResult) IsEmpty() bool {
6639	return lbficlr.Value == nil || len(*lbficlr.Value) == 0
6640}
6641
6642// hasNextLink returns true if the NextLink is not empty.
6643func (lbficlr LoadBalancerFrontendIPConfigurationListResult) hasNextLink() bool {
6644	return lbficlr.NextLink != nil && len(*lbficlr.NextLink) != 0
6645}
6646
6647// loadBalancerFrontendIPConfigurationListResultPreparer prepares a request to retrieve the next set of results.
6648// It returns nil if no more results exist.
6649func (lbficlr LoadBalancerFrontendIPConfigurationListResult) loadBalancerFrontendIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
6650	if !lbficlr.hasNextLink() {
6651		return nil, nil
6652	}
6653	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6654		autorest.AsJSON(),
6655		autorest.AsGet(),
6656		autorest.WithBaseURL(to.String(lbficlr.NextLink)))
6657}
6658
6659// LoadBalancerFrontendIPConfigurationListResultPage contains a page of FrontendIPConfiguration values.
6660type LoadBalancerFrontendIPConfigurationListResultPage struct {
6661	fn      func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)
6662	lbficlr LoadBalancerFrontendIPConfigurationListResult
6663}
6664
6665// NextWithContext advances to the next page of values.  If there was an error making
6666// the request the page does not advance and the error is returned.
6667func (page *LoadBalancerFrontendIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
6668	if tracing.IsEnabled() {
6669		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultPage.NextWithContext")
6670		defer func() {
6671			sc := -1
6672			if page.Response().Response.Response != nil {
6673				sc = page.Response().Response.Response.StatusCode
6674			}
6675			tracing.EndSpan(ctx, sc, err)
6676		}()
6677	}
6678	for {
6679		next, err := page.fn(ctx, page.lbficlr)
6680		if err != nil {
6681			return err
6682		}
6683		page.lbficlr = next
6684		if !next.hasNextLink() || !next.IsEmpty() {
6685			break
6686		}
6687	}
6688	return nil
6689}
6690
6691// Next advances to the next page of values.  If there was an error making
6692// the request the page does not advance and the error is returned.
6693// Deprecated: Use NextWithContext() instead.
6694func (page *LoadBalancerFrontendIPConfigurationListResultPage) Next() error {
6695	return page.NextWithContext(context.Background())
6696}
6697
6698// NotDone returns true if the page enumeration should be started or is not yet complete.
6699func (page LoadBalancerFrontendIPConfigurationListResultPage) NotDone() bool {
6700	return !page.lbficlr.IsEmpty()
6701}
6702
6703// Response returns the raw server response from the last page request.
6704func (page LoadBalancerFrontendIPConfigurationListResultPage) Response() LoadBalancerFrontendIPConfigurationListResult {
6705	return page.lbficlr
6706}
6707
6708// Values returns the slice of values for the current page or nil if there are no values.
6709func (page LoadBalancerFrontendIPConfigurationListResultPage) Values() []FrontendIPConfiguration {
6710	if page.lbficlr.IsEmpty() {
6711		return nil
6712	}
6713	return *page.lbficlr.Value
6714}
6715
6716// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultPage type.
6717func NewLoadBalancerFrontendIPConfigurationListResultPage(cur LoadBalancerFrontendIPConfigurationListResult, getNextPage func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)) LoadBalancerFrontendIPConfigurationListResultPage {
6718	return LoadBalancerFrontendIPConfigurationListResultPage{
6719		fn:      getNextPage,
6720		lbficlr: cur,
6721	}
6722}
6723
6724// LoadBalancerListResult response for ListLoadBalancers API service call.
6725type LoadBalancerListResult struct {
6726	autorest.Response `json:"-"`
6727	// Value - A list of load balancers in a resource group.
6728	Value *[]LoadBalancer `json:"value,omitempty"`
6729	// NextLink - READ-ONLY; The URL to get the next set of results.
6730	NextLink *string `json:"nextLink,omitempty"`
6731}
6732
6733// MarshalJSON is the custom marshaler for LoadBalancerListResult.
6734func (lblr LoadBalancerListResult) MarshalJSON() ([]byte, error) {
6735	objectMap := make(map[string]interface{})
6736	if lblr.Value != nil {
6737		objectMap["value"] = lblr.Value
6738	}
6739	return json.Marshal(objectMap)
6740}
6741
6742// LoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values.
6743type LoadBalancerListResultIterator struct {
6744	i    int
6745	page LoadBalancerListResultPage
6746}
6747
6748// NextWithContext advances to the next value.  If there was an error making
6749// the request the iterator does not advance and the error is returned.
6750func (iter *LoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) {
6751	if tracing.IsEnabled() {
6752		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultIterator.NextWithContext")
6753		defer func() {
6754			sc := -1
6755			if iter.Response().Response.Response != nil {
6756				sc = iter.Response().Response.Response.StatusCode
6757			}
6758			tracing.EndSpan(ctx, sc, err)
6759		}()
6760	}
6761	iter.i++
6762	if iter.i < len(iter.page.Values()) {
6763		return nil
6764	}
6765	err = iter.page.NextWithContext(ctx)
6766	if err != nil {
6767		iter.i--
6768		return err
6769	}
6770	iter.i = 0
6771	return nil
6772}
6773
6774// Next advances to the next value.  If there was an error making
6775// the request the iterator does not advance and the error is returned.
6776// Deprecated: Use NextWithContext() instead.
6777func (iter *LoadBalancerListResultIterator) Next() error {
6778	return iter.NextWithContext(context.Background())
6779}
6780
6781// NotDone returns true if the enumeration should be started or is not yet complete.
6782func (iter LoadBalancerListResultIterator) NotDone() bool {
6783	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6784}
6785
6786// Response returns the raw server response from the last page request.
6787func (iter LoadBalancerListResultIterator) Response() LoadBalancerListResult {
6788	return iter.page.Response()
6789}
6790
6791// Value returns the current value or a zero-initialized value if the
6792// iterator has advanced beyond the end of the collection.
6793func (iter LoadBalancerListResultIterator) Value() LoadBalancer {
6794	if !iter.page.NotDone() {
6795		return LoadBalancer{}
6796	}
6797	return iter.page.Values()[iter.i]
6798}
6799
6800// Creates a new instance of the LoadBalancerListResultIterator type.
6801func NewLoadBalancerListResultIterator(page LoadBalancerListResultPage) LoadBalancerListResultIterator {
6802	return LoadBalancerListResultIterator{page: page}
6803}
6804
6805// IsEmpty returns true if the ListResult contains no values.
6806func (lblr LoadBalancerListResult) IsEmpty() bool {
6807	return lblr.Value == nil || len(*lblr.Value) == 0
6808}
6809
6810// hasNextLink returns true if the NextLink is not empty.
6811func (lblr LoadBalancerListResult) hasNextLink() bool {
6812	return lblr.NextLink != nil && len(*lblr.NextLink) != 0
6813}
6814
6815// loadBalancerListResultPreparer prepares a request to retrieve the next set of results.
6816// It returns nil if no more results exist.
6817func (lblr LoadBalancerListResult) loadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) {
6818	if !lblr.hasNextLink() {
6819		return nil, nil
6820	}
6821	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6822		autorest.AsJSON(),
6823		autorest.AsGet(),
6824		autorest.WithBaseURL(to.String(lblr.NextLink)))
6825}
6826
6827// LoadBalancerListResultPage contains a page of LoadBalancer values.
6828type LoadBalancerListResultPage struct {
6829	fn   func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)
6830	lblr LoadBalancerListResult
6831}
6832
6833// NextWithContext advances to the next page of values.  If there was an error making
6834// the request the page does not advance and the error is returned.
6835func (page *LoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) {
6836	if tracing.IsEnabled() {
6837		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultPage.NextWithContext")
6838		defer func() {
6839			sc := -1
6840			if page.Response().Response.Response != nil {
6841				sc = page.Response().Response.Response.StatusCode
6842			}
6843			tracing.EndSpan(ctx, sc, err)
6844		}()
6845	}
6846	for {
6847		next, err := page.fn(ctx, page.lblr)
6848		if err != nil {
6849			return err
6850		}
6851		page.lblr = next
6852		if !next.hasNextLink() || !next.IsEmpty() {
6853			break
6854		}
6855	}
6856	return nil
6857}
6858
6859// Next advances to the next page of values.  If there was an error making
6860// the request the page does not advance and the error is returned.
6861// Deprecated: Use NextWithContext() instead.
6862func (page *LoadBalancerListResultPage) Next() error {
6863	return page.NextWithContext(context.Background())
6864}
6865
6866// NotDone returns true if the page enumeration should be started or is not yet complete.
6867func (page LoadBalancerListResultPage) NotDone() bool {
6868	return !page.lblr.IsEmpty()
6869}
6870
6871// Response returns the raw server response from the last page request.
6872func (page LoadBalancerListResultPage) Response() LoadBalancerListResult {
6873	return page.lblr
6874}
6875
6876// Values returns the slice of values for the current page or nil if there are no values.
6877func (page LoadBalancerListResultPage) Values() []LoadBalancer {
6878	if page.lblr.IsEmpty() {
6879		return nil
6880	}
6881	return *page.lblr.Value
6882}
6883
6884// Creates a new instance of the LoadBalancerListResultPage type.
6885func NewLoadBalancerListResultPage(cur LoadBalancerListResult, getNextPage func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)) LoadBalancerListResultPage {
6886	return LoadBalancerListResultPage{
6887		fn:   getNextPage,
6888		lblr: cur,
6889	}
6890}
6891
6892// LoadBalancerLoadBalancingRuleListResult response for ListLoadBalancingRule API service call.
6893type LoadBalancerLoadBalancingRuleListResult struct {
6894	autorest.Response `json:"-"`
6895	// Value - A list of load balancing rules in a load balancer.
6896	Value *[]LoadBalancingRule `json:"value,omitempty"`
6897	// NextLink - READ-ONLY; The URL to get the next set of results.
6898	NextLink *string `json:"nextLink,omitempty"`
6899}
6900
6901// MarshalJSON is the custom marshaler for LoadBalancerLoadBalancingRuleListResult.
6902func (lblbrlr LoadBalancerLoadBalancingRuleListResult) MarshalJSON() ([]byte, error) {
6903	objectMap := make(map[string]interface{})
6904	if lblbrlr.Value != nil {
6905		objectMap["value"] = lblbrlr.Value
6906	}
6907	return json.Marshal(objectMap)
6908}
6909
6910// LoadBalancerLoadBalancingRuleListResultIterator provides access to a complete listing of
6911// LoadBalancingRule values.
6912type LoadBalancerLoadBalancingRuleListResultIterator struct {
6913	i    int
6914	page LoadBalancerLoadBalancingRuleListResultPage
6915}
6916
6917// NextWithContext advances to the next value.  If there was an error making
6918// the request the iterator does not advance and the error is returned.
6919func (iter *LoadBalancerLoadBalancingRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
6920	if tracing.IsEnabled() {
6921		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultIterator.NextWithContext")
6922		defer func() {
6923			sc := -1
6924			if iter.Response().Response.Response != nil {
6925				sc = iter.Response().Response.Response.StatusCode
6926			}
6927			tracing.EndSpan(ctx, sc, err)
6928		}()
6929	}
6930	iter.i++
6931	if iter.i < len(iter.page.Values()) {
6932		return nil
6933	}
6934	err = iter.page.NextWithContext(ctx)
6935	if err != nil {
6936		iter.i--
6937		return err
6938	}
6939	iter.i = 0
6940	return nil
6941}
6942
6943// Next advances to the next value.  If there was an error making
6944// the request the iterator does not advance and the error is returned.
6945// Deprecated: Use NextWithContext() instead.
6946func (iter *LoadBalancerLoadBalancingRuleListResultIterator) Next() error {
6947	return iter.NextWithContext(context.Background())
6948}
6949
6950// NotDone returns true if the enumeration should be started or is not yet complete.
6951func (iter LoadBalancerLoadBalancingRuleListResultIterator) NotDone() bool {
6952	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6953}
6954
6955// Response returns the raw server response from the last page request.
6956func (iter LoadBalancerLoadBalancingRuleListResultIterator) Response() LoadBalancerLoadBalancingRuleListResult {
6957	return iter.page.Response()
6958}
6959
6960// Value returns the current value or a zero-initialized value if the
6961// iterator has advanced beyond the end of the collection.
6962func (iter LoadBalancerLoadBalancingRuleListResultIterator) Value() LoadBalancingRule {
6963	if !iter.page.NotDone() {
6964		return LoadBalancingRule{}
6965	}
6966	return iter.page.Values()[iter.i]
6967}
6968
6969// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultIterator type.
6970func NewLoadBalancerLoadBalancingRuleListResultIterator(page LoadBalancerLoadBalancingRuleListResultPage) LoadBalancerLoadBalancingRuleListResultIterator {
6971	return LoadBalancerLoadBalancingRuleListResultIterator{page: page}
6972}
6973
6974// IsEmpty returns true if the ListResult contains no values.
6975func (lblbrlr LoadBalancerLoadBalancingRuleListResult) IsEmpty() bool {
6976	return lblbrlr.Value == nil || len(*lblbrlr.Value) == 0
6977}
6978
6979// hasNextLink returns true if the NextLink is not empty.
6980func (lblbrlr LoadBalancerLoadBalancingRuleListResult) hasNextLink() bool {
6981	return lblbrlr.NextLink != nil && len(*lblbrlr.NextLink) != 0
6982}
6983
6984// loadBalancerLoadBalancingRuleListResultPreparer prepares a request to retrieve the next set of results.
6985// It returns nil if no more results exist.
6986func (lblbrlr LoadBalancerLoadBalancingRuleListResult) loadBalancerLoadBalancingRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
6987	if !lblbrlr.hasNextLink() {
6988		return nil, nil
6989	}
6990	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6991		autorest.AsJSON(),
6992		autorest.AsGet(),
6993		autorest.WithBaseURL(to.String(lblbrlr.NextLink)))
6994}
6995
6996// LoadBalancerLoadBalancingRuleListResultPage contains a page of LoadBalancingRule values.
6997type LoadBalancerLoadBalancingRuleListResultPage struct {
6998	fn      func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)
6999	lblbrlr LoadBalancerLoadBalancingRuleListResult
7000}
7001
7002// NextWithContext advances to the next page of values.  If there was an error making
7003// the request the page does not advance and the error is returned.
7004func (page *LoadBalancerLoadBalancingRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
7005	if tracing.IsEnabled() {
7006		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultPage.NextWithContext")
7007		defer func() {
7008			sc := -1
7009			if page.Response().Response.Response != nil {
7010				sc = page.Response().Response.Response.StatusCode
7011			}
7012			tracing.EndSpan(ctx, sc, err)
7013		}()
7014	}
7015	for {
7016		next, err := page.fn(ctx, page.lblbrlr)
7017		if err != nil {
7018			return err
7019		}
7020		page.lblbrlr = next
7021		if !next.hasNextLink() || !next.IsEmpty() {
7022			break
7023		}
7024	}
7025	return nil
7026}
7027
7028// Next advances to the next page of values.  If there was an error making
7029// the request the page does not advance and the error is returned.
7030// Deprecated: Use NextWithContext() instead.
7031func (page *LoadBalancerLoadBalancingRuleListResultPage) Next() error {
7032	return page.NextWithContext(context.Background())
7033}
7034
7035// NotDone returns true if the page enumeration should be started or is not yet complete.
7036func (page LoadBalancerLoadBalancingRuleListResultPage) NotDone() bool {
7037	return !page.lblbrlr.IsEmpty()
7038}
7039
7040// Response returns the raw server response from the last page request.
7041func (page LoadBalancerLoadBalancingRuleListResultPage) Response() LoadBalancerLoadBalancingRuleListResult {
7042	return page.lblbrlr
7043}
7044
7045// Values returns the slice of values for the current page or nil if there are no values.
7046func (page LoadBalancerLoadBalancingRuleListResultPage) Values() []LoadBalancingRule {
7047	if page.lblbrlr.IsEmpty() {
7048		return nil
7049	}
7050	return *page.lblbrlr.Value
7051}
7052
7053// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultPage type.
7054func NewLoadBalancerLoadBalancingRuleListResultPage(cur LoadBalancerLoadBalancingRuleListResult, getNextPage func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)) LoadBalancerLoadBalancingRuleListResultPage {
7055	return LoadBalancerLoadBalancingRuleListResultPage{
7056		fn:      getNextPage,
7057		lblbrlr: cur,
7058	}
7059}
7060
7061// LoadBalancerProbeListResult response for ListProbe API service call.
7062type LoadBalancerProbeListResult struct {
7063	autorest.Response `json:"-"`
7064	// Value - A list of probes in a load balancer.
7065	Value *[]Probe `json:"value,omitempty"`
7066	// NextLink - READ-ONLY; The URL to get the next set of results.
7067	NextLink *string `json:"nextLink,omitempty"`
7068}
7069
7070// MarshalJSON is the custom marshaler for LoadBalancerProbeListResult.
7071func (lbplr LoadBalancerProbeListResult) MarshalJSON() ([]byte, error) {
7072	objectMap := make(map[string]interface{})
7073	if lbplr.Value != nil {
7074		objectMap["value"] = lbplr.Value
7075	}
7076	return json.Marshal(objectMap)
7077}
7078
7079// LoadBalancerProbeListResultIterator provides access to a complete listing of Probe values.
7080type LoadBalancerProbeListResultIterator struct {
7081	i    int
7082	page LoadBalancerProbeListResultPage
7083}
7084
7085// NextWithContext advances to the next value.  If there was an error making
7086// the request the iterator does not advance and the error is returned.
7087func (iter *LoadBalancerProbeListResultIterator) NextWithContext(ctx context.Context) (err error) {
7088	if tracing.IsEnabled() {
7089		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultIterator.NextWithContext")
7090		defer func() {
7091			sc := -1
7092			if iter.Response().Response.Response != nil {
7093				sc = iter.Response().Response.Response.StatusCode
7094			}
7095			tracing.EndSpan(ctx, sc, err)
7096		}()
7097	}
7098	iter.i++
7099	if iter.i < len(iter.page.Values()) {
7100		return nil
7101	}
7102	err = iter.page.NextWithContext(ctx)
7103	if err != nil {
7104		iter.i--
7105		return err
7106	}
7107	iter.i = 0
7108	return nil
7109}
7110
7111// Next advances to the next value.  If there was an error making
7112// the request the iterator does not advance and the error is returned.
7113// Deprecated: Use NextWithContext() instead.
7114func (iter *LoadBalancerProbeListResultIterator) Next() error {
7115	return iter.NextWithContext(context.Background())
7116}
7117
7118// NotDone returns true if the enumeration should be started or is not yet complete.
7119func (iter LoadBalancerProbeListResultIterator) NotDone() bool {
7120	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7121}
7122
7123// Response returns the raw server response from the last page request.
7124func (iter LoadBalancerProbeListResultIterator) Response() LoadBalancerProbeListResult {
7125	return iter.page.Response()
7126}
7127
7128// Value returns the current value or a zero-initialized value if the
7129// iterator has advanced beyond the end of the collection.
7130func (iter LoadBalancerProbeListResultIterator) Value() Probe {
7131	if !iter.page.NotDone() {
7132		return Probe{}
7133	}
7134	return iter.page.Values()[iter.i]
7135}
7136
7137// Creates a new instance of the LoadBalancerProbeListResultIterator type.
7138func NewLoadBalancerProbeListResultIterator(page LoadBalancerProbeListResultPage) LoadBalancerProbeListResultIterator {
7139	return LoadBalancerProbeListResultIterator{page: page}
7140}
7141
7142// IsEmpty returns true if the ListResult contains no values.
7143func (lbplr LoadBalancerProbeListResult) IsEmpty() bool {
7144	return lbplr.Value == nil || len(*lbplr.Value) == 0
7145}
7146
7147// hasNextLink returns true if the NextLink is not empty.
7148func (lbplr LoadBalancerProbeListResult) hasNextLink() bool {
7149	return lbplr.NextLink != nil && len(*lbplr.NextLink) != 0
7150}
7151
7152// loadBalancerProbeListResultPreparer prepares a request to retrieve the next set of results.
7153// It returns nil if no more results exist.
7154func (lbplr LoadBalancerProbeListResult) loadBalancerProbeListResultPreparer(ctx context.Context) (*http.Request, error) {
7155	if !lbplr.hasNextLink() {
7156		return nil, nil
7157	}
7158	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7159		autorest.AsJSON(),
7160		autorest.AsGet(),
7161		autorest.WithBaseURL(to.String(lbplr.NextLink)))
7162}
7163
7164// LoadBalancerProbeListResultPage contains a page of Probe values.
7165type LoadBalancerProbeListResultPage struct {
7166	fn    func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)
7167	lbplr LoadBalancerProbeListResult
7168}
7169
7170// NextWithContext advances to the next page of values.  If there was an error making
7171// the request the page does not advance and the error is returned.
7172func (page *LoadBalancerProbeListResultPage) NextWithContext(ctx context.Context) (err error) {
7173	if tracing.IsEnabled() {
7174		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultPage.NextWithContext")
7175		defer func() {
7176			sc := -1
7177			if page.Response().Response.Response != nil {
7178				sc = page.Response().Response.Response.StatusCode
7179			}
7180			tracing.EndSpan(ctx, sc, err)
7181		}()
7182	}
7183	for {
7184		next, err := page.fn(ctx, page.lbplr)
7185		if err != nil {
7186			return err
7187		}
7188		page.lbplr = next
7189		if !next.hasNextLink() || !next.IsEmpty() {
7190			break
7191		}
7192	}
7193	return nil
7194}
7195
7196// Next advances to the next page of values.  If there was an error making
7197// the request the page does not advance and the error is returned.
7198// Deprecated: Use NextWithContext() instead.
7199func (page *LoadBalancerProbeListResultPage) Next() error {
7200	return page.NextWithContext(context.Background())
7201}
7202
7203// NotDone returns true if the page enumeration should be started or is not yet complete.
7204func (page LoadBalancerProbeListResultPage) NotDone() bool {
7205	return !page.lbplr.IsEmpty()
7206}
7207
7208// Response returns the raw server response from the last page request.
7209func (page LoadBalancerProbeListResultPage) Response() LoadBalancerProbeListResult {
7210	return page.lbplr
7211}
7212
7213// Values returns the slice of values for the current page or nil if there are no values.
7214func (page LoadBalancerProbeListResultPage) Values() []Probe {
7215	if page.lbplr.IsEmpty() {
7216		return nil
7217	}
7218	return *page.lbplr.Value
7219}
7220
7221// Creates a new instance of the LoadBalancerProbeListResultPage type.
7222func NewLoadBalancerProbeListResultPage(cur LoadBalancerProbeListResult, getNextPage func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)) LoadBalancerProbeListResultPage {
7223	return LoadBalancerProbeListResultPage{
7224		fn:    getNextPage,
7225		lbplr: cur,
7226	}
7227}
7228
7229// LoadBalancerPropertiesFormat properties of the load balancer.
7230type LoadBalancerPropertiesFormat struct {
7231	// FrontendIPConfigurations - Object representing the frontend IPs to be used for the load balancer
7232	FrontendIPConfigurations *[]FrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"`
7233	// BackendAddressPools - Collection of backend address pools used by a load balancer
7234	BackendAddressPools *[]BackendAddressPool `json:"backendAddressPools,omitempty"`
7235	// LoadBalancingRules - Object collection representing the load balancing rules Gets the provisioning
7236	LoadBalancingRules *[]LoadBalancingRule `json:"loadBalancingRules,omitempty"`
7237	// Probes - Collection of probe objects used in the load balancer
7238	Probes *[]Probe `json:"probes,omitempty"`
7239	// 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.
7240	InboundNatRules *[]InboundNatRule `json:"inboundNatRules,omitempty"`
7241	// 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.
7242	InboundNatPools *[]InboundNatPool `json:"inboundNatPools,omitempty"`
7243	// OutboundNatRules - The outbound NAT rules.
7244	OutboundNatRules *[]OutboundNatRule `json:"outboundNatRules,omitempty"`
7245	// ResourceGUID - The resource GUID property of the load balancer resource.
7246	ResourceGUID *string `json:"resourceGuid,omitempty"`
7247	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
7248	ProvisioningState *string `json:"provisioningState,omitempty"`
7249}
7250
7251// LoadBalancersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
7252// long-running operation.
7253type LoadBalancersCreateOrUpdateFuture struct {
7254	azure.FutureAPI
7255	// Result returns the result of the asynchronous operation.
7256	// If the operation has not completed it will return an error.
7257	Result func(LoadBalancersClient) (LoadBalancer, error)
7258}
7259
7260// LoadBalancersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
7261// operation.
7262type LoadBalancersDeleteFuture struct {
7263	azure.FutureAPI
7264	// Result returns the result of the asynchronous operation.
7265	// If the operation has not completed it will return an error.
7266	Result func(LoadBalancersClient) (autorest.Response, error)
7267}
7268
7269// LoadBalancingRule a load balancing rule for a load balancer.
7270type LoadBalancingRule struct {
7271	autorest.Response `json:"-"`
7272	// LoadBalancingRulePropertiesFormat - Properties of load balancer load balancing rule.
7273	*LoadBalancingRulePropertiesFormat `json:"properties,omitempty"`
7274	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
7275	Name *string `json:"name,omitempty"`
7276	// Etag - A unique read-only string that changes whenever the resource is updated.
7277	Etag *string `json:"etag,omitempty"`
7278	// ID - Resource ID.
7279	ID *string `json:"id,omitempty"`
7280}
7281
7282// MarshalJSON is the custom marshaler for LoadBalancingRule.
7283func (lbr LoadBalancingRule) MarshalJSON() ([]byte, error) {
7284	objectMap := make(map[string]interface{})
7285	if lbr.LoadBalancingRulePropertiesFormat != nil {
7286		objectMap["properties"] = lbr.LoadBalancingRulePropertiesFormat
7287	}
7288	if lbr.Name != nil {
7289		objectMap["name"] = lbr.Name
7290	}
7291	if lbr.Etag != nil {
7292		objectMap["etag"] = lbr.Etag
7293	}
7294	if lbr.ID != nil {
7295		objectMap["id"] = lbr.ID
7296	}
7297	return json.Marshal(objectMap)
7298}
7299
7300// UnmarshalJSON is the custom unmarshaler for LoadBalancingRule struct.
7301func (lbr *LoadBalancingRule) UnmarshalJSON(body []byte) error {
7302	var m map[string]*json.RawMessage
7303	err := json.Unmarshal(body, &m)
7304	if err != nil {
7305		return err
7306	}
7307	for k, v := range m {
7308		switch k {
7309		case "properties":
7310			if v != nil {
7311				var loadBalancingRulePropertiesFormat LoadBalancingRulePropertiesFormat
7312				err = json.Unmarshal(*v, &loadBalancingRulePropertiesFormat)
7313				if err != nil {
7314					return err
7315				}
7316				lbr.LoadBalancingRulePropertiesFormat = &loadBalancingRulePropertiesFormat
7317			}
7318		case "name":
7319			if v != nil {
7320				var name string
7321				err = json.Unmarshal(*v, &name)
7322				if err != nil {
7323					return err
7324				}
7325				lbr.Name = &name
7326			}
7327		case "etag":
7328			if v != nil {
7329				var etag string
7330				err = json.Unmarshal(*v, &etag)
7331				if err != nil {
7332					return err
7333				}
7334				lbr.Etag = &etag
7335			}
7336		case "id":
7337			if v != nil {
7338				var ID string
7339				err = json.Unmarshal(*v, &ID)
7340				if err != nil {
7341					return err
7342				}
7343				lbr.ID = &ID
7344			}
7345		}
7346	}
7347
7348	return nil
7349}
7350
7351// LoadBalancingRulePropertiesFormat properties of the load balancer.
7352type LoadBalancingRulePropertiesFormat struct {
7353	// FrontendIPConfiguration - A reference to frontend IP addresses.
7354	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
7355	// BackendAddressPool - A reference to a pool of DIPs. Inbound traffic is randomly load balanced across IPs in the backend IPs.
7356	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
7357	// Probe - The reference of the load balancer probe used by the load balancing rule.
7358	Probe *SubResource `json:"probe,omitempty"`
7359	// Protocol - The transport protocol for the external endpoint. Possible values are 'Udp' or 'Tcp'. Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP'
7360	Protocol TransportProtocol `json:"protocol,omitempty"`
7361	// LoadDistribution - The load distribution policy for this rule. Possible values are 'Default', 'SourceIP', and 'SourceIPProtocol'. Possible values include: 'Default', 'SourceIP', 'SourceIPProtocol'
7362	LoadDistribution LoadDistribution `json:"loadDistribution,omitempty"`
7363	// FrontendPort - The port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer. Acceptable values are between 1 and 65534.
7364	FrontendPort *int32 `json:"frontendPort,omitempty"`
7365	// BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 1 and 65535.
7366	BackendPort *int32 `json:"backendPort,omitempty"`
7367	// 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.
7368	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
7369	// 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.
7370	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
7371	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
7372	ProvisioningState *string `json:"provisioningState,omitempty"`
7373}
7374
7375// LocalNetworkGateway a common class for general resource information
7376type LocalNetworkGateway struct {
7377	autorest.Response `json:"-"`
7378	// LocalNetworkGatewayPropertiesFormat - Properties of the local network gateway.
7379	*LocalNetworkGatewayPropertiesFormat `json:"properties,omitempty"`
7380	// Etag - A unique read-only string that changes whenever the resource is updated.
7381	Etag *string `json:"etag,omitempty"`
7382	// ID - Resource ID.
7383	ID *string `json:"id,omitempty"`
7384	// Name - READ-ONLY; Resource name.
7385	Name *string `json:"name,omitempty"`
7386	// Type - READ-ONLY; Resource type.
7387	Type *string `json:"type,omitempty"`
7388	// Location - Resource location.
7389	Location *string `json:"location,omitempty"`
7390	// Tags - Resource tags.
7391	Tags map[string]*string `json:"tags"`
7392}
7393
7394// MarshalJSON is the custom marshaler for LocalNetworkGateway.
7395func (lng LocalNetworkGateway) MarshalJSON() ([]byte, error) {
7396	objectMap := make(map[string]interface{})
7397	if lng.LocalNetworkGatewayPropertiesFormat != nil {
7398		objectMap["properties"] = lng.LocalNetworkGatewayPropertiesFormat
7399	}
7400	if lng.Etag != nil {
7401		objectMap["etag"] = lng.Etag
7402	}
7403	if lng.ID != nil {
7404		objectMap["id"] = lng.ID
7405	}
7406	if lng.Location != nil {
7407		objectMap["location"] = lng.Location
7408	}
7409	if lng.Tags != nil {
7410		objectMap["tags"] = lng.Tags
7411	}
7412	return json.Marshal(objectMap)
7413}
7414
7415// UnmarshalJSON is the custom unmarshaler for LocalNetworkGateway struct.
7416func (lng *LocalNetworkGateway) UnmarshalJSON(body []byte) error {
7417	var m map[string]*json.RawMessage
7418	err := json.Unmarshal(body, &m)
7419	if err != nil {
7420		return err
7421	}
7422	for k, v := range m {
7423		switch k {
7424		case "properties":
7425			if v != nil {
7426				var localNetworkGatewayPropertiesFormat LocalNetworkGatewayPropertiesFormat
7427				err = json.Unmarshal(*v, &localNetworkGatewayPropertiesFormat)
7428				if err != nil {
7429					return err
7430				}
7431				lng.LocalNetworkGatewayPropertiesFormat = &localNetworkGatewayPropertiesFormat
7432			}
7433		case "etag":
7434			if v != nil {
7435				var etag string
7436				err = json.Unmarshal(*v, &etag)
7437				if err != nil {
7438					return err
7439				}
7440				lng.Etag = &etag
7441			}
7442		case "id":
7443			if v != nil {
7444				var ID string
7445				err = json.Unmarshal(*v, &ID)
7446				if err != nil {
7447					return err
7448				}
7449				lng.ID = &ID
7450			}
7451		case "name":
7452			if v != nil {
7453				var name string
7454				err = json.Unmarshal(*v, &name)
7455				if err != nil {
7456					return err
7457				}
7458				lng.Name = &name
7459			}
7460		case "type":
7461			if v != nil {
7462				var typeVar string
7463				err = json.Unmarshal(*v, &typeVar)
7464				if err != nil {
7465					return err
7466				}
7467				lng.Type = &typeVar
7468			}
7469		case "location":
7470			if v != nil {
7471				var location string
7472				err = json.Unmarshal(*v, &location)
7473				if err != nil {
7474					return err
7475				}
7476				lng.Location = &location
7477			}
7478		case "tags":
7479			if v != nil {
7480				var tags map[string]*string
7481				err = json.Unmarshal(*v, &tags)
7482				if err != nil {
7483					return err
7484				}
7485				lng.Tags = tags
7486			}
7487		}
7488	}
7489
7490	return nil
7491}
7492
7493// LocalNetworkGatewayListResult response for ListLocalNetworkGateways API service call.
7494type LocalNetworkGatewayListResult struct {
7495	autorest.Response `json:"-"`
7496	// Value - A list of local network gateways that exists in a resource group.
7497	Value *[]LocalNetworkGateway `json:"value,omitempty"`
7498	// NextLink - READ-ONLY; The URL to get the next set of results.
7499	NextLink *string `json:"nextLink,omitempty"`
7500}
7501
7502// MarshalJSON is the custom marshaler for LocalNetworkGatewayListResult.
7503func (lnglr LocalNetworkGatewayListResult) MarshalJSON() ([]byte, error) {
7504	objectMap := make(map[string]interface{})
7505	if lnglr.Value != nil {
7506		objectMap["value"] = lnglr.Value
7507	}
7508	return json.Marshal(objectMap)
7509}
7510
7511// LocalNetworkGatewayListResultIterator provides access to a complete listing of LocalNetworkGateway
7512// values.
7513type LocalNetworkGatewayListResultIterator struct {
7514	i    int
7515	page LocalNetworkGatewayListResultPage
7516}
7517
7518// NextWithContext advances to the next value.  If there was an error making
7519// the request the iterator does not advance and the error is returned.
7520func (iter *LocalNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
7521	if tracing.IsEnabled() {
7522		ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultIterator.NextWithContext")
7523		defer func() {
7524			sc := -1
7525			if iter.Response().Response.Response != nil {
7526				sc = iter.Response().Response.Response.StatusCode
7527			}
7528			tracing.EndSpan(ctx, sc, err)
7529		}()
7530	}
7531	iter.i++
7532	if iter.i < len(iter.page.Values()) {
7533		return nil
7534	}
7535	err = iter.page.NextWithContext(ctx)
7536	if err != nil {
7537		iter.i--
7538		return err
7539	}
7540	iter.i = 0
7541	return nil
7542}
7543
7544// Next advances to the next value.  If there was an error making
7545// the request the iterator does not advance and the error is returned.
7546// Deprecated: Use NextWithContext() instead.
7547func (iter *LocalNetworkGatewayListResultIterator) Next() error {
7548	return iter.NextWithContext(context.Background())
7549}
7550
7551// NotDone returns true if the enumeration should be started or is not yet complete.
7552func (iter LocalNetworkGatewayListResultIterator) NotDone() bool {
7553	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7554}
7555
7556// Response returns the raw server response from the last page request.
7557func (iter LocalNetworkGatewayListResultIterator) Response() LocalNetworkGatewayListResult {
7558	return iter.page.Response()
7559}
7560
7561// Value returns the current value or a zero-initialized value if the
7562// iterator has advanced beyond the end of the collection.
7563func (iter LocalNetworkGatewayListResultIterator) Value() LocalNetworkGateway {
7564	if !iter.page.NotDone() {
7565		return LocalNetworkGateway{}
7566	}
7567	return iter.page.Values()[iter.i]
7568}
7569
7570// Creates a new instance of the LocalNetworkGatewayListResultIterator type.
7571func NewLocalNetworkGatewayListResultIterator(page LocalNetworkGatewayListResultPage) LocalNetworkGatewayListResultIterator {
7572	return LocalNetworkGatewayListResultIterator{page: page}
7573}
7574
7575// IsEmpty returns true if the ListResult contains no values.
7576func (lnglr LocalNetworkGatewayListResult) IsEmpty() bool {
7577	return lnglr.Value == nil || len(*lnglr.Value) == 0
7578}
7579
7580// hasNextLink returns true if the NextLink is not empty.
7581func (lnglr LocalNetworkGatewayListResult) hasNextLink() bool {
7582	return lnglr.NextLink != nil && len(*lnglr.NextLink) != 0
7583}
7584
7585// localNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results.
7586// It returns nil if no more results exist.
7587func (lnglr LocalNetworkGatewayListResult) localNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
7588	if !lnglr.hasNextLink() {
7589		return nil, nil
7590	}
7591	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7592		autorest.AsJSON(),
7593		autorest.AsGet(),
7594		autorest.WithBaseURL(to.String(lnglr.NextLink)))
7595}
7596
7597// LocalNetworkGatewayListResultPage contains a page of LocalNetworkGateway values.
7598type LocalNetworkGatewayListResultPage struct {
7599	fn    func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)
7600	lnglr LocalNetworkGatewayListResult
7601}
7602
7603// NextWithContext advances to the next page of values.  If there was an error making
7604// the request the page does not advance and the error is returned.
7605func (page *LocalNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
7606	if tracing.IsEnabled() {
7607		ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultPage.NextWithContext")
7608		defer func() {
7609			sc := -1
7610			if page.Response().Response.Response != nil {
7611				sc = page.Response().Response.Response.StatusCode
7612			}
7613			tracing.EndSpan(ctx, sc, err)
7614		}()
7615	}
7616	for {
7617		next, err := page.fn(ctx, page.lnglr)
7618		if err != nil {
7619			return err
7620		}
7621		page.lnglr = next
7622		if !next.hasNextLink() || !next.IsEmpty() {
7623			break
7624		}
7625	}
7626	return nil
7627}
7628
7629// Next advances to the next page of values.  If there was an error making
7630// the request the page does not advance and the error is returned.
7631// Deprecated: Use NextWithContext() instead.
7632func (page *LocalNetworkGatewayListResultPage) Next() error {
7633	return page.NextWithContext(context.Background())
7634}
7635
7636// NotDone returns true if the page enumeration should be started or is not yet complete.
7637func (page LocalNetworkGatewayListResultPage) NotDone() bool {
7638	return !page.lnglr.IsEmpty()
7639}
7640
7641// Response returns the raw server response from the last page request.
7642func (page LocalNetworkGatewayListResultPage) Response() LocalNetworkGatewayListResult {
7643	return page.lnglr
7644}
7645
7646// Values returns the slice of values for the current page or nil if there are no values.
7647func (page LocalNetworkGatewayListResultPage) Values() []LocalNetworkGateway {
7648	if page.lnglr.IsEmpty() {
7649		return nil
7650	}
7651	return *page.lnglr.Value
7652}
7653
7654// Creates a new instance of the LocalNetworkGatewayListResultPage type.
7655func NewLocalNetworkGatewayListResultPage(cur LocalNetworkGatewayListResult, getNextPage func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)) LocalNetworkGatewayListResultPage {
7656	return LocalNetworkGatewayListResultPage{
7657		fn:    getNextPage,
7658		lnglr: cur,
7659	}
7660}
7661
7662// LocalNetworkGatewayPropertiesFormat localNetworkGateway properties
7663type LocalNetworkGatewayPropertiesFormat struct {
7664	// LocalNetworkAddressSpace - Local network site address space.
7665	LocalNetworkAddressSpace *AddressSpace `json:"localNetworkAddressSpace,omitempty"`
7666	// GatewayIPAddress - IP address of local network gateway.
7667	GatewayIPAddress *string `json:"gatewayIpAddress,omitempty"`
7668	// BgpSettings - Local network gateway's BGP speaker settings.
7669	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
7670	// ResourceGUID - The resource GUID property of the LocalNetworkGateway resource.
7671	ResourceGUID *string `json:"resourceGuid,omitempty"`
7672	// ProvisioningState - READ-ONLY; The provisioning state of the LocalNetworkGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
7673	ProvisioningState *string `json:"provisioningState,omitempty"`
7674}
7675
7676// MarshalJSON is the custom marshaler for LocalNetworkGatewayPropertiesFormat.
7677func (lngpf LocalNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
7678	objectMap := make(map[string]interface{})
7679	if lngpf.LocalNetworkAddressSpace != nil {
7680		objectMap["localNetworkAddressSpace"] = lngpf.LocalNetworkAddressSpace
7681	}
7682	if lngpf.GatewayIPAddress != nil {
7683		objectMap["gatewayIpAddress"] = lngpf.GatewayIPAddress
7684	}
7685	if lngpf.BgpSettings != nil {
7686		objectMap["bgpSettings"] = lngpf.BgpSettings
7687	}
7688	if lngpf.ResourceGUID != nil {
7689		objectMap["resourceGuid"] = lngpf.ResourceGUID
7690	}
7691	return json.Marshal(objectMap)
7692}
7693
7694// LocalNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
7695// long-running operation.
7696type LocalNetworkGatewaysCreateOrUpdateFuture struct {
7697	azure.FutureAPI
7698	// Result returns the result of the asynchronous operation.
7699	// If the operation has not completed it will return an error.
7700	Result func(LocalNetworkGatewaysClient) (LocalNetworkGateway, error)
7701}
7702
7703// LocalNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
7704// long-running operation.
7705type LocalNetworkGatewaysDeleteFuture struct {
7706	azure.FutureAPI
7707	// Result returns the result of the asynchronous operation.
7708	// If the operation has not completed it will return an error.
7709	Result func(LocalNetworkGatewaysClient) (autorest.Response, error)
7710}
7711
7712// NextHopParameters parameters that define the source and destination endpoint.
7713type NextHopParameters struct {
7714	// TargetResourceID - The resource identifier of the target resource against which the action is to be performed.
7715	TargetResourceID *string `json:"targetResourceId,omitempty"`
7716	// SourceIPAddress - The source IP address.
7717	SourceIPAddress *string `json:"sourceIPAddress,omitempty"`
7718	// DestinationIPAddress - The destination IP address.
7719	DestinationIPAddress *string `json:"destinationIPAddress,omitempty"`
7720	// 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).
7721	TargetNicResourceID *string `json:"targetNicResourceId,omitempty"`
7722}
7723
7724// NextHopResult the information about next hop from the specified VM.
7725type NextHopResult struct {
7726	autorest.Response `json:"-"`
7727	// NextHopType - Next hop type. Possible values include: 'NextHopTypeInternet', 'NextHopTypeVirtualAppliance', 'NextHopTypeVirtualNetworkGateway', 'NextHopTypeVnetLocal', 'NextHopTypeHyperNetGateway', 'NextHopTypeNone'
7728	NextHopType NextHopType `json:"nextHopType,omitempty"`
7729	// NextHopIPAddress - Next hop IP Address
7730	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
7731	// 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'.
7732	RouteTableID *string `json:"routeTableId,omitempty"`
7733}
7734
7735// OutboundNatRule outbound NAT pool of the load balancer.
7736type OutboundNatRule struct {
7737	// OutboundNatRulePropertiesFormat - Properties of load balancer outbound nat rule.
7738	*OutboundNatRulePropertiesFormat `json:"properties,omitempty"`
7739	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
7740	Name *string `json:"name,omitempty"`
7741	// Etag - A unique read-only string that changes whenever the resource is updated.
7742	Etag *string `json:"etag,omitempty"`
7743	// ID - Resource ID.
7744	ID *string `json:"id,omitempty"`
7745}
7746
7747// MarshalJSON is the custom marshaler for OutboundNatRule.
7748func (onr OutboundNatRule) MarshalJSON() ([]byte, error) {
7749	objectMap := make(map[string]interface{})
7750	if onr.OutboundNatRulePropertiesFormat != nil {
7751		objectMap["properties"] = onr.OutboundNatRulePropertiesFormat
7752	}
7753	if onr.Name != nil {
7754		objectMap["name"] = onr.Name
7755	}
7756	if onr.Etag != nil {
7757		objectMap["etag"] = onr.Etag
7758	}
7759	if onr.ID != nil {
7760		objectMap["id"] = onr.ID
7761	}
7762	return json.Marshal(objectMap)
7763}
7764
7765// UnmarshalJSON is the custom unmarshaler for OutboundNatRule struct.
7766func (onr *OutboundNatRule) UnmarshalJSON(body []byte) error {
7767	var m map[string]*json.RawMessage
7768	err := json.Unmarshal(body, &m)
7769	if err != nil {
7770		return err
7771	}
7772	for k, v := range m {
7773		switch k {
7774		case "properties":
7775			if v != nil {
7776				var outboundNatRulePropertiesFormat OutboundNatRulePropertiesFormat
7777				err = json.Unmarshal(*v, &outboundNatRulePropertiesFormat)
7778				if err != nil {
7779					return err
7780				}
7781				onr.OutboundNatRulePropertiesFormat = &outboundNatRulePropertiesFormat
7782			}
7783		case "name":
7784			if v != nil {
7785				var name string
7786				err = json.Unmarshal(*v, &name)
7787				if err != nil {
7788					return err
7789				}
7790				onr.Name = &name
7791			}
7792		case "etag":
7793			if v != nil {
7794				var etag string
7795				err = json.Unmarshal(*v, &etag)
7796				if err != nil {
7797					return err
7798				}
7799				onr.Etag = &etag
7800			}
7801		case "id":
7802			if v != nil {
7803				var ID string
7804				err = json.Unmarshal(*v, &ID)
7805				if err != nil {
7806					return err
7807				}
7808				onr.ID = &ID
7809			}
7810		}
7811	}
7812
7813	return nil
7814}
7815
7816// OutboundNatRulePropertiesFormat outbound NAT pool of the load balancer.
7817type OutboundNatRulePropertiesFormat struct {
7818	// AllocatedOutboundPorts - The number of outbound ports to be used for NAT.
7819	AllocatedOutboundPorts *int32 `json:"allocatedOutboundPorts,omitempty"`
7820	// FrontendIPConfigurations - The Frontend IP addresses of the load balancer.
7821	FrontendIPConfigurations *[]SubResource `json:"frontendIPConfigurations,omitempty"`
7822	// BackendAddressPool - A reference to a pool of DIPs. Outbound traffic is randomly load balanced across IPs in the backend IPs.
7823	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
7824	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
7825	ProvisioningState *string `json:"provisioningState,omitempty"`
7826}
7827
7828// PacketCapture parameters that define the create packet capture operation.
7829type PacketCapture struct {
7830	*PacketCaptureParameters `json:"properties,omitempty"`
7831}
7832
7833// MarshalJSON is the custom marshaler for PacketCapture.
7834func (pc PacketCapture) MarshalJSON() ([]byte, error) {
7835	objectMap := make(map[string]interface{})
7836	if pc.PacketCaptureParameters != nil {
7837		objectMap["properties"] = pc.PacketCaptureParameters
7838	}
7839	return json.Marshal(objectMap)
7840}
7841
7842// UnmarshalJSON is the custom unmarshaler for PacketCapture struct.
7843func (pc *PacketCapture) UnmarshalJSON(body []byte) error {
7844	var m map[string]*json.RawMessage
7845	err := json.Unmarshal(body, &m)
7846	if err != nil {
7847		return err
7848	}
7849	for k, v := range m {
7850		switch k {
7851		case "properties":
7852			if v != nil {
7853				var packetCaptureParameters PacketCaptureParameters
7854				err = json.Unmarshal(*v, &packetCaptureParameters)
7855				if err != nil {
7856					return err
7857				}
7858				pc.PacketCaptureParameters = &packetCaptureParameters
7859			}
7860		}
7861	}
7862
7863	return nil
7864}
7865
7866// PacketCaptureFilter filter that is applied to packet capture request. Multiple filters can be applied.
7867type PacketCaptureFilter struct {
7868	// Protocol - Protocol to be filtered on. Possible values include: 'PcProtocolTCP', 'PcProtocolUDP', 'PcProtocolAny'
7869	Protocol PcProtocol `json:"protocol,omitempty"`
7870	// 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.
7871	LocalIPAddress *string `json:"localIPAddress,omitempty"`
7872	// 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.
7873	RemoteIPAddress *string `json:"remoteIPAddress,omitempty"`
7874	// 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.
7875	LocalPort *string `json:"localPort,omitempty"`
7876	// 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.
7877	RemotePort *string `json:"remotePort,omitempty"`
7878}
7879
7880// PacketCaptureListResult list of packet capture sessions.
7881type PacketCaptureListResult struct {
7882	autorest.Response `json:"-"`
7883	// Value - Information about packet capture sessions.
7884	Value *[]PacketCaptureResult `json:"value,omitempty"`
7885}
7886
7887// PacketCaptureParameters parameters that define the create packet capture operation.
7888type PacketCaptureParameters struct {
7889	// Target - The ID of the targeted resource, only VM is currently supported.
7890	Target *string `json:"target,omitempty"`
7891	// BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated.
7892	BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"`
7893	// TotalBytesPerSession - Maximum size of the capture output.
7894	TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"`
7895	// TimeLimitInSeconds - Maximum duration of the capture session in seconds.
7896	TimeLimitInSeconds *int32                        `json:"timeLimitInSeconds,omitempty"`
7897	StorageLocation    *PacketCaptureStorageLocation `json:"storageLocation,omitempty"`
7898	Filters            *[]PacketCaptureFilter        `json:"filters,omitempty"`
7899}
7900
7901// PacketCaptureQueryStatusResult status of packet capture session.
7902type PacketCaptureQueryStatusResult struct {
7903	autorest.Response `json:"-"`
7904	// Name - The name of the packet capture resource.
7905	Name *string `json:"name,omitempty"`
7906	// ID - The ID of the packet capture resource.
7907	ID *string `json:"id,omitempty"`
7908	// CaptureStartTime - The start time of the packet capture session.
7909	CaptureStartTime *date.Time `json:"captureStartTime,omitempty"`
7910	// PacketCaptureStatus - The status of the packet capture session. Possible values include: 'PcStatusNotStarted', 'PcStatusRunning', 'PcStatusStopped', 'PcStatusError', 'PcStatusUnknown'
7911	PacketCaptureStatus PcStatus `json:"packetCaptureStatus,omitempty"`
7912	// StopReason - The reason the current packet capture session was stopped.
7913	StopReason *string `json:"stopReason,omitempty"`
7914	// PacketCaptureError - List of errors of packet capture session.
7915	PacketCaptureError *[]PcError `json:"packetCaptureError,omitempty"`
7916}
7917
7918// PacketCaptureResult information about packet capture session.
7919type PacketCaptureResult struct {
7920	autorest.Response `json:"-"`
7921	// Name - READ-ONLY; Name of the packet capture session.
7922	Name *string `json:"name,omitempty"`
7923	// ID - READ-ONLY; ID of the packet capture operation.
7924	ID                             *string `json:"id,omitempty"`
7925	Etag                           *string `json:"etag,omitempty"`
7926	*PacketCaptureResultProperties `json:"properties,omitempty"`
7927}
7928
7929// MarshalJSON is the custom marshaler for PacketCaptureResult.
7930func (pcr PacketCaptureResult) MarshalJSON() ([]byte, error) {
7931	objectMap := make(map[string]interface{})
7932	if pcr.Etag != nil {
7933		objectMap["etag"] = pcr.Etag
7934	}
7935	if pcr.PacketCaptureResultProperties != nil {
7936		objectMap["properties"] = pcr.PacketCaptureResultProperties
7937	}
7938	return json.Marshal(objectMap)
7939}
7940
7941// UnmarshalJSON is the custom unmarshaler for PacketCaptureResult struct.
7942func (pcr *PacketCaptureResult) UnmarshalJSON(body []byte) error {
7943	var m map[string]*json.RawMessage
7944	err := json.Unmarshal(body, &m)
7945	if err != nil {
7946		return err
7947	}
7948	for k, v := range m {
7949		switch k {
7950		case "name":
7951			if v != nil {
7952				var name string
7953				err = json.Unmarshal(*v, &name)
7954				if err != nil {
7955					return err
7956				}
7957				pcr.Name = &name
7958			}
7959		case "id":
7960			if v != nil {
7961				var ID string
7962				err = json.Unmarshal(*v, &ID)
7963				if err != nil {
7964					return err
7965				}
7966				pcr.ID = &ID
7967			}
7968		case "etag":
7969			if v != nil {
7970				var etag string
7971				err = json.Unmarshal(*v, &etag)
7972				if err != nil {
7973					return err
7974				}
7975				pcr.Etag = &etag
7976			}
7977		case "properties":
7978			if v != nil {
7979				var packetCaptureResultProperties PacketCaptureResultProperties
7980				err = json.Unmarshal(*v, &packetCaptureResultProperties)
7981				if err != nil {
7982					return err
7983				}
7984				pcr.PacketCaptureResultProperties = &packetCaptureResultProperties
7985			}
7986		}
7987	}
7988
7989	return nil
7990}
7991
7992// PacketCaptureResultProperties describes the properties of a packet capture session.
7993type PacketCaptureResultProperties struct {
7994	// ProvisioningState - The provisioning state of the packet capture session. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
7995	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
7996	// Target - The ID of the targeted resource, only VM is currently supported.
7997	Target *string `json:"target,omitempty"`
7998	// BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated.
7999	BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"`
8000	// TotalBytesPerSession - Maximum size of the capture output.
8001	TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"`
8002	// TimeLimitInSeconds - Maximum duration of the capture session in seconds.
8003	TimeLimitInSeconds *int32                        `json:"timeLimitInSeconds,omitempty"`
8004	StorageLocation    *PacketCaptureStorageLocation `json:"storageLocation,omitempty"`
8005	Filters            *[]PacketCaptureFilter        `json:"filters,omitempty"`
8006}
8007
8008// PacketCapturesCreateFuture an abstraction for monitoring and retrieving the results of a long-running
8009// operation.
8010type PacketCapturesCreateFuture struct {
8011	azure.FutureAPI
8012	// Result returns the result of the asynchronous operation.
8013	// If the operation has not completed it will return an error.
8014	Result func(PacketCapturesClient) (PacketCaptureResult, error)
8015}
8016
8017// PacketCapturesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
8018// operation.
8019type PacketCapturesDeleteFuture struct {
8020	azure.FutureAPI
8021	// Result returns the result of the asynchronous operation.
8022	// If the operation has not completed it will return an error.
8023	Result func(PacketCapturesClient) (autorest.Response, error)
8024}
8025
8026// PacketCapturesGetStatusFuture an abstraction for monitoring and retrieving the results of a long-running
8027// operation.
8028type PacketCapturesGetStatusFuture struct {
8029	azure.FutureAPI
8030	// Result returns the result of the asynchronous operation.
8031	// If the operation has not completed it will return an error.
8032	Result func(PacketCapturesClient) (PacketCaptureQueryStatusResult, error)
8033}
8034
8035// PacketCapturesStopFuture an abstraction for monitoring and retrieving the results of a long-running
8036// operation.
8037type PacketCapturesStopFuture struct {
8038	azure.FutureAPI
8039	// Result returns the result of the asynchronous operation.
8040	// If the operation has not completed it will return an error.
8041	Result func(PacketCapturesClient) (autorest.Response, error)
8042}
8043
8044// PacketCaptureStorageLocation describes the storage location for a packet capture session.
8045type PacketCaptureStorageLocation struct {
8046	// StorageID - The ID of the storage account to save the packet capture session. Required if no local file path is provided.
8047	StorageID *string `json:"storageId,omitempty"`
8048	// 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.
8049	StoragePath *string `json:"storagePath,omitempty"`
8050	// 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.
8051	FilePath *string `json:"filePath,omitempty"`
8052}
8053
8054// PatchRouteFilter route Filter Resource.
8055type PatchRouteFilter struct {
8056	*RouteFilterPropertiesFormat `json:"properties,omitempty"`
8057	// Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource.
8058	Name *string `json:"name,omitempty"`
8059	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
8060	Etag *string `json:"etag,omitempty"`
8061	// Type - READ-ONLY; Resource type.
8062	Type *string `json:"type,omitempty"`
8063	// Tags - Resource tags.
8064	Tags map[string]*string `json:"tags"`
8065	// ID - Resource ID.
8066	ID *string `json:"id,omitempty"`
8067}
8068
8069// MarshalJSON is the custom marshaler for PatchRouteFilter.
8070func (prf PatchRouteFilter) MarshalJSON() ([]byte, error) {
8071	objectMap := make(map[string]interface{})
8072	if prf.RouteFilterPropertiesFormat != nil {
8073		objectMap["properties"] = prf.RouteFilterPropertiesFormat
8074	}
8075	if prf.Tags != nil {
8076		objectMap["tags"] = prf.Tags
8077	}
8078	if prf.ID != nil {
8079		objectMap["id"] = prf.ID
8080	}
8081	return json.Marshal(objectMap)
8082}
8083
8084// UnmarshalJSON is the custom unmarshaler for PatchRouteFilter struct.
8085func (prf *PatchRouteFilter) UnmarshalJSON(body []byte) error {
8086	var m map[string]*json.RawMessage
8087	err := json.Unmarshal(body, &m)
8088	if err != nil {
8089		return err
8090	}
8091	for k, v := range m {
8092		switch k {
8093		case "properties":
8094			if v != nil {
8095				var routeFilterPropertiesFormat RouteFilterPropertiesFormat
8096				err = json.Unmarshal(*v, &routeFilterPropertiesFormat)
8097				if err != nil {
8098					return err
8099				}
8100				prf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat
8101			}
8102		case "name":
8103			if v != nil {
8104				var name string
8105				err = json.Unmarshal(*v, &name)
8106				if err != nil {
8107					return err
8108				}
8109				prf.Name = &name
8110			}
8111		case "etag":
8112			if v != nil {
8113				var etag string
8114				err = json.Unmarshal(*v, &etag)
8115				if err != nil {
8116					return err
8117				}
8118				prf.Etag = &etag
8119			}
8120		case "type":
8121			if v != nil {
8122				var typeVar string
8123				err = json.Unmarshal(*v, &typeVar)
8124				if err != nil {
8125					return err
8126				}
8127				prf.Type = &typeVar
8128			}
8129		case "tags":
8130			if v != nil {
8131				var tags map[string]*string
8132				err = json.Unmarshal(*v, &tags)
8133				if err != nil {
8134					return err
8135				}
8136				prf.Tags = tags
8137			}
8138		case "id":
8139			if v != nil {
8140				var ID string
8141				err = json.Unmarshal(*v, &ID)
8142				if err != nil {
8143					return err
8144				}
8145				prf.ID = &ID
8146			}
8147		}
8148	}
8149
8150	return nil
8151}
8152
8153// PatchRouteFilterRule route Filter Rule Resource
8154type PatchRouteFilterRule struct {
8155	*RouteFilterRulePropertiesFormat `json:"properties,omitempty"`
8156	// Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource.
8157	Name *string `json:"name,omitempty"`
8158	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
8159	Etag *string `json:"etag,omitempty"`
8160	// Tags - Resource tags.
8161	Tags map[string]*string `json:"tags"`
8162	// ID - Resource ID.
8163	ID *string `json:"id,omitempty"`
8164}
8165
8166// MarshalJSON is the custom marshaler for PatchRouteFilterRule.
8167func (prfr PatchRouteFilterRule) MarshalJSON() ([]byte, error) {
8168	objectMap := make(map[string]interface{})
8169	if prfr.RouteFilterRulePropertiesFormat != nil {
8170		objectMap["properties"] = prfr.RouteFilterRulePropertiesFormat
8171	}
8172	if prfr.Tags != nil {
8173		objectMap["tags"] = prfr.Tags
8174	}
8175	if prfr.ID != nil {
8176		objectMap["id"] = prfr.ID
8177	}
8178	return json.Marshal(objectMap)
8179}
8180
8181// UnmarshalJSON is the custom unmarshaler for PatchRouteFilterRule struct.
8182func (prfr *PatchRouteFilterRule) UnmarshalJSON(body []byte) error {
8183	var m map[string]*json.RawMessage
8184	err := json.Unmarshal(body, &m)
8185	if err != nil {
8186		return err
8187	}
8188	for k, v := range m {
8189		switch k {
8190		case "properties":
8191			if v != nil {
8192				var routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat
8193				err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat)
8194				if err != nil {
8195					return err
8196				}
8197				prfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat
8198			}
8199		case "name":
8200			if v != nil {
8201				var name string
8202				err = json.Unmarshal(*v, &name)
8203				if err != nil {
8204					return err
8205				}
8206				prfr.Name = &name
8207			}
8208		case "etag":
8209			if v != nil {
8210				var etag string
8211				err = json.Unmarshal(*v, &etag)
8212				if err != nil {
8213					return err
8214				}
8215				prfr.Etag = &etag
8216			}
8217		case "tags":
8218			if v != nil {
8219				var tags map[string]*string
8220				err = json.Unmarshal(*v, &tags)
8221				if err != nil {
8222					return err
8223				}
8224				prfr.Tags = tags
8225			}
8226		case "id":
8227			if v != nil {
8228				var ID string
8229				err = json.Unmarshal(*v, &ID)
8230				if err != nil {
8231					return err
8232				}
8233				prfr.ID = &ID
8234			}
8235		}
8236	}
8237
8238	return nil
8239}
8240
8241// Probe a load balancer probe.
8242type Probe struct {
8243	autorest.Response `json:"-"`
8244	// ProbePropertiesFormat - Properties of load balancer probe.
8245	*ProbePropertiesFormat `json:"properties,omitempty"`
8246	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
8247	Name *string `json:"name,omitempty"`
8248	// Etag - A unique read-only string that changes whenever the resource is updated.
8249	Etag *string `json:"etag,omitempty"`
8250	// ID - Resource ID.
8251	ID *string `json:"id,omitempty"`
8252}
8253
8254// MarshalJSON is the custom marshaler for Probe.
8255func (p Probe) MarshalJSON() ([]byte, error) {
8256	objectMap := make(map[string]interface{})
8257	if p.ProbePropertiesFormat != nil {
8258		objectMap["properties"] = p.ProbePropertiesFormat
8259	}
8260	if p.Name != nil {
8261		objectMap["name"] = p.Name
8262	}
8263	if p.Etag != nil {
8264		objectMap["etag"] = p.Etag
8265	}
8266	if p.ID != nil {
8267		objectMap["id"] = p.ID
8268	}
8269	return json.Marshal(objectMap)
8270}
8271
8272// UnmarshalJSON is the custom unmarshaler for Probe struct.
8273func (p *Probe) UnmarshalJSON(body []byte) error {
8274	var m map[string]*json.RawMessage
8275	err := json.Unmarshal(body, &m)
8276	if err != nil {
8277		return err
8278	}
8279	for k, v := range m {
8280		switch k {
8281		case "properties":
8282			if v != nil {
8283				var probePropertiesFormat ProbePropertiesFormat
8284				err = json.Unmarshal(*v, &probePropertiesFormat)
8285				if err != nil {
8286					return err
8287				}
8288				p.ProbePropertiesFormat = &probePropertiesFormat
8289			}
8290		case "name":
8291			if v != nil {
8292				var name string
8293				err = json.Unmarshal(*v, &name)
8294				if err != nil {
8295					return err
8296				}
8297				p.Name = &name
8298			}
8299		case "etag":
8300			if v != nil {
8301				var etag string
8302				err = json.Unmarshal(*v, &etag)
8303				if err != nil {
8304					return err
8305				}
8306				p.Etag = &etag
8307			}
8308		case "id":
8309			if v != nil {
8310				var ID string
8311				err = json.Unmarshal(*v, &ID)
8312				if err != nil {
8313					return err
8314				}
8315				p.ID = &ID
8316			}
8317		}
8318	}
8319
8320	return nil
8321}
8322
8323// ProbePropertiesFormat load balancer probe resource.
8324type ProbePropertiesFormat struct {
8325	// LoadBalancingRules - READ-ONLY; The load balancer rules that use this probe.
8326	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
8327	// Protocol - The protocol of the end point. Possible values are: 'Http' or 'Tcp'. If 'Tcp' is specified, a received ACK is required for the probe to be successful. If 'Http' is specified, a 200 OK response from the specifies URI is required for the probe to be successful. Possible values include: 'ProbeProtocolHTTP', 'ProbeProtocolTCP'
8328	Protocol ProbeProtocol `json:"protocol,omitempty"`
8329	// Port - The port for communicating the probe. Possible values range from 1 to 65535, inclusive.
8330	Port *int32 `json:"port,omitempty"`
8331	// 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.
8332	IntervalInSeconds *int32 `json:"intervalInSeconds,omitempty"`
8333	// 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.
8334	NumberOfProbes *int32 `json:"numberOfProbes,omitempty"`
8335	// 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.
8336	RequestPath *string `json:"requestPath,omitempty"`
8337	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
8338	ProvisioningState *string `json:"provisioningState,omitempty"`
8339}
8340
8341// MarshalJSON is the custom marshaler for ProbePropertiesFormat.
8342func (ppf ProbePropertiesFormat) MarshalJSON() ([]byte, error) {
8343	objectMap := make(map[string]interface{})
8344	if ppf.Protocol != "" {
8345		objectMap["protocol"] = ppf.Protocol
8346	}
8347	if ppf.Port != nil {
8348		objectMap["port"] = ppf.Port
8349	}
8350	if ppf.IntervalInSeconds != nil {
8351		objectMap["intervalInSeconds"] = ppf.IntervalInSeconds
8352	}
8353	if ppf.NumberOfProbes != nil {
8354		objectMap["numberOfProbes"] = ppf.NumberOfProbes
8355	}
8356	if ppf.RequestPath != nil {
8357		objectMap["requestPath"] = ppf.RequestPath
8358	}
8359	if ppf.ProvisioningState != nil {
8360		objectMap["provisioningState"] = ppf.ProvisioningState
8361	}
8362	return json.Marshal(objectMap)
8363}
8364
8365// PublicIPAddress public IP address resource.
8366type PublicIPAddress struct {
8367	autorest.Response `json:"-"`
8368	// PublicIPAddressPropertiesFormat - Public IP address properties.
8369	*PublicIPAddressPropertiesFormat `json:"properties,omitempty"`
8370	// Etag - A unique read-only string that changes whenever the resource is updated.
8371	Etag *string `json:"etag,omitempty"`
8372	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
8373	Zones *[]string `json:"zones,omitempty"`
8374	// ID - Resource ID.
8375	ID *string `json:"id,omitempty"`
8376	// Name - READ-ONLY; Resource name.
8377	Name *string `json:"name,omitempty"`
8378	// Type - READ-ONLY; Resource type.
8379	Type *string `json:"type,omitempty"`
8380	// Location - Resource location.
8381	Location *string `json:"location,omitempty"`
8382	// Tags - Resource tags.
8383	Tags map[string]*string `json:"tags"`
8384}
8385
8386// MarshalJSON is the custom marshaler for PublicIPAddress.
8387func (pia PublicIPAddress) MarshalJSON() ([]byte, error) {
8388	objectMap := make(map[string]interface{})
8389	if pia.PublicIPAddressPropertiesFormat != nil {
8390		objectMap["properties"] = pia.PublicIPAddressPropertiesFormat
8391	}
8392	if pia.Etag != nil {
8393		objectMap["etag"] = pia.Etag
8394	}
8395	if pia.Zones != nil {
8396		objectMap["zones"] = pia.Zones
8397	}
8398	if pia.ID != nil {
8399		objectMap["id"] = pia.ID
8400	}
8401	if pia.Location != nil {
8402		objectMap["location"] = pia.Location
8403	}
8404	if pia.Tags != nil {
8405		objectMap["tags"] = pia.Tags
8406	}
8407	return json.Marshal(objectMap)
8408}
8409
8410// UnmarshalJSON is the custom unmarshaler for PublicIPAddress struct.
8411func (pia *PublicIPAddress) UnmarshalJSON(body []byte) error {
8412	var m map[string]*json.RawMessage
8413	err := json.Unmarshal(body, &m)
8414	if err != nil {
8415		return err
8416	}
8417	for k, v := range m {
8418		switch k {
8419		case "properties":
8420			if v != nil {
8421				var publicIPAddressPropertiesFormat PublicIPAddressPropertiesFormat
8422				err = json.Unmarshal(*v, &publicIPAddressPropertiesFormat)
8423				if err != nil {
8424					return err
8425				}
8426				pia.PublicIPAddressPropertiesFormat = &publicIPAddressPropertiesFormat
8427			}
8428		case "etag":
8429			if v != nil {
8430				var etag string
8431				err = json.Unmarshal(*v, &etag)
8432				if err != nil {
8433					return err
8434				}
8435				pia.Etag = &etag
8436			}
8437		case "zones":
8438			if v != nil {
8439				var zones []string
8440				err = json.Unmarshal(*v, &zones)
8441				if err != nil {
8442					return err
8443				}
8444				pia.Zones = &zones
8445			}
8446		case "id":
8447			if v != nil {
8448				var ID string
8449				err = json.Unmarshal(*v, &ID)
8450				if err != nil {
8451					return err
8452				}
8453				pia.ID = &ID
8454			}
8455		case "name":
8456			if v != nil {
8457				var name string
8458				err = json.Unmarshal(*v, &name)
8459				if err != nil {
8460					return err
8461				}
8462				pia.Name = &name
8463			}
8464		case "type":
8465			if v != nil {
8466				var typeVar string
8467				err = json.Unmarshal(*v, &typeVar)
8468				if err != nil {
8469					return err
8470				}
8471				pia.Type = &typeVar
8472			}
8473		case "location":
8474			if v != nil {
8475				var location string
8476				err = json.Unmarshal(*v, &location)
8477				if err != nil {
8478					return err
8479				}
8480				pia.Location = &location
8481			}
8482		case "tags":
8483			if v != nil {
8484				var tags map[string]*string
8485				err = json.Unmarshal(*v, &tags)
8486				if err != nil {
8487					return err
8488				}
8489				pia.Tags = tags
8490			}
8491		}
8492	}
8493
8494	return nil
8495}
8496
8497// PublicIPAddressDNSSettings contains FQDN of the DNS record associated with the public IP address
8498type PublicIPAddressDNSSettings struct {
8499	// 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.
8500	DomainNameLabel *string `json:"domainNameLabel,omitempty"`
8501	// 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.
8502	Fqdn *string `json:"fqdn,omitempty"`
8503	// 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.
8504	ReverseFqdn *string `json:"reverseFqdn,omitempty"`
8505}
8506
8507// PublicIPAddressesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
8508// long-running operation.
8509type PublicIPAddressesCreateOrUpdateFuture struct {
8510	azure.FutureAPI
8511	// Result returns the result of the asynchronous operation.
8512	// If the operation has not completed it will return an error.
8513	Result func(PublicIPAddressesClient) (PublicIPAddress, error)
8514}
8515
8516// PublicIPAddressesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
8517// operation.
8518type PublicIPAddressesDeleteFuture struct {
8519	azure.FutureAPI
8520	// Result returns the result of the asynchronous operation.
8521	// If the operation has not completed it will return an error.
8522	Result func(PublicIPAddressesClient) (autorest.Response, error)
8523}
8524
8525// PublicIPAddressListResult response for ListPublicIpAddresses API service call.
8526type PublicIPAddressListResult struct {
8527	autorest.Response `json:"-"`
8528	// Value - A list of public IP addresses that exists in a resource group.
8529	Value *[]PublicIPAddress `json:"value,omitempty"`
8530	// NextLink - The URL to get the next set of results.
8531	NextLink *string `json:"nextLink,omitempty"`
8532}
8533
8534// PublicIPAddressListResultIterator provides access to a complete listing of PublicIPAddress values.
8535type PublicIPAddressListResultIterator struct {
8536	i    int
8537	page PublicIPAddressListResultPage
8538}
8539
8540// NextWithContext advances to the next value.  If there was an error making
8541// the request the iterator does not advance and the error is returned.
8542func (iter *PublicIPAddressListResultIterator) NextWithContext(ctx context.Context) (err error) {
8543	if tracing.IsEnabled() {
8544		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultIterator.NextWithContext")
8545		defer func() {
8546			sc := -1
8547			if iter.Response().Response.Response != nil {
8548				sc = iter.Response().Response.Response.StatusCode
8549			}
8550			tracing.EndSpan(ctx, sc, err)
8551		}()
8552	}
8553	iter.i++
8554	if iter.i < len(iter.page.Values()) {
8555		return nil
8556	}
8557	err = iter.page.NextWithContext(ctx)
8558	if err != nil {
8559		iter.i--
8560		return err
8561	}
8562	iter.i = 0
8563	return nil
8564}
8565
8566// Next advances to the next value.  If there was an error making
8567// the request the iterator does not advance and the error is returned.
8568// Deprecated: Use NextWithContext() instead.
8569func (iter *PublicIPAddressListResultIterator) Next() error {
8570	return iter.NextWithContext(context.Background())
8571}
8572
8573// NotDone returns true if the enumeration should be started or is not yet complete.
8574func (iter PublicIPAddressListResultIterator) NotDone() bool {
8575	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8576}
8577
8578// Response returns the raw server response from the last page request.
8579func (iter PublicIPAddressListResultIterator) Response() PublicIPAddressListResult {
8580	return iter.page.Response()
8581}
8582
8583// Value returns the current value or a zero-initialized value if the
8584// iterator has advanced beyond the end of the collection.
8585func (iter PublicIPAddressListResultIterator) Value() PublicIPAddress {
8586	if !iter.page.NotDone() {
8587		return PublicIPAddress{}
8588	}
8589	return iter.page.Values()[iter.i]
8590}
8591
8592// Creates a new instance of the PublicIPAddressListResultIterator type.
8593func NewPublicIPAddressListResultIterator(page PublicIPAddressListResultPage) PublicIPAddressListResultIterator {
8594	return PublicIPAddressListResultIterator{page: page}
8595}
8596
8597// IsEmpty returns true if the ListResult contains no values.
8598func (pialr PublicIPAddressListResult) IsEmpty() bool {
8599	return pialr.Value == nil || len(*pialr.Value) == 0
8600}
8601
8602// hasNextLink returns true if the NextLink is not empty.
8603func (pialr PublicIPAddressListResult) hasNextLink() bool {
8604	return pialr.NextLink != nil && len(*pialr.NextLink) != 0
8605}
8606
8607// publicIPAddressListResultPreparer prepares a request to retrieve the next set of results.
8608// It returns nil if no more results exist.
8609func (pialr PublicIPAddressListResult) publicIPAddressListResultPreparer(ctx context.Context) (*http.Request, error) {
8610	if !pialr.hasNextLink() {
8611		return nil, nil
8612	}
8613	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8614		autorest.AsJSON(),
8615		autorest.AsGet(),
8616		autorest.WithBaseURL(to.String(pialr.NextLink)))
8617}
8618
8619// PublicIPAddressListResultPage contains a page of PublicIPAddress values.
8620type PublicIPAddressListResultPage struct {
8621	fn    func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)
8622	pialr PublicIPAddressListResult
8623}
8624
8625// NextWithContext advances to the next page of values.  If there was an error making
8626// the request the page does not advance and the error is returned.
8627func (page *PublicIPAddressListResultPage) NextWithContext(ctx context.Context) (err error) {
8628	if tracing.IsEnabled() {
8629		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultPage.NextWithContext")
8630		defer func() {
8631			sc := -1
8632			if page.Response().Response.Response != nil {
8633				sc = page.Response().Response.Response.StatusCode
8634			}
8635			tracing.EndSpan(ctx, sc, err)
8636		}()
8637	}
8638	for {
8639		next, err := page.fn(ctx, page.pialr)
8640		if err != nil {
8641			return err
8642		}
8643		page.pialr = next
8644		if !next.hasNextLink() || !next.IsEmpty() {
8645			break
8646		}
8647	}
8648	return nil
8649}
8650
8651// Next advances to the next page of values.  If there was an error making
8652// the request the page does not advance and the error is returned.
8653// Deprecated: Use NextWithContext() instead.
8654func (page *PublicIPAddressListResultPage) Next() error {
8655	return page.NextWithContext(context.Background())
8656}
8657
8658// NotDone returns true if the page enumeration should be started or is not yet complete.
8659func (page PublicIPAddressListResultPage) NotDone() bool {
8660	return !page.pialr.IsEmpty()
8661}
8662
8663// Response returns the raw server response from the last page request.
8664func (page PublicIPAddressListResultPage) Response() PublicIPAddressListResult {
8665	return page.pialr
8666}
8667
8668// Values returns the slice of values for the current page or nil if there are no values.
8669func (page PublicIPAddressListResultPage) Values() []PublicIPAddress {
8670	if page.pialr.IsEmpty() {
8671		return nil
8672	}
8673	return *page.pialr.Value
8674}
8675
8676// Creates a new instance of the PublicIPAddressListResultPage type.
8677func NewPublicIPAddressListResultPage(cur PublicIPAddressListResult, getNextPage func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)) PublicIPAddressListResultPage {
8678	return PublicIPAddressListResultPage{
8679		fn:    getNextPage,
8680		pialr: cur,
8681	}
8682}
8683
8684// PublicIPAddressPropertiesFormat public IP address properties.
8685type PublicIPAddressPropertiesFormat struct {
8686	// PublicIPAllocationMethod - The public IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
8687	PublicIPAllocationMethod IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"`
8688	// PublicIPAddressVersion - The public IP address version. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6'
8689	PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"`
8690	// IPConfiguration - READ-ONLY; The IP configuration associated with the public IP address.
8691	IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"`
8692	// DNSSettings - The FQDN of the DNS record associated with the public IP address.
8693	DNSSettings *PublicIPAddressDNSSettings `json:"dnsSettings,omitempty"`
8694	// IPAddress - The IP address associated with the public IP address resource.
8695	IPAddress *string `json:"ipAddress,omitempty"`
8696	// IdleTimeoutInMinutes - The idle timeout of the public IP address.
8697	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
8698	// ResourceGUID - The resource GUID property of the public IP resource.
8699	ResourceGUID *string `json:"resourceGuid,omitempty"`
8700	// ProvisioningState - The provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
8701	ProvisioningState *string `json:"provisioningState,omitempty"`
8702}
8703
8704// MarshalJSON is the custom marshaler for PublicIPAddressPropertiesFormat.
8705func (piapf PublicIPAddressPropertiesFormat) MarshalJSON() ([]byte, error) {
8706	objectMap := make(map[string]interface{})
8707	if piapf.PublicIPAllocationMethod != "" {
8708		objectMap["publicIPAllocationMethod"] = piapf.PublicIPAllocationMethod
8709	}
8710	if piapf.PublicIPAddressVersion != "" {
8711		objectMap["publicIPAddressVersion"] = piapf.PublicIPAddressVersion
8712	}
8713	if piapf.DNSSettings != nil {
8714		objectMap["dnsSettings"] = piapf.DNSSettings
8715	}
8716	if piapf.IPAddress != nil {
8717		objectMap["ipAddress"] = piapf.IPAddress
8718	}
8719	if piapf.IdleTimeoutInMinutes != nil {
8720		objectMap["idleTimeoutInMinutes"] = piapf.IdleTimeoutInMinutes
8721	}
8722	if piapf.ResourceGUID != nil {
8723		objectMap["resourceGuid"] = piapf.ResourceGUID
8724	}
8725	if piapf.ProvisioningState != nil {
8726		objectMap["provisioningState"] = piapf.ProvisioningState
8727	}
8728	return json.Marshal(objectMap)
8729}
8730
8731// QueryTroubleshootingParameters parameters that define the resource to query the troubleshooting result.
8732type QueryTroubleshootingParameters struct {
8733	// TargetResourceID - The target resource ID to query the troubleshooting result.
8734	TargetResourceID *string `json:"targetResourceId,omitempty"`
8735}
8736
8737// Resource common resource representation.
8738type Resource struct {
8739	// ID - Resource ID.
8740	ID *string `json:"id,omitempty"`
8741	// Name - READ-ONLY; Resource name.
8742	Name *string `json:"name,omitempty"`
8743	// Type - READ-ONLY; Resource type.
8744	Type *string `json:"type,omitempty"`
8745	// Location - Resource location.
8746	Location *string `json:"location,omitempty"`
8747	// Tags - Resource tags.
8748	Tags map[string]*string `json:"tags"`
8749}
8750
8751// MarshalJSON is the custom marshaler for Resource.
8752func (r Resource) MarshalJSON() ([]byte, error) {
8753	objectMap := make(map[string]interface{})
8754	if r.ID != nil {
8755		objectMap["id"] = r.ID
8756	}
8757	if r.Location != nil {
8758		objectMap["location"] = r.Location
8759	}
8760	if r.Tags != nil {
8761		objectMap["tags"] = r.Tags
8762	}
8763	return json.Marshal(objectMap)
8764}
8765
8766// ResourceNavigationLink resourceNavigationLink resource.
8767type ResourceNavigationLink struct {
8768	// ResourceNavigationLinkFormat - Resource navigation link properties format.
8769	*ResourceNavigationLinkFormat `json:"properties,omitempty"`
8770	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
8771	Name *string `json:"name,omitempty"`
8772	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
8773	Etag *string `json:"etag,omitempty"`
8774	// ID - Resource ID.
8775	ID *string `json:"id,omitempty"`
8776}
8777
8778// MarshalJSON is the custom marshaler for ResourceNavigationLink.
8779func (rnl ResourceNavigationLink) MarshalJSON() ([]byte, error) {
8780	objectMap := make(map[string]interface{})
8781	if rnl.ResourceNavigationLinkFormat != nil {
8782		objectMap["properties"] = rnl.ResourceNavigationLinkFormat
8783	}
8784	if rnl.Name != nil {
8785		objectMap["name"] = rnl.Name
8786	}
8787	if rnl.ID != nil {
8788		objectMap["id"] = rnl.ID
8789	}
8790	return json.Marshal(objectMap)
8791}
8792
8793// UnmarshalJSON is the custom unmarshaler for ResourceNavigationLink struct.
8794func (rnl *ResourceNavigationLink) UnmarshalJSON(body []byte) error {
8795	var m map[string]*json.RawMessage
8796	err := json.Unmarshal(body, &m)
8797	if err != nil {
8798		return err
8799	}
8800	for k, v := range m {
8801		switch k {
8802		case "properties":
8803			if v != nil {
8804				var resourceNavigationLinkFormat ResourceNavigationLinkFormat
8805				err = json.Unmarshal(*v, &resourceNavigationLinkFormat)
8806				if err != nil {
8807					return err
8808				}
8809				rnl.ResourceNavigationLinkFormat = &resourceNavigationLinkFormat
8810			}
8811		case "name":
8812			if v != nil {
8813				var name string
8814				err = json.Unmarshal(*v, &name)
8815				if err != nil {
8816					return err
8817				}
8818				rnl.Name = &name
8819			}
8820		case "etag":
8821			if v != nil {
8822				var etag string
8823				err = json.Unmarshal(*v, &etag)
8824				if err != nil {
8825					return err
8826				}
8827				rnl.Etag = &etag
8828			}
8829		case "id":
8830			if v != nil {
8831				var ID string
8832				err = json.Unmarshal(*v, &ID)
8833				if err != nil {
8834					return err
8835				}
8836				rnl.ID = &ID
8837			}
8838		}
8839	}
8840
8841	return nil
8842}
8843
8844// ResourceNavigationLinkFormat properties of ResourceNavigationLink.
8845type ResourceNavigationLinkFormat struct {
8846	// LinkedResourceType - Resource type of the linked resource.
8847	LinkedResourceType *string `json:"linkedResourceType,omitempty"`
8848	// Link - Link to the external resource
8849	Link *string `json:"link,omitempty"`
8850	// ProvisioningState - READ-ONLY; Provisioning state of the ResourceNavigationLink resource.
8851	ProvisioningState *string `json:"provisioningState,omitempty"`
8852}
8853
8854// MarshalJSON is the custom marshaler for ResourceNavigationLinkFormat.
8855func (rnlf ResourceNavigationLinkFormat) MarshalJSON() ([]byte, error) {
8856	objectMap := make(map[string]interface{})
8857	if rnlf.LinkedResourceType != nil {
8858		objectMap["linkedResourceType"] = rnlf.LinkedResourceType
8859	}
8860	if rnlf.Link != nil {
8861		objectMap["link"] = rnlf.Link
8862	}
8863	return json.Marshal(objectMap)
8864}
8865
8866// RetentionPolicyParameters parameters that define the retention policy for flow log.
8867type RetentionPolicyParameters struct {
8868	// Days - Number of days to retain flow log records.
8869	Days *int32 `json:"days,omitempty"`
8870	// Enabled - Flag to enable/disable retention.
8871	Enabled *bool `json:"enabled,omitempty"`
8872}
8873
8874// Route route resource
8875type Route struct {
8876	autorest.Response `json:"-"`
8877	// RoutePropertiesFormat - Properties of the route.
8878	*RoutePropertiesFormat `json:"properties,omitempty"`
8879	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
8880	Name *string `json:"name,omitempty"`
8881	// Etag - A unique read-only string that changes whenever the resource is updated.
8882	Etag *string `json:"etag,omitempty"`
8883	// ID - Resource ID.
8884	ID *string `json:"id,omitempty"`
8885}
8886
8887// MarshalJSON is the custom marshaler for Route.
8888func (r Route) MarshalJSON() ([]byte, error) {
8889	objectMap := make(map[string]interface{})
8890	if r.RoutePropertiesFormat != nil {
8891		objectMap["properties"] = r.RoutePropertiesFormat
8892	}
8893	if r.Name != nil {
8894		objectMap["name"] = r.Name
8895	}
8896	if r.Etag != nil {
8897		objectMap["etag"] = r.Etag
8898	}
8899	if r.ID != nil {
8900		objectMap["id"] = r.ID
8901	}
8902	return json.Marshal(objectMap)
8903}
8904
8905// UnmarshalJSON is the custom unmarshaler for Route struct.
8906func (r *Route) UnmarshalJSON(body []byte) error {
8907	var m map[string]*json.RawMessage
8908	err := json.Unmarshal(body, &m)
8909	if err != nil {
8910		return err
8911	}
8912	for k, v := range m {
8913		switch k {
8914		case "properties":
8915			if v != nil {
8916				var routePropertiesFormat RoutePropertiesFormat
8917				err = json.Unmarshal(*v, &routePropertiesFormat)
8918				if err != nil {
8919					return err
8920				}
8921				r.RoutePropertiesFormat = &routePropertiesFormat
8922			}
8923		case "name":
8924			if v != nil {
8925				var name string
8926				err = json.Unmarshal(*v, &name)
8927				if err != nil {
8928					return err
8929				}
8930				r.Name = &name
8931			}
8932		case "etag":
8933			if v != nil {
8934				var etag string
8935				err = json.Unmarshal(*v, &etag)
8936				if err != nil {
8937					return err
8938				}
8939				r.Etag = &etag
8940			}
8941		case "id":
8942			if v != nil {
8943				var ID string
8944				err = json.Unmarshal(*v, &ID)
8945				if err != nil {
8946					return err
8947				}
8948				r.ID = &ID
8949			}
8950		}
8951	}
8952
8953	return nil
8954}
8955
8956// RouteFilter route Filter Resource.
8957type RouteFilter struct {
8958	autorest.Response            `json:"-"`
8959	*RouteFilterPropertiesFormat `json:"properties,omitempty"`
8960	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
8961	Etag *string `json:"etag,omitempty"`
8962	// ID - Resource ID.
8963	ID *string `json:"id,omitempty"`
8964	// Name - READ-ONLY; Resource name.
8965	Name *string `json:"name,omitempty"`
8966	// Type - READ-ONLY; Resource type.
8967	Type *string `json:"type,omitempty"`
8968	// Location - Resource location.
8969	Location *string `json:"location,omitempty"`
8970	// Tags - Resource tags.
8971	Tags map[string]*string `json:"tags"`
8972}
8973
8974// MarshalJSON is the custom marshaler for RouteFilter.
8975func (rf RouteFilter) MarshalJSON() ([]byte, error) {
8976	objectMap := make(map[string]interface{})
8977	if rf.RouteFilterPropertiesFormat != nil {
8978		objectMap["properties"] = rf.RouteFilterPropertiesFormat
8979	}
8980	if rf.ID != nil {
8981		objectMap["id"] = rf.ID
8982	}
8983	if rf.Location != nil {
8984		objectMap["location"] = rf.Location
8985	}
8986	if rf.Tags != nil {
8987		objectMap["tags"] = rf.Tags
8988	}
8989	return json.Marshal(objectMap)
8990}
8991
8992// UnmarshalJSON is the custom unmarshaler for RouteFilter struct.
8993func (rf *RouteFilter) UnmarshalJSON(body []byte) error {
8994	var m map[string]*json.RawMessage
8995	err := json.Unmarshal(body, &m)
8996	if err != nil {
8997		return err
8998	}
8999	for k, v := range m {
9000		switch k {
9001		case "properties":
9002			if v != nil {
9003				var routeFilterPropertiesFormat RouteFilterPropertiesFormat
9004				err = json.Unmarshal(*v, &routeFilterPropertiesFormat)
9005				if err != nil {
9006					return err
9007				}
9008				rf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat
9009			}
9010		case "etag":
9011			if v != nil {
9012				var etag string
9013				err = json.Unmarshal(*v, &etag)
9014				if err != nil {
9015					return err
9016				}
9017				rf.Etag = &etag
9018			}
9019		case "id":
9020			if v != nil {
9021				var ID string
9022				err = json.Unmarshal(*v, &ID)
9023				if err != nil {
9024					return err
9025				}
9026				rf.ID = &ID
9027			}
9028		case "name":
9029			if v != nil {
9030				var name string
9031				err = json.Unmarshal(*v, &name)
9032				if err != nil {
9033					return err
9034				}
9035				rf.Name = &name
9036			}
9037		case "type":
9038			if v != nil {
9039				var typeVar string
9040				err = json.Unmarshal(*v, &typeVar)
9041				if err != nil {
9042					return err
9043				}
9044				rf.Type = &typeVar
9045			}
9046		case "location":
9047			if v != nil {
9048				var location string
9049				err = json.Unmarshal(*v, &location)
9050				if err != nil {
9051					return err
9052				}
9053				rf.Location = &location
9054			}
9055		case "tags":
9056			if v != nil {
9057				var tags map[string]*string
9058				err = json.Unmarshal(*v, &tags)
9059				if err != nil {
9060					return err
9061				}
9062				rf.Tags = tags
9063			}
9064		}
9065	}
9066
9067	return nil
9068}
9069
9070// RouteFilterListResult response for the ListRouteFilters API service call.
9071type RouteFilterListResult struct {
9072	autorest.Response `json:"-"`
9073	// Value - Gets a list of route filters in a resource group.
9074	Value *[]RouteFilter `json:"value,omitempty"`
9075	// NextLink - The URL to get the next set of results.
9076	NextLink *string `json:"nextLink,omitempty"`
9077}
9078
9079// RouteFilterListResultIterator provides access to a complete listing of RouteFilter values.
9080type RouteFilterListResultIterator struct {
9081	i    int
9082	page RouteFilterListResultPage
9083}
9084
9085// NextWithContext advances to the next value.  If there was an error making
9086// the request the iterator does not advance and the error is returned.
9087func (iter *RouteFilterListResultIterator) NextWithContext(ctx context.Context) (err error) {
9088	if tracing.IsEnabled() {
9089		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultIterator.NextWithContext")
9090		defer func() {
9091			sc := -1
9092			if iter.Response().Response.Response != nil {
9093				sc = iter.Response().Response.Response.StatusCode
9094			}
9095			tracing.EndSpan(ctx, sc, err)
9096		}()
9097	}
9098	iter.i++
9099	if iter.i < len(iter.page.Values()) {
9100		return nil
9101	}
9102	err = iter.page.NextWithContext(ctx)
9103	if err != nil {
9104		iter.i--
9105		return err
9106	}
9107	iter.i = 0
9108	return nil
9109}
9110
9111// Next advances to the next value.  If there was an error making
9112// the request the iterator does not advance and the error is returned.
9113// Deprecated: Use NextWithContext() instead.
9114func (iter *RouteFilterListResultIterator) Next() error {
9115	return iter.NextWithContext(context.Background())
9116}
9117
9118// NotDone returns true if the enumeration should be started or is not yet complete.
9119func (iter RouteFilterListResultIterator) NotDone() bool {
9120	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9121}
9122
9123// Response returns the raw server response from the last page request.
9124func (iter RouteFilterListResultIterator) Response() RouteFilterListResult {
9125	return iter.page.Response()
9126}
9127
9128// Value returns the current value or a zero-initialized value if the
9129// iterator has advanced beyond the end of the collection.
9130func (iter RouteFilterListResultIterator) Value() RouteFilter {
9131	if !iter.page.NotDone() {
9132		return RouteFilter{}
9133	}
9134	return iter.page.Values()[iter.i]
9135}
9136
9137// Creates a new instance of the RouteFilterListResultIterator type.
9138func NewRouteFilterListResultIterator(page RouteFilterListResultPage) RouteFilterListResultIterator {
9139	return RouteFilterListResultIterator{page: page}
9140}
9141
9142// IsEmpty returns true if the ListResult contains no values.
9143func (rflr RouteFilterListResult) IsEmpty() bool {
9144	return rflr.Value == nil || len(*rflr.Value) == 0
9145}
9146
9147// hasNextLink returns true if the NextLink is not empty.
9148func (rflr RouteFilterListResult) hasNextLink() bool {
9149	return rflr.NextLink != nil && len(*rflr.NextLink) != 0
9150}
9151
9152// routeFilterListResultPreparer prepares a request to retrieve the next set of results.
9153// It returns nil if no more results exist.
9154func (rflr RouteFilterListResult) routeFilterListResultPreparer(ctx context.Context) (*http.Request, error) {
9155	if !rflr.hasNextLink() {
9156		return nil, nil
9157	}
9158	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9159		autorest.AsJSON(),
9160		autorest.AsGet(),
9161		autorest.WithBaseURL(to.String(rflr.NextLink)))
9162}
9163
9164// RouteFilterListResultPage contains a page of RouteFilter values.
9165type RouteFilterListResultPage struct {
9166	fn   func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)
9167	rflr RouteFilterListResult
9168}
9169
9170// NextWithContext advances to the next page of values.  If there was an error making
9171// the request the page does not advance and the error is returned.
9172func (page *RouteFilterListResultPage) NextWithContext(ctx context.Context) (err error) {
9173	if tracing.IsEnabled() {
9174		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultPage.NextWithContext")
9175		defer func() {
9176			sc := -1
9177			if page.Response().Response.Response != nil {
9178				sc = page.Response().Response.Response.StatusCode
9179			}
9180			tracing.EndSpan(ctx, sc, err)
9181		}()
9182	}
9183	for {
9184		next, err := page.fn(ctx, page.rflr)
9185		if err != nil {
9186			return err
9187		}
9188		page.rflr = next
9189		if !next.hasNextLink() || !next.IsEmpty() {
9190			break
9191		}
9192	}
9193	return nil
9194}
9195
9196// Next advances to the next page of values.  If there was an error making
9197// the request the page does not advance and the error is returned.
9198// Deprecated: Use NextWithContext() instead.
9199func (page *RouteFilterListResultPage) Next() error {
9200	return page.NextWithContext(context.Background())
9201}
9202
9203// NotDone returns true if the page enumeration should be started or is not yet complete.
9204func (page RouteFilterListResultPage) NotDone() bool {
9205	return !page.rflr.IsEmpty()
9206}
9207
9208// Response returns the raw server response from the last page request.
9209func (page RouteFilterListResultPage) Response() RouteFilterListResult {
9210	return page.rflr
9211}
9212
9213// Values returns the slice of values for the current page or nil if there are no values.
9214func (page RouteFilterListResultPage) Values() []RouteFilter {
9215	if page.rflr.IsEmpty() {
9216		return nil
9217	}
9218	return *page.rflr.Value
9219}
9220
9221// Creates a new instance of the RouteFilterListResultPage type.
9222func NewRouteFilterListResultPage(cur RouteFilterListResult, getNextPage func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)) RouteFilterListResultPage {
9223	return RouteFilterListResultPage{
9224		fn:   getNextPage,
9225		rflr: cur,
9226	}
9227}
9228
9229// RouteFilterPropertiesFormat route Filter Resource
9230type RouteFilterPropertiesFormat struct {
9231	// Rules - Collection of RouteFilterRules contained within a route filter.
9232	Rules *[]RouteFilterRule `json:"rules,omitempty"`
9233	// Peerings - A collection of references to express route circuit peerings.
9234	Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"`
9235	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', 'Succeeded' and 'Failed'.
9236	ProvisioningState *string `json:"provisioningState,omitempty"`
9237}
9238
9239// MarshalJSON is the custom marshaler for RouteFilterPropertiesFormat.
9240func (rfpf RouteFilterPropertiesFormat) MarshalJSON() ([]byte, error) {
9241	objectMap := make(map[string]interface{})
9242	if rfpf.Rules != nil {
9243		objectMap["rules"] = rfpf.Rules
9244	}
9245	if rfpf.Peerings != nil {
9246		objectMap["peerings"] = rfpf.Peerings
9247	}
9248	return json.Marshal(objectMap)
9249}
9250
9251// RouteFilterRule route Filter Rule Resource
9252type RouteFilterRule struct {
9253	autorest.Response                `json:"-"`
9254	*RouteFilterRulePropertiesFormat `json:"properties,omitempty"`
9255	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
9256	Name *string `json:"name,omitempty"`
9257	// Location - Resource location.
9258	Location *string `json:"location,omitempty"`
9259	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
9260	Etag *string `json:"etag,omitempty"`
9261	// Tags - Resource tags.
9262	Tags map[string]*string `json:"tags"`
9263	// ID - Resource ID.
9264	ID *string `json:"id,omitempty"`
9265}
9266
9267// MarshalJSON is the custom marshaler for RouteFilterRule.
9268func (rfr RouteFilterRule) MarshalJSON() ([]byte, error) {
9269	objectMap := make(map[string]interface{})
9270	if rfr.RouteFilterRulePropertiesFormat != nil {
9271		objectMap["properties"] = rfr.RouteFilterRulePropertiesFormat
9272	}
9273	if rfr.Name != nil {
9274		objectMap["name"] = rfr.Name
9275	}
9276	if rfr.Location != nil {
9277		objectMap["location"] = rfr.Location
9278	}
9279	if rfr.Tags != nil {
9280		objectMap["tags"] = rfr.Tags
9281	}
9282	if rfr.ID != nil {
9283		objectMap["id"] = rfr.ID
9284	}
9285	return json.Marshal(objectMap)
9286}
9287
9288// UnmarshalJSON is the custom unmarshaler for RouteFilterRule struct.
9289func (rfr *RouteFilterRule) UnmarshalJSON(body []byte) error {
9290	var m map[string]*json.RawMessage
9291	err := json.Unmarshal(body, &m)
9292	if err != nil {
9293		return err
9294	}
9295	for k, v := range m {
9296		switch k {
9297		case "properties":
9298			if v != nil {
9299				var routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat
9300				err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat)
9301				if err != nil {
9302					return err
9303				}
9304				rfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat
9305			}
9306		case "name":
9307			if v != nil {
9308				var name string
9309				err = json.Unmarshal(*v, &name)
9310				if err != nil {
9311					return err
9312				}
9313				rfr.Name = &name
9314			}
9315		case "location":
9316			if v != nil {
9317				var location string
9318				err = json.Unmarshal(*v, &location)
9319				if err != nil {
9320					return err
9321				}
9322				rfr.Location = &location
9323			}
9324		case "etag":
9325			if v != nil {
9326				var etag string
9327				err = json.Unmarshal(*v, &etag)
9328				if err != nil {
9329					return err
9330				}
9331				rfr.Etag = &etag
9332			}
9333		case "tags":
9334			if v != nil {
9335				var tags map[string]*string
9336				err = json.Unmarshal(*v, &tags)
9337				if err != nil {
9338					return err
9339				}
9340				rfr.Tags = tags
9341			}
9342		case "id":
9343			if v != nil {
9344				var ID string
9345				err = json.Unmarshal(*v, &ID)
9346				if err != nil {
9347					return err
9348				}
9349				rfr.ID = &ID
9350			}
9351		}
9352	}
9353
9354	return nil
9355}
9356
9357// RouteFilterRuleListResult response for the ListRouteFilterRules API service call
9358type RouteFilterRuleListResult struct {
9359	autorest.Response `json:"-"`
9360	// Value - Gets a list of RouteFilterRules in a resource group.
9361	Value *[]RouteFilterRule `json:"value,omitempty"`
9362	// NextLink - The URL to get the next set of results.
9363	NextLink *string `json:"nextLink,omitempty"`
9364}
9365
9366// RouteFilterRuleListResultIterator provides access to a complete listing of RouteFilterRule values.
9367type RouteFilterRuleListResultIterator struct {
9368	i    int
9369	page RouteFilterRuleListResultPage
9370}
9371
9372// NextWithContext advances to the next value.  If there was an error making
9373// the request the iterator does not advance and the error is returned.
9374func (iter *RouteFilterRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
9375	if tracing.IsEnabled() {
9376		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultIterator.NextWithContext")
9377		defer func() {
9378			sc := -1
9379			if iter.Response().Response.Response != nil {
9380				sc = iter.Response().Response.Response.StatusCode
9381			}
9382			tracing.EndSpan(ctx, sc, err)
9383		}()
9384	}
9385	iter.i++
9386	if iter.i < len(iter.page.Values()) {
9387		return nil
9388	}
9389	err = iter.page.NextWithContext(ctx)
9390	if err != nil {
9391		iter.i--
9392		return err
9393	}
9394	iter.i = 0
9395	return nil
9396}
9397
9398// Next advances to the next value.  If there was an error making
9399// the request the iterator does not advance and the error is returned.
9400// Deprecated: Use NextWithContext() instead.
9401func (iter *RouteFilterRuleListResultIterator) Next() error {
9402	return iter.NextWithContext(context.Background())
9403}
9404
9405// NotDone returns true if the enumeration should be started or is not yet complete.
9406func (iter RouteFilterRuleListResultIterator) NotDone() bool {
9407	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9408}
9409
9410// Response returns the raw server response from the last page request.
9411func (iter RouteFilterRuleListResultIterator) Response() RouteFilterRuleListResult {
9412	return iter.page.Response()
9413}
9414
9415// Value returns the current value or a zero-initialized value if the
9416// iterator has advanced beyond the end of the collection.
9417func (iter RouteFilterRuleListResultIterator) Value() RouteFilterRule {
9418	if !iter.page.NotDone() {
9419		return RouteFilterRule{}
9420	}
9421	return iter.page.Values()[iter.i]
9422}
9423
9424// Creates a new instance of the RouteFilterRuleListResultIterator type.
9425func NewRouteFilterRuleListResultIterator(page RouteFilterRuleListResultPage) RouteFilterRuleListResultIterator {
9426	return RouteFilterRuleListResultIterator{page: page}
9427}
9428
9429// IsEmpty returns true if the ListResult contains no values.
9430func (rfrlr RouteFilterRuleListResult) IsEmpty() bool {
9431	return rfrlr.Value == nil || len(*rfrlr.Value) == 0
9432}
9433
9434// hasNextLink returns true if the NextLink is not empty.
9435func (rfrlr RouteFilterRuleListResult) hasNextLink() bool {
9436	return rfrlr.NextLink != nil && len(*rfrlr.NextLink) != 0
9437}
9438
9439// routeFilterRuleListResultPreparer prepares a request to retrieve the next set of results.
9440// It returns nil if no more results exist.
9441func (rfrlr RouteFilterRuleListResult) routeFilterRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
9442	if !rfrlr.hasNextLink() {
9443		return nil, nil
9444	}
9445	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9446		autorest.AsJSON(),
9447		autorest.AsGet(),
9448		autorest.WithBaseURL(to.String(rfrlr.NextLink)))
9449}
9450
9451// RouteFilterRuleListResultPage contains a page of RouteFilterRule values.
9452type RouteFilterRuleListResultPage struct {
9453	fn    func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)
9454	rfrlr RouteFilterRuleListResult
9455}
9456
9457// NextWithContext advances to the next page of values.  If there was an error making
9458// the request the page does not advance and the error is returned.
9459func (page *RouteFilterRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
9460	if tracing.IsEnabled() {
9461		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultPage.NextWithContext")
9462		defer func() {
9463			sc := -1
9464			if page.Response().Response.Response != nil {
9465				sc = page.Response().Response.Response.StatusCode
9466			}
9467			tracing.EndSpan(ctx, sc, err)
9468		}()
9469	}
9470	for {
9471		next, err := page.fn(ctx, page.rfrlr)
9472		if err != nil {
9473			return err
9474		}
9475		page.rfrlr = next
9476		if !next.hasNextLink() || !next.IsEmpty() {
9477			break
9478		}
9479	}
9480	return nil
9481}
9482
9483// Next advances to the next page of values.  If there was an error making
9484// the request the page does not advance and the error is returned.
9485// Deprecated: Use NextWithContext() instead.
9486func (page *RouteFilterRuleListResultPage) Next() error {
9487	return page.NextWithContext(context.Background())
9488}
9489
9490// NotDone returns true if the page enumeration should be started or is not yet complete.
9491func (page RouteFilterRuleListResultPage) NotDone() bool {
9492	return !page.rfrlr.IsEmpty()
9493}
9494
9495// Response returns the raw server response from the last page request.
9496func (page RouteFilterRuleListResultPage) Response() RouteFilterRuleListResult {
9497	return page.rfrlr
9498}
9499
9500// Values returns the slice of values for the current page or nil if there are no values.
9501func (page RouteFilterRuleListResultPage) Values() []RouteFilterRule {
9502	if page.rfrlr.IsEmpty() {
9503		return nil
9504	}
9505	return *page.rfrlr.Value
9506}
9507
9508// Creates a new instance of the RouteFilterRuleListResultPage type.
9509func NewRouteFilterRuleListResultPage(cur RouteFilterRuleListResult, getNextPage func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)) RouteFilterRuleListResultPage {
9510	return RouteFilterRuleListResultPage{
9511		fn:    getNextPage,
9512		rfrlr: cur,
9513	}
9514}
9515
9516// RouteFilterRulePropertiesFormat route Filter Rule Resource
9517type RouteFilterRulePropertiesFormat struct {
9518	// Access - The access type of the rule. Valid values are: 'Allow', 'Deny'. Possible values include: 'Allow', 'Deny'
9519	Access Access `json:"access,omitempty"`
9520	// RouteFilterRuleType - The rule type of the rule. Valid value is: 'Community'
9521	RouteFilterRuleType *string `json:"routeFilterRuleType,omitempty"`
9522	// Communities - The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020']
9523	Communities *[]string `json:"communities,omitempty"`
9524	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', 'Succeeded' and 'Failed'.
9525	ProvisioningState *string `json:"provisioningState,omitempty"`
9526}
9527
9528// MarshalJSON is the custom marshaler for RouteFilterRulePropertiesFormat.
9529func (rfrpf RouteFilterRulePropertiesFormat) MarshalJSON() ([]byte, error) {
9530	objectMap := make(map[string]interface{})
9531	if rfrpf.Access != "" {
9532		objectMap["access"] = rfrpf.Access
9533	}
9534	if rfrpf.RouteFilterRuleType != nil {
9535		objectMap["routeFilterRuleType"] = rfrpf.RouteFilterRuleType
9536	}
9537	if rfrpf.Communities != nil {
9538		objectMap["communities"] = rfrpf.Communities
9539	}
9540	return json.Marshal(objectMap)
9541}
9542
9543// RouteFilterRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
9544// long-running operation.
9545type RouteFilterRulesCreateOrUpdateFuture struct {
9546	azure.FutureAPI
9547	// Result returns the result of the asynchronous operation.
9548	// If the operation has not completed it will return an error.
9549	Result func(RouteFilterRulesClient) (RouteFilterRule, error)
9550}
9551
9552// RouteFilterRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
9553// operation.
9554type RouteFilterRulesDeleteFuture struct {
9555	azure.FutureAPI
9556	// Result returns the result of the asynchronous operation.
9557	// If the operation has not completed it will return an error.
9558	Result func(RouteFilterRulesClient) (autorest.Response, error)
9559}
9560
9561// RouteFilterRulesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
9562// operation.
9563type RouteFilterRulesUpdateFuture struct {
9564	azure.FutureAPI
9565	// Result returns the result of the asynchronous operation.
9566	// If the operation has not completed it will return an error.
9567	Result func(RouteFilterRulesClient) (RouteFilterRule, error)
9568}
9569
9570// RouteFiltersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
9571// long-running operation.
9572type RouteFiltersCreateOrUpdateFuture struct {
9573	azure.FutureAPI
9574	// Result returns the result of the asynchronous operation.
9575	// If the operation has not completed it will return an error.
9576	Result func(RouteFiltersClient) (RouteFilter, error)
9577}
9578
9579// RouteFiltersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
9580// operation.
9581type RouteFiltersDeleteFuture struct {
9582	azure.FutureAPI
9583	// Result returns the result of the asynchronous operation.
9584	// If the operation has not completed it will return an error.
9585	Result func(RouteFiltersClient) (autorest.Response, error)
9586}
9587
9588// RouteFiltersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
9589// operation.
9590type RouteFiltersUpdateFuture struct {
9591	azure.FutureAPI
9592	// Result returns the result of the asynchronous operation.
9593	// If the operation has not completed it will return an error.
9594	Result func(RouteFiltersClient) (RouteFilter, error)
9595}
9596
9597// RouteListResult response for the ListRoute API service call
9598type RouteListResult struct {
9599	autorest.Response `json:"-"`
9600	// Value - Gets a list of routes in a resource group.
9601	Value *[]Route `json:"value,omitempty"`
9602	// NextLink - The URL to get the next set of results.
9603	NextLink *string `json:"nextLink,omitempty"`
9604}
9605
9606// RouteListResultIterator provides access to a complete listing of Route values.
9607type RouteListResultIterator struct {
9608	i    int
9609	page RouteListResultPage
9610}
9611
9612// NextWithContext advances to the next value.  If there was an error making
9613// the request the iterator does not advance and the error is returned.
9614func (iter *RouteListResultIterator) NextWithContext(ctx context.Context) (err error) {
9615	if tracing.IsEnabled() {
9616		ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultIterator.NextWithContext")
9617		defer func() {
9618			sc := -1
9619			if iter.Response().Response.Response != nil {
9620				sc = iter.Response().Response.Response.StatusCode
9621			}
9622			tracing.EndSpan(ctx, sc, err)
9623		}()
9624	}
9625	iter.i++
9626	if iter.i < len(iter.page.Values()) {
9627		return nil
9628	}
9629	err = iter.page.NextWithContext(ctx)
9630	if err != nil {
9631		iter.i--
9632		return err
9633	}
9634	iter.i = 0
9635	return nil
9636}
9637
9638// Next advances to the next value.  If there was an error making
9639// the request the iterator does not advance and the error is returned.
9640// Deprecated: Use NextWithContext() instead.
9641func (iter *RouteListResultIterator) Next() error {
9642	return iter.NextWithContext(context.Background())
9643}
9644
9645// NotDone returns true if the enumeration should be started or is not yet complete.
9646func (iter RouteListResultIterator) NotDone() bool {
9647	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9648}
9649
9650// Response returns the raw server response from the last page request.
9651func (iter RouteListResultIterator) Response() RouteListResult {
9652	return iter.page.Response()
9653}
9654
9655// Value returns the current value or a zero-initialized value if the
9656// iterator has advanced beyond the end of the collection.
9657func (iter RouteListResultIterator) Value() Route {
9658	if !iter.page.NotDone() {
9659		return Route{}
9660	}
9661	return iter.page.Values()[iter.i]
9662}
9663
9664// Creates a new instance of the RouteListResultIterator type.
9665func NewRouteListResultIterator(page RouteListResultPage) RouteListResultIterator {
9666	return RouteListResultIterator{page: page}
9667}
9668
9669// IsEmpty returns true if the ListResult contains no values.
9670func (rlr RouteListResult) IsEmpty() bool {
9671	return rlr.Value == nil || len(*rlr.Value) == 0
9672}
9673
9674// hasNextLink returns true if the NextLink is not empty.
9675func (rlr RouteListResult) hasNextLink() bool {
9676	return rlr.NextLink != nil && len(*rlr.NextLink) != 0
9677}
9678
9679// routeListResultPreparer prepares a request to retrieve the next set of results.
9680// It returns nil if no more results exist.
9681func (rlr RouteListResult) routeListResultPreparer(ctx context.Context) (*http.Request, error) {
9682	if !rlr.hasNextLink() {
9683		return nil, nil
9684	}
9685	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9686		autorest.AsJSON(),
9687		autorest.AsGet(),
9688		autorest.WithBaseURL(to.String(rlr.NextLink)))
9689}
9690
9691// RouteListResultPage contains a page of Route values.
9692type RouteListResultPage struct {
9693	fn  func(context.Context, RouteListResult) (RouteListResult, error)
9694	rlr RouteListResult
9695}
9696
9697// NextWithContext advances to the next page of values.  If there was an error making
9698// the request the page does not advance and the error is returned.
9699func (page *RouteListResultPage) NextWithContext(ctx context.Context) (err error) {
9700	if tracing.IsEnabled() {
9701		ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultPage.NextWithContext")
9702		defer func() {
9703			sc := -1
9704			if page.Response().Response.Response != nil {
9705				sc = page.Response().Response.Response.StatusCode
9706			}
9707			tracing.EndSpan(ctx, sc, err)
9708		}()
9709	}
9710	for {
9711		next, err := page.fn(ctx, page.rlr)
9712		if err != nil {
9713			return err
9714		}
9715		page.rlr = next
9716		if !next.hasNextLink() || !next.IsEmpty() {
9717			break
9718		}
9719	}
9720	return nil
9721}
9722
9723// Next advances to the next page of values.  If there was an error making
9724// the request the page does not advance and the error is returned.
9725// Deprecated: Use NextWithContext() instead.
9726func (page *RouteListResultPage) Next() error {
9727	return page.NextWithContext(context.Background())
9728}
9729
9730// NotDone returns true if the page enumeration should be started or is not yet complete.
9731func (page RouteListResultPage) NotDone() bool {
9732	return !page.rlr.IsEmpty()
9733}
9734
9735// Response returns the raw server response from the last page request.
9736func (page RouteListResultPage) Response() RouteListResult {
9737	return page.rlr
9738}
9739
9740// Values returns the slice of values for the current page or nil if there are no values.
9741func (page RouteListResultPage) Values() []Route {
9742	if page.rlr.IsEmpty() {
9743		return nil
9744	}
9745	return *page.rlr.Value
9746}
9747
9748// Creates a new instance of the RouteListResultPage type.
9749func NewRouteListResultPage(cur RouteListResult, getNextPage func(context.Context, RouteListResult) (RouteListResult, error)) RouteListResultPage {
9750	return RouteListResultPage{
9751		fn:  getNextPage,
9752		rlr: cur,
9753	}
9754}
9755
9756// RoutePropertiesFormat route resource
9757type RoutePropertiesFormat struct {
9758	// AddressPrefix - The destination CIDR to which the route applies.
9759	AddressPrefix *string `json:"addressPrefix,omitempty"`
9760	// 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'
9761	NextHopType RouteNextHopType `json:"nextHopType,omitempty"`
9762	// NextHopIPAddress - The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance.
9763	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
9764	// ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
9765	ProvisioningState *string `json:"provisioningState,omitempty"`
9766}
9767
9768// RoutesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
9769// operation.
9770type RoutesCreateOrUpdateFuture struct {
9771	azure.FutureAPI
9772	// Result returns the result of the asynchronous operation.
9773	// If the operation has not completed it will return an error.
9774	Result func(RoutesClient) (Route, error)
9775}
9776
9777// RoutesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
9778type RoutesDeleteFuture struct {
9779	azure.FutureAPI
9780	// Result returns the result of the asynchronous operation.
9781	// If the operation has not completed it will return an error.
9782	Result func(RoutesClient) (autorest.Response, error)
9783}
9784
9785// RouteTable route table resource.
9786type RouteTable struct {
9787	autorest.Response `json:"-"`
9788	// RouteTablePropertiesFormat - Properties of the route table.
9789	*RouteTablePropertiesFormat `json:"properties,omitempty"`
9790	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
9791	Etag *string `json:"etag,omitempty"`
9792	// ID - Resource ID.
9793	ID *string `json:"id,omitempty"`
9794	// Name - READ-ONLY; Resource name.
9795	Name *string `json:"name,omitempty"`
9796	// Type - READ-ONLY; Resource type.
9797	Type *string `json:"type,omitempty"`
9798	// Location - Resource location.
9799	Location *string `json:"location,omitempty"`
9800	// Tags - Resource tags.
9801	Tags map[string]*string `json:"tags"`
9802}
9803
9804// MarshalJSON is the custom marshaler for RouteTable.
9805func (rt RouteTable) MarshalJSON() ([]byte, error) {
9806	objectMap := make(map[string]interface{})
9807	if rt.RouteTablePropertiesFormat != nil {
9808		objectMap["properties"] = rt.RouteTablePropertiesFormat
9809	}
9810	if rt.Etag != nil {
9811		objectMap["etag"] = rt.Etag
9812	}
9813	if rt.ID != nil {
9814		objectMap["id"] = rt.ID
9815	}
9816	if rt.Location != nil {
9817		objectMap["location"] = rt.Location
9818	}
9819	if rt.Tags != nil {
9820		objectMap["tags"] = rt.Tags
9821	}
9822	return json.Marshal(objectMap)
9823}
9824
9825// UnmarshalJSON is the custom unmarshaler for RouteTable struct.
9826func (rt *RouteTable) UnmarshalJSON(body []byte) error {
9827	var m map[string]*json.RawMessage
9828	err := json.Unmarshal(body, &m)
9829	if err != nil {
9830		return err
9831	}
9832	for k, v := range m {
9833		switch k {
9834		case "properties":
9835			if v != nil {
9836				var routeTablePropertiesFormat RouteTablePropertiesFormat
9837				err = json.Unmarshal(*v, &routeTablePropertiesFormat)
9838				if err != nil {
9839					return err
9840				}
9841				rt.RouteTablePropertiesFormat = &routeTablePropertiesFormat
9842			}
9843		case "etag":
9844			if v != nil {
9845				var etag string
9846				err = json.Unmarshal(*v, &etag)
9847				if err != nil {
9848					return err
9849				}
9850				rt.Etag = &etag
9851			}
9852		case "id":
9853			if v != nil {
9854				var ID string
9855				err = json.Unmarshal(*v, &ID)
9856				if err != nil {
9857					return err
9858				}
9859				rt.ID = &ID
9860			}
9861		case "name":
9862			if v != nil {
9863				var name string
9864				err = json.Unmarshal(*v, &name)
9865				if err != nil {
9866					return err
9867				}
9868				rt.Name = &name
9869			}
9870		case "type":
9871			if v != nil {
9872				var typeVar string
9873				err = json.Unmarshal(*v, &typeVar)
9874				if err != nil {
9875					return err
9876				}
9877				rt.Type = &typeVar
9878			}
9879		case "location":
9880			if v != nil {
9881				var location string
9882				err = json.Unmarshal(*v, &location)
9883				if err != nil {
9884					return err
9885				}
9886				rt.Location = &location
9887			}
9888		case "tags":
9889			if v != nil {
9890				var tags map[string]*string
9891				err = json.Unmarshal(*v, &tags)
9892				if err != nil {
9893					return err
9894				}
9895				rt.Tags = tags
9896			}
9897		}
9898	}
9899
9900	return nil
9901}
9902
9903// RouteTableListResult response for the ListRouteTable API service call.
9904type RouteTableListResult struct {
9905	autorest.Response `json:"-"`
9906	// Value - Gets a list of route tables in a resource group.
9907	Value *[]RouteTable `json:"value,omitempty"`
9908	// NextLink - The URL to get the next set of results.
9909	NextLink *string `json:"nextLink,omitempty"`
9910}
9911
9912// RouteTableListResultIterator provides access to a complete listing of RouteTable values.
9913type RouteTableListResultIterator struct {
9914	i    int
9915	page RouteTableListResultPage
9916}
9917
9918// NextWithContext advances to the next value.  If there was an error making
9919// the request the iterator does not advance and the error is returned.
9920func (iter *RouteTableListResultIterator) NextWithContext(ctx context.Context) (err error) {
9921	if tracing.IsEnabled() {
9922		ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultIterator.NextWithContext")
9923		defer func() {
9924			sc := -1
9925			if iter.Response().Response.Response != nil {
9926				sc = iter.Response().Response.Response.StatusCode
9927			}
9928			tracing.EndSpan(ctx, sc, err)
9929		}()
9930	}
9931	iter.i++
9932	if iter.i < len(iter.page.Values()) {
9933		return nil
9934	}
9935	err = iter.page.NextWithContext(ctx)
9936	if err != nil {
9937		iter.i--
9938		return err
9939	}
9940	iter.i = 0
9941	return nil
9942}
9943
9944// Next advances to the next value.  If there was an error making
9945// the request the iterator does not advance and the error is returned.
9946// Deprecated: Use NextWithContext() instead.
9947func (iter *RouteTableListResultIterator) Next() error {
9948	return iter.NextWithContext(context.Background())
9949}
9950
9951// NotDone returns true if the enumeration should be started or is not yet complete.
9952func (iter RouteTableListResultIterator) NotDone() bool {
9953	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9954}
9955
9956// Response returns the raw server response from the last page request.
9957func (iter RouteTableListResultIterator) Response() RouteTableListResult {
9958	return iter.page.Response()
9959}
9960
9961// Value returns the current value or a zero-initialized value if the
9962// iterator has advanced beyond the end of the collection.
9963func (iter RouteTableListResultIterator) Value() RouteTable {
9964	if !iter.page.NotDone() {
9965		return RouteTable{}
9966	}
9967	return iter.page.Values()[iter.i]
9968}
9969
9970// Creates a new instance of the RouteTableListResultIterator type.
9971func NewRouteTableListResultIterator(page RouteTableListResultPage) RouteTableListResultIterator {
9972	return RouteTableListResultIterator{page: page}
9973}
9974
9975// IsEmpty returns true if the ListResult contains no values.
9976func (rtlr RouteTableListResult) IsEmpty() bool {
9977	return rtlr.Value == nil || len(*rtlr.Value) == 0
9978}
9979
9980// hasNextLink returns true if the NextLink is not empty.
9981func (rtlr RouteTableListResult) hasNextLink() bool {
9982	return rtlr.NextLink != nil && len(*rtlr.NextLink) != 0
9983}
9984
9985// routeTableListResultPreparer prepares a request to retrieve the next set of results.
9986// It returns nil if no more results exist.
9987func (rtlr RouteTableListResult) routeTableListResultPreparer(ctx context.Context) (*http.Request, error) {
9988	if !rtlr.hasNextLink() {
9989		return nil, nil
9990	}
9991	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9992		autorest.AsJSON(),
9993		autorest.AsGet(),
9994		autorest.WithBaseURL(to.String(rtlr.NextLink)))
9995}
9996
9997// RouteTableListResultPage contains a page of RouteTable values.
9998type RouteTableListResultPage struct {
9999	fn   func(context.Context, RouteTableListResult) (RouteTableListResult, error)
10000	rtlr RouteTableListResult
10001}
10002
10003// NextWithContext advances to the next page of values.  If there was an error making
10004// the request the page does not advance and the error is returned.
10005func (page *RouteTableListResultPage) NextWithContext(ctx context.Context) (err error) {
10006	if tracing.IsEnabled() {
10007		ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultPage.NextWithContext")
10008		defer func() {
10009			sc := -1
10010			if page.Response().Response.Response != nil {
10011				sc = page.Response().Response.Response.StatusCode
10012			}
10013			tracing.EndSpan(ctx, sc, err)
10014		}()
10015	}
10016	for {
10017		next, err := page.fn(ctx, page.rtlr)
10018		if err != nil {
10019			return err
10020		}
10021		page.rtlr = next
10022		if !next.hasNextLink() || !next.IsEmpty() {
10023			break
10024		}
10025	}
10026	return nil
10027}
10028
10029// Next advances to the next page of values.  If there was an error making
10030// the request the page does not advance and the error is returned.
10031// Deprecated: Use NextWithContext() instead.
10032func (page *RouteTableListResultPage) Next() error {
10033	return page.NextWithContext(context.Background())
10034}
10035
10036// NotDone returns true if the page enumeration should be started or is not yet complete.
10037func (page RouteTableListResultPage) NotDone() bool {
10038	return !page.rtlr.IsEmpty()
10039}
10040
10041// Response returns the raw server response from the last page request.
10042func (page RouteTableListResultPage) Response() RouteTableListResult {
10043	return page.rtlr
10044}
10045
10046// Values returns the slice of values for the current page or nil if there are no values.
10047func (page RouteTableListResultPage) Values() []RouteTable {
10048	if page.rtlr.IsEmpty() {
10049		return nil
10050	}
10051	return *page.rtlr.Value
10052}
10053
10054// Creates a new instance of the RouteTableListResultPage type.
10055func NewRouteTableListResultPage(cur RouteTableListResult, getNextPage func(context.Context, RouteTableListResult) (RouteTableListResult, error)) RouteTableListResultPage {
10056	return RouteTableListResultPage{
10057		fn:   getNextPage,
10058		rtlr: cur,
10059	}
10060}
10061
10062// RouteTablePropertiesFormat route Table resource
10063type RouteTablePropertiesFormat struct {
10064	// Routes - Collection of routes contained within a route table.
10065	Routes *[]Route `json:"routes,omitempty"`
10066	// Subnets - READ-ONLY; A collection of references to subnets.
10067	Subnets *[]Subnet `json:"subnets,omitempty"`
10068	// ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
10069	ProvisioningState *string `json:"provisioningState,omitempty"`
10070}
10071
10072// MarshalJSON is the custom marshaler for RouteTablePropertiesFormat.
10073func (rtpf RouteTablePropertiesFormat) MarshalJSON() ([]byte, error) {
10074	objectMap := make(map[string]interface{})
10075	if rtpf.Routes != nil {
10076		objectMap["routes"] = rtpf.Routes
10077	}
10078	if rtpf.ProvisioningState != nil {
10079		objectMap["provisioningState"] = rtpf.ProvisioningState
10080	}
10081	return json.Marshal(objectMap)
10082}
10083
10084// RouteTablesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
10085// long-running operation.
10086type RouteTablesCreateOrUpdateFuture struct {
10087	azure.FutureAPI
10088	// Result returns the result of the asynchronous operation.
10089	// If the operation has not completed it will return an error.
10090	Result func(RouteTablesClient) (RouteTable, error)
10091}
10092
10093// RouteTablesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
10094// operation.
10095type RouteTablesDeleteFuture struct {
10096	azure.FutureAPI
10097	// Result returns the result of the asynchronous operation.
10098	// If the operation has not completed it will return an error.
10099	Result func(RouteTablesClient) (autorest.Response, error)
10100}
10101
10102// SecurityGroup networkSecurityGroup resource.
10103type SecurityGroup struct {
10104	autorest.Response `json:"-"`
10105	// SecurityGroupPropertiesFormat - Properties of the network security group
10106	*SecurityGroupPropertiesFormat `json:"properties,omitempty"`
10107	// Etag - A unique read-only string that changes whenever the resource is updated.
10108	Etag *string `json:"etag,omitempty"`
10109	// ID - Resource ID.
10110	ID *string `json:"id,omitempty"`
10111	// Name - READ-ONLY; Resource name.
10112	Name *string `json:"name,omitempty"`
10113	// Type - READ-ONLY; Resource type.
10114	Type *string `json:"type,omitempty"`
10115	// Location - Resource location.
10116	Location *string `json:"location,omitempty"`
10117	// Tags - Resource tags.
10118	Tags map[string]*string `json:"tags"`
10119}
10120
10121// MarshalJSON is the custom marshaler for SecurityGroup.
10122func (sg SecurityGroup) MarshalJSON() ([]byte, error) {
10123	objectMap := make(map[string]interface{})
10124	if sg.SecurityGroupPropertiesFormat != nil {
10125		objectMap["properties"] = sg.SecurityGroupPropertiesFormat
10126	}
10127	if sg.Etag != nil {
10128		objectMap["etag"] = sg.Etag
10129	}
10130	if sg.ID != nil {
10131		objectMap["id"] = sg.ID
10132	}
10133	if sg.Location != nil {
10134		objectMap["location"] = sg.Location
10135	}
10136	if sg.Tags != nil {
10137		objectMap["tags"] = sg.Tags
10138	}
10139	return json.Marshal(objectMap)
10140}
10141
10142// UnmarshalJSON is the custom unmarshaler for SecurityGroup struct.
10143func (sg *SecurityGroup) UnmarshalJSON(body []byte) error {
10144	var m map[string]*json.RawMessage
10145	err := json.Unmarshal(body, &m)
10146	if err != nil {
10147		return err
10148	}
10149	for k, v := range m {
10150		switch k {
10151		case "properties":
10152			if v != nil {
10153				var securityGroupPropertiesFormat SecurityGroupPropertiesFormat
10154				err = json.Unmarshal(*v, &securityGroupPropertiesFormat)
10155				if err != nil {
10156					return err
10157				}
10158				sg.SecurityGroupPropertiesFormat = &securityGroupPropertiesFormat
10159			}
10160		case "etag":
10161			if v != nil {
10162				var etag string
10163				err = json.Unmarshal(*v, &etag)
10164				if err != nil {
10165					return err
10166				}
10167				sg.Etag = &etag
10168			}
10169		case "id":
10170			if v != nil {
10171				var ID string
10172				err = json.Unmarshal(*v, &ID)
10173				if err != nil {
10174					return err
10175				}
10176				sg.ID = &ID
10177			}
10178		case "name":
10179			if v != nil {
10180				var name string
10181				err = json.Unmarshal(*v, &name)
10182				if err != nil {
10183					return err
10184				}
10185				sg.Name = &name
10186			}
10187		case "type":
10188			if v != nil {
10189				var typeVar string
10190				err = json.Unmarshal(*v, &typeVar)
10191				if err != nil {
10192					return err
10193				}
10194				sg.Type = &typeVar
10195			}
10196		case "location":
10197			if v != nil {
10198				var location string
10199				err = json.Unmarshal(*v, &location)
10200				if err != nil {
10201					return err
10202				}
10203				sg.Location = &location
10204			}
10205		case "tags":
10206			if v != nil {
10207				var tags map[string]*string
10208				err = json.Unmarshal(*v, &tags)
10209				if err != nil {
10210					return err
10211				}
10212				sg.Tags = tags
10213			}
10214		}
10215	}
10216
10217	return nil
10218}
10219
10220// SecurityGroupListResult response for ListNetworkSecurityGroups API service call.
10221type SecurityGroupListResult struct {
10222	autorest.Response `json:"-"`
10223	// Value - A list of NetworkSecurityGroup resources.
10224	Value *[]SecurityGroup `json:"value,omitempty"`
10225	// NextLink - The URL to get the next set of results.
10226	NextLink *string `json:"nextLink,omitempty"`
10227}
10228
10229// SecurityGroupListResultIterator provides access to a complete listing of SecurityGroup values.
10230type SecurityGroupListResultIterator struct {
10231	i    int
10232	page SecurityGroupListResultPage
10233}
10234
10235// NextWithContext advances to the next value.  If there was an error making
10236// the request the iterator does not advance and the error is returned.
10237func (iter *SecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
10238	if tracing.IsEnabled() {
10239		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultIterator.NextWithContext")
10240		defer func() {
10241			sc := -1
10242			if iter.Response().Response.Response != nil {
10243				sc = iter.Response().Response.Response.StatusCode
10244			}
10245			tracing.EndSpan(ctx, sc, err)
10246		}()
10247	}
10248	iter.i++
10249	if iter.i < len(iter.page.Values()) {
10250		return nil
10251	}
10252	err = iter.page.NextWithContext(ctx)
10253	if err != nil {
10254		iter.i--
10255		return err
10256	}
10257	iter.i = 0
10258	return nil
10259}
10260
10261// Next advances to the next value.  If there was an error making
10262// the request the iterator does not advance and the error is returned.
10263// Deprecated: Use NextWithContext() instead.
10264func (iter *SecurityGroupListResultIterator) Next() error {
10265	return iter.NextWithContext(context.Background())
10266}
10267
10268// NotDone returns true if the enumeration should be started or is not yet complete.
10269func (iter SecurityGroupListResultIterator) NotDone() bool {
10270	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10271}
10272
10273// Response returns the raw server response from the last page request.
10274func (iter SecurityGroupListResultIterator) Response() SecurityGroupListResult {
10275	return iter.page.Response()
10276}
10277
10278// Value returns the current value or a zero-initialized value if the
10279// iterator has advanced beyond the end of the collection.
10280func (iter SecurityGroupListResultIterator) Value() SecurityGroup {
10281	if !iter.page.NotDone() {
10282		return SecurityGroup{}
10283	}
10284	return iter.page.Values()[iter.i]
10285}
10286
10287// Creates a new instance of the SecurityGroupListResultIterator type.
10288func NewSecurityGroupListResultIterator(page SecurityGroupListResultPage) SecurityGroupListResultIterator {
10289	return SecurityGroupListResultIterator{page: page}
10290}
10291
10292// IsEmpty returns true if the ListResult contains no values.
10293func (sglr SecurityGroupListResult) IsEmpty() bool {
10294	return sglr.Value == nil || len(*sglr.Value) == 0
10295}
10296
10297// hasNextLink returns true if the NextLink is not empty.
10298func (sglr SecurityGroupListResult) hasNextLink() bool {
10299	return sglr.NextLink != nil && len(*sglr.NextLink) != 0
10300}
10301
10302// securityGroupListResultPreparer prepares a request to retrieve the next set of results.
10303// It returns nil if no more results exist.
10304func (sglr SecurityGroupListResult) securityGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
10305	if !sglr.hasNextLink() {
10306		return nil, nil
10307	}
10308	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10309		autorest.AsJSON(),
10310		autorest.AsGet(),
10311		autorest.WithBaseURL(to.String(sglr.NextLink)))
10312}
10313
10314// SecurityGroupListResultPage contains a page of SecurityGroup values.
10315type SecurityGroupListResultPage struct {
10316	fn   func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)
10317	sglr SecurityGroupListResult
10318}
10319
10320// NextWithContext advances to the next page of values.  If there was an error making
10321// the request the page does not advance and the error is returned.
10322func (page *SecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
10323	if tracing.IsEnabled() {
10324		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultPage.NextWithContext")
10325		defer func() {
10326			sc := -1
10327			if page.Response().Response.Response != nil {
10328				sc = page.Response().Response.Response.StatusCode
10329			}
10330			tracing.EndSpan(ctx, sc, err)
10331		}()
10332	}
10333	for {
10334		next, err := page.fn(ctx, page.sglr)
10335		if err != nil {
10336			return err
10337		}
10338		page.sglr = next
10339		if !next.hasNextLink() || !next.IsEmpty() {
10340			break
10341		}
10342	}
10343	return nil
10344}
10345
10346// Next advances to the next page of values.  If there was an error making
10347// the request the page does not advance and the error is returned.
10348// Deprecated: Use NextWithContext() instead.
10349func (page *SecurityGroupListResultPage) Next() error {
10350	return page.NextWithContext(context.Background())
10351}
10352
10353// NotDone returns true if the page enumeration should be started or is not yet complete.
10354func (page SecurityGroupListResultPage) NotDone() bool {
10355	return !page.sglr.IsEmpty()
10356}
10357
10358// Response returns the raw server response from the last page request.
10359func (page SecurityGroupListResultPage) Response() SecurityGroupListResult {
10360	return page.sglr
10361}
10362
10363// Values returns the slice of values for the current page or nil if there are no values.
10364func (page SecurityGroupListResultPage) Values() []SecurityGroup {
10365	if page.sglr.IsEmpty() {
10366		return nil
10367	}
10368	return *page.sglr.Value
10369}
10370
10371// Creates a new instance of the SecurityGroupListResultPage type.
10372func NewSecurityGroupListResultPage(cur SecurityGroupListResult, getNextPage func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)) SecurityGroupListResultPage {
10373	return SecurityGroupListResultPage{
10374		fn:   getNextPage,
10375		sglr: cur,
10376	}
10377}
10378
10379// SecurityGroupNetworkInterface network interface and all its associated security rules.
10380type SecurityGroupNetworkInterface struct {
10381	// ID - ID of the network interface.
10382	ID                       *string                   `json:"id,omitempty"`
10383	SecurityRuleAssociations *SecurityRuleAssociations `json:"securityRuleAssociations,omitempty"`
10384}
10385
10386// SecurityGroupPropertiesFormat network Security Group resource.
10387type SecurityGroupPropertiesFormat struct {
10388	// SecurityRules - A collection of security rules of the network security group.
10389	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
10390	// DefaultSecurityRules - The default security rules of network security group.
10391	DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"`
10392	// NetworkInterfaces - READ-ONLY; A collection of references to network interfaces.
10393	NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"`
10394	// Subnets - READ-ONLY; A collection of references to subnets.
10395	Subnets *[]Subnet `json:"subnets,omitempty"`
10396	// ResourceGUID - The resource GUID property of the network security group resource.
10397	ResourceGUID *string `json:"resourceGuid,omitempty"`
10398	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
10399	ProvisioningState *string `json:"provisioningState,omitempty"`
10400}
10401
10402// MarshalJSON is the custom marshaler for SecurityGroupPropertiesFormat.
10403func (sgpf SecurityGroupPropertiesFormat) MarshalJSON() ([]byte, error) {
10404	objectMap := make(map[string]interface{})
10405	if sgpf.SecurityRules != nil {
10406		objectMap["securityRules"] = sgpf.SecurityRules
10407	}
10408	if sgpf.DefaultSecurityRules != nil {
10409		objectMap["defaultSecurityRules"] = sgpf.DefaultSecurityRules
10410	}
10411	if sgpf.ResourceGUID != nil {
10412		objectMap["resourceGuid"] = sgpf.ResourceGUID
10413	}
10414	if sgpf.ProvisioningState != nil {
10415		objectMap["provisioningState"] = sgpf.ProvisioningState
10416	}
10417	return json.Marshal(objectMap)
10418}
10419
10420// SecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
10421// long-running operation.
10422type SecurityGroupsCreateOrUpdateFuture struct {
10423	azure.FutureAPI
10424	// Result returns the result of the asynchronous operation.
10425	// If the operation has not completed it will return an error.
10426	Result func(SecurityGroupsClient) (SecurityGroup, error)
10427}
10428
10429// SecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
10430// operation.
10431type SecurityGroupsDeleteFuture struct {
10432	azure.FutureAPI
10433	// Result returns the result of the asynchronous operation.
10434	// If the operation has not completed it will return an error.
10435	Result func(SecurityGroupsClient) (autorest.Response, error)
10436}
10437
10438// SecurityGroupViewParameters parameters that define the VM to check security groups for.
10439type SecurityGroupViewParameters struct {
10440	// TargetResourceID - ID of the target VM.
10441	TargetResourceID *string `json:"targetResourceId,omitempty"`
10442}
10443
10444// SecurityGroupViewResult the information about security rules applied to the specified VM.
10445type SecurityGroupViewResult struct {
10446	autorest.Response `json:"-"`
10447	// NetworkInterfaces - List of network interfaces on the specified VM.
10448	NetworkInterfaces *[]SecurityGroupNetworkInterface `json:"networkInterfaces,omitempty"`
10449}
10450
10451// SecurityRule network security rule.
10452type SecurityRule struct {
10453	autorest.Response `json:"-"`
10454	// SecurityRulePropertiesFormat - Properties of the security rule
10455	*SecurityRulePropertiesFormat `json:"properties,omitempty"`
10456	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
10457	Name *string `json:"name,omitempty"`
10458	// Etag - A unique read-only string that changes whenever the resource is updated.
10459	Etag *string `json:"etag,omitempty"`
10460	// ID - Resource ID.
10461	ID *string `json:"id,omitempty"`
10462}
10463
10464// MarshalJSON is the custom marshaler for SecurityRule.
10465func (sr SecurityRule) MarshalJSON() ([]byte, error) {
10466	objectMap := make(map[string]interface{})
10467	if sr.SecurityRulePropertiesFormat != nil {
10468		objectMap["properties"] = sr.SecurityRulePropertiesFormat
10469	}
10470	if sr.Name != nil {
10471		objectMap["name"] = sr.Name
10472	}
10473	if sr.Etag != nil {
10474		objectMap["etag"] = sr.Etag
10475	}
10476	if sr.ID != nil {
10477		objectMap["id"] = sr.ID
10478	}
10479	return json.Marshal(objectMap)
10480}
10481
10482// UnmarshalJSON is the custom unmarshaler for SecurityRule struct.
10483func (sr *SecurityRule) UnmarshalJSON(body []byte) error {
10484	var m map[string]*json.RawMessage
10485	err := json.Unmarshal(body, &m)
10486	if err != nil {
10487		return err
10488	}
10489	for k, v := range m {
10490		switch k {
10491		case "properties":
10492			if v != nil {
10493				var securityRulePropertiesFormat SecurityRulePropertiesFormat
10494				err = json.Unmarshal(*v, &securityRulePropertiesFormat)
10495				if err != nil {
10496					return err
10497				}
10498				sr.SecurityRulePropertiesFormat = &securityRulePropertiesFormat
10499			}
10500		case "name":
10501			if v != nil {
10502				var name string
10503				err = json.Unmarshal(*v, &name)
10504				if err != nil {
10505					return err
10506				}
10507				sr.Name = &name
10508			}
10509		case "etag":
10510			if v != nil {
10511				var etag string
10512				err = json.Unmarshal(*v, &etag)
10513				if err != nil {
10514					return err
10515				}
10516				sr.Etag = &etag
10517			}
10518		case "id":
10519			if v != nil {
10520				var ID string
10521				err = json.Unmarshal(*v, &ID)
10522				if err != nil {
10523					return err
10524				}
10525				sr.ID = &ID
10526			}
10527		}
10528	}
10529
10530	return nil
10531}
10532
10533// SecurityRuleAssociations all security rules associated with the network interface.
10534type SecurityRuleAssociations struct {
10535	NetworkInterfaceAssociation *InterfaceAssociation `json:"networkInterfaceAssociation,omitempty"`
10536	SubnetAssociation           *SubnetAssociation    `json:"subnetAssociation,omitempty"`
10537	// DefaultSecurityRules - Collection of default security rules of the network security group.
10538	DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"`
10539	// EffectiveSecurityRules - Collection of effective security rules.
10540	EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"`
10541}
10542
10543// SecurityRuleListResult response for ListSecurityRule API service call. Retrieves all security rules that
10544// belongs to a network security group.
10545type SecurityRuleListResult struct {
10546	autorest.Response `json:"-"`
10547	// Value - The security rules in a network security group.
10548	Value *[]SecurityRule `json:"value,omitempty"`
10549	// NextLink - The URL to get the next set of results.
10550	NextLink *string `json:"nextLink,omitempty"`
10551}
10552
10553// SecurityRuleListResultIterator provides access to a complete listing of SecurityRule values.
10554type SecurityRuleListResultIterator struct {
10555	i    int
10556	page SecurityRuleListResultPage
10557}
10558
10559// NextWithContext advances to the next value.  If there was an error making
10560// the request the iterator does not advance and the error is returned.
10561func (iter *SecurityRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
10562	if tracing.IsEnabled() {
10563		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultIterator.NextWithContext")
10564		defer func() {
10565			sc := -1
10566			if iter.Response().Response.Response != nil {
10567				sc = iter.Response().Response.Response.StatusCode
10568			}
10569			tracing.EndSpan(ctx, sc, err)
10570		}()
10571	}
10572	iter.i++
10573	if iter.i < len(iter.page.Values()) {
10574		return nil
10575	}
10576	err = iter.page.NextWithContext(ctx)
10577	if err != nil {
10578		iter.i--
10579		return err
10580	}
10581	iter.i = 0
10582	return nil
10583}
10584
10585// Next advances to the next value.  If there was an error making
10586// the request the iterator does not advance and the error is returned.
10587// Deprecated: Use NextWithContext() instead.
10588func (iter *SecurityRuleListResultIterator) Next() error {
10589	return iter.NextWithContext(context.Background())
10590}
10591
10592// NotDone returns true if the enumeration should be started or is not yet complete.
10593func (iter SecurityRuleListResultIterator) NotDone() bool {
10594	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10595}
10596
10597// Response returns the raw server response from the last page request.
10598func (iter SecurityRuleListResultIterator) Response() SecurityRuleListResult {
10599	return iter.page.Response()
10600}
10601
10602// Value returns the current value or a zero-initialized value if the
10603// iterator has advanced beyond the end of the collection.
10604func (iter SecurityRuleListResultIterator) Value() SecurityRule {
10605	if !iter.page.NotDone() {
10606		return SecurityRule{}
10607	}
10608	return iter.page.Values()[iter.i]
10609}
10610
10611// Creates a new instance of the SecurityRuleListResultIterator type.
10612func NewSecurityRuleListResultIterator(page SecurityRuleListResultPage) SecurityRuleListResultIterator {
10613	return SecurityRuleListResultIterator{page: page}
10614}
10615
10616// IsEmpty returns true if the ListResult contains no values.
10617func (srlr SecurityRuleListResult) IsEmpty() bool {
10618	return srlr.Value == nil || len(*srlr.Value) == 0
10619}
10620
10621// hasNextLink returns true if the NextLink is not empty.
10622func (srlr SecurityRuleListResult) hasNextLink() bool {
10623	return srlr.NextLink != nil && len(*srlr.NextLink) != 0
10624}
10625
10626// securityRuleListResultPreparer prepares a request to retrieve the next set of results.
10627// It returns nil if no more results exist.
10628func (srlr SecurityRuleListResult) securityRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
10629	if !srlr.hasNextLink() {
10630		return nil, nil
10631	}
10632	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10633		autorest.AsJSON(),
10634		autorest.AsGet(),
10635		autorest.WithBaseURL(to.String(srlr.NextLink)))
10636}
10637
10638// SecurityRuleListResultPage contains a page of SecurityRule values.
10639type SecurityRuleListResultPage struct {
10640	fn   func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)
10641	srlr SecurityRuleListResult
10642}
10643
10644// NextWithContext advances to the next page of values.  If there was an error making
10645// the request the page does not advance and the error is returned.
10646func (page *SecurityRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
10647	if tracing.IsEnabled() {
10648		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultPage.NextWithContext")
10649		defer func() {
10650			sc := -1
10651			if page.Response().Response.Response != nil {
10652				sc = page.Response().Response.Response.StatusCode
10653			}
10654			tracing.EndSpan(ctx, sc, err)
10655		}()
10656	}
10657	for {
10658		next, err := page.fn(ctx, page.srlr)
10659		if err != nil {
10660			return err
10661		}
10662		page.srlr = next
10663		if !next.hasNextLink() || !next.IsEmpty() {
10664			break
10665		}
10666	}
10667	return nil
10668}
10669
10670// Next advances to the next page of values.  If there was an error making
10671// the request the page does not advance and the error is returned.
10672// Deprecated: Use NextWithContext() instead.
10673func (page *SecurityRuleListResultPage) Next() error {
10674	return page.NextWithContext(context.Background())
10675}
10676
10677// NotDone returns true if the page enumeration should be started or is not yet complete.
10678func (page SecurityRuleListResultPage) NotDone() bool {
10679	return !page.srlr.IsEmpty()
10680}
10681
10682// Response returns the raw server response from the last page request.
10683func (page SecurityRuleListResultPage) Response() SecurityRuleListResult {
10684	return page.srlr
10685}
10686
10687// Values returns the slice of values for the current page or nil if there are no values.
10688func (page SecurityRuleListResultPage) Values() []SecurityRule {
10689	if page.srlr.IsEmpty() {
10690		return nil
10691	}
10692	return *page.srlr.Value
10693}
10694
10695// Creates a new instance of the SecurityRuleListResultPage type.
10696func NewSecurityRuleListResultPage(cur SecurityRuleListResult, getNextPage func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)) SecurityRuleListResultPage {
10697	return SecurityRuleListResultPage{
10698		fn:   getNextPage,
10699		srlr: cur,
10700	}
10701}
10702
10703// SecurityRulePropertiesFormat security rule resource.
10704type SecurityRulePropertiesFormat struct {
10705	// Description - A description for this rule. Restricted to 140 chars.
10706	Description *string `json:"description,omitempty"`
10707	// Protocol - Network protocol this rule applies to. Possible values are 'Tcp', 'Udp', and '*'. Possible values include: 'SecurityRuleProtocolTCP', 'SecurityRuleProtocolUDP', 'SecurityRuleProtocolAsterisk'
10708	Protocol SecurityRuleProtocol `json:"protocol,omitempty"`
10709	// SourcePortRange - The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
10710	SourcePortRange *string `json:"sourcePortRange,omitempty"`
10711	// DestinationPortRange - The destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
10712	DestinationPortRange *string `json:"destinationPortRange,omitempty"`
10713	// 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.
10714	SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
10715	// SourceAddressPrefixes - The CIDR or source IP ranges.
10716	SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"`
10717	// 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.
10718	DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"`
10719	// DestinationAddressPrefixes - The destination address prefixes. CIDR or destination IP ranges.
10720	DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"`
10721	// SourcePortRanges - The source port ranges.
10722	SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"`
10723	// DestinationPortRanges - The destination port ranges.
10724	DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"`
10725	// Access - The network traffic is allowed or denied. Possible values are: 'Allow' and 'Deny'. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
10726	Access SecurityRuleAccess `json:"access,omitempty"`
10727	// 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.
10728	Priority *int32 `json:"priority,omitempty"`
10729	// 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'
10730	Direction SecurityRuleDirection `json:"direction,omitempty"`
10731	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
10732	ProvisioningState *string `json:"provisioningState,omitempty"`
10733}
10734
10735// SecurityRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
10736// long-running operation.
10737type SecurityRulesCreateOrUpdateFuture struct {
10738	azure.FutureAPI
10739	// Result returns the result of the asynchronous operation.
10740	// If the operation has not completed it will return an error.
10741	Result func(SecurityRulesClient) (SecurityRule, error)
10742}
10743
10744// SecurityRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
10745// operation.
10746type SecurityRulesDeleteFuture struct {
10747	azure.FutureAPI
10748	// Result returns the result of the asynchronous operation.
10749	// If the operation has not completed it will return an error.
10750	Result func(SecurityRulesClient) (autorest.Response, error)
10751}
10752
10753// ServiceEndpointPropertiesFormat the service endpoint properties.
10754type ServiceEndpointPropertiesFormat struct {
10755	// Service - The type of the endpoint service.
10756	Service *string `json:"service,omitempty"`
10757	// Locations - A list of locations.
10758	Locations *[]string `json:"locations,omitempty"`
10759	// ProvisioningState - The provisioning state of the resource.
10760	ProvisioningState *string `json:"provisioningState,omitempty"`
10761}
10762
10763// String ...
10764type String struct {
10765	autorest.Response `json:"-"`
10766	Value             *string `json:"value,omitempty"`
10767}
10768
10769// Subnet subnet in a virtual network resource.
10770type Subnet struct {
10771	autorest.Response `json:"-"`
10772	// SubnetPropertiesFormat - Properties of the subnet.
10773	*SubnetPropertiesFormat `json:"properties,omitempty"`
10774	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
10775	Name *string `json:"name,omitempty"`
10776	// Etag - A unique read-only string that changes whenever the resource is updated.
10777	Etag *string `json:"etag,omitempty"`
10778	// ID - Resource ID.
10779	ID *string `json:"id,omitempty"`
10780}
10781
10782// MarshalJSON is the custom marshaler for Subnet.
10783func (s Subnet) MarshalJSON() ([]byte, error) {
10784	objectMap := make(map[string]interface{})
10785	if s.SubnetPropertiesFormat != nil {
10786		objectMap["properties"] = s.SubnetPropertiesFormat
10787	}
10788	if s.Name != nil {
10789		objectMap["name"] = s.Name
10790	}
10791	if s.Etag != nil {
10792		objectMap["etag"] = s.Etag
10793	}
10794	if s.ID != nil {
10795		objectMap["id"] = s.ID
10796	}
10797	return json.Marshal(objectMap)
10798}
10799
10800// UnmarshalJSON is the custom unmarshaler for Subnet struct.
10801func (s *Subnet) UnmarshalJSON(body []byte) error {
10802	var m map[string]*json.RawMessage
10803	err := json.Unmarshal(body, &m)
10804	if err != nil {
10805		return err
10806	}
10807	for k, v := range m {
10808		switch k {
10809		case "properties":
10810			if v != nil {
10811				var subnetPropertiesFormat SubnetPropertiesFormat
10812				err = json.Unmarshal(*v, &subnetPropertiesFormat)
10813				if err != nil {
10814					return err
10815				}
10816				s.SubnetPropertiesFormat = &subnetPropertiesFormat
10817			}
10818		case "name":
10819			if v != nil {
10820				var name string
10821				err = json.Unmarshal(*v, &name)
10822				if err != nil {
10823					return err
10824				}
10825				s.Name = &name
10826			}
10827		case "etag":
10828			if v != nil {
10829				var etag string
10830				err = json.Unmarshal(*v, &etag)
10831				if err != nil {
10832					return err
10833				}
10834				s.Etag = &etag
10835			}
10836		case "id":
10837			if v != nil {
10838				var ID string
10839				err = json.Unmarshal(*v, &ID)
10840				if err != nil {
10841					return err
10842				}
10843				s.ID = &ID
10844			}
10845		}
10846	}
10847
10848	return nil
10849}
10850
10851// SubnetAssociation network interface and its custom security rules.
10852type SubnetAssociation struct {
10853	// ID - READ-ONLY; Subnet ID.
10854	ID *string `json:"id,omitempty"`
10855	// SecurityRules - Collection of custom security rules.
10856	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
10857}
10858
10859// MarshalJSON is the custom marshaler for SubnetAssociation.
10860func (sa SubnetAssociation) MarshalJSON() ([]byte, error) {
10861	objectMap := make(map[string]interface{})
10862	if sa.SecurityRules != nil {
10863		objectMap["securityRules"] = sa.SecurityRules
10864	}
10865	return json.Marshal(objectMap)
10866}
10867
10868// SubnetListResult response for ListSubnets API service callRetrieves all subnet that belongs to a virtual
10869// network
10870type SubnetListResult struct {
10871	autorest.Response `json:"-"`
10872	// Value - The subnets in a virtual network.
10873	Value *[]Subnet `json:"value,omitempty"`
10874	// NextLink - The URL to get the next set of results.
10875	NextLink *string `json:"nextLink,omitempty"`
10876}
10877
10878// SubnetListResultIterator provides access to a complete listing of Subnet values.
10879type SubnetListResultIterator struct {
10880	i    int
10881	page SubnetListResultPage
10882}
10883
10884// NextWithContext advances to the next value.  If there was an error making
10885// the request the iterator does not advance and the error is returned.
10886func (iter *SubnetListResultIterator) NextWithContext(ctx context.Context) (err error) {
10887	if tracing.IsEnabled() {
10888		ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultIterator.NextWithContext")
10889		defer func() {
10890			sc := -1
10891			if iter.Response().Response.Response != nil {
10892				sc = iter.Response().Response.Response.StatusCode
10893			}
10894			tracing.EndSpan(ctx, sc, err)
10895		}()
10896	}
10897	iter.i++
10898	if iter.i < len(iter.page.Values()) {
10899		return nil
10900	}
10901	err = iter.page.NextWithContext(ctx)
10902	if err != nil {
10903		iter.i--
10904		return err
10905	}
10906	iter.i = 0
10907	return nil
10908}
10909
10910// Next advances to the next value.  If there was an error making
10911// the request the iterator does not advance and the error is returned.
10912// Deprecated: Use NextWithContext() instead.
10913func (iter *SubnetListResultIterator) Next() error {
10914	return iter.NextWithContext(context.Background())
10915}
10916
10917// NotDone returns true if the enumeration should be started or is not yet complete.
10918func (iter SubnetListResultIterator) NotDone() bool {
10919	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10920}
10921
10922// Response returns the raw server response from the last page request.
10923func (iter SubnetListResultIterator) Response() SubnetListResult {
10924	return iter.page.Response()
10925}
10926
10927// Value returns the current value or a zero-initialized value if the
10928// iterator has advanced beyond the end of the collection.
10929func (iter SubnetListResultIterator) Value() Subnet {
10930	if !iter.page.NotDone() {
10931		return Subnet{}
10932	}
10933	return iter.page.Values()[iter.i]
10934}
10935
10936// Creates a new instance of the SubnetListResultIterator type.
10937func NewSubnetListResultIterator(page SubnetListResultPage) SubnetListResultIterator {
10938	return SubnetListResultIterator{page: page}
10939}
10940
10941// IsEmpty returns true if the ListResult contains no values.
10942func (slr SubnetListResult) IsEmpty() bool {
10943	return slr.Value == nil || len(*slr.Value) == 0
10944}
10945
10946// hasNextLink returns true if the NextLink is not empty.
10947func (slr SubnetListResult) hasNextLink() bool {
10948	return slr.NextLink != nil && len(*slr.NextLink) != 0
10949}
10950
10951// subnetListResultPreparer prepares a request to retrieve the next set of results.
10952// It returns nil if no more results exist.
10953func (slr SubnetListResult) subnetListResultPreparer(ctx context.Context) (*http.Request, error) {
10954	if !slr.hasNextLink() {
10955		return nil, nil
10956	}
10957	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10958		autorest.AsJSON(),
10959		autorest.AsGet(),
10960		autorest.WithBaseURL(to.String(slr.NextLink)))
10961}
10962
10963// SubnetListResultPage contains a page of Subnet values.
10964type SubnetListResultPage struct {
10965	fn  func(context.Context, SubnetListResult) (SubnetListResult, error)
10966	slr SubnetListResult
10967}
10968
10969// NextWithContext advances to the next page of values.  If there was an error making
10970// the request the page does not advance and the error is returned.
10971func (page *SubnetListResultPage) NextWithContext(ctx context.Context) (err error) {
10972	if tracing.IsEnabled() {
10973		ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultPage.NextWithContext")
10974		defer func() {
10975			sc := -1
10976			if page.Response().Response.Response != nil {
10977				sc = page.Response().Response.Response.StatusCode
10978			}
10979			tracing.EndSpan(ctx, sc, err)
10980		}()
10981	}
10982	for {
10983		next, err := page.fn(ctx, page.slr)
10984		if err != nil {
10985			return err
10986		}
10987		page.slr = next
10988		if !next.hasNextLink() || !next.IsEmpty() {
10989			break
10990		}
10991	}
10992	return nil
10993}
10994
10995// Next advances to the next page of values.  If there was an error making
10996// the request the page does not advance and the error is returned.
10997// Deprecated: Use NextWithContext() instead.
10998func (page *SubnetListResultPage) Next() error {
10999	return page.NextWithContext(context.Background())
11000}
11001
11002// NotDone returns true if the page enumeration should be started or is not yet complete.
11003func (page SubnetListResultPage) NotDone() bool {
11004	return !page.slr.IsEmpty()
11005}
11006
11007// Response returns the raw server response from the last page request.
11008func (page SubnetListResultPage) Response() SubnetListResult {
11009	return page.slr
11010}
11011
11012// Values returns the slice of values for the current page or nil if there are no values.
11013func (page SubnetListResultPage) Values() []Subnet {
11014	if page.slr.IsEmpty() {
11015		return nil
11016	}
11017	return *page.slr.Value
11018}
11019
11020// Creates a new instance of the SubnetListResultPage type.
11021func NewSubnetListResultPage(cur SubnetListResult, getNextPage func(context.Context, SubnetListResult) (SubnetListResult, error)) SubnetListResultPage {
11022	return SubnetListResultPage{
11023		fn:  getNextPage,
11024		slr: cur,
11025	}
11026}
11027
11028// SubnetPropertiesFormat properties of the subnet.
11029type SubnetPropertiesFormat struct {
11030	// AddressPrefix - The address prefix for the subnet.
11031	AddressPrefix *string `json:"addressPrefix,omitempty"`
11032	// NetworkSecurityGroup - The reference of the NetworkSecurityGroup resource.
11033	NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"`
11034	// RouteTable - The reference of the RouteTable resource.
11035	RouteTable *RouteTable `json:"routeTable,omitempty"`
11036	// ServiceEndpoints - An array of service endpoints.
11037	ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"`
11038	// IPConfigurations - READ-ONLY; Gets an array of references to the network interface IP configurations using subnet.
11039	IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"`
11040	// ResourceNavigationLinks - Gets an array of references to the external resources using subnet.
11041	ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"`
11042	// ProvisioningState - The provisioning state of the resource.
11043	ProvisioningState *string `json:"provisioningState,omitempty"`
11044}
11045
11046// MarshalJSON is the custom marshaler for SubnetPropertiesFormat.
11047func (spf SubnetPropertiesFormat) MarshalJSON() ([]byte, error) {
11048	objectMap := make(map[string]interface{})
11049	if spf.AddressPrefix != nil {
11050		objectMap["addressPrefix"] = spf.AddressPrefix
11051	}
11052	if spf.NetworkSecurityGroup != nil {
11053		objectMap["networkSecurityGroup"] = spf.NetworkSecurityGroup
11054	}
11055	if spf.RouteTable != nil {
11056		objectMap["routeTable"] = spf.RouteTable
11057	}
11058	if spf.ServiceEndpoints != nil {
11059		objectMap["serviceEndpoints"] = spf.ServiceEndpoints
11060	}
11061	if spf.ResourceNavigationLinks != nil {
11062		objectMap["resourceNavigationLinks"] = spf.ResourceNavigationLinks
11063	}
11064	if spf.ProvisioningState != nil {
11065		objectMap["provisioningState"] = spf.ProvisioningState
11066	}
11067	return json.Marshal(objectMap)
11068}
11069
11070// SubnetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
11071// operation.
11072type SubnetsCreateOrUpdateFuture struct {
11073	azure.FutureAPI
11074	// Result returns the result of the asynchronous operation.
11075	// If the operation has not completed it will return an error.
11076	Result func(SubnetsClient) (Subnet, error)
11077}
11078
11079// SubnetsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
11080// operation.
11081type SubnetsDeleteFuture struct {
11082	azure.FutureAPI
11083	// Result returns the result of the asynchronous operation.
11084	// If the operation has not completed it will return an error.
11085	Result func(SubnetsClient) (autorest.Response, error)
11086}
11087
11088// SubResource reference to another subresource.
11089type SubResource struct {
11090	// ID - Resource ID.
11091	ID *string `json:"id,omitempty"`
11092}
11093
11094// Topology topology of the specified resource group.
11095type Topology struct {
11096	autorest.Response `json:"-"`
11097	// ID - READ-ONLY; GUID representing the operation id.
11098	ID *string `json:"id,omitempty"`
11099	// CreatedDateTime - READ-ONLY; The datetime when the topology was initially created for the resource group.
11100	CreatedDateTime *date.Time `json:"createdDateTime,omitempty"`
11101	// LastModified - READ-ONLY; The datetime when the topology was last modified.
11102	LastModified *date.Time          `json:"lastModified,omitempty"`
11103	Resources    *[]TopologyResource `json:"resources,omitempty"`
11104}
11105
11106// MarshalJSON is the custom marshaler for Topology.
11107func (t Topology) MarshalJSON() ([]byte, error) {
11108	objectMap := make(map[string]interface{})
11109	if t.Resources != nil {
11110		objectMap["resources"] = t.Resources
11111	}
11112	return json.Marshal(objectMap)
11113}
11114
11115// TopologyAssociation resources that have an association with the parent resource.
11116type TopologyAssociation struct {
11117	// Name - The name of the resource that is associated with the parent resource.
11118	Name *string `json:"name,omitempty"`
11119	// ResourceID - The ID of the resource that is associated with the parent resource.
11120	ResourceID *string `json:"resourceId,omitempty"`
11121	// AssociationType - The association type of the child resource to the parent resource. Possible values include: 'Associated', 'Contains'
11122	AssociationType AssociationType `json:"associationType,omitempty"`
11123}
11124
11125// TopologyParameters parameters that define the representation of topology.
11126type TopologyParameters struct {
11127	// TargetResourceGroupName - The name of the target resource group to perform topology on.
11128	TargetResourceGroupName *string `json:"targetResourceGroupName,omitempty"`
11129}
11130
11131// TopologyResource the network resource topology information for the given resource group.
11132type TopologyResource struct {
11133	// Name - Name of the resource.
11134	Name *string `json:"name,omitempty"`
11135	// ID - ID of the resource.
11136	ID *string `json:"id,omitempty"`
11137	// Location - Resource location.
11138	Location *string `json:"location,omitempty"`
11139	// Associations - Holds the associations the resource has with other resources in the resource group.
11140	Associations *[]TopologyAssociation `json:"associations,omitempty"`
11141}
11142
11143// TroubleshootingDetails information gained from troubleshooting of specified resource.
11144type TroubleshootingDetails struct {
11145	// ID - The id of the get troubleshoot operation.
11146	ID *string `json:"id,omitempty"`
11147	// ReasonType - Reason type of failure.
11148	ReasonType *string `json:"reasonType,omitempty"`
11149	// Summary - A summary of troubleshooting.
11150	Summary *string `json:"summary,omitempty"`
11151	// Detail - Details on troubleshooting results.
11152	Detail *string `json:"detail,omitempty"`
11153	// RecommendedActions - List of recommended actions.
11154	RecommendedActions *[]TroubleshootingRecommendedActions `json:"recommendedActions,omitempty"`
11155}
11156
11157// TroubleshootingParameters parameters that define the resource to troubleshoot.
11158type TroubleshootingParameters struct {
11159	// TargetResourceID - The target resource to troubleshoot.
11160	TargetResourceID           *string `json:"targetResourceId,omitempty"`
11161	*TroubleshootingProperties `json:"properties,omitempty"`
11162}
11163
11164// MarshalJSON is the custom marshaler for TroubleshootingParameters.
11165func (tp TroubleshootingParameters) MarshalJSON() ([]byte, error) {
11166	objectMap := make(map[string]interface{})
11167	if tp.TargetResourceID != nil {
11168		objectMap["targetResourceId"] = tp.TargetResourceID
11169	}
11170	if tp.TroubleshootingProperties != nil {
11171		objectMap["properties"] = tp.TroubleshootingProperties
11172	}
11173	return json.Marshal(objectMap)
11174}
11175
11176// UnmarshalJSON is the custom unmarshaler for TroubleshootingParameters struct.
11177func (tp *TroubleshootingParameters) UnmarshalJSON(body []byte) error {
11178	var m map[string]*json.RawMessage
11179	err := json.Unmarshal(body, &m)
11180	if err != nil {
11181		return err
11182	}
11183	for k, v := range m {
11184		switch k {
11185		case "targetResourceId":
11186			if v != nil {
11187				var targetResourceID string
11188				err = json.Unmarshal(*v, &targetResourceID)
11189				if err != nil {
11190					return err
11191				}
11192				tp.TargetResourceID = &targetResourceID
11193			}
11194		case "properties":
11195			if v != nil {
11196				var troubleshootingProperties TroubleshootingProperties
11197				err = json.Unmarshal(*v, &troubleshootingProperties)
11198				if err != nil {
11199					return err
11200				}
11201				tp.TroubleshootingProperties = &troubleshootingProperties
11202			}
11203		}
11204	}
11205
11206	return nil
11207}
11208
11209// TroubleshootingProperties storage location provided for troubleshoot.
11210type TroubleshootingProperties struct {
11211	// StorageID - The ID for the storage account to save the troubleshoot result.
11212	StorageID *string `json:"storageId,omitempty"`
11213	// StoragePath - The path to the blob to save the troubleshoot result in.
11214	StoragePath *string `json:"storagePath,omitempty"`
11215}
11216
11217// TroubleshootingRecommendedActions recommended actions based on discovered issues.
11218type TroubleshootingRecommendedActions struct {
11219	// ActionID - ID of the recommended action.
11220	ActionID *string `json:"actionId,omitempty"`
11221	// ActionText - Description of recommended actions.
11222	ActionText *string `json:"actionText,omitempty"`
11223	// ActionURI - The uri linking to a documentation for the recommended troubleshooting actions.
11224	ActionURI *string `json:"actionUri,omitempty"`
11225	// ActionURIText - The information from the URI for the recommended troubleshooting actions.
11226	ActionURIText *string `json:"actionUriText,omitempty"`
11227}
11228
11229// TroubleshootingResult troubleshooting information gained from specified resource.
11230type TroubleshootingResult struct {
11231	autorest.Response `json:"-"`
11232	// StartTime - The start time of the troubleshooting.
11233	StartTime *date.Time `json:"startTime,omitempty"`
11234	// EndTime - The end time of the troubleshooting.
11235	EndTime *date.Time `json:"endTime,omitempty"`
11236	// Code - The result code of the troubleshooting.
11237	Code *string `json:"code,omitempty"`
11238	// Results - Information from troubleshooting.
11239	Results *[]TroubleshootingDetails `json:"results,omitempty"`
11240}
11241
11242// TunnelConnectionHealth virtualNetworkGatewayConnection properties
11243type TunnelConnectionHealth struct {
11244	// Tunnel - READ-ONLY; Tunnel name.
11245	Tunnel *string `json:"tunnel,omitempty"`
11246	// ConnectionStatus - READ-ONLY; Virtual network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
11247	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
11248	// IngressBytesTransferred - READ-ONLY; The Ingress Bytes Transferred in this connection
11249	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
11250	// EgressBytesTransferred - READ-ONLY; The Egress Bytes Transferred in this connection
11251	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
11252	// LastConnectionEstablishedUtcTime - READ-ONLY; The time at which connection was established in Utc format.
11253	LastConnectionEstablishedUtcTime *string `json:"lastConnectionEstablishedUtcTime,omitempty"`
11254}
11255
11256// Usage describes network resource usage.
11257type Usage struct {
11258	// Unit - An enum describing the unit of measurement.
11259	Unit *string `json:"unit,omitempty"`
11260	// CurrentValue - The current value of the usage.
11261	CurrentValue *int64 `json:"currentValue,omitempty"`
11262	// Limit - The limit of usage.
11263	Limit *int64 `json:"limit,omitempty"`
11264	// Name - The name of the type of usage.
11265	Name *UsageName `json:"name,omitempty"`
11266}
11267
11268// UsageName the usage names.
11269type UsageName struct {
11270	// Value - A string describing the resource name.
11271	Value *string `json:"value,omitempty"`
11272	// LocalizedValue - A localized string describing the resource name.
11273	LocalizedValue *string `json:"localizedValue,omitempty"`
11274}
11275
11276// UsagesListResult the list usages operation response.
11277type UsagesListResult struct {
11278	autorest.Response `json:"-"`
11279	// Value - The list network resource usages.
11280	Value *[]Usage `json:"value,omitempty"`
11281	// NextLink - URL to get the next set of results.
11282	NextLink *string `json:"nextLink,omitempty"`
11283}
11284
11285// UsagesListResultIterator provides access to a complete listing of Usage values.
11286type UsagesListResultIterator struct {
11287	i    int
11288	page UsagesListResultPage
11289}
11290
11291// NextWithContext advances to the next value.  If there was an error making
11292// the request the iterator does not advance and the error is returned.
11293func (iter *UsagesListResultIterator) NextWithContext(ctx context.Context) (err error) {
11294	if tracing.IsEnabled() {
11295		ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultIterator.NextWithContext")
11296		defer func() {
11297			sc := -1
11298			if iter.Response().Response.Response != nil {
11299				sc = iter.Response().Response.Response.StatusCode
11300			}
11301			tracing.EndSpan(ctx, sc, err)
11302		}()
11303	}
11304	iter.i++
11305	if iter.i < len(iter.page.Values()) {
11306		return nil
11307	}
11308	err = iter.page.NextWithContext(ctx)
11309	if err != nil {
11310		iter.i--
11311		return err
11312	}
11313	iter.i = 0
11314	return nil
11315}
11316
11317// Next advances to the next value.  If there was an error making
11318// the request the iterator does not advance and the error is returned.
11319// Deprecated: Use NextWithContext() instead.
11320func (iter *UsagesListResultIterator) Next() error {
11321	return iter.NextWithContext(context.Background())
11322}
11323
11324// NotDone returns true if the enumeration should be started or is not yet complete.
11325func (iter UsagesListResultIterator) NotDone() bool {
11326	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11327}
11328
11329// Response returns the raw server response from the last page request.
11330func (iter UsagesListResultIterator) Response() UsagesListResult {
11331	return iter.page.Response()
11332}
11333
11334// Value returns the current value or a zero-initialized value if the
11335// iterator has advanced beyond the end of the collection.
11336func (iter UsagesListResultIterator) Value() Usage {
11337	if !iter.page.NotDone() {
11338		return Usage{}
11339	}
11340	return iter.page.Values()[iter.i]
11341}
11342
11343// Creates a new instance of the UsagesListResultIterator type.
11344func NewUsagesListResultIterator(page UsagesListResultPage) UsagesListResultIterator {
11345	return UsagesListResultIterator{page: page}
11346}
11347
11348// IsEmpty returns true if the ListResult contains no values.
11349func (ulr UsagesListResult) IsEmpty() bool {
11350	return ulr.Value == nil || len(*ulr.Value) == 0
11351}
11352
11353// hasNextLink returns true if the NextLink is not empty.
11354func (ulr UsagesListResult) hasNextLink() bool {
11355	return ulr.NextLink != nil && len(*ulr.NextLink) != 0
11356}
11357
11358// usagesListResultPreparer prepares a request to retrieve the next set of results.
11359// It returns nil if no more results exist.
11360func (ulr UsagesListResult) usagesListResultPreparer(ctx context.Context) (*http.Request, error) {
11361	if !ulr.hasNextLink() {
11362		return nil, nil
11363	}
11364	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11365		autorest.AsJSON(),
11366		autorest.AsGet(),
11367		autorest.WithBaseURL(to.String(ulr.NextLink)))
11368}
11369
11370// UsagesListResultPage contains a page of Usage values.
11371type UsagesListResultPage struct {
11372	fn  func(context.Context, UsagesListResult) (UsagesListResult, error)
11373	ulr UsagesListResult
11374}
11375
11376// NextWithContext advances to the next page of values.  If there was an error making
11377// the request the page does not advance and the error is returned.
11378func (page *UsagesListResultPage) NextWithContext(ctx context.Context) (err error) {
11379	if tracing.IsEnabled() {
11380		ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultPage.NextWithContext")
11381		defer func() {
11382			sc := -1
11383			if page.Response().Response.Response != nil {
11384				sc = page.Response().Response.Response.StatusCode
11385			}
11386			tracing.EndSpan(ctx, sc, err)
11387		}()
11388	}
11389	for {
11390		next, err := page.fn(ctx, page.ulr)
11391		if err != nil {
11392			return err
11393		}
11394		page.ulr = next
11395		if !next.hasNextLink() || !next.IsEmpty() {
11396			break
11397		}
11398	}
11399	return nil
11400}
11401
11402// Next advances to the next page of values.  If there was an error making
11403// the request the page does not advance and the error is returned.
11404// Deprecated: Use NextWithContext() instead.
11405func (page *UsagesListResultPage) Next() error {
11406	return page.NextWithContext(context.Background())
11407}
11408
11409// NotDone returns true if the page enumeration should be started or is not yet complete.
11410func (page UsagesListResultPage) NotDone() bool {
11411	return !page.ulr.IsEmpty()
11412}
11413
11414// Response returns the raw server response from the last page request.
11415func (page UsagesListResultPage) Response() UsagesListResult {
11416	return page.ulr
11417}
11418
11419// Values returns the slice of values for the current page or nil if there are no values.
11420func (page UsagesListResultPage) Values() []Usage {
11421	if page.ulr.IsEmpty() {
11422		return nil
11423	}
11424	return *page.ulr.Value
11425}
11426
11427// Creates a new instance of the UsagesListResultPage type.
11428func NewUsagesListResultPage(cur UsagesListResult, getNextPage func(context.Context, UsagesListResult) (UsagesListResult, error)) UsagesListResultPage {
11429	return UsagesListResultPage{
11430		fn:  getNextPage,
11431		ulr: cur,
11432	}
11433}
11434
11435// VerificationIPFlowParameters parameters that define the IP flow to be verified.
11436type VerificationIPFlowParameters struct {
11437	// TargetResourceID - The ID of the target resource to perform next-hop on.
11438	TargetResourceID *string `json:"targetResourceId,omitempty"`
11439	// Direction - The direction of the packet represented as a 5-tuple. Possible values include: 'Inbound', 'Outbound'
11440	Direction Direction `json:"direction,omitempty"`
11441	// Protocol - Protocol to be verified on. Possible values include: 'ProtocolTCP', 'ProtocolUDP'
11442	Protocol Protocol `json:"protocol,omitempty"`
11443	// 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.
11444	LocalPort *string `json:"localPort,omitempty"`
11445	// 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.
11446	RemotePort *string `json:"remotePort,omitempty"`
11447	// LocalIPAddress - The local IP address. Acceptable values are valid IPv4 addresses.
11448	LocalIPAddress *string `json:"localIPAddress,omitempty"`
11449	// RemoteIPAddress - The remote IP address. Acceptable values are valid IPv4 addresses.
11450	RemoteIPAddress *string `json:"remoteIPAddress,omitempty"`
11451	// 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).
11452	TargetNicResourceID *string `json:"targetNicResourceId,omitempty"`
11453}
11454
11455// VerificationIPFlowResult results of IP flow verification on the target resource.
11456type VerificationIPFlowResult struct {
11457	autorest.Response `json:"-"`
11458	// Access - Indicates whether the traffic is allowed or denied. Possible values include: 'Allow', 'Deny'
11459	Access Access `json:"access,omitempty"`
11460	// RuleName - Name of the rule. If input is not matched against any security rule, it is not displayed.
11461	RuleName *string `json:"ruleName,omitempty"`
11462}
11463
11464// VirtualNetwork virtual Network resource.
11465type VirtualNetwork struct {
11466	autorest.Response `json:"-"`
11467	// VirtualNetworkPropertiesFormat - Properties of the virtual network.
11468	*VirtualNetworkPropertiesFormat `json:"properties,omitempty"`
11469	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
11470	Etag *string `json:"etag,omitempty"`
11471	// ID - Resource ID.
11472	ID *string `json:"id,omitempty"`
11473	// Name - READ-ONLY; Resource name.
11474	Name *string `json:"name,omitempty"`
11475	// Type - READ-ONLY; Resource type.
11476	Type *string `json:"type,omitempty"`
11477	// Location - Resource location.
11478	Location *string `json:"location,omitempty"`
11479	// Tags - Resource tags.
11480	Tags map[string]*string `json:"tags"`
11481}
11482
11483// MarshalJSON is the custom marshaler for VirtualNetwork.
11484func (vn VirtualNetwork) MarshalJSON() ([]byte, error) {
11485	objectMap := make(map[string]interface{})
11486	if vn.VirtualNetworkPropertiesFormat != nil {
11487		objectMap["properties"] = vn.VirtualNetworkPropertiesFormat
11488	}
11489	if vn.Etag != nil {
11490		objectMap["etag"] = vn.Etag
11491	}
11492	if vn.ID != nil {
11493		objectMap["id"] = vn.ID
11494	}
11495	if vn.Location != nil {
11496		objectMap["location"] = vn.Location
11497	}
11498	if vn.Tags != nil {
11499		objectMap["tags"] = vn.Tags
11500	}
11501	return json.Marshal(objectMap)
11502}
11503
11504// UnmarshalJSON is the custom unmarshaler for VirtualNetwork struct.
11505func (vn *VirtualNetwork) UnmarshalJSON(body []byte) error {
11506	var m map[string]*json.RawMessage
11507	err := json.Unmarshal(body, &m)
11508	if err != nil {
11509		return err
11510	}
11511	for k, v := range m {
11512		switch k {
11513		case "properties":
11514			if v != nil {
11515				var virtualNetworkPropertiesFormat VirtualNetworkPropertiesFormat
11516				err = json.Unmarshal(*v, &virtualNetworkPropertiesFormat)
11517				if err != nil {
11518					return err
11519				}
11520				vn.VirtualNetworkPropertiesFormat = &virtualNetworkPropertiesFormat
11521			}
11522		case "etag":
11523			if v != nil {
11524				var etag string
11525				err = json.Unmarshal(*v, &etag)
11526				if err != nil {
11527					return err
11528				}
11529				vn.Etag = &etag
11530			}
11531		case "id":
11532			if v != nil {
11533				var ID string
11534				err = json.Unmarshal(*v, &ID)
11535				if err != nil {
11536					return err
11537				}
11538				vn.ID = &ID
11539			}
11540		case "name":
11541			if v != nil {
11542				var name string
11543				err = json.Unmarshal(*v, &name)
11544				if err != nil {
11545					return err
11546				}
11547				vn.Name = &name
11548			}
11549		case "type":
11550			if v != nil {
11551				var typeVar string
11552				err = json.Unmarshal(*v, &typeVar)
11553				if err != nil {
11554					return err
11555				}
11556				vn.Type = &typeVar
11557			}
11558		case "location":
11559			if v != nil {
11560				var location string
11561				err = json.Unmarshal(*v, &location)
11562				if err != nil {
11563					return err
11564				}
11565				vn.Location = &location
11566			}
11567		case "tags":
11568			if v != nil {
11569				var tags map[string]*string
11570				err = json.Unmarshal(*v, &tags)
11571				if err != nil {
11572					return err
11573				}
11574				vn.Tags = tags
11575			}
11576		}
11577	}
11578
11579	return nil
11580}
11581
11582// VirtualNetworkConnectionGatewayReference a reference to VirtualNetworkGateway or LocalNetworkGateway
11583// resource.
11584type VirtualNetworkConnectionGatewayReference struct {
11585	// ID - The ID of VirtualNetworkGateway or LocalNetworkGateway resource.
11586	ID *string `json:"id,omitempty"`
11587}
11588
11589// VirtualNetworkGateway a common class for general resource information
11590type VirtualNetworkGateway struct {
11591	autorest.Response `json:"-"`
11592	// VirtualNetworkGatewayPropertiesFormat - Properties of the virtual network gateway.
11593	*VirtualNetworkGatewayPropertiesFormat `json:"properties,omitempty"`
11594	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
11595	Etag *string `json:"etag,omitempty"`
11596	// ID - Resource ID.
11597	ID *string `json:"id,omitempty"`
11598	// Name - READ-ONLY; Resource name.
11599	Name *string `json:"name,omitempty"`
11600	// Type - READ-ONLY; Resource type.
11601	Type *string `json:"type,omitempty"`
11602	// Location - Resource location.
11603	Location *string `json:"location,omitempty"`
11604	// Tags - Resource tags.
11605	Tags map[string]*string `json:"tags"`
11606}
11607
11608// MarshalJSON is the custom marshaler for VirtualNetworkGateway.
11609func (vng VirtualNetworkGateway) MarshalJSON() ([]byte, error) {
11610	objectMap := make(map[string]interface{})
11611	if vng.VirtualNetworkGatewayPropertiesFormat != nil {
11612		objectMap["properties"] = vng.VirtualNetworkGatewayPropertiesFormat
11613	}
11614	if vng.Etag != nil {
11615		objectMap["etag"] = vng.Etag
11616	}
11617	if vng.ID != nil {
11618		objectMap["id"] = vng.ID
11619	}
11620	if vng.Location != nil {
11621		objectMap["location"] = vng.Location
11622	}
11623	if vng.Tags != nil {
11624		objectMap["tags"] = vng.Tags
11625	}
11626	return json.Marshal(objectMap)
11627}
11628
11629// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGateway struct.
11630func (vng *VirtualNetworkGateway) UnmarshalJSON(body []byte) error {
11631	var m map[string]*json.RawMessage
11632	err := json.Unmarshal(body, &m)
11633	if err != nil {
11634		return err
11635	}
11636	for k, v := range m {
11637		switch k {
11638		case "properties":
11639			if v != nil {
11640				var virtualNetworkGatewayPropertiesFormat VirtualNetworkGatewayPropertiesFormat
11641				err = json.Unmarshal(*v, &virtualNetworkGatewayPropertiesFormat)
11642				if err != nil {
11643					return err
11644				}
11645				vng.VirtualNetworkGatewayPropertiesFormat = &virtualNetworkGatewayPropertiesFormat
11646			}
11647		case "etag":
11648			if v != nil {
11649				var etag string
11650				err = json.Unmarshal(*v, &etag)
11651				if err != nil {
11652					return err
11653				}
11654				vng.Etag = &etag
11655			}
11656		case "id":
11657			if v != nil {
11658				var ID string
11659				err = json.Unmarshal(*v, &ID)
11660				if err != nil {
11661					return err
11662				}
11663				vng.ID = &ID
11664			}
11665		case "name":
11666			if v != nil {
11667				var name string
11668				err = json.Unmarshal(*v, &name)
11669				if err != nil {
11670					return err
11671				}
11672				vng.Name = &name
11673			}
11674		case "type":
11675			if v != nil {
11676				var typeVar string
11677				err = json.Unmarshal(*v, &typeVar)
11678				if err != nil {
11679					return err
11680				}
11681				vng.Type = &typeVar
11682			}
11683		case "location":
11684			if v != nil {
11685				var location string
11686				err = json.Unmarshal(*v, &location)
11687				if err != nil {
11688					return err
11689				}
11690				vng.Location = &location
11691			}
11692		case "tags":
11693			if v != nil {
11694				var tags map[string]*string
11695				err = json.Unmarshal(*v, &tags)
11696				if err != nil {
11697					return err
11698				}
11699				vng.Tags = tags
11700			}
11701		}
11702	}
11703
11704	return nil
11705}
11706
11707// VirtualNetworkGatewayConnection a common class for general resource information
11708type VirtualNetworkGatewayConnection struct {
11709	autorest.Response `json:"-"`
11710	// VirtualNetworkGatewayConnectionPropertiesFormat - Properties of the virtual network gateway connection.
11711	*VirtualNetworkGatewayConnectionPropertiesFormat `json:"properties,omitempty"`
11712	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
11713	Etag *string `json:"etag,omitempty"`
11714	// ID - Resource ID.
11715	ID *string `json:"id,omitempty"`
11716	// Name - READ-ONLY; Resource name.
11717	Name *string `json:"name,omitempty"`
11718	// Type - READ-ONLY; Resource type.
11719	Type *string `json:"type,omitempty"`
11720	// Location - Resource location.
11721	Location *string `json:"location,omitempty"`
11722	// Tags - Resource tags.
11723	Tags map[string]*string `json:"tags"`
11724}
11725
11726// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnection.
11727func (vngc VirtualNetworkGatewayConnection) MarshalJSON() ([]byte, error) {
11728	objectMap := make(map[string]interface{})
11729	if vngc.VirtualNetworkGatewayConnectionPropertiesFormat != nil {
11730		objectMap["properties"] = vngc.VirtualNetworkGatewayConnectionPropertiesFormat
11731	}
11732	if vngc.Etag != nil {
11733		objectMap["etag"] = vngc.Etag
11734	}
11735	if vngc.ID != nil {
11736		objectMap["id"] = vngc.ID
11737	}
11738	if vngc.Location != nil {
11739		objectMap["location"] = vngc.Location
11740	}
11741	if vngc.Tags != nil {
11742		objectMap["tags"] = vngc.Tags
11743	}
11744	return json.Marshal(objectMap)
11745}
11746
11747// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnection struct.
11748func (vngc *VirtualNetworkGatewayConnection) UnmarshalJSON(body []byte) error {
11749	var m map[string]*json.RawMessage
11750	err := json.Unmarshal(body, &m)
11751	if err != nil {
11752		return err
11753	}
11754	for k, v := range m {
11755		switch k {
11756		case "properties":
11757			if v != nil {
11758				var virtualNetworkGatewayConnectionPropertiesFormat VirtualNetworkGatewayConnectionPropertiesFormat
11759				err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionPropertiesFormat)
11760				if err != nil {
11761					return err
11762				}
11763				vngc.VirtualNetworkGatewayConnectionPropertiesFormat = &virtualNetworkGatewayConnectionPropertiesFormat
11764			}
11765		case "etag":
11766			if v != nil {
11767				var etag string
11768				err = json.Unmarshal(*v, &etag)
11769				if err != nil {
11770					return err
11771				}
11772				vngc.Etag = &etag
11773			}
11774		case "id":
11775			if v != nil {
11776				var ID string
11777				err = json.Unmarshal(*v, &ID)
11778				if err != nil {
11779					return err
11780				}
11781				vngc.ID = &ID
11782			}
11783		case "name":
11784			if v != nil {
11785				var name string
11786				err = json.Unmarshal(*v, &name)
11787				if err != nil {
11788					return err
11789				}
11790				vngc.Name = &name
11791			}
11792		case "type":
11793			if v != nil {
11794				var typeVar string
11795				err = json.Unmarshal(*v, &typeVar)
11796				if err != nil {
11797					return err
11798				}
11799				vngc.Type = &typeVar
11800			}
11801		case "location":
11802			if v != nil {
11803				var location string
11804				err = json.Unmarshal(*v, &location)
11805				if err != nil {
11806					return err
11807				}
11808				vngc.Location = &location
11809			}
11810		case "tags":
11811			if v != nil {
11812				var tags map[string]*string
11813				err = json.Unmarshal(*v, &tags)
11814				if err != nil {
11815					return err
11816				}
11817				vngc.Tags = tags
11818			}
11819		}
11820	}
11821
11822	return nil
11823}
11824
11825// VirtualNetworkGatewayConnectionListEntity a common class for general resource information
11826type VirtualNetworkGatewayConnectionListEntity struct {
11827	// VirtualNetworkGatewayConnectionListEntityPropertiesFormat - Properties of the virtual network gateway connection.
11828	*VirtualNetworkGatewayConnectionListEntityPropertiesFormat `json:"properties,omitempty"`
11829	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
11830	Etag *string `json:"etag,omitempty"`
11831	// ID - Resource ID.
11832	ID *string `json:"id,omitempty"`
11833	// Name - READ-ONLY; Resource name.
11834	Name *string `json:"name,omitempty"`
11835	// Type - READ-ONLY; Resource type.
11836	Type *string `json:"type,omitempty"`
11837	// Location - Resource location.
11838	Location *string `json:"location,omitempty"`
11839	// Tags - Resource tags.
11840	Tags map[string]*string `json:"tags"`
11841}
11842
11843// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListEntity.
11844func (vngcle VirtualNetworkGatewayConnectionListEntity) MarshalJSON() ([]byte, error) {
11845	objectMap := make(map[string]interface{})
11846	if vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat != nil {
11847		objectMap["properties"] = vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat
11848	}
11849	if vngcle.Etag != nil {
11850		objectMap["etag"] = vngcle.Etag
11851	}
11852	if vngcle.ID != nil {
11853		objectMap["id"] = vngcle.ID
11854	}
11855	if vngcle.Location != nil {
11856		objectMap["location"] = vngcle.Location
11857	}
11858	if vngcle.Tags != nil {
11859		objectMap["tags"] = vngcle.Tags
11860	}
11861	return json.Marshal(objectMap)
11862}
11863
11864// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnectionListEntity struct.
11865func (vngcle *VirtualNetworkGatewayConnectionListEntity) UnmarshalJSON(body []byte) error {
11866	var m map[string]*json.RawMessage
11867	err := json.Unmarshal(body, &m)
11868	if err != nil {
11869		return err
11870	}
11871	for k, v := range m {
11872		switch k {
11873		case "properties":
11874			if v != nil {
11875				var virtualNetworkGatewayConnectionListEntityPropertiesFormat VirtualNetworkGatewayConnectionListEntityPropertiesFormat
11876				err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionListEntityPropertiesFormat)
11877				if err != nil {
11878					return err
11879				}
11880				vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat = &virtualNetworkGatewayConnectionListEntityPropertiesFormat
11881			}
11882		case "etag":
11883			if v != nil {
11884				var etag string
11885				err = json.Unmarshal(*v, &etag)
11886				if err != nil {
11887					return err
11888				}
11889				vngcle.Etag = &etag
11890			}
11891		case "id":
11892			if v != nil {
11893				var ID string
11894				err = json.Unmarshal(*v, &ID)
11895				if err != nil {
11896					return err
11897				}
11898				vngcle.ID = &ID
11899			}
11900		case "name":
11901			if v != nil {
11902				var name string
11903				err = json.Unmarshal(*v, &name)
11904				if err != nil {
11905					return err
11906				}
11907				vngcle.Name = &name
11908			}
11909		case "type":
11910			if v != nil {
11911				var typeVar string
11912				err = json.Unmarshal(*v, &typeVar)
11913				if err != nil {
11914					return err
11915				}
11916				vngcle.Type = &typeVar
11917			}
11918		case "location":
11919			if v != nil {
11920				var location string
11921				err = json.Unmarshal(*v, &location)
11922				if err != nil {
11923					return err
11924				}
11925				vngcle.Location = &location
11926			}
11927		case "tags":
11928			if v != nil {
11929				var tags map[string]*string
11930				err = json.Unmarshal(*v, &tags)
11931				if err != nil {
11932					return err
11933				}
11934				vngcle.Tags = tags
11935			}
11936		}
11937	}
11938
11939	return nil
11940}
11941
11942// VirtualNetworkGatewayConnectionListEntityPropertiesFormat virtualNetworkGatewayConnection properties
11943type VirtualNetworkGatewayConnectionListEntityPropertiesFormat struct {
11944	// AuthorizationKey - The authorizationKey.
11945	AuthorizationKey *string `json:"authorizationKey,omitempty"`
11946	// VirtualNetworkGateway1 - The reference to virtual network gateway resource.
11947	VirtualNetworkGateway1 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway1,omitempty"`
11948	// VirtualNetworkGateway2 - The reference to virtual network gateway resource.
11949	VirtualNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway2,omitempty"`
11950	// LocalNetworkGateway2 - The reference to local network gateway resource.
11951	LocalNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"localNetworkGateway2,omitempty"`
11952	// ConnectionType - Gateway connection type. Possible values are: 'IPsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'
11953	ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"`
11954	// RoutingWeight - The routing weight.
11955	RoutingWeight *int32 `json:"routingWeight,omitempty"`
11956	// SharedKey - The IPSec shared key.
11957	SharedKey *string `json:"sharedKey,omitempty"`
11958	// ConnectionStatus - READ-ONLY; Virtual network Gateway connection status. Possible values are 'Unknown', 'Connecting', 'Connected' and 'NotConnected'. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
11959	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
11960	// TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status.
11961	TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"`
11962	// EgressBytesTransferred - READ-ONLY; The egress bytes transferred in this connection.
11963	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
11964	// IngressBytesTransferred - READ-ONLY; The ingress bytes transferred in this connection.
11965	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
11966	// Peer - The reference to peerings resource.
11967	Peer *SubResource `json:"peer,omitempty"`
11968	// EnableBgp - EnableBgp flag
11969	EnableBgp *bool `json:"enableBgp,omitempty"`
11970	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
11971	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
11972	// IpsecPolicies - The IPSec Policies to be considered by this connection.
11973	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
11974	// ResourceGUID - The resource GUID property of the VirtualNetworkGatewayConnection resource.
11975	ResourceGUID *string `json:"resourceGuid,omitempty"`
11976	// ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGatewayConnection resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
11977	ProvisioningState *string `json:"provisioningState,omitempty"`
11978}
11979
11980// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListEntityPropertiesFormat.
11981func (vngclepf VirtualNetworkGatewayConnectionListEntityPropertiesFormat) MarshalJSON() ([]byte, error) {
11982	objectMap := make(map[string]interface{})
11983	if vngclepf.AuthorizationKey != nil {
11984		objectMap["authorizationKey"] = vngclepf.AuthorizationKey
11985	}
11986	if vngclepf.VirtualNetworkGateway1 != nil {
11987		objectMap["virtualNetworkGateway1"] = vngclepf.VirtualNetworkGateway1
11988	}
11989	if vngclepf.VirtualNetworkGateway2 != nil {
11990		objectMap["virtualNetworkGateway2"] = vngclepf.VirtualNetworkGateway2
11991	}
11992	if vngclepf.LocalNetworkGateway2 != nil {
11993		objectMap["localNetworkGateway2"] = vngclepf.LocalNetworkGateway2
11994	}
11995	if vngclepf.ConnectionType != "" {
11996		objectMap["connectionType"] = vngclepf.ConnectionType
11997	}
11998	if vngclepf.RoutingWeight != nil {
11999		objectMap["routingWeight"] = vngclepf.RoutingWeight
12000	}
12001	if vngclepf.SharedKey != nil {
12002		objectMap["sharedKey"] = vngclepf.SharedKey
12003	}
12004	if vngclepf.Peer != nil {
12005		objectMap["peer"] = vngclepf.Peer
12006	}
12007	if vngclepf.EnableBgp != nil {
12008		objectMap["enableBgp"] = vngclepf.EnableBgp
12009	}
12010	if vngclepf.UsePolicyBasedTrafficSelectors != nil {
12011		objectMap["usePolicyBasedTrafficSelectors"] = vngclepf.UsePolicyBasedTrafficSelectors
12012	}
12013	if vngclepf.IpsecPolicies != nil {
12014		objectMap["ipsecPolicies"] = vngclepf.IpsecPolicies
12015	}
12016	if vngclepf.ResourceGUID != nil {
12017		objectMap["resourceGuid"] = vngclepf.ResourceGUID
12018	}
12019	return json.Marshal(objectMap)
12020}
12021
12022// VirtualNetworkGatewayConnectionListResult response for the ListVirtualNetworkGatewayConnections API
12023// service call
12024type VirtualNetworkGatewayConnectionListResult struct {
12025	autorest.Response `json:"-"`
12026	// Value - Gets a list of VirtualNetworkGatewayConnection resources that exists in a resource group.
12027	Value *[]VirtualNetworkGatewayConnection `json:"value,omitempty"`
12028	// NextLink - READ-ONLY; The URL to get the next set of results.
12029	NextLink *string `json:"nextLink,omitempty"`
12030}
12031
12032// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListResult.
12033func (vngclr VirtualNetworkGatewayConnectionListResult) MarshalJSON() ([]byte, error) {
12034	objectMap := make(map[string]interface{})
12035	if vngclr.Value != nil {
12036		objectMap["value"] = vngclr.Value
12037	}
12038	return json.Marshal(objectMap)
12039}
12040
12041// VirtualNetworkGatewayConnectionListResultIterator provides access to a complete listing of
12042// VirtualNetworkGatewayConnection values.
12043type VirtualNetworkGatewayConnectionListResultIterator struct {
12044	i    int
12045	page VirtualNetworkGatewayConnectionListResultPage
12046}
12047
12048// NextWithContext advances to the next value.  If there was an error making
12049// the request the iterator does not advance and the error is returned.
12050func (iter *VirtualNetworkGatewayConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
12051	if tracing.IsEnabled() {
12052		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultIterator.NextWithContext")
12053		defer func() {
12054			sc := -1
12055			if iter.Response().Response.Response != nil {
12056				sc = iter.Response().Response.Response.StatusCode
12057			}
12058			tracing.EndSpan(ctx, sc, err)
12059		}()
12060	}
12061	iter.i++
12062	if iter.i < len(iter.page.Values()) {
12063		return nil
12064	}
12065	err = iter.page.NextWithContext(ctx)
12066	if err != nil {
12067		iter.i--
12068		return err
12069	}
12070	iter.i = 0
12071	return nil
12072}
12073
12074// Next advances to the next value.  If there was an error making
12075// the request the iterator does not advance and the error is returned.
12076// Deprecated: Use NextWithContext() instead.
12077func (iter *VirtualNetworkGatewayConnectionListResultIterator) Next() error {
12078	return iter.NextWithContext(context.Background())
12079}
12080
12081// NotDone returns true if the enumeration should be started or is not yet complete.
12082func (iter VirtualNetworkGatewayConnectionListResultIterator) NotDone() bool {
12083	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12084}
12085
12086// Response returns the raw server response from the last page request.
12087func (iter VirtualNetworkGatewayConnectionListResultIterator) Response() VirtualNetworkGatewayConnectionListResult {
12088	return iter.page.Response()
12089}
12090
12091// Value returns the current value or a zero-initialized value if the
12092// iterator has advanced beyond the end of the collection.
12093func (iter VirtualNetworkGatewayConnectionListResultIterator) Value() VirtualNetworkGatewayConnection {
12094	if !iter.page.NotDone() {
12095		return VirtualNetworkGatewayConnection{}
12096	}
12097	return iter.page.Values()[iter.i]
12098}
12099
12100// Creates a new instance of the VirtualNetworkGatewayConnectionListResultIterator type.
12101func NewVirtualNetworkGatewayConnectionListResultIterator(page VirtualNetworkGatewayConnectionListResultPage) VirtualNetworkGatewayConnectionListResultIterator {
12102	return VirtualNetworkGatewayConnectionListResultIterator{page: page}
12103}
12104
12105// IsEmpty returns true if the ListResult contains no values.
12106func (vngclr VirtualNetworkGatewayConnectionListResult) IsEmpty() bool {
12107	return vngclr.Value == nil || len(*vngclr.Value) == 0
12108}
12109
12110// hasNextLink returns true if the NextLink is not empty.
12111func (vngclr VirtualNetworkGatewayConnectionListResult) hasNextLink() bool {
12112	return vngclr.NextLink != nil && len(*vngclr.NextLink) != 0
12113}
12114
12115// virtualNetworkGatewayConnectionListResultPreparer prepares a request to retrieve the next set of results.
12116// It returns nil if no more results exist.
12117func (vngclr VirtualNetworkGatewayConnectionListResult) virtualNetworkGatewayConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
12118	if !vngclr.hasNextLink() {
12119		return nil, nil
12120	}
12121	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12122		autorest.AsJSON(),
12123		autorest.AsGet(),
12124		autorest.WithBaseURL(to.String(vngclr.NextLink)))
12125}
12126
12127// VirtualNetworkGatewayConnectionListResultPage contains a page of VirtualNetworkGatewayConnection values.
12128type VirtualNetworkGatewayConnectionListResultPage struct {
12129	fn     func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)
12130	vngclr VirtualNetworkGatewayConnectionListResult
12131}
12132
12133// NextWithContext advances to the next page of values.  If there was an error making
12134// the request the page does not advance and the error is returned.
12135func (page *VirtualNetworkGatewayConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
12136	if tracing.IsEnabled() {
12137		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultPage.NextWithContext")
12138		defer func() {
12139			sc := -1
12140			if page.Response().Response.Response != nil {
12141				sc = page.Response().Response.Response.StatusCode
12142			}
12143			tracing.EndSpan(ctx, sc, err)
12144		}()
12145	}
12146	for {
12147		next, err := page.fn(ctx, page.vngclr)
12148		if err != nil {
12149			return err
12150		}
12151		page.vngclr = next
12152		if !next.hasNextLink() || !next.IsEmpty() {
12153			break
12154		}
12155	}
12156	return nil
12157}
12158
12159// Next advances to the next page of values.  If there was an error making
12160// the request the page does not advance and the error is returned.
12161// Deprecated: Use NextWithContext() instead.
12162func (page *VirtualNetworkGatewayConnectionListResultPage) Next() error {
12163	return page.NextWithContext(context.Background())
12164}
12165
12166// NotDone returns true if the page enumeration should be started or is not yet complete.
12167func (page VirtualNetworkGatewayConnectionListResultPage) NotDone() bool {
12168	return !page.vngclr.IsEmpty()
12169}
12170
12171// Response returns the raw server response from the last page request.
12172func (page VirtualNetworkGatewayConnectionListResultPage) Response() VirtualNetworkGatewayConnectionListResult {
12173	return page.vngclr
12174}
12175
12176// Values returns the slice of values for the current page or nil if there are no values.
12177func (page VirtualNetworkGatewayConnectionListResultPage) Values() []VirtualNetworkGatewayConnection {
12178	if page.vngclr.IsEmpty() {
12179		return nil
12180	}
12181	return *page.vngclr.Value
12182}
12183
12184// Creates a new instance of the VirtualNetworkGatewayConnectionListResultPage type.
12185func NewVirtualNetworkGatewayConnectionListResultPage(cur VirtualNetworkGatewayConnectionListResult, getNextPage func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)) VirtualNetworkGatewayConnectionListResultPage {
12186	return VirtualNetworkGatewayConnectionListResultPage{
12187		fn:     getNextPage,
12188		vngclr: cur,
12189	}
12190}
12191
12192// VirtualNetworkGatewayConnectionPropertiesFormat virtualNetworkGatewayConnection properties
12193type VirtualNetworkGatewayConnectionPropertiesFormat struct {
12194	// AuthorizationKey - The authorizationKey.
12195	AuthorizationKey *string `json:"authorizationKey,omitempty"`
12196	// VirtualNetworkGateway1 - The reference to virtual network gateway resource.
12197	VirtualNetworkGateway1 *VirtualNetworkGateway `json:"virtualNetworkGateway1,omitempty"`
12198	// VirtualNetworkGateway2 - The reference to virtual network gateway resource.
12199	VirtualNetworkGateway2 *VirtualNetworkGateway `json:"virtualNetworkGateway2,omitempty"`
12200	// LocalNetworkGateway2 - The reference to local network gateway resource.
12201	LocalNetworkGateway2 *LocalNetworkGateway `json:"localNetworkGateway2,omitempty"`
12202	// ConnectionType - Gateway connection type. Possible values are: 'IPsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'
12203	ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"`
12204	// RoutingWeight - The routing weight.
12205	RoutingWeight *int32 `json:"routingWeight,omitempty"`
12206	// SharedKey - The IPSec shared key.
12207	SharedKey *string `json:"sharedKey,omitempty"`
12208	// ConnectionStatus - READ-ONLY; Virtual network Gateway connection status. Possible values are 'Unknown', 'Connecting', 'Connected' and 'NotConnected'. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
12209	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
12210	// TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status.
12211	TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"`
12212	// EgressBytesTransferred - READ-ONLY; The egress bytes transferred in this connection.
12213	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
12214	// IngressBytesTransferred - READ-ONLY; The ingress bytes transferred in this connection.
12215	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
12216	// Peer - The reference to peerings resource.
12217	Peer *SubResource `json:"peer,omitempty"`
12218	// EnableBgp - EnableBgp flag
12219	EnableBgp *bool `json:"enableBgp,omitempty"`
12220	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
12221	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
12222	// IpsecPolicies - The IPSec Policies to be considered by this connection.
12223	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
12224	// ResourceGUID - The resource GUID property of the VirtualNetworkGatewayConnection resource.
12225	ResourceGUID *string `json:"resourceGuid,omitempty"`
12226	// ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGatewayConnection resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
12227	ProvisioningState *string `json:"provisioningState,omitempty"`
12228}
12229
12230// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionPropertiesFormat.
12231func (vngcpf VirtualNetworkGatewayConnectionPropertiesFormat) MarshalJSON() ([]byte, error) {
12232	objectMap := make(map[string]interface{})
12233	if vngcpf.AuthorizationKey != nil {
12234		objectMap["authorizationKey"] = vngcpf.AuthorizationKey
12235	}
12236	if vngcpf.VirtualNetworkGateway1 != nil {
12237		objectMap["virtualNetworkGateway1"] = vngcpf.VirtualNetworkGateway1
12238	}
12239	if vngcpf.VirtualNetworkGateway2 != nil {
12240		objectMap["virtualNetworkGateway2"] = vngcpf.VirtualNetworkGateway2
12241	}
12242	if vngcpf.LocalNetworkGateway2 != nil {
12243		objectMap["localNetworkGateway2"] = vngcpf.LocalNetworkGateway2
12244	}
12245	if vngcpf.ConnectionType != "" {
12246		objectMap["connectionType"] = vngcpf.ConnectionType
12247	}
12248	if vngcpf.RoutingWeight != nil {
12249		objectMap["routingWeight"] = vngcpf.RoutingWeight
12250	}
12251	if vngcpf.SharedKey != nil {
12252		objectMap["sharedKey"] = vngcpf.SharedKey
12253	}
12254	if vngcpf.Peer != nil {
12255		objectMap["peer"] = vngcpf.Peer
12256	}
12257	if vngcpf.EnableBgp != nil {
12258		objectMap["enableBgp"] = vngcpf.EnableBgp
12259	}
12260	if vngcpf.UsePolicyBasedTrafficSelectors != nil {
12261		objectMap["usePolicyBasedTrafficSelectors"] = vngcpf.UsePolicyBasedTrafficSelectors
12262	}
12263	if vngcpf.IpsecPolicies != nil {
12264		objectMap["ipsecPolicies"] = vngcpf.IpsecPolicies
12265	}
12266	if vngcpf.ResourceGUID != nil {
12267		objectMap["resourceGuid"] = vngcpf.ResourceGUID
12268	}
12269	return json.Marshal(objectMap)
12270}
12271
12272// VirtualNetworkGatewayConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
12273// results of a long-running operation.
12274type VirtualNetworkGatewayConnectionsCreateOrUpdateFuture struct {
12275	azure.FutureAPI
12276	// Result returns the result of the asynchronous operation.
12277	// If the operation has not completed it will return an error.
12278	Result func(VirtualNetworkGatewayConnectionsClient) (VirtualNetworkGatewayConnection, error)
12279}
12280
12281// VirtualNetworkGatewayConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of
12282// a long-running operation.
12283type VirtualNetworkGatewayConnectionsDeleteFuture struct {
12284	azure.FutureAPI
12285	// Result returns the result of the asynchronous operation.
12286	// If the operation has not completed it will return an error.
12287	Result func(VirtualNetworkGatewayConnectionsClient) (autorest.Response, error)
12288}
12289
12290// VirtualNetworkGatewayConnectionsResetSharedKeyFuture an abstraction for monitoring and retrieving the
12291// results of a long-running operation.
12292type VirtualNetworkGatewayConnectionsResetSharedKeyFuture struct {
12293	azure.FutureAPI
12294	// Result returns the result of the asynchronous operation.
12295	// If the operation has not completed it will return an error.
12296	Result func(VirtualNetworkGatewayConnectionsClient) (ConnectionResetSharedKey, error)
12297}
12298
12299// VirtualNetworkGatewayConnectionsSetSharedKeyFuture an abstraction for monitoring and retrieving the
12300// results of a long-running operation.
12301type VirtualNetworkGatewayConnectionsSetSharedKeyFuture struct {
12302	azure.FutureAPI
12303	// Result returns the result of the asynchronous operation.
12304	// If the operation has not completed it will return an error.
12305	Result func(VirtualNetworkGatewayConnectionsClient) (ConnectionSharedKey, error)
12306}
12307
12308// VirtualNetworkGatewayIPConfiguration IP configuration for virtual network gateway
12309type VirtualNetworkGatewayIPConfiguration struct {
12310	// VirtualNetworkGatewayIPConfigurationPropertiesFormat - Properties of the virtual network gateway ip configuration.
12311	*VirtualNetworkGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"`
12312	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
12313	Name *string `json:"name,omitempty"`
12314	// Etag - A unique read-only string that changes whenever the resource is updated.
12315	Etag *string `json:"etag,omitempty"`
12316	// ID - Resource ID.
12317	ID *string `json:"id,omitempty"`
12318}
12319
12320// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfiguration.
12321func (vngic VirtualNetworkGatewayIPConfiguration) MarshalJSON() ([]byte, error) {
12322	objectMap := make(map[string]interface{})
12323	if vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat != nil {
12324		objectMap["properties"] = vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat
12325	}
12326	if vngic.Name != nil {
12327		objectMap["name"] = vngic.Name
12328	}
12329	if vngic.Etag != nil {
12330		objectMap["etag"] = vngic.Etag
12331	}
12332	if vngic.ID != nil {
12333		objectMap["id"] = vngic.ID
12334	}
12335	return json.Marshal(objectMap)
12336}
12337
12338// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayIPConfiguration struct.
12339func (vngic *VirtualNetworkGatewayIPConfiguration) UnmarshalJSON(body []byte) error {
12340	var m map[string]*json.RawMessage
12341	err := json.Unmarshal(body, &m)
12342	if err != nil {
12343		return err
12344	}
12345	for k, v := range m {
12346		switch k {
12347		case "properties":
12348			if v != nil {
12349				var virtualNetworkGatewayIPConfigurationPropertiesFormat VirtualNetworkGatewayIPConfigurationPropertiesFormat
12350				err = json.Unmarshal(*v, &virtualNetworkGatewayIPConfigurationPropertiesFormat)
12351				if err != nil {
12352					return err
12353				}
12354				vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat = &virtualNetworkGatewayIPConfigurationPropertiesFormat
12355			}
12356		case "name":
12357			if v != nil {
12358				var name string
12359				err = json.Unmarshal(*v, &name)
12360				if err != nil {
12361					return err
12362				}
12363				vngic.Name = &name
12364			}
12365		case "etag":
12366			if v != nil {
12367				var etag string
12368				err = json.Unmarshal(*v, &etag)
12369				if err != nil {
12370					return err
12371				}
12372				vngic.Etag = &etag
12373			}
12374		case "id":
12375			if v != nil {
12376				var ID string
12377				err = json.Unmarshal(*v, &ID)
12378				if err != nil {
12379					return err
12380				}
12381				vngic.ID = &ID
12382			}
12383		}
12384	}
12385
12386	return nil
12387}
12388
12389// VirtualNetworkGatewayIPConfigurationPropertiesFormat properties of VirtualNetworkGatewayIPConfiguration
12390type VirtualNetworkGatewayIPConfigurationPropertiesFormat struct {
12391	// PrivateIPAllocationMethod - The private IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
12392	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
12393	// Subnet - The reference of the subnet resource.
12394	Subnet *SubResource `json:"subnet,omitempty"`
12395	// PublicIPAddress - The reference of the public IP resource.
12396	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
12397	// ProvisioningState - READ-ONLY; The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
12398	ProvisioningState *string `json:"provisioningState,omitempty"`
12399}
12400
12401// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfigurationPropertiesFormat.
12402func (vngicpf VirtualNetworkGatewayIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
12403	objectMap := make(map[string]interface{})
12404	if vngicpf.PrivateIPAllocationMethod != "" {
12405		objectMap["privateIPAllocationMethod"] = vngicpf.PrivateIPAllocationMethod
12406	}
12407	if vngicpf.Subnet != nil {
12408		objectMap["subnet"] = vngicpf.Subnet
12409	}
12410	if vngicpf.PublicIPAddress != nil {
12411		objectMap["publicIPAddress"] = vngicpf.PublicIPAddress
12412	}
12413	return json.Marshal(objectMap)
12414}
12415
12416// VirtualNetworkGatewayListConnectionsResult response for the VirtualNetworkGatewayListConnections API
12417// service call
12418type VirtualNetworkGatewayListConnectionsResult struct {
12419	autorest.Response `json:"-"`
12420	// Value - Gets a list of VirtualNetworkGatewayConnection resources that exists in a resource group.
12421	Value *[]VirtualNetworkGatewayConnectionListEntity `json:"value,omitempty"`
12422	// NextLink - READ-ONLY; The URL to get the next set of results.
12423	NextLink *string `json:"nextLink,omitempty"`
12424}
12425
12426// MarshalJSON is the custom marshaler for VirtualNetworkGatewayListConnectionsResult.
12427func (vnglcr VirtualNetworkGatewayListConnectionsResult) MarshalJSON() ([]byte, error) {
12428	objectMap := make(map[string]interface{})
12429	if vnglcr.Value != nil {
12430		objectMap["value"] = vnglcr.Value
12431	}
12432	return json.Marshal(objectMap)
12433}
12434
12435// VirtualNetworkGatewayListConnectionsResultIterator provides access to a complete listing of
12436// VirtualNetworkGatewayConnectionListEntity values.
12437type VirtualNetworkGatewayListConnectionsResultIterator struct {
12438	i    int
12439	page VirtualNetworkGatewayListConnectionsResultPage
12440}
12441
12442// NextWithContext advances to the next value.  If there was an error making
12443// the request the iterator does not advance and the error is returned.
12444func (iter *VirtualNetworkGatewayListConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
12445	if tracing.IsEnabled() {
12446		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultIterator.NextWithContext")
12447		defer func() {
12448			sc := -1
12449			if iter.Response().Response.Response != nil {
12450				sc = iter.Response().Response.Response.StatusCode
12451			}
12452			tracing.EndSpan(ctx, sc, err)
12453		}()
12454	}
12455	iter.i++
12456	if iter.i < len(iter.page.Values()) {
12457		return nil
12458	}
12459	err = iter.page.NextWithContext(ctx)
12460	if err != nil {
12461		iter.i--
12462		return err
12463	}
12464	iter.i = 0
12465	return nil
12466}
12467
12468// Next advances to the next value.  If there was an error making
12469// the request the iterator does not advance and the error is returned.
12470// Deprecated: Use NextWithContext() instead.
12471func (iter *VirtualNetworkGatewayListConnectionsResultIterator) Next() error {
12472	return iter.NextWithContext(context.Background())
12473}
12474
12475// NotDone returns true if the enumeration should be started or is not yet complete.
12476func (iter VirtualNetworkGatewayListConnectionsResultIterator) NotDone() bool {
12477	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12478}
12479
12480// Response returns the raw server response from the last page request.
12481func (iter VirtualNetworkGatewayListConnectionsResultIterator) Response() VirtualNetworkGatewayListConnectionsResult {
12482	return iter.page.Response()
12483}
12484
12485// Value returns the current value or a zero-initialized value if the
12486// iterator has advanced beyond the end of the collection.
12487func (iter VirtualNetworkGatewayListConnectionsResultIterator) Value() VirtualNetworkGatewayConnectionListEntity {
12488	if !iter.page.NotDone() {
12489		return VirtualNetworkGatewayConnectionListEntity{}
12490	}
12491	return iter.page.Values()[iter.i]
12492}
12493
12494// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultIterator type.
12495func NewVirtualNetworkGatewayListConnectionsResultIterator(page VirtualNetworkGatewayListConnectionsResultPage) VirtualNetworkGatewayListConnectionsResultIterator {
12496	return VirtualNetworkGatewayListConnectionsResultIterator{page: page}
12497}
12498
12499// IsEmpty returns true if the ListResult contains no values.
12500func (vnglcr VirtualNetworkGatewayListConnectionsResult) IsEmpty() bool {
12501	return vnglcr.Value == nil || len(*vnglcr.Value) == 0
12502}
12503
12504// hasNextLink returns true if the NextLink is not empty.
12505func (vnglcr VirtualNetworkGatewayListConnectionsResult) hasNextLink() bool {
12506	return vnglcr.NextLink != nil && len(*vnglcr.NextLink) != 0
12507}
12508
12509// virtualNetworkGatewayListConnectionsResultPreparer prepares a request to retrieve the next set of results.
12510// It returns nil if no more results exist.
12511func (vnglcr VirtualNetworkGatewayListConnectionsResult) virtualNetworkGatewayListConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
12512	if !vnglcr.hasNextLink() {
12513		return nil, nil
12514	}
12515	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12516		autorest.AsJSON(),
12517		autorest.AsGet(),
12518		autorest.WithBaseURL(to.String(vnglcr.NextLink)))
12519}
12520
12521// VirtualNetworkGatewayListConnectionsResultPage contains a page of
12522// VirtualNetworkGatewayConnectionListEntity values.
12523type VirtualNetworkGatewayListConnectionsResultPage struct {
12524	fn     func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)
12525	vnglcr VirtualNetworkGatewayListConnectionsResult
12526}
12527
12528// NextWithContext advances to the next page of values.  If there was an error making
12529// the request the page does not advance and the error is returned.
12530func (page *VirtualNetworkGatewayListConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
12531	if tracing.IsEnabled() {
12532		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultPage.NextWithContext")
12533		defer func() {
12534			sc := -1
12535			if page.Response().Response.Response != nil {
12536				sc = page.Response().Response.Response.StatusCode
12537			}
12538			tracing.EndSpan(ctx, sc, err)
12539		}()
12540	}
12541	for {
12542		next, err := page.fn(ctx, page.vnglcr)
12543		if err != nil {
12544			return err
12545		}
12546		page.vnglcr = next
12547		if !next.hasNextLink() || !next.IsEmpty() {
12548			break
12549		}
12550	}
12551	return nil
12552}
12553
12554// Next advances to the next page of values.  If there was an error making
12555// the request the page does not advance and the error is returned.
12556// Deprecated: Use NextWithContext() instead.
12557func (page *VirtualNetworkGatewayListConnectionsResultPage) Next() error {
12558	return page.NextWithContext(context.Background())
12559}
12560
12561// NotDone returns true if the page enumeration should be started or is not yet complete.
12562func (page VirtualNetworkGatewayListConnectionsResultPage) NotDone() bool {
12563	return !page.vnglcr.IsEmpty()
12564}
12565
12566// Response returns the raw server response from the last page request.
12567func (page VirtualNetworkGatewayListConnectionsResultPage) Response() VirtualNetworkGatewayListConnectionsResult {
12568	return page.vnglcr
12569}
12570
12571// Values returns the slice of values for the current page or nil if there are no values.
12572func (page VirtualNetworkGatewayListConnectionsResultPage) Values() []VirtualNetworkGatewayConnectionListEntity {
12573	if page.vnglcr.IsEmpty() {
12574		return nil
12575	}
12576	return *page.vnglcr.Value
12577}
12578
12579// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultPage type.
12580func NewVirtualNetworkGatewayListConnectionsResultPage(cur VirtualNetworkGatewayListConnectionsResult, getNextPage func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)) VirtualNetworkGatewayListConnectionsResultPage {
12581	return VirtualNetworkGatewayListConnectionsResultPage{
12582		fn:     getNextPage,
12583		vnglcr: cur,
12584	}
12585}
12586
12587// VirtualNetworkGatewayListResult response for the ListVirtualNetworkGateways API service call.
12588type VirtualNetworkGatewayListResult struct {
12589	autorest.Response `json:"-"`
12590	// Value - Gets a list of VirtualNetworkGateway resources that exists in a resource group.
12591	Value *[]VirtualNetworkGateway `json:"value,omitempty"`
12592	// NextLink - READ-ONLY; The URL to get the next set of results.
12593	NextLink *string `json:"nextLink,omitempty"`
12594}
12595
12596// MarshalJSON is the custom marshaler for VirtualNetworkGatewayListResult.
12597func (vnglr VirtualNetworkGatewayListResult) MarshalJSON() ([]byte, error) {
12598	objectMap := make(map[string]interface{})
12599	if vnglr.Value != nil {
12600		objectMap["value"] = vnglr.Value
12601	}
12602	return json.Marshal(objectMap)
12603}
12604
12605// VirtualNetworkGatewayListResultIterator provides access to a complete listing of VirtualNetworkGateway
12606// values.
12607type VirtualNetworkGatewayListResultIterator struct {
12608	i    int
12609	page VirtualNetworkGatewayListResultPage
12610}
12611
12612// NextWithContext advances to the next value.  If there was an error making
12613// the request the iterator does not advance and the error is returned.
12614func (iter *VirtualNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
12615	if tracing.IsEnabled() {
12616		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultIterator.NextWithContext")
12617		defer func() {
12618			sc := -1
12619			if iter.Response().Response.Response != nil {
12620				sc = iter.Response().Response.Response.StatusCode
12621			}
12622			tracing.EndSpan(ctx, sc, err)
12623		}()
12624	}
12625	iter.i++
12626	if iter.i < len(iter.page.Values()) {
12627		return nil
12628	}
12629	err = iter.page.NextWithContext(ctx)
12630	if err != nil {
12631		iter.i--
12632		return err
12633	}
12634	iter.i = 0
12635	return nil
12636}
12637
12638// Next advances to the next value.  If there was an error making
12639// the request the iterator does not advance and the error is returned.
12640// Deprecated: Use NextWithContext() instead.
12641func (iter *VirtualNetworkGatewayListResultIterator) Next() error {
12642	return iter.NextWithContext(context.Background())
12643}
12644
12645// NotDone returns true if the enumeration should be started or is not yet complete.
12646func (iter VirtualNetworkGatewayListResultIterator) NotDone() bool {
12647	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12648}
12649
12650// Response returns the raw server response from the last page request.
12651func (iter VirtualNetworkGatewayListResultIterator) Response() VirtualNetworkGatewayListResult {
12652	return iter.page.Response()
12653}
12654
12655// Value returns the current value or a zero-initialized value if the
12656// iterator has advanced beyond the end of the collection.
12657func (iter VirtualNetworkGatewayListResultIterator) Value() VirtualNetworkGateway {
12658	if !iter.page.NotDone() {
12659		return VirtualNetworkGateway{}
12660	}
12661	return iter.page.Values()[iter.i]
12662}
12663
12664// Creates a new instance of the VirtualNetworkGatewayListResultIterator type.
12665func NewVirtualNetworkGatewayListResultIterator(page VirtualNetworkGatewayListResultPage) VirtualNetworkGatewayListResultIterator {
12666	return VirtualNetworkGatewayListResultIterator{page: page}
12667}
12668
12669// IsEmpty returns true if the ListResult contains no values.
12670func (vnglr VirtualNetworkGatewayListResult) IsEmpty() bool {
12671	return vnglr.Value == nil || len(*vnglr.Value) == 0
12672}
12673
12674// hasNextLink returns true if the NextLink is not empty.
12675func (vnglr VirtualNetworkGatewayListResult) hasNextLink() bool {
12676	return vnglr.NextLink != nil && len(*vnglr.NextLink) != 0
12677}
12678
12679// virtualNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results.
12680// It returns nil if no more results exist.
12681func (vnglr VirtualNetworkGatewayListResult) virtualNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
12682	if !vnglr.hasNextLink() {
12683		return nil, nil
12684	}
12685	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12686		autorest.AsJSON(),
12687		autorest.AsGet(),
12688		autorest.WithBaseURL(to.String(vnglr.NextLink)))
12689}
12690
12691// VirtualNetworkGatewayListResultPage contains a page of VirtualNetworkGateway values.
12692type VirtualNetworkGatewayListResultPage struct {
12693	fn    func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)
12694	vnglr VirtualNetworkGatewayListResult
12695}
12696
12697// NextWithContext advances to the next page of values.  If there was an error making
12698// the request the page does not advance and the error is returned.
12699func (page *VirtualNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
12700	if tracing.IsEnabled() {
12701		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultPage.NextWithContext")
12702		defer func() {
12703			sc := -1
12704			if page.Response().Response.Response != nil {
12705				sc = page.Response().Response.Response.StatusCode
12706			}
12707			tracing.EndSpan(ctx, sc, err)
12708		}()
12709	}
12710	for {
12711		next, err := page.fn(ctx, page.vnglr)
12712		if err != nil {
12713			return err
12714		}
12715		page.vnglr = next
12716		if !next.hasNextLink() || !next.IsEmpty() {
12717			break
12718		}
12719	}
12720	return nil
12721}
12722
12723// Next advances to the next page of values.  If there was an error making
12724// the request the page does not advance and the error is returned.
12725// Deprecated: Use NextWithContext() instead.
12726func (page *VirtualNetworkGatewayListResultPage) Next() error {
12727	return page.NextWithContext(context.Background())
12728}
12729
12730// NotDone returns true if the page enumeration should be started or is not yet complete.
12731func (page VirtualNetworkGatewayListResultPage) NotDone() bool {
12732	return !page.vnglr.IsEmpty()
12733}
12734
12735// Response returns the raw server response from the last page request.
12736func (page VirtualNetworkGatewayListResultPage) Response() VirtualNetworkGatewayListResult {
12737	return page.vnglr
12738}
12739
12740// Values returns the slice of values for the current page or nil if there are no values.
12741func (page VirtualNetworkGatewayListResultPage) Values() []VirtualNetworkGateway {
12742	if page.vnglr.IsEmpty() {
12743		return nil
12744	}
12745	return *page.vnglr.Value
12746}
12747
12748// Creates a new instance of the VirtualNetworkGatewayListResultPage type.
12749func NewVirtualNetworkGatewayListResultPage(cur VirtualNetworkGatewayListResult, getNextPage func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)) VirtualNetworkGatewayListResultPage {
12750	return VirtualNetworkGatewayListResultPage{
12751		fn:    getNextPage,
12752		vnglr: cur,
12753	}
12754}
12755
12756// VirtualNetworkGatewayPropertiesFormat virtualNetworkGateway properties
12757type VirtualNetworkGatewayPropertiesFormat struct {
12758	// IPConfigurations - IP configurations for virtual network gateway.
12759	IPConfigurations *[]VirtualNetworkGatewayIPConfiguration `json:"ipConfigurations,omitempty"`
12760	// GatewayType - The type of this virtual network gateway. Possible values are: 'Vpn' and 'ExpressRoute'. Possible values include: 'VirtualNetworkGatewayTypeVpn', 'VirtualNetworkGatewayTypeExpressRoute'
12761	GatewayType VirtualNetworkGatewayType `json:"gatewayType,omitempty"`
12762	// VpnType - The type of this virtual network gateway. Possible values are: 'PolicyBased' and 'RouteBased'. Possible values include: 'PolicyBased', 'RouteBased'
12763	VpnType VpnType `json:"vpnType,omitempty"`
12764	// EnableBgp - Whether BGP is enabled for this virtual network gateway or not.
12765	EnableBgp *bool `json:"enableBgp,omitempty"`
12766	// ActiveActive - ActiveActive flag
12767	ActiveActive *bool `json:"activeActive,omitempty"`
12768	// 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.
12769	GatewayDefaultSite *SubResource `json:"gatewayDefaultSite,omitempty"`
12770	// Sku - The reference of the VirtualNetworkGatewaySku resource which represents the SKU selected for Virtual network gateway.
12771	Sku *VirtualNetworkGatewaySku `json:"sku,omitempty"`
12772	// VpnClientConfiguration - The reference of the VpnClientConfiguration resource which represents the P2S VpnClient configurations.
12773	VpnClientConfiguration *VpnClientConfiguration `json:"vpnClientConfiguration,omitempty"`
12774	// BgpSettings - Virtual network gateway's BGP speaker settings.
12775	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
12776	// ResourceGUID - The resource GUID property of the VirtualNetworkGateway resource.
12777	ResourceGUID *string `json:"resourceGuid,omitempty"`
12778	// ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
12779	ProvisioningState *string `json:"provisioningState,omitempty"`
12780}
12781
12782// MarshalJSON is the custom marshaler for VirtualNetworkGatewayPropertiesFormat.
12783func (vngpf VirtualNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
12784	objectMap := make(map[string]interface{})
12785	if vngpf.IPConfigurations != nil {
12786		objectMap["ipConfigurations"] = vngpf.IPConfigurations
12787	}
12788	if vngpf.GatewayType != "" {
12789		objectMap["gatewayType"] = vngpf.GatewayType
12790	}
12791	if vngpf.VpnType != "" {
12792		objectMap["vpnType"] = vngpf.VpnType
12793	}
12794	if vngpf.EnableBgp != nil {
12795		objectMap["enableBgp"] = vngpf.EnableBgp
12796	}
12797	if vngpf.ActiveActive != nil {
12798		objectMap["activeActive"] = vngpf.ActiveActive
12799	}
12800	if vngpf.GatewayDefaultSite != nil {
12801		objectMap["gatewayDefaultSite"] = vngpf.GatewayDefaultSite
12802	}
12803	if vngpf.Sku != nil {
12804		objectMap["sku"] = vngpf.Sku
12805	}
12806	if vngpf.VpnClientConfiguration != nil {
12807		objectMap["vpnClientConfiguration"] = vngpf.VpnClientConfiguration
12808	}
12809	if vngpf.BgpSettings != nil {
12810		objectMap["bgpSettings"] = vngpf.BgpSettings
12811	}
12812	if vngpf.ResourceGUID != nil {
12813		objectMap["resourceGuid"] = vngpf.ResourceGUID
12814	}
12815	return json.Marshal(objectMap)
12816}
12817
12818// VirtualNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
12819// long-running operation.
12820type VirtualNetworkGatewaysCreateOrUpdateFuture struct {
12821	azure.FutureAPI
12822	// Result returns the result of the asynchronous operation.
12823	// If the operation has not completed it will return an error.
12824	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
12825}
12826
12827// VirtualNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
12828// long-running operation.
12829type VirtualNetworkGatewaysDeleteFuture struct {
12830	azure.FutureAPI
12831	// Result returns the result of the asynchronous operation.
12832	// If the operation has not completed it will return an error.
12833	Result func(VirtualNetworkGatewaysClient) (autorest.Response, error)
12834}
12835
12836// VirtualNetworkGatewaysGeneratevpnclientpackageFuture an abstraction for monitoring and retrieving the
12837// results of a long-running operation.
12838type VirtualNetworkGatewaysGeneratevpnclientpackageFuture struct {
12839	azure.FutureAPI
12840	// Result returns the result of the asynchronous operation.
12841	// If the operation has not completed it will return an error.
12842	Result func(VirtualNetworkGatewaysClient) (String, error)
12843}
12844
12845// VirtualNetworkGatewaysGenerateVpnProfileFuture an abstraction for monitoring and retrieving the results
12846// of a long-running operation.
12847type VirtualNetworkGatewaysGenerateVpnProfileFuture struct {
12848	azure.FutureAPI
12849	// Result returns the result of the asynchronous operation.
12850	// If the operation has not completed it will return an error.
12851	Result func(VirtualNetworkGatewaysClient) (String, error)
12852}
12853
12854// VirtualNetworkGatewaysGetAdvertisedRoutesFuture an abstraction for monitoring and retrieving the results
12855// of a long-running operation.
12856type VirtualNetworkGatewaysGetAdvertisedRoutesFuture struct {
12857	azure.FutureAPI
12858	// Result returns the result of the asynchronous operation.
12859	// If the operation has not completed it will return an error.
12860	Result func(VirtualNetworkGatewaysClient) (GatewayRouteListResult, error)
12861}
12862
12863// VirtualNetworkGatewaysGetBgpPeerStatusFuture an abstraction for monitoring and retrieving the results of
12864// a long-running operation.
12865type VirtualNetworkGatewaysGetBgpPeerStatusFuture struct {
12866	azure.FutureAPI
12867	// Result returns the result of the asynchronous operation.
12868	// If the operation has not completed it will return an error.
12869	Result func(VirtualNetworkGatewaysClient) (BgpPeerStatusListResult, error)
12870}
12871
12872// VirtualNetworkGatewaysGetLearnedRoutesFuture an abstraction for monitoring and retrieving the results of
12873// a long-running operation.
12874type VirtualNetworkGatewaysGetLearnedRoutesFuture struct {
12875	azure.FutureAPI
12876	// Result returns the result of the asynchronous operation.
12877	// If the operation has not completed it will return an error.
12878	Result func(VirtualNetworkGatewaysClient) (GatewayRouteListResult, error)
12879}
12880
12881// VirtualNetworkGatewaySku virtualNetworkGatewaySku details
12882type VirtualNetworkGatewaySku struct {
12883	// Name - Gateway SKU name. Possible values include: 'VirtualNetworkGatewaySkuNameBasic', 'VirtualNetworkGatewaySkuNameHighPerformance', 'VirtualNetworkGatewaySkuNameStandard', 'VirtualNetworkGatewaySkuNameUltraPerformance', 'VirtualNetworkGatewaySkuNameVpnGw1', 'VirtualNetworkGatewaySkuNameVpnGw2', 'VirtualNetworkGatewaySkuNameVpnGw3'
12884	Name VirtualNetworkGatewaySkuName `json:"name,omitempty"`
12885	// Tier - Gateway SKU tier. Possible values include: 'VirtualNetworkGatewaySkuTierBasic', 'VirtualNetworkGatewaySkuTierHighPerformance', 'VirtualNetworkGatewaySkuTierStandard', 'VirtualNetworkGatewaySkuTierUltraPerformance', 'VirtualNetworkGatewaySkuTierVpnGw1', 'VirtualNetworkGatewaySkuTierVpnGw2', 'VirtualNetworkGatewaySkuTierVpnGw3'
12886	Tier VirtualNetworkGatewaySkuTier `json:"tier,omitempty"`
12887	// Capacity - The capacity.
12888	Capacity *int32 `json:"capacity,omitempty"`
12889}
12890
12891// VirtualNetworkGatewaysResetFuture an abstraction for monitoring and retrieving the results of a
12892// long-running operation.
12893type VirtualNetworkGatewaysResetFuture struct {
12894	azure.FutureAPI
12895	// Result returns the result of the asynchronous operation.
12896	// If the operation has not completed it will return an error.
12897	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
12898}
12899
12900// VirtualNetworkListResult response for the ListVirtualNetworks API service call.
12901type VirtualNetworkListResult struct {
12902	autorest.Response `json:"-"`
12903	// Value - Gets a list of VirtualNetwork resources in a resource group.
12904	Value *[]VirtualNetwork `json:"value,omitempty"`
12905	// NextLink - The URL to get the next set of results.
12906	NextLink *string `json:"nextLink,omitempty"`
12907}
12908
12909// VirtualNetworkListResultIterator provides access to a complete listing of VirtualNetwork values.
12910type VirtualNetworkListResultIterator struct {
12911	i    int
12912	page VirtualNetworkListResultPage
12913}
12914
12915// NextWithContext advances to the next value.  If there was an error making
12916// the request the iterator does not advance and the error is returned.
12917func (iter *VirtualNetworkListResultIterator) NextWithContext(ctx context.Context) (err error) {
12918	if tracing.IsEnabled() {
12919		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultIterator.NextWithContext")
12920		defer func() {
12921			sc := -1
12922			if iter.Response().Response.Response != nil {
12923				sc = iter.Response().Response.Response.StatusCode
12924			}
12925			tracing.EndSpan(ctx, sc, err)
12926		}()
12927	}
12928	iter.i++
12929	if iter.i < len(iter.page.Values()) {
12930		return nil
12931	}
12932	err = iter.page.NextWithContext(ctx)
12933	if err != nil {
12934		iter.i--
12935		return err
12936	}
12937	iter.i = 0
12938	return nil
12939}
12940
12941// Next advances to the next value.  If there was an error making
12942// the request the iterator does not advance and the error is returned.
12943// Deprecated: Use NextWithContext() instead.
12944func (iter *VirtualNetworkListResultIterator) Next() error {
12945	return iter.NextWithContext(context.Background())
12946}
12947
12948// NotDone returns true if the enumeration should be started or is not yet complete.
12949func (iter VirtualNetworkListResultIterator) NotDone() bool {
12950	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12951}
12952
12953// Response returns the raw server response from the last page request.
12954func (iter VirtualNetworkListResultIterator) Response() VirtualNetworkListResult {
12955	return iter.page.Response()
12956}
12957
12958// Value returns the current value or a zero-initialized value if the
12959// iterator has advanced beyond the end of the collection.
12960func (iter VirtualNetworkListResultIterator) Value() VirtualNetwork {
12961	if !iter.page.NotDone() {
12962		return VirtualNetwork{}
12963	}
12964	return iter.page.Values()[iter.i]
12965}
12966
12967// Creates a new instance of the VirtualNetworkListResultIterator type.
12968func NewVirtualNetworkListResultIterator(page VirtualNetworkListResultPage) VirtualNetworkListResultIterator {
12969	return VirtualNetworkListResultIterator{page: page}
12970}
12971
12972// IsEmpty returns true if the ListResult contains no values.
12973func (vnlr VirtualNetworkListResult) IsEmpty() bool {
12974	return vnlr.Value == nil || len(*vnlr.Value) == 0
12975}
12976
12977// hasNextLink returns true if the NextLink is not empty.
12978func (vnlr VirtualNetworkListResult) hasNextLink() bool {
12979	return vnlr.NextLink != nil && len(*vnlr.NextLink) != 0
12980}
12981
12982// virtualNetworkListResultPreparer prepares a request to retrieve the next set of results.
12983// It returns nil if no more results exist.
12984func (vnlr VirtualNetworkListResult) virtualNetworkListResultPreparer(ctx context.Context) (*http.Request, error) {
12985	if !vnlr.hasNextLink() {
12986		return nil, nil
12987	}
12988	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12989		autorest.AsJSON(),
12990		autorest.AsGet(),
12991		autorest.WithBaseURL(to.String(vnlr.NextLink)))
12992}
12993
12994// VirtualNetworkListResultPage contains a page of VirtualNetwork values.
12995type VirtualNetworkListResultPage struct {
12996	fn   func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)
12997	vnlr VirtualNetworkListResult
12998}
12999
13000// NextWithContext advances to the next page of values.  If there was an error making
13001// the request the page does not advance and the error is returned.
13002func (page *VirtualNetworkListResultPage) NextWithContext(ctx context.Context) (err error) {
13003	if tracing.IsEnabled() {
13004		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultPage.NextWithContext")
13005		defer func() {
13006			sc := -1
13007			if page.Response().Response.Response != nil {
13008				sc = page.Response().Response.Response.StatusCode
13009			}
13010			tracing.EndSpan(ctx, sc, err)
13011		}()
13012	}
13013	for {
13014		next, err := page.fn(ctx, page.vnlr)
13015		if err != nil {
13016			return err
13017		}
13018		page.vnlr = next
13019		if !next.hasNextLink() || !next.IsEmpty() {
13020			break
13021		}
13022	}
13023	return nil
13024}
13025
13026// Next advances to the next page of values.  If there was an error making
13027// the request the page does not advance and the error is returned.
13028// Deprecated: Use NextWithContext() instead.
13029func (page *VirtualNetworkListResultPage) Next() error {
13030	return page.NextWithContext(context.Background())
13031}
13032
13033// NotDone returns true if the page enumeration should be started or is not yet complete.
13034func (page VirtualNetworkListResultPage) NotDone() bool {
13035	return !page.vnlr.IsEmpty()
13036}
13037
13038// Response returns the raw server response from the last page request.
13039func (page VirtualNetworkListResultPage) Response() VirtualNetworkListResult {
13040	return page.vnlr
13041}
13042
13043// Values returns the slice of values for the current page or nil if there are no values.
13044func (page VirtualNetworkListResultPage) Values() []VirtualNetwork {
13045	if page.vnlr.IsEmpty() {
13046		return nil
13047	}
13048	return *page.vnlr.Value
13049}
13050
13051// Creates a new instance of the VirtualNetworkListResultPage type.
13052func NewVirtualNetworkListResultPage(cur VirtualNetworkListResult, getNextPage func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)) VirtualNetworkListResultPage {
13053	return VirtualNetworkListResultPage{
13054		fn:   getNextPage,
13055		vnlr: cur,
13056	}
13057}
13058
13059// VirtualNetworkListUsageResult response for the virtual networks GetUsage API service call.
13060type VirtualNetworkListUsageResult struct {
13061	autorest.Response `json:"-"`
13062	// Value - READ-ONLY; VirtualNetwork usage stats.
13063	Value *[]VirtualNetworkUsage `json:"value,omitempty"`
13064	// NextLink - The URL to get the next set of results.
13065	NextLink *string `json:"nextLink,omitempty"`
13066}
13067
13068// MarshalJSON is the custom marshaler for VirtualNetworkListUsageResult.
13069func (vnlur VirtualNetworkListUsageResult) MarshalJSON() ([]byte, error) {
13070	objectMap := make(map[string]interface{})
13071	if vnlur.NextLink != nil {
13072		objectMap["nextLink"] = vnlur.NextLink
13073	}
13074	return json.Marshal(objectMap)
13075}
13076
13077// VirtualNetworkListUsageResultIterator provides access to a complete listing of VirtualNetworkUsage
13078// values.
13079type VirtualNetworkListUsageResultIterator struct {
13080	i    int
13081	page VirtualNetworkListUsageResultPage
13082}
13083
13084// NextWithContext advances to the next value.  If there was an error making
13085// the request the iterator does not advance and the error is returned.
13086func (iter *VirtualNetworkListUsageResultIterator) NextWithContext(ctx context.Context) (err error) {
13087	if tracing.IsEnabled() {
13088		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultIterator.NextWithContext")
13089		defer func() {
13090			sc := -1
13091			if iter.Response().Response.Response != nil {
13092				sc = iter.Response().Response.Response.StatusCode
13093			}
13094			tracing.EndSpan(ctx, sc, err)
13095		}()
13096	}
13097	iter.i++
13098	if iter.i < len(iter.page.Values()) {
13099		return nil
13100	}
13101	err = iter.page.NextWithContext(ctx)
13102	if err != nil {
13103		iter.i--
13104		return err
13105	}
13106	iter.i = 0
13107	return nil
13108}
13109
13110// Next advances to the next value.  If there was an error making
13111// the request the iterator does not advance and the error is returned.
13112// Deprecated: Use NextWithContext() instead.
13113func (iter *VirtualNetworkListUsageResultIterator) Next() error {
13114	return iter.NextWithContext(context.Background())
13115}
13116
13117// NotDone returns true if the enumeration should be started or is not yet complete.
13118func (iter VirtualNetworkListUsageResultIterator) NotDone() bool {
13119	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13120}
13121
13122// Response returns the raw server response from the last page request.
13123func (iter VirtualNetworkListUsageResultIterator) Response() VirtualNetworkListUsageResult {
13124	return iter.page.Response()
13125}
13126
13127// Value returns the current value or a zero-initialized value if the
13128// iterator has advanced beyond the end of the collection.
13129func (iter VirtualNetworkListUsageResultIterator) Value() VirtualNetworkUsage {
13130	if !iter.page.NotDone() {
13131		return VirtualNetworkUsage{}
13132	}
13133	return iter.page.Values()[iter.i]
13134}
13135
13136// Creates a new instance of the VirtualNetworkListUsageResultIterator type.
13137func NewVirtualNetworkListUsageResultIterator(page VirtualNetworkListUsageResultPage) VirtualNetworkListUsageResultIterator {
13138	return VirtualNetworkListUsageResultIterator{page: page}
13139}
13140
13141// IsEmpty returns true if the ListResult contains no values.
13142func (vnlur VirtualNetworkListUsageResult) IsEmpty() bool {
13143	return vnlur.Value == nil || len(*vnlur.Value) == 0
13144}
13145
13146// hasNextLink returns true if the NextLink is not empty.
13147func (vnlur VirtualNetworkListUsageResult) hasNextLink() bool {
13148	return vnlur.NextLink != nil && len(*vnlur.NextLink) != 0
13149}
13150
13151// virtualNetworkListUsageResultPreparer prepares a request to retrieve the next set of results.
13152// It returns nil if no more results exist.
13153func (vnlur VirtualNetworkListUsageResult) virtualNetworkListUsageResultPreparer(ctx context.Context) (*http.Request, error) {
13154	if !vnlur.hasNextLink() {
13155		return nil, nil
13156	}
13157	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13158		autorest.AsJSON(),
13159		autorest.AsGet(),
13160		autorest.WithBaseURL(to.String(vnlur.NextLink)))
13161}
13162
13163// VirtualNetworkListUsageResultPage contains a page of VirtualNetworkUsage values.
13164type VirtualNetworkListUsageResultPage struct {
13165	fn    func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)
13166	vnlur VirtualNetworkListUsageResult
13167}
13168
13169// NextWithContext advances to the next page of values.  If there was an error making
13170// the request the page does not advance and the error is returned.
13171func (page *VirtualNetworkListUsageResultPage) NextWithContext(ctx context.Context) (err error) {
13172	if tracing.IsEnabled() {
13173		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultPage.NextWithContext")
13174		defer func() {
13175			sc := -1
13176			if page.Response().Response.Response != nil {
13177				sc = page.Response().Response.Response.StatusCode
13178			}
13179			tracing.EndSpan(ctx, sc, err)
13180		}()
13181	}
13182	for {
13183		next, err := page.fn(ctx, page.vnlur)
13184		if err != nil {
13185			return err
13186		}
13187		page.vnlur = next
13188		if !next.hasNextLink() || !next.IsEmpty() {
13189			break
13190		}
13191	}
13192	return nil
13193}
13194
13195// Next advances to the next page of values.  If there was an error making
13196// the request the page does not advance and the error is returned.
13197// Deprecated: Use NextWithContext() instead.
13198func (page *VirtualNetworkListUsageResultPage) Next() error {
13199	return page.NextWithContext(context.Background())
13200}
13201
13202// NotDone returns true if the page enumeration should be started or is not yet complete.
13203func (page VirtualNetworkListUsageResultPage) NotDone() bool {
13204	return !page.vnlur.IsEmpty()
13205}
13206
13207// Response returns the raw server response from the last page request.
13208func (page VirtualNetworkListUsageResultPage) Response() VirtualNetworkListUsageResult {
13209	return page.vnlur
13210}
13211
13212// Values returns the slice of values for the current page or nil if there are no values.
13213func (page VirtualNetworkListUsageResultPage) Values() []VirtualNetworkUsage {
13214	if page.vnlur.IsEmpty() {
13215		return nil
13216	}
13217	return *page.vnlur.Value
13218}
13219
13220// Creates a new instance of the VirtualNetworkListUsageResultPage type.
13221func NewVirtualNetworkListUsageResultPage(cur VirtualNetworkListUsageResult, getNextPage func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)) VirtualNetworkListUsageResultPage {
13222	return VirtualNetworkListUsageResultPage{
13223		fn:    getNextPage,
13224		vnlur: cur,
13225	}
13226}
13227
13228// VirtualNetworkPeering peerings in a virtual network resource.
13229type VirtualNetworkPeering struct {
13230	autorest.Response `json:"-"`
13231	// VirtualNetworkPeeringPropertiesFormat - Properties of the virtual network peering.
13232	*VirtualNetworkPeeringPropertiesFormat `json:"properties,omitempty"`
13233	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
13234	Name *string `json:"name,omitempty"`
13235	// Etag - A unique read-only string that changes whenever the resource is updated.
13236	Etag *string `json:"etag,omitempty"`
13237	// ID - Resource ID.
13238	ID *string `json:"id,omitempty"`
13239}
13240
13241// MarshalJSON is the custom marshaler for VirtualNetworkPeering.
13242func (vnp VirtualNetworkPeering) MarshalJSON() ([]byte, error) {
13243	objectMap := make(map[string]interface{})
13244	if vnp.VirtualNetworkPeeringPropertiesFormat != nil {
13245		objectMap["properties"] = vnp.VirtualNetworkPeeringPropertiesFormat
13246	}
13247	if vnp.Name != nil {
13248		objectMap["name"] = vnp.Name
13249	}
13250	if vnp.Etag != nil {
13251		objectMap["etag"] = vnp.Etag
13252	}
13253	if vnp.ID != nil {
13254		objectMap["id"] = vnp.ID
13255	}
13256	return json.Marshal(objectMap)
13257}
13258
13259// UnmarshalJSON is the custom unmarshaler for VirtualNetworkPeering struct.
13260func (vnp *VirtualNetworkPeering) UnmarshalJSON(body []byte) error {
13261	var m map[string]*json.RawMessage
13262	err := json.Unmarshal(body, &m)
13263	if err != nil {
13264		return err
13265	}
13266	for k, v := range m {
13267		switch k {
13268		case "properties":
13269			if v != nil {
13270				var virtualNetworkPeeringPropertiesFormat VirtualNetworkPeeringPropertiesFormat
13271				err = json.Unmarshal(*v, &virtualNetworkPeeringPropertiesFormat)
13272				if err != nil {
13273					return err
13274				}
13275				vnp.VirtualNetworkPeeringPropertiesFormat = &virtualNetworkPeeringPropertiesFormat
13276			}
13277		case "name":
13278			if v != nil {
13279				var name string
13280				err = json.Unmarshal(*v, &name)
13281				if err != nil {
13282					return err
13283				}
13284				vnp.Name = &name
13285			}
13286		case "etag":
13287			if v != nil {
13288				var etag string
13289				err = json.Unmarshal(*v, &etag)
13290				if err != nil {
13291					return err
13292				}
13293				vnp.Etag = &etag
13294			}
13295		case "id":
13296			if v != nil {
13297				var ID string
13298				err = json.Unmarshal(*v, &ID)
13299				if err != nil {
13300					return err
13301				}
13302				vnp.ID = &ID
13303			}
13304		}
13305	}
13306
13307	return nil
13308}
13309
13310// VirtualNetworkPeeringListResult response for ListSubnets API service call. Retrieves all subnets that
13311// belong to a virtual network.
13312type VirtualNetworkPeeringListResult struct {
13313	autorest.Response `json:"-"`
13314	// Value - The peerings in a virtual network.
13315	Value *[]VirtualNetworkPeering `json:"value,omitempty"`
13316	// NextLink - The URL to get the next set of results.
13317	NextLink *string `json:"nextLink,omitempty"`
13318}
13319
13320// VirtualNetworkPeeringListResultIterator provides access to a complete listing of VirtualNetworkPeering
13321// values.
13322type VirtualNetworkPeeringListResultIterator struct {
13323	i    int
13324	page VirtualNetworkPeeringListResultPage
13325}
13326
13327// NextWithContext advances to the next value.  If there was an error making
13328// the request the iterator does not advance and the error is returned.
13329func (iter *VirtualNetworkPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
13330	if tracing.IsEnabled() {
13331		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultIterator.NextWithContext")
13332		defer func() {
13333			sc := -1
13334			if iter.Response().Response.Response != nil {
13335				sc = iter.Response().Response.Response.StatusCode
13336			}
13337			tracing.EndSpan(ctx, sc, err)
13338		}()
13339	}
13340	iter.i++
13341	if iter.i < len(iter.page.Values()) {
13342		return nil
13343	}
13344	err = iter.page.NextWithContext(ctx)
13345	if err != nil {
13346		iter.i--
13347		return err
13348	}
13349	iter.i = 0
13350	return nil
13351}
13352
13353// Next advances to the next value.  If there was an error making
13354// the request the iterator does not advance and the error is returned.
13355// Deprecated: Use NextWithContext() instead.
13356func (iter *VirtualNetworkPeeringListResultIterator) Next() error {
13357	return iter.NextWithContext(context.Background())
13358}
13359
13360// NotDone returns true if the enumeration should be started or is not yet complete.
13361func (iter VirtualNetworkPeeringListResultIterator) NotDone() bool {
13362	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13363}
13364
13365// Response returns the raw server response from the last page request.
13366func (iter VirtualNetworkPeeringListResultIterator) Response() VirtualNetworkPeeringListResult {
13367	return iter.page.Response()
13368}
13369
13370// Value returns the current value or a zero-initialized value if the
13371// iterator has advanced beyond the end of the collection.
13372func (iter VirtualNetworkPeeringListResultIterator) Value() VirtualNetworkPeering {
13373	if !iter.page.NotDone() {
13374		return VirtualNetworkPeering{}
13375	}
13376	return iter.page.Values()[iter.i]
13377}
13378
13379// Creates a new instance of the VirtualNetworkPeeringListResultIterator type.
13380func NewVirtualNetworkPeeringListResultIterator(page VirtualNetworkPeeringListResultPage) VirtualNetworkPeeringListResultIterator {
13381	return VirtualNetworkPeeringListResultIterator{page: page}
13382}
13383
13384// IsEmpty returns true if the ListResult contains no values.
13385func (vnplr VirtualNetworkPeeringListResult) IsEmpty() bool {
13386	return vnplr.Value == nil || len(*vnplr.Value) == 0
13387}
13388
13389// hasNextLink returns true if the NextLink is not empty.
13390func (vnplr VirtualNetworkPeeringListResult) hasNextLink() bool {
13391	return vnplr.NextLink != nil && len(*vnplr.NextLink) != 0
13392}
13393
13394// virtualNetworkPeeringListResultPreparer prepares a request to retrieve the next set of results.
13395// It returns nil if no more results exist.
13396func (vnplr VirtualNetworkPeeringListResult) virtualNetworkPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
13397	if !vnplr.hasNextLink() {
13398		return nil, nil
13399	}
13400	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13401		autorest.AsJSON(),
13402		autorest.AsGet(),
13403		autorest.WithBaseURL(to.String(vnplr.NextLink)))
13404}
13405
13406// VirtualNetworkPeeringListResultPage contains a page of VirtualNetworkPeering values.
13407type VirtualNetworkPeeringListResultPage struct {
13408	fn    func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)
13409	vnplr VirtualNetworkPeeringListResult
13410}
13411
13412// NextWithContext advances to the next page of values.  If there was an error making
13413// the request the page does not advance and the error is returned.
13414func (page *VirtualNetworkPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
13415	if tracing.IsEnabled() {
13416		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultPage.NextWithContext")
13417		defer func() {
13418			sc := -1
13419			if page.Response().Response.Response != nil {
13420				sc = page.Response().Response.Response.StatusCode
13421			}
13422			tracing.EndSpan(ctx, sc, err)
13423		}()
13424	}
13425	for {
13426		next, err := page.fn(ctx, page.vnplr)
13427		if err != nil {
13428			return err
13429		}
13430		page.vnplr = next
13431		if !next.hasNextLink() || !next.IsEmpty() {
13432			break
13433		}
13434	}
13435	return nil
13436}
13437
13438// Next advances to the next page of values.  If there was an error making
13439// the request the page does not advance and the error is returned.
13440// Deprecated: Use NextWithContext() instead.
13441func (page *VirtualNetworkPeeringListResultPage) Next() error {
13442	return page.NextWithContext(context.Background())
13443}
13444
13445// NotDone returns true if the page enumeration should be started or is not yet complete.
13446func (page VirtualNetworkPeeringListResultPage) NotDone() bool {
13447	return !page.vnplr.IsEmpty()
13448}
13449
13450// Response returns the raw server response from the last page request.
13451func (page VirtualNetworkPeeringListResultPage) Response() VirtualNetworkPeeringListResult {
13452	return page.vnplr
13453}
13454
13455// Values returns the slice of values for the current page or nil if there are no values.
13456func (page VirtualNetworkPeeringListResultPage) Values() []VirtualNetworkPeering {
13457	if page.vnplr.IsEmpty() {
13458		return nil
13459	}
13460	return *page.vnplr.Value
13461}
13462
13463// Creates a new instance of the VirtualNetworkPeeringListResultPage type.
13464func NewVirtualNetworkPeeringListResultPage(cur VirtualNetworkPeeringListResult, getNextPage func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)) VirtualNetworkPeeringListResultPage {
13465	return VirtualNetworkPeeringListResultPage{
13466		fn:    getNextPage,
13467		vnplr: cur,
13468	}
13469}
13470
13471// VirtualNetworkPeeringPropertiesFormat properties of the virtual network peering.
13472type VirtualNetworkPeeringPropertiesFormat struct {
13473	// AllowVirtualNetworkAccess - Whether the VMs in the linked virtual network space would be able to access all the VMs in local Virtual network space.
13474	AllowVirtualNetworkAccess *bool `json:"allowVirtualNetworkAccess,omitempty"`
13475	// AllowForwardedTraffic - Whether the forwarded traffic from the VMs in the remote virtual network will be allowed/disallowed.
13476	AllowForwardedTraffic *bool `json:"allowForwardedTraffic,omitempty"`
13477	// AllowGatewayTransit - If gateway links can be used in remote virtual networking to link to this virtual network.
13478	AllowGatewayTransit *bool `json:"allowGatewayTransit,omitempty"`
13479	// 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.
13480	UseRemoteGateways *bool `json:"useRemoteGateways,omitempty"`
13481	// RemoteVirtualNetwork - The reference of the remote virtual network.
13482	RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"`
13483	// PeeringState - The status of the virtual network peering. Possible values are 'Initiated', 'Connected', and 'Disconnected'. Possible values include: 'Initiated', 'Connected', 'Disconnected'
13484	PeeringState VirtualNetworkPeeringState `json:"peeringState,omitempty"`
13485	// ProvisioningState - The provisioning state of the resource.
13486	ProvisioningState *string `json:"provisioningState,omitempty"`
13487}
13488
13489// VirtualNetworkPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
13490// long-running operation.
13491type VirtualNetworkPeeringsCreateOrUpdateFuture struct {
13492	azure.FutureAPI
13493	// Result returns the result of the asynchronous operation.
13494	// If the operation has not completed it will return an error.
13495	Result func(VirtualNetworkPeeringsClient) (VirtualNetworkPeering, error)
13496}
13497
13498// VirtualNetworkPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
13499// long-running operation.
13500type VirtualNetworkPeeringsDeleteFuture struct {
13501	azure.FutureAPI
13502	// Result returns the result of the asynchronous operation.
13503	// If the operation has not completed it will return an error.
13504	Result func(VirtualNetworkPeeringsClient) (autorest.Response, error)
13505}
13506
13507// VirtualNetworkPropertiesFormat properties of the virtual network.
13508type VirtualNetworkPropertiesFormat struct {
13509	// AddressSpace - The AddressSpace that contains an array of IP address ranges that can be used by subnets.
13510	AddressSpace *AddressSpace `json:"addressSpace,omitempty"`
13511	// DhcpOptions - The dhcpOptions that contains an array of DNS servers available to VMs deployed in the virtual network.
13512	DhcpOptions *DhcpOptions `json:"dhcpOptions,omitempty"`
13513	// Subnets - A list of subnets in a Virtual Network.
13514	Subnets *[]Subnet `json:"subnets,omitempty"`
13515	// VirtualNetworkPeerings - A list of peerings in a Virtual Network.
13516	VirtualNetworkPeerings *[]VirtualNetworkPeering `json:"virtualNetworkPeerings,omitempty"`
13517	// ResourceGUID - The resourceGuid property of the Virtual Network resource.
13518	ResourceGUID *string `json:"resourceGuid,omitempty"`
13519	// ProvisioningState - The provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
13520	ProvisioningState *string `json:"provisioningState,omitempty"`
13521}
13522
13523// VirtualNetworksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
13524// long-running operation.
13525type VirtualNetworksCreateOrUpdateFuture struct {
13526	azure.FutureAPI
13527	// Result returns the result of the asynchronous operation.
13528	// If the operation has not completed it will return an error.
13529	Result func(VirtualNetworksClient) (VirtualNetwork, error)
13530}
13531
13532// VirtualNetworksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
13533// operation.
13534type VirtualNetworksDeleteFuture struct {
13535	azure.FutureAPI
13536	// Result returns the result of the asynchronous operation.
13537	// If the operation has not completed it will return an error.
13538	Result func(VirtualNetworksClient) (autorest.Response, error)
13539}
13540
13541// VirtualNetworkUsage usage details for subnet.
13542type VirtualNetworkUsage struct {
13543	// CurrentValue - READ-ONLY; Indicates number of IPs used from the Subnet.
13544	CurrentValue *float64 `json:"currentValue,omitempty"`
13545	// ID - READ-ONLY; Subnet identifier.
13546	ID *string `json:"id,omitempty"`
13547	// Limit - READ-ONLY; Indicates the size of the subnet.
13548	Limit *float64 `json:"limit,omitempty"`
13549	// Name - READ-ONLY; The name containing common and localized value for usage.
13550	Name *VirtualNetworkUsageName `json:"name,omitempty"`
13551	// Unit - READ-ONLY; Usage units. Returns 'Count'
13552	Unit *string `json:"unit,omitempty"`
13553}
13554
13555// VirtualNetworkUsageName usage strings container.
13556type VirtualNetworkUsageName struct {
13557	// LocalizedValue - READ-ONLY; Localized subnet size and usage string.
13558	LocalizedValue *string `json:"localizedValue,omitempty"`
13559	// Value - READ-ONLY; Subnet size and usage string.
13560	Value *string `json:"value,omitempty"`
13561}
13562
13563// VpnClientConfiguration vpnClientConfiguration for P2S client.
13564type VpnClientConfiguration struct {
13565	// VpnClientAddressPool - The reference of the address space resource which represents Address space for P2S VpnClient.
13566	VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"`
13567	// VpnClientRootCertificates - VpnClientRootCertificate for virtual network gateway.
13568	VpnClientRootCertificates *[]VpnClientRootCertificate `json:"vpnClientRootCertificates,omitempty"`
13569	// VpnClientRevokedCertificates - VpnClientRevokedCertificate for Virtual network gateway.
13570	VpnClientRevokedCertificates *[]VpnClientRevokedCertificate `json:"vpnClientRevokedCertificates,omitempty"`
13571	// VpnClientProtocols - VpnClientProtocols for Virtual network gateway.
13572	VpnClientProtocols *[]VpnClientProtocol `json:"vpnClientProtocols,omitempty"`
13573	// RadiusServerAddress - The radius server address property of the VirtualNetworkGateway resource for vpn client connection.
13574	RadiusServerAddress *string `json:"radiusServerAddress,omitempty"`
13575	// RadiusServerSecret - The radius secret property of the VirtualNetworkGateway resource for vpn client connection.
13576	RadiusServerSecret *string `json:"radiusServerSecret,omitempty"`
13577}
13578
13579// VpnClientParameters vpn Client Parameters for package generation
13580type VpnClientParameters struct {
13581	// ProcessorArchitecture - VPN client Processor Architecture. Possible values are: 'AMD64' and 'X86'. Possible values include: 'Amd64', 'X86'
13582	ProcessorArchitecture ProcessorArchitecture `json:"processorArchitecture,omitempty"`
13583	// AuthenticationMethod - VPN client Authentication Method. Possible values are: 'EAPTLS' and 'EAPMSCHAPv2'. Possible values include: 'EAPTLS', 'EAPMSCHAPv2'
13584	AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"`
13585	// 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.
13586	RadiusServerAuthCertificate *string `json:"radiusServerAuthCertificate,omitempty"`
13587	// ClientRootCertificates - A list of client root certificates public certificate data encoded as Base-64 strings. Optional parameter for external radius based authentication with EAPTLS.
13588	ClientRootCertificates *[]string `json:"clientRootCertificates,omitempty"`
13589}
13590
13591// VpnClientRevokedCertificate VPN client revoked certificate of virtual network gateway.
13592type VpnClientRevokedCertificate struct {
13593	// VpnClientRevokedCertificatePropertiesFormat - Properties of the vpn client revoked certificate.
13594	*VpnClientRevokedCertificatePropertiesFormat `json:"properties,omitempty"`
13595	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
13596	Name *string `json:"name,omitempty"`
13597	// Etag - A unique read-only string that changes whenever the resource is updated.
13598	Etag *string `json:"etag,omitempty"`
13599	// ID - Resource ID.
13600	ID *string `json:"id,omitempty"`
13601}
13602
13603// MarshalJSON is the custom marshaler for VpnClientRevokedCertificate.
13604func (vcrc VpnClientRevokedCertificate) MarshalJSON() ([]byte, error) {
13605	objectMap := make(map[string]interface{})
13606	if vcrc.VpnClientRevokedCertificatePropertiesFormat != nil {
13607		objectMap["properties"] = vcrc.VpnClientRevokedCertificatePropertiesFormat
13608	}
13609	if vcrc.Name != nil {
13610		objectMap["name"] = vcrc.Name
13611	}
13612	if vcrc.Etag != nil {
13613		objectMap["etag"] = vcrc.Etag
13614	}
13615	if vcrc.ID != nil {
13616		objectMap["id"] = vcrc.ID
13617	}
13618	return json.Marshal(objectMap)
13619}
13620
13621// UnmarshalJSON is the custom unmarshaler for VpnClientRevokedCertificate struct.
13622func (vcrc *VpnClientRevokedCertificate) UnmarshalJSON(body []byte) error {
13623	var m map[string]*json.RawMessage
13624	err := json.Unmarshal(body, &m)
13625	if err != nil {
13626		return err
13627	}
13628	for k, v := range m {
13629		switch k {
13630		case "properties":
13631			if v != nil {
13632				var vpnClientRevokedCertificatePropertiesFormat VpnClientRevokedCertificatePropertiesFormat
13633				err = json.Unmarshal(*v, &vpnClientRevokedCertificatePropertiesFormat)
13634				if err != nil {
13635					return err
13636				}
13637				vcrc.VpnClientRevokedCertificatePropertiesFormat = &vpnClientRevokedCertificatePropertiesFormat
13638			}
13639		case "name":
13640			if v != nil {
13641				var name string
13642				err = json.Unmarshal(*v, &name)
13643				if err != nil {
13644					return err
13645				}
13646				vcrc.Name = &name
13647			}
13648		case "etag":
13649			if v != nil {
13650				var etag string
13651				err = json.Unmarshal(*v, &etag)
13652				if err != nil {
13653					return err
13654				}
13655				vcrc.Etag = &etag
13656			}
13657		case "id":
13658			if v != nil {
13659				var ID string
13660				err = json.Unmarshal(*v, &ID)
13661				if err != nil {
13662					return err
13663				}
13664				vcrc.ID = &ID
13665			}
13666		}
13667	}
13668
13669	return nil
13670}
13671
13672// VpnClientRevokedCertificatePropertiesFormat properties of the revoked VPN client certificate of virtual
13673// network gateway.
13674type VpnClientRevokedCertificatePropertiesFormat struct {
13675	// Thumbprint - The revoked VPN client certificate thumbprint.
13676	Thumbprint *string `json:"thumbprint,omitempty"`
13677	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client revoked certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
13678	ProvisioningState *string `json:"provisioningState,omitempty"`
13679}
13680
13681// MarshalJSON is the custom marshaler for VpnClientRevokedCertificatePropertiesFormat.
13682func (vcrcpf VpnClientRevokedCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
13683	objectMap := make(map[string]interface{})
13684	if vcrcpf.Thumbprint != nil {
13685		objectMap["thumbprint"] = vcrcpf.Thumbprint
13686	}
13687	return json.Marshal(objectMap)
13688}
13689
13690// VpnClientRootCertificate VPN client root certificate of virtual network gateway
13691type VpnClientRootCertificate struct {
13692	// VpnClientRootCertificatePropertiesFormat - Properties of the vpn client root certificate.
13693	*VpnClientRootCertificatePropertiesFormat `json:"properties,omitempty"`
13694	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
13695	Name *string `json:"name,omitempty"`
13696	// Etag - A unique read-only string that changes whenever the resource is updated.
13697	Etag *string `json:"etag,omitempty"`
13698	// ID - Resource ID.
13699	ID *string `json:"id,omitempty"`
13700}
13701
13702// MarshalJSON is the custom marshaler for VpnClientRootCertificate.
13703func (vcrc VpnClientRootCertificate) MarshalJSON() ([]byte, error) {
13704	objectMap := make(map[string]interface{})
13705	if vcrc.VpnClientRootCertificatePropertiesFormat != nil {
13706		objectMap["properties"] = vcrc.VpnClientRootCertificatePropertiesFormat
13707	}
13708	if vcrc.Name != nil {
13709		objectMap["name"] = vcrc.Name
13710	}
13711	if vcrc.Etag != nil {
13712		objectMap["etag"] = vcrc.Etag
13713	}
13714	if vcrc.ID != nil {
13715		objectMap["id"] = vcrc.ID
13716	}
13717	return json.Marshal(objectMap)
13718}
13719
13720// UnmarshalJSON is the custom unmarshaler for VpnClientRootCertificate struct.
13721func (vcrc *VpnClientRootCertificate) UnmarshalJSON(body []byte) error {
13722	var m map[string]*json.RawMessage
13723	err := json.Unmarshal(body, &m)
13724	if err != nil {
13725		return err
13726	}
13727	for k, v := range m {
13728		switch k {
13729		case "properties":
13730			if v != nil {
13731				var vpnClientRootCertificatePropertiesFormat VpnClientRootCertificatePropertiesFormat
13732				err = json.Unmarshal(*v, &vpnClientRootCertificatePropertiesFormat)
13733				if err != nil {
13734					return err
13735				}
13736				vcrc.VpnClientRootCertificatePropertiesFormat = &vpnClientRootCertificatePropertiesFormat
13737			}
13738		case "name":
13739			if v != nil {
13740				var name string
13741				err = json.Unmarshal(*v, &name)
13742				if err != nil {
13743					return err
13744				}
13745				vcrc.Name = &name
13746			}
13747		case "etag":
13748			if v != nil {
13749				var etag string
13750				err = json.Unmarshal(*v, &etag)
13751				if err != nil {
13752					return err
13753				}
13754				vcrc.Etag = &etag
13755			}
13756		case "id":
13757			if v != nil {
13758				var ID string
13759				err = json.Unmarshal(*v, &ID)
13760				if err != nil {
13761					return err
13762				}
13763				vcrc.ID = &ID
13764			}
13765		}
13766	}
13767
13768	return nil
13769}
13770
13771// VpnClientRootCertificatePropertiesFormat properties of SSL certificates of application gateway
13772type VpnClientRootCertificatePropertiesFormat struct {
13773	// PublicCertData - The certificate public data.
13774	PublicCertData *string `json:"publicCertData,omitempty"`
13775	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
13776	ProvisioningState *string `json:"provisioningState,omitempty"`
13777}
13778
13779// MarshalJSON is the custom marshaler for VpnClientRootCertificatePropertiesFormat.
13780func (vcrcpf VpnClientRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
13781	objectMap := make(map[string]interface{})
13782	if vcrcpf.PublicCertData != nil {
13783		objectMap["publicCertData"] = vcrcpf.PublicCertData
13784	}
13785	return json.Marshal(objectMap)
13786}
13787
13788// Watcher network watcher in a resource group.
13789type Watcher struct {
13790	autorest.Response `json:"-"`
13791	// Etag - A unique read-only string that changes whenever the resource is updated.
13792	Etag                     *string `json:"etag,omitempty"`
13793	*WatcherPropertiesFormat `json:"properties,omitempty"`
13794	// ID - Resource ID.
13795	ID *string `json:"id,omitempty"`
13796	// Name - READ-ONLY; Resource name.
13797	Name *string `json:"name,omitempty"`
13798	// Type - READ-ONLY; Resource type.
13799	Type *string `json:"type,omitempty"`
13800	// Location - Resource location.
13801	Location *string `json:"location,omitempty"`
13802	// Tags - Resource tags.
13803	Tags map[string]*string `json:"tags"`
13804}
13805
13806// MarshalJSON is the custom marshaler for Watcher.
13807func (w Watcher) MarshalJSON() ([]byte, error) {
13808	objectMap := make(map[string]interface{})
13809	if w.Etag != nil {
13810		objectMap["etag"] = w.Etag
13811	}
13812	if w.WatcherPropertiesFormat != nil {
13813		objectMap["properties"] = w.WatcherPropertiesFormat
13814	}
13815	if w.ID != nil {
13816		objectMap["id"] = w.ID
13817	}
13818	if w.Location != nil {
13819		objectMap["location"] = w.Location
13820	}
13821	if w.Tags != nil {
13822		objectMap["tags"] = w.Tags
13823	}
13824	return json.Marshal(objectMap)
13825}
13826
13827// UnmarshalJSON is the custom unmarshaler for Watcher struct.
13828func (w *Watcher) UnmarshalJSON(body []byte) error {
13829	var m map[string]*json.RawMessage
13830	err := json.Unmarshal(body, &m)
13831	if err != nil {
13832		return err
13833	}
13834	for k, v := range m {
13835		switch k {
13836		case "etag":
13837			if v != nil {
13838				var etag string
13839				err = json.Unmarshal(*v, &etag)
13840				if err != nil {
13841					return err
13842				}
13843				w.Etag = &etag
13844			}
13845		case "properties":
13846			if v != nil {
13847				var watcherPropertiesFormat WatcherPropertiesFormat
13848				err = json.Unmarshal(*v, &watcherPropertiesFormat)
13849				if err != nil {
13850					return err
13851				}
13852				w.WatcherPropertiesFormat = &watcherPropertiesFormat
13853			}
13854		case "id":
13855			if v != nil {
13856				var ID string
13857				err = json.Unmarshal(*v, &ID)
13858				if err != nil {
13859					return err
13860				}
13861				w.ID = &ID
13862			}
13863		case "name":
13864			if v != nil {
13865				var name string
13866				err = json.Unmarshal(*v, &name)
13867				if err != nil {
13868					return err
13869				}
13870				w.Name = &name
13871			}
13872		case "type":
13873			if v != nil {
13874				var typeVar string
13875				err = json.Unmarshal(*v, &typeVar)
13876				if err != nil {
13877					return err
13878				}
13879				w.Type = &typeVar
13880			}
13881		case "location":
13882			if v != nil {
13883				var location string
13884				err = json.Unmarshal(*v, &location)
13885				if err != nil {
13886					return err
13887				}
13888				w.Location = &location
13889			}
13890		case "tags":
13891			if v != nil {
13892				var tags map[string]*string
13893				err = json.Unmarshal(*v, &tags)
13894				if err != nil {
13895					return err
13896				}
13897				w.Tags = tags
13898			}
13899		}
13900	}
13901
13902	return nil
13903}
13904
13905// WatcherListResult list of network watcher resources.
13906type WatcherListResult struct {
13907	autorest.Response `json:"-"`
13908	Value             *[]Watcher `json:"value,omitempty"`
13909}
13910
13911// WatcherPropertiesFormat the network watcher properties.
13912type WatcherPropertiesFormat struct {
13913	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed'
13914	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
13915}
13916
13917// WatchersCheckConnectivityFuture an abstraction for monitoring and retrieving the results of a
13918// long-running operation.
13919type WatchersCheckConnectivityFuture struct {
13920	azure.FutureAPI
13921	// Result returns the result of the asynchronous operation.
13922	// If the operation has not completed it will return an error.
13923	Result func(WatchersClient) (ConnectivityInformation, error)
13924}
13925
13926// WatchersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
13927// operation.
13928type WatchersDeleteFuture struct {
13929	azure.FutureAPI
13930	// Result returns the result of the asynchronous operation.
13931	// If the operation has not completed it will return an error.
13932	Result func(WatchersClient) (autorest.Response, error)
13933}
13934
13935// WatchersGetFlowLogStatusFuture an abstraction for monitoring and retrieving the results of a
13936// long-running operation.
13937type WatchersGetFlowLogStatusFuture struct {
13938	azure.FutureAPI
13939	// Result returns the result of the asynchronous operation.
13940	// If the operation has not completed it will return an error.
13941	Result func(WatchersClient) (FlowLogInformation, error)
13942}
13943
13944// WatchersGetNextHopFuture an abstraction for monitoring and retrieving the results of a long-running
13945// operation.
13946type WatchersGetNextHopFuture struct {
13947	azure.FutureAPI
13948	// Result returns the result of the asynchronous operation.
13949	// If the operation has not completed it will return an error.
13950	Result func(WatchersClient) (NextHopResult, error)
13951}
13952
13953// WatchersGetTroubleshootingFuture an abstraction for monitoring and retrieving the results of a
13954// long-running operation.
13955type WatchersGetTroubleshootingFuture struct {
13956	azure.FutureAPI
13957	// Result returns the result of the asynchronous operation.
13958	// If the operation has not completed it will return an error.
13959	Result func(WatchersClient) (TroubleshootingResult, error)
13960}
13961
13962// WatchersGetTroubleshootingResultFuture an abstraction for monitoring and retrieving the results of a
13963// long-running operation.
13964type WatchersGetTroubleshootingResultFuture struct {
13965	azure.FutureAPI
13966	// Result returns the result of the asynchronous operation.
13967	// If the operation has not completed it will return an error.
13968	Result func(WatchersClient) (TroubleshootingResult, error)
13969}
13970
13971// WatchersGetVMSecurityRulesFuture an abstraction for monitoring and retrieving the results of a
13972// long-running operation.
13973type WatchersGetVMSecurityRulesFuture struct {
13974	azure.FutureAPI
13975	// Result returns the result of the asynchronous operation.
13976	// If the operation has not completed it will return an error.
13977	Result func(WatchersClient) (SecurityGroupViewResult, error)
13978}
13979
13980// WatchersSetFlowLogConfigurationFuture an abstraction for monitoring and retrieving the results of a
13981// long-running operation.
13982type WatchersSetFlowLogConfigurationFuture struct {
13983	azure.FutureAPI
13984	// Result returns the result of the asynchronous operation.
13985	// If the operation has not completed it will return an error.
13986	Result func(WatchersClient) (FlowLogInformation, error)
13987}
13988
13989// WatchersVerifyIPFlowFuture an abstraction for monitoring and retrieving the results of a long-running
13990// operation.
13991type WatchersVerifyIPFlowFuture struct {
13992	azure.FutureAPI
13993	// Result returns the result of the asynchronous operation.
13994	// If the operation has not completed it will return an error.
13995	Result func(WatchersClient) (VerificationIPFlowResult, error)
13996}
13997