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-11-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	// EnableHTTP2 - Whether HTTP2 is enabled on the application gateway resource.
1823	EnableHTTP2 *bool `json:"enableHttp2,omitempty"`
1824	// ResourceGUID - Resource GUID property of the application gateway resource.
1825	ResourceGUID *string `json:"resourceGuid,omitempty"`
1826	// ProvisioningState - Provisioning state of the application gateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
1827	ProvisioningState *string `json:"provisioningState,omitempty"`
1828}
1829
1830// MarshalJSON is the custom marshaler for ApplicationGatewayPropertiesFormat.
1831func (agpf ApplicationGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
1832	objectMap := make(map[string]interface{})
1833	if agpf.Sku != nil {
1834		objectMap["sku"] = agpf.Sku
1835	}
1836	if agpf.SslPolicy != nil {
1837		objectMap["sslPolicy"] = agpf.SslPolicy
1838	}
1839	if agpf.GatewayIPConfigurations != nil {
1840		objectMap["gatewayIPConfigurations"] = agpf.GatewayIPConfigurations
1841	}
1842	if agpf.AuthenticationCertificates != nil {
1843		objectMap["authenticationCertificates"] = agpf.AuthenticationCertificates
1844	}
1845	if agpf.SslCertificates != nil {
1846		objectMap["sslCertificates"] = agpf.SslCertificates
1847	}
1848	if agpf.FrontendIPConfigurations != nil {
1849		objectMap["frontendIPConfigurations"] = agpf.FrontendIPConfigurations
1850	}
1851	if agpf.FrontendPorts != nil {
1852		objectMap["frontendPorts"] = agpf.FrontendPorts
1853	}
1854	if agpf.Probes != nil {
1855		objectMap["probes"] = agpf.Probes
1856	}
1857	if agpf.BackendAddressPools != nil {
1858		objectMap["backendAddressPools"] = agpf.BackendAddressPools
1859	}
1860	if agpf.BackendHTTPSettingsCollection != nil {
1861		objectMap["backendHttpSettingsCollection"] = agpf.BackendHTTPSettingsCollection
1862	}
1863	if agpf.HTTPListeners != nil {
1864		objectMap["httpListeners"] = agpf.HTTPListeners
1865	}
1866	if agpf.URLPathMaps != nil {
1867		objectMap["urlPathMaps"] = agpf.URLPathMaps
1868	}
1869	if agpf.RequestRoutingRules != nil {
1870		objectMap["requestRoutingRules"] = agpf.RequestRoutingRules
1871	}
1872	if agpf.RedirectConfigurations != nil {
1873		objectMap["redirectConfigurations"] = agpf.RedirectConfigurations
1874	}
1875	if agpf.WebApplicationFirewallConfiguration != nil {
1876		objectMap["webApplicationFirewallConfiguration"] = agpf.WebApplicationFirewallConfiguration
1877	}
1878	if agpf.EnableHTTP2 != nil {
1879		objectMap["enableHttp2"] = agpf.EnableHTTP2
1880	}
1881	if agpf.ResourceGUID != nil {
1882		objectMap["resourceGuid"] = agpf.ResourceGUID
1883	}
1884	if agpf.ProvisioningState != nil {
1885		objectMap["provisioningState"] = agpf.ProvisioningState
1886	}
1887	return json.Marshal(objectMap)
1888}
1889
1890// ApplicationGatewayRedirectConfiguration redirect configuration of an application gateway.
1891type ApplicationGatewayRedirectConfiguration struct {
1892	*ApplicationGatewayRedirectConfigurationPropertiesFormat `json:"properties,omitempty"`
1893	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
1894	Name *string `json:"name,omitempty"`
1895	// Etag - A unique read-only string that changes whenever the resource is updated.
1896	Etag *string `json:"etag,omitempty"`
1897	// Type - Type of the resource.
1898	Type *string `json:"type,omitempty"`
1899	// ID - Resource ID.
1900	ID *string `json:"id,omitempty"`
1901}
1902
1903// MarshalJSON is the custom marshaler for ApplicationGatewayRedirectConfiguration.
1904func (agrc ApplicationGatewayRedirectConfiguration) MarshalJSON() ([]byte, error) {
1905	objectMap := make(map[string]interface{})
1906	if agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat != nil {
1907		objectMap["properties"] = agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat
1908	}
1909	if agrc.Name != nil {
1910		objectMap["name"] = agrc.Name
1911	}
1912	if agrc.Etag != nil {
1913		objectMap["etag"] = agrc.Etag
1914	}
1915	if agrc.Type != nil {
1916		objectMap["type"] = agrc.Type
1917	}
1918	if agrc.ID != nil {
1919		objectMap["id"] = agrc.ID
1920	}
1921	return json.Marshal(objectMap)
1922}
1923
1924// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRedirectConfiguration struct.
1925func (agrc *ApplicationGatewayRedirectConfiguration) UnmarshalJSON(body []byte) error {
1926	var m map[string]*json.RawMessage
1927	err := json.Unmarshal(body, &m)
1928	if err != nil {
1929		return err
1930	}
1931	for k, v := range m {
1932		switch k {
1933		case "properties":
1934			if v != nil {
1935				var applicationGatewayRedirectConfigurationPropertiesFormat ApplicationGatewayRedirectConfigurationPropertiesFormat
1936				err = json.Unmarshal(*v, &applicationGatewayRedirectConfigurationPropertiesFormat)
1937				if err != nil {
1938					return err
1939				}
1940				agrc.ApplicationGatewayRedirectConfigurationPropertiesFormat = &applicationGatewayRedirectConfigurationPropertiesFormat
1941			}
1942		case "name":
1943			if v != nil {
1944				var name string
1945				err = json.Unmarshal(*v, &name)
1946				if err != nil {
1947					return err
1948				}
1949				agrc.Name = &name
1950			}
1951		case "etag":
1952			if v != nil {
1953				var etag string
1954				err = json.Unmarshal(*v, &etag)
1955				if err != nil {
1956					return err
1957				}
1958				agrc.Etag = &etag
1959			}
1960		case "type":
1961			if v != nil {
1962				var typeVar string
1963				err = json.Unmarshal(*v, &typeVar)
1964				if err != nil {
1965					return err
1966				}
1967				agrc.Type = &typeVar
1968			}
1969		case "id":
1970			if v != nil {
1971				var ID string
1972				err = json.Unmarshal(*v, &ID)
1973				if err != nil {
1974					return err
1975				}
1976				agrc.ID = &ID
1977			}
1978		}
1979	}
1980
1981	return nil
1982}
1983
1984// ApplicationGatewayRedirectConfigurationPropertiesFormat properties of redirect configuration of the
1985// application gateway.
1986type ApplicationGatewayRedirectConfigurationPropertiesFormat struct {
1987	// RedirectType - Supported http redirection types - Permanent, Temporary, Found, SeeOther. Possible values include: 'Permanent', 'Found', 'SeeOther', 'Temporary'
1988	RedirectType ApplicationGatewayRedirectType `json:"redirectType,omitempty"`
1989	// TargetListener - Reference to a listener to redirect the request to.
1990	TargetListener *SubResource `json:"targetListener,omitempty"`
1991	// TargetURL - Url to redirect the request to.
1992	TargetURL *string `json:"targetUrl,omitempty"`
1993	// IncludePath - Include path in the redirected url.
1994	IncludePath *bool `json:"includePath,omitempty"`
1995	// IncludeQueryString - Include query string in the redirected url.
1996	IncludeQueryString *bool `json:"includeQueryString,omitempty"`
1997	// RequestRoutingRules - Request routing specifying redirect configuration.
1998	RequestRoutingRules *[]SubResource `json:"requestRoutingRules,omitempty"`
1999	// URLPathMaps - Url path maps specifying default redirect configuration.
2000	URLPathMaps *[]SubResource `json:"urlPathMaps,omitempty"`
2001	// PathRules - Path rules specifying redirect configuration.
2002	PathRules *[]SubResource `json:"pathRules,omitempty"`
2003}
2004
2005// ApplicationGatewayRequestRoutingRule request routing rule of an application gateway.
2006type ApplicationGatewayRequestRoutingRule struct {
2007	*ApplicationGatewayRequestRoutingRulePropertiesFormat `json:"properties,omitempty"`
2008	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
2009	Name *string `json:"name,omitempty"`
2010	// Etag - A unique read-only string that changes whenever the resource is updated.
2011	Etag *string `json:"etag,omitempty"`
2012	// Type - Type of the resource.
2013	Type *string `json:"type,omitempty"`
2014	// ID - Resource ID.
2015	ID *string `json:"id,omitempty"`
2016}
2017
2018// MarshalJSON is the custom marshaler for ApplicationGatewayRequestRoutingRule.
2019func (agrrr ApplicationGatewayRequestRoutingRule) MarshalJSON() ([]byte, error) {
2020	objectMap := make(map[string]interface{})
2021	if agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat != nil {
2022		objectMap["properties"] = agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat
2023	}
2024	if agrrr.Name != nil {
2025		objectMap["name"] = agrrr.Name
2026	}
2027	if agrrr.Etag != nil {
2028		objectMap["etag"] = agrrr.Etag
2029	}
2030	if agrrr.Type != nil {
2031		objectMap["type"] = agrrr.Type
2032	}
2033	if agrrr.ID != nil {
2034		objectMap["id"] = agrrr.ID
2035	}
2036	return json.Marshal(objectMap)
2037}
2038
2039// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRequestRoutingRule struct.
2040func (agrrr *ApplicationGatewayRequestRoutingRule) UnmarshalJSON(body []byte) error {
2041	var m map[string]*json.RawMessage
2042	err := json.Unmarshal(body, &m)
2043	if err != nil {
2044		return err
2045	}
2046	for k, v := range m {
2047		switch k {
2048		case "properties":
2049			if v != nil {
2050				var applicationGatewayRequestRoutingRulePropertiesFormat ApplicationGatewayRequestRoutingRulePropertiesFormat
2051				err = json.Unmarshal(*v, &applicationGatewayRequestRoutingRulePropertiesFormat)
2052				if err != nil {
2053					return err
2054				}
2055				agrrr.ApplicationGatewayRequestRoutingRulePropertiesFormat = &applicationGatewayRequestRoutingRulePropertiesFormat
2056			}
2057		case "name":
2058			if v != nil {
2059				var name string
2060				err = json.Unmarshal(*v, &name)
2061				if err != nil {
2062					return err
2063				}
2064				agrrr.Name = &name
2065			}
2066		case "etag":
2067			if v != nil {
2068				var etag string
2069				err = json.Unmarshal(*v, &etag)
2070				if err != nil {
2071					return err
2072				}
2073				agrrr.Etag = &etag
2074			}
2075		case "type":
2076			if v != nil {
2077				var typeVar string
2078				err = json.Unmarshal(*v, &typeVar)
2079				if err != nil {
2080					return err
2081				}
2082				agrrr.Type = &typeVar
2083			}
2084		case "id":
2085			if v != nil {
2086				var ID string
2087				err = json.Unmarshal(*v, &ID)
2088				if err != nil {
2089					return err
2090				}
2091				agrrr.ID = &ID
2092			}
2093		}
2094	}
2095
2096	return nil
2097}
2098
2099// ApplicationGatewayRequestRoutingRulePropertiesFormat properties of request routing rule of the
2100// application gateway.
2101type ApplicationGatewayRequestRoutingRulePropertiesFormat struct {
2102	// RuleType - Rule type. Possible values include: 'Basic', 'PathBasedRouting'
2103	RuleType ApplicationGatewayRequestRoutingRuleType `json:"ruleType,omitempty"`
2104	// BackendAddressPool - Backend address pool resource of the application gateway.
2105	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
2106	// BackendHTTPSettings - Frontend port resource of the application gateway.
2107	BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"`
2108	// HTTPListener - Http listener resource of the application gateway.
2109	HTTPListener *SubResource `json:"httpListener,omitempty"`
2110	// URLPathMap - URL path map resource of the application gateway.
2111	URLPathMap *SubResource `json:"urlPathMap,omitempty"`
2112	// RedirectConfiguration - Redirect configuration resource of the application gateway.
2113	RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"`
2114	// ProvisioningState - Provisioning state of the request routing rule resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2115	ProvisioningState *string `json:"provisioningState,omitempty"`
2116}
2117
2118// ApplicationGatewaysBackendHealthFuture an abstraction for monitoring and retrieving the results of a
2119// long-running operation.
2120type ApplicationGatewaysBackendHealthFuture struct {
2121	azure.FutureAPI
2122	// Result returns the result of the asynchronous operation.
2123	// If the operation has not completed it will return an error.
2124	Result func(ApplicationGatewaysClient) (ApplicationGatewayBackendHealth, error)
2125}
2126
2127// ApplicationGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
2128// long-running operation.
2129type ApplicationGatewaysCreateOrUpdateFuture struct {
2130	azure.FutureAPI
2131	// Result returns the result of the asynchronous operation.
2132	// If the operation has not completed it will return an error.
2133	Result func(ApplicationGatewaysClient) (ApplicationGateway, error)
2134}
2135
2136// ApplicationGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
2137// long-running operation.
2138type ApplicationGatewaysDeleteFuture struct {
2139	azure.FutureAPI
2140	// Result returns the result of the asynchronous operation.
2141	// If the operation has not completed it will return an error.
2142	Result func(ApplicationGatewaysClient) (autorest.Response, error)
2143}
2144
2145// ApplicationGatewaySku SKU of an application gateway
2146type ApplicationGatewaySku struct {
2147	// Name - Name of an application gateway SKU. Possible values include: 'StandardSmall', 'StandardMedium', 'StandardLarge', 'WAFMedium', 'WAFLarge'
2148	Name ApplicationGatewaySkuName `json:"name,omitempty"`
2149	// Tier - Tier of an application gateway. Possible values include: 'Standard', 'WAF'
2150	Tier ApplicationGatewayTier `json:"tier,omitempty"`
2151	// Capacity - Capacity (instance count) of an application gateway.
2152	Capacity *int32 `json:"capacity,omitempty"`
2153}
2154
2155// ApplicationGatewaySslCertificate SSL certificates of an application gateway.
2156type ApplicationGatewaySslCertificate struct {
2157	*ApplicationGatewaySslCertificatePropertiesFormat `json:"properties,omitempty"`
2158	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
2159	Name *string `json:"name,omitempty"`
2160	// Etag - A unique read-only string that changes whenever the resource is updated.
2161	Etag *string `json:"etag,omitempty"`
2162	// Type - Type of the resource.
2163	Type *string `json:"type,omitempty"`
2164	// ID - Resource ID.
2165	ID *string `json:"id,omitempty"`
2166}
2167
2168// MarshalJSON is the custom marshaler for ApplicationGatewaySslCertificate.
2169func (agsc ApplicationGatewaySslCertificate) MarshalJSON() ([]byte, error) {
2170	objectMap := make(map[string]interface{})
2171	if agsc.ApplicationGatewaySslCertificatePropertiesFormat != nil {
2172		objectMap["properties"] = agsc.ApplicationGatewaySslCertificatePropertiesFormat
2173	}
2174	if agsc.Name != nil {
2175		objectMap["name"] = agsc.Name
2176	}
2177	if agsc.Etag != nil {
2178		objectMap["etag"] = agsc.Etag
2179	}
2180	if agsc.Type != nil {
2181		objectMap["type"] = agsc.Type
2182	}
2183	if agsc.ID != nil {
2184		objectMap["id"] = agsc.ID
2185	}
2186	return json.Marshal(objectMap)
2187}
2188
2189// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslCertificate struct.
2190func (agsc *ApplicationGatewaySslCertificate) UnmarshalJSON(body []byte) error {
2191	var m map[string]*json.RawMessage
2192	err := json.Unmarshal(body, &m)
2193	if err != nil {
2194		return err
2195	}
2196	for k, v := range m {
2197		switch k {
2198		case "properties":
2199			if v != nil {
2200				var applicationGatewaySslCertificatePropertiesFormat ApplicationGatewaySslCertificatePropertiesFormat
2201				err = json.Unmarshal(*v, &applicationGatewaySslCertificatePropertiesFormat)
2202				if err != nil {
2203					return err
2204				}
2205				agsc.ApplicationGatewaySslCertificatePropertiesFormat = &applicationGatewaySslCertificatePropertiesFormat
2206			}
2207		case "name":
2208			if v != nil {
2209				var name string
2210				err = json.Unmarshal(*v, &name)
2211				if err != nil {
2212					return err
2213				}
2214				agsc.Name = &name
2215			}
2216		case "etag":
2217			if v != nil {
2218				var etag string
2219				err = json.Unmarshal(*v, &etag)
2220				if err != nil {
2221					return err
2222				}
2223				agsc.Etag = &etag
2224			}
2225		case "type":
2226			if v != nil {
2227				var typeVar string
2228				err = json.Unmarshal(*v, &typeVar)
2229				if err != nil {
2230					return err
2231				}
2232				agsc.Type = &typeVar
2233			}
2234		case "id":
2235			if v != nil {
2236				var ID string
2237				err = json.Unmarshal(*v, &ID)
2238				if err != nil {
2239					return err
2240				}
2241				agsc.ID = &ID
2242			}
2243		}
2244	}
2245
2246	return nil
2247}
2248
2249// ApplicationGatewaySslCertificatePropertiesFormat properties of SSL certificates of an application
2250// gateway.
2251type ApplicationGatewaySslCertificatePropertiesFormat struct {
2252	// Data - Base-64 encoded pfx certificate. Only applicable in PUT Request.
2253	Data *string `json:"data,omitempty"`
2254	// Password - Password for the pfx file specified in data. Only applicable in PUT request.
2255	Password *string `json:"password,omitempty"`
2256	// PublicCertData - Base-64 encoded Public cert data corresponding to pfx specified in data. Only applicable in GET request.
2257	PublicCertData *string `json:"publicCertData,omitempty"`
2258	// ProvisioningState - Provisioning state of the SSL certificate resource Possible values are: 'Updating', 'Deleting', and 'Failed'.
2259	ProvisioningState *string `json:"provisioningState,omitempty"`
2260}
2261
2262// ApplicationGatewaySslPolicy application Gateway Ssl policy.
2263type ApplicationGatewaySslPolicy struct {
2264	// DisabledSslProtocols - Ssl protocols to be disabled on application gateway.
2265	DisabledSslProtocols *[]ApplicationGatewaySslProtocol `json:"disabledSslProtocols,omitempty"`
2266	// PolicyType - Type of Ssl Policy. Possible values include: 'Predefined', 'Custom'
2267	PolicyType ApplicationGatewaySslPolicyType `json:"policyType,omitempty"`
2268	// PolicyName - Name of Ssl predefined policy. Possible values include: 'AppGwSslPolicy20150501', 'AppGwSslPolicy20170401', 'AppGwSslPolicy20170401S'
2269	PolicyName ApplicationGatewaySslPolicyName `json:"policyName,omitempty"`
2270	// CipherSuites - Ssl cipher suites to be enabled in the specified order to application gateway.
2271	CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"`
2272	// MinProtocolVersion - Minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'TLSv10', 'TLSv11', 'TLSv12'
2273	MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"`
2274}
2275
2276// ApplicationGatewaySslPredefinedPolicy an Ssl predefined policy
2277type ApplicationGatewaySslPredefinedPolicy struct {
2278	autorest.Response `json:"-"`
2279	// Name - Name of Ssl predefined policy.
2280	Name                                                   *string `json:"name,omitempty"`
2281	*ApplicationGatewaySslPredefinedPolicyPropertiesFormat `json:"properties,omitempty"`
2282	// ID - Resource ID.
2283	ID *string `json:"id,omitempty"`
2284}
2285
2286// MarshalJSON is the custom marshaler for ApplicationGatewaySslPredefinedPolicy.
2287func (agspp ApplicationGatewaySslPredefinedPolicy) MarshalJSON() ([]byte, error) {
2288	objectMap := make(map[string]interface{})
2289	if agspp.Name != nil {
2290		objectMap["name"] = agspp.Name
2291	}
2292	if agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat != nil {
2293		objectMap["properties"] = agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat
2294	}
2295	if agspp.ID != nil {
2296		objectMap["id"] = agspp.ID
2297	}
2298	return json.Marshal(objectMap)
2299}
2300
2301// UnmarshalJSON is the custom unmarshaler for ApplicationGatewaySslPredefinedPolicy struct.
2302func (agspp *ApplicationGatewaySslPredefinedPolicy) UnmarshalJSON(body []byte) error {
2303	var m map[string]*json.RawMessage
2304	err := json.Unmarshal(body, &m)
2305	if err != nil {
2306		return err
2307	}
2308	for k, v := range m {
2309		switch k {
2310		case "name":
2311			if v != nil {
2312				var name string
2313				err = json.Unmarshal(*v, &name)
2314				if err != nil {
2315					return err
2316				}
2317				agspp.Name = &name
2318			}
2319		case "properties":
2320			if v != nil {
2321				var applicationGatewaySslPredefinedPolicyPropertiesFormat ApplicationGatewaySslPredefinedPolicyPropertiesFormat
2322				err = json.Unmarshal(*v, &applicationGatewaySslPredefinedPolicyPropertiesFormat)
2323				if err != nil {
2324					return err
2325				}
2326				agspp.ApplicationGatewaySslPredefinedPolicyPropertiesFormat = &applicationGatewaySslPredefinedPolicyPropertiesFormat
2327			}
2328		case "id":
2329			if v != nil {
2330				var ID string
2331				err = json.Unmarshal(*v, &ID)
2332				if err != nil {
2333					return err
2334				}
2335				agspp.ID = &ID
2336			}
2337		}
2338	}
2339
2340	return nil
2341}
2342
2343// ApplicationGatewaySslPredefinedPolicyPropertiesFormat properties of
2344// ApplicationGatewaySslPredefinedPolicy
2345type ApplicationGatewaySslPredefinedPolicyPropertiesFormat struct {
2346	// CipherSuites - Ssl cipher suites to be enabled in the specified order for application gateway.
2347	CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"`
2348	// MinProtocolVersion - Minimum version of Ssl protocol to be supported on application gateway. Possible values include: 'TLSv10', 'TLSv11', 'TLSv12'
2349	MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"`
2350}
2351
2352// ApplicationGatewaysStartFuture an abstraction for monitoring and retrieving the results of a
2353// long-running operation.
2354type ApplicationGatewaysStartFuture struct {
2355	azure.FutureAPI
2356	// Result returns the result of the asynchronous operation.
2357	// If the operation has not completed it will return an error.
2358	Result func(ApplicationGatewaysClient) (autorest.Response, error)
2359}
2360
2361// ApplicationGatewaysStopFuture an abstraction for monitoring and retrieving the results of a long-running
2362// operation.
2363type ApplicationGatewaysStopFuture struct {
2364	azure.FutureAPI
2365	// Result returns the result of the asynchronous operation.
2366	// If the operation has not completed it will return an error.
2367	Result func(ApplicationGatewaysClient) (autorest.Response, error)
2368}
2369
2370// ApplicationGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
2371// long-running operation.
2372type ApplicationGatewaysUpdateTagsFuture struct {
2373	azure.FutureAPI
2374	// Result returns the result of the asynchronous operation.
2375	// If the operation has not completed it will return an error.
2376	Result func(ApplicationGatewaysClient) (ApplicationGateway, error)
2377}
2378
2379// ApplicationGatewayURLPathMap urlPathMaps give a url path to the backend mapping information for
2380// PathBasedRouting.
2381type ApplicationGatewayURLPathMap struct {
2382	*ApplicationGatewayURLPathMapPropertiesFormat `json:"properties,omitempty"`
2383	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
2384	Name *string `json:"name,omitempty"`
2385	// Etag - A unique read-only string that changes whenever the resource is updated.
2386	Etag *string `json:"etag,omitempty"`
2387	// Type - Type of the resource.
2388	Type *string `json:"type,omitempty"`
2389	// ID - Resource ID.
2390	ID *string `json:"id,omitempty"`
2391}
2392
2393// MarshalJSON is the custom marshaler for ApplicationGatewayURLPathMap.
2394func (agupm ApplicationGatewayURLPathMap) MarshalJSON() ([]byte, error) {
2395	objectMap := make(map[string]interface{})
2396	if agupm.ApplicationGatewayURLPathMapPropertiesFormat != nil {
2397		objectMap["properties"] = agupm.ApplicationGatewayURLPathMapPropertiesFormat
2398	}
2399	if agupm.Name != nil {
2400		objectMap["name"] = agupm.Name
2401	}
2402	if agupm.Etag != nil {
2403		objectMap["etag"] = agupm.Etag
2404	}
2405	if agupm.Type != nil {
2406		objectMap["type"] = agupm.Type
2407	}
2408	if agupm.ID != nil {
2409		objectMap["id"] = agupm.ID
2410	}
2411	return json.Marshal(objectMap)
2412}
2413
2414// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayURLPathMap struct.
2415func (agupm *ApplicationGatewayURLPathMap) UnmarshalJSON(body []byte) error {
2416	var m map[string]*json.RawMessage
2417	err := json.Unmarshal(body, &m)
2418	if err != nil {
2419		return err
2420	}
2421	for k, v := range m {
2422		switch k {
2423		case "properties":
2424			if v != nil {
2425				var applicationGatewayURLPathMapPropertiesFormat ApplicationGatewayURLPathMapPropertiesFormat
2426				err = json.Unmarshal(*v, &applicationGatewayURLPathMapPropertiesFormat)
2427				if err != nil {
2428					return err
2429				}
2430				agupm.ApplicationGatewayURLPathMapPropertiesFormat = &applicationGatewayURLPathMapPropertiesFormat
2431			}
2432		case "name":
2433			if v != nil {
2434				var name string
2435				err = json.Unmarshal(*v, &name)
2436				if err != nil {
2437					return err
2438				}
2439				agupm.Name = &name
2440			}
2441		case "etag":
2442			if v != nil {
2443				var etag string
2444				err = json.Unmarshal(*v, &etag)
2445				if err != nil {
2446					return err
2447				}
2448				agupm.Etag = &etag
2449			}
2450		case "type":
2451			if v != nil {
2452				var typeVar string
2453				err = json.Unmarshal(*v, &typeVar)
2454				if err != nil {
2455					return err
2456				}
2457				agupm.Type = &typeVar
2458			}
2459		case "id":
2460			if v != nil {
2461				var ID string
2462				err = json.Unmarshal(*v, &ID)
2463				if err != nil {
2464					return err
2465				}
2466				agupm.ID = &ID
2467			}
2468		}
2469	}
2470
2471	return nil
2472}
2473
2474// ApplicationGatewayURLPathMapPropertiesFormat properties of UrlPathMap of the application gateway.
2475type ApplicationGatewayURLPathMapPropertiesFormat struct {
2476	// DefaultBackendAddressPool - Default backend address pool resource of URL path map.
2477	DefaultBackendAddressPool *SubResource `json:"defaultBackendAddressPool,omitempty"`
2478	// DefaultBackendHTTPSettings - Default backend http settings resource of URL path map.
2479	DefaultBackendHTTPSettings *SubResource `json:"defaultBackendHttpSettings,omitempty"`
2480	// DefaultRedirectConfiguration - Default redirect configuration resource of URL path map.
2481	DefaultRedirectConfiguration *SubResource `json:"defaultRedirectConfiguration,omitempty"`
2482	// PathRules - Path rule of URL path map resource.
2483	PathRules *[]ApplicationGatewayPathRule `json:"pathRules,omitempty"`
2484	// ProvisioningState - Provisioning state of the backend http settings resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2485	ProvisioningState *string `json:"provisioningState,omitempty"`
2486}
2487
2488// ApplicationGatewayWebApplicationFirewallConfiguration application gateway web application firewall
2489// configuration.
2490type ApplicationGatewayWebApplicationFirewallConfiguration struct {
2491	// Enabled - Whether the web application firewall is enabled or not.
2492	Enabled *bool `json:"enabled,omitempty"`
2493	// FirewallMode - Web application firewall mode. Possible values include: 'Detection', 'Prevention'
2494	FirewallMode ApplicationGatewayFirewallMode `json:"firewallMode,omitempty"`
2495	// RuleSetType - The type of the web application firewall rule set. Possible values are: 'OWASP'.
2496	RuleSetType *string `json:"ruleSetType,omitempty"`
2497	// RuleSetVersion - The version of the rule set type.
2498	RuleSetVersion *string `json:"ruleSetVersion,omitempty"`
2499	// DisabledRuleGroups - The disabled rule groups.
2500	DisabledRuleGroups *[]ApplicationGatewayFirewallDisabledRuleGroup `json:"disabledRuleGroups,omitempty"`
2501}
2502
2503// ApplicationSecurityGroup an application security group in a resource group.
2504type ApplicationSecurityGroup struct {
2505	autorest.Response `json:"-"`
2506	// ApplicationSecurityGroupPropertiesFormat - Properties of the application security group.
2507	*ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"`
2508	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
2509	Etag *string `json:"etag,omitempty"`
2510	// ID - Resource ID.
2511	ID *string `json:"id,omitempty"`
2512	// Name - READ-ONLY; Resource name.
2513	Name *string `json:"name,omitempty"`
2514	// Type - READ-ONLY; Resource type.
2515	Type *string `json:"type,omitempty"`
2516	// Location - Resource location.
2517	Location *string `json:"location,omitempty"`
2518	// Tags - Resource tags.
2519	Tags map[string]*string `json:"tags"`
2520}
2521
2522// MarshalJSON is the custom marshaler for ApplicationSecurityGroup.
2523func (asg ApplicationSecurityGroup) MarshalJSON() ([]byte, error) {
2524	objectMap := make(map[string]interface{})
2525	if asg.ApplicationSecurityGroupPropertiesFormat != nil {
2526		objectMap["properties"] = asg.ApplicationSecurityGroupPropertiesFormat
2527	}
2528	if asg.ID != nil {
2529		objectMap["id"] = asg.ID
2530	}
2531	if asg.Location != nil {
2532		objectMap["location"] = asg.Location
2533	}
2534	if asg.Tags != nil {
2535		objectMap["tags"] = asg.Tags
2536	}
2537	return json.Marshal(objectMap)
2538}
2539
2540// UnmarshalJSON is the custom unmarshaler for ApplicationSecurityGroup struct.
2541func (asg *ApplicationSecurityGroup) UnmarshalJSON(body []byte) error {
2542	var m map[string]*json.RawMessage
2543	err := json.Unmarshal(body, &m)
2544	if err != nil {
2545		return err
2546	}
2547	for k, v := range m {
2548		switch k {
2549		case "properties":
2550			if v != nil {
2551				var applicationSecurityGroupPropertiesFormat ApplicationSecurityGroupPropertiesFormat
2552				err = json.Unmarshal(*v, &applicationSecurityGroupPropertiesFormat)
2553				if err != nil {
2554					return err
2555				}
2556				asg.ApplicationSecurityGroupPropertiesFormat = &applicationSecurityGroupPropertiesFormat
2557			}
2558		case "etag":
2559			if v != nil {
2560				var etag string
2561				err = json.Unmarshal(*v, &etag)
2562				if err != nil {
2563					return err
2564				}
2565				asg.Etag = &etag
2566			}
2567		case "id":
2568			if v != nil {
2569				var ID string
2570				err = json.Unmarshal(*v, &ID)
2571				if err != nil {
2572					return err
2573				}
2574				asg.ID = &ID
2575			}
2576		case "name":
2577			if v != nil {
2578				var name string
2579				err = json.Unmarshal(*v, &name)
2580				if err != nil {
2581					return err
2582				}
2583				asg.Name = &name
2584			}
2585		case "type":
2586			if v != nil {
2587				var typeVar string
2588				err = json.Unmarshal(*v, &typeVar)
2589				if err != nil {
2590					return err
2591				}
2592				asg.Type = &typeVar
2593			}
2594		case "location":
2595			if v != nil {
2596				var location string
2597				err = json.Unmarshal(*v, &location)
2598				if err != nil {
2599					return err
2600				}
2601				asg.Location = &location
2602			}
2603		case "tags":
2604			if v != nil {
2605				var tags map[string]*string
2606				err = json.Unmarshal(*v, &tags)
2607				if err != nil {
2608					return err
2609				}
2610				asg.Tags = tags
2611			}
2612		}
2613	}
2614
2615	return nil
2616}
2617
2618// ApplicationSecurityGroupListResult a list of application security groups.
2619type ApplicationSecurityGroupListResult struct {
2620	autorest.Response `json:"-"`
2621	// Value - A list of application security groups.
2622	Value *[]ApplicationSecurityGroup `json:"value,omitempty"`
2623	// NextLink - READ-ONLY; The URL to get the next set of results.
2624	NextLink *string `json:"nextLink,omitempty"`
2625}
2626
2627// MarshalJSON is the custom marshaler for ApplicationSecurityGroupListResult.
2628func (asglr ApplicationSecurityGroupListResult) MarshalJSON() ([]byte, error) {
2629	objectMap := make(map[string]interface{})
2630	if asglr.Value != nil {
2631		objectMap["value"] = asglr.Value
2632	}
2633	return json.Marshal(objectMap)
2634}
2635
2636// ApplicationSecurityGroupListResultIterator provides access to a complete listing of
2637// ApplicationSecurityGroup values.
2638type ApplicationSecurityGroupListResultIterator struct {
2639	i    int
2640	page ApplicationSecurityGroupListResultPage
2641}
2642
2643// NextWithContext advances to the next value.  If there was an error making
2644// the request the iterator does not advance and the error is returned.
2645func (iter *ApplicationSecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
2646	if tracing.IsEnabled() {
2647		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupListResultIterator.NextWithContext")
2648		defer func() {
2649			sc := -1
2650			if iter.Response().Response.Response != nil {
2651				sc = iter.Response().Response.Response.StatusCode
2652			}
2653			tracing.EndSpan(ctx, sc, err)
2654		}()
2655	}
2656	iter.i++
2657	if iter.i < len(iter.page.Values()) {
2658		return nil
2659	}
2660	err = iter.page.NextWithContext(ctx)
2661	if err != nil {
2662		iter.i--
2663		return err
2664	}
2665	iter.i = 0
2666	return nil
2667}
2668
2669// Next advances to the next value.  If there was an error making
2670// the request the iterator does not advance and the error is returned.
2671// Deprecated: Use NextWithContext() instead.
2672func (iter *ApplicationSecurityGroupListResultIterator) Next() error {
2673	return iter.NextWithContext(context.Background())
2674}
2675
2676// NotDone returns true if the enumeration should be started or is not yet complete.
2677func (iter ApplicationSecurityGroupListResultIterator) NotDone() bool {
2678	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2679}
2680
2681// Response returns the raw server response from the last page request.
2682func (iter ApplicationSecurityGroupListResultIterator) Response() ApplicationSecurityGroupListResult {
2683	return iter.page.Response()
2684}
2685
2686// Value returns the current value or a zero-initialized value if the
2687// iterator has advanced beyond the end of the collection.
2688func (iter ApplicationSecurityGroupListResultIterator) Value() ApplicationSecurityGroup {
2689	if !iter.page.NotDone() {
2690		return ApplicationSecurityGroup{}
2691	}
2692	return iter.page.Values()[iter.i]
2693}
2694
2695// Creates a new instance of the ApplicationSecurityGroupListResultIterator type.
2696func NewApplicationSecurityGroupListResultIterator(page ApplicationSecurityGroupListResultPage) ApplicationSecurityGroupListResultIterator {
2697	return ApplicationSecurityGroupListResultIterator{page: page}
2698}
2699
2700// IsEmpty returns true if the ListResult contains no values.
2701func (asglr ApplicationSecurityGroupListResult) IsEmpty() bool {
2702	return asglr.Value == nil || len(*asglr.Value) == 0
2703}
2704
2705// hasNextLink returns true if the NextLink is not empty.
2706func (asglr ApplicationSecurityGroupListResult) hasNextLink() bool {
2707	return asglr.NextLink != nil && len(*asglr.NextLink) != 0
2708}
2709
2710// applicationSecurityGroupListResultPreparer prepares a request to retrieve the next set of results.
2711// It returns nil if no more results exist.
2712func (asglr ApplicationSecurityGroupListResult) applicationSecurityGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
2713	if !asglr.hasNextLink() {
2714		return nil, nil
2715	}
2716	return autorest.Prepare((&http.Request{}).WithContext(ctx),
2717		autorest.AsJSON(),
2718		autorest.AsGet(),
2719		autorest.WithBaseURL(to.String(asglr.NextLink)))
2720}
2721
2722// ApplicationSecurityGroupListResultPage contains a page of ApplicationSecurityGroup values.
2723type ApplicationSecurityGroupListResultPage struct {
2724	fn    func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)
2725	asglr ApplicationSecurityGroupListResult
2726}
2727
2728// NextWithContext advances to the next page of values.  If there was an error making
2729// the request the page does not advance and the error is returned.
2730func (page *ApplicationSecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
2731	if tracing.IsEnabled() {
2732		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupListResultPage.NextWithContext")
2733		defer func() {
2734			sc := -1
2735			if page.Response().Response.Response != nil {
2736				sc = page.Response().Response.Response.StatusCode
2737			}
2738			tracing.EndSpan(ctx, sc, err)
2739		}()
2740	}
2741	for {
2742		next, err := page.fn(ctx, page.asglr)
2743		if err != nil {
2744			return err
2745		}
2746		page.asglr = next
2747		if !next.hasNextLink() || !next.IsEmpty() {
2748			break
2749		}
2750	}
2751	return nil
2752}
2753
2754// Next advances to the next page of values.  If there was an error making
2755// the request the page does not advance and the error is returned.
2756// Deprecated: Use NextWithContext() instead.
2757func (page *ApplicationSecurityGroupListResultPage) Next() error {
2758	return page.NextWithContext(context.Background())
2759}
2760
2761// NotDone returns true if the page enumeration should be started or is not yet complete.
2762func (page ApplicationSecurityGroupListResultPage) NotDone() bool {
2763	return !page.asglr.IsEmpty()
2764}
2765
2766// Response returns the raw server response from the last page request.
2767func (page ApplicationSecurityGroupListResultPage) Response() ApplicationSecurityGroupListResult {
2768	return page.asglr
2769}
2770
2771// Values returns the slice of values for the current page or nil if there are no values.
2772func (page ApplicationSecurityGroupListResultPage) Values() []ApplicationSecurityGroup {
2773	if page.asglr.IsEmpty() {
2774		return nil
2775	}
2776	return *page.asglr.Value
2777}
2778
2779// Creates a new instance of the ApplicationSecurityGroupListResultPage type.
2780func NewApplicationSecurityGroupListResultPage(cur ApplicationSecurityGroupListResult, getNextPage func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)) ApplicationSecurityGroupListResultPage {
2781	return ApplicationSecurityGroupListResultPage{
2782		fn:    getNextPage,
2783		asglr: cur,
2784	}
2785}
2786
2787// ApplicationSecurityGroupPropertiesFormat application security group properties.
2788type ApplicationSecurityGroupPropertiesFormat struct {
2789	// ResourceGUID - READ-ONLY; The resource GUID property of the application security group resource. It uniquely identifies a resource, even if the user changes its name or migrate the resource across subscriptions or resource groups.
2790	ResourceGUID *string `json:"resourceGuid,omitempty"`
2791	// ProvisioningState - READ-ONLY; The provisioning state of the application security group resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
2792	ProvisioningState *string `json:"provisioningState,omitempty"`
2793}
2794
2795// ApplicationSecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
2796// of a long-running operation.
2797type ApplicationSecurityGroupsCreateOrUpdateFuture struct {
2798	azure.FutureAPI
2799	// Result returns the result of the asynchronous operation.
2800	// If the operation has not completed it will return an error.
2801	Result func(ApplicationSecurityGroupsClient) (ApplicationSecurityGroup, error)
2802}
2803
2804// ApplicationSecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a
2805// long-running operation.
2806type ApplicationSecurityGroupsDeleteFuture struct {
2807	azure.FutureAPI
2808	// Result returns the result of the asynchronous operation.
2809	// If the operation has not completed it will return an error.
2810	Result func(ApplicationSecurityGroupsClient) (autorest.Response, error)
2811}
2812
2813// AuthorizationListResult response for ListAuthorizations API service call retrieves all authorizations
2814// that belongs to an ExpressRouteCircuit.
2815type AuthorizationListResult struct {
2816	autorest.Response `json:"-"`
2817	// Value - The authorizations in an ExpressRoute Circuit.
2818	Value *[]ExpressRouteCircuitAuthorization `json:"value,omitempty"`
2819	// NextLink - The URL to get the next set of results.
2820	NextLink *string `json:"nextLink,omitempty"`
2821}
2822
2823// AuthorizationListResultIterator provides access to a complete listing of
2824// ExpressRouteCircuitAuthorization values.
2825type AuthorizationListResultIterator struct {
2826	i    int
2827	page AuthorizationListResultPage
2828}
2829
2830// NextWithContext advances to the next value.  If there was an error making
2831// the request the iterator does not advance and the error is returned.
2832func (iter *AuthorizationListResultIterator) NextWithContext(ctx context.Context) (err error) {
2833	if tracing.IsEnabled() {
2834		ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultIterator.NextWithContext")
2835		defer func() {
2836			sc := -1
2837			if iter.Response().Response.Response != nil {
2838				sc = iter.Response().Response.Response.StatusCode
2839			}
2840			tracing.EndSpan(ctx, sc, err)
2841		}()
2842	}
2843	iter.i++
2844	if iter.i < len(iter.page.Values()) {
2845		return nil
2846	}
2847	err = iter.page.NextWithContext(ctx)
2848	if err != nil {
2849		iter.i--
2850		return err
2851	}
2852	iter.i = 0
2853	return nil
2854}
2855
2856// Next advances to the next value.  If there was an error making
2857// the request the iterator does not advance and the error is returned.
2858// Deprecated: Use NextWithContext() instead.
2859func (iter *AuthorizationListResultIterator) Next() error {
2860	return iter.NextWithContext(context.Background())
2861}
2862
2863// NotDone returns true if the enumeration should be started or is not yet complete.
2864func (iter AuthorizationListResultIterator) NotDone() bool {
2865	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2866}
2867
2868// Response returns the raw server response from the last page request.
2869func (iter AuthorizationListResultIterator) Response() AuthorizationListResult {
2870	return iter.page.Response()
2871}
2872
2873// Value returns the current value or a zero-initialized value if the
2874// iterator has advanced beyond the end of the collection.
2875func (iter AuthorizationListResultIterator) Value() ExpressRouteCircuitAuthorization {
2876	if !iter.page.NotDone() {
2877		return ExpressRouteCircuitAuthorization{}
2878	}
2879	return iter.page.Values()[iter.i]
2880}
2881
2882// Creates a new instance of the AuthorizationListResultIterator type.
2883func NewAuthorizationListResultIterator(page AuthorizationListResultPage) AuthorizationListResultIterator {
2884	return AuthorizationListResultIterator{page: page}
2885}
2886
2887// IsEmpty returns true if the ListResult contains no values.
2888func (alr AuthorizationListResult) IsEmpty() bool {
2889	return alr.Value == nil || len(*alr.Value) == 0
2890}
2891
2892// hasNextLink returns true if the NextLink is not empty.
2893func (alr AuthorizationListResult) hasNextLink() bool {
2894	return alr.NextLink != nil && len(*alr.NextLink) != 0
2895}
2896
2897// authorizationListResultPreparer prepares a request to retrieve the next set of results.
2898// It returns nil if no more results exist.
2899func (alr AuthorizationListResult) authorizationListResultPreparer(ctx context.Context) (*http.Request, error) {
2900	if !alr.hasNextLink() {
2901		return nil, nil
2902	}
2903	return autorest.Prepare((&http.Request{}).WithContext(ctx),
2904		autorest.AsJSON(),
2905		autorest.AsGet(),
2906		autorest.WithBaseURL(to.String(alr.NextLink)))
2907}
2908
2909// AuthorizationListResultPage contains a page of ExpressRouteCircuitAuthorization values.
2910type AuthorizationListResultPage struct {
2911	fn  func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)
2912	alr AuthorizationListResult
2913}
2914
2915// NextWithContext advances to the next page of values.  If there was an error making
2916// the request the page does not advance and the error is returned.
2917func (page *AuthorizationListResultPage) NextWithContext(ctx context.Context) (err error) {
2918	if tracing.IsEnabled() {
2919		ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultPage.NextWithContext")
2920		defer func() {
2921			sc := -1
2922			if page.Response().Response.Response != nil {
2923				sc = page.Response().Response.Response.StatusCode
2924			}
2925			tracing.EndSpan(ctx, sc, err)
2926		}()
2927	}
2928	for {
2929		next, err := page.fn(ctx, page.alr)
2930		if err != nil {
2931			return err
2932		}
2933		page.alr = next
2934		if !next.hasNextLink() || !next.IsEmpty() {
2935			break
2936		}
2937	}
2938	return nil
2939}
2940
2941// Next advances to the next page of values.  If there was an error making
2942// the request the page does not advance and the error is returned.
2943// Deprecated: Use NextWithContext() instead.
2944func (page *AuthorizationListResultPage) Next() error {
2945	return page.NextWithContext(context.Background())
2946}
2947
2948// NotDone returns true if the page enumeration should be started or is not yet complete.
2949func (page AuthorizationListResultPage) NotDone() bool {
2950	return !page.alr.IsEmpty()
2951}
2952
2953// Response returns the raw server response from the last page request.
2954func (page AuthorizationListResultPage) Response() AuthorizationListResult {
2955	return page.alr
2956}
2957
2958// Values returns the slice of values for the current page or nil if there are no values.
2959func (page AuthorizationListResultPage) Values() []ExpressRouteCircuitAuthorization {
2960	if page.alr.IsEmpty() {
2961		return nil
2962	}
2963	return *page.alr.Value
2964}
2965
2966// Creates a new instance of the AuthorizationListResultPage type.
2967func NewAuthorizationListResultPage(cur AuthorizationListResult, getNextPage func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)) AuthorizationListResultPage {
2968	return AuthorizationListResultPage{
2969		fn:  getNextPage,
2970		alr: cur,
2971	}
2972}
2973
2974// AuthorizationPropertiesFormat ...
2975type AuthorizationPropertiesFormat struct {
2976	// AuthorizationKey - The authorization key.
2977	AuthorizationKey *string `json:"authorizationKey,omitempty"`
2978	// AuthorizationUseStatus - AuthorizationUseStatus. Possible values are: 'Available' and 'InUse'. Possible values include: 'Available', 'InUse'
2979	AuthorizationUseStatus AuthorizationUseStatus `json:"authorizationUseStatus,omitempty"`
2980	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
2981	ProvisioningState *string `json:"provisioningState,omitempty"`
2982}
2983
2984// Availability availability of the metric.
2985type Availability struct {
2986	// TimeGrain - The time grain of the availability.
2987	TimeGrain *string `json:"timeGrain,omitempty"`
2988	// Retention - The retention of the availability.
2989	Retention *string `json:"retention,omitempty"`
2990	// BlobDuration - Duration of the availability blob.
2991	BlobDuration *string `json:"blobDuration,omitempty"`
2992}
2993
2994// AvailableProvidersList list of available countries with details.
2995type AvailableProvidersList struct {
2996	autorest.Response `json:"-"`
2997	// Countries - List of available countries.
2998	Countries *[]AvailableProvidersListCountry `json:"countries,omitempty"`
2999}
3000
3001// AvailableProvidersListCity city or town details.
3002type AvailableProvidersListCity struct {
3003	// CityName - The city or town name.
3004	CityName *string `json:"cityName,omitempty"`
3005	// Providers - A list of Internet service providers.
3006	Providers *[]string `json:"providers,omitempty"`
3007}
3008
3009// AvailableProvidersListCountry country details.
3010type AvailableProvidersListCountry struct {
3011	// CountryName - The country name.
3012	CountryName *string `json:"countryName,omitempty"`
3013	// Providers - A list of Internet service providers.
3014	Providers *[]string `json:"providers,omitempty"`
3015	// States - List of available states in the country.
3016	States *[]AvailableProvidersListState `json:"states,omitempty"`
3017}
3018
3019// AvailableProvidersListParameters constraints that determine the list of available Internet service
3020// providers.
3021type AvailableProvidersListParameters struct {
3022	// AzureLocations - A list of Azure regions.
3023	AzureLocations *[]string `json:"azureLocations,omitempty"`
3024	// Country - The country for available providers list.
3025	Country *string `json:"country,omitempty"`
3026	// State - The state for available providers list.
3027	State *string `json:"state,omitempty"`
3028	// City - The city or town for available providers list.
3029	City *string `json:"city,omitempty"`
3030}
3031
3032// AvailableProvidersListState state details.
3033type AvailableProvidersListState struct {
3034	// StateName - The state name.
3035	StateName *string `json:"stateName,omitempty"`
3036	// Providers - A list of Internet service providers.
3037	Providers *[]string `json:"providers,omitempty"`
3038	// Cities - List of available cities or towns in the state.
3039	Cities *[]AvailableProvidersListCity `json:"cities,omitempty"`
3040}
3041
3042// AzureAsyncOperationResult the response body contains the status of the specified asynchronous operation,
3043// indicating whether it has succeeded, is in progress, or has failed. Note that this status is distinct
3044// from the HTTP status code returned for the Get Operation Status operation itself. If the asynchronous
3045// operation succeeded, the response body includes the HTTP status code for the successful request. If the
3046// asynchronous operation failed, the response body includes the HTTP status code for the failed request
3047// and error information regarding the failure.
3048type AzureAsyncOperationResult struct {
3049	// Status - Status of the Azure async operation. Possible values are: 'InProgress', 'Succeeded', and 'Failed'. Possible values include: 'OperationStatusInProgress', 'OperationStatusSucceeded', 'OperationStatusFailed'
3050	Status OperationStatus `json:"status,omitempty"`
3051	Error  *Error          `json:"error,omitempty"`
3052}
3053
3054// AzureReachabilityReport azure reachability report details.
3055type AzureReachabilityReport struct {
3056	autorest.Response `json:"-"`
3057	// AggregationLevel - The aggregation level of Azure reachability report. Can be Country, State or City.
3058	AggregationLevel *string                          `json:"aggregationLevel,omitempty"`
3059	ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"`
3060	// ReachabilityReport - List of Azure reachability report items.
3061	ReachabilityReport *[]AzureReachabilityReportItem `json:"reachabilityReport,omitempty"`
3062}
3063
3064// AzureReachabilityReportItem azure reachability report details for a given provider location.
3065type AzureReachabilityReportItem struct {
3066	// Provider - The Internet service provider.
3067	Provider *string `json:"provider,omitempty"`
3068	// AzureLocation - The Azure region.
3069	AzureLocation *string `json:"azureLocation,omitempty"`
3070	// Latencies - List of latency details for each of the time series.
3071	Latencies *[]AzureReachabilityReportLatencyInfo `json:"latencies,omitempty"`
3072}
3073
3074// AzureReachabilityReportLatencyInfo details on latency for a time series.
3075type AzureReachabilityReportLatencyInfo struct {
3076	// TimeStamp - The time stamp.
3077	TimeStamp *date.Time `json:"timeStamp,omitempty"`
3078	// Score - The relative latency score between 1 and 100, higher values indicating a faster connection.
3079	Score *int32 `json:"score,omitempty"`
3080}
3081
3082// AzureReachabilityReportLocation parameters that define a geographic location.
3083type AzureReachabilityReportLocation struct {
3084	// Country - The name of the country.
3085	Country *string `json:"country,omitempty"`
3086	// State - The name of the state.
3087	State *string `json:"state,omitempty"`
3088	// City - The name of the city or town.
3089	City *string `json:"city,omitempty"`
3090}
3091
3092// AzureReachabilityReportParameters geographic and time constraints for Azure reachability report.
3093type AzureReachabilityReportParameters struct {
3094	ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"`
3095	// Providers - List of Internet service providers.
3096	Providers *[]string `json:"providers,omitempty"`
3097	// AzureLocations - Optional Azure regions to scope the query to.
3098	AzureLocations *[]string `json:"azureLocations,omitempty"`
3099	// StartTime - The start time for the Azure reachability report.
3100	StartTime *date.Time `json:"startTime,omitempty"`
3101	// EndTime - The end time for the Azure reachability report.
3102	EndTime *date.Time `json:"endTime,omitempty"`
3103}
3104
3105// BackendAddressPool pool of backend IP addresses.
3106type BackendAddressPool struct {
3107	autorest.Response `json:"-"`
3108	// BackendAddressPoolPropertiesFormat - Properties of load balancer backend address pool.
3109	*BackendAddressPoolPropertiesFormat `json:"properties,omitempty"`
3110	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
3111	Name *string `json:"name,omitempty"`
3112	// Etag - A unique read-only string that changes whenever the resource is updated.
3113	Etag *string `json:"etag,omitempty"`
3114	// ID - Resource ID.
3115	ID *string `json:"id,omitempty"`
3116}
3117
3118// MarshalJSON is the custom marshaler for BackendAddressPool.
3119func (bap BackendAddressPool) MarshalJSON() ([]byte, error) {
3120	objectMap := make(map[string]interface{})
3121	if bap.BackendAddressPoolPropertiesFormat != nil {
3122		objectMap["properties"] = bap.BackendAddressPoolPropertiesFormat
3123	}
3124	if bap.Name != nil {
3125		objectMap["name"] = bap.Name
3126	}
3127	if bap.Etag != nil {
3128		objectMap["etag"] = bap.Etag
3129	}
3130	if bap.ID != nil {
3131		objectMap["id"] = bap.ID
3132	}
3133	return json.Marshal(objectMap)
3134}
3135
3136// UnmarshalJSON is the custom unmarshaler for BackendAddressPool struct.
3137func (bap *BackendAddressPool) UnmarshalJSON(body []byte) error {
3138	var m map[string]*json.RawMessage
3139	err := json.Unmarshal(body, &m)
3140	if err != nil {
3141		return err
3142	}
3143	for k, v := range m {
3144		switch k {
3145		case "properties":
3146			if v != nil {
3147				var backendAddressPoolPropertiesFormat BackendAddressPoolPropertiesFormat
3148				err = json.Unmarshal(*v, &backendAddressPoolPropertiesFormat)
3149				if err != nil {
3150					return err
3151				}
3152				bap.BackendAddressPoolPropertiesFormat = &backendAddressPoolPropertiesFormat
3153			}
3154		case "name":
3155			if v != nil {
3156				var name string
3157				err = json.Unmarshal(*v, &name)
3158				if err != nil {
3159					return err
3160				}
3161				bap.Name = &name
3162			}
3163		case "etag":
3164			if v != nil {
3165				var etag string
3166				err = json.Unmarshal(*v, &etag)
3167				if err != nil {
3168					return err
3169				}
3170				bap.Etag = &etag
3171			}
3172		case "id":
3173			if v != nil {
3174				var ID string
3175				err = json.Unmarshal(*v, &ID)
3176				if err != nil {
3177					return err
3178				}
3179				bap.ID = &ID
3180			}
3181		}
3182	}
3183
3184	return nil
3185}
3186
3187// BackendAddressPoolPropertiesFormat properties of the backend address pool.
3188type BackendAddressPoolPropertiesFormat struct {
3189	// BackendIPConfigurations - READ-ONLY; Gets collection of references to IP addresses defined in network interfaces.
3190	BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"`
3191	// LoadBalancingRules - READ-ONLY; Gets load balancing rules that use this backend address pool.
3192	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
3193	// OutboundNatRule - READ-ONLY; Gets outbound rules that use this backend address pool.
3194	OutboundNatRule *SubResource `json:"outboundNatRule,omitempty"`
3195	// ProvisioningState - Get provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
3196	ProvisioningState *string `json:"provisioningState,omitempty"`
3197}
3198
3199// MarshalJSON is the custom marshaler for BackendAddressPoolPropertiesFormat.
3200func (bappf BackendAddressPoolPropertiesFormat) MarshalJSON() ([]byte, error) {
3201	objectMap := make(map[string]interface{})
3202	if bappf.ProvisioningState != nil {
3203		objectMap["provisioningState"] = bappf.ProvisioningState
3204	}
3205	return json.Marshal(objectMap)
3206}
3207
3208// BGPCommunity contains bgp community information offered in Service Community resources.
3209type BGPCommunity struct {
3210	// ServiceSupportedRegion - The region which the service support. e.g. For O365, region is Global.
3211	ServiceSupportedRegion *string `json:"serviceSupportedRegion,omitempty"`
3212	// CommunityName - The name of the bgp community. e.g. Skype.
3213	CommunityName *string `json:"communityName,omitempty"`
3214	// CommunityValue - The value of the bgp community. For more information: https://docs.microsoft.com/en-us/azure/expressroute/expressroute-routing.
3215	CommunityValue *string `json:"communityValue,omitempty"`
3216	// CommunityPrefixes - The prefixes that the bgp community contains.
3217	CommunityPrefixes *[]string `json:"communityPrefixes,omitempty"`
3218	// IsAuthorizedToUse - Customer is authorized to use bgp community or not.
3219	IsAuthorizedToUse *bool `json:"isAuthorizedToUse,omitempty"`
3220	// ServiceGroup - The service group of the bgp community contains.
3221	ServiceGroup *string `json:"serviceGroup,omitempty"`
3222}
3223
3224// BgpPeerStatus BGP peer status details
3225type BgpPeerStatus struct {
3226	// LocalAddress - READ-ONLY; The virtual network gateway's local address
3227	LocalAddress *string `json:"localAddress,omitempty"`
3228	// Neighbor - READ-ONLY; The remote BGP peer
3229	Neighbor *string `json:"neighbor,omitempty"`
3230	// Asn - READ-ONLY; The autonomous system number of the remote BGP peer
3231	Asn *int32 `json:"asn,omitempty"`
3232	// State - READ-ONLY; The BGP peer state. Possible values include: 'BgpPeerStateUnknown', 'BgpPeerStateStopped', 'BgpPeerStateIdle', 'BgpPeerStateConnecting', 'BgpPeerStateConnected'
3233	State BgpPeerState `json:"state,omitempty"`
3234	// ConnectedDuration - READ-ONLY; For how long the peering has been up
3235	ConnectedDuration *string `json:"connectedDuration,omitempty"`
3236	// RoutesReceived - READ-ONLY; The number of routes learned from this peer
3237	RoutesReceived *int64 `json:"routesReceived,omitempty"`
3238	// MessagesSent - READ-ONLY; The number of BGP messages sent
3239	MessagesSent *int64 `json:"messagesSent,omitempty"`
3240	// MessagesReceived - READ-ONLY; The number of BGP messages received
3241	MessagesReceived *int64 `json:"messagesReceived,omitempty"`
3242}
3243
3244// BgpPeerStatusListResult response for list BGP peer status API service call
3245type BgpPeerStatusListResult struct {
3246	autorest.Response `json:"-"`
3247	// Value - List of BGP peers
3248	Value *[]BgpPeerStatus `json:"value,omitempty"`
3249}
3250
3251// BgpServiceCommunity service Community Properties.
3252type BgpServiceCommunity struct {
3253	*BgpServiceCommunityPropertiesFormat `json:"properties,omitempty"`
3254	// ID - Resource ID.
3255	ID *string `json:"id,omitempty"`
3256	// Name - READ-ONLY; Resource name.
3257	Name *string `json:"name,omitempty"`
3258	// Type - READ-ONLY; Resource type.
3259	Type *string `json:"type,omitempty"`
3260	// Location - Resource location.
3261	Location *string `json:"location,omitempty"`
3262	// Tags - Resource tags.
3263	Tags map[string]*string `json:"tags"`
3264}
3265
3266// MarshalJSON is the custom marshaler for BgpServiceCommunity.
3267func (bsc BgpServiceCommunity) MarshalJSON() ([]byte, error) {
3268	objectMap := make(map[string]interface{})
3269	if bsc.BgpServiceCommunityPropertiesFormat != nil {
3270		objectMap["properties"] = bsc.BgpServiceCommunityPropertiesFormat
3271	}
3272	if bsc.ID != nil {
3273		objectMap["id"] = bsc.ID
3274	}
3275	if bsc.Location != nil {
3276		objectMap["location"] = bsc.Location
3277	}
3278	if bsc.Tags != nil {
3279		objectMap["tags"] = bsc.Tags
3280	}
3281	return json.Marshal(objectMap)
3282}
3283
3284// UnmarshalJSON is the custom unmarshaler for BgpServiceCommunity struct.
3285func (bsc *BgpServiceCommunity) UnmarshalJSON(body []byte) error {
3286	var m map[string]*json.RawMessage
3287	err := json.Unmarshal(body, &m)
3288	if err != nil {
3289		return err
3290	}
3291	for k, v := range m {
3292		switch k {
3293		case "properties":
3294			if v != nil {
3295				var bgpServiceCommunityPropertiesFormat BgpServiceCommunityPropertiesFormat
3296				err = json.Unmarshal(*v, &bgpServiceCommunityPropertiesFormat)
3297				if err != nil {
3298					return err
3299				}
3300				bsc.BgpServiceCommunityPropertiesFormat = &bgpServiceCommunityPropertiesFormat
3301			}
3302		case "id":
3303			if v != nil {
3304				var ID string
3305				err = json.Unmarshal(*v, &ID)
3306				if err != nil {
3307					return err
3308				}
3309				bsc.ID = &ID
3310			}
3311		case "name":
3312			if v != nil {
3313				var name string
3314				err = json.Unmarshal(*v, &name)
3315				if err != nil {
3316					return err
3317				}
3318				bsc.Name = &name
3319			}
3320		case "type":
3321			if v != nil {
3322				var typeVar string
3323				err = json.Unmarshal(*v, &typeVar)
3324				if err != nil {
3325					return err
3326				}
3327				bsc.Type = &typeVar
3328			}
3329		case "location":
3330			if v != nil {
3331				var location string
3332				err = json.Unmarshal(*v, &location)
3333				if err != nil {
3334					return err
3335				}
3336				bsc.Location = &location
3337			}
3338		case "tags":
3339			if v != nil {
3340				var tags map[string]*string
3341				err = json.Unmarshal(*v, &tags)
3342				if err != nil {
3343					return err
3344				}
3345				bsc.Tags = tags
3346			}
3347		}
3348	}
3349
3350	return nil
3351}
3352
3353// BgpServiceCommunityListResult response for the ListServiceCommunity API service call.
3354type BgpServiceCommunityListResult struct {
3355	autorest.Response `json:"-"`
3356	// Value - A list of service community resources.
3357	Value *[]BgpServiceCommunity `json:"value,omitempty"`
3358	// NextLink - The URL to get the next set of results.
3359	NextLink *string `json:"nextLink,omitempty"`
3360}
3361
3362// BgpServiceCommunityListResultIterator provides access to a complete listing of BgpServiceCommunity
3363// values.
3364type BgpServiceCommunityListResultIterator struct {
3365	i    int
3366	page BgpServiceCommunityListResultPage
3367}
3368
3369// NextWithContext advances to the next value.  If there was an error making
3370// the request the iterator does not advance and the error is returned.
3371func (iter *BgpServiceCommunityListResultIterator) NextWithContext(ctx context.Context) (err error) {
3372	if tracing.IsEnabled() {
3373		ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultIterator.NextWithContext")
3374		defer func() {
3375			sc := -1
3376			if iter.Response().Response.Response != nil {
3377				sc = iter.Response().Response.Response.StatusCode
3378			}
3379			tracing.EndSpan(ctx, sc, err)
3380		}()
3381	}
3382	iter.i++
3383	if iter.i < len(iter.page.Values()) {
3384		return nil
3385	}
3386	err = iter.page.NextWithContext(ctx)
3387	if err != nil {
3388		iter.i--
3389		return err
3390	}
3391	iter.i = 0
3392	return nil
3393}
3394
3395// Next advances to the next value.  If there was an error making
3396// the request the iterator does not advance and the error is returned.
3397// Deprecated: Use NextWithContext() instead.
3398func (iter *BgpServiceCommunityListResultIterator) Next() error {
3399	return iter.NextWithContext(context.Background())
3400}
3401
3402// NotDone returns true if the enumeration should be started or is not yet complete.
3403func (iter BgpServiceCommunityListResultIterator) NotDone() bool {
3404	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3405}
3406
3407// Response returns the raw server response from the last page request.
3408func (iter BgpServiceCommunityListResultIterator) Response() BgpServiceCommunityListResult {
3409	return iter.page.Response()
3410}
3411
3412// Value returns the current value or a zero-initialized value if the
3413// iterator has advanced beyond the end of the collection.
3414func (iter BgpServiceCommunityListResultIterator) Value() BgpServiceCommunity {
3415	if !iter.page.NotDone() {
3416		return BgpServiceCommunity{}
3417	}
3418	return iter.page.Values()[iter.i]
3419}
3420
3421// Creates a new instance of the BgpServiceCommunityListResultIterator type.
3422func NewBgpServiceCommunityListResultIterator(page BgpServiceCommunityListResultPage) BgpServiceCommunityListResultIterator {
3423	return BgpServiceCommunityListResultIterator{page: page}
3424}
3425
3426// IsEmpty returns true if the ListResult contains no values.
3427func (bsclr BgpServiceCommunityListResult) IsEmpty() bool {
3428	return bsclr.Value == nil || len(*bsclr.Value) == 0
3429}
3430
3431// hasNextLink returns true if the NextLink is not empty.
3432func (bsclr BgpServiceCommunityListResult) hasNextLink() bool {
3433	return bsclr.NextLink != nil && len(*bsclr.NextLink) != 0
3434}
3435
3436// bgpServiceCommunityListResultPreparer prepares a request to retrieve the next set of results.
3437// It returns nil if no more results exist.
3438func (bsclr BgpServiceCommunityListResult) bgpServiceCommunityListResultPreparer(ctx context.Context) (*http.Request, error) {
3439	if !bsclr.hasNextLink() {
3440		return nil, nil
3441	}
3442	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3443		autorest.AsJSON(),
3444		autorest.AsGet(),
3445		autorest.WithBaseURL(to.String(bsclr.NextLink)))
3446}
3447
3448// BgpServiceCommunityListResultPage contains a page of BgpServiceCommunity values.
3449type BgpServiceCommunityListResultPage struct {
3450	fn    func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)
3451	bsclr BgpServiceCommunityListResult
3452}
3453
3454// NextWithContext advances to the next page of values.  If there was an error making
3455// the request the page does not advance and the error is returned.
3456func (page *BgpServiceCommunityListResultPage) NextWithContext(ctx context.Context) (err error) {
3457	if tracing.IsEnabled() {
3458		ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultPage.NextWithContext")
3459		defer func() {
3460			sc := -1
3461			if page.Response().Response.Response != nil {
3462				sc = page.Response().Response.Response.StatusCode
3463			}
3464			tracing.EndSpan(ctx, sc, err)
3465		}()
3466	}
3467	for {
3468		next, err := page.fn(ctx, page.bsclr)
3469		if err != nil {
3470			return err
3471		}
3472		page.bsclr = next
3473		if !next.hasNextLink() || !next.IsEmpty() {
3474			break
3475		}
3476	}
3477	return nil
3478}
3479
3480// Next advances to the next page of values.  If there was an error making
3481// the request the page does not advance and the error is returned.
3482// Deprecated: Use NextWithContext() instead.
3483func (page *BgpServiceCommunityListResultPage) Next() error {
3484	return page.NextWithContext(context.Background())
3485}
3486
3487// NotDone returns true if the page enumeration should be started or is not yet complete.
3488func (page BgpServiceCommunityListResultPage) NotDone() bool {
3489	return !page.bsclr.IsEmpty()
3490}
3491
3492// Response returns the raw server response from the last page request.
3493func (page BgpServiceCommunityListResultPage) Response() BgpServiceCommunityListResult {
3494	return page.bsclr
3495}
3496
3497// Values returns the slice of values for the current page or nil if there are no values.
3498func (page BgpServiceCommunityListResultPage) Values() []BgpServiceCommunity {
3499	if page.bsclr.IsEmpty() {
3500		return nil
3501	}
3502	return *page.bsclr.Value
3503}
3504
3505// Creates a new instance of the BgpServiceCommunityListResultPage type.
3506func NewBgpServiceCommunityListResultPage(cur BgpServiceCommunityListResult, getNextPage func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)) BgpServiceCommunityListResultPage {
3507	return BgpServiceCommunityListResultPage{
3508		fn:    getNextPage,
3509		bsclr: cur,
3510	}
3511}
3512
3513// BgpServiceCommunityPropertiesFormat properties of Service Community.
3514type BgpServiceCommunityPropertiesFormat struct {
3515	// ServiceName - The name of the bgp community. e.g. Skype.
3516	ServiceName *string `json:"serviceName,omitempty"`
3517	// BgpCommunities - Get a list of bgp communities.
3518	BgpCommunities *[]BGPCommunity `json:"bgpCommunities,omitempty"`
3519}
3520
3521// BgpSettings BGP settings details
3522type BgpSettings struct {
3523	// Asn - The BGP speaker's ASN.
3524	Asn *int64 `json:"asn,omitempty"`
3525	// BgpPeeringAddress - The BGP peering address and BGP identifier of this BGP speaker.
3526	BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"`
3527	// PeerWeight - The weight added to routes learned from this BGP speaker.
3528	PeerWeight *int32 `json:"peerWeight,omitempty"`
3529}
3530
3531// ConnectionMonitor parameters that define the operation to create a connection monitor.
3532type ConnectionMonitor struct {
3533	// Location - Connection monitor location.
3534	Location *string `json:"location,omitempty"`
3535	// Tags - Connection monitor tags.
3536	Tags                         map[string]*string `json:"tags"`
3537	*ConnectionMonitorParameters `json:"properties,omitempty"`
3538}
3539
3540// MarshalJSON is the custom marshaler for ConnectionMonitor.
3541func (cm ConnectionMonitor) MarshalJSON() ([]byte, error) {
3542	objectMap := make(map[string]interface{})
3543	if cm.Location != nil {
3544		objectMap["location"] = cm.Location
3545	}
3546	if cm.Tags != nil {
3547		objectMap["tags"] = cm.Tags
3548	}
3549	if cm.ConnectionMonitorParameters != nil {
3550		objectMap["properties"] = cm.ConnectionMonitorParameters
3551	}
3552	return json.Marshal(objectMap)
3553}
3554
3555// UnmarshalJSON is the custom unmarshaler for ConnectionMonitor struct.
3556func (cm *ConnectionMonitor) UnmarshalJSON(body []byte) error {
3557	var m map[string]*json.RawMessage
3558	err := json.Unmarshal(body, &m)
3559	if err != nil {
3560		return err
3561	}
3562	for k, v := range m {
3563		switch k {
3564		case "location":
3565			if v != nil {
3566				var location string
3567				err = json.Unmarshal(*v, &location)
3568				if err != nil {
3569					return err
3570				}
3571				cm.Location = &location
3572			}
3573		case "tags":
3574			if v != nil {
3575				var tags map[string]*string
3576				err = json.Unmarshal(*v, &tags)
3577				if err != nil {
3578					return err
3579				}
3580				cm.Tags = tags
3581			}
3582		case "properties":
3583			if v != nil {
3584				var connectionMonitorParameters ConnectionMonitorParameters
3585				err = json.Unmarshal(*v, &connectionMonitorParameters)
3586				if err != nil {
3587					return err
3588				}
3589				cm.ConnectionMonitorParameters = &connectionMonitorParameters
3590			}
3591		}
3592	}
3593
3594	return nil
3595}
3596
3597// ConnectionMonitorDestination describes the destination of connection monitor.
3598type ConnectionMonitorDestination struct {
3599	// ResourceID - The ID of the resource used as the destination by connection monitor.
3600	ResourceID *string `json:"resourceId,omitempty"`
3601	// Address - Address of the connection monitor destination (IP or domain name).
3602	Address *string `json:"address,omitempty"`
3603	// Port - The destination port used by connection monitor.
3604	Port *int32 `json:"port,omitempty"`
3605}
3606
3607// ConnectionMonitorListResult list of connection monitors.
3608type ConnectionMonitorListResult struct {
3609	autorest.Response `json:"-"`
3610	// Value - Information about connection monitors.
3611	Value *[]ConnectionMonitorResult `json:"value,omitempty"`
3612}
3613
3614// ConnectionMonitorParameters parameters that define the operation to create a connection monitor.
3615type ConnectionMonitorParameters struct {
3616	Source      *ConnectionMonitorSource      `json:"source,omitempty"`
3617	Destination *ConnectionMonitorDestination `json:"destination,omitempty"`
3618	// AutoStart - Determines if the connection monitor will start automatically once created.
3619	AutoStart *bool `json:"autoStart,omitempty"`
3620	// MonitoringIntervalInSeconds - Monitoring interval in seconds.
3621	MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"`
3622}
3623
3624// ConnectionMonitorQueryResult list of connection states snapshots.
3625type ConnectionMonitorQueryResult struct {
3626	autorest.Response `json:"-"`
3627	// States - Information about connection states.
3628	States *[]ConnectionStateSnapshot `json:"states,omitempty"`
3629}
3630
3631// ConnectionMonitorResult information about the connection monitor.
3632type ConnectionMonitorResult struct {
3633	autorest.Response `json:"-"`
3634	// Name - READ-ONLY; Name of the connection monitor.
3635	Name *string `json:"name,omitempty"`
3636	// ID - READ-ONLY; ID of the connection monitor.
3637	ID   *string `json:"id,omitempty"`
3638	Etag *string `json:"etag,omitempty"`
3639	// Type - READ-ONLY; Connection monitor type.
3640	Type *string `json:"type,omitempty"`
3641	// Location - Connection monitor location.
3642	Location *string `json:"location,omitempty"`
3643	// Tags - Connection monitor tags.
3644	Tags                               map[string]*string `json:"tags"`
3645	*ConnectionMonitorResultProperties `json:"properties,omitempty"`
3646}
3647
3648// MarshalJSON is the custom marshaler for ConnectionMonitorResult.
3649func (cmr ConnectionMonitorResult) MarshalJSON() ([]byte, error) {
3650	objectMap := make(map[string]interface{})
3651	if cmr.Etag != nil {
3652		objectMap["etag"] = cmr.Etag
3653	}
3654	if cmr.Location != nil {
3655		objectMap["location"] = cmr.Location
3656	}
3657	if cmr.Tags != nil {
3658		objectMap["tags"] = cmr.Tags
3659	}
3660	if cmr.ConnectionMonitorResultProperties != nil {
3661		objectMap["properties"] = cmr.ConnectionMonitorResultProperties
3662	}
3663	return json.Marshal(objectMap)
3664}
3665
3666// UnmarshalJSON is the custom unmarshaler for ConnectionMonitorResult struct.
3667func (cmr *ConnectionMonitorResult) UnmarshalJSON(body []byte) error {
3668	var m map[string]*json.RawMessage
3669	err := json.Unmarshal(body, &m)
3670	if err != nil {
3671		return err
3672	}
3673	for k, v := range m {
3674		switch k {
3675		case "name":
3676			if v != nil {
3677				var name string
3678				err = json.Unmarshal(*v, &name)
3679				if err != nil {
3680					return err
3681				}
3682				cmr.Name = &name
3683			}
3684		case "id":
3685			if v != nil {
3686				var ID string
3687				err = json.Unmarshal(*v, &ID)
3688				if err != nil {
3689					return err
3690				}
3691				cmr.ID = &ID
3692			}
3693		case "etag":
3694			if v != nil {
3695				var etag string
3696				err = json.Unmarshal(*v, &etag)
3697				if err != nil {
3698					return err
3699				}
3700				cmr.Etag = &etag
3701			}
3702		case "type":
3703			if v != nil {
3704				var typeVar string
3705				err = json.Unmarshal(*v, &typeVar)
3706				if err != nil {
3707					return err
3708				}
3709				cmr.Type = &typeVar
3710			}
3711		case "location":
3712			if v != nil {
3713				var location string
3714				err = json.Unmarshal(*v, &location)
3715				if err != nil {
3716					return err
3717				}
3718				cmr.Location = &location
3719			}
3720		case "tags":
3721			if v != nil {
3722				var tags map[string]*string
3723				err = json.Unmarshal(*v, &tags)
3724				if err != nil {
3725					return err
3726				}
3727				cmr.Tags = tags
3728			}
3729		case "properties":
3730			if v != nil {
3731				var connectionMonitorResultProperties ConnectionMonitorResultProperties
3732				err = json.Unmarshal(*v, &connectionMonitorResultProperties)
3733				if err != nil {
3734					return err
3735				}
3736				cmr.ConnectionMonitorResultProperties = &connectionMonitorResultProperties
3737			}
3738		}
3739	}
3740
3741	return nil
3742}
3743
3744// ConnectionMonitorResultProperties describes the properties of a connection monitor.
3745type ConnectionMonitorResultProperties struct {
3746	// ProvisioningState - The provisioning state of the connection monitor. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
3747	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
3748	// StartTime - The date and time when the connection monitor was started.
3749	StartTime *date.Time `json:"startTime,omitempty"`
3750	// MonitoringStatus - The monitoring status of the connection monitor.
3751	MonitoringStatus *string                       `json:"monitoringStatus,omitempty"`
3752	Source           *ConnectionMonitorSource      `json:"source,omitempty"`
3753	Destination      *ConnectionMonitorDestination `json:"destination,omitempty"`
3754	// AutoStart - Determines if the connection monitor will start automatically once created.
3755	AutoStart *bool `json:"autoStart,omitempty"`
3756	// MonitoringIntervalInSeconds - Monitoring interval in seconds.
3757	MonitoringIntervalInSeconds *int32 `json:"monitoringIntervalInSeconds,omitempty"`
3758}
3759
3760// ConnectionMonitorsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
3761// long-running operation.
3762type ConnectionMonitorsCreateOrUpdateFuture struct {
3763	azure.FutureAPI
3764	// Result returns the result of the asynchronous operation.
3765	// If the operation has not completed it will return an error.
3766	Result func(ConnectionMonitorsClient) (ConnectionMonitorResult, error)
3767}
3768
3769// ConnectionMonitorsDeleteFuture an abstraction for monitoring and retrieving the results of a
3770// long-running operation.
3771type ConnectionMonitorsDeleteFuture struct {
3772	azure.FutureAPI
3773	// Result returns the result of the asynchronous operation.
3774	// If the operation has not completed it will return an error.
3775	Result func(ConnectionMonitorsClient) (autorest.Response, error)
3776}
3777
3778// ConnectionMonitorSource describes the source of connection monitor.
3779type ConnectionMonitorSource struct {
3780	// ResourceID - The ID of the resource used as the source by connection monitor.
3781	ResourceID *string `json:"resourceId,omitempty"`
3782	// Port - The source port used by connection monitor.
3783	Port *int32 `json:"port,omitempty"`
3784}
3785
3786// ConnectionMonitorsQueryFuture an abstraction for monitoring and retrieving the results of a long-running
3787// operation.
3788type ConnectionMonitorsQueryFuture struct {
3789	azure.FutureAPI
3790	// Result returns the result of the asynchronous operation.
3791	// If the operation has not completed it will return an error.
3792	Result func(ConnectionMonitorsClient) (ConnectionMonitorQueryResult, error)
3793}
3794
3795// ConnectionMonitorsStartFuture an abstraction for monitoring and retrieving the results of a long-running
3796// operation.
3797type ConnectionMonitorsStartFuture struct {
3798	azure.FutureAPI
3799	// Result returns the result of the asynchronous operation.
3800	// If the operation has not completed it will return an error.
3801	Result func(ConnectionMonitorsClient) (autorest.Response, error)
3802}
3803
3804// ConnectionMonitorsStopFuture an abstraction for monitoring and retrieving the results of a long-running
3805// operation.
3806type ConnectionMonitorsStopFuture struct {
3807	azure.FutureAPI
3808	// Result returns the result of the asynchronous operation.
3809	// If the operation has not completed it will return an error.
3810	Result func(ConnectionMonitorsClient) (autorest.Response, error)
3811}
3812
3813// ConnectionResetSharedKey the virtual network connection reset shared key
3814type ConnectionResetSharedKey struct {
3815	autorest.Response `json:"-"`
3816	// KeyLength - The virtual network connection reset shared key length, should between 1 and 128.
3817	KeyLength *int32 `json:"keyLength,omitempty"`
3818}
3819
3820// ConnectionSharedKey response for GetConnectionSharedKey API service call
3821type ConnectionSharedKey struct {
3822	autorest.Response `json:"-"`
3823	// Value - The virtual network connection shared key value.
3824	Value *string `json:"value,omitempty"`
3825}
3826
3827// ConnectionStateSnapshot connection state snapshot.
3828type ConnectionStateSnapshot struct {
3829	// ConnectionState - The connection state. Possible values include: 'ConnectionStateReachable', 'ConnectionStateUnreachable', 'ConnectionStateUnknown'
3830	ConnectionState ConnectionState `json:"connectionState,omitempty"`
3831	// StartTime - The start time of the connection snapshot.
3832	StartTime *date.Time `json:"startTime,omitempty"`
3833	// EndTime - The end time of the connection snapshot.
3834	EndTime *date.Time `json:"endTime,omitempty"`
3835	// EvaluationState - Connectivity analysis evaluation state. Possible values include: 'NotStarted', 'InProgress', 'Completed'
3836	EvaluationState EvaluationState `json:"evaluationState,omitempty"`
3837	// Hops - READ-ONLY; List of hops between the source and the destination.
3838	Hops *[]ConnectivityHop `json:"hops,omitempty"`
3839}
3840
3841// MarshalJSON is the custom marshaler for ConnectionStateSnapshot.
3842func (CSS ConnectionStateSnapshot) MarshalJSON() ([]byte, error) {
3843	objectMap := make(map[string]interface{})
3844	if CSS.ConnectionState != "" {
3845		objectMap["connectionState"] = CSS.ConnectionState
3846	}
3847	if CSS.StartTime != nil {
3848		objectMap["startTime"] = CSS.StartTime
3849	}
3850	if CSS.EndTime != nil {
3851		objectMap["endTime"] = CSS.EndTime
3852	}
3853	if CSS.EvaluationState != "" {
3854		objectMap["evaluationState"] = CSS.EvaluationState
3855	}
3856	return json.Marshal(objectMap)
3857}
3858
3859// ConnectivityDestination parameters that define destination of connection.
3860type ConnectivityDestination struct {
3861	// ResourceID - The ID of the resource to which a connection attempt will be made.
3862	ResourceID *string `json:"resourceId,omitempty"`
3863	// Address - The IP address or URI the resource to which a connection attempt will be made.
3864	Address *string `json:"address,omitempty"`
3865	// Port - Port on which check connectivity will be performed.
3866	Port *int32 `json:"port,omitempty"`
3867}
3868
3869// ConnectivityHop information about a hop between the source and the destination.
3870type ConnectivityHop struct {
3871	// Type - READ-ONLY; The type of the hop.
3872	Type *string `json:"type,omitempty"`
3873	// ID - READ-ONLY; The ID of the hop.
3874	ID *string `json:"id,omitempty"`
3875	// Address - READ-ONLY; The IP address of the hop.
3876	Address *string `json:"address,omitempty"`
3877	// ResourceID - READ-ONLY; The ID of the resource corresponding to this hop.
3878	ResourceID *string `json:"resourceId,omitempty"`
3879	// NextHopIds - READ-ONLY; List of next hop identifiers.
3880	NextHopIds *[]string `json:"nextHopIds,omitempty"`
3881	// Issues - READ-ONLY; List of issues.
3882	Issues *[]ConnectivityIssue `json:"issues,omitempty"`
3883}
3884
3885// ConnectivityInformation information on the connectivity status.
3886type ConnectivityInformation struct {
3887	autorest.Response `json:"-"`
3888	// Hops - READ-ONLY; List of hops between the source and the destination.
3889	Hops *[]ConnectivityHop `json:"hops,omitempty"`
3890	// ConnectionStatus - READ-ONLY; The connection status. Possible values include: 'ConnectionStatusUnknown', 'ConnectionStatusConnected', 'ConnectionStatusDisconnected', 'ConnectionStatusDegraded'
3891	ConnectionStatus ConnectionStatus `json:"connectionStatus,omitempty"`
3892	// AvgLatencyInMs - READ-ONLY; Average latency in milliseconds.
3893	AvgLatencyInMs *int32 `json:"avgLatencyInMs,omitempty"`
3894	// MinLatencyInMs - READ-ONLY; Minimum latency in milliseconds.
3895	MinLatencyInMs *int32 `json:"minLatencyInMs,omitempty"`
3896	// MaxLatencyInMs - READ-ONLY; Maximum latency in milliseconds.
3897	MaxLatencyInMs *int32 `json:"maxLatencyInMs,omitempty"`
3898	// ProbesSent - READ-ONLY; Total number of probes sent.
3899	ProbesSent *int32 `json:"probesSent,omitempty"`
3900	// ProbesFailed - READ-ONLY; Number of failed probes.
3901	ProbesFailed *int32 `json:"probesFailed,omitempty"`
3902}
3903
3904// ConnectivityIssue information about an issue encountered in the process of checking for connectivity.
3905type ConnectivityIssue struct {
3906	// Origin - READ-ONLY; The origin of the issue. Possible values include: 'OriginLocal', 'OriginInbound', 'OriginOutbound'
3907	Origin Origin `json:"origin,omitempty"`
3908	// Severity - READ-ONLY; The severity of the issue. Possible values include: 'SeverityError', 'SeverityWarning'
3909	Severity Severity `json:"severity,omitempty"`
3910	// Type - READ-ONLY; The type of issue. Possible values include: 'IssueTypeUnknown', 'IssueTypeAgentStopped', 'IssueTypeGuestFirewall', 'IssueTypeDNSResolution', 'IssueTypeSocketBind', 'IssueTypeNetworkSecurityRule', 'IssueTypeUserDefinedRoute', 'IssueTypePortThrottled', 'IssueTypePlatform'
3911	Type IssueType `json:"type,omitempty"`
3912	// Context - READ-ONLY; Provides additional context on the issue.
3913	Context *[]map[string]*string `json:"context,omitempty"`
3914}
3915
3916// ConnectivityParameters parameters that determine how the connectivity check will be performed.
3917type ConnectivityParameters struct {
3918	Source      *ConnectivitySource      `json:"source,omitempty"`
3919	Destination *ConnectivityDestination `json:"destination,omitempty"`
3920}
3921
3922// ConnectivitySource parameters that define the source of the connection.
3923type ConnectivitySource struct {
3924	// ResourceID - The ID of the resource from which a connectivity check will be initiated.
3925	ResourceID *string `json:"resourceId,omitempty"`
3926	// Port - The source port from which a connectivity check will be performed.
3927	Port *int32 `json:"port,omitempty"`
3928}
3929
3930// DhcpOptions dhcpOptions contains an array of DNS servers available to VMs deployed in the virtual
3931// network. Standard DHCP option for a subnet overrides VNET DHCP options.
3932type DhcpOptions struct {
3933	// DNSServers - The list of DNS servers IP addresses.
3934	DNSServers *[]string `json:"dnsServers,omitempty"`
3935}
3936
3937// Dimension dimension of the metric.
3938type Dimension struct {
3939	// Name - The name of the dimension.
3940	Name *string `json:"name,omitempty"`
3941	// DisplayName - The display name of the dimension.
3942	DisplayName *string `json:"displayName,omitempty"`
3943	// InternalName - The internal name of the dimension.
3944	InternalName *string `json:"internalName,omitempty"`
3945}
3946
3947// DNSNameAvailabilityResult response for the CheckDnsNameAvailability API service call.
3948type DNSNameAvailabilityResult struct {
3949	autorest.Response `json:"-"`
3950	// Available - Domain availability (True/False).
3951	Available *bool `json:"available,omitempty"`
3952}
3953
3954// EffectiveNetworkSecurityGroup effective network security group.
3955type EffectiveNetworkSecurityGroup struct {
3956	// NetworkSecurityGroup - The ID of network security group that is applied.
3957	NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"`
3958	// Association - Associated resources.
3959	Association *EffectiveNetworkSecurityGroupAssociation `json:"association,omitempty"`
3960	// EffectiveSecurityRules - A collection of effective security rules.
3961	EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"`
3962	// TagMap - Mapping of tags to list of IP Addresses included within the tag.
3963	TagMap map[string][]string `json:"tagMap"`
3964}
3965
3966// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroup.
3967func (ensg EffectiveNetworkSecurityGroup) MarshalJSON() ([]byte, error) {
3968	objectMap := make(map[string]interface{})
3969	if ensg.NetworkSecurityGroup != nil {
3970		objectMap["networkSecurityGroup"] = ensg.NetworkSecurityGroup
3971	}
3972	if ensg.Association != nil {
3973		objectMap["association"] = ensg.Association
3974	}
3975	if ensg.EffectiveSecurityRules != nil {
3976		objectMap["effectiveSecurityRules"] = ensg.EffectiveSecurityRules
3977	}
3978	if ensg.TagMap != nil {
3979		objectMap["tagMap"] = ensg.TagMap
3980	}
3981	return json.Marshal(objectMap)
3982}
3983
3984// EffectiveNetworkSecurityGroupAssociation the effective network security group association.
3985type EffectiveNetworkSecurityGroupAssociation struct {
3986	// Subnet - The ID of the subnet if assigned.
3987	Subnet *SubResource `json:"subnet,omitempty"`
3988	// NetworkInterface - The ID of the network interface if assigned.
3989	NetworkInterface *SubResource `json:"networkInterface,omitempty"`
3990}
3991
3992// EffectiveNetworkSecurityGroupListResult response for list effective network security groups API service
3993// call.
3994type EffectiveNetworkSecurityGroupListResult struct {
3995	autorest.Response `json:"-"`
3996	// Value - A list of effective network security groups.
3997	Value *[]EffectiveNetworkSecurityGroup `json:"value,omitempty"`
3998	// NextLink - READ-ONLY; The URL to get the next set of results.
3999	NextLink *string `json:"nextLink,omitempty"`
4000}
4001
4002// MarshalJSON is the custom marshaler for EffectiveNetworkSecurityGroupListResult.
4003func (ensglr EffectiveNetworkSecurityGroupListResult) MarshalJSON() ([]byte, error) {
4004	objectMap := make(map[string]interface{})
4005	if ensglr.Value != nil {
4006		objectMap["value"] = ensglr.Value
4007	}
4008	return json.Marshal(objectMap)
4009}
4010
4011// EffectiveNetworkSecurityRule effective network security rules.
4012type EffectiveNetworkSecurityRule struct {
4013	// Name - The name of the security rule specified by the user (if created by the user).
4014	Name *string `json:"name,omitempty"`
4015	// Protocol - The network protocol this rule applies to. Possible values are: 'Tcp', 'Udp', and 'All'. Possible values include: 'TCP', 'UDP', 'All'
4016	Protocol EffectiveSecurityRuleProtocol `json:"protocol,omitempty"`
4017	// SourcePortRange - The source port or range.
4018	SourcePortRange *string `json:"sourcePortRange,omitempty"`
4019	// DestinationPortRange - The destination port or range.
4020	DestinationPortRange *string `json:"destinationPortRange,omitempty"`
4021	// 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 (*)
4022	SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"`
4023	// 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 (*)
4024	DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"`
4025	// SourceAddressPrefix - The source address prefix.
4026	SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
4027	// DestinationAddressPrefix - The destination address prefix.
4028	DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"`
4029	// SourceAddressPrefixes - The source address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*).
4030	SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"`
4031	// DestinationAddressPrefixes - The destination address prefixes. Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*).
4032	DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"`
4033	// ExpandedSourceAddressPrefix - The expanded source address prefix.
4034	ExpandedSourceAddressPrefix *[]string `json:"expandedSourceAddressPrefix,omitempty"`
4035	// ExpandedDestinationAddressPrefix - Expanded destination address prefix.
4036	ExpandedDestinationAddressPrefix *[]string `json:"expandedDestinationAddressPrefix,omitempty"`
4037	// Access - Whether network traffic is allowed or denied. Possible values are: 'Allow' and 'Deny'. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
4038	Access SecurityRuleAccess `json:"access,omitempty"`
4039	// Priority - The priority of the rule.
4040	Priority *int32 `json:"priority,omitempty"`
4041	// Direction - The direction of the rule. Possible values are: 'Inbound and Outbound'. Possible values include: 'SecurityRuleDirectionInbound', 'SecurityRuleDirectionOutbound'
4042	Direction SecurityRuleDirection `json:"direction,omitempty"`
4043}
4044
4045// EffectiveRoute effective Route
4046type EffectiveRoute struct {
4047	// Name - The name of the user defined route. This is optional.
4048	Name *string `json:"name,omitempty"`
4049	// Source - Who created the route. Possible values are: 'Unknown', 'User', 'VirtualNetworkGateway', and 'Default'. Possible values include: 'EffectiveRouteSourceUnknown', 'EffectiveRouteSourceUser', 'EffectiveRouteSourceVirtualNetworkGateway', 'EffectiveRouteSourceDefault'
4050	Source EffectiveRouteSource `json:"source,omitempty"`
4051	// State - The value of effective route. Possible values are: 'Active' and 'Invalid'. Possible values include: 'Active', 'Invalid'
4052	State EffectiveRouteState `json:"state,omitempty"`
4053	// AddressPrefix - The address prefixes of the effective routes in CIDR notation.
4054	AddressPrefix *[]string `json:"addressPrefix,omitempty"`
4055	// NextHopIPAddress - The IP address of the next hop of the effective route.
4056	NextHopIPAddress *[]string `json:"nextHopIpAddress,omitempty"`
4057	// 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'
4058	NextHopType RouteNextHopType `json:"nextHopType,omitempty"`
4059}
4060
4061// EffectiveRouteListResult response for list effective route API service call.
4062type EffectiveRouteListResult struct {
4063	autorest.Response `json:"-"`
4064	// Value - A list of effective routes.
4065	Value *[]EffectiveRoute `json:"value,omitempty"`
4066	// NextLink - READ-ONLY; The URL to get the next set of results.
4067	NextLink *string `json:"nextLink,omitempty"`
4068}
4069
4070// MarshalJSON is the custom marshaler for EffectiveRouteListResult.
4071func (erlr EffectiveRouteListResult) MarshalJSON() ([]byte, error) {
4072	objectMap := make(map[string]interface{})
4073	if erlr.Value != nil {
4074		objectMap["value"] = erlr.Value
4075	}
4076	return json.Marshal(objectMap)
4077}
4078
4079// EndpointServiceResult endpoint service.
4080type EndpointServiceResult struct {
4081	// Name - READ-ONLY; Name of the endpoint service.
4082	Name *string `json:"name,omitempty"`
4083	// Type - READ-ONLY; Type of the endpoint service.
4084	Type *string `json:"type,omitempty"`
4085	// ID - Resource ID.
4086	ID *string `json:"id,omitempty"`
4087}
4088
4089// MarshalJSON is the custom marshaler for EndpointServiceResult.
4090func (esr EndpointServiceResult) MarshalJSON() ([]byte, error) {
4091	objectMap := make(map[string]interface{})
4092	if esr.ID != nil {
4093		objectMap["id"] = esr.ID
4094	}
4095	return json.Marshal(objectMap)
4096}
4097
4098// EndpointServicesListResult response for the ListAvailableEndpointServices API service call.
4099type EndpointServicesListResult struct {
4100	autorest.Response `json:"-"`
4101	// Value - List of available endpoint services in a region.
4102	Value *[]EndpointServiceResult `json:"value,omitempty"`
4103	// NextLink - The URL to get the next set of results.
4104	NextLink *string `json:"nextLink,omitempty"`
4105}
4106
4107// EndpointServicesListResultIterator provides access to a complete listing of EndpointServiceResult
4108// values.
4109type EndpointServicesListResultIterator struct {
4110	i    int
4111	page EndpointServicesListResultPage
4112}
4113
4114// NextWithContext advances to the next value.  If there was an error making
4115// the request the iterator does not advance and the error is returned.
4116func (iter *EndpointServicesListResultIterator) NextWithContext(ctx context.Context) (err error) {
4117	if tracing.IsEnabled() {
4118		ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultIterator.NextWithContext")
4119		defer func() {
4120			sc := -1
4121			if iter.Response().Response.Response != nil {
4122				sc = iter.Response().Response.Response.StatusCode
4123			}
4124			tracing.EndSpan(ctx, sc, err)
4125		}()
4126	}
4127	iter.i++
4128	if iter.i < len(iter.page.Values()) {
4129		return nil
4130	}
4131	err = iter.page.NextWithContext(ctx)
4132	if err != nil {
4133		iter.i--
4134		return err
4135	}
4136	iter.i = 0
4137	return nil
4138}
4139
4140// Next advances to the next value.  If there was an error making
4141// the request the iterator does not advance and the error is returned.
4142// Deprecated: Use NextWithContext() instead.
4143func (iter *EndpointServicesListResultIterator) Next() error {
4144	return iter.NextWithContext(context.Background())
4145}
4146
4147// NotDone returns true if the enumeration should be started or is not yet complete.
4148func (iter EndpointServicesListResultIterator) NotDone() bool {
4149	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4150}
4151
4152// Response returns the raw server response from the last page request.
4153func (iter EndpointServicesListResultIterator) Response() EndpointServicesListResult {
4154	return iter.page.Response()
4155}
4156
4157// Value returns the current value or a zero-initialized value if the
4158// iterator has advanced beyond the end of the collection.
4159func (iter EndpointServicesListResultIterator) Value() EndpointServiceResult {
4160	if !iter.page.NotDone() {
4161		return EndpointServiceResult{}
4162	}
4163	return iter.page.Values()[iter.i]
4164}
4165
4166// Creates a new instance of the EndpointServicesListResultIterator type.
4167func NewEndpointServicesListResultIterator(page EndpointServicesListResultPage) EndpointServicesListResultIterator {
4168	return EndpointServicesListResultIterator{page: page}
4169}
4170
4171// IsEmpty returns true if the ListResult contains no values.
4172func (eslr EndpointServicesListResult) IsEmpty() bool {
4173	return eslr.Value == nil || len(*eslr.Value) == 0
4174}
4175
4176// hasNextLink returns true if the NextLink is not empty.
4177func (eslr EndpointServicesListResult) hasNextLink() bool {
4178	return eslr.NextLink != nil && len(*eslr.NextLink) != 0
4179}
4180
4181// endpointServicesListResultPreparer prepares a request to retrieve the next set of results.
4182// It returns nil if no more results exist.
4183func (eslr EndpointServicesListResult) endpointServicesListResultPreparer(ctx context.Context) (*http.Request, error) {
4184	if !eslr.hasNextLink() {
4185		return nil, nil
4186	}
4187	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4188		autorest.AsJSON(),
4189		autorest.AsGet(),
4190		autorest.WithBaseURL(to.String(eslr.NextLink)))
4191}
4192
4193// EndpointServicesListResultPage contains a page of EndpointServiceResult values.
4194type EndpointServicesListResultPage struct {
4195	fn   func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)
4196	eslr EndpointServicesListResult
4197}
4198
4199// NextWithContext advances to the next page of values.  If there was an error making
4200// the request the page does not advance and the error is returned.
4201func (page *EndpointServicesListResultPage) NextWithContext(ctx context.Context) (err error) {
4202	if tracing.IsEnabled() {
4203		ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultPage.NextWithContext")
4204		defer func() {
4205			sc := -1
4206			if page.Response().Response.Response != nil {
4207				sc = page.Response().Response.Response.StatusCode
4208			}
4209			tracing.EndSpan(ctx, sc, err)
4210		}()
4211	}
4212	for {
4213		next, err := page.fn(ctx, page.eslr)
4214		if err != nil {
4215			return err
4216		}
4217		page.eslr = next
4218		if !next.hasNextLink() || !next.IsEmpty() {
4219			break
4220		}
4221	}
4222	return nil
4223}
4224
4225// Next advances to the next page of values.  If there was an error making
4226// the request the page does not advance and the error is returned.
4227// Deprecated: Use NextWithContext() instead.
4228func (page *EndpointServicesListResultPage) Next() error {
4229	return page.NextWithContext(context.Background())
4230}
4231
4232// NotDone returns true if the page enumeration should be started or is not yet complete.
4233func (page EndpointServicesListResultPage) NotDone() bool {
4234	return !page.eslr.IsEmpty()
4235}
4236
4237// Response returns the raw server response from the last page request.
4238func (page EndpointServicesListResultPage) Response() EndpointServicesListResult {
4239	return page.eslr
4240}
4241
4242// Values returns the slice of values for the current page or nil if there are no values.
4243func (page EndpointServicesListResultPage) Values() []EndpointServiceResult {
4244	if page.eslr.IsEmpty() {
4245		return nil
4246	}
4247	return *page.eslr.Value
4248}
4249
4250// Creates a new instance of the EndpointServicesListResultPage type.
4251func NewEndpointServicesListResultPage(cur EndpointServicesListResult, getNextPage func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)) EndpointServicesListResultPage {
4252	return EndpointServicesListResultPage{
4253		fn:   getNextPage,
4254		eslr: cur,
4255	}
4256}
4257
4258// Error ...
4259type Error struct {
4260	Code       *string         `json:"code,omitempty"`
4261	Message    *string         `json:"message,omitempty"`
4262	Target     *string         `json:"target,omitempty"`
4263	Details    *[]ErrorDetails `json:"details,omitempty"`
4264	InnerError *string         `json:"innerError,omitempty"`
4265}
4266
4267// ErrorDetails ...
4268type ErrorDetails struct {
4269	Code    *string `json:"code,omitempty"`
4270	Target  *string `json:"target,omitempty"`
4271	Message *string `json:"message,omitempty"`
4272}
4273
4274// ExpressRouteCircuit expressRouteCircuit resource
4275type ExpressRouteCircuit struct {
4276	autorest.Response `json:"-"`
4277	// Sku - The SKU.
4278	Sku                                  *ExpressRouteCircuitSku `json:"sku,omitempty"`
4279	*ExpressRouteCircuitPropertiesFormat `json:"properties,omitempty"`
4280	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
4281	Etag *string `json:"etag,omitempty"`
4282	// ID - Resource ID.
4283	ID *string `json:"id,omitempty"`
4284	// Name - READ-ONLY; Resource name.
4285	Name *string `json:"name,omitempty"`
4286	// Type - READ-ONLY; Resource type.
4287	Type *string `json:"type,omitempty"`
4288	// Location - Resource location.
4289	Location *string `json:"location,omitempty"`
4290	// Tags - Resource tags.
4291	Tags map[string]*string `json:"tags"`
4292}
4293
4294// MarshalJSON is the custom marshaler for ExpressRouteCircuit.
4295func (erc ExpressRouteCircuit) MarshalJSON() ([]byte, error) {
4296	objectMap := make(map[string]interface{})
4297	if erc.Sku != nil {
4298		objectMap["sku"] = erc.Sku
4299	}
4300	if erc.ExpressRouteCircuitPropertiesFormat != nil {
4301		objectMap["properties"] = erc.ExpressRouteCircuitPropertiesFormat
4302	}
4303	if erc.ID != nil {
4304		objectMap["id"] = erc.ID
4305	}
4306	if erc.Location != nil {
4307		objectMap["location"] = erc.Location
4308	}
4309	if erc.Tags != nil {
4310		objectMap["tags"] = erc.Tags
4311	}
4312	return json.Marshal(objectMap)
4313}
4314
4315// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuit struct.
4316func (erc *ExpressRouteCircuit) UnmarshalJSON(body []byte) error {
4317	var m map[string]*json.RawMessage
4318	err := json.Unmarshal(body, &m)
4319	if err != nil {
4320		return err
4321	}
4322	for k, v := range m {
4323		switch k {
4324		case "sku":
4325			if v != nil {
4326				var sku ExpressRouteCircuitSku
4327				err = json.Unmarshal(*v, &sku)
4328				if err != nil {
4329					return err
4330				}
4331				erc.Sku = &sku
4332			}
4333		case "properties":
4334			if v != nil {
4335				var expressRouteCircuitPropertiesFormat ExpressRouteCircuitPropertiesFormat
4336				err = json.Unmarshal(*v, &expressRouteCircuitPropertiesFormat)
4337				if err != nil {
4338					return err
4339				}
4340				erc.ExpressRouteCircuitPropertiesFormat = &expressRouteCircuitPropertiesFormat
4341			}
4342		case "etag":
4343			if v != nil {
4344				var etag string
4345				err = json.Unmarshal(*v, &etag)
4346				if err != nil {
4347					return err
4348				}
4349				erc.Etag = &etag
4350			}
4351		case "id":
4352			if v != nil {
4353				var ID string
4354				err = json.Unmarshal(*v, &ID)
4355				if err != nil {
4356					return err
4357				}
4358				erc.ID = &ID
4359			}
4360		case "name":
4361			if v != nil {
4362				var name string
4363				err = json.Unmarshal(*v, &name)
4364				if err != nil {
4365					return err
4366				}
4367				erc.Name = &name
4368			}
4369		case "type":
4370			if v != nil {
4371				var typeVar string
4372				err = json.Unmarshal(*v, &typeVar)
4373				if err != nil {
4374					return err
4375				}
4376				erc.Type = &typeVar
4377			}
4378		case "location":
4379			if v != nil {
4380				var location string
4381				err = json.Unmarshal(*v, &location)
4382				if err != nil {
4383					return err
4384				}
4385				erc.Location = &location
4386			}
4387		case "tags":
4388			if v != nil {
4389				var tags map[string]*string
4390				err = json.Unmarshal(*v, &tags)
4391				if err != nil {
4392					return err
4393				}
4394				erc.Tags = tags
4395			}
4396		}
4397	}
4398
4399	return nil
4400}
4401
4402// ExpressRouteCircuitArpTable the ARP table associated with the ExpressRouteCircuit.
4403type ExpressRouteCircuitArpTable struct {
4404	// Age - Age
4405	Age *int32 `json:"age,omitempty"`
4406	// Interface - Interface
4407	Interface *string `json:"interface,omitempty"`
4408	// IPAddress - The IP address.
4409	IPAddress *string `json:"ipAddress,omitempty"`
4410	// MacAddress - The MAC address.
4411	MacAddress *string `json:"macAddress,omitempty"`
4412}
4413
4414// ExpressRouteCircuitAuthorization authorization in an ExpressRouteCircuit resource.
4415type ExpressRouteCircuitAuthorization struct {
4416	autorest.Response              `json:"-"`
4417	*AuthorizationPropertiesFormat `json:"properties,omitempty"`
4418	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
4419	Name *string `json:"name,omitempty"`
4420	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
4421	Etag *string `json:"etag,omitempty"`
4422	// ID - Resource ID.
4423	ID *string `json:"id,omitempty"`
4424}
4425
4426// MarshalJSON is the custom marshaler for ExpressRouteCircuitAuthorization.
4427func (erca ExpressRouteCircuitAuthorization) MarshalJSON() ([]byte, error) {
4428	objectMap := make(map[string]interface{})
4429	if erca.AuthorizationPropertiesFormat != nil {
4430		objectMap["properties"] = erca.AuthorizationPropertiesFormat
4431	}
4432	if erca.Name != nil {
4433		objectMap["name"] = erca.Name
4434	}
4435	if erca.ID != nil {
4436		objectMap["id"] = erca.ID
4437	}
4438	return json.Marshal(objectMap)
4439}
4440
4441// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitAuthorization struct.
4442func (erca *ExpressRouteCircuitAuthorization) UnmarshalJSON(body []byte) error {
4443	var m map[string]*json.RawMessage
4444	err := json.Unmarshal(body, &m)
4445	if err != nil {
4446		return err
4447	}
4448	for k, v := range m {
4449		switch k {
4450		case "properties":
4451			if v != nil {
4452				var authorizationPropertiesFormat AuthorizationPropertiesFormat
4453				err = json.Unmarshal(*v, &authorizationPropertiesFormat)
4454				if err != nil {
4455					return err
4456				}
4457				erca.AuthorizationPropertiesFormat = &authorizationPropertiesFormat
4458			}
4459		case "name":
4460			if v != nil {
4461				var name string
4462				err = json.Unmarshal(*v, &name)
4463				if err != nil {
4464					return err
4465				}
4466				erca.Name = &name
4467			}
4468		case "etag":
4469			if v != nil {
4470				var etag string
4471				err = json.Unmarshal(*v, &etag)
4472				if err != nil {
4473					return err
4474				}
4475				erca.Etag = &etag
4476			}
4477		case "id":
4478			if v != nil {
4479				var ID string
4480				err = json.Unmarshal(*v, &ID)
4481				if err != nil {
4482					return err
4483				}
4484				erca.ID = &ID
4485			}
4486		}
4487	}
4488
4489	return nil
4490}
4491
4492// ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
4493// results of a long-running operation.
4494type ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture struct {
4495	azure.FutureAPI
4496	// Result returns the result of the asynchronous operation.
4497	// If the operation has not completed it will return an error.
4498	Result func(ExpressRouteCircuitAuthorizationsClient) (ExpressRouteCircuitAuthorization, error)
4499}
4500
4501// ExpressRouteCircuitAuthorizationsDeleteFuture an abstraction for monitoring and retrieving the results
4502// of a long-running operation.
4503type ExpressRouteCircuitAuthorizationsDeleteFuture struct {
4504	azure.FutureAPI
4505	// Result returns the result of the asynchronous operation.
4506	// If the operation has not completed it will return an error.
4507	Result func(ExpressRouteCircuitAuthorizationsClient) (autorest.Response, error)
4508}
4509
4510// ExpressRouteCircuitListResult response for ListExpressRouteCircuit API service call.
4511type ExpressRouteCircuitListResult struct {
4512	autorest.Response `json:"-"`
4513	// Value - A list of ExpressRouteCircuits in a resource group.
4514	Value *[]ExpressRouteCircuit `json:"value,omitempty"`
4515	// NextLink - The URL to get the next set of results.
4516	NextLink *string `json:"nextLink,omitempty"`
4517}
4518
4519// ExpressRouteCircuitListResultIterator provides access to a complete listing of ExpressRouteCircuit
4520// values.
4521type ExpressRouteCircuitListResultIterator struct {
4522	i    int
4523	page ExpressRouteCircuitListResultPage
4524}
4525
4526// NextWithContext advances to the next value.  If there was an error making
4527// the request the iterator does not advance and the error is returned.
4528func (iter *ExpressRouteCircuitListResultIterator) NextWithContext(ctx context.Context) (err error) {
4529	if tracing.IsEnabled() {
4530		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultIterator.NextWithContext")
4531		defer func() {
4532			sc := -1
4533			if iter.Response().Response.Response != nil {
4534				sc = iter.Response().Response.Response.StatusCode
4535			}
4536			tracing.EndSpan(ctx, sc, err)
4537		}()
4538	}
4539	iter.i++
4540	if iter.i < len(iter.page.Values()) {
4541		return nil
4542	}
4543	err = iter.page.NextWithContext(ctx)
4544	if err != nil {
4545		iter.i--
4546		return err
4547	}
4548	iter.i = 0
4549	return nil
4550}
4551
4552// Next advances to the next value.  If there was an error making
4553// the request the iterator does not advance and the error is returned.
4554// Deprecated: Use NextWithContext() instead.
4555func (iter *ExpressRouteCircuitListResultIterator) Next() error {
4556	return iter.NextWithContext(context.Background())
4557}
4558
4559// NotDone returns true if the enumeration should be started or is not yet complete.
4560func (iter ExpressRouteCircuitListResultIterator) NotDone() bool {
4561	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4562}
4563
4564// Response returns the raw server response from the last page request.
4565func (iter ExpressRouteCircuitListResultIterator) Response() ExpressRouteCircuitListResult {
4566	return iter.page.Response()
4567}
4568
4569// Value returns the current value or a zero-initialized value if the
4570// iterator has advanced beyond the end of the collection.
4571func (iter ExpressRouteCircuitListResultIterator) Value() ExpressRouteCircuit {
4572	if !iter.page.NotDone() {
4573		return ExpressRouteCircuit{}
4574	}
4575	return iter.page.Values()[iter.i]
4576}
4577
4578// Creates a new instance of the ExpressRouteCircuitListResultIterator type.
4579func NewExpressRouteCircuitListResultIterator(page ExpressRouteCircuitListResultPage) ExpressRouteCircuitListResultIterator {
4580	return ExpressRouteCircuitListResultIterator{page: page}
4581}
4582
4583// IsEmpty returns true if the ListResult contains no values.
4584func (erclr ExpressRouteCircuitListResult) IsEmpty() bool {
4585	return erclr.Value == nil || len(*erclr.Value) == 0
4586}
4587
4588// hasNextLink returns true if the NextLink is not empty.
4589func (erclr ExpressRouteCircuitListResult) hasNextLink() bool {
4590	return erclr.NextLink != nil && len(*erclr.NextLink) != 0
4591}
4592
4593// expressRouteCircuitListResultPreparer prepares a request to retrieve the next set of results.
4594// It returns nil if no more results exist.
4595func (erclr ExpressRouteCircuitListResult) expressRouteCircuitListResultPreparer(ctx context.Context) (*http.Request, error) {
4596	if !erclr.hasNextLink() {
4597		return nil, nil
4598	}
4599	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4600		autorest.AsJSON(),
4601		autorest.AsGet(),
4602		autorest.WithBaseURL(to.String(erclr.NextLink)))
4603}
4604
4605// ExpressRouteCircuitListResultPage contains a page of ExpressRouteCircuit values.
4606type ExpressRouteCircuitListResultPage struct {
4607	fn    func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)
4608	erclr ExpressRouteCircuitListResult
4609}
4610
4611// NextWithContext advances to the next page of values.  If there was an error making
4612// the request the page does not advance and the error is returned.
4613func (page *ExpressRouteCircuitListResultPage) NextWithContext(ctx context.Context) (err error) {
4614	if tracing.IsEnabled() {
4615		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultPage.NextWithContext")
4616		defer func() {
4617			sc := -1
4618			if page.Response().Response.Response != nil {
4619				sc = page.Response().Response.Response.StatusCode
4620			}
4621			tracing.EndSpan(ctx, sc, err)
4622		}()
4623	}
4624	for {
4625		next, err := page.fn(ctx, page.erclr)
4626		if err != nil {
4627			return err
4628		}
4629		page.erclr = next
4630		if !next.hasNextLink() || !next.IsEmpty() {
4631			break
4632		}
4633	}
4634	return nil
4635}
4636
4637// Next advances to the next page of values.  If there was an error making
4638// the request the page does not advance and the error is returned.
4639// Deprecated: Use NextWithContext() instead.
4640func (page *ExpressRouteCircuitListResultPage) Next() error {
4641	return page.NextWithContext(context.Background())
4642}
4643
4644// NotDone returns true if the page enumeration should be started or is not yet complete.
4645func (page ExpressRouteCircuitListResultPage) NotDone() bool {
4646	return !page.erclr.IsEmpty()
4647}
4648
4649// Response returns the raw server response from the last page request.
4650func (page ExpressRouteCircuitListResultPage) Response() ExpressRouteCircuitListResult {
4651	return page.erclr
4652}
4653
4654// Values returns the slice of values for the current page or nil if there are no values.
4655func (page ExpressRouteCircuitListResultPage) Values() []ExpressRouteCircuit {
4656	if page.erclr.IsEmpty() {
4657		return nil
4658	}
4659	return *page.erclr.Value
4660}
4661
4662// Creates a new instance of the ExpressRouteCircuitListResultPage type.
4663func NewExpressRouteCircuitListResultPage(cur ExpressRouteCircuitListResult, getNextPage func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)) ExpressRouteCircuitListResultPage {
4664	return ExpressRouteCircuitListResultPage{
4665		fn:    getNextPage,
4666		erclr: cur,
4667	}
4668}
4669
4670// ExpressRouteCircuitPeering peering in an ExpressRouteCircuit resource.
4671type ExpressRouteCircuitPeering struct {
4672	autorest.Response                           `json:"-"`
4673	*ExpressRouteCircuitPeeringPropertiesFormat `json:"properties,omitempty"`
4674	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
4675	Name *string `json:"name,omitempty"`
4676	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
4677	Etag *string `json:"etag,omitempty"`
4678	// ID - Resource ID.
4679	ID *string `json:"id,omitempty"`
4680}
4681
4682// MarshalJSON is the custom marshaler for ExpressRouteCircuitPeering.
4683func (ercp ExpressRouteCircuitPeering) MarshalJSON() ([]byte, error) {
4684	objectMap := make(map[string]interface{})
4685	if ercp.ExpressRouteCircuitPeeringPropertiesFormat != nil {
4686		objectMap["properties"] = ercp.ExpressRouteCircuitPeeringPropertiesFormat
4687	}
4688	if ercp.Name != nil {
4689		objectMap["name"] = ercp.Name
4690	}
4691	if ercp.ID != nil {
4692		objectMap["id"] = ercp.ID
4693	}
4694	return json.Marshal(objectMap)
4695}
4696
4697// UnmarshalJSON is the custom unmarshaler for ExpressRouteCircuitPeering struct.
4698func (ercp *ExpressRouteCircuitPeering) UnmarshalJSON(body []byte) error {
4699	var m map[string]*json.RawMessage
4700	err := json.Unmarshal(body, &m)
4701	if err != nil {
4702		return err
4703	}
4704	for k, v := range m {
4705		switch k {
4706		case "properties":
4707			if v != nil {
4708				var expressRouteCircuitPeeringPropertiesFormat ExpressRouteCircuitPeeringPropertiesFormat
4709				err = json.Unmarshal(*v, &expressRouteCircuitPeeringPropertiesFormat)
4710				if err != nil {
4711					return err
4712				}
4713				ercp.ExpressRouteCircuitPeeringPropertiesFormat = &expressRouteCircuitPeeringPropertiesFormat
4714			}
4715		case "name":
4716			if v != nil {
4717				var name string
4718				err = json.Unmarshal(*v, &name)
4719				if err != nil {
4720					return err
4721				}
4722				ercp.Name = &name
4723			}
4724		case "etag":
4725			if v != nil {
4726				var etag string
4727				err = json.Unmarshal(*v, &etag)
4728				if err != nil {
4729					return err
4730				}
4731				ercp.Etag = &etag
4732			}
4733		case "id":
4734			if v != nil {
4735				var ID string
4736				err = json.Unmarshal(*v, &ID)
4737				if err != nil {
4738					return err
4739				}
4740				ercp.ID = &ID
4741			}
4742		}
4743	}
4744
4745	return nil
4746}
4747
4748// ExpressRouteCircuitPeeringConfig specifies the peering configuration.
4749type ExpressRouteCircuitPeeringConfig struct {
4750	// AdvertisedPublicPrefixes - The reference of AdvertisedPublicPrefixes.
4751	AdvertisedPublicPrefixes *[]string `json:"advertisedPublicPrefixes,omitempty"`
4752	// AdvertisedCommunities - The communities of bgp peering. Specified for microsoft peering
4753	AdvertisedCommunities *[]string `json:"advertisedCommunities,omitempty"`
4754	// AdvertisedPublicPrefixesState - AdvertisedPublicPrefixState of the Peering resource. Possible values are 'NotConfigured', 'Configuring', 'Configured', and 'ValidationNeeded'. Possible values include: 'NotConfigured', 'Configuring', 'Configured', 'ValidationNeeded'
4755	AdvertisedPublicPrefixesState ExpressRouteCircuitPeeringAdvertisedPublicPrefixState `json:"advertisedPublicPrefixesState,omitempty"`
4756	// LegacyMode - The legacy mode of the peering.
4757	LegacyMode *int32 `json:"legacyMode,omitempty"`
4758	// CustomerASN - The CustomerASN of the peering.
4759	CustomerASN *int32 `json:"customerASN,omitempty"`
4760	// RoutingRegistryName - The RoutingRegistryName of the configuration.
4761	RoutingRegistryName *string `json:"routingRegistryName,omitempty"`
4762}
4763
4764// ExpressRouteCircuitPeeringListResult response for ListPeering API service call retrieves all peerings
4765// that belong to an ExpressRouteCircuit.
4766type ExpressRouteCircuitPeeringListResult struct {
4767	autorest.Response `json:"-"`
4768	// Value - The peerings in an express route circuit.
4769	Value *[]ExpressRouteCircuitPeering `json:"value,omitempty"`
4770	// NextLink - The URL to get the next set of results.
4771	NextLink *string `json:"nextLink,omitempty"`
4772}
4773
4774// ExpressRouteCircuitPeeringListResultIterator provides access to a complete listing of
4775// ExpressRouteCircuitPeering values.
4776type ExpressRouteCircuitPeeringListResultIterator struct {
4777	i    int
4778	page ExpressRouteCircuitPeeringListResultPage
4779}
4780
4781// NextWithContext advances to the next value.  If there was an error making
4782// the request the iterator does not advance and the error is returned.
4783func (iter *ExpressRouteCircuitPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
4784	if tracing.IsEnabled() {
4785		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultIterator.NextWithContext")
4786		defer func() {
4787			sc := -1
4788			if iter.Response().Response.Response != nil {
4789				sc = iter.Response().Response.Response.StatusCode
4790			}
4791			tracing.EndSpan(ctx, sc, err)
4792		}()
4793	}
4794	iter.i++
4795	if iter.i < len(iter.page.Values()) {
4796		return nil
4797	}
4798	err = iter.page.NextWithContext(ctx)
4799	if err != nil {
4800		iter.i--
4801		return err
4802	}
4803	iter.i = 0
4804	return nil
4805}
4806
4807// Next advances to the next value.  If there was an error making
4808// the request the iterator does not advance and the error is returned.
4809// Deprecated: Use NextWithContext() instead.
4810func (iter *ExpressRouteCircuitPeeringListResultIterator) Next() error {
4811	return iter.NextWithContext(context.Background())
4812}
4813
4814// NotDone returns true if the enumeration should be started or is not yet complete.
4815func (iter ExpressRouteCircuitPeeringListResultIterator) NotDone() bool {
4816	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4817}
4818
4819// Response returns the raw server response from the last page request.
4820func (iter ExpressRouteCircuitPeeringListResultIterator) Response() ExpressRouteCircuitPeeringListResult {
4821	return iter.page.Response()
4822}
4823
4824// Value returns the current value or a zero-initialized value if the
4825// iterator has advanced beyond the end of the collection.
4826func (iter ExpressRouteCircuitPeeringListResultIterator) Value() ExpressRouteCircuitPeering {
4827	if !iter.page.NotDone() {
4828		return ExpressRouteCircuitPeering{}
4829	}
4830	return iter.page.Values()[iter.i]
4831}
4832
4833// Creates a new instance of the ExpressRouteCircuitPeeringListResultIterator type.
4834func NewExpressRouteCircuitPeeringListResultIterator(page ExpressRouteCircuitPeeringListResultPage) ExpressRouteCircuitPeeringListResultIterator {
4835	return ExpressRouteCircuitPeeringListResultIterator{page: page}
4836}
4837
4838// IsEmpty returns true if the ListResult contains no values.
4839func (ercplr ExpressRouteCircuitPeeringListResult) IsEmpty() bool {
4840	return ercplr.Value == nil || len(*ercplr.Value) == 0
4841}
4842
4843// hasNextLink returns true if the NextLink is not empty.
4844func (ercplr ExpressRouteCircuitPeeringListResult) hasNextLink() bool {
4845	return ercplr.NextLink != nil && len(*ercplr.NextLink) != 0
4846}
4847
4848// expressRouteCircuitPeeringListResultPreparer prepares a request to retrieve the next set of results.
4849// It returns nil if no more results exist.
4850func (ercplr ExpressRouteCircuitPeeringListResult) expressRouteCircuitPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
4851	if !ercplr.hasNextLink() {
4852		return nil, nil
4853	}
4854	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4855		autorest.AsJSON(),
4856		autorest.AsGet(),
4857		autorest.WithBaseURL(to.String(ercplr.NextLink)))
4858}
4859
4860// ExpressRouteCircuitPeeringListResultPage contains a page of ExpressRouteCircuitPeering values.
4861type ExpressRouteCircuitPeeringListResultPage struct {
4862	fn     func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)
4863	ercplr ExpressRouteCircuitPeeringListResult
4864}
4865
4866// NextWithContext advances to the next page of values.  If there was an error making
4867// the request the page does not advance and the error is returned.
4868func (page *ExpressRouteCircuitPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
4869	if tracing.IsEnabled() {
4870		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultPage.NextWithContext")
4871		defer func() {
4872			sc := -1
4873			if page.Response().Response.Response != nil {
4874				sc = page.Response().Response.Response.StatusCode
4875			}
4876			tracing.EndSpan(ctx, sc, err)
4877		}()
4878	}
4879	for {
4880		next, err := page.fn(ctx, page.ercplr)
4881		if err != nil {
4882			return err
4883		}
4884		page.ercplr = next
4885		if !next.hasNextLink() || !next.IsEmpty() {
4886			break
4887		}
4888	}
4889	return nil
4890}
4891
4892// Next advances to the next page of values.  If there was an error making
4893// the request the page does not advance and the error is returned.
4894// Deprecated: Use NextWithContext() instead.
4895func (page *ExpressRouteCircuitPeeringListResultPage) Next() error {
4896	return page.NextWithContext(context.Background())
4897}
4898
4899// NotDone returns true if the page enumeration should be started or is not yet complete.
4900func (page ExpressRouteCircuitPeeringListResultPage) NotDone() bool {
4901	return !page.ercplr.IsEmpty()
4902}
4903
4904// Response returns the raw server response from the last page request.
4905func (page ExpressRouteCircuitPeeringListResultPage) Response() ExpressRouteCircuitPeeringListResult {
4906	return page.ercplr
4907}
4908
4909// Values returns the slice of values for the current page or nil if there are no values.
4910func (page ExpressRouteCircuitPeeringListResultPage) Values() []ExpressRouteCircuitPeering {
4911	if page.ercplr.IsEmpty() {
4912		return nil
4913	}
4914	return *page.ercplr.Value
4915}
4916
4917// Creates a new instance of the ExpressRouteCircuitPeeringListResultPage type.
4918func NewExpressRouteCircuitPeeringListResultPage(cur ExpressRouteCircuitPeeringListResult, getNextPage func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)) ExpressRouteCircuitPeeringListResultPage {
4919	return ExpressRouteCircuitPeeringListResultPage{
4920		fn:     getNextPage,
4921		ercplr: cur,
4922	}
4923}
4924
4925// ExpressRouteCircuitPeeringPropertiesFormat ...
4926type ExpressRouteCircuitPeeringPropertiesFormat struct {
4927	// PeeringType - The PeeringType. Possible values are: 'AzurePublicPeering', 'AzurePrivatePeering', and 'MicrosoftPeering'. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'
4928	PeeringType ExpressRouteCircuitPeeringType `json:"peeringType,omitempty"`
4929	// State - The state of peering. Possible values are: 'Disabled' and 'Enabled'. Possible values include: 'ExpressRouteCircuitPeeringStateDisabled', 'ExpressRouteCircuitPeeringStateEnabled'
4930	State ExpressRouteCircuitPeeringState `json:"state,omitempty"`
4931	// AzureASN - The Azure ASN.
4932	AzureASN *int32 `json:"azureASN,omitempty"`
4933	// PeerASN - The peer ASN.
4934	PeerASN *int64 `json:"peerASN,omitempty"`
4935	// PrimaryPeerAddressPrefix - The primary address prefix.
4936	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
4937	// SecondaryPeerAddressPrefix - The secondary address prefix.
4938	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
4939	// PrimaryAzurePort - The primary port.
4940	PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"`
4941	// SecondaryAzurePort - The secondary port.
4942	SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"`
4943	// SharedKey - The shared key.
4944	SharedKey *string `json:"sharedKey,omitempty"`
4945	// VlanID - The VLAN ID.
4946	VlanID *int32 `json:"vlanId,omitempty"`
4947	// MicrosoftPeeringConfig - The Microsoft peering configuration.
4948	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
4949	// Stats - Gets peering stats.
4950	Stats *ExpressRouteCircuitStats `json:"stats,omitempty"`
4951	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
4952	ProvisioningState *string `json:"provisioningState,omitempty"`
4953	// GatewayManagerEtag - The GatewayManager Etag.
4954	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
4955	// LastModifiedBy - Gets whether the provider or the customer last modified the peering.
4956	LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
4957	// RouteFilter - The reference of the RouteFilter resource.
4958	RouteFilter *RouteFilter `json:"routeFilter,omitempty"`
4959	// Ipv6PeeringConfig - The IPv6 peering configuration.
4960	Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"`
4961}
4962
4963// ExpressRouteCircuitPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
4964// of a long-running operation.
4965type ExpressRouteCircuitPeeringsCreateOrUpdateFuture struct {
4966	azure.FutureAPI
4967	// Result returns the result of the asynchronous operation.
4968	// If the operation has not completed it will return an error.
4969	Result func(ExpressRouteCircuitPeeringsClient) (ExpressRouteCircuitPeering, error)
4970}
4971
4972// ExpressRouteCircuitPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
4973// long-running operation.
4974type ExpressRouteCircuitPeeringsDeleteFuture struct {
4975	azure.FutureAPI
4976	// Result returns the result of the asynchronous operation.
4977	// If the operation has not completed it will return an error.
4978	Result func(ExpressRouteCircuitPeeringsClient) (autorest.Response, error)
4979}
4980
4981// ExpressRouteCircuitPropertiesFormat properties of ExpressRouteCircuit.
4982type ExpressRouteCircuitPropertiesFormat struct {
4983	// AllowClassicOperations - Allow classic operations
4984	AllowClassicOperations *bool `json:"allowClassicOperations,omitempty"`
4985	// CircuitProvisioningState - The CircuitProvisioningState state of the resource.
4986	CircuitProvisioningState *string `json:"circuitProvisioningState,omitempty"`
4987	// ServiceProviderProvisioningState - The ServiceProviderProvisioningState state of the resource. Possible values are 'NotProvisioned', 'Provisioning', 'Provisioned', and 'Deprovisioning'. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning'
4988	ServiceProviderProvisioningState ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"`
4989	// Authorizations - The list of authorizations.
4990	Authorizations *[]ExpressRouteCircuitAuthorization `json:"authorizations,omitempty"`
4991	// Peerings - The list of peerings.
4992	Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"`
4993	// ServiceKey - The ServiceKey.
4994	ServiceKey *string `json:"serviceKey,omitempty"`
4995	// ServiceProviderNotes - The ServiceProviderNotes.
4996	ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"`
4997	// ServiceProviderProperties - The ServiceProviderProperties.
4998	ServiceProviderProperties *ExpressRouteCircuitServiceProviderProperties `json:"serviceProviderProperties,omitempty"`
4999	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
5000	ProvisioningState *string `json:"provisioningState,omitempty"`
5001	// GatewayManagerEtag - The GatewayManager Etag.
5002	GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"`
5003}
5004
5005// ExpressRouteCircuitRoutesTable the routes table associated with the ExpressRouteCircuit
5006type ExpressRouteCircuitRoutesTable struct {
5007	// NetworkProperty - network
5008	NetworkProperty *string `json:"network,omitempty"`
5009	// NextHop - nextHop
5010	NextHop *string `json:"nextHop,omitempty"`
5011	// LocPrf - locPrf
5012	LocPrf *string `json:"locPrf,omitempty"`
5013	// Weight - weight.
5014	Weight *int32 `json:"weight,omitempty"`
5015	// Path - path
5016	Path *string `json:"path,omitempty"`
5017}
5018
5019// ExpressRouteCircuitRoutesTableSummary the routes table associated with the ExpressRouteCircuit.
5020type ExpressRouteCircuitRoutesTableSummary struct {
5021	// Neighbor - Neighbor
5022	Neighbor *string `json:"neighbor,omitempty"`
5023	// V - BGP version number spoken to the neighbor.
5024	V *int32 `json:"v,omitempty"`
5025	// As - Autonomous system number.
5026	As *int32 `json:"as,omitempty"`
5027	// 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.
5028	UpDown *string `json:"upDown,omitempty"`
5029	// StatePfxRcd - Current state of the BGP session, and the number of prefixes that have been received from a neighbor or peer group.
5030	StatePfxRcd *string `json:"statePfxRcd,omitempty"`
5031}
5032
5033// ExpressRouteCircuitsArpTableListResult response for ListArpTable associated with the Express Route
5034// Circuits API.
5035type ExpressRouteCircuitsArpTableListResult struct {
5036	autorest.Response `json:"-"`
5037	// Value - Gets list of the ARP table.
5038	Value *[]ExpressRouteCircuitArpTable `json:"value,omitempty"`
5039	// NextLink - The URL to get the next set of results.
5040	NextLink *string `json:"nextLink,omitempty"`
5041}
5042
5043// ExpressRouteCircuitsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
5044// long-running operation.
5045type ExpressRouteCircuitsCreateOrUpdateFuture struct {
5046	azure.FutureAPI
5047	// Result returns the result of the asynchronous operation.
5048	// If the operation has not completed it will return an error.
5049	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuit, error)
5050}
5051
5052// ExpressRouteCircuitsDeleteFuture an abstraction for monitoring and retrieving the results of a
5053// long-running operation.
5054type ExpressRouteCircuitsDeleteFuture struct {
5055	azure.FutureAPI
5056	// Result returns the result of the asynchronous operation.
5057	// If the operation has not completed it will return an error.
5058	Result func(ExpressRouteCircuitsClient) (autorest.Response, error)
5059}
5060
5061// ExpressRouteCircuitServiceProviderProperties contains ServiceProviderProperties in an
5062// ExpressRouteCircuit.
5063type ExpressRouteCircuitServiceProviderProperties struct {
5064	// ServiceProviderName - The serviceProviderName.
5065	ServiceProviderName *string `json:"serviceProviderName,omitempty"`
5066	// PeeringLocation - The peering location.
5067	PeeringLocation *string `json:"peeringLocation,omitempty"`
5068	// BandwidthInMbps - The BandwidthInMbps.
5069	BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"`
5070}
5071
5072// ExpressRouteCircuitSku contains SKU in an ExpressRouteCircuit.
5073type ExpressRouteCircuitSku struct {
5074	// Name - The name of the SKU.
5075	Name *string `json:"name,omitempty"`
5076	// Tier - The tier of the SKU. Possible values are 'Standard' and 'Premium'. Possible values include: 'ExpressRouteCircuitSkuTierStandard', 'ExpressRouteCircuitSkuTierPremium'
5077	Tier ExpressRouteCircuitSkuTier `json:"tier,omitempty"`
5078	// Family - The family of the SKU. Possible values are: 'UnlimitedData' and 'MeteredData'. Possible values include: 'UnlimitedData', 'MeteredData'
5079	Family ExpressRouteCircuitSkuFamily `json:"family,omitempty"`
5080}
5081
5082// ExpressRouteCircuitsListArpTableFuture an abstraction for monitoring and retrieving the results of a
5083// long-running operation.
5084type ExpressRouteCircuitsListArpTableFuture struct {
5085	azure.FutureAPI
5086	// Result returns the result of the asynchronous operation.
5087	// If the operation has not completed it will return an error.
5088	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsArpTableListResult, error)
5089}
5090
5091// ExpressRouteCircuitsListRoutesTableFuture an abstraction for monitoring and retrieving the results of a
5092// long-running operation.
5093type ExpressRouteCircuitsListRoutesTableFuture struct {
5094	azure.FutureAPI
5095	// Result returns the result of the asynchronous operation.
5096	// If the operation has not completed it will return an error.
5097	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsRoutesTableListResult, error)
5098}
5099
5100// ExpressRouteCircuitsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving the
5101// results of a long-running operation.
5102type ExpressRouteCircuitsListRoutesTableSummaryFuture struct {
5103	azure.FutureAPI
5104	// Result returns the result of the asynchronous operation.
5105	// If the operation has not completed it will return an error.
5106	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuitsRoutesTableSummaryListResult, error)
5107}
5108
5109// ExpressRouteCircuitsRoutesTableListResult response for ListRoutesTable associated with the Express Route
5110// Circuits API.
5111type ExpressRouteCircuitsRoutesTableListResult struct {
5112	autorest.Response `json:"-"`
5113	// Value - The list of routes table.
5114	Value *[]ExpressRouteCircuitRoutesTable `json:"value,omitempty"`
5115	// NextLink - The URL to get the next set of results.
5116	NextLink *string `json:"nextLink,omitempty"`
5117}
5118
5119// ExpressRouteCircuitsRoutesTableSummaryListResult response for ListRoutesTable associated with the
5120// Express Route Circuits API.
5121type ExpressRouteCircuitsRoutesTableSummaryListResult struct {
5122	autorest.Response `json:"-"`
5123	// Value - A list of the routes table.
5124	Value *[]ExpressRouteCircuitRoutesTableSummary `json:"value,omitempty"`
5125	// NextLink - The URL to get the next set of results.
5126	NextLink *string `json:"nextLink,omitempty"`
5127}
5128
5129// ExpressRouteCircuitStats contains stats associated with the peering.
5130type ExpressRouteCircuitStats struct {
5131	autorest.Response `json:"-"`
5132	// PrimarybytesIn - Gets BytesIn of the peering.
5133	PrimarybytesIn *int64 `json:"primarybytesIn,omitempty"`
5134	// PrimarybytesOut - Gets BytesOut of the peering.
5135	PrimarybytesOut *int64 `json:"primarybytesOut,omitempty"`
5136	// SecondarybytesIn - Gets BytesIn of the peering.
5137	SecondarybytesIn *int64 `json:"secondarybytesIn,omitempty"`
5138	// SecondarybytesOut - Gets BytesOut of the peering.
5139	SecondarybytesOut *int64 `json:"secondarybytesOut,omitempty"`
5140}
5141
5142// ExpressRouteCircuitsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
5143// long-running operation.
5144type ExpressRouteCircuitsUpdateTagsFuture struct {
5145	azure.FutureAPI
5146	// Result returns the result of the asynchronous operation.
5147	// If the operation has not completed it will return an error.
5148	Result func(ExpressRouteCircuitsClient) (ExpressRouteCircuit, error)
5149}
5150
5151// ExpressRouteServiceProvider a ExpressRouteResourceProvider object.
5152type ExpressRouteServiceProvider struct {
5153	*ExpressRouteServiceProviderPropertiesFormat `json:"properties,omitempty"`
5154	// ID - Resource ID.
5155	ID *string `json:"id,omitempty"`
5156	// Name - READ-ONLY; Resource name.
5157	Name *string `json:"name,omitempty"`
5158	// Type - READ-ONLY; Resource type.
5159	Type *string `json:"type,omitempty"`
5160	// Location - Resource location.
5161	Location *string `json:"location,omitempty"`
5162	// Tags - Resource tags.
5163	Tags map[string]*string `json:"tags"`
5164}
5165
5166// MarshalJSON is the custom marshaler for ExpressRouteServiceProvider.
5167func (ersp ExpressRouteServiceProvider) MarshalJSON() ([]byte, error) {
5168	objectMap := make(map[string]interface{})
5169	if ersp.ExpressRouteServiceProviderPropertiesFormat != nil {
5170		objectMap["properties"] = ersp.ExpressRouteServiceProviderPropertiesFormat
5171	}
5172	if ersp.ID != nil {
5173		objectMap["id"] = ersp.ID
5174	}
5175	if ersp.Location != nil {
5176		objectMap["location"] = ersp.Location
5177	}
5178	if ersp.Tags != nil {
5179		objectMap["tags"] = ersp.Tags
5180	}
5181	return json.Marshal(objectMap)
5182}
5183
5184// UnmarshalJSON is the custom unmarshaler for ExpressRouteServiceProvider struct.
5185func (ersp *ExpressRouteServiceProvider) UnmarshalJSON(body []byte) error {
5186	var m map[string]*json.RawMessage
5187	err := json.Unmarshal(body, &m)
5188	if err != nil {
5189		return err
5190	}
5191	for k, v := range m {
5192		switch k {
5193		case "properties":
5194			if v != nil {
5195				var expressRouteServiceProviderPropertiesFormat ExpressRouteServiceProviderPropertiesFormat
5196				err = json.Unmarshal(*v, &expressRouteServiceProviderPropertiesFormat)
5197				if err != nil {
5198					return err
5199				}
5200				ersp.ExpressRouteServiceProviderPropertiesFormat = &expressRouteServiceProviderPropertiesFormat
5201			}
5202		case "id":
5203			if v != nil {
5204				var ID string
5205				err = json.Unmarshal(*v, &ID)
5206				if err != nil {
5207					return err
5208				}
5209				ersp.ID = &ID
5210			}
5211		case "name":
5212			if v != nil {
5213				var name string
5214				err = json.Unmarshal(*v, &name)
5215				if err != nil {
5216					return err
5217				}
5218				ersp.Name = &name
5219			}
5220		case "type":
5221			if v != nil {
5222				var typeVar string
5223				err = json.Unmarshal(*v, &typeVar)
5224				if err != nil {
5225					return err
5226				}
5227				ersp.Type = &typeVar
5228			}
5229		case "location":
5230			if v != nil {
5231				var location string
5232				err = json.Unmarshal(*v, &location)
5233				if err != nil {
5234					return err
5235				}
5236				ersp.Location = &location
5237			}
5238		case "tags":
5239			if v != nil {
5240				var tags map[string]*string
5241				err = json.Unmarshal(*v, &tags)
5242				if err != nil {
5243					return err
5244				}
5245				ersp.Tags = tags
5246			}
5247		}
5248	}
5249
5250	return nil
5251}
5252
5253// ExpressRouteServiceProviderBandwidthsOffered contains bandwidths offered in ExpressRouteServiceProvider
5254// resources.
5255type ExpressRouteServiceProviderBandwidthsOffered struct {
5256	// OfferName - The OfferName.
5257	OfferName *string `json:"offerName,omitempty"`
5258	// ValueInMbps - The ValueInMbps.
5259	ValueInMbps *int32 `json:"valueInMbps,omitempty"`
5260}
5261
5262// ExpressRouteServiceProviderListResult response for the ListExpressRouteServiceProvider API service call.
5263type ExpressRouteServiceProviderListResult struct {
5264	autorest.Response `json:"-"`
5265	// Value - A list of ExpressRouteResourceProvider resources.
5266	Value *[]ExpressRouteServiceProvider `json:"value,omitempty"`
5267	// NextLink - The URL to get the next set of results.
5268	NextLink *string `json:"nextLink,omitempty"`
5269}
5270
5271// ExpressRouteServiceProviderListResultIterator provides access to a complete listing of
5272// ExpressRouteServiceProvider values.
5273type ExpressRouteServiceProviderListResultIterator struct {
5274	i    int
5275	page ExpressRouteServiceProviderListResultPage
5276}
5277
5278// NextWithContext advances to the next value.  If there was an error making
5279// the request the iterator does not advance and the error is returned.
5280func (iter *ExpressRouteServiceProviderListResultIterator) NextWithContext(ctx context.Context) (err error) {
5281	if tracing.IsEnabled() {
5282		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultIterator.NextWithContext")
5283		defer func() {
5284			sc := -1
5285			if iter.Response().Response.Response != nil {
5286				sc = iter.Response().Response.Response.StatusCode
5287			}
5288			tracing.EndSpan(ctx, sc, err)
5289		}()
5290	}
5291	iter.i++
5292	if iter.i < len(iter.page.Values()) {
5293		return nil
5294	}
5295	err = iter.page.NextWithContext(ctx)
5296	if err != nil {
5297		iter.i--
5298		return err
5299	}
5300	iter.i = 0
5301	return nil
5302}
5303
5304// Next advances to the next value.  If there was an error making
5305// the request the iterator does not advance and the error is returned.
5306// Deprecated: Use NextWithContext() instead.
5307func (iter *ExpressRouteServiceProviderListResultIterator) Next() error {
5308	return iter.NextWithContext(context.Background())
5309}
5310
5311// NotDone returns true if the enumeration should be started or is not yet complete.
5312func (iter ExpressRouteServiceProviderListResultIterator) NotDone() bool {
5313	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5314}
5315
5316// Response returns the raw server response from the last page request.
5317func (iter ExpressRouteServiceProviderListResultIterator) Response() ExpressRouteServiceProviderListResult {
5318	return iter.page.Response()
5319}
5320
5321// Value returns the current value or a zero-initialized value if the
5322// iterator has advanced beyond the end of the collection.
5323func (iter ExpressRouteServiceProviderListResultIterator) Value() ExpressRouteServiceProvider {
5324	if !iter.page.NotDone() {
5325		return ExpressRouteServiceProvider{}
5326	}
5327	return iter.page.Values()[iter.i]
5328}
5329
5330// Creates a new instance of the ExpressRouteServiceProviderListResultIterator type.
5331func NewExpressRouteServiceProviderListResultIterator(page ExpressRouteServiceProviderListResultPage) ExpressRouteServiceProviderListResultIterator {
5332	return ExpressRouteServiceProviderListResultIterator{page: page}
5333}
5334
5335// IsEmpty returns true if the ListResult contains no values.
5336func (ersplr ExpressRouteServiceProviderListResult) IsEmpty() bool {
5337	return ersplr.Value == nil || len(*ersplr.Value) == 0
5338}
5339
5340// hasNextLink returns true if the NextLink is not empty.
5341func (ersplr ExpressRouteServiceProviderListResult) hasNextLink() bool {
5342	return ersplr.NextLink != nil && len(*ersplr.NextLink) != 0
5343}
5344
5345// expressRouteServiceProviderListResultPreparer prepares a request to retrieve the next set of results.
5346// It returns nil if no more results exist.
5347func (ersplr ExpressRouteServiceProviderListResult) expressRouteServiceProviderListResultPreparer(ctx context.Context) (*http.Request, error) {
5348	if !ersplr.hasNextLink() {
5349		return nil, nil
5350	}
5351	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5352		autorest.AsJSON(),
5353		autorest.AsGet(),
5354		autorest.WithBaseURL(to.String(ersplr.NextLink)))
5355}
5356
5357// ExpressRouteServiceProviderListResultPage contains a page of ExpressRouteServiceProvider values.
5358type ExpressRouteServiceProviderListResultPage struct {
5359	fn     func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)
5360	ersplr ExpressRouteServiceProviderListResult
5361}
5362
5363// NextWithContext advances to the next page of values.  If there was an error making
5364// the request the page does not advance and the error is returned.
5365func (page *ExpressRouteServiceProviderListResultPage) NextWithContext(ctx context.Context) (err error) {
5366	if tracing.IsEnabled() {
5367		ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultPage.NextWithContext")
5368		defer func() {
5369			sc := -1
5370			if page.Response().Response.Response != nil {
5371				sc = page.Response().Response.Response.StatusCode
5372			}
5373			tracing.EndSpan(ctx, sc, err)
5374		}()
5375	}
5376	for {
5377		next, err := page.fn(ctx, page.ersplr)
5378		if err != nil {
5379			return err
5380		}
5381		page.ersplr = next
5382		if !next.hasNextLink() || !next.IsEmpty() {
5383			break
5384		}
5385	}
5386	return nil
5387}
5388
5389// Next advances to the next page of values.  If there was an error making
5390// the request the page does not advance and the error is returned.
5391// Deprecated: Use NextWithContext() instead.
5392func (page *ExpressRouteServiceProviderListResultPage) Next() error {
5393	return page.NextWithContext(context.Background())
5394}
5395
5396// NotDone returns true if the page enumeration should be started or is not yet complete.
5397func (page ExpressRouteServiceProviderListResultPage) NotDone() bool {
5398	return !page.ersplr.IsEmpty()
5399}
5400
5401// Response returns the raw server response from the last page request.
5402func (page ExpressRouteServiceProviderListResultPage) Response() ExpressRouteServiceProviderListResult {
5403	return page.ersplr
5404}
5405
5406// Values returns the slice of values for the current page or nil if there are no values.
5407func (page ExpressRouteServiceProviderListResultPage) Values() []ExpressRouteServiceProvider {
5408	if page.ersplr.IsEmpty() {
5409		return nil
5410	}
5411	return *page.ersplr.Value
5412}
5413
5414// Creates a new instance of the ExpressRouteServiceProviderListResultPage type.
5415func NewExpressRouteServiceProviderListResultPage(cur ExpressRouteServiceProviderListResult, getNextPage func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)) ExpressRouteServiceProviderListResultPage {
5416	return ExpressRouteServiceProviderListResultPage{
5417		fn:     getNextPage,
5418		ersplr: cur,
5419	}
5420}
5421
5422// ExpressRouteServiceProviderPropertiesFormat properties of ExpressRouteServiceProvider.
5423type ExpressRouteServiceProviderPropertiesFormat struct {
5424	// PeeringLocations - Get a list of peering locations.
5425	PeeringLocations *[]string `json:"peeringLocations,omitempty"`
5426	// BandwidthsOffered - Gets bandwidths offered.
5427	BandwidthsOffered *[]ExpressRouteServiceProviderBandwidthsOffered `json:"bandwidthsOffered,omitempty"`
5428	// ProvisioningState - Gets the provisioning state of the resource.
5429	ProvisioningState *string `json:"provisioningState,omitempty"`
5430}
5431
5432// FlowLogInformation information on the configuration of flow log.
5433type FlowLogInformation struct {
5434	autorest.Response `json:"-"`
5435	// TargetResourceID - The ID of the resource to configure for flow logging.
5436	TargetResourceID   *string `json:"targetResourceId,omitempty"`
5437	*FlowLogProperties `json:"properties,omitempty"`
5438}
5439
5440// MarshalJSON is the custom marshaler for FlowLogInformation.
5441func (fli FlowLogInformation) MarshalJSON() ([]byte, error) {
5442	objectMap := make(map[string]interface{})
5443	if fli.TargetResourceID != nil {
5444		objectMap["targetResourceId"] = fli.TargetResourceID
5445	}
5446	if fli.FlowLogProperties != nil {
5447		objectMap["properties"] = fli.FlowLogProperties
5448	}
5449	return json.Marshal(objectMap)
5450}
5451
5452// UnmarshalJSON is the custom unmarshaler for FlowLogInformation struct.
5453func (fli *FlowLogInformation) UnmarshalJSON(body []byte) error {
5454	var m map[string]*json.RawMessage
5455	err := json.Unmarshal(body, &m)
5456	if err != nil {
5457		return err
5458	}
5459	for k, v := range m {
5460		switch k {
5461		case "targetResourceId":
5462			if v != nil {
5463				var targetResourceID string
5464				err = json.Unmarshal(*v, &targetResourceID)
5465				if err != nil {
5466					return err
5467				}
5468				fli.TargetResourceID = &targetResourceID
5469			}
5470		case "properties":
5471			if v != nil {
5472				var flowLogProperties FlowLogProperties
5473				err = json.Unmarshal(*v, &flowLogProperties)
5474				if err != nil {
5475					return err
5476				}
5477				fli.FlowLogProperties = &flowLogProperties
5478			}
5479		}
5480	}
5481
5482	return nil
5483}
5484
5485// FlowLogProperties parameters that define the configuration of flow log.
5486type FlowLogProperties struct {
5487	// StorageID - ID of the storage account which is used to store the flow log.
5488	StorageID *string `json:"storageId,omitempty"`
5489	// Enabled - Flag to enable/disable flow logging.
5490	Enabled         *bool                      `json:"enabled,omitempty"`
5491	RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"`
5492}
5493
5494// FlowLogStatusParameters parameters that define a resource to query flow log status.
5495type FlowLogStatusParameters struct {
5496	// TargetResourceID - The target resource where getting the flow logging status.
5497	TargetResourceID *string `json:"targetResourceId,omitempty"`
5498}
5499
5500// FrontendIPConfiguration frontend IP address of the load balancer.
5501type FrontendIPConfiguration struct {
5502	autorest.Response `json:"-"`
5503	// FrontendIPConfigurationPropertiesFormat - Properties of the load balancer probe.
5504	*FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"`
5505	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
5506	Name *string `json:"name,omitempty"`
5507	// Etag - A unique read-only string that changes whenever the resource is updated.
5508	Etag *string `json:"etag,omitempty"`
5509	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
5510	Zones *[]string `json:"zones,omitempty"`
5511	// ID - Resource ID.
5512	ID *string `json:"id,omitempty"`
5513}
5514
5515// MarshalJSON is the custom marshaler for FrontendIPConfiguration.
5516func (fic FrontendIPConfiguration) MarshalJSON() ([]byte, error) {
5517	objectMap := make(map[string]interface{})
5518	if fic.FrontendIPConfigurationPropertiesFormat != nil {
5519		objectMap["properties"] = fic.FrontendIPConfigurationPropertiesFormat
5520	}
5521	if fic.Name != nil {
5522		objectMap["name"] = fic.Name
5523	}
5524	if fic.Etag != nil {
5525		objectMap["etag"] = fic.Etag
5526	}
5527	if fic.Zones != nil {
5528		objectMap["zones"] = fic.Zones
5529	}
5530	if fic.ID != nil {
5531		objectMap["id"] = fic.ID
5532	}
5533	return json.Marshal(objectMap)
5534}
5535
5536// UnmarshalJSON is the custom unmarshaler for FrontendIPConfiguration struct.
5537func (fic *FrontendIPConfiguration) UnmarshalJSON(body []byte) error {
5538	var m map[string]*json.RawMessage
5539	err := json.Unmarshal(body, &m)
5540	if err != nil {
5541		return err
5542	}
5543	for k, v := range m {
5544		switch k {
5545		case "properties":
5546			if v != nil {
5547				var frontendIPConfigurationPropertiesFormat FrontendIPConfigurationPropertiesFormat
5548				err = json.Unmarshal(*v, &frontendIPConfigurationPropertiesFormat)
5549				if err != nil {
5550					return err
5551				}
5552				fic.FrontendIPConfigurationPropertiesFormat = &frontendIPConfigurationPropertiesFormat
5553			}
5554		case "name":
5555			if v != nil {
5556				var name string
5557				err = json.Unmarshal(*v, &name)
5558				if err != nil {
5559					return err
5560				}
5561				fic.Name = &name
5562			}
5563		case "etag":
5564			if v != nil {
5565				var etag string
5566				err = json.Unmarshal(*v, &etag)
5567				if err != nil {
5568					return err
5569				}
5570				fic.Etag = &etag
5571			}
5572		case "zones":
5573			if v != nil {
5574				var zones []string
5575				err = json.Unmarshal(*v, &zones)
5576				if err != nil {
5577					return err
5578				}
5579				fic.Zones = &zones
5580			}
5581		case "id":
5582			if v != nil {
5583				var ID string
5584				err = json.Unmarshal(*v, &ID)
5585				if err != nil {
5586					return err
5587				}
5588				fic.ID = &ID
5589			}
5590		}
5591	}
5592
5593	return nil
5594}
5595
5596// FrontendIPConfigurationPropertiesFormat properties of Frontend IP Configuration of the load balancer.
5597type FrontendIPConfigurationPropertiesFormat struct {
5598	// InboundNatRules - READ-ONLY; Read only. Inbound rules URIs that use this frontend IP.
5599	InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"`
5600	// InboundNatPools - READ-ONLY; Read only. Inbound pools URIs that use this frontend IP.
5601	InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"`
5602	// OutboundNatRules - READ-ONLY; Read only. Outbound rules URIs that use this frontend IP.
5603	OutboundNatRules *[]SubResource `json:"outboundNatRules,omitempty"`
5604	// LoadBalancingRules - READ-ONLY; Gets load balancing rules URIs that use this frontend IP.
5605	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
5606	// PrivateIPAddress - The private IP address of the IP configuration.
5607	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
5608	// PrivateIPAllocationMethod - The Private IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
5609	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
5610	// Subnet - The reference of the subnet resource.
5611	Subnet *Subnet `json:"subnet,omitempty"`
5612	// PublicIPAddress - The reference of the Public IP resource.
5613	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
5614	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
5615	ProvisioningState *string `json:"provisioningState,omitempty"`
5616}
5617
5618// MarshalJSON is the custom marshaler for FrontendIPConfigurationPropertiesFormat.
5619func (ficpf FrontendIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
5620	objectMap := make(map[string]interface{})
5621	if ficpf.PrivateIPAddress != nil {
5622		objectMap["privateIPAddress"] = ficpf.PrivateIPAddress
5623	}
5624	if ficpf.PrivateIPAllocationMethod != "" {
5625		objectMap["privateIPAllocationMethod"] = ficpf.PrivateIPAllocationMethod
5626	}
5627	if ficpf.Subnet != nil {
5628		objectMap["subnet"] = ficpf.Subnet
5629	}
5630	if ficpf.PublicIPAddress != nil {
5631		objectMap["publicIPAddress"] = ficpf.PublicIPAddress
5632	}
5633	if ficpf.ProvisioningState != nil {
5634		objectMap["provisioningState"] = ficpf.ProvisioningState
5635	}
5636	return json.Marshal(objectMap)
5637}
5638
5639// GatewayRoute gateway routing details
5640type GatewayRoute struct {
5641	// LocalAddress - READ-ONLY; The gateway's local address
5642	LocalAddress *string `json:"localAddress,omitempty"`
5643	// NetworkProperty - READ-ONLY; The route's network prefix
5644	NetworkProperty *string `json:"network,omitempty"`
5645	// NextHop - READ-ONLY; The route's next hop
5646	NextHop *string `json:"nextHop,omitempty"`
5647	// SourcePeer - READ-ONLY; The peer this route was learned from
5648	SourcePeer *string `json:"sourcePeer,omitempty"`
5649	// Origin - READ-ONLY; The source this route was learned from
5650	Origin *string `json:"origin,omitempty"`
5651	// AsPath - READ-ONLY; The route's AS path sequence
5652	AsPath *string `json:"asPath,omitempty"`
5653	// Weight - READ-ONLY; The route's weight
5654	Weight *int32 `json:"weight,omitempty"`
5655}
5656
5657// GatewayRouteListResult list of virtual network gateway routes
5658type GatewayRouteListResult struct {
5659	autorest.Response `json:"-"`
5660	// Value - List of gateway routes
5661	Value *[]GatewayRoute `json:"value,omitempty"`
5662}
5663
5664// InboundNatPool inbound NAT pool of the load balancer.
5665type InboundNatPool struct {
5666	// InboundNatPoolPropertiesFormat - Properties of load balancer inbound nat pool.
5667	*InboundNatPoolPropertiesFormat `json:"properties,omitempty"`
5668	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
5669	Name *string `json:"name,omitempty"`
5670	// Etag - A unique read-only string that changes whenever the resource is updated.
5671	Etag *string `json:"etag,omitempty"`
5672	// ID - Resource ID.
5673	ID *string `json:"id,omitempty"`
5674}
5675
5676// MarshalJSON is the custom marshaler for InboundNatPool.
5677func (inp InboundNatPool) MarshalJSON() ([]byte, error) {
5678	objectMap := make(map[string]interface{})
5679	if inp.InboundNatPoolPropertiesFormat != nil {
5680		objectMap["properties"] = inp.InboundNatPoolPropertiesFormat
5681	}
5682	if inp.Name != nil {
5683		objectMap["name"] = inp.Name
5684	}
5685	if inp.Etag != nil {
5686		objectMap["etag"] = inp.Etag
5687	}
5688	if inp.ID != nil {
5689		objectMap["id"] = inp.ID
5690	}
5691	return json.Marshal(objectMap)
5692}
5693
5694// UnmarshalJSON is the custom unmarshaler for InboundNatPool struct.
5695func (inp *InboundNatPool) UnmarshalJSON(body []byte) error {
5696	var m map[string]*json.RawMessage
5697	err := json.Unmarshal(body, &m)
5698	if err != nil {
5699		return err
5700	}
5701	for k, v := range m {
5702		switch k {
5703		case "properties":
5704			if v != nil {
5705				var inboundNatPoolPropertiesFormat InboundNatPoolPropertiesFormat
5706				err = json.Unmarshal(*v, &inboundNatPoolPropertiesFormat)
5707				if err != nil {
5708					return err
5709				}
5710				inp.InboundNatPoolPropertiesFormat = &inboundNatPoolPropertiesFormat
5711			}
5712		case "name":
5713			if v != nil {
5714				var name string
5715				err = json.Unmarshal(*v, &name)
5716				if err != nil {
5717					return err
5718				}
5719				inp.Name = &name
5720			}
5721		case "etag":
5722			if v != nil {
5723				var etag string
5724				err = json.Unmarshal(*v, &etag)
5725				if err != nil {
5726					return err
5727				}
5728				inp.Etag = &etag
5729			}
5730		case "id":
5731			if v != nil {
5732				var ID string
5733				err = json.Unmarshal(*v, &ID)
5734				if err != nil {
5735					return err
5736				}
5737				inp.ID = &ID
5738			}
5739		}
5740	}
5741
5742	return nil
5743}
5744
5745// InboundNatPoolPropertiesFormat properties of Inbound NAT pool.
5746type InboundNatPoolPropertiesFormat struct {
5747	// FrontendIPConfiguration - A reference to frontend IP addresses.
5748	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
5749	// Protocol - Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
5750	Protocol TransportProtocol `json:"protocol,omitempty"`
5751	// 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.
5752	FrontendPortRangeStart *int32 `json:"frontendPortRangeStart,omitempty"`
5753	// 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.
5754	FrontendPortRangeEnd *int32 `json:"frontendPortRangeEnd,omitempty"`
5755	// BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 1 and 65535.
5756	BackendPort *int32 `json:"backendPort,omitempty"`
5757	// 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.
5758	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
5759	// 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.
5760	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
5761	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
5762	ProvisioningState *string `json:"provisioningState,omitempty"`
5763}
5764
5765// InboundNatRule inbound NAT rule of the load balancer.
5766type InboundNatRule struct {
5767	autorest.Response `json:"-"`
5768	// InboundNatRulePropertiesFormat - Properties of load balancer inbound nat rule.
5769	*InboundNatRulePropertiesFormat `json:"properties,omitempty"`
5770	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
5771	Name *string `json:"name,omitempty"`
5772	// Etag - A unique read-only string that changes whenever the resource is updated.
5773	Etag *string `json:"etag,omitempty"`
5774	// ID - Resource ID.
5775	ID *string `json:"id,omitempty"`
5776}
5777
5778// MarshalJSON is the custom marshaler for InboundNatRule.
5779func (inr InboundNatRule) MarshalJSON() ([]byte, error) {
5780	objectMap := make(map[string]interface{})
5781	if inr.InboundNatRulePropertiesFormat != nil {
5782		objectMap["properties"] = inr.InboundNatRulePropertiesFormat
5783	}
5784	if inr.Name != nil {
5785		objectMap["name"] = inr.Name
5786	}
5787	if inr.Etag != nil {
5788		objectMap["etag"] = inr.Etag
5789	}
5790	if inr.ID != nil {
5791		objectMap["id"] = inr.ID
5792	}
5793	return json.Marshal(objectMap)
5794}
5795
5796// UnmarshalJSON is the custom unmarshaler for InboundNatRule struct.
5797func (inr *InboundNatRule) UnmarshalJSON(body []byte) error {
5798	var m map[string]*json.RawMessage
5799	err := json.Unmarshal(body, &m)
5800	if err != nil {
5801		return err
5802	}
5803	for k, v := range m {
5804		switch k {
5805		case "properties":
5806			if v != nil {
5807				var inboundNatRulePropertiesFormat InboundNatRulePropertiesFormat
5808				err = json.Unmarshal(*v, &inboundNatRulePropertiesFormat)
5809				if err != nil {
5810					return err
5811				}
5812				inr.InboundNatRulePropertiesFormat = &inboundNatRulePropertiesFormat
5813			}
5814		case "name":
5815			if v != nil {
5816				var name string
5817				err = json.Unmarshal(*v, &name)
5818				if err != nil {
5819					return err
5820				}
5821				inr.Name = &name
5822			}
5823		case "etag":
5824			if v != nil {
5825				var etag string
5826				err = json.Unmarshal(*v, &etag)
5827				if err != nil {
5828					return err
5829				}
5830				inr.Etag = &etag
5831			}
5832		case "id":
5833			if v != nil {
5834				var ID string
5835				err = json.Unmarshal(*v, &ID)
5836				if err != nil {
5837					return err
5838				}
5839				inr.ID = &ID
5840			}
5841		}
5842	}
5843
5844	return nil
5845}
5846
5847// InboundNatRuleListResult response for ListInboundNatRule API service call.
5848type InboundNatRuleListResult struct {
5849	autorest.Response `json:"-"`
5850	// Value - A list of inbound nat rules in a load balancer.
5851	Value *[]InboundNatRule `json:"value,omitempty"`
5852	// NextLink - READ-ONLY; The URL to get the next set of results.
5853	NextLink *string `json:"nextLink,omitempty"`
5854}
5855
5856// MarshalJSON is the custom marshaler for InboundNatRuleListResult.
5857func (inrlr InboundNatRuleListResult) MarshalJSON() ([]byte, error) {
5858	objectMap := make(map[string]interface{})
5859	if inrlr.Value != nil {
5860		objectMap["value"] = inrlr.Value
5861	}
5862	return json.Marshal(objectMap)
5863}
5864
5865// InboundNatRuleListResultIterator provides access to a complete listing of InboundNatRule values.
5866type InboundNatRuleListResultIterator struct {
5867	i    int
5868	page InboundNatRuleListResultPage
5869}
5870
5871// NextWithContext advances to the next value.  If there was an error making
5872// the request the iterator does not advance and the error is returned.
5873func (iter *InboundNatRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
5874	if tracing.IsEnabled() {
5875		ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultIterator.NextWithContext")
5876		defer func() {
5877			sc := -1
5878			if iter.Response().Response.Response != nil {
5879				sc = iter.Response().Response.Response.StatusCode
5880			}
5881			tracing.EndSpan(ctx, sc, err)
5882		}()
5883	}
5884	iter.i++
5885	if iter.i < len(iter.page.Values()) {
5886		return nil
5887	}
5888	err = iter.page.NextWithContext(ctx)
5889	if err != nil {
5890		iter.i--
5891		return err
5892	}
5893	iter.i = 0
5894	return nil
5895}
5896
5897// Next advances to the next value.  If there was an error making
5898// the request the iterator does not advance and the error is returned.
5899// Deprecated: Use NextWithContext() instead.
5900func (iter *InboundNatRuleListResultIterator) Next() error {
5901	return iter.NextWithContext(context.Background())
5902}
5903
5904// NotDone returns true if the enumeration should be started or is not yet complete.
5905func (iter InboundNatRuleListResultIterator) NotDone() bool {
5906	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5907}
5908
5909// Response returns the raw server response from the last page request.
5910func (iter InboundNatRuleListResultIterator) Response() InboundNatRuleListResult {
5911	return iter.page.Response()
5912}
5913
5914// Value returns the current value or a zero-initialized value if the
5915// iterator has advanced beyond the end of the collection.
5916func (iter InboundNatRuleListResultIterator) Value() InboundNatRule {
5917	if !iter.page.NotDone() {
5918		return InboundNatRule{}
5919	}
5920	return iter.page.Values()[iter.i]
5921}
5922
5923// Creates a new instance of the InboundNatRuleListResultIterator type.
5924func NewInboundNatRuleListResultIterator(page InboundNatRuleListResultPage) InboundNatRuleListResultIterator {
5925	return InboundNatRuleListResultIterator{page: page}
5926}
5927
5928// IsEmpty returns true if the ListResult contains no values.
5929func (inrlr InboundNatRuleListResult) IsEmpty() bool {
5930	return inrlr.Value == nil || len(*inrlr.Value) == 0
5931}
5932
5933// hasNextLink returns true if the NextLink is not empty.
5934func (inrlr InboundNatRuleListResult) hasNextLink() bool {
5935	return inrlr.NextLink != nil && len(*inrlr.NextLink) != 0
5936}
5937
5938// inboundNatRuleListResultPreparer prepares a request to retrieve the next set of results.
5939// It returns nil if no more results exist.
5940func (inrlr InboundNatRuleListResult) inboundNatRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
5941	if !inrlr.hasNextLink() {
5942		return nil, nil
5943	}
5944	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5945		autorest.AsJSON(),
5946		autorest.AsGet(),
5947		autorest.WithBaseURL(to.String(inrlr.NextLink)))
5948}
5949
5950// InboundNatRuleListResultPage contains a page of InboundNatRule values.
5951type InboundNatRuleListResultPage struct {
5952	fn    func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)
5953	inrlr InboundNatRuleListResult
5954}
5955
5956// NextWithContext advances to the next page of values.  If there was an error making
5957// the request the page does not advance and the error is returned.
5958func (page *InboundNatRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
5959	if tracing.IsEnabled() {
5960		ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultPage.NextWithContext")
5961		defer func() {
5962			sc := -1
5963			if page.Response().Response.Response != nil {
5964				sc = page.Response().Response.Response.StatusCode
5965			}
5966			tracing.EndSpan(ctx, sc, err)
5967		}()
5968	}
5969	for {
5970		next, err := page.fn(ctx, page.inrlr)
5971		if err != nil {
5972			return err
5973		}
5974		page.inrlr = next
5975		if !next.hasNextLink() || !next.IsEmpty() {
5976			break
5977		}
5978	}
5979	return nil
5980}
5981
5982// Next advances to the next page of values.  If there was an error making
5983// the request the page does not advance and the error is returned.
5984// Deprecated: Use NextWithContext() instead.
5985func (page *InboundNatRuleListResultPage) Next() error {
5986	return page.NextWithContext(context.Background())
5987}
5988
5989// NotDone returns true if the page enumeration should be started or is not yet complete.
5990func (page InboundNatRuleListResultPage) NotDone() bool {
5991	return !page.inrlr.IsEmpty()
5992}
5993
5994// Response returns the raw server response from the last page request.
5995func (page InboundNatRuleListResultPage) Response() InboundNatRuleListResult {
5996	return page.inrlr
5997}
5998
5999// Values returns the slice of values for the current page or nil if there are no values.
6000func (page InboundNatRuleListResultPage) Values() []InboundNatRule {
6001	if page.inrlr.IsEmpty() {
6002		return nil
6003	}
6004	return *page.inrlr.Value
6005}
6006
6007// Creates a new instance of the InboundNatRuleListResultPage type.
6008func NewInboundNatRuleListResultPage(cur InboundNatRuleListResult, getNextPage func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)) InboundNatRuleListResultPage {
6009	return InboundNatRuleListResultPage{
6010		fn:    getNextPage,
6011		inrlr: cur,
6012	}
6013}
6014
6015// InboundNatRulePropertiesFormat properties of the inbound NAT rule.
6016type InboundNatRulePropertiesFormat struct {
6017	// FrontendIPConfiguration - A reference to frontend IP addresses.
6018	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
6019	// 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.
6020	BackendIPConfiguration *InterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"`
6021	// Protocol - Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
6022	Protocol TransportProtocol `json:"protocol,omitempty"`
6023	// 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.
6024	FrontendPort *int32 `json:"frontendPort,omitempty"`
6025	// BackendPort - The port used for the internal endpoint. Acceptable values range from 1 to 65535.
6026	BackendPort *int32 `json:"backendPort,omitempty"`
6027	// 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.
6028	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
6029	// 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.
6030	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
6031	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
6032	ProvisioningState *string `json:"provisioningState,omitempty"`
6033}
6034
6035// MarshalJSON is the custom marshaler for InboundNatRulePropertiesFormat.
6036func (inrpf InboundNatRulePropertiesFormat) MarshalJSON() ([]byte, error) {
6037	objectMap := make(map[string]interface{})
6038	if inrpf.FrontendIPConfiguration != nil {
6039		objectMap["frontendIPConfiguration"] = inrpf.FrontendIPConfiguration
6040	}
6041	if inrpf.Protocol != "" {
6042		objectMap["protocol"] = inrpf.Protocol
6043	}
6044	if inrpf.FrontendPort != nil {
6045		objectMap["frontendPort"] = inrpf.FrontendPort
6046	}
6047	if inrpf.BackendPort != nil {
6048		objectMap["backendPort"] = inrpf.BackendPort
6049	}
6050	if inrpf.IdleTimeoutInMinutes != nil {
6051		objectMap["idleTimeoutInMinutes"] = inrpf.IdleTimeoutInMinutes
6052	}
6053	if inrpf.EnableFloatingIP != nil {
6054		objectMap["enableFloatingIP"] = inrpf.EnableFloatingIP
6055	}
6056	if inrpf.ProvisioningState != nil {
6057		objectMap["provisioningState"] = inrpf.ProvisioningState
6058	}
6059	return json.Marshal(objectMap)
6060}
6061
6062// InboundNatRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
6063// long-running operation.
6064type InboundNatRulesCreateOrUpdateFuture struct {
6065	azure.FutureAPI
6066	// Result returns the result of the asynchronous operation.
6067	// If the operation has not completed it will return an error.
6068	Result func(InboundNatRulesClient) (InboundNatRule, error)
6069}
6070
6071// InboundNatRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
6072// operation.
6073type InboundNatRulesDeleteFuture struct {
6074	azure.FutureAPI
6075	// Result returns the result of the asynchronous operation.
6076	// If the operation has not completed it will return an error.
6077	Result func(InboundNatRulesClient) (autorest.Response, error)
6078}
6079
6080// Interface a network interface in a resource group.
6081type Interface struct {
6082	autorest.Response `json:"-"`
6083	// InterfacePropertiesFormat - Properties of the network interface.
6084	*InterfacePropertiesFormat `json:"properties,omitempty"`
6085	// Etag - A unique read-only string that changes whenever the resource is updated.
6086	Etag *string `json:"etag,omitempty"`
6087	// ID - Resource ID.
6088	ID *string `json:"id,omitempty"`
6089	// Name - READ-ONLY; Resource name.
6090	Name *string `json:"name,omitempty"`
6091	// Type - READ-ONLY; Resource type.
6092	Type *string `json:"type,omitempty"`
6093	// Location - Resource location.
6094	Location *string `json:"location,omitempty"`
6095	// Tags - Resource tags.
6096	Tags map[string]*string `json:"tags"`
6097}
6098
6099// MarshalJSON is the custom marshaler for Interface.
6100func (i Interface) MarshalJSON() ([]byte, error) {
6101	objectMap := make(map[string]interface{})
6102	if i.InterfacePropertiesFormat != nil {
6103		objectMap["properties"] = i.InterfacePropertiesFormat
6104	}
6105	if i.Etag != nil {
6106		objectMap["etag"] = i.Etag
6107	}
6108	if i.ID != nil {
6109		objectMap["id"] = i.ID
6110	}
6111	if i.Location != nil {
6112		objectMap["location"] = i.Location
6113	}
6114	if i.Tags != nil {
6115		objectMap["tags"] = i.Tags
6116	}
6117	return json.Marshal(objectMap)
6118}
6119
6120// UnmarshalJSON is the custom unmarshaler for Interface struct.
6121func (i *Interface) UnmarshalJSON(body []byte) error {
6122	var m map[string]*json.RawMessage
6123	err := json.Unmarshal(body, &m)
6124	if err != nil {
6125		return err
6126	}
6127	for k, v := range m {
6128		switch k {
6129		case "properties":
6130			if v != nil {
6131				var interfacePropertiesFormat InterfacePropertiesFormat
6132				err = json.Unmarshal(*v, &interfacePropertiesFormat)
6133				if err != nil {
6134					return err
6135				}
6136				i.InterfacePropertiesFormat = &interfacePropertiesFormat
6137			}
6138		case "etag":
6139			if v != nil {
6140				var etag string
6141				err = json.Unmarshal(*v, &etag)
6142				if err != nil {
6143					return err
6144				}
6145				i.Etag = &etag
6146			}
6147		case "id":
6148			if v != nil {
6149				var ID string
6150				err = json.Unmarshal(*v, &ID)
6151				if err != nil {
6152					return err
6153				}
6154				i.ID = &ID
6155			}
6156		case "name":
6157			if v != nil {
6158				var name string
6159				err = json.Unmarshal(*v, &name)
6160				if err != nil {
6161					return err
6162				}
6163				i.Name = &name
6164			}
6165		case "type":
6166			if v != nil {
6167				var typeVar string
6168				err = json.Unmarshal(*v, &typeVar)
6169				if err != nil {
6170					return err
6171				}
6172				i.Type = &typeVar
6173			}
6174		case "location":
6175			if v != nil {
6176				var location string
6177				err = json.Unmarshal(*v, &location)
6178				if err != nil {
6179					return err
6180				}
6181				i.Location = &location
6182			}
6183		case "tags":
6184			if v != nil {
6185				var tags map[string]*string
6186				err = json.Unmarshal(*v, &tags)
6187				if err != nil {
6188					return err
6189				}
6190				i.Tags = tags
6191			}
6192		}
6193	}
6194
6195	return nil
6196}
6197
6198// InterfaceAssociation network interface and its custom security rules.
6199type InterfaceAssociation struct {
6200	// ID - READ-ONLY; Network interface ID.
6201	ID *string `json:"id,omitempty"`
6202	// SecurityRules - Collection of custom security rules.
6203	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
6204}
6205
6206// MarshalJSON is the custom marshaler for InterfaceAssociation.
6207func (ia InterfaceAssociation) MarshalJSON() ([]byte, error) {
6208	objectMap := make(map[string]interface{})
6209	if ia.SecurityRules != nil {
6210		objectMap["securityRules"] = ia.SecurityRules
6211	}
6212	return json.Marshal(objectMap)
6213}
6214
6215// InterfaceDNSSettings DNS settings of a network interface.
6216type InterfaceDNSSettings struct {
6217	// 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.
6218	DNSServers *[]string `json:"dnsServers,omitempty"`
6219	// 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.
6220	AppliedDNSServers *[]string `json:"appliedDnsServers,omitempty"`
6221	// InternalDNSNameLabel - Relative DNS name for this NIC used for internal communications between VMs in the same virtual network.
6222	InternalDNSNameLabel *string `json:"internalDnsNameLabel,omitempty"`
6223	// InternalFqdn - Fully qualified DNS name supporting internal communications between VMs in the same virtual network.
6224	InternalFqdn *string `json:"internalFqdn,omitempty"`
6225	// 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.
6226	InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"`
6227}
6228
6229// InterfaceIPConfiguration iPConfiguration in a network interface.
6230type InterfaceIPConfiguration struct {
6231	autorest.Response `json:"-"`
6232	// InterfaceIPConfigurationPropertiesFormat - Network interface IP configuration properties.
6233	*InterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"`
6234	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
6235	Name *string `json:"name,omitempty"`
6236	// Etag - A unique read-only string that changes whenever the resource is updated.
6237	Etag *string `json:"etag,omitempty"`
6238	// ID - Resource ID.
6239	ID *string `json:"id,omitempty"`
6240}
6241
6242// MarshalJSON is the custom marshaler for InterfaceIPConfiguration.
6243func (iic InterfaceIPConfiguration) MarshalJSON() ([]byte, error) {
6244	objectMap := make(map[string]interface{})
6245	if iic.InterfaceIPConfigurationPropertiesFormat != nil {
6246		objectMap["properties"] = iic.InterfaceIPConfigurationPropertiesFormat
6247	}
6248	if iic.Name != nil {
6249		objectMap["name"] = iic.Name
6250	}
6251	if iic.Etag != nil {
6252		objectMap["etag"] = iic.Etag
6253	}
6254	if iic.ID != nil {
6255		objectMap["id"] = iic.ID
6256	}
6257	return json.Marshal(objectMap)
6258}
6259
6260// UnmarshalJSON is the custom unmarshaler for InterfaceIPConfiguration struct.
6261func (iic *InterfaceIPConfiguration) UnmarshalJSON(body []byte) error {
6262	var m map[string]*json.RawMessage
6263	err := json.Unmarshal(body, &m)
6264	if err != nil {
6265		return err
6266	}
6267	for k, v := range m {
6268		switch k {
6269		case "properties":
6270			if v != nil {
6271				var interfaceIPConfigurationPropertiesFormat InterfaceIPConfigurationPropertiesFormat
6272				err = json.Unmarshal(*v, &interfaceIPConfigurationPropertiesFormat)
6273				if err != nil {
6274					return err
6275				}
6276				iic.InterfaceIPConfigurationPropertiesFormat = &interfaceIPConfigurationPropertiesFormat
6277			}
6278		case "name":
6279			if v != nil {
6280				var name string
6281				err = json.Unmarshal(*v, &name)
6282				if err != nil {
6283					return err
6284				}
6285				iic.Name = &name
6286			}
6287		case "etag":
6288			if v != nil {
6289				var etag string
6290				err = json.Unmarshal(*v, &etag)
6291				if err != nil {
6292					return err
6293				}
6294				iic.Etag = &etag
6295			}
6296		case "id":
6297			if v != nil {
6298				var ID string
6299				err = json.Unmarshal(*v, &ID)
6300				if err != nil {
6301					return err
6302				}
6303				iic.ID = &ID
6304			}
6305		}
6306	}
6307
6308	return nil
6309}
6310
6311// InterfaceIPConfigurationListResult response for list ip configurations API service call.
6312type InterfaceIPConfigurationListResult struct {
6313	autorest.Response `json:"-"`
6314	// Value - A list of ip configurations.
6315	Value *[]InterfaceIPConfiguration `json:"value,omitempty"`
6316	// NextLink - READ-ONLY; The URL to get the next set of results.
6317	NextLink *string `json:"nextLink,omitempty"`
6318}
6319
6320// MarshalJSON is the custom marshaler for InterfaceIPConfigurationListResult.
6321func (iiclr InterfaceIPConfigurationListResult) MarshalJSON() ([]byte, error) {
6322	objectMap := make(map[string]interface{})
6323	if iiclr.Value != nil {
6324		objectMap["value"] = iiclr.Value
6325	}
6326	return json.Marshal(objectMap)
6327}
6328
6329// InterfaceIPConfigurationListResultIterator provides access to a complete listing of
6330// InterfaceIPConfiguration values.
6331type InterfaceIPConfigurationListResultIterator struct {
6332	i    int
6333	page InterfaceIPConfigurationListResultPage
6334}
6335
6336// NextWithContext advances to the next value.  If there was an error making
6337// the request the iterator does not advance and the error is returned.
6338func (iter *InterfaceIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
6339	if tracing.IsEnabled() {
6340		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultIterator.NextWithContext")
6341		defer func() {
6342			sc := -1
6343			if iter.Response().Response.Response != nil {
6344				sc = iter.Response().Response.Response.StatusCode
6345			}
6346			tracing.EndSpan(ctx, sc, err)
6347		}()
6348	}
6349	iter.i++
6350	if iter.i < len(iter.page.Values()) {
6351		return nil
6352	}
6353	err = iter.page.NextWithContext(ctx)
6354	if err != nil {
6355		iter.i--
6356		return err
6357	}
6358	iter.i = 0
6359	return nil
6360}
6361
6362// Next advances to the next value.  If there was an error making
6363// the request the iterator does not advance and the error is returned.
6364// Deprecated: Use NextWithContext() instead.
6365func (iter *InterfaceIPConfigurationListResultIterator) Next() error {
6366	return iter.NextWithContext(context.Background())
6367}
6368
6369// NotDone returns true if the enumeration should be started or is not yet complete.
6370func (iter InterfaceIPConfigurationListResultIterator) NotDone() bool {
6371	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6372}
6373
6374// Response returns the raw server response from the last page request.
6375func (iter InterfaceIPConfigurationListResultIterator) Response() InterfaceIPConfigurationListResult {
6376	return iter.page.Response()
6377}
6378
6379// Value returns the current value or a zero-initialized value if the
6380// iterator has advanced beyond the end of the collection.
6381func (iter InterfaceIPConfigurationListResultIterator) Value() InterfaceIPConfiguration {
6382	if !iter.page.NotDone() {
6383		return InterfaceIPConfiguration{}
6384	}
6385	return iter.page.Values()[iter.i]
6386}
6387
6388// Creates a new instance of the InterfaceIPConfigurationListResultIterator type.
6389func NewInterfaceIPConfigurationListResultIterator(page InterfaceIPConfigurationListResultPage) InterfaceIPConfigurationListResultIterator {
6390	return InterfaceIPConfigurationListResultIterator{page: page}
6391}
6392
6393// IsEmpty returns true if the ListResult contains no values.
6394func (iiclr InterfaceIPConfigurationListResult) IsEmpty() bool {
6395	return iiclr.Value == nil || len(*iiclr.Value) == 0
6396}
6397
6398// hasNextLink returns true if the NextLink is not empty.
6399func (iiclr InterfaceIPConfigurationListResult) hasNextLink() bool {
6400	return iiclr.NextLink != nil && len(*iiclr.NextLink) != 0
6401}
6402
6403// interfaceIPConfigurationListResultPreparer prepares a request to retrieve the next set of results.
6404// It returns nil if no more results exist.
6405func (iiclr InterfaceIPConfigurationListResult) interfaceIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
6406	if !iiclr.hasNextLink() {
6407		return nil, nil
6408	}
6409	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6410		autorest.AsJSON(),
6411		autorest.AsGet(),
6412		autorest.WithBaseURL(to.String(iiclr.NextLink)))
6413}
6414
6415// InterfaceIPConfigurationListResultPage contains a page of InterfaceIPConfiguration values.
6416type InterfaceIPConfigurationListResultPage struct {
6417	fn    func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)
6418	iiclr InterfaceIPConfigurationListResult
6419}
6420
6421// NextWithContext advances to the next page of values.  If there was an error making
6422// the request the page does not advance and the error is returned.
6423func (page *InterfaceIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
6424	if tracing.IsEnabled() {
6425		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultPage.NextWithContext")
6426		defer func() {
6427			sc := -1
6428			if page.Response().Response.Response != nil {
6429				sc = page.Response().Response.Response.StatusCode
6430			}
6431			tracing.EndSpan(ctx, sc, err)
6432		}()
6433	}
6434	for {
6435		next, err := page.fn(ctx, page.iiclr)
6436		if err != nil {
6437			return err
6438		}
6439		page.iiclr = next
6440		if !next.hasNextLink() || !next.IsEmpty() {
6441			break
6442		}
6443	}
6444	return nil
6445}
6446
6447// Next advances to the next page of values.  If there was an error making
6448// the request the page does not advance and the error is returned.
6449// Deprecated: Use NextWithContext() instead.
6450func (page *InterfaceIPConfigurationListResultPage) Next() error {
6451	return page.NextWithContext(context.Background())
6452}
6453
6454// NotDone returns true if the page enumeration should be started or is not yet complete.
6455func (page InterfaceIPConfigurationListResultPage) NotDone() bool {
6456	return !page.iiclr.IsEmpty()
6457}
6458
6459// Response returns the raw server response from the last page request.
6460func (page InterfaceIPConfigurationListResultPage) Response() InterfaceIPConfigurationListResult {
6461	return page.iiclr
6462}
6463
6464// Values returns the slice of values for the current page or nil if there are no values.
6465func (page InterfaceIPConfigurationListResultPage) Values() []InterfaceIPConfiguration {
6466	if page.iiclr.IsEmpty() {
6467		return nil
6468	}
6469	return *page.iiclr.Value
6470}
6471
6472// Creates a new instance of the InterfaceIPConfigurationListResultPage type.
6473func NewInterfaceIPConfigurationListResultPage(cur InterfaceIPConfigurationListResult, getNextPage func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)) InterfaceIPConfigurationListResultPage {
6474	return InterfaceIPConfigurationListResultPage{
6475		fn:    getNextPage,
6476		iiclr: cur,
6477	}
6478}
6479
6480// InterfaceIPConfigurationPropertiesFormat properties of IP configuration.
6481type InterfaceIPConfigurationPropertiesFormat struct {
6482	// ApplicationGatewayBackendAddressPools - The reference of ApplicationGatewayBackendAddressPool resource.
6483	ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"`
6484	// LoadBalancerBackendAddressPools - The reference of LoadBalancerBackendAddressPool resource.
6485	LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"`
6486	// LoadBalancerInboundNatRules - A list of references of LoadBalancerInboundNatRules.
6487	LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"`
6488	// PrivateIPAddress - Private IP address of the IP configuration.
6489	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
6490	// PrivateIPAllocationMethod - Defines how a private IP address is assigned. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
6491	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
6492	// 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'
6493	PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
6494	// Subnet - Subnet bound to the IP configuration.
6495	Subnet *Subnet `json:"subnet,omitempty"`
6496	// Primary - Gets whether this is a primary customer address on the network interface.
6497	Primary *bool `json:"primary,omitempty"`
6498	// PublicIPAddress - Public IP address bound to the IP configuration.
6499	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
6500	// ApplicationSecurityGroups - Application security groups in which the IP configuration is included.
6501	ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"`
6502	// ProvisioningState - The provisioning state of the network interface IP configuration. Possible values are: 'Updating', 'Deleting', and 'Failed'.
6503	ProvisioningState *string `json:"provisioningState,omitempty"`
6504}
6505
6506// InterfaceListResult response for the ListNetworkInterface API service call.
6507type InterfaceListResult struct {
6508	autorest.Response `json:"-"`
6509	// Value - A list of network interfaces in a resource group.
6510	Value *[]Interface `json:"value,omitempty"`
6511	// NextLink - READ-ONLY; The URL to get the next set of results.
6512	NextLink *string `json:"nextLink,omitempty"`
6513}
6514
6515// MarshalJSON is the custom marshaler for InterfaceListResult.
6516func (ilr InterfaceListResult) MarshalJSON() ([]byte, error) {
6517	objectMap := make(map[string]interface{})
6518	if ilr.Value != nil {
6519		objectMap["value"] = ilr.Value
6520	}
6521	return json.Marshal(objectMap)
6522}
6523
6524// InterfaceListResultIterator provides access to a complete listing of Interface values.
6525type InterfaceListResultIterator struct {
6526	i    int
6527	page InterfaceListResultPage
6528}
6529
6530// NextWithContext advances to the next value.  If there was an error making
6531// the request the iterator does not advance and the error is returned.
6532func (iter *InterfaceListResultIterator) NextWithContext(ctx context.Context) (err error) {
6533	if tracing.IsEnabled() {
6534		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultIterator.NextWithContext")
6535		defer func() {
6536			sc := -1
6537			if iter.Response().Response.Response != nil {
6538				sc = iter.Response().Response.Response.StatusCode
6539			}
6540			tracing.EndSpan(ctx, sc, err)
6541		}()
6542	}
6543	iter.i++
6544	if iter.i < len(iter.page.Values()) {
6545		return nil
6546	}
6547	err = iter.page.NextWithContext(ctx)
6548	if err != nil {
6549		iter.i--
6550		return err
6551	}
6552	iter.i = 0
6553	return nil
6554}
6555
6556// Next advances to the next value.  If there was an error making
6557// the request the iterator does not advance and the error is returned.
6558// Deprecated: Use NextWithContext() instead.
6559func (iter *InterfaceListResultIterator) Next() error {
6560	return iter.NextWithContext(context.Background())
6561}
6562
6563// NotDone returns true if the enumeration should be started or is not yet complete.
6564func (iter InterfaceListResultIterator) NotDone() bool {
6565	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6566}
6567
6568// Response returns the raw server response from the last page request.
6569func (iter InterfaceListResultIterator) Response() InterfaceListResult {
6570	return iter.page.Response()
6571}
6572
6573// Value returns the current value or a zero-initialized value if the
6574// iterator has advanced beyond the end of the collection.
6575func (iter InterfaceListResultIterator) Value() Interface {
6576	if !iter.page.NotDone() {
6577		return Interface{}
6578	}
6579	return iter.page.Values()[iter.i]
6580}
6581
6582// Creates a new instance of the InterfaceListResultIterator type.
6583func NewInterfaceListResultIterator(page InterfaceListResultPage) InterfaceListResultIterator {
6584	return InterfaceListResultIterator{page: page}
6585}
6586
6587// IsEmpty returns true if the ListResult contains no values.
6588func (ilr InterfaceListResult) IsEmpty() bool {
6589	return ilr.Value == nil || len(*ilr.Value) == 0
6590}
6591
6592// hasNextLink returns true if the NextLink is not empty.
6593func (ilr InterfaceListResult) hasNextLink() bool {
6594	return ilr.NextLink != nil && len(*ilr.NextLink) != 0
6595}
6596
6597// interfaceListResultPreparer prepares a request to retrieve the next set of results.
6598// It returns nil if no more results exist.
6599func (ilr InterfaceListResult) interfaceListResultPreparer(ctx context.Context) (*http.Request, error) {
6600	if !ilr.hasNextLink() {
6601		return nil, nil
6602	}
6603	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6604		autorest.AsJSON(),
6605		autorest.AsGet(),
6606		autorest.WithBaseURL(to.String(ilr.NextLink)))
6607}
6608
6609// InterfaceListResultPage contains a page of Interface values.
6610type InterfaceListResultPage struct {
6611	fn  func(context.Context, InterfaceListResult) (InterfaceListResult, error)
6612	ilr InterfaceListResult
6613}
6614
6615// NextWithContext advances to the next page of values.  If there was an error making
6616// the request the page does not advance and the error is returned.
6617func (page *InterfaceListResultPage) NextWithContext(ctx context.Context) (err error) {
6618	if tracing.IsEnabled() {
6619		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultPage.NextWithContext")
6620		defer func() {
6621			sc := -1
6622			if page.Response().Response.Response != nil {
6623				sc = page.Response().Response.Response.StatusCode
6624			}
6625			tracing.EndSpan(ctx, sc, err)
6626		}()
6627	}
6628	for {
6629		next, err := page.fn(ctx, page.ilr)
6630		if err != nil {
6631			return err
6632		}
6633		page.ilr = next
6634		if !next.hasNextLink() || !next.IsEmpty() {
6635			break
6636		}
6637	}
6638	return nil
6639}
6640
6641// Next advances to the next page of values.  If there was an error making
6642// the request the page does not advance and the error is returned.
6643// Deprecated: Use NextWithContext() instead.
6644func (page *InterfaceListResultPage) Next() error {
6645	return page.NextWithContext(context.Background())
6646}
6647
6648// NotDone returns true if the page enumeration should be started or is not yet complete.
6649func (page InterfaceListResultPage) NotDone() bool {
6650	return !page.ilr.IsEmpty()
6651}
6652
6653// Response returns the raw server response from the last page request.
6654func (page InterfaceListResultPage) Response() InterfaceListResult {
6655	return page.ilr
6656}
6657
6658// Values returns the slice of values for the current page or nil if there are no values.
6659func (page InterfaceListResultPage) Values() []Interface {
6660	if page.ilr.IsEmpty() {
6661		return nil
6662	}
6663	return *page.ilr.Value
6664}
6665
6666// Creates a new instance of the InterfaceListResultPage type.
6667func NewInterfaceListResultPage(cur InterfaceListResult, getNextPage func(context.Context, InterfaceListResult) (InterfaceListResult, error)) InterfaceListResultPage {
6668	return InterfaceListResultPage{
6669		fn:  getNextPage,
6670		ilr: cur,
6671	}
6672}
6673
6674// InterfaceLoadBalancerListResult response for list ip configurations API service call.
6675type InterfaceLoadBalancerListResult struct {
6676	autorest.Response `json:"-"`
6677	// Value - A list of load balancers.
6678	Value *[]LoadBalancer `json:"value,omitempty"`
6679	// NextLink - READ-ONLY; The URL to get the next set of results.
6680	NextLink *string `json:"nextLink,omitempty"`
6681}
6682
6683// MarshalJSON is the custom marshaler for InterfaceLoadBalancerListResult.
6684func (ilblr InterfaceLoadBalancerListResult) MarshalJSON() ([]byte, error) {
6685	objectMap := make(map[string]interface{})
6686	if ilblr.Value != nil {
6687		objectMap["value"] = ilblr.Value
6688	}
6689	return json.Marshal(objectMap)
6690}
6691
6692// InterfaceLoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values.
6693type InterfaceLoadBalancerListResultIterator struct {
6694	i    int
6695	page InterfaceLoadBalancerListResultPage
6696}
6697
6698// NextWithContext advances to the next value.  If there was an error making
6699// the request the iterator does not advance and the error is returned.
6700func (iter *InterfaceLoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) {
6701	if tracing.IsEnabled() {
6702		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultIterator.NextWithContext")
6703		defer func() {
6704			sc := -1
6705			if iter.Response().Response.Response != nil {
6706				sc = iter.Response().Response.Response.StatusCode
6707			}
6708			tracing.EndSpan(ctx, sc, err)
6709		}()
6710	}
6711	iter.i++
6712	if iter.i < len(iter.page.Values()) {
6713		return nil
6714	}
6715	err = iter.page.NextWithContext(ctx)
6716	if err != nil {
6717		iter.i--
6718		return err
6719	}
6720	iter.i = 0
6721	return nil
6722}
6723
6724// Next advances to the next value.  If there was an error making
6725// the request the iterator does not advance and the error is returned.
6726// Deprecated: Use NextWithContext() instead.
6727func (iter *InterfaceLoadBalancerListResultIterator) Next() error {
6728	return iter.NextWithContext(context.Background())
6729}
6730
6731// NotDone returns true if the enumeration should be started or is not yet complete.
6732func (iter InterfaceLoadBalancerListResultIterator) NotDone() bool {
6733	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6734}
6735
6736// Response returns the raw server response from the last page request.
6737func (iter InterfaceLoadBalancerListResultIterator) Response() InterfaceLoadBalancerListResult {
6738	return iter.page.Response()
6739}
6740
6741// Value returns the current value or a zero-initialized value if the
6742// iterator has advanced beyond the end of the collection.
6743func (iter InterfaceLoadBalancerListResultIterator) Value() LoadBalancer {
6744	if !iter.page.NotDone() {
6745		return LoadBalancer{}
6746	}
6747	return iter.page.Values()[iter.i]
6748}
6749
6750// Creates a new instance of the InterfaceLoadBalancerListResultIterator type.
6751func NewInterfaceLoadBalancerListResultIterator(page InterfaceLoadBalancerListResultPage) InterfaceLoadBalancerListResultIterator {
6752	return InterfaceLoadBalancerListResultIterator{page: page}
6753}
6754
6755// IsEmpty returns true if the ListResult contains no values.
6756func (ilblr InterfaceLoadBalancerListResult) IsEmpty() bool {
6757	return ilblr.Value == nil || len(*ilblr.Value) == 0
6758}
6759
6760// hasNextLink returns true if the NextLink is not empty.
6761func (ilblr InterfaceLoadBalancerListResult) hasNextLink() bool {
6762	return ilblr.NextLink != nil && len(*ilblr.NextLink) != 0
6763}
6764
6765// interfaceLoadBalancerListResultPreparer prepares a request to retrieve the next set of results.
6766// It returns nil if no more results exist.
6767func (ilblr InterfaceLoadBalancerListResult) interfaceLoadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) {
6768	if !ilblr.hasNextLink() {
6769		return nil, nil
6770	}
6771	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6772		autorest.AsJSON(),
6773		autorest.AsGet(),
6774		autorest.WithBaseURL(to.String(ilblr.NextLink)))
6775}
6776
6777// InterfaceLoadBalancerListResultPage contains a page of LoadBalancer values.
6778type InterfaceLoadBalancerListResultPage struct {
6779	fn    func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)
6780	ilblr InterfaceLoadBalancerListResult
6781}
6782
6783// NextWithContext advances to the next page of values.  If there was an error making
6784// the request the page does not advance and the error is returned.
6785func (page *InterfaceLoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) {
6786	if tracing.IsEnabled() {
6787		ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultPage.NextWithContext")
6788		defer func() {
6789			sc := -1
6790			if page.Response().Response.Response != nil {
6791				sc = page.Response().Response.Response.StatusCode
6792			}
6793			tracing.EndSpan(ctx, sc, err)
6794		}()
6795	}
6796	for {
6797		next, err := page.fn(ctx, page.ilblr)
6798		if err != nil {
6799			return err
6800		}
6801		page.ilblr = next
6802		if !next.hasNextLink() || !next.IsEmpty() {
6803			break
6804		}
6805	}
6806	return nil
6807}
6808
6809// Next advances to the next page of values.  If there was an error making
6810// the request the page does not advance and the error is returned.
6811// Deprecated: Use NextWithContext() instead.
6812func (page *InterfaceLoadBalancerListResultPage) Next() error {
6813	return page.NextWithContext(context.Background())
6814}
6815
6816// NotDone returns true if the page enumeration should be started or is not yet complete.
6817func (page InterfaceLoadBalancerListResultPage) NotDone() bool {
6818	return !page.ilblr.IsEmpty()
6819}
6820
6821// Response returns the raw server response from the last page request.
6822func (page InterfaceLoadBalancerListResultPage) Response() InterfaceLoadBalancerListResult {
6823	return page.ilblr
6824}
6825
6826// Values returns the slice of values for the current page or nil if there are no values.
6827func (page InterfaceLoadBalancerListResultPage) Values() []LoadBalancer {
6828	if page.ilblr.IsEmpty() {
6829		return nil
6830	}
6831	return *page.ilblr.Value
6832}
6833
6834// Creates a new instance of the InterfaceLoadBalancerListResultPage type.
6835func NewInterfaceLoadBalancerListResultPage(cur InterfaceLoadBalancerListResult, getNextPage func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)) InterfaceLoadBalancerListResultPage {
6836	return InterfaceLoadBalancerListResultPage{
6837		fn:    getNextPage,
6838		ilblr: cur,
6839	}
6840}
6841
6842// InterfacePropertiesFormat networkInterface properties.
6843type InterfacePropertiesFormat struct {
6844	// VirtualMachine - The reference of a virtual machine.
6845	VirtualMachine *SubResource `json:"virtualMachine,omitempty"`
6846	// NetworkSecurityGroup - The reference of the NetworkSecurityGroup resource.
6847	NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"`
6848	// IPConfigurations - A list of IPConfigurations of the network interface.
6849	IPConfigurations *[]InterfaceIPConfiguration `json:"ipConfigurations,omitempty"`
6850	// DNSSettings - The DNS settings in network interface.
6851	DNSSettings *InterfaceDNSSettings `json:"dnsSettings,omitempty"`
6852	// MacAddress - The MAC address of the network interface.
6853	MacAddress *string `json:"macAddress,omitempty"`
6854	// Primary - Gets whether this is a primary network interface on a virtual machine.
6855	Primary *bool `json:"primary,omitempty"`
6856	// EnableAcceleratedNetworking - If the network interface is accelerated networking enabled.
6857	EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"`
6858	// EnableIPForwarding - Indicates whether IP forwarding is enabled on this network interface.
6859	EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"`
6860	// ResourceGUID - The resource GUID property of the network interface resource.
6861	ResourceGUID *string `json:"resourceGuid,omitempty"`
6862	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
6863	ProvisioningState *string `json:"provisioningState,omitempty"`
6864}
6865
6866// InterfacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
6867// long-running operation.
6868type InterfacesCreateOrUpdateFuture struct {
6869	azure.FutureAPI
6870	// Result returns the result of the asynchronous operation.
6871	// If the operation has not completed it will return an error.
6872	Result func(InterfacesClient) (Interface, error)
6873}
6874
6875// InterfacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
6876// operation.
6877type InterfacesDeleteFuture struct {
6878	azure.FutureAPI
6879	// Result returns the result of the asynchronous operation.
6880	// If the operation has not completed it will return an error.
6881	Result func(InterfacesClient) (autorest.Response, error)
6882}
6883
6884// InterfacesGetEffectiveRouteTableFuture an abstraction for monitoring and retrieving the results of a
6885// long-running operation.
6886type InterfacesGetEffectiveRouteTableFuture struct {
6887	azure.FutureAPI
6888	// Result returns the result of the asynchronous operation.
6889	// If the operation has not completed it will return an error.
6890	Result func(InterfacesClient) (EffectiveRouteListResult, error)
6891}
6892
6893// InterfacesListEffectiveNetworkSecurityGroupsFuture an abstraction for monitoring and retrieving the
6894// results of a long-running operation.
6895type InterfacesListEffectiveNetworkSecurityGroupsFuture struct {
6896	azure.FutureAPI
6897	// Result returns the result of the asynchronous operation.
6898	// If the operation has not completed it will return an error.
6899	Result func(InterfacesClient) (EffectiveNetworkSecurityGroupListResult, error)
6900}
6901
6902// InterfacesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
6903// operation.
6904type InterfacesUpdateTagsFuture struct {
6905	azure.FutureAPI
6906	// Result returns the result of the asynchronous operation.
6907	// If the operation has not completed it will return an error.
6908	Result func(InterfacesClient) (Interface, error)
6909}
6910
6911// IPAddressAvailabilityResult response for CheckIPAddressAvailability API service call
6912type IPAddressAvailabilityResult struct {
6913	autorest.Response `json:"-"`
6914	// Available - Private IP address availability.
6915	Available *bool `json:"available,omitempty"`
6916	// AvailableIPAddresses - Contains other available private IP addresses if the asked for address is taken.
6917	AvailableIPAddresses *[]string `json:"availableIPAddresses,omitempty"`
6918}
6919
6920// IPConfiguration IP configuration
6921type IPConfiguration struct {
6922	// IPConfigurationPropertiesFormat - Properties of the IP configuration
6923	*IPConfigurationPropertiesFormat `json:"properties,omitempty"`
6924	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
6925	Name *string `json:"name,omitempty"`
6926	// Etag - A unique read-only string that changes whenever the resource is updated.
6927	Etag *string `json:"etag,omitempty"`
6928	// ID - Resource ID.
6929	ID *string `json:"id,omitempty"`
6930}
6931
6932// MarshalJSON is the custom marshaler for IPConfiguration.
6933func (ic IPConfiguration) MarshalJSON() ([]byte, error) {
6934	objectMap := make(map[string]interface{})
6935	if ic.IPConfigurationPropertiesFormat != nil {
6936		objectMap["properties"] = ic.IPConfigurationPropertiesFormat
6937	}
6938	if ic.Name != nil {
6939		objectMap["name"] = ic.Name
6940	}
6941	if ic.Etag != nil {
6942		objectMap["etag"] = ic.Etag
6943	}
6944	if ic.ID != nil {
6945		objectMap["id"] = ic.ID
6946	}
6947	return json.Marshal(objectMap)
6948}
6949
6950// UnmarshalJSON is the custom unmarshaler for IPConfiguration struct.
6951func (ic *IPConfiguration) UnmarshalJSON(body []byte) error {
6952	var m map[string]*json.RawMessage
6953	err := json.Unmarshal(body, &m)
6954	if err != nil {
6955		return err
6956	}
6957	for k, v := range m {
6958		switch k {
6959		case "properties":
6960			if v != nil {
6961				var IPConfigurationPropertiesFormat IPConfigurationPropertiesFormat
6962				err = json.Unmarshal(*v, &IPConfigurationPropertiesFormat)
6963				if err != nil {
6964					return err
6965				}
6966				ic.IPConfigurationPropertiesFormat = &IPConfigurationPropertiesFormat
6967			}
6968		case "name":
6969			if v != nil {
6970				var name string
6971				err = json.Unmarshal(*v, &name)
6972				if err != nil {
6973					return err
6974				}
6975				ic.Name = &name
6976			}
6977		case "etag":
6978			if v != nil {
6979				var etag string
6980				err = json.Unmarshal(*v, &etag)
6981				if err != nil {
6982					return err
6983				}
6984				ic.Etag = &etag
6985			}
6986		case "id":
6987			if v != nil {
6988				var ID string
6989				err = json.Unmarshal(*v, &ID)
6990				if err != nil {
6991					return err
6992				}
6993				ic.ID = &ID
6994			}
6995		}
6996	}
6997
6998	return nil
6999}
7000
7001// IPConfigurationPropertiesFormat properties of IP configuration.
7002type IPConfigurationPropertiesFormat struct {
7003	// PrivateIPAddress - The private IP address of the IP configuration.
7004	PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
7005	// PrivateIPAllocationMethod - The private IP allocation method. Possible values are 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
7006	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
7007	// Subnet - The reference of the subnet resource.
7008	Subnet *Subnet `json:"subnet,omitempty"`
7009	// PublicIPAddress - The reference of the public IP resource.
7010	PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"`
7011	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
7012	ProvisioningState *string `json:"provisioningState,omitempty"`
7013}
7014
7015// IpsecPolicy an IPSec Policy configuration for a virtual network gateway connection
7016type IpsecPolicy struct {
7017	// SaLifeTimeSeconds - The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for a site to site VPN tunnel.
7018	SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"`
7019	// SaDataSizeKilobytes - The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for a site to site VPN tunnel.
7020	SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"`
7021	// IpsecEncryption - The IPSec encryption algorithm (IKE phase 1). Possible values include: 'IpsecEncryptionNone', 'IpsecEncryptionDES', 'IpsecEncryptionDES3', 'IpsecEncryptionAES128', 'IpsecEncryptionAES192', 'IpsecEncryptionAES256', 'IpsecEncryptionGCMAES128', 'IpsecEncryptionGCMAES192', 'IpsecEncryptionGCMAES256'
7022	IpsecEncryption IpsecEncryption `json:"ipsecEncryption,omitempty"`
7023	// IpsecIntegrity - The IPSec integrity algorithm (IKE phase 1). Possible values include: 'IpsecIntegrityMD5', 'IpsecIntegritySHA1', 'IpsecIntegritySHA256', 'IpsecIntegrityGCMAES128', 'IpsecIntegrityGCMAES192', 'IpsecIntegrityGCMAES256'
7024	IpsecIntegrity IpsecIntegrity `json:"ipsecIntegrity,omitempty"`
7025	// IkeEncryption - The IKE encryption algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256'
7026	IkeEncryption IkeEncryption `json:"ikeEncryption,omitempty"`
7027	// IkeIntegrity - The IKE integrity algorithm (IKE phase 2). Possible values include: 'MD5', 'SHA1', 'SHA256', 'SHA384'
7028	IkeIntegrity IkeIntegrity `json:"ikeIntegrity,omitempty"`
7029	// DhGroup - The DH Groups used in IKE Phase 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24'
7030	DhGroup DhGroup `json:"dhGroup,omitempty"`
7031	// PfsGroup - The DH Groups used in IKE Phase 2 for new child SA. Possible values include: 'PfsGroupNone', 'PfsGroupPFS1', 'PfsGroupPFS2', 'PfsGroupPFS2048', 'PfsGroupECP256', 'PfsGroupECP384', 'PfsGroupPFS24'
7032	PfsGroup PfsGroup `json:"pfsGroup,omitempty"`
7033}
7034
7035// IPTag contains the IpTag associated with the public IP address
7036type IPTag struct {
7037	// IPTagType - Gets or sets the ipTag type: Example FirstPartyUsage.
7038	IPTagType *string `json:"ipTagType,omitempty"`
7039	// Tag - Gets or sets value of the IpTag associated with the public IP. Example SQL, Storage etc
7040	Tag *string `json:"tag,omitempty"`
7041}
7042
7043// Ipv6ExpressRouteCircuitPeeringConfig contains IPv6 peering config.
7044type Ipv6ExpressRouteCircuitPeeringConfig struct {
7045	// PrimaryPeerAddressPrefix - The primary address prefix.
7046	PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"`
7047	// SecondaryPeerAddressPrefix - The secondary address prefix.
7048	SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"`
7049	// MicrosoftPeeringConfig - The Microsoft peering configuration.
7050	MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"`
7051	// RouteFilter - The reference of the RouteFilter resource.
7052	RouteFilter *RouteFilter `json:"routeFilter,omitempty"`
7053	// State - The state of peering. Possible values are: 'Disabled' and 'Enabled'. Possible values include: 'ExpressRouteCircuitPeeringStateDisabled', 'ExpressRouteCircuitPeeringStateEnabled'
7054	State ExpressRouteCircuitPeeringState `json:"state,omitempty"`
7055}
7056
7057// LoadBalancer loadBalancer resource
7058type LoadBalancer struct {
7059	autorest.Response `json:"-"`
7060	// Sku - The load balancer SKU.
7061	Sku *LoadBalancerSku `json:"sku,omitempty"`
7062	// LoadBalancerPropertiesFormat - Properties of load balancer.
7063	*LoadBalancerPropertiesFormat `json:"properties,omitempty"`
7064	// Etag - A unique read-only string that changes whenever the resource is updated.
7065	Etag *string `json:"etag,omitempty"`
7066	// ID - Resource ID.
7067	ID *string `json:"id,omitempty"`
7068	// Name - READ-ONLY; Resource name.
7069	Name *string `json:"name,omitempty"`
7070	// Type - READ-ONLY; Resource type.
7071	Type *string `json:"type,omitempty"`
7072	// Location - Resource location.
7073	Location *string `json:"location,omitempty"`
7074	// Tags - Resource tags.
7075	Tags map[string]*string `json:"tags"`
7076}
7077
7078// MarshalJSON is the custom marshaler for LoadBalancer.
7079func (lb LoadBalancer) MarshalJSON() ([]byte, error) {
7080	objectMap := make(map[string]interface{})
7081	if lb.Sku != nil {
7082		objectMap["sku"] = lb.Sku
7083	}
7084	if lb.LoadBalancerPropertiesFormat != nil {
7085		objectMap["properties"] = lb.LoadBalancerPropertiesFormat
7086	}
7087	if lb.Etag != nil {
7088		objectMap["etag"] = lb.Etag
7089	}
7090	if lb.ID != nil {
7091		objectMap["id"] = lb.ID
7092	}
7093	if lb.Location != nil {
7094		objectMap["location"] = lb.Location
7095	}
7096	if lb.Tags != nil {
7097		objectMap["tags"] = lb.Tags
7098	}
7099	return json.Marshal(objectMap)
7100}
7101
7102// UnmarshalJSON is the custom unmarshaler for LoadBalancer struct.
7103func (lb *LoadBalancer) UnmarshalJSON(body []byte) error {
7104	var m map[string]*json.RawMessage
7105	err := json.Unmarshal(body, &m)
7106	if err != nil {
7107		return err
7108	}
7109	for k, v := range m {
7110		switch k {
7111		case "sku":
7112			if v != nil {
7113				var sku LoadBalancerSku
7114				err = json.Unmarshal(*v, &sku)
7115				if err != nil {
7116					return err
7117				}
7118				lb.Sku = &sku
7119			}
7120		case "properties":
7121			if v != nil {
7122				var loadBalancerPropertiesFormat LoadBalancerPropertiesFormat
7123				err = json.Unmarshal(*v, &loadBalancerPropertiesFormat)
7124				if err != nil {
7125					return err
7126				}
7127				lb.LoadBalancerPropertiesFormat = &loadBalancerPropertiesFormat
7128			}
7129		case "etag":
7130			if v != nil {
7131				var etag string
7132				err = json.Unmarshal(*v, &etag)
7133				if err != nil {
7134					return err
7135				}
7136				lb.Etag = &etag
7137			}
7138		case "id":
7139			if v != nil {
7140				var ID string
7141				err = json.Unmarshal(*v, &ID)
7142				if err != nil {
7143					return err
7144				}
7145				lb.ID = &ID
7146			}
7147		case "name":
7148			if v != nil {
7149				var name string
7150				err = json.Unmarshal(*v, &name)
7151				if err != nil {
7152					return err
7153				}
7154				lb.Name = &name
7155			}
7156		case "type":
7157			if v != nil {
7158				var typeVar string
7159				err = json.Unmarshal(*v, &typeVar)
7160				if err != nil {
7161					return err
7162				}
7163				lb.Type = &typeVar
7164			}
7165		case "location":
7166			if v != nil {
7167				var location string
7168				err = json.Unmarshal(*v, &location)
7169				if err != nil {
7170					return err
7171				}
7172				lb.Location = &location
7173			}
7174		case "tags":
7175			if v != nil {
7176				var tags map[string]*string
7177				err = json.Unmarshal(*v, &tags)
7178				if err != nil {
7179					return err
7180				}
7181				lb.Tags = tags
7182			}
7183		}
7184	}
7185
7186	return nil
7187}
7188
7189// LoadBalancerBackendAddressPoolListResult response for ListBackendAddressPool API service call.
7190type LoadBalancerBackendAddressPoolListResult struct {
7191	autorest.Response `json:"-"`
7192	// Value - A list of backend address pools in a load balancer.
7193	Value *[]BackendAddressPool `json:"value,omitempty"`
7194	// NextLink - READ-ONLY; The URL to get the next set of results.
7195	NextLink *string `json:"nextLink,omitempty"`
7196}
7197
7198// MarshalJSON is the custom marshaler for LoadBalancerBackendAddressPoolListResult.
7199func (lbbaplr LoadBalancerBackendAddressPoolListResult) MarshalJSON() ([]byte, error) {
7200	objectMap := make(map[string]interface{})
7201	if lbbaplr.Value != nil {
7202		objectMap["value"] = lbbaplr.Value
7203	}
7204	return json.Marshal(objectMap)
7205}
7206
7207// LoadBalancerBackendAddressPoolListResultIterator provides access to a complete listing of
7208// BackendAddressPool values.
7209type LoadBalancerBackendAddressPoolListResultIterator struct {
7210	i    int
7211	page LoadBalancerBackendAddressPoolListResultPage
7212}
7213
7214// NextWithContext advances to the next value.  If there was an error making
7215// the request the iterator does not advance and the error is returned.
7216func (iter *LoadBalancerBackendAddressPoolListResultIterator) NextWithContext(ctx context.Context) (err error) {
7217	if tracing.IsEnabled() {
7218		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultIterator.NextWithContext")
7219		defer func() {
7220			sc := -1
7221			if iter.Response().Response.Response != nil {
7222				sc = iter.Response().Response.Response.StatusCode
7223			}
7224			tracing.EndSpan(ctx, sc, err)
7225		}()
7226	}
7227	iter.i++
7228	if iter.i < len(iter.page.Values()) {
7229		return nil
7230	}
7231	err = iter.page.NextWithContext(ctx)
7232	if err != nil {
7233		iter.i--
7234		return err
7235	}
7236	iter.i = 0
7237	return nil
7238}
7239
7240// Next advances to the next value.  If there was an error making
7241// the request the iterator does not advance and the error is returned.
7242// Deprecated: Use NextWithContext() instead.
7243func (iter *LoadBalancerBackendAddressPoolListResultIterator) Next() error {
7244	return iter.NextWithContext(context.Background())
7245}
7246
7247// NotDone returns true if the enumeration should be started or is not yet complete.
7248func (iter LoadBalancerBackendAddressPoolListResultIterator) NotDone() bool {
7249	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7250}
7251
7252// Response returns the raw server response from the last page request.
7253func (iter LoadBalancerBackendAddressPoolListResultIterator) Response() LoadBalancerBackendAddressPoolListResult {
7254	return iter.page.Response()
7255}
7256
7257// Value returns the current value or a zero-initialized value if the
7258// iterator has advanced beyond the end of the collection.
7259func (iter LoadBalancerBackendAddressPoolListResultIterator) Value() BackendAddressPool {
7260	if !iter.page.NotDone() {
7261		return BackendAddressPool{}
7262	}
7263	return iter.page.Values()[iter.i]
7264}
7265
7266// Creates a new instance of the LoadBalancerBackendAddressPoolListResultIterator type.
7267func NewLoadBalancerBackendAddressPoolListResultIterator(page LoadBalancerBackendAddressPoolListResultPage) LoadBalancerBackendAddressPoolListResultIterator {
7268	return LoadBalancerBackendAddressPoolListResultIterator{page: page}
7269}
7270
7271// IsEmpty returns true if the ListResult contains no values.
7272func (lbbaplr LoadBalancerBackendAddressPoolListResult) IsEmpty() bool {
7273	return lbbaplr.Value == nil || len(*lbbaplr.Value) == 0
7274}
7275
7276// hasNextLink returns true if the NextLink is not empty.
7277func (lbbaplr LoadBalancerBackendAddressPoolListResult) hasNextLink() bool {
7278	return lbbaplr.NextLink != nil && len(*lbbaplr.NextLink) != 0
7279}
7280
7281// loadBalancerBackendAddressPoolListResultPreparer prepares a request to retrieve the next set of results.
7282// It returns nil if no more results exist.
7283func (lbbaplr LoadBalancerBackendAddressPoolListResult) loadBalancerBackendAddressPoolListResultPreparer(ctx context.Context) (*http.Request, error) {
7284	if !lbbaplr.hasNextLink() {
7285		return nil, nil
7286	}
7287	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7288		autorest.AsJSON(),
7289		autorest.AsGet(),
7290		autorest.WithBaseURL(to.String(lbbaplr.NextLink)))
7291}
7292
7293// LoadBalancerBackendAddressPoolListResultPage contains a page of BackendAddressPool values.
7294type LoadBalancerBackendAddressPoolListResultPage struct {
7295	fn      func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)
7296	lbbaplr LoadBalancerBackendAddressPoolListResult
7297}
7298
7299// NextWithContext advances to the next page of values.  If there was an error making
7300// the request the page does not advance and the error is returned.
7301func (page *LoadBalancerBackendAddressPoolListResultPage) NextWithContext(ctx context.Context) (err error) {
7302	if tracing.IsEnabled() {
7303		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultPage.NextWithContext")
7304		defer func() {
7305			sc := -1
7306			if page.Response().Response.Response != nil {
7307				sc = page.Response().Response.Response.StatusCode
7308			}
7309			tracing.EndSpan(ctx, sc, err)
7310		}()
7311	}
7312	for {
7313		next, err := page.fn(ctx, page.lbbaplr)
7314		if err != nil {
7315			return err
7316		}
7317		page.lbbaplr = next
7318		if !next.hasNextLink() || !next.IsEmpty() {
7319			break
7320		}
7321	}
7322	return nil
7323}
7324
7325// Next advances to the next page of values.  If there was an error making
7326// the request the page does not advance and the error is returned.
7327// Deprecated: Use NextWithContext() instead.
7328func (page *LoadBalancerBackendAddressPoolListResultPage) Next() error {
7329	return page.NextWithContext(context.Background())
7330}
7331
7332// NotDone returns true if the page enumeration should be started or is not yet complete.
7333func (page LoadBalancerBackendAddressPoolListResultPage) NotDone() bool {
7334	return !page.lbbaplr.IsEmpty()
7335}
7336
7337// Response returns the raw server response from the last page request.
7338func (page LoadBalancerBackendAddressPoolListResultPage) Response() LoadBalancerBackendAddressPoolListResult {
7339	return page.lbbaplr
7340}
7341
7342// Values returns the slice of values for the current page or nil if there are no values.
7343func (page LoadBalancerBackendAddressPoolListResultPage) Values() []BackendAddressPool {
7344	if page.lbbaplr.IsEmpty() {
7345		return nil
7346	}
7347	return *page.lbbaplr.Value
7348}
7349
7350// Creates a new instance of the LoadBalancerBackendAddressPoolListResultPage type.
7351func NewLoadBalancerBackendAddressPoolListResultPage(cur LoadBalancerBackendAddressPoolListResult, getNextPage func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)) LoadBalancerBackendAddressPoolListResultPage {
7352	return LoadBalancerBackendAddressPoolListResultPage{
7353		fn:      getNextPage,
7354		lbbaplr: cur,
7355	}
7356}
7357
7358// LoadBalancerFrontendIPConfigurationListResult response for ListFrontendIPConfiguration API service call.
7359type LoadBalancerFrontendIPConfigurationListResult struct {
7360	autorest.Response `json:"-"`
7361	// Value - A list of frontend IP configurations in a load balancer.
7362	Value *[]FrontendIPConfiguration `json:"value,omitempty"`
7363	// NextLink - READ-ONLY; The URL to get the next set of results.
7364	NextLink *string `json:"nextLink,omitempty"`
7365}
7366
7367// MarshalJSON is the custom marshaler for LoadBalancerFrontendIPConfigurationListResult.
7368func (lbficlr LoadBalancerFrontendIPConfigurationListResult) MarshalJSON() ([]byte, error) {
7369	objectMap := make(map[string]interface{})
7370	if lbficlr.Value != nil {
7371		objectMap["value"] = lbficlr.Value
7372	}
7373	return json.Marshal(objectMap)
7374}
7375
7376// LoadBalancerFrontendIPConfigurationListResultIterator provides access to a complete listing of
7377// FrontendIPConfiguration values.
7378type LoadBalancerFrontendIPConfigurationListResultIterator struct {
7379	i    int
7380	page LoadBalancerFrontendIPConfigurationListResultPage
7381}
7382
7383// NextWithContext advances to the next value.  If there was an error making
7384// the request the iterator does not advance and the error is returned.
7385func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
7386	if tracing.IsEnabled() {
7387		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultIterator.NextWithContext")
7388		defer func() {
7389			sc := -1
7390			if iter.Response().Response.Response != nil {
7391				sc = iter.Response().Response.Response.StatusCode
7392			}
7393			tracing.EndSpan(ctx, sc, err)
7394		}()
7395	}
7396	iter.i++
7397	if iter.i < len(iter.page.Values()) {
7398		return nil
7399	}
7400	err = iter.page.NextWithContext(ctx)
7401	if err != nil {
7402		iter.i--
7403		return err
7404	}
7405	iter.i = 0
7406	return nil
7407}
7408
7409// Next advances to the next value.  If there was an error making
7410// the request the iterator does not advance and the error is returned.
7411// Deprecated: Use NextWithContext() instead.
7412func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) Next() error {
7413	return iter.NextWithContext(context.Background())
7414}
7415
7416// NotDone returns true if the enumeration should be started or is not yet complete.
7417func (iter LoadBalancerFrontendIPConfigurationListResultIterator) NotDone() bool {
7418	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7419}
7420
7421// Response returns the raw server response from the last page request.
7422func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Response() LoadBalancerFrontendIPConfigurationListResult {
7423	return iter.page.Response()
7424}
7425
7426// Value returns the current value or a zero-initialized value if the
7427// iterator has advanced beyond the end of the collection.
7428func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Value() FrontendIPConfiguration {
7429	if !iter.page.NotDone() {
7430		return FrontendIPConfiguration{}
7431	}
7432	return iter.page.Values()[iter.i]
7433}
7434
7435// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultIterator type.
7436func NewLoadBalancerFrontendIPConfigurationListResultIterator(page LoadBalancerFrontendIPConfigurationListResultPage) LoadBalancerFrontendIPConfigurationListResultIterator {
7437	return LoadBalancerFrontendIPConfigurationListResultIterator{page: page}
7438}
7439
7440// IsEmpty returns true if the ListResult contains no values.
7441func (lbficlr LoadBalancerFrontendIPConfigurationListResult) IsEmpty() bool {
7442	return lbficlr.Value == nil || len(*lbficlr.Value) == 0
7443}
7444
7445// hasNextLink returns true if the NextLink is not empty.
7446func (lbficlr LoadBalancerFrontendIPConfigurationListResult) hasNextLink() bool {
7447	return lbficlr.NextLink != nil && len(*lbficlr.NextLink) != 0
7448}
7449
7450// loadBalancerFrontendIPConfigurationListResultPreparer prepares a request to retrieve the next set of results.
7451// It returns nil if no more results exist.
7452func (lbficlr LoadBalancerFrontendIPConfigurationListResult) loadBalancerFrontendIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
7453	if !lbficlr.hasNextLink() {
7454		return nil, nil
7455	}
7456	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7457		autorest.AsJSON(),
7458		autorest.AsGet(),
7459		autorest.WithBaseURL(to.String(lbficlr.NextLink)))
7460}
7461
7462// LoadBalancerFrontendIPConfigurationListResultPage contains a page of FrontendIPConfiguration values.
7463type LoadBalancerFrontendIPConfigurationListResultPage struct {
7464	fn      func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)
7465	lbficlr LoadBalancerFrontendIPConfigurationListResult
7466}
7467
7468// NextWithContext advances to the next page of values.  If there was an error making
7469// the request the page does not advance and the error is returned.
7470func (page *LoadBalancerFrontendIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
7471	if tracing.IsEnabled() {
7472		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultPage.NextWithContext")
7473		defer func() {
7474			sc := -1
7475			if page.Response().Response.Response != nil {
7476				sc = page.Response().Response.Response.StatusCode
7477			}
7478			tracing.EndSpan(ctx, sc, err)
7479		}()
7480	}
7481	for {
7482		next, err := page.fn(ctx, page.lbficlr)
7483		if err != nil {
7484			return err
7485		}
7486		page.lbficlr = next
7487		if !next.hasNextLink() || !next.IsEmpty() {
7488			break
7489		}
7490	}
7491	return nil
7492}
7493
7494// Next advances to the next page of values.  If there was an error making
7495// the request the page does not advance and the error is returned.
7496// Deprecated: Use NextWithContext() instead.
7497func (page *LoadBalancerFrontendIPConfigurationListResultPage) Next() error {
7498	return page.NextWithContext(context.Background())
7499}
7500
7501// NotDone returns true if the page enumeration should be started or is not yet complete.
7502func (page LoadBalancerFrontendIPConfigurationListResultPage) NotDone() bool {
7503	return !page.lbficlr.IsEmpty()
7504}
7505
7506// Response returns the raw server response from the last page request.
7507func (page LoadBalancerFrontendIPConfigurationListResultPage) Response() LoadBalancerFrontendIPConfigurationListResult {
7508	return page.lbficlr
7509}
7510
7511// Values returns the slice of values for the current page or nil if there are no values.
7512func (page LoadBalancerFrontendIPConfigurationListResultPage) Values() []FrontendIPConfiguration {
7513	if page.lbficlr.IsEmpty() {
7514		return nil
7515	}
7516	return *page.lbficlr.Value
7517}
7518
7519// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultPage type.
7520func NewLoadBalancerFrontendIPConfigurationListResultPage(cur LoadBalancerFrontendIPConfigurationListResult, getNextPage func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)) LoadBalancerFrontendIPConfigurationListResultPage {
7521	return LoadBalancerFrontendIPConfigurationListResultPage{
7522		fn:      getNextPage,
7523		lbficlr: cur,
7524	}
7525}
7526
7527// LoadBalancerListResult response for ListLoadBalancers API service call.
7528type LoadBalancerListResult struct {
7529	autorest.Response `json:"-"`
7530	// Value - A list of load balancers in a resource group.
7531	Value *[]LoadBalancer `json:"value,omitempty"`
7532	// NextLink - READ-ONLY; The URL to get the next set of results.
7533	NextLink *string `json:"nextLink,omitempty"`
7534}
7535
7536// MarshalJSON is the custom marshaler for LoadBalancerListResult.
7537func (lblr LoadBalancerListResult) MarshalJSON() ([]byte, error) {
7538	objectMap := make(map[string]interface{})
7539	if lblr.Value != nil {
7540		objectMap["value"] = lblr.Value
7541	}
7542	return json.Marshal(objectMap)
7543}
7544
7545// LoadBalancerListResultIterator provides access to a complete listing of LoadBalancer values.
7546type LoadBalancerListResultIterator struct {
7547	i    int
7548	page LoadBalancerListResultPage
7549}
7550
7551// NextWithContext advances to the next value.  If there was an error making
7552// the request the iterator does not advance and the error is returned.
7553func (iter *LoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) {
7554	if tracing.IsEnabled() {
7555		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultIterator.NextWithContext")
7556		defer func() {
7557			sc := -1
7558			if iter.Response().Response.Response != nil {
7559				sc = iter.Response().Response.Response.StatusCode
7560			}
7561			tracing.EndSpan(ctx, sc, err)
7562		}()
7563	}
7564	iter.i++
7565	if iter.i < len(iter.page.Values()) {
7566		return nil
7567	}
7568	err = iter.page.NextWithContext(ctx)
7569	if err != nil {
7570		iter.i--
7571		return err
7572	}
7573	iter.i = 0
7574	return nil
7575}
7576
7577// Next advances to the next value.  If there was an error making
7578// the request the iterator does not advance and the error is returned.
7579// Deprecated: Use NextWithContext() instead.
7580func (iter *LoadBalancerListResultIterator) Next() error {
7581	return iter.NextWithContext(context.Background())
7582}
7583
7584// NotDone returns true if the enumeration should be started or is not yet complete.
7585func (iter LoadBalancerListResultIterator) NotDone() bool {
7586	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7587}
7588
7589// Response returns the raw server response from the last page request.
7590func (iter LoadBalancerListResultIterator) Response() LoadBalancerListResult {
7591	return iter.page.Response()
7592}
7593
7594// Value returns the current value or a zero-initialized value if the
7595// iterator has advanced beyond the end of the collection.
7596func (iter LoadBalancerListResultIterator) Value() LoadBalancer {
7597	if !iter.page.NotDone() {
7598		return LoadBalancer{}
7599	}
7600	return iter.page.Values()[iter.i]
7601}
7602
7603// Creates a new instance of the LoadBalancerListResultIterator type.
7604func NewLoadBalancerListResultIterator(page LoadBalancerListResultPage) LoadBalancerListResultIterator {
7605	return LoadBalancerListResultIterator{page: page}
7606}
7607
7608// IsEmpty returns true if the ListResult contains no values.
7609func (lblr LoadBalancerListResult) IsEmpty() bool {
7610	return lblr.Value == nil || len(*lblr.Value) == 0
7611}
7612
7613// hasNextLink returns true if the NextLink is not empty.
7614func (lblr LoadBalancerListResult) hasNextLink() bool {
7615	return lblr.NextLink != nil && len(*lblr.NextLink) != 0
7616}
7617
7618// loadBalancerListResultPreparer prepares a request to retrieve the next set of results.
7619// It returns nil if no more results exist.
7620func (lblr LoadBalancerListResult) loadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) {
7621	if !lblr.hasNextLink() {
7622		return nil, nil
7623	}
7624	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7625		autorest.AsJSON(),
7626		autorest.AsGet(),
7627		autorest.WithBaseURL(to.String(lblr.NextLink)))
7628}
7629
7630// LoadBalancerListResultPage contains a page of LoadBalancer values.
7631type LoadBalancerListResultPage struct {
7632	fn   func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)
7633	lblr LoadBalancerListResult
7634}
7635
7636// NextWithContext advances to the next page of values.  If there was an error making
7637// the request the page does not advance and the error is returned.
7638func (page *LoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) {
7639	if tracing.IsEnabled() {
7640		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultPage.NextWithContext")
7641		defer func() {
7642			sc := -1
7643			if page.Response().Response.Response != nil {
7644				sc = page.Response().Response.Response.StatusCode
7645			}
7646			tracing.EndSpan(ctx, sc, err)
7647		}()
7648	}
7649	for {
7650		next, err := page.fn(ctx, page.lblr)
7651		if err != nil {
7652			return err
7653		}
7654		page.lblr = next
7655		if !next.hasNextLink() || !next.IsEmpty() {
7656			break
7657		}
7658	}
7659	return nil
7660}
7661
7662// Next advances to the next page of values.  If there was an error making
7663// the request the page does not advance and the error is returned.
7664// Deprecated: Use NextWithContext() instead.
7665func (page *LoadBalancerListResultPage) Next() error {
7666	return page.NextWithContext(context.Background())
7667}
7668
7669// NotDone returns true if the page enumeration should be started or is not yet complete.
7670func (page LoadBalancerListResultPage) NotDone() bool {
7671	return !page.lblr.IsEmpty()
7672}
7673
7674// Response returns the raw server response from the last page request.
7675func (page LoadBalancerListResultPage) Response() LoadBalancerListResult {
7676	return page.lblr
7677}
7678
7679// Values returns the slice of values for the current page or nil if there are no values.
7680func (page LoadBalancerListResultPage) Values() []LoadBalancer {
7681	if page.lblr.IsEmpty() {
7682		return nil
7683	}
7684	return *page.lblr.Value
7685}
7686
7687// Creates a new instance of the LoadBalancerListResultPage type.
7688func NewLoadBalancerListResultPage(cur LoadBalancerListResult, getNextPage func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)) LoadBalancerListResultPage {
7689	return LoadBalancerListResultPage{
7690		fn:   getNextPage,
7691		lblr: cur,
7692	}
7693}
7694
7695// LoadBalancerLoadBalancingRuleListResult response for ListLoadBalancingRule API service call.
7696type LoadBalancerLoadBalancingRuleListResult struct {
7697	autorest.Response `json:"-"`
7698	// Value - A list of load balancing rules in a load balancer.
7699	Value *[]LoadBalancingRule `json:"value,omitempty"`
7700	// NextLink - READ-ONLY; The URL to get the next set of results.
7701	NextLink *string `json:"nextLink,omitempty"`
7702}
7703
7704// MarshalJSON is the custom marshaler for LoadBalancerLoadBalancingRuleListResult.
7705func (lblbrlr LoadBalancerLoadBalancingRuleListResult) MarshalJSON() ([]byte, error) {
7706	objectMap := make(map[string]interface{})
7707	if lblbrlr.Value != nil {
7708		objectMap["value"] = lblbrlr.Value
7709	}
7710	return json.Marshal(objectMap)
7711}
7712
7713// LoadBalancerLoadBalancingRuleListResultIterator provides access to a complete listing of
7714// LoadBalancingRule values.
7715type LoadBalancerLoadBalancingRuleListResultIterator struct {
7716	i    int
7717	page LoadBalancerLoadBalancingRuleListResultPage
7718}
7719
7720// NextWithContext advances to the next value.  If there was an error making
7721// the request the iterator does not advance and the error is returned.
7722func (iter *LoadBalancerLoadBalancingRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
7723	if tracing.IsEnabled() {
7724		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultIterator.NextWithContext")
7725		defer func() {
7726			sc := -1
7727			if iter.Response().Response.Response != nil {
7728				sc = iter.Response().Response.Response.StatusCode
7729			}
7730			tracing.EndSpan(ctx, sc, err)
7731		}()
7732	}
7733	iter.i++
7734	if iter.i < len(iter.page.Values()) {
7735		return nil
7736	}
7737	err = iter.page.NextWithContext(ctx)
7738	if err != nil {
7739		iter.i--
7740		return err
7741	}
7742	iter.i = 0
7743	return nil
7744}
7745
7746// Next advances to the next value.  If there was an error making
7747// the request the iterator does not advance and the error is returned.
7748// Deprecated: Use NextWithContext() instead.
7749func (iter *LoadBalancerLoadBalancingRuleListResultIterator) Next() error {
7750	return iter.NextWithContext(context.Background())
7751}
7752
7753// NotDone returns true if the enumeration should be started or is not yet complete.
7754func (iter LoadBalancerLoadBalancingRuleListResultIterator) NotDone() bool {
7755	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7756}
7757
7758// Response returns the raw server response from the last page request.
7759func (iter LoadBalancerLoadBalancingRuleListResultIterator) Response() LoadBalancerLoadBalancingRuleListResult {
7760	return iter.page.Response()
7761}
7762
7763// Value returns the current value or a zero-initialized value if the
7764// iterator has advanced beyond the end of the collection.
7765func (iter LoadBalancerLoadBalancingRuleListResultIterator) Value() LoadBalancingRule {
7766	if !iter.page.NotDone() {
7767		return LoadBalancingRule{}
7768	}
7769	return iter.page.Values()[iter.i]
7770}
7771
7772// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultIterator type.
7773func NewLoadBalancerLoadBalancingRuleListResultIterator(page LoadBalancerLoadBalancingRuleListResultPage) LoadBalancerLoadBalancingRuleListResultIterator {
7774	return LoadBalancerLoadBalancingRuleListResultIterator{page: page}
7775}
7776
7777// IsEmpty returns true if the ListResult contains no values.
7778func (lblbrlr LoadBalancerLoadBalancingRuleListResult) IsEmpty() bool {
7779	return lblbrlr.Value == nil || len(*lblbrlr.Value) == 0
7780}
7781
7782// hasNextLink returns true if the NextLink is not empty.
7783func (lblbrlr LoadBalancerLoadBalancingRuleListResult) hasNextLink() bool {
7784	return lblbrlr.NextLink != nil && len(*lblbrlr.NextLink) != 0
7785}
7786
7787// loadBalancerLoadBalancingRuleListResultPreparer prepares a request to retrieve the next set of results.
7788// It returns nil if no more results exist.
7789func (lblbrlr LoadBalancerLoadBalancingRuleListResult) loadBalancerLoadBalancingRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
7790	if !lblbrlr.hasNextLink() {
7791		return nil, nil
7792	}
7793	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7794		autorest.AsJSON(),
7795		autorest.AsGet(),
7796		autorest.WithBaseURL(to.String(lblbrlr.NextLink)))
7797}
7798
7799// LoadBalancerLoadBalancingRuleListResultPage contains a page of LoadBalancingRule values.
7800type LoadBalancerLoadBalancingRuleListResultPage struct {
7801	fn      func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)
7802	lblbrlr LoadBalancerLoadBalancingRuleListResult
7803}
7804
7805// NextWithContext advances to the next page of values.  If there was an error making
7806// the request the page does not advance and the error is returned.
7807func (page *LoadBalancerLoadBalancingRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
7808	if tracing.IsEnabled() {
7809		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultPage.NextWithContext")
7810		defer func() {
7811			sc := -1
7812			if page.Response().Response.Response != nil {
7813				sc = page.Response().Response.Response.StatusCode
7814			}
7815			tracing.EndSpan(ctx, sc, err)
7816		}()
7817	}
7818	for {
7819		next, err := page.fn(ctx, page.lblbrlr)
7820		if err != nil {
7821			return err
7822		}
7823		page.lblbrlr = next
7824		if !next.hasNextLink() || !next.IsEmpty() {
7825			break
7826		}
7827	}
7828	return nil
7829}
7830
7831// Next advances to the next page of values.  If there was an error making
7832// the request the page does not advance and the error is returned.
7833// Deprecated: Use NextWithContext() instead.
7834func (page *LoadBalancerLoadBalancingRuleListResultPage) Next() error {
7835	return page.NextWithContext(context.Background())
7836}
7837
7838// NotDone returns true if the page enumeration should be started or is not yet complete.
7839func (page LoadBalancerLoadBalancingRuleListResultPage) NotDone() bool {
7840	return !page.lblbrlr.IsEmpty()
7841}
7842
7843// Response returns the raw server response from the last page request.
7844func (page LoadBalancerLoadBalancingRuleListResultPage) Response() LoadBalancerLoadBalancingRuleListResult {
7845	return page.lblbrlr
7846}
7847
7848// Values returns the slice of values for the current page or nil if there are no values.
7849func (page LoadBalancerLoadBalancingRuleListResultPage) Values() []LoadBalancingRule {
7850	if page.lblbrlr.IsEmpty() {
7851		return nil
7852	}
7853	return *page.lblbrlr.Value
7854}
7855
7856// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultPage type.
7857func NewLoadBalancerLoadBalancingRuleListResultPage(cur LoadBalancerLoadBalancingRuleListResult, getNextPage func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)) LoadBalancerLoadBalancingRuleListResultPage {
7858	return LoadBalancerLoadBalancingRuleListResultPage{
7859		fn:      getNextPage,
7860		lblbrlr: cur,
7861	}
7862}
7863
7864// LoadBalancerProbeListResult response for ListProbe API service call.
7865type LoadBalancerProbeListResult struct {
7866	autorest.Response `json:"-"`
7867	// Value - A list of probes in a load balancer.
7868	Value *[]Probe `json:"value,omitempty"`
7869	// NextLink - READ-ONLY; The URL to get the next set of results.
7870	NextLink *string `json:"nextLink,omitempty"`
7871}
7872
7873// MarshalJSON is the custom marshaler for LoadBalancerProbeListResult.
7874func (lbplr LoadBalancerProbeListResult) MarshalJSON() ([]byte, error) {
7875	objectMap := make(map[string]interface{})
7876	if lbplr.Value != nil {
7877		objectMap["value"] = lbplr.Value
7878	}
7879	return json.Marshal(objectMap)
7880}
7881
7882// LoadBalancerProbeListResultIterator provides access to a complete listing of Probe values.
7883type LoadBalancerProbeListResultIterator struct {
7884	i    int
7885	page LoadBalancerProbeListResultPage
7886}
7887
7888// NextWithContext advances to the next value.  If there was an error making
7889// the request the iterator does not advance and the error is returned.
7890func (iter *LoadBalancerProbeListResultIterator) NextWithContext(ctx context.Context) (err error) {
7891	if tracing.IsEnabled() {
7892		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultIterator.NextWithContext")
7893		defer func() {
7894			sc := -1
7895			if iter.Response().Response.Response != nil {
7896				sc = iter.Response().Response.Response.StatusCode
7897			}
7898			tracing.EndSpan(ctx, sc, err)
7899		}()
7900	}
7901	iter.i++
7902	if iter.i < len(iter.page.Values()) {
7903		return nil
7904	}
7905	err = iter.page.NextWithContext(ctx)
7906	if err != nil {
7907		iter.i--
7908		return err
7909	}
7910	iter.i = 0
7911	return nil
7912}
7913
7914// Next advances to the next value.  If there was an error making
7915// the request the iterator does not advance and the error is returned.
7916// Deprecated: Use NextWithContext() instead.
7917func (iter *LoadBalancerProbeListResultIterator) Next() error {
7918	return iter.NextWithContext(context.Background())
7919}
7920
7921// NotDone returns true if the enumeration should be started or is not yet complete.
7922func (iter LoadBalancerProbeListResultIterator) NotDone() bool {
7923	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7924}
7925
7926// Response returns the raw server response from the last page request.
7927func (iter LoadBalancerProbeListResultIterator) Response() LoadBalancerProbeListResult {
7928	return iter.page.Response()
7929}
7930
7931// Value returns the current value or a zero-initialized value if the
7932// iterator has advanced beyond the end of the collection.
7933func (iter LoadBalancerProbeListResultIterator) Value() Probe {
7934	if !iter.page.NotDone() {
7935		return Probe{}
7936	}
7937	return iter.page.Values()[iter.i]
7938}
7939
7940// Creates a new instance of the LoadBalancerProbeListResultIterator type.
7941func NewLoadBalancerProbeListResultIterator(page LoadBalancerProbeListResultPage) LoadBalancerProbeListResultIterator {
7942	return LoadBalancerProbeListResultIterator{page: page}
7943}
7944
7945// IsEmpty returns true if the ListResult contains no values.
7946func (lbplr LoadBalancerProbeListResult) IsEmpty() bool {
7947	return lbplr.Value == nil || len(*lbplr.Value) == 0
7948}
7949
7950// hasNextLink returns true if the NextLink is not empty.
7951func (lbplr LoadBalancerProbeListResult) hasNextLink() bool {
7952	return lbplr.NextLink != nil && len(*lbplr.NextLink) != 0
7953}
7954
7955// loadBalancerProbeListResultPreparer prepares a request to retrieve the next set of results.
7956// It returns nil if no more results exist.
7957func (lbplr LoadBalancerProbeListResult) loadBalancerProbeListResultPreparer(ctx context.Context) (*http.Request, error) {
7958	if !lbplr.hasNextLink() {
7959		return nil, nil
7960	}
7961	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7962		autorest.AsJSON(),
7963		autorest.AsGet(),
7964		autorest.WithBaseURL(to.String(lbplr.NextLink)))
7965}
7966
7967// LoadBalancerProbeListResultPage contains a page of Probe values.
7968type LoadBalancerProbeListResultPage struct {
7969	fn    func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)
7970	lbplr LoadBalancerProbeListResult
7971}
7972
7973// NextWithContext advances to the next page of values.  If there was an error making
7974// the request the page does not advance and the error is returned.
7975func (page *LoadBalancerProbeListResultPage) NextWithContext(ctx context.Context) (err error) {
7976	if tracing.IsEnabled() {
7977		ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultPage.NextWithContext")
7978		defer func() {
7979			sc := -1
7980			if page.Response().Response.Response != nil {
7981				sc = page.Response().Response.Response.StatusCode
7982			}
7983			tracing.EndSpan(ctx, sc, err)
7984		}()
7985	}
7986	for {
7987		next, err := page.fn(ctx, page.lbplr)
7988		if err != nil {
7989			return err
7990		}
7991		page.lbplr = next
7992		if !next.hasNextLink() || !next.IsEmpty() {
7993			break
7994		}
7995	}
7996	return nil
7997}
7998
7999// Next advances to the next page of values.  If there was an error making
8000// the request the page does not advance and the error is returned.
8001// Deprecated: Use NextWithContext() instead.
8002func (page *LoadBalancerProbeListResultPage) Next() error {
8003	return page.NextWithContext(context.Background())
8004}
8005
8006// NotDone returns true if the page enumeration should be started or is not yet complete.
8007func (page LoadBalancerProbeListResultPage) NotDone() bool {
8008	return !page.lbplr.IsEmpty()
8009}
8010
8011// Response returns the raw server response from the last page request.
8012func (page LoadBalancerProbeListResultPage) Response() LoadBalancerProbeListResult {
8013	return page.lbplr
8014}
8015
8016// Values returns the slice of values for the current page or nil if there are no values.
8017func (page LoadBalancerProbeListResultPage) Values() []Probe {
8018	if page.lbplr.IsEmpty() {
8019		return nil
8020	}
8021	return *page.lbplr.Value
8022}
8023
8024// Creates a new instance of the LoadBalancerProbeListResultPage type.
8025func NewLoadBalancerProbeListResultPage(cur LoadBalancerProbeListResult, getNextPage func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)) LoadBalancerProbeListResultPage {
8026	return LoadBalancerProbeListResultPage{
8027		fn:    getNextPage,
8028		lbplr: cur,
8029	}
8030}
8031
8032// LoadBalancerPropertiesFormat properties of the load balancer.
8033type LoadBalancerPropertiesFormat struct {
8034	// FrontendIPConfigurations - Object representing the frontend IPs to be used for the load balancer
8035	FrontendIPConfigurations *[]FrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"`
8036	// BackendAddressPools - Collection of backend address pools used by a load balancer
8037	BackendAddressPools *[]BackendAddressPool `json:"backendAddressPools,omitempty"`
8038	// LoadBalancingRules - Object collection representing the load balancing rules Gets the provisioning
8039	LoadBalancingRules *[]LoadBalancingRule `json:"loadBalancingRules,omitempty"`
8040	// Probes - Collection of probe objects used in the load balancer
8041	Probes *[]Probe `json:"probes,omitempty"`
8042	// 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.
8043	InboundNatRules *[]InboundNatRule `json:"inboundNatRules,omitempty"`
8044	// 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.
8045	InboundNatPools *[]InboundNatPool `json:"inboundNatPools,omitempty"`
8046	// OutboundNatRules - The outbound NAT rules.
8047	OutboundNatRules *[]OutboundNatRule `json:"outboundNatRules,omitempty"`
8048	// ResourceGUID - The resource GUID property of the load balancer resource.
8049	ResourceGUID *string `json:"resourceGuid,omitempty"`
8050	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
8051	ProvisioningState *string `json:"provisioningState,omitempty"`
8052}
8053
8054// LoadBalancersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
8055// long-running operation.
8056type LoadBalancersCreateOrUpdateFuture struct {
8057	azure.FutureAPI
8058	// Result returns the result of the asynchronous operation.
8059	// If the operation has not completed it will return an error.
8060	Result func(LoadBalancersClient) (LoadBalancer, error)
8061}
8062
8063// LoadBalancersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
8064// operation.
8065type LoadBalancersDeleteFuture struct {
8066	azure.FutureAPI
8067	// Result returns the result of the asynchronous operation.
8068	// If the operation has not completed it will return an error.
8069	Result func(LoadBalancersClient) (autorest.Response, error)
8070}
8071
8072// LoadBalancerSku SKU of a load balancer
8073type LoadBalancerSku struct {
8074	// Name - Name of a load balancer SKU. Possible values include: 'LoadBalancerSkuNameBasic', 'LoadBalancerSkuNameStandard'
8075	Name LoadBalancerSkuName `json:"name,omitempty"`
8076}
8077
8078// LoadBalancersUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
8079// operation.
8080type LoadBalancersUpdateTagsFuture struct {
8081	azure.FutureAPI
8082	// Result returns the result of the asynchronous operation.
8083	// If the operation has not completed it will return an error.
8084	Result func(LoadBalancersClient) (LoadBalancer, error)
8085}
8086
8087// LoadBalancingRule a load balancing rule for a load balancer.
8088type LoadBalancingRule struct {
8089	autorest.Response `json:"-"`
8090	// LoadBalancingRulePropertiesFormat - Properties of load balancer load balancing rule.
8091	*LoadBalancingRulePropertiesFormat `json:"properties,omitempty"`
8092	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
8093	Name *string `json:"name,omitempty"`
8094	// Etag - A unique read-only string that changes whenever the resource is updated.
8095	Etag *string `json:"etag,omitempty"`
8096	// ID - Resource ID.
8097	ID *string `json:"id,omitempty"`
8098}
8099
8100// MarshalJSON is the custom marshaler for LoadBalancingRule.
8101func (lbr LoadBalancingRule) MarshalJSON() ([]byte, error) {
8102	objectMap := make(map[string]interface{})
8103	if lbr.LoadBalancingRulePropertiesFormat != nil {
8104		objectMap["properties"] = lbr.LoadBalancingRulePropertiesFormat
8105	}
8106	if lbr.Name != nil {
8107		objectMap["name"] = lbr.Name
8108	}
8109	if lbr.Etag != nil {
8110		objectMap["etag"] = lbr.Etag
8111	}
8112	if lbr.ID != nil {
8113		objectMap["id"] = lbr.ID
8114	}
8115	return json.Marshal(objectMap)
8116}
8117
8118// UnmarshalJSON is the custom unmarshaler for LoadBalancingRule struct.
8119func (lbr *LoadBalancingRule) UnmarshalJSON(body []byte) error {
8120	var m map[string]*json.RawMessage
8121	err := json.Unmarshal(body, &m)
8122	if err != nil {
8123		return err
8124	}
8125	for k, v := range m {
8126		switch k {
8127		case "properties":
8128			if v != nil {
8129				var loadBalancingRulePropertiesFormat LoadBalancingRulePropertiesFormat
8130				err = json.Unmarshal(*v, &loadBalancingRulePropertiesFormat)
8131				if err != nil {
8132					return err
8133				}
8134				lbr.LoadBalancingRulePropertiesFormat = &loadBalancingRulePropertiesFormat
8135			}
8136		case "name":
8137			if v != nil {
8138				var name string
8139				err = json.Unmarshal(*v, &name)
8140				if err != nil {
8141					return err
8142				}
8143				lbr.Name = &name
8144			}
8145		case "etag":
8146			if v != nil {
8147				var etag string
8148				err = json.Unmarshal(*v, &etag)
8149				if err != nil {
8150					return err
8151				}
8152				lbr.Etag = &etag
8153			}
8154		case "id":
8155			if v != nil {
8156				var ID string
8157				err = json.Unmarshal(*v, &ID)
8158				if err != nil {
8159					return err
8160				}
8161				lbr.ID = &ID
8162			}
8163		}
8164	}
8165
8166	return nil
8167}
8168
8169// LoadBalancingRulePropertiesFormat properties of the load balancer.
8170type LoadBalancingRulePropertiesFormat struct {
8171	// FrontendIPConfiguration - A reference to frontend IP addresses.
8172	FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"`
8173	// BackendAddressPool - A reference to a pool of DIPs. Inbound traffic is randomly load balanced across IPs in the backend IPs.
8174	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
8175	// Probe - The reference of the load balancer probe used by the load balancing rule.
8176	Probe *SubResource `json:"probe,omitempty"`
8177	// Protocol - Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll'
8178	Protocol TransportProtocol `json:"protocol,omitempty"`
8179	// LoadDistribution - The load distribution policy for this rule. Possible values are 'Default', 'SourceIP', and 'SourceIPProtocol'. Possible values include: 'Default', 'SourceIP', 'SourceIPProtocol'
8180	LoadDistribution LoadDistribution `json:"loadDistribution,omitempty"`
8181	// FrontendPort - The port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer. Acceptable values are between 0 and 65534. Note that value 0 enables "Any Port"
8182	FrontendPort *int32 `json:"frontendPort,omitempty"`
8183	// BackendPort - The port used for internal connections on the endpoint. Acceptable values are between 0 and 65535. Note that value 0 enables "Any Port"
8184	BackendPort *int32 `json:"backendPort,omitempty"`
8185	// 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.
8186	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
8187	// 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.
8188	EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"`
8189	// DisableOutboundSnat - Configures SNAT for the VMs in the backend pool to use the publicIP address specified in the frontend of the load balancing rule.
8190	DisableOutboundSnat *bool `json:"disableOutboundSnat,omitempty"`
8191	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
8192	ProvisioningState *string `json:"provisioningState,omitempty"`
8193}
8194
8195// LocalNetworkGateway a common class for general resource information
8196type LocalNetworkGateway struct {
8197	autorest.Response `json:"-"`
8198	// LocalNetworkGatewayPropertiesFormat - Properties of the local network gateway.
8199	*LocalNetworkGatewayPropertiesFormat `json:"properties,omitempty"`
8200	// Etag - A unique read-only string that changes whenever the resource is updated.
8201	Etag *string `json:"etag,omitempty"`
8202	// ID - Resource ID.
8203	ID *string `json:"id,omitempty"`
8204	// Name - READ-ONLY; Resource name.
8205	Name *string `json:"name,omitempty"`
8206	// Type - READ-ONLY; Resource type.
8207	Type *string `json:"type,omitempty"`
8208	// Location - Resource location.
8209	Location *string `json:"location,omitempty"`
8210	// Tags - Resource tags.
8211	Tags map[string]*string `json:"tags"`
8212}
8213
8214// MarshalJSON is the custom marshaler for LocalNetworkGateway.
8215func (lng LocalNetworkGateway) MarshalJSON() ([]byte, error) {
8216	objectMap := make(map[string]interface{})
8217	if lng.LocalNetworkGatewayPropertiesFormat != nil {
8218		objectMap["properties"] = lng.LocalNetworkGatewayPropertiesFormat
8219	}
8220	if lng.Etag != nil {
8221		objectMap["etag"] = lng.Etag
8222	}
8223	if lng.ID != nil {
8224		objectMap["id"] = lng.ID
8225	}
8226	if lng.Location != nil {
8227		objectMap["location"] = lng.Location
8228	}
8229	if lng.Tags != nil {
8230		objectMap["tags"] = lng.Tags
8231	}
8232	return json.Marshal(objectMap)
8233}
8234
8235// UnmarshalJSON is the custom unmarshaler for LocalNetworkGateway struct.
8236func (lng *LocalNetworkGateway) UnmarshalJSON(body []byte) error {
8237	var m map[string]*json.RawMessage
8238	err := json.Unmarshal(body, &m)
8239	if err != nil {
8240		return err
8241	}
8242	for k, v := range m {
8243		switch k {
8244		case "properties":
8245			if v != nil {
8246				var localNetworkGatewayPropertiesFormat LocalNetworkGatewayPropertiesFormat
8247				err = json.Unmarshal(*v, &localNetworkGatewayPropertiesFormat)
8248				if err != nil {
8249					return err
8250				}
8251				lng.LocalNetworkGatewayPropertiesFormat = &localNetworkGatewayPropertiesFormat
8252			}
8253		case "etag":
8254			if v != nil {
8255				var etag string
8256				err = json.Unmarshal(*v, &etag)
8257				if err != nil {
8258					return err
8259				}
8260				lng.Etag = &etag
8261			}
8262		case "id":
8263			if v != nil {
8264				var ID string
8265				err = json.Unmarshal(*v, &ID)
8266				if err != nil {
8267					return err
8268				}
8269				lng.ID = &ID
8270			}
8271		case "name":
8272			if v != nil {
8273				var name string
8274				err = json.Unmarshal(*v, &name)
8275				if err != nil {
8276					return err
8277				}
8278				lng.Name = &name
8279			}
8280		case "type":
8281			if v != nil {
8282				var typeVar string
8283				err = json.Unmarshal(*v, &typeVar)
8284				if err != nil {
8285					return err
8286				}
8287				lng.Type = &typeVar
8288			}
8289		case "location":
8290			if v != nil {
8291				var location string
8292				err = json.Unmarshal(*v, &location)
8293				if err != nil {
8294					return err
8295				}
8296				lng.Location = &location
8297			}
8298		case "tags":
8299			if v != nil {
8300				var tags map[string]*string
8301				err = json.Unmarshal(*v, &tags)
8302				if err != nil {
8303					return err
8304				}
8305				lng.Tags = tags
8306			}
8307		}
8308	}
8309
8310	return nil
8311}
8312
8313// LocalNetworkGatewayListResult response for ListLocalNetworkGateways API service call.
8314type LocalNetworkGatewayListResult struct {
8315	autorest.Response `json:"-"`
8316	// Value - A list of local network gateways that exists in a resource group.
8317	Value *[]LocalNetworkGateway `json:"value,omitempty"`
8318	// NextLink - READ-ONLY; The URL to get the next set of results.
8319	NextLink *string `json:"nextLink,omitempty"`
8320}
8321
8322// MarshalJSON is the custom marshaler for LocalNetworkGatewayListResult.
8323func (lnglr LocalNetworkGatewayListResult) MarshalJSON() ([]byte, error) {
8324	objectMap := make(map[string]interface{})
8325	if lnglr.Value != nil {
8326		objectMap["value"] = lnglr.Value
8327	}
8328	return json.Marshal(objectMap)
8329}
8330
8331// LocalNetworkGatewayListResultIterator provides access to a complete listing of LocalNetworkGateway
8332// values.
8333type LocalNetworkGatewayListResultIterator struct {
8334	i    int
8335	page LocalNetworkGatewayListResultPage
8336}
8337
8338// NextWithContext advances to the next value.  If there was an error making
8339// the request the iterator does not advance and the error is returned.
8340func (iter *LocalNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
8341	if tracing.IsEnabled() {
8342		ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultIterator.NextWithContext")
8343		defer func() {
8344			sc := -1
8345			if iter.Response().Response.Response != nil {
8346				sc = iter.Response().Response.Response.StatusCode
8347			}
8348			tracing.EndSpan(ctx, sc, err)
8349		}()
8350	}
8351	iter.i++
8352	if iter.i < len(iter.page.Values()) {
8353		return nil
8354	}
8355	err = iter.page.NextWithContext(ctx)
8356	if err != nil {
8357		iter.i--
8358		return err
8359	}
8360	iter.i = 0
8361	return nil
8362}
8363
8364// Next advances to the next value.  If there was an error making
8365// the request the iterator does not advance and the error is returned.
8366// Deprecated: Use NextWithContext() instead.
8367func (iter *LocalNetworkGatewayListResultIterator) Next() error {
8368	return iter.NextWithContext(context.Background())
8369}
8370
8371// NotDone returns true if the enumeration should be started or is not yet complete.
8372func (iter LocalNetworkGatewayListResultIterator) NotDone() bool {
8373	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8374}
8375
8376// Response returns the raw server response from the last page request.
8377func (iter LocalNetworkGatewayListResultIterator) Response() LocalNetworkGatewayListResult {
8378	return iter.page.Response()
8379}
8380
8381// Value returns the current value or a zero-initialized value if the
8382// iterator has advanced beyond the end of the collection.
8383func (iter LocalNetworkGatewayListResultIterator) Value() LocalNetworkGateway {
8384	if !iter.page.NotDone() {
8385		return LocalNetworkGateway{}
8386	}
8387	return iter.page.Values()[iter.i]
8388}
8389
8390// Creates a new instance of the LocalNetworkGatewayListResultIterator type.
8391func NewLocalNetworkGatewayListResultIterator(page LocalNetworkGatewayListResultPage) LocalNetworkGatewayListResultIterator {
8392	return LocalNetworkGatewayListResultIterator{page: page}
8393}
8394
8395// IsEmpty returns true if the ListResult contains no values.
8396func (lnglr LocalNetworkGatewayListResult) IsEmpty() bool {
8397	return lnglr.Value == nil || len(*lnglr.Value) == 0
8398}
8399
8400// hasNextLink returns true if the NextLink is not empty.
8401func (lnglr LocalNetworkGatewayListResult) hasNextLink() bool {
8402	return lnglr.NextLink != nil && len(*lnglr.NextLink) != 0
8403}
8404
8405// localNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results.
8406// It returns nil if no more results exist.
8407func (lnglr LocalNetworkGatewayListResult) localNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
8408	if !lnglr.hasNextLink() {
8409		return nil, nil
8410	}
8411	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8412		autorest.AsJSON(),
8413		autorest.AsGet(),
8414		autorest.WithBaseURL(to.String(lnglr.NextLink)))
8415}
8416
8417// LocalNetworkGatewayListResultPage contains a page of LocalNetworkGateway values.
8418type LocalNetworkGatewayListResultPage struct {
8419	fn    func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)
8420	lnglr LocalNetworkGatewayListResult
8421}
8422
8423// NextWithContext advances to the next page of values.  If there was an error making
8424// the request the page does not advance and the error is returned.
8425func (page *LocalNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
8426	if tracing.IsEnabled() {
8427		ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultPage.NextWithContext")
8428		defer func() {
8429			sc := -1
8430			if page.Response().Response.Response != nil {
8431				sc = page.Response().Response.Response.StatusCode
8432			}
8433			tracing.EndSpan(ctx, sc, err)
8434		}()
8435	}
8436	for {
8437		next, err := page.fn(ctx, page.lnglr)
8438		if err != nil {
8439			return err
8440		}
8441		page.lnglr = next
8442		if !next.hasNextLink() || !next.IsEmpty() {
8443			break
8444		}
8445	}
8446	return nil
8447}
8448
8449// Next advances to the next page of values.  If there was an error making
8450// the request the page does not advance and the error is returned.
8451// Deprecated: Use NextWithContext() instead.
8452func (page *LocalNetworkGatewayListResultPage) Next() error {
8453	return page.NextWithContext(context.Background())
8454}
8455
8456// NotDone returns true if the page enumeration should be started or is not yet complete.
8457func (page LocalNetworkGatewayListResultPage) NotDone() bool {
8458	return !page.lnglr.IsEmpty()
8459}
8460
8461// Response returns the raw server response from the last page request.
8462func (page LocalNetworkGatewayListResultPage) Response() LocalNetworkGatewayListResult {
8463	return page.lnglr
8464}
8465
8466// Values returns the slice of values for the current page or nil if there are no values.
8467func (page LocalNetworkGatewayListResultPage) Values() []LocalNetworkGateway {
8468	if page.lnglr.IsEmpty() {
8469		return nil
8470	}
8471	return *page.lnglr.Value
8472}
8473
8474// Creates a new instance of the LocalNetworkGatewayListResultPage type.
8475func NewLocalNetworkGatewayListResultPage(cur LocalNetworkGatewayListResult, getNextPage func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)) LocalNetworkGatewayListResultPage {
8476	return LocalNetworkGatewayListResultPage{
8477		fn:    getNextPage,
8478		lnglr: cur,
8479	}
8480}
8481
8482// LocalNetworkGatewayPropertiesFormat localNetworkGateway properties
8483type LocalNetworkGatewayPropertiesFormat struct {
8484	// LocalNetworkAddressSpace - Local network site address space.
8485	LocalNetworkAddressSpace *AddressSpace `json:"localNetworkAddressSpace,omitempty"`
8486	// GatewayIPAddress - IP address of local network gateway.
8487	GatewayIPAddress *string `json:"gatewayIpAddress,omitempty"`
8488	// BgpSettings - Local network gateway's BGP speaker settings.
8489	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
8490	// ResourceGUID - The resource GUID property of the LocalNetworkGateway resource.
8491	ResourceGUID *string `json:"resourceGuid,omitempty"`
8492	// ProvisioningState - READ-ONLY; The provisioning state of the LocalNetworkGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
8493	ProvisioningState *string `json:"provisioningState,omitempty"`
8494}
8495
8496// MarshalJSON is the custom marshaler for LocalNetworkGatewayPropertiesFormat.
8497func (lngpf LocalNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
8498	objectMap := make(map[string]interface{})
8499	if lngpf.LocalNetworkAddressSpace != nil {
8500		objectMap["localNetworkAddressSpace"] = lngpf.LocalNetworkAddressSpace
8501	}
8502	if lngpf.GatewayIPAddress != nil {
8503		objectMap["gatewayIpAddress"] = lngpf.GatewayIPAddress
8504	}
8505	if lngpf.BgpSettings != nil {
8506		objectMap["bgpSettings"] = lngpf.BgpSettings
8507	}
8508	if lngpf.ResourceGUID != nil {
8509		objectMap["resourceGuid"] = lngpf.ResourceGUID
8510	}
8511	return json.Marshal(objectMap)
8512}
8513
8514// LocalNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
8515// long-running operation.
8516type LocalNetworkGatewaysCreateOrUpdateFuture struct {
8517	azure.FutureAPI
8518	// Result returns the result of the asynchronous operation.
8519	// If the operation has not completed it will return an error.
8520	Result func(LocalNetworkGatewaysClient) (LocalNetworkGateway, error)
8521}
8522
8523// LocalNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
8524// long-running operation.
8525type LocalNetworkGatewaysDeleteFuture struct {
8526	azure.FutureAPI
8527	// Result returns the result of the asynchronous operation.
8528	// If the operation has not completed it will return an error.
8529	Result func(LocalNetworkGatewaysClient) (autorest.Response, error)
8530}
8531
8532// LocalNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
8533// long-running operation.
8534type LocalNetworkGatewaysUpdateTagsFuture struct {
8535	azure.FutureAPI
8536	// Result returns the result of the asynchronous operation.
8537	// If the operation has not completed it will return an error.
8538	Result func(LocalNetworkGatewaysClient) (LocalNetworkGateway, error)
8539}
8540
8541// LogSpecification description of logging specification.
8542type LogSpecification struct {
8543	// Name - The name of the specification.
8544	Name *string `json:"name,omitempty"`
8545	// DisplayName - The display name of the specification.
8546	DisplayName *string `json:"displayName,omitempty"`
8547	// BlobDuration - Duration of the blob.
8548	BlobDuration *string `json:"blobDuration,omitempty"`
8549}
8550
8551// MetricSpecification description of metrics specification.
8552type MetricSpecification struct {
8553	// Name - The name of the metric.
8554	Name *string `json:"name,omitempty"`
8555	// DisplayName - The display name of the metric.
8556	DisplayName *string `json:"displayName,omitempty"`
8557	// DisplayDescription - The description of the metric.
8558	DisplayDescription *string `json:"displayDescription,omitempty"`
8559	// Unit - Units the metric to be displayed in.
8560	Unit *string `json:"unit,omitempty"`
8561	// AggregationType - The aggregation type.
8562	AggregationType *string `json:"aggregationType,omitempty"`
8563	// Availabilities - List of availability.
8564	Availabilities *[]Availability `json:"availabilities,omitempty"`
8565	// EnableRegionalMdmAccount - Whether regional MDM account enabled.
8566	EnableRegionalMdmAccount *bool `json:"enableRegionalMdmAccount,omitempty"`
8567	// FillGapWithZero - Whether gaps would be filled with zeros.
8568	FillGapWithZero *bool `json:"fillGapWithZero,omitempty"`
8569	// MetricFilterPattern - Pattern for the filter of the metric.
8570	MetricFilterPattern *string `json:"metricFilterPattern,omitempty"`
8571	// Dimensions - List of dimensions.
8572	Dimensions *[]Dimension `json:"dimensions,omitempty"`
8573	// IsInternal - Whether the metric is internal.
8574	IsInternal *bool `json:"isInternal,omitempty"`
8575	// SourceMdmAccount - The source MDM account.
8576	SourceMdmAccount *string `json:"sourceMdmAccount,omitempty"`
8577	// SourceMdmNamespace - The source MDM namespace.
8578	SourceMdmNamespace *string `json:"sourceMdmNamespace,omitempty"`
8579	// ResourceIDDimensionNameOverride - The resource Id dimension name override.
8580	ResourceIDDimensionNameOverride *string `json:"resourceIdDimensionNameOverride,omitempty"`
8581}
8582
8583// NextHopParameters parameters that define the source and destination endpoint.
8584type NextHopParameters struct {
8585	// TargetResourceID - The resource identifier of the target resource against which the action is to be performed.
8586	TargetResourceID *string `json:"targetResourceId,omitempty"`
8587	// SourceIPAddress - The source IP address.
8588	SourceIPAddress *string `json:"sourceIPAddress,omitempty"`
8589	// DestinationIPAddress - The destination IP address.
8590	DestinationIPAddress *string `json:"destinationIPAddress,omitempty"`
8591	// 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).
8592	TargetNicResourceID *string `json:"targetNicResourceId,omitempty"`
8593}
8594
8595// NextHopResult the information about next hop from the specified VM.
8596type NextHopResult struct {
8597	autorest.Response `json:"-"`
8598	// NextHopType - Next hop type. Possible values include: 'NextHopTypeInternet', 'NextHopTypeVirtualAppliance', 'NextHopTypeVirtualNetworkGateway', 'NextHopTypeVnetLocal', 'NextHopTypeHyperNetGateway', 'NextHopTypeNone'
8599	NextHopType NextHopType `json:"nextHopType,omitempty"`
8600	// NextHopIPAddress - Next hop IP Address
8601	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
8602	// 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'.
8603	RouteTableID *string `json:"routeTableId,omitempty"`
8604}
8605
8606// Operation network REST API operation definition.
8607type Operation struct {
8608	// Name - Operation name: {provider}/{resource}/{operation}
8609	Name *string `json:"name,omitempty"`
8610	// Display - Display metadata associated with the operation.
8611	Display *OperationDisplay `json:"display,omitempty"`
8612	// Origin - Origin of the operation.
8613	Origin *string `json:"origin,omitempty"`
8614	// OperationPropertiesFormat - Operation properties format.
8615	*OperationPropertiesFormat `json:"properties,omitempty"`
8616}
8617
8618// MarshalJSON is the custom marshaler for Operation.
8619func (o Operation) MarshalJSON() ([]byte, error) {
8620	objectMap := make(map[string]interface{})
8621	if o.Name != nil {
8622		objectMap["name"] = o.Name
8623	}
8624	if o.Display != nil {
8625		objectMap["display"] = o.Display
8626	}
8627	if o.Origin != nil {
8628		objectMap["origin"] = o.Origin
8629	}
8630	if o.OperationPropertiesFormat != nil {
8631		objectMap["properties"] = o.OperationPropertiesFormat
8632	}
8633	return json.Marshal(objectMap)
8634}
8635
8636// UnmarshalJSON is the custom unmarshaler for Operation struct.
8637func (o *Operation) UnmarshalJSON(body []byte) error {
8638	var m map[string]*json.RawMessage
8639	err := json.Unmarshal(body, &m)
8640	if err != nil {
8641		return err
8642	}
8643	for k, v := range m {
8644		switch k {
8645		case "name":
8646			if v != nil {
8647				var name string
8648				err = json.Unmarshal(*v, &name)
8649				if err != nil {
8650					return err
8651				}
8652				o.Name = &name
8653			}
8654		case "display":
8655			if v != nil {
8656				var display OperationDisplay
8657				err = json.Unmarshal(*v, &display)
8658				if err != nil {
8659					return err
8660				}
8661				o.Display = &display
8662			}
8663		case "origin":
8664			if v != nil {
8665				var origin string
8666				err = json.Unmarshal(*v, &origin)
8667				if err != nil {
8668					return err
8669				}
8670				o.Origin = &origin
8671			}
8672		case "properties":
8673			if v != nil {
8674				var operationPropertiesFormat OperationPropertiesFormat
8675				err = json.Unmarshal(*v, &operationPropertiesFormat)
8676				if err != nil {
8677					return err
8678				}
8679				o.OperationPropertiesFormat = &operationPropertiesFormat
8680			}
8681		}
8682	}
8683
8684	return nil
8685}
8686
8687// OperationDisplay display metadata associated with the operation.
8688type OperationDisplay struct {
8689	// Provider - Service provider: Microsoft Network.
8690	Provider *string `json:"provider,omitempty"`
8691	// Resource - Resource on which the operation is performed.
8692	Resource *string `json:"resource,omitempty"`
8693	// Operation - Type of the operation: get, read, delete, etc.
8694	Operation *string `json:"operation,omitempty"`
8695	// Description - Description of the operation.
8696	Description *string `json:"description,omitempty"`
8697}
8698
8699// OperationListResult result of the request to list Network operations. It contains a list of operations
8700// and a URL link to get the next set of results.
8701type OperationListResult struct {
8702	autorest.Response `json:"-"`
8703	// Value - List of Network operations supported by the Network resource provider.
8704	Value *[]Operation `json:"value,omitempty"`
8705	// NextLink - URL to get the next set of operation list results if there are any.
8706	NextLink *string `json:"nextLink,omitempty"`
8707}
8708
8709// OperationListResultIterator provides access to a complete listing of Operation values.
8710type OperationListResultIterator struct {
8711	i    int
8712	page OperationListResultPage
8713}
8714
8715// NextWithContext advances to the next value.  If there was an error making
8716// the request the iterator does not advance and the error is returned.
8717func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) {
8718	if tracing.IsEnabled() {
8719		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext")
8720		defer func() {
8721			sc := -1
8722			if iter.Response().Response.Response != nil {
8723				sc = iter.Response().Response.Response.StatusCode
8724			}
8725			tracing.EndSpan(ctx, sc, err)
8726		}()
8727	}
8728	iter.i++
8729	if iter.i < len(iter.page.Values()) {
8730		return nil
8731	}
8732	err = iter.page.NextWithContext(ctx)
8733	if err != nil {
8734		iter.i--
8735		return err
8736	}
8737	iter.i = 0
8738	return nil
8739}
8740
8741// Next advances to the next value.  If there was an error making
8742// the request the iterator does not advance and the error is returned.
8743// Deprecated: Use NextWithContext() instead.
8744func (iter *OperationListResultIterator) Next() error {
8745	return iter.NextWithContext(context.Background())
8746}
8747
8748// NotDone returns true if the enumeration should be started or is not yet complete.
8749func (iter OperationListResultIterator) NotDone() bool {
8750	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8751}
8752
8753// Response returns the raw server response from the last page request.
8754func (iter OperationListResultIterator) Response() OperationListResult {
8755	return iter.page.Response()
8756}
8757
8758// Value returns the current value or a zero-initialized value if the
8759// iterator has advanced beyond the end of the collection.
8760func (iter OperationListResultIterator) Value() Operation {
8761	if !iter.page.NotDone() {
8762		return Operation{}
8763	}
8764	return iter.page.Values()[iter.i]
8765}
8766
8767// Creates a new instance of the OperationListResultIterator type.
8768func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator {
8769	return OperationListResultIterator{page: page}
8770}
8771
8772// IsEmpty returns true if the ListResult contains no values.
8773func (olr OperationListResult) IsEmpty() bool {
8774	return olr.Value == nil || len(*olr.Value) == 0
8775}
8776
8777// hasNextLink returns true if the NextLink is not empty.
8778func (olr OperationListResult) hasNextLink() bool {
8779	return olr.NextLink != nil && len(*olr.NextLink) != 0
8780}
8781
8782// operationListResultPreparer prepares a request to retrieve the next set of results.
8783// It returns nil if no more results exist.
8784func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) {
8785	if !olr.hasNextLink() {
8786		return nil, nil
8787	}
8788	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8789		autorest.AsJSON(),
8790		autorest.AsGet(),
8791		autorest.WithBaseURL(to.String(olr.NextLink)))
8792}
8793
8794// OperationListResultPage contains a page of Operation values.
8795type OperationListResultPage struct {
8796	fn  func(context.Context, OperationListResult) (OperationListResult, error)
8797	olr OperationListResult
8798}
8799
8800// NextWithContext advances to the next page of values.  If there was an error making
8801// the request the page does not advance and the error is returned.
8802func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) {
8803	if tracing.IsEnabled() {
8804		ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext")
8805		defer func() {
8806			sc := -1
8807			if page.Response().Response.Response != nil {
8808				sc = page.Response().Response.Response.StatusCode
8809			}
8810			tracing.EndSpan(ctx, sc, err)
8811		}()
8812	}
8813	for {
8814		next, err := page.fn(ctx, page.olr)
8815		if err != nil {
8816			return err
8817		}
8818		page.olr = next
8819		if !next.hasNextLink() || !next.IsEmpty() {
8820			break
8821		}
8822	}
8823	return nil
8824}
8825
8826// Next advances to the next page of values.  If there was an error making
8827// the request the page does not advance and the error is returned.
8828// Deprecated: Use NextWithContext() instead.
8829func (page *OperationListResultPage) Next() error {
8830	return page.NextWithContext(context.Background())
8831}
8832
8833// NotDone returns true if the page enumeration should be started or is not yet complete.
8834func (page OperationListResultPage) NotDone() bool {
8835	return !page.olr.IsEmpty()
8836}
8837
8838// Response returns the raw server response from the last page request.
8839func (page OperationListResultPage) Response() OperationListResult {
8840	return page.olr
8841}
8842
8843// Values returns the slice of values for the current page or nil if there are no values.
8844func (page OperationListResultPage) Values() []Operation {
8845	if page.olr.IsEmpty() {
8846		return nil
8847	}
8848	return *page.olr.Value
8849}
8850
8851// Creates a new instance of the OperationListResultPage type.
8852func NewOperationListResultPage(cur OperationListResult, getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
8853	return OperationListResultPage{
8854		fn:  getNextPage,
8855		olr: cur,
8856	}
8857}
8858
8859// OperationPropertiesFormat description of operation properties format.
8860type OperationPropertiesFormat struct {
8861	// ServiceSpecification - Specification of the service.
8862	ServiceSpecification *OperationPropertiesFormatServiceSpecification `json:"serviceSpecification,omitempty"`
8863}
8864
8865// OperationPropertiesFormatServiceSpecification specification of the service.
8866type OperationPropertiesFormatServiceSpecification struct {
8867	// MetricSpecifications - Operation service specification.
8868	MetricSpecifications *[]MetricSpecification `json:"metricSpecifications,omitempty"`
8869	// LogSpecifications - Operation log specification.
8870	LogSpecifications *[]LogSpecification `json:"logSpecifications,omitempty"`
8871}
8872
8873// OutboundNatRule outbound NAT pool of the load balancer.
8874type OutboundNatRule struct {
8875	// OutboundNatRulePropertiesFormat - Properties of load balancer outbound nat rule.
8876	*OutboundNatRulePropertiesFormat `json:"properties,omitempty"`
8877	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
8878	Name *string `json:"name,omitempty"`
8879	// Etag - A unique read-only string that changes whenever the resource is updated.
8880	Etag *string `json:"etag,omitempty"`
8881	// ID - Resource ID.
8882	ID *string `json:"id,omitempty"`
8883}
8884
8885// MarshalJSON is the custom marshaler for OutboundNatRule.
8886func (onr OutboundNatRule) MarshalJSON() ([]byte, error) {
8887	objectMap := make(map[string]interface{})
8888	if onr.OutboundNatRulePropertiesFormat != nil {
8889		objectMap["properties"] = onr.OutboundNatRulePropertiesFormat
8890	}
8891	if onr.Name != nil {
8892		objectMap["name"] = onr.Name
8893	}
8894	if onr.Etag != nil {
8895		objectMap["etag"] = onr.Etag
8896	}
8897	if onr.ID != nil {
8898		objectMap["id"] = onr.ID
8899	}
8900	return json.Marshal(objectMap)
8901}
8902
8903// UnmarshalJSON is the custom unmarshaler for OutboundNatRule struct.
8904func (onr *OutboundNatRule) UnmarshalJSON(body []byte) error {
8905	var m map[string]*json.RawMessage
8906	err := json.Unmarshal(body, &m)
8907	if err != nil {
8908		return err
8909	}
8910	for k, v := range m {
8911		switch k {
8912		case "properties":
8913			if v != nil {
8914				var outboundNatRulePropertiesFormat OutboundNatRulePropertiesFormat
8915				err = json.Unmarshal(*v, &outboundNatRulePropertiesFormat)
8916				if err != nil {
8917					return err
8918				}
8919				onr.OutboundNatRulePropertiesFormat = &outboundNatRulePropertiesFormat
8920			}
8921		case "name":
8922			if v != nil {
8923				var name string
8924				err = json.Unmarshal(*v, &name)
8925				if err != nil {
8926					return err
8927				}
8928				onr.Name = &name
8929			}
8930		case "etag":
8931			if v != nil {
8932				var etag string
8933				err = json.Unmarshal(*v, &etag)
8934				if err != nil {
8935					return err
8936				}
8937				onr.Etag = &etag
8938			}
8939		case "id":
8940			if v != nil {
8941				var ID string
8942				err = json.Unmarshal(*v, &ID)
8943				if err != nil {
8944					return err
8945				}
8946				onr.ID = &ID
8947			}
8948		}
8949	}
8950
8951	return nil
8952}
8953
8954// OutboundNatRulePropertiesFormat outbound NAT pool of the load balancer.
8955type OutboundNatRulePropertiesFormat struct {
8956	// AllocatedOutboundPorts - The number of outbound ports to be used for NAT.
8957	AllocatedOutboundPorts *int32 `json:"allocatedOutboundPorts,omitempty"`
8958	// FrontendIPConfigurations - The Frontend IP addresses of the load balancer.
8959	FrontendIPConfigurations *[]SubResource `json:"frontendIPConfigurations,omitempty"`
8960	// BackendAddressPool - A reference to a pool of DIPs. Outbound traffic is randomly load balanced across IPs in the backend IPs.
8961	BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"`
8962	// ProvisioningState - Gets the provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
8963	ProvisioningState *string `json:"provisioningState,omitempty"`
8964}
8965
8966// PacketCapture parameters that define the create packet capture operation.
8967type PacketCapture struct {
8968	*PacketCaptureParameters `json:"properties,omitempty"`
8969}
8970
8971// MarshalJSON is the custom marshaler for PacketCapture.
8972func (pc PacketCapture) MarshalJSON() ([]byte, error) {
8973	objectMap := make(map[string]interface{})
8974	if pc.PacketCaptureParameters != nil {
8975		objectMap["properties"] = pc.PacketCaptureParameters
8976	}
8977	return json.Marshal(objectMap)
8978}
8979
8980// UnmarshalJSON is the custom unmarshaler for PacketCapture struct.
8981func (pc *PacketCapture) UnmarshalJSON(body []byte) error {
8982	var m map[string]*json.RawMessage
8983	err := json.Unmarshal(body, &m)
8984	if err != nil {
8985		return err
8986	}
8987	for k, v := range m {
8988		switch k {
8989		case "properties":
8990			if v != nil {
8991				var packetCaptureParameters PacketCaptureParameters
8992				err = json.Unmarshal(*v, &packetCaptureParameters)
8993				if err != nil {
8994					return err
8995				}
8996				pc.PacketCaptureParameters = &packetCaptureParameters
8997			}
8998		}
8999	}
9000
9001	return nil
9002}
9003
9004// PacketCaptureFilter filter that is applied to packet capture request. Multiple filters can be applied.
9005type PacketCaptureFilter struct {
9006	// Protocol - Protocol to be filtered on. Possible values include: 'PcProtocolTCP', 'PcProtocolUDP', 'PcProtocolAny'
9007	Protocol PcProtocol `json:"protocol,omitempty"`
9008	// 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.
9009	LocalIPAddress *string `json:"localIPAddress,omitempty"`
9010	// 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.
9011	RemoteIPAddress *string `json:"remoteIPAddress,omitempty"`
9012	// 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.
9013	LocalPort *string `json:"localPort,omitempty"`
9014	// 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.
9015	RemotePort *string `json:"remotePort,omitempty"`
9016}
9017
9018// PacketCaptureListResult list of packet capture sessions.
9019type PacketCaptureListResult struct {
9020	autorest.Response `json:"-"`
9021	// Value - Information about packet capture sessions.
9022	Value *[]PacketCaptureResult `json:"value,omitempty"`
9023}
9024
9025// PacketCaptureParameters parameters that define the create packet capture operation.
9026type PacketCaptureParameters struct {
9027	// Target - The ID of the targeted resource, only VM is currently supported.
9028	Target *string `json:"target,omitempty"`
9029	// BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated.
9030	BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"`
9031	// TotalBytesPerSession - Maximum size of the capture output.
9032	TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"`
9033	// TimeLimitInSeconds - Maximum duration of the capture session in seconds.
9034	TimeLimitInSeconds *int32                        `json:"timeLimitInSeconds,omitempty"`
9035	StorageLocation    *PacketCaptureStorageLocation `json:"storageLocation,omitempty"`
9036	Filters            *[]PacketCaptureFilter        `json:"filters,omitempty"`
9037}
9038
9039// PacketCaptureQueryStatusResult status of packet capture session.
9040type PacketCaptureQueryStatusResult struct {
9041	autorest.Response `json:"-"`
9042	// Name - The name of the packet capture resource.
9043	Name *string `json:"name,omitempty"`
9044	// ID - The ID of the packet capture resource.
9045	ID *string `json:"id,omitempty"`
9046	// CaptureStartTime - The start time of the packet capture session.
9047	CaptureStartTime *date.Time `json:"captureStartTime,omitempty"`
9048	// PacketCaptureStatus - The status of the packet capture session. Possible values include: 'PcStatusNotStarted', 'PcStatusRunning', 'PcStatusStopped', 'PcStatusError', 'PcStatusUnknown'
9049	PacketCaptureStatus PcStatus `json:"packetCaptureStatus,omitempty"`
9050	// StopReason - The reason the current packet capture session was stopped.
9051	StopReason *string `json:"stopReason,omitempty"`
9052	// PacketCaptureError - List of errors of packet capture session.
9053	PacketCaptureError *[]PcError `json:"packetCaptureError,omitempty"`
9054}
9055
9056// PacketCaptureResult information about packet capture session.
9057type PacketCaptureResult struct {
9058	autorest.Response `json:"-"`
9059	// Name - READ-ONLY; Name of the packet capture session.
9060	Name *string `json:"name,omitempty"`
9061	// ID - READ-ONLY; ID of the packet capture operation.
9062	ID                             *string `json:"id,omitempty"`
9063	Etag                           *string `json:"etag,omitempty"`
9064	*PacketCaptureResultProperties `json:"properties,omitempty"`
9065}
9066
9067// MarshalJSON is the custom marshaler for PacketCaptureResult.
9068func (pcr PacketCaptureResult) MarshalJSON() ([]byte, error) {
9069	objectMap := make(map[string]interface{})
9070	if pcr.Etag != nil {
9071		objectMap["etag"] = pcr.Etag
9072	}
9073	if pcr.PacketCaptureResultProperties != nil {
9074		objectMap["properties"] = pcr.PacketCaptureResultProperties
9075	}
9076	return json.Marshal(objectMap)
9077}
9078
9079// UnmarshalJSON is the custom unmarshaler for PacketCaptureResult struct.
9080func (pcr *PacketCaptureResult) UnmarshalJSON(body []byte) error {
9081	var m map[string]*json.RawMessage
9082	err := json.Unmarshal(body, &m)
9083	if err != nil {
9084		return err
9085	}
9086	for k, v := range m {
9087		switch k {
9088		case "name":
9089			if v != nil {
9090				var name string
9091				err = json.Unmarshal(*v, &name)
9092				if err != nil {
9093					return err
9094				}
9095				pcr.Name = &name
9096			}
9097		case "id":
9098			if v != nil {
9099				var ID string
9100				err = json.Unmarshal(*v, &ID)
9101				if err != nil {
9102					return err
9103				}
9104				pcr.ID = &ID
9105			}
9106		case "etag":
9107			if v != nil {
9108				var etag string
9109				err = json.Unmarshal(*v, &etag)
9110				if err != nil {
9111					return err
9112				}
9113				pcr.Etag = &etag
9114			}
9115		case "properties":
9116			if v != nil {
9117				var packetCaptureResultProperties PacketCaptureResultProperties
9118				err = json.Unmarshal(*v, &packetCaptureResultProperties)
9119				if err != nil {
9120					return err
9121				}
9122				pcr.PacketCaptureResultProperties = &packetCaptureResultProperties
9123			}
9124		}
9125	}
9126
9127	return nil
9128}
9129
9130// PacketCaptureResultProperties describes the properties of a packet capture session.
9131type PacketCaptureResultProperties struct {
9132	// ProvisioningState - The provisioning state of the packet capture session. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
9133	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
9134	// Target - The ID of the targeted resource, only VM is currently supported.
9135	Target *string `json:"target,omitempty"`
9136	// BytesToCapturePerPacket - Number of bytes captured per packet, the remaining bytes are truncated.
9137	BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"`
9138	// TotalBytesPerSession - Maximum size of the capture output.
9139	TotalBytesPerSession *int32 `json:"totalBytesPerSession,omitempty"`
9140	// TimeLimitInSeconds - Maximum duration of the capture session in seconds.
9141	TimeLimitInSeconds *int32                        `json:"timeLimitInSeconds,omitempty"`
9142	StorageLocation    *PacketCaptureStorageLocation `json:"storageLocation,omitempty"`
9143	Filters            *[]PacketCaptureFilter        `json:"filters,omitempty"`
9144}
9145
9146// PacketCapturesCreateFuture an abstraction for monitoring and retrieving the results of a long-running
9147// operation.
9148type PacketCapturesCreateFuture struct {
9149	azure.FutureAPI
9150	// Result returns the result of the asynchronous operation.
9151	// If the operation has not completed it will return an error.
9152	Result func(PacketCapturesClient) (PacketCaptureResult, error)
9153}
9154
9155// PacketCapturesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
9156// operation.
9157type PacketCapturesDeleteFuture struct {
9158	azure.FutureAPI
9159	// Result returns the result of the asynchronous operation.
9160	// If the operation has not completed it will return an error.
9161	Result func(PacketCapturesClient) (autorest.Response, error)
9162}
9163
9164// PacketCapturesGetStatusFuture an abstraction for monitoring and retrieving the results of a long-running
9165// operation.
9166type PacketCapturesGetStatusFuture struct {
9167	azure.FutureAPI
9168	// Result returns the result of the asynchronous operation.
9169	// If the operation has not completed it will return an error.
9170	Result func(PacketCapturesClient) (PacketCaptureQueryStatusResult, error)
9171}
9172
9173// PacketCapturesStopFuture an abstraction for monitoring and retrieving the results of a long-running
9174// operation.
9175type PacketCapturesStopFuture struct {
9176	azure.FutureAPI
9177	// Result returns the result of the asynchronous operation.
9178	// If the operation has not completed it will return an error.
9179	Result func(PacketCapturesClient) (autorest.Response, error)
9180}
9181
9182// PacketCaptureStorageLocation describes the storage location for a packet capture session.
9183type PacketCaptureStorageLocation struct {
9184	// StorageID - The ID of the storage account to save the packet capture session. Required if no local file path is provided.
9185	StorageID *string `json:"storageId,omitempty"`
9186	// 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.
9187	StoragePath *string `json:"storagePath,omitempty"`
9188	// 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.
9189	FilePath *string `json:"filePath,omitempty"`
9190}
9191
9192// PatchRouteFilter route Filter Resource.
9193type PatchRouteFilter struct {
9194	*RouteFilterPropertiesFormat `json:"properties,omitempty"`
9195	// Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource.
9196	Name *string `json:"name,omitempty"`
9197	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
9198	Etag *string `json:"etag,omitempty"`
9199	// Type - READ-ONLY; Resource type.
9200	Type *string `json:"type,omitempty"`
9201	// Tags - Resource tags.
9202	Tags map[string]*string `json:"tags"`
9203	// ID - Resource ID.
9204	ID *string `json:"id,omitempty"`
9205}
9206
9207// MarshalJSON is the custom marshaler for PatchRouteFilter.
9208func (prf PatchRouteFilter) MarshalJSON() ([]byte, error) {
9209	objectMap := make(map[string]interface{})
9210	if prf.RouteFilterPropertiesFormat != nil {
9211		objectMap["properties"] = prf.RouteFilterPropertiesFormat
9212	}
9213	if prf.Tags != nil {
9214		objectMap["tags"] = prf.Tags
9215	}
9216	if prf.ID != nil {
9217		objectMap["id"] = prf.ID
9218	}
9219	return json.Marshal(objectMap)
9220}
9221
9222// UnmarshalJSON is the custom unmarshaler for PatchRouteFilter struct.
9223func (prf *PatchRouteFilter) UnmarshalJSON(body []byte) error {
9224	var m map[string]*json.RawMessage
9225	err := json.Unmarshal(body, &m)
9226	if err != nil {
9227		return err
9228	}
9229	for k, v := range m {
9230		switch k {
9231		case "properties":
9232			if v != nil {
9233				var routeFilterPropertiesFormat RouteFilterPropertiesFormat
9234				err = json.Unmarshal(*v, &routeFilterPropertiesFormat)
9235				if err != nil {
9236					return err
9237				}
9238				prf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat
9239			}
9240		case "name":
9241			if v != nil {
9242				var name string
9243				err = json.Unmarshal(*v, &name)
9244				if err != nil {
9245					return err
9246				}
9247				prf.Name = &name
9248			}
9249		case "etag":
9250			if v != nil {
9251				var etag string
9252				err = json.Unmarshal(*v, &etag)
9253				if err != nil {
9254					return err
9255				}
9256				prf.Etag = &etag
9257			}
9258		case "type":
9259			if v != nil {
9260				var typeVar string
9261				err = json.Unmarshal(*v, &typeVar)
9262				if err != nil {
9263					return err
9264				}
9265				prf.Type = &typeVar
9266			}
9267		case "tags":
9268			if v != nil {
9269				var tags map[string]*string
9270				err = json.Unmarshal(*v, &tags)
9271				if err != nil {
9272					return err
9273				}
9274				prf.Tags = tags
9275			}
9276		case "id":
9277			if v != nil {
9278				var ID string
9279				err = json.Unmarshal(*v, &ID)
9280				if err != nil {
9281					return err
9282				}
9283				prf.ID = &ID
9284			}
9285		}
9286	}
9287
9288	return nil
9289}
9290
9291// PatchRouteFilterRule route Filter Rule Resource
9292type PatchRouteFilterRule struct {
9293	*RouteFilterRulePropertiesFormat `json:"properties,omitempty"`
9294	// Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource.
9295	Name *string `json:"name,omitempty"`
9296	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
9297	Etag *string `json:"etag,omitempty"`
9298	// ID - Resource ID.
9299	ID *string `json:"id,omitempty"`
9300}
9301
9302// MarshalJSON is the custom marshaler for PatchRouteFilterRule.
9303func (prfr PatchRouteFilterRule) MarshalJSON() ([]byte, error) {
9304	objectMap := make(map[string]interface{})
9305	if prfr.RouteFilterRulePropertiesFormat != nil {
9306		objectMap["properties"] = prfr.RouteFilterRulePropertiesFormat
9307	}
9308	if prfr.ID != nil {
9309		objectMap["id"] = prfr.ID
9310	}
9311	return json.Marshal(objectMap)
9312}
9313
9314// UnmarshalJSON is the custom unmarshaler for PatchRouteFilterRule struct.
9315func (prfr *PatchRouteFilterRule) UnmarshalJSON(body []byte) error {
9316	var m map[string]*json.RawMessage
9317	err := json.Unmarshal(body, &m)
9318	if err != nil {
9319		return err
9320	}
9321	for k, v := range m {
9322		switch k {
9323		case "properties":
9324			if v != nil {
9325				var routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat
9326				err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat)
9327				if err != nil {
9328					return err
9329				}
9330				prfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat
9331			}
9332		case "name":
9333			if v != nil {
9334				var name string
9335				err = json.Unmarshal(*v, &name)
9336				if err != nil {
9337					return err
9338				}
9339				prfr.Name = &name
9340			}
9341		case "etag":
9342			if v != nil {
9343				var etag string
9344				err = json.Unmarshal(*v, &etag)
9345				if err != nil {
9346					return err
9347				}
9348				prfr.Etag = &etag
9349			}
9350		case "id":
9351			if v != nil {
9352				var ID string
9353				err = json.Unmarshal(*v, &ID)
9354				if err != nil {
9355					return err
9356				}
9357				prfr.ID = &ID
9358			}
9359		}
9360	}
9361
9362	return nil
9363}
9364
9365// Probe a load balancer probe.
9366type Probe struct {
9367	autorest.Response `json:"-"`
9368	// ProbePropertiesFormat - Properties of load balancer probe.
9369	*ProbePropertiesFormat `json:"properties,omitempty"`
9370	// Name - Gets name of the resource that is unique within a resource group. This name can be used to access the resource.
9371	Name *string `json:"name,omitempty"`
9372	// Etag - A unique read-only string that changes whenever the resource is updated.
9373	Etag *string `json:"etag,omitempty"`
9374	// ID - Resource ID.
9375	ID *string `json:"id,omitempty"`
9376}
9377
9378// MarshalJSON is the custom marshaler for Probe.
9379func (p Probe) MarshalJSON() ([]byte, error) {
9380	objectMap := make(map[string]interface{})
9381	if p.ProbePropertiesFormat != nil {
9382		objectMap["properties"] = p.ProbePropertiesFormat
9383	}
9384	if p.Name != nil {
9385		objectMap["name"] = p.Name
9386	}
9387	if p.Etag != nil {
9388		objectMap["etag"] = p.Etag
9389	}
9390	if p.ID != nil {
9391		objectMap["id"] = p.ID
9392	}
9393	return json.Marshal(objectMap)
9394}
9395
9396// UnmarshalJSON is the custom unmarshaler for Probe struct.
9397func (p *Probe) UnmarshalJSON(body []byte) error {
9398	var m map[string]*json.RawMessage
9399	err := json.Unmarshal(body, &m)
9400	if err != nil {
9401		return err
9402	}
9403	for k, v := range m {
9404		switch k {
9405		case "properties":
9406			if v != nil {
9407				var probePropertiesFormat ProbePropertiesFormat
9408				err = json.Unmarshal(*v, &probePropertiesFormat)
9409				if err != nil {
9410					return err
9411				}
9412				p.ProbePropertiesFormat = &probePropertiesFormat
9413			}
9414		case "name":
9415			if v != nil {
9416				var name string
9417				err = json.Unmarshal(*v, &name)
9418				if err != nil {
9419					return err
9420				}
9421				p.Name = &name
9422			}
9423		case "etag":
9424			if v != nil {
9425				var etag string
9426				err = json.Unmarshal(*v, &etag)
9427				if err != nil {
9428					return err
9429				}
9430				p.Etag = &etag
9431			}
9432		case "id":
9433			if v != nil {
9434				var ID string
9435				err = json.Unmarshal(*v, &ID)
9436				if err != nil {
9437					return err
9438				}
9439				p.ID = &ID
9440			}
9441		}
9442	}
9443
9444	return nil
9445}
9446
9447// ProbePropertiesFormat load balancer probe resource.
9448type ProbePropertiesFormat struct {
9449	// LoadBalancingRules - READ-ONLY; The load balancer rules that use this probe.
9450	LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"`
9451	// 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'
9452	Protocol ProbeProtocol `json:"protocol,omitempty"`
9453	// Port - The port for communicating the probe. Possible values range from 1 to 65535, inclusive.
9454	Port *int32 `json:"port,omitempty"`
9455	// 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.
9456	IntervalInSeconds *int32 `json:"intervalInSeconds,omitempty"`
9457	// 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.
9458	NumberOfProbes *int32 `json:"numberOfProbes,omitempty"`
9459	// 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.
9460	RequestPath *string `json:"requestPath,omitempty"`
9461	// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
9462	ProvisioningState *string `json:"provisioningState,omitempty"`
9463}
9464
9465// MarshalJSON is the custom marshaler for ProbePropertiesFormat.
9466func (ppf ProbePropertiesFormat) MarshalJSON() ([]byte, error) {
9467	objectMap := make(map[string]interface{})
9468	if ppf.Protocol != "" {
9469		objectMap["protocol"] = ppf.Protocol
9470	}
9471	if ppf.Port != nil {
9472		objectMap["port"] = ppf.Port
9473	}
9474	if ppf.IntervalInSeconds != nil {
9475		objectMap["intervalInSeconds"] = ppf.IntervalInSeconds
9476	}
9477	if ppf.NumberOfProbes != nil {
9478		objectMap["numberOfProbes"] = ppf.NumberOfProbes
9479	}
9480	if ppf.RequestPath != nil {
9481		objectMap["requestPath"] = ppf.RequestPath
9482	}
9483	if ppf.ProvisioningState != nil {
9484		objectMap["provisioningState"] = ppf.ProvisioningState
9485	}
9486	return json.Marshal(objectMap)
9487}
9488
9489// PublicIPAddress public IP address resource.
9490type PublicIPAddress struct {
9491	autorest.Response `json:"-"`
9492	// Sku - The public IP address SKU.
9493	Sku *PublicIPAddressSku `json:"sku,omitempty"`
9494	// PublicIPAddressPropertiesFormat - Public IP address properties.
9495	*PublicIPAddressPropertiesFormat `json:"properties,omitempty"`
9496	// Etag - A unique read-only string that changes whenever the resource is updated.
9497	Etag *string `json:"etag,omitempty"`
9498	// Zones - A list of availability zones denoting the IP allocated for the resource needs to come from.
9499	Zones *[]string `json:"zones,omitempty"`
9500	// ID - Resource ID.
9501	ID *string `json:"id,omitempty"`
9502	// Name - READ-ONLY; Resource name.
9503	Name *string `json:"name,omitempty"`
9504	// Type - READ-ONLY; Resource type.
9505	Type *string `json:"type,omitempty"`
9506	// Location - Resource location.
9507	Location *string `json:"location,omitempty"`
9508	// Tags - Resource tags.
9509	Tags map[string]*string `json:"tags"`
9510}
9511
9512// MarshalJSON is the custom marshaler for PublicIPAddress.
9513func (pia PublicIPAddress) MarshalJSON() ([]byte, error) {
9514	objectMap := make(map[string]interface{})
9515	if pia.Sku != nil {
9516		objectMap["sku"] = pia.Sku
9517	}
9518	if pia.PublicIPAddressPropertiesFormat != nil {
9519		objectMap["properties"] = pia.PublicIPAddressPropertiesFormat
9520	}
9521	if pia.Etag != nil {
9522		objectMap["etag"] = pia.Etag
9523	}
9524	if pia.Zones != nil {
9525		objectMap["zones"] = pia.Zones
9526	}
9527	if pia.ID != nil {
9528		objectMap["id"] = pia.ID
9529	}
9530	if pia.Location != nil {
9531		objectMap["location"] = pia.Location
9532	}
9533	if pia.Tags != nil {
9534		objectMap["tags"] = pia.Tags
9535	}
9536	return json.Marshal(objectMap)
9537}
9538
9539// UnmarshalJSON is the custom unmarshaler for PublicIPAddress struct.
9540func (pia *PublicIPAddress) UnmarshalJSON(body []byte) error {
9541	var m map[string]*json.RawMessage
9542	err := json.Unmarshal(body, &m)
9543	if err != nil {
9544		return err
9545	}
9546	for k, v := range m {
9547		switch k {
9548		case "sku":
9549			if v != nil {
9550				var sku PublicIPAddressSku
9551				err = json.Unmarshal(*v, &sku)
9552				if err != nil {
9553					return err
9554				}
9555				pia.Sku = &sku
9556			}
9557		case "properties":
9558			if v != nil {
9559				var publicIPAddressPropertiesFormat PublicIPAddressPropertiesFormat
9560				err = json.Unmarshal(*v, &publicIPAddressPropertiesFormat)
9561				if err != nil {
9562					return err
9563				}
9564				pia.PublicIPAddressPropertiesFormat = &publicIPAddressPropertiesFormat
9565			}
9566		case "etag":
9567			if v != nil {
9568				var etag string
9569				err = json.Unmarshal(*v, &etag)
9570				if err != nil {
9571					return err
9572				}
9573				pia.Etag = &etag
9574			}
9575		case "zones":
9576			if v != nil {
9577				var zones []string
9578				err = json.Unmarshal(*v, &zones)
9579				if err != nil {
9580					return err
9581				}
9582				pia.Zones = &zones
9583			}
9584		case "id":
9585			if v != nil {
9586				var ID string
9587				err = json.Unmarshal(*v, &ID)
9588				if err != nil {
9589					return err
9590				}
9591				pia.ID = &ID
9592			}
9593		case "name":
9594			if v != nil {
9595				var name string
9596				err = json.Unmarshal(*v, &name)
9597				if err != nil {
9598					return err
9599				}
9600				pia.Name = &name
9601			}
9602		case "type":
9603			if v != nil {
9604				var typeVar string
9605				err = json.Unmarshal(*v, &typeVar)
9606				if err != nil {
9607					return err
9608				}
9609				pia.Type = &typeVar
9610			}
9611		case "location":
9612			if v != nil {
9613				var location string
9614				err = json.Unmarshal(*v, &location)
9615				if err != nil {
9616					return err
9617				}
9618				pia.Location = &location
9619			}
9620		case "tags":
9621			if v != nil {
9622				var tags map[string]*string
9623				err = json.Unmarshal(*v, &tags)
9624				if err != nil {
9625					return err
9626				}
9627				pia.Tags = tags
9628			}
9629		}
9630	}
9631
9632	return nil
9633}
9634
9635// PublicIPAddressDNSSettings contains FQDN of the DNS record associated with the public IP address
9636type PublicIPAddressDNSSettings struct {
9637	// 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.
9638	DomainNameLabel *string `json:"domainNameLabel,omitempty"`
9639	// 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.
9640	Fqdn *string `json:"fqdn,omitempty"`
9641	// 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.
9642	ReverseFqdn *string `json:"reverseFqdn,omitempty"`
9643}
9644
9645// PublicIPAddressesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
9646// long-running operation.
9647type PublicIPAddressesCreateOrUpdateFuture struct {
9648	azure.FutureAPI
9649	// Result returns the result of the asynchronous operation.
9650	// If the operation has not completed it will return an error.
9651	Result func(PublicIPAddressesClient) (PublicIPAddress, error)
9652}
9653
9654// PublicIPAddressesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
9655// operation.
9656type PublicIPAddressesDeleteFuture struct {
9657	azure.FutureAPI
9658	// Result returns the result of the asynchronous operation.
9659	// If the operation has not completed it will return an error.
9660	Result func(PublicIPAddressesClient) (autorest.Response, error)
9661}
9662
9663// PublicIPAddressesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
9664// long-running operation.
9665type PublicIPAddressesUpdateTagsFuture struct {
9666	azure.FutureAPI
9667	// Result returns the result of the asynchronous operation.
9668	// If the operation has not completed it will return an error.
9669	Result func(PublicIPAddressesClient) (PublicIPAddress, error)
9670}
9671
9672// PublicIPAddressListResult response for ListPublicIpAddresses API service call.
9673type PublicIPAddressListResult struct {
9674	autorest.Response `json:"-"`
9675	// Value - A list of public IP addresses that exists in a resource group.
9676	Value *[]PublicIPAddress `json:"value,omitempty"`
9677	// NextLink - The URL to get the next set of results.
9678	NextLink *string `json:"nextLink,omitempty"`
9679}
9680
9681// PublicIPAddressListResultIterator provides access to a complete listing of PublicIPAddress values.
9682type PublicIPAddressListResultIterator struct {
9683	i    int
9684	page PublicIPAddressListResultPage
9685}
9686
9687// NextWithContext advances to the next value.  If there was an error making
9688// the request the iterator does not advance and the error is returned.
9689func (iter *PublicIPAddressListResultIterator) NextWithContext(ctx context.Context) (err error) {
9690	if tracing.IsEnabled() {
9691		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultIterator.NextWithContext")
9692		defer func() {
9693			sc := -1
9694			if iter.Response().Response.Response != nil {
9695				sc = iter.Response().Response.Response.StatusCode
9696			}
9697			tracing.EndSpan(ctx, sc, err)
9698		}()
9699	}
9700	iter.i++
9701	if iter.i < len(iter.page.Values()) {
9702		return nil
9703	}
9704	err = iter.page.NextWithContext(ctx)
9705	if err != nil {
9706		iter.i--
9707		return err
9708	}
9709	iter.i = 0
9710	return nil
9711}
9712
9713// Next advances to the next value.  If there was an error making
9714// the request the iterator does not advance and the error is returned.
9715// Deprecated: Use NextWithContext() instead.
9716func (iter *PublicIPAddressListResultIterator) Next() error {
9717	return iter.NextWithContext(context.Background())
9718}
9719
9720// NotDone returns true if the enumeration should be started or is not yet complete.
9721func (iter PublicIPAddressListResultIterator) NotDone() bool {
9722	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9723}
9724
9725// Response returns the raw server response from the last page request.
9726func (iter PublicIPAddressListResultIterator) Response() PublicIPAddressListResult {
9727	return iter.page.Response()
9728}
9729
9730// Value returns the current value or a zero-initialized value if the
9731// iterator has advanced beyond the end of the collection.
9732func (iter PublicIPAddressListResultIterator) Value() PublicIPAddress {
9733	if !iter.page.NotDone() {
9734		return PublicIPAddress{}
9735	}
9736	return iter.page.Values()[iter.i]
9737}
9738
9739// Creates a new instance of the PublicIPAddressListResultIterator type.
9740func NewPublicIPAddressListResultIterator(page PublicIPAddressListResultPage) PublicIPAddressListResultIterator {
9741	return PublicIPAddressListResultIterator{page: page}
9742}
9743
9744// IsEmpty returns true if the ListResult contains no values.
9745func (pialr PublicIPAddressListResult) IsEmpty() bool {
9746	return pialr.Value == nil || len(*pialr.Value) == 0
9747}
9748
9749// hasNextLink returns true if the NextLink is not empty.
9750func (pialr PublicIPAddressListResult) hasNextLink() bool {
9751	return pialr.NextLink != nil && len(*pialr.NextLink) != 0
9752}
9753
9754// publicIPAddressListResultPreparer prepares a request to retrieve the next set of results.
9755// It returns nil if no more results exist.
9756func (pialr PublicIPAddressListResult) publicIPAddressListResultPreparer(ctx context.Context) (*http.Request, error) {
9757	if !pialr.hasNextLink() {
9758		return nil, nil
9759	}
9760	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9761		autorest.AsJSON(),
9762		autorest.AsGet(),
9763		autorest.WithBaseURL(to.String(pialr.NextLink)))
9764}
9765
9766// PublicIPAddressListResultPage contains a page of PublicIPAddress values.
9767type PublicIPAddressListResultPage struct {
9768	fn    func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)
9769	pialr PublicIPAddressListResult
9770}
9771
9772// NextWithContext advances to the next page of values.  If there was an error making
9773// the request the page does not advance and the error is returned.
9774func (page *PublicIPAddressListResultPage) NextWithContext(ctx context.Context) (err error) {
9775	if tracing.IsEnabled() {
9776		ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultPage.NextWithContext")
9777		defer func() {
9778			sc := -1
9779			if page.Response().Response.Response != nil {
9780				sc = page.Response().Response.Response.StatusCode
9781			}
9782			tracing.EndSpan(ctx, sc, err)
9783		}()
9784	}
9785	for {
9786		next, err := page.fn(ctx, page.pialr)
9787		if err != nil {
9788			return err
9789		}
9790		page.pialr = next
9791		if !next.hasNextLink() || !next.IsEmpty() {
9792			break
9793		}
9794	}
9795	return nil
9796}
9797
9798// Next advances to the next page of values.  If there was an error making
9799// the request the page does not advance and the error is returned.
9800// Deprecated: Use NextWithContext() instead.
9801func (page *PublicIPAddressListResultPage) Next() error {
9802	return page.NextWithContext(context.Background())
9803}
9804
9805// NotDone returns true if the page enumeration should be started or is not yet complete.
9806func (page PublicIPAddressListResultPage) NotDone() bool {
9807	return !page.pialr.IsEmpty()
9808}
9809
9810// Response returns the raw server response from the last page request.
9811func (page PublicIPAddressListResultPage) Response() PublicIPAddressListResult {
9812	return page.pialr
9813}
9814
9815// Values returns the slice of values for the current page or nil if there are no values.
9816func (page PublicIPAddressListResultPage) Values() []PublicIPAddress {
9817	if page.pialr.IsEmpty() {
9818		return nil
9819	}
9820	return *page.pialr.Value
9821}
9822
9823// Creates a new instance of the PublicIPAddressListResultPage type.
9824func NewPublicIPAddressListResultPage(cur PublicIPAddressListResult, getNextPage func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)) PublicIPAddressListResultPage {
9825	return PublicIPAddressListResultPage{
9826		fn:    getNextPage,
9827		pialr: cur,
9828	}
9829}
9830
9831// PublicIPAddressPropertiesFormat public IP address properties.
9832type PublicIPAddressPropertiesFormat struct {
9833	// PublicIPAllocationMethod - The public IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
9834	PublicIPAllocationMethod IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"`
9835	// PublicIPAddressVersion - The public IP address version. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6'
9836	PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"`
9837	// IPConfiguration - READ-ONLY; The IP configuration associated with the public IP address.
9838	IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"`
9839	// DNSSettings - The FQDN of the DNS record associated with the public IP address.
9840	DNSSettings *PublicIPAddressDNSSettings `json:"dnsSettings,omitempty"`
9841	// IPTags - The list of tags associated with the public IP address.
9842	IPTags *[]IPTag `json:"ipTags,omitempty"`
9843	// IPAddress - The IP address associated with the public IP address resource.
9844	IPAddress *string `json:"ipAddress,omitempty"`
9845	// IdleTimeoutInMinutes - The idle timeout of the public IP address.
9846	IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
9847	// ResourceGUID - The resource GUID property of the public IP resource.
9848	ResourceGUID *string `json:"resourceGuid,omitempty"`
9849	// ProvisioningState - The provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
9850	ProvisioningState *string `json:"provisioningState,omitempty"`
9851}
9852
9853// MarshalJSON is the custom marshaler for PublicIPAddressPropertiesFormat.
9854func (piapf PublicIPAddressPropertiesFormat) MarshalJSON() ([]byte, error) {
9855	objectMap := make(map[string]interface{})
9856	if piapf.PublicIPAllocationMethod != "" {
9857		objectMap["publicIPAllocationMethod"] = piapf.PublicIPAllocationMethod
9858	}
9859	if piapf.PublicIPAddressVersion != "" {
9860		objectMap["publicIPAddressVersion"] = piapf.PublicIPAddressVersion
9861	}
9862	if piapf.DNSSettings != nil {
9863		objectMap["dnsSettings"] = piapf.DNSSettings
9864	}
9865	if piapf.IPTags != nil {
9866		objectMap["ipTags"] = piapf.IPTags
9867	}
9868	if piapf.IPAddress != nil {
9869		objectMap["ipAddress"] = piapf.IPAddress
9870	}
9871	if piapf.IdleTimeoutInMinutes != nil {
9872		objectMap["idleTimeoutInMinutes"] = piapf.IdleTimeoutInMinutes
9873	}
9874	if piapf.ResourceGUID != nil {
9875		objectMap["resourceGuid"] = piapf.ResourceGUID
9876	}
9877	if piapf.ProvisioningState != nil {
9878		objectMap["provisioningState"] = piapf.ProvisioningState
9879	}
9880	return json.Marshal(objectMap)
9881}
9882
9883// PublicIPAddressSku SKU of a public IP address
9884type PublicIPAddressSku struct {
9885	// Name - Name of a public IP address SKU. Possible values include: 'PublicIPAddressSkuNameBasic', 'PublicIPAddressSkuNameStandard'
9886	Name PublicIPAddressSkuName `json:"name,omitempty"`
9887}
9888
9889// QueryTroubleshootingParameters parameters that define the resource to query the troubleshooting result.
9890type QueryTroubleshootingParameters struct {
9891	// TargetResourceID - The target resource ID to query the troubleshooting result.
9892	TargetResourceID *string `json:"targetResourceId,omitempty"`
9893}
9894
9895// Resource common resource representation.
9896type Resource struct {
9897	// ID - Resource ID.
9898	ID *string `json:"id,omitempty"`
9899	// Name - READ-ONLY; Resource name.
9900	Name *string `json:"name,omitempty"`
9901	// Type - READ-ONLY; Resource type.
9902	Type *string `json:"type,omitempty"`
9903	// Location - Resource location.
9904	Location *string `json:"location,omitempty"`
9905	// Tags - Resource tags.
9906	Tags map[string]*string `json:"tags"`
9907}
9908
9909// MarshalJSON is the custom marshaler for Resource.
9910func (r Resource) MarshalJSON() ([]byte, error) {
9911	objectMap := make(map[string]interface{})
9912	if r.ID != nil {
9913		objectMap["id"] = r.ID
9914	}
9915	if r.Location != nil {
9916		objectMap["location"] = r.Location
9917	}
9918	if r.Tags != nil {
9919		objectMap["tags"] = r.Tags
9920	}
9921	return json.Marshal(objectMap)
9922}
9923
9924// ResourceNavigationLink resourceNavigationLink resource.
9925type ResourceNavigationLink struct {
9926	// ResourceNavigationLinkFormat - Resource navigation link properties format.
9927	*ResourceNavigationLinkFormat `json:"properties,omitempty"`
9928	// Name - Name of the resource that is unique within a resource group. This name can be used to access the resource.
9929	Name *string `json:"name,omitempty"`
9930	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
9931	Etag *string `json:"etag,omitempty"`
9932	// ID - Resource ID.
9933	ID *string `json:"id,omitempty"`
9934}
9935
9936// MarshalJSON is the custom marshaler for ResourceNavigationLink.
9937func (rnl ResourceNavigationLink) MarshalJSON() ([]byte, error) {
9938	objectMap := make(map[string]interface{})
9939	if rnl.ResourceNavigationLinkFormat != nil {
9940		objectMap["properties"] = rnl.ResourceNavigationLinkFormat
9941	}
9942	if rnl.Name != nil {
9943		objectMap["name"] = rnl.Name
9944	}
9945	if rnl.ID != nil {
9946		objectMap["id"] = rnl.ID
9947	}
9948	return json.Marshal(objectMap)
9949}
9950
9951// UnmarshalJSON is the custom unmarshaler for ResourceNavigationLink struct.
9952func (rnl *ResourceNavigationLink) UnmarshalJSON(body []byte) error {
9953	var m map[string]*json.RawMessage
9954	err := json.Unmarshal(body, &m)
9955	if err != nil {
9956		return err
9957	}
9958	for k, v := range m {
9959		switch k {
9960		case "properties":
9961			if v != nil {
9962				var resourceNavigationLinkFormat ResourceNavigationLinkFormat
9963				err = json.Unmarshal(*v, &resourceNavigationLinkFormat)
9964				if err != nil {
9965					return err
9966				}
9967				rnl.ResourceNavigationLinkFormat = &resourceNavigationLinkFormat
9968			}
9969		case "name":
9970			if v != nil {
9971				var name string
9972				err = json.Unmarshal(*v, &name)
9973				if err != nil {
9974					return err
9975				}
9976				rnl.Name = &name
9977			}
9978		case "etag":
9979			if v != nil {
9980				var etag string
9981				err = json.Unmarshal(*v, &etag)
9982				if err != nil {
9983					return err
9984				}
9985				rnl.Etag = &etag
9986			}
9987		case "id":
9988			if v != nil {
9989				var ID string
9990				err = json.Unmarshal(*v, &ID)
9991				if err != nil {
9992					return err
9993				}
9994				rnl.ID = &ID
9995			}
9996		}
9997	}
9998
9999	return nil
10000}
10001
10002// ResourceNavigationLinkFormat properties of ResourceNavigationLink.
10003type ResourceNavigationLinkFormat struct {
10004	// LinkedResourceType - Resource type of the linked resource.
10005	LinkedResourceType *string `json:"linkedResourceType,omitempty"`
10006	// Link - Link to the external resource
10007	Link *string `json:"link,omitempty"`
10008	// ProvisioningState - READ-ONLY; Provisioning state of the ResourceNavigationLink resource.
10009	ProvisioningState *string `json:"provisioningState,omitempty"`
10010}
10011
10012// MarshalJSON is the custom marshaler for ResourceNavigationLinkFormat.
10013func (rnlf ResourceNavigationLinkFormat) MarshalJSON() ([]byte, error) {
10014	objectMap := make(map[string]interface{})
10015	if rnlf.LinkedResourceType != nil {
10016		objectMap["linkedResourceType"] = rnlf.LinkedResourceType
10017	}
10018	if rnlf.Link != nil {
10019		objectMap["link"] = rnlf.Link
10020	}
10021	return json.Marshal(objectMap)
10022}
10023
10024// RetentionPolicyParameters parameters that define the retention policy for flow log.
10025type RetentionPolicyParameters struct {
10026	// Days - Number of days to retain flow log records.
10027	Days *int32 `json:"days,omitempty"`
10028	// Enabled - Flag to enable/disable retention.
10029	Enabled *bool `json:"enabled,omitempty"`
10030}
10031
10032// Route route resource
10033type Route struct {
10034	autorest.Response `json:"-"`
10035	// RoutePropertiesFormat - Properties of the route.
10036	*RoutePropertiesFormat `json:"properties,omitempty"`
10037	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
10038	Name *string `json:"name,omitempty"`
10039	// Etag - A unique read-only string that changes whenever the resource is updated.
10040	Etag *string `json:"etag,omitempty"`
10041	// ID - Resource ID.
10042	ID *string `json:"id,omitempty"`
10043}
10044
10045// MarshalJSON is the custom marshaler for Route.
10046func (r Route) MarshalJSON() ([]byte, error) {
10047	objectMap := make(map[string]interface{})
10048	if r.RoutePropertiesFormat != nil {
10049		objectMap["properties"] = r.RoutePropertiesFormat
10050	}
10051	if r.Name != nil {
10052		objectMap["name"] = r.Name
10053	}
10054	if r.Etag != nil {
10055		objectMap["etag"] = r.Etag
10056	}
10057	if r.ID != nil {
10058		objectMap["id"] = r.ID
10059	}
10060	return json.Marshal(objectMap)
10061}
10062
10063// UnmarshalJSON is the custom unmarshaler for Route struct.
10064func (r *Route) UnmarshalJSON(body []byte) error {
10065	var m map[string]*json.RawMessage
10066	err := json.Unmarshal(body, &m)
10067	if err != nil {
10068		return err
10069	}
10070	for k, v := range m {
10071		switch k {
10072		case "properties":
10073			if v != nil {
10074				var routePropertiesFormat RoutePropertiesFormat
10075				err = json.Unmarshal(*v, &routePropertiesFormat)
10076				if err != nil {
10077					return err
10078				}
10079				r.RoutePropertiesFormat = &routePropertiesFormat
10080			}
10081		case "name":
10082			if v != nil {
10083				var name string
10084				err = json.Unmarshal(*v, &name)
10085				if err != nil {
10086					return err
10087				}
10088				r.Name = &name
10089			}
10090		case "etag":
10091			if v != nil {
10092				var etag string
10093				err = json.Unmarshal(*v, &etag)
10094				if err != nil {
10095					return err
10096				}
10097				r.Etag = &etag
10098			}
10099		case "id":
10100			if v != nil {
10101				var ID string
10102				err = json.Unmarshal(*v, &ID)
10103				if err != nil {
10104					return err
10105				}
10106				r.ID = &ID
10107			}
10108		}
10109	}
10110
10111	return nil
10112}
10113
10114// RouteFilter route Filter Resource.
10115type RouteFilter struct {
10116	autorest.Response            `json:"-"`
10117	*RouteFilterPropertiesFormat `json:"properties,omitempty"`
10118	// Etag - READ-ONLY; Gets a unique read-only string that changes whenever the resource is updated.
10119	Etag *string `json:"etag,omitempty"`
10120	// ID - Resource ID.
10121	ID *string `json:"id,omitempty"`
10122	// Name - READ-ONLY; Resource name.
10123	Name *string `json:"name,omitempty"`
10124	// Type - READ-ONLY; Resource type.
10125	Type *string `json:"type,omitempty"`
10126	// Location - Resource location.
10127	Location *string `json:"location,omitempty"`
10128	// Tags - Resource tags.
10129	Tags map[string]*string `json:"tags"`
10130}
10131
10132// MarshalJSON is the custom marshaler for RouteFilter.
10133func (rf RouteFilter) MarshalJSON() ([]byte, error) {
10134	objectMap := make(map[string]interface{})
10135	if rf.RouteFilterPropertiesFormat != nil {
10136		objectMap["properties"] = rf.RouteFilterPropertiesFormat
10137	}
10138	if rf.ID != nil {
10139		objectMap["id"] = rf.ID
10140	}
10141	if rf.Location != nil {
10142		objectMap["location"] = rf.Location
10143	}
10144	if rf.Tags != nil {
10145		objectMap["tags"] = rf.Tags
10146	}
10147	return json.Marshal(objectMap)
10148}
10149
10150// UnmarshalJSON is the custom unmarshaler for RouteFilter struct.
10151func (rf *RouteFilter) UnmarshalJSON(body []byte) error {
10152	var m map[string]*json.RawMessage
10153	err := json.Unmarshal(body, &m)
10154	if err != nil {
10155		return err
10156	}
10157	for k, v := range m {
10158		switch k {
10159		case "properties":
10160			if v != nil {
10161				var routeFilterPropertiesFormat RouteFilterPropertiesFormat
10162				err = json.Unmarshal(*v, &routeFilterPropertiesFormat)
10163				if err != nil {
10164					return err
10165				}
10166				rf.RouteFilterPropertiesFormat = &routeFilterPropertiesFormat
10167			}
10168		case "etag":
10169			if v != nil {
10170				var etag string
10171				err = json.Unmarshal(*v, &etag)
10172				if err != nil {
10173					return err
10174				}
10175				rf.Etag = &etag
10176			}
10177		case "id":
10178			if v != nil {
10179				var ID string
10180				err = json.Unmarshal(*v, &ID)
10181				if err != nil {
10182					return err
10183				}
10184				rf.ID = &ID
10185			}
10186		case "name":
10187			if v != nil {
10188				var name string
10189				err = json.Unmarshal(*v, &name)
10190				if err != nil {
10191					return err
10192				}
10193				rf.Name = &name
10194			}
10195		case "type":
10196			if v != nil {
10197				var typeVar string
10198				err = json.Unmarshal(*v, &typeVar)
10199				if err != nil {
10200					return err
10201				}
10202				rf.Type = &typeVar
10203			}
10204		case "location":
10205			if v != nil {
10206				var location string
10207				err = json.Unmarshal(*v, &location)
10208				if err != nil {
10209					return err
10210				}
10211				rf.Location = &location
10212			}
10213		case "tags":
10214			if v != nil {
10215				var tags map[string]*string
10216				err = json.Unmarshal(*v, &tags)
10217				if err != nil {
10218					return err
10219				}
10220				rf.Tags = tags
10221			}
10222		}
10223	}
10224
10225	return nil
10226}
10227
10228// RouteFilterListResult response for the ListRouteFilters API service call.
10229type RouteFilterListResult struct {
10230	autorest.Response `json:"-"`
10231	// Value - Gets a list of route filters in a resource group.
10232	Value *[]RouteFilter `json:"value,omitempty"`
10233	// NextLink - The URL to get the next set of results.
10234	NextLink *string `json:"nextLink,omitempty"`
10235}
10236
10237// RouteFilterListResultIterator provides access to a complete listing of RouteFilter values.
10238type RouteFilterListResultIterator struct {
10239	i    int
10240	page RouteFilterListResultPage
10241}
10242
10243// NextWithContext advances to the next value.  If there was an error making
10244// the request the iterator does not advance and the error is returned.
10245func (iter *RouteFilterListResultIterator) NextWithContext(ctx context.Context) (err error) {
10246	if tracing.IsEnabled() {
10247		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultIterator.NextWithContext")
10248		defer func() {
10249			sc := -1
10250			if iter.Response().Response.Response != nil {
10251				sc = iter.Response().Response.Response.StatusCode
10252			}
10253			tracing.EndSpan(ctx, sc, err)
10254		}()
10255	}
10256	iter.i++
10257	if iter.i < len(iter.page.Values()) {
10258		return nil
10259	}
10260	err = iter.page.NextWithContext(ctx)
10261	if err != nil {
10262		iter.i--
10263		return err
10264	}
10265	iter.i = 0
10266	return nil
10267}
10268
10269// Next advances to the next value.  If there was an error making
10270// the request the iterator does not advance and the error is returned.
10271// Deprecated: Use NextWithContext() instead.
10272func (iter *RouteFilterListResultIterator) Next() error {
10273	return iter.NextWithContext(context.Background())
10274}
10275
10276// NotDone returns true if the enumeration should be started or is not yet complete.
10277func (iter RouteFilterListResultIterator) NotDone() bool {
10278	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10279}
10280
10281// Response returns the raw server response from the last page request.
10282func (iter RouteFilterListResultIterator) Response() RouteFilterListResult {
10283	return iter.page.Response()
10284}
10285
10286// Value returns the current value or a zero-initialized value if the
10287// iterator has advanced beyond the end of the collection.
10288func (iter RouteFilterListResultIterator) Value() RouteFilter {
10289	if !iter.page.NotDone() {
10290		return RouteFilter{}
10291	}
10292	return iter.page.Values()[iter.i]
10293}
10294
10295// Creates a new instance of the RouteFilterListResultIterator type.
10296func NewRouteFilterListResultIterator(page RouteFilterListResultPage) RouteFilterListResultIterator {
10297	return RouteFilterListResultIterator{page: page}
10298}
10299
10300// IsEmpty returns true if the ListResult contains no values.
10301func (rflr RouteFilterListResult) IsEmpty() bool {
10302	return rflr.Value == nil || len(*rflr.Value) == 0
10303}
10304
10305// hasNextLink returns true if the NextLink is not empty.
10306func (rflr RouteFilterListResult) hasNextLink() bool {
10307	return rflr.NextLink != nil && len(*rflr.NextLink) != 0
10308}
10309
10310// routeFilterListResultPreparer prepares a request to retrieve the next set of results.
10311// It returns nil if no more results exist.
10312func (rflr RouteFilterListResult) routeFilterListResultPreparer(ctx context.Context) (*http.Request, error) {
10313	if !rflr.hasNextLink() {
10314		return nil, nil
10315	}
10316	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10317		autorest.AsJSON(),
10318		autorest.AsGet(),
10319		autorest.WithBaseURL(to.String(rflr.NextLink)))
10320}
10321
10322// RouteFilterListResultPage contains a page of RouteFilter values.
10323type RouteFilterListResultPage struct {
10324	fn   func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)
10325	rflr RouteFilterListResult
10326}
10327
10328// NextWithContext advances to the next page of values.  If there was an error making
10329// the request the page does not advance and the error is returned.
10330func (page *RouteFilterListResultPage) NextWithContext(ctx context.Context) (err error) {
10331	if tracing.IsEnabled() {
10332		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultPage.NextWithContext")
10333		defer func() {
10334			sc := -1
10335			if page.Response().Response.Response != nil {
10336				sc = page.Response().Response.Response.StatusCode
10337			}
10338			tracing.EndSpan(ctx, sc, err)
10339		}()
10340	}
10341	for {
10342		next, err := page.fn(ctx, page.rflr)
10343		if err != nil {
10344			return err
10345		}
10346		page.rflr = next
10347		if !next.hasNextLink() || !next.IsEmpty() {
10348			break
10349		}
10350	}
10351	return nil
10352}
10353
10354// Next advances to the next page of values.  If there was an error making
10355// the request the page does not advance and the error is returned.
10356// Deprecated: Use NextWithContext() instead.
10357func (page *RouteFilterListResultPage) Next() error {
10358	return page.NextWithContext(context.Background())
10359}
10360
10361// NotDone returns true if the page enumeration should be started or is not yet complete.
10362func (page RouteFilterListResultPage) NotDone() bool {
10363	return !page.rflr.IsEmpty()
10364}
10365
10366// Response returns the raw server response from the last page request.
10367func (page RouteFilterListResultPage) Response() RouteFilterListResult {
10368	return page.rflr
10369}
10370
10371// Values returns the slice of values for the current page or nil if there are no values.
10372func (page RouteFilterListResultPage) Values() []RouteFilter {
10373	if page.rflr.IsEmpty() {
10374		return nil
10375	}
10376	return *page.rflr.Value
10377}
10378
10379// Creates a new instance of the RouteFilterListResultPage type.
10380func NewRouteFilterListResultPage(cur RouteFilterListResult, getNextPage func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)) RouteFilterListResultPage {
10381	return RouteFilterListResultPage{
10382		fn:   getNextPage,
10383		rflr: cur,
10384	}
10385}
10386
10387// RouteFilterPropertiesFormat route Filter Resource
10388type RouteFilterPropertiesFormat struct {
10389	// Rules - Collection of RouteFilterRules contained within a route filter.
10390	Rules *[]RouteFilterRule `json:"rules,omitempty"`
10391	// Peerings - A collection of references to express route circuit peerings.
10392	Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"`
10393	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', 'Succeeded' and 'Failed'.
10394	ProvisioningState *string `json:"provisioningState,omitempty"`
10395}
10396
10397// MarshalJSON is the custom marshaler for RouteFilterPropertiesFormat.
10398func (rfpf RouteFilterPropertiesFormat) MarshalJSON() ([]byte, error) {
10399	objectMap := make(map[string]interface{})
10400	if rfpf.Rules != nil {
10401		objectMap["rules"] = rfpf.Rules
10402	}
10403	if rfpf.Peerings != nil {
10404		objectMap["peerings"] = rfpf.Peerings
10405	}
10406	return json.Marshal(objectMap)
10407}
10408
10409// RouteFilterRule route Filter Rule Resource
10410type RouteFilterRule struct {
10411	autorest.Response                `json:"-"`
10412	*RouteFilterRulePropertiesFormat `json:"properties,omitempty"`
10413	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
10414	Name *string `json:"name,omitempty"`
10415	// Location - Resource location.
10416	Location *string `json:"location,omitempty"`
10417	// Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated.
10418	Etag *string `json:"etag,omitempty"`
10419	// ID - Resource ID.
10420	ID *string `json:"id,omitempty"`
10421}
10422
10423// MarshalJSON is the custom marshaler for RouteFilterRule.
10424func (rfr RouteFilterRule) MarshalJSON() ([]byte, error) {
10425	objectMap := make(map[string]interface{})
10426	if rfr.RouteFilterRulePropertiesFormat != nil {
10427		objectMap["properties"] = rfr.RouteFilterRulePropertiesFormat
10428	}
10429	if rfr.Name != nil {
10430		objectMap["name"] = rfr.Name
10431	}
10432	if rfr.Location != nil {
10433		objectMap["location"] = rfr.Location
10434	}
10435	if rfr.ID != nil {
10436		objectMap["id"] = rfr.ID
10437	}
10438	return json.Marshal(objectMap)
10439}
10440
10441// UnmarshalJSON is the custom unmarshaler for RouteFilterRule struct.
10442func (rfr *RouteFilterRule) UnmarshalJSON(body []byte) error {
10443	var m map[string]*json.RawMessage
10444	err := json.Unmarshal(body, &m)
10445	if err != nil {
10446		return err
10447	}
10448	for k, v := range m {
10449		switch k {
10450		case "properties":
10451			if v != nil {
10452				var routeFilterRulePropertiesFormat RouteFilterRulePropertiesFormat
10453				err = json.Unmarshal(*v, &routeFilterRulePropertiesFormat)
10454				if err != nil {
10455					return err
10456				}
10457				rfr.RouteFilterRulePropertiesFormat = &routeFilterRulePropertiesFormat
10458			}
10459		case "name":
10460			if v != nil {
10461				var name string
10462				err = json.Unmarshal(*v, &name)
10463				if err != nil {
10464					return err
10465				}
10466				rfr.Name = &name
10467			}
10468		case "location":
10469			if v != nil {
10470				var location string
10471				err = json.Unmarshal(*v, &location)
10472				if err != nil {
10473					return err
10474				}
10475				rfr.Location = &location
10476			}
10477		case "etag":
10478			if v != nil {
10479				var etag string
10480				err = json.Unmarshal(*v, &etag)
10481				if err != nil {
10482					return err
10483				}
10484				rfr.Etag = &etag
10485			}
10486		case "id":
10487			if v != nil {
10488				var ID string
10489				err = json.Unmarshal(*v, &ID)
10490				if err != nil {
10491					return err
10492				}
10493				rfr.ID = &ID
10494			}
10495		}
10496	}
10497
10498	return nil
10499}
10500
10501// RouteFilterRuleListResult response for the ListRouteFilterRules API service call
10502type RouteFilterRuleListResult struct {
10503	autorest.Response `json:"-"`
10504	// Value - Gets a list of RouteFilterRules in a resource group.
10505	Value *[]RouteFilterRule `json:"value,omitempty"`
10506	// NextLink - The URL to get the next set of results.
10507	NextLink *string `json:"nextLink,omitempty"`
10508}
10509
10510// RouteFilterRuleListResultIterator provides access to a complete listing of RouteFilterRule values.
10511type RouteFilterRuleListResultIterator struct {
10512	i    int
10513	page RouteFilterRuleListResultPage
10514}
10515
10516// NextWithContext advances to the next value.  If there was an error making
10517// the request the iterator does not advance and the error is returned.
10518func (iter *RouteFilterRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
10519	if tracing.IsEnabled() {
10520		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultIterator.NextWithContext")
10521		defer func() {
10522			sc := -1
10523			if iter.Response().Response.Response != nil {
10524				sc = iter.Response().Response.Response.StatusCode
10525			}
10526			tracing.EndSpan(ctx, sc, err)
10527		}()
10528	}
10529	iter.i++
10530	if iter.i < len(iter.page.Values()) {
10531		return nil
10532	}
10533	err = iter.page.NextWithContext(ctx)
10534	if err != nil {
10535		iter.i--
10536		return err
10537	}
10538	iter.i = 0
10539	return nil
10540}
10541
10542// Next advances to the next value.  If there was an error making
10543// the request the iterator does not advance and the error is returned.
10544// Deprecated: Use NextWithContext() instead.
10545func (iter *RouteFilterRuleListResultIterator) Next() error {
10546	return iter.NextWithContext(context.Background())
10547}
10548
10549// NotDone returns true if the enumeration should be started or is not yet complete.
10550func (iter RouteFilterRuleListResultIterator) NotDone() bool {
10551	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10552}
10553
10554// Response returns the raw server response from the last page request.
10555func (iter RouteFilterRuleListResultIterator) Response() RouteFilterRuleListResult {
10556	return iter.page.Response()
10557}
10558
10559// Value returns the current value or a zero-initialized value if the
10560// iterator has advanced beyond the end of the collection.
10561func (iter RouteFilterRuleListResultIterator) Value() RouteFilterRule {
10562	if !iter.page.NotDone() {
10563		return RouteFilterRule{}
10564	}
10565	return iter.page.Values()[iter.i]
10566}
10567
10568// Creates a new instance of the RouteFilterRuleListResultIterator type.
10569func NewRouteFilterRuleListResultIterator(page RouteFilterRuleListResultPage) RouteFilterRuleListResultIterator {
10570	return RouteFilterRuleListResultIterator{page: page}
10571}
10572
10573// IsEmpty returns true if the ListResult contains no values.
10574func (rfrlr RouteFilterRuleListResult) IsEmpty() bool {
10575	return rfrlr.Value == nil || len(*rfrlr.Value) == 0
10576}
10577
10578// hasNextLink returns true if the NextLink is not empty.
10579func (rfrlr RouteFilterRuleListResult) hasNextLink() bool {
10580	return rfrlr.NextLink != nil && len(*rfrlr.NextLink) != 0
10581}
10582
10583// routeFilterRuleListResultPreparer prepares a request to retrieve the next set of results.
10584// It returns nil if no more results exist.
10585func (rfrlr RouteFilterRuleListResult) routeFilterRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
10586	if !rfrlr.hasNextLink() {
10587		return nil, nil
10588	}
10589	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10590		autorest.AsJSON(),
10591		autorest.AsGet(),
10592		autorest.WithBaseURL(to.String(rfrlr.NextLink)))
10593}
10594
10595// RouteFilterRuleListResultPage contains a page of RouteFilterRule values.
10596type RouteFilterRuleListResultPage struct {
10597	fn    func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)
10598	rfrlr RouteFilterRuleListResult
10599}
10600
10601// NextWithContext advances to the next page of values.  If there was an error making
10602// the request the page does not advance and the error is returned.
10603func (page *RouteFilterRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
10604	if tracing.IsEnabled() {
10605		ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultPage.NextWithContext")
10606		defer func() {
10607			sc := -1
10608			if page.Response().Response.Response != nil {
10609				sc = page.Response().Response.Response.StatusCode
10610			}
10611			tracing.EndSpan(ctx, sc, err)
10612		}()
10613	}
10614	for {
10615		next, err := page.fn(ctx, page.rfrlr)
10616		if err != nil {
10617			return err
10618		}
10619		page.rfrlr = next
10620		if !next.hasNextLink() || !next.IsEmpty() {
10621			break
10622		}
10623	}
10624	return nil
10625}
10626
10627// Next advances to the next page of values.  If there was an error making
10628// the request the page does not advance and the error is returned.
10629// Deprecated: Use NextWithContext() instead.
10630func (page *RouteFilterRuleListResultPage) Next() error {
10631	return page.NextWithContext(context.Background())
10632}
10633
10634// NotDone returns true if the page enumeration should be started or is not yet complete.
10635func (page RouteFilterRuleListResultPage) NotDone() bool {
10636	return !page.rfrlr.IsEmpty()
10637}
10638
10639// Response returns the raw server response from the last page request.
10640func (page RouteFilterRuleListResultPage) Response() RouteFilterRuleListResult {
10641	return page.rfrlr
10642}
10643
10644// Values returns the slice of values for the current page or nil if there are no values.
10645func (page RouteFilterRuleListResultPage) Values() []RouteFilterRule {
10646	if page.rfrlr.IsEmpty() {
10647		return nil
10648	}
10649	return *page.rfrlr.Value
10650}
10651
10652// Creates a new instance of the RouteFilterRuleListResultPage type.
10653func NewRouteFilterRuleListResultPage(cur RouteFilterRuleListResult, getNextPage func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)) RouteFilterRuleListResultPage {
10654	return RouteFilterRuleListResultPage{
10655		fn:    getNextPage,
10656		rfrlr: cur,
10657	}
10658}
10659
10660// RouteFilterRulePropertiesFormat route Filter Rule Resource
10661type RouteFilterRulePropertiesFormat struct {
10662	// Access - The access type of the rule. Valid values are: 'Allow', 'Deny'. Possible values include: 'Allow', 'Deny'
10663	Access Access `json:"access,omitempty"`
10664	// RouteFilterRuleType - The rule type of the rule. Valid value is: 'Community'
10665	RouteFilterRuleType *string `json:"routeFilterRuleType,omitempty"`
10666	// Communities - The collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020']
10667	Communities *[]string `json:"communities,omitempty"`
10668	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', 'Succeeded' and 'Failed'.
10669	ProvisioningState *string `json:"provisioningState,omitempty"`
10670}
10671
10672// MarshalJSON is the custom marshaler for RouteFilterRulePropertiesFormat.
10673func (rfrpf RouteFilterRulePropertiesFormat) MarshalJSON() ([]byte, error) {
10674	objectMap := make(map[string]interface{})
10675	if rfrpf.Access != "" {
10676		objectMap["access"] = rfrpf.Access
10677	}
10678	if rfrpf.RouteFilterRuleType != nil {
10679		objectMap["routeFilterRuleType"] = rfrpf.RouteFilterRuleType
10680	}
10681	if rfrpf.Communities != nil {
10682		objectMap["communities"] = rfrpf.Communities
10683	}
10684	return json.Marshal(objectMap)
10685}
10686
10687// RouteFilterRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
10688// long-running operation.
10689type RouteFilterRulesCreateOrUpdateFuture struct {
10690	azure.FutureAPI
10691	// Result returns the result of the asynchronous operation.
10692	// If the operation has not completed it will return an error.
10693	Result func(RouteFilterRulesClient) (RouteFilterRule, error)
10694}
10695
10696// RouteFilterRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
10697// operation.
10698type RouteFilterRulesDeleteFuture struct {
10699	azure.FutureAPI
10700	// Result returns the result of the asynchronous operation.
10701	// If the operation has not completed it will return an error.
10702	Result func(RouteFilterRulesClient) (autorest.Response, error)
10703}
10704
10705// RouteFilterRulesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
10706// operation.
10707type RouteFilterRulesUpdateFuture struct {
10708	azure.FutureAPI
10709	// Result returns the result of the asynchronous operation.
10710	// If the operation has not completed it will return an error.
10711	Result func(RouteFilterRulesClient) (RouteFilterRule, error)
10712}
10713
10714// RouteFiltersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
10715// long-running operation.
10716type RouteFiltersCreateOrUpdateFuture struct {
10717	azure.FutureAPI
10718	// Result returns the result of the asynchronous operation.
10719	// If the operation has not completed it will return an error.
10720	Result func(RouteFiltersClient) (RouteFilter, error)
10721}
10722
10723// RouteFiltersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
10724// operation.
10725type RouteFiltersDeleteFuture struct {
10726	azure.FutureAPI
10727	// Result returns the result of the asynchronous operation.
10728	// If the operation has not completed it will return an error.
10729	Result func(RouteFiltersClient) (autorest.Response, error)
10730}
10731
10732// RouteFiltersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
10733// operation.
10734type RouteFiltersUpdateFuture struct {
10735	azure.FutureAPI
10736	// Result returns the result of the asynchronous operation.
10737	// If the operation has not completed it will return an error.
10738	Result func(RouteFiltersClient) (RouteFilter, error)
10739}
10740
10741// RouteListResult response for the ListRoute API service call
10742type RouteListResult struct {
10743	autorest.Response `json:"-"`
10744	// Value - Gets a list of routes in a resource group.
10745	Value *[]Route `json:"value,omitempty"`
10746	// NextLink - The URL to get the next set of results.
10747	NextLink *string `json:"nextLink,omitempty"`
10748}
10749
10750// RouteListResultIterator provides access to a complete listing of Route values.
10751type RouteListResultIterator struct {
10752	i    int
10753	page RouteListResultPage
10754}
10755
10756// NextWithContext advances to the next value.  If there was an error making
10757// the request the iterator does not advance and the error is returned.
10758func (iter *RouteListResultIterator) NextWithContext(ctx context.Context) (err error) {
10759	if tracing.IsEnabled() {
10760		ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultIterator.NextWithContext")
10761		defer func() {
10762			sc := -1
10763			if iter.Response().Response.Response != nil {
10764				sc = iter.Response().Response.Response.StatusCode
10765			}
10766			tracing.EndSpan(ctx, sc, err)
10767		}()
10768	}
10769	iter.i++
10770	if iter.i < len(iter.page.Values()) {
10771		return nil
10772	}
10773	err = iter.page.NextWithContext(ctx)
10774	if err != nil {
10775		iter.i--
10776		return err
10777	}
10778	iter.i = 0
10779	return nil
10780}
10781
10782// Next advances to the next value.  If there was an error making
10783// the request the iterator does not advance and the error is returned.
10784// Deprecated: Use NextWithContext() instead.
10785func (iter *RouteListResultIterator) Next() error {
10786	return iter.NextWithContext(context.Background())
10787}
10788
10789// NotDone returns true if the enumeration should be started or is not yet complete.
10790func (iter RouteListResultIterator) NotDone() bool {
10791	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10792}
10793
10794// Response returns the raw server response from the last page request.
10795func (iter RouteListResultIterator) Response() RouteListResult {
10796	return iter.page.Response()
10797}
10798
10799// Value returns the current value or a zero-initialized value if the
10800// iterator has advanced beyond the end of the collection.
10801func (iter RouteListResultIterator) Value() Route {
10802	if !iter.page.NotDone() {
10803		return Route{}
10804	}
10805	return iter.page.Values()[iter.i]
10806}
10807
10808// Creates a new instance of the RouteListResultIterator type.
10809func NewRouteListResultIterator(page RouteListResultPage) RouteListResultIterator {
10810	return RouteListResultIterator{page: page}
10811}
10812
10813// IsEmpty returns true if the ListResult contains no values.
10814func (rlr RouteListResult) IsEmpty() bool {
10815	return rlr.Value == nil || len(*rlr.Value) == 0
10816}
10817
10818// hasNextLink returns true if the NextLink is not empty.
10819func (rlr RouteListResult) hasNextLink() bool {
10820	return rlr.NextLink != nil && len(*rlr.NextLink) != 0
10821}
10822
10823// routeListResultPreparer prepares a request to retrieve the next set of results.
10824// It returns nil if no more results exist.
10825func (rlr RouteListResult) routeListResultPreparer(ctx context.Context) (*http.Request, error) {
10826	if !rlr.hasNextLink() {
10827		return nil, nil
10828	}
10829	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10830		autorest.AsJSON(),
10831		autorest.AsGet(),
10832		autorest.WithBaseURL(to.String(rlr.NextLink)))
10833}
10834
10835// RouteListResultPage contains a page of Route values.
10836type RouteListResultPage struct {
10837	fn  func(context.Context, RouteListResult) (RouteListResult, error)
10838	rlr RouteListResult
10839}
10840
10841// NextWithContext advances to the next page of values.  If there was an error making
10842// the request the page does not advance and the error is returned.
10843func (page *RouteListResultPage) NextWithContext(ctx context.Context) (err error) {
10844	if tracing.IsEnabled() {
10845		ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultPage.NextWithContext")
10846		defer func() {
10847			sc := -1
10848			if page.Response().Response.Response != nil {
10849				sc = page.Response().Response.Response.StatusCode
10850			}
10851			tracing.EndSpan(ctx, sc, err)
10852		}()
10853	}
10854	for {
10855		next, err := page.fn(ctx, page.rlr)
10856		if err != nil {
10857			return err
10858		}
10859		page.rlr = next
10860		if !next.hasNextLink() || !next.IsEmpty() {
10861			break
10862		}
10863	}
10864	return nil
10865}
10866
10867// Next advances to the next page of values.  If there was an error making
10868// the request the page does not advance and the error is returned.
10869// Deprecated: Use NextWithContext() instead.
10870func (page *RouteListResultPage) Next() error {
10871	return page.NextWithContext(context.Background())
10872}
10873
10874// NotDone returns true if the page enumeration should be started or is not yet complete.
10875func (page RouteListResultPage) NotDone() bool {
10876	return !page.rlr.IsEmpty()
10877}
10878
10879// Response returns the raw server response from the last page request.
10880func (page RouteListResultPage) Response() RouteListResult {
10881	return page.rlr
10882}
10883
10884// Values returns the slice of values for the current page or nil if there are no values.
10885func (page RouteListResultPage) Values() []Route {
10886	if page.rlr.IsEmpty() {
10887		return nil
10888	}
10889	return *page.rlr.Value
10890}
10891
10892// Creates a new instance of the RouteListResultPage type.
10893func NewRouteListResultPage(cur RouteListResult, getNextPage func(context.Context, RouteListResult) (RouteListResult, error)) RouteListResultPage {
10894	return RouteListResultPage{
10895		fn:  getNextPage,
10896		rlr: cur,
10897	}
10898}
10899
10900// RoutePropertiesFormat route resource
10901type RoutePropertiesFormat struct {
10902	// AddressPrefix - The destination CIDR to which the route applies.
10903	AddressPrefix *string `json:"addressPrefix,omitempty"`
10904	// 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'
10905	NextHopType RouteNextHopType `json:"nextHopType,omitempty"`
10906	// NextHopIPAddress - The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance.
10907	NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"`
10908	// ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
10909	ProvisioningState *string `json:"provisioningState,omitempty"`
10910}
10911
10912// RoutesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
10913// operation.
10914type RoutesCreateOrUpdateFuture struct {
10915	azure.FutureAPI
10916	// Result returns the result of the asynchronous operation.
10917	// If the operation has not completed it will return an error.
10918	Result func(RoutesClient) (Route, error)
10919}
10920
10921// RoutesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
10922type RoutesDeleteFuture struct {
10923	azure.FutureAPI
10924	// Result returns the result of the asynchronous operation.
10925	// If the operation has not completed it will return an error.
10926	Result func(RoutesClient) (autorest.Response, error)
10927}
10928
10929// RouteTable route table resource.
10930type RouteTable struct {
10931	autorest.Response `json:"-"`
10932	// RouteTablePropertiesFormat - Properties of the route table.
10933	*RouteTablePropertiesFormat `json:"properties,omitempty"`
10934	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
10935	Etag *string `json:"etag,omitempty"`
10936	// ID - Resource ID.
10937	ID *string `json:"id,omitempty"`
10938	// Name - READ-ONLY; Resource name.
10939	Name *string `json:"name,omitempty"`
10940	// Type - READ-ONLY; Resource type.
10941	Type *string `json:"type,omitempty"`
10942	// Location - Resource location.
10943	Location *string `json:"location,omitempty"`
10944	// Tags - Resource tags.
10945	Tags map[string]*string `json:"tags"`
10946}
10947
10948// MarshalJSON is the custom marshaler for RouteTable.
10949func (rt RouteTable) MarshalJSON() ([]byte, error) {
10950	objectMap := make(map[string]interface{})
10951	if rt.RouteTablePropertiesFormat != nil {
10952		objectMap["properties"] = rt.RouteTablePropertiesFormat
10953	}
10954	if rt.Etag != nil {
10955		objectMap["etag"] = rt.Etag
10956	}
10957	if rt.ID != nil {
10958		objectMap["id"] = rt.ID
10959	}
10960	if rt.Location != nil {
10961		objectMap["location"] = rt.Location
10962	}
10963	if rt.Tags != nil {
10964		objectMap["tags"] = rt.Tags
10965	}
10966	return json.Marshal(objectMap)
10967}
10968
10969// UnmarshalJSON is the custom unmarshaler for RouteTable struct.
10970func (rt *RouteTable) UnmarshalJSON(body []byte) error {
10971	var m map[string]*json.RawMessage
10972	err := json.Unmarshal(body, &m)
10973	if err != nil {
10974		return err
10975	}
10976	for k, v := range m {
10977		switch k {
10978		case "properties":
10979			if v != nil {
10980				var routeTablePropertiesFormat RouteTablePropertiesFormat
10981				err = json.Unmarshal(*v, &routeTablePropertiesFormat)
10982				if err != nil {
10983					return err
10984				}
10985				rt.RouteTablePropertiesFormat = &routeTablePropertiesFormat
10986			}
10987		case "etag":
10988			if v != nil {
10989				var etag string
10990				err = json.Unmarshal(*v, &etag)
10991				if err != nil {
10992					return err
10993				}
10994				rt.Etag = &etag
10995			}
10996		case "id":
10997			if v != nil {
10998				var ID string
10999				err = json.Unmarshal(*v, &ID)
11000				if err != nil {
11001					return err
11002				}
11003				rt.ID = &ID
11004			}
11005		case "name":
11006			if v != nil {
11007				var name string
11008				err = json.Unmarshal(*v, &name)
11009				if err != nil {
11010					return err
11011				}
11012				rt.Name = &name
11013			}
11014		case "type":
11015			if v != nil {
11016				var typeVar string
11017				err = json.Unmarshal(*v, &typeVar)
11018				if err != nil {
11019					return err
11020				}
11021				rt.Type = &typeVar
11022			}
11023		case "location":
11024			if v != nil {
11025				var location string
11026				err = json.Unmarshal(*v, &location)
11027				if err != nil {
11028					return err
11029				}
11030				rt.Location = &location
11031			}
11032		case "tags":
11033			if v != nil {
11034				var tags map[string]*string
11035				err = json.Unmarshal(*v, &tags)
11036				if err != nil {
11037					return err
11038				}
11039				rt.Tags = tags
11040			}
11041		}
11042	}
11043
11044	return nil
11045}
11046
11047// RouteTableListResult response for the ListRouteTable API service call.
11048type RouteTableListResult struct {
11049	autorest.Response `json:"-"`
11050	// Value - Gets a list of route tables in a resource group.
11051	Value *[]RouteTable `json:"value,omitempty"`
11052	// NextLink - The URL to get the next set of results.
11053	NextLink *string `json:"nextLink,omitempty"`
11054}
11055
11056// RouteTableListResultIterator provides access to a complete listing of RouteTable values.
11057type RouteTableListResultIterator struct {
11058	i    int
11059	page RouteTableListResultPage
11060}
11061
11062// NextWithContext advances to the next value.  If there was an error making
11063// the request the iterator does not advance and the error is returned.
11064func (iter *RouteTableListResultIterator) NextWithContext(ctx context.Context) (err error) {
11065	if tracing.IsEnabled() {
11066		ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultIterator.NextWithContext")
11067		defer func() {
11068			sc := -1
11069			if iter.Response().Response.Response != nil {
11070				sc = iter.Response().Response.Response.StatusCode
11071			}
11072			tracing.EndSpan(ctx, sc, err)
11073		}()
11074	}
11075	iter.i++
11076	if iter.i < len(iter.page.Values()) {
11077		return nil
11078	}
11079	err = iter.page.NextWithContext(ctx)
11080	if err != nil {
11081		iter.i--
11082		return err
11083	}
11084	iter.i = 0
11085	return nil
11086}
11087
11088// Next advances to the next value.  If there was an error making
11089// the request the iterator does not advance and the error is returned.
11090// Deprecated: Use NextWithContext() instead.
11091func (iter *RouteTableListResultIterator) Next() error {
11092	return iter.NextWithContext(context.Background())
11093}
11094
11095// NotDone returns true if the enumeration should be started or is not yet complete.
11096func (iter RouteTableListResultIterator) NotDone() bool {
11097	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11098}
11099
11100// Response returns the raw server response from the last page request.
11101func (iter RouteTableListResultIterator) Response() RouteTableListResult {
11102	return iter.page.Response()
11103}
11104
11105// Value returns the current value or a zero-initialized value if the
11106// iterator has advanced beyond the end of the collection.
11107func (iter RouteTableListResultIterator) Value() RouteTable {
11108	if !iter.page.NotDone() {
11109		return RouteTable{}
11110	}
11111	return iter.page.Values()[iter.i]
11112}
11113
11114// Creates a new instance of the RouteTableListResultIterator type.
11115func NewRouteTableListResultIterator(page RouteTableListResultPage) RouteTableListResultIterator {
11116	return RouteTableListResultIterator{page: page}
11117}
11118
11119// IsEmpty returns true if the ListResult contains no values.
11120func (rtlr RouteTableListResult) IsEmpty() bool {
11121	return rtlr.Value == nil || len(*rtlr.Value) == 0
11122}
11123
11124// hasNextLink returns true if the NextLink is not empty.
11125func (rtlr RouteTableListResult) hasNextLink() bool {
11126	return rtlr.NextLink != nil && len(*rtlr.NextLink) != 0
11127}
11128
11129// routeTableListResultPreparer prepares a request to retrieve the next set of results.
11130// It returns nil if no more results exist.
11131func (rtlr RouteTableListResult) routeTableListResultPreparer(ctx context.Context) (*http.Request, error) {
11132	if !rtlr.hasNextLink() {
11133		return nil, nil
11134	}
11135	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11136		autorest.AsJSON(),
11137		autorest.AsGet(),
11138		autorest.WithBaseURL(to.String(rtlr.NextLink)))
11139}
11140
11141// RouteTableListResultPage contains a page of RouteTable values.
11142type RouteTableListResultPage struct {
11143	fn   func(context.Context, RouteTableListResult) (RouteTableListResult, error)
11144	rtlr RouteTableListResult
11145}
11146
11147// NextWithContext advances to the next page of values.  If there was an error making
11148// the request the page does not advance and the error is returned.
11149func (page *RouteTableListResultPage) NextWithContext(ctx context.Context) (err error) {
11150	if tracing.IsEnabled() {
11151		ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultPage.NextWithContext")
11152		defer func() {
11153			sc := -1
11154			if page.Response().Response.Response != nil {
11155				sc = page.Response().Response.Response.StatusCode
11156			}
11157			tracing.EndSpan(ctx, sc, err)
11158		}()
11159	}
11160	for {
11161		next, err := page.fn(ctx, page.rtlr)
11162		if err != nil {
11163			return err
11164		}
11165		page.rtlr = next
11166		if !next.hasNextLink() || !next.IsEmpty() {
11167			break
11168		}
11169	}
11170	return nil
11171}
11172
11173// Next advances to the next page of values.  If there was an error making
11174// the request the page does not advance and the error is returned.
11175// Deprecated: Use NextWithContext() instead.
11176func (page *RouteTableListResultPage) Next() error {
11177	return page.NextWithContext(context.Background())
11178}
11179
11180// NotDone returns true if the page enumeration should be started or is not yet complete.
11181func (page RouteTableListResultPage) NotDone() bool {
11182	return !page.rtlr.IsEmpty()
11183}
11184
11185// Response returns the raw server response from the last page request.
11186func (page RouteTableListResultPage) Response() RouteTableListResult {
11187	return page.rtlr
11188}
11189
11190// Values returns the slice of values for the current page or nil if there are no values.
11191func (page RouteTableListResultPage) Values() []RouteTable {
11192	if page.rtlr.IsEmpty() {
11193		return nil
11194	}
11195	return *page.rtlr.Value
11196}
11197
11198// Creates a new instance of the RouteTableListResultPage type.
11199func NewRouteTableListResultPage(cur RouteTableListResult, getNextPage func(context.Context, RouteTableListResult) (RouteTableListResult, error)) RouteTableListResultPage {
11200	return RouteTableListResultPage{
11201		fn:   getNextPage,
11202		rtlr: cur,
11203	}
11204}
11205
11206// RouteTablePropertiesFormat route Table resource
11207type RouteTablePropertiesFormat struct {
11208	// Routes - Collection of routes contained within a route table.
11209	Routes *[]Route `json:"routes,omitempty"`
11210	// Subnets - READ-ONLY; A collection of references to subnets.
11211	Subnets *[]Subnet `json:"subnets,omitempty"`
11212	// DisableBgpRoutePropagation - Gets or sets whether to disable the routes learned by BGP on that route table. True means disable.
11213	DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"`
11214	// ProvisioningState - The provisioning state of the resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
11215	ProvisioningState *string `json:"provisioningState,omitempty"`
11216}
11217
11218// MarshalJSON is the custom marshaler for RouteTablePropertiesFormat.
11219func (rtpf RouteTablePropertiesFormat) MarshalJSON() ([]byte, error) {
11220	objectMap := make(map[string]interface{})
11221	if rtpf.Routes != nil {
11222		objectMap["routes"] = rtpf.Routes
11223	}
11224	if rtpf.DisableBgpRoutePropagation != nil {
11225		objectMap["disableBgpRoutePropagation"] = rtpf.DisableBgpRoutePropagation
11226	}
11227	if rtpf.ProvisioningState != nil {
11228		objectMap["provisioningState"] = rtpf.ProvisioningState
11229	}
11230	return json.Marshal(objectMap)
11231}
11232
11233// RouteTablesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
11234// long-running operation.
11235type RouteTablesCreateOrUpdateFuture struct {
11236	azure.FutureAPI
11237	// Result returns the result of the asynchronous operation.
11238	// If the operation has not completed it will return an error.
11239	Result func(RouteTablesClient) (RouteTable, error)
11240}
11241
11242// RouteTablesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
11243// operation.
11244type RouteTablesDeleteFuture struct {
11245	azure.FutureAPI
11246	// Result returns the result of the asynchronous operation.
11247	// If the operation has not completed it will return an error.
11248	Result func(RouteTablesClient) (autorest.Response, error)
11249}
11250
11251// RouteTablesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
11252// operation.
11253type RouteTablesUpdateTagsFuture struct {
11254	azure.FutureAPI
11255	// Result returns the result of the asynchronous operation.
11256	// If the operation has not completed it will return an error.
11257	Result func(RouteTablesClient) (RouteTable, error)
11258}
11259
11260// SecurityGroup networkSecurityGroup resource.
11261type SecurityGroup struct {
11262	autorest.Response `json:"-"`
11263	// SecurityGroupPropertiesFormat - Properties of the network security group
11264	*SecurityGroupPropertiesFormat `json:"properties,omitempty"`
11265	// Etag - A unique read-only string that changes whenever the resource is updated.
11266	Etag *string `json:"etag,omitempty"`
11267	// ID - Resource ID.
11268	ID *string `json:"id,omitempty"`
11269	// Name - READ-ONLY; Resource name.
11270	Name *string `json:"name,omitempty"`
11271	// Type - READ-ONLY; Resource type.
11272	Type *string `json:"type,omitempty"`
11273	// Location - Resource location.
11274	Location *string `json:"location,omitempty"`
11275	// Tags - Resource tags.
11276	Tags map[string]*string `json:"tags"`
11277}
11278
11279// MarshalJSON is the custom marshaler for SecurityGroup.
11280func (sg SecurityGroup) MarshalJSON() ([]byte, error) {
11281	objectMap := make(map[string]interface{})
11282	if sg.SecurityGroupPropertiesFormat != nil {
11283		objectMap["properties"] = sg.SecurityGroupPropertiesFormat
11284	}
11285	if sg.Etag != nil {
11286		objectMap["etag"] = sg.Etag
11287	}
11288	if sg.ID != nil {
11289		objectMap["id"] = sg.ID
11290	}
11291	if sg.Location != nil {
11292		objectMap["location"] = sg.Location
11293	}
11294	if sg.Tags != nil {
11295		objectMap["tags"] = sg.Tags
11296	}
11297	return json.Marshal(objectMap)
11298}
11299
11300// UnmarshalJSON is the custom unmarshaler for SecurityGroup struct.
11301func (sg *SecurityGroup) UnmarshalJSON(body []byte) error {
11302	var m map[string]*json.RawMessage
11303	err := json.Unmarshal(body, &m)
11304	if err != nil {
11305		return err
11306	}
11307	for k, v := range m {
11308		switch k {
11309		case "properties":
11310			if v != nil {
11311				var securityGroupPropertiesFormat SecurityGroupPropertiesFormat
11312				err = json.Unmarshal(*v, &securityGroupPropertiesFormat)
11313				if err != nil {
11314					return err
11315				}
11316				sg.SecurityGroupPropertiesFormat = &securityGroupPropertiesFormat
11317			}
11318		case "etag":
11319			if v != nil {
11320				var etag string
11321				err = json.Unmarshal(*v, &etag)
11322				if err != nil {
11323					return err
11324				}
11325				sg.Etag = &etag
11326			}
11327		case "id":
11328			if v != nil {
11329				var ID string
11330				err = json.Unmarshal(*v, &ID)
11331				if err != nil {
11332					return err
11333				}
11334				sg.ID = &ID
11335			}
11336		case "name":
11337			if v != nil {
11338				var name string
11339				err = json.Unmarshal(*v, &name)
11340				if err != nil {
11341					return err
11342				}
11343				sg.Name = &name
11344			}
11345		case "type":
11346			if v != nil {
11347				var typeVar string
11348				err = json.Unmarshal(*v, &typeVar)
11349				if err != nil {
11350					return err
11351				}
11352				sg.Type = &typeVar
11353			}
11354		case "location":
11355			if v != nil {
11356				var location string
11357				err = json.Unmarshal(*v, &location)
11358				if err != nil {
11359					return err
11360				}
11361				sg.Location = &location
11362			}
11363		case "tags":
11364			if v != nil {
11365				var tags map[string]*string
11366				err = json.Unmarshal(*v, &tags)
11367				if err != nil {
11368					return err
11369				}
11370				sg.Tags = tags
11371			}
11372		}
11373	}
11374
11375	return nil
11376}
11377
11378// SecurityGroupListResult response for ListNetworkSecurityGroups API service call.
11379type SecurityGroupListResult struct {
11380	autorest.Response `json:"-"`
11381	// Value - A list of NetworkSecurityGroup resources.
11382	Value *[]SecurityGroup `json:"value,omitempty"`
11383	// NextLink - The URL to get the next set of results.
11384	NextLink *string `json:"nextLink,omitempty"`
11385}
11386
11387// SecurityGroupListResultIterator provides access to a complete listing of SecurityGroup values.
11388type SecurityGroupListResultIterator struct {
11389	i    int
11390	page SecurityGroupListResultPage
11391}
11392
11393// NextWithContext advances to the next value.  If there was an error making
11394// the request the iterator does not advance and the error is returned.
11395func (iter *SecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
11396	if tracing.IsEnabled() {
11397		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultIterator.NextWithContext")
11398		defer func() {
11399			sc := -1
11400			if iter.Response().Response.Response != nil {
11401				sc = iter.Response().Response.Response.StatusCode
11402			}
11403			tracing.EndSpan(ctx, sc, err)
11404		}()
11405	}
11406	iter.i++
11407	if iter.i < len(iter.page.Values()) {
11408		return nil
11409	}
11410	err = iter.page.NextWithContext(ctx)
11411	if err != nil {
11412		iter.i--
11413		return err
11414	}
11415	iter.i = 0
11416	return nil
11417}
11418
11419// Next advances to the next value.  If there was an error making
11420// the request the iterator does not advance and the error is returned.
11421// Deprecated: Use NextWithContext() instead.
11422func (iter *SecurityGroupListResultIterator) Next() error {
11423	return iter.NextWithContext(context.Background())
11424}
11425
11426// NotDone returns true if the enumeration should be started or is not yet complete.
11427func (iter SecurityGroupListResultIterator) NotDone() bool {
11428	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11429}
11430
11431// Response returns the raw server response from the last page request.
11432func (iter SecurityGroupListResultIterator) Response() SecurityGroupListResult {
11433	return iter.page.Response()
11434}
11435
11436// Value returns the current value or a zero-initialized value if the
11437// iterator has advanced beyond the end of the collection.
11438func (iter SecurityGroupListResultIterator) Value() SecurityGroup {
11439	if !iter.page.NotDone() {
11440		return SecurityGroup{}
11441	}
11442	return iter.page.Values()[iter.i]
11443}
11444
11445// Creates a new instance of the SecurityGroupListResultIterator type.
11446func NewSecurityGroupListResultIterator(page SecurityGroupListResultPage) SecurityGroupListResultIterator {
11447	return SecurityGroupListResultIterator{page: page}
11448}
11449
11450// IsEmpty returns true if the ListResult contains no values.
11451func (sglr SecurityGroupListResult) IsEmpty() bool {
11452	return sglr.Value == nil || len(*sglr.Value) == 0
11453}
11454
11455// hasNextLink returns true if the NextLink is not empty.
11456func (sglr SecurityGroupListResult) hasNextLink() bool {
11457	return sglr.NextLink != nil && len(*sglr.NextLink) != 0
11458}
11459
11460// securityGroupListResultPreparer prepares a request to retrieve the next set of results.
11461// It returns nil if no more results exist.
11462func (sglr SecurityGroupListResult) securityGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
11463	if !sglr.hasNextLink() {
11464		return nil, nil
11465	}
11466	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11467		autorest.AsJSON(),
11468		autorest.AsGet(),
11469		autorest.WithBaseURL(to.String(sglr.NextLink)))
11470}
11471
11472// SecurityGroupListResultPage contains a page of SecurityGroup values.
11473type SecurityGroupListResultPage struct {
11474	fn   func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)
11475	sglr SecurityGroupListResult
11476}
11477
11478// NextWithContext advances to the next page of values.  If there was an error making
11479// the request the page does not advance and the error is returned.
11480func (page *SecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
11481	if tracing.IsEnabled() {
11482		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultPage.NextWithContext")
11483		defer func() {
11484			sc := -1
11485			if page.Response().Response.Response != nil {
11486				sc = page.Response().Response.Response.StatusCode
11487			}
11488			tracing.EndSpan(ctx, sc, err)
11489		}()
11490	}
11491	for {
11492		next, err := page.fn(ctx, page.sglr)
11493		if err != nil {
11494			return err
11495		}
11496		page.sglr = next
11497		if !next.hasNextLink() || !next.IsEmpty() {
11498			break
11499		}
11500	}
11501	return nil
11502}
11503
11504// Next advances to the next page of values.  If there was an error making
11505// the request the page does not advance and the error is returned.
11506// Deprecated: Use NextWithContext() instead.
11507func (page *SecurityGroupListResultPage) Next() error {
11508	return page.NextWithContext(context.Background())
11509}
11510
11511// NotDone returns true if the page enumeration should be started or is not yet complete.
11512func (page SecurityGroupListResultPage) NotDone() bool {
11513	return !page.sglr.IsEmpty()
11514}
11515
11516// Response returns the raw server response from the last page request.
11517func (page SecurityGroupListResultPage) Response() SecurityGroupListResult {
11518	return page.sglr
11519}
11520
11521// Values returns the slice of values for the current page or nil if there are no values.
11522func (page SecurityGroupListResultPage) Values() []SecurityGroup {
11523	if page.sglr.IsEmpty() {
11524		return nil
11525	}
11526	return *page.sglr.Value
11527}
11528
11529// Creates a new instance of the SecurityGroupListResultPage type.
11530func NewSecurityGroupListResultPage(cur SecurityGroupListResult, getNextPage func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)) SecurityGroupListResultPage {
11531	return SecurityGroupListResultPage{
11532		fn:   getNextPage,
11533		sglr: cur,
11534	}
11535}
11536
11537// SecurityGroupNetworkInterface network interface and all its associated security rules.
11538type SecurityGroupNetworkInterface struct {
11539	// ID - ID of the network interface.
11540	ID                       *string                   `json:"id,omitempty"`
11541	SecurityRuleAssociations *SecurityRuleAssociations `json:"securityRuleAssociations,omitempty"`
11542}
11543
11544// SecurityGroupPropertiesFormat network Security Group resource.
11545type SecurityGroupPropertiesFormat struct {
11546	// SecurityRules - A collection of security rules of the network security group.
11547	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
11548	// DefaultSecurityRules - The default security rules of network security group.
11549	DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"`
11550	// NetworkInterfaces - READ-ONLY; A collection of references to network interfaces.
11551	NetworkInterfaces *[]Interface `json:"networkInterfaces,omitempty"`
11552	// Subnets - READ-ONLY; A collection of references to subnets.
11553	Subnets *[]Subnet `json:"subnets,omitempty"`
11554	// ResourceGUID - The resource GUID property of the network security group resource.
11555	ResourceGUID *string `json:"resourceGuid,omitempty"`
11556	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
11557	ProvisioningState *string `json:"provisioningState,omitempty"`
11558}
11559
11560// MarshalJSON is the custom marshaler for SecurityGroupPropertiesFormat.
11561func (sgpf SecurityGroupPropertiesFormat) MarshalJSON() ([]byte, error) {
11562	objectMap := make(map[string]interface{})
11563	if sgpf.SecurityRules != nil {
11564		objectMap["securityRules"] = sgpf.SecurityRules
11565	}
11566	if sgpf.DefaultSecurityRules != nil {
11567		objectMap["defaultSecurityRules"] = sgpf.DefaultSecurityRules
11568	}
11569	if sgpf.ResourceGUID != nil {
11570		objectMap["resourceGuid"] = sgpf.ResourceGUID
11571	}
11572	if sgpf.ProvisioningState != nil {
11573		objectMap["provisioningState"] = sgpf.ProvisioningState
11574	}
11575	return json.Marshal(objectMap)
11576}
11577
11578// SecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
11579// long-running operation.
11580type SecurityGroupsCreateOrUpdateFuture struct {
11581	azure.FutureAPI
11582	// Result returns the result of the asynchronous operation.
11583	// If the operation has not completed it will return an error.
11584	Result func(SecurityGroupsClient) (SecurityGroup, error)
11585}
11586
11587// SecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
11588// operation.
11589type SecurityGroupsDeleteFuture struct {
11590	azure.FutureAPI
11591	// Result returns the result of the asynchronous operation.
11592	// If the operation has not completed it will return an error.
11593	Result func(SecurityGroupsClient) (autorest.Response, error)
11594}
11595
11596// SecurityGroupsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
11597// long-running operation.
11598type SecurityGroupsUpdateTagsFuture struct {
11599	azure.FutureAPI
11600	// Result returns the result of the asynchronous operation.
11601	// If the operation has not completed it will return an error.
11602	Result func(SecurityGroupsClient) (SecurityGroup, error)
11603}
11604
11605// SecurityGroupViewParameters parameters that define the VM to check security groups for.
11606type SecurityGroupViewParameters struct {
11607	// TargetResourceID - ID of the target VM.
11608	TargetResourceID *string `json:"targetResourceId,omitempty"`
11609}
11610
11611// SecurityGroupViewResult the information about security rules applied to the specified VM.
11612type SecurityGroupViewResult struct {
11613	autorest.Response `json:"-"`
11614	// NetworkInterfaces - List of network interfaces on the specified VM.
11615	NetworkInterfaces *[]SecurityGroupNetworkInterface `json:"networkInterfaces,omitempty"`
11616}
11617
11618// SecurityRule network security rule.
11619type SecurityRule struct {
11620	autorest.Response `json:"-"`
11621	// SecurityRulePropertiesFormat - Properties of the security rule
11622	*SecurityRulePropertiesFormat `json:"properties,omitempty"`
11623	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
11624	Name *string `json:"name,omitempty"`
11625	// Etag - A unique read-only string that changes whenever the resource is updated.
11626	Etag *string `json:"etag,omitempty"`
11627	// ID - Resource ID.
11628	ID *string `json:"id,omitempty"`
11629}
11630
11631// MarshalJSON is the custom marshaler for SecurityRule.
11632func (sr SecurityRule) MarshalJSON() ([]byte, error) {
11633	objectMap := make(map[string]interface{})
11634	if sr.SecurityRulePropertiesFormat != nil {
11635		objectMap["properties"] = sr.SecurityRulePropertiesFormat
11636	}
11637	if sr.Name != nil {
11638		objectMap["name"] = sr.Name
11639	}
11640	if sr.Etag != nil {
11641		objectMap["etag"] = sr.Etag
11642	}
11643	if sr.ID != nil {
11644		objectMap["id"] = sr.ID
11645	}
11646	return json.Marshal(objectMap)
11647}
11648
11649// UnmarshalJSON is the custom unmarshaler for SecurityRule struct.
11650func (sr *SecurityRule) UnmarshalJSON(body []byte) error {
11651	var m map[string]*json.RawMessage
11652	err := json.Unmarshal(body, &m)
11653	if err != nil {
11654		return err
11655	}
11656	for k, v := range m {
11657		switch k {
11658		case "properties":
11659			if v != nil {
11660				var securityRulePropertiesFormat SecurityRulePropertiesFormat
11661				err = json.Unmarshal(*v, &securityRulePropertiesFormat)
11662				if err != nil {
11663					return err
11664				}
11665				sr.SecurityRulePropertiesFormat = &securityRulePropertiesFormat
11666			}
11667		case "name":
11668			if v != nil {
11669				var name string
11670				err = json.Unmarshal(*v, &name)
11671				if err != nil {
11672					return err
11673				}
11674				sr.Name = &name
11675			}
11676		case "etag":
11677			if v != nil {
11678				var etag string
11679				err = json.Unmarshal(*v, &etag)
11680				if err != nil {
11681					return err
11682				}
11683				sr.Etag = &etag
11684			}
11685		case "id":
11686			if v != nil {
11687				var ID string
11688				err = json.Unmarshal(*v, &ID)
11689				if err != nil {
11690					return err
11691				}
11692				sr.ID = &ID
11693			}
11694		}
11695	}
11696
11697	return nil
11698}
11699
11700// SecurityRuleAssociations all security rules associated with the network interface.
11701type SecurityRuleAssociations struct {
11702	NetworkInterfaceAssociation *InterfaceAssociation `json:"networkInterfaceAssociation,omitempty"`
11703	SubnetAssociation           *SubnetAssociation    `json:"subnetAssociation,omitempty"`
11704	// DefaultSecurityRules - Collection of default security rules of the network security group.
11705	DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"`
11706	// EffectiveSecurityRules - Collection of effective security rules.
11707	EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"`
11708}
11709
11710// SecurityRuleListResult response for ListSecurityRule API service call. Retrieves all security rules that
11711// belongs to a network security group.
11712type SecurityRuleListResult struct {
11713	autorest.Response `json:"-"`
11714	// Value - The security rules in a network security group.
11715	Value *[]SecurityRule `json:"value,omitempty"`
11716	// NextLink - The URL to get the next set of results.
11717	NextLink *string `json:"nextLink,omitempty"`
11718}
11719
11720// SecurityRuleListResultIterator provides access to a complete listing of SecurityRule values.
11721type SecurityRuleListResultIterator struct {
11722	i    int
11723	page SecurityRuleListResultPage
11724}
11725
11726// NextWithContext advances to the next value.  If there was an error making
11727// the request the iterator does not advance and the error is returned.
11728func (iter *SecurityRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
11729	if tracing.IsEnabled() {
11730		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultIterator.NextWithContext")
11731		defer func() {
11732			sc := -1
11733			if iter.Response().Response.Response != nil {
11734				sc = iter.Response().Response.Response.StatusCode
11735			}
11736			tracing.EndSpan(ctx, sc, err)
11737		}()
11738	}
11739	iter.i++
11740	if iter.i < len(iter.page.Values()) {
11741		return nil
11742	}
11743	err = iter.page.NextWithContext(ctx)
11744	if err != nil {
11745		iter.i--
11746		return err
11747	}
11748	iter.i = 0
11749	return nil
11750}
11751
11752// Next advances to the next value.  If there was an error making
11753// the request the iterator does not advance and the error is returned.
11754// Deprecated: Use NextWithContext() instead.
11755func (iter *SecurityRuleListResultIterator) Next() error {
11756	return iter.NextWithContext(context.Background())
11757}
11758
11759// NotDone returns true if the enumeration should be started or is not yet complete.
11760func (iter SecurityRuleListResultIterator) NotDone() bool {
11761	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11762}
11763
11764// Response returns the raw server response from the last page request.
11765func (iter SecurityRuleListResultIterator) Response() SecurityRuleListResult {
11766	return iter.page.Response()
11767}
11768
11769// Value returns the current value or a zero-initialized value if the
11770// iterator has advanced beyond the end of the collection.
11771func (iter SecurityRuleListResultIterator) Value() SecurityRule {
11772	if !iter.page.NotDone() {
11773		return SecurityRule{}
11774	}
11775	return iter.page.Values()[iter.i]
11776}
11777
11778// Creates a new instance of the SecurityRuleListResultIterator type.
11779func NewSecurityRuleListResultIterator(page SecurityRuleListResultPage) SecurityRuleListResultIterator {
11780	return SecurityRuleListResultIterator{page: page}
11781}
11782
11783// IsEmpty returns true if the ListResult contains no values.
11784func (srlr SecurityRuleListResult) IsEmpty() bool {
11785	return srlr.Value == nil || len(*srlr.Value) == 0
11786}
11787
11788// hasNextLink returns true if the NextLink is not empty.
11789func (srlr SecurityRuleListResult) hasNextLink() bool {
11790	return srlr.NextLink != nil && len(*srlr.NextLink) != 0
11791}
11792
11793// securityRuleListResultPreparer prepares a request to retrieve the next set of results.
11794// It returns nil if no more results exist.
11795func (srlr SecurityRuleListResult) securityRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
11796	if !srlr.hasNextLink() {
11797		return nil, nil
11798	}
11799	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11800		autorest.AsJSON(),
11801		autorest.AsGet(),
11802		autorest.WithBaseURL(to.String(srlr.NextLink)))
11803}
11804
11805// SecurityRuleListResultPage contains a page of SecurityRule values.
11806type SecurityRuleListResultPage struct {
11807	fn   func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)
11808	srlr SecurityRuleListResult
11809}
11810
11811// NextWithContext advances to the next page of values.  If there was an error making
11812// the request the page does not advance and the error is returned.
11813func (page *SecurityRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
11814	if tracing.IsEnabled() {
11815		ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultPage.NextWithContext")
11816		defer func() {
11817			sc := -1
11818			if page.Response().Response.Response != nil {
11819				sc = page.Response().Response.Response.StatusCode
11820			}
11821			tracing.EndSpan(ctx, sc, err)
11822		}()
11823	}
11824	for {
11825		next, err := page.fn(ctx, page.srlr)
11826		if err != nil {
11827			return err
11828		}
11829		page.srlr = next
11830		if !next.hasNextLink() || !next.IsEmpty() {
11831			break
11832		}
11833	}
11834	return nil
11835}
11836
11837// Next advances to the next page of values.  If there was an error making
11838// the request the page does not advance and the error is returned.
11839// Deprecated: Use NextWithContext() instead.
11840func (page *SecurityRuleListResultPage) Next() error {
11841	return page.NextWithContext(context.Background())
11842}
11843
11844// NotDone returns true if the page enumeration should be started or is not yet complete.
11845func (page SecurityRuleListResultPage) NotDone() bool {
11846	return !page.srlr.IsEmpty()
11847}
11848
11849// Response returns the raw server response from the last page request.
11850func (page SecurityRuleListResultPage) Response() SecurityRuleListResult {
11851	return page.srlr
11852}
11853
11854// Values returns the slice of values for the current page or nil if there are no values.
11855func (page SecurityRuleListResultPage) Values() []SecurityRule {
11856	if page.srlr.IsEmpty() {
11857		return nil
11858	}
11859	return *page.srlr.Value
11860}
11861
11862// Creates a new instance of the SecurityRuleListResultPage type.
11863func NewSecurityRuleListResultPage(cur SecurityRuleListResult, getNextPage func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)) SecurityRuleListResultPage {
11864	return SecurityRuleListResultPage{
11865		fn:   getNextPage,
11866		srlr: cur,
11867	}
11868}
11869
11870// SecurityRulePropertiesFormat security rule resource.
11871type SecurityRulePropertiesFormat struct {
11872	// Description - A description for this rule. Restricted to 140 chars.
11873	Description *string `json:"description,omitempty"`
11874	// Protocol - Network protocol this rule applies to. Possible values are 'Tcp', 'Udp', and '*'. Possible values include: 'SecurityRuleProtocolTCP', 'SecurityRuleProtocolUDP', 'SecurityRuleProtocolAsterisk'
11875	Protocol SecurityRuleProtocol `json:"protocol,omitempty"`
11876	// SourcePortRange - The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
11877	SourcePortRange *string `json:"sourcePortRange,omitempty"`
11878	// DestinationPortRange - The destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
11879	DestinationPortRange *string `json:"destinationPortRange,omitempty"`
11880	// 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.
11881	SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"`
11882	// SourceAddressPrefixes - The CIDR or source IP ranges.
11883	SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"`
11884	// SourceApplicationSecurityGroups - The application security group specified as source.
11885	SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"`
11886	// 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.
11887	DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"`
11888	// DestinationAddressPrefixes - The destination address prefixes. CIDR or destination IP ranges.
11889	DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"`
11890	// DestinationApplicationSecurityGroups - The application security group specified as destination.
11891	DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"`
11892	// SourcePortRanges - The source port ranges.
11893	SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"`
11894	// DestinationPortRanges - The destination port ranges.
11895	DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"`
11896	// Access - The network traffic is allowed or denied. Possible values are: 'Allow' and 'Deny'. Possible values include: 'SecurityRuleAccessAllow', 'SecurityRuleAccessDeny'
11897	Access SecurityRuleAccess `json:"access,omitempty"`
11898	// 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.
11899	Priority *int32 `json:"priority,omitempty"`
11900	// 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'
11901	Direction SecurityRuleDirection `json:"direction,omitempty"`
11902	// ProvisioningState - The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
11903	ProvisioningState *string `json:"provisioningState,omitempty"`
11904}
11905
11906// SecurityRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
11907// long-running operation.
11908type SecurityRulesCreateOrUpdateFuture struct {
11909	azure.FutureAPI
11910	// Result returns the result of the asynchronous operation.
11911	// If the operation has not completed it will return an error.
11912	Result func(SecurityRulesClient) (SecurityRule, error)
11913}
11914
11915// SecurityRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
11916// operation.
11917type SecurityRulesDeleteFuture struct {
11918	azure.FutureAPI
11919	// Result returns the result of the asynchronous operation.
11920	// If the operation has not completed it will return an error.
11921	Result func(SecurityRulesClient) (autorest.Response, error)
11922}
11923
11924// ServiceEndpointPropertiesFormat the service endpoint properties.
11925type ServiceEndpointPropertiesFormat struct {
11926	// Service - The type of the endpoint service.
11927	Service *string `json:"service,omitempty"`
11928	// Locations - A list of locations.
11929	Locations *[]string `json:"locations,omitempty"`
11930	// ProvisioningState - The provisioning state of the resource.
11931	ProvisioningState *string `json:"provisioningState,omitempty"`
11932}
11933
11934// String ...
11935type String struct {
11936	autorest.Response `json:"-"`
11937	Value             *string `json:"value,omitempty"`
11938}
11939
11940// Subnet subnet in a virtual network resource.
11941type Subnet struct {
11942	autorest.Response `json:"-"`
11943	// SubnetPropertiesFormat - Properties of the subnet.
11944	*SubnetPropertiesFormat `json:"properties,omitempty"`
11945	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
11946	Name *string `json:"name,omitempty"`
11947	// Etag - A unique read-only string that changes whenever the resource is updated.
11948	Etag *string `json:"etag,omitempty"`
11949	// ID - Resource ID.
11950	ID *string `json:"id,omitempty"`
11951}
11952
11953// MarshalJSON is the custom marshaler for Subnet.
11954func (s Subnet) MarshalJSON() ([]byte, error) {
11955	objectMap := make(map[string]interface{})
11956	if s.SubnetPropertiesFormat != nil {
11957		objectMap["properties"] = s.SubnetPropertiesFormat
11958	}
11959	if s.Name != nil {
11960		objectMap["name"] = s.Name
11961	}
11962	if s.Etag != nil {
11963		objectMap["etag"] = s.Etag
11964	}
11965	if s.ID != nil {
11966		objectMap["id"] = s.ID
11967	}
11968	return json.Marshal(objectMap)
11969}
11970
11971// UnmarshalJSON is the custom unmarshaler for Subnet struct.
11972func (s *Subnet) UnmarshalJSON(body []byte) error {
11973	var m map[string]*json.RawMessage
11974	err := json.Unmarshal(body, &m)
11975	if err != nil {
11976		return err
11977	}
11978	for k, v := range m {
11979		switch k {
11980		case "properties":
11981			if v != nil {
11982				var subnetPropertiesFormat SubnetPropertiesFormat
11983				err = json.Unmarshal(*v, &subnetPropertiesFormat)
11984				if err != nil {
11985					return err
11986				}
11987				s.SubnetPropertiesFormat = &subnetPropertiesFormat
11988			}
11989		case "name":
11990			if v != nil {
11991				var name string
11992				err = json.Unmarshal(*v, &name)
11993				if err != nil {
11994					return err
11995				}
11996				s.Name = &name
11997			}
11998		case "etag":
11999			if v != nil {
12000				var etag string
12001				err = json.Unmarshal(*v, &etag)
12002				if err != nil {
12003					return err
12004				}
12005				s.Etag = &etag
12006			}
12007		case "id":
12008			if v != nil {
12009				var ID string
12010				err = json.Unmarshal(*v, &ID)
12011				if err != nil {
12012					return err
12013				}
12014				s.ID = &ID
12015			}
12016		}
12017	}
12018
12019	return nil
12020}
12021
12022// SubnetAssociation network interface and its custom security rules.
12023type SubnetAssociation struct {
12024	// ID - READ-ONLY; Subnet ID.
12025	ID *string `json:"id,omitempty"`
12026	// SecurityRules - Collection of custom security rules.
12027	SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
12028}
12029
12030// MarshalJSON is the custom marshaler for SubnetAssociation.
12031func (sa SubnetAssociation) MarshalJSON() ([]byte, error) {
12032	objectMap := make(map[string]interface{})
12033	if sa.SecurityRules != nil {
12034		objectMap["securityRules"] = sa.SecurityRules
12035	}
12036	return json.Marshal(objectMap)
12037}
12038
12039// SubnetListResult response for ListSubnets API service callRetrieves all subnet that belongs to a virtual
12040// network
12041type SubnetListResult struct {
12042	autorest.Response `json:"-"`
12043	// Value - The subnets in a virtual network.
12044	Value *[]Subnet `json:"value,omitempty"`
12045	// NextLink - The URL to get the next set of results.
12046	NextLink *string `json:"nextLink,omitempty"`
12047}
12048
12049// SubnetListResultIterator provides access to a complete listing of Subnet values.
12050type SubnetListResultIterator struct {
12051	i    int
12052	page SubnetListResultPage
12053}
12054
12055// NextWithContext advances to the next value.  If there was an error making
12056// the request the iterator does not advance and the error is returned.
12057func (iter *SubnetListResultIterator) NextWithContext(ctx context.Context) (err error) {
12058	if tracing.IsEnabled() {
12059		ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultIterator.NextWithContext")
12060		defer func() {
12061			sc := -1
12062			if iter.Response().Response.Response != nil {
12063				sc = iter.Response().Response.Response.StatusCode
12064			}
12065			tracing.EndSpan(ctx, sc, err)
12066		}()
12067	}
12068	iter.i++
12069	if iter.i < len(iter.page.Values()) {
12070		return nil
12071	}
12072	err = iter.page.NextWithContext(ctx)
12073	if err != nil {
12074		iter.i--
12075		return err
12076	}
12077	iter.i = 0
12078	return nil
12079}
12080
12081// Next advances to the next value.  If there was an error making
12082// the request the iterator does not advance and the error is returned.
12083// Deprecated: Use NextWithContext() instead.
12084func (iter *SubnetListResultIterator) Next() error {
12085	return iter.NextWithContext(context.Background())
12086}
12087
12088// NotDone returns true if the enumeration should be started or is not yet complete.
12089func (iter SubnetListResultIterator) NotDone() bool {
12090	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12091}
12092
12093// Response returns the raw server response from the last page request.
12094func (iter SubnetListResultIterator) Response() SubnetListResult {
12095	return iter.page.Response()
12096}
12097
12098// Value returns the current value or a zero-initialized value if the
12099// iterator has advanced beyond the end of the collection.
12100func (iter SubnetListResultIterator) Value() Subnet {
12101	if !iter.page.NotDone() {
12102		return Subnet{}
12103	}
12104	return iter.page.Values()[iter.i]
12105}
12106
12107// Creates a new instance of the SubnetListResultIterator type.
12108func NewSubnetListResultIterator(page SubnetListResultPage) SubnetListResultIterator {
12109	return SubnetListResultIterator{page: page}
12110}
12111
12112// IsEmpty returns true if the ListResult contains no values.
12113func (slr SubnetListResult) IsEmpty() bool {
12114	return slr.Value == nil || len(*slr.Value) == 0
12115}
12116
12117// hasNextLink returns true if the NextLink is not empty.
12118func (slr SubnetListResult) hasNextLink() bool {
12119	return slr.NextLink != nil && len(*slr.NextLink) != 0
12120}
12121
12122// subnetListResultPreparer prepares a request to retrieve the next set of results.
12123// It returns nil if no more results exist.
12124func (slr SubnetListResult) subnetListResultPreparer(ctx context.Context) (*http.Request, error) {
12125	if !slr.hasNextLink() {
12126		return nil, nil
12127	}
12128	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12129		autorest.AsJSON(),
12130		autorest.AsGet(),
12131		autorest.WithBaseURL(to.String(slr.NextLink)))
12132}
12133
12134// SubnetListResultPage contains a page of Subnet values.
12135type SubnetListResultPage struct {
12136	fn  func(context.Context, SubnetListResult) (SubnetListResult, error)
12137	slr SubnetListResult
12138}
12139
12140// NextWithContext advances to the next page of values.  If there was an error making
12141// the request the page does not advance and the error is returned.
12142func (page *SubnetListResultPage) NextWithContext(ctx context.Context) (err error) {
12143	if tracing.IsEnabled() {
12144		ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultPage.NextWithContext")
12145		defer func() {
12146			sc := -1
12147			if page.Response().Response.Response != nil {
12148				sc = page.Response().Response.Response.StatusCode
12149			}
12150			tracing.EndSpan(ctx, sc, err)
12151		}()
12152	}
12153	for {
12154		next, err := page.fn(ctx, page.slr)
12155		if err != nil {
12156			return err
12157		}
12158		page.slr = next
12159		if !next.hasNextLink() || !next.IsEmpty() {
12160			break
12161		}
12162	}
12163	return nil
12164}
12165
12166// Next advances to the next page of values.  If there was an error making
12167// the request the page does not advance and the error is returned.
12168// Deprecated: Use NextWithContext() instead.
12169func (page *SubnetListResultPage) Next() error {
12170	return page.NextWithContext(context.Background())
12171}
12172
12173// NotDone returns true if the page enumeration should be started or is not yet complete.
12174func (page SubnetListResultPage) NotDone() bool {
12175	return !page.slr.IsEmpty()
12176}
12177
12178// Response returns the raw server response from the last page request.
12179func (page SubnetListResultPage) Response() SubnetListResult {
12180	return page.slr
12181}
12182
12183// Values returns the slice of values for the current page or nil if there are no values.
12184func (page SubnetListResultPage) Values() []Subnet {
12185	if page.slr.IsEmpty() {
12186		return nil
12187	}
12188	return *page.slr.Value
12189}
12190
12191// Creates a new instance of the SubnetListResultPage type.
12192func NewSubnetListResultPage(cur SubnetListResult, getNextPage func(context.Context, SubnetListResult) (SubnetListResult, error)) SubnetListResultPage {
12193	return SubnetListResultPage{
12194		fn:  getNextPage,
12195		slr: cur,
12196	}
12197}
12198
12199// SubnetPropertiesFormat properties of the subnet.
12200type SubnetPropertiesFormat struct {
12201	// AddressPrefix - The address prefix for the subnet.
12202	AddressPrefix *string `json:"addressPrefix,omitempty"`
12203	// NetworkSecurityGroup - The reference of the NetworkSecurityGroup resource.
12204	NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"`
12205	// RouteTable - The reference of the RouteTable resource.
12206	RouteTable *RouteTable `json:"routeTable,omitempty"`
12207	// ServiceEndpoints - An array of service endpoints.
12208	ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"`
12209	// IPConfigurations - READ-ONLY; Gets an array of references to the network interface IP configurations using subnet.
12210	IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"`
12211	// ResourceNavigationLinks - Gets an array of references to the external resources using subnet.
12212	ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"`
12213	// ProvisioningState - The provisioning state of the resource.
12214	ProvisioningState *string `json:"provisioningState,omitempty"`
12215}
12216
12217// MarshalJSON is the custom marshaler for SubnetPropertiesFormat.
12218func (spf SubnetPropertiesFormat) MarshalJSON() ([]byte, error) {
12219	objectMap := make(map[string]interface{})
12220	if spf.AddressPrefix != nil {
12221		objectMap["addressPrefix"] = spf.AddressPrefix
12222	}
12223	if spf.NetworkSecurityGroup != nil {
12224		objectMap["networkSecurityGroup"] = spf.NetworkSecurityGroup
12225	}
12226	if spf.RouteTable != nil {
12227		objectMap["routeTable"] = spf.RouteTable
12228	}
12229	if spf.ServiceEndpoints != nil {
12230		objectMap["serviceEndpoints"] = spf.ServiceEndpoints
12231	}
12232	if spf.ResourceNavigationLinks != nil {
12233		objectMap["resourceNavigationLinks"] = spf.ResourceNavigationLinks
12234	}
12235	if spf.ProvisioningState != nil {
12236		objectMap["provisioningState"] = spf.ProvisioningState
12237	}
12238	return json.Marshal(objectMap)
12239}
12240
12241// SubnetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
12242// operation.
12243type SubnetsCreateOrUpdateFuture struct {
12244	azure.FutureAPI
12245	// Result returns the result of the asynchronous operation.
12246	// If the operation has not completed it will return an error.
12247	Result func(SubnetsClient) (Subnet, error)
12248}
12249
12250// SubnetsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
12251// operation.
12252type SubnetsDeleteFuture struct {
12253	azure.FutureAPI
12254	// Result returns the result of the asynchronous operation.
12255	// If the operation has not completed it will return an error.
12256	Result func(SubnetsClient) (autorest.Response, error)
12257}
12258
12259// SubResource reference to another subresource.
12260type SubResource struct {
12261	// ID - Resource ID.
12262	ID *string `json:"id,omitempty"`
12263}
12264
12265// TagsObject tags object for patch operations.
12266type TagsObject struct {
12267	// Tags - Resource tags.
12268	Tags map[string]*string `json:"tags"`
12269}
12270
12271// MarshalJSON is the custom marshaler for TagsObject.
12272func (toVar TagsObject) MarshalJSON() ([]byte, error) {
12273	objectMap := make(map[string]interface{})
12274	if toVar.Tags != nil {
12275		objectMap["tags"] = toVar.Tags
12276	}
12277	return json.Marshal(objectMap)
12278}
12279
12280// Topology topology of the specified resource group.
12281type Topology struct {
12282	autorest.Response `json:"-"`
12283	// ID - READ-ONLY; GUID representing the operation id.
12284	ID *string `json:"id,omitempty"`
12285	// CreatedDateTime - READ-ONLY; The datetime when the topology was initially created for the resource group.
12286	CreatedDateTime *date.Time `json:"createdDateTime,omitempty"`
12287	// LastModified - READ-ONLY; The datetime when the topology was last modified.
12288	LastModified *date.Time          `json:"lastModified,omitempty"`
12289	Resources    *[]TopologyResource `json:"resources,omitempty"`
12290}
12291
12292// MarshalJSON is the custom marshaler for Topology.
12293func (t Topology) MarshalJSON() ([]byte, error) {
12294	objectMap := make(map[string]interface{})
12295	if t.Resources != nil {
12296		objectMap["resources"] = t.Resources
12297	}
12298	return json.Marshal(objectMap)
12299}
12300
12301// TopologyAssociation resources that have an association with the parent resource.
12302type TopologyAssociation struct {
12303	// Name - The name of the resource that is associated with the parent resource.
12304	Name *string `json:"name,omitempty"`
12305	// ResourceID - The ID of the resource that is associated with the parent resource.
12306	ResourceID *string `json:"resourceId,omitempty"`
12307	// AssociationType - The association type of the child resource to the parent resource. Possible values include: 'Associated', 'Contains'
12308	AssociationType AssociationType `json:"associationType,omitempty"`
12309}
12310
12311// TopologyParameters parameters that define the representation of topology.
12312type TopologyParameters struct {
12313	// TargetResourceGroupName - The name of the target resource group to perform topology on.
12314	TargetResourceGroupName *string `json:"targetResourceGroupName,omitempty"`
12315	// TargetVirtualNetwork - The reference of the Virtual Network resource.
12316	TargetVirtualNetwork *SubResource `json:"targetVirtualNetwork,omitempty"`
12317	// TargetSubnet - The reference of the Subnet resource.
12318	TargetSubnet *SubResource `json:"targetSubnet,omitempty"`
12319}
12320
12321// TopologyResource the network resource topology information for the given resource group.
12322type TopologyResource struct {
12323	// Name - Name of the resource.
12324	Name *string `json:"name,omitempty"`
12325	// ID - ID of the resource.
12326	ID *string `json:"id,omitempty"`
12327	// Location - Resource location.
12328	Location *string `json:"location,omitempty"`
12329	// Associations - Holds the associations the resource has with other resources in the resource group.
12330	Associations *[]TopologyAssociation `json:"associations,omitempty"`
12331}
12332
12333// TroubleshootingDetails information gained from troubleshooting of specified resource.
12334type TroubleshootingDetails struct {
12335	// ID - The id of the get troubleshoot operation.
12336	ID *string `json:"id,omitempty"`
12337	// ReasonType - Reason type of failure.
12338	ReasonType *string `json:"reasonType,omitempty"`
12339	// Summary - A summary of troubleshooting.
12340	Summary *string `json:"summary,omitempty"`
12341	// Detail - Details on troubleshooting results.
12342	Detail *string `json:"detail,omitempty"`
12343	// RecommendedActions - List of recommended actions.
12344	RecommendedActions *[]TroubleshootingRecommendedActions `json:"recommendedActions,omitempty"`
12345}
12346
12347// TroubleshootingParameters parameters that define the resource to troubleshoot.
12348type TroubleshootingParameters struct {
12349	// TargetResourceID - The target resource to troubleshoot.
12350	TargetResourceID           *string `json:"targetResourceId,omitempty"`
12351	*TroubleshootingProperties `json:"properties,omitempty"`
12352}
12353
12354// MarshalJSON is the custom marshaler for TroubleshootingParameters.
12355func (tp TroubleshootingParameters) MarshalJSON() ([]byte, error) {
12356	objectMap := make(map[string]interface{})
12357	if tp.TargetResourceID != nil {
12358		objectMap["targetResourceId"] = tp.TargetResourceID
12359	}
12360	if tp.TroubleshootingProperties != nil {
12361		objectMap["properties"] = tp.TroubleshootingProperties
12362	}
12363	return json.Marshal(objectMap)
12364}
12365
12366// UnmarshalJSON is the custom unmarshaler for TroubleshootingParameters struct.
12367func (tp *TroubleshootingParameters) UnmarshalJSON(body []byte) error {
12368	var m map[string]*json.RawMessage
12369	err := json.Unmarshal(body, &m)
12370	if err != nil {
12371		return err
12372	}
12373	for k, v := range m {
12374		switch k {
12375		case "targetResourceId":
12376			if v != nil {
12377				var targetResourceID string
12378				err = json.Unmarshal(*v, &targetResourceID)
12379				if err != nil {
12380					return err
12381				}
12382				tp.TargetResourceID = &targetResourceID
12383			}
12384		case "properties":
12385			if v != nil {
12386				var troubleshootingProperties TroubleshootingProperties
12387				err = json.Unmarshal(*v, &troubleshootingProperties)
12388				if err != nil {
12389					return err
12390				}
12391				tp.TroubleshootingProperties = &troubleshootingProperties
12392			}
12393		}
12394	}
12395
12396	return nil
12397}
12398
12399// TroubleshootingProperties storage location provided for troubleshoot.
12400type TroubleshootingProperties struct {
12401	// StorageID - The ID for the storage account to save the troubleshoot result.
12402	StorageID *string `json:"storageId,omitempty"`
12403	// StoragePath - The path to the blob to save the troubleshoot result in.
12404	StoragePath *string `json:"storagePath,omitempty"`
12405}
12406
12407// TroubleshootingRecommendedActions recommended actions based on discovered issues.
12408type TroubleshootingRecommendedActions struct {
12409	// ActionID - ID of the recommended action.
12410	ActionID *string `json:"actionId,omitempty"`
12411	// ActionText - Description of recommended actions.
12412	ActionText *string `json:"actionText,omitempty"`
12413	// ActionURI - The uri linking to a documentation for the recommended troubleshooting actions.
12414	ActionURI *string `json:"actionUri,omitempty"`
12415	// ActionURIText - The information from the URI for the recommended troubleshooting actions.
12416	ActionURIText *string `json:"actionUriText,omitempty"`
12417}
12418
12419// TroubleshootingResult troubleshooting information gained from specified resource.
12420type TroubleshootingResult struct {
12421	autorest.Response `json:"-"`
12422	// StartTime - The start time of the troubleshooting.
12423	StartTime *date.Time `json:"startTime,omitempty"`
12424	// EndTime - The end time of the troubleshooting.
12425	EndTime *date.Time `json:"endTime,omitempty"`
12426	// Code - The result code of the troubleshooting.
12427	Code *string `json:"code,omitempty"`
12428	// Results - Information from troubleshooting.
12429	Results *[]TroubleshootingDetails `json:"results,omitempty"`
12430}
12431
12432// TunnelConnectionHealth virtualNetworkGatewayConnection properties
12433type TunnelConnectionHealth struct {
12434	// Tunnel - READ-ONLY; Tunnel name.
12435	Tunnel *string `json:"tunnel,omitempty"`
12436	// ConnectionStatus - READ-ONLY; Virtual network Gateway connection status. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
12437	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
12438	// IngressBytesTransferred - READ-ONLY; The Ingress Bytes Transferred in this connection
12439	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
12440	// EgressBytesTransferred - READ-ONLY; The Egress Bytes Transferred in this connection
12441	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
12442	// LastConnectionEstablishedUtcTime - READ-ONLY; The time at which connection was established in Utc format.
12443	LastConnectionEstablishedUtcTime *string `json:"lastConnectionEstablishedUtcTime,omitempty"`
12444}
12445
12446// Usage describes network resource usage.
12447type Usage struct {
12448	// ID - READ-ONLY; Resource identifier.
12449	ID *string `json:"id,omitempty"`
12450	// Unit - An enum describing the unit of measurement.
12451	Unit *string `json:"unit,omitempty"`
12452	// CurrentValue - The current value of the usage.
12453	CurrentValue *int64 `json:"currentValue,omitempty"`
12454	// Limit - The limit of usage.
12455	Limit *int64 `json:"limit,omitempty"`
12456	// Name - The name of the type of usage.
12457	Name *UsageName `json:"name,omitempty"`
12458}
12459
12460// MarshalJSON is the custom marshaler for Usage.
12461func (u Usage) MarshalJSON() ([]byte, error) {
12462	objectMap := make(map[string]interface{})
12463	if u.Unit != nil {
12464		objectMap["unit"] = u.Unit
12465	}
12466	if u.CurrentValue != nil {
12467		objectMap["currentValue"] = u.CurrentValue
12468	}
12469	if u.Limit != nil {
12470		objectMap["limit"] = u.Limit
12471	}
12472	if u.Name != nil {
12473		objectMap["name"] = u.Name
12474	}
12475	return json.Marshal(objectMap)
12476}
12477
12478// UsageName the usage names.
12479type UsageName struct {
12480	// Value - A string describing the resource name.
12481	Value *string `json:"value,omitempty"`
12482	// LocalizedValue - A localized string describing the resource name.
12483	LocalizedValue *string `json:"localizedValue,omitempty"`
12484}
12485
12486// UsagesListResult the list usages operation response.
12487type UsagesListResult struct {
12488	autorest.Response `json:"-"`
12489	// Value - The list network resource usages.
12490	Value *[]Usage `json:"value,omitempty"`
12491	// NextLink - URL to get the next set of results.
12492	NextLink *string `json:"nextLink,omitempty"`
12493}
12494
12495// UsagesListResultIterator provides access to a complete listing of Usage values.
12496type UsagesListResultIterator struct {
12497	i    int
12498	page UsagesListResultPage
12499}
12500
12501// NextWithContext advances to the next value.  If there was an error making
12502// the request the iterator does not advance and the error is returned.
12503func (iter *UsagesListResultIterator) NextWithContext(ctx context.Context) (err error) {
12504	if tracing.IsEnabled() {
12505		ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultIterator.NextWithContext")
12506		defer func() {
12507			sc := -1
12508			if iter.Response().Response.Response != nil {
12509				sc = iter.Response().Response.Response.StatusCode
12510			}
12511			tracing.EndSpan(ctx, sc, err)
12512		}()
12513	}
12514	iter.i++
12515	if iter.i < len(iter.page.Values()) {
12516		return nil
12517	}
12518	err = iter.page.NextWithContext(ctx)
12519	if err != nil {
12520		iter.i--
12521		return err
12522	}
12523	iter.i = 0
12524	return nil
12525}
12526
12527// Next advances to the next value.  If there was an error making
12528// the request the iterator does not advance and the error is returned.
12529// Deprecated: Use NextWithContext() instead.
12530func (iter *UsagesListResultIterator) Next() error {
12531	return iter.NextWithContext(context.Background())
12532}
12533
12534// NotDone returns true if the enumeration should be started or is not yet complete.
12535func (iter UsagesListResultIterator) NotDone() bool {
12536	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12537}
12538
12539// Response returns the raw server response from the last page request.
12540func (iter UsagesListResultIterator) Response() UsagesListResult {
12541	return iter.page.Response()
12542}
12543
12544// Value returns the current value or a zero-initialized value if the
12545// iterator has advanced beyond the end of the collection.
12546func (iter UsagesListResultIterator) Value() Usage {
12547	if !iter.page.NotDone() {
12548		return Usage{}
12549	}
12550	return iter.page.Values()[iter.i]
12551}
12552
12553// Creates a new instance of the UsagesListResultIterator type.
12554func NewUsagesListResultIterator(page UsagesListResultPage) UsagesListResultIterator {
12555	return UsagesListResultIterator{page: page}
12556}
12557
12558// IsEmpty returns true if the ListResult contains no values.
12559func (ulr UsagesListResult) IsEmpty() bool {
12560	return ulr.Value == nil || len(*ulr.Value) == 0
12561}
12562
12563// hasNextLink returns true if the NextLink is not empty.
12564func (ulr UsagesListResult) hasNextLink() bool {
12565	return ulr.NextLink != nil && len(*ulr.NextLink) != 0
12566}
12567
12568// usagesListResultPreparer prepares a request to retrieve the next set of results.
12569// It returns nil if no more results exist.
12570func (ulr UsagesListResult) usagesListResultPreparer(ctx context.Context) (*http.Request, error) {
12571	if !ulr.hasNextLink() {
12572		return nil, nil
12573	}
12574	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12575		autorest.AsJSON(),
12576		autorest.AsGet(),
12577		autorest.WithBaseURL(to.String(ulr.NextLink)))
12578}
12579
12580// UsagesListResultPage contains a page of Usage values.
12581type UsagesListResultPage struct {
12582	fn  func(context.Context, UsagesListResult) (UsagesListResult, error)
12583	ulr UsagesListResult
12584}
12585
12586// NextWithContext advances to the next page of values.  If there was an error making
12587// the request the page does not advance and the error is returned.
12588func (page *UsagesListResultPage) NextWithContext(ctx context.Context) (err error) {
12589	if tracing.IsEnabled() {
12590		ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultPage.NextWithContext")
12591		defer func() {
12592			sc := -1
12593			if page.Response().Response.Response != nil {
12594				sc = page.Response().Response.Response.StatusCode
12595			}
12596			tracing.EndSpan(ctx, sc, err)
12597		}()
12598	}
12599	for {
12600		next, err := page.fn(ctx, page.ulr)
12601		if err != nil {
12602			return err
12603		}
12604		page.ulr = next
12605		if !next.hasNextLink() || !next.IsEmpty() {
12606			break
12607		}
12608	}
12609	return nil
12610}
12611
12612// Next advances to the next page of values.  If there was an error making
12613// the request the page does not advance and the error is returned.
12614// Deprecated: Use NextWithContext() instead.
12615func (page *UsagesListResultPage) Next() error {
12616	return page.NextWithContext(context.Background())
12617}
12618
12619// NotDone returns true if the page enumeration should be started or is not yet complete.
12620func (page UsagesListResultPage) NotDone() bool {
12621	return !page.ulr.IsEmpty()
12622}
12623
12624// Response returns the raw server response from the last page request.
12625func (page UsagesListResultPage) Response() UsagesListResult {
12626	return page.ulr
12627}
12628
12629// Values returns the slice of values for the current page or nil if there are no values.
12630func (page UsagesListResultPage) Values() []Usage {
12631	if page.ulr.IsEmpty() {
12632		return nil
12633	}
12634	return *page.ulr.Value
12635}
12636
12637// Creates a new instance of the UsagesListResultPage type.
12638func NewUsagesListResultPage(cur UsagesListResult, getNextPage func(context.Context, UsagesListResult) (UsagesListResult, error)) UsagesListResultPage {
12639	return UsagesListResultPage{
12640		fn:  getNextPage,
12641		ulr: cur,
12642	}
12643}
12644
12645// VerificationIPFlowParameters parameters that define the IP flow to be verified.
12646type VerificationIPFlowParameters struct {
12647	// TargetResourceID - The ID of the target resource to perform next-hop on.
12648	TargetResourceID *string `json:"targetResourceId,omitempty"`
12649	// Direction - The direction of the packet represented as a 5-tuple. Possible values include: 'Inbound', 'Outbound'
12650	Direction Direction `json:"direction,omitempty"`
12651	// Protocol - Protocol to be verified on. Possible values include: 'ProtocolTCP', 'ProtocolUDP'
12652	Protocol Protocol `json:"protocol,omitempty"`
12653	// 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.
12654	LocalPort *string `json:"localPort,omitempty"`
12655	// 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.
12656	RemotePort *string `json:"remotePort,omitempty"`
12657	// LocalIPAddress - The local IP address. Acceptable values are valid IPv4 addresses.
12658	LocalIPAddress *string `json:"localIPAddress,omitempty"`
12659	// RemoteIPAddress - The remote IP address. Acceptable values are valid IPv4 addresses.
12660	RemoteIPAddress *string `json:"remoteIPAddress,omitempty"`
12661	// 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).
12662	TargetNicResourceID *string `json:"targetNicResourceId,omitempty"`
12663}
12664
12665// VerificationIPFlowResult results of IP flow verification on the target resource.
12666type VerificationIPFlowResult struct {
12667	autorest.Response `json:"-"`
12668	// Access - Indicates whether the traffic is allowed or denied. Possible values include: 'Allow', 'Deny'
12669	Access Access `json:"access,omitempty"`
12670	// RuleName - Name of the rule. If input is not matched against any security rule, it is not displayed.
12671	RuleName *string `json:"ruleName,omitempty"`
12672}
12673
12674// VirtualNetwork virtual Network resource.
12675type VirtualNetwork struct {
12676	autorest.Response `json:"-"`
12677	// VirtualNetworkPropertiesFormat - Properties of the virtual network.
12678	*VirtualNetworkPropertiesFormat `json:"properties,omitempty"`
12679	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
12680	Etag *string `json:"etag,omitempty"`
12681	// ID - Resource ID.
12682	ID *string `json:"id,omitempty"`
12683	// Name - READ-ONLY; Resource name.
12684	Name *string `json:"name,omitempty"`
12685	// Type - READ-ONLY; Resource type.
12686	Type *string `json:"type,omitempty"`
12687	// Location - Resource location.
12688	Location *string `json:"location,omitempty"`
12689	// Tags - Resource tags.
12690	Tags map[string]*string `json:"tags"`
12691}
12692
12693// MarshalJSON is the custom marshaler for VirtualNetwork.
12694func (vn VirtualNetwork) MarshalJSON() ([]byte, error) {
12695	objectMap := make(map[string]interface{})
12696	if vn.VirtualNetworkPropertiesFormat != nil {
12697		objectMap["properties"] = vn.VirtualNetworkPropertiesFormat
12698	}
12699	if vn.Etag != nil {
12700		objectMap["etag"] = vn.Etag
12701	}
12702	if vn.ID != nil {
12703		objectMap["id"] = vn.ID
12704	}
12705	if vn.Location != nil {
12706		objectMap["location"] = vn.Location
12707	}
12708	if vn.Tags != nil {
12709		objectMap["tags"] = vn.Tags
12710	}
12711	return json.Marshal(objectMap)
12712}
12713
12714// UnmarshalJSON is the custom unmarshaler for VirtualNetwork struct.
12715func (vn *VirtualNetwork) UnmarshalJSON(body []byte) error {
12716	var m map[string]*json.RawMessage
12717	err := json.Unmarshal(body, &m)
12718	if err != nil {
12719		return err
12720	}
12721	for k, v := range m {
12722		switch k {
12723		case "properties":
12724			if v != nil {
12725				var virtualNetworkPropertiesFormat VirtualNetworkPropertiesFormat
12726				err = json.Unmarshal(*v, &virtualNetworkPropertiesFormat)
12727				if err != nil {
12728					return err
12729				}
12730				vn.VirtualNetworkPropertiesFormat = &virtualNetworkPropertiesFormat
12731			}
12732		case "etag":
12733			if v != nil {
12734				var etag string
12735				err = json.Unmarshal(*v, &etag)
12736				if err != nil {
12737					return err
12738				}
12739				vn.Etag = &etag
12740			}
12741		case "id":
12742			if v != nil {
12743				var ID string
12744				err = json.Unmarshal(*v, &ID)
12745				if err != nil {
12746					return err
12747				}
12748				vn.ID = &ID
12749			}
12750		case "name":
12751			if v != nil {
12752				var name string
12753				err = json.Unmarshal(*v, &name)
12754				if err != nil {
12755					return err
12756				}
12757				vn.Name = &name
12758			}
12759		case "type":
12760			if v != nil {
12761				var typeVar string
12762				err = json.Unmarshal(*v, &typeVar)
12763				if err != nil {
12764					return err
12765				}
12766				vn.Type = &typeVar
12767			}
12768		case "location":
12769			if v != nil {
12770				var location string
12771				err = json.Unmarshal(*v, &location)
12772				if err != nil {
12773					return err
12774				}
12775				vn.Location = &location
12776			}
12777		case "tags":
12778			if v != nil {
12779				var tags map[string]*string
12780				err = json.Unmarshal(*v, &tags)
12781				if err != nil {
12782					return err
12783				}
12784				vn.Tags = tags
12785			}
12786		}
12787	}
12788
12789	return nil
12790}
12791
12792// VirtualNetworkConnectionGatewayReference a reference to VirtualNetworkGateway or LocalNetworkGateway
12793// resource.
12794type VirtualNetworkConnectionGatewayReference struct {
12795	// ID - The ID of VirtualNetworkGateway or LocalNetworkGateway resource.
12796	ID *string `json:"id,omitempty"`
12797}
12798
12799// VirtualNetworkGateway a common class for general resource information
12800type VirtualNetworkGateway struct {
12801	autorest.Response `json:"-"`
12802	// VirtualNetworkGatewayPropertiesFormat - Properties of the virtual network gateway.
12803	*VirtualNetworkGatewayPropertiesFormat `json:"properties,omitempty"`
12804	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
12805	Etag *string `json:"etag,omitempty"`
12806	// ID - Resource ID.
12807	ID *string `json:"id,omitempty"`
12808	// Name - READ-ONLY; Resource name.
12809	Name *string `json:"name,omitempty"`
12810	// Type - READ-ONLY; Resource type.
12811	Type *string `json:"type,omitempty"`
12812	// Location - Resource location.
12813	Location *string `json:"location,omitempty"`
12814	// Tags - Resource tags.
12815	Tags map[string]*string `json:"tags"`
12816}
12817
12818// MarshalJSON is the custom marshaler for VirtualNetworkGateway.
12819func (vng VirtualNetworkGateway) MarshalJSON() ([]byte, error) {
12820	objectMap := make(map[string]interface{})
12821	if vng.VirtualNetworkGatewayPropertiesFormat != nil {
12822		objectMap["properties"] = vng.VirtualNetworkGatewayPropertiesFormat
12823	}
12824	if vng.Etag != nil {
12825		objectMap["etag"] = vng.Etag
12826	}
12827	if vng.ID != nil {
12828		objectMap["id"] = vng.ID
12829	}
12830	if vng.Location != nil {
12831		objectMap["location"] = vng.Location
12832	}
12833	if vng.Tags != nil {
12834		objectMap["tags"] = vng.Tags
12835	}
12836	return json.Marshal(objectMap)
12837}
12838
12839// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGateway struct.
12840func (vng *VirtualNetworkGateway) UnmarshalJSON(body []byte) error {
12841	var m map[string]*json.RawMessage
12842	err := json.Unmarshal(body, &m)
12843	if err != nil {
12844		return err
12845	}
12846	for k, v := range m {
12847		switch k {
12848		case "properties":
12849			if v != nil {
12850				var virtualNetworkGatewayPropertiesFormat VirtualNetworkGatewayPropertiesFormat
12851				err = json.Unmarshal(*v, &virtualNetworkGatewayPropertiesFormat)
12852				if err != nil {
12853					return err
12854				}
12855				vng.VirtualNetworkGatewayPropertiesFormat = &virtualNetworkGatewayPropertiesFormat
12856			}
12857		case "etag":
12858			if v != nil {
12859				var etag string
12860				err = json.Unmarshal(*v, &etag)
12861				if err != nil {
12862					return err
12863				}
12864				vng.Etag = &etag
12865			}
12866		case "id":
12867			if v != nil {
12868				var ID string
12869				err = json.Unmarshal(*v, &ID)
12870				if err != nil {
12871					return err
12872				}
12873				vng.ID = &ID
12874			}
12875		case "name":
12876			if v != nil {
12877				var name string
12878				err = json.Unmarshal(*v, &name)
12879				if err != nil {
12880					return err
12881				}
12882				vng.Name = &name
12883			}
12884		case "type":
12885			if v != nil {
12886				var typeVar string
12887				err = json.Unmarshal(*v, &typeVar)
12888				if err != nil {
12889					return err
12890				}
12891				vng.Type = &typeVar
12892			}
12893		case "location":
12894			if v != nil {
12895				var location string
12896				err = json.Unmarshal(*v, &location)
12897				if err != nil {
12898					return err
12899				}
12900				vng.Location = &location
12901			}
12902		case "tags":
12903			if v != nil {
12904				var tags map[string]*string
12905				err = json.Unmarshal(*v, &tags)
12906				if err != nil {
12907					return err
12908				}
12909				vng.Tags = tags
12910			}
12911		}
12912	}
12913
12914	return nil
12915}
12916
12917// VirtualNetworkGatewayConnection a common class for general resource information
12918type VirtualNetworkGatewayConnection struct {
12919	autorest.Response `json:"-"`
12920	// VirtualNetworkGatewayConnectionPropertiesFormat - Properties of the virtual network gateway connection.
12921	*VirtualNetworkGatewayConnectionPropertiesFormat `json:"properties,omitempty"`
12922	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
12923	Etag *string `json:"etag,omitempty"`
12924	// ID - Resource ID.
12925	ID *string `json:"id,omitempty"`
12926	// Name - READ-ONLY; Resource name.
12927	Name *string `json:"name,omitempty"`
12928	// Type - READ-ONLY; Resource type.
12929	Type *string `json:"type,omitempty"`
12930	// Location - Resource location.
12931	Location *string `json:"location,omitempty"`
12932	// Tags - Resource tags.
12933	Tags map[string]*string `json:"tags"`
12934}
12935
12936// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnection.
12937func (vngc VirtualNetworkGatewayConnection) MarshalJSON() ([]byte, error) {
12938	objectMap := make(map[string]interface{})
12939	if vngc.VirtualNetworkGatewayConnectionPropertiesFormat != nil {
12940		objectMap["properties"] = vngc.VirtualNetworkGatewayConnectionPropertiesFormat
12941	}
12942	if vngc.Etag != nil {
12943		objectMap["etag"] = vngc.Etag
12944	}
12945	if vngc.ID != nil {
12946		objectMap["id"] = vngc.ID
12947	}
12948	if vngc.Location != nil {
12949		objectMap["location"] = vngc.Location
12950	}
12951	if vngc.Tags != nil {
12952		objectMap["tags"] = vngc.Tags
12953	}
12954	return json.Marshal(objectMap)
12955}
12956
12957// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnection struct.
12958func (vngc *VirtualNetworkGatewayConnection) UnmarshalJSON(body []byte) error {
12959	var m map[string]*json.RawMessage
12960	err := json.Unmarshal(body, &m)
12961	if err != nil {
12962		return err
12963	}
12964	for k, v := range m {
12965		switch k {
12966		case "properties":
12967			if v != nil {
12968				var virtualNetworkGatewayConnectionPropertiesFormat VirtualNetworkGatewayConnectionPropertiesFormat
12969				err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionPropertiesFormat)
12970				if err != nil {
12971					return err
12972				}
12973				vngc.VirtualNetworkGatewayConnectionPropertiesFormat = &virtualNetworkGatewayConnectionPropertiesFormat
12974			}
12975		case "etag":
12976			if v != nil {
12977				var etag string
12978				err = json.Unmarshal(*v, &etag)
12979				if err != nil {
12980					return err
12981				}
12982				vngc.Etag = &etag
12983			}
12984		case "id":
12985			if v != nil {
12986				var ID string
12987				err = json.Unmarshal(*v, &ID)
12988				if err != nil {
12989					return err
12990				}
12991				vngc.ID = &ID
12992			}
12993		case "name":
12994			if v != nil {
12995				var name string
12996				err = json.Unmarshal(*v, &name)
12997				if err != nil {
12998					return err
12999				}
13000				vngc.Name = &name
13001			}
13002		case "type":
13003			if v != nil {
13004				var typeVar string
13005				err = json.Unmarshal(*v, &typeVar)
13006				if err != nil {
13007					return err
13008				}
13009				vngc.Type = &typeVar
13010			}
13011		case "location":
13012			if v != nil {
13013				var location string
13014				err = json.Unmarshal(*v, &location)
13015				if err != nil {
13016					return err
13017				}
13018				vngc.Location = &location
13019			}
13020		case "tags":
13021			if v != nil {
13022				var tags map[string]*string
13023				err = json.Unmarshal(*v, &tags)
13024				if err != nil {
13025					return err
13026				}
13027				vngc.Tags = tags
13028			}
13029		}
13030	}
13031
13032	return nil
13033}
13034
13035// VirtualNetworkGatewayConnectionListEntity a common class for general resource information
13036type VirtualNetworkGatewayConnectionListEntity struct {
13037	autorest.Response `json:"-"`
13038	// VirtualNetworkGatewayConnectionListEntityPropertiesFormat - Properties of the virtual network gateway connection.
13039	*VirtualNetworkGatewayConnectionListEntityPropertiesFormat `json:"properties,omitempty"`
13040	// Etag - Gets a unique read-only string that changes whenever the resource is updated.
13041	Etag *string `json:"etag,omitempty"`
13042	// ID - Resource ID.
13043	ID *string `json:"id,omitempty"`
13044	// Name - READ-ONLY; Resource name.
13045	Name *string `json:"name,omitempty"`
13046	// Type - READ-ONLY; Resource type.
13047	Type *string `json:"type,omitempty"`
13048	// Location - Resource location.
13049	Location *string `json:"location,omitempty"`
13050	// Tags - Resource tags.
13051	Tags map[string]*string `json:"tags"`
13052}
13053
13054// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListEntity.
13055func (vngcle VirtualNetworkGatewayConnectionListEntity) MarshalJSON() ([]byte, error) {
13056	objectMap := make(map[string]interface{})
13057	if vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat != nil {
13058		objectMap["properties"] = vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat
13059	}
13060	if vngcle.Etag != nil {
13061		objectMap["etag"] = vngcle.Etag
13062	}
13063	if vngcle.ID != nil {
13064		objectMap["id"] = vngcle.ID
13065	}
13066	if vngcle.Location != nil {
13067		objectMap["location"] = vngcle.Location
13068	}
13069	if vngcle.Tags != nil {
13070		objectMap["tags"] = vngcle.Tags
13071	}
13072	return json.Marshal(objectMap)
13073}
13074
13075// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayConnectionListEntity struct.
13076func (vngcle *VirtualNetworkGatewayConnectionListEntity) UnmarshalJSON(body []byte) error {
13077	var m map[string]*json.RawMessage
13078	err := json.Unmarshal(body, &m)
13079	if err != nil {
13080		return err
13081	}
13082	for k, v := range m {
13083		switch k {
13084		case "properties":
13085			if v != nil {
13086				var virtualNetworkGatewayConnectionListEntityPropertiesFormat VirtualNetworkGatewayConnectionListEntityPropertiesFormat
13087				err = json.Unmarshal(*v, &virtualNetworkGatewayConnectionListEntityPropertiesFormat)
13088				if err != nil {
13089					return err
13090				}
13091				vngcle.VirtualNetworkGatewayConnectionListEntityPropertiesFormat = &virtualNetworkGatewayConnectionListEntityPropertiesFormat
13092			}
13093		case "etag":
13094			if v != nil {
13095				var etag string
13096				err = json.Unmarshal(*v, &etag)
13097				if err != nil {
13098					return err
13099				}
13100				vngcle.Etag = &etag
13101			}
13102		case "id":
13103			if v != nil {
13104				var ID string
13105				err = json.Unmarshal(*v, &ID)
13106				if err != nil {
13107					return err
13108				}
13109				vngcle.ID = &ID
13110			}
13111		case "name":
13112			if v != nil {
13113				var name string
13114				err = json.Unmarshal(*v, &name)
13115				if err != nil {
13116					return err
13117				}
13118				vngcle.Name = &name
13119			}
13120		case "type":
13121			if v != nil {
13122				var typeVar string
13123				err = json.Unmarshal(*v, &typeVar)
13124				if err != nil {
13125					return err
13126				}
13127				vngcle.Type = &typeVar
13128			}
13129		case "location":
13130			if v != nil {
13131				var location string
13132				err = json.Unmarshal(*v, &location)
13133				if err != nil {
13134					return err
13135				}
13136				vngcle.Location = &location
13137			}
13138		case "tags":
13139			if v != nil {
13140				var tags map[string]*string
13141				err = json.Unmarshal(*v, &tags)
13142				if err != nil {
13143					return err
13144				}
13145				vngcle.Tags = tags
13146			}
13147		}
13148	}
13149
13150	return nil
13151}
13152
13153// VirtualNetworkGatewayConnectionListEntityPropertiesFormat virtualNetworkGatewayConnection properties
13154type VirtualNetworkGatewayConnectionListEntityPropertiesFormat struct {
13155	// AuthorizationKey - The authorizationKey.
13156	AuthorizationKey *string `json:"authorizationKey,omitempty"`
13157	// VirtualNetworkGateway1 - The reference to virtual network gateway resource.
13158	VirtualNetworkGateway1 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway1,omitempty"`
13159	// VirtualNetworkGateway2 - The reference to virtual network gateway resource.
13160	VirtualNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway2,omitempty"`
13161	// LocalNetworkGateway2 - The reference to local network gateway resource.
13162	LocalNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"localNetworkGateway2,omitempty"`
13163	// ConnectionType - Gateway connection type. Possible values are: 'IPsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'
13164	ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"`
13165	// RoutingWeight - The routing weight.
13166	RoutingWeight *int32 `json:"routingWeight,omitempty"`
13167	// SharedKey - The IPSec shared key.
13168	SharedKey *string `json:"sharedKey,omitempty"`
13169	// ConnectionStatus - READ-ONLY; Virtual network Gateway connection status. Possible values are 'Unknown', 'Connecting', 'Connected' and 'NotConnected'. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
13170	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
13171	// TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status.
13172	TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"`
13173	// EgressBytesTransferred - READ-ONLY; The egress bytes transferred in this connection.
13174	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
13175	// IngressBytesTransferred - READ-ONLY; The ingress bytes transferred in this connection.
13176	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
13177	// Peer - The reference to peerings resource.
13178	Peer *SubResource `json:"peer,omitempty"`
13179	// EnableBgp - EnableBgp flag
13180	EnableBgp *bool `json:"enableBgp,omitempty"`
13181	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
13182	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
13183	// IpsecPolicies - The IPSec Policies to be considered by this connection.
13184	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
13185	// ResourceGUID - The resource GUID property of the VirtualNetworkGatewayConnection resource.
13186	ResourceGUID *string `json:"resourceGuid,omitempty"`
13187	// ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGatewayConnection resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
13188	ProvisioningState *string `json:"provisioningState,omitempty"`
13189}
13190
13191// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListEntityPropertiesFormat.
13192func (vngclepf VirtualNetworkGatewayConnectionListEntityPropertiesFormat) MarshalJSON() ([]byte, error) {
13193	objectMap := make(map[string]interface{})
13194	if vngclepf.AuthorizationKey != nil {
13195		objectMap["authorizationKey"] = vngclepf.AuthorizationKey
13196	}
13197	if vngclepf.VirtualNetworkGateway1 != nil {
13198		objectMap["virtualNetworkGateway1"] = vngclepf.VirtualNetworkGateway1
13199	}
13200	if vngclepf.VirtualNetworkGateway2 != nil {
13201		objectMap["virtualNetworkGateway2"] = vngclepf.VirtualNetworkGateway2
13202	}
13203	if vngclepf.LocalNetworkGateway2 != nil {
13204		objectMap["localNetworkGateway2"] = vngclepf.LocalNetworkGateway2
13205	}
13206	if vngclepf.ConnectionType != "" {
13207		objectMap["connectionType"] = vngclepf.ConnectionType
13208	}
13209	if vngclepf.RoutingWeight != nil {
13210		objectMap["routingWeight"] = vngclepf.RoutingWeight
13211	}
13212	if vngclepf.SharedKey != nil {
13213		objectMap["sharedKey"] = vngclepf.SharedKey
13214	}
13215	if vngclepf.Peer != nil {
13216		objectMap["peer"] = vngclepf.Peer
13217	}
13218	if vngclepf.EnableBgp != nil {
13219		objectMap["enableBgp"] = vngclepf.EnableBgp
13220	}
13221	if vngclepf.UsePolicyBasedTrafficSelectors != nil {
13222		objectMap["usePolicyBasedTrafficSelectors"] = vngclepf.UsePolicyBasedTrafficSelectors
13223	}
13224	if vngclepf.IpsecPolicies != nil {
13225		objectMap["ipsecPolicies"] = vngclepf.IpsecPolicies
13226	}
13227	if vngclepf.ResourceGUID != nil {
13228		objectMap["resourceGuid"] = vngclepf.ResourceGUID
13229	}
13230	return json.Marshal(objectMap)
13231}
13232
13233// VirtualNetworkGatewayConnectionListResult response for the ListVirtualNetworkGatewayConnections API
13234// service call
13235type VirtualNetworkGatewayConnectionListResult struct {
13236	autorest.Response `json:"-"`
13237	// Value - Gets a list of VirtualNetworkGatewayConnection resources that exists in a resource group.
13238	Value *[]VirtualNetworkGatewayConnection `json:"value,omitempty"`
13239	// NextLink - READ-ONLY; The URL to get the next set of results.
13240	NextLink *string `json:"nextLink,omitempty"`
13241}
13242
13243// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionListResult.
13244func (vngclr VirtualNetworkGatewayConnectionListResult) MarshalJSON() ([]byte, error) {
13245	objectMap := make(map[string]interface{})
13246	if vngclr.Value != nil {
13247		objectMap["value"] = vngclr.Value
13248	}
13249	return json.Marshal(objectMap)
13250}
13251
13252// VirtualNetworkGatewayConnectionListResultIterator provides access to a complete listing of
13253// VirtualNetworkGatewayConnection values.
13254type VirtualNetworkGatewayConnectionListResultIterator struct {
13255	i    int
13256	page VirtualNetworkGatewayConnectionListResultPage
13257}
13258
13259// NextWithContext advances to the next value.  If there was an error making
13260// the request the iterator does not advance and the error is returned.
13261func (iter *VirtualNetworkGatewayConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
13262	if tracing.IsEnabled() {
13263		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultIterator.NextWithContext")
13264		defer func() {
13265			sc := -1
13266			if iter.Response().Response.Response != nil {
13267				sc = iter.Response().Response.Response.StatusCode
13268			}
13269			tracing.EndSpan(ctx, sc, err)
13270		}()
13271	}
13272	iter.i++
13273	if iter.i < len(iter.page.Values()) {
13274		return nil
13275	}
13276	err = iter.page.NextWithContext(ctx)
13277	if err != nil {
13278		iter.i--
13279		return err
13280	}
13281	iter.i = 0
13282	return nil
13283}
13284
13285// Next advances to the next value.  If there was an error making
13286// the request the iterator does not advance and the error is returned.
13287// Deprecated: Use NextWithContext() instead.
13288func (iter *VirtualNetworkGatewayConnectionListResultIterator) Next() error {
13289	return iter.NextWithContext(context.Background())
13290}
13291
13292// NotDone returns true if the enumeration should be started or is not yet complete.
13293func (iter VirtualNetworkGatewayConnectionListResultIterator) NotDone() bool {
13294	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13295}
13296
13297// Response returns the raw server response from the last page request.
13298func (iter VirtualNetworkGatewayConnectionListResultIterator) Response() VirtualNetworkGatewayConnectionListResult {
13299	return iter.page.Response()
13300}
13301
13302// Value returns the current value or a zero-initialized value if the
13303// iterator has advanced beyond the end of the collection.
13304func (iter VirtualNetworkGatewayConnectionListResultIterator) Value() VirtualNetworkGatewayConnection {
13305	if !iter.page.NotDone() {
13306		return VirtualNetworkGatewayConnection{}
13307	}
13308	return iter.page.Values()[iter.i]
13309}
13310
13311// Creates a new instance of the VirtualNetworkGatewayConnectionListResultIterator type.
13312func NewVirtualNetworkGatewayConnectionListResultIterator(page VirtualNetworkGatewayConnectionListResultPage) VirtualNetworkGatewayConnectionListResultIterator {
13313	return VirtualNetworkGatewayConnectionListResultIterator{page: page}
13314}
13315
13316// IsEmpty returns true if the ListResult contains no values.
13317func (vngclr VirtualNetworkGatewayConnectionListResult) IsEmpty() bool {
13318	return vngclr.Value == nil || len(*vngclr.Value) == 0
13319}
13320
13321// hasNextLink returns true if the NextLink is not empty.
13322func (vngclr VirtualNetworkGatewayConnectionListResult) hasNextLink() bool {
13323	return vngclr.NextLink != nil && len(*vngclr.NextLink) != 0
13324}
13325
13326// virtualNetworkGatewayConnectionListResultPreparer prepares a request to retrieve the next set of results.
13327// It returns nil if no more results exist.
13328func (vngclr VirtualNetworkGatewayConnectionListResult) virtualNetworkGatewayConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
13329	if !vngclr.hasNextLink() {
13330		return nil, nil
13331	}
13332	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13333		autorest.AsJSON(),
13334		autorest.AsGet(),
13335		autorest.WithBaseURL(to.String(vngclr.NextLink)))
13336}
13337
13338// VirtualNetworkGatewayConnectionListResultPage contains a page of VirtualNetworkGatewayConnection values.
13339type VirtualNetworkGatewayConnectionListResultPage struct {
13340	fn     func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)
13341	vngclr VirtualNetworkGatewayConnectionListResult
13342}
13343
13344// NextWithContext advances to the next page of values.  If there was an error making
13345// the request the page does not advance and the error is returned.
13346func (page *VirtualNetworkGatewayConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
13347	if tracing.IsEnabled() {
13348		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultPage.NextWithContext")
13349		defer func() {
13350			sc := -1
13351			if page.Response().Response.Response != nil {
13352				sc = page.Response().Response.Response.StatusCode
13353			}
13354			tracing.EndSpan(ctx, sc, err)
13355		}()
13356	}
13357	for {
13358		next, err := page.fn(ctx, page.vngclr)
13359		if err != nil {
13360			return err
13361		}
13362		page.vngclr = next
13363		if !next.hasNextLink() || !next.IsEmpty() {
13364			break
13365		}
13366	}
13367	return nil
13368}
13369
13370// Next advances to the next page of values.  If there was an error making
13371// the request the page does not advance and the error is returned.
13372// Deprecated: Use NextWithContext() instead.
13373func (page *VirtualNetworkGatewayConnectionListResultPage) Next() error {
13374	return page.NextWithContext(context.Background())
13375}
13376
13377// NotDone returns true if the page enumeration should be started or is not yet complete.
13378func (page VirtualNetworkGatewayConnectionListResultPage) NotDone() bool {
13379	return !page.vngclr.IsEmpty()
13380}
13381
13382// Response returns the raw server response from the last page request.
13383func (page VirtualNetworkGatewayConnectionListResultPage) Response() VirtualNetworkGatewayConnectionListResult {
13384	return page.vngclr
13385}
13386
13387// Values returns the slice of values for the current page or nil if there are no values.
13388func (page VirtualNetworkGatewayConnectionListResultPage) Values() []VirtualNetworkGatewayConnection {
13389	if page.vngclr.IsEmpty() {
13390		return nil
13391	}
13392	return *page.vngclr.Value
13393}
13394
13395// Creates a new instance of the VirtualNetworkGatewayConnectionListResultPage type.
13396func NewVirtualNetworkGatewayConnectionListResultPage(cur VirtualNetworkGatewayConnectionListResult, getNextPage func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)) VirtualNetworkGatewayConnectionListResultPage {
13397	return VirtualNetworkGatewayConnectionListResultPage{
13398		fn:     getNextPage,
13399		vngclr: cur,
13400	}
13401}
13402
13403// VirtualNetworkGatewayConnectionPropertiesFormat virtualNetworkGatewayConnection properties
13404type VirtualNetworkGatewayConnectionPropertiesFormat struct {
13405	// AuthorizationKey - The authorizationKey.
13406	AuthorizationKey *string `json:"authorizationKey,omitempty"`
13407	// VirtualNetworkGateway1 - The reference to virtual network gateway resource.
13408	VirtualNetworkGateway1 *VirtualNetworkGateway `json:"virtualNetworkGateway1,omitempty"`
13409	// VirtualNetworkGateway2 - The reference to virtual network gateway resource.
13410	VirtualNetworkGateway2 *VirtualNetworkGateway `json:"virtualNetworkGateway2,omitempty"`
13411	// LocalNetworkGateway2 - The reference to local network gateway resource.
13412	LocalNetworkGateway2 *LocalNetworkGateway `json:"localNetworkGateway2,omitempty"`
13413	// ConnectionType - Gateway connection type. Possible values are: 'IPsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient'
13414	ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"`
13415	// RoutingWeight - The routing weight.
13416	RoutingWeight *int32 `json:"routingWeight,omitempty"`
13417	// SharedKey - The IPSec shared key.
13418	SharedKey *string `json:"sharedKey,omitempty"`
13419	// ConnectionStatus - READ-ONLY; Virtual network Gateway connection status. Possible values are 'Unknown', 'Connecting', 'Connected' and 'NotConnected'. Possible values include: 'VirtualNetworkGatewayConnectionStatusUnknown', 'VirtualNetworkGatewayConnectionStatusConnecting', 'VirtualNetworkGatewayConnectionStatusConnected', 'VirtualNetworkGatewayConnectionStatusNotConnected'
13420	ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"`
13421	// TunnelConnectionStatus - READ-ONLY; Collection of all tunnels' connection health status.
13422	TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"`
13423	// EgressBytesTransferred - READ-ONLY; The egress bytes transferred in this connection.
13424	EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"`
13425	// IngressBytesTransferred - READ-ONLY; The ingress bytes transferred in this connection.
13426	IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"`
13427	// Peer - The reference to peerings resource.
13428	Peer *SubResource `json:"peer,omitempty"`
13429	// EnableBgp - EnableBgp flag
13430	EnableBgp *bool `json:"enableBgp,omitempty"`
13431	// UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors.
13432	UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"`
13433	// IpsecPolicies - The IPSec Policies to be considered by this connection.
13434	IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"`
13435	// ResourceGUID - The resource GUID property of the VirtualNetworkGatewayConnection resource.
13436	ResourceGUID *string `json:"resourceGuid,omitempty"`
13437	// ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGatewayConnection resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
13438	ProvisioningState *string `json:"provisioningState,omitempty"`
13439}
13440
13441// MarshalJSON is the custom marshaler for VirtualNetworkGatewayConnectionPropertiesFormat.
13442func (vngcpf VirtualNetworkGatewayConnectionPropertiesFormat) MarshalJSON() ([]byte, error) {
13443	objectMap := make(map[string]interface{})
13444	if vngcpf.AuthorizationKey != nil {
13445		objectMap["authorizationKey"] = vngcpf.AuthorizationKey
13446	}
13447	if vngcpf.VirtualNetworkGateway1 != nil {
13448		objectMap["virtualNetworkGateway1"] = vngcpf.VirtualNetworkGateway1
13449	}
13450	if vngcpf.VirtualNetworkGateway2 != nil {
13451		objectMap["virtualNetworkGateway2"] = vngcpf.VirtualNetworkGateway2
13452	}
13453	if vngcpf.LocalNetworkGateway2 != nil {
13454		objectMap["localNetworkGateway2"] = vngcpf.LocalNetworkGateway2
13455	}
13456	if vngcpf.ConnectionType != "" {
13457		objectMap["connectionType"] = vngcpf.ConnectionType
13458	}
13459	if vngcpf.RoutingWeight != nil {
13460		objectMap["routingWeight"] = vngcpf.RoutingWeight
13461	}
13462	if vngcpf.SharedKey != nil {
13463		objectMap["sharedKey"] = vngcpf.SharedKey
13464	}
13465	if vngcpf.Peer != nil {
13466		objectMap["peer"] = vngcpf.Peer
13467	}
13468	if vngcpf.EnableBgp != nil {
13469		objectMap["enableBgp"] = vngcpf.EnableBgp
13470	}
13471	if vngcpf.UsePolicyBasedTrafficSelectors != nil {
13472		objectMap["usePolicyBasedTrafficSelectors"] = vngcpf.UsePolicyBasedTrafficSelectors
13473	}
13474	if vngcpf.IpsecPolicies != nil {
13475		objectMap["ipsecPolicies"] = vngcpf.IpsecPolicies
13476	}
13477	if vngcpf.ResourceGUID != nil {
13478		objectMap["resourceGuid"] = vngcpf.ResourceGUID
13479	}
13480	return json.Marshal(objectMap)
13481}
13482
13483// VirtualNetworkGatewayConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
13484// results of a long-running operation.
13485type VirtualNetworkGatewayConnectionsCreateOrUpdateFuture struct {
13486	azure.FutureAPI
13487	// Result returns the result of the asynchronous operation.
13488	// If the operation has not completed it will return an error.
13489	Result func(VirtualNetworkGatewayConnectionsClient) (VirtualNetworkGatewayConnection, error)
13490}
13491
13492// VirtualNetworkGatewayConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of
13493// a long-running operation.
13494type VirtualNetworkGatewayConnectionsDeleteFuture struct {
13495	azure.FutureAPI
13496	// Result returns the result of the asynchronous operation.
13497	// If the operation has not completed it will return an error.
13498	Result func(VirtualNetworkGatewayConnectionsClient) (autorest.Response, error)
13499}
13500
13501// VirtualNetworkGatewayConnectionsResetSharedKeyFuture an abstraction for monitoring and retrieving the
13502// results of a long-running operation.
13503type VirtualNetworkGatewayConnectionsResetSharedKeyFuture struct {
13504	azure.FutureAPI
13505	// Result returns the result of the asynchronous operation.
13506	// If the operation has not completed it will return an error.
13507	Result func(VirtualNetworkGatewayConnectionsClient) (ConnectionResetSharedKey, error)
13508}
13509
13510// VirtualNetworkGatewayConnectionsSetSharedKeyFuture an abstraction for monitoring and retrieving the
13511// results of a long-running operation.
13512type VirtualNetworkGatewayConnectionsSetSharedKeyFuture struct {
13513	azure.FutureAPI
13514	// Result returns the result of the asynchronous operation.
13515	// If the operation has not completed it will return an error.
13516	Result func(VirtualNetworkGatewayConnectionsClient) (ConnectionSharedKey, error)
13517}
13518
13519// VirtualNetworkGatewayConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the
13520// results of a long-running operation.
13521type VirtualNetworkGatewayConnectionsUpdateTagsFuture struct {
13522	azure.FutureAPI
13523	// Result returns the result of the asynchronous operation.
13524	// If the operation has not completed it will return an error.
13525	Result func(VirtualNetworkGatewayConnectionsClient) (VirtualNetworkGatewayConnectionListEntity, error)
13526}
13527
13528// VirtualNetworkGatewayIPConfiguration IP configuration for virtual network gateway
13529type VirtualNetworkGatewayIPConfiguration struct {
13530	// VirtualNetworkGatewayIPConfigurationPropertiesFormat - Properties of the virtual network gateway ip configuration.
13531	*VirtualNetworkGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"`
13532	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
13533	Name *string `json:"name,omitempty"`
13534	// Etag - A unique read-only string that changes whenever the resource is updated.
13535	Etag *string `json:"etag,omitempty"`
13536	// ID - Resource ID.
13537	ID *string `json:"id,omitempty"`
13538}
13539
13540// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfiguration.
13541func (vngic VirtualNetworkGatewayIPConfiguration) MarshalJSON() ([]byte, error) {
13542	objectMap := make(map[string]interface{})
13543	if vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat != nil {
13544		objectMap["properties"] = vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat
13545	}
13546	if vngic.Name != nil {
13547		objectMap["name"] = vngic.Name
13548	}
13549	if vngic.Etag != nil {
13550		objectMap["etag"] = vngic.Etag
13551	}
13552	if vngic.ID != nil {
13553		objectMap["id"] = vngic.ID
13554	}
13555	return json.Marshal(objectMap)
13556}
13557
13558// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayIPConfiguration struct.
13559func (vngic *VirtualNetworkGatewayIPConfiguration) UnmarshalJSON(body []byte) error {
13560	var m map[string]*json.RawMessage
13561	err := json.Unmarshal(body, &m)
13562	if err != nil {
13563		return err
13564	}
13565	for k, v := range m {
13566		switch k {
13567		case "properties":
13568			if v != nil {
13569				var virtualNetworkGatewayIPConfigurationPropertiesFormat VirtualNetworkGatewayIPConfigurationPropertiesFormat
13570				err = json.Unmarshal(*v, &virtualNetworkGatewayIPConfigurationPropertiesFormat)
13571				if err != nil {
13572					return err
13573				}
13574				vngic.VirtualNetworkGatewayIPConfigurationPropertiesFormat = &virtualNetworkGatewayIPConfigurationPropertiesFormat
13575			}
13576		case "name":
13577			if v != nil {
13578				var name string
13579				err = json.Unmarshal(*v, &name)
13580				if err != nil {
13581					return err
13582				}
13583				vngic.Name = &name
13584			}
13585		case "etag":
13586			if v != nil {
13587				var etag string
13588				err = json.Unmarshal(*v, &etag)
13589				if err != nil {
13590					return err
13591				}
13592				vngic.Etag = &etag
13593			}
13594		case "id":
13595			if v != nil {
13596				var ID string
13597				err = json.Unmarshal(*v, &ID)
13598				if err != nil {
13599					return err
13600				}
13601				vngic.ID = &ID
13602			}
13603		}
13604	}
13605
13606	return nil
13607}
13608
13609// VirtualNetworkGatewayIPConfigurationPropertiesFormat properties of VirtualNetworkGatewayIPConfiguration
13610type VirtualNetworkGatewayIPConfigurationPropertiesFormat struct {
13611	// PrivateIPAllocationMethod - The private IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
13612	PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"`
13613	// Subnet - The reference of the subnet resource.
13614	Subnet *SubResource `json:"subnet,omitempty"`
13615	// PublicIPAddress - The reference of the public IP resource.
13616	PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
13617	// ProvisioningState - READ-ONLY; The provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
13618	ProvisioningState *string `json:"provisioningState,omitempty"`
13619}
13620
13621// MarshalJSON is the custom marshaler for VirtualNetworkGatewayIPConfigurationPropertiesFormat.
13622func (vngicpf VirtualNetworkGatewayIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
13623	objectMap := make(map[string]interface{})
13624	if vngicpf.PrivateIPAllocationMethod != "" {
13625		objectMap["privateIPAllocationMethod"] = vngicpf.PrivateIPAllocationMethod
13626	}
13627	if vngicpf.Subnet != nil {
13628		objectMap["subnet"] = vngicpf.Subnet
13629	}
13630	if vngicpf.PublicIPAddress != nil {
13631		objectMap["publicIPAddress"] = vngicpf.PublicIPAddress
13632	}
13633	return json.Marshal(objectMap)
13634}
13635
13636// VirtualNetworkGatewayListConnectionsResult response for the VirtualNetworkGatewayListConnections API
13637// service call
13638type VirtualNetworkGatewayListConnectionsResult struct {
13639	autorest.Response `json:"-"`
13640	// Value - Gets a list of VirtualNetworkGatewayConnection resources that exists in a resource group.
13641	Value *[]VirtualNetworkGatewayConnectionListEntity `json:"value,omitempty"`
13642	// NextLink - READ-ONLY; The URL to get the next set of results.
13643	NextLink *string `json:"nextLink,omitempty"`
13644}
13645
13646// MarshalJSON is the custom marshaler for VirtualNetworkGatewayListConnectionsResult.
13647func (vnglcr VirtualNetworkGatewayListConnectionsResult) MarshalJSON() ([]byte, error) {
13648	objectMap := make(map[string]interface{})
13649	if vnglcr.Value != nil {
13650		objectMap["value"] = vnglcr.Value
13651	}
13652	return json.Marshal(objectMap)
13653}
13654
13655// VirtualNetworkGatewayListConnectionsResultIterator provides access to a complete listing of
13656// VirtualNetworkGatewayConnectionListEntity values.
13657type VirtualNetworkGatewayListConnectionsResultIterator struct {
13658	i    int
13659	page VirtualNetworkGatewayListConnectionsResultPage
13660}
13661
13662// NextWithContext advances to the next value.  If there was an error making
13663// the request the iterator does not advance and the error is returned.
13664func (iter *VirtualNetworkGatewayListConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
13665	if tracing.IsEnabled() {
13666		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultIterator.NextWithContext")
13667		defer func() {
13668			sc := -1
13669			if iter.Response().Response.Response != nil {
13670				sc = iter.Response().Response.Response.StatusCode
13671			}
13672			tracing.EndSpan(ctx, sc, err)
13673		}()
13674	}
13675	iter.i++
13676	if iter.i < len(iter.page.Values()) {
13677		return nil
13678	}
13679	err = iter.page.NextWithContext(ctx)
13680	if err != nil {
13681		iter.i--
13682		return err
13683	}
13684	iter.i = 0
13685	return nil
13686}
13687
13688// Next advances to the next value.  If there was an error making
13689// the request the iterator does not advance and the error is returned.
13690// Deprecated: Use NextWithContext() instead.
13691func (iter *VirtualNetworkGatewayListConnectionsResultIterator) Next() error {
13692	return iter.NextWithContext(context.Background())
13693}
13694
13695// NotDone returns true if the enumeration should be started or is not yet complete.
13696func (iter VirtualNetworkGatewayListConnectionsResultIterator) NotDone() bool {
13697	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13698}
13699
13700// Response returns the raw server response from the last page request.
13701func (iter VirtualNetworkGatewayListConnectionsResultIterator) Response() VirtualNetworkGatewayListConnectionsResult {
13702	return iter.page.Response()
13703}
13704
13705// Value returns the current value or a zero-initialized value if the
13706// iterator has advanced beyond the end of the collection.
13707func (iter VirtualNetworkGatewayListConnectionsResultIterator) Value() VirtualNetworkGatewayConnectionListEntity {
13708	if !iter.page.NotDone() {
13709		return VirtualNetworkGatewayConnectionListEntity{}
13710	}
13711	return iter.page.Values()[iter.i]
13712}
13713
13714// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultIterator type.
13715func NewVirtualNetworkGatewayListConnectionsResultIterator(page VirtualNetworkGatewayListConnectionsResultPage) VirtualNetworkGatewayListConnectionsResultIterator {
13716	return VirtualNetworkGatewayListConnectionsResultIterator{page: page}
13717}
13718
13719// IsEmpty returns true if the ListResult contains no values.
13720func (vnglcr VirtualNetworkGatewayListConnectionsResult) IsEmpty() bool {
13721	return vnglcr.Value == nil || len(*vnglcr.Value) == 0
13722}
13723
13724// hasNextLink returns true if the NextLink is not empty.
13725func (vnglcr VirtualNetworkGatewayListConnectionsResult) hasNextLink() bool {
13726	return vnglcr.NextLink != nil && len(*vnglcr.NextLink) != 0
13727}
13728
13729// virtualNetworkGatewayListConnectionsResultPreparer prepares a request to retrieve the next set of results.
13730// It returns nil if no more results exist.
13731func (vnglcr VirtualNetworkGatewayListConnectionsResult) virtualNetworkGatewayListConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
13732	if !vnglcr.hasNextLink() {
13733		return nil, nil
13734	}
13735	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13736		autorest.AsJSON(),
13737		autorest.AsGet(),
13738		autorest.WithBaseURL(to.String(vnglcr.NextLink)))
13739}
13740
13741// VirtualNetworkGatewayListConnectionsResultPage contains a page of
13742// VirtualNetworkGatewayConnectionListEntity values.
13743type VirtualNetworkGatewayListConnectionsResultPage struct {
13744	fn     func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)
13745	vnglcr VirtualNetworkGatewayListConnectionsResult
13746}
13747
13748// NextWithContext advances to the next page of values.  If there was an error making
13749// the request the page does not advance and the error is returned.
13750func (page *VirtualNetworkGatewayListConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
13751	if tracing.IsEnabled() {
13752		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultPage.NextWithContext")
13753		defer func() {
13754			sc := -1
13755			if page.Response().Response.Response != nil {
13756				sc = page.Response().Response.Response.StatusCode
13757			}
13758			tracing.EndSpan(ctx, sc, err)
13759		}()
13760	}
13761	for {
13762		next, err := page.fn(ctx, page.vnglcr)
13763		if err != nil {
13764			return err
13765		}
13766		page.vnglcr = next
13767		if !next.hasNextLink() || !next.IsEmpty() {
13768			break
13769		}
13770	}
13771	return nil
13772}
13773
13774// Next advances to the next page of values.  If there was an error making
13775// the request the page does not advance and the error is returned.
13776// Deprecated: Use NextWithContext() instead.
13777func (page *VirtualNetworkGatewayListConnectionsResultPage) Next() error {
13778	return page.NextWithContext(context.Background())
13779}
13780
13781// NotDone returns true if the page enumeration should be started or is not yet complete.
13782func (page VirtualNetworkGatewayListConnectionsResultPage) NotDone() bool {
13783	return !page.vnglcr.IsEmpty()
13784}
13785
13786// Response returns the raw server response from the last page request.
13787func (page VirtualNetworkGatewayListConnectionsResultPage) Response() VirtualNetworkGatewayListConnectionsResult {
13788	return page.vnglcr
13789}
13790
13791// Values returns the slice of values for the current page or nil if there are no values.
13792func (page VirtualNetworkGatewayListConnectionsResultPage) Values() []VirtualNetworkGatewayConnectionListEntity {
13793	if page.vnglcr.IsEmpty() {
13794		return nil
13795	}
13796	return *page.vnglcr.Value
13797}
13798
13799// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultPage type.
13800func NewVirtualNetworkGatewayListConnectionsResultPage(cur VirtualNetworkGatewayListConnectionsResult, getNextPage func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)) VirtualNetworkGatewayListConnectionsResultPage {
13801	return VirtualNetworkGatewayListConnectionsResultPage{
13802		fn:     getNextPage,
13803		vnglcr: cur,
13804	}
13805}
13806
13807// VirtualNetworkGatewayListResult response for the ListVirtualNetworkGateways API service call.
13808type VirtualNetworkGatewayListResult struct {
13809	autorest.Response `json:"-"`
13810	// Value - Gets a list of VirtualNetworkGateway resources that exists in a resource group.
13811	Value *[]VirtualNetworkGateway `json:"value,omitempty"`
13812	// NextLink - READ-ONLY; The URL to get the next set of results.
13813	NextLink *string `json:"nextLink,omitempty"`
13814}
13815
13816// MarshalJSON is the custom marshaler for VirtualNetworkGatewayListResult.
13817func (vnglr VirtualNetworkGatewayListResult) MarshalJSON() ([]byte, error) {
13818	objectMap := make(map[string]interface{})
13819	if vnglr.Value != nil {
13820		objectMap["value"] = vnglr.Value
13821	}
13822	return json.Marshal(objectMap)
13823}
13824
13825// VirtualNetworkGatewayListResultIterator provides access to a complete listing of VirtualNetworkGateway
13826// values.
13827type VirtualNetworkGatewayListResultIterator struct {
13828	i    int
13829	page VirtualNetworkGatewayListResultPage
13830}
13831
13832// NextWithContext advances to the next value.  If there was an error making
13833// the request the iterator does not advance and the error is returned.
13834func (iter *VirtualNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
13835	if tracing.IsEnabled() {
13836		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultIterator.NextWithContext")
13837		defer func() {
13838			sc := -1
13839			if iter.Response().Response.Response != nil {
13840				sc = iter.Response().Response.Response.StatusCode
13841			}
13842			tracing.EndSpan(ctx, sc, err)
13843		}()
13844	}
13845	iter.i++
13846	if iter.i < len(iter.page.Values()) {
13847		return nil
13848	}
13849	err = iter.page.NextWithContext(ctx)
13850	if err != nil {
13851		iter.i--
13852		return err
13853	}
13854	iter.i = 0
13855	return nil
13856}
13857
13858// Next advances to the next value.  If there was an error making
13859// the request the iterator does not advance and the error is returned.
13860// Deprecated: Use NextWithContext() instead.
13861func (iter *VirtualNetworkGatewayListResultIterator) Next() error {
13862	return iter.NextWithContext(context.Background())
13863}
13864
13865// NotDone returns true if the enumeration should be started or is not yet complete.
13866func (iter VirtualNetworkGatewayListResultIterator) NotDone() bool {
13867	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13868}
13869
13870// Response returns the raw server response from the last page request.
13871func (iter VirtualNetworkGatewayListResultIterator) Response() VirtualNetworkGatewayListResult {
13872	return iter.page.Response()
13873}
13874
13875// Value returns the current value or a zero-initialized value if the
13876// iterator has advanced beyond the end of the collection.
13877func (iter VirtualNetworkGatewayListResultIterator) Value() VirtualNetworkGateway {
13878	if !iter.page.NotDone() {
13879		return VirtualNetworkGateway{}
13880	}
13881	return iter.page.Values()[iter.i]
13882}
13883
13884// Creates a new instance of the VirtualNetworkGatewayListResultIterator type.
13885func NewVirtualNetworkGatewayListResultIterator(page VirtualNetworkGatewayListResultPage) VirtualNetworkGatewayListResultIterator {
13886	return VirtualNetworkGatewayListResultIterator{page: page}
13887}
13888
13889// IsEmpty returns true if the ListResult contains no values.
13890func (vnglr VirtualNetworkGatewayListResult) IsEmpty() bool {
13891	return vnglr.Value == nil || len(*vnglr.Value) == 0
13892}
13893
13894// hasNextLink returns true if the NextLink is not empty.
13895func (vnglr VirtualNetworkGatewayListResult) hasNextLink() bool {
13896	return vnglr.NextLink != nil && len(*vnglr.NextLink) != 0
13897}
13898
13899// virtualNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results.
13900// It returns nil if no more results exist.
13901func (vnglr VirtualNetworkGatewayListResult) virtualNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
13902	if !vnglr.hasNextLink() {
13903		return nil, nil
13904	}
13905	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13906		autorest.AsJSON(),
13907		autorest.AsGet(),
13908		autorest.WithBaseURL(to.String(vnglr.NextLink)))
13909}
13910
13911// VirtualNetworkGatewayListResultPage contains a page of VirtualNetworkGateway values.
13912type VirtualNetworkGatewayListResultPage struct {
13913	fn    func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)
13914	vnglr VirtualNetworkGatewayListResult
13915}
13916
13917// NextWithContext advances to the next page of values.  If there was an error making
13918// the request the page does not advance and the error is returned.
13919func (page *VirtualNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
13920	if tracing.IsEnabled() {
13921		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultPage.NextWithContext")
13922		defer func() {
13923			sc := -1
13924			if page.Response().Response.Response != nil {
13925				sc = page.Response().Response.Response.StatusCode
13926			}
13927			tracing.EndSpan(ctx, sc, err)
13928		}()
13929	}
13930	for {
13931		next, err := page.fn(ctx, page.vnglr)
13932		if err != nil {
13933			return err
13934		}
13935		page.vnglr = next
13936		if !next.hasNextLink() || !next.IsEmpty() {
13937			break
13938		}
13939	}
13940	return nil
13941}
13942
13943// Next advances to the next page of values.  If there was an error making
13944// the request the page does not advance and the error is returned.
13945// Deprecated: Use NextWithContext() instead.
13946func (page *VirtualNetworkGatewayListResultPage) Next() error {
13947	return page.NextWithContext(context.Background())
13948}
13949
13950// NotDone returns true if the page enumeration should be started or is not yet complete.
13951func (page VirtualNetworkGatewayListResultPage) NotDone() bool {
13952	return !page.vnglr.IsEmpty()
13953}
13954
13955// Response returns the raw server response from the last page request.
13956func (page VirtualNetworkGatewayListResultPage) Response() VirtualNetworkGatewayListResult {
13957	return page.vnglr
13958}
13959
13960// Values returns the slice of values for the current page or nil if there are no values.
13961func (page VirtualNetworkGatewayListResultPage) Values() []VirtualNetworkGateway {
13962	if page.vnglr.IsEmpty() {
13963		return nil
13964	}
13965	return *page.vnglr.Value
13966}
13967
13968// Creates a new instance of the VirtualNetworkGatewayListResultPage type.
13969func NewVirtualNetworkGatewayListResultPage(cur VirtualNetworkGatewayListResult, getNextPage func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)) VirtualNetworkGatewayListResultPage {
13970	return VirtualNetworkGatewayListResultPage{
13971		fn:    getNextPage,
13972		vnglr: cur,
13973	}
13974}
13975
13976// VirtualNetworkGatewayPropertiesFormat virtualNetworkGateway properties
13977type VirtualNetworkGatewayPropertiesFormat struct {
13978	// IPConfigurations - IP configurations for virtual network gateway.
13979	IPConfigurations *[]VirtualNetworkGatewayIPConfiguration `json:"ipConfigurations,omitempty"`
13980	// GatewayType - The type of this virtual network gateway. Possible values are: 'Vpn' and 'ExpressRoute'. Possible values include: 'VirtualNetworkGatewayTypeVpn', 'VirtualNetworkGatewayTypeExpressRoute'
13981	GatewayType VirtualNetworkGatewayType `json:"gatewayType,omitempty"`
13982	// VpnType - The type of this virtual network gateway. Possible values are: 'PolicyBased' and 'RouteBased'. Possible values include: 'PolicyBased', 'RouteBased'
13983	VpnType VpnType `json:"vpnType,omitempty"`
13984	// EnableBgp - Whether BGP is enabled for this virtual network gateway or not.
13985	EnableBgp *bool `json:"enableBgp,omitempty"`
13986	// ActiveActive - ActiveActive flag
13987	ActiveActive *bool `json:"activeActive,omitempty"`
13988	// 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.
13989	GatewayDefaultSite *SubResource `json:"gatewayDefaultSite,omitempty"`
13990	// Sku - The reference of the VirtualNetworkGatewaySku resource which represents the SKU selected for Virtual network gateway.
13991	Sku *VirtualNetworkGatewaySku `json:"sku,omitempty"`
13992	// VpnClientConfiguration - The reference of the VpnClientConfiguration resource which represents the P2S VpnClient configurations.
13993	VpnClientConfiguration *VpnClientConfiguration `json:"vpnClientConfiguration,omitempty"`
13994	// BgpSettings - Virtual network gateway's BGP speaker settings.
13995	BgpSettings *BgpSettings `json:"bgpSettings,omitempty"`
13996	// ResourceGUID - The resource GUID property of the VirtualNetworkGateway resource.
13997	ResourceGUID *string `json:"resourceGuid,omitempty"`
13998	// ProvisioningState - READ-ONLY; The provisioning state of the VirtualNetworkGateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
13999	ProvisioningState *string `json:"provisioningState,omitempty"`
14000}
14001
14002// MarshalJSON is the custom marshaler for VirtualNetworkGatewayPropertiesFormat.
14003func (vngpf VirtualNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) {
14004	objectMap := make(map[string]interface{})
14005	if vngpf.IPConfigurations != nil {
14006		objectMap["ipConfigurations"] = vngpf.IPConfigurations
14007	}
14008	if vngpf.GatewayType != "" {
14009		objectMap["gatewayType"] = vngpf.GatewayType
14010	}
14011	if vngpf.VpnType != "" {
14012		objectMap["vpnType"] = vngpf.VpnType
14013	}
14014	if vngpf.EnableBgp != nil {
14015		objectMap["enableBgp"] = vngpf.EnableBgp
14016	}
14017	if vngpf.ActiveActive != nil {
14018		objectMap["activeActive"] = vngpf.ActiveActive
14019	}
14020	if vngpf.GatewayDefaultSite != nil {
14021		objectMap["gatewayDefaultSite"] = vngpf.GatewayDefaultSite
14022	}
14023	if vngpf.Sku != nil {
14024		objectMap["sku"] = vngpf.Sku
14025	}
14026	if vngpf.VpnClientConfiguration != nil {
14027		objectMap["vpnClientConfiguration"] = vngpf.VpnClientConfiguration
14028	}
14029	if vngpf.BgpSettings != nil {
14030		objectMap["bgpSettings"] = vngpf.BgpSettings
14031	}
14032	if vngpf.ResourceGUID != nil {
14033		objectMap["resourceGuid"] = vngpf.ResourceGUID
14034	}
14035	return json.Marshal(objectMap)
14036}
14037
14038// VirtualNetworkGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
14039// long-running operation.
14040type VirtualNetworkGatewaysCreateOrUpdateFuture struct {
14041	azure.FutureAPI
14042	// Result returns the result of the asynchronous operation.
14043	// If the operation has not completed it will return an error.
14044	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
14045}
14046
14047// VirtualNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
14048// long-running operation.
14049type VirtualNetworkGatewaysDeleteFuture struct {
14050	azure.FutureAPI
14051	// Result returns the result of the asynchronous operation.
14052	// If the operation has not completed it will return an error.
14053	Result func(VirtualNetworkGatewaysClient) (autorest.Response, error)
14054}
14055
14056// VirtualNetworkGatewaysGeneratevpnclientpackageFuture an abstraction for monitoring and retrieving the
14057// results of a long-running operation.
14058type VirtualNetworkGatewaysGeneratevpnclientpackageFuture struct {
14059	azure.FutureAPI
14060	// Result returns the result of the asynchronous operation.
14061	// If the operation has not completed it will return an error.
14062	Result func(VirtualNetworkGatewaysClient) (String, error)
14063}
14064
14065// VirtualNetworkGatewaysGenerateVpnProfileFuture an abstraction for monitoring and retrieving the results
14066// of a long-running operation.
14067type VirtualNetworkGatewaysGenerateVpnProfileFuture struct {
14068	azure.FutureAPI
14069	// Result returns the result of the asynchronous operation.
14070	// If the operation has not completed it will return an error.
14071	Result func(VirtualNetworkGatewaysClient) (String, error)
14072}
14073
14074// VirtualNetworkGatewaysGetAdvertisedRoutesFuture an abstraction for monitoring and retrieving the results
14075// of a long-running operation.
14076type VirtualNetworkGatewaysGetAdvertisedRoutesFuture struct {
14077	azure.FutureAPI
14078	// Result returns the result of the asynchronous operation.
14079	// If the operation has not completed it will return an error.
14080	Result func(VirtualNetworkGatewaysClient) (GatewayRouteListResult, error)
14081}
14082
14083// VirtualNetworkGatewaysGetBgpPeerStatusFuture an abstraction for monitoring and retrieving the results of
14084// a long-running operation.
14085type VirtualNetworkGatewaysGetBgpPeerStatusFuture struct {
14086	azure.FutureAPI
14087	// Result returns the result of the asynchronous operation.
14088	// If the operation has not completed it will return an error.
14089	Result func(VirtualNetworkGatewaysClient) (BgpPeerStatusListResult, error)
14090}
14091
14092// VirtualNetworkGatewaysGetLearnedRoutesFuture an abstraction for monitoring and retrieving the results of
14093// a long-running operation.
14094type VirtualNetworkGatewaysGetLearnedRoutesFuture struct {
14095	azure.FutureAPI
14096	// Result returns the result of the asynchronous operation.
14097	// If the operation has not completed it will return an error.
14098	Result func(VirtualNetworkGatewaysClient) (GatewayRouteListResult, error)
14099}
14100
14101// VirtualNetworkGatewaysGetVpnProfilePackageURLFuture an abstraction for monitoring and retrieving the
14102// results of a long-running operation.
14103type VirtualNetworkGatewaysGetVpnProfilePackageURLFuture struct {
14104	azure.FutureAPI
14105	// Result returns the result of the asynchronous operation.
14106	// If the operation has not completed it will return an error.
14107	Result func(VirtualNetworkGatewaysClient) (String, error)
14108}
14109
14110// VirtualNetworkGatewaySku virtualNetworkGatewaySku details
14111type VirtualNetworkGatewaySku struct {
14112	// Name - Gateway SKU name. Possible values include: 'VirtualNetworkGatewaySkuNameBasic', 'VirtualNetworkGatewaySkuNameHighPerformance', 'VirtualNetworkGatewaySkuNameStandard', 'VirtualNetworkGatewaySkuNameUltraPerformance', 'VirtualNetworkGatewaySkuNameVpnGw1', 'VirtualNetworkGatewaySkuNameVpnGw2', 'VirtualNetworkGatewaySkuNameVpnGw3'
14113	Name VirtualNetworkGatewaySkuName `json:"name,omitempty"`
14114	// Tier - Gateway SKU tier. Possible values include: 'VirtualNetworkGatewaySkuTierBasic', 'VirtualNetworkGatewaySkuTierHighPerformance', 'VirtualNetworkGatewaySkuTierStandard', 'VirtualNetworkGatewaySkuTierUltraPerformance', 'VirtualNetworkGatewaySkuTierVpnGw1', 'VirtualNetworkGatewaySkuTierVpnGw2', 'VirtualNetworkGatewaySkuTierVpnGw3'
14115	Tier VirtualNetworkGatewaySkuTier `json:"tier,omitempty"`
14116	// Capacity - The capacity.
14117	Capacity *int32 `json:"capacity,omitempty"`
14118}
14119
14120// VirtualNetworkGatewaysResetFuture an abstraction for monitoring and retrieving the results of a
14121// long-running operation.
14122type VirtualNetworkGatewaysResetFuture struct {
14123	azure.FutureAPI
14124	// Result returns the result of the asynchronous operation.
14125	// If the operation has not completed it will return an error.
14126	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
14127}
14128
14129// VirtualNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
14130// long-running operation.
14131type VirtualNetworkGatewaysUpdateTagsFuture struct {
14132	azure.FutureAPI
14133	// Result returns the result of the asynchronous operation.
14134	// If the operation has not completed it will return an error.
14135	Result func(VirtualNetworkGatewaysClient) (VirtualNetworkGateway, error)
14136}
14137
14138// VirtualNetworkListResult response for the ListVirtualNetworks API service call.
14139type VirtualNetworkListResult struct {
14140	autorest.Response `json:"-"`
14141	// Value - Gets a list of VirtualNetwork resources in a resource group.
14142	Value *[]VirtualNetwork `json:"value,omitempty"`
14143	// NextLink - The URL to get the next set of results.
14144	NextLink *string `json:"nextLink,omitempty"`
14145}
14146
14147// VirtualNetworkListResultIterator provides access to a complete listing of VirtualNetwork values.
14148type VirtualNetworkListResultIterator struct {
14149	i    int
14150	page VirtualNetworkListResultPage
14151}
14152
14153// NextWithContext advances to the next value.  If there was an error making
14154// the request the iterator does not advance and the error is returned.
14155func (iter *VirtualNetworkListResultIterator) NextWithContext(ctx context.Context) (err error) {
14156	if tracing.IsEnabled() {
14157		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultIterator.NextWithContext")
14158		defer func() {
14159			sc := -1
14160			if iter.Response().Response.Response != nil {
14161				sc = iter.Response().Response.Response.StatusCode
14162			}
14163			tracing.EndSpan(ctx, sc, err)
14164		}()
14165	}
14166	iter.i++
14167	if iter.i < len(iter.page.Values()) {
14168		return nil
14169	}
14170	err = iter.page.NextWithContext(ctx)
14171	if err != nil {
14172		iter.i--
14173		return err
14174	}
14175	iter.i = 0
14176	return nil
14177}
14178
14179// Next advances to the next value.  If there was an error making
14180// the request the iterator does not advance and the error is returned.
14181// Deprecated: Use NextWithContext() instead.
14182func (iter *VirtualNetworkListResultIterator) Next() error {
14183	return iter.NextWithContext(context.Background())
14184}
14185
14186// NotDone returns true if the enumeration should be started or is not yet complete.
14187func (iter VirtualNetworkListResultIterator) NotDone() bool {
14188	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14189}
14190
14191// Response returns the raw server response from the last page request.
14192func (iter VirtualNetworkListResultIterator) Response() VirtualNetworkListResult {
14193	return iter.page.Response()
14194}
14195
14196// Value returns the current value or a zero-initialized value if the
14197// iterator has advanced beyond the end of the collection.
14198func (iter VirtualNetworkListResultIterator) Value() VirtualNetwork {
14199	if !iter.page.NotDone() {
14200		return VirtualNetwork{}
14201	}
14202	return iter.page.Values()[iter.i]
14203}
14204
14205// Creates a new instance of the VirtualNetworkListResultIterator type.
14206func NewVirtualNetworkListResultIterator(page VirtualNetworkListResultPage) VirtualNetworkListResultIterator {
14207	return VirtualNetworkListResultIterator{page: page}
14208}
14209
14210// IsEmpty returns true if the ListResult contains no values.
14211func (vnlr VirtualNetworkListResult) IsEmpty() bool {
14212	return vnlr.Value == nil || len(*vnlr.Value) == 0
14213}
14214
14215// hasNextLink returns true if the NextLink is not empty.
14216func (vnlr VirtualNetworkListResult) hasNextLink() bool {
14217	return vnlr.NextLink != nil && len(*vnlr.NextLink) != 0
14218}
14219
14220// virtualNetworkListResultPreparer prepares a request to retrieve the next set of results.
14221// It returns nil if no more results exist.
14222func (vnlr VirtualNetworkListResult) virtualNetworkListResultPreparer(ctx context.Context) (*http.Request, error) {
14223	if !vnlr.hasNextLink() {
14224		return nil, nil
14225	}
14226	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14227		autorest.AsJSON(),
14228		autorest.AsGet(),
14229		autorest.WithBaseURL(to.String(vnlr.NextLink)))
14230}
14231
14232// VirtualNetworkListResultPage contains a page of VirtualNetwork values.
14233type VirtualNetworkListResultPage struct {
14234	fn   func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)
14235	vnlr VirtualNetworkListResult
14236}
14237
14238// NextWithContext advances to the next page of values.  If there was an error making
14239// the request the page does not advance and the error is returned.
14240func (page *VirtualNetworkListResultPage) NextWithContext(ctx context.Context) (err error) {
14241	if tracing.IsEnabled() {
14242		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultPage.NextWithContext")
14243		defer func() {
14244			sc := -1
14245			if page.Response().Response.Response != nil {
14246				sc = page.Response().Response.Response.StatusCode
14247			}
14248			tracing.EndSpan(ctx, sc, err)
14249		}()
14250	}
14251	for {
14252		next, err := page.fn(ctx, page.vnlr)
14253		if err != nil {
14254			return err
14255		}
14256		page.vnlr = next
14257		if !next.hasNextLink() || !next.IsEmpty() {
14258			break
14259		}
14260	}
14261	return nil
14262}
14263
14264// Next advances to the next page of values.  If there was an error making
14265// the request the page does not advance and the error is returned.
14266// Deprecated: Use NextWithContext() instead.
14267func (page *VirtualNetworkListResultPage) Next() error {
14268	return page.NextWithContext(context.Background())
14269}
14270
14271// NotDone returns true if the page enumeration should be started or is not yet complete.
14272func (page VirtualNetworkListResultPage) NotDone() bool {
14273	return !page.vnlr.IsEmpty()
14274}
14275
14276// Response returns the raw server response from the last page request.
14277func (page VirtualNetworkListResultPage) Response() VirtualNetworkListResult {
14278	return page.vnlr
14279}
14280
14281// Values returns the slice of values for the current page or nil if there are no values.
14282func (page VirtualNetworkListResultPage) Values() []VirtualNetwork {
14283	if page.vnlr.IsEmpty() {
14284		return nil
14285	}
14286	return *page.vnlr.Value
14287}
14288
14289// Creates a new instance of the VirtualNetworkListResultPage type.
14290func NewVirtualNetworkListResultPage(cur VirtualNetworkListResult, getNextPage func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)) VirtualNetworkListResultPage {
14291	return VirtualNetworkListResultPage{
14292		fn:   getNextPage,
14293		vnlr: cur,
14294	}
14295}
14296
14297// VirtualNetworkListUsageResult response for the virtual networks GetUsage API service call.
14298type VirtualNetworkListUsageResult struct {
14299	autorest.Response `json:"-"`
14300	// Value - READ-ONLY; VirtualNetwork usage stats.
14301	Value *[]VirtualNetworkUsage `json:"value,omitempty"`
14302	// NextLink - The URL to get the next set of results.
14303	NextLink *string `json:"nextLink,omitempty"`
14304}
14305
14306// MarshalJSON is the custom marshaler for VirtualNetworkListUsageResult.
14307func (vnlur VirtualNetworkListUsageResult) MarshalJSON() ([]byte, error) {
14308	objectMap := make(map[string]interface{})
14309	if vnlur.NextLink != nil {
14310		objectMap["nextLink"] = vnlur.NextLink
14311	}
14312	return json.Marshal(objectMap)
14313}
14314
14315// VirtualNetworkListUsageResultIterator provides access to a complete listing of VirtualNetworkUsage
14316// values.
14317type VirtualNetworkListUsageResultIterator struct {
14318	i    int
14319	page VirtualNetworkListUsageResultPage
14320}
14321
14322// NextWithContext advances to the next value.  If there was an error making
14323// the request the iterator does not advance and the error is returned.
14324func (iter *VirtualNetworkListUsageResultIterator) NextWithContext(ctx context.Context) (err error) {
14325	if tracing.IsEnabled() {
14326		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultIterator.NextWithContext")
14327		defer func() {
14328			sc := -1
14329			if iter.Response().Response.Response != nil {
14330				sc = iter.Response().Response.Response.StatusCode
14331			}
14332			tracing.EndSpan(ctx, sc, err)
14333		}()
14334	}
14335	iter.i++
14336	if iter.i < len(iter.page.Values()) {
14337		return nil
14338	}
14339	err = iter.page.NextWithContext(ctx)
14340	if err != nil {
14341		iter.i--
14342		return err
14343	}
14344	iter.i = 0
14345	return nil
14346}
14347
14348// Next advances to the next value.  If there was an error making
14349// the request the iterator does not advance and the error is returned.
14350// Deprecated: Use NextWithContext() instead.
14351func (iter *VirtualNetworkListUsageResultIterator) Next() error {
14352	return iter.NextWithContext(context.Background())
14353}
14354
14355// NotDone returns true if the enumeration should be started or is not yet complete.
14356func (iter VirtualNetworkListUsageResultIterator) NotDone() bool {
14357	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14358}
14359
14360// Response returns the raw server response from the last page request.
14361func (iter VirtualNetworkListUsageResultIterator) Response() VirtualNetworkListUsageResult {
14362	return iter.page.Response()
14363}
14364
14365// Value returns the current value or a zero-initialized value if the
14366// iterator has advanced beyond the end of the collection.
14367func (iter VirtualNetworkListUsageResultIterator) Value() VirtualNetworkUsage {
14368	if !iter.page.NotDone() {
14369		return VirtualNetworkUsage{}
14370	}
14371	return iter.page.Values()[iter.i]
14372}
14373
14374// Creates a new instance of the VirtualNetworkListUsageResultIterator type.
14375func NewVirtualNetworkListUsageResultIterator(page VirtualNetworkListUsageResultPage) VirtualNetworkListUsageResultIterator {
14376	return VirtualNetworkListUsageResultIterator{page: page}
14377}
14378
14379// IsEmpty returns true if the ListResult contains no values.
14380func (vnlur VirtualNetworkListUsageResult) IsEmpty() bool {
14381	return vnlur.Value == nil || len(*vnlur.Value) == 0
14382}
14383
14384// hasNextLink returns true if the NextLink is not empty.
14385func (vnlur VirtualNetworkListUsageResult) hasNextLink() bool {
14386	return vnlur.NextLink != nil && len(*vnlur.NextLink) != 0
14387}
14388
14389// virtualNetworkListUsageResultPreparer prepares a request to retrieve the next set of results.
14390// It returns nil if no more results exist.
14391func (vnlur VirtualNetworkListUsageResult) virtualNetworkListUsageResultPreparer(ctx context.Context) (*http.Request, error) {
14392	if !vnlur.hasNextLink() {
14393		return nil, nil
14394	}
14395	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14396		autorest.AsJSON(),
14397		autorest.AsGet(),
14398		autorest.WithBaseURL(to.String(vnlur.NextLink)))
14399}
14400
14401// VirtualNetworkListUsageResultPage contains a page of VirtualNetworkUsage values.
14402type VirtualNetworkListUsageResultPage struct {
14403	fn    func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)
14404	vnlur VirtualNetworkListUsageResult
14405}
14406
14407// NextWithContext advances to the next page of values.  If there was an error making
14408// the request the page does not advance and the error is returned.
14409func (page *VirtualNetworkListUsageResultPage) NextWithContext(ctx context.Context) (err error) {
14410	if tracing.IsEnabled() {
14411		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultPage.NextWithContext")
14412		defer func() {
14413			sc := -1
14414			if page.Response().Response.Response != nil {
14415				sc = page.Response().Response.Response.StatusCode
14416			}
14417			tracing.EndSpan(ctx, sc, err)
14418		}()
14419	}
14420	for {
14421		next, err := page.fn(ctx, page.vnlur)
14422		if err != nil {
14423			return err
14424		}
14425		page.vnlur = next
14426		if !next.hasNextLink() || !next.IsEmpty() {
14427			break
14428		}
14429	}
14430	return nil
14431}
14432
14433// Next advances to the next page of values.  If there was an error making
14434// the request the page does not advance and the error is returned.
14435// Deprecated: Use NextWithContext() instead.
14436func (page *VirtualNetworkListUsageResultPage) Next() error {
14437	return page.NextWithContext(context.Background())
14438}
14439
14440// NotDone returns true if the page enumeration should be started or is not yet complete.
14441func (page VirtualNetworkListUsageResultPage) NotDone() bool {
14442	return !page.vnlur.IsEmpty()
14443}
14444
14445// Response returns the raw server response from the last page request.
14446func (page VirtualNetworkListUsageResultPage) Response() VirtualNetworkListUsageResult {
14447	return page.vnlur
14448}
14449
14450// Values returns the slice of values for the current page or nil if there are no values.
14451func (page VirtualNetworkListUsageResultPage) Values() []VirtualNetworkUsage {
14452	if page.vnlur.IsEmpty() {
14453		return nil
14454	}
14455	return *page.vnlur.Value
14456}
14457
14458// Creates a new instance of the VirtualNetworkListUsageResultPage type.
14459func NewVirtualNetworkListUsageResultPage(cur VirtualNetworkListUsageResult, getNextPage func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)) VirtualNetworkListUsageResultPage {
14460	return VirtualNetworkListUsageResultPage{
14461		fn:    getNextPage,
14462		vnlur: cur,
14463	}
14464}
14465
14466// VirtualNetworkPeering peerings in a virtual network resource.
14467type VirtualNetworkPeering struct {
14468	autorest.Response `json:"-"`
14469	// VirtualNetworkPeeringPropertiesFormat - Properties of the virtual network peering.
14470	*VirtualNetworkPeeringPropertiesFormat `json:"properties,omitempty"`
14471	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
14472	Name *string `json:"name,omitempty"`
14473	// Etag - A unique read-only string that changes whenever the resource is updated.
14474	Etag *string `json:"etag,omitempty"`
14475	// ID - Resource ID.
14476	ID *string `json:"id,omitempty"`
14477}
14478
14479// MarshalJSON is the custom marshaler for VirtualNetworkPeering.
14480func (vnp VirtualNetworkPeering) MarshalJSON() ([]byte, error) {
14481	objectMap := make(map[string]interface{})
14482	if vnp.VirtualNetworkPeeringPropertiesFormat != nil {
14483		objectMap["properties"] = vnp.VirtualNetworkPeeringPropertiesFormat
14484	}
14485	if vnp.Name != nil {
14486		objectMap["name"] = vnp.Name
14487	}
14488	if vnp.Etag != nil {
14489		objectMap["etag"] = vnp.Etag
14490	}
14491	if vnp.ID != nil {
14492		objectMap["id"] = vnp.ID
14493	}
14494	return json.Marshal(objectMap)
14495}
14496
14497// UnmarshalJSON is the custom unmarshaler for VirtualNetworkPeering struct.
14498func (vnp *VirtualNetworkPeering) UnmarshalJSON(body []byte) error {
14499	var m map[string]*json.RawMessage
14500	err := json.Unmarshal(body, &m)
14501	if err != nil {
14502		return err
14503	}
14504	for k, v := range m {
14505		switch k {
14506		case "properties":
14507			if v != nil {
14508				var virtualNetworkPeeringPropertiesFormat VirtualNetworkPeeringPropertiesFormat
14509				err = json.Unmarshal(*v, &virtualNetworkPeeringPropertiesFormat)
14510				if err != nil {
14511					return err
14512				}
14513				vnp.VirtualNetworkPeeringPropertiesFormat = &virtualNetworkPeeringPropertiesFormat
14514			}
14515		case "name":
14516			if v != nil {
14517				var name string
14518				err = json.Unmarshal(*v, &name)
14519				if err != nil {
14520					return err
14521				}
14522				vnp.Name = &name
14523			}
14524		case "etag":
14525			if v != nil {
14526				var etag string
14527				err = json.Unmarshal(*v, &etag)
14528				if err != nil {
14529					return err
14530				}
14531				vnp.Etag = &etag
14532			}
14533		case "id":
14534			if v != nil {
14535				var ID string
14536				err = json.Unmarshal(*v, &ID)
14537				if err != nil {
14538					return err
14539				}
14540				vnp.ID = &ID
14541			}
14542		}
14543	}
14544
14545	return nil
14546}
14547
14548// VirtualNetworkPeeringListResult response for ListSubnets API service call. Retrieves all subnets that
14549// belong to a virtual network.
14550type VirtualNetworkPeeringListResult struct {
14551	autorest.Response `json:"-"`
14552	// Value - The peerings in a virtual network.
14553	Value *[]VirtualNetworkPeering `json:"value,omitempty"`
14554	// NextLink - The URL to get the next set of results.
14555	NextLink *string `json:"nextLink,omitempty"`
14556}
14557
14558// VirtualNetworkPeeringListResultIterator provides access to a complete listing of VirtualNetworkPeering
14559// values.
14560type VirtualNetworkPeeringListResultIterator struct {
14561	i    int
14562	page VirtualNetworkPeeringListResultPage
14563}
14564
14565// NextWithContext advances to the next value.  If there was an error making
14566// the request the iterator does not advance and the error is returned.
14567func (iter *VirtualNetworkPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
14568	if tracing.IsEnabled() {
14569		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultIterator.NextWithContext")
14570		defer func() {
14571			sc := -1
14572			if iter.Response().Response.Response != nil {
14573				sc = iter.Response().Response.Response.StatusCode
14574			}
14575			tracing.EndSpan(ctx, sc, err)
14576		}()
14577	}
14578	iter.i++
14579	if iter.i < len(iter.page.Values()) {
14580		return nil
14581	}
14582	err = iter.page.NextWithContext(ctx)
14583	if err != nil {
14584		iter.i--
14585		return err
14586	}
14587	iter.i = 0
14588	return nil
14589}
14590
14591// Next advances to the next value.  If there was an error making
14592// the request the iterator does not advance and the error is returned.
14593// Deprecated: Use NextWithContext() instead.
14594func (iter *VirtualNetworkPeeringListResultIterator) Next() error {
14595	return iter.NextWithContext(context.Background())
14596}
14597
14598// NotDone returns true if the enumeration should be started or is not yet complete.
14599func (iter VirtualNetworkPeeringListResultIterator) NotDone() bool {
14600	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14601}
14602
14603// Response returns the raw server response from the last page request.
14604func (iter VirtualNetworkPeeringListResultIterator) Response() VirtualNetworkPeeringListResult {
14605	return iter.page.Response()
14606}
14607
14608// Value returns the current value or a zero-initialized value if the
14609// iterator has advanced beyond the end of the collection.
14610func (iter VirtualNetworkPeeringListResultIterator) Value() VirtualNetworkPeering {
14611	if !iter.page.NotDone() {
14612		return VirtualNetworkPeering{}
14613	}
14614	return iter.page.Values()[iter.i]
14615}
14616
14617// Creates a new instance of the VirtualNetworkPeeringListResultIterator type.
14618func NewVirtualNetworkPeeringListResultIterator(page VirtualNetworkPeeringListResultPage) VirtualNetworkPeeringListResultIterator {
14619	return VirtualNetworkPeeringListResultIterator{page: page}
14620}
14621
14622// IsEmpty returns true if the ListResult contains no values.
14623func (vnplr VirtualNetworkPeeringListResult) IsEmpty() bool {
14624	return vnplr.Value == nil || len(*vnplr.Value) == 0
14625}
14626
14627// hasNextLink returns true if the NextLink is not empty.
14628func (vnplr VirtualNetworkPeeringListResult) hasNextLink() bool {
14629	return vnplr.NextLink != nil && len(*vnplr.NextLink) != 0
14630}
14631
14632// virtualNetworkPeeringListResultPreparer prepares a request to retrieve the next set of results.
14633// It returns nil if no more results exist.
14634func (vnplr VirtualNetworkPeeringListResult) virtualNetworkPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
14635	if !vnplr.hasNextLink() {
14636		return nil, nil
14637	}
14638	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14639		autorest.AsJSON(),
14640		autorest.AsGet(),
14641		autorest.WithBaseURL(to.String(vnplr.NextLink)))
14642}
14643
14644// VirtualNetworkPeeringListResultPage contains a page of VirtualNetworkPeering values.
14645type VirtualNetworkPeeringListResultPage struct {
14646	fn    func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)
14647	vnplr VirtualNetworkPeeringListResult
14648}
14649
14650// NextWithContext advances to the next page of values.  If there was an error making
14651// the request the page does not advance and the error is returned.
14652func (page *VirtualNetworkPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
14653	if tracing.IsEnabled() {
14654		ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultPage.NextWithContext")
14655		defer func() {
14656			sc := -1
14657			if page.Response().Response.Response != nil {
14658				sc = page.Response().Response.Response.StatusCode
14659			}
14660			tracing.EndSpan(ctx, sc, err)
14661		}()
14662	}
14663	for {
14664		next, err := page.fn(ctx, page.vnplr)
14665		if err != nil {
14666			return err
14667		}
14668		page.vnplr = next
14669		if !next.hasNextLink() || !next.IsEmpty() {
14670			break
14671		}
14672	}
14673	return nil
14674}
14675
14676// Next advances to the next page of values.  If there was an error making
14677// the request the page does not advance and the error is returned.
14678// Deprecated: Use NextWithContext() instead.
14679func (page *VirtualNetworkPeeringListResultPage) Next() error {
14680	return page.NextWithContext(context.Background())
14681}
14682
14683// NotDone returns true if the page enumeration should be started or is not yet complete.
14684func (page VirtualNetworkPeeringListResultPage) NotDone() bool {
14685	return !page.vnplr.IsEmpty()
14686}
14687
14688// Response returns the raw server response from the last page request.
14689func (page VirtualNetworkPeeringListResultPage) Response() VirtualNetworkPeeringListResult {
14690	return page.vnplr
14691}
14692
14693// Values returns the slice of values for the current page or nil if there are no values.
14694func (page VirtualNetworkPeeringListResultPage) Values() []VirtualNetworkPeering {
14695	if page.vnplr.IsEmpty() {
14696		return nil
14697	}
14698	return *page.vnplr.Value
14699}
14700
14701// Creates a new instance of the VirtualNetworkPeeringListResultPage type.
14702func NewVirtualNetworkPeeringListResultPage(cur VirtualNetworkPeeringListResult, getNextPage func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)) VirtualNetworkPeeringListResultPage {
14703	return VirtualNetworkPeeringListResultPage{
14704		fn:    getNextPage,
14705		vnplr: cur,
14706	}
14707}
14708
14709// VirtualNetworkPeeringPropertiesFormat properties of the virtual network peering.
14710type VirtualNetworkPeeringPropertiesFormat struct {
14711	// AllowVirtualNetworkAccess - Whether the VMs in the linked virtual network space would be able to access all the VMs in local Virtual network space.
14712	AllowVirtualNetworkAccess *bool `json:"allowVirtualNetworkAccess,omitempty"`
14713	// AllowForwardedTraffic - Whether the forwarded traffic from the VMs in the remote virtual network will be allowed/disallowed.
14714	AllowForwardedTraffic *bool `json:"allowForwardedTraffic,omitempty"`
14715	// AllowGatewayTransit - If gateway links can be used in remote virtual networking to link to this virtual network.
14716	AllowGatewayTransit *bool `json:"allowGatewayTransit,omitempty"`
14717	// 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.
14718	UseRemoteGateways *bool `json:"useRemoteGateways,omitempty"`
14719	// RemoteVirtualNetwork - The reference of the remote virtual network. The remote virtual network can be in the same or different region (preview). See here to register for the preview and learn more (https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-create-peering).
14720	RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"`
14721	// RemoteAddressSpace - The reference of the remote virtual network address space.
14722	RemoteAddressSpace *AddressSpace `json:"remoteAddressSpace,omitempty"`
14723	// PeeringState - The status of the virtual network peering. Possible values are 'Initiated', 'Connected', and 'Disconnected'. Possible values include: 'Initiated', 'Connected', 'Disconnected'
14724	PeeringState VirtualNetworkPeeringState `json:"peeringState,omitempty"`
14725	// ProvisioningState - The provisioning state of the resource.
14726	ProvisioningState *string `json:"provisioningState,omitempty"`
14727}
14728
14729// VirtualNetworkPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
14730// long-running operation.
14731type VirtualNetworkPeeringsCreateOrUpdateFuture struct {
14732	azure.FutureAPI
14733	// Result returns the result of the asynchronous operation.
14734	// If the operation has not completed it will return an error.
14735	Result func(VirtualNetworkPeeringsClient) (VirtualNetworkPeering, error)
14736}
14737
14738// VirtualNetworkPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
14739// long-running operation.
14740type VirtualNetworkPeeringsDeleteFuture struct {
14741	azure.FutureAPI
14742	// Result returns the result of the asynchronous operation.
14743	// If the operation has not completed it will return an error.
14744	Result func(VirtualNetworkPeeringsClient) (autorest.Response, error)
14745}
14746
14747// VirtualNetworkPropertiesFormat properties of the virtual network.
14748type VirtualNetworkPropertiesFormat struct {
14749	// AddressSpace - The AddressSpace that contains an array of IP address ranges that can be used by subnets.
14750	AddressSpace *AddressSpace `json:"addressSpace,omitempty"`
14751	// DhcpOptions - The dhcpOptions that contains an array of DNS servers available to VMs deployed in the virtual network.
14752	DhcpOptions *DhcpOptions `json:"dhcpOptions,omitempty"`
14753	// Subnets - A list of subnets in a Virtual Network.
14754	Subnets *[]Subnet `json:"subnets,omitempty"`
14755	// VirtualNetworkPeerings - A list of peerings in a Virtual Network.
14756	VirtualNetworkPeerings *[]VirtualNetworkPeering `json:"virtualNetworkPeerings,omitempty"`
14757	// ResourceGUID - The resourceGuid property of the Virtual Network resource.
14758	ResourceGUID *string `json:"resourceGuid,omitempty"`
14759	// ProvisioningState - The provisioning state of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
14760	ProvisioningState *string `json:"provisioningState,omitempty"`
14761	// EnableDdosProtection - Indicates if DDoS protection is enabled for all the protected resources in a Virtual Network.
14762	EnableDdosProtection *bool `json:"enableDdosProtection,omitempty"`
14763	// EnableVMProtection - Indicates if Vm protection is enabled for all the subnets in a Virtual Network.
14764	EnableVMProtection *bool `json:"enableVmProtection,omitempty"`
14765}
14766
14767// VirtualNetworksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
14768// long-running operation.
14769type VirtualNetworksCreateOrUpdateFuture struct {
14770	azure.FutureAPI
14771	// Result returns the result of the asynchronous operation.
14772	// If the operation has not completed it will return an error.
14773	Result func(VirtualNetworksClient) (VirtualNetwork, error)
14774}
14775
14776// VirtualNetworksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
14777// operation.
14778type VirtualNetworksDeleteFuture struct {
14779	azure.FutureAPI
14780	// Result returns the result of the asynchronous operation.
14781	// If the operation has not completed it will return an error.
14782	Result func(VirtualNetworksClient) (autorest.Response, error)
14783}
14784
14785// VirtualNetworksUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
14786// long-running operation.
14787type VirtualNetworksUpdateTagsFuture struct {
14788	azure.FutureAPI
14789	// Result returns the result of the asynchronous operation.
14790	// If the operation has not completed it will return an error.
14791	Result func(VirtualNetworksClient) (VirtualNetwork, error)
14792}
14793
14794// VirtualNetworkUsage usage details for subnet.
14795type VirtualNetworkUsage struct {
14796	// CurrentValue - READ-ONLY; Indicates number of IPs used from the Subnet.
14797	CurrentValue *float64 `json:"currentValue,omitempty"`
14798	// ID - READ-ONLY; Subnet identifier.
14799	ID *string `json:"id,omitempty"`
14800	// Limit - READ-ONLY; Indicates the size of the subnet.
14801	Limit *float64 `json:"limit,omitempty"`
14802	// Name - READ-ONLY; The name containing common and localized value for usage.
14803	Name *VirtualNetworkUsageName `json:"name,omitempty"`
14804	// Unit - READ-ONLY; Usage units. Returns 'Count'
14805	Unit *string `json:"unit,omitempty"`
14806}
14807
14808// VirtualNetworkUsageName usage strings container.
14809type VirtualNetworkUsageName struct {
14810	// LocalizedValue - READ-ONLY; Localized subnet size and usage string.
14811	LocalizedValue *string `json:"localizedValue,omitempty"`
14812	// Value - READ-ONLY; Subnet size and usage string.
14813	Value *string `json:"value,omitempty"`
14814}
14815
14816// VpnClientConfiguration vpnClientConfiguration for P2S client.
14817type VpnClientConfiguration struct {
14818	// VpnClientAddressPool - The reference of the address space resource which represents Address space for P2S VpnClient.
14819	VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"`
14820	// VpnClientRootCertificates - VpnClientRootCertificate for virtual network gateway.
14821	VpnClientRootCertificates *[]VpnClientRootCertificate `json:"vpnClientRootCertificates,omitempty"`
14822	// VpnClientRevokedCertificates - VpnClientRevokedCertificate for Virtual network gateway.
14823	VpnClientRevokedCertificates *[]VpnClientRevokedCertificate `json:"vpnClientRevokedCertificates,omitempty"`
14824	// VpnClientProtocols - VpnClientProtocols for Virtual network gateway.
14825	VpnClientProtocols *[]VpnClientProtocol `json:"vpnClientProtocols,omitempty"`
14826	// RadiusServerAddress - The radius server address property of the VirtualNetworkGateway resource for vpn client connection.
14827	RadiusServerAddress *string `json:"radiusServerAddress,omitempty"`
14828	// RadiusServerSecret - The radius secret property of the VirtualNetworkGateway resource for vpn client connection.
14829	RadiusServerSecret *string `json:"radiusServerSecret,omitempty"`
14830}
14831
14832// VpnClientParameters vpn Client Parameters for package generation
14833type VpnClientParameters struct {
14834	// ProcessorArchitecture - VPN client Processor Architecture. Possible values are: 'AMD64' and 'X86'. Possible values include: 'Amd64', 'X86'
14835	ProcessorArchitecture ProcessorArchitecture `json:"processorArchitecture,omitempty"`
14836	// AuthenticationMethod - VPN client Authentication Method. Possible values are: 'EAPTLS' and 'EAPMSCHAPv2'. Possible values include: 'EAPTLS', 'EAPMSCHAPv2'
14837	AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"`
14838	// 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.
14839	RadiusServerAuthCertificate *string `json:"radiusServerAuthCertificate,omitempty"`
14840	// ClientRootCertificates - A list of client root certificates public certificate data encoded as Base-64 strings. Optional parameter for external radius based authentication with EAPTLS.
14841	ClientRootCertificates *[]string `json:"clientRootCertificates,omitempty"`
14842}
14843
14844// VpnClientRevokedCertificate VPN client revoked certificate of virtual network gateway.
14845type VpnClientRevokedCertificate struct {
14846	// VpnClientRevokedCertificatePropertiesFormat - Properties of the vpn client revoked certificate.
14847	*VpnClientRevokedCertificatePropertiesFormat `json:"properties,omitempty"`
14848	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
14849	Name *string `json:"name,omitempty"`
14850	// Etag - A unique read-only string that changes whenever the resource is updated.
14851	Etag *string `json:"etag,omitempty"`
14852	// ID - Resource ID.
14853	ID *string `json:"id,omitempty"`
14854}
14855
14856// MarshalJSON is the custom marshaler for VpnClientRevokedCertificate.
14857func (vcrc VpnClientRevokedCertificate) MarshalJSON() ([]byte, error) {
14858	objectMap := make(map[string]interface{})
14859	if vcrc.VpnClientRevokedCertificatePropertiesFormat != nil {
14860		objectMap["properties"] = vcrc.VpnClientRevokedCertificatePropertiesFormat
14861	}
14862	if vcrc.Name != nil {
14863		objectMap["name"] = vcrc.Name
14864	}
14865	if vcrc.Etag != nil {
14866		objectMap["etag"] = vcrc.Etag
14867	}
14868	if vcrc.ID != nil {
14869		objectMap["id"] = vcrc.ID
14870	}
14871	return json.Marshal(objectMap)
14872}
14873
14874// UnmarshalJSON is the custom unmarshaler for VpnClientRevokedCertificate struct.
14875func (vcrc *VpnClientRevokedCertificate) UnmarshalJSON(body []byte) error {
14876	var m map[string]*json.RawMessage
14877	err := json.Unmarshal(body, &m)
14878	if err != nil {
14879		return err
14880	}
14881	for k, v := range m {
14882		switch k {
14883		case "properties":
14884			if v != nil {
14885				var vpnClientRevokedCertificatePropertiesFormat VpnClientRevokedCertificatePropertiesFormat
14886				err = json.Unmarshal(*v, &vpnClientRevokedCertificatePropertiesFormat)
14887				if err != nil {
14888					return err
14889				}
14890				vcrc.VpnClientRevokedCertificatePropertiesFormat = &vpnClientRevokedCertificatePropertiesFormat
14891			}
14892		case "name":
14893			if v != nil {
14894				var name string
14895				err = json.Unmarshal(*v, &name)
14896				if err != nil {
14897					return err
14898				}
14899				vcrc.Name = &name
14900			}
14901		case "etag":
14902			if v != nil {
14903				var etag string
14904				err = json.Unmarshal(*v, &etag)
14905				if err != nil {
14906					return err
14907				}
14908				vcrc.Etag = &etag
14909			}
14910		case "id":
14911			if v != nil {
14912				var ID string
14913				err = json.Unmarshal(*v, &ID)
14914				if err != nil {
14915					return err
14916				}
14917				vcrc.ID = &ID
14918			}
14919		}
14920	}
14921
14922	return nil
14923}
14924
14925// VpnClientRevokedCertificatePropertiesFormat properties of the revoked VPN client certificate of virtual
14926// network gateway.
14927type VpnClientRevokedCertificatePropertiesFormat struct {
14928	// Thumbprint - The revoked VPN client certificate thumbprint.
14929	Thumbprint *string `json:"thumbprint,omitempty"`
14930	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client revoked certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
14931	ProvisioningState *string `json:"provisioningState,omitempty"`
14932}
14933
14934// MarshalJSON is the custom marshaler for VpnClientRevokedCertificatePropertiesFormat.
14935func (vcrcpf VpnClientRevokedCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
14936	objectMap := make(map[string]interface{})
14937	if vcrcpf.Thumbprint != nil {
14938		objectMap["thumbprint"] = vcrcpf.Thumbprint
14939	}
14940	return json.Marshal(objectMap)
14941}
14942
14943// VpnClientRootCertificate VPN client root certificate of virtual network gateway
14944type VpnClientRootCertificate struct {
14945	// VpnClientRootCertificatePropertiesFormat - Properties of the vpn client root certificate.
14946	*VpnClientRootCertificatePropertiesFormat `json:"properties,omitempty"`
14947	// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
14948	Name *string `json:"name,omitempty"`
14949	// Etag - A unique read-only string that changes whenever the resource is updated.
14950	Etag *string `json:"etag,omitempty"`
14951	// ID - Resource ID.
14952	ID *string `json:"id,omitempty"`
14953}
14954
14955// MarshalJSON is the custom marshaler for VpnClientRootCertificate.
14956func (vcrc VpnClientRootCertificate) MarshalJSON() ([]byte, error) {
14957	objectMap := make(map[string]interface{})
14958	if vcrc.VpnClientRootCertificatePropertiesFormat != nil {
14959		objectMap["properties"] = vcrc.VpnClientRootCertificatePropertiesFormat
14960	}
14961	if vcrc.Name != nil {
14962		objectMap["name"] = vcrc.Name
14963	}
14964	if vcrc.Etag != nil {
14965		objectMap["etag"] = vcrc.Etag
14966	}
14967	if vcrc.ID != nil {
14968		objectMap["id"] = vcrc.ID
14969	}
14970	return json.Marshal(objectMap)
14971}
14972
14973// UnmarshalJSON is the custom unmarshaler for VpnClientRootCertificate struct.
14974func (vcrc *VpnClientRootCertificate) UnmarshalJSON(body []byte) error {
14975	var m map[string]*json.RawMessage
14976	err := json.Unmarshal(body, &m)
14977	if err != nil {
14978		return err
14979	}
14980	for k, v := range m {
14981		switch k {
14982		case "properties":
14983			if v != nil {
14984				var vpnClientRootCertificatePropertiesFormat VpnClientRootCertificatePropertiesFormat
14985				err = json.Unmarshal(*v, &vpnClientRootCertificatePropertiesFormat)
14986				if err != nil {
14987					return err
14988				}
14989				vcrc.VpnClientRootCertificatePropertiesFormat = &vpnClientRootCertificatePropertiesFormat
14990			}
14991		case "name":
14992			if v != nil {
14993				var name string
14994				err = json.Unmarshal(*v, &name)
14995				if err != nil {
14996					return err
14997				}
14998				vcrc.Name = &name
14999			}
15000		case "etag":
15001			if v != nil {
15002				var etag string
15003				err = json.Unmarshal(*v, &etag)
15004				if err != nil {
15005					return err
15006				}
15007				vcrc.Etag = &etag
15008			}
15009		case "id":
15010			if v != nil {
15011				var ID string
15012				err = json.Unmarshal(*v, &ID)
15013				if err != nil {
15014					return err
15015				}
15016				vcrc.ID = &ID
15017			}
15018		}
15019	}
15020
15021	return nil
15022}
15023
15024// VpnClientRootCertificatePropertiesFormat properties of SSL certificates of application gateway
15025type VpnClientRootCertificatePropertiesFormat struct {
15026	// PublicCertData - The certificate public data.
15027	PublicCertData *string `json:"publicCertData,omitempty"`
15028	// ProvisioningState - READ-ONLY; The provisioning state of the VPN client root certificate resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
15029	ProvisioningState *string `json:"provisioningState,omitempty"`
15030}
15031
15032// MarshalJSON is the custom marshaler for VpnClientRootCertificatePropertiesFormat.
15033func (vcrcpf VpnClientRootCertificatePropertiesFormat) MarshalJSON() ([]byte, error) {
15034	objectMap := make(map[string]interface{})
15035	if vcrcpf.PublicCertData != nil {
15036		objectMap["publicCertData"] = vcrcpf.PublicCertData
15037	}
15038	return json.Marshal(objectMap)
15039}
15040
15041// VpnDeviceScriptParameters vpn device configuration script generation parameters
15042type VpnDeviceScriptParameters struct {
15043	// Vendor - The vendor for the vpn device.
15044	Vendor *string `json:"vendor,omitempty"`
15045	// DeviceFamily - The device family for the vpn device.
15046	DeviceFamily *string `json:"deviceFamily,omitempty"`
15047	// FirmwareVersion - The firmware version for the vpn device.
15048	FirmwareVersion *string `json:"firmwareVersion,omitempty"`
15049}
15050
15051// Watcher network watcher in a resource group.
15052type Watcher struct {
15053	autorest.Response `json:"-"`
15054	// Etag - A unique read-only string that changes whenever the resource is updated.
15055	Etag                     *string `json:"etag,omitempty"`
15056	*WatcherPropertiesFormat `json:"properties,omitempty"`
15057	// ID - Resource ID.
15058	ID *string `json:"id,omitempty"`
15059	// Name - READ-ONLY; Resource name.
15060	Name *string `json:"name,omitempty"`
15061	// Type - READ-ONLY; Resource type.
15062	Type *string `json:"type,omitempty"`
15063	// Location - Resource location.
15064	Location *string `json:"location,omitempty"`
15065	// Tags - Resource tags.
15066	Tags map[string]*string `json:"tags"`
15067}
15068
15069// MarshalJSON is the custom marshaler for Watcher.
15070func (w Watcher) MarshalJSON() ([]byte, error) {
15071	objectMap := make(map[string]interface{})
15072	if w.Etag != nil {
15073		objectMap["etag"] = w.Etag
15074	}
15075	if w.WatcherPropertiesFormat != nil {
15076		objectMap["properties"] = w.WatcherPropertiesFormat
15077	}
15078	if w.ID != nil {
15079		objectMap["id"] = w.ID
15080	}
15081	if w.Location != nil {
15082		objectMap["location"] = w.Location
15083	}
15084	if w.Tags != nil {
15085		objectMap["tags"] = w.Tags
15086	}
15087	return json.Marshal(objectMap)
15088}
15089
15090// UnmarshalJSON is the custom unmarshaler for Watcher struct.
15091func (w *Watcher) UnmarshalJSON(body []byte) error {
15092	var m map[string]*json.RawMessage
15093	err := json.Unmarshal(body, &m)
15094	if err != nil {
15095		return err
15096	}
15097	for k, v := range m {
15098		switch k {
15099		case "etag":
15100			if v != nil {
15101				var etag string
15102				err = json.Unmarshal(*v, &etag)
15103				if err != nil {
15104					return err
15105				}
15106				w.Etag = &etag
15107			}
15108		case "properties":
15109			if v != nil {
15110				var watcherPropertiesFormat WatcherPropertiesFormat
15111				err = json.Unmarshal(*v, &watcherPropertiesFormat)
15112				if err != nil {
15113					return err
15114				}
15115				w.WatcherPropertiesFormat = &watcherPropertiesFormat
15116			}
15117		case "id":
15118			if v != nil {
15119				var ID string
15120				err = json.Unmarshal(*v, &ID)
15121				if err != nil {
15122					return err
15123				}
15124				w.ID = &ID
15125			}
15126		case "name":
15127			if v != nil {
15128				var name string
15129				err = json.Unmarshal(*v, &name)
15130				if err != nil {
15131					return err
15132				}
15133				w.Name = &name
15134			}
15135		case "type":
15136			if v != nil {
15137				var typeVar string
15138				err = json.Unmarshal(*v, &typeVar)
15139				if err != nil {
15140					return err
15141				}
15142				w.Type = &typeVar
15143			}
15144		case "location":
15145			if v != nil {
15146				var location string
15147				err = json.Unmarshal(*v, &location)
15148				if err != nil {
15149					return err
15150				}
15151				w.Location = &location
15152			}
15153		case "tags":
15154			if v != nil {
15155				var tags map[string]*string
15156				err = json.Unmarshal(*v, &tags)
15157				if err != nil {
15158					return err
15159				}
15160				w.Tags = tags
15161			}
15162		}
15163	}
15164
15165	return nil
15166}
15167
15168// WatcherListResult list of network watcher resources.
15169type WatcherListResult struct {
15170	autorest.Response `json:"-"`
15171	Value             *[]Watcher `json:"value,omitempty"`
15172}
15173
15174// WatcherPropertiesFormat the network watcher properties.
15175type WatcherPropertiesFormat struct {
15176	// ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
15177	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
15178}
15179
15180// WatchersCheckConnectivityFuture an abstraction for monitoring and retrieving the results of a
15181// long-running operation.
15182type WatchersCheckConnectivityFuture struct {
15183	azure.FutureAPI
15184	// Result returns the result of the asynchronous operation.
15185	// If the operation has not completed it will return an error.
15186	Result func(WatchersClient) (ConnectivityInformation, error)
15187}
15188
15189// WatchersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
15190// operation.
15191type WatchersDeleteFuture struct {
15192	azure.FutureAPI
15193	// Result returns the result of the asynchronous operation.
15194	// If the operation has not completed it will return an error.
15195	Result func(WatchersClient) (autorest.Response, error)
15196}
15197
15198// WatchersGetAzureReachabilityReportFuture an abstraction for monitoring and retrieving the results of a
15199// long-running operation.
15200type WatchersGetAzureReachabilityReportFuture struct {
15201	azure.FutureAPI
15202	// Result returns the result of the asynchronous operation.
15203	// If the operation has not completed it will return an error.
15204	Result func(WatchersClient) (AzureReachabilityReport, error)
15205}
15206
15207// WatchersGetFlowLogStatusFuture an abstraction for monitoring and retrieving the results of a
15208// long-running operation.
15209type WatchersGetFlowLogStatusFuture struct {
15210	azure.FutureAPI
15211	// Result returns the result of the asynchronous operation.
15212	// If the operation has not completed it will return an error.
15213	Result func(WatchersClient) (FlowLogInformation, error)
15214}
15215
15216// WatchersGetNextHopFuture an abstraction for monitoring and retrieving the results of a long-running
15217// operation.
15218type WatchersGetNextHopFuture struct {
15219	azure.FutureAPI
15220	// Result returns the result of the asynchronous operation.
15221	// If the operation has not completed it will return an error.
15222	Result func(WatchersClient) (NextHopResult, error)
15223}
15224
15225// WatchersGetTroubleshootingFuture an abstraction for monitoring and retrieving the results of a
15226// long-running operation.
15227type WatchersGetTroubleshootingFuture struct {
15228	azure.FutureAPI
15229	// Result returns the result of the asynchronous operation.
15230	// If the operation has not completed it will return an error.
15231	Result func(WatchersClient) (TroubleshootingResult, error)
15232}
15233
15234// WatchersGetTroubleshootingResultFuture an abstraction for monitoring and retrieving the results of a
15235// long-running operation.
15236type WatchersGetTroubleshootingResultFuture struct {
15237	azure.FutureAPI
15238	// Result returns the result of the asynchronous operation.
15239	// If the operation has not completed it will return an error.
15240	Result func(WatchersClient) (TroubleshootingResult, error)
15241}
15242
15243// WatchersGetVMSecurityRulesFuture an abstraction for monitoring and retrieving the results of a
15244// long-running operation.
15245type WatchersGetVMSecurityRulesFuture struct {
15246	azure.FutureAPI
15247	// Result returns the result of the asynchronous operation.
15248	// If the operation has not completed it will return an error.
15249	Result func(WatchersClient) (SecurityGroupViewResult, error)
15250}
15251
15252// WatchersListAvailableProvidersFuture an abstraction for monitoring and retrieving the results of a
15253// long-running operation.
15254type WatchersListAvailableProvidersFuture struct {
15255	azure.FutureAPI
15256	// Result returns the result of the asynchronous operation.
15257	// If the operation has not completed it will return an error.
15258	Result func(WatchersClient) (AvailableProvidersList, error)
15259}
15260
15261// WatchersSetFlowLogConfigurationFuture an abstraction for monitoring and retrieving the results of a
15262// long-running operation.
15263type WatchersSetFlowLogConfigurationFuture struct {
15264	azure.FutureAPI
15265	// Result returns the result of the asynchronous operation.
15266	// If the operation has not completed it will return an error.
15267	Result func(WatchersClient) (FlowLogInformation, error)
15268}
15269
15270// WatchersVerifyIPFlowFuture an abstraction for monitoring and retrieving the results of a long-running
15271// operation.
15272type WatchersVerifyIPFlowFuture struct {
15273	azure.FutureAPI
15274	// Result returns the result of the asynchronous operation.
15275	// If the operation has not completed it will return an error.
15276	Result func(WatchersClient) (VerificationIPFlowResult, error)
15277}
15278