1package appplatform
2
3// Copyright (c) Microsoft Corporation. All rights reserved.
4// Licensed under the MIT License. See License.txt in the project root for license information.
5//
6// Code generated by Microsoft (R) AutoRest Code Generator.
7// Changes may cause incorrect behavior and will be lost if the code is regenerated.
8
9import (
10	"context"
11	"encoding/json"
12	"github.com/Azure/go-autorest/autorest"
13	"github.com/Azure/go-autorest/autorest/azure"
14	"github.com/Azure/go-autorest/autorest/date"
15	"github.com/Azure/go-autorest/autorest/to"
16	"github.com/Azure/go-autorest/tracing"
17	"net/http"
18)
19
20// The package's fully qualified name.
21const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/appplatform/mgmt/2019-05-01-preview/appplatform"
22
23// AppResource app resource payload
24type AppResource struct {
25	autorest.Response `json:"-"`
26	// Properties - Properties of the App resource
27	Properties *AppResourceProperties `json:"properties,omitempty"`
28	// Identity - The Managed Identity type of the app resource
29	Identity *ManagedIdentityProperties `json:"identity,omitempty"`
30	// Location - The GEO location of the application, always the same with its parent resource
31	Location *string `json:"location,omitempty"`
32	// ID - READ-ONLY; Fully qualified resource Id for the resource.
33	ID *string `json:"id,omitempty"`
34	// Name - READ-ONLY; The name of the resource.
35	Name *string `json:"name,omitempty"`
36	// Type - READ-ONLY; The type of the resource.
37	Type *string `json:"type,omitempty"`
38}
39
40// MarshalJSON is the custom marshaler for AppResource.
41func (ar AppResource) MarshalJSON() ([]byte, error) {
42	objectMap := make(map[string]interface{})
43	if ar.Properties != nil {
44		objectMap["properties"] = ar.Properties
45	}
46	if ar.Identity != nil {
47		objectMap["identity"] = ar.Identity
48	}
49	if ar.Location != nil {
50		objectMap["location"] = ar.Location
51	}
52	return json.Marshal(objectMap)
53}
54
55// AppResourceCollection object that includes an array of App resources and a possible link for next set
56type AppResourceCollection struct {
57	autorest.Response `json:"-"`
58	// Value - Collection of App resources
59	Value *[]AppResource `json:"value,omitempty"`
60	// NextLink - URL client should use to fetch the next page (per server side paging).
61	// It's null for now, added for future use.
62	NextLink *string `json:"nextLink,omitempty"`
63}
64
65// AppResourceCollectionIterator provides access to a complete listing of AppResource values.
66type AppResourceCollectionIterator struct {
67	i    int
68	page AppResourceCollectionPage
69}
70
71// NextWithContext advances to the next value.  If there was an error making
72// the request the iterator does not advance and the error is returned.
73func (iter *AppResourceCollectionIterator) NextWithContext(ctx context.Context) (err error) {
74	if tracing.IsEnabled() {
75		ctx = tracing.StartSpan(ctx, fqdn+"/AppResourceCollectionIterator.NextWithContext")
76		defer func() {
77			sc := -1
78			if iter.Response().Response.Response != nil {
79				sc = iter.Response().Response.Response.StatusCode
80			}
81			tracing.EndSpan(ctx, sc, err)
82		}()
83	}
84	iter.i++
85	if iter.i < len(iter.page.Values()) {
86		return nil
87	}
88	err = iter.page.NextWithContext(ctx)
89	if err != nil {
90		iter.i--
91		return err
92	}
93	iter.i = 0
94	return nil
95}
96
97// Next advances to the next value.  If there was an error making
98// the request the iterator does not advance and the error is returned.
99// Deprecated: Use NextWithContext() instead.
100func (iter *AppResourceCollectionIterator) Next() error {
101	return iter.NextWithContext(context.Background())
102}
103
104// NotDone returns true if the enumeration should be started or is not yet complete.
105func (iter AppResourceCollectionIterator) NotDone() bool {
106	return iter.page.NotDone() && iter.i < len(iter.page.Values())
107}
108
109// Response returns the raw server response from the last page request.
110func (iter AppResourceCollectionIterator) Response() AppResourceCollection {
111	return iter.page.Response()
112}
113
114// Value returns the current value or a zero-initialized value if the
115// iterator has advanced beyond the end of the collection.
116func (iter AppResourceCollectionIterator) Value() AppResource {
117	if !iter.page.NotDone() {
118		return AppResource{}
119	}
120	return iter.page.Values()[iter.i]
121}
122
123// Creates a new instance of the AppResourceCollectionIterator type.
124func NewAppResourceCollectionIterator(page AppResourceCollectionPage) AppResourceCollectionIterator {
125	return AppResourceCollectionIterator{page: page}
126}
127
128// IsEmpty returns true if the ListResult contains no values.
129func (arc AppResourceCollection) IsEmpty() bool {
130	return arc.Value == nil || len(*arc.Value) == 0
131}
132
133// hasNextLink returns true if the NextLink is not empty.
134func (arc AppResourceCollection) hasNextLink() bool {
135	return arc.NextLink != nil && len(*arc.NextLink) != 0
136}
137
138// appResourceCollectionPreparer prepares a request to retrieve the next set of results.
139// It returns nil if no more results exist.
140func (arc AppResourceCollection) appResourceCollectionPreparer(ctx context.Context) (*http.Request, error) {
141	if !arc.hasNextLink() {
142		return nil, nil
143	}
144	return autorest.Prepare((&http.Request{}).WithContext(ctx),
145		autorest.AsJSON(),
146		autorest.AsGet(),
147		autorest.WithBaseURL(to.String(arc.NextLink)))
148}
149
150// AppResourceCollectionPage contains a page of AppResource values.
151type AppResourceCollectionPage struct {
152	fn  func(context.Context, AppResourceCollection) (AppResourceCollection, error)
153	arc AppResourceCollection
154}
155
156// NextWithContext advances to the next page of values.  If there was an error making
157// the request the page does not advance and the error is returned.
158func (page *AppResourceCollectionPage) NextWithContext(ctx context.Context) (err error) {
159	if tracing.IsEnabled() {
160		ctx = tracing.StartSpan(ctx, fqdn+"/AppResourceCollectionPage.NextWithContext")
161		defer func() {
162			sc := -1
163			if page.Response().Response.Response != nil {
164				sc = page.Response().Response.Response.StatusCode
165			}
166			tracing.EndSpan(ctx, sc, err)
167		}()
168	}
169	for {
170		next, err := page.fn(ctx, page.arc)
171		if err != nil {
172			return err
173		}
174		page.arc = next
175		if !next.hasNextLink() || !next.IsEmpty() {
176			break
177		}
178	}
179	return nil
180}
181
182// Next advances to the next page of values.  If there was an error making
183// the request the page does not advance and the error is returned.
184// Deprecated: Use NextWithContext() instead.
185func (page *AppResourceCollectionPage) Next() error {
186	return page.NextWithContext(context.Background())
187}
188
189// NotDone returns true if the page enumeration should be started or is not yet complete.
190func (page AppResourceCollectionPage) NotDone() bool {
191	return !page.arc.IsEmpty()
192}
193
194// Response returns the raw server response from the last page request.
195func (page AppResourceCollectionPage) Response() AppResourceCollection {
196	return page.arc
197}
198
199// Values returns the slice of values for the current page or nil if there are no values.
200func (page AppResourceCollectionPage) Values() []AppResource {
201	if page.arc.IsEmpty() {
202		return nil
203	}
204	return *page.arc.Value
205}
206
207// Creates a new instance of the AppResourceCollectionPage type.
208func NewAppResourceCollectionPage(cur AppResourceCollection, getNextPage func(context.Context, AppResourceCollection) (AppResourceCollection, error)) AppResourceCollectionPage {
209	return AppResourceCollectionPage{
210		fn:  getNextPage,
211		arc: cur,
212	}
213}
214
215// AppResourceProperties app resource properties payload
216type AppResourceProperties struct {
217	// Public - Indicates whether the App exposes public endpoint
218	Public *bool `json:"public,omitempty"`
219	// URL - READ-ONLY; URL of the App
220	URL *string `json:"url,omitempty"`
221	// ProvisioningState - READ-ONLY; Provisioning state of the App. Possible values include: 'Succeeded', 'Failed', 'Creating', 'Updating'
222	ProvisioningState AppResourceProvisioningState `json:"provisioningState,omitempty"`
223	// ActiveDeploymentName - Name of the active deployment of the App
224	ActiveDeploymentName *string `json:"activeDeploymentName,omitempty"`
225	// Fqdn - Fully qualified dns Name.
226	Fqdn *string `json:"fqdn,omitempty"`
227	// HTTPSOnly - Indicate if only https is allowed.
228	HTTPSOnly *bool `json:"httpsOnly,omitempty"`
229	// CreatedTime - READ-ONLY; Date time when the resource is created
230	CreatedTime *date.Time `json:"createdTime,omitempty"`
231	// TemporaryDisk - Temporary disk settings
232	TemporaryDisk *TemporaryDisk `json:"temporaryDisk,omitempty"`
233	// PersistentDisk - Persistent disk settings
234	PersistentDisk *PersistentDisk `json:"persistentDisk,omitempty"`
235}
236
237// MarshalJSON is the custom marshaler for AppResourceProperties.
238func (arp AppResourceProperties) MarshalJSON() ([]byte, error) {
239	objectMap := make(map[string]interface{})
240	if arp.Public != nil {
241		objectMap["public"] = arp.Public
242	}
243	if arp.ActiveDeploymentName != nil {
244		objectMap["activeDeploymentName"] = arp.ActiveDeploymentName
245	}
246	if arp.Fqdn != nil {
247		objectMap["fqdn"] = arp.Fqdn
248	}
249	if arp.HTTPSOnly != nil {
250		objectMap["httpsOnly"] = arp.HTTPSOnly
251	}
252	if arp.TemporaryDisk != nil {
253		objectMap["temporaryDisk"] = arp.TemporaryDisk
254	}
255	if arp.PersistentDisk != nil {
256		objectMap["persistentDisk"] = arp.PersistentDisk
257	}
258	return json.Marshal(objectMap)
259}
260
261// AppsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
262// operation.
263type AppsCreateOrUpdateFuture struct {
264	azure.FutureAPI
265	// Result returns the result of the asynchronous operation.
266	// If the operation has not completed it will return an error.
267	Result func(AppsClient) (AppResource, error)
268}
269
270// UnmarshalJSON is the custom unmarshaller for CreateFuture.
271func (future *AppsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
272	var azFuture azure.Future
273	if err := json.Unmarshal(body, &azFuture); err != nil {
274		return err
275	}
276	future.FutureAPI = &azFuture
277	future.Result = future.result
278	return nil
279}
280
281// result is the default implementation for AppsCreateOrUpdateFuture.Result.
282func (future *AppsCreateOrUpdateFuture) result(client AppsClient) (ar AppResource, err error) {
283	var done bool
284	done, err = future.DoneWithContext(context.Background(), client)
285	if err != nil {
286		err = autorest.NewErrorWithError(err, "appplatform.AppsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
287		return
288	}
289	if !done {
290		ar.Response.Response = future.Response()
291		err = azure.NewAsyncOpIncompleteError("appplatform.AppsCreateOrUpdateFuture")
292		return
293	}
294	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
295	if ar.Response.Response, err = future.GetResult(sender); err == nil && ar.Response.Response.StatusCode != http.StatusNoContent {
296		ar, err = client.CreateOrUpdateResponder(ar.Response.Response)
297		if err != nil {
298			err = autorest.NewErrorWithError(err, "appplatform.AppsCreateOrUpdateFuture", "Result", ar.Response.Response, "Failure responding to request")
299		}
300	}
301	return
302}
303
304// AppsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
305type AppsUpdateFuture struct {
306	azure.FutureAPI
307	// Result returns the result of the asynchronous operation.
308	// If the operation has not completed it will return an error.
309	Result func(AppsClient) (AppResource, error)
310}
311
312// UnmarshalJSON is the custom unmarshaller for CreateFuture.
313func (future *AppsUpdateFuture) UnmarshalJSON(body []byte) error {
314	var azFuture azure.Future
315	if err := json.Unmarshal(body, &azFuture); err != nil {
316		return err
317	}
318	future.FutureAPI = &azFuture
319	future.Result = future.result
320	return nil
321}
322
323// result is the default implementation for AppsUpdateFuture.Result.
324func (future *AppsUpdateFuture) result(client AppsClient) (ar AppResource, err error) {
325	var done bool
326	done, err = future.DoneWithContext(context.Background(), client)
327	if err != nil {
328		err = autorest.NewErrorWithError(err, "appplatform.AppsUpdateFuture", "Result", future.Response(), "Polling failure")
329		return
330	}
331	if !done {
332		ar.Response.Response = future.Response()
333		err = azure.NewAsyncOpIncompleteError("appplatform.AppsUpdateFuture")
334		return
335	}
336	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
337	if ar.Response.Response, err = future.GetResult(sender); err == nil && ar.Response.Response.StatusCode != http.StatusNoContent {
338		ar, err = client.UpdateResponder(ar.Response.Response)
339		if err != nil {
340			err = autorest.NewErrorWithError(err, "appplatform.AppsUpdateFuture", "Result", ar.Response.Response, "Failure responding to request")
341		}
342	}
343	return
344}
345
346// AvailableOperations available operations of the service
347type AvailableOperations struct {
348	autorest.Response `json:"-"`
349	// Value - Collection of available operation details
350	Value *[]OperationDetail `json:"value,omitempty"`
351	// NextLink - URL client should use to fetch the next page (per server side paging).
352	// It's null for now, added for future use.
353	NextLink *string `json:"nextLink,omitempty"`
354}
355
356// AvailableOperationsIterator provides access to a complete listing of OperationDetail values.
357type AvailableOperationsIterator struct {
358	i    int
359	page AvailableOperationsPage
360}
361
362// NextWithContext advances to the next value.  If there was an error making
363// the request the iterator does not advance and the error is returned.
364func (iter *AvailableOperationsIterator) NextWithContext(ctx context.Context) (err error) {
365	if tracing.IsEnabled() {
366		ctx = tracing.StartSpan(ctx, fqdn+"/AvailableOperationsIterator.NextWithContext")
367		defer func() {
368			sc := -1
369			if iter.Response().Response.Response != nil {
370				sc = iter.Response().Response.Response.StatusCode
371			}
372			tracing.EndSpan(ctx, sc, err)
373		}()
374	}
375	iter.i++
376	if iter.i < len(iter.page.Values()) {
377		return nil
378	}
379	err = iter.page.NextWithContext(ctx)
380	if err != nil {
381		iter.i--
382		return err
383	}
384	iter.i = 0
385	return nil
386}
387
388// Next advances to the next value.  If there was an error making
389// the request the iterator does not advance and the error is returned.
390// Deprecated: Use NextWithContext() instead.
391func (iter *AvailableOperationsIterator) Next() error {
392	return iter.NextWithContext(context.Background())
393}
394
395// NotDone returns true if the enumeration should be started or is not yet complete.
396func (iter AvailableOperationsIterator) NotDone() bool {
397	return iter.page.NotDone() && iter.i < len(iter.page.Values())
398}
399
400// Response returns the raw server response from the last page request.
401func (iter AvailableOperationsIterator) Response() AvailableOperations {
402	return iter.page.Response()
403}
404
405// Value returns the current value or a zero-initialized value if the
406// iterator has advanced beyond the end of the collection.
407func (iter AvailableOperationsIterator) Value() OperationDetail {
408	if !iter.page.NotDone() {
409		return OperationDetail{}
410	}
411	return iter.page.Values()[iter.i]
412}
413
414// Creates a new instance of the AvailableOperationsIterator type.
415func NewAvailableOperationsIterator(page AvailableOperationsPage) AvailableOperationsIterator {
416	return AvailableOperationsIterator{page: page}
417}
418
419// IsEmpty returns true if the ListResult contains no values.
420func (ao AvailableOperations) IsEmpty() bool {
421	return ao.Value == nil || len(*ao.Value) == 0
422}
423
424// hasNextLink returns true if the NextLink is not empty.
425func (ao AvailableOperations) hasNextLink() bool {
426	return ao.NextLink != nil && len(*ao.NextLink) != 0
427}
428
429// availableOperationsPreparer prepares a request to retrieve the next set of results.
430// It returns nil if no more results exist.
431func (ao AvailableOperations) availableOperationsPreparer(ctx context.Context) (*http.Request, error) {
432	if !ao.hasNextLink() {
433		return nil, nil
434	}
435	return autorest.Prepare((&http.Request{}).WithContext(ctx),
436		autorest.AsJSON(),
437		autorest.AsGet(),
438		autorest.WithBaseURL(to.String(ao.NextLink)))
439}
440
441// AvailableOperationsPage contains a page of OperationDetail values.
442type AvailableOperationsPage struct {
443	fn func(context.Context, AvailableOperations) (AvailableOperations, error)
444	ao AvailableOperations
445}
446
447// NextWithContext advances to the next page of values.  If there was an error making
448// the request the page does not advance and the error is returned.
449func (page *AvailableOperationsPage) NextWithContext(ctx context.Context) (err error) {
450	if tracing.IsEnabled() {
451		ctx = tracing.StartSpan(ctx, fqdn+"/AvailableOperationsPage.NextWithContext")
452		defer func() {
453			sc := -1
454			if page.Response().Response.Response != nil {
455				sc = page.Response().Response.Response.StatusCode
456			}
457			tracing.EndSpan(ctx, sc, err)
458		}()
459	}
460	for {
461		next, err := page.fn(ctx, page.ao)
462		if err != nil {
463			return err
464		}
465		page.ao = next
466		if !next.hasNextLink() || !next.IsEmpty() {
467			break
468		}
469	}
470	return nil
471}
472
473// Next advances to the next page of values.  If there was an error making
474// the request the page does not advance and the error is returned.
475// Deprecated: Use NextWithContext() instead.
476func (page *AvailableOperationsPage) Next() error {
477	return page.NextWithContext(context.Background())
478}
479
480// NotDone returns true if the page enumeration should be started or is not yet complete.
481func (page AvailableOperationsPage) NotDone() bool {
482	return !page.ao.IsEmpty()
483}
484
485// Response returns the raw server response from the last page request.
486func (page AvailableOperationsPage) Response() AvailableOperations {
487	return page.ao
488}
489
490// Values returns the slice of values for the current page or nil if there are no values.
491func (page AvailableOperationsPage) Values() []OperationDetail {
492	if page.ao.IsEmpty() {
493		return nil
494	}
495	return *page.ao.Value
496}
497
498// Creates a new instance of the AvailableOperationsPage type.
499func NewAvailableOperationsPage(cur AvailableOperations, getNextPage func(context.Context, AvailableOperations) (AvailableOperations, error)) AvailableOperationsPage {
500	return AvailableOperationsPage{
501		fn: getNextPage,
502		ao: cur,
503	}
504}
505
506// AvailableRuntimeVersions ...
507type AvailableRuntimeVersions struct {
508	autorest.Response `json:"-"`
509	// Value - READ-ONLY; A list of all supported runtime versions.
510	Value *[]SupportedRuntimeVersion `json:"value,omitempty"`
511}
512
513// MarshalJSON is the custom marshaler for AvailableRuntimeVersions.
514func (arv AvailableRuntimeVersions) MarshalJSON() ([]byte, error) {
515	objectMap := make(map[string]interface{})
516	return json.Marshal(objectMap)
517}
518
519// BindingResource binding resource payload
520type BindingResource struct {
521	autorest.Response `json:"-"`
522	// Properties - Properties of the Binding resource
523	Properties *BindingResourceProperties `json:"properties,omitempty"`
524	// ID - READ-ONLY; Fully qualified resource Id for the resource.
525	ID *string `json:"id,omitempty"`
526	// Name - READ-ONLY; The name of the resource.
527	Name *string `json:"name,omitempty"`
528	// Type - READ-ONLY; The type of the resource.
529	Type *string `json:"type,omitempty"`
530}
531
532// MarshalJSON is the custom marshaler for BindingResource.
533func (br BindingResource) MarshalJSON() ([]byte, error) {
534	objectMap := make(map[string]interface{})
535	if br.Properties != nil {
536		objectMap["properties"] = br.Properties
537	}
538	return json.Marshal(objectMap)
539}
540
541// BindingResourceCollection object that includes an array of Binding resources and a possible link for
542// next set
543type BindingResourceCollection struct {
544	autorest.Response `json:"-"`
545	// Value - Collection of Binding resources
546	Value *[]BindingResource `json:"value,omitempty"`
547	// NextLink - URL client should use to fetch the next page (per server side paging).
548	// It's null for now, added for future use.
549	NextLink *string `json:"nextLink,omitempty"`
550}
551
552// BindingResourceCollectionIterator provides access to a complete listing of BindingResource values.
553type BindingResourceCollectionIterator struct {
554	i    int
555	page BindingResourceCollectionPage
556}
557
558// NextWithContext advances to the next value.  If there was an error making
559// the request the iterator does not advance and the error is returned.
560func (iter *BindingResourceCollectionIterator) NextWithContext(ctx context.Context) (err error) {
561	if tracing.IsEnabled() {
562		ctx = tracing.StartSpan(ctx, fqdn+"/BindingResourceCollectionIterator.NextWithContext")
563		defer func() {
564			sc := -1
565			if iter.Response().Response.Response != nil {
566				sc = iter.Response().Response.Response.StatusCode
567			}
568			tracing.EndSpan(ctx, sc, err)
569		}()
570	}
571	iter.i++
572	if iter.i < len(iter.page.Values()) {
573		return nil
574	}
575	err = iter.page.NextWithContext(ctx)
576	if err != nil {
577		iter.i--
578		return err
579	}
580	iter.i = 0
581	return nil
582}
583
584// Next advances to the next value.  If there was an error making
585// the request the iterator does not advance and the error is returned.
586// Deprecated: Use NextWithContext() instead.
587func (iter *BindingResourceCollectionIterator) Next() error {
588	return iter.NextWithContext(context.Background())
589}
590
591// NotDone returns true if the enumeration should be started or is not yet complete.
592func (iter BindingResourceCollectionIterator) NotDone() bool {
593	return iter.page.NotDone() && iter.i < len(iter.page.Values())
594}
595
596// Response returns the raw server response from the last page request.
597func (iter BindingResourceCollectionIterator) Response() BindingResourceCollection {
598	return iter.page.Response()
599}
600
601// Value returns the current value or a zero-initialized value if the
602// iterator has advanced beyond the end of the collection.
603func (iter BindingResourceCollectionIterator) Value() BindingResource {
604	if !iter.page.NotDone() {
605		return BindingResource{}
606	}
607	return iter.page.Values()[iter.i]
608}
609
610// Creates a new instance of the BindingResourceCollectionIterator type.
611func NewBindingResourceCollectionIterator(page BindingResourceCollectionPage) BindingResourceCollectionIterator {
612	return BindingResourceCollectionIterator{page: page}
613}
614
615// IsEmpty returns true if the ListResult contains no values.
616func (brc BindingResourceCollection) IsEmpty() bool {
617	return brc.Value == nil || len(*brc.Value) == 0
618}
619
620// hasNextLink returns true if the NextLink is not empty.
621func (brc BindingResourceCollection) hasNextLink() bool {
622	return brc.NextLink != nil && len(*brc.NextLink) != 0
623}
624
625// bindingResourceCollectionPreparer prepares a request to retrieve the next set of results.
626// It returns nil if no more results exist.
627func (brc BindingResourceCollection) bindingResourceCollectionPreparer(ctx context.Context) (*http.Request, error) {
628	if !brc.hasNextLink() {
629		return nil, nil
630	}
631	return autorest.Prepare((&http.Request{}).WithContext(ctx),
632		autorest.AsJSON(),
633		autorest.AsGet(),
634		autorest.WithBaseURL(to.String(brc.NextLink)))
635}
636
637// BindingResourceCollectionPage contains a page of BindingResource values.
638type BindingResourceCollectionPage struct {
639	fn  func(context.Context, BindingResourceCollection) (BindingResourceCollection, error)
640	brc BindingResourceCollection
641}
642
643// NextWithContext advances to the next page of values.  If there was an error making
644// the request the page does not advance and the error is returned.
645func (page *BindingResourceCollectionPage) NextWithContext(ctx context.Context) (err error) {
646	if tracing.IsEnabled() {
647		ctx = tracing.StartSpan(ctx, fqdn+"/BindingResourceCollectionPage.NextWithContext")
648		defer func() {
649			sc := -1
650			if page.Response().Response.Response != nil {
651				sc = page.Response().Response.Response.StatusCode
652			}
653			tracing.EndSpan(ctx, sc, err)
654		}()
655	}
656	for {
657		next, err := page.fn(ctx, page.brc)
658		if err != nil {
659			return err
660		}
661		page.brc = next
662		if !next.hasNextLink() || !next.IsEmpty() {
663			break
664		}
665	}
666	return nil
667}
668
669// Next advances to the next page of values.  If there was an error making
670// the request the page does not advance and the error is returned.
671// Deprecated: Use NextWithContext() instead.
672func (page *BindingResourceCollectionPage) Next() error {
673	return page.NextWithContext(context.Background())
674}
675
676// NotDone returns true if the page enumeration should be started or is not yet complete.
677func (page BindingResourceCollectionPage) NotDone() bool {
678	return !page.brc.IsEmpty()
679}
680
681// Response returns the raw server response from the last page request.
682func (page BindingResourceCollectionPage) Response() BindingResourceCollection {
683	return page.brc
684}
685
686// Values returns the slice of values for the current page or nil if there are no values.
687func (page BindingResourceCollectionPage) Values() []BindingResource {
688	if page.brc.IsEmpty() {
689		return nil
690	}
691	return *page.brc.Value
692}
693
694// Creates a new instance of the BindingResourceCollectionPage type.
695func NewBindingResourceCollectionPage(cur BindingResourceCollection, getNextPage func(context.Context, BindingResourceCollection) (BindingResourceCollection, error)) BindingResourceCollectionPage {
696	return BindingResourceCollectionPage{
697		fn:  getNextPage,
698		brc: cur,
699	}
700}
701
702// BindingResourceProperties binding resource properties payload
703type BindingResourceProperties struct {
704	// ResourceName - READ-ONLY; The name of the bound resource
705	ResourceName *string `json:"resourceName,omitempty"`
706	// ResourceType - READ-ONLY; The standard Azure resource type of the bound resource
707	ResourceType *string `json:"resourceType,omitempty"`
708	// ResourceID - The Azure resource id of the bound resource
709	ResourceID *string `json:"resourceId,omitempty"`
710	// Key - The key of the bound resource
711	Key *string `json:"key,omitempty"`
712	// BindingParameters - Binding parameters of the Binding resource
713	BindingParameters map[string]interface{} `json:"bindingParameters"`
714	// GeneratedProperties - READ-ONLY; The generated Spring Boot property file for this binding. The secret will be deducted.
715	GeneratedProperties *string `json:"generatedProperties,omitempty"`
716	// CreatedAt - READ-ONLY; Creation time of the Binding resource
717	CreatedAt *string `json:"createdAt,omitempty"`
718	// UpdatedAt - READ-ONLY; Update time of the Binding resource
719	UpdatedAt *string `json:"updatedAt,omitempty"`
720}
721
722// MarshalJSON is the custom marshaler for BindingResourceProperties.
723func (brp BindingResourceProperties) MarshalJSON() ([]byte, error) {
724	objectMap := make(map[string]interface{})
725	if brp.ResourceID != nil {
726		objectMap["resourceId"] = brp.ResourceID
727	}
728	if brp.Key != nil {
729		objectMap["key"] = brp.Key
730	}
731	if brp.BindingParameters != nil {
732		objectMap["bindingParameters"] = brp.BindingParameters
733	}
734	return json.Marshal(objectMap)
735}
736
737// CertificateProperties certificate resource payload.
738type CertificateProperties struct {
739	// Thumbprint - READ-ONLY; The thumbprint of certificate.
740	Thumbprint *string `json:"thumbprint,omitempty"`
741	// VaultURI - The vault uri of user key vault.
742	VaultURI *string `json:"vaultUri,omitempty"`
743	// KeyVaultCertName - The certificate name of key vault.
744	KeyVaultCertName *string `json:"keyVaultCertName,omitempty"`
745	// CertVersion - The certificate version of key vault.
746	CertVersion *string `json:"certVersion,omitempty"`
747	// Issuer - READ-ONLY; The issuer of certificate.
748	Issuer *string `json:"issuer,omitempty"`
749	// IssuedDate - READ-ONLY; The issue date of certificate.
750	IssuedDate *string `json:"issuedDate,omitempty"`
751	// ExpirationDate - READ-ONLY; The expiration date of certificate.
752	ExpirationDate *string `json:"expirationDate,omitempty"`
753	// ActivateDate - READ-ONLY; The activate date of certificate.
754	ActivateDate *string `json:"activateDate,omitempty"`
755	// SubjectName - READ-ONLY; The subject name of certificate.
756	SubjectName *string `json:"subjectName,omitempty"`
757	// DNSNames - READ-ONLY; The domain list of certificate.
758	DNSNames *[]string `json:"dnsNames,omitempty"`
759}
760
761// MarshalJSON is the custom marshaler for CertificateProperties.
762func (cp CertificateProperties) MarshalJSON() ([]byte, error) {
763	objectMap := make(map[string]interface{})
764	if cp.VaultURI != nil {
765		objectMap["vaultUri"] = cp.VaultURI
766	}
767	if cp.KeyVaultCertName != nil {
768		objectMap["keyVaultCertName"] = cp.KeyVaultCertName
769	}
770	if cp.CertVersion != nil {
771		objectMap["certVersion"] = cp.CertVersion
772	}
773	return json.Marshal(objectMap)
774}
775
776// CertificateResource certificate resource payload.
777type CertificateResource struct {
778	autorest.Response `json:"-"`
779	// Properties - Properties of the certificate resource payload.
780	Properties *CertificateProperties `json:"properties,omitempty"`
781	// ID - READ-ONLY; Fully qualified resource Id for the resource.
782	ID *string `json:"id,omitempty"`
783	// Name - READ-ONLY; The name of the resource.
784	Name *string `json:"name,omitempty"`
785	// Type - READ-ONLY; The type of the resource.
786	Type *string `json:"type,omitempty"`
787}
788
789// MarshalJSON is the custom marshaler for CertificateResource.
790func (cr CertificateResource) MarshalJSON() ([]byte, error) {
791	objectMap := make(map[string]interface{})
792	if cr.Properties != nil {
793		objectMap["properties"] = cr.Properties
794	}
795	return json.Marshal(objectMap)
796}
797
798// CertificateResourceCollection collection compose of certificate resources list and a possible link for
799// next page.
800type CertificateResourceCollection struct {
801	autorest.Response `json:"-"`
802	// Value - The certificate resources list.
803	Value *[]CertificateResource `json:"value,omitempty"`
804	// NextLink - The link to next page of certificate list.
805	NextLink *string `json:"nextLink,omitempty"`
806}
807
808// CertificateResourceCollectionIterator provides access to a complete listing of CertificateResource
809// values.
810type CertificateResourceCollectionIterator struct {
811	i    int
812	page CertificateResourceCollectionPage
813}
814
815// NextWithContext advances to the next value.  If there was an error making
816// the request the iterator does not advance and the error is returned.
817func (iter *CertificateResourceCollectionIterator) NextWithContext(ctx context.Context) (err error) {
818	if tracing.IsEnabled() {
819		ctx = tracing.StartSpan(ctx, fqdn+"/CertificateResourceCollectionIterator.NextWithContext")
820		defer func() {
821			sc := -1
822			if iter.Response().Response.Response != nil {
823				sc = iter.Response().Response.Response.StatusCode
824			}
825			tracing.EndSpan(ctx, sc, err)
826		}()
827	}
828	iter.i++
829	if iter.i < len(iter.page.Values()) {
830		return nil
831	}
832	err = iter.page.NextWithContext(ctx)
833	if err != nil {
834		iter.i--
835		return err
836	}
837	iter.i = 0
838	return nil
839}
840
841// Next advances to the next value.  If there was an error making
842// the request the iterator does not advance and the error is returned.
843// Deprecated: Use NextWithContext() instead.
844func (iter *CertificateResourceCollectionIterator) Next() error {
845	return iter.NextWithContext(context.Background())
846}
847
848// NotDone returns true if the enumeration should be started or is not yet complete.
849func (iter CertificateResourceCollectionIterator) NotDone() bool {
850	return iter.page.NotDone() && iter.i < len(iter.page.Values())
851}
852
853// Response returns the raw server response from the last page request.
854func (iter CertificateResourceCollectionIterator) Response() CertificateResourceCollection {
855	return iter.page.Response()
856}
857
858// Value returns the current value or a zero-initialized value if the
859// iterator has advanced beyond the end of the collection.
860func (iter CertificateResourceCollectionIterator) Value() CertificateResource {
861	if !iter.page.NotDone() {
862		return CertificateResource{}
863	}
864	return iter.page.Values()[iter.i]
865}
866
867// Creates a new instance of the CertificateResourceCollectionIterator type.
868func NewCertificateResourceCollectionIterator(page CertificateResourceCollectionPage) CertificateResourceCollectionIterator {
869	return CertificateResourceCollectionIterator{page: page}
870}
871
872// IsEmpty returns true if the ListResult contains no values.
873func (crc CertificateResourceCollection) IsEmpty() bool {
874	return crc.Value == nil || len(*crc.Value) == 0
875}
876
877// hasNextLink returns true if the NextLink is not empty.
878func (crc CertificateResourceCollection) hasNextLink() bool {
879	return crc.NextLink != nil && len(*crc.NextLink) != 0
880}
881
882// certificateResourceCollectionPreparer prepares a request to retrieve the next set of results.
883// It returns nil if no more results exist.
884func (crc CertificateResourceCollection) certificateResourceCollectionPreparer(ctx context.Context) (*http.Request, error) {
885	if !crc.hasNextLink() {
886		return nil, nil
887	}
888	return autorest.Prepare((&http.Request{}).WithContext(ctx),
889		autorest.AsJSON(),
890		autorest.AsGet(),
891		autorest.WithBaseURL(to.String(crc.NextLink)))
892}
893
894// CertificateResourceCollectionPage contains a page of CertificateResource values.
895type CertificateResourceCollectionPage struct {
896	fn  func(context.Context, CertificateResourceCollection) (CertificateResourceCollection, error)
897	crc CertificateResourceCollection
898}
899
900// NextWithContext advances to the next page of values.  If there was an error making
901// the request the page does not advance and the error is returned.
902func (page *CertificateResourceCollectionPage) NextWithContext(ctx context.Context) (err error) {
903	if tracing.IsEnabled() {
904		ctx = tracing.StartSpan(ctx, fqdn+"/CertificateResourceCollectionPage.NextWithContext")
905		defer func() {
906			sc := -1
907			if page.Response().Response.Response != nil {
908				sc = page.Response().Response.Response.StatusCode
909			}
910			tracing.EndSpan(ctx, sc, err)
911		}()
912	}
913	for {
914		next, err := page.fn(ctx, page.crc)
915		if err != nil {
916			return err
917		}
918		page.crc = next
919		if !next.hasNextLink() || !next.IsEmpty() {
920			break
921		}
922	}
923	return nil
924}
925
926// Next advances to the next page of values.  If there was an error making
927// the request the page does not advance and the error is returned.
928// Deprecated: Use NextWithContext() instead.
929func (page *CertificateResourceCollectionPage) Next() error {
930	return page.NextWithContext(context.Background())
931}
932
933// NotDone returns true if the page enumeration should be started or is not yet complete.
934func (page CertificateResourceCollectionPage) NotDone() bool {
935	return !page.crc.IsEmpty()
936}
937
938// Response returns the raw server response from the last page request.
939func (page CertificateResourceCollectionPage) Response() CertificateResourceCollection {
940	return page.crc
941}
942
943// Values returns the slice of values for the current page or nil if there are no values.
944func (page CertificateResourceCollectionPage) Values() []CertificateResource {
945	if page.crc.IsEmpty() {
946		return nil
947	}
948	return *page.crc.Value
949}
950
951// Creates a new instance of the CertificateResourceCollectionPage type.
952func NewCertificateResourceCollectionPage(cur CertificateResourceCollection, getNextPage func(context.Context, CertificateResourceCollection) (CertificateResourceCollection, error)) CertificateResourceCollectionPage {
953	return CertificateResourceCollectionPage{
954		fn:  getNextPage,
955		crc: cur,
956	}
957}
958
959// CloudError an error response from the service.
960type CloudError struct {
961	Error *CloudErrorBody `json:"error,omitempty"`
962}
963
964// CloudErrorBody an error response from the service.
965type CloudErrorBody struct {
966	// Code - An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
967	Code *string `json:"code,omitempty"`
968	// Message - A message describing the error, intended to be suitable for display in a user interface.
969	Message *string `json:"message,omitempty"`
970	// Target - The target of the particular error. For example, the name of the property in error.
971	Target *string `json:"target,omitempty"`
972	// Details - A list of additional details about the error.
973	Details *[]CloudErrorBody `json:"details,omitempty"`
974}
975
976// ClusterResourceProperties service properties payload
977type ClusterResourceProperties struct {
978	// ProvisioningState - READ-ONLY; Provisioning state of the Service. Possible values include: 'ProvisioningStateCreating', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateDeleted', 'ProvisioningStateSucceeded', 'ProvisioningStateFailed', 'ProvisioningStateMoving', 'ProvisioningStateMoved', 'ProvisioningStateMoveFailed'
979	ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
980	// ConfigServerProperties - Config server git properties of the Service
981	ConfigServerProperties *ConfigServerProperties `json:"configServerProperties,omitempty"`
982	// Trace - Trace properties of the Service
983	Trace *TraceProperties `json:"trace,omitempty"`
984	// NetworkProfile - Network profile of the Service
985	NetworkProfile *NetworkProfile `json:"networkProfile,omitempty"`
986	// Version - READ-ONLY; Version of the Service
987	Version *int32 `json:"version,omitempty"`
988	// ServiceID - READ-ONLY; ServiceInstanceEntity GUID which uniquely identifies a created resource
989	ServiceID *string `json:"serviceId,omitempty"`
990}
991
992// MarshalJSON is the custom marshaler for ClusterResourceProperties.
993func (crp ClusterResourceProperties) MarshalJSON() ([]byte, error) {
994	objectMap := make(map[string]interface{})
995	if crp.ConfigServerProperties != nil {
996		objectMap["configServerProperties"] = crp.ConfigServerProperties
997	}
998	if crp.Trace != nil {
999		objectMap["trace"] = crp.Trace
1000	}
1001	if crp.NetworkProfile != nil {
1002		objectMap["networkProfile"] = crp.NetworkProfile
1003	}
1004	return json.Marshal(objectMap)
1005}
1006
1007// ConfigServerGitProperty property of git.
1008type ConfigServerGitProperty struct {
1009	// Repositories - Repositories of git.
1010	Repositories *[]GitPatternRepository `json:"repositories,omitempty"`
1011	// URI - URI of the repository
1012	URI *string `json:"uri,omitempty"`
1013	// Label - Label of the repository
1014	Label *string `json:"label,omitempty"`
1015	// SearchPaths - Searching path of the repository
1016	SearchPaths *[]string `json:"searchPaths,omitempty"`
1017	// Username - Username of git repository basic auth.
1018	Username *string `json:"username,omitempty"`
1019	// Password - Password of git repository basic auth.
1020	Password *string `json:"password,omitempty"`
1021	// HostKey - Public sshKey of git repository.
1022	HostKey *string `json:"hostKey,omitempty"`
1023	// HostKeyAlgorithm - SshKey algorithm of git repository.
1024	HostKeyAlgorithm *string `json:"hostKeyAlgorithm,omitempty"`
1025	// PrivateKey - Private sshKey algorithm of git repository.
1026	PrivateKey *string `json:"privateKey,omitempty"`
1027	// StrictHostKeyChecking - Strict host key checking or not.
1028	StrictHostKeyChecking *bool `json:"strictHostKeyChecking,omitempty"`
1029}
1030
1031// ConfigServerProperties config server git properties payload
1032type ConfigServerProperties struct {
1033	// State - READ-ONLY; State of the config server. Possible values include: 'ConfigServerStateNotAvailable', 'ConfigServerStateDeleted', 'ConfigServerStateFailed', 'ConfigServerStateSucceeded', 'ConfigServerStateUpdating'
1034	State ConfigServerState `json:"state,omitempty"`
1035	// Error - Error when apply config server settings.
1036	Error *Error `json:"error,omitempty"`
1037	// ConfigServer - Settings of config server.
1038	ConfigServer *ConfigServerSettings `json:"configServer,omitempty"`
1039}
1040
1041// MarshalJSON is the custom marshaler for ConfigServerProperties.
1042func (csp ConfigServerProperties) MarshalJSON() ([]byte, error) {
1043	objectMap := make(map[string]interface{})
1044	if csp.Error != nil {
1045		objectMap["error"] = csp.Error
1046	}
1047	if csp.ConfigServer != nil {
1048		objectMap["configServer"] = csp.ConfigServer
1049	}
1050	return json.Marshal(objectMap)
1051}
1052
1053// ConfigServerSettings the settings of config server.
1054type ConfigServerSettings struct {
1055	// GitProperty - Property of git environment.
1056	GitProperty *ConfigServerGitProperty `json:"gitProperty,omitempty"`
1057}
1058
1059// CustomDomainProperties custom domain of app resource payload.
1060type CustomDomainProperties struct {
1061	// Thumbprint - The thumbprint of bound certificate.
1062	Thumbprint *string `json:"thumbprint,omitempty"`
1063	// AppName - READ-ONLY; The app name of domain.
1064	AppName *string `json:"appName,omitempty"`
1065	// CertName - The bound certificate name of domain.
1066	CertName *string `json:"certName,omitempty"`
1067}
1068
1069// MarshalJSON is the custom marshaler for CustomDomainProperties.
1070func (cdp CustomDomainProperties) MarshalJSON() ([]byte, error) {
1071	objectMap := make(map[string]interface{})
1072	if cdp.Thumbprint != nil {
1073		objectMap["thumbprint"] = cdp.Thumbprint
1074	}
1075	if cdp.CertName != nil {
1076		objectMap["certName"] = cdp.CertName
1077	}
1078	return json.Marshal(objectMap)
1079}
1080
1081// CustomDomainResource custom domain resource payload.
1082type CustomDomainResource struct {
1083	autorest.Response `json:"-"`
1084	// Properties - Properties of the custom domain resource.
1085	Properties *CustomDomainProperties `json:"properties,omitempty"`
1086	// ID - READ-ONLY; Fully qualified resource Id for the resource.
1087	ID *string `json:"id,omitempty"`
1088	// Name - READ-ONLY; The name of the resource.
1089	Name *string `json:"name,omitempty"`
1090	// Type - READ-ONLY; The type of the resource.
1091	Type *string `json:"type,omitempty"`
1092}
1093
1094// MarshalJSON is the custom marshaler for CustomDomainResource.
1095func (cdr CustomDomainResource) MarshalJSON() ([]byte, error) {
1096	objectMap := make(map[string]interface{})
1097	if cdr.Properties != nil {
1098		objectMap["properties"] = cdr.Properties
1099	}
1100	return json.Marshal(objectMap)
1101}
1102
1103// CustomDomainResourceCollection collection compose of a custom domain resources list and a possible link
1104// for next page.
1105type CustomDomainResourceCollection struct {
1106	autorest.Response `json:"-"`
1107	// Value - The custom domain resources list.
1108	Value *[]CustomDomainResource `json:"value,omitempty"`
1109	// NextLink - The link to next page of custom domain list.
1110	NextLink *string `json:"nextLink,omitempty"`
1111}
1112
1113// CustomDomainResourceCollectionIterator provides access to a complete listing of CustomDomainResource
1114// values.
1115type CustomDomainResourceCollectionIterator struct {
1116	i    int
1117	page CustomDomainResourceCollectionPage
1118}
1119
1120// NextWithContext advances to the next value.  If there was an error making
1121// the request the iterator does not advance and the error is returned.
1122func (iter *CustomDomainResourceCollectionIterator) NextWithContext(ctx context.Context) (err error) {
1123	if tracing.IsEnabled() {
1124		ctx = tracing.StartSpan(ctx, fqdn+"/CustomDomainResourceCollectionIterator.NextWithContext")
1125		defer func() {
1126			sc := -1
1127			if iter.Response().Response.Response != nil {
1128				sc = iter.Response().Response.Response.StatusCode
1129			}
1130			tracing.EndSpan(ctx, sc, err)
1131		}()
1132	}
1133	iter.i++
1134	if iter.i < len(iter.page.Values()) {
1135		return nil
1136	}
1137	err = iter.page.NextWithContext(ctx)
1138	if err != nil {
1139		iter.i--
1140		return err
1141	}
1142	iter.i = 0
1143	return nil
1144}
1145
1146// Next advances to the next value.  If there was an error making
1147// the request the iterator does not advance and the error is returned.
1148// Deprecated: Use NextWithContext() instead.
1149func (iter *CustomDomainResourceCollectionIterator) Next() error {
1150	return iter.NextWithContext(context.Background())
1151}
1152
1153// NotDone returns true if the enumeration should be started or is not yet complete.
1154func (iter CustomDomainResourceCollectionIterator) NotDone() bool {
1155	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1156}
1157
1158// Response returns the raw server response from the last page request.
1159func (iter CustomDomainResourceCollectionIterator) Response() CustomDomainResourceCollection {
1160	return iter.page.Response()
1161}
1162
1163// Value returns the current value or a zero-initialized value if the
1164// iterator has advanced beyond the end of the collection.
1165func (iter CustomDomainResourceCollectionIterator) Value() CustomDomainResource {
1166	if !iter.page.NotDone() {
1167		return CustomDomainResource{}
1168	}
1169	return iter.page.Values()[iter.i]
1170}
1171
1172// Creates a new instance of the CustomDomainResourceCollectionIterator type.
1173func NewCustomDomainResourceCollectionIterator(page CustomDomainResourceCollectionPage) CustomDomainResourceCollectionIterator {
1174	return CustomDomainResourceCollectionIterator{page: page}
1175}
1176
1177// IsEmpty returns true if the ListResult contains no values.
1178func (cdrc CustomDomainResourceCollection) IsEmpty() bool {
1179	return cdrc.Value == nil || len(*cdrc.Value) == 0
1180}
1181
1182// hasNextLink returns true if the NextLink is not empty.
1183func (cdrc CustomDomainResourceCollection) hasNextLink() bool {
1184	return cdrc.NextLink != nil && len(*cdrc.NextLink) != 0
1185}
1186
1187// customDomainResourceCollectionPreparer prepares a request to retrieve the next set of results.
1188// It returns nil if no more results exist.
1189func (cdrc CustomDomainResourceCollection) customDomainResourceCollectionPreparer(ctx context.Context) (*http.Request, error) {
1190	if !cdrc.hasNextLink() {
1191		return nil, nil
1192	}
1193	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1194		autorest.AsJSON(),
1195		autorest.AsGet(),
1196		autorest.WithBaseURL(to.String(cdrc.NextLink)))
1197}
1198
1199// CustomDomainResourceCollectionPage contains a page of CustomDomainResource values.
1200type CustomDomainResourceCollectionPage struct {
1201	fn   func(context.Context, CustomDomainResourceCollection) (CustomDomainResourceCollection, error)
1202	cdrc CustomDomainResourceCollection
1203}
1204
1205// NextWithContext advances to the next page of values.  If there was an error making
1206// the request the page does not advance and the error is returned.
1207func (page *CustomDomainResourceCollectionPage) NextWithContext(ctx context.Context) (err error) {
1208	if tracing.IsEnabled() {
1209		ctx = tracing.StartSpan(ctx, fqdn+"/CustomDomainResourceCollectionPage.NextWithContext")
1210		defer func() {
1211			sc := -1
1212			if page.Response().Response.Response != nil {
1213				sc = page.Response().Response.Response.StatusCode
1214			}
1215			tracing.EndSpan(ctx, sc, err)
1216		}()
1217	}
1218	for {
1219		next, err := page.fn(ctx, page.cdrc)
1220		if err != nil {
1221			return err
1222		}
1223		page.cdrc = next
1224		if !next.hasNextLink() || !next.IsEmpty() {
1225			break
1226		}
1227	}
1228	return nil
1229}
1230
1231// Next advances to the next page of values.  If there was an error making
1232// the request the page does not advance and the error is returned.
1233// Deprecated: Use NextWithContext() instead.
1234func (page *CustomDomainResourceCollectionPage) Next() error {
1235	return page.NextWithContext(context.Background())
1236}
1237
1238// NotDone returns true if the page enumeration should be started or is not yet complete.
1239func (page CustomDomainResourceCollectionPage) NotDone() bool {
1240	return !page.cdrc.IsEmpty()
1241}
1242
1243// Response returns the raw server response from the last page request.
1244func (page CustomDomainResourceCollectionPage) Response() CustomDomainResourceCollection {
1245	return page.cdrc
1246}
1247
1248// Values returns the slice of values for the current page or nil if there are no values.
1249func (page CustomDomainResourceCollectionPage) Values() []CustomDomainResource {
1250	if page.cdrc.IsEmpty() {
1251		return nil
1252	}
1253	return *page.cdrc.Value
1254}
1255
1256// Creates a new instance of the CustomDomainResourceCollectionPage type.
1257func NewCustomDomainResourceCollectionPage(cur CustomDomainResourceCollection, getNextPage func(context.Context, CustomDomainResourceCollection) (CustomDomainResourceCollection, error)) CustomDomainResourceCollectionPage {
1258	return CustomDomainResourceCollectionPage{
1259		fn:   getNextPage,
1260		cdrc: cur,
1261	}
1262}
1263
1264// CustomDomainValidatePayload custom domain validate payload.
1265type CustomDomainValidatePayload struct {
1266	// Name - Name to be validated
1267	Name *string `json:"name,omitempty"`
1268}
1269
1270// CustomDomainValidateResult validation result for custom domain.
1271type CustomDomainValidateResult struct {
1272	autorest.Response `json:"-"`
1273	// IsValid - Indicates if domain name is valid.
1274	IsValid *bool `json:"isValid,omitempty"`
1275	// Message - Message of why domain name is invalid.
1276	Message *string `json:"message,omitempty"`
1277}
1278
1279// DeploymentInstance deployment instance payload
1280type DeploymentInstance struct {
1281	// Name - READ-ONLY; Name of the deployment instance
1282	Name *string `json:"name,omitempty"`
1283	// Status - READ-ONLY; Status of the deployment instance
1284	Status *string `json:"status,omitempty"`
1285	// Reason - READ-ONLY; Failed reason of the deployment instance
1286	Reason *string `json:"reason,omitempty"`
1287	// DiscoveryStatus - READ-ONLY; Discovery status of the deployment instance
1288	DiscoveryStatus *string `json:"discoveryStatus,omitempty"`
1289	// StartTime - READ-ONLY; Start time of the deployment instance
1290	StartTime *string `json:"startTime,omitempty"`
1291}
1292
1293// MarshalJSON is the custom marshaler for DeploymentInstance.
1294func (di DeploymentInstance) MarshalJSON() ([]byte, error) {
1295	objectMap := make(map[string]interface{})
1296	return json.Marshal(objectMap)
1297}
1298
1299// DeploymentResource deployment resource payload
1300type DeploymentResource struct {
1301	autorest.Response `json:"-"`
1302	// Properties - Properties of the Deployment resource
1303	Properties *DeploymentResourceProperties `json:"properties,omitempty"`
1304	// ID - READ-ONLY; Fully qualified resource Id for the resource.
1305	ID *string `json:"id,omitempty"`
1306	// Name - READ-ONLY; The name of the resource.
1307	Name *string `json:"name,omitempty"`
1308	// Type - READ-ONLY; The type of the resource.
1309	Type *string `json:"type,omitempty"`
1310}
1311
1312// MarshalJSON is the custom marshaler for DeploymentResource.
1313func (dr DeploymentResource) MarshalJSON() ([]byte, error) {
1314	objectMap := make(map[string]interface{})
1315	if dr.Properties != nil {
1316		objectMap["properties"] = dr.Properties
1317	}
1318	return json.Marshal(objectMap)
1319}
1320
1321// DeploymentResourceCollection object that includes an array of App resources and a possible link for next
1322// set
1323type DeploymentResourceCollection struct {
1324	autorest.Response `json:"-"`
1325	// Value - Collection of Deployment resources
1326	Value *[]DeploymentResource `json:"value,omitempty"`
1327	// NextLink - URL client should use to fetch the next page (per server side paging).
1328	// It's null for now, added for future use.
1329	NextLink *string `json:"nextLink,omitempty"`
1330}
1331
1332// DeploymentResourceCollectionIterator provides access to a complete listing of DeploymentResource values.
1333type DeploymentResourceCollectionIterator struct {
1334	i    int
1335	page DeploymentResourceCollectionPage
1336}
1337
1338// NextWithContext advances to the next value.  If there was an error making
1339// the request the iterator does not advance and the error is returned.
1340func (iter *DeploymentResourceCollectionIterator) NextWithContext(ctx context.Context) (err error) {
1341	if tracing.IsEnabled() {
1342		ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentResourceCollectionIterator.NextWithContext")
1343		defer func() {
1344			sc := -1
1345			if iter.Response().Response.Response != nil {
1346				sc = iter.Response().Response.Response.StatusCode
1347			}
1348			tracing.EndSpan(ctx, sc, err)
1349		}()
1350	}
1351	iter.i++
1352	if iter.i < len(iter.page.Values()) {
1353		return nil
1354	}
1355	err = iter.page.NextWithContext(ctx)
1356	if err != nil {
1357		iter.i--
1358		return err
1359	}
1360	iter.i = 0
1361	return nil
1362}
1363
1364// Next advances to the next value.  If there was an error making
1365// the request the iterator does not advance and the error is returned.
1366// Deprecated: Use NextWithContext() instead.
1367func (iter *DeploymentResourceCollectionIterator) Next() error {
1368	return iter.NextWithContext(context.Background())
1369}
1370
1371// NotDone returns true if the enumeration should be started or is not yet complete.
1372func (iter DeploymentResourceCollectionIterator) NotDone() bool {
1373	return iter.page.NotDone() && iter.i < len(iter.page.Values())
1374}
1375
1376// Response returns the raw server response from the last page request.
1377func (iter DeploymentResourceCollectionIterator) Response() DeploymentResourceCollection {
1378	return iter.page.Response()
1379}
1380
1381// Value returns the current value or a zero-initialized value if the
1382// iterator has advanced beyond the end of the collection.
1383func (iter DeploymentResourceCollectionIterator) Value() DeploymentResource {
1384	if !iter.page.NotDone() {
1385		return DeploymentResource{}
1386	}
1387	return iter.page.Values()[iter.i]
1388}
1389
1390// Creates a new instance of the DeploymentResourceCollectionIterator type.
1391func NewDeploymentResourceCollectionIterator(page DeploymentResourceCollectionPage) DeploymentResourceCollectionIterator {
1392	return DeploymentResourceCollectionIterator{page: page}
1393}
1394
1395// IsEmpty returns true if the ListResult contains no values.
1396func (drc DeploymentResourceCollection) IsEmpty() bool {
1397	return drc.Value == nil || len(*drc.Value) == 0
1398}
1399
1400// hasNextLink returns true if the NextLink is not empty.
1401func (drc DeploymentResourceCollection) hasNextLink() bool {
1402	return drc.NextLink != nil && len(*drc.NextLink) != 0
1403}
1404
1405// deploymentResourceCollectionPreparer prepares a request to retrieve the next set of results.
1406// It returns nil if no more results exist.
1407func (drc DeploymentResourceCollection) deploymentResourceCollectionPreparer(ctx context.Context) (*http.Request, error) {
1408	if !drc.hasNextLink() {
1409		return nil, nil
1410	}
1411	return autorest.Prepare((&http.Request{}).WithContext(ctx),
1412		autorest.AsJSON(),
1413		autorest.AsGet(),
1414		autorest.WithBaseURL(to.String(drc.NextLink)))
1415}
1416
1417// DeploymentResourceCollectionPage contains a page of DeploymentResource values.
1418type DeploymentResourceCollectionPage struct {
1419	fn  func(context.Context, DeploymentResourceCollection) (DeploymentResourceCollection, error)
1420	drc DeploymentResourceCollection
1421}
1422
1423// NextWithContext advances to the next page of values.  If there was an error making
1424// the request the page does not advance and the error is returned.
1425func (page *DeploymentResourceCollectionPage) NextWithContext(ctx context.Context) (err error) {
1426	if tracing.IsEnabled() {
1427		ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentResourceCollectionPage.NextWithContext")
1428		defer func() {
1429			sc := -1
1430			if page.Response().Response.Response != nil {
1431				sc = page.Response().Response.Response.StatusCode
1432			}
1433			tracing.EndSpan(ctx, sc, err)
1434		}()
1435	}
1436	for {
1437		next, err := page.fn(ctx, page.drc)
1438		if err != nil {
1439			return err
1440		}
1441		page.drc = next
1442		if !next.hasNextLink() || !next.IsEmpty() {
1443			break
1444		}
1445	}
1446	return nil
1447}
1448
1449// Next advances to the next page of values.  If there was an error making
1450// the request the page does not advance and the error is returned.
1451// Deprecated: Use NextWithContext() instead.
1452func (page *DeploymentResourceCollectionPage) Next() error {
1453	return page.NextWithContext(context.Background())
1454}
1455
1456// NotDone returns true if the page enumeration should be started or is not yet complete.
1457func (page DeploymentResourceCollectionPage) NotDone() bool {
1458	return !page.drc.IsEmpty()
1459}
1460
1461// Response returns the raw server response from the last page request.
1462func (page DeploymentResourceCollectionPage) Response() DeploymentResourceCollection {
1463	return page.drc
1464}
1465
1466// Values returns the slice of values for the current page or nil if there are no values.
1467func (page DeploymentResourceCollectionPage) Values() []DeploymentResource {
1468	if page.drc.IsEmpty() {
1469		return nil
1470	}
1471	return *page.drc.Value
1472}
1473
1474// Creates a new instance of the DeploymentResourceCollectionPage type.
1475func NewDeploymentResourceCollectionPage(cur DeploymentResourceCollection, getNextPage func(context.Context, DeploymentResourceCollection) (DeploymentResourceCollection, error)) DeploymentResourceCollectionPage {
1476	return DeploymentResourceCollectionPage{
1477		fn:  getNextPage,
1478		drc: cur,
1479	}
1480}
1481
1482// DeploymentResourceProperties deployment resource properties payload
1483type DeploymentResourceProperties struct {
1484	// Source - Uploaded source information of the deployment.
1485	Source *UserSourceInfo `json:"source,omitempty"`
1486	// AppName - READ-ONLY; App name of the deployment
1487	AppName *string `json:"appName,omitempty"`
1488	// DeploymentSettings - Deployment settings of the Deployment
1489	DeploymentSettings *DeploymentSettings `json:"deploymentSettings,omitempty"`
1490	// ProvisioningState - READ-ONLY; Provisioning state of the Deployment. Possible values include: 'DeploymentResourceProvisioningStateCreating', 'DeploymentResourceProvisioningStateUpdating', 'DeploymentResourceProvisioningStateSucceeded', 'DeploymentResourceProvisioningStateFailed'
1491	ProvisioningState DeploymentResourceProvisioningState `json:"provisioningState,omitempty"`
1492	// Status - READ-ONLY; Status of the Deployment. Possible values include: 'DeploymentResourceStatusUnknown', 'DeploymentResourceStatusStopped', 'DeploymentResourceStatusRunning', 'DeploymentResourceStatusFailed', 'DeploymentResourceStatusAllocating', 'DeploymentResourceStatusUpgrading', 'DeploymentResourceStatusCompiling'
1493	Status DeploymentResourceStatus `json:"status,omitempty"`
1494	// Active - READ-ONLY; Indicates whether the Deployment is active
1495	Active *bool `json:"active,omitempty"`
1496	// CreatedTime - READ-ONLY; Date time when the resource is created
1497	CreatedTime *date.Time `json:"createdTime,omitempty"`
1498	// Instances - READ-ONLY; Collection of instances belong to the Deployment
1499	Instances *[]DeploymentInstance `json:"instances,omitempty"`
1500}
1501
1502// MarshalJSON is the custom marshaler for DeploymentResourceProperties.
1503func (drp DeploymentResourceProperties) MarshalJSON() ([]byte, error) {
1504	objectMap := make(map[string]interface{})
1505	if drp.Source != nil {
1506		objectMap["source"] = drp.Source
1507	}
1508	if drp.DeploymentSettings != nil {
1509		objectMap["deploymentSettings"] = drp.DeploymentSettings
1510	}
1511	return json.Marshal(objectMap)
1512}
1513
1514// DeploymentsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
1515// long-running operation.
1516type DeploymentsCreateOrUpdateFuture struct {
1517	azure.FutureAPI
1518	// Result returns the result of the asynchronous operation.
1519	// If the operation has not completed it will return an error.
1520	Result func(DeploymentsClient) (DeploymentResource, error)
1521}
1522
1523// UnmarshalJSON is the custom unmarshaller for CreateFuture.
1524func (future *DeploymentsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
1525	var azFuture azure.Future
1526	if err := json.Unmarshal(body, &azFuture); err != nil {
1527		return err
1528	}
1529	future.FutureAPI = &azFuture
1530	future.Result = future.result
1531	return nil
1532}
1533
1534// result is the default implementation for DeploymentsCreateOrUpdateFuture.Result.
1535func (future *DeploymentsCreateOrUpdateFuture) result(client DeploymentsClient) (dr DeploymentResource, err error) {
1536	var done bool
1537	done, err = future.DoneWithContext(context.Background(), client)
1538	if err != nil {
1539		err = autorest.NewErrorWithError(err, "appplatform.DeploymentsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
1540		return
1541	}
1542	if !done {
1543		dr.Response.Response = future.Response()
1544		err = azure.NewAsyncOpIncompleteError("appplatform.DeploymentsCreateOrUpdateFuture")
1545		return
1546	}
1547	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1548	if dr.Response.Response, err = future.GetResult(sender); err == nil && dr.Response.Response.StatusCode != http.StatusNoContent {
1549		dr, err = client.CreateOrUpdateResponder(dr.Response.Response)
1550		if err != nil {
1551			err = autorest.NewErrorWithError(err, "appplatform.DeploymentsCreateOrUpdateFuture", "Result", dr.Response.Response, "Failure responding to request")
1552		}
1553	}
1554	return
1555}
1556
1557// DeploymentSettings deployment settings payload
1558type DeploymentSettings struct {
1559	// CPU - Required CPU, basic tier should be 1, standard tier should be in range (1, 4)
1560	CPU *int32 `json:"cpu,omitempty"`
1561	// MemoryInGB - Required Memory size in GB, basic tier should be in range (1, 2), standard tier should be in range (1, 8)
1562	MemoryInGB *int32 `json:"memoryInGB,omitempty"`
1563	// JvmOptions - JVM parameter
1564	JvmOptions *string `json:"jvmOptions,omitempty"`
1565	// NetCoreMainEntryPath - The path to the .NET executable relative to zip root
1566	NetCoreMainEntryPath *string `json:"netCoreMainEntryPath,omitempty"`
1567	// InstanceCount - Instance count, basic tier should be in range (1, 25), standard tier should be in range (1, 500)
1568	InstanceCount *int32 `json:"instanceCount,omitempty"`
1569	// EnvironmentVariables - Collection of environment variables
1570	EnvironmentVariables map[string]*string `json:"environmentVariables"`
1571	// RuntimeVersion - Runtime version. Possible values include: 'Java8', 'Java11', 'NetCore31'
1572	RuntimeVersion RuntimeVersion `json:"runtimeVersion,omitempty"`
1573}
1574
1575// MarshalJSON is the custom marshaler for DeploymentSettings.
1576func (ds DeploymentSettings) MarshalJSON() ([]byte, error) {
1577	objectMap := make(map[string]interface{})
1578	if ds.CPU != nil {
1579		objectMap["cpu"] = ds.CPU
1580	}
1581	if ds.MemoryInGB != nil {
1582		objectMap["memoryInGB"] = ds.MemoryInGB
1583	}
1584	if ds.JvmOptions != nil {
1585		objectMap["jvmOptions"] = ds.JvmOptions
1586	}
1587	if ds.NetCoreMainEntryPath != nil {
1588		objectMap["netCoreMainEntryPath"] = ds.NetCoreMainEntryPath
1589	}
1590	if ds.InstanceCount != nil {
1591		objectMap["instanceCount"] = ds.InstanceCount
1592	}
1593	if ds.EnvironmentVariables != nil {
1594		objectMap["environmentVariables"] = ds.EnvironmentVariables
1595	}
1596	if ds.RuntimeVersion != "" {
1597		objectMap["runtimeVersion"] = ds.RuntimeVersion
1598	}
1599	return json.Marshal(objectMap)
1600}
1601
1602// DeploymentsRestartFuture an abstraction for monitoring and retrieving the results of a long-running
1603// operation.
1604type DeploymentsRestartFuture struct {
1605	azure.FutureAPI
1606	// Result returns the result of the asynchronous operation.
1607	// If the operation has not completed it will return an error.
1608	Result func(DeploymentsClient) (autorest.Response, error)
1609}
1610
1611// UnmarshalJSON is the custom unmarshaller for CreateFuture.
1612func (future *DeploymentsRestartFuture) UnmarshalJSON(body []byte) error {
1613	var azFuture azure.Future
1614	if err := json.Unmarshal(body, &azFuture); err != nil {
1615		return err
1616	}
1617	future.FutureAPI = &azFuture
1618	future.Result = future.result
1619	return nil
1620}
1621
1622// result is the default implementation for DeploymentsRestartFuture.Result.
1623func (future *DeploymentsRestartFuture) result(client DeploymentsClient) (ar autorest.Response, err error) {
1624	var done bool
1625	done, err = future.DoneWithContext(context.Background(), client)
1626	if err != nil {
1627		err = autorest.NewErrorWithError(err, "appplatform.DeploymentsRestartFuture", "Result", future.Response(), "Polling failure")
1628		return
1629	}
1630	if !done {
1631		ar.Response = future.Response()
1632		err = azure.NewAsyncOpIncompleteError("appplatform.DeploymentsRestartFuture")
1633		return
1634	}
1635	ar.Response = future.Response()
1636	return
1637}
1638
1639// DeploymentsStartFuture an abstraction for monitoring and retrieving the results of a long-running
1640// operation.
1641type DeploymentsStartFuture struct {
1642	azure.FutureAPI
1643	// Result returns the result of the asynchronous operation.
1644	// If the operation has not completed it will return an error.
1645	Result func(DeploymentsClient) (autorest.Response, error)
1646}
1647
1648// UnmarshalJSON is the custom unmarshaller for CreateFuture.
1649func (future *DeploymentsStartFuture) UnmarshalJSON(body []byte) error {
1650	var azFuture azure.Future
1651	if err := json.Unmarshal(body, &azFuture); err != nil {
1652		return err
1653	}
1654	future.FutureAPI = &azFuture
1655	future.Result = future.result
1656	return nil
1657}
1658
1659// result is the default implementation for DeploymentsStartFuture.Result.
1660func (future *DeploymentsStartFuture) result(client DeploymentsClient) (ar autorest.Response, err error) {
1661	var done bool
1662	done, err = future.DoneWithContext(context.Background(), client)
1663	if err != nil {
1664		err = autorest.NewErrorWithError(err, "appplatform.DeploymentsStartFuture", "Result", future.Response(), "Polling failure")
1665		return
1666	}
1667	if !done {
1668		ar.Response = future.Response()
1669		err = azure.NewAsyncOpIncompleteError("appplatform.DeploymentsStartFuture")
1670		return
1671	}
1672	ar.Response = future.Response()
1673	return
1674}
1675
1676// DeploymentsStopFuture an abstraction for monitoring and retrieving the results of a long-running
1677// operation.
1678type DeploymentsStopFuture struct {
1679	azure.FutureAPI
1680	// Result returns the result of the asynchronous operation.
1681	// If the operation has not completed it will return an error.
1682	Result func(DeploymentsClient) (autorest.Response, error)
1683}
1684
1685// UnmarshalJSON is the custom unmarshaller for CreateFuture.
1686func (future *DeploymentsStopFuture) UnmarshalJSON(body []byte) error {
1687	var azFuture azure.Future
1688	if err := json.Unmarshal(body, &azFuture); err != nil {
1689		return err
1690	}
1691	future.FutureAPI = &azFuture
1692	future.Result = future.result
1693	return nil
1694}
1695
1696// result is the default implementation for DeploymentsStopFuture.Result.
1697func (future *DeploymentsStopFuture) result(client DeploymentsClient) (ar autorest.Response, err error) {
1698	var done bool
1699	done, err = future.DoneWithContext(context.Background(), client)
1700	if err != nil {
1701		err = autorest.NewErrorWithError(err, "appplatform.DeploymentsStopFuture", "Result", future.Response(), "Polling failure")
1702		return
1703	}
1704	if !done {
1705		ar.Response = future.Response()
1706		err = azure.NewAsyncOpIncompleteError("appplatform.DeploymentsStopFuture")
1707		return
1708	}
1709	ar.Response = future.Response()
1710	return
1711}
1712
1713// DeploymentsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
1714// operation.
1715type DeploymentsUpdateFuture struct {
1716	azure.FutureAPI
1717	// Result returns the result of the asynchronous operation.
1718	// If the operation has not completed it will return an error.
1719	Result func(DeploymentsClient) (DeploymentResource, error)
1720}
1721
1722// UnmarshalJSON is the custom unmarshaller for CreateFuture.
1723func (future *DeploymentsUpdateFuture) UnmarshalJSON(body []byte) error {
1724	var azFuture azure.Future
1725	if err := json.Unmarshal(body, &azFuture); err != nil {
1726		return err
1727	}
1728	future.FutureAPI = &azFuture
1729	future.Result = future.result
1730	return nil
1731}
1732
1733// result is the default implementation for DeploymentsUpdateFuture.Result.
1734func (future *DeploymentsUpdateFuture) result(client DeploymentsClient) (dr DeploymentResource, err error) {
1735	var done bool
1736	done, err = future.DoneWithContext(context.Background(), client)
1737	if err != nil {
1738		err = autorest.NewErrorWithError(err, "appplatform.DeploymentsUpdateFuture", "Result", future.Response(), "Polling failure")
1739		return
1740	}
1741	if !done {
1742		dr.Response.Response = future.Response()
1743		err = azure.NewAsyncOpIncompleteError("appplatform.DeploymentsUpdateFuture")
1744		return
1745	}
1746	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1747	if dr.Response.Response, err = future.GetResult(sender); err == nil && dr.Response.Response.StatusCode != http.StatusNoContent {
1748		dr, err = client.UpdateResponder(dr.Response.Response)
1749		if err != nil {
1750			err = autorest.NewErrorWithError(err, "appplatform.DeploymentsUpdateFuture", "Result", dr.Response.Response, "Failure responding to request")
1751		}
1752	}
1753	return
1754}
1755
1756// Error the error code compose of code and message.
1757type Error struct {
1758	// Code - The code of error.
1759	Code *string `json:"code,omitempty"`
1760	// Message - The message of error.
1761	Message *string `json:"message,omitempty"`
1762}
1763
1764// GitPatternRepository git repository property payload
1765type GitPatternRepository struct {
1766	// Name - Name of the repository
1767	Name *string `json:"name,omitempty"`
1768	// Pattern - Collection of pattern of the repository
1769	Pattern *[]string `json:"pattern,omitempty"`
1770	// URI - URI of the repository
1771	URI *string `json:"uri,omitempty"`
1772	// Label - Label of the repository
1773	Label *string `json:"label,omitempty"`
1774	// SearchPaths - Searching path of the repository
1775	SearchPaths *[]string `json:"searchPaths,omitempty"`
1776	// Username - Username of git repository basic auth.
1777	Username *string `json:"username,omitempty"`
1778	// Password - Password of git repository basic auth.
1779	Password *string `json:"password,omitempty"`
1780	// HostKey - Public sshKey of git repository.
1781	HostKey *string `json:"hostKey,omitempty"`
1782	// HostKeyAlgorithm - SshKey algorithm of git repository.
1783	HostKeyAlgorithm *string `json:"hostKeyAlgorithm,omitempty"`
1784	// PrivateKey - Private sshKey algorithm of git repository.
1785	PrivateKey *string `json:"privateKey,omitempty"`
1786	// StrictHostKeyChecking - Strict host key checking or not.
1787	StrictHostKeyChecking *bool `json:"strictHostKeyChecking,omitempty"`
1788}
1789
1790// LogFileURLResponse log file URL payload
1791type LogFileURLResponse struct {
1792	autorest.Response `json:"-"`
1793	// URL - URL of the log file
1794	URL *string `json:"url,omitempty"`
1795}
1796
1797// LogSpecification specifications of the Log for Azure Monitoring
1798type LogSpecification struct {
1799	// Name - Name of the log
1800	Name *string `json:"name,omitempty"`
1801	// DisplayName - Localized friendly display name of the log
1802	DisplayName *string `json:"displayName,omitempty"`
1803	// BlobDuration - Blob duration of the log
1804	BlobDuration *string `json:"blobDuration,omitempty"`
1805}
1806
1807// ManagedIdentityProperties managed identity properties retrieved from ARM request headers.
1808type ManagedIdentityProperties struct {
1809	// Type - Possible values include: 'None', 'SystemAssigned', 'UserAssigned', 'SystemAssignedUserAssigned'
1810	Type        ManagedIdentityType `json:"type,omitempty"`
1811	PrincipalID *string             `json:"principalId,omitempty"`
1812	TenantID    *string             `json:"tenantId,omitempty"`
1813}
1814
1815// MetricDimension specifications of the Dimension of metrics
1816type MetricDimension struct {
1817	// Name - Name of the dimension
1818	Name *string `json:"name,omitempty"`
1819	// DisplayName - Localized friendly display name of the dimension
1820	DisplayName *string `json:"displayName,omitempty"`
1821}
1822
1823// MetricSpecification specifications of the Metrics for Azure Monitoring
1824type MetricSpecification struct {
1825	// Name - Name of the metric
1826	Name *string `json:"name,omitempty"`
1827	// DisplayName - Localized friendly display name of the metric
1828	DisplayName *string `json:"displayName,omitempty"`
1829	// DisplayDescription - Localized friendly description of the metric
1830	DisplayDescription *string `json:"displayDescription,omitempty"`
1831	// Unit - Unit that makes sense for the metric
1832	Unit *string `json:"unit,omitempty"`
1833	// Category - Name of the metric category that the metric belongs to. A metric can only belong to a single category.
1834	Category *string `json:"category,omitempty"`
1835	// AggregationType - Only provide one value for this field. Valid values: Average, Minimum, Maximum, Total, Count.
1836	AggregationType *string `json:"aggregationType,omitempty"`
1837	// SupportedAggregationTypes - Supported aggregation types
1838	SupportedAggregationTypes *[]string `json:"supportedAggregationTypes,omitempty"`
1839	// SupportedTimeGrainTypes - Supported time grain types
1840	SupportedTimeGrainTypes *[]string `json:"supportedTimeGrainTypes,omitempty"`
1841	// FillGapWithZero - Optional. If set to true, then zero will be returned for time duration where no metric is emitted/published.
1842	FillGapWithZero *bool `json:"fillGapWithZero,omitempty"`
1843	// Dimensions - Dimensions of the metric
1844	Dimensions *[]MetricDimension `json:"dimensions,omitempty"`
1845}
1846
1847// NameAvailability name availability result payload
1848type NameAvailability struct {
1849	autorest.Response `json:"-"`
1850	// NameAvailable - Indicates whether the name is available
1851	NameAvailable *bool `json:"nameAvailable,omitempty"`
1852	// Reason - Reason why the name is not available
1853	Reason *string `json:"reason,omitempty"`
1854	// Message - Message why the name is not available
1855	Message *string `json:"message,omitempty"`
1856}
1857
1858// NameAvailabilityParameters name availability parameters payload
1859type NameAvailabilityParameters struct {
1860	// Type - Type of the resource to check name availability
1861	Type *string `json:"type,omitempty"`
1862	// Name - Name to be checked
1863	Name *string `json:"name,omitempty"`
1864}
1865
1866// NetworkProfile service network profile payload
1867type NetworkProfile struct {
1868	// ServiceRuntimeSubnetID - Fully qualified resource Id of the subnet to host Azure Spring Cloud Service Runtime
1869	ServiceRuntimeSubnetID *string `json:"serviceRuntimeSubnetId,omitempty"`
1870	// AppSubnetID - Fully qualified resource Id of the subnet to host Azure Spring Cloud Apps
1871	AppSubnetID *string `json:"appSubnetId,omitempty"`
1872	// ServiceCidr - Azure Spring Cloud service reserved CIDR
1873	ServiceCidr *string `json:"serviceCidr,omitempty"`
1874	// ServiceRuntimeNetworkResourceGroup - Name of the resource group containing network resources of Azure Spring Cloud Service Runtime
1875	ServiceRuntimeNetworkResourceGroup *string `json:"serviceRuntimeNetworkResourceGroup,omitempty"`
1876	// AppNetworkResourceGroup - Name of the resource group containing network resources of Azure Spring Cloud Apps
1877	AppNetworkResourceGroup *string `json:"appNetworkResourceGroup,omitempty"`
1878	// OutboundIPs - READ-ONLY; Desired outbound IP resources for Azure Spring Cloud instance.
1879	OutboundIPs *NetworkProfileOutboundIPs `json:"outboundIPs,omitempty"`
1880}
1881
1882// MarshalJSON is the custom marshaler for NetworkProfile.
1883func (np NetworkProfile) MarshalJSON() ([]byte, error) {
1884	objectMap := make(map[string]interface{})
1885	if np.ServiceRuntimeSubnetID != nil {
1886		objectMap["serviceRuntimeSubnetId"] = np.ServiceRuntimeSubnetID
1887	}
1888	if np.AppSubnetID != nil {
1889		objectMap["appSubnetId"] = np.AppSubnetID
1890	}
1891	if np.ServiceCidr != nil {
1892		objectMap["serviceCidr"] = np.ServiceCidr
1893	}
1894	if np.ServiceRuntimeNetworkResourceGroup != nil {
1895		objectMap["serviceRuntimeNetworkResourceGroup"] = np.ServiceRuntimeNetworkResourceGroup
1896	}
1897	if np.AppNetworkResourceGroup != nil {
1898		objectMap["appNetworkResourceGroup"] = np.AppNetworkResourceGroup
1899	}
1900	return json.Marshal(objectMap)
1901}
1902
1903// NetworkProfileOutboundIPs desired outbound IP resources for Azure Spring Cloud instance.
1904type NetworkProfileOutboundIPs struct {
1905	// PublicIPs - READ-ONLY; A list of public IP addresses.
1906	PublicIPs *[]string `json:"publicIPs,omitempty"`
1907}
1908
1909// MarshalJSON is the custom marshaler for NetworkProfileOutboundIPs.
1910func (npP NetworkProfileOutboundIPs) MarshalJSON() ([]byte, error) {
1911	objectMap := make(map[string]interface{})
1912	return json.Marshal(objectMap)
1913}
1914
1915// OperationDetail operation detail payload
1916type OperationDetail struct {
1917	// Name - Name of the operation
1918	Name *string `json:"name,omitempty"`
1919	// IsDataAction - Indicates whether the operation is a data action
1920	IsDataAction *bool `json:"isDataAction,omitempty"`
1921	// Display - Display of the operation
1922	Display *OperationDisplay `json:"display,omitempty"`
1923	// Origin - Origin of the operation
1924	Origin *string `json:"origin,omitempty"`
1925	// Properties - Properties of the operation
1926	Properties *OperationProperties `json:"properties,omitempty"`
1927}
1928
1929// OperationDisplay operation display payload
1930type OperationDisplay struct {
1931	// Provider - Resource provider of the operation
1932	Provider *string `json:"provider,omitempty"`
1933	// Resource - Resource of the operation
1934	Resource *string `json:"resource,omitempty"`
1935	// Operation - Localized friendly name for the operation
1936	Operation *string `json:"operation,omitempty"`
1937	// Description - Localized friendly description for the operation
1938	Description *string `json:"description,omitempty"`
1939}
1940
1941// OperationProperties extra Operation properties
1942type OperationProperties struct {
1943	// ServiceSpecification - Service specifications of the operation
1944	ServiceSpecification *ServiceSpecification `json:"serviceSpecification,omitempty"`
1945}
1946
1947// PersistentDisk persistent disk payload
1948type PersistentDisk struct {
1949	// SizeInGB - Size of the persistent disk in GB
1950	SizeInGB *int32 `json:"sizeInGB,omitempty"`
1951	// UsedInGB - READ-ONLY; Size of the used persistent disk in GB
1952	UsedInGB *int32 `json:"usedInGB,omitempty"`
1953	// MountPath - Mount path of the persistent disk
1954	MountPath *string `json:"mountPath,omitempty"`
1955}
1956
1957// MarshalJSON is the custom marshaler for PersistentDisk.
1958func (pd PersistentDisk) MarshalJSON() ([]byte, error) {
1959	objectMap := make(map[string]interface{})
1960	if pd.SizeInGB != nil {
1961		objectMap["sizeInGB"] = pd.SizeInGB
1962	}
1963	if pd.MountPath != nil {
1964		objectMap["mountPath"] = pd.MountPath
1965	}
1966	return json.Marshal(objectMap)
1967}
1968
1969// ProxyResource the resource model definition for a ARM proxy resource. It will have everything other than
1970// required location and tags.
1971type ProxyResource struct {
1972	// ID - READ-ONLY; Fully qualified resource Id for the resource.
1973	ID *string `json:"id,omitempty"`
1974	// Name - READ-ONLY; The name of the resource.
1975	Name *string `json:"name,omitempty"`
1976	// Type - READ-ONLY; The type of the resource.
1977	Type *string `json:"type,omitempty"`
1978}
1979
1980// MarshalJSON is the custom marshaler for ProxyResource.
1981func (pr ProxyResource) MarshalJSON() ([]byte, error) {
1982	objectMap := make(map[string]interface{})
1983	return json.Marshal(objectMap)
1984}
1985
1986// RegenerateTestKeyRequestPayload regenerate test key request payload
1987type RegenerateTestKeyRequestPayload struct {
1988	// KeyType - Type of the test key. Possible values include: 'Primary', 'Secondary'
1989	KeyType TestKeyType `json:"keyType,omitempty"`
1990}
1991
1992// Resource the core properties of ARM resources.
1993type Resource struct {
1994	// ID - READ-ONLY; Fully qualified resource Id for the resource.
1995	ID *string `json:"id,omitempty"`
1996	// Name - READ-ONLY; The name of the resource.
1997	Name *string `json:"name,omitempty"`
1998	// Type - READ-ONLY; The type of the resource.
1999	Type *string `json:"type,omitempty"`
2000}
2001
2002// MarshalJSON is the custom marshaler for Resource.
2003func (r Resource) MarshalJSON() ([]byte, error) {
2004	objectMap := make(map[string]interface{})
2005	return json.Marshal(objectMap)
2006}
2007
2008// ResourceSku describes an available Azure Spring Cloud SKU.
2009type ResourceSku struct {
2010	// ResourceType - Gets the type of resource the SKU applies to.
2011	ResourceType *string `json:"resourceType,omitempty"`
2012	// Name - Gets the name of SKU.
2013	Name *string `json:"name,omitempty"`
2014	// Tier - Gets the tier of SKU.
2015	Tier *string `json:"tier,omitempty"`
2016	// Capacity - Gets the capacity of SKU.
2017	Capacity *SkuCapacity `json:"capacity,omitempty"`
2018	// Locations - Gets the set of locations that the SKU is available.
2019	Locations *[]string `json:"locations,omitempty"`
2020	// LocationInfo - Gets a list of locations and availability zones in those locations where the SKU is available.
2021	LocationInfo *[]ResourceSkuLocationInfo `json:"locationInfo,omitempty"`
2022	// Restrictions - Gets the restrictions because of which SKU cannot be used. This is
2023	// empty if there are no restrictions.
2024	Restrictions *[]ResourceSkuRestrictions `json:"restrictions,omitempty"`
2025}
2026
2027// ResourceSkuCapabilities ...
2028type ResourceSkuCapabilities struct {
2029	// Name - Gets an invariant to describe the feature.
2030	Name *string `json:"name,omitempty"`
2031	// Value - Gets an invariant if the feature is measured by quantity.
2032	Value *string `json:"value,omitempty"`
2033}
2034
2035// ResourceSkuCollection ...
2036type ResourceSkuCollection struct {
2037	autorest.Response `json:"-"`
2038	// Value - Collection of resource SKU
2039	Value *[]ResourceSku `json:"value,omitempty"`
2040	// NextLink - URL client should use to fetch the next page (per server side paging).
2041	// It's null for now, added for future use.
2042	NextLink *string `json:"nextLink,omitempty"`
2043}
2044
2045// ResourceSkuCollectionIterator provides access to a complete listing of ResourceSku values.
2046type ResourceSkuCollectionIterator struct {
2047	i    int
2048	page ResourceSkuCollectionPage
2049}
2050
2051// NextWithContext advances to the next value.  If there was an error making
2052// the request the iterator does not advance and the error is returned.
2053func (iter *ResourceSkuCollectionIterator) NextWithContext(ctx context.Context) (err error) {
2054	if tracing.IsEnabled() {
2055		ctx = tracing.StartSpan(ctx, fqdn+"/ResourceSkuCollectionIterator.NextWithContext")
2056		defer func() {
2057			sc := -1
2058			if iter.Response().Response.Response != nil {
2059				sc = iter.Response().Response.Response.StatusCode
2060			}
2061			tracing.EndSpan(ctx, sc, err)
2062		}()
2063	}
2064	iter.i++
2065	if iter.i < len(iter.page.Values()) {
2066		return nil
2067	}
2068	err = iter.page.NextWithContext(ctx)
2069	if err != nil {
2070		iter.i--
2071		return err
2072	}
2073	iter.i = 0
2074	return nil
2075}
2076
2077// Next advances to the next value.  If there was an error making
2078// the request the iterator does not advance and the error is returned.
2079// Deprecated: Use NextWithContext() instead.
2080func (iter *ResourceSkuCollectionIterator) Next() error {
2081	return iter.NextWithContext(context.Background())
2082}
2083
2084// NotDone returns true if the enumeration should be started or is not yet complete.
2085func (iter ResourceSkuCollectionIterator) NotDone() bool {
2086	return iter.page.NotDone() && iter.i < len(iter.page.Values())
2087}
2088
2089// Response returns the raw server response from the last page request.
2090func (iter ResourceSkuCollectionIterator) Response() ResourceSkuCollection {
2091	return iter.page.Response()
2092}
2093
2094// Value returns the current value or a zero-initialized value if the
2095// iterator has advanced beyond the end of the collection.
2096func (iter ResourceSkuCollectionIterator) Value() ResourceSku {
2097	if !iter.page.NotDone() {
2098		return ResourceSku{}
2099	}
2100	return iter.page.Values()[iter.i]
2101}
2102
2103// Creates a new instance of the ResourceSkuCollectionIterator type.
2104func NewResourceSkuCollectionIterator(page ResourceSkuCollectionPage) ResourceSkuCollectionIterator {
2105	return ResourceSkuCollectionIterator{page: page}
2106}
2107
2108// IsEmpty returns true if the ListResult contains no values.
2109func (rsc ResourceSkuCollection) IsEmpty() bool {
2110	return rsc.Value == nil || len(*rsc.Value) == 0
2111}
2112
2113// hasNextLink returns true if the NextLink is not empty.
2114func (rsc ResourceSkuCollection) hasNextLink() bool {
2115	return rsc.NextLink != nil && len(*rsc.NextLink) != 0
2116}
2117
2118// resourceSkuCollectionPreparer prepares a request to retrieve the next set of results.
2119// It returns nil if no more results exist.
2120func (rsc ResourceSkuCollection) resourceSkuCollectionPreparer(ctx context.Context) (*http.Request, error) {
2121	if !rsc.hasNextLink() {
2122		return nil, nil
2123	}
2124	return autorest.Prepare((&http.Request{}).WithContext(ctx),
2125		autorest.AsJSON(),
2126		autorest.AsGet(),
2127		autorest.WithBaseURL(to.String(rsc.NextLink)))
2128}
2129
2130// ResourceSkuCollectionPage contains a page of ResourceSku values.
2131type ResourceSkuCollectionPage struct {
2132	fn  func(context.Context, ResourceSkuCollection) (ResourceSkuCollection, error)
2133	rsc ResourceSkuCollection
2134}
2135
2136// NextWithContext advances to the next page of values.  If there was an error making
2137// the request the page does not advance and the error is returned.
2138func (page *ResourceSkuCollectionPage) NextWithContext(ctx context.Context) (err error) {
2139	if tracing.IsEnabled() {
2140		ctx = tracing.StartSpan(ctx, fqdn+"/ResourceSkuCollectionPage.NextWithContext")
2141		defer func() {
2142			sc := -1
2143			if page.Response().Response.Response != nil {
2144				sc = page.Response().Response.Response.StatusCode
2145			}
2146			tracing.EndSpan(ctx, sc, err)
2147		}()
2148	}
2149	for {
2150		next, err := page.fn(ctx, page.rsc)
2151		if err != nil {
2152			return err
2153		}
2154		page.rsc = next
2155		if !next.hasNextLink() || !next.IsEmpty() {
2156			break
2157		}
2158	}
2159	return nil
2160}
2161
2162// Next advances to the next page of values.  If there was an error making
2163// the request the page does not advance and the error is returned.
2164// Deprecated: Use NextWithContext() instead.
2165func (page *ResourceSkuCollectionPage) Next() error {
2166	return page.NextWithContext(context.Background())
2167}
2168
2169// NotDone returns true if the page enumeration should be started or is not yet complete.
2170func (page ResourceSkuCollectionPage) NotDone() bool {
2171	return !page.rsc.IsEmpty()
2172}
2173
2174// Response returns the raw server response from the last page request.
2175func (page ResourceSkuCollectionPage) Response() ResourceSkuCollection {
2176	return page.rsc
2177}
2178
2179// Values returns the slice of values for the current page or nil if there are no values.
2180func (page ResourceSkuCollectionPage) Values() []ResourceSku {
2181	if page.rsc.IsEmpty() {
2182		return nil
2183	}
2184	return *page.rsc.Value
2185}
2186
2187// Creates a new instance of the ResourceSkuCollectionPage type.
2188func NewResourceSkuCollectionPage(cur ResourceSkuCollection, getNextPage func(context.Context, ResourceSkuCollection) (ResourceSkuCollection, error)) ResourceSkuCollectionPage {
2189	return ResourceSkuCollectionPage{
2190		fn:  getNextPage,
2191		rsc: cur,
2192	}
2193}
2194
2195// ResourceSkuLocationInfo ...
2196type ResourceSkuLocationInfo struct {
2197	// Location - Gets location of the SKU
2198	Location *string `json:"location,omitempty"`
2199	// Zones - Gets list of availability zones where the SKU is supported.
2200	Zones *[]string `json:"zones,omitempty"`
2201	// ZoneDetails - Gets details of capabilities available to a SKU in specific zones.
2202	ZoneDetails *[]ResourceSkuZoneDetails `json:"zoneDetails,omitempty"`
2203}
2204
2205// ResourceSkuRestrictionInfo ...
2206type ResourceSkuRestrictionInfo struct {
2207	// Locations - Gets locations where the SKU is restricted
2208	Locations *[]string `json:"locations,omitempty"`
2209	// Zones - Gets list of availability zones where the SKU is restricted.
2210	Zones *[]string `json:"zones,omitempty"`
2211}
2212
2213// ResourceSkuRestrictions ...
2214type ResourceSkuRestrictions struct {
2215	// Type - Gets the type of restrictions. Possible values include: 'Location', 'Zone'
2216	Type ResourceSkuRestrictionsType `json:"type,omitempty"`
2217	// Values - Gets the value of restrictions. If the restriction type is set to
2218	// location. This would be different locations where the SKU is restricted.
2219	Values *[]string `json:"values,omitempty"`
2220	// RestrictionInfo - Gets the information about the restriction where the SKU cannot be used.
2221	RestrictionInfo *ResourceSkuRestrictionInfo `json:"restrictionInfo,omitempty"`
2222	// ReasonCode - Gets the reason for restriction. Possible values include: 'QuotaId', 'NotAvailableForSubscription'. Possible values include: 'QuotaID', 'NotAvailableForSubscription'
2223	ReasonCode ResourceSkuRestrictionsReasonCode `json:"reasonCode,omitempty"`
2224}
2225
2226// ResourceSkuZoneDetails ...
2227type ResourceSkuZoneDetails struct {
2228	// Name - Gets the set of zones that the SKU is available in with the
2229	// specified capabilities.
2230	Name *[]string `json:"name,omitempty"`
2231	// Capabilities - Gets a list of capabilities that are available for the SKU in the
2232	// specified list of zones.
2233	Capabilities *[]ResourceSkuCapabilities `json:"capabilities,omitempty"`
2234}
2235
2236// ResourceUploadDefinition resource upload definition payload
2237type ResourceUploadDefinition struct {
2238	autorest.Response `json:"-"`
2239	// RelativePath - Source relative path
2240	RelativePath *string `json:"relativePath,omitempty"`
2241	// UploadURL - Upload URL
2242	UploadURL *string `json:"uploadUrl,omitempty"`
2243}
2244
2245// ServiceResource service resource
2246type ServiceResource struct {
2247	autorest.Response `json:"-"`
2248	// Properties - Properties of the Service resource
2249	Properties *ClusterResourceProperties `json:"properties,omitempty"`
2250	// Sku - Sku of the Service resource
2251	Sku *Sku `json:"sku,omitempty"`
2252	// Location - The GEO location of the resource.
2253	Location *string `json:"location,omitempty"`
2254	// Tags - Tags of the service which is a list of key value pairs that describe the resource.
2255	Tags map[string]*string `json:"tags"`
2256	// ID - READ-ONLY; Fully qualified resource Id for the resource.
2257	ID *string `json:"id,omitempty"`
2258	// Name - READ-ONLY; The name of the resource.
2259	Name *string `json:"name,omitempty"`
2260	// Type - READ-ONLY; The type of the resource.
2261	Type *string `json:"type,omitempty"`
2262}
2263
2264// MarshalJSON is the custom marshaler for ServiceResource.
2265func (sr ServiceResource) MarshalJSON() ([]byte, error) {
2266	objectMap := make(map[string]interface{})
2267	if sr.Properties != nil {
2268		objectMap["properties"] = sr.Properties
2269	}
2270	if sr.Sku != nil {
2271		objectMap["sku"] = sr.Sku
2272	}
2273	if sr.Location != nil {
2274		objectMap["location"] = sr.Location
2275	}
2276	if sr.Tags != nil {
2277		objectMap["tags"] = sr.Tags
2278	}
2279	return json.Marshal(objectMap)
2280}
2281
2282// ServiceResourceList object that includes an array of Service resources and a possible link for next set
2283type ServiceResourceList struct {
2284	autorest.Response `json:"-"`
2285	// Value - Collection of Service resources
2286	Value *[]ServiceResource `json:"value,omitempty"`
2287	// NextLink - URL client should use to fetch the next page (per server side paging).
2288	// It's null for now, added for future use.
2289	NextLink *string `json:"nextLink,omitempty"`
2290}
2291
2292// ServiceResourceListIterator provides access to a complete listing of ServiceResource values.
2293type ServiceResourceListIterator struct {
2294	i    int
2295	page ServiceResourceListPage
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 *ServiceResourceListIterator) NextWithContext(ctx context.Context) (err error) {
2301	if tracing.IsEnabled() {
2302		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceResourceListIterator.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 *ServiceResourceListIterator) 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 ServiceResourceListIterator) 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 ServiceResourceListIterator) Response() ServiceResourceList {
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 ServiceResourceListIterator) Value() ServiceResource {
2344	if !iter.page.NotDone() {
2345		return ServiceResource{}
2346	}
2347	return iter.page.Values()[iter.i]
2348}
2349
2350// Creates a new instance of the ServiceResourceListIterator type.
2351func NewServiceResourceListIterator(page ServiceResourceListPage) ServiceResourceListIterator {
2352	return ServiceResourceListIterator{page: page}
2353}
2354
2355// IsEmpty returns true if the ListResult contains no values.
2356func (srl ServiceResourceList) IsEmpty() bool {
2357	return srl.Value == nil || len(*srl.Value) == 0
2358}
2359
2360// hasNextLink returns true if the NextLink is not empty.
2361func (srl ServiceResourceList) hasNextLink() bool {
2362	return srl.NextLink != nil && len(*srl.NextLink) != 0
2363}
2364
2365// serviceResourceListPreparer prepares a request to retrieve the next set of results.
2366// It returns nil if no more results exist.
2367func (srl ServiceResourceList) serviceResourceListPreparer(ctx context.Context) (*http.Request, error) {
2368	if !srl.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(srl.NextLink)))
2375}
2376
2377// ServiceResourceListPage contains a page of ServiceResource values.
2378type ServiceResourceListPage struct {
2379	fn  func(context.Context, ServiceResourceList) (ServiceResourceList, error)
2380	srl ServiceResourceList
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 *ServiceResourceListPage) NextWithContext(ctx context.Context) (err error) {
2386	if tracing.IsEnabled() {
2387		ctx = tracing.StartSpan(ctx, fqdn+"/ServiceResourceListPage.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.srl)
2398		if err != nil {
2399			return err
2400		}
2401		page.srl = 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 *ServiceResourceListPage) 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 ServiceResourceListPage) NotDone() bool {
2418	return !page.srl.IsEmpty()
2419}
2420
2421// Response returns the raw server response from the last page request.
2422func (page ServiceResourceListPage) Response() ServiceResourceList {
2423	return page.srl
2424}
2425
2426// Values returns the slice of values for the current page or nil if there are no values.
2427func (page ServiceResourceListPage) Values() []ServiceResource {
2428	if page.srl.IsEmpty() {
2429		return nil
2430	}
2431	return *page.srl.Value
2432}
2433
2434// Creates a new instance of the ServiceResourceListPage type.
2435func NewServiceResourceListPage(cur ServiceResourceList, getNextPage func(context.Context, ServiceResourceList) (ServiceResourceList, error)) ServiceResourceListPage {
2436	return ServiceResourceListPage{
2437		fn:  getNextPage,
2438		srl: cur,
2439	}
2440}
2441
2442// ServicesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
2443// operation.
2444type ServicesCreateOrUpdateFuture struct {
2445	azure.FutureAPI
2446	// Result returns the result of the asynchronous operation.
2447	// If the operation has not completed it will return an error.
2448	Result func(ServicesClient) (ServiceResource, error)
2449}
2450
2451// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2452func (future *ServicesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
2453	var azFuture azure.Future
2454	if err := json.Unmarshal(body, &azFuture); err != nil {
2455		return err
2456	}
2457	future.FutureAPI = &azFuture
2458	future.Result = future.result
2459	return nil
2460}
2461
2462// result is the default implementation for ServicesCreateOrUpdateFuture.Result.
2463func (future *ServicesCreateOrUpdateFuture) result(client ServicesClient) (sr ServiceResource, err error) {
2464	var done bool
2465	done, err = future.DoneWithContext(context.Background(), client)
2466	if err != nil {
2467		err = autorest.NewErrorWithError(err, "appplatform.ServicesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
2468		return
2469	}
2470	if !done {
2471		sr.Response.Response = future.Response()
2472		err = azure.NewAsyncOpIncompleteError("appplatform.ServicesCreateOrUpdateFuture")
2473		return
2474	}
2475	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2476	if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
2477		sr, err = client.CreateOrUpdateResponder(sr.Response.Response)
2478		if err != nil {
2479			err = autorest.NewErrorWithError(err, "appplatform.ServicesCreateOrUpdateFuture", "Result", sr.Response.Response, "Failure responding to request")
2480		}
2481	}
2482	return
2483}
2484
2485// ServicesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
2486// operation.
2487type ServicesDeleteFuture struct {
2488	azure.FutureAPI
2489	// Result returns the result of the asynchronous operation.
2490	// If the operation has not completed it will return an error.
2491	Result func(ServicesClient) (autorest.Response, error)
2492}
2493
2494// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2495func (future *ServicesDeleteFuture) UnmarshalJSON(body []byte) error {
2496	var azFuture azure.Future
2497	if err := json.Unmarshal(body, &azFuture); err != nil {
2498		return err
2499	}
2500	future.FutureAPI = &azFuture
2501	future.Result = future.result
2502	return nil
2503}
2504
2505// result is the default implementation for ServicesDeleteFuture.Result.
2506func (future *ServicesDeleteFuture) result(client ServicesClient) (ar autorest.Response, err error) {
2507	var done bool
2508	done, err = future.DoneWithContext(context.Background(), client)
2509	if err != nil {
2510		err = autorest.NewErrorWithError(err, "appplatform.ServicesDeleteFuture", "Result", future.Response(), "Polling failure")
2511		return
2512	}
2513	if !done {
2514		ar.Response = future.Response()
2515		err = azure.NewAsyncOpIncompleteError("appplatform.ServicesDeleteFuture")
2516		return
2517	}
2518	ar.Response = future.Response()
2519	return
2520}
2521
2522// ServiceSpecification service specification payload
2523type ServiceSpecification struct {
2524	// LogSpecifications - Specifications of the Log for Azure Monitoring
2525	LogSpecifications *[]LogSpecification `json:"logSpecifications,omitempty"`
2526	// MetricSpecifications - Specifications of the Metrics for Azure Monitoring
2527	MetricSpecifications *[]MetricSpecification `json:"metricSpecifications,omitempty"`
2528}
2529
2530// ServicesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
2531// operation.
2532type ServicesUpdateFuture struct {
2533	azure.FutureAPI
2534	// Result returns the result of the asynchronous operation.
2535	// If the operation has not completed it will return an error.
2536	Result func(ServicesClient) (ServiceResource, error)
2537}
2538
2539// UnmarshalJSON is the custom unmarshaller for CreateFuture.
2540func (future *ServicesUpdateFuture) UnmarshalJSON(body []byte) error {
2541	var azFuture azure.Future
2542	if err := json.Unmarshal(body, &azFuture); err != nil {
2543		return err
2544	}
2545	future.FutureAPI = &azFuture
2546	future.Result = future.result
2547	return nil
2548}
2549
2550// result is the default implementation for ServicesUpdateFuture.Result.
2551func (future *ServicesUpdateFuture) result(client ServicesClient) (sr ServiceResource, err error) {
2552	var done bool
2553	done, err = future.DoneWithContext(context.Background(), client)
2554	if err != nil {
2555		err = autorest.NewErrorWithError(err, "appplatform.ServicesUpdateFuture", "Result", future.Response(), "Polling failure")
2556		return
2557	}
2558	if !done {
2559		sr.Response.Response = future.Response()
2560		err = azure.NewAsyncOpIncompleteError("appplatform.ServicesUpdateFuture")
2561		return
2562	}
2563	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2564	if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
2565		sr, err = client.UpdateResponder(sr.Response.Response)
2566		if err != nil {
2567			err = autorest.NewErrorWithError(err, "appplatform.ServicesUpdateFuture", "Result", sr.Response.Response, "Failure responding to request")
2568		}
2569	}
2570	return
2571}
2572
2573// Sku sku of Azure Spring Cloud
2574type Sku struct {
2575	// Name - Name of the Sku
2576	Name *string `json:"name,omitempty"`
2577	// Tier - Tier of the Sku
2578	Tier *string `json:"tier,omitempty"`
2579	// Capacity - Current capacity of the target resource
2580	Capacity *int32 `json:"capacity,omitempty"`
2581}
2582
2583// SkuCapacity the SKU capacity
2584type SkuCapacity struct {
2585	// Minimum - Gets or sets the minimum.
2586	Minimum *int32 `json:"minimum,omitempty"`
2587	// Maximum - Gets or sets the maximum.
2588	Maximum *int32 `json:"maximum,omitempty"`
2589	// Default - Gets or sets the default.
2590	Default *int32 `json:"default,omitempty"`
2591	// ScaleType - Gets or sets the type of the scale. Possible values include: 'SkuScaleTypeNone', 'SkuScaleTypeManual', 'SkuScaleTypeAutomatic'
2592	ScaleType SkuScaleType `json:"scaleType,omitempty"`
2593}
2594
2595// SupportedRuntimeVersion supported deployment runtime version descriptor.
2596type SupportedRuntimeVersion struct {
2597	// Value - The raw value which could be passed to deployment CRUD operations. Possible values include: 'SupportedRuntimeValueJava8', 'SupportedRuntimeValueJava11', 'SupportedRuntimeValueNetCore31'
2598	Value SupportedRuntimeValue `json:"value,omitempty"`
2599	// Platform - The platform of this runtime version (possible values: "Java" or ".NET"). Possible values include: 'Java', 'NETCore'
2600	Platform SupportedRuntimePlatform `json:"platform,omitempty"`
2601	// Version - The detailed version (major.minor) of the platform.
2602	Version *string `json:"version,omitempty"`
2603}
2604
2605// TemporaryDisk temporary disk payload
2606type TemporaryDisk struct {
2607	// SizeInGB - Size of the temporary disk in GB
2608	SizeInGB *int32 `json:"sizeInGB,omitempty"`
2609	// MountPath - Mount path of the temporary disk
2610	MountPath *string `json:"mountPath,omitempty"`
2611}
2612
2613// TestKeys test keys payload
2614type TestKeys struct {
2615	autorest.Response `json:"-"`
2616	// PrimaryKey - Primary key
2617	PrimaryKey *string `json:"primaryKey,omitempty"`
2618	// SecondaryKey - Secondary key
2619	SecondaryKey *string `json:"secondaryKey,omitempty"`
2620	// PrimaryTestEndpoint - Primary test endpoint
2621	PrimaryTestEndpoint *string `json:"primaryTestEndpoint,omitempty"`
2622	// SecondaryTestEndpoint - Secondary test endpoint
2623	SecondaryTestEndpoint *string `json:"secondaryTestEndpoint,omitempty"`
2624	// Enabled - Indicates whether the test endpoint feature enabled or not
2625	Enabled *bool `json:"enabled,omitempty"`
2626}
2627
2628// TraceProperties trace properties payload
2629type TraceProperties struct {
2630	// State - READ-ONLY; State of the trace proxy. Possible values include: 'TraceProxyStateNotAvailable', 'TraceProxyStateFailed', 'TraceProxyStateSucceeded', 'TraceProxyStateUpdating'
2631	State TraceProxyState `json:"state,omitempty"`
2632	// Error - Error when apply trace proxy changes.
2633	Error *Error `json:"error,omitempty"`
2634	// Enabled - Indicates whether enable the tracing functionality
2635	Enabled *bool `json:"enabled,omitempty"`
2636	// AppInsightInstrumentationKey - Target application insight instrumentation key
2637	AppInsightInstrumentationKey *string `json:"appInsightInstrumentationKey,omitempty"`
2638}
2639
2640// MarshalJSON is the custom marshaler for TraceProperties.
2641func (tp TraceProperties) MarshalJSON() ([]byte, error) {
2642	objectMap := make(map[string]interface{})
2643	if tp.Error != nil {
2644		objectMap["error"] = tp.Error
2645	}
2646	if tp.Enabled != nil {
2647		objectMap["enabled"] = tp.Enabled
2648	}
2649	if tp.AppInsightInstrumentationKey != nil {
2650		objectMap["appInsightInstrumentationKey"] = tp.AppInsightInstrumentationKey
2651	}
2652	return json.Marshal(objectMap)
2653}
2654
2655// TrackedResource the resource model definition for a ARM tracked top level resource.
2656type TrackedResource struct {
2657	// Location - The GEO location of the resource.
2658	Location *string `json:"location,omitempty"`
2659	// Tags - Tags of the service which is a list of key value pairs that describe the resource.
2660	Tags map[string]*string `json:"tags"`
2661	// ID - READ-ONLY; Fully qualified resource Id for the resource.
2662	ID *string `json:"id,omitempty"`
2663	// Name - READ-ONLY; The name of the resource.
2664	Name *string `json:"name,omitempty"`
2665	// Type - READ-ONLY; The type of the resource.
2666	Type *string `json:"type,omitempty"`
2667}
2668
2669// MarshalJSON is the custom marshaler for TrackedResource.
2670func (tr TrackedResource) MarshalJSON() ([]byte, error) {
2671	objectMap := make(map[string]interface{})
2672	if tr.Location != nil {
2673		objectMap["location"] = tr.Location
2674	}
2675	if tr.Tags != nil {
2676		objectMap["tags"] = tr.Tags
2677	}
2678	return json.Marshal(objectMap)
2679}
2680
2681// UserSourceInfo source information for a deployment
2682type UserSourceInfo struct {
2683	// Type - Type of the source uploaded. Possible values include: 'Jar', 'NetCoreZip', 'Source'
2684	Type UserSourceType `json:"type,omitempty"`
2685	// RelativePath - Relative path of the storage which stores the source
2686	RelativePath *string `json:"relativePath,omitempty"`
2687	// Version - Version of the source
2688	Version *string `json:"version,omitempty"`
2689	// ArtifactSelector - Selector for the artifact to be used for the deployment for multi-module projects. This should be
2690	// the relative path to the target module/project.
2691	ArtifactSelector *string `json:"artifactSelector,omitempty"`
2692}
2693