1package appplatform 2 3// Copyright (c) Microsoft Corporation. All rights reserved. 4// Licensed under the MIT License. See License.txt in the project root for license information. 5// 6// Code generated by Microsoft (R) AutoRest Code Generator. 7// Changes may cause incorrect behavior and will be lost if the code is regenerated. 8 9import ( 10 "context" 11 "encoding/json" 12 "github.com/Azure/go-autorest/autorest" 13 "github.com/Azure/go-autorest/autorest/azure" 14 "github.com/Azure/go-autorest/autorest/date" 15 "github.com/Azure/go-autorest/autorest/to" 16 "github.com/Azure/go-autorest/tracing" 17 "net/http" 18) 19 20// The package's fully qualified name. 21const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/appplatform/mgmt/2020-11-01-preview/appplatform" 22 23// ApplicationInsightsAgentVersions application Insights agent versions properties payload 24type ApplicationInsightsAgentVersions struct { 25 // Java - READ-ONLY; Indicates the version of application insight java agent 26 Java *string `json:"java,omitempty"` 27} 28 29// MarshalJSON is the custom marshaler for ApplicationInsightsAgentVersions. 30func (aiav ApplicationInsightsAgentVersions) MarshalJSON() ([]byte, error) { 31 objectMap := make(map[string]interface{}) 32 return json.Marshal(objectMap) 33} 34 35// AppResource app resource payload 36type AppResource struct { 37 autorest.Response `json:"-"` 38 // Properties - Properties of the App resource 39 Properties *AppResourceProperties `json:"properties,omitempty"` 40 // Identity - The Managed Identity type of the app resource 41 Identity *ManagedIdentityProperties `json:"identity,omitempty"` 42 // Location - The GEO location of the application, always the same with its parent resource 43 Location *string `json:"location,omitempty"` 44 // ID - READ-ONLY; Fully qualified resource Id for the resource. 45 ID *string `json:"id,omitempty"` 46 // Name - READ-ONLY; The name of the resource. 47 Name *string `json:"name,omitempty"` 48 // Type - READ-ONLY; The type of the resource. 49 Type *string `json:"type,omitempty"` 50} 51 52// MarshalJSON is the custom marshaler for AppResource. 53func (ar AppResource) MarshalJSON() ([]byte, error) { 54 objectMap := make(map[string]interface{}) 55 if ar.Properties != nil { 56 objectMap["properties"] = ar.Properties 57 } 58 if ar.Identity != nil { 59 objectMap["identity"] = ar.Identity 60 } 61 if ar.Location != nil { 62 objectMap["location"] = ar.Location 63 } 64 return json.Marshal(objectMap) 65} 66 67// AppResourceCollection object that includes an array of App resources and a possible link for next set 68type AppResourceCollection struct { 69 autorest.Response `json:"-"` 70 // Value - Collection of App resources 71 Value *[]AppResource `json:"value,omitempty"` 72 // NextLink - URL client should use to fetch the next page (per server side paging). 73 // It's null for now, added for future use. 74 NextLink *string `json:"nextLink,omitempty"` 75} 76 77// AppResourceCollectionIterator provides access to a complete listing of AppResource values. 78type AppResourceCollectionIterator struct { 79 i int 80 page AppResourceCollectionPage 81} 82 83// NextWithContext advances to the next value. If there was an error making 84// the request the iterator does not advance and the error is returned. 85func (iter *AppResourceCollectionIterator) NextWithContext(ctx context.Context) (err error) { 86 if tracing.IsEnabled() { 87 ctx = tracing.StartSpan(ctx, fqdn+"/AppResourceCollectionIterator.NextWithContext") 88 defer func() { 89 sc := -1 90 if iter.Response().Response.Response != nil { 91 sc = iter.Response().Response.Response.StatusCode 92 } 93 tracing.EndSpan(ctx, sc, err) 94 }() 95 } 96 iter.i++ 97 if iter.i < len(iter.page.Values()) { 98 return nil 99 } 100 err = iter.page.NextWithContext(ctx) 101 if err != nil { 102 iter.i-- 103 return err 104 } 105 iter.i = 0 106 return nil 107} 108 109// Next advances to the next value. If there was an error making 110// the request the iterator does not advance and the error is returned. 111// Deprecated: Use NextWithContext() instead. 112func (iter *AppResourceCollectionIterator) Next() error { 113 return iter.NextWithContext(context.Background()) 114} 115 116// NotDone returns true if the enumeration should be started or is not yet complete. 117func (iter AppResourceCollectionIterator) NotDone() bool { 118 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 119} 120 121// Response returns the raw server response from the last page request. 122func (iter AppResourceCollectionIterator) Response() AppResourceCollection { 123 return iter.page.Response() 124} 125 126// Value returns the current value or a zero-initialized value if the 127// iterator has advanced beyond the end of the collection. 128func (iter AppResourceCollectionIterator) Value() AppResource { 129 if !iter.page.NotDone() { 130 return AppResource{} 131 } 132 return iter.page.Values()[iter.i] 133} 134 135// Creates a new instance of the AppResourceCollectionIterator type. 136func NewAppResourceCollectionIterator(page AppResourceCollectionPage) AppResourceCollectionIterator { 137 return AppResourceCollectionIterator{page: page} 138} 139 140// IsEmpty returns true if the ListResult contains no values. 141func (arc AppResourceCollection) IsEmpty() bool { 142 return arc.Value == nil || len(*arc.Value) == 0 143} 144 145// hasNextLink returns true if the NextLink is not empty. 146func (arc AppResourceCollection) hasNextLink() bool { 147 return arc.NextLink != nil && len(*arc.NextLink) != 0 148} 149 150// appResourceCollectionPreparer prepares a request to retrieve the next set of results. 151// It returns nil if no more results exist. 152func (arc AppResourceCollection) appResourceCollectionPreparer(ctx context.Context) (*http.Request, error) { 153 if !arc.hasNextLink() { 154 return nil, nil 155 } 156 return autorest.Prepare((&http.Request{}).WithContext(ctx), 157 autorest.AsJSON(), 158 autorest.AsGet(), 159 autorest.WithBaseURL(to.String(arc.NextLink))) 160} 161 162// AppResourceCollectionPage contains a page of AppResource values. 163type AppResourceCollectionPage struct { 164 fn func(context.Context, AppResourceCollection) (AppResourceCollection, error) 165 arc AppResourceCollection 166} 167 168// NextWithContext advances to the next page of values. If there was an error making 169// the request the page does not advance and the error is returned. 170func (page *AppResourceCollectionPage) NextWithContext(ctx context.Context) (err error) { 171 if tracing.IsEnabled() { 172 ctx = tracing.StartSpan(ctx, fqdn+"/AppResourceCollectionPage.NextWithContext") 173 defer func() { 174 sc := -1 175 if page.Response().Response.Response != nil { 176 sc = page.Response().Response.Response.StatusCode 177 } 178 tracing.EndSpan(ctx, sc, err) 179 }() 180 } 181 for { 182 next, err := page.fn(ctx, page.arc) 183 if err != nil { 184 return err 185 } 186 page.arc = next 187 if !next.hasNextLink() || !next.IsEmpty() { 188 break 189 } 190 } 191 return nil 192} 193 194// Next advances to the next page of values. If there was an error making 195// the request the page does not advance and the error is returned. 196// Deprecated: Use NextWithContext() instead. 197func (page *AppResourceCollectionPage) Next() error { 198 return page.NextWithContext(context.Background()) 199} 200 201// NotDone returns true if the page enumeration should be started or is not yet complete. 202func (page AppResourceCollectionPage) NotDone() bool { 203 return !page.arc.IsEmpty() 204} 205 206// Response returns the raw server response from the last page request. 207func (page AppResourceCollectionPage) Response() AppResourceCollection { 208 return page.arc 209} 210 211// Values returns the slice of values for the current page or nil if there are no values. 212func (page AppResourceCollectionPage) Values() []AppResource { 213 if page.arc.IsEmpty() { 214 return nil 215 } 216 return *page.arc.Value 217} 218 219// Creates a new instance of the AppResourceCollectionPage type. 220func NewAppResourceCollectionPage(cur AppResourceCollection, getNextPage func(context.Context, AppResourceCollection) (AppResourceCollection, error)) AppResourceCollectionPage { 221 return AppResourceCollectionPage{ 222 fn: getNextPage, 223 arc: cur, 224 } 225} 226 227// AppResourceProperties app resource properties payload 228type AppResourceProperties struct { 229 // Public - Indicates whether the App exposes public endpoint 230 Public *bool `json:"public,omitempty"` 231 // URL - READ-ONLY; URL of the App 232 URL *string `json:"url,omitempty"` 233 // ProvisioningState - READ-ONLY; Provisioning state of the App. Possible values include: 'Succeeded', 'Failed', 'Creating', 'Updating' 234 ProvisioningState AppResourceProvisioningState `json:"provisioningState,omitempty"` 235 // ActiveDeploymentName - Name of the active deployment of the App 236 ActiveDeploymentName *string `json:"activeDeploymentName,omitempty"` 237 // Fqdn - Fully qualified dns Name. 238 Fqdn *string `json:"fqdn,omitempty"` 239 // HTTPSOnly - Indicate if only https is allowed. 240 HTTPSOnly *bool `json:"httpsOnly,omitempty"` 241 // EnableEndToEndTLS - Indicate if end to end TLS is enabled. 242 EnableEndToEndTLS *bool `json:"enableEndToEndTLS,omitempty"` 243 // CreatedTime - READ-ONLY; Date time when the resource is created 244 CreatedTime *date.Time `json:"createdTime,omitempty"` 245 // TemporaryDisk - Temporary disk settings 246 TemporaryDisk *TemporaryDisk `json:"temporaryDisk,omitempty"` 247 // PersistentDisk - Persistent disk settings 248 PersistentDisk *PersistentDisk `json:"persistentDisk,omitempty"` 249} 250 251// MarshalJSON is the custom marshaler for AppResourceProperties. 252func (arp AppResourceProperties) MarshalJSON() ([]byte, error) { 253 objectMap := make(map[string]interface{}) 254 if arp.Public != nil { 255 objectMap["public"] = arp.Public 256 } 257 if arp.ActiveDeploymentName != nil { 258 objectMap["activeDeploymentName"] = arp.ActiveDeploymentName 259 } 260 if arp.Fqdn != nil { 261 objectMap["fqdn"] = arp.Fqdn 262 } 263 if arp.HTTPSOnly != nil { 264 objectMap["httpsOnly"] = arp.HTTPSOnly 265 } 266 if arp.EnableEndToEndTLS != nil { 267 objectMap["enableEndToEndTLS"] = arp.EnableEndToEndTLS 268 } 269 if arp.TemporaryDisk != nil { 270 objectMap["temporaryDisk"] = arp.TemporaryDisk 271 } 272 if arp.PersistentDisk != nil { 273 objectMap["persistentDisk"] = arp.PersistentDisk 274 } 275 return json.Marshal(objectMap) 276} 277 278// AppsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running 279// operation. 280type AppsCreateOrUpdateFuture struct { 281 azure.FutureAPI 282 // Result returns the result of the asynchronous operation. 283 // If the operation has not completed it will return an error. 284 Result func(AppsClient) (AppResource, error) 285} 286 287// UnmarshalJSON is the custom unmarshaller for CreateFuture. 288func (future *AppsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { 289 var azFuture azure.Future 290 if err := json.Unmarshal(body, &azFuture); err != nil { 291 return err 292 } 293 future.FutureAPI = &azFuture 294 future.Result = future.result 295 return nil 296} 297 298// result is the default implementation for AppsCreateOrUpdateFuture.Result. 299func (future *AppsCreateOrUpdateFuture) result(client AppsClient) (ar AppResource, err error) { 300 var done bool 301 done, err = future.DoneWithContext(context.Background(), client) 302 if err != nil { 303 err = autorest.NewErrorWithError(err, "appplatform.AppsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 304 return 305 } 306 if !done { 307 ar.Response.Response = future.Response() 308 err = azure.NewAsyncOpIncompleteError("appplatform.AppsCreateOrUpdateFuture") 309 return 310 } 311 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 312 if ar.Response.Response, err = future.GetResult(sender); err == nil && ar.Response.Response.StatusCode != http.StatusNoContent { 313 ar, err = client.CreateOrUpdateResponder(ar.Response.Response) 314 if err != nil { 315 err = autorest.NewErrorWithError(err, "appplatform.AppsCreateOrUpdateFuture", "Result", ar.Response.Response, "Failure responding to request") 316 } 317 } 318 return 319} 320 321// AppsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. 322type AppsDeleteFuture struct { 323 azure.FutureAPI 324 // Result returns the result of the asynchronous operation. 325 // If the operation has not completed it will return an error. 326 Result func(AppsClient) (autorest.Response, error) 327} 328 329// UnmarshalJSON is the custom unmarshaller for CreateFuture. 330func (future *AppsDeleteFuture) UnmarshalJSON(body []byte) error { 331 var azFuture azure.Future 332 if err := json.Unmarshal(body, &azFuture); err != nil { 333 return err 334 } 335 future.FutureAPI = &azFuture 336 future.Result = future.result 337 return nil 338} 339 340// result is the default implementation for AppsDeleteFuture.Result. 341func (future *AppsDeleteFuture) result(client AppsClient) (ar autorest.Response, err error) { 342 var done bool 343 done, err = future.DoneWithContext(context.Background(), client) 344 if err != nil { 345 err = autorest.NewErrorWithError(err, "appplatform.AppsDeleteFuture", "Result", future.Response(), "Polling failure") 346 return 347 } 348 if !done { 349 ar.Response = future.Response() 350 err = azure.NewAsyncOpIncompleteError("appplatform.AppsDeleteFuture") 351 return 352 } 353 ar.Response = future.Response() 354 return 355} 356 357// AppsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation. 358type AppsUpdateFuture struct { 359 azure.FutureAPI 360 // Result returns the result of the asynchronous operation. 361 // If the operation has not completed it will return an error. 362 Result func(AppsClient) (AppResource, error) 363} 364 365// UnmarshalJSON is the custom unmarshaller for CreateFuture. 366func (future *AppsUpdateFuture) UnmarshalJSON(body []byte) error { 367 var azFuture azure.Future 368 if err := json.Unmarshal(body, &azFuture); err != nil { 369 return err 370 } 371 future.FutureAPI = &azFuture 372 future.Result = future.result 373 return nil 374} 375 376// result is the default implementation for AppsUpdateFuture.Result. 377func (future *AppsUpdateFuture) result(client AppsClient) (ar AppResource, err error) { 378 var done bool 379 done, err = future.DoneWithContext(context.Background(), client) 380 if err != nil { 381 err = autorest.NewErrorWithError(err, "appplatform.AppsUpdateFuture", "Result", future.Response(), "Polling failure") 382 return 383 } 384 if !done { 385 ar.Response.Response = future.Response() 386 err = azure.NewAsyncOpIncompleteError("appplatform.AppsUpdateFuture") 387 return 388 } 389 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 390 if ar.Response.Response, err = future.GetResult(sender); err == nil && ar.Response.Response.StatusCode != http.StatusNoContent { 391 ar, err = client.UpdateResponder(ar.Response.Response) 392 if err != nil { 393 err = autorest.NewErrorWithError(err, "appplatform.AppsUpdateFuture", "Result", ar.Response.Response, "Failure responding to request") 394 } 395 } 396 return 397} 398 399// AvailableOperations available operations of the service 400type AvailableOperations struct { 401 autorest.Response `json:"-"` 402 // Value - Collection of available operation details 403 Value *[]OperationDetail `json:"value,omitempty"` 404 // NextLink - URL client should use to fetch the next page (per server side paging). 405 // It's null for now, added for future use. 406 NextLink *string `json:"nextLink,omitempty"` 407} 408 409// AvailableOperationsIterator provides access to a complete listing of OperationDetail values. 410type AvailableOperationsIterator struct { 411 i int 412 page AvailableOperationsPage 413} 414 415// NextWithContext advances to the next value. If there was an error making 416// the request the iterator does not advance and the error is returned. 417func (iter *AvailableOperationsIterator) NextWithContext(ctx context.Context) (err error) { 418 if tracing.IsEnabled() { 419 ctx = tracing.StartSpan(ctx, fqdn+"/AvailableOperationsIterator.NextWithContext") 420 defer func() { 421 sc := -1 422 if iter.Response().Response.Response != nil { 423 sc = iter.Response().Response.Response.StatusCode 424 } 425 tracing.EndSpan(ctx, sc, err) 426 }() 427 } 428 iter.i++ 429 if iter.i < len(iter.page.Values()) { 430 return nil 431 } 432 err = iter.page.NextWithContext(ctx) 433 if err != nil { 434 iter.i-- 435 return err 436 } 437 iter.i = 0 438 return nil 439} 440 441// Next advances to the next value. If there was an error making 442// the request the iterator does not advance and the error is returned. 443// Deprecated: Use NextWithContext() instead. 444func (iter *AvailableOperationsIterator) Next() error { 445 return iter.NextWithContext(context.Background()) 446} 447 448// NotDone returns true if the enumeration should be started or is not yet complete. 449func (iter AvailableOperationsIterator) NotDone() bool { 450 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 451} 452 453// Response returns the raw server response from the last page request. 454func (iter AvailableOperationsIterator) Response() AvailableOperations { 455 return iter.page.Response() 456} 457 458// Value returns the current value or a zero-initialized value if the 459// iterator has advanced beyond the end of the collection. 460func (iter AvailableOperationsIterator) Value() OperationDetail { 461 if !iter.page.NotDone() { 462 return OperationDetail{} 463 } 464 return iter.page.Values()[iter.i] 465} 466 467// Creates a new instance of the AvailableOperationsIterator type. 468func NewAvailableOperationsIterator(page AvailableOperationsPage) AvailableOperationsIterator { 469 return AvailableOperationsIterator{page: page} 470} 471 472// IsEmpty returns true if the ListResult contains no values. 473func (ao AvailableOperations) IsEmpty() bool { 474 return ao.Value == nil || len(*ao.Value) == 0 475} 476 477// hasNextLink returns true if the NextLink is not empty. 478func (ao AvailableOperations) hasNextLink() bool { 479 return ao.NextLink != nil && len(*ao.NextLink) != 0 480} 481 482// availableOperationsPreparer prepares a request to retrieve the next set of results. 483// It returns nil if no more results exist. 484func (ao AvailableOperations) availableOperationsPreparer(ctx context.Context) (*http.Request, error) { 485 if !ao.hasNextLink() { 486 return nil, nil 487 } 488 return autorest.Prepare((&http.Request{}).WithContext(ctx), 489 autorest.AsJSON(), 490 autorest.AsGet(), 491 autorest.WithBaseURL(to.String(ao.NextLink))) 492} 493 494// AvailableOperationsPage contains a page of OperationDetail values. 495type AvailableOperationsPage struct { 496 fn func(context.Context, AvailableOperations) (AvailableOperations, error) 497 ao AvailableOperations 498} 499 500// NextWithContext advances to the next page of values. If there was an error making 501// the request the page does not advance and the error is returned. 502func (page *AvailableOperationsPage) NextWithContext(ctx context.Context) (err error) { 503 if tracing.IsEnabled() { 504 ctx = tracing.StartSpan(ctx, fqdn+"/AvailableOperationsPage.NextWithContext") 505 defer func() { 506 sc := -1 507 if page.Response().Response.Response != nil { 508 sc = page.Response().Response.Response.StatusCode 509 } 510 tracing.EndSpan(ctx, sc, err) 511 }() 512 } 513 for { 514 next, err := page.fn(ctx, page.ao) 515 if err != nil { 516 return err 517 } 518 page.ao = next 519 if !next.hasNextLink() || !next.IsEmpty() { 520 break 521 } 522 } 523 return nil 524} 525 526// Next advances to the next page of values. If there was an error making 527// the request the page does not advance and the error is returned. 528// Deprecated: Use NextWithContext() instead. 529func (page *AvailableOperationsPage) Next() error { 530 return page.NextWithContext(context.Background()) 531} 532 533// NotDone returns true if the page enumeration should be started or is not yet complete. 534func (page AvailableOperationsPage) NotDone() bool { 535 return !page.ao.IsEmpty() 536} 537 538// Response returns the raw server response from the last page request. 539func (page AvailableOperationsPage) Response() AvailableOperations { 540 return page.ao 541} 542 543// Values returns the slice of values for the current page or nil if there are no values. 544func (page AvailableOperationsPage) Values() []OperationDetail { 545 if page.ao.IsEmpty() { 546 return nil 547 } 548 return *page.ao.Value 549} 550 551// Creates a new instance of the AvailableOperationsPage type. 552func NewAvailableOperationsPage(cur AvailableOperations, getNextPage func(context.Context, AvailableOperations) (AvailableOperations, error)) AvailableOperationsPage { 553 return AvailableOperationsPage{ 554 fn: getNextPage, 555 ao: cur, 556 } 557} 558 559// AvailableRuntimeVersions ... 560type AvailableRuntimeVersions struct { 561 autorest.Response `json:"-"` 562 // Value - READ-ONLY; A list of all supported runtime versions. 563 Value *[]SupportedRuntimeVersion `json:"value,omitempty"` 564} 565 566// MarshalJSON is the custom marshaler for AvailableRuntimeVersions. 567func (arv AvailableRuntimeVersions) MarshalJSON() ([]byte, error) { 568 objectMap := make(map[string]interface{}) 569 return json.Marshal(objectMap) 570} 571 572// BindingResource binding resource payload 573type BindingResource struct { 574 autorest.Response `json:"-"` 575 // Properties - Properties of the Binding resource 576 Properties *BindingResourceProperties `json:"properties,omitempty"` 577 // ID - READ-ONLY; Fully qualified resource Id for the resource. 578 ID *string `json:"id,omitempty"` 579 // Name - READ-ONLY; The name of the resource. 580 Name *string `json:"name,omitempty"` 581 // Type - READ-ONLY; The type of the resource. 582 Type *string `json:"type,omitempty"` 583} 584 585// MarshalJSON is the custom marshaler for BindingResource. 586func (br BindingResource) MarshalJSON() ([]byte, error) { 587 objectMap := make(map[string]interface{}) 588 if br.Properties != nil { 589 objectMap["properties"] = br.Properties 590 } 591 return json.Marshal(objectMap) 592} 593 594// BindingResourceCollection object that includes an array of Binding resources and a possible link for 595// next set 596type BindingResourceCollection struct { 597 autorest.Response `json:"-"` 598 // Value - Collection of Binding resources 599 Value *[]BindingResource `json:"value,omitempty"` 600 // NextLink - URL client should use to fetch the next page (per server side paging). 601 // It's null for now, added for future use. 602 NextLink *string `json:"nextLink,omitempty"` 603} 604 605// BindingResourceCollectionIterator provides access to a complete listing of BindingResource values. 606type BindingResourceCollectionIterator struct { 607 i int 608 page BindingResourceCollectionPage 609} 610 611// NextWithContext advances to the next value. If there was an error making 612// the request the iterator does not advance and the error is returned. 613func (iter *BindingResourceCollectionIterator) NextWithContext(ctx context.Context) (err error) { 614 if tracing.IsEnabled() { 615 ctx = tracing.StartSpan(ctx, fqdn+"/BindingResourceCollectionIterator.NextWithContext") 616 defer func() { 617 sc := -1 618 if iter.Response().Response.Response != nil { 619 sc = iter.Response().Response.Response.StatusCode 620 } 621 tracing.EndSpan(ctx, sc, err) 622 }() 623 } 624 iter.i++ 625 if iter.i < len(iter.page.Values()) { 626 return nil 627 } 628 err = iter.page.NextWithContext(ctx) 629 if err != nil { 630 iter.i-- 631 return err 632 } 633 iter.i = 0 634 return nil 635} 636 637// Next advances to the next value. If there was an error making 638// the request the iterator does not advance and the error is returned. 639// Deprecated: Use NextWithContext() instead. 640func (iter *BindingResourceCollectionIterator) Next() error { 641 return iter.NextWithContext(context.Background()) 642} 643 644// NotDone returns true if the enumeration should be started or is not yet complete. 645func (iter BindingResourceCollectionIterator) NotDone() bool { 646 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 647} 648 649// Response returns the raw server response from the last page request. 650func (iter BindingResourceCollectionIterator) Response() BindingResourceCollection { 651 return iter.page.Response() 652} 653 654// Value returns the current value or a zero-initialized value if the 655// iterator has advanced beyond the end of the collection. 656func (iter BindingResourceCollectionIterator) Value() BindingResource { 657 if !iter.page.NotDone() { 658 return BindingResource{} 659 } 660 return iter.page.Values()[iter.i] 661} 662 663// Creates a new instance of the BindingResourceCollectionIterator type. 664func NewBindingResourceCollectionIterator(page BindingResourceCollectionPage) BindingResourceCollectionIterator { 665 return BindingResourceCollectionIterator{page: page} 666} 667 668// IsEmpty returns true if the ListResult contains no values. 669func (brc BindingResourceCollection) IsEmpty() bool { 670 return brc.Value == nil || len(*brc.Value) == 0 671} 672 673// hasNextLink returns true if the NextLink is not empty. 674func (brc BindingResourceCollection) hasNextLink() bool { 675 return brc.NextLink != nil && len(*brc.NextLink) != 0 676} 677 678// bindingResourceCollectionPreparer prepares a request to retrieve the next set of results. 679// It returns nil if no more results exist. 680func (brc BindingResourceCollection) bindingResourceCollectionPreparer(ctx context.Context) (*http.Request, error) { 681 if !brc.hasNextLink() { 682 return nil, nil 683 } 684 return autorest.Prepare((&http.Request{}).WithContext(ctx), 685 autorest.AsJSON(), 686 autorest.AsGet(), 687 autorest.WithBaseURL(to.String(brc.NextLink))) 688} 689 690// BindingResourceCollectionPage contains a page of BindingResource values. 691type BindingResourceCollectionPage struct { 692 fn func(context.Context, BindingResourceCollection) (BindingResourceCollection, error) 693 brc BindingResourceCollection 694} 695 696// NextWithContext advances to the next page of values. If there was an error making 697// the request the page does not advance and the error is returned. 698func (page *BindingResourceCollectionPage) NextWithContext(ctx context.Context) (err error) { 699 if tracing.IsEnabled() { 700 ctx = tracing.StartSpan(ctx, fqdn+"/BindingResourceCollectionPage.NextWithContext") 701 defer func() { 702 sc := -1 703 if page.Response().Response.Response != nil { 704 sc = page.Response().Response.Response.StatusCode 705 } 706 tracing.EndSpan(ctx, sc, err) 707 }() 708 } 709 for { 710 next, err := page.fn(ctx, page.brc) 711 if err != nil { 712 return err 713 } 714 page.brc = next 715 if !next.hasNextLink() || !next.IsEmpty() { 716 break 717 } 718 } 719 return nil 720} 721 722// Next advances to the next page of values. If there was an error making 723// the request the page does not advance and the error is returned. 724// Deprecated: Use NextWithContext() instead. 725func (page *BindingResourceCollectionPage) Next() error { 726 return page.NextWithContext(context.Background()) 727} 728 729// NotDone returns true if the page enumeration should be started or is not yet complete. 730func (page BindingResourceCollectionPage) NotDone() bool { 731 return !page.brc.IsEmpty() 732} 733 734// Response returns the raw server response from the last page request. 735func (page BindingResourceCollectionPage) Response() BindingResourceCollection { 736 return page.brc 737} 738 739// Values returns the slice of values for the current page or nil if there are no values. 740func (page BindingResourceCollectionPage) Values() []BindingResource { 741 if page.brc.IsEmpty() { 742 return nil 743 } 744 return *page.brc.Value 745} 746 747// Creates a new instance of the BindingResourceCollectionPage type. 748func NewBindingResourceCollectionPage(cur BindingResourceCollection, getNextPage func(context.Context, BindingResourceCollection) (BindingResourceCollection, error)) BindingResourceCollectionPage { 749 return BindingResourceCollectionPage{ 750 fn: getNextPage, 751 brc: cur, 752 } 753} 754 755// BindingResourceProperties binding resource properties payload 756type BindingResourceProperties struct { 757 // ResourceName - READ-ONLY; The name of the bound resource 758 ResourceName *string `json:"resourceName,omitempty"` 759 // ResourceType - READ-ONLY; The standard Azure resource type of the bound resource 760 ResourceType *string `json:"resourceType,omitempty"` 761 // ResourceID - The Azure resource id of the bound resource 762 ResourceID *string `json:"resourceId,omitempty"` 763 // Key - The key of the bound resource 764 Key *string `json:"key,omitempty"` 765 // BindingParameters - Binding parameters of the Binding resource 766 BindingParameters map[string]interface{} `json:"bindingParameters"` 767 // GeneratedProperties - READ-ONLY; The generated Spring Boot property file for this binding. The secret will be deducted. 768 GeneratedProperties *string `json:"generatedProperties,omitempty"` 769 // CreatedAt - READ-ONLY; Creation time of the Binding resource 770 CreatedAt *string `json:"createdAt,omitempty"` 771 // UpdatedAt - READ-ONLY; Update time of the Binding resource 772 UpdatedAt *string `json:"updatedAt,omitempty"` 773} 774 775// MarshalJSON is the custom marshaler for BindingResourceProperties. 776func (brp BindingResourceProperties) MarshalJSON() ([]byte, error) { 777 objectMap := make(map[string]interface{}) 778 if brp.ResourceID != nil { 779 objectMap["resourceId"] = brp.ResourceID 780 } 781 if brp.Key != nil { 782 objectMap["key"] = brp.Key 783 } 784 if brp.BindingParameters != nil { 785 objectMap["bindingParameters"] = brp.BindingParameters 786 } 787 return json.Marshal(objectMap) 788} 789 790// BindingsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running 791// operation. 792type BindingsCreateOrUpdateFuture struct { 793 azure.FutureAPI 794 // Result returns the result of the asynchronous operation. 795 // If the operation has not completed it will return an error. 796 Result func(BindingsClient) (BindingResource, error) 797} 798 799// UnmarshalJSON is the custom unmarshaller for CreateFuture. 800func (future *BindingsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { 801 var azFuture azure.Future 802 if err := json.Unmarshal(body, &azFuture); err != nil { 803 return err 804 } 805 future.FutureAPI = &azFuture 806 future.Result = future.result 807 return nil 808} 809 810// result is the default implementation for BindingsCreateOrUpdateFuture.Result. 811func (future *BindingsCreateOrUpdateFuture) result(client BindingsClient) (br BindingResource, err error) { 812 var done bool 813 done, err = future.DoneWithContext(context.Background(), client) 814 if err != nil { 815 err = autorest.NewErrorWithError(err, "appplatform.BindingsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 816 return 817 } 818 if !done { 819 br.Response.Response = future.Response() 820 err = azure.NewAsyncOpIncompleteError("appplatform.BindingsCreateOrUpdateFuture") 821 return 822 } 823 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 824 if br.Response.Response, err = future.GetResult(sender); err == nil && br.Response.Response.StatusCode != http.StatusNoContent { 825 br, err = client.CreateOrUpdateResponder(br.Response.Response) 826 if err != nil { 827 err = autorest.NewErrorWithError(err, "appplatform.BindingsCreateOrUpdateFuture", "Result", br.Response.Response, "Failure responding to request") 828 } 829 } 830 return 831} 832 833// BindingsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running 834// operation. 835type BindingsDeleteFuture struct { 836 azure.FutureAPI 837 // Result returns the result of the asynchronous operation. 838 // If the operation has not completed it will return an error. 839 Result func(BindingsClient) (autorest.Response, error) 840} 841 842// UnmarshalJSON is the custom unmarshaller for CreateFuture. 843func (future *BindingsDeleteFuture) UnmarshalJSON(body []byte) error { 844 var azFuture azure.Future 845 if err := json.Unmarshal(body, &azFuture); err != nil { 846 return err 847 } 848 future.FutureAPI = &azFuture 849 future.Result = future.result 850 return nil 851} 852 853// result is the default implementation for BindingsDeleteFuture.Result. 854func (future *BindingsDeleteFuture) result(client BindingsClient) (ar autorest.Response, err error) { 855 var done bool 856 done, err = future.DoneWithContext(context.Background(), client) 857 if err != nil { 858 err = autorest.NewErrorWithError(err, "appplatform.BindingsDeleteFuture", "Result", future.Response(), "Polling failure") 859 return 860 } 861 if !done { 862 ar.Response = future.Response() 863 err = azure.NewAsyncOpIncompleteError("appplatform.BindingsDeleteFuture") 864 return 865 } 866 ar.Response = future.Response() 867 return 868} 869 870// BindingsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running 871// operation. 872type BindingsUpdateFuture struct { 873 azure.FutureAPI 874 // Result returns the result of the asynchronous operation. 875 // If the operation has not completed it will return an error. 876 Result func(BindingsClient) (BindingResource, error) 877} 878 879// UnmarshalJSON is the custom unmarshaller for CreateFuture. 880func (future *BindingsUpdateFuture) UnmarshalJSON(body []byte) error { 881 var azFuture azure.Future 882 if err := json.Unmarshal(body, &azFuture); err != nil { 883 return err 884 } 885 future.FutureAPI = &azFuture 886 future.Result = future.result 887 return nil 888} 889 890// result is the default implementation for BindingsUpdateFuture.Result. 891func (future *BindingsUpdateFuture) result(client BindingsClient) (br BindingResource, err error) { 892 var done bool 893 done, err = future.DoneWithContext(context.Background(), client) 894 if err != nil { 895 err = autorest.NewErrorWithError(err, "appplatform.BindingsUpdateFuture", "Result", future.Response(), "Polling failure") 896 return 897 } 898 if !done { 899 br.Response.Response = future.Response() 900 err = azure.NewAsyncOpIncompleteError("appplatform.BindingsUpdateFuture") 901 return 902 } 903 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 904 if br.Response.Response, err = future.GetResult(sender); err == nil && br.Response.Response.StatusCode != http.StatusNoContent { 905 br, err = client.UpdateResponder(br.Response.Response) 906 if err != nil { 907 err = autorest.NewErrorWithError(err, "appplatform.BindingsUpdateFuture", "Result", br.Response.Response, "Failure responding to request") 908 } 909 } 910 return 911} 912 913// CertificateProperties certificate resource payload. 914type CertificateProperties struct { 915 // Thumbprint - READ-ONLY; The thumbprint of certificate. 916 Thumbprint *string `json:"thumbprint,omitempty"` 917 // VaultURI - The vault uri of user key vault. 918 VaultURI *string `json:"vaultUri,omitempty"` 919 // KeyVaultCertName - The certificate name of key vault. 920 KeyVaultCertName *string `json:"keyVaultCertName,omitempty"` 921 // CertVersion - The certificate version of key vault. 922 CertVersion *string `json:"certVersion,omitempty"` 923 // Issuer - READ-ONLY; The issuer of certificate. 924 Issuer *string `json:"issuer,omitempty"` 925 // IssuedDate - READ-ONLY; The issue date of certificate. 926 IssuedDate *string `json:"issuedDate,omitempty"` 927 // ExpirationDate - READ-ONLY; The expiration date of certificate. 928 ExpirationDate *string `json:"expirationDate,omitempty"` 929 // ActivateDate - READ-ONLY; The activate date of certificate. 930 ActivateDate *string `json:"activateDate,omitempty"` 931 // SubjectName - READ-ONLY; The subject name of certificate. 932 SubjectName *string `json:"subjectName,omitempty"` 933 // DNSNames - READ-ONLY; The domain list of certificate. 934 DNSNames *[]string `json:"dnsNames,omitempty"` 935} 936 937// MarshalJSON is the custom marshaler for CertificateProperties. 938func (cp CertificateProperties) MarshalJSON() ([]byte, error) { 939 objectMap := make(map[string]interface{}) 940 if cp.VaultURI != nil { 941 objectMap["vaultUri"] = cp.VaultURI 942 } 943 if cp.KeyVaultCertName != nil { 944 objectMap["keyVaultCertName"] = cp.KeyVaultCertName 945 } 946 if cp.CertVersion != nil { 947 objectMap["certVersion"] = cp.CertVersion 948 } 949 return json.Marshal(objectMap) 950} 951 952// CertificateResource certificate resource payload. 953type CertificateResource struct { 954 autorest.Response `json:"-"` 955 // Properties - Properties of the certificate resource payload. 956 Properties *CertificateProperties `json:"properties,omitempty"` 957 // ID - READ-ONLY; Fully qualified resource Id for the resource. 958 ID *string `json:"id,omitempty"` 959 // Name - READ-ONLY; The name of the resource. 960 Name *string `json:"name,omitempty"` 961 // Type - READ-ONLY; The type of the resource. 962 Type *string `json:"type,omitempty"` 963} 964 965// MarshalJSON is the custom marshaler for CertificateResource. 966func (cr CertificateResource) MarshalJSON() ([]byte, error) { 967 objectMap := make(map[string]interface{}) 968 if cr.Properties != nil { 969 objectMap["properties"] = cr.Properties 970 } 971 return json.Marshal(objectMap) 972} 973 974// CertificateResourceCollection collection compose of certificate resources list and a possible link for 975// next page. 976type CertificateResourceCollection struct { 977 autorest.Response `json:"-"` 978 // Value - The certificate resources list. 979 Value *[]CertificateResource `json:"value,omitempty"` 980 // NextLink - The link to next page of certificate list. 981 NextLink *string `json:"nextLink,omitempty"` 982} 983 984// CertificateResourceCollectionIterator provides access to a complete listing of CertificateResource 985// values. 986type CertificateResourceCollectionIterator struct { 987 i int 988 page CertificateResourceCollectionPage 989} 990 991// NextWithContext advances to the next value. If there was an error making 992// the request the iterator does not advance and the error is returned. 993func (iter *CertificateResourceCollectionIterator) NextWithContext(ctx context.Context) (err error) { 994 if tracing.IsEnabled() { 995 ctx = tracing.StartSpan(ctx, fqdn+"/CertificateResourceCollectionIterator.NextWithContext") 996 defer func() { 997 sc := -1 998 if iter.Response().Response.Response != nil { 999 sc = iter.Response().Response.Response.StatusCode 1000 } 1001 tracing.EndSpan(ctx, sc, err) 1002 }() 1003 } 1004 iter.i++ 1005 if iter.i < len(iter.page.Values()) { 1006 return nil 1007 } 1008 err = iter.page.NextWithContext(ctx) 1009 if err != nil { 1010 iter.i-- 1011 return err 1012 } 1013 iter.i = 0 1014 return nil 1015} 1016 1017// Next advances to the next value. If there was an error making 1018// the request the iterator does not advance and the error is returned. 1019// Deprecated: Use NextWithContext() instead. 1020func (iter *CertificateResourceCollectionIterator) Next() error { 1021 return iter.NextWithContext(context.Background()) 1022} 1023 1024// NotDone returns true if the enumeration should be started or is not yet complete. 1025func (iter CertificateResourceCollectionIterator) NotDone() bool { 1026 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 1027} 1028 1029// Response returns the raw server response from the last page request. 1030func (iter CertificateResourceCollectionIterator) Response() CertificateResourceCollection { 1031 return iter.page.Response() 1032} 1033 1034// Value returns the current value or a zero-initialized value if the 1035// iterator has advanced beyond the end of the collection. 1036func (iter CertificateResourceCollectionIterator) Value() CertificateResource { 1037 if !iter.page.NotDone() { 1038 return CertificateResource{} 1039 } 1040 return iter.page.Values()[iter.i] 1041} 1042 1043// Creates a new instance of the CertificateResourceCollectionIterator type. 1044func NewCertificateResourceCollectionIterator(page CertificateResourceCollectionPage) CertificateResourceCollectionIterator { 1045 return CertificateResourceCollectionIterator{page: page} 1046} 1047 1048// IsEmpty returns true if the ListResult contains no values. 1049func (crc CertificateResourceCollection) IsEmpty() bool { 1050 return crc.Value == nil || len(*crc.Value) == 0 1051} 1052 1053// hasNextLink returns true if the NextLink is not empty. 1054func (crc CertificateResourceCollection) hasNextLink() bool { 1055 return crc.NextLink != nil && len(*crc.NextLink) != 0 1056} 1057 1058// certificateResourceCollectionPreparer prepares a request to retrieve the next set of results. 1059// It returns nil if no more results exist. 1060func (crc CertificateResourceCollection) certificateResourceCollectionPreparer(ctx context.Context) (*http.Request, error) { 1061 if !crc.hasNextLink() { 1062 return nil, nil 1063 } 1064 return autorest.Prepare((&http.Request{}).WithContext(ctx), 1065 autorest.AsJSON(), 1066 autorest.AsGet(), 1067 autorest.WithBaseURL(to.String(crc.NextLink))) 1068} 1069 1070// CertificateResourceCollectionPage contains a page of CertificateResource values. 1071type CertificateResourceCollectionPage struct { 1072 fn func(context.Context, CertificateResourceCollection) (CertificateResourceCollection, error) 1073 crc CertificateResourceCollection 1074} 1075 1076// NextWithContext advances to the next page of values. If there was an error making 1077// the request the page does not advance and the error is returned. 1078func (page *CertificateResourceCollectionPage) NextWithContext(ctx context.Context) (err error) { 1079 if tracing.IsEnabled() { 1080 ctx = tracing.StartSpan(ctx, fqdn+"/CertificateResourceCollectionPage.NextWithContext") 1081 defer func() { 1082 sc := -1 1083 if page.Response().Response.Response != nil { 1084 sc = page.Response().Response.Response.StatusCode 1085 } 1086 tracing.EndSpan(ctx, sc, err) 1087 }() 1088 } 1089 for { 1090 next, err := page.fn(ctx, page.crc) 1091 if err != nil { 1092 return err 1093 } 1094 page.crc = next 1095 if !next.hasNextLink() || !next.IsEmpty() { 1096 break 1097 } 1098 } 1099 return nil 1100} 1101 1102// Next advances to the next page of values. If there was an error making 1103// the request the page does not advance and the error is returned. 1104// Deprecated: Use NextWithContext() instead. 1105func (page *CertificateResourceCollectionPage) Next() error { 1106 return page.NextWithContext(context.Background()) 1107} 1108 1109// NotDone returns true if the page enumeration should be started or is not yet complete. 1110func (page CertificateResourceCollectionPage) NotDone() bool { 1111 return !page.crc.IsEmpty() 1112} 1113 1114// Response returns the raw server response from the last page request. 1115func (page CertificateResourceCollectionPage) Response() CertificateResourceCollection { 1116 return page.crc 1117} 1118 1119// Values returns the slice of values for the current page or nil if there are no values. 1120func (page CertificateResourceCollectionPage) Values() []CertificateResource { 1121 if page.crc.IsEmpty() { 1122 return nil 1123 } 1124 return *page.crc.Value 1125} 1126 1127// Creates a new instance of the CertificateResourceCollectionPage type. 1128func NewCertificateResourceCollectionPage(cur CertificateResourceCollection, getNextPage func(context.Context, CertificateResourceCollection) (CertificateResourceCollection, error)) CertificateResourceCollectionPage { 1129 return CertificateResourceCollectionPage{ 1130 fn: getNextPage, 1131 crc: cur, 1132 } 1133} 1134 1135// CertificatesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a 1136// long-running operation. 1137type CertificatesCreateOrUpdateFuture struct { 1138 azure.FutureAPI 1139 // Result returns the result of the asynchronous operation. 1140 // If the operation has not completed it will return an error. 1141 Result func(CertificatesClient) (CertificateResource, error) 1142} 1143 1144// UnmarshalJSON is the custom unmarshaller for CreateFuture. 1145func (future *CertificatesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { 1146 var azFuture azure.Future 1147 if err := json.Unmarshal(body, &azFuture); err != nil { 1148 return err 1149 } 1150 future.FutureAPI = &azFuture 1151 future.Result = future.result 1152 return nil 1153} 1154 1155// result is the default implementation for CertificatesCreateOrUpdateFuture.Result. 1156func (future *CertificatesCreateOrUpdateFuture) result(client CertificatesClient) (cr CertificateResource, err error) { 1157 var done bool 1158 done, err = future.DoneWithContext(context.Background(), client) 1159 if err != nil { 1160 err = autorest.NewErrorWithError(err, "appplatform.CertificatesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 1161 return 1162 } 1163 if !done { 1164 cr.Response.Response = future.Response() 1165 err = azure.NewAsyncOpIncompleteError("appplatform.CertificatesCreateOrUpdateFuture") 1166 return 1167 } 1168 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 1169 if cr.Response.Response, err = future.GetResult(sender); err == nil && cr.Response.Response.StatusCode != http.StatusNoContent { 1170 cr, err = client.CreateOrUpdateResponder(cr.Response.Response) 1171 if err != nil { 1172 err = autorest.NewErrorWithError(err, "appplatform.CertificatesCreateOrUpdateFuture", "Result", cr.Response.Response, "Failure responding to request") 1173 } 1174 } 1175 return 1176} 1177 1178// CertificatesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running 1179// operation. 1180type CertificatesDeleteFuture struct { 1181 azure.FutureAPI 1182 // Result returns the result of the asynchronous operation. 1183 // If the operation has not completed it will return an error. 1184 Result func(CertificatesClient) (autorest.Response, error) 1185} 1186 1187// UnmarshalJSON is the custom unmarshaller for CreateFuture. 1188func (future *CertificatesDeleteFuture) UnmarshalJSON(body []byte) error { 1189 var azFuture azure.Future 1190 if err := json.Unmarshal(body, &azFuture); err != nil { 1191 return err 1192 } 1193 future.FutureAPI = &azFuture 1194 future.Result = future.result 1195 return nil 1196} 1197 1198// result is the default implementation for CertificatesDeleteFuture.Result. 1199func (future *CertificatesDeleteFuture) result(client CertificatesClient) (ar autorest.Response, err error) { 1200 var done bool 1201 done, err = future.DoneWithContext(context.Background(), client) 1202 if err != nil { 1203 err = autorest.NewErrorWithError(err, "appplatform.CertificatesDeleteFuture", "Result", future.Response(), "Polling failure") 1204 return 1205 } 1206 if !done { 1207 ar.Response = future.Response() 1208 err = azure.NewAsyncOpIncompleteError("appplatform.CertificatesDeleteFuture") 1209 return 1210 } 1211 ar.Response = future.Response() 1212 return 1213} 1214 1215// CloudError an error response from the service. 1216type CloudError struct { 1217 // Error - An error response from the service. 1218 Error *CloudErrorBody `json:"error,omitempty"` 1219} 1220 1221// CloudErrorBody an error response from the service. 1222type CloudErrorBody struct { 1223 // Code - An identifier for the error. Codes are invariant and are intended to be consumed programmatically. 1224 Code *string `json:"code,omitempty"` 1225 // Message - A message describing the error, intended to be suitable for display in a user interface. 1226 Message *string `json:"message,omitempty"` 1227 // Target - The target of the particular error. For example, the name of the property in error. 1228 Target *string `json:"target,omitempty"` 1229 // Details - A list of additional details about the error. 1230 Details *[]CloudErrorBody `json:"details,omitempty"` 1231} 1232 1233// ClusterResourceProperties service properties payload 1234type ClusterResourceProperties struct { 1235 // ProvisioningState - READ-ONLY; Provisioning state of the Service. Possible values include: 'ProvisioningStateCreating', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateDeleted', 'ProvisioningStateSucceeded', 'ProvisioningStateFailed', 'ProvisioningStateMoving', 'ProvisioningStateMoved', 'ProvisioningStateMoveFailed' 1236 ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` 1237 // NetworkProfile - Network profile of the Service 1238 NetworkProfile *NetworkProfile `json:"networkProfile,omitempty"` 1239 // Version - READ-ONLY; Version of the Service 1240 Version *int32 `json:"version,omitempty"` 1241 // ServiceID - READ-ONLY; ServiceInstanceEntity GUID which uniquely identifies a created resource 1242 ServiceID *string `json:"serviceId,omitempty"` 1243} 1244 1245// MarshalJSON is the custom marshaler for ClusterResourceProperties. 1246func (crp ClusterResourceProperties) MarshalJSON() ([]byte, error) { 1247 objectMap := make(map[string]interface{}) 1248 if crp.NetworkProfile != nil { 1249 objectMap["networkProfile"] = crp.NetworkProfile 1250 } 1251 return json.Marshal(objectMap) 1252} 1253 1254// ConfigServerGitProperty property of git. 1255type ConfigServerGitProperty struct { 1256 // Repositories - Repositories of git. 1257 Repositories *[]GitPatternRepository `json:"repositories,omitempty"` 1258 // URI - URI of the repository 1259 URI *string `json:"uri,omitempty"` 1260 // Label - Label of the repository 1261 Label *string `json:"label,omitempty"` 1262 // SearchPaths - Searching path of the repository 1263 SearchPaths *[]string `json:"searchPaths,omitempty"` 1264 // Username - Username of git repository basic auth. 1265 Username *string `json:"username,omitempty"` 1266 // Password - Password of git repository basic auth. 1267 Password *string `json:"password,omitempty"` 1268 // HostKey - Public sshKey of git repository. 1269 HostKey *string `json:"hostKey,omitempty"` 1270 // HostKeyAlgorithm - SshKey algorithm of git repository. 1271 HostKeyAlgorithm *string `json:"hostKeyAlgorithm,omitempty"` 1272 // PrivateKey - Private sshKey algorithm of git repository. 1273 PrivateKey *string `json:"privateKey,omitempty"` 1274 // StrictHostKeyChecking - Strict host key checking or not. 1275 StrictHostKeyChecking *bool `json:"strictHostKeyChecking,omitempty"` 1276} 1277 1278// ConfigServerProperties config server git properties payload 1279type ConfigServerProperties struct { 1280 // ProvisioningState - READ-ONLY; State of the config server. Possible values include: 'ConfigServerStateNotAvailable', 'ConfigServerStateDeleted', 'ConfigServerStateFailed', 'ConfigServerStateSucceeded', 'ConfigServerStateUpdating' 1281 ProvisioningState ConfigServerState `json:"provisioningState,omitempty"` 1282 // Error - Error when apply config server settings. 1283 Error *Error `json:"error,omitempty"` 1284 // ConfigServer - Settings of config server. 1285 ConfigServer *ConfigServerSettings `json:"configServer,omitempty"` 1286} 1287 1288// MarshalJSON is the custom marshaler for ConfigServerProperties. 1289func (csp ConfigServerProperties) MarshalJSON() ([]byte, error) { 1290 objectMap := make(map[string]interface{}) 1291 if csp.Error != nil { 1292 objectMap["error"] = csp.Error 1293 } 1294 if csp.ConfigServer != nil { 1295 objectMap["configServer"] = csp.ConfigServer 1296 } 1297 return json.Marshal(objectMap) 1298} 1299 1300// ConfigServerResource config Server resource 1301type ConfigServerResource struct { 1302 autorest.Response `json:"-"` 1303 // Properties - Properties of the Config Server resource 1304 Properties *ConfigServerProperties `json:"properties,omitempty"` 1305 // ID - READ-ONLY; Fully qualified resource Id for the resource. 1306 ID *string `json:"id,omitempty"` 1307 // Name - READ-ONLY; The name of the resource. 1308 Name *string `json:"name,omitempty"` 1309 // Type - READ-ONLY; The type of the resource. 1310 Type *string `json:"type,omitempty"` 1311} 1312 1313// MarshalJSON is the custom marshaler for ConfigServerResource. 1314func (csr ConfigServerResource) MarshalJSON() ([]byte, error) { 1315 objectMap := make(map[string]interface{}) 1316 if csr.Properties != nil { 1317 objectMap["properties"] = csr.Properties 1318 } 1319 return json.Marshal(objectMap) 1320} 1321 1322// ConfigServerSettings the settings of config server. 1323type ConfigServerSettings struct { 1324 // GitProperty - Property of git environment. 1325 GitProperty *ConfigServerGitProperty `json:"gitProperty,omitempty"` 1326} 1327 1328// ConfigServerSettingsErrorRecord error record of the config server settings 1329type ConfigServerSettingsErrorRecord struct { 1330 // Name - The name of the config server settings error record 1331 Name *string `json:"name,omitempty"` 1332 // URI - The uri of the config server settings error record 1333 URI *string `json:"uri,omitempty"` 1334 // Messages - The detail error messages of the record 1335 Messages *[]string `json:"messages,omitempty"` 1336} 1337 1338// ConfigServerSettingsValidateResult validation result for config server settings 1339type ConfigServerSettingsValidateResult struct { 1340 autorest.Response `json:"-"` 1341 // IsValid - Indicate if the config server settings are valid 1342 IsValid *bool `json:"isValid,omitempty"` 1343 // Details - The detail validation results 1344 Details *[]ConfigServerSettingsErrorRecord `json:"details,omitempty"` 1345} 1346 1347// ConfigServersUpdatePatchFuture an abstraction for monitoring and retrieving the results of a 1348// long-running operation. 1349type ConfigServersUpdatePatchFuture struct { 1350 azure.FutureAPI 1351 // Result returns the result of the asynchronous operation. 1352 // If the operation has not completed it will return an error. 1353 Result func(ConfigServersClient) (ConfigServerResource, error) 1354} 1355 1356// UnmarshalJSON is the custom unmarshaller for CreateFuture. 1357func (future *ConfigServersUpdatePatchFuture) UnmarshalJSON(body []byte) error { 1358 var azFuture azure.Future 1359 if err := json.Unmarshal(body, &azFuture); err != nil { 1360 return err 1361 } 1362 future.FutureAPI = &azFuture 1363 future.Result = future.result 1364 return nil 1365} 1366 1367// result is the default implementation for ConfigServersUpdatePatchFuture.Result. 1368func (future *ConfigServersUpdatePatchFuture) result(client ConfigServersClient) (csr ConfigServerResource, err error) { 1369 var done bool 1370 done, err = future.DoneWithContext(context.Background(), client) 1371 if err != nil { 1372 err = autorest.NewErrorWithError(err, "appplatform.ConfigServersUpdatePatchFuture", "Result", future.Response(), "Polling failure") 1373 return 1374 } 1375 if !done { 1376 csr.Response.Response = future.Response() 1377 err = azure.NewAsyncOpIncompleteError("appplatform.ConfigServersUpdatePatchFuture") 1378 return 1379 } 1380 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 1381 if csr.Response.Response, err = future.GetResult(sender); err == nil && csr.Response.Response.StatusCode != http.StatusNoContent { 1382 csr, err = client.UpdatePatchResponder(csr.Response.Response) 1383 if err != nil { 1384 err = autorest.NewErrorWithError(err, "appplatform.ConfigServersUpdatePatchFuture", "Result", csr.Response.Response, "Failure responding to request") 1385 } 1386 } 1387 return 1388} 1389 1390// ConfigServersUpdatePutFuture an abstraction for monitoring and retrieving the results of a long-running 1391// operation. 1392type ConfigServersUpdatePutFuture struct { 1393 azure.FutureAPI 1394 // Result returns the result of the asynchronous operation. 1395 // If the operation has not completed it will return an error. 1396 Result func(ConfigServersClient) (ConfigServerResource, error) 1397} 1398 1399// UnmarshalJSON is the custom unmarshaller for CreateFuture. 1400func (future *ConfigServersUpdatePutFuture) UnmarshalJSON(body []byte) error { 1401 var azFuture azure.Future 1402 if err := json.Unmarshal(body, &azFuture); err != nil { 1403 return err 1404 } 1405 future.FutureAPI = &azFuture 1406 future.Result = future.result 1407 return nil 1408} 1409 1410// result is the default implementation for ConfigServersUpdatePutFuture.Result. 1411func (future *ConfigServersUpdatePutFuture) result(client ConfigServersClient) (csr ConfigServerResource, err error) { 1412 var done bool 1413 done, err = future.DoneWithContext(context.Background(), client) 1414 if err != nil { 1415 err = autorest.NewErrorWithError(err, "appplatform.ConfigServersUpdatePutFuture", "Result", future.Response(), "Polling failure") 1416 return 1417 } 1418 if !done { 1419 csr.Response.Response = future.Response() 1420 err = azure.NewAsyncOpIncompleteError("appplatform.ConfigServersUpdatePutFuture") 1421 return 1422 } 1423 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 1424 if csr.Response.Response, err = future.GetResult(sender); err == nil && csr.Response.Response.StatusCode != http.StatusNoContent { 1425 csr, err = client.UpdatePutResponder(csr.Response.Response) 1426 if err != nil { 1427 err = autorest.NewErrorWithError(err, "appplatform.ConfigServersUpdatePutFuture", "Result", csr.Response.Response, "Failure responding to request") 1428 } 1429 } 1430 return 1431} 1432 1433// ConfigServersValidateFuture an abstraction for monitoring and retrieving the results of a long-running 1434// operation. 1435type ConfigServersValidateFuture struct { 1436 azure.FutureAPI 1437 // Result returns the result of the asynchronous operation. 1438 // If the operation has not completed it will return an error. 1439 Result func(ConfigServersClient) (ConfigServerSettingsValidateResult, error) 1440} 1441 1442// UnmarshalJSON is the custom unmarshaller for CreateFuture. 1443func (future *ConfigServersValidateFuture) UnmarshalJSON(body []byte) error { 1444 var azFuture azure.Future 1445 if err := json.Unmarshal(body, &azFuture); err != nil { 1446 return err 1447 } 1448 future.FutureAPI = &azFuture 1449 future.Result = future.result 1450 return nil 1451} 1452 1453// result is the default implementation for ConfigServersValidateFuture.Result. 1454func (future *ConfigServersValidateFuture) result(client ConfigServersClient) (cssvr ConfigServerSettingsValidateResult, err error) { 1455 var done bool 1456 done, err = future.DoneWithContext(context.Background(), client) 1457 if err != nil { 1458 err = autorest.NewErrorWithError(err, "appplatform.ConfigServersValidateFuture", "Result", future.Response(), "Polling failure") 1459 return 1460 } 1461 if !done { 1462 cssvr.Response.Response = future.Response() 1463 err = azure.NewAsyncOpIncompleteError("appplatform.ConfigServersValidateFuture") 1464 return 1465 } 1466 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 1467 if cssvr.Response.Response, err = future.GetResult(sender); err == nil && cssvr.Response.Response.StatusCode != http.StatusNoContent { 1468 cssvr, err = client.ValidateResponder(cssvr.Response.Response) 1469 if err != nil { 1470 err = autorest.NewErrorWithError(err, "appplatform.ConfigServersValidateFuture", "Result", cssvr.Response.Response, "Failure responding to request") 1471 } 1472 } 1473 return 1474} 1475 1476// CustomDomainProperties custom domain of app resource payload. 1477type CustomDomainProperties struct { 1478 // Thumbprint - The thumbprint of bound certificate. 1479 Thumbprint *string `json:"thumbprint,omitempty"` 1480 // AppName - READ-ONLY; The app name of domain. 1481 AppName *string `json:"appName,omitempty"` 1482 // CertName - The bound certificate name of domain. 1483 CertName *string `json:"certName,omitempty"` 1484} 1485 1486// MarshalJSON is the custom marshaler for CustomDomainProperties. 1487func (cdp CustomDomainProperties) MarshalJSON() ([]byte, error) { 1488 objectMap := make(map[string]interface{}) 1489 if cdp.Thumbprint != nil { 1490 objectMap["thumbprint"] = cdp.Thumbprint 1491 } 1492 if cdp.CertName != nil { 1493 objectMap["certName"] = cdp.CertName 1494 } 1495 return json.Marshal(objectMap) 1496} 1497 1498// CustomDomainResource custom domain resource payload. 1499type CustomDomainResource struct { 1500 autorest.Response `json:"-"` 1501 // Properties - Properties of the custom domain resource. 1502 Properties *CustomDomainProperties `json:"properties,omitempty"` 1503 // ID - READ-ONLY; Fully qualified resource Id for the resource. 1504 ID *string `json:"id,omitempty"` 1505 // Name - READ-ONLY; The name of the resource. 1506 Name *string `json:"name,omitempty"` 1507 // Type - READ-ONLY; The type of the resource. 1508 Type *string `json:"type,omitempty"` 1509} 1510 1511// MarshalJSON is the custom marshaler for CustomDomainResource. 1512func (cdr CustomDomainResource) MarshalJSON() ([]byte, error) { 1513 objectMap := make(map[string]interface{}) 1514 if cdr.Properties != nil { 1515 objectMap["properties"] = cdr.Properties 1516 } 1517 return json.Marshal(objectMap) 1518} 1519 1520// CustomDomainResourceCollection collection compose of a custom domain resources list and a possible link 1521// for next page. 1522type CustomDomainResourceCollection struct { 1523 autorest.Response `json:"-"` 1524 // Value - The custom domain resources list. 1525 Value *[]CustomDomainResource `json:"value,omitempty"` 1526 // NextLink - The link to next page of custom domain list. 1527 NextLink *string `json:"nextLink,omitempty"` 1528} 1529 1530// CustomDomainResourceCollectionIterator provides access to a complete listing of CustomDomainResource 1531// values. 1532type CustomDomainResourceCollectionIterator struct { 1533 i int 1534 page CustomDomainResourceCollectionPage 1535} 1536 1537// NextWithContext advances to the next value. If there was an error making 1538// the request the iterator does not advance and the error is returned. 1539func (iter *CustomDomainResourceCollectionIterator) NextWithContext(ctx context.Context) (err error) { 1540 if tracing.IsEnabled() { 1541 ctx = tracing.StartSpan(ctx, fqdn+"/CustomDomainResourceCollectionIterator.NextWithContext") 1542 defer func() { 1543 sc := -1 1544 if iter.Response().Response.Response != nil { 1545 sc = iter.Response().Response.Response.StatusCode 1546 } 1547 tracing.EndSpan(ctx, sc, err) 1548 }() 1549 } 1550 iter.i++ 1551 if iter.i < len(iter.page.Values()) { 1552 return nil 1553 } 1554 err = iter.page.NextWithContext(ctx) 1555 if err != nil { 1556 iter.i-- 1557 return err 1558 } 1559 iter.i = 0 1560 return nil 1561} 1562 1563// Next advances to the next value. If there was an error making 1564// the request the iterator does not advance and the error is returned. 1565// Deprecated: Use NextWithContext() instead. 1566func (iter *CustomDomainResourceCollectionIterator) Next() error { 1567 return iter.NextWithContext(context.Background()) 1568} 1569 1570// NotDone returns true if the enumeration should be started or is not yet complete. 1571func (iter CustomDomainResourceCollectionIterator) NotDone() bool { 1572 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 1573} 1574 1575// Response returns the raw server response from the last page request. 1576func (iter CustomDomainResourceCollectionIterator) Response() CustomDomainResourceCollection { 1577 return iter.page.Response() 1578} 1579 1580// Value returns the current value or a zero-initialized value if the 1581// iterator has advanced beyond the end of the collection. 1582func (iter CustomDomainResourceCollectionIterator) Value() CustomDomainResource { 1583 if !iter.page.NotDone() { 1584 return CustomDomainResource{} 1585 } 1586 return iter.page.Values()[iter.i] 1587} 1588 1589// Creates a new instance of the CustomDomainResourceCollectionIterator type. 1590func NewCustomDomainResourceCollectionIterator(page CustomDomainResourceCollectionPage) CustomDomainResourceCollectionIterator { 1591 return CustomDomainResourceCollectionIterator{page: page} 1592} 1593 1594// IsEmpty returns true if the ListResult contains no values. 1595func (cdrc CustomDomainResourceCollection) IsEmpty() bool { 1596 return cdrc.Value == nil || len(*cdrc.Value) == 0 1597} 1598 1599// hasNextLink returns true if the NextLink is not empty. 1600func (cdrc CustomDomainResourceCollection) hasNextLink() bool { 1601 return cdrc.NextLink != nil && len(*cdrc.NextLink) != 0 1602} 1603 1604// customDomainResourceCollectionPreparer prepares a request to retrieve the next set of results. 1605// It returns nil if no more results exist. 1606func (cdrc CustomDomainResourceCollection) customDomainResourceCollectionPreparer(ctx context.Context) (*http.Request, error) { 1607 if !cdrc.hasNextLink() { 1608 return nil, nil 1609 } 1610 return autorest.Prepare((&http.Request{}).WithContext(ctx), 1611 autorest.AsJSON(), 1612 autorest.AsGet(), 1613 autorest.WithBaseURL(to.String(cdrc.NextLink))) 1614} 1615 1616// CustomDomainResourceCollectionPage contains a page of CustomDomainResource values. 1617type CustomDomainResourceCollectionPage struct { 1618 fn func(context.Context, CustomDomainResourceCollection) (CustomDomainResourceCollection, error) 1619 cdrc CustomDomainResourceCollection 1620} 1621 1622// NextWithContext advances to the next page of values. If there was an error making 1623// the request the page does not advance and the error is returned. 1624func (page *CustomDomainResourceCollectionPage) NextWithContext(ctx context.Context) (err error) { 1625 if tracing.IsEnabled() { 1626 ctx = tracing.StartSpan(ctx, fqdn+"/CustomDomainResourceCollectionPage.NextWithContext") 1627 defer func() { 1628 sc := -1 1629 if page.Response().Response.Response != nil { 1630 sc = page.Response().Response.Response.StatusCode 1631 } 1632 tracing.EndSpan(ctx, sc, err) 1633 }() 1634 } 1635 for { 1636 next, err := page.fn(ctx, page.cdrc) 1637 if err != nil { 1638 return err 1639 } 1640 page.cdrc = next 1641 if !next.hasNextLink() || !next.IsEmpty() { 1642 break 1643 } 1644 } 1645 return nil 1646} 1647 1648// Next advances to the next page of values. If there was an error making 1649// the request the page does not advance and the error is returned. 1650// Deprecated: Use NextWithContext() instead. 1651func (page *CustomDomainResourceCollectionPage) Next() error { 1652 return page.NextWithContext(context.Background()) 1653} 1654 1655// NotDone returns true if the page enumeration should be started or is not yet complete. 1656func (page CustomDomainResourceCollectionPage) NotDone() bool { 1657 return !page.cdrc.IsEmpty() 1658} 1659 1660// Response returns the raw server response from the last page request. 1661func (page CustomDomainResourceCollectionPage) Response() CustomDomainResourceCollection { 1662 return page.cdrc 1663} 1664 1665// Values returns the slice of values for the current page or nil if there are no values. 1666func (page CustomDomainResourceCollectionPage) Values() []CustomDomainResource { 1667 if page.cdrc.IsEmpty() { 1668 return nil 1669 } 1670 return *page.cdrc.Value 1671} 1672 1673// Creates a new instance of the CustomDomainResourceCollectionPage type. 1674func NewCustomDomainResourceCollectionPage(cur CustomDomainResourceCollection, getNextPage func(context.Context, CustomDomainResourceCollection) (CustomDomainResourceCollection, error)) CustomDomainResourceCollectionPage { 1675 return CustomDomainResourceCollectionPage{ 1676 fn: getNextPage, 1677 cdrc: cur, 1678 } 1679} 1680 1681// CustomDomainsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a 1682// long-running operation. 1683type CustomDomainsCreateOrUpdateFuture struct { 1684 azure.FutureAPI 1685 // Result returns the result of the asynchronous operation. 1686 // If the operation has not completed it will return an error. 1687 Result func(CustomDomainsClient) (CustomDomainResource, error) 1688} 1689 1690// UnmarshalJSON is the custom unmarshaller for CreateFuture. 1691func (future *CustomDomainsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { 1692 var azFuture azure.Future 1693 if err := json.Unmarshal(body, &azFuture); err != nil { 1694 return err 1695 } 1696 future.FutureAPI = &azFuture 1697 future.Result = future.result 1698 return nil 1699} 1700 1701// result is the default implementation for CustomDomainsCreateOrUpdateFuture.Result. 1702func (future *CustomDomainsCreateOrUpdateFuture) result(client CustomDomainsClient) (cdr CustomDomainResource, err error) { 1703 var done bool 1704 done, err = future.DoneWithContext(context.Background(), client) 1705 if err != nil { 1706 err = autorest.NewErrorWithError(err, "appplatform.CustomDomainsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 1707 return 1708 } 1709 if !done { 1710 cdr.Response.Response = future.Response() 1711 err = azure.NewAsyncOpIncompleteError("appplatform.CustomDomainsCreateOrUpdateFuture") 1712 return 1713 } 1714 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 1715 if cdr.Response.Response, err = future.GetResult(sender); err == nil && cdr.Response.Response.StatusCode != http.StatusNoContent { 1716 cdr, err = client.CreateOrUpdateResponder(cdr.Response.Response) 1717 if err != nil { 1718 err = autorest.NewErrorWithError(err, "appplatform.CustomDomainsCreateOrUpdateFuture", "Result", cdr.Response.Response, "Failure responding to request") 1719 } 1720 } 1721 return 1722} 1723 1724// CustomDomainsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running 1725// operation. 1726type CustomDomainsDeleteFuture struct { 1727 azure.FutureAPI 1728 // Result returns the result of the asynchronous operation. 1729 // If the operation has not completed it will return an error. 1730 Result func(CustomDomainsClient) (autorest.Response, error) 1731} 1732 1733// UnmarshalJSON is the custom unmarshaller for CreateFuture. 1734func (future *CustomDomainsDeleteFuture) UnmarshalJSON(body []byte) error { 1735 var azFuture azure.Future 1736 if err := json.Unmarshal(body, &azFuture); err != nil { 1737 return err 1738 } 1739 future.FutureAPI = &azFuture 1740 future.Result = future.result 1741 return nil 1742} 1743 1744// result is the default implementation for CustomDomainsDeleteFuture.Result. 1745func (future *CustomDomainsDeleteFuture) result(client CustomDomainsClient) (ar autorest.Response, err error) { 1746 var done bool 1747 done, err = future.DoneWithContext(context.Background(), client) 1748 if err != nil { 1749 err = autorest.NewErrorWithError(err, "appplatform.CustomDomainsDeleteFuture", "Result", future.Response(), "Polling failure") 1750 return 1751 } 1752 if !done { 1753 ar.Response = future.Response() 1754 err = azure.NewAsyncOpIncompleteError("appplatform.CustomDomainsDeleteFuture") 1755 return 1756 } 1757 ar.Response = future.Response() 1758 return 1759} 1760 1761// CustomDomainsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running 1762// operation. 1763type CustomDomainsUpdateFuture struct { 1764 azure.FutureAPI 1765 // Result returns the result of the asynchronous operation. 1766 // If the operation has not completed it will return an error. 1767 Result func(CustomDomainsClient) (CustomDomainResource, error) 1768} 1769 1770// UnmarshalJSON is the custom unmarshaller for CreateFuture. 1771func (future *CustomDomainsUpdateFuture) UnmarshalJSON(body []byte) error { 1772 var azFuture azure.Future 1773 if err := json.Unmarshal(body, &azFuture); err != nil { 1774 return err 1775 } 1776 future.FutureAPI = &azFuture 1777 future.Result = future.result 1778 return nil 1779} 1780 1781// result is the default implementation for CustomDomainsUpdateFuture.Result. 1782func (future *CustomDomainsUpdateFuture) result(client CustomDomainsClient) (cdr CustomDomainResource, err error) { 1783 var done bool 1784 done, err = future.DoneWithContext(context.Background(), client) 1785 if err != nil { 1786 err = autorest.NewErrorWithError(err, "appplatform.CustomDomainsUpdateFuture", "Result", future.Response(), "Polling failure") 1787 return 1788 } 1789 if !done { 1790 cdr.Response.Response = future.Response() 1791 err = azure.NewAsyncOpIncompleteError("appplatform.CustomDomainsUpdateFuture") 1792 return 1793 } 1794 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 1795 if cdr.Response.Response, err = future.GetResult(sender); err == nil && cdr.Response.Response.StatusCode != http.StatusNoContent { 1796 cdr, err = client.UpdateResponder(cdr.Response.Response) 1797 if err != nil { 1798 err = autorest.NewErrorWithError(err, "appplatform.CustomDomainsUpdateFuture", "Result", cdr.Response.Response, "Failure responding to request") 1799 } 1800 } 1801 return 1802} 1803 1804// CustomDomainValidatePayload custom domain validate payload. 1805type CustomDomainValidatePayload struct { 1806 // Name - Name to be validated 1807 Name *string `json:"name,omitempty"` 1808} 1809 1810// CustomDomainValidateResult validation result for custom domain. 1811type CustomDomainValidateResult struct { 1812 autorest.Response `json:"-"` 1813 // IsValid - Indicates if domain name is valid. 1814 IsValid *bool `json:"isValid,omitempty"` 1815 // Message - Message of why domain name is invalid. 1816 Message *string `json:"message,omitempty"` 1817} 1818 1819// DeploymentInstance deployment instance payload 1820type DeploymentInstance struct { 1821 // Name - READ-ONLY; Name of the deployment instance 1822 Name *string `json:"name,omitempty"` 1823 // Status - READ-ONLY; Status of the deployment instance 1824 Status *string `json:"status,omitempty"` 1825 // Reason - READ-ONLY; Failed reason of the deployment instance 1826 Reason *string `json:"reason,omitempty"` 1827 // DiscoveryStatus - READ-ONLY; Discovery status of the deployment instance 1828 DiscoveryStatus *string `json:"discoveryStatus,omitempty"` 1829 // StartTime - READ-ONLY; Start time of the deployment instance 1830 StartTime *string `json:"startTime,omitempty"` 1831} 1832 1833// MarshalJSON is the custom marshaler for DeploymentInstance. 1834func (di DeploymentInstance) MarshalJSON() ([]byte, error) { 1835 objectMap := make(map[string]interface{}) 1836 return json.Marshal(objectMap) 1837} 1838 1839// DeploymentResource deployment resource payload 1840type DeploymentResource struct { 1841 autorest.Response `json:"-"` 1842 // Properties - Properties of the Deployment resource 1843 Properties *DeploymentResourceProperties `json:"properties,omitempty"` 1844 // Sku - Sku of the Deployment resource 1845 Sku *Sku `json:"sku,omitempty"` 1846 // ID - READ-ONLY; Fully qualified resource Id for the resource. 1847 ID *string `json:"id,omitempty"` 1848 // Name - READ-ONLY; The name of the resource. 1849 Name *string `json:"name,omitempty"` 1850 // Type - READ-ONLY; The type of the resource. 1851 Type *string `json:"type,omitempty"` 1852} 1853 1854// MarshalJSON is the custom marshaler for DeploymentResource. 1855func (dr DeploymentResource) MarshalJSON() ([]byte, error) { 1856 objectMap := make(map[string]interface{}) 1857 if dr.Properties != nil { 1858 objectMap["properties"] = dr.Properties 1859 } 1860 if dr.Sku != nil { 1861 objectMap["sku"] = dr.Sku 1862 } 1863 return json.Marshal(objectMap) 1864} 1865 1866// DeploymentResourceCollection object that includes an array of App resources and a possible link for next 1867// set 1868type DeploymentResourceCollection struct { 1869 autorest.Response `json:"-"` 1870 // Value - Collection of Deployment resources 1871 Value *[]DeploymentResource `json:"value,omitempty"` 1872 // NextLink - URL client should use to fetch the next page (per server side paging). 1873 // It's null for now, added for future use. 1874 NextLink *string `json:"nextLink,omitempty"` 1875} 1876 1877// DeploymentResourceCollectionIterator provides access to a complete listing of DeploymentResource values. 1878type DeploymentResourceCollectionIterator struct { 1879 i int 1880 page DeploymentResourceCollectionPage 1881} 1882 1883// NextWithContext advances to the next value. If there was an error making 1884// the request the iterator does not advance and the error is returned. 1885func (iter *DeploymentResourceCollectionIterator) NextWithContext(ctx context.Context) (err error) { 1886 if tracing.IsEnabled() { 1887 ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentResourceCollectionIterator.NextWithContext") 1888 defer func() { 1889 sc := -1 1890 if iter.Response().Response.Response != nil { 1891 sc = iter.Response().Response.Response.StatusCode 1892 } 1893 tracing.EndSpan(ctx, sc, err) 1894 }() 1895 } 1896 iter.i++ 1897 if iter.i < len(iter.page.Values()) { 1898 return nil 1899 } 1900 err = iter.page.NextWithContext(ctx) 1901 if err != nil { 1902 iter.i-- 1903 return err 1904 } 1905 iter.i = 0 1906 return nil 1907} 1908 1909// Next advances to the next value. If there was an error making 1910// the request the iterator does not advance and the error is returned. 1911// Deprecated: Use NextWithContext() instead. 1912func (iter *DeploymentResourceCollectionIterator) Next() error { 1913 return iter.NextWithContext(context.Background()) 1914} 1915 1916// NotDone returns true if the enumeration should be started or is not yet complete. 1917func (iter DeploymentResourceCollectionIterator) NotDone() bool { 1918 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 1919} 1920 1921// Response returns the raw server response from the last page request. 1922func (iter DeploymentResourceCollectionIterator) Response() DeploymentResourceCollection { 1923 return iter.page.Response() 1924} 1925 1926// Value returns the current value or a zero-initialized value if the 1927// iterator has advanced beyond the end of the collection. 1928func (iter DeploymentResourceCollectionIterator) Value() DeploymentResource { 1929 if !iter.page.NotDone() { 1930 return DeploymentResource{} 1931 } 1932 return iter.page.Values()[iter.i] 1933} 1934 1935// Creates a new instance of the DeploymentResourceCollectionIterator type. 1936func NewDeploymentResourceCollectionIterator(page DeploymentResourceCollectionPage) DeploymentResourceCollectionIterator { 1937 return DeploymentResourceCollectionIterator{page: page} 1938} 1939 1940// IsEmpty returns true if the ListResult contains no values. 1941func (drc DeploymentResourceCollection) IsEmpty() bool { 1942 return drc.Value == nil || len(*drc.Value) == 0 1943} 1944 1945// hasNextLink returns true if the NextLink is not empty. 1946func (drc DeploymentResourceCollection) hasNextLink() bool { 1947 return drc.NextLink != nil && len(*drc.NextLink) != 0 1948} 1949 1950// deploymentResourceCollectionPreparer prepares a request to retrieve the next set of results. 1951// It returns nil if no more results exist. 1952func (drc DeploymentResourceCollection) deploymentResourceCollectionPreparer(ctx context.Context) (*http.Request, error) { 1953 if !drc.hasNextLink() { 1954 return nil, nil 1955 } 1956 return autorest.Prepare((&http.Request{}).WithContext(ctx), 1957 autorest.AsJSON(), 1958 autorest.AsGet(), 1959 autorest.WithBaseURL(to.String(drc.NextLink))) 1960} 1961 1962// DeploymentResourceCollectionPage contains a page of DeploymentResource values. 1963type DeploymentResourceCollectionPage struct { 1964 fn func(context.Context, DeploymentResourceCollection) (DeploymentResourceCollection, error) 1965 drc DeploymentResourceCollection 1966} 1967 1968// NextWithContext advances to the next page of values. If there was an error making 1969// the request the page does not advance and the error is returned. 1970func (page *DeploymentResourceCollectionPage) NextWithContext(ctx context.Context) (err error) { 1971 if tracing.IsEnabled() { 1972 ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentResourceCollectionPage.NextWithContext") 1973 defer func() { 1974 sc := -1 1975 if page.Response().Response.Response != nil { 1976 sc = page.Response().Response.Response.StatusCode 1977 } 1978 tracing.EndSpan(ctx, sc, err) 1979 }() 1980 } 1981 for { 1982 next, err := page.fn(ctx, page.drc) 1983 if err != nil { 1984 return err 1985 } 1986 page.drc = next 1987 if !next.hasNextLink() || !next.IsEmpty() { 1988 break 1989 } 1990 } 1991 return nil 1992} 1993 1994// Next advances to the next page of values. If there was an error making 1995// the request the page does not advance and the error is returned. 1996// Deprecated: Use NextWithContext() instead. 1997func (page *DeploymentResourceCollectionPage) Next() error { 1998 return page.NextWithContext(context.Background()) 1999} 2000 2001// NotDone returns true if the page enumeration should be started or is not yet complete. 2002func (page DeploymentResourceCollectionPage) NotDone() bool { 2003 return !page.drc.IsEmpty() 2004} 2005 2006// Response returns the raw server response from the last page request. 2007func (page DeploymentResourceCollectionPage) Response() DeploymentResourceCollection { 2008 return page.drc 2009} 2010 2011// Values returns the slice of values for the current page or nil if there are no values. 2012func (page DeploymentResourceCollectionPage) Values() []DeploymentResource { 2013 if page.drc.IsEmpty() { 2014 return nil 2015 } 2016 return *page.drc.Value 2017} 2018 2019// Creates a new instance of the DeploymentResourceCollectionPage type. 2020func NewDeploymentResourceCollectionPage(cur DeploymentResourceCollection, getNextPage func(context.Context, DeploymentResourceCollection) (DeploymentResourceCollection, error)) DeploymentResourceCollectionPage { 2021 return DeploymentResourceCollectionPage{ 2022 fn: getNextPage, 2023 drc: cur, 2024 } 2025} 2026 2027// DeploymentResourceProperties deployment resource properties payload 2028type DeploymentResourceProperties struct { 2029 // Source - Uploaded source information of the deployment. 2030 Source *UserSourceInfo `json:"source,omitempty"` 2031 // AppName - READ-ONLY; App name of the deployment 2032 AppName *string `json:"appName,omitempty"` 2033 // DeploymentSettings - Deployment settings of the Deployment 2034 DeploymentSettings *DeploymentSettings `json:"deploymentSettings,omitempty"` 2035 // ProvisioningState - READ-ONLY; Provisioning state of the Deployment. Possible values include: 'DeploymentResourceProvisioningStateCreating', 'DeploymentResourceProvisioningStateUpdating', 'DeploymentResourceProvisioningStateSucceeded', 'DeploymentResourceProvisioningStateFailed' 2036 ProvisioningState DeploymentResourceProvisioningState `json:"provisioningState,omitempty"` 2037 // Status - READ-ONLY; Status of the Deployment. Possible values include: 'DeploymentResourceStatusUnknown', 'DeploymentResourceStatusStopped', 'DeploymentResourceStatusRunning', 'DeploymentResourceStatusFailed', 'DeploymentResourceStatusAllocating', 'DeploymentResourceStatusUpgrading', 'DeploymentResourceStatusCompiling' 2038 Status DeploymentResourceStatus `json:"status,omitempty"` 2039 // Active - READ-ONLY; Indicates whether the Deployment is active 2040 Active *bool `json:"active,omitempty"` 2041 // CreatedTime - READ-ONLY; Date time when the resource is created 2042 CreatedTime *date.Time `json:"createdTime,omitempty"` 2043 // Instances - READ-ONLY; Collection of instances belong to the Deployment 2044 Instances *[]DeploymentInstance `json:"instances,omitempty"` 2045} 2046 2047// MarshalJSON is the custom marshaler for DeploymentResourceProperties. 2048func (drp DeploymentResourceProperties) MarshalJSON() ([]byte, error) { 2049 objectMap := make(map[string]interface{}) 2050 if drp.Source != nil { 2051 objectMap["source"] = drp.Source 2052 } 2053 if drp.DeploymentSettings != nil { 2054 objectMap["deploymentSettings"] = drp.DeploymentSettings 2055 } 2056 return json.Marshal(objectMap) 2057} 2058 2059// DeploymentsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a 2060// long-running operation. 2061type DeploymentsCreateOrUpdateFuture struct { 2062 azure.FutureAPI 2063 // Result returns the result of the asynchronous operation. 2064 // If the operation has not completed it will return an error. 2065 Result func(DeploymentsClient) (DeploymentResource, error) 2066} 2067 2068// UnmarshalJSON is the custom unmarshaller for CreateFuture. 2069func (future *DeploymentsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { 2070 var azFuture azure.Future 2071 if err := json.Unmarshal(body, &azFuture); err != nil { 2072 return err 2073 } 2074 future.FutureAPI = &azFuture 2075 future.Result = future.result 2076 return nil 2077} 2078 2079// result is the default implementation for DeploymentsCreateOrUpdateFuture.Result. 2080func (future *DeploymentsCreateOrUpdateFuture) result(client DeploymentsClient) (dr DeploymentResource, err error) { 2081 var done bool 2082 done, err = future.DoneWithContext(context.Background(), client) 2083 if err != nil { 2084 err = autorest.NewErrorWithError(err, "appplatform.DeploymentsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 2085 return 2086 } 2087 if !done { 2088 dr.Response.Response = future.Response() 2089 err = azure.NewAsyncOpIncompleteError("appplatform.DeploymentsCreateOrUpdateFuture") 2090 return 2091 } 2092 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 2093 if dr.Response.Response, err = future.GetResult(sender); err == nil && dr.Response.Response.StatusCode != http.StatusNoContent { 2094 dr, err = client.CreateOrUpdateResponder(dr.Response.Response) 2095 if err != nil { 2096 err = autorest.NewErrorWithError(err, "appplatform.DeploymentsCreateOrUpdateFuture", "Result", dr.Response.Response, "Failure responding to request") 2097 } 2098 } 2099 return 2100} 2101 2102// DeploymentsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running 2103// operation. 2104type DeploymentsDeleteFuture struct { 2105 azure.FutureAPI 2106 // Result returns the result of the asynchronous operation. 2107 // If the operation has not completed it will return an error. 2108 Result func(DeploymentsClient) (autorest.Response, error) 2109} 2110 2111// UnmarshalJSON is the custom unmarshaller for CreateFuture. 2112func (future *DeploymentsDeleteFuture) UnmarshalJSON(body []byte) error { 2113 var azFuture azure.Future 2114 if err := json.Unmarshal(body, &azFuture); err != nil { 2115 return err 2116 } 2117 future.FutureAPI = &azFuture 2118 future.Result = future.result 2119 return nil 2120} 2121 2122// result is the default implementation for DeploymentsDeleteFuture.Result. 2123func (future *DeploymentsDeleteFuture) result(client DeploymentsClient) (ar autorest.Response, err error) { 2124 var done bool 2125 done, err = future.DoneWithContext(context.Background(), client) 2126 if err != nil { 2127 err = autorest.NewErrorWithError(err, "appplatform.DeploymentsDeleteFuture", "Result", future.Response(), "Polling failure") 2128 return 2129 } 2130 if !done { 2131 ar.Response = future.Response() 2132 err = azure.NewAsyncOpIncompleteError("appplatform.DeploymentsDeleteFuture") 2133 return 2134 } 2135 ar.Response = future.Response() 2136 return 2137} 2138 2139// DeploymentSettings deployment settings payload 2140type DeploymentSettings struct { 2141 // CPU - Required CPU, basic tier should be 1, standard tier should be in range (1, 4) 2142 CPU *int32 `json:"cpu,omitempty"` 2143 // MemoryInGB - Required Memory size in GB, basic tier should be in range (1, 2), standard tier should be in range (1, 8) 2144 MemoryInGB *int32 `json:"memoryInGB,omitempty"` 2145 // JvmOptions - JVM parameter 2146 JvmOptions *string `json:"jvmOptions,omitempty"` 2147 // NetCoreMainEntryPath - The path to the .NET executable relative to zip root 2148 NetCoreMainEntryPath *string `json:"netCoreMainEntryPath,omitempty"` 2149 // EnvironmentVariables - Collection of environment variables 2150 EnvironmentVariables map[string]*string `json:"environmentVariables"` 2151 // RuntimeVersion - Runtime version. Possible values include: 'Java8', 'Java11', 'NetCore31' 2152 RuntimeVersion RuntimeVersion `json:"runtimeVersion,omitempty"` 2153} 2154 2155// MarshalJSON is the custom marshaler for DeploymentSettings. 2156func (ds DeploymentSettings) MarshalJSON() ([]byte, error) { 2157 objectMap := make(map[string]interface{}) 2158 if ds.CPU != nil { 2159 objectMap["cpu"] = ds.CPU 2160 } 2161 if ds.MemoryInGB != nil { 2162 objectMap["memoryInGB"] = ds.MemoryInGB 2163 } 2164 if ds.JvmOptions != nil { 2165 objectMap["jvmOptions"] = ds.JvmOptions 2166 } 2167 if ds.NetCoreMainEntryPath != nil { 2168 objectMap["netCoreMainEntryPath"] = ds.NetCoreMainEntryPath 2169 } 2170 if ds.EnvironmentVariables != nil { 2171 objectMap["environmentVariables"] = ds.EnvironmentVariables 2172 } 2173 if ds.RuntimeVersion != "" { 2174 objectMap["runtimeVersion"] = ds.RuntimeVersion 2175 } 2176 return json.Marshal(objectMap) 2177} 2178 2179// DeploymentsRestartFuture an abstraction for monitoring and retrieving the results of a long-running 2180// operation. 2181type DeploymentsRestartFuture struct { 2182 azure.FutureAPI 2183 // Result returns the result of the asynchronous operation. 2184 // If the operation has not completed it will return an error. 2185 Result func(DeploymentsClient) (autorest.Response, error) 2186} 2187 2188// UnmarshalJSON is the custom unmarshaller for CreateFuture. 2189func (future *DeploymentsRestartFuture) UnmarshalJSON(body []byte) error { 2190 var azFuture azure.Future 2191 if err := json.Unmarshal(body, &azFuture); err != nil { 2192 return err 2193 } 2194 future.FutureAPI = &azFuture 2195 future.Result = future.result 2196 return nil 2197} 2198 2199// result is the default implementation for DeploymentsRestartFuture.Result. 2200func (future *DeploymentsRestartFuture) result(client DeploymentsClient) (ar autorest.Response, err error) { 2201 var done bool 2202 done, err = future.DoneWithContext(context.Background(), client) 2203 if err != nil { 2204 err = autorest.NewErrorWithError(err, "appplatform.DeploymentsRestartFuture", "Result", future.Response(), "Polling failure") 2205 return 2206 } 2207 if !done { 2208 ar.Response = future.Response() 2209 err = azure.NewAsyncOpIncompleteError("appplatform.DeploymentsRestartFuture") 2210 return 2211 } 2212 ar.Response = future.Response() 2213 return 2214} 2215 2216// DeploymentsStartFuture an abstraction for monitoring and retrieving the results of a long-running 2217// operation. 2218type DeploymentsStartFuture struct { 2219 azure.FutureAPI 2220 // Result returns the result of the asynchronous operation. 2221 // If the operation has not completed it will return an error. 2222 Result func(DeploymentsClient) (autorest.Response, error) 2223} 2224 2225// UnmarshalJSON is the custom unmarshaller for CreateFuture. 2226func (future *DeploymentsStartFuture) UnmarshalJSON(body []byte) error { 2227 var azFuture azure.Future 2228 if err := json.Unmarshal(body, &azFuture); err != nil { 2229 return err 2230 } 2231 future.FutureAPI = &azFuture 2232 future.Result = future.result 2233 return nil 2234} 2235 2236// result is the default implementation for DeploymentsStartFuture.Result. 2237func (future *DeploymentsStartFuture) result(client DeploymentsClient) (ar autorest.Response, err error) { 2238 var done bool 2239 done, err = future.DoneWithContext(context.Background(), client) 2240 if err != nil { 2241 err = autorest.NewErrorWithError(err, "appplatform.DeploymentsStartFuture", "Result", future.Response(), "Polling failure") 2242 return 2243 } 2244 if !done { 2245 ar.Response = future.Response() 2246 err = azure.NewAsyncOpIncompleteError("appplatform.DeploymentsStartFuture") 2247 return 2248 } 2249 ar.Response = future.Response() 2250 return 2251} 2252 2253// DeploymentsStopFuture an abstraction for monitoring and retrieving the results of a long-running 2254// operation. 2255type DeploymentsStopFuture struct { 2256 azure.FutureAPI 2257 // Result returns the result of the asynchronous operation. 2258 // If the operation has not completed it will return an error. 2259 Result func(DeploymentsClient) (autorest.Response, error) 2260} 2261 2262// UnmarshalJSON is the custom unmarshaller for CreateFuture. 2263func (future *DeploymentsStopFuture) UnmarshalJSON(body []byte) error { 2264 var azFuture azure.Future 2265 if err := json.Unmarshal(body, &azFuture); err != nil { 2266 return err 2267 } 2268 future.FutureAPI = &azFuture 2269 future.Result = future.result 2270 return nil 2271} 2272 2273// result is the default implementation for DeploymentsStopFuture.Result. 2274func (future *DeploymentsStopFuture) result(client DeploymentsClient) (ar autorest.Response, err error) { 2275 var done bool 2276 done, err = future.DoneWithContext(context.Background(), client) 2277 if err != nil { 2278 err = autorest.NewErrorWithError(err, "appplatform.DeploymentsStopFuture", "Result", future.Response(), "Polling failure") 2279 return 2280 } 2281 if !done { 2282 ar.Response = future.Response() 2283 err = azure.NewAsyncOpIncompleteError("appplatform.DeploymentsStopFuture") 2284 return 2285 } 2286 ar.Response = future.Response() 2287 return 2288} 2289 2290// DeploymentsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running 2291// operation. 2292type DeploymentsUpdateFuture struct { 2293 azure.FutureAPI 2294 // Result returns the result of the asynchronous operation. 2295 // If the operation has not completed it will return an error. 2296 Result func(DeploymentsClient) (DeploymentResource, error) 2297} 2298 2299// UnmarshalJSON is the custom unmarshaller for CreateFuture. 2300func (future *DeploymentsUpdateFuture) UnmarshalJSON(body []byte) error { 2301 var azFuture azure.Future 2302 if err := json.Unmarshal(body, &azFuture); err != nil { 2303 return err 2304 } 2305 future.FutureAPI = &azFuture 2306 future.Result = future.result 2307 return nil 2308} 2309 2310// result is the default implementation for DeploymentsUpdateFuture.Result. 2311func (future *DeploymentsUpdateFuture) result(client DeploymentsClient) (dr DeploymentResource, err error) { 2312 var done bool 2313 done, err = future.DoneWithContext(context.Background(), client) 2314 if err != nil { 2315 err = autorest.NewErrorWithError(err, "appplatform.DeploymentsUpdateFuture", "Result", future.Response(), "Polling failure") 2316 return 2317 } 2318 if !done { 2319 dr.Response.Response = future.Response() 2320 err = azure.NewAsyncOpIncompleteError("appplatform.DeploymentsUpdateFuture") 2321 return 2322 } 2323 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 2324 if dr.Response.Response, err = future.GetResult(sender); err == nil && dr.Response.Response.StatusCode != http.StatusNoContent { 2325 dr, err = client.UpdateResponder(dr.Response.Response) 2326 if err != nil { 2327 err = autorest.NewErrorWithError(err, "appplatform.DeploymentsUpdateFuture", "Result", dr.Response.Response, "Failure responding to request") 2328 } 2329 } 2330 return 2331} 2332 2333// Error the error code compose of code and message. 2334type Error struct { 2335 // Code - The code of error. 2336 Code *string `json:"code,omitempty"` 2337 // Message - The message of error. 2338 Message *string `json:"message,omitempty"` 2339} 2340 2341// GitPatternRepository git repository property payload 2342type GitPatternRepository struct { 2343 // Name - Name of the repository 2344 Name *string `json:"name,omitempty"` 2345 // Pattern - Collection of pattern of the repository 2346 Pattern *[]string `json:"pattern,omitempty"` 2347 // URI - URI of the repository 2348 URI *string `json:"uri,omitempty"` 2349 // Label - Label of the repository 2350 Label *string `json:"label,omitempty"` 2351 // SearchPaths - Searching path of the repository 2352 SearchPaths *[]string `json:"searchPaths,omitempty"` 2353 // Username - Username of git repository basic auth. 2354 Username *string `json:"username,omitempty"` 2355 // Password - Password of git repository basic auth. 2356 Password *string `json:"password,omitempty"` 2357 // HostKey - Public sshKey of git repository. 2358 HostKey *string `json:"hostKey,omitempty"` 2359 // HostKeyAlgorithm - SshKey algorithm of git repository. 2360 HostKeyAlgorithm *string `json:"hostKeyAlgorithm,omitempty"` 2361 // PrivateKey - Private sshKey algorithm of git repository. 2362 PrivateKey *string `json:"privateKey,omitempty"` 2363 // StrictHostKeyChecking - Strict host key checking or not. 2364 StrictHostKeyChecking *bool `json:"strictHostKeyChecking,omitempty"` 2365} 2366 2367// LogFileURLResponse log file URL payload 2368type LogFileURLResponse struct { 2369 autorest.Response `json:"-"` 2370 // URL - URL of the log file 2371 URL *string `json:"url,omitempty"` 2372} 2373 2374// LogSpecification specifications of the Log for Azure Monitoring 2375type LogSpecification struct { 2376 // Name - Name of the log 2377 Name *string `json:"name,omitempty"` 2378 // DisplayName - Localized friendly display name of the log 2379 DisplayName *string `json:"displayName,omitempty"` 2380 // BlobDuration - Blob duration of the log 2381 BlobDuration *string `json:"blobDuration,omitempty"` 2382} 2383 2384// ManagedIdentityProperties managed identity properties retrieved from ARM request headers. 2385type ManagedIdentityProperties struct { 2386 // Type - Type of the managed identity. Possible values include: 'None', 'SystemAssigned', 'UserAssigned', 'SystemAssignedUserAssigned' 2387 Type ManagedIdentityType `json:"type,omitempty"` 2388 // PrincipalID - Principal Id 2389 PrincipalID *string `json:"principalId,omitempty"` 2390 // TenantID - Tenant Id 2391 TenantID *string `json:"tenantId,omitempty"` 2392} 2393 2394// MetricDimension specifications of the Dimension of metrics 2395type MetricDimension struct { 2396 // Name - Name of the dimension 2397 Name *string `json:"name,omitempty"` 2398 // DisplayName - Localized friendly display name of the dimension 2399 DisplayName *string `json:"displayName,omitempty"` 2400} 2401 2402// MetricSpecification specifications of the Metrics for Azure Monitoring 2403type MetricSpecification struct { 2404 // Name - Name of the metric 2405 Name *string `json:"name,omitempty"` 2406 // DisplayName - Localized friendly display name of the metric 2407 DisplayName *string `json:"displayName,omitempty"` 2408 // DisplayDescription - Localized friendly description of the metric 2409 DisplayDescription *string `json:"displayDescription,omitempty"` 2410 // Unit - Unit that makes sense for the metric 2411 Unit *string `json:"unit,omitempty"` 2412 // Category - Name of the metric category that the metric belongs to. A metric can only belong to a single category. 2413 Category *string `json:"category,omitempty"` 2414 // AggregationType - Only provide one value for this field. Valid values: Average, Minimum, Maximum, Total, Count. 2415 AggregationType *string `json:"aggregationType,omitempty"` 2416 // SupportedAggregationTypes - Supported aggregation types 2417 SupportedAggregationTypes *[]string `json:"supportedAggregationTypes,omitempty"` 2418 // SupportedTimeGrainTypes - Supported time grain types 2419 SupportedTimeGrainTypes *[]string `json:"supportedTimeGrainTypes,omitempty"` 2420 // FillGapWithZero - Optional. If set to true, then zero will be returned for time duration where no metric is emitted/published. 2421 FillGapWithZero *bool `json:"fillGapWithZero,omitempty"` 2422 // Dimensions - Dimensions of the metric 2423 Dimensions *[]MetricDimension `json:"dimensions,omitempty"` 2424} 2425 2426// MonitoringSettingProperties monitoring Setting properties payload 2427type MonitoringSettingProperties struct { 2428 // ProvisioningState - READ-ONLY; State of the Monitoring Setting. Possible values include: 'MonitoringSettingStateNotAvailable', 'MonitoringSettingStateFailed', 'MonitoringSettingStateSucceeded', 'MonitoringSettingStateUpdating' 2429 ProvisioningState MonitoringSettingState `json:"provisioningState,omitempty"` 2430 // Error - Error when apply Monitoring Setting changes. 2431 Error *Error `json:"error,omitempty"` 2432 // TraceEnabled - Indicates whether enable the trace functionality, which will be deprecated since api version 2020-11-01-preview. Please leverage appInsightsInstrumentationKey to indicate if monitoringSettings enabled or not 2433 TraceEnabled *bool `json:"traceEnabled,omitempty"` 2434 // AppInsightsInstrumentationKey - Target application insight instrumentation key, null or whitespace include empty will disable monitoringSettings 2435 AppInsightsInstrumentationKey *string `json:"appInsightsInstrumentationKey,omitempty"` 2436 // AppInsightsSamplingRate - Indicates the sampling rate of application insight agent, should be in range [0.0, 100.0] 2437 AppInsightsSamplingRate *float64 `json:"appInsightsSamplingRate,omitempty"` 2438 // AppInsightsAgentVersions - Indicates the versions of application insight agent 2439 AppInsightsAgentVersions *ApplicationInsightsAgentVersions `json:"appInsightsAgentVersions,omitempty"` 2440} 2441 2442// MarshalJSON is the custom marshaler for MonitoringSettingProperties. 2443func (msp MonitoringSettingProperties) MarshalJSON() ([]byte, error) { 2444 objectMap := make(map[string]interface{}) 2445 if msp.Error != nil { 2446 objectMap["error"] = msp.Error 2447 } 2448 if msp.TraceEnabled != nil { 2449 objectMap["traceEnabled"] = msp.TraceEnabled 2450 } 2451 if msp.AppInsightsInstrumentationKey != nil { 2452 objectMap["appInsightsInstrumentationKey"] = msp.AppInsightsInstrumentationKey 2453 } 2454 if msp.AppInsightsSamplingRate != nil { 2455 objectMap["appInsightsSamplingRate"] = msp.AppInsightsSamplingRate 2456 } 2457 if msp.AppInsightsAgentVersions != nil { 2458 objectMap["appInsightsAgentVersions"] = msp.AppInsightsAgentVersions 2459 } 2460 return json.Marshal(objectMap) 2461} 2462 2463// MonitoringSettingResource monitoring Setting resource 2464type MonitoringSettingResource struct { 2465 autorest.Response `json:"-"` 2466 // Properties - Properties of the Monitoring Setting resource 2467 Properties *MonitoringSettingProperties `json:"properties,omitempty"` 2468 // ID - READ-ONLY; Fully qualified resource Id for the resource. 2469 ID *string `json:"id,omitempty"` 2470 // Name - READ-ONLY; The name of the resource. 2471 Name *string `json:"name,omitempty"` 2472 // Type - READ-ONLY; The type of the resource. 2473 Type *string `json:"type,omitempty"` 2474} 2475 2476// MarshalJSON is the custom marshaler for MonitoringSettingResource. 2477func (msr MonitoringSettingResource) MarshalJSON() ([]byte, error) { 2478 objectMap := make(map[string]interface{}) 2479 if msr.Properties != nil { 2480 objectMap["properties"] = msr.Properties 2481 } 2482 return json.Marshal(objectMap) 2483} 2484 2485// MonitoringSettingsUpdatePatchFuture an abstraction for monitoring and retrieving the results of a 2486// long-running operation. 2487type MonitoringSettingsUpdatePatchFuture struct { 2488 azure.FutureAPI 2489 // Result returns the result of the asynchronous operation. 2490 // If the operation has not completed it will return an error. 2491 Result func(MonitoringSettingsClient) (MonitoringSettingResource, error) 2492} 2493 2494// UnmarshalJSON is the custom unmarshaller for CreateFuture. 2495func (future *MonitoringSettingsUpdatePatchFuture) UnmarshalJSON(body []byte) error { 2496 var azFuture azure.Future 2497 if err := json.Unmarshal(body, &azFuture); err != nil { 2498 return err 2499 } 2500 future.FutureAPI = &azFuture 2501 future.Result = future.result 2502 return nil 2503} 2504 2505// result is the default implementation for MonitoringSettingsUpdatePatchFuture.Result. 2506func (future *MonitoringSettingsUpdatePatchFuture) result(client MonitoringSettingsClient) (msr MonitoringSettingResource, err error) { 2507 var done bool 2508 done, err = future.DoneWithContext(context.Background(), client) 2509 if err != nil { 2510 err = autorest.NewErrorWithError(err, "appplatform.MonitoringSettingsUpdatePatchFuture", "Result", future.Response(), "Polling failure") 2511 return 2512 } 2513 if !done { 2514 msr.Response.Response = future.Response() 2515 err = azure.NewAsyncOpIncompleteError("appplatform.MonitoringSettingsUpdatePatchFuture") 2516 return 2517 } 2518 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 2519 if msr.Response.Response, err = future.GetResult(sender); err == nil && msr.Response.Response.StatusCode != http.StatusNoContent { 2520 msr, err = client.UpdatePatchResponder(msr.Response.Response) 2521 if err != nil { 2522 err = autorest.NewErrorWithError(err, "appplatform.MonitoringSettingsUpdatePatchFuture", "Result", msr.Response.Response, "Failure responding to request") 2523 } 2524 } 2525 return 2526} 2527 2528// MonitoringSettingsUpdatePutFuture an abstraction for monitoring and retrieving the results of a 2529// long-running operation. 2530type MonitoringSettingsUpdatePutFuture struct { 2531 azure.FutureAPI 2532 // Result returns the result of the asynchronous operation. 2533 // If the operation has not completed it will return an error. 2534 Result func(MonitoringSettingsClient) (MonitoringSettingResource, error) 2535} 2536 2537// UnmarshalJSON is the custom unmarshaller for CreateFuture. 2538func (future *MonitoringSettingsUpdatePutFuture) UnmarshalJSON(body []byte) error { 2539 var azFuture azure.Future 2540 if err := json.Unmarshal(body, &azFuture); err != nil { 2541 return err 2542 } 2543 future.FutureAPI = &azFuture 2544 future.Result = future.result 2545 return nil 2546} 2547 2548// result is the default implementation for MonitoringSettingsUpdatePutFuture.Result. 2549func (future *MonitoringSettingsUpdatePutFuture) result(client MonitoringSettingsClient) (msr MonitoringSettingResource, err error) { 2550 var done bool 2551 done, err = future.DoneWithContext(context.Background(), client) 2552 if err != nil { 2553 err = autorest.NewErrorWithError(err, "appplatform.MonitoringSettingsUpdatePutFuture", "Result", future.Response(), "Polling failure") 2554 return 2555 } 2556 if !done { 2557 msr.Response.Response = future.Response() 2558 err = azure.NewAsyncOpIncompleteError("appplatform.MonitoringSettingsUpdatePutFuture") 2559 return 2560 } 2561 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 2562 if msr.Response.Response, err = future.GetResult(sender); err == nil && msr.Response.Response.StatusCode != http.StatusNoContent { 2563 msr, err = client.UpdatePutResponder(msr.Response.Response) 2564 if err != nil { 2565 err = autorest.NewErrorWithError(err, "appplatform.MonitoringSettingsUpdatePutFuture", "Result", msr.Response.Response, "Failure responding to request") 2566 } 2567 } 2568 return 2569} 2570 2571// NameAvailability name availability result payload 2572type NameAvailability struct { 2573 autorest.Response `json:"-"` 2574 // NameAvailable - Indicates whether the name is available 2575 NameAvailable *bool `json:"nameAvailable,omitempty"` 2576 // Reason - Reason why the name is not available 2577 Reason *string `json:"reason,omitempty"` 2578 // Message - Message why the name is not available 2579 Message *string `json:"message,omitempty"` 2580} 2581 2582// NameAvailabilityParameters name availability parameters payload 2583type NameAvailabilityParameters struct { 2584 // Type - Type of the resource to check name availability 2585 Type *string `json:"type,omitempty"` 2586 // Name - Name to be checked 2587 Name *string `json:"name,omitempty"` 2588} 2589 2590// NetworkProfile service network profile payload 2591type NetworkProfile struct { 2592 // ServiceRuntimeSubnetID - Fully qualified resource Id of the subnet to host Azure Spring Cloud Service Runtime 2593 ServiceRuntimeSubnetID *string `json:"serviceRuntimeSubnetId,omitempty"` 2594 // AppSubnetID - Fully qualified resource Id of the subnet to host Azure Spring Cloud Apps 2595 AppSubnetID *string `json:"appSubnetId,omitempty"` 2596 // ServiceCidr - Azure Spring Cloud service reserved CIDR 2597 ServiceCidr *string `json:"serviceCidr,omitempty"` 2598 // ServiceRuntimeNetworkResourceGroup - Name of the resource group containing network resources of Azure Spring Cloud Service Runtime 2599 ServiceRuntimeNetworkResourceGroup *string `json:"serviceRuntimeNetworkResourceGroup,omitempty"` 2600 // AppNetworkResourceGroup - Name of the resource group containing network resources of Azure Spring Cloud Apps 2601 AppNetworkResourceGroup *string `json:"appNetworkResourceGroup,omitempty"` 2602 // OutboundIPs - READ-ONLY; Desired outbound IP resources for Azure Spring Cloud instance. 2603 OutboundIPs *NetworkProfileOutboundIPs `json:"outboundIPs,omitempty"` 2604 // RequiredTraffics - READ-ONLY; Required inbound or outbound traffics for Azure Spring Cloud instance. 2605 RequiredTraffics *[]RequiredTraffic `json:"requiredTraffics,omitempty"` 2606} 2607 2608// MarshalJSON is the custom marshaler for NetworkProfile. 2609func (np NetworkProfile) MarshalJSON() ([]byte, error) { 2610 objectMap := make(map[string]interface{}) 2611 if np.ServiceRuntimeSubnetID != nil { 2612 objectMap["serviceRuntimeSubnetId"] = np.ServiceRuntimeSubnetID 2613 } 2614 if np.AppSubnetID != nil { 2615 objectMap["appSubnetId"] = np.AppSubnetID 2616 } 2617 if np.ServiceCidr != nil { 2618 objectMap["serviceCidr"] = np.ServiceCidr 2619 } 2620 if np.ServiceRuntimeNetworkResourceGroup != nil { 2621 objectMap["serviceRuntimeNetworkResourceGroup"] = np.ServiceRuntimeNetworkResourceGroup 2622 } 2623 if np.AppNetworkResourceGroup != nil { 2624 objectMap["appNetworkResourceGroup"] = np.AppNetworkResourceGroup 2625 } 2626 return json.Marshal(objectMap) 2627} 2628 2629// NetworkProfileOutboundIPs desired outbound IP resources for Azure Spring Cloud instance. 2630type NetworkProfileOutboundIPs struct { 2631 // PublicIPs - READ-ONLY; A list of public IP addresses. 2632 PublicIPs *[]string `json:"publicIPs,omitempty"` 2633} 2634 2635// MarshalJSON is the custom marshaler for NetworkProfileOutboundIPs. 2636func (npP NetworkProfileOutboundIPs) MarshalJSON() ([]byte, error) { 2637 objectMap := make(map[string]interface{}) 2638 return json.Marshal(objectMap) 2639} 2640 2641// OperationDetail operation detail payload 2642type OperationDetail struct { 2643 // Name - Name of the operation 2644 Name *string `json:"name,omitempty"` 2645 // IsDataAction - Indicates whether the operation is a data action 2646 IsDataAction *bool `json:"isDataAction,omitempty"` 2647 // Display - Display of the operation 2648 Display *OperationDisplay `json:"display,omitempty"` 2649 // Origin - Origin of the operation 2650 Origin *string `json:"origin,omitempty"` 2651 // Properties - Properties of the operation 2652 Properties *OperationProperties `json:"properties,omitempty"` 2653} 2654 2655// OperationDisplay operation display payload 2656type OperationDisplay struct { 2657 // Provider - Resource provider of the operation 2658 Provider *string `json:"provider,omitempty"` 2659 // Resource - Resource of the operation 2660 Resource *string `json:"resource,omitempty"` 2661 // Operation - Localized friendly name for the operation 2662 Operation *string `json:"operation,omitempty"` 2663 // Description - Localized friendly description for the operation 2664 Description *string `json:"description,omitempty"` 2665} 2666 2667// OperationProperties extra Operation properties 2668type OperationProperties struct { 2669 // ServiceSpecification - Service specifications of the operation 2670 ServiceSpecification *ServiceSpecification `json:"serviceSpecification,omitempty"` 2671} 2672 2673// PersistentDisk persistent disk payload 2674type PersistentDisk struct { 2675 // SizeInGB - Size of the persistent disk in GB 2676 SizeInGB *int32 `json:"sizeInGB,omitempty"` 2677 // UsedInGB - READ-ONLY; Size of the used persistent disk in GB 2678 UsedInGB *int32 `json:"usedInGB,omitempty"` 2679 // MountPath - Mount path of the persistent disk 2680 MountPath *string `json:"mountPath,omitempty"` 2681} 2682 2683// MarshalJSON is the custom marshaler for PersistentDisk. 2684func (pd PersistentDisk) MarshalJSON() ([]byte, error) { 2685 objectMap := make(map[string]interface{}) 2686 if pd.SizeInGB != nil { 2687 objectMap["sizeInGB"] = pd.SizeInGB 2688 } 2689 if pd.MountPath != nil { 2690 objectMap["mountPath"] = pd.MountPath 2691 } 2692 return json.Marshal(objectMap) 2693} 2694 2695// ProxyResource the resource model definition for a ARM proxy resource. It will have everything other than 2696// required location and tags. 2697type ProxyResource struct { 2698 // ID - READ-ONLY; Fully qualified resource Id for the resource. 2699 ID *string `json:"id,omitempty"` 2700 // Name - READ-ONLY; The name of the resource. 2701 Name *string `json:"name,omitempty"` 2702 // Type - READ-ONLY; The type of the resource. 2703 Type *string `json:"type,omitempty"` 2704} 2705 2706// MarshalJSON is the custom marshaler for ProxyResource. 2707func (pr ProxyResource) MarshalJSON() ([]byte, error) { 2708 objectMap := make(map[string]interface{}) 2709 return json.Marshal(objectMap) 2710} 2711 2712// RegenerateTestKeyRequestPayload regenerate test key request payload 2713type RegenerateTestKeyRequestPayload struct { 2714 // KeyType - Type of the test key. Possible values include: 'Primary', 'Secondary' 2715 KeyType TestKeyType `json:"keyType,omitempty"` 2716} 2717 2718// RequiredTraffic required inbound or outbound traffic for Azure Spring Cloud instance. 2719type RequiredTraffic struct { 2720 // Protocol - READ-ONLY; The protocol of required traffic 2721 Protocol *string `json:"protocol,omitempty"` 2722 // Port - READ-ONLY; The port of required traffic 2723 Port *int32 `json:"port,omitempty"` 2724 // Ips - READ-ONLY; The ip list of required traffic 2725 Ips *[]string `json:"ips,omitempty"` 2726 // Fqdns - READ-ONLY; The FQDN list of required traffic 2727 Fqdns *[]string `json:"fqdns,omitempty"` 2728 // Direction - READ-ONLY; The direction of required traffic. Possible values include: 'Inbound', 'Outbound' 2729 Direction TrafficDirection `json:"direction,omitempty"` 2730} 2731 2732// MarshalJSON is the custom marshaler for RequiredTraffic. 2733func (rt RequiredTraffic) MarshalJSON() ([]byte, error) { 2734 objectMap := make(map[string]interface{}) 2735 return json.Marshal(objectMap) 2736} 2737 2738// Resource the core properties of ARM resources. 2739type Resource struct { 2740 // ID - READ-ONLY; Fully qualified resource Id for the resource. 2741 ID *string `json:"id,omitempty"` 2742 // Name - READ-ONLY; The name of the resource. 2743 Name *string `json:"name,omitempty"` 2744 // Type - READ-ONLY; The type of the resource. 2745 Type *string `json:"type,omitempty"` 2746} 2747 2748// MarshalJSON is the custom marshaler for Resource. 2749func (r Resource) MarshalJSON() ([]byte, error) { 2750 objectMap := make(map[string]interface{}) 2751 return json.Marshal(objectMap) 2752} 2753 2754// ResourceSku describes an available Azure Spring Cloud SKU. 2755type ResourceSku struct { 2756 // ResourceType - Gets the type of resource the SKU applies to. 2757 ResourceType *string `json:"resourceType,omitempty"` 2758 // Name - Gets the name of SKU. 2759 Name *string `json:"name,omitempty"` 2760 // Tier - Gets the tier of SKU. 2761 Tier *string `json:"tier,omitempty"` 2762 // Capacity - Gets the capacity of SKU. 2763 Capacity *SkuCapacity `json:"capacity,omitempty"` 2764 // Locations - Gets the set of locations that the SKU is available. 2765 Locations *[]string `json:"locations,omitempty"` 2766 // LocationInfo - Gets a list of locations and availability zones in those locations where the SKU is available. 2767 LocationInfo *[]ResourceSkuLocationInfo `json:"locationInfo,omitempty"` 2768 // Restrictions - Gets the restrictions because of which SKU cannot be used. This is 2769 // empty if there are no restrictions. 2770 Restrictions *[]ResourceSkuRestrictions `json:"restrictions,omitempty"` 2771} 2772 2773// ResourceSkuCapabilities ... 2774type ResourceSkuCapabilities struct { 2775 // Name - Gets an invariant to describe the feature. 2776 Name *string `json:"name,omitempty"` 2777 // Value - Gets an invariant if the feature is measured by quantity. 2778 Value *string `json:"value,omitempty"` 2779} 2780 2781// ResourceSkuCollection object that includes an array of Azure Spring Cloud SKU and a possible link for 2782// next set 2783type ResourceSkuCollection struct { 2784 autorest.Response `json:"-"` 2785 // Value - Collection of resource SKU 2786 Value *[]ResourceSku `json:"value,omitempty"` 2787 // NextLink - URL client should use to fetch the next page (per server side paging). 2788 // It's null for now, added for future use. 2789 NextLink *string `json:"nextLink,omitempty"` 2790} 2791 2792// ResourceSkuCollectionIterator provides access to a complete listing of ResourceSku values. 2793type ResourceSkuCollectionIterator struct { 2794 i int 2795 page ResourceSkuCollectionPage 2796} 2797 2798// NextWithContext advances to the next value. If there was an error making 2799// the request the iterator does not advance and the error is returned. 2800func (iter *ResourceSkuCollectionIterator) NextWithContext(ctx context.Context) (err error) { 2801 if tracing.IsEnabled() { 2802 ctx = tracing.StartSpan(ctx, fqdn+"/ResourceSkuCollectionIterator.NextWithContext") 2803 defer func() { 2804 sc := -1 2805 if iter.Response().Response.Response != nil { 2806 sc = iter.Response().Response.Response.StatusCode 2807 } 2808 tracing.EndSpan(ctx, sc, err) 2809 }() 2810 } 2811 iter.i++ 2812 if iter.i < len(iter.page.Values()) { 2813 return nil 2814 } 2815 err = iter.page.NextWithContext(ctx) 2816 if err != nil { 2817 iter.i-- 2818 return err 2819 } 2820 iter.i = 0 2821 return nil 2822} 2823 2824// Next advances to the next value. If there was an error making 2825// the request the iterator does not advance and the error is returned. 2826// Deprecated: Use NextWithContext() instead. 2827func (iter *ResourceSkuCollectionIterator) Next() error { 2828 return iter.NextWithContext(context.Background()) 2829} 2830 2831// NotDone returns true if the enumeration should be started or is not yet complete. 2832func (iter ResourceSkuCollectionIterator) NotDone() bool { 2833 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 2834} 2835 2836// Response returns the raw server response from the last page request. 2837func (iter ResourceSkuCollectionIterator) Response() ResourceSkuCollection { 2838 return iter.page.Response() 2839} 2840 2841// Value returns the current value or a zero-initialized value if the 2842// iterator has advanced beyond the end of the collection. 2843func (iter ResourceSkuCollectionIterator) Value() ResourceSku { 2844 if !iter.page.NotDone() { 2845 return ResourceSku{} 2846 } 2847 return iter.page.Values()[iter.i] 2848} 2849 2850// Creates a new instance of the ResourceSkuCollectionIterator type. 2851func NewResourceSkuCollectionIterator(page ResourceSkuCollectionPage) ResourceSkuCollectionIterator { 2852 return ResourceSkuCollectionIterator{page: page} 2853} 2854 2855// IsEmpty returns true if the ListResult contains no values. 2856func (rsc ResourceSkuCollection) IsEmpty() bool { 2857 return rsc.Value == nil || len(*rsc.Value) == 0 2858} 2859 2860// hasNextLink returns true if the NextLink is not empty. 2861func (rsc ResourceSkuCollection) hasNextLink() bool { 2862 return rsc.NextLink != nil && len(*rsc.NextLink) != 0 2863} 2864 2865// resourceSkuCollectionPreparer prepares a request to retrieve the next set of results. 2866// It returns nil if no more results exist. 2867func (rsc ResourceSkuCollection) resourceSkuCollectionPreparer(ctx context.Context) (*http.Request, error) { 2868 if !rsc.hasNextLink() { 2869 return nil, nil 2870 } 2871 return autorest.Prepare((&http.Request{}).WithContext(ctx), 2872 autorest.AsJSON(), 2873 autorest.AsGet(), 2874 autorest.WithBaseURL(to.String(rsc.NextLink))) 2875} 2876 2877// ResourceSkuCollectionPage contains a page of ResourceSku values. 2878type ResourceSkuCollectionPage struct { 2879 fn func(context.Context, ResourceSkuCollection) (ResourceSkuCollection, error) 2880 rsc ResourceSkuCollection 2881} 2882 2883// NextWithContext advances to the next page of values. If there was an error making 2884// the request the page does not advance and the error is returned. 2885func (page *ResourceSkuCollectionPage) NextWithContext(ctx context.Context) (err error) { 2886 if tracing.IsEnabled() { 2887 ctx = tracing.StartSpan(ctx, fqdn+"/ResourceSkuCollectionPage.NextWithContext") 2888 defer func() { 2889 sc := -1 2890 if page.Response().Response.Response != nil { 2891 sc = page.Response().Response.Response.StatusCode 2892 } 2893 tracing.EndSpan(ctx, sc, err) 2894 }() 2895 } 2896 for { 2897 next, err := page.fn(ctx, page.rsc) 2898 if err != nil { 2899 return err 2900 } 2901 page.rsc = next 2902 if !next.hasNextLink() || !next.IsEmpty() { 2903 break 2904 } 2905 } 2906 return nil 2907} 2908 2909// Next advances to the next page of values. If there was an error making 2910// the request the page does not advance and the error is returned. 2911// Deprecated: Use NextWithContext() instead. 2912func (page *ResourceSkuCollectionPage) Next() error { 2913 return page.NextWithContext(context.Background()) 2914} 2915 2916// NotDone returns true if the page enumeration should be started or is not yet complete. 2917func (page ResourceSkuCollectionPage) NotDone() bool { 2918 return !page.rsc.IsEmpty() 2919} 2920 2921// Response returns the raw server response from the last page request. 2922func (page ResourceSkuCollectionPage) Response() ResourceSkuCollection { 2923 return page.rsc 2924} 2925 2926// Values returns the slice of values for the current page or nil if there are no values. 2927func (page ResourceSkuCollectionPage) Values() []ResourceSku { 2928 if page.rsc.IsEmpty() { 2929 return nil 2930 } 2931 return *page.rsc.Value 2932} 2933 2934// Creates a new instance of the ResourceSkuCollectionPage type. 2935func NewResourceSkuCollectionPage(cur ResourceSkuCollection, getNextPage func(context.Context, ResourceSkuCollection) (ResourceSkuCollection, error)) ResourceSkuCollectionPage { 2936 return ResourceSkuCollectionPage{ 2937 fn: getNextPage, 2938 rsc: cur, 2939 } 2940} 2941 2942// ResourceSkuLocationInfo locations and availability zones where the SKU is available 2943type ResourceSkuLocationInfo struct { 2944 // Location - Gets location of the SKU 2945 Location *string `json:"location,omitempty"` 2946 // Zones - Gets list of availability zones where the SKU is supported. 2947 Zones *[]string `json:"zones,omitempty"` 2948 // ZoneDetails - Gets details of capabilities available to a SKU in specific zones. 2949 ZoneDetails *[]ResourceSkuZoneDetails `json:"zoneDetails,omitempty"` 2950} 2951 2952// ResourceSkuRestrictionInfo information about the restriction where the SKU cannot be used 2953type ResourceSkuRestrictionInfo struct { 2954 // Locations - Gets locations where the SKU is restricted 2955 Locations *[]string `json:"locations,omitempty"` 2956 // Zones - Gets list of availability zones where the SKU is restricted. 2957 Zones *[]string `json:"zones,omitempty"` 2958} 2959 2960// ResourceSkuRestrictions restrictions where the SKU cannot be used 2961type ResourceSkuRestrictions struct { 2962 // Type - Gets the type of restrictions. Possible values include: 'Location', 'Zone' 2963 Type ResourceSkuRestrictionsType `json:"type,omitempty"` 2964 // Values - Gets the value of restrictions. If the restriction type is set to 2965 // location. This would be different locations where the SKU is restricted. 2966 Values *[]string `json:"values,omitempty"` 2967 // RestrictionInfo - Gets the information about the restriction where the SKU cannot be used. 2968 RestrictionInfo *ResourceSkuRestrictionInfo `json:"restrictionInfo,omitempty"` 2969 // ReasonCode - Gets the reason for restriction. Possible values include: 'QuotaId', 'NotAvailableForSubscription'. Possible values include: 'QuotaID', 'NotAvailableForSubscription' 2970 ReasonCode ResourceSkuRestrictionsReasonCode `json:"reasonCode,omitempty"` 2971} 2972 2973// ResourceSkuZoneDetails details of capabilities available to a SKU in specific zones 2974type ResourceSkuZoneDetails struct { 2975 // Name - Gets the set of zones that the SKU is available in with the 2976 // specified capabilities. 2977 Name *[]string `json:"name,omitempty"` 2978 // Capabilities - Gets a list of capabilities that are available for the SKU in the 2979 // specified list of zones. 2980 Capabilities *[]ResourceSkuCapabilities `json:"capabilities,omitempty"` 2981} 2982 2983// ResourceUploadDefinition resource upload definition payload 2984type ResourceUploadDefinition struct { 2985 autorest.Response `json:"-"` 2986 // RelativePath - Source relative path 2987 RelativePath *string `json:"relativePath,omitempty"` 2988 // UploadURL - Upload URL 2989 UploadURL *string `json:"uploadUrl,omitempty"` 2990} 2991 2992// ServiceResource service resource 2993type ServiceResource struct { 2994 autorest.Response `json:"-"` 2995 // Properties - Properties of the Service resource 2996 Properties *ClusterResourceProperties `json:"properties,omitempty"` 2997 // Sku - Sku of the Service resource 2998 Sku *Sku `json:"sku,omitempty"` 2999 // Location - The GEO location of the resource. 3000 Location *string `json:"location,omitempty"` 3001 // Tags - Tags of the service which is a list of key value pairs that describe the resource. 3002 Tags map[string]*string `json:"tags"` 3003 // ID - READ-ONLY; Fully qualified resource Id for the resource. 3004 ID *string `json:"id,omitempty"` 3005 // Name - READ-ONLY; The name of the resource. 3006 Name *string `json:"name,omitempty"` 3007 // Type - READ-ONLY; The type of the resource. 3008 Type *string `json:"type,omitempty"` 3009} 3010 3011// MarshalJSON is the custom marshaler for ServiceResource. 3012func (sr ServiceResource) MarshalJSON() ([]byte, error) { 3013 objectMap := make(map[string]interface{}) 3014 if sr.Properties != nil { 3015 objectMap["properties"] = sr.Properties 3016 } 3017 if sr.Sku != nil { 3018 objectMap["sku"] = sr.Sku 3019 } 3020 if sr.Location != nil { 3021 objectMap["location"] = sr.Location 3022 } 3023 if sr.Tags != nil { 3024 objectMap["tags"] = sr.Tags 3025 } 3026 return json.Marshal(objectMap) 3027} 3028 3029// ServiceResourceList object that includes an array of Service resources and a possible link for next set 3030type ServiceResourceList struct { 3031 autorest.Response `json:"-"` 3032 // Value - Collection of Service resources 3033 Value *[]ServiceResource `json:"value,omitempty"` 3034 // NextLink - URL client should use to fetch the next page (per server side paging). 3035 // It's null for now, added for future use. 3036 NextLink *string `json:"nextLink,omitempty"` 3037} 3038 3039// ServiceResourceListIterator provides access to a complete listing of ServiceResource values. 3040type ServiceResourceListIterator struct { 3041 i int 3042 page ServiceResourceListPage 3043} 3044 3045// NextWithContext advances to the next value. If there was an error making 3046// the request the iterator does not advance and the error is returned. 3047func (iter *ServiceResourceListIterator) NextWithContext(ctx context.Context) (err error) { 3048 if tracing.IsEnabled() { 3049 ctx = tracing.StartSpan(ctx, fqdn+"/ServiceResourceListIterator.NextWithContext") 3050 defer func() { 3051 sc := -1 3052 if iter.Response().Response.Response != nil { 3053 sc = iter.Response().Response.Response.StatusCode 3054 } 3055 tracing.EndSpan(ctx, sc, err) 3056 }() 3057 } 3058 iter.i++ 3059 if iter.i < len(iter.page.Values()) { 3060 return nil 3061 } 3062 err = iter.page.NextWithContext(ctx) 3063 if err != nil { 3064 iter.i-- 3065 return err 3066 } 3067 iter.i = 0 3068 return nil 3069} 3070 3071// Next advances to the next value. If there was an error making 3072// the request the iterator does not advance and the error is returned. 3073// Deprecated: Use NextWithContext() instead. 3074func (iter *ServiceResourceListIterator) Next() error { 3075 return iter.NextWithContext(context.Background()) 3076} 3077 3078// NotDone returns true if the enumeration should be started or is not yet complete. 3079func (iter ServiceResourceListIterator) NotDone() bool { 3080 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 3081} 3082 3083// Response returns the raw server response from the last page request. 3084func (iter ServiceResourceListIterator) Response() ServiceResourceList { 3085 return iter.page.Response() 3086} 3087 3088// Value returns the current value or a zero-initialized value if the 3089// iterator has advanced beyond the end of the collection. 3090func (iter ServiceResourceListIterator) Value() ServiceResource { 3091 if !iter.page.NotDone() { 3092 return ServiceResource{} 3093 } 3094 return iter.page.Values()[iter.i] 3095} 3096 3097// Creates a new instance of the ServiceResourceListIterator type. 3098func NewServiceResourceListIterator(page ServiceResourceListPage) ServiceResourceListIterator { 3099 return ServiceResourceListIterator{page: page} 3100} 3101 3102// IsEmpty returns true if the ListResult contains no values. 3103func (srl ServiceResourceList) IsEmpty() bool { 3104 return srl.Value == nil || len(*srl.Value) == 0 3105} 3106 3107// hasNextLink returns true if the NextLink is not empty. 3108func (srl ServiceResourceList) hasNextLink() bool { 3109 return srl.NextLink != nil && len(*srl.NextLink) != 0 3110} 3111 3112// serviceResourceListPreparer prepares a request to retrieve the next set of results. 3113// It returns nil if no more results exist. 3114func (srl ServiceResourceList) serviceResourceListPreparer(ctx context.Context) (*http.Request, error) { 3115 if !srl.hasNextLink() { 3116 return nil, nil 3117 } 3118 return autorest.Prepare((&http.Request{}).WithContext(ctx), 3119 autorest.AsJSON(), 3120 autorest.AsGet(), 3121 autorest.WithBaseURL(to.String(srl.NextLink))) 3122} 3123 3124// ServiceResourceListPage contains a page of ServiceResource values. 3125type ServiceResourceListPage struct { 3126 fn func(context.Context, ServiceResourceList) (ServiceResourceList, error) 3127 srl ServiceResourceList 3128} 3129 3130// NextWithContext advances to the next page of values. If there was an error making 3131// the request the page does not advance and the error is returned. 3132func (page *ServiceResourceListPage) NextWithContext(ctx context.Context) (err error) { 3133 if tracing.IsEnabled() { 3134 ctx = tracing.StartSpan(ctx, fqdn+"/ServiceResourceListPage.NextWithContext") 3135 defer func() { 3136 sc := -1 3137 if page.Response().Response.Response != nil { 3138 sc = page.Response().Response.Response.StatusCode 3139 } 3140 tracing.EndSpan(ctx, sc, err) 3141 }() 3142 } 3143 for { 3144 next, err := page.fn(ctx, page.srl) 3145 if err != nil { 3146 return err 3147 } 3148 page.srl = next 3149 if !next.hasNextLink() || !next.IsEmpty() { 3150 break 3151 } 3152 } 3153 return nil 3154} 3155 3156// Next advances to the next page of values. If there was an error making 3157// the request the page does not advance and the error is returned. 3158// Deprecated: Use NextWithContext() instead. 3159func (page *ServiceResourceListPage) Next() error { 3160 return page.NextWithContext(context.Background()) 3161} 3162 3163// NotDone returns true if the page enumeration should be started or is not yet complete. 3164func (page ServiceResourceListPage) NotDone() bool { 3165 return !page.srl.IsEmpty() 3166} 3167 3168// Response returns the raw server response from the last page request. 3169func (page ServiceResourceListPage) Response() ServiceResourceList { 3170 return page.srl 3171} 3172 3173// Values returns the slice of values for the current page or nil if there are no values. 3174func (page ServiceResourceListPage) Values() []ServiceResource { 3175 if page.srl.IsEmpty() { 3176 return nil 3177 } 3178 return *page.srl.Value 3179} 3180 3181// Creates a new instance of the ServiceResourceListPage type. 3182func NewServiceResourceListPage(cur ServiceResourceList, getNextPage func(context.Context, ServiceResourceList) (ServiceResourceList, error)) ServiceResourceListPage { 3183 return ServiceResourceListPage{ 3184 fn: getNextPage, 3185 srl: cur, 3186 } 3187} 3188 3189// ServicesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running 3190// operation. 3191type ServicesCreateOrUpdateFuture struct { 3192 azure.FutureAPI 3193 // Result returns the result of the asynchronous operation. 3194 // If the operation has not completed it will return an error. 3195 Result func(ServicesClient) (ServiceResource, error) 3196} 3197 3198// UnmarshalJSON is the custom unmarshaller for CreateFuture. 3199func (future *ServicesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { 3200 var azFuture azure.Future 3201 if err := json.Unmarshal(body, &azFuture); err != nil { 3202 return err 3203 } 3204 future.FutureAPI = &azFuture 3205 future.Result = future.result 3206 return nil 3207} 3208 3209// result is the default implementation for ServicesCreateOrUpdateFuture.Result. 3210func (future *ServicesCreateOrUpdateFuture) result(client ServicesClient) (sr ServiceResource, err error) { 3211 var done bool 3212 done, err = future.DoneWithContext(context.Background(), client) 3213 if err != nil { 3214 err = autorest.NewErrorWithError(err, "appplatform.ServicesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 3215 return 3216 } 3217 if !done { 3218 sr.Response.Response = future.Response() 3219 err = azure.NewAsyncOpIncompleteError("appplatform.ServicesCreateOrUpdateFuture") 3220 return 3221 } 3222 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 3223 if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent { 3224 sr, err = client.CreateOrUpdateResponder(sr.Response.Response) 3225 if err != nil { 3226 err = autorest.NewErrorWithError(err, "appplatform.ServicesCreateOrUpdateFuture", "Result", sr.Response.Response, "Failure responding to request") 3227 } 3228 } 3229 return 3230} 3231 3232// ServicesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running 3233// operation. 3234type ServicesDeleteFuture struct { 3235 azure.FutureAPI 3236 // Result returns the result of the asynchronous operation. 3237 // If the operation has not completed it will return an error. 3238 Result func(ServicesClient) (autorest.Response, error) 3239} 3240 3241// UnmarshalJSON is the custom unmarshaller for CreateFuture. 3242func (future *ServicesDeleteFuture) UnmarshalJSON(body []byte) error { 3243 var azFuture azure.Future 3244 if err := json.Unmarshal(body, &azFuture); err != nil { 3245 return err 3246 } 3247 future.FutureAPI = &azFuture 3248 future.Result = future.result 3249 return nil 3250} 3251 3252// result is the default implementation for ServicesDeleteFuture.Result. 3253func (future *ServicesDeleteFuture) result(client ServicesClient) (ar autorest.Response, err error) { 3254 var done bool 3255 done, err = future.DoneWithContext(context.Background(), client) 3256 if err != nil { 3257 err = autorest.NewErrorWithError(err, "appplatform.ServicesDeleteFuture", "Result", future.Response(), "Polling failure") 3258 return 3259 } 3260 if !done { 3261 ar.Response = future.Response() 3262 err = azure.NewAsyncOpIncompleteError("appplatform.ServicesDeleteFuture") 3263 return 3264 } 3265 ar.Response = future.Response() 3266 return 3267} 3268 3269// ServiceSpecification service specification payload 3270type ServiceSpecification struct { 3271 // LogSpecifications - Specifications of the Log for Azure Monitoring 3272 LogSpecifications *[]LogSpecification `json:"logSpecifications,omitempty"` 3273 // MetricSpecifications - Specifications of the Metrics for Azure Monitoring 3274 MetricSpecifications *[]MetricSpecification `json:"metricSpecifications,omitempty"` 3275} 3276 3277// ServicesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running 3278// operation. 3279type ServicesUpdateFuture struct { 3280 azure.FutureAPI 3281 // Result returns the result of the asynchronous operation. 3282 // If the operation has not completed it will return an error. 3283 Result func(ServicesClient) (ServiceResource, error) 3284} 3285 3286// UnmarshalJSON is the custom unmarshaller for CreateFuture. 3287func (future *ServicesUpdateFuture) UnmarshalJSON(body []byte) error { 3288 var azFuture azure.Future 3289 if err := json.Unmarshal(body, &azFuture); err != nil { 3290 return err 3291 } 3292 future.FutureAPI = &azFuture 3293 future.Result = future.result 3294 return nil 3295} 3296 3297// result is the default implementation for ServicesUpdateFuture.Result. 3298func (future *ServicesUpdateFuture) result(client ServicesClient) (sr ServiceResource, err error) { 3299 var done bool 3300 done, err = future.DoneWithContext(context.Background(), client) 3301 if err != nil { 3302 err = autorest.NewErrorWithError(err, "appplatform.ServicesUpdateFuture", "Result", future.Response(), "Polling failure") 3303 return 3304 } 3305 if !done { 3306 sr.Response.Response = future.Response() 3307 err = azure.NewAsyncOpIncompleteError("appplatform.ServicesUpdateFuture") 3308 return 3309 } 3310 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 3311 if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent { 3312 sr, err = client.UpdateResponder(sr.Response.Response) 3313 if err != nil { 3314 err = autorest.NewErrorWithError(err, "appplatform.ServicesUpdateFuture", "Result", sr.Response.Response, "Failure responding to request") 3315 } 3316 } 3317 return 3318} 3319 3320// Sku sku of Azure Spring Cloud 3321type Sku struct { 3322 // Name - Name of the Sku 3323 Name *string `json:"name,omitempty"` 3324 // Tier - Tier of the Sku 3325 Tier *string `json:"tier,omitempty"` 3326 // Capacity - Current capacity of the target resource 3327 Capacity *int32 `json:"capacity,omitempty"` 3328} 3329 3330// SkuCapacity the SKU capacity 3331type SkuCapacity struct { 3332 // Minimum - Gets or sets the minimum. 3333 Minimum *int32 `json:"minimum,omitempty"` 3334 // Maximum - Gets or sets the maximum. 3335 Maximum *int32 `json:"maximum,omitempty"` 3336 // Default - Gets or sets the default. 3337 Default *int32 `json:"default,omitempty"` 3338 // ScaleType - Gets or sets the type of the scale. Possible values include: 'SkuScaleTypeNone', 'SkuScaleTypeManual', 'SkuScaleTypeAutomatic' 3339 ScaleType SkuScaleType `json:"scaleType,omitempty"` 3340} 3341 3342// SupportedRuntimeVersion supported deployment runtime version descriptor. 3343type SupportedRuntimeVersion struct { 3344 // Value - The raw value which could be passed to deployment CRUD operations. Possible values include: 'SupportedRuntimeValueJava8', 'SupportedRuntimeValueJava11', 'SupportedRuntimeValueNetCore31' 3345 Value SupportedRuntimeValue `json:"value,omitempty"` 3346 // Platform - The platform of this runtime version (possible values: "Java" or ".NET"). Possible values include: 'Java', 'NETCore' 3347 Platform SupportedRuntimePlatform `json:"platform,omitempty"` 3348 // Version - The detailed version (major.minor) of the platform. 3349 Version *string `json:"version,omitempty"` 3350} 3351 3352// TemporaryDisk temporary disk payload 3353type TemporaryDisk struct { 3354 // SizeInGB - Size of the temporary disk in GB 3355 SizeInGB *int32 `json:"sizeInGB,omitempty"` 3356 // MountPath - Mount path of the temporary disk 3357 MountPath *string `json:"mountPath,omitempty"` 3358} 3359 3360// TestKeys test keys payload 3361type TestKeys struct { 3362 autorest.Response `json:"-"` 3363 // PrimaryKey - Primary key 3364 PrimaryKey *string `json:"primaryKey,omitempty"` 3365 // SecondaryKey - Secondary key 3366 SecondaryKey *string `json:"secondaryKey,omitempty"` 3367 // PrimaryTestEndpoint - Primary test endpoint 3368 PrimaryTestEndpoint *string `json:"primaryTestEndpoint,omitempty"` 3369 // SecondaryTestEndpoint - Secondary test endpoint 3370 SecondaryTestEndpoint *string `json:"secondaryTestEndpoint,omitempty"` 3371 // Enabled - Indicates whether the test endpoint feature enabled or not 3372 Enabled *bool `json:"enabled,omitempty"` 3373} 3374 3375// TrackedResource the resource model definition for a ARM tracked top level resource. 3376type TrackedResource struct { 3377 // Location - The GEO location of the resource. 3378 Location *string `json:"location,omitempty"` 3379 // Tags - Tags of the service which is a list of key value pairs that describe the resource. 3380 Tags map[string]*string `json:"tags"` 3381 // ID - READ-ONLY; Fully qualified resource Id for the resource. 3382 ID *string `json:"id,omitempty"` 3383 // Name - READ-ONLY; The name of the resource. 3384 Name *string `json:"name,omitempty"` 3385 // Type - READ-ONLY; The type of the resource. 3386 Type *string `json:"type,omitempty"` 3387} 3388 3389// MarshalJSON is the custom marshaler for TrackedResource. 3390func (tr TrackedResource) MarshalJSON() ([]byte, error) { 3391 objectMap := make(map[string]interface{}) 3392 if tr.Location != nil { 3393 objectMap["location"] = tr.Location 3394 } 3395 if tr.Tags != nil { 3396 objectMap["tags"] = tr.Tags 3397 } 3398 return json.Marshal(objectMap) 3399} 3400 3401// UserSourceInfo source information for a deployment 3402type UserSourceInfo struct { 3403 // Type - Type of the source uploaded. Possible values include: 'Jar', 'NetCoreZip', 'Source' 3404 Type UserSourceType `json:"type,omitempty"` 3405 // RelativePath - Relative path of the storage which stores the source 3406 RelativePath *string `json:"relativePath,omitempty"` 3407 // Version - Version of the source 3408 Version *string `json:"version,omitempty"` 3409 // ArtifactSelector - Selector for the artifact to be used for the deployment for multi-module projects. This should be 3410 // the relative path to the target module/project. 3411 ArtifactSelector *string `json:"artifactSelector,omitempty"` 3412} 3413