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