1package web
2
3// Copyright (c) Microsoft Corporation. All rights reserved.
4// Licensed under the MIT License. See License.txt in the project root for license information.
5//
6// Code generated by Microsoft (R) AutoRest Code Generator.
7// Changes may cause incorrect behavior and will be lost if the code is regenerated.
8
9import (
10	"context"
11	"encoding/json"
12	"github.com/Azure/go-autorest/autorest"
13	"github.com/Azure/go-autorest/autorest/azure"
14	"github.com/Azure/go-autorest/autorest/date"
15	"github.com/Azure/go-autorest/autorest/to"
16	"github.com/Azure/go-autorest/tracing"
17	"github.com/gofrs/uuid"
18	"io"
19	"net/http"
20)
21
22// The package's fully qualified name.
23const fqdn = "github.com/Azure/azure-sdk-for-go/services/web/mgmt/2016-09-01/web"
24
25// AbnormalTimePeriod class representing Abnormal Time Period identified in diagnosis
26type AbnormalTimePeriod struct {
27	// StartTime - Start time of the downtime
28	StartTime *date.Time `json:"startTime,omitempty"`
29	// EndTime - End time of the downtime
30	EndTime *date.Time `json:"endTime,omitempty"`
31	// Events - List of Possible Cause of downtime
32	Events *[]DetectorAbnormalTimePeriod `json:"events,omitempty"`
33	// Solutions - List of proposed solutions
34	Solutions *[]Solution `json:"solutions,omitempty"`
35}
36
37// Address address information for domain registration.
38type Address struct {
39	// Address1 - First line of an Address.
40	Address1 *string `json:"address1,omitempty"`
41	// Address2 - The second line of the Address. Optional.
42	Address2 *string `json:"address2,omitempty"`
43	// City - The city for the address.
44	City *string `json:"city,omitempty"`
45	// Country - The country for the address.
46	Country *string `json:"country,omitempty"`
47	// PostalCode - The postal code for the address.
48	PostalCode *string `json:"postalCode,omitempty"`
49	// State - The state or province for the address.
50	State *string `json:"state,omitempty"`
51}
52
53// AddressResponse describes main public IP address and any extra virtual IPs.
54type AddressResponse struct {
55	autorest.Response `json:"-"`
56	// ServiceIPAddress - Main public virtual IP.
57	ServiceIPAddress *string `json:"serviceIpAddress,omitempty"`
58	// InternalIPAddress - Virtual Network internal IP address of the App Service Environment if it is in internal load-balancing mode.
59	InternalIPAddress *string `json:"internalIpAddress,omitempty"`
60	// OutboundIPAddresses - IP addresses appearing on outbound connections.
61	OutboundIPAddresses *[]string `json:"outboundIpAddresses,omitempty"`
62	// VipMappings - Additional virtual IPs.
63	VipMappings *[]VirtualIPMapping `json:"vipMappings,omitempty"`
64}
65
66// AnalysisData class Representing Detector Evidence used for analysis
67type AnalysisData struct {
68	// Source - Name of the Detector
69	Source *string `json:"source,omitempty"`
70	// DetectorDefinition - Detector Definition
71	DetectorDefinition *DetectorDefinition `json:"detectorDefinition,omitempty"`
72	// Metrics - Source Metrics
73	Metrics *[]DiagnosticMetricSet `json:"metrics,omitempty"`
74	// Data - Additional Source Data
75	Data *[][]NameValuePair `json:"data,omitempty"`
76	// DetectorMetaData - Detector Meta Data
77	DetectorMetaData *ResponseMetaData `json:"detectorMetaData,omitempty"`
78}
79
80// AnalysisDefinition definition of Analysis
81type AnalysisDefinition struct {
82	// AnalysisDefinitionProperties - AnalysisDefinition resource specific properties
83	*AnalysisDefinitionProperties `json:"properties,omitempty"`
84	// ID - READ-ONLY; Resource Id.
85	ID *string `json:"id,omitempty"`
86	// Name - READ-ONLY; Resource Name.
87	Name *string `json:"name,omitempty"`
88	// Kind - Kind of resource.
89	Kind *string `json:"kind,omitempty"`
90	// Type - READ-ONLY; Resource type.
91	Type *string `json:"type,omitempty"`
92}
93
94// MarshalJSON is the custom marshaler for AnalysisDefinition.
95func (ad AnalysisDefinition) MarshalJSON() ([]byte, error) {
96	objectMap := make(map[string]interface{})
97	if ad.AnalysisDefinitionProperties != nil {
98		objectMap["properties"] = ad.AnalysisDefinitionProperties
99	}
100	if ad.Kind != nil {
101		objectMap["kind"] = ad.Kind
102	}
103	return json.Marshal(objectMap)
104}
105
106// UnmarshalJSON is the custom unmarshaler for AnalysisDefinition struct.
107func (ad *AnalysisDefinition) UnmarshalJSON(body []byte) error {
108	var m map[string]*json.RawMessage
109	err := json.Unmarshal(body, &m)
110	if err != nil {
111		return err
112	}
113	for k, v := range m {
114		switch k {
115		case "properties":
116			if v != nil {
117				var analysisDefinitionProperties AnalysisDefinitionProperties
118				err = json.Unmarshal(*v, &analysisDefinitionProperties)
119				if err != nil {
120					return err
121				}
122				ad.AnalysisDefinitionProperties = &analysisDefinitionProperties
123			}
124		case "id":
125			if v != nil {
126				var ID string
127				err = json.Unmarshal(*v, &ID)
128				if err != nil {
129					return err
130				}
131				ad.ID = &ID
132			}
133		case "name":
134			if v != nil {
135				var name string
136				err = json.Unmarshal(*v, &name)
137				if err != nil {
138					return err
139				}
140				ad.Name = &name
141			}
142		case "kind":
143			if v != nil {
144				var kind string
145				err = json.Unmarshal(*v, &kind)
146				if err != nil {
147					return err
148				}
149				ad.Kind = &kind
150			}
151		case "type":
152			if v != nil {
153				var typeVar string
154				err = json.Unmarshal(*v, &typeVar)
155				if err != nil {
156					return err
157				}
158				ad.Type = &typeVar
159			}
160		}
161	}
162
163	return nil
164}
165
166// AnalysisDefinitionProperties analysisDefinition resource specific properties
167type AnalysisDefinitionProperties struct {
168	// Description - READ-ONLY; Description of the Analysis
169	Description *string `json:"description,omitempty"`
170}
171
172// MarshalJSON is the custom marshaler for AnalysisDefinitionProperties.
173func (ad AnalysisDefinitionProperties) MarshalJSON() ([]byte, error) {
174	objectMap := make(map[string]interface{})
175	return json.Marshal(objectMap)
176}
177
178// APIDefinitionInfo information about the formal API definition for the app.
179type APIDefinitionInfo struct {
180	// URL - The URL of the API definition.
181	URL *string `json:"url,omitempty"`
182}
183
184// AppCollection collection of App Service apps.
185type AppCollection struct {
186	autorest.Response `json:"-"`
187	// Value - Collection of resources.
188	Value *[]Site `json:"value,omitempty"`
189	// NextLink - READ-ONLY; Link to next page of resources.
190	NextLink *string `json:"nextLink,omitempty"`
191}
192
193// MarshalJSON is the custom marshaler for AppCollection.
194func (ac AppCollection) MarshalJSON() ([]byte, error) {
195	objectMap := make(map[string]interface{})
196	if ac.Value != nil {
197		objectMap["value"] = ac.Value
198	}
199	return json.Marshal(objectMap)
200}
201
202// AppCollectionIterator provides access to a complete listing of Site values.
203type AppCollectionIterator struct {
204	i    int
205	page AppCollectionPage
206}
207
208// NextWithContext advances to the next value.  If there was an error making
209// the request the iterator does not advance and the error is returned.
210func (iter *AppCollectionIterator) NextWithContext(ctx context.Context) (err error) {
211	if tracing.IsEnabled() {
212		ctx = tracing.StartSpan(ctx, fqdn+"/AppCollectionIterator.NextWithContext")
213		defer func() {
214			sc := -1
215			if iter.Response().Response.Response != nil {
216				sc = iter.Response().Response.Response.StatusCode
217			}
218			tracing.EndSpan(ctx, sc, err)
219		}()
220	}
221	iter.i++
222	if iter.i < len(iter.page.Values()) {
223		return nil
224	}
225	err = iter.page.NextWithContext(ctx)
226	if err != nil {
227		iter.i--
228		return err
229	}
230	iter.i = 0
231	return nil
232}
233
234// Next advances to the next value.  If there was an error making
235// the request the iterator does not advance and the error is returned.
236// Deprecated: Use NextWithContext() instead.
237func (iter *AppCollectionIterator) Next() error {
238	return iter.NextWithContext(context.Background())
239}
240
241// NotDone returns true if the enumeration should be started or is not yet complete.
242func (iter AppCollectionIterator) NotDone() bool {
243	return iter.page.NotDone() && iter.i < len(iter.page.Values())
244}
245
246// Response returns the raw server response from the last page request.
247func (iter AppCollectionIterator) Response() AppCollection {
248	return iter.page.Response()
249}
250
251// Value returns the current value or a zero-initialized value if the
252// iterator has advanced beyond the end of the collection.
253func (iter AppCollectionIterator) Value() Site {
254	if !iter.page.NotDone() {
255		return Site{}
256	}
257	return iter.page.Values()[iter.i]
258}
259
260// Creates a new instance of the AppCollectionIterator type.
261func NewAppCollectionIterator(page AppCollectionPage) AppCollectionIterator {
262	return AppCollectionIterator{page: page}
263}
264
265// IsEmpty returns true if the ListResult contains no values.
266func (ac AppCollection) IsEmpty() bool {
267	return ac.Value == nil || len(*ac.Value) == 0
268}
269
270// hasNextLink returns true if the NextLink is not empty.
271func (ac AppCollection) hasNextLink() bool {
272	return ac.NextLink != nil && len(*ac.NextLink) != 0
273}
274
275// appCollectionPreparer prepares a request to retrieve the next set of results.
276// It returns nil if no more results exist.
277func (ac AppCollection) appCollectionPreparer(ctx context.Context) (*http.Request, error) {
278	if !ac.hasNextLink() {
279		return nil, nil
280	}
281	return autorest.Prepare((&http.Request{}).WithContext(ctx),
282		autorest.AsJSON(),
283		autorest.AsGet(),
284		autorest.WithBaseURL(to.String(ac.NextLink)))
285}
286
287// AppCollectionPage contains a page of Site values.
288type AppCollectionPage struct {
289	fn func(context.Context, AppCollection) (AppCollection, error)
290	ac AppCollection
291}
292
293// NextWithContext advances to the next page of values.  If there was an error making
294// the request the page does not advance and the error is returned.
295func (page *AppCollectionPage) NextWithContext(ctx context.Context) (err error) {
296	if tracing.IsEnabled() {
297		ctx = tracing.StartSpan(ctx, fqdn+"/AppCollectionPage.NextWithContext")
298		defer func() {
299			sc := -1
300			if page.Response().Response.Response != nil {
301				sc = page.Response().Response.Response.StatusCode
302			}
303			tracing.EndSpan(ctx, sc, err)
304		}()
305	}
306	for {
307		next, err := page.fn(ctx, page.ac)
308		if err != nil {
309			return err
310		}
311		page.ac = next
312		if !next.hasNextLink() || !next.IsEmpty() {
313			break
314		}
315	}
316	return nil
317}
318
319// Next advances to the next page of values.  If there was an error making
320// the request the page does not advance and the error is returned.
321// Deprecated: Use NextWithContext() instead.
322func (page *AppCollectionPage) Next() error {
323	return page.NextWithContext(context.Background())
324}
325
326// NotDone returns true if the page enumeration should be started or is not yet complete.
327func (page AppCollectionPage) NotDone() bool {
328	return !page.ac.IsEmpty()
329}
330
331// Response returns the raw server response from the last page request.
332func (page AppCollectionPage) Response() AppCollection {
333	return page.ac
334}
335
336// Values returns the slice of values for the current page or nil if there are no values.
337func (page AppCollectionPage) Values() []Site {
338	if page.ac.IsEmpty() {
339		return nil
340	}
341	return *page.ac.Value
342}
343
344// Creates a new instance of the AppCollectionPage type.
345func NewAppCollectionPage(cur AppCollection, getNextPage func(context.Context, AppCollection) (AppCollection, error)) AppCollectionPage {
346	return AppCollectionPage{
347		fn: getNextPage,
348		ac: cur,
349	}
350}
351
352// AppInstanceCollection collection of app instances.
353type AppInstanceCollection struct {
354	autorest.Response `json:"-"`
355	// Value - Collection of resources.
356	Value *[]SiteInstance `json:"value,omitempty"`
357	// NextLink - READ-ONLY; Link to next page of resources.
358	NextLink *string `json:"nextLink,omitempty"`
359}
360
361// MarshalJSON is the custom marshaler for AppInstanceCollection.
362func (aic AppInstanceCollection) MarshalJSON() ([]byte, error) {
363	objectMap := make(map[string]interface{})
364	if aic.Value != nil {
365		objectMap["value"] = aic.Value
366	}
367	return json.Marshal(objectMap)
368}
369
370// AppInstanceCollectionIterator provides access to a complete listing of SiteInstance values.
371type AppInstanceCollectionIterator struct {
372	i    int
373	page AppInstanceCollectionPage
374}
375
376// NextWithContext advances to the next value.  If there was an error making
377// the request the iterator does not advance and the error is returned.
378func (iter *AppInstanceCollectionIterator) NextWithContext(ctx context.Context) (err error) {
379	if tracing.IsEnabled() {
380		ctx = tracing.StartSpan(ctx, fqdn+"/AppInstanceCollectionIterator.NextWithContext")
381		defer func() {
382			sc := -1
383			if iter.Response().Response.Response != nil {
384				sc = iter.Response().Response.Response.StatusCode
385			}
386			tracing.EndSpan(ctx, sc, err)
387		}()
388	}
389	iter.i++
390	if iter.i < len(iter.page.Values()) {
391		return nil
392	}
393	err = iter.page.NextWithContext(ctx)
394	if err != nil {
395		iter.i--
396		return err
397	}
398	iter.i = 0
399	return nil
400}
401
402// Next advances to the next value.  If there was an error making
403// the request the iterator does not advance and the error is returned.
404// Deprecated: Use NextWithContext() instead.
405func (iter *AppInstanceCollectionIterator) Next() error {
406	return iter.NextWithContext(context.Background())
407}
408
409// NotDone returns true if the enumeration should be started or is not yet complete.
410func (iter AppInstanceCollectionIterator) NotDone() bool {
411	return iter.page.NotDone() && iter.i < len(iter.page.Values())
412}
413
414// Response returns the raw server response from the last page request.
415func (iter AppInstanceCollectionIterator) Response() AppInstanceCollection {
416	return iter.page.Response()
417}
418
419// Value returns the current value or a zero-initialized value if the
420// iterator has advanced beyond the end of the collection.
421func (iter AppInstanceCollectionIterator) Value() SiteInstance {
422	if !iter.page.NotDone() {
423		return SiteInstance{}
424	}
425	return iter.page.Values()[iter.i]
426}
427
428// Creates a new instance of the AppInstanceCollectionIterator type.
429func NewAppInstanceCollectionIterator(page AppInstanceCollectionPage) AppInstanceCollectionIterator {
430	return AppInstanceCollectionIterator{page: page}
431}
432
433// IsEmpty returns true if the ListResult contains no values.
434func (aic AppInstanceCollection) IsEmpty() bool {
435	return aic.Value == nil || len(*aic.Value) == 0
436}
437
438// hasNextLink returns true if the NextLink is not empty.
439func (aic AppInstanceCollection) hasNextLink() bool {
440	return aic.NextLink != nil && len(*aic.NextLink) != 0
441}
442
443// appInstanceCollectionPreparer prepares a request to retrieve the next set of results.
444// It returns nil if no more results exist.
445func (aic AppInstanceCollection) appInstanceCollectionPreparer(ctx context.Context) (*http.Request, error) {
446	if !aic.hasNextLink() {
447		return nil, nil
448	}
449	return autorest.Prepare((&http.Request{}).WithContext(ctx),
450		autorest.AsJSON(),
451		autorest.AsGet(),
452		autorest.WithBaseURL(to.String(aic.NextLink)))
453}
454
455// AppInstanceCollectionPage contains a page of SiteInstance values.
456type AppInstanceCollectionPage struct {
457	fn  func(context.Context, AppInstanceCollection) (AppInstanceCollection, error)
458	aic AppInstanceCollection
459}
460
461// NextWithContext advances to the next page of values.  If there was an error making
462// the request the page does not advance and the error is returned.
463func (page *AppInstanceCollectionPage) NextWithContext(ctx context.Context) (err error) {
464	if tracing.IsEnabled() {
465		ctx = tracing.StartSpan(ctx, fqdn+"/AppInstanceCollectionPage.NextWithContext")
466		defer func() {
467			sc := -1
468			if page.Response().Response.Response != nil {
469				sc = page.Response().Response.Response.StatusCode
470			}
471			tracing.EndSpan(ctx, sc, err)
472		}()
473	}
474	for {
475		next, err := page.fn(ctx, page.aic)
476		if err != nil {
477			return err
478		}
479		page.aic = next
480		if !next.hasNextLink() || !next.IsEmpty() {
481			break
482		}
483	}
484	return nil
485}
486
487// Next advances to the next page of values.  If there was an error making
488// the request the page does not advance and the error is returned.
489// Deprecated: Use NextWithContext() instead.
490func (page *AppInstanceCollectionPage) Next() error {
491	return page.NextWithContext(context.Background())
492}
493
494// NotDone returns true if the page enumeration should be started or is not yet complete.
495func (page AppInstanceCollectionPage) NotDone() bool {
496	return !page.aic.IsEmpty()
497}
498
499// Response returns the raw server response from the last page request.
500func (page AppInstanceCollectionPage) Response() AppInstanceCollection {
501	return page.aic
502}
503
504// Values returns the slice of values for the current page or nil if there are no values.
505func (page AppInstanceCollectionPage) Values() []SiteInstance {
506	if page.aic.IsEmpty() {
507		return nil
508	}
509	return *page.aic.Value
510}
511
512// Creates a new instance of the AppInstanceCollectionPage type.
513func NewAppInstanceCollectionPage(cur AppInstanceCollection, getNextPage func(context.Context, AppInstanceCollection) (AppInstanceCollection, error)) AppInstanceCollectionPage {
514	return AppInstanceCollectionPage{
515		fn:  getNextPage,
516		aic: cur,
517	}
518}
519
520// ApplicationLogsConfig application logs configuration.
521type ApplicationLogsConfig struct {
522	// FileSystem - Application logs to file system configuration.
523	FileSystem *FileSystemApplicationLogsConfig `json:"fileSystem,omitempty"`
524	// AzureTableStorage - Application logs to azure table storage configuration.
525	AzureTableStorage *AzureTableStorageApplicationLogsConfig `json:"azureTableStorage,omitempty"`
526	// AzureBlobStorage - Application logs to blob storage configuration.
527	AzureBlobStorage *AzureBlobStorageApplicationLogsConfig `json:"azureBlobStorage,omitempty"`
528}
529
530// ApplicationStack application stack.
531type ApplicationStack struct {
532	// Name - Application stack name.
533	Name *string `json:"name,omitempty"`
534	// Display - Application stack display name.
535	Display *string `json:"display,omitempty"`
536	// Dependency - Application stack dependency.
537	Dependency *string `json:"dependency,omitempty"`
538	// MajorVersions - List of major versions available.
539	MajorVersions *[]StackMajorVersion `json:"majorVersions,omitempty"`
540	// Frameworks - List of frameworks associated with application stack.
541	Frameworks *[]ApplicationStack `json:"frameworks,omitempty"`
542}
543
544// ApplicationStackCollection collection of Application Stacks
545type ApplicationStackCollection struct {
546	autorest.Response `json:"-"`
547	// Value - Collection of resources.
548	Value *[]ApplicationStack `json:"value,omitempty"`
549	// NextLink - READ-ONLY; Link to next page of resources.
550	NextLink *string `json:"nextLink,omitempty"`
551}
552
553// MarshalJSON is the custom marshaler for ApplicationStackCollection.
554func (asc ApplicationStackCollection) MarshalJSON() ([]byte, error) {
555	objectMap := make(map[string]interface{})
556	if asc.Value != nil {
557		objectMap["value"] = asc.Value
558	}
559	return json.Marshal(objectMap)
560}
561
562// ApplicationStackCollectionIterator provides access to a complete listing of ApplicationStack values.
563type ApplicationStackCollectionIterator struct {
564	i    int
565	page ApplicationStackCollectionPage
566}
567
568// NextWithContext advances to the next value.  If there was an error making
569// the request the iterator does not advance and the error is returned.
570func (iter *ApplicationStackCollectionIterator) NextWithContext(ctx context.Context) (err error) {
571	if tracing.IsEnabled() {
572		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationStackCollectionIterator.NextWithContext")
573		defer func() {
574			sc := -1
575			if iter.Response().Response.Response != nil {
576				sc = iter.Response().Response.Response.StatusCode
577			}
578			tracing.EndSpan(ctx, sc, err)
579		}()
580	}
581	iter.i++
582	if iter.i < len(iter.page.Values()) {
583		return nil
584	}
585	err = iter.page.NextWithContext(ctx)
586	if err != nil {
587		iter.i--
588		return err
589	}
590	iter.i = 0
591	return nil
592}
593
594// Next advances to the next value.  If there was an error making
595// the request the iterator does not advance and the error is returned.
596// Deprecated: Use NextWithContext() instead.
597func (iter *ApplicationStackCollectionIterator) Next() error {
598	return iter.NextWithContext(context.Background())
599}
600
601// NotDone returns true if the enumeration should be started or is not yet complete.
602func (iter ApplicationStackCollectionIterator) NotDone() bool {
603	return iter.page.NotDone() && iter.i < len(iter.page.Values())
604}
605
606// Response returns the raw server response from the last page request.
607func (iter ApplicationStackCollectionIterator) Response() ApplicationStackCollection {
608	return iter.page.Response()
609}
610
611// Value returns the current value or a zero-initialized value if the
612// iterator has advanced beyond the end of the collection.
613func (iter ApplicationStackCollectionIterator) Value() ApplicationStack {
614	if !iter.page.NotDone() {
615		return ApplicationStack{}
616	}
617	return iter.page.Values()[iter.i]
618}
619
620// Creates a new instance of the ApplicationStackCollectionIterator type.
621func NewApplicationStackCollectionIterator(page ApplicationStackCollectionPage) ApplicationStackCollectionIterator {
622	return ApplicationStackCollectionIterator{page: page}
623}
624
625// IsEmpty returns true if the ListResult contains no values.
626func (asc ApplicationStackCollection) IsEmpty() bool {
627	return asc.Value == nil || len(*asc.Value) == 0
628}
629
630// hasNextLink returns true if the NextLink is not empty.
631func (asc ApplicationStackCollection) hasNextLink() bool {
632	return asc.NextLink != nil && len(*asc.NextLink) != 0
633}
634
635// applicationStackCollectionPreparer prepares a request to retrieve the next set of results.
636// It returns nil if no more results exist.
637func (asc ApplicationStackCollection) applicationStackCollectionPreparer(ctx context.Context) (*http.Request, error) {
638	if !asc.hasNextLink() {
639		return nil, nil
640	}
641	return autorest.Prepare((&http.Request{}).WithContext(ctx),
642		autorest.AsJSON(),
643		autorest.AsGet(),
644		autorest.WithBaseURL(to.String(asc.NextLink)))
645}
646
647// ApplicationStackCollectionPage contains a page of ApplicationStack values.
648type ApplicationStackCollectionPage struct {
649	fn  func(context.Context, ApplicationStackCollection) (ApplicationStackCollection, error)
650	asc ApplicationStackCollection
651}
652
653// NextWithContext advances to the next page of values.  If there was an error making
654// the request the page does not advance and the error is returned.
655func (page *ApplicationStackCollectionPage) NextWithContext(ctx context.Context) (err error) {
656	if tracing.IsEnabled() {
657		ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationStackCollectionPage.NextWithContext")
658		defer func() {
659			sc := -1
660			if page.Response().Response.Response != nil {
661				sc = page.Response().Response.Response.StatusCode
662			}
663			tracing.EndSpan(ctx, sc, err)
664		}()
665	}
666	for {
667		next, err := page.fn(ctx, page.asc)
668		if err != nil {
669			return err
670		}
671		page.asc = next
672		if !next.hasNextLink() || !next.IsEmpty() {
673			break
674		}
675	}
676	return nil
677}
678
679// Next advances to the next page of values.  If there was an error making
680// the request the page does not advance and the error is returned.
681// Deprecated: Use NextWithContext() instead.
682func (page *ApplicationStackCollectionPage) Next() error {
683	return page.NextWithContext(context.Background())
684}
685
686// NotDone returns true if the page enumeration should be started or is not yet complete.
687func (page ApplicationStackCollectionPage) NotDone() bool {
688	return !page.asc.IsEmpty()
689}
690
691// Response returns the raw server response from the last page request.
692func (page ApplicationStackCollectionPage) Response() ApplicationStackCollection {
693	return page.asc
694}
695
696// Values returns the slice of values for the current page or nil if there are no values.
697func (page ApplicationStackCollectionPage) Values() []ApplicationStack {
698	if page.asc.IsEmpty() {
699		return nil
700	}
701	return *page.asc.Value
702}
703
704// Creates a new instance of the ApplicationStackCollectionPage type.
705func NewApplicationStackCollectionPage(cur ApplicationStackCollection, getNextPage func(context.Context, ApplicationStackCollection) (ApplicationStackCollection, error)) ApplicationStackCollectionPage {
706	return ApplicationStackCollectionPage{
707		fn:  getNextPage,
708		asc: cur,
709	}
710}
711
712// AppsCreateFunctionFuture an abstraction for monitoring and retrieving the results of a long-running
713// operation.
714type AppsCreateFunctionFuture struct {
715	azure.FutureAPI
716	// Result returns the result of the asynchronous operation.
717	// If the operation has not completed it will return an error.
718	Result func(AppsClient) (FunctionEnvelope, error)
719}
720
721// UnmarshalJSON is the custom unmarshaller for CreateFuture.
722func (future *AppsCreateFunctionFuture) UnmarshalJSON(body []byte) error {
723	var azFuture azure.Future
724	if err := json.Unmarshal(body, &azFuture); err != nil {
725		return err
726	}
727	future.FutureAPI = &azFuture
728	future.Result = future.result
729	return nil
730}
731
732// result is the default implementation for AppsCreateFunctionFuture.Result.
733func (future *AppsCreateFunctionFuture) result(client AppsClient) (fe FunctionEnvelope, err error) {
734	var done bool
735	done, err = future.DoneWithContext(context.Background(), client)
736	if err != nil {
737		err = autorest.NewErrorWithError(err, "web.AppsCreateFunctionFuture", "Result", future.Response(), "Polling failure")
738		return
739	}
740	if !done {
741		fe.Response.Response = future.Response()
742		err = azure.NewAsyncOpIncompleteError("web.AppsCreateFunctionFuture")
743		return
744	}
745	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
746	if fe.Response.Response, err = future.GetResult(sender); err == nil && fe.Response.Response.StatusCode != http.StatusNoContent {
747		fe, err = client.CreateFunctionResponder(fe.Response.Response)
748		if err != nil {
749			err = autorest.NewErrorWithError(err, "web.AppsCreateFunctionFuture", "Result", fe.Response.Response, "Failure responding to request")
750		}
751	}
752	return
753}
754
755// AppsCreateInstanceFunctionSlotFuture an abstraction for monitoring and retrieving the results of a
756// long-running operation.
757type AppsCreateInstanceFunctionSlotFuture struct {
758	azure.FutureAPI
759	// Result returns the result of the asynchronous operation.
760	// If the operation has not completed it will return an error.
761	Result func(AppsClient) (FunctionEnvelope, error)
762}
763
764// UnmarshalJSON is the custom unmarshaller for CreateFuture.
765func (future *AppsCreateInstanceFunctionSlotFuture) UnmarshalJSON(body []byte) error {
766	var azFuture azure.Future
767	if err := json.Unmarshal(body, &azFuture); err != nil {
768		return err
769	}
770	future.FutureAPI = &azFuture
771	future.Result = future.result
772	return nil
773}
774
775// result is the default implementation for AppsCreateInstanceFunctionSlotFuture.Result.
776func (future *AppsCreateInstanceFunctionSlotFuture) result(client AppsClient) (fe FunctionEnvelope, err error) {
777	var done bool
778	done, err = future.DoneWithContext(context.Background(), client)
779	if err != nil {
780		err = autorest.NewErrorWithError(err, "web.AppsCreateInstanceFunctionSlotFuture", "Result", future.Response(), "Polling failure")
781		return
782	}
783	if !done {
784		fe.Response.Response = future.Response()
785		err = azure.NewAsyncOpIncompleteError("web.AppsCreateInstanceFunctionSlotFuture")
786		return
787	}
788	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
789	if fe.Response.Response, err = future.GetResult(sender); err == nil && fe.Response.Response.StatusCode != http.StatusNoContent {
790		fe, err = client.CreateInstanceFunctionSlotResponder(fe.Response.Response)
791		if err != nil {
792			err = autorest.NewErrorWithError(err, "web.AppsCreateInstanceFunctionSlotFuture", "Result", fe.Response.Response, "Failure responding to request")
793		}
794	}
795	return
796}
797
798// AppsCreateInstanceMSDeployOperationFuture an abstraction for monitoring and retrieving the results of a
799// long-running operation.
800type AppsCreateInstanceMSDeployOperationFuture struct {
801	azure.FutureAPI
802	// Result returns the result of the asynchronous operation.
803	// If the operation has not completed it will return an error.
804	Result func(AppsClient) (MSDeployStatus, error)
805}
806
807// UnmarshalJSON is the custom unmarshaller for CreateFuture.
808func (future *AppsCreateInstanceMSDeployOperationFuture) UnmarshalJSON(body []byte) error {
809	var azFuture azure.Future
810	if err := json.Unmarshal(body, &azFuture); err != nil {
811		return err
812	}
813	future.FutureAPI = &azFuture
814	future.Result = future.result
815	return nil
816}
817
818// result is the default implementation for AppsCreateInstanceMSDeployOperationFuture.Result.
819func (future *AppsCreateInstanceMSDeployOperationFuture) result(client AppsClient) (mds MSDeployStatus, err error) {
820	var done bool
821	done, err = future.DoneWithContext(context.Background(), client)
822	if err != nil {
823		err = autorest.NewErrorWithError(err, "web.AppsCreateInstanceMSDeployOperationFuture", "Result", future.Response(), "Polling failure")
824		return
825	}
826	if !done {
827		mds.Response.Response = future.Response()
828		err = azure.NewAsyncOpIncompleteError("web.AppsCreateInstanceMSDeployOperationFuture")
829		return
830	}
831	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
832	if mds.Response.Response, err = future.GetResult(sender); err == nil && mds.Response.Response.StatusCode != http.StatusNoContent {
833		mds, err = client.CreateInstanceMSDeployOperationResponder(mds.Response.Response)
834		if err != nil {
835			err = autorest.NewErrorWithError(err, "web.AppsCreateInstanceMSDeployOperationFuture", "Result", mds.Response.Response, "Failure responding to request")
836		}
837	}
838	return
839}
840
841// AppsCreateInstanceMSDeployOperationSlotFuture an abstraction for monitoring and retrieving the results
842// of a long-running operation.
843type AppsCreateInstanceMSDeployOperationSlotFuture struct {
844	azure.FutureAPI
845	// Result returns the result of the asynchronous operation.
846	// If the operation has not completed it will return an error.
847	Result func(AppsClient) (MSDeployStatus, error)
848}
849
850// UnmarshalJSON is the custom unmarshaller for CreateFuture.
851func (future *AppsCreateInstanceMSDeployOperationSlotFuture) UnmarshalJSON(body []byte) error {
852	var azFuture azure.Future
853	if err := json.Unmarshal(body, &azFuture); err != nil {
854		return err
855	}
856	future.FutureAPI = &azFuture
857	future.Result = future.result
858	return nil
859}
860
861// result is the default implementation for AppsCreateInstanceMSDeployOperationSlotFuture.Result.
862func (future *AppsCreateInstanceMSDeployOperationSlotFuture) result(client AppsClient) (mds MSDeployStatus, err error) {
863	var done bool
864	done, err = future.DoneWithContext(context.Background(), client)
865	if err != nil {
866		err = autorest.NewErrorWithError(err, "web.AppsCreateInstanceMSDeployOperationSlotFuture", "Result", future.Response(), "Polling failure")
867		return
868	}
869	if !done {
870		mds.Response.Response = future.Response()
871		err = azure.NewAsyncOpIncompleteError("web.AppsCreateInstanceMSDeployOperationSlotFuture")
872		return
873	}
874	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
875	if mds.Response.Response, err = future.GetResult(sender); err == nil && mds.Response.Response.StatusCode != http.StatusNoContent {
876		mds, err = client.CreateInstanceMSDeployOperationSlotResponder(mds.Response.Response)
877		if err != nil {
878			err = autorest.NewErrorWithError(err, "web.AppsCreateInstanceMSDeployOperationSlotFuture", "Result", mds.Response.Response, "Failure responding to request")
879		}
880	}
881	return
882}
883
884// AppsCreateMSDeployOperationFuture an abstraction for monitoring and retrieving the results of a
885// long-running operation.
886type AppsCreateMSDeployOperationFuture struct {
887	azure.FutureAPI
888	// Result returns the result of the asynchronous operation.
889	// If the operation has not completed it will return an error.
890	Result func(AppsClient) (MSDeployStatus, error)
891}
892
893// UnmarshalJSON is the custom unmarshaller for CreateFuture.
894func (future *AppsCreateMSDeployOperationFuture) UnmarshalJSON(body []byte) error {
895	var azFuture azure.Future
896	if err := json.Unmarshal(body, &azFuture); err != nil {
897		return err
898	}
899	future.FutureAPI = &azFuture
900	future.Result = future.result
901	return nil
902}
903
904// result is the default implementation for AppsCreateMSDeployOperationFuture.Result.
905func (future *AppsCreateMSDeployOperationFuture) result(client AppsClient) (mds MSDeployStatus, err error) {
906	var done bool
907	done, err = future.DoneWithContext(context.Background(), client)
908	if err != nil {
909		err = autorest.NewErrorWithError(err, "web.AppsCreateMSDeployOperationFuture", "Result", future.Response(), "Polling failure")
910		return
911	}
912	if !done {
913		mds.Response.Response = future.Response()
914		err = azure.NewAsyncOpIncompleteError("web.AppsCreateMSDeployOperationFuture")
915		return
916	}
917	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
918	if mds.Response.Response, err = future.GetResult(sender); err == nil && mds.Response.Response.StatusCode != http.StatusNoContent {
919		mds, err = client.CreateMSDeployOperationResponder(mds.Response.Response)
920		if err != nil {
921			err = autorest.NewErrorWithError(err, "web.AppsCreateMSDeployOperationFuture", "Result", mds.Response.Response, "Failure responding to request")
922		}
923	}
924	return
925}
926
927// AppsCreateMSDeployOperationSlotFuture an abstraction for monitoring and retrieving the results of a
928// long-running operation.
929type AppsCreateMSDeployOperationSlotFuture struct {
930	azure.FutureAPI
931	// Result returns the result of the asynchronous operation.
932	// If the operation has not completed it will return an error.
933	Result func(AppsClient) (MSDeployStatus, error)
934}
935
936// UnmarshalJSON is the custom unmarshaller for CreateFuture.
937func (future *AppsCreateMSDeployOperationSlotFuture) UnmarshalJSON(body []byte) error {
938	var azFuture azure.Future
939	if err := json.Unmarshal(body, &azFuture); err != nil {
940		return err
941	}
942	future.FutureAPI = &azFuture
943	future.Result = future.result
944	return nil
945}
946
947// result is the default implementation for AppsCreateMSDeployOperationSlotFuture.Result.
948func (future *AppsCreateMSDeployOperationSlotFuture) result(client AppsClient) (mds MSDeployStatus, err error) {
949	var done bool
950	done, err = future.DoneWithContext(context.Background(), client)
951	if err != nil {
952		err = autorest.NewErrorWithError(err, "web.AppsCreateMSDeployOperationSlotFuture", "Result", future.Response(), "Polling failure")
953		return
954	}
955	if !done {
956		mds.Response.Response = future.Response()
957		err = azure.NewAsyncOpIncompleteError("web.AppsCreateMSDeployOperationSlotFuture")
958		return
959	}
960	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
961	if mds.Response.Response, err = future.GetResult(sender); err == nil && mds.Response.Response.StatusCode != http.StatusNoContent {
962		mds, err = client.CreateMSDeployOperationSlotResponder(mds.Response.Response)
963		if err != nil {
964			err = autorest.NewErrorWithError(err, "web.AppsCreateMSDeployOperationSlotFuture", "Result", mds.Response.Response, "Failure responding to request")
965		}
966	}
967	return
968}
969
970// AppsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
971// operation.
972type AppsCreateOrUpdateFuture struct {
973	azure.FutureAPI
974	// Result returns the result of the asynchronous operation.
975	// If the operation has not completed it will return an error.
976	Result func(AppsClient) (Site, error)
977}
978
979// UnmarshalJSON is the custom unmarshaller for CreateFuture.
980func (future *AppsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
981	var azFuture azure.Future
982	if err := json.Unmarshal(body, &azFuture); err != nil {
983		return err
984	}
985	future.FutureAPI = &azFuture
986	future.Result = future.result
987	return nil
988}
989
990// result is the default implementation for AppsCreateOrUpdateFuture.Result.
991func (future *AppsCreateOrUpdateFuture) result(client AppsClient) (s Site, err error) {
992	var done bool
993	done, err = future.DoneWithContext(context.Background(), client)
994	if err != nil {
995		err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
996		return
997	}
998	if !done {
999		s.Response.Response = future.Response()
1000		err = azure.NewAsyncOpIncompleteError("web.AppsCreateOrUpdateFuture")
1001		return
1002	}
1003	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1004	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
1005		s, err = client.CreateOrUpdateResponder(s.Response.Response)
1006		if err != nil {
1007			err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
1008		}
1009	}
1010	return
1011}
1012
1013// AppsCreateOrUpdateSlotFuture an abstraction for monitoring and retrieving the results of a long-running
1014// operation.
1015type AppsCreateOrUpdateSlotFuture struct {
1016	azure.FutureAPI
1017	// Result returns the result of the asynchronous operation.
1018	// If the operation has not completed it will return an error.
1019	Result func(AppsClient) (Site, error)
1020}
1021
1022// UnmarshalJSON is the custom unmarshaller for CreateFuture.
1023func (future *AppsCreateOrUpdateSlotFuture) UnmarshalJSON(body []byte) error {
1024	var azFuture azure.Future
1025	if err := json.Unmarshal(body, &azFuture); err != nil {
1026		return err
1027	}
1028	future.FutureAPI = &azFuture
1029	future.Result = future.result
1030	return nil
1031}
1032
1033// result is the default implementation for AppsCreateOrUpdateSlotFuture.Result.
1034func (future *AppsCreateOrUpdateSlotFuture) result(client AppsClient) (s Site, err error) {
1035	var done bool
1036	done, err = future.DoneWithContext(context.Background(), client)
1037	if err != nil {
1038		err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateSlotFuture", "Result", future.Response(), "Polling failure")
1039		return
1040	}
1041	if !done {
1042		s.Response.Response = future.Response()
1043		err = azure.NewAsyncOpIncompleteError("web.AppsCreateOrUpdateSlotFuture")
1044		return
1045	}
1046	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1047	if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
1048		s, err = client.CreateOrUpdateSlotResponder(s.Response.Response)
1049		if err != nil {
1050			err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateSlotFuture", "Result", s.Response.Response, "Failure responding to request")
1051		}
1052	}
1053	return
1054}
1055
1056// AppsCreateOrUpdateSourceControlFuture an abstraction for monitoring and retrieving the results of a
1057// long-running operation.
1058type AppsCreateOrUpdateSourceControlFuture struct {
1059	azure.FutureAPI
1060	// Result returns the result of the asynchronous operation.
1061	// If the operation has not completed it will return an error.
1062	Result func(AppsClient) (SiteSourceControl, error)
1063}
1064
1065// UnmarshalJSON is the custom unmarshaller for CreateFuture.
1066func (future *AppsCreateOrUpdateSourceControlFuture) UnmarshalJSON(body []byte) error {
1067	var azFuture azure.Future
1068	if err := json.Unmarshal(body, &azFuture); err != nil {
1069		return err
1070	}
1071	future.FutureAPI = &azFuture
1072	future.Result = future.result
1073	return nil
1074}
1075
1076// result is the default implementation for AppsCreateOrUpdateSourceControlFuture.Result.
1077func (future *AppsCreateOrUpdateSourceControlFuture) result(client AppsClient) (ssc SiteSourceControl, err error) {
1078	var done bool
1079	done, err = future.DoneWithContext(context.Background(), client)
1080	if err != nil {
1081		err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateSourceControlFuture", "Result", future.Response(), "Polling failure")
1082		return
1083	}
1084	if !done {
1085		ssc.Response.Response = future.Response()
1086		err = azure.NewAsyncOpIncompleteError("web.AppsCreateOrUpdateSourceControlFuture")
1087		return
1088	}
1089	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1090	if ssc.Response.Response, err = future.GetResult(sender); err == nil && ssc.Response.Response.StatusCode != http.StatusNoContent {
1091		ssc, err = client.CreateOrUpdateSourceControlResponder(ssc.Response.Response)
1092		if err != nil {
1093			err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateSourceControlFuture", "Result", ssc.Response.Response, "Failure responding to request")
1094		}
1095	}
1096	return
1097}
1098
1099// AppsCreateOrUpdateSourceControlSlotFuture an abstraction for monitoring and retrieving the results of a
1100// long-running operation.
1101type AppsCreateOrUpdateSourceControlSlotFuture struct {
1102	azure.FutureAPI
1103	// Result returns the result of the asynchronous operation.
1104	// If the operation has not completed it will return an error.
1105	Result func(AppsClient) (SiteSourceControl, error)
1106}
1107
1108// UnmarshalJSON is the custom unmarshaller for CreateFuture.
1109func (future *AppsCreateOrUpdateSourceControlSlotFuture) UnmarshalJSON(body []byte) error {
1110	var azFuture azure.Future
1111	if err := json.Unmarshal(body, &azFuture); err != nil {
1112		return err
1113	}
1114	future.FutureAPI = &azFuture
1115	future.Result = future.result
1116	return nil
1117}
1118
1119// result is the default implementation for AppsCreateOrUpdateSourceControlSlotFuture.Result.
1120func (future *AppsCreateOrUpdateSourceControlSlotFuture) result(client AppsClient) (ssc SiteSourceControl, err error) {
1121	var done bool
1122	done, err = future.DoneWithContext(context.Background(), client)
1123	if err != nil {
1124		err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateSourceControlSlotFuture", "Result", future.Response(), "Polling failure")
1125		return
1126	}
1127	if !done {
1128		ssc.Response.Response = future.Response()
1129		err = azure.NewAsyncOpIncompleteError("web.AppsCreateOrUpdateSourceControlSlotFuture")
1130		return
1131	}
1132	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1133	if ssc.Response.Response, err = future.GetResult(sender); err == nil && ssc.Response.Response.StatusCode != http.StatusNoContent {
1134		ssc, err = client.CreateOrUpdateSourceControlSlotResponder(ssc.Response.Response)
1135		if err != nil {
1136			err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateSourceControlSlotFuture", "Result", ssc.Response.Response, "Failure responding to request")
1137		}
1138	}
1139	return
1140}
1141
1142// AppServiceCertificate key Vault container for a certificate that is purchased through Azure.
1143type AppServiceCertificate struct {
1144	// KeyVaultID - Key Vault resource Id.
1145	KeyVaultID *string `json:"keyVaultId,omitempty"`
1146	// KeyVaultSecretName - Key Vault secret name.
1147	KeyVaultSecretName *string `json:"keyVaultSecretName,omitempty"`
1148	// ProvisioningState - READ-ONLY; Status of the Key Vault secret. Possible values include: 'KeyVaultSecretStatusInitialized', 'KeyVaultSecretStatusWaitingOnCertificateOrder', 'KeyVaultSecretStatusSucceeded', 'KeyVaultSecretStatusCertificateOrderFailed', 'KeyVaultSecretStatusOperationNotPermittedOnKeyVault', 'KeyVaultSecretStatusAzureServiceUnauthorizedToAccessKeyVault', 'KeyVaultSecretStatusKeyVaultDoesNotExist', 'KeyVaultSecretStatusKeyVaultSecretDoesNotExist', 'KeyVaultSecretStatusUnknownError', 'KeyVaultSecretStatusExternalPrivateKey', 'KeyVaultSecretStatusUnknown'
1149	ProvisioningState KeyVaultSecretStatus `json:"provisioningState,omitempty"`
1150}
1151
1152// MarshalJSON is the custom marshaler for AppServiceCertificate.
1153func (asc AppServiceCertificate) MarshalJSON() ([]byte, error) {
1154	objectMap := make(map[string]interface{})
1155	if asc.KeyVaultID != nil {
1156		objectMap["keyVaultId"] = asc.KeyVaultID
1157	}
1158	if asc.KeyVaultSecretName != nil {
1159		objectMap["keyVaultSecretName"] = asc.KeyVaultSecretName
1160	}
1161	return json.Marshal(objectMap)
1162}
1163
1164// AppServiceCertificateCollection collection of certificate order certificates.
1165type AppServiceCertificateCollection struct {
1166	autorest.Response `json:"-"`
1167	// Value - Collection of resources.
1168	Value *[]AppServiceCertificateResource `json:"value,omitempty"`
1169	// NextLink - READ-ONLY; Link to next page of resources.
1170	NextLink *string `json:"nextLink,omitempty"`
1171}
1172
1173// MarshalJSON is the custom marshaler for AppServiceCertificateCollection.
1174func (ascc AppServiceCertificateCollection) MarshalJSON() ([]byte, error) {
1175	objectMap := make(map[string]interface{})
1176	if ascc.Value != nil {
1177		objectMap["value"] = ascc.Value
1178	}
1179	return json.Marshal(objectMap)
1180}
1181
1182// AppServiceCertificateCollectionIterator provides access to a complete listing of
1183// AppServiceCertificateResource values.
1184type AppServiceCertificateCollectionIterator struct {
1185	i    int
1186	page AppServiceCertificateCollectionPage
1187}
1188
1189// NextWithContext advances to the next value.  If there was an error making
1190// the request the iterator does not advance and the error is returned.
1191func (iter *AppServiceCertificateCollectionIterator) NextWithContext(ctx context.Context) (err error) {
1192	if tracing.IsEnabled() {
1193		ctx = tracing.StartSpan(ctx, fqdn+"/AppServiceCertificateCollectionIterator.NextWithContext")
1194		defer func() {
1195			sc := -1
1196			if iter.Response().Response.Response != nil {
1197				sc = iter.Response().Response.Response.StatusCode
1198			}
1199			tracing.EndSpan(ctx, sc, err)
1200		}()
1201	}
1202	iter.i++
1203	if iter.i < len(iter.page.Values()) {
1204		return nil
1205	}
1206	err = iter.page.NextWithContext(ctx)
1207	if err != nil {
1208		iter.i--
1209		return err
1210	}
1211	iter.i = 0
1212	return nil
1213}
1214
1215// Next advances to the next value.  If there was an error making
1216// the request the iterator does not advance and the error is returned.
1217// Deprecated: Use NextWithContext() instead.
1218func (iter *AppServiceCertificateCollectionIterator) Next() error {
1219	return iter.NextWithContext(context.Background())
1220}
1221
1222// NotDone returns true if the enumeration should be started or is not yet complete.
1223func (iter AppServiceCertificateCollectionIterator) NotDone() bool {
1224	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1225}
1226
1227// Response returns the raw server response from the last page request.
1228func (iter AppServiceCertificateCollectionIterator) Response() AppServiceCertificateCollection {
1229	return iter.page.Response()
1230}
1231
1232// Value returns the current value or a zero-initialized value if the
1233// iterator has advanced beyond the end of the collection.
1234func (iter AppServiceCertificateCollectionIterator) Value() AppServiceCertificateResource {
1235	if !iter.page.NotDone() {
1236		return AppServiceCertificateResource{}
1237	}
1238	return iter.page.Values()[iter.i]
1239}
1240
1241// Creates a new instance of the AppServiceCertificateCollectionIterator type.
1242func NewAppServiceCertificateCollectionIterator(page AppServiceCertificateCollectionPage) AppServiceCertificateCollectionIterator {
1243	return AppServiceCertificateCollectionIterator{page: page}
1244}
1245
1246// IsEmpty returns true if the ListResult contains no values.
1247func (ascc AppServiceCertificateCollection) IsEmpty() bool {
1248	return ascc.Value == nil || len(*ascc.Value) == 0
1249}
1250
1251// hasNextLink returns true if the NextLink is not empty.
1252func (ascc AppServiceCertificateCollection) hasNextLink() bool {
1253	return ascc.NextLink != nil && len(*ascc.NextLink) != 0
1254}
1255
1256// appServiceCertificateCollectionPreparer prepares a request to retrieve the next set of results.
1257// It returns nil if no more results exist.
1258func (ascc AppServiceCertificateCollection) appServiceCertificateCollectionPreparer(ctx context.Context) (*http.Request, error) {
1259	if !ascc.hasNextLink() {
1260		return nil, nil
1261	}
1262	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1263		autorest.AsJSON(),
1264		autorest.AsGet(),
1265		autorest.WithBaseURL(to.String(ascc.NextLink)))
1266}
1267
1268// AppServiceCertificateCollectionPage contains a page of AppServiceCertificateResource values.
1269type AppServiceCertificateCollectionPage struct {
1270	fn   func(context.Context, AppServiceCertificateCollection) (AppServiceCertificateCollection, error)
1271	ascc AppServiceCertificateCollection
1272}
1273
1274// NextWithContext advances to the next page of values.  If there was an error making
1275// the request the page does not advance and the error is returned.
1276func (page *AppServiceCertificateCollectionPage) NextWithContext(ctx context.Context) (err error) {
1277	if tracing.IsEnabled() {
1278		ctx = tracing.StartSpan(ctx, fqdn+"/AppServiceCertificateCollectionPage.NextWithContext")
1279		defer func() {
1280			sc := -1
1281			if page.Response().Response.Response != nil {
1282				sc = page.Response().Response.Response.StatusCode
1283			}
1284			tracing.EndSpan(ctx, sc, err)
1285		}()
1286	}
1287	for {
1288		next, err := page.fn(ctx, page.ascc)
1289		if err != nil {
1290			return err
1291		}
1292		page.ascc = next
1293		if !next.hasNextLink() || !next.IsEmpty() {
1294			break
1295		}
1296	}
1297	return nil
1298}
1299
1300// Next advances to the next page of values.  If there was an error making
1301// the request the page does not advance and the error is returned.
1302// Deprecated: Use NextWithContext() instead.
1303func (page *AppServiceCertificateCollectionPage) Next() error {
1304	return page.NextWithContext(context.Background())
1305}
1306
1307// NotDone returns true if the page enumeration should be started or is not yet complete.
1308func (page AppServiceCertificateCollectionPage) NotDone() bool {
1309	return !page.ascc.IsEmpty()
1310}
1311
1312// Response returns the raw server response from the last page request.
1313func (page AppServiceCertificateCollectionPage) Response() AppServiceCertificateCollection {
1314	return page.ascc
1315}
1316
1317// Values returns the slice of values for the current page or nil if there are no values.
1318func (page AppServiceCertificateCollectionPage) Values() []AppServiceCertificateResource {
1319	if page.ascc.IsEmpty() {
1320		return nil
1321	}
1322	return *page.ascc.Value
1323}
1324
1325// Creates a new instance of the AppServiceCertificateCollectionPage type.
1326func NewAppServiceCertificateCollectionPage(cur AppServiceCertificateCollection, getNextPage func(context.Context, AppServiceCertificateCollection) (AppServiceCertificateCollection, error)) AppServiceCertificateCollectionPage {
1327	return AppServiceCertificateCollectionPage{
1328		fn:   getNextPage,
1329		ascc: cur,
1330	}
1331}
1332
1333// AppServiceCertificateOrder SSL certificate purchase order.
1334type AppServiceCertificateOrder struct {
1335	autorest.Response `json:"-"`
1336	// AppServiceCertificateOrderProperties - AppServiceCertificateOrder resource specific properties
1337	*AppServiceCertificateOrderProperties `json:"properties,omitempty"`
1338	// ID - READ-ONLY; Resource Id.
1339	ID *string `json:"id,omitempty"`
1340	// Name - READ-ONLY; Resource Name.
1341	Name *string `json:"name,omitempty"`
1342	// Kind - Kind of resource.
1343	Kind *string `json:"kind,omitempty"`
1344	// Location - Resource Location.
1345	Location *string `json:"location,omitempty"`
1346	// Type - READ-ONLY; Resource type.
1347	Type *string `json:"type,omitempty"`
1348	// Tags - Resource tags.
1349	Tags map[string]*string `json:"tags"`
1350}
1351
1352// MarshalJSON is the custom marshaler for AppServiceCertificateOrder.
1353func (asco AppServiceCertificateOrder) MarshalJSON() ([]byte, error) {
1354	objectMap := make(map[string]interface{})
1355	if asco.AppServiceCertificateOrderProperties != nil {
1356		objectMap["properties"] = asco.AppServiceCertificateOrderProperties
1357	}
1358	if asco.Kind != nil {
1359		objectMap["kind"] = asco.Kind
1360	}
1361	if asco.Location != nil {
1362		objectMap["location"] = asco.Location
1363	}
1364	if asco.Tags != nil {
1365		objectMap["tags"] = asco.Tags
1366	}
1367	return json.Marshal(objectMap)
1368}
1369
1370// UnmarshalJSON is the custom unmarshaler for AppServiceCertificateOrder struct.
1371func (asco *AppServiceCertificateOrder) UnmarshalJSON(body []byte) error {
1372	var m map[string]*json.RawMessage
1373	err := json.Unmarshal(body, &m)
1374	if err != nil {
1375		return err
1376	}
1377	for k, v := range m {
1378		switch k {
1379		case "properties":
1380			if v != nil {
1381				var appServiceCertificateOrderProperties AppServiceCertificateOrderProperties
1382				err = json.Unmarshal(*v, &appServiceCertificateOrderProperties)
1383				if err != nil {
1384					return err
1385				}
1386				asco.AppServiceCertificateOrderProperties = &appServiceCertificateOrderProperties
1387			}
1388		case "id":
1389			if v != nil {
1390				var ID string
1391				err = json.Unmarshal(*v, &ID)
1392				if err != nil {
1393					return err
1394				}
1395				asco.ID = &ID
1396			}
1397		case "name":
1398			if v != nil {
1399				var name string
1400				err = json.Unmarshal(*v, &name)
1401				if err != nil {
1402					return err
1403				}
1404				asco.Name = &name
1405			}
1406		case "kind":
1407			if v != nil {
1408				var kind string
1409				err = json.Unmarshal(*v, &kind)
1410				if err != nil {
1411					return err
1412				}
1413				asco.Kind = &kind
1414			}
1415		case "location":
1416			if v != nil {
1417				var location string
1418				err = json.Unmarshal(*v, &location)
1419				if err != nil {
1420					return err
1421				}
1422				asco.Location = &location
1423			}
1424		case "type":
1425			if v != nil {
1426				var typeVar string
1427				err = json.Unmarshal(*v, &typeVar)
1428				if err != nil {
1429					return err
1430				}
1431				asco.Type = &typeVar
1432			}
1433		case "tags":
1434			if v != nil {
1435				var tags map[string]*string
1436				err = json.Unmarshal(*v, &tags)
1437				if err != nil {
1438					return err
1439				}
1440				asco.Tags = tags
1441			}
1442		}
1443	}
1444
1445	return nil
1446}
1447
1448// AppServiceCertificateOrderCollection collection of certificate orders.
1449type AppServiceCertificateOrderCollection struct {
1450	autorest.Response `json:"-"`
1451	// Value - Collection of resources.
1452	Value *[]AppServiceCertificateOrder `json:"value,omitempty"`
1453	// NextLink - READ-ONLY; Link to next page of resources.
1454	NextLink *string `json:"nextLink,omitempty"`
1455}
1456
1457// MarshalJSON is the custom marshaler for AppServiceCertificateOrderCollection.
1458func (ascoc AppServiceCertificateOrderCollection) MarshalJSON() ([]byte, error) {
1459	objectMap := make(map[string]interface{})
1460	if ascoc.Value != nil {
1461		objectMap["value"] = ascoc.Value
1462	}
1463	return json.Marshal(objectMap)
1464}
1465
1466// AppServiceCertificateOrderCollectionIterator provides access to a complete listing of
1467// AppServiceCertificateOrder values.
1468type AppServiceCertificateOrderCollectionIterator struct {
1469	i    int
1470	page AppServiceCertificateOrderCollectionPage
1471}
1472
1473// NextWithContext advances to the next value.  If there was an error making
1474// the request the iterator does not advance and the error is returned.
1475func (iter *AppServiceCertificateOrderCollectionIterator) NextWithContext(ctx context.Context) (err error) {
1476	if tracing.IsEnabled() {
1477		ctx = tracing.StartSpan(ctx, fqdn+"/AppServiceCertificateOrderCollectionIterator.NextWithContext")
1478		defer func() {
1479			sc := -1
1480			if iter.Response().Response.Response != nil {
1481				sc = iter.Response().Response.Response.StatusCode
1482			}
1483			tracing.EndSpan(ctx, sc, err)
1484		}()
1485	}
1486	iter.i++
1487	if iter.i < len(iter.page.Values()) {
1488		return nil
1489	}
1490	err = iter.page.NextWithContext(ctx)
1491	if err != nil {
1492		iter.i--
1493		return err
1494	}
1495	iter.i = 0
1496	return nil
1497}
1498
1499// Next advances to the next value.  If there was an error making
1500// the request the iterator does not advance and the error is returned.
1501// Deprecated: Use NextWithContext() instead.
1502func (iter *AppServiceCertificateOrderCollectionIterator) Next() error {
1503	return iter.NextWithContext(context.Background())
1504}
1505
1506// NotDone returns true if the enumeration should be started or is not yet complete.
1507func (iter AppServiceCertificateOrderCollectionIterator) NotDone() bool {
1508	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1509}
1510
1511// Response returns the raw server response from the last page request.
1512func (iter AppServiceCertificateOrderCollectionIterator) Response() AppServiceCertificateOrderCollection {
1513	return iter.page.Response()
1514}
1515
1516// Value returns the current value or a zero-initialized value if the
1517// iterator has advanced beyond the end of the collection.
1518func (iter AppServiceCertificateOrderCollectionIterator) Value() AppServiceCertificateOrder {
1519	if !iter.page.NotDone() {
1520		return AppServiceCertificateOrder{}
1521	}
1522	return iter.page.Values()[iter.i]
1523}
1524
1525// Creates a new instance of the AppServiceCertificateOrderCollectionIterator type.
1526func NewAppServiceCertificateOrderCollectionIterator(page AppServiceCertificateOrderCollectionPage) AppServiceCertificateOrderCollectionIterator {
1527	return AppServiceCertificateOrderCollectionIterator{page: page}
1528}
1529
1530// IsEmpty returns true if the ListResult contains no values.
1531func (ascoc AppServiceCertificateOrderCollection) IsEmpty() bool {
1532	return ascoc.Value == nil || len(*ascoc.Value) == 0
1533}
1534
1535// hasNextLink returns true if the NextLink is not empty.
1536func (ascoc AppServiceCertificateOrderCollection) hasNextLink() bool {
1537	return ascoc.NextLink != nil && len(*ascoc.NextLink) != 0
1538}
1539
1540// appServiceCertificateOrderCollectionPreparer prepares a request to retrieve the next set of results.
1541// It returns nil if no more results exist.
1542func (ascoc AppServiceCertificateOrderCollection) appServiceCertificateOrderCollectionPreparer(ctx context.Context) (*http.Request, error) {
1543	if !ascoc.hasNextLink() {
1544		return nil, nil
1545	}
1546	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1547		autorest.AsJSON(),
1548		autorest.AsGet(),
1549		autorest.WithBaseURL(to.String(ascoc.NextLink)))
1550}
1551
1552// AppServiceCertificateOrderCollectionPage contains a page of AppServiceCertificateOrder values.
1553type AppServiceCertificateOrderCollectionPage struct {
1554	fn    func(context.Context, AppServiceCertificateOrderCollection) (AppServiceCertificateOrderCollection, error)
1555	ascoc AppServiceCertificateOrderCollection
1556}
1557
1558// NextWithContext advances to the next page of values.  If there was an error making
1559// the request the page does not advance and the error is returned.
1560func (page *AppServiceCertificateOrderCollectionPage) NextWithContext(ctx context.Context) (err error) {
1561	if tracing.IsEnabled() {
1562		ctx = tracing.StartSpan(ctx, fqdn+"/AppServiceCertificateOrderCollectionPage.NextWithContext")
1563		defer func() {
1564			sc := -1
1565			if page.Response().Response.Response != nil {
1566				sc = page.Response().Response.Response.StatusCode
1567			}
1568			tracing.EndSpan(ctx, sc, err)
1569		}()
1570	}
1571	for {
1572		next, err := page.fn(ctx, page.ascoc)
1573		if err != nil {
1574			return err
1575		}
1576		page.ascoc = next
1577		if !next.hasNextLink() || !next.IsEmpty() {
1578			break
1579		}
1580	}
1581	return nil
1582}
1583
1584// Next advances to the next page of values.  If there was an error making
1585// the request the page does not advance and the error is returned.
1586// Deprecated: Use NextWithContext() instead.
1587func (page *AppServiceCertificateOrderCollectionPage) Next() error {
1588	return page.NextWithContext(context.Background())
1589}
1590
1591// NotDone returns true if the page enumeration should be started or is not yet complete.
1592func (page AppServiceCertificateOrderCollectionPage) NotDone() bool {
1593	return !page.ascoc.IsEmpty()
1594}
1595
1596// Response returns the raw server response from the last page request.
1597func (page AppServiceCertificateOrderCollectionPage) Response() AppServiceCertificateOrderCollection {
1598	return page.ascoc
1599}
1600
1601// Values returns the slice of values for the current page or nil if there are no values.
1602func (page AppServiceCertificateOrderCollectionPage) Values() []AppServiceCertificateOrder {
1603	if page.ascoc.IsEmpty() {
1604		return nil
1605	}
1606	return *page.ascoc.Value
1607}
1608
1609// Creates a new instance of the AppServiceCertificateOrderCollectionPage type.
1610func NewAppServiceCertificateOrderCollectionPage(cur AppServiceCertificateOrderCollection, getNextPage func(context.Context, AppServiceCertificateOrderCollection) (AppServiceCertificateOrderCollection, error)) AppServiceCertificateOrderCollectionPage {
1611	return AppServiceCertificateOrderCollectionPage{
1612		fn:    getNextPage,
1613		ascoc: cur,
1614	}
1615}
1616
1617// AppServiceCertificateOrderPatchResource ARM resource for a certificate order that is purchased through
1618// Azure.
1619type AppServiceCertificateOrderPatchResource struct {
1620	// AppServiceCertificateOrderPatchResourceProperties - AppServiceCertificateOrderPatchResource resource specific properties
1621	*AppServiceCertificateOrderPatchResourceProperties `json:"properties,omitempty"`
1622	// ID - READ-ONLY; Resource Id.
1623	ID *string `json:"id,omitempty"`
1624	// Name - READ-ONLY; Resource Name.
1625	Name *string `json:"name,omitempty"`
1626	// Kind - Kind of resource.
1627	Kind *string `json:"kind,omitempty"`
1628	// Type - READ-ONLY; Resource type.
1629	Type *string `json:"type,omitempty"`
1630}
1631
1632// MarshalJSON is the custom marshaler for AppServiceCertificateOrderPatchResource.
1633func (ascopr AppServiceCertificateOrderPatchResource) MarshalJSON() ([]byte, error) {
1634	objectMap := make(map[string]interface{})
1635	if ascopr.AppServiceCertificateOrderPatchResourceProperties != nil {
1636		objectMap["properties"] = ascopr.AppServiceCertificateOrderPatchResourceProperties
1637	}
1638	if ascopr.Kind != nil {
1639		objectMap["kind"] = ascopr.Kind
1640	}
1641	return json.Marshal(objectMap)
1642}
1643
1644// UnmarshalJSON is the custom unmarshaler for AppServiceCertificateOrderPatchResource struct.
1645func (ascopr *AppServiceCertificateOrderPatchResource) UnmarshalJSON(body []byte) error {
1646	var m map[string]*json.RawMessage
1647	err := json.Unmarshal(body, &m)
1648	if err != nil {
1649		return err
1650	}
1651	for k, v := range m {
1652		switch k {
1653		case "properties":
1654			if v != nil {
1655				var appServiceCertificateOrderPatchResourceProperties AppServiceCertificateOrderPatchResourceProperties
1656				err = json.Unmarshal(*v, &appServiceCertificateOrderPatchResourceProperties)
1657				if err != nil {
1658					return err
1659				}
1660				ascopr.AppServiceCertificateOrderPatchResourceProperties = &appServiceCertificateOrderPatchResourceProperties
1661			}
1662		case "id":
1663			if v != nil {
1664				var ID string
1665				err = json.Unmarshal(*v, &ID)
1666				if err != nil {
1667					return err
1668				}
1669				ascopr.ID = &ID
1670			}
1671		case "name":
1672			if v != nil {
1673				var name string
1674				err = json.Unmarshal(*v, &name)
1675				if err != nil {
1676					return err
1677				}
1678				ascopr.Name = &name
1679			}
1680		case "kind":
1681			if v != nil {
1682				var kind string
1683				err = json.Unmarshal(*v, &kind)
1684				if err != nil {
1685					return err
1686				}
1687				ascopr.Kind = &kind
1688			}
1689		case "type":
1690			if v != nil {
1691				var typeVar string
1692				err = json.Unmarshal(*v, &typeVar)
1693				if err != nil {
1694					return err
1695				}
1696				ascopr.Type = &typeVar
1697			}
1698		}
1699	}
1700
1701	return nil
1702}
1703
1704// AppServiceCertificateOrderPatchResourceProperties appServiceCertificateOrderPatchResource resource
1705// specific properties
1706type AppServiceCertificateOrderPatchResourceProperties struct {
1707	// Certificates - State of the Key Vault secret.
1708	Certificates map[string]*AppServiceCertificate `json:"certificates"`
1709	// DistinguishedName - Certificate distinguished name.
1710	DistinguishedName *string `json:"distinguishedName,omitempty"`
1711	// DomainVerificationToken - READ-ONLY; Domain verification token.
1712	DomainVerificationToken *string `json:"domainVerificationToken,omitempty"`
1713	// ValidityInYears - Duration in years (must be between 1 and 3).
1714	ValidityInYears *int32 `json:"validityInYears,omitempty"`
1715	// KeySize - Certificate key size.
1716	KeySize *int32 `json:"keySize,omitempty"`
1717	// ProductType - Certificate product type. Possible values include: 'StandardDomainValidatedSsl', 'StandardDomainValidatedWildCardSsl'
1718	ProductType CertificateProductType `json:"productType,omitempty"`
1719	// AutoRenew - <code>true</code> if the certificate should be automatically renewed when it expires; otherwise, <code>false</code>.
1720	AutoRenew *bool `json:"autoRenew,omitempty"`
1721	// ProvisioningState - READ-ONLY; Status of certificate order. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateFailed', 'ProvisioningStateCanceled', 'ProvisioningStateInProgress', 'ProvisioningStateDeleting'
1722	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
1723	// Status - READ-ONLY; Current order status. Possible values include: 'Pendingissuance', 'Issued', 'Revoked', 'Canceled', 'Denied', 'Pendingrevocation', 'PendingRekey', 'Unused', 'Expired', 'NotSubmitted'
1724	Status CertificateOrderStatus `json:"status,omitempty"`
1725	// SignedCertificate - READ-ONLY; Signed certificate.
1726	SignedCertificate *CertificateDetails `json:"signedCertificate,omitempty"`
1727	// Csr - Last CSR that was created for this order.
1728	Csr *string `json:"csr,omitempty"`
1729	// Intermediate - READ-ONLY; Intermediate certificate.
1730	Intermediate *CertificateDetails `json:"intermediate,omitempty"`
1731	// Root - READ-ONLY; Root certificate.
1732	Root *CertificateDetails `json:"root,omitempty"`
1733	// SerialNumber - READ-ONLY; Current serial number of the certificate.
1734	SerialNumber *string `json:"serialNumber,omitempty"`
1735	// LastCertificateIssuanceTime - READ-ONLY; Certificate last issuance time.
1736	LastCertificateIssuanceTime *date.Time `json:"lastCertificateIssuanceTime,omitempty"`
1737	// ExpirationTime - READ-ONLY; Certificate expiration time.
1738	ExpirationTime *date.Time `json:"expirationTime,omitempty"`
1739	// IsPrivateKeyExternal - READ-ONLY; <code>true</code> if private key is external; otherwise, <code>false</code>.
1740	IsPrivateKeyExternal *bool `json:"isPrivateKeyExternal,omitempty"`
1741	// AppServiceCertificateNotRenewableReasons - READ-ONLY; Reasons why App Service Certificate is not renewable at the current moment.
1742	AppServiceCertificateNotRenewableReasons *[]string `json:"appServiceCertificateNotRenewableReasons,omitempty"`
1743	// NextAutoRenewalTimeStamp - READ-ONLY; Time stamp when the certificate would be auto renewed next
1744	NextAutoRenewalTimeStamp *date.Time `json:"nextAutoRenewalTimeStamp,omitempty"`
1745}
1746
1747// MarshalJSON is the custom marshaler for AppServiceCertificateOrderPatchResourceProperties.
1748func (ascopr AppServiceCertificateOrderPatchResourceProperties) MarshalJSON() ([]byte, error) {
1749	objectMap := make(map[string]interface{})
1750	if ascopr.Certificates != nil {
1751		objectMap["certificates"] = ascopr.Certificates
1752	}
1753	if ascopr.DistinguishedName != nil {
1754		objectMap["distinguishedName"] = ascopr.DistinguishedName
1755	}
1756	if ascopr.ValidityInYears != nil {
1757		objectMap["validityInYears"] = ascopr.ValidityInYears
1758	}
1759	if ascopr.KeySize != nil {
1760		objectMap["keySize"] = ascopr.KeySize
1761	}
1762	if ascopr.ProductType != "" {
1763		objectMap["productType"] = ascopr.ProductType
1764	}
1765	if ascopr.AutoRenew != nil {
1766		objectMap["autoRenew"] = ascopr.AutoRenew
1767	}
1768	if ascopr.Csr != nil {
1769		objectMap["csr"] = ascopr.Csr
1770	}
1771	return json.Marshal(objectMap)
1772}
1773
1774// AppServiceCertificateOrderProperties appServiceCertificateOrder resource specific properties
1775type AppServiceCertificateOrderProperties struct {
1776	// Certificates - State of the Key Vault secret.
1777	Certificates map[string]*AppServiceCertificate `json:"certificates"`
1778	// DistinguishedName - Certificate distinguished name.
1779	DistinguishedName *string `json:"distinguishedName,omitempty"`
1780	// DomainVerificationToken - READ-ONLY; Domain verification token.
1781	DomainVerificationToken *string `json:"domainVerificationToken,omitempty"`
1782	// ValidityInYears - Duration in years (must be between 1 and 3).
1783	ValidityInYears *int32 `json:"validityInYears,omitempty"`
1784	// KeySize - Certificate key size.
1785	KeySize *int32 `json:"keySize,omitempty"`
1786	// ProductType - Certificate product type. Possible values include: 'StandardDomainValidatedSsl', 'StandardDomainValidatedWildCardSsl'
1787	ProductType CertificateProductType `json:"productType,omitempty"`
1788	// AutoRenew - <code>true</code> if the certificate should be automatically renewed when it expires; otherwise, <code>false</code>.
1789	AutoRenew *bool `json:"autoRenew,omitempty"`
1790	// ProvisioningState - READ-ONLY; Status of certificate order. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateFailed', 'ProvisioningStateCanceled', 'ProvisioningStateInProgress', 'ProvisioningStateDeleting'
1791	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
1792	// Status - READ-ONLY; Current order status. Possible values include: 'Pendingissuance', 'Issued', 'Revoked', 'Canceled', 'Denied', 'Pendingrevocation', 'PendingRekey', 'Unused', 'Expired', 'NotSubmitted'
1793	Status CertificateOrderStatus `json:"status,omitempty"`
1794	// SignedCertificate - READ-ONLY; Signed certificate.
1795	SignedCertificate *CertificateDetails `json:"signedCertificate,omitempty"`
1796	// Csr - Last CSR that was created for this order.
1797	Csr *string `json:"csr,omitempty"`
1798	// Intermediate - READ-ONLY; Intermediate certificate.
1799	Intermediate *CertificateDetails `json:"intermediate,omitempty"`
1800	// Root - READ-ONLY; Root certificate.
1801	Root *CertificateDetails `json:"root,omitempty"`
1802	// SerialNumber - READ-ONLY; Current serial number of the certificate.
1803	SerialNumber *string `json:"serialNumber,omitempty"`
1804	// LastCertificateIssuanceTime - READ-ONLY; Certificate last issuance time.
1805	LastCertificateIssuanceTime *date.Time `json:"lastCertificateIssuanceTime,omitempty"`
1806	// ExpirationTime - READ-ONLY; Certificate expiration time.
1807	ExpirationTime *date.Time `json:"expirationTime,omitempty"`
1808	// IsPrivateKeyExternal - READ-ONLY; <code>true</code> if private key is external; otherwise, <code>false</code>.
1809	IsPrivateKeyExternal *bool `json:"isPrivateKeyExternal,omitempty"`
1810	// AppServiceCertificateNotRenewableReasons - READ-ONLY; Reasons why App Service Certificate is not renewable at the current moment.
1811	AppServiceCertificateNotRenewableReasons *[]string `json:"appServiceCertificateNotRenewableReasons,omitempty"`
1812	// NextAutoRenewalTimeStamp - READ-ONLY; Time stamp when the certificate would be auto renewed next
1813	NextAutoRenewalTimeStamp *date.Time `json:"nextAutoRenewalTimeStamp,omitempty"`
1814}
1815
1816// MarshalJSON is the custom marshaler for AppServiceCertificateOrderProperties.
1817func (asco AppServiceCertificateOrderProperties) MarshalJSON() ([]byte, error) {
1818	objectMap := make(map[string]interface{})
1819	if asco.Certificates != nil {
1820		objectMap["certificates"] = asco.Certificates
1821	}
1822	if asco.DistinguishedName != nil {
1823		objectMap["distinguishedName"] = asco.DistinguishedName
1824	}
1825	if asco.ValidityInYears != nil {
1826		objectMap["validityInYears"] = asco.ValidityInYears
1827	}
1828	if asco.KeySize != nil {
1829		objectMap["keySize"] = asco.KeySize
1830	}
1831	if asco.ProductType != "" {
1832		objectMap["productType"] = asco.ProductType
1833	}
1834	if asco.AutoRenew != nil {
1835		objectMap["autoRenew"] = asco.AutoRenew
1836	}
1837	if asco.Csr != nil {
1838		objectMap["csr"] = asco.Csr
1839	}
1840	return json.Marshal(objectMap)
1841}
1842
1843// AppServiceCertificateOrdersCreateOrUpdateCertificateFuture an abstraction for monitoring and retrieving
1844// the results of a long-running operation.
1845type AppServiceCertificateOrdersCreateOrUpdateCertificateFuture struct {
1846	azure.FutureAPI
1847	// Result returns the result of the asynchronous operation.
1848	// If the operation has not completed it will return an error.
1849	Result func(AppServiceCertificateOrdersClient) (AppServiceCertificateResource, error)
1850}
1851
1852// UnmarshalJSON is the custom unmarshaller for CreateFuture.
1853func (future *AppServiceCertificateOrdersCreateOrUpdateCertificateFuture) UnmarshalJSON(body []byte) error {
1854	var azFuture azure.Future
1855	if err := json.Unmarshal(body, &azFuture); err != nil {
1856		return err
1857	}
1858	future.FutureAPI = &azFuture
1859	future.Result = future.result
1860	return nil
1861}
1862
1863// result is the default implementation for AppServiceCertificateOrdersCreateOrUpdateCertificateFuture.Result.
1864func (future *AppServiceCertificateOrdersCreateOrUpdateCertificateFuture) result(client AppServiceCertificateOrdersClient) (ascr AppServiceCertificateResource, err error) {
1865	var done bool
1866	done, err = future.DoneWithContext(context.Background(), client)
1867	if err != nil {
1868		err = autorest.NewErrorWithError(err, "web.AppServiceCertificateOrdersCreateOrUpdateCertificateFuture", "Result", future.Response(), "Polling failure")
1869		return
1870	}
1871	if !done {
1872		ascr.Response.Response = future.Response()
1873		err = azure.NewAsyncOpIncompleteError("web.AppServiceCertificateOrdersCreateOrUpdateCertificateFuture")
1874		return
1875	}
1876	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1877	if ascr.Response.Response, err = future.GetResult(sender); err == nil && ascr.Response.Response.StatusCode != http.StatusNoContent {
1878		ascr, err = client.CreateOrUpdateCertificateResponder(ascr.Response.Response)
1879		if err != nil {
1880			err = autorest.NewErrorWithError(err, "web.AppServiceCertificateOrdersCreateOrUpdateCertificateFuture", "Result", ascr.Response.Response, "Failure responding to request")
1881		}
1882	}
1883	return
1884}
1885
1886// AppServiceCertificateOrdersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
1887// of a long-running operation.
1888type AppServiceCertificateOrdersCreateOrUpdateFuture struct {
1889	azure.FutureAPI
1890	// Result returns the result of the asynchronous operation.
1891	// If the operation has not completed it will return an error.
1892	Result func(AppServiceCertificateOrdersClient) (AppServiceCertificateOrder, error)
1893}
1894
1895// UnmarshalJSON is the custom unmarshaller for CreateFuture.
1896func (future *AppServiceCertificateOrdersCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
1897	var azFuture azure.Future
1898	if err := json.Unmarshal(body, &azFuture); err != nil {
1899		return err
1900	}
1901	future.FutureAPI = &azFuture
1902	future.Result = future.result
1903	return nil
1904}
1905
1906// result is the default implementation for AppServiceCertificateOrdersCreateOrUpdateFuture.Result.
1907func (future *AppServiceCertificateOrdersCreateOrUpdateFuture) result(client AppServiceCertificateOrdersClient) (asco AppServiceCertificateOrder, err error) {
1908	var done bool
1909	done, err = future.DoneWithContext(context.Background(), client)
1910	if err != nil {
1911		err = autorest.NewErrorWithError(err, "web.AppServiceCertificateOrdersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
1912		return
1913	}
1914	if !done {
1915		asco.Response.Response = future.Response()
1916		err = azure.NewAsyncOpIncompleteError("web.AppServiceCertificateOrdersCreateOrUpdateFuture")
1917		return
1918	}
1919	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1920	if asco.Response.Response, err = future.GetResult(sender); err == nil && asco.Response.Response.StatusCode != http.StatusNoContent {
1921		asco, err = client.CreateOrUpdateResponder(asco.Response.Response)
1922		if err != nil {
1923			err = autorest.NewErrorWithError(err, "web.AppServiceCertificateOrdersCreateOrUpdateFuture", "Result", asco.Response.Response, "Failure responding to request")
1924		}
1925	}
1926	return
1927}
1928
1929// AppServiceCertificatePatchResource key Vault container ARM resource for a certificate that is purchased
1930// through Azure.
1931type AppServiceCertificatePatchResource struct {
1932	// AppServiceCertificate - Core resource properties
1933	*AppServiceCertificate `json:"properties,omitempty"`
1934	// ID - READ-ONLY; Resource Id.
1935	ID *string `json:"id,omitempty"`
1936	// Name - READ-ONLY; Resource Name.
1937	Name *string `json:"name,omitempty"`
1938	// Kind - Kind of resource.
1939	Kind *string `json:"kind,omitempty"`
1940	// Type - READ-ONLY; Resource type.
1941	Type *string `json:"type,omitempty"`
1942}
1943
1944// MarshalJSON is the custom marshaler for AppServiceCertificatePatchResource.
1945func (ascpr AppServiceCertificatePatchResource) MarshalJSON() ([]byte, error) {
1946	objectMap := make(map[string]interface{})
1947	if ascpr.AppServiceCertificate != nil {
1948		objectMap["properties"] = ascpr.AppServiceCertificate
1949	}
1950	if ascpr.Kind != nil {
1951		objectMap["kind"] = ascpr.Kind
1952	}
1953	return json.Marshal(objectMap)
1954}
1955
1956// UnmarshalJSON is the custom unmarshaler for AppServiceCertificatePatchResource struct.
1957func (ascpr *AppServiceCertificatePatchResource) UnmarshalJSON(body []byte) error {
1958	var m map[string]*json.RawMessage
1959	err := json.Unmarshal(body, &m)
1960	if err != nil {
1961		return err
1962	}
1963	for k, v := range m {
1964		switch k {
1965		case "properties":
1966			if v != nil {
1967				var appServiceCertificate AppServiceCertificate
1968				err = json.Unmarshal(*v, &appServiceCertificate)
1969				if err != nil {
1970					return err
1971				}
1972				ascpr.AppServiceCertificate = &appServiceCertificate
1973			}
1974		case "id":
1975			if v != nil {
1976				var ID string
1977				err = json.Unmarshal(*v, &ID)
1978				if err != nil {
1979					return err
1980				}
1981				ascpr.ID = &ID
1982			}
1983		case "name":
1984			if v != nil {
1985				var name string
1986				err = json.Unmarshal(*v, &name)
1987				if err != nil {
1988					return err
1989				}
1990				ascpr.Name = &name
1991			}
1992		case "kind":
1993			if v != nil {
1994				var kind string
1995				err = json.Unmarshal(*v, &kind)
1996				if err != nil {
1997					return err
1998				}
1999				ascpr.Kind = &kind
2000			}
2001		case "type":
2002			if v != nil {
2003				var typeVar string
2004				err = json.Unmarshal(*v, &typeVar)
2005				if err != nil {
2006					return err
2007				}
2008				ascpr.Type = &typeVar
2009			}
2010		}
2011	}
2012
2013	return nil
2014}
2015
2016// AppServiceCertificateResource key Vault container ARM resource for a certificate that is purchased
2017// through Azure.
2018type AppServiceCertificateResource struct {
2019	autorest.Response `json:"-"`
2020	// AppServiceCertificate - Core resource properties
2021	*AppServiceCertificate `json:"properties,omitempty"`
2022	// ID - READ-ONLY; Resource Id.
2023	ID *string `json:"id,omitempty"`
2024	// Name - READ-ONLY; Resource Name.
2025	Name *string `json:"name,omitempty"`
2026	// Kind - Kind of resource.
2027	Kind *string `json:"kind,omitempty"`
2028	// Location - Resource Location.
2029	Location *string `json:"location,omitempty"`
2030	// Type - READ-ONLY; Resource type.
2031	Type *string `json:"type,omitempty"`
2032	// Tags - Resource tags.
2033	Tags map[string]*string `json:"tags"`
2034}
2035
2036// MarshalJSON is the custom marshaler for AppServiceCertificateResource.
2037func (ascr AppServiceCertificateResource) MarshalJSON() ([]byte, error) {
2038	objectMap := make(map[string]interface{})
2039	if ascr.AppServiceCertificate != nil {
2040		objectMap["properties"] = ascr.AppServiceCertificate
2041	}
2042	if ascr.Kind != nil {
2043		objectMap["kind"] = ascr.Kind
2044	}
2045	if ascr.Location != nil {
2046		objectMap["location"] = ascr.Location
2047	}
2048	if ascr.Tags != nil {
2049		objectMap["tags"] = ascr.Tags
2050	}
2051	return json.Marshal(objectMap)
2052}
2053
2054// UnmarshalJSON is the custom unmarshaler for AppServiceCertificateResource struct.
2055func (ascr *AppServiceCertificateResource) UnmarshalJSON(body []byte) error {
2056	var m map[string]*json.RawMessage
2057	err := json.Unmarshal(body, &m)
2058	if err != nil {
2059		return err
2060	}
2061	for k, v := range m {
2062		switch k {
2063		case "properties":
2064			if v != nil {
2065				var appServiceCertificate AppServiceCertificate
2066				err = json.Unmarshal(*v, &appServiceCertificate)
2067				if err != nil {
2068					return err
2069				}
2070				ascr.AppServiceCertificate = &appServiceCertificate
2071			}
2072		case "id":
2073			if v != nil {
2074				var ID string
2075				err = json.Unmarshal(*v, &ID)
2076				if err != nil {
2077					return err
2078				}
2079				ascr.ID = &ID
2080			}
2081		case "name":
2082			if v != nil {
2083				var name string
2084				err = json.Unmarshal(*v, &name)
2085				if err != nil {
2086					return err
2087				}
2088				ascr.Name = &name
2089			}
2090		case "kind":
2091			if v != nil {
2092				var kind string
2093				err = json.Unmarshal(*v, &kind)
2094				if err != nil {
2095					return err
2096				}
2097				ascr.Kind = &kind
2098			}
2099		case "location":
2100			if v != nil {
2101				var location string
2102				err = json.Unmarshal(*v, &location)
2103				if err != nil {
2104					return err
2105				}
2106				ascr.Location = &location
2107			}
2108		case "type":
2109			if v != nil {
2110				var typeVar string
2111				err = json.Unmarshal(*v, &typeVar)
2112				if err != nil {
2113					return err
2114				}
2115				ascr.Type = &typeVar
2116			}
2117		case "tags":
2118			if v != nil {
2119				var tags map[string]*string
2120				err = json.Unmarshal(*v, &tags)
2121				if err != nil {
2122					return err
2123				}
2124				ascr.Tags = tags
2125			}
2126		}
2127	}
2128
2129	return nil
2130}
2131
2132// AppServiceEnvironment description of an App Service Environment.
2133type AppServiceEnvironment struct {
2134	// Name - Name of the App Service Environment.
2135	Name *string `json:"name,omitempty"`
2136	// Location - Location of the App Service Environment, e.g. "West US".
2137	Location *string `json:"location,omitempty"`
2138	// ProvisioningState - READ-ONLY; Provisioning state of the App Service Environment. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateFailed', 'ProvisioningStateCanceled', 'ProvisioningStateInProgress', 'ProvisioningStateDeleting'
2139	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
2140	// Status - READ-ONLY; Current status of the App Service Environment. Possible values include: 'Preparing', 'Ready', 'Scaling', 'Deleting'
2141	Status HostingEnvironmentStatus `json:"status,omitempty"`
2142	// VnetName - Name of the Virtual Network for the App Service Environment.
2143	VnetName *string `json:"vnetName,omitempty"`
2144	// VnetResourceGroupName - Resource group of the Virtual Network.
2145	VnetResourceGroupName *string `json:"vnetResourceGroupName,omitempty"`
2146	// VnetSubnetName - Subnet of the Virtual Network.
2147	VnetSubnetName *string `json:"vnetSubnetName,omitempty"`
2148	// VirtualNetwork - Description of the Virtual Network.
2149	VirtualNetwork *VirtualNetworkProfile `json:"virtualNetwork,omitempty"`
2150	// InternalLoadBalancingMode - Specifies which endpoints to serve internally in the Virtual Network for the App Service Environment. Possible values include: 'InternalLoadBalancingModeNone', 'InternalLoadBalancingModeWeb', 'InternalLoadBalancingModePublishing'
2151	InternalLoadBalancingMode InternalLoadBalancingMode `json:"internalLoadBalancingMode,omitempty"`
2152	// MultiSize - Front-end VM size, e.g. "Medium", "Large".
2153	MultiSize *string `json:"multiSize,omitempty"`
2154	// MultiRoleCount - Number of front-end instances.
2155	MultiRoleCount *int32 `json:"multiRoleCount,omitempty"`
2156	// WorkerPools - Description of worker pools with worker size IDs, VM sizes, and number of workers in each pool.
2157	WorkerPools *[]WorkerPool `json:"workerPools,omitempty"`
2158	// IpsslAddressCount - Number of IP SSL addresses reserved for the App Service Environment.
2159	IpsslAddressCount *int32 `json:"ipsslAddressCount,omitempty"`
2160	// DatabaseEdition - READ-ONLY; Edition of the metadata database for the App Service Environment, e.g. "Standard".
2161	DatabaseEdition *string `json:"databaseEdition,omitempty"`
2162	// DatabaseServiceObjective - READ-ONLY; Service objective of the metadata database for the App Service Environment, e.g. "S0".
2163	DatabaseServiceObjective *string `json:"databaseServiceObjective,omitempty"`
2164	// UpgradeDomains - READ-ONLY; Number of upgrade domains of the App Service Environment.
2165	UpgradeDomains *int32 `json:"upgradeDomains,omitempty"`
2166	// SubscriptionID - READ-ONLY; Subscription of the App Service Environment.
2167	SubscriptionID *string `json:"subscriptionId,omitempty"`
2168	// DNSSuffix - DNS suffix of the App Service Environment.
2169	DNSSuffix *string `json:"dnsSuffix,omitempty"`
2170	// LastAction - READ-ONLY; Last deployment action on the App Service Environment.
2171	LastAction *string `json:"lastAction,omitempty"`
2172	// LastActionResult - READ-ONLY; Result of the last deployment action on the App Service Environment.
2173	LastActionResult *string `json:"lastActionResult,omitempty"`
2174	// AllowedMultiSizes - READ-ONLY; List of comma separated strings describing which VM sizes are allowed for front-ends.
2175	AllowedMultiSizes *string `json:"allowedMultiSizes,omitempty"`
2176	// AllowedWorkerSizes - READ-ONLY; List of comma separated strings describing which VM sizes are allowed for workers.
2177	AllowedWorkerSizes *string `json:"allowedWorkerSizes,omitempty"`
2178	// MaximumNumberOfMachines - READ-ONLY; Maximum number of VMs in the App Service Environment.
2179	MaximumNumberOfMachines *int32 `json:"maximumNumberOfMachines,omitempty"`
2180	// VipMappings - READ-ONLY; Description of IP SSL mapping for the App Service Environment.
2181	VipMappings *[]VirtualIPMapping `json:"vipMappings,omitempty"`
2182	// EnvironmentCapacities - READ-ONLY; Current total, used, and available worker capacities.
2183	EnvironmentCapacities *[]StampCapacity `json:"environmentCapacities,omitempty"`
2184	// NetworkAccessControlList - Access control list for controlling traffic to the App Service Environment.
2185	NetworkAccessControlList *[]NetworkAccessControlEntry `json:"networkAccessControlList,omitempty"`
2186	// EnvironmentIsHealthy - READ-ONLY; True/false indicating whether the App Service Environment is healthy.
2187	EnvironmentIsHealthy *bool `json:"environmentIsHealthy,omitempty"`
2188	// EnvironmentStatus - READ-ONLY; Detailed message about with results of the last check of the App Service Environment.
2189	EnvironmentStatus *string `json:"environmentStatus,omitempty"`
2190	// ResourceGroup - READ-ONLY; Resource group of the App Service Environment.
2191	ResourceGroup *string `json:"resourceGroup,omitempty"`
2192	// FrontEndScaleFactor - Scale factor for front-ends.
2193	FrontEndScaleFactor *int32 `json:"frontEndScaleFactor,omitempty"`
2194	// DefaultFrontEndScaleFactor - READ-ONLY; Default Scale Factor for FrontEnds.
2195	DefaultFrontEndScaleFactor *int32 `json:"defaultFrontEndScaleFactor,omitempty"`
2196	// APIManagementAccountID - API Management Account associated with the App Service Environment.
2197	APIManagementAccountID *string `json:"apiManagementAccountId,omitempty"`
2198	// Suspended - <code>true</code> if the App Service Environment is suspended; otherwise, <code>false</code>. The environment can be suspended, e.g. when the management endpoint is no longer available
2199	//  (most likely because NSG blocked the incoming traffic).
2200	Suspended *bool `json:"suspended,omitempty"`
2201	// DynamicCacheEnabled - True/false indicating whether the App Service Environment is suspended. The environment can be suspended e.g. when the management endpoint is no longer available
2202	// (most likely because NSG blocked the incoming traffic).
2203	DynamicCacheEnabled *bool `json:"dynamicCacheEnabled,omitempty"`
2204	// ClusterSettings - Custom settings for changing the behavior of the App Service Environment.
2205	ClusterSettings *[]NameValuePair `json:"clusterSettings,omitempty"`
2206	// UserWhitelistedIPRanges - User added ip ranges to whitelist on ASE db
2207	UserWhitelistedIPRanges *[]string `json:"userWhitelistedIpRanges,omitempty"`
2208}
2209
2210// MarshalJSON is the custom marshaler for AppServiceEnvironment.
2211func (ase AppServiceEnvironment) MarshalJSON() ([]byte, error) {
2212	objectMap := make(map[string]interface{})
2213	if ase.Name != nil {
2214		objectMap["name"] = ase.Name
2215	}
2216	if ase.Location != nil {
2217		objectMap["location"] = ase.Location
2218	}
2219	if ase.VnetName != nil {
2220		objectMap["vnetName"] = ase.VnetName
2221	}
2222	if ase.VnetResourceGroupName != nil {
2223		objectMap["vnetResourceGroupName"] = ase.VnetResourceGroupName
2224	}
2225	if ase.VnetSubnetName != nil {
2226		objectMap["vnetSubnetName"] = ase.VnetSubnetName
2227	}
2228	if ase.VirtualNetwork != nil {
2229		objectMap["virtualNetwork"] = ase.VirtualNetwork
2230	}
2231	if ase.InternalLoadBalancingMode != "" {
2232		objectMap["internalLoadBalancingMode"] = ase.InternalLoadBalancingMode
2233	}
2234	if ase.MultiSize != nil {
2235		objectMap["multiSize"] = ase.MultiSize
2236	}
2237	if ase.MultiRoleCount != nil {
2238		objectMap["multiRoleCount"] = ase.MultiRoleCount
2239	}
2240	if ase.WorkerPools != nil {
2241		objectMap["workerPools"] = ase.WorkerPools
2242	}
2243	if ase.IpsslAddressCount != nil {
2244		objectMap["ipsslAddressCount"] = ase.IpsslAddressCount
2245	}
2246	if ase.DNSSuffix != nil {
2247		objectMap["dnsSuffix"] = ase.DNSSuffix
2248	}
2249	if ase.NetworkAccessControlList != nil {
2250		objectMap["networkAccessControlList"] = ase.NetworkAccessControlList
2251	}
2252	if ase.FrontEndScaleFactor != nil {
2253		objectMap["frontEndScaleFactor"] = ase.FrontEndScaleFactor
2254	}
2255	if ase.APIManagementAccountID != nil {
2256		objectMap["apiManagementAccountId"] = ase.APIManagementAccountID
2257	}
2258	if ase.Suspended != nil {
2259		objectMap["suspended"] = ase.Suspended
2260	}
2261	if ase.DynamicCacheEnabled != nil {
2262		objectMap["dynamicCacheEnabled"] = ase.DynamicCacheEnabled
2263	}
2264	if ase.ClusterSettings != nil {
2265		objectMap["clusterSettings"] = ase.ClusterSettings
2266	}
2267	if ase.UserWhitelistedIPRanges != nil {
2268		objectMap["userWhitelistedIpRanges"] = ase.UserWhitelistedIPRanges
2269	}
2270	return json.Marshal(objectMap)
2271}
2272
2273// AppServiceEnvironmentCollection collection of App Service Environments.
2274type AppServiceEnvironmentCollection struct {
2275	autorest.Response `json:"-"`
2276	// Value - Collection of resources.
2277	Value *[]AppServiceEnvironmentResource `json:"value,omitempty"`
2278	// NextLink - READ-ONLY; Link to next page of resources.
2279	NextLink *string `json:"nextLink,omitempty"`
2280}
2281
2282// MarshalJSON is the custom marshaler for AppServiceEnvironmentCollection.
2283func (asec AppServiceEnvironmentCollection) MarshalJSON() ([]byte, error) {
2284	objectMap := make(map[string]interface{})
2285	if asec.Value != nil {
2286		objectMap["value"] = asec.Value
2287	}
2288	return json.Marshal(objectMap)
2289}
2290
2291// AppServiceEnvironmentCollectionIterator provides access to a complete listing of
2292// AppServiceEnvironmentResource values.
2293type AppServiceEnvironmentCollectionIterator struct {
2294	i    int
2295	page AppServiceEnvironmentCollectionPage
2296}
2297
2298// NextWithContext advances to the next value.  If there was an error making
2299// the request the iterator does not advance and the error is returned.
2300func (iter *AppServiceEnvironmentCollectionIterator) NextWithContext(ctx context.Context) (err error) {
2301	if tracing.IsEnabled() {
2302		ctx = tracing.StartSpan(ctx, fqdn+"/AppServiceEnvironmentCollectionIterator.NextWithContext")
2303		defer func() {
2304			sc := -1
2305			if iter.Response().Response.Response != nil {
2306				sc = iter.Response().Response.Response.StatusCode
2307			}
2308			tracing.EndSpan(ctx, sc, err)
2309		}()
2310	}
2311	iter.i++
2312	if iter.i < len(iter.page.Values()) {
2313		return nil
2314	}
2315	err = iter.page.NextWithContext(ctx)
2316	if err != nil {
2317		iter.i--
2318		return err
2319	}
2320	iter.i = 0
2321	return nil
2322}
2323
2324// Next advances to the next value.  If there was an error making
2325// the request the iterator does not advance and the error is returned.
2326// Deprecated: Use NextWithContext() instead.
2327func (iter *AppServiceEnvironmentCollectionIterator) Next() error {
2328	return iter.NextWithContext(context.Background())
2329}
2330
2331// NotDone returns true if the enumeration should be started or is not yet complete.
2332func (iter AppServiceEnvironmentCollectionIterator) NotDone() bool {
2333	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2334}
2335
2336// Response returns the raw server response from the last page request.
2337func (iter AppServiceEnvironmentCollectionIterator) Response() AppServiceEnvironmentCollection {
2338	return iter.page.Response()
2339}
2340
2341// Value returns the current value or a zero-initialized value if the
2342// iterator has advanced beyond the end of the collection.
2343func (iter AppServiceEnvironmentCollectionIterator) Value() AppServiceEnvironmentResource {
2344	if !iter.page.NotDone() {
2345		return AppServiceEnvironmentResource{}
2346	}
2347	return iter.page.Values()[iter.i]
2348}
2349
2350// Creates a new instance of the AppServiceEnvironmentCollectionIterator type.
2351func NewAppServiceEnvironmentCollectionIterator(page AppServiceEnvironmentCollectionPage) AppServiceEnvironmentCollectionIterator {
2352	return AppServiceEnvironmentCollectionIterator{page: page}
2353}
2354
2355// IsEmpty returns true if the ListResult contains no values.
2356func (asec AppServiceEnvironmentCollection) IsEmpty() bool {
2357	return asec.Value == nil || len(*asec.Value) == 0
2358}
2359
2360// hasNextLink returns true if the NextLink is not empty.
2361func (asec AppServiceEnvironmentCollection) hasNextLink() bool {
2362	return asec.NextLink != nil && len(*asec.NextLink) != 0
2363}
2364
2365// appServiceEnvironmentCollectionPreparer prepares a request to retrieve the next set of results.
2366// It returns nil if no more results exist.
2367func (asec AppServiceEnvironmentCollection) appServiceEnvironmentCollectionPreparer(ctx context.Context) (*http.Request, error) {
2368	if !asec.hasNextLink() {
2369		return nil, nil
2370	}
2371	return autorest.Prepare((&http.Request{}).WithContext(ctx),
2372		autorest.AsJSON(),
2373		autorest.AsGet(),
2374		autorest.WithBaseURL(to.String(asec.NextLink)))
2375}
2376
2377// AppServiceEnvironmentCollectionPage contains a page of AppServiceEnvironmentResource values.
2378type AppServiceEnvironmentCollectionPage struct {
2379	fn   func(context.Context, AppServiceEnvironmentCollection) (AppServiceEnvironmentCollection, error)
2380	asec AppServiceEnvironmentCollection
2381}
2382
2383// NextWithContext advances to the next page of values.  If there was an error making
2384// the request the page does not advance and the error is returned.
2385func (page *AppServiceEnvironmentCollectionPage) NextWithContext(ctx context.Context) (err error) {
2386	if tracing.IsEnabled() {
2387		ctx = tracing.StartSpan(ctx, fqdn+"/AppServiceEnvironmentCollectionPage.NextWithContext")
2388		defer func() {
2389			sc := -1
2390			if page.Response().Response.Response != nil {
2391				sc = page.Response().Response.Response.StatusCode
2392			}
2393			tracing.EndSpan(ctx, sc, err)
2394		}()
2395	}
2396	for {
2397		next, err := page.fn(ctx, page.asec)
2398		if err != nil {
2399			return err
2400		}
2401		page.asec = next
2402		if !next.hasNextLink() || !next.IsEmpty() {
2403			break
2404		}
2405	}
2406	return nil
2407}
2408
2409// Next advances to the next page of values.  If there was an error making
2410// the request the page does not advance and the error is returned.
2411// Deprecated: Use NextWithContext() instead.
2412func (page *AppServiceEnvironmentCollectionPage) Next() error {
2413	return page.NextWithContext(context.Background())
2414}
2415
2416// NotDone returns true if the page enumeration should be started or is not yet complete.
2417func (page AppServiceEnvironmentCollectionPage) NotDone() bool {
2418	return !page.asec.IsEmpty()
2419}
2420
2421// Response returns the raw server response from the last page request.
2422func (page AppServiceEnvironmentCollectionPage) Response() AppServiceEnvironmentCollection {
2423	return page.asec
2424}
2425
2426// Values returns the slice of values for the current page or nil if there are no values.
2427func (page AppServiceEnvironmentCollectionPage) Values() []AppServiceEnvironmentResource {
2428	if page.asec.IsEmpty() {
2429		return nil
2430	}
2431	return *page.asec.Value
2432}
2433
2434// Creates a new instance of the AppServiceEnvironmentCollectionPage type.
2435func NewAppServiceEnvironmentCollectionPage(cur AppServiceEnvironmentCollection, getNextPage func(context.Context, AppServiceEnvironmentCollection) (AppServiceEnvironmentCollection, error)) AppServiceEnvironmentCollectionPage {
2436	return AppServiceEnvironmentCollectionPage{
2437		fn:   getNextPage,
2438		asec: cur,
2439	}
2440}
2441
2442// AppServiceEnvironmentPatchResource ARM resource for a app service environment.
2443type AppServiceEnvironmentPatchResource struct {
2444	// AppServiceEnvironment - Core resource properties
2445	*AppServiceEnvironment `json:"properties,omitempty"`
2446	// ID - READ-ONLY; Resource Id.
2447	ID *string `json:"id,omitempty"`
2448	// Name - READ-ONLY; Resource Name.
2449	Name *string `json:"name,omitempty"`
2450	// Kind - Kind of resource.
2451	Kind *string `json:"kind,omitempty"`
2452	// Type - READ-ONLY; Resource type.
2453	Type *string `json:"type,omitempty"`
2454}
2455
2456// MarshalJSON is the custom marshaler for AppServiceEnvironmentPatchResource.
2457func (asepr AppServiceEnvironmentPatchResource) MarshalJSON() ([]byte, error) {
2458	objectMap := make(map[string]interface{})
2459	if asepr.AppServiceEnvironment != nil {
2460		objectMap["properties"] = asepr.AppServiceEnvironment
2461	}
2462	if asepr.Kind != nil {
2463		objectMap["kind"] = asepr.Kind
2464	}
2465	return json.Marshal(objectMap)
2466}
2467
2468// UnmarshalJSON is the custom unmarshaler for AppServiceEnvironmentPatchResource struct.
2469func (asepr *AppServiceEnvironmentPatchResource) UnmarshalJSON(body []byte) error {
2470	var m map[string]*json.RawMessage
2471	err := json.Unmarshal(body, &m)
2472	if err != nil {
2473		return err
2474	}
2475	for k, v := range m {
2476		switch k {
2477		case "properties":
2478			if v != nil {
2479				var appServiceEnvironment AppServiceEnvironment
2480				err = json.Unmarshal(*v, &appServiceEnvironment)
2481				if err != nil {
2482					return err
2483				}
2484				asepr.AppServiceEnvironment = &appServiceEnvironment
2485			}
2486		case "id":
2487			if v != nil {
2488				var ID string
2489				err = json.Unmarshal(*v, &ID)
2490				if err != nil {
2491					return err
2492				}
2493				asepr.ID = &ID
2494			}
2495		case "name":
2496			if v != nil {
2497				var name string
2498				err = json.Unmarshal(*v, &name)
2499				if err != nil {
2500					return err
2501				}
2502				asepr.Name = &name
2503			}
2504		case "kind":
2505			if v != nil {
2506				var kind string
2507				err = json.Unmarshal(*v, &kind)
2508				if err != nil {
2509					return err
2510				}
2511				asepr.Kind = &kind
2512			}
2513		case "type":
2514			if v != nil {
2515				var typeVar string
2516				err = json.Unmarshal(*v, &typeVar)
2517				if err != nil {
2518					return err
2519				}
2520				asepr.Type = &typeVar
2521			}
2522		}
2523	}
2524
2525	return nil
2526}
2527
2528// AppServiceEnvironmentResource app Service Environment ARM resource.
2529type AppServiceEnvironmentResource struct {
2530	autorest.Response `json:"-"`
2531	// AppServiceEnvironment - Core resource properties
2532	*AppServiceEnvironment `json:"properties,omitempty"`
2533	// ID - READ-ONLY; Resource Id.
2534	ID *string `json:"id,omitempty"`
2535	// Name - READ-ONLY; Resource Name.
2536	Name *string `json:"name,omitempty"`
2537	// Kind - Kind of resource.
2538	Kind *string `json:"kind,omitempty"`
2539	// Location - Resource Location.
2540	Location *string `json:"location,omitempty"`
2541	// Type - READ-ONLY; Resource type.
2542	Type *string `json:"type,omitempty"`
2543	// Tags - Resource tags.
2544	Tags map[string]*string `json:"tags"`
2545}
2546
2547// MarshalJSON is the custom marshaler for AppServiceEnvironmentResource.
2548func (aser AppServiceEnvironmentResource) MarshalJSON() ([]byte, error) {
2549	objectMap := make(map[string]interface{})
2550	if aser.AppServiceEnvironment != nil {
2551		objectMap["properties"] = aser.AppServiceEnvironment
2552	}
2553	if aser.Kind != nil {
2554		objectMap["kind"] = aser.Kind
2555	}
2556	if aser.Location != nil {
2557		objectMap["location"] = aser.Location
2558	}
2559	if aser.Tags != nil {
2560		objectMap["tags"] = aser.Tags
2561	}
2562	return json.Marshal(objectMap)
2563}
2564
2565// UnmarshalJSON is the custom unmarshaler for AppServiceEnvironmentResource struct.
2566func (aser *AppServiceEnvironmentResource) UnmarshalJSON(body []byte) error {
2567	var m map[string]*json.RawMessage
2568	err := json.Unmarshal(body, &m)
2569	if err != nil {
2570		return err
2571	}
2572	for k, v := range m {
2573		switch k {
2574		case "properties":
2575			if v != nil {
2576				var appServiceEnvironment AppServiceEnvironment
2577				err = json.Unmarshal(*v, &appServiceEnvironment)
2578				if err != nil {
2579					return err
2580				}
2581				aser.AppServiceEnvironment = &appServiceEnvironment
2582			}
2583		case "id":
2584			if v != nil {
2585				var ID string
2586				err = json.Unmarshal(*v, &ID)
2587				if err != nil {
2588					return err
2589				}
2590				aser.ID = &ID
2591			}
2592		case "name":
2593			if v != nil {
2594				var name string
2595				err = json.Unmarshal(*v, &name)
2596				if err != nil {
2597					return err
2598				}
2599				aser.Name = &name
2600			}
2601		case "kind":
2602			if v != nil {
2603				var kind string
2604				err = json.Unmarshal(*v, &kind)
2605				if err != nil {
2606					return err
2607				}
2608				aser.Kind = &kind
2609			}
2610		case "location":
2611			if v != nil {
2612				var location string
2613				err = json.Unmarshal(*v, &location)
2614				if err != nil {
2615					return err
2616				}
2617				aser.Location = &location
2618			}
2619		case "type":
2620			if v != nil {
2621				var typeVar string
2622				err = json.Unmarshal(*v, &typeVar)
2623				if err != nil {
2624					return err
2625				}
2626				aser.Type = &typeVar
2627			}
2628		case "tags":
2629			if v != nil {
2630				var tags map[string]*string
2631				err = json.Unmarshal(*v, &tags)
2632				if err != nil {
2633					return err
2634				}
2635				aser.Tags = tags
2636			}
2637		}
2638	}
2639
2640	return nil
2641}
2642
2643// AppServiceEnvironmentsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
2644// long-running operation.
2645type AppServiceEnvironmentsCreateOrUpdateFuture struct {
2646	azure.FutureAPI
2647	// Result returns the result of the asynchronous operation.
2648	// If the operation has not completed it will return an error.
2649	Result func(AppServiceEnvironmentsClient) (AppServiceEnvironmentResource, error)
2650}
2651
2652// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2653func (future *AppServiceEnvironmentsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
2654	var azFuture azure.Future
2655	if err := json.Unmarshal(body, &azFuture); err != nil {
2656		return err
2657	}
2658	future.FutureAPI = &azFuture
2659	future.Result = future.result
2660	return nil
2661}
2662
2663// result is the default implementation for AppServiceEnvironmentsCreateOrUpdateFuture.Result.
2664func (future *AppServiceEnvironmentsCreateOrUpdateFuture) result(client AppServiceEnvironmentsClient) (aser AppServiceEnvironmentResource, err error) {
2665	var done bool
2666	done, err = future.DoneWithContext(context.Background(), client)
2667	if err != nil {
2668		err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
2669		return
2670	}
2671	if !done {
2672		aser.Response.Response = future.Response()
2673		err = azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsCreateOrUpdateFuture")
2674		return
2675	}
2676	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2677	if aser.Response.Response, err = future.GetResult(sender); err == nil && aser.Response.Response.StatusCode != http.StatusNoContent {
2678		aser, err = client.CreateOrUpdateResponder(aser.Response.Response)
2679		if err != nil {
2680			err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsCreateOrUpdateFuture", "Result", aser.Response.Response, "Failure responding to request")
2681		}
2682	}
2683	return
2684}
2685
2686// AppServiceEnvironmentsCreateOrUpdateMultiRolePoolFuture an abstraction for monitoring and retrieving the
2687// results of a long-running operation.
2688type AppServiceEnvironmentsCreateOrUpdateMultiRolePoolFuture struct {
2689	azure.FutureAPI
2690	// Result returns the result of the asynchronous operation.
2691	// If the operation has not completed it will return an error.
2692	Result func(AppServiceEnvironmentsClient) (WorkerPoolResource, error)
2693}
2694
2695// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2696func (future *AppServiceEnvironmentsCreateOrUpdateMultiRolePoolFuture) UnmarshalJSON(body []byte) error {
2697	var azFuture azure.Future
2698	if err := json.Unmarshal(body, &azFuture); err != nil {
2699		return err
2700	}
2701	future.FutureAPI = &azFuture
2702	future.Result = future.result
2703	return nil
2704}
2705
2706// result is the default implementation for AppServiceEnvironmentsCreateOrUpdateMultiRolePoolFuture.Result.
2707func (future *AppServiceEnvironmentsCreateOrUpdateMultiRolePoolFuture) result(client AppServiceEnvironmentsClient) (wpr WorkerPoolResource, err error) {
2708	var done bool
2709	done, err = future.DoneWithContext(context.Background(), client)
2710	if err != nil {
2711		err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsCreateOrUpdateMultiRolePoolFuture", "Result", future.Response(), "Polling failure")
2712		return
2713	}
2714	if !done {
2715		wpr.Response.Response = future.Response()
2716		err = azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsCreateOrUpdateMultiRolePoolFuture")
2717		return
2718	}
2719	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2720	if wpr.Response.Response, err = future.GetResult(sender); err == nil && wpr.Response.Response.StatusCode != http.StatusNoContent {
2721		wpr, err = client.CreateOrUpdateMultiRolePoolResponder(wpr.Response.Response)
2722		if err != nil {
2723			err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsCreateOrUpdateMultiRolePoolFuture", "Result", wpr.Response.Response, "Failure responding to request")
2724		}
2725	}
2726	return
2727}
2728
2729// AppServiceEnvironmentsCreateOrUpdateWorkerPoolFuture an abstraction for monitoring and retrieving the
2730// results of a long-running operation.
2731type AppServiceEnvironmentsCreateOrUpdateWorkerPoolFuture struct {
2732	azure.FutureAPI
2733	// Result returns the result of the asynchronous operation.
2734	// If the operation has not completed it will return an error.
2735	Result func(AppServiceEnvironmentsClient) (WorkerPoolResource, error)
2736}
2737
2738// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2739func (future *AppServiceEnvironmentsCreateOrUpdateWorkerPoolFuture) UnmarshalJSON(body []byte) error {
2740	var azFuture azure.Future
2741	if err := json.Unmarshal(body, &azFuture); err != nil {
2742		return err
2743	}
2744	future.FutureAPI = &azFuture
2745	future.Result = future.result
2746	return nil
2747}
2748
2749// result is the default implementation for AppServiceEnvironmentsCreateOrUpdateWorkerPoolFuture.Result.
2750func (future *AppServiceEnvironmentsCreateOrUpdateWorkerPoolFuture) result(client AppServiceEnvironmentsClient) (wpr WorkerPoolResource, err error) {
2751	var done bool
2752	done, err = future.DoneWithContext(context.Background(), client)
2753	if err != nil {
2754		err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsCreateOrUpdateWorkerPoolFuture", "Result", future.Response(), "Polling failure")
2755		return
2756	}
2757	if !done {
2758		wpr.Response.Response = future.Response()
2759		err = azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsCreateOrUpdateWorkerPoolFuture")
2760		return
2761	}
2762	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2763	if wpr.Response.Response, err = future.GetResult(sender); err == nil && wpr.Response.Response.StatusCode != http.StatusNoContent {
2764		wpr, err = client.CreateOrUpdateWorkerPoolResponder(wpr.Response.Response)
2765		if err != nil {
2766			err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsCreateOrUpdateWorkerPoolFuture", "Result", wpr.Response.Response, "Failure responding to request")
2767		}
2768	}
2769	return
2770}
2771
2772// AppServiceEnvironmentsDeleteFuture an abstraction for monitoring and retrieving the results of a
2773// long-running operation.
2774type AppServiceEnvironmentsDeleteFuture struct {
2775	azure.FutureAPI
2776	// Result returns the result of the asynchronous operation.
2777	// If the operation has not completed it will return an error.
2778	Result func(AppServiceEnvironmentsClient) (autorest.Response, error)
2779}
2780
2781// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2782func (future *AppServiceEnvironmentsDeleteFuture) UnmarshalJSON(body []byte) error {
2783	var azFuture azure.Future
2784	if err := json.Unmarshal(body, &azFuture); err != nil {
2785		return err
2786	}
2787	future.FutureAPI = &azFuture
2788	future.Result = future.result
2789	return nil
2790}
2791
2792// result is the default implementation for AppServiceEnvironmentsDeleteFuture.Result.
2793func (future *AppServiceEnvironmentsDeleteFuture) result(client AppServiceEnvironmentsClient) (ar autorest.Response, err error) {
2794	var done bool
2795	done, err = future.DoneWithContext(context.Background(), client)
2796	if err != nil {
2797		err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsDeleteFuture", "Result", future.Response(), "Polling failure")
2798		return
2799	}
2800	if !done {
2801		ar.Response = future.Response()
2802		err = azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsDeleteFuture")
2803		return
2804	}
2805	ar.Response = future.Response()
2806	return
2807}
2808
2809// AppServiceEnvironmentsResumeAllFuture an abstraction for monitoring and retrieving the results of a
2810// long-running operation.
2811type AppServiceEnvironmentsResumeAllFuture struct {
2812	azure.FutureAPI
2813	// Result returns the result of the asynchronous operation.
2814	// If the operation has not completed it will return an error.
2815	Result func(AppServiceEnvironmentsClient) (AppCollectionPage, error)
2816}
2817
2818// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2819func (future *AppServiceEnvironmentsResumeAllFuture) UnmarshalJSON(body []byte) error {
2820	var azFuture azure.Future
2821	if err := json.Unmarshal(body, &azFuture); err != nil {
2822		return err
2823	}
2824	future.FutureAPI = &azFuture
2825	future.Result = future.result
2826	return nil
2827}
2828
2829// result is the default implementation for AppServiceEnvironmentsResumeAllFuture.Result.
2830func (future *AppServiceEnvironmentsResumeAllFuture) result(client AppServiceEnvironmentsClient) (acp AppCollectionPage, err error) {
2831	var done bool
2832	done, err = future.DoneWithContext(context.Background(), client)
2833	if err != nil {
2834		err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsResumeAllFuture", "Result", future.Response(), "Polling failure")
2835		return
2836	}
2837	if !done {
2838		acp.ac.Response.Response = future.Response()
2839		err = azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsResumeAllFuture")
2840		return
2841	}
2842	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2843	if acp.ac.Response.Response, err = future.GetResult(sender); err == nil && acp.ac.Response.Response.StatusCode != http.StatusNoContent {
2844		acp, err = client.ResumeResponder(acp.ac.Response.Response)
2845		if err != nil {
2846			err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsResumeAllFuture", "Result", acp.ac.Response.Response, "Failure responding to request")
2847		}
2848	}
2849	return
2850}
2851
2852// AppServiceEnvironmentsResumeFuture an abstraction for monitoring and retrieving the results of a
2853// long-running operation.
2854type AppServiceEnvironmentsResumeFuture struct {
2855	azure.FutureAPI
2856	// Result returns the result of the asynchronous operation.
2857	// If the operation has not completed it will return an error.
2858	Result func(AppServiceEnvironmentsClient) (AppCollectionPage, error)
2859}
2860
2861// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2862func (future *AppServiceEnvironmentsResumeFuture) UnmarshalJSON(body []byte) error {
2863	var azFuture azure.Future
2864	if err := json.Unmarshal(body, &azFuture); err != nil {
2865		return err
2866	}
2867	future.FutureAPI = &azFuture
2868	future.Result = future.result
2869	return nil
2870}
2871
2872// result is the default implementation for AppServiceEnvironmentsResumeFuture.Result.
2873func (future *AppServiceEnvironmentsResumeFuture) result(client AppServiceEnvironmentsClient) (acp AppCollectionPage, err error) {
2874	var done bool
2875	done, err = future.DoneWithContext(context.Background(), client)
2876	if err != nil {
2877		err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsResumeFuture", "Result", future.Response(), "Polling failure")
2878		return
2879	}
2880	if !done {
2881		acp.ac.Response.Response = future.Response()
2882		err = azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsResumeFuture")
2883		return
2884	}
2885	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2886	if acp.ac.Response.Response, err = future.GetResult(sender); err == nil && acp.ac.Response.Response.StatusCode != http.StatusNoContent {
2887		acp, err = client.ResumeResponder(acp.ac.Response.Response)
2888		if err != nil {
2889			err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsResumeFuture", "Result", acp.ac.Response.Response, "Failure responding to request")
2890		}
2891	}
2892	return
2893}
2894
2895// AppServiceEnvironmentsSuspendAllFuture an abstraction for monitoring and retrieving the results of a
2896// long-running operation.
2897type AppServiceEnvironmentsSuspendAllFuture struct {
2898	azure.FutureAPI
2899	// Result returns the result of the asynchronous operation.
2900	// If the operation has not completed it will return an error.
2901	Result func(AppServiceEnvironmentsClient) (AppCollectionPage, error)
2902}
2903
2904// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2905func (future *AppServiceEnvironmentsSuspendAllFuture) UnmarshalJSON(body []byte) error {
2906	var azFuture azure.Future
2907	if err := json.Unmarshal(body, &azFuture); err != nil {
2908		return err
2909	}
2910	future.FutureAPI = &azFuture
2911	future.Result = future.result
2912	return nil
2913}
2914
2915// result is the default implementation for AppServiceEnvironmentsSuspendAllFuture.Result.
2916func (future *AppServiceEnvironmentsSuspendAllFuture) result(client AppServiceEnvironmentsClient) (acp AppCollectionPage, err error) {
2917	var done bool
2918	done, err = future.DoneWithContext(context.Background(), client)
2919	if err != nil {
2920		err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsSuspendAllFuture", "Result", future.Response(), "Polling failure")
2921		return
2922	}
2923	if !done {
2924		acp.ac.Response.Response = future.Response()
2925		err = azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsSuspendAllFuture")
2926		return
2927	}
2928	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2929	if acp.ac.Response.Response, err = future.GetResult(sender); err == nil && acp.ac.Response.Response.StatusCode != http.StatusNoContent {
2930		acp, err = client.SuspendResponder(acp.ac.Response.Response)
2931		if err != nil {
2932			err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsSuspendAllFuture", "Result", acp.ac.Response.Response, "Failure responding to request")
2933		}
2934	}
2935	return
2936}
2937
2938// AppServiceEnvironmentsSuspendFuture an abstraction for monitoring and retrieving the results of a
2939// long-running operation.
2940type AppServiceEnvironmentsSuspendFuture struct {
2941	azure.FutureAPI
2942	// Result returns the result of the asynchronous operation.
2943	// If the operation has not completed it will return an error.
2944	Result func(AppServiceEnvironmentsClient) (AppCollectionPage, error)
2945}
2946
2947// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2948func (future *AppServiceEnvironmentsSuspendFuture) UnmarshalJSON(body []byte) error {
2949	var azFuture azure.Future
2950	if err := json.Unmarshal(body, &azFuture); err != nil {
2951		return err
2952	}
2953	future.FutureAPI = &azFuture
2954	future.Result = future.result
2955	return nil
2956}
2957
2958// result is the default implementation for AppServiceEnvironmentsSuspendFuture.Result.
2959func (future *AppServiceEnvironmentsSuspendFuture) result(client AppServiceEnvironmentsClient) (acp AppCollectionPage, err error) {
2960	var done bool
2961	done, err = future.DoneWithContext(context.Background(), client)
2962	if err != nil {
2963		err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsSuspendFuture", "Result", future.Response(), "Polling failure")
2964		return
2965	}
2966	if !done {
2967		acp.ac.Response.Response = future.Response()
2968		err = azure.NewAsyncOpIncompleteError("web.AppServiceEnvironmentsSuspendFuture")
2969		return
2970	}
2971	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2972	if acp.ac.Response.Response, err = future.GetResult(sender); err == nil && acp.ac.Response.Response.StatusCode != http.StatusNoContent {
2973		acp, err = client.SuspendResponder(acp.ac.Response.Response)
2974		if err != nil {
2975			err = autorest.NewErrorWithError(err, "web.AppServiceEnvironmentsSuspendFuture", "Result", acp.ac.Response.Response, "Failure responding to request")
2976		}
2977	}
2978	return
2979}
2980
2981// AppServicePlan app Service plan.
2982type AppServicePlan struct {
2983	autorest.Response `json:"-"`
2984	// AppServicePlanProperties - AppServicePlan resource specific properties
2985	*AppServicePlanProperties `json:"properties,omitempty"`
2986	Sku                       *SkuDescription `json:"sku,omitempty"`
2987	// ID - READ-ONLY; Resource Id.
2988	ID *string `json:"id,omitempty"`
2989	// Name - READ-ONLY; Resource Name.
2990	Name *string `json:"name,omitempty"`
2991	// Kind - Kind of resource.
2992	Kind *string `json:"kind,omitempty"`
2993	// Location - Resource Location.
2994	Location *string `json:"location,omitempty"`
2995	// Type - READ-ONLY; Resource type.
2996	Type *string `json:"type,omitempty"`
2997	// Tags - Resource tags.
2998	Tags map[string]*string `json:"tags"`
2999}
3000
3001// MarshalJSON is the custom marshaler for AppServicePlan.
3002func (asp AppServicePlan) MarshalJSON() ([]byte, error) {
3003	objectMap := make(map[string]interface{})
3004	if asp.AppServicePlanProperties != nil {
3005		objectMap["properties"] = asp.AppServicePlanProperties
3006	}
3007	if asp.Sku != nil {
3008		objectMap["sku"] = asp.Sku
3009	}
3010	if asp.Kind != nil {
3011		objectMap["kind"] = asp.Kind
3012	}
3013	if asp.Location != nil {
3014		objectMap["location"] = asp.Location
3015	}
3016	if asp.Tags != nil {
3017		objectMap["tags"] = asp.Tags
3018	}
3019	return json.Marshal(objectMap)
3020}
3021
3022// UnmarshalJSON is the custom unmarshaler for AppServicePlan struct.
3023func (asp *AppServicePlan) UnmarshalJSON(body []byte) error {
3024	var m map[string]*json.RawMessage
3025	err := json.Unmarshal(body, &m)
3026	if err != nil {
3027		return err
3028	}
3029	for k, v := range m {
3030		switch k {
3031		case "properties":
3032			if v != nil {
3033				var appServicePlanProperties AppServicePlanProperties
3034				err = json.Unmarshal(*v, &appServicePlanProperties)
3035				if err != nil {
3036					return err
3037				}
3038				asp.AppServicePlanProperties = &appServicePlanProperties
3039			}
3040		case "sku":
3041			if v != nil {
3042				var sku SkuDescription
3043				err = json.Unmarshal(*v, &sku)
3044				if err != nil {
3045					return err
3046				}
3047				asp.Sku = &sku
3048			}
3049		case "id":
3050			if v != nil {
3051				var ID string
3052				err = json.Unmarshal(*v, &ID)
3053				if err != nil {
3054					return err
3055				}
3056				asp.ID = &ID
3057			}
3058		case "name":
3059			if v != nil {
3060				var name string
3061				err = json.Unmarshal(*v, &name)
3062				if err != nil {
3063					return err
3064				}
3065				asp.Name = &name
3066			}
3067		case "kind":
3068			if v != nil {
3069				var kind string
3070				err = json.Unmarshal(*v, &kind)
3071				if err != nil {
3072					return err
3073				}
3074				asp.Kind = &kind
3075			}
3076		case "location":
3077			if v != nil {
3078				var location string
3079				err = json.Unmarshal(*v, &location)
3080				if err != nil {
3081					return err
3082				}
3083				asp.Location = &location
3084			}
3085		case "type":
3086			if v != nil {
3087				var typeVar string
3088				err = json.Unmarshal(*v, &typeVar)
3089				if err != nil {
3090					return err
3091				}
3092				asp.Type = &typeVar
3093			}
3094		case "tags":
3095			if v != nil {
3096				var tags map[string]*string
3097				err = json.Unmarshal(*v, &tags)
3098				if err != nil {
3099					return err
3100				}
3101				asp.Tags = tags
3102			}
3103		}
3104	}
3105
3106	return nil
3107}
3108
3109// AppServicePlanCollection collection of App Service plans.
3110type AppServicePlanCollection struct {
3111	autorest.Response `json:"-"`
3112	// Value - Collection of resources.
3113	Value *[]AppServicePlan `json:"value,omitempty"`
3114	// NextLink - Link to next page of resources.
3115	NextLink *string `json:"nextLink,omitempty"`
3116}
3117
3118// AppServicePlanCollectionIterator provides access to a complete listing of AppServicePlan values.
3119type AppServicePlanCollectionIterator struct {
3120	i    int
3121	page AppServicePlanCollectionPage
3122}
3123
3124// NextWithContext advances to the next value.  If there was an error making
3125// the request the iterator does not advance and the error is returned.
3126func (iter *AppServicePlanCollectionIterator) NextWithContext(ctx context.Context) (err error) {
3127	if tracing.IsEnabled() {
3128		ctx = tracing.StartSpan(ctx, fqdn+"/AppServicePlanCollectionIterator.NextWithContext")
3129		defer func() {
3130			sc := -1
3131			if iter.Response().Response.Response != nil {
3132				sc = iter.Response().Response.Response.StatusCode
3133			}
3134			tracing.EndSpan(ctx, sc, err)
3135		}()
3136	}
3137	iter.i++
3138	if iter.i < len(iter.page.Values()) {
3139		return nil
3140	}
3141	err = iter.page.NextWithContext(ctx)
3142	if err != nil {
3143		iter.i--
3144		return err
3145	}
3146	iter.i = 0
3147	return nil
3148}
3149
3150// Next advances to the next value.  If there was an error making
3151// the request the iterator does not advance and the error is returned.
3152// Deprecated: Use NextWithContext() instead.
3153func (iter *AppServicePlanCollectionIterator) Next() error {
3154	return iter.NextWithContext(context.Background())
3155}
3156
3157// NotDone returns true if the enumeration should be started or is not yet complete.
3158func (iter AppServicePlanCollectionIterator) NotDone() bool {
3159	return iter.page.NotDone() && iter.i < len(iter.page.Values())
3160}
3161
3162// Response returns the raw server response from the last page request.
3163func (iter AppServicePlanCollectionIterator) Response() AppServicePlanCollection {
3164	return iter.page.Response()
3165}
3166
3167// Value returns the current value or a zero-initialized value if the
3168// iterator has advanced beyond the end of the collection.
3169func (iter AppServicePlanCollectionIterator) Value() AppServicePlan {
3170	if !iter.page.NotDone() {
3171		return AppServicePlan{}
3172	}
3173	return iter.page.Values()[iter.i]
3174}
3175
3176// Creates a new instance of the AppServicePlanCollectionIterator type.
3177func NewAppServicePlanCollectionIterator(page AppServicePlanCollectionPage) AppServicePlanCollectionIterator {
3178	return AppServicePlanCollectionIterator{page: page}
3179}
3180
3181// IsEmpty returns true if the ListResult contains no values.
3182func (aspc AppServicePlanCollection) IsEmpty() bool {
3183	return aspc.Value == nil || len(*aspc.Value) == 0
3184}
3185
3186// hasNextLink returns true if the NextLink is not empty.
3187func (aspc AppServicePlanCollection) hasNextLink() bool {
3188	return aspc.NextLink != nil && len(*aspc.NextLink) != 0
3189}
3190
3191// appServicePlanCollectionPreparer prepares a request to retrieve the next set of results.
3192// It returns nil if no more results exist.
3193func (aspc AppServicePlanCollection) appServicePlanCollectionPreparer(ctx context.Context) (*http.Request, error) {
3194	if !aspc.hasNextLink() {
3195		return nil, nil
3196	}
3197	return autorest.Prepare((&http.Request{}).WithContext(ctx),
3198		autorest.AsJSON(),
3199		autorest.AsGet(),
3200		autorest.WithBaseURL(to.String(aspc.NextLink)))
3201}
3202
3203// AppServicePlanCollectionPage contains a page of AppServicePlan values.
3204type AppServicePlanCollectionPage struct {
3205	fn   func(context.Context, AppServicePlanCollection) (AppServicePlanCollection, error)
3206	aspc AppServicePlanCollection
3207}
3208
3209// NextWithContext advances to the next page of values.  If there was an error making
3210// the request the page does not advance and the error is returned.
3211func (page *AppServicePlanCollectionPage) NextWithContext(ctx context.Context) (err error) {
3212	if tracing.IsEnabled() {
3213		ctx = tracing.StartSpan(ctx, fqdn+"/AppServicePlanCollectionPage.NextWithContext")
3214		defer func() {
3215			sc := -1
3216			if page.Response().Response.Response != nil {
3217				sc = page.Response().Response.Response.StatusCode
3218			}
3219			tracing.EndSpan(ctx, sc, err)
3220		}()
3221	}
3222	for {
3223		next, err := page.fn(ctx, page.aspc)
3224		if err != nil {
3225			return err
3226		}
3227		page.aspc = next
3228		if !next.hasNextLink() || !next.IsEmpty() {
3229			break
3230		}
3231	}
3232	return nil
3233}
3234
3235// Next advances to the next page of values.  If there was an error making
3236// the request the page does not advance and the error is returned.
3237// Deprecated: Use NextWithContext() instead.
3238func (page *AppServicePlanCollectionPage) Next() error {
3239	return page.NextWithContext(context.Background())
3240}
3241
3242// NotDone returns true if the page enumeration should be started or is not yet complete.
3243func (page AppServicePlanCollectionPage) NotDone() bool {
3244	return !page.aspc.IsEmpty()
3245}
3246
3247// Response returns the raw server response from the last page request.
3248func (page AppServicePlanCollectionPage) Response() AppServicePlanCollection {
3249	return page.aspc
3250}
3251
3252// Values returns the slice of values for the current page or nil if there are no values.
3253func (page AppServicePlanCollectionPage) Values() []AppServicePlan {
3254	if page.aspc.IsEmpty() {
3255		return nil
3256	}
3257	return *page.aspc.Value
3258}
3259
3260// Creates a new instance of the AppServicePlanCollectionPage type.
3261func NewAppServicePlanCollectionPage(cur AppServicePlanCollection, getNextPage func(context.Context, AppServicePlanCollection) (AppServicePlanCollection, error)) AppServicePlanCollectionPage {
3262	return AppServicePlanCollectionPage{
3263		fn:   getNextPage,
3264		aspc: cur,
3265	}
3266}
3267
3268// AppServicePlanPatchResource ARM resource for a app service plan.
3269type AppServicePlanPatchResource struct {
3270	// AppServicePlanPatchResourceProperties - AppServicePlanPatchResource resource specific properties
3271	*AppServicePlanPatchResourceProperties `json:"properties,omitempty"`
3272	// ID - READ-ONLY; Resource Id.
3273	ID *string `json:"id,omitempty"`
3274	// Name - READ-ONLY; Resource Name.
3275	Name *string `json:"name,omitempty"`
3276	// Kind - Kind of resource.
3277	Kind *string `json:"kind,omitempty"`
3278	// Type - READ-ONLY; Resource type.
3279	Type *string `json:"type,omitempty"`
3280}
3281
3282// MarshalJSON is the custom marshaler for AppServicePlanPatchResource.
3283func (asppr AppServicePlanPatchResource) MarshalJSON() ([]byte, error) {
3284	objectMap := make(map[string]interface{})
3285	if asppr.AppServicePlanPatchResourceProperties != nil {
3286		objectMap["properties"] = asppr.AppServicePlanPatchResourceProperties
3287	}
3288	if asppr.Kind != nil {
3289		objectMap["kind"] = asppr.Kind
3290	}
3291	return json.Marshal(objectMap)
3292}
3293
3294// UnmarshalJSON is the custom unmarshaler for AppServicePlanPatchResource struct.
3295func (asppr *AppServicePlanPatchResource) UnmarshalJSON(body []byte) error {
3296	var m map[string]*json.RawMessage
3297	err := json.Unmarshal(body, &m)
3298	if err != nil {
3299		return err
3300	}
3301	for k, v := range m {
3302		switch k {
3303		case "properties":
3304			if v != nil {
3305				var appServicePlanPatchResourceProperties AppServicePlanPatchResourceProperties
3306				err = json.Unmarshal(*v, &appServicePlanPatchResourceProperties)
3307				if err != nil {
3308					return err
3309				}
3310				asppr.AppServicePlanPatchResourceProperties = &appServicePlanPatchResourceProperties
3311			}
3312		case "id":
3313			if v != nil {
3314				var ID string
3315				err = json.Unmarshal(*v, &ID)
3316				if err != nil {
3317					return err
3318				}
3319				asppr.ID = &ID
3320			}
3321		case "name":
3322			if v != nil {
3323				var name string
3324				err = json.Unmarshal(*v, &name)
3325				if err != nil {
3326					return err
3327				}
3328				asppr.Name = &name
3329			}
3330		case "kind":
3331			if v != nil {
3332				var kind string
3333				err = json.Unmarshal(*v, &kind)
3334				if err != nil {
3335					return err
3336				}
3337				asppr.Kind = &kind
3338			}
3339		case "type":
3340			if v != nil {
3341				var typeVar string
3342				err = json.Unmarshal(*v, &typeVar)
3343				if err != nil {
3344					return err
3345				}
3346				asppr.Type = &typeVar
3347			}
3348		}
3349	}
3350
3351	return nil
3352}
3353
3354// AppServicePlanPatchResourceProperties appServicePlanPatchResource resource specific properties
3355type AppServicePlanPatchResourceProperties struct {
3356	// Name - Name for the App Service plan.
3357	Name *string `json:"name,omitempty"`
3358	// WorkerTierName - Target worker tier assigned to the App Service plan.
3359	WorkerTierName *string `json:"workerTierName,omitempty"`
3360	// Status - READ-ONLY; App Service plan status. Possible values include: 'StatusOptionsReady', 'StatusOptionsPending', 'StatusOptionsCreating'
3361	Status StatusOptions `json:"status,omitempty"`
3362	// Subscription - READ-ONLY; App Service plan subscription.
3363	Subscription *string `json:"subscription,omitempty"`
3364	// AdminSiteName - App Service plan administration site.
3365	AdminSiteName *string `json:"adminSiteName,omitempty"`
3366	// HostingEnvironmentProfile - Specification for the App Service Environment to use for the App Service plan.
3367	HostingEnvironmentProfile *HostingEnvironmentProfile `json:"hostingEnvironmentProfile,omitempty"`
3368	// MaximumNumberOfWorkers - READ-ONLY; Maximum number of instances that can be assigned to this App Service plan.
3369	MaximumNumberOfWorkers *int32 `json:"maximumNumberOfWorkers,omitempty"`
3370	// GeoRegion - READ-ONLY; Geographical location for the App Service plan.
3371	GeoRegion *string `json:"geoRegion,omitempty"`
3372	// PerSiteScaling - If <code>true</code>, apps assigned to this App Service plan can be scaled independently.
3373	// If <code>false</code>, apps assigned to this App Service plan will scale to all instances of the plan.
3374	PerSiteScaling *bool `json:"perSiteScaling,omitempty"`
3375	// NumberOfSites - READ-ONLY; Number of apps assigned to this App Service plan.
3376	NumberOfSites *int32 `json:"numberOfSites,omitempty"`
3377	// IsSpot - If <code>true</code>, this App Service Plan owns spot instances.
3378	IsSpot *bool `json:"isSpot,omitempty"`
3379	// SpotExpirationTime - The time when the server farm expires. Valid only if it is a spot server farm.
3380	SpotExpirationTime *date.Time `json:"spotExpirationTime,omitempty"`
3381	// ResourceGroup - READ-ONLY; Resource group of the App Service plan.
3382	ResourceGroup *string `json:"resourceGroup,omitempty"`
3383	// Reserved - If Linux app service plan <code>true</code>, <code>false</code> otherwise.
3384	Reserved *bool `json:"reserved,omitempty"`
3385	// TargetWorkerCount - Scaling worker count.
3386	TargetWorkerCount *int32 `json:"targetWorkerCount,omitempty"`
3387	// TargetWorkerSizeID - Scaling worker size ID.
3388	TargetWorkerSizeID *int32 `json:"targetWorkerSizeId,omitempty"`
3389	// ProvisioningState - READ-ONLY; Provisioning state of the App Service Environment. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateFailed', 'ProvisioningStateCanceled', 'ProvisioningStateInProgress', 'ProvisioningStateDeleting'
3390	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
3391}
3392
3393// MarshalJSON is the custom marshaler for AppServicePlanPatchResourceProperties.
3394func (asppr AppServicePlanPatchResourceProperties) MarshalJSON() ([]byte, error) {
3395	objectMap := make(map[string]interface{})
3396	if asppr.Name != nil {
3397		objectMap["name"] = asppr.Name
3398	}
3399	if asppr.WorkerTierName != nil {
3400		objectMap["workerTierName"] = asppr.WorkerTierName
3401	}
3402	if asppr.AdminSiteName != nil {
3403		objectMap["adminSiteName"] = asppr.AdminSiteName
3404	}
3405	if asppr.HostingEnvironmentProfile != nil {
3406		objectMap["hostingEnvironmentProfile"] = asppr.HostingEnvironmentProfile
3407	}
3408	if asppr.PerSiteScaling != nil {
3409		objectMap["perSiteScaling"] = asppr.PerSiteScaling
3410	}
3411	if asppr.IsSpot != nil {
3412		objectMap["isSpot"] = asppr.IsSpot
3413	}
3414	if asppr.SpotExpirationTime != nil {
3415		objectMap["spotExpirationTime"] = asppr.SpotExpirationTime
3416	}
3417	if asppr.Reserved != nil {
3418		objectMap["reserved"] = asppr.Reserved
3419	}
3420	if asppr.TargetWorkerCount != nil {
3421		objectMap["targetWorkerCount"] = asppr.TargetWorkerCount
3422	}
3423	if asppr.TargetWorkerSizeID != nil {
3424		objectMap["targetWorkerSizeId"] = asppr.TargetWorkerSizeID
3425	}
3426	return json.Marshal(objectMap)
3427}
3428
3429// AppServicePlanProperties appServicePlan resource specific properties
3430type AppServicePlanProperties struct {
3431	// Name - Name for the App Service plan.
3432	Name *string `json:"name,omitempty"`
3433	// WorkerTierName - Target worker tier assigned to the App Service plan.
3434	WorkerTierName *string `json:"workerTierName,omitempty"`
3435	// Status - READ-ONLY; App Service plan status. Possible values include: 'StatusOptionsReady', 'StatusOptionsPending', 'StatusOptionsCreating'
3436	Status StatusOptions `json:"status,omitempty"`
3437	// Subscription - READ-ONLY; App Service plan subscription.
3438	Subscription *string `json:"subscription,omitempty"`
3439	// AdminSiteName - App Service plan administration site.
3440	AdminSiteName *string `json:"adminSiteName,omitempty"`
3441	// HostingEnvironmentProfile - Specification for the App Service Environment to use for the App Service plan.
3442	HostingEnvironmentProfile *HostingEnvironmentProfile `json:"hostingEnvironmentProfile,omitempty"`
3443	// MaximumNumberOfWorkers - READ-ONLY; Maximum number of instances that can be assigned to this App Service plan.
3444	MaximumNumberOfWorkers *int32 `json:"maximumNumberOfWorkers,omitempty"`
3445	// GeoRegion - READ-ONLY; Geographical location for the App Service plan.
3446	GeoRegion *string `json:"geoRegion,omitempty"`
3447	// PerSiteScaling - If <code>true</code>, apps assigned to this App Service plan can be scaled independently.
3448	// If <code>false</code>, apps assigned to this App Service plan will scale to all instances of the plan.
3449	PerSiteScaling *bool `json:"perSiteScaling,omitempty"`
3450	// NumberOfSites - READ-ONLY; Number of apps assigned to this App Service plan.
3451	NumberOfSites *int32 `json:"numberOfSites,omitempty"`
3452	// IsSpot - If <code>true</code>, this App Service Plan owns spot instances.
3453	IsSpot *bool `json:"isSpot,omitempty"`
3454	// SpotExpirationTime - The time when the server farm expires. Valid only if it is a spot server farm.
3455	SpotExpirationTime *date.Time `json:"spotExpirationTime,omitempty"`
3456	// ResourceGroup - READ-ONLY; Resource group of the App Service plan.
3457	ResourceGroup *string `json:"resourceGroup,omitempty"`
3458	// Reserved - If Linux app service plan <code>true</code>, <code>false</code> otherwise.
3459	Reserved *bool `json:"reserved,omitempty"`
3460	// TargetWorkerCount - Scaling worker count.
3461	TargetWorkerCount *int32 `json:"targetWorkerCount,omitempty"`
3462	// TargetWorkerSizeID - Scaling worker size ID.
3463	TargetWorkerSizeID *int32 `json:"targetWorkerSizeId,omitempty"`
3464	// ProvisioningState - READ-ONLY; Provisioning state of the App Service Environment. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateFailed', 'ProvisioningStateCanceled', 'ProvisioningStateInProgress', 'ProvisioningStateDeleting'
3465	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
3466}
3467
3468// MarshalJSON is the custom marshaler for AppServicePlanProperties.
3469func (asp AppServicePlanProperties) MarshalJSON() ([]byte, error) {
3470	objectMap := make(map[string]interface{})
3471	if asp.Name != nil {
3472		objectMap["name"] = asp.Name
3473	}
3474	if asp.WorkerTierName != nil {
3475		objectMap["workerTierName"] = asp.WorkerTierName
3476	}
3477	if asp.AdminSiteName != nil {
3478		objectMap["adminSiteName"] = asp.AdminSiteName
3479	}
3480	if asp.HostingEnvironmentProfile != nil {
3481		objectMap["hostingEnvironmentProfile"] = asp.HostingEnvironmentProfile
3482	}
3483	if asp.PerSiteScaling != nil {
3484		objectMap["perSiteScaling"] = asp.PerSiteScaling
3485	}
3486	if asp.IsSpot != nil {
3487		objectMap["isSpot"] = asp.IsSpot
3488	}
3489	if asp.SpotExpirationTime != nil {
3490		objectMap["spotExpirationTime"] = asp.SpotExpirationTime
3491	}
3492	if asp.Reserved != nil {
3493		objectMap["reserved"] = asp.Reserved
3494	}
3495	if asp.TargetWorkerCount != nil {
3496		objectMap["targetWorkerCount"] = asp.TargetWorkerCount
3497	}
3498	if asp.TargetWorkerSizeID != nil {
3499		objectMap["targetWorkerSizeId"] = asp.TargetWorkerSizeID
3500	}
3501	return json.Marshal(objectMap)
3502}
3503
3504// AppServicePlansCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
3505// long-running operation.
3506type AppServicePlansCreateOrUpdateFuture struct {
3507	azure.FutureAPI
3508	// Result returns the result of the asynchronous operation.
3509	// If the operation has not completed it will return an error.
3510	Result func(AppServicePlansClient) (AppServicePlan, error)
3511}
3512
3513// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3514func (future *AppServicePlansCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
3515	var azFuture azure.Future
3516	if err := json.Unmarshal(body, &azFuture); err != nil {
3517		return err
3518	}
3519	future.FutureAPI = &azFuture
3520	future.Result = future.result
3521	return nil
3522}
3523
3524// result is the default implementation for AppServicePlansCreateOrUpdateFuture.Result.
3525func (future *AppServicePlansCreateOrUpdateFuture) result(client AppServicePlansClient) (asp AppServicePlan, err error) {
3526	var done bool
3527	done, err = future.DoneWithContext(context.Background(), client)
3528	if err != nil {
3529		err = autorest.NewErrorWithError(err, "web.AppServicePlansCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
3530		return
3531	}
3532	if !done {
3533		asp.Response.Response = future.Response()
3534		err = azure.NewAsyncOpIncompleteError("web.AppServicePlansCreateOrUpdateFuture")
3535		return
3536	}
3537	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3538	if asp.Response.Response, err = future.GetResult(sender); err == nil && asp.Response.Response.StatusCode != http.StatusNoContent {
3539		asp, err = client.CreateOrUpdateResponder(asp.Response.Response)
3540		if err != nil {
3541			err = autorest.NewErrorWithError(err, "web.AppServicePlansCreateOrUpdateFuture", "Result", asp.Response.Response, "Failure responding to request")
3542		}
3543	}
3544	return
3545}
3546
3547// AppsInstallSiteExtensionFuture an abstraction for monitoring and retrieving the results of a
3548// long-running operation.
3549type AppsInstallSiteExtensionFuture struct {
3550	azure.FutureAPI
3551	// Result returns the result of the asynchronous operation.
3552	// If the operation has not completed it will return an error.
3553	Result func(AppsClient) (SiteExtensionInfo, error)
3554}
3555
3556// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3557func (future *AppsInstallSiteExtensionFuture) UnmarshalJSON(body []byte) error {
3558	var azFuture azure.Future
3559	if err := json.Unmarshal(body, &azFuture); err != nil {
3560		return err
3561	}
3562	future.FutureAPI = &azFuture
3563	future.Result = future.result
3564	return nil
3565}
3566
3567// result is the default implementation for AppsInstallSiteExtensionFuture.Result.
3568func (future *AppsInstallSiteExtensionFuture) result(client AppsClient) (sei SiteExtensionInfo, err error) {
3569	var done bool
3570	done, err = future.DoneWithContext(context.Background(), client)
3571	if err != nil {
3572		err = autorest.NewErrorWithError(err, "web.AppsInstallSiteExtensionFuture", "Result", future.Response(), "Polling failure")
3573		return
3574	}
3575	if !done {
3576		sei.Response.Response = future.Response()
3577		err = azure.NewAsyncOpIncompleteError("web.AppsInstallSiteExtensionFuture")
3578		return
3579	}
3580	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3581	if sei.Response.Response, err = future.GetResult(sender); err == nil && sei.Response.Response.StatusCode != http.StatusNoContent {
3582		sei, err = client.InstallSiteExtensionResponder(sei.Response.Response)
3583		if err != nil {
3584			err = autorest.NewErrorWithError(err, "web.AppsInstallSiteExtensionFuture", "Result", sei.Response.Response, "Failure responding to request")
3585		}
3586	}
3587	return
3588}
3589
3590// AppsInstallSiteExtensionSlotFuture an abstraction for monitoring and retrieving the results of a
3591// long-running operation.
3592type AppsInstallSiteExtensionSlotFuture struct {
3593	azure.FutureAPI
3594	// Result returns the result of the asynchronous operation.
3595	// If the operation has not completed it will return an error.
3596	Result func(AppsClient) (SiteExtensionInfo, error)
3597}
3598
3599// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3600func (future *AppsInstallSiteExtensionSlotFuture) UnmarshalJSON(body []byte) error {
3601	var azFuture azure.Future
3602	if err := json.Unmarshal(body, &azFuture); err != nil {
3603		return err
3604	}
3605	future.FutureAPI = &azFuture
3606	future.Result = future.result
3607	return nil
3608}
3609
3610// result is the default implementation for AppsInstallSiteExtensionSlotFuture.Result.
3611func (future *AppsInstallSiteExtensionSlotFuture) result(client AppsClient) (sei SiteExtensionInfo, err error) {
3612	var done bool
3613	done, err = future.DoneWithContext(context.Background(), client)
3614	if err != nil {
3615		err = autorest.NewErrorWithError(err, "web.AppsInstallSiteExtensionSlotFuture", "Result", future.Response(), "Polling failure")
3616		return
3617	}
3618	if !done {
3619		sei.Response.Response = future.Response()
3620		err = azure.NewAsyncOpIncompleteError("web.AppsInstallSiteExtensionSlotFuture")
3621		return
3622	}
3623	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3624	if sei.Response.Response, err = future.GetResult(sender); err == nil && sei.Response.Response.StatusCode != http.StatusNoContent {
3625		sei, err = client.InstallSiteExtensionSlotResponder(sei.Response.Response)
3626		if err != nil {
3627			err = autorest.NewErrorWithError(err, "web.AppsInstallSiteExtensionSlotFuture", "Result", sei.Response.Response, "Failure responding to request")
3628		}
3629	}
3630	return
3631}
3632
3633// AppsListPublishingCredentialsFuture an abstraction for monitoring and retrieving the results of a
3634// long-running operation.
3635type AppsListPublishingCredentialsFuture struct {
3636	azure.FutureAPI
3637	// Result returns the result of the asynchronous operation.
3638	// If the operation has not completed it will return an error.
3639	Result func(AppsClient) (User, error)
3640}
3641
3642// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3643func (future *AppsListPublishingCredentialsFuture) UnmarshalJSON(body []byte) error {
3644	var azFuture azure.Future
3645	if err := json.Unmarshal(body, &azFuture); err != nil {
3646		return err
3647	}
3648	future.FutureAPI = &azFuture
3649	future.Result = future.result
3650	return nil
3651}
3652
3653// result is the default implementation for AppsListPublishingCredentialsFuture.Result.
3654func (future *AppsListPublishingCredentialsFuture) result(client AppsClient) (u User, err error) {
3655	var done bool
3656	done, err = future.DoneWithContext(context.Background(), client)
3657	if err != nil {
3658		err = autorest.NewErrorWithError(err, "web.AppsListPublishingCredentialsFuture", "Result", future.Response(), "Polling failure")
3659		return
3660	}
3661	if !done {
3662		u.Response.Response = future.Response()
3663		err = azure.NewAsyncOpIncompleteError("web.AppsListPublishingCredentialsFuture")
3664		return
3665	}
3666	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3667	if u.Response.Response, err = future.GetResult(sender); err == nil && u.Response.Response.StatusCode != http.StatusNoContent {
3668		u, err = client.ListPublishingCredentialsResponder(u.Response.Response)
3669		if err != nil {
3670			err = autorest.NewErrorWithError(err, "web.AppsListPublishingCredentialsFuture", "Result", u.Response.Response, "Failure responding to request")
3671		}
3672	}
3673	return
3674}
3675
3676// AppsListPublishingCredentialsSlotFuture an abstraction for monitoring and retrieving the results of a
3677// long-running operation.
3678type AppsListPublishingCredentialsSlotFuture struct {
3679	azure.FutureAPI
3680	// Result returns the result of the asynchronous operation.
3681	// If the operation has not completed it will return an error.
3682	Result func(AppsClient) (User, error)
3683}
3684
3685// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3686func (future *AppsListPublishingCredentialsSlotFuture) UnmarshalJSON(body []byte) error {
3687	var azFuture azure.Future
3688	if err := json.Unmarshal(body, &azFuture); err != nil {
3689		return err
3690	}
3691	future.FutureAPI = &azFuture
3692	future.Result = future.result
3693	return nil
3694}
3695
3696// result is the default implementation for AppsListPublishingCredentialsSlotFuture.Result.
3697func (future *AppsListPublishingCredentialsSlotFuture) result(client AppsClient) (u User, err error) {
3698	var done bool
3699	done, err = future.DoneWithContext(context.Background(), client)
3700	if err != nil {
3701		err = autorest.NewErrorWithError(err, "web.AppsListPublishingCredentialsSlotFuture", "Result", future.Response(), "Polling failure")
3702		return
3703	}
3704	if !done {
3705		u.Response.Response = future.Response()
3706		err = azure.NewAsyncOpIncompleteError("web.AppsListPublishingCredentialsSlotFuture")
3707		return
3708	}
3709	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3710	if u.Response.Response, err = future.GetResult(sender); err == nil && u.Response.Response.StatusCode != http.StatusNoContent {
3711		u, err = client.ListPublishingCredentialsSlotResponder(u.Response.Response)
3712		if err != nil {
3713			err = autorest.NewErrorWithError(err, "web.AppsListPublishingCredentialsSlotFuture", "Result", u.Response.Response, "Failure responding to request")
3714		}
3715	}
3716	return
3717}
3718
3719// AppsMigrateMySQLFuture an abstraction for monitoring and retrieving the results of a long-running
3720// operation.
3721type AppsMigrateMySQLFuture struct {
3722	azure.FutureAPI
3723	// Result returns the result of the asynchronous operation.
3724	// If the operation has not completed it will return an error.
3725	Result func(AppsClient) (Operation, error)
3726}
3727
3728// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3729func (future *AppsMigrateMySQLFuture) UnmarshalJSON(body []byte) error {
3730	var azFuture azure.Future
3731	if err := json.Unmarshal(body, &azFuture); err != nil {
3732		return err
3733	}
3734	future.FutureAPI = &azFuture
3735	future.Result = future.result
3736	return nil
3737}
3738
3739// result is the default implementation for AppsMigrateMySQLFuture.Result.
3740func (future *AppsMigrateMySQLFuture) result(client AppsClient) (o Operation, err error) {
3741	var done bool
3742	done, err = future.DoneWithContext(context.Background(), client)
3743	if err != nil {
3744		err = autorest.NewErrorWithError(err, "web.AppsMigrateMySQLFuture", "Result", future.Response(), "Polling failure")
3745		return
3746	}
3747	if !done {
3748		o.Response.Response = future.Response()
3749		err = azure.NewAsyncOpIncompleteError("web.AppsMigrateMySQLFuture")
3750		return
3751	}
3752	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3753	if o.Response.Response, err = future.GetResult(sender); err == nil && o.Response.Response.StatusCode != http.StatusNoContent {
3754		o, err = client.MigrateMySQLResponder(o.Response.Response)
3755		if err != nil {
3756			err = autorest.NewErrorWithError(err, "web.AppsMigrateMySQLFuture", "Result", o.Response.Response, "Failure responding to request")
3757		}
3758	}
3759	return
3760}
3761
3762// AppsMigrateStorageFuture an abstraction for monitoring and retrieving the results of a long-running
3763// operation.
3764type AppsMigrateStorageFuture struct {
3765	azure.FutureAPI
3766	// Result returns the result of the asynchronous operation.
3767	// If the operation has not completed it will return an error.
3768	Result func(AppsClient) (StorageMigrationResponse, error)
3769}
3770
3771// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3772func (future *AppsMigrateStorageFuture) UnmarshalJSON(body []byte) error {
3773	var azFuture azure.Future
3774	if err := json.Unmarshal(body, &azFuture); err != nil {
3775		return err
3776	}
3777	future.FutureAPI = &azFuture
3778	future.Result = future.result
3779	return nil
3780}
3781
3782// result is the default implementation for AppsMigrateStorageFuture.Result.
3783func (future *AppsMigrateStorageFuture) result(client AppsClient) (smr StorageMigrationResponse, err error) {
3784	var done bool
3785	done, err = future.DoneWithContext(context.Background(), client)
3786	if err != nil {
3787		err = autorest.NewErrorWithError(err, "web.AppsMigrateStorageFuture", "Result", future.Response(), "Polling failure")
3788		return
3789	}
3790	if !done {
3791		smr.Response.Response = future.Response()
3792		err = azure.NewAsyncOpIncompleteError("web.AppsMigrateStorageFuture")
3793		return
3794	}
3795	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3796	if smr.Response.Response, err = future.GetResult(sender); err == nil && smr.Response.Response.StatusCode != http.StatusNoContent {
3797		smr, err = client.MigrateStorageResponder(smr.Response.Response)
3798		if err != nil {
3799			err = autorest.NewErrorWithError(err, "web.AppsMigrateStorageFuture", "Result", smr.Response.Response, "Failure responding to request")
3800		}
3801	}
3802	return
3803}
3804
3805// AppsRecoverFuture an abstraction for monitoring and retrieving the results of a long-running operation.
3806type AppsRecoverFuture 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(AppsClient) (autorest.Response, error)
3811}
3812
3813// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3814func (future *AppsRecoverFuture) UnmarshalJSON(body []byte) error {
3815	var azFuture azure.Future
3816	if err := json.Unmarshal(body, &azFuture); err != nil {
3817		return err
3818	}
3819	future.FutureAPI = &azFuture
3820	future.Result = future.result
3821	return nil
3822}
3823
3824// result is the default implementation for AppsRecoverFuture.Result.
3825func (future *AppsRecoverFuture) result(client AppsClient) (ar autorest.Response, err error) {
3826	var done bool
3827	done, err = future.DoneWithContext(context.Background(), client)
3828	if err != nil {
3829		err = autorest.NewErrorWithError(err, "web.AppsRecoverFuture", "Result", future.Response(), "Polling failure")
3830		return
3831	}
3832	if !done {
3833		ar.Response = future.Response()
3834		err = azure.NewAsyncOpIncompleteError("web.AppsRecoverFuture")
3835		return
3836	}
3837	ar.Response = future.Response()
3838	return
3839}
3840
3841// AppsRecoverSlotFuture an abstraction for monitoring and retrieving the results of a long-running
3842// operation.
3843type AppsRecoverSlotFuture struct {
3844	azure.FutureAPI
3845	// Result returns the result of the asynchronous operation.
3846	// If the operation has not completed it will return an error.
3847	Result func(AppsClient) (autorest.Response, error)
3848}
3849
3850// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3851func (future *AppsRecoverSlotFuture) UnmarshalJSON(body []byte) error {
3852	var azFuture azure.Future
3853	if err := json.Unmarshal(body, &azFuture); err != nil {
3854		return err
3855	}
3856	future.FutureAPI = &azFuture
3857	future.Result = future.result
3858	return nil
3859}
3860
3861// result is the default implementation for AppsRecoverSlotFuture.Result.
3862func (future *AppsRecoverSlotFuture) result(client AppsClient) (ar autorest.Response, err error) {
3863	var done bool
3864	done, err = future.DoneWithContext(context.Background(), client)
3865	if err != nil {
3866		err = autorest.NewErrorWithError(err, "web.AppsRecoverSlotFuture", "Result", future.Response(), "Polling failure")
3867		return
3868	}
3869	if !done {
3870		ar.Response = future.Response()
3871		err = azure.NewAsyncOpIncompleteError("web.AppsRecoverSlotFuture")
3872		return
3873	}
3874	ar.Response = future.Response()
3875	return
3876}
3877
3878// AppsRestoreFuture an abstraction for monitoring and retrieving the results of a long-running operation.
3879type AppsRestoreFuture struct {
3880	azure.FutureAPI
3881	// Result returns the result of the asynchronous operation.
3882	// If the operation has not completed it will return an error.
3883	Result func(AppsClient) (RestoreResponse, error)
3884}
3885
3886// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3887func (future *AppsRestoreFuture) UnmarshalJSON(body []byte) error {
3888	var azFuture azure.Future
3889	if err := json.Unmarshal(body, &azFuture); err != nil {
3890		return err
3891	}
3892	future.FutureAPI = &azFuture
3893	future.Result = future.result
3894	return nil
3895}
3896
3897// result is the default implementation for AppsRestoreFuture.Result.
3898func (future *AppsRestoreFuture) result(client AppsClient) (rr RestoreResponse, err error) {
3899	var done bool
3900	done, err = future.DoneWithContext(context.Background(), client)
3901	if err != nil {
3902		err = autorest.NewErrorWithError(err, "web.AppsRestoreFuture", "Result", future.Response(), "Polling failure")
3903		return
3904	}
3905	if !done {
3906		rr.Response.Response = future.Response()
3907		err = azure.NewAsyncOpIncompleteError("web.AppsRestoreFuture")
3908		return
3909	}
3910	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3911	if rr.Response.Response, err = future.GetResult(sender); err == nil && rr.Response.Response.StatusCode != http.StatusNoContent {
3912		rr, err = client.RestoreResponder(rr.Response.Response)
3913		if err != nil {
3914			err = autorest.NewErrorWithError(err, "web.AppsRestoreFuture", "Result", rr.Response.Response, "Failure responding to request")
3915		}
3916	}
3917	return
3918}
3919
3920// AppsRestoreSlotFuture an abstraction for monitoring and retrieving the results of a long-running
3921// operation.
3922type AppsRestoreSlotFuture struct {
3923	azure.FutureAPI
3924	// Result returns the result of the asynchronous operation.
3925	// If the operation has not completed it will return an error.
3926	Result func(AppsClient) (RestoreResponse, error)
3927}
3928
3929// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3930func (future *AppsRestoreSlotFuture) UnmarshalJSON(body []byte) error {
3931	var azFuture azure.Future
3932	if err := json.Unmarshal(body, &azFuture); err != nil {
3933		return err
3934	}
3935	future.FutureAPI = &azFuture
3936	future.Result = future.result
3937	return nil
3938}
3939
3940// result is the default implementation for AppsRestoreSlotFuture.Result.
3941func (future *AppsRestoreSlotFuture) result(client AppsClient) (rr RestoreResponse, err error) {
3942	var done bool
3943	done, err = future.DoneWithContext(context.Background(), client)
3944	if err != nil {
3945		err = autorest.NewErrorWithError(err, "web.AppsRestoreSlotFuture", "Result", future.Response(), "Polling failure")
3946		return
3947	}
3948	if !done {
3949		rr.Response.Response = future.Response()
3950		err = azure.NewAsyncOpIncompleteError("web.AppsRestoreSlotFuture")
3951		return
3952	}
3953	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3954	if rr.Response.Response, err = future.GetResult(sender); err == nil && rr.Response.Response.StatusCode != http.StatusNoContent {
3955		rr, err = client.RestoreSlotResponder(rr.Response.Response)
3956		if err != nil {
3957			err = autorest.NewErrorWithError(err, "web.AppsRestoreSlotFuture", "Result", rr.Response.Response, "Failure responding to request")
3958		}
3959	}
3960	return
3961}
3962
3963// AppsSwapSlotSlotFuture an abstraction for monitoring and retrieving the results of a long-running
3964// operation.
3965type AppsSwapSlotSlotFuture struct {
3966	azure.FutureAPI
3967	// Result returns the result of the asynchronous operation.
3968	// If the operation has not completed it will return an error.
3969	Result func(AppsClient) (autorest.Response, error)
3970}
3971
3972// UnmarshalJSON is the custom unmarshaller for CreateFuture.
3973func (future *AppsSwapSlotSlotFuture) UnmarshalJSON(body []byte) error {
3974	var azFuture azure.Future
3975	if err := json.Unmarshal(body, &azFuture); err != nil {
3976		return err
3977	}
3978	future.FutureAPI = &azFuture
3979	future.Result = future.result
3980	return nil
3981}
3982
3983// result is the default implementation for AppsSwapSlotSlotFuture.Result.
3984func (future *AppsSwapSlotSlotFuture) result(client AppsClient) (ar autorest.Response, err error) {
3985	var done bool
3986	done, err = future.DoneWithContext(context.Background(), client)
3987	if err != nil {
3988		err = autorest.NewErrorWithError(err, "web.AppsSwapSlotSlotFuture", "Result", future.Response(), "Polling failure")
3989		return
3990	}
3991	if !done {
3992		ar.Response = future.Response()
3993		err = azure.NewAsyncOpIncompleteError("web.AppsSwapSlotSlotFuture")
3994		return
3995	}
3996	ar.Response = future.Response()
3997	return
3998}
3999
4000// AppsSwapSlotWithProductionFuture an abstraction for monitoring and retrieving the results of a
4001// long-running operation.
4002type AppsSwapSlotWithProductionFuture struct {
4003	azure.FutureAPI
4004	// Result returns the result of the asynchronous operation.
4005	// If the operation has not completed it will return an error.
4006	Result func(AppsClient) (autorest.Response, error)
4007}
4008
4009// UnmarshalJSON is the custom unmarshaller for CreateFuture.
4010func (future *AppsSwapSlotWithProductionFuture) UnmarshalJSON(body []byte) error {
4011	var azFuture azure.Future
4012	if err := json.Unmarshal(body, &azFuture); err != nil {
4013		return err
4014	}
4015	future.FutureAPI = &azFuture
4016	future.Result = future.result
4017	return nil
4018}
4019
4020// result is the default implementation for AppsSwapSlotWithProductionFuture.Result.
4021func (future *AppsSwapSlotWithProductionFuture) result(client AppsClient) (ar autorest.Response, err error) {
4022	var done bool
4023	done, err = future.DoneWithContext(context.Background(), client)
4024	if err != nil {
4025		err = autorest.NewErrorWithError(err, "web.AppsSwapSlotWithProductionFuture", "Result", future.Response(), "Polling failure")
4026		return
4027	}
4028	if !done {
4029		ar.Response = future.Response()
4030		err = azure.NewAsyncOpIncompleteError("web.AppsSwapSlotWithProductionFuture")
4031		return
4032	}
4033	ar.Response = future.Response()
4034	return
4035}
4036
4037// AutoHealActions actions which to take by the auto-heal module when a rule is triggered.
4038type AutoHealActions struct {
4039	// ActionType - Predefined action to be taken. Possible values include: 'Recycle', 'LogEvent', 'CustomAction'
4040	ActionType AutoHealActionType `json:"actionType,omitempty"`
4041	// CustomAction - Custom action to be taken.
4042	CustomAction *AutoHealCustomAction `json:"customAction,omitempty"`
4043	// MinProcessExecutionTime - Minimum time the process must execute
4044	// before taking the action
4045	MinProcessExecutionTime *string `json:"minProcessExecutionTime,omitempty"`
4046}
4047
4048// AutoHealCustomAction custom action to be executed
4049// when an auto heal rule is triggered.
4050type AutoHealCustomAction struct {
4051	// Exe - Executable to be run.
4052	Exe *string `json:"exe,omitempty"`
4053	// Parameters - Parameters for the executable.
4054	Parameters *string `json:"parameters,omitempty"`
4055}
4056
4057// AutoHealRules rules that can be defined for auto-heal.
4058type AutoHealRules struct {
4059	// Triggers - Conditions that describe when to execute the auto-heal actions.
4060	Triggers *AutoHealTriggers `json:"triggers,omitempty"`
4061	// Actions - Actions to be executed when a rule is triggered.
4062	Actions *AutoHealActions `json:"actions,omitempty"`
4063}
4064
4065// AutoHealTriggers triggers for auto-heal.
4066type AutoHealTriggers struct {
4067	// Requests - A rule based on total requests.
4068	Requests *RequestsBasedTrigger `json:"requests,omitempty"`
4069	// PrivateBytesInKB - A rule based on private bytes.
4070	PrivateBytesInKB *int32 `json:"privateBytesInKB,omitempty"`
4071	// StatusCodes - A rule based on status codes.
4072	StatusCodes *[]StatusCodesBasedTrigger `json:"statusCodes,omitempty"`
4073	// SlowRequests - A rule based on request execution time.
4074	SlowRequests *SlowRequestsBasedTrigger `json:"slowRequests,omitempty"`
4075}
4076
4077// AzureBlobStorageApplicationLogsConfig application logs azure blob storage configuration.
4078type AzureBlobStorageApplicationLogsConfig struct {
4079	// Level - Log level. Possible values include: 'Off', 'Verbose', 'Information', 'Warning', 'Error'
4080	Level LogLevel `json:"level,omitempty"`
4081	// SasURL - SAS url to a azure blob container with read/write/list/delete permissions.
4082	SasURL *string `json:"sasUrl,omitempty"`
4083	// RetentionInDays - Retention in days.
4084	// Remove blobs older than X days.
4085	// 0 or lower means no retention.
4086	RetentionInDays *int32 `json:"retentionInDays,omitempty"`
4087}
4088
4089// AzureBlobStorageHTTPLogsConfig http logs to azure blob storage configuration.
4090type AzureBlobStorageHTTPLogsConfig struct {
4091	// SasURL - SAS url to a azure blob container with read/write/list/delete permissions.
4092	SasURL *string `json:"sasUrl,omitempty"`
4093	// RetentionInDays - Retention in days.
4094	// Remove blobs older than X days.
4095	// 0 or lower means no retention.
4096	RetentionInDays *int32 `json:"retentionInDays,omitempty"`
4097	// Enabled - True if configuration is enabled, false if it is disabled and null if configuration is not set.
4098	Enabled *bool `json:"enabled,omitempty"`
4099}
4100
4101// AzureTableStorageApplicationLogsConfig application logs to Azure table storage configuration.
4102type AzureTableStorageApplicationLogsConfig struct {
4103	// Level - Log level. Possible values include: 'Off', 'Verbose', 'Information', 'Warning', 'Error'
4104	Level LogLevel `json:"level,omitempty"`
4105	// SasURL - SAS URL to an Azure table with add/query/delete permissions.
4106	SasURL *string `json:"sasUrl,omitempty"`
4107}
4108
4109// BackupItem backup description.
4110type BackupItem struct {
4111	autorest.Response `json:"-"`
4112	// BackupItemProperties - BackupItem resource specific properties
4113	*BackupItemProperties `json:"properties,omitempty"`
4114	// ID - READ-ONLY; Resource Id.
4115	ID *string `json:"id,omitempty"`
4116	// Name - READ-ONLY; Resource Name.
4117	Name *string `json:"name,omitempty"`
4118	// Kind - Kind of resource.
4119	Kind *string `json:"kind,omitempty"`
4120	// Type - READ-ONLY; Resource type.
4121	Type *string `json:"type,omitempty"`
4122}
4123
4124// MarshalJSON is the custom marshaler for BackupItem.
4125func (bi BackupItem) MarshalJSON() ([]byte, error) {
4126	objectMap := make(map[string]interface{})
4127	if bi.BackupItemProperties != nil {
4128		objectMap["properties"] = bi.BackupItemProperties
4129	}
4130	if bi.Kind != nil {
4131		objectMap["kind"] = bi.Kind
4132	}
4133	return json.Marshal(objectMap)
4134}
4135
4136// UnmarshalJSON is the custom unmarshaler for BackupItem struct.
4137func (bi *BackupItem) UnmarshalJSON(body []byte) error {
4138	var m map[string]*json.RawMessage
4139	err := json.Unmarshal(body, &m)
4140	if err != nil {
4141		return err
4142	}
4143	for k, v := range m {
4144		switch k {
4145		case "properties":
4146			if v != nil {
4147				var backupItemProperties BackupItemProperties
4148				err = json.Unmarshal(*v, &backupItemProperties)
4149				if err != nil {
4150					return err
4151				}
4152				bi.BackupItemProperties = &backupItemProperties
4153			}
4154		case "id":
4155			if v != nil {
4156				var ID string
4157				err = json.Unmarshal(*v, &ID)
4158				if err != nil {
4159					return err
4160				}
4161				bi.ID = &ID
4162			}
4163		case "name":
4164			if v != nil {
4165				var name string
4166				err = json.Unmarshal(*v, &name)
4167				if err != nil {
4168					return err
4169				}
4170				bi.Name = &name
4171			}
4172		case "kind":
4173			if v != nil {
4174				var kind string
4175				err = json.Unmarshal(*v, &kind)
4176				if err != nil {
4177					return err
4178				}
4179				bi.Kind = &kind
4180			}
4181		case "type":
4182			if v != nil {
4183				var typeVar string
4184				err = json.Unmarshal(*v, &typeVar)
4185				if err != nil {
4186					return err
4187				}
4188				bi.Type = &typeVar
4189			}
4190		}
4191	}
4192
4193	return nil
4194}
4195
4196// BackupItemCollection collection of backup items.
4197type BackupItemCollection struct {
4198	autorest.Response `json:"-"`
4199	// Value - Collection of resources.
4200	Value *[]BackupItem `json:"value,omitempty"`
4201	// NextLink - READ-ONLY; Link to next page of resources.
4202	NextLink *string `json:"nextLink,omitempty"`
4203}
4204
4205// MarshalJSON is the custom marshaler for BackupItemCollection.
4206func (bic BackupItemCollection) MarshalJSON() ([]byte, error) {
4207	objectMap := make(map[string]interface{})
4208	if bic.Value != nil {
4209		objectMap["value"] = bic.Value
4210	}
4211	return json.Marshal(objectMap)
4212}
4213
4214// BackupItemCollectionIterator provides access to a complete listing of BackupItem values.
4215type BackupItemCollectionIterator struct {
4216	i    int
4217	page BackupItemCollectionPage
4218}
4219
4220// NextWithContext advances to the next value.  If there was an error making
4221// the request the iterator does not advance and the error is returned.
4222func (iter *BackupItemCollectionIterator) NextWithContext(ctx context.Context) (err error) {
4223	if tracing.IsEnabled() {
4224		ctx = tracing.StartSpan(ctx, fqdn+"/BackupItemCollectionIterator.NextWithContext")
4225		defer func() {
4226			sc := -1
4227			if iter.Response().Response.Response != nil {
4228				sc = iter.Response().Response.Response.StatusCode
4229			}
4230			tracing.EndSpan(ctx, sc, err)
4231		}()
4232	}
4233	iter.i++
4234	if iter.i < len(iter.page.Values()) {
4235		return nil
4236	}
4237	err = iter.page.NextWithContext(ctx)
4238	if err != nil {
4239		iter.i--
4240		return err
4241	}
4242	iter.i = 0
4243	return nil
4244}
4245
4246// Next advances to the next value.  If there was an error making
4247// the request the iterator does not advance and the error is returned.
4248// Deprecated: Use NextWithContext() instead.
4249func (iter *BackupItemCollectionIterator) Next() error {
4250	return iter.NextWithContext(context.Background())
4251}
4252
4253// NotDone returns true if the enumeration should be started or is not yet complete.
4254func (iter BackupItemCollectionIterator) NotDone() bool {
4255	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4256}
4257
4258// Response returns the raw server response from the last page request.
4259func (iter BackupItemCollectionIterator) Response() BackupItemCollection {
4260	return iter.page.Response()
4261}
4262
4263// Value returns the current value or a zero-initialized value if the
4264// iterator has advanced beyond the end of the collection.
4265func (iter BackupItemCollectionIterator) Value() BackupItem {
4266	if !iter.page.NotDone() {
4267		return BackupItem{}
4268	}
4269	return iter.page.Values()[iter.i]
4270}
4271
4272// Creates a new instance of the BackupItemCollectionIterator type.
4273func NewBackupItemCollectionIterator(page BackupItemCollectionPage) BackupItemCollectionIterator {
4274	return BackupItemCollectionIterator{page: page}
4275}
4276
4277// IsEmpty returns true if the ListResult contains no values.
4278func (bic BackupItemCollection) IsEmpty() bool {
4279	return bic.Value == nil || len(*bic.Value) == 0
4280}
4281
4282// hasNextLink returns true if the NextLink is not empty.
4283func (bic BackupItemCollection) hasNextLink() bool {
4284	return bic.NextLink != nil && len(*bic.NextLink) != 0
4285}
4286
4287// backupItemCollectionPreparer prepares a request to retrieve the next set of results.
4288// It returns nil if no more results exist.
4289func (bic BackupItemCollection) backupItemCollectionPreparer(ctx context.Context) (*http.Request, error) {
4290	if !bic.hasNextLink() {
4291		return nil, nil
4292	}
4293	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4294		autorest.AsJSON(),
4295		autorest.AsGet(),
4296		autorest.WithBaseURL(to.String(bic.NextLink)))
4297}
4298
4299// BackupItemCollectionPage contains a page of BackupItem values.
4300type BackupItemCollectionPage struct {
4301	fn  func(context.Context, BackupItemCollection) (BackupItemCollection, error)
4302	bic BackupItemCollection
4303}
4304
4305// NextWithContext advances to the next page of values.  If there was an error making
4306// the request the page does not advance and the error is returned.
4307func (page *BackupItemCollectionPage) NextWithContext(ctx context.Context) (err error) {
4308	if tracing.IsEnabled() {
4309		ctx = tracing.StartSpan(ctx, fqdn+"/BackupItemCollectionPage.NextWithContext")
4310		defer func() {
4311			sc := -1
4312			if page.Response().Response.Response != nil {
4313				sc = page.Response().Response.Response.StatusCode
4314			}
4315			tracing.EndSpan(ctx, sc, err)
4316		}()
4317	}
4318	for {
4319		next, err := page.fn(ctx, page.bic)
4320		if err != nil {
4321			return err
4322		}
4323		page.bic = next
4324		if !next.hasNextLink() || !next.IsEmpty() {
4325			break
4326		}
4327	}
4328	return nil
4329}
4330
4331// Next advances to the next page of values.  If there was an error making
4332// the request the page does not advance and the error is returned.
4333// Deprecated: Use NextWithContext() instead.
4334func (page *BackupItemCollectionPage) Next() error {
4335	return page.NextWithContext(context.Background())
4336}
4337
4338// NotDone returns true if the page enumeration should be started or is not yet complete.
4339func (page BackupItemCollectionPage) NotDone() bool {
4340	return !page.bic.IsEmpty()
4341}
4342
4343// Response returns the raw server response from the last page request.
4344func (page BackupItemCollectionPage) Response() BackupItemCollection {
4345	return page.bic
4346}
4347
4348// Values returns the slice of values for the current page or nil if there are no values.
4349func (page BackupItemCollectionPage) Values() []BackupItem {
4350	if page.bic.IsEmpty() {
4351		return nil
4352	}
4353	return *page.bic.Value
4354}
4355
4356// Creates a new instance of the BackupItemCollectionPage type.
4357func NewBackupItemCollectionPage(cur BackupItemCollection, getNextPage func(context.Context, BackupItemCollection) (BackupItemCollection, error)) BackupItemCollectionPage {
4358	return BackupItemCollectionPage{
4359		fn:  getNextPage,
4360		bic: cur,
4361	}
4362}
4363
4364// BackupItemProperties backupItem resource specific properties
4365type BackupItemProperties struct {
4366	// BackupID - READ-ONLY; Id of the backup.
4367	BackupID *int32 `json:"id,omitempty"`
4368	// StorageAccountURL - READ-ONLY; SAS URL for the storage account container which contains this backup.
4369	StorageAccountURL *string `json:"storageAccountUrl,omitempty"`
4370	// BlobName - READ-ONLY; Name of the blob which contains data for this backup.
4371	BlobName *string `json:"blobName,omitempty"`
4372	// Name - READ-ONLY; Name of this backup.
4373	Name *string `json:"name,omitempty"`
4374	// Status - READ-ONLY; Backup status. Possible values include: 'InProgress', 'Failed', 'Succeeded', 'TimedOut', 'Created', 'Skipped', 'PartiallySucceeded', 'DeleteInProgress', 'DeleteFailed', 'Deleted'
4375	Status BackupItemStatus `json:"status,omitempty"`
4376	// SizeInBytes - READ-ONLY; Size of the backup in bytes.
4377	SizeInBytes *int64 `json:"sizeInBytes,omitempty"`
4378	// Created - READ-ONLY; Timestamp of the backup creation.
4379	Created *date.Time `json:"created,omitempty"`
4380	// Log - READ-ONLY; Details regarding this backup. Might contain an error message.
4381	Log *string `json:"log,omitempty"`
4382	// Databases - READ-ONLY; List of databases included in the backup.
4383	Databases *[]DatabaseBackupSetting `json:"databases,omitempty"`
4384	// Scheduled - READ-ONLY; True if this backup has been created due to a schedule being triggered.
4385	Scheduled *bool `json:"scheduled,omitempty"`
4386	// LastRestoreTimeStamp - READ-ONLY; Timestamp of a last restore operation which used this backup.
4387	LastRestoreTimeStamp *date.Time `json:"lastRestoreTimeStamp,omitempty"`
4388	// FinishedTimeStamp - READ-ONLY; Timestamp when this backup finished.
4389	FinishedTimeStamp *date.Time `json:"finishedTimeStamp,omitempty"`
4390	// CorrelationID - READ-ONLY; Unique correlation identifier. Please use this along with the timestamp while communicating with Azure support.
4391	CorrelationID *string `json:"correlationId,omitempty"`
4392	// WebsiteSizeInBytes - READ-ONLY; Size of the original web app which has been backed up.
4393	WebsiteSizeInBytes *int64 `json:"websiteSizeInBytes,omitempty"`
4394}
4395
4396// MarshalJSON is the custom marshaler for BackupItemProperties.
4397func (bi BackupItemProperties) MarshalJSON() ([]byte, error) {
4398	objectMap := make(map[string]interface{})
4399	return json.Marshal(objectMap)
4400}
4401
4402// BackupRequest description of a backup which will be performed.
4403type BackupRequest struct {
4404	autorest.Response `json:"-"`
4405	// BackupRequestProperties - BackupRequest resource specific properties
4406	*BackupRequestProperties `json:"properties,omitempty"`
4407	// ID - READ-ONLY; Resource Id.
4408	ID *string `json:"id,omitempty"`
4409	// Name - READ-ONLY; Resource Name.
4410	Name *string `json:"name,omitempty"`
4411	// Kind - Kind of resource.
4412	Kind *string `json:"kind,omitempty"`
4413	// Type - READ-ONLY; Resource type.
4414	Type *string `json:"type,omitempty"`
4415}
4416
4417// MarshalJSON is the custom marshaler for BackupRequest.
4418func (br BackupRequest) MarshalJSON() ([]byte, error) {
4419	objectMap := make(map[string]interface{})
4420	if br.BackupRequestProperties != nil {
4421		objectMap["properties"] = br.BackupRequestProperties
4422	}
4423	if br.Kind != nil {
4424		objectMap["kind"] = br.Kind
4425	}
4426	return json.Marshal(objectMap)
4427}
4428
4429// UnmarshalJSON is the custom unmarshaler for BackupRequest struct.
4430func (br *BackupRequest) UnmarshalJSON(body []byte) error {
4431	var m map[string]*json.RawMessage
4432	err := json.Unmarshal(body, &m)
4433	if err != nil {
4434		return err
4435	}
4436	for k, v := range m {
4437		switch k {
4438		case "properties":
4439			if v != nil {
4440				var backupRequestProperties BackupRequestProperties
4441				err = json.Unmarshal(*v, &backupRequestProperties)
4442				if err != nil {
4443					return err
4444				}
4445				br.BackupRequestProperties = &backupRequestProperties
4446			}
4447		case "id":
4448			if v != nil {
4449				var ID string
4450				err = json.Unmarshal(*v, &ID)
4451				if err != nil {
4452					return err
4453				}
4454				br.ID = &ID
4455			}
4456		case "name":
4457			if v != nil {
4458				var name string
4459				err = json.Unmarshal(*v, &name)
4460				if err != nil {
4461					return err
4462				}
4463				br.Name = &name
4464			}
4465		case "kind":
4466			if v != nil {
4467				var kind string
4468				err = json.Unmarshal(*v, &kind)
4469				if err != nil {
4470					return err
4471				}
4472				br.Kind = &kind
4473			}
4474		case "type":
4475			if v != nil {
4476				var typeVar string
4477				err = json.Unmarshal(*v, &typeVar)
4478				if err != nil {
4479					return err
4480				}
4481				br.Type = &typeVar
4482			}
4483		}
4484	}
4485
4486	return nil
4487}
4488
4489// BackupRequestProperties backupRequest resource specific properties
4490type BackupRequestProperties struct {
4491	// BackupRequestName - Name of the backup.
4492	BackupRequestName *string `json:"name,omitempty"`
4493	// Enabled - True if the backup schedule is enabled (must be included in that case), false if the backup schedule should be disabled.
4494	Enabled *bool `json:"enabled,omitempty"`
4495	// StorageAccountURL - SAS URL to the container.
4496	StorageAccountURL *string `json:"storageAccountUrl,omitempty"`
4497	// BackupSchedule - Schedule for the backup if it is executed periodically.
4498	BackupSchedule *BackupSchedule `json:"backupSchedule,omitempty"`
4499	// Databases - Databases included in the backup.
4500	Databases *[]DatabaseBackupSetting `json:"databases,omitempty"`
4501	// Type - Type of the backup. Possible values include: 'BackupRestoreOperationTypeDefault', 'BackupRestoreOperationTypeClone', 'BackupRestoreOperationTypeRelocation', 'BackupRestoreOperationTypeSnapshot'
4502	Type BackupRestoreOperationType `json:"type,omitempty"`
4503}
4504
4505// BackupSchedule description of a backup schedule. Describes how often should be the backup performed and
4506// what should be the retention policy.
4507type BackupSchedule struct {
4508	// FrequencyInterval - How often the backup should be executed (e.g. for weekly backup, this should be set to 7 and FrequencyUnit should be set to Day)
4509	FrequencyInterval *int32 `json:"frequencyInterval,omitempty"`
4510	// FrequencyUnit - The unit of time for how often the backup should be executed (e.g. for weekly backup, this should be set to Day and FrequencyInterval should be set to 7). Possible values include: 'Day', 'Hour'
4511	FrequencyUnit FrequencyUnit `json:"frequencyUnit,omitempty"`
4512	// KeepAtLeastOneBackup - True if the retention policy should always keep at least one backup in the storage account, regardless how old it is; false otherwise.
4513	KeepAtLeastOneBackup *bool `json:"keepAtLeastOneBackup,omitempty"`
4514	// RetentionPeriodInDays - After how many days backups should be deleted.
4515	RetentionPeriodInDays *int32 `json:"retentionPeriodInDays,omitempty"`
4516	// StartTime - When the schedule should start working.
4517	StartTime *date.Time `json:"startTime,omitempty"`
4518	// LastExecutionTime - READ-ONLY; Last time when this schedule was triggered.
4519	LastExecutionTime *date.Time `json:"lastExecutionTime,omitempty"`
4520}
4521
4522// MarshalJSON is the custom marshaler for BackupSchedule.
4523func (bs BackupSchedule) MarshalJSON() ([]byte, error) {
4524	objectMap := make(map[string]interface{})
4525	if bs.FrequencyInterval != nil {
4526		objectMap["frequencyInterval"] = bs.FrequencyInterval
4527	}
4528	if bs.FrequencyUnit != "" {
4529		objectMap["frequencyUnit"] = bs.FrequencyUnit
4530	}
4531	if bs.KeepAtLeastOneBackup != nil {
4532		objectMap["keepAtLeastOneBackup"] = bs.KeepAtLeastOneBackup
4533	}
4534	if bs.RetentionPeriodInDays != nil {
4535		objectMap["retentionPeriodInDays"] = bs.RetentionPeriodInDays
4536	}
4537	if bs.StartTime != nil {
4538		objectMap["startTime"] = bs.StartTime
4539	}
4540	return json.Marshal(objectMap)
4541}
4542
4543// BillingMeter app Service billing entity that contains information about meter which the Azure billing
4544// system utilizes to charge users for services.
4545type BillingMeter struct {
4546	// BillingMeterProperties - BillingMeter resource specific properties
4547	*BillingMeterProperties `json:"properties,omitempty"`
4548	// ID - READ-ONLY; Resource Id.
4549	ID *string `json:"id,omitempty"`
4550	// Name - READ-ONLY; Resource Name.
4551	Name *string `json:"name,omitempty"`
4552	// Kind - Kind of resource.
4553	Kind *string `json:"kind,omitempty"`
4554	// Type - READ-ONLY; Resource type.
4555	Type *string `json:"type,omitempty"`
4556}
4557
4558// MarshalJSON is the custom marshaler for BillingMeter.
4559func (bm BillingMeter) MarshalJSON() ([]byte, error) {
4560	objectMap := make(map[string]interface{})
4561	if bm.BillingMeterProperties != nil {
4562		objectMap["properties"] = bm.BillingMeterProperties
4563	}
4564	if bm.Kind != nil {
4565		objectMap["kind"] = bm.Kind
4566	}
4567	return json.Marshal(objectMap)
4568}
4569
4570// UnmarshalJSON is the custom unmarshaler for BillingMeter struct.
4571func (bm *BillingMeter) UnmarshalJSON(body []byte) error {
4572	var m map[string]*json.RawMessage
4573	err := json.Unmarshal(body, &m)
4574	if err != nil {
4575		return err
4576	}
4577	for k, v := range m {
4578		switch k {
4579		case "properties":
4580			if v != nil {
4581				var billingMeterProperties BillingMeterProperties
4582				err = json.Unmarshal(*v, &billingMeterProperties)
4583				if err != nil {
4584					return err
4585				}
4586				bm.BillingMeterProperties = &billingMeterProperties
4587			}
4588		case "id":
4589			if v != nil {
4590				var ID string
4591				err = json.Unmarshal(*v, &ID)
4592				if err != nil {
4593					return err
4594				}
4595				bm.ID = &ID
4596			}
4597		case "name":
4598			if v != nil {
4599				var name string
4600				err = json.Unmarshal(*v, &name)
4601				if err != nil {
4602					return err
4603				}
4604				bm.Name = &name
4605			}
4606		case "kind":
4607			if v != nil {
4608				var kind string
4609				err = json.Unmarshal(*v, &kind)
4610				if err != nil {
4611					return err
4612				}
4613				bm.Kind = &kind
4614			}
4615		case "type":
4616			if v != nil {
4617				var typeVar string
4618				err = json.Unmarshal(*v, &typeVar)
4619				if err != nil {
4620					return err
4621				}
4622				bm.Type = &typeVar
4623			}
4624		}
4625	}
4626
4627	return nil
4628}
4629
4630// BillingMeterCollection collection of Billing Meters
4631type BillingMeterCollection struct {
4632	autorest.Response `json:"-"`
4633	// Value - Collection of Billing Meters.
4634	Value *[]BillingMeter `json:"value,omitempty"`
4635	// NextLink - READ-ONLY; Link to next page of resources.
4636	NextLink *string `json:"nextLink,omitempty"`
4637}
4638
4639// MarshalJSON is the custom marshaler for BillingMeterCollection.
4640func (bmc BillingMeterCollection) MarshalJSON() ([]byte, error) {
4641	objectMap := make(map[string]interface{})
4642	if bmc.Value != nil {
4643		objectMap["value"] = bmc.Value
4644	}
4645	return json.Marshal(objectMap)
4646}
4647
4648// BillingMeterCollectionIterator provides access to a complete listing of BillingMeter values.
4649type BillingMeterCollectionIterator struct {
4650	i    int
4651	page BillingMeterCollectionPage
4652}
4653
4654// NextWithContext advances to the next value.  If there was an error making
4655// the request the iterator does not advance and the error is returned.
4656func (iter *BillingMeterCollectionIterator) NextWithContext(ctx context.Context) (err error) {
4657	if tracing.IsEnabled() {
4658		ctx = tracing.StartSpan(ctx, fqdn+"/BillingMeterCollectionIterator.NextWithContext")
4659		defer func() {
4660			sc := -1
4661			if iter.Response().Response.Response != nil {
4662				sc = iter.Response().Response.Response.StatusCode
4663			}
4664			tracing.EndSpan(ctx, sc, err)
4665		}()
4666	}
4667	iter.i++
4668	if iter.i < len(iter.page.Values()) {
4669		return nil
4670	}
4671	err = iter.page.NextWithContext(ctx)
4672	if err != nil {
4673		iter.i--
4674		return err
4675	}
4676	iter.i = 0
4677	return nil
4678}
4679
4680// Next advances to the next value.  If there was an error making
4681// the request the iterator does not advance and the error is returned.
4682// Deprecated: Use NextWithContext() instead.
4683func (iter *BillingMeterCollectionIterator) Next() error {
4684	return iter.NextWithContext(context.Background())
4685}
4686
4687// NotDone returns true if the enumeration should be started or is not yet complete.
4688func (iter BillingMeterCollectionIterator) NotDone() bool {
4689	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4690}
4691
4692// Response returns the raw server response from the last page request.
4693func (iter BillingMeterCollectionIterator) Response() BillingMeterCollection {
4694	return iter.page.Response()
4695}
4696
4697// Value returns the current value or a zero-initialized value if the
4698// iterator has advanced beyond the end of the collection.
4699func (iter BillingMeterCollectionIterator) Value() BillingMeter {
4700	if !iter.page.NotDone() {
4701		return BillingMeter{}
4702	}
4703	return iter.page.Values()[iter.i]
4704}
4705
4706// Creates a new instance of the BillingMeterCollectionIterator type.
4707func NewBillingMeterCollectionIterator(page BillingMeterCollectionPage) BillingMeterCollectionIterator {
4708	return BillingMeterCollectionIterator{page: page}
4709}
4710
4711// IsEmpty returns true if the ListResult contains no values.
4712func (bmc BillingMeterCollection) IsEmpty() bool {
4713	return bmc.Value == nil || len(*bmc.Value) == 0
4714}
4715
4716// hasNextLink returns true if the NextLink is not empty.
4717func (bmc BillingMeterCollection) hasNextLink() bool {
4718	return bmc.NextLink != nil && len(*bmc.NextLink) != 0
4719}
4720
4721// billingMeterCollectionPreparer prepares a request to retrieve the next set of results.
4722// It returns nil if no more results exist.
4723func (bmc BillingMeterCollection) billingMeterCollectionPreparer(ctx context.Context) (*http.Request, error) {
4724	if !bmc.hasNextLink() {
4725		return nil, nil
4726	}
4727	return autorest.Prepare((&http.Request{}).WithContext(ctx),
4728		autorest.AsJSON(),
4729		autorest.AsGet(),
4730		autorest.WithBaseURL(to.String(bmc.NextLink)))
4731}
4732
4733// BillingMeterCollectionPage contains a page of BillingMeter values.
4734type BillingMeterCollectionPage struct {
4735	fn  func(context.Context, BillingMeterCollection) (BillingMeterCollection, error)
4736	bmc BillingMeterCollection
4737}
4738
4739// NextWithContext advances to the next page of values.  If there was an error making
4740// the request the page does not advance and the error is returned.
4741func (page *BillingMeterCollectionPage) NextWithContext(ctx context.Context) (err error) {
4742	if tracing.IsEnabled() {
4743		ctx = tracing.StartSpan(ctx, fqdn+"/BillingMeterCollectionPage.NextWithContext")
4744		defer func() {
4745			sc := -1
4746			if page.Response().Response.Response != nil {
4747				sc = page.Response().Response.Response.StatusCode
4748			}
4749			tracing.EndSpan(ctx, sc, err)
4750		}()
4751	}
4752	for {
4753		next, err := page.fn(ctx, page.bmc)
4754		if err != nil {
4755			return err
4756		}
4757		page.bmc = next
4758		if !next.hasNextLink() || !next.IsEmpty() {
4759			break
4760		}
4761	}
4762	return nil
4763}
4764
4765// Next advances to the next page of values.  If there was an error making
4766// the request the page does not advance and the error is returned.
4767// Deprecated: Use NextWithContext() instead.
4768func (page *BillingMeterCollectionPage) Next() error {
4769	return page.NextWithContext(context.Background())
4770}
4771
4772// NotDone returns true if the page enumeration should be started or is not yet complete.
4773func (page BillingMeterCollectionPage) NotDone() bool {
4774	return !page.bmc.IsEmpty()
4775}
4776
4777// Response returns the raw server response from the last page request.
4778func (page BillingMeterCollectionPage) Response() BillingMeterCollection {
4779	return page.bmc
4780}
4781
4782// Values returns the slice of values for the current page or nil if there are no values.
4783func (page BillingMeterCollectionPage) Values() []BillingMeter {
4784	if page.bmc.IsEmpty() {
4785		return nil
4786	}
4787	return *page.bmc.Value
4788}
4789
4790// Creates a new instance of the BillingMeterCollectionPage type.
4791func NewBillingMeterCollectionPage(cur BillingMeterCollection, getNextPage func(context.Context, BillingMeterCollection) (BillingMeterCollection, error)) BillingMeterCollectionPage {
4792	return BillingMeterCollectionPage{
4793		fn:  getNextPage,
4794		bmc: cur,
4795	}
4796}
4797
4798// BillingMeterProperties billingMeter resource specific properties
4799type BillingMeterProperties struct {
4800	// MeterID - Meter GUID onboarded in Commerce
4801	MeterID *string `json:"meterId,omitempty"`
4802	// BillingLocation - Azure Location of billable resource
4803	BillingLocation *string `json:"billingLocation,omitempty"`
4804	// ShortName - Short Name from App Service Azure pricing Page
4805	ShortName *string `json:"shortName,omitempty"`
4806	// FriendlyName - Friendly name of the meter
4807	FriendlyName *string `json:"friendlyName,omitempty"`
4808	// ResourceType - App Service resource type meter used for
4809	ResourceType *string `json:"resourceType,omitempty"`
4810}
4811
4812// Capability describes the capabilities/features allowed for a specific SKU.
4813type Capability struct {
4814	// Name - Name of the SKU capability.
4815	Name *string `json:"name,omitempty"`
4816	// Value - Value of the SKU capability.
4817	Value *string `json:"value,omitempty"`
4818	// Reason - Reason of the SKU capability.
4819	Reason *string `json:"reason,omitempty"`
4820}
4821
4822// Certificate SSL certificate for an app.
4823type Certificate struct {
4824	autorest.Response `json:"-"`
4825	// CertificateProperties - Certificate resource specific properties
4826	*CertificateProperties `json:"properties,omitempty"`
4827	// ID - READ-ONLY; Resource Id.
4828	ID *string `json:"id,omitempty"`
4829	// Name - READ-ONLY; Resource Name.
4830	Name *string `json:"name,omitempty"`
4831	// Kind - Kind of resource.
4832	Kind *string `json:"kind,omitempty"`
4833	// Location - Resource Location.
4834	Location *string `json:"location,omitempty"`
4835	// Type - READ-ONLY; Resource type.
4836	Type *string `json:"type,omitempty"`
4837	// Tags - Resource tags.
4838	Tags map[string]*string `json:"tags"`
4839}
4840
4841// MarshalJSON is the custom marshaler for Certificate.
4842func (c Certificate) MarshalJSON() ([]byte, error) {
4843	objectMap := make(map[string]interface{})
4844	if c.CertificateProperties != nil {
4845		objectMap["properties"] = c.CertificateProperties
4846	}
4847	if c.Kind != nil {
4848		objectMap["kind"] = c.Kind
4849	}
4850	if c.Location != nil {
4851		objectMap["location"] = c.Location
4852	}
4853	if c.Tags != nil {
4854		objectMap["tags"] = c.Tags
4855	}
4856	return json.Marshal(objectMap)
4857}
4858
4859// UnmarshalJSON is the custom unmarshaler for Certificate struct.
4860func (c *Certificate) UnmarshalJSON(body []byte) error {
4861	var m map[string]*json.RawMessage
4862	err := json.Unmarshal(body, &m)
4863	if err != nil {
4864		return err
4865	}
4866	for k, v := range m {
4867		switch k {
4868		case "properties":
4869			if v != nil {
4870				var certificateProperties CertificateProperties
4871				err = json.Unmarshal(*v, &certificateProperties)
4872				if err != nil {
4873					return err
4874				}
4875				c.CertificateProperties = &certificateProperties
4876			}
4877		case "id":
4878			if v != nil {
4879				var ID string
4880				err = json.Unmarshal(*v, &ID)
4881				if err != nil {
4882					return err
4883				}
4884				c.ID = &ID
4885			}
4886		case "name":
4887			if v != nil {
4888				var name string
4889				err = json.Unmarshal(*v, &name)
4890				if err != nil {
4891					return err
4892				}
4893				c.Name = &name
4894			}
4895		case "kind":
4896			if v != nil {
4897				var kind string
4898				err = json.Unmarshal(*v, &kind)
4899				if err != nil {
4900					return err
4901				}
4902				c.Kind = &kind
4903			}
4904		case "location":
4905			if v != nil {
4906				var location string
4907				err = json.Unmarshal(*v, &location)
4908				if err != nil {
4909					return err
4910				}
4911				c.Location = &location
4912			}
4913		case "type":
4914			if v != nil {
4915				var typeVar string
4916				err = json.Unmarshal(*v, &typeVar)
4917				if err != nil {
4918					return err
4919				}
4920				c.Type = &typeVar
4921			}
4922		case "tags":
4923			if v != nil {
4924				var tags map[string]*string
4925				err = json.Unmarshal(*v, &tags)
4926				if err != nil {
4927					return err
4928				}
4929				c.Tags = tags
4930			}
4931		}
4932	}
4933
4934	return nil
4935}
4936
4937// CertificateCollection collection of certificates.
4938type CertificateCollection struct {
4939	autorest.Response `json:"-"`
4940	// Value - Collection of resources.
4941	Value *[]Certificate `json:"value,omitempty"`
4942	// NextLink - READ-ONLY; Link to next page of resources.
4943	NextLink *string `json:"nextLink,omitempty"`
4944}
4945
4946// MarshalJSON is the custom marshaler for CertificateCollection.
4947func (cc CertificateCollection) MarshalJSON() ([]byte, error) {
4948	objectMap := make(map[string]interface{})
4949	if cc.Value != nil {
4950		objectMap["value"] = cc.Value
4951	}
4952	return json.Marshal(objectMap)
4953}
4954
4955// CertificateCollectionIterator provides access to a complete listing of Certificate values.
4956type CertificateCollectionIterator struct {
4957	i    int
4958	page CertificateCollectionPage
4959}
4960
4961// NextWithContext advances to the next value.  If there was an error making
4962// the request the iterator does not advance and the error is returned.
4963func (iter *CertificateCollectionIterator) NextWithContext(ctx context.Context) (err error) {
4964	if tracing.IsEnabled() {
4965		ctx = tracing.StartSpan(ctx, fqdn+"/CertificateCollectionIterator.NextWithContext")
4966		defer func() {
4967			sc := -1
4968			if iter.Response().Response.Response != nil {
4969				sc = iter.Response().Response.Response.StatusCode
4970			}
4971			tracing.EndSpan(ctx, sc, err)
4972		}()
4973	}
4974	iter.i++
4975	if iter.i < len(iter.page.Values()) {
4976		return nil
4977	}
4978	err = iter.page.NextWithContext(ctx)
4979	if err != nil {
4980		iter.i--
4981		return err
4982	}
4983	iter.i = 0
4984	return nil
4985}
4986
4987// Next advances to the next value.  If there was an error making
4988// the request the iterator does not advance and the error is returned.
4989// Deprecated: Use NextWithContext() instead.
4990func (iter *CertificateCollectionIterator) Next() error {
4991	return iter.NextWithContext(context.Background())
4992}
4993
4994// NotDone returns true if the enumeration should be started or is not yet complete.
4995func (iter CertificateCollectionIterator) NotDone() bool {
4996	return iter.page.NotDone() && iter.i < len(iter.page.Values())
4997}
4998
4999// Response returns the raw server response from the last page request.
5000func (iter CertificateCollectionIterator) Response() CertificateCollection {
5001	return iter.page.Response()
5002}
5003
5004// Value returns the current value or a zero-initialized value if the
5005// iterator has advanced beyond the end of the collection.
5006func (iter CertificateCollectionIterator) Value() Certificate {
5007	if !iter.page.NotDone() {
5008		return Certificate{}
5009	}
5010	return iter.page.Values()[iter.i]
5011}
5012
5013// Creates a new instance of the CertificateCollectionIterator type.
5014func NewCertificateCollectionIterator(page CertificateCollectionPage) CertificateCollectionIterator {
5015	return CertificateCollectionIterator{page: page}
5016}
5017
5018// IsEmpty returns true if the ListResult contains no values.
5019func (cc CertificateCollection) IsEmpty() bool {
5020	return cc.Value == nil || len(*cc.Value) == 0
5021}
5022
5023// hasNextLink returns true if the NextLink is not empty.
5024func (cc CertificateCollection) hasNextLink() bool {
5025	return cc.NextLink != nil && len(*cc.NextLink) != 0
5026}
5027
5028// certificateCollectionPreparer prepares a request to retrieve the next set of results.
5029// It returns nil if no more results exist.
5030func (cc CertificateCollection) certificateCollectionPreparer(ctx context.Context) (*http.Request, error) {
5031	if !cc.hasNextLink() {
5032		return nil, nil
5033	}
5034	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5035		autorest.AsJSON(),
5036		autorest.AsGet(),
5037		autorest.WithBaseURL(to.String(cc.NextLink)))
5038}
5039
5040// CertificateCollectionPage contains a page of Certificate values.
5041type CertificateCollectionPage struct {
5042	fn func(context.Context, CertificateCollection) (CertificateCollection, error)
5043	cc CertificateCollection
5044}
5045
5046// NextWithContext advances to the next page of values.  If there was an error making
5047// the request the page does not advance and the error is returned.
5048func (page *CertificateCollectionPage) NextWithContext(ctx context.Context) (err error) {
5049	if tracing.IsEnabled() {
5050		ctx = tracing.StartSpan(ctx, fqdn+"/CertificateCollectionPage.NextWithContext")
5051		defer func() {
5052			sc := -1
5053			if page.Response().Response.Response != nil {
5054				sc = page.Response().Response.Response.StatusCode
5055			}
5056			tracing.EndSpan(ctx, sc, err)
5057		}()
5058	}
5059	for {
5060		next, err := page.fn(ctx, page.cc)
5061		if err != nil {
5062			return err
5063		}
5064		page.cc = next
5065		if !next.hasNextLink() || !next.IsEmpty() {
5066			break
5067		}
5068	}
5069	return nil
5070}
5071
5072// Next advances to the next page of values.  If there was an error making
5073// the request the page does not advance and the error is returned.
5074// Deprecated: Use NextWithContext() instead.
5075func (page *CertificateCollectionPage) Next() error {
5076	return page.NextWithContext(context.Background())
5077}
5078
5079// NotDone returns true if the page enumeration should be started or is not yet complete.
5080func (page CertificateCollectionPage) NotDone() bool {
5081	return !page.cc.IsEmpty()
5082}
5083
5084// Response returns the raw server response from the last page request.
5085func (page CertificateCollectionPage) Response() CertificateCollection {
5086	return page.cc
5087}
5088
5089// Values returns the slice of values for the current page or nil if there are no values.
5090func (page CertificateCollectionPage) Values() []Certificate {
5091	if page.cc.IsEmpty() {
5092		return nil
5093	}
5094	return *page.cc.Value
5095}
5096
5097// Creates a new instance of the CertificateCollectionPage type.
5098func NewCertificateCollectionPage(cur CertificateCollection, getNextPage func(context.Context, CertificateCollection) (CertificateCollection, error)) CertificateCollectionPage {
5099	return CertificateCollectionPage{
5100		fn: getNextPage,
5101		cc: cur,
5102	}
5103}
5104
5105// CertificateDetails SSL certificate details.
5106type CertificateDetails struct {
5107	// Version - READ-ONLY; Certificate Version.
5108	Version *int32 `json:"version,omitempty"`
5109	// SerialNumber - READ-ONLY; Certificate Serial Number.
5110	SerialNumber *string `json:"serialNumber,omitempty"`
5111	// Thumbprint - READ-ONLY; Certificate Thumbprint.
5112	Thumbprint *string `json:"thumbprint,omitempty"`
5113	// Subject - READ-ONLY; Certificate Subject.
5114	Subject *string `json:"subject,omitempty"`
5115	// NotBefore - READ-ONLY; Date Certificate is valid from.
5116	NotBefore *date.Time `json:"notBefore,omitempty"`
5117	// NotAfter - READ-ONLY; Date Certificate is valid to.
5118	NotAfter *date.Time `json:"notAfter,omitempty"`
5119	// SignatureAlgorithm - READ-ONLY; Certificate Signature algorithm.
5120	SignatureAlgorithm *string `json:"signatureAlgorithm,omitempty"`
5121	// Issuer - READ-ONLY; Certificate Issuer.
5122	Issuer *string `json:"issuer,omitempty"`
5123	// RawData - READ-ONLY; Raw certificate data.
5124	RawData *string `json:"rawData,omitempty"`
5125}
5126
5127// MarshalJSON is the custom marshaler for CertificateDetails.
5128func (cd CertificateDetails) MarshalJSON() ([]byte, error) {
5129	objectMap := make(map[string]interface{})
5130	return json.Marshal(objectMap)
5131}
5132
5133// CertificateEmail SSL certificate email.
5134type CertificateEmail struct {
5135	// CertificateEmailProperties - CertificateEmail resource specific properties
5136	*CertificateEmailProperties `json:"properties,omitempty"`
5137	// ID - READ-ONLY; Resource Id.
5138	ID *string `json:"id,omitempty"`
5139	// Name - READ-ONLY; Resource Name.
5140	Name *string `json:"name,omitempty"`
5141	// Kind - Kind of resource.
5142	Kind *string `json:"kind,omitempty"`
5143	// Type - READ-ONLY; Resource type.
5144	Type *string `json:"type,omitempty"`
5145}
5146
5147// MarshalJSON is the custom marshaler for CertificateEmail.
5148func (ce CertificateEmail) MarshalJSON() ([]byte, error) {
5149	objectMap := make(map[string]interface{})
5150	if ce.CertificateEmailProperties != nil {
5151		objectMap["properties"] = ce.CertificateEmailProperties
5152	}
5153	if ce.Kind != nil {
5154		objectMap["kind"] = ce.Kind
5155	}
5156	return json.Marshal(objectMap)
5157}
5158
5159// UnmarshalJSON is the custom unmarshaler for CertificateEmail struct.
5160func (ce *CertificateEmail) UnmarshalJSON(body []byte) error {
5161	var m map[string]*json.RawMessage
5162	err := json.Unmarshal(body, &m)
5163	if err != nil {
5164		return err
5165	}
5166	for k, v := range m {
5167		switch k {
5168		case "properties":
5169			if v != nil {
5170				var certificateEmailProperties CertificateEmailProperties
5171				err = json.Unmarshal(*v, &certificateEmailProperties)
5172				if err != nil {
5173					return err
5174				}
5175				ce.CertificateEmailProperties = &certificateEmailProperties
5176			}
5177		case "id":
5178			if v != nil {
5179				var ID string
5180				err = json.Unmarshal(*v, &ID)
5181				if err != nil {
5182					return err
5183				}
5184				ce.ID = &ID
5185			}
5186		case "name":
5187			if v != nil {
5188				var name string
5189				err = json.Unmarshal(*v, &name)
5190				if err != nil {
5191					return err
5192				}
5193				ce.Name = &name
5194			}
5195		case "kind":
5196			if v != nil {
5197				var kind string
5198				err = json.Unmarshal(*v, &kind)
5199				if err != nil {
5200					return err
5201				}
5202				ce.Kind = &kind
5203			}
5204		case "type":
5205			if v != nil {
5206				var typeVar string
5207				err = json.Unmarshal(*v, &typeVar)
5208				if err != nil {
5209					return err
5210				}
5211				ce.Type = &typeVar
5212			}
5213		}
5214	}
5215
5216	return nil
5217}
5218
5219// CertificateEmailProperties certificateEmail resource specific properties
5220type CertificateEmailProperties struct {
5221	// EmailID - Email id.
5222	EmailID *string `json:"emailId,omitempty"`
5223	// TimeStamp - Time stamp.
5224	TimeStamp *date.Time `json:"timeStamp,omitempty"`
5225}
5226
5227// CertificateOrderAction certificate order action.
5228type CertificateOrderAction struct {
5229	// CertificateOrderActionProperties - CertificateOrderAction resource specific properties
5230	*CertificateOrderActionProperties `json:"properties,omitempty"`
5231	// ID - READ-ONLY; Resource Id.
5232	ID *string `json:"id,omitempty"`
5233	// Name - READ-ONLY; Resource Name.
5234	Name *string `json:"name,omitempty"`
5235	// Kind - Kind of resource.
5236	Kind *string `json:"kind,omitempty"`
5237	// Type - READ-ONLY; Resource type.
5238	Type *string `json:"type,omitempty"`
5239}
5240
5241// MarshalJSON is the custom marshaler for CertificateOrderAction.
5242func (coa CertificateOrderAction) MarshalJSON() ([]byte, error) {
5243	objectMap := make(map[string]interface{})
5244	if coa.CertificateOrderActionProperties != nil {
5245		objectMap["properties"] = coa.CertificateOrderActionProperties
5246	}
5247	if coa.Kind != nil {
5248		objectMap["kind"] = coa.Kind
5249	}
5250	return json.Marshal(objectMap)
5251}
5252
5253// UnmarshalJSON is the custom unmarshaler for CertificateOrderAction struct.
5254func (coa *CertificateOrderAction) UnmarshalJSON(body []byte) error {
5255	var m map[string]*json.RawMessage
5256	err := json.Unmarshal(body, &m)
5257	if err != nil {
5258		return err
5259	}
5260	for k, v := range m {
5261		switch k {
5262		case "properties":
5263			if v != nil {
5264				var certificateOrderActionProperties CertificateOrderActionProperties
5265				err = json.Unmarshal(*v, &certificateOrderActionProperties)
5266				if err != nil {
5267					return err
5268				}
5269				coa.CertificateOrderActionProperties = &certificateOrderActionProperties
5270			}
5271		case "id":
5272			if v != nil {
5273				var ID string
5274				err = json.Unmarshal(*v, &ID)
5275				if err != nil {
5276					return err
5277				}
5278				coa.ID = &ID
5279			}
5280		case "name":
5281			if v != nil {
5282				var name string
5283				err = json.Unmarshal(*v, &name)
5284				if err != nil {
5285					return err
5286				}
5287				coa.Name = &name
5288			}
5289		case "kind":
5290			if v != nil {
5291				var kind string
5292				err = json.Unmarshal(*v, &kind)
5293				if err != nil {
5294					return err
5295				}
5296				coa.Kind = &kind
5297			}
5298		case "type":
5299			if v != nil {
5300				var typeVar string
5301				err = json.Unmarshal(*v, &typeVar)
5302				if err != nil {
5303					return err
5304				}
5305				coa.Type = &typeVar
5306			}
5307		}
5308	}
5309
5310	return nil
5311}
5312
5313// CertificateOrderActionProperties certificateOrderAction resource specific properties
5314type CertificateOrderActionProperties struct {
5315	// Type - Action type. Possible values include: 'CertificateIssued', 'CertificateOrderCanceled', 'CertificateOrderCreated', 'CertificateRevoked', 'DomainValidationComplete', 'FraudDetected', 'OrgNameChange', 'OrgValidationComplete', 'SanDrop', 'FraudCleared', 'CertificateExpired', 'CertificateExpirationWarning', 'FraudDocumentationRequired', 'Unknown'
5316	Type CertificateOrderActionType `json:"type,omitempty"`
5317	// CreatedAt - Time at which the certificate action was performed.
5318	CreatedAt *date.Time `json:"createdAt,omitempty"`
5319}
5320
5321// CertificatePatchResource ARM resource for a certificate.
5322type CertificatePatchResource struct {
5323	// CertificatePatchResourceProperties - CertificatePatchResource resource specific properties
5324	*CertificatePatchResourceProperties `json:"properties,omitempty"`
5325	// ID - READ-ONLY; Resource Id.
5326	ID *string `json:"id,omitempty"`
5327	// Name - READ-ONLY; Resource Name.
5328	Name *string `json:"name,omitempty"`
5329	// Kind - Kind of resource.
5330	Kind *string `json:"kind,omitempty"`
5331	// Type - READ-ONLY; Resource type.
5332	Type *string `json:"type,omitempty"`
5333}
5334
5335// MarshalJSON is the custom marshaler for CertificatePatchResource.
5336func (cpr CertificatePatchResource) MarshalJSON() ([]byte, error) {
5337	objectMap := make(map[string]interface{})
5338	if cpr.CertificatePatchResourceProperties != nil {
5339		objectMap["properties"] = cpr.CertificatePatchResourceProperties
5340	}
5341	if cpr.Kind != nil {
5342		objectMap["kind"] = cpr.Kind
5343	}
5344	return json.Marshal(objectMap)
5345}
5346
5347// UnmarshalJSON is the custom unmarshaler for CertificatePatchResource struct.
5348func (cpr *CertificatePatchResource) UnmarshalJSON(body []byte) error {
5349	var m map[string]*json.RawMessage
5350	err := json.Unmarshal(body, &m)
5351	if err != nil {
5352		return err
5353	}
5354	for k, v := range m {
5355		switch k {
5356		case "properties":
5357			if v != nil {
5358				var certificatePatchResourceProperties CertificatePatchResourceProperties
5359				err = json.Unmarshal(*v, &certificatePatchResourceProperties)
5360				if err != nil {
5361					return err
5362				}
5363				cpr.CertificatePatchResourceProperties = &certificatePatchResourceProperties
5364			}
5365		case "id":
5366			if v != nil {
5367				var ID string
5368				err = json.Unmarshal(*v, &ID)
5369				if err != nil {
5370					return err
5371				}
5372				cpr.ID = &ID
5373			}
5374		case "name":
5375			if v != nil {
5376				var name string
5377				err = json.Unmarshal(*v, &name)
5378				if err != nil {
5379					return err
5380				}
5381				cpr.Name = &name
5382			}
5383		case "kind":
5384			if v != nil {
5385				var kind string
5386				err = json.Unmarshal(*v, &kind)
5387				if err != nil {
5388					return err
5389				}
5390				cpr.Kind = &kind
5391			}
5392		case "type":
5393			if v != nil {
5394				var typeVar string
5395				err = json.Unmarshal(*v, &typeVar)
5396				if err != nil {
5397					return err
5398				}
5399				cpr.Type = &typeVar
5400			}
5401		}
5402	}
5403
5404	return nil
5405}
5406
5407// CertificatePatchResourceProperties certificatePatchResource resource specific properties
5408type CertificatePatchResourceProperties struct {
5409	// FriendlyName - READ-ONLY; Friendly name of the certificate.
5410	FriendlyName *string `json:"friendlyName,omitempty"`
5411	// SubjectName - READ-ONLY; Subject name of the certificate.
5412	SubjectName *string `json:"subjectName,omitempty"`
5413	// HostNames - Host names the certificate applies to.
5414	HostNames *[]string `json:"hostNames,omitempty"`
5415	// PfxBlob - Pfx blob.
5416	PfxBlob *[]byte `json:"pfxBlob,omitempty"`
5417	// SiteName - READ-ONLY; App name.
5418	SiteName *string `json:"siteName,omitempty"`
5419	// SelfLink - READ-ONLY; Self link.
5420	SelfLink *string `json:"selfLink,omitempty"`
5421	// Issuer - READ-ONLY; Certificate issuer.
5422	Issuer *string `json:"issuer,omitempty"`
5423	// IssueDate - READ-ONLY; Certificate issue Date.
5424	IssueDate *date.Time `json:"issueDate,omitempty"`
5425	// ExpirationDate - READ-ONLY; Certificate expiration date.
5426	ExpirationDate *date.Time `json:"expirationDate,omitempty"`
5427	// Password - Certificate password.
5428	Password *string `json:"password,omitempty"`
5429	// Thumbprint - READ-ONLY; Certificate thumbprint.
5430	Thumbprint *string `json:"thumbprint,omitempty"`
5431	// Valid - READ-ONLY; Is the certificate valid?.
5432	Valid *bool `json:"valid,omitempty"`
5433	// CerBlob - READ-ONLY; Raw bytes of .cer file
5434	CerBlob *[]byte `json:"cerBlob,omitempty"`
5435	// PublicKeyHash - READ-ONLY; Public key hash.
5436	PublicKeyHash *string `json:"publicKeyHash,omitempty"`
5437	// HostingEnvironmentProfile - READ-ONLY; Specification for the App Service Environment to use for the certificate.
5438	HostingEnvironmentProfile *HostingEnvironmentProfile `json:"hostingEnvironmentProfile,omitempty"`
5439	// KeyVaultID - Key Vault Csm resource Id.
5440	KeyVaultID *string `json:"keyVaultId,omitempty"`
5441	// KeyVaultSecretName - Key Vault secret name.
5442	KeyVaultSecretName *string `json:"keyVaultSecretName,omitempty"`
5443	// KeyVaultSecretStatus - READ-ONLY; Status of the Key Vault secret. Possible values include: 'KeyVaultSecretStatusInitialized', 'KeyVaultSecretStatusWaitingOnCertificateOrder', 'KeyVaultSecretStatusSucceeded', 'KeyVaultSecretStatusCertificateOrderFailed', 'KeyVaultSecretStatusOperationNotPermittedOnKeyVault', 'KeyVaultSecretStatusAzureServiceUnauthorizedToAccessKeyVault', 'KeyVaultSecretStatusKeyVaultDoesNotExist', 'KeyVaultSecretStatusKeyVaultSecretDoesNotExist', 'KeyVaultSecretStatusUnknownError', 'KeyVaultSecretStatusExternalPrivateKey', 'KeyVaultSecretStatusUnknown'
5444	KeyVaultSecretStatus KeyVaultSecretStatus `json:"keyVaultSecretStatus,omitempty"`
5445	// GeoRegion - READ-ONLY; Region of the certificate.
5446	GeoRegion *string `json:"geoRegion,omitempty"`
5447	// ServerFarmID - Resource ID of the associated App Service plan, formatted as: "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}".
5448	ServerFarmID *string `json:"serverFarmId,omitempty"`
5449}
5450
5451// MarshalJSON is the custom marshaler for CertificatePatchResourceProperties.
5452func (cpr CertificatePatchResourceProperties) MarshalJSON() ([]byte, error) {
5453	objectMap := make(map[string]interface{})
5454	if cpr.HostNames != nil {
5455		objectMap["hostNames"] = cpr.HostNames
5456	}
5457	if cpr.PfxBlob != nil {
5458		objectMap["pfxBlob"] = cpr.PfxBlob
5459	}
5460	if cpr.Password != nil {
5461		objectMap["password"] = cpr.Password
5462	}
5463	if cpr.KeyVaultID != nil {
5464		objectMap["keyVaultId"] = cpr.KeyVaultID
5465	}
5466	if cpr.KeyVaultSecretName != nil {
5467		objectMap["keyVaultSecretName"] = cpr.KeyVaultSecretName
5468	}
5469	if cpr.ServerFarmID != nil {
5470		objectMap["serverFarmId"] = cpr.ServerFarmID
5471	}
5472	return json.Marshal(objectMap)
5473}
5474
5475// CertificateProperties certificate resource specific properties
5476type CertificateProperties struct {
5477	// FriendlyName - READ-ONLY; Friendly name of the certificate.
5478	FriendlyName *string `json:"friendlyName,omitempty"`
5479	// SubjectName - READ-ONLY; Subject name of the certificate.
5480	SubjectName *string `json:"subjectName,omitempty"`
5481	// HostNames - Host names the certificate applies to.
5482	HostNames *[]string `json:"hostNames,omitempty"`
5483	// PfxBlob - Pfx blob.
5484	PfxBlob *[]byte `json:"pfxBlob,omitempty"`
5485	// SiteName - READ-ONLY; App name.
5486	SiteName *string `json:"siteName,omitempty"`
5487	// SelfLink - READ-ONLY; Self link.
5488	SelfLink *string `json:"selfLink,omitempty"`
5489	// Issuer - READ-ONLY; Certificate issuer.
5490	Issuer *string `json:"issuer,omitempty"`
5491	// IssueDate - READ-ONLY; Certificate issue Date.
5492	IssueDate *date.Time `json:"issueDate,omitempty"`
5493	// ExpirationDate - READ-ONLY; Certificate expiration date.
5494	ExpirationDate *date.Time `json:"expirationDate,omitempty"`
5495	// Password - Certificate password.
5496	Password *string `json:"password,omitempty"`
5497	// Thumbprint - READ-ONLY; Certificate thumbprint.
5498	Thumbprint *string `json:"thumbprint,omitempty"`
5499	// Valid - READ-ONLY; Is the certificate valid?.
5500	Valid *bool `json:"valid,omitempty"`
5501	// CerBlob - READ-ONLY; Raw bytes of .cer file
5502	CerBlob *[]byte `json:"cerBlob,omitempty"`
5503	// PublicKeyHash - READ-ONLY; Public key hash.
5504	PublicKeyHash *string `json:"publicKeyHash,omitempty"`
5505	// HostingEnvironmentProfile - READ-ONLY; Specification for the App Service Environment to use for the certificate.
5506	HostingEnvironmentProfile *HostingEnvironmentProfile `json:"hostingEnvironmentProfile,omitempty"`
5507	// KeyVaultID - Key Vault Csm resource Id.
5508	KeyVaultID *string `json:"keyVaultId,omitempty"`
5509	// KeyVaultSecretName - Key Vault secret name.
5510	KeyVaultSecretName *string `json:"keyVaultSecretName,omitempty"`
5511	// KeyVaultSecretStatus - READ-ONLY; Status of the Key Vault secret. Possible values include: 'KeyVaultSecretStatusInitialized', 'KeyVaultSecretStatusWaitingOnCertificateOrder', 'KeyVaultSecretStatusSucceeded', 'KeyVaultSecretStatusCertificateOrderFailed', 'KeyVaultSecretStatusOperationNotPermittedOnKeyVault', 'KeyVaultSecretStatusAzureServiceUnauthorizedToAccessKeyVault', 'KeyVaultSecretStatusKeyVaultDoesNotExist', 'KeyVaultSecretStatusKeyVaultSecretDoesNotExist', 'KeyVaultSecretStatusUnknownError', 'KeyVaultSecretStatusExternalPrivateKey', 'KeyVaultSecretStatusUnknown'
5512	KeyVaultSecretStatus KeyVaultSecretStatus `json:"keyVaultSecretStatus,omitempty"`
5513	// GeoRegion - READ-ONLY; Region of the certificate.
5514	GeoRegion *string `json:"geoRegion,omitempty"`
5515	// ServerFarmID - Resource ID of the associated App Service plan, formatted as: "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}".
5516	ServerFarmID *string `json:"serverFarmId,omitempty"`
5517}
5518
5519// MarshalJSON is the custom marshaler for CertificateProperties.
5520func (c CertificateProperties) MarshalJSON() ([]byte, error) {
5521	objectMap := make(map[string]interface{})
5522	if c.HostNames != nil {
5523		objectMap["hostNames"] = c.HostNames
5524	}
5525	if c.PfxBlob != nil {
5526		objectMap["pfxBlob"] = c.PfxBlob
5527	}
5528	if c.Password != nil {
5529		objectMap["password"] = c.Password
5530	}
5531	if c.KeyVaultID != nil {
5532		objectMap["keyVaultId"] = c.KeyVaultID
5533	}
5534	if c.KeyVaultSecretName != nil {
5535		objectMap["keyVaultSecretName"] = c.KeyVaultSecretName
5536	}
5537	if c.ServerFarmID != nil {
5538		objectMap["serverFarmId"] = c.ServerFarmID
5539	}
5540	return json.Marshal(objectMap)
5541}
5542
5543// CloningInfo information needed for cloning operation.
5544type CloningInfo struct {
5545	// CorrelationID - Correlation ID of cloning operation. This ID ties multiple cloning operations
5546	// together to use the same snapshot.
5547	CorrelationID *uuid.UUID `json:"correlationId,omitempty"`
5548	// Overwrite - <code>true</code> to overwrite destination app; otherwise, <code>false</code>.
5549	Overwrite *bool `json:"overwrite,omitempty"`
5550	// CloneCustomHostNames - <code>true</code> to clone custom hostnames from source app; otherwise, <code>false</code>.
5551	CloneCustomHostNames *bool `json:"cloneCustomHostNames,omitempty"`
5552	// CloneSourceControl - <code>true</code> to clone source control from source app; otherwise, <code>false</code>.
5553	CloneSourceControl *bool `json:"cloneSourceControl,omitempty"`
5554	// SourceWebAppID - ARM resource ID of the source app. App resource ID is of the form
5555	// /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName} for production slots and
5556	// /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slotName} for other slots.
5557	SourceWebAppID *string `json:"sourceWebAppId,omitempty"`
5558	// HostingEnvironment - App Service Environment.
5559	HostingEnvironment *string `json:"hostingEnvironment,omitempty"`
5560	// AppSettingsOverrides - Application setting overrides for cloned app. If specified, these settings override the settings cloned
5561	// from source app. Otherwise, application settings from source app are retained.
5562	AppSettingsOverrides map[string]*string `json:"appSettingsOverrides"`
5563	// ConfigureLoadBalancing - <code>true</code> to configure load balancing for source and destination app.
5564	ConfigureLoadBalancing *bool `json:"configureLoadBalancing,omitempty"`
5565	// TrafficManagerProfileID - ARM resource ID of the Traffic Manager profile to use, if it exists. Traffic Manager resource ID is of the form
5566	// /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{profileName}.
5567	TrafficManagerProfileID *string `json:"trafficManagerProfileId,omitempty"`
5568	// TrafficManagerProfileName - Name of Traffic Manager profile to create. This is only needed if Traffic Manager profile does not already exist.
5569	TrafficManagerProfileName *string `json:"trafficManagerProfileName,omitempty"`
5570	// IgnoreQuotas - <code>true</code> if quotas should be ignored; otherwise, <code>false</code>.
5571	IgnoreQuotas *bool `json:"ignoreQuotas,omitempty"`
5572}
5573
5574// MarshalJSON is the custom marshaler for CloningInfo.
5575func (ci CloningInfo) MarshalJSON() ([]byte, error) {
5576	objectMap := make(map[string]interface{})
5577	if ci.CorrelationID != nil {
5578		objectMap["correlationId"] = ci.CorrelationID
5579	}
5580	if ci.Overwrite != nil {
5581		objectMap["overwrite"] = ci.Overwrite
5582	}
5583	if ci.CloneCustomHostNames != nil {
5584		objectMap["cloneCustomHostNames"] = ci.CloneCustomHostNames
5585	}
5586	if ci.CloneSourceControl != nil {
5587		objectMap["cloneSourceControl"] = ci.CloneSourceControl
5588	}
5589	if ci.SourceWebAppID != nil {
5590		objectMap["sourceWebAppId"] = ci.SourceWebAppID
5591	}
5592	if ci.HostingEnvironment != nil {
5593		objectMap["hostingEnvironment"] = ci.HostingEnvironment
5594	}
5595	if ci.AppSettingsOverrides != nil {
5596		objectMap["appSettingsOverrides"] = ci.AppSettingsOverrides
5597	}
5598	if ci.ConfigureLoadBalancing != nil {
5599		objectMap["configureLoadBalancing"] = ci.ConfigureLoadBalancing
5600	}
5601	if ci.TrafficManagerProfileID != nil {
5602		objectMap["trafficManagerProfileId"] = ci.TrafficManagerProfileID
5603	}
5604	if ci.TrafficManagerProfileName != nil {
5605		objectMap["trafficManagerProfileName"] = ci.TrafficManagerProfileName
5606	}
5607	if ci.IgnoreQuotas != nil {
5608		objectMap["ignoreQuotas"] = ci.IgnoreQuotas
5609	}
5610	return json.Marshal(objectMap)
5611}
5612
5613// ConnectionStringDictionary string dictionary resource.
5614type ConnectionStringDictionary struct {
5615	autorest.Response `json:"-"`
5616	// Properties - Connection strings.
5617	Properties map[string]*ConnStringValueTypePair `json:"properties"`
5618	// ID - READ-ONLY; Resource Id.
5619	ID *string `json:"id,omitempty"`
5620	// Name - READ-ONLY; Resource Name.
5621	Name *string `json:"name,omitempty"`
5622	// Kind - Kind of resource.
5623	Kind *string `json:"kind,omitempty"`
5624	// Type - READ-ONLY; Resource type.
5625	Type *string `json:"type,omitempty"`
5626}
5627
5628// MarshalJSON is the custom marshaler for ConnectionStringDictionary.
5629func (csd ConnectionStringDictionary) MarshalJSON() ([]byte, error) {
5630	objectMap := make(map[string]interface{})
5631	if csd.Properties != nil {
5632		objectMap["properties"] = csd.Properties
5633	}
5634	if csd.Kind != nil {
5635		objectMap["kind"] = csd.Kind
5636	}
5637	return json.Marshal(objectMap)
5638}
5639
5640// ConnStringInfo database connection string information.
5641type ConnStringInfo struct {
5642	// Name - Name of connection string.
5643	Name *string `json:"name,omitempty"`
5644	// ConnectionString - Connection string value.
5645	ConnectionString *string `json:"connectionString,omitempty"`
5646	// Type - Type of database. Possible values include: 'MySQL', 'SQLServer', 'SQLAzure', 'Custom', 'NotificationHub', 'ServiceBus', 'EventHub', 'APIHub', 'DocDb', 'RedisCache', 'PostgreSQL'
5647	Type ConnectionStringType `json:"type,omitempty"`
5648}
5649
5650// ConnStringValueTypePair database connection string value to type pair.
5651type ConnStringValueTypePair struct {
5652	// Value - Value of pair.
5653	Value *string `json:"value,omitempty"`
5654	// Type - Type of database. Possible values include: 'MySQL', 'SQLServer', 'SQLAzure', 'Custom', 'NotificationHub', 'ServiceBus', 'EventHub', 'APIHub', 'DocDb', 'RedisCache', 'PostgreSQL'
5655	Type ConnectionStringType `json:"type,omitempty"`
5656}
5657
5658// Contact contact information for domain registration. If 'Domain Privacy' option is not selected then the
5659// contact information is made publicly available through the Whois
5660// directories as per ICANN requirements.
5661type Contact struct {
5662	// AddressMailing - Mailing address.
5663	AddressMailing *Address `json:"addressMailing,omitempty"`
5664	// Email - Email address.
5665	Email *string `json:"email,omitempty"`
5666	// Fax - Fax number.
5667	Fax *string `json:"fax,omitempty"`
5668	// JobTitle - Job title.
5669	JobTitle *string `json:"jobTitle,omitempty"`
5670	// NameFirst - First name.
5671	NameFirst *string `json:"nameFirst,omitempty"`
5672	// NameLast - Last name.
5673	NameLast *string `json:"nameLast,omitempty"`
5674	// NameMiddle - Middle name.
5675	NameMiddle *string `json:"nameMiddle,omitempty"`
5676	// Organization - Organization contact belongs to.
5677	Organization *string `json:"organization,omitempty"`
5678	// Phone - Phone number.
5679	Phone *string `json:"phone,omitempty"`
5680}
5681
5682// ContinuousWebJob continuous Web Job Information.
5683type ContinuousWebJob struct {
5684	autorest.Response `json:"-"`
5685	// ContinuousWebJobProperties - ContinuousWebJob resource specific properties
5686	*ContinuousWebJobProperties `json:"properties,omitempty"`
5687	// ID - READ-ONLY; Resource Id.
5688	ID *string `json:"id,omitempty"`
5689	// Name - READ-ONLY; Resource Name.
5690	Name *string `json:"name,omitempty"`
5691	// Kind - Kind of resource.
5692	Kind *string `json:"kind,omitempty"`
5693	// Type - READ-ONLY; Resource type.
5694	Type *string `json:"type,omitempty"`
5695}
5696
5697// MarshalJSON is the custom marshaler for ContinuousWebJob.
5698func (cwj ContinuousWebJob) MarshalJSON() ([]byte, error) {
5699	objectMap := make(map[string]interface{})
5700	if cwj.ContinuousWebJobProperties != nil {
5701		objectMap["properties"] = cwj.ContinuousWebJobProperties
5702	}
5703	if cwj.Kind != nil {
5704		objectMap["kind"] = cwj.Kind
5705	}
5706	return json.Marshal(objectMap)
5707}
5708
5709// UnmarshalJSON is the custom unmarshaler for ContinuousWebJob struct.
5710func (cwj *ContinuousWebJob) UnmarshalJSON(body []byte) error {
5711	var m map[string]*json.RawMessage
5712	err := json.Unmarshal(body, &m)
5713	if err != nil {
5714		return err
5715	}
5716	for k, v := range m {
5717		switch k {
5718		case "properties":
5719			if v != nil {
5720				var continuousWebJobProperties ContinuousWebJobProperties
5721				err = json.Unmarshal(*v, &continuousWebJobProperties)
5722				if err != nil {
5723					return err
5724				}
5725				cwj.ContinuousWebJobProperties = &continuousWebJobProperties
5726			}
5727		case "id":
5728			if v != nil {
5729				var ID string
5730				err = json.Unmarshal(*v, &ID)
5731				if err != nil {
5732					return err
5733				}
5734				cwj.ID = &ID
5735			}
5736		case "name":
5737			if v != nil {
5738				var name string
5739				err = json.Unmarshal(*v, &name)
5740				if err != nil {
5741					return err
5742				}
5743				cwj.Name = &name
5744			}
5745		case "kind":
5746			if v != nil {
5747				var kind string
5748				err = json.Unmarshal(*v, &kind)
5749				if err != nil {
5750					return err
5751				}
5752				cwj.Kind = &kind
5753			}
5754		case "type":
5755			if v != nil {
5756				var typeVar string
5757				err = json.Unmarshal(*v, &typeVar)
5758				if err != nil {
5759					return err
5760				}
5761				cwj.Type = &typeVar
5762			}
5763		}
5764	}
5765
5766	return nil
5767}
5768
5769// ContinuousWebJobCollection collection of Kudu continuous web job information elements.
5770type ContinuousWebJobCollection struct {
5771	autorest.Response `json:"-"`
5772	// Value - Collection of resources.
5773	Value *[]ContinuousWebJob `json:"value,omitempty"`
5774	// NextLink - Link to next page of resources.
5775	NextLink *string `json:"nextLink,omitempty"`
5776}
5777
5778// ContinuousWebJobCollectionIterator provides access to a complete listing of ContinuousWebJob values.
5779type ContinuousWebJobCollectionIterator struct {
5780	i    int
5781	page ContinuousWebJobCollectionPage
5782}
5783
5784// NextWithContext advances to the next value.  If there was an error making
5785// the request the iterator does not advance and the error is returned.
5786func (iter *ContinuousWebJobCollectionIterator) NextWithContext(ctx context.Context) (err error) {
5787	if tracing.IsEnabled() {
5788		ctx = tracing.StartSpan(ctx, fqdn+"/ContinuousWebJobCollectionIterator.NextWithContext")
5789		defer func() {
5790			sc := -1
5791			if iter.Response().Response.Response != nil {
5792				sc = iter.Response().Response.Response.StatusCode
5793			}
5794			tracing.EndSpan(ctx, sc, err)
5795		}()
5796	}
5797	iter.i++
5798	if iter.i < len(iter.page.Values()) {
5799		return nil
5800	}
5801	err = iter.page.NextWithContext(ctx)
5802	if err != nil {
5803		iter.i--
5804		return err
5805	}
5806	iter.i = 0
5807	return nil
5808}
5809
5810// Next advances to the next value.  If there was an error making
5811// the request the iterator does not advance and the error is returned.
5812// Deprecated: Use NextWithContext() instead.
5813func (iter *ContinuousWebJobCollectionIterator) Next() error {
5814	return iter.NextWithContext(context.Background())
5815}
5816
5817// NotDone returns true if the enumeration should be started or is not yet complete.
5818func (iter ContinuousWebJobCollectionIterator) NotDone() bool {
5819	return iter.page.NotDone() && iter.i < len(iter.page.Values())
5820}
5821
5822// Response returns the raw server response from the last page request.
5823func (iter ContinuousWebJobCollectionIterator) Response() ContinuousWebJobCollection {
5824	return iter.page.Response()
5825}
5826
5827// Value returns the current value or a zero-initialized value if the
5828// iterator has advanced beyond the end of the collection.
5829func (iter ContinuousWebJobCollectionIterator) Value() ContinuousWebJob {
5830	if !iter.page.NotDone() {
5831		return ContinuousWebJob{}
5832	}
5833	return iter.page.Values()[iter.i]
5834}
5835
5836// Creates a new instance of the ContinuousWebJobCollectionIterator type.
5837func NewContinuousWebJobCollectionIterator(page ContinuousWebJobCollectionPage) ContinuousWebJobCollectionIterator {
5838	return ContinuousWebJobCollectionIterator{page: page}
5839}
5840
5841// IsEmpty returns true if the ListResult contains no values.
5842func (cwjc ContinuousWebJobCollection) IsEmpty() bool {
5843	return cwjc.Value == nil || len(*cwjc.Value) == 0
5844}
5845
5846// hasNextLink returns true if the NextLink is not empty.
5847func (cwjc ContinuousWebJobCollection) hasNextLink() bool {
5848	return cwjc.NextLink != nil && len(*cwjc.NextLink) != 0
5849}
5850
5851// continuousWebJobCollectionPreparer prepares a request to retrieve the next set of results.
5852// It returns nil if no more results exist.
5853func (cwjc ContinuousWebJobCollection) continuousWebJobCollectionPreparer(ctx context.Context) (*http.Request, error) {
5854	if !cwjc.hasNextLink() {
5855		return nil, nil
5856	}
5857	return autorest.Prepare((&http.Request{}).WithContext(ctx),
5858		autorest.AsJSON(),
5859		autorest.AsGet(),
5860		autorest.WithBaseURL(to.String(cwjc.NextLink)))
5861}
5862
5863// ContinuousWebJobCollectionPage contains a page of ContinuousWebJob values.
5864type ContinuousWebJobCollectionPage struct {
5865	fn   func(context.Context, ContinuousWebJobCollection) (ContinuousWebJobCollection, error)
5866	cwjc ContinuousWebJobCollection
5867}
5868
5869// NextWithContext advances to the next page of values.  If there was an error making
5870// the request the page does not advance and the error is returned.
5871func (page *ContinuousWebJobCollectionPage) NextWithContext(ctx context.Context) (err error) {
5872	if tracing.IsEnabled() {
5873		ctx = tracing.StartSpan(ctx, fqdn+"/ContinuousWebJobCollectionPage.NextWithContext")
5874		defer func() {
5875			sc := -1
5876			if page.Response().Response.Response != nil {
5877				sc = page.Response().Response.Response.StatusCode
5878			}
5879			tracing.EndSpan(ctx, sc, err)
5880		}()
5881	}
5882	for {
5883		next, err := page.fn(ctx, page.cwjc)
5884		if err != nil {
5885			return err
5886		}
5887		page.cwjc = next
5888		if !next.hasNextLink() || !next.IsEmpty() {
5889			break
5890		}
5891	}
5892	return nil
5893}
5894
5895// Next advances to the next page of values.  If there was an error making
5896// the request the page does not advance and the error is returned.
5897// Deprecated: Use NextWithContext() instead.
5898func (page *ContinuousWebJobCollectionPage) Next() error {
5899	return page.NextWithContext(context.Background())
5900}
5901
5902// NotDone returns true if the page enumeration should be started or is not yet complete.
5903func (page ContinuousWebJobCollectionPage) NotDone() bool {
5904	return !page.cwjc.IsEmpty()
5905}
5906
5907// Response returns the raw server response from the last page request.
5908func (page ContinuousWebJobCollectionPage) Response() ContinuousWebJobCollection {
5909	return page.cwjc
5910}
5911
5912// Values returns the slice of values for the current page or nil if there are no values.
5913func (page ContinuousWebJobCollectionPage) Values() []ContinuousWebJob {
5914	if page.cwjc.IsEmpty() {
5915		return nil
5916	}
5917	return *page.cwjc.Value
5918}
5919
5920// Creates a new instance of the ContinuousWebJobCollectionPage type.
5921func NewContinuousWebJobCollectionPage(cur ContinuousWebJobCollection, getNextPage func(context.Context, ContinuousWebJobCollection) (ContinuousWebJobCollection, error)) ContinuousWebJobCollectionPage {
5922	return ContinuousWebJobCollectionPage{
5923		fn:   getNextPage,
5924		cwjc: cur,
5925	}
5926}
5927
5928// ContinuousWebJobProperties continuousWebJob resource specific properties
5929type ContinuousWebJobProperties struct {
5930	// Status - Job status. Possible values include: 'Initializing', 'Starting', 'Running', 'PendingRestart', 'Stopped'
5931	Status ContinuousWebJobStatus `json:"status,omitempty"`
5932	// DetailedStatus - Detailed status.
5933	DetailedStatus *string `json:"detailedStatus,omitempty"`
5934	// LogURL - Log URL.
5935	LogURL *string `json:"logUrl,omitempty"`
5936	// Name - READ-ONLY; Job name. Used as job identifier in ARM resource URI.
5937	Name *string `json:"name,omitempty"`
5938	// RunCommand - Run command.
5939	RunCommand *string `json:"runCommand,omitempty"`
5940	// URL - Job URL.
5941	URL *string `json:"url,omitempty"`
5942	// ExtraInfoURL - Extra Info URL.
5943	ExtraInfoURL *string `json:"extraInfoUrl,omitempty"`
5944	// JobType - Job type. Possible values include: 'Continuous', 'Triggered'
5945	JobType JobType `json:"jobType,omitempty"`
5946	// Error - Error information.
5947	Error *string `json:"error,omitempty"`
5948	// UsingSdk - Using SDK?
5949	UsingSdk *bool `json:"usingSdk,omitempty"`
5950	// Settings - Job settings.
5951	Settings map[string]interface{} `json:"settings"`
5952}
5953
5954// MarshalJSON is the custom marshaler for ContinuousWebJobProperties.
5955func (cwj ContinuousWebJobProperties) MarshalJSON() ([]byte, error) {
5956	objectMap := make(map[string]interface{})
5957	if cwj.Status != "" {
5958		objectMap["status"] = cwj.Status
5959	}
5960	if cwj.DetailedStatus != nil {
5961		objectMap["detailedStatus"] = cwj.DetailedStatus
5962	}
5963	if cwj.LogURL != nil {
5964		objectMap["logUrl"] = cwj.LogURL
5965	}
5966	if cwj.RunCommand != nil {
5967		objectMap["runCommand"] = cwj.RunCommand
5968	}
5969	if cwj.URL != nil {
5970		objectMap["url"] = cwj.URL
5971	}
5972	if cwj.ExtraInfoURL != nil {
5973		objectMap["extraInfoUrl"] = cwj.ExtraInfoURL
5974	}
5975	if cwj.JobType != "" {
5976		objectMap["jobType"] = cwj.JobType
5977	}
5978	if cwj.Error != nil {
5979		objectMap["error"] = cwj.Error
5980	}
5981	if cwj.UsingSdk != nil {
5982		objectMap["usingSdk"] = cwj.UsingSdk
5983	}
5984	if cwj.Settings != nil {
5985		objectMap["settings"] = cwj.Settings
5986	}
5987	return json.Marshal(objectMap)
5988}
5989
5990// CorsSettings cross-Origin Resource Sharing (CORS) settings for the app.
5991type CorsSettings struct {
5992	// AllowedOrigins - Gets or sets the list of origins that should be allowed to make cross-origin
5993	// calls (for example: http://example.com:12345). Use "*" to allow all.
5994	AllowedOrigins *[]string `json:"allowedOrigins,omitempty"`
5995}
5996
5997// CsmMoveResourceEnvelope object with a list of the resources that need to be moved and the resource group
5998// they should be moved to.
5999type CsmMoveResourceEnvelope struct {
6000	TargetResourceGroup *string   `json:"targetResourceGroup,omitempty"`
6001	Resources           *[]string `json:"resources,omitempty"`
6002}
6003
6004// CsmOperationCollection collection of Azure resource manager operation metadata.
6005type CsmOperationCollection struct {
6006	autorest.Response `json:"-"`
6007	// Value - Collection of resources.
6008	Value *[]CsmOperationDescription `json:"value,omitempty"`
6009	// NextLink - READ-ONLY; Link to next page of resources.
6010	NextLink *string `json:"nextLink,omitempty"`
6011}
6012
6013// MarshalJSON is the custom marshaler for CsmOperationCollection.
6014func (coc CsmOperationCollection) MarshalJSON() ([]byte, error) {
6015	objectMap := make(map[string]interface{})
6016	if coc.Value != nil {
6017		objectMap["value"] = coc.Value
6018	}
6019	return json.Marshal(objectMap)
6020}
6021
6022// CsmOperationCollectionIterator provides access to a complete listing of CsmOperationDescription values.
6023type CsmOperationCollectionIterator struct {
6024	i    int
6025	page CsmOperationCollectionPage
6026}
6027
6028// NextWithContext advances to the next value.  If there was an error making
6029// the request the iterator does not advance and the error is returned.
6030func (iter *CsmOperationCollectionIterator) NextWithContext(ctx context.Context) (err error) {
6031	if tracing.IsEnabled() {
6032		ctx = tracing.StartSpan(ctx, fqdn+"/CsmOperationCollectionIterator.NextWithContext")
6033		defer func() {
6034			sc := -1
6035			if iter.Response().Response.Response != nil {
6036				sc = iter.Response().Response.Response.StatusCode
6037			}
6038			tracing.EndSpan(ctx, sc, err)
6039		}()
6040	}
6041	iter.i++
6042	if iter.i < len(iter.page.Values()) {
6043		return nil
6044	}
6045	err = iter.page.NextWithContext(ctx)
6046	if err != nil {
6047		iter.i--
6048		return err
6049	}
6050	iter.i = 0
6051	return nil
6052}
6053
6054// Next advances to the next value.  If there was an error making
6055// the request the iterator does not advance and the error is returned.
6056// Deprecated: Use NextWithContext() instead.
6057func (iter *CsmOperationCollectionIterator) Next() error {
6058	return iter.NextWithContext(context.Background())
6059}
6060
6061// NotDone returns true if the enumeration should be started or is not yet complete.
6062func (iter CsmOperationCollectionIterator) NotDone() bool {
6063	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6064}
6065
6066// Response returns the raw server response from the last page request.
6067func (iter CsmOperationCollectionIterator) Response() CsmOperationCollection {
6068	return iter.page.Response()
6069}
6070
6071// Value returns the current value or a zero-initialized value if the
6072// iterator has advanced beyond the end of the collection.
6073func (iter CsmOperationCollectionIterator) Value() CsmOperationDescription {
6074	if !iter.page.NotDone() {
6075		return CsmOperationDescription{}
6076	}
6077	return iter.page.Values()[iter.i]
6078}
6079
6080// Creates a new instance of the CsmOperationCollectionIterator type.
6081func NewCsmOperationCollectionIterator(page CsmOperationCollectionPage) CsmOperationCollectionIterator {
6082	return CsmOperationCollectionIterator{page: page}
6083}
6084
6085// IsEmpty returns true if the ListResult contains no values.
6086func (coc CsmOperationCollection) IsEmpty() bool {
6087	return coc.Value == nil || len(*coc.Value) == 0
6088}
6089
6090// hasNextLink returns true if the NextLink is not empty.
6091func (coc CsmOperationCollection) hasNextLink() bool {
6092	return coc.NextLink != nil && len(*coc.NextLink) != 0
6093}
6094
6095// csmOperationCollectionPreparer prepares a request to retrieve the next set of results.
6096// It returns nil if no more results exist.
6097func (coc CsmOperationCollection) csmOperationCollectionPreparer(ctx context.Context) (*http.Request, error) {
6098	if !coc.hasNextLink() {
6099		return nil, nil
6100	}
6101	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6102		autorest.AsJSON(),
6103		autorest.AsGet(),
6104		autorest.WithBaseURL(to.String(coc.NextLink)))
6105}
6106
6107// CsmOperationCollectionPage contains a page of CsmOperationDescription values.
6108type CsmOperationCollectionPage struct {
6109	fn  func(context.Context, CsmOperationCollection) (CsmOperationCollection, error)
6110	coc CsmOperationCollection
6111}
6112
6113// NextWithContext advances to the next page of values.  If there was an error making
6114// the request the page does not advance and the error is returned.
6115func (page *CsmOperationCollectionPage) NextWithContext(ctx context.Context) (err error) {
6116	if tracing.IsEnabled() {
6117		ctx = tracing.StartSpan(ctx, fqdn+"/CsmOperationCollectionPage.NextWithContext")
6118		defer func() {
6119			sc := -1
6120			if page.Response().Response.Response != nil {
6121				sc = page.Response().Response.Response.StatusCode
6122			}
6123			tracing.EndSpan(ctx, sc, err)
6124		}()
6125	}
6126	for {
6127		next, err := page.fn(ctx, page.coc)
6128		if err != nil {
6129			return err
6130		}
6131		page.coc = next
6132		if !next.hasNextLink() || !next.IsEmpty() {
6133			break
6134		}
6135	}
6136	return nil
6137}
6138
6139// Next advances to the next page of values.  If there was an error making
6140// the request the page does not advance and the error is returned.
6141// Deprecated: Use NextWithContext() instead.
6142func (page *CsmOperationCollectionPage) Next() error {
6143	return page.NextWithContext(context.Background())
6144}
6145
6146// NotDone returns true if the page enumeration should be started or is not yet complete.
6147func (page CsmOperationCollectionPage) NotDone() bool {
6148	return !page.coc.IsEmpty()
6149}
6150
6151// Response returns the raw server response from the last page request.
6152func (page CsmOperationCollectionPage) Response() CsmOperationCollection {
6153	return page.coc
6154}
6155
6156// Values returns the slice of values for the current page or nil if there are no values.
6157func (page CsmOperationCollectionPage) Values() []CsmOperationDescription {
6158	if page.coc.IsEmpty() {
6159		return nil
6160	}
6161	return *page.coc.Value
6162}
6163
6164// Creates a new instance of the CsmOperationCollectionPage type.
6165func NewCsmOperationCollectionPage(cur CsmOperationCollection, getNextPage func(context.Context, CsmOperationCollection) (CsmOperationCollection, error)) CsmOperationCollectionPage {
6166	return CsmOperationCollectionPage{
6167		fn:  getNextPage,
6168		coc: cur,
6169	}
6170}
6171
6172// CsmOperationDescription description of an operation available for Microsoft.Web resource provider.
6173type CsmOperationDescription struct {
6174	Name       *string                            `json:"name,omitempty"`
6175	Display    *CsmOperationDisplay               `json:"display,omitempty"`
6176	Origin     *string                            `json:"origin,omitempty"`
6177	Properties *CsmOperationDescriptionProperties `json:"properties,omitempty"`
6178}
6179
6180// CsmOperationDescriptionProperties properties available for a Microsoft.Web resource provider operation.
6181type CsmOperationDescriptionProperties struct {
6182	ServiceSpecification *ServiceSpecification `json:"serviceSpecification,omitempty"`
6183}
6184
6185// CsmOperationDisplay meta data about operation used for display in portal.
6186type CsmOperationDisplay struct {
6187	Provider    *string `json:"provider,omitempty"`
6188	Resource    *string `json:"resource,omitempty"`
6189	Operation   *string `json:"operation,omitempty"`
6190	Description *string `json:"description,omitempty"`
6191}
6192
6193// CsmPublishingProfileOptions publishing options for requested profile.
6194type CsmPublishingProfileOptions struct {
6195	// Format - Name of the format. Valid values are:
6196	// FileZilla3
6197	// WebDeploy -- default
6198	// Ftp. Possible values include: 'FileZilla3', 'WebDeploy', 'Ftp'
6199	Format PublishingProfileFormat `json:"format,omitempty"`
6200}
6201
6202// CsmSlotEntity deployment slot parameters.
6203type CsmSlotEntity struct {
6204	// TargetSlot - Destination deployment slot during swap operation.
6205	TargetSlot *string `json:"targetSlot,omitempty"`
6206	// PreserveVnet - <code>true</code> to preserve Virtual Network to the slot during swap; otherwise, <code>false</code>.
6207	PreserveVnet *bool `json:"preserveVnet,omitempty"`
6208}
6209
6210// CsmUsageQuota usage of the quota resource.
6211type CsmUsageQuota struct {
6212	// Unit - Units of measurement for the quota resource.
6213	Unit *string `json:"unit,omitempty"`
6214	// NextResetTime - Next reset time for the resource counter.
6215	NextResetTime *date.Time `json:"nextResetTime,omitempty"`
6216	// CurrentValue - The current value of the resource counter.
6217	CurrentValue *int64 `json:"currentValue,omitempty"`
6218	// Limit - The resource limit.
6219	Limit *int64 `json:"limit,omitempty"`
6220	// Name - Quota name.
6221	Name *LocalizableString `json:"name,omitempty"`
6222}
6223
6224// CsmUsageQuotaCollection collection of CSM usage quotas.
6225type CsmUsageQuotaCollection struct {
6226	autorest.Response `json:"-"`
6227	// Value - Collection of resources.
6228	Value *[]CsmUsageQuota `json:"value,omitempty"`
6229	// NextLink - READ-ONLY; Link to next page of resources.
6230	NextLink *string `json:"nextLink,omitempty"`
6231}
6232
6233// MarshalJSON is the custom marshaler for CsmUsageQuotaCollection.
6234func (cuqc CsmUsageQuotaCollection) MarshalJSON() ([]byte, error) {
6235	objectMap := make(map[string]interface{})
6236	if cuqc.Value != nil {
6237		objectMap["value"] = cuqc.Value
6238	}
6239	return json.Marshal(objectMap)
6240}
6241
6242// CsmUsageQuotaCollectionIterator provides access to a complete listing of CsmUsageQuota values.
6243type CsmUsageQuotaCollectionIterator struct {
6244	i    int
6245	page CsmUsageQuotaCollectionPage
6246}
6247
6248// NextWithContext advances to the next value.  If there was an error making
6249// the request the iterator does not advance and the error is returned.
6250func (iter *CsmUsageQuotaCollectionIterator) NextWithContext(ctx context.Context) (err error) {
6251	if tracing.IsEnabled() {
6252		ctx = tracing.StartSpan(ctx, fqdn+"/CsmUsageQuotaCollectionIterator.NextWithContext")
6253		defer func() {
6254			sc := -1
6255			if iter.Response().Response.Response != nil {
6256				sc = iter.Response().Response.Response.StatusCode
6257			}
6258			tracing.EndSpan(ctx, sc, err)
6259		}()
6260	}
6261	iter.i++
6262	if iter.i < len(iter.page.Values()) {
6263		return nil
6264	}
6265	err = iter.page.NextWithContext(ctx)
6266	if err != nil {
6267		iter.i--
6268		return err
6269	}
6270	iter.i = 0
6271	return nil
6272}
6273
6274// Next advances to the next value.  If there was an error making
6275// the request the iterator does not advance and the error is returned.
6276// Deprecated: Use NextWithContext() instead.
6277func (iter *CsmUsageQuotaCollectionIterator) Next() error {
6278	return iter.NextWithContext(context.Background())
6279}
6280
6281// NotDone returns true if the enumeration should be started or is not yet complete.
6282func (iter CsmUsageQuotaCollectionIterator) NotDone() bool {
6283	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6284}
6285
6286// Response returns the raw server response from the last page request.
6287func (iter CsmUsageQuotaCollectionIterator) Response() CsmUsageQuotaCollection {
6288	return iter.page.Response()
6289}
6290
6291// Value returns the current value or a zero-initialized value if the
6292// iterator has advanced beyond the end of the collection.
6293func (iter CsmUsageQuotaCollectionIterator) Value() CsmUsageQuota {
6294	if !iter.page.NotDone() {
6295		return CsmUsageQuota{}
6296	}
6297	return iter.page.Values()[iter.i]
6298}
6299
6300// Creates a new instance of the CsmUsageQuotaCollectionIterator type.
6301func NewCsmUsageQuotaCollectionIterator(page CsmUsageQuotaCollectionPage) CsmUsageQuotaCollectionIterator {
6302	return CsmUsageQuotaCollectionIterator{page: page}
6303}
6304
6305// IsEmpty returns true if the ListResult contains no values.
6306func (cuqc CsmUsageQuotaCollection) IsEmpty() bool {
6307	return cuqc.Value == nil || len(*cuqc.Value) == 0
6308}
6309
6310// hasNextLink returns true if the NextLink is not empty.
6311func (cuqc CsmUsageQuotaCollection) hasNextLink() bool {
6312	return cuqc.NextLink != nil && len(*cuqc.NextLink) != 0
6313}
6314
6315// csmUsageQuotaCollectionPreparer prepares a request to retrieve the next set of results.
6316// It returns nil if no more results exist.
6317func (cuqc CsmUsageQuotaCollection) csmUsageQuotaCollectionPreparer(ctx context.Context) (*http.Request, error) {
6318	if !cuqc.hasNextLink() {
6319		return nil, nil
6320	}
6321	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6322		autorest.AsJSON(),
6323		autorest.AsGet(),
6324		autorest.WithBaseURL(to.String(cuqc.NextLink)))
6325}
6326
6327// CsmUsageQuotaCollectionPage contains a page of CsmUsageQuota values.
6328type CsmUsageQuotaCollectionPage struct {
6329	fn   func(context.Context, CsmUsageQuotaCollection) (CsmUsageQuotaCollection, error)
6330	cuqc CsmUsageQuotaCollection
6331}
6332
6333// NextWithContext advances to the next page of values.  If there was an error making
6334// the request the page does not advance and the error is returned.
6335func (page *CsmUsageQuotaCollectionPage) NextWithContext(ctx context.Context) (err error) {
6336	if tracing.IsEnabled() {
6337		ctx = tracing.StartSpan(ctx, fqdn+"/CsmUsageQuotaCollectionPage.NextWithContext")
6338		defer func() {
6339			sc := -1
6340			if page.Response().Response.Response != nil {
6341				sc = page.Response().Response.Response.StatusCode
6342			}
6343			tracing.EndSpan(ctx, sc, err)
6344		}()
6345	}
6346	for {
6347		next, err := page.fn(ctx, page.cuqc)
6348		if err != nil {
6349			return err
6350		}
6351		page.cuqc = next
6352		if !next.hasNextLink() || !next.IsEmpty() {
6353			break
6354		}
6355	}
6356	return nil
6357}
6358
6359// Next advances to the next page of values.  If there was an error making
6360// the request the page does not advance and the error is returned.
6361// Deprecated: Use NextWithContext() instead.
6362func (page *CsmUsageQuotaCollectionPage) Next() error {
6363	return page.NextWithContext(context.Background())
6364}
6365
6366// NotDone returns true if the page enumeration should be started or is not yet complete.
6367func (page CsmUsageQuotaCollectionPage) NotDone() bool {
6368	return !page.cuqc.IsEmpty()
6369}
6370
6371// Response returns the raw server response from the last page request.
6372func (page CsmUsageQuotaCollectionPage) Response() CsmUsageQuotaCollection {
6373	return page.cuqc
6374}
6375
6376// Values returns the slice of values for the current page or nil if there are no values.
6377func (page CsmUsageQuotaCollectionPage) Values() []CsmUsageQuota {
6378	if page.cuqc.IsEmpty() {
6379		return nil
6380	}
6381	return *page.cuqc.Value
6382}
6383
6384// Creates a new instance of the CsmUsageQuotaCollectionPage type.
6385func NewCsmUsageQuotaCollectionPage(cur CsmUsageQuotaCollection, getNextPage func(context.Context, CsmUsageQuotaCollection) (CsmUsageQuotaCollection, error)) CsmUsageQuotaCollectionPage {
6386	return CsmUsageQuotaCollectionPage{
6387		fn:   getNextPage,
6388		cuqc: cur,
6389	}
6390}
6391
6392// CustomHostnameAnalysisResult custom domain analysis.
6393type CustomHostnameAnalysisResult struct {
6394	autorest.Response `json:"-"`
6395	// CustomHostnameAnalysisResultProperties - CustomHostnameAnalysisResult resource specific properties
6396	*CustomHostnameAnalysisResultProperties `json:"properties,omitempty"`
6397	// ID - READ-ONLY; Resource Id.
6398	ID *string `json:"id,omitempty"`
6399	// Name - READ-ONLY; Resource Name.
6400	Name *string `json:"name,omitempty"`
6401	// Kind - Kind of resource.
6402	Kind *string `json:"kind,omitempty"`
6403	// Type - READ-ONLY; Resource type.
6404	Type *string `json:"type,omitempty"`
6405}
6406
6407// MarshalJSON is the custom marshaler for CustomHostnameAnalysisResult.
6408func (char CustomHostnameAnalysisResult) MarshalJSON() ([]byte, error) {
6409	objectMap := make(map[string]interface{})
6410	if char.CustomHostnameAnalysisResultProperties != nil {
6411		objectMap["properties"] = char.CustomHostnameAnalysisResultProperties
6412	}
6413	if char.Kind != nil {
6414		objectMap["kind"] = char.Kind
6415	}
6416	return json.Marshal(objectMap)
6417}
6418
6419// UnmarshalJSON is the custom unmarshaler for CustomHostnameAnalysisResult struct.
6420func (char *CustomHostnameAnalysisResult) UnmarshalJSON(body []byte) error {
6421	var m map[string]*json.RawMessage
6422	err := json.Unmarshal(body, &m)
6423	if err != nil {
6424		return err
6425	}
6426	for k, v := range m {
6427		switch k {
6428		case "properties":
6429			if v != nil {
6430				var customHostnameAnalysisResultProperties CustomHostnameAnalysisResultProperties
6431				err = json.Unmarshal(*v, &customHostnameAnalysisResultProperties)
6432				if err != nil {
6433					return err
6434				}
6435				char.CustomHostnameAnalysisResultProperties = &customHostnameAnalysisResultProperties
6436			}
6437		case "id":
6438			if v != nil {
6439				var ID string
6440				err = json.Unmarshal(*v, &ID)
6441				if err != nil {
6442					return err
6443				}
6444				char.ID = &ID
6445			}
6446		case "name":
6447			if v != nil {
6448				var name string
6449				err = json.Unmarshal(*v, &name)
6450				if err != nil {
6451					return err
6452				}
6453				char.Name = &name
6454			}
6455		case "kind":
6456			if v != nil {
6457				var kind string
6458				err = json.Unmarshal(*v, &kind)
6459				if err != nil {
6460					return err
6461				}
6462				char.Kind = &kind
6463			}
6464		case "type":
6465			if v != nil {
6466				var typeVar string
6467				err = json.Unmarshal(*v, &typeVar)
6468				if err != nil {
6469					return err
6470				}
6471				char.Type = &typeVar
6472			}
6473		}
6474	}
6475
6476	return nil
6477}
6478
6479// CustomHostnameAnalysisResultProperties customHostnameAnalysisResult resource specific properties
6480type CustomHostnameAnalysisResultProperties struct {
6481	// IsHostnameAlreadyVerified - READ-ONLY; <code>true</code> if hostname is already verified; otherwise, <code>false</code>.
6482	IsHostnameAlreadyVerified *bool `json:"isHostnameAlreadyVerified,omitempty"`
6483	// CustomDomainVerificationTest - READ-ONLY; DNS verification test result. Possible values include: 'DNSVerificationTestResultPassed', 'DNSVerificationTestResultFailed', 'DNSVerificationTestResultSkipped'
6484	CustomDomainVerificationTest DNSVerificationTestResult `json:"customDomainVerificationTest,omitempty"`
6485	// CustomDomainVerificationFailureInfo - READ-ONLY; Raw failure information if DNS verification fails.
6486	CustomDomainVerificationFailureInfo *ErrorEntity `json:"customDomainVerificationFailureInfo,omitempty"`
6487	// HasConflictOnScaleUnit - READ-ONLY; <code>true</code> if there is a conflict on a scale unit; otherwise, <code>false</code>.
6488	HasConflictOnScaleUnit *bool `json:"hasConflictOnScaleUnit,omitempty"`
6489	// HasConflictAcrossSubscription - READ-ONLY; <code>true</code> if there is a conflict across subscriptions; otherwise, <code>false</code>.
6490	HasConflictAcrossSubscription *bool `json:"hasConflictAcrossSubscription,omitempty"`
6491	// ConflictingAppResourceID - READ-ONLY; Name of the conflicting app on scale unit if it's within the same subscription.
6492	ConflictingAppResourceID *string `json:"conflictingAppResourceId,omitempty"`
6493	// CNameRecords - CName records controller can see for this hostname.
6494	CNameRecords *[]string `json:"cNameRecords,omitempty"`
6495	// TxtRecords - TXT records controller can see for this hostname.
6496	TxtRecords *[]string `json:"txtRecords,omitempty"`
6497	// ARecords - A records controller can see for this hostname.
6498	ARecords *[]string `json:"aRecords,omitempty"`
6499	// AlternateCNameRecords - Alternate CName records controller can see for this hostname.
6500	AlternateCNameRecords *[]string `json:"alternateCNameRecords,omitempty"`
6501	// AlternateTxtRecords - Alternate TXT records controller can see for this hostname.
6502	AlternateTxtRecords *[]string `json:"alternateTxtRecords,omitempty"`
6503}
6504
6505// MarshalJSON is the custom marshaler for CustomHostnameAnalysisResultProperties.
6506func (char CustomHostnameAnalysisResultProperties) MarshalJSON() ([]byte, error) {
6507	objectMap := make(map[string]interface{})
6508	if char.CNameRecords != nil {
6509		objectMap["cNameRecords"] = char.CNameRecords
6510	}
6511	if char.TxtRecords != nil {
6512		objectMap["txtRecords"] = char.TxtRecords
6513	}
6514	if char.ARecords != nil {
6515		objectMap["aRecords"] = char.ARecords
6516	}
6517	if char.AlternateCNameRecords != nil {
6518		objectMap["alternateCNameRecords"] = char.AlternateCNameRecords
6519	}
6520	if char.AlternateTxtRecords != nil {
6521		objectMap["alternateTxtRecords"] = char.AlternateTxtRecords
6522	}
6523	return json.Marshal(objectMap)
6524}
6525
6526// DatabaseBackupSetting database backup settings.
6527type DatabaseBackupSetting struct {
6528	// DatabaseType - Database type (e.g. SqlAzure / MySql). Possible values include: 'DatabaseTypeSQLAzure', 'DatabaseTypeMySQL', 'DatabaseTypeLocalMySQL', 'DatabaseTypePostgreSQL'
6529	DatabaseType DatabaseType `json:"databaseType,omitempty"`
6530	Name         *string      `json:"name,omitempty"`
6531	// ConnectionStringName - Contains a connection string name that is linked to the SiteConfig.ConnectionStrings.
6532	// This is used during restore with overwrite connection strings options.
6533	ConnectionStringName *string `json:"connectionStringName,omitempty"`
6534	// ConnectionString - Contains a connection string to a database which is being backed up or restored. If the restore should happen to a new database, the database name inside is the new one.
6535	ConnectionString *string `json:"connectionString,omitempty"`
6536}
6537
6538// DataSource class representing data source used by the detectors
6539type DataSource struct {
6540	// Instructions - Instructions if any for the data source
6541	Instructions *[]string `json:"instructions,omitempty"`
6542	// DataSourceURI - Datasource Uri Links
6543	DataSourceURI *[]NameValuePair `json:"dataSourceUri,omitempty"`
6544}
6545
6546// DataTableResponseColumn column definition
6547type DataTableResponseColumn struct {
6548	// ColumnName - Name of the column
6549	ColumnName *string `json:"columnName,omitempty"`
6550	// DataType - Data type which looks like 'String' or 'Int32'.
6551	DataType *string `json:"dataType,omitempty"`
6552	// ColumnType - Column Type
6553	ColumnType *string `json:"columnType,omitempty"`
6554}
6555
6556// DataTableResponseObject data Table which defines columns and raw row values
6557type DataTableResponseObject struct {
6558	// TableName - Name of the table
6559	TableName *string `json:"tableName,omitempty"`
6560	// Columns - List of columns with data types
6561	Columns *[]DataTableResponseColumn `json:"columns,omitempty"`
6562	// Rows - Raw row values
6563	Rows *[][]string `json:"rows,omitempty"`
6564}
6565
6566// DefaultErrorResponse app Service error response.
6567type DefaultErrorResponse struct {
6568	// Error - READ-ONLY; Error model.
6569	Error *DefaultErrorResponseError `json:"error,omitempty"`
6570}
6571
6572// MarshalJSON is the custom marshaler for DefaultErrorResponse.
6573func (der DefaultErrorResponse) MarshalJSON() ([]byte, error) {
6574	objectMap := make(map[string]interface{})
6575	return json.Marshal(objectMap)
6576}
6577
6578// DefaultErrorResponseError error model.
6579type DefaultErrorResponseError struct {
6580	// Code - READ-ONLY; Standardized string to programmatically identify the error.
6581	Code *string `json:"code,omitempty"`
6582	// Message - READ-ONLY; Detailed error description and debugging information.
6583	Message *string `json:"message,omitempty"`
6584	// Target - READ-ONLY; Detailed error description and debugging information.
6585	Target  *string                                 `json:"target,omitempty"`
6586	Details *[]DefaultErrorResponseErrorDetailsItem `json:"details,omitempty"`
6587	// Innererror - READ-ONLY; More information to debug error.
6588	Innererror *string `json:"innererror,omitempty"`
6589}
6590
6591// MarshalJSON is the custom marshaler for DefaultErrorResponseError.
6592func (der DefaultErrorResponseError) MarshalJSON() ([]byte, error) {
6593	objectMap := make(map[string]interface{})
6594	if der.Details != nil {
6595		objectMap["details"] = der.Details
6596	}
6597	return json.Marshal(objectMap)
6598}
6599
6600// DefaultErrorResponseErrorDetailsItem detailed errors.
6601type DefaultErrorResponseErrorDetailsItem struct {
6602	// Code - READ-ONLY; Standardized string to programmatically identify the error.
6603	Code *string `json:"code,omitempty"`
6604	// Message - READ-ONLY; Detailed error description and debugging information.
6605	Message *string `json:"message,omitempty"`
6606	// Target - READ-ONLY; Detailed error description and debugging information.
6607	Target *string `json:"target,omitempty"`
6608}
6609
6610// MarshalJSON is the custom marshaler for DefaultErrorResponseErrorDetailsItem.
6611func (derI DefaultErrorResponseErrorDetailsItem) MarshalJSON() ([]byte, error) {
6612	objectMap := make(map[string]interface{})
6613	return json.Marshal(objectMap)
6614}
6615
6616// DeletedSite a deleted app.
6617type DeletedSite struct {
6618	// ID - Numeric id for the deleted site
6619	ID *int32 `json:"id,omitempty"`
6620	// DeletedTimestamp - READ-ONLY; Time in UTC when the app was deleted.
6621	DeletedTimestamp *string `json:"deletedTimestamp,omitempty"`
6622	// Subscription - READ-ONLY; Subscription containing the deleted site
6623	Subscription *string `json:"subscription,omitempty"`
6624	// ResourceGroup - READ-ONLY; ResourceGroup that contained the deleted site
6625	ResourceGroup *string `json:"resourceGroup,omitempty"`
6626	// Name - READ-ONLY; Name of the deleted site
6627	Name *string `json:"name,omitempty"`
6628	// Slot - READ-ONLY; Slot of the deleted site
6629	Slot *string `json:"slot,omitempty"`
6630}
6631
6632// MarshalJSON is the custom marshaler for DeletedSite.
6633func (ds DeletedSite) MarshalJSON() ([]byte, error) {
6634	objectMap := make(map[string]interface{})
6635	if ds.ID != nil {
6636		objectMap["id"] = ds.ID
6637	}
6638	return json.Marshal(objectMap)
6639}
6640
6641// DeletedWebAppCollection collection of deleted apps.
6642type DeletedWebAppCollection struct {
6643	autorest.Response `json:"-"`
6644	// Value - Collection of resources.
6645	Value *[]DeletedSite `json:"value,omitempty"`
6646	// NextLink - READ-ONLY; Link to next page of resources.
6647	NextLink *string `json:"nextLink,omitempty"`
6648}
6649
6650// MarshalJSON is the custom marshaler for DeletedWebAppCollection.
6651func (dwac DeletedWebAppCollection) MarshalJSON() ([]byte, error) {
6652	objectMap := make(map[string]interface{})
6653	if dwac.Value != nil {
6654		objectMap["value"] = dwac.Value
6655	}
6656	return json.Marshal(objectMap)
6657}
6658
6659// DeletedWebAppCollectionIterator provides access to a complete listing of DeletedSite values.
6660type DeletedWebAppCollectionIterator struct {
6661	i    int
6662	page DeletedWebAppCollectionPage
6663}
6664
6665// NextWithContext advances to the next value.  If there was an error making
6666// the request the iterator does not advance and the error is returned.
6667func (iter *DeletedWebAppCollectionIterator) NextWithContext(ctx context.Context) (err error) {
6668	if tracing.IsEnabled() {
6669		ctx = tracing.StartSpan(ctx, fqdn+"/DeletedWebAppCollectionIterator.NextWithContext")
6670		defer func() {
6671			sc := -1
6672			if iter.Response().Response.Response != nil {
6673				sc = iter.Response().Response.Response.StatusCode
6674			}
6675			tracing.EndSpan(ctx, sc, err)
6676		}()
6677	}
6678	iter.i++
6679	if iter.i < len(iter.page.Values()) {
6680		return nil
6681	}
6682	err = iter.page.NextWithContext(ctx)
6683	if err != nil {
6684		iter.i--
6685		return err
6686	}
6687	iter.i = 0
6688	return nil
6689}
6690
6691// Next advances to the next value.  If there was an error making
6692// the request the iterator does not advance and the error is returned.
6693// Deprecated: Use NextWithContext() instead.
6694func (iter *DeletedWebAppCollectionIterator) Next() error {
6695	return iter.NextWithContext(context.Background())
6696}
6697
6698// NotDone returns true if the enumeration should be started or is not yet complete.
6699func (iter DeletedWebAppCollectionIterator) NotDone() bool {
6700	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6701}
6702
6703// Response returns the raw server response from the last page request.
6704func (iter DeletedWebAppCollectionIterator) Response() DeletedWebAppCollection {
6705	return iter.page.Response()
6706}
6707
6708// Value returns the current value or a zero-initialized value if the
6709// iterator has advanced beyond the end of the collection.
6710func (iter DeletedWebAppCollectionIterator) Value() DeletedSite {
6711	if !iter.page.NotDone() {
6712		return DeletedSite{}
6713	}
6714	return iter.page.Values()[iter.i]
6715}
6716
6717// Creates a new instance of the DeletedWebAppCollectionIterator type.
6718func NewDeletedWebAppCollectionIterator(page DeletedWebAppCollectionPage) DeletedWebAppCollectionIterator {
6719	return DeletedWebAppCollectionIterator{page: page}
6720}
6721
6722// IsEmpty returns true if the ListResult contains no values.
6723func (dwac DeletedWebAppCollection) IsEmpty() bool {
6724	return dwac.Value == nil || len(*dwac.Value) == 0
6725}
6726
6727// hasNextLink returns true if the NextLink is not empty.
6728func (dwac DeletedWebAppCollection) hasNextLink() bool {
6729	return dwac.NextLink != nil && len(*dwac.NextLink) != 0
6730}
6731
6732// deletedWebAppCollectionPreparer prepares a request to retrieve the next set of results.
6733// It returns nil if no more results exist.
6734func (dwac DeletedWebAppCollection) deletedWebAppCollectionPreparer(ctx context.Context) (*http.Request, error) {
6735	if !dwac.hasNextLink() {
6736		return nil, nil
6737	}
6738	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6739		autorest.AsJSON(),
6740		autorest.AsGet(),
6741		autorest.WithBaseURL(to.String(dwac.NextLink)))
6742}
6743
6744// DeletedWebAppCollectionPage contains a page of DeletedSite values.
6745type DeletedWebAppCollectionPage struct {
6746	fn   func(context.Context, DeletedWebAppCollection) (DeletedWebAppCollection, error)
6747	dwac DeletedWebAppCollection
6748}
6749
6750// NextWithContext advances to the next page of values.  If there was an error making
6751// the request the page does not advance and the error is returned.
6752func (page *DeletedWebAppCollectionPage) NextWithContext(ctx context.Context) (err error) {
6753	if tracing.IsEnabled() {
6754		ctx = tracing.StartSpan(ctx, fqdn+"/DeletedWebAppCollectionPage.NextWithContext")
6755		defer func() {
6756			sc := -1
6757			if page.Response().Response.Response != nil {
6758				sc = page.Response().Response.Response.StatusCode
6759			}
6760			tracing.EndSpan(ctx, sc, err)
6761		}()
6762	}
6763	for {
6764		next, err := page.fn(ctx, page.dwac)
6765		if err != nil {
6766			return err
6767		}
6768		page.dwac = next
6769		if !next.hasNextLink() || !next.IsEmpty() {
6770			break
6771		}
6772	}
6773	return nil
6774}
6775
6776// Next advances to the next page of values.  If there was an error making
6777// the request the page does not advance and the error is returned.
6778// Deprecated: Use NextWithContext() instead.
6779func (page *DeletedWebAppCollectionPage) Next() error {
6780	return page.NextWithContext(context.Background())
6781}
6782
6783// NotDone returns true if the page enumeration should be started or is not yet complete.
6784func (page DeletedWebAppCollectionPage) NotDone() bool {
6785	return !page.dwac.IsEmpty()
6786}
6787
6788// Response returns the raw server response from the last page request.
6789func (page DeletedWebAppCollectionPage) Response() DeletedWebAppCollection {
6790	return page.dwac
6791}
6792
6793// Values returns the slice of values for the current page or nil if there are no values.
6794func (page DeletedWebAppCollectionPage) Values() []DeletedSite {
6795	if page.dwac.IsEmpty() {
6796		return nil
6797	}
6798	return *page.dwac.Value
6799}
6800
6801// Creates a new instance of the DeletedWebAppCollectionPage type.
6802func NewDeletedWebAppCollectionPage(cur DeletedWebAppCollection, getNextPage func(context.Context, DeletedWebAppCollection) (DeletedWebAppCollection, error)) DeletedWebAppCollectionPage {
6803	return DeletedWebAppCollectionPage{
6804		fn:   getNextPage,
6805		dwac: cur,
6806	}
6807}
6808
6809// Deployment user credentials used for publishing activity.
6810type Deployment struct {
6811	autorest.Response `json:"-"`
6812	// DeploymentProperties - Deployment resource specific properties
6813	*DeploymentProperties `json:"properties,omitempty"`
6814	// ID - READ-ONLY; Resource Id.
6815	ID *string `json:"id,omitempty"`
6816	// Name - READ-ONLY; Resource Name.
6817	Name *string `json:"name,omitempty"`
6818	// Kind - Kind of resource.
6819	Kind *string `json:"kind,omitempty"`
6820	// Type - READ-ONLY; Resource type.
6821	Type *string `json:"type,omitempty"`
6822}
6823
6824// MarshalJSON is the custom marshaler for Deployment.
6825func (d Deployment) MarshalJSON() ([]byte, error) {
6826	objectMap := make(map[string]interface{})
6827	if d.DeploymentProperties != nil {
6828		objectMap["properties"] = d.DeploymentProperties
6829	}
6830	if d.Kind != nil {
6831		objectMap["kind"] = d.Kind
6832	}
6833	return json.Marshal(objectMap)
6834}
6835
6836// UnmarshalJSON is the custom unmarshaler for Deployment struct.
6837func (d *Deployment) UnmarshalJSON(body []byte) error {
6838	var m map[string]*json.RawMessage
6839	err := json.Unmarshal(body, &m)
6840	if err != nil {
6841		return err
6842	}
6843	for k, v := range m {
6844		switch k {
6845		case "properties":
6846			if v != nil {
6847				var deploymentProperties DeploymentProperties
6848				err = json.Unmarshal(*v, &deploymentProperties)
6849				if err != nil {
6850					return err
6851				}
6852				d.DeploymentProperties = &deploymentProperties
6853			}
6854		case "id":
6855			if v != nil {
6856				var ID string
6857				err = json.Unmarshal(*v, &ID)
6858				if err != nil {
6859					return err
6860				}
6861				d.ID = &ID
6862			}
6863		case "name":
6864			if v != nil {
6865				var name string
6866				err = json.Unmarshal(*v, &name)
6867				if err != nil {
6868					return err
6869				}
6870				d.Name = &name
6871			}
6872		case "kind":
6873			if v != nil {
6874				var kind string
6875				err = json.Unmarshal(*v, &kind)
6876				if err != nil {
6877					return err
6878				}
6879				d.Kind = &kind
6880			}
6881		case "type":
6882			if v != nil {
6883				var typeVar string
6884				err = json.Unmarshal(*v, &typeVar)
6885				if err != nil {
6886					return err
6887				}
6888				d.Type = &typeVar
6889			}
6890		}
6891	}
6892
6893	return nil
6894}
6895
6896// DeploymentCollection collection of app deployments.
6897type DeploymentCollection struct {
6898	autorest.Response `json:"-"`
6899	// Value - Collection of resources.
6900	Value *[]Deployment `json:"value,omitempty"`
6901	// NextLink - READ-ONLY; Link to next page of resources.
6902	NextLink *string `json:"nextLink,omitempty"`
6903}
6904
6905// MarshalJSON is the custom marshaler for DeploymentCollection.
6906func (dc DeploymentCollection) MarshalJSON() ([]byte, error) {
6907	objectMap := make(map[string]interface{})
6908	if dc.Value != nil {
6909		objectMap["value"] = dc.Value
6910	}
6911	return json.Marshal(objectMap)
6912}
6913
6914// DeploymentCollectionIterator provides access to a complete listing of Deployment values.
6915type DeploymentCollectionIterator struct {
6916	i    int
6917	page DeploymentCollectionPage
6918}
6919
6920// NextWithContext advances to the next value.  If there was an error making
6921// the request the iterator does not advance and the error is returned.
6922func (iter *DeploymentCollectionIterator) NextWithContext(ctx context.Context) (err error) {
6923	if tracing.IsEnabled() {
6924		ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentCollectionIterator.NextWithContext")
6925		defer func() {
6926			sc := -1
6927			if iter.Response().Response.Response != nil {
6928				sc = iter.Response().Response.Response.StatusCode
6929			}
6930			tracing.EndSpan(ctx, sc, err)
6931		}()
6932	}
6933	iter.i++
6934	if iter.i < len(iter.page.Values()) {
6935		return nil
6936	}
6937	err = iter.page.NextWithContext(ctx)
6938	if err != nil {
6939		iter.i--
6940		return err
6941	}
6942	iter.i = 0
6943	return nil
6944}
6945
6946// Next advances to the next value.  If there was an error making
6947// the request the iterator does not advance and the error is returned.
6948// Deprecated: Use NextWithContext() instead.
6949func (iter *DeploymentCollectionIterator) Next() error {
6950	return iter.NextWithContext(context.Background())
6951}
6952
6953// NotDone returns true if the enumeration should be started or is not yet complete.
6954func (iter DeploymentCollectionIterator) NotDone() bool {
6955	return iter.page.NotDone() && iter.i < len(iter.page.Values())
6956}
6957
6958// Response returns the raw server response from the last page request.
6959func (iter DeploymentCollectionIterator) Response() DeploymentCollection {
6960	return iter.page.Response()
6961}
6962
6963// Value returns the current value or a zero-initialized value if the
6964// iterator has advanced beyond the end of the collection.
6965func (iter DeploymentCollectionIterator) Value() Deployment {
6966	if !iter.page.NotDone() {
6967		return Deployment{}
6968	}
6969	return iter.page.Values()[iter.i]
6970}
6971
6972// Creates a new instance of the DeploymentCollectionIterator type.
6973func NewDeploymentCollectionIterator(page DeploymentCollectionPage) DeploymentCollectionIterator {
6974	return DeploymentCollectionIterator{page: page}
6975}
6976
6977// IsEmpty returns true if the ListResult contains no values.
6978func (dc DeploymentCollection) IsEmpty() bool {
6979	return dc.Value == nil || len(*dc.Value) == 0
6980}
6981
6982// hasNextLink returns true if the NextLink is not empty.
6983func (dc DeploymentCollection) hasNextLink() bool {
6984	return dc.NextLink != nil && len(*dc.NextLink) != 0
6985}
6986
6987// deploymentCollectionPreparer prepares a request to retrieve the next set of results.
6988// It returns nil if no more results exist.
6989func (dc DeploymentCollection) deploymentCollectionPreparer(ctx context.Context) (*http.Request, error) {
6990	if !dc.hasNextLink() {
6991		return nil, nil
6992	}
6993	return autorest.Prepare((&http.Request{}).WithContext(ctx),
6994		autorest.AsJSON(),
6995		autorest.AsGet(),
6996		autorest.WithBaseURL(to.String(dc.NextLink)))
6997}
6998
6999// DeploymentCollectionPage contains a page of Deployment values.
7000type DeploymentCollectionPage struct {
7001	fn func(context.Context, DeploymentCollection) (DeploymentCollection, error)
7002	dc DeploymentCollection
7003}
7004
7005// NextWithContext advances to the next page of values.  If there was an error making
7006// the request the page does not advance and the error is returned.
7007func (page *DeploymentCollectionPage) NextWithContext(ctx context.Context) (err error) {
7008	if tracing.IsEnabled() {
7009		ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentCollectionPage.NextWithContext")
7010		defer func() {
7011			sc := -1
7012			if page.Response().Response.Response != nil {
7013				sc = page.Response().Response.Response.StatusCode
7014			}
7015			tracing.EndSpan(ctx, sc, err)
7016		}()
7017	}
7018	for {
7019		next, err := page.fn(ctx, page.dc)
7020		if err != nil {
7021			return err
7022		}
7023		page.dc = next
7024		if !next.hasNextLink() || !next.IsEmpty() {
7025			break
7026		}
7027	}
7028	return nil
7029}
7030
7031// Next advances to the next page of values.  If there was an error making
7032// the request the page does not advance and the error is returned.
7033// Deprecated: Use NextWithContext() instead.
7034func (page *DeploymentCollectionPage) Next() error {
7035	return page.NextWithContext(context.Background())
7036}
7037
7038// NotDone returns true if the page enumeration should be started or is not yet complete.
7039func (page DeploymentCollectionPage) NotDone() bool {
7040	return !page.dc.IsEmpty()
7041}
7042
7043// Response returns the raw server response from the last page request.
7044func (page DeploymentCollectionPage) Response() DeploymentCollection {
7045	return page.dc
7046}
7047
7048// Values returns the slice of values for the current page or nil if there are no values.
7049func (page DeploymentCollectionPage) Values() []Deployment {
7050	if page.dc.IsEmpty() {
7051		return nil
7052	}
7053	return *page.dc.Value
7054}
7055
7056// Creates a new instance of the DeploymentCollectionPage type.
7057func NewDeploymentCollectionPage(cur DeploymentCollection, getNextPage func(context.Context, DeploymentCollection) (DeploymentCollection, error)) DeploymentCollectionPage {
7058	return DeploymentCollectionPage{
7059		fn: getNextPage,
7060		dc: cur,
7061	}
7062}
7063
7064// DeploymentLocations list of available locations (regions or App Service Environments) for
7065// deployment of App Service resources.
7066type DeploymentLocations struct {
7067	autorest.Response `json:"-"`
7068	// Locations - Available regions.
7069	Locations *[]GeoRegion `json:"locations,omitempty"`
7070	// HostingEnvironments - Available App Service Environments with full descriptions of the environments.
7071	HostingEnvironments *[]AppServiceEnvironment `json:"hostingEnvironments,omitempty"`
7072	// HostingEnvironmentDeploymentInfos - Available App Service Environments with basic information.
7073	HostingEnvironmentDeploymentInfos *[]HostingEnvironmentDeploymentInfo `json:"hostingEnvironmentDeploymentInfos,omitempty"`
7074}
7075
7076// DeploymentProperties deployment resource specific properties
7077type DeploymentProperties struct {
7078	// ID - Identifier for deployment.
7079	ID *string `json:"id,omitempty"`
7080	// Status - Deployment status.
7081	Status *int32 `json:"status,omitempty"`
7082	// Message - Details about deployment status.
7083	Message *string `json:"message,omitempty"`
7084	// Author - Who authored the deployment.
7085	Author *string `json:"author,omitempty"`
7086	// Deployer - Who performed the deployment.
7087	Deployer *string `json:"deployer,omitempty"`
7088	// AuthorEmail - Author email.
7089	AuthorEmail *string `json:"authorEmail,omitempty"`
7090	// StartTime - Start time.
7091	StartTime *date.Time `json:"startTime,omitempty"`
7092	// EndTime - End time.
7093	EndTime *date.Time `json:"endTime,omitempty"`
7094	// Active - True if deployment is currently active, false if completed and null if not started.
7095	Active *bool `json:"active,omitempty"`
7096	// Details - Details on deployment.
7097	Details *string `json:"details,omitempty"`
7098}
7099
7100// DetectorAbnormalTimePeriod class representing Abnormal Time Period detected.
7101type DetectorAbnormalTimePeriod struct {
7102	// StartTime - Start time of the correlated event
7103	StartTime *date.Time `json:"startTime,omitempty"`
7104	// EndTime - End time of the correlated event
7105	EndTime *date.Time `json:"endTime,omitempty"`
7106	// Message - Message describing the event
7107	Message *string `json:"message,omitempty"`
7108	// Source - Represents the name of the Detector
7109	Source *string `json:"source,omitempty"`
7110	// Priority - Represents the rank of the Detector
7111	Priority *float64 `json:"priority,omitempty"`
7112	// MetaData - Downtime metadata
7113	MetaData *[][]NameValuePair `json:"metaData,omitempty"`
7114	// Type - Represents the type of the Detector. Possible values include: 'ServiceIncident', 'AppDeployment', 'AppCrash', 'RuntimeIssueDetected', 'AseDeployment', 'UserIssue', 'PlatformIssue', 'Other'
7115	Type IssueType `json:"type,omitempty"`
7116	// Solutions - List of proposed solutions
7117	Solutions *[]Solution `json:"solutions,omitempty"`
7118}
7119
7120// DetectorDefinition class representing detector definition
7121type DetectorDefinition struct {
7122	// DetectorDefinitionProperties - DetectorDefinition resource specific properties
7123	*DetectorDefinitionProperties `json:"properties,omitempty"`
7124	// ID - READ-ONLY; Resource Id.
7125	ID *string `json:"id,omitempty"`
7126	// Name - READ-ONLY; Resource Name.
7127	Name *string `json:"name,omitempty"`
7128	// Kind - Kind of resource.
7129	Kind *string `json:"kind,omitempty"`
7130	// Type - READ-ONLY; Resource type.
7131	Type *string `json:"type,omitempty"`
7132}
7133
7134// MarshalJSON is the custom marshaler for DetectorDefinition.
7135func (dd DetectorDefinition) MarshalJSON() ([]byte, error) {
7136	objectMap := make(map[string]interface{})
7137	if dd.DetectorDefinitionProperties != nil {
7138		objectMap["properties"] = dd.DetectorDefinitionProperties
7139	}
7140	if dd.Kind != nil {
7141		objectMap["kind"] = dd.Kind
7142	}
7143	return json.Marshal(objectMap)
7144}
7145
7146// UnmarshalJSON is the custom unmarshaler for DetectorDefinition struct.
7147func (dd *DetectorDefinition) UnmarshalJSON(body []byte) error {
7148	var m map[string]*json.RawMessage
7149	err := json.Unmarshal(body, &m)
7150	if err != nil {
7151		return err
7152	}
7153	for k, v := range m {
7154		switch k {
7155		case "properties":
7156			if v != nil {
7157				var detectorDefinitionProperties DetectorDefinitionProperties
7158				err = json.Unmarshal(*v, &detectorDefinitionProperties)
7159				if err != nil {
7160					return err
7161				}
7162				dd.DetectorDefinitionProperties = &detectorDefinitionProperties
7163			}
7164		case "id":
7165			if v != nil {
7166				var ID string
7167				err = json.Unmarshal(*v, &ID)
7168				if err != nil {
7169					return err
7170				}
7171				dd.ID = &ID
7172			}
7173		case "name":
7174			if v != nil {
7175				var name string
7176				err = json.Unmarshal(*v, &name)
7177				if err != nil {
7178					return err
7179				}
7180				dd.Name = &name
7181			}
7182		case "kind":
7183			if v != nil {
7184				var kind string
7185				err = json.Unmarshal(*v, &kind)
7186				if err != nil {
7187					return err
7188				}
7189				dd.Kind = &kind
7190			}
7191		case "type":
7192			if v != nil {
7193				var typeVar string
7194				err = json.Unmarshal(*v, &typeVar)
7195				if err != nil {
7196					return err
7197				}
7198				dd.Type = &typeVar
7199			}
7200		}
7201	}
7202
7203	return nil
7204}
7205
7206// DetectorDefinitionProperties detectorDefinition resource specific properties
7207type DetectorDefinitionProperties struct {
7208	// DisplayName - READ-ONLY; Display name of the detector
7209	DisplayName *string `json:"displayName,omitempty"`
7210	// Description - READ-ONLY; Description of the detector
7211	Description *string `json:"description,omitempty"`
7212	// Rank - READ-ONLY; Detector Rank
7213	Rank *float64 `json:"rank,omitempty"`
7214	// IsEnabled - READ-ONLY; Flag representing whether detector is enabled or not.
7215	IsEnabled *bool `json:"isEnabled,omitempty"`
7216}
7217
7218// MarshalJSON is the custom marshaler for DetectorDefinitionProperties.
7219func (dd DetectorDefinitionProperties) MarshalJSON() ([]byte, error) {
7220	objectMap := make(map[string]interface{})
7221	return json.Marshal(objectMap)
7222}
7223
7224// DetectorInfo definition of Detector
7225type DetectorInfo struct {
7226	// Description - READ-ONLY; Short description of the detector and its purpose
7227	Description *string `json:"description,omitempty"`
7228	// Category - READ-ONLY; Support Category
7229	Category *string `json:"category,omitempty"`
7230	// SubCategory - READ-ONLY; Support Sub Category
7231	SubCategory *string `json:"subCategory,omitempty"`
7232	// SupportTopicID - READ-ONLY; Support Topic Id
7233	SupportTopicID *string `json:"supportTopicId,omitempty"`
7234}
7235
7236// MarshalJSON is the custom marshaler for DetectorInfo.
7237func (di DetectorInfo) MarshalJSON() ([]byte, error) {
7238	objectMap := make(map[string]interface{})
7239	return json.Marshal(objectMap)
7240}
7241
7242// DetectorResponse class representing Response from Detector
7243type DetectorResponse struct {
7244	autorest.Response `json:"-"`
7245	// DetectorResponseProperties - DetectorResponse resource specific properties
7246	*DetectorResponseProperties `json:"properties,omitempty"`
7247	// ID - READ-ONLY; Resource Id.
7248	ID *string `json:"id,omitempty"`
7249	// Name - READ-ONLY; Resource Name.
7250	Name *string `json:"name,omitempty"`
7251	// Kind - Kind of resource.
7252	Kind *string `json:"kind,omitempty"`
7253	// Type - READ-ONLY; Resource type.
7254	Type *string `json:"type,omitempty"`
7255}
7256
7257// MarshalJSON is the custom marshaler for DetectorResponse.
7258func (dr DetectorResponse) MarshalJSON() ([]byte, error) {
7259	objectMap := make(map[string]interface{})
7260	if dr.DetectorResponseProperties != nil {
7261		objectMap["properties"] = dr.DetectorResponseProperties
7262	}
7263	if dr.Kind != nil {
7264		objectMap["kind"] = dr.Kind
7265	}
7266	return json.Marshal(objectMap)
7267}
7268
7269// UnmarshalJSON is the custom unmarshaler for DetectorResponse struct.
7270func (dr *DetectorResponse) UnmarshalJSON(body []byte) error {
7271	var m map[string]*json.RawMessage
7272	err := json.Unmarshal(body, &m)
7273	if err != nil {
7274		return err
7275	}
7276	for k, v := range m {
7277		switch k {
7278		case "properties":
7279			if v != nil {
7280				var detectorResponseProperties DetectorResponseProperties
7281				err = json.Unmarshal(*v, &detectorResponseProperties)
7282				if err != nil {
7283					return err
7284				}
7285				dr.DetectorResponseProperties = &detectorResponseProperties
7286			}
7287		case "id":
7288			if v != nil {
7289				var ID string
7290				err = json.Unmarshal(*v, &ID)
7291				if err != nil {
7292					return err
7293				}
7294				dr.ID = &ID
7295			}
7296		case "name":
7297			if v != nil {
7298				var name string
7299				err = json.Unmarshal(*v, &name)
7300				if err != nil {
7301					return err
7302				}
7303				dr.Name = &name
7304			}
7305		case "kind":
7306			if v != nil {
7307				var kind string
7308				err = json.Unmarshal(*v, &kind)
7309				if err != nil {
7310					return err
7311				}
7312				dr.Kind = &kind
7313			}
7314		case "type":
7315			if v != nil {
7316				var typeVar string
7317				err = json.Unmarshal(*v, &typeVar)
7318				if err != nil {
7319					return err
7320				}
7321				dr.Type = &typeVar
7322			}
7323		}
7324	}
7325
7326	return nil
7327}
7328
7329// DetectorResponseCollection collection of detector responses
7330type DetectorResponseCollection struct {
7331	autorest.Response `json:"-"`
7332	// Value - Collection of resources.
7333	Value *[]DetectorResponse `json:"value,omitempty"`
7334	// NextLink - READ-ONLY; Link to next page of resources.
7335	NextLink *string `json:"nextLink,omitempty"`
7336}
7337
7338// MarshalJSON is the custom marshaler for DetectorResponseCollection.
7339func (drc DetectorResponseCollection) MarshalJSON() ([]byte, error) {
7340	objectMap := make(map[string]interface{})
7341	if drc.Value != nil {
7342		objectMap["value"] = drc.Value
7343	}
7344	return json.Marshal(objectMap)
7345}
7346
7347// DetectorResponseCollectionIterator provides access to a complete listing of DetectorResponse values.
7348type DetectorResponseCollectionIterator struct {
7349	i    int
7350	page DetectorResponseCollectionPage
7351}
7352
7353// NextWithContext advances to the next value.  If there was an error making
7354// the request the iterator does not advance and the error is returned.
7355func (iter *DetectorResponseCollectionIterator) NextWithContext(ctx context.Context) (err error) {
7356	if tracing.IsEnabled() {
7357		ctx = tracing.StartSpan(ctx, fqdn+"/DetectorResponseCollectionIterator.NextWithContext")
7358		defer func() {
7359			sc := -1
7360			if iter.Response().Response.Response != nil {
7361				sc = iter.Response().Response.Response.StatusCode
7362			}
7363			tracing.EndSpan(ctx, sc, err)
7364		}()
7365	}
7366	iter.i++
7367	if iter.i < len(iter.page.Values()) {
7368		return nil
7369	}
7370	err = iter.page.NextWithContext(ctx)
7371	if err != nil {
7372		iter.i--
7373		return err
7374	}
7375	iter.i = 0
7376	return nil
7377}
7378
7379// Next advances to the next value.  If there was an error making
7380// the request the iterator does not advance and the error is returned.
7381// Deprecated: Use NextWithContext() instead.
7382func (iter *DetectorResponseCollectionIterator) Next() error {
7383	return iter.NextWithContext(context.Background())
7384}
7385
7386// NotDone returns true if the enumeration should be started or is not yet complete.
7387func (iter DetectorResponseCollectionIterator) NotDone() bool {
7388	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7389}
7390
7391// Response returns the raw server response from the last page request.
7392func (iter DetectorResponseCollectionIterator) Response() DetectorResponseCollection {
7393	return iter.page.Response()
7394}
7395
7396// Value returns the current value or a zero-initialized value if the
7397// iterator has advanced beyond the end of the collection.
7398func (iter DetectorResponseCollectionIterator) Value() DetectorResponse {
7399	if !iter.page.NotDone() {
7400		return DetectorResponse{}
7401	}
7402	return iter.page.Values()[iter.i]
7403}
7404
7405// Creates a new instance of the DetectorResponseCollectionIterator type.
7406func NewDetectorResponseCollectionIterator(page DetectorResponseCollectionPage) DetectorResponseCollectionIterator {
7407	return DetectorResponseCollectionIterator{page: page}
7408}
7409
7410// IsEmpty returns true if the ListResult contains no values.
7411func (drc DetectorResponseCollection) IsEmpty() bool {
7412	return drc.Value == nil || len(*drc.Value) == 0
7413}
7414
7415// hasNextLink returns true if the NextLink is not empty.
7416func (drc DetectorResponseCollection) hasNextLink() bool {
7417	return drc.NextLink != nil && len(*drc.NextLink) != 0
7418}
7419
7420// detectorResponseCollectionPreparer prepares a request to retrieve the next set of results.
7421// It returns nil if no more results exist.
7422func (drc DetectorResponseCollection) detectorResponseCollectionPreparer(ctx context.Context) (*http.Request, error) {
7423	if !drc.hasNextLink() {
7424		return nil, nil
7425	}
7426	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7427		autorest.AsJSON(),
7428		autorest.AsGet(),
7429		autorest.WithBaseURL(to.String(drc.NextLink)))
7430}
7431
7432// DetectorResponseCollectionPage contains a page of DetectorResponse values.
7433type DetectorResponseCollectionPage struct {
7434	fn  func(context.Context, DetectorResponseCollection) (DetectorResponseCollection, error)
7435	drc DetectorResponseCollection
7436}
7437
7438// NextWithContext advances to the next page of values.  If there was an error making
7439// the request the page does not advance and the error is returned.
7440func (page *DetectorResponseCollectionPage) NextWithContext(ctx context.Context) (err error) {
7441	if tracing.IsEnabled() {
7442		ctx = tracing.StartSpan(ctx, fqdn+"/DetectorResponseCollectionPage.NextWithContext")
7443		defer func() {
7444			sc := -1
7445			if page.Response().Response.Response != nil {
7446				sc = page.Response().Response.Response.StatusCode
7447			}
7448			tracing.EndSpan(ctx, sc, err)
7449		}()
7450	}
7451	for {
7452		next, err := page.fn(ctx, page.drc)
7453		if err != nil {
7454			return err
7455		}
7456		page.drc = next
7457		if !next.hasNextLink() || !next.IsEmpty() {
7458			break
7459		}
7460	}
7461	return nil
7462}
7463
7464// Next advances to the next page of values.  If there was an error making
7465// the request the page does not advance and the error is returned.
7466// Deprecated: Use NextWithContext() instead.
7467func (page *DetectorResponseCollectionPage) Next() error {
7468	return page.NextWithContext(context.Background())
7469}
7470
7471// NotDone returns true if the page enumeration should be started or is not yet complete.
7472func (page DetectorResponseCollectionPage) NotDone() bool {
7473	return !page.drc.IsEmpty()
7474}
7475
7476// Response returns the raw server response from the last page request.
7477func (page DetectorResponseCollectionPage) Response() DetectorResponseCollection {
7478	return page.drc
7479}
7480
7481// Values returns the slice of values for the current page or nil if there are no values.
7482func (page DetectorResponseCollectionPage) Values() []DetectorResponse {
7483	if page.drc.IsEmpty() {
7484		return nil
7485	}
7486	return *page.drc.Value
7487}
7488
7489// Creates a new instance of the DetectorResponseCollectionPage type.
7490func NewDetectorResponseCollectionPage(cur DetectorResponseCollection, getNextPage func(context.Context, DetectorResponseCollection) (DetectorResponseCollection, error)) DetectorResponseCollectionPage {
7491	return DetectorResponseCollectionPage{
7492		fn:  getNextPage,
7493		drc: cur,
7494	}
7495}
7496
7497// DetectorResponseProperties detectorResponse resource specific properties
7498type DetectorResponseProperties struct {
7499	// Metadata - metadata for the detector
7500	Metadata *DetectorInfo `json:"metadata,omitempty"`
7501	// Dataset - Data Set
7502	Dataset *[]DiagnosticData `json:"dataset,omitempty"`
7503}
7504
7505// DiagnosticAnalysis class representing a diagnostic analysis done on an application
7506type DiagnosticAnalysis struct {
7507	autorest.Response `json:"-"`
7508	// DiagnosticAnalysisProperties - DiagnosticAnalysis resource specific properties
7509	*DiagnosticAnalysisProperties `json:"properties,omitempty"`
7510	// ID - READ-ONLY; Resource Id.
7511	ID *string `json:"id,omitempty"`
7512	// Name - READ-ONLY; Resource Name.
7513	Name *string `json:"name,omitempty"`
7514	// Kind - Kind of resource.
7515	Kind *string `json:"kind,omitempty"`
7516	// Type - READ-ONLY; Resource type.
7517	Type *string `json:"type,omitempty"`
7518}
7519
7520// MarshalJSON is the custom marshaler for DiagnosticAnalysis.
7521func (da DiagnosticAnalysis) MarshalJSON() ([]byte, error) {
7522	objectMap := make(map[string]interface{})
7523	if da.DiagnosticAnalysisProperties != nil {
7524		objectMap["properties"] = da.DiagnosticAnalysisProperties
7525	}
7526	if da.Kind != nil {
7527		objectMap["kind"] = da.Kind
7528	}
7529	return json.Marshal(objectMap)
7530}
7531
7532// UnmarshalJSON is the custom unmarshaler for DiagnosticAnalysis struct.
7533func (da *DiagnosticAnalysis) UnmarshalJSON(body []byte) error {
7534	var m map[string]*json.RawMessage
7535	err := json.Unmarshal(body, &m)
7536	if err != nil {
7537		return err
7538	}
7539	for k, v := range m {
7540		switch k {
7541		case "properties":
7542			if v != nil {
7543				var diagnosticAnalysisProperties DiagnosticAnalysisProperties
7544				err = json.Unmarshal(*v, &diagnosticAnalysisProperties)
7545				if err != nil {
7546					return err
7547				}
7548				da.DiagnosticAnalysisProperties = &diagnosticAnalysisProperties
7549			}
7550		case "id":
7551			if v != nil {
7552				var ID string
7553				err = json.Unmarshal(*v, &ID)
7554				if err != nil {
7555					return err
7556				}
7557				da.ID = &ID
7558			}
7559		case "name":
7560			if v != nil {
7561				var name string
7562				err = json.Unmarshal(*v, &name)
7563				if err != nil {
7564					return err
7565				}
7566				da.Name = &name
7567			}
7568		case "kind":
7569			if v != nil {
7570				var kind string
7571				err = json.Unmarshal(*v, &kind)
7572				if err != nil {
7573					return err
7574				}
7575				da.Kind = &kind
7576			}
7577		case "type":
7578			if v != nil {
7579				var typeVar string
7580				err = json.Unmarshal(*v, &typeVar)
7581				if err != nil {
7582					return err
7583				}
7584				da.Type = &typeVar
7585			}
7586		}
7587	}
7588
7589	return nil
7590}
7591
7592// DiagnosticAnalysisCollection collection of Diagnostic Analyses
7593type DiagnosticAnalysisCollection struct {
7594	autorest.Response `json:"-"`
7595	// Value - Collection of resources.
7596	Value *[]AnalysisDefinition `json:"value,omitempty"`
7597	// NextLink - READ-ONLY; Link to next page of resources.
7598	NextLink *string `json:"nextLink,omitempty"`
7599}
7600
7601// MarshalJSON is the custom marshaler for DiagnosticAnalysisCollection.
7602func (dac DiagnosticAnalysisCollection) MarshalJSON() ([]byte, error) {
7603	objectMap := make(map[string]interface{})
7604	if dac.Value != nil {
7605		objectMap["value"] = dac.Value
7606	}
7607	return json.Marshal(objectMap)
7608}
7609
7610// DiagnosticAnalysisCollectionIterator provides access to a complete listing of AnalysisDefinition values.
7611type DiagnosticAnalysisCollectionIterator struct {
7612	i    int
7613	page DiagnosticAnalysisCollectionPage
7614}
7615
7616// NextWithContext advances to the next value.  If there was an error making
7617// the request the iterator does not advance and the error is returned.
7618func (iter *DiagnosticAnalysisCollectionIterator) NextWithContext(ctx context.Context) (err error) {
7619	if tracing.IsEnabled() {
7620		ctx = tracing.StartSpan(ctx, fqdn+"/DiagnosticAnalysisCollectionIterator.NextWithContext")
7621		defer func() {
7622			sc := -1
7623			if iter.Response().Response.Response != nil {
7624				sc = iter.Response().Response.Response.StatusCode
7625			}
7626			tracing.EndSpan(ctx, sc, err)
7627		}()
7628	}
7629	iter.i++
7630	if iter.i < len(iter.page.Values()) {
7631		return nil
7632	}
7633	err = iter.page.NextWithContext(ctx)
7634	if err != nil {
7635		iter.i--
7636		return err
7637	}
7638	iter.i = 0
7639	return nil
7640}
7641
7642// Next advances to the next value.  If there was an error making
7643// the request the iterator does not advance and the error is returned.
7644// Deprecated: Use NextWithContext() instead.
7645func (iter *DiagnosticAnalysisCollectionIterator) Next() error {
7646	return iter.NextWithContext(context.Background())
7647}
7648
7649// NotDone returns true if the enumeration should be started or is not yet complete.
7650func (iter DiagnosticAnalysisCollectionIterator) NotDone() bool {
7651	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7652}
7653
7654// Response returns the raw server response from the last page request.
7655func (iter DiagnosticAnalysisCollectionIterator) Response() DiagnosticAnalysisCollection {
7656	return iter.page.Response()
7657}
7658
7659// Value returns the current value or a zero-initialized value if the
7660// iterator has advanced beyond the end of the collection.
7661func (iter DiagnosticAnalysisCollectionIterator) Value() AnalysisDefinition {
7662	if !iter.page.NotDone() {
7663		return AnalysisDefinition{}
7664	}
7665	return iter.page.Values()[iter.i]
7666}
7667
7668// Creates a new instance of the DiagnosticAnalysisCollectionIterator type.
7669func NewDiagnosticAnalysisCollectionIterator(page DiagnosticAnalysisCollectionPage) DiagnosticAnalysisCollectionIterator {
7670	return DiagnosticAnalysisCollectionIterator{page: page}
7671}
7672
7673// IsEmpty returns true if the ListResult contains no values.
7674func (dac DiagnosticAnalysisCollection) IsEmpty() bool {
7675	return dac.Value == nil || len(*dac.Value) == 0
7676}
7677
7678// hasNextLink returns true if the NextLink is not empty.
7679func (dac DiagnosticAnalysisCollection) hasNextLink() bool {
7680	return dac.NextLink != nil && len(*dac.NextLink) != 0
7681}
7682
7683// diagnosticAnalysisCollectionPreparer prepares a request to retrieve the next set of results.
7684// It returns nil if no more results exist.
7685func (dac DiagnosticAnalysisCollection) diagnosticAnalysisCollectionPreparer(ctx context.Context) (*http.Request, error) {
7686	if !dac.hasNextLink() {
7687		return nil, nil
7688	}
7689	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7690		autorest.AsJSON(),
7691		autorest.AsGet(),
7692		autorest.WithBaseURL(to.String(dac.NextLink)))
7693}
7694
7695// DiagnosticAnalysisCollectionPage contains a page of AnalysisDefinition values.
7696type DiagnosticAnalysisCollectionPage struct {
7697	fn  func(context.Context, DiagnosticAnalysisCollection) (DiagnosticAnalysisCollection, error)
7698	dac DiagnosticAnalysisCollection
7699}
7700
7701// NextWithContext advances to the next page of values.  If there was an error making
7702// the request the page does not advance and the error is returned.
7703func (page *DiagnosticAnalysisCollectionPage) NextWithContext(ctx context.Context) (err error) {
7704	if tracing.IsEnabled() {
7705		ctx = tracing.StartSpan(ctx, fqdn+"/DiagnosticAnalysisCollectionPage.NextWithContext")
7706		defer func() {
7707			sc := -1
7708			if page.Response().Response.Response != nil {
7709				sc = page.Response().Response.Response.StatusCode
7710			}
7711			tracing.EndSpan(ctx, sc, err)
7712		}()
7713	}
7714	for {
7715		next, err := page.fn(ctx, page.dac)
7716		if err != nil {
7717			return err
7718		}
7719		page.dac = next
7720		if !next.hasNextLink() || !next.IsEmpty() {
7721			break
7722		}
7723	}
7724	return nil
7725}
7726
7727// Next advances to the next page of values.  If there was an error making
7728// the request the page does not advance and the error is returned.
7729// Deprecated: Use NextWithContext() instead.
7730func (page *DiagnosticAnalysisCollectionPage) Next() error {
7731	return page.NextWithContext(context.Background())
7732}
7733
7734// NotDone returns true if the page enumeration should be started or is not yet complete.
7735func (page DiagnosticAnalysisCollectionPage) NotDone() bool {
7736	return !page.dac.IsEmpty()
7737}
7738
7739// Response returns the raw server response from the last page request.
7740func (page DiagnosticAnalysisCollectionPage) Response() DiagnosticAnalysisCollection {
7741	return page.dac
7742}
7743
7744// Values returns the slice of values for the current page or nil if there are no values.
7745func (page DiagnosticAnalysisCollectionPage) Values() []AnalysisDefinition {
7746	if page.dac.IsEmpty() {
7747		return nil
7748	}
7749	return *page.dac.Value
7750}
7751
7752// Creates a new instance of the DiagnosticAnalysisCollectionPage type.
7753func NewDiagnosticAnalysisCollectionPage(cur DiagnosticAnalysisCollection, getNextPage func(context.Context, DiagnosticAnalysisCollection) (DiagnosticAnalysisCollection, error)) DiagnosticAnalysisCollectionPage {
7754	return DiagnosticAnalysisCollectionPage{
7755		fn:  getNextPage,
7756		dac: cur,
7757	}
7758}
7759
7760// DiagnosticAnalysisProperties diagnosticAnalysis resource specific properties
7761type DiagnosticAnalysisProperties struct {
7762	// StartTime - Start time of the period
7763	StartTime *date.Time `json:"startTime,omitempty"`
7764	// EndTime - End time of the period
7765	EndTime *date.Time `json:"endTime,omitempty"`
7766	// AbnormalTimePeriods - List of time periods.
7767	AbnormalTimePeriods *[]AbnormalTimePeriod `json:"abnormalTimePeriods,omitempty"`
7768	// Payload - Data by each detector
7769	Payload *[]AnalysisData `json:"payload,omitempty"`
7770	// NonCorrelatedDetectors - Data by each detector for detectors that did not corelate
7771	NonCorrelatedDetectors *[]DetectorDefinition `json:"nonCorrelatedDetectors,omitempty"`
7772}
7773
7774// DiagnosticCategory class representing detector definition
7775type DiagnosticCategory struct {
7776	autorest.Response `json:"-"`
7777	// DiagnosticCategoryProperties - DiagnosticCategory resource specific properties
7778	*DiagnosticCategoryProperties `json:"properties,omitempty"`
7779	// ID - READ-ONLY; Resource Id.
7780	ID *string `json:"id,omitempty"`
7781	// Name - READ-ONLY; Resource Name.
7782	Name *string `json:"name,omitempty"`
7783	// Kind - Kind of resource.
7784	Kind *string `json:"kind,omitempty"`
7785	// Type - READ-ONLY; Resource type.
7786	Type *string `json:"type,omitempty"`
7787}
7788
7789// MarshalJSON is the custom marshaler for DiagnosticCategory.
7790func (dc DiagnosticCategory) MarshalJSON() ([]byte, error) {
7791	objectMap := make(map[string]interface{})
7792	if dc.DiagnosticCategoryProperties != nil {
7793		objectMap["properties"] = dc.DiagnosticCategoryProperties
7794	}
7795	if dc.Kind != nil {
7796		objectMap["kind"] = dc.Kind
7797	}
7798	return json.Marshal(objectMap)
7799}
7800
7801// UnmarshalJSON is the custom unmarshaler for DiagnosticCategory struct.
7802func (dc *DiagnosticCategory) UnmarshalJSON(body []byte) error {
7803	var m map[string]*json.RawMessage
7804	err := json.Unmarshal(body, &m)
7805	if err != nil {
7806		return err
7807	}
7808	for k, v := range m {
7809		switch k {
7810		case "properties":
7811			if v != nil {
7812				var diagnosticCategoryProperties DiagnosticCategoryProperties
7813				err = json.Unmarshal(*v, &diagnosticCategoryProperties)
7814				if err != nil {
7815					return err
7816				}
7817				dc.DiagnosticCategoryProperties = &diagnosticCategoryProperties
7818			}
7819		case "id":
7820			if v != nil {
7821				var ID string
7822				err = json.Unmarshal(*v, &ID)
7823				if err != nil {
7824					return err
7825				}
7826				dc.ID = &ID
7827			}
7828		case "name":
7829			if v != nil {
7830				var name string
7831				err = json.Unmarshal(*v, &name)
7832				if err != nil {
7833					return err
7834				}
7835				dc.Name = &name
7836			}
7837		case "kind":
7838			if v != nil {
7839				var kind string
7840				err = json.Unmarshal(*v, &kind)
7841				if err != nil {
7842					return err
7843				}
7844				dc.Kind = &kind
7845			}
7846		case "type":
7847			if v != nil {
7848				var typeVar string
7849				err = json.Unmarshal(*v, &typeVar)
7850				if err != nil {
7851					return err
7852				}
7853				dc.Type = &typeVar
7854			}
7855		}
7856	}
7857
7858	return nil
7859}
7860
7861// DiagnosticCategoryCollection collection of Diagnostic Categories
7862type DiagnosticCategoryCollection struct {
7863	autorest.Response `json:"-"`
7864	// Value - Collection of resources.
7865	Value *[]DiagnosticCategory `json:"value,omitempty"`
7866	// NextLink - READ-ONLY; Link to next page of resources.
7867	NextLink *string `json:"nextLink,omitempty"`
7868}
7869
7870// MarshalJSON is the custom marshaler for DiagnosticCategoryCollection.
7871func (dcc DiagnosticCategoryCollection) MarshalJSON() ([]byte, error) {
7872	objectMap := make(map[string]interface{})
7873	if dcc.Value != nil {
7874		objectMap["value"] = dcc.Value
7875	}
7876	return json.Marshal(objectMap)
7877}
7878
7879// DiagnosticCategoryCollectionIterator provides access to a complete listing of DiagnosticCategory values.
7880type DiagnosticCategoryCollectionIterator struct {
7881	i    int
7882	page DiagnosticCategoryCollectionPage
7883}
7884
7885// NextWithContext advances to the next value.  If there was an error making
7886// the request the iterator does not advance and the error is returned.
7887func (iter *DiagnosticCategoryCollectionIterator) NextWithContext(ctx context.Context) (err error) {
7888	if tracing.IsEnabled() {
7889		ctx = tracing.StartSpan(ctx, fqdn+"/DiagnosticCategoryCollectionIterator.NextWithContext")
7890		defer func() {
7891			sc := -1
7892			if iter.Response().Response.Response != nil {
7893				sc = iter.Response().Response.Response.StatusCode
7894			}
7895			tracing.EndSpan(ctx, sc, err)
7896		}()
7897	}
7898	iter.i++
7899	if iter.i < len(iter.page.Values()) {
7900		return nil
7901	}
7902	err = iter.page.NextWithContext(ctx)
7903	if err != nil {
7904		iter.i--
7905		return err
7906	}
7907	iter.i = 0
7908	return nil
7909}
7910
7911// Next advances to the next value.  If there was an error making
7912// the request the iterator does not advance and the error is returned.
7913// Deprecated: Use NextWithContext() instead.
7914func (iter *DiagnosticCategoryCollectionIterator) Next() error {
7915	return iter.NextWithContext(context.Background())
7916}
7917
7918// NotDone returns true if the enumeration should be started or is not yet complete.
7919func (iter DiagnosticCategoryCollectionIterator) NotDone() bool {
7920	return iter.page.NotDone() && iter.i < len(iter.page.Values())
7921}
7922
7923// Response returns the raw server response from the last page request.
7924func (iter DiagnosticCategoryCollectionIterator) Response() DiagnosticCategoryCollection {
7925	return iter.page.Response()
7926}
7927
7928// Value returns the current value or a zero-initialized value if the
7929// iterator has advanced beyond the end of the collection.
7930func (iter DiagnosticCategoryCollectionIterator) Value() DiagnosticCategory {
7931	if !iter.page.NotDone() {
7932		return DiagnosticCategory{}
7933	}
7934	return iter.page.Values()[iter.i]
7935}
7936
7937// Creates a new instance of the DiagnosticCategoryCollectionIterator type.
7938func NewDiagnosticCategoryCollectionIterator(page DiagnosticCategoryCollectionPage) DiagnosticCategoryCollectionIterator {
7939	return DiagnosticCategoryCollectionIterator{page: page}
7940}
7941
7942// IsEmpty returns true if the ListResult contains no values.
7943func (dcc DiagnosticCategoryCollection) IsEmpty() bool {
7944	return dcc.Value == nil || len(*dcc.Value) == 0
7945}
7946
7947// hasNextLink returns true if the NextLink is not empty.
7948func (dcc DiagnosticCategoryCollection) hasNextLink() bool {
7949	return dcc.NextLink != nil && len(*dcc.NextLink) != 0
7950}
7951
7952// diagnosticCategoryCollectionPreparer prepares a request to retrieve the next set of results.
7953// It returns nil if no more results exist.
7954func (dcc DiagnosticCategoryCollection) diagnosticCategoryCollectionPreparer(ctx context.Context) (*http.Request, error) {
7955	if !dcc.hasNextLink() {
7956		return nil, nil
7957	}
7958	return autorest.Prepare((&http.Request{}).WithContext(ctx),
7959		autorest.AsJSON(),
7960		autorest.AsGet(),
7961		autorest.WithBaseURL(to.String(dcc.NextLink)))
7962}
7963
7964// DiagnosticCategoryCollectionPage contains a page of DiagnosticCategory values.
7965type DiagnosticCategoryCollectionPage struct {
7966	fn  func(context.Context, DiagnosticCategoryCollection) (DiagnosticCategoryCollection, error)
7967	dcc DiagnosticCategoryCollection
7968}
7969
7970// NextWithContext advances to the next page of values.  If there was an error making
7971// the request the page does not advance and the error is returned.
7972func (page *DiagnosticCategoryCollectionPage) NextWithContext(ctx context.Context) (err error) {
7973	if tracing.IsEnabled() {
7974		ctx = tracing.StartSpan(ctx, fqdn+"/DiagnosticCategoryCollectionPage.NextWithContext")
7975		defer func() {
7976			sc := -1
7977			if page.Response().Response.Response != nil {
7978				sc = page.Response().Response.Response.StatusCode
7979			}
7980			tracing.EndSpan(ctx, sc, err)
7981		}()
7982	}
7983	for {
7984		next, err := page.fn(ctx, page.dcc)
7985		if err != nil {
7986			return err
7987		}
7988		page.dcc = next
7989		if !next.hasNextLink() || !next.IsEmpty() {
7990			break
7991		}
7992	}
7993	return nil
7994}
7995
7996// Next advances to the next page of values.  If there was an error making
7997// the request the page does not advance and the error is returned.
7998// Deprecated: Use NextWithContext() instead.
7999func (page *DiagnosticCategoryCollectionPage) Next() error {
8000	return page.NextWithContext(context.Background())
8001}
8002
8003// NotDone returns true if the page enumeration should be started or is not yet complete.
8004func (page DiagnosticCategoryCollectionPage) NotDone() bool {
8005	return !page.dcc.IsEmpty()
8006}
8007
8008// Response returns the raw server response from the last page request.
8009func (page DiagnosticCategoryCollectionPage) Response() DiagnosticCategoryCollection {
8010	return page.dcc
8011}
8012
8013// Values returns the slice of values for the current page or nil if there are no values.
8014func (page DiagnosticCategoryCollectionPage) Values() []DiagnosticCategory {
8015	if page.dcc.IsEmpty() {
8016		return nil
8017	}
8018	return *page.dcc.Value
8019}
8020
8021// Creates a new instance of the DiagnosticCategoryCollectionPage type.
8022func NewDiagnosticCategoryCollectionPage(cur DiagnosticCategoryCollection, getNextPage func(context.Context, DiagnosticCategoryCollection) (DiagnosticCategoryCollection, error)) DiagnosticCategoryCollectionPage {
8023	return DiagnosticCategoryCollectionPage{
8024		fn:  getNextPage,
8025		dcc: cur,
8026	}
8027}
8028
8029// DiagnosticCategoryProperties diagnosticCategory resource specific properties
8030type DiagnosticCategoryProperties struct {
8031	// Description - READ-ONLY; Description of the diagnostic category
8032	Description *string `json:"description,omitempty"`
8033}
8034
8035// MarshalJSON is the custom marshaler for DiagnosticCategoryProperties.
8036func (dc DiagnosticCategoryProperties) MarshalJSON() ([]byte, error) {
8037	objectMap := make(map[string]interface{})
8038	return json.Marshal(objectMap)
8039}
8040
8041// DiagnosticData set of data with rendering instructions
8042type DiagnosticData struct {
8043	// Table - Data in table form
8044	Table *DataTableResponseObject `json:"table,omitempty"`
8045	// RenderingProperties - Properties that describe how the table should be rendered
8046	RenderingProperties *Rendering `json:"renderingProperties,omitempty"`
8047}
8048
8049// DiagnosticDetectorCollection collection of Diagnostic Detectors
8050type DiagnosticDetectorCollection struct {
8051	autorest.Response `json:"-"`
8052	// Value - Collection of resources.
8053	Value *[]DetectorDefinition `json:"value,omitempty"`
8054	// NextLink - READ-ONLY; Link to next page of resources.
8055	NextLink *string `json:"nextLink,omitempty"`
8056}
8057
8058// MarshalJSON is the custom marshaler for DiagnosticDetectorCollection.
8059func (ddc DiagnosticDetectorCollection) MarshalJSON() ([]byte, error) {
8060	objectMap := make(map[string]interface{})
8061	if ddc.Value != nil {
8062		objectMap["value"] = ddc.Value
8063	}
8064	return json.Marshal(objectMap)
8065}
8066
8067// DiagnosticDetectorCollectionIterator provides access to a complete listing of DetectorDefinition values.
8068type DiagnosticDetectorCollectionIterator struct {
8069	i    int
8070	page DiagnosticDetectorCollectionPage
8071}
8072
8073// NextWithContext advances to the next value.  If there was an error making
8074// the request the iterator does not advance and the error is returned.
8075func (iter *DiagnosticDetectorCollectionIterator) NextWithContext(ctx context.Context) (err error) {
8076	if tracing.IsEnabled() {
8077		ctx = tracing.StartSpan(ctx, fqdn+"/DiagnosticDetectorCollectionIterator.NextWithContext")
8078		defer func() {
8079			sc := -1
8080			if iter.Response().Response.Response != nil {
8081				sc = iter.Response().Response.Response.StatusCode
8082			}
8083			tracing.EndSpan(ctx, sc, err)
8084		}()
8085	}
8086	iter.i++
8087	if iter.i < len(iter.page.Values()) {
8088		return nil
8089	}
8090	err = iter.page.NextWithContext(ctx)
8091	if err != nil {
8092		iter.i--
8093		return err
8094	}
8095	iter.i = 0
8096	return nil
8097}
8098
8099// Next advances to the next value.  If there was an error making
8100// the request the iterator does not advance and the error is returned.
8101// Deprecated: Use NextWithContext() instead.
8102func (iter *DiagnosticDetectorCollectionIterator) Next() error {
8103	return iter.NextWithContext(context.Background())
8104}
8105
8106// NotDone returns true if the enumeration should be started or is not yet complete.
8107func (iter DiagnosticDetectorCollectionIterator) NotDone() bool {
8108	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8109}
8110
8111// Response returns the raw server response from the last page request.
8112func (iter DiagnosticDetectorCollectionIterator) Response() DiagnosticDetectorCollection {
8113	return iter.page.Response()
8114}
8115
8116// Value returns the current value or a zero-initialized value if the
8117// iterator has advanced beyond the end of the collection.
8118func (iter DiagnosticDetectorCollectionIterator) Value() DetectorDefinition {
8119	if !iter.page.NotDone() {
8120		return DetectorDefinition{}
8121	}
8122	return iter.page.Values()[iter.i]
8123}
8124
8125// Creates a new instance of the DiagnosticDetectorCollectionIterator type.
8126func NewDiagnosticDetectorCollectionIterator(page DiagnosticDetectorCollectionPage) DiagnosticDetectorCollectionIterator {
8127	return DiagnosticDetectorCollectionIterator{page: page}
8128}
8129
8130// IsEmpty returns true if the ListResult contains no values.
8131func (ddc DiagnosticDetectorCollection) IsEmpty() bool {
8132	return ddc.Value == nil || len(*ddc.Value) == 0
8133}
8134
8135// hasNextLink returns true if the NextLink is not empty.
8136func (ddc DiagnosticDetectorCollection) hasNextLink() bool {
8137	return ddc.NextLink != nil && len(*ddc.NextLink) != 0
8138}
8139
8140// diagnosticDetectorCollectionPreparer prepares a request to retrieve the next set of results.
8141// It returns nil if no more results exist.
8142func (ddc DiagnosticDetectorCollection) diagnosticDetectorCollectionPreparer(ctx context.Context) (*http.Request, error) {
8143	if !ddc.hasNextLink() {
8144		return nil, nil
8145	}
8146	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8147		autorest.AsJSON(),
8148		autorest.AsGet(),
8149		autorest.WithBaseURL(to.String(ddc.NextLink)))
8150}
8151
8152// DiagnosticDetectorCollectionPage contains a page of DetectorDefinition values.
8153type DiagnosticDetectorCollectionPage struct {
8154	fn  func(context.Context, DiagnosticDetectorCollection) (DiagnosticDetectorCollection, error)
8155	ddc DiagnosticDetectorCollection
8156}
8157
8158// NextWithContext advances to the next page of values.  If there was an error making
8159// the request the page does not advance and the error is returned.
8160func (page *DiagnosticDetectorCollectionPage) NextWithContext(ctx context.Context) (err error) {
8161	if tracing.IsEnabled() {
8162		ctx = tracing.StartSpan(ctx, fqdn+"/DiagnosticDetectorCollectionPage.NextWithContext")
8163		defer func() {
8164			sc := -1
8165			if page.Response().Response.Response != nil {
8166				sc = page.Response().Response.Response.StatusCode
8167			}
8168			tracing.EndSpan(ctx, sc, err)
8169		}()
8170	}
8171	for {
8172		next, err := page.fn(ctx, page.ddc)
8173		if err != nil {
8174			return err
8175		}
8176		page.ddc = next
8177		if !next.hasNextLink() || !next.IsEmpty() {
8178			break
8179		}
8180	}
8181	return nil
8182}
8183
8184// Next advances to the next page of values.  If there was an error making
8185// the request the page does not advance and the error is returned.
8186// Deprecated: Use NextWithContext() instead.
8187func (page *DiagnosticDetectorCollectionPage) Next() error {
8188	return page.NextWithContext(context.Background())
8189}
8190
8191// NotDone returns true if the page enumeration should be started or is not yet complete.
8192func (page DiagnosticDetectorCollectionPage) NotDone() bool {
8193	return !page.ddc.IsEmpty()
8194}
8195
8196// Response returns the raw server response from the last page request.
8197func (page DiagnosticDetectorCollectionPage) Response() DiagnosticDetectorCollection {
8198	return page.ddc
8199}
8200
8201// Values returns the slice of values for the current page or nil if there are no values.
8202func (page DiagnosticDetectorCollectionPage) Values() []DetectorDefinition {
8203	if page.ddc.IsEmpty() {
8204		return nil
8205	}
8206	return *page.ddc.Value
8207}
8208
8209// Creates a new instance of the DiagnosticDetectorCollectionPage type.
8210func NewDiagnosticDetectorCollectionPage(cur DiagnosticDetectorCollection, getNextPage func(context.Context, DiagnosticDetectorCollection) (DiagnosticDetectorCollection, error)) DiagnosticDetectorCollectionPage {
8211	return DiagnosticDetectorCollectionPage{
8212		fn:  getNextPage,
8213		ddc: cur,
8214	}
8215}
8216
8217// DiagnosticDetectorResponse class representing Response from Diagnostic Detectors
8218type DiagnosticDetectorResponse struct {
8219	autorest.Response `json:"-"`
8220	// DiagnosticDetectorResponseProperties - DiagnosticDetectorResponse resource specific properties
8221	*DiagnosticDetectorResponseProperties `json:"properties,omitempty"`
8222	// ID - READ-ONLY; Resource Id.
8223	ID *string `json:"id,omitempty"`
8224	// Name - READ-ONLY; Resource Name.
8225	Name *string `json:"name,omitempty"`
8226	// Kind - Kind of resource.
8227	Kind *string `json:"kind,omitempty"`
8228	// Type - READ-ONLY; Resource type.
8229	Type *string `json:"type,omitempty"`
8230}
8231
8232// MarshalJSON is the custom marshaler for DiagnosticDetectorResponse.
8233func (ddr DiagnosticDetectorResponse) MarshalJSON() ([]byte, error) {
8234	objectMap := make(map[string]interface{})
8235	if ddr.DiagnosticDetectorResponseProperties != nil {
8236		objectMap["properties"] = ddr.DiagnosticDetectorResponseProperties
8237	}
8238	if ddr.Kind != nil {
8239		objectMap["kind"] = ddr.Kind
8240	}
8241	return json.Marshal(objectMap)
8242}
8243
8244// UnmarshalJSON is the custom unmarshaler for DiagnosticDetectorResponse struct.
8245func (ddr *DiagnosticDetectorResponse) UnmarshalJSON(body []byte) error {
8246	var m map[string]*json.RawMessage
8247	err := json.Unmarshal(body, &m)
8248	if err != nil {
8249		return err
8250	}
8251	for k, v := range m {
8252		switch k {
8253		case "properties":
8254			if v != nil {
8255				var diagnosticDetectorResponseProperties DiagnosticDetectorResponseProperties
8256				err = json.Unmarshal(*v, &diagnosticDetectorResponseProperties)
8257				if err != nil {
8258					return err
8259				}
8260				ddr.DiagnosticDetectorResponseProperties = &diagnosticDetectorResponseProperties
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				ddr.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				ddr.Name = &name
8279			}
8280		case "kind":
8281			if v != nil {
8282				var kind string
8283				err = json.Unmarshal(*v, &kind)
8284				if err != nil {
8285					return err
8286				}
8287				ddr.Kind = &kind
8288			}
8289		case "type":
8290			if v != nil {
8291				var typeVar string
8292				err = json.Unmarshal(*v, &typeVar)
8293				if err != nil {
8294					return err
8295				}
8296				ddr.Type = &typeVar
8297			}
8298		}
8299	}
8300
8301	return nil
8302}
8303
8304// DiagnosticDetectorResponseProperties diagnosticDetectorResponse resource specific properties
8305type DiagnosticDetectorResponseProperties struct {
8306	// StartTime - Start time of the period
8307	StartTime *date.Time `json:"startTime,omitempty"`
8308	// EndTime - End time of the period
8309	EndTime *date.Time `json:"endTime,omitempty"`
8310	// IssueDetected - Flag representing Issue was detected.
8311	IssueDetected *bool `json:"issueDetected,omitempty"`
8312	// DetectorDefinition - Detector's definition
8313	DetectorDefinition *DetectorDefinition `json:"detectorDefinition,omitempty"`
8314	// Metrics - Metrics provided by the detector
8315	Metrics *[]DiagnosticMetricSet `json:"metrics,omitempty"`
8316	// AbnormalTimePeriods - List of Correlated events found by the detector
8317	AbnormalTimePeriods *[]DetectorAbnormalTimePeriod `json:"abnormalTimePeriods,omitempty"`
8318	// Data - Additional Data that detector wants to send.
8319	Data *[][]NameValuePair `json:"data,omitempty"`
8320	// ResponseMetaData - Meta Data
8321	ResponseMetaData *ResponseMetaData `json:"responseMetaData,omitempty"`
8322}
8323
8324// DiagnosticMetricSample class representing Diagnostic Metric
8325type DiagnosticMetricSample struct {
8326	// Timestamp - Time at which metric is measured
8327	Timestamp *date.Time `json:"timestamp,omitempty"`
8328	// RoleInstance - Role Instance. Null if this counter is not per instance
8329	// This is returned and should be whichever instance name we desire to be returned
8330	// i.e. CPU and Memory return RDWORKERNAME (LargeDed..._IN_0)
8331	// where RDWORKERNAME is Machine name below and RoleInstance name in parenthesis
8332	RoleInstance *string `json:"roleInstance,omitempty"`
8333	// Total - Total value of the metric. If multiple measurements are made this will have sum of all.
8334	Total *float64 `json:"total,omitempty"`
8335	// Maximum - Maximum of the metric sampled during the time period
8336	Maximum *float64 `json:"maximum,omitempty"`
8337	// Minimum - Minimum of the metric sampled during the time period
8338	Minimum *float64 `json:"minimum,omitempty"`
8339	// IsAggregated - Whether the values are aggregates across all workers or not
8340	IsAggregated *bool `json:"isAggregated,omitempty"`
8341}
8342
8343// DiagnosticMetricSet class representing Diagnostic Metric information
8344type DiagnosticMetricSet struct {
8345	// Name - Name of the metric
8346	Name *string `json:"name,omitempty"`
8347	// Unit - Metric's unit
8348	Unit *string `json:"unit,omitempty"`
8349	// StartTime - Start time of the period
8350	StartTime *date.Time `json:"startTime,omitempty"`
8351	// EndTime - End time of the period
8352	EndTime *date.Time `json:"endTime,omitempty"`
8353	// TimeGrain - Presented time grain. Supported grains at the moment are PT1M, PT1H, P1D
8354	TimeGrain *string `json:"timeGrain,omitempty"`
8355	// Values - Collection of metric values for the selected period based on the {Microsoft.Web.Hosting.Administration.DiagnosticMetricSet.TimeGrain}
8356	Values *[]DiagnosticMetricSample `json:"values,omitempty"`
8357}
8358
8359// Dimension dimension of a resource metric. For e.g. instance specific HTTP requests for a web app,
8360// where instance name is dimension of the metric HTTP request
8361type Dimension struct {
8362	Name                   *string `json:"name,omitempty"`
8363	DisplayName            *string `json:"displayName,omitempty"`
8364	InternalName           *string `json:"internalName,omitempty"`
8365	ToBeExportedForShoebox *bool   `json:"toBeExportedForShoebox,omitempty"`
8366}
8367
8368// Domain information about a domain.
8369type Domain struct {
8370	autorest.Response `json:"-"`
8371	// DomainProperties - Domain resource specific properties
8372	*DomainProperties `json:"properties,omitempty"`
8373	// ID - READ-ONLY; Resource Id.
8374	ID *string `json:"id,omitempty"`
8375	// Name - READ-ONLY; Resource Name.
8376	Name *string `json:"name,omitempty"`
8377	// Kind - Kind of resource.
8378	Kind *string `json:"kind,omitempty"`
8379	// Location - Resource Location.
8380	Location *string `json:"location,omitempty"`
8381	// Type - READ-ONLY; Resource type.
8382	Type *string `json:"type,omitempty"`
8383	// Tags - Resource tags.
8384	Tags map[string]*string `json:"tags"`
8385}
8386
8387// MarshalJSON is the custom marshaler for Domain.
8388func (d Domain) MarshalJSON() ([]byte, error) {
8389	objectMap := make(map[string]interface{})
8390	if d.DomainProperties != nil {
8391		objectMap["properties"] = d.DomainProperties
8392	}
8393	if d.Kind != nil {
8394		objectMap["kind"] = d.Kind
8395	}
8396	if d.Location != nil {
8397		objectMap["location"] = d.Location
8398	}
8399	if d.Tags != nil {
8400		objectMap["tags"] = d.Tags
8401	}
8402	return json.Marshal(objectMap)
8403}
8404
8405// UnmarshalJSON is the custom unmarshaler for Domain struct.
8406func (d *Domain) UnmarshalJSON(body []byte) error {
8407	var m map[string]*json.RawMessage
8408	err := json.Unmarshal(body, &m)
8409	if err != nil {
8410		return err
8411	}
8412	for k, v := range m {
8413		switch k {
8414		case "properties":
8415			if v != nil {
8416				var domainProperties DomainProperties
8417				err = json.Unmarshal(*v, &domainProperties)
8418				if err != nil {
8419					return err
8420				}
8421				d.DomainProperties = &domainProperties
8422			}
8423		case "id":
8424			if v != nil {
8425				var ID string
8426				err = json.Unmarshal(*v, &ID)
8427				if err != nil {
8428					return err
8429				}
8430				d.ID = &ID
8431			}
8432		case "name":
8433			if v != nil {
8434				var name string
8435				err = json.Unmarshal(*v, &name)
8436				if err != nil {
8437					return err
8438				}
8439				d.Name = &name
8440			}
8441		case "kind":
8442			if v != nil {
8443				var kind string
8444				err = json.Unmarshal(*v, &kind)
8445				if err != nil {
8446					return err
8447				}
8448				d.Kind = &kind
8449			}
8450		case "location":
8451			if v != nil {
8452				var location string
8453				err = json.Unmarshal(*v, &location)
8454				if err != nil {
8455					return err
8456				}
8457				d.Location = &location
8458			}
8459		case "type":
8460			if v != nil {
8461				var typeVar string
8462				err = json.Unmarshal(*v, &typeVar)
8463				if err != nil {
8464					return err
8465				}
8466				d.Type = &typeVar
8467			}
8468		case "tags":
8469			if v != nil {
8470				var tags map[string]*string
8471				err = json.Unmarshal(*v, &tags)
8472				if err != nil {
8473					return err
8474				}
8475				d.Tags = tags
8476			}
8477		}
8478	}
8479
8480	return nil
8481}
8482
8483// DomainAvailablilityCheckResult domain availability check result.
8484type DomainAvailablilityCheckResult struct {
8485	autorest.Response `json:"-"`
8486	// Name - Name of the domain.
8487	Name *string `json:"name,omitempty"`
8488	// Available - <code>true</code> if domain can be purchased using CreateDomain API; otherwise, <code>false</code>.
8489	Available *bool `json:"available,omitempty"`
8490	// DomainType - Valid values are Regular domain: Azure will charge the full price of domain registration, SoftDeleted: Purchasing this domain will simply restore it and this operation will not cost anything. Possible values include: 'Regular', 'SoftDeleted'
8491	DomainType DomainType `json:"domainType,omitempty"`
8492}
8493
8494// DomainCollection collection of domains.
8495type DomainCollection struct {
8496	autorest.Response `json:"-"`
8497	// Value - Collection of resources.
8498	Value *[]Domain `json:"value,omitempty"`
8499	// NextLink - READ-ONLY; Link to next page of resources.
8500	NextLink *string `json:"nextLink,omitempty"`
8501}
8502
8503// MarshalJSON is the custom marshaler for DomainCollection.
8504func (dc DomainCollection) MarshalJSON() ([]byte, error) {
8505	objectMap := make(map[string]interface{})
8506	if dc.Value != nil {
8507		objectMap["value"] = dc.Value
8508	}
8509	return json.Marshal(objectMap)
8510}
8511
8512// DomainCollectionIterator provides access to a complete listing of Domain values.
8513type DomainCollectionIterator struct {
8514	i    int
8515	page DomainCollectionPage
8516}
8517
8518// NextWithContext advances to the next value.  If there was an error making
8519// the request the iterator does not advance and the error is returned.
8520func (iter *DomainCollectionIterator) NextWithContext(ctx context.Context) (err error) {
8521	if tracing.IsEnabled() {
8522		ctx = tracing.StartSpan(ctx, fqdn+"/DomainCollectionIterator.NextWithContext")
8523		defer func() {
8524			sc := -1
8525			if iter.Response().Response.Response != nil {
8526				sc = iter.Response().Response.Response.StatusCode
8527			}
8528			tracing.EndSpan(ctx, sc, err)
8529		}()
8530	}
8531	iter.i++
8532	if iter.i < len(iter.page.Values()) {
8533		return nil
8534	}
8535	err = iter.page.NextWithContext(ctx)
8536	if err != nil {
8537		iter.i--
8538		return err
8539	}
8540	iter.i = 0
8541	return nil
8542}
8543
8544// Next advances to the next value.  If there was an error making
8545// the request the iterator does not advance and the error is returned.
8546// Deprecated: Use NextWithContext() instead.
8547func (iter *DomainCollectionIterator) Next() error {
8548	return iter.NextWithContext(context.Background())
8549}
8550
8551// NotDone returns true if the enumeration should be started or is not yet complete.
8552func (iter DomainCollectionIterator) NotDone() bool {
8553	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8554}
8555
8556// Response returns the raw server response from the last page request.
8557func (iter DomainCollectionIterator) Response() DomainCollection {
8558	return iter.page.Response()
8559}
8560
8561// Value returns the current value or a zero-initialized value if the
8562// iterator has advanced beyond the end of the collection.
8563func (iter DomainCollectionIterator) Value() Domain {
8564	if !iter.page.NotDone() {
8565		return Domain{}
8566	}
8567	return iter.page.Values()[iter.i]
8568}
8569
8570// Creates a new instance of the DomainCollectionIterator type.
8571func NewDomainCollectionIterator(page DomainCollectionPage) DomainCollectionIterator {
8572	return DomainCollectionIterator{page: page}
8573}
8574
8575// IsEmpty returns true if the ListResult contains no values.
8576func (dc DomainCollection) IsEmpty() bool {
8577	return dc.Value == nil || len(*dc.Value) == 0
8578}
8579
8580// hasNextLink returns true if the NextLink is not empty.
8581func (dc DomainCollection) hasNextLink() bool {
8582	return dc.NextLink != nil && len(*dc.NextLink) != 0
8583}
8584
8585// domainCollectionPreparer prepares a request to retrieve the next set of results.
8586// It returns nil if no more results exist.
8587func (dc DomainCollection) domainCollectionPreparer(ctx context.Context) (*http.Request, error) {
8588	if !dc.hasNextLink() {
8589		return nil, nil
8590	}
8591	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8592		autorest.AsJSON(),
8593		autorest.AsGet(),
8594		autorest.WithBaseURL(to.String(dc.NextLink)))
8595}
8596
8597// DomainCollectionPage contains a page of Domain values.
8598type DomainCollectionPage struct {
8599	fn func(context.Context, DomainCollection) (DomainCollection, error)
8600	dc DomainCollection
8601}
8602
8603// NextWithContext advances to the next page of values.  If there was an error making
8604// the request the page does not advance and the error is returned.
8605func (page *DomainCollectionPage) NextWithContext(ctx context.Context) (err error) {
8606	if tracing.IsEnabled() {
8607		ctx = tracing.StartSpan(ctx, fqdn+"/DomainCollectionPage.NextWithContext")
8608		defer func() {
8609			sc := -1
8610			if page.Response().Response.Response != nil {
8611				sc = page.Response().Response.Response.StatusCode
8612			}
8613			tracing.EndSpan(ctx, sc, err)
8614		}()
8615	}
8616	for {
8617		next, err := page.fn(ctx, page.dc)
8618		if err != nil {
8619			return err
8620		}
8621		page.dc = next
8622		if !next.hasNextLink() || !next.IsEmpty() {
8623			break
8624		}
8625	}
8626	return nil
8627}
8628
8629// Next advances to the next page of values.  If there was an error making
8630// the request the page does not advance and the error is returned.
8631// Deprecated: Use NextWithContext() instead.
8632func (page *DomainCollectionPage) Next() error {
8633	return page.NextWithContext(context.Background())
8634}
8635
8636// NotDone returns true if the page enumeration should be started or is not yet complete.
8637func (page DomainCollectionPage) NotDone() bool {
8638	return !page.dc.IsEmpty()
8639}
8640
8641// Response returns the raw server response from the last page request.
8642func (page DomainCollectionPage) Response() DomainCollection {
8643	return page.dc
8644}
8645
8646// Values returns the slice of values for the current page or nil if there are no values.
8647func (page DomainCollectionPage) Values() []Domain {
8648	if page.dc.IsEmpty() {
8649		return nil
8650	}
8651	return *page.dc.Value
8652}
8653
8654// Creates a new instance of the DomainCollectionPage type.
8655func NewDomainCollectionPage(cur DomainCollection, getNextPage func(context.Context, DomainCollection) (DomainCollection, error)) DomainCollectionPage {
8656	return DomainCollectionPage{
8657		fn: getNextPage,
8658		dc: cur,
8659	}
8660}
8661
8662// DomainControlCenterSsoRequest single sign-on request information for domain management.
8663type DomainControlCenterSsoRequest struct {
8664	autorest.Response `json:"-"`
8665	// URL - READ-ONLY; URL where the single sign-on request is to be made.
8666	URL *string `json:"url,omitempty"`
8667	// PostParameterKey - READ-ONLY; Post parameter key.
8668	PostParameterKey *string `json:"postParameterKey,omitempty"`
8669	// PostParameterValue - READ-ONLY; Post parameter value. Client should use 'application/x-www-form-urlencoded' encoding for this value.
8670	PostParameterValue *string `json:"postParameterValue,omitempty"`
8671}
8672
8673// MarshalJSON is the custom marshaler for DomainControlCenterSsoRequest.
8674func (dccsr DomainControlCenterSsoRequest) MarshalJSON() ([]byte, error) {
8675	objectMap := make(map[string]interface{})
8676	return json.Marshal(objectMap)
8677}
8678
8679// DomainOwnershipIdentifier domain ownership Identifier.
8680type DomainOwnershipIdentifier struct {
8681	autorest.Response `json:"-"`
8682	// DomainOwnershipIdentifierProperties - DomainOwnershipIdentifier resource specific properties
8683	*DomainOwnershipIdentifierProperties `json:"properties,omitempty"`
8684	// ID - READ-ONLY; Resource Id.
8685	ID *string `json:"id,omitempty"`
8686	// Name - READ-ONLY; Resource Name.
8687	Name *string `json:"name,omitempty"`
8688	// Kind - Kind of resource.
8689	Kind *string `json:"kind,omitempty"`
8690	// Type - READ-ONLY; Resource type.
8691	Type *string `json:"type,omitempty"`
8692}
8693
8694// MarshalJSON is the custom marshaler for DomainOwnershipIdentifier.
8695func (doi DomainOwnershipIdentifier) MarshalJSON() ([]byte, error) {
8696	objectMap := make(map[string]interface{})
8697	if doi.DomainOwnershipIdentifierProperties != nil {
8698		objectMap["properties"] = doi.DomainOwnershipIdentifierProperties
8699	}
8700	if doi.Kind != nil {
8701		objectMap["kind"] = doi.Kind
8702	}
8703	return json.Marshal(objectMap)
8704}
8705
8706// UnmarshalJSON is the custom unmarshaler for DomainOwnershipIdentifier struct.
8707func (doi *DomainOwnershipIdentifier) UnmarshalJSON(body []byte) error {
8708	var m map[string]*json.RawMessage
8709	err := json.Unmarshal(body, &m)
8710	if err != nil {
8711		return err
8712	}
8713	for k, v := range m {
8714		switch k {
8715		case "properties":
8716			if v != nil {
8717				var domainOwnershipIdentifierProperties DomainOwnershipIdentifierProperties
8718				err = json.Unmarshal(*v, &domainOwnershipIdentifierProperties)
8719				if err != nil {
8720					return err
8721				}
8722				doi.DomainOwnershipIdentifierProperties = &domainOwnershipIdentifierProperties
8723			}
8724		case "id":
8725			if v != nil {
8726				var ID string
8727				err = json.Unmarshal(*v, &ID)
8728				if err != nil {
8729					return err
8730				}
8731				doi.ID = &ID
8732			}
8733		case "name":
8734			if v != nil {
8735				var name string
8736				err = json.Unmarshal(*v, &name)
8737				if err != nil {
8738					return err
8739				}
8740				doi.Name = &name
8741			}
8742		case "kind":
8743			if v != nil {
8744				var kind string
8745				err = json.Unmarshal(*v, &kind)
8746				if err != nil {
8747					return err
8748				}
8749				doi.Kind = &kind
8750			}
8751		case "type":
8752			if v != nil {
8753				var typeVar string
8754				err = json.Unmarshal(*v, &typeVar)
8755				if err != nil {
8756					return err
8757				}
8758				doi.Type = &typeVar
8759			}
8760		}
8761	}
8762
8763	return nil
8764}
8765
8766// DomainOwnershipIdentifierCollection collection of domain ownership identifiers.
8767type DomainOwnershipIdentifierCollection struct {
8768	autorest.Response `json:"-"`
8769	// Value - Collection of resources.
8770	Value *[]DomainOwnershipIdentifier `json:"value,omitempty"`
8771	// NextLink - READ-ONLY; Link to next page of resources.
8772	NextLink *string `json:"nextLink,omitempty"`
8773}
8774
8775// MarshalJSON is the custom marshaler for DomainOwnershipIdentifierCollection.
8776func (doic DomainOwnershipIdentifierCollection) MarshalJSON() ([]byte, error) {
8777	objectMap := make(map[string]interface{})
8778	if doic.Value != nil {
8779		objectMap["value"] = doic.Value
8780	}
8781	return json.Marshal(objectMap)
8782}
8783
8784// DomainOwnershipIdentifierCollectionIterator provides access to a complete listing of
8785// DomainOwnershipIdentifier values.
8786type DomainOwnershipIdentifierCollectionIterator struct {
8787	i    int
8788	page DomainOwnershipIdentifierCollectionPage
8789}
8790
8791// NextWithContext advances to the next value.  If there was an error making
8792// the request the iterator does not advance and the error is returned.
8793func (iter *DomainOwnershipIdentifierCollectionIterator) NextWithContext(ctx context.Context) (err error) {
8794	if tracing.IsEnabled() {
8795		ctx = tracing.StartSpan(ctx, fqdn+"/DomainOwnershipIdentifierCollectionIterator.NextWithContext")
8796		defer func() {
8797			sc := -1
8798			if iter.Response().Response.Response != nil {
8799				sc = iter.Response().Response.Response.StatusCode
8800			}
8801			tracing.EndSpan(ctx, sc, err)
8802		}()
8803	}
8804	iter.i++
8805	if iter.i < len(iter.page.Values()) {
8806		return nil
8807	}
8808	err = iter.page.NextWithContext(ctx)
8809	if err != nil {
8810		iter.i--
8811		return err
8812	}
8813	iter.i = 0
8814	return nil
8815}
8816
8817// Next advances to the next value.  If there was an error making
8818// the request the iterator does not advance and the error is returned.
8819// Deprecated: Use NextWithContext() instead.
8820func (iter *DomainOwnershipIdentifierCollectionIterator) Next() error {
8821	return iter.NextWithContext(context.Background())
8822}
8823
8824// NotDone returns true if the enumeration should be started or is not yet complete.
8825func (iter DomainOwnershipIdentifierCollectionIterator) NotDone() bool {
8826	return iter.page.NotDone() && iter.i < len(iter.page.Values())
8827}
8828
8829// Response returns the raw server response from the last page request.
8830func (iter DomainOwnershipIdentifierCollectionIterator) Response() DomainOwnershipIdentifierCollection {
8831	return iter.page.Response()
8832}
8833
8834// Value returns the current value or a zero-initialized value if the
8835// iterator has advanced beyond the end of the collection.
8836func (iter DomainOwnershipIdentifierCollectionIterator) Value() DomainOwnershipIdentifier {
8837	if !iter.page.NotDone() {
8838		return DomainOwnershipIdentifier{}
8839	}
8840	return iter.page.Values()[iter.i]
8841}
8842
8843// Creates a new instance of the DomainOwnershipIdentifierCollectionIterator type.
8844func NewDomainOwnershipIdentifierCollectionIterator(page DomainOwnershipIdentifierCollectionPage) DomainOwnershipIdentifierCollectionIterator {
8845	return DomainOwnershipIdentifierCollectionIterator{page: page}
8846}
8847
8848// IsEmpty returns true if the ListResult contains no values.
8849func (doic DomainOwnershipIdentifierCollection) IsEmpty() bool {
8850	return doic.Value == nil || len(*doic.Value) == 0
8851}
8852
8853// hasNextLink returns true if the NextLink is not empty.
8854func (doic DomainOwnershipIdentifierCollection) hasNextLink() bool {
8855	return doic.NextLink != nil && len(*doic.NextLink) != 0
8856}
8857
8858// domainOwnershipIdentifierCollectionPreparer prepares a request to retrieve the next set of results.
8859// It returns nil if no more results exist.
8860func (doic DomainOwnershipIdentifierCollection) domainOwnershipIdentifierCollectionPreparer(ctx context.Context) (*http.Request, error) {
8861	if !doic.hasNextLink() {
8862		return nil, nil
8863	}
8864	return autorest.Prepare((&http.Request{}).WithContext(ctx),
8865		autorest.AsJSON(),
8866		autorest.AsGet(),
8867		autorest.WithBaseURL(to.String(doic.NextLink)))
8868}
8869
8870// DomainOwnershipIdentifierCollectionPage contains a page of DomainOwnershipIdentifier values.
8871type DomainOwnershipIdentifierCollectionPage struct {
8872	fn   func(context.Context, DomainOwnershipIdentifierCollection) (DomainOwnershipIdentifierCollection, error)
8873	doic DomainOwnershipIdentifierCollection
8874}
8875
8876// NextWithContext advances to the next page of values.  If there was an error making
8877// the request the page does not advance and the error is returned.
8878func (page *DomainOwnershipIdentifierCollectionPage) NextWithContext(ctx context.Context) (err error) {
8879	if tracing.IsEnabled() {
8880		ctx = tracing.StartSpan(ctx, fqdn+"/DomainOwnershipIdentifierCollectionPage.NextWithContext")
8881		defer func() {
8882			sc := -1
8883			if page.Response().Response.Response != nil {
8884				sc = page.Response().Response.Response.StatusCode
8885			}
8886			tracing.EndSpan(ctx, sc, err)
8887		}()
8888	}
8889	for {
8890		next, err := page.fn(ctx, page.doic)
8891		if err != nil {
8892			return err
8893		}
8894		page.doic = next
8895		if !next.hasNextLink() || !next.IsEmpty() {
8896			break
8897		}
8898	}
8899	return nil
8900}
8901
8902// Next advances to the next page of values.  If there was an error making
8903// the request the page does not advance and the error is returned.
8904// Deprecated: Use NextWithContext() instead.
8905func (page *DomainOwnershipIdentifierCollectionPage) Next() error {
8906	return page.NextWithContext(context.Background())
8907}
8908
8909// NotDone returns true if the page enumeration should be started or is not yet complete.
8910func (page DomainOwnershipIdentifierCollectionPage) NotDone() bool {
8911	return !page.doic.IsEmpty()
8912}
8913
8914// Response returns the raw server response from the last page request.
8915func (page DomainOwnershipIdentifierCollectionPage) Response() DomainOwnershipIdentifierCollection {
8916	return page.doic
8917}
8918
8919// Values returns the slice of values for the current page or nil if there are no values.
8920func (page DomainOwnershipIdentifierCollectionPage) Values() []DomainOwnershipIdentifier {
8921	if page.doic.IsEmpty() {
8922		return nil
8923	}
8924	return *page.doic.Value
8925}
8926
8927// Creates a new instance of the DomainOwnershipIdentifierCollectionPage type.
8928func NewDomainOwnershipIdentifierCollectionPage(cur DomainOwnershipIdentifierCollection, getNextPage func(context.Context, DomainOwnershipIdentifierCollection) (DomainOwnershipIdentifierCollection, error)) DomainOwnershipIdentifierCollectionPage {
8929	return DomainOwnershipIdentifierCollectionPage{
8930		fn:   getNextPage,
8931		doic: cur,
8932	}
8933}
8934
8935// DomainOwnershipIdentifierProperties domainOwnershipIdentifier resource specific properties
8936type DomainOwnershipIdentifierProperties struct {
8937	// OwnershipID - Ownership Id.
8938	OwnershipID *string `json:"ownershipId,omitempty"`
8939}
8940
8941// DomainPatchResource ARM resource for a domain.
8942type DomainPatchResource struct {
8943	// DomainPatchResourceProperties - DomainPatchResource resource specific properties
8944	*DomainPatchResourceProperties `json:"properties,omitempty"`
8945	// ID - READ-ONLY; Resource Id.
8946	ID *string `json:"id,omitempty"`
8947	// Name - READ-ONLY; Resource Name.
8948	Name *string `json:"name,omitempty"`
8949	// Kind - Kind of resource.
8950	Kind *string `json:"kind,omitempty"`
8951	// Type - READ-ONLY; Resource type.
8952	Type *string `json:"type,omitempty"`
8953}
8954
8955// MarshalJSON is the custom marshaler for DomainPatchResource.
8956func (dpr DomainPatchResource) MarshalJSON() ([]byte, error) {
8957	objectMap := make(map[string]interface{})
8958	if dpr.DomainPatchResourceProperties != nil {
8959		objectMap["properties"] = dpr.DomainPatchResourceProperties
8960	}
8961	if dpr.Kind != nil {
8962		objectMap["kind"] = dpr.Kind
8963	}
8964	return json.Marshal(objectMap)
8965}
8966
8967// UnmarshalJSON is the custom unmarshaler for DomainPatchResource struct.
8968func (dpr *DomainPatchResource) UnmarshalJSON(body []byte) error {
8969	var m map[string]*json.RawMessage
8970	err := json.Unmarshal(body, &m)
8971	if err != nil {
8972		return err
8973	}
8974	for k, v := range m {
8975		switch k {
8976		case "properties":
8977			if v != nil {
8978				var domainPatchResourceProperties DomainPatchResourceProperties
8979				err = json.Unmarshal(*v, &domainPatchResourceProperties)
8980				if err != nil {
8981					return err
8982				}
8983				dpr.DomainPatchResourceProperties = &domainPatchResourceProperties
8984			}
8985		case "id":
8986			if v != nil {
8987				var ID string
8988				err = json.Unmarshal(*v, &ID)
8989				if err != nil {
8990					return err
8991				}
8992				dpr.ID = &ID
8993			}
8994		case "name":
8995			if v != nil {
8996				var name string
8997				err = json.Unmarshal(*v, &name)
8998				if err != nil {
8999					return err
9000				}
9001				dpr.Name = &name
9002			}
9003		case "kind":
9004			if v != nil {
9005				var kind string
9006				err = json.Unmarshal(*v, &kind)
9007				if err != nil {
9008					return err
9009				}
9010				dpr.Kind = &kind
9011			}
9012		case "type":
9013			if v != nil {
9014				var typeVar string
9015				err = json.Unmarshal(*v, &typeVar)
9016				if err != nil {
9017					return err
9018				}
9019				dpr.Type = &typeVar
9020			}
9021		}
9022	}
9023
9024	return nil
9025}
9026
9027// DomainPatchResourceProperties domainPatchResource resource specific properties
9028type DomainPatchResourceProperties struct {
9029	// ContactAdmin - Administrative contact.
9030	ContactAdmin *Contact `json:"contactAdmin,omitempty"`
9031	// ContactBilling - Billing contact.
9032	ContactBilling *Contact `json:"contactBilling,omitempty"`
9033	// ContactRegistrant - Registrant contact.
9034	ContactRegistrant *Contact `json:"contactRegistrant,omitempty"`
9035	// ContactTech - Technical contact.
9036	ContactTech *Contact `json:"contactTech,omitempty"`
9037	// RegistrationStatus - READ-ONLY; Domain registration status. Possible values include: 'DomainStatusActive', 'DomainStatusAwaiting', 'DomainStatusCancelled', 'DomainStatusConfiscated', 'DomainStatusDisabled', 'DomainStatusExcluded', 'DomainStatusExpired', 'DomainStatusFailed', 'DomainStatusHeld', 'DomainStatusLocked', 'DomainStatusParked', 'DomainStatusPending', 'DomainStatusReserved', 'DomainStatusReverted', 'DomainStatusSuspended', 'DomainStatusTransferred', 'DomainStatusUnknown', 'DomainStatusUnlocked', 'DomainStatusUnparked', 'DomainStatusUpdated', 'DomainStatusJSONConverterFailed'
9038	RegistrationStatus DomainStatus `json:"registrationStatus,omitempty"`
9039	// ProvisioningState - READ-ONLY; Domain provisioning state. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateFailed', 'ProvisioningStateCanceled', 'ProvisioningStateInProgress', 'ProvisioningStateDeleting'
9040	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
9041	// NameServers - READ-ONLY; Name servers.
9042	NameServers *[]string `json:"nameServers,omitempty"`
9043	// Privacy - <code>true</code> if domain privacy is enabled for this domain; otherwise, <code>false</code>.
9044	Privacy *bool `json:"privacy,omitempty"`
9045	// CreatedTime - READ-ONLY; Domain creation timestamp.
9046	CreatedTime *date.Time `json:"createdTime,omitempty"`
9047	// ExpirationTime - READ-ONLY; Domain expiration timestamp.
9048	ExpirationTime *date.Time `json:"expirationTime,omitempty"`
9049	// LastRenewedTime - READ-ONLY; Timestamp when the domain was renewed last time.
9050	LastRenewedTime *date.Time `json:"lastRenewedTime,omitempty"`
9051	// AutoRenew - <code>true</code> if the domain should be automatically renewed; otherwise, <code>false</code>.
9052	AutoRenew *bool `json:"autoRenew,omitempty"`
9053	// ReadyForDNSRecordManagement - READ-ONLY; <code>true</code> if Azure can assign this domain to App Service apps; otherwise, <code>false</code>. This value will be <code>true</code> if domain registration status is active and
9054	//  it is hosted on name servers Azure has programmatic access to.
9055	ReadyForDNSRecordManagement *bool `json:"readyForDnsRecordManagement,omitempty"`
9056	// ManagedHostNames - READ-ONLY; All hostnames derived from the domain and assigned to Azure resources.
9057	ManagedHostNames *[]HostName `json:"managedHostNames,omitempty"`
9058	// Consent - Legal agreement consent.
9059	Consent *DomainPurchaseConsent `json:"consent,omitempty"`
9060	// DomainNotRenewableReasons - READ-ONLY; Reasons why domain is not renewable.
9061	DomainNotRenewableReasons *[]string `json:"domainNotRenewableReasons,omitempty"`
9062	// DNSType - Current DNS type. Possible values include: 'AzureDNS', 'DefaultDomainRegistrarDNS'
9063	DNSType DNSType `json:"dnsType,omitempty"`
9064	// DNSZoneID - Azure DNS Zone to use
9065	DNSZoneID *string `json:"dnsZoneId,omitempty"`
9066	// TargetDNSType - Target DNS type (would be used for migration). Possible values include: 'AzureDNS', 'DefaultDomainRegistrarDNS'
9067	TargetDNSType DNSType `json:"targetDnsType,omitempty"`
9068	AuthCode      *string `json:"authCode,omitempty"`
9069}
9070
9071// MarshalJSON is the custom marshaler for DomainPatchResourceProperties.
9072func (dpr DomainPatchResourceProperties) MarshalJSON() ([]byte, error) {
9073	objectMap := make(map[string]interface{})
9074	if dpr.ContactAdmin != nil {
9075		objectMap["contactAdmin"] = dpr.ContactAdmin
9076	}
9077	if dpr.ContactBilling != nil {
9078		objectMap["contactBilling"] = dpr.ContactBilling
9079	}
9080	if dpr.ContactRegistrant != nil {
9081		objectMap["contactRegistrant"] = dpr.ContactRegistrant
9082	}
9083	if dpr.ContactTech != nil {
9084		objectMap["contactTech"] = dpr.ContactTech
9085	}
9086	if dpr.Privacy != nil {
9087		objectMap["privacy"] = dpr.Privacy
9088	}
9089	if dpr.AutoRenew != nil {
9090		objectMap["autoRenew"] = dpr.AutoRenew
9091	}
9092	if dpr.Consent != nil {
9093		objectMap["consent"] = dpr.Consent
9094	}
9095	if dpr.DNSType != "" {
9096		objectMap["dnsType"] = dpr.DNSType
9097	}
9098	if dpr.DNSZoneID != nil {
9099		objectMap["dnsZoneId"] = dpr.DNSZoneID
9100	}
9101	if dpr.TargetDNSType != "" {
9102		objectMap["targetDnsType"] = dpr.TargetDNSType
9103	}
9104	if dpr.AuthCode != nil {
9105		objectMap["authCode"] = dpr.AuthCode
9106	}
9107	return json.Marshal(objectMap)
9108}
9109
9110// DomainProperties domain resource specific properties
9111type DomainProperties struct {
9112	// ContactAdmin - Administrative contact.
9113	ContactAdmin *Contact `json:"contactAdmin,omitempty"`
9114	// ContactBilling - Billing contact.
9115	ContactBilling *Contact `json:"contactBilling,omitempty"`
9116	// ContactRegistrant - Registrant contact.
9117	ContactRegistrant *Contact `json:"contactRegistrant,omitempty"`
9118	// ContactTech - Technical contact.
9119	ContactTech *Contact `json:"contactTech,omitempty"`
9120	// RegistrationStatus - READ-ONLY; Domain registration status. Possible values include: 'DomainStatusActive', 'DomainStatusAwaiting', 'DomainStatusCancelled', 'DomainStatusConfiscated', 'DomainStatusDisabled', 'DomainStatusExcluded', 'DomainStatusExpired', 'DomainStatusFailed', 'DomainStatusHeld', 'DomainStatusLocked', 'DomainStatusParked', 'DomainStatusPending', 'DomainStatusReserved', 'DomainStatusReverted', 'DomainStatusSuspended', 'DomainStatusTransferred', 'DomainStatusUnknown', 'DomainStatusUnlocked', 'DomainStatusUnparked', 'DomainStatusUpdated', 'DomainStatusJSONConverterFailed'
9121	RegistrationStatus DomainStatus `json:"registrationStatus,omitempty"`
9122	// ProvisioningState - READ-ONLY; Domain provisioning state. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateFailed', 'ProvisioningStateCanceled', 'ProvisioningStateInProgress', 'ProvisioningStateDeleting'
9123	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
9124	// NameServers - READ-ONLY; Name servers.
9125	NameServers *[]string `json:"nameServers,omitempty"`
9126	// Privacy - <code>true</code> if domain privacy is enabled for this domain; otherwise, <code>false</code>.
9127	Privacy *bool `json:"privacy,omitempty"`
9128	// CreatedTime - READ-ONLY; Domain creation timestamp.
9129	CreatedTime *date.Time `json:"createdTime,omitempty"`
9130	// ExpirationTime - READ-ONLY; Domain expiration timestamp.
9131	ExpirationTime *date.Time `json:"expirationTime,omitempty"`
9132	// LastRenewedTime - READ-ONLY; Timestamp when the domain was renewed last time.
9133	LastRenewedTime *date.Time `json:"lastRenewedTime,omitempty"`
9134	// AutoRenew - <code>true</code> if the domain should be automatically renewed; otherwise, <code>false</code>.
9135	AutoRenew *bool `json:"autoRenew,omitempty"`
9136	// ReadyForDNSRecordManagement - READ-ONLY; <code>true</code> if Azure can assign this domain to App Service apps; otherwise, <code>false</code>. This value will be <code>true</code> if domain registration status is active and
9137	//  it is hosted on name servers Azure has programmatic access to.
9138	ReadyForDNSRecordManagement *bool `json:"readyForDnsRecordManagement,omitempty"`
9139	// ManagedHostNames - READ-ONLY; All hostnames derived from the domain and assigned to Azure resources.
9140	ManagedHostNames *[]HostName `json:"managedHostNames,omitempty"`
9141	// Consent - Legal agreement consent.
9142	Consent *DomainPurchaseConsent `json:"consent,omitempty"`
9143	// DomainNotRenewableReasons - READ-ONLY; Reasons why domain is not renewable.
9144	DomainNotRenewableReasons *[]string `json:"domainNotRenewableReasons,omitempty"`
9145	// DNSType - Current DNS type. Possible values include: 'AzureDNS', 'DefaultDomainRegistrarDNS'
9146	DNSType DNSType `json:"dnsType,omitempty"`
9147	// DNSZoneID - Azure DNS Zone to use
9148	DNSZoneID *string `json:"dnsZoneId,omitempty"`
9149	// TargetDNSType - Target DNS type (would be used for migration). Possible values include: 'AzureDNS', 'DefaultDomainRegistrarDNS'
9150	TargetDNSType DNSType `json:"targetDnsType,omitempty"`
9151	AuthCode      *string `json:"authCode,omitempty"`
9152}
9153
9154// MarshalJSON is the custom marshaler for DomainProperties.
9155func (d DomainProperties) MarshalJSON() ([]byte, error) {
9156	objectMap := make(map[string]interface{})
9157	if d.ContactAdmin != nil {
9158		objectMap["contactAdmin"] = d.ContactAdmin
9159	}
9160	if d.ContactBilling != nil {
9161		objectMap["contactBilling"] = d.ContactBilling
9162	}
9163	if d.ContactRegistrant != nil {
9164		objectMap["contactRegistrant"] = d.ContactRegistrant
9165	}
9166	if d.ContactTech != nil {
9167		objectMap["contactTech"] = d.ContactTech
9168	}
9169	if d.Privacy != nil {
9170		objectMap["privacy"] = d.Privacy
9171	}
9172	if d.AutoRenew != nil {
9173		objectMap["autoRenew"] = d.AutoRenew
9174	}
9175	if d.Consent != nil {
9176		objectMap["consent"] = d.Consent
9177	}
9178	if d.DNSType != "" {
9179		objectMap["dnsType"] = d.DNSType
9180	}
9181	if d.DNSZoneID != nil {
9182		objectMap["dnsZoneId"] = d.DNSZoneID
9183	}
9184	if d.TargetDNSType != "" {
9185		objectMap["targetDnsType"] = d.TargetDNSType
9186	}
9187	if d.AuthCode != nil {
9188		objectMap["authCode"] = d.AuthCode
9189	}
9190	return json.Marshal(objectMap)
9191}
9192
9193// DomainPurchaseConsent domain purchase consent object, representing acceptance of applicable legal
9194// agreements.
9195type DomainPurchaseConsent struct {
9196	// AgreementKeys - List of applicable legal agreement keys. This list can be retrieved using ListLegalAgreements API under <code>TopLevelDomain</code> resource.
9197	AgreementKeys *[]string `json:"agreementKeys,omitempty"`
9198	// AgreedBy - Client IP address.
9199	AgreedBy *string `json:"agreedBy,omitempty"`
9200	// AgreedAt - Timestamp when the agreements were accepted.
9201	AgreedAt *date.Time `json:"agreedAt,omitempty"`
9202}
9203
9204// DomainRecommendationSearchParameters domain recommendation search parameters.
9205type DomainRecommendationSearchParameters struct {
9206	// Keywords - Keywords to be used for generating domain recommendations.
9207	Keywords *string `json:"keywords,omitempty"`
9208	// MaxDomainRecommendations - Maximum number of recommendations.
9209	MaxDomainRecommendations *int32 `json:"maxDomainRecommendations,omitempty"`
9210}
9211
9212// DomainsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
9213// operation.
9214type DomainsCreateOrUpdateFuture struct {
9215	azure.FutureAPI
9216	// Result returns the result of the asynchronous operation.
9217	// If the operation has not completed it will return an error.
9218	Result func(DomainsClient) (Domain, error)
9219}
9220
9221// UnmarshalJSON is the custom unmarshaller for CreateFuture.
9222func (future *DomainsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
9223	var azFuture azure.Future
9224	if err := json.Unmarshal(body, &azFuture); err != nil {
9225		return err
9226	}
9227	future.FutureAPI = &azFuture
9228	future.Result = future.result
9229	return nil
9230}
9231
9232// result is the default implementation for DomainsCreateOrUpdateFuture.Result.
9233func (future *DomainsCreateOrUpdateFuture) result(client DomainsClient) (d Domain, err error) {
9234	var done bool
9235	done, err = future.DoneWithContext(context.Background(), client)
9236	if err != nil {
9237		err = autorest.NewErrorWithError(err, "web.DomainsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
9238		return
9239	}
9240	if !done {
9241		d.Response.Response = future.Response()
9242		err = azure.NewAsyncOpIncompleteError("web.DomainsCreateOrUpdateFuture")
9243		return
9244	}
9245	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
9246	if d.Response.Response, err = future.GetResult(sender); err == nil && d.Response.Response.StatusCode != http.StatusNoContent {
9247		d, err = client.CreateOrUpdateResponder(d.Response.Response)
9248		if err != nil {
9249			err = autorest.NewErrorWithError(err, "web.DomainsCreateOrUpdateFuture", "Result", d.Response.Response, "Failure responding to request")
9250		}
9251	}
9252	return
9253}
9254
9255// EnabledConfig enabled configuration.
9256type EnabledConfig struct {
9257	// Enabled - True if configuration is enabled, false if it is disabled and null if configuration is not set.
9258	Enabled *bool `json:"enabled,omitempty"`
9259}
9260
9261// ErrorEntity body of the error response returned from the API.
9262type ErrorEntity struct {
9263	// ExtendedCode - Type of error.
9264	ExtendedCode *string `json:"extendedCode,omitempty"`
9265	// MessageTemplate - Message template.
9266	MessageTemplate *string `json:"messageTemplate,omitempty"`
9267	// Parameters - Parameters for the template.
9268	Parameters *[]string `json:"parameters,omitempty"`
9269	// InnerErrors - Inner errors.
9270	InnerErrors *[]ErrorEntity `json:"innerErrors,omitempty"`
9271	// Code - Basic error code.
9272	Code *string `json:"code,omitempty"`
9273	// Message - Any details of the error.
9274	Message *string `json:"message,omitempty"`
9275}
9276
9277// ErrorResponse error Response.
9278type ErrorResponse struct {
9279	// Code - Error code.
9280	Code *string `json:"code,omitempty"`
9281	// Message - Error message indicating why the operation failed.
9282	Message *string `json:"message,omitempty"`
9283}
9284
9285// Experiments routing rules in production experiments.
9286type Experiments struct {
9287	// RampUpRules - List of ramp-up rules.
9288	RampUpRules *[]RampUpRule `json:"rampUpRules,omitempty"`
9289}
9290
9291// FileSystemApplicationLogsConfig application logs to file system configuration.
9292type FileSystemApplicationLogsConfig struct {
9293	// Level - Log level. Possible values include: 'Off', 'Verbose', 'Information', 'Warning', 'Error'
9294	Level LogLevel `json:"level,omitempty"`
9295}
9296
9297// FileSystemHTTPLogsConfig http logs to file system configuration.
9298type FileSystemHTTPLogsConfig struct {
9299	// RetentionInMb - Maximum size in megabytes that http log files can use.
9300	// When reached old log files will be removed to make space for new ones.
9301	// Value can range between 25 and 100.
9302	RetentionInMb *int32 `json:"retentionInMb,omitempty"`
9303	// RetentionInDays - Retention in days.
9304	// Remove files older than X days.
9305	// 0 or lower means no retention.
9306	RetentionInDays *int32 `json:"retentionInDays,omitempty"`
9307	// Enabled - True if configuration is enabled, false if it is disabled and null if configuration is not set.
9308	Enabled *bool `json:"enabled,omitempty"`
9309}
9310
9311// FunctionEnvelope web Job Information.
9312type FunctionEnvelope struct {
9313	autorest.Response `json:"-"`
9314	// FunctionEnvelopeProperties - FunctionEnvelope resource specific properties
9315	*FunctionEnvelopeProperties `json:"properties,omitempty"`
9316	// ID - READ-ONLY; Resource Id.
9317	ID *string `json:"id,omitempty"`
9318	// Name - READ-ONLY; Resource Name.
9319	Name *string `json:"name,omitempty"`
9320	// Kind - Kind of resource.
9321	Kind *string `json:"kind,omitempty"`
9322	// Type - READ-ONLY; Resource type.
9323	Type *string `json:"type,omitempty"`
9324}
9325
9326// MarshalJSON is the custom marshaler for FunctionEnvelope.
9327func (fe FunctionEnvelope) MarshalJSON() ([]byte, error) {
9328	objectMap := make(map[string]interface{})
9329	if fe.FunctionEnvelopeProperties != nil {
9330		objectMap["properties"] = fe.FunctionEnvelopeProperties
9331	}
9332	if fe.Kind != nil {
9333		objectMap["kind"] = fe.Kind
9334	}
9335	return json.Marshal(objectMap)
9336}
9337
9338// UnmarshalJSON is the custom unmarshaler for FunctionEnvelope struct.
9339func (fe *FunctionEnvelope) UnmarshalJSON(body []byte) error {
9340	var m map[string]*json.RawMessage
9341	err := json.Unmarshal(body, &m)
9342	if err != nil {
9343		return err
9344	}
9345	for k, v := range m {
9346		switch k {
9347		case "properties":
9348			if v != nil {
9349				var functionEnvelopeProperties FunctionEnvelopeProperties
9350				err = json.Unmarshal(*v, &functionEnvelopeProperties)
9351				if err != nil {
9352					return err
9353				}
9354				fe.FunctionEnvelopeProperties = &functionEnvelopeProperties
9355			}
9356		case "id":
9357			if v != nil {
9358				var ID string
9359				err = json.Unmarshal(*v, &ID)
9360				if err != nil {
9361					return err
9362				}
9363				fe.ID = &ID
9364			}
9365		case "name":
9366			if v != nil {
9367				var name string
9368				err = json.Unmarshal(*v, &name)
9369				if err != nil {
9370					return err
9371				}
9372				fe.Name = &name
9373			}
9374		case "kind":
9375			if v != nil {
9376				var kind string
9377				err = json.Unmarshal(*v, &kind)
9378				if err != nil {
9379					return err
9380				}
9381				fe.Kind = &kind
9382			}
9383		case "type":
9384			if v != nil {
9385				var typeVar string
9386				err = json.Unmarshal(*v, &typeVar)
9387				if err != nil {
9388					return err
9389				}
9390				fe.Type = &typeVar
9391			}
9392		}
9393	}
9394
9395	return nil
9396}
9397
9398// FunctionEnvelopeCollection collection of Kudu function information elements.
9399type FunctionEnvelopeCollection struct {
9400	autorest.Response `json:"-"`
9401	// Value - Collection of resources.
9402	Value *[]FunctionEnvelope `json:"value,omitempty"`
9403	// NextLink - READ-ONLY; Link to next page of resources.
9404	NextLink *string `json:"nextLink,omitempty"`
9405}
9406
9407// MarshalJSON is the custom marshaler for FunctionEnvelopeCollection.
9408func (fec FunctionEnvelopeCollection) MarshalJSON() ([]byte, error) {
9409	objectMap := make(map[string]interface{})
9410	if fec.Value != nil {
9411		objectMap["value"] = fec.Value
9412	}
9413	return json.Marshal(objectMap)
9414}
9415
9416// FunctionEnvelopeCollectionIterator provides access to a complete listing of FunctionEnvelope values.
9417type FunctionEnvelopeCollectionIterator struct {
9418	i    int
9419	page FunctionEnvelopeCollectionPage
9420}
9421
9422// NextWithContext advances to the next value.  If there was an error making
9423// the request the iterator does not advance and the error is returned.
9424func (iter *FunctionEnvelopeCollectionIterator) NextWithContext(ctx context.Context) (err error) {
9425	if tracing.IsEnabled() {
9426		ctx = tracing.StartSpan(ctx, fqdn+"/FunctionEnvelopeCollectionIterator.NextWithContext")
9427		defer func() {
9428			sc := -1
9429			if iter.Response().Response.Response != nil {
9430				sc = iter.Response().Response.Response.StatusCode
9431			}
9432			tracing.EndSpan(ctx, sc, err)
9433		}()
9434	}
9435	iter.i++
9436	if iter.i < len(iter.page.Values()) {
9437		return nil
9438	}
9439	err = iter.page.NextWithContext(ctx)
9440	if err != nil {
9441		iter.i--
9442		return err
9443	}
9444	iter.i = 0
9445	return nil
9446}
9447
9448// Next advances to the next value.  If there was an error making
9449// the request the iterator does not advance and the error is returned.
9450// Deprecated: Use NextWithContext() instead.
9451func (iter *FunctionEnvelopeCollectionIterator) Next() error {
9452	return iter.NextWithContext(context.Background())
9453}
9454
9455// NotDone returns true if the enumeration should be started or is not yet complete.
9456func (iter FunctionEnvelopeCollectionIterator) NotDone() bool {
9457	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9458}
9459
9460// Response returns the raw server response from the last page request.
9461func (iter FunctionEnvelopeCollectionIterator) Response() FunctionEnvelopeCollection {
9462	return iter.page.Response()
9463}
9464
9465// Value returns the current value or a zero-initialized value if the
9466// iterator has advanced beyond the end of the collection.
9467func (iter FunctionEnvelopeCollectionIterator) Value() FunctionEnvelope {
9468	if !iter.page.NotDone() {
9469		return FunctionEnvelope{}
9470	}
9471	return iter.page.Values()[iter.i]
9472}
9473
9474// Creates a new instance of the FunctionEnvelopeCollectionIterator type.
9475func NewFunctionEnvelopeCollectionIterator(page FunctionEnvelopeCollectionPage) FunctionEnvelopeCollectionIterator {
9476	return FunctionEnvelopeCollectionIterator{page: page}
9477}
9478
9479// IsEmpty returns true if the ListResult contains no values.
9480func (fec FunctionEnvelopeCollection) IsEmpty() bool {
9481	return fec.Value == nil || len(*fec.Value) == 0
9482}
9483
9484// hasNextLink returns true if the NextLink is not empty.
9485func (fec FunctionEnvelopeCollection) hasNextLink() bool {
9486	return fec.NextLink != nil && len(*fec.NextLink) != 0
9487}
9488
9489// functionEnvelopeCollectionPreparer prepares a request to retrieve the next set of results.
9490// It returns nil if no more results exist.
9491func (fec FunctionEnvelopeCollection) functionEnvelopeCollectionPreparer(ctx context.Context) (*http.Request, error) {
9492	if !fec.hasNextLink() {
9493		return nil, nil
9494	}
9495	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9496		autorest.AsJSON(),
9497		autorest.AsGet(),
9498		autorest.WithBaseURL(to.String(fec.NextLink)))
9499}
9500
9501// FunctionEnvelopeCollectionPage contains a page of FunctionEnvelope values.
9502type FunctionEnvelopeCollectionPage struct {
9503	fn  func(context.Context, FunctionEnvelopeCollection) (FunctionEnvelopeCollection, error)
9504	fec FunctionEnvelopeCollection
9505}
9506
9507// NextWithContext advances to the next page of values.  If there was an error making
9508// the request the page does not advance and the error is returned.
9509func (page *FunctionEnvelopeCollectionPage) NextWithContext(ctx context.Context) (err error) {
9510	if tracing.IsEnabled() {
9511		ctx = tracing.StartSpan(ctx, fqdn+"/FunctionEnvelopeCollectionPage.NextWithContext")
9512		defer func() {
9513			sc := -1
9514			if page.Response().Response.Response != nil {
9515				sc = page.Response().Response.Response.StatusCode
9516			}
9517			tracing.EndSpan(ctx, sc, err)
9518		}()
9519	}
9520	for {
9521		next, err := page.fn(ctx, page.fec)
9522		if err != nil {
9523			return err
9524		}
9525		page.fec = next
9526		if !next.hasNextLink() || !next.IsEmpty() {
9527			break
9528		}
9529	}
9530	return nil
9531}
9532
9533// Next advances to the next page of values.  If there was an error making
9534// the request the page does not advance and the error is returned.
9535// Deprecated: Use NextWithContext() instead.
9536func (page *FunctionEnvelopeCollectionPage) Next() error {
9537	return page.NextWithContext(context.Background())
9538}
9539
9540// NotDone returns true if the page enumeration should be started or is not yet complete.
9541func (page FunctionEnvelopeCollectionPage) NotDone() bool {
9542	return !page.fec.IsEmpty()
9543}
9544
9545// Response returns the raw server response from the last page request.
9546func (page FunctionEnvelopeCollectionPage) Response() FunctionEnvelopeCollection {
9547	return page.fec
9548}
9549
9550// Values returns the slice of values for the current page or nil if there are no values.
9551func (page FunctionEnvelopeCollectionPage) Values() []FunctionEnvelope {
9552	if page.fec.IsEmpty() {
9553		return nil
9554	}
9555	return *page.fec.Value
9556}
9557
9558// Creates a new instance of the FunctionEnvelopeCollectionPage type.
9559func NewFunctionEnvelopeCollectionPage(cur FunctionEnvelopeCollection, getNextPage func(context.Context, FunctionEnvelopeCollection) (FunctionEnvelopeCollection, error)) FunctionEnvelopeCollectionPage {
9560	return FunctionEnvelopeCollectionPage{
9561		fn:  getNextPage,
9562		fec: cur,
9563	}
9564}
9565
9566// FunctionEnvelopeProperties functionEnvelope resource specific properties
9567type FunctionEnvelopeProperties struct {
9568	// Name - READ-ONLY; Function name.
9569	Name *string `json:"name,omitempty"`
9570	// FunctionAppID - READ-ONLY; Function App ID.
9571	FunctionAppID *string `json:"functionAppId,omitempty"`
9572	// ScriptRootPathHref - Script root path URI.
9573	ScriptRootPathHref *string `json:"scriptRootPathHref,omitempty"`
9574	// ScriptHref - Script URI.
9575	ScriptHref *string `json:"scriptHref,omitempty"`
9576	// ConfigHref - Config URI.
9577	ConfigHref *string `json:"configHref,omitempty"`
9578	// SecretsFileHref - Secrets file URI.
9579	SecretsFileHref *string `json:"secretsFileHref,omitempty"`
9580	// Href - Function URI.
9581	Href *string `json:"href,omitempty"`
9582	// Config - Config information.
9583	Config interface{} `json:"config,omitempty"`
9584	// Files - File list.
9585	Files map[string]*string `json:"files"`
9586	// TestData - Test data used when testing via the Azure Portal.
9587	TestData *string `json:"testData,omitempty"`
9588}
9589
9590// MarshalJSON is the custom marshaler for FunctionEnvelopeProperties.
9591func (fe FunctionEnvelopeProperties) MarshalJSON() ([]byte, error) {
9592	objectMap := make(map[string]interface{})
9593	if fe.ScriptRootPathHref != nil {
9594		objectMap["scriptRootPathHref"] = fe.ScriptRootPathHref
9595	}
9596	if fe.ScriptHref != nil {
9597		objectMap["scriptHref"] = fe.ScriptHref
9598	}
9599	if fe.ConfigHref != nil {
9600		objectMap["configHref"] = fe.ConfigHref
9601	}
9602	if fe.SecretsFileHref != nil {
9603		objectMap["secretsFileHref"] = fe.SecretsFileHref
9604	}
9605	if fe.Href != nil {
9606		objectMap["href"] = fe.Href
9607	}
9608	if fe.Config != nil {
9609		objectMap["config"] = fe.Config
9610	}
9611	if fe.Files != nil {
9612		objectMap["files"] = fe.Files
9613	}
9614	if fe.TestData != nil {
9615		objectMap["testData"] = fe.TestData
9616	}
9617	return json.Marshal(objectMap)
9618}
9619
9620// FunctionSecrets function secrets.
9621type FunctionSecrets struct {
9622	autorest.Response `json:"-"`
9623	// FunctionSecretsProperties - FunctionSecrets resource specific properties
9624	*FunctionSecretsProperties `json:"properties,omitempty"`
9625	// ID - READ-ONLY; Resource Id.
9626	ID *string `json:"id,omitempty"`
9627	// Name - READ-ONLY; Resource Name.
9628	Name *string `json:"name,omitempty"`
9629	// Kind - Kind of resource.
9630	Kind *string `json:"kind,omitempty"`
9631	// Type - READ-ONLY; Resource type.
9632	Type *string `json:"type,omitempty"`
9633}
9634
9635// MarshalJSON is the custom marshaler for FunctionSecrets.
9636func (fs FunctionSecrets) MarshalJSON() ([]byte, error) {
9637	objectMap := make(map[string]interface{})
9638	if fs.FunctionSecretsProperties != nil {
9639		objectMap["properties"] = fs.FunctionSecretsProperties
9640	}
9641	if fs.Kind != nil {
9642		objectMap["kind"] = fs.Kind
9643	}
9644	return json.Marshal(objectMap)
9645}
9646
9647// UnmarshalJSON is the custom unmarshaler for FunctionSecrets struct.
9648func (fs *FunctionSecrets) UnmarshalJSON(body []byte) error {
9649	var m map[string]*json.RawMessage
9650	err := json.Unmarshal(body, &m)
9651	if err != nil {
9652		return err
9653	}
9654	for k, v := range m {
9655		switch k {
9656		case "properties":
9657			if v != nil {
9658				var functionSecretsProperties FunctionSecretsProperties
9659				err = json.Unmarshal(*v, &functionSecretsProperties)
9660				if err != nil {
9661					return err
9662				}
9663				fs.FunctionSecretsProperties = &functionSecretsProperties
9664			}
9665		case "id":
9666			if v != nil {
9667				var ID string
9668				err = json.Unmarshal(*v, &ID)
9669				if err != nil {
9670					return err
9671				}
9672				fs.ID = &ID
9673			}
9674		case "name":
9675			if v != nil {
9676				var name string
9677				err = json.Unmarshal(*v, &name)
9678				if err != nil {
9679					return err
9680				}
9681				fs.Name = &name
9682			}
9683		case "kind":
9684			if v != nil {
9685				var kind string
9686				err = json.Unmarshal(*v, &kind)
9687				if err != nil {
9688					return err
9689				}
9690				fs.Kind = &kind
9691			}
9692		case "type":
9693			if v != nil {
9694				var typeVar string
9695				err = json.Unmarshal(*v, &typeVar)
9696				if err != nil {
9697					return err
9698				}
9699				fs.Type = &typeVar
9700			}
9701		}
9702	}
9703
9704	return nil
9705}
9706
9707// FunctionSecretsProperties functionSecrets resource specific properties
9708type FunctionSecretsProperties struct {
9709	// Key - Secret key.
9710	Key *string `json:"key,omitempty"`
9711	// TriggerURL - Trigger URL.
9712	TriggerURL *string `json:"triggerUrl,omitempty"`
9713}
9714
9715// GeoRegion geographical region.
9716type GeoRegion struct {
9717	// GeoRegionProperties - GeoRegion resource specific properties
9718	*GeoRegionProperties `json:"properties,omitempty"`
9719	// ID - READ-ONLY; Resource Id.
9720	ID *string `json:"id,omitempty"`
9721	// Name - READ-ONLY; Resource Name.
9722	Name *string `json:"name,omitempty"`
9723	// Kind - Kind of resource.
9724	Kind *string `json:"kind,omitempty"`
9725	// Type - READ-ONLY; Resource type.
9726	Type *string `json:"type,omitempty"`
9727}
9728
9729// MarshalJSON is the custom marshaler for GeoRegion.
9730func (gr GeoRegion) MarshalJSON() ([]byte, error) {
9731	objectMap := make(map[string]interface{})
9732	if gr.GeoRegionProperties != nil {
9733		objectMap["properties"] = gr.GeoRegionProperties
9734	}
9735	if gr.Kind != nil {
9736		objectMap["kind"] = gr.Kind
9737	}
9738	return json.Marshal(objectMap)
9739}
9740
9741// UnmarshalJSON is the custom unmarshaler for GeoRegion struct.
9742func (gr *GeoRegion) UnmarshalJSON(body []byte) error {
9743	var m map[string]*json.RawMessage
9744	err := json.Unmarshal(body, &m)
9745	if err != nil {
9746		return err
9747	}
9748	for k, v := range m {
9749		switch k {
9750		case "properties":
9751			if v != nil {
9752				var geoRegionProperties GeoRegionProperties
9753				err = json.Unmarshal(*v, &geoRegionProperties)
9754				if err != nil {
9755					return err
9756				}
9757				gr.GeoRegionProperties = &geoRegionProperties
9758			}
9759		case "id":
9760			if v != nil {
9761				var ID string
9762				err = json.Unmarshal(*v, &ID)
9763				if err != nil {
9764					return err
9765				}
9766				gr.ID = &ID
9767			}
9768		case "name":
9769			if v != nil {
9770				var name string
9771				err = json.Unmarshal(*v, &name)
9772				if err != nil {
9773					return err
9774				}
9775				gr.Name = &name
9776			}
9777		case "kind":
9778			if v != nil {
9779				var kind string
9780				err = json.Unmarshal(*v, &kind)
9781				if err != nil {
9782					return err
9783				}
9784				gr.Kind = &kind
9785			}
9786		case "type":
9787			if v != nil {
9788				var typeVar string
9789				err = json.Unmarshal(*v, &typeVar)
9790				if err != nil {
9791					return err
9792				}
9793				gr.Type = &typeVar
9794			}
9795		}
9796	}
9797
9798	return nil
9799}
9800
9801// GeoRegionCollection collection of geographical regions.
9802type GeoRegionCollection struct {
9803	autorest.Response `json:"-"`
9804	// Value - Collection of resources.
9805	Value *[]GeoRegion `json:"value,omitempty"`
9806	// NextLink - READ-ONLY; Link to next page of resources.
9807	NextLink *string `json:"nextLink,omitempty"`
9808}
9809
9810// MarshalJSON is the custom marshaler for GeoRegionCollection.
9811func (grc GeoRegionCollection) MarshalJSON() ([]byte, error) {
9812	objectMap := make(map[string]interface{})
9813	if grc.Value != nil {
9814		objectMap["value"] = grc.Value
9815	}
9816	return json.Marshal(objectMap)
9817}
9818
9819// GeoRegionCollectionIterator provides access to a complete listing of GeoRegion values.
9820type GeoRegionCollectionIterator struct {
9821	i    int
9822	page GeoRegionCollectionPage
9823}
9824
9825// NextWithContext advances to the next value.  If there was an error making
9826// the request the iterator does not advance and the error is returned.
9827func (iter *GeoRegionCollectionIterator) NextWithContext(ctx context.Context) (err error) {
9828	if tracing.IsEnabled() {
9829		ctx = tracing.StartSpan(ctx, fqdn+"/GeoRegionCollectionIterator.NextWithContext")
9830		defer func() {
9831			sc := -1
9832			if iter.Response().Response.Response != nil {
9833				sc = iter.Response().Response.Response.StatusCode
9834			}
9835			tracing.EndSpan(ctx, sc, err)
9836		}()
9837	}
9838	iter.i++
9839	if iter.i < len(iter.page.Values()) {
9840		return nil
9841	}
9842	err = iter.page.NextWithContext(ctx)
9843	if err != nil {
9844		iter.i--
9845		return err
9846	}
9847	iter.i = 0
9848	return nil
9849}
9850
9851// Next advances to the next value.  If there was an error making
9852// the request the iterator does not advance and the error is returned.
9853// Deprecated: Use NextWithContext() instead.
9854func (iter *GeoRegionCollectionIterator) Next() error {
9855	return iter.NextWithContext(context.Background())
9856}
9857
9858// NotDone returns true if the enumeration should be started or is not yet complete.
9859func (iter GeoRegionCollectionIterator) NotDone() bool {
9860	return iter.page.NotDone() && iter.i < len(iter.page.Values())
9861}
9862
9863// Response returns the raw server response from the last page request.
9864func (iter GeoRegionCollectionIterator) Response() GeoRegionCollection {
9865	return iter.page.Response()
9866}
9867
9868// Value returns the current value or a zero-initialized value if the
9869// iterator has advanced beyond the end of the collection.
9870func (iter GeoRegionCollectionIterator) Value() GeoRegion {
9871	if !iter.page.NotDone() {
9872		return GeoRegion{}
9873	}
9874	return iter.page.Values()[iter.i]
9875}
9876
9877// Creates a new instance of the GeoRegionCollectionIterator type.
9878func NewGeoRegionCollectionIterator(page GeoRegionCollectionPage) GeoRegionCollectionIterator {
9879	return GeoRegionCollectionIterator{page: page}
9880}
9881
9882// IsEmpty returns true if the ListResult contains no values.
9883func (grc GeoRegionCollection) IsEmpty() bool {
9884	return grc.Value == nil || len(*grc.Value) == 0
9885}
9886
9887// hasNextLink returns true if the NextLink is not empty.
9888func (grc GeoRegionCollection) hasNextLink() bool {
9889	return grc.NextLink != nil && len(*grc.NextLink) != 0
9890}
9891
9892// geoRegionCollectionPreparer prepares a request to retrieve the next set of results.
9893// It returns nil if no more results exist.
9894func (grc GeoRegionCollection) geoRegionCollectionPreparer(ctx context.Context) (*http.Request, error) {
9895	if !grc.hasNextLink() {
9896		return nil, nil
9897	}
9898	return autorest.Prepare((&http.Request{}).WithContext(ctx),
9899		autorest.AsJSON(),
9900		autorest.AsGet(),
9901		autorest.WithBaseURL(to.String(grc.NextLink)))
9902}
9903
9904// GeoRegionCollectionPage contains a page of GeoRegion values.
9905type GeoRegionCollectionPage struct {
9906	fn  func(context.Context, GeoRegionCollection) (GeoRegionCollection, error)
9907	grc GeoRegionCollection
9908}
9909
9910// NextWithContext advances to the next page of values.  If there was an error making
9911// the request the page does not advance and the error is returned.
9912func (page *GeoRegionCollectionPage) NextWithContext(ctx context.Context) (err error) {
9913	if tracing.IsEnabled() {
9914		ctx = tracing.StartSpan(ctx, fqdn+"/GeoRegionCollectionPage.NextWithContext")
9915		defer func() {
9916			sc := -1
9917			if page.Response().Response.Response != nil {
9918				sc = page.Response().Response.Response.StatusCode
9919			}
9920			tracing.EndSpan(ctx, sc, err)
9921		}()
9922	}
9923	for {
9924		next, err := page.fn(ctx, page.grc)
9925		if err != nil {
9926			return err
9927		}
9928		page.grc = next
9929		if !next.hasNextLink() || !next.IsEmpty() {
9930			break
9931		}
9932	}
9933	return nil
9934}
9935
9936// Next advances to the next page of values.  If there was an error making
9937// the request the page does not advance and the error is returned.
9938// Deprecated: Use NextWithContext() instead.
9939func (page *GeoRegionCollectionPage) Next() error {
9940	return page.NextWithContext(context.Background())
9941}
9942
9943// NotDone returns true if the page enumeration should be started or is not yet complete.
9944func (page GeoRegionCollectionPage) NotDone() bool {
9945	return !page.grc.IsEmpty()
9946}
9947
9948// Response returns the raw server response from the last page request.
9949func (page GeoRegionCollectionPage) Response() GeoRegionCollection {
9950	return page.grc
9951}
9952
9953// Values returns the slice of values for the current page or nil if there are no values.
9954func (page GeoRegionCollectionPage) Values() []GeoRegion {
9955	if page.grc.IsEmpty() {
9956		return nil
9957	}
9958	return *page.grc.Value
9959}
9960
9961// Creates a new instance of the GeoRegionCollectionPage type.
9962func NewGeoRegionCollectionPage(cur GeoRegionCollection, getNextPage func(context.Context, GeoRegionCollection) (GeoRegionCollection, error)) GeoRegionCollectionPage {
9963	return GeoRegionCollectionPage{
9964		fn:  getNextPage,
9965		grc: cur,
9966	}
9967}
9968
9969// GeoRegionProperties geoRegion resource specific properties
9970type GeoRegionProperties struct {
9971	// Name - READ-ONLY; Region name.
9972	Name *string `json:"name,omitempty"`
9973	// Description - READ-ONLY; Region description.
9974	Description *string `json:"description,omitempty"`
9975	// DisplayName - READ-ONLY; Display name for region.
9976	DisplayName *string `json:"displayName,omitempty"`
9977}
9978
9979// MarshalJSON is the custom marshaler for GeoRegionProperties.
9980func (gr GeoRegionProperties) MarshalJSON() ([]byte, error) {
9981	objectMap := make(map[string]interface{})
9982	return json.Marshal(objectMap)
9983}
9984
9985// GlobalCsmSkuDescription a Global SKU Description.
9986type GlobalCsmSkuDescription struct {
9987	// Name - Name of the resource SKU.
9988	Name *string `json:"name,omitempty"`
9989	// Tier - Service Tier of the resource SKU.
9990	Tier *string `json:"tier,omitempty"`
9991	// Size - Size specifier of the resource SKU.
9992	Size *string `json:"size,omitempty"`
9993	// Family - Family code of the resource SKU.
9994	Family *string `json:"family,omitempty"`
9995	// Capacity - Min, max, and default scale values of the SKU.
9996	Capacity *SkuCapacity `json:"capacity,omitempty"`
9997	// Locations - Locations of the SKU.
9998	Locations *[]string `json:"locations,omitempty"`
9999	// Capabilities - Capabilities of the SKU, e.g., is traffic manager enabled?
10000	Capabilities *[]Capability `json:"capabilities,omitempty"`
10001}
10002
10003// HandlerMapping the IIS handler mappings used to define which handler processes HTTP requests with
10004// certain extension.
10005// For example, it is used to configure php-cgi.exe process to handle all HTTP requests with *.php
10006// extension.
10007type HandlerMapping struct {
10008	// Extension - Requests with this extension will be handled using the specified FastCGI application.
10009	Extension *string `json:"extension,omitempty"`
10010	// ScriptProcessor - The absolute path to the FastCGI application.
10011	ScriptProcessor *string `json:"scriptProcessor,omitempty"`
10012	// Arguments - Command-line arguments to be passed to the script processor.
10013	Arguments *string `json:"arguments,omitempty"`
10014}
10015
10016// HostingEnvironmentDeploymentInfo information needed to create resources on an App Service Environment.
10017type HostingEnvironmentDeploymentInfo struct {
10018	// Name - Name of the App Service Environment.
10019	Name *string `json:"name,omitempty"`
10020	// Location - Location of the App Service Environment.
10021	Location *string `json:"location,omitempty"`
10022}
10023
10024// HostingEnvironmentDiagnostics diagnostics for an App Service Environment.
10025type HostingEnvironmentDiagnostics struct {
10026	autorest.Response `json:"-"`
10027	// Name - Name/identifier of the diagnostics.
10028	Name *string `json:"name,omitempty"`
10029	// DiagnosicsOutput - Diagnostics output.
10030	DiagnosicsOutput *string `json:"diagnosicsOutput,omitempty"`
10031}
10032
10033// HostingEnvironmentProfile specification for an App Service Environment to use for this resource.
10034type HostingEnvironmentProfile struct {
10035	// ID - Resource ID of the App Service Environment.
10036	ID *string `json:"id,omitempty"`
10037	// Name - READ-ONLY; Name of the App Service Environment.
10038	Name *string `json:"name,omitempty"`
10039	// Type - READ-ONLY; Resource type of the App Service Environment.
10040	Type *string `json:"type,omitempty"`
10041}
10042
10043// MarshalJSON is the custom marshaler for HostingEnvironmentProfile.
10044func (hep HostingEnvironmentProfile) MarshalJSON() ([]byte, error) {
10045	objectMap := make(map[string]interface{})
10046	if hep.ID != nil {
10047		objectMap["id"] = hep.ID
10048	}
10049	return json.Marshal(objectMap)
10050}
10051
10052// HostName details of a hostname derived from a domain.
10053type HostName struct {
10054	// Name - Name of the hostname.
10055	Name *string `json:"name,omitempty"`
10056	// SiteNames - List of apps the hostname is assigned to. This list will have more than one app only if the hostname is pointing to a Traffic Manager.
10057	SiteNames *[]string `json:"siteNames,omitempty"`
10058	// AzureResourceName - Name of the Azure resource the hostname is assigned to. If it is assigned to a Traffic Manager then it will be the Traffic Manager name otherwise it will be the app name.
10059	AzureResourceName *string `json:"azureResourceName,omitempty"`
10060	// AzureResourceType - Type of the Azure resource the hostname is assigned to. Possible values include: 'Website', 'TrafficManager'
10061	AzureResourceType AzureResourceType `json:"azureResourceType,omitempty"`
10062	// CustomHostNameDNSRecordType - Type of the DNS record. Possible values include: 'CName', 'A'
10063	CustomHostNameDNSRecordType CustomHostNameDNSRecordType `json:"customHostNameDnsRecordType,omitempty"`
10064	// HostNameType - Type of the hostname. Possible values include: 'Verified', 'Managed'
10065	HostNameType HostNameType `json:"hostNameType,omitempty"`
10066}
10067
10068// HostNameBinding a hostname binding object.
10069type HostNameBinding struct {
10070	autorest.Response `json:"-"`
10071	// HostNameBindingProperties - HostNameBinding resource specific properties
10072	*HostNameBindingProperties `json:"properties,omitempty"`
10073	// ID - READ-ONLY; Resource Id.
10074	ID *string `json:"id,omitempty"`
10075	// Name - READ-ONLY; Resource Name.
10076	Name *string `json:"name,omitempty"`
10077	// Kind - Kind of resource.
10078	Kind *string `json:"kind,omitempty"`
10079	// Type - READ-ONLY; Resource type.
10080	Type *string `json:"type,omitempty"`
10081}
10082
10083// MarshalJSON is the custom marshaler for HostNameBinding.
10084func (hnb HostNameBinding) MarshalJSON() ([]byte, error) {
10085	objectMap := make(map[string]interface{})
10086	if hnb.HostNameBindingProperties != nil {
10087		objectMap["properties"] = hnb.HostNameBindingProperties
10088	}
10089	if hnb.Kind != nil {
10090		objectMap["kind"] = hnb.Kind
10091	}
10092	return json.Marshal(objectMap)
10093}
10094
10095// UnmarshalJSON is the custom unmarshaler for HostNameBinding struct.
10096func (hnb *HostNameBinding) UnmarshalJSON(body []byte) error {
10097	var m map[string]*json.RawMessage
10098	err := json.Unmarshal(body, &m)
10099	if err != nil {
10100		return err
10101	}
10102	for k, v := range m {
10103		switch k {
10104		case "properties":
10105			if v != nil {
10106				var hostNameBindingProperties HostNameBindingProperties
10107				err = json.Unmarshal(*v, &hostNameBindingProperties)
10108				if err != nil {
10109					return err
10110				}
10111				hnb.HostNameBindingProperties = &hostNameBindingProperties
10112			}
10113		case "id":
10114			if v != nil {
10115				var ID string
10116				err = json.Unmarshal(*v, &ID)
10117				if err != nil {
10118					return err
10119				}
10120				hnb.ID = &ID
10121			}
10122		case "name":
10123			if v != nil {
10124				var name string
10125				err = json.Unmarshal(*v, &name)
10126				if err != nil {
10127					return err
10128				}
10129				hnb.Name = &name
10130			}
10131		case "kind":
10132			if v != nil {
10133				var kind string
10134				err = json.Unmarshal(*v, &kind)
10135				if err != nil {
10136					return err
10137				}
10138				hnb.Kind = &kind
10139			}
10140		case "type":
10141			if v != nil {
10142				var typeVar string
10143				err = json.Unmarshal(*v, &typeVar)
10144				if err != nil {
10145					return err
10146				}
10147				hnb.Type = &typeVar
10148			}
10149		}
10150	}
10151
10152	return nil
10153}
10154
10155// HostNameBindingCollection collection of hostname bindings.
10156type HostNameBindingCollection struct {
10157	autorest.Response `json:"-"`
10158	// Value - Collection of resources.
10159	Value *[]HostNameBinding `json:"value,omitempty"`
10160	// NextLink - READ-ONLY; Link to next page of resources.
10161	NextLink *string `json:"nextLink,omitempty"`
10162}
10163
10164// MarshalJSON is the custom marshaler for HostNameBindingCollection.
10165func (hnbc HostNameBindingCollection) MarshalJSON() ([]byte, error) {
10166	objectMap := make(map[string]interface{})
10167	if hnbc.Value != nil {
10168		objectMap["value"] = hnbc.Value
10169	}
10170	return json.Marshal(objectMap)
10171}
10172
10173// HostNameBindingCollectionIterator provides access to a complete listing of HostNameBinding values.
10174type HostNameBindingCollectionIterator struct {
10175	i    int
10176	page HostNameBindingCollectionPage
10177}
10178
10179// NextWithContext advances to the next value.  If there was an error making
10180// the request the iterator does not advance and the error is returned.
10181func (iter *HostNameBindingCollectionIterator) NextWithContext(ctx context.Context) (err error) {
10182	if tracing.IsEnabled() {
10183		ctx = tracing.StartSpan(ctx, fqdn+"/HostNameBindingCollectionIterator.NextWithContext")
10184		defer func() {
10185			sc := -1
10186			if iter.Response().Response.Response != nil {
10187				sc = iter.Response().Response.Response.StatusCode
10188			}
10189			tracing.EndSpan(ctx, sc, err)
10190		}()
10191	}
10192	iter.i++
10193	if iter.i < len(iter.page.Values()) {
10194		return nil
10195	}
10196	err = iter.page.NextWithContext(ctx)
10197	if err != nil {
10198		iter.i--
10199		return err
10200	}
10201	iter.i = 0
10202	return nil
10203}
10204
10205// Next advances to the next value.  If there was an error making
10206// the request the iterator does not advance and the error is returned.
10207// Deprecated: Use NextWithContext() instead.
10208func (iter *HostNameBindingCollectionIterator) Next() error {
10209	return iter.NextWithContext(context.Background())
10210}
10211
10212// NotDone returns true if the enumeration should be started or is not yet complete.
10213func (iter HostNameBindingCollectionIterator) NotDone() bool {
10214	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10215}
10216
10217// Response returns the raw server response from the last page request.
10218func (iter HostNameBindingCollectionIterator) Response() HostNameBindingCollection {
10219	return iter.page.Response()
10220}
10221
10222// Value returns the current value or a zero-initialized value if the
10223// iterator has advanced beyond the end of the collection.
10224func (iter HostNameBindingCollectionIterator) Value() HostNameBinding {
10225	if !iter.page.NotDone() {
10226		return HostNameBinding{}
10227	}
10228	return iter.page.Values()[iter.i]
10229}
10230
10231// Creates a new instance of the HostNameBindingCollectionIterator type.
10232func NewHostNameBindingCollectionIterator(page HostNameBindingCollectionPage) HostNameBindingCollectionIterator {
10233	return HostNameBindingCollectionIterator{page: page}
10234}
10235
10236// IsEmpty returns true if the ListResult contains no values.
10237func (hnbc HostNameBindingCollection) IsEmpty() bool {
10238	return hnbc.Value == nil || len(*hnbc.Value) == 0
10239}
10240
10241// hasNextLink returns true if the NextLink is not empty.
10242func (hnbc HostNameBindingCollection) hasNextLink() bool {
10243	return hnbc.NextLink != nil && len(*hnbc.NextLink) != 0
10244}
10245
10246// hostNameBindingCollectionPreparer prepares a request to retrieve the next set of results.
10247// It returns nil if no more results exist.
10248func (hnbc HostNameBindingCollection) hostNameBindingCollectionPreparer(ctx context.Context) (*http.Request, error) {
10249	if !hnbc.hasNextLink() {
10250		return nil, nil
10251	}
10252	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10253		autorest.AsJSON(),
10254		autorest.AsGet(),
10255		autorest.WithBaseURL(to.String(hnbc.NextLink)))
10256}
10257
10258// HostNameBindingCollectionPage contains a page of HostNameBinding values.
10259type HostNameBindingCollectionPage struct {
10260	fn   func(context.Context, HostNameBindingCollection) (HostNameBindingCollection, error)
10261	hnbc HostNameBindingCollection
10262}
10263
10264// NextWithContext advances to the next page of values.  If there was an error making
10265// the request the page does not advance and the error is returned.
10266func (page *HostNameBindingCollectionPage) NextWithContext(ctx context.Context) (err error) {
10267	if tracing.IsEnabled() {
10268		ctx = tracing.StartSpan(ctx, fqdn+"/HostNameBindingCollectionPage.NextWithContext")
10269		defer func() {
10270			sc := -1
10271			if page.Response().Response.Response != nil {
10272				sc = page.Response().Response.Response.StatusCode
10273			}
10274			tracing.EndSpan(ctx, sc, err)
10275		}()
10276	}
10277	for {
10278		next, err := page.fn(ctx, page.hnbc)
10279		if err != nil {
10280			return err
10281		}
10282		page.hnbc = next
10283		if !next.hasNextLink() || !next.IsEmpty() {
10284			break
10285		}
10286	}
10287	return nil
10288}
10289
10290// Next advances to the next page of values.  If there was an error making
10291// the request the page does not advance and the error is returned.
10292// Deprecated: Use NextWithContext() instead.
10293func (page *HostNameBindingCollectionPage) Next() error {
10294	return page.NextWithContext(context.Background())
10295}
10296
10297// NotDone returns true if the page enumeration should be started or is not yet complete.
10298func (page HostNameBindingCollectionPage) NotDone() bool {
10299	return !page.hnbc.IsEmpty()
10300}
10301
10302// Response returns the raw server response from the last page request.
10303func (page HostNameBindingCollectionPage) Response() HostNameBindingCollection {
10304	return page.hnbc
10305}
10306
10307// Values returns the slice of values for the current page or nil if there are no values.
10308func (page HostNameBindingCollectionPage) Values() []HostNameBinding {
10309	if page.hnbc.IsEmpty() {
10310		return nil
10311	}
10312	return *page.hnbc.Value
10313}
10314
10315// Creates a new instance of the HostNameBindingCollectionPage type.
10316func NewHostNameBindingCollectionPage(cur HostNameBindingCollection, getNextPage func(context.Context, HostNameBindingCollection) (HostNameBindingCollection, error)) HostNameBindingCollectionPage {
10317	return HostNameBindingCollectionPage{
10318		fn:   getNextPage,
10319		hnbc: cur,
10320	}
10321}
10322
10323// HostNameBindingProperties hostNameBinding resource specific properties
10324type HostNameBindingProperties struct {
10325	// SiteName - App Service app name.
10326	SiteName *string `json:"siteName,omitempty"`
10327	// DomainID - Fully qualified ARM domain resource URI.
10328	DomainID *string `json:"domainId,omitempty"`
10329	// AzureResourceName - Azure resource name.
10330	AzureResourceName *string `json:"azureResourceName,omitempty"`
10331	// AzureResourceType - Azure resource type. Possible values include: 'Website', 'TrafficManager'
10332	AzureResourceType AzureResourceType `json:"azureResourceType,omitempty"`
10333	// CustomHostNameDNSRecordType - Custom DNS record type. Possible values include: 'CName', 'A'
10334	CustomHostNameDNSRecordType CustomHostNameDNSRecordType `json:"customHostNameDnsRecordType,omitempty"`
10335	// HostNameType - Hostname type. Possible values include: 'Verified', 'Managed'
10336	HostNameType HostNameType `json:"hostNameType,omitempty"`
10337	// SslState - SSL type. Possible values include: 'Disabled', 'SniEnabled', 'IPBasedEnabled'
10338	SslState SslState `json:"sslState,omitempty"`
10339	// Thumbprint - SSL certificate thumbprint
10340	Thumbprint *string `json:"thumbprint,omitempty"`
10341	// VirtualIP - READ-ONLY; Virtual IP address assigned to the hostname if IP based SSL is enabled.
10342	VirtualIP *string `json:"virtualIP,omitempty"`
10343}
10344
10345// MarshalJSON is the custom marshaler for HostNameBindingProperties.
10346func (hnb HostNameBindingProperties) MarshalJSON() ([]byte, error) {
10347	objectMap := make(map[string]interface{})
10348	if hnb.SiteName != nil {
10349		objectMap["siteName"] = hnb.SiteName
10350	}
10351	if hnb.DomainID != nil {
10352		objectMap["domainId"] = hnb.DomainID
10353	}
10354	if hnb.AzureResourceName != nil {
10355		objectMap["azureResourceName"] = hnb.AzureResourceName
10356	}
10357	if hnb.AzureResourceType != "" {
10358		objectMap["azureResourceType"] = hnb.AzureResourceType
10359	}
10360	if hnb.CustomHostNameDNSRecordType != "" {
10361		objectMap["customHostNameDnsRecordType"] = hnb.CustomHostNameDNSRecordType
10362	}
10363	if hnb.HostNameType != "" {
10364		objectMap["hostNameType"] = hnb.HostNameType
10365	}
10366	if hnb.SslState != "" {
10367		objectMap["sslState"] = hnb.SslState
10368	}
10369	if hnb.Thumbprint != nil {
10370		objectMap["thumbprint"] = hnb.Thumbprint
10371	}
10372	return json.Marshal(objectMap)
10373}
10374
10375// HostNameSslState SSL-enabled hostname.
10376type HostNameSslState struct {
10377	// Name - Hostname.
10378	Name *string `json:"name,omitempty"`
10379	// SslState - SSL type. Possible values include: 'Disabled', 'SniEnabled', 'IPBasedEnabled'
10380	SslState SslState `json:"sslState,omitempty"`
10381	// VirtualIP - Virtual IP address assigned to the hostname if IP based SSL is enabled.
10382	VirtualIP *string `json:"virtualIP,omitempty"`
10383	// Thumbprint - SSL certificate thumbprint.
10384	Thumbprint *string `json:"thumbprint,omitempty"`
10385	// ToUpdate - Set to <code>true</code> to update existing hostname.
10386	ToUpdate *bool `json:"toUpdate,omitempty"`
10387	// HostType - Indicates whether the hostname is a standard or repository hostname. Possible values include: 'HostTypeStandard', 'HostTypeRepository'
10388	HostType HostType `json:"hostType,omitempty"`
10389}
10390
10391// HTTPLogsConfig http logs configuration.
10392type HTTPLogsConfig struct {
10393	// FileSystem - Http logs to file system configuration.
10394	FileSystem *FileSystemHTTPLogsConfig `json:"fileSystem,omitempty"`
10395	// AzureBlobStorage - Http logs to azure blob storage configuration.
10396	AzureBlobStorage *AzureBlobStorageHTTPLogsConfig `json:"azureBlobStorage,omitempty"`
10397}
10398
10399// HybridConnection hybrid Connection contract. This is used to configure a Hybrid Connection.
10400type HybridConnection struct {
10401	autorest.Response `json:"-"`
10402	// HybridConnectionProperties - HybridConnection resource specific properties
10403	*HybridConnectionProperties `json:"properties,omitempty"`
10404	// ID - READ-ONLY; Resource Id.
10405	ID *string `json:"id,omitempty"`
10406	// Name - READ-ONLY; Resource Name.
10407	Name *string `json:"name,omitempty"`
10408	// Kind - Kind of resource.
10409	Kind *string `json:"kind,omitempty"`
10410	// Type - READ-ONLY; Resource type.
10411	Type *string `json:"type,omitempty"`
10412}
10413
10414// MarshalJSON is the custom marshaler for HybridConnection.
10415func (hc HybridConnection) MarshalJSON() ([]byte, error) {
10416	objectMap := make(map[string]interface{})
10417	if hc.HybridConnectionProperties != nil {
10418		objectMap["properties"] = hc.HybridConnectionProperties
10419	}
10420	if hc.Kind != nil {
10421		objectMap["kind"] = hc.Kind
10422	}
10423	return json.Marshal(objectMap)
10424}
10425
10426// UnmarshalJSON is the custom unmarshaler for HybridConnection struct.
10427func (hc *HybridConnection) UnmarshalJSON(body []byte) error {
10428	var m map[string]*json.RawMessage
10429	err := json.Unmarshal(body, &m)
10430	if err != nil {
10431		return err
10432	}
10433	for k, v := range m {
10434		switch k {
10435		case "properties":
10436			if v != nil {
10437				var hybridConnectionProperties HybridConnectionProperties
10438				err = json.Unmarshal(*v, &hybridConnectionProperties)
10439				if err != nil {
10440					return err
10441				}
10442				hc.HybridConnectionProperties = &hybridConnectionProperties
10443			}
10444		case "id":
10445			if v != nil {
10446				var ID string
10447				err = json.Unmarshal(*v, &ID)
10448				if err != nil {
10449					return err
10450				}
10451				hc.ID = &ID
10452			}
10453		case "name":
10454			if v != nil {
10455				var name string
10456				err = json.Unmarshal(*v, &name)
10457				if err != nil {
10458					return err
10459				}
10460				hc.Name = &name
10461			}
10462		case "kind":
10463			if v != nil {
10464				var kind string
10465				err = json.Unmarshal(*v, &kind)
10466				if err != nil {
10467					return err
10468				}
10469				hc.Kind = &kind
10470			}
10471		case "type":
10472			if v != nil {
10473				var typeVar string
10474				err = json.Unmarshal(*v, &typeVar)
10475				if err != nil {
10476					return err
10477				}
10478				hc.Type = &typeVar
10479			}
10480		}
10481	}
10482
10483	return nil
10484}
10485
10486// HybridConnectionCollection collection of hostname bindings.
10487type HybridConnectionCollection struct {
10488	autorest.Response `json:"-"`
10489	// Value - Collection of resources.
10490	Value *[]HybridConnection `json:"value,omitempty"`
10491	// NextLink - READ-ONLY; Link to next page of resources.
10492	NextLink *string `json:"nextLink,omitempty"`
10493}
10494
10495// MarshalJSON is the custom marshaler for HybridConnectionCollection.
10496func (hcc HybridConnectionCollection) MarshalJSON() ([]byte, error) {
10497	objectMap := make(map[string]interface{})
10498	if hcc.Value != nil {
10499		objectMap["value"] = hcc.Value
10500	}
10501	return json.Marshal(objectMap)
10502}
10503
10504// HybridConnectionCollectionIterator provides access to a complete listing of HybridConnection values.
10505type HybridConnectionCollectionIterator struct {
10506	i    int
10507	page HybridConnectionCollectionPage
10508}
10509
10510// NextWithContext advances to the next value.  If there was an error making
10511// the request the iterator does not advance and the error is returned.
10512func (iter *HybridConnectionCollectionIterator) NextWithContext(ctx context.Context) (err error) {
10513	if tracing.IsEnabled() {
10514		ctx = tracing.StartSpan(ctx, fqdn+"/HybridConnectionCollectionIterator.NextWithContext")
10515		defer func() {
10516			sc := -1
10517			if iter.Response().Response.Response != nil {
10518				sc = iter.Response().Response.Response.StatusCode
10519			}
10520			tracing.EndSpan(ctx, sc, err)
10521		}()
10522	}
10523	iter.i++
10524	if iter.i < len(iter.page.Values()) {
10525		return nil
10526	}
10527	err = iter.page.NextWithContext(ctx)
10528	if err != nil {
10529		iter.i--
10530		return err
10531	}
10532	iter.i = 0
10533	return nil
10534}
10535
10536// Next advances to the next value.  If there was an error making
10537// the request the iterator does not advance and the error is returned.
10538// Deprecated: Use NextWithContext() instead.
10539func (iter *HybridConnectionCollectionIterator) Next() error {
10540	return iter.NextWithContext(context.Background())
10541}
10542
10543// NotDone returns true if the enumeration should be started or is not yet complete.
10544func (iter HybridConnectionCollectionIterator) NotDone() bool {
10545	return iter.page.NotDone() && iter.i < len(iter.page.Values())
10546}
10547
10548// Response returns the raw server response from the last page request.
10549func (iter HybridConnectionCollectionIterator) Response() HybridConnectionCollection {
10550	return iter.page.Response()
10551}
10552
10553// Value returns the current value or a zero-initialized value if the
10554// iterator has advanced beyond the end of the collection.
10555func (iter HybridConnectionCollectionIterator) Value() HybridConnection {
10556	if !iter.page.NotDone() {
10557		return HybridConnection{}
10558	}
10559	return iter.page.Values()[iter.i]
10560}
10561
10562// Creates a new instance of the HybridConnectionCollectionIterator type.
10563func NewHybridConnectionCollectionIterator(page HybridConnectionCollectionPage) HybridConnectionCollectionIterator {
10564	return HybridConnectionCollectionIterator{page: page}
10565}
10566
10567// IsEmpty returns true if the ListResult contains no values.
10568func (hcc HybridConnectionCollection) IsEmpty() bool {
10569	return hcc.Value == nil || len(*hcc.Value) == 0
10570}
10571
10572// hasNextLink returns true if the NextLink is not empty.
10573func (hcc HybridConnectionCollection) hasNextLink() bool {
10574	return hcc.NextLink != nil && len(*hcc.NextLink) != 0
10575}
10576
10577// hybridConnectionCollectionPreparer prepares a request to retrieve the next set of results.
10578// It returns nil if no more results exist.
10579func (hcc HybridConnectionCollection) hybridConnectionCollectionPreparer(ctx context.Context) (*http.Request, error) {
10580	if !hcc.hasNextLink() {
10581		return nil, nil
10582	}
10583	return autorest.Prepare((&http.Request{}).WithContext(ctx),
10584		autorest.AsJSON(),
10585		autorest.AsGet(),
10586		autorest.WithBaseURL(to.String(hcc.NextLink)))
10587}
10588
10589// HybridConnectionCollectionPage contains a page of HybridConnection values.
10590type HybridConnectionCollectionPage struct {
10591	fn  func(context.Context, HybridConnectionCollection) (HybridConnectionCollection, error)
10592	hcc HybridConnectionCollection
10593}
10594
10595// NextWithContext advances to the next page of values.  If there was an error making
10596// the request the page does not advance and the error is returned.
10597func (page *HybridConnectionCollectionPage) NextWithContext(ctx context.Context) (err error) {
10598	if tracing.IsEnabled() {
10599		ctx = tracing.StartSpan(ctx, fqdn+"/HybridConnectionCollectionPage.NextWithContext")
10600		defer func() {
10601			sc := -1
10602			if page.Response().Response.Response != nil {
10603				sc = page.Response().Response.Response.StatusCode
10604			}
10605			tracing.EndSpan(ctx, sc, err)
10606		}()
10607	}
10608	for {
10609		next, err := page.fn(ctx, page.hcc)
10610		if err != nil {
10611			return err
10612		}
10613		page.hcc = next
10614		if !next.hasNextLink() || !next.IsEmpty() {
10615			break
10616		}
10617	}
10618	return nil
10619}
10620
10621// Next advances to the next page of values.  If there was an error making
10622// the request the page does not advance and the error is returned.
10623// Deprecated: Use NextWithContext() instead.
10624func (page *HybridConnectionCollectionPage) Next() error {
10625	return page.NextWithContext(context.Background())
10626}
10627
10628// NotDone returns true if the page enumeration should be started or is not yet complete.
10629func (page HybridConnectionCollectionPage) NotDone() bool {
10630	return !page.hcc.IsEmpty()
10631}
10632
10633// Response returns the raw server response from the last page request.
10634func (page HybridConnectionCollectionPage) Response() HybridConnectionCollection {
10635	return page.hcc
10636}
10637
10638// Values returns the slice of values for the current page or nil if there are no values.
10639func (page HybridConnectionCollectionPage) Values() []HybridConnection {
10640	if page.hcc.IsEmpty() {
10641		return nil
10642	}
10643	return *page.hcc.Value
10644}
10645
10646// Creates a new instance of the HybridConnectionCollectionPage type.
10647func NewHybridConnectionCollectionPage(cur HybridConnectionCollection, getNextPage func(context.Context, HybridConnectionCollection) (HybridConnectionCollection, error)) HybridConnectionCollectionPage {
10648	return HybridConnectionCollectionPage{
10649		fn:  getNextPage,
10650		hcc: cur,
10651	}
10652}
10653
10654// HybridConnectionKey hybrid Connection key contract. This has the send key name and value for a Hybrid
10655// Connection.
10656type HybridConnectionKey struct {
10657	autorest.Response `json:"-"`
10658	// HybridConnectionKeyProperties - HybridConnectionKey resource specific properties
10659	*HybridConnectionKeyProperties `json:"properties,omitempty"`
10660	// ID - READ-ONLY; Resource Id.
10661	ID *string `json:"id,omitempty"`
10662	// Name - READ-ONLY; Resource Name.
10663	Name *string `json:"name,omitempty"`
10664	// Kind - Kind of resource.
10665	Kind *string `json:"kind,omitempty"`
10666	// Type - READ-ONLY; Resource type.
10667	Type *string `json:"type,omitempty"`
10668}
10669
10670// MarshalJSON is the custom marshaler for HybridConnectionKey.
10671func (hck HybridConnectionKey) MarshalJSON() ([]byte, error) {
10672	objectMap := make(map[string]interface{})
10673	if hck.HybridConnectionKeyProperties != nil {
10674		objectMap["properties"] = hck.HybridConnectionKeyProperties
10675	}
10676	if hck.Kind != nil {
10677		objectMap["kind"] = hck.Kind
10678	}
10679	return json.Marshal(objectMap)
10680}
10681
10682// UnmarshalJSON is the custom unmarshaler for HybridConnectionKey struct.
10683func (hck *HybridConnectionKey) UnmarshalJSON(body []byte) error {
10684	var m map[string]*json.RawMessage
10685	err := json.Unmarshal(body, &m)
10686	if err != nil {
10687		return err
10688	}
10689	for k, v := range m {
10690		switch k {
10691		case "properties":
10692			if v != nil {
10693				var hybridConnectionKeyProperties HybridConnectionKeyProperties
10694				err = json.Unmarshal(*v, &hybridConnectionKeyProperties)
10695				if err != nil {
10696					return err
10697				}
10698				hck.HybridConnectionKeyProperties = &hybridConnectionKeyProperties
10699			}
10700		case "id":
10701			if v != nil {
10702				var ID string
10703				err = json.Unmarshal(*v, &ID)
10704				if err != nil {
10705					return err
10706				}
10707				hck.ID = &ID
10708			}
10709		case "name":
10710			if v != nil {
10711				var name string
10712				err = json.Unmarshal(*v, &name)
10713				if err != nil {
10714					return err
10715				}
10716				hck.Name = &name
10717			}
10718		case "kind":
10719			if v != nil {
10720				var kind string
10721				err = json.Unmarshal(*v, &kind)
10722				if err != nil {
10723					return err
10724				}
10725				hck.Kind = &kind
10726			}
10727		case "type":
10728			if v != nil {
10729				var typeVar string
10730				err = json.Unmarshal(*v, &typeVar)
10731				if err != nil {
10732					return err
10733				}
10734				hck.Type = &typeVar
10735			}
10736		}
10737	}
10738
10739	return nil
10740}
10741
10742// HybridConnectionKeyProperties hybridConnectionKey resource specific properties
10743type HybridConnectionKeyProperties struct {
10744	// SendKeyName - READ-ONLY; The name of the send key.
10745	SendKeyName *string `json:"sendKeyName,omitempty"`
10746	// SendKeyValue - READ-ONLY; The value of the send key.
10747	SendKeyValue *string `json:"sendKeyValue,omitempty"`
10748}
10749
10750// MarshalJSON is the custom marshaler for HybridConnectionKeyProperties.
10751func (hck HybridConnectionKeyProperties) MarshalJSON() ([]byte, error) {
10752	objectMap := make(map[string]interface{})
10753	return json.Marshal(objectMap)
10754}
10755
10756// HybridConnectionLimits hybrid Connection limits contract. This is used to return the plan limits of
10757// Hybrid Connections.
10758type HybridConnectionLimits struct {
10759	autorest.Response `json:"-"`
10760	// HybridConnectionLimitsProperties - HybridConnectionLimits resource specific properties
10761	*HybridConnectionLimitsProperties `json:"properties,omitempty"`
10762	// ID - READ-ONLY; Resource Id.
10763	ID *string `json:"id,omitempty"`
10764	// Name - READ-ONLY; Resource Name.
10765	Name *string `json:"name,omitempty"`
10766	// Kind - Kind of resource.
10767	Kind *string `json:"kind,omitempty"`
10768	// Type - READ-ONLY; Resource type.
10769	Type *string `json:"type,omitempty"`
10770}
10771
10772// MarshalJSON is the custom marshaler for HybridConnectionLimits.
10773func (hcl HybridConnectionLimits) MarshalJSON() ([]byte, error) {
10774	objectMap := make(map[string]interface{})
10775	if hcl.HybridConnectionLimitsProperties != nil {
10776		objectMap["properties"] = hcl.HybridConnectionLimitsProperties
10777	}
10778	if hcl.Kind != nil {
10779		objectMap["kind"] = hcl.Kind
10780	}
10781	return json.Marshal(objectMap)
10782}
10783
10784// UnmarshalJSON is the custom unmarshaler for HybridConnectionLimits struct.
10785func (hcl *HybridConnectionLimits) UnmarshalJSON(body []byte) error {
10786	var m map[string]*json.RawMessage
10787	err := json.Unmarshal(body, &m)
10788	if err != nil {
10789		return err
10790	}
10791	for k, v := range m {
10792		switch k {
10793		case "properties":
10794			if v != nil {
10795				var hybridConnectionLimitsProperties HybridConnectionLimitsProperties
10796				err = json.Unmarshal(*v, &hybridConnectionLimitsProperties)
10797				if err != nil {
10798					return err
10799				}
10800				hcl.HybridConnectionLimitsProperties = &hybridConnectionLimitsProperties
10801			}
10802		case "id":
10803			if v != nil {
10804				var ID string
10805				err = json.Unmarshal(*v, &ID)
10806				if err != nil {
10807					return err
10808				}
10809				hcl.ID = &ID
10810			}
10811		case "name":
10812			if v != nil {
10813				var name string
10814				err = json.Unmarshal(*v, &name)
10815				if err != nil {
10816					return err
10817				}
10818				hcl.Name = &name
10819			}
10820		case "kind":
10821			if v != nil {
10822				var kind string
10823				err = json.Unmarshal(*v, &kind)
10824				if err != nil {
10825					return err
10826				}
10827				hcl.Kind = &kind
10828			}
10829		case "type":
10830			if v != nil {
10831				var typeVar string
10832				err = json.Unmarshal(*v, &typeVar)
10833				if err != nil {
10834					return err
10835				}
10836				hcl.Type = &typeVar
10837			}
10838		}
10839	}
10840
10841	return nil
10842}
10843
10844// HybridConnectionLimitsProperties hybridConnectionLimits resource specific properties
10845type HybridConnectionLimitsProperties struct {
10846	// Current - READ-ONLY; The current number of Hybrid Connections.
10847	Current *int32 `json:"current,omitempty"`
10848	// Maximum - READ-ONLY; The maximum number of Hybrid Connections allowed.
10849	Maximum *int32 `json:"maximum,omitempty"`
10850}
10851
10852// MarshalJSON is the custom marshaler for HybridConnectionLimitsProperties.
10853func (hcl HybridConnectionLimitsProperties) MarshalJSON() ([]byte, error) {
10854	objectMap := make(map[string]interface{})
10855	return json.Marshal(objectMap)
10856}
10857
10858// HybridConnectionProperties hybridConnection resource specific properties
10859type HybridConnectionProperties struct {
10860	// ServiceBusNamespace - The name of the Service Bus namespace.
10861	ServiceBusNamespace *string `json:"serviceBusNamespace,omitempty"`
10862	// RelayName - The name of the Service Bus relay.
10863	RelayName *string `json:"relayName,omitempty"`
10864	// RelayArmURI - The ARM URI to the Service Bus relay.
10865	RelayArmURI *string `json:"relayArmUri,omitempty"`
10866	// Hostname - The hostname of the endpoint.
10867	Hostname *string `json:"hostname,omitempty"`
10868	// Port - The port of the endpoint.
10869	Port *int32 `json:"port,omitempty"`
10870	// SendKeyName - The name of the Service Bus key which has Send permissions. This is used to authenticate to Service Bus.
10871	SendKeyName *string `json:"sendKeyName,omitempty"`
10872	// SendKeyValue - The value of the Service Bus key. This is used to authenticate to Service Bus. In ARM this key will not be returned
10873	// normally, use the POST /listKeys API instead.
10874	SendKeyValue *string `json:"sendKeyValue,omitempty"`
10875	// ServiceBusSuffix - The suffix for the service bus endpoint. By default this is .servicebus.windows.net
10876	ServiceBusSuffix *string `json:"serviceBusSuffix,omitempty"`
10877}
10878
10879// Identifier a domain specific resource identifier.
10880type Identifier struct {
10881	autorest.Response `json:"-"`
10882	// IdentifierProperties - Identifier resource specific properties
10883	*IdentifierProperties `json:"properties,omitempty"`
10884	// ID - READ-ONLY; Resource Id.
10885	ID *string `json:"id,omitempty"`
10886	// Name - READ-ONLY; Resource Name.
10887	Name *string `json:"name,omitempty"`
10888	// Kind - Kind of resource.
10889	Kind *string `json:"kind,omitempty"`
10890	// Type - READ-ONLY; Resource type.
10891	Type *string `json:"type,omitempty"`
10892}
10893
10894// MarshalJSON is the custom marshaler for Identifier.
10895func (i Identifier) MarshalJSON() ([]byte, error) {
10896	objectMap := make(map[string]interface{})
10897	if i.IdentifierProperties != nil {
10898		objectMap["properties"] = i.IdentifierProperties
10899	}
10900	if i.Kind != nil {
10901		objectMap["kind"] = i.Kind
10902	}
10903	return json.Marshal(objectMap)
10904}
10905
10906// UnmarshalJSON is the custom unmarshaler for Identifier struct.
10907func (i *Identifier) UnmarshalJSON(body []byte) error {
10908	var m map[string]*json.RawMessage
10909	err := json.Unmarshal(body, &m)
10910	if err != nil {
10911		return err
10912	}
10913	for k, v := range m {
10914		switch k {
10915		case "properties":
10916			if v != nil {
10917				var identifierProperties IdentifierProperties
10918				err = json.Unmarshal(*v, &identifierProperties)
10919				if err != nil {
10920					return err
10921				}
10922				i.IdentifierProperties = &identifierProperties
10923			}
10924		case "id":
10925			if v != nil {
10926				var ID string
10927				err = json.Unmarshal(*v, &ID)
10928				if err != nil {
10929					return err
10930				}
10931				i.ID = &ID
10932			}
10933		case "name":
10934			if v != nil {
10935				var name string
10936				err = json.Unmarshal(*v, &name)
10937				if err != nil {
10938					return err
10939				}
10940				i.Name = &name
10941			}
10942		case "kind":
10943			if v != nil {
10944				var kind string
10945				err = json.Unmarshal(*v, &kind)
10946				if err != nil {
10947					return err
10948				}
10949				i.Kind = &kind
10950			}
10951		case "type":
10952			if v != nil {
10953				var typeVar string
10954				err = json.Unmarshal(*v, &typeVar)
10955				if err != nil {
10956					return err
10957				}
10958				i.Type = &typeVar
10959			}
10960		}
10961	}
10962
10963	return nil
10964}
10965
10966// IdentifierCollection collection of identifiers.
10967type IdentifierCollection struct {
10968	autorest.Response `json:"-"`
10969	// Value - Collection of resources.
10970	Value *[]Identifier `json:"value,omitempty"`
10971	// NextLink - READ-ONLY; Link to next page of resources.
10972	NextLink *string `json:"nextLink,omitempty"`
10973}
10974
10975// MarshalJSON is the custom marshaler for IdentifierCollection.
10976func (ic IdentifierCollection) MarshalJSON() ([]byte, error) {
10977	objectMap := make(map[string]interface{})
10978	if ic.Value != nil {
10979		objectMap["value"] = ic.Value
10980	}
10981	return json.Marshal(objectMap)
10982}
10983
10984// IdentifierCollectionIterator provides access to a complete listing of Identifier values.
10985type IdentifierCollectionIterator struct {
10986	i    int
10987	page IdentifierCollectionPage
10988}
10989
10990// NextWithContext advances to the next value.  If there was an error making
10991// the request the iterator does not advance and the error is returned.
10992func (iter *IdentifierCollectionIterator) NextWithContext(ctx context.Context) (err error) {
10993	if tracing.IsEnabled() {
10994		ctx = tracing.StartSpan(ctx, fqdn+"/IdentifierCollectionIterator.NextWithContext")
10995		defer func() {
10996			sc := -1
10997			if iter.Response().Response.Response != nil {
10998				sc = iter.Response().Response.Response.StatusCode
10999			}
11000			tracing.EndSpan(ctx, sc, err)
11001		}()
11002	}
11003	iter.i++
11004	if iter.i < len(iter.page.Values()) {
11005		return nil
11006	}
11007	err = iter.page.NextWithContext(ctx)
11008	if err != nil {
11009		iter.i--
11010		return err
11011	}
11012	iter.i = 0
11013	return nil
11014}
11015
11016// Next advances to the next value.  If there was an error making
11017// the request the iterator does not advance and the error is returned.
11018// Deprecated: Use NextWithContext() instead.
11019func (iter *IdentifierCollectionIterator) Next() error {
11020	return iter.NextWithContext(context.Background())
11021}
11022
11023// NotDone returns true if the enumeration should be started or is not yet complete.
11024func (iter IdentifierCollectionIterator) NotDone() bool {
11025	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11026}
11027
11028// Response returns the raw server response from the last page request.
11029func (iter IdentifierCollectionIterator) Response() IdentifierCollection {
11030	return iter.page.Response()
11031}
11032
11033// Value returns the current value or a zero-initialized value if the
11034// iterator has advanced beyond the end of the collection.
11035func (iter IdentifierCollectionIterator) Value() Identifier {
11036	if !iter.page.NotDone() {
11037		return Identifier{}
11038	}
11039	return iter.page.Values()[iter.i]
11040}
11041
11042// Creates a new instance of the IdentifierCollectionIterator type.
11043func NewIdentifierCollectionIterator(page IdentifierCollectionPage) IdentifierCollectionIterator {
11044	return IdentifierCollectionIterator{page: page}
11045}
11046
11047// IsEmpty returns true if the ListResult contains no values.
11048func (ic IdentifierCollection) IsEmpty() bool {
11049	return ic.Value == nil || len(*ic.Value) == 0
11050}
11051
11052// hasNextLink returns true if the NextLink is not empty.
11053func (ic IdentifierCollection) hasNextLink() bool {
11054	return ic.NextLink != nil && len(*ic.NextLink) != 0
11055}
11056
11057// identifierCollectionPreparer prepares a request to retrieve the next set of results.
11058// It returns nil if no more results exist.
11059func (ic IdentifierCollection) identifierCollectionPreparer(ctx context.Context) (*http.Request, error) {
11060	if !ic.hasNextLink() {
11061		return nil, nil
11062	}
11063	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11064		autorest.AsJSON(),
11065		autorest.AsGet(),
11066		autorest.WithBaseURL(to.String(ic.NextLink)))
11067}
11068
11069// IdentifierCollectionPage contains a page of Identifier values.
11070type IdentifierCollectionPage struct {
11071	fn func(context.Context, IdentifierCollection) (IdentifierCollection, error)
11072	ic IdentifierCollection
11073}
11074
11075// NextWithContext advances to the next page of values.  If there was an error making
11076// the request the page does not advance and the error is returned.
11077func (page *IdentifierCollectionPage) NextWithContext(ctx context.Context) (err error) {
11078	if tracing.IsEnabled() {
11079		ctx = tracing.StartSpan(ctx, fqdn+"/IdentifierCollectionPage.NextWithContext")
11080		defer func() {
11081			sc := -1
11082			if page.Response().Response.Response != nil {
11083				sc = page.Response().Response.Response.StatusCode
11084			}
11085			tracing.EndSpan(ctx, sc, err)
11086		}()
11087	}
11088	for {
11089		next, err := page.fn(ctx, page.ic)
11090		if err != nil {
11091			return err
11092		}
11093		page.ic = next
11094		if !next.hasNextLink() || !next.IsEmpty() {
11095			break
11096		}
11097	}
11098	return nil
11099}
11100
11101// Next advances to the next page of values.  If there was an error making
11102// the request the page does not advance and the error is returned.
11103// Deprecated: Use NextWithContext() instead.
11104func (page *IdentifierCollectionPage) Next() error {
11105	return page.NextWithContext(context.Background())
11106}
11107
11108// NotDone returns true if the page enumeration should be started or is not yet complete.
11109func (page IdentifierCollectionPage) NotDone() bool {
11110	return !page.ic.IsEmpty()
11111}
11112
11113// Response returns the raw server response from the last page request.
11114func (page IdentifierCollectionPage) Response() IdentifierCollection {
11115	return page.ic
11116}
11117
11118// Values returns the slice of values for the current page or nil if there are no values.
11119func (page IdentifierCollectionPage) Values() []Identifier {
11120	if page.ic.IsEmpty() {
11121		return nil
11122	}
11123	return *page.ic.Value
11124}
11125
11126// Creates a new instance of the IdentifierCollectionPage type.
11127func NewIdentifierCollectionPage(cur IdentifierCollection, getNextPage func(context.Context, IdentifierCollection) (IdentifierCollection, error)) IdentifierCollectionPage {
11128	return IdentifierCollectionPage{
11129		fn: getNextPage,
11130		ic: cur,
11131	}
11132}
11133
11134// IdentifierProperties identifier resource specific properties
11135type IdentifierProperties struct {
11136	// ID - String representation of the identity.
11137	ID *string `json:"id,omitempty"`
11138}
11139
11140// IPSecurityRestriction IP security restriction on an app.
11141type IPSecurityRestriction struct {
11142	// IPAddress - IP address the security restriction is valid for.
11143	IPAddress *string `json:"ipAddress,omitempty"`
11144	// SubnetMask - Subnet mask for the range of IP addresses the restriction is valid for.
11145	SubnetMask *string `json:"subnetMask,omitempty"`
11146}
11147
11148// Job web Job Information.
11149type Job struct {
11150	autorest.Response `json:"-"`
11151	// JobProperties - WebJob resource specific properties
11152	*JobProperties `json:"properties,omitempty"`
11153	// ID - READ-ONLY; Resource Id.
11154	ID *string `json:"id,omitempty"`
11155	// Name - READ-ONLY; Resource Name.
11156	Name *string `json:"name,omitempty"`
11157	// Kind - Kind of resource.
11158	Kind *string `json:"kind,omitempty"`
11159	// Type - READ-ONLY; Resource type.
11160	Type *string `json:"type,omitempty"`
11161}
11162
11163// MarshalJSON is the custom marshaler for Job.
11164func (j Job) MarshalJSON() ([]byte, error) {
11165	objectMap := make(map[string]interface{})
11166	if j.JobProperties != nil {
11167		objectMap["properties"] = j.JobProperties
11168	}
11169	if j.Kind != nil {
11170		objectMap["kind"] = j.Kind
11171	}
11172	return json.Marshal(objectMap)
11173}
11174
11175// UnmarshalJSON is the custom unmarshaler for Job struct.
11176func (j *Job) UnmarshalJSON(body []byte) error {
11177	var m map[string]*json.RawMessage
11178	err := json.Unmarshal(body, &m)
11179	if err != nil {
11180		return err
11181	}
11182	for k, v := range m {
11183		switch k {
11184		case "properties":
11185			if v != nil {
11186				var jobProperties JobProperties
11187				err = json.Unmarshal(*v, &jobProperties)
11188				if err != nil {
11189					return err
11190				}
11191				j.JobProperties = &jobProperties
11192			}
11193		case "id":
11194			if v != nil {
11195				var ID string
11196				err = json.Unmarshal(*v, &ID)
11197				if err != nil {
11198					return err
11199				}
11200				j.ID = &ID
11201			}
11202		case "name":
11203			if v != nil {
11204				var name string
11205				err = json.Unmarshal(*v, &name)
11206				if err != nil {
11207					return err
11208				}
11209				j.Name = &name
11210			}
11211		case "kind":
11212			if v != nil {
11213				var kind string
11214				err = json.Unmarshal(*v, &kind)
11215				if err != nil {
11216					return err
11217				}
11218				j.Kind = &kind
11219			}
11220		case "type":
11221			if v != nil {
11222				var typeVar string
11223				err = json.Unmarshal(*v, &typeVar)
11224				if err != nil {
11225					return err
11226				}
11227				j.Type = &typeVar
11228			}
11229		}
11230	}
11231
11232	return nil
11233}
11234
11235// JobCollection collection of Kudu web job information elements.
11236type JobCollection struct {
11237	autorest.Response `json:"-"`
11238	// Value - Collection of resources.
11239	Value *[]Job `json:"value,omitempty"`
11240	// NextLink - READ-ONLY; Link to next page of resources.
11241	NextLink *string `json:"nextLink,omitempty"`
11242}
11243
11244// MarshalJSON is the custom marshaler for JobCollection.
11245func (jc JobCollection) MarshalJSON() ([]byte, error) {
11246	objectMap := make(map[string]interface{})
11247	if jc.Value != nil {
11248		objectMap["value"] = jc.Value
11249	}
11250	return json.Marshal(objectMap)
11251}
11252
11253// JobCollectionIterator provides access to a complete listing of Job values.
11254type JobCollectionIterator struct {
11255	i    int
11256	page JobCollectionPage
11257}
11258
11259// NextWithContext advances to the next value.  If there was an error making
11260// the request the iterator does not advance and the error is returned.
11261func (iter *JobCollectionIterator) NextWithContext(ctx context.Context) (err error) {
11262	if tracing.IsEnabled() {
11263		ctx = tracing.StartSpan(ctx, fqdn+"/JobCollectionIterator.NextWithContext")
11264		defer func() {
11265			sc := -1
11266			if iter.Response().Response.Response != nil {
11267				sc = iter.Response().Response.Response.StatusCode
11268			}
11269			tracing.EndSpan(ctx, sc, err)
11270		}()
11271	}
11272	iter.i++
11273	if iter.i < len(iter.page.Values()) {
11274		return nil
11275	}
11276	err = iter.page.NextWithContext(ctx)
11277	if err != nil {
11278		iter.i--
11279		return err
11280	}
11281	iter.i = 0
11282	return nil
11283}
11284
11285// Next advances to the next value.  If there was an error making
11286// the request the iterator does not advance and the error is returned.
11287// Deprecated: Use NextWithContext() instead.
11288func (iter *JobCollectionIterator) Next() error {
11289	return iter.NextWithContext(context.Background())
11290}
11291
11292// NotDone returns true if the enumeration should be started or is not yet complete.
11293func (iter JobCollectionIterator) NotDone() bool {
11294	return iter.page.NotDone() && iter.i < len(iter.page.Values())
11295}
11296
11297// Response returns the raw server response from the last page request.
11298func (iter JobCollectionIterator) Response() JobCollection {
11299	return iter.page.Response()
11300}
11301
11302// Value returns the current value or a zero-initialized value if the
11303// iterator has advanced beyond the end of the collection.
11304func (iter JobCollectionIterator) Value() Job {
11305	if !iter.page.NotDone() {
11306		return Job{}
11307	}
11308	return iter.page.Values()[iter.i]
11309}
11310
11311// Creates a new instance of the JobCollectionIterator type.
11312func NewJobCollectionIterator(page JobCollectionPage) JobCollectionIterator {
11313	return JobCollectionIterator{page: page}
11314}
11315
11316// IsEmpty returns true if the ListResult contains no values.
11317func (jc JobCollection) IsEmpty() bool {
11318	return jc.Value == nil || len(*jc.Value) == 0
11319}
11320
11321// hasNextLink returns true if the NextLink is not empty.
11322func (jc JobCollection) hasNextLink() bool {
11323	return jc.NextLink != nil && len(*jc.NextLink) != 0
11324}
11325
11326// jobCollectionPreparer prepares a request to retrieve the next set of results.
11327// It returns nil if no more results exist.
11328func (jc JobCollection) jobCollectionPreparer(ctx context.Context) (*http.Request, error) {
11329	if !jc.hasNextLink() {
11330		return nil, nil
11331	}
11332	return autorest.Prepare((&http.Request{}).WithContext(ctx),
11333		autorest.AsJSON(),
11334		autorest.AsGet(),
11335		autorest.WithBaseURL(to.String(jc.NextLink)))
11336}
11337
11338// JobCollectionPage contains a page of Job values.
11339type JobCollectionPage struct {
11340	fn func(context.Context, JobCollection) (JobCollection, error)
11341	jc JobCollection
11342}
11343
11344// NextWithContext advances to the next page of values.  If there was an error making
11345// the request the page does not advance and the error is returned.
11346func (page *JobCollectionPage) NextWithContext(ctx context.Context) (err error) {
11347	if tracing.IsEnabled() {
11348		ctx = tracing.StartSpan(ctx, fqdn+"/JobCollectionPage.NextWithContext")
11349		defer func() {
11350			sc := -1
11351			if page.Response().Response.Response != nil {
11352				sc = page.Response().Response.Response.StatusCode
11353			}
11354			tracing.EndSpan(ctx, sc, err)
11355		}()
11356	}
11357	for {
11358		next, err := page.fn(ctx, page.jc)
11359		if err != nil {
11360			return err
11361		}
11362		page.jc = next
11363		if !next.hasNextLink() || !next.IsEmpty() {
11364			break
11365		}
11366	}
11367	return nil
11368}
11369
11370// Next advances to the next page of values.  If there was an error making
11371// the request the page does not advance and the error is returned.
11372// Deprecated: Use NextWithContext() instead.
11373func (page *JobCollectionPage) Next() error {
11374	return page.NextWithContext(context.Background())
11375}
11376
11377// NotDone returns true if the page enumeration should be started or is not yet complete.
11378func (page JobCollectionPage) NotDone() bool {
11379	return !page.jc.IsEmpty()
11380}
11381
11382// Response returns the raw server response from the last page request.
11383func (page JobCollectionPage) Response() JobCollection {
11384	return page.jc
11385}
11386
11387// Values returns the slice of values for the current page or nil if there are no values.
11388func (page JobCollectionPage) Values() []Job {
11389	if page.jc.IsEmpty() {
11390		return nil
11391	}
11392	return *page.jc.Value
11393}
11394
11395// Creates a new instance of the JobCollectionPage type.
11396func NewJobCollectionPage(cur JobCollection, getNextPage func(context.Context, JobCollection) (JobCollection, error)) JobCollectionPage {
11397	return JobCollectionPage{
11398		fn: getNextPage,
11399		jc: cur,
11400	}
11401}
11402
11403// JobProperties webJob resource specific properties
11404type JobProperties struct {
11405	// Name - READ-ONLY; Job name. Used as job identifier in ARM resource URI.
11406	Name *string `json:"name,omitempty"`
11407	// RunCommand - Run command.
11408	RunCommand *string `json:"runCommand,omitempty"`
11409	// URL - Job URL.
11410	URL *string `json:"url,omitempty"`
11411	// ExtraInfoURL - Extra Info URL.
11412	ExtraInfoURL *string `json:"extraInfoUrl,omitempty"`
11413	// JobType - Job type. Possible values include: 'Continuous', 'Triggered'
11414	JobType JobType `json:"jobType,omitempty"`
11415	// Error - Error information.
11416	Error *string `json:"error,omitempty"`
11417	// UsingSdk - Using SDK?
11418	UsingSdk *bool `json:"usingSdk,omitempty"`
11419	// Settings - Job settings.
11420	Settings map[string]interface{} `json:"settings"`
11421}
11422
11423// MarshalJSON is the custom marshaler for JobProperties.
11424func (j JobProperties) MarshalJSON() ([]byte, error) {
11425	objectMap := make(map[string]interface{})
11426	if j.RunCommand != nil {
11427		objectMap["runCommand"] = j.RunCommand
11428	}
11429	if j.URL != nil {
11430		objectMap["url"] = j.URL
11431	}
11432	if j.ExtraInfoURL != nil {
11433		objectMap["extraInfoUrl"] = j.ExtraInfoURL
11434	}
11435	if j.JobType != "" {
11436		objectMap["jobType"] = j.JobType
11437	}
11438	if j.Error != nil {
11439		objectMap["error"] = j.Error
11440	}
11441	if j.UsingSdk != nil {
11442		objectMap["usingSdk"] = j.UsingSdk
11443	}
11444	if j.Settings != nil {
11445		objectMap["settings"] = j.Settings
11446	}
11447	return json.Marshal(objectMap)
11448}
11449
11450// ListCapability ...
11451type ListCapability struct {
11452	autorest.Response `json:"-"`
11453	Value             *[]Capability `json:"value,omitempty"`
11454}
11455
11456// ListCertificateEmail ...
11457type ListCertificateEmail struct {
11458	autorest.Response `json:"-"`
11459	Value             *[]CertificateEmail `json:"value,omitempty"`
11460}
11461
11462// ListCertificateOrderAction ...
11463type ListCertificateOrderAction struct {
11464	autorest.Response `json:"-"`
11465	Value             *[]CertificateOrderAction `json:"value,omitempty"`
11466}
11467
11468// ListHostingEnvironmentDiagnostics ...
11469type ListHostingEnvironmentDiagnostics struct {
11470	autorest.Response `json:"-"`
11471	Value             *[]HostingEnvironmentDiagnostics `json:"value,omitempty"`
11472}
11473
11474// ListOperation ...
11475type ListOperation struct {
11476	autorest.Response `json:"-"`
11477	Value             *[]Operation `json:"value,omitempty"`
11478}
11479
11480// ListVnetInfo ...
11481type ListVnetInfo struct {
11482	autorest.Response `json:"-"`
11483	Value             *[]VnetInfo `json:"value,omitempty"`
11484}
11485
11486// ListVnetRoute ...
11487type ListVnetRoute struct {
11488	autorest.Response `json:"-"`
11489	Value             *[]VnetRoute `json:"value,omitempty"`
11490}
11491
11492// LocalizableString localizable string object containing the name and a localized value.
11493type LocalizableString struct {
11494	// Value - Non-localized name.
11495	Value *string `json:"value,omitempty"`
11496	// LocalizedValue - Localized name.
11497	LocalizedValue *string `json:"localizedValue,omitempty"`
11498}
11499
11500// ManagedServiceIdentity managed service identity.
11501type ManagedServiceIdentity struct {
11502	// Type - Type of managed service identity. Possible values include: 'SystemAssigned'
11503	Type ManagedServiceIdentityType `json:"type,omitempty"`
11504	// TenantID - READ-ONLY; Tenant of managed service identity.
11505	TenantID *string `json:"tenantId,omitempty"`
11506	// PrincipalID - READ-ONLY; Principal Id of managed service identity.
11507	PrincipalID *string `json:"principalId,omitempty"`
11508}
11509
11510// MarshalJSON is the custom marshaler for ManagedServiceIdentity.
11511func (msi ManagedServiceIdentity) MarshalJSON() ([]byte, error) {
11512	objectMap := make(map[string]interface{})
11513	if msi.Type != "" {
11514		objectMap["type"] = msi.Type
11515	}
11516	return json.Marshal(objectMap)
11517}
11518
11519// MetricAvailabilily metric availability and retention.
11520type MetricAvailabilily struct {
11521	// TimeGrain - Time grain.
11522	TimeGrain *string `json:"timeGrain,omitempty"`
11523	// Retention - Retention period for the current time grain.
11524	Retention *string `json:"retention,omitempty"`
11525}
11526
11527// MetricAvailability retention policy of a resource metric.
11528type MetricAvailability struct {
11529	TimeGrain    *string `json:"timeGrain,omitempty"`
11530	BlobDuration *string `json:"blobDuration,omitempty"`
11531}
11532
11533// MetricDefinition metadata for a metric.
11534type MetricDefinition struct {
11535	autorest.Response `json:"-"`
11536	// MetricDefinitionProperties - MetricDefinition resource specific properties
11537	*MetricDefinitionProperties `json:"properties,omitempty"`
11538	// ID - READ-ONLY; Resource Id.
11539	ID *string `json:"id,omitempty"`
11540	// Name - READ-ONLY; Resource Name.
11541	Name *string `json:"name,omitempty"`
11542	// Kind - Kind of resource.
11543	Kind *string `json:"kind,omitempty"`
11544	// Type - READ-ONLY; Resource type.
11545	Type *string `json:"type,omitempty"`
11546}
11547
11548// MarshalJSON is the custom marshaler for MetricDefinition.
11549func (md MetricDefinition) MarshalJSON() ([]byte, error) {
11550	objectMap := make(map[string]interface{})
11551	if md.MetricDefinitionProperties != nil {
11552		objectMap["properties"] = md.MetricDefinitionProperties
11553	}
11554	if md.Kind != nil {
11555		objectMap["kind"] = md.Kind
11556	}
11557	return json.Marshal(objectMap)
11558}
11559
11560// UnmarshalJSON is the custom unmarshaler for MetricDefinition struct.
11561func (md *MetricDefinition) UnmarshalJSON(body []byte) error {
11562	var m map[string]*json.RawMessage
11563	err := json.Unmarshal(body, &m)
11564	if err != nil {
11565		return err
11566	}
11567	for k, v := range m {
11568		switch k {
11569		case "properties":
11570			if v != nil {
11571				var metricDefinitionProperties MetricDefinitionProperties
11572				err = json.Unmarshal(*v, &metricDefinitionProperties)
11573				if err != nil {
11574					return err
11575				}
11576				md.MetricDefinitionProperties = &metricDefinitionProperties
11577			}
11578		case "id":
11579			if v != nil {
11580				var ID string
11581				err = json.Unmarshal(*v, &ID)
11582				if err != nil {
11583					return err
11584				}
11585				md.ID = &ID
11586			}
11587		case "name":
11588			if v != nil {
11589				var name string
11590				err = json.Unmarshal(*v, &name)
11591				if err != nil {
11592					return err
11593				}
11594				md.Name = &name
11595			}
11596		case "kind":
11597			if v != nil {
11598				var kind string
11599				err = json.Unmarshal(*v, &kind)
11600				if err != nil {
11601					return err
11602				}
11603				md.Kind = &kind
11604			}
11605		case "type":
11606			if v != nil {
11607				var typeVar string
11608				err = json.Unmarshal(*v, &typeVar)
11609				if err != nil {
11610					return err
11611				}
11612				md.Type = &typeVar
11613			}
11614		}
11615	}
11616
11617	return nil
11618}
11619
11620// MetricDefinitionProperties metricDefinition resource specific properties
11621type MetricDefinitionProperties struct {
11622	// Name - READ-ONLY; Name of the metric.
11623	Name *string `json:"name,omitempty"`
11624	// Unit - READ-ONLY; Unit of the metric.
11625	Unit *string `json:"unit,omitempty"`
11626	// PrimaryAggregationType - READ-ONLY; Primary aggregation type.
11627	PrimaryAggregationType *string `json:"primaryAggregationType,omitempty"`
11628	// MetricAvailabilities - READ-ONLY; List of time grains supported for the metric together with retention period.
11629	MetricAvailabilities *[]MetricAvailabilily `json:"metricAvailabilities,omitempty"`
11630	// DisplayName - READ-ONLY; Friendly name shown in the UI.
11631	DisplayName *string `json:"displayName,omitempty"`
11632}
11633
11634// MarshalJSON is the custom marshaler for MetricDefinitionProperties.
11635func (md MetricDefinitionProperties) MarshalJSON() ([]byte, error) {
11636	objectMap := make(map[string]interface{})
11637	return json.Marshal(objectMap)
11638}
11639
11640// MetricSpecification definition of a single resource metric.
11641type MetricSpecification struct {
11642	Name                             *string               `json:"name,omitempty"`
11643	DisplayName                      *string               `json:"displayName,omitempty"`
11644	DisplayDescription               *string               `json:"displayDescription,omitempty"`
11645	Unit                             *string               `json:"unit,omitempty"`
11646	AggregationType                  *string               `json:"aggregationType,omitempty"`
11647	SupportsInstanceLevelAggregation *bool                 `json:"supportsInstanceLevelAggregation,omitempty"`
11648	EnableRegionalMdmAccount         *bool                 `json:"enableRegionalMdmAccount,omitempty"`
11649	SourceMdmAccount                 *string               `json:"sourceMdmAccount,omitempty"`
11650	SourceMdmNamespace               *string               `json:"sourceMdmNamespace,omitempty"`
11651	MetricFilterPattern              *string               `json:"metricFilterPattern,omitempty"`
11652	FillGapWithZero                  *bool                 `json:"fillGapWithZero,omitempty"`
11653	IsInternal                       *bool                 `json:"isInternal,omitempty"`
11654	Dimensions                       *[]Dimension          `json:"dimensions,omitempty"`
11655	Category                         *string               `json:"category,omitempty"`
11656	Availabilities                   *[]MetricAvailability `json:"availabilities,omitempty"`
11657}
11658
11659// MigrateMySQLRequest mySQL migration request.
11660type MigrateMySQLRequest struct {
11661	// MigrateMySQLRequestProperties - MigrateMySqlRequest resource specific properties
11662	*MigrateMySQLRequestProperties `json:"properties,omitempty"`
11663	// ID - READ-ONLY; Resource Id.
11664	ID *string `json:"id,omitempty"`
11665	// Name - READ-ONLY; Resource Name.
11666	Name *string `json:"name,omitempty"`
11667	// Kind - Kind of resource.
11668	Kind *string `json:"kind,omitempty"`
11669	// Type - READ-ONLY; Resource type.
11670	Type *string `json:"type,omitempty"`
11671}
11672
11673// MarshalJSON is the custom marshaler for MigrateMySQLRequest.
11674func (mmsr MigrateMySQLRequest) MarshalJSON() ([]byte, error) {
11675	objectMap := make(map[string]interface{})
11676	if mmsr.MigrateMySQLRequestProperties != nil {
11677		objectMap["properties"] = mmsr.MigrateMySQLRequestProperties
11678	}
11679	if mmsr.Kind != nil {
11680		objectMap["kind"] = mmsr.Kind
11681	}
11682	return json.Marshal(objectMap)
11683}
11684
11685// UnmarshalJSON is the custom unmarshaler for MigrateMySQLRequest struct.
11686func (mmsr *MigrateMySQLRequest) UnmarshalJSON(body []byte) error {
11687	var m map[string]*json.RawMessage
11688	err := json.Unmarshal(body, &m)
11689	if err != nil {
11690		return err
11691	}
11692	for k, v := range m {
11693		switch k {
11694		case "properties":
11695			if v != nil {
11696				var migrateMySQLRequestProperties MigrateMySQLRequestProperties
11697				err = json.Unmarshal(*v, &migrateMySQLRequestProperties)
11698				if err != nil {
11699					return err
11700				}
11701				mmsr.MigrateMySQLRequestProperties = &migrateMySQLRequestProperties
11702			}
11703		case "id":
11704			if v != nil {
11705				var ID string
11706				err = json.Unmarshal(*v, &ID)
11707				if err != nil {
11708					return err
11709				}
11710				mmsr.ID = &ID
11711			}
11712		case "name":
11713			if v != nil {
11714				var name string
11715				err = json.Unmarshal(*v, &name)
11716				if err != nil {
11717					return err
11718				}
11719				mmsr.Name = &name
11720			}
11721		case "kind":
11722			if v != nil {
11723				var kind string
11724				err = json.Unmarshal(*v, &kind)
11725				if err != nil {
11726					return err
11727				}
11728				mmsr.Kind = &kind
11729			}
11730		case "type":
11731			if v != nil {
11732				var typeVar string
11733				err = json.Unmarshal(*v, &typeVar)
11734				if err != nil {
11735					return err
11736				}
11737				mmsr.Type = &typeVar
11738			}
11739		}
11740	}
11741
11742	return nil
11743}
11744
11745// MigrateMySQLRequestProperties migrateMySqlRequest resource specific properties
11746type MigrateMySQLRequestProperties struct {
11747	// ConnectionString - Connection string to the remote MySQL database.
11748	ConnectionString *string `json:"connectionString,omitempty"`
11749	// MigrationType - The type of migration operation to be done. Possible values include: 'LocalToRemote', 'RemoteToLocal'
11750	MigrationType MySQLMigrationType `json:"migrationType,omitempty"`
11751}
11752
11753// MigrateMySQLStatus mySQL migration status.
11754type MigrateMySQLStatus struct {
11755	autorest.Response `json:"-"`
11756	// MigrateMySQLStatusProperties - MigrateMySqlStatus resource specific properties
11757	*MigrateMySQLStatusProperties `json:"properties,omitempty"`
11758	// ID - READ-ONLY; Resource Id.
11759	ID *string `json:"id,omitempty"`
11760	// Name - READ-ONLY; Resource Name.
11761	Name *string `json:"name,omitempty"`
11762	// Kind - Kind of resource.
11763	Kind *string `json:"kind,omitempty"`
11764	// Type - READ-ONLY; Resource type.
11765	Type *string `json:"type,omitempty"`
11766}
11767
11768// MarshalJSON is the custom marshaler for MigrateMySQLStatus.
11769func (mmss MigrateMySQLStatus) MarshalJSON() ([]byte, error) {
11770	objectMap := make(map[string]interface{})
11771	if mmss.MigrateMySQLStatusProperties != nil {
11772		objectMap["properties"] = mmss.MigrateMySQLStatusProperties
11773	}
11774	if mmss.Kind != nil {
11775		objectMap["kind"] = mmss.Kind
11776	}
11777	return json.Marshal(objectMap)
11778}
11779
11780// UnmarshalJSON is the custom unmarshaler for MigrateMySQLStatus struct.
11781func (mmss *MigrateMySQLStatus) UnmarshalJSON(body []byte) error {
11782	var m map[string]*json.RawMessage
11783	err := json.Unmarshal(body, &m)
11784	if err != nil {
11785		return err
11786	}
11787	for k, v := range m {
11788		switch k {
11789		case "properties":
11790			if v != nil {
11791				var migrateMySQLStatusProperties MigrateMySQLStatusProperties
11792				err = json.Unmarshal(*v, &migrateMySQLStatusProperties)
11793				if err != nil {
11794					return err
11795				}
11796				mmss.MigrateMySQLStatusProperties = &migrateMySQLStatusProperties
11797			}
11798		case "id":
11799			if v != nil {
11800				var ID string
11801				err = json.Unmarshal(*v, &ID)
11802				if err != nil {
11803					return err
11804				}
11805				mmss.ID = &ID
11806			}
11807		case "name":
11808			if v != nil {
11809				var name string
11810				err = json.Unmarshal(*v, &name)
11811				if err != nil {
11812					return err
11813				}
11814				mmss.Name = &name
11815			}
11816		case "kind":
11817			if v != nil {
11818				var kind string
11819				err = json.Unmarshal(*v, &kind)
11820				if err != nil {
11821					return err
11822				}
11823				mmss.Kind = &kind
11824			}
11825		case "type":
11826			if v != nil {
11827				var typeVar string
11828				err = json.Unmarshal(*v, &typeVar)
11829				if err != nil {
11830					return err
11831				}
11832				mmss.Type = &typeVar
11833			}
11834		}
11835	}
11836
11837	return nil
11838}
11839
11840// MigrateMySQLStatusProperties migrateMySqlStatus resource specific properties
11841type MigrateMySQLStatusProperties struct {
11842	// MigrationOperationStatus - READ-ONLY; Status of the migration task. Possible values include: 'OperationStatusInProgress', 'OperationStatusFailed', 'OperationStatusSucceeded', 'OperationStatusTimedOut', 'OperationStatusCreated'
11843	MigrationOperationStatus OperationStatus `json:"migrationOperationStatus,omitempty"`
11844	// OperationID - READ-ONLY; Operation ID for the migration task.
11845	OperationID *string `json:"operationId,omitempty"`
11846	// LocalMySQLEnabled - READ-ONLY; True if the web app has in app MySql enabled
11847	LocalMySQLEnabled *bool `json:"localMySqlEnabled,omitempty"`
11848}
11849
11850// MarshalJSON is the custom marshaler for MigrateMySQLStatusProperties.
11851func (mmss MigrateMySQLStatusProperties) MarshalJSON() ([]byte, error) {
11852	objectMap := make(map[string]interface{})
11853	return json.Marshal(objectMap)
11854}
11855
11856// MSDeploy mSDeploy ARM PUT information
11857type MSDeploy struct {
11858	// MSDeployCore - Core resource properties
11859	*MSDeployCore `json:"properties,omitempty"`
11860	// ID - READ-ONLY; Resource Id.
11861	ID *string `json:"id,omitempty"`
11862	// Name - READ-ONLY; Resource Name.
11863	Name *string `json:"name,omitempty"`
11864	// Kind - Kind of resource.
11865	Kind *string `json:"kind,omitempty"`
11866	// Type - READ-ONLY; Resource type.
11867	Type *string `json:"type,omitempty"`
11868}
11869
11870// MarshalJSON is the custom marshaler for MSDeploy.
11871func (md MSDeploy) MarshalJSON() ([]byte, error) {
11872	objectMap := make(map[string]interface{})
11873	if md.MSDeployCore != nil {
11874		objectMap["properties"] = md.MSDeployCore
11875	}
11876	if md.Kind != nil {
11877		objectMap["kind"] = md.Kind
11878	}
11879	return json.Marshal(objectMap)
11880}
11881
11882// UnmarshalJSON is the custom unmarshaler for MSDeploy struct.
11883func (md *MSDeploy) UnmarshalJSON(body []byte) error {
11884	var m map[string]*json.RawMessage
11885	err := json.Unmarshal(body, &m)
11886	if err != nil {
11887		return err
11888	}
11889	for k, v := range m {
11890		switch k {
11891		case "properties":
11892			if v != nil {
11893				var mSDeployCore MSDeployCore
11894				err = json.Unmarshal(*v, &mSDeployCore)
11895				if err != nil {
11896					return err
11897				}
11898				md.MSDeployCore = &mSDeployCore
11899			}
11900		case "id":
11901			if v != nil {
11902				var ID string
11903				err = json.Unmarshal(*v, &ID)
11904				if err != nil {
11905					return err
11906				}
11907				md.ID = &ID
11908			}
11909		case "name":
11910			if v != nil {
11911				var name string
11912				err = json.Unmarshal(*v, &name)
11913				if err != nil {
11914					return err
11915				}
11916				md.Name = &name
11917			}
11918		case "kind":
11919			if v != nil {
11920				var kind string
11921				err = json.Unmarshal(*v, &kind)
11922				if err != nil {
11923					return err
11924				}
11925				md.Kind = &kind
11926			}
11927		case "type":
11928			if v != nil {
11929				var typeVar string
11930				err = json.Unmarshal(*v, &typeVar)
11931				if err != nil {
11932					return err
11933				}
11934				md.Type = &typeVar
11935			}
11936		}
11937	}
11938
11939	return nil
11940}
11941
11942// MSDeployCore mSDeploy ARM PUT core information
11943type MSDeployCore struct {
11944	// PackageURI - Package URI
11945	PackageURI *string `json:"packageUri,omitempty"`
11946	// ConnectionString - SQL Connection String
11947	ConnectionString *string `json:"connectionString,omitempty"`
11948	// DbType - Database Type
11949	DbType *string `json:"dbType,omitempty"`
11950	// SetParametersXMLFileURI - URI of MSDeploy Parameters file. Must not be set if SetParameters is used.
11951	SetParametersXMLFileURI *string `json:"setParametersXmlFileUri,omitempty"`
11952	// SetParameters - MSDeploy Parameters. Must not be set if SetParametersXmlFileUri is used.
11953	SetParameters map[string]*string `json:"setParameters"`
11954	// SkipAppData - Controls whether the MSDeploy operation skips the App_Data directory.
11955	// If set to <code>true</code>, the existing App_Data directory on the destination
11956	// will not be deleted, and any App_Data directory in the source will be ignored.
11957	// Setting is <code>false</code> by default.
11958	SkipAppData *bool `json:"skipAppData,omitempty"`
11959	// AppOffline - Sets the AppOffline rule while the MSDeploy operation executes.
11960	// Setting is <code>false</code> by default.
11961	AppOffline *bool `json:"appOffline,omitempty"`
11962}
11963
11964// MarshalJSON is the custom marshaler for MSDeployCore.
11965func (mdc MSDeployCore) MarshalJSON() ([]byte, error) {
11966	objectMap := make(map[string]interface{})
11967	if mdc.PackageURI != nil {
11968		objectMap["packageUri"] = mdc.PackageURI
11969	}
11970	if mdc.ConnectionString != nil {
11971		objectMap["connectionString"] = mdc.ConnectionString
11972	}
11973	if mdc.DbType != nil {
11974		objectMap["dbType"] = mdc.DbType
11975	}
11976	if mdc.SetParametersXMLFileURI != nil {
11977		objectMap["setParametersXmlFileUri"] = mdc.SetParametersXMLFileURI
11978	}
11979	if mdc.SetParameters != nil {
11980		objectMap["setParameters"] = mdc.SetParameters
11981	}
11982	if mdc.SkipAppData != nil {
11983		objectMap["skipAppData"] = mdc.SkipAppData
11984	}
11985	if mdc.AppOffline != nil {
11986		objectMap["appOffline"] = mdc.AppOffline
11987	}
11988	return json.Marshal(objectMap)
11989}
11990
11991// MSDeployLog mSDeploy log
11992type MSDeployLog struct {
11993	autorest.Response `json:"-"`
11994	// MSDeployLogProperties - MSDeployLog resource specific properties
11995	*MSDeployLogProperties `json:"properties,omitempty"`
11996	// ID - READ-ONLY; Resource Id.
11997	ID *string `json:"id,omitempty"`
11998	// Name - READ-ONLY; Resource Name.
11999	Name *string `json:"name,omitempty"`
12000	// Kind - Kind of resource.
12001	Kind *string `json:"kind,omitempty"`
12002	// Type - READ-ONLY; Resource type.
12003	Type *string `json:"type,omitempty"`
12004}
12005
12006// MarshalJSON is the custom marshaler for MSDeployLog.
12007func (mdl MSDeployLog) MarshalJSON() ([]byte, error) {
12008	objectMap := make(map[string]interface{})
12009	if mdl.MSDeployLogProperties != nil {
12010		objectMap["properties"] = mdl.MSDeployLogProperties
12011	}
12012	if mdl.Kind != nil {
12013		objectMap["kind"] = mdl.Kind
12014	}
12015	return json.Marshal(objectMap)
12016}
12017
12018// UnmarshalJSON is the custom unmarshaler for MSDeployLog struct.
12019func (mdl *MSDeployLog) UnmarshalJSON(body []byte) error {
12020	var m map[string]*json.RawMessage
12021	err := json.Unmarshal(body, &m)
12022	if err != nil {
12023		return err
12024	}
12025	for k, v := range m {
12026		switch k {
12027		case "properties":
12028			if v != nil {
12029				var mSDeployLogProperties MSDeployLogProperties
12030				err = json.Unmarshal(*v, &mSDeployLogProperties)
12031				if err != nil {
12032					return err
12033				}
12034				mdl.MSDeployLogProperties = &mSDeployLogProperties
12035			}
12036		case "id":
12037			if v != nil {
12038				var ID string
12039				err = json.Unmarshal(*v, &ID)
12040				if err != nil {
12041					return err
12042				}
12043				mdl.ID = &ID
12044			}
12045		case "name":
12046			if v != nil {
12047				var name string
12048				err = json.Unmarshal(*v, &name)
12049				if err != nil {
12050					return err
12051				}
12052				mdl.Name = &name
12053			}
12054		case "kind":
12055			if v != nil {
12056				var kind string
12057				err = json.Unmarshal(*v, &kind)
12058				if err != nil {
12059					return err
12060				}
12061				mdl.Kind = &kind
12062			}
12063		case "type":
12064			if v != nil {
12065				var typeVar string
12066				err = json.Unmarshal(*v, &typeVar)
12067				if err != nil {
12068					return err
12069				}
12070				mdl.Type = &typeVar
12071			}
12072		}
12073	}
12074
12075	return nil
12076}
12077
12078// MSDeployLogEntry mSDeploy log entry
12079type MSDeployLogEntry struct {
12080	// Time - READ-ONLY; Timestamp of log entry
12081	Time *date.Time `json:"time,omitempty"`
12082	// Type - READ-ONLY; Log entry type. Possible values include: 'MSDeployLogEntryTypeMessage', 'MSDeployLogEntryTypeWarning', 'MSDeployLogEntryTypeError'
12083	Type MSDeployLogEntryType `json:"type,omitempty"`
12084	// Message - READ-ONLY; Log entry message
12085	Message *string `json:"message,omitempty"`
12086}
12087
12088// MarshalJSON is the custom marshaler for MSDeployLogEntry.
12089func (mdle MSDeployLogEntry) MarshalJSON() ([]byte, error) {
12090	objectMap := make(map[string]interface{})
12091	return json.Marshal(objectMap)
12092}
12093
12094// MSDeployLogProperties mSDeployLog resource specific properties
12095type MSDeployLogProperties struct {
12096	// Entries - READ-ONLY; List of log entry messages
12097	Entries *[]MSDeployLogEntry `json:"entries,omitempty"`
12098}
12099
12100// MarshalJSON is the custom marshaler for MSDeployLogProperties.
12101func (mdl MSDeployLogProperties) MarshalJSON() ([]byte, error) {
12102	objectMap := make(map[string]interface{})
12103	return json.Marshal(objectMap)
12104}
12105
12106// MSDeployStatus mSDeploy ARM response
12107type MSDeployStatus struct {
12108	autorest.Response `json:"-"`
12109	// MSDeployStatusProperties - MSDeployStatus resource specific properties
12110	*MSDeployStatusProperties `json:"properties,omitempty"`
12111	// ID - READ-ONLY; Resource Id.
12112	ID *string `json:"id,omitempty"`
12113	// Name - READ-ONLY; Resource Name.
12114	Name *string `json:"name,omitempty"`
12115	// Kind - Kind of resource.
12116	Kind *string `json:"kind,omitempty"`
12117	// Type - READ-ONLY; Resource type.
12118	Type *string `json:"type,omitempty"`
12119}
12120
12121// MarshalJSON is the custom marshaler for MSDeployStatus.
12122func (mds MSDeployStatus) MarshalJSON() ([]byte, error) {
12123	objectMap := make(map[string]interface{})
12124	if mds.MSDeployStatusProperties != nil {
12125		objectMap["properties"] = mds.MSDeployStatusProperties
12126	}
12127	if mds.Kind != nil {
12128		objectMap["kind"] = mds.Kind
12129	}
12130	return json.Marshal(objectMap)
12131}
12132
12133// UnmarshalJSON is the custom unmarshaler for MSDeployStatus struct.
12134func (mds *MSDeployStatus) UnmarshalJSON(body []byte) error {
12135	var m map[string]*json.RawMessage
12136	err := json.Unmarshal(body, &m)
12137	if err != nil {
12138		return err
12139	}
12140	for k, v := range m {
12141		switch k {
12142		case "properties":
12143			if v != nil {
12144				var mSDeployStatusProperties MSDeployStatusProperties
12145				err = json.Unmarshal(*v, &mSDeployStatusProperties)
12146				if err != nil {
12147					return err
12148				}
12149				mds.MSDeployStatusProperties = &mSDeployStatusProperties
12150			}
12151		case "id":
12152			if v != nil {
12153				var ID string
12154				err = json.Unmarshal(*v, &ID)
12155				if err != nil {
12156					return err
12157				}
12158				mds.ID = &ID
12159			}
12160		case "name":
12161			if v != nil {
12162				var name string
12163				err = json.Unmarshal(*v, &name)
12164				if err != nil {
12165					return err
12166				}
12167				mds.Name = &name
12168			}
12169		case "kind":
12170			if v != nil {
12171				var kind string
12172				err = json.Unmarshal(*v, &kind)
12173				if err != nil {
12174					return err
12175				}
12176				mds.Kind = &kind
12177			}
12178		case "type":
12179			if v != nil {
12180				var typeVar string
12181				err = json.Unmarshal(*v, &typeVar)
12182				if err != nil {
12183					return err
12184				}
12185				mds.Type = &typeVar
12186			}
12187		}
12188	}
12189
12190	return nil
12191}
12192
12193// MSDeployStatusProperties mSDeployStatus resource specific properties
12194type MSDeployStatusProperties struct {
12195	// Deployer - READ-ONLY; Username of deployer
12196	Deployer *string `json:"deployer,omitempty"`
12197	// ProvisioningState - READ-ONLY; Provisioning state. Possible values include: 'MSDeployProvisioningStateAccepted', 'MSDeployProvisioningStateRunning', 'MSDeployProvisioningStateSucceeded', 'MSDeployProvisioningStateFailed', 'MSDeployProvisioningStateCanceled'
12198	ProvisioningState MSDeployProvisioningState `json:"provisioningState,omitempty"`
12199	// StartTime - READ-ONLY; Start time of deploy operation
12200	StartTime *date.Time `json:"startTime,omitempty"`
12201	// EndTime - READ-ONLY; End time of deploy operation
12202	EndTime *date.Time `json:"endTime,omitempty"`
12203	// Complete - READ-ONLY; Whether the deployment operation has completed
12204	Complete *bool `json:"complete,omitempty"`
12205}
12206
12207// MarshalJSON is the custom marshaler for MSDeployStatusProperties.
12208func (mds MSDeployStatusProperties) MarshalJSON() ([]byte, error) {
12209	objectMap := make(map[string]interface{})
12210	return json.Marshal(objectMap)
12211}
12212
12213// NameIdentifier identifies an object.
12214type NameIdentifier struct {
12215	// Name - Name of the object.
12216	Name *string `json:"name,omitempty"`
12217}
12218
12219// NameIdentifierCollection collection of domain name identifiers.
12220type NameIdentifierCollection struct {
12221	autorest.Response `json:"-"`
12222	// Value - Collection of resources.
12223	Value *[]NameIdentifier `json:"value,omitempty"`
12224	// NextLink - READ-ONLY; Link to next page of resources.
12225	NextLink *string `json:"nextLink,omitempty"`
12226}
12227
12228// MarshalJSON is the custom marshaler for NameIdentifierCollection.
12229func (nic NameIdentifierCollection) MarshalJSON() ([]byte, error) {
12230	objectMap := make(map[string]interface{})
12231	if nic.Value != nil {
12232		objectMap["value"] = nic.Value
12233	}
12234	return json.Marshal(objectMap)
12235}
12236
12237// NameIdentifierCollectionIterator provides access to a complete listing of NameIdentifier values.
12238type NameIdentifierCollectionIterator struct {
12239	i    int
12240	page NameIdentifierCollectionPage
12241}
12242
12243// NextWithContext advances to the next value.  If there was an error making
12244// the request the iterator does not advance and the error is returned.
12245func (iter *NameIdentifierCollectionIterator) NextWithContext(ctx context.Context) (err error) {
12246	if tracing.IsEnabled() {
12247		ctx = tracing.StartSpan(ctx, fqdn+"/NameIdentifierCollectionIterator.NextWithContext")
12248		defer func() {
12249			sc := -1
12250			if iter.Response().Response.Response != nil {
12251				sc = iter.Response().Response.Response.StatusCode
12252			}
12253			tracing.EndSpan(ctx, sc, err)
12254		}()
12255	}
12256	iter.i++
12257	if iter.i < len(iter.page.Values()) {
12258		return nil
12259	}
12260	err = iter.page.NextWithContext(ctx)
12261	if err != nil {
12262		iter.i--
12263		return err
12264	}
12265	iter.i = 0
12266	return nil
12267}
12268
12269// Next advances to the next value.  If there was an error making
12270// the request the iterator does not advance and the error is returned.
12271// Deprecated: Use NextWithContext() instead.
12272func (iter *NameIdentifierCollectionIterator) Next() error {
12273	return iter.NextWithContext(context.Background())
12274}
12275
12276// NotDone returns true if the enumeration should be started or is not yet complete.
12277func (iter NameIdentifierCollectionIterator) NotDone() bool {
12278	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12279}
12280
12281// Response returns the raw server response from the last page request.
12282func (iter NameIdentifierCollectionIterator) Response() NameIdentifierCollection {
12283	return iter.page.Response()
12284}
12285
12286// Value returns the current value or a zero-initialized value if the
12287// iterator has advanced beyond the end of the collection.
12288func (iter NameIdentifierCollectionIterator) Value() NameIdentifier {
12289	if !iter.page.NotDone() {
12290		return NameIdentifier{}
12291	}
12292	return iter.page.Values()[iter.i]
12293}
12294
12295// Creates a new instance of the NameIdentifierCollectionIterator type.
12296func NewNameIdentifierCollectionIterator(page NameIdentifierCollectionPage) NameIdentifierCollectionIterator {
12297	return NameIdentifierCollectionIterator{page: page}
12298}
12299
12300// IsEmpty returns true if the ListResult contains no values.
12301func (nic NameIdentifierCollection) IsEmpty() bool {
12302	return nic.Value == nil || len(*nic.Value) == 0
12303}
12304
12305// hasNextLink returns true if the NextLink is not empty.
12306func (nic NameIdentifierCollection) hasNextLink() bool {
12307	return nic.NextLink != nil && len(*nic.NextLink) != 0
12308}
12309
12310// nameIdentifierCollectionPreparer prepares a request to retrieve the next set of results.
12311// It returns nil if no more results exist.
12312func (nic NameIdentifierCollection) nameIdentifierCollectionPreparer(ctx context.Context) (*http.Request, error) {
12313	if !nic.hasNextLink() {
12314		return nil, nil
12315	}
12316	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12317		autorest.AsJSON(),
12318		autorest.AsGet(),
12319		autorest.WithBaseURL(to.String(nic.NextLink)))
12320}
12321
12322// NameIdentifierCollectionPage contains a page of NameIdentifier values.
12323type NameIdentifierCollectionPage struct {
12324	fn  func(context.Context, NameIdentifierCollection) (NameIdentifierCollection, error)
12325	nic NameIdentifierCollection
12326}
12327
12328// NextWithContext advances to the next page of values.  If there was an error making
12329// the request the page does not advance and the error is returned.
12330func (page *NameIdentifierCollectionPage) NextWithContext(ctx context.Context) (err error) {
12331	if tracing.IsEnabled() {
12332		ctx = tracing.StartSpan(ctx, fqdn+"/NameIdentifierCollectionPage.NextWithContext")
12333		defer func() {
12334			sc := -1
12335			if page.Response().Response.Response != nil {
12336				sc = page.Response().Response.Response.StatusCode
12337			}
12338			tracing.EndSpan(ctx, sc, err)
12339		}()
12340	}
12341	for {
12342		next, err := page.fn(ctx, page.nic)
12343		if err != nil {
12344			return err
12345		}
12346		page.nic = next
12347		if !next.hasNextLink() || !next.IsEmpty() {
12348			break
12349		}
12350	}
12351	return nil
12352}
12353
12354// Next advances to the next page of values.  If there was an error making
12355// the request the page does not advance and the error is returned.
12356// Deprecated: Use NextWithContext() instead.
12357func (page *NameIdentifierCollectionPage) Next() error {
12358	return page.NextWithContext(context.Background())
12359}
12360
12361// NotDone returns true if the page enumeration should be started or is not yet complete.
12362func (page NameIdentifierCollectionPage) NotDone() bool {
12363	return !page.nic.IsEmpty()
12364}
12365
12366// Response returns the raw server response from the last page request.
12367func (page NameIdentifierCollectionPage) Response() NameIdentifierCollection {
12368	return page.nic
12369}
12370
12371// Values returns the slice of values for the current page or nil if there are no values.
12372func (page NameIdentifierCollectionPage) Values() []NameIdentifier {
12373	if page.nic.IsEmpty() {
12374		return nil
12375	}
12376	return *page.nic.Value
12377}
12378
12379// Creates a new instance of the NameIdentifierCollectionPage type.
12380func NewNameIdentifierCollectionPage(cur NameIdentifierCollection, getNextPage func(context.Context, NameIdentifierCollection) (NameIdentifierCollection, error)) NameIdentifierCollectionPage {
12381	return NameIdentifierCollectionPage{
12382		fn:  getNextPage,
12383		nic: cur,
12384	}
12385}
12386
12387// NameValuePair name value pair.
12388type NameValuePair struct {
12389	// Name - Pair name.
12390	Name *string `json:"name,omitempty"`
12391	// Value - Pair value.
12392	Value *string `json:"value,omitempty"`
12393}
12394
12395// NetworkAccessControlEntry network access control entry.
12396type NetworkAccessControlEntry struct {
12397	// Action - Action object. Possible values include: 'Permit', 'Deny'
12398	Action AccessControlEntryAction `json:"action,omitempty"`
12399	// Description - Description of network access control entry.
12400	Description *string `json:"description,omitempty"`
12401	// Order - Order of precedence.
12402	Order *int32 `json:"order,omitempty"`
12403	// RemoteSubnet - Remote subnet.
12404	RemoteSubnet *string `json:"remoteSubnet,omitempty"`
12405}
12406
12407// NetworkFeatures full view of network features for an app (presently VNET integration and Hybrid
12408// Connections).
12409type NetworkFeatures struct {
12410	autorest.Response `json:"-"`
12411	// NetworkFeaturesProperties - NetworkFeatures resource specific properties
12412	*NetworkFeaturesProperties `json:"properties,omitempty"`
12413	// ID - READ-ONLY; Resource Id.
12414	ID *string `json:"id,omitempty"`
12415	// Name - READ-ONLY; Resource Name.
12416	Name *string `json:"name,omitempty"`
12417	// Kind - Kind of resource.
12418	Kind *string `json:"kind,omitempty"`
12419	// Type - READ-ONLY; Resource type.
12420	Type *string `json:"type,omitempty"`
12421}
12422
12423// MarshalJSON is the custom marshaler for NetworkFeatures.
12424func (nf NetworkFeatures) MarshalJSON() ([]byte, error) {
12425	objectMap := make(map[string]interface{})
12426	if nf.NetworkFeaturesProperties != nil {
12427		objectMap["properties"] = nf.NetworkFeaturesProperties
12428	}
12429	if nf.Kind != nil {
12430		objectMap["kind"] = nf.Kind
12431	}
12432	return json.Marshal(objectMap)
12433}
12434
12435// UnmarshalJSON is the custom unmarshaler for NetworkFeatures struct.
12436func (nf *NetworkFeatures) UnmarshalJSON(body []byte) error {
12437	var m map[string]*json.RawMessage
12438	err := json.Unmarshal(body, &m)
12439	if err != nil {
12440		return err
12441	}
12442	for k, v := range m {
12443		switch k {
12444		case "properties":
12445			if v != nil {
12446				var networkFeaturesProperties NetworkFeaturesProperties
12447				err = json.Unmarshal(*v, &networkFeaturesProperties)
12448				if err != nil {
12449					return err
12450				}
12451				nf.NetworkFeaturesProperties = &networkFeaturesProperties
12452			}
12453		case "id":
12454			if v != nil {
12455				var ID string
12456				err = json.Unmarshal(*v, &ID)
12457				if err != nil {
12458					return err
12459				}
12460				nf.ID = &ID
12461			}
12462		case "name":
12463			if v != nil {
12464				var name string
12465				err = json.Unmarshal(*v, &name)
12466				if err != nil {
12467					return err
12468				}
12469				nf.Name = &name
12470			}
12471		case "kind":
12472			if v != nil {
12473				var kind string
12474				err = json.Unmarshal(*v, &kind)
12475				if err != nil {
12476					return err
12477				}
12478				nf.Kind = &kind
12479			}
12480		case "type":
12481			if v != nil {
12482				var typeVar string
12483				err = json.Unmarshal(*v, &typeVar)
12484				if err != nil {
12485					return err
12486				}
12487				nf.Type = &typeVar
12488			}
12489		}
12490	}
12491
12492	return nil
12493}
12494
12495// NetworkFeaturesProperties networkFeatures resource specific properties
12496type NetworkFeaturesProperties struct {
12497	// VirtualNetworkName - READ-ONLY; The Virtual Network name.
12498	VirtualNetworkName *string `json:"virtualNetworkName,omitempty"`
12499	// VirtualNetworkConnection - READ-ONLY; The Virtual Network summary view.
12500	VirtualNetworkConnection *VnetInfo `json:"virtualNetworkConnection,omitempty"`
12501	// HybridConnections - READ-ONLY; The Hybrid Connections summary view.
12502	HybridConnections *[]RelayServiceConnectionEntity `json:"hybridConnections,omitempty"`
12503	// HybridConnectionsV2 - READ-ONLY; The Hybrid Connection V2 (Service Bus) view.
12504	HybridConnectionsV2 *[]HybridConnection `json:"hybridConnectionsV2,omitempty"`
12505}
12506
12507// MarshalJSON is the custom marshaler for NetworkFeaturesProperties.
12508func (nf NetworkFeaturesProperties) MarshalJSON() ([]byte, error) {
12509	objectMap := make(map[string]interface{})
12510	return json.Marshal(objectMap)
12511}
12512
12513// Operation an operation on a resource.
12514type Operation struct {
12515	autorest.Response `json:"-"`
12516	// ID - Operation ID.
12517	ID *string `json:"id,omitempty"`
12518	// Name - Operation name.
12519	Name *string `json:"name,omitempty"`
12520	// Status - The current status of the operation. Possible values include: 'OperationStatusInProgress', 'OperationStatusFailed', 'OperationStatusSucceeded', 'OperationStatusTimedOut', 'OperationStatusCreated'
12521	Status OperationStatus `json:"status,omitempty"`
12522	// Errors - Any errors associate with the operation.
12523	Errors *[]ErrorEntity `json:"errors,omitempty"`
12524	// CreatedTime - Time when operation has started.
12525	CreatedTime *date.Time `json:"createdTime,omitempty"`
12526	// ModifiedTime - Time when operation has been updated.
12527	ModifiedTime *date.Time `json:"modifiedTime,omitempty"`
12528	// ExpirationTime - Time when operation will expire.
12529	ExpirationTime *date.Time `json:"expirationTime,omitempty"`
12530	// GeoMasterOperationID - Applicable only for stamp operation ids.
12531	GeoMasterOperationID *uuid.UUID `json:"geoMasterOperationId,omitempty"`
12532}
12533
12534// PerfMonCounterCollection collection of performance monitor counters.
12535type PerfMonCounterCollection struct {
12536	autorest.Response `json:"-"`
12537	// Value - Collection of resources.
12538	Value *[]PerfMonResponse `json:"value,omitempty"`
12539	// NextLink - READ-ONLY; Link to next page of resources.
12540	NextLink *string `json:"nextLink,omitempty"`
12541}
12542
12543// MarshalJSON is the custom marshaler for PerfMonCounterCollection.
12544func (pmcc PerfMonCounterCollection) MarshalJSON() ([]byte, error) {
12545	objectMap := make(map[string]interface{})
12546	if pmcc.Value != nil {
12547		objectMap["value"] = pmcc.Value
12548	}
12549	return json.Marshal(objectMap)
12550}
12551
12552// PerfMonCounterCollectionIterator provides access to a complete listing of PerfMonResponse values.
12553type PerfMonCounterCollectionIterator struct {
12554	i    int
12555	page PerfMonCounterCollectionPage
12556}
12557
12558// NextWithContext advances to the next value.  If there was an error making
12559// the request the iterator does not advance and the error is returned.
12560func (iter *PerfMonCounterCollectionIterator) NextWithContext(ctx context.Context) (err error) {
12561	if tracing.IsEnabled() {
12562		ctx = tracing.StartSpan(ctx, fqdn+"/PerfMonCounterCollectionIterator.NextWithContext")
12563		defer func() {
12564			sc := -1
12565			if iter.Response().Response.Response != nil {
12566				sc = iter.Response().Response.Response.StatusCode
12567			}
12568			tracing.EndSpan(ctx, sc, err)
12569		}()
12570	}
12571	iter.i++
12572	if iter.i < len(iter.page.Values()) {
12573		return nil
12574	}
12575	err = iter.page.NextWithContext(ctx)
12576	if err != nil {
12577		iter.i--
12578		return err
12579	}
12580	iter.i = 0
12581	return nil
12582}
12583
12584// Next advances to the next value.  If there was an error making
12585// the request the iterator does not advance and the error is returned.
12586// Deprecated: Use NextWithContext() instead.
12587func (iter *PerfMonCounterCollectionIterator) Next() error {
12588	return iter.NextWithContext(context.Background())
12589}
12590
12591// NotDone returns true if the enumeration should be started or is not yet complete.
12592func (iter PerfMonCounterCollectionIterator) NotDone() bool {
12593	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12594}
12595
12596// Response returns the raw server response from the last page request.
12597func (iter PerfMonCounterCollectionIterator) Response() PerfMonCounterCollection {
12598	return iter.page.Response()
12599}
12600
12601// Value returns the current value or a zero-initialized value if the
12602// iterator has advanced beyond the end of the collection.
12603func (iter PerfMonCounterCollectionIterator) Value() PerfMonResponse {
12604	if !iter.page.NotDone() {
12605		return PerfMonResponse{}
12606	}
12607	return iter.page.Values()[iter.i]
12608}
12609
12610// Creates a new instance of the PerfMonCounterCollectionIterator type.
12611func NewPerfMonCounterCollectionIterator(page PerfMonCounterCollectionPage) PerfMonCounterCollectionIterator {
12612	return PerfMonCounterCollectionIterator{page: page}
12613}
12614
12615// IsEmpty returns true if the ListResult contains no values.
12616func (pmcc PerfMonCounterCollection) IsEmpty() bool {
12617	return pmcc.Value == nil || len(*pmcc.Value) == 0
12618}
12619
12620// hasNextLink returns true if the NextLink is not empty.
12621func (pmcc PerfMonCounterCollection) hasNextLink() bool {
12622	return pmcc.NextLink != nil && len(*pmcc.NextLink) != 0
12623}
12624
12625// perfMonCounterCollectionPreparer prepares a request to retrieve the next set of results.
12626// It returns nil if no more results exist.
12627func (pmcc PerfMonCounterCollection) perfMonCounterCollectionPreparer(ctx context.Context) (*http.Request, error) {
12628	if !pmcc.hasNextLink() {
12629		return nil, nil
12630	}
12631	return autorest.Prepare((&http.Request{}).WithContext(ctx),
12632		autorest.AsJSON(),
12633		autorest.AsGet(),
12634		autorest.WithBaseURL(to.String(pmcc.NextLink)))
12635}
12636
12637// PerfMonCounterCollectionPage contains a page of PerfMonResponse values.
12638type PerfMonCounterCollectionPage struct {
12639	fn   func(context.Context, PerfMonCounterCollection) (PerfMonCounterCollection, error)
12640	pmcc PerfMonCounterCollection
12641}
12642
12643// NextWithContext advances to the next page of values.  If there was an error making
12644// the request the page does not advance and the error is returned.
12645func (page *PerfMonCounterCollectionPage) NextWithContext(ctx context.Context) (err error) {
12646	if tracing.IsEnabled() {
12647		ctx = tracing.StartSpan(ctx, fqdn+"/PerfMonCounterCollectionPage.NextWithContext")
12648		defer func() {
12649			sc := -1
12650			if page.Response().Response.Response != nil {
12651				sc = page.Response().Response.Response.StatusCode
12652			}
12653			tracing.EndSpan(ctx, sc, err)
12654		}()
12655	}
12656	for {
12657		next, err := page.fn(ctx, page.pmcc)
12658		if err != nil {
12659			return err
12660		}
12661		page.pmcc = next
12662		if !next.hasNextLink() || !next.IsEmpty() {
12663			break
12664		}
12665	}
12666	return nil
12667}
12668
12669// Next advances to the next page of values.  If there was an error making
12670// the request the page does not advance and the error is returned.
12671// Deprecated: Use NextWithContext() instead.
12672func (page *PerfMonCounterCollectionPage) Next() error {
12673	return page.NextWithContext(context.Background())
12674}
12675
12676// NotDone returns true if the page enumeration should be started or is not yet complete.
12677func (page PerfMonCounterCollectionPage) NotDone() bool {
12678	return !page.pmcc.IsEmpty()
12679}
12680
12681// Response returns the raw server response from the last page request.
12682func (page PerfMonCounterCollectionPage) Response() PerfMonCounterCollection {
12683	return page.pmcc
12684}
12685
12686// Values returns the slice of values for the current page or nil if there are no values.
12687func (page PerfMonCounterCollectionPage) Values() []PerfMonResponse {
12688	if page.pmcc.IsEmpty() {
12689		return nil
12690	}
12691	return *page.pmcc.Value
12692}
12693
12694// Creates a new instance of the PerfMonCounterCollectionPage type.
12695func NewPerfMonCounterCollectionPage(cur PerfMonCounterCollection, getNextPage func(context.Context, PerfMonCounterCollection) (PerfMonCounterCollection, error)) PerfMonCounterCollectionPage {
12696	return PerfMonCounterCollectionPage{
12697		fn:   getNextPage,
12698		pmcc: cur,
12699	}
12700}
12701
12702// PerfMonResponse performance monitor API response.
12703type PerfMonResponse struct {
12704	// Code - The response code.
12705	Code *string `json:"code,omitempty"`
12706	// Message - The message.
12707	Message *string `json:"message,omitempty"`
12708	// Data - The performance monitor counters.
12709	Data *PerfMonSet `json:"data,omitempty"`
12710}
12711
12712// PerfMonSample performance monitor sample in a set.
12713type PerfMonSample struct {
12714	// Time - Point in time for which counter was measured.
12715	Time *date.Time `json:"time,omitempty"`
12716	// InstanceName - Name of the server on which the measurement is made.
12717	InstanceName *string `json:"instanceName,omitempty"`
12718	// Value - Value of counter at a certain time.
12719	Value *float64 `json:"value,omitempty"`
12720	// CoreCount - Core Count of worker. Not a data member
12721	CoreCount *int32 `json:"coreCount,omitempty"`
12722}
12723
12724// PerfMonSet metric information.
12725type PerfMonSet struct {
12726	// Name - Unique key name of the counter.
12727	Name *string `json:"name,omitempty"`
12728	// StartTime - Start time of the period.
12729	StartTime *date.Time `json:"startTime,omitempty"`
12730	// EndTime - End time of the period.
12731	EndTime *date.Time `json:"endTime,omitempty"`
12732	// TimeGrain - Presented time grain.
12733	TimeGrain *string `json:"timeGrain,omitempty"`
12734	// Values - Collection of workers that are active during this time.
12735	Values *[]PerfMonSample `json:"values,omitempty"`
12736}
12737
12738// PremierAddOn premier add-on.
12739type PremierAddOn struct {
12740	autorest.Response `json:"-"`
12741	// PremierAddOnProperties - PremierAddOn resource specific properties
12742	*PremierAddOnProperties `json:"properties,omitempty"`
12743	// ID - READ-ONLY; Resource Id.
12744	ID *string `json:"id,omitempty"`
12745	// Name - READ-ONLY; Resource Name.
12746	Name *string `json:"name,omitempty"`
12747	// Kind - Kind of resource.
12748	Kind *string `json:"kind,omitempty"`
12749	// Location - Resource Location.
12750	Location *string `json:"location,omitempty"`
12751	// Type - READ-ONLY; Resource type.
12752	Type *string `json:"type,omitempty"`
12753	// Tags - Resource tags.
12754	Tags map[string]*string `json:"tags"`
12755}
12756
12757// MarshalJSON is the custom marshaler for PremierAddOn.
12758func (pao PremierAddOn) MarshalJSON() ([]byte, error) {
12759	objectMap := make(map[string]interface{})
12760	if pao.PremierAddOnProperties != nil {
12761		objectMap["properties"] = pao.PremierAddOnProperties
12762	}
12763	if pao.Kind != nil {
12764		objectMap["kind"] = pao.Kind
12765	}
12766	if pao.Location != nil {
12767		objectMap["location"] = pao.Location
12768	}
12769	if pao.Tags != nil {
12770		objectMap["tags"] = pao.Tags
12771	}
12772	return json.Marshal(objectMap)
12773}
12774
12775// UnmarshalJSON is the custom unmarshaler for PremierAddOn struct.
12776func (pao *PremierAddOn) UnmarshalJSON(body []byte) error {
12777	var m map[string]*json.RawMessage
12778	err := json.Unmarshal(body, &m)
12779	if err != nil {
12780		return err
12781	}
12782	for k, v := range m {
12783		switch k {
12784		case "properties":
12785			if v != nil {
12786				var premierAddOnProperties PremierAddOnProperties
12787				err = json.Unmarshal(*v, &premierAddOnProperties)
12788				if err != nil {
12789					return err
12790				}
12791				pao.PremierAddOnProperties = &premierAddOnProperties
12792			}
12793		case "id":
12794			if v != nil {
12795				var ID string
12796				err = json.Unmarshal(*v, &ID)
12797				if err != nil {
12798					return err
12799				}
12800				pao.ID = &ID
12801			}
12802		case "name":
12803			if v != nil {
12804				var name string
12805				err = json.Unmarshal(*v, &name)
12806				if err != nil {
12807					return err
12808				}
12809				pao.Name = &name
12810			}
12811		case "kind":
12812			if v != nil {
12813				var kind string
12814				err = json.Unmarshal(*v, &kind)
12815				if err != nil {
12816					return err
12817				}
12818				pao.Kind = &kind
12819			}
12820		case "location":
12821			if v != nil {
12822				var location string
12823				err = json.Unmarshal(*v, &location)
12824				if err != nil {
12825					return err
12826				}
12827				pao.Location = &location
12828			}
12829		case "type":
12830			if v != nil {
12831				var typeVar string
12832				err = json.Unmarshal(*v, &typeVar)
12833				if err != nil {
12834					return err
12835				}
12836				pao.Type = &typeVar
12837			}
12838		case "tags":
12839			if v != nil {
12840				var tags map[string]*string
12841				err = json.Unmarshal(*v, &tags)
12842				if err != nil {
12843					return err
12844				}
12845				pao.Tags = tags
12846			}
12847		}
12848	}
12849
12850	return nil
12851}
12852
12853// PremierAddOnOffer premier add-on offer.
12854type PremierAddOnOffer struct {
12855	// PremierAddOnOfferProperties - PremierAddOnOffer resource specific properties
12856	*PremierAddOnOfferProperties `json:"properties,omitempty"`
12857	// ID - READ-ONLY; Resource Id.
12858	ID *string `json:"id,omitempty"`
12859	// Name - READ-ONLY; Resource Name.
12860	Name *string `json:"name,omitempty"`
12861	// Kind - Kind of resource.
12862	Kind *string `json:"kind,omitempty"`
12863	// Type - READ-ONLY; Resource type.
12864	Type *string `json:"type,omitempty"`
12865}
12866
12867// MarshalJSON is the custom marshaler for PremierAddOnOffer.
12868func (paoo PremierAddOnOffer) MarshalJSON() ([]byte, error) {
12869	objectMap := make(map[string]interface{})
12870	if paoo.PremierAddOnOfferProperties != nil {
12871		objectMap["properties"] = paoo.PremierAddOnOfferProperties
12872	}
12873	if paoo.Kind != nil {
12874		objectMap["kind"] = paoo.Kind
12875	}
12876	return json.Marshal(objectMap)
12877}
12878
12879// UnmarshalJSON is the custom unmarshaler for PremierAddOnOffer struct.
12880func (paoo *PremierAddOnOffer) UnmarshalJSON(body []byte) error {
12881	var m map[string]*json.RawMessage
12882	err := json.Unmarshal(body, &m)
12883	if err != nil {
12884		return err
12885	}
12886	for k, v := range m {
12887		switch k {
12888		case "properties":
12889			if v != nil {
12890				var premierAddOnOfferProperties PremierAddOnOfferProperties
12891				err = json.Unmarshal(*v, &premierAddOnOfferProperties)
12892				if err != nil {
12893					return err
12894				}
12895				paoo.PremierAddOnOfferProperties = &premierAddOnOfferProperties
12896			}
12897		case "id":
12898			if v != nil {
12899				var ID string
12900				err = json.Unmarshal(*v, &ID)
12901				if err != nil {
12902					return err
12903				}
12904				paoo.ID = &ID
12905			}
12906		case "name":
12907			if v != nil {
12908				var name string
12909				err = json.Unmarshal(*v, &name)
12910				if err != nil {
12911					return err
12912				}
12913				paoo.Name = &name
12914			}
12915		case "kind":
12916			if v != nil {
12917				var kind string
12918				err = json.Unmarshal(*v, &kind)
12919				if err != nil {
12920					return err
12921				}
12922				paoo.Kind = &kind
12923			}
12924		case "type":
12925			if v != nil {
12926				var typeVar string
12927				err = json.Unmarshal(*v, &typeVar)
12928				if err != nil {
12929					return err
12930				}
12931				paoo.Type = &typeVar
12932			}
12933		}
12934	}
12935
12936	return nil
12937}
12938
12939// PremierAddOnOfferCollection collection of premier add-on offers.
12940type PremierAddOnOfferCollection struct {
12941	autorest.Response `json:"-"`
12942	// Value - Collection of resources.
12943	Value *[]PremierAddOnOffer `json:"value,omitempty"`
12944	// NextLink - READ-ONLY; Link to next page of resources.
12945	NextLink *string `json:"nextLink,omitempty"`
12946}
12947
12948// MarshalJSON is the custom marshaler for PremierAddOnOfferCollection.
12949func (paooc PremierAddOnOfferCollection) MarshalJSON() ([]byte, error) {
12950	objectMap := make(map[string]interface{})
12951	if paooc.Value != nil {
12952		objectMap["value"] = paooc.Value
12953	}
12954	return json.Marshal(objectMap)
12955}
12956
12957// PremierAddOnOfferCollectionIterator provides access to a complete listing of PremierAddOnOffer values.
12958type PremierAddOnOfferCollectionIterator struct {
12959	i    int
12960	page PremierAddOnOfferCollectionPage
12961}
12962
12963// NextWithContext advances to the next value.  If there was an error making
12964// the request the iterator does not advance and the error is returned.
12965func (iter *PremierAddOnOfferCollectionIterator) NextWithContext(ctx context.Context) (err error) {
12966	if tracing.IsEnabled() {
12967		ctx = tracing.StartSpan(ctx, fqdn+"/PremierAddOnOfferCollectionIterator.NextWithContext")
12968		defer func() {
12969			sc := -1
12970			if iter.Response().Response.Response != nil {
12971				sc = iter.Response().Response.Response.StatusCode
12972			}
12973			tracing.EndSpan(ctx, sc, err)
12974		}()
12975	}
12976	iter.i++
12977	if iter.i < len(iter.page.Values()) {
12978		return nil
12979	}
12980	err = iter.page.NextWithContext(ctx)
12981	if err != nil {
12982		iter.i--
12983		return err
12984	}
12985	iter.i = 0
12986	return nil
12987}
12988
12989// Next advances to the next value.  If there was an error making
12990// the request the iterator does not advance and the error is returned.
12991// Deprecated: Use NextWithContext() instead.
12992func (iter *PremierAddOnOfferCollectionIterator) Next() error {
12993	return iter.NextWithContext(context.Background())
12994}
12995
12996// NotDone returns true if the enumeration should be started or is not yet complete.
12997func (iter PremierAddOnOfferCollectionIterator) NotDone() bool {
12998	return iter.page.NotDone() && iter.i < len(iter.page.Values())
12999}
13000
13001// Response returns the raw server response from the last page request.
13002func (iter PremierAddOnOfferCollectionIterator) Response() PremierAddOnOfferCollection {
13003	return iter.page.Response()
13004}
13005
13006// Value returns the current value or a zero-initialized value if the
13007// iterator has advanced beyond the end of the collection.
13008func (iter PremierAddOnOfferCollectionIterator) Value() PremierAddOnOffer {
13009	if !iter.page.NotDone() {
13010		return PremierAddOnOffer{}
13011	}
13012	return iter.page.Values()[iter.i]
13013}
13014
13015// Creates a new instance of the PremierAddOnOfferCollectionIterator type.
13016func NewPremierAddOnOfferCollectionIterator(page PremierAddOnOfferCollectionPage) PremierAddOnOfferCollectionIterator {
13017	return PremierAddOnOfferCollectionIterator{page: page}
13018}
13019
13020// IsEmpty returns true if the ListResult contains no values.
13021func (paooc PremierAddOnOfferCollection) IsEmpty() bool {
13022	return paooc.Value == nil || len(*paooc.Value) == 0
13023}
13024
13025// hasNextLink returns true if the NextLink is not empty.
13026func (paooc PremierAddOnOfferCollection) hasNextLink() bool {
13027	return paooc.NextLink != nil && len(*paooc.NextLink) != 0
13028}
13029
13030// premierAddOnOfferCollectionPreparer prepares a request to retrieve the next set of results.
13031// It returns nil if no more results exist.
13032func (paooc PremierAddOnOfferCollection) premierAddOnOfferCollectionPreparer(ctx context.Context) (*http.Request, error) {
13033	if !paooc.hasNextLink() {
13034		return nil, nil
13035	}
13036	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13037		autorest.AsJSON(),
13038		autorest.AsGet(),
13039		autorest.WithBaseURL(to.String(paooc.NextLink)))
13040}
13041
13042// PremierAddOnOfferCollectionPage contains a page of PremierAddOnOffer values.
13043type PremierAddOnOfferCollectionPage struct {
13044	fn    func(context.Context, PremierAddOnOfferCollection) (PremierAddOnOfferCollection, error)
13045	paooc PremierAddOnOfferCollection
13046}
13047
13048// NextWithContext advances to the next page of values.  If there was an error making
13049// the request the page does not advance and the error is returned.
13050func (page *PremierAddOnOfferCollectionPage) NextWithContext(ctx context.Context) (err error) {
13051	if tracing.IsEnabled() {
13052		ctx = tracing.StartSpan(ctx, fqdn+"/PremierAddOnOfferCollectionPage.NextWithContext")
13053		defer func() {
13054			sc := -1
13055			if page.Response().Response.Response != nil {
13056				sc = page.Response().Response.Response.StatusCode
13057			}
13058			tracing.EndSpan(ctx, sc, err)
13059		}()
13060	}
13061	for {
13062		next, err := page.fn(ctx, page.paooc)
13063		if err != nil {
13064			return err
13065		}
13066		page.paooc = next
13067		if !next.hasNextLink() || !next.IsEmpty() {
13068			break
13069		}
13070	}
13071	return nil
13072}
13073
13074// Next advances to the next page of values.  If there was an error making
13075// the request the page does not advance and the error is returned.
13076// Deprecated: Use NextWithContext() instead.
13077func (page *PremierAddOnOfferCollectionPage) Next() error {
13078	return page.NextWithContext(context.Background())
13079}
13080
13081// NotDone returns true if the page enumeration should be started or is not yet complete.
13082func (page PremierAddOnOfferCollectionPage) NotDone() bool {
13083	return !page.paooc.IsEmpty()
13084}
13085
13086// Response returns the raw server response from the last page request.
13087func (page PremierAddOnOfferCollectionPage) Response() PremierAddOnOfferCollection {
13088	return page.paooc
13089}
13090
13091// Values returns the slice of values for the current page or nil if there are no values.
13092func (page PremierAddOnOfferCollectionPage) Values() []PremierAddOnOffer {
13093	if page.paooc.IsEmpty() {
13094		return nil
13095	}
13096	return *page.paooc.Value
13097}
13098
13099// Creates a new instance of the PremierAddOnOfferCollectionPage type.
13100func NewPremierAddOnOfferCollectionPage(cur PremierAddOnOfferCollection, getNextPage func(context.Context, PremierAddOnOfferCollection) (PremierAddOnOfferCollection, error)) PremierAddOnOfferCollectionPage {
13101	return PremierAddOnOfferCollectionPage{
13102		fn:    getNextPage,
13103		paooc: cur,
13104	}
13105}
13106
13107// PremierAddOnOfferProperties premierAddOnOffer resource specific properties
13108type PremierAddOnOfferProperties struct {
13109	// Sku - Premier add on SKU.
13110	Sku *string `json:"sku,omitempty"`
13111	// Product - Premier add on offer Product.
13112	Product *string `json:"product,omitempty"`
13113	// Vendor - Premier add on offer Vendor.
13114	Vendor *string `json:"vendor,omitempty"`
13115	// Name - Premier add on offer Name.
13116	Name *string `json:"name,omitempty"`
13117	// PromoCodeRequired - <code>true</code> if promotion code is required; otherwise, <code>false</code>.
13118	PromoCodeRequired *bool `json:"promoCodeRequired,omitempty"`
13119	// Quota - Premier add on offer Quota.
13120	Quota *int32 `json:"quota,omitempty"`
13121	// WebHostingPlanRestrictions - App Service plans this offer is restricted to. Possible values include: 'None', 'Free', 'Shared', 'Basic', 'Standard', 'Premium'
13122	WebHostingPlanRestrictions AppServicePlanRestrictions `json:"webHostingPlanRestrictions,omitempty"`
13123	// PrivacyPolicyURL - Privacy policy URL.
13124	PrivacyPolicyURL *string `json:"privacyPolicyUrl,omitempty"`
13125	// LegalTermsURL - Legal terms URL.
13126	LegalTermsURL *string `json:"legalTermsUrl,omitempty"`
13127	// MarketplacePublisher - Marketplace publisher.
13128	MarketplacePublisher *string `json:"marketplacePublisher,omitempty"`
13129	// MarketplaceOffer - Marketplace offer.
13130	MarketplaceOffer *string `json:"marketplaceOffer,omitempty"`
13131}
13132
13133// PremierAddOnProperties premierAddOn resource specific properties
13134type PremierAddOnProperties struct {
13135	// Sku - Premier add on SKU.
13136	Sku *string `json:"sku,omitempty"`
13137	// Product - Premier add on Product.
13138	Product *string `json:"product,omitempty"`
13139	// Vendor - Premier add on Vendor.
13140	Vendor *string `json:"vendor,omitempty"`
13141	// PremierAddOnName - Premier add on Name.
13142	PremierAddOnName *string `json:"name,omitempty"`
13143	// Location - Premier add on Location.
13144	Location *string `json:"location,omitempty"`
13145	// Tags - Premier add on Tags.
13146	Tags map[string]*string `json:"tags"`
13147	// MarketplacePublisher - Premier add on Marketplace publisher.
13148	MarketplacePublisher *string `json:"marketplacePublisher,omitempty"`
13149	// MarketplaceOffer - Premier add on Marketplace offer.
13150	MarketplaceOffer *string `json:"marketplaceOffer,omitempty"`
13151}
13152
13153// MarshalJSON is the custom marshaler for PremierAddOnProperties.
13154func (pao PremierAddOnProperties) MarshalJSON() ([]byte, error) {
13155	objectMap := make(map[string]interface{})
13156	if pao.Sku != nil {
13157		objectMap["sku"] = pao.Sku
13158	}
13159	if pao.Product != nil {
13160		objectMap["product"] = pao.Product
13161	}
13162	if pao.Vendor != nil {
13163		objectMap["vendor"] = pao.Vendor
13164	}
13165	if pao.PremierAddOnName != nil {
13166		objectMap["name"] = pao.PremierAddOnName
13167	}
13168	if pao.Location != nil {
13169		objectMap["location"] = pao.Location
13170	}
13171	if pao.Tags != nil {
13172		objectMap["tags"] = pao.Tags
13173	}
13174	if pao.MarketplacePublisher != nil {
13175		objectMap["marketplacePublisher"] = pao.MarketplacePublisher
13176	}
13177	if pao.MarketplaceOffer != nil {
13178		objectMap["marketplaceOffer"] = pao.MarketplaceOffer
13179	}
13180	return json.Marshal(objectMap)
13181}
13182
13183// ProcessInfo process Information.
13184type ProcessInfo struct {
13185	autorest.Response `json:"-"`
13186	// ProcessInfoProperties - ProcessInfo resource specific properties
13187	*ProcessInfoProperties `json:"properties,omitempty"`
13188	// ID - READ-ONLY; Resource Id.
13189	ID *string `json:"id,omitempty"`
13190	// Name - READ-ONLY; Resource Name.
13191	Name *string `json:"name,omitempty"`
13192	// Kind - Kind of resource.
13193	Kind *string `json:"kind,omitempty"`
13194	// Type - READ-ONLY; Resource type.
13195	Type *string `json:"type,omitempty"`
13196}
13197
13198// MarshalJSON is the custom marshaler for ProcessInfo.
13199func (pi ProcessInfo) MarshalJSON() ([]byte, error) {
13200	objectMap := make(map[string]interface{})
13201	if pi.ProcessInfoProperties != nil {
13202		objectMap["properties"] = pi.ProcessInfoProperties
13203	}
13204	if pi.Kind != nil {
13205		objectMap["kind"] = pi.Kind
13206	}
13207	return json.Marshal(objectMap)
13208}
13209
13210// UnmarshalJSON is the custom unmarshaler for ProcessInfo struct.
13211func (pi *ProcessInfo) UnmarshalJSON(body []byte) error {
13212	var m map[string]*json.RawMessage
13213	err := json.Unmarshal(body, &m)
13214	if err != nil {
13215		return err
13216	}
13217	for k, v := range m {
13218		switch k {
13219		case "properties":
13220			if v != nil {
13221				var processInfoProperties ProcessInfoProperties
13222				err = json.Unmarshal(*v, &processInfoProperties)
13223				if err != nil {
13224					return err
13225				}
13226				pi.ProcessInfoProperties = &processInfoProperties
13227			}
13228		case "id":
13229			if v != nil {
13230				var ID string
13231				err = json.Unmarshal(*v, &ID)
13232				if err != nil {
13233					return err
13234				}
13235				pi.ID = &ID
13236			}
13237		case "name":
13238			if v != nil {
13239				var name string
13240				err = json.Unmarshal(*v, &name)
13241				if err != nil {
13242					return err
13243				}
13244				pi.Name = &name
13245			}
13246		case "kind":
13247			if v != nil {
13248				var kind string
13249				err = json.Unmarshal(*v, &kind)
13250				if err != nil {
13251					return err
13252				}
13253				pi.Kind = &kind
13254			}
13255		case "type":
13256			if v != nil {
13257				var typeVar string
13258				err = json.Unmarshal(*v, &typeVar)
13259				if err != nil {
13260					return err
13261				}
13262				pi.Type = &typeVar
13263			}
13264		}
13265	}
13266
13267	return nil
13268}
13269
13270// ProcessInfoCollection collection of Kudu process information elements.
13271type ProcessInfoCollection struct {
13272	autorest.Response `json:"-"`
13273	// Value - Collection of resources.
13274	Value *[]ProcessInfo `json:"value,omitempty"`
13275	// NextLink - READ-ONLY; Link to next page of resources.
13276	NextLink *string `json:"nextLink,omitempty"`
13277}
13278
13279// MarshalJSON is the custom marshaler for ProcessInfoCollection.
13280func (pic ProcessInfoCollection) MarshalJSON() ([]byte, error) {
13281	objectMap := make(map[string]interface{})
13282	if pic.Value != nil {
13283		objectMap["value"] = pic.Value
13284	}
13285	return json.Marshal(objectMap)
13286}
13287
13288// ProcessInfoCollectionIterator provides access to a complete listing of ProcessInfo values.
13289type ProcessInfoCollectionIterator struct {
13290	i    int
13291	page ProcessInfoCollectionPage
13292}
13293
13294// NextWithContext advances to the next value.  If there was an error making
13295// the request the iterator does not advance and the error is returned.
13296func (iter *ProcessInfoCollectionIterator) NextWithContext(ctx context.Context) (err error) {
13297	if tracing.IsEnabled() {
13298		ctx = tracing.StartSpan(ctx, fqdn+"/ProcessInfoCollectionIterator.NextWithContext")
13299		defer func() {
13300			sc := -1
13301			if iter.Response().Response.Response != nil {
13302				sc = iter.Response().Response.Response.StatusCode
13303			}
13304			tracing.EndSpan(ctx, sc, err)
13305		}()
13306	}
13307	iter.i++
13308	if iter.i < len(iter.page.Values()) {
13309		return nil
13310	}
13311	err = iter.page.NextWithContext(ctx)
13312	if err != nil {
13313		iter.i--
13314		return err
13315	}
13316	iter.i = 0
13317	return nil
13318}
13319
13320// Next advances to the next value.  If there was an error making
13321// the request the iterator does not advance and the error is returned.
13322// Deprecated: Use NextWithContext() instead.
13323func (iter *ProcessInfoCollectionIterator) Next() error {
13324	return iter.NextWithContext(context.Background())
13325}
13326
13327// NotDone returns true if the enumeration should be started or is not yet complete.
13328func (iter ProcessInfoCollectionIterator) NotDone() bool {
13329	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13330}
13331
13332// Response returns the raw server response from the last page request.
13333func (iter ProcessInfoCollectionIterator) Response() ProcessInfoCollection {
13334	return iter.page.Response()
13335}
13336
13337// Value returns the current value or a zero-initialized value if the
13338// iterator has advanced beyond the end of the collection.
13339func (iter ProcessInfoCollectionIterator) Value() ProcessInfo {
13340	if !iter.page.NotDone() {
13341		return ProcessInfo{}
13342	}
13343	return iter.page.Values()[iter.i]
13344}
13345
13346// Creates a new instance of the ProcessInfoCollectionIterator type.
13347func NewProcessInfoCollectionIterator(page ProcessInfoCollectionPage) ProcessInfoCollectionIterator {
13348	return ProcessInfoCollectionIterator{page: page}
13349}
13350
13351// IsEmpty returns true if the ListResult contains no values.
13352func (pic ProcessInfoCollection) IsEmpty() bool {
13353	return pic.Value == nil || len(*pic.Value) == 0
13354}
13355
13356// hasNextLink returns true if the NextLink is not empty.
13357func (pic ProcessInfoCollection) hasNextLink() bool {
13358	return pic.NextLink != nil && len(*pic.NextLink) != 0
13359}
13360
13361// processInfoCollectionPreparer prepares a request to retrieve the next set of results.
13362// It returns nil if no more results exist.
13363func (pic ProcessInfoCollection) processInfoCollectionPreparer(ctx context.Context) (*http.Request, error) {
13364	if !pic.hasNextLink() {
13365		return nil, nil
13366	}
13367	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13368		autorest.AsJSON(),
13369		autorest.AsGet(),
13370		autorest.WithBaseURL(to.String(pic.NextLink)))
13371}
13372
13373// ProcessInfoCollectionPage contains a page of ProcessInfo values.
13374type ProcessInfoCollectionPage struct {
13375	fn  func(context.Context, ProcessInfoCollection) (ProcessInfoCollection, error)
13376	pic ProcessInfoCollection
13377}
13378
13379// NextWithContext advances to the next page of values.  If there was an error making
13380// the request the page does not advance and the error is returned.
13381func (page *ProcessInfoCollectionPage) NextWithContext(ctx context.Context) (err error) {
13382	if tracing.IsEnabled() {
13383		ctx = tracing.StartSpan(ctx, fqdn+"/ProcessInfoCollectionPage.NextWithContext")
13384		defer func() {
13385			sc := -1
13386			if page.Response().Response.Response != nil {
13387				sc = page.Response().Response.Response.StatusCode
13388			}
13389			tracing.EndSpan(ctx, sc, err)
13390		}()
13391	}
13392	for {
13393		next, err := page.fn(ctx, page.pic)
13394		if err != nil {
13395			return err
13396		}
13397		page.pic = next
13398		if !next.hasNextLink() || !next.IsEmpty() {
13399			break
13400		}
13401	}
13402	return nil
13403}
13404
13405// Next advances to the next page of values.  If there was an error making
13406// the request the page does not advance and the error is returned.
13407// Deprecated: Use NextWithContext() instead.
13408func (page *ProcessInfoCollectionPage) Next() error {
13409	return page.NextWithContext(context.Background())
13410}
13411
13412// NotDone returns true if the page enumeration should be started or is not yet complete.
13413func (page ProcessInfoCollectionPage) NotDone() bool {
13414	return !page.pic.IsEmpty()
13415}
13416
13417// Response returns the raw server response from the last page request.
13418func (page ProcessInfoCollectionPage) Response() ProcessInfoCollection {
13419	return page.pic
13420}
13421
13422// Values returns the slice of values for the current page or nil if there are no values.
13423func (page ProcessInfoCollectionPage) Values() []ProcessInfo {
13424	if page.pic.IsEmpty() {
13425		return nil
13426	}
13427	return *page.pic.Value
13428}
13429
13430// Creates a new instance of the ProcessInfoCollectionPage type.
13431func NewProcessInfoCollectionPage(cur ProcessInfoCollection, getNextPage func(context.Context, ProcessInfoCollection) (ProcessInfoCollection, error)) ProcessInfoCollectionPage {
13432	return ProcessInfoCollectionPage{
13433		fn:  getNextPage,
13434		pic: cur,
13435	}
13436}
13437
13438// ProcessInfoProperties processInfo resource specific properties
13439type ProcessInfoProperties struct {
13440	// ID - ARM Identifier for deployment.
13441	ID *int32 `json:"id,omitempty"`
13442	// Name - Deployment name.
13443	Name *string `json:"name,omitempty"`
13444	// Href - HRef URI.
13445	Href *string `json:"href,omitempty"`
13446	// MiniDump - Minidump URI.
13447	MiniDump *string `json:"miniDump,omitempty"`
13448	// IsProfileRunning - Is profile running?
13449	IsProfileRunning *bool `json:"isProfileRunning,omitempty"`
13450	// IsIisProfileRunning - Is the IIS Profile running?
13451	IsIisProfileRunning *bool `json:"isIisProfileRunning,omitempty"`
13452	// IisProfileTimeoutInSeconds - IIS Profile timeout (seconds).
13453	IisProfileTimeoutInSeconds *float64 `json:"iisProfileTimeoutInSeconds,omitempty"`
13454	// Parent - Parent process.
13455	Parent *string `json:"parent,omitempty"`
13456	// Children - Child process list.
13457	Children *[]string `json:"children,omitempty"`
13458	// Threads - Thread list.
13459	Threads *[]ProcessThreadInfo `json:"threads,omitempty"`
13460	// OpenFileHandles - List of open files.
13461	OpenFileHandles *[]string `json:"openFileHandles,omitempty"`
13462	// Modules - List of modules.
13463	Modules *[]ProcessModuleInfo `json:"modules,omitempty"`
13464	// FileName - File name of this process.
13465	FileName *string `json:"fileName,omitempty"`
13466	// CommandLine - Command line.
13467	CommandLine *string `json:"commandLine,omitempty"`
13468	// UserName - User name.
13469	UserName *string `json:"userName,omitempty"`
13470	// HandleCount - Handle count.
13471	HandleCount *int32 `json:"handleCount,omitempty"`
13472	// ModuleCount - Module count.
13473	ModuleCount *int32 `json:"moduleCount,omitempty"`
13474	// ThreadCount - Thread count.
13475	ThreadCount *int32 `json:"threadCount,omitempty"`
13476	// StartTime - Start time.
13477	StartTime *date.Time `json:"startTime,omitempty"`
13478	// TotalProcessorTime - Total CPU time.
13479	TotalProcessorTime *string `json:"totalProcessorTime,omitempty"`
13480	// UserProcessorTime - User CPU time.
13481	UserProcessorTime *string `json:"userProcessorTime,omitempty"`
13482	// PrivilegedProcessorTime - Privileged CPU time.
13483	PrivilegedProcessorTime *string `json:"privilegedProcessorTime,omitempty"`
13484	// WorkingSet64 - Working set.
13485	WorkingSet64 *int64 `json:"workingSet64,omitempty"`
13486	// PeakWorkingSet64 - Peak working set.
13487	PeakWorkingSet64 *int64 `json:"peakWorkingSet64,omitempty"`
13488	// PrivateMemorySize64 - Private memory size.
13489	PrivateMemorySize64 *int64 `json:"privateMemorySize64,omitempty"`
13490	// VirtualMemorySize64 - Virtual memory size.
13491	VirtualMemorySize64 *int64 `json:"virtualMemorySize64,omitempty"`
13492	// PeakVirtualMemorySize64 - Peak virtual memory usage.
13493	PeakVirtualMemorySize64 *int64 `json:"peakVirtualMemorySize64,omitempty"`
13494	// PagedSystemMemorySize64 - Paged system memory.
13495	PagedSystemMemorySize64 *int64 `json:"pagedSystemMemorySize64,omitempty"`
13496	// NonpagedSystemMemorySize64 - Non-paged system memory.
13497	NonpagedSystemMemorySize64 *int64 `json:"nonpagedSystemMemorySize64,omitempty"`
13498	// PagedMemorySize64 - Paged memory.
13499	PagedMemorySize64 *int64 `json:"pagedMemorySize64,omitempty"`
13500	// PeakPagedMemorySize64 - Peak paged memory.
13501	PeakPagedMemorySize64 *int64 `json:"peakPagedMemorySize64,omitempty"`
13502	// TimeStamp - Time stamp.
13503	TimeStamp *date.Time `json:"timeStamp,omitempty"`
13504	// EnvironmentVariables - List of environment variables.
13505	EnvironmentVariables map[string]*string `json:"environmentVariables"`
13506	// IsScmSite - Is this the SCM site?
13507	IsScmSite *bool `json:"isScmSite,omitempty"`
13508	// IsWebJob - Is this a Web Job?
13509	IsWebJob *bool `json:"isWebJob,omitempty"`
13510	// Description - Description of process.
13511	Description *string `json:"description,omitempty"`
13512}
13513
13514// MarshalJSON is the custom marshaler for ProcessInfoProperties.
13515func (pi ProcessInfoProperties) MarshalJSON() ([]byte, error) {
13516	objectMap := make(map[string]interface{})
13517	if pi.ID != nil {
13518		objectMap["id"] = pi.ID
13519	}
13520	if pi.Name != nil {
13521		objectMap["name"] = pi.Name
13522	}
13523	if pi.Href != nil {
13524		objectMap["href"] = pi.Href
13525	}
13526	if pi.MiniDump != nil {
13527		objectMap["miniDump"] = pi.MiniDump
13528	}
13529	if pi.IsProfileRunning != nil {
13530		objectMap["isProfileRunning"] = pi.IsProfileRunning
13531	}
13532	if pi.IsIisProfileRunning != nil {
13533		objectMap["isIisProfileRunning"] = pi.IsIisProfileRunning
13534	}
13535	if pi.IisProfileTimeoutInSeconds != nil {
13536		objectMap["iisProfileTimeoutInSeconds"] = pi.IisProfileTimeoutInSeconds
13537	}
13538	if pi.Parent != nil {
13539		objectMap["parent"] = pi.Parent
13540	}
13541	if pi.Children != nil {
13542		objectMap["children"] = pi.Children
13543	}
13544	if pi.Threads != nil {
13545		objectMap["threads"] = pi.Threads
13546	}
13547	if pi.OpenFileHandles != nil {
13548		objectMap["openFileHandles"] = pi.OpenFileHandles
13549	}
13550	if pi.Modules != nil {
13551		objectMap["modules"] = pi.Modules
13552	}
13553	if pi.FileName != nil {
13554		objectMap["fileName"] = pi.FileName
13555	}
13556	if pi.CommandLine != nil {
13557		objectMap["commandLine"] = pi.CommandLine
13558	}
13559	if pi.UserName != nil {
13560		objectMap["userName"] = pi.UserName
13561	}
13562	if pi.HandleCount != nil {
13563		objectMap["handleCount"] = pi.HandleCount
13564	}
13565	if pi.ModuleCount != nil {
13566		objectMap["moduleCount"] = pi.ModuleCount
13567	}
13568	if pi.ThreadCount != nil {
13569		objectMap["threadCount"] = pi.ThreadCount
13570	}
13571	if pi.StartTime != nil {
13572		objectMap["startTime"] = pi.StartTime
13573	}
13574	if pi.TotalProcessorTime != nil {
13575		objectMap["totalProcessorTime"] = pi.TotalProcessorTime
13576	}
13577	if pi.UserProcessorTime != nil {
13578		objectMap["userProcessorTime"] = pi.UserProcessorTime
13579	}
13580	if pi.PrivilegedProcessorTime != nil {
13581		objectMap["privilegedProcessorTime"] = pi.PrivilegedProcessorTime
13582	}
13583	if pi.WorkingSet64 != nil {
13584		objectMap["workingSet64"] = pi.WorkingSet64
13585	}
13586	if pi.PeakWorkingSet64 != nil {
13587		objectMap["peakWorkingSet64"] = pi.PeakWorkingSet64
13588	}
13589	if pi.PrivateMemorySize64 != nil {
13590		objectMap["privateMemorySize64"] = pi.PrivateMemorySize64
13591	}
13592	if pi.VirtualMemorySize64 != nil {
13593		objectMap["virtualMemorySize64"] = pi.VirtualMemorySize64
13594	}
13595	if pi.PeakVirtualMemorySize64 != nil {
13596		objectMap["peakVirtualMemorySize64"] = pi.PeakVirtualMemorySize64
13597	}
13598	if pi.PagedSystemMemorySize64 != nil {
13599		objectMap["pagedSystemMemorySize64"] = pi.PagedSystemMemorySize64
13600	}
13601	if pi.NonpagedSystemMemorySize64 != nil {
13602		objectMap["nonpagedSystemMemorySize64"] = pi.NonpagedSystemMemorySize64
13603	}
13604	if pi.PagedMemorySize64 != nil {
13605		objectMap["pagedMemorySize64"] = pi.PagedMemorySize64
13606	}
13607	if pi.PeakPagedMemorySize64 != nil {
13608		objectMap["peakPagedMemorySize64"] = pi.PeakPagedMemorySize64
13609	}
13610	if pi.TimeStamp != nil {
13611		objectMap["timeStamp"] = pi.TimeStamp
13612	}
13613	if pi.EnvironmentVariables != nil {
13614		objectMap["environmentVariables"] = pi.EnvironmentVariables
13615	}
13616	if pi.IsScmSite != nil {
13617		objectMap["isScmSite"] = pi.IsScmSite
13618	}
13619	if pi.IsWebJob != nil {
13620		objectMap["isWebJob"] = pi.IsWebJob
13621	}
13622	if pi.Description != nil {
13623		objectMap["description"] = pi.Description
13624	}
13625	return json.Marshal(objectMap)
13626}
13627
13628// ProcessModuleInfo process Module Information.
13629type ProcessModuleInfo struct {
13630	autorest.Response `json:"-"`
13631	// ProcessModuleInfoProperties - ProcessModuleInfo resource specific properties
13632	*ProcessModuleInfoProperties `json:"properties,omitempty"`
13633	// ID - READ-ONLY; Resource Id.
13634	ID *string `json:"id,omitempty"`
13635	// Name - READ-ONLY; Resource Name.
13636	Name *string `json:"name,omitempty"`
13637	// Kind - Kind of resource.
13638	Kind *string `json:"kind,omitempty"`
13639	// Type - READ-ONLY; Resource type.
13640	Type *string `json:"type,omitempty"`
13641}
13642
13643// MarshalJSON is the custom marshaler for ProcessModuleInfo.
13644func (pmi ProcessModuleInfo) MarshalJSON() ([]byte, error) {
13645	objectMap := make(map[string]interface{})
13646	if pmi.ProcessModuleInfoProperties != nil {
13647		objectMap["properties"] = pmi.ProcessModuleInfoProperties
13648	}
13649	if pmi.Kind != nil {
13650		objectMap["kind"] = pmi.Kind
13651	}
13652	return json.Marshal(objectMap)
13653}
13654
13655// UnmarshalJSON is the custom unmarshaler for ProcessModuleInfo struct.
13656func (pmi *ProcessModuleInfo) UnmarshalJSON(body []byte) error {
13657	var m map[string]*json.RawMessage
13658	err := json.Unmarshal(body, &m)
13659	if err != nil {
13660		return err
13661	}
13662	for k, v := range m {
13663		switch k {
13664		case "properties":
13665			if v != nil {
13666				var processModuleInfoProperties ProcessModuleInfoProperties
13667				err = json.Unmarshal(*v, &processModuleInfoProperties)
13668				if err != nil {
13669					return err
13670				}
13671				pmi.ProcessModuleInfoProperties = &processModuleInfoProperties
13672			}
13673		case "id":
13674			if v != nil {
13675				var ID string
13676				err = json.Unmarshal(*v, &ID)
13677				if err != nil {
13678					return err
13679				}
13680				pmi.ID = &ID
13681			}
13682		case "name":
13683			if v != nil {
13684				var name string
13685				err = json.Unmarshal(*v, &name)
13686				if err != nil {
13687					return err
13688				}
13689				pmi.Name = &name
13690			}
13691		case "kind":
13692			if v != nil {
13693				var kind string
13694				err = json.Unmarshal(*v, &kind)
13695				if err != nil {
13696					return err
13697				}
13698				pmi.Kind = &kind
13699			}
13700		case "type":
13701			if v != nil {
13702				var typeVar string
13703				err = json.Unmarshal(*v, &typeVar)
13704				if err != nil {
13705					return err
13706				}
13707				pmi.Type = &typeVar
13708			}
13709		}
13710	}
13711
13712	return nil
13713}
13714
13715// ProcessModuleInfoCollection collection of Kudu thread information elements.
13716type ProcessModuleInfoCollection struct {
13717	autorest.Response `json:"-"`
13718	// Value - Collection of resources.
13719	Value *[]ProcessModuleInfo `json:"value,omitempty"`
13720	// NextLink - READ-ONLY; Link to next page of resources.
13721	NextLink *string `json:"nextLink,omitempty"`
13722}
13723
13724// MarshalJSON is the custom marshaler for ProcessModuleInfoCollection.
13725func (pmic ProcessModuleInfoCollection) MarshalJSON() ([]byte, error) {
13726	objectMap := make(map[string]interface{})
13727	if pmic.Value != nil {
13728		objectMap["value"] = pmic.Value
13729	}
13730	return json.Marshal(objectMap)
13731}
13732
13733// ProcessModuleInfoCollectionIterator provides access to a complete listing of ProcessModuleInfo values.
13734type ProcessModuleInfoCollectionIterator struct {
13735	i    int
13736	page ProcessModuleInfoCollectionPage
13737}
13738
13739// NextWithContext advances to the next value.  If there was an error making
13740// the request the iterator does not advance and the error is returned.
13741func (iter *ProcessModuleInfoCollectionIterator) NextWithContext(ctx context.Context) (err error) {
13742	if tracing.IsEnabled() {
13743		ctx = tracing.StartSpan(ctx, fqdn+"/ProcessModuleInfoCollectionIterator.NextWithContext")
13744		defer func() {
13745			sc := -1
13746			if iter.Response().Response.Response != nil {
13747				sc = iter.Response().Response.Response.StatusCode
13748			}
13749			tracing.EndSpan(ctx, sc, err)
13750		}()
13751	}
13752	iter.i++
13753	if iter.i < len(iter.page.Values()) {
13754		return nil
13755	}
13756	err = iter.page.NextWithContext(ctx)
13757	if err != nil {
13758		iter.i--
13759		return err
13760	}
13761	iter.i = 0
13762	return nil
13763}
13764
13765// Next advances to the next value.  If there was an error making
13766// the request the iterator does not advance and the error is returned.
13767// Deprecated: Use NextWithContext() instead.
13768func (iter *ProcessModuleInfoCollectionIterator) Next() error {
13769	return iter.NextWithContext(context.Background())
13770}
13771
13772// NotDone returns true if the enumeration should be started or is not yet complete.
13773func (iter ProcessModuleInfoCollectionIterator) NotDone() bool {
13774	return iter.page.NotDone() && iter.i < len(iter.page.Values())
13775}
13776
13777// Response returns the raw server response from the last page request.
13778func (iter ProcessModuleInfoCollectionIterator) Response() ProcessModuleInfoCollection {
13779	return iter.page.Response()
13780}
13781
13782// Value returns the current value or a zero-initialized value if the
13783// iterator has advanced beyond the end of the collection.
13784func (iter ProcessModuleInfoCollectionIterator) Value() ProcessModuleInfo {
13785	if !iter.page.NotDone() {
13786		return ProcessModuleInfo{}
13787	}
13788	return iter.page.Values()[iter.i]
13789}
13790
13791// Creates a new instance of the ProcessModuleInfoCollectionIterator type.
13792func NewProcessModuleInfoCollectionIterator(page ProcessModuleInfoCollectionPage) ProcessModuleInfoCollectionIterator {
13793	return ProcessModuleInfoCollectionIterator{page: page}
13794}
13795
13796// IsEmpty returns true if the ListResult contains no values.
13797func (pmic ProcessModuleInfoCollection) IsEmpty() bool {
13798	return pmic.Value == nil || len(*pmic.Value) == 0
13799}
13800
13801// hasNextLink returns true if the NextLink is not empty.
13802func (pmic ProcessModuleInfoCollection) hasNextLink() bool {
13803	return pmic.NextLink != nil && len(*pmic.NextLink) != 0
13804}
13805
13806// processModuleInfoCollectionPreparer prepares a request to retrieve the next set of results.
13807// It returns nil if no more results exist.
13808func (pmic ProcessModuleInfoCollection) processModuleInfoCollectionPreparer(ctx context.Context) (*http.Request, error) {
13809	if !pmic.hasNextLink() {
13810		return nil, nil
13811	}
13812	return autorest.Prepare((&http.Request{}).WithContext(ctx),
13813		autorest.AsJSON(),
13814		autorest.AsGet(),
13815		autorest.WithBaseURL(to.String(pmic.NextLink)))
13816}
13817
13818// ProcessModuleInfoCollectionPage contains a page of ProcessModuleInfo values.
13819type ProcessModuleInfoCollectionPage struct {
13820	fn   func(context.Context, ProcessModuleInfoCollection) (ProcessModuleInfoCollection, error)
13821	pmic ProcessModuleInfoCollection
13822}
13823
13824// NextWithContext advances to the next page of values.  If there was an error making
13825// the request the page does not advance and the error is returned.
13826func (page *ProcessModuleInfoCollectionPage) NextWithContext(ctx context.Context) (err error) {
13827	if tracing.IsEnabled() {
13828		ctx = tracing.StartSpan(ctx, fqdn+"/ProcessModuleInfoCollectionPage.NextWithContext")
13829		defer func() {
13830			sc := -1
13831			if page.Response().Response.Response != nil {
13832				sc = page.Response().Response.Response.StatusCode
13833			}
13834			tracing.EndSpan(ctx, sc, err)
13835		}()
13836	}
13837	for {
13838		next, err := page.fn(ctx, page.pmic)
13839		if err != nil {
13840			return err
13841		}
13842		page.pmic = next
13843		if !next.hasNextLink() || !next.IsEmpty() {
13844			break
13845		}
13846	}
13847	return nil
13848}
13849
13850// Next advances to the next page of values.  If there was an error making
13851// the request the page does not advance and the error is returned.
13852// Deprecated: Use NextWithContext() instead.
13853func (page *ProcessModuleInfoCollectionPage) Next() error {
13854	return page.NextWithContext(context.Background())
13855}
13856
13857// NotDone returns true if the page enumeration should be started or is not yet complete.
13858func (page ProcessModuleInfoCollectionPage) NotDone() bool {
13859	return !page.pmic.IsEmpty()
13860}
13861
13862// Response returns the raw server response from the last page request.
13863func (page ProcessModuleInfoCollectionPage) Response() ProcessModuleInfoCollection {
13864	return page.pmic
13865}
13866
13867// Values returns the slice of values for the current page or nil if there are no values.
13868func (page ProcessModuleInfoCollectionPage) Values() []ProcessModuleInfo {
13869	if page.pmic.IsEmpty() {
13870		return nil
13871	}
13872	return *page.pmic.Value
13873}
13874
13875// Creates a new instance of the ProcessModuleInfoCollectionPage type.
13876func NewProcessModuleInfoCollectionPage(cur ProcessModuleInfoCollection, getNextPage func(context.Context, ProcessModuleInfoCollection) (ProcessModuleInfoCollection, error)) ProcessModuleInfoCollectionPage {
13877	return ProcessModuleInfoCollectionPage{
13878		fn:   getNextPage,
13879		pmic: cur,
13880	}
13881}
13882
13883// ProcessModuleInfoProperties processModuleInfo resource specific properties
13884type ProcessModuleInfoProperties struct {
13885	// BaseAddress - Base address. Used as module identifier in ARM resource URI.
13886	BaseAddress *string `json:"baseAddress,omitempty"`
13887	// FileName - File name.
13888	FileName *string `json:"fileName,omitempty"`
13889	// Href - HRef URI.
13890	Href *string `json:"href,omitempty"`
13891	// FilePath - File path.
13892	FilePath *string `json:"filePath,omitempty"`
13893	// ModuleMemorySize - Module memory size.
13894	ModuleMemorySize *int32 `json:"moduleMemorySize,omitempty"`
13895	// FileVersion - File version.
13896	FileVersion *string `json:"fileVersion,omitempty"`
13897	// FileDescription - File description.
13898	FileDescription *string `json:"fileDescription,omitempty"`
13899	// Product - Product name.
13900	Product *string `json:"product,omitempty"`
13901	// ProductVersion - Product version.
13902	ProductVersion *string `json:"productVersion,omitempty"`
13903	// IsDebug - Is debug?
13904	IsDebug *bool `json:"isDebug,omitempty"`
13905	// Language - Module language (locale).
13906	Language *string `json:"language,omitempty"`
13907}
13908
13909// ProcessThreadInfo process Thread Information.
13910type ProcessThreadInfo struct {
13911	autorest.Response `json:"-"`
13912	// ProcessThreadInfoProperties - ProcessThreadInfo resource specific properties
13913	*ProcessThreadInfoProperties `json:"properties,omitempty"`
13914	// ID - READ-ONLY; Resource Id.
13915	ID *string `json:"id,omitempty"`
13916	// Name - READ-ONLY; Resource Name.
13917	Name *string `json:"name,omitempty"`
13918	// Kind - Kind of resource.
13919	Kind *string `json:"kind,omitempty"`
13920	// Type - READ-ONLY; Resource type.
13921	Type *string `json:"type,omitempty"`
13922}
13923
13924// MarshalJSON is the custom marshaler for ProcessThreadInfo.
13925func (pti ProcessThreadInfo) MarshalJSON() ([]byte, error) {
13926	objectMap := make(map[string]interface{})
13927	if pti.ProcessThreadInfoProperties != nil {
13928		objectMap["properties"] = pti.ProcessThreadInfoProperties
13929	}
13930	if pti.Kind != nil {
13931		objectMap["kind"] = pti.Kind
13932	}
13933	return json.Marshal(objectMap)
13934}
13935
13936// UnmarshalJSON is the custom unmarshaler for ProcessThreadInfo struct.
13937func (pti *ProcessThreadInfo) UnmarshalJSON(body []byte) error {
13938	var m map[string]*json.RawMessage
13939	err := json.Unmarshal(body, &m)
13940	if err != nil {
13941		return err
13942	}
13943	for k, v := range m {
13944		switch k {
13945		case "properties":
13946			if v != nil {
13947				var processThreadInfoProperties ProcessThreadInfoProperties
13948				err = json.Unmarshal(*v, &processThreadInfoProperties)
13949				if err != nil {
13950					return err
13951				}
13952				pti.ProcessThreadInfoProperties = &processThreadInfoProperties
13953			}
13954		case "id":
13955			if v != nil {
13956				var ID string
13957				err = json.Unmarshal(*v, &ID)
13958				if err != nil {
13959					return err
13960				}
13961				pti.ID = &ID
13962			}
13963		case "name":
13964			if v != nil {
13965				var name string
13966				err = json.Unmarshal(*v, &name)
13967				if err != nil {
13968					return err
13969				}
13970				pti.Name = &name
13971			}
13972		case "kind":
13973			if v != nil {
13974				var kind string
13975				err = json.Unmarshal(*v, &kind)
13976				if err != nil {
13977					return err
13978				}
13979				pti.Kind = &kind
13980			}
13981		case "type":
13982			if v != nil {
13983				var typeVar string
13984				err = json.Unmarshal(*v, &typeVar)
13985				if err != nil {
13986					return err
13987				}
13988				pti.Type = &typeVar
13989			}
13990		}
13991	}
13992
13993	return nil
13994}
13995
13996// ProcessThreadInfoCollection collection of Kudu thread information elements.
13997type ProcessThreadInfoCollection struct {
13998	autorest.Response `json:"-"`
13999	// Value - Collection of resources.
14000	Value *[]ProcessThreadInfo `json:"value,omitempty"`
14001	// NextLink - READ-ONLY; Link to next page of resources.
14002	NextLink *string `json:"nextLink,omitempty"`
14003}
14004
14005// MarshalJSON is the custom marshaler for ProcessThreadInfoCollection.
14006func (ptic ProcessThreadInfoCollection) MarshalJSON() ([]byte, error) {
14007	objectMap := make(map[string]interface{})
14008	if ptic.Value != nil {
14009		objectMap["value"] = ptic.Value
14010	}
14011	return json.Marshal(objectMap)
14012}
14013
14014// ProcessThreadInfoCollectionIterator provides access to a complete listing of ProcessThreadInfo values.
14015type ProcessThreadInfoCollectionIterator struct {
14016	i    int
14017	page ProcessThreadInfoCollectionPage
14018}
14019
14020// NextWithContext advances to the next value.  If there was an error making
14021// the request the iterator does not advance and the error is returned.
14022func (iter *ProcessThreadInfoCollectionIterator) NextWithContext(ctx context.Context) (err error) {
14023	if tracing.IsEnabled() {
14024		ctx = tracing.StartSpan(ctx, fqdn+"/ProcessThreadInfoCollectionIterator.NextWithContext")
14025		defer func() {
14026			sc := -1
14027			if iter.Response().Response.Response != nil {
14028				sc = iter.Response().Response.Response.StatusCode
14029			}
14030			tracing.EndSpan(ctx, sc, err)
14031		}()
14032	}
14033	iter.i++
14034	if iter.i < len(iter.page.Values()) {
14035		return nil
14036	}
14037	err = iter.page.NextWithContext(ctx)
14038	if err != nil {
14039		iter.i--
14040		return err
14041	}
14042	iter.i = 0
14043	return nil
14044}
14045
14046// Next advances to the next value.  If there was an error making
14047// the request the iterator does not advance and the error is returned.
14048// Deprecated: Use NextWithContext() instead.
14049func (iter *ProcessThreadInfoCollectionIterator) Next() error {
14050	return iter.NextWithContext(context.Background())
14051}
14052
14053// NotDone returns true if the enumeration should be started or is not yet complete.
14054func (iter ProcessThreadInfoCollectionIterator) NotDone() bool {
14055	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14056}
14057
14058// Response returns the raw server response from the last page request.
14059func (iter ProcessThreadInfoCollectionIterator) Response() ProcessThreadInfoCollection {
14060	return iter.page.Response()
14061}
14062
14063// Value returns the current value or a zero-initialized value if the
14064// iterator has advanced beyond the end of the collection.
14065func (iter ProcessThreadInfoCollectionIterator) Value() ProcessThreadInfo {
14066	if !iter.page.NotDone() {
14067		return ProcessThreadInfo{}
14068	}
14069	return iter.page.Values()[iter.i]
14070}
14071
14072// Creates a new instance of the ProcessThreadInfoCollectionIterator type.
14073func NewProcessThreadInfoCollectionIterator(page ProcessThreadInfoCollectionPage) ProcessThreadInfoCollectionIterator {
14074	return ProcessThreadInfoCollectionIterator{page: page}
14075}
14076
14077// IsEmpty returns true if the ListResult contains no values.
14078func (ptic ProcessThreadInfoCollection) IsEmpty() bool {
14079	return ptic.Value == nil || len(*ptic.Value) == 0
14080}
14081
14082// hasNextLink returns true if the NextLink is not empty.
14083func (ptic ProcessThreadInfoCollection) hasNextLink() bool {
14084	return ptic.NextLink != nil && len(*ptic.NextLink) != 0
14085}
14086
14087// processThreadInfoCollectionPreparer prepares a request to retrieve the next set of results.
14088// It returns nil if no more results exist.
14089func (ptic ProcessThreadInfoCollection) processThreadInfoCollectionPreparer(ctx context.Context) (*http.Request, error) {
14090	if !ptic.hasNextLink() {
14091		return nil, nil
14092	}
14093	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14094		autorest.AsJSON(),
14095		autorest.AsGet(),
14096		autorest.WithBaseURL(to.String(ptic.NextLink)))
14097}
14098
14099// ProcessThreadInfoCollectionPage contains a page of ProcessThreadInfo values.
14100type ProcessThreadInfoCollectionPage struct {
14101	fn   func(context.Context, ProcessThreadInfoCollection) (ProcessThreadInfoCollection, error)
14102	ptic ProcessThreadInfoCollection
14103}
14104
14105// NextWithContext advances to the next page of values.  If there was an error making
14106// the request the page does not advance and the error is returned.
14107func (page *ProcessThreadInfoCollectionPage) NextWithContext(ctx context.Context) (err error) {
14108	if tracing.IsEnabled() {
14109		ctx = tracing.StartSpan(ctx, fqdn+"/ProcessThreadInfoCollectionPage.NextWithContext")
14110		defer func() {
14111			sc := -1
14112			if page.Response().Response.Response != nil {
14113				sc = page.Response().Response.Response.StatusCode
14114			}
14115			tracing.EndSpan(ctx, sc, err)
14116		}()
14117	}
14118	for {
14119		next, err := page.fn(ctx, page.ptic)
14120		if err != nil {
14121			return err
14122		}
14123		page.ptic = next
14124		if !next.hasNextLink() || !next.IsEmpty() {
14125			break
14126		}
14127	}
14128	return nil
14129}
14130
14131// Next advances to the next page of values.  If there was an error making
14132// the request the page does not advance and the error is returned.
14133// Deprecated: Use NextWithContext() instead.
14134func (page *ProcessThreadInfoCollectionPage) Next() error {
14135	return page.NextWithContext(context.Background())
14136}
14137
14138// NotDone returns true if the page enumeration should be started or is not yet complete.
14139func (page ProcessThreadInfoCollectionPage) NotDone() bool {
14140	return !page.ptic.IsEmpty()
14141}
14142
14143// Response returns the raw server response from the last page request.
14144func (page ProcessThreadInfoCollectionPage) Response() ProcessThreadInfoCollection {
14145	return page.ptic
14146}
14147
14148// Values returns the slice of values for the current page or nil if there are no values.
14149func (page ProcessThreadInfoCollectionPage) Values() []ProcessThreadInfo {
14150	if page.ptic.IsEmpty() {
14151		return nil
14152	}
14153	return *page.ptic.Value
14154}
14155
14156// Creates a new instance of the ProcessThreadInfoCollectionPage type.
14157func NewProcessThreadInfoCollectionPage(cur ProcessThreadInfoCollection, getNextPage func(context.Context, ProcessThreadInfoCollection) (ProcessThreadInfoCollection, error)) ProcessThreadInfoCollectionPage {
14158	return ProcessThreadInfoCollectionPage{
14159		fn:   getNextPage,
14160		ptic: cur,
14161	}
14162}
14163
14164// ProcessThreadInfoProperties processThreadInfo resource specific properties
14165type ProcessThreadInfoProperties struct {
14166	// ID - ARM Identifier for deployment.
14167	ID *int32 `json:"id,omitempty"`
14168	// Href - HRef URI.
14169	Href *string `json:"href,omitempty"`
14170	// Process - Process URI.
14171	Process *string `json:"process,omitempty"`
14172	// StartAddress - Start address.
14173	StartAddress *string `json:"startAddress,omitempty"`
14174	// CurrentPriority - Current thread priority.
14175	CurrentPriority *int32 `json:"currentPriority,omitempty"`
14176	// PriorityLevel - Thread priority level.
14177	PriorityLevel *string `json:"priorityLevel,omitempty"`
14178	// BasePriority - Base priority.
14179	BasePriority *int32 `json:"basePriority,omitempty"`
14180	// StartTime - Start time.
14181	StartTime *date.Time `json:"startTime,omitempty"`
14182	// TotalProcessorTime - Total processor time.
14183	TotalProcessorTime *string `json:"totalProcessorTime,omitempty"`
14184	// UserProcessorTime - User processor time.
14185	UserProcessorTime *string `json:"userProcessorTime,omitempty"`
14186	// PriviledgedProcessorTime - Privileged processor time.
14187	PriviledgedProcessorTime *string `json:"priviledgedProcessorTime,omitempty"`
14188	// State - Thread state.
14189	State *string `json:"state,omitempty"`
14190	// WaitReason - Wait reason.
14191	WaitReason *string `json:"waitReason,omitempty"`
14192}
14193
14194// ProxyOnlyResource azure proxy only resource. This resource is not tracked by Azure Resource Manager.
14195type ProxyOnlyResource struct {
14196	// ID - READ-ONLY; Resource Id.
14197	ID *string `json:"id,omitempty"`
14198	// Name - READ-ONLY; Resource Name.
14199	Name *string `json:"name,omitempty"`
14200	// Kind - Kind of resource.
14201	Kind *string `json:"kind,omitempty"`
14202	// Type - READ-ONLY; Resource type.
14203	Type *string `json:"type,omitempty"`
14204}
14205
14206// MarshalJSON is the custom marshaler for ProxyOnlyResource.
14207func (por ProxyOnlyResource) MarshalJSON() ([]byte, error) {
14208	objectMap := make(map[string]interface{})
14209	if por.Kind != nil {
14210		objectMap["kind"] = por.Kind
14211	}
14212	return json.Marshal(objectMap)
14213}
14214
14215// PublicCertificate public certificate object
14216type PublicCertificate struct {
14217	autorest.Response `json:"-"`
14218	// PublicCertificateProperties - PublicCertificate resource specific properties
14219	*PublicCertificateProperties `json:"properties,omitempty"`
14220	// ID - READ-ONLY; Resource Id.
14221	ID *string `json:"id,omitempty"`
14222	// Name - READ-ONLY; Resource Name.
14223	Name *string `json:"name,omitempty"`
14224	// Kind - Kind of resource.
14225	Kind *string `json:"kind,omitempty"`
14226	// Type - READ-ONLY; Resource type.
14227	Type *string `json:"type,omitempty"`
14228}
14229
14230// MarshalJSON is the custom marshaler for PublicCertificate.
14231func (pc PublicCertificate) MarshalJSON() ([]byte, error) {
14232	objectMap := make(map[string]interface{})
14233	if pc.PublicCertificateProperties != nil {
14234		objectMap["properties"] = pc.PublicCertificateProperties
14235	}
14236	if pc.Kind != nil {
14237		objectMap["kind"] = pc.Kind
14238	}
14239	return json.Marshal(objectMap)
14240}
14241
14242// UnmarshalJSON is the custom unmarshaler for PublicCertificate struct.
14243func (pc *PublicCertificate) UnmarshalJSON(body []byte) error {
14244	var m map[string]*json.RawMessage
14245	err := json.Unmarshal(body, &m)
14246	if err != nil {
14247		return err
14248	}
14249	for k, v := range m {
14250		switch k {
14251		case "properties":
14252			if v != nil {
14253				var publicCertificateProperties PublicCertificateProperties
14254				err = json.Unmarshal(*v, &publicCertificateProperties)
14255				if err != nil {
14256					return err
14257				}
14258				pc.PublicCertificateProperties = &publicCertificateProperties
14259			}
14260		case "id":
14261			if v != nil {
14262				var ID string
14263				err = json.Unmarshal(*v, &ID)
14264				if err != nil {
14265					return err
14266				}
14267				pc.ID = &ID
14268			}
14269		case "name":
14270			if v != nil {
14271				var name string
14272				err = json.Unmarshal(*v, &name)
14273				if err != nil {
14274					return err
14275				}
14276				pc.Name = &name
14277			}
14278		case "kind":
14279			if v != nil {
14280				var kind string
14281				err = json.Unmarshal(*v, &kind)
14282				if err != nil {
14283					return err
14284				}
14285				pc.Kind = &kind
14286			}
14287		case "type":
14288			if v != nil {
14289				var typeVar string
14290				err = json.Unmarshal(*v, &typeVar)
14291				if err != nil {
14292					return err
14293				}
14294				pc.Type = &typeVar
14295			}
14296		}
14297	}
14298
14299	return nil
14300}
14301
14302// PublicCertificateCollection collection of public certificates
14303type PublicCertificateCollection struct {
14304	autorest.Response `json:"-"`
14305	// Value - Collection of resources.
14306	Value *[]PublicCertificate `json:"value,omitempty"`
14307	// NextLink - READ-ONLY; Link to next page of resources.
14308	NextLink *string `json:"nextLink,omitempty"`
14309}
14310
14311// MarshalJSON is the custom marshaler for PublicCertificateCollection.
14312func (pcc PublicCertificateCollection) MarshalJSON() ([]byte, error) {
14313	objectMap := make(map[string]interface{})
14314	if pcc.Value != nil {
14315		objectMap["value"] = pcc.Value
14316	}
14317	return json.Marshal(objectMap)
14318}
14319
14320// PublicCertificateCollectionIterator provides access to a complete listing of PublicCertificate values.
14321type PublicCertificateCollectionIterator struct {
14322	i    int
14323	page PublicCertificateCollectionPage
14324}
14325
14326// NextWithContext advances to the next value.  If there was an error making
14327// the request the iterator does not advance and the error is returned.
14328func (iter *PublicCertificateCollectionIterator) NextWithContext(ctx context.Context) (err error) {
14329	if tracing.IsEnabled() {
14330		ctx = tracing.StartSpan(ctx, fqdn+"/PublicCertificateCollectionIterator.NextWithContext")
14331		defer func() {
14332			sc := -1
14333			if iter.Response().Response.Response != nil {
14334				sc = iter.Response().Response.Response.StatusCode
14335			}
14336			tracing.EndSpan(ctx, sc, err)
14337		}()
14338	}
14339	iter.i++
14340	if iter.i < len(iter.page.Values()) {
14341		return nil
14342	}
14343	err = iter.page.NextWithContext(ctx)
14344	if err != nil {
14345		iter.i--
14346		return err
14347	}
14348	iter.i = 0
14349	return nil
14350}
14351
14352// Next advances to the next value.  If there was an error making
14353// the request the iterator does not advance and the error is returned.
14354// Deprecated: Use NextWithContext() instead.
14355func (iter *PublicCertificateCollectionIterator) Next() error {
14356	return iter.NextWithContext(context.Background())
14357}
14358
14359// NotDone returns true if the enumeration should be started or is not yet complete.
14360func (iter PublicCertificateCollectionIterator) NotDone() bool {
14361	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14362}
14363
14364// Response returns the raw server response from the last page request.
14365func (iter PublicCertificateCollectionIterator) Response() PublicCertificateCollection {
14366	return iter.page.Response()
14367}
14368
14369// Value returns the current value or a zero-initialized value if the
14370// iterator has advanced beyond the end of the collection.
14371func (iter PublicCertificateCollectionIterator) Value() PublicCertificate {
14372	if !iter.page.NotDone() {
14373		return PublicCertificate{}
14374	}
14375	return iter.page.Values()[iter.i]
14376}
14377
14378// Creates a new instance of the PublicCertificateCollectionIterator type.
14379func NewPublicCertificateCollectionIterator(page PublicCertificateCollectionPage) PublicCertificateCollectionIterator {
14380	return PublicCertificateCollectionIterator{page: page}
14381}
14382
14383// IsEmpty returns true if the ListResult contains no values.
14384func (pcc PublicCertificateCollection) IsEmpty() bool {
14385	return pcc.Value == nil || len(*pcc.Value) == 0
14386}
14387
14388// hasNextLink returns true if the NextLink is not empty.
14389func (pcc PublicCertificateCollection) hasNextLink() bool {
14390	return pcc.NextLink != nil && len(*pcc.NextLink) != 0
14391}
14392
14393// publicCertificateCollectionPreparer prepares a request to retrieve the next set of results.
14394// It returns nil if no more results exist.
14395func (pcc PublicCertificateCollection) publicCertificateCollectionPreparer(ctx context.Context) (*http.Request, error) {
14396	if !pcc.hasNextLink() {
14397		return nil, nil
14398	}
14399	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14400		autorest.AsJSON(),
14401		autorest.AsGet(),
14402		autorest.WithBaseURL(to.String(pcc.NextLink)))
14403}
14404
14405// PublicCertificateCollectionPage contains a page of PublicCertificate values.
14406type PublicCertificateCollectionPage struct {
14407	fn  func(context.Context, PublicCertificateCollection) (PublicCertificateCollection, error)
14408	pcc PublicCertificateCollection
14409}
14410
14411// NextWithContext advances to the next page of values.  If there was an error making
14412// the request the page does not advance and the error is returned.
14413func (page *PublicCertificateCollectionPage) NextWithContext(ctx context.Context) (err error) {
14414	if tracing.IsEnabled() {
14415		ctx = tracing.StartSpan(ctx, fqdn+"/PublicCertificateCollectionPage.NextWithContext")
14416		defer func() {
14417			sc := -1
14418			if page.Response().Response.Response != nil {
14419				sc = page.Response().Response.Response.StatusCode
14420			}
14421			tracing.EndSpan(ctx, sc, err)
14422		}()
14423	}
14424	for {
14425		next, err := page.fn(ctx, page.pcc)
14426		if err != nil {
14427			return err
14428		}
14429		page.pcc = next
14430		if !next.hasNextLink() || !next.IsEmpty() {
14431			break
14432		}
14433	}
14434	return nil
14435}
14436
14437// Next advances to the next page of values.  If there was an error making
14438// the request the page does not advance and the error is returned.
14439// Deprecated: Use NextWithContext() instead.
14440func (page *PublicCertificateCollectionPage) Next() error {
14441	return page.NextWithContext(context.Background())
14442}
14443
14444// NotDone returns true if the page enumeration should be started or is not yet complete.
14445func (page PublicCertificateCollectionPage) NotDone() bool {
14446	return !page.pcc.IsEmpty()
14447}
14448
14449// Response returns the raw server response from the last page request.
14450func (page PublicCertificateCollectionPage) Response() PublicCertificateCollection {
14451	return page.pcc
14452}
14453
14454// Values returns the slice of values for the current page or nil if there are no values.
14455func (page PublicCertificateCollectionPage) Values() []PublicCertificate {
14456	if page.pcc.IsEmpty() {
14457		return nil
14458	}
14459	return *page.pcc.Value
14460}
14461
14462// Creates a new instance of the PublicCertificateCollectionPage type.
14463func NewPublicCertificateCollectionPage(cur PublicCertificateCollection, getNextPage func(context.Context, PublicCertificateCollection) (PublicCertificateCollection, error)) PublicCertificateCollectionPage {
14464	return PublicCertificateCollectionPage{
14465		fn:  getNextPage,
14466		pcc: cur,
14467	}
14468}
14469
14470// PublicCertificateProperties publicCertificate resource specific properties
14471type PublicCertificateProperties struct {
14472	// Blob - Public Certificate byte array
14473	Blob *[]byte `json:"blob,omitempty"`
14474	// PublicCertificateLocation - Public Certificate Location. Possible values include: 'PublicCertificateLocationCurrentUserMy', 'PublicCertificateLocationLocalMachineMy', 'PublicCertificateLocationUnknown'
14475	PublicCertificateLocation PublicCertificateLocation `json:"publicCertificateLocation,omitempty"`
14476	// Thumbprint - READ-ONLY; Certificate Thumbprint
14477	Thumbprint *string `json:"thumbprint,omitempty"`
14478}
14479
14480// MarshalJSON is the custom marshaler for PublicCertificateProperties.
14481func (pc PublicCertificateProperties) MarshalJSON() ([]byte, error) {
14482	objectMap := make(map[string]interface{})
14483	if pc.Blob != nil {
14484		objectMap["blob"] = pc.Blob
14485	}
14486	if pc.PublicCertificateLocation != "" {
14487		objectMap["publicCertificateLocation"] = pc.PublicCertificateLocation
14488	}
14489	return json.Marshal(objectMap)
14490}
14491
14492// PushSettings push settings for the App.
14493type PushSettings struct {
14494	autorest.Response `json:"-"`
14495	// PushSettingsProperties - PushSettings resource specific properties
14496	*PushSettingsProperties `json:"properties,omitempty"`
14497	// ID - READ-ONLY; Resource Id.
14498	ID *string `json:"id,omitempty"`
14499	// Name - READ-ONLY; Resource Name.
14500	Name *string `json:"name,omitempty"`
14501	// Kind - Kind of resource.
14502	Kind *string `json:"kind,omitempty"`
14503	// Type - READ-ONLY; Resource type.
14504	Type *string `json:"type,omitempty"`
14505}
14506
14507// MarshalJSON is the custom marshaler for PushSettings.
14508func (ps PushSettings) MarshalJSON() ([]byte, error) {
14509	objectMap := make(map[string]interface{})
14510	if ps.PushSettingsProperties != nil {
14511		objectMap["properties"] = ps.PushSettingsProperties
14512	}
14513	if ps.Kind != nil {
14514		objectMap["kind"] = ps.Kind
14515	}
14516	return json.Marshal(objectMap)
14517}
14518
14519// UnmarshalJSON is the custom unmarshaler for PushSettings struct.
14520func (ps *PushSettings) UnmarshalJSON(body []byte) error {
14521	var m map[string]*json.RawMessage
14522	err := json.Unmarshal(body, &m)
14523	if err != nil {
14524		return err
14525	}
14526	for k, v := range m {
14527		switch k {
14528		case "properties":
14529			if v != nil {
14530				var pushSettingsProperties PushSettingsProperties
14531				err = json.Unmarshal(*v, &pushSettingsProperties)
14532				if err != nil {
14533					return err
14534				}
14535				ps.PushSettingsProperties = &pushSettingsProperties
14536			}
14537		case "id":
14538			if v != nil {
14539				var ID string
14540				err = json.Unmarshal(*v, &ID)
14541				if err != nil {
14542					return err
14543				}
14544				ps.ID = &ID
14545			}
14546		case "name":
14547			if v != nil {
14548				var name string
14549				err = json.Unmarshal(*v, &name)
14550				if err != nil {
14551					return err
14552				}
14553				ps.Name = &name
14554			}
14555		case "kind":
14556			if v != nil {
14557				var kind string
14558				err = json.Unmarshal(*v, &kind)
14559				if err != nil {
14560					return err
14561				}
14562				ps.Kind = &kind
14563			}
14564		case "type":
14565			if v != nil {
14566				var typeVar string
14567				err = json.Unmarshal(*v, &typeVar)
14568				if err != nil {
14569					return err
14570				}
14571				ps.Type = &typeVar
14572			}
14573		}
14574	}
14575
14576	return nil
14577}
14578
14579// PushSettingsProperties pushSettings resource specific properties
14580type PushSettingsProperties struct {
14581	// IsPushEnabled - Gets or sets a flag indicating whether the Push endpoint is enabled.
14582	IsPushEnabled *bool `json:"isPushEnabled,omitempty"`
14583	// TagWhitelistJSON - Gets or sets a JSON string containing a list of tags that are whitelisted for use by the push registration endpoint.
14584	TagWhitelistJSON *string `json:"tagWhitelistJson,omitempty"`
14585	// TagsRequiringAuth - Gets or sets a JSON string containing a list of tags that require user authentication to be used in the push registration endpoint.
14586	// Tags can consist of alphanumeric characters and the following:
14587	// '_', '@', '#', '.', ':', '-'.
14588	// Validation should be performed at the PushRequestHandler.
14589	TagsRequiringAuth *string `json:"tagsRequiringAuth,omitempty"`
14590	// DynamicTagsJSON - Gets or sets a JSON string containing a list of dynamic tags that will be evaluated from user claims in the push registration endpoint.
14591	DynamicTagsJSON *string `json:"dynamicTagsJson,omitempty"`
14592}
14593
14594// RampUpRule routing rules for ramp up testing. This rule allows to redirect static traffic % to a slot or
14595// to gradually change routing % based on performance.
14596type RampUpRule struct {
14597	// ActionHostName - Hostname of a slot to which the traffic will be redirected if decided to. E.g. myapp-stage.azurewebsites.net.
14598	ActionHostName *string `json:"actionHostName,omitempty"`
14599	// ReroutePercentage - Percentage of the traffic which will be redirected to <code>ActionHostName</code>.
14600	ReroutePercentage *float64 `json:"reroutePercentage,omitempty"`
14601	// ChangeStep - In auto ramp up scenario this is the step to add/remove from <code>ReroutePercentage</code> until it reaches
14602	// <code>MinReroutePercentage</code> or <code>MaxReroutePercentage</code>. Site metrics are checked every N minutes specified in <code>ChangeIntervalInMinutes</code>.
14603	// Custom decision algorithm can be provided in TiPCallback site extension which URL can be specified in <code>ChangeDecisionCallbackUrl</code>.
14604	ChangeStep *float64 `json:"changeStep,omitempty"`
14605	// ChangeIntervalInMinutes - Specifies interval in minutes to reevaluate ReroutePercentage.
14606	ChangeIntervalInMinutes *int32 `json:"changeIntervalInMinutes,omitempty"`
14607	// MinReroutePercentage - Specifies lower boundary above which ReroutePercentage will stay.
14608	MinReroutePercentage *float64 `json:"minReroutePercentage,omitempty"`
14609	// MaxReroutePercentage - Specifies upper boundary below which ReroutePercentage will stay.
14610	MaxReroutePercentage *float64 `json:"maxReroutePercentage,omitempty"`
14611	// ChangeDecisionCallbackURL - Custom decision algorithm can be provided in TiPCallback site extension which URL can be specified. See TiPCallback site extension for the scaffold and contracts.
14612	// https://www.siteextensions.net/packages/TiPCallback/
14613	ChangeDecisionCallbackURL *string `json:"changeDecisionCallbackUrl,omitempty"`
14614	// Name - Name of the routing rule. The recommended name would be to point to the slot which will receive the traffic in the experiment.
14615	Name *string `json:"name,omitempty"`
14616}
14617
14618// ReadCloser ...
14619type ReadCloser struct {
14620	autorest.Response `json:"-"`
14621	Value             *io.ReadCloser `json:"value,omitempty"`
14622}
14623
14624// Recommendation represents a recommendation result generated by the recommendation engine.
14625type Recommendation struct {
14626	// RecommendationProperties - Recommendation resource specific properties
14627	*RecommendationProperties `json:"properties,omitempty"`
14628	// ID - READ-ONLY; Resource Id.
14629	ID *string `json:"id,omitempty"`
14630	// Name - READ-ONLY; Resource Name.
14631	Name *string `json:"name,omitempty"`
14632	// Kind - Kind of resource.
14633	Kind *string `json:"kind,omitempty"`
14634	// Type - READ-ONLY; Resource type.
14635	Type *string `json:"type,omitempty"`
14636}
14637
14638// MarshalJSON is the custom marshaler for Recommendation.
14639func (r Recommendation) MarshalJSON() ([]byte, error) {
14640	objectMap := make(map[string]interface{})
14641	if r.RecommendationProperties != nil {
14642		objectMap["properties"] = r.RecommendationProperties
14643	}
14644	if r.Kind != nil {
14645		objectMap["kind"] = r.Kind
14646	}
14647	return json.Marshal(objectMap)
14648}
14649
14650// UnmarshalJSON is the custom unmarshaler for Recommendation struct.
14651func (r *Recommendation) UnmarshalJSON(body []byte) error {
14652	var m map[string]*json.RawMessage
14653	err := json.Unmarshal(body, &m)
14654	if err != nil {
14655		return err
14656	}
14657	for k, v := range m {
14658		switch k {
14659		case "properties":
14660			if v != nil {
14661				var recommendationProperties RecommendationProperties
14662				err = json.Unmarshal(*v, &recommendationProperties)
14663				if err != nil {
14664					return err
14665				}
14666				r.RecommendationProperties = &recommendationProperties
14667			}
14668		case "id":
14669			if v != nil {
14670				var ID string
14671				err = json.Unmarshal(*v, &ID)
14672				if err != nil {
14673					return err
14674				}
14675				r.ID = &ID
14676			}
14677		case "name":
14678			if v != nil {
14679				var name string
14680				err = json.Unmarshal(*v, &name)
14681				if err != nil {
14682					return err
14683				}
14684				r.Name = &name
14685			}
14686		case "kind":
14687			if v != nil {
14688				var kind string
14689				err = json.Unmarshal(*v, &kind)
14690				if err != nil {
14691					return err
14692				}
14693				r.Kind = &kind
14694			}
14695		case "type":
14696			if v != nil {
14697				var typeVar string
14698				err = json.Unmarshal(*v, &typeVar)
14699				if err != nil {
14700					return err
14701				}
14702				r.Type = &typeVar
14703			}
14704		}
14705	}
14706
14707	return nil
14708}
14709
14710// RecommendationCollection collection of recommendations.
14711type RecommendationCollection struct {
14712	autorest.Response `json:"-"`
14713	// Value - Collection of resources.
14714	Value *[]Recommendation `json:"value,omitempty"`
14715	// NextLink - READ-ONLY; Link to next page of resources.
14716	NextLink *string `json:"nextLink,omitempty"`
14717}
14718
14719// MarshalJSON is the custom marshaler for RecommendationCollection.
14720func (rc RecommendationCollection) MarshalJSON() ([]byte, error) {
14721	objectMap := make(map[string]interface{})
14722	if rc.Value != nil {
14723		objectMap["value"] = rc.Value
14724	}
14725	return json.Marshal(objectMap)
14726}
14727
14728// RecommendationCollectionIterator provides access to a complete listing of Recommendation values.
14729type RecommendationCollectionIterator struct {
14730	i    int
14731	page RecommendationCollectionPage
14732}
14733
14734// NextWithContext advances to the next value.  If there was an error making
14735// the request the iterator does not advance and the error is returned.
14736func (iter *RecommendationCollectionIterator) NextWithContext(ctx context.Context) (err error) {
14737	if tracing.IsEnabled() {
14738		ctx = tracing.StartSpan(ctx, fqdn+"/RecommendationCollectionIterator.NextWithContext")
14739		defer func() {
14740			sc := -1
14741			if iter.Response().Response.Response != nil {
14742				sc = iter.Response().Response.Response.StatusCode
14743			}
14744			tracing.EndSpan(ctx, sc, err)
14745		}()
14746	}
14747	iter.i++
14748	if iter.i < len(iter.page.Values()) {
14749		return nil
14750	}
14751	err = iter.page.NextWithContext(ctx)
14752	if err != nil {
14753		iter.i--
14754		return err
14755	}
14756	iter.i = 0
14757	return nil
14758}
14759
14760// Next advances to the next value.  If there was an error making
14761// the request the iterator does not advance and the error is returned.
14762// Deprecated: Use NextWithContext() instead.
14763func (iter *RecommendationCollectionIterator) Next() error {
14764	return iter.NextWithContext(context.Background())
14765}
14766
14767// NotDone returns true if the enumeration should be started or is not yet complete.
14768func (iter RecommendationCollectionIterator) NotDone() bool {
14769	return iter.page.NotDone() && iter.i < len(iter.page.Values())
14770}
14771
14772// Response returns the raw server response from the last page request.
14773func (iter RecommendationCollectionIterator) Response() RecommendationCollection {
14774	return iter.page.Response()
14775}
14776
14777// Value returns the current value or a zero-initialized value if the
14778// iterator has advanced beyond the end of the collection.
14779func (iter RecommendationCollectionIterator) Value() Recommendation {
14780	if !iter.page.NotDone() {
14781		return Recommendation{}
14782	}
14783	return iter.page.Values()[iter.i]
14784}
14785
14786// Creates a new instance of the RecommendationCollectionIterator type.
14787func NewRecommendationCollectionIterator(page RecommendationCollectionPage) RecommendationCollectionIterator {
14788	return RecommendationCollectionIterator{page: page}
14789}
14790
14791// IsEmpty returns true if the ListResult contains no values.
14792func (rc RecommendationCollection) IsEmpty() bool {
14793	return rc.Value == nil || len(*rc.Value) == 0
14794}
14795
14796// hasNextLink returns true if the NextLink is not empty.
14797func (rc RecommendationCollection) hasNextLink() bool {
14798	return rc.NextLink != nil && len(*rc.NextLink) != 0
14799}
14800
14801// recommendationCollectionPreparer prepares a request to retrieve the next set of results.
14802// It returns nil if no more results exist.
14803func (rc RecommendationCollection) recommendationCollectionPreparer(ctx context.Context) (*http.Request, error) {
14804	if !rc.hasNextLink() {
14805		return nil, nil
14806	}
14807	return autorest.Prepare((&http.Request{}).WithContext(ctx),
14808		autorest.AsJSON(),
14809		autorest.AsGet(),
14810		autorest.WithBaseURL(to.String(rc.NextLink)))
14811}
14812
14813// RecommendationCollectionPage contains a page of Recommendation values.
14814type RecommendationCollectionPage struct {
14815	fn func(context.Context, RecommendationCollection) (RecommendationCollection, error)
14816	rc RecommendationCollection
14817}
14818
14819// NextWithContext advances to the next page of values.  If there was an error making
14820// the request the page does not advance and the error is returned.
14821func (page *RecommendationCollectionPage) NextWithContext(ctx context.Context) (err error) {
14822	if tracing.IsEnabled() {
14823		ctx = tracing.StartSpan(ctx, fqdn+"/RecommendationCollectionPage.NextWithContext")
14824		defer func() {
14825			sc := -1
14826			if page.Response().Response.Response != nil {
14827				sc = page.Response().Response.Response.StatusCode
14828			}
14829			tracing.EndSpan(ctx, sc, err)
14830		}()
14831	}
14832	for {
14833		next, err := page.fn(ctx, page.rc)
14834		if err != nil {
14835			return err
14836		}
14837		page.rc = next
14838		if !next.hasNextLink() || !next.IsEmpty() {
14839			break
14840		}
14841	}
14842	return nil
14843}
14844
14845// Next advances to the next page of values.  If there was an error making
14846// the request the page does not advance and the error is returned.
14847// Deprecated: Use NextWithContext() instead.
14848func (page *RecommendationCollectionPage) Next() error {
14849	return page.NextWithContext(context.Background())
14850}
14851
14852// NotDone returns true if the page enumeration should be started or is not yet complete.
14853func (page RecommendationCollectionPage) NotDone() bool {
14854	return !page.rc.IsEmpty()
14855}
14856
14857// Response returns the raw server response from the last page request.
14858func (page RecommendationCollectionPage) Response() RecommendationCollection {
14859	return page.rc
14860}
14861
14862// Values returns the slice of values for the current page or nil if there are no values.
14863func (page RecommendationCollectionPage) Values() []Recommendation {
14864	if page.rc.IsEmpty() {
14865		return nil
14866	}
14867	return *page.rc.Value
14868}
14869
14870// Creates a new instance of the RecommendationCollectionPage type.
14871func NewRecommendationCollectionPage(cur RecommendationCollection, getNextPage func(context.Context, RecommendationCollection) (RecommendationCollection, error)) RecommendationCollectionPage {
14872	return RecommendationCollectionPage{
14873		fn: getNextPage,
14874		rc: cur,
14875	}
14876}
14877
14878// RecommendationProperties recommendation resource specific properties
14879type RecommendationProperties struct {
14880	// CreationTime - Timestamp when this instance was created.
14881	CreationTime *date.Time `json:"creationTime,omitempty"`
14882	// RecommendationID - A GUID value that each recommendation object is associated with.
14883	RecommendationID *uuid.UUID `json:"recommendationId,omitempty"`
14884	// ResourceID - Full ARM resource ID string that this recommendation object is associated with.
14885	ResourceID *string `json:"resourceId,omitempty"`
14886	// ResourceScope - Name of a resource type this recommendation applies, e.g. Subscription, ServerFarm, Site. Possible values include: 'ServerFarm', 'Subscription', 'WebSite'
14887	ResourceScope ResourceScopeType `json:"resourceScope,omitempty"`
14888	// RuleName - Unique name of the rule.
14889	RuleName *string `json:"ruleName,omitempty"`
14890	// DisplayName - UI friendly name of the rule (may not be unique).
14891	DisplayName *string `json:"displayName,omitempty"`
14892	// Message - Recommendation text.
14893	Message *string `json:"message,omitempty"`
14894	// Level - Level indicating how critical this recommendation can impact. Possible values include: 'NotificationLevelCritical', 'NotificationLevelWarning', 'NotificationLevelInformation', 'NotificationLevelNonUrgentSuggestion'
14895	Level NotificationLevel `json:"level,omitempty"`
14896	// Channels - List of channels that this recommendation can apply. Possible values include: 'Notification', 'API', 'Email', 'Webhook', 'All'
14897	Channels Channels `json:"channels,omitempty"`
14898	// Tags - The list of category tags that this recommendation belongs to.
14899	Tags *[]string `json:"tags,omitempty"`
14900	// ActionName - Name of action recommended by this object.
14901	ActionName *string `json:"actionName,omitempty"`
14902	// StartTime - The beginning time in UTC of a range that the recommendation refers to.
14903	StartTime *date.Time `json:"startTime,omitempty"`
14904	// EndTime - The end time in UTC of a range that the recommendation refers to.
14905	EndTime *date.Time `json:"endTime,omitempty"`
14906	// NextNotificationTime - When to notify this recommendation next in UTC. Null means that this will never be notified anymore.
14907	NextNotificationTime *date.Time `json:"nextNotificationTime,omitempty"`
14908	// NotificationExpirationTime - Date and time in UTC when this notification expires.
14909	NotificationExpirationTime *date.Time `json:"notificationExpirationTime,omitempty"`
14910	// NotifiedTime - Last timestamp in UTC this instance was actually notified. Null means that this recommendation hasn't been notified yet.
14911	NotifiedTime *date.Time `json:"notifiedTime,omitempty"`
14912	// Score - A metric value measured by the rule.
14913	Score *float64 `json:"score,omitempty"`
14914	// IsDynamic - True if this is associated with a dynamically added rule
14915	IsDynamic *bool `json:"isDynamic,omitempty"`
14916	// ExtensionName - Extension name of the portal if exists.
14917	ExtensionName *string `json:"extensionName,omitempty"`
14918	// BladeName - Deep link to a blade on the portal.
14919	BladeName *string `json:"bladeName,omitempty"`
14920	// ForwardLink - Forward link to an external document associated with the rule.
14921	ForwardLink *string `json:"forwardLink,omitempty"`
14922}
14923
14924// RecommendationRule represents a recommendation rule that the recommendation engine can perform.
14925type RecommendationRule struct {
14926	autorest.Response `json:"-"`
14927	// RecommendationRuleProperties - RecommendationRule resource specific properties
14928	*RecommendationRuleProperties `json:"properties,omitempty"`
14929	// ID - READ-ONLY; Resource Id.
14930	ID *string `json:"id,omitempty"`
14931	// Name - READ-ONLY; Resource Name.
14932	Name *string `json:"name,omitempty"`
14933	// Kind - Kind of resource.
14934	Kind *string `json:"kind,omitempty"`
14935	// Type - READ-ONLY; Resource type.
14936	Type *string `json:"type,omitempty"`
14937}
14938
14939// MarshalJSON is the custom marshaler for RecommendationRule.
14940func (rr RecommendationRule) MarshalJSON() ([]byte, error) {
14941	objectMap := make(map[string]interface{})
14942	if rr.RecommendationRuleProperties != nil {
14943		objectMap["properties"] = rr.RecommendationRuleProperties
14944	}
14945	if rr.Kind != nil {
14946		objectMap["kind"] = rr.Kind
14947	}
14948	return json.Marshal(objectMap)
14949}
14950
14951// UnmarshalJSON is the custom unmarshaler for RecommendationRule struct.
14952func (rr *RecommendationRule) UnmarshalJSON(body []byte) error {
14953	var m map[string]*json.RawMessage
14954	err := json.Unmarshal(body, &m)
14955	if err != nil {
14956		return err
14957	}
14958	for k, v := range m {
14959		switch k {
14960		case "properties":
14961			if v != nil {
14962				var recommendationRuleProperties RecommendationRuleProperties
14963				err = json.Unmarshal(*v, &recommendationRuleProperties)
14964				if err != nil {
14965					return err
14966				}
14967				rr.RecommendationRuleProperties = &recommendationRuleProperties
14968			}
14969		case "id":
14970			if v != nil {
14971				var ID string
14972				err = json.Unmarshal(*v, &ID)
14973				if err != nil {
14974					return err
14975				}
14976				rr.ID = &ID
14977			}
14978		case "name":
14979			if v != nil {
14980				var name string
14981				err = json.Unmarshal(*v, &name)
14982				if err != nil {
14983					return err
14984				}
14985				rr.Name = &name
14986			}
14987		case "kind":
14988			if v != nil {
14989				var kind string
14990				err = json.Unmarshal(*v, &kind)
14991				if err != nil {
14992					return err
14993				}
14994				rr.Kind = &kind
14995			}
14996		case "type":
14997			if v != nil {
14998				var typeVar string
14999				err = json.Unmarshal(*v, &typeVar)
15000				if err != nil {
15001					return err
15002				}
15003				rr.Type = &typeVar
15004			}
15005		}
15006	}
15007
15008	return nil
15009}
15010
15011// RecommendationRuleProperties recommendationRule resource specific properties
15012type RecommendationRuleProperties struct {
15013	// Name - Unique name of the rule.
15014	Name *string `json:"name,omitempty"`
15015	// DisplayName - UI friendly name of the rule.
15016	DisplayName *string `json:"displayName,omitempty"`
15017	// Message - Localized name of the rule (Good for UI).
15018	Message *string `json:"message,omitempty"`
15019	// RecommendationID - Recommendation ID of an associated recommendation object tied to the rule, if exists.
15020	// If such an object doesn't exist, it is set to null.
15021	RecommendationID *uuid.UUID `json:"recommendationId,omitempty"`
15022	// Description - Localized detailed description of the rule.
15023	Description *string `json:"description,omitempty"`
15024	// ActionName - Name of action that is recommended by this rule in string.
15025	ActionName *string `json:"actionName,omitempty"`
15026	// Level - Level of impact indicating how critical this rule is. Possible values include: 'NotificationLevelCritical', 'NotificationLevelWarning', 'NotificationLevelInformation', 'NotificationLevelNonUrgentSuggestion'
15027	Level NotificationLevel `json:"level,omitempty"`
15028	// Channels - List of available channels that this rule applies. Possible values include: 'Notification', 'API', 'Email', 'Webhook', 'All'
15029	Channels Channels `json:"channels,omitempty"`
15030	// Tags - An array of category tags that the rule contains.
15031	Tags *[]string `json:"tags,omitempty"`
15032	// IsDynamic - True if this is associated with a dynamically added rule
15033	IsDynamic *bool `json:"isDynamic,omitempty"`
15034	// ExtensionName - Extension name of the portal if exists. Applicable to dynamic rule only.
15035	ExtensionName *string `json:"extensionName,omitempty"`
15036	// BladeName - Deep link to a blade on the portal. Applicable to dynamic rule only.
15037	BladeName *string `json:"bladeName,omitempty"`
15038	// ForwardLink - Forward link to an external document associated with the rule. Applicable to dynamic rule only.
15039	ForwardLink *string `json:"forwardLink,omitempty"`
15040}
15041
15042// ReissueCertificateOrderRequest class representing certificate reissue request.
15043type ReissueCertificateOrderRequest struct {
15044	// ReissueCertificateOrderRequestProperties - ReissueCertificateOrderRequest resource specific properties
15045	*ReissueCertificateOrderRequestProperties `json:"properties,omitempty"`
15046	// ID - READ-ONLY; Resource Id.
15047	ID *string `json:"id,omitempty"`
15048	// Name - READ-ONLY; Resource Name.
15049	Name *string `json:"name,omitempty"`
15050	// Kind - Kind of resource.
15051	Kind *string `json:"kind,omitempty"`
15052	// Type - READ-ONLY; Resource type.
15053	Type *string `json:"type,omitempty"`
15054}
15055
15056// MarshalJSON is the custom marshaler for ReissueCertificateOrderRequest.
15057func (rcor ReissueCertificateOrderRequest) MarshalJSON() ([]byte, error) {
15058	objectMap := make(map[string]interface{})
15059	if rcor.ReissueCertificateOrderRequestProperties != nil {
15060		objectMap["properties"] = rcor.ReissueCertificateOrderRequestProperties
15061	}
15062	if rcor.Kind != nil {
15063		objectMap["kind"] = rcor.Kind
15064	}
15065	return json.Marshal(objectMap)
15066}
15067
15068// UnmarshalJSON is the custom unmarshaler for ReissueCertificateOrderRequest struct.
15069func (rcor *ReissueCertificateOrderRequest) UnmarshalJSON(body []byte) error {
15070	var m map[string]*json.RawMessage
15071	err := json.Unmarshal(body, &m)
15072	if err != nil {
15073		return err
15074	}
15075	for k, v := range m {
15076		switch k {
15077		case "properties":
15078			if v != nil {
15079				var reissueCertificateOrderRequestProperties ReissueCertificateOrderRequestProperties
15080				err = json.Unmarshal(*v, &reissueCertificateOrderRequestProperties)
15081				if err != nil {
15082					return err
15083				}
15084				rcor.ReissueCertificateOrderRequestProperties = &reissueCertificateOrderRequestProperties
15085			}
15086		case "id":
15087			if v != nil {
15088				var ID string
15089				err = json.Unmarshal(*v, &ID)
15090				if err != nil {
15091					return err
15092				}
15093				rcor.ID = &ID
15094			}
15095		case "name":
15096			if v != nil {
15097				var name string
15098				err = json.Unmarshal(*v, &name)
15099				if err != nil {
15100					return err
15101				}
15102				rcor.Name = &name
15103			}
15104		case "kind":
15105			if v != nil {
15106				var kind string
15107				err = json.Unmarshal(*v, &kind)
15108				if err != nil {
15109					return err
15110				}
15111				rcor.Kind = &kind
15112			}
15113		case "type":
15114			if v != nil {
15115				var typeVar string
15116				err = json.Unmarshal(*v, &typeVar)
15117				if err != nil {
15118					return err
15119				}
15120				rcor.Type = &typeVar
15121			}
15122		}
15123	}
15124
15125	return nil
15126}
15127
15128// ReissueCertificateOrderRequestProperties reissueCertificateOrderRequest resource specific properties
15129type ReissueCertificateOrderRequestProperties struct {
15130	// KeySize - Certificate Key Size.
15131	KeySize *int32 `json:"keySize,omitempty"`
15132	// DelayExistingRevokeInHours - Delay in hours to revoke existing certificate after the new certificate is issued.
15133	DelayExistingRevokeInHours *int32 `json:"delayExistingRevokeInHours,omitempty"`
15134	// Csr - Csr to be used for re-key operation.
15135	Csr *string `json:"csr,omitempty"`
15136	// IsPrivateKeyExternal - Should we change the ASC type (from managed private key to external private key and vice versa).
15137	IsPrivateKeyExternal *bool `json:"isPrivateKeyExternal,omitempty"`
15138}
15139
15140// RelayServiceConnectionEntity hybrid Connection for an App Service app.
15141type RelayServiceConnectionEntity struct {
15142	autorest.Response `json:"-"`
15143	// RelayServiceConnectionEntityProperties - RelayServiceConnectionEntity resource specific properties
15144	*RelayServiceConnectionEntityProperties `json:"properties,omitempty"`
15145	// ID - READ-ONLY; Resource Id.
15146	ID *string `json:"id,omitempty"`
15147	// Name - READ-ONLY; Resource Name.
15148	Name *string `json:"name,omitempty"`
15149	// Kind - Kind of resource.
15150	Kind *string `json:"kind,omitempty"`
15151	// Type - READ-ONLY; Resource type.
15152	Type *string `json:"type,omitempty"`
15153}
15154
15155// MarshalJSON is the custom marshaler for RelayServiceConnectionEntity.
15156func (rsce RelayServiceConnectionEntity) MarshalJSON() ([]byte, error) {
15157	objectMap := make(map[string]interface{})
15158	if rsce.RelayServiceConnectionEntityProperties != nil {
15159		objectMap["properties"] = rsce.RelayServiceConnectionEntityProperties
15160	}
15161	if rsce.Kind != nil {
15162		objectMap["kind"] = rsce.Kind
15163	}
15164	return json.Marshal(objectMap)
15165}
15166
15167// UnmarshalJSON is the custom unmarshaler for RelayServiceConnectionEntity struct.
15168func (rsce *RelayServiceConnectionEntity) UnmarshalJSON(body []byte) error {
15169	var m map[string]*json.RawMessage
15170	err := json.Unmarshal(body, &m)
15171	if err != nil {
15172		return err
15173	}
15174	for k, v := range m {
15175		switch k {
15176		case "properties":
15177			if v != nil {
15178				var relayServiceConnectionEntityProperties RelayServiceConnectionEntityProperties
15179				err = json.Unmarshal(*v, &relayServiceConnectionEntityProperties)
15180				if err != nil {
15181					return err
15182				}
15183				rsce.RelayServiceConnectionEntityProperties = &relayServiceConnectionEntityProperties
15184			}
15185		case "id":
15186			if v != nil {
15187				var ID string
15188				err = json.Unmarshal(*v, &ID)
15189				if err != nil {
15190					return err
15191				}
15192				rsce.ID = &ID
15193			}
15194		case "name":
15195			if v != nil {
15196				var name string
15197				err = json.Unmarshal(*v, &name)
15198				if err != nil {
15199					return err
15200				}
15201				rsce.Name = &name
15202			}
15203		case "kind":
15204			if v != nil {
15205				var kind string
15206				err = json.Unmarshal(*v, &kind)
15207				if err != nil {
15208					return err
15209				}
15210				rsce.Kind = &kind
15211			}
15212		case "type":
15213			if v != nil {
15214				var typeVar string
15215				err = json.Unmarshal(*v, &typeVar)
15216				if err != nil {
15217					return err
15218				}
15219				rsce.Type = &typeVar
15220			}
15221		}
15222	}
15223
15224	return nil
15225}
15226
15227// RelayServiceConnectionEntityProperties relayServiceConnectionEntity resource specific properties
15228type RelayServiceConnectionEntityProperties struct {
15229	EntityName               *string `json:"entityName,omitempty"`
15230	EntityConnectionString   *string `json:"entityConnectionString,omitempty"`
15231	ResourceType             *string `json:"resourceType,omitempty"`
15232	ResourceConnectionString *string `json:"resourceConnectionString,omitempty"`
15233	Hostname                 *string `json:"hostname,omitempty"`
15234	Port                     *int32  `json:"port,omitempty"`
15235	BiztalkURI               *string `json:"biztalkUri,omitempty"`
15236}
15237
15238// Rendering instructions for rendering the data
15239type Rendering struct {
15240	// RenderingType - Rendering Type. Possible values include: 'NoGraph', 'Table', 'TimeSeries', 'TimeSeriesPerInstance'
15241	RenderingType RenderingType `json:"renderingType,omitempty"`
15242	// Title - Title of data
15243	Title *string `json:"title,omitempty"`
15244	// Description - Description of the data that will help it be interpreted
15245	Description *string `json:"description,omitempty"`
15246}
15247
15248// RenewCertificateOrderRequest class representing certificate renew request.
15249type RenewCertificateOrderRequest struct {
15250	// RenewCertificateOrderRequestProperties - RenewCertificateOrderRequest resource specific properties
15251	*RenewCertificateOrderRequestProperties `json:"properties,omitempty"`
15252	// ID - READ-ONLY; Resource Id.
15253	ID *string `json:"id,omitempty"`
15254	// Name - READ-ONLY; Resource Name.
15255	Name *string `json:"name,omitempty"`
15256	// Kind - Kind of resource.
15257	Kind *string `json:"kind,omitempty"`
15258	// Type - READ-ONLY; Resource type.
15259	Type *string `json:"type,omitempty"`
15260}
15261
15262// MarshalJSON is the custom marshaler for RenewCertificateOrderRequest.
15263func (rcor RenewCertificateOrderRequest) MarshalJSON() ([]byte, error) {
15264	objectMap := make(map[string]interface{})
15265	if rcor.RenewCertificateOrderRequestProperties != nil {
15266		objectMap["properties"] = rcor.RenewCertificateOrderRequestProperties
15267	}
15268	if rcor.Kind != nil {
15269		objectMap["kind"] = rcor.Kind
15270	}
15271	return json.Marshal(objectMap)
15272}
15273
15274// UnmarshalJSON is the custom unmarshaler for RenewCertificateOrderRequest struct.
15275func (rcor *RenewCertificateOrderRequest) UnmarshalJSON(body []byte) error {
15276	var m map[string]*json.RawMessage
15277	err := json.Unmarshal(body, &m)
15278	if err != nil {
15279		return err
15280	}
15281	for k, v := range m {
15282		switch k {
15283		case "properties":
15284			if v != nil {
15285				var renewCertificateOrderRequestProperties RenewCertificateOrderRequestProperties
15286				err = json.Unmarshal(*v, &renewCertificateOrderRequestProperties)
15287				if err != nil {
15288					return err
15289				}
15290				rcor.RenewCertificateOrderRequestProperties = &renewCertificateOrderRequestProperties
15291			}
15292		case "id":
15293			if v != nil {
15294				var ID string
15295				err = json.Unmarshal(*v, &ID)
15296				if err != nil {
15297					return err
15298				}
15299				rcor.ID = &ID
15300			}
15301		case "name":
15302			if v != nil {
15303				var name string
15304				err = json.Unmarshal(*v, &name)
15305				if err != nil {
15306					return err
15307				}
15308				rcor.Name = &name
15309			}
15310		case "kind":
15311			if v != nil {
15312				var kind string
15313				err = json.Unmarshal(*v, &kind)
15314				if err != nil {
15315					return err
15316				}
15317				rcor.Kind = &kind
15318			}
15319		case "type":
15320			if v != nil {
15321				var typeVar string
15322				err = json.Unmarshal(*v, &typeVar)
15323				if err != nil {
15324					return err
15325				}
15326				rcor.Type = &typeVar
15327			}
15328		}
15329	}
15330
15331	return nil
15332}
15333
15334// RenewCertificateOrderRequestProperties renewCertificateOrderRequest resource specific properties
15335type RenewCertificateOrderRequestProperties struct {
15336	// KeySize - Certificate Key Size.
15337	KeySize *int32 `json:"keySize,omitempty"`
15338	// Csr - Csr to be used for re-key operation.
15339	Csr *string `json:"csr,omitempty"`
15340	// IsPrivateKeyExternal - Should we change the ASC type (from managed private key to external private key and vice versa).
15341	IsPrivateKeyExternal *bool `json:"isPrivateKeyExternal,omitempty"`
15342}
15343
15344// RequestsBasedTrigger trigger based on total requests.
15345type RequestsBasedTrigger struct {
15346	// Count - Request Count.
15347	Count *int32 `json:"count,omitempty"`
15348	// TimeInterval - Time interval.
15349	TimeInterval *string `json:"timeInterval,omitempty"`
15350}
15351
15352// Resource azure resource. This resource is tracked in Azure Resource Manager
15353type Resource struct {
15354	// ID - READ-ONLY; Resource Id.
15355	ID *string `json:"id,omitempty"`
15356	// Name - READ-ONLY; Resource Name.
15357	Name *string `json:"name,omitempty"`
15358	// Kind - Kind of resource.
15359	Kind *string `json:"kind,omitempty"`
15360	// Location - Resource Location.
15361	Location *string `json:"location,omitempty"`
15362	// Type - READ-ONLY; Resource type.
15363	Type *string `json:"type,omitempty"`
15364	// Tags - Resource tags.
15365	Tags map[string]*string `json:"tags"`
15366}
15367
15368// MarshalJSON is the custom marshaler for Resource.
15369func (r Resource) MarshalJSON() ([]byte, error) {
15370	objectMap := make(map[string]interface{})
15371	if r.Kind != nil {
15372		objectMap["kind"] = r.Kind
15373	}
15374	if r.Location != nil {
15375		objectMap["location"] = r.Location
15376	}
15377	if r.Tags != nil {
15378		objectMap["tags"] = r.Tags
15379	}
15380	return json.Marshal(objectMap)
15381}
15382
15383// ResourceCollection collection of resources.
15384type ResourceCollection struct {
15385	autorest.Response `json:"-"`
15386	// Value - Collection of resources.
15387	Value *[]string `json:"value,omitempty"`
15388	// NextLink - READ-ONLY; Link to next page of resources.
15389	NextLink *string `json:"nextLink,omitempty"`
15390}
15391
15392// MarshalJSON is the custom marshaler for ResourceCollection.
15393func (rc ResourceCollection) MarshalJSON() ([]byte, error) {
15394	objectMap := make(map[string]interface{})
15395	if rc.Value != nil {
15396		objectMap["value"] = rc.Value
15397	}
15398	return json.Marshal(objectMap)
15399}
15400
15401// ResourceCollectionIterator provides access to a complete listing of string values.
15402type ResourceCollectionIterator struct {
15403	i    int
15404	page ResourceCollectionPage
15405}
15406
15407// NextWithContext advances to the next value.  If there was an error making
15408// the request the iterator does not advance and the error is returned.
15409func (iter *ResourceCollectionIterator) NextWithContext(ctx context.Context) (err error) {
15410	if tracing.IsEnabled() {
15411		ctx = tracing.StartSpan(ctx, fqdn+"/ResourceCollectionIterator.NextWithContext")
15412		defer func() {
15413			sc := -1
15414			if iter.Response().Response.Response != nil {
15415				sc = iter.Response().Response.Response.StatusCode
15416			}
15417			tracing.EndSpan(ctx, sc, err)
15418		}()
15419	}
15420	iter.i++
15421	if iter.i < len(iter.page.Values()) {
15422		return nil
15423	}
15424	err = iter.page.NextWithContext(ctx)
15425	if err != nil {
15426		iter.i--
15427		return err
15428	}
15429	iter.i = 0
15430	return nil
15431}
15432
15433// Next advances to the next value.  If there was an error making
15434// the request the iterator does not advance and the error is returned.
15435// Deprecated: Use NextWithContext() instead.
15436func (iter *ResourceCollectionIterator) Next() error {
15437	return iter.NextWithContext(context.Background())
15438}
15439
15440// NotDone returns true if the enumeration should be started or is not yet complete.
15441func (iter ResourceCollectionIterator) NotDone() bool {
15442	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15443}
15444
15445// Response returns the raw server response from the last page request.
15446func (iter ResourceCollectionIterator) Response() ResourceCollection {
15447	return iter.page.Response()
15448}
15449
15450// Value returns the current value or a zero-initialized value if the
15451// iterator has advanced beyond the end of the collection.
15452func (iter ResourceCollectionIterator) Value() string {
15453	if !iter.page.NotDone() {
15454		return ""
15455	}
15456	return iter.page.Values()[iter.i]
15457}
15458
15459// Creates a new instance of the ResourceCollectionIterator type.
15460func NewResourceCollectionIterator(page ResourceCollectionPage) ResourceCollectionIterator {
15461	return ResourceCollectionIterator{page: page}
15462}
15463
15464// IsEmpty returns true if the ListResult contains no values.
15465func (rc ResourceCollection) IsEmpty() bool {
15466	return rc.Value == nil || len(*rc.Value) == 0
15467}
15468
15469// hasNextLink returns true if the NextLink is not empty.
15470func (rc ResourceCollection) hasNextLink() bool {
15471	return rc.NextLink != nil && len(*rc.NextLink) != 0
15472}
15473
15474// resourceCollectionPreparer prepares a request to retrieve the next set of results.
15475// It returns nil if no more results exist.
15476func (rc ResourceCollection) resourceCollectionPreparer(ctx context.Context) (*http.Request, error) {
15477	if !rc.hasNextLink() {
15478		return nil, nil
15479	}
15480	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15481		autorest.AsJSON(),
15482		autorest.AsGet(),
15483		autorest.WithBaseURL(to.String(rc.NextLink)))
15484}
15485
15486// ResourceCollectionPage contains a page of string values.
15487type ResourceCollectionPage struct {
15488	fn func(context.Context, ResourceCollection) (ResourceCollection, error)
15489	rc ResourceCollection
15490}
15491
15492// NextWithContext advances to the next page of values.  If there was an error making
15493// the request the page does not advance and the error is returned.
15494func (page *ResourceCollectionPage) NextWithContext(ctx context.Context) (err error) {
15495	if tracing.IsEnabled() {
15496		ctx = tracing.StartSpan(ctx, fqdn+"/ResourceCollectionPage.NextWithContext")
15497		defer func() {
15498			sc := -1
15499			if page.Response().Response.Response != nil {
15500				sc = page.Response().Response.Response.StatusCode
15501			}
15502			tracing.EndSpan(ctx, sc, err)
15503		}()
15504	}
15505	for {
15506		next, err := page.fn(ctx, page.rc)
15507		if err != nil {
15508			return err
15509		}
15510		page.rc = next
15511		if !next.hasNextLink() || !next.IsEmpty() {
15512			break
15513		}
15514	}
15515	return nil
15516}
15517
15518// Next advances to the next page of values.  If there was an error making
15519// the request the page does not advance and the error is returned.
15520// Deprecated: Use NextWithContext() instead.
15521func (page *ResourceCollectionPage) Next() error {
15522	return page.NextWithContext(context.Background())
15523}
15524
15525// NotDone returns true if the page enumeration should be started or is not yet complete.
15526func (page ResourceCollectionPage) NotDone() bool {
15527	return !page.rc.IsEmpty()
15528}
15529
15530// Response returns the raw server response from the last page request.
15531func (page ResourceCollectionPage) Response() ResourceCollection {
15532	return page.rc
15533}
15534
15535// Values returns the slice of values for the current page or nil if there are no values.
15536func (page ResourceCollectionPage) Values() []string {
15537	if page.rc.IsEmpty() {
15538		return nil
15539	}
15540	return *page.rc.Value
15541}
15542
15543// Creates a new instance of the ResourceCollectionPage type.
15544func NewResourceCollectionPage(cur ResourceCollection, getNextPage func(context.Context, ResourceCollection) (ResourceCollection, error)) ResourceCollectionPage {
15545	return ResourceCollectionPage{
15546		fn: getNextPage,
15547		rc: cur,
15548	}
15549}
15550
15551// ResourceHealthMetadata used for getting ResourceHealthCheck settings.
15552type ResourceHealthMetadata struct {
15553	autorest.Response `json:"-"`
15554	// ResourceHealthMetadataProperties - ResourceHealthMetadata resource specific properties
15555	*ResourceHealthMetadataProperties `json:"properties,omitempty"`
15556	// ID - READ-ONLY; Resource Id.
15557	ID *string `json:"id,omitempty"`
15558	// Name - READ-ONLY; Resource Name.
15559	Name *string `json:"name,omitempty"`
15560	// Kind - Kind of resource.
15561	Kind *string `json:"kind,omitempty"`
15562	// Type - READ-ONLY; Resource type.
15563	Type *string `json:"type,omitempty"`
15564}
15565
15566// MarshalJSON is the custom marshaler for ResourceHealthMetadata.
15567func (rhm ResourceHealthMetadata) MarshalJSON() ([]byte, error) {
15568	objectMap := make(map[string]interface{})
15569	if rhm.ResourceHealthMetadataProperties != nil {
15570		objectMap["properties"] = rhm.ResourceHealthMetadataProperties
15571	}
15572	if rhm.Kind != nil {
15573		objectMap["kind"] = rhm.Kind
15574	}
15575	return json.Marshal(objectMap)
15576}
15577
15578// UnmarshalJSON is the custom unmarshaler for ResourceHealthMetadata struct.
15579func (rhm *ResourceHealthMetadata) UnmarshalJSON(body []byte) error {
15580	var m map[string]*json.RawMessage
15581	err := json.Unmarshal(body, &m)
15582	if err != nil {
15583		return err
15584	}
15585	for k, v := range m {
15586		switch k {
15587		case "properties":
15588			if v != nil {
15589				var resourceHealthMetadataProperties ResourceHealthMetadataProperties
15590				err = json.Unmarshal(*v, &resourceHealthMetadataProperties)
15591				if err != nil {
15592					return err
15593				}
15594				rhm.ResourceHealthMetadataProperties = &resourceHealthMetadataProperties
15595			}
15596		case "id":
15597			if v != nil {
15598				var ID string
15599				err = json.Unmarshal(*v, &ID)
15600				if err != nil {
15601					return err
15602				}
15603				rhm.ID = &ID
15604			}
15605		case "name":
15606			if v != nil {
15607				var name string
15608				err = json.Unmarshal(*v, &name)
15609				if err != nil {
15610					return err
15611				}
15612				rhm.Name = &name
15613			}
15614		case "kind":
15615			if v != nil {
15616				var kind string
15617				err = json.Unmarshal(*v, &kind)
15618				if err != nil {
15619					return err
15620				}
15621				rhm.Kind = &kind
15622			}
15623		case "type":
15624			if v != nil {
15625				var typeVar string
15626				err = json.Unmarshal(*v, &typeVar)
15627				if err != nil {
15628					return err
15629				}
15630				rhm.Type = &typeVar
15631			}
15632		}
15633	}
15634
15635	return nil
15636}
15637
15638// ResourceHealthMetadataCollection collection of resource health metadata.
15639type ResourceHealthMetadataCollection struct {
15640	autorest.Response `json:"-"`
15641	// Value - Collection of resources.
15642	Value *[]ResourceHealthMetadata `json:"value,omitempty"`
15643	// NextLink - READ-ONLY; Link to next page of resources.
15644	NextLink *string `json:"nextLink,omitempty"`
15645}
15646
15647// MarshalJSON is the custom marshaler for ResourceHealthMetadataCollection.
15648func (rhmc ResourceHealthMetadataCollection) MarshalJSON() ([]byte, error) {
15649	objectMap := make(map[string]interface{})
15650	if rhmc.Value != nil {
15651		objectMap["value"] = rhmc.Value
15652	}
15653	return json.Marshal(objectMap)
15654}
15655
15656// ResourceHealthMetadataCollectionIterator provides access to a complete listing of ResourceHealthMetadata
15657// values.
15658type ResourceHealthMetadataCollectionIterator struct {
15659	i    int
15660	page ResourceHealthMetadataCollectionPage
15661}
15662
15663// NextWithContext advances to the next value.  If there was an error making
15664// the request the iterator does not advance and the error is returned.
15665func (iter *ResourceHealthMetadataCollectionIterator) NextWithContext(ctx context.Context) (err error) {
15666	if tracing.IsEnabled() {
15667		ctx = tracing.StartSpan(ctx, fqdn+"/ResourceHealthMetadataCollectionIterator.NextWithContext")
15668		defer func() {
15669			sc := -1
15670			if iter.Response().Response.Response != nil {
15671				sc = iter.Response().Response.Response.StatusCode
15672			}
15673			tracing.EndSpan(ctx, sc, err)
15674		}()
15675	}
15676	iter.i++
15677	if iter.i < len(iter.page.Values()) {
15678		return nil
15679	}
15680	err = iter.page.NextWithContext(ctx)
15681	if err != nil {
15682		iter.i--
15683		return err
15684	}
15685	iter.i = 0
15686	return nil
15687}
15688
15689// Next advances to the next value.  If there was an error making
15690// the request the iterator does not advance and the error is returned.
15691// Deprecated: Use NextWithContext() instead.
15692func (iter *ResourceHealthMetadataCollectionIterator) Next() error {
15693	return iter.NextWithContext(context.Background())
15694}
15695
15696// NotDone returns true if the enumeration should be started or is not yet complete.
15697func (iter ResourceHealthMetadataCollectionIterator) NotDone() bool {
15698	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15699}
15700
15701// Response returns the raw server response from the last page request.
15702func (iter ResourceHealthMetadataCollectionIterator) Response() ResourceHealthMetadataCollection {
15703	return iter.page.Response()
15704}
15705
15706// Value returns the current value or a zero-initialized value if the
15707// iterator has advanced beyond the end of the collection.
15708func (iter ResourceHealthMetadataCollectionIterator) Value() ResourceHealthMetadata {
15709	if !iter.page.NotDone() {
15710		return ResourceHealthMetadata{}
15711	}
15712	return iter.page.Values()[iter.i]
15713}
15714
15715// Creates a new instance of the ResourceHealthMetadataCollectionIterator type.
15716func NewResourceHealthMetadataCollectionIterator(page ResourceHealthMetadataCollectionPage) ResourceHealthMetadataCollectionIterator {
15717	return ResourceHealthMetadataCollectionIterator{page: page}
15718}
15719
15720// IsEmpty returns true if the ListResult contains no values.
15721func (rhmc ResourceHealthMetadataCollection) IsEmpty() bool {
15722	return rhmc.Value == nil || len(*rhmc.Value) == 0
15723}
15724
15725// hasNextLink returns true if the NextLink is not empty.
15726func (rhmc ResourceHealthMetadataCollection) hasNextLink() bool {
15727	return rhmc.NextLink != nil && len(*rhmc.NextLink) != 0
15728}
15729
15730// resourceHealthMetadataCollectionPreparer prepares a request to retrieve the next set of results.
15731// It returns nil if no more results exist.
15732func (rhmc ResourceHealthMetadataCollection) resourceHealthMetadataCollectionPreparer(ctx context.Context) (*http.Request, error) {
15733	if !rhmc.hasNextLink() {
15734		return nil, nil
15735	}
15736	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15737		autorest.AsJSON(),
15738		autorest.AsGet(),
15739		autorest.WithBaseURL(to.String(rhmc.NextLink)))
15740}
15741
15742// ResourceHealthMetadataCollectionPage contains a page of ResourceHealthMetadata values.
15743type ResourceHealthMetadataCollectionPage struct {
15744	fn   func(context.Context, ResourceHealthMetadataCollection) (ResourceHealthMetadataCollection, error)
15745	rhmc ResourceHealthMetadataCollection
15746}
15747
15748// NextWithContext advances to the next page of values.  If there was an error making
15749// the request the page does not advance and the error is returned.
15750func (page *ResourceHealthMetadataCollectionPage) NextWithContext(ctx context.Context) (err error) {
15751	if tracing.IsEnabled() {
15752		ctx = tracing.StartSpan(ctx, fqdn+"/ResourceHealthMetadataCollectionPage.NextWithContext")
15753		defer func() {
15754			sc := -1
15755			if page.Response().Response.Response != nil {
15756				sc = page.Response().Response.Response.StatusCode
15757			}
15758			tracing.EndSpan(ctx, sc, err)
15759		}()
15760	}
15761	for {
15762		next, err := page.fn(ctx, page.rhmc)
15763		if err != nil {
15764			return err
15765		}
15766		page.rhmc = next
15767		if !next.hasNextLink() || !next.IsEmpty() {
15768			break
15769		}
15770	}
15771	return nil
15772}
15773
15774// Next advances to the next page of values.  If there was an error making
15775// the request the page does not advance and the error is returned.
15776// Deprecated: Use NextWithContext() instead.
15777func (page *ResourceHealthMetadataCollectionPage) Next() error {
15778	return page.NextWithContext(context.Background())
15779}
15780
15781// NotDone returns true if the page enumeration should be started or is not yet complete.
15782func (page ResourceHealthMetadataCollectionPage) NotDone() bool {
15783	return !page.rhmc.IsEmpty()
15784}
15785
15786// Response returns the raw server response from the last page request.
15787func (page ResourceHealthMetadataCollectionPage) Response() ResourceHealthMetadataCollection {
15788	return page.rhmc
15789}
15790
15791// Values returns the slice of values for the current page or nil if there are no values.
15792func (page ResourceHealthMetadataCollectionPage) Values() []ResourceHealthMetadata {
15793	if page.rhmc.IsEmpty() {
15794		return nil
15795	}
15796	return *page.rhmc.Value
15797}
15798
15799// Creates a new instance of the ResourceHealthMetadataCollectionPage type.
15800func NewResourceHealthMetadataCollectionPage(cur ResourceHealthMetadataCollection, getNextPage func(context.Context, ResourceHealthMetadataCollection) (ResourceHealthMetadataCollection, error)) ResourceHealthMetadataCollectionPage {
15801	return ResourceHealthMetadataCollectionPage{
15802		fn:   getNextPage,
15803		rhmc: cur,
15804	}
15805}
15806
15807// ResourceHealthMetadataProperties resourceHealthMetadata resource specific properties
15808type ResourceHealthMetadataProperties struct {
15809	// Category - The category that the resource matches in the RHC Policy File
15810	Category *string `json:"category,omitempty"`
15811	// SignalAvailability - Is there a health signal for the resource
15812	SignalAvailability *bool `json:"signalAvailability,omitempty"`
15813}
15814
15815// ResourceMetric object representing a metric for any resource .
15816type ResourceMetric struct {
15817	// Name - READ-ONLY; Name of metric.
15818	Name *ResourceMetricName `json:"name,omitempty"`
15819	// Unit - READ-ONLY; Metric unit.
15820	Unit *string `json:"unit,omitempty"`
15821	// TimeGrain - READ-ONLY; Metric granularity. E.g PT1H, PT5M, P1D
15822	TimeGrain *string `json:"timeGrain,omitempty"`
15823	// StartTime - READ-ONLY; Metric start time.
15824	StartTime *date.Time `json:"startTime,omitempty"`
15825	// EndTime - READ-ONLY; Metric end time.
15826	EndTime *date.Time `json:"endTime,omitempty"`
15827	// ResourceID - READ-ONLY; Metric resource Id.
15828	ResourceID *string `json:"resourceId,omitempty"`
15829	// ID - READ-ONLY; Resource Id.
15830	ID *string `json:"id,omitempty"`
15831	// MetricValues - READ-ONLY; Metric values.
15832	MetricValues *[]ResourceMetricValue `json:"metricValues,omitempty"`
15833	// Properties - READ-ONLY; Resource metric properties collection.
15834	Properties *[]ResourceMetricProperty `json:"properties,omitempty"`
15835}
15836
15837// MarshalJSON is the custom marshaler for ResourceMetric.
15838func (rm ResourceMetric) MarshalJSON() ([]byte, error) {
15839	objectMap := make(map[string]interface{})
15840	return json.Marshal(objectMap)
15841}
15842
15843// ResourceMetricAvailability metrics availability and retention.
15844type ResourceMetricAvailability struct {
15845	// TimeGrain - READ-ONLY; Time grain .
15846	TimeGrain *string `json:"timeGrain,omitempty"`
15847	// Retention - READ-ONLY; Retention period for the current time grain.
15848	Retention *string `json:"retention,omitempty"`
15849}
15850
15851// MarshalJSON is the custom marshaler for ResourceMetricAvailability.
15852func (rma ResourceMetricAvailability) MarshalJSON() ([]byte, error) {
15853	objectMap := make(map[string]interface{})
15854	return json.Marshal(objectMap)
15855}
15856
15857// ResourceMetricCollection collection of metric responses.
15858type ResourceMetricCollection struct {
15859	autorest.Response `json:"-"`
15860	// Value - Collection of resources.
15861	Value *[]ResourceMetric `json:"value,omitempty"`
15862	// NextLink - READ-ONLY; Link to next page of resources.
15863	NextLink *string `json:"nextLink,omitempty"`
15864}
15865
15866// MarshalJSON is the custom marshaler for ResourceMetricCollection.
15867func (rmc ResourceMetricCollection) MarshalJSON() ([]byte, error) {
15868	objectMap := make(map[string]interface{})
15869	if rmc.Value != nil {
15870		objectMap["value"] = rmc.Value
15871	}
15872	return json.Marshal(objectMap)
15873}
15874
15875// ResourceMetricCollectionIterator provides access to a complete listing of ResourceMetric values.
15876type ResourceMetricCollectionIterator struct {
15877	i    int
15878	page ResourceMetricCollectionPage
15879}
15880
15881// NextWithContext advances to the next value.  If there was an error making
15882// the request the iterator does not advance and the error is returned.
15883func (iter *ResourceMetricCollectionIterator) NextWithContext(ctx context.Context) (err error) {
15884	if tracing.IsEnabled() {
15885		ctx = tracing.StartSpan(ctx, fqdn+"/ResourceMetricCollectionIterator.NextWithContext")
15886		defer func() {
15887			sc := -1
15888			if iter.Response().Response.Response != nil {
15889				sc = iter.Response().Response.Response.StatusCode
15890			}
15891			tracing.EndSpan(ctx, sc, err)
15892		}()
15893	}
15894	iter.i++
15895	if iter.i < len(iter.page.Values()) {
15896		return nil
15897	}
15898	err = iter.page.NextWithContext(ctx)
15899	if err != nil {
15900		iter.i--
15901		return err
15902	}
15903	iter.i = 0
15904	return nil
15905}
15906
15907// Next advances to the next value.  If there was an error making
15908// the request the iterator does not advance and the error is returned.
15909// Deprecated: Use NextWithContext() instead.
15910func (iter *ResourceMetricCollectionIterator) Next() error {
15911	return iter.NextWithContext(context.Background())
15912}
15913
15914// NotDone returns true if the enumeration should be started or is not yet complete.
15915func (iter ResourceMetricCollectionIterator) NotDone() bool {
15916	return iter.page.NotDone() && iter.i < len(iter.page.Values())
15917}
15918
15919// Response returns the raw server response from the last page request.
15920func (iter ResourceMetricCollectionIterator) Response() ResourceMetricCollection {
15921	return iter.page.Response()
15922}
15923
15924// Value returns the current value or a zero-initialized value if the
15925// iterator has advanced beyond the end of the collection.
15926func (iter ResourceMetricCollectionIterator) Value() ResourceMetric {
15927	if !iter.page.NotDone() {
15928		return ResourceMetric{}
15929	}
15930	return iter.page.Values()[iter.i]
15931}
15932
15933// Creates a new instance of the ResourceMetricCollectionIterator type.
15934func NewResourceMetricCollectionIterator(page ResourceMetricCollectionPage) ResourceMetricCollectionIterator {
15935	return ResourceMetricCollectionIterator{page: page}
15936}
15937
15938// IsEmpty returns true if the ListResult contains no values.
15939func (rmc ResourceMetricCollection) IsEmpty() bool {
15940	return rmc.Value == nil || len(*rmc.Value) == 0
15941}
15942
15943// hasNextLink returns true if the NextLink is not empty.
15944func (rmc ResourceMetricCollection) hasNextLink() bool {
15945	return rmc.NextLink != nil && len(*rmc.NextLink) != 0
15946}
15947
15948// resourceMetricCollectionPreparer prepares a request to retrieve the next set of results.
15949// It returns nil if no more results exist.
15950func (rmc ResourceMetricCollection) resourceMetricCollectionPreparer(ctx context.Context) (*http.Request, error) {
15951	if !rmc.hasNextLink() {
15952		return nil, nil
15953	}
15954	return autorest.Prepare((&http.Request{}).WithContext(ctx),
15955		autorest.AsJSON(),
15956		autorest.AsGet(),
15957		autorest.WithBaseURL(to.String(rmc.NextLink)))
15958}
15959
15960// ResourceMetricCollectionPage contains a page of ResourceMetric values.
15961type ResourceMetricCollectionPage struct {
15962	fn  func(context.Context, ResourceMetricCollection) (ResourceMetricCollection, error)
15963	rmc ResourceMetricCollection
15964}
15965
15966// NextWithContext advances to the next page of values.  If there was an error making
15967// the request the page does not advance and the error is returned.
15968func (page *ResourceMetricCollectionPage) NextWithContext(ctx context.Context) (err error) {
15969	if tracing.IsEnabled() {
15970		ctx = tracing.StartSpan(ctx, fqdn+"/ResourceMetricCollectionPage.NextWithContext")
15971		defer func() {
15972			sc := -1
15973			if page.Response().Response.Response != nil {
15974				sc = page.Response().Response.Response.StatusCode
15975			}
15976			tracing.EndSpan(ctx, sc, err)
15977		}()
15978	}
15979	for {
15980		next, err := page.fn(ctx, page.rmc)
15981		if err != nil {
15982			return err
15983		}
15984		page.rmc = next
15985		if !next.hasNextLink() || !next.IsEmpty() {
15986			break
15987		}
15988	}
15989	return nil
15990}
15991
15992// Next advances to the next page of values.  If there was an error making
15993// the request the page does not advance and the error is returned.
15994// Deprecated: Use NextWithContext() instead.
15995func (page *ResourceMetricCollectionPage) Next() error {
15996	return page.NextWithContext(context.Background())
15997}
15998
15999// NotDone returns true if the page enumeration should be started or is not yet complete.
16000func (page ResourceMetricCollectionPage) NotDone() bool {
16001	return !page.rmc.IsEmpty()
16002}
16003
16004// Response returns the raw server response from the last page request.
16005func (page ResourceMetricCollectionPage) Response() ResourceMetricCollection {
16006	return page.rmc
16007}
16008
16009// Values returns the slice of values for the current page or nil if there are no values.
16010func (page ResourceMetricCollectionPage) Values() []ResourceMetric {
16011	if page.rmc.IsEmpty() {
16012		return nil
16013	}
16014	return *page.rmc.Value
16015}
16016
16017// Creates a new instance of the ResourceMetricCollectionPage type.
16018func NewResourceMetricCollectionPage(cur ResourceMetricCollection, getNextPage func(context.Context, ResourceMetricCollection) (ResourceMetricCollection, error)) ResourceMetricCollectionPage {
16019	return ResourceMetricCollectionPage{
16020		fn:  getNextPage,
16021		rmc: cur,
16022	}
16023}
16024
16025// ResourceMetricDefinition metadata for the metrics.
16026type ResourceMetricDefinition struct {
16027	// ResourceMetricDefinitionProperties - ResourceMetricDefinition resource specific properties
16028	*ResourceMetricDefinitionProperties `json:"properties,omitempty"`
16029	// ID - READ-ONLY; Resource Id.
16030	ID *string `json:"id,omitempty"`
16031	// Name - READ-ONLY; Resource Name.
16032	Name *string `json:"name,omitempty"`
16033	// Kind - Kind of resource.
16034	Kind *string `json:"kind,omitempty"`
16035	// Type - READ-ONLY; Resource type.
16036	Type *string `json:"type,omitempty"`
16037}
16038
16039// MarshalJSON is the custom marshaler for ResourceMetricDefinition.
16040func (rmd ResourceMetricDefinition) MarshalJSON() ([]byte, error) {
16041	objectMap := make(map[string]interface{})
16042	if rmd.ResourceMetricDefinitionProperties != nil {
16043		objectMap["properties"] = rmd.ResourceMetricDefinitionProperties
16044	}
16045	if rmd.Kind != nil {
16046		objectMap["kind"] = rmd.Kind
16047	}
16048	return json.Marshal(objectMap)
16049}
16050
16051// UnmarshalJSON is the custom unmarshaler for ResourceMetricDefinition struct.
16052func (rmd *ResourceMetricDefinition) UnmarshalJSON(body []byte) error {
16053	var m map[string]*json.RawMessage
16054	err := json.Unmarshal(body, &m)
16055	if err != nil {
16056		return err
16057	}
16058	for k, v := range m {
16059		switch k {
16060		case "properties":
16061			if v != nil {
16062				var resourceMetricDefinitionProperties ResourceMetricDefinitionProperties
16063				err = json.Unmarshal(*v, &resourceMetricDefinitionProperties)
16064				if err != nil {
16065					return err
16066				}
16067				rmd.ResourceMetricDefinitionProperties = &resourceMetricDefinitionProperties
16068			}
16069		case "id":
16070			if v != nil {
16071				var ID string
16072				err = json.Unmarshal(*v, &ID)
16073				if err != nil {
16074					return err
16075				}
16076				rmd.ID = &ID
16077			}
16078		case "name":
16079			if v != nil {
16080				var name string
16081				err = json.Unmarshal(*v, &name)
16082				if err != nil {
16083					return err
16084				}
16085				rmd.Name = &name
16086			}
16087		case "kind":
16088			if v != nil {
16089				var kind string
16090				err = json.Unmarshal(*v, &kind)
16091				if err != nil {
16092					return err
16093				}
16094				rmd.Kind = &kind
16095			}
16096		case "type":
16097			if v != nil {
16098				var typeVar string
16099				err = json.Unmarshal(*v, &typeVar)
16100				if err != nil {
16101					return err
16102				}
16103				rmd.Type = &typeVar
16104			}
16105		}
16106	}
16107
16108	return nil
16109}
16110
16111// ResourceMetricDefinitionCollection collection of metric definitions.
16112type ResourceMetricDefinitionCollection struct {
16113	autorest.Response `json:"-"`
16114	// Value - Collection of resources.
16115	Value *[]ResourceMetricDefinition `json:"value,omitempty"`
16116	// NextLink - READ-ONLY; Link to next page of resources.
16117	NextLink *string `json:"nextLink,omitempty"`
16118}
16119
16120// MarshalJSON is the custom marshaler for ResourceMetricDefinitionCollection.
16121func (rmdc ResourceMetricDefinitionCollection) MarshalJSON() ([]byte, error) {
16122	objectMap := make(map[string]interface{})
16123	if rmdc.Value != nil {
16124		objectMap["value"] = rmdc.Value
16125	}
16126	return json.Marshal(objectMap)
16127}
16128
16129// ResourceMetricDefinitionCollectionIterator provides access to a complete listing of
16130// ResourceMetricDefinition values.
16131type ResourceMetricDefinitionCollectionIterator struct {
16132	i    int
16133	page ResourceMetricDefinitionCollectionPage
16134}
16135
16136// NextWithContext advances to the next value.  If there was an error making
16137// the request the iterator does not advance and the error is returned.
16138func (iter *ResourceMetricDefinitionCollectionIterator) NextWithContext(ctx context.Context) (err error) {
16139	if tracing.IsEnabled() {
16140		ctx = tracing.StartSpan(ctx, fqdn+"/ResourceMetricDefinitionCollectionIterator.NextWithContext")
16141		defer func() {
16142			sc := -1
16143			if iter.Response().Response.Response != nil {
16144				sc = iter.Response().Response.Response.StatusCode
16145			}
16146			tracing.EndSpan(ctx, sc, err)
16147		}()
16148	}
16149	iter.i++
16150	if iter.i < len(iter.page.Values()) {
16151		return nil
16152	}
16153	err = iter.page.NextWithContext(ctx)
16154	if err != nil {
16155		iter.i--
16156		return err
16157	}
16158	iter.i = 0
16159	return nil
16160}
16161
16162// Next advances to the next value.  If there was an error making
16163// the request the iterator does not advance and the error is returned.
16164// Deprecated: Use NextWithContext() instead.
16165func (iter *ResourceMetricDefinitionCollectionIterator) Next() error {
16166	return iter.NextWithContext(context.Background())
16167}
16168
16169// NotDone returns true if the enumeration should be started or is not yet complete.
16170func (iter ResourceMetricDefinitionCollectionIterator) NotDone() bool {
16171	return iter.page.NotDone() && iter.i < len(iter.page.Values())
16172}
16173
16174// Response returns the raw server response from the last page request.
16175func (iter ResourceMetricDefinitionCollectionIterator) Response() ResourceMetricDefinitionCollection {
16176	return iter.page.Response()
16177}
16178
16179// Value returns the current value or a zero-initialized value if the
16180// iterator has advanced beyond the end of the collection.
16181func (iter ResourceMetricDefinitionCollectionIterator) Value() ResourceMetricDefinition {
16182	if !iter.page.NotDone() {
16183		return ResourceMetricDefinition{}
16184	}
16185	return iter.page.Values()[iter.i]
16186}
16187
16188// Creates a new instance of the ResourceMetricDefinitionCollectionIterator type.
16189func NewResourceMetricDefinitionCollectionIterator(page ResourceMetricDefinitionCollectionPage) ResourceMetricDefinitionCollectionIterator {
16190	return ResourceMetricDefinitionCollectionIterator{page: page}
16191}
16192
16193// IsEmpty returns true if the ListResult contains no values.
16194func (rmdc ResourceMetricDefinitionCollection) IsEmpty() bool {
16195	return rmdc.Value == nil || len(*rmdc.Value) == 0
16196}
16197
16198// hasNextLink returns true if the NextLink is not empty.
16199func (rmdc ResourceMetricDefinitionCollection) hasNextLink() bool {
16200	return rmdc.NextLink != nil && len(*rmdc.NextLink) != 0
16201}
16202
16203// resourceMetricDefinitionCollectionPreparer prepares a request to retrieve the next set of results.
16204// It returns nil if no more results exist.
16205func (rmdc ResourceMetricDefinitionCollection) resourceMetricDefinitionCollectionPreparer(ctx context.Context) (*http.Request, error) {
16206	if !rmdc.hasNextLink() {
16207		return nil, nil
16208	}
16209	return autorest.Prepare((&http.Request{}).WithContext(ctx),
16210		autorest.AsJSON(),
16211		autorest.AsGet(),
16212		autorest.WithBaseURL(to.String(rmdc.NextLink)))
16213}
16214
16215// ResourceMetricDefinitionCollectionPage contains a page of ResourceMetricDefinition values.
16216type ResourceMetricDefinitionCollectionPage struct {
16217	fn   func(context.Context, ResourceMetricDefinitionCollection) (ResourceMetricDefinitionCollection, error)
16218	rmdc ResourceMetricDefinitionCollection
16219}
16220
16221// NextWithContext advances to the next page of values.  If there was an error making
16222// the request the page does not advance and the error is returned.
16223func (page *ResourceMetricDefinitionCollectionPage) NextWithContext(ctx context.Context) (err error) {
16224	if tracing.IsEnabled() {
16225		ctx = tracing.StartSpan(ctx, fqdn+"/ResourceMetricDefinitionCollectionPage.NextWithContext")
16226		defer func() {
16227			sc := -1
16228			if page.Response().Response.Response != nil {
16229				sc = page.Response().Response.Response.StatusCode
16230			}
16231			tracing.EndSpan(ctx, sc, err)
16232		}()
16233	}
16234	for {
16235		next, err := page.fn(ctx, page.rmdc)
16236		if err != nil {
16237			return err
16238		}
16239		page.rmdc = next
16240		if !next.hasNextLink() || !next.IsEmpty() {
16241			break
16242		}
16243	}
16244	return nil
16245}
16246
16247// Next advances to the next page of values.  If there was an error making
16248// the request the page does not advance and the error is returned.
16249// Deprecated: Use NextWithContext() instead.
16250func (page *ResourceMetricDefinitionCollectionPage) Next() error {
16251	return page.NextWithContext(context.Background())
16252}
16253
16254// NotDone returns true if the page enumeration should be started or is not yet complete.
16255func (page ResourceMetricDefinitionCollectionPage) NotDone() bool {
16256	return !page.rmdc.IsEmpty()
16257}
16258
16259// Response returns the raw server response from the last page request.
16260func (page ResourceMetricDefinitionCollectionPage) Response() ResourceMetricDefinitionCollection {
16261	return page.rmdc
16262}
16263
16264// Values returns the slice of values for the current page or nil if there are no values.
16265func (page ResourceMetricDefinitionCollectionPage) Values() []ResourceMetricDefinition {
16266	if page.rmdc.IsEmpty() {
16267		return nil
16268	}
16269	return *page.rmdc.Value
16270}
16271
16272// Creates a new instance of the ResourceMetricDefinitionCollectionPage type.
16273func NewResourceMetricDefinitionCollectionPage(cur ResourceMetricDefinitionCollection, getNextPage func(context.Context, ResourceMetricDefinitionCollection) (ResourceMetricDefinitionCollection, error)) ResourceMetricDefinitionCollectionPage {
16274	return ResourceMetricDefinitionCollectionPage{
16275		fn:   getNextPage,
16276		rmdc: cur,
16277	}
16278}
16279
16280// ResourceMetricDefinitionProperties resourceMetricDefinition resource specific properties
16281type ResourceMetricDefinitionProperties struct {
16282	// Name - READ-ONLY; Name of the metric.
16283	Name *ResourceMetricName `json:"name,omitempty"`
16284	// Unit - READ-ONLY; Unit of the metric.
16285	Unit *string `json:"unit,omitempty"`
16286	// PrimaryAggregationType - READ-ONLY; Primary aggregation type.
16287	PrimaryAggregationType *string `json:"primaryAggregationType,omitempty"`
16288	// MetricAvailabilities - READ-ONLY; List of time grains supported for the metric together with retention period.
16289	MetricAvailabilities *[]ResourceMetricAvailability `json:"metricAvailabilities,omitempty"`
16290	// ResourceURI - READ-ONLY; Resource URI.
16291	ResourceURI *string `json:"resourceUri,omitempty"`
16292	// ID - READ-ONLY; Resource ID.
16293	ID *string `json:"id,omitempty"`
16294	// Properties - READ-ONLY; Resource metric definition properties.
16295	Properties map[string]*string `json:"properties"`
16296}
16297
16298// MarshalJSON is the custom marshaler for ResourceMetricDefinitionProperties.
16299func (rmd ResourceMetricDefinitionProperties) MarshalJSON() ([]byte, error) {
16300	objectMap := make(map[string]interface{})
16301	return json.Marshal(objectMap)
16302}
16303
16304// ResourceMetricName name of a metric for any resource .
16305type ResourceMetricName struct {
16306	// Value - READ-ONLY; metric name value.
16307	Value *string `json:"value,omitempty"`
16308	// LocalizedValue - READ-ONLY; Localized metric name value.
16309	LocalizedValue *string `json:"localizedValue,omitempty"`
16310}
16311
16312// MarshalJSON is the custom marshaler for ResourceMetricName.
16313func (rmn ResourceMetricName) MarshalJSON() ([]byte, error) {
16314	objectMap := make(map[string]interface{})
16315	return json.Marshal(objectMap)
16316}
16317
16318// ResourceMetricProperty resource metric property.
16319type ResourceMetricProperty struct {
16320	// Key - Key for resource metric property.
16321	Key *string `json:"key,omitempty"`
16322	// Value - Value of pair.
16323	Value *string `json:"value,omitempty"`
16324}
16325
16326// ResourceMetricValue value of resource metric.
16327type ResourceMetricValue struct {
16328	// Timestamp - READ-ONLY; Value timestamp.
16329	Timestamp *string `json:"timestamp,omitempty"`
16330	// Average - READ-ONLY; Value average.
16331	Average *float64 `json:"average,omitempty"`
16332	// Minimum - READ-ONLY; Value minimum.
16333	Minimum *float64 `json:"minimum,omitempty"`
16334	// Maximum - READ-ONLY; Value maximum.
16335	Maximum *float64 `json:"maximum,omitempty"`
16336	// Total - READ-ONLY; Value total.
16337	Total *float64 `json:"total,omitempty"`
16338	// Count - READ-ONLY; Value count.
16339	Count *float64 `json:"count,omitempty"`
16340	// Properties - READ-ONLY; Resource metric properties collection.
16341	Properties *[]ResourceMetricProperty `json:"properties,omitempty"`
16342}
16343
16344// MarshalJSON is the custom marshaler for ResourceMetricValue.
16345func (rmv ResourceMetricValue) MarshalJSON() ([]byte, error) {
16346	objectMap := make(map[string]interface{})
16347	return json.Marshal(objectMap)
16348}
16349
16350// ResourceNameAvailability information regarding availability of a resource name.
16351type ResourceNameAvailability struct {
16352	autorest.Response `json:"-"`
16353	// NameAvailable - <code>true</code> indicates name is valid and available. <code>false</code> indicates the name is invalid, unavailable, or both.
16354	NameAvailable *bool `json:"nameAvailable,omitempty"`
16355	// Reason - <code>Invalid</code> indicates the name provided does not match Azure App Service naming requirements. <code>AlreadyExists</code> indicates that the name is already in use and is therefore unavailable. Possible values include: 'Invalid', 'AlreadyExists'
16356	Reason InAvailabilityReasonType `json:"reason,omitempty"`
16357	// Message - If reason == invalid, provide the user with the reason why the given name is invalid, and provide the resource naming requirements so that the user can select a valid name. If reason == AlreadyExists, explain that resource name is already in use, and direct them to select a different name.
16358	Message *string `json:"message,omitempty"`
16359}
16360
16361// ResourceNameAvailabilityRequest resource name availability request content.
16362type ResourceNameAvailabilityRequest struct {
16363	// Name - Resource name to verify.
16364	Name *string `json:"name,omitempty"`
16365	// Type - Resource type used for verification. Possible values include: 'CheckNameResourceTypesSite', 'CheckNameResourceTypesSlot', 'CheckNameResourceTypesHostingEnvironment', 'CheckNameResourceTypesPublishingUser', 'CheckNameResourceTypesMicrosoftWebsites', 'CheckNameResourceTypesMicrosoftWebsitesslots', 'CheckNameResourceTypesMicrosoftWebhostingEnvironments', 'CheckNameResourceTypesMicrosoftWebpublishingUsers'
16366	Type CheckNameResourceTypes `json:"type,omitempty"`
16367	// IsFqdn - Is fully qualified domain name.
16368	IsFqdn *bool `json:"isFqdn,omitempty"`
16369}
16370
16371// ResponseMetaData ...
16372type ResponseMetaData struct {
16373	// DataSource - Source of the Data
16374	DataSource *DataSource `json:"dataSource,omitempty"`
16375}
16376
16377// RestoreRequest description of a restore request.
16378type RestoreRequest struct {
16379	autorest.Response `json:"-"`
16380	// RestoreRequestProperties - RestoreRequest resource specific properties
16381	*RestoreRequestProperties `json:"properties,omitempty"`
16382	// ID - READ-ONLY; Resource Id.
16383	ID *string `json:"id,omitempty"`
16384	// Name - READ-ONLY; Resource Name.
16385	Name *string `json:"name,omitempty"`
16386	// Kind - Kind of resource.
16387	Kind *string `json:"kind,omitempty"`
16388	// Type - READ-ONLY; Resource type.
16389	Type *string `json:"type,omitempty"`
16390}
16391
16392// MarshalJSON is the custom marshaler for RestoreRequest.
16393func (rr RestoreRequest) MarshalJSON() ([]byte, error) {
16394	objectMap := make(map[string]interface{})
16395	if rr.RestoreRequestProperties != nil {
16396		objectMap["properties"] = rr.RestoreRequestProperties
16397	}
16398	if rr.Kind != nil {
16399		objectMap["kind"] = rr.Kind
16400	}
16401	return json.Marshal(objectMap)
16402}
16403
16404// UnmarshalJSON is the custom unmarshaler for RestoreRequest struct.
16405func (rr *RestoreRequest) UnmarshalJSON(body []byte) error {
16406	var m map[string]*json.RawMessage
16407	err := json.Unmarshal(body, &m)
16408	if err != nil {
16409		return err
16410	}
16411	for k, v := range m {
16412		switch k {
16413		case "properties":
16414			if v != nil {
16415				var restoreRequestProperties RestoreRequestProperties
16416				err = json.Unmarshal(*v, &restoreRequestProperties)
16417				if err != nil {
16418					return err
16419				}
16420				rr.RestoreRequestProperties = &restoreRequestProperties
16421			}
16422		case "id":
16423			if v != nil {
16424				var ID string
16425				err = json.Unmarshal(*v, &ID)
16426				if err != nil {
16427					return err
16428				}
16429				rr.ID = &ID
16430			}
16431		case "name":
16432			if v != nil {
16433				var name string
16434				err = json.Unmarshal(*v, &name)
16435				if err != nil {
16436					return err
16437				}
16438				rr.Name = &name
16439			}
16440		case "kind":
16441			if v != nil {
16442				var kind string
16443				err = json.Unmarshal(*v, &kind)
16444				if err != nil {
16445					return err
16446				}
16447				rr.Kind = &kind
16448			}
16449		case "type":
16450			if v != nil {
16451				var typeVar string
16452				err = json.Unmarshal(*v, &typeVar)
16453				if err != nil {
16454					return err
16455				}
16456				rr.Type = &typeVar
16457			}
16458		}
16459	}
16460
16461	return nil
16462}
16463
16464// RestoreRequestProperties restoreRequest resource specific properties
16465type RestoreRequestProperties struct {
16466	// StorageAccountURL - SAS URL to the container.
16467	StorageAccountURL *string `json:"storageAccountUrl,omitempty"`
16468	// BlobName - Name of a blob which contains the backup.
16469	BlobName *string `json:"blobName,omitempty"`
16470	// Overwrite - <code>true</code> if the restore operation can overwrite target app; otherwise, <code>false</code>. <code>true</code> is needed if trying to restore over an existing app.
16471	Overwrite *bool `json:"overwrite,omitempty"`
16472	// SiteName - Name of an app.
16473	SiteName *string `json:"siteName,omitempty"`
16474	// Databases - Collection of databases which should be restored. This list has to match the list of databases included in the backup.
16475	Databases *[]DatabaseBackupSetting `json:"databases,omitempty"`
16476	// IgnoreConflictingHostNames - Changes a logic when restoring an app with custom domains. <code>true</code> to remove custom domains automatically. If <code>false</code>, custom domains are added to
16477	// the app's object when it is being restored, but that might fail due to conflicts during the operation.
16478	IgnoreConflictingHostNames *bool `json:"ignoreConflictingHostNames,omitempty"`
16479	// IgnoreDatabases - Ignore the databases and only restore the site content
16480	IgnoreDatabases *bool `json:"ignoreDatabases,omitempty"`
16481	// AppServicePlan - Specify app service plan that will own restored site.
16482	AppServicePlan *string `json:"appServicePlan,omitempty"`
16483	// OperationType - Operation type. Possible values include: 'BackupRestoreOperationTypeDefault', 'BackupRestoreOperationTypeClone', 'BackupRestoreOperationTypeRelocation', 'BackupRestoreOperationTypeSnapshot'
16484	OperationType BackupRestoreOperationType `json:"operationType,omitempty"`
16485	// AdjustConnectionStrings - <code>true</code> if SiteConfig.ConnectionStrings should be set in new app; otherwise, <code>false</code>.
16486	AdjustConnectionStrings *bool `json:"adjustConnectionStrings,omitempty"`
16487	// HostingEnvironment - App Service Environment name, if needed (only when restoring an app to an App Service Environment).
16488	HostingEnvironment *string `json:"hostingEnvironment,omitempty"`
16489}
16490
16491// RestoreResponse response for an app restore request.
16492type RestoreResponse struct {
16493	autorest.Response `json:"-"`
16494	// RestoreResponseProperties - RestoreResponse resource specific properties
16495	*RestoreResponseProperties `json:"properties,omitempty"`
16496	// ID - READ-ONLY; Resource Id.
16497	ID *string `json:"id,omitempty"`
16498	// Name - READ-ONLY; Resource Name.
16499	Name *string `json:"name,omitempty"`
16500	// Kind - Kind of resource.
16501	Kind *string `json:"kind,omitempty"`
16502	// Type - READ-ONLY; Resource type.
16503	Type *string `json:"type,omitempty"`
16504}
16505
16506// MarshalJSON is the custom marshaler for RestoreResponse.
16507func (rr RestoreResponse) MarshalJSON() ([]byte, error) {
16508	objectMap := make(map[string]interface{})
16509	if rr.RestoreResponseProperties != nil {
16510		objectMap["properties"] = rr.RestoreResponseProperties
16511	}
16512	if rr.Kind != nil {
16513		objectMap["kind"] = rr.Kind
16514	}
16515	return json.Marshal(objectMap)
16516}
16517
16518// UnmarshalJSON is the custom unmarshaler for RestoreResponse struct.
16519func (rr *RestoreResponse) UnmarshalJSON(body []byte) error {
16520	var m map[string]*json.RawMessage
16521	err := json.Unmarshal(body, &m)
16522	if err != nil {
16523		return err
16524	}
16525	for k, v := range m {
16526		switch k {
16527		case "properties":
16528			if v != nil {
16529				var restoreResponseProperties RestoreResponseProperties
16530				err = json.Unmarshal(*v, &restoreResponseProperties)
16531				if err != nil {
16532					return err
16533				}
16534				rr.RestoreResponseProperties = &restoreResponseProperties
16535			}
16536		case "id":
16537			if v != nil {
16538				var ID string
16539				err = json.Unmarshal(*v, &ID)
16540				if err != nil {
16541					return err
16542				}
16543				rr.ID = &ID
16544			}
16545		case "name":
16546			if v != nil {
16547				var name string
16548				err = json.Unmarshal(*v, &name)
16549				if err != nil {
16550					return err
16551				}
16552				rr.Name = &name
16553			}
16554		case "kind":
16555			if v != nil {
16556				var kind string
16557				err = json.Unmarshal(*v, &kind)
16558				if err != nil {
16559					return err
16560				}
16561				rr.Kind = &kind
16562			}
16563		case "type":
16564			if v != nil {
16565				var typeVar string
16566				err = json.Unmarshal(*v, &typeVar)
16567				if err != nil {
16568					return err
16569				}
16570				rr.Type = &typeVar
16571			}
16572		}
16573	}
16574
16575	return nil
16576}
16577
16578// RestoreResponseProperties restoreResponse resource specific properties
16579type RestoreResponseProperties struct {
16580	// OperationID - READ-ONLY; When server starts the restore process, it will return an operation ID identifying that particular restore operation.
16581	OperationID *string `json:"operationId,omitempty"`
16582}
16583
16584// MarshalJSON is the custom marshaler for RestoreResponseProperties.
16585func (rr RestoreResponseProperties) MarshalJSON() ([]byte, error) {
16586	objectMap := make(map[string]interface{})
16587	return json.Marshal(objectMap)
16588}
16589
16590// ServiceSpecification resource metrics service provided by Microsoft.Insights resource provider.
16591type ServiceSpecification struct {
16592	MetricSpecifications *[]MetricSpecification `json:"metricSpecifications,omitempty"`
16593}
16594
16595// SetObject ...
16596type SetObject struct {
16597	autorest.Response `json:"-"`
16598	Value             interface{} `json:"value,omitempty"`
16599}
16600
16601// Site a web app, a mobile app backend, or an API app.
16602type Site struct {
16603	autorest.Response `json:"-"`
16604	// SiteProperties - Site resource specific properties
16605	*SiteProperties `json:"properties,omitempty"`
16606	Identity        *ManagedServiceIdentity `json:"identity,omitempty"`
16607	// ID - READ-ONLY; Resource Id.
16608	ID *string `json:"id,omitempty"`
16609	// Name - READ-ONLY; Resource Name.
16610	Name *string `json:"name,omitempty"`
16611	// Kind - Kind of resource.
16612	Kind *string `json:"kind,omitempty"`
16613	// Location - Resource Location.
16614	Location *string `json:"location,omitempty"`
16615	// Type - READ-ONLY; Resource type.
16616	Type *string `json:"type,omitempty"`
16617	// Tags - Resource tags.
16618	Tags map[string]*string `json:"tags"`
16619}
16620
16621// MarshalJSON is the custom marshaler for Site.
16622func (s Site) MarshalJSON() ([]byte, error) {
16623	objectMap := make(map[string]interface{})
16624	if s.SiteProperties != nil {
16625		objectMap["properties"] = s.SiteProperties
16626	}
16627	if s.Identity != nil {
16628		objectMap["identity"] = s.Identity
16629	}
16630	if s.Kind != nil {
16631		objectMap["kind"] = s.Kind
16632	}
16633	if s.Location != nil {
16634		objectMap["location"] = s.Location
16635	}
16636	if s.Tags != nil {
16637		objectMap["tags"] = s.Tags
16638	}
16639	return json.Marshal(objectMap)
16640}
16641
16642// UnmarshalJSON is the custom unmarshaler for Site struct.
16643func (s *Site) UnmarshalJSON(body []byte) error {
16644	var m map[string]*json.RawMessage
16645	err := json.Unmarshal(body, &m)
16646	if err != nil {
16647		return err
16648	}
16649	for k, v := range m {
16650		switch k {
16651		case "properties":
16652			if v != nil {
16653				var siteProperties SiteProperties
16654				err = json.Unmarshal(*v, &siteProperties)
16655				if err != nil {
16656					return err
16657				}
16658				s.SiteProperties = &siteProperties
16659			}
16660		case "identity":
16661			if v != nil {
16662				var identity ManagedServiceIdentity
16663				err = json.Unmarshal(*v, &identity)
16664				if err != nil {
16665					return err
16666				}
16667				s.Identity = &identity
16668			}
16669		case "id":
16670			if v != nil {
16671				var ID string
16672				err = json.Unmarshal(*v, &ID)
16673				if err != nil {
16674					return err
16675				}
16676				s.ID = &ID
16677			}
16678		case "name":
16679			if v != nil {
16680				var name string
16681				err = json.Unmarshal(*v, &name)
16682				if err != nil {
16683					return err
16684				}
16685				s.Name = &name
16686			}
16687		case "kind":
16688			if v != nil {
16689				var kind string
16690				err = json.Unmarshal(*v, &kind)
16691				if err != nil {
16692					return err
16693				}
16694				s.Kind = &kind
16695			}
16696		case "location":
16697			if v != nil {
16698				var location string
16699				err = json.Unmarshal(*v, &location)
16700				if err != nil {
16701					return err
16702				}
16703				s.Location = &location
16704			}
16705		case "type":
16706			if v != nil {
16707				var typeVar string
16708				err = json.Unmarshal(*v, &typeVar)
16709				if err != nil {
16710					return err
16711				}
16712				s.Type = &typeVar
16713			}
16714		case "tags":
16715			if v != nil {
16716				var tags map[string]*string
16717				err = json.Unmarshal(*v, &tags)
16718				if err != nil {
16719					return err
16720				}
16721				s.Tags = tags
16722			}
16723		}
16724	}
16725
16726	return nil
16727}
16728
16729// SiteAuthSettings configuration settings for the Azure App Service Authentication / Authorization
16730// feature.
16731type SiteAuthSettings struct {
16732	autorest.Response `json:"-"`
16733	// SiteAuthSettingsProperties - SiteAuthSettings resource specific properties
16734	*SiteAuthSettingsProperties `json:"properties,omitempty"`
16735	// ID - READ-ONLY; Resource Id.
16736	ID *string `json:"id,omitempty"`
16737	// Name - READ-ONLY; Resource Name.
16738	Name *string `json:"name,omitempty"`
16739	// Kind - Kind of resource.
16740	Kind *string `json:"kind,omitempty"`
16741	// Type - READ-ONLY; Resource type.
16742	Type *string `json:"type,omitempty"`
16743}
16744
16745// MarshalJSON is the custom marshaler for SiteAuthSettings.
16746func (sas SiteAuthSettings) MarshalJSON() ([]byte, error) {
16747	objectMap := make(map[string]interface{})
16748	if sas.SiteAuthSettingsProperties != nil {
16749		objectMap["properties"] = sas.SiteAuthSettingsProperties
16750	}
16751	if sas.Kind != nil {
16752		objectMap["kind"] = sas.Kind
16753	}
16754	return json.Marshal(objectMap)
16755}
16756
16757// UnmarshalJSON is the custom unmarshaler for SiteAuthSettings struct.
16758func (sas *SiteAuthSettings) UnmarshalJSON(body []byte) error {
16759	var m map[string]*json.RawMessage
16760	err := json.Unmarshal(body, &m)
16761	if err != nil {
16762		return err
16763	}
16764	for k, v := range m {
16765		switch k {
16766		case "properties":
16767			if v != nil {
16768				var siteAuthSettingsProperties SiteAuthSettingsProperties
16769				err = json.Unmarshal(*v, &siteAuthSettingsProperties)
16770				if err != nil {
16771					return err
16772				}
16773				sas.SiteAuthSettingsProperties = &siteAuthSettingsProperties
16774			}
16775		case "id":
16776			if v != nil {
16777				var ID string
16778				err = json.Unmarshal(*v, &ID)
16779				if err != nil {
16780					return err
16781				}
16782				sas.ID = &ID
16783			}
16784		case "name":
16785			if v != nil {
16786				var name string
16787				err = json.Unmarshal(*v, &name)
16788				if err != nil {
16789					return err
16790				}
16791				sas.Name = &name
16792			}
16793		case "kind":
16794			if v != nil {
16795				var kind string
16796				err = json.Unmarshal(*v, &kind)
16797				if err != nil {
16798					return err
16799				}
16800				sas.Kind = &kind
16801			}
16802		case "type":
16803			if v != nil {
16804				var typeVar string
16805				err = json.Unmarshal(*v, &typeVar)
16806				if err != nil {
16807					return err
16808				}
16809				sas.Type = &typeVar
16810			}
16811		}
16812	}
16813
16814	return nil
16815}
16816
16817// SiteAuthSettingsProperties siteAuthSettings resource specific properties
16818type SiteAuthSettingsProperties struct {
16819	// Enabled - <code>true</code> if the Authentication / Authorization feature is enabled for the current app; otherwise, <code>false</code>.
16820	Enabled *bool `json:"enabled,omitempty"`
16821	// RuntimeVersion - The RuntimeVersion of the Authentication / Authorization feature in use for the current app.
16822	// The setting in this value can control the behavior of certain features in the Authentication / Authorization module.
16823	RuntimeVersion *string `json:"runtimeVersion,omitempty"`
16824	// UnauthenticatedClientAction - The action to take when an unauthenticated client attempts to access the app. Possible values include: 'RedirectToLoginPage', 'AllowAnonymous'
16825	UnauthenticatedClientAction UnauthenticatedClientAction `json:"unauthenticatedClientAction,omitempty"`
16826	// TokenStoreEnabled - <code>true</code> to durably store platform-specific security tokens that are obtained during login flows; otherwise, <code>false</code>.
16827	//  The default is <code>false</code>.
16828	TokenStoreEnabled *bool `json:"tokenStoreEnabled,omitempty"`
16829	// AllowedExternalRedirectUrls - External URLs that can be redirected to as part of logging in or logging out of the app. Note that the query string part of the URL is ignored.
16830	// This is an advanced setting typically only needed by Windows Store application backends.
16831	// Note that URLs within the current domain are always implicitly allowed.
16832	AllowedExternalRedirectUrls *[]string `json:"allowedExternalRedirectUrls,omitempty"`
16833	// DefaultProvider - The default authentication provider to use when multiple providers are configured.
16834	// This setting is only needed if multiple providers are configured and the unauthenticated client
16835	// action is set to "RedirectToLoginPage". Possible values include: 'AzureActiveDirectory', 'Facebook', 'Google', 'MicrosoftAccount', 'Twitter'
16836	DefaultProvider BuiltInAuthenticationProvider `json:"defaultProvider,omitempty"`
16837	// TokenRefreshExtensionHours - The number of hours after session token expiration that a session token can be used to
16838	// call the token refresh API. The default is 72 hours.
16839	TokenRefreshExtensionHours *float64 `json:"tokenRefreshExtensionHours,omitempty"`
16840	// ClientID - The Client ID of this relying party application, known as the client_id.
16841	// This setting is required for enabling OpenID Connection authentication with Azure Active Directory or
16842	// other 3rd party OpenID Connect providers.
16843	// More information on OpenID Connect: http://openid.net/specs/openid-connect-core-1_0.html
16844	ClientID *string `json:"clientId,omitempty"`
16845	// ClientSecret - The Client Secret of this relying party application (in Azure Active Directory, this is also referred to as the Key).
16846	// This setting is optional. If no client secret is configured, the OpenID Connect implicit auth flow is used to authenticate end users.
16847	// Otherwise, the OpenID Connect Authorization Code Flow is used to authenticate end users.
16848	// More information on OpenID Connect: http://openid.net/specs/openid-connect-core-1_0.html
16849	ClientSecret *string `json:"clientSecret,omitempty"`
16850	// Issuer - The OpenID Connect Issuer URI that represents the entity which issues access tokens for this application.
16851	// When using Azure Active Directory, this value is the URI of the directory tenant, e.g. https://sts.windows.net/{tenant-guid}/.
16852	// This URI is a case-sensitive identifier for the token issuer.
16853	// More information on OpenID Connect Discovery: http://openid.net/specs/openid-connect-discovery-1_0.html
16854	Issuer *string `json:"issuer,omitempty"`
16855	// AllowedAudiences - Allowed audience values to consider when validating JWTs issued by
16856	// Azure Active Directory. Note that the <code>ClientID</code> value is always considered an
16857	// allowed audience, regardless of this setting.
16858	AllowedAudiences *[]string `json:"allowedAudiences,omitempty"`
16859	// AdditionalLoginParams - Login parameters to send to the OpenID Connect authorization endpoint when
16860	// a user logs in. Each parameter must be in the form "key=value".
16861	AdditionalLoginParams *[]string `json:"additionalLoginParams,omitempty"`
16862	// GoogleClientID - The OpenID Connect Client ID for the Google web application.
16863	// This setting is required for enabling Google Sign-In.
16864	// Google Sign-In documentation: https://developers.google.com/identity/sign-in/web/
16865	GoogleClientID *string `json:"googleClientId,omitempty"`
16866	// GoogleClientSecret - The client secret associated with the Google web application.
16867	// This setting is required for enabling Google Sign-In.
16868	// Google Sign-In documentation: https://developers.google.com/identity/sign-in/web/
16869	GoogleClientSecret *string `json:"googleClientSecret,omitempty"`
16870	// GoogleOAuthScopes - The OAuth 2.0 scopes that will be requested as part of Google Sign-In authentication.
16871	// This setting is optional. If not specified, "openid", "profile", and "email" are used as default scopes.
16872	// Google Sign-In documentation: https://developers.google.com/identity/sign-in/web/
16873	GoogleOAuthScopes *[]string `json:"googleOAuthScopes,omitempty"`
16874	// FacebookAppID - The App ID of the Facebook app used for login.
16875	// This setting is required for enabling Facebook Login.
16876	// Facebook Login documentation: https://developers.facebook.com/docs/facebook-login
16877	FacebookAppID *string `json:"facebookAppId,omitempty"`
16878	// FacebookAppSecret - The App Secret of the Facebook app used for Facebook Login.
16879	// This setting is required for enabling Facebook Login.
16880	// Facebook Login documentation: https://developers.facebook.com/docs/facebook-login
16881	FacebookAppSecret *string `json:"facebookAppSecret,omitempty"`
16882	// FacebookOAuthScopes - The OAuth 2.0 scopes that will be requested as part of Facebook Login authentication.
16883	// This setting is optional.
16884	// Facebook Login documentation: https://developers.facebook.com/docs/facebook-login
16885	FacebookOAuthScopes *[]string `json:"facebookOAuthScopes,omitempty"`
16886	// TwitterConsumerKey - The OAuth 1.0a consumer key of the Twitter application used for sign-in.
16887	// This setting is required for enabling Twitter Sign-In.
16888	// Twitter Sign-In documentation: https://dev.twitter.com/web/sign-in
16889	TwitterConsumerKey *string `json:"twitterConsumerKey,omitempty"`
16890	// TwitterConsumerSecret - The OAuth 1.0a consumer secret of the Twitter application used for sign-in.
16891	// This setting is required for enabling Twitter Sign-In.
16892	// Twitter Sign-In documentation: https://dev.twitter.com/web/sign-in
16893	TwitterConsumerSecret *string `json:"twitterConsumerSecret,omitempty"`
16894	// MicrosoftAccountClientID - The OAuth 2.0 client ID that was created for the app used for authentication.
16895	// This setting is required for enabling Microsoft Account authentication.
16896	// Microsoft Account OAuth documentation: https://dev.onedrive.com/auth/msa_oauth.htm
16897	MicrosoftAccountClientID *string `json:"microsoftAccountClientId,omitempty"`
16898	// MicrosoftAccountClientSecret - The OAuth 2.0 client secret that was created for the app used for authentication.
16899	// This setting is required for enabling Microsoft Account authentication.
16900	// Microsoft Account OAuth documentation: https://dev.onedrive.com/auth/msa_oauth.htm
16901	MicrosoftAccountClientSecret *string `json:"microsoftAccountClientSecret,omitempty"`
16902	// MicrosoftAccountOAuthScopes - The OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication.
16903	// This setting is optional. If not specified, "wl.basic" is used as the default scope.
16904	// Microsoft Account Scopes and permissions documentation: https://msdn.microsoft.com/en-us/library/dn631845.aspx
16905	MicrosoftAccountOAuthScopes *[]string `json:"microsoftAccountOAuthScopes,omitempty"`
16906}
16907
16908// SiteCloneability represents whether or not an app is cloneable.
16909type SiteCloneability struct {
16910	autorest.Response `json:"-"`
16911	// Result - Name of app. Possible values include: 'Cloneable', 'PartiallyCloneable', 'NotCloneable'
16912	Result CloneAbilityResult `json:"result,omitempty"`
16913	// BlockingFeatures - List of features enabled on app that prevent cloning.
16914	BlockingFeatures *[]SiteCloneabilityCriterion `json:"blockingFeatures,omitempty"`
16915	// UnsupportedFeatures - List of features enabled on app that are non-blocking but cannot be cloned. The app can still be cloned
16916	// but the features in this list will not be set up on cloned app.
16917	UnsupportedFeatures *[]SiteCloneabilityCriterion `json:"unsupportedFeatures,omitempty"`
16918	// BlockingCharacteristics - List of blocking application characteristics.
16919	BlockingCharacteristics *[]SiteCloneabilityCriterion `json:"blockingCharacteristics,omitempty"`
16920}
16921
16922// SiteCloneabilityCriterion an app cloneability criterion.
16923type SiteCloneabilityCriterion struct {
16924	// Name - Name of criterion.
16925	Name *string `json:"name,omitempty"`
16926	// Description - Description of criterion.
16927	Description *string `json:"description,omitempty"`
16928}
16929
16930// SiteConfig configuration of an App Service app.
16931type SiteConfig struct {
16932	// NumberOfWorkers - Number of workers.
16933	NumberOfWorkers *int32 `json:"numberOfWorkers,omitempty"`
16934	// DefaultDocuments - Default documents.
16935	DefaultDocuments *[]string `json:"defaultDocuments,omitempty"`
16936	// NetFrameworkVersion - .NET Framework version.
16937	NetFrameworkVersion *string `json:"netFrameworkVersion,omitempty"`
16938	// PhpVersion - Version of PHP.
16939	PhpVersion *string `json:"phpVersion,omitempty"`
16940	// PythonVersion - Version of Python.
16941	PythonVersion *string `json:"pythonVersion,omitempty"`
16942	// NodeVersion - Version of Node.js.
16943	NodeVersion *string `json:"nodeVersion,omitempty"`
16944	// LinuxFxVersion - Linux App Framework and version
16945	LinuxFxVersion *string `json:"linuxFxVersion,omitempty"`
16946	// RequestTracingEnabled - <code>true</code> if request tracing is enabled; otherwise, <code>false</code>.
16947	RequestTracingEnabled *bool `json:"requestTracingEnabled,omitempty"`
16948	// RequestTracingExpirationTime - Request tracing expiration time.
16949	RequestTracingExpirationTime *date.Time `json:"requestTracingExpirationTime,omitempty"`
16950	// RemoteDebuggingEnabled - <code>true</code> if remote debugging is enabled; otherwise, <code>false</code>.
16951	RemoteDebuggingEnabled *bool `json:"remoteDebuggingEnabled,omitempty"`
16952	// RemoteDebuggingVersion - Remote debugging version.
16953	RemoteDebuggingVersion *string `json:"remoteDebuggingVersion,omitempty"`
16954	// HTTPLoggingEnabled - <code>true</code> if HTTP logging is enabled; otherwise, <code>false</code>.
16955	HTTPLoggingEnabled *bool `json:"httpLoggingEnabled,omitempty"`
16956	// LogsDirectorySizeLimit - HTTP logs directory size limit.
16957	LogsDirectorySizeLimit *int32 `json:"logsDirectorySizeLimit,omitempty"`
16958	// DetailedErrorLoggingEnabled - <code>true</code> if detailed error logging is enabled; otherwise, <code>false</code>.
16959	DetailedErrorLoggingEnabled *bool `json:"detailedErrorLoggingEnabled,omitempty"`
16960	// PublishingUsername - Publishing user name.
16961	PublishingUsername *string `json:"publishingUsername,omitempty"`
16962	// AppSettings - Application settings.
16963	AppSettings *[]NameValuePair `json:"appSettings,omitempty"`
16964	// ConnectionStrings - Connection strings.
16965	ConnectionStrings *[]ConnStringInfo `json:"connectionStrings,omitempty"`
16966	// MachineKey - READ-ONLY; Site MachineKey.
16967	MachineKey *SiteMachineKey `json:"machineKey,omitempty"`
16968	// HandlerMappings - Handler mappings.
16969	HandlerMappings *[]HandlerMapping `json:"handlerMappings,omitempty"`
16970	// DocumentRoot - Document root.
16971	DocumentRoot *string `json:"documentRoot,omitempty"`
16972	// ScmType - SCM type. Possible values include: 'ScmTypeNone', 'ScmTypeDropbox', 'ScmTypeTfs', 'ScmTypeLocalGit', 'ScmTypeGitHub', 'ScmTypeCodePlexGit', 'ScmTypeCodePlexHg', 'ScmTypeBitbucketGit', 'ScmTypeBitbucketHg', 'ScmTypeExternalGit', 'ScmTypeExternalHg', 'ScmTypeOneDrive', 'ScmTypeVSO'
16973	ScmType ScmType `json:"scmType,omitempty"`
16974	// Use32BitWorkerProcess - <code>true</code> to use 32-bit worker process; otherwise, <code>false</code>.
16975	Use32BitWorkerProcess *bool `json:"use32BitWorkerProcess,omitempty"`
16976	// WebSocketsEnabled - <code>true</code> if WebSocket is enabled; otherwise, <code>false</code>.
16977	WebSocketsEnabled *bool `json:"webSocketsEnabled,omitempty"`
16978	// AlwaysOn - <code>true</code> if Always On is enabled; otherwise, <code>false</code>.
16979	AlwaysOn *bool `json:"alwaysOn,omitempty"`
16980	// JavaVersion - Java version.
16981	JavaVersion *string `json:"javaVersion,omitempty"`
16982	// JavaContainer - Java container.
16983	JavaContainer *string `json:"javaContainer,omitempty"`
16984	// JavaContainerVersion - Java container version.
16985	JavaContainerVersion *string `json:"javaContainerVersion,omitempty"`
16986	// AppCommandLine - App command line to launch.
16987	AppCommandLine *string `json:"appCommandLine,omitempty"`
16988	// ManagedPipelineMode - Managed pipeline mode. Possible values include: 'Integrated', 'Classic'
16989	ManagedPipelineMode ManagedPipelineMode `json:"managedPipelineMode,omitempty"`
16990	// VirtualApplications - Virtual applications.
16991	VirtualApplications *[]VirtualApplication `json:"virtualApplications,omitempty"`
16992	// LoadBalancing - Site load balancing. Possible values include: 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', 'WeightedTotalTraffic', 'RequestHash'
16993	LoadBalancing SiteLoadBalancing `json:"loadBalancing,omitempty"`
16994	// Experiments - This is work around for polymorphic types.
16995	Experiments *Experiments `json:"experiments,omitempty"`
16996	// Limits - Site limits.
16997	Limits *SiteLimits `json:"limits,omitempty"`
16998	// AutoHealEnabled - <code>true</code> if Auto Heal is enabled; otherwise, <code>false</code>.
16999	AutoHealEnabled *bool `json:"autoHealEnabled,omitempty"`
17000	// AutoHealRules - Auto Heal rules.
17001	AutoHealRules *AutoHealRules `json:"autoHealRules,omitempty"`
17002	// TracingOptions - Tracing options.
17003	TracingOptions *string `json:"tracingOptions,omitempty"`
17004	// VnetName - Virtual Network name.
17005	VnetName *string `json:"vnetName,omitempty"`
17006	// Cors - Cross-Origin Resource Sharing (CORS) settings.
17007	Cors *CorsSettings `json:"cors,omitempty"`
17008	// Push - Push endpoint settings.
17009	Push *PushSettings `json:"push,omitempty"`
17010	// APIDefinition - Information about the formal API definition for the app.
17011	APIDefinition *APIDefinitionInfo `json:"apiDefinition,omitempty"`
17012	// AutoSwapSlotName - Auto-swap slot name.
17013	AutoSwapSlotName *string `json:"autoSwapSlotName,omitempty"`
17014	// LocalMySQLEnabled - <code>true</code> to enable local MySQL; otherwise, <code>false</code>.
17015	LocalMySQLEnabled *bool `json:"localMySqlEnabled,omitempty"`
17016	// IPSecurityRestrictions - IP security restrictions.
17017	IPSecurityRestrictions *[]IPSecurityRestriction `json:"ipSecurityRestrictions,omitempty"`
17018	// HTTP20Enabled - Http20Enabled: configures a web site to allow clients to connect over http2.0
17019	HTTP20Enabled *bool `json:"http20Enabled,omitempty"`
17020	// MinTLSVersion - MinTlsVersion: configures the minimum version of TLS required for SSL requests. Possible values include: 'OneFullStopZero', 'OneFullStopOne', 'OneFullStopTwo'
17021	MinTLSVersion SupportedTLSVersions `json:"minTlsVersion,omitempty"`
17022}
17023
17024// MarshalJSON is the custom marshaler for SiteConfig.
17025func (sc SiteConfig) MarshalJSON() ([]byte, error) {
17026	objectMap := make(map[string]interface{})
17027	if sc.NumberOfWorkers != nil {
17028		objectMap["numberOfWorkers"] = sc.NumberOfWorkers
17029	}
17030	if sc.DefaultDocuments != nil {
17031		objectMap["defaultDocuments"] = sc.DefaultDocuments
17032	}
17033	if sc.NetFrameworkVersion != nil {
17034		objectMap["netFrameworkVersion"] = sc.NetFrameworkVersion
17035	}
17036	if sc.PhpVersion != nil {
17037		objectMap["phpVersion"] = sc.PhpVersion
17038	}
17039	if sc.PythonVersion != nil {
17040		objectMap["pythonVersion"] = sc.PythonVersion
17041	}
17042	if sc.NodeVersion != nil {
17043		objectMap["nodeVersion"] = sc.NodeVersion
17044	}
17045	if sc.LinuxFxVersion != nil {
17046		objectMap["linuxFxVersion"] = sc.LinuxFxVersion
17047	}
17048	if sc.RequestTracingEnabled != nil {
17049		objectMap["requestTracingEnabled"] = sc.RequestTracingEnabled
17050	}
17051	if sc.RequestTracingExpirationTime != nil {
17052		objectMap["requestTracingExpirationTime"] = sc.RequestTracingExpirationTime
17053	}
17054	if sc.RemoteDebuggingEnabled != nil {
17055		objectMap["remoteDebuggingEnabled"] = sc.RemoteDebuggingEnabled
17056	}
17057	if sc.RemoteDebuggingVersion != nil {
17058		objectMap["remoteDebuggingVersion"] = sc.RemoteDebuggingVersion
17059	}
17060	if sc.HTTPLoggingEnabled != nil {
17061		objectMap["httpLoggingEnabled"] = sc.HTTPLoggingEnabled
17062	}
17063	if sc.LogsDirectorySizeLimit != nil {
17064		objectMap["logsDirectorySizeLimit"] = sc.LogsDirectorySizeLimit
17065	}
17066	if sc.DetailedErrorLoggingEnabled != nil {
17067		objectMap["detailedErrorLoggingEnabled"] = sc.DetailedErrorLoggingEnabled
17068	}
17069	if sc.PublishingUsername != nil {
17070		objectMap["publishingUsername"] = sc.PublishingUsername
17071	}
17072	if sc.AppSettings != nil {
17073		objectMap["appSettings"] = sc.AppSettings
17074	}
17075	if sc.ConnectionStrings != nil {
17076		objectMap["connectionStrings"] = sc.ConnectionStrings
17077	}
17078	if sc.HandlerMappings != nil {
17079		objectMap["handlerMappings"] = sc.HandlerMappings
17080	}
17081	if sc.DocumentRoot != nil {
17082		objectMap["documentRoot"] = sc.DocumentRoot
17083	}
17084	if sc.ScmType != "" {
17085		objectMap["scmType"] = sc.ScmType
17086	}
17087	if sc.Use32BitWorkerProcess != nil {
17088		objectMap["use32BitWorkerProcess"] = sc.Use32BitWorkerProcess
17089	}
17090	if sc.WebSocketsEnabled != nil {
17091		objectMap["webSocketsEnabled"] = sc.WebSocketsEnabled
17092	}
17093	if sc.AlwaysOn != nil {
17094		objectMap["alwaysOn"] = sc.AlwaysOn
17095	}
17096	if sc.JavaVersion != nil {
17097		objectMap["javaVersion"] = sc.JavaVersion
17098	}
17099	if sc.JavaContainer != nil {
17100		objectMap["javaContainer"] = sc.JavaContainer
17101	}
17102	if sc.JavaContainerVersion != nil {
17103		objectMap["javaContainerVersion"] = sc.JavaContainerVersion
17104	}
17105	if sc.AppCommandLine != nil {
17106		objectMap["appCommandLine"] = sc.AppCommandLine
17107	}
17108	if sc.ManagedPipelineMode != "" {
17109		objectMap["managedPipelineMode"] = sc.ManagedPipelineMode
17110	}
17111	if sc.VirtualApplications != nil {
17112		objectMap["virtualApplications"] = sc.VirtualApplications
17113	}
17114	if sc.LoadBalancing != "" {
17115		objectMap["loadBalancing"] = sc.LoadBalancing
17116	}
17117	if sc.Experiments != nil {
17118		objectMap["experiments"] = sc.Experiments
17119	}
17120	if sc.Limits != nil {
17121		objectMap["limits"] = sc.Limits
17122	}
17123	if sc.AutoHealEnabled != nil {
17124		objectMap["autoHealEnabled"] = sc.AutoHealEnabled
17125	}
17126	if sc.AutoHealRules != nil {
17127		objectMap["autoHealRules"] = sc.AutoHealRules
17128	}
17129	if sc.TracingOptions != nil {
17130		objectMap["tracingOptions"] = sc.TracingOptions
17131	}
17132	if sc.VnetName != nil {
17133		objectMap["vnetName"] = sc.VnetName
17134	}
17135	if sc.Cors != nil {
17136		objectMap["cors"] = sc.Cors
17137	}
17138	if sc.Push != nil {
17139		objectMap["push"] = sc.Push
17140	}
17141	if sc.APIDefinition != nil {
17142		objectMap["apiDefinition"] = sc.APIDefinition
17143	}
17144	if sc.AutoSwapSlotName != nil {
17145		objectMap["autoSwapSlotName"] = sc.AutoSwapSlotName
17146	}
17147	if sc.LocalMySQLEnabled != nil {
17148		objectMap["localMySqlEnabled"] = sc.LocalMySQLEnabled
17149	}
17150	if sc.IPSecurityRestrictions != nil {
17151		objectMap["ipSecurityRestrictions"] = sc.IPSecurityRestrictions
17152	}
17153	if sc.HTTP20Enabled != nil {
17154		objectMap["http20Enabled"] = sc.HTTP20Enabled
17155	}
17156	if sc.MinTLSVersion != "" {
17157		objectMap["minTlsVersion"] = sc.MinTLSVersion
17158	}
17159	return json.Marshal(objectMap)
17160}
17161
17162// SiteConfigResource web app configuration ARM resource.
17163type SiteConfigResource struct {
17164	autorest.Response `json:"-"`
17165	// SiteConfig - Core resource properties
17166	*SiteConfig `json:"properties,omitempty"`
17167	// ID - READ-ONLY; Resource Id.
17168	ID *string `json:"id,omitempty"`
17169	// Name - READ-ONLY; Resource Name.
17170	Name *string `json:"name,omitempty"`
17171	// Kind - Kind of resource.
17172	Kind *string `json:"kind,omitempty"`
17173	// Type - READ-ONLY; Resource type.
17174	Type *string `json:"type,omitempty"`
17175}
17176
17177// MarshalJSON is the custom marshaler for SiteConfigResource.
17178func (scr SiteConfigResource) MarshalJSON() ([]byte, error) {
17179	objectMap := make(map[string]interface{})
17180	if scr.SiteConfig != nil {
17181		objectMap["properties"] = scr.SiteConfig
17182	}
17183	if scr.Kind != nil {
17184		objectMap["kind"] = scr.Kind
17185	}
17186	return json.Marshal(objectMap)
17187}
17188
17189// UnmarshalJSON is the custom unmarshaler for SiteConfigResource struct.
17190func (scr *SiteConfigResource) UnmarshalJSON(body []byte) error {
17191	var m map[string]*json.RawMessage
17192	err := json.Unmarshal(body, &m)
17193	if err != nil {
17194		return err
17195	}
17196	for k, v := range m {
17197		switch k {
17198		case "properties":
17199			if v != nil {
17200				var siteConfig SiteConfig
17201				err = json.Unmarshal(*v, &siteConfig)
17202				if err != nil {
17203					return err
17204				}
17205				scr.SiteConfig = &siteConfig
17206			}
17207		case "id":
17208			if v != nil {
17209				var ID string
17210				err = json.Unmarshal(*v, &ID)
17211				if err != nil {
17212					return err
17213				}
17214				scr.ID = &ID
17215			}
17216		case "name":
17217			if v != nil {
17218				var name string
17219				err = json.Unmarshal(*v, &name)
17220				if err != nil {
17221					return err
17222				}
17223				scr.Name = &name
17224			}
17225		case "kind":
17226			if v != nil {
17227				var kind string
17228				err = json.Unmarshal(*v, &kind)
17229				if err != nil {
17230					return err
17231				}
17232				scr.Kind = &kind
17233			}
17234		case "type":
17235			if v != nil {
17236				var typeVar string
17237				err = json.Unmarshal(*v, &typeVar)
17238				if err != nil {
17239					return err
17240				}
17241				scr.Type = &typeVar
17242			}
17243		}
17244	}
17245
17246	return nil
17247}
17248
17249// SiteConfigResourceCollection collection of site configurations.
17250type SiteConfigResourceCollection struct {
17251	autorest.Response `json:"-"`
17252	// Value - Collection of resources.
17253	Value *[]SiteConfigResource `json:"value,omitempty"`
17254	// NextLink - READ-ONLY; Link to next page of resources.
17255	NextLink *string `json:"nextLink,omitempty"`
17256}
17257
17258// MarshalJSON is the custom marshaler for SiteConfigResourceCollection.
17259func (scrc SiteConfigResourceCollection) MarshalJSON() ([]byte, error) {
17260	objectMap := make(map[string]interface{})
17261	if scrc.Value != nil {
17262		objectMap["value"] = scrc.Value
17263	}
17264	return json.Marshal(objectMap)
17265}
17266
17267// SiteConfigResourceCollectionIterator provides access to a complete listing of SiteConfigResource values.
17268type SiteConfigResourceCollectionIterator struct {
17269	i    int
17270	page SiteConfigResourceCollectionPage
17271}
17272
17273// NextWithContext advances to the next value.  If there was an error making
17274// the request the iterator does not advance and the error is returned.
17275func (iter *SiteConfigResourceCollectionIterator) NextWithContext(ctx context.Context) (err error) {
17276	if tracing.IsEnabled() {
17277		ctx = tracing.StartSpan(ctx, fqdn+"/SiteConfigResourceCollectionIterator.NextWithContext")
17278		defer func() {
17279			sc := -1
17280			if iter.Response().Response.Response != nil {
17281				sc = iter.Response().Response.Response.StatusCode
17282			}
17283			tracing.EndSpan(ctx, sc, err)
17284		}()
17285	}
17286	iter.i++
17287	if iter.i < len(iter.page.Values()) {
17288		return nil
17289	}
17290	err = iter.page.NextWithContext(ctx)
17291	if err != nil {
17292		iter.i--
17293		return err
17294	}
17295	iter.i = 0
17296	return nil
17297}
17298
17299// Next advances to the next value.  If there was an error making
17300// the request the iterator does not advance and the error is returned.
17301// Deprecated: Use NextWithContext() instead.
17302func (iter *SiteConfigResourceCollectionIterator) Next() error {
17303	return iter.NextWithContext(context.Background())
17304}
17305
17306// NotDone returns true if the enumeration should be started or is not yet complete.
17307func (iter SiteConfigResourceCollectionIterator) NotDone() bool {
17308	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17309}
17310
17311// Response returns the raw server response from the last page request.
17312func (iter SiteConfigResourceCollectionIterator) Response() SiteConfigResourceCollection {
17313	return iter.page.Response()
17314}
17315
17316// Value returns the current value or a zero-initialized value if the
17317// iterator has advanced beyond the end of the collection.
17318func (iter SiteConfigResourceCollectionIterator) Value() SiteConfigResource {
17319	if !iter.page.NotDone() {
17320		return SiteConfigResource{}
17321	}
17322	return iter.page.Values()[iter.i]
17323}
17324
17325// Creates a new instance of the SiteConfigResourceCollectionIterator type.
17326func NewSiteConfigResourceCollectionIterator(page SiteConfigResourceCollectionPage) SiteConfigResourceCollectionIterator {
17327	return SiteConfigResourceCollectionIterator{page: page}
17328}
17329
17330// IsEmpty returns true if the ListResult contains no values.
17331func (scrc SiteConfigResourceCollection) IsEmpty() bool {
17332	return scrc.Value == nil || len(*scrc.Value) == 0
17333}
17334
17335// hasNextLink returns true if the NextLink is not empty.
17336func (scrc SiteConfigResourceCollection) hasNextLink() bool {
17337	return scrc.NextLink != nil && len(*scrc.NextLink) != 0
17338}
17339
17340// siteConfigResourceCollectionPreparer prepares a request to retrieve the next set of results.
17341// It returns nil if no more results exist.
17342func (scrc SiteConfigResourceCollection) siteConfigResourceCollectionPreparer(ctx context.Context) (*http.Request, error) {
17343	if !scrc.hasNextLink() {
17344		return nil, nil
17345	}
17346	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17347		autorest.AsJSON(),
17348		autorest.AsGet(),
17349		autorest.WithBaseURL(to.String(scrc.NextLink)))
17350}
17351
17352// SiteConfigResourceCollectionPage contains a page of SiteConfigResource values.
17353type SiteConfigResourceCollectionPage struct {
17354	fn   func(context.Context, SiteConfigResourceCollection) (SiteConfigResourceCollection, error)
17355	scrc SiteConfigResourceCollection
17356}
17357
17358// NextWithContext advances to the next page of values.  If there was an error making
17359// the request the page does not advance and the error is returned.
17360func (page *SiteConfigResourceCollectionPage) NextWithContext(ctx context.Context) (err error) {
17361	if tracing.IsEnabled() {
17362		ctx = tracing.StartSpan(ctx, fqdn+"/SiteConfigResourceCollectionPage.NextWithContext")
17363		defer func() {
17364			sc := -1
17365			if page.Response().Response.Response != nil {
17366				sc = page.Response().Response.Response.StatusCode
17367			}
17368			tracing.EndSpan(ctx, sc, err)
17369		}()
17370	}
17371	for {
17372		next, err := page.fn(ctx, page.scrc)
17373		if err != nil {
17374			return err
17375		}
17376		page.scrc = next
17377		if !next.hasNextLink() || !next.IsEmpty() {
17378			break
17379		}
17380	}
17381	return nil
17382}
17383
17384// Next advances to the next page of values.  If there was an error making
17385// the request the page does not advance and the error is returned.
17386// Deprecated: Use NextWithContext() instead.
17387func (page *SiteConfigResourceCollectionPage) Next() error {
17388	return page.NextWithContext(context.Background())
17389}
17390
17391// NotDone returns true if the page enumeration should be started or is not yet complete.
17392func (page SiteConfigResourceCollectionPage) NotDone() bool {
17393	return !page.scrc.IsEmpty()
17394}
17395
17396// Response returns the raw server response from the last page request.
17397func (page SiteConfigResourceCollectionPage) Response() SiteConfigResourceCollection {
17398	return page.scrc
17399}
17400
17401// Values returns the slice of values for the current page or nil if there are no values.
17402func (page SiteConfigResourceCollectionPage) Values() []SiteConfigResource {
17403	if page.scrc.IsEmpty() {
17404		return nil
17405	}
17406	return *page.scrc.Value
17407}
17408
17409// Creates a new instance of the SiteConfigResourceCollectionPage type.
17410func NewSiteConfigResourceCollectionPage(cur SiteConfigResourceCollection, getNextPage func(context.Context, SiteConfigResourceCollection) (SiteConfigResourceCollection, error)) SiteConfigResourceCollectionPage {
17411	return SiteConfigResourceCollectionPage{
17412		fn:   getNextPage,
17413		scrc: cur,
17414	}
17415}
17416
17417// SiteConfigurationSnapshotInfo a snapshot of a web app configuration.
17418type SiteConfigurationSnapshotInfo struct {
17419	// SiteConfigurationSnapshotInfoProperties - SiteConfigurationSnapshotInfo resource specific properties
17420	*SiteConfigurationSnapshotInfoProperties `json:"properties,omitempty"`
17421	// ID - READ-ONLY; Resource Id.
17422	ID *string `json:"id,omitempty"`
17423	// Name - READ-ONLY; Resource Name.
17424	Name *string `json:"name,omitempty"`
17425	// Kind - Kind of resource.
17426	Kind *string `json:"kind,omitempty"`
17427	// Type - READ-ONLY; Resource type.
17428	Type *string `json:"type,omitempty"`
17429}
17430
17431// MarshalJSON is the custom marshaler for SiteConfigurationSnapshotInfo.
17432func (scsi SiteConfigurationSnapshotInfo) MarshalJSON() ([]byte, error) {
17433	objectMap := make(map[string]interface{})
17434	if scsi.SiteConfigurationSnapshotInfoProperties != nil {
17435		objectMap["properties"] = scsi.SiteConfigurationSnapshotInfoProperties
17436	}
17437	if scsi.Kind != nil {
17438		objectMap["kind"] = scsi.Kind
17439	}
17440	return json.Marshal(objectMap)
17441}
17442
17443// UnmarshalJSON is the custom unmarshaler for SiteConfigurationSnapshotInfo struct.
17444func (scsi *SiteConfigurationSnapshotInfo) UnmarshalJSON(body []byte) error {
17445	var m map[string]*json.RawMessage
17446	err := json.Unmarshal(body, &m)
17447	if err != nil {
17448		return err
17449	}
17450	for k, v := range m {
17451		switch k {
17452		case "properties":
17453			if v != nil {
17454				var siteConfigurationSnapshotInfoProperties SiteConfigurationSnapshotInfoProperties
17455				err = json.Unmarshal(*v, &siteConfigurationSnapshotInfoProperties)
17456				if err != nil {
17457					return err
17458				}
17459				scsi.SiteConfigurationSnapshotInfoProperties = &siteConfigurationSnapshotInfoProperties
17460			}
17461		case "id":
17462			if v != nil {
17463				var ID string
17464				err = json.Unmarshal(*v, &ID)
17465				if err != nil {
17466					return err
17467				}
17468				scsi.ID = &ID
17469			}
17470		case "name":
17471			if v != nil {
17472				var name string
17473				err = json.Unmarshal(*v, &name)
17474				if err != nil {
17475					return err
17476				}
17477				scsi.Name = &name
17478			}
17479		case "kind":
17480			if v != nil {
17481				var kind string
17482				err = json.Unmarshal(*v, &kind)
17483				if err != nil {
17484					return err
17485				}
17486				scsi.Kind = &kind
17487			}
17488		case "type":
17489			if v != nil {
17490				var typeVar string
17491				err = json.Unmarshal(*v, &typeVar)
17492				if err != nil {
17493					return err
17494				}
17495				scsi.Type = &typeVar
17496			}
17497		}
17498	}
17499
17500	return nil
17501}
17502
17503// SiteConfigurationSnapshotInfoCollection collection of metadata for the app configuration snapshots that
17504// can be restored.
17505type SiteConfigurationSnapshotInfoCollection struct {
17506	autorest.Response `json:"-"`
17507	// Value - Collection of resources.
17508	Value *[]SiteConfigurationSnapshotInfo `json:"value,omitempty"`
17509	// NextLink - READ-ONLY; Link to next page of resources.
17510	NextLink *string `json:"nextLink,omitempty"`
17511}
17512
17513// MarshalJSON is the custom marshaler for SiteConfigurationSnapshotInfoCollection.
17514func (scsic SiteConfigurationSnapshotInfoCollection) MarshalJSON() ([]byte, error) {
17515	objectMap := make(map[string]interface{})
17516	if scsic.Value != nil {
17517		objectMap["value"] = scsic.Value
17518	}
17519	return json.Marshal(objectMap)
17520}
17521
17522// SiteConfigurationSnapshotInfoCollectionIterator provides access to a complete listing of
17523// SiteConfigurationSnapshotInfo values.
17524type SiteConfigurationSnapshotInfoCollectionIterator struct {
17525	i    int
17526	page SiteConfigurationSnapshotInfoCollectionPage
17527}
17528
17529// NextWithContext advances to the next value.  If there was an error making
17530// the request the iterator does not advance and the error is returned.
17531func (iter *SiteConfigurationSnapshotInfoCollectionIterator) NextWithContext(ctx context.Context) (err error) {
17532	if tracing.IsEnabled() {
17533		ctx = tracing.StartSpan(ctx, fqdn+"/SiteConfigurationSnapshotInfoCollectionIterator.NextWithContext")
17534		defer func() {
17535			sc := -1
17536			if iter.Response().Response.Response != nil {
17537				sc = iter.Response().Response.Response.StatusCode
17538			}
17539			tracing.EndSpan(ctx, sc, err)
17540		}()
17541	}
17542	iter.i++
17543	if iter.i < len(iter.page.Values()) {
17544		return nil
17545	}
17546	err = iter.page.NextWithContext(ctx)
17547	if err != nil {
17548		iter.i--
17549		return err
17550	}
17551	iter.i = 0
17552	return nil
17553}
17554
17555// Next advances to the next value.  If there was an error making
17556// the request the iterator does not advance and the error is returned.
17557// Deprecated: Use NextWithContext() instead.
17558func (iter *SiteConfigurationSnapshotInfoCollectionIterator) Next() error {
17559	return iter.NextWithContext(context.Background())
17560}
17561
17562// NotDone returns true if the enumeration should be started or is not yet complete.
17563func (iter SiteConfigurationSnapshotInfoCollectionIterator) NotDone() bool {
17564	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17565}
17566
17567// Response returns the raw server response from the last page request.
17568func (iter SiteConfigurationSnapshotInfoCollectionIterator) Response() SiteConfigurationSnapshotInfoCollection {
17569	return iter.page.Response()
17570}
17571
17572// Value returns the current value or a zero-initialized value if the
17573// iterator has advanced beyond the end of the collection.
17574func (iter SiteConfigurationSnapshotInfoCollectionIterator) Value() SiteConfigurationSnapshotInfo {
17575	if !iter.page.NotDone() {
17576		return SiteConfigurationSnapshotInfo{}
17577	}
17578	return iter.page.Values()[iter.i]
17579}
17580
17581// Creates a new instance of the SiteConfigurationSnapshotInfoCollectionIterator type.
17582func NewSiteConfigurationSnapshotInfoCollectionIterator(page SiteConfigurationSnapshotInfoCollectionPage) SiteConfigurationSnapshotInfoCollectionIterator {
17583	return SiteConfigurationSnapshotInfoCollectionIterator{page: page}
17584}
17585
17586// IsEmpty returns true if the ListResult contains no values.
17587func (scsic SiteConfigurationSnapshotInfoCollection) IsEmpty() bool {
17588	return scsic.Value == nil || len(*scsic.Value) == 0
17589}
17590
17591// hasNextLink returns true if the NextLink is not empty.
17592func (scsic SiteConfigurationSnapshotInfoCollection) hasNextLink() bool {
17593	return scsic.NextLink != nil && len(*scsic.NextLink) != 0
17594}
17595
17596// siteConfigurationSnapshotInfoCollectionPreparer prepares a request to retrieve the next set of results.
17597// It returns nil if no more results exist.
17598func (scsic SiteConfigurationSnapshotInfoCollection) siteConfigurationSnapshotInfoCollectionPreparer(ctx context.Context) (*http.Request, error) {
17599	if !scsic.hasNextLink() {
17600		return nil, nil
17601	}
17602	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17603		autorest.AsJSON(),
17604		autorest.AsGet(),
17605		autorest.WithBaseURL(to.String(scsic.NextLink)))
17606}
17607
17608// SiteConfigurationSnapshotInfoCollectionPage contains a page of SiteConfigurationSnapshotInfo values.
17609type SiteConfigurationSnapshotInfoCollectionPage struct {
17610	fn    func(context.Context, SiteConfigurationSnapshotInfoCollection) (SiteConfigurationSnapshotInfoCollection, error)
17611	scsic SiteConfigurationSnapshotInfoCollection
17612}
17613
17614// NextWithContext advances to the next page of values.  If there was an error making
17615// the request the page does not advance and the error is returned.
17616func (page *SiteConfigurationSnapshotInfoCollectionPage) NextWithContext(ctx context.Context) (err error) {
17617	if tracing.IsEnabled() {
17618		ctx = tracing.StartSpan(ctx, fqdn+"/SiteConfigurationSnapshotInfoCollectionPage.NextWithContext")
17619		defer func() {
17620			sc := -1
17621			if page.Response().Response.Response != nil {
17622				sc = page.Response().Response.Response.StatusCode
17623			}
17624			tracing.EndSpan(ctx, sc, err)
17625		}()
17626	}
17627	for {
17628		next, err := page.fn(ctx, page.scsic)
17629		if err != nil {
17630			return err
17631		}
17632		page.scsic = next
17633		if !next.hasNextLink() || !next.IsEmpty() {
17634			break
17635		}
17636	}
17637	return nil
17638}
17639
17640// Next advances to the next page of values.  If there was an error making
17641// the request the page does not advance and the error is returned.
17642// Deprecated: Use NextWithContext() instead.
17643func (page *SiteConfigurationSnapshotInfoCollectionPage) Next() error {
17644	return page.NextWithContext(context.Background())
17645}
17646
17647// NotDone returns true if the page enumeration should be started or is not yet complete.
17648func (page SiteConfigurationSnapshotInfoCollectionPage) NotDone() bool {
17649	return !page.scsic.IsEmpty()
17650}
17651
17652// Response returns the raw server response from the last page request.
17653func (page SiteConfigurationSnapshotInfoCollectionPage) Response() SiteConfigurationSnapshotInfoCollection {
17654	return page.scsic
17655}
17656
17657// Values returns the slice of values for the current page or nil if there are no values.
17658func (page SiteConfigurationSnapshotInfoCollectionPage) Values() []SiteConfigurationSnapshotInfo {
17659	if page.scsic.IsEmpty() {
17660		return nil
17661	}
17662	return *page.scsic.Value
17663}
17664
17665// Creates a new instance of the SiteConfigurationSnapshotInfoCollectionPage type.
17666func NewSiteConfigurationSnapshotInfoCollectionPage(cur SiteConfigurationSnapshotInfoCollection, getNextPage func(context.Context, SiteConfigurationSnapshotInfoCollection) (SiteConfigurationSnapshotInfoCollection, error)) SiteConfigurationSnapshotInfoCollectionPage {
17667	return SiteConfigurationSnapshotInfoCollectionPage{
17668		fn:    getNextPage,
17669		scsic: cur,
17670	}
17671}
17672
17673// SiteConfigurationSnapshotInfoProperties siteConfigurationSnapshotInfo resource specific properties
17674type SiteConfigurationSnapshotInfoProperties struct {
17675	// Time - READ-ONLY; The time the snapshot was taken.
17676	Time *date.Time `json:"time,omitempty"`
17677	// ID - READ-ONLY; The id of the snapshot
17678	ID *int32 `json:"id,omitempty"`
17679}
17680
17681// MarshalJSON is the custom marshaler for SiteConfigurationSnapshotInfoProperties.
17682func (scsi SiteConfigurationSnapshotInfoProperties) MarshalJSON() ([]byte, error) {
17683	objectMap := make(map[string]interface{})
17684	return json.Marshal(objectMap)
17685}
17686
17687// SiteExtensionInfo site Extension Information.
17688type SiteExtensionInfo struct {
17689	autorest.Response `json:"-"`
17690	// SiteExtensionInfoProperties - SiteExtensionInfo resource specific properties
17691	*SiteExtensionInfoProperties `json:"properties,omitempty"`
17692	// ID - READ-ONLY; Resource Id.
17693	ID *string `json:"id,omitempty"`
17694	// Name - READ-ONLY; Resource Name.
17695	Name *string `json:"name,omitempty"`
17696	// Kind - Kind of resource.
17697	Kind *string `json:"kind,omitempty"`
17698	// Type - READ-ONLY; Resource type.
17699	Type *string `json:"type,omitempty"`
17700}
17701
17702// MarshalJSON is the custom marshaler for SiteExtensionInfo.
17703func (sei SiteExtensionInfo) MarshalJSON() ([]byte, error) {
17704	objectMap := make(map[string]interface{})
17705	if sei.SiteExtensionInfoProperties != nil {
17706		objectMap["properties"] = sei.SiteExtensionInfoProperties
17707	}
17708	if sei.Kind != nil {
17709		objectMap["kind"] = sei.Kind
17710	}
17711	return json.Marshal(objectMap)
17712}
17713
17714// UnmarshalJSON is the custom unmarshaler for SiteExtensionInfo struct.
17715func (sei *SiteExtensionInfo) UnmarshalJSON(body []byte) error {
17716	var m map[string]*json.RawMessage
17717	err := json.Unmarshal(body, &m)
17718	if err != nil {
17719		return err
17720	}
17721	for k, v := range m {
17722		switch k {
17723		case "properties":
17724			if v != nil {
17725				var siteExtensionInfoProperties SiteExtensionInfoProperties
17726				err = json.Unmarshal(*v, &siteExtensionInfoProperties)
17727				if err != nil {
17728					return err
17729				}
17730				sei.SiteExtensionInfoProperties = &siteExtensionInfoProperties
17731			}
17732		case "id":
17733			if v != nil {
17734				var ID string
17735				err = json.Unmarshal(*v, &ID)
17736				if err != nil {
17737					return err
17738				}
17739				sei.ID = &ID
17740			}
17741		case "name":
17742			if v != nil {
17743				var name string
17744				err = json.Unmarshal(*v, &name)
17745				if err != nil {
17746					return err
17747				}
17748				sei.Name = &name
17749			}
17750		case "kind":
17751			if v != nil {
17752				var kind string
17753				err = json.Unmarshal(*v, &kind)
17754				if err != nil {
17755					return err
17756				}
17757				sei.Kind = &kind
17758			}
17759		case "type":
17760			if v != nil {
17761				var typeVar string
17762				err = json.Unmarshal(*v, &typeVar)
17763				if err != nil {
17764					return err
17765				}
17766				sei.Type = &typeVar
17767			}
17768		}
17769	}
17770
17771	return nil
17772}
17773
17774// SiteExtensionInfoCollection collection of Kudu site extension information elements.
17775type SiteExtensionInfoCollection struct {
17776	autorest.Response `json:"-"`
17777	// Value - Collection of resources.
17778	Value *[]SiteExtensionInfo `json:"value,omitempty"`
17779	// NextLink - READ-ONLY; Link to next page of resources.
17780	NextLink *string `json:"nextLink,omitempty"`
17781}
17782
17783// MarshalJSON is the custom marshaler for SiteExtensionInfoCollection.
17784func (seic SiteExtensionInfoCollection) MarshalJSON() ([]byte, error) {
17785	objectMap := make(map[string]interface{})
17786	if seic.Value != nil {
17787		objectMap["value"] = seic.Value
17788	}
17789	return json.Marshal(objectMap)
17790}
17791
17792// SiteExtensionInfoCollectionIterator provides access to a complete listing of SiteExtensionInfo values.
17793type SiteExtensionInfoCollectionIterator struct {
17794	i    int
17795	page SiteExtensionInfoCollectionPage
17796}
17797
17798// NextWithContext advances to the next value.  If there was an error making
17799// the request the iterator does not advance and the error is returned.
17800func (iter *SiteExtensionInfoCollectionIterator) NextWithContext(ctx context.Context) (err error) {
17801	if tracing.IsEnabled() {
17802		ctx = tracing.StartSpan(ctx, fqdn+"/SiteExtensionInfoCollectionIterator.NextWithContext")
17803		defer func() {
17804			sc := -1
17805			if iter.Response().Response.Response != nil {
17806				sc = iter.Response().Response.Response.StatusCode
17807			}
17808			tracing.EndSpan(ctx, sc, err)
17809		}()
17810	}
17811	iter.i++
17812	if iter.i < len(iter.page.Values()) {
17813		return nil
17814	}
17815	err = iter.page.NextWithContext(ctx)
17816	if err != nil {
17817		iter.i--
17818		return err
17819	}
17820	iter.i = 0
17821	return nil
17822}
17823
17824// Next advances to the next value.  If there was an error making
17825// the request the iterator does not advance and the error is returned.
17826// Deprecated: Use NextWithContext() instead.
17827func (iter *SiteExtensionInfoCollectionIterator) Next() error {
17828	return iter.NextWithContext(context.Background())
17829}
17830
17831// NotDone returns true if the enumeration should be started or is not yet complete.
17832func (iter SiteExtensionInfoCollectionIterator) NotDone() bool {
17833	return iter.page.NotDone() && iter.i < len(iter.page.Values())
17834}
17835
17836// Response returns the raw server response from the last page request.
17837func (iter SiteExtensionInfoCollectionIterator) Response() SiteExtensionInfoCollection {
17838	return iter.page.Response()
17839}
17840
17841// Value returns the current value or a zero-initialized value if the
17842// iterator has advanced beyond the end of the collection.
17843func (iter SiteExtensionInfoCollectionIterator) Value() SiteExtensionInfo {
17844	if !iter.page.NotDone() {
17845		return SiteExtensionInfo{}
17846	}
17847	return iter.page.Values()[iter.i]
17848}
17849
17850// Creates a new instance of the SiteExtensionInfoCollectionIterator type.
17851func NewSiteExtensionInfoCollectionIterator(page SiteExtensionInfoCollectionPage) SiteExtensionInfoCollectionIterator {
17852	return SiteExtensionInfoCollectionIterator{page: page}
17853}
17854
17855// IsEmpty returns true if the ListResult contains no values.
17856func (seic SiteExtensionInfoCollection) IsEmpty() bool {
17857	return seic.Value == nil || len(*seic.Value) == 0
17858}
17859
17860// hasNextLink returns true if the NextLink is not empty.
17861func (seic SiteExtensionInfoCollection) hasNextLink() bool {
17862	return seic.NextLink != nil && len(*seic.NextLink) != 0
17863}
17864
17865// siteExtensionInfoCollectionPreparer prepares a request to retrieve the next set of results.
17866// It returns nil if no more results exist.
17867func (seic SiteExtensionInfoCollection) siteExtensionInfoCollectionPreparer(ctx context.Context) (*http.Request, error) {
17868	if !seic.hasNextLink() {
17869		return nil, nil
17870	}
17871	return autorest.Prepare((&http.Request{}).WithContext(ctx),
17872		autorest.AsJSON(),
17873		autorest.AsGet(),
17874		autorest.WithBaseURL(to.String(seic.NextLink)))
17875}
17876
17877// SiteExtensionInfoCollectionPage contains a page of SiteExtensionInfo values.
17878type SiteExtensionInfoCollectionPage struct {
17879	fn   func(context.Context, SiteExtensionInfoCollection) (SiteExtensionInfoCollection, error)
17880	seic SiteExtensionInfoCollection
17881}
17882
17883// NextWithContext advances to the next page of values.  If there was an error making
17884// the request the page does not advance and the error is returned.
17885func (page *SiteExtensionInfoCollectionPage) NextWithContext(ctx context.Context) (err error) {
17886	if tracing.IsEnabled() {
17887		ctx = tracing.StartSpan(ctx, fqdn+"/SiteExtensionInfoCollectionPage.NextWithContext")
17888		defer func() {
17889			sc := -1
17890			if page.Response().Response.Response != nil {
17891				sc = page.Response().Response.Response.StatusCode
17892			}
17893			tracing.EndSpan(ctx, sc, err)
17894		}()
17895	}
17896	for {
17897		next, err := page.fn(ctx, page.seic)
17898		if err != nil {
17899			return err
17900		}
17901		page.seic = next
17902		if !next.hasNextLink() || !next.IsEmpty() {
17903			break
17904		}
17905	}
17906	return nil
17907}
17908
17909// Next advances to the next page of values.  If there was an error making
17910// the request the page does not advance and the error is returned.
17911// Deprecated: Use NextWithContext() instead.
17912func (page *SiteExtensionInfoCollectionPage) Next() error {
17913	return page.NextWithContext(context.Background())
17914}
17915
17916// NotDone returns true if the page enumeration should be started or is not yet complete.
17917func (page SiteExtensionInfoCollectionPage) NotDone() bool {
17918	return !page.seic.IsEmpty()
17919}
17920
17921// Response returns the raw server response from the last page request.
17922func (page SiteExtensionInfoCollectionPage) Response() SiteExtensionInfoCollection {
17923	return page.seic
17924}
17925
17926// Values returns the slice of values for the current page or nil if there are no values.
17927func (page SiteExtensionInfoCollectionPage) Values() []SiteExtensionInfo {
17928	if page.seic.IsEmpty() {
17929		return nil
17930	}
17931	return *page.seic.Value
17932}
17933
17934// Creates a new instance of the SiteExtensionInfoCollectionPage type.
17935func NewSiteExtensionInfoCollectionPage(cur SiteExtensionInfoCollection, getNextPage func(context.Context, SiteExtensionInfoCollection) (SiteExtensionInfoCollection, error)) SiteExtensionInfoCollectionPage {
17936	return SiteExtensionInfoCollectionPage{
17937		fn:   getNextPage,
17938		seic: cur,
17939	}
17940}
17941
17942// SiteExtensionInfoProperties siteExtensionInfo resource specific properties
17943type SiteExtensionInfoProperties struct {
17944	// ID - Site extension ID.
17945	ID *string `json:"id,omitempty"`
17946	// Title - Site extension title.
17947	Title *string `json:"title,omitempty"`
17948	// Type - Site extension type. Possible values include: 'Gallery', 'WebRoot'
17949	Type SiteExtensionType `json:"type,omitempty"`
17950	// Summary - Summary description.
17951	Summary *string `json:"summary,omitempty"`
17952	// Description - Detailed description.
17953	Description *string `json:"description,omitempty"`
17954	// Version - Version information.
17955	Version *string `json:"version,omitempty"`
17956	// ExtensionURL - Extension URL.
17957	ExtensionURL *string `json:"extensionUrl,omitempty"`
17958	// ProjectURL - Project URL.
17959	ProjectURL *string `json:"projectUrl,omitempty"`
17960	// IconURL - Icon URL.
17961	IconURL *string `json:"iconUrl,omitempty"`
17962	// LicenseURL - License URL.
17963	LicenseURL *string `json:"licenseUrl,omitempty"`
17964	// FeedURL - Feed URL.
17965	FeedURL *string `json:"feedUrl,omitempty"`
17966	// Authors - List of authors.
17967	Authors *[]string `json:"authors,omitempty"`
17968	// InstallationArgs - Installer command line parameters.
17969	InstallationArgs *string `json:"installationArgs,omitempty"`
17970	// PublishedDateTime - Published timestamp.
17971	PublishedDateTime *date.Time `json:"publishedDateTime,omitempty"`
17972	// DownloadCount - Count of downloads.
17973	DownloadCount *int32 `json:"downloadCount,omitempty"`
17974	// LocalIsLatestVersion - <code>true</code> if the local version is the latest version; <code>false</code> otherwise.
17975	LocalIsLatestVersion *bool `json:"localIsLatestVersion,omitempty"`
17976	// LocalPath - Local path.
17977	LocalPath *string `json:"localPath,omitempty"`
17978	// InstalledDateTime - Installed timestamp.
17979	InstalledDateTime *date.Time `json:"installedDateTime,omitempty"`
17980	// ProvisioningState - Provisioning state.
17981	ProvisioningState *string `json:"provisioningState,omitempty"`
17982	// Comment - Site Extension comment.
17983	Comment *string `json:"comment,omitempty"`
17984}
17985
17986// SiteInstance instance of an app.
17987type SiteInstance struct {
17988	// SiteInstanceProperties - SiteInstance resource specific properties
17989	*SiteInstanceProperties `json:"properties,omitempty"`
17990	// ID - READ-ONLY; Resource Id.
17991	ID *string `json:"id,omitempty"`
17992	// Name - READ-ONLY; Resource Name.
17993	Name *string `json:"name,omitempty"`
17994	// Kind - Kind of resource.
17995	Kind *string `json:"kind,omitempty"`
17996	// Type - READ-ONLY; Resource type.
17997	Type *string `json:"type,omitempty"`
17998}
17999
18000// MarshalJSON is the custom marshaler for SiteInstance.
18001func (si SiteInstance) MarshalJSON() ([]byte, error) {
18002	objectMap := make(map[string]interface{})
18003	if si.SiteInstanceProperties != nil {
18004		objectMap["properties"] = si.SiteInstanceProperties
18005	}
18006	if si.Kind != nil {
18007		objectMap["kind"] = si.Kind
18008	}
18009	return json.Marshal(objectMap)
18010}
18011
18012// UnmarshalJSON is the custom unmarshaler for SiteInstance struct.
18013func (si *SiteInstance) UnmarshalJSON(body []byte) error {
18014	var m map[string]*json.RawMessage
18015	err := json.Unmarshal(body, &m)
18016	if err != nil {
18017		return err
18018	}
18019	for k, v := range m {
18020		switch k {
18021		case "properties":
18022			if v != nil {
18023				var siteInstanceProperties SiteInstanceProperties
18024				err = json.Unmarshal(*v, &siteInstanceProperties)
18025				if err != nil {
18026					return err
18027				}
18028				si.SiteInstanceProperties = &siteInstanceProperties
18029			}
18030		case "id":
18031			if v != nil {
18032				var ID string
18033				err = json.Unmarshal(*v, &ID)
18034				if err != nil {
18035					return err
18036				}
18037				si.ID = &ID
18038			}
18039		case "name":
18040			if v != nil {
18041				var name string
18042				err = json.Unmarshal(*v, &name)
18043				if err != nil {
18044					return err
18045				}
18046				si.Name = &name
18047			}
18048		case "kind":
18049			if v != nil {
18050				var kind string
18051				err = json.Unmarshal(*v, &kind)
18052				if err != nil {
18053					return err
18054				}
18055				si.Kind = &kind
18056			}
18057		case "type":
18058			if v != nil {
18059				var typeVar string
18060				err = json.Unmarshal(*v, &typeVar)
18061				if err != nil {
18062					return err
18063				}
18064				si.Type = &typeVar
18065			}
18066		}
18067	}
18068
18069	return nil
18070}
18071
18072// SiteInstanceProperties siteInstance resource specific properties
18073type SiteInstanceProperties struct {
18074	// Name - READ-ONLY; Name of instance.
18075	Name *string `json:"name,omitempty"`
18076}
18077
18078// MarshalJSON is the custom marshaler for SiteInstanceProperties.
18079func (si SiteInstanceProperties) MarshalJSON() ([]byte, error) {
18080	objectMap := make(map[string]interface{})
18081	return json.Marshal(objectMap)
18082}
18083
18084// SiteLimits metric limits set on an app.
18085type SiteLimits struct {
18086	// MaxPercentageCPU - Maximum allowed CPU usage percentage.
18087	MaxPercentageCPU *float64 `json:"maxPercentageCpu,omitempty"`
18088	// MaxMemoryInMb - Maximum allowed memory usage in MB.
18089	MaxMemoryInMb *int64 `json:"maxMemoryInMb,omitempty"`
18090	// MaxDiskSizeInMb - Maximum allowed disk size usage in MB.
18091	MaxDiskSizeInMb *int64 `json:"maxDiskSizeInMb,omitempty"`
18092}
18093
18094// SiteLogsConfig configuration of App Service site logs.
18095type SiteLogsConfig struct {
18096	autorest.Response `json:"-"`
18097	// SiteLogsConfigProperties - SiteLogsConfig resource specific properties
18098	*SiteLogsConfigProperties `json:"properties,omitempty"`
18099	// ID - READ-ONLY; Resource Id.
18100	ID *string `json:"id,omitempty"`
18101	// Name - READ-ONLY; Resource Name.
18102	Name *string `json:"name,omitempty"`
18103	// Kind - Kind of resource.
18104	Kind *string `json:"kind,omitempty"`
18105	// Type - READ-ONLY; Resource type.
18106	Type *string `json:"type,omitempty"`
18107}
18108
18109// MarshalJSON is the custom marshaler for SiteLogsConfig.
18110func (slc SiteLogsConfig) MarshalJSON() ([]byte, error) {
18111	objectMap := make(map[string]interface{})
18112	if slc.SiteLogsConfigProperties != nil {
18113		objectMap["properties"] = slc.SiteLogsConfigProperties
18114	}
18115	if slc.Kind != nil {
18116		objectMap["kind"] = slc.Kind
18117	}
18118	return json.Marshal(objectMap)
18119}
18120
18121// UnmarshalJSON is the custom unmarshaler for SiteLogsConfig struct.
18122func (slc *SiteLogsConfig) UnmarshalJSON(body []byte) error {
18123	var m map[string]*json.RawMessage
18124	err := json.Unmarshal(body, &m)
18125	if err != nil {
18126		return err
18127	}
18128	for k, v := range m {
18129		switch k {
18130		case "properties":
18131			if v != nil {
18132				var siteLogsConfigProperties SiteLogsConfigProperties
18133				err = json.Unmarshal(*v, &siteLogsConfigProperties)
18134				if err != nil {
18135					return err
18136				}
18137				slc.SiteLogsConfigProperties = &siteLogsConfigProperties
18138			}
18139		case "id":
18140			if v != nil {
18141				var ID string
18142				err = json.Unmarshal(*v, &ID)
18143				if err != nil {
18144					return err
18145				}
18146				slc.ID = &ID
18147			}
18148		case "name":
18149			if v != nil {
18150				var name string
18151				err = json.Unmarshal(*v, &name)
18152				if err != nil {
18153					return err
18154				}
18155				slc.Name = &name
18156			}
18157		case "kind":
18158			if v != nil {
18159				var kind string
18160				err = json.Unmarshal(*v, &kind)
18161				if err != nil {
18162					return err
18163				}
18164				slc.Kind = &kind
18165			}
18166		case "type":
18167			if v != nil {
18168				var typeVar string
18169				err = json.Unmarshal(*v, &typeVar)
18170				if err != nil {
18171					return err
18172				}
18173				slc.Type = &typeVar
18174			}
18175		}
18176	}
18177
18178	return nil
18179}
18180
18181// SiteLogsConfigProperties siteLogsConfig resource specific properties
18182type SiteLogsConfigProperties struct {
18183	// ApplicationLogs - Application logs configuration.
18184	ApplicationLogs *ApplicationLogsConfig `json:"applicationLogs,omitempty"`
18185	// HTTPLogs - HTTP logs configuration.
18186	HTTPLogs *HTTPLogsConfig `json:"httpLogs,omitempty"`
18187	// FailedRequestsTracing - Failed requests tracing configuration.
18188	FailedRequestsTracing *EnabledConfig `json:"failedRequestsTracing,omitempty"`
18189	// DetailedErrorMessages - Detailed error messages configuration.
18190	DetailedErrorMessages *EnabledConfig `json:"detailedErrorMessages,omitempty"`
18191}
18192
18193// SiteMachineKey machineKey of an app.
18194type SiteMachineKey struct {
18195	// Validation - MachineKey validation.
18196	Validation *string `json:"validation,omitempty"`
18197	// ValidationKey - Validation key.
18198	ValidationKey *string `json:"validationKey,omitempty"`
18199	// Decryption - Algorithm used for decryption.
18200	Decryption *string `json:"decryption,omitempty"`
18201	// DecryptionKey - Decryption key.
18202	DecryptionKey *string `json:"decryptionKey,omitempty"`
18203}
18204
18205// SitePatchResource ARM resource for a site.
18206type SitePatchResource struct {
18207	// SitePatchResourceProperties - SitePatchResource resource specific properties
18208	*SitePatchResourceProperties `json:"properties,omitempty"`
18209	// ID - READ-ONLY; Resource Id.
18210	ID *string `json:"id,omitempty"`
18211	// Name - READ-ONLY; Resource Name.
18212	Name *string `json:"name,omitempty"`
18213	// Kind - Kind of resource.
18214	Kind *string `json:"kind,omitempty"`
18215	// Type - READ-ONLY; Resource type.
18216	Type *string `json:"type,omitempty"`
18217}
18218
18219// MarshalJSON is the custom marshaler for SitePatchResource.
18220func (spr SitePatchResource) MarshalJSON() ([]byte, error) {
18221	objectMap := make(map[string]interface{})
18222	if spr.SitePatchResourceProperties != nil {
18223		objectMap["properties"] = spr.SitePatchResourceProperties
18224	}
18225	if spr.Kind != nil {
18226		objectMap["kind"] = spr.Kind
18227	}
18228	return json.Marshal(objectMap)
18229}
18230
18231// UnmarshalJSON is the custom unmarshaler for SitePatchResource struct.
18232func (spr *SitePatchResource) UnmarshalJSON(body []byte) error {
18233	var m map[string]*json.RawMessage
18234	err := json.Unmarshal(body, &m)
18235	if err != nil {
18236		return err
18237	}
18238	for k, v := range m {
18239		switch k {
18240		case "properties":
18241			if v != nil {
18242				var sitePatchResourceProperties SitePatchResourceProperties
18243				err = json.Unmarshal(*v, &sitePatchResourceProperties)
18244				if err != nil {
18245					return err
18246				}
18247				spr.SitePatchResourceProperties = &sitePatchResourceProperties
18248			}
18249		case "id":
18250			if v != nil {
18251				var ID string
18252				err = json.Unmarshal(*v, &ID)
18253				if err != nil {
18254					return err
18255				}
18256				spr.ID = &ID
18257			}
18258		case "name":
18259			if v != nil {
18260				var name string
18261				err = json.Unmarshal(*v, &name)
18262				if err != nil {
18263					return err
18264				}
18265				spr.Name = &name
18266			}
18267		case "kind":
18268			if v != nil {
18269				var kind string
18270				err = json.Unmarshal(*v, &kind)
18271				if err != nil {
18272					return err
18273				}
18274				spr.Kind = &kind
18275			}
18276		case "type":
18277			if v != nil {
18278				var typeVar string
18279				err = json.Unmarshal(*v, &typeVar)
18280				if err != nil {
18281					return err
18282				}
18283				spr.Type = &typeVar
18284			}
18285		}
18286	}
18287
18288	return nil
18289}
18290
18291// SitePatchResourceProperties sitePatchResource resource specific properties
18292type SitePatchResourceProperties struct {
18293	// State - READ-ONLY; Current state of the app.
18294	State *string `json:"state,omitempty"`
18295	// HostNames - READ-ONLY; Hostnames associated with the app.
18296	HostNames *[]string `json:"hostNames,omitempty"`
18297	// RepositorySiteName - READ-ONLY; Name of the repository site.
18298	RepositorySiteName *string `json:"repositorySiteName,omitempty"`
18299	// UsageState - READ-ONLY; State indicating whether the app has exceeded its quota usage. Read-only. Possible values include: 'UsageStateNormal', 'UsageStateExceeded'
18300	UsageState UsageState `json:"usageState,omitempty"`
18301	// Enabled - <code>true</code> if the app is enabled; otherwise, <code>false</code>. Setting this value to false disables the app (takes the app offline).
18302	Enabled *bool `json:"enabled,omitempty"`
18303	// EnabledHostNames - READ-ONLY; Enabled hostnames for the app.Hostnames need to be assigned (see HostNames) AND enabled. Otherwise,
18304	// the app is not served on those hostnames.
18305	EnabledHostNames *[]string `json:"enabledHostNames,omitempty"`
18306	// AvailabilityState - READ-ONLY; Management information availability state for the app. Possible values include: 'Normal', 'Limited', 'DisasterRecoveryMode'
18307	AvailabilityState SiteAvailabilityState `json:"availabilityState,omitempty"`
18308	// HostNameSslStates - Hostname SSL states are used to manage the SSL bindings for app's hostnames.
18309	HostNameSslStates *[]HostNameSslState `json:"hostNameSslStates,omitempty"`
18310	// ServerFarmID - Resource ID of the associated App Service plan, formatted as: "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}".
18311	ServerFarmID *string `json:"serverFarmId,omitempty"`
18312	// Reserved - <code>true</code> if reserved; otherwise, <code>false</code>.
18313	Reserved *bool `json:"reserved,omitempty"`
18314	// LastModifiedTimeUtc - READ-ONLY; Last time the app was modified, in UTC. Read-only.
18315	LastModifiedTimeUtc *date.Time `json:"lastModifiedTimeUtc,omitempty"`
18316	// SiteConfig - Configuration of the app.
18317	SiteConfig *SiteConfig `json:"siteConfig,omitempty"`
18318	// TrafficManagerHostNames - READ-ONLY; Azure Traffic Manager hostnames associated with the app. Read-only.
18319	TrafficManagerHostNames *[]string `json:"trafficManagerHostNames,omitempty"`
18320	// ScmSiteAlsoStopped - <code>true</code> to stop SCM (KUDU) site when the app is stopped; otherwise, <code>false</code>. The default is <code>false</code>.
18321	ScmSiteAlsoStopped *bool `json:"scmSiteAlsoStopped,omitempty"`
18322	// TargetSwapSlot - READ-ONLY; Specifies which deployment slot this app will swap into. Read-only.
18323	TargetSwapSlot *string `json:"targetSwapSlot,omitempty"`
18324	// HostingEnvironmentProfile - App Service Environment to use for the app.
18325	HostingEnvironmentProfile *HostingEnvironmentProfile `json:"hostingEnvironmentProfile,omitempty"`
18326	// ClientAffinityEnabled - <code>true</code> to enable client affinity; <code>false</code> to stop sending session affinity cookies, which route client requests in the same session to the same instance. Default is <code>true</code>.
18327	ClientAffinityEnabled *bool `json:"clientAffinityEnabled,omitempty"`
18328	// ClientCertEnabled - <code>true</code> to enable client certificate authentication (TLS mutual authentication); otherwise, <code>false</code>. Default is <code>false</code>.
18329	ClientCertEnabled *bool `json:"clientCertEnabled,omitempty"`
18330	// HostNamesDisabled - <code>true</code> to disable the public hostnames of the app; otherwise, <code>false</code>.
18331	//  If <code>true</code>, the app is only accessible via API management process.
18332	HostNamesDisabled *bool `json:"hostNamesDisabled,omitempty"`
18333	// OutboundIPAddresses - READ-ONLY; List of IP addresses that the app uses for outbound connections (e.g. database access). Includes VIPs from tenants that site can be hosted with current settings. Read-only.
18334	OutboundIPAddresses *string `json:"outboundIpAddresses,omitempty"`
18335	// PossibleOutboundIPAddresses - READ-ONLY; List of IP addresses that the app uses for outbound connections (e.g. database access). Includes VIPs from all tenants. Read-only.
18336	PossibleOutboundIPAddresses *string `json:"possibleOutboundIpAddresses,omitempty"`
18337	// ContainerSize - Size of the function container.
18338	ContainerSize *int32 `json:"containerSize,omitempty"`
18339	// DailyMemoryTimeQuota - Maximum allowed daily memory-time quota (applicable on dynamic apps only).
18340	DailyMemoryTimeQuota *int32 `json:"dailyMemoryTimeQuota,omitempty"`
18341	// SuspendedTill - READ-ONLY; App suspended till in case memory-time quota is exceeded.
18342	SuspendedTill *date.Time `json:"suspendedTill,omitempty"`
18343	// MaxNumberOfWorkers - READ-ONLY; Maximum number of workers.
18344	// This only applies to Functions container.
18345	MaxNumberOfWorkers *int32 `json:"maxNumberOfWorkers,omitempty"`
18346	// CloningInfo - If specified during app creation, the app is cloned from a source app.
18347	CloningInfo *CloningInfo `json:"cloningInfo,omitempty"`
18348	// SnapshotInfo - If specified during app creation, the app is created from a previous snapshot.
18349	SnapshotInfo *SnapshotRecoveryRequest `json:"snapshotInfo,omitempty"`
18350	// ResourceGroup - READ-ONLY; Name of the resource group the app belongs to. Read-only.
18351	ResourceGroup *string `json:"resourceGroup,omitempty"`
18352	// IsDefaultContainer - READ-ONLY; <code>true</code> if the app is a default container; otherwise, <code>false</code>.
18353	IsDefaultContainer *bool `json:"isDefaultContainer,omitempty"`
18354	// DefaultHostName - READ-ONLY; Default hostname of the app. Read-only.
18355	DefaultHostName *string `json:"defaultHostName,omitempty"`
18356	// SlotSwapStatus - READ-ONLY; Status of the last deployment slot swap operation.
18357	SlotSwapStatus *SlotSwapStatus `json:"slotSwapStatus,omitempty"`
18358	// HTTPSOnly - HttpsOnly: configures a web site to accept only https requests. Issues redirect for
18359	// http requests
18360	HTTPSOnly *bool `json:"httpsOnly,omitempty"`
18361}
18362
18363// MarshalJSON is the custom marshaler for SitePatchResourceProperties.
18364func (spr SitePatchResourceProperties) MarshalJSON() ([]byte, error) {
18365	objectMap := make(map[string]interface{})
18366	if spr.Enabled != nil {
18367		objectMap["enabled"] = spr.Enabled
18368	}
18369	if spr.HostNameSslStates != nil {
18370		objectMap["hostNameSslStates"] = spr.HostNameSslStates
18371	}
18372	if spr.ServerFarmID != nil {
18373		objectMap["serverFarmId"] = spr.ServerFarmID
18374	}
18375	if spr.Reserved != nil {
18376		objectMap["reserved"] = spr.Reserved
18377	}
18378	if spr.SiteConfig != nil {
18379		objectMap["siteConfig"] = spr.SiteConfig
18380	}
18381	if spr.ScmSiteAlsoStopped != nil {
18382		objectMap["scmSiteAlsoStopped"] = spr.ScmSiteAlsoStopped
18383	}
18384	if spr.HostingEnvironmentProfile != nil {
18385		objectMap["hostingEnvironmentProfile"] = spr.HostingEnvironmentProfile
18386	}
18387	if spr.ClientAffinityEnabled != nil {
18388		objectMap["clientAffinityEnabled"] = spr.ClientAffinityEnabled
18389	}
18390	if spr.ClientCertEnabled != nil {
18391		objectMap["clientCertEnabled"] = spr.ClientCertEnabled
18392	}
18393	if spr.HostNamesDisabled != nil {
18394		objectMap["hostNamesDisabled"] = spr.HostNamesDisabled
18395	}
18396	if spr.ContainerSize != nil {
18397		objectMap["containerSize"] = spr.ContainerSize
18398	}
18399	if spr.DailyMemoryTimeQuota != nil {
18400		objectMap["dailyMemoryTimeQuota"] = spr.DailyMemoryTimeQuota
18401	}
18402	if spr.CloningInfo != nil {
18403		objectMap["cloningInfo"] = spr.CloningInfo
18404	}
18405	if spr.SnapshotInfo != nil {
18406		objectMap["snapshotInfo"] = spr.SnapshotInfo
18407	}
18408	if spr.HTTPSOnly != nil {
18409		objectMap["httpsOnly"] = spr.HTTPSOnly
18410	}
18411	return json.Marshal(objectMap)
18412}
18413
18414// SitePhpErrorLogFlag used for getting PHP error logging flag.
18415type SitePhpErrorLogFlag struct {
18416	autorest.Response `json:"-"`
18417	// SitePhpErrorLogFlagProperties - SitePhpErrorLogFlag resource specific properties
18418	*SitePhpErrorLogFlagProperties `json:"properties,omitempty"`
18419	// ID - READ-ONLY; Resource Id.
18420	ID *string `json:"id,omitempty"`
18421	// Name - READ-ONLY; Resource Name.
18422	Name *string `json:"name,omitempty"`
18423	// Kind - Kind of resource.
18424	Kind *string `json:"kind,omitempty"`
18425	// Type - READ-ONLY; Resource type.
18426	Type *string `json:"type,omitempty"`
18427}
18428
18429// MarshalJSON is the custom marshaler for SitePhpErrorLogFlag.
18430func (spelf SitePhpErrorLogFlag) MarshalJSON() ([]byte, error) {
18431	objectMap := make(map[string]interface{})
18432	if spelf.SitePhpErrorLogFlagProperties != nil {
18433		objectMap["properties"] = spelf.SitePhpErrorLogFlagProperties
18434	}
18435	if spelf.Kind != nil {
18436		objectMap["kind"] = spelf.Kind
18437	}
18438	return json.Marshal(objectMap)
18439}
18440
18441// UnmarshalJSON is the custom unmarshaler for SitePhpErrorLogFlag struct.
18442func (spelf *SitePhpErrorLogFlag) UnmarshalJSON(body []byte) error {
18443	var m map[string]*json.RawMessage
18444	err := json.Unmarshal(body, &m)
18445	if err != nil {
18446		return err
18447	}
18448	for k, v := range m {
18449		switch k {
18450		case "properties":
18451			if v != nil {
18452				var sitePhpErrorLogFlagProperties SitePhpErrorLogFlagProperties
18453				err = json.Unmarshal(*v, &sitePhpErrorLogFlagProperties)
18454				if err != nil {
18455					return err
18456				}
18457				spelf.SitePhpErrorLogFlagProperties = &sitePhpErrorLogFlagProperties
18458			}
18459		case "id":
18460			if v != nil {
18461				var ID string
18462				err = json.Unmarshal(*v, &ID)
18463				if err != nil {
18464					return err
18465				}
18466				spelf.ID = &ID
18467			}
18468		case "name":
18469			if v != nil {
18470				var name string
18471				err = json.Unmarshal(*v, &name)
18472				if err != nil {
18473					return err
18474				}
18475				spelf.Name = &name
18476			}
18477		case "kind":
18478			if v != nil {
18479				var kind string
18480				err = json.Unmarshal(*v, &kind)
18481				if err != nil {
18482					return err
18483				}
18484				spelf.Kind = &kind
18485			}
18486		case "type":
18487			if v != nil {
18488				var typeVar string
18489				err = json.Unmarshal(*v, &typeVar)
18490				if err != nil {
18491					return err
18492				}
18493				spelf.Type = &typeVar
18494			}
18495		}
18496	}
18497
18498	return nil
18499}
18500
18501// SitePhpErrorLogFlagProperties sitePhpErrorLogFlag resource specific properties
18502type SitePhpErrorLogFlagProperties struct {
18503	// LocalLogErrors - Local log_errors setting.
18504	LocalLogErrors *string `json:"localLogErrors,omitempty"`
18505	// MasterLogErrors - Master log_errors setting.
18506	MasterLogErrors *string `json:"masterLogErrors,omitempty"`
18507	// LocalLogErrorsMaxLength - Local log_errors_max_len setting.
18508	LocalLogErrorsMaxLength *string `json:"localLogErrorsMaxLength,omitempty"`
18509	// MasterLogErrorsMaxLength - Master log_errors_max_len setting.
18510	MasterLogErrorsMaxLength *string `json:"masterLogErrorsMaxLength,omitempty"`
18511}
18512
18513// SiteProperties site resource specific properties
18514type SiteProperties struct {
18515	// State - READ-ONLY; Current state of the app.
18516	State *string `json:"state,omitempty"`
18517	// HostNames - READ-ONLY; Hostnames associated with the app.
18518	HostNames *[]string `json:"hostNames,omitempty"`
18519	// RepositorySiteName - READ-ONLY; Name of the repository site.
18520	RepositorySiteName *string `json:"repositorySiteName,omitempty"`
18521	// UsageState - READ-ONLY; State indicating whether the app has exceeded its quota usage. Read-only. Possible values include: 'UsageStateNormal', 'UsageStateExceeded'
18522	UsageState UsageState `json:"usageState,omitempty"`
18523	// Enabled - <code>true</code> if the app is enabled; otherwise, <code>false</code>. Setting this value to false disables the app (takes the app offline).
18524	Enabled *bool `json:"enabled,omitempty"`
18525	// EnabledHostNames - READ-ONLY; Enabled hostnames for the app.Hostnames need to be assigned (see HostNames) AND enabled. Otherwise,
18526	// the app is not served on those hostnames.
18527	EnabledHostNames *[]string `json:"enabledHostNames,omitempty"`
18528	// AvailabilityState - READ-ONLY; Management information availability state for the app. Possible values include: 'Normal', 'Limited', 'DisasterRecoveryMode'
18529	AvailabilityState SiteAvailabilityState `json:"availabilityState,omitempty"`
18530	// HostNameSslStates - Hostname SSL states are used to manage the SSL bindings for app's hostnames.
18531	HostNameSslStates *[]HostNameSslState `json:"hostNameSslStates,omitempty"`
18532	// ServerFarmID - Resource ID of the associated App Service plan, formatted as: "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}".
18533	ServerFarmID *string `json:"serverFarmId,omitempty"`
18534	// Reserved - <code>true</code> if reserved; otherwise, <code>false</code>.
18535	Reserved *bool `json:"reserved,omitempty"`
18536	// LastModifiedTimeUtc - READ-ONLY; Last time the app was modified, in UTC. Read-only.
18537	LastModifiedTimeUtc *date.Time `json:"lastModifiedTimeUtc,omitempty"`
18538	// SiteConfig - Configuration of the app.
18539	SiteConfig *SiteConfig `json:"siteConfig,omitempty"`
18540	// TrafficManagerHostNames - READ-ONLY; Azure Traffic Manager hostnames associated with the app. Read-only.
18541	TrafficManagerHostNames *[]string `json:"trafficManagerHostNames,omitempty"`
18542	// ScmSiteAlsoStopped - <code>true</code> to stop SCM (KUDU) site when the app is stopped; otherwise, <code>false</code>. The default is <code>false</code>.
18543	ScmSiteAlsoStopped *bool `json:"scmSiteAlsoStopped,omitempty"`
18544	// TargetSwapSlot - READ-ONLY; Specifies which deployment slot this app will swap into. Read-only.
18545	TargetSwapSlot *string `json:"targetSwapSlot,omitempty"`
18546	// HostingEnvironmentProfile - App Service Environment to use for the app.
18547	HostingEnvironmentProfile *HostingEnvironmentProfile `json:"hostingEnvironmentProfile,omitempty"`
18548	// ClientAffinityEnabled - <code>true</code> to enable client affinity; <code>false</code> to stop sending session affinity cookies, which route client requests in the same session to the same instance. Default is <code>true</code>.
18549	ClientAffinityEnabled *bool `json:"clientAffinityEnabled,omitempty"`
18550	// ClientCertEnabled - <code>true</code> to enable client certificate authentication (TLS mutual authentication); otherwise, <code>false</code>. Default is <code>false</code>.
18551	ClientCertEnabled *bool `json:"clientCertEnabled,omitempty"`
18552	// HostNamesDisabled - <code>true</code> to disable the public hostnames of the app; otherwise, <code>false</code>.
18553	//  If <code>true</code>, the app is only accessible via API management process.
18554	HostNamesDisabled *bool `json:"hostNamesDisabled,omitempty"`
18555	// OutboundIPAddresses - READ-ONLY; List of IP addresses that the app uses for outbound connections (e.g. database access). Includes VIPs from tenants that site can be hosted with current settings. Read-only.
18556	OutboundIPAddresses *string `json:"outboundIpAddresses,omitempty"`
18557	// PossibleOutboundIPAddresses - READ-ONLY; List of IP addresses that the app uses for outbound connections (e.g. database access). Includes VIPs from all tenants. Read-only.
18558	PossibleOutboundIPAddresses *string `json:"possibleOutboundIpAddresses,omitempty"`
18559	// ContainerSize - Size of the function container.
18560	ContainerSize *int32 `json:"containerSize,omitempty"`
18561	// DailyMemoryTimeQuota - Maximum allowed daily memory-time quota (applicable on dynamic apps only).
18562	DailyMemoryTimeQuota *int32 `json:"dailyMemoryTimeQuota,omitempty"`
18563	// SuspendedTill - READ-ONLY; App suspended till in case memory-time quota is exceeded.
18564	SuspendedTill *date.Time `json:"suspendedTill,omitempty"`
18565	// MaxNumberOfWorkers - READ-ONLY; Maximum number of workers.
18566	// This only applies to Functions container.
18567	MaxNumberOfWorkers *int32 `json:"maxNumberOfWorkers,omitempty"`
18568	// CloningInfo - If specified during app creation, the app is cloned from a source app.
18569	CloningInfo *CloningInfo `json:"cloningInfo,omitempty"`
18570	// SnapshotInfo - If specified during app creation, the app is created from a previous snapshot.
18571	SnapshotInfo *SnapshotRecoveryRequest `json:"snapshotInfo,omitempty"`
18572	// ResourceGroup - READ-ONLY; Name of the resource group the app belongs to. Read-only.
18573	ResourceGroup *string `json:"resourceGroup,omitempty"`
18574	// IsDefaultContainer - READ-ONLY; <code>true</code> if the app is a default container; otherwise, <code>false</code>.
18575	IsDefaultContainer *bool `json:"isDefaultContainer,omitempty"`
18576	// DefaultHostName - READ-ONLY; Default hostname of the app. Read-only.
18577	DefaultHostName *string `json:"defaultHostName,omitempty"`
18578	// SlotSwapStatus - READ-ONLY; Status of the last deployment slot swap operation.
18579	SlotSwapStatus *SlotSwapStatus `json:"slotSwapStatus,omitempty"`
18580	// HTTPSOnly - HttpsOnly: configures a web site to accept only https requests. Issues redirect for
18581	// http requests
18582	HTTPSOnly *bool `json:"httpsOnly,omitempty"`
18583}
18584
18585// MarshalJSON is the custom marshaler for SiteProperties.
18586func (s SiteProperties) MarshalJSON() ([]byte, error) {
18587	objectMap := make(map[string]interface{})
18588	if s.Enabled != nil {
18589		objectMap["enabled"] = s.Enabled
18590	}
18591	if s.HostNameSslStates != nil {
18592		objectMap["hostNameSslStates"] = s.HostNameSslStates
18593	}
18594	if s.ServerFarmID != nil {
18595		objectMap["serverFarmId"] = s.ServerFarmID
18596	}
18597	if s.Reserved != nil {
18598		objectMap["reserved"] = s.Reserved
18599	}
18600	if s.SiteConfig != nil {
18601		objectMap["siteConfig"] = s.SiteConfig
18602	}
18603	if s.ScmSiteAlsoStopped != nil {
18604		objectMap["scmSiteAlsoStopped"] = s.ScmSiteAlsoStopped
18605	}
18606	if s.HostingEnvironmentProfile != nil {
18607		objectMap["hostingEnvironmentProfile"] = s.HostingEnvironmentProfile
18608	}
18609	if s.ClientAffinityEnabled != nil {
18610		objectMap["clientAffinityEnabled"] = s.ClientAffinityEnabled
18611	}
18612	if s.ClientCertEnabled != nil {
18613		objectMap["clientCertEnabled"] = s.ClientCertEnabled
18614	}
18615	if s.HostNamesDisabled != nil {
18616		objectMap["hostNamesDisabled"] = s.HostNamesDisabled
18617	}
18618	if s.ContainerSize != nil {
18619		objectMap["containerSize"] = s.ContainerSize
18620	}
18621	if s.DailyMemoryTimeQuota != nil {
18622		objectMap["dailyMemoryTimeQuota"] = s.DailyMemoryTimeQuota
18623	}
18624	if s.CloningInfo != nil {
18625		objectMap["cloningInfo"] = s.CloningInfo
18626	}
18627	if s.SnapshotInfo != nil {
18628		objectMap["snapshotInfo"] = s.SnapshotInfo
18629	}
18630	if s.HTTPSOnly != nil {
18631		objectMap["httpsOnly"] = s.HTTPSOnly
18632	}
18633	return json.Marshal(objectMap)
18634}
18635
18636// SiteSeal site seal
18637type SiteSeal struct {
18638	autorest.Response `json:"-"`
18639	// HTML - HTML snippet
18640	HTML *string `json:"html,omitempty"`
18641}
18642
18643// SiteSealRequest site seal request.
18644type SiteSealRequest struct {
18645	// LightTheme - If <code>true</code> use the light color theme for site seal; otherwise, use the default color theme.
18646	LightTheme *bool `json:"lightTheme,omitempty"`
18647	// Locale - Locale of site seal.
18648	Locale *string `json:"locale,omitempty"`
18649}
18650
18651// SiteSourceControl source control configuration for an app.
18652type SiteSourceControl struct {
18653	autorest.Response `json:"-"`
18654	// SiteSourceControlProperties - SiteSourceControl resource specific properties
18655	*SiteSourceControlProperties `json:"properties,omitempty"`
18656	// ID - READ-ONLY; Resource Id.
18657	ID *string `json:"id,omitempty"`
18658	// Name - READ-ONLY; Resource Name.
18659	Name *string `json:"name,omitempty"`
18660	// Kind - Kind of resource.
18661	Kind *string `json:"kind,omitempty"`
18662	// Type - READ-ONLY; Resource type.
18663	Type *string `json:"type,omitempty"`
18664}
18665
18666// MarshalJSON is the custom marshaler for SiteSourceControl.
18667func (ssc SiteSourceControl) MarshalJSON() ([]byte, error) {
18668	objectMap := make(map[string]interface{})
18669	if ssc.SiteSourceControlProperties != nil {
18670		objectMap["properties"] = ssc.SiteSourceControlProperties
18671	}
18672	if ssc.Kind != nil {
18673		objectMap["kind"] = ssc.Kind
18674	}
18675	return json.Marshal(objectMap)
18676}
18677
18678// UnmarshalJSON is the custom unmarshaler for SiteSourceControl struct.
18679func (ssc *SiteSourceControl) UnmarshalJSON(body []byte) error {
18680	var m map[string]*json.RawMessage
18681	err := json.Unmarshal(body, &m)
18682	if err != nil {
18683		return err
18684	}
18685	for k, v := range m {
18686		switch k {
18687		case "properties":
18688			if v != nil {
18689				var siteSourceControlProperties SiteSourceControlProperties
18690				err = json.Unmarshal(*v, &siteSourceControlProperties)
18691				if err != nil {
18692					return err
18693				}
18694				ssc.SiteSourceControlProperties = &siteSourceControlProperties
18695			}
18696		case "id":
18697			if v != nil {
18698				var ID string
18699				err = json.Unmarshal(*v, &ID)
18700				if err != nil {
18701					return err
18702				}
18703				ssc.ID = &ID
18704			}
18705		case "name":
18706			if v != nil {
18707				var name string
18708				err = json.Unmarshal(*v, &name)
18709				if err != nil {
18710					return err
18711				}
18712				ssc.Name = &name
18713			}
18714		case "kind":
18715			if v != nil {
18716				var kind string
18717				err = json.Unmarshal(*v, &kind)
18718				if err != nil {
18719					return err
18720				}
18721				ssc.Kind = &kind
18722			}
18723		case "type":
18724			if v != nil {
18725				var typeVar string
18726				err = json.Unmarshal(*v, &typeVar)
18727				if err != nil {
18728					return err
18729				}
18730				ssc.Type = &typeVar
18731			}
18732		}
18733	}
18734
18735	return nil
18736}
18737
18738// SiteSourceControlProperties siteSourceControl resource specific properties
18739type SiteSourceControlProperties struct {
18740	// RepoURL - Repository or source control URL.
18741	RepoURL *string `json:"repoUrl,omitempty"`
18742	// Branch - Name of branch to use for deployment.
18743	Branch *string `json:"branch,omitempty"`
18744	// IsManualIntegration - <code>true</code> to limit to manual integration; <code>false</code> to enable continuous integration (which configures webhooks into online repos like GitHub).
18745	IsManualIntegration *bool `json:"isManualIntegration,omitempty"`
18746	// DeploymentRollbackEnabled - <code>true</code> to enable deployment rollback; otherwise, <code>false</code>.
18747	DeploymentRollbackEnabled *bool `json:"deploymentRollbackEnabled,omitempty"`
18748	// IsMercurial - <code>true</code> for a Mercurial repository; <code>false</code> for a Git repository.
18749	IsMercurial *bool `json:"isMercurial,omitempty"`
18750}
18751
18752// SkuCapacity description of the App Service plan scale options.
18753type SkuCapacity struct {
18754	// Minimum - Minimum number of workers for this App Service plan SKU.
18755	Minimum *int32 `json:"minimum,omitempty"`
18756	// Maximum - Maximum number of workers for this App Service plan SKU.
18757	Maximum *int32 `json:"maximum,omitempty"`
18758	// Default - Default number of workers for this App Service plan SKU.
18759	Default *int32 `json:"default,omitempty"`
18760	// ScaleType - Available scale configurations for an App Service plan.
18761	ScaleType *string `json:"scaleType,omitempty"`
18762}
18763
18764// SkuDescription description of a SKU for a scalable resource.
18765type SkuDescription struct {
18766	// Name - Name of the resource SKU.
18767	Name *string `json:"name,omitempty"`
18768	// Tier - Service tier of the resource SKU.
18769	Tier *string `json:"tier,omitempty"`
18770	// Size - Size specifier of the resource SKU.
18771	Size *string `json:"size,omitempty"`
18772	// Family - Family code of the resource SKU.
18773	Family *string `json:"family,omitempty"`
18774	// Capacity - Current number of instances assigned to the resource.
18775	Capacity *int32 `json:"capacity,omitempty"`
18776	// SkuCapacity - Min, max, and default scale values of the SKU.
18777	SkuCapacity *SkuCapacity `json:"skuCapacity,omitempty"`
18778	// Locations - Locations of the SKU.
18779	Locations *[]string `json:"locations,omitempty"`
18780	// Capabilities - Capabilities of the SKU, e.g., is traffic manager enabled?
18781	Capabilities *[]Capability `json:"capabilities,omitempty"`
18782}
18783
18784// SkuInfo SKU discovery information.
18785type SkuInfo struct {
18786	// ResourceType - Resource type that this SKU applies to.
18787	ResourceType *string `json:"resourceType,omitempty"`
18788	// Sku - Name and tier of the SKU.
18789	Sku *SkuDescription `json:"sku,omitempty"`
18790	// Capacity - Min, max, and default scale values of the SKU.
18791	Capacity *SkuCapacity `json:"capacity,omitempty"`
18792}
18793
18794// SkuInfoCollection collection of SKU information.
18795type SkuInfoCollection struct {
18796	autorest.Response `json:"-"`
18797	// Value - Collection of resources.
18798	Value *[]SkuInfo `json:"value,omitempty"`
18799	// NextLink - READ-ONLY; Link to next page of resources.
18800	NextLink *string `json:"nextLink,omitempty"`
18801}
18802
18803// MarshalJSON is the custom marshaler for SkuInfoCollection.
18804func (sic SkuInfoCollection) MarshalJSON() ([]byte, error) {
18805	objectMap := make(map[string]interface{})
18806	if sic.Value != nil {
18807		objectMap["value"] = sic.Value
18808	}
18809	return json.Marshal(objectMap)
18810}
18811
18812// SkuInfoCollectionIterator provides access to a complete listing of SkuInfo values.
18813type SkuInfoCollectionIterator struct {
18814	i    int
18815	page SkuInfoCollectionPage
18816}
18817
18818// NextWithContext advances to the next value.  If there was an error making
18819// the request the iterator does not advance and the error is returned.
18820func (iter *SkuInfoCollectionIterator) NextWithContext(ctx context.Context) (err error) {
18821	if tracing.IsEnabled() {
18822		ctx = tracing.StartSpan(ctx, fqdn+"/SkuInfoCollectionIterator.NextWithContext")
18823		defer func() {
18824			sc := -1
18825			if iter.Response().Response.Response != nil {
18826				sc = iter.Response().Response.Response.StatusCode
18827			}
18828			tracing.EndSpan(ctx, sc, err)
18829		}()
18830	}
18831	iter.i++
18832	if iter.i < len(iter.page.Values()) {
18833		return nil
18834	}
18835	err = iter.page.NextWithContext(ctx)
18836	if err != nil {
18837		iter.i--
18838		return err
18839	}
18840	iter.i = 0
18841	return nil
18842}
18843
18844// Next advances to the next value.  If there was an error making
18845// the request the iterator does not advance and the error is returned.
18846// Deprecated: Use NextWithContext() instead.
18847func (iter *SkuInfoCollectionIterator) Next() error {
18848	return iter.NextWithContext(context.Background())
18849}
18850
18851// NotDone returns true if the enumeration should be started or is not yet complete.
18852func (iter SkuInfoCollectionIterator) NotDone() bool {
18853	return iter.page.NotDone() && iter.i < len(iter.page.Values())
18854}
18855
18856// Response returns the raw server response from the last page request.
18857func (iter SkuInfoCollectionIterator) Response() SkuInfoCollection {
18858	return iter.page.Response()
18859}
18860
18861// Value returns the current value or a zero-initialized value if the
18862// iterator has advanced beyond the end of the collection.
18863func (iter SkuInfoCollectionIterator) Value() SkuInfo {
18864	if !iter.page.NotDone() {
18865		return SkuInfo{}
18866	}
18867	return iter.page.Values()[iter.i]
18868}
18869
18870// Creates a new instance of the SkuInfoCollectionIterator type.
18871func NewSkuInfoCollectionIterator(page SkuInfoCollectionPage) SkuInfoCollectionIterator {
18872	return SkuInfoCollectionIterator{page: page}
18873}
18874
18875// IsEmpty returns true if the ListResult contains no values.
18876func (sic SkuInfoCollection) IsEmpty() bool {
18877	return sic.Value == nil || len(*sic.Value) == 0
18878}
18879
18880// hasNextLink returns true if the NextLink is not empty.
18881func (sic SkuInfoCollection) hasNextLink() bool {
18882	return sic.NextLink != nil && len(*sic.NextLink) != 0
18883}
18884
18885// skuInfoCollectionPreparer prepares a request to retrieve the next set of results.
18886// It returns nil if no more results exist.
18887func (sic SkuInfoCollection) skuInfoCollectionPreparer(ctx context.Context) (*http.Request, error) {
18888	if !sic.hasNextLink() {
18889		return nil, nil
18890	}
18891	return autorest.Prepare((&http.Request{}).WithContext(ctx),
18892		autorest.AsJSON(),
18893		autorest.AsGet(),
18894		autorest.WithBaseURL(to.String(sic.NextLink)))
18895}
18896
18897// SkuInfoCollectionPage contains a page of SkuInfo values.
18898type SkuInfoCollectionPage struct {
18899	fn  func(context.Context, SkuInfoCollection) (SkuInfoCollection, error)
18900	sic SkuInfoCollection
18901}
18902
18903// NextWithContext advances to the next page of values.  If there was an error making
18904// the request the page does not advance and the error is returned.
18905func (page *SkuInfoCollectionPage) NextWithContext(ctx context.Context) (err error) {
18906	if tracing.IsEnabled() {
18907		ctx = tracing.StartSpan(ctx, fqdn+"/SkuInfoCollectionPage.NextWithContext")
18908		defer func() {
18909			sc := -1
18910			if page.Response().Response.Response != nil {
18911				sc = page.Response().Response.Response.StatusCode
18912			}
18913			tracing.EndSpan(ctx, sc, err)
18914		}()
18915	}
18916	for {
18917		next, err := page.fn(ctx, page.sic)
18918		if err != nil {
18919			return err
18920		}
18921		page.sic = next
18922		if !next.hasNextLink() || !next.IsEmpty() {
18923			break
18924		}
18925	}
18926	return nil
18927}
18928
18929// Next advances to the next page of values.  If there was an error making
18930// the request the page does not advance and the error is returned.
18931// Deprecated: Use NextWithContext() instead.
18932func (page *SkuInfoCollectionPage) Next() error {
18933	return page.NextWithContext(context.Background())
18934}
18935
18936// NotDone returns true if the page enumeration should be started or is not yet complete.
18937func (page SkuInfoCollectionPage) NotDone() bool {
18938	return !page.sic.IsEmpty()
18939}
18940
18941// Response returns the raw server response from the last page request.
18942func (page SkuInfoCollectionPage) Response() SkuInfoCollection {
18943	return page.sic
18944}
18945
18946// Values returns the slice of values for the current page or nil if there are no values.
18947func (page SkuInfoCollectionPage) Values() []SkuInfo {
18948	if page.sic.IsEmpty() {
18949		return nil
18950	}
18951	return *page.sic.Value
18952}
18953
18954// Creates a new instance of the SkuInfoCollectionPage type.
18955func NewSkuInfoCollectionPage(cur SkuInfoCollection, getNextPage func(context.Context, SkuInfoCollection) (SkuInfoCollection, error)) SkuInfoCollectionPage {
18956	return SkuInfoCollectionPage{
18957		fn:  getNextPage,
18958		sic: cur,
18959	}
18960}
18961
18962// SkuInfos collection of SKU information.
18963type SkuInfos struct {
18964	autorest.Response `json:"-"`
18965	// ResourceType - Resource type that this SKU applies to.
18966	ResourceType *string `json:"resourceType,omitempty"`
18967	// Skus - List of SKUs the subscription is able to use.
18968	Skus *[]GlobalCsmSkuDescription `json:"skus,omitempty"`
18969}
18970
18971// SlotConfigNames names for connection strings and application settings to be marked as sticky to the
18972// deployment slot and not moved during a swap operation.
18973// This is valid for all deployment slots in an app.
18974type SlotConfigNames struct {
18975	// ConnectionStringNames - List of connection string names.
18976	ConnectionStringNames *[]string `json:"connectionStringNames,omitempty"`
18977	// AppSettingNames - List of application settings names.
18978	AppSettingNames *[]string `json:"appSettingNames,omitempty"`
18979}
18980
18981// SlotConfigNamesResource slot Config names azure resource.
18982type SlotConfigNamesResource struct {
18983	autorest.Response `json:"-"`
18984	// SlotConfigNames - Core resource properties
18985	*SlotConfigNames `json:"properties,omitempty"`
18986	// ID - READ-ONLY; Resource Id.
18987	ID *string `json:"id,omitempty"`
18988	// Name - READ-ONLY; Resource Name.
18989	Name *string `json:"name,omitempty"`
18990	// Kind - Kind of resource.
18991	Kind *string `json:"kind,omitempty"`
18992	// Type - READ-ONLY; Resource type.
18993	Type *string `json:"type,omitempty"`
18994}
18995
18996// MarshalJSON is the custom marshaler for SlotConfigNamesResource.
18997func (scnr SlotConfigNamesResource) MarshalJSON() ([]byte, error) {
18998	objectMap := make(map[string]interface{})
18999	if scnr.SlotConfigNames != nil {
19000		objectMap["properties"] = scnr.SlotConfigNames
19001	}
19002	if scnr.Kind != nil {
19003		objectMap["kind"] = scnr.Kind
19004	}
19005	return json.Marshal(objectMap)
19006}
19007
19008// UnmarshalJSON is the custom unmarshaler for SlotConfigNamesResource struct.
19009func (scnr *SlotConfigNamesResource) UnmarshalJSON(body []byte) error {
19010	var m map[string]*json.RawMessage
19011	err := json.Unmarshal(body, &m)
19012	if err != nil {
19013		return err
19014	}
19015	for k, v := range m {
19016		switch k {
19017		case "properties":
19018			if v != nil {
19019				var slotConfigNames SlotConfigNames
19020				err = json.Unmarshal(*v, &slotConfigNames)
19021				if err != nil {
19022					return err
19023				}
19024				scnr.SlotConfigNames = &slotConfigNames
19025			}
19026		case "id":
19027			if v != nil {
19028				var ID string
19029				err = json.Unmarshal(*v, &ID)
19030				if err != nil {
19031					return err
19032				}
19033				scnr.ID = &ID
19034			}
19035		case "name":
19036			if v != nil {
19037				var name string
19038				err = json.Unmarshal(*v, &name)
19039				if err != nil {
19040					return err
19041				}
19042				scnr.Name = &name
19043			}
19044		case "kind":
19045			if v != nil {
19046				var kind string
19047				err = json.Unmarshal(*v, &kind)
19048				if err != nil {
19049					return err
19050				}
19051				scnr.Kind = &kind
19052			}
19053		case "type":
19054			if v != nil {
19055				var typeVar string
19056				err = json.Unmarshal(*v, &typeVar)
19057				if err != nil {
19058					return err
19059				}
19060				scnr.Type = &typeVar
19061			}
19062		}
19063	}
19064
19065	return nil
19066}
19067
19068// SlotDifference a setting difference between two deployment slots of an app.
19069type SlotDifference struct {
19070	// SlotDifferenceProperties - SlotDifference resource specific properties
19071	*SlotDifferenceProperties `json:"properties,omitempty"`
19072	// ID - READ-ONLY; Resource Id.
19073	ID *string `json:"id,omitempty"`
19074	// Name - READ-ONLY; Resource Name.
19075	Name *string `json:"name,omitempty"`
19076	// Kind - Kind of resource.
19077	Kind *string `json:"kind,omitempty"`
19078	// Type - READ-ONLY; Resource type.
19079	Type *string `json:"type,omitempty"`
19080}
19081
19082// MarshalJSON is the custom marshaler for SlotDifference.
19083func (sd SlotDifference) MarshalJSON() ([]byte, error) {
19084	objectMap := make(map[string]interface{})
19085	if sd.SlotDifferenceProperties != nil {
19086		objectMap["properties"] = sd.SlotDifferenceProperties
19087	}
19088	if sd.Kind != nil {
19089		objectMap["kind"] = sd.Kind
19090	}
19091	return json.Marshal(objectMap)
19092}
19093
19094// UnmarshalJSON is the custom unmarshaler for SlotDifference struct.
19095func (sd *SlotDifference) UnmarshalJSON(body []byte) error {
19096	var m map[string]*json.RawMessage
19097	err := json.Unmarshal(body, &m)
19098	if err != nil {
19099		return err
19100	}
19101	for k, v := range m {
19102		switch k {
19103		case "properties":
19104			if v != nil {
19105				var slotDifferenceProperties SlotDifferenceProperties
19106				err = json.Unmarshal(*v, &slotDifferenceProperties)
19107				if err != nil {
19108					return err
19109				}
19110				sd.SlotDifferenceProperties = &slotDifferenceProperties
19111			}
19112		case "id":
19113			if v != nil {
19114				var ID string
19115				err = json.Unmarshal(*v, &ID)
19116				if err != nil {
19117					return err
19118				}
19119				sd.ID = &ID
19120			}
19121		case "name":
19122			if v != nil {
19123				var name string
19124				err = json.Unmarshal(*v, &name)
19125				if err != nil {
19126					return err
19127				}
19128				sd.Name = &name
19129			}
19130		case "kind":
19131			if v != nil {
19132				var kind string
19133				err = json.Unmarshal(*v, &kind)
19134				if err != nil {
19135					return err
19136				}
19137				sd.Kind = &kind
19138			}
19139		case "type":
19140			if v != nil {
19141				var typeVar string
19142				err = json.Unmarshal(*v, &typeVar)
19143				if err != nil {
19144					return err
19145				}
19146				sd.Type = &typeVar
19147			}
19148		}
19149	}
19150
19151	return nil
19152}
19153
19154// SlotDifferenceCollection collection of slot differences.
19155type SlotDifferenceCollection struct {
19156	autorest.Response `json:"-"`
19157	// Value - Collection of resources.
19158	Value *[]SlotDifference `json:"value,omitempty"`
19159	// NextLink - READ-ONLY; Link to next page of resources.
19160	NextLink *string `json:"nextLink,omitempty"`
19161}
19162
19163// MarshalJSON is the custom marshaler for SlotDifferenceCollection.
19164func (sdc SlotDifferenceCollection) MarshalJSON() ([]byte, error) {
19165	objectMap := make(map[string]interface{})
19166	if sdc.Value != nil {
19167		objectMap["value"] = sdc.Value
19168	}
19169	return json.Marshal(objectMap)
19170}
19171
19172// SlotDifferenceCollectionIterator provides access to a complete listing of SlotDifference values.
19173type SlotDifferenceCollectionIterator struct {
19174	i    int
19175	page SlotDifferenceCollectionPage
19176}
19177
19178// NextWithContext advances to the next value.  If there was an error making
19179// the request the iterator does not advance and the error is returned.
19180func (iter *SlotDifferenceCollectionIterator) NextWithContext(ctx context.Context) (err error) {
19181	if tracing.IsEnabled() {
19182		ctx = tracing.StartSpan(ctx, fqdn+"/SlotDifferenceCollectionIterator.NextWithContext")
19183		defer func() {
19184			sc := -1
19185			if iter.Response().Response.Response != nil {
19186				sc = iter.Response().Response.Response.StatusCode
19187			}
19188			tracing.EndSpan(ctx, sc, err)
19189		}()
19190	}
19191	iter.i++
19192	if iter.i < len(iter.page.Values()) {
19193		return nil
19194	}
19195	err = iter.page.NextWithContext(ctx)
19196	if err != nil {
19197		iter.i--
19198		return err
19199	}
19200	iter.i = 0
19201	return nil
19202}
19203
19204// Next advances to the next value.  If there was an error making
19205// the request the iterator does not advance and the error is returned.
19206// Deprecated: Use NextWithContext() instead.
19207func (iter *SlotDifferenceCollectionIterator) Next() error {
19208	return iter.NextWithContext(context.Background())
19209}
19210
19211// NotDone returns true if the enumeration should be started or is not yet complete.
19212func (iter SlotDifferenceCollectionIterator) NotDone() bool {
19213	return iter.page.NotDone() && iter.i < len(iter.page.Values())
19214}
19215
19216// Response returns the raw server response from the last page request.
19217func (iter SlotDifferenceCollectionIterator) Response() SlotDifferenceCollection {
19218	return iter.page.Response()
19219}
19220
19221// Value returns the current value or a zero-initialized value if the
19222// iterator has advanced beyond the end of the collection.
19223func (iter SlotDifferenceCollectionIterator) Value() SlotDifference {
19224	if !iter.page.NotDone() {
19225		return SlotDifference{}
19226	}
19227	return iter.page.Values()[iter.i]
19228}
19229
19230// Creates a new instance of the SlotDifferenceCollectionIterator type.
19231func NewSlotDifferenceCollectionIterator(page SlotDifferenceCollectionPage) SlotDifferenceCollectionIterator {
19232	return SlotDifferenceCollectionIterator{page: page}
19233}
19234
19235// IsEmpty returns true if the ListResult contains no values.
19236func (sdc SlotDifferenceCollection) IsEmpty() bool {
19237	return sdc.Value == nil || len(*sdc.Value) == 0
19238}
19239
19240// hasNextLink returns true if the NextLink is not empty.
19241func (sdc SlotDifferenceCollection) hasNextLink() bool {
19242	return sdc.NextLink != nil && len(*sdc.NextLink) != 0
19243}
19244
19245// slotDifferenceCollectionPreparer prepares a request to retrieve the next set of results.
19246// It returns nil if no more results exist.
19247func (sdc SlotDifferenceCollection) slotDifferenceCollectionPreparer(ctx context.Context) (*http.Request, error) {
19248	if !sdc.hasNextLink() {
19249		return nil, nil
19250	}
19251	return autorest.Prepare((&http.Request{}).WithContext(ctx),
19252		autorest.AsJSON(),
19253		autorest.AsGet(),
19254		autorest.WithBaseURL(to.String(sdc.NextLink)))
19255}
19256
19257// SlotDifferenceCollectionPage contains a page of SlotDifference values.
19258type SlotDifferenceCollectionPage struct {
19259	fn  func(context.Context, SlotDifferenceCollection) (SlotDifferenceCollection, error)
19260	sdc SlotDifferenceCollection
19261}
19262
19263// NextWithContext advances to the next page of values.  If there was an error making
19264// the request the page does not advance and the error is returned.
19265func (page *SlotDifferenceCollectionPage) NextWithContext(ctx context.Context) (err error) {
19266	if tracing.IsEnabled() {
19267		ctx = tracing.StartSpan(ctx, fqdn+"/SlotDifferenceCollectionPage.NextWithContext")
19268		defer func() {
19269			sc := -1
19270			if page.Response().Response.Response != nil {
19271				sc = page.Response().Response.Response.StatusCode
19272			}
19273			tracing.EndSpan(ctx, sc, err)
19274		}()
19275	}
19276	for {
19277		next, err := page.fn(ctx, page.sdc)
19278		if err != nil {
19279			return err
19280		}
19281		page.sdc = next
19282		if !next.hasNextLink() || !next.IsEmpty() {
19283			break
19284		}
19285	}
19286	return nil
19287}
19288
19289// Next advances to the next page of values.  If there was an error making
19290// the request the page does not advance and the error is returned.
19291// Deprecated: Use NextWithContext() instead.
19292func (page *SlotDifferenceCollectionPage) Next() error {
19293	return page.NextWithContext(context.Background())
19294}
19295
19296// NotDone returns true if the page enumeration should be started or is not yet complete.
19297func (page SlotDifferenceCollectionPage) NotDone() bool {
19298	return !page.sdc.IsEmpty()
19299}
19300
19301// Response returns the raw server response from the last page request.
19302func (page SlotDifferenceCollectionPage) Response() SlotDifferenceCollection {
19303	return page.sdc
19304}
19305
19306// Values returns the slice of values for the current page or nil if there are no values.
19307func (page SlotDifferenceCollectionPage) Values() []SlotDifference {
19308	if page.sdc.IsEmpty() {
19309		return nil
19310	}
19311	return *page.sdc.Value
19312}
19313
19314// Creates a new instance of the SlotDifferenceCollectionPage type.
19315func NewSlotDifferenceCollectionPage(cur SlotDifferenceCollection, getNextPage func(context.Context, SlotDifferenceCollection) (SlotDifferenceCollection, error)) SlotDifferenceCollectionPage {
19316	return SlotDifferenceCollectionPage{
19317		fn:  getNextPage,
19318		sdc: cur,
19319	}
19320}
19321
19322// SlotDifferenceProperties slotDifference resource specific properties
19323type SlotDifferenceProperties struct {
19324	// Type - READ-ONLY; Type of the difference: Information, Warning or Error.
19325	Type *string `json:"type,omitempty"`
19326	// SettingType - READ-ONLY; The type of the setting: General, AppSetting or ConnectionString.
19327	SettingType *string `json:"settingType,omitempty"`
19328	// DiffRule - READ-ONLY; Rule that describes how to process the setting difference during a slot swap.
19329	DiffRule *string `json:"diffRule,omitempty"`
19330	// SettingName - READ-ONLY; Name of the setting.
19331	SettingName *string `json:"settingName,omitempty"`
19332	// ValueInCurrentSlot - READ-ONLY; Value of the setting in the current slot.
19333	ValueInCurrentSlot *string `json:"valueInCurrentSlot,omitempty"`
19334	// ValueInTargetSlot - READ-ONLY; Value of the setting in the target slot.
19335	ValueInTargetSlot *string `json:"valueInTargetSlot,omitempty"`
19336	// Description - READ-ONLY; Description of the setting difference.
19337	Description *string `json:"description,omitempty"`
19338}
19339
19340// MarshalJSON is the custom marshaler for SlotDifferenceProperties.
19341func (sd SlotDifferenceProperties) MarshalJSON() ([]byte, error) {
19342	objectMap := make(map[string]interface{})
19343	return json.Marshal(objectMap)
19344}
19345
19346// SlotSwapStatus the status of the last successful slot swap operation.
19347type SlotSwapStatus struct {
19348	// TimestampUtc - READ-ONLY; The time the last successful slot swap completed.
19349	TimestampUtc *date.Time `json:"timestampUtc,omitempty"`
19350	// SourceSlotName - READ-ONLY; The source slot of the last swap operation.
19351	SourceSlotName *string `json:"sourceSlotName,omitempty"`
19352	// DestinationSlotName - READ-ONLY; The destination slot of the last swap operation.
19353	DestinationSlotName *string `json:"destinationSlotName,omitempty"`
19354}
19355
19356// MarshalJSON is the custom marshaler for SlotSwapStatus.
19357func (sss SlotSwapStatus) MarshalJSON() ([]byte, error) {
19358	objectMap := make(map[string]interface{})
19359	return json.Marshal(objectMap)
19360}
19361
19362// SlowRequestsBasedTrigger trigger based on request execution time.
19363type SlowRequestsBasedTrigger struct {
19364	// TimeTaken - Time taken.
19365	TimeTaken *string `json:"timeTaken,omitempty"`
19366	// Count - Request Count.
19367	Count *int32 `json:"count,omitempty"`
19368	// TimeInterval - Time interval.
19369	TimeInterval *string `json:"timeInterval,omitempty"`
19370}
19371
19372// Snapshot a snapshot of an app.
19373type Snapshot struct {
19374	// SnapshotProperties - Snapshot resource specific properties
19375	*SnapshotProperties `json:"properties,omitempty"`
19376	// ID - READ-ONLY; Resource Id.
19377	ID *string `json:"id,omitempty"`
19378	// Name - READ-ONLY; Resource Name.
19379	Name *string `json:"name,omitempty"`
19380	// Kind - Kind of resource.
19381	Kind *string `json:"kind,omitempty"`
19382	// Type - READ-ONLY; Resource type.
19383	Type *string `json:"type,omitempty"`
19384}
19385
19386// MarshalJSON is the custom marshaler for Snapshot.
19387func (s Snapshot) MarshalJSON() ([]byte, error) {
19388	objectMap := make(map[string]interface{})
19389	if s.SnapshotProperties != nil {
19390		objectMap["properties"] = s.SnapshotProperties
19391	}
19392	if s.Kind != nil {
19393		objectMap["kind"] = s.Kind
19394	}
19395	return json.Marshal(objectMap)
19396}
19397
19398// UnmarshalJSON is the custom unmarshaler for Snapshot struct.
19399func (s *Snapshot) UnmarshalJSON(body []byte) error {
19400	var m map[string]*json.RawMessage
19401	err := json.Unmarshal(body, &m)
19402	if err != nil {
19403		return err
19404	}
19405	for k, v := range m {
19406		switch k {
19407		case "properties":
19408			if v != nil {
19409				var snapshotProperties SnapshotProperties
19410				err = json.Unmarshal(*v, &snapshotProperties)
19411				if err != nil {
19412					return err
19413				}
19414				s.SnapshotProperties = &snapshotProperties
19415			}
19416		case "id":
19417			if v != nil {
19418				var ID string
19419				err = json.Unmarshal(*v, &ID)
19420				if err != nil {
19421					return err
19422				}
19423				s.ID = &ID
19424			}
19425		case "name":
19426			if v != nil {
19427				var name string
19428				err = json.Unmarshal(*v, &name)
19429				if err != nil {
19430					return err
19431				}
19432				s.Name = &name
19433			}
19434		case "kind":
19435			if v != nil {
19436				var kind string
19437				err = json.Unmarshal(*v, &kind)
19438				if err != nil {
19439					return err
19440				}
19441				s.Kind = &kind
19442			}
19443		case "type":
19444			if v != nil {
19445				var typeVar string
19446				err = json.Unmarshal(*v, &typeVar)
19447				if err != nil {
19448					return err
19449				}
19450				s.Type = &typeVar
19451			}
19452		}
19453	}
19454
19455	return nil
19456}
19457
19458// SnapshotCollection collection of snapshots which can be used to revert an app to a previous time.
19459type SnapshotCollection struct {
19460	autorest.Response `json:"-"`
19461	// Value - Collection of resources.
19462	Value *[]Snapshot `json:"value,omitempty"`
19463	// NextLink - READ-ONLY; Link to next page of resources.
19464	NextLink *string `json:"nextLink,omitempty"`
19465}
19466
19467// MarshalJSON is the custom marshaler for SnapshotCollection.
19468func (sc SnapshotCollection) MarshalJSON() ([]byte, error) {
19469	objectMap := make(map[string]interface{})
19470	if sc.Value != nil {
19471		objectMap["value"] = sc.Value
19472	}
19473	return json.Marshal(objectMap)
19474}
19475
19476// SnapshotCollectionIterator provides access to a complete listing of Snapshot values.
19477type SnapshotCollectionIterator struct {
19478	i    int
19479	page SnapshotCollectionPage
19480}
19481
19482// NextWithContext advances to the next value.  If there was an error making
19483// the request the iterator does not advance and the error is returned.
19484func (iter *SnapshotCollectionIterator) NextWithContext(ctx context.Context) (err error) {
19485	if tracing.IsEnabled() {
19486		ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotCollectionIterator.NextWithContext")
19487		defer func() {
19488			sc := -1
19489			if iter.Response().Response.Response != nil {
19490				sc = iter.Response().Response.Response.StatusCode
19491			}
19492			tracing.EndSpan(ctx, sc, err)
19493		}()
19494	}
19495	iter.i++
19496	if iter.i < len(iter.page.Values()) {
19497		return nil
19498	}
19499	err = iter.page.NextWithContext(ctx)
19500	if err != nil {
19501		iter.i--
19502		return err
19503	}
19504	iter.i = 0
19505	return nil
19506}
19507
19508// Next advances to the next value.  If there was an error making
19509// the request the iterator does not advance and the error is returned.
19510// Deprecated: Use NextWithContext() instead.
19511func (iter *SnapshotCollectionIterator) Next() error {
19512	return iter.NextWithContext(context.Background())
19513}
19514
19515// NotDone returns true if the enumeration should be started or is not yet complete.
19516func (iter SnapshotCollectionIterator) NotDone() bool {
19517	return iter.page.NotDone() && iter.i < len(iter.page.Values())
19518}
19519
19520// Response returns the raw server response from the last page request.
19521func (iter SnapshotCollectionIterator) Response() SnapshotCollection {
19522	return iter.page.Response()
19523}
19524
19525// Value returns the current value or a zero-initialized value if the
19526// iterator has advanced beyond the end of the collection.
19527func (iter SnapshotCollectionIterator) Value() Snapshot {
19528	if !iter.page.NotDone() {
19529		return Snapshot{}
19530	}
19531	return iter.page.Values()[iter.i]
19532}
19533
19534// Creates a new instance of the SnapshotCollectionIterator type.
19535func NewSnapshotCollectionIterator(page SnapshotCollectionPage) SnapshotCollectionIterator {
19536	return SnapshotCollectionIterator{page: page}
19537}
19538
19539// IsEmpty returns true if the ListResult contains no values.
19540func (sc SnapshotCollection) IsEmpty() bool {
19541	return sc.Value == nil || len(*sc.Value) == 0
19542}
19543
19544// hasNextLink returns true if the NextLink is not empty.
19545func (sc SnapshotCollection) hasNextLink() bool {
19546	return sc.NextLink != nil && len(*sc.NextLink) != 0
19547}
19548
19549// snapshotCollectionPreparer prepares a request to retrieve the next set of results.
19550// It returns nil if no more results exist.
19551func (sc SnapshotCollection) snapshotCollectionPreparer(ctx context.Context) (*http.Request, error) {
19552	if !sc.hasNextLink() {
19553		return nil, nil
19554	}
19555	return autorest.Prepare((&http.Request{}).WithContext(ctx),
19556		autorest.AsJSON(),
19557		autorest.AsGet(),
19558		autorest.WithBaseURL(to.String(sc.NextLink)))
19559}
19560
19561// SnapshotCollectionPage contains a page of Snapshot values.
19562type SnapshotCollectionPage struct {
19563	fn func(context.Context, SnapshotCollection) (SnapshotCollection, error)
19564	sc SnapshotCollection
19565}
19566
19567// NextWithContext advances to the next page of values.  If there was an error making
19568// the request the page does not advance and the error is returned.
19569func (page *SnapshotCollectionPage) NextWithContext(ctx context.Context) (err error) {
19570	if tracing.IsEnabled() {
19571		ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotCollectionPage.NextWithContext")
19572		defer func() {
19573			sc := -1
19574			if page.Response().Response.Response != nil {
19575				sc = page.Response().Response.Response.StatusCode
19576			}
19577			tracing.EndSpan(ctx, sc, err)
19578		}()
19579	}
19580	for {
19581		next, err := page.fn(ctx, page.sc)
19582		if err != nil {
19583			return err
19584		}
19585		page.sc = next
19586		if !next.hasNextLink() || !next.IsEmpty() {
19587			break
19588		}
19589	}
19590	return nil
19591}
19592
19593// Next advances to the next page of values.  If there was an error making
19594// the request the page does not advance and the error is returned.
19595// Deprecated: Use NextWithContext() instead.
19596func (page *SnapshotCollectionPage) Next() error {
19597	return page.NextWithContext(context.Background())
19598}
19599
19600// NotDone returns true if the page enumeration should be started or is not yet complete.
19601func (page SnapshotCollectionPage) NotDone() bool {
19602	return !page.sc.IsEmpty()
19603}
19604
19605// Response returns the raw server response from the last page request.
19606func (page SnapshotCollectionPage) Response() SnapshotCollection {
19607	return page.sc
19608}
19609
19610// Values returns the slice of values for the current page or nil if there are no values.
19611func (page SnapshotCollectionPage) Values() []Snapshot {
19612	if page.sc.IsEmpty() {
19613		return nil
19614	}
19615	return *page.sc.Value
19616}
19617
19618// Creates a new instance of the SnapshotCollectionPage type.
19619func NewSnapshotCollectionPage(cur SnapshotCollection, getNextPage func(context.Context, SnapshotCollection) (SnapshotCollection, error)) SnapshotCollectionPage {
19620	return SnapshotCollectionPage{
19621		fn: getNextPage,
19622		sc: cur,
19623	}
19624}
19625
19626// SnapshotProperties snapshot resource specific properties
19627type SnapshotProperties struct {
19628	// Time - READ-ONLY; The time the snapshot was taken.
19629	Time *string `json:"time,omitempty"`
19630}
19631
19632// MarshalJSON is the custom marshaler for SnapshotProperties.
19633func (s SnapshotProperties) MarshalJSON() ([]byte, error) {
19634	objectMap := make(map[string]interface{})
19635	return json.Marshal(objectMap)
19636}
19637
19638// SnapshotRecoveryRequest details about app recovery operation.
19639type SnapshotRecoveryRequest struct {
19640	// SnapshotRecoveryRequestProperties - SnapshotRecoveryRequest resource specific properties
19641	*SnapshotRecoveryRequestProperties `json:"properties,omitempty"`
19642	// ID - READ-ONLY; Resource Id.
19643	ID *string `json:"id,omitempty"`
19644	// Name - READ-ONLY; Resource Name.
19645	Name *string `json:"name,omitempty"`
19646	// Kind - Kind of resource.
19647	Kind *string `json:"kind,omitempty"`
19648	// Type - READ-ONLY; Resource type.
19649	Type *string `json:"type,omitempty"`
19650}
19651
19652// MarshalJSON is the custom marshaler for SnapshotRecoveryRequest.
19653func (srr SnapshotRecoveryRequest) MarshalJSON() ([]byte, error) {
19654	objectMap := make(map[string]interface{})
19655	if srr.SnapshotRecoveryRequestProperties != nil {
19656		objectMap["properties"] = srr.SnapshotRecoveryRequestProperties
19657	}
19658	if srr.Kind != nil {
19659		objectMap["kind"] = srr.Kind
19660	}
19661	return json.Marshal(objectMap)
19662}
19663
19664// UnmarshalJSON is the custom unmarshaler for SnapshotRecoveryRequest struct.
19665func (srr *SnapshotRecoveryRequest) UnmarshalJSON(body []byte) error {
19666	var m map[string]*json.RawMessage
19667	err := json.Unmarshal(body, &m)
19668	if err != nil {
19669		return err
19670	}
19671	for k, v := range m {
19672		switch k {
19673		case "properties":
19674			if v != nil {
19675				var snapshotRecoveryRequestProperties SnapshotRecoveryRequestProperties
19676				err = json.Unmarshal(*v, &snapshotRecoveryRequestProperties)
19677				if err != nil {
19678					return err
19679				}
19680				srr.SnapshotRecoveryRequestProperties = &snapshotRecoveryRequestProperties
19681			}
19682		case "id":
19683			if v != nil {
19684				var ID string
19685				err = json.Unmarshal(*v, &ID)
19686				if err != nil {
19687					return err
19688				}
19689				srr.ID = &ID
19690			}
19691		case "name":
19692			if v != nil {
19693				var name string
19694				err = json.Unmarshal(*v, &name)
19695				if err != nil {
19696					return err
19697				}
19698				srr.Name = &name
19699			}
19700		case "kind":
19701			if v != nil {
19702				var kind string
19703				err = json.Unmarshal(*v, &kind)
19704				if err != nil {
19705					return err
19706				}
19707				srr.Kind = &kind
19708			}
19709		case "type":
19710			if v != nil {
19711				var typeVar string
19712				err = json.Unmarshal(*v, &typeVar)
19713				if err != nil {
19714					return err
19715				}
19716				srr.Type = &typeVar
19717			}
19718		}
19719	}
19720
19721	return nil
19722}
19723
19724// SnapshotRecoveryRequestProperties snapshotRecoveryRequest resource specific properties
19725type SnapshotRecoveryRequestProperties struct {
19726	// SnapshotTime - Point in time in which the app recovery should be attempted, formatted as a DateTime string.
19727	SnapshotTime *string `json:"snapshotTime,omitempty"`
19728	// RecoveryTarget - Specifies the web app that snapshot contents will be written to.
19729	RecoveryTarget *SnapshotRecoveryTarget `json:"recoveryTarget,omitempty"`
19730	// Overwrite - If <code>true</code> the recovery operation can overwrite source app; otherwise, <code>false</code>.
19731	Overwrite *bool `json:"overwrite,omitempty"`
19732	// RecoverConfiguration - If true, site configuration, in addition to content, will be reverted.
19733	RecoverConfiguration *bool `json:"recoverConfiguration,omitempty"`
19734	// IgnoreConflictingHostNames - If true, custom hostname conflicts will be ignored when recovering to a target web app.
19735	// This setting is only necessary when RecoverConfiguration is enabled.
19736	IgnoreConflictingHostNames *bool `json:"ignoreConflictingHostNames,omitempty"`
19737}
19738
19739// SnapshotRecoveryTarget specifies the web app that snapshot contents will be written to.
19740type SnapshotRecoveryTarget struct {
19741	// Location - Geographical location of the target web app, e.g. SouthEastAsia, SouthCentralUS
19742	Location *string `json:"location,omitempty"`
19743	// ID - ARM resource ID of the target app.
19744	// /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName} for production slots and
19745	// /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slotName} for other slots.
19746	ID *string `json:"id,omitempty"`
19747}
19748
19749// Solution class Representing Solution for problems detected.
19750type Solution struct {
19751	// ID - Solution Id.
19752	ID *float64 `json:"id,omitempty"`
19753	// DisplayName - Display Name of the solution
19754	DisplayName *string `json:"displayName,omitempty"`
19755	// Order - Order of the solution.
19756	Order *float64 `json:"order,omitempty"`
19757	// Description - Description of the solution
19758	Description *string `json:"description,omitempty"`
19759	// Type - Type of Solution. Possible values include: 'QuickSolution', 'DeepInvestigation', 'BestPractices'
19760	Type SolutionType `json:"type,omitempty"`
19761	// Data - Solution Data.
19762	Data *[][]NameValuePair `json:"data,omitempty"`
19763	// Metadata - Solution Metadata.
19764	Metadata *[][]NameValuePair `json:"metadata,omitempty"`
19765}
19766
19767// SourceControl the source control OAuth token.
19768type SourceControl struct {
19769	autorest.Response `json:"-"`
19770	// SourceControlProperties - SourceControl resource specific properties
19771	*SourceControlProperties `json:"properties,omitempty"`
19772	// ID - READ-ONLY; Resource Id.
19773	ID *string `json:"id,omitempty"`
19774	// Name - READ-ONLY; Resource Name.
19775	Name *string `json:"name,omitempty"`
19776	// Kind - Kind of resource.
19777	Kind *string `json:"kind,omitempty"`
19778	// Type - READ-ONLY; Resource type.
19779	Type *string `json:"type,omitempty"`
19780}
19781
19782// MarshalJSON is the custom marshaler for SourceControl.
19783func (sc SourceControl) MarshalJSON() ([]byte, error) {
19784	objectMap := make(map[string]interface{})
19785	if sc.SourceControlProperties != nil {
19786		objectMap["properties"] = sc.SourceControlProperties
19787	}
19788	if sc.Kind != nil {
19789		objectMap["kind"] = sc.Kind
19790	}
19791	return json.Marshal(objectMap)
19792}
19793
19794// UnmarshalJSON is the custom unmarshaler for SourceControl struct.
19795func (sc *SourceControl) UnmarshalJSON(body []byte) error {
19796	var m map[string]*json.RawMessage
19797	err := json.Unmarshal(body, &m)
19798	if err != nil {
19799		return err
19800	}
19801	for k, v := range m {
19802		switch k {
19803		case "properties":
19804			if v != nil {
19805				var sourceControlProperties SourceControlProperties
19806				err = json.Unmarshal(*v, &sourceControlProperties)
19807				if err != nil {
19808					return err
19809				}
19810				sc.SourceControlProperties = &sourceControlProperties
19811			}
19812		case "id":
19813			if v != nil {
19814				var ID string
19815				err = json.Unmarshal(*v, &ID)
19816				if err != nil {
19817					return err
19818				}
19819				sc.ID = &ID
19820			}
19821		case "name":
19822			if v != nil {
19823				var name string
19824				err = json.Unmarshal(*v, &name)
19825				if err != nil {
19826					return err
19827				}
19828				sc.Name = &name
19829			}
19830		case "kind":
19831			if v != nil {
19832				var kind string
19833				err = json.Unmarshal(*v, &kind)
19834				if err != nil {
19835					return err
19836				}
19837				sc.Kind = &kind
19838			}
19839		case "type":
19840			if v != nil {
19841				var typeVar string
19842				err = json.Unmarshal(*v, &typeVar)
19843				if err != nil {
19844					return err
19845				}
19846				sc.Type = &typeVar
19847			}
19848		}
19849	}
19850
19851	return nil
19852}
19853
19854// SourceControlCollection collection of source controls.
19855type SourceControlCollection struct {
19856	autorest.Response `json:"-"`
19857	// Value - Collection of resources.
19858	Value *[]SourceControl `json:"value,omitempty"`
19859	// NextLink - READ-ONLY; Link to next page of resources.
19860	NextLink *string `json:"nextLink,omitempty"`
19861}
19862
19863// MarshalJSON is the custom marshaler for SourceControlCollection.
19864func (scc SourceControlCollection) MarshalJSON() ([]byte, error) {
19865	objectMap := make(map[string]interface{})
19866	if scc.Value != nil {
19867		objectMap["value"] = scc.Value
19868	}
19869	return json.Marshal(objectMap)
19870}
19871
19872// SourceControlCollectionIterator provides access to a complete listing of SourceControl values.
19873type SourceControlCollectionIterator struct {
19874	i    int
19875	page SourceControlCollectionPage
19876}
19877
19878// NextWithContext advances to the next value.  If there was an error making
19879// the request the iterator does not advance and the error is returned.
19880func (iter *SourceControlCollectionIterator) NextWithContext(ctx context.Context) (err error) {
19881	if tracing.IsEnabled() {
19882		ctx = tracing.StartSpan(ctx, fqdn+"/SourceControlCollectionIterator.NextWithContext")
19883		defer func() {
19884			sc := -1
19885			if iter.Response().Response.Response != nil {
19886				sc = iter.Response().Response.Response.StatusCode
19887			}
19888			tracing.EndSpan(ctx, sc, err)
19889		}()
19890	}
19891	iter.i++
19892	if iter.i < len(iter.page.Values()) {
19893		return nil
19894	}
19895	err = iter.page.NextWithContext(ctx)
19896	if err != nil {
19897		iter.i--
19898		return err
19899	}
19900	iter.i = 0
19901	return nil
19902}
19903
19904// Next advances to the next value.  If there was an error making
19905// the request the iterator does not advance and the error is returned.
19906// Deprecated: Use NextWithContext() instead.
19907func (iter *SourceControlCollectionIterator) Next() error {
19908	return iter.NextWithContext(context.Background())
19909}
19910
19911// NotDone returns true if the enumeration should be started or is not yet complete.
19912func (iter SourceControlCollectionIterator) NotDone() bool {
19913	return iter.page.NotDone() && iter.i < len(iter.page.Values())
19914}
19915
19916// Response returns the raw server response from the last page request.
19917func (iter SourceControlCollectionIterator) Response() SourceControlCollection {
19918	return iter.page.Response()
19919}
19920
19921// Value returns the current value or a zero-initialized value if the
19922// iterator has advanced beyond the end of the collection.
19923func (iter SourceControlCollectionIterator) Value() SourceControl {
19924	if !iter.page.NotDone() {
19925		return SourceControl{}
19926	}
19927	return iter.page.Values()[iter.i]
19928}
19929
19930// Creates a new instance of the SourceControlCollectionIterator type.
19931func NewSourceControlCollectionIterator(page SourceControlCollectionPage) SourceControlCollectionIterator {
19932	return SourceControlCollectionIterator{page: page}
19933}
19934
19935// IsEmpty returns true if the ListResult contains no values.
19936func (scc SourceControlCollection) IsEmpty() bool {
19937	return scc.Value == nil || len(*scc.Value) == 0
19938}
19939
19940// hasNextLink returns true if the NextLink is not empty.
19941func (scc SourceControlCollection) hasNextLink() bool {
19942	return scc.NextLink != nil && len(*scc.NextLink) != 0
19943}
19944
19945// sourceControlCollectionPreparer prepares a request to retrieve the next set of results.
19946// It returns nil if no more results exist.
19947func (scc SourceControlCollection) sourceControlCollectionPreparer(ctx context.Context) (*http.Request, error) {
19948	if !scc.hasNextLink() {
19949		return nil, nil
19950	}
19951	return autorest.Prepare((&http.Request{}).WithContext(ctx),
19952		autorest.AsJSON(),
19953		autorest.AsGet(),
19954		autorest.WithBaseURL(to.String(scc.NextLink)))
19955}
19956
19957// SourceControlCollectionPage contains a page of SourceControl values.
19958type SourceControlCollectionPage struct {
19959	fn  func(context.Context, SourceControlCollection) (SourceControlCollection, error)
19960	scc SourceControlCollection
19961}
19962
19963// NextWithContext advances to the next page of values.  If there was an error making
19964// the request the page does not advance and the error is returned.
19965func (page *SourceControlCollectionPage) NextWithContext(ctx context.Context) (err error) {
19966	if tracing.IsEnabled() {
19967		ctx = tracing.StartSpan(ctx, fqdn+"/SourceControlCollectionPage.NextWithContext")
19968		defer func() {
19969			sc := -1
19970			if page.Response().Response.Response != nil {
19971				sc = page.Response().Response.Response.StatusCode
19972			}
19973			tracing.EndSpan(ctx, sc, err)
19974		}()
19975	}
19976	for {
19977		next, err := page.fn(ctx, page.scc)
19978		if err != nil {
19979			return err
19980		}
19981		page.scc = next
19982		if !next.hasNextLink() || !next.IsEmpty() {
19983			break
19984		}
19985	}
19986	return nil
19987}
19988
19989// Next advances to the next page of values.  If there was an error making
19990// the request the page does not advance and the error is returned.
19991// Deprecated: Use NextWithContext() instead.
19992func (page *SourceControlCollectionPage) Next() error {
19993	return page.NextWithContext(context.Background())
19994}
19995
19996// NotDone returns true if the page enumeration should be started or is not yet complete.
19997func (page SourceControlCollectionPage) NotDone() bool {
19998	return !page.scc.IsEmpty()
19999}
20000
20001// Response returns the raw server response from the last page request.
20002func (page SourceControlCollectionPage) Response() SourceControlCollection {
20003	return page.scc
20004}
20005
20006// Values returns the slice of values for the current page or nil if there are no values.
20007func (page SourceControlCollectionPage) Values() []SourceControl {
20008	if page.scc.IsEmpty() {
20009		return nil
20010	}
20011	return *page.scc.Value
20012}
20013
20014// Creates a new instance of the SourceControlCollectionPage type.
20015func NewSourceControlCollectionPage(cur SourceControlCollection, getNextPage func(context.Context, SourceControlCollection) (SourceControlCollection, error)) SourceControlCollectionPage {
20016	return SourceControlCollectionPage{
20017		fn:  getNextPage,
20018		scc: cur,
20019	}
20020}
20021
20022// SourceControlProperties sourceControl resource specific properties
20023type SourceControlProperties struct {
20024	// Name - Name or source control type.
20025	Name *string `json:"name,omitempty"`
20026	// Token - OAuth access token.
20027	Token *string `json:"token,omitempty"`
20028	// TokenSecret - OAuth access token secret.
20029	TokenSecret *string `json:"tokenSecret,omitempty"`
20030	// RefreshToken - OAuth refresh token.
20031	RefreshToken *string `json:"refreshToken,omitempty"`
20032	// ExpirationTime - OAuth token expiration.
20033	ExpirationTime *date.Time `json:"expirationTime,omitempty"`
20034}
20035
20036// StackMajorVersion application stack major version.
20037type StackMajorVersion struct {
20038	// DisplayVersion - Application stack major version (display only).
20039	DisplayVersion *string `json:"displayVersion,omitempty"`
20040	// RuntimeVersion - Application stack major version (runtime only).
20041	RuntimeVersion *string `json:"runtimeVersion,omitempty"`
20042	// IsDefault - <code>true</code> if this is the default major version; otherwise, <code>false</code>.
20043	IsDefault *bool `json:"isDefault,omitempty"`
20044	// MinorVersions - Minor versions associated with the major version.
20045	MinorVersions *[]StackMinorVersion `json:"minorVersions,omitempty"`
20046}
20047
20048// StackMinorVersion application stack minor version.
20049type StackMinorVersion struct {
20050	// DisplayVersion - Application stack minor version (display only).
20051	DisplayVersion *string `json:"displayVersion,omitempty"`
20052	// RuntimeVersion - Application stack minor version (runtime only).
20053	RuntimeVersion *string `json:"runtimeVersion,omitempty"`
20054	// IsDefault - <code>true</code> if this is the default minor version; otherwise, <code>false</code>.
20055	IsDefault *bool `json:"isDefault,omitempty"`
20056}
20057
20058// StampCapacity stamp capacity information.
20059type StampCapacity struct {
20060	// Name - Name of the stamp.
20061	Name *string `json:"name,omitempty"`
20062	// AvailableCapacity - Available capacity (# of machines, bytes of storage etc...).
20063	AvailableCapacity *int64 `json:"availableCapacity,omitempty"`
20064	// TotalCapacity - Total capacity (# of machines, bytes of storage etc...).
20065	TotalCapacity *int64 `json:"totalCapacity,omitempty"`
20066	// Unit - Name of the unit.
20067	Unit *string `json:"unit,omitempty"`
20068	// ComputeMode - Shared/dedicated workers. Possible values include: 'ComputeModeOptionsShared', 'ComputeModeOptionsDedicated', 'ComputeModeOptionsDynamic'
20069	ComputeMode ComputeModeOptions `json:"computeMode,omitempty"`
20070	// WorkerSize - Size of the machines. Possible values include: 'Default', 'Small', 'Medium', 'Large', 'D1', 'D2', 'D3'
20071	WorkerSize WorkerSizeOptions `json:"workerSize,omitempty"`
20072	// WorkerSizeID - Size ID of machines:
20073	// 0 - Small
20074	// 1 - Medium
20075	// 2 - Large
20076	WorkerSizeID *int32 `json:"workerSizeId,omitempty"`
20077	// ExcludeFromCapacityAllocation - If <code>true</code>, it includes basic apps.
20078	// Basic apps are not used for capacity allocation.
20079	ExcludeFromCapacityAllocation *bool `json:"excludeFromCapacityAllocation,omitempty"`
20080	// IsApplicableForAllComputeModes - <code>true</code> if capacity is applicable for all apps; otherwise, <code>false</code>.
20081	IsApplicableForAllComputeModes *bool `json:"isApplicableForAllComputeModes,omitempty"`
20082	// SiteMode - Shared or Dedicated.
20083	SiteMode *string `json:"siteMode,omitempty"`
20084}
20085
20086// StampCapacityCollection collection of stamp capacities.
20087type StampCapacityCollection struct {
20088	autorest.Response `json:"-"`
20089	// Value - Collection of resources.
20090	Value *[]StampCapacity `json:"value,omitempty"`
20091	// NextLink - READ-ONLY; Link to next page of resources.
20092	NextLink *string `json:"nextLink,omitempty"`
20093}
20094
20095// MarshalJSON is the custom marshaler for StampCapacityCollection.
20096func (scc StampCapacityCollection) MarshalJSON() ([]byte, error) {
20097	objectMap := make(map[string]interface{})
20098	if scc.Value != nil {
20099		objectMap["value"] = scc.Value
20100	}
20101	return json.Marshal(objectMap)
20102}
20103
20104// StampCapacityCollectionIterator provides access to a complete listing of StampCapacity values.
20105type StampCapacityCollectionIterator struct {
20106	i    int
20107	page StampCapacityCollectionPage
20108}
20109
20110// NextWithContext advances to the next value.  If there was an error making
20111// the request the iterator does not advance and the error is returned.
20112func (iter *StampCapacityCollectionIterator) NextWithContext(ctx context.Context) (err error) {
20113	if tracing.IsEnabled() {
20114		ctx = tracing.StartSpan(ctx, fqdn+"/StampCapacityCollectionIterator.NextWithContext")
20115		defer func() {
20116			sc := -1
20117			if iter.Response().Response.Response != nil {
20118				sc = iter.Response().Response.Response.StatusCode
20119			}
20120			tracing.EndSpan(ctx, sc, err)
20121		}()
20122	}
20123	iter.i++
20124	if iter.i < len(iter.page.Values()) {
20125		return nil
20126	}
20127	err = iter.page.NextWithContext(ctx)
20128	if err != nil {
20129		iter.i--
20130		return err
20131	}
20132	iter.i = 0
20133	return nil
20134}
20135
20136// Next advances to the next value.  If there was an error making
20137// the request the iterator does not advance and the error is returned.
20138// Deprecated: Use NextWithContext() instead.
20139func (iter *StampCapacityCollectionIterator) Next() error {
20140	return iter.NextWithContext(context.Background())
20141}
20142
20143// NotDone returns true if the enumeration should be started or is not yet complete.
20144func (iter StampCapacityCollectionIterator) NotDone() bool {
20145	return iter.page.NotDone() && iter.i < len(iter.page.Values())
20146}
20147
20148// Response returns the raw server response from the last page request.
20149func (iter StampCapacityCollectionIterator) Response() StampCapacityCollection {
20150	return iter.page.Response()
20151}
20152
20153// Value returns the current value or a zero-initialized value if the
20154// iterator has advanced beyond the end of the collection.
20155func (iter StampCapacityCollectionIterator) Value() StampCapacity {
20156	if !iter.page.NotDone() {
20157		return StampCapacity{}
20158	}
20159	return iter.page.Values()[iter.i]
20160}
20161
20162// Creates a new instance of the StampCapacityCollectionIterator type.
20163func NewStampCapacityCollectionIterator(page StampCapacityCollectionPage) StampCapacityCollectionIterator {
20164	return StampCapacityCollectionIterator{page: page}
20165}
20166
20167// IsEmpty returns true if the ListResult contains no values.
20168func (scc StampCapacityCollection) IsEmpty() bool {
20169	return scc.Value == nil || len(*scc.Value) == 0
20170}
20171
20172// hasNextLink returns true if the NextLink is not empty.
20173func (scc StampCapacityCollection) hasNextLink() bool {
20174	return scc.NextLink != nil && len(*scc.NextLink) != 0
20175}
20176
20177// stampCapacityCollectionPreparer prepares a request to retrieve the next set of results.
20178// It returns nil if no more results exist.
20179func (scc StampCapacityCollection) stampCapacityCollectionPreparer(ctx context.Context) (*http.Request, error) {
20180	if !scc.hasNextLink() {
20181		return nil, nil
20182	}
20183	return autorest.Prepare((&http.Request{}).WithContext(ctx),
20184		autorest.AsJSON(),
20185		autorest.AsGet(),
20186		autorest.WithBaseURL(to.String(scc.NextLink)))
20187}
20188
20189// StampCapacityCollectionPage contains a page of StampCapacity values.
20190type StampCapacityCollectionPage struct {
20191	fn  func(context.Context, StampCapacityCollection) (StampCapacityCollection, error)
20192	scc StampCapacityCollection
20193}
20194
20195// NextWithContext advances to the next page of values.  If there was an error making
20196// the request the page does not advance and the error is returned.
20197func (page *StampCapacityCollectionPage) NextWithContext(ctx context.Context) (err error) {
20198	if tracing.IsEnabled() {
20199		ctx = tracing.StartSpan(ctx, fqdn+"/StampCapacityCollectionPage.NextWithContext")
20200		defer func() {
20201			sc := -1
20202			if page.Response().Response.Response != nil {
20203				sc = page.Response().Response.Response.StatusCode
20204			}
20205			tracing.EndSpan(ctx, sc, err)
20206		}()
20207	}
20208	for {
20209		next, err := page.fn(ctx, page.scc)
20210		if err != nil {
20211			return err
20212		}
20213		page.scc = next
20214		if !next.hasNextLink() || !next.IsEmpty() {
20215			break
20216		}
20217	}
20218	return nil
20219}
20220
20221// Next advances to the next page of values.  If there was an error making
20222// the request the page does not advance and the error is returned.
20223// Deprecated: Use NextWithContext() instead.
20224func (page *StampCapacityCollectionPage) Next() error {
20225	return page.NextWithContext(context.Background())
20226}
20227
20228// NotDone returns true if the page enumeration should be started or is not yet complete.
20229func (page StampCapacityCollectionPage) NotDone() bool {
20230	return !page.scc.IsEmpty()
20231}
20232
20233// Response returns the raw server response from the last page request.
20234func (page StampCapacityCollectionPage) Response() StampCapacityCollection {
20235	return page.scc
20236}
20237
20238// Values returns the slice of values for the current page or nil if there are no values.
20239func (page StampCapacityCollectionPage) Values() []StampCapacity {
20240	if page.scc.IsEmpty() {
20241		return nil
20242	}
20243	return *page.scc.Value
20244}
20245
20246// Creates a new instance of the StampCapacityCollectionPage type.
20247func NewStampCapacityCollectionPage(cur StampCapacityCollection, getNextPage func(context.Context, StampCapacityCollection) (StampCapacityCollection, error)) StampCapacityCollectionPage {
20248	return StampCapacityCollectionPage{
20249		fn:  getNextPage,
20250		scc: cur,
20251	}
20252}
20253
20254// StatusCodesBasedTrigger trigger based on status code.
20255type StatusCodesBasedTrigger struct {
20256	// Status - HTTP status code.
20257	Status *int32 `json:"status,omitempty"`
20258	// SubStatus - Request Sub Status.
20259	SubStatus *int32 `json:"subStatus,omitempty"`
20260	// Win32Status - Win32 error code.
20261	Win32Status *int32 `json:"win32Status,omitempty"`
20262	// Count - Request Count.
20263	Count *int32 `json:"count,omitempty"`
20264	// TimeInterval - Time interval.
20265	TimeInterval *string `json:"timeInterval,omitempty"`
20266}
20267
20268// StorageMigrationOptions options for app content migration.
20269type StorageMigrationOptions struct {
20270	// StorageMigrationOptionsProperties - StorageMigrationOptions resource specific properties
20271	*StorageMigrationOptionsProperties `json:"properties,omitempty"`
20272	// ID - READ-ONLY; Resource Id.
20273	ID *string `json:"id,omitempty"`
20274	// Name - READ-ONLY; Resource Name.
20275	Name *string `json:"name,omitempty"`
20276	// Kind - Kind of resource.
20277	Kind *string `json:"kind,omitempty"`
20278	// Type - READ-ONLY; Resource type.
20279	Type *string `json:"type,omitempty"`
20280}
20281
20282// MarshalJSON is the custom marshaler for StorageMigrationOptions.
20283func (smo StorageMigrationOptions) MarshalJSON() ([]byte, error) {
20284	objectMap := make(map[string]interface{})
20285	if smo.StorageMigrationOptionsProperties != nil {
20286		objectMap["properties"] = smo.StorageMigrationOptionsProperties
20287	}
20288	if smo.Kind != nil {
20289		objectMap["kind"] = smo.Kind
20290	}
20291	return json.Marshal(objectMap)
20292}
20293
20294// UnmarshalJSON is the custom unmarshaler for StorageMigrationOptions struct.
20295func (smo *StorageMigrationOptions) UnmarshalJSON(body []byte) error {
20296	var m map[string]*json.RawMessage
20297	err := json.Unmarshal(body, &m)
20298	if err != nil {
20299		return err
20300	}
20301	for k, v := range m {
20302		switch k {
20303		case "properties":
20304			if v != nil {
20305				var storageMigrationOptionsProperties StorageMigrationOptionsProperties
20306				err = json.Unmarshal(*v, &storageMigrationOptionsProperties)
20307				if err != nil {
20308					return err
20309				}
20310				smo.StorageMigrationOptionsProperties = &storageMigrationOptionsProperties
20311			}
20312		case "id":
20313			if v != nil {
20314				var ID string
20315				err = json.Unmarshal(*v, &ID)
20316				if err != nil {
20317					return err
20318				}
20319				smo.ID = &ID
20320			}
20321		case "name":
20322			if v != nil {
20323				var name string
20324				err = json.Unmarshal(*v, &name)
20325				if err != nil {
20326					return err
20327				}
20328				smo.Name = &name
20329			}
20330		case "kind":
20331			if v != nil {
20332				var kind string
20333				err = json.Unmarshal(*v, &kind)
20334				if err != nil {
20335					return err
20336				}
20337				smo.Kind = &kind
20338			}
20339		case "type":
20340			if v != nil {
20341				var typeVar string
20342				err = json.Unmarshal(*v, &typeVar)
20343				if err != nil {
20344					return err
20345				}
20346				smo.Type = &typeVar
20347			}
20348		}
20349	}
20350
20351	return nil
20352}
20353
20354// StorageMigrationOptionsProperties storageMigrationOptions resource specific properties
20355type StorageMigrationOptionsProperties struct {
20356	// AzurefilesConnectionString - AzureFiles connection string.
20357	AzurefilesConnectionString *string `json:"azurefilesConnectionString,omitempty"`
20358	// AzurefilesShare - AzureFiles share.
20359	AzurefilesShare *string `json:"azurefilesShare,omitempty"`
20360	// SwitchSiteAfterMigration - <code>true</code>if the app should be switched over; otherwise, <code>false</code>.
20361	SwitchSiteAfterMigration *bool `json:"switchSiteAfterMigration,omitempty"`
20362	// BlockWriteAccessToSite - <code>true</code> if the app should be read only during copy operation; otherwise, <code>false</code>.
20363	BlockWriteAccessToSite *bool `json:"blockWriteAccessToSite,omitempty"`
20364}
20365
20366// StorageMigrationResponse response for a migration of app content request.
20367type StorageMigrationResponse struct {
20368	autorest.Response `json:"-"`
20369	// StorageMigrationResponseProperties - StorageMigrationResponse resource specific properties
20370	*StorageMigrationResponseProperties `json:"properties,omitempty"`
20371	// ID - READ-ONLY; Resource Id.
20372	ID *string `json:"id,omitempty"`
20373	// Name - READ-ONLY; Resource Name.
20374	Name *string `json:"name,omitempty"`
20375	// Kind - Kind of resource.
20376	Kind *string `json:"kind,omitempty"`
20377	// Type - READ-ONLY; Resource type.
20378	Type *string `json:"type,omitempty"`
20379}
20380
20381// MarshalJSON is the custom marshaler for StorageMigrationResponse.
20382func (smr StorageMigrationResponse) MarshalJSON() ([]byte, error) {
20383	objectMap := make(map[string]interface{})
20384	if smr.StorageMigrationResponseProperties != nil {
20385		objectMap["properties"] = smr.StorageMigrationResponseProperties
20386	}
20387	if smr.Kind != nil {
20388		objectMap["kind"] = smr.Kind
20389	}
20390	return json.Marshal(objectMap)
20391}
20392
20393// UnmarshalJSON is the custom unmarshaler for StorageMigrationResponse struct.
20394func (smr *StorageMigrationResponse) UnmarshalJSON(body []byte) error {
20395	var m map[string]*json.RawMessage
20396	err := json.Unmarshal(body, &m)
20397	if err != nil {
20398		return err
20399	}
20400	for k, v := range m {
20401		switch k {
20402		case "properties":
20403			if v != nil {
20404				var storageMigrationResponseProperties StorageMigrationResponseProperties
20405				err = json.Unmarshal(*v, &storageMigrationResponseProperties)
20406				if err != nil {
20407					return err
20408				}
20409				smr.StorageMigrationResponseProperties = &storageMigrationResponseProperties
20410			}
20411		case "id":
20412			if v != nil {
20413				var ID string
20414				err = json.Unmarshal(*v, &ID)
20415				if err != nil {
20416					return err
20417				}
20418				smr.ID = &ID
20419			}
20420		case "name":
20421			if v != nil {
20422				var name string
20423				err = json.Unmarshal(*v, &name)
20424				if err != nil {
20425					return err
20426				}
20427				smr.Name = &name
20428			}
20429		case "kind":
20430			if v != nil {
20431				var kind string
20432				err = json.Unmarshal(*v, &kind)
20433				if err != nil {
20434					return err
20435				}
20436				smr.Kind = &kind
20437			}
20438		case "type":
20439			if v != nil {
20440				var typeVar string
20441				err = json.Unmarshal(*v, &typeVar)
20442				if err != nil {
20443					return err
20444				}
20445				smr.Type = &typeVar
20446			}
20447		}
20448	}
20449
20450	return nil
20451}
20452
20453// StorageMigrationResponseProperties storageMigrationResponse resource specific properties
20454type StorageMigrationResponseProperties struct {
20455	// OperationID - READ-ONLY; When server starts the migration process, it will return an operation ID identifying that particular migration operation.
20456	OperationID *string `json:"operationId,omitempty"`
20457}
20458
20459// MarshalJSON is the custom marshaler for StorageMigrationResponseProperties.
20460func (smr StorageMigrationResponseProperties) MarshalJSON() ([]byte, error) {
20461	objectMap := make(map[string]interface{})
20462	return json.Marshal(objectMap)
20463}
20464
20465// String ...
20466type String struct {
20467	autorest.Response `json:"-"`
20468	Value             *string `json:"value,omitempty"`
20469}
20470
20471// StringDictionary string dictionary resource.
20472type StringDictionary struct {
20473	autorest.Response `json:"-"`
20474	// Properties - Settings.
20475	Properties map[string]*string `json:"properties"`
20476	// ID - READ-ONLY; Resource Id.
20477	ID *string `json:"id,omitempty"`
20478	// Name - READ-ONLY; Resource Name.
20479	Name *string `json:"name,omitempty"`
20480	// Kind - Kind of resource.
20481	Kind *string `json:"kind,omitempty"`
20482	// Type - READ-ONLY; Resource type.
20483	Type *string `json:"type,omitempty"`
20484}
20485
20486// MarshalJSON is the custom marshaler for StringDictionary.
20487func (sd StringDictionary) MarshalJSON() ([]byte, error) {
20488	objectMap := make(map[string]interface{})
20489	if sd.Properties != nil {
20490		objectMap["properties"] = sd.Properties
20491	}
20492	if sd.Kind != nil {
20493		objectMap["kind"] = sd.Kind
20494	}
20495	return json.Marshal(objectMap)
20496}
20497
20498// TldLegalAgreement legal agreement for a top level domain.
20499type TldLegalAgreement struct {
20500	// AgreementKey - Unique identifier for the agreement.
20501	AgreementKey *string `json:"agreementKey,omitempty"`
20502	// Title - Agreement title.
20503	Title *string `json:"title,omitempty"`
20504	// Content - Agreement details.
20505	Content *string `json:"content,omitempty"`
20506	// URL - URL where a copy of the agreement details is hosted.
20507	URL *string `json:"url,omitempty"`
20508}
20509
20510// TldLegalAgreementCollection collection of top-level domain legal agreements.
20511type TldLegalAgreementCollection struct {
20512	autorest.Response `json:"-"`
20513	// Value - Collection of resources.
20514	Value *[]TldLegalAgreement `json:"value,omitempty"`
20515	// NextLink - READ-ONLY; Link to next page of resources.
20516	NextLink *string `json:"nextLink,omitempty"`
20517}
20518
20519// MarshalJSON is the custom marshaler for TldLegalAgreementCollection.
20520func (tlac TldLegalAgreementCollection) MarshalJSON() ([]byte, error) {
20521	objectMap := make(map[string]interface{})
20522	if tlac.Value != nil {
20523		objectMap["value"] = tlac.Value
20524	}
20525	return json.Marshal(objectMap)
20526}
20527
20528// TldLegalAgreementCollectionIterator provides access to a complete listing of TldLegalAgreement values.
20529type TldLegalAgreementCollectionIterator struct {
20530	i    int
20531	page TldLegalAgreementCollectionPage
20532}
20533
20534// NextWithContext advances to the next value.  If there was an error making
20535// the request the iterator does not advance and the error is returned.
20536func (iter *TldLegalAgreementCollectionIterator) NextWithContext(ctx context.Context) (err error) {
20537	if tracing.IsEnabled() {
20538		ctx = tracing.StartSpan(ctx, fqdn+"/TldLegalAgreementCollectionIterator.NextWithContext")
20539		defer func() {
20540			sc := -1
20541			if iter.Response().Response.Response != nil {
20542				sc = iter.Response().Response.Response.StatusCode
20543			}
20544			tracing.EndSpan(ctx, sc, err)
20545		}()
20546	}
20547	iter.i++
20548	if iter.i < len(iter.page.Values()) {
20549		return nil
20550	}
20551	err = iter.page.NextWithContext(ctx)
20552	if err != nil {
20553		iter.i--
20554		return err
20555	}
20556	iter.i = 0
20557	return nil
20558}
20559
20560// Next advances to the next value.  If there was an error making
20561// the request the iterator does not advance and the error is returned.
20562// Deprecated: Use NextWithContext() instead.
20563func (iter *TldLegalAgreementCollectionIterator) Next() error {
20564	return iter.NextWithContext(context.Background())
20565}
20566
20567// NotDone returns true if the enumeration should be started or is not yet complete.
20568func (iter TldLegalAgreementCollectionIterator) NotDone() bool {
20569	return iter.page.NotDone() && iter.i < len(iter.page.Values())
20570}
20571
20572// Response returns the raw server response from the last page request.
20573func (iter TldLegalAgreementCollectionIterator) Response() TldLegalAgreementCollection {
20574	return iter.page.Response()
20575}
20576
20577// Value returns the current value or a zero-initialized value if the
20578// iterator has advanced beyond the end of the collection.
20579func (iter TldLegalAgreementCollectionIterator) Value() TldLegalAgreement {
20580	if !iter.page.NotDone() {
20581		return TldLegalAgreement{}
20582	}
20583	return iter.page.Values()[iter.i]
20584}
20585
20586// Creates a new instance of the TldLegalAgreementCollectionIterator type.
20587func NewTldLegalAgreementCollectionIterator(page TldLegalAgreementCollectionPage) TldLegalAgreementCollectionIterator {
20588	return TldLegalAgreementCollectionIterator{page: page}
20589}
20590
20591// IsEmpty returns true if the ListResult contains no values.
20592func (tlac TldLegalAgreementCollection) IsEmpty() bool {
20593	return tlac.Value == nil || len(*tlac.Value) == 0
20594}
20595
20596// hasNextLink returns true if the NextLink is not empty.
20597func (tlac TldLegalAgreementCollection) hasNextLink() bool {
20598	return tlac.NextLink != nil && len(*tlac.NextLink) != 0
20599}
20600
20601// tldLegalAgreementCollectionPreparer prepares a request to retrieve the next set of results.
20602// It returns nil if no more results exist.
20603func (tlac TldLegalAgreementCollection) tldLegalAgreementCollectionPreparer(ctx context.Context) (*http.Request, error) {
20604	if !tlac.hasNextLink() {
20605		return nil, nil
20606	}
20607	return autorest.Prepare((&http.Request{}).WithContext(ctx),
20608		autorest.AsJSON(),
20609		autorest.AsGet(),
20610		autorest.WithBaseURL(to.String(tlac.NextLink)))
20611}
20612
20613// TldLegalAgreementCollectionPage contains a page of TldLegalAgreement values.
20614type TldLegalAgreementCollectionPage struct {
20615	fn   func(context.Context, TldLegalAgreementCollection) (TldLegalAgreementCollection, error)
20616	tlac TldLegalAgreementCollection
20617}
20618
20619// NextWithContext advances to the next page of values.  If there was an error making
20620// the request the page does not advance and the error is returned.
20621func (page *TldLegalAgreementCollectionPage) NextWithContext(ctx context.Context) (err error) {
20622	if tracing.IsEnabled() {
20623		ctx = tracing.StartSpan(ctx, fqdn+"/TldLegalAgreementCollectionPage.NextWithContext")
20624		defer func() {
20625			sc := -1
20626			if page.Response().Response.Response != nil {
20627				sc = page.Response().Response.Response.StatusCode
20628			}
20629			tracing.EndSpan(ctx, sc, err)
20630		}()
20631	}
20632	for {
20633		next, err := page.fn(ctx, page.tlac)
20634		if err != nil {
20635			return err
20636		}
20637		page.tlac = next
20638		if !next.hasNextLink() || !next.IsEmpty() {
20639			break
20640		}
20641	}
20642	return nil
20643}
20644
20645// Next advances to the next page of values.  If there was an error making
20646// the request the page does not advance and the error is returned.
20647// Deprecated: Use NextWithContext() instead.
20648func (page *TldLegalAgreementCollectionPage) Next() error {
20649	return page.NextWithContext(context.Background())
20650}
20651
20652// NotDone returns true if the page enumeration should be started or is not yet complete.
20653func (page TldLegalAgreementCollectionPage) NotDone() bool {
20654	return !page.tlac.IsEmpty()
20655}
20656
20657// Response returns the raw server response from the last page request.
20658func (page TldLegalAgreementCollectionPage) Response() TldLegalAgreementCollection {
20659	return page.tlac
20660}
20661
20662// Values returns the slice of values for the current page or nil if there are no values.
20663func (page TldLegalAgreementCollectionPage) Values() []TldLegalAgreement {
20664	if page.tlac.IsEmpty() {
20665		return nil
20666	}
20667	return *page.tlac.Value
20668}
20669
20670// Creates a new instance of the TldLegalAgreementCollectionPage type.
20671func NewTldLegalAgreementCollectionPage(cur TldLegalAgreementCollection, getNextPage func(context.Context, TldLegalAgreementCollection) (TldLegalAgreementCollection, error)) TldLegalAgreementCollectionPage {
20672	return TldLegalAgreementCollectionPage{
20673		fn:   getNextPage,
20674		tlac: cur,
20675	}
20676}
20677
20678// TopLevelDomain a top level domain object.
20679type TopLevelDomain struct {
20680	autorest.Response `json:"-"`
20681	// TopLevelDomainProperties - TopLevelDomain resource specific properties
20682	*TopLevelDomainProperties `json:"properties,omitempty"`
20683	// ID - READ-ONLY; Resource Id.
20684	ID *string `json:"id,omitempty"`
20685	// Name - READ-ONLY; Resource Name.
20686	Name *string `json:"name,omitempty"`
20687	// Kind - Kind of resource.
20688	Kind *string `json:"kind,omitempty"`
20689	// Type - READ-ONLY; Resource type.
20690	Type *string `json:"type,omitempty"`
20691}
20692
20693// MarshalJSON is the custom marshaler for TopLevelDomain.
20694func (tld TopLevelDomain) MarshalJSON() ([]byte, error) {
20695	objectMap := make(map[string]interface{})
20696	if tld.TopLevelDomainProperties != nil {
20697		objectMap["properties"] = tld.TopLevelDomainProperties
20698	}
20699	if tld.Kind != nil {
20700		objectMap["kind"] = tld.Kind
20701	}
20702	return json.Marshal(objectMap)
20703}
20704
20705// UnmarshalJSON is the custom unmarshaler for TopLevelDomain struct.
20706func (tld *TopLevelDomain) UnmarshalJSON(body []byte) error {
20707	var m map[string]*json.RawMessage
20708	err := json.Unmarshal(body, &m)
20709	if err != nil {
20710		return err
20711	}
20712	for k, v := range m {
20713		switch k {
20714		case "properties":
20715			if v != nil {
20716				var topLevelDomainProperties TopLevelDomainProperties
20717				err = json.Unmarshal(*v, &topLevelDomainProperties)
20718				if err != nil {
20719					return err
20720				}
20721				tld.TopLevelDomainProperties = &topLevelDomainProperties
20722			}
20723		case "id":
20724			if v != nil {
20725				var ID string
20726				err = json.Unmarshal(*v, &ID)
20727				if err != nil {
20728					return err
20729				}
20730				tld.ID = &ID
20731			}
20732		case "name":
20733			if v != nil {
20734				var name string
20735				err = json.Unmarshal(*v, &name)
20736				if err != nil {
20737					return err
20738				}
20739				tld.Name = &name
20740			}
20741		case "kind":
20742			if v != nil {
20743				var kind string
20744				err = json.Unmarshal(*v, &kind)
20745				if err != nil {
20746					return err
20747				}
20748				tld.Kind = &kind
20749			}
20750		case "type":
20751			if v != nil {
20752				var typeVar string
20753				err = json.Unmarshal(*v, &typeVar)
20754				if err != nil {
20755					return err
20756				}
20757				tld.Type = &typeVar
20758			}
20759		}
20760	}
20761
20762	return nil
20763}
20764
20765// TopLevelDomainAgreementOption options for retrieving the list of top level domain legal agreements.
20766type TopLevelDomainAgreementOption struct {
20767	// IncludePrivacy - If <code>true</code>, then the list of agreements will include agreements for domain privacy as well; otherwise, <code>false</code>.
20768	IncludePrivacy *bool `json:"includePrivacy,omitempty"`
20769	// ForTransfer - If <code>true</code>, then the list of agreements will include agreements for domain transfer as well; otherwise, <code>false</code>.
20770	ForTransfer *bool `json:"forTransfer,omitempty"`
20771}
20772
20773// TopLevelDomainCollection collection of Top-level domains.
20774type TopLevelDomainCollection struct {
20775	autorest.Response `json:"-"`
20776	// Value - Collection of resources.
20777	Value *[]TopLevelDomain `json:"value,omitempty"`
20778	// NextLink - READ-ONLY; Link to next page of resources.
20779	NextLink *string `json:"nextLink,omitempty"`
20780}
20781
20782// MarshalJSON is the custom marshaler for TopLevelDomainCollection.
20783func (tldc TopLevelDomainCollection) MarshalJSON() ([]byte, error) {
20784	objectMap := make(map[string]interface{})
20785	if tldc.Value != nil {
20786		objectMap["value"] = tldc.Value
20787	}
20788	return json.Marshal(objectMap)
20789}
20790
20791// TopLevelDomainCollectionIterator provides access to a complete listing of TopLevelDomain values.
20792type TopLevelDomainCollectionIterator struct {
20793	i    int
20794	page TopLevelDomainCollectionPage
20795}
20796
20797// NextWithContext advances to the next value.  If there was an error making
20798// the request the iterator does not advance and the error is returned.
20799func (iter *TopLevelDomainCollectionIterator) NextWithContext(ctx context.Context) (err error) {
20800	if tracing.IsEnabled() {
20801		ctx = tracing.StartSpan(ctx, fqdn+"/TopLevelDomainCollectionIterator.NextWithContext")
20802		defer func() {
20803			sc := -1
20804			if iter.Response().Response.Response != nil {
20805				sc = iter.Response().Response.Response.StatusCode
20806			}
20807			tracing.EndSpan(ctx, sc, err)
20808		}()
20809	}
20810	iter.i++
20811	if iter.i < len(iter.page.Values()) {
20812		return nil
20813	}
20814	err = iter.page.NextWithContext(ctx)
20815	if err != nil {
20816		iter.i--
20817		return err
20818	}
20819	iter.i = 0
20820	return nil
20821}
20822
20823// Next advances to the next value.  If there was an error making
20824// the request the iterator does not advance and the error is returned.
20825// Deprecated: Use NextWithContext() instead.
20826func (iter *TopLevelDomainCollectionIterator) Next() error {
20827	return iter.NextWithContext(context.Background())
20828}
20829
20830// NotDone returns true if the enumeration should be started or is not yet complete.
20831func (iter TopLevelDomainCollectionIterator) NotDone() bool {
20832	return iter.page.NotDone() && iter.i < len(iter.page.Values())
20833}
20834
20835// Response returns the raw server response from the last page request.
20836func (iter TopLevelDomainCollectionIterator) Response() TopLevelDomainCollection {
20837	return iter.page.Response()
20838}
20839
20840// Value returns the current value or a zero-initialized value if the
20841// iterator has advanced beyond the end of the collection.
20842func (iter TopLevelDomainCollectionIterator) Value() TopLevelDomain {
20843	if !iter.page.NotDone() {
20844		return TopLevelDomain{}
20845	}
20846	return iter.page.Values()[iter.i]
20847}
20848
20849// Creates a new instance of the TopLevelDomainCollectionIterator type.
20850func NewTopLevelDomainCollectionIterator(page TopLevelDomainCollectionPage) TopLevelDomainCollectionIterator {
20851	return TopLevelDomainCollectionIterator{page: page}
20852}
20853
20854// IsEmpty returns true if the ListResult contains no values.
20855func (tldc TopLevelDomainCollection) IsEmpty() bool {
20856	return tldc.Value == nil || len(*tldc.Value) == 0
20857}
20858
20859// hasNextLink returns true if the NextLink is not empty.
20860func (tldc TopLevelDomainCollection) hasNextLink() bool {
20861	return tldc.NextLink != nil && len(*tldc.NextLink) != 0
20862}
20863
20864// topLevelDomainCollectionPreparer prepares a request to retrieve the next set of results.
20865// It returns nil if no more results exist.
20866func (tldc TopLevelDomainCollection) topLevelDomainCollectionPreparer(ctx context.Context) (*http.Request, error) {
20867	if !tldc.hasNextLink() {
20868		return nil, nil
20869	}
20870	return autorest.Prepare((&http.Request{}).WithContext(ctx),
20871		autorest.AsJSON(),
20872		autorest.AsGet(),
20873		autorest.WithBaseURL(to.String(tldc.NextLink)))
20874}
20875
20876// TopLevelDomainCollectionPage contains a page of TopLevelDomain values.
20877type TopLevelDomainCollectionPage struct {
20878	fn   func(context.Context, TopLevelDomainCollection) (TopLevelDomainCollection, error)
20879	tldc TopLevelDomainCollection
20880}
20881
20882// NextWithContext advances to the next page of values.  If there was an error making
20883// the request the page does not advance and the error is returned.
20884func (page *TopLevelDomainCollectionPage) NextWithContext(ctx context.Context) (err error) {
20885	if tracing.IsEnabled() {
20886		ctx = tracing.StartSpan(ctx, fqdn+"/TopLevelDomainCollectionPage.NextWithContext")
20887		defer func() {
20888			sc := -1
20889			if page.Response().Response.Response != nil {
20890				sc = page.Response().Response.Response.StatusCode
20891			}
20892			tracing.EndSpan(ctx, sc, err)
20893		}()
20894	}
20895	for {
20896		next, err := page.fn(ctx, page.tldc)
20897		if err != nil {
20898			return err
20899		}
20900		page.tldc = next
20901		if !next.hasNextLink() || !next.IsEmpty() {
20902			break
20903		}
20904	}
20905	return nil
20906}
20907
20908// Next advances to the next page of values.  If there was an error making
20909// the request the page does not advance and the error is returned.
20910// Deprecated: Use NextWithContext() instead.
20911func (page *TopLevelDomainCollectionPage) Next() error {
20912	return page.NextWithContext(context.Background())
20913}
20914
20915// NotDone returns true if the page enumeration should be started or is not yet complete.
20916func (page TopLevelDomainCollectionPage) NotDone() bool {
20917	return !page.tldc.IsEmpty()
20918}
20919
20920// Response returns the raw server response from the last page request.
20921func (page TopLevelDomainCollectionPage) Response() TopLevelDomainCollection {
20922	return page.tldc
20923}
20924
20925// Values returns the slice of values for the current page or nil if there are no values.
20926func (page TopLevelDomainCollectionPage) Values() []TopLevelDomain {
20927	if page.tldc.IsEmpty() {
20928		return nil
20929	}
20930	return *page.tldc.Value
20931}
20932
20933// Creates a new instance of the TopLevelDomainCollectionPage type.
20934func NewTopLevelDomainCollectionPage(cur TopLevelDomainCollection, getNextPage func(context.Context, TopLevelDomainCollection) (TopLevelDomainCollection, error)) TopLevelDomainCollectionPage {
20935	return TopLevelDomainCollectionPage{
20936		fn:   getNextPage,
20937		tldc: cur,
20938	}
20939}
20940
20941// TopLevelDomainProperties topLevelDomain resource specific properties
20942type TopLevelDomainProperties struct {
20943	// DomainName - READ-ONLY; Name of the top level domain.
20944	DomainName *string `json:"name,omitempty"`
20945	// Privacy - If <code>true</code>, then the top level domain supports domain privacy; otherwise, <code>false</code>.
20946	Privacy *bool `json:"privacy,omitempty"`
20947}
20948
20949// MarshalJSON is the custom marshaler for TopLevelDomainProperties.
20950func (tld TopLevelDomainProperties) MarshalJSON() ([]byte, error) {
20951	objectMap := make(map[string]interface{})
20952	if tld.Privacy != nil {
20953		objectMap["privacy"] = tld.Privacy
20954	}
20955	return json.Marshal(objectMap)
20956}
20957
20958// TriggeredJobHistory triggered Web Job History. List of Triggered Web Job Run Information elements.
20959type TriggeredJobHistory struct {
20960	autorest.Response `json:"-"`
20961	// TriggeredJobHistoryProperties - TriggeredJobHistory resource specific properties
20962	*TriggeredJobHistoryProperties `json:"properties,omitempty"`
20963	// ID - READ-ONLY; Resource Id.
20964	ID *string `json:"id,omitempty"`
20965	// Name - READ-ONLY; Resource Name.
20966	Name *string `json:"name,omitempty"`
20967	// Kind - Kind of resource.
20968	Kind *string `json:"kind,omitempty"`
20969	// Type - READ-ONLY; Resource type.
20970	Type *string `json:"type,omitempty"`
20971}
20972
20973// MarshalJSON is the custom marshaler for TriggeredJobHistory.
20974func (tjh TriggeredJobHistory) MarshalJSON() ([]byte, error) {
20975	objectMap := make(map[string]interface{})
20976	if tjh.TriggeredJobHistoryProperties != nil {
20977		objectMap["properties"] = tjh.TriggeredJobHistoryProperties
20978	}
20979	if tjh.Kind != nil {
20980		objectMap["kind"] = tjh.Kind
20981	}
20982	return json.Marshal(objectMap)
20983}
20984
20985// UnmarshalJSON is the custom unmarshaler for TriggeredJobHistory struct.
20986func (tjh *TriggeredJobHistory) UnmarshalJSON(body []byte) error {
20987	var m map[string]*json.RawMessage
20988	err := json.Unmarshal(body, &m)
20989	if err != nil {
20990		return err
20991	}
20992	for k, v := range m {
20993		switch k {
20994		case "properties":
20995			if v != nil {
20996				var triggeredJobHistoryProperties TriggeredJobHistoryProperties
20997				err = json.Unmarshal(*v, &triggeredJobHistoryProperties)
20998				if err != nil {
20999					return err
21000				}
21001				tjh.TriggeredJobHistoryProperties = &triggeredJobHistoryProperties
21002			}
21003		case "id":
21004			if v != nil {
21005				var ID string
21006				err = json.Unmarshal(*v, &ID)
21007				if err != nil {
21008					return err
21009				}
21010				tjh.ID = &ID
21011			}
21012		case "name":
21013			if v != nil {
21014				var name string
21015				err = json.Unmarshal(*v, &name)
21016				if err != nil {
21017					return err
21018				}
21019				tjh.Name = &name
21020			}
21021		case "kind":
21022			if v != nil {
21023				var kind string
21024				err = json.Unmarshal(*v, &kind)
21025				if err != nil {
21026					return err
21027				}
21028				tjh.Kind = &kind
21029			}
21030		case "type":
21031			if v != nil {
21032				var typeVar string
21033				err = json.Unmarshal(*v, &typeVar)
21034				if err != nil {
21035					return err
21036				}
21037				tjh.Type = &typeVar
21038			}
21039		}
21040	}
21041
21042	return nil
21043}
21044
21045// TriggeredJobHistoryCollection collection of Kudu continuous web job information elements.
21046type TriggeredJobHistoryCollection struct {
21047	autorest.Response `json:"-"`
21048	// Value - Collection of resources.
21049	Value *[]TriggeredJobHistory `json:"value,omitempty"`
21050	// NextLink - READ-ONLY; Link to next page of resources.
21051	NextLink *string `json:"nextLink,omitempty"`
21052}
21053
21054// MarshalJSON is the custom marshaler for TriggeredJobHistoryCollection.
21055func (tjhc TriggeredJobHistoryCollection) MarshalJSON() ([]byte, error) {
21056	objectMap := make(map[string]interface{})
21057	if tjhc.Value != nil {
21058		objectMap["value"] = tjhc.Value
21059	}
21060	return json.Marshal(objectMap)
21061}
21062
21063// TriggeredJobHistoryCollectionIterator provides access to a complete listing of TriggeredJobHistory
21064// values.
21065type TriggeredJobHistoryCollectionIterator struct {
21066	i    int
21067	page TriggeredJobHistoryCollectionPage
21068}
21069
21070// NextWithContext advances to the next value.  If there was an error making
21071// the request the iterator does not advance and the error is returned.
21072func (iter *TriggeredJobHistoryCollectionIterator) NextWithContext(ctx context.Context) (err error) {
21073	if tracing.IsEnabled() {
21074		ctx = tracing.StartSpan(ctx, fqdn+"/TriggeredJobHistoryCollectionIterator.NextWithContext")
21075		defer func() {
21076			sc := -1
21077			if iter.Response().Response.Response != nil {
21078				sc = iter.Response().Response.Response.StatusCode
21079			}
21080			tracing.EndSpan(ctx, sc, err)
21081		}()
21082	}
21083	iter.i++
21084	if iter.i < len(iter.page.Values()) {
21085		return nil
21086	}
21087	err = iter.page.NextWithContext(ctx)
21088	if err != nil {
21089		iter.i--
21090		return err
21091	}
21092	iter.i = 0
21093	return nil
21094}
21095
21096// Next advances to the next value.  If there was an error making
21097// the request the iterator does not advance and the error is returned.
21098// Deprecated: Use NextWithContext() instead.
21099func (iter *TriggeredJobHistoryCollectionIterator) Next() error {
21100	return iter.NextWithContext(context.Background())
21101}
21102
21103// NotDone returns true if the enumeration should be started or is not yet complete.
21104func (iter TriggeredJobHistoryCollectionIterator) NotDone() bool {
21105	return iter.page.NotDone() && iter.i < len(iter.page.Values())
21106}
21107
21108// Response returns the raw server response from the last page request.
21109func (iter TriggeredJobHistoryCollectionIterator) Response() TriggeredJobHistoryCollection {
21110	return iter.page.Response()
21111}
21112
21113// Value returns the current value or a zero-initialized value if the
21114// iterator has advanced beyond the end of the collection.
21115func (iter TriggeredJobHistoryCollectionIterator) Value() TriggeredJobHistory {
21116	if !iter.page.NotDone() {
21117		return TriggeredJobHistory{}
21118	}
21119	return iter.page.Values()[iter.i]
21120}
21121
21122// Creates a new instance of the TriggeredJobHistoryCollectionIterator type.
21123func NewTriggeredJobHistoryCollectionIterator(page TriggeredJobHistoryCollectionPage) TriggeredJobHistoryCollectionIterator {
21124	return TriggeredJobHistoryCollectionIterator{page: page}
21125}
21126
21127// IsEmpty returns true if the ListResult contains no values.
21128func (tjhc TriggeredJobHistoryCollection) IsEmpty() bool {
21129	return tjhc.Value == nil || len(*tjhc.Value) == 0
21130}
21131
21132// hasNextLink returns true if the NextLink is not empty.
21133func (tjhc TriggeredJobHistoryCollection) hasNextLink() bool {
21134	return tjhc.NextLink != nil && len(*tjhc.NextLink) != 0
21135}
21136
21137// triggeredJobHistoryCollectionPreparer prepares a request to retrieve the next set of results.
21138// It returns nil if no more results exist.
21139func (tjhc TriggeredJobHistoryCollection) triggeredJobHistoryCollectionPreparer(ctx context.Context) (*http.Request, error) {
21140	if !tjhc.hasNextLink() {
21141		return nil, nil
21142	}
21143	return autorest.Prepare((&http.Request{}).WithContext(ctx),
21144		autorest.AsJSON(),
21145		autorest.AsGet(),
21146		autorest.WithBaseURL(to.String(tjhc.NextLink)))
21147}
21148
21149// TriggeredJobHistoryCollectionPage contains a page of TriggeredJobHistory values.
21150type TriggeredJobHistoryCollectionPage struct {
21151	fn   func(context.Context, TriggeredJobHistoryCollection) (TriggeredJobHistoryCollection, error)
21152	tjhc TriggeredJobHistoryCollection
21153}
21154
21155// NextWithContext advances to the next page of values.  If there was an error making
21156// the request the page does not advance and the error is returned.
21157func (page *TriggeredJobHistoryCollectionPage) NextWithContext(ctx context.Context) (err error) {
21158	if tracing.IsEnabled() {
21159		ctx = tracing.StartSpan(ctx, fqdn+"/TriggeredJobHistoryCollectionPage.NextWithContext")
21160		defer func() {
21161			sc := -1
21162			if page.Response().Response.Response != nil {
21163				sc = page.Response().Response.Response.StatusCode
21164			}
21165			tracing.EndSpan(ctx, sc, err)
21166		}()
21167	}
21168	for {
21169		next, err := page.fn(ctx, page.tjhc)
21170		if err != nil {
21171			return err
21172		}
21173		page.tjhc = next
21174		if !next.hasNextLink() || !next.IsEmpty() {
21175			break
21176		}
21177	}
21178	return nil
21179}
21180
21181// Next advances to the next page of values.  If there was an error making
21182// the request the page does not advance and the error is returned.
21183// Deprecated: Use NextWithContext() instead.
21184func (page *TriggeredJobHistoryCollectionPage) Next() error {
21185	return page.NextWithContext(context.Background())
21186}
21187
21188// NotDone returns true if the page enumeration should be started or is not yet complete.
21189func (page TriggeredJobHistoryCollectionPage) NotDone() bool {
21190	return !page.tjhc.IsEmpty()
21191}
21192
21193// Response returns the raw server response from the last page request.
21194func (page TriggeredJobHistoryCollectionPage) Response() TriggeredJobHistoryCollection {
21195	return page.tjhc
21196}
21197
21198// Values returns the slice of values for the current page or nil if there are no values.
21199func (page TriggeredJobHistoryCollectionPage) Values() []TriggeredJobHistory {
21200	if page.tjhc.IsEmpty() {
21201		return nil
21202	}
21203	return *page.tjhc.Value
21204}
21205
21206// Creates a new instance of the TriggeredJobHistoryCollectionPage type.
21207func NewTriggeredJobHistoryCollectionPage(cur TriggeredJobHistoryCollection, getNextPage func(context.Context, TriggeredJobHistoryCollection) (TriggeredJobHistoryCollection, error)) TriggeredJobHistoryCollectionPage {
21208	return TriggeredJobHistoryCollectionPage{
21209		fn:   getNextPage,
21210		tjhc: cur,
21211	}
21212}
21213
21214// TriggeredJobHistoryProperties triggeredJobHistory resource specific properties
21215type TriggeredJobHistoryProperties struct {
21216	// TriggeredJobRuns - List of triggered web job runs.
21217	TriggeredJobRuns *[]TriggeredJobRun `json:"triggeredJobRuns,omitempty"`
21218}
21219
21220// TriggeredJobRun triggered Web Job Run Information.
21221type TriggeredJobRun struct {
21222	// TriggeredJobRunProperties - TriggeredJobRun resource specific properties
21223	*TriggeredJobRunProperties `json:"properties,omitempty"`
21224	// ID - READ-ONLY; Resource Id.
21225	ID *string `json:"id,omitempty"`
21226	// Name - READ-ONLY; Resource Name.
21227	Name *string `json:"name,omitempty"`
21228	// Kind - Kind of resource.
21229	Kind *string `json:"kind,omitempty"`
21230	// Type - READ-ONLY; Resource type.
21231	Type *string `json:"type,omitempty"`
21232}
21233
21234// MarshalJSON is the custom marshaler for TriggeredJobRun.
21235func (tjr TriggeredJobRun) MarshalJSON() ([]byte, error) {
21236	objectMap := make(map[string]interface{})
21237	if tjr.TriggeredJobRunProperties != nil {
21238		objectMap["properties"] = tjr.TriggeredJobRunProperties
21239	}
21240	if tjr.Kind != nil {
21241		objectMap["kind"] = tjr.Kind
21242	}
21243	return json.Marshal(objectMap)
21244}
21245
21246// UnmarshalJSON is the custom unmarshaler for TriggeredJobRun struct.
21247func (tjr *TriggeredJobRun) UnmarshalJSON(body []byte) error {
21248	var m map[string]*json.RawMessage
21249	err := json.Unmarshal(body, &m)
21250	if err != nil {
21251		return err
21252	}
21253	for k, v := range m {
21254		switch k {
21255		case "properties":
21256			if v != nil {
21257				var triggeredJobRunProperties TriggeredJobRunProperties
21258				err = json.Unmarshal(*v, &triggeredJobRunProperties)
21259				if err != nil {
21260					return err
21261				}
21262				tjr.TriggeredJobRunProperties = &triggeredJobRunProperties
21263			}
21264		case "id":
21265			if v != nil {
21266				var ID string
21267				err = json.Unmarshal(*v, &ID)
21268				if err != nil {
21269					return err
21270				}
21271				tjr.ID = &ID
21272			}
21273		case "name":
21274			if v != nil {
21275				var name string
21276				err = json.Unmarshal(*v, &name)
21277				if err != nil {
21278					return err
21279				}
21280				tjr.Name = &name
21281			}
21282		case "kind":
21283			if v != nil {
21284				var kind string
21285				err = json.Unmarshal(*v, &kind)
21286				if err != nil {
21287					return err
21288				}
21289				tjr.Kind = &kind
21290			}
21291		case "type":
21292			if v != nil {
21293				var typeVar string
21294				err = json.Unmarshal(*v, &typeVar)
21295				if err != nil {
21296					return err
21297				}
21298				tjr.Type = &typeVar
21299			}
21300		}
21301	}
21302
21303	return nil
21304}
21305
21306// TriggeredJobRunProperties triggeredJobRun resource specific properties
21307type TriggeredJobRunProperties struct {
21308	// ID - Job ID.
21309	ID *string `json:"id,omitempty"`
21310	// Name - READ-ONLY; Job name.
21311	Name *string `json:"name,omitempty"`
21312	// Status - Job status. Possible values include: 'TriggeredWebJobStatusSuccess', 'TriggeredWebJobStatusFailed', 'TriggeredWebJobStatusError'
21313	Status TriggeredWebJobStatus `json:"status,omitempty"`
21314	// StartTime - Start time.
21315	StartTime *date.Time `json:"startTime,omitempty"`
21316	// EndTime - End time.
21317	EndTime *date.Time `json:"endTime,omitempty"`
21318	// Duration - Job duration.
21319	Duration *string `json:"duration,omitempty"`
21320	// OutputURL - Output URL.
21321	OutputURL *string `json:"outputUrl,omitempty"`
21322	// ErrorURL - Error URL.
21323	ErrorURL *string `json:"errorUrl,omitempty"`
21324	// URL - Job URL.
21325	URL *string `json:"url,omitempty"`
21326	// JobName - Job name.
21327	JobName *string `json:"jobName,omitempty"`
21328	// Trigger - Job trigger.
21329	Trigger *string `json:"trigger,omitempty"`
21330}
21331
21332// MarshalJSON is the custom marshaler for TriggeredJobRunProperties.
21333func (tjr TriggeredJobRunProperties) MarshalJSON() ([]byte, error) {
21334	objectMap := make(map[string]interface{})
21335	if tjr.ID != nil {
21336		objectMap["id"] = tjr.ID
21337	}
21338	if tjr.Status != "" {
21339		objectMap["status"] = tjr.Status
21340	}
21341	if tjr.StartTime != nil {
21342		objectMap["startTime"] = tjr.StartTime
21343	}
21344	if tjr.EndTime != nil {
21345		objectMap["endTime"] = tjr.EndTime
21346	}
21347	if tjr.Duration != nil {
21348		objectMap["duration"] = tjr.Duration
21349	}
21350	if tjr.OutputURL != nil {
21351		objectMap["outputUrl"] = tjr.OutputURL
21352	}
21353	if tjr.ErrorURL != nil {
21354		objectMap["errorUrl"] = tjr.ErrorURL
21355	}
21356	if tjr.URL != nil {
21357		objectMap["url"] = tjr.URL
21358	}
21359	if tjr.JobName != nil {
21360		objectMap["jobName"] = tjr.JobName
21361	}
21362	if tjr.Trigger != nil {
21363		objectMap["trigger"] = tjr.Trigger
21364	}
21365	return json.Marshal(objectMap)
21366}
21367
21368// TriggeredWebJob triggered Web Job Information.
21369type TriggeredWebJob struct {
21370	autorest.Response `json:"-"`
21371	// TriggeredWebJobProperties - TriggeredWebJob resource specific properties
21372	*TriggeredWebJobProperties `json:"properties,omitempty"`
21373	// ID - READ-ONLY; Resource Id.
21374	ID *string `json:"id,omitempty"`
21375	// Name - READ-ONLY; Resource Name.
21376	Name *string `json:"name,omitempty"`
21377	// Kind - Kind of resource.
21378	Kind *string `json:"kind,omitempty"`
21379	// Type - READ-ONLY; Resource type.
21380	Type *string `json:"type,omitempty"`
21381}
21382
21383// MarshalJSON is the custom marshaler for TriggeredWebJob.
21384func (twj TriggeredWebJob) MarshalJSON() ([]byte, error) {
21385	objectMap := make(map[string]interface{})
21386	if twj.TriggeredWebJobProperties != nil {
21387		objectMap["properties"] = twj.TriggeredWebJobProperties
21388	}
21389	if twj.Kind != nil {
21390		objectMap["kind"] = twj.Kind
21391	}
21392	return json.Marshal(objectMap)
21393}
21394
21395// UnmarshalJSON is the custom unmarshaler for TriggeredWebJob struct.
21396func (twj *TriggeredWebJob) UnmarshalJSON(body []byte) error {
21397	var m map[string]*json.RawMessage
21398	err := json.Unmarshal(body, &m)
21399	if err != nil {
21400		return err
21401	}
21402	for k, v := range m {
21403		switch k {
21404		case "properties":
21405			if v != nil {
21406				var triggeredWebJobProperties TriggeredWebJobProperties
21407				err = json.Unmarshal(*v, &triggeredWebJobProperties)
21408				if err != nil {
21409					return err
21410				}
21411				twj.TriggeredWebJobProperties = &triggeredWebJobProperties
21412			}
21413		case "id":
21414			if v != nil {
21415				var ID string
21416				err = json.Unmarshal(*v, &ID)
21417				if err != nil {
21418					return err
21419				}
21420				twj.ID = &ID
21421			}
21422		case "name":
21423			if v != nil {
21424				var name string
21425				err = json.Unmarshal(*v, &name)
21426				if err != nil {
21427					return err
21428				}
21429				twj.Name = &name
21430			}
21431		case "kind":
21432			if v != nil {
21433				var kind string
21434				err = json.Unmarshal(*v, &kind)
21435				if err != nil {
21436					return err
21437				}
21438				twj.Kind = &kind
21439			}
21440		case "type":
21441			if v != nil {
21442				var typeVar string
21443				err = json.Unmarshal(*v, &typeVar)
21444				if err != nil {
21445					return err
21446				}
21447				twj.Type = &typeVar
21448			}
21449		}
21450	}
21451
21452	return nil
21453}
21454
21455// TriggeredWebJobCollection collection of Kudu continuous web job information elements.
21456type TriggeredWebJobCollection struct {
21457	autorest.Response `json:"-"`
21458	// Value - Collection of resources.
21459	Value *[]TriggeredWebJob `json:"value,omitempty"`
21460	// NextLink - READ-ONLY; Link to next page of resources.
21461	NextLink *string `json:"nextLink,omitempty"`
21462}
21463
21464// MarshalJSON is the custom marshaler for TriggeredWebJobCollection.
21465func (twjc TriggeredWebJobCollection) MarshalJSON() ([]byte, error) {
21466	objectMap := make(map[string]interface{})
21467	if twjc.Value != nil {
21468		objectMap["value"] = twjc.Value
21469	}
21470	return json.Marshal(objectMap)
21471}
21472
21473// TriggeredWebJobCollectionIterator provides access to a complete listing of TriggeredWebJob values.
21474type TriggeredWebJobCollectionIterator struct {
21475	i    int
21476	page TriggeredWebJobCollectionPage
21477}
21478
21479// NextWithContext advances to the next value.  If there was an error making
21480// the request the iterator does not advance and the error is returned.
21481func (iter *TriggeredWebJobCollectionIterator) NextWithContext(ctx context.Context) (err error) {
21482	if tracing.IsEnabled() {
21483		ctx = tracing.StartSpan(ctx, fqdn+"/TriggeredWebJobCollectionIterator.NextWithContext")
21484		defer func() {
21485			sc := -1
21486			if iter.Response().Response.Response != nil {
21487				sc = iter.Response().Response.Response.StatusCode
21488			}
21489			tracing.EndSpan(ctx, sc, err)
21490		}()
21491	}
21492	iter.i++
21493	if iter.i < len(iter.page.Values()) {
21494		return nil
21495	}
21496	err = iter.page.NextWithContext(ctx)
21497	if err != nil {
21498		iter.i--
21499		return err
21500	}
21501	iter.i = 0
21502	return nil
21503}
21504
21505// Next advances to the next value.  If there was an error making
21506// the request the iterator does not advance and the error is returned.
21507// Deprecated: Use NextWithContext() instead.
21508func (iter *TriggeredWebJobCollectionIterator) Next() error {
21509	return iter.NextWithContext(context.Background())
21510}
21511
21512// NotDone returns true if the enumeration should be started or is not yet complete.
21513func (iter TriggeredWebJobCollectionIterator) NotDone() bool {
21514	return iter.page.NotDone() && iter.i < len(iter.page.Values())
21515}
21516
21517// Response returns the raw server response from the last page request.
21518func (iter TriggeredWebJobCollectionIterator) Response() TriggeredWebJobCollection {
21519	return iter.page.Response()
21520}
21521
21522// Value returns the current value or a zero-initialized value if the
21523// iterator has advanced beyond the end of the collection.
21524func (iter TriggeredWebJobCollectionIterator) Value() TriggeredWebJob {
21525	if !iter.page.NotDone() {
21526		return TriggeredWebJob{}
21527	}
21528	return iter.page.Values()[iter.i]
21529}
21530
21531// Creates a new instance of the TriggeredWebJobCollectionIterator type.
21532func NewTriggeredWebJobCollectionIterator(page TriggeredWebJobCollectionPage) TriggeredWebJobCollectionIterator {
21533	return TriggeredWebJobCollectionIterator{page: page}
21534}
21535
21536// IsEmpty returns true if the ListResult contains no values.
21537func (twjc TriggeredWebJobCollection) IsEmpty() bool {
21538	return twjc.Value == nil || len(*twjc.Value) == 0
21539}
21540
21541// hasNextLink returns true if the NextLink is not empty.
21542func (twjc TriggeredWebJobCollection) hasNextLink() bool {
21543	return twjc.NextLink != nil && len(*twjc.NextLink) != 0
21544}
21545
21546// triggeredWebJobCollectionPreparer prepares a request to retrieve the next set of results.
21547// It returns nil if no more results exist.
21548func (twjc TriggeredWebJobCollection) triggeredWebJobCollectionPreparer(ctx context.Context) (*http.Request, error) {
21549	if !twjc.hasNextLink() {
21550		return nil, nil
21551	}
21552	return autorest.Prepare((&http.Request{}).WithContext(ctx),
21553		autorest.AsJSON(),
21554		autorest.AsGet(),
21555		autorest.WithBaseURL(to.String(twjc.NextLink)))
21556}
21557
21558// TriggeredWebJobCollectionPage contains a page of TriggeredWebJob values.
21559type TriggeredWebJobCollectionPage struct {
21560	fn   func(context.Context, TriggeredWebJobCollection) (TriggeredWebJobCollection, error)
21561	twjc TriggeredWebJobCollection
21562}
21563
21564// NextWithContext advances to the next page of values.  If there was an error making
21565// the request the page does not advance and the error is returned.
21566func (page *TriggeredWebJobCollectionPage) NextWithContext(ctx context.Context) (err error) {
21567	if tracing.IsEnabled() {
21568		ctx = tracing.StartSpan(ctx, fqdn+"/TriggeredWebJobCollectionPage.NextWithContext")
21569		defer func() {
21570			sc := -1
21571			if page.Response().Response.Response != nil {
21572				sc = page.Response().Response.Response.StatusCode
21573			}
21574			tracing.EndSpan(ctx, sc, err)
21575		}()
21576	}
21577	for {
21578		next, err := page.fn(ctx, page.twjc)
21579		if err != nil {
21580			return err
21581		}
21582		page.twjc = next
21583		if !next.hasNextLink() || !next.IsEmpty() {
21584			break
21585		}
21586	}
21587	return nil
21588}
21589
21590// Next advances to the next page of values.  If there was an error making
21591// the request the page does not advance and the error is returned.
21592// Deprecated: Use NextWithContext() instead.
21593func (page *TriggeredWebJobCollectionPage) Next() error {
21594	return page.NextWithContext(context.Background())
21595}
21596
21597// NotDone returns true if the page enumeration should be started or is not yet complete.
21598func (page TriggeredWebJobCollectionPage) NotDone() bool {
21599	return !page.twjc.IsEmpty()
21600}
21601
21602// Response returns the raw server response from the last page request.
21603func (page TriggeredWebJobCollectionPage) Response() TriggeredWebJobCollection {
21604	return page.twjc
21605}
21606
21607// Values returns the slice of values for the current page or nil if there are no values.
21608func (page TriggeredWebJobCollectionPage) Values() []TriggeredWebJob {
21609	if page.twjc.IsEmpty() {
21610		return nil
21611	}
21612	return *page.twjc.Value
21613}
21614
21615// Creates a new instance of the TriggeredWebJobCollectionPage type.
21616func NewTriggeredWebJobCollectionPage(cur TriggeredWebJobCollection, getNextPage func(context.Context, TriggeredWebJobCollection) (TriggeredWebJobCollection, error)) TriggeredWebJobCollectionPage {
21617	return TriggeredWebJobCollectionPage{
21618		fn:   getNextPage,
21619		twjc: cur,
21620	}
21621}
21622
21623// TriggeredWebJobProperties triggeredWebJob resource specific properties
21624type TriggeredWebJobProperties struct {
21625	// LatestRun - Latest job run information.
21626	LatestRun *TriggeredJobRun `json:"latestRun,omitempty"`
21627	// HistoryURL - History URL.
21628	HistoryURL *string `json:"historyUrl,omitempty"`
21629	// SchedulerLogsURL - Scheduler Logs URL.
21630	SchedulerLogsURL *string `json:"schedulerLogsUrl,omitempty"`
21631	// Name - READ-ONLY; Job name. Used as job identifier in ARM resource URI.
21632	Name *string `json:"name,omitempty"`
21633	// RunCommand - Run command.
21634	RunCommand *string `json:"runCommand,omitempty"`
21635	// URL - Job URL.
21636	URL *string `json:"url,omitempty"`
21637	// ExtraInfoURL - Extra Info URL.
21638	ExtraInfoURL *string `json:"extraInfoUrl,omitempty"`
21639	// JobType - Job type. Possible values include: 'Continuous', 'Triggered'
21640	JobType JobType `json:"jobType,omitempty"`
21641	// Error - Error information.
21642	Error *string `json:"error,omitempty"`
21643	// UsingSdk - Using SDK?
21644	UsingSdk *bool `json:"usingSdk,omitempty"`
21645	// Settings - Job settings.
21646	Settings map[string]interface{} `json:"settings"`
21647}
21648
21649// MarshalJSON is the custom marshaler for TriggeredWebJobProperties.
21650func (twj TriggeredWebJobProperties) MarshalJSON() ([]byte, error) {
21651	objectMap := make(map[string]interface{})
21652	if twj.LatestRun != nil {
21653		objectMap["latestRun"] = twj.LatestRun
21654	}
21655	if twj.HistoryURL != nil {
21656		objectMap["historyUrl"] = twj.HistoryURL
21657	}
21658	if twj.SchedulerLogsURL != nil {
21659		objectMap["schedulerLogsUrl"] = twj.SchedulerLogsURL
21660	}
21661	if twj.RunCommand != nil {
21662		objectMap["runCommand"] = twj.RunCommand
21663	}
21664	if twj.URL != nil {
21665		objectMap["url"] = twj.URL
21666	}
21667	if twj.ExtraInfoURL != nil {
21668		objectMap["extraInfoUrl"] = twj.ExtraInfoURL
21669	}
21670	if twj.JobType != "" {
21671		objectMap["jobType"] = twj.JobType
21672	}
21673	if twj.Error != nil {
21674		objectMap["error"] = twj.Error
21675	}
21676	if twj.UsingSdk != nil {
21677		objectMap["usingSdk"] = twj.UsingSdk
21678	}
21679	if twj.Settings != nil {
21680		objectMap["settings"] = twj.Settings
21681	}
21682	return json.Marshal(objectMap)
21683}
21684
21685// Usage usage of the quota resource.
21686type Usage struct {
21687	// UsageProperties - Usage resource specific properties
21688	*UsageProperties `json:"properties,omitempty"`
21689	// ID - READ-ONLY; Resource Id.
21690	ID *string `json:"id,omitempty"`
21691	// Name - READ-ONLY; Resource Name.
21692	Name *string `json:"name,omitempty"`
21693	// Kind - Kind of resource.
21694	Kind *string `json:"kind,omitempty"`
21695	// Type - READ-ONLY; Resource type.
21696	Type *string `json:"type,omitempty"`
21697}
21698
21699// MarshalJSON is the custom marshaler for Usage.
21700func (u Usage) MarshalJSON() ([]byte, error) {
21701	objectMap := make(map[string]interface{})
21702	if u.UsageProperties != nil {
21703		objectMap["properties"] = u.UsageProperties
21704	}
21705	if u.Kind != nil {
21706		objectMap["kind"] = u.Kind
21707	}
21708	return json.Marshal(objectMap)
21709}
21710
21711// UnmarshalJSON is the custom unmarshaler for Usage struct.
21712func (u *Usage) UnmarshalJSON(body []byte) error {
21713	var m map[string]*json.RawMessage
21714	err := json.Unmarshal(body, &m)
21715	if err != nil {
21716		return err
21717	}
21718	for k, v := range m {
21719		switch k {
21720		case "properties":
21721			if v != nil {
21722				var usageProperties UsageProperties
21723				err = json.Unmarshal(*v, &usageProperties)
21724				if err != nil {
21725					return err
21726				}
21727				u.UsageProperties = &usageProperties
21728			}
21729		case "id":
21730			if v != nil {
21731				var ID string
21732				err = json.Unmarshal(*v, &ID)
21733				if err != nil {
21734					return err
21735				}
21736				u.ID = &ID
21737			}
21738		case "name":
21739			if v != nil {
21740				var name string
21741				err = json.Unmarshal(*v, &name)
21742				if err != nil {
21743					return err
21744				}
21745				u.Name = &name
21746			}
21747		case "kind":
21748			if v != nil {
21749				var kind string
21750				err = json.Unmarshal(*v, &kind)
21751				if err != nil {
21752					return err
21753				}
21754				u.Kind = &kind
21755			}
21756		case "type":
21757			if v != nil {
21758				var typeVar string
21759				err = json.Unmarshal(*v, &typeVar)
21760				if err != nil {
21761					return err
21762				}
21763				u.Type = &typeVar
21764			}
21765		}
21766	}
21767
21768	return nil
21769}
21770
21771// UsageCollection collection of usages.
21772type UsageCollection struct {
21773	autorest.Response `json:"-"`
21774	// Value - Collection of resources.
21775	Value *[]Usage `json:"value,omitempty"`
21776	// NextLink - READ-ONLY; Link to next page of resources.
21777	NextLink *string `json:"nextLink,omitempty"`
21778}
21779
21780// MarshalJSON is the custom marshaler for UsageCollection.
21781func (uc UsageCollection) MarshalJSON() ([]byte, error) {
21782	objectMap := make(map[string]interface{})
21783	if uc.Value != nil {
21784		objectMap["value"] = uc.Value
21785	}
21786	return json.Marshal(objectMap)
21787}
21788
21789// UsageCollectionIterator provides access to a complete listing of Usage values.
21790type UsageCollectionIterator struct {
21791	i    int
21792	page UsageCollectionPage
21793}
21794
21795// NextWithContext advances to the next value.  If there was an error making
21796// the request the iterator does not advance and the error is returned.
21797func (iter *UsageCollectionIterator) NextWithContext(ctx context.Context) (err error) {
21798	if tracing.IsEnabled() {
21799		ctx = tracing.StartSpan(ctx, fqdn+"/UsageCollectionIterator.NextWithContext")
21800		defer func() {
21801			sc := -1
21802			if iter.Response().Response.Response != nil {
21803				sc = iter.Response().Response.Response.StatusCode
21804			}
21805			tracing.EndSpan(ctx, sc, err)
21806		}()
21807	}
21808	iter.i++
21809	if iter.i < len(iter.page.Values()) {
21810		return nil
21811	}
21812	err = iter.page.NextWithContext(ctx)
21813	if err != nil {
21814		iter.i--
21815		return err
21816	}
21817	iter.i = 0
21818	return nil
21819}
21820
21821// Next advances to the next value.  If there was an error making
21822// the request the iterator does not advance and the error is returned.
21823// Deprecated: Use NextWithContext() instead.
21824func (iter *UsageCollectionIterator) Next() error {
21825	return iter.NextWithContext(context.Background())
21826}
21827
21828// NotDone returns true if the enumeration should be started or is not yet complete.
21829func (iter UsageCollectionIterator) NotDone() bool {
21830	return iter.page.NotDone() && iter.i < len(iter.page.Values())
21831}
21832
21833// Response returns the raw server response from the last page request.
21834func (iter UsageCollectionIterator) Response() UsageCollection {
21835	return iter.page.Response()
21836}
21837
21838// Value returns the current value or a zero-initialized value if the
21839// iterator has advanced beyond the end of the collection.
21840func (iter UsageCollectionIterator) Value() Usage {
21841	if !iter.page.NotDone() {
21842		return Usage{}
21843	}
21844	return iter.page.Values()[iter.i]
21845}
21846
21847// Creates a new instance of the UsageCollectionIterator type.
21848func NewUsageCollectionIterator(page UsageCollectionPage) UsageCollectionIterator {
21849	return UsageCollectionIterator{page: page}
21850}
21851
21852// IsEmpty returns true if the ListResult contains no values.
21853func (uc UsageCollection) IsEmpty() bool {
21854	return uc.Value == nil || len(*uc.Value) == 0
21855}
21856
21857// hasNextLink returns true if the NextLink is not empty.
21858func (uc UsageCollection) hasNextLink() bool {
21859	return uc.NextLink != nil && len(*uc.NextLink) != 0
21860}
21861
21862// usageCollectionPreparer prepares a request to retrieve the next set of results.
21863// It returns nil if no more results exist.
21864func (uc UsageCollection) usageCollectionPreparer(ctx context.Context) (*http.Request, error) {
21865	if !uc.hasNextLink() {
21866		return nil, nil
21867	}
21868	return autorest.Prepare((&http.Request{}).WithContext(ctx),
21869		autorest.AsJSON(),
21870		autorest.AsGet(),
21871		autorest.WithBaseURL(to.String(uc.NextLink)))
21872}
21873
21874// UsageCollectionPage contains a page of Usage values.
21875type UsageCollectionPage struct {
21876	fn func(context.Context, UsageCollection) (UsageCollection, error)
21877	uc UsageCollection
21878}
21879
21880// NextWithContext advances to the next page of values.  If there was an error making
21881// the request the page does not advance and the error is returned.
21882func (page *UsageCollectionPage) NextWithContext(ctx context.Context) (err error) {
21883	if tracing.IsEnabled() {
21884		ctx = tracing.StartSpan(ctx, fqdn+"/UsageCollectionPage.NextWithContext")
21885		defer func() {
21886			sc := -1
21887			if page.Response().Response.Response != nil {
21888				sc = page.Response().Response.Response.StatusCode
21889			}
21890			tracing.EndSpan(ctx, sc, err)
21891		}()
21892	}
21893	for {
21894		next, err := page.fn(ctx, page.uc)
21895		if err != nil {
21896			return err
21897		}
21898		page.uc = next
21899		if !next.hasNextLink() || !next.IsEmpty() {
21900			break
21901		}
21902	}
21903	return nil
21904}
21905
21906// Next advances to the next page of values.  If there was an error making
21907// the request the page does not advance and the error is returned.
21908// Deprecated: Use NextWithContext() instead.
21909func (page *UsageCollectionPage) Next() error {
21910	return page.NextWithContext(context.Background())
21911}
21912
21913// NotDone returns true if the page enumeration should be started or is not yet complete.
21914func (page UsageCollectionPage) NotDone() bool {
21915	return !page.uc.IsEmpty()
21916}
21917
21918// Response returns the raw server response from the last page request.
21919func (page UsageCollectionPage) Response() UsageCollection {
21920	return page.uc
21921}
21922
21923// Values returns the slice of values for the current page or nil if there are no values.
21924func (page UsageCollectionPage) Values() []Usage {
21925	if page.uc.IsEmpty() {
21926		return nil
21927	}
21928	return *page.uc.Value
21929}
21930
21931// Creates a new instance of the UsageCollectionPage type.
21932func NewUsageCollectionPage(cur UsageCollection, getNextPage func(context.Context, UsageCollection) (UsageCollection, error)) UsageCollectionPage {
21933	return UsageCollectionPage{
21934		fn: getNextPage,
21935		uc: cur,
21936	}
21937}
21938
21939// UsageProperties usage resource specific properties
21940type UsageProperties struct {
21941	// DisplayName - READ-ONLY; Friendly name shown in the UI.
21942	DisplayName *string `json:"displayName,omitempty"`
21943	// Name - READ-ONLY; Name of the quota.
21944	Name *string `json:"name,omitempty"`
21945	// ResourceName - READ-ONLY; Name of the quota resource.
21946	ResourceName *string `json:"resourceName,omitempty"`
21947	// Unit - READ-ONLY; Units of measurement for the quota resource.
21948	Unit *string `json:"unit,omitempty"`
21949	// CurrentValue - READ-ONLY; The current value of the resource counter.
21950	CurrentValue *int64 `json:"currentValue,omitempty"`
21951	// Limit - READ-ONLY; The resource limit.
21952	Limit *int64 `json:"limit,omitempty"`
21953	// NextResetTime - READ-ONLY; Next reset time for the resource counter.
21954	NextResetTime *date.Time `json:"nextResetTime,omitempty"`
21955	// ComputeMode - READ-ONLY; Compute mode used for this usage. Possible values include: 'ComputeModeOptionsShared', 'ComputeModeOptionsDedicated', 'ComputeModeOptionsDynamic'
21956	ComputeMode ComputeModeOptions `json:"computeMode,omitempty"`
21957	// SiteMode - READ-ONLY; Site mode used for this usage.
21958	SiteMode *string `json:"siteMode,omitempty"`
21959}
21960
21961// MarshalJSON is the custom marshaler for UsageProperties.
21962func (u UsageProperties) MarshalJSON() ([]byte, error) {
21963	objectMap := make(map[string]interface{})
21964	return json.Marshal(objectMap)
21965}
21966
21967// User user credentials used for publishing activity.
21968type User struct {
21969	autorest.Response `json:"-"`
21970	// UserProperties - User resource specific properties
21971	*UserProperties `json:"properties,omitempty"`
21972	// ID - READ-ONLY; Resource Id.
21973	ID *string `json:"id,omitempty"`
21974	// Name - READ-ONLY; Resource Name.
21975	Name *string `json:"name,omitempty"`
21976	// Kind - Kind of resource.
21977	Kind *string `json:"kind,omitempty"`
21978	// Type - READ-ONLY; Resource type.
21979	Type *string `json:"type,omitempty"`
21980}
21981
21982// MarshalJSON is the custom marshaler for User.
21983func (u User) MarshalJSON() ([]byte, error) {
21984	objectMap := make(map[string]interface{})
21985	if u.UserProperties != nil {
21986		objectMap["properties"] = u.UserProperties
21987	}
21988	if u.Kind != nil {
21989		objectMap["kind"] = u.Kind
21990	}
21991	return json.Marshal(objectMap)
21992}
21993
21994// UnmarshalJSON is the custom unmarshaler for User struct.
21995func (u *User) UnmarshalJSON(body []byte) error {
21996	var m map[string]*json.RawMessage
21997	err := json.Unmarshal(body, &m)
21998	if err != nil {
21999		return err
22000	}
22001	for k, v := range m {
22002		switch k {
22003		case "properties":
22004			if v != nil {
22005				var userProperties UserProperties
22006				err = json.Unmarshal(*v, &userProperties)
22007				if err != nil {
22008					return err
22009				}
22010				u.UserProperties = &userProperties
22011			}
22012		case "id":
22013			if v != nil {
22014				var ID string
22015				err = json.Unmarshal(*v, &ID)
22016				if err != nil {
22017					return err
22018				}
22019				u.ID = &ID
22020			}
22021		case "name":
22022			if v != nil {
22023				var name string
22024				err = json.Unmarshal(*v, &name)
22025				if err != nil {
22026					return err
22027				}
22028				u.Name = &name
22029			}
22030		case "kind":
22031			if v != nil {
22032				var kind string
22033				err = json.Unmarshal(*v, &kind)
22034				if err != nil {
22035					return err
22036				}
22037				u.Kind = &kind
22038			}
22039		case "type":
22040			if v != nil {
22041				var typeVar string
22042				err = json.Unmarshal(*v, &typeVar)
22043				if err != nil {
22044					return err
22045				}
22046				u.Type = &typeVar
22047			}
22048		}
22049	}
22050
22051	return nil
22052}
22053
22054// UserProperties user resource specific properties
22055type UserProperties struct {
22056	// UserName - Username
22057	UserName *string `json:"name,omitempty"`
22058	// PublishingUserName - Username used for publishing.
22059	PublishingUserName *string `json:"publishingUserName,omitempty"`
22060	// PublishingPassword - Password used for publishing.
22061	PublishingPassword *string `json:"publishingPassword,omitempty"`
22062	// PublishingPasswordHash - Password hash used for publishing.
22063	PublishingPasswordHash *string `json:"publishingPasswordHash,omitempty"`
22064	// PublishingPasswordHashSalt - Password hash salt used for publishing.
22065	PublishingPasswordHashSalt *string `json:"publishingPasswordHashSalt,omitempty"`
22066}
22067
22068// ValidateProperties app properties used for validation.
22069type ValidateProperties struct {
22070	// ServerFarmID - ARM resource ID of an App Service plan that would host the app.
22071	ServerFarmID *string `json:"serverFarmId,omitempty"`
22072	// SkuName - Name of the target SKU for the App Service plan.
22073	SkuName *string `json:"skuName,omitempty"`
22074	// NeedLinuxWorkers - <code>true</code> if App Service plan is for Linux workers; otherwise, <code>false</code>.
22075	NeedLinuxWorkers *bool `json:"needLinuxWorkers,omitempty"`
22076	// IsSpot - <code>true</code> if App Service plan is for Spot instances; otherwise, <code>false</code>.
22077	IsSpot *bool `json:"isSpot,omitempty"`
22078	// Capacity - Target capacity of the App Service plan (number of VMs).
22079	Capacity *int32 `json:"capacity,omitempty"`
22080	// HostingEnvironment - Name of App Service Environment where app or App Service plan should be created.
22081	HostingEnvironment *string `json:"hostingEnvironment,omitempty"`
22082}
22083
22084// ValidateRequest resource validation request content.
22085type ValidateRequest struct {
22086	// Name - Resource name to verify.
22087	Name *string `json:"name,omitempty"`
22088	// Type - Resource type used for verification. Possible values include: 'ValidateResourceTypesServerFarm', 'ValidateResourceTypesSite'
22089	Type ValidateResourceTypes `json:"type,omitempty"`
22090	// Location - Expected location of the resource.
22091	Location *string `json:"location,omitempty"`
22092	// ValidateProperties - Properties of the resource to validate.
22093	*ValidateProperties `json:"properties,omitempty"`
22094}
22095
22096// MarshalJSON is the custom marshaler for ValidateRequest.
22097func (vr ValidateRequest) MarshalJSON() ([]byte, error) {
22098	objectMap := make(map[string]interface{})
22099	if vr.Name != nil {
22100		objectMap["name"] = vr.Name
22101	}
22102	if vr.Type != "" {
22103		objectMap["type"] = vr.Type
22104	}
22105	if vr.Location != nil {
22106		objectMap["location"] = vr.Location
22107	}
22108	if vr.ValidateProperties != nil {
22109		objectMap["properties"] = vr.ValidateProperties
22110	}
22111	return json.Marshal(objectMap)
22112}
22113
22114// UnmarshalJSON is the custom unmarshaler for ValidateRequest struct.
22115func (vr *ValidateRequest) UnmarshalJSON(body []byte) error {
22116	var m map[string]*json.RawMessage
22117	err := json.Unmarshal(body, &m)
22118	if err != nil {
22119		return err
22120	}
22121	for k, v := range m {
22122		switch k {
22123		case "name":
22124			if v != nil {
22125				var name string
22126				err = json.Unmarshal(*v, &name)
22127				if err != nil {
22128					return err
22129				}
22130				vr.Name = &name
22131			}
22132		case "type":
22133			if v != nil {
22134				var typeVar ValidateResourceTypes
22135				err = json.Unmarshal(*v, &typeVar)
22136				if err != nil {
22137					return err
22138				}
22139				vr.Type = typeVar
22140			}
22141		case "location":
22142			if v != nil {
22143				var location string
22144				err = json.Unmarshal(*v, &location)
22145				if err != nil {
22146					return err
22147				}
22148				vr.Location = &location
22149			}
22150		case "properties":
22151			if v != nil {
22152				var validateProperties ValidateProperties
22153				err = json.Unmarshal(*v, &validateProperties)
22154				if err != nil {
22155					return err
22156				}
22157				vr.ValidateProperties = &validateProperties
22158			}
22159		}
22160	}
22161
22162	return nil
22163}
22164
22165// ValidateResponse describes the result of resource validation.
22166type ValidateResponse struct {
22167	autorest.Response `json:"-"`
22168	// Status - Result of validation.
22169	Status *string `json:"status,omitempty"`
22170	// Error - Error details for the case when validation fails.
22171	Error *ValidateResponseError `json:"error,omitempty"`
22172}
22173
22174// ValidateResponseError error details for when validation fails.
22175type ValidateResponseError struct {
22176	// Code - Validation error code.
22177	Code *string `json:"code,omitempty"`
22178	// Message - Validation error message.
22179	Message *string `json:"message,omitempty"`
22180}
22181
22182// VirtualApplication virtual application in an app.
22183type VirtualApplication struct {
22184	// VirtualPath - Virtual path.
22185	VirtualPath *string `json:"virtualPath,omitempty"`
22186	// PhysicalPath - Physical path.
22187	PhysicalPath *string `json:"physicalPath,omitempty"`
22188	// PreloadEnabled - <code>true</code> if preloading is enabled; otherwise, <code>false</code>.
22189	PreloadEnabled *bool `json:"preloadEnabled,omitempty"`
22190	// VirtualDirectories - Virtual directories for virtual application.
22191	VirtualDirectories *[]VirtualDirectory `json:"virtualDirectories,omitempty"`
22192}
22193
22194// VirtualDirectory directory for virtual application.
22195type VirtualDirectory struct {
22196	// VirtualPath - Path to virtual application.
22197	VirtualPath *string `json:"virtualPath,omitempty"`
22198	// PhysicalPath - Physical path.
22199	PhysicalPath *string `json:"physicalPath,omitempty"`
22200}
22201
22202// VirtualIPMapping virtual IP mapping.
22203type VirtualIPMapping struct {
22204	// VirtualIP - Virtual IP address.
22205	VirtualIP *string `json:"virtualIP,omitempty"`
22206	// InternalHTTPPort - Internal HTTP port.
22207	InternalHTTPPort *int32 `json:"internalHttpPort,omitempty"`
22208	// InternalHTTPSPort - Internal HTTPS port.
22209	InternalHTTPSPort *int32 `json:"internalHttpsPort,omitempty"`
22210	// InUse - Is virtual IP mapping in use.
22211	InUse *bool `json:"inUse,omitempty"`
22212}
22213
22214// VirtualNetworkProfile specification for using a Virtual Network.
22215type VirtualNetworkProfile struct {
22216	// ID - Resource id of the Virtual Network.
22217	ID *string `json:"id,omitempty"`
22218	// Name - READ-ONLY; Name of the Virtual Network (read-only).
22219	Name *string `json:"name,omitempty"`
22220	// Type - READ-ONLY; Resource type of the Virtual Network (read-only).
22221	Type *string `json:"type,omitempty"`
22222	// Subnet - Subnet within the Virtual Network.
22223	Subnet *string `json:"subnet,omitempty"`
22224}
22225
22226// MarshalJSON is the custom marshaler for VirtualNetworkProfile.
22227func (vnp VirtualNetworkProfile) MarshalJSON() ([]byte, error) {
22228	objectMap := make(map[string]interface{})
22229	if vnp.ID != nil {
22230		objectMap["id"] = vnp.ID
22231	}
22232	if vnp.Subnet != nil {
22233		objectMap["subnet"] = vnp.Subnet
22234	}
22235	return json.Marshal(objectMap)
22236}
22237
22238// VnetGateway the Virtual Network gateway contract. This is used to give the Virtual Network gateway
22239// access to the VPN package.
22240type VnetGateway struct {
22241	autorest.Response `json:"-"`
22242	// VnetGatewayProperties - VnetGateway resource specific properties
22243	*VnetGatewayProperties `json:"properties,omitempty"`
22244	// ID - READ-ONLY; Resource Id.
22245	ID *string `json:"id,omitempty"`
22246	// Name - READ-ONLY; Resource Name.
22247	Name *string `json:"name,omitempty"`
22248	// Kind - Kind of resource.
22249	Kind *string `json:"kind,omitempty"`
22250	// Type - READ-ONLY; Resource type.
22251	Type *string `json:"type,omitempty"`
22252}
22253
22254// MarshalJSON is the custom marshaler for VnetGateway.
22255func (vg VnetGateway) MarshalJSON() ([]byte, error) {
22256	objectMap := make(map[string]interface{})
22257	if vg.VnetGatewayProperties != nil {
22258		objectMap["properties"] = vg.VnetGatewayProperties
22259	}
22260	if vg.Kind != nil {
22261		objectMap["kind"] = vg.Kind
22262	}
22263	return json.Marshal(objectMap)
22264}
22265
22266// UnmarshalJSON is the custom unmarshaler for VnetGateway struct.
22267func (vg *VnetGateway) UnmarshalJSON(body []byte) error {
22268	var m map[string]*json.RawMessage
22269	err := json.Unmarshal(body, &m)
22270	if err != nil {
22271		return err
22272	}
22273	for k, v := range m {
22274		switch k {
22275		case "properties":
22276			if v != nil {
22277				var vnetGatewayProperties VnetGatewayProperties
22278				err = json.Unmarshal(*v, &vnetGatewayProperties)
22279				if err != nil {
22280					return err
22281				}
22282				vg.VnetGatewayProperties = &vnetGatewayProperties
22283			}
22284		case "id":
22285			if v != nil {
22286				var ID string
22287				err = json.Unmarshal(*v, &ID)
22288				if err != nil {
22289					return err
22290				}
22291				vg.ID = &ID
22292			}
22293		case "name":
22294			if v != nil {
22295				var name string
22296				err = json.Unmarshal(*v, &name)
22297				if err != nil {
22298					return err
22299				}
22300				vg.Name = &name
22301			}
22302		case "kind":
22303			if v != nil {
22304				var kind string
22305				err = json.Unmarshal(*v, &kind)
22306				if err != nil {
22307					return err
22308				}
22309				vg.Kind = &kind
22310			}
22311		case "type":
22312			if v != nil {
22313				var typeVar string
22314				err = json.Unmarshal(*v, &typeVar)
22315				if err != nil {
22316					return err
22317				}
22318				vg.Type = &typeVar
22319			}
22320		}
22321	}
22322
22323	return nil
22324}
22325
22326// VnetGatewayProperties vnetGateway resource specific properties
22327type VnetGatewayProperties struct {
22328	// VnetName - The Virtual Network name.
22329	VnetName *string `json:"vnetName,omitempty"`
22330	// VpnPackageURI - The URI where the VPN package can be downloaded.
22331	VpnPackageURI *string `json:"vpnPackageUri,omitempty"`
22332}
22333
22334// VnetInfo virtual Network information contract.
22335type VnetInfo struct {
22336	autorest.Response `json:"-"`
22337	// VnetInfoProperties - VnetInfo resource specific properties
22338	*VnetInfoProperties `json:"properties,omitempty"`
22339	// ID - READ-ONLY; Resource Id.
22340	ID *string `json:"id,omitempty"`
22341	// Name - READ-ONLY; Resource Name.
22342	Name *string `json:"name,omitempty"`
22343	// Kind - Kind of resource.
22344	Kind *string `json:"kind,omitempty"`
22345	// Type - READ-ONLY; Resource type.
22346	Type *string `json:"type,omitempty"`
22347}
22348
22349// MarshalJSON is the custom marshaler for VnetInfo.
22350func (vi VnetInfo) MarshalJSON() ([]byte, error) {
22351	objectMap := make(map[string]interface{})
22352	if vi.VnetInfoProperties != nil {
22353		objectMap["properties"] = vi.VnetInfoProperties
22354	}
22355	if vi.Kind != nil {
22356		objectMap["kind"] = vi.Kind
22357	}
22358	return json.Marshal(objectMap)
22359}
22360
22361// UnmarshalJSON is the custom unmarshaler for VnetInfo struct.
22362func (vi *VnetInfo) UnmarshalJSON(body []byte) error {
22363	var m map[string]*json.RawMessage
22364	err := json.Unmarshal(body, &m)
22365	if err != nil {
22366		return err
22367	}
22368	for k, v := range m {
22369		switch k {
22370		case "properties":
22371			if v != nil {
22372				var vnetInfoProperties VnetInfoProperties
22373				err = json.Unmarshal(*v, &vnetInfoProperties)
22374				if err != nil {
22375					return err
22376				}
22377				vi.VnetInfoProperties = &vnetInfoProperties
22378			}
22379		case "id":
22380			if v != nil {
22381				var ID string
22382				err = json.Unmarshal(*v, &ID)
22383				if err != nil {
22384					return err
22385				}
22386				vi.ID = &ID
22387			}
22388		case "name":
22389			if v != nil {
22390				var name string
22391				err = json.Unmarshal(*v, &name)
22392				if err != nil {
22393					return err
22394				}
22395				vi.Name = &name
22396			}
22397		case "kind":
22398			if v != nil {
22399				var kind string
22400				err = json.Unmarshal(*v, &kind)
22401				if err != nil {
22402					return err
22403				}
22404				vi.Kind = &kind
22405			}
22406		case "type":
22407			if v != nil {
22408				var typeVar string
22409				err = json.Unmarshal(*v, &typeVar)
22410				if err != nil {
22411					return err
22412				}
22413				vi.Type = &typeVar
22414			}
22415		}
22416	}
22417
22418	return nil
22419}
22420
22421// VnetInfoProperties vnetInfo resource specific properties
22422type VnetInfoProperties struct {
22423	// VnetResourceID - The Virtual Network's resource ID.
22424	VnetResourceID *string `json:"vnetResourceId,omitempty"`
22425	// CertThumbprint - READ-ONLY; The client certificate thumbprint.
22426	CertThumbprint *string `json:"certThumbprint,omitempty"`
22427	// CertBlob - A certificate file (.cer) blob containing the public key of the private key used to authenticate a
22428	// Point-To-Site VPN connection.
22429	CertBlob *[]byte `json:"certBlob,omitempty"`
22430	// Routes - READ-ONLY; The routes that this Virtual Network connection uses.
22431	Routes *[]VnetRoute `json:"routes,omitempty"`
22432	// ResyncRequired - READ-ONLY; <code>true</code> if a resync is required; otherwise, <code>false</code>.
22433	ResyncRequired *bool `json:"resyncRequired,omitempty"`
22434	// DNSServers - DNS servers to be used by this Virtual Network. This should be a comma-separated list of IP addresses.
22435	DNSServers *string `json:"dnsServers,omitempty"`
22436}
22437
22438// MarshalJSON is the custom marshaler for VnetInfoProperties.
22439func (vi VnetInfoProperties) MarshalJSON() ([]byte, error) {
22440	objectMap := make(map[string]interface{})
22441	if vi.VnetResourceID != nil {
22442		objectMap["vnetResourceId"] = vi.VnetResourceID
22443	}
22444	if vi.CertBlob != nil {
22445		objectMap["certBlob"] = vi.CertBlob
22446	}
22447	if vi.DNSServers != nil {
22448		objectMap["dnsServers"] = vi.DNSServers
22449	}
22450	return json.Marshal(objectMap)
22451}
22452
22453// VnetParameters the required set of inputs to validate a VNET
22454type VnetParameters struct {
22455	// VnetParametersProperties - VnetParameters resource specific properties
22456	*VnetParametersProperties `json:"properties,omitempty"`
22457	// ID - READ-ONLY; Resource Id.
22458	ID *string `json:"id,omitempty"`
22459	// Name - READ-ONLY; Resource Name.
22460	Name *string `json:"name,omitempty"`
22461	// Kind - Kind of resource.
22462	Kind *string `json:"kind,omitempty"`
22463	// Type - READ-ONLY; Resource type.
22464	Type *string `json:"type,omitempty"`
22465}
22466
22467// MarshalJSON is the custom marshaler for VnetParameters.
22468func (vp VnetParameters) MarshalJSON() ([]byte, error) {
22469	objectMap := make(map[string]interface{})
22470	if vp.VnetParametersProperties != nil {
22471		objectMap["properties"] = vp.VnetParametersProperties
22472	}
22473	if vp.Kind != nil {
22474		objectMap["kind"] = vp.Kind
22475	}
22476	return json.Marshal(objectMap)
22477}
22478
22479// UnmarshalJSON is the custom unmarshaler for VnetParameters struct.
22480func (vp *VnetParameters) UnmarshalJSON(body []byte) error {
22481	var m map[string]*json.RawMessage
22482	err := json.Unmarshal(body, &m)
22483	if err != nil {
22484		return err
22485	}
22486	for k, v := range m {
22487		switch k {
22488		case "properties":
22489			if v != nil {
22490				var vnetParametersProperties VnetParametersProperties
22491				err = json.Unmarshal(*v, &vnetParametersProperties)
22492				if err != nil {
22493					return err
22494				}
22495				vp.VnetParametersProperties = &vnetParametersProperties
22496			}
22497		case "id":
22498			if v != nil {
22499				var ID string
22500				err = json.Unmarshal(*v, &ID)
22501				if err != nil {
22502					return err
22503				}
22504				vp.ID = &ID
22505			}
22506		case "name":
22507			if v != nil {
22508				var name string
22509				err = json.Unmarshal(*v, &name)
22510				if err != nil {
22511					return err
22512				}
22513				vp.Name = &name
22514			}
22515		case "kind":
22516			if v != nil {
22517				var kind string
22518				err = json.Unmarshal(*v, &kind)
22519				if err != nil {
22520					return err
22521				}
22522				vp.Kind = &kind
22523			}
22524		case "type":
22525			if v != nil {
22526				var typeVar string
22527				err = json.Unmarshal(*v, &typeVar)
22528				if err != nil {
22529					return err
22530				}
22531				vp.Type = &typeVar
22532			}
22533		}
22534	}
22535
22536	return nil
22537}
22538
22539// VnetParametersProperties vnetParameters resource specific properties
22540type VnetParametersProperties struct {
22541	// VnetResourceGroup - The Resource Group of the VNET to be validated
22542	VnetResourceGroup *string `json:"vnetResourceGroup,omitempty"`
22543	// VnetName - The name of the VNET to be validated
22544	VnetName *string `json:"vnetName,omitempty"`
22545	// VnetSubnetName - The subnet name to be validated
22546	VnetSubnetName *string `json:"vnetSubnetName,omitempty"`
22547}
22548
22549// VnetRoute virtual Network route contract used to pass routing information for a Virtual Network.
22550type VnetRoute struct {
22551	autorest.Response `json:"-"`
22552	// VnetRouteProperties - VnetRoute resource specific properties
22553	*VnetRouteProperties `json:"properties,omitempty"`
22554	// ID - READ-ONLY; Resource Id.
22555	ID *string `json:"id,omitempty"`
22556	// Name - READ-ONLY; Resource Name.
22557	Name *string `json:"name,omitempty"`
22558	// Kind - Kind of resource.
22559	Kind *string `json:"kind,omitempty"`
22560	// Type - READ-ONLY; Resource type.
22561	Type *string `json:"type,omitempty"`
22562}
22563
22564// MarshalJSON is the custom marshaler for VnetRoute.
22565func (vr VnetRoute) MarshalJSON() ([]byte, error) {
22566	objectMap := make(map[string]interface{})
22567	if vr.VnetRouteProperties != nil {
22568		objectMap["properties"] = vr.VnetRouteProperties
22569	}
22570	if vr.Kind != nil {
22571		objectMap["kind"] = vr.Kind
22572	}
22573	return json.Marshal(objectMap)
22574}
22575
22576// UnmarshalJSON is the custom unmarshaler for VnetRoute struct.
22577func (vr *VnetRoute) UnmarshalJSON(body []byte) error {
22578	var m map[string]*json.RawMessage
22579	err := json.Unmarshal(body, &m)
22580	if err != nil {
22581		return err
22582	}
22583	for k, v := range m {
22584		switch k {
22585		case "properties":
22586			if v != nil {
22587				var vnetRouteProperties VnetRouteProperties
22588				err = json.Unmarshal(*v, &vnetRouteProperties)
22589				if err != nil {
22590					return err
22591				}
22592				vr.VnetRouteProperties = &vnetRouteProperties
22593			}
22594		case "id":
22595			if v != nil {
22596				var ID string
22597				err = json.Unmarshal(*v, &ID)
22598				if err != nil {
22599					return err
22600				}
22601				vr.ID = &ID
22602			}
22603		case "name":
22604			if v != nil {
22605				var name string
22606				err = json.Unmarshal(*v, &name)
22607				if err != nil {
22608					return err
22609				}
22610				vr.Name = &name
22611			}
22612		case "kind":
22613			if v != nil {
22614				var kind string
22615				err = json.Unmarshal(*v, &kind)
22616				if err != nil {
22617					return err
22618				}
22619				vr.Kind = &kind
22620			}
22621		case "type":
22622			if v != nil {
22623				var typeVar string
22624				err = json.Unmarshal(*v, &typeVar)
22625				if err != nil {
22626					return err
22627				}
22628				vr.Type = &typeVar
22629			}
22630		}
22631	}
22632
22633	return nil
22634}
22635
22636// VnetRouteProperties vnetRoute resource specific properties
22637type VnetRouteProperties struct {
22638	// VnetRouteName - The name of this route. This is only returned by the server and does not need to be set by the client.
22639	VnetRouteName *string `json:"name,omitempty"`
22640	// StartAddress - The starting address for this route. This may also include a CIDR notation, in which case the end address must not be specified.
22641	StartAddress *string `json:"startAddress,omitempty"`
22642	// EndAddress - The ending address for this route. If the start address is specified in CIDR notation, this must be omitted.
22643	EndAddress *string `json:"endAddress,omitempty"`
22644	// RouteType - The type of route this is:
22645	// DEFAULT - By default, every app has routes to the local address ranges specified by RFC1918
22646	// INHERITED - Routes inherited from the real Virtual Network routes
22647	// STATIC - Static route set on the app only
22648	// These values will be used for syncing an app's routes with those from a Virtual Network. Possible values include: 'DEFAULT', 'INHERITED', 'STATIC'
22649	RouteType RouteType `json:"routeType,omitempty"`
22650}
22651
22652// VnetValidationFailureDetails a class that describes the reason for a validation failure.
22653type VnetValidationFailureDetails struct {
22654	autorest.Response `json:"-"`
22655	// VnetValidationFailureDetailsProperties - VnetValidationFailureDetails resource specific properties
22656	*VnetValidationFailureDetailsProperties `json:"properties,omitempty"`
22657	// ID - READ-ONLY; Resource Id.
22658	ID *string `json:"id,omitempty"`
22659	// Name - READ-ONLY; Resource Name.
22660	Name *string `json:"name,omitempty"`
22661	// Kind - Kind of resource.
22662	Kind *string `json:"kind,omitempty"`
22663	// Type - READ-ONLY; Resource type.
22664	Type *string `json:"type,omitempty"`
22665}
22666
22667// MarshalJSON is the custom marshaler for VnetValidationFailureDetails.
22668func (vvfd VnetValidationFailureDetails) MarshalJSON() ([]byte, error) {
22669	objectMap := make(map[string]interface{})
22670	if vvfd.VnetValidationFailureDetailsProperties != nil {
22671		objectMap["properties"] = vvfd.VnetValidationFailureDetailsProperties
22672	}
22673	if vvfd.Kind != nil {
22674		objectMap["kind"] = vvfd.Kind
22675	}
22676	return json.Marshal(objectMap)
22677}
22678
22679// UnmarshalJSON is the custom unmarshaler for VnetValidationFailureDetails struct.
22680func (vvfd *VnetValidationFailureDetails) UnmarshalJSON(body []byte) error {
22681	var m map[string]*json.RawMessage
22682	err := json.Unmarshal(body, &m)
22683	if err != nil {
22684		return err
22685	}
22686	for k, v := range m {
22687		switch k {
22688		case "properties":
22689			if v != nil {
22690				var vnetValidationFailureDetailsProperties VnetValidationFailureDetailsProperties
22691				err = json.Unmarshal(*v, &vnetValidationFailureDetailsProperties)
22692				if err != nil {
22693					return err
22694				}
22695				vvfd.VnetValidationFailureDetailsProperties = &vnetValidationFailureDetailsProperties
22696			}
22697		case "id":
22698			if v != nil {
22699				var ID string
22700				err = json.Unmarshal(*v, &ID)
22701				if err != nil {
22702					return err
22703				}
22704				vvfd.ID = &ID
22705			}
22706		case "name":
22707			if v != nil {
22708				var name string
22709				err = json.Unmarshal(*v, &name)
22710				if err != nil {
22711					return err
22712				}
22713				vvfd.Name = &name
22714			}
22715		case "kind":
22716			if v != nil {
22717				var kind string
22718				err = json.Unmarshal(*v, &kind)
22719				if err != nil {
22720					return err
22721				}
22722				vvfd.Kind = &kind
22723			}
22724		case "type":
22725			if v != nil {
22726				var typeVar string
22727				err = json.Unmarshal(*v, &typeVar)
22728				if err != nil {
22729					return err
22730				}
22731				vvfd.Type = &typeVar
22732			}
22733		}
22734	}
22735
22736	return nil
22737}
22738
22739// VnetValidationFailureDetailsProperties vnetValidationFailureDetails resource specific properties
22740type VnetValidationFailureDetailsProperties struct {
22741	// Failed - A flag describing whether or not validation failed.
22742	Failed *bool `json:"failed,omitempty"`
22743	// FailedTests - A list of tests that failed in the validation.
22744	FailedTests *[]VnetValidationTestFailure `json:"failedTests,omitempty"`
22745}
22746
22747// VnetValidationTestFailure a class that describes a test that failed during NSG and UDR validation.
22748type VnetValidationTestFailure struct {
22749	// VnetValidationTestFailureProperties - VnetValidationTestFailure resource specific properties
22750	*VnetValidationTestFailureProperties `json:"properties,omitempty"`
22751	// ID - READ-ONLY; Resource Id.
22752	ID *string `json:"id,omitempty"`
22753	// Name - READ-ONLY; Resource Name.
22754	Name *string `json:"name,omitempty"`
22755	// Kind - Kind of resource.
22756	Kind *string `json:"kind,omitempty"`
22757	// Type - READ-ONLY; Resource type.
22758	Type *string `json:"type,omitempty"`
22759}
22760
22761// MarshalJSON is the custom marshaler for VnetValidationTestFailure.
22762func (vvtf VnetValidationTestFailure) MarshalJSON() ([]byte, error) {
22763	objectMap := make(map[string]interface{})
22764	if vvtf.VnetValidationTestFailureProperties != nil {
22765		objectMap["properties"] = vvtf.VnetValidationTestFailureProperties
22766	}
22767	if vvtf.Kind != nil {
22768		objectMap["kind"] = vvtf.Kind
22769	}
22770	return json.Marshal(objectMap)
22771}
22772
22773// UnmarshalJSON is the custom unmarshaler for VnetValidationTestFailure struct.
22774func (vvtf *VnetValidationTestFailure) UnmarshalJSON(body []byte) error {
22775	var m map[string]*json.RawMessage
22776	err := json.Unmarshal(body, &m)
22777	if err != nil {
22778		return err
22779	}
22780	for k, v := range m {
22781		switch k {
22782		case "properties":
22783			if v != nil {
22784				var vnetValidationTestFailureProperties VnetValidationTestFailureProperties
22785				err = json.Unmarshal(*v, &vnetValidationTestFailureProperties)
22786				if err != nil {
22787					return err
22788				}
22789				vvtf.VnetValidationTestFailureProperties = &vnetValidationTestFailureProperties
22790			}
22791		case "id":
22792			if v != nil {
22793				var ID string
22794				err = json.Unmarshal(*v, &ID)
22795				if err != nil {
22796					return err
22797				}
22798				vvtf.ID = &ID
22799			}
22800		case "name":
22801			if v != nil {
22802				var name string
22803				err = json.Unmarshal(*v, &name)
22804				if err != nil {
22805					return err
22806				}
22807				vvtf.Name = &name
22808			}
22809		case "kind":
22810			if v != nil {
22811				var kind string
22812				err = json.Unmarshal(*v, &kind)
22813				if err != nil {
22814					return err
22815				}
22816				vvtf.Kind = &kind
22817			}
22818		case "type":
22819			if v != nil {
22820				var typeVar string
22821				err = json.Unmarshal(*v, &typeVar)
22822				if err != nil {
22823					return err
22824				}
22825				vvtf.Type = &typeVar
22826			}
22827		}
22828	}
22829
22830	return nil
22831}
22832
22833// VnetValidationTestFailureProperties vnetValidationTestFailure resource specific properties
22834type VnetValidationTestFailureProperties struct {
22835	// TestName - The name of the test that failed.
22836	TestName *string `json:"testName,omitempty"`
22837	// Details - The details of what caused the failure, e.g. the blocking rule name, etc.
22838	Details *string `json:"details,omitempty"`
22839}
22840
22841// WorkerPool worker pool of an App Service Environment.
22842type WorkerPool struct {
22843	// WorkerSizeID - Worker size ID for referencing this worker pool.
22844	WorkerSizeID *int32 `json:"workerSizeId,omitempty"`
22845	// ComputeMode - Shared or dedicated app hosting. Possible values include: 'ComputeModeOptionsShared', 'ComputeModeOptionsDedicated', 'ComputeModeOptionsDynamic'
22846	ComputeMode ComputeModeOptions `json:"computeMode,omitempty"`
22847	// WorkerSize - VM size of the worker pool instances.
22848	WorkerSize *string `json:"workerSize,omitempty"`
22849	// WorkerCount - Number of instances in the worker pool.
22850	WorkerCount *int32 `json:"workerCount,omitempty"`
22851	// InstanceNames - READ-ONLY; Names of all instances in the worker pool (read only).
22852	InstanceNames *[]string `json:"instanceNames,omitempty"`
22853}
22854
22855// MarshalJSON is the custom marshaler for WorkerPool.
22856func (wp WorkerPool) MarshalJSON() ([]byte, error) {
22857	objectMap := make(map[string]interface{})
22858	if wp.WorkerSizeID != nil {
22859		objectMap["workerSizeId"] = wp.WorkerSizeID
22860	}
22861	if wp.ComputeMode != "" {
22862		objectMap["computeMode"] = wp.ComputeMode
22863	}
22864	if wp.WorkerSize != nil {
22865		objectMap["workerSize"] = wp.WorkerSize
22866	}
22867	if wp.WorkerCount != nil {
22868		objectMap["workerCount"] = wp.WorkerCount
22869	}
22870	return json.Marshal(objectMap)
22871}
22872
22873// WorkerPoolCollection collection of worker pools.
22874type WorkerPoolCollection struct {
22875	autorest.Response `json:"-"`
22876	// Value - Collection of resources.
22877	Value *[]WorkerPoolResource `json:"value,omitempty"`
22878	// NextLink - READ-ONLY; Link to next page of resources.
22879	NextLink *string `json:"nextLink,omitempty"`
22880}
22881
22882// MarshalJSON is the custom marshaler for WorkerPoolCollection.
22883func (wpc WorkerPoolCollection) MarshalJSON() ([]byte, error) {
22884	objectMap := make(map[string]interface{})
22885	if wpc.Value != nil {
22886		objectMap["value"] = wpc.Value
22887	}
22888	return json.Marshal(objectMap)
22889}
22890
22891// WorkerPoolCollectionIterator provides access to a complete listing of WorkerPoolResource values.
22892type WorkerPoolCollectionIterator struct {
22893	i    int
22894	page WorkerPoolCollectionPage
22895}
22896
22897// NextWithContext advances to the next value.  If there was an error making
22898// the request the iterator does not advance and the error is returned.
22899func (iter *WorkerPoolCollectionIterator) NextWithContext(ctx context.Context) (err error) {
22900	if tracing.IsEnabled() {
22901		ctx = tracing.StartSpan(ctx, fqdn+"/WorkerPoolCollectionIterator.NextWithContext")
22902		defer func() {
22903			sc := -1
22904			if iter.Response().Response.Response != nil {
22905				sc = iter.Response().Response.Response.StatusCode
22906			}
22907			tracing.EndSpan(ctx, sc, err)
22908		}()
22909	}
22910	iter.i++
22911	if iter.i < len(iter.page.Values()) {
22912		return nil
22913	}
22914	err = iter.page.NextWithContext(ctx)
22915	if err != nil {
22916		iter.i--
22917		return err
22918	}
22919	iter.i = 0
22920	return nil
22921}
22922
22923// Next advances to the next value.  If there was an error making
22924// the request the iterator does not advance and the error is returned.
22925// Deprecated: Use NextWithContext() instead.
22926func (iter *WorkerPoolCollectionIterator) Next() error {
22927	return iter.NextWithContext(context.Background())
22928}
22929
22930// NotDone returns true if the enumeration should be started or is not yet complete.
22931func (iter WorkerPoolCollectionIterator) NotDone() bool {
22932	return iter.page.NotDone() && iter.i < len(iter.page.Values())
22933}
22934
22935// Response returns the raw server response from the last page request.
22936func (iter WorkerPoolCollectionIterator) Response() WorkerPoolCollection {
22937	return iter.page.Response()
22938}
22939
22940// Value returns the current value or a zero-initialized value if the
22941// iterator has advanced beyond the end of the collection.
22942func (iter WorkerPoolCollectionIterator) Value() WorkerPoolResource {
22943	if !iter.page.NotDone() {
22944		return WorkerPoolResource{}
22945	}
22946	return iter.page.Values()[iter.i]
22947}
22948
22949// Creates a new instance of the WorkerPoolCollectionIterator type.
22950func NewWorkerPoolCollectionIterator(page WorkerPoolCollectionPage) WorkerPoolCollectionIterator {
22951	return WorkerPoolCollectionIterator{page: page}
22952}
22953
22954// IsEmpty returns true if the ListResult contains no values.
22955func (wpc WorkerPoolCollection) IsEmpty() bool {
22956	return wpc.Value == nil || len(*wpc.Value) == 0
22957}
22958
22959// hasNextLink returns true if the NextLink is not empty.
22960func (wpc WorkerPoolCollection) hasNextLink() bool {
22961	return wpc.NextLink != nil && len(*wpc.NextLink) != 0
22962}
22963
22964// workerPoolCollectionPreparer prepares a request to retrieve the next set of results.
22965// It returns nil if no more results exist.
22966func (wpc WorkerPoolCollection) workerPoolCollectionPreparer(ctx context.Context) (*http.Request, error) {
22967	if !wpc.hasNextLink() {
22968		return nil, nil
22969	}
22970	return autorest.Prepare((&http.Request{}).WithContext(ctx),
22971		autorest.AsJSON(),
22972		autorest.AsGet(),
22973		autorest.WithBaseURL(to.String(wpc.NextLink)))
22974}
22975
22976// WorkerPoolCollectionPage contains a page of WorkerPoolResource values.
22977type WorkerPoolCollectionPage struct {
22978	fn  func(context.Context, WorkerPoolCollection) (WorkerPoolCollection, error)
22979	wpc WorkerPoolCollection
22980}
22981
22982// NextWithContext advances to the next page of values.  If there was an error making
22983// the request the page does not advance and the error is returned.
22984func (page *WorkerPoolCollectionPage) NextWithContext(ctx context.Context) (err error) {
22985	if tracing.IsEnabled() {
22986		ctx = tracing.StartSpan(ctx, fqdn+"/WorkerPoolCollectionPage.NextWithContext")
22987		defer func() {
22988			sc := -1
22989			if page.Response().Response.Response != nil {
22990				sc = page.Response().Response.Response.StatusCode
22991			}
22992			tracing.EndSpan(ctx, sc, err)
22993		}()
22994	}
22995	for {
22996		next, err := page.fn(ctx, page.wpc)
22997		if err != nil {
22998			return err
22999		}
23000		page.wpc = next
23001		if !next.hasNextLink() || !next.IsEmpty() {
23002			break
23003		}
23004	}
23005	return nil
23006}
23007
23008// Next advances to the next page of values.  If there was an error making
23009// the request the page does not advance and the error is returned.
23010// Deprecated: Use NextWithContext() instead.
23011func (page *WorkerPoolCollectionPage) Next() error {
23012	return page.NextWithContext(context.Background())
23013}
23014
23015// NotDone returns true if the page enumeration should be started or is not yet complete.
23016func (page WorkerPoolCollectionPage) NotDone() bool {
23017	return !page.wpc.IsEmpty()
23018}
23019
23020// Response returns the raw server response from the last page request.
23021func (page WorkerPoolCollectionPage) Response() WorkerPoolCollection {
23022	return page.wpc
23023}
23024
23025// Values returns the slice of values for the current page or nil if there are no values.
23026func (page WorkerPoolCollectionPage) Values() []WorkerPoolResource {
23027	if page.wpc.IsEmpty() {
23028		return nil
23029	}
23030	return *page.wpc.Value
23031}
23032
23033// Creates a new instance of the WorkerPoolCollectionPage type.
23034func NewWorkerPoolCollectionPage(cur WorkerPoolCollection, getNextPage func(context.Context, WorkerPoolCollection) (WorkerPoolCollection, error)) WorkerPoolCollectionPage {
23035	return WorkerPoolCollectionPage{
23036		fn:  getNextPage,
23037		wpc: cur,
23038	}
23039}
23040
23041// WorkerPoolResource worker pool of an App Service Environment ARM resource.
23042type WorkerPoolResource struct {
23043	autorest.Response `json:"-"`
23044	// WorkerPool - Core resource properties
23045	*WorkerPool `json:"properties,omitempty"`
23046	Sku         *SkuDescription `json:"sku,omitempty"`
23047	// ID - READ-ONLY; Resource Id.
23048	ID *string `json:"id,omitempty"`
23049	// Name - READ-ONLY; Resource Name.
23050	Name *string `json:"name,omitempty"`
23051	// Kind - Kind of resource.
23052	Kind *string `json:"kind,omitempty"`
23053	// Type - READ-ONLY; Resource type.
23054	Type *string `json:"type,omitempty"`
23055}
23056
23057// MarshalJSON is the custom marshaler for WorkerPoolResource.
23058func (wpr WorkerPoolResource) MarshalJSON() ([]byte, error) {
23059	objectMap := make(map[string]interface{})
23060	if wpr.WorkerPool != nil {
23061		objectMap["properties"] = wpr.WorkerPool
23062	}
23063	if wpr.Sku != nil {
23064		objectMap["sku"] = wpr.Sku
23065	}
23066	if wpr.Kind != nil {
23067		objectMap["kind"] = wpr.Kind
23068	}
23069	return json.Marshal(objectMap)
23070}
23071
23072// UnmarshalJSON is the custom unmarshaler for WorkerPoolResource struct.
23073func (wpr *WorkerPoolResource) UnmarshalJSON(body []byte) error {
23074	var m map[string]*json.RawMessage
23075	err := json.Unmarshal(body, &m)
23076	if err != nil {
23077		return err
23078	}
23079	for k, v := range m {
23080		switch k {
23081		case "properties":
23082			if v != nil {
23083				var workerPool WorkerPool
23084				err = json.Unmarshal(*v, &workerPool)
23085				if err != nil {
23086					return err
23087				}
23088				wpr.WorkerPool = &workerPool
23089			}
23090		case "sku":
23091			if v != nil {
23092				var sku SkuDescription
23093				err = json.Unmarshal(*v, &sku)
23094				if err != nil {
23095					return err
23096				}
23097				wpr.Sku = &sku
23098			}
23099		case "id":
23100			if v != nil {
23101				var ID string
23102				err = json.Unmarshal(*v, &ID)
23103				if err != nil {
23104					return err
23105				}
23106				wpr.ID = &ID
23107			}
23108		case "name":
23109			if v != nil {
23110				var name string
23111				err = json.Unmarshal(*v, &name)
23112				if err != nil {
23113					return err
23114				}
23115				wpr.Name = &name
23116			}
23117		case "kind":
23118			if v != nil {
23119				var kind string
23120				err = json.Unmarshal(*v, &kind)
23121				if err != nil {
23122					return err
23123				}
23124				wpr.Kind = &kind
23125			}
23126		case "type":
23127			if v != nil {
23128				var typeVar string
23129				err = json.Unmarshal(*v, &typeVar)
23130				if err != nil {
23131					return err
23132				}
23133				wpr.Type = &typeVar
23134			}
23135		}
23136	}
23137
23138	return nil
23139}
23140