1package web 2 3// Copyright (c) Microsoft Corporation. All rights reserved. 4// Licensed under the MIT License. See License.txt in the project root for license information. 5// 6// Code generated by Microsoft (R) AutoRest Code Generator. 7// Changes may cause incorrect behavior and will be lost if the code is regenerated. 8 9import ( 10 "context" 11 "encoding/json" 12 "github.com/Azure/go-autorest/autorest" 13 "github.com/Azure/go-autorest/autorest/azure" 14 "github.com/Azure/go-autorest/autorest/date" 15 "github.com/Azure/go-autorest/autorest/to" 16 "github.com/Azure/go-autorest/tracing" 17 "io" 18 "net/http" 19) 20 21// The package's fully qualified name. 22const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/web/mgmt/2015-08-01-preview/web" 23 24// Address address information for domain registration 25type Address struct { 26 // Address1 - Address 1 27 Address1 *string `json:"address1,omitempty"` 28 // Address2 - Address 2 29 Address2 *string `json:"address2,omitempty"` 30 // City - City 31 City *string `json:"city,omitempty"` 32 // Country - Country 33 Country *string `json:"country,omitempty"` 34 // PostalCode - Postal code 35 PostalCode *string `json:"postalCode,omitempty"` 36 // State - State 37 State *string `json:"state,omitempty"` 38} 39 40// AddressResponse describes main public ip address and any extra vips 41type AddressResponse struct { 42 autorest.Response `json:"-"` 43 // ServiceIPAddress - Main public vip 44 ServiceIPAddress *string `json:"serviceIpAddress,omitempty"` 45 // InternalIPAddress - VNET internal ip address of the hostingEnvironment (App Service Environment) if it is in internal load-balancing mode 46 InternalIPAddress *string `json:"internalIpAddress,omitempty"` 47 // OutboundIPAddresses - IP addresses appearing on outbound connections 48 OutboundIPAddresses *[]string `json:"outboundIpAddresses,omitempty"` 49 // VipMappings - Additional vips 50 VipMappings *[]VirtualIPMapping `json:"vipMappings,omitempty"` 51} 52 53// APIDefinitionInfo information about the formal API definition for the web app. 54type APIDefinitionInfo struct { 55 // URL - The URL of the API definition. 56 URL *string `json:"url,omitempty"` 57} 58 59// APIEntity API Management 60type APIEntity struct { 61 autorest.Response `json:"-"` 62 *APIEntityProperties `json:"properties,omitempty"` 63 // ID - Resource Id 64 ID *string `json:"id,omitempty"` 65 // Name - Resource Name 66 Name *string `json:"name,omitempty"` 67 // Kind - Kind of resource 68 Kind *string `json:"kind,omitempty"` 69 // Location - Resource Location 70 Location *string `json:"location,omitempty"` 71 // Type - Resource type 72 Type *string `json:"type,omitempty"` 73 // Tags - Resource tags 74 Tags map[string]*string `json:"tags"` 75} 76 77// MarshalJSON is the custom marshaler for APIEntity. 78func (ae APIEntity) MarshalJSON() ([]byte, error) { 79 objectMap := make(map[string]interface{}) 80 if ae.APIEntityProperties != nil { 81 objectMap["properties"] = ae.APIEntityProperties 82 } 83 if ae.ID != nil { 84 objectMap["id"] = ae.ID 85 } 86 if ae.Name != nil { 87 objectMap["name"] = ae.Name 88 } 89 if ae.Kind != nil { 90 objectMap["kind"] = ae.Kind 91 } 92 if ae.Location != nil { 93 objectMap["location"] = ae.Location 94 } 95 if ae.Type != nil { 96 objectMap["type"] = ae.Type 97 } 98 if ae.Tags != nil { 99 objectMap["tags"] = ae.Tags 100 } 101 return json.Marshal(objectMap) 102} 103 104// UnmarshalJSON is the custom unmarshaler for APIEntity struct. 105func (ae *APIEntity) UnmarshalJSON(body []byte) error { 106 var m map[string]*json.RawMessage 107 err := json.Unmarshal(body, &m) 108 if err != nil { 109 return err 110 } 111 for k, v := range m { 112 switch k { 113 case "properties": 114 if v != nil { 115 var APIEntityProperties APIEntityProperties 116 err = json.Unmarshal(*v, &APIEntityProperties) 117 if err != nil { 118 return err 119 } 120 ae.APIEntityProperties = &APIEntityProperties 121 } 122 case "id": 123 if v != nil { 124 var ID string 125 err = json.Unmarshal(*v, &ID) 126 if err != nil { 127 return err 128 } 129 ae.ID = &ID 130 } 131 case "name": 132 if v != nil { 133 var name string 134 err = json.Unmarshal(*v, &name) 135 if err != nil { 136 return err 137 } 138 ae.Name = &name 139 } 140 case "kind": 141 if v != nil { 142 var kind string 143 err = json.Unmarshal(*v, &kind) 144 if err != nil { 145 return err 146 } 147 ae.Kind = &kind 148 } 149 case "location": 150 if v != nil { 151 var location string 152 err = json.Unmarshal(*v, &location) 153 if err != nil { 154 return err 155 } 156 ae.Location = &location 157 } 158 case "type": 159 if v != nil { 160 var typeVar string 161 err = json.Unmarshal(*v, &typeVar) 162 if err != nil { 163 return err 164 } 165 ae.Type = &typeVar 166 } 167 case "tags": 168 if v != nil { 169 var tags map[string]*string 170 err = json.Unmarshal(*v, &tags) 171 if err != nil { 172 return err 173 } 174 ae.Tags = tags 175 } 176 } 177 } 178 179 return nil 180} 181 182// APIEntityProperties ... 183type APIEntityProperties struct { 184 // Name - Name of the API 185 // the URL path of this API when exposed via APIM 186 Name *string `json:"name,omitempty"` 187 // GeneralInformation - the URL path of this API when exposed via APIM 188 GeneralInformation *GeneralAPIInformation `json:"generalInformation,omitempty"` 189 // Path - the URL path of this API when exposed via APIM 190 Path *string `json:"path,omitempty"` 191 // RuntimeUrls - Read only property returning the runtime endpoints where the API can be called 192 RuntimeUrls *[]string `json:"runtimeUrls,omitempty"` 193 // Protocols - Protocols supported by the front end - http/https 194 Protocols *[]string `json:"protocols,omitempty"` 195 // Policies - API policies 196 Policies *APIPolicies `json:"policies,omitempty"` 197 // BackendService - Backend service definition 198 BackendService *BackendServiceDefinition `json:"backendService,omitempty"` 199 // APIDefinitionURL - API definition Url - url where the swagger can be downloaded from 200 APIDefinitionURL *string `json:"apiDefinitionUrl,omitempty"` 201 // Metadata - Free form object for the data caller wants to store 202 Metadata interface{} `json:"metadata,omitempty"` 203 // Capabilities - Capabilities 204 Capabilities *[]string `json:"capabilities,omitempty"` 205 // ConnectionParameters - Connection parameters 206 ConnectionParameters map[string]*ConnectionParameter `json:"connectionParameters"` 207 // CreatedTime - Timestamp of the connection creation 208 CreatedTime *date.Time `json:"createdTime,omitempty"` 209 // ChangedTime - Timestamp of last connection change. 210 ChangedTime *date.Time `json:"changedTime,omitempty"` 211} 212 213// MarshalJSON is the custom marshaler for APIEntityProperties. 214func (ae APIEntityProperties) MarshalJSON() ([]byte, error) { 215 objectMap := make(map[string]interface{}) 216 if ae.Name != nil { 217 objectMap["name"] = ae.Name 218 } 219 if ae.GeneralInformation != nil { 220 objectMap["generalInformation"] = ae.GeneralInformation 221 } 222 if ae.Path != nil { 223 objectMap["path"] = ae.Path 224 } 225 if ae.RuntimeUrls != nil { 226 objectMap["runtimeUrls"] = ae.RuntimeUrls 227 } 228 if ae.Protocols != nil { 229 objectMap["protocols"] = ae.Protocols 230 } 231 if ae.Policies != nil { 232 objectMap["policies"] = ae.Policies 233 } 234 if ae.BackendService != nil { 235 objectMap["backendService"] = ae.BackendService 236 } 237 if ae.APIDefinitionURL != nil { 238 objectMap["apiDefinitionUrl"] = ae.APIDefinitionURL 239 } 240 if ae.Metadata != nil { 241 objectMap["metadata"] = ae.Metadata 242 } 243 if ae.Capabilities != nil { 244 objectMap["capabilities"] = ae.Capabilities 245 } 246 if ae.ConnectionParameters != nil { 247 objectMap["connectionParameters"] = ae.ConnectionParameters 248 } 249 if ae.CreatedTime != nil { 250 objectMap["createdTime"] = ae.CreatedTime 251 } 252 if ae.ChangedTime != nil { 253 objectMap["changedTime"] = ae.ChangedTime 254 } 255 return json.Marshal(objectMap) 256} 257 258// APIOAuthSettings oAuth settings for the connection provider 259type APIOAuthSettings struct { 260 // IdentityProvider - Identity provider 261 IdentityProvider *string `json:"identityProvider,omitempty"` 262 // ClientID - Resource provider client id 263 ClientID *string `json:"clientId,omitempty"` 264 // ClientSecret - Client Secret needed for OAuth 265 ClientSecret *string `json:"clientSecret,omitempty"` 266 // Scopes - OAuth scopes 267 Scopes *[]string `json:"scopes,omitempty"` 268 // RedirectURL - Url 269 RedirectURL *string `json:"redirectUrl,omitempty"` 270 // Properties - Read only properties for this oauth setting. 271 Properties interface{} `json:"properties,omitempty"` 272 // CustomParameters - OAuth parameters key is the name of parameter 273 CustomParameters map[string]*APIOAuthSettingsParameter `json:"customParameters"` 274} 275 276// MarshalJSON is the custom marshaler for APIOAuthSettings. 277func (aoas APIOAuthSettings) MarshalJSON() ([]byte, error) { 278 objectMap := make(map[string]interface{}) 279 if aoas.IdentityProvider != nil { 280 objectMap["identityProvider"] = aoas.IdentityProvider 281 } 282 if aoas.ClientID != nil { 283 objectMap["clientId"] = aoas.ClientID 284 } 285 if aoas.ClientSecret != nil { 286 objectMap["clientSecret"] = aoas.ClientSecret 287 } 288 if aoas.Scopes != nil { 289 objectMap["scopes"] = aoas.Scopes 290 } 291 if aoas.RedirectURL != nil { 292 objectMap["redirectUrl"] = aoas.RedirectURL 293 } 294 if aoas.Properties != nil { 295 objectMap["properties"] = aoas.Properties 296 } 297 if aoas.CustomParameters != nil { 298 objectMap["customParameters"] = aoas.CustomParameters 299 } 300 return json.Marshal(objectMap) 301} 302 303// APIOAuthSettingsParameter oAuth Settings Parameter 304type APIOAuthSettingsParameter struct { 305 // Value - Value 306 Value *string `json:"value,omitempty"` 307 // Options - Read only: Options available to this parameter 308 Options interface{} `json:"options,omitempty"` 309 // UIDefinition - UI definitions per culture as caller can specify the culture 310 UIDefinition interface{} `json:"uiDefinition,omitempty"` 311} 312 313// APIPolicies API policies 314type APIPolicies struct { 315 *APIPoliciesProperties `json:"properties,omitempty"` 316 // ID - Resource Id 317 ID *string `json:"id,omitempty"` 318 // Name - Resource Name 319 Name *string `json:"name,omitempty"` 320 // Kind - Kind of resource 321 Kind *string `json:"kind,omitempty"` 322 // Location - Resource Location 323 Location *string `json:"location,omitempty"` 324 // Type - Resource type 325 Type *string `json:"type,omitempty"` 326 // Tags - Resource tags 327 Tags map[string]*string `json:"tags"` 328} 329 330// MarshalJSON is the custom marshaler for APIPolicies. 331func (ap APIPolicies) MarshalJSON() ([]byte, error) { 332 objectMap := make(map[string]interface{}) 333 if ap.APIPoliciesProperties != nil { 334 objectMap["properties"] = ap.APIPoliciesProperties 335 } 336 if ap.ID != nil { 337 objectMap["id"] = ap.ID 338 } 339 if ap.Name != nil { 340 objectMap["name"] = ap.Name 341 } 342 if ap.Kind != nil { 343 objectMap["kind"] = ap.Kind 344 } 345 if ap.Location != nil { 346 objectMap["location"] = ap.Location 347 } 348 if ap.Type != nil { 349 objectMap["type"] = ap.Type 350 } 351 if ap.Tags != nil { 352 objectMap["tags"] = ap.Tags 353 } 354 return json.Marshal(objectMap) 355} 356 357// UnmarshalJSON is the custom unmarshaler for APIPolicies struct. 358func (ap *APIPolicies) UnmarshalJSON(body []byte) error { 359 var m map[string]*json.RawMessage 360 err := json.Unmarshal(body, &m) 361 if err != nil { 362 return err 363 } 364 for k, v := range m { 365 switch k { 366 case "properties": 367 if v != nil { 368 var APIPoliciesProperties APIPoliciesProperties 369 err = json.Unmarshal(*v, &APIPoliciesProperties) 370 if err != nil { 371 return err 372 } 373 ap.APIPoliciesProperties = &APIPoliciesProperties 374 } 375 case "id": 376 if v != nil { 377 var ID string 378 err = json.Unmarshal(*v, &ID) 379 if err != nil { 380 return err 381 } 382 ap.ID = &ID 383 } 384 case "name": 385 if v != nil { 386 var name string 387 err = json.Unmarshal(*v, &name) 388 if err != nil { 389 return err 390 } 391 ap.Name = &name 392 } 393 case "kind": 394 if v != nil { 395 var kind string 396 err = json.Unmarshal(*v, &kind) 397 if err != nil { 398 return err 399 } 400 ap.Kind = &kind 401 } 402 case "location": 403 if v != nil { 404 var location string 405 err = json.Unmarshal(*v, &location) 406 if err != nil { 407 return err 408 } 409 ap.Location = &location 410 } 411 case "type": 412 if v != nil { 413 var typeVar string 414 err = json.Unmarshal(*v, &typeVar) 415 if err != nil { 416 return err 417 } 418 ap.Type = &typeVar 419 } 420 case "tags": 421 if v != nil { 422 var tags map[string]*string 423 err = json.Unmarshal(*v, &tags) 424 if err != nil { 425 return err 426 } 427 ap.Tags = tags 428 } 429 } 430 } 431 432 return nil 433} 434 435// APIPoliciesProperties ... 436type APIPoliciesProperties struct { 437 // Content - Content of xml policy 438 Content *string `json:"content,omitempty"` 439} 440 441// ApisCollection collection of Apis 442type ApisCollection struct { 443 autorest.Response `json:"-"` 444 // Value - Collection of resources 445 Value *[]APIEntity `json:"value,omitempty"` 446 // NextLink - Link to next page of resources 447 NextLink *string `json:"nextLink,omitempty"` 448} 449 450// ApisCollectionIterator provides access to a complete listing of APIEntity values. 451type ApisCollectionIterator struct { 452 i int 453 page ApisCollectionPage 454} 455 456// NextWithContext advances to the next value. If there was an error making 457// the request the iterator does not advance and the error is returned. 458func (iter *ApisCollectionIterator) NextWithContext(ctx context.Context) (err error) { 459 if tracing.IsEnabled() { 460 ctx = tracing.StartSpan(ctx, fqdn+"/ApisCollectionIterator.NextWithContext") 461 defer func() { 462 sc := -1 463 if iter.Response().Response.Response != nil { 464 sc = iter.Response().Response.Response.StatusCode 465 } 466 tracing.EndSpan(ctx, sc, err) 467 }() 468 } 469 iter.i++ 470 if iter.i < len(iter.page.Values()) { 471 return nil 472 } 473 err = iter.page.NextWithContext(ctx) 474 if err != nil { 475 iter.i-- 476 return err 477 } 478 iter.i = 0 479 return nil 480} 481 482// Next advances to the next value. If there was an error making 483// the request the iterator does not advance and the error is returned. 484// Deprecated: Use NextWithContext() instead. 485func (iter *ApisCollectionIterator) Next() error { 486 return iter.NextWithContext(context.Background()) 487} 488 489// NotDone returns true if the enumeration should be started or is not yet complete. 490func (iter ApisCollectionIterator) NotDone() bool { 491 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 492} 493 494// Response returns the raw server response from the last page request. 495func (iter ApisCollectionIterator) Response() ApisCollection { 496 return iter.page.Response() 497} 498 499// Value returns the current value or a zero-initialized value if the 500// iterator has advanced beyond the end of the collection. 501func (iter ApisCollectionIterator) Value() APIEntity { 502 if !iter.page.NotDone() { 503 return APIEntity{} 504 } 505 return iter.page.Values()[iter.i] 506} 507 508// Creates a new instance of the ApisCollectionIterator type. 509func NewApisCollectionIterator(page ApisCollectionPage) ApisCollectionIterator { 510 return ApisCollectionIterator{page: page} 511} 512 513// IsEmpty returns true if the ListResult contains no values. 514func (ac ApisCollection) IsEmpty() bool { 515 return ac.Value == nil || len(*ac.Value) == 0 516} 517 518// hasNextLink returns true if the NextLink is not empty. 519func (ac ApisCollection) hasNextLink() bool { 520 return ac.NextLink != nil && len(*ac.NextLink) != 0 521} 522 523// apisCollectionPreparer prepares a request to retrieve the next set of results. 524// It returns nil if no more results exist. 525func (ac ApisCollection) apisCollectionPreparer(ctx context.Context) (*http.Request, error) { 526 if !ac.hasNextLink() { 527 return nil, nil 528 } 529 return autorest.Prepare((&http.Request{}).WithContext(ctx), 530 autorest.AsJSON(), 531 autorest.AsGet(), 532 autorest.WithBaseURL(to.String(ac.NextLink))) 533} 534 535// ApisCollectionPage contains a page of APIEntity values. 536type ApisCollectionPage struct { 537 fn func(context.Context, ApisCollection) (ApisCollection, error) 538 ac ApisCollection 539} 540 541// NextWithContext advances to the next page of values. If there was an error making 542// the request the page does not advance and the error is returned. 543func (page *ApisCollectionPage) NextWithContext(ctx context.Context) (err error) { 544 if tracing.IsEnabled() { 545 ctx = tracing.StartSpan(ctx, fqdn+"/ApisCollectionPage.NextWithContext") 546 defer func() { 547 sc := -1 548 if page.Response().Response.Response != nil { 549 sc = page.Response().Response.Response.StatusCode 550 } 551 tracing.EndSpan(ctx, sc, err) 552 }() 553 } 554 for { 555 next, err := page.fn(ctx, page.ac) 556 if err != nil { 557 return err 558 } 559 page.ac = next 560 if !next.hasNextLink() || !next.IsEmpty() { 561 break 562 } 563 } 564 return nil 565} 566 567// Next advances to the next page of values. If there was an error making 568// the request the page does not advance and the error is returned. 569// Deprecated: Use NextWithContext() instead. 570func (page *ApisCollectionPage) Next() error { 571 return page.NextWithContext(context.Background()) 572} 573 574// NotDone returns true if the page enumeration should be started or is not yet complete. 575func (page ApisCollectionPage) NotDone() bool { 576 return !page.ac.IsEmpty() 577} 578 579// Response returns the raw server response from the last page request. 580func (page ApisCollectionPage) Response() ApisCollection { 581 return page.ac 582} 583 584// Values returns the slice of values for the current page or nil if there are no values. 585func (page ApisCollectionPage) Values() []APIEntity { 586 if page.ac.IsEmpty() { 587 return nil 588 } 589 return *page.ac.Value 590} 591 592// Creates a new instance of the ApisCollectionPage type. 593func NewApisCollectionPage(cur ApisCollection, getNextPage func(context.Context, ApisCollection) (ApisCollection, error)) ApisCollectionPage { 594 return ApisCollectionPage{ 595 fn: getNextPage, 596 ac: cur, 597 } 598} 599 600// ApplicationLogsConfig application logs configuration 601type ApplicationLogsConfig struct { 602 // FileSystem - Application logs to file system configuration 603 FileSystem *FileSystemApplicationLogsConfig `json:"fileSystem,omitempty"` 604 // AzureTableStorage - Application logs to azure table storage configuration 605 AzureTableStorage *AzureTableStorageApplicationLogsConfig `json:"azureTableStorage,omitempty"` 606 // AzureBlobStorage - Application logs to blob storage configuration 607 AzureBlobStorage *AzureBlobStorageApplicationLogsConfig `json:"azureBlobStorage,omitempty"` 608} 609 610// ArmPlan the plan object in an ARM, represents a marketplace plan 611type ArmPlan struct { 612 // Name - The name 613 Name *string `json:"name,omitempty"` 614 // Publisher - The publisher 615 Publisher *string `json:"publisher,omitempty"` 616 // Product - The product 617 Product *string `json:"product,omitempty"` 618 // PromotionCode - The promotion code 619 PromotionCode *string `json:"promotionCode,omitempty"` 620 // Version - Version of product 621 Version *string `json:"version,omitempty"` 622} 623 624// AutoHealActions autoHealActions - Describes the actions which can be 625// taken by the auto-heal module when a rule is triggered. 626type AutoHealActions struct { 627 // ActionType - ActionType - predefined action to be taken. Possible values include: 'Recycle', 'LogEvent', 'CustomAction' 628 ActionType AutoHealActionType `json:"actionType,omitempty"` 629 // CustomAction - CustomAction - custom action to be taken 630 CustomAction *AutoHealCustomAction `json:"customAction,omitempty"` 631 // MinProcessExecutionTime - MinProcessExecutionTime - minimum time the process must execute 632 // before taking the action 633 MinProcessExecutionTime *string `json:"minProcessExecutionTime,omitempty"` 634} 635 636// AutoHealCustomAction autoHealCustomAction - Describes the custom action to be executed 637// when an auto heal rule is triggered. 638type AutoHealCustomAction struct { 639 // Exe - Executable to be run 640 Exe *string `json:"exe,omitempty"` 641 // Parameters - Parameters for the executable 642 Parameters *string `json:"parameters,omitempty"` 643} 644 645// AutoHealRules autoHealRules - describes the rules which can be defined for auto-heal 646type AutoHealRules struct { 647 // Triggers - Triggers - Conditions that describe when to execute the auto-heal actions 648 Triggers *AutoHealTriggers `json:"triggers,omitempty"` 649 // Actions - Actions - Actions to be executed when a rule is triggered 650 Actions *AutoHealActions `json:"actions,omitempty"` 651} 652 653// AutoHealTriggers autoHealTriggers - describes the triggers for auto-heal. 654type AutoHealTriggers struct { 655 // Requests - Requests - Defines a rule based on total requests 656 Requests *RequestsBasedTrigger `json:"requests,omitempty"` 657 // PrivateBytesInKB - PrivateBytesInKB - Defines a rule based on private bytes 658 PrivateBytesInKB *int32 `json:"privateBytesInKB,omitempty"` 659 // StatusCodes - StatusCodes - Defines a rule based on status codes 660 StatusCodes *[]StatusCodesBasedTrigger `json:"statusCodes,omitempty"` 661 // SlowRequests - SlowRequests - Defines a rule based on request execution time 662 SlowRequests *SlowRequestsBasedTrigger `json:"slowRequests,omitempty"` 663} 664 665// AzureBlobStorageApplicationLogsConfig application logs azure blob storage configuration 666type AzureBlobStorageApplicationLogsConfig struct { 667 // Level - Log level. Possible values include: 'LogLevelOff', 'LogLevelVerbose', 'LogLevelInformation', 'LogLevelWarning', 'LogLevelError' 668 Level LogLevel `json:"level,omitempty"` 669 // SasURL - SAS url to a azure blob container with read/write/list/delete permissions 670 SasURL *string `json:"sasUrl,omitempty"` 671 // RetentionInDays - Retention in days. 672 // Remove blobs older than X days. 673 // 0 or lower means no retention. 674 RetentionInDays *int32 `json:"retentionInDays,omitempty"` 675} 676 677// AzureBlobStorageHTTPLogsConfig http logs to azure blob storage configuration 678type AzureBlobStorageHTTPLogsConfig struct { 679 // SasURL - SAS url to a azure blob container with read/write/list/delete permissions 680 SasURL *string `json:"sasUrl,omitempty"` 681 // RetentionInDays - Retention in days. 682 // Remove blobs older than X days. 683 // 0 or lower means no retention. 684 RetentionInDays *int32 `json:"retentionInDays,omitempty"` 685 // Enabled - Enabled 686 Enabled *bool `json:"enabled,omitempty"` 687} 688 689// AzureTableStorageApplicationLogsConfig application logs to azure table storage configuration 690type AzureTableStorageApplicationLogsConfig struct { 691 // Level - Log level. Possible values include: 'LogLevelOff', 'LogLevelVerbose', 'LogLevelInformation', 'LogLevelWarning', 'LogLevelError' 692 Level LogLevel `json:"level,omitempty"` 693 // SasURL - SAS url to an azure table with add/query/delete permissions 694 SasURL *string `json:"sasUrl,omitempty"` 695} 696 697// BackendServiceDefinition API definitions with backend urls 698type BackendServiceDefinition struct { 699 *BackendServiceDefinitionProperties `json:"properties,omitempty"` 700 // ID - Resource Id 701 ID *string `json:"id,omitempty"` 702 // Name - Resource Name 703 Name *string `json:"name,omitempty"` 704 // Kind - Kind of resource 705 Kind *string `json:"kind,omitempty"` 706 // Location - Resource Location 707 Location *string `json:"location,omitempty"` 708 // Type - Resource type 709 Type *string `json:"type,omitempty"` 710 // Tags - Resource tags 711 Tags map[string]*string `json:"tags"` 712} 713 714// MarshalJSON is the custom marshaler for BackendServiceDefinition. 715func (bsd BackendServiceDefinition) MarshalJSON() ([]byte, error) { 716 objectMap := make(map[string]interface{}) 717 if bsd.BackendServiceDefinitionProperties != nil { 718 objectMap["properties"] = bsd.BackendServiceDefinitionProperties 719 } 720 if bsd.ID != nil { 721 objectMap["id"] = bsd.ID 722 } 723 if bsd.Name != nil { 724 objectMap["name"] = bsd.Name 725 } 726 if bsd.Kind != nil { 727 objectMap["kind"] = bsd.Kind 728 } 729 if bsd.Location != nil { 730 objectMap["location"] = bsd.Location 731 } 732 if bsd.Type != nil { 733 objectMap["type"] = bsd.Type 734 } 735 if bsd.Tags != nil { 736 objectMap["tags"] = bsd.Tags 737 } 738 return json.Marshal(objectMap) 739} 740 741// UnmarshalJSON is the custom unmarshaler for BackendServiceDefinition struct. 742func (bsd *BackendServiceDefinition) UnmarshalJSON(body []byte) error { 743 var m map[string]*json.RawMessage 744 err := json.Unmarshal(body, &m) 745 if err != nil { 746 return err 747 } 748 for k, v := range m { 749 switch k { 750 case "properties": 751 if v != nil { 752 var backendServiceDefinitionProperties BackendServiceDefinitionProperties 753 err = json.Unmarshal(*v, &backendServiceDefinitionProperties) 754 if err != nil { 755 return err 756 } 757 bsd.BackendServiceDefinitionProperties = &backendServiceDefinitionProperties 758 } 759 case "id": 760 if v != nil { 761 var ID string 762 err = json.Unmarshal(*v, &ID) 763 if err != nil { 764 return err 765 } 766 bsd.ID = &ID 767 } 768 case "name": 769 if v != nil { 770 var name string 771 err = json.Unmarshal(*v, &name) 772 if err != nil { 773 return err 774 } 775 bsd.Name = &name 776 } 777 case "kind": 778 if v != nil { 779 var kind string 780 err = json.Unmarshal(*v, &kind) 781 if err != nil { 782 return err 783 } 784 bsd.Kind = &kind 785 } 786 case "location": 787 if v != nil { 788 var location string 789 err = json.Unmarshal(*v, &location) 790 if err != nil { 791 return err 792 } 793 bsd.Location = &location 794 } 795 case "type": 796 if v != nil { 797 var typeVar string 798 err = json.Unmarshal(*v, &typeVar) 799 if err != nil { 800 return err 801 } 802 bsd.Type = &typeVar 803 } 804 case "tags": 805 if v != nil { 806 var tags map[string]*string 807 err = json.Unmarshal(*v, &tags) 808 if err != nil { 809 return err 810 } 811 bsd.Tags = tags 812 } 813 } 814 } 815 816 return nil 817} 818 819// BackendServiceDefinitionProperties ... 820type BackendServiceDefinitionProperties struct { 821 // ServiceURL - Url from which the swagger payload will be fetched 822 ServiceURL *string `json:"serviceUrl,omitempty"` 823 // HostingEnvironmentServiceUrls - Service Urls per Hosting environment 824 HostingEnvironmentServiceUrls *[]HostingEnvironmentServiceDescriptions `json:"hostingEnvironmentServiceUrls,omitempty"` 825} 826 827// BackupItem backup description 828type BackupItem struct { 829 autorest.Response `json:"-"` 830 *BackupItemProperties `json:"properties,omitempty"` 831 // ID - Resource Id 832 ID *string `json:"id,omitempty"` 833 // Name - Resource Name 834 Name *string `json:"name,omitempty"` 835 // Kind - Kind of resource 836 Kind *string `json:"kind,omitempty"` 837 // Location - Resource Location 838 Location *string `json:"location,omitempty"` 839 // Type - Resource type 840 Type *string `json:"type,omitempty"` 841 // Tags - Resource tags 842 Tags map[string]*string `json:"tags"` 843} 844 845// MarshalJSON is the custom marshaler for BackupItem. 846func (bi BackupItem) MarshalJSON() ([]byte, error) { 847 objectMap := make(map[string]interface{}) 848 if bi.BackupItemProperties != nil { 849 objectMap["properties"] = bi.BackupItemProperties 850 } 851 if bi.ID != nil { 852 objectMap["id"] = bi.ID 853 } 854 if bi.Name != nil { 855 objectMap["name"] = bi.Name 856 } 857 if bi.Kind != nil { 858 objectMap["kind"] = bi.Kind 859 } 860 if bi.Location != nil { 861 objectMap["location"] = bi.Location 862 } 863 if bi.Type != nil { 864 objectMap["type"] = bi.Type 865 } 866 if bi.Tags != nil { 867 objectMap["tags"] = bi.Tags 868 } 869 return json.Marshal(objectMap) 870} 871 872// UnmarshalJSON is the custom unmarshaler for BackupItem struct. 873func (bi *BackupItem) UnmarshalJSON(body []byte) error { 874 var m map[string]*json.RawMessage 875 err := json.Unmarshal(body, &m) 876 if err != nil { 877 return err 878 } 879 for k, v := range m { 880 switch k { 881 case "properties": 882 if v != nil { 883 var backupItemProperties BackupItemProperties 884 err = json.Unmarshal(*v, &backupItemProperties) 885 if err != nil { 886 return err 887 } 888 bi.BackupItemProperties = &backupItemProperties 889 } 890 case "id": 891 if v != nil { 892 var ID string 893 err = json.Unmarshal(*v, &ID) 894 if err != nil { 895 return err 896 } 897 bi.ID = &ID 898 } 899 case "name": 900 if v != nil { 901 var name string 902 err = json.Unmarshal(*v, &name) 903 if err != nil { 904 return err 905 } 906 bi.Name = &name 907 } 908 case "kind": 909 if v != nil { 910 var kind string 911 err = json.Unmarshal(*v, &kind) 912 if err != nil { 913 return err 914 } 915 bi.Kind = &kind 916 } 917 case "location": 918 if v != nil { 919 var location string 920 err = json.Unmarshal(*v, &location) 921 if err != nil { 922 return err 923 } 924 bi.Location = &location 925 } 926 case "type": 927 if v != nil { 928 var typeVar string 929 err = json.Unmarshal(*v, &typeVar) 930 if err != nil { 931 return err 932 } 933 bi.Type = &typeVar 934 } 935 case "tags": 936 if v != nil { 937 var tags map[string]*string 938 err = json.Unmarshal(*v, &tags) 939 if err != nil { 940 return err 941 } 942 bi.Tags = tags 943 } 944 } 945 } 946 947 return nil 948} 949 950// BackupItemCollection collection of Backup Items 951type BackupItemCollection struct { 952 autorest.Response `json:"-"` 953 // Value - Collection of resources 954 Value *[]BackupItem `json:"value,omitempty"` 955 // NextLink - Link to next page of resources 956 NextLink *string `json:"nextLink,omitempty"` 957} 958 959// BackupItemCollectionIterator provides access to a complete listing of BackupItem values. 960type BackupItemCollectionIterator struct { 961 i int 962 page BackupItemCollectionPage 963} 964 965// NextWithContext advances to the next value. If there was an error making 966// the request the iterator does not advance and the error is returned. 967func (iter *BackupItemCollectionIterator) NextWithContext(ctx context.Context) (err error) { 968 if tracing.IsEnabled() { 969 ctx = tracing.StartSpan(ctx, fqdn+"/BackupItemCollectionIterator.NextWithContext") 970 defer func() { 971 sc := -1 972 if iter.Response().Response.Response != nil { 973 sc = iter.Response().Response.Response.StatusCode 974 } 975 tracing.EndSpan(ctx, sc, err) 976 }() 977 } 978 iter.i++ 979 if iter.i < len(iter.page.Values()) { 980 return nil 981 } 982 err = iter.page.NextWithContext(ctx) 983 if err != nil { 984 iter.i-- 985 return err 986 } 987 iter.i = 0 988 return nil 989} 990 991// Next advances to the next value. If there was an error making 992// the request the iterator does not advance and the error is returned. 993// Deprecated: Use NextWithContext() instead. 994func (iter *BackupItemCollectionIterator) Next() error { 995 return iter.NextWithContext(context.Background()) 996} 997 998// NotDone returns true if the enumeration should be started or is not yet complete. 999func (iter BackupItemCollectionIterator) NotDone() bool { 1000 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 1001} 1002 1003// Response returns the raw server response from the last page request. 1004func (iter BackupItemCollectionIterator) Response() BackupItemCollection { 1005 return iter.page.Response() 1006} 1007 1008// Value returns the current value or a zero-initialized value if the 1009// iterator has advanced beyond the end of the collection. 1010func (iter BackupItemCollectionIterator) Value() BackupItem { 1011 if !iter.page.NotDone() { 1012 return BackupItem{} 1013 } 1014 return iter.page.Values()[iter.i] 1015} 1016 1017// Creates a new instance of the BackupItemCollectionIterator type. 1018func NewBackupItemCollectionIterator(page BackupItemCollectionPage) BackupItemCollectionIterator { 1019 return BackupItemCollectionIterator{page: page} 1020} 1021 1022// IsEmpty returns true if the ListResult contains no values. 1023func (bic BackupItemCollection) IsEmpty() bool { 1024 return bic.Value == nil || len(*bic.Value) == 0 1025} 1026 1027// hasNextLink returns true if the NextLink is not empty. 1028func (bic BackupItemCollection) hasNextLink() bool { 1029 return bic.NextLink != nil && len(*bic.NextLink) != 0 1030} 1031 1032// backupItemCollectionPreparer prepares a request to retrieve the next set of results. 1033// It returns nil if no more results exist. 1034func (bic BackupItemCollection) backupItemCollectionPreparer(ctx context.Context) (*http.Request, error) { 1035 if !bic.hasNextLink() { 1036 return nil, nil 1037 } 1038 return autorest.Prepare((&http.Request{}).WithContext(ctx), 1039 autorest.AsJSON(), 1040 autorest.AsGet(), 1041 autorest.WithBaseURL(to.String(bic.NextLink))) 1042} 1043 1044// BackupItemCollectionPage contains a page of BackupItem values. 1045type BackupItemCollectionPage struct { 1046 fn func(context.Context, BackupItemCollection) (BackupItemCollection, error) 1047 bic BackupItemCollection 1048} 1049 1050// NextWithContext advances to the next page of values. If there was an error making 1051// the request the page does not advance and the error is returned. 1052func (page *BackupItemCollectionPage) NextWithContext(ctx context.Context) (err error) { 1053 if tracing.IsEnabled() { 1054 ctx = tracing.StartSpan(ctx, fqdn+"/BackupItemCollectionPage.NextWithContext") 1055 defer func() { 1056 sc := -1 1057 if page.Response().Response.Response != nil { 1058 sc = page.Response().Response.Response.StatusCode 1059 } 1060 tracing.EndSpan(ctx, sc, err) 1061 }() 1062 } 1063 for { 1064 next, err := page.fn(ctx, page.bic) 1065 if err != nil { 1066 return err 1067 } 1068 page.bic = next 1069 if !next.hasNextLink() || !next.IsEmpty() { 1070 break 1071 } 1072 } 1073 return nil 1074} 1075 1076// Next 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. 1078// Deprecated: Use NextWithContext() instead. 1079func (page *BackupItemCollectionPage) Next() error { 1080 return page.NextWithContext(context.Background()) 1081} 1082 1083// NotDone returns true if the page enumeration should be started or is not yet complete. 1084func (page BackupItemCollectionPage) NotDone() bool { 1085 return !page.bic.IsEmpty() 1086} 1087 1088// Response returns the raw server response from the last page request. 1089func (page BackupItemCollectionPage) Response() BackupItemCollection { 1090 return page.bic 1091} 1092 1093// Values returns the slice of values for the current page or nil if there are no values. 1094func (page BackupItemCollectionPage) Values() []BackupItem { 1095 if page.bic.IsEmpty() { 1096 return nil 1097 } 1098 return *page.bic.Value 1099} 1100 1101// Creates a new instance of the BackupItemCollectionPage type. 1102func NewBackupItemCollectionPage(cur BackupItemCollection, getNextPage func(context.Context, BackupItemCollection) (BackupItemCollection, error)) BackupItemCollectionPage { 1103 return BackupItemCollectionPage{ 1104 fn: getNextPage, 1105 bic: cur, 1106 } 1107} 1108 1109// BackupItemProperties ... 1110type BackupItemProperties struct { 1111 // ID - Id of the backup. 1112 ID *int32 `json:"id,omitempty"` 1113 // StorageAccountURL - SAS URL for the storage account container which contains this backup 1114 StorageAccountURL *string `json:"storageAccountUrl,omitempty"` 1115 // BlobName - Name of the blob which contains data for this backup 1116 BlobName *string `json:"blobName,omitempty"` 1117 // Name - Name of this backup 1118 Name *string `json:"name,omitempty"` 1119 // Status - Backup status. Possible values include: 'InProgress', 'Failed', 'Succeeded', 'TimedOut', 'Created', 'Skipped', 'PartiallySucceeded', 'DeleteInProgress', 'DeleteFailed', 'Deleted' 1120 Status BackupItemStatus `json:"status,omitempty"` 1121 // SizeInBytes - Size of the backup in bytes 1122 SizeInBytes *int64 `json:"sizeInBytes,omitempty"` 1123 // Created - Timestamp of the backup creation 1124 Created *date.Time `json:"created,omitempty"` 1125 // Log - Details regarding this backup. Might contain an error message. 1126 Log *string `json:"log,omitempty"` 1127 // Databases - List of databases included in the backup 1128 Databases *[]DatabaseBackupSetting `json:"databases,omitempty"` 1129 // Scheduled - True if this backup has been created due to a schedule being triggered. 1130 Scheduled *bool `json:"scheduled,omitempty"` 1131 // LastRestoreTimeStamp - Timestamp of a last restore operation which used this backup. 1132 LastRestoreTimeStamp *date.Time `json:"lastRestoreTimeStamp,omitempty"` 1133 // FinishedTimeStamp - Timestamp when this backup finished. 1134 FinishedTimeStamp *date.Time `json:"finishedTimeStamp,omitempty"` 1135 // CorrelationID - Unique correlation identifier. Please use this along with the timestamp while communicating with Azure support. 1136 CorrelationID *string `json:"correlationId,omitempty"` 1137 // WebsiteSizeInBytes - Size of the original web app which has been backed up 1138 WebsiteSizeInBytes *int64 `json:"websiteSizeInBytes,omitempty"` 1139} 1140 1141// BackupRequest description of a backup which will be performed 1142type BackupRequest struct { 1143 autorest.Response `json:"-"` 1144 *BackupRequestProperties `json:"properties,omitempty"` 1145 // ID - Resource Id 1146 ID *string `json:"id,omitempty"` 1147 // Name - Resource Name 1148 Name *string `json:"name,omitempty"` 1149 // Kind - Kind of resource 1150 Kind *string `json:"kind,omitempty"` 1151 // Location - Resource Location 1152 Location *string `json:"location,omitempty"` 1153 // Type - Resource type 1154 Type *string `json:"type,omitempty"` 1155 // Tags - Resource tags 1156 Tags map[string]*string `json:"tags"` 1157} 1158 1159// MarshalJSON is the custom marshaler for BackupRequest. 1160func (br BackupRequest) MarshalJSON() ([]byte, error) { 1161 objectMap := make(map[string]interface{}) 1162 if br.BackupRequestProperties != nil { 1163 objectMap["properties"] = br.BackupRequestProperties 1164 } 1165 if br.ID != nil { 1166 objectMap["id"] = br.ID 1167 } 1168 if br.Name != nil { 1169 objectMap["name"] = br.Name 1170 } 1171 if br.Kind != nil { 1172 objectMap["kind"] = br.Kind 1173 } 1174 if br.Location != nil { 1175 objectMap["location"] = br.Location 1176 } 1177 if br.Type != nil { 1178 objectMap["type"] = br.Type 1179 } 1180 if br.Tags != nil { 1181 objectMap["tags"] = br.Tags 1182 } 1183 return json.Marshal(objectMap) 1184} 1185 1186// UnmarshalJSON is the custom unmarshaler for BackupRequest struct. 1187func (br *BackupRequest) UnmarshalJSON(body []byte) error { 1188 var m map[string]*json.RawMessage 1189 err := json.Unmarshal(body, &m) 1190 if err != nil { 1191 return err 1192 } 1193 for k, v := range m { 1194 switch k { 1195 case "properties": 1196 if v != nil { 1197 var backupRequestProperties BackupRequestProperties 1198 err = json.Unmarshal(*v, &backupRequestProperties) 1199 if err != nil { 1200 return err 1201 } 1202 br.BackupRequestProperties = &backupRequestProperties 1203 } 1204 case "id": 1205 if v != nil { 1206 var ID string 1207 err = json.Unmarshal(*v, &ID) 1208 if err != nil { 1209 return err 1210 } 1211 br.ID = &ID 1212 } 1213 case "name": 1214 if v != nil { 1215 var name string 1216 err = json.Unmarshal(*v, &name) 1217 if err != nil { 1218 return err 1219 } 1220 br.Name = &name 1221 } 1222 case "kind": 1223 if v != nil { 1224 var kind string 1225 err = json.Unmarshal(*v, &kind) 1226 if err != nil { 1227 return err 1228 } 1229 br.Kind = &kind 1230 } 1231 case "location": 1232 if v != nil { 1233 var location string 1234 err = json.Unmarshal(*v, &location) 1235 if err != nil { 1236 return err 1237 } 1238 br.Location = &location 1239 } 1240 case "type": 1241 if v != nil { 1242 var typeVar string 1243 err = json.Unmarshal(*v, &typeVar) 1244 if err != nil { 1245 return err 1246 } 1247 br.Type = &typeVar 1248 } 1249 case "tags": 1250 if v != nil { 1251 var tags map[string]*string 1252 err = json.Unmarshal(*v, &tags) 1253 if err != nil { 1254 return err 1255 } 1256 br.Tags = tags 1257 } 1258 } 1259 } 1260 1261 return nil 1262} 1263 1264// BackupRequestProperties ... 1265type BackupRequestProperties struct { 1266 // Name - Name of the backup 1267 Name *string `json:"name,omitempty"` 1268 // Enabled - True if the backup schedule is enabled (must be included in that case), false if the backup schedule should be disabled 1269 Enabled *bool `json:"enabled,omitempty"` 1270 // StorageAccountURL - SAS URL to the container 1271 StorageAccountURL *string `json:"storageAccountUrl,omitempty"` 1272 // BackupSchedule - Schedule for the backup if it is executed periodically 1273 BackupSchedule *BackupSchedule `json:"backupSchedule,omitempty"` 1274 // Databases - Databases included in the backup 1275 Databases *[]DatabaseBackupSetting `json:"databases,omitempty"` 1276 // Type - Type of the backup. Possible values include: 'Default', 'Clone', 'Relocation' 1277 Type BackupRestoreOperationType `json:"type,omitempty"` 1278} 1279 1280// BackupSchedule description of a backup schedule. Describes how often should be the backup performed and 1281// what should be the retention policy. 1282type BackupSchedule struct { 1283 // FrequencyInterval - How often should be the backup executed (e.g. for weekly backup, this should be set to 7 and FrequencyUnit should be set to Day) 1284 FrequencyInterval *int32 `json:"frequencyInterval,omitempty"` 1285 // FrequencyUnit - How often should be the backup executed (e.g. for weekly backup, this should be set to Day and FrequencyInterval should be set to 7). Possible values include: 'Day', 'Hour' 1286 FrequencyUnit FrequencyUnit `json:"frequencyUnit,omitempty"` 1287 // KeepAtLeastOneBackup - True if the retention policy should always keep at least one backup in the storage account, regardless how old it is; false otherwise. 1288 KeepAtLeastOneBackup *bool `json:"keepAtLeastOneBackup,omitempty"` 1289 // RetentionPeriodInDays - After how many days backups should be deleted 1290 RetentionPeriodInDays *int32 `json:"retentionPeriodInDays,omitempty"` 1291 // StartTime - When the schedule should start working 1292 StartTime *date.Time `json:"startTime,omitempty"` 1293 // LastExecutionTime - The last time when this schedule was triggered 1294 LastExecutionTime *date.Time `json:"lastExecutionTime,omitempty"` 1295} 1296 1297// Certificate app certificate 1298type Certificate struct { 1299 autorest.Response `json:"-"` 1300 *CertificateProperties `json:"properties,omitempty"` 1301 // ID - Resource Id 1302 ID *string `json:"id,omitempty"` 1303 // Name - Resource Name 1304 Name *string `json:"name,omitempty"` 1305 // Kind - Kind of resource 1306 Kind *string `json:"kind,omitempty"` 1307 // Location - Resource Location 1308 Location *string `json:"location,omitempty"` 1309 // Type - Resource type 1310 Type *string `json:"type,omitempty"` 1311 // Tags - Resource tags 1312 Tags map[string]*string `json:"tags"` 1313} 1314 1315// MarshalJSON is the custom marshaler for Certificate. 1316func (c Certificate) MarshalJSON() ([]byte, error) { 1317 objectMap := make(map[string]interface{}) 1318 if c.CertificateProperties != nil { 1319 objectMap["properties"] = c.CertificateProperties 1320 } 1321 if c.ID != nil { 1322 objectMap["id"] = c.ID 1323 } 1324 if c.Name != nil { 1325 objectMap["name"] = c.Name 1326 } 1327 if c.Kind != nil { 1328 objectMap["kind"] = c.Kind 1329 } 1330 if c.Location != nil { 1331 objectMap["location"] = c.Location 1332 } 1333 if c.Type != nil { 1334 objectMap["type"] = c.Type 1335 } 1336 if c.Tags != nil { 1337 objectMap["tags"] = c.Tags 1338 } 1339 return json.Marshal(objectMap) 1340} 1341 1342// UnmarshalJSON is the custom unmarshaler for Certificate struct. 1343func (c *Certificate) UnmarshalJSON(body []byte) error { 1344 var m map[string]*json.RawMessage 1345 err := json.Unmarshal(body, &m) 1346 if err != nil { 1347 return err 1348 } 1349 for k, v := range m { 1350 switch k { 1351 case "properties": 1352 if v != nil { 1353 var certificateProperties CertificateProperties 1354 err = json.Unmarshal(*v, &certificateProperties) 1355 if err != nil { 1356 return err 1357 } 1358 c.CertificateProperties = &certificateProperties 1359 } 1360 case "id": 1361 if v != nil { 1362 var ID string 1363 err = json.Unmarshal(*v, &ID) 1364 if err != nil { 1365 return err 1366 } 1367 c.ID = &ID 1368 } 1369 case "name": 1370 if v != nil { 1371 var name string 1372 err = json.Unmarshal(*v, &name) 1373 if err != nil { 1374 return err 1375 } 1376 c.Name = &name 1377 } 1378 case "kind": 1379 if v != nil { 1380 var kind string 1381 err = json.Unmarshal(*v, &kind) 1382 if err != nil { 1383 return err 1384 } 1385 c.Kind = &kind 1386 } 1387 case "location": 1388 if v != nil { 1389 var location string 1390 err = json.Unmarshal(*v, &location) 1391 if err != nil { 1392 return err 1393 } 1394 c.Location = &location 1395 } 1396 case "type": 1397 if v != nil { 1398 var typeVar string 1399 err = json.Unmarshal(*v, &typeVar) 1400 if err != nil { 1401 return err 1402 } 1403 c.Type = &typeVar 1404 } 1405 case "tags": 1406 if v != nil { 1407 var tags map[string]*string 1408 err = json.Unmarshal(*v, &tags) 1409 if err != nil { 1410 return err 1411 } 1412 c.Tags = tags 1413 } 1414 } 1415 } 1416 1417 return nil 1418} 1419 1420// CertificateCollection collection of certificates 1421type CertificateCollection struct { 1422 autorest.Response `json:"-"` 1423 // Value - Collection of resources 1424 Value *[]Certificate `json:"value,omitempty"` 1425 // NextLink - Link to next page of resources 1426 NextLink *string `json:"nextLink,omitempty"` 1427} 1428 1429// CertificateCollectionIterator provides access to a complete listing of Certificate values. 1430type CertificateCollectionIterator struct { 1431 i int 1432 page CertificateCollectionPage 1433} 1434 1435// NextWithContext advances to the next value. If there was an error making 1436// the request the iterator does not advance and the error is returned. 1437func (iter *CertificateCollectionIterator) NextWithContext(ctx context.Context) (err error) { 1438 if tracing.IsEnabled() { 1439 ctx = tracing.StartSpan(ctx, fqdn+"/CertificateCollectionIterator.NextWithContext") 1440 defer func() { 1441 sc := -1 1442 if iter.Response().Response.Response != nil { 1443 sc = iter.Response().Response.Response.StatusCode 1444 } 1445 tracing.EndSpan(ctx, sc, err) 1446 }() 1447 } 1448 iter.i++ 1449 if iter.i < len(iter.page.Values()) { 1450 return nil 1451 } 1452 err = iter.page.NextWithContext(ctx) 1453 if err != nil { 1454 iter.i-- 1455 return err 1456 } 1457 iter.i = 0 1458 return nil 1459} 1460 1461// Next advances to the next value. If there was an error making 1462// the request the iterator does not advance and the error is returned. 1463// Deprecated: Use NextWithContext() instead. 1464func (iter *CertificateCollectionIterator) Next() error { 1465 return iter.NextWithContext(context.Background()) 1466} 1467 1468// NotDone returns true if the enumeration should be started or is not yet complete. 1469func (iter CertificateCollectionIterator) NotDone() bool { 1470 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 1471} 1472 1473// Response returns the raw server response from the last page request. 1474func (iter CertificateCollectionIterator) Response() CertificateCollection { 1475 return iter.page.Response() 1476} 1477 1478// Value returns the current value or a zero-initialized value if the 1479// iterator has advanced beyond the end of the collection. 1480func (iter CertificateCollectionIterator) Value() Certificate { 1481 if !iter.page.NotDone() { 1482 return Certificate{} 1483 } 1484 return iter.page.Values()[iter.i] 1485} 1486 1487// Creates a new instance of the CertificateCollectionIterator type. 1488func NewCertificateCollectionIterator(page CertificateCollectionPage) CertificateCollectionIterator { 1489 return CertificateCollectionIterator{page: page} 1490} 1491 1492// IsEmpty returns true if the ListResult contains no values. 1493func (cc CertificateCollection) IsEmpty() bool { 1494 return cc.Value == nil || len(*cc.Value) == 0 1495} 1496 1497// hasNextLink returns true if the NextLink is not empty. 1498func (cc CertificateCollection) hasNextLink() bool { 1499 return cc.NextLink != nil && len(*cc.NextLink) != 0 1500} 1501 1502// certificateCollectionPreparer prepares a request to retrieve the next set of results. 1503// It returns nil if no more results exist. 1504func (cc CertificateCollection) certificateCollectionPreparer(ctx context.Context) (*http.Request, error) { 1505 if !cc.hasNextLink() { 1506 return nil, nil 1507 } 1508 return autorest.Prepare((&http.Request{}).WithContext(ctx), 1509 autorest.AsJSON(), 1510 autorest.AsGet(), 1511 autorest.WithBaseURL(to.String(cc.NextLink))) 1512} 1513 1514// CertificateCollectionPage contains a page of Certificate values. 1515type CertificateCollectionPage struct { 1516 fn func(context.Context, CertificateCollection) (CertificateCollection, error) 1517 cc CertificateCollection 1518} 1519 1520// NextWithContext advances to the next page of values. If there was an error making 1521// the request the page does not advance and the error is returned. 1522func (page *CertificateCollectionPage) NextWithContext(ctx context.Context) (err error) { 1523 if tracing.IsEnabled() { 1524 ctx = tracing.StartSpan(ctx, fqdn+"/CertificateCollectionPage.NextWithContext") 1525 defer func() { 1526 sc := -1 1527 if page.Response().Response.Response != nil { 1528 sc = page.Response().Response.Response.StatusCode 1529 } 1530 tracing.EndSpan(ctx, sc, err) 1531 }() 1532 } 1533 for { 1534 next, err := page.fn(ctx, page.cc) 1535 if err != nil { 1536 return err 1537 } 1538 page.cc = next 1539 if !next.hasNextLink() || !next.IsEmpty() { 1540 break 1541 } 1542 } 1543 return nil 1544} 1545 1546// Next advances to the next page of values. If there was an error making 1547// the request the page does not advance and the error is returned. 1548// Deprecated: Use NextWithContext() instead. 1549func (page *CertificateCollectionPage) Next() error { 1550 return page.NextWithContext(context.Background()) 1551} 1552 1553// NotDone returns true if the page enumeration should be started or is not yet complete. 1554func (page CertificateCollectionPage) NotDone() bool { 1555 return !page.cc.IsEmpty() 1556} 1557 1558// Response returns the raw server response from the last page request. 1559func (page CertificateCollectionPage) Response() CertificateCollection { 1560 return page.cc 1561} 1562 1563// Values returns the slice of values for the current page or nil if there are no values. 1564func (page CertificateCollectionPage) Values() []Certificate { 1565 if page.cc.IsEmpty() { 1566 return nil 1567 } 1568 return *page.cc.Value 1569} 1570 1571// Creates a new instance of the CertificateCollectionPage type. 1572func NewCertificateCollectionPage(cur CertificateCollection, getNextPage func(context.Context, CertificateCollection) (CertificateCollection, error)) CertificateCollectionPage { 1573 return CertificateCollectionPage{ 1574 fn: getNextPage, 1575 cc: cur, 1576 } 1577} 1578 1579// CertificateDetails certificate Details 1580type CertificateDetails struct { 1581 *CertificateDetailsProperties `json:"properties,omitempty"` 1582 // ID - Resource Id 1583 ID *string `json:"id,omitempty"` 1584 // Name - Resource Name 1585 Name *string `json:"name,omitempty"` 1586 // Kind - Kind of resource 1587 Kind *string `json:"kind,omitempty"` 1588 // Location - Resource Location 1589 Location *string `json:"location,omitempty"` 1590 // Type - Resource type 1591 Type *string `json:"type,omitempty"` 1592 // Tags - Resource tags 1593 Tags map[string]*string `json:"tags"` 1594} 1595 1596// MarshalJSON is the custom marshaler for CertificateDetails. 1597func (cd CertificateDetails) MarshalJSON() ([]byte, error) { 1598 objectMap := make(map[string]interface{}) 1599 if cd.CertificateDetailsProperties != nil { 1600 objectMap["properties"] = cd.CertificateDetailsProperties 1601 } 1602 if cd.ID != nil { 1603 objectMap["id"] = cd.ID 1604 } 1605 if cd.Name != nil { 1606 objectMap["name"] = cd.Name 1607 } 1608 if cd.Kind != nil { 1609 objectMap["kind"] = cd.Kind 1610 } 1611 if cd.Location != nil { 1612 objectMap["location"] = cd.Location 1613 } 1614 if cd.Type != nil { 1615 objectMap["type"] = cd.Type 1616 } 1617 if cd.Tags != nil { 1618 objectMap["tags"] = cd.Tags 1619 } 1620 return json.Marshal(objectMap) 1621} 1622 1623// UnmarshalJSON is the custom unmarshaler for CertificateDetails struct. 1624func (cd *CertificateDetails) UnmarshalJSON(body []byte) error { 1625 var m map[string]*json.RawMessage 1626 err := json.Unmarshal(body, &m) 1627 if err != nil { 1628 return err 1629 } 1630 for k, v := range m { 1631 switch k { 1632 case "properties": 1633 if v != nil { 1634 var certificateDetailsProperties CertificateDetailsProperties 1635 err = json.Unmarshal(*v, &certificateDetailsProperties) 1636 if err != nil { 1637 return err 1638 } 1639 cd.CertificateDetailsProperties = &certificateDetailsProperties 1640 } 1641 case "id": 1642 if v != nil { 1643 var ID string 1644 err = json.Unmarshal(*v, &ID) 1645 if err != nil { 1646 return err 1647 } 1648 cd.ID = &ID 1649 } 1650 case "name": 1651 if v != nil { 1652 var name string 1653 err = json.Unmarshal(*v, &name) 1654 if err != nil { 1655 return err 1656 } 1657 cd.Name = &name 1658 } 1659 case "kind": 1660 if v != nil { 1661 var kind string 1662 err = json.Unmarshal(*v, &kind) 1663 if err != nil { 1664 return err 1665 } 1666 cd.Kind = &kind 1667 } 1668 case "location": 1669 if v != nil { 1670 var location string 1671 err = json.Unmarshal(*v, &location) 1672 if err != nil { 1673 return err 1674 } 1675 cd.Location = &location 1676 } 1677 case "type": 1678 if v != nil { 1679 var typeVar string 1680 err = json.Unmarshal(*v, &typeVar) 1681 if err != nil { 1682 return err 1683 } 1684 cd.Type = &typeVar 1685 } 1686 case "tags": 1687 if v != nil { 1688 var tags map[string]*string 1689 err = json.Unmarshal(*v, &tags) 1690 if err != nil { 1691 return err 1692 } 1693 cd.Tags = tags 1694 } 1695 } 1696 } 1697 1698 return nil 1699} 1700 1701// CertificateDetailsProperties ... 1702type CertificateDetailsProperties struct { 1703 // Version - Version 1704 Version *int32 `json:"version,omitempty"` 1705 // SerialNumber - Serial Number 1706 SerialNumber *string `json:"serialNumber,omitempty"` 1707 // Thumbprint - Thumbprint 1708 Thumbprint *string `json:"thumbprint,omitempty"` 1709 // Subject - Subject 1710 Subject *string `json:"subject,omitempty"` 1711 // NotBefore - Valid from 1712 NotBefore *date.Time `json:"notBefore,omitempty"` 1713 // NotAfter - Valid to 1714 NotAfter *date.Time `json:"notAfter,omitempty"` 1715 // SignatureAlgorithm - Signature Algorithm 1716 SignatureAlgorithm *string `json:"signatureAlgorithm,omitempty"` 1717 // Issuer - Issuer 1718 Issuer *string `json:"issuer,omitempty"` 1719 // RawData - Raw certificate data 1720 RawData *string `json:"rawData,omitempty"` 1721} 1722 1723// CertificateEmail certificate Email 1724type CertificateEmail struct { 1725 *CertificateEmailProperties `json:"properties,omitempty"` 1726 // ID - Resource Id 1727 ID *string `json:"id,omitempty"` 1728 // Name - Resource Name 1729 Name *string `json:"name,omitempty"` 1730 // Kind - Kind of resource 1731 Kind *string `json:"kind,omitempty"` 1732 // Location - Resource Location 1733 Location *string `json:"location,omitempty"` 1734 // Type - Resource type 1735 Type *string `json:"type,omitempty"` 1736 // Tags - Resource tags 1737 Tags map[string]*string `json:"tags"` 1738} 1739 1740// MarshalJSON is the custom marshaler for CertificateEmail. 1741func (ce CertificateEmail) MarshalJSON() ([]byte, error) { 1742 objectMap := make(map[string]interface{}) 1743 if ce.CertificateEmailProperties != nil { 1744 objectMap["properties"] = ce.CertificateEmailProperties 1745 } 1746 if ce.ID != nil { 1747 objectMap["id"] = ce.ID 1748 } 1749 if ce.Name != nil { 1750 objectMap["name"] = ce.Name 1751 } 1752 if ce.Kind != nil { 1753 objectMap["kind"] = ce.Kind 1754 } 1755 if ce.Location != nil { 1756 objectMap["location"] = ce.Location 1757 } 1758 if ce.Type != nil { 1759 objectMap["type"] = ce.Type 1760 } 1761 if ce.Tags != nil { 1762 objectMap["tags"] = ce.Tags 1763 } 1764 return json.Marshal(objectMap) 1765} 1766 1767// UnmarshalJSON is the custom unmarshaler for CertificateEmail struct. 1768func (ce *CertificateEmail) UnmarshalJSON(body []byte) error { 1769 var m map[string]*json.RawMessage 1770 err := json.Unmarshal(body, &m) 1771 if err != nil { 1772 return err 1773 } 1774 for k, v := range m { 1775 switch k { 1776 case "properties": 1777 if v != nil { 1778 var certificateEmailProperties CertificateEmailProperties 1779 err = json.Unmarshal(*v, &certificateEmailProperties) 1780 if err != nil { 1781 return err 1782 } 1783 ce.CertificateEmailProperties = &certificateEmailProperties 1784 } 1785 case "id": 1786 if v != nil { 1787 var ID string 1788 err = json.Unmarshal(*v, &ID) 1789 if err != nil { 1790 return err 1791 } 1792 ce.ID = &ID 1793 } 1794 case "name": 1795 if v != nil { 1796 var name string 1797 err = json.Unmarshal(*v, &name) 1798 if err != nil { 1799 return err 1800 } 1801 ce.Name = &name 1802 } 1803 case "kind": 1804 if v != nil { 1805 var kind string 1806 err = json.Unmarshal(*v, &kind) 1807 if err != nil { 1808 return err 1809 } 1810 ce.Kind = &kind 1811 } 1812 case "location": 1813 if v != nil { 1814 var location string 1815 err = json.Unmarshal(*v, &location) 1816 if err != nil { 1817 return err 1818 } 1819 ce.Location = &location 1820 } 1821 case "type": 1822 if v != nil { 1823 var typeVar string 1824 err = json.Unmarshal(*v, &typeVar) 1825 if err != nil { 1826 return err 1827 } 1828 ce.Type = &typeVar 1829 } 1830 case "tags": 1831 if v != nil { 1832 var tags map[string]*string 1833 err = json.Unmarshal(*v, &tags) 1834 if err != nil { 1835 return err 1836 } 1837 ce.Tags = tags 1838 } 1839 } 1840 } 1841 1842 return nil 1843} 1844 1845// CertificateEmailProperties ... 1846type CertificateEmailProperties struct { 1847 // EmailID - Email id 1848 EmailID *string `json:"emailId,omitempty"` 1849 // TimeStamp - Time stamp 1850 TimeStamp *date.Time `json:"timeStamp,omitempty"` 1851} 1852 1853// CertificateOrder certificate purchase order 1854type CertificateOrder struct { 1855 autorest.Response `json:"-"` 1856 *CertificateOrderProperties `json:"properties,omitempty"` 1857 // ID - Resource Id 1858 ID *string `json:"id,omitempty"` 1859 // Name - Resource Name 1860 Name *string `json:"name,omitempty"` 1861 // Kind - Kind of resource 1862 Kind *string `json:"kind,omitempty"` 1863 // Location - Resource Location 1864 Location *string `json:"location,omitempty"` 1865 // Type - Resource type 1866 Type *string `json:"type,omitempty"` 1867 // Tags - Resource tags 1868 Tags map[string]*string `json:"tags"` 1869} 1870 1871// MarshalJSON is the custom marshaler for CertificateOrder. 1872func (co CertificateOrder) MarshalJSON() ([]byte, error) { 1873 objectMap := make(map[string]interface{}) 1874 if co.CertificateOrderProperties != nil { 1875 objectMap["properties"] = co.CertificateOrderProperties 1876 } 1877 if co.ID != nil { 1878 objectMap["id"] = co.ID 1879 } 1880 if co.Name != nil { 1881 objectMap["name"] = co.Name 1882 } 1883 if co.Kind != nil { 1884 objectMap["kind"] = co.Kind 1885 } 1886 if co.Location != nil { 1887 objectMap["location"] = co.Location 1888 } 1889 if co.Type != nil { 1890 objectMap["type"] = co.Type 1891 } 1892 if co.Tags != nil { 1893 objectMap["tags"] = co.Tags 1894 } 1895 return json.Marshal(objectMap) 1896} 1897 1898// UnmarshalJSON is the custom unmarshaler for CertificateOrder struct. 1899func (co *CertificateOrder) UnmarshalJSON(body []byte) error { 1900 var m map[string]*json.RawMessage 1901 err := json.Unmarshal(body, &m) 1902 if err != nil { 1903 return err 1904 } 1905 for k, v := range m { 1906 switch k { 1907 case "properties": 1908 if v != nil { 1909 var certificateOrderProperties CertificateOrderProperties 1910 err = json.Unmarshal(*v, &certificateOrderProperties) 1911 if err != nil { 1912 return err 1913 } 1914 co.CertificateOrderProperties = &certificateOrderProperties 1915 } 1916 case "id": 1917 if v != nil { 1918 var ID string 1919 err = json.Unmarshal(*v, &ID) 1920 if err != nil { 1921 return err 1922 } 1923 co.ID = &ID 1924 } 1925 case "name": 1926 if v != nil { 1927 var name string 1928 err = json.Unmarshal(*v, &name) 1929 if err != nil { 1930 return err 1931 } 1932 co.Name = &name 1933 } 1934 case "kind": 1935 if v != nil { 1936 var kind string 1937 err = json.Unmarshal(*v, &kind) 1938 if err != nil { 1939 return err 1940 } 1941 co.Kind = &kind 1942 } 1943 case "location": 1944 if v != nil { 1945 var location string 1946 err = json.Unmarshal(*v, &location) 1947 if err != nil { 1948 return err 1949 } 1950 co.Location = &location 1951 } 1952 case "type": 1953 if v != nil { 1954 var typeVar string 1955 err = json.Unmarshal(*v, &typeVar) 1956 if err != nil { 1957 return err 1958 } 1959 co.Type = &typeVar 1960 } 1961 case "tags": 1962 if v != nil { 1963 var tags map[string]*string 1964 err = json.Unmarshal(*v, &tags) 1965 if err != nil { 1966 return err 1967 } 1968 co.Tags = tags 1969 } 1970 } 1971 } 1972 1973 return nil 1974} 1975 1976// CertificateOrderAction represents a certificate action 1977type CertificateOrderAction struct { 1978 *CertificateOrderActionProperties `json:"properties,omitempty"` 1979 // ID - Resource Id 1980 ID *string `json:"id,omitempty"` 1981 // Name - Resource Name 1982 Name *string `json:"name,omitempty"` 1983 // Kind - Kind of resource 1984 Kind *string `json:"kind,omitempty"` 1985 // Location - Resource Location 1986 Location *string `json:"location,omitempty"` 1987 // Type - Resource type 1988 Type *string `json:"type,omitempty"` 1989 // Tags - Resource tags 1990 Tags map[string]*string `json:"tags"` 1991} 1992 1993// MarshalJSON is the custom marshaler for CertificateOrderAction. 1994func (coa CertificateOrderAction) MarshalJSON() ([]byte, error) { 1995 objectMap := make(map[string]interface{}) 1996 if coa.CertificateOrderActionProperties != nil { 1997 objectMap["properties"] = coa.CertificateOrderActionProperties 1998 } 1999 if coa.ID != nil { 2000 objectMap["id"] = coa.ID 2001 } 2002 if coa.Name != nil { 2003 objectMap["name"] = coa.Name 2004 } 2005 if coa.Kind != nil { 2006 objectMap["kind"] = coa.Kind 2007 } 2008 if coa.Location != nil { 2009 objectMap["location"] = coa.Location 2010 } 2011 if coa.Type != nil { 2012 objectMap["type"] = coa.Type 2013 } 2014 if coa.Tags != nil { 2015 objectMap["tags"] = coa.Tags 2016 } 2017 return json.Marshal(objectMap) 2018} 2019 2020// UnmarshalJSON is the custom unmarshaler for CertificateOrderAction struct. 2021func (coa *CertificateOrderAction) UnmarshalJSON(body []byte) error { 2022 var m map[string]*json.RawMessage 2023 err := json.Unmarshal(body, &m) 2024 if err != nil { 2025 return err 2026 } 2027 for k, v := range m { 2028 switch k { 2029 case "properties": 2030 if v != nil { 2031 var certificateOrderActionProperties CertificateOrderActionProperties 2032 err = json.Unmarshal(*v, &certificateOrderActionProperties) 2033 if err != nil { 2034 return err 2035 } 2036 coa.CertificateOrderActionProperties = &certificateOrderActionProperties 2037 } 2038 case "id": 2039 if v != nil { 2040 var ID string 2041 err = json.Unmarshal(*v, &ID) 2042 if err != nil { 2043 return err 2044 } 2045 coa.ID = &ID 2046 } 2047 case "name": 2048 if v != nil { 2049 var name string 2050 err = json.Unmarshal(*v, &name) 2051 if err != nil { 2052 return err 2053 } 2054 coa.Name = &name 2055 } 2056 case "kind": 2057 if v != nil { 2058 var kind string 2059 err = json.Unmarshal(*v, &kind) 2060 if err != nil { 2061 return err 2062 } 2063 coa.Kind = &kind 2064 } 2065 case "location": 2066 if v != nil { 2067 var location string 2068 err = json.Unmarshal(*v, &location) 2069 if err != nil { 2070 return err 2071 } 2072 coa.Location = &location 2073 } 2074 case "type": 2075 if v != nil { 2076 var typeVar string 2077 err = json.Unmarshal(*v, &typeVar) 2078 if err != nil { 2079 return err 2080 } 2081 coa.Type = &typeVar 2082 } 2083 case "tags": 2084 if v != nil { 2085 var tags map[string]*string 2086 err = json.Unmarshal(*v, &tags) 2087 if err != nil { 2088 return err 2089 } 2090 coa.Tags = tags 2091 } 2092 } 2093 } 2094 2095 return nil 2096} 2097 2098// CertificateOrderActionProperties ... 2099type CertificateOrderActionProperties struct { 2100 // Type - Type. Possible values include: 'CertificateIssued', 'CertificateOrderCanceled', 'CertificateOrderCreated', 'CertificateRevoked', 'DomainValidationComplete', 'FraudDetected', 'OrgNameChange', 'OrgValidationComplete', 'SanDrop' 2101 Type CertificateOrderActionType `json:"type,omitempty"` 2102 // CreatedAt - Time at which the certificate action was performed 2103 CreatedAt *date.Time `json:"createdAt,omitempty"` 2104} 2105 2106// CertificateOrderCertificate class representing the Key Vault container for certificate purchased through 2107// Azure 2108type CertificateOrderCertificate struct { 2109 autorest.Response `json:"-"` 2110 *CertificateOrderCertificateProperties `json:"properties,omitempty"` 2111 // ID - Resource Id 2112 ID *string `json:"id,omitempty"` 2113 // Name - Resource Name 2114 Name *string `json:"name,omitempty"` 2115 // Kind - Kind of resource 2116 Kind *string `json:"kind,omitempty"` 2117 // Location - Resource Location 2118 Location *string `json:"location,omitempty"` 2119 // Type - Resource type 2120 Type *string `json:"type,omitempty"` 2121 // Tags - Resource tags 2122 Tags map[string]*string `json:"tags"` 2123} 2124 2125// MarshalJSON is the custom marshaler for CertificateOrderCertificate. 2126func (coc CertificateOrderCertificate) MarshalJSON() ([]byte, error) { 2127 objectMap := make(map[string]interface{}) 2128 if coc.CertificateOrderCertificateProperties != nil { 2129 objectMap["properties"] = coc.CertificateOrderCertificateProperties 2130 } 2131 if coc.ID != nil { 2132 objectMap["id"] = coc.ID 2133 } 2134 if coc.Name != nil { 2135 objectMap["name"] = coc.Name 2136 } 2137 if coc.Kind != nil { 2138 objectMap["kind"] = coc.Kind 2139 } 2140 if coc.Location != nil { 2141 objectMap["location"] = coc.Location 2142 } 2143 if coc.Type != nil { 2144 objectMap["type"] = coc.Type 2145 } 2146 if coc.Tags != nil { 2147 objectMap["tags"] = coc.Tags 2148 } 2149 return json.Marshal(objectMap) 2150} 2151 2152// UnmarshalJSON is the custom unmarshaler for CertificateOrderCertificate struct. 2153func (coc *CertificateOrderCertificate) UnmarshalJSON(body []byte) error { 2154 var m map[string]*json.RawMessage 2155 err := json.Unmarshal(body, &m) 2156 if err != nil { 2157 return err 2158 } 2159 for k, v := range m { 2160 switch k { 2161 case "properties": 2162 if v != nil { 2163 var certificateOrderCertificateProperties CertificateOrderCertificateProperties 2164 err = json.Unmarshal(*v, &certificateOrderCertificateProperties) 2165 if err != nil { 2166 return err 2167 } 2168 coc.CertificateOrderCertificateProperties = &certificateOrderCertificateProperties 2169 } 2170 case "id": 2171 if v != nil { 2172 var ID string 2173 err = json.Unmarshal(*v, &ID) 2174 if err != nil { 2175 return err 2176 } 2177 coc.ID = &ID 2178 } 2179 case "name": 2180 if v != nil { 2181 var name string 2182 err = json.Unmarshal(*v, &name) 2183 if err != nil { 2184 return err 2185 } 2186 coc.Name = &name 2187 } 2188 case "kind": 2189 if v != nil { 2190 var kind string 2191 err = json.Unmarshal(*v, &kind) 2192 if err != nil { 2193 return err 2194 } 2195 coc.Kind = &kind 2196 } 2197 case "location": 2198 if v != nil { 2199 var location string 2200 err = json.Unmarshal(*v, &location) 2201 if err != nil { 2202 return err 2203 } 2204 coc.Location = &location 2205 } 2206 case "type": 2207 if v != nil { 2208 var typeVar string 2209 err = json.Unmarshal(*v, &typeVar) 2210 if err != nil { 2211 return err 2212 } 2213 coc.Type = &typeVar 2214 } 2215 case "tags": 2216 if v != nil { 2217 var tags map[string]*string 2218 err = json.Unmarshal(*v, &tags) 2219 if err != nil { 2220 return err 2221 } 2222 coc.Tags = tags 2223 } 2224 } 2225 } 2226 2227 return nil 2228} 2229 2230// CertificateOrderCertificateCollection collection of certificate order certificates 2231type CertificateOrderCertificateCollection struct { 2232 autorest.Response `json:"-"` 2233 // Value - Collection of resources 2234 Value *[]CertificateOrderCertificate `json:"value,omitempty"` 2235 // NextLink - Link to next page of resources 2236 NextLink *string `json:"nextLink,omitempty"` 2237} 2238 2239// CertificateOrderCertificateCollectionIterator provides access to a complete listing of 2240// CertificateOrderCertificate values. 2241type CertificateOrderCertificateCollectionIterator struct { 2242 i int 2243 page CertificateOrderCertificateCollectionPage 2244} 2245 2246// NextWithContext advances to the next value. If there was an error making 2247// the request the iterator does not advance and the error is returned. 2248func (iter *CertificateOrderCertificateCollectionIterator) NextWithContext(ctx context.Context) (err error) { 2249 if tracing.IsEnabled() { 2250 ctx = tracing.StartSpan(ctx, fqdn+"/CertificateOrderCertificateCollectionIterator.NextWithContext") 2251 defer func() { 2252 sc := -1 2253 if iter.Response().Response.Response != nil { 2254 sc = iter.Response().Response.Response.StatusCode 2255 } 2256 tracing.EndSpan(ctx, sc, err) 2257 }() 2258 } 2259 iter.i++ 2260 if iter.i < len(iter.page.Values()) { 2261 return nil 2262 } 2263 err = iter.page.NextWithContext(ctx) 2264 if err != nil { 2265 iter.i-- 2266 return err 2267 } 2268 iter.i = 0 2269 return nil 2270} 2271 2272// Next advances to the next value. If there was an error making 2273// the request the iterator does not advance and the error is returned. 2274// Deprecated: Use NextWithContext() instead. 2275func (iter *CertificateOrderCertificateCollectionIterator) Next() error { 2276 return iter.NextWithContext(context.Background()) 2277} 2278 2279// NotDone returns true if the enumeration should be started or is not yet complete. 2280func (iter CertificateOrderCertificateCollectionIterator) NotDone() bool { 2281 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 2282} 2283 2284// Response returns the raw server response from the last page request. 2285func (iter CertificateOrderCertificateCollectionIterator) Response() CertificateOrderCertificateCollection { 2286 return iter.page.Response() 2287} 2288 2289// Value returns the current value or a zero-initialized value if the 2290// iterator has advanced beyond the end of the collection. 2291func (iter CertificateOrderCertificateCollectionIterator) Value() CertificateOrderCertificate { 2292 if !iter.page.NotDone() { 2293 return CertificateOrderCertificate{} 2294 } 2295 return iter.page.Values()[iter.i] 2296} 2297 2298// Creates a new instance of the CertificateOrderCertificateCollectionIterator type. 2299func NewCertificateOrderCertificateCollectionIterator(page CertificateOrderCertificateCollectionPage) CertificateOrderCertificateCollectionIterator { 2300 return CertificateOrderCertificateCollectionIterator{page: page} 2301} 2302 2303// IsEmpty returns true if the ListResult contains no values. 2304func (cocc CertificateOrderCertificateCollection) IsEmpty() bool { 2305 return cocc.Value == nil || len(*cocc.Value) == 0 2306} 2307 2308// hasNextLink returns true if the NextLink is not empty. 2309func (cocc CertificateOrderCertificateCollection) hasNextLink() bool { 2310 return cocc.NextLink != nil && len(*cocc.NextLink) != 0 2311} 2312 2313// certificateOrderCertificateCollectionPreparer prepares a request to retrieve the next set of results. 2314// It returns nil if no more results exist. 2315func (cocc CertificateOrderCertificateCollection) certificateOrderCertificateCollectionPreparer(ctx context.Context) (*http.Request, error) { 2316 if !cocc.hasNextLink() { 2317 return nil, nil 2318 } 2319 return autorest.Prepare((&http.Request{}).WithContext(ctx), 2320 autorest.AsJSON(), 2321 autorest.AsGet(), 2322 autorest.WithBaseURL(to.String(cocc.NextLink))) 2323} 2324 2325// CertificateOrderCertificateCollectionPage contains a page of CertificateOrderCertificate values. 2326type CertificateOrderCertificateCollectionPage struct { 2327 fn func(context.Context, CertificateOrderCertificateCollection) (CertificateOrderCertificateCollection, error) 2328 cocc CertificateOrderCertificateCollection 2329} 2330 2331// NextWithContext advances to the next page of values. If there was an error making 2332// the request the page does not advance and the error is returned. 2333func (page *CertificateOrderCertificateCollectionPage) NextWithContext(ctx context.Context) (err error) { 2334 if tracing.IsEnabled() { 2335 ctx = tracing.StartSpan(ctx, fqdn+"/CertificateOrderCertificateCollectionPage.NextWithContext") 2336 defer func() { 2337 sc := -1 2338 if page.Response().Response.Response != nil { 2339 sc = page.Response().Response.Response.StatusCode 2340 } 2341 tracing.EndSpan(ctx, sc, err) 2342 }() 2343 } 2344 for { 2345 next, err := page.fn(ctx, page.cocc) 2346 if err != nil { 2347 return err 2348 } 2349 page.cocc = next 2350 if !next.hasNextLink() || !next.IsEmpty() { 2351 break 2352 } 2353 } 2354 return nil 2355} 2356 2357// Next advances to the next page of values. If there was an error making 2358// the request the page does not advance and the error is returned. 2359// Deprecated: Use NextWithContext() instead. 2360func (page *CertificateOrderCertificateCollectionPage) Next() error { 2361 return page.NextWithContext(context.Background()) 2362} 2363 2364// NotDone returns true if the page enumeration should be started or is not yet complete. 2365func (page CertificateOrderCertificateCollectionPage) NotDone() bool { 2366 return !page.cocc.IsEmpty() 2367} 2368 2369// Response returns the raw server response from the last page request. 2370func (page CertificateOrderCertificateCollectionPage) Response() CertificateOrderCertificateCollection { 2371 return page.cocc 2372} 2373 2374// Values returns the slice of values for the current page or nil if there are no values. 2375func (page CertificateOrderCertificateCollectionPage) Values() []CertificateOrderCertificate { 2376 if page.cocc.IsEmpty() { 2377 return nil 2378 } 2379 return *page.cocc.Value 2380} 2381 2382// Creates a new instance of the CertificateOrderCertificateCollectionPage type. 2383func NewCertificateOrderCertificateCollectionPage(cur CertificateOrderCertificateCollection, getNextPage func(context.Context, CertificateOrderCertificateCollection) (CertificateOrderCertificateCollection, error)) CertificateOrderCertificateCollectionPage { 2384 return CertificateOrderCertificateCollectionPage{ 2385 fn: getNextPage, 2386 cocc: cur, 2387 } 2388} 2389 2390// CertificateOrderCertificateProperties ... 2391type CertificateOrderCertificateProperties struct { 2392 // KeyVaultID - Key Vault Csm resource Id 2393 KeyVaultID *string `json:"keyVaultId,omitempty"` 2394 // KeyVaultSecretName - Key Vault secret name 2395 KeyVaultSecretName *string `json:"keyVaultSecretName,omitempty"` 2396 // ProvisioningState - Status of the Key Vault secret. Possible values include: 'KeyVaultSecretStatusInitialized', 'KeyVaultSecretStatusWaitingOnCertificateOrder', 'KeyVaultSecretStatusSucceeded', 'KeyVaultSecretStatusCertificateOrderFailed', 'KeyVaultSecretStatusOperationNotPermittedOnKeyVault', 'KeyVaultSecretStatusAzureServiceUnauthorizedToAccessKeyVault', 'KeyVaultSecretStatusKeyVaultDoesNotExist', 'KeyVaultSecretStatusKeyVaultSecretDoesNotExist', 'KeyVaultSecretStatusUnknownError', 'KeyVaultSecretStatusUnknown' 2397 ProvisioningState KeyVaultSecretStatus `json:"provisioningState,omitempty"` 2398} 2399 2400// CertificateOrderCollection collection of certificate orders 2401type CertificateOrderCollection struct { 2402 autorest.Response `json:"-"` 2403 // Value - Collection of resources 2404 Value *[]CertificateOrder `json:"value,omitempty"` 2405 // NextLink - Link to next page of resources 2406 NextLink *string `json:"nextLink,omitempty"` 2407} 2408 2409// CertificateOrderCollectionIterator provides access to a complete listing of CertificateOrder values. 2410type CertificateOrderCollectionIterator struct { 2411 i int 2412 page CertificateOrderCollectionPage 2413} 2414 2415// NextWithContext advances to the next value. If there was an error making 2416// the request the iterator does not advance and the error is returned. 2417func (iter *CertificateOrderCollectionIterator) NextWithContext(ctx context.Context) (err error) { 2418 if tracing.IsEnabled() { 2419 ctx = tracing.StartSpan(ctx, fqdn+"/CertificateOrderCollectionIterator.NextWithContext") 2420 defer func() { 2421 sc := -1 2422 if iter.Response().Response.Response != nil { 2423 sc = iter.Response().Response.Response.StatusCode 2424 } 2425 tracing.EndSpan(ctx, sc, err) 2426 }() 2427 } 2428 iter.i++ 2429 if iter.i < len(iter.page.Values()) { 2430 return nil 2431 } 2432 err = iter.page.NextWithContext(ctx) 2433 if err != nil { 2434 iter.i-- 2435 return err 2436 } 2437 iter.i = 0 2438 return nil 2439} 2440 2441// Next advances to the next value. If there was an error making 2442// the request the iterator does not advance and the error is returned. 2443// Deprecated: Use NextWithContext() instead. 2444func (iter *CertificateOrderCollectionIterator) Next() error { 2445 return iter.NextWithContext(context.Background()) 2446} 2447 2448// NotDone returns true if the enumeration should be started or is not yet complete. 2449func (iter CertificateOrderCollectionIterator) NotDone() bool { 2450 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 2451} 2452 2453// Response returns the raw server response from the last page request. 2454func (iter CertificateOrderCollectionIterator) Response() CertificateOrderCollection { 2455 return iter.page.Response() 2456} 2457 2458// Value returns the current value or a zero-initialized value if the 2459// iterator has advanced beyond the end of the collection. 2460func (iter CertificateOrderCollectionIterator) Value() CertificateOrder { 2461 if !iter.page.NotDone() { 2462 return CertificateOrder{} 2463 } 2464 return iter.page.Values()[iter.i] 2465} 2466 2467// Creates a new instance of the CertificateOrderCollectionIterator type. 2468func NewCertificateOrderCollectionIterator(page CertificateOrderCollectionPage) CertificateOrderCollectionIterator { 2469 return CertificateOrderCollectionIterator{page: page} 2470} 2471 2472// IsEmpty returns true if the ListResult contains no values. 2473func (coc CertificateOrderCollection) IsEmpty() bool { 2474 return coc.Value == nil || len(*coc.Value) == 0 2475} 2476 2477// hasNextLink returns true if the NextLink is not empty. 2478func (coc CertificateOrderCollection) hasNextLink() bool { 2479 return coc.NextLink != nil && len(*coc.NextLink) != 0 2480} 2481 2482// certificateOrderCollectionPreparer prepares a request to retrieve the next set of results. 2483// It returns nil if no more results exist. 2484func (coc CertificateOrderCollection) certificateOrderCollectionPreparer(ctx context.Context) (*http.Request, error) { 2485 if !coc.hasNextLink() { 2486 return nil, nil 2487 } 2488 return autorest.Prepare((&http.Request{}).WithContext(ctx), 2489 autorest.AsJSON(), 2490 autorest.AsGet(), 2491 autorest.WithBaseURL(to.String(coc.NextLink))) 2492} 2493 2494// CertificateOrderCollectionPage contains a page of CertificateOrder values. 2495type CertificateOrderCollectionPage struct { 2496 fn func(context.Context, CertificateOrderCollection) (CertificateOrderCollection, error) 2497 coc CertificateOrderCollection 2498} 2499 2500// NextWithContext advances to the next page of values. If there was an error making 2501// the request the page does not advance and the error is returned. 2502func (page *CertificateOrderCollectionPage) NextWithContext(ctx context.Context) (err error) { 2503 if tracing.IsEnabled() { 2504 ctx = tracing.StartSpan(ctx, fqdn+"/CertificateOrderCollectionPage.NextWithContext") 2505 defer func() { 2506 sc := -1 2507 if page.Response().Response.Response != nil { 2508 sc = page.Response().Response.Response.StatusCode 2509 } 2510 tracing.EndSpan(ctx, sc, err) 2511 }() 2512 } 2513 for { 2514 next, err := page.fn(ctx, page.coc) 2515 if err != nil { 2516 return err 2517 } 2518 page.coc = next 2519 if !next.hasNextLink() || !next.IsEmpty() { 2520 break 2521 } 2522 } 2523 return nil 2524} 2525 2526// Next advances to the next page of values. If there was an error making 2527// the request the page does not advance and the error is returned. 2528// Deprecated: Use NextWithContext() instead. 2529func (page *CertificateOrderCollectionPage) Next() error { 2530 return page.NextWithContext(context.Background()) 2531} 2532 2533// NotDone returns true if the page enumeration should be started or is not yet complete. 2534func (page CertificateOrderCollectionPage) NotDone() bool { 2535 return !page.coc.IsEmpty() 2536} 2537 2538// Response returns the raw server response from the last page request. 2539func (page CertificateOrderCollectionPage) Response() CertificateOrderCollection { 2540 return page.coc 2541} 2542 2543// Values returns the slice of values for the current page or nil if there are no values. 2544func (page CertificateOrderCollectionPage) Values() []CertificateOrder { 2545 if page.coc.IsEmpty() { 2546 return nil 2547 } 2548 return *page.coc.Value 2549} 2550 2551// Creates a new instance of the CertificateOrderCollectionPage type. 2552func NewCertificateOrderCollectionPage(cur CertificateOrderCollection, getNextPage func(context.Context, CertificateOrderCollection) (CertificateOrderCollection, error)) CertificateOrderCollectionPage { 2553 return CertificateOrderCollectionPage{ 2554 fn: getNextPage, 2555 coc: cur, 2556 } 2557} 2558 2559// CertificateOrderProperties ... 2560type CertificateOrderProperties struct { 2561 // Certificates - State of the Key Vault secret 2562 Certificates map[string]*CertificateOrderCertificate `json:"certificates"` 2563 // DistinguishedName - Certificate distinguished name 2564 DistinguishedName *string `json:"distinguishedName,omitempty"` 2565 // DomainVerificationToken - Domain Verification Token 2566 DomainVerificationToken *string `json:"domainVerificationToken,omitempty"` 2567 // ValidityInYears - Duration in years (must be between 1 and 3) 2568 ValidityInYears *int32 `json:"validityInYears,omitempty"` 2569 // KeySize - Certificate Key Size 2570 KeySize *int32 `json:"keySize,omitempty"` 2571 // ProductType - Certificate product type. Possible values include: 'StandardDomainValidatedSsl', 'StandardDomainValidatedWildCardSsl' 2572 ProductType CertificateProductType `json:"productType,omitempty"` 2573 // AutoRenew - Auto renew 2574 AutoRenew *bool `json:"autoRenew,omitempty"` 2575 // ProvisioningState - Status of certificate order. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateFailed', 'ProvisioningStateCanceled', 'ProvisioningStateInProgress', 'ProvisioningStateDeleting' 2576 ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` 2577 // Status - Current order status. Possible values include: 'Pendingissuance', 'Issued', 'Revoked', 'Canceled', 'Denied', 'Pendingrevocation', 'PendingRekey', 'Unused', 'Expired', 'NotSubmitted' 2578 Status CertificateOrderStatus `json:"status,omitempty"` 2579 // SignedCertificate - Signed certificate 2580 SignedCertificate *CertificateDetails `json:"signedCertificate,omitempty"` 2581 // Csr - Last CSR that was created for this order 2582 Csr *string `json:"csr,omitempty"` 2583 // Intermediate - Intermediate certificate 2584 Intermediate *CertificateDetails `json:"intermediate,omitempty"` 2585 // Root - Root certificate 2586 Root *CertificateDetails `json:"root,omitempty"` 2587 // SerialNumber - Current serial number of the certificate 2588 SerialNumber *string `json:"serialNumber,omitempty"` 2589 // LastCertificateIssuanceTime - Certificate last issuance time 2590 LastCertificateIssuanceTime *date.Time `json:"lastCertificateIssuanceTime,omitempty"` 2591 // ExpirationTime - Certificate expiration time 2592 ExpirationTime *date.Time `json:"expirationTime,omitempty"` 2593} 2594 2595// MarshalJSON is the custom marshaler for CertificateOrderProperties. 2596func (co CertificateOrderProperties) MarshalJSON() ([]byte, error) { 2597 objectMap := make(map[string]interface{}) 2598 if co.Certificates != nil { 2599 objectMap["certificates"] = co.Certificates 2600 } 2601 if co.DistinguishedName != nil { 2602 objectMap["distinguishedName"] = co.DistinguishedName 2603 } 2604 if co.DomainVerificationToken != nil { 2605 objectMap["domainVerificationToken"] = co.DomainVerificationToken 2606 } 2607 if co.ValidityInYears != nil { 2608 objectMap["validityInYears"] = co.ValidityInYears 2609 } 2610 if co.KeySize != nil { 2611 objectMap["keySize"] = co.KeySize 2612 } 2613 if co.ProductType != "" { 2614 objectMap["productType"] = co.ProductType 2615 } 2616 if co.AutoRenew != nil { 2617 objectMap["autoRenew"] = co.AutoRenew 2618 } 2619 if co.ProvisioningState != "" { 2620 objectMap["provisioningState"] = co.ProvisioningState 2621 } 2622 if co.Status != "" { 2623 objectMap["status"] = co.Status 2624 } 2625 if co.SignedCertificate != nil { 2626 objectMap["signedCertificate"] = co.SignedCertificate 2627 } 2628 if co.Csr != nil { 2629 objectMap["csr"] = co.Csr 2630 } 2631 if co.Intermediate != nil { 2632 objectMap["intermediate"] = co.Intermediate 2633 } 2634 if co.Root != nil { 2635 objectMap["root"] = co.Root 2636 } 2637 if co.SerialNumber != nil { 2638 objectMap["serialNumber"] = co.SerialNumber 2639 } 2640 if co.LastCertificateIssuanceTime != nil { 2641 objectMap["lastCertificateIssuanceTime"] = co.LastCertificateIssuanceTime 2642 } 2643 if co.ExpirationTime != nil { 2644 objectMap["expirationTime"] = co.ExpirationTime 2645 } 2646 return json.Marshal(objectMap) 2647} 2648 2649// CertificateProperties ... 2650type CertificateProperties struct { 2651 // FriendlyName - Friendly name of the certificate 2652 FriendlyName *string `json:"friendlyName,omitempty"` 2653 // SubjectName - Subject name of the certificate 2654 SubjectName *string `json:"subjectName,omitempty"` 2655 // HostNames - Host names the certificate applies to 2656 HostNames *[]string `json:"hostNames,omitempty"` 2657 // PfxBlob - Pfx blob 2658 PfxBlob *string `json:"pfxBlob,omitempty"` 2659 // SiteName - App name 2660 SiteName *string `json:"siteName,omitempty"` 2661 // SelfLink - Self link 2662 SelfLink *string `json:"selfLink,omitempty"` 2663 // Issuer - Certificate issuer 2664 Issuer *string `json:"issuer,omitempty"` 2665 // IssueDate - Certificate issue Date 2666 IssueDate *date.Time `json:"issueDate,omitempty"` 2667 // ExpirationDate - Certificate expiration date 2668 ExpirationDate *date.Time `json:"expirationDate,omitempty"` 2669 // Password - Certificate password 2670 Password *string `json:"password,omitempty"` 2671 // Thumbprint - Certificate thumbprint 2672 Thumbprint *string `json:"thumbprint,omitempty"` 2673 // Valid - Is the certificate valid? 2674 Valid *bool `json:"valid,omitempty"` 2675 // CerBlob - Raw bytes of .cer file 2676 CerBlob *string `json:"cerBlob,omitempty"` 2677 // PublicKeyHash - Public key hash 2678 PublicKeyHash *string `json:"publicKeyHash,omitempty"` 2679 // HostingEnvironmentProfile - Specification for the hosting environment (App Service Environment) to use for the certificate 2680 HostingEnvironmentProfile *HostingEnvironmentProfile `json:"hostingEnvironmentProfile,omitempty"` 2681} 2682 2683// ClassicMobileService a mobile service 2684type ClassicMobileService struct { 2685 autorest.Response `json:"-"` 2686 *ClassicMobileServiceProperties `json:"properties,omitempty"` 2687 // ID - Resource Id 2688 ID *string `json:"id,omitempty"` 2689 // Name - Resource Name 2690 Name *string `json:"name,omitempty"` 2691 // Kind - Kind of resource 2692 Kind *string `json:"kind,omitempty"` 2693 // Location - Resource Location 2694 Location *string `json:"location,omitempty"` 2695 // Type - Resource type 2696 Type *string `json:"type,omitempty"` 2697 // Tags - Resource tags 2698 Tags map[string]*string `json:"tags"` 2699} 2700 2701// MarshalJSON is the custom marshaler for ClassicMobileService. 2702func (cms ClassicMobileService) MarshalJSON() ([]byte, error) { 2703 objectMap := make(map[string]interface{}) 2704 if cms.ClassicMobileServiceProperties != nil { 2705 objectMap["properties"] = cms.ClassicMobileServiceProperties 2706 } 2707 if cms.ID != nil { 2708 objectMap["id"] = cms.ID 2709 } 2710 if cms.Name != nil { 2711 objectMap["name"] = cms.Name 2712 } 2713 if cms.Kind != nil { 2714 objectMap["kind"] = cms.Kind 2715 } 2716 if cms.Location != nil { 2717 objectMap["location"] = cms.Location 2718 } 2719 if cms.Type != nil { 2720 objectMap["type"] = cms.Type 2721 } 2722 if cms.Tags != nil { 2723 objectMap["tags"] = cms.Tags 2724 } 2725 return json.Marshal(objectMap) 2726} 2727 2728// UnmarshalJSON is the custom unmarshaler for ClassicMobileService struct. 2729func (cms *ClassicMobileService) UnmarshalJSON(body []byte) error { 2730 var m map[string]*json.RawMessage 2731 err := json.Unmarshal(body, &m) 2732 if err != nil { 2733 return err 2734 } 2735 for k, v := range m { 2736 switch k { 2737 case "properties": 2738 if v != nil { 2739 var classicMobileServiceProperties ClassicMobileServiceProperties 2740 err = json.Unmarshal(*v, &classicMobileServiceProperties) 2741 if err != nil { 2742 return err 2743 } 2744 cms.ClassicMobileServiceProperties = &classicMobileServiceProperties 2745 } 2746 case "id": 2747 if v != nil { 2748 var ID string 2749 err = json.Unmarshal(*v, &ID) 2750 if err != nil { 2751 return err 2752 } 2753 cms.ID = &ID 2754 } 2755 case "name": 2756 if v != nil { 2757 var name string 2758 err = json.Unmarshal(*v, &name) 2759 if err != nil { 2760 return err 2761 } 2762 cms.Name = &name 2763 } 2764 case "kind": 2765 if v != nil { 2766 var kind string 2767 err = json.Unmarshal(*v, &kind) 2768 if err != nil { 2769 return err 2770 } 2771 cms.Kind = &kind 2772 } 2773 case "location": 2774 if v != nil { 2775 var location string 2776 err = json.Unmarshal(*v, &location) 2777 if err != nil { 2778 return err 2779 } 2780 cms.Location = &location 2781 } 2782 case "type": 2783 if v != nil { 2784 var typeVar string 2785 err = json.Unmarshal(*v, &typeVar) 2786 if err != nil { 2787 return err 2788 } 2789 cms.Type = &typeVar 2790 } 2791 case "tags": 2792 if v != nil { 2793 var tags map[string]*string 2794 err = json.Unmarshal(*v, &tags) 2795 if err != nil { 2796 return err 2797 } 2798 cms.Tags = tags 2799 } 2800 } 2801 } 2802 2803 return nil 2804} 2805 2806// ClassicMobileServiceCollection collection of Classic Mobile Services 2807type ClassicMobileServiceCollection struct { 2808 autorest.Response `json:"-"` 2809 // Value - Collection of resources 2810 Value *[]ClassicMobileService `json:"value,omitempty"` 2811 // NextLink - Link to next page of resources 2812 NextLink *string `json:"nextLink,omitempty"` 2813} 2814 2815// ClassicMobileServiceCollectionIterator provides access to a complete listing of ClassicMobileService 2816// values. 2817type ClassicMobileServiceCollectionIterator struct { 2818 i int 2819 page ClassicMobileServiceCollectionPage 2820} 2821 2822// NextWithContext advances to the next value. If there was an error making 2823// the request the iterator does not advance and the error is returned. 2824func (iter *ClassicMobileServiceCollectionIterator) NextWithContext(ctx context.Context) (err error) { 2825 if tracing.IsEnabled() { 2826 ctx = tracing.StartSpan(ctx, fqdn+"/ClassicMobileServiceCollectionIterator.NextWithContext") 2827 defer func() { 2828 sc := -1 2829 if iter.Response().Response.Response != nil { 2830 sc = iter.Response().Response.Response.StatusCode 2831 } 2832 tracing.EndSpan(ctx, sc, err) 2833 }() 2834 } 2835 iter.i++ 2836 if iter.i < len(iter.page.Values()) { 2837 return nil 2838 } 2839 err = iter.page.NextWithContext(ctx) 2840 if err != nil { 2841 iter.i-- 2842 return err 2843 } 2844 iter.i = 0 2845 return nil 2846} 2847 2848// Next advances to the next value. If there was an error making 2849// the request the iterator does not advance and the error is returned. 2850// Deprecated: Use NextWithContext() instead. 2851func (iter *ClassicMobileServiceCollectionIterator) Next() error { 2852 return iter.NextWithContext(context.Background()) 2853} 2854 2855// NotDone returns true if the enumeration should be started or is not yet complete. 2856func (iter ClassicMobileServiceCollectionIterator) NotDone() bool { 2857 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 2858} 2859 2860// Response returns the raw server response from the last page request. 2861func (iter ClassicMobileServiceCollectionIterator) Response() ClassicMobileServiceCollection { 2862 return iter.page.Response() 2863} 2864 2865// Value returns the current value or a zero-initialized value if the 2866// iterator has advanced beyond the end of the collection. 2867func (iter ClassicMobileServiceCollectionIterator) Value() ClassicMobileService { 2868 if !iter.page.NotDone() { 2869 return ClassicMobileService{} 2870 } 2871 return iter.page.Values()[iter.i] 2872} 2873 2874// Creates a new instance of the ClassicMobileServiceCollectionIterator type. 2875func NewClassicMobileServiceCollectionIterator(page ClassicMobileServiceCollectionPage) ClassicMobileServiceCollectionIterator { 2876 return ClassicMobileServiceCollectionIterator{page: page} 2877} 2878 2879// IsEmpty returns true if the ListResult contains no values. 2880func (cmsc ClassicMobileServiceCollection) IsEmpty() bool { 2881 return cmsc.Value == nil || len(*cmsc.Value) == 0 2882} 2883 2884// hasNextLink returns true if the NextLink is not empty. 2885func (cmsc ClassicMobileServiceCollection) hasNextLink() bool { 2886 return cmsc.NextLink != nil && len(*cmsc.NextLink) != 0 2887} 2888 2889// classicMobileServiceCollectionPreparer prepares a request to retrieve the next set of results. 2890// It returns nil if no more results exist. 2891func (cmsc ClassicMobileServiceCollection) classicMobileServiceCollectionPreparer(ctx context.Context) (*http.Request, error) { 2892 if !cmsc.hasNextLink() { 2893 return nil, nil 2894 } 2895 return autorest.Prepare((&http.Request{}).WithContext(ctx), 2896 autorest.AsJSON(), 2897 autorest.AsGet(), 2898 autorest.WithBaseURL(to.String(cmsc.NextLink))) 2899} 2900 2901// ClassicMobileServiceCollectionPage contains a page of ClassicMobileService values. 2902type ClassicMobileServiceCollectionPage struct { 2903 fn func(context.Context, ClassicMobileServiceCollection) (ClassicMobileServiceCollection, error) 2904 cmsc ClassicMobileServiceCollection 2905} 2906 2907// NextWithContext advances to the next page of values. If there was an error making 2908// the request the page does not advance and the error is returned. 2909func (page *ClassicMobileServiceCollectionPage) NextWithContext(ctx context.Context) (err error) { 2910 if tracing.IsEnabled() { 2911 ctx = tracing.StartSpan(ctx, fqdn+"/ClassicMobileServiceCollectionPage.NextWithContext") 2912 defer func() { 2913 sc := -1 2914 if page.Response().Response.Response != nil { 2915 sc = page.Response().Response.Response.StatusCode 2916 } 2917 tracing.EndSpan(ctx, sc, err) 2918 }() 2919 } 2920 for { 2921 next, err := page.fn(ctx, page.cmsc) 2922 if err != nil { 2923 return err 2924 } 2925 page.cmsc = next 2926 if !next.hasNextLink() || !next.IsEmpty() { 2927 break 2928 } 2929 } 2930 return nil 2931} 2932 2933// Next advances to the next page of values. If there was an error making 2934// the request the page does not advance and the error is returned. 2935// Deprecated: Use NextWithContext() instead. 2936func (page *ClassicMobileServiceCollectionPage) Next() error { 2937 return page.NextWithContext(context.Background()) 2938} 2939 2940// NotDone returns true if the page enumeration should be started or is not yet complete. 2941func (page ClassicMobileServiceCollectionPage) NotDone() bool { 2942 return !page.cmsc.IsEmpty() 2943} 2944 2945// Response returns the raw server response from the last page request. 2946func (page ClassicMobileServiceCollectionPage) Response() ClassicMobileServiceCollection { 2947 return page.cmsc 2948} 2949 2950// Values returns the slice of values for the current page or nil if there are no values. 2951func (page ClassicMobileServiceCollectionPage) Values() []ClassicMobileService { 2952 if page.cmsc.IsEmpty() { 2953 return nil 2954 } 2955 return *page.cmsc.Value 2956} 2957 2958// Creates a new instance of the ClassicMobileServiceCollectionPage type. 2959func NewClassicMobileServiceCollectionPage(cur ClassicMobileServiceCollection, getNextPage func(context.Context, ClassicMobileServiceCollection) (ClassicMobileServiceCollection, error)) ClassicMobileServiceCollectionPage { 2960 return ClassicMobileServiceCollectionPage{ 2961 fn: getNextPage, 2962 cmsc: cur, 2963 } 2964} 2965 2966// ClassicMobileServiceProperties ... 2967type ClassicMobileServiceProperties struct { 2968 // Name - Name of the mobile service 2969 Name *string `json:"name,omitempty"` 2970} 2971 2972// CloningInfo represents information needed for cloning operation 2973type CloningInfo struct { 2974 // CorrelationID - Correlation Id of cloning operation. This id ties multiple cloning operations 2975 // together to use the same snapshot 2976 CorrelationID *string `json:"correlationId,omitempty"` 2977 // Overwrite - Overwrite destination web app 2978 Overwrite *bool `json:"overwrite,omitempty"` 2979 // CloneCustomHostNames - If true, clone custom hostnames from source web app 2980 CloneCustomHostNames *bool `json:"cloneCustomHostNames,omitempty"` 2981 // CloneSourceControl - Clone source control from source web app 2982 CloneSourceControl *bool `json:"cloneSourceControl,omitempty"` 2983 // SourceWebAppID - ARM resource id of the source web app. Web app resource id is of the form 2984 // /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName} for production slots and 2985 // /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slotName} for other slots 2986 SourceWebAppID *string `json:"sourceWebAppId,omitempty"` 2987 // HostingEnvironment - Hosting environment 2988 HostingEnvironment *string `json:"hostingEnvironment,omitempty"` 2989 // AppSettingsOverrides - Application settings overrides for cloned web app. If specified these settings will override the settings cloned 2990 // from source web app. If not specified, application settings from source web app are retained. 2991 AppSettingsOverrides map[string]*string `json:"appSettingsOverrides"` 2992 // ConfigureLoadBalancing - If specified configure load balancing for source and clone site 2993 ConfigureLoadBalancing *bool `json:"configureLoadBalancing,omitempty"` 2994 // TrafficManagerProfileID - ARM resource id of the traffic manager profile to use if it exists. Traffic manager resource id is of the form 2995 // /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{profileName} 2996 TrafficManagerProfileID *string `json:"trafficManagerProfileId,omitempty"` 2997 // TrafficManagerProfileName - Name of traffic manager profile to create. This is only needed if traffic manager profile does not already exist 2998 TrafficManagerProfileName *string `json:"trafficManagerProfileName,omitempty"` 2999} 3000 3001// MarshalJSON is the custom marshaler for CloningInfo. 3002func (ci CloningInfo) MarshalJSON() ([]byte, error) { 3003 objectMap := make(map[string]interface{}) 3004 if ci.CorrelationID != nil { 3005 objectMap["correlationId"] = ci.CorrelationID 3006 } 3007 if ci.Overwrite != nil { 3008 objectMap["overwrite"] = ci.Overwrite 3009 } 3010 if ci.CloneCustomHostNames != nil { 3011 objectMap["cloneCustomHostNames"] = ci.CloneCustomHostNames 3012 } 3013 if ci.CloneSourceControl != nil { 3014 objectMap["cloneSourceControl"] = ci.CloneSourceControl 3015 } 3016 if ci.SourceWebAppID != nil { 3017 objectMap["sourceWebAppId"] = ci.SourceWebAppID 3018 } 3019 if ci.HostingEnvironment != nil { 3020 objectMap["hostingEnvironment"] = ci.HostingEnvironment 3021 } 3022 if ci.AppSettingsOverrides != nil { 3023 objectMap["appSettingsOverrides"] = ci.AppSettingsOverrides 3024 } 3025 if ci.ConfigureLoadBalancing != nil { 3026 objectMap["configureLoadBalancing"] = ci.ConfigureLoadBalancing 3027 } 3028 if ci.TrafficManagerProfileID != nil { 3029 objectMap["trafficManagerProfileId"] = ci.TrafficManagerProfileID 3030 } 3031 if ci.TrafficManagerProfileName != nil { 3032 objectMap["trafficManagerProfileName"] = ci.TrafficManagerProfileName 3033 } 3034 return json.Marshal(objectMap) 3035} 3036 3037// ConfirmConsentCodeInput confirm Consent Code Input payload 3038type ConfirmConsentCodeInput struct { 3039 *ConfirmConsentCodeInputProperties `json:"properties,omitempty"` 3040 // ID - Resource Id 3041 ID *string `json:"id,omitempty"` 3042 // Name - Resource Name 3043 Name *string `json:"name,omitempty"` 3044 // Kind - Kind of resource 3045 Kind *string `json:"kind,omitempty"` 3046 // Location - Resource Location 3047 Location *string `json:"location,omitempty"` 3048 // Type - Resource type 3049 Type *string `json:"type,omitempty"` 3050 // Tags - Resource tags 3051 Tags map[string]*string `json:"tags"` 3052} 3053 3054// MarshalJSON is the custom marshaler for ConfirmConsentCodeInput. 3055func (ccci ConfirmConsentCodeInput) MarshalJSON() ([]byte, error) { 3056 objectMap := make(map[string]interface{}) 3057 if ccci.ConfirmConsentCodeInputProperties != nil { 3058 objectMap["properties"] = ccci.ConfirmConsentCodeInputProperties 3059 } 3060 if ccci.ID != nil { 3061 objectMap["id"] = ccci.ID 3062 } 3063 if ccci.Name != nil { 3064 objectMap["name"] = ccci.Name 3065 } 3066 if ccci.Kind != nil { 3067 objectMap["kind"] = ccci.Kind 3068 } 3069 if ccci.Location != nil { 3070 objectMap["location"] = ccci.Location 3071 } 3072 if ccci.Type != nil { 3073 objectMap["type"] = ccci.Type 3074 } 3075 if ccci.Tags != nil { 3076 objectMap["tags"] = ccci.Tags 3077 } 3078 return json.Marshal(objectMap) 3079} 3080 3081// UnmarshalJSON is the custom unmarshaler for ConfirmConsentCodeInput struct. 3082func (ccci *ConfirmConsentCodeInput) UnmarshalJSON(body []byte) error { 3083 var m map[string]*json.RawMessage 3084 err := json.Unmarshal(body, &m) 3085 if err != nil { 3086 return err 3087 } 3088 for k, v := range m { 3089 switch k { 3090 case "properties": 3091 if v != nil { 3092 var confirmConsentCodeInputProperties ConfirmConsentCodeInputProperties 3093 err = json.Unmarshal(*v, &confirmConsentCodeInputProperties) 3094 if err != nil { 3095 return err 3096 } 3097 ccci.ConfirmConsentCodeInputProperties = &confirmConsentCodeInputProperties 3098 } 3099 case "id": 3100 if v != nil { 3101 var ID string 3102 err = json.Unmarshal(*v, &ID) 3103 if err != nil { 3104 return err 3105 } 3106 ccci.ID = &ID 3107 } 3108 case "name": 3109 if v != nil { 3110 var name string 3111 err = json.Unmarshal(*v, &name) 3112 if err != nil { 3113 return err 3114 } 3115 ccci.Name = &name 3116 } 3117 case "kind": 3118 if v != nil { 3119 var kind string 3120 err = json.Unmarshal(*v, &kind) 3121 if err != nil { 3122 return err 3123 } 3124 ccci.Kind = &kind 3125 } 3126 case "location": 3127 if v != nil { 3128 var location string 3129 err = json.Unmarshal(*v, &location) 3130 if err != nil { 3131 return err 3132 } 3133 ccci.Location = &location 3134 } 3135 case "type": 3136 if v != nil { 3137 var typeVar string 3138 err = json.Unmarshal(*v, &typeVar) 3139 if err != nil { 3140 return err 3141 } 3142 ccci.Type = &typeVar 3143 } 3144 case "tags": 3145 if v != nil { 3146 var tags map[string]*string 3147 err = json.Unmarshal(*v, &tags) 3148 if err != nil { 3149 return err 3150 } 3151 ccci.Tags = tags 3152 } 3153 } 3154 } 3155 3156 return nil 3157} 3158 3159// ConfirmConsentCodeInputProperties ... 3160type ConfirmConsentCodeInputProperties struct { 3161 // PrincipalType - Principal type. Possible values include: 'PrincipalTypeActiveDirectory', 'PrincipalTypeConnection', 'PrincipalTypeMicrosoftAccount' 3162 PrincipalType PrincipalType `json:"principalType,omitempty"` 3163 // TenantID - Tenant Id 3164 TenantID *string `json:"tenantId,omitempty"` 3165 // ObjectID - AAD object ID. This is userId 3166 ObjectID *string `json:"objectId,omitempty"` 3167 // Code - Code that was returned during consent flow 3168 Code *string `json:"code,omitempty"` 3169} 3170 3171// Connection API Connection 3172type Connection struct { 3173 autorest.Response `json:"-"` 3174 *ConnectionProperties `json:"properties,omitempty"` 3175 // ID - Resource Id 3176 ID *string `json:"id,omitempty"` 3177 // Name - Resource Name 3178 Name *string `json:"name,omitempty"` 3179 // Kind - Kind of resource 3180 Kind *string `json:"kind,omitempty"` 3181 // Location - Resource Location 3182 Location *string `json:"location,omitempty"` 3183 // Type - Resource type 3184 Type *string `json:"type,omitempty"` 3185 // Tags - Resource tags 3186 Tags map[string]*string `json:"tags"` 3187} 3188 3189// MarshalJSON is the custom marshaler for Connection. 3190func (c Connection) MarshalJSON() ([]byte, error) { 3191 objectMap := make(map[string]interface{}) 3192 if c.ConnectionProperties != nil { 3193 objectMap["properties"] = c.ConnectionProperties 3194 } 3195 if c.ID != nil { 3196 objectMap["id"] = c.ID 3197 } 3198 if c.Name != nil { 3199 objectMap["name"] = c.Name 3200 } 3201 if c.Kind != nil { 3202 objectMap["kind"] = c.Kind 3203 } 3204 if c.Location != nil { 3205 objectMap["location"] = c.Location 3206 } 3207 if c.Type != nil { 3208 objectMap["type"] = c.Type 3209 } 3210 if c.Tags != nil { 3211 objectMap["tags"] = c.Tags 3212 } 3213 return json.Marshal(objectMap) 3214} 3215 3216// UnmarshalJSON is the custom unmarshaler for Connection struct. 3217func (c *Connection) UnmarshalJSON(body []byte) error { 3218 var m map[string]*json.RawMessage 3219 err := json.Unmarshal(body, &m) 3220 if err != nil { 3221 return err 3222 } 3223 for k, v := range m { 3224 switch k { 3225 case "properties": 3226 if v != nil { 3227 var connectionProperties ConnectionProperties 3228 err = json.Unmarshal(*v, &connectionProperties) 3229 if err != nil { 3230 return err 3231 } 3232 c.ConnectionProperties = &connectionProperties 3233 } 3234 case "id": 3235 if v != nil { 3236 var ID string 3237 err = json.Unmarshal(*v, &ID) 3238 if err != nil { 3239 return err 3240 } 3241 c.ID = &ID 3242 } 3243 case "name": 3244 if v != nil { 3245 var name string 3246 err = json.Unmarshal(*v, &name) 3247 if err != nil { 3248 return err 3249 } 3250 c.Name = &name 3251 } 3252 case "kind": 3253 if v != nil { 3254 var kind string 3255 err = json.Unmarshal(*v, &kind) 3256 if err != nil { 3257 return err 3258 } 3259 c.Kind = &kind 3260 } 3261 case "location": 3262 if v != nil { 3263 var location string 3264 err = json.Unmarshal(*v, &location) 3265 if err != nil { 3266 return err 3267 } 3268 c.Location = &location 3269 } 3270 case "type": 3271 if v != nil { 3272 var typeVar string 3273 err = json.Unmarshal(*v, &typeVar) 3274 if err != nil { 3275 return err 3276 } 3277 c.Type = &typeVar 3278 } 3279 case "tags": 3280 if v != nil { 3281 var tags map[string]*string 3282 err = json.Unmarshal(*v, &tags) 3283 if err != nil { 3284 return err 3285 } 3286 c.Tags = tags 3287 } 3288 } 3289 } 3290 3291 return nil 3292} 3293 3294// ConnectionCollection collection of connections 3295type ConnectionCollection struct { 3296 autorest.Response `json:"-"` 3297 // Value - Collection of resources 3298 Value *[]Connection `json:"value,omitempty"` 3299 // NextLink - Link to next page of resources 3300 NextLink *string `json:"nextLink,omitempty"` 3301} 3302 3303// ConnectionCollectionIterator provides access to a complete listing of Connection values. 3304type ConnectionCollectionIterator struct { 3305 i int 3306 page ConnectionCollectionPage 3307} 3308 3309// NextWithContext advances to the next value. If there was an error making 3310// the request the iterator does not advance and the error is returned. 3311func (iter *ConnectionCollectionIterator) NextWithContext(ctx context.Context) (err error) { 3312 if tracing.IsEnabled() { 3313 ctx = tracing.StartSpan(ctx, fqdn+"/ConnectionCollectionIterator.NextWithContext") 3314 defer func() { 3315 sc := -1 3316 if iter.Response().Response.Response != nil { 3317 sc = iter.Response().Response.Response.StatusCode 3318 } 3319 tracing.EndSpan(ctx, sc, err) 3320 }() 3321 } 3322 iter.i++ 3323 if iter.i < len(iter.page.Values()) { 3324 return nil 3325 } 3326 err = iter.page.NextWithContext(ctx) 3327 if err != nil { 3328 iter.i-- 3329 return err 3330 } 3331 iter.i = 0 3332 return nil 3333} 3334 3335// Next advances to the next value. If there was an error making 3336// the request the iterator does not advance and the error is returned. 3337// Deprecated: Use NextWithContext() instead. 3338func (iter *ConnectionCollectionIterator) Next() error { 3339 return iter.NextWithContext(context.Background()) 3340} 3341 3342// NotDone returns true if the enumeration should be started or is not yet complete. 3343func (iter ConnectionCollectionIterator) NotDone() bool { 3344 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 3345} 3346 3347// Response returns the raw server response from the last page request. 3348func (iter ConnectionCollectionIterator) Response() ConnectionCollection { 3349 return iter.page.Response() 3350} 3351 3352// Value returns the current value or a zero-initialized value if the 3353// iterator has advanced beyond the end of the collection. 3354func (iter ConnectionCollectionIterator) Value() Connection { 3355 if !iter.page.NotDone() { 3356 return Connection{} 3357 } 3358 return iter.page.Values()[iter.i] 3359} 3360 3361// Creates a new instance of the ConnectionCollectionIterator type. 3362func NewConnectionCollectionIterator(page ConnectionCollectionPage) ConnectionCollectionIterator { 3363 return ConnectionCollectionIterator{page: page} 3364} 3365 3366// IsEmpty returns true if the ListResult contains no values. 3367func (cc ConnectionCollection) IsEmpty() bool { 3368 return cc.Value == nil || len(*cc.Value) == 0 3369} 3370 3371// hasNextLink returns true if the NextLink is not empty. 3372func (cc ConnectionCollection) hasNextLink() bool { 3373 return cc.NextLink != nil && len(*cc.NextLink) != 0 3374} 3375 3376// connectionCollectionPreparer prepares a request to retrieve the next set of results. 3377// It returns nil if no more results exist. 3378func (cc ConnectionCollection) connectionCollectionPreparer(ctx context.Context) (*http.Request, error) { 3379 if !cc.hasNextLink() { 3380 return nil, nil 3381 } 3382 return autorest.Prepare((&http.Request{}).WithContext(ctx), 3383 autorest.AsJSON(), 3384 autorest.AsGet(), 3385 autorest.WithBaseURL(to.String(cc.NextLink))) 3386} 3387 3388// ConnectionCollectionPage contains a page of Connection values. 3389type ConnectionCollectionPage struct { 3390 fn func(context.Context, ConnectionCollection) (ConnectionCollection, error) 3391 cc ConnectionCollection 3392} 3393 3394// NextWithContext advances to the next page of values. If there was an error making 3395// the request the page does not advance and the error is returned. 3396func (page *ConnectionCollectionPage) NextWithContext(ctx context.Context) (err error) { 3397 if tracing.IsEnabled() { 3398 ctx = tracing.StartSpan(ctx, fqdn+"/ConnectionCollectionPage.NextWithContext") 3399 defer func() { 3400 sc := -1 3401 if page.Response().Response.Response != nil { 3402 sc = page.Response().Response.Response.StatusCode 3403 } 3404 tracing.EndSpan(ctx, sc, err) 3405 }() 3406 } 3407 for { 3408 next, err := page.fn(ctx, page.cc) 3409 if err != nil { 3410 return err 3411 } 3412 page.cc = next 3413 if !next.hasNextLink() || !next.IsEmpty() { 3414 break 3415 } 3416 } 3417 return nil 3418} 3419 3420// Next advances to the next page of values. If there was an error making 3421// the request the page does not advance and the error is returned. 3422// Deprecated: Use NextWithContext() instead. 3423func (page *ConnectionCollectionPage) Next() error { 3424 return page.NextWithContext(context.Background()) 3425} 3426 3427// NotDone returns true if the page enumeration should be started or is not yet complete. 3428func (page ConnectionCollectionPage) NotDone() bool { 3429 return !page.cc.IsEmpty() 3430} 3431 3432// Response returns the raw server response from the last page request. 3433func (page ConnectionCollectionPage) Response() ConnectionCollection { 3434 return page.cc 3435} 3436 3437// Values returns the slice of values for the current page or nil if there are no values. 3438func (page ConnectionCollectionPage) Values() []Connection { 3439 if page.cc.IsEmpty() { 3440 return nil 3441 } 3442 return *page.cc.Value 3443} 3444 3445// Creates a new instance of the ConnectionCollectionPage type. 3446func NewConnectionCollectionPage(cur ConnectionCollection, getNextPage func(context.Context, ConnectionCollection) (ConnectionCollection, error)) ConnectionCollectionPage { 3447 return ConnectionCollectionPage{ 3448 fn: getNextPage, 3449 cc: cur, 3450 } 3451} 3452 3453// ConnectionError connection error 3454type ConnectionError struct { 3455 *ConnectionErrorProperties `json:"properties,omitempty"` 3456 // ID - Resource Id 3457 ID *string `json:"id,omitempty"` 3458 // Name - Resource Name 3459 Name *string `json:"name,omitempty"` 3460 // Kind - Kind of resource 3461 Kind *string `json:"kind,omitempty"` 3462 // Location - Resource Location 3463 Location *string `json:"location,omitempty"` 3464 // Type - Resource type 3465 Type *string `json:"type,omitempty"` 3466 // Tags - Resource tags 3467 Tags map[string]*string `json:"tags"` 3468} 3469 3470// MarshalJSON is the custom marshaler for ConnectionError. 3471func (ce ConnectionError) MarshalJSON() ([]byte, error) { 3472 objectMap := make(map[string]interface{}) 3473 if ce.ConnectionErrorProperties != nil { 3474 objectMap["properties"] = ce.ConnectionErrorProperties 3475 } 3476 if ce.ID != nil { 3477 objectMap["id"] = ce.ID 3478 } 3479 if ce.Name != nil { 3480 objectMap["name"] = ce.Name 3481 } 3482 if ce.Kind != nil { 3483 objectMap["kind"] = ce.Kind 3484 } 3485 if ce.Location != nil { 3486 objectMap["location"] = ce.Location 3487 } 3488 if ce.Type != nil { 3489 objectMap["type"] = ce.Type 3490 } 3491 if ce.Tags != nil { 3492 objectMap["tags"] = ce.Tags 3493 } 3494 return json.Marshal(objectMap) 3495} 3496 3497// UnmarshalJSON is the custom unmarshaler for ConnectionError struct. 3498func (ce *ConnectionError) UnmarshalJSON(body []byte) error { 3499 var m map[string]*json.RawMessage 3500 err := json.Unmarshal(body, &m) 3501 if err != nil { 3502 return err 3503 } 3504 for k, v := range m { 3505 switch k { 3506 case "properties": 3507 if v != nil { 3508 var connectionErrorProperties ConnectionErrorProperties 3509 err = json.Unmarshal(*v, &connectionErrorProperties) 3510 if err != nil { 3511 return err 3512 } 3513 ce.ConnectionErrorProperties = &connectionErrorProperties 3514 } 3515 case "id": 3516 if v != nil { 3517 var ID string 3518 err = json.Unmarshal(*v, &ID) 3519 if err != nil { 3520 return err 3521 } 3522 ce.ID = &ID 3523 } 3524 case "name": 3525 if v != nil { 3526 var name string 3527 err = json.Unmarshal(*v, &name) 3528 if err != nil { 3529 return err 3530 } 3531 ce.Name = &name 3532 } 3533 case "kind": 3534 if v != nil { 3535 var kind string 3536 err = json.Unmarshal(*v, &kind) 3537 if err != nil { 3538 return err 3539 } 3540 ce.Kind = &kind 3541 } 3542 case "location": 3543 if v != nil { 3544 var location string 3545 err = json.Unmarshal(*v, &location) 3546 if err != nil { 3547 return err 3548 } 3549 ce.Location = &location 3550 } 3551 case "type": 3552 if v != nil { 3553 var typeVar string 3554 err = json.Unmarshal(*v, &typeVar) 3555 if err != nil { 3556 return err 3557 } 3558 ce.Type = &typeVar 3559 } 3560 case "tags": 3561 if v != nil { 3562 var tags map[string]*string 3563 err = json.Unmarshal(*v, &tags) 3564 if err != nil { 3565 return err 3566 } 3567 ce.Tags = tags 3568 } 3569 } 3570 } 3571 3572 return nil 3573} 3574 3575// ConnectionErrorProperties ... 3576type ConnectionErrorProperties struct { 3577 // Code - code of the status 3578 Code *string `json:"code,omitempty"` 3579 // Message - Description of the status 3580 Message *string `json:"message,omitempty"` 3581} 3582 3583// ConnectionParameter connection provider parameters 3584type ConnectionParameter struct { 3585 // Type - Type of the parameter. Possible values include: 'ConnectionParameterTypeString', 'ConnectionParameterTypeSecurestring', 'ConnectionParameterTypeSecureobject', 'ConnectionParameterTypeInt', 'ConnectionParameterTypeBool', 'ConnectionParameterTypeObject', 'ConnectionParameterTypeArray', 'ConnectionParameterTypeOauthSetting', 'ConnectionParameterTypeConnection' 3586 Type ConnectionParameterType `json:"type,omitempty"` 3587 // DefaultValue - Default parameter value 3588 DefaultValue interface{} `json:"defaultValue,omitempty"` 3589 // OAuthSettings - Settings defining OAuth flow for the back end provider 3590 OAuthSettings *APIOAuthSettings `json:"oAuthSettings,omitempty"` 3591 // UIDefinition - UI definitions 3592 UIDefinition interface{} `json:"uiDefinition,omitempty"` 3593} 3594 3595// ConnectionProperties ... 3596type ConnectionProperties struct { 3597 // Name - connection name 3598 Name *string `json:"name,omitempty"` 3599 // DisplayName - display name 3600 DisplayName *string `json:"displayName,omitempty"` 3601 // Statuses - Status of the connection 3602 Statuses *[]ConnectionStatus `json:"statuses,omitempty"` 3603 // CustomParameterValues - Custom login setting values. 3604 CustomParameterValues map[string]*ParameterCustomLoginSettingValues `json:"customParameterValues"` 3605 TenantID *string `json:"tenantId,omitempty"` 3606 // ParameterValues - Tokens/Claim 3607 ParameterValues map[string]interface{} `json:"parameterValues"` 3608 // NonSecretParameterValues - Tokens/Claim 3609 NonSecretParameterValues map[string]interface{} `json:"nonSecretParameterValues"` 3610 Metadata interface{} `json:"metadata,omitempty"` 3611 // FirstExpirationTime - Time in UTC when the first expiration of OAuth tokens 3612 FirstExpirationTime *date.Time `json:"firstExpirationTime,omitempty"` 3613 // Keywords - List of Keywords that tag the acl 3614 Keywords *[]string `json:"keywords,omitempty"` 3615 // CreatedTime - Timestamp of the connection creation 3616 CreatedTime *date.Time `json:"createdTime,omitempty"` 3617 // ChangedTime - Timestamp of last connection change. 3618 ChangedTime *date.Time `json:"changedTime,omitempty"` 3619 // API - expanded connection provider name 3620 API *ExpandedParentAPIEntity `json:"api,omitempty"` 3621} 3622 3623// MarshalJSON is the custom marshaler for ConnectionProperties. 3624func (c ConnectionProperties) MarshalJSON() ([]byte, error) { 3625 objectMap := make(map[string]interface{}) 3626 if c.Name != nil { 3627 objectMap["name"] = c.Name 3628 } 3629 if c.DisplayName != nil { 3630 objectMap["displayName"] = c.DisplayName 3631 } 3632 if c.Statuses != nil { 3633 objectMap["statuses"] = c.Statuses 3634 } 3635 if c.CustomParameterValues != nil { 3636 objectMap["customParameterValues"] = c.CustomParameterValues 3637 } 3638 if c.TenantID != nil { 3639 objectMap["tenantId"] = c.TenantID 3640 } 3641 if c.ParameterValues != nil { 3642 objectMap["parameterValues"] = c.ParameterValues 3643 } 3644 if c.NonSecretParameterValues != nil { 3645 objectMap["nonSecretParameterValues"] = c.NonSecretParameterValues 3646 } 3647 if c.Metadata != nil { 3648 objectMap["metadata"] = c.Metadata 3649 } 3650 if c.FirstExpirationTime != nil { 3651 objectMap["firstExpirationTime"] = c.FirstExpirationTime 3652 } 3653 if c.Keywords != nil { 3654 objectMap["keywords"] = c.Keywords 3655 } 3656 if c.CreatedTime != nil { 3657 objectMap["createdTime"] = c.CreatedTime 3658 } 3659 if c.ChangedTime != nil { 3660 objectMap["changedTime"] = c.ChangedTime 3661 } 3662 if c.API != nil { 3663 objectMap["api"] = c.API 3664 } 3665 return json.Marshal(objectMap) 3666} 3667 3668// ConnectionSecrets ... 3669type ConnectionSecrets struct { 3670 autorest.Response `json:"-"` 3671 // ParameterValues - Tokens/Claim 3672 ParameterValues map[string]interface{} `json:"parameterValues"` 3673 // ConnectionKey - Connection Key 3674 ConnectionKey *string `json:"connectionKey,omitempty"` 3675} 3676 3677// MarshalJSON is the custom marshaler for ConnectionSecrets. 3678func (cs ConnectionSecrets) MarshalJSON() ([]byte, error) { 3679 objectMap := make(map[string]interface{}) 3680 if cs.ParameterValues != nil { 3681 objectMap["parameterValues"] = cs.ParameterValues 3682 } 3683 if cs.ConnectionKey != nil { 3684 objectMap["connectionKey"] = cs.ConnectionKey 3685 } 3686 return json.Marshal(objectMap) 3687} 3688 3689// ConnectionStatus connection status 3690type ConnectionStatus struct { 3691 *ConnectionStatusProperties `json:"properties,omitempty"` 3692 // ID - Resource Id 3693 ID *string `json:"id,omitempty"` 3694 // Name - Resource Name 3695 Name *string `json:"name,omitempty"` 3696 // Kind - Kind of resource 3697 Kind *string `json:"kind,omitempty"` 3698 // Location - Resource Location 3699 Location *string `json:"location,omitempty"` 3700 // Type - Resource type 3701 Type *string `json:"type,omitempty"` 3702 // Tags - Resource tags 3703 Tags map[string]*string `json:"tags"` 3704} 3705 3706// MarshalJSON is the custom marshaler for ConnectionStatus. 3707func (cs ConnectionStatus) MarshalJSON() ([]byte, error) { 3708 objectMap := make(map[string]interface{}) 3709 if cs.ConnectionStatusProperties != nil { 3710 objectMap["properties"] = cs.ConnectionStatusProperties 3711 } 3712 if cs.ID != nil { 3713 objectMap["id"] = cs.ID 3714 } 3715 if cs.Name != nil { 3716 objectMap["name"] = cs.Name 3717 } 3718 if cs.Kind != nil { 3719 objectMap["kind"] = cs.Kind 3720 } 3721 if cs.Location != nil { 3722 objectMap["location"] = cs.Location 3723 } 3724 if cs.Type != nil { 3725 objectMap["type"] = cs.Type 3726 } 3727 if cs.Tags != nil { 3728 objectMap["tags"] = cs.Tags 3729 } 3730 return json.Marshal(objectMap) 3731} 3732 3733// UnmarshalJSON is the custom unmarshaler for ConnectionStatus struct. 3734func (cs *ConnectionStatus) UnmarshalJSON(body []byte) error { 3735 var m map[string]*json.RawMessage 3736 err := json.Unmarshal(body, &m) 3737 if err != nil { 3738 return err 3739 } 3740 for k, v := range m { 3741 switch k { 3742 case "properties": 3743 if v != nil { 3744 var connectionStatusProperties ConnectionStatusProperties 3745 err = json.Unmarshal(*v, &connectionStatusProperties) 3746 if err != nil { 3747 return err 3748 } 3749 cs.ConnectionStatusProperties = &connectionStatusProperties 3750 } 3751 case "id": 3752 if v != nil { 3753 var ID string 3754 err = json.Unmarshal(*v, &ID) 3755 if err != nil { 3756 return err 3757 } 3758 cs.ID = &ID 3759 } 3760 case "name": 3761 if v != nil { 3762 var name string 3763 err = json.Unmarshal(*v, &name) 3764 if err != nil { 3765 return err 3766 } 3767 cs.Name = &name 3768 } 3769 case "kind": 3770 if v != nil { 3771 var kind string 3772 err = json.Unmarshal(*v, &kind) 3773 if err != nil { 3774 return err 3775 } 3776 cs.Kind = &kind 3777 } 3778 case "location": 3779 if v != nil { 3780 var location string 3781 err = json.Unmarshal(*v, &location) 3782 if err != nil { 3783 return err 3784 } 3785 cs.Location = &location 3786 } 3787 case "type": 3788 if v != nil { 3789 var typeVar string 3790 err = json.Unmarshal(*v, &typeVar) 3791 if err != nil { 3792 return err 3793 } 3794 cs.Type = &typeVar 3795 } 3796 case "tags": 3797 if v != nil { 3798 var tags map[string]*string 3799 err = json.Unmarshal(*v, &tags) 3800 if err != nil { 3801 return err 3802 } 3803 cs.Tags = tags 3804 } 3805 } 3806 } 3807 3808 return nil 3809} 3810 3811// ConnectionStatusProperties ... 3812type ConnectionStatusProperties struct { 3813 // Status - Status 3814 Status *string `json:"status,omitempty"` 3815 // Target - Target of the error 3816 Target *string `json:"target,omitempty"` 3817 // Error - Error details 3818 Error *ConnectionError `json:"error,omitempty"` 3819} 3820 3821// ConnectionStringDictionary string dictionary resource 3822type ConnectionStringDictionary struct { 3823 autorest.Response `json:"-"` 3824 // Properties - Connection strings 3825 Properties map[string]*ConnStringValueTypePair `json:"properties"` 3826 // ID - Resource Id 3827 ID *string `json:"id,omitempty"` 3828 // Name - Resource Name 3829 Name *string `json:"name,omitempty"` 3830 // Kind - Kind of resource 3831 Kind *string `json:"kind,omitempty"` 3832 // Location - Resource Location 3833 Location *string `json:"location,omitempty"` 3834 // Type - Resource type 3835 Type *string `json:"type,omitempty"` 3836 // Tags - Resource tags 3837 Tags map[string]*string `json:"tags"` 3838} 3839 3840// MarshalJSON is the custom marshaler for ConnectionStringDictionary. 3841func (csd ConnectionStringDictionary) MarshalJSON() ([]byte, error) { 3842 objectMap := make(map[string]interface{}) 3843 if csd.Properties != nil { 3844 objectMap["properties"] = csd.Properties 3845 } 3846 if csd.ID != nil { 3847 objectMap["id"] = csd.ID 3848 } 3849 if csd.Name != nil { 3850 objectMap["name"] = csd.Name 3851 } 3852 if csd.Kind != nil { 3853 objectMap["kind"] = csd.Kind 3854 } 3855 if csd.Location != nil { 3856 objectMap["location"] = csd.Location 3857 } 3858 if csd.Type != nil { 3859 objectMap["type"] = csd.Type 3860 } 3861 if csd.Tags != nil { 3862 objectMap["tags"] = csd.Tags 3863 } 3864 return json.Marshal(objectMap) 3865} 3866 3867// ConnStringInfo represents database connection string information 3868type ConnStringInfo struct { 3869 // Name - Name of connection string 3870 Name *string `json:"name,omitempty"` 3871 // ConnectionString - Connection string value 3872 ConnectionString *string `json:"connectionString,omitempty"` 3873 // Type - Type of database. Possible values include: 'MySQL', 'SQLServer', 'SQLAzure', 'Custom' 3874 Type DatabaseServerType `json:"type,omitempty"` 3875} 3876 3877// ConnStringValueTypePair database connection string value to type pair 3878type ConnStringValueTypePair struct { 3879 // Value - Value of pair 3880 Value *string `json:"value,omitempty"` 3881 // Type - Type of database. Possible values include: 'MySQL', 'SQLServer', 'SQLAzure', 'Custom' 3882 Type DatabaseServerType `json:"type,omitempty"` 3883} 3884 3885// ConsentLink ... 3886type ConsentLink struct { 3887 // Link - Uri for the consent link 3888 Link *string `json:"link,omitempty"` 3889 // FirstPartyLoginURI - Uri for first party login 3890 FirstPartyLoginURI *string `json:"firstPartyLoginUri,omitempty"` 3891 // DisplayName - Display Name of the parameter in the connection provider's oauthSettings 3892 DisplayName *string `json:"displayName,omitempty"` 3893 // Status - Status of the link. Possible values include: 'Unauthenticated', 'Authenticated', 'Error' 3894 Status LinkState `json:"status,omitempty"` 3895} 3896 3897// ConsentLinkInput connection Consent Link payload 3898type ConsentLinkInput struct { 3899 *ConsentLinkInputProperties `json:"properties,omitempty"` 3900 // ID - Resource Id 3901 ID *string `json:"id,omitempty"` 3902 // Name - Resource Name 3903 Name *string `json:"name,omitempty"` 3904 // Kind - Kind of resource 3905 Kind *string `json:"kind,omitempty"` 3906 // Location - Resource Location 3907 Location *string `json:"location,omitempty"` 3908 // Type - Resource type 3909 Type *string `json:"type,omitempty"` 3910 // Tags - Resource tags 3911 Tags map[string]*string `json:"tags"` 3912} 3913 3914// MarshalJSON is the custom marshaler for ConsentLinkInput. 3915func (cli ConsentLinkInput) MarshalJSON() ([]byte, error) { 3916 objectMap := make(map[string]interface{}) 3917 if cli.ConsentLinkInputProperties != nil { 3918 objectMap["properties"] = cli.ConsentLinkInputProperties 3919 } 3920 if cli.ID != nil { 3921 objectMap["id"] = cli.ID 3922 } 3923 if cli.Name != nil { 3924 objectMap["name"] = cli.Name 3925 } 3926 if cli.Kind != nil { 3927 objectMap["kind"] = cli.Kind 3928 } 3929 if cli.Location != nil { 3930 objectMap["location"] = cli.Location 3931 } 3932 if cli.Type != nil { 3933 objectMap["type"] = cli.Type 3934 } 3935 if cli.Tags != nil { 3936 objectMap["tags"] = cli.Tags 3937 } 3938 return json.Marshal(objectMap) 3939} 3940 3941// UnmarshalJSON is the custom unmarshaler for ConsentLinkInput struct. 3942func (cli *ConsentLinkInput) UnmarshalJSON(body []byte) error { 3943 var m map[string]*json.RawMessage 3944 err := json.Unmarshal(body, &m) 3945 if err != nil { 3946 return err 3947 } 3948 for k, v := range m { 3949 switch k { 3950 case "properties": 3951 if v != nil { 3952 var consentLinkInputProperties ConsentLinkInputProperties 3953 err = json.Unmarshal(*v, &consentLinkInputProperties) 3954 if err != nil { 3955 return err 3956 } 3957 cli.ConsentLinkInputProperties = &consentLinkInputProperties 3958 } 3959 case "id": 3960 if v != nil { 3961 var ID string 3962 err = json.Unmarshal(*v, &ID) 3963 if err != nil { 3964 return err 3965 } 3966 cli.ID = &ID 3967 } 3968 case "name": 3969 if v != nil { 3970 var name string 3971 err = json.Unmarshal(*v, &name) 3972 if err != nil { 3973 return err 3974 } 3975 cli.Name = &name 3976 } 3977 case "kind": 3978 if v != nil { 3979 var kind string 3980 err = json.Unmarshal(*v, &kind) 3981 if err != nil { 3982 return err 3983 } 3984 cli.Kind = &kind 3985 } 3986 case "location": 3987 if v != nil { 3988 var location string 3989 err = json.Unmarshal(*v, &location) 3990 if err != nil { 3991 return err 3992 } 3993 cli.Location = &location 3994 } 3995 case "type": 3996 if v != nil { 3997 var typeVar string 3998 err = json.Unmarshal(*v, &typeVar) 3999 if err != nil { 4000 return err 4001 } 4002 cli.Type = &typeVar 4003 } 4004 case "tags": 4005 if v != nil { 4006 var tags map[string]*string 4007 err = json.Unmarshal(*v, &tags) 4008 if err != nil { 4009 return err 4010 } 4011 cli.Tags = tags 4012 } 4013 } 4014 } 4015 4016 return nil 4017} 4018 4019// ConsentLinkInputParameter ... 4020type ConsentLinkInputParameter struct { 4021 // PrincipalType - Principal type. Possible values include: 'PrincipalTypeActiveDirectory', 'PrincipalTypeConnection', 'PrincipalTypeMicrosoftAccount' 4022 PrincipalType PrincipalType `json:"principalType,omitempty"` 4023 // TenantID - Tenant Id 4024 TenantID *string `json:"tenantId,omitempty"` 4025 // ObjectID - AAD OID (user or group) if the principal type is ActiveDirectory. 4026 // MSA PUID if the principal type is MicrosoftAccount. 4027 ObjectID *string `json:"objectId,omitempty"` 4028 // ParameterName - Name of the parameter in the connection provider's oauthSettings 4029 ParameterName *string `json:"parameterName,omitempty"` 4030 // RedirectURL - Name of the parameter in the connection provider's oauthSettings 4031 RedirectURL *string `json:"redirectUrl,omitempty"` 4032} 4033 4034// ConsentLinkInputProperties ... 4035type ConsentLinkInputProperties struct { 4036 // Parameters - Array of links 4037 Parameters *[]ConsentLinkInputParameter `json:"parameters,omitempty"` 4038} 4039 4040// ConsentLinkPayload collection of consent links 4041type ConsentLinkPayload struct { 4042 autorest.Response `json:"-"` 4043 // Value - Collection of resources 4044 Value *[]ConsentLink `json:"value,omitempty"` 4045} 4046 4047// Contact contact information for domain registration. If 'Domain Privacy' option is not selected then the 4048// contact information will be made publicly available through the Whois directories as per ICANN 4049// requirements. 4050type Contact struct { 4051 // AddressMailing - Mailing address 4052 AddressMailing *Address `json:"addressMailing,omitempty"` 4053 // Email - Email address 4054 Email *string `json:"email,omitempty"` 4055 // Fax - Fax number 4056 Fax *string `json:"fax,omitempty"` 4057 // JobTitle - Job title 4058 JobTitle *string `json:"jobTitle,omitempty"` 4059 // NameFirst - First name 4060 NameFirst *string `json:"nameFirst,omitempty"` 4061 // NameLast - Last name 4062 NameLast *string `json:"nameLast,omitempty"` 4063 // NameMiddle - Middle name 4064 NameMiddle *string `json:"nameMiddle,omitempty"` 4065 // Organization - Organization 4066 Organization *string `json:"organization,omitempty"` 4067 // Phone - Phone number 4068 Phone *string `json:"phone,omitempty"` 4069} 4070 4071// CorsSettings cross-Origin Resource Sharing (CORS) settings for the web app. 4072type CorsSettings struct { 4073 // AllowedOrigins - Gets or sets the list of origins that should be allowed to make cross-origin 4074 // calls (for example: http://example.com:12345). Use "*" to allow all. 4075 AllowedOrigins *[]string `json:"allowedOrigins,omitempty"` 4076} 4077 4078// CsmMoveResourceEnvelope class containing a list of the resources that need to be moved and the resource 4079// group they should be moved to 4080type CsmMoveResourceEnvelope struct { 4081 TargetResourceGroup *string `json:"targetResourceGroup,omitempty"` 4082 Resources *[]string `json:"resources,omitempty"` 4083} 4084 4085// CsmPublishingProfileOptions publishing options for requested profile 4086type CsmPublishingProfileOptions struct { 4087 // Format - Name of the format. Valid values are: 4088 // FileZilla3 4089 // WebDeploy -- default 4090 // Ftp 4091 Format *string `json:"format,omitempty"` 4092} 4093 4094// CsmSiteRecoveryEntity class containing details about site recovery operation. 4095type CsmSiteRecoveryEntity struct { 4096 // SnapshotTime - Point in time in which the site recover should be attempted. 4097 SnapshotTime *date.Time `json:"snapshotTime,omitempty"` 4098 // RecoverConfig - If true, then the website's configuration will be reverted to its state at SnapshotTime 4099 RecoverConfig *bool `json:"recoverConfig,omitempty"` 4100 // SiteName - [Optional] Destination web app name into which web app should be recovered. This is case when new web app should be created instead. 4101 SiteName *string `json:"siteName,omitempty"` 4102 // SlotName - [Optional] Destination web app slot name into which web app should be recovered 4103 SlotName *string `json:"slotName,omitempty"` 4104} 4105 4106// CsmSlotEntity class containing deployment slot parameters 4107type CsmSlotEntity struct { 4108 // TargetSlot - Set the destination deployment slot during swap operation 4109 TargetSlot *string `json:"targetSlot,omitempty"` 4110 // PreserveVnet - Get or set the flag indicating it should preserve VNet to the slot during swap 4111 PreserveVnet *bool `json:"preserveVnet,omitempty"` 4112} 4113 4114// CsmUsageQuota usage of the quota resource 4115type CsmUsageQuota struct { 4116 // Unit - Units of measurement for the quota resource 4117 Unit *string `json:"unit,omitempty"` 4118 // NextResetTime - Next reset time for the resource counter 4119 NextResetTime *date.Time `json:"nextResetTime,omitempty"` 4120 // CurrentValue - The current value of the resource counter 4121 CurrentValue *int64 `json:"currentValue,omitempty"` 4122 // Limit - The resource limit 4123 Limit *int64 `json:"limit,omitempty"` 4124 // Name - Quota name 4125 Name *LocalizableString `json:"name,omitempty"` 4126} 4127 4128// CsmUsageQuotaCollection collection of csm usage quotas 4129type CsmUsageQuotaCollection struct { 4130 autorest.Response `json:"-"` 4131 // Value - Collection of resources 4132 Value *[]CsmUsageQuota `json:"value,omitempty"` 4133 // NextLink - Link to next page of resources 4134 NextLink *string `json:"nextLink,omitempty"` 4135} 4136 4137// CsmUsageQuotaCollectionIterator provides access to a complete listing of CsmUsageQuota values. 4138type CsmUsageQuotaCollectionIterator struct { 4139 i int 4140 page CsmUsageQuotaCollectionPage 4141} 4142 4143// NextWithContext advances to the next value. If there was an error making 4144// the request the iterator does not advance and the error is returned. 4145func (iter *CsmUsageQuotaCollectionIterator) NextWithContext(ctx context.Context) (err error) { 4146 if tracing.IsEnabled() { 4147 ctx = tracing.StartSpan(ctx, fqdn+"/CsmUsageQuotaCollectionIterator.NextWithContext") 4148 defer func() { 4149 sc := -1 4150 if iter.Response().Response.Response != nil { 4151 sc = iter.Response().Response.Response.StatusCode 4152 } 4153 tracing.EndSpan(ctx, sc, err) 4154 }() 4155 } 4156 iter.i++ 4157 if iter.i < len(iter.page.Values()) { 4158 return nil 4159 } 4160 err = iter.page.NextWithContext(ctx) 4161 if err != nil { 4162 iter.i-- 4163 return err 4164 } 4165 iter.i = 0 4166 return nil 4167} 4168 4169// Next advances to the next value. If there was an error making 4170// the request the iterator does not advance and the error is returned. 4171// Deprecated: Use NextWithContext() instead. 4172func (iter *CsmUsageQuotaCollectionIterator) Next() error { 4173 return iter.NextWithContext(context.Background()) 4174} 4175 4176// NotDone returns true if the enumeration should be started or is not yet complete. 4177func (iter CsmUsageQuotaCollectionIterator) NotDone() bool { 4178 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 4179} 4180 4181// Response returns the raw server response from the last page request. 4182func (iter CsmUsageQuotaCollectionIterator) Response() CsmUsageQuotaCollection { 4183 return iter.page.Response() 4184} 4185 4186// Value returns the current value or a zero-initialized value if the 4187// iterator has advanced beyond the end of the collection. 4188func (iter CsmUsageQuotaCollectionIterator) Value() CsmUsageQuota { 4189 if !iter.page.NotDone() { 4190 return CsmUsageQuota{} 4191 } 4192 return iter.page.Values()[iter.i] 4193} 4194 4195// Creates a new instance of the CsmUsageQuotaCollectionIterator type. 4196func NewCsmUsageQuotaCollectionIterator(page CsmUsageQuotaCollectionPage) CsmUsageQuotaCollectionIterator { 4197 return CsmUsageQuotaCollectionIterator{page: page} 4198} 4199 4200// IsEmpty returns true if the ListResult contains no values. 4201func (cuqc CsmUsageQuotaCollection) IsEmpty() bool { 4202 return cuqc.Value == nil || len(*cuqc.Value) == 0 4203} 4204 4205// hasNextLink returns true if the NextLink is not empty. 4206func (cuqc CsmUsageQuotaCollection) hasNextLink() bool { 4207 return cuqc.NextLink != nil && len(*cuqc.NextLink) != 0 4208} 4209 4210// csmUsageQuotaCollectionPreparer prepares a request to retrieve the next set of results. 4211// It returns nil if no more results exist. 4212func (cuqc CsmUsageQuotaCollection) csmUsageQuotaCollectionPreparer(ctx context.Context) (*http.Request, error) { 4213 if !cuqc.hasNextLink() { 4214 return nil, nil 4215 } 4216 return autorest.Prepare((&http.Request{}).WithContext(ctx), 4217 autorest.AsJSON(), 4218 autorest.AsGet(), 4219 autorest.WithBaseURL(to.String(cuqc.NextLink))) 4220} 4221 4222// CsmUsageQuotaCollectionPage contains a page of CsmUsageQuota values. 4223type CsmUsageQuotaCollectionPage struct { 4224 fn func(context.Context, CsmUsageQuotaCollection) (CsmUsageQuotaCollection, error) 4225 cuqc CsmUsageQuotaCollection 4226} 4227 4228// NextWithContext advances to the next page of values. If there was an error making 4229// the request the page does not advance and the error is returned. 4230func (page *CsmUsageQuotaCollectionPage) NextWithContext(ctx context.Context) (err error) { 4231 if tracing.IsEnabled() { 4232 ctx = tracing.StartSpan(ctx, fqdn+"/CsmUsageQuotaCollectionPage.NextWithContext") 4233 defer func() { 4234 sc := -1 4235 if page.Response().Response.Response != nil { 4236 sc = page.Response().Response.Response.StatusCode 4237 } 4238 tracing.EndSpan(ctx, sc, err) 4239 }() 4240 } 4241 for { 4242 next, err := page.fn(ctx, page.cuqc) 4243 if err != nil { 4244 return err 4245 } 4246 page.cuqc = next 4247 if !next.hasNextLink() || !next.IsEmpty() { 4248 break 4249 } 4250 } 4251 return nil 4252} 4253 4254// Next advances to the next page of values. If there was an error making 4255// the request the page does not advance and the error is returned. 4256// Deprecated: Use NextWithContext() instead. 4257func (page *CsmUsageQuotaCollectionPage) Next() error { 4258 return page.NextWithContext(context.Background()) 4259} 4260 4261// NotDone returns true if the page enumeration should be started or is not yet complete. 4262func (page CsmUsageQuotaCollectionPage) NotDone() bool { 4263 return !page.cuqc.IsEmpty() 4264} 4265 4266// Response returns the raw server response from the last page request. 4267func (page CsmUsageQuotaCollectionPage) Response() CsmUsageQuotaCollection { 4268 return page.cuqc 4269} 4270 4271// Values returns the slice of values for the current page or nil if there are no values. 4272func (page CsmUsageQuotaCollectionPage) Values() []CsmUsageQuota { 4273 if page.cuqc.IsEmpty() { 4274 return nil 4275 } 4276 return *page.cuqc.Value 4277} 4278 4279// Creates a new instance of the CsmUsageQuotaCollectionPage type. 4280func NewCsmUsageQuotaCollectionPage(cur CsmUsageQuotaCollection, getNextPage func(context.Context, CsmUsageQuotaCollection) (CsmUsageQuotaCollection, error)) CsmUsageQuotaCollectionPage { 4281 return CsmUsageQuotaCollectionPage{ 4282 fn: getNextPage, 4283 cuqc: cur, 4284 } 4285} 4286 4287// Csr certificate signing request object 4288type Csr struct { 4289 autorest.Response `json:"-"` 4290 *CsrProperties `json:"properties,omitempty"` 4291 // ID - Resource Id 4292 ID *string `json:"id,omitempty"` 4293 // Name - Resource Name 4294 Name *string `json:"name,omitempty"` 4295 // Kind - Kind of resource 4296 Kind *string `json:"kind,omitempty"` 4297 // Location - Resource Location 4298 Location *string `json:"location,omitempty"` 4299 // Type - Resource type 4300 Type *string `json:"type,omitempty"` 4301 // Tags - Resource tags 4302 Tags map[string]*string `json:"tags"` 4303} 4304 4305// MarshalJSON is the custom marshaler for Csr. 4306func (c Csr) MarshalJSON() ([]byte, error) { 4307 objectMap := make(map[string]interface{}) 4308 if c.CsrProperties != nil { 4309 objectMap["properties"] = c.CsrProperties 4310 } 4311 if c.ID != nil { 4312 objectMap["id"] = c.ID 4313 } 4314 if c.Name != nil { 4315 objectMap["name"] = c.Name 4316 } 4317 if c.Kind != nil { 4318 objectMap["kind"] = c.Kind 4319 } 4320 if c.Location != nil { 4321 objectMap["location"] = c.Location 4322 } 4323 if c.Type != nil { 4324 objectMap["type"] = c.Type 4325 } 4326 if c.Tags != nil { 4327 objectMap["tags"] = c.Tags 4328 } 4329 return json.Marshal(objectMap) 4330} 4331 4332// UnmarshalJSON is the custom unmarshaler for Csr struct. 4333func (c *Csr) UnmarshalJSON(body []byte) error { 4334 var m map[string]*json.RawMessage 4335 err := json.Unmarshal(body, &m) 4336 if err != nil { 4337 return err 4338 } 4339 for k, v := range m { 4340 switch k { 4341 case "properties": 4342 if v != nil { 4343 var csrProperties CsrProperties 4344 err = json.Unmarshal(*v, &csrProperties) 4345 if err != nil { 4346 return err 4347 } 4348 c.CsrProperties = &csrProperties 4349 } 4350 case "id": 4351 if v != nil { 4352 var ID string 4353 err = json.Unmarshal(*v, &ID) 4354 if err != nil { 4355 return err 4356 } 4357 c.ID = &ID 4358 } 4359 case "name": 4360 if v != nil { 4361 var name string 4362 err = json.Unmarshal(*v, &name) 4363 if err != nil { 4364 return err 4365 } 4366 c.Name = &name 4367 } 4368 case "kind": 4369 if v != nil { 4370 var kind string 4371 err = json.Unmarshal(*v, &kind) 4372 if err != nil { 4373 return err 4374 } 4375 c.Kind = &kind 4376 } 4377 case "location": 4378 if v != nil { 4379 var location string 4380 err = json.Unmarshal(*v, &location) 4381 if err != nil { 4382 return err 4383 } 4384 c.Location = &location 4385 } 4386 case "type": 4387 if v != nil { 4388 var typeVar string 4389 err = json.Unmarshal(*v, &typeVar) 4390 if err != nil { 4391 return err 4392 } 4393 c.Type = &typeVar 4394 } 4395 case "tags": 4396 if v != nil { 4397 var tags map[string]*string 4398 err = json.Unmarshal(*v, &tags) 4399 if err != nil { 4400 return err 4401 } 4402 c.Tags = tags 4403 } 4404 } 4405 } 4406 4407 return nil 4408} 4409 4410// CsrProperties ... 4411type CsrProperties struct { 4412 // Name - Name used to locate CSR object 4413 Name *string `json:"name,omitempty"` 4414 // DistinguishedName - Distinguished name of certificate to be created 4415 DistinguishedName *string `json:"distinguishedName,omitempty"` 4416 // CsrString - Actual CSR string created 4417 CsrString *string `json:"csrString,omitempty"` 4418 // PfxBlob - PFX certificate of created certificate 4419 PfxBlob *string `json:"pfxBlob,omitempty"` 4420 // Password - PFX password 4421 Password *string `json:"password,omitempty"` 4422 // PublicKeyHash - Hash of the certificates public key 4423 PublicKeyHash *string `json:"publicKeyHash,omitempty"` 4424 // HostingEnvironment - Hosting environment 4425 HostingEnvironment *string `json:"hostingEnvironment,omitempty"` 4426} 4427 4428// CustomLoginSettingValue custom logging setting value 4429type CustomLoginSettingValue struct { 4430 *CustomLoginSettingValueProperties `json:"properties,omitempty"` 4431 // ID - Resource Id 4432 ID *string `json:"id,omitempty"` 4433 // Name - Resource Name 4434 Name *string `json:"name,omitempty"` 4435 // Kind - Kind of resource 4436 Kind *string `json:"kind,omitempty"` 4437 // Location - Resource Location 4438 Location *string `json:"location,omitempty"` 4439 // Type - Resource type 4440 Type *string `json:"type,omitempty"` 4441 // Tags - Resource tags 4442 Tags map[string]*string `json:"tags"` 4443} 4444 4445// MarshalJSON is the custom marshaler for CustomLoginSettingValue. 4446func (clsv CustomLoginSettingValue) MarshalJSON() ([]byte, error) { 4447 objectMap := make(map[string]interface{}) 4448 if clsv.CustomLoginSettingValueProperties != nil { 4449 objectMap["properties"] = clsv.CustomLoginSettingValueProperties 4450 } 4451 if clsv.ID != nil { 4452 objectMap["id"] = clsv.ID 4453 } 4454 if clsv.Name != nil { 4455 objectMap["name"] = clsv.Name 4456 } 4457 if clsv.Kind != nil { 4458 objectMap["kind"] = clsv.Kind 4459 } 4460 if clsv.Location != nil { 4461 objectMap["location"] = clsv.Location 4462 } 4463 if clsv.Type != nil { 4464 objectMap["type"] = clsv.Type 4465 } 4466 if clsv.Tags != nil { 4467 objectMap["tags"] = clsv.Tags 4468 } 4469 return json.Marshal(objectMap) 4470} 4471 4472// UnmarshalJSON is the custom unmarshaler for CustomLoginSettingValue struct. 4473func (clsv *CustomLoginSettingValue) UnmarshalJSON(body []byte) error { 4474 var m map[string]*json.RawMessage 4475 err := json.Unmarshal(body, &m) 4476 if err != nil { 4477 return err 4478 } 4479 for k, v := range m { 4480 switch k { 4481 case "properties": 4482 if v != nil { 4483 var customLoginSettingValueProperties CustomLoginSettingValueProperties 4484 err = json.Unmarshal(*v, &customLoginSettingValueProperties) 4485 if err != nil { 4486 return err 4487 } 4488 clsv.CustomLoginSettingValueProperties = &customLoginSettingValueProperties 4489 } 4490 case "id": 4491 if v != nil { 4492 var ID string 4493 err = json.Unmarshal(*v, &ID) 4494 if err != nil { 4495 return err 4496 } 4497 clsv.ID = &ID 4498 } 4499 case "name": 4500 if v != nil { 4501 var name string 4502 err = json.Unmarshal(*v, &name) 4503 if err != nil { 4504 return err 4505 } 4506 clsv.Name = &name 4507 } 4508 case "kind": 4509 if v != nil { 4510 var kind string 4511 err = json.Unmarshal(*v, &kind) 4512 if err != nil { 4513 return err 4514 } 4515 clsv.Kind = &kind 4516 } 4517 case "location": 4518 if v != nil { 4519 var location string 4520 err = json.Unmarshal(*v, &location) 4521 if err != nil { 4522 return err 4523 } 4524 clsv.Location = &location 4525 } 4526 case "type": 4527 if v != nil { 4528 var typeVar string 4529 err = json.Unmarshal(*v, &typeVar) 4530 if err != nil { 4531 return err 4532 } 4533 clsv.Type = &typeVar 4534 } 4535 case "tags": 4536 if v != nil { 4537 var tags map[string]*string 4538 err = json.Unmarshal(*v, &tags) 4539 if err != nil { 4540 return err 4541 } 4542 clsv.Tags = tags 4543 } 4544 } 4545 } 4546 4547 return nil 4548} 4549 4550// CustomLoginSettingValueProperties ... 4551type CustomLoginSettingValueProperties struct { 4552 // Option - Option selected for this custom login setting value 4553 Option *string `json:"option,omitempty"` 4554} 4555 4556// DatabaseBackupSetting note: properties are serialized in JSON format and stored in DB. 4557// if new properties are added they might not be in the previous data rows 4558// so please handle nulls 4559type DatabaseBackupSetting struct { 4560 // DatabaseType - SqlAzure / MySql 4561 DatabaseType *string `json:"databaseType,omitempty"` 4562 Name *string `json:"name,omitempty"` 4563 // ConnectionStringName - Contains a connection string name that is linked to the SiteConfig.ConnectionStrings. 4564 // This is used during restore with overwrite connection strings options. 4565 ConnectionStringName *string `json:"connectionStringName,omitempty"` 4566 // ConnectionString - Contains a connection string to a database which is being backed up/restored. If the restore should happen to a new database, the database name inside is the new one. 4567 ConnectionString *string `json:"connectionString,omitempty"` 4568} 4569 4570// DeletedSite reports deleted site including the timestamp of operation 4571type DeletedSite struct { 4572 *DeletedSiteProperties `json:"properties,omitempty"` 4573 // ID - Resource Id 4574 ID *string `json:"id,omitempty"` 4575 // Name - Resource Name 4576 Name *string `json:"name,omitempty"` 4577 // Kind - Kind of resource 4578 Kind *string `json:"kind,omitempty"` 4579 // Location - Resource Location 4580 Location *string `json:"location,omitempty"` 4581 // Type - Resource type 4582 Type *string `json:"type,omitempty"` 4583 // Tags - Resource tags 4584 Tags map[string]*string `json:"tags"` 4585} 4586 4587// MarshalJSON is the custom marshaler for DeletedSite. 4588func (ds DeletedSite) MarshalJSON() ([]byte, error) { 4589 objectMap := make(map[string]interface{}) 4590 if ds.DeletedSiteProperties != nil { 4591 objectMap["properties"] = ds.DeletedSiteProperties 4592 } 4593 if ds.ID != nil { 4594 objectMap["id"] = ds.ID 4595 } 4596 if ds.Name != nil { 4597 objectMap["name"] = ds.Name 4598 } 4599 if ds.Kind != nil { 4600 objectMap["kind"] = ds.Kind 4601 } 4602 if ds.Location != nil { 4603 objectMap["location"] = ds.Location 4604 } 4605 if ds.Type != nil { 4606 objectMap["type"] = ds.Type 4607 } 4608 if ds.Tags != nil { 4609 objectMap["tags"] = ds.Tags 4610 } 4611 return json.Marshal(objectMap) 4612} 4613 4614// UnmarshalJSON is the custom unmarshaler for DeletedSite struct. 4615func (ds *DeletedSite) UnmarshalJSON(body []byte) error { 4616 var m map[string]*json.RawMessage 4617 err := json.Unmarshal(body, &m) 4618 if err != nil { 4619 return err 4620 } 4621 for k, v := range m { 4622 switch k { 4623 case "properties": 4624 if v != nil { 4625 var deletedSiteProperties DeletedSiteProperties 4626 err = json.Unmarshal(*v, &deletedSiteProperties) 4627 if err != nil { 4628 return err 4629 } 4630 ds.DeletedSiteProperties = &deletedSiteProperties 4631 } 4632 case "id": 4633 if v != nil { 4634 var ID string 4635 err = json.Unmarshal(*v, &ID) 4636 if err != nil { 4637 return err 4638 } 4639 ds.ID = &ID 4640 } 4641 case "name": 4642 if v != nil { 4643 var name string 4644 err = json.Unmarshal(*v, &name) 4645 if err != nil { 4646 return err 4647 } 4648 ds.Name = &name 4649 } 4650 case "kind": 4651 if v != nil { 4652 var kind string 4653 err = json.Unmarshal(*v, &kind) 4654 if err != nil { 4655 return err 4656 } 4657 ds.Kind = &kind 4658 } 4659 case "location": 4660 if v != nil { 4661 var location string 4662 err = json.Unmarshal(*v, &location) 4663 if err != nil { 4664 return err 4665 } 4666 ds.Location = &location 4667 } 4668 case "type": 4669 if v != nil { 4670 var typeVar string 4671 err = json.Unmarshal(*v, &typeVar) 4672 if err != nil { 4673 return err 4674 } 4675 ds.Type = &typeVar 4676 } 4677 case "tags": 4678 if v != nil { 4679 var tags map[string]*string 4680 err = json.Unmarshal(*v, &tags) 4681 if err != nil { 4682 return err 4683 } 4684 ds.Tags = tags 4685 } 4686 } 4687 } 4688 4689 return nil 4690} 4691 4692// DeletedSiteCollection collection of deleted sites 4693type DeletedSiteCollection struct { 4694 autorest.Response `json:"-"` 4695 // Value - Collection of resources 4696 Value *[]DeletedSite `json:"value,omitempty"` 4697 // NextLink - Link to next page of resources 4698 NextLink *string `json:"nextLink,omitempty"` 4699} 4700 4701// DeletedSiteCollectionIterator provides access to a complete listing of DeletedSite values. 4702type DeletedSiteCollectionIterator struct { 4703 i int 4704 page DeletedSiteCollectionPage 4705} 4706 4707// NextWithContext advances to the next value. If there was an error making 4708// the request the iterator does not advance and the error is returned. 4709func (iter *DeletedSiteCollectionIterator) NextWithContext(ctx context.Context) (err error) { 4710 if tracing.IsEnabled() { 4711 ctx = tracing.StartSpan(ctx, fqdn+"/DeletedSiteCollectionIterator.NextWithContext") 4712 defer func() { 4713 sc := -1 4714 if iter.Response().Response.Response != nil { 4715 sc = iter.Response().Response.Response.StatusCode 4716 } 4717 tracing.EndSpan(ctx, sc, err) 4718 }() 4719 } 4720 iter.i++ 4721 if iter.i < len(iter.page.Values()) { 4722 return nil 4723 } 4724 err = iter.page.NextWithContext(ctx) 4725 if err != nil { 4726 iter.i-- 4727 return err 4728 } 4729 iter.i = 0 4730 return nil 4731} 4732 4733// Next advances to the next value. If there was an error making 4734// the request the iterator does not advance and the error is returned. 4735// Deprecated: Use NextWithContext() instead. 4736func (iter *DeletedSiteCollectionIterator) Next() error { 4737 return iter.NextWithContext(context.Background()) 4738} 4739 4740// NotDone returns true if the enumeration should be started or is not yet complete. 4741func (iter DeletedSiteCollectionIterator) NotDone() bool { 4742 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 4743} 4744 4745// Response returns the raw server response from the last page request. 4746func (iter DeletedSiteCollectionIterator) Response() DeletedSiteCollection { 4747 return iter.page.Response() 4748} 4749 4750// Value returns the current value or a zero-initialized value if the 4751// iterator has advanced beyond the end of the collection. 4752func (iter DeletedSiteCollectionIterator) Value() DeletedSite { 4753 if !iter.page.NotDone() { 4754 return DeletedSite{} 4755 } 4756 return iter.page.Values()[iter.i] 4757} 4758 4759// Creates a new instance of the DeletedSiteCollectionIterator type. 4760func NewDeletedSiteCollectionIterator(page DeletedSiteCollectionPage) DeletedSiteCollectionIterator { 4761 return DeletedSiteCollectionIterator{page: page} 4762} 4763 4764// IsEmpty returns true if the ListResult contains no values. 4765func (dsc DeletedSiteCollection) IsEmpty() bool { 4766 return dsc.Value == nil || len(*dsc.Value) == 0 4767} 4768 4769// hasNextLink returns true if the NextLink is not empty. 4770func (dsc DeletedSiteCollection) hasNextLink() bool { 4771 return dsc.NextLink != nil && len(*dsc.NextLink) != 0 4772} 4773 4774// deletedSiteCollectionPreparer prepares a request to retrieve the next set of results. 4775// It returns nil if no more results exist. 4776func (dsc DeletedSiteCollection) deletedSiteCollectionPreparer(ctx context.Context) (*http.Request, error) { 4777 if !dsc.hasNextLink() { 4778 return nil, nil 4779 } 4780 return autorest.Prepare((&http.Request{}).WithContext(ctx), 4781 autorest.AsJSON(), 4782 autorest.AsGet(), 4783 autorest.WithBaseURL(to.String(dsc.NextLink))) 4784} 4785 4786// DeletedSiteCollectionPage contains a page of DeletedSite values. 4787type DeletedSiteCollectionPage struct { 4788 fn func(context.Context, DeletedSiteCollection) (DeletedSiteCollection, error) 4789 dsc DeletedSiteCollection 4790} 4791 4792// NextWithContext advances to the next page of values. If there was an error making 4793// the request the page does not advance and the error is returned. 4794func (page *DeletedSiteCollectionPage) NextWithContext(ctx context.Context) (err error) { 4795 if tracing.IsEnabled() { 4796 ctx = tracing.StartSpan(ctx, fqdn+"/DeletedSiteCollectionPage.NextWithContext") 4797 defer func() { 4798 sc := -1 4799 if page.Response().Response.Response != nil { 4800 sc = page.Response().Response.Response.StatusCode 4801 } 4802 tracing.EndSpan(ctx, sc, err) 4803 }() 4804 } 4805 for { 4806 next, err := page.fn(ctx, page.dsc) 4807 if err != nil { 4808 return err 4809 } 4810 page.dsc = next 4811 if !next.hasNextLink() || !next.IsEmpty() { 4812 break 4813 } 4814 } 4815 return nil 4816} 4817 4818// Next advances to the next page of values. If there was an error making 4819// the request the page does not advance and the error is returned. 4820// Deprecated: Use NextWithContext() instead. 4821func (page *DeletedSiteCollectionPage) Next() error { 4822 return page.NextWithContext(context.Background()) 4823} 4824 4825// NotDone returns true if the page enumeration should be started or is not yet complete. 4826func (page DeletedSiteCollectionPage) NotDone() bool { 4827 return !page.dsc.IsEmpty() 4828} 4829 4830// Response returns the raw server response from the last page request. 4831func (page DeletedSiteCollectionPage) Response() DeletedSiteCollection { 4832 return page.dsc 4833} 4834 4835// Values returns the slice of values for the current page or nil if there are no values. 4836func (page DeletedSiteCollectionPage) Values() []DeletedSite { 4837 if page.dsc.IsEmpty() { 4838 return nil 4839 } 4840 return *page.dsc.Value 4841} 4842 4843// Creates a new instance of the DeletedSiteCollectionPage type. 4844func NewDeletedSiteCollectionPage(cur DeletedSiteCollection, getNextPage func(context.Context, DeletedSiteCollection) (DeletedSiteCollection, error)) DeletedSiteCollectionPage { 4845 return DeletedSiteCollectionPage{ 4846 fn: getNextPage, 4847 dsc: cur, 4848 } 4849} 4850 4851// DeletedSiteProperties ... 4852type DeletedSiteProperties struct { 4853 // DeletedTimestamp - Time when the site was deleted 4854 DeletedTimestamp *date.Time `json:"deletedTimestamp,omitempty"` 4855 // Name - Name of web app 4856 Name *string `json:"name,omitempty"` 4857 // State - READ-ONLY; State of the web app 4858 State *string `json:"state,omitempty"` 4859 // HostNames - READ-ONLY; Hostnames associated with web app 4860 HostNames *[]string `json:"hostNames,omitempty"` 4861 // RepositorySiteName - READ-ONLY; Name of repository site 4862 RepositorySiteName *string `json:"repositorySiteName,omitempty"` 4863 // UsageState - READ-ONLY; State indicating whether web app has exceeded its quota usage. Possible values include: 'UsageStateNormal', 'UsageStateExceeded' 4864 UsageState UsageState `json:"usageState,omitempty"` 4865 // Enabled - True if the site is enabled; otherwise, false. Setting this value to false disables the site (takes the site off line). 4866 Enabled *bool `json:"enabled,omitempty"` 4867 // EnabledHostNames - READ-ONLY; Hostnames for the web app that are enabled. Hostnames need to be assigned and enabled. If some hostnames are assigned but not enabled 4868 // the app is not served on those hostnames 4869 EnabledHostNames *[]string `json:"enabledHostNames,omitempty"` 4870 // AvailabilityState - READ-ONLY; Management information availability state for the web app. Possible values are Normal or Limited. 4871 // Normal means that the site is running correctly and that management information for the site is available. 4872 // Limited means that only partial management information for the site is available and that detailed site information is unavailable. Possible values include: 'Normal', 'Limited', 'DisasterRecoveryMode' 4873 AvailabilityState SiteAvailabilityState `json:"availabilityState,omitempty"` 4874 // HostNameSslStates - Hostname SSL states are used to manage the SSL bindings for site's hostnames. 4875 HostNameSslStates *[]HostNameSslState `json:"hostNameSslStates,omitempty"` 4876 ServerFarmID *string `json:"serverFarmId,omitempty"` 4877 // LastModifiedTimeUtc - READ-ONLY; Last time web app was modified in UTC 4878 LastModifiedTimeUtc *date.Time `json:"lastModifiedTimeUtc,omitempty"` 4879 // SiteConfig - Configuration of web app 4880 SiteConfig *SiteConfig `json:"siteConfig,omitempty"` 4881 // TrafficManagerHostNames - READ-ONLY; Read-only list of Azure Traffic manager hostnames associated with web app 4882 TrafficManagerHostNames *[]string `json:"trafficManagerHostNames,omitempty"` 4883 // PremiumAppDeployed - READ-ONLY; If set indicates whether web app is deployed as a premium app 4884 PremiumAppDeployed *bool `json:"premiumAppDeployed,omitempty"` 4885 // ScmSiteAlsoStopped - If set indicates whether to stop SCM (KUDU) site when the web app is stopped. Default is false. 4886 ScmSiteAlsoStopped *bool `json:"scmSiteAlsoStopped,omitempty"` 4887 // TargetSwapSlot - READ-ONLY; Read-only property that specifies which slot this app will swap into 4888 TargetSwapSlot *string `json:"targetSwapSlot,omitempty"` 4889 // HostingEnvironmentProfile - Specification for the hosting environment (App Service Environment) to use for the web app 4890 HostingEnvironmentProfile *HostingEnvironmentProfile `json:"hostingEnvironmentProfile,omitempty"` 4891 MicroService *string `json:"microService,omitempty"` 4892 // GatewaySiteName - Name of gateway app associated with web app 4893 GatewaySiteName *string `json:"gatewaySiteName,omitempty"` 4894 // ClientAffinityEnabled - Specifies if the client affinity is enabled when load balancing http request for multiple instances of the web app 4895 ClientAffinityEnabled *bool `json:"clientAffinityEnabled,omitempty"` 4896 // ClientCertEnabled - Specifies if the client certificate is enabled for the web app 4897 ClientCertEnabled *bool `json:"clientCertEnabled,omitempty"` 4898 // HostNamesDisabled - Specifies if the public hostnames are disabled the web app. 4899 // If set to true the app is only accessible via API Management process 4900 HostNamesDisabled *bool `json:"hostNamesDisabled,omitempty"` 4901 // OutboundIPAddresses - READ-ONLY; List of comma separated IP addresses that this web app uses for outbound connections. Those can be used when configuring firewall rules for databases accessed by this web app. 4902 OutboundIPAddresses *string `json:"outboundIpAddresses,omitempty"` 4903 // ContainerSize - Size of a function container 4904 ContainerSize *int32 `json:"containerSize,omitempty"` 4905 // MaxNumberOfWorkers - Maximum number of workers 4906 // This only applies to function container 4907 MaxNumberOfWorkers *int32 `json:"maxNumberOfWorkers,omitempty"` 4908 // CloningInfo - This is only valid for web app creation. If specified, web app is cloned from 4909 // a source web app 4910 CloningInfo *CloningInfo `json:"cloningInfo,omitempty"` 4911 // ResourceGroup - READ-ONLY; Resource group web app belongs to 4912 ResourceGroup *string `json:"resourceGroup,omitempty"` 4913 // IsDefaultContainer - READ-ONLY; Site is a default container 4914 IsDefaultContainer *bool `json:"isDefaultContainer,omitempty"` 4915 // DefaultHostName - READ-ONLY; Default hostname of the web app 4916 DefaultHostName *string `json:"defaultHostName,omitempty"` 4917} 4918 4919// MarshalJSON is the custom marshaler for DeletedSiteProperties. 4920func (ds DeletedSiteProperties) MarshalJSON() ([]byte, error) { 4921 objectMap := make(map[string]interface{}) 4922 if ds.DeletedTimestamp != nil { 4923 objectMap["deletedTimestamp"] = ds.DeletedTimestamp 4924 } 4925 if ds.Name != nil { 4926 objectMap["name"] = ds.Name 4927 } 4928 if ds.Enabled != nil { 4929 objectMap["enabled"] = ds.Enabled 4930 } 4931 if ds.HostNameSslStates != nil { 4932 objectMap["hostNameSslStates"] = ds.HostNameSslStates 4933 } 4934 if ds.ServerFarmID != nil { 4935 objectMap["serverFarmId"] = ds.ServerFarmID 4936 } 4937 if ds.SiteConfig != nil { 4938 objectMap["siteConfig"] = ds.SiteConfig 4939 } 4940 if ds.ScmSiteAlsoStopped != nil { 4941 objectMap["scmSiteAlsoStopped"] = ds.ScmSiteAlsoStopped 4942 } 4943 if ds.HostingEnvironmentProfile != nil { 4944 objectMap["hostingEnvironmentProfile"] = ds.HostingEnvironmentProfile 4945 } 4946 if ds.MicroService != nil { 4947 objectMap["microService"] = ds.MicroService 4948 } 4949 if ds.GatewaySiteName != nil { 4950 objectMap["gatewaySiteName"] = ds.GatewaySiteName 4951 } 4952 if ds.ClientAffinityEnabled != nil { 4953 objectMap["clientAffinityEnabled"] = ds.ClientAffinityEnabled 4954 } 4955 if ds.ClientCertEnabled != nil { 4956 objectMap["clientCertEnabled"] = ds.ClientCertEnabled 4957 } 4958 if ds.HostNamesDisabled != nil { 4959 objectMap["hostNamesDisabled"] = ds.HostNamesDisabled 4960 } 4961 if ds.ContainerSize != nil { 4962 objectMap["containerSize"] = ds.ContainerSize 4963 } 4964 if ds.MaxNumberOfWorkers != nil { 4965 objectMap["maxNumberOfWorkers"] = ds.MaxNumberOfWorkers 4966 } 4967 if ds.CloningInfo != nil { 4968 objectMap["cloningInfo"] = ds.CloningInfo 4969 } 4970 return json.Marshal(objectMap) 4971} 4972 4973// Deployment represents user credentials used for publishing activity 4974type Deployment struct { 4975 autorest.Response `json:"-"` 4976 *DeploymentProperties `json:"properties,omitempty"` 4977 // ID - Resource Id 4978 ID *string `json:"id,omitempty"` 4979 // Name - Resource Name 4980 Name *string `json:"name,omitempty"` 4981 // Kind - Kind of resource 4982 Kind *string `json:"kind,omitempty"` 4983 // Location - Resource Location 4984 Location *string `json:"location,omitempty"` 4985 // Type - Resource type 4986 Type *string `json:"type,omitempty"` 4987 // Tags - Resource tags 4988 Tags map[string]*string `json:"tags"` 4989} 4990 4991// MarshalJSON is the custom marshaler for Deployment. 4992func (d Deployment) MarshalJSON() ([]byte, error) { 4993 objectMap := make(map[string]interface{}) 4994 if d.DeploymentProperties != nil { 4995 objectMap["properties"] = d.DeploymentProperties 4996 } 4997 if d.ID != nil { 4998 objectMap["id"] = d.ID 4999 } 5000 if d.Name != nil { 5001 objectMap["name"] = d.Name 5002 } 5003 if d.Kind != nil { 5004 objectMap["kind"] = d.Kind 5005 } 5006 if d.Location != nil { 5007 objectMap["location"] = d.Location 5008 } 5009 if d.Type != nil { 5010 objectMap["type"] = d.Type 5011 } 5012 if d.Tags != nil { 5013 objectMap["tags"] = d.Tags 5014 } 5015 return json.Marshal(objectMap) 5016} 5017 5018// UnmarshalJSON is the custom unmarshaler for Deployment struct. 5019func (d *Deployment) UnmarshalJSON(body []byte) error { 5020 var m map[string]*json.RawMessage 5021 err := json.Unmarshal(body, &m) 5022 if err != nil { 5023 return err 5024 } 5025 for k, v := range m { 5026 switch k { 5027 case "properties": 5028 if v != nil { 5029 var deploymentProperties DeploymentProperties 5030 err = json.Unmarshal(*v, &deploymentProperties) 5031 if err != nil { 5032 return err 5033 } 5034 d.DeploymentProperties = &deploymentProperties 5035 } 5036 case "id": 5037 if v != nil { 5038 var ID string 5039 err = json.Unmarshal(*v, &ID) 5040 if err != nil { 5041 return err 5042 } 5043 d.ID = &ID 5044 } 5045 case "name": 5046 if v != nil { 5047 var name string 5048 err = json.Unmarshal(*v, &name) 5049 if err != nil { 5050 return err 5051 } 5052 d.Name = &name 5053 } 5054 case "kind": 5055 if v != nil { 5056 var kind string 5057 err = json.Unmarshal(*v, &kind) 5058 if err != nil { 5059 return err 5060 } 5061 d.Kind = &kind 5062 } 5063 case "location": 5064 if v != nil { 5065 var location string 5066 err = json.Unmarshal(*v, &location) 5067 if err != nil { 5068 return err 5069 } 5070 d.Location = &location 5071 } 5072 case "type": 5073 if v != nil { 5074 var typeVar string 5075 err = json.Unmarshal(*v, &typeVar) 5076 if err != nil { 5077 return err 5078 } 5079 d.Type = &typeVar 5080 } 5081 case "tags": 5082 if v != nil { 5083 var tags map[string]*string 5084 err = json.Unmarshal(*v, &tags) 5085 if err != nil { 5086 return err 5087 } 5088 d.Tags = tags 5089 } 5090 } 5091 } 5092 5093 return nil 5094} 5095 5096// DeploymentCollection collection of app deployments 5097type DeploymentCollection struct { 5098 autorest.Response `json:"-"` 5099 // Value - Collection of resources 5100 Value *[]Deployment `json:"value,omitempty"` 5101 // NextLink - Link to next page of resources 5102 NextLink *string `json:"nextLink,omitempty"` 5103} 5104 5105// DeploymentCollectionIterator provides access to a complete listing of Deployment values. 5106type DeploymentCollectionIterator struct { 5107 i int 5108 page DeploymentCollectionPage 5109} 5110 5111// NextWithContext advances to the next value. If there was an error making 5112// the request the iterator does not advance and the error is returned. 5113func (iter *DeploymentCollectionIterator) NextWithContext(ctx context.Context) (err error) { 5114 if tracing.IsEnabled() { 5115 ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentCollectionIterator.NextWithContext") 5116 defer func() { 5117 sc := -1 5118 if iter.Response().Response.Response != nil { 5119 sc = iter.Response().Response.Response.StatusCode 5120 } 5121 tracing.EndSpan(ctx, sc, err) 5122 }() 5123 } 5124 iter.i++ 5125 if iter.i < len(iter.page.Values()) { 5126 return nil 5127 } 5128 err = iter.page.NextWithContext(ctx) 5129 if err != nil { 5130 iter.i-- 5131 return err 5132 } 5133 iter.i = 0 5134 return nil 5135} 5136 5137// Next advances to the next value. If there was an error making 5138// the request the iterator does not advance and the error is returned. 5139// Deprecated: Use NextWithContext() instead. 5140func (iter *DeploymentCollectionIterator) Next() error { 5141 return iter.NextWithContext(context.Background()) 5142} 5143 5144// NotDone returns true if the enumeration should be started or is not yet complete. 5145func (iter DeploymentCollectionIterator) NotDone() bool { 5146 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 5147} 5148 5149// Response returns the raw server response from the last page request. 5150func (iter DeploymentCollectionIterator) Response() DeploymentCollection { 5151 return iter.page.Response() 5152} 5153 5154// Value returns the current value or a zero-initialized value if the 5155// iterator has advanced beyond the end of the collection. 5156func (iter DeploymentCollectionIterator) Value() Deployment { 5157 if !iter.page.NotDone() { 5158 return Deployment{} 5159 } 5160 return iter.page.Values()[iter.i] 5161} 5162 5163// Creates a new instance of the DeploymentCollectionIterator type. 5164func NewDeploymentCollectionIterator(page DeploymentCollectionPage) DeploymentCollectionIterator { 5165 return DeploymentCollectionIterator{page: page} 5166} 5167 5168// IsEmpty returns true if the ListResult contains no values. 5169func (dc DeploymentCollection) IsEmpty() bool { 5170 return dc.Value == nil || len(*dc.Value) == 0 5171} 5172 5173// hasNextLink returns true if the NextLink is not empty. 5174func (dc DeploymentCollection) hasNextLink() bool { 5175 return dc.NextLink != nil && len(*dc.NextLink) != 0 5176} 5177 5178// deploymentCollectionPreparer prepares a request to retrieve the next set of results. 5179// It returns nil if no more results exist. 5180func (dc DeploymentCollection) deploymentCollectionPreparer(ctx context.Context) (*http.Request, error) { 5181 if !dc.hasNextLink() { 5182 return nil, nil 5183 } 5184 return autorest.Prepare((&http.Request{}).WithContext(ctx), 5185 autorest.AsJSON(), 5186 autorest.AsGet(), 5187 autorest.WithBaseURL(to.String(dc.NextLink))) 5188} 5189 5190// DeploymentCollectionPage contains a page of Deployment values. 5191type DeploymentCollectionPage struct { 5192 fn func(context.Context, DeploymentCollection) (DeploymentCollection, error) 5193 dc DeploymentCollection 5194} 5195 5196// NextWithContext advances to the next page of values. If there was an error making 5197// the request the page does not advance and the error is returned. 5198func (page *DeploymentCollectionPage) NextWithContext(ctx context.Context) (err error) { 5199 if tracing.IsEnabled() { 5200 ctx = tracing.StartSpan(ctx, fqdn+"/DeploymentCollectionPage.NextWithContext") 5201 defer func() { 5202 sc := -1 5203 if page.Response().Response.Response != nil { 5204 sc = page.Response().Response.Response.StatusCode 5205 } 5206 tracing.EndSpan(ctx, sc, err) 5207 }() 5208 } 5209 for { 5210 next, err := page.fn(ctx, page.dc) 5211 if err != nil { 5212 return err 5213 } 5214 page.dc = next 5215 if !next.hasNextLink() || !next.IsEmpty() { 5216 break 5217 } 5218 } 5219 return nil 5220} 5221 5222// Next advances to the next page of values. If there was an error making 5223// the request the page does not advance and the error is returned. 5224// Deprecated: Use NextWithContext() instead. 5225func (page *DeploymentCollectionPage) Next() error { 5226 return page.NextWithContext(context.Background()) 5227} 5228 5229// NotDone returns true if the page enumeration should be started or is not yet complete. 5230func (page DeploymentCollectionPage) NotDone() bool { 5231 return !page.dc.IsEmpty() 5232} 5233 5234// Response returns the raw server response from the last page request. 5235func (page DeploymentCollectionPage) Response() DeploymentCollection { 5236 return page.dc 5237} 5238 5239// Values returns the slice of values for the current page or nil if there are no values. 5240func (page DeploymentCollectionPage) Values() []Deployment { 5241 if page.dc.IsEmpty() { 5242 return nil 5243 } 5244 return *page.dc.Value 5245} 5246 5247// Creates a new instance of the DeploymentCollectionPage type. 5248func NewDeploymentCollectionPage(cur DeploymentCollection, getNextPage func(context.Context, DeploymentCollection) (DeploymentCollection, error)) DeploymentCollectionPage { 5249 return DeploymentCollectionPage{ 5250 fn: getNextPage, 5251 dc: cur, 5252 } 5253} 5254 5255// DeploymentProperties ... 5256type DeploymentProperties struct { 5257 // ID - Id 5258 ID *string `json:"id,omitempty"` 5259 // Status - Status 5260 Status *int32 `json:"status,omitempty"` 5261 // Message - Message 5262 Message *string `json:"message,omitempty"` 5263 // Author - Author 5264 Author *string `json:"author,omitempty"` 5265 // Deployer - Deployer 5266 Deployer *string `json:"deployer,omitempty"` 5267 // AuthorEmail - AuthorEmail 5268 AuthorEmail *string `json:"author_email,omitempty"` 5269 // StartTime - StartTime 5270 StartTime *date.Time `json:"start_time,omitempty"` 5271 // EndTime - EndTime 5272 EndTime *date.Time `json:"end_time,omitempty"` 5273 // Active - Active 5274 Active *bool `json:"active,omitempty"` 5275 // Details - Detail 5276 Details *string `json:"details,omitempty"` 5277} 5278 5279// Domain represents a domain 5280type Domain struct { 5281 autorest.Response `json:"-"` 5282 *DomainProperties `json:"properties,omitempty"` 5283 // ID - Resource Id 5284 ID *string `json:"id,omitempty"` 5285 // Name - Resource Name 5286 Name *string `json:"name,omitempty"` 5287 // Kind - Kind of resource 5288 Kind *string `json:"kind,omitempty"` 5289 // Location - Resource Location 5290 Location *string `json:"location,omitempty"` 5291 // Type - Resource type 5292 Type *string `json:"type,omitempty"` 5293 // Tags - Resource tags 5294 Tags map[string]*string `json:"tags"` 5295} 5296 5297// MarshalJSON is the custom marshaler for Domain. 5298func (d Domain) MarshalJSON() ([]byte, error) { 5299 objectMap := make(map[string]interface{}) 5300 if d.DomainProperties != nil { 5301 objectMap["properties"] = d.DomainProperties 5302 } 5303 if d.ID != nil { 5304 objectMap["id"] = d.ID 5305 } 5306 if d.Name != nil { 5307 objectMap["name"] = d.Name 5308 } 5309 if d.Kind != nil { 5310 objectMap["kind"] = d.Kind 5311 } 5312 if d.Location != nil { 5313 objectMap["location"] = d.Location 5314 } 5315 if d.Type != nil { 5316 objectMap["type"] = d.Type 5317 } 5318 if d.Tags != nil { 5319 objectMap["tags"] = d.Tags 5320 } 5321 return json.Marshal(objectMap) 5322} 5323 5324// UnmarshalJSON is the custom unmarshaler for Domain struct. 5325func (d *Domain) UnmarshalJSON(body []byte) error { 5326 var m map[string]*json.RawMessage 5327 err := json.Unmarshal(body, &m) 5328 if err != nil { 5329 return err 5330 } 5331 for k, v := range m { 5332 switch k { 5333 case "properties": 5334 if v != nil { 5335 var domainProperties DomainProperties 5336 err = json.Unmarshal(*v, &domainProperties) 5337 if err != nil { 5338 return err 5339 } 5340 d.DomainProperties = &domainProperties 5341 } 5342 case "id": 5343 if v != nil { 5344 var ID string 5345 err = json.Unmarshal(*v, &ID) 5346 if err != nil { 5347 return err 5348 } 5349 d.ID = &ID 5350 } 5351 case "name": 5352 if v != nil { 5353 var name string 5354 err = json.Unmarshal(*v, &name) 5355 if err != nil { 5356 return err 5357 } 5358 d.Name = &name 5359 } 5360 case "kind": 5361 if v != nil { 5362 var kind string 5363 err = json.Unmarshal(*v, &kind) 5364 if err != nil { 5365 return err 5366 } 5367 d.Kind = &kind 5368 } 5369 case "location": 5370 if v != nil { 5371 var location string 5372 err = json.Unmarshal(*v, &location) 5373 if err != nil { 5374 return err 5375 } 5376 d.Location = &location 5377 } 5378 case "type": 5379 if v != nil { 5380 var typeVar string 5381 err = json.Unmarshal(*v, &typeVar) 5382 if err != nil { 5383 return err 5384 } 5385 d.Type = &typeVar 5386 } 5387 case "tags": 5388 if v != nil { 5389 var tags map[string]*string 5390 err = json.Unmarshal(*v, &tags) 5391 if err != nil { 5392 return err 5393 } 5394 d.Tags = tags 5395 } 5396 } 5397 } 5398 5399 return nil 5400} 5401 5402// DomainAvailablilityCheckResult domain availablility check result 5403type DomainAvailablilityCheckResult struct { 5404 autorest.Response `json:"-"` 5405 // Name - Name of the domain 5406 Name *string `json:"name,omitempty"` 5407 // Available - If true then domain can be purchased using CreateDomain Api 5408 Available *bool `json:"available,omitempty"` 5409 // DomainType - Domain type. Possible values include: 'Regular', 'SoftDeleted' 5410 DomainType DomainType `json:"domainType,omitempty"` 5411} 5412 5413// DomainCollection collection of domains 5414type DomainCollection struct { 5415 autorest.Response `json:"-"` 5416 // Value - Collection of resources 5417 Value *[]Domain `json:"value,omitempty"` 5418 // NextLink - Link to next page of resources 5419 NextLink *string `json:"nextLink,omitempty"` 5420} 5421 5422// DomainCollectionIterator provides access to a complete listing of Domain values. 5423type DomainCollectionIterator struct { 5424 i int 5425 page DomainCollectionPage 5426} 5427 5428// NextWithContext advances to the next value. If there was an error making 5429// the request the iterator does not advance and the error is returned. 5430func (iter *DomainCollectionIterator) NextWithContext(ctx context.Context) (err error) { 5431 if tracing.IsEnabled() { 5432 ctx = tracing.StartSpan(ctx, fqdn+"/DomainCollectionIterator.NextWithContext") 5433 defer func() { 5434 sc := -1 5435 if iter.Response().Response.Response != nil { 5436 sc = iter.Response().Response.Response.StatusCode 5437 } 5438 tracing.EndSpan(ctx, sc, err) 5439 }() 5440 } 5441 iter.i++ 5442 if iter.i < len(iter.page.Values()) { 5443 return nil 5444 } 5445 err = iter.page.NextWithContext(ctx) 5446 if err != nil { 5447 iter.i-- 5448 return err 5449 } 5450 iter.i = 0 5451 return nil 5452} 5453 5454// Next advances to the next value. If there was an error making 5455// the request the iterator does not advance and the error is returned. 5456// Deprecated: Use NextWithContext() instead. 5457func (iter *DomainCollectionIterator) Next() error { 5458 return iter.NextWithContext(context.Background()) 5459} 5460 5461// NotDone returns true if the enumeration should be started or is not yet complete. 5462func (iter DomainCollectionIterator) NotDone() bool { 5463 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 5464} 5465 5466// Response returns the raw server response from the last page request. 5467func (iter DomainCollectionIterator) Response() DomainCollection { 5468 return iter.page.Response() 5469} 5470 5471// Value returns the current value or a zero-initialized value if the 5472// iterator has advanced beyond the end of the collection. 5473func (iter DomainCollectionIterator) Value() Domain { 5474 if !iter.page.NotDone() { 5475 return Domain{} 5476 } 5477 return iter.page.Values()[iter.i] 5478} 5479 5480// Creates a new instance of the DomainCollectionIterator type. 5481func NewDomainCollectionIterator(page DomainCollectionPage) DomainCollectionIterator { 5482 return DomainCollectionIterator{page: page} 5483} 5484 5485// IsEmpty returns true if the ListResult contains no values. 5486func (dc DomainCollection) IsEmpty() bool { 5487 return dc.Value == nil || len(*dc.Value) == 0 5488} 5489 5490// hasNextLink returns true if the NextLink is not empty. 5491func (dc DomainCollection) hasNextLink() bool { 5492 return dc.NextLink != nil && len(*dc.NextLink) != 0 5493} 5494 5495// domainCollectionPreparer prepares a request to retrieve the next set of results. 5496// It returns nil if no more results exist. 5497func (dc DomainCollection) domainCollectionPreparer(ctx context.Context) (*http.Request, error) { 5498 if !dc.hasNextLink() { 5499 return nil, nil 5500 } 5501 return autorest.Prepare((&http.Request{}).WithContext(ctx), 5502 autorest.AsJSON(), 5503 autorest.AsGet(), 5504 autorest.WithBaseURL(to.String(dc.NextLink))) 5505} 5506 5507// DomainCollectionPage contains a page of Domain values. 5508type DomainCollectionPage struct { 5509 fn func(context.Context, DomainCollection) (DomainCollection, error) 5510 dc DomainCollection 5511} 5512 5513// NextWithContext advances to the next page of values. If there was an error making 5514// the request the page does not advance and the error is returned. 5515func (page *DomainCollectionPage) NextWithContext(ctx context.Context) (err error) { 5516 if tracing.IsEnabled() { 5517 ctx = tracing.StartSpan(ctx, fqdn+"/DomainCollectionPage.NextWithContext") 5518 defer func() { 5519 sc := -1 5520 if page.Response().Response.Response != nil { 5521 sc = page.Response().Response.Response.StatusCode 5522 } 5523 tracing.EndSpan(ctx, sc, err) 5524 }() 5525 } 5526 for { 5527 next, err := page.fn(ctx, page.dc) 5528 if err != nil { 5529 return err 5530 } 5531 page.dc = next 5532 if !next.hasNextLink() || !next.IsEmpty() { 5533 break 5534 } 5535 } 5536 return nil 5537} 5538 5539// Next advances to the next page of values. If there was an error making 5540// the request the page does not advance and the error is returned. 5541// Deprecated: Use NextWithContext() instead. 5542func (page *DomainCollectionPage) Next() error { 5543 return page.NextWithContext(context.Background()) 5544} 5545 5546// NotDone returns true if the page enumeration should be started or is not yet complete. 5547func (page DomainCollectionPage) NotDone() bool { 5548 return !page.dc.IsEmpty() 5549} 5550 5551// Response returns the raw server response from the last page request. 5552func (page DomainCollectionPage) Response() DomainCollection { 5553 return page.dc 5554} 5555 5556// Values returns the slice of values for the current page or nil if there are no values. 5557func (page DomainCollectionPage) Values() []Domain { 5558 if page.dc.IsEmpty() { 5559 return nil 5560 } 5561 return *page.dc.Value 5562} 5563 5564// Creates a new instance of the DomainCollectionPage type. 5565func NewDomainCollectionPage(cur DomainCollection, getNextPage func(context.Context, DomainCollection) (DomainCollection, error)) DomainCollectionPage { 5566 return DomainCollectionPage{ 5567 fn: getNextPage, 5568 dc: cur, 5569 } 5570} 5571 5572// DomainControlCenterSsoRequest single sign on request information for domain management 5573type DomainControlCenterSsoRequest struct { 5574 autorest.Response `json:"-"` 5575 // URL - Url where the single sign on request is to be made 5576 URL *string `json:"url,omitempty"` 5577 // PostParameterKey - Post parameter key 5578 PostParameterKey *string `json:"postParameterKey,omitempty"` 5579 // PostParameterValue - Post parameter value. Client should use 'application/x-www-form-urlencoded' encoding for this value. 5580 PostParameterValue *string `json:"postParameterValue,omitempty"` 5581} 5582 5583// DomainProperties ... 5584type DomainProperties struct { 5585 // ContactAdmin - Admin contact information 5586 ContactAdmin *Contact `json:"contactAdmin,omitempty"` 5587 // ContactBilling - Billing contact information 5588 ContactBilling *Contact `json:"contactBilling,omitempty"` 5589 // ContactRegistrant - Registrant contact information 5590 ContactRegistrant *Contact `json:"contactRegistrant,omitempty"` 5591 // ContactTech - Technical contact information 5592 ContactTech *Contact `json:"contactTech,omitempty"` 5593 // RegistrationStatus - Domain registration status. Possible values include: 'DomainStatusActive', 'DomainStatusAwaiting', 'DomainStatusCancelled', 'DomainStatusConfiscated', 'DomainStatusDisabled', 'DomainStatusExcluded', 'DomainStatusExpired', 'DomainStatusFailed', 'DomainStatusHeld', 'DomainStatusLocked', 'DomainStatusParked', 'DomainStatusPending', 'DomainStatusReserved', 'DomainStatusReverted', 'DomainStatusSuspended', 'DomainStatusTransferred', 'DomainStatusUnknown', 'DomainStatusUnlocked', 'DomainStatusUnparked', 'DomainStatusUpdated', 'DomainStatusJSONConverterFailed' 5594 RegistrationStatus DomainStatus `json:"registrationStatus,omitempty"` 5595 // ProvisioningState - Domain provisioning state. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateFailed', 'ProvisioningStateCanceled', 'ProvisioningStateInProgress', 'ProvisioningStateDeleting' 5596 ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` 5597 // NameServers - Name servers 5598 NameServers *[]string `json:"nameServers,omitempty"` 5599 // Privacy - If true then domain privacy is enabled for this domain 5600 Privacy *bool `json:"privacy,omitempty"` 5601 // CreatedTime - Domain creation timestamp 5602 CreatedTime *date.Time `json:"createdTime,omitempty"` 5603 // ExpirationTime - Domain expiration timestamp 5604 ExpirationTime *date.Time `json:"expirationTime,omitempty"` 5605 // LastRenewedTime - Timestamp when the domain was renewed last time 5606 LastRenewedTime *date.Time `json:"lastRenewedTime,omitempty"` 5607 // AutoRenew - If true then domain will renewed automatically 5608 AutoRenew *bool `json:"autoRenew,omitempty"` 5609 // ReadyForDNSRecordManagement - If true then Azure can assign this domain to Web Apps. This value will be true if domain registration status is active and it is hosted on name servers Azure has programmatic access to 5610 ReadyForDNSRecordManagement *bool `json:"readyForDnsRecordManagement,omitempty"` 5611 // ManagedHostNames - All hostnames derived from the domain and assigned to Azure resources 5612 ManagedHostNames *[]HostName `json:"managedHostNames,omitempty"` 5613 // Consent - Legal agreement consent 5614 Consent *DomainPurchaseConsent `json:"consent,omitempty"` 5615 // DomainNotRenewableReasons - Reasons why domain is not renewable 5616 DomainNotRenewableReasons *[]string `json:"domainNotRenewableReasons,omitempty"` 5617} 5618 5619// DomainPurchaseConsent domain purchase consent object representing acceptance of applicable legal 5620// agreements 5621type DomainPurchaseConsent struct { 5622 // AgreementKeys - List of applicable legal agreement keys. This list can be retrieved using ListLegalAgreements Api under TopLevelDomain resource 5623 AgreementKeys *[]string `json:"agreementKeys,omitempty"` 5624 // AgreedBy - Client IP address 5625 AgreedBy *string `json:"agreedBy,omitempty"` 5626 // AgreedAt - Timestamp when the agreements were accepted 5627 AgreedAt *date.Time `json:"agreedAt,omitempty"` 5628} 5629 5630// DomainRecommendationSearchParameters domain recommendation search parameters 5631type DomainRecommendationSearchParameters struct { 5632 // Keywords - Keywords to be used for generating domain recommendations 5633 Keywords *string `json:"keywords,omitempty"` 5634 // MaxDomainRecommendations - Maximum number of recommendations 5635 MaxDomainRecommendations *int32 `json:"maxDomainRecommendations,omitempty"` 5636} 5637 5638// DomainRegistrationInput domain registration input for validation Api 5639type DomainRegistrationInput struct { 5640 *DomainRegistrationInputProperties `json:"properties,omitempty"` 5641 // ID - Resource Id 5642 ID *string `json:"id,omitempty"` 5643 // Name - Resource Name 5644 Name *string `json:"name,omitempty"` 5645 // Kind - Kind of resource 5646 Kind *string `json:"kind,omitempty"` 5647 // Location - Resource Location 5648 Location *string `json:"location,omitempty"` 5649 // Type - Resource type 5650 Type *string `json:"type,omitempty"` 5651 // Tags - Resource tags 5652 Tags map[string]*string `json:"tags"` 5653} 5654 5655// MarshalJSON is the custom marshaler for DomainRegistrationInput. 5656func (dri DomainRegistrationInput) MarshalJSON() ([]byte, error) { 5657 objectMap := make(map[string]interface{}) 5658 if dri.DomainRegistrationInputProperties != nil { 5659 objectMap["properties"] = dri.DomainRegistrationInputProperties 5660 } 5661 if dri.ID != nil { 5662 objectMap["id"] = dri.ID 5663 } 5664 if dri.Name != nil { 5665 objectMap["name"] = dri.Name 5666 } 5667 if dri.Kind != nil { 5668 objectMap["kind"] = dri.Kind 5669 } 5670 if dri.Location != nil { 5671 objectMap["location"] = dri.Location 5672 } 5673 if dri.Type != nil { 5674 objectMap["type"] = dri.Type 5675 } 5676 if dri.Tags != nil { 5677 objectMap["tags"] = dri.Tags 5678 } 5679 return json.Marshal(objectMap) 5680} 5681 5682// UnmarshalJSON is the custom unmarshaler for DomainRegistrationInput struct. 5683func (dri *DomainRegistrationInput) UnmarshalJSON(body []byte) error { 5684 var m map[string]*json.RawMessage 5685 err := json.Unmarshal(body, &m) 5686 if err != nil { 5687 return err 5688 } 5689 for k, v := range m { 5690 switch k { 5691 case "properties": 5692 if v != nil { 5693 var domainRegistrationInputProperties DomainRegistrationInputProperties 5694 err = json.Unmarshal(*v, &domainRegistrationInputProperties) 5695 if err != nil { 5696 return err 5697 } 5698 dri.DomainRegistrationInputProperties = &domainRegistrationInputProperties 5699 } 5700 case "id": 5701 if v != nil { 5702 var ID string 5703 err = json.Unmarshal(*v, &ID) 5704 if err != nil { 5705 return err 5706 } 5707 dri.ID = &ID 5708 } 5709 case "name": 5710 if v != nil { 5711 var name string 5712 err = json.Unmarshal(*v, &name) 5713 if err != nil { 5714 return err 5715 } 5716 dri.Name = &name 5717 } 5718 case "kind": 5719 if v != nil { 5720 var kind string 5721 err = json.Unmarshal(*v, &kind) 5722 if err != nil { 5723 return err 5724 } 5725 dri.Kind = &kind 5726 } 5727 case "location": 5728 if v != nil { 5729 var location string 5730 err = json.Unmarshal(*v, &location) 5731 if err != nil { 5732 return err 5733 } 5734 dri.Location = &location 5735 } 5736 case "type": 5737 if v != nil { 5738 var typeVar string 5739 err = json.Unmarshal(*v, &typeVar) 5740 if err != nil { 5741 return err 5742 } 5743 dri.Type = &typeVar 5744 } 5745 case "tags": 5746 if v != nil { 5747 var tags map[string]*string 5748 err = json.Unmarshal(*v, &tags) 5749 if err != nil { 5750 return err 5751 } 5752 dri.Tags = tags 5753 } 5754 } 5755 } 5756 5757 return nil 5758} 5759 5760// DomainRegistrationInputProperties ... 5761type DomainRegistrationInputProperties struct { 5762 // Name - Name of the domain 5763 Name *string `json:"name,omitempty"` 5764 // ContactAdmin - Admin contact information 5765 ContactAdmin *Contact `json:"contactAdmin,omitempty"` 5766 // ContactBilling - Billing contact information 5767 ContactBilling *Contact `json:"contactBilling,omitempty"` 5768 // ContactRegistrant - Registrant contact information 5769 ContactRegistrant *Contact `json:"contactRegistrant,omitempty"` 5770 // ContactTech - Technical contact information 5771 ContactTech *Contact `json:"contactTech,omitempty"` 5772 // RegistrationStatus - Domain registration status. Possible values include: 'DomainStatusActive', 'DomainStatusAwaiting', 'DomainStatusCancelled', 'DomainStatusConfiscated', 'DomainStatusDisabled', 'DomainStatusExcluded', 'DomainStatusExpired', 'DomainStatusFailed', 'DomainStatusHeld', 'DomainStatusLocked', 'DomainStatusParked', 'DomainStatusPending', 'DomainStatusReserved', 'DomainStatusReverted', 'DomainStatusSuspended', 'DomainStatusTransferred', 'DomainStatusUnknown', 'DomainStatusUnlocked', 'DomainStatusUnparked', 'DomainStatusUpdated', 'DomainStatusJSONConverterFailed' 5773 RegistrationStatus DomainStatus `json:"registrationStatus,omitempty"` 5774 // ProvisioningState - Domain provisioning state. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateFailed', 'ProvisioningStateCanceled', 'ProvisioningStateInProgress', 'ProvisioningStateDeleting' 5775 ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` 5776 // NameServers - Name servers 5777 NameServers *[]string `json:"nameServers,omitempty"` 5778 // Privacy - If true then domain privacy is enabled for this domain 5779 Privacy *bool `json:"privacy,omitempty"` 5780 // CreatedTime - Domain creation timestamp 5781 CreatedTime *date.Time `json:"createdTime,omitempty"` 5782 // ExpirationTime - Domain expiration timestamp 5783 ExpirationTime *date.Time `json:"expirationTime,omitempty"` 5784 // LastRenewedTime - Timestamp when the domain was renewed last time 5785 LastRenewedTime *date.Time `json:"lastRenewedTime,omitempty"` 5786 // AutoRenew - If true then domain will renewed automatically 5787 AutoRenew *bool `json:"autoRenew,omitempty"` 5788 // ReadyForDNSRecordManagement - If true then Azure can assign this domain to Web Apps. This value will be true if domain registration status is active and it is hosted on name servers Azure has programmatic access to 5789 ReadyForDNSRecordManagement *bool `json:"readyForDnsRecordManagement,omitempty"` 5790 // ManagedHostNames - All hostnames derived from the domain and assigned to Azure resources 5791 ManagedHostNames *[]HostName `json:"managedHostNames,omitempty"` 5792 // Consent - Legal agreement consent 5793 Consent *DomainPurchaseConsent `json:"consent,omitempty"` 5794 // DomainNotRenewableReasons - Reasons why domain is not renewable 5795 DomainNotRenewableReasons *[]string `json:"domainNotRenewableReasons,omitempty"` 5796} 5797 5798// EnabledConfig enabled configuration 5799type EnabledConfig struct { 5800 // Enabled - Enabled 5801 Enabled *bool `json:"enabled,omitempty"` 5802} 5803 5804// ExpandedParentAPIEntity expanded parent object for expansion 5805type ExpandedParentAPIEntity struct { 5806 *ExpandedParentAPIEntityProperties `json:"properties,omitempty"` 5807 // ID - Resource Id 5808 ID *string `json:"id,omitempty"` 5809 // Name - Resource Name 5810 Name *string `json:"name,omitempty"` 5811 // Kind - Kind of resource 5812 Kind *string `json:"kind,omitempty"` 5813 // Location - Resource Location 5814 Location *string `json:"location,omitempty"` 5815 // Type - Resource type 5816 Type *string `json:"type,omitempty"` 5817 // Tags - Resource tags 5818 Tags map[string]*string `json:"tags"` 5819} 5820 5821// MarshalJSON is the custom marshaler for ExpandedParentAPIEntity. 5822func (epAe ExpandedParentAPIEntity) MarshalJSON() ([]byte, error) { 5823 objectMap := make(map[string]interface{}) 5824 if epAe.ExpandedParentAPIEntityProperties != nil { 5825 objectMap["properties"] = epAe.ExpandedParentAPIEntityProperties 5826 } 5827 if epAe.ID != nil { 5828 objectMap["id"] = epAe.ID 5829 } 5830 if epAe.Name != nil { 5831 objectMap["name"] = epAe.Name 5832 } 5833 if epAe.Kind != nil { 5834 objectMap["kind"] = epAe.Kind 5835 } 5836 if epAe.Location != nil { 5837 objectMap["location"] = epAe.Location 5838 } 5839 if epAe.Type != nil { 5840 objectMap["type"] = epAe.Type 5841 } 5842 if epAe.Tags != nil { 5843 objectMap["tags"] = epAe.Tags 5844 } 5845 return json.Marshal(objectMap) 5846} 5847 5848// UnmarshalJSON is the custom unmarshaler for ExpandedParentAPIEntity struct. 5849func (epAe *ExpandedParentAPIEntity) UnmarshalJSON(body []byte) error { 5850 var m map[string]*json.RawMessage 5851 err := json.Unmarshal(body, &m) 5852 if err != nil { 5853 return err 5854 } 5855 for k, v := range m { 5856 switch k { 5857 case "properties": 5858 if v != nil { 5859 var expandedParentAPIEntityProperties ExpandedParentAPIEntityProperties 5860 err = json.Unmarshal(*v, &expandedParentAPIEntityProperties) 5861 if err != nil { 5862 return err 5863 } 5864 epAe.ExpandedParentAPIEntityProperties = &expandedParentAPIEntityProperties 5865 } 5866 case "id": 5867 if v != nil { 5868 var ID string 5869 err = json.Unmarshal(*v, &ID) 5870 if err != nil { 5871 return err 5872 } 5873 epAe.ID = &ID 5874 } 5875 case "name": 5876 if v != nil { 5877 var name string 5878 err = json.Unmarshal(*v, &name) 5879 if err != nil { 5880 return err 5881 } 5882 epAe.Name = &name 5883 } 5884 case "kind": 5885 if v != nil { 5886 var kind string 5887 err = json.Unmarshal(*v, &kind) 5888 if err != nil { 5889 return err 5890 } 5891 epAe.Kind = &kind 5892 } 5893 case "location": 5894 if v != nil { 5895 var location string 5896 err = json.Unmarshal(*v, &location) 5897 if err != nil { 5898 return err 5899 } 5900 epAe.Location = &location 5901 } 5902 case "type": 5903 if v != nil { 5904 var typeVar string 5905 err = json.Unmarshal(*v, &typeVar) 5906 if err != nil { 5907 return err 5908 } 5909 epAe.Type = &typeVar 5910 } 5911 case "tags": 5912 if v != nil { 5913 var tags map[string]*string 5914 err = json.Unmarshal(*v, &tags) 5915 if err != nil { 5916 return err 5917 } 5918 epAe.Tags = tags 5919 } 5920 } 5921 } 5922 5923 return nil 5924} 5925 5926// ExpandedParentAPIEntityProperties ... 5927type ExpandedParentAPIEntityProperties struct { 5928 // ID - Id of connection provider 5929 ID *string `json:"id,omitempty"` 5930 // Entity - Id of connection provider 5931 Entity *ResponseMessageEnvelopeAPIEntity `json:"entity,omitempty"` 5932} 5933 5934// Experiments class containing Routing in production experiments 5935type Experiments struct { 5936 // RampUpRules - List of {Microsoft.Web.Hosting.Administration.RampUpRule} objects. 5937 RampUpRules *[]RampUpRule `json:"rampUpRules,omitempty"` 5938} 5939 5940// FileSystemApplicationLogsConfig application logs to file system configuration 5941type FileSystemApplicationLogsConfig struct { 5942 // Level - Log level. Possible values include: 'LogLevelOff', 'LogLevelVerbose', 'LogLevelInformation', 'LogLevelWarning', 'LogLevelError' 5943 Level LogLevel `json:"level,omitempty"` 5944} 5945 5946// FileSystemHTTPLogsConfig http logs to file system configuration 5947type FileSystemHTTPLogsConfig struct { 5948 // RetentionInMb - Maximum size in megabytes that http log files can use. 5949 // When reached old log files will be removed to make space for new ones. 5950 // Value can range between 25 and 100. 5951 RetentionInMb *int32 `json:"retentionInMb,omitempty"` 5952 // RetentionInDays - Retention in days. 5953 // Remove files older than X days. 5954 // 0 or lower means no retention. 5955 RetentionInDays *int32 `json:"retentionInDays,omitempty"` 5956 // Enabled - Enabled 5957 Enabled *bool `json:"enabled,omitempty"` 5958} 5959 5960// GeneralAPIInformation general API information 5961type GeneralAPIInformation struct { 5962 *GeneralAPIInformationProperties `json:"properties,omitempty"` 5963 // ID - Resource Id 5964 ID *string `json:"id,omitempty"` 5965 // Name - Resource Name 5966 Name *string `json:"name,omitempty"` 5967 // Kind - Kind of resource 5968 Kind *string `json:"kind,omitempty"` 5969 // Location - Resource Location 5970 Location *string `json:"location,omitempty"` 5971 // Type - Resource type 5972 Type *string `json:"type,omitempty"` 5973 // Tags - Resource tags 5974 Tags map[string]*string `json:"tags"` 5975} 5976 5977// MarshalJSON is the custom marshaler for GeneralAPIInformation. 5978func (gai GeneralAPIInformation) MarshalJSON() ([]byte, error) { 5979 objectMap := make(map[string]interface{}) 5980 if gai.GeneralAPIInformationProperties != nil { 5981 objectMap["properties"] = gai.GeneralAPIInformationProperties 5982 } 5983 if gai.ID != nil { 5984 objectMap["id"] = gai.ID 5985 } 5986 if gai.Name != nil { 5987 objectMap["name"] = gai.Name 5988 } 5989 if gai.Kind != nil { 5990 objectMap["kind"] = gai.Kind 5991 } 5992 if gai.Location != nil { 5993 objectMap["location"] = gai.Location 5994 } 5995 if gai.Type != nil { 5996 objectMap["type"] = gai.Type 5997 } 5998 if gai.Tags != nil { 5999 objectMap["tags"] = gai.Tags 6000 } 6001 return json.Marshal(objectMap) 6002} 6003 6004// UnmarshalJSON is the custom unmarshaler for GeneralAPIInformation struct. 6005func (gai *GeneralAPIInformation) UnmarshalJSON(body []byte) error { 6006 var m map[string]*json.RawMessage 6007 err := json.Unmarshal(body, &m) 6008 if err != nil { 6009 return err 6010 } 6011 for k, v := range m { 6012 switch k { 6013 case "properties": 6014 if v != nil { 6015 var generalAPIInformationProperties GeneralAPIInformationProperties 6016 err = json.Unmarshal(*v, &generalAPIInformationProperties) 6017 if err != nil { 6018 return err 6019 } 6020 gai.GeneralAPIInformationProperties = &generalAPIInformationProperties 6021 } 6022 case "id": 6023 if v != nil { 6024 var ID string 6025 err = json.Unmarshal(*v, &ID) 6026 if err != nil { 6027 return err 6028 } 6029 gai.ID = &ID 6030 } 6031 case "name": 6032 if v != nil { 6033 var name string 6034 err = json.Unmarshal(*v, &name) 6035 if err != nil { 6036 return err 6037 } 6038 gai.Name = &name 6039 } 6040 case "kind": 6041 if v != nil { 6042 var kind string 6043 err = json.Unmarshal(*v, &kind) 6044 if err != nil { 6045 return err 6046 } 6047 gai.Kind = &kind 6048 } 6049 case "location": 6050 if v != nil { 6051 var location string 6052 err = json.Unmarshal(*v, &location) 6053 if err != nil { 6054 return err 6055 } 6056 gai.Location = &location 6057 } 6058 case "type": 6059 if v != nil { 6060 var typeVar string 6061 err = json.Unmarshal(*v, &typeVar) 6062 if err != nil { 6063 return err 6064 } 6065 gai.Type = &typeVar 6066 } 6067 case "tags": 6068 if v != nil { 6069 var tags map[string]*string 6070 err = json.Unmarshal(*v, &tags) 6071 if err != nil { 6072 return err 6073 } 6074 gai.Tags = tags 6075 } 6076 } 6077 } 6078 6079 return nil 6080} 6081 6082// GeneralAPIInformationProperties ... 6083type GeneralAPIInformationProperties struct { 6084 // IconURL - Icon Url 6085 IconURL *string `json:"iconUrl,omitempty"` 6086 // DisplayName - Display Name 6087 DisplayName *string `json:"displayName,omitempty"` 6088 // Description - Description 6089 Description *string `json:"description,omitempty"` 6090 // TermsOfUseURL - a public accessible url of the Terms Of Use Url of this API 6091 TermsOfUseURL *string `json:"termsOfUseUrl,omitempty"` 6092 // ConnectionDisplayName - DefaultConnectionNameTemplate 6093 ConnectionDisplayName *string `json:"connectionDisplayName,omitempty"` 6094 // ConnectionPortalURL - ConnectionPortalUrl 6095 ConnectionPortalURL interface{} `json:"connectionPortalUrl,omitempty"` 6096} 6097 6098// GeoRegion geographical region 6099type GeoRegion struct { 6100 *GeoRegionProperties `json:"properties,omitempty"` 6101 // ID - Resource Id 6102 ID *string `json:"id,omitempty"` 6103 // Name - Resource Name 6104 Name *string `json:"name,omitempty"` 6105 // Kind - Kind of resource 6106 Kind *string `json:"kind,omitempty"` 6107 // Location - Resource Location 6108 Location *string `json:"location,omitempty"` 6109 // Type - Resource type 6110 Type *string `json:"type,omitempty"` 6111 // Tags - Resource tags 6112 Tags map[string]*string `json:"tags"` 6113} 6114 6115// MarshalJSON is the custom marshaler for GeoRegion. 6116func (gr GeoRegion) MarshalJSON() ([]byte, error) { 6117 objectMap := make(map[string]interface{}) 6118 if gr.GeoRegionProperties != nil { 6119 objectMap["properties"] = gr.GeoRegionProperties 6120 } 6121 if gr.ID != nil { 6122 objectMap["id"] = gr.ID 6123 } 6124 if gr.Name != nil { 6125 objectMap["name"] = gr.Name 6126 } 6127 if gr.Kind != nil { 6128 objectMap["kind"] = gr.Kind 6129 } 6130 if gr.Location != nil { 6131 objectMap["location"] = gr.Location 6132 } 6133 if gr.Type != nil { 6134 objectMap["type"] = gr.Type 6135 } 6136 if gr.Tags != nil { 6137 objectMap["tags"] = gr.Tags 6138 } 6139 return json.Marshal(objectMap) 6140} 6141 6142// UnmarshalJSON is the custom unmarshaler for GeoRegion struct. 6143func (gr *GeoRegion) UnmarshalJSON(body []byte) error { 6144 var m map[string]*json.RawMessage 6145 err := json.Unmarshal(body, &m) 6146 if err != nil { 6147 return err 6148 } 6149 for k, v := range m { 6150 switch k { 6151 case "properties": 6152 if v != nil { 6153 var geoRegionProperties GeoRegionProperties 6154 err = json.Unmarshal(*v, &geoRegionProperties) 6155 if err != nil { 6156 return err 6157 } 6158 gr.GeoRegionProperties = &geoRegionProperties 6159 } 6160 case "id": 6161 if v != nil { 6162 var ID string 6163 err = json.Unmarshal(*v, &ID) 6164 if err != nil { 6165 return err 6166 } 6167 gr.ID = &ID 6168 } 6169 case "name": 6170 if v != nil { 6171 var name string 6172 err = json.Unmarshal(*v, &name) 6173 if err != nil { 6174 return err 6175 } 6176 gr.Name = &name 6177 } 6178 case "kind": 6179 if v != nil { 6180 var kind string 6181 err = json.Unmarshal(*v, &kind) 6182 if err != nil { 6183 return err 6184 } 6185 gr.Kind = &kind 6186 } 6187 case "location": 6188 if v != nil { 6189 var location string 6190 err = json.Unmarshal(*v, &location) 6191 if err != nil { 6192 return err 6193 } 6194 gr.Location = &location 6195 } 6196 case "type": 6197 if v != nil { 6198 var typeVar string 6199 err = json.Unmarshal(*v, &typeVar) 6200 if err != nil { 6201 return err 6202 } 6203 gr.Type = &typeVar 6204 } 6205 case "tags": 6206 if v != nil { 6207 var tags map[string]*string 6208 err = json.Unmarshal(*v, &tags) 6209 if err != nil { 6210 return err 6211 } 6212 gr.Tags = tags 6213 } 6214 } 6215 } 6216 6217 return nil 6218} 6219 6220// GeoRegionCollection collection of geo regions 6221type GeoRegionCollection struct { 6222 autorest.Response `json:"-"` 6223 // Value - Collection of resources 6224 Value *[]GeoRegion `json:"value,omitempty"` 6225 // NextLink - Link to next page of resources 6226 NextLink *string `json:"nextLink,omitempty"` 6227} 6228 6229// GeoRegionCollectionIterator provides access to a complete listing of GeoRegion values. 6230type GeoRegionCollectionIterator struct { 6231 i int 6232 page GeoRegionCollectionPage 6233} 6234 6235// NextWithContext advances to the next value. If there was an error making 6236// the request the iterator does not advance and the error is returned. 6237func (iter *GeoRegionCollectionIterator) NextWithContext(ctx context.Context) (err error) { 6238 if tracing.IsEnabled() { 6239 ctx = tracing.StartSpan(ctx, fqdn+"/GeoRegionCollectionIterator.NextWithContext") 6240 defer func() { 6241 sc := -1 6242 if iter.Response().Response.Response != nil { 6243 sc = iter.Response().Response.Response.StatusCode 6244 } 6245 tracing.EndSpan(ctx, sc, err) 6246 }() 6247 } 6248 iter.i++ 6249 if iter.i < len(iter.page.Values()) { 6250 return nil 6251 } 6252 err = iter.page.NextWithContext(ctx) 6253 if err != nil { 6254 iter.i-- 6255 return err 6256 } 6257 iter.i = 0 6258 return nil 6259} 6260 6261// Next advances to the next value. If there was an error making 6262// the request the iterator does not advance and the error is returned. 6263// Deprecated: Use NextWithContext() instead. 6264func (iter *GeoRegionCollectionIterator) Next() error { 6265 return iter.NextWithContext(context.Background()) 6266} 6267 6268// NotDone returns true if the enumeration should be started or is not yet complete. 6269func (iter GeoRegionCollectionIterator) NotDone() bool { 6270 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 6271} 6272 6273// Response returns the raw server response from the last page request. 6274func (iter GeoRegionCollectionIterator) Response() GeoRegionCollection { 6275 return iter.page.Response() 6276} 6277 6278// Value returns the current value or a zero-initialized value if the 6279// iterator has advanced beyond the end of the collection. 6280func (iter GeoRegionCollectionIterator) Value() GeoRegion { 6281 if !iter.page.NotDone() { 6282 return GeoRegion{} 6283 } 6284 return iter.page.Values()[iter.i] 6285} 6286 6287// Creates a new instance of the GeoRegionCollectionIterator type. 6288func NewGeoRegionCollectionIterator(page GeoRegionCollectionPage) GeoRegionCollectionIterator { 6289 return GeoRegionCollectionIterator{page: page} 6290} 6291 6292// IsEmpty returns true if the ListResult contains no values. 6293func (grc GeoRegionCollection) IsEmpty() bool { 6294 return grc.Value == nil || len(*grc.Value) == 0 6295} 6296 6297// hasNextLink returns true if the NextLink is not empty. 6298func (grc GeoRegionCollection) hasNextLink() bool { 6299 return grc.NextLink != nil && len(*grc.NextLink) != 0 6300} 6301 6302// geoRegionCollectionPreparer prepares a request to retrieve the next set of results. 6303// It returns nil if no more results exist. 6304func (grc GeoRegionCollection) geoRegionCollectionPreparer(ctx context.Context) (*http.Request, error) { 6305 if !grc.hasNextLink() { 6306 return nil, nil 6307 } 6308 return autorest.Prepare((&http.Request{}).WithContext(ctx), 6309 autorest.AsJSON(), 6310 autorest.AsGet(), 6311 autorest.WithBaseURL(to.String(grc.NextLink))) 6312} 6313 6314// GeoRegionCollectionPage contains a page of GeoRegion values. 6315type GeoRegionCollectionPage struct { 6316 fn func(context.Context, GeoRegionCollection) (GeoRegionCollection, error) 6317 grc GeoRegionCollection 6318} 6319 6320// NextWithContext advances to the next page of values. If there was an error making 6321// the request the page does not advance and the error is returned. 6322func (page *GeoRegionCollectionPage) NextWithContext(ctx context.Context) (err error) { 6323 if tracing.IsEnabled() { 6324 ctx = tracing.StartSpan(ctx, fqdn+"/GeoRegionCollectionPage.NextWithContext") 6325 defer func() { 6326 sc := -1 6327 if page.Response().Response.Response != nil { 6328 sc = page.Response().Response.Response.StatusCode 6329 } 6330 tracing.EndSpan(ctx, sc, err) 6331 }() 6332 } 6333 for { 6334 next, err := page.fn(ctx, page.grc) 6335 if err != nil { 6336 return err 6337 } 6338 page.grc = next 6339 if !next.hasNextLink() || !next.IsEmpty() { 6340 break 6341 } 6342 } 6343 return nil 6344} 6345 6346// Next advances to the next page of values. If there was an error making 6347// the request the page does not advance and the error is returned. 6348// Deprecated: Use NextWithContext() instead. 6349func (page *GeoRegionCollectionPage) Next() error { 6350 return page.NextWithContext(context.Background()) 6351} 6352 6353// NotDone returns true if the page enumeration should be started or is not yet complete. 6354func (page GeoRegionCollectionPage) NotDone() bool { 6355 return !page.grc.IsEmpty() 6356} 6357 6358// Response returns the raw server response from the last page request. 6359func (page GeoRegionCollectionPage) Response() GeoRegionCollection { 6360 return page.grc 6361} 6362 6363// Values returns the slice of values for the current page or nil if there are no values. 6364func (page GeoRegionCollectionPage) Values() []GeoRegion { 6365 if page.grc.IsEmpty() { 6366 return nil 6367 } 6368 return *page.grc.Value 6369} 6370 6371// Creates a new instance of the GeoRegionCollectionPage type. 6372func NewGeoRegionCollectionPage(cur GeoRegionCollection, getNextPage func(context.Context, GeoRegionCollection) (GeoRegionCollection, error)) GeoRegionCollectionPage { 6373 return GeoRegionCollectionPage{ 6374 fn: getNextPage, 6375 grc: cur, 6376 } 6377} 6378 6379// GeoRegionProperties ... 6380type GeoRegionProperties struct { 6381 // Name - Region name 6382 Name *string `json:"name,omitempty"` 6383 // Description - Region description 6384 Description *string `json:"description,omitempty"` 6385 // DisplayName - Display name for region 6386 DisplayName *string `json:"displayName,omitempty"` 6387} 6388 6389// HandlerMapping the IIS handler mappings used to define which handler processes HTTP requests with 6390// certain extension. 6391// For example it is used to configure php-cgi.exe process to handle all HTTP requests with *.php 6392// extension. 6393type HandlerMapping struct { 6394 // Extension - Requests with this extension will be handled using the specified FastCGI application. 6395 Extension *string `json:"extension,omitempty"` 6396 // ScriptProcessor - The absolute path to the FastCGI application. 6397 ScriptProcessor *string `json:"scriptProcessor,omitempty"` 6398 // Arguments - Command-line arguments to be passed to the script processor. 6399 Arguments *string `json:"arguments,omitempty"` 6400} 6401 6402// HostingEnvironment description of an hostingEnvironment (App Service Environment) 6403type HostingEnvironment struct { 6404 autorest.Response `json:"-"` 6405 *HostingEnvironmentProperties `json:"properties,omitempty"` 6406 // ID - Resource Id 6407 ID *string `json:"id,omitempty"` 6408 // Name - Resource Name 6409 Name *string `json:"name,omitempty"` 6410 // Kind - Kind of resource 6411 Kind *string `json:"kind,omitempty"` 6412 // Location - Resource Location 6413 Location *string `json:"location,omitempty"` 6414 // Type - Resource type 6415 Type *string `json:"type,omitempty"` 6416 // Tags - Resource tags 6417 Tags map[string]*string `json:"tags"` 6418} 6419 6420// MarshalJSON is the custom marshaler for HostingEnvironment. 6421func (he HostingEnvironment) MarshalJSON() ([]byte, error) { 6422 objectMap := make(map[string]interface{}) 6423 if he.HostingEnvironmentProperties != nil { 6424 objectMap["properties"] = he.HostingEnvironmentProperties 6425 } 6426 if he.ID != nil { 6427 objectMap["id"] = he.ID 6428 } 6429 if he.Name != nil { 6430 objectMap["name"] = he.Name 6431 } 6432 if he.Kind != nil { 6433 objectMap["kind"] = he.Kind 6434 } 6435 if he.Location != nil { 6436 objectMap["location"] = he.Location 6437 } 6438 if he.Type != nil { 6439 objectMap["type"] = he.Type 6440 } 6441 if he.Tags != nil { 6442 objectMap["tags"] = he.Tags 6443 } 6444 return json.Marshal(objectMap) 6445} 6446 6447// UnmarshalJSON is the custom unmarshaler for HostingEnvironment struct. 6448func (he *HostingEnvironment) UnmarshalJSON(body []byte) error { 6449 var m map[string]*json.RawMessage 6450 err := json.Unmarshal(body, &m) 6451 if err != nil { 6452 return err 6453 } 6454 for k, v := range m { 6455 switch k { 6456 case "properties": 6457 if v != nil { 6458 var hostingEnvironmentProperties HostingEnvironmentProperties 6459 err = json.Unmarshal(*v, &hostingEnvironmentProperties) 6460 if err != nil { 6461 return err 6462 } 6463 he.HostingEnvironmentProperties = &hostingEnvironmentProperties 6464 } 6465 case "id": 6466 if v != nil { 6467 var ID string 6468 err = json.Unmarshal(*v, &ID) 6469 if err != nil { 6470 return err 6471 } 6472 he.ID = &ID 6473 } 6474 case "name": 6475 if v != nil { 6476 var name string 6477 err = json.Unmarshal(*v, &name) 6478 if err != nil { 6479 return err 6480 } 6481 he.Name = &name 6482 } 6483 case "kind": 6484 if v != nil { 6485 var kind string 6486 err = json.Unmarshal(*v, &kind) 6487 if err != nil { 6488 return err 6489 } 6490 he.Kind = &kind 6491 } 6492 case "location": 6493 if v != nil { 6494 var location string 6495 err = json.Unmarshal(*v, &location) 6496 if err != nil { 6497 return err 6498 } 6499 he.Location = &location 6500 } 6501 case "type": 6502 if v != nil { 6503 var typeVar string 6504 err = json.Unmarshal(*v, &typeVar) 6505 if err != nil { 6506 return err 6507 } 6508 he.Type = &typeVar 6509 } 6510 case "tags": 6511 if v != nil { 6512 var tags map[string]*string 6513 err = json.Unmarshal(*v, &tags) 6514 if err != nil { 6515 return err 6516 } 6517 he.Tags = tags 6518 } 6519 } 6520 } 6521 6522 return nil 6523} 6524 6525// HostingEnvironmentCollection collection of hosting environments (App Service Environments) 6526type HostingEnvironmentCollection struct { 6527 autorest.Response `json:"-"` 6528 // Value - Collection of resources 6529 Value *[]HostingEnvironment `json:"value,omitempty"` 6530 // NextLink - Link to next page of resources 6531 NextLink *string `json:"nextLink,omitempty"` 6532} 6533 6534// HostingEnvironmentCollectionIterator provides access to a complete listing of HostingEnvironment values. 6535type HostingEnvironmentCollectionIterator struct { 6536 i int 6537 page HostingEnvironmentCollectionPage 6538} 6539 6540// NextWithContext advances to the next value. If there was an error making 6541// the request the iterator does not advance and the error is returned. 6542func (iter *HostingEnvironmentCollectionIterator) NextWithContext(ctx context.Context) (err error) { 6543 if tracing.IsEnabled() { 6544 ctx = tracing.StartSpan(ctx, fqdn+"/HostingEnvironmentCollectionIterator.NextWithContext") 6545 defer func() { 6546 sc := -1 6547 if iter.Response().Response.Response != nil { 6548 sc = iter.Response().Response.Response.StatusCode 6549 } 6550 tracing.EndSpan(ctx, sc, err) 6551 }() 6552 } 6553 iter.i++ 6554 if iter.i < len(iter.page.Values()) { 6555 return nil 6556 } 6557 err = iter.page.NextWithContext(ctx) 6558 if err != nil { 6559 iter.i-- 6560 return err 6561 } 6562 iter.i = 0 6563 return nil 6564} 6565 6566// Next advances to the next value. If there was an error making 6567// the request the iterator does not advance and the error is returned. 6568// Deprecated: Use NextWithContext() instead. 6569func (iter *HostingEnvironmentCollectionIterator) Next() error { 6570 return iter.NextWithContext(context.Background()) 6571} 6572 6573// NotDone returns true if the enumeration should be started or is not yet complete. 6574func (iter HostingEnvironmentCollectionIterator) NotDone() bool { 6575 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 6576} 6577 6578// Response returns the raw server response from the last page request. 6579func (iter HostingEnvironmentCollectionIterator) Response() HostingEnvironmentCollection { 6580 return iter.page.Response() 6581} 6582 6583// Value returns the current value or a zero-initialized value if the 6584// iterator has advanced beyond the end of the collection. 6585func (iter HostingEnvironmentCollectionIterator) Value() HostingEnvironment { 6586 if !iter.page.NotDone() { 6587 return HostingEnvironment{} 6588 } 6589 return iter.page.Values()[iter.i] 6590} 6591 6592// Creates a new instance of the HostingEnvironmentCollectionIterator type. 6593func NewHostingEnvironmentCollectionIterator(page HostingEnvironmentCollectionPage) HostingEnvironmentCollectionIterator { 6594 return HostingEnvironmentCollectionIterator{page: page} 6595} 6596 6597// IsEmpty returns true if the ListResult contains no values. 6598func (hec HostingEnvironmentCollection) IsEmpty() bool { 6599 return hec.Value == nil || len(*hec.Value) == 0 6600} 6601 6602// hasNextLink returns true if the NextLink is not empty. 6603func (hec HostingEnvironmentCollection) hasNextLink() bool { 6604 return hec.NextLink != nil && len(*hec.NextLink) != 0 6605} 6606 6607// hostingEnvironmentCollectionPreparer prepares a request to retrieve the next set of results. 6608// It returns nil if no more results exist. 6609func (hec HostingEnvironmentCollection) hostingEnvironmentCollectionPreparer(ctx context.Context) (*http.Request, error) { 6610 if !hec.hasNextLink() { 6611 return nil, nil 6612 } 6613 return autorest.Prepare((&http.Request{}).WithContext(ctx), 6614 autorest.AsJSON(), 6615 autorest.AsGet(), 6616 autorest.WithBaseURL(to.String(hec.NextLink))) 6617} 6618 6619// HostingEnvironmentCollectionPage contains a page of HostingEnvironment values. 6620type HostingEnvironmentCollectionPage struct { 6621 fn func(context.Context, HostingEnvironmentCollection) (HostingEnvironmentCollection, error) 6622 hec HostingEnvironmentCollection 6623} 6624 6625// NextWithContext advances to the next page of values. If there was an error making 6626// the request the page does not advance and the error is returned. 6627func (page *HostingEnvironmentCollectionPage) NextWithContext(ctx context.Context) (err error) { 6628 if tracing.IsEnabled() { 6629 ctx = tracing.StartSpan(ctx, fqdn+"/HostingEnvironmentCollectionPage.NextWithContext") 6630 defer func() { 6631 sc := -1 6632 if page.Response().Response.Response != nil { 6633 sc = page.Response().Response.Response.StatusCode 6634 } 6635 tracing.EndSpan(ctx, sc, err) 6636 }() 6637 } 6638 for { 6639 next, err := page.fn(ctx, page.hec) 6640 if err != nil { 6641 return err 6642 } 6643 page.hec = next 6644 if !next.hasNextLink() || !next.IsEmpty() { 6645 break 6646 } 6647 } 6648 return nil 6649} 6650 6651// Next advances to the next page of values. If there was an error making 6652// the request the page does not advance and the error is returned. 6653// Deprecated: Use NextWithContext() instead. 6654func (page *HostingEnvironmentCollectionPage) Next() error { 6655 return page.NextWithContext(context.Background()) 6656} 6657 6658// NotDone returns true if the page enumeration should be started or is not yet complete. 6659func (page HostingEnvironmentCollectionPage) NotDone() bool { 6660 return !page.hec.IsEmpty() 6661} 6662 6663// Response returns the raw server response from the last page request. 6664func (page HostingEnvironmentCollectionPage) Response() HostingEnvironmentCollection { 6665 return page.hec 6666} 6667 6668// Values returns the slice of values for the current page or nil if there are no values. 6669func (page HostingEnvironmentCollectionPage) Values() []HostingEnvironment { 6670 if page.hec.IsEmpty() { 6671 return nil 6672 } 6673 return *page.hec.Value 6674} 6675 6676// Creates a new instance of the HostingEnvironmentCollectionPage type. 6677func NewHostingEnvironmentCollectionPage(cur HostingEnvironmentCollection, getNextPage func(context.Context, HostingEnvironmentCollection) (HostingEnvironmentCollection, error)) HostingEnvironmentCollectionPage { 6678 return HostingEnvironmentCollectionPage{ 6679 fn: getNextPage, 6680 hec: cur, 6681 } 6682} 6683 6684// HostingEnvironmentDiagnostics diagnostics for a hosting environment (App Service Environment) 6685type HostingEnvironmentDiagnostics struct { 6686 autorest.Response `json:"-"` 6687 // Name - Name/identifier of the diagnostics 6688 Name *string `json:"name,omitempty"` 6689 // DiagnosicsOutput - Diagnostics output 6690 DiagnosicsOutput *string `json:"diagnosicsOutput,omitempty"` 6691} 6692 6693// HostingEnvironmentProfile specification for a hostingEnvironment (App Service Environment) to use for 6694// this resource 6695type HostingEnvironmentProfile struct { 6696 // ID - Resource id of the hostingEnvironment (App Service Environment) 6697 ID *string `json:"id,omitempty"` 6698 // Name - Name of the hostingEnvironment (App Service Environment) (read only) 6699 Name *string `json:"name,omitempty"` 6700 // Type - Resource type of the hostingEnvironment (App Service Environment) (read only) 6701 Type *string `json:"type,omitempty"` 6702} 6703 6704// HostingEnvironmentProperties ... 6705type HostingEnvironmentProperties struct { 6706 // Name - Name of the hostingEnvironment (App Service Environment) 6707 Name *string `json:"name,omitempty"` 6708 // Location - Location of the hostingEnvironment (App Service Environment), e.g. "West US" 6709 Location *string `json:"location,omitempty"` 6710 // ProvisioningState - Provisioning state of the hostingEnvironment (App Service Environment). Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateFailed', 'ProvisioningStateCanceled', 'ProvisioningStateInProgress', 'ProvisioningStateDeleting' 6711 ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` 6712 // Status - Current status of the hostingEnvironment (App Service Environment). Possible values include: 'Preparing', 'Ready', 'Scaling', 'Deleting' 6713 Status HostingEnvironmentStatus `json:"status,omitempty"` 6714 // VnetName - Name of the hostingEnvironment's (App Service Environment) virtual network 6715 VnetName *string `json:"vnetName,omitempty"` 6716 // VnetResourceGroupName - Resource group of the hostingEnvironment's (App Service Environment) virtual network 6717 VnetResourceGroupName *string `json:"vnetResourceGroupName,omitempty"` 6718 // VnetSubnetName - Subnet of the hostingEnvironment's (App Service Environment) virtual network 6719 VnetSubnetName *string `json:"vnetSubnetName,omitempty"` 6720 // VirtualNetwork - Description of the hostingEnvironment's (App Service Environment) virtual network 6721 VirtualNetwork *VirtualNetworkProfile `json:"virtualNetwork,omitempty"` 6722 // InternalLoadBalancingMode - Specifies which endpoints to serve internally in the hostingEnvironment's (App Service Environment) VNET. Possible values include: 'None', 'Web', 'Publishing' 6723 InternalLoadBalancingMode InternalLoadBalancingMode `json:"internalLoadBalancingMode,omitempty"` 6724 // MultiSize - Front-end VM size, e.g. "Medium", "Large" 6725 MultiSize *string `json:"multiSize,omitempty"` 6726 // MultiRoleCount - Number of front-end instances 6727 MultiRoleCount *int32 `json:"multiRoleCount,omitempty"` 6728 // WorkerPools - Description of worker pools with worker size ids, VM sizes, and number of workers in each pool 6729 WorkerPools *[]WorkerPool `json:"workerPools,omitempty"` 6730 // IpsslAddressCount - Number of IP SSL addresses reserved for this hostingEnvironment (App Service Environment) 6731 IpsslAddressCount *int32 `json:"ipsslAddressCount,omitempty"` 6732 // DatabaseEdition - Edition of the metadata database for the hostingEnvironment (App Service Environment) e.g. "Standard" 6733 DatabaseEdition *string `json:"databaseEdition,omitempty"` 6734 // DatabaseServiceObjective - Service objective of the metadata database for the hostingEnvironment (App Service Environment) e.g. "S0" 6735 DatabaseServiceObjective *string `json:"databaseServiceObjective,omitempty"` 6736 // UpgradeDomains - Number of upgrade domains of this hostingEnvironment (App Service Environment) 6737 UpgradeDomains *int32 `json:"upgradeDomains,omitempty"` 6738 // SubscriptionID - Subscription of the hostingEnvironment (App Service Environment) 6739 SubscriptionID *string `json:"subscriptionId,omitempty"` 6740 // DNSSuffix - DNS suffix of the hostingEnvironment (App Service Environment) 6741 DNSSuffix *string `json:"dnsSuffix,omitempty"` 6742 // LastAction - Last deployment action on this hostingEnvironment (App Service Environment) 6743 LastAction *string `json:"lastAction,omitempty"` 6744 // LastActionResult - Result of the last deployment action on this hostingEnvironment (App Service Environment) 6745 LastActionResult *string `json:"lastActionResult,omitempty"` 6746 // AllowedMultiSizes - List of comma separated strings describing which VM sizes are allowed for front-ends 6747 AllowedMultiSizes *string `json:"allowedMultiSizes,omitempty"` 6748 // AllowedWorkerSizes - List of comma separated strings describing which VM sizes are allowed for workers 6749 AllowedWorkerSizes *string `json:"allowedWorkerSizes,omitempty"` 6750 // MaximumNumberOfMachines - Maximum number of VMs in this hostingEnvironment (App Service Environment) 6751 MaximumNumberOfMachines *int32 `json:"maximumNumberOfMachines,omitempty"` 6752 // VipMappings - Description of IP SSL mapping for this hostingEnvironment (App Service Environment) 6753 VipMappings *[]VirtualIPMapping `json:"vipMappings,omitempty"` 6754 // EnvironmentCapacities - Current total, used, and available worker capacities 6755 EnvironmentCapacities *[]StampCapacity `json:"environmentCapacities,omitempty"` 6756 // NetworkAccessControlList - Access control list for controlling traffic to the hostingEnvironment (App Service Environment) 6757 NetworkAccessControlList *[]NetworkAccessControlEntry `json:"networkAccessControlList,omitempty"` 6758 // EnvironmentIsHealthy - True/false indicating whether the hostingEnvironment (App Service Environment) is healthy 6759 EnvironmentIsHealthy *bool `json:"environmentIsHealthy,omitempty"` 6760 // EnvironmentStatus - Detailed message about with results of the last check of the hostingEnvironment (App Service Environment) 6761 EnvironmentStatus *string `json:"environmentStatus,omitempty"` 6762 // ResourceGroup - Resource group of the hostingEnvironment (App Service Environment) 6763 ResourceGroup *string `json:"resourceGroup,omitempty"` 6764 // APIManagementAccountID - Api Management Account associated with this Hosting Environment 6765 APIManagementAccountID *string `json:"apiManagementAccountId,omitempty"` 6766 // Suspended - True/false indicating whether the hostingEnvironment is suspended. The environment can be suspended e.g. when the management endpoint is no longer available 6767 // (most likely because NSG blocked the incoming traffic) 6768 Suspended *bool `json:"suspended,omitempty"` 6769 // ClusterSettings - Custom settings for changing the behavior of the hosting environment 6770 ClusterSettings *[]NameValuePair `json:"clusterSettings,omitempty"` 6771} 6772 6773// HostingEnvironmentsCreateOrUpdateHostingEnvironmentFuture an abstraction for monitoring and retrieving 6774// the results of a long-running operation. 6775type HostingEnvironmentsCreateOrUpdateHostingEnvironmentFuture struct { 6776 azure.FutureAPI 6777 // Result returns the result of the asynchronous operation. 6778 // If the operation has not completed it will return an error. 6779 Result func(HostingEnvironmentsClient) (HostingEnvironment, error) 6780} 6781 6782// UnmarshalJSON is the custom unmarshaller for CreateFuture. 6783func (future *HostingEnvironmentsCreateOrUpdateHostingEnvironmentFuture) UnmarshalJSON(body []byte) error { 6784 var azFuture azure.Future 6785 if err := json.Unmarshal(body, &azFuture); err != nil { 6786 return err 6787 } 6788 future.FutureAPI = &azFuture 6789 future.Result = future.result 6790 return nil 6791} 6792 6793// result is the default implementation for HostingEnvironmentsCreateOrUpdateHostingEnvironmentFuture.Result. 6794func (future *HostingEnvironmentsCreateOrUpdateHostingEnvironmentFuture) result(client HostingEnvironmentsClient) (he HostingEnvironment, err error) { 6795 var done bool 6796 done, err = future.DoneWithContext(context.Background(), client) 6797 if err != nil { 6798 err = autorest.NewErrorWithError(err, "web.HostingEnvironmentsCreateOrUpdateHostingEnvironmentFuture", "Result", future.Response(), "Polling failure") 6799 return 6800 } 6801 if !done { 6802 he.Response.Response = future.Response() 6803 err = azure.NewAsyncOpIncompleteError("web.HostingEnvironmentsCreateOrUpdateHostingEnvironmentFuture") 6804 return 6805 } 6806 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 6807 if he.Response.Response, err = future.GetResult(sender); err == nil && he.Response.Response.StatusCode != http.StatusNoContent { 6808 he, err = client.CreateOrUpdateHostingEnvironmentResponder(he.Response.Response) 6809 if err != nil { 6810 err = autorest.NewErrorWithError(err, "web.HostingEnvironmentsCreateOrUpdateHostingEnvironmentFuture", "Result", he.Response.Response, "Failure responding to request") 6811 } 6812 } 6813 return 6814} 6815 6816// HostingEnvironmentsCreateOrUpdateMultiRolePoolFuture an abstraction for monitoring and retrieving the 6817// results of a long-running operation. 6818type HostingEnvironmentsCreateOrUpdateMultiRolePoolFuture struct { 6819 azure.FutureAPI 6820 // Result returns the result of the asynchronous operation. 6821 // If the operation has not completed it will return an error. 6822 Result func(HostingEnvironmentsClient) (WorkerPool, error) 6823} 6824 6825// UnmarshalJSON is the custom unmarshaller for CreateFuture. 6826func (future *HostingEnvironmentsCreateOrUpdateMultiRolePoolFuture) UnmarshalJSON(body []byte) error { 6827 var azFuture azure.Future 6828 if err := json.Unmarshal(body, &azFuture); err != nil { 6829 return err 6830 } 6831 future.FutureAPI = &azFuture 6832 future.Result = future.result 6833 return nil 6834} 6835 6836// result is the default implementation for HostingEnvironmentsCreateOrUpdateMultiRolePoolFuture.Result. 6837func (future *HostingEnvironmentsCreateOrUpdateMultiRolePoolFuture) result(client HostingEnvironmentsClient) (wp WorkerPool, err error) { 6838 var done bool 6839 done, err = future.DoneWithContext(context.Background(), client) 6840 if err != nil { 6841 err = autorest.NewErrorWithError(err, "web.HostingEnvironmentsCreateOrUpdateMultiRolePoolFuture", "Result", future.Response(), "Polling failure") 6842 return 6843 } 6844 if !done { 6845 wp.Response.Response = future.Response() 6846 err = azure.NewAsyncOpIncompleteError("web.HostingEnvironmentsCreateOrUpdateMultiRolePoolFuture") 6847 return 6848 } 6849 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 6850 if wp.Response.Response, err = future.GetResult(sender); err == nil && wp.Response.Response.StatusCode != http.StatusNoContent { 6851 wp, err = client.CreateOrUpdateMultiRolePoolResponder(wp.Response.Response) 6852 if err != nil { 6853 err = autorest.NewErrorWithError(err, "web.HostingEnvironmentsCreateOrUpdateMultiRolePoolFuture", "Result", wp.Response.Response, "Failure responding to request") 6854 } 6855 } 6856 return 6857} 6858 6859// HostingEnvironmentsCreateOrUpdateWorkerPoolFuture an abstraction for monitoring and retrieving the 6860// results of a long-running operation. 6861type HostingEnvironmentsCreateOrUpdateWorkerPoolFuture struct { 6862 azure.FutureAPI 6863 // Result returns the result of the asynchronous operation. 6864 // If the operation has not completed it will return an error. 6865 Result func(HostingEnvironmentsClient) (WorkerPool, error) 6866} 6867 6868// UnmarshalJSON is the custom unmarshaller for CreateFuture. 6869func (future *HostingEnvironmentsCreateOrUpdateWorkerPoolFuture) UnmarshalJSON(body []byte) error { 6870 var azFuture azure.Future 6871 if err := json.Unmarshal(body, &azFuture); err != nil { 6872 return err 6873 } 6874 future.FutureAPI = &azFuture 6875 future.Result = future.result 6876 return nil 6877} 6878 6879// result is the default implementation for HostingEnvironmentsCreateOrUpdateWorkerPoolFuture.Result. 6880func (future *HostingEnvironmentsCreateOrUpdateWorkerPoolFuture) result(client HostingEnvironmentsClient) (wp WorkerPool, err error) { 6881 var done bool 6882 done, err = future.DoneWithContext(context.Background(), client) 6883 if err != nil { 6884 err = autorest.NewErrorWithError(err, "web.HostingEnvironmentsCreateOrUpdateWorkerPoolFuture", "Result", future.Response(), "Polling failure") 6885 return 6886 } 6887 if !done { 6888 wp.Response.Response = future.Response() 6889 err = azure.NewAsyncOpIncompleteError("web.HostingEnvironmentsCreateOrUpdateWorkerPoolFuture") 6890 return 6891 } 6892 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 6893 if wp.Response.Response, err = future.GetResult(sender); err == nil && wp.Response.Response.StatusCode != http.StatusNoContent { 6894 wp, err = client.CreateOrUpdateWorkerPoolResponder(wp.Response.Response) 6895 if err != nil { 6896 err = autorest.NewErrorWithError(err, "web.HostingEnvironmentsCreateOrUpdateWorkerPoolFuture", "Result", wp.Response.Response, "Failure responding to request") 6897 } 6898 } 6899 return 6900} 6901 6902// HostingEnvironmentsDeleteHostingEnvironmentFuture an abstraction for monitoring and retrieving the 6903// results of a long-running operation. 6904type HostingEnvironmentsDeleteHostingEnvironmentFuture struct { 6905 azure.FutureAPI 6906 // Result returns the result of the asynchronous operation. 6907 // If the operation has not completed it will return an error. 6908 Result func(HostingEnvironmentsClient) (SetObject, error) 6909} 6910 6911// UnmarshalJSON is the custom unmarshaller for CreateFuture. 6912func (future *HostingEnvironmentsDeleteHostingEnvironmentFuture) UnmarshalJSON(body []byte) error { 6913 var azFuture azure.Future 6914 if err := json.Unmarshal(body, &azFuture); err != nil { 6915 return err 6916 } 6917 future.FutureAPI = &azFuture 6918 future.Result = future.result 6919 return nil 6920} 6921 6922// result is the default implementation for HostingEnvironmentsDeleteHostingEnvironmentFuture.Result. 6923func (future *HostingEnvironmentsDeleteHostingEnvironmentFuture) result(client HostingEnvironmentsClient) (so SetObject, err error) { 6924 var done bool 6925 done, err = future.DoneWithContext(context.Background(), client) 6926 if err != nil { 6927 err = autorest.NewErrorWithError(err, "web.HostingEnvironmentsDeleteHostingEnvironmentFuture", "Result", future.Response(), "Polling failure") 6928 return 6929 } 6930 if !done { 6931 so.Response.Response = future.Response() 6932 err = azure.NewAsyncOpIncompleteError("web.HostingEnvironmentsDeleteHostingEnvironmentFuture") 6933 return 6934 } 6935 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 6936 if so.Response.Response, err = future.GetResult(sender); err == nil && so.Response.Response.StatusCode != http.StatusNoContent { 6937 so, err = client.DeleteHostingEnvironmentResponder(so.Response.Response) 6938 if err != nil { 6939 err = autorest.NewErrorWithError(err, "web.HostingEnvironmentsDeleteHostingEnvironmentFuture", "Result", so.Response.Response, "Failure responding to request") 6940 } 6941 } 6942 return 6943} 6944 6945// HostingEnvironmentServiceDescriptions back end service per ASE 6946type HostingEnvironmentServiceDescriptions struct { 6947 // HostingEnvironmentID - Hosting environment Id 6948 HostingEnvironmentID *string `json:"hostingEnvironmentId,omitempty"` 6949 // HostID - Host Id 6950 HostID *string `json:"hostId,omitempty"` 6951 // ServiceURL - service url to use 6952 ServiceURL *string `json:"serviceUrl,omitempty"` 6953 // UseInternalRouting - When the backend url is in same ASE, for performance reason this flag can be set to true 6954 // If WebApp.DisableHostNames is also set it improves the security by making the back end accessible only 6955 // via API calls 6956 // Note: calls will fail if this option is used but back end is not on the same ASE 6957 UseInternalRouting *bool `json:"useInternalRouting,omitempty"` 6958} 6959 6960// HostingEnvironmentsResumeHostingEnvironmentAllFuture an abstraction for monitoring and retrieving the 6961// results of a long-running operation. 6962type HostingEnvironmentsResumeHostingEnvironmentAllFuture struct { 6963 azure.FutureAPI 6964 // Result returns the result of the asynchronous operation. 6965 // If the operation has not completed it will return an error. 6966 Result func(HostingEnvironmentsClient) (SiteCollectionPage, error) 6967} 6968 6969// UnmarshalJSON is the custom unmarshaller for CreateFuture. 6970func (future *HostingEnvironmentsResumeHostingEnvironmentAllFuture) UnmarshalJSON(body []byte) error { 6971 var azFuture azure.Future 6972 if err := json.Unmarshal(body, &azFuture); err != nil { 6973 return err 6974 } 6975 future.FutureAPI = &azFuture 6976 future.Result = future.result 6977 return nil 6978} 6979 6980// result is the default implementation for HostingEnvironmentsResumeHostingEnvironmentAllFuture.Result. 6981func (future *HostingEnvironmentsResumeHostingEnvironmentAllFuture) result(client HostingEnvironmentsClient) (scp SiteCollectionPage, err error) { 6982 var done bool 6983 done, err = future.DoneWithContext(context.Background(), client) 6984 if err != nil { 6985 err = autorest.NewErrorWithError(err, "web.HostingEnvironmentsResumeHostingEnvironmentAllFuture", "Result", future.Response(), "Polling failure") 6986 return 6987 } 6988 if !done { 6989 scp.sc.Response.Response = future.Response() 6990 err = azure.NewAsyncOpIncompleteError("web.HostingEnvironmentsResumeHostingEnvironmentAllFuture") 6991 return 6992 } 6993 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 6994 if scp.sc.Response.Response, err = future.GetResult(sender); err == nil && scp.sc.Response.Response.StatusCode != http.StatusNoContent { 6995 scp, err = client.ResumeHostingEnvironmentResponder(scp.sc.Response.Response) 6996 if err != nil { 6997 err = autorest.NewErrorWithError(err, "web.HostingEnvironmentsResumeHostingEnvironmentAllFuture", "Result", scp.sc.Response.Response, "Failure responding to request") 6998 } 6999 } 7000 return 7001} 7002 7003// HostingEnvironmentsResumeHostingEnvironmentFuture an abstraction for monitoring and retrieving the 7004// results of a long-running operation. 7005type HostingEnvironmentsResumeHostingEnvironmentFuture struct { 7006 azure.FutureAPI 7007 // Result returns the result of the asynchronous operation. 7008 // If the operation has not completed it will return an error. 7009 Result func(HostingEnvironmentsClient) (SiteCollectionPage, error) 7010} 7011 7012// UnmarshalJSON is the custom unmarshaller for CreateFuture. 7013func (future *HostingEnvironmentsResumeHostingEnvironmentFuture) UnmarshalJSON(body []byte) error { 7014 var azFuture azure.Future 7015 if err := json.Unmarshal(body, &azFuture); err != nil { 7016 return err 7017 } 7018 future.FutureAPI = &azFuture 7019 future.Result = future.result 7020 return nil 7021} 7022 7023// result is the default implementation for HostingEnvironmentsResumeHostingEnvironmentFuture.Result. 7024func (future *HostingEnvironmentsResumeHostingEnvironmentFuture) result(client HostingEnvironmentsClient) (scp SiteCollectionPage, err error) { 7025 var done bool 7026 done, err = future.DoneWithContext(context.Background(), client) 7027 if err != nil { 7028 err = autorest.NewErrorWithError(err, "web.HostingEnvironmentsResumeHostingEnvironmentFuture", "Result", future.Response(), "Polling failure") 7029 return 7030 } 7031 if !done { 7032 scp.sc.Response.Response = future.Response() 7033 err = azure.NewAsyncOpIncompleteError("web.HostingEnvironmentsResumeHostingEnvironmentFuture") 7034 return 7035 } 7036 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 7037 if scp.sc.Response.Response, err = future.GetResult(sender); err == nil && scp.sc.Response.Response.StatusCode != http.StatusNoContent { 7038 scp, err = client.ResumeHostingEnvironmentResponder(scp.sc.Response.Response) 7039 if err != nil { 7040 err = autorest.NewErrorWithError(err, "web.HostingEnvironmentsResumeHostingEnvironmentFuture", "Result", scp.sc.Response.Response, "Failure responding to request") 7041 } 7042 } 7043 return 7044} 7045 7046// HostingEnvironmentsSuspendHostingEnvironmentAllFuture an abstraction for monitoring and retrieving the 7047// results of a long-running operation. 7048type HostingEnvironmentsSuspendHostingEnvironmentAllFuture struct { 7049 azure.FutureAPI 7050 // Result returns the result of the asynchronous operation. 7051 // If the operation has not completed it will return an error. 7052 Result func(HostingEnvironmentsClient) (SiteCollectionPage, error) 7053} 7054 7055// UnmarshalJSON is the custom unmarshaller for CreateFuture. 7056func (future *HostingEnvironmentsSuspendHostingEnvironmentAllFuture) UnmarshalJSON(body []byte) error { 7057 var azFuture azure.Future 7058 if err := json.Unmarshal(body, &azFuture); err != nil { 7059 return err 7060 } 7061 future.FutureAPI = &azFuture 7062 future.Result = future.result 7063 return nil 7064} 7065 7066// result is the default implementation for HostingEnvironmentsSuspendHostingEnvironmentAllFuture.Result. 7067func (future *HostingEnvironmentsSuspendHostingEnvironmentAllFuture) result(client HostingEnvironmentsClient) (scp SiteCollectionPage, err error) { 7068 var done bool 7069 done, err = future.DoneWithContext(context.Background(), client) 7070 if err != nil { 7071 err = autorest.NewErrorWithError(err, "web.HostingEnvironmentsSuspendHostingEnvironmentAllFuture", "Result", future.Response(), "Polling failure") 7072 return 7073 } 7074 if !done { 7075 scp.sc.Response.Response = future.Response() 7076 err = azure.NewAsyncOpIncompleteError("web.HostingEnvironmentsSuspendHostingEnvironmentAllFuture") 7077 return 7078 } 7079 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 7080 if scp.sc.Response.Response, err = future.GetResult(sender); err == nil && scp.sc.Response.Response.StatusCode != http.StatusNoContent { 7081 scp, err = client.SuspendHostingEnvironmentResponder(scp.sc.Response.Response) 7082 if err != nil { 7083 err = autorest.NewErrorWithError(err, "web.HostingEnvironmentsSuspendHostingEnvironmentAllFuture", "Result", scp.sc.Response.Response, "Failure responding to request") 7084 } 7085 } 7086 return 7087} 7088 7089// HostingEnvironmentsSuspendHostingEnvironmentFuture an abstraction for monitoring and retrieving the 7090// results of a long-running operation. 7091type HostingEnvironmentsSuspendHostingEnvironmentFuture struct { 7092 azure.FutureAPI 7093 // Result returns the result of the asynchronous operation. 7094 // If the operation has not completed it will return an error. 7095 Result func(HostingEnvironmentsClient) (SiteCollectionPage, error) 7096} 7097 7098// UnmarshalJSON is the custom unmarshaller for CreateFuture. 7099func (future *HostingEnvironmentsSuspendHostingEnvironmentFuture) UnmarshalJSON(body []byte) error { 7100 var azFuture azure.Future 7101 if err := json.Unmarshal(body, &azFuture); err != nil { 7102 return err 7103 } 7104 future.FutureAPI = &azFuture 7105 future.Result = future.result 7106 return nil 7107} 7108 7109// result is the default implementation for HostingEnvironmentsSuspendHostingEnvironmentFuture.Result. 7110func (future *HostingEnvironmentsSuspendHostingEnvironmentFuture) result(client HostingEnvironmentsClient) (scp SiteCollectionPage, err error) { 7111 var done bool 7112 done, err = future.DoneWithContext(context.Background(), client) 7113 if err != nil { 7114 err = autorest.NewErrorWithError(err, "web.HostingEnvironmentsSuspendHostingEnvironmentFuture", "Result", future.Response(), "Polling failure") 7115 return 7116 } 7117 if !done { 7118 scp.sc.Response.Response = future.Response() 7119 err = azure.NewAsyncOpIncompleteError("web.HostingEnvironmentsSuspendHostingEnvironmentFuture") 7120 return 7121 } 7122 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 7123 if scp.sc.Response.Response, err = future.GetResult(sender); err == nil && scp.sc.Response.Response.StatusCode != http.StatusNoContent { 7124 scp, err = client.SuspendHostingEnvironmentResponder(scp.sc.Response.Response) 7125 if err != nil { 7126 err = autorest.NewErrorWithError(err, "web.HostingEnvironmentsSuspendHostingEnvironmentFuture", "Result", scp.sc.Response.Response, "Failure responding to request") 7127 } 7128 } 7129 return 7130} 7131 7132// HostName details of a hostname derived from a domain 7133type HostName struct { 7134 // Name - Name of the hostname 7135 Name *string `json:"name,omitempty"` 7136 // SiteNames - List of sites the hostname is assigned to. This list will have more than one site only if the hostname is pointing to a Traffic Manager 7137 SiteNames *[]string `json:"siteNames,omitempty"` 7138 // AzureResourceName - Name of the Azure resource the hostname is assigned to. If it is assigned to a traffic manager then it will be the traffic manager name otherwise it will be the website name 7139 AzureResourceName *string `json:"azureResourceName,omitempty"` 7140 // AzureResourceType - Type of the Azure resource the hostname is assigned to. Possible values include: 'Website', 'TrafficManager' 7141 AzureResourceType AzureResourceType `json:"azureResourceType,omitempty"` 7142 // CustomHostNameDNSRecordType - Type of the Dns record. Possible values include: 'CName', 'A' 7143 CustomHostNameDNSRecordType CustomHostNameDNSRecordType `json:"customHostNameDnsRecordType,omitempty"` 7144 // HostNameType - Type of the hostname. Possible values include: 'Verified', 'Managed' 7145 HostNameType HostNameType `json:"hostNameType,omitempty"` 7146} 7147 7148// HostNameBinding a host name binding object 7149type HostNameBinding struct { 7150 autorest.Response `json:"-"` 7151 *HostNameBindingProperties `json:"properties,omitempty"` 7152 // ID - Resource Id 7153 ID *string `json:"id,omitempty"` 7154 // Name - Resource Name 7155 Name *string `json:"name,omitempty"` 7156 // Kind - Kind of resource 7157 Kind *string `json:"kind,omitempty"` 7158 // Location - Resource Location 7159 Location *string `json:"location,omitempty"` 7160 // Type - Resource type 7161 Type *string `json:"type,omitempty"` 7162 // Tags - Resource tags 7163 Tags map[string]*string `json:"tags"` 7164} 7165 7166// MarshalJSON is the custom marshaler for HostNameBinding. 7167func (hnb HostNameBinding) MarshalJSON() ([]byte, error) { 7168 objectMap := make(map[string]interface{}) 7169 if hnb.HostNameBindingProperties != nil { 7170 objectMap["properties"] = hnb.HostNameBindingProperties 7171 } 7172 if hnb.ID != nil { 7173 objectMap["id"] = hnb.ID 7174 } 7175 if hnb.Name != nil { 7176 objectMap["name"] = hnb.Name 7177 } 7178 if hnb.Kind != nil { 7179 objectMap["kind"] = hnb.Kind 7180 } 7181 if hnb.Location != nil { 7182 objectMap["location"] = hnb.Location 7183 } 7184 if hnb.Type != nil { 7185 objectMap["type"] = hnb.Type 7186 } 7187 if hnb.Tags != nil { 7188 objectMap["tags"] = hnb.Tags 7189 } 7190 return json.Marshal(objectMap) 7191} 7192 7193// UnmarshalJSON is the custom unmarshaler for HostNameBinding struct. 7194func (hnb *HostNameBinding) UnmarshalJSON(body []byte) error { 7195 var m map[string]*json.RawMessage 7196 err := json.Unmarshal(body, &m) 7197 if err != nil { 7198 return err 7199 } 7200 for k, v := range m { 7201 switch k { 7202 case "properties": 7203 if v != nil { 7204 var hostNameBindingProperties HostNameBindingProperties 7205 err = json.Unmarshal(*v, &hostNameBindingProperties) 7206 if err != nil { 7207 return err 7208 } 7209 hnb.HostNameBindingProperties = &hostNameBindingProperties 7210 } 7211 case "id": 7212 if v != nil { 7213 var ID string 7214 err = json.Unmarshal(*v, &ID) 7215 if err != nil { 7216 return err 7217 } 7218 hnb.ID = &ID 7219 } 7220 case "name": 7221 if v != nil { 7222 var name string 7223 err = json.Unmarshal(*v, &name) 7224 if err != nil { 7225 return err 7226 } 7227 hnb.Name = &name 7228 } 7229 case "kind": 7230 if v != nil { 7231 var kind string 7232 err = json.Unmarshal(*v, &kind) 7233 if err != nil { 7234 return err 7235 } 7236 hnb.Kind = &kind 7237 } 7238 case "location": 7239 if v != nil { 7240 var location string 7241 err = json.Unmarshal(*v, &location) 7242 if err != nil { 7243 return err 7244 } 7245 hnb.Location = &location 7246 } 7247 case "type": 7248 if v != nil { 7249 var typeVar string 7250 err = json.Unmarshal(*v, &typeVar) 7251 if err != nil { 7252 return err 7253 } 7254 hnb.Type = &typeVar 7255 } 7256 case "tags": 7257 if v != nil { 7258 var tags map[string]*string 7259 err = json.Unmarshal(*v, &tags) 7260 if err != nil { 7261 return err 7262 } 7263 hnb.Tags = tags 7264 } 7265 } 7266 } 7267 7268 return nil 7269} 7270 7271// HostNameBindingCollection collection of host name bindings 7272type HostNameBindingCollection struct { 7273 autorest.Response `json:"-"` 7274 // Value - Collection of resources 7275 Value *[]HostNameBinding `json:"value,omitempty"` 7276 // NextLink - Link to next page of resources 7277 NextLink *string `json:"nextLink,omitempty"` 7278} 7279 7280// HostNameBindingCollectionIterator provides access to a complete listing of HostNameBinding values. 7281type HostNameBindingCollectionIterator struct { 7282 i int 7283 page HostNameBindingCollectionPage 7284} 7285 7286// NextWithContext advances to the next value. If there was an error making 7287// the request the iterator does not advance and the error is returned. 7288func (iter *HostNameBindingCollectionIterator) NextWithContext(ctx context.Context) (err error) { 7289 if tracing.IsEnabled() { 7290 ctx = tracing.StartSpan(ctx, fqdn+"/HostNameBindingCollectionIterator.NextWithContext") 7291 defer func() { 7292 sc := -1 7293 if iter.Response().Response.Response != nil { 7294 sc = iter.Response().Response.Response.StatusCode 7295 } 7296 tracing.EndSpan(ctx, sc, err) 7297 }() 7298 } 7299 iter.i++ 7300 if iter.i < len(iter.page.Values()) { 7301 return nil 7302 } 7303 err = iter.page.NextWithContext(ctx) 7304 if err != nil { 7305 iter.i-- 7306 return err 7307 } 7308 iter.i = 0 7309 return nil 7310} 7311 7312// Next advances to the next value. If there was an error making 7313// the request the iterator does not advance and the error is returned. 7314// Deprecated: Use NextWithContext() instead. 7315func (iter *HostNameBindingCollectionIterator) Next() error { 7316 return iter.NextWithContext(context.Background()) 7317} 7318 7319// NotDone returns true if the enumeration should be started or is not yet complete. 7320func (iter HostNameBindingCollectionIterator) NotDone() bool { 7321 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 7322} 7323 7324// Response returns the raw server response from the last page request. 7325func (iter HostNameBindingCollectionIterator) Response() HostNameBindingCollection { 7326 return iter.page.Response() 7327} 7328 7329// Value returns the current value or a zero-initialized value if the 7330// iterator has advanced beyond the end of the collection. 7331func (iter HostNameBindingCollectionIterator) Value() HostNameBinding { 7332 if !iter.page.NotDone() { 7333 return HostNameBinding{} 7334 } 7335 return iter.page.Values()[iter.i] 7336} 7337 7338// Creates a new instance of the HostNameBindingCollectionIterator type. 7339func NewHostNameBindingCollectionIterator(page HostNameBindingCollectionPage) HostNameBindingCollectionIterator { 7340 return HostNameBindingCollectionIterator{page: page} 7341} 7342 7343// IsEmpty returns true if the ListResult contains no values. 7344func (hnbc HostNameBindingCollection) IsEmpty() bool { 7345 return hnbc.Value == nil || len(*hnbc.Value) == 0 7346} 7347 7348// hasNextLink returns true if the NextLink is not empty. 7349func (hnbc HostNameBindingCollection) hasNextLink() bool { 7350 return hnbc.NextLink != nil && len(*hnbc.NextLink) != 0 7351} 7352 7353// hostNameBindingCollectionPreparer prepares a request to retrieve the next set of results. 7354// It returns nil if no more results exist. 7355func (hnbc HostNameBindingCollection) hostNameBindingCollectionPreparer(ctx context.Context) (*http.Request, error) { 7356 if !hnbc.hasNextLink() { 7357 return nil, nil 7358 } 7359 return autorest.Prepare((&http.Request{}).WithContext(ctx), 7360 autorest.AsJSON(), 7361 autorest.AsGet(), 7362 autorest.WithBaseURL(to.String(hnbc.NextLink))) 7363} 7364 7365// HostNameBindingCollectionPage contains a page of HostNameBinding values. 7366type HostNameBindingCollectionPage struct { 7367 fn func(context.Context, HostNameBindingCollection) (HostNameBindingCollection, error) 7368 hnbc HostNameBindingCollection 7369} 7370 7371// NextWithContext advances to the next page of values. If there was an error making 7372// the request the page does not advance and the error is returned. 7373func (page *HostNameBindingCollectionPage) NextWithContext(ctx context.Context) (err error) { 7374 if tracing.IsEnabled() { 7375 ctx = tracing.StartSpan(ctx, fqdn+"/HostNameBindingCollectionPage.NextWithContext") 7376 defer func() { 7377 sc := -1 7378 if page.Response().Response.Response != nil { 7379 sc = page.Response().Response.Response.StatusCode 7380 } 7381 tracing.EndSpan(ctx, sc, err) 7382 }() 7383 } 7384 for { 7385 next, err := page.fn(ctx, page.hnbc) 7386 if err != nil { 7387 return err 7388 } 7389 page.hnbc = next 7390 if !next.hasNextLink() || !next.IsEmpty() { 7391 break 7392 } 7393 } 7394 return nil 7395} 7396 7397// Next advances to the next page of values. If there was an error making 7398// the request the page does not advance and the error is returned. 7399// Deprecated: Use NextWithContext() instead. 7400func (page *HostNameBindingCollectionPage) Next() error { 7401 return page.NextWithContext(context.Background()) 7402} 7403 7404// NotDone returns true if the page enumeration should be started or is not yet complete. 7405func (page HostNameBindingCollectionPage) NotDone() bool { 7406 return !page.hnbc.IsEmpty() 7407} 7408 7409// Response returns the raw server response from the last page request. 7410func (page HostNameBindingCollectionPage) Response() HostNameBindingCollection { 7411 return page.hnbc 7412} 7413 7414// Values returns the slice of values for the current page or nil if there are no values. 7415func (page HostNameBindingCollectionPage) Values() []HostNameBinding { 7416 if page.hnbc.IsEmpty() { 7417 return nil 7418 } 7419 return *page.hnbc.Value 7420} 7421 7422// Creates a new instance of the HostNameBindingCollectionPage type. 7423func NewHostNameBindingCollectionPage(cur HostNameBindingCollection, getNextPage func(context.Context, HostNameBindingCollection) (HostNameBindingCollection, error)) HostNameBindingCollectionPage { 7424 return HostNameBindingCollectionPage{ 7425 fn: getNextPage, 7426 hnbc: cur, 7427 } 7428} 7429 7430// HostNameBindingProperties ... 7431type HostNameBindingProperties struct { 7432 // Name - Hostname 7433 Name *string `json:"name,omitempty"` 7434 // SiteName - Web app name 7435 SiteName *string `json:"siteName,omitempty"` 7436 // DomainID - Fully qualified ARM domain resource URI 7437 DomainID *string `json:"domainId,omitempty"` 7438 // AzureResourceName - Azure resource name 7439 AzureResourceName *string `json:"azureResourceName,omitempty"` 7440 // AzureResourceType - Azure resource type. Possible values include: 'Website', 'TrafficManager' 7441 AzureResourceType AzureResourceType `json:"azureResourceType,omitempty"` 7442 // CustomHostNameDNSRecordType - Custom DNS record type. Possible values include: 'CName', 'A' 7443 CustomHostNameDNSRecordType CustomHostNameDNSRecordType `json:"customHostNameDnsRecordType,omitempty"` 7444 // HostNameType - Host name type. Possible values include: 'Verified', 'Managed' 7445 HostNameType HostNameType `json:"hostNameType,omitempty"` 7446} 7447 7448// HostNameSslState object that represents a SSL-enabled host name. 7449type HostNameSslState struct { 7450 // Name - Host name 7451 Name *string `json:"name,omitempty"` 7452 // SslState - SSL type. Possible values include: 'Disabled', 'SniEnabled', 'IPBasedEnabled' 7453 SslState SslState `json:"sslState,omitempty"` 7454 // VirtualIP - Virtual IP address assigned to the host name if IP based SSL is enabled 7455 VirtualIP *string `json:"virtualIP,omitempty"` 7456 // Thumbprint - SSL cert thumbprint 7457 Thumbprint *string `json:"thumbprint,omitempty"` 7458 // ToUpdate - Set this flag to update existing host name 7459 ToUpdate *bool `json:"toUpdate,omitempty"` 7460} 7461 7462// HTTPLogsConfig http logs configuration 7463type HTTPLogsConfig struct { 7464 // FileSystem - Http logs to file system configuration 7465 FileSystem *FileSystemHTTPLogsConfig `json:"fileSystem,omitempty"` 7466 // AzureBlobStorage - Http logs to azure blob storage configuration 7467 AzureBlobStorage *AzureBlobStorageHTTPLogsConfig `json:"azureBlobStorage,omitempty"` 7468} 7469 7470// IPSecurityRestriction represents an ip security restriction on a web app. 7471type IPSecurityRestriction struct { 7472 // IPAddress - IP address the security restriction is valid for 7473 IPAddress *string `json:"ipAddress,omitempty"` 7474 // SubnetMask - Subnet mask for the range of IP addresses the restriction is valid for 7475 SubnetMask *string `json:"subnetMask,omitempty"` 7476} 7477 7478// KeyValuePairStringString ... 7479type KeyValuePairStringString struct { 7480 // Key - READ-ONLY 7481 Key *string `json:"key,omitempty"` 7482 // Value - READ-ONLY 7483 Value *string `json:"value,omitempty"` 7484} 7485 7486// MarshalJSON is the custom marshaler for KeyValuePairStringString. 7487func (kvpSs KeyValuePairStringString) MarshalJSON() ([]byte, error) { 7488 objectMap := make(map[string]interface{}) 7489 return json.Marshal(objectMap) 7490} 7491 7492// ListCertificateEmail ... 7493type ListCertificateEmail struct { 7494 autorest.Response `json:"-"` 7495 Value *[]CertificateEmail `json:"value,omitempty"` 7496} 7497 7498// ListCertificateOrderAction ... 7499type ListCertificateOrderAction struct { 7500 autorest.Response `json:"-"` 7501 Value *[]CertificateOrderAction `json:"value,omitempty"` 7502} 7503 7504// ListConnectionKeysInput list Connection Keys Input payload 7505type ListConnectionKeysInput struct { 7506 *ListConnectionKeysInputProperties `json:"properties,omitempty"` 7507 // ID - Resource Id 7508 ID *string `json:"id,omitempty"` 7509 // Name - Resource Name 7510 Name *string `json:"name,omitempty"` 7511 // Kind - Kind of resource 7512 Kind *string `json:"kind,omitempty"` 7513 // Location - Resource Location 7514 Location *string `json:"location,omitempty"` 7515 // Type - Resource type 7516 Type *string `json:"type,omitempty"` 7517 // Tags - Resource tags 7518 Tags map[string]*string `json:"tags"` 7519} 7520 7521// MarshalJSON is the custom marshaler for ListConnectionKeysInput. 7522func (lcki ListConnectionKeysInput) MarshalJSON() ([]byte, error) { 7523 objectMap := make(map[string]interface{}) 7524 if lcki.ListConnectionKeysInputProperties != nil { 7525 objectMap["properties"] = lcki.ListConnectionKeysInputProperties 7526 } 7527 if lcki.ID != nil { 7528 objectMap["id"] = lcki.ID 7529 } 7530 if lcki.Name != nil { 7531 objectMap["name"] = lcki.Name 7532 } 7533 if lcki.Kind != nil { 7534 objectMap["kind"] = lcki.Kind 7535 } 7536 if lcki.Location != nil { 7537 objectMap["location"] = lcki.Location 7538 } 7539 if lcki.Type != nil { 7540 objectMap["type"] = lcki.Type 7541 } 7542 if lcki.Tags != nil { 7543 objectMap["tags"] = lcki.Tags 7544 } 7545 return json.Marshal(objectMap) 7546} 7547 7548// UnmarshalJSON is the custom unmarshaler for ListConnectionKeysInput struct. 7549func (lcki *ListConnectionKeysInput) UnmarshalJSON(body []byte) error { 7550 var m map[string]*json.RawMessage 7551 err := json.Unmarshal(body, &m) 7552 if err != nil { 7553 return err 7554 } 7555 for k, v := range m { 7556 switch k { 7557 case "properties": 7558 if v != nil { 7559 var listConnectionKeysInputProperties ListConnectionKeysInputProperties 7560 err = json.Unmarshal(*v, &listConnectionKeysInputProperties) 7561 if err != nil { 7562 return err 7563 } 7564 lcki.ListConnectionKeysInputProperties = &listConnectionKeysInputProperties 7565 } 7566 case "id": 7567 if v != nil { 7568 var ID string 7569 err = json.Unmarshal(*v, &ID) 7570 if err != nil { 7571 return err 7572 } 7573 lcki.ID = &ID 7574 } 7575 case "name": 7576 if v != nil { 7577 var name string 7578 err = json.Unmarshal(*v, &name) 7579 if err != nil { 7580 return err 7581 } 7582 lcki.Name = &name 7583 } 7584 case "kind": 7585 if v != nil { 7586 var kind string 7587 err = json.Unmarshal(*v, &kind) 7588 if err != nil { 7589 return err 7590 } 7591 lcki.Kind = &kind 7592 } 7593 case "location": 7594 if v != nil { 7595 var location string 7596 err = json.Unmarshal(*v, &location) 7597 if err != nil { 7598 return err 7599 } 7600 lcki.Location = &location 7601 } 7602 case "type": 7603 if v != nil { 7604 var typeVar string 7605 err = json.Unmarshal(*v, &typeVar) 7606 if err != nil { 7607 return err 7608 } 7609 lcki.Type = &typeVar 7610 } 7611 case "tags": 7612 if v != nil { 7613 var tags map[string]*string 7614 err = json.Unmarshal(*v, &tags) 7615 if err != nil { 7616 return err 7617 } 7618 lcki.Tags = tags 7619 } 7620 } 7621 } 7622 7623 return nil 7624} 7625 7626// ListConnectionKeysInputProperties ... 7627type ListConnectionKeysInputProperties struct { 7628 // ValidityTimeSpan - time span for how long the keys will be valid 7629 ValidityTimeSpan *string `json:"validityTimeSpan,omitempty"` 7630} 7631 7632// ListCsr ... 7633type ListCsr struct { 7634 autorest.Response `json:"-"` 7635 Value *[]Csr `json:"value,omitempty"` 7636} 7637 7638// ListHostingEnvironmentDiagnostics ... 7639type ListHostingEnvironmentDiagnostics struct { 7640 autorest.Response `json:"-"` 7641 Value *[]HostingEnvironmentDiagnostics `json:"value,omitempty"` 7642} 7643 7644// ListRecommendation ... 7645type ListRecommendation struct { 7646 autorest.Response `json:"-"` 7647 Value *[]Recommendation `json:"value,omitempty"` 7648} 7649 7650// ListVnetInfo ... 7651type ListVnetInfo struct { 7652 autorest.Response `json:"-"` 7653 Value *[]VnetInfo `json:"value,omitempty"` 7654} 7655 7656// ListVnetRoute ... 7657type ListVnetRoute struct { 7658 autorest.Response `json:"-"` 7659 Value *[]VnetRoute `json:"value,omitempty"` 7660} 7661 7662// LocalizableString localizableString object containing the name and a localized value. 7663type LocalizableString struct { 7664 // Value - Non localized name 7665 Value *string `json:"value,omitempty"` 7666 // LocalizedValue - Localized name 7667 LocalizedValue *string `json:"localizedValue,omitempty"` 7668} 7669 7670// ManagedHostingEnvironment description of a managed hosting environment 7671type ManagedHostingEnvironment struct { 7672 autorest.Response `json:"-"` 7673 *ManagedHostingEnvironmentProperties `json:"properties,omitempty"` 7674 // ID - Resource Id 7675 ID *string `json:"id,omitempty"` 7676 // Name - Resource Name 7677 Name *string `json:"name,omitempty"` 7678 // Kind - Kind of resource 7679 Kind *string `json:"kind,omitempty"` 7680 // Location - Resource Location 7681 Location *string `json:"location,omitempty"` 7682 // Type - Resource type 7683 Type *string `json:"type,omitempty"` 7684 // Tags - Resource tags 7685 Tags map[string]*string `json:"tags"` 7686} 7687 7688// MarshalJSON is the custom marshaler for ManagedHostingEnvironment. 7689func (mhe ManagedHostingEnvironment) MarshalJSON() ([]byte, error) { 7690 objectMap := make(map[string]interface{}) 7691 if mhe.ManagedHostingEnvironmentProperties != nil { 7692 objectMap["properties"] = mhe.ManagedHostingEnvironmentProperties 7693 } 7694 if mhe.ID != nil { 7695 objectMap["id"] = mhe.ID 7696 } 7697 if mhe.Name != nil { 7698 objectMap["name"] = mhe.Name 7699 } 7700 if mhe.Kind != nil { 7701 objectMap["kind"] = mhe.Kind 7702 } 7703 if mhe.Location != nil { 7704 objectMap["location"] = mhe.Location 7705 } 7706 if mhe.Type != nil { 7707 objectMap["type"] = mhe.Type 7708 } 7709 if mhe.Tags != nil { 7710 objectMap["tags"] = mhe.Tags 7711 } 7712 return json.Marshal(objectMap) 7713} 7714 7715// UnmarshalJSON is the custom unmarshaler for ManagedHostingEnvironment struct. 7716func (mhe *ManagedHostingEnvironment) UnmarshalJSON(body []byte) error { 7717 var m map[string]*json.RawMessage 7718 err := json.Unmarshal(body, &m) 7719 if err != nil { 7720 return err 7721 } 7722 for k, v := range m { 7723 switch k { 7724 case "properties": 7725 if v != nil { 7726 var managedHostingEnvironmentProperties ManagedHostingEnvironmentProperties 7727 err = json.Unmarshal(*v, &managedHostingEnvironmentProperties) 7728 if err != nil { 7729 return err 7730 } 7731 mhe.ManagedHostingEnvironmentProperties = &managedHostingEnvironmentProperties 7732 } 7733 case "id": 7734 if v != nil { 7735 var ID string 7736 err = json.Unmarshal(*v, &ID) 7737 if err != nil { 7738 return err 7739 } 7740 mhe.ID = &ID 7741 } 7742 case "name": 7743 if v != nil { 7744 var name string 7745 err = json.Unmarshal(*v, &name) 7746 if err != nil { 7747 return err 7748 } 7749 mhe.Name = &name 7750 } 7751 case "kind": 7752 if v != nil { 7753 var kind string 7754 err = json.Unmarshal(*v, &kind) 7755 if err != nil { 7756 return err 7757 } 7758 mhe.Kind = &kind 7759 } 7760 case "location": 7761 if v != nil { 7762 var location string 7763 err = json.Unmarshal(*v, &location) 7764 if err != nil { 7765 return err 7766 } 7767 mhe.Location = &location 7768 } 7769 case "type": 7770 if v != nil { 7771 var typeVar string 7772 err = json.Unmarshal(*v, &typeVar) 7773 if err != nil { 7774 return err 7775 } 7776 mhe.Type = &typeVar 7777 } 7778 case "tags": 7779 if v != nil { 7780 var tags map[string]*string 7781 err = json.Unmarshal(*v, &tags) 7782 if err != nil { 7783 return err 7784 } 7785 mhe.Tags = tags 7786 } 7787 } 7788 } 7789 7790 return nil 7791} 7792 7793// ManagedHostingEnvironmentCollection collection of managed hosting environments 7794type ManagedHostingEnvironmentCollection struct { 7795 autorest.Response `json:"-"` 7796 // Value - Collection of resources 7797 Value *[]ManagedHostingEnvironment `json:"value,omitempty"` 7798 // NextLink - Link to next page of resources 7799 NextLink *string `json:"nextLink,omitempty"` 7800} 7801 7802// ManagedHostingEnvironmentCollectionIterator provides access to a complete listing of 7803// ManagedHostingEnvironment values. 7804type ManagedHostingEnvironmentCollectionIterator struct { 7805 i int 7806 page ManagedHostingEnvironmentCollectionPage 7807} 7808 7809// NextWithContext advances to the next value. If there was an error making 7810// the request the iterator does not advance and the error is returned. 7811func (iter *ManagedHostingEnvironmentCollectionIterator) NextWithContext(ctx context.Context) (err error) { 7812 if tracing.IsEnabled() { 7813 ctx = tracing.StartSpan(ctx, fqdn+"/ManagedHostingEnvironmentCollectionIterator.NextWithContext") 7814 defer func() { 7815 sc := -1 7816 if iter.Response().Response.Response != nil { 7817 sc = iter.Response().Response.Response.StatusCode 7818 } 7819 tracing.EndSpan(ctx, sc, err) 7820 }() 7821 } 7822 iter.i++ 7823 if iter.i < len(iter.page.Values()) { 7824 return nil 7825 } 7826 err = iter.page.NextWithContext(ctx) 7827 if err != nil { 7828 iter.i-- 7829 return err 7830 } 7831 iter.i = 0 7832 return nil 7833} 7834 7835// Next advances to the next value. If there was an error making 7836// the request the iterator does not advance and the error is returned. 7837// Deprecated: Use NextWithContext() instead. 7838func (iter *ManagedHostingEnvironmentCollectionIterator) Next() error { 7839 return iter.NextWithContext(context.Background()) 7840} 7841 7842// NotDone returns true if the enumeration should be started or is not yet complete. 7843func (iter ManagedHostingEnvironmentCollectionIterator) NotDone() bool { 7844 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 7845} 7846 7847// Response returns the raw server response from the last page request. 7848func (iter ManagedHostingEnvironmentCollectionIterator) Response() ManagedHostingEnvironmentCollection { 7849 return iter.page.Response() 7850} 7851 7852// Value returns the current value or a zero-initialized value if the 7853// iterator has advanced beyond the end of the collection. 7854func (iter ManagedHostingEnvironmentCollectionIterator) Value() ManagedHostingEnvironment { 7855 if !iter.page.NotDone() { 7856 return ManagedHostingEnvironment{} 7857 } 7858 return iter.page.Values()[iter.i] 7859} 7860 7861// Creates a new instance of the ManagedHostingEnvironmentCollectionIterator type. 7862func NewManagedHostingEnvironmentCollectionIterator(page ManagedHostingEnvironmentCollectionPage) ManagedHostingEnvironmentCollectionIterator { 7863 return ManagedHostingEnvironmentCollectionIterator{page: page} 7864} 7865 7866// IsEmpty returns true if the ListResult contains no values. 7867func (mhec ManagedHostingEnvironmentCollection) IsEmpty() bool { 7868 return mhec.Value == nil || len(*mhec.Value) == 0 7869} 7870 7871// hasNextLink returns true if the NextLink is not empty. 7872func (mhec ManagedHostingEnvironmentCollection) hasNextLink() bool { 7873 return mhec.NextLink != nil && len(*mhec.NextLink) != 0 7874} 7875 7876// managedHostingEnvironmentCollectionPreparer prepares a request to retrieve the next set of results. 7877// It returns nil if no more results exist. 7878func (mhec ManagedHostingEnvironmentCollection) managedHostingEnvironmentCollectionPreparer(ctx context.Context) (*http.Request, error) { 7879 if !mhec.hasNextLink() { 7880 return nil, nil 7881 } 7882 return autorest.Prepare((&http.Request{}).WithContext(ctx), 7883 autorest.AsJSON(), 7884 autorest.AsGet(), 7885 autorest.WithBaseURL(to.String(mhec.NextLink))) 7886} 7887 7888// ManagedHostingEnvironmentCollectionPage contains a page of ManagedHostingEnvironment values. 7889type ManagedHostingEnvironmentCollectionPage struct { 7890 fn func(context.Context, ManagedHostingEnvironmentCollection) (ManagedHostingEnvironmentCollection, error) 7891 mhec ManagedHostingEnvironmentCollection 7892} 7893 7894// NextWithContext advances to the next page of values. If there was an error making 7895// the request the page does not advance and the error is returned. 7896func (page *ManagedHostingEnvironmentCollectionPage) NextWithContext(ctx context.Context) (err error) { 7897 if tracing.IsEnabled() { 7898 ctx = tracing.StartSpan(ctx, fqdn+"/ManagedHostingEnvironmentCollectionPage.NextWithContext") 7899 defer func() { 7900 sc := -1 7901 if page.Response().Response.Response != nil { 7902 sc = page.Response().Response.Response.StatusCode 7903 } 7904 tracing.EndSpan(ctx, sc, err) 7905 }() 7906 } 7907 for { 7908 next, err := page.fn(ctx, page.mhec) 7909 if err != nil { 7910 return err 7911 } 7912 page.mhec = next 7913 if !next.hasNextLink() || !next.IsEmpty() { 7914 break 7915 } 7916 } 7917 return nil 7918} 7919 7920// Next advances to the next page of values. If there was an error making 7921// the request the page does not advance and the error is returned. 7922// Deprecated: Use NextWithContext() instead. 7923func (page *ManagedHostingEnvironmentCollectionPage) Next() error { 7924 return page.NextWithContext(context.Background()) 7925} 7926 7927// NotDone returns true if the page enumeration should be started or is not yet complete. 7928func (page ManagedHostingEnvironmentCollectionPage) NotDone() bool { 7929 return !page.mhec.IsEmpty() 7930} 7931 7932// Response returns the raw server response from the last page request. 7933func (page ManagedHostingEnvironmentCollectionPage) Response() ManagedHostingEnvironmentCollection { 7934 return page.mhec 7935} 7936 7937// Values returns the slice of values for the current page or nil if there are no values. 7938func (page ManagedHostingEnvironmentCollectionPage) Values() []ManagedHostingEnvironment { 7939 if page.mhec.IsEmpty() { 7940 return nil 7941 } 7942 return *page.mhec.Value 7943} 7944 7945// Creates a new instance of the ManagedHostingEnvironmentCollectionPage type. 7946func NewManagedHostingEnvironmentCollectionPage(cur ManagedHostingEnvironmentCollection, getNextPage func(context.Context, ManagedHostingEnvironmentCollection) (ManagedHostingEnvironmentCollection, error)) ManagedHostingEnvironmentCollectionPage { 7947 return ManagedHostingEnvironmentCollectionPage{ 7948 fn: getNextPage, 7949 mhec: cur, 7950 } 7951} 7952 7953// ManagedHostingEnvironmentProperties ... 7954type ManagedHostingEnvironmentProperties struct { 7955 // Name - Name of the managed hosting environment 7956 Name *string `json:"name,omitempty"` 7957 // Location - Location of the managed hosting environment e.g. "West US" 7958 Location *string `json:"location,omitempty"` 7959 // Status - Current status of the managed hosting environment. Possible values include: 'ManagedHostingEnvironmentStatusPreparing', 'ManagedHostingEnvironmentStatusReady', 'ManagedHostingEnvironmentStatusDeleting' 7960 Status ManagedHostingEnvironmentStatus `json:"status,omitempty"` 7961 // VirtualNetwork - Description of the managed hosting environment's virtual network 7962 VirtualNetwork *VirtualNetworkProfile `json:"virtualNetwork,omitempty"` 7963 // IpsslAddressCount - Number of ip ssl addresses reserved for the managed hosting environment 7964 IpsslAddressCount *int32 `json:"ipsslAddressCount,omitempty"` 7965 // DNSSuffix - DNS suffix of the managed hosting environment 7966 DNSSuffix *string `json:"dnsSuffix,omitempty"` 7967 // SubscriptionID - Subscription of the managed hosting environment (read only) 7968 SubscriptionID *string `json:"subscriptionId,omitempty"` 7969 // ResourceGroup - Resource group of the managed hosting environment (read only) 7970 ResourceGroup *string `json:"resourceGroup,omitempty"` 7971 // EnvironmentIsHealthy - True/false indicating whether the managed hosting environment is healthy 7972 EnvironmentIsHealthy *bool `json:"environmentIsHealthy,omitempty"` 7973 // EnvironmentStatus - Detailed message about with results of the last check of the managed hosting environment 7974 EnvironmentStatus *string `json:"environmentStatus,omitempty"` 7975 // Suspended - True/false indicating whether the managed hosting environment is suspended. The environment can be suspended e.g. when the management endpoint is no longer available 7976 // (most likely because NSG blocked the incoming traffic) 7977 Suspended *bool `json:"suspended,omitempty"` 7978 // APIManagementAccount - Resource id of the api management account associated with this managed hosting environment (read only) 7979 APIManagementAccount *string `json:"apiManagementAccount,omitempty"` 7980} 7981 7982// ManagedHostingEnvironmentsCreateOrUpdateManagedHostingEnvironmentFuture an abstraction for monitoring 7983// and retrieving the results of a long-running operation. 7984type ManagedHostingEnvironmentsCreateOrUpdateManagedHostingEnvironmentFuture struct { 7985 azure.FutureAPI 7986 // Result returns the result of the asynchronous operation. 7987 // If the operation has not completed it will return an error. 7988 Result func(ManagedHostingEnvironmentsClient) (HostingEnvironment, error) 7989} 7990 7991// UnmarshalJSON is the custom unmarshaller for CreateFuture. 7992func (future *ManagedHostingEnvironmentsCreateOrUpdateManagedHostingEnvironmentFuture) UnmarshalJSON(body []byte) error { 7993 var azFuture azure.Future 7994 if err := json.Unmarshal(body, &azFuture); err != nil { 7995 return err 7996 } 7997 future.FutureAPI = &azFuture 7998 future.Result = future.result 7999 return nil 8000} 8001 8002// result is the default implementation for ManagedHostingEnvironmentsCreateOrUpdateManagedHostingEnvironmentFuture.Result. 8003func (future *ManagedHostingEnvironmentsCreateOrUpdateManagedHostingEnvironmentFuture) result(client ManagedHostingEnvironmentsClient) (he HostingEnvironment, err error) { 8004 var done bool 8005 done, err = future.DoneWithContext(context.Background(), client) 8006 if err != nil { 8007 err = autorest.NewErrorWithError(err, "web.ManagedHostingEnvironmentsCreateOrUpdateManagedHostingEnvironmentFuture", "Result", future.Response(), "Polling failure") 8008 return 8009 } 8010 if !done { 8011 he.Response.Response = future.Response() 8012 err = azure.NewAsyncOpIncompleteError("web.ManagedHostingEnvironmentsCreateOrUpdateManagedHostingEnvironmentFuture") 8013 return 8014 } 8015 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 8016 if he.Response.Response, err = future.GetResult(sender); err == nil && he.Response.Response.StatusCode != http.StatusNoContent { 8017 he, err = client.CreateOrUpdateManagedHostingEnvironmentResponder(he.Response.Response) 8018 if err != nil { 8019 err = autorest.NewErrorWithError(err, "web.ManagedHostingEnvironmentsCreateOrUpdateManagedHostingEnvironmentFuture", "Result", he.Response.Response, "Failure responding to request") 8020 } 8021 } 8022 return 8023} 8024 8025// ManagedHostingEnvironmentsDeleteManagedHostingEnvironmentFuture an abstraction for monitoring and 8026// retrieving the results of a long-running operation. 8027type ManagedHostingEnvironmentsDeleteManagedHostingEnvironmentFuture struct { 8028 azure.FutureAPI 8029 // Result returns the result of the asynchronous operation. 8030 // If the operation has not completed it will return an error. 8031 Result func(ManagedHostingEnvironmentsClient) (SetObject, error) 8032} 8033 8034// UnmarshalJSON is the custom unmarshaller for CreateFuture. 8035func (future *ManagedHostingEnvironmentsDeleteManagedHostingEnvironmentFuture) UnmarshalJSON(body []byte) error { 8036 var azFuture azure.Future 8037 if err := json.Unmarshal(body, &azFuture); err != nil { 8038 return err 8039 } 8040 future.FutureAPI = &azFuture 8041 future.Result = future.result 8042 return nil 8043} 8044 8045// result is the default implementation for ManagedHostingEnvironmentsDeleteManagedHostingEnvironmentFuture.Result. 8046func (future *ManagedHostingEnvironmentsDeleteManagedHostingEnvironmentFuture) result(client ManagedHostingEnvironmentsClient) (so SetObject, err error) { 8047 var done bool 8048 done, err = future.DoneWithContext(context.Background(), client) 8049 if err != nil { 8050 err = autorest.NewErrorWithError(err, "web.ManagedHostingEnvironmentsDeleteManagedHostingEnvironmentFuture", "Result", future.Response(), "Polling failure") 8051 return 8052 } 8053 if !done { 8054 so.Response.Response = future.Response() 8055 err = azure.NewAsyncOpIncompleteError("web.ManagedHostingEnvironmentsDeleteManagedHostingEnvironmentFuture") 8056 return 8057 } 8058 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 8059 if so.Response.Response, err = future.GetResult(sender); err == nil && so.Response.Response.StatusCode != http.StatusNoContent { 8060 so, err = client.DeleteManagedHostingEnvironmentResponder(so.Response.Response) 8061 if err != nil { 8062 err = autorest.NewErrorWithError(err, "web.ManagedHostingEnvironmentsDeleteManagedHostingEnvironmentFuture", "Result", so.Response.Response, "Failure responding to request") 8063 } 8064 } 8065 return 8066} 8067 8068// MetricAvailabilily class representing metrics availability and retention 8069type MetricAvailabilily struct { 8070 // TimeGrain - Time grain 8071 TimeGrain *string `json:"timeGrain,omitempty"` 8072 // Retention - Retention period for the current {Microsoft.Web.Hosting.Administration.MetricAvailabilily.TimeGrain} 8073 Retention *string `json:"retention,omitempty"` 8074} 8075 8076// MetricDefinition class representing metadata for the metrics 8077type MetricDefinition struct { 8078 autorest.Response `json:"-"` 8079 *MetricDefinitionProperties `json:"properties,omitempty"` 8080 // ID - Resource Id 8081 ID *string `json:"id,omitempty"` 8082 // Name - Resource Name 8083 Name *string `json:"name,omitempty"` 8084 // Kind - Kind of resource 8085 Kind *string `json:"kind,omitempty"` 8086 // Location - Resource Location 8087 Location *string `json:"location,omitempty"` 8088 // Type - Resource type 8089 Type *string `json:"type,omitempty"` 8090 // Tags - Resource tags 8091 Tags map[string]*string `json:"tags"` 8092} 8093 8094// MarshalJSON is the custom marshaler for MetricDefinition. 8095func (md MetricDefinition) MarshalJSON() ([]byte, error) { 8096 objectMap := make(map[string]interface{}) 8097 if md.MetricDefinitionProperties != nil { 8098 objectMap["properties"] = md.MetricDefinitionProperties 8099 } 8100 if md.ID != nil { 8101 objectMap["id"] = md.ID 8102 } 8103 if md.Name != nil { 8104 objectMap["name"] = md.Name 8105 } 8106 if md.Kind != nil { 8107 objectMap["kind"] = md.Kind 8108 } 8109 if md.Location != nil { 8110 objectMap["location"] = md.Location 8111 } 8112 if md.Type != nil { 8113 objectMap["type"] = md.Type 8114 } 8115 if md.Tags != nil { 8116 objectMap["tags"] = md.Tags 8117 } 8118 return json.Marshal(objectMap) 8119} 8120 8121// UnmarshalJSON is the custom unmarshaler for MetricDefinition struct. 8122func (md *MetricDefinition) UnmarshalJSON(body []byte) error { 8123 var m map[string]*json.RawMessage 8124 err := json.Unmarshal(body, &m) 8125 if err != nil { 8126 return err 8127 } 8128 for k, v := range m { 8129 switch k { 8130 case "properties": 8131 if v != nil { 8132 var metricDefinitionProperties MetricDefinitionProperties 8133 err = json.Unmarshal(*v, &metricDefinitionProperties) 8134 if err != nil { 8135 return err 8136 } 8137 md.MetricDefinitionProperties = &metricDefinitionProperties 8138 } 8139 case "id": 8140 if v != nil { 8141 var ID string 8142 err = json.Unmarshal(*v, &ID) 8143 if err != nil { 8144 return err 8145 } 8146 md.ID = &ID 8147 } 8148 case "name": 8149 if v != nil { 8150 var name string 8151 err = json.Unmarshal(*v, &name) 8152 if err != nil { 8153 return err 8154 } 8155 md.Name = &name 8156 } 8157 case "kind": 8158 if v != nil { 8159 var kind string 8160 err = json.Unmarshal(*v, &kind) 8161 if err != nil { 8162 return err 8163 } 8164 md.Kind = &kind 8165 } 8166 case "location": 8167 if v != nil { 8168 var location string 8169 err = json.Unmarshal(*v, &location) 8170 if err != nil { 8171 return err 8172 } 8173 md.Location = &location 8174 } 8175 case "type": 8176 if v != nil { 8177 var typeVar string 8178 err = json.Unmarshal(*v, &typeVar) 8179 if err != nil { 8180 return err 8181 } 8182 md.Type = &typeVar 8183 } 8184 case "tags": 8185 if v != nil { 8186 var tags map[string]*string 8187 err = json.Unmarshal(*v, &tags) 8188 if err != nil { 8189 return err 8190 } 8191 md.Tags = tags 8192 } 8193 } 8194 } 8195 8196 return nil 8197} 8198 8199// MetricDefinitionCollection collection of metric definitions 8200type MetricDefinitionCollection struct { 8201 autorest.Response `json:"-"` 8202 // Value - Collection of resources 8203 Value *[]MetricDefinition `json:"value,omitempty"` 8204 // NextLink - Link to next page of resources 8205 NextLink *string `json:"nextLink,omitempty"` 8206} 8207 8208// MetricDefinitionCollectionIterator provides access to a complete listing of MetricDefinition values. 8209type MetricDefinitionCollectionIterator struct { 8210 i int 8211 page MetricDefinitionCollectionPage 8212} 8213 8214// NextWithContext advances to the next value. If there was an error making 8215// the request the iterator does not advance and the error is returned. 8216func (iter *MetricDefinitionCollectionIterator) NextWithContext(ctx context.Context) (err error) { 8217 if tracing.IsEnabled() { 8218 ctx = tracing.StartSpan(ctx, fqdn+"/MetricDefinitionCollectionIterator.NextWithContext") 8219 defer func() { 8220 sc := -1 8221 if iter.Response().Response.Response != nil { 8222 sc = iter.Response().Response.Response.StatusCode 8223 } 8224 tracing.EndSpan(ctx, sc, err) 8225 }() 8226 } 8227 iter.i++ 8228 if iter.i < len(iter.page.Values()) { 8229 return nil 8230 } 8231 err = iter.page.NextWithContext(ctx) 8232 if err != nil { 8233 iter.i-- 8234 return err 8235 } 8236 iter.i = 0 8237 return nil 8238} 8239 8240// Next advances to the next value. If there was an error making 8241// the request the iterator does not advance and the error is returned. 8242// Deprecated: Use NextWithContext() instead. 8243func (iter *MetricDefinitionCollectionIterator) Next() error { 8244 return iter.NextWithContext(context.Background()) 8245} 8246 8247// NotDone returns true if the enumeration should be started or is not yet complete. 8248func (iter MetricDefinitionCollectionIterator) NotDone() bool { 8249 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 8250} 8251 8252// Response returns the raw server response from the last page request. 8253func (iter MetricDefinitionCollectionIterator) Response() MetricDefinitionCollection { 8254 return iter.page.Response() 8255} 8256 8257// Value returns the current value or a zero-initialized value if the 8258// iterator has advanced beyond the end of the collection. 8259func (iter MetricDefinitionCollectionIterator) Value() MetricDefinition { 8260 if !iter.page.NotDone() { 8261 return MetricDefinition{} 8262 } 8263 return iter.page.Values()[iter.i] 8264} 8265 8266// Creates a new instance of the MetricDefinitionCollectionIterator type. 8267func NewMetricDefinitionCollectionIterator(page MetricDefinitionCollectionPage) MetricDefinitionCollectionIterator { 8268 return MetricDefinitionCollectionIterator{page: page} 8269} 8270 8271// IsEmpty returns true if the ListResult contains no values. 8272func (mdc MetricDefinitionCollection) IsEmpty() bool { 8273 return mdc.Value == nil || len(*mdc.Value) == 0 8274} 8275 8276// hasNextLink returns true if the NextLink is not empty. 8277func (mdc MetricDefinitionCollection) hasNextLink() bool { 8278 return mdc.NextLink != nil && len(*mdc.NextLink) != 0 8279} 8280 8281// metricDefinitionCollectionPreparer prepares a request to retrieve the next set of results. 8282// It returns nil if no more results exist. 8283func (mdc MetricDefinitionCollection) metricDefinitionCollectionPreparer(ctx context.Context) (*http.Request, error) { 8284 if !mdc.hasNextLink() { 8285 return nil, nil 8286 } 8287 return autorest.Prepare((&http.Request{}).WithContext(ctx), 8288 autorest.AsJSON(), 8289 autorest.AsGet(), 8290 autorest.WithBaseURL(to.String(mdc.NextLink))) 8291} 8292 8293// MetricDefinitionCollectionPage contains a page of MetricDefinition values. 8294type MetricDefinitionCollectionPage struct { 8295 fn func(context.Context, MetricDefinitionCollection) (MetricDefinitionCollection, error) 8296 mdc MetricDefinitionCollection 8297} 8298 8299// NextWithContext advances to the next page of values. If there was an error making 8300// the request the page does not advance and the error is returned. 8301func (page *MetricDefinitionCollectionPage) NextWithContext(ctx context.Context) (err error) { 8302 if tracing.IsEnabled() { 8303 ctx = tracing.StartSpan(ctx, fqdn+"/MetricDefinitionCollectionPage.NextWithContext") 8304 defer func() { 8305 sc := -1 8306 if page.Response().Response.Response != nil { 8307 sc = page.Response().Response.Response.StatusCode 8308 } 8309 tracing.EndSpan(ctx, sc, err) 8310 }() 8311 } 8312 for { 8313 next, err := page.fn(ctx, page.mdc) 8314 if err != nil { 8315 return err 8316 } 8317 page.mdc = next 8318 if !next.hasNextLink() || !next.IsEmpty() { 8319 break 8320 } 8321 } 8322 return nil 8323} 8324 8325// Next advances to the next page of values. If there was an error making 8326// the request the page does not advance and the error is returned. 8327// Deprecated: Use NextWithContext() instead. 8328func (page *MetricDefinitionCollectionPage) Next() error { 8329 return page.NextWithContext(context.Background()) 8330} 8331 8332// NotDone returns true if the page enumeration should be started or is not yet complete. 8333func (page MetricDefinitionCollectionPage) NotDone() bool { 8334 return !page.mdc.IsEmpty() 8335} 8336 8337// Response returns the raw server response from the last page request. 8338func (page MetricDefinitionCollectionPage) Response() MetricDefinitionCollection { 8339 return page.mdc 8340} 8341 8342// Values returns the slice of values for the current page or nil if there are no values. 8343func (page MetricDefinitionCollectionPage) Values() []MetricDefinition { 8344 if page.mdc.IsEmpty() { 8345 return nil 8346 } 8347 return *page.mdc.Value 8348} 8349 8350// Creates a new instance of the MetricDefinitionCollectionPage type. 8351func NewMetricDefinitionCollectionPage(cur MetricDefinitionCollection, getNextPage func(context.Context, MetricDefinitionCollection) (MetricDefinitionCollection, error)) MetricDefinitionCollectionPage { 8352 return MetricDefinitionCollectionPage{ 8353 fn: getNextPage, 8354 mdc: cur, 8355 } 8356} 8357 8358// MetricDefinitionProperties ... 8359type MetricDefinitionProperties struct { 8360 // Name - Name of the metric 8361 Name *string `json:"name,omitempty"` 8362 // Unit - Unit of the metric 8363 Unit *string `json:"unit,omitempty"` 8364 // PrimaryAggregationType - Primary aggregation type 8365 PrimaryAggregationType *string `json:"primaryAggregationType,omitempty"` 8366 // MetricAvailabilities - List of time grains supported for the metric together with retention period 8367 MetricAvailabilities *[]MetricAvailabilily `json:"metricAvailabilities,omitempty"` 8368 // DisplayName - Friendly name shown in the UI 8369 DisplayName *string `json:"displayName,omitempty"` 8370} 8371 8372// NameIdentifier identifies an object 8373type NameIdentifier struct { 8374 // Name - Name of the object 8375 Name *string `json:"name,omitempty"` 8376} 8377 8378// NameIdentifierCollection collection of domain name identifiers 8379type NameIdentifierCollection struct { 8380 autorest.Response `json:"-"` 8381 // Value - Collection of resources 8382 Value *[]NameIdentifier `json:"value,omitempty"` 8383 // NextLink - Link to next page of resources 8384 NextLink *string `json:"nextLink,omitempty"` 8385} 8386 8387// NameIdentifierCollectionIterator provides access to a complete listing of NameIdentifier values. 8388type NameIdentifierCollectionIterator struct { 8389 i int 8390 page NameIdentifierCollectionPage 8391} 8392 8393// NextWithContext advances to the next value. If there was an error making 8394// the request the iterator does not advance and the error is returned. 8395func (iter *NameIdentifierCollectionIterator) NextWithContext(ctx context.Context) (err error) { 8396 if tracing.IsEnabled() { 8397 ctx = tracing.StartSpan(ctx, fqdn+"/NameIdentifierCollectionIterator.NextWithContext") 8398 defer func() { 8399 sc := -1 8400 if iter.Response().Response.Response != nil { 8401 sc = iter.Response().Response.Response.StatusCode 8402 } 8403 tracing.EndSpan(ctx, sc, err) 8404 }() 8405 } 8406 iter.i++ 8407 if iter.i < len(iter.page.Values()) { 8408 return nil 8409 } 8410 err = iter.page.NextWithContext(ctx) 8411 if err != nil { 8412 iter.i-- 8413 return err 8414 } 8415 iter.i = 0 8416 return nil 8417} 8418 8419// Next advances to the next value. If there was an error making 8420// the request the iterator does not advance and the error is returned. 8421// Deprecated: Use NextWithContext() instead. 8422func (iter *NameIdentifierCollectionIterator) Next() error { 8423 return iter.NextWithContext(context.Background()) 8424} 8425 8426// NotDone returns true if the enumeration should be started or is not yet complete. 8427func (iter NameIdentifierCollectionIterator) NotDone() bool { 8428 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 8429} 8430 8431// Response returns the raw server response from the last page request. 8432func (iter NameIdentifierCollectionIterator) Response() NameIdentifierCollection { 8433 return iter.page.Response() 8434} 8435 8436// Value returns the current value or a zero-initialized value if the 8437// iterator has advanced beyond the end of the collection. 8438func (iter NameIdentifierCollectionIterator) Value() NameIdentifier { 8439 if !iter.page.NotDone() { 8440 return NameIdentifier{} 8441 } 8442 return iter.page.Values()[iter.i] 8443} 8444 8445// Creates a new instance of the NameIdentifierCollectionIterator type. 8446func NewNameIdentifierCollectionIterator(page NameIdentifierCollectionPage) NameIdentifierCollectionIterator { 8447 return NameIdentifierCollectionIterator{page: page} 8448} 8449 8450// IsEmpty returns true if the ListResult contains no values. 8451func (nic NameIdentifierCollection) IsEmpty() bool { 8452 return nic.Value == nil || len(*nic.Value) == 0 8453} 8454 8455// hasNextLink returns true if the NextLink is not empty. 8456func (nic NameIdentifierCollection) hasNextLink() bool { 8457 return nic.NextLink != nil && len(*nic.NextLink) != 0 8458} 8459 8460// nameIdentifierCollectionPreparer prepares a request to retrieve the next set of results. 8461// It returns nil if no more results exist. 8462func (nic NameIdentifierCollection) nameIdentifierCollectionPreparer(ctx context.Context) (*http.Request, error) { 8463 if !nic.hasNextLink() { 8464 return nil, nil 8465 } 8466 return autorest.Prepare((&http.Request{}).WithContext(ctx), 8467 autorest.AsJSON(), 8468 autorest.AsGet(), 8469 autorest.WithBaseURL(to.String(nic.NextLink))) 8470} 8471 8472// NameIdentifierCollectionPage contains a page of NameIdentifier values. 8473type NameIdentifierCollectionPage struct { 8474 fn func(context.Context, NameIdentifierCollection) (NameIdentifierCollection, error) 8475 nic NameIdentifierCollection 8476} 8477 8478// NextWithContext advances to the next page of values. If there was an error making 8479// the request the page does not advance and the error is returned. 8480func (page *NameIdentifierCollectionPage) NextWithContext(ctx context.Context) (err error) { 8481 if tracing.IsEnabled() { 8482 ctx = tracing.StartSpan(ctx, fqdn+"/NameIdentifierCollectionPage.NextWithContext") 8483 defer func() { 8484 sc := -1 8485 if page.Response().Response.Response != nil { 8486 sc = page.Response().Response.Response.StatusCode 8487 } 8488 tracing.EndSpan(ctx, sc, err) 8489 }() 8490 } 8491 for { 8492 next, err := page.fn(ctx, page.nic) 8493 if err != nil { 8494 return err 8495 } 8496 page.nic = next 8497 if !next.hasNextLink() || !next.IsEmpty() { 8498 break 8499 } 8500 } 8501 return nil 8502} 8503 8504// Next advances to the next page of values. If there was an error making 8505// the request the page does not advance and the error is returned. 8506// Deprecated: Use NextWithContext() instead. 8507func (page *NameIdentifierCollectionPage) Next() error { 8508 return page.NextWithContext(context.Background()) 8509} 8510 8511// NotDone returns true if the page enumeration should be started or is not yet complete. 8512func (page NameIdentifierCollectionPage) NotDone() bool { 8513 return !page.nic.IsEmpty() 8514} 8515 8516// Response returns the raw server response from the last page request. 8517func (page NameIdentifierCollectionPage) Response() NameIdentifierCollection { 8518 return page.nic 8519} 8520 8521// Values returns the slice of values for the current page or nil if there are no values. 8522func (page NameIdentifierCollectionPage) Values() []NameIdentifier { 8523 if page.nic.IsEmpty() { 8524 return nil 8525 } 8526 return *page.nic.Value 8527} 8528 8529// Creates a new instance of the NameIdentifierCollectionPage type. 8530func NewNameIdentifierCollectionPage(cur NameIdentifierCollection, getNextPage func(context.Context, NameIdentifierCollection) (NameIdentifierCollection, error)) NameIdentifierCollectionPage { 8531 return NameIdentifierCollectionPage{ 8532 fn: getNextPage, 8533 nic: cur, 8534 } 8535} 8536 8537// NameValuePair name value pair 8538type NameValuePair struct { 8539 // Name - Pair name 8540 Name *string `json:"name,omitempty"` 8541 // Value - Pair value 8542 Value *string `json:"value,omitempty"` 8543} 8544 8545// NetworkAccessControlEntry ... 8546type NetworkAccessControlEntry struct { 8547 // Action - Possible values include: 'Permit', 'Deny' 8548 Action AccessControlEntryAction `json:"action,omitempty"` 8549 Description *string `json:"description,omitempty"` 8550 Order *int32 `json:"order,omitempty"` 8551 RemoteSubnet *string `json:"remoteSubnet,omitempty"` 8552} 8553 8554// NetworkFeatures this is an object used to store a full view of network features (presently VNET 8555// integration and Hybrid Connections) 8556// for a web app. 8557type NetworkFeatures struct { 8558 autorest.Response `json:"-"` 8559 *NetworkFeaturesProperties `json:"properties,omitempty"` 8560 // ID - Resource Id 8561 ID *string `json:"id,omitempty"` 8562 // Name - Resource Name 8563 Name *string `json:"name,omitempty"` 8564 // Kind - Kind of resource 8565 Kind *string `json:"kind,omitempty"` 8566 // Location - Resource Location 8567 Location *string `json:"location,omitempty"` 8568 // Type - Resource type 8569 Type *string `json:"type,omitempty"` 8570 // Tags - Resource tags 8571 Tags map[string]*string `json:"tags"` 8572} 8573 8574// MarshalJSON is the custom marshaler for NetworkFeatures. 8575func (nf NetworkFeatures) MarshalJSON() ([]byte, error) { 8576 objectMap := make(map[string]interface{}) 8577 if nf.NetworkFeaturesProperties != nil { 8578 objectMap["properties"] = nf.NetworkFeaturesProperties 8579 } 8580 if nf.ID != nil { 8581 objectMap["id"] = nf.ID 8582 } 8583 if nf.Name != nil { 8584 objectMap["name"] = nf.Name 8585 } 8586 if nf.Kind != nil { 8587 objectMap["kind"] = nf.Kind 8588 } 8589 if nf.Location != nil { 8590 objectMap["location"] = nf.Location 8591 } 8592 if nf.Type != nil { 8593 objectMap["type"] = nf.Type 8594 } 8595 if nf.Tags != nil { 8596 objectMap["tags"] = nf.Tags 8597 } 8598 return json.Marshal(objectMap) 8599} 8600 8601// UnmarshalJSON is the custom unmarshaler for NetworkFeatures struct. 8602func (nf *NetworkFeatures) UnmarshalJSON(body []byte) error { 8603 var m map[string]*json.RawMessage 8604 err := json.Unmarshal(body, &m) 8605 if err != nil { 8606 return err 8607 } 8608 for k, v := range m { 8609 switch k { 8610 case "properties": 8611 if v != nil { 8612 var networkFeaturesProperties NetworkFeaturesProperties 8613 err = json.Unmarshal(*v, &networkFeaturesProperties) 8614 if err != nil { 8615 return err 8616 } 8617 nf.NetworkFeaturesProperties = &networkFeaturesProperties 8618 } 8619 case "id": 8620 if v != nil { 8621 var ID string 8622 err = json.Unmarshal(*v, &ID) 8623 if err != nil { 8624 return err 8625 } 8626 nf.ID = &ID 8627 } 8628 case "name": 8629 if v != nil { 8630 var name string 8631 err = json.Unmarshal(*v, &name) 8632 if err != nil { 8633 return err 8634 } 8635 nf.Name = &name 8636 } 8637 case "kind": 8638 if v != nil { 8639 var kind string 8640 err = json.Unmarshal(*v, &kind) 8641 if err != nil { 8642 return err 8643 } 8644 nf.Kind = &kind 8645 } 8646 case "location": 8647 if v != nil { 8648 var location string 8649 err = json.Unmarshal(*v, &location) 8650 if err != nil { 8651 return err 8652 } 8653 nf.Location = &location 8654 } 8655 case "type": 8656 if v != nil { 8657 var typeVar string 8658 err = json.Unmarshal(*v, &typeVar) 8659 if err != nil { 8660 return err 8661 } 8662 nf.Type = &typeVar 8663 } 8664 case "tags": 8665 if v != nil { 8666 var tags map[string]*string 8667 err = json.Unmarshal(*v, &tags) 8668 if err != nil { 8669 return err 8670 } 8671 nf.Tags = tags 8672 } 8673 } 8674 } 8675 8676 return nil 8677} 8678 8679// NetworkFeaturesProperties ... 8680type NetworkFeaturesProperties struct { 8681 // VirtualNetworkName - The Vnet Name 8682 VirtualNetworkName *string `json:"virtualNetworkName,omitempty"` 8683 // VirtualNetworkConnection - The Vnet Summary view 8684 VirtualNetworkConnection *VnetInfo `json:"virtualNetworkConnection,omitempty"` 8685 // HybridConnections - The Hybrid Connections Summary view 8686 HybridConnections *[]RelayServiceConnectionEntity `json:"hybridConnections,omitempty"` 8687} 8688 8689// ParameterCustomLoginSettingValues custom logging setting values 8690type ParameterCustomLoginSettingValues struct { 8691 *ParameterCustomLoginSettingValuesProperties `json:"properties,omitempty"` 8692 // ID - Resource Id 8693 ID *string `json:"id,omitempty"` 8694 // Name - Resource Name 8695 Name *string `json:"name,omitempty"` 8696 // Kind - Kind of resource 8697 Kind *string `json:"kind,omitempty"` 8698 // Location - Resource Location 8699 Location *string `json:"location,omitempty"` 8700 // Type - Resource type 8701 Type *string `json:"type,omitempty"` 8702 // Tags - Resource tags 8703 Tags map[string]*string `json:"tags"` 8704} 8705 8706// MarshalJSON is the custom marshaler for ParameterCustomLoginSettingValues. 8707func (pclsv ParameterCustomLoginSettingValues) MarshalJSON() ([]byte, error) { 8708 objectMap := make(map[string]interface{}) 8709 if pclsv.ParameterCustomLoginSettingValuesProperties != nil { 8710 objectMap["properties"] = pclsv.ParameterCustomLoginSettingValuesProperties 8711 } 8712 if pclsv.ID != nil { 8713 objectMap["id"] = pclsv.ID 8714 } 8715 if pclsv.Name != nil { 8716 objectMap["name"] = pclsv.Name 8717 } 8718 if pclsv.Kind != nil { 8719 objectMap["kind"] = pclsv.Kind 8720 } 8721 if pclsv.Location != nil { 8722 objectMap["location"] = pclsv.Location 8723 } 8724 if pclsv.Type != nil { 8725 objectMap["type"] = pclsv.Type 8726 } 8727 if pclsv.Tags != nil { 8728 objectMap["tags"] = pclsv.Tags 8729 } 8730 return json.Marshal(objectMap) 8731} 8732 8733// UnmarshalJSON is the custom unmarshaler for ParameterCustomLoginSettingValues struct. 8734func (pclsv *ParameterCustomLoginSettingValues) UnmarshalJSON(body []byte) error { 8735 var m map[string]*json.RawMessage 8736 err := json.Unmarshal(body, &m) 8737 if err != nil { 8738 return err 8739 } 8740 for k, v := range m { 8741 switch k { 8742 case "properties": 8743 if v != nil { 8744 var parameterCustomLoginSettingValuesProperties ParameterCustomLoginSettingValuesProperties 8745 err = json.Unmarshal(*v, ¶meterCustomLoginSettingValuesProperties) 8746 if err != nil { 8747 return err 8748 } 8749 pclsv.ParameterCustomLoginSettingValuesProperties = ¶meterCustomLoginSettingValuesProperties 8750 } 8751 case "id": 8752 if v != nil { 8753 var ID string 8754 err = json.Unmarshal(*v, &ID) 8755 if err != nil { 8756 return err 8757 } 8758 pclsv.ID = &ID 8759 } 8760 case "name": 8761 if v != nil { 8762 var name string 8763 err = json.Unmarshal(*v, &name) 8764 if err != nil { 8765 return err 8766 } 8767 pclsv.Name = &name 8768 } 8769 case "kind": 8770 if v != nil { 8771 var kind string 8772 err = json.Unmarshal(*v, &kind) 8773 if err != nil { 8774 return err 8775 } 8776 pclsv.Kind = &kind 8777 } 8778 case "location": 8779 if v != nil { 8780 var location string 8781 err = json.Unmarshal(*v, &location) 8782 if err != nil { 8783 return err 8784 } 8785 pclsv.Location = &location 8786 } 8787 case "type": 8788 if v != nil { 8789 var typeVar string 8790 err = json.Unmarshal(*v, &typeVar) 8791 if err != nil { 8792 return err 8793 } 8794 pclsv.Type = &typeVar 8795 } 8796 case "tags": 8797 if v != nil { 8798 var tags map[string]*string 8799 err = json.Unmarshal(*v, &tags) 8800 if err != nil { 8801 return err 8802 } 8803 pclsv.Tags = tags 8804 } 8805 } 8806 } 8807 8808 return nil 8809} 8810 8811// ParameterCustomLoginSettingValuesProperties ... 8812type ParameterCustomLoginSettingValuesProperties struct { 8813 // CustomParameters - Custom parameters. 8814 CustomParameters map[string]*CustomLoginSettingValue `json:"customParameters"` 8815} 8816 8817// MarshalJSON is the custom marshaler for ParameterCustomLoginSettingValuesProperties. 8818func (pclsv ParameterCustomLoginSettingValuesProperties) MarshalJSON() ([]byte, error) { 8819 objectMap := make(map[string]interface{}) 8820 if pclsv.CustomParameters != nil { 8821 objectMap["customParameters"] = pclsv.CustomParameters 8822 } 8823 return json.Marshal(objectMap) 8824} 8825 8826// PremierAddOnRequest ... 8827type PremierAddOnRequest struct { 8828 // Location - Geo region resource belongs to e.g. SouthCentralUS, SouthEastAsia 8829 Location *string `json:"location,omitempty"` 8830 // Tags - Tags associated with resource 8831 Tags map[string]*string `json:"tags"` 8832 // Plan - Azure resource manager plan 8833 Plan *ArmPlan `json:"plan,omitempty"` 8834 // Properties - Resource specific properties 8835 Properties interface{} `json:"properties,omitempty"` 8836 // Sku - Sku description of the resource 8837 Sku *SkuDescription `json:"sku,omitempty"` 8838} 8839 8840// MarshalJSON is the custom marshaler for PremierAddOnRequest. 8841func (paor PremierAddOnRequest) MarshalJSON() ([]byte, error) { 8842 objectMap := make(map[string]interface{}) 8843 if paor.Location != nil { 8844 objectMap["location"] = paor.Location 8845 } 8846 if paor.Tags != nil { 8847 objectMap["tags"] = paor.Tags 8848 } 8849 if paor.Plan != nil { 8850 objectMap["plan"] = paor.Plan 8851 } 8852 if paor.Properties != nil { 8853 objectMap["properties"] = paor.Properties 8854 } 8855 if paor.Sku != nil { 8856 objectMap["sku"] = paor.Sku 8857 } 8858 return json.Marshal(objectMap) 8859} 8860 8861// RampUpRule routing rules for ramp up testing. This rule allows to redirect static traffic % to a slot or 8862// to gradually change routing % based on performance 8863type RampUpRule struct { 8864 // ActionHostName - Hostname of a slot to which the traffic will be redirected if decided to. E.g. mysite-stage.azurewebsites.net 8865 ActionHostName *string `json:"actionHostName,omitempty"` 8866 // ReroutePercentage - Percentage of the traffic which will be redirected to {Microsoft.Web.Hosting.Administration.RampUpRule.ActionHostName} 8867 ReroutePercentage *float64 `json:"reroutePercentage,omitempty"` 8868 // ChangeStep - [Optional] In auto ramp up scenario this is the step to add/remove from {Microsoft.Web.Hosting.Administration.RampUpRule.ReroutePercentage} until it reaches 8869 // {Microsoft.Web.Hosting.Administration.RampUpRule.MinReroutePercentage} or {Microsoft.Web.Hosting.Administration.RampUpRule.MaxReroutePercentage}. Site metrics are checked every N minutes specified in {Microsoft.Web.Hosting.Administration.RampUpRule.ChangeIntervalInMinutes}. 8870 // Custom decision algorithm can be provided in TiPCallback site extension which Url can be specified in {Microsoft.Web.Hosting.Administration.RampUpRule.ChangeDecisionCallbackUrl} 8871 ChangeStep *float64 `json:"changeStep,omitempty"` 8872 // ChangeIntervalInMinutes - [Optional] Specifies interval in minutes to reevaluate ReroutePercentage 8873 ChangeIntervalInMinutes *int32 `json:"changeIntervalInMinutes,omitempty"` 8874 // MinReroutePercentage - [Optional] Specifies lower boundary above which ReroutePercentage will stay. 8875 MinReroutePercentage *float64 `json:"minReroutePercentage,omitempty"` 8876 // MaxReroutePercentage - [Optional] Specifies upper boundary below which ReroutePercentage will stay. 8877 MaxReroutePercentage *float64 `json:"maxReroutePercentage,omitempty"` 8878 // ChangeDecisionCallbackURL - Custom decision algorithm can be provided in TiPCallback site extension which Url can be specified. See TiPCallback site extension for the scaffold and contracts. 8879 // https://www.siteextensions.net/packages/TiPCallback/ 8880 ChangeDecisionCallbackURL *string `json:"changeDecisionCallbackUrl,omitempty"` 8881 // Name - Name of the routing rule. The recommended name would be to point to the slot which will receive the traffic in the experiment. 8882 Name *string `json:"name,omitempty"` 8883} 8884 8885// ReadCloser ... 8886type ReadCloser struct { 8887 autorest.Response `json:"-"` 8888 Value *io.ReadCloser `json:"value,omitempty"` 8889} 8890 8891// Recommendation represents a recommendation result generated by the recommendation engine 8892type Recommendation struct { 8893 // CreationTime - Timestamp when this instance was created. 8894 CreationTime *date.Time `json:"creationTime,omitempty"` 8895 // RecommendationID - A GUID value that each recommendation object is associated with. 8896 RecommendationID *string `json:"recommendationId,omitempty"` 8897 // ResourceID - Full ARM resource ID string that this recommendation object is associated with. 8898 ResourceID *string `json:"resourceId,omitempty"` 8899 // ResourceScope - Name of a resource type this recommendation applies, e.g. Subscription, ServerFarm, Site. 8900 ResourceScope *string `json:"resourceScope,omitempty"` 8901 // RuleName - Unique name of the rule 8902 RuleName *string `json:"ruleName,omitempty"` 8903 // DisplayName - UI friendly name of the rule (may not be unique) 8904 DisplayName *string `json:"displayName,omitempty"` 8905 // Message - Localized text of recommendation, good for UI. 8906 Message *string `json:"message,omitempty"` 8907 // Level - Level indicating how critical this recommendation can impact. Possible values include: 'Critical', 'Warning', 'Information', 'NonUrgentSuggestion' 8908 Level NotificationLevel `json:"level,omitempty"` 8909 // Channels - List of channels that this recommendation can apply. Possible values include: 'Notification', 'API', 'Email', 'All' 8910 Channels Channels `json:"channels,omitempty"` 8911 // Tags - The list of category tags that this recommendation belongs to. 8912 Tags *[]string `json:"tags,omitempty"` 8913 // ActionName - Name of action recommended by this object. 8914 ActionName *string `json:"actionName,omitempty"` 8915 // Enabled - On/off flag indicating the rule is currently enabled or disabled. 8916 Enabled *int32 `json:"enabled,omitempty"` 8917 // StartTime - The beginning time of a range that the recommendation refers to. 8918 StartTime *date.Time `json:"startTime,omitempty"` 8919 // EndTime - The end time of a range that the recommendation refers to. 8920 EndTime *date.Time `json:"endTime,omitempty"` 8921 // NextNotificationTime - When to notify this recommendation next. Null means that this will never be notified anymore. 8922 NextNotificationTime *date.Time `json:"nextNotificationTime,omitempty"` 8923 // NotificationExpirationTime - Date and time when this notification expires. 8924 NotificationExpirationTime *date.Time `json:"notificationExpirationTime,omitempty"` 8925 // NotifiedTime - Last timestamp this instance was actually notified. Null means that this recommendation hasn't been notified yet. 8926 NotifiedTime *date.Time `json:"notifiedTime,omitempty"` 8927 // Score - A metric value measured by the rule. 8928 Score *float64 `json:"score,omitempty"` 8929} 8930 8931// RecommendationRule represents a recommendation rule that the recommendation engine can perform 8932type RecommendationRule struct { 8933 autorest.Response `json:"-"` 8934 // Name - Unique name of the rule 8935 Name *string `json:"name,omitempty"` 8936 // DisplayName - UI friendly name of the rule 8937 DisplayName *string `json:"displayName,omitempty"` 8938 // Message - Localized name of the rule (Good for UI) 8939 Message *string `json:"message,omitempty"` 8940 // RecommendationID - Recommendation ID of an associated recommendation object tied to the rule, if exists. 8941 // If such an object doesn't exist, it is set to null. 8942 RecommendationID *string `json:"recommendationId,omitempty"` 8943 // Description - Localized detailed description of the rule 8944 Description *string `json:"description,omitempty"` 8945 // ActionName - Name of action that is recommended by this rule in string 8946 ActionName *string `json:"actionName,omitempty"` 8947 // Enabled - On/off flag indicating the rule is currently enabled or disabled. 8948 Enabled *int32 `json:"enabled,omitempty"` 8949 // Level - Level of impact indicating how critical this rule is. Possible values include: 'Critical', 'Warning', 'Information', 'NonUrgentSuggestion' 8950 Level NotificationLevel `json:"level,omitempty"` 8951 // Channels - List of available channels that this rule applies. Possible values include: 'Notification', 'API', 'Email', 'All' 8952 Channels Channels `json:"channels,omitempty"` 8953 // Tags - An array of category tags that the rule contains. 8954 Tags *[]string `json:"tags,omitempty"` 8955} 8956 8957// ReissueCertificateOrderRequest class representing certificate reissue request 8958type ReissueCertificateOrderRequest struct { 8959 *ReissueCertificateOrderRequestProperties `json:"properties,omitempty"` 8960 // ID - Resource Id 8961 ID *string `json:"id,omitempty"` 8962 // Name - Resource Name 8963 Name *string `json:"name,omitempty"` 8964 // Kind - Kind of resource 8965 Kind *string `json:"kind,omitempty"` 8966 // Location - Resource Location 8967 Location *string `json:"location,omitempty"` 8968 // Type - Resource type 8969 Type *string `json:"type,omitempty"` 8970 // Tags - Resource tags 8971 Tags map[string]*string `json:"tags"` 8972} 8973 8974// MarshalJSON is the custom marshaler for ReissueCertificateOrderRequest. 8975func (rcor ReissueCertificateOrderRequest) MarshalJSON() ([]byte, error) { 8976 objectMap := make(map[string]interface{}) 8977 if rcor.ReissueCertificateOrderRequestProperties != nil { 8978 objectMap["properties"] = rcor.ReissueCertificateOrderRequestProperties 8979 } 8980 if rcor.ID != nil { 8981 objectMap["id"] = rcor.ID 8982 } 8983 if rcor.Name != nil { 8984 objectMap["name"] = rcor.Name 8985 } 8986 if rcor.Kind != nil { 8987 objectMap["kind"] = rcor.Kind 8988 } 8989 if rcor.Location != nil { 8990 objectMap["location"] = rcor.Location 8991 } 8992 if rcor.Type != nil { 8993 objectMap["type"] = rcor.Type 8994 } 8995 if rcor.Tags != nil { 8996 objectMap["tags"] = rcor.Tags 8997 } 8998 return json.Marshal(objectMap) 8999} 9000 9001// UnmarshalJSON is the custom unmarshaler for ReissueCertificateOrderRequest struct. 9002func (rcor *ReissueCertificateOrderRequest) UnmarshalJSON(body []byte) error { 9003 var m map[string]*json.RawMessage 9004 err := json.Unmarshal(body, &m) 9005 if err != nil { 9006 return err 9007 } 9008 for k, v := range m { 9009 switch k { 9010 case "properties": 9011 if v != nil { 9012 var reissueCertificateOrderRequestProperties ReissueCertificateOrderRequestProperties 9013 err = json.Unmarshal(*v, &reissueCertificateOrderRequestProperties) 9014 if err != nil { 9015 return err 9016 } 9017 rcor.ReissueCertificateOrderRequestProperties = &reissueCertificateOrderRequestProperties 9018 } 9019 case "id": 9020 if v != nil { 9021 var ID string 9022 err = json.Unmarshal(*v, &ID) 9023 if err != nil { 9024 return err 9025 } 9026 rcor.ID = &ID 9027 } 9028 case "name": 9029 if v != nil { 9030 var name string 9031 err = json.Unmarshal(*v, &name) 9032 if err != nil { 9033 return err 9034 } 9035 rcor.Name = &name 9036 } 9037 case "kind": 9038 if v != nil { 9039 var kind string 9040 err = json.Unmarshal(*v, &kind) 9041 if err != nil { 9042 return err 9043 } 9044 rcor.Kind = &kind 9045 } 9046 case "location": 9047 if v != nil { 9048 var location string 9049 err = json.Unmarshal(*v, &location) 9050 if err != nil { 9051 return err 9052 } 9053 rcor.Location = &location 9054 } 9055 case "type": 9056 if v != nil { 9057 var typeVar string 9058 err = json.Unmarshal(*v, &typeVar) 9059 if err != nil { 9060 return err 9061 } 9062 rcor.Type = &typeVar 9063 } 9064 case "tags": 9065 if v != nil { 9066 var tags map[string]*string 9067 err = json.Unmarshal(*v, &tags) 9068 if err != nil { 9069 return err 9070 } 9071 rcor.Tags = tags 9072 } 9073 } 9074 } 9075 9076 return nil 9077} 9078 9079// ReissueCertificateOrderRequestProperties ... 9080type ReissueCertificateOrderRequestProperties struct { 9081 // KeySize - Certificate Key Size 9082 KeySize *int32 `json:"keySize,omitempty"` 9083 // DelayExistingRevokeInHours - Delay in hours to revoke existing certificate after the new certificate is issued 9084 DelayExistingRevokeInHours *int32 `json:"delayExistingRevokeInHours,omitempty"` 9085} 9086 9087// RelayServiceConnectionEntity class that represents a BizTalk Hybrid Connection 9088type RelayServiceConnectionEntity struct { 9089 autorest.Response `json:"-"` 9090 *RelayServiceConnectionEntityProperties `json:"properties,omitempty"` 9091 // ID - Resource Id 9092 ID *string `json:"id,omitempty"` 9093 // Name - Resource Name 9094 Name *string `json:"name,omitempty"` 9095 // Kind - Kind of resource 9096 Kind *string `json:"kind,omitempty"` 9097 // Location - Resource Location 9098 Location *string `json:"location,omitempty"` 9099 // Type - Resource type 9100 Type *string `json:"type,omitempty"` 9101 // Tags - Resource tags 9102 Tags map[string]*string `json:"tags"` 9103} 9104 9105// MarshalJSON is the custom marshaler for RelayServiceConnectionEntity. 9106func (rsce RelayServiceConnectionEntity) MarshalJSON() ([]byte, error) { 9107 objectMap := make(map[string]interface{}) 9108 if rsce.RelayServiceConnectionEntityProperties != nil { 9109 objectMap["properties"] = rsce.RelayServiceConnectionEntityProperties 9110 } 9111 if rsce.ID != nil { 9112 objectMap["id"] = rsce.ID 9113 } 9114 if rsce.Name != nil { 9115 objectMap["name"] = rsce.Name 9116 } 9117 if rsce.Kind != nil { 9118 objectMap["kind"] = rsce.Kind 9119 } 9120 if rsce.Location != nil { 9121 objectMap["location"] = rsce.Location 9122 } 9123 if rsce.Type != nil { 9124 objectMap["type"] = rsce.Type 9125 } 9126 if rsce.Tags != nil { 9127 objectMap["tags"] = rsce.Tags 9128 } 9129 return json.Marshal(objectMap) 9130} 9131 9132// UnmarshalJSON is the custom unmarshaler for RelayServiceConnectionEntity struct. 9133func (rsce *RelayServiceConnectionEntity) UnmarshalJSON(body []byte) error { 9134 var m map[string]*json.RawMessage 9135 err := json.Unmarshal(body, &m) 9136 if err != nil { 9137 return err 9138 } 9139 for k, v := range m { 9140 switch k { 9141 case "properties": 9142 if v != nil { 9143 var relayServiceConnectionEntityProperties RelayServiceConnectionEntityProperties 9144 err = json.Unmarshal(*v, &relayServiceConnectionEntityProperties) 9145 if err != nil { 9146 return err 9147 } 9148 rsce.RelayServiceConnectionEntityProperties = &relayServiceConnectionEntityProperties 9149 } 9150 case "id": 9151 if v != nil { 9152 var ID string 9153 err = json.Unmarshal(*v, &ID) 9154 if err != nil { 9155 return err 9156 } 9157 rsce.ID = &ID 9158 } 9159 case "name": 9160 if v != nil { 9161 var name string 9162 err = json.Unmarshal(*v, &name) 9163 if err != nil { 9164 return err 9165 } 9166 rsce.Name = &name 9167 } 9168 case "kind": 9169 if v != nil { 9170 var kind string 9171 err = json.Unmarshal(*v, &kind) 9172 if err != nil { 9173 return err 9174 } 9175 rsce.Kind = &kind 9176 } 9177 case "location": 9178 if v != nil { 9179 var location string 9180 err = json.Unmarshal(*v, &location) 9181 if err != nil { 9182 return err 9183 } 9184 rsce.Location = &location 9185 } 9186 case "type": 9187 if v != nil { 9188 var typeVar string 9189 err = json.Unmarshal(*v, &typeVar) 9190 if err != nil { 9191 return err 9192 } 9193 rsce.Type = &typeVar 9194 } 9195 case "tags": 9196 if v != nil { 9197 var tags map[string]*string 9198 err = json.Unmarshal(*v, &tags) 9199 if err != nil { 9200 return err 9201 } 9202 rsce.Tags = tags 9203 } 9204 } 9205 } 9206 9207 return nil 9208} 9209 9210// RelayServiceConnectionEntityProperties ... 9211type RelayServiceConnectionEntityProperties struct { 9212 EntityName *string `json:"entityName,omitempty"` 9213 EntityConnectionString *string `json:"entityConnectionString,omitempty"` 9214 ResourceType *string `json:"resourceType,omitempty"` 9215 ResourceConnectionString *string `json:"resourceConnectionString,omitempty"` 9216 Hostname *string `json:"hostname,omitempty"` 9217 Port *int32 `json:"port,omitempty"` 9218 BiztalkURI *string `json:"biztalkUri,omitempty"` 9219} 9220 9221// RenewCertificateOrderRequest class representing certificate renew request 9222type RenewCertificateOrderRequest struct { 9223 *RenewCertificateOrderRequestProperties `json:"properties,omitempty"` 9224 // ID - Resource Id 9225 ID *string `json:"id,omitempty"` 9226 // Name - Resource Name 9227 Name *string `json:"name,omitempty"` 9228 // Kind - Kind of resource 9229 Kind *string `json:"kind,omitempty"` 9230 // Location - Resource Location 9231 Location *string `json:"location,omitempty"` 9232 // Type - Resource type 9233 Type *string `json:"type,omitempty"` 9234 // Tags - Resource tags 9235 Tags map[string]*string `json:"tags"` 9236} 9237 9238// MarshalJSON is the custom marshaler for RenewCertificateOrderRequest. 9239func (rcor RenewCertificateOrderRequest) MarshalJSON() ([]byte, error) { 9240 objectMap := make(map[string]interface{}) 9241 if rcor.RenewCertificateOrderRequestProperties != nil { 9242 objectMap["properties"] = rcor.RenewCertificateOrderRequestProperties 9243 } 9244 if rcor.ID != nil { 9245 objectMap["id"] = rcor.ID 9246 } 9247 if rcor.Name != nil { 9248 objectMap["name"] = rcor.Name 9249 } 9250 if rcor.Kind != nil { 9251 objectMap["kind"] = rcor.Kind 9252 } 9253 if rcor.Location != nil { 9254 objectMap["location"] = rcor.Location 9255 } 9256 if rcor.Type != nil { 9257 objectMap["type"] = rcor.Type 9258 } 9259 if rcor.Tags != nil { 9260 objectMap["tags"] = rcor.Tags 9261 } 9262 return json.Marshal(objectMap) 9263} 9264 9265// UnmarshalJSON is the custom unmarshaler for RenewCertificateOrderRequest struct. 9266func (rcor *RenewCertificateOrderRequest) UnmarshalJSON(body []byte) error { 9267 var m map[string]*json.RawMessage 9268 err := json.Unmarshal(body, &m) 9269 if err != nil { 9270 return err 9271 } 9272 for k, v := range m { 9273 switch k { 9274 case "properties": 9275 if v != nil { 9276 var renewCertificateOrderRequestProperties RenewCertificateOrderRequestProperties 9277 err = json.Unmarshal(*v, &renewCertificateOrderRequestProperties) 9278 if err != nil { 9279 return err 9280 } 9281 rcor.RenewCertificateOrderRequestProperties = &renewCertificateOrderRequestProperties 9282 } 9283 case "id": 9284 if v != nil { 9285 var ID string 9286 err = json.Unmarshal(*v, &ID) 9287 if err != nil { 9288 return err 9289 } 9290 rcor.ID = &ID 9291 } 9292 case "name": 9293 if v != nil { 9294 var name string 9295 err = json.Unmarshal(*v, &name) 9296 if err != nil { 9297 return err 9298 } 9299 rcor.Name = &name 9300 } 9301 case "kind": 9302 if v != nil { 9303 var kind string 9304 err = json.Unmarshal(*v, &kind) 9305 if err != nil { 9306 return err 9307 } 9308 rcor.Kind = &kind 9309 } 9310 case "location": 9311 if v != nil { 9312 var location string 9313 err = json.Unmarshal(*v, &location) 9314 if err != nil { 9315 return err 9316 } 9317 rcor.Location = &location 9318 } 9319 case "type": 9320 if v != nil { 9321 var typeVar string 9322 err = json.Unmarshal(*v, &typeVar) 9323 if err != nil { 9324 return err 9325 } 9326 rcor.Type = &typeVar 9327 } 9328 case "tags": 9329 if v != nil { 9330 var tags map[string]*string 9331 err = json.Unmarshal(*v, &tags) 9332 if err != nil { 9333 return err 9334 } 9335 rcor.Tags = tags 9336 } 9337 } 9338 } 9339 9340 return nil 9341} 9342 9343// RenewCertificateOrderRequestProperties ... 9344type RenewCertificateOrderRequestProperties struct { 9345 // KeySize - Certificate Key Size 9346 KeySize *int32 `json:"keySize,omitempty"` 9347} 9348 9349// RequestsBasedTrigger requestsBasedTrigger 9350type RequestsBasedTrigger struct { 9351 // Count - Count 9352 Count *int32 `json:"count,omitempty"` 9353 // TimeInterval - TimeInterval 9354 TimeInterval *string `json:"timeInterval,omitempty"` 9355} 9356 9357// Resource ... 9358type Resource struct { 9359 // ID - Resource Id 9360 ID *string `json:"id,omitempty"` 9361 // Name - Resource Name 9362 Name *string `json:"name,omitempty"` 9363 // Kind - Kind of resource 9364 Kind *string `json:"kind,omitempty"` 9365 // Location - Resource Location 9366 Location *string `json:"location,omitempty"` 9367 // Type - Resource type 9368 Type *string `json:"type,omitempty"` 9369 // Tags - Resource tags 9370 Tags map[string]*string `json:"tags"` 9371} 9372 9373// MarshalJSON is the custom marshaler for Resource. 9374func (r Resource) MarshalJSON() ([]byte, error) { 9375 objectMap := make(map[string]interface{}) 9376 if r.ID != nil { 9377 objectMap["id"] = r.ID 9378 } 9379 if r.Name != nil { 9380 objectMap["name"] = r.Name 9381 } 9382 if r.Kind != nil { 9383 objectMap["kind"] = r.Kind 9384 } 9385 if r.Location != nil { 9386 objectMap["location"] = r.Location 9387 } 9388 if r.Type != nil { 9389 objectMap["type"] = r.Type 9390 } 9391 if r.Tags != nil { 9392 objectMap["tags"] = r.Tags 9393 } 9394 return json.Marshal(objectMap) 9395} 9396 9397// ResourceMetric object representing a metric for any resource 9398type ResourceMetric struct { 9399 // Name - Name of metric 9400 Name *ResourceMetricName `json:"name,omitempty"` 9401 // Unit - Metric unit 9402 Unit *string `json:"unit,omitempty"` 9403 // TimeGrain - Metric granularity. E.g PT1H, PT5M, P1D 9404 TimeGrain *string `json:"timeGrain,omitempty"` 9405 // StartTime - Metric start time 9406 StartTime *date.Time `json:"startTime,omitempty"` 9407 // EndTime - Metric end time 9408 EndTime *date.Time `json:"endTime,omitempty"` 9409 // ResourceID - Metric resource Id 9410 ResourceID *string `json:"resourceId,omitempty"` 9411 // MetricValues - Metric values 9412 MetricValues *[]ResourceMetricValue `json:"metricValues,omitempty"` 9413 // Properties - Properties 9414 Properties *[]KeyValuePairStringString `json:"properties,omitempty"` 9415} 9416 9417// ResourceMetricCollection collection of metric responses 9418type ResourceMetricCollection struct { 9419 autorest.Response `json:"-"` 9420 // Value - Collection of resources 9421 Value *[]ResourceMetric `json:"value,omitempty"` 9422 // NextLink - Link to next page of resources 9423 NextLink *string `json:"nextLink,omitempty"` 9424} 9425 9426// ResourceMetricCollectionIterator provides access to a complete listing of ResourceMetric values. 9427type ResourceMetricCollectionIterator struct { 9428 i int 9429 page ResourceMetricCollectionPage 9430} 9431 9432// NextWithContext advances to the next value. If there was an error making 9433// the request the iterator does not advance and the error is returned. 9434func (iter *ResourceMetricCollectionIterator) NextWithContext(ctx context.Context) (err error) { 9435 if tracing.IsEnabled() { 9436 ctx = tracing.StartSpan(ctx, fqdn+"/ResourceMetricCollectionIterator.NextWithContext") 9437 defer func() { 9438 sc := -1 9439 if iter.Response().Response.Response != nil { 9440 sc = iter.Response().Response.Response.StatusCode 9441 } 9442 tracing.EndSpan(ctx, sc, err) 9443 }() 9444 } 9445 iter.i++ 9446 if iter.i < len(iter.page.Values()) { 9447 return nil 9448 } 9449 err = iter.page.NextWithContext(ctx) 9450 if err != nil { 9451 iter.i-- 9452 return err 9453 } 9454 iter.i = 0 9455 return nil 9456} 9457 9458// Next advances to the next value. If there was an error making 9459// the request the iterator does not advance and the error is returned. 9460// Deprecated: Use NextWithContext() instead. 9461func (iter *ResourceMetricCollectionIterator) Next() error { 9462 return iter.NextWithContext(context.Background()) 9463} 9464 9465// NotDone returns true if the enumeration should be started or is not yet complete. 9466func (iter ResourceMetricCollectionIterator) NotDone() bool { 9467 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 9468} 9469 9470// Response returns the raw server response from the last page request. 9471func (iter ResourceMetricCollectionIterator) Response() ResourceMetricCollection { 9472 return iter.page.Response() 9473} 9474 9475// Value returns the current value or a zero-initialized value if the 9476// iterator has advanced beyond the end of the collection. 9477func (iter ResourceMetricCollectionIterator) Value() ResourceMetric { 9478 if !iter.page.NotDone() { 9479 return ResourceMetric{} 9480 } 9481 return iter.page.Values()[iter.i] 9482} 9483 9484// Creates a new instance of the ResourceMetricCollectionIterator type. 9485func NewResourceMetricCollectionIterator(page ResourceMetricCollectionPage) ResourceMetricCollectionIterator { 9486 return ResourceMetricCollectionIterator{page: page} 9487} 9488 9489// IsEmpty returns true if the ListResult contains no values. 9490func (rmc ResourceMetricCollection) IsEmpty() bool { 9491 return rmc.Value == nil || len(*rmc.Value) == 0 9492} 9493 9494// hasNextLink returns true if the NextLink is not empty. 9495func (rmc ResourceMetricCollection) hasNextLink() bool { 9496 return rmc.NextLink != nil && len(*rmc.NextLink) != 0 9497} 9498 9499// resourceMetricCollectionPreparer prepares a request to retrieve the next set of results. 9500// It returns nil if no more results exist. 9501func (rmc ResourceMetricCollection) resourceMetricCollectionPreparer(ctx context.Context) (*http.Request, error) { 9502 if !rmc.hasNextLink() { 9503 return nil, nil 9504 } 9505 return autorest.Prepare((&http.Request{}).WithContext(ctx), 9506 autorest.AsJSON(), 9507 autorest.AsGet(), 9508 autorest.WithBaseURL(to.String(rmc.NextLink))) 9509} 9510 9511// ResourceMetricCollectionPage contains a page of ResourceMetric values. 9512type ResourceMetricCollectionPage struct { 9513 fn func(context.Context, ResourceMetricCollection) (ResourceMetricCollection, error) 9514 rmc ResourceMetricCollection 9515} 9516 9517// NextWithContext advances to the next page of values. If there was an error making 9518// the request the page does not advance and the error is returned. 9519func (page *ResourceMetricCollectionPage) NextWithContext(ctx context.Context) (err error) { 9520 if tracing.IsEnabled() { 9521 ctx = tracing.StartSpan(ctx, fqdn+"/ResourceMetricCollectionPage.NextWithContext") 9522 defer func() { 9523 sc := -1 9524 if page.Response().Response.Response != nil { 9525 sc = page.Response().Response.Response.StatusCode 9526 } 9527 tracing.EndSpan(ctx, sc, err) 9528 }() 9529 } 9530 for { 9531 next, err := page.fn(ctx, page.rmc) 9532 if err != nil { 9533 return err 9534 } 9535 page.rmc = next 9536 if !next.hasNextLink() || !next.IsEmpty() { 9537 break 9538 } 9539 } 9540 return nil 9541} 9542 9543// Next advances to the next page of values. If there was an error making 9544// the request the page does not advance and the error is returned. 9545// Deprecated: Use NextWithContext() instead. 9546func (page *ResourceMetricCollectionPage) Next() error { 9547 return page.NextWithContext(context.Background()) 9548} 9549 9550// NotDone returns true if the page enumeration should be started or is not yet complete. 9551func (page ResourceMetricCollectionPage) NotDone() bool { 9552 return !page.rmc.IsEmpty() 9553} 9554 9555// Response returns the raw server response from the last page request. 9556func (page ResourceMetricCollectionPage) Response() ResourceMetricCollection { 9557 return page.rmc 9558} 9559 9560// Values returns the slice of values for the current page or nil if there are no values. 9561func (page ResourceMetricCollectionPage) Values() []ResourceMetric { 9562 if page.rmc.IsEmpty() { 9563 return nil 9564 } 9565 return *page.rmc.Value 9566} 9567 9568// Creates a new instance of the ResourceMetricCollectionPage type. 9569func NewResourceMetricCollectionPage(cur ResourceMetricCollection, getNextPage func(context.Context, ResourceMetricCollection) (ResourceMetricCollection, error)) ResourceMetricCollectionPage { 9570 return ResourceMetricCollectionPage{ 9571 fn: getNextPage, 9572 rmc: cur, 9573 } 9574} 9575 9576// ResourceMetricName name of a metric for any resource 9577type ResourceMetricName struct { 9578 // Value - metric name value 9579 Value *string `json:"value,omitempty"` 9580 // LocalizedValue - Localized metric name value 9581 LocalizedValue *string `json:"localizedValue,omitempty"` 9582} 9583 9584// ResourceMetricValue value of resource metric 9585type ResourceMetricValue struct { 9586 // TimeStamp - Value timestamp 9587 TimeStamp *string `json:"timeStamp,omitempty"` 9588 // Average - Value average 9589 Average *float64 `json:"average,omitempty"` 9590 // Minimum - Value minimum 9591 Minimum *float64 `json:"minimum,omitempty"` 9592 // Maximum - Value maximum 9593 Maximum *float64 `json:"maximum,omitempty"` 9594 // Total - Value total 9595 Total *float64 `json:"total,omitempty"` 9596 // Count - Value count 9597 Count *float64 `json:"count,omitempty"` 9598} 9599 9600// ResourceNameAvailability describes if a resource name is available 9601type ResourceNameAvailability struct { 9602 autorest.Response `json:"-"` 9603 // NameAvailable - True indicates name is valid and available. False indicates the name is invalid, unavailable, or both. 9604 NameAvailable *bool `json:"nameAvailable,omitempty"` 9605 // Reason - Required if nameAvailable is false. 'Invalid' indicates the name provided does not match Azure WebApp service’s naming requirements. 'AlreadyExists' indicates that the name is already in use and is therefore unavailable. 9606 Reason *string `json:"reason,omitempty"` 9607 Message *string `json:"message,omitempty"` 9608} 9609 9610// ResourceNameAvailabilityRequest resource name availability request content 9611type ResourceNameAvailabilityRequest struct { 9612 // Name - Resource name to verify 9613 Name *string `json:"name,omitempty"` 9614 // Type - Resource type used for verification 9615 Type *string `json:"type,omitempty"` 9616 // IsFqdn - Is fully qualified domain name 9617 IsFqdn *bool `json:"isFqdn,omitempty"` 9618} 9619 9620// ResponseMessageEnvelopeAPIEntity message envelope that contains the common Azure resource manager 9621// properties and the resource provider specific content 9622type ResponseMessageEnvelopeAPIEntity struct { 9623 // ID - Resource Id. Typically id is populated only for responses to GET requests. Caller is responsible for passing in this 9624 // value for GET requests only. 9625 // For example: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupId}/providers/Microsoft.Web/sites/{sitename} 9626 ID *string `json:"id,omitempty"` 9627 // Name - Name of resource 9628 Name *string `json:"name,omitempty"` 9629 // Type - Type of resource e.g Microsoft.Web/sites 9630 Type *string `json:"type,omitempty"` 9631 // Location - Geo region resource belongs to e.g. SouthCentralUS, SouthEastAsia 9632 Location *string `json:"location,omitempty"` 9633 // Tags - Tags associated with resource 9634 Tags map[string]*string `json:"tags"` 9635 // Plan - Azure resource manager plan 9636 Plan *ArmPlan `json:"plan,omitempty"` 9637 // Properties - Resource specific properties 9638 Properties *APIEntity `json:"properties,omitempty"` 9639 // Sku - Sku description of the resource 9640 Sku *SkuDescription `json:"sku,omitempty"` 9641} 9642 9643// MarshalJSON is the custom marshaler for ResponseMessageEnvelopeAPIEntity. 9644func (rmeAe ResponseMessageEnvelopeAPIEntity) MarshalJSON() ([]byte, error) { 9645 objectMap := make(map[string]interface{}) 9646 if rmeAe.ID != nil { 9647 objectMap["id"] = rmeAe.ID 9648 } 9649 if rmeAe.Name != nil { 9650 objectMap["name"] = rmeAe.Name 9651 } 9652 if rmeAe.Type != nil { 9653 objectMap["type"] = rmeAe.Type 9654 } 9655 if rmeAe.Location != nil { 9656 objectMap["location"] = rmeAe.Location 9657 } 9658 if rmeAe.Tags != nil { 9659 objectMap["tags"] = rmeAe.Tags 9660 } 9661 if rmeAe.Plan != nil { 9662 objectMap["plan"] = rmeAe.Plan 9663 } 9664 if rmeAe.Properties != nil { 9665 objectMap["properties"] = rmeAe.Properties 9666 } 9667 if rmeAe.Sku != nil { 9668 objectMap["sku"] = rmeAe.Sku 9669 } 9670 return json.Marshal(objectMap) 9671} 9672 9673// RestoreRequest description of a restore request 9674type RestoreRequest struct { 9675 autorest.Response `json:"-"` 9676 *RestoreRequestProperties `json:"properties,omitempty"` 9677 // ID - Resource Id 9678 ID *string `json:"id,omitempty"` 9679 // Name - Resource Name 9680 Name *string `json:"name,omitempty"` 9681 // Kind - Kind of resource 9682 Kind *string `json:"kind,omitempty"` 9683 // Location - Resource Location 9684 Location *string `json:"location,omitempty"` 9685 // Type - Resource type 9686 Type *string `json:"type,omitempty"` 9687 // Tags - Resource tags 9688 Tags map[string]*string `json:"tags"` 9689} 9690 9691// MarshalJSON is the custom marshaler for RestoreRequest. 9692func (rr RestoreRequest) MarshalJSON() ([]byte, error) { 9693 objectMap := make(map[string]interface{}) 9694 if rr.RestoreRequestProperties != nil { 9695 objectMap["properties"] = rr.RestoreRequestProperties 9696 } 9697 if rr.ID != nil { 9698 objectMap["id"] = rr.ID 9699 } 9700 if rr.Name != nil { 9701 objectMap["name"] = rr.Name 9702 } 9703 if rr.Kind != nil { 9704 objectMap["kind"] = rr.Kind 9705 } 9706 if rr.Location != nil { 9707 objectMap["location"] = rr.Location 9708 } 9709 if rr.Type != nil { 9710 objectMap["type"] = rr.Type 9711 } 9712 if rr.Tags != nil { 9713 objectMap["tags"] = rr.Tags 9714 } 9715 return json.Marshal(objectMap) 9716} 9717 9718// UnmarshalJSON is the custom unmarshaler for RestoreRequest struct. 9719func (rr *RestoreRequest) UnmarshalJSON(body []byte) error { 9720 var m map[string]*json.RawMessage 9721 err := json.Unmarshal(body, &m) 9722 if err != nil { 9723 return err 9724 } 9725 for k, v := range m { 9726 switch k { 9727 case "properties": 9728 if v != nil { 9729 var restoreRequestProperties RestoreRequestProperties 9730 err = json.Unmarshal(*v, &restoreRequestProperties) 9731 if err != nil { 9732 return err 9733 } 9734 rr.RestoreRequestProperties = &restoreRequestProperties 9735 } 9736 case "id": 9737 if v != nil { 9738 var ID string 9739 err = json.Unmarshal(*v, &ID) 9740 if err != nil { 9741 return err 9742 } 9743 rr.ID = &ID 9744 } 9745 case "name": 9746 if v != nil { 9747 var name string 9748 err = json.Unmarshal(*v, &name) 9749 if err != nil { 9750 return err 9751 } 9752 rr.Name = &name 9753 } 9754 case "kind": 9755 if v != nil { 9756 var kind string 9757 err = json.Unmarshal(*v, &kind) 9758 if err != nil { 9759 return err 9760 } 9761 rr.Kind = &kind 9762 } 9763 case "location": 9764 if v != nil { 9765 var location string 9766 err = json.Unmarshal(*v, &location) 9767 if err != nil { 9768 return err 9769 } 9770 rr.Location = &location 9771 } 9772 case "type": 9773 if v != nil { 9774 var typeVar string 9775 err = json.Unmarshal(*v, &typeVar) 9776 if err != nil { 9777 return err 9778 } 9779 rr.Type = &typeVar 9780 } 9781 case "tags": 9782 if v != nil { 9783 var tags map[string]*string 9784 err = json.Unmarshal(*v, &tags) 9785 if err != nil { 9786 return err 9787 } 9788 rr.Tags = tags 9789 } 9790 } 9791 } 9792 9793 return nil 9794} 9795 9796// RestoreRequestProperties ... 9797type RestoreRequestProperties struct { 9798 // StorageAccountURL - SAS URL to the container 9799 StorageAccountURL *string `json:"storageAccountUrl,omitempty"` 9800 // BlobName - Name of a blob which contains the backup 9801 BlobName *string `json:"blobName,omitempty"` 9802 // Overwrite - True if the restore operation can overwrite target site. "True" needed if trying to restore over an existing site. 9803 Overwrite *bool `json:"overwrite,omitempty"` 9804 // SiteName - Name of a site (Web App) 9805 SiteName *string `json:"siteName,omitempty"` 9806 // Databases - Collection of databases which should be restored. This list has to match the list of databases included in the backup. 9807 Databases *[]DatabaseBackupSetting `json:"databases,omitempty"` 9808 // IgnoreConflictingHostNames - Changes a logic when restoring a site with custom domains. If "true", custom domains are removed automatically. If "false", custom domains are added to 9809 // the site object when it is being restored, but that might fail due to conflicts during the operation. 9810 IgnoreConflictingHostNames *bool `json:"ignoreConflictingHostNames,omitempty"` 9811 // OperationType - Operation type. Possible values include: 'Default', 'Clone', 'Relocation' 9812 OperationType BackupRestoreOperationType `json:"operationType,omitempty"` 9813 // AdjustConnectionStrings - Gets or sets a flag showing if SiteConfig.ConnectionStrings should be set in new site 9814 AdjustConnectionStrings *bool `json:"adjustConnectionStrings,omitempty"` 9815 // HostingEnvironment - App Service Environment name, if needed (only when restoring a site to an App Service Environment) 9816 HostingEnvironment *string `json:"hostingEnvironment,omitempty"` 9817} 9818 9819// RestoreResponse response for a restore site request 9820type RestoreResponse struct { 9821 autorest.Response `json:"-"` 9822 *RestoreResponseProperties `json:"properties,omitempty"` 9823 // ID - Resource Id 9824 ID *string `json:"id,omitempty"` 9825 // Name - Resource Name 9826 Name *string `json:"name,omitempty"` 9827 // Kind - Kind of resource 9828 Kind *string `json:"kind,omitempty"` 9829 // Location - Resource Location 9830 Location *string `json:"location,omitempty"` 9831 // Type - Resource type 9832 Type *string `json:"type,omitempty"` 9833 // Tags - Resource tags 9834 Tags map[string]*string `json:"tags"` 9835} 9836 9837// MarshalJSON is the custom marshaler for RestoreResponse. 9838func (rr RestoreResponse) MarshalJSON() ([]byte, error) { 9839 objectMap := make(map[string]interface{}) 9840 if rr.RestoreResponseProperties != nil { 9841 objectMap["properties"] = rr.RestoreResponseProperties 9842 } 9843 if rr.ID != nil { 9844 objectMap["id"] = rr.ID 9845 } 9846 if rr.Name != nil { 9847 objectMap["name"] = rr.Name 9848 } 9849 if rr.Kind != nil { 9850 objectMap["kind"] = rr.Kind 9851 } 9852 if rr.Location != nil { 9853 objectMap["location"] = rr.Location 9854 } 9855 if rr.Type != nil { 9856 objectMap["type"] = rr.Type 9857 } 9858 if rr.Tags != nil { 9859 objectMap["tags"] = rr.Tags 9860 } 9861 return json.Marshal(objectMap) 9862} 9863 9864// UnmarshalJSON is the custom unmarshaler for RestoreResponse struct. 9865func (rr *RestoreResponse) UnmarshalJSON(body []byte) error { 9866 var m map[string]*json.RawMessage 9867 err := json.Unmarshal(body, &m) 9868 if err != nil { 9869 return err 9870 } 9871 for k, v := range m { 9872 switch k { 9873 case "properties": 9874 if v != nil { 9875 var restoreResponseProperties RestoreResponseProperties 9876 err = json.Unmarshal(*v, &restoreResponseProperties) 9877 if err != nil { 9878 return err 9879 } 9880 rr.RestoreResponseProperties = &restoreResponseProperties 9881 } 9882 case "id": 9883 if v != nil { 9884 var ID string 9885 err = json.Unmarshal(*v, &ID) 9886 if err != nil { 9887 return err 9888 } 9889 rr.ID = &ID 9890 } 9891 case "name": 9892 if v != nil { 9893 var name string 9894 err = json.Unmarshal(*v, &name) 9895 if err != nil { 9896 return err 9897 } 9898 rr.Name = &name 9899 } 9900 case "kind": 9901 if v != nil { 9902 var kind string 9903 err = json.Unmarshal(*v, &kind) 9904 if err != nil { 9905 return err 9906 } 9907 rr.Kind = &kind 9908 } 9909 case "location": 9910 if v != nil { 9911 var location string 9912 err = json.Unmarshal(*v, &location) 9913 if err != nil { 9914 return err 9915 } 9916 rr.Location = &location 9917 } 9918 case "type": 9919 if v != nil { 9920 var typeVar string 9921 err = json.Unmarshal(*v, &typeVar) 9922 if err != nil { 9923 return err 9924 } 9925 rr.Type = &typeVar 9926 } 9927 case "tags": 9928 if v != nil { 9929 var tags map[string]*string 9930 err = json.Unmarshal(*v, &tags) 9931 if err != nil { 9932 return err 9933 } 9934 rr.Tags = tags 9935 } 9936 } 9937 } 9938 9939 return nil 9940} 9941 9942// RestoreResponseProperties ... 9943type RestoreResponseProperties struct { 9944 // OperationID - When server starts the restore process, it will return an OperationId identifying that particular restore operation 9945 OperationID *string `json:"operationId,omitempty"` 9946} 9947 9948// RoutingRule routing rules for TiP 9949type RoutingRule struct { 9950 // Name - Name of the routing rule. The recommended name would be to point to the slot which will receive the traffic in the experiment. 9951 Name *string `json:"name,omitempty"` 9952} 9953 9954// ServerFarmCollection collection of serverfarms 9955type ServerFarmCollection struct { 9956 autorest.Response `json:"-"` 9957 // Value - Collection of resources 9958 Value *[]ServerFarmWithRichSku `json:"value,omitempty"` 9959 // NextLink - Link to next page of resources 9960 NextLink *string `json:"nextLink,omitempty"` 9961} 9962 9963// ServerFarmCollectionIterator provides access to a complete listing of ServerFarmWithRichSku values. 9964type ServerFarmCollectionIterator struct { 9965 i int 9966 page ServerFarmCollectionPage 9967} 9968 9969// NextWithContext advances to the next value. If there was an error making 9970// the request the iterator does not advance and the error is returned. 9971func (iter *ServerFarmCollectionIterator) NextWithContext(ctx context.Context) (err error) { 9972 if tracing.IsEnabled() { 9973 ctx = tracing.StartSpan(ctx, fqdn+"/ServerFarmCollectionIterator.NextWithContext") 9974 defer func() { 9975 sc := -1 9976 if iter.Response().Response.Response != nil { 9977 sc = iter.Response().Response.Response.StatusCode 9978 } 9979 tracing.EndSpan(ctx, sc, err) 9980 }() 9981 } 9982 iter.i++ 9983 if iter.i < len(iter.page.Values()) { 9984 return nil 9985 } 9986 err = iter.page.NextWithContext(ctx) 9987 if err != nil { 9988 iter.i-- 9989 return err 9990 } 9991 iter.i = 0 9992 return nil 9993} 9994 9995// Next advances to the next value. If there was an error making 9996// the request the iterator does not advance and the error is returned. 9997// Deprecated: Use NextWithContext() instead. 9998func (iter *ServerFarmCollectionIterator) Next() error { 9999 return iter.NextWithContext(context.Background()) 10000} 10001 10002// NotDone returns true if the enumeration should be started or is not yet complete. 10003func (iter ServerFarmCollectionIterator) NotDone() bool { 10004 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 10005} 10006 10007// Response returns the raw server response from the last page request. 10008func (iter ServerFarmCollectionIterator) Response() ServerFarmCollection { 10009 return iter.page.Response() 10010} 10011 10012// Value returns the current value or a zero-initialized value if the 10013// iterator has advanced beyond the end of the collection. 10014func (iter ServerFarmCollectionIterator) Value() ServerFarmWithRichSku { 10015 if !iter.page.NotDone() { 10016 return ServerFarmWithRichSku{} 10017 } 10018 return iter.page.Values()[iter.i] 10019} 10020 10021// Creates a new instance of the ServerFarmCollectionIterator type. 10022func NewServerFarmCollectionIterator(page ServerFarmCollectionPage) ServerFarmCollectionIterator { 10023 return ServerFarmCollectionIterator{page: page} 10024} 10025 10026// IsEmpty returns true if the ListResult contains no values. 10027func (sfc ServerFarmCollection) IsEmpty() bool { 10028 return sfc.Value == nil || len(*sfc.Value) == 0 10029} 10030 10031// hasNextLink returns true if the NextLink is not empty. 10032func (sfc ServerFarmCollection) hasNextLink() bool { 10033 return sfc.NextLink != nil && len(*sfc.NextLink) != 0 10034} 10035 10036// serverFarmCollectionPreparer prepares a request to retrieve the next set of results. 10037// It returns nil if no more results exist. 10038func (sfc ServerFarmCollection) serverFarmCollectionPreparer(ctx context.Context) (*http.Request, error) { 10039 if !sfc.hasNextLink() { 10040 return nil, nil 10041 } 10042 return autorest.Prepare((&http.Request{}).WithContext(ctx), 10043 autorest.AsJSON(), 10044 autorest.AsGet(), 10045 autorest.WithBaseURL(to.String(sfc.NextLink))) 10046} 10047 10048// ServerFarmCollectionPage contains a page of ServerFarmWithRichSku values. 10049type ServerFarmCollectionPage struct { 10050 fn func(context.Context, ServerFarmCollection) (ServerFarmCollection, error) 10051 sfc ServerFarmCollection 10052} 10053 10054// NextWithContext advances to the next page of values. If there was an error making 10055// the request the page does not advance and the error is returned. 10056func (page *ServerFarmCollectionPage) NextWithContext(ctx context.Context) (err error) { 10057 if tracing.IsEnabled() { 10058 ctx = tracing.StartSpan(ctx, fqdn+"/ServerFarmCollectionPage.NextWithContext") 10059 defer func() { 10060 sc := -1 10061 if page.Response().Response.Response != nil { 10062 sc = page.Response().Response.Response.StatusCode 10063 } 10064 tracing.EndSpan(ctx, sc, err) 10065 }() 10066 } 10067 for { 10068 next, err := page.fn(ctx, page.sfc) 10069 if err != nil { 10070 return err 10071 } 10072 page.sfc = next 10073 if !next.hasNextLink() || !next.IsEmpty() { 10074 break 10075 } 10076 } 10077 return nil 10078} 10079 10080// Next advances to the next page of values. If there was an error making 10081// the request the page does not advance and the error is returned. 10082// Deprecated: Use NextWithContext() instead. 10083func (page *ServerFarmCollectionPage) Next() error { 10084 return page.NextWithContext(context.Background()) 10085} 10086 10087// NotDone returns true if the page enumeration should be started or is not yet complete. 10088func (page ServerFarmCollectionPage) NotDone() bool { 10089 return !page.sfc.IsEmpty() 10090} 10091 10092// Response returns the raw server response from the last page request. 10093func (page ServerFarmCollectionPage) Response() ServerFarmCollection { 10094 return page.sfc 10095} 10096 10097// Values returns the slice of values for the current page or nil if there are no values. 10098func (page ServerFarmCollectionPage) Values() []ServerFarmWithRichSku { 10099 if page.sfc.IsEmpty() { 10100 return nil 10101 } 10102 return *page.sfc.Value 10103} 10104 10105// Creates a new instance of the ServerFarmCollectionPage type. 10106func NewServerFarmCollectionPage(cur ServerFarmCollection, getNextPage func(context.Context, ServerFarmCollection) (ServerFarmCollection, error)) ServerFarmCollectionPage { 10107 return ServerFarmCollectionPage{ 10108 fn: getNextPage, 10109 sfc: cur, 10110 } 10111} 10112 10113// ServerFarmsCreateOrUpdateServerFarmFuture an abstraction for monitoring and retrieving the results of a 10114// long-running operation. 10115type ServerFarmsCreateOrUpdateServerFarmFuture struct { 10116 azure.FutureAPI 10117 // Result returns the result of the asynchronous operation. 10118 // If the operation has not completed it will return an error. 10119 Result func(ServerFarmsClient) (ServerFarmWithRichSku, error) 10120} 10121 10122// UnmarshalJSON is the custom unmarshaller for CreateFuture. 10123func (future *ServerFarmsCreateOrUpdateServerFarmFuture) UnmarshalJSON(body []byte) error { 10124 var azFuture azure.Future 10125 if err := json.Unmarshal(body, &azFuture); err != nil { 10126 return err 10127 } 10128 future.FutureAPI = &azFuture 10129 future.Result = future.result 10130 return nil 10131} 10132 10133// result is the default implementation for ServerFarmsCreateOrUpdateServerFarmFuture.Result. 10134func (future *ServerFarmsCreateOrUpdateServerFarmFuture) result(client ServerFarmsClient) (sfwrs ServerFarmWithRichSku, err error) { 10135 var done bool 10136 done, err = future.DoneWithContext(context.Background(), client) 10137 if err != nil { 10138 err = autorest.NewErrorWithError(err, "web.ServerFarmsCreateOrUpdateServerFarmFuture", "Result", future.Response(), "Polling failure") 10139 return 10140 } 10141 if !done { 10142 sfwrs.Response.Response = future.Response() 10143 err = azure.NewAsyncOpIncompleteError("web.ServerFarmsCreateOrUpdateServerFarmFuture") 10144 return 10145 } 10146 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 10147 if sfwrs.Response.Response, err = future.GetResult(sender); err == nil && sfwrs.Response.Response.StatusCode != http.StatusNoContent { 10148 sfwrs, err = client.CreateOrUpdateServerFarmResponder(sfwrs.Response.Response) 10149 if err != nil { 10150 err = autorest.NewErrorWithError(err, "web.ServerFarmsCreateOrUpdateServerFarmFuture", "Result", sfwrs.Response.Response, "Failure responding to request") 10151 } 10152 } 10153 return 10154} 10155 10156// ServerFarmWithRichSku app Service Plan Model 10157type ServerFarmWithRichSku struct { 10158 autorest.Response `json:"-"` 10159 *ServerFarmWithRichSkuProperties `json:"properties,omitempty"` 10160 Sku *SkuDescription `json:"sku,omitempty"` 10161 // ID - Resource Id 10162 ID *string `json:"id,omitempty"` 10163 // Name - Resource Name 10164 Name *string `json:"name,omitempty"` 10165 // Kind - Kind of resource 10166 Kind *string `json:"kind,omitempty"` 10167 // Location - Resource Location 10168 Location *string `json:"location,omitempty"` 10169 // Type - Resource type 10170 Type *string `json:"type,omitempty"` 10171 // Tags - Resource tags 10172 Tags map[string]*string `json:"tags"` 10173} 10174 10175// MarshalJSON is the custom marshaler for ServerFarmWithRichSku. 10176func (sfwrs ServerFarmWithRichSku) MarshalJSON() ([]byte, error) { 10177 objectMap := make(map[string]interface{}) 10178 if sfwrs.ServerFarmWithRichSkuProperties != nil { 10179 objectMap["properties"] = sfwrs.ServerFarmWithRichSkuProperties 10180 } 10181 if sfwrs.Sku != nil { 10182 objectMap["sku"] = sfwrs.Sku 10183 } 10184 if sfwrs.ID != nil { 10185 objectMap["id"] = sfwrs.ID 10186 } 10187 if sfwrs.Name != nil { 10188 objectMap["name"] = sfwrs.Name 10189 } 10190 if sfwrs.Kind != nil { 10191 objectMap["kind"] = sfwrs.Kind 10192 } 10193 if sfwrs.Location != nil { 10194 objectMap["location"] = sfwrs.Location 10195 } 10196 if sfwrs.Type != nil { 10197 objectMap["type"] = sfwrs.Type 10198 } 10199 if sfwrs.Tags != nil { 10200 objectMap["tags"] = sfwrs.Tags 10201 } 10202 return json.Marshal(objectMap) 10203} 10204 10205// UnmarshalJSON is the custom unmarshaler for ServerFarmWithRichSku struct. 10206func (sfwrs *ServerFarmWithRichSku) UnmarshalJSON(body []byte) error { 10207 var m map[string]*json.RawMessage 10208 err := json.Unmarshal(body, &m) 10209 if err != nil { 10210 return err 10211 } 10212 for k, v := range m { 10213 switch k { 10214 case "properties": 10215 if v != nil { 10216 var serverFarmWithRichSkuProperties ServerFarmWithRichSkuProperties 10217 err = json.Unmarshal(*v, &serverFarmWithRichSkuProperties) 10218 if err != nil { 10219 return err 10220 } 10221 sfwrs.ServerFarmWithRichSkuProperties = &serverFarmWithRichSkuProperties 10222 } 10223 case "sku": 10224 if v != nil { 10225 var sku SkuDescription 10226 err = json.Unmarshal(*v, &sku) 10227 if err != nil { 10228 return err 10229 } 10230 sfwrs.Sku = &sku 10231 } 10232 case "id": 10233 if v != nil { 10234 var ID string 10235 err = json.Unmarshal(*v, &ID) 10236 if err != nil { 10237 return err 10238 } 10239 sfwrs.ID = &ID 10240 } 10241 case "name": 10242 if v != nil { 10243 var name string 10244 err = json.Unmarshal(*v, &name) 10245 if err != nil { 10246 return err 10247 } 10248 sfwrs.Name = &name 10249 } 10250 case "kind": 10251 if v != nil { 10252 var kind string 10253 err = json.Unmarshal(*v, &kind) 10254 if err != nil { 10255 return err 10256 } 10257 sfwrs.Kind = &kind 10258 } 10259 case "location": 10260 if v != nil { 10261 var location string 10262 err = json.Unmarshal(*v, &location) 10263 if err != nil { 10264 return err 10265 } 10266 sfwrs.Location = &location 10267 } 10268 case "type": 10269 if v != nil { 10270 var typeVar string 10271 err = json.Unmarshal(*v, &typeVar) 10272 if err != nil { 10273 return err 10274 } 10275 sfwrs.Type = &typeVar 10276 } 10277 case "tags": 10278 if v != nil { 10279 var tags map[string]*string 10280 err = json.Unmarshal(*v, &tags) 10281 if err != nil { 10282 return err 10283 } 10284 sfwrs.Tags = tags 10285 } 10286 } 10287 } 10288 10289 return nil 10290} 10291 10292// ServerFarmWithRichSkuProperties ... 10293type ServerFarmWithRichSkuProperties struct { 10294 // Name - Name for the App Service Plan 10295 Name *string `json:"name,omitempty"` 10296 // WorkerTierName - Target worker tier assigned to the App Service Plan 10297 WorkerTierName *string `json:"workerTierName,omitempty"` 10298 // Status - READ-ONLY; App Service Plan Status. Possible values include: 'StatusOptionsReady', 'StatusOptionsPending' 10299 Status StatusOptions `json:"status,omitempty"` 10300 // Subscription - READ-ONLY; App Service Plan Subscription 10301 Subscription *string `json:"subscription,omitempty"` 10302 // AdminSiteName - App Service Plan administration site 10303 AdminSiteName *string `json:"adminSiteName,omitempty"` 10304 // HostingEnvironmentProfile - Specification for the hosting environment (App Service Environment) to use for the App Service Plan 10305 HostingEnvironmentProfile *HostingEnvironmentProfile `json:"hostingEnvironmentProfile,omitempty"` 10306 // MaximumNumberOfWorkers - Maximum number of instances that can be assigned to this App Service Plan 10307 MaximumNumberOfWorkers *int32 `json:"maximumNumberOfWorkers,omitempty"` 10308 // GeoRegion - READ-ONLY; Geographical location for the App Service Plan 10309 GeoRegion *string `json:"geoRegion,omitempty"` 10310 // PerSiteScaling - If True apps assigned to this App Service Plan can be scaled independently 10311 // If False apps assigned to this App Service Plan will scale to all instances of the plan 10312 PerSiteScaling *bool `json:"perSiteScaling,omitempty"` 10313 // NumberOfSites - READ-ONLY; Number of web apps assigned to this App Service Plan 10314 NumberOfSites *int32 `json:"numberOfSites,omitempty"` 10315 // ResourceGroup - READ-ONLY; Resource group of the server farm 10316 ResourceGroup *string `json:"resourceGroup,omitempty"` 10317 // Reserved - Enables creation of a Linux App Service Plan 10318 Reserved *bool `json:"reserved,omitempty"` 10319} 10320 10321// MarshalJSON is the custom marshaler for ServerFarmWithRichSkuProperties. 10322func (sfwrs ServerFarmWithRichSkuProperties) MarshalJSON() ([]byte, error) { 10323 objectMap := make(map[string]interface{}) 10324 if sfwrs.Name != nil { 10325 objectMap["name"] = sfwrs.Name 10326 } 10327 if sfwrs.WorkerTierName != nil { 10328 objectMap["workerTierName"] = sfwrs.WorkerTierName 10329 } 10330 if sfwrs.AdminSiteName != nil { 10331 objectMap["adminSiteName"] = sfwrs.AdminSiteName 10332 } 10333 if sfwrs.HostingEnvironmentProfile != nil { 10334 objectMap["hostingEnvironmentProfile"] = sfwrs.HostingEnvironmentProfile 10335 } 10336 if sfwrs.MaximumNumberOfWorkers != nil { 10337 objectMap["maximumNumberOfWorkers"] = sfwrs.MaximumNumberOfWorkers 10338 } 10339 if sfwrs.PerSiteScaling != nil { 10340 objectMap["perSiteScaling"] = sfwrs.PerSiteScaling 10341 } 10342 if sfwrs.Reserved != nil { 10343 objectMap["reserved"] = sfwrs.Reserved 10344 } 10345 return json.Marshal(objectMap) 10346} 10347 10348// SetObject ... 10349type SetObject struct { 10350 autorest.Response `json:"-"` 10351 Value interface{} `json:"value,omitempty"` 10352} 10353 10354// Site represents a web app 10355type Site struct { 10356 autorest.Response `json:"-"` 10357 *SiteProperties `json:"properties,omitempty"` 10358 // ID - Resource Id 10359 ID *string `json:"id,omitempty"` 10360 // Name - Resource Name 10361 Name *string `json:"name,omitempty"` 10362 // Kind - Kind of resource 10363 Kind *string `json:"kind,omitempty"` 10364 // Location - Resource Location 10365 Location *string `json:"location,omitempty"` 10366 // Type - Resource type 10367 Type *string `json:"type,omitempty"` 10368 // Tags - Resource tags 10369 Tags map[string]*string `json:"tags"` 10370} 10371 10372// MarshalJSON is the custom marshaler for Site. 10373func (s Site) MarshalJSON() ([]byte, error) { 10374 objectMap := make(map[string]interface{}) 10375 if s.SiteProperties != nil { 10376 objectMap["properties"] = s.SiteProperties 10377 } 10378 if s.ID != nil { 10379 objectMap["id"] = s.ID 10380 } 10381 if s.Name != nil { 10382 objectMap["name"] = s.Name 10383 } 10384 if s.Kind != nil { 10385 objectMap["kind"] = s.Kind 10386 } 10387 if s.Location != nil { 10388 objectMap["location"] = s.Location 10389 } 10390 if s.Type != nil { 10391 objectMap["type"] = s.Type 10392 } 10393 if s.Tags != nil { 10394 objectMap["tags"] = s.Tags 10395 } 10396 return json.Marshal(objectMap) 10397} 10398 10399// UnmarshalJSON is the custom unmarshaler for Site struct. 10400func (s *Site) UnmarshalJSON(body []byte) error { 10401 var m map[string]*json.RawMessage 10402 err := json.Unmarshal(body, &m) 10403 if err != nil { 10404 return err 10405 } 10406 for k, v := range m { 10407 switch k { 10408 case "properties": 10409 if v != nil { 10410 var siteProperties SiteProperties 10411 err = json.Unmarshal(*v, &siteProperties) 10412 if err != nil { 10413 return err 10414 } 10415 s.SiteProperties = &siteProperties 10416 } 10417 case "id": 10418 if v != nil { 10419 var ID string 10420 err = json.Unmarshal(*v, &ID) 10421 if err != nil { 10422 return err 10423 } 10424 s.ID = &ID 10425 } 10426 case "name": 10427 if v != nil { 10428 var name string 10429 err = json.Unmarshal(*v, &name) 10430 if err != nil { 10431 return err 10432 } 10433 s.Name = &name 10434 } 10435 case "kind": 10436 if v != nil { 10437 var kind string 10438 err = json.Unmarshal(*v, &kind) 10439 if err != nil { 10440 return err 10441 } 10442 s.Kind = &kind 10443 } 10444 case "location": 10445 if v != nil { 10446 var location string 10447 err = json.Unmarshal(*v, &location) 10448 if err != nil { 10449 return err 10450 } 10451 s.Location = &location 10452 } 10453 case "type": 10454 if v != nil { 10455 var typeVar string 10456 err = json.Unmarshal(*v, &typeVar) 10457 if err != nil { 10458 return err 10459 } 10460 s.Type = &typeVar 10461 } 10462 case "tags": 10463 if v != nil { 10464 var tags map[string]*string 10465 err = json.Unmarshal(*v, &tags) 10466 if err != nil { 10467 return err 10468 } 10469 s.Tags = tags 10470 } 10471 } 10472 } 10473 10474 return nil 10475} 10476 10477// SiteAuthSettings configuration settings for the Azure App Service Authentication / Authorization 10478// feature. 10479type SiteAuthSettings struct { 10480 autorest.Response `json:"-"` 10481 // Enabled - Gets or sets a value indicating whether the Authentication / Authorization feature is enabled for the current app. 10482 Enabled *bool `json:"enabled,omitempty"` 10483 // HTTPAPIPrefixPath - Gets or sets the relative path prefix used by platform HTTP APIs. 10484 // Changing this value is not recommended except for compatibility reasons. 10485 HTTPAPIPrefixPath *string `json:"httpApiPrefixPath,omitempty"` 10486 // UnauthenticatedClientAction - Gets or sets the action to take when an unauthenticated client attempts to access the app. Possible values include: 'RedirectToLoginPage', 'AllowAnonymous' 10487 UnauthenticatedClientAction UnauthenticatedClientAction `json:"unauthenticatedClientAction,omitempty"` 10488 // TokenStoreEnabled - Gets or sets a value indicating whether to durably store platform-specific security tokens 10489 // obtained during login flows. This capability is disabled by default. 10490 TokenStoreEnabled *bool `json:"tokenStoreEnabled,omitempty"` 10491 // AllowedExternalRedirectUrls - Gets or sets a collection of external URLs that can be redirected to as part of logging in 10492 // or logging out of the web app. Note that the query string part of the URL is ignored. 10493 // This is an advanced setting typically only needed by Windows Store application backends. 10494 // Note that URLs within the current domain are always implicitly allowed. 10495 AllowedExternalRedirectUrls *[]string `json:"allowedExternalRedirectUrls,omitempty"` 10496 // DefaultProvider - Gets or sets the default authentication provider to use when multiple providers are configured. 10497 // This setting is only needed if multiple providers are configured and the unauthenticated client 10498 // action is set to "RedirectToLoginPage". Possible values include: 'AzureActiveDirectory', 'Facebook', 'Google', 'MicrosoftAccount', 'Twitter' 10499 DefaultProvider BuiltInAuthenticationProvider `json:"defaultProvider,omitempty"` 10500 // TokenRefreshExtensionHours - Gets or sets the number of hours after session token expiration that a session token can be used to 10501 // call the token refresh API. The default is 72 hours. 10502 TokenRefreshExtensionHours *float64 `json:"tokenRefreshExtensionHours,omitempty"` 10503 // ClientID - Gets or sets the Client ID of this relying party application, known as the client_id. 10504 // This setting is required for enabling OpenID Connection authentication with Azure Active Directory or 10505 // other 3rd party OpenID Connect providers. 10506 // More information on OpenID Connect: http://openid.net/specs/openid-connect-core-1_0.html 10507 ClientID *string `json:"clientId,omitempty"` 10508 // ClientSecret - Gets or sets the Client Secret of this relying party application (in Azure Active Directory, this is also referred to as the Key). 10509 // This setting is optional. If no client secret is configured, the OpenID Connect implicit auth flow is used to authenticate end users. 10510 // Otherwise, the OpenID Connect Authorization Code Flow is used to authenticate end users. 10511 // More information on OpenID Connect: http://openid.net/specs/openid-connect-core-1_0.html 10512 ClientSecret *string `json:"clientSecret,omitempty"` 10513 // Issuer - Gets or sets the OpenID Connect Issuer URI that represents the entity which issues access tokens for this application. 10514 // When using Azure Active Directory, this value is the URI of the directory tenant, e.g. https://sts.windows.net/{tenant-guid}/. 10515 // This URI is a case-sensitive identifier for the token issuer. 10516 // More information on OpenID Connect Discovery: http://openid.net/specs/openid-connect-discovery-1_0.html 10517 Issuer *string `json:"issuer,omitempty"` 10518 // AllowedAudiences - Gets or sets a list of allowed audience values to consider when validating JWTs issued by 10519 // Azure Active Directory. Note that the {Microsoft.Web.Hosting.Administration.SiteAuthSettings.ClientId} value is always considered an 10520 // allowed audience, regardless of this setting. 10521 AllowedAudiences *[]string `json:"allowedAudiences,omitempty"` 10522 // AdditionalLoginParams - Gets or sets a list of login parameters to send to the OpenID Connect authorization endpoint when 10523 // a user logs in. Each parameter must be in the form "key=value". 10524 AdditionalLoginParams *[]string `json:"additionalLoginParams,omitempty"` 10525 AadClientID *string `json:"aadClientId,omitempty"` 10526 OpenIDIssuer *string `json:"openIdIssuer,omitempty"` 10527 // GoogleClientID - Gets or sets the OpenID Connect Client ID for the Google web application. 10528 // This setting is required for enabling Google Sign-In. 10529 // Google Sign-In documentation: https://developers.google.com/identity/sign-in/web/ 10530 GoogleClientID *string `json:"googleClientId,omitempty"` 10531 // GoogleClientSecret - Gets or sets the client secret associated with the Google web application. 10532 // This setting is required for enabling Google Sign-In. 10533 // Google Sign-In documentation: https://developers.google.com/identity/sign-in/web/ 10534 GoogleClientSecret *string `json:"googleClientSecret,omitempty"` 10535 // GoogleOAuthScopes - Gets or sets the OAuth 2.0 scopes that will be requested as part of Google Sign-In authentication. 10536 // This setting is optional. If not specified, "openid", "profile", and "email" are used as default scopes. 10537 // Google Sign-In documentation: https://developers.google.com/identity/sign-in/web/ 10538 GoogleOAuthScopes *[]string `json:"googleOAuthScopes,omitempty"` 10539 // FacebookAppID - Gets or sets the App ID of the Facebook app used for login. 10540 // This setting is required for enabling Facebook Login. 10541 // Facebook Login documentation: https://developers.facebook.com/docs/facebook-login 10542 FacebookAppID *string `json:"facebookAppId,omitempty"` 10543 // FacebookAppSecret - Gets or sets the App Secret of the Facebook app used for Facebook Login. 10544 // This setting is required for enabling Facebook Login. 10545 // Facebook Login documentation: https://developers.facebook.com/docs/facebook-login 10546 FacebookAppSecret *string `json:"facebookAppSecret,omitempty"` 10547 // FacebookOAuthScopes - Gets or sets the OAuth 2.0 scopes that will be requested as part of Facebook Login authentication. 10548 // This setting is optional. 10549 // Facebook Login documentation: https://developers.facebook.com/docs/facebook-login 10550 FacebookOAuthScopes *[]string `json:"facebookOAuthScopes,omitempty"` 10551 // TwitterConsumerKey - Gets or sets the OAuth 1.0a consumer key of the Twitter application used for sign-in. 10552 // This setting is required for enabling Twitter Sign-In. 10553 // Twitter Sign-In documentation: https://dev.twitter.com/web/sign-in 10554 TwitterConsumerKey *string `json:"twitterConsumerKey,omitempty"` 10555 // TwitterConsumerSecret - Gets or sets the OAuth 1.0a consumer secret of the Twitter application used for sign-in. 10556 // This setting is required for enabling Twitter Sign-In. 10557 // Twitter Sign-In documentation: https://dev.twitter.com/web/sign-in 10558 TwitterConsumerSecret *string `json:"twitterConsumerSecret,omitempty"` 10559 // MicrosoftAccountClientID - Gets or sets the OAuth 2.0 client ID that was created for the app used for authentication. 10560 // This setting is required for enabling Microsoft Account authentication. 10561 // Microsoft Account OAuth documentation: https://dev.onedrive.com/auth/msa_oauth.htm 10562 MicrosoftAccountClientID *string `json:"microsoftAccountClientId,omitempty"` 10563 // MicrosoftAccountClientSecret - Gets or sets the OAuth 2.0 client secret that was created for the app used for authentication. 10564 // This setting is required for enabling Microsoft Account authentication. 10565 // Microsoft Account OAuth documentation: https://dev.onedrive.com/auth/msa_oauth.htm 10566 MicrosoftAccountClientSecret *string `json:"microsoftAccountClientSecret,omitempty"` 10567 // MicrosoftAccountOAuthScopes - Gets or sets the OAuth 2.0 scopes that will be requested as part of Microsoft Account authentication. 10568 // This setting is optional. If not specified, "wl.basic" is used as the default scope. 10569 // Microsoft Account Scopes and permissions documentation: https://msdn.microsoft.com/en-us/library/dn631845.aspx 10570 MicrosoftAccountOAuthScopes *[]string `json:"microsoftAccountOAuthScopes,omitempty"` 10571} 10572 10573// SiteCloneability represents whether or not a web app is cloneable 10574type SiteCloneability struct { 10575 autorest.Response `json:"-"` 10576 // Result - Name of web app. Possible values include: 'Cloneable', 'PartiallyCloneable', 'NotCloneable' 10577 Result CloneAbilityResult `json:"result,omitempty"` 10578 // BlockingFeatures - List of features enabled on web app that prevent cloning 10579 BlockingFeatures *[]SiteCloneabilityCriterion `json:"blockingFeatures,omitempty"` 10580 // UnsupportedFeatures - List of features enabled on web app that are non-blocking but cannot be cloned. The web app can still be cloned 10581 // but the features in this list will not be set up on cloned web app. 10582 UnsupportedFeatures *[]SiteCloneabilityCriterion `json:"unsupportedFeatures,omitempty"` 10583 // BlockingCharacteristics - List of blocking application characteristics 10584 BlockingCharacteristics *[]SiteCloneabilityCriterion `json:"blockingCharacteristics,omitempty"` 10585} 10586 10587// SiteCloneabilityCriterion represents a site cloneability criterion 10588type SiteCloneabilityCriterion struct { 10589 // Name - Name of criterion 10590 Name *string `json:"name,omitempty"` 10591 // Description - Description of criterion 10592 Description *string `json:"description,omitempty"` 10593} 10594 10595// SiteCollection collection of sites 10596type SiteCollection struct { 10597 autorest.Response `json:"-"` 10598 // Value - Collection of resources 10599 Value *[]Site `json:"value,omitempty"` 10600 // NextLink - Link to next page of resources 10601 NextLink *string `json:"nextLink,omitempty"` 10602} 10603 10604// SiteCollectionIterator provides access to a complete listing of Site values. 10605type SiteCollectionIterator struct { 10606 i int 10607 page SiteCollectionPage 10608} 10609 10610// NextWithContext advances to the next value. If there was an error making 10611// the request the iterator does not advance and the error is returned. 10612func (iter *SiteCollectionIterator) NextWithContext(ctx context.Context) (err error) { 10613 if tracing.IsEnabled() { 10614 ctx = tracing.StartSpan(ctx, fqdn+"/SiteCollectionIterator.NextWithContext") 10615 defer func() { 10616 sc := -1 10617 if iter.Response().Response.Response != nil { 10618 sc = iter.Response().Response.Response.StatusCode 10619 } 10620 tracing.EndSpan(ctx, sc, err) 10621 }() 10622 } 10623 iter.i++ 10624 if iter.i < len(iter.page.Values()) { 10625 return nil 10626 } 10627 err = iter.page.NextWithContext(ctx) 10628 if err != nil { 10629 iter.i-- 10630 return err 10631 } 10632 iter.i = 0 10633 return nil 10634} 10635 10636// Next advances to the next value. If there was an error making 10637// the request the iterator does not advance and the error is returned. 10638// Deprecated: Use NextWithContext() instead. 10639func (iter *SiteCollectionIterator) Next() error { 10640 return iter.NextWithContext(context.Background()) 10641} 10642 10643// NotDone returns true if the enumeration should be started or is not yet complete. 10644func (iter SiteCollectionIterator) NotDone() bool { 10645 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 10646} 10647 10648// Response returns the raw server response from the last page request. 10649func (iter SiteCollectionIterator) Response() SiteCollection { 10650 return iter.page.Response() 10651} 10652 10653// Value returns the current value or a zero-initialized value if the 10654// iterator has advanced beyond the end of the collection. 10655func (iter SiteCollectionIterator) Value() Site { 10656 if !iter.page.NotDone() { 10657 return Site{} 10658 } 10659 return iter.page.Values()[iter.i] 10660} 10661 10662// Creates a new instance of the SiteCollectionIterator type. 10663func NewSiteCollectionIterator(page SiteCollectionPage) SiteCollectionIterator { 10664 return SiteCollectionIterator{page: page} 10665} 10666 10667// IsEmpty returns true if the ListResult contains no values. 10668func (sc SiteCollection) IsEmpty() bool { 10669 return sc.Value == nil || len(*sc.Value) == 0 10670} 10671 10672// hasNextLink returns true if the NextLink is not empty. 10673func (sc SiteCollection) hasNextLink() bool { 10674 return sc.NextLink != nil && len(*sc.NextLink) != 0 10675} 10676 10677// siteCollectionPreparer prepares a request to retrieve the next set of results. 10678// It returns nil if no more results exist. 10679func (sc SiteCollection) siteCollectionPreparer(ctx context.Context) (*http.Request, error) { 10680 if !sc.hasNextLink() { 10681 return nil, nil 10682 } 10683 return autorest.Prepare((&http.Request{}).WithContext(ctx), 10684 autorest.AsJSON(), 10685 autorest.AsGet(), 10686 autorest.WithBaseURL(to.String(sc.NextLink))) 10687} 10688 10689// SiteCollectionPage contains a page of Site values. 10690type SiteCollectionPage struct { 10691 fn func(context.Context, SiteCollection) (SiteCollection, error) 10692 sc SiteCollection 10693} 10694 10695// NextWithContext advances to the next page of values. If there was an error making 10696// the request the page does not advance and the error is returned. 10697func (page *SiteCollectionPage) NextWithContext(ctx context.Context) (err error) { 10698 if tracing.IsEnabled() { 10699 ctx = tracing.StartSpan(ctx, fqdn+"/SiteCollectionPage.NextWithContext") 10700 defer func() { 10701 sc := -1 10702 if page.Response().Response.Response != nil { 10703 sc = page.Response().Response.Response.StatusCode 10704 } 10705 tracing.EndSpan(ctx, sc, err) 10706 }() 10707 } 10708 for { 10709 next, err := page.fn(ctx, page.sc) 10710 if err != nil { 10711 return err 10712 } 10713 page.sc = next 10714 if !next.hasNextLink() || !next.IsEmpty() { 10715 break 10716 } 10717 } 10718 return nil 10719} 10720 10721// Next advances to the next page of values. If there was an error making 10722// the request the page does not advance and the error is returned. 10723// Deprecated: Use NextWithContext() instead. 10724func (page *SiteCollectionPage) Next() error { 10725 return page.NextWithContext(context.Background()) 10726} 10727 10728// NotDone returns true if the page enumeration should be started or is not yet complete. 10729func (page SiteCollectionPage) NotDone() bool { 10730 return !page.sc.IsEmpty() 10731} 10732 10733// Response returns the raw server response from the last page request. 10734func (page SiteCollectionPage) Response() SiteCollection { 10735 return page.sc 10736} 10737 10738// Values returns the slice of values for the current page or nil if there are no values. 10739func (page SiteCollectionPage) Values() []Site { 10740 if page.sc.IsEmpty() { 10741 return nil 10742 } 10743 return *page.sc.Value 10744} 10745 10746// Creates a new instance of the SiteCollectionPage type. 10747func NewSiteCollectionPage(cur SiteCollection, getNextPage func(context.Context, SiteCollection) (SiteCollection, error)) SiteCollectionPage { 10748 return SiteCollectionPage{ 10749 fn: getNextPage, 10750 sc: cur, 10751 } 10752} 10753 10754// SiteConfig configuration of Azure web site 10755type SiteConfig struct { 10756 autorest.Response `json:"-"` 10757 *SiteConfigProperties `json:"properties,omitempty"` 10758 // ID - Resource Id 10759 ID *string `json:"id,omitempty"` 10760 // Name - Resource Name 10761 Name *string `json:"name,omitempty"` 10762 // Kind - Kind of resource 10763 Kind *string `json:"kind,omitempty"` 10764 // Location - Resource Location 10765 Location *string `json:"location,omitempty"` 10766 // Type - Resource type 10767 Type *string `json:"type,omitempty"` 10768 // Tags - Resource tags 10769 Tags map[string]*string `json:"tags"` 10770} 10771 10772// MarshalJSON is the custom marshaler for SiteConfig. 10773func (sc SiteConfig) MarshalJSON() ([]byte, error) { 10774 objectMap := make(map[string]interface{}) 10775 if sc.SiteConfigProperties != nil { 10776 objectMap["properties"] = sc.SiteConfigProperties 10777 } 10778 if sc.ID != nil { 10779 objectMap["id"] = sc.ID 10780 } 10781 if sc.Name != nil { 10782 objectMap["name"] = sc.Name 10783 } 10784 if sc.Kind != nil { 10785 objectMap["kind"] = sc.Kind 10786 } 10787 if sc.Location != nil { 10788 objectMap["location"] = sc.Location 10789 } 10790 if sc.Type != nil { 10791 objectMap["type"] = sc.Type 10792 } 10793 if sc.Tags != nil { 10794 objectMap["tags"] = sc.Tags 10795 } 10796 return json.Marshal(objectMap) 10797} 10798 10799// UnmarshalJSON is the custom unmarshaler for SiteConfig struct. 10800func (sc *SiteConfig) UnmarshalJSON(body []byte) error { 10801 var m map[string]*json.RawMessage 10802 err := json.Unmarshal(body, &m) 10803 if err != nil { 10804 return err 10805 } 10806 for k, v := range m { 10807 switch k { 10808 case "properties": 10809 if v != nil { 10810 var siteConfigProperties SiteConfigProperties 10811 err = json.Unmarshal(*v, &siteConfigProperties) 10812 if err != nil { 10813 return err 10814 } 10815 sc.SiteConfigProperties = &siteConfigProperties 10816 } 10817 case "id": 10818 if v != nil { 10819 var ID string 10820 err = json.Unmarshal(*v, &ID) 10821 if err != nil { 10822 return err 10823 } 10824 sc.ID = &ID 10825 } 10826 case "name": 10827 if v != nil { 10828 var name string 10829 err = json.Unmarshal(*v, &name) 10830 if err != nil { 10831 return err 10832 } 10833 sc.Name = &name 10834 } 10835 case "kind": 10836 if v != nil { 10837 var kind string 10838 err = json.Unmarshal(*v, &kind) 10839 if err != nil { 10840 return err 10841 } 10842 sc.Kind = &kind 10843 } 10844 case "location": 10845 if v != nil { 10846 var location string 10847 err = json.Unmarshal(*v, &location) 10848 if err != nil { 10849 return err 10850 } 10851 sc.Location = &location 10852 } 10853 case "type": 10854 if v != nil { 10855 var typeVar string 10856 err = json.Unmarshal(*v, &typeVar) 10857 if err != nil { 10858 return err 10859 } 10860 sc.Type = &typeVar 10861 } 10862 case "tags": 10863 if v != nil { 10864 var tags map[string]*string 10865 err = json.Unmarshal(*v, &tags) 10866 if err != nil { 10867 return err 10868 } 10869 sc.Tags = tags 10870 } 10871 } 10872 } 10873 10874 return nil 10875} 10876 10877// SiteConfigProperties ... 10878type SiteConfigProperties struct { 10879 // NumberOfWorkers - Number of workers 10880 NumberOfWorkers *int32 `json:"numberOfWorkers,omitempty"` 10881 // DefaultDocuments - Default documents 10882 DefaultDocuments *[]string `json:"defaultDocuments,omitempty"` 10883 // NetFrameworkVersion - Net Framework Version 10884 NetFrameworkVersion *string `json:"netFrameworkVersion,omitempty"` 10885 // PhpVersion - Version of PHP 10886 PhpVersion *string `json:"phpVersion,omitempty"` 10887 // PythonVersion - Version of Python 10888 PythonVersion *string `json:"pythonVersion,omitempty"` 10889 // NodeVersion - Version of Node 10890 NodeVersion *string `json:"nodeVersion,omitempty"` 10891 // RequestTracingEnabled - Enable request tracing 10892 RequestTracingEnabled *bool `json:"requestTracingEnabled,omitempty"` 10893 // RequestTracingExpirationTime - Request tracing expiration time 10894 RequestTracingExpirationTime *date.Time `json:"requestTracingExpirationTime,omitempty"` 10895 // RemoteDebuggingEnabled - Remote Debugging Enabled 10896 RemoteDebuggingEnabled *bool `json:"remoteDebuggingEnabled,omitempty"` 10897 // RemoteDebuggingVersion - Remote Debugging Version 10898 RemoteDebuggingVersion *string `json:"remoteDebuggingVersion,omitempty"` 10899 // HTTPLoggingEnabled - HTTP logging Enabled 10900 HTTPLoggingEnabled *bool `json:"httpLoggingEnabled,omitempty"` 10901 // LogsDirectorySizeLimit - HTTP Logs Directory size limit 10902 LogsDirectorySizeLimit *int32 `json:"logsDirectorySizeLimit,omitempty"` 10903 // DetailedErrorLoggingEnabled - Detailed error logging enabled 10904 DetailedErrorLoggingEnabled *bool `json:"detailedErrorLoggingEnabled,omitempty"` 10905 // PublishingUsername - Publishing user name 10906 PublishingUsername *string `json:"publishingUsername,omitempty"` 10907 // PublishingPassword - Publishing password 10908 PublishingPassword *string `json:"publishingPassword,omitempty"` 10909 // AppSettings - Application Settings 10910 AppSettings *[]NameValuePair `json:"appSettings,omitempty"` 10911 // Metadata - Site Metadata 10912 Metadata *[]NameValuePair `json:"metadata,omitempty"` 10913 // ConnectionStrings - Connection strings 10914 ConnectionStrings *[]ConnStringInfo `json:"connectionStrings,omitempty"` 10915 // HandlerMappings - Handler mappings 10916 HandlerMappings *[]HandlerMapping `json:"handlerMappings,omitempty"` 10917 // DocumentRoot - Document root 10918 DocumentRoot *string `json:"documentRoot,omitempty"` 10919 // ScmType - SCM type 10920 ScmType *string `json:"scmType,omitempty"` 10921 // Use32BitWorkerProcess - Use 32 bit worker process 10922 Use32BitWorkerProcess *bool `json:"use32BitWorkerProcess,omitempty"` 10923 // WebSocketsEnabled - Web socket enabled. 10924 WebSocketsEnabled *bool `json:"webSocketsEnabled,omitempty"` 10925 // AlwaysOn - Always On 10926 AlwaysOn *bool `json:"alwaysOn,omitempty"` 10927 // JavaVersion - Java version 10928 JavaVersion *string `json:"javaVersion,omitempty"` 10929 // JavaContainer - Java container 10930 JavaContainer *string `json:"javaContainer,omitempty"` 10931 // JavaContainerVersion - Java container version 10932 JavaContainerVersion *string `json:"javaContainerVersion,omitempty"` 10933 // AppCommandLine - App Command Line to launch 10934 AppCommandLine *string `json:"appCommandLine,omitempty"` 10935 // ManagedPipelineMode - Managed pipeline mode. Possible values include: 'Integrated', 'Classic' 10936 ManagedPipelineMode ManagedPipelineMode `json:"managedPipelineMode,omitempty"` 10937 // VirtualApplications - Virtual applications 10938 VirtualApplications *[]VirtualApplication `json:"virtualApplications,omitempty"` 10939 // LoadBalancing - Site load balancing. Possible values include: 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', 'WeightedTotalTraffic', 'RequestHash' 10940 LoadBalancing SiteLoadBalancing `json:"loadBalancing,omitempty"` 10941 // Experiments - This is work around for polymorphic types 10942 Experiments *Experiments `json:"experiments,omitempty"` 10943 // Limits - Site limits 10944 Limits *SiteLimits `json:"limits,omitempty"` 10945 // AutoHealEnabled - Auto heal enabled 10946 AutoHealEnabled *bool `json:"autoHealEnabled,omitempty"` 10947 // AutoHealRules - Auto heal rules 10948 AutoHealRules *AutoHealRules `json:"autoHealRules,omitempty"` 10949 // TracingOptions - Tracing options 10950 TracingOptions *string `json:"tracingOptions,omitempty"` 10951 // VnetName - Vnet name 10952 VnetName *string `json:"vnetName,omitempty"` 10953 // Cors - Cross-Origin Resource Sharing (CORS) settings. 10954 Cors *CorsSettings `json:"cors,omitempty"` 10955 // APIDefinition - Information about the formal API definition for the web app. 10956 APIDefinition *APIDefinitionInfo `json:"apiDefinition,omitempty"` 10957 // AutoSwapSlotName - Auto swap slot name 10958 AutoSwapSlotName *string `json:"autoSwapSlotName,omitempty"` 10959 // LocalMySQLEnabled - Local mysql enabled 10960 LocalMySQLEnabled *bool `json:"localMySqlEnabled,omitempty"` 10961 // IPSecurityRestrictions - Ip Security restrictions 10962 IPSecurityRestrictions *[]IPSecurityRestriction `json:"ipSecurityRestrictions,omitempty"` 10963} 10964 10965// SiteInstance instance of a web app 10966type SiteInstance struct { 10967 *SiteInstanceProperties `json:"properties,omitempty"` 10968 // ID - Resource Id 10969 ID *string `json:"id,omitempty"` 10970 // Name - Resource Name 10971 Name *string `json:"name,omitempty"` 10972 // Kind - Kind of resource 10973 Kind *string `json:"kind,omitempty"` 10974 // Location - Resource Location 10975 Location *string `json:"location,omitempty"` 10976 // Type - Resource type 10977 Type *string `json:"type,omitempty"` 10978 // Tags - Resource tags 10979 Tags map[string]*string `json:"tags"` 10980} 10981 10982// MarshalJSON is the custom marshaler for SiteInstance. 10983func (si SiteInstance) MarshalJSON() ([]byte, error) { 10984 objectMap := make(map[string]interface{}) 10985 if si.SiteInstanceProperties != nil { 10986 objectMap["properties"] = si.SiteInstanceProperties 10987 } 10988 if si.ID != nil { 10989 objectMap["id"] = si.ID 10990 } 10991 if si.Name != nil { 10992 objectMap["name"] = si.Name 10993 } 10994 if si.Kind != nil { 10995 objectMap["kind"] = si.Kind 10996 } 10997 if si.Location != nil { 10998 objectMap["location"] = si.Location 10999 } 11000 if si.Type != nil { 11001 objectMap["type"] = si.Type 11002 } 11003 if si.Tags != nil { 11004 objectMap["tags"] = si.Tags 11005 } 11006 return json.Marshal(objectMap) 11007} 11008 11009// UnmarshalJSON is the custom unmarshaler for SiteInstance struct. 11010func (si *SiteInstance) UnmarshalJSON(body []byte) error { 11011 var m map[string]*json.RawMessage 11012 err := json.Unmarshal(body, &m) 11013 if err != nil { 11014 return err 11015 } 11016 for k, v := range m { 11017 switch k { 11018 case "properties": 11019 if v != nil { 11020 var siteInstanceProperties SiteInstanceProperties 11021 err = json.Unmarshal(*v, &siteInstanceProperties) 11022 if err != nil { 11023 return err 11024 } 11025 si.SiteInstanceProperties = &siteInstanceProperties 11026 } 11027 case "id": 11028 if v != nil { 11029 var ID string 11030 err = json.Unmarshal(*v, &ID) 11031 if err != nil { 11032 return err 11033 } 11034 si.ID = &ID 11035 } 11036 case "name": 11037 if v != nil { 11038 var name string 11039 err = json.Unmarshal(*v, &name) 11040 if err != nil { 11041 return err 11042 } 11043 si.Name = &name 11044 } 11045 case "kind": 11046 if v != nil { 11047 var kind string 11048 err = json.Unmarshal(*v, &kind) 11049 if err != nil { 11050 return err 11051 } 11052 si.Kind = &kind 11053 } 11054 case "location": 11055 if v != nil { 11056 var location string 11057 err = json.Unmarshal(*v, &location) 11058 if err != nil { 11059 return err 11060 } 11061 si.Location = &location 11062 } 11063 case "type": 11064 if v != nil { 11065 var typeVar string 11066 err = json.Unmarshal(*v, &typeVar) 11067 if err != nil { 11068 return err 11069 } 11070 si.Type = &typeVar 11071 } 11072 case "tags": 11073 if v != nil { 11074 var tags map[string]*string 11075 err = json.Unmarshal(*v, &tags) 11076 if err != nil { 11077 return err 11078 } 11079 si.Tags = tags 11080 } 11081 } 11082 } 11083 11084 return nil 11085} 11086 11087// SiteInstanceCollection collection of site instances 11088type SiteInstanceCollection struct { 11089 autorest.Response `json:"-"` 11090 // Value - Collection of resources 11091 Value *[]SiteInstance `json:"value,omitempty"` 11092 // NextLink - Link to next page of resources 11093 NextLink *string `json:"nextLink,omitempty"` 11094} 11095 11096// SiteInstanceCollectionIterator provides access to a complete listing of SiteInstance values. 11097type SiteInstanceCollectionIterator struct { 11098 i int 11099 page SiteInstanceCollectionPage 11100} 11101 11102// NextWithContext advances to the next value. If there was an error making 11103// the request the iterator does not advance and the error is returned. 11104func (iter *SiteInstanceCollectionIterator) NextWithContext(ctx context.Context) (err error) { 11105 if tracing.IsEnabled() { 11106 ctx = tracing.StartSpan(ctx, fqdn+"/SiteInstanceCollectionIterator.NextWithContext") 11107 defer func() { 11108 sc := -1 11109 if iter.Response().Response.Response != nil { 11110 sc = iter.Response().Response.Response.StatusCode 11111 } 11112 tracing.EndSpan(ctx, sc, err) 11113 }() 11114 } 11115 iter.i++ 11116 if iter.i < len(iter.page.Values()) { 11117 return nil 11118 } 11119 err = iter.page.NextWithContext(ctx) 11120 if err != nil { 11121 iter.i-- 11122 return err 11123 } 11124 iter.i = 0 11125 return nil 11126} 11127 11128// Next advances to the next value. If there was an error making 11129// the request the iterator does not advance and the error is returned. 11130// Deprecated: Use NextWithContext() instead. 11131func (iter *SiteInstanceCollectionIterator) Next() error { 11132 return iter.NextWithContext(context.Background()) 11133} 11134 11135// NotDone returns true if the enumeration should be started or is not yet complete. 11136func (iter SiteInstanceCollectionIterator) NotDone() bool { 11137 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 11138} 11139 11140// Response returns the raw server response from the last page request. 11141func (iter SiteInstanceCollectionIterator) Response() SiteInstanceCollection { 11142 return iter.page.Response() 11143} 11144 11145// Value returns the current value or a zero-initialized value if the 11146// iterator has advanced beyond the end of the collection. 11147func (iter SiteInstanceCollectionIterator) Value() SiteInstance { 11148 if !iter.page.NotDone() { 11149 return SiteInstance{} 11150 } 11151 return iter.page.Values()[iter.i] 11152} 11153 11154// Creates a new instance of the SiteInstanceCollectionIterator type. 11155func NewSiteInstanceCollectionIterator(page SiteInstanceCollectionPage) SiteInstanceCollectionIterator { 11156 return SiteInstanceCollectionIterator{page: page} 11157} 11158 11159// IsEmpty returns true if the ListResult contains no values. 11160func (sic SiteInstanceCollection) IsEmpty() bool { 11161 return sic.Value == nil || len(*sic.Value) == 0 11162} 11163 11164// hasNextLink returns true if the NextLink is not empty. 11165func (sic SiteInstanceCollection) hasNextLink() bool { 11166 return sic.NextLink != nil && len(*sic.NextLink) != 0 11167} 11168 11169// siteInstanceCollectionPreparer prepares a request to retrieve the next set of results. 11170// It returns nil if no more results exist. 11171func (sic SiteInstanceCollection) siteInstanceCollectionPreparer(ctx context.Context) (*http.Request, error) { 11172 if !sic.hasNextLink() { 11173 return nil, nil 11174 } 11175 return autorest.Prepare((&http.Request{}).WithContext(ctx), 11176 autorest.AsJSON(), 11177 autorest.AsGet(), 11178 autorest.WithBaseURL(to.String(sic.NextLink))) 11179} 11180 11181// SiteInstanceCollectionPage contains a page of SiteInstance values. 11182type SiteInstanceCollectionPage struct { 11183 fn func(context.Context, SiteInstanceCollection) (SiteInstanceCollection, error) 11184 sic SiteInstanceCollection 11185} 11186 11187// NextWithContext advances to the next page of values. If there was an error making 11188// the request the page does not advance and the error is returned. 11189func (page *SiteInstanceCollectionPage) NextWithContext(ctx context.Context) (err error) { 11190 if tracing.IsEnabled() { 11191 ctx = tracing.StartSpan(ctx, fqdn+"/SiteInstanceCollectionPage.NextWithContext") 11192 defer func() { 11193 sc := -1 11194 if page.Response().Response.Response != nil { 11195 sc = page.Response().Response.Response.StatusCode 11196 } 11197 tracing.EndSpan(ctx, sc, err) 11198 }() 11199 } 11200 for { 11201 next, err := page.fn(ctx, page.sic) 11202 if err != nil { 11203 return err 11204 } 11205 page.sic = next 11206 if !next.hasNextLink() || !next.IsEmpty() { 11207 break 11208 } 11209 } 11210 return nil 11211} 11212 11213// Next advances to the next page of values. If there was an error making 11214// the request the page does not advance and the error is returned. 11215// Deprecated: Use NextWithContext() instead. 11216func (page *SiteInstanceCollectionPage) Next() error { 11217 return page.NextWithContext(context.Background()) 11218} 11219 11220// NotDone returns true if the page enumeration should be started or is not yet complete. 11221func (page SiteInstanceCollectionPage) NotDone() bool { 11222 return !page.sic.IsEmpty() 11223} 11224 11225// Response returns the raw server response from the last page request. 11226func (page SiteInstanceCollectionPage) Response() SiteInstanceCollection { 11227 return page.sic 11228} 11229 11230// Values returns the slice of values for the current page or nil if there are no values. 11231func (page SiteInstanceCollectionPage) Values() []SiteInstance { 11232 if page.sic.IsEmpty() { 11233 return nil 11234 } 11235 return *page.sic.Value 11236} 11237 11238// Creates a new instance of the SiteInstanceCollectionPage type. 11239func NewSiteInstanceCollectionPage(cur SiteInstanceCollection, getNextPage func(context.Context, SiteInstanceCollection) (SiteInstanceCollection, error)) SiteInstanceCollectionPage { 11240 return SiteInstanceCollectionPage{ 11241 fn: getNextPage, 11242 sic: cur, 11243 } 11244} 11245 11246// SiteInstanceProperties ... 11247type SiteInstanceProperties struct { 11248 // Name - Name of instance 11249 Name *string `json:"name,omitempty"` 11250} 11251 11252// SiteLimits represents metric limits set on a web app. 11253type SiteLimits struct { 11254 // MaxPercentageCPU - Maximum allowed CPU usage percentage 11255 MaxPercentageCPU *float64 `json:"maxPercentageCpu,omitempty"` 11256 // MaxMemoryInMb - Maximum allowed memory usage in MB 11257 MaxMemoryInMb *int64 `json:"maxMemoryInMb,omitempty"` 11258 // MaxDiskSizeInMb - Maximum allowed disk size usage in MB 11259 MaxDiskSizeInMb *int64 `json:"maxDiskSizeInMb,omitempty"` 11260} 11261 11262// SiteLogsConfig configuration of Azure web site 11263type SiteLogsConfig struct { 11264 autorest.Response `json:"-"` 11265 *SiteLogsConfigProperties `json:"properties,omitempty"` 11266 // ID - Resource Id 11267 ID *string `json:"id,omitempty"` 11268 // Name - Resource Name 11269 Name *string `json:"name,omitempty"` 11270 // Kind - Kind of resource 11271 Kind *string `json:"kind,omitempty"` 11272 // Location - Resource Location 11273 Location *string `json:"location,omitempty"` 11274 // Type - Resource type 11275 Type *string `json:"type,omitempty"` 11276 // Tags - Resource tags 11277 Tags map[string]*string `json:"tags"` 11278} 11279 11280// MarshalJSON is the custom marshaler for SiteLogsConfig. 11281func (slc SiteLogsConfig) MarshalJSON() ([]byte, error) { 11282 objectMap := make(map[string]interface{}) 11283 if slc.SiteLogsConfigProperties != nil { 11284 objectMap["properties"] = slc.SiteLogsConfigProperties 11285 } 11286 if slc.ID != nil { 11287 objectMap["id"] = slc.ID 11288 } 11289 if slc.Name != nil { 11290 objectMap["name"] = slc.Name 11291 } 11292 if slc.Kind != nil { 11293 objectMap["kind"] = slc.Kind 11294 } 11295 if slc.Location != nil { 11296 objectMap["location"] = slc.Location 11297 } 11298 if slc.Type != nil { 11299 objectMap["type"] = slc.Type 11300 } 11301 if slc.Tags != nil { 11302 objectMap["tags"] = slc.Tags 11303 } 11304 return json.Marshal(objectMap) 11305} 11306 11307// UnmarshalJSON is the custom unmarshaler for SiteLogsConfig struct. 11308func (slc *SiteLogsConfig) UnmarshalJSON(body []byte) error { 11309 var m map[string]*json.RawMessage 11310 err := json.Unmarshal(body, &m) 11311 if err != nil { 11312 return err 11313 } 11314 for k, v := range m { 11315 switch k { 11316 case "properties": 11317 if v != nil { 11318 var siteLogsConfigProperties SiteLogsConfigProperties 11319 err = json.Unmarshal(*v, &siteLogsConfigProperties) 11320 if err != nil { 11321 return err 11322 } 11323 slc.SiteLogsConfigProperties = &siteLogsConfigProperties 11324 } 11325 case "id": 11326 if v != nil { 11327 var ID string 11328 err = json.Unmarshal(*v, &ID) 11329 if err != nil { 11330 return err 11331 } 11332 slc.ID = &ID 11333 } 11334 case "name": 11335 if v != nil { 11336 var name string 11337 err = json.Unmarshal(*v, &name) 11338 if err != nil { 11339 return err 11340 } 11341 slc.Name = &name 11342 } 11343 case "kind": 11344 if v != nil { 11345 var kind string 11346 err = json.Unmarshal(*v, &kind) 11347 if err != nil { 11348 return err 11349 } 11350 slc.Kind = &kind 11351 } 11352 case "location": 11353 if v != nil { 11354 var location string 11355 err = json.Unmarshal(*v, &location) 11356 if err != nil { 11357 return err 11358 } 11359 slc.Location = &location 11360 } 11361 case "type": 11362 if v != nil { 11363 var typeVar string 11364 err = json.Unmarshal(*v, &typeVar) 11365 if err != nil { 11366 return err 11367 } 11368 slc.Type = &typeVar 11369 } 11370 case "tags": 11371 if v != nil { 11372 var tags map[string]*string 11373 err = json.Unmarshal(*v, &tags) 11374 if err != nil { 11375 return err 11376 } 11377 slc.Tags = tags 11378 } 11379 } 11380 } 11381 11382 return nil 11383} 11384 11385// SiteLogsConfigProperties ... 11386type SiteLogsConfigProperties struct { 11387 // ApplicationLogs - Application logs configuration 11388 ApplicationLogs *ApplicationLogsConfig `json:"applicationLogs,omitempty"` 11389 // HTTPLogs - Http logs configuration 11390 HTTPLogs *HTTPLogsConfig `json:"httpLogs,omitempty"` 11391 // FailedRequestsTracing - Failed requests tracing configuration 11392 FailedRequestsTracing *EnabledConfig `json:"failedRequestsTracing,omitempty"` 11393 // DetailedErrorMessages - Detailed error messages configuration 11394 DetailedErrorMessages *EnabledConfig `json:"detailedErrorMessages,omitempty"` 11395} 11396 11397// SiteProperties ... 11398type SiteProperties struct { 11399 // Name - Name of web app 11400 Name *string `json:"name,omitempty"` 11401 // State - READ-ONLY; State of the web app 11402 State *string `json:"state,omitempty"` 11403 // HostNames - READ-ONLY; Hostnames associated with web app 11404 HostNames *[]string `json:"hostNames,omitempty"` 11405 // RepositorySiteName - READ-ONLY; Name of repository site 11406 RepositorySiteName *string `json:"repositorySiteName,omitempty"` 11407 // UsageState - READ-ONLY; State indicating whether web app has exceeded its quota usage. Possible values include: 'UsageStateNormal', 'UsageStateExceeded' 11408 UsageState UsageState `json:"usageState,omitempty"` 11409 // Enabled - True if the site is enabled; otherwise, false. Setting this value to false disables the site (takes the site off line). 11410 Enabled *bool `json:"enabled,omitempty"` 11411 // EnabledHostNames - READ-ONLY; Hostnames for the web app that are enabled. Hostnames need to be assigned and enabled. If some hostnames are assigned but not enabled 11412 // the app is not served on those hostnames 11413 EnabledHostNames *[]string `json:"enabledHostNames,omitempty"` 11414 // AvailabilityState - READ-ONLY; Management information availability state for the web app. Possible values are Normal or Limited. 11415 // Normal means that the site is running correctly and that management information for the site is available. 11416 // Limited means that only partial management information for the site is available and that detailed site information is unavailable. Possible values include: 'Normal', 'Limited', 'DisasterRecoveryMode' 11417 AvailabilityState SiteAvailabilityState `json:"availabilityState,omitempty"` 11418 // HostNameSslStates - Hostname SSL states are used to manage the SSL bindings for site's hostnames. 11419 HostNameSslStates *[]HostNameSslState `json:"hostNameSslStates,omitempty"` 11420 ServerFarmID *string `json:"serverFarmId,omitempty"` 11421 // LastModifiedTimeUtc - READ-ONLY; Last time web app was modified in UTC 11422 LastModifiedTimeUtc *date.Time `json:"lastModifiedTimeUtc,omitempty"` 11423 // SiteConfig - Configuration of web app 11424 SiteConfig *SiteConfig `json:"siteConfig,omitempty"` 11425 // TrafficManagerHostNames - READ-ONLY; Read-only list of Azure Traffic manager hostnames associated with web app 11426 TrafficManagerHostNames *[]string `json:"trafficManagerHostNames,omitempty"` 11427 // PremiumAppDeployed - READ-ONLY; If set indicates whether web app is deployed as a premium app 11428 PremiumAppDeployed *bool `json:"premiumAppDeployed,omitempty"` 11429 // ScmSiteAlsoStopped - If set indicates whether to stop SCM (KUDU) site when the web app is stopped. Default is false. 11430 ScmSiteAlsoStopped *bool `json:"scmSiteAlsoStopped,omitempty"` 11431 // TargetSwapSlot - READ-ONLY; Read-only property that specifies which slot this app will swap into 11432 TargetSwapSlot *string `json:"targetSwapSlot,omitempty"` 11433 // HostingEnvironmentProfile - Specification for the hosting environment (App Service Environment) to use for the web app 11434 HostingEnvironmentProfile *HostingEnvironmentProfile `json:"hostingEnvironmentProfile,omitempty"` 11435 MicroService *string `json:"microService,omitempty"` 11436 // GatewaySiteName - Name of gateway app associated with web app 11437 GatewaySiteName *string `json:"gatewaySiteName,omitempty"` 11438 // ClientAffinityEnabled - Specifies if the client affinity is enabled when load balancing http request for multiple instances of the web app 11439 ClientAffinityEnabled *bool `json:"clientAffinityEnabled,omitempty"` 11440 // ClientCertEnabled - Specifies if the client certificate is enabled for the web app 11441 ClientCertEnabled *bool `json:"clientCertEnabled,omitempty"` 11442 // HostNamesDisabled - Specifies if the public hostnames are disabled the web app. 11443 // If set to true the app is only accessible via API Management process 11444 HostNamesDisabled *bool `json:"hostNamesDisabled,omitempty"` 11445 // OutboundIPAddresses - READ-ONLY; List of comma separated IP addresses that this web app uses for outbound connections. Those can be used when configuring firewall rules for databases accessed by this web app. 11446 OutboundIPAddresses *string `json:"outboundIpAddresses,omitempty"` 11447 // ContainerSize - Size of a function container 11448 ContainerSize *int32 `json:"containerSize,omitempty"` 11449 // MaxNumberOfWorkers - Maximum number of workers 11450 // This only applies to function container 11451 MaxNumberOfWorkers *int32 `json:"maxNumberOfWorkers,omitempty"` 11452 // CloningInfo - This is only valid for web app creation. If specified, web app is cloned from 11453 // a source web app 11454 CloningInfo *CloningInfo `json:"cloningInfo,omitempty"` 11455 // ResourceGroup - READ-ONLY; Resource group web app belongs to 11456 ResourceGroup *string `json:"resourceGroup,omitempty"` 11457 // IsDefaultContainer - READ-ONLY; Site is a default container 11458 IsDefaultContainer *bool `json:"isDefaultContainer,omitempty"` 11459 // DefaultHostName - READ-ONLY; Default hostname of the web app 11460 DefaultHostName *string `json:"defaultHostName,omitempty"` 11461} 11462 11463// MarshalJSON is the custom marshaler for SiteProperties. 11464func (s SiteProperties) MarshalJSON() ([]byte, error) { 11465 objectMap := make(map[string]interface{}) 11466 if s.Name != nil { 11467 objectMap["name"] = s.Name 11468 } 11469 if s.Enabled != nil { 11470 objectMap["enabled"] = s.Enabled 11471 } 11472 if s.HostNameSslStates != nil { 11473 objectMap["hostNameSslStates"] = s.HostNameSslStates 11474 } 11475 if s.ServerFarmID != nil { 11476 objectMap["serverFarmId"] = s.ServerFarmID 11477 } 11478 if s.SiteConfig != nil { 11479 objectMap["siteConfig"] = s.SiteConfig 11480 } 11481 if s.ScmSiteAlsoStopped != nil { 11482 objectMap["scmSiteAlsoStopped"] = s.ScmSiteAlsoStopped 11483 } 11484 if s.HostingEnvironmentProfile != nil { 11485 objectMap["hostingEnvironmentProfile"] = s.HostingEnvironmentProfile 11486 } 11487 if s.MicroService != nil { 11488 objectMap["microService"] = s.MicroService 11489 } 11490 if s.GatewaySiteName != nil { 11491 objectMap["gatewaySiteName"] = s.GatewaySiteName 11492 } 11493 if s.ClientAffinityEnabled != nil { 11494 objectMap["clientAffinityEnabled"] = s.ClientAffinityEnabled 11495 } 11496 if s.ClientCertEnabled != nil { 11497 objectMap["clientCertEnabled"] = s.ClientCertEnabled 11498 } 11499 if s.HostNamesDisabled != nil { 11500 objectMap["hostNamesDisabled"] = s.HostNamesDisabled 11501 } 11502 if s.ContainerSize != nil { 11503 objectMap["containerSize"] = s.ContainerSize 11504 } 11505 if s.MaxNumberOfWorkers != nil { 11506 objectMap["maxNumberOfWorkers"] = s.MaxNumberOfWorkers 11507 } 11508 if s.CloningInfo != nil { 11509 objectMap["cloningInfo"] = s.CloningInfo 11510 } 11511 return json.Marshal(objectMap) 11512} 11513 11514// SitePropertiesModel ... 11515type SitePropertiesModel struct { 11516 Metadata *[]NameValuePair `json:"metadata,omitempty"` 11517 Properties *[]NameValuePair `json:"properties,omitempty"` 11518 AppSettings *[]NameValuePair `json:"appSettings,omitempty"` 11519} 11520 11521// SitesCreateOrUpdateSiteFuture an abstraction for monitoring and retrieving the results of a long-running 11522// operation. 11523type SitesCreateOrUpdateSiteFuture struct { 11524 azure.FutureAPI 11525 // Result returns the result of the asynchronous operation. 11526 // If the operation has not completed it will return an error. 11527 Result func(SitesClient) (Site, error) 11528} 11529 11530// UnmarshalJSON is the custom unmarshaller for CreateFuture. 11531func (future *SitesCreateOrUpdateSiteFuture) UnmarshalJSON(body []byte) error { 11532 var azFuture azure.Future 11533 if err := json.Unmarshal(body, &azFuture); err != nil { 11534 return err 11535 } 11536 future.FutureAPI = &azFuture 11537 future.Result = future.result 11538 return nil 11539} 11540 11541// result is the default implementation for SitesCreateOrUpdateSiteFuture.Result. 11542func (future *SitesCreateOrUpdateSiteFuture) result(client SitesClient) (s Site, err error) { 11543 var done bool 11544 done, err = future.DoneWithContext(context.Background(), client) 11545 if err != nil { 11546 err = autorest.NewErrorWithError(err, "web.SitesCreateOrUpdateSiteFuture", "Result", future.Response(), "Polling failure") 11547 return 11548 } 11549 if !done { 11550 s.Response.Response = future.Response() 11551 err = azure.NewAsyncOpIncompleteError("web.SitesCreateOrUpdateSiteFuture") 11552 return 11553 } 11554 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 11555 if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent { 11556 s, err = client.CreateOrUpdateSiteResponder(s.Response.Response) 11557 if err != nil { 11558 err = autorest.NewErrorWithError(err, "web.SitesCreateOrUpdateSiteFuture", "Result", s.Response.Response, "Failure responding to request") 11559 } 11560 } 11561 return 11562} 11563 11564// SitesCreateOrUpdateSiteSlotFuture an abstraction for monitoring and retrieving the results of a 11565// long-running operation. 11566type SitesCreateOrUpdateSiteSlotFuture struct { 11567 azure.FutureAPI 11568 // Result returns the result of the asynchronous operation. 11569 // If the operation has not completed it will return an error. 11570 Result func(SitesClient) (Site, error) 11571} 11572 11573// UnmarshalJSON is the custom unmarshaller for CreateFuture. 11574func (future *SitesCreateOrUpdateSiteSlotFuture) UnmarshalJSON(body []byte) error { 11575 var azFuture azure.Future 11576 if err := json.Unmarshal(body, &azFuture); err != nil { 11577 return err 11578 } 11579 future.FutureAPI = &azFuture 11580 future.Result = future.result 11581 return nil 11582} 11583 11584// result is the default implementation for SitesCreateOrUpdateSiteSlotFuture.Result. 11585func (future *SitesCreateOrUpdateSiteSlotFuture) result(client SitesClient) (s Site, err error) { 11586 var done bool 11587 done, err = future.DoneWithContext(context.Background(), client) 11588 if err != nil { 11589 err = autorest.NewErrorWithError(err, "web.SitesCreateOrUpdateSiteSlotFuture", "Result", future.Response(), "Polling failure") 11590 return 11591 } 11592 if !done { 11593 s.Response.Response = future.Response() 11594 err = azure.NewAsyncOpIncompleteError("web.SitesCreateOrUpdateSiteSlotFuture") 11595 return 11596 } 11597 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 11598 if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent { 11599 s, err = client.CreateOrUpdateSiteSlotResponder(s.Response.Response) 11600 if err != nil { 11601 err = autorest.NewErrorWithError(err, "web.SitesCreateOrUpdateSiteSlotFuture", "Result", s.Response.Response, "Failure responding to request") 11602 } 11603 } 11604 return 11605} 11606 11607// SitesListSitePublishingCredentialsFuture an abstraction for monitoring and retrieving the results of a 11608// long-running operation. 11609type SitesListSitePublishingCredentialsFuture struct { 11610 azure.FutureAPI 11611 // Result returns the result of the asynchronous operation. 11612 // If the operation has not completed it will return an error. 11613 Result func(SitesClient) (User, error) 11614} 11615 11616// UnmarshalJSON is the custom unmarshaller for CreateFuture. 11617func (future *SitesListSitePublishingCredentialsFuture) UnmarshalJSON(body []byte) error { 11618 var azFuture azure.Future 11619 if err := json.Unmarshal(body, &azFuture); err != nil { 11620 return err 11621 } 11622 future.FutureAPI = &azFuture 11623 future.Result = future.result 11624 return nil 11625} 11626 11627// result is the default implementation for SitesListSitePublishingCredentialsFuture.Result. 11628func (future *SitesListSitePublishingCredentialsFuture) result(client SitesClient) (u User, err error) { 11629 var done bool 11630 done, err = future.DoneWithContext(context.Background(), client) 11631 if err != nil { 11632 err = autorest.NewErrorWithError(err, "web.SitesListSitePublishingCredentialsFuture", "Result", future.Response(), "Polling failure") 11633 return 11634 } 11635 if !done { 11636 u.Response.Response = future.Response() 11637 err = azure.NewAsyncOpIncompleteError("web.SitesListSitePublishingCredentialsFuture") 11638 return 11639 } 11640 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 11641 if u.Response.Response, err = future.GetResult(sender); err == nil && u.Response.Response.StatusCode != http.StatusNoContent { 11642 u, err = client.ListSitePublishingCredentialsResponder(u.Response.Response) 11643 if err != nil { 11644 err = autorest.NewErrorWithError(err, "web.SitesListSitePublishingCredentialsFuture", "Result", u.Response.Response, "Failure responding to request") 11645 } 11646 } 11647 return 11648} 11649 11650// SitesListSitePublishingCredentialsSlotFuture an abstraction for monitoring and retrieving the results of 11651// a long-running operation. 11652type SitesListSitePublishingCredentialsSlotFuture struct { 11653 azure.FutureAPI 11654 // Result returns the result of the asynchronous operation. 11655 // If the operation has not completed it will return an error. 11656 Result func(SitesClient) (User, error) 11657} 11658 11659// UnmarshalJSON is the custom unmarshaller for CreateFuture. 11660func (future *SitesListSitePublishingCredentialsSlotFuture) UnmarshalJSON(body []byte) error { 11661 var azFuture azure.Future 11662 if err := json.Unmarshal(body, &azFuture); err != nil { 11663 return err 11664 } 11665 future.FutureAPI = &azFuture 11666 future.Result = future.result 11667 return nil 11668} 11669 11670// result is the default implementation for SitesListSitePublishingCredentialsSlotFuture.Result. 11671func (future *SitesListSitePublishingCredentialsSlotFuture) result(client SitesClient) (u User, err error) { 11672 var done bool 11673 done, err = future.DoneWithContext(context.Background(), client) 11674 if err != nil { 11675 err = autorest.NewErrorWithError(err, "web.SitesListSitePublishingCredentialsSlotFuture", "Result", future.Response(), "Polling failure") 11676 return 11677 } 11678 if !done { 11679 u.Response.Response = future.Response() 11680 err = azure.NewAsyncOpIncompleteError("web.SitesListSitePublishingCredentialsSlotFuture") 11681 return 11682 } 11683 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 11684 if u.Response.Response, err = future.GetResult(sender); err == nil && u.Response.Response.StatusCode != http.StatusNoContent { 11685 u, err = client.ListSitePublishingCredentialsSlotResponder(u.Response.Response) 11686 if err != nil { 11687 err = autorest.NewErrorWithError(err, "web.SitesListSitePublishingCredentialsSlotFuture", "Result", u.Response.Response, "Failure responding to request") 11688 } 11689 } 11690 return 11691} 11692 11693// SiteSourceControl describes the source control configuration for web app 11694type SiteSourceControl struct { 11695 autorest.Response `json:"-"` 11696 *SiteSourceControlProperties `json:"properties,omitempty"` 11697 // ID - Resource Id 11698 ID *string `json:"id,omitempty"` 11699 // Name - Resource Name 11700 Name *string `json:"name,omitempty"` 11701 // Kind - Kind of resource 11702 Kind *string `json:"kind,omitempty"` 11703 // Location - Resource Location 11704 Location *string `json:"location,omitempty"` 11705 // Type - Resource type 11706 Type *string `json:"type,omitempty"` 11707 // Tags - Resource tags 11708 Tags map[string]*string `json:"tags"` 11709} 11710 11711// MarshalJSON is the custom marshaler for SiteSourceControl. 11712func (ssc SiteSourceControl) MarshalJSON() ([]byte, error) { 11713 objectMap := make(map[string]interface{}) 11714 if ssc.SiteSourceControlProperties != nil { 11715 objectMap["properties"] = ssc.SiteSourceControlProperties 11716 } 11717 if ssc.ID != nil { 11718 objectMap["id"] = ssc.ID 11719 } 11720 if ssc.Name != nil { 11721 objectMap["name"] = ssc.Name 11722 } 11723 if ssc.Kind != nil { 11724 objectMap["kind"] = ssc.Kind 11725 } 11726 if ssc.Location != nil { 11727 objectMap["location"] = ssc.Location 11728 } 11729 if ssc.Type != nil { 11730 objectMap["type"] = ssc.Type 11731 } 11732 if ssc.Tags != nil { 11733 objectMap["tags"] = ssc.Tags 11734 } 11735 return json.Marshal(objectMap) 11736} 11737 11738// UnmarshalJSON is the custom unmarshaler for SiteSourceControl struct. 11739func (ssc *SiteSourceControl) UnmarshalJSON(body []byte) error { 11740 var m map[string]*json.RawMessage 11741 err := json.Unmarshal(body, &m) 11742 if err != nil { 11743 return err 11744 } 11745 for k, v := range m { 11746 switch k { 11747 case "properties": 11748 if v != nil { 11749 var siteSourceControlProperties SiteSourceControlProperties 11750 err = json.Unmarshal(*v, &siteSourceControlProperties) 11751 if err != nil { 11752 return err 11753 } 11754 ssc.SiteSourceControlProperties = &siteSourceControlProperties 11755 } 11756 case "id": 11757 if v != nil { 11758 var ID string 11759 err = json.Unmarshal(*v, &ID) 11760 if err != nil { 11761 return err 11762 } 11763 ssc.ID = &ID 11764 } 11765 case "name": 11766 if v != nil { 11767 var name string 11768 err = json.Unmarshal(*v, &name) 11769 if err != nil { 11770 return err 11771 } 11772 ssc.Name = &name 11773 } 11774 case "kind": 11775 if v != nil { 11776 var kind string 11777 err = json.Unmarshal(*v, &kind) 11778 if err != nil { 11779 return err 11780 } 11781 ssc.Kind = &kind 11782 } 11783 case "location": 11784 if v != nil { 11785 var location string 11786 err = json.Unmarshal(*v, &location) 11787 if err != nil { 11788 return err 11789 } 11790 ssc.Location = &location 11791 } 11792 case "type": 11793 if v != nil { 11794 var typeVar string 11795 err = json.Unmarshal(*v, &typeVar) 11796 if err != nil { 11797 return err 11798 } 11799 ssc.Type = &typeVar 11800 } 11801 case "tags": 11802 if v != nil { 11803 var tags map[string]*string 11804 err = json.Unmarshal(*v, &tags) 11805 if err != nil { 11806 return err 11807 } 11808 ssc.Tags = tags 11809 } 11810 } 11811 } 11812 11813 return nil 11814} 11815 11816// SiteSourceControlProperties ... 11817type SiteSourceControlProperties struct { 11818 // RepoURL - Repository or source control url 11819 RepoURL *string `json:"repoUrl,omitempty"` 11820 // Branch - Name of branch to use for deployment 11821 Branch *string `json:"branch,omitempty"` 11822 // IsManualIntegration - Whether to manual or continuous integration 11823 IsManualIntegration *bool `json:"isManualIntegration,omitempty"` 11824 // DeploymentRollbackEnabled - Whether to manual or continuous integration 11825 DeploymentRollbackEnabled *bool `json:"deploymentRollbackEnabled,omitempty"` 11826 // IsMercurial - Mercurial or Git repository type 11827 IsMercurial *bool `json:"isMercurial,omitempty"` 11828} 11829 11830// SitesRecoverSiteFuture an abstraction for monitoring and retrieving the results of a long-running 11831// operation. 11832type SitesRecoverSiteFuture struct { 11833 azure.FutureAPI 11834 // Result returns the result of the asynchronous operation. 11835 // If the operation has not completed it will return an error. 11836 Result func(SitesClient) (Site, error) 11837} 11838 11839// UnmarshalJSON is the custom unmarshaller for CreateFuture. 11840func (future *SitesRecoverSiteFuture) UnmarshalJSON(body []byte) error { 11841 var azFuture azure.Future 11842 if err := json.Unmarshal(body, &azFuture); err != nil { 11843 return err 11844 } 11845 future.FutureAPI = &azFuture 11846 future.Result = future.result 11847 return nil 11848} 11849 11850// result is the default implementation for SitesRecoverSiteFuture.Result. 11851func (future *SitesRecoverSiteFuture) result(client SitesClient) (s Site, err error) { 11852 var done bool 11853 done, err = future.DoneWithContext(context.Background(), client) 11854 if err != nil { 11855 err = autorest.NewErrorWithError(err, "web.SitesRecoverSiteFuture", "Result", future.Response(), "Polling failure") 11856 return 11857 } 11858 if !done { 11859 s.Response.Response = future.Response() 11860 err = azure.NewAsyncOpIncompleteError("web.SitesRecoverSiteFuture") 11861 return 11862 } 11863 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 11864 if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent { 11865 s, err = client.RecoverSiteResponder(s.Response.Response) 11866 if err != nil { 11867 err = autorest.NewErrorWithError(err, "web.SitesRecoverSiteFuture", "Result", s.Response.Response, "Failure responding to request") 11868 } 11869 } 11870 return 11871} 11872 11873// SitesRecoverSiteSlotFuture an abstraction for monitoring and retrieving the results of a long-running 11874// operation. 11875type SitesRecoverSiteSlotFuture struct { 11876 azure.FutureAPI 11877 // Result returns the result of the asynchronous operation. 11878 // If the operation has not completed it will return an error. 11879 Result func(SitesClient) (Site, error) 11880} 11881 11882// UnmarshalJSON is the custom unmarshaller for CreateFuture. 11883func (future *SitesRecoverSiteSlotFuture) UnmarshalJSON(body []byte) error { 11884 var azFuture azure.Future 11885 if err := json.Unmarshal(body, &azFuture); err != nil { 11886 return err 11887 } 11888 future.FutureAPI = &azFuture 11889 future.Result = future.result 11890 return nil 11891} 11892 11893// result is the default implementation for SitesRecoverSiteSlotFuture.Result. 11894func (future *SitesRecoverSiteSlotFuture) result(client SitesClient) (s Site, err error) { 11895 var done bool 11896 done, err = future.DoneWithContext(context.Background(), client) 11897 if err != nil { 11898 err = autorest.NewErrorWithError(err, "web.SitesRecoverSiteSlotFuture", "Result", future.Response(), "Polling failure") 11899 return 11900 } 11901 if !done { 11902 s.Response.Response = future.Response() 11903 err = azure.NewAsyncOpIncompleteError("web.SitesRecoverSiteSlotFuture") 11904 return 11905 } 11906 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 11907 if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent { 11908 s, err = client.RecoverSiteSlotResponder(s.Response.Response) 11909 if err != nil { 11910 err = autorest.NewErrorWithError(err, "web.SitesRecoverSiteSlotFuture", "Result", s.Response.Response, "Failure responding to request") 11911 } 11912 } 11913 return 11914} 11915 11916// SitesRestoreSiteFuture an abstraction for monitoring and retrieving the results of a long-running 11917// operation. 11918type SitesRestoreSiteFuture struct { 11919 azure.FutureAPI 11920 // Result returns the result of the asynchronous operation. 11921 // If the operation has not completed it will return an error. 11922 Result func(SitesClient) (RestoreResponse, error) 11923} 11924 11925// UnmarshalJSON is the custom unmarshaller for CreateFuture. 11926func (future *SitesRestoreSiteFuture) UnmarshalJSON(body []byte) error { 11927 var azFuture azure.Future 11928 if err := json.Unmarshal(body, &azFuture); err != nil { 11929 return err 11930 } 11931 future.FutureAPI = &azFuture 11932 future.Result = future.result 11933 return nil 11934} 11935 11936// result is the default implementation for SitesRestoreSiteFuture.Result. 11937func (future *SitesRestoreSiteFuture) result(client SitesClient) (rr RestoreResponse, err error) { 11938 var done bool 11939 done, err = future.DoneWithContext(context.Background(), client) 11940 if err != nil { 11941 err = autorest.NewErrorWithError(err, "web.SitesRestoreSiteFuture", "Result", future.Response(), "Polling failure") 11942 return 11943 } 11944 if !done { 11945 rr.Response.Response = future.Response() 11946 err = azure.NewAsyncOpIncompleteError("web.SitesRestoreSiteFuture") 11947 return 11948 } 11949 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 11950 if rr.Response.Response, err = future.GetResult(sender); err == nil && rr.Response.Response.StatusCode != http.StatusNoContent { 11951 rr, err = client.RestoreSiteResponder(rr.Response.Response) 11952 if err != nil { 11953 err = autorest.NewErrorWithError(err, "web.SitesRestoreSiteFuture", "Result", rr.Response.Response, "Failure responding to request") 11954 } 11955 } 11956 return 11957} 11958 11959// SitesRestoreSiteSlotFuture an abstraction for monitoring and retrieving the results of a long-running 11960// operation. 11961type SitesRestoreSiteSlotFuture struct { 11962 azure.FutureAPI 11963 // Result returns the result of the asynchronous operation. 11964 // If the operation has not completed it will return an error. 11965 Result func(SitesClient) (RestoreResponse, error) 11966} 11967 11968// UnmarshalJSON is the custom unmarshaller for CreateFuture. 11969func (future *SitesRestoreSiteSlotFuture) UnmarshalJSON(body []byte) error { 11970 var azFuture azure.Future 11971 if err := json.Unmarshal(body, &azFuture); err != nil { 11972 return err 11973 } 11974 future.FutureAPI = &azFuture 11975 future.Result = future.result 11976 return nil 11977} 11978 11979// result is the default implementation for SitesRestoreSiteSlotFuture.Result. 11980func (future *SitesRestoreSiteSlotFuture) result(client SitesClient) (rr RestoreResponse, err error) { 11981 var done bool 11982 done, err = future.DoneWithContext(context.Background(), client) 11983 if err != nil { 11984 err = autorest.NewErrorWithError(err, "web.SitesRestoreSiteSlotFuture", "Result", future.Response(), "Polling failure") 11985 return 11986 } 11987 if !done { 11988 rr.Response.Response = future.Response() 11989 err = azure.NewAsyncOpIncompleteError("web.SitesRestoreSiteSlotFuture") 11990 return 11991 } 11992 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 11993 if rr.Response.Response, err = future.GetResult(sender); err == nil && rr.Response.Response.StatusCode != http.StatusNoContent { 11994 rr, err = client.RestoreSiteSlotResponder(rr.Response.Response) 11995 if err != nil { 11996 err = autorest.NewErrorWithError(err, "web.SitesRestoreSiteSlotFuture", "Result", rr.Response.Response, "Failure responding to request") 11997 } 11998 } 11999 return 12000} 12001 12002// SitesSwapSlotsSlotFuture an abstraction for monitoring and retrieving the results of a long-running 12003// operation. 12004type SitesSwapSlotsSlotFuture struct { 12005 azure.FutureAPI 12006 // Result returns the result of the asynchronous operation. 12007 // If the operation has not completed it will return an error. 12008 Result func(SitesClient) (SetObject, error) 12009} 12010 12011// UnmarshalJSON is the custom unmarshaller for CreateFuture. 12012func (future *SitesSwapSlotsSlotFuture) UnmarshalJSON(body []byte) error { 12013 var azFuture azure.Future 12014 if err := json.Unmarshal(body, &azFuture); err != nil { 12015 return err 12016 } 12017 future.FutureAPI = &azFuture 12018 future.Result = future.result 12019 return nil 12020} 12021 12022// result is the default implementation for SitesSwapSlotsSlotFuture.Result. 12023func (future *SitesSwapSlotsSlotFuture) result(client SitesClient) (so SetObject, err error) { 12024 var done bool 12025 done, err = future.DoneWithContext(context.Background(), client) 12026 if err != nil { 12027 err = autorest.NewErrorWithError(err, "web.SitesSwapSlotsSlotFuture", "Result", future.Response(), "Polling failure") 12028 return 12029 } 12030 if !done { 12031 so.Response.Response = future.Response() 12032 err = azure.NewAsyncOpIncompleteError("web.SitesSwapSlotsSlotFuture") 12033 return 12034 } 12035 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 12036 if so.Response.Response, err = future.GetResult(sender); err == nil && so.Response.Response.StatusCode != http.StatusNoContent { 12037 so, err = client.SwapSlotsSlotResponder(so.Response.Response) 12038 if err != nil { 12039 err = autorest.NewErrorWithError(err, "web.SitesSwapSlotsSlotFuture", "Result", so.Response.Response, "Failure responding to request") 12040 } 12041 } 12042 return 12043} 12044 12045// SitesSwapSlotWithProductionFuture an abstraction for monitoring and retrieving the results of a 12046// long-running operation. 12047type SitesSwapSlotWithProductionFuture struct { 12048 azure.FutureAPI 12049 // Result returns the result of the asynchronous operation. 12050 // If the operation has not completed it will return an error. 12051 Result func(SitesClient) (SetObject, error) 12052} 12053 12054// UnmarshalJSON is the custom unmarshaller for CreateFuture. 12055func (future *SitesSwapSlotWithProductionFuture) UnmarshalJSON(body []byte) error { 12056 var azFuture azure.Future 12057 if err := json.Unmarshal(body, &azFuture); err != nil { 12058 return err 12059 } 12060 future.FutureAPI = &azFuture 12061 future.Result = future.result 12062 return nil 12063} 12064 12065// result is the default implementation for SitesSwapSlotWithProductionFuture.Result. 12066func (future *SitesSwapSlotWithProductionFuture) result(client SitesClient) (so SetObject, err error) { 12067 var done bool 12068 done, err = future.DoneWithContext(context.Background(), client) 12069 if err != nil { 12070 err = autorest.NewErrorWithError(err, "web.SitesSwapSlotWithProductionFuture", "Result", future.Response(), "Polling failure") 12071 return 12072 } 12073 if !done { 12074 so.Response.Response = future.Response() 12075 err = azure.NewAsyncOpIncompleteError("web.SitesSwapSlotWithProductionFuture") 12076 return 12077 } 12078 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 12079 if so.Response.Response, err = future.GetResult(sender); err == nil && so.Response.Response.StatusCode != http.StatusNoContent { 12080 so, err = client.SwapSlotWithProductionResponder(so.Response.Response) 12081 if err != nil { 12082 err = autorest.NewErrorWithError(err, "web.SitesSwapSlotWithProductionFuture", "Result", so.Response.Response, "Failure responding to request") 12083 } 12084 } 12085 return 12086} 12087 12088// SkuCapacity description of the App Service Plan scale options 12089type SkuCapacity struct { 12090 // Minimum - Minimum number of Workers for this App Service Plan SKU 12091 Minimum *int32 `json:"minimum,omitempty"` 12092 // Maximum - Maximum number of Workers for this App Service Plan SKU 12093 Maximum *int32 `json:"maximum,omitempty"` 12094 // Default - Default number of Workers for this App Service Plan SKU 12095 Default *int32 `json:"default,omitempty"` 12096 // ScaleType - Available scale configurations for an App Service Plan 12097 ScaleType *string `json:"scaleType,omitempty"` 12098} 12099 12100// SkuDescription describes a sku for a scalable resource 12101type SkuDescription struct { 12102 // Name - Name of the resource sku 12103 Name *string `json:"name,omitempty"` 12104 // Tier - Service Tier of the resource sku 12105 Tier *string `json:"tier,omitempty"` 12106 // Size - Size specifier of the resource sku 12107 Size *string `json:"size,omitempty"` 12108 // Family - Family code of the resource sku 12109 Family *string `json:"family,omitempty"` 12110 // Capacity - Current number of instances assigned to the resource 12111 Capacity *int32 `json:"capacity,omitempty"` 12112} 12113 12114// SkuInfo sku discovery information 12115type SkuInfo struct { 12116 // ResourceType - Resource type that this sku applies to 12117 ResourceType *string `json:"resourceType,omitempty"` 12118 // Sku - Name and tier of the sku 12119 Sku *SkuDescription `json:"sku,omitempty"` 12120 // Capacity - Min, max, and default scale values of the sku 12121 Capacity *SkuCapacity `json:"capacity,omitempty"` 12122} 12123 12124// SkuInfoCollection collection of SkuInfos 12125type SkuInfoCollection struct { 12126 autorest.Response `json:"-"` 12127 // Value - Collection of resources 12128 Value *[]SkuInfo `json:"value,omitempty"` 12129 // NextLink - Link to next page of resources 12130 NextLink *string `json:"nextLink,omitempty"` 12131} 12132 12133// SkuInfoCollectionIterator provides access to a complete listing of SkuInfo values. 12134type SkuInfoCollectionIterator struct { 12135 i int 12136 page SkuInfoCollectionPage 12137} 12138 12139// NextWithContext advances to the next value. If there was an error making 12140// the request the iterator does not advance and the error is returned. 12141func (iter *SkuInfoCollectionIterator) NextWithContext(ctx context.Context) (err error) { 12142 if tracing.IsEnabled() { 12143 ctx = tracing.StartSpan(ctx, fqdn+"/SkuInfoCollectionIterator.NextWithContext") 12144 defer func() { 12145 sc := -1 12146 if iter.Response().Response.Response != nil { 12147 sc = iter.Response().Response.Response.StatusCode 12148 } 12149 tracing.EndSpan(ctx, sc, err) 12150 }() 12151 } 12152 iter.i++ 12153 if iter.i < len(iter.page.Values()) { 12154 return nil 12155 } 12156 err = iter.page.NextWithContext(ctx) 12157 if err != nil { 12158 iter.i-- 12159 return err 12160 } 12161 iter.i = 0 12162 return nil 12163} 12164 12165// Next advances to the next value. If there was an error making 12166// the request the iterator does not advance and the error is returned. 12167// Deprecated: Use NextWithContext() instead. 12168func (iter *SkuInfoCollectionIterator) Next() error { 12169 return iter.NextWithContext(context.Background()) 12170} 12171 12172// NotDone returns true if the enumeration should be started or is not yet complete. 12173func (iter SkuInfoCollectionIterator) NotDone() bool { 12174 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 12175} 12176 12177// Response returns the raw server response from the last page request. 12178func (iter SkuInfoCollectionIterator) Response() SkuInfoCollection { 12179 return iter.page.Response() 12180} 12181 12182// Value returns the current value or a zero-initialized value if the 12183// iterator has advanced beyond the end of the collection. 12184func (iter SkuInfoCollectionIterator) Value() SkuInfo { 12185 if !iter.page.NotDone() { 12186 return SkuInfo{} 12187 } 12188 return iter.page.Values()[iter.i] 12189} 12190 12191// Creates a new instance of the SkuInfoCollectionIterator type. 12192func NewSkuInfoCollectionIterator(page SkuInfoCollectionPage) SkuInfoCollectionIterator { 12193 return SkuInfoCollectionIterator{page: page} 12194} 12195 12196// IsEmpty returns true if the ListResult contains no values. 12197func (sic SkuInfoCollection) IsEmpty() bool { 12198 return sic.Value == nil || len(*sic.Value) == 0 12199} 12200 12201// hasNextLink returns true if the NextLink is not empty. 12202func (sic SkuInfoCollection) hasNextLink() bool { 12203 return sic.NextLink != nil && len(*sic.NextLink) != 0 12204} 12205 12206// skuInfoCollectionPreparer prepares a request to retrieve the next set of results. 12207// It returns nil if no more results exist. 12208func (sic SkuInfoCollection) skuInfoCollectionPreparer(ctx context.Context) (*http.Request, error) { 12209 if !sic.hasNextLink() { 12210 return nil, nil 12211 } 12212 return autorest.Prepare((&http.Request{}).WithContext(ctx), 12213 autorest.AsJSON(), 12214 autorest.AsGet(), 12215 autorest.WithBaseURL(to.String(sic.NextLink))) 12216} 12217 12218// SkuInfoCollectionPage contains a page of SkuInfo values. 12219type SkuInfoCollectionPage struct { 12220 fn func(context.Context, SkuInfoCollection) (SkuInfoCollection, error) 12221 sic SkuInfoCollection 12222} 12223 12224// NextWithContext advances to the next page of values. If there was an error making 12225// the request the page does not advance and the error is returned. 12226func (page *SkuInfoCollectionPage) NextWithContext(ctx context.Context) (err error) { 12227 if tracing.IsEnabled() { 12228 ctx = tracing.StartSpan(ctx, fqdn+"/SkuInfoCollectionPage.NextWithContext") 12229 defer func() { 12230 sc := -1 12231 if page.Response().Response.Response != nil { 12232 sc = page.Response().Response.Response.StatusCode 12233 } 12234 tracing.EndSpan(ctx, sc, err) 12235 }() 12236 } 12237 for { 12238 next, err := page.fn(ctx, page.sic) 12239 if err != nil { 12240 return err 12241 } 12242 page.sic = next 12243 if !next.hasNextLink() || !next.IsEmpty() { 12244 break 12245 } 12246 } 12247 return nil 12248} 12249 12250// Next advances to the next page of values. If there was an error making 12251// the request the page does not advance and the error is returned. 12252// Deprecated: Use NextWithContext() instead. 12253func (page *SkuInfoCollectionPage) Next() error { 12254 return page.NextWithContext(context.Background()) 12255} 12256 12257// NotDone returns true if the page enumeration should be started or is not yet complete. 12258func (page SkuInfoCollectionPage) NotDone() bool { 12259 return !page.sic.IsEmpty() 12260} 12261 12262// Response returns the raw server response from the last page request. 12263func (page SkuInfoCollectionPage) Response() SkuInfoCollection { 12264 return page.sic 12265} 12266 12267// Values returns the slice of values for the current page or nil if there are no values. 12268func (page SkuInfoCollectionPage) Values() []SkuInfo { 12269 if page.sic.IsEmpty() { 12270 return nil 12271 } 12272 return *page.sic.Value 12273} 12274 12275// Creates a new instance of the SkuInfoCollectionPage type. 12276func NewSkuInfoCollectionPage(cur SkuInfoCollection, getNextPage func(context.Context, SkuInfoCollection) (SkuInfoCollection, error)) SkuInfoCollectionPage { 12277 return SkuInfoCollectionPage{ 12278 fn: getNextPage, 12279 sic: cur, 12280 } 12281} 12282 12283// SlotConfigNames class containing names for connection strings and application settings to be marked as 12284// sticky to the slot 12285// and not moved during swap operation 12286// This is valid for all deployment slots under the site 12287type SlotConfigNames struct { 12288 // ConnectionStringNames - List of connection string names 12289 ConnectionStringNames *[]string `json:"connectionStringNames,omitempty"` 12290 // AppSettingNames - List of application settings names 12291 AppSettingNames *[]string `json:"appSettingNames,omitempty"` 12292} 12293 12294// SlotConfigNamesResource slot Config names azure resource 12295type SlotConfigNamesResource struct { 12296 autorest.Response `json:"-"` 12297 *SlotConfigNamesResourceProperties `json:"properties,omitempty"` 12298 // ID - Resource Id 12299 ID *string `json:"id,omitempty"` 12300 // Name - Resource Name 12301 Name *string `json:"name,omitempty"` 12302 // Kind - Kind of resource 12303 Kind *string `json:"kind,omitempty"` 12304 // Location - Resource Location 12305 Location *string `json:"location,omitempty"` 12306 // Type - Resource type 12307 Type *string `json:"type,omitempty"` 12308 // Tags - Resource tags 12309 Tags map[string]*string `json:"tags"` 12310} 12311 12312// MarshalJSON is the custom marshaler for SlotConfigNamesResource. 12313func (scnr SlotConfigNamesResource) MarshalJSON() ([]byte, error) { 12314 objectMap := make(map[string]interface{}) 12315 if scnr.SlotConfigNamesResourceProperties != nil { 12316 objectMap["properties"] = scnr.SlotConfigNamesResourceProperties 12317 } 12318 if scnr.ID != nil { 12319 objectMap["id"] = scnr.ID 12320 } 12321 if scnr.Name != nil { 12322 objectMap["name"] = scnr.Name 12323 } 12324 if scnr.Kind != nil { 12325 objectMap["kind"] = scnr.Kind 12326 } 12327 if scnr.Location != nil { 12328 objectMap["location"] = scnr.Location 12329 } 12330 if scnr.Type != nil { 12331 objectMap["type"] = scnr.Type 12332 } 12333 if scnr.Tags != nil { 12334 objectMap["tags"] = scnr.Tags 12335 } 12336 return json.Marshal(objectMap) 12337} 12338 12339// UnmarshalJSON is the custom unmarshaler for SlotConfigNamesResource struct. 12340func (scnr *SlotConfigNamesResource) UnmarshalJSON(body []byte) error { 12341 var m map[string]*json.RawMessage 12342 err := json.Unmarshal(body, &m) 12343 if err != nil { 12344 return err 12345 } 12346 for k, v := range m { 12347 switch k { 12348 case "properties": 12349 if v != nil { 12350 var slotConfigNamesResourceProperties SlotConfigNamesResourceProperties 12351 err = json.Unmarshal(*v, &slotConfigNamesResourceProperties) 12352 if err != nil { 12353 return err 12354 } 12355 scnr.SlotConfigNamesResourceProperties = &slotConfigNamesResourceProperties 12356 } 12357 case "id": 12358 if v != nil { 12359 var ID string 12360 err = json.Unmarshal(*v, &ID) 12361 if err != nil { 12362 return err 12363 } 12364 scnr.ID = &ID 12365 } 12366 case "name": 12367 if v != nil { 12368 var name string 12369 err = json.Unmarshal(*v, &name) 12370 if err != nil { 12371 return err 12372 } 12373 scnr.Name = &name 12374 } 12375 case "kind": 12376 if v != nil { 12377 var kind string 12378 err = json.Unmarshal(*v, &kind) 12379 if err != nil { 12380 return err 12381 } 12382 scnr.Kind = &kind 12383 } 12384 case "location": 12385 if v != nil { 12386 var location string 12387 err = json.Unmarshal(*v, &location) 12388 if err != nil { 12389 return err 12390 } 12391 scnr.Location = &location 12392 } 12393 case "type": 12394 if v != nil { 12395 var typeVar string 12396 err = json.Unmarshal(*v, &typeVar) 12397 if err != nil { 12398 return err 12399 } 12400 scnr.Type = &typeVar 12401 } 12402 case "tags": 12403 if v != nil { 12404 var tags map[string]*string 12405 err = json.Unmarshal(*v, &tags) 12406 if err != nil { 12407 return err 12408 } 12409 scnr.Tags = tags 12410 } 12411 } 12412 } 12413 12414 return nil 12415} 12416 12417// SlotConfigNamesResourceProperties ... 12418type SlotConfigNamesResourceProperties struct { 12419 // ConnectionStringNames - List of connection string names 12420 ConnectionStringNames *[]string `json:"connectionStringNames,omitempty"` 12421 // AppSettingNames - List of application settings names 12422 AppSettingNames *[]string `json:"appSettingNames,omitempty"` 12423} 12424 12425// SlotDifference an object describing the difference in setting values between two web app slots 12426type SlotDifference struct { 12427 *SlotDifferenceProperties `json:"properties,omitempty"` 12428 // ID - Resource Id 12429 ID *string `json:"id,omitempty"` 12430 // Name - Resource Name 12431 Name *string `json:"name,omitempty"` 12432 // Kind - Kind of resource 12433 Kind *string `json:"kind,omitempty"` 12434 // Location - Resource Location 12435 Location *string `json:"location,omitempty"` 12436 // Type - Resource type 12437 Type *string `json:"type,omitempty"` 12438 // Tags - Resource tags 12439 Tags map[string]*string `json:"tags"` 12440} 12441 12442// MarshalJSON is the custom marshaler for SlotDifference. 12443func (sd SlotDifference) MarshalJSON() ([]byte, error) { 12444 objectMap := make(map[string]interface{}) 12445 if sd.SlotDifferenceProperties != nil { 12446 objectMap["properties"] = sd.SlotDifferenceProperties 12447 } 12448 if sd.ID != nil { 12449 objectMap["id"] = sd.ID 12450 } 12451 if sd.Name != nil { 12452 objectMap["name"] = sd.Name 12453 } 12454 if sd.Kind != nil { 12455 objectMap["kind"] = sd.Kind 12456 } 12457 if sd.Location != nil { 12458 objectMap["location"] = sd.Location 12459 } 12460 if sd.Type != nil { 12461 objectMap["type"] = sd.Type 12462 } 12463 if sd.Tags != nil { 12464 objectMap["tags"] = sd.Tags 12465 } 12466 return json.Marshal(objectMap) 12467} 12468 12469// UnmarshalJSON is the custom unmarshaler for SlotDifference struct. 12470func (sd *SlotDifference) UnmarshalJSON(body []byte) error { 12471 var m map[string]*json.RawMessage 12472 err := json.Unmarshal(body, &m) 12473 if err != nil { 12474 return err 12475 } 12476 for k, v := range m { 12477 switch k { 12478 case "properties": 12479 if v != nil { 12480 var slotDifferenceProperties SlotDifferenceProperties 12481 err = json.Unmarshal(*v, &slotDifferenceProperties) 12482 if err != nil { 12483 return err 12484 } 12485 sd.SlotDifferenceProperties = &slotDifferenceProperties 12486 } 12487 case "id": 12488 if v != nil { 12489 var ID string 12490 err = json.Unmarshal(*v, &ID) 12491 if err != nil { 12492 return err 12493 } 12494 sd.ID = &ID 12495 } 12496 case "name": 12497 if v != nil { 12498 var name string 12499 err = json.Unmarshal(*v, &name) 12500 if err != nil { 12501 return err 12502 } 12503 sd.Name = &name 12504 } 12505 case "kind": 12506 if v != nil { 12507 var kind string 12508 err = json.Unmarshal(*v, &kind) 12509 if err != nil { 12510 return err 12511 } 12512 sd.Kind = &kind 12513 } 12514 case "location": 12515 if v != nil { 12516 var location string 12517 err = json.Unmarshal(*v, &location) 12518 if err != nil { 12519 return err 12520 } 12521 sd.Location = &location 12522 } 12523 case "type": 12524 if v != nil { 12525 var typeVar string 12526 err = json.Unmarshal(*v, &typeVar) 12527 if err != nil { 12528 return err 12529 } 12530 sd.Type = &typeVar 12531 } 12532 case "tags": 12533 if v != nil { 12534 var tags map[string]*string 12535 err = json.Unmarshal(*v, &tags) 12536 if err != nil { 12537 return err 12538 } 12539 sd.Tags = tags 12540 } 12541 } 12542 } 12543 12544 return nil 12545} 12546 12547// SlotDifferenceCollection collection of Slot Differences 12548type SlotDifferenceCollection struct { 12549 autorest.Response `json:"-"` 12550 // Value - Collection of resources 12551 Value *[]SlotDifference `json:"value,omitempty"` 12552 // NextLink - Link to next page of resources 12553 NextLink *string `json:"nextLink,omitempty"` 12554} 12555 12556// SlotDifferenceCollectionIterator provides access to a complete listing of SlotDifference values. 12557type SlotDifferenceCollectionIterator struct { 12558 i int 12559 page SlotDifferenceCollectionPage 12560} 12561 12562// NextWithContext advances to the next value. If there was an error making 12563// the request the iterator does not advance and the error is returned. 12564func (iter *SlotDifferenceCollectionIterator) NextWithContext(ctx context.Context) (err error) { 12565 if tracing.IsEnabled() { 12566 ctx = tracing.StartSpan(ctx, fqdn+"/SlotDifferenceCollectionIterator.NextWithContext") 12567 defer func() { 12568 sc := -1 12569 if iter.Response().Response.Response != nil { 12570 sc = iter.Response().Response.Response.StatusCode 12571 } 12572 tracing.EndSpan(ctx, sc, err) 12573 }() 12574 } 12575 iter.i++ 12576 if iter.i < len(iter.page.Values()) { 12577 return nil 12578 } 12579 err = iter.page.NextWithContext(ctx) 12580 if err != nil { 12581 iter.i-- 12582 return err 12583 } 12584 iter.i = 0 12585 return nil 12586} 12587 12588// Next advances to the next value. If there was an error making 12589// the request the iterator does not advance and the error is returned. 12590// Deprecated: Use NextWithContext() instead. 12591func (iter *SlotDifferenceCollectionIterator) Next() error { 12592 return iter.NextWithContext(context.Background()) 12593} 12594 12595// NotDone returns true if the enumeration should be started or is not yet complete. 12596func (iter SlotDifferenceCollectionIterator) NotDone() bool { 12597 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 12598} 12599 12600// Response returns the raw server response from the last page request. 12601func (iter SlotDifferenceCollectionIterator) Response() SlotDifferenceCollection { 12602 return iter.page.Response() 12603} 12604 12605// Value returns the current value or a zero-initialized value if the 12606// iterator has advanced beyond the end of the collection. 12607func (iter SlotDifferenceCollectionIterator) Value() SlotDifference { 12608 if !iter.page.NotDone() { 12609 return SlotDifference{} 12610 } 12611 return iter.page.Values()[iter.i] 12612} 12613 12614// Creates a new instance of the SlotDifferenceCollectionIterator type. 12615func NewSlotDifferenceCollectionIterator(page SlotDifferenceCollectionPage) SlotDifferenceCollectionIterator { 12616 return SlotDifferenceCollectionIterator{page: page} 12617} 12618 12619// IsEmpty returns true if the ListResult contains no values. 12620func (sdc SlotDifferenceCollection) IsEmpty() bool { 12621 return sdc.Value == nil || len(*sdc.Value) == 0 12622} 12623 12624// hasNextLink returns true if the NextLink is not empty. 12625func (sdc SlotDifferenceCollection) hasNextLink() bool { 12626 return sdc.NextLink != nil && len(*sdc.NextLink) != 0 12627} 12628 12629// slotDifferenceCollectionPreparer prepares a request to retrieve the next set of results. 12630// It returns nil if no more results exist. 12631func (sdc SlotDifferenceCollection) slotDifferenceCollectionPreparer(ctx context.Context) (*http.Request, error) { 12632 if !sdc.hasNextLink() { 12633 return nil, nil 12634 } 12635 return autorest.Prepare((&http.Request{}).WithContext(ctx), 12636 autorest.AsJSON(), 12637 autorest.AsGet(), 12638 autorest.WithBaseURL(to.String(sdc.NextLink))) 12639} 12640 12641// SlotDifferenceCollectionPage contains a page of SlotDifference values. 12642type SlotDifferenceCollectionPage struct { 12643 fn func(context.Context, SlotDifferenceCollection) (SlotDifferenceCollection, error) 12644 sdc SlotDifferenceCollection 12645} 12646 12647// NextWithContext advances to the next page of values. If there was an error making 12648// the request the page does not advance and the error is returned. 12649func (page *SlotDifferenceCollectionPage) NextWithContext(ctx context.Context) (err error) { 12650 if tracing.IsEnabled() { 12651 ctx = tracing.StartSpan(ctx, fqdn+"/SlotDifferenceCollectionPage.NextWithContext") 12652 defer func() { 12653 sc := -1 12654 if page.Response().Response.Response != nil { 12655 sc = page.Response().Response.Response.StatusCode 12656 } 12657 tracing.EndSpan(ctx, sc, err) 12658 }() 12659 } 12660 for { 12661 next, err := page.fn(ctx, page.sdc) 12662 if err != nil { 12663 return err 12664 } 12665 page.sdc = next 12666 if !next.hasNextLink() || !next.IsEmpty() { 12667 break 12668 } 12669 } 12670 return nil 12671} 12672 12673// Next advances to the next page of values. If there was an error making 12674// the request the page does not advance and the error is returned. 12675// Deprecated: Use NextWithContext() instead. 12676func (page *SlotDifferenceCollectionPage) Next() error { 12677 return page.NextWithContext(context.Background()) 12678} 12679 12680// NotDone returns true if the page enumeration should be started or is not yet complete. 12681func (page SlotDifferenceCollectionPage) NotDone() bool { 12682 return !page.sdc.IsEmpty() 12683} 12684 12685// Response returns the raw server response from the last page request. 12686func (page SlotDifferenceCollectionPage) Response() SlotDifferenceCollection { 12687 return page.sdc 12688} 12689 12690// Values returns the slice of values for the current page or nil if there are no values. 12691func (page SlotDifferenceCollectionPage) Values() []SlotDifference { 12692 if page.sdc.IsEmpty() { 12693 return nil 12694 } 12695 return *page.sdc.Value 12696} 12697 12698// Creates a new instance of the SlotDifferenceCollectionPage type. 12699func NewSlotDifferenceCollectionPage(cur SlotDifferenceCollection, getNextPage func(context.Context, SlotDifferenceCollection) (SlotDifferenceCollection, error)) SlotDifferenceCollectionPage { 12700 return SlotDifferenceCollectionPage{ 12701 fn: getNextPage, 12702 sdc: cur, 12703 } 12704} 12705 12706// SlotDifferenceProperties ... 12707type SlotDifferenceProperties struct { 12708 // Type - Indicates the type of the difference: Information, Warning or Error. 12709 Type *string `json:"type,omitempty"` 12710 // SettingType - The type of the settings: General, AppSetting or ConnectionString 12711 SettingType *string `json:"settingType,omitempty"` 12712 // DiffRule - Rule that describes how to process the difference in settings during web app slot swap. 12713 DiffRule *string `json:"diffRule,omitempty"` 12714 // SettingName - Name of the setting 12715 SettingName *string `json:"settingName,omitempty"` 12716 // ValueInCurrentSlot - Value of the setting in the current web app slot 12717 ValueInCurrentSlot *string `json:"valueInCurrentSlot,omitempty"` 12718 // ValueInTargetSlot - Value of the setting in the target web app slot 12719 ValueInTargetSlot *string `json:"valueInTargetSlot,omitempty"` 12720 // Description - Description of the difference 12721 Description *string `json:"description,omitempty"` 12722} 12723 12724// SlowRequestsBasedTrigger slowRequestsBasedTrigger 12725type SlowRequestsBasedTrigger struct { 12726 // TimeTaken - TimeTaken 12727 TimeTaken *string `json:"timeTaken,omitempty"` 12728 // Count - Count 12729 Count *int32 `json:"count,omitempty"` 12730 // TimeInterval - TimeInterval 12731 TimeInterval *string `json:"timeInterval,omitempty"` 12732} 12733 12734// SourceControl describes the Source Control OAuth Token 12735type SourceControl struct { 12736 autorest.Response `json:"-"` 12737 *SourceControlProperties `json:"properties,omitempty"` 12738 // ID - Resource Id 12739 ID *string `json:"id,omitempty"` 12740 // Name - Resource Name 12741 Name *string `json:"name,omitempty"` 12742 // Kind - Kind of resource 12743 Kind *string `json:"kind,omitempty"` 12744 // Location - Resource Location 12745 Location *string `json:"location,omitempty"` 12746 // Type - Resource type 12747 Type *string `json:"type,omitempty"` 12748 // Tags - Resource tags 12749 Tags map[string]*string `json:"tags"` 12750} 12751 12752// MarshalJSON is the custom marshaler for SourceControl. 12753func (sc SourceControl) MarshalJSON() ([]byte, error) { 12754 objectMap := make(map[string]interface{}) 12755 if sc.SourceControlProperties != nil { 12756 objectMap["properties"] = sc.SourceControlProperties 12757 } 12758 if sc.ID != nil { 12759 objectMap["id"] = sc.ID 12760 } 12761 if sc.Name != nil { 12762 objectMap["name"] = sc.Name 12763 } 12764 if sc.Kind != nil { 12765 objectMap["kind"] = sc.Kind 12766 } 12767 if sc.Location != nil { 12768 objectMap["location"] = sc.Location 12769 } 12770 if sc.Type != nil { 12771 objectMap["type"] = sc.Type 12772 } 12773 if sc.Tags != nil { 12774 objectMap["tags"] = sc.Tags 12775 } 12776 return json.Marshal(objectMap) 12777} 12778 12779// UnmarshalJSON is the custom unmarshaler for SourceControl struct. 12780func (sc *SourceControl) UnmarshalJSON(body []byte) error { 12781 var m map[string]*json.RawMessage 12782 err := json.Unmarshal(body, &m) 12783 if err != nil { 12784 return err 12785 } 12786 for k, v := range m { 12787 switch k { 12788 case "properties": 12789 if v != nil { 12790 var sourceControlProperties SourceControlProperties 12791 err = json.Unmarshal(*v, &sourceControlProperties) 12792 if err != nil { 12793 return err 12794 } 12795 sc.SourceControlProperties = &sourceControlProperties 12796 } 12797 case "id": 12798 if v != nil { 12799 var ID string 12800 err = json.Unmarshal(*v, &ID) 12801 if err != nil { 12802 return err 12803 } 12804 sc.ID = &ID 12805 } 12806 case "name": 12807 if v != nil { 12808 var name string 12809 err = json.Unmarshal(*v, &name) 12810 if err != nil { 12811 return err 12812 } 12813 sc.Name = &name 12814 } 12815 case "kind": 12816 if v != nil { 12817 var kind string 12818 err = json.Unmarshal(*v, &kind) 12819 if err != nil { 12820 return err 12821 } 12822 sc.Kind = &kind 12823 } 12824 case "location": 12825 if v != nil { 12826 var location string 12827 err = json.Unmarshal(*v, &location) 12828 if err != nil { 12829 return err 12830 } 12831 sc.Location = &location 12832 } 12833 case "type": 12834 if v != nil { 12835 var typeVar string 12836 err = json.Unmarshal(*v, &typeVar) 12837 if err != nil { 12838 return err 12839 } 12840 sc.Type = &typeVar 12841 } 12842 case "tags": 12843 if v != nil { 12844 var tags map[string]*string 12845 err = json.Unmarshal(*v, &tags) 12846 if err != nil { 12847 return err 12848 } 12849 sc.Tags = tags 12850 } 12851 } 12852 } 12853 12854 return nil 12855} 12856 12857// SourceControlCollection collection of source controls 12858type SourceControlCollection struct { 12859 autorest.Response `json:"-"` 12860 // Value - Collection of resources 12861 Value *[]SourceControl `json:"value,omitempty"` 12862 // NextLink - Link to next page of resources 12863 NextLink *string `json:"nextLink,omitempty"` 12864} 12865 12866// SourceControlCollectionIterator provides access to a complete listing of SourceControl values. 12867type SourceControlCollectionIterator struct { 12868 i int 12869 page SourceControlCollectionPage 12870} 12871 12872// NextWithContext advances to the next value. If there was an error making 12873// the request the iterator does not advance and the error is returned. 12874func (iter *SourceControlCollectionIterator) NextWithContext(ctx context.Context) (err error) { 12875 if tracing.IsEnabled() { 12876 ctx = tracing.StartSpan(ctx, fqdn+"/SourceControlCollectionIterator.NextWithContext") 12877 defer func() { 12878 sc := -1 12879 if iter.Response().Response.Response != nil { 12880 sc = iter.Response().Response.Response.StatusCode 12881 } 12882 tracing.EndSpan(ctx, sc, err) 12883 }() 12884 } 12885 iter.i++ 12886 if iter.i < len(iter.page.Values()) { 12887 return nil 12888 } 12889 err = iter.page.NextWithContext(ctx) 12890 if err != nil { 12891 iter.i-- 12892 return err 12893 } 12894 iter.i = 0 12895 return nil 12896} 12897 12898// Next advances to the next value. If there was an error making 12899// the request the iterator does not advance and the error is returned. 12900// Deprecated: Use NextWithContext() instead. 12901func (iter *SourceControlCollectionIterator) Next() error { 12902 return iter.NextWithContext(context.Background()) 12903} 12904 12905// NotDone returns true if the enumeration should be started or is not yet complete. 12906func (iter SourceControlCollectionIterator) NotDone() bool { 12907 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 12908} 12909 12910// Response returns the raw server response from the last page request. 12911func (iter SourceControlCollectionIterator) Response() SourceControlCollection { 12912 return iter.page.Response() 12913} 12914 12915// Value returns the current value or a zero-initialized value if the 12916// iterator has advanced beyond the end of the collection. 12917func (iter SourceControlCollectionIterator) Value() SourceControl { 12918 if !iter.page.NotDone() { 12919 return SourceControl{} 12920 } 12921 return iter.page.Values()[iter.i] 12922} 12923 12924// Creates a new instance of the SourceControlCollectionIterator type. 12925func NewSourceControlCollectionIterator(page SourceControlCollectionPage) SourceControlCollectionIterator { 12926 return SourceControlCollectionIterator{page: page} 12927} 12928 12929// IsEmpty returns true if the ListResult contains no values. 12930func (scc SourceControlCollection) IsEmpty() bool { 12931 return scc.Value == nil || len(*scc.Value) == 0 12932} 12933 12934// hasNextLink returns true if the NextLink is not empty. 12935func (scc SourceControlCollection) hasNextLink() bool { 12936 return scc.NextLink != nil && len(*scc.NextLink) != 0 12937} 12938 12939// sourceControlCollectionPreparer prepares a request to retrieve the next set of results. 12940// It returns nil if no more results exist. 12941func (scc SourceControlCollection) sourceControlCollectionPreparer(ctx context.Context) (*http.Request, error) { 12942 if !scc.hasNextLink() { 12943 return nil, nil 12944 } 12945 return autorest.Prepare((&http.Request{}).WithContext(ctx), 12946 autorest.AsJSON(), 12947 autorest.AsGet(), 12948 autorest.WithBaseURL(to.String(scc.NextLink))) 12949} 12950 12951// SourceControlCollectionPage contains a page of SourceControl values. 12952type SourceControlCollectionPage struct { 12953 fn func(context.Context, SourceControlCollection) (SourceControlCollection, error) 12954 scc SourceControlCollection 12955} 12956 12957// NextWithContext advances to the next page of values. If there was an error making 12958// the request the page does not advance and the error is returned. 12959func (page *SourceControlCollectionPage) NextWithContext(ctx context.Context) (err error) { 12960 if tracing.IsEnabled() { 12961 ctx = tracing.StartSpan(ctx, fqdn+"/SourceControlCollectionPage.NextWithContext") 12962 defer func() { 12963 sc := -1 12964 if page.Response().Response.Response != nil { 12965 sc = page.Response().Response.Response.StatusCode 12966 } 12967 tracing.EndSpan(ctx, sc, err) 12968 }() 12969 } 12970 for { 12971 next, err := page.fn(ctx, page.scc) 12972 if err != nil { 12973 return err 12974 } 12975 page.scc = next 12976 if !next.hasNextLink() || !next.IsEmpty() { 12977 break 12978 } 12979 } 12980 return nil 12981} 12982 12983// Next advances to the next page of values. If there was an error making 12984// the request the page does not advance and the error is returned. 12985// Deprecated: Use NextWithContext() instead. 12986func (page *SourceControlCollectionPage) Next() error { 12987 return page.NextWithContext(context.Background()) 12988} 12989 12990// NotDone returns true if the page enumeration should be started or is not yet complete. 12991func (page SourceControlCollectionPage) NotDone() bool { 12992 return !page.scc.IsEmpty() 12993} 12994 12995// Response returns the raw server response from the last page request. 12996func (page SourceControlCollectionPage) Response() SourceControlCollection { 12997 return page.scc 12998} 12999 13000// Values returns the slice of values for the current page or nil if there are no values. 13001func (page SourceControlCollectionPage) Values() []SourceControl { 13002 if page.scc.IsEmpty() { 13003 return nil 13004 } 13005 return *page.scc.Value 13006} 13007 13008// Creates a new instance of the SourceControlCollectionPage type. 13009func NewSourceControlCollectionPage(cur SourceControlCollection, getNextPage func(context.Context, SourceControlCollection) (SourceControlCollection, error)) SourceControlCollectionPage { 13010 return SourceControlCollectionPage{ 13011 fn: getNextPage, 13012 scc: cur, 13013 } 13014} 13015 13016// SourceControlProperties ... 13017type SourceControlProperties struct { 13018 // Name - Name or Source Control Type 13019 Name *string `json:"name,omitempty"` 13020 // Token - OAuth Access Token 13021 Token *string `json:"token,omitempty"` 13022 // TokenSecret - OAuth Access Token Secret 13023 TokenSecret *string `json:"tokenSecret,omitempty"` 13024 // RefreshToken - OAuth Refresh Token 13025 RefreshToken *string `json:"refreshToken,omitempty"` 13026 // ExpirationTime - OAuth Token Expiration 13027 ExpirationTime *date.Time `json:"expirationTime,omitempty"` 13028} 13029 13030// StampCapacity class containing stamp capacity information 13031type StampCapacity struct { 13032 // Name - Name of the stamp 13033 Name *string `json:"name,omitempty"` 13034 // AvailableCapacity - Available capacity (# of machines, bytes of storage etc...) 13035 AvailableCapacity *int64 `json:"availableCapacity,omitempty"` 13036 // TotalCapacity - Total capacity (# of machines, bytes of storage etc...) 13037 TotalCapacity *int64 `json:"totalCapacity,omitempty"` 13038 // Unit - Name of the unit 13039 Unit *string `json:"unit,omitempty"` 13040 // ComputeMode - Shared/Dedicated workers. Possible values include: 'Shared', 'Dedicated', 'Dynamic' 13041 ComputeMode ComputeModeOptions `json:"computeMode,omitempty"` 13042 // WorkerSize - Size of the machines. Possible values include: 'WorkerSizeOptionsDefault', 'WorkerSizeOptionsSmall', 'WorkerSizeOptionsMedium', 'WorkerSizeOptionsLarge' 13043 WorkerSize WorkerSizeOptions `json:"workerSize,omitempty"` 13044 // WorkerSizeID - Size Id of machines: 13045 // 0 - Small 13046 // 1 - Medium 13047 // 2 - Large 13048 WorkerSizeID *int32 `json:"workerSizeId,omitempty"` 13049 // ExcludeFromCapacityAllocation - If true it includes basic sites 13050 // Basic sites are not used for capacity allocation. 13051 ExcludeFromCapacityAllocation *bool `json:"excludeFromCapacityAllocation,omitempty"` 13052 // IsApplicableForAllComputeModes - Is capacity applicable for all sites? 13053 IsApplicableForAllComputeModes *bool `json:"isApplicableForAllComputeModes,omitempty"` 13054 // SiteMode - Shared or Dedicated 13055 SiteMode *string `json:"siteMode,omitempty"` 13056} 13057 13058// StampCapacityCollection collection of stamp capacities 13059type StampCapacityCollection struct { 13060 autorest.Response `json:"-"` 13061 // Value - Collection of resources 13062 Value *[]StampCapacity `json:"value,omitempty"` 13063 // NextLink - Link to next page of resources 13064 NextLink *string `json:"nextLink,omitempty"` 13065} 13066 13067// StampCapacityCollectionIterator provides access to a complete listing of StampCapacity values. 13068type StampCapacityCollectionIterator struct { 13069 i int 13070 page StampCapacityCollectionPage 13071} 13072 13073// NextWithContext advances to the next value. If there was an error making 13074// the request the iterator does not advance and the error is returned. 13075func (iter *StampCapacityCollectionIterator) NextWithContext(ctx context.Context) (err error) { 13076 if tracing.IsEnabled() { 13077 ctx = tracing.StartSpan(ctx, fqdn+"/StampCapacityCollectionIterator.NextWithContext") 13078 defer func() { 13079 sc := -1 13080 if iter.Response().Response.Response != nil { 13081 sc = iter.Response().Response.Response.StatusCode 13082 } 13083 tracing.EndSpan(ctx, sc, err) 13084 }() 13085 } 13086 iter.i++ 13087 if iter.i < len(iter.page.Values()) { 13088 return nil 13089 } 13090 err = iter.page.NextWithContext(ctx) 13091 if err != nil { 13092 iter.i-- 13093 return err 13094 } 13095 iter.i = 0 13096 return nil 13097} 13098 13099// Next advances to the next value. If there was an error making 13100// the request the iterator does not advance and the error is returned. 13101// Deprecated: Use NextWithContext() instead. 13102func (iter *StampCapacityCollectionIterator) Next() error { 13103 return iter.NextWithContext(context.Background()) 13104} 13105 13106// NotDone returns true if the enumeration should be started or is not yet complete. 13107func (iter StampCapacityCollectionIterator) NotDone() bool { 13108 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 13109} 13110 13111// Response returns the raw server response from the last page request. 13112func (iter StampCapacityCollectionIterator) Response() StampCapacityCollection { 13113 return iter.page.Response() 13114} 13115 13116// Value returns the current value or a zero-initialized value if the 13117// iterator has advanced beyond the end of the collection. 13118func (iter StampCapacityCollectionIterator) Value() StampCapacity { 13119 if !iter.page.NotDone() { 13120 return StampCapacity{} 13121 } 13122 return iter.page.Values()[iter.i] 13123} 13124 13125// Creates a new instance of the StampCapacityCollectionIterator type. 13126func NewStampCapacityCollectionIterator(page StampCapacityCollectionPage) StampCapacityCollectionIterator { 13127 return StampCapacityCollectionIterator{page: page} 13128} 13129 13130// IsEmpty returns true if the ListResult contains no values. 13131func (scc StampCapacityCollection) IsEmpty() bool { 13132 return scc.Value == nil || len(*scc.Value) == 0 13133} 13134 13135// hasNextLink returns true if the NextLink is not empty. 13136func (scc StampCapacityCollection) hasNextLink() bool { 13137 return scc.NextLink != nil && len(*scc.NextLink) != 0 13138} 13139 13140// stampCapacityCollectionPreparer prepares a request to retrieve the next set of results. 13141// It returns nil if no more results exist. 13142func (scc StampCapacityCollection) stampCapacityCollectionPreparer(ctx context.Context) (*http.Request, error) { 13143 if !scc.hasNextLink() { 13144 return nil, nil 13145 } 13146 return autorest.Prepare((&http.Request{}).WithContext(ctx), 13147 autorest.AsJSON(), 13148 autorest.AsGet(), 13149 autorest.WithBaseURL(to.String(scc.NextLink))) 13150} 13151 13152// StampCapacityCollectionPage contains a page of StampCapacity values. 13153type StampCapacityCollectionPage struct { 13154 fn func(context.Context, StampCapacityCollection) (StampCapacityCollection, error) 13155 scc StampCapacityCollection 13156} 13157 13158// NextWithContext advances to the next page of values. If there was an error making 13159// the request the page does not advance and the error is returned. 13160func (page *StampCapacityCollectionPage) NextWithContext(ctx context.Context) (err error) { 13161 if tracing.IsEnabled() { 13162 ctx = tracing.StartSpan(ctx, fqdn+"/StampCapacityCollectionPage.NextWithContext") 13163 defer func() { 13164 sc := -1 13165 if page.Response().Response.Response != nil { 13166 sc = page.Response().Response.Response.StatusCode 13167 } 13168 tracing.EndSpan(ctx, sc, err) 13169 }() 13170 } 13171 for { 13172 next, err := page.fn(ctx, page.scc) 13173 if err != nil { 13174 return err 13175 } 13176 page.scc = next 13177 if !next.hasNextLink() || !next.IsEmpty() { 13178 break 13179 } 13180 } 13181 return nil 13182} 13183 13184// Next advances to the next page of values. If there was an error making 13185// the request the page does not advance and the error is returned. 13186// Deprecated: Use NextWithContext() instead. 13187func (page *StampCapacityCollectionPage) Next() error { 13188 return page.NextWithContext(context.Background()) 13189} 13190 13191// NotDone returns true if the page enumeration should be started or is not yet complete. 13192func (page StampCapacityCollectionPage) NotDone() bool { 13193 return !page.scc.IsEmpty() 13194} 13195 13196// Response returns the raw server response from the last page request. 13197func (page StampCapacityCollectionPage) Response() StampCapacityCollection { 13198 return page.scc 13199} 13200 13201// Values returns the slice of values for the current page or nil if there are no values. 13202func (page StampCapacityCollectionPage) Values() []StampCapacity { 13203 if page.scc.IsEmpty() { 13204 return nil 13205 } 13206 return *page.scc.Value 13207} 13208 13209// Creates a new instance of the StampCapacityCollectionPage type. 13210func NewStampCapacityCollectionPage(cur StampCapacityCollection, getNextPage func(context.Context, StampCapacityCollection) (StampCapacityCollection, error)) StampCapacityCollectionPage { 13211 return StampCapacityCollectionPage{ 13212 fn: getNextPage, 13213 scc: cur, 13214 } 13215} 13216 13217// StatusCodesBasedTrigger statusCodeBasedTrigger 13218type StatusCodesBasedTrigger struct { 13219 // Status - HTTP status code 13220 Status *int32 `json:"status,omitempty"` 13221 // SubStatus - SubStatus 13222 SubStatus *int32 `json:"subStatus,omitempty"` 13223 // Win32Status - Win32 error code 13224 Win32Status *int32 `json:"win32Status,omitempty"` 13225 // Count - Count 13226 Count *int32 `json:"count,omitempty"` 13227 // TimeInterval - TimeInterval 13228 TimeInterval *string `json:"timeInterval,omitempty"` 13229} 13230 13231// StringDictionary string dictionary resource 13232type StringDictionary struct { 13233 autorest.Response `json:"-"` 13234 // Properties - Settings 13235 Properties map[string]*string `json:"properties"` 13236 // ID - Resource Id 13237 ID *string `json:"id,omitempty"` 13238 // Name - Resource Name 13239 Name *string `json:"name,omitempty"` 13240 // Kind - Kind of resource 13241 Kind *string `json:"kind,omitempty"` 13242 // Location - Resource Location 13243 Location *string `json:"location,omitempty"` 13244 // Type - Resource type 13245 Type *string `json:"type,omitempty"` 13246 // Tags - Resource tags 13247 Tags map[string]*string `json:"tags"` 13248} 13249 13250// MarshalJSON is the custom marshaler for StringDictionary. 13251func (sd StringDictionary) MarshalJSON() ([]byte, error) { 13252 objectMap := make(map[string]interface{}) 13253 if sd.Properties != nil { 13254 objectMap["properties"] = sd.Properties 13255 } 13256 if sd.ID != nil { 13257 objectMap["id"] = sd.ID 13258 } 13259 if sd.Name != nil { 13260 objectMap["name"] = sd.Name 13261 } 13262 if sd.Kind != nil { 13263 objectMap["kind"] = sd.Kind 13264 } 13265 if sd.Location != nil { 13266 objectMap["location"] = sd.Location 13267 } 13268 if sd.Type != nil { 13269 objectMap["type"] = sd.Type 13270 } 13271 if sd.Tags != nil { 13272 objectMap["tags"] = sd.Tags 13273 } 13274 return json.Marshal(objectMap) 13275} 13276 13277// TldLegalAgreement represents a legal agreement for top level domain 13278type TldLegalAgreement struct { 13279 // AgreementKey - Unique identifier for the agreement 13280 AgreementKey *string `json:"agreementKey,omitempty"` 13281 // Title - Agreement title 13282 Title *string `json:"title,omitempty"` 13283 // Content - Agreement details 13284 Content *string `json:"content,omitempty"` 13285 // URL - Url where a copy of the agreement details is hosted 13286 URL *string `json:"url,omitempty"` 13287} 13288 13289// TldLegalAgreementCollection collection of Tld Legal Agreements 13290type TldLegalAgreementCollection struct { 13291 autorest.Response `json:"-"` 13292 // Value - Collection of resources 13293 Value *[]TldLegalAgreement `json:"value,omitempty"` 13294 // NextLink - Link to next page of resources 13295 NextLink *string `json:"nextLink,omitempty"` 13296} 13297 13298// TldLegalAgreementCollectionIterator provides access to a complete listing of TldLegalAgreement values. 13299type TldLegalAgreementCollectionIterator struct { 13300 i int 13301 page TldLegalAgreementCollectionPage 13302} 13303 13304// NextWithContext advances to the next value. If there was an error making 13305// the request the iterator does not advance and the error is returned. 13306func (iter *TldLegalAgreementCollectionIterator) NextWithContext(ctx context.Context) (err error) { 13307 if tracing.IsEnabled() { 13308 ctx = tracing.StartSpan(ctx, fqdn+"/TldLegalAgreementCollectionIterator.NextWithContext") 13309 defer func() { 13310 sc := -1 13311 if iter.Response().Response.Response != nil { 13312 sc = iter.Response().Response.Response.StatusCode 13313 } 13314 tracing.EndSpan(ctx, sc, err) 13315 }() 13316 } 13317 iter.i++ 13318 if iter.i < len(iter.page.Values()) { 13319 return nil 13320 } 13321 err = iter.page.NextWithContext(ctx) 13322 if err != nil { 13323 iter.i-- 13324 return err 13325 } 13326 iter.i = 0 13327 return nil 13328} 13329 13330// Next advances to the next value. If there was an error making 13331// the request the iterator does not advance and the error is returned. 13332// Deprecated: Use NextWithContext() instead. 13333func (iter *TldLegalAgreementCollectionIterator) Next() error { 13334 return iter.NextWithContext(context.Background()) 13335} 13336 13337// NotDone returns true if the enumeration should be started or is not yet complete. 13338func (iter TldLegalAgreementCollectionIterator) NotDone() bool { 13339 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 13340} 13341 13342// Response returns the raw server response from the last page request. 13343func (iter TldLegalAgreementCollectionIterator) Response() TldLegalAgreementCollection { 13344 return iter.page.Response() 13345} 13346 13347// Value returns the current value or a zero-initialized value if the 13348// iterator has advanced beyond the end of the collection. 13349func (iter TldLegalAgreementCollectionIterator) Value() TldLegalAgreement { 13350 if !iter.page.NotDone() { 13351 return TldLegalAgreement{} 13352 } 13353 return iter.page.Values()[iter.i] 13354} 13355 13356// Creates a new instance of the TldLegalAgreementCollectionIterator type. 13357func NewTldLegalAgreementCollectionIterator(page TldLegalAgreementCollectionPage) TldLegalAgreementCollectionIterator { 13358 return TldLegalAgreementCollectionIterator{page: page} 13359} 13360 13361// IsEmpty returns true if the ListResult contains no values. 13362func (tlac TldLegalAgreementCollection) IsEmpty() bool { 13363 return tlac.Value == nil || len(*tlac.Value) == 0 13364} 13365 13366// hasNextLink returns true if the NextLink is not empty. 13367func (tlac TldLegalAgreementCollection) hasNextLink() bool { 13368 return tlac.NextLink != nil && len(*tlac.NextLink) != 0 13369} 13370 13371// tldLegalAgreementCollectionPreparer prepares a request to retrieve the next set of results. 13372// It returns nil if no more results exist. 13373func (tlac TldLegalAgreementCollection) tldLegalAgreementCollectionPreparer(ctx context.Context) (*http.Request, error) { 13374 if !tlac.hasNextLink() { 13375 return nil, nil 13376 } 13377 return autorest.Prepare((&http.Request{}).WithContext(ctx), 13378 autorest.AsJSON(), 13379 autorest.AsGet(), 13380 autorest.WithBaseURL(to.String(tlac.NextLink))) 13381} 13382 13383// TldLegalAgreementCollectionPage contains a page of TldLegalAgreement values. 13384type TldLegalAgreementCollectionPage struct { 13385 fn func(context.Context, TldLegalAgreementCollection) (TldLegalAgreementCollection, error) 13386 tlac TldLegalAgreementCollection 13387} 13388 13389// NextWithContext advances to the next page of values. If there was an error making 13390// the request the page does not advance and the error is returned. 13391func (page *TldLegalAgreementCollectionPage) NextWithContext(ctx context.Context) (err error) { 13392 if tracing.IsEnabled() { 13393 ctx = tracing.StartSpan(ctx, fqdn+"/TldLegalAgreementCollectionPage.NextWithContext") 13394 defer func() { 13395 sc := -1 13396 if page.Response().Response.Response != nil { 13397 sc = page.Response().Response.Response.StatusCode 13398 } 13399 tracing.EndSpan(ctx, sc, err) 13400 }() 13401 } 13402 for { 13403 next, err := page.fn(ctx, page.tlac) 13404 if err != nil { 13405 return err 13406 } 13407 page.tlac = next 13408 if !next.hasNextLink() || !next.IsEmpty() { 13409 break 13410 } 13411 } 13412 return nil 13413} 13414 13415// Next advances to the next page of values. If there was an error making 13416// the request the page does not advance and the error is returned. 13417// Deprecated: Use NextWithContext() instead. 13418func (page *TldLegalAgreementCollectionPage) Next() error { 13419 return page.NextWithContext(context.Background()) 13420} 13421 13422// NotDone returns true if the page enumeration should be started or is not yet complete. 13423func (page TldLegalAgreementCollectionPage) NotDone() bool { 13424 return !page.tlac.IsEmpty() 13425} 13426 13427// Response returns the raw server response from the last page request. 13428func (page TldLegalAgreementCollectionPage) Response() TldLegalAgreementCollection { 13429 return page.tlac 13430} 13431 13432// Values returns the slice of values for the current page or nil if there are no values. 13433func (page TldLegalAgreementCollectionPage) Values() []TldLegalAgreement { 13434 if page.tlac.IsEmpty() { 13435 return nil 13436 } 13437 return *page.tlac.Value 13438} 13439 13440// Creates a new instance of the TldLegalAgreementCollectionPage type. 13441func NewTldLegalAgreementCollectionPage(cur TldLegalAgreementCollection, getNextPage func(context.Context, TldLegalAgreementCollection) (TldLegalAgreementCollection, error)) TldLegalAgreementCollectionPage { 13442 return TldLegalAgreementCollectionPage{ 13443 fn: getNextPage, 13444 tlac: cur, 13445 } 13446} 13447 13448// TopLevelDomain a top level domain object 13449type TopLevelDomain struct { 13450 autorest.Response `json:"-"` 13451 *TopLevelDomainProperties `json:"properties,omitempty"` 13452 // ID - Resource Id 13453 ID *string `json:"id,omitempty"` 13454 // Name - Resource Name 13455 Name *string `json:"name,omitempty"` 13456 // Kind - Kind of resource 13457 Kind *string `json:"kind,omitempty"` 13458 // Location - Resource Location 13459 Location *string `json:"location,omitempty"` 13460 // Type - Resource type 13461 Type *string `json:"type,omitempty"` 13462 // Tags - Resource tags 13463 Tags map[string]*string `json:"tags"` 13464} 13465 13466// MarshalJSON is the custom marshaler for TopLevelDomain. 13467func (tld TopLevelDomain) MarshalJSON() ([]byte, error) { 13468 objectMap := make(map[string]interface{}) 13469 if tld.TopLevelDomainProperties != nil { 13470 objectMap["properties"] = tld.TopLevelDomainProperties 13471 } 13472 if tld.ID != nil { 13473 objectMap["id"] = tld.ID 13474 } 13475 if tld.Name != nil { 13476 objectMap["name"] = tld.Name 13477 } 13478 if tld.Kind != nil { 13479 objectMap["kind"] = tld.Kind 13480 } 13481 if tld.Location != nil { 13482 objectMap["location"] = tld.Location 13483 } 13484 if tld.Type != nil { 13485 objectMap["type"] = tld.Type 13486 } 13487 if tld.Tags != nil { 13488 objectMap["tags"] = tld.Tags 13489 } 13490 return json.Marshal(objectMap) 13491} 13492 13493// UnmarshalJSON is the custom unmarshaler for TopLevelDomain struct. 13494func (tld *TopLevelDomain) UnmarshalJSON(body []byte) error { 13495 var m map[string]*json.RawMessage 13496 err := json.Unmarshal(body, &m) 13497 if err != nil { 13498 return err 13499 } 13500 for k, v := range m { 13501 switch k { 13502 case "properties": 13503 if v != nil { 13504 var topLevelDomainProperties TopLevelDomainProperties 13505 err = json.Unmarshal(*v, &topLevelDomainProperties) 13506 if err != nil { 13507 return err 13508 } 13509 tld.TopLevelDomainProperties = &topLevelDomainProperties 13510 } 13511 case "id": 13512 if v != nil { 13513 var ID string 13514 err = json.Unmarshal(*v, &ID) 13515 if err != nil { 13516 return err 13517 } 13518 tld.ID = &ID 13519 } 13520 case "name": 13521 if v != nil { 13522 var name string 13523 err = json.Unmarshal(*v, &name) 13524 if err != nil { 13525 return err 13526 } 13527 tld.Name = &name 13528 } 13529 case "kind": 13530 if v != nil { 13531 var kind string 13532 err = json.Unmarshal(*v, &kind) 13533 if err != nil { 13534 return err 13535 } 13536 tld.Kind = &kind 13537 } 13538 case "location": 13539 if v != nil { 13540 var location string 13541 err = json.Unmarshal(*v, &location) 13542 if err != nil { 13543 return err 13544 } 13545 tld.Location = &location 13546 } 13547 case "type": 13548 if v != nil { 13549 var typeVar string 13550 err = json.Unmarshal(*v, &typeVar) 13551 if err != nil { 13552 return err 13553 } 13554 tld.Type = &typeVar 13555 } 13556 case "tags": 13557 if v != nil { 13558 var tags map[string]*string 13559 err = json.Unmarshal(*v, &tags) 13560 if err != nil { 13561 return err 13562 } 13563 tld.Tags = tags 13564 } 13565 } 13566 } 13567 13568 return nil 13569} 13570 13571// TopLevelDomainAgreementOption options for retrieving the list of top level domain legal agreements 13572type TopLevelDomainAgreementOption struct { 13573 // IncludePrivacy - If true then the list of agreements will include agreements for domain privacy as well. 13574 IncludePrivacy *bool `json:"includePrivacy,omitempty"` 13575} 13576 13577// TopLevelDomainCollection collection of Top Level Domains 13578type TopLevelDomainCollection struct { 13579 autorest.Response `json:"-"` 13580 // Value - Collection of resources 13581 Value *[]TopLevelDomain `json:"value,omitempty"` 13582 // NextLink - Link to next page of resources 13583 NextLink *string `json:"nextLink,omitempty"` 13584} 13585 13586// TopLevelDomainCollectionIterator provides access to a complete listing of TopLevelDomain values. 13587type TopLevelDomainCollectionIterator struct { 13588 i int 13589 page TopLevelDomainCollectionPage 13590} 13591 13592// NextWithContext advances to the next value. If there was an error making 13593// the request the iterator does not advance and the error is returned. 13594func (iter *TopLevelDomainCollectionIterator) NextWithContext(ctx context.Context) (err error) { 13595 if tracing.IsEnabled() { 13596 ctx = tracing.StartSpan(ctx, fqdn+"/TopLevelDomainCollectionIterator.NextWithContext") 13597 defer func() { 13598 sc := -1 13599 if iter.Response().Response.Response != nil { 13600 sc = iter.Response().Response.Response.StatusCode 13601 } 13602 tracing.EndSpan(ctx, sc, err) 13603 }() 13604 } 13605 iter.i++ 13606 if iter.i < len(iter.page.Values()) { 13607 return nil 13608 } 13609 err = iter.page.NextWithContext(ctx) 13610 if err != nil { 13611 iter.i-- 13612 return err 13613 } 13614 iter.i = 0 13615 return nil 13616} 13617 13618// Next advances to the next value. If there was an error making 13619// the request the iterator does not advance and the error is returned. 13620// Deprecated: Use NextWithContext() instead. 13621func (iter *TopLevelDomainCollectionIterator) Next() error { 13622 return iter.NextWithContext(context.Background()) 13623} 13624 13625// NotDone returns true if the enumeration should be started or is not yet complete. 13626func (iter TopLevelDomainCollectionIterator) NotDone() bool { 13627 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 13628} 13629 13630// Response returns the raw server response from the last page request. 13631func (iter TopLevelDomainCollectionIterator) Response() TopLevelDomainCollection { 13632 return iter.page.Response() 13633} 13634 13635// Value returns the current value or a zero-initialized value if the 13636// iterator has advanced beyond the end of the collection. 13637func (iter TopLevelDomainCollectionIterator) Value() TopLevelDomain { 13638 if !iter.page.NotDone() { 13639 return TopLevelDomain{} 13640 } 13641 return iter.page.Values()[iter.i] 13642} 13643 13644// Creates a new instance of the TopLevelDomainCollectionIterator type. 13645func NewTopLevelDomainCollectionIterator(page TopLevelDomainCollectionPage) TopLevelDomainCollectionIterator { 13646 return TopLevelDomainCollectionIterator{page: page} 13647} 13648 13649// IsEmpty returns true if the ListResult contains no values. 13650func (tldc TopLevelDomainCollection) IsEmpty() bool { 13651 return tldc.Value == nil || len(*tldc.Value) == 0 13652} 13653 13654// hasNextLink returns true if the NextLink is not empty. 13655func (tldc TopLevelDomainCollection) hasNextLink() bool { 13656 return tldc.NextLink != nil && len(*tldc.NextLink) != 0 13657} 13658 13659// topLevelDomainCollectionPreparer prepares a request to retrieve the next set of results. 13660// It returns nil if no more results exist. 13661func (tldc TopLevelDomainCollection) topLevelDomainCollectionPreparer(ctx context.Context) (*http.Request, error) { 13662 if !tldc.hasNextLink() { 13663 return nil, nil 13664 } 13665 return autorest.Prepare((&http.Request{}).WithContext(ctx), 13666 autorest.AsJSON(), 13667 autorest.AsGet(), 13668 autorest.WithBaseURL(to.String(tldc.NextLink))) 13669} 13670 13671// TopLevelDomainCollectionPage contains a page of TopLevelDomain values. 13672type TopLevelDomainCollectionPage struct { 13673 fn func(context.Context, TopLevelDomainCollection) (TopLevelDomainCollection, error) 13674 tldc TopLevelDomainCollection 13675} 13676 13677// NextWithContext advances to the next page of values. If there was an error making 13678// the request the page does not advance and the error is returned. 13679func (page *TopLevelDomainCollectionPage) NextWithContext(ctx context.Context) (err error) { 13680 if tracing.IsEnabled() { 13681 ctx = tracing.StartSpan(ctx, fqdn+"/TopLevelDomainCollectionPage.NextWithContext") 13682 defer func() { 13683 sc := -1 13684 if page.Response().Response.Response != nil { 13685 sc = page.Response().Response.Response.StatusCode 13686 } 13687 tracing.EndSpan(ctx, sc, err) 13688 }() 13689 } 13690 for { 13691 next, err := page.fn(ctx, page.tldc) 13692 if err != nil { 13693 return err 13694 } 13695 page.tldc = next 13696 if !next.hasNextLink() || !next.IsEmpty() { 13697 break 13698 } 13699 } 13700 return nil 13701} 13702 13703// Next advances to the next page of values. If there was an error making 13704// the request the page does not advance and the error is returned. 13705// Deprecated: Use NextWithContext() instead. 13706func (page *TopLevelDomainCollectionPage) Next() error { 13707 return page.NextWithContext(context.Background()) 13708} 13709 13710// NotDone returns true if the page enumeration should be started or is not yet complete. 13711func (page TopLevelDomainCollectionPage) NotDone() bool { 13712 return !page.tldc.IsEmpty() 13713} 13714 13715// Response returns the raw server response from the last page request. 13716func (page TopLevelDomainCollectionPage) Response() TopLevelDomainCollection { 13717 return page.tldc 13718} 13719 13720// Values returns the slice of values for the current page or nil if there are no values. 13721func (page TopLevelDomainCollectionPage) Values() []TopLevelDomain { 13722 if page.tldc.IsEmpty() { 13723 return nil 13724 } 13725 return *page.tldc.Value 13726} 13727 13728// Creates a new instance of the TopLevelDomainCollectionPage type. 13729func NewTopLevelDomainCollectionPage(cur TopLevelDomainCollection, getNextPage func(context.Context, TopLevelDomainCollection) (TopLevelDomainCollection, error)) TopLevelDomainCollectionPage { 13730 return TopLevelDomainCollectionPage{ 13731 fn: getNextPage, 13732 tldc: cur, 13733 } 13734} 13735 13736// TopLevelDomainProperties ... 13737type TopLevelDomainProperties struct { 13738 // Name - Name of the top level domain 13739 Name *string `json:"name,omitempty"` 13740 // Privacy - If true then the top level domain supports domain privacy 13741 Privacy *bool `json:"privacy,omitempty"` 13742} 13743 13744// Usage class that represents usage of the quota resource. 13745type Usage struct { 13746 *UsageProperties `json:"properties,omitempty"` 13747 // ID - Resource Id 13748 ID *string `json:"id,omitempty"` 13749 // Name - Resource Name 13750 Name *string `json:"name,omitempty"` 13751 // Kind - Kind of resource 13752 Kind *string `json:"kind,omitempty"` 13753 // Location - Resource Location 13754 Location *string `json:"location,omitempty"` 13755 // Type - Resource type 13756 Type *string `json:"type,omitempty"` 13757 // Tags - Resource tags 13758 Tags map[string]*string `json:"tags"` 13759} 13760 13761// MarshalJSON is the custom marshaler for Usage. 13762func (u Usage) MarshalJSON() ([]byte, error) { 13763 objectMap := make(map[string]interface{}) 13764 if u.UsageProperties != nil { 13765 objectMap["properties"] = u.UsageProperties 13766 } 13767 if u.ID != nil { 13768 objectMap["id"] = u.ID 13769 } 13770 if u.Name != nil { 13771 objectMap["name"] = u.Name 13772 } 13773 if u.Kind != nil { 13774 objectMap["kind"] = u.Kind 13775 } 13776 if u.Location != nil { 13777 objectMap["location"] = u.Location 13778 } 13779 if u.Type != nil { 13780 objectMap["type"] = u.Type 13781 } 13782 if u.Tags != nil { 13783 objectMap["tags"] = u.Tags 13784 } 13785 return json.Marshal(objectMap) 13786} 13787 13788// UnmarshalJSON is the custom unmarshaler for Usage struct. 13789func (u *Usage) UnmarshalJSON(body []byte) error { 13790 var m map[string]*json.RawMessage 13791 err := json.Unmarshal(body, &m) 13792 if err != nil { 13793 return err 13794 } 13795 for k, v := range m { 13796 switch k { 13797 case "properties": 13798 if v != nil { 13799 var usageProperties UsageProperties 13800 err = json.Unmarshal(*v, &usageProperties) 13801 if err != nil { 13802 return err 13803 } 13804 u.UsageProperties = &usageProperties 13805 } 13806 case "id": 13807 if v != nil { 13808 var ID string 13809 err = json.Unmarshal(*v, &ID) 13810 if err != nil { 13811 return err 13812 } 13813 u.ID = &ID 13814 } 13815 case "name": 13816 if v != nil { 13817 var name string 13818 err = json.Unmarshal(*v, &name) 13819 if err != nil { 13820 return err 13821 } 13822 u.Name = &name 13823 } 13824 case "kind": 13825 if v != nil { 13826 var kind string 13827 err = json.Unmarshal(*v, &kind) 13828 if err != nil { 13829 return err 13830 } 13831 u.Kind = &kind 13832 } 13833 case "location": 13834 if v != nil { 13835 var location string 13836 err = json.Unmarshal(*v, &location) 13837 if err != nil { 13838 return err 13839 } 13840 u.Location = &location 13841 } 13842 case "type": 13843 if v != nil { 13844 var typeVar string 13845 err = json.Unmarshal(*v, &typeVar) 13846 if err != nil { 13847 return err 13848 } 13849 u.Type = &typeVar 13850 } 13851 case "tags": 13852 if v != nil { 13853 var tags map[string]*string 13854 err = json.Unmarshal(*v, &tags) 13855 if err != nil { 13856 return err 13857 } 13858 u.Tags = tags 13859 } 13860 } 13861 } 13862 13863 return nil 13864} 13865 13866// UsageCollection collection of usages 13867type UsageCollection struct { 13868 autorest.Response `json:"-"` 13869 // Value - Collection of resources 13870 Value *[]Usage `json:"value,omitempty"` 13871 // NextLink - Link to next page of resources 13872 NextLink *string `json:"nextLink,omitempty"` 13873} 13874 13875// UsageCollectionIterator provides access to a complete listing of Usage values. 13876type UsageCollectionIterator struct { 13877 i int 13878 page UsageCollectionPage 13879} 13880 13881// NextWithContext advances to the next value. If there was an error making 13882// the request the iterator does not advance and the error is returned. 13883func (iter *UsageCollectionIterator) NextWithContext(ctx context.Context) (err error) { 13884 if tracing.IsEnabled() { 13885 ctx = tracing.StartSpan(ctx, fqdn+"/UsageCollectionIterator.NextWithContext") 13886 defer func() { 13887 sc := -1 13888 if iter.Response().Response.Response != nil { 13889 sc = iter.Response().Response.Response.StatusCode 13890 } 13891 tracing.EndSpan(ctx, sc, err) 13892 }() 13893 } 13894 iter.i++ 13895 if iter.i < len(iter.page.Values()) { 13896 return nil 13897 } 13898 err = iter.page.NextWithContext(ctx) 13899 if err != nil { 13900 iter.i-- 13901 return err 13902 } 13903 iter.i = 0 13904 return nil 13905} 13906 13907// Next advances to the next value. If there was an error making 13908// the request the iterator does not advance and the error is returned. 13909// Deprecated: Use NextWithContext() instead. 13910func (iter *UsageCollectionIterator) Next() error { 13911 return iter.NextWithContext(context.Background()) 13912} 13913 13914// NotDone returns true if the enumeration should be started or is not yet complete. 13915func (iter UsageCollectionIterator) NotDone() bool { 13916 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 13917} 13918 13919// Response returns the raw server response from the last page request. 13920func (iter UsageCollectionIterator) Response() UsageCollection { 13921 return iter.page.Response() 13922} 13923 13924// Value returns the current value or a zero-initialized value if the 13925// iterator has advanced beyond the end of the collection. 13926func (iter UsageCollectionIterator) Value() Usage { 13927 if !iter.page.NotDone() { 13928 return Usage{} 13929 } 13930 return iter.page.Values()[iter.i] 13931} 13932 13933// Creates a new instance of the UsageCollectionIterator type. 13934func NewUsageCollectionIterator(page UsageCollectionPage) UsageCollectionIterator { 13935 return UsageCollectionIterator{page: page} 13936} 13937 13938// IsEmpty returns true if the ListResult contains no values. 13939func (uc UsageCollection) IsEmpty() bool { 13940 return uc.Value == nil || len(*uc.Value) == 0 13941} 13942 13943// hasNextLink returns true if the NextLink is not empty. 13944func (uc UsageCollection) hasNextLink() bool { 13945 return uc.NextLink != nil && len(*uc.NextLink) != 0 13946} 13947 13948// usageCollectionPreparer prepares a request to retrieve the next set of results. 13949// It returns nil if no more results exist. 13950func (uc UsageCollection) usageCollectionPreparer(ctx context.Context) (*http.Request, error) { 13951 if !uc.hasNextLink() { 13952 return nil, nil 13953 } 13954 return autorest.Prepare((&http.Request{}).WithContext(ctx), 13955 autorest.AsJSON(), 13956 autorest.AsGet(), 13957 autorest.WithBaseURL(to.String(uc.NextLink))) 13958} 13959 13960// UsageCollectionPage contains a page of Usage values. 13961type UsageCollectionPage struct { 13962 fn func(context.Context, UsageCollection) (UsageCollection, error) 13963 uc UsageCollection 13964} 13965 13966// NextWithContext advances to the next page of values. If there was an error making 13967// the request the page does not advance and the error is returned. 13968func (page *UsageCollectionPage) NextWithContext(ctx context.Context) (err error) { 13969 if tracing.IsEnabled() { 13970 ctx = tracing.StartSpan(ctx, fqdn+"/UsageCollectionPage.NextWithContext") 13971 defer func() { 13972 sc := -1 13973 if page.Response().Response.Response != nil { 13974 sc = page.Response().Response.Response.StatusCode 13975 } 13976 tracing.EndSpan(ctx, sc, err) 13977 }() 13978 } 13979 for { 13980 next, err := page.fn(ctx, page.uc) 13981 if err != nil { 13982 return err 13983 } 13984 page.uc = next 13985 if !next.hasNextLink() || !next.IsEmpty() { 13986 break 13987 } 13988 } 13989 return nil 13990} 13991 13992// Next advances to the next page of values. If there was an error making 13993// the request the page does not advance and the error is returned. 13994// Deprecated: Use NextWithContext() instead. 13995func (page *UsageCollectionPage) Next() error { 13996 return page.NextWithContext(context.Background()) 13997} 13998 13999// NotDone returns true if the page enumeration should be started or is not yet complete. 14000func (page UsageCollectionPage) NotDone() bool { 14001 return !page.uc.IsEmpty() 14002} 14003 14004// Response returns the raw server response from the last page request. 14005func (page UsageCollectionPage) Response() UsageCollection { 14006 return page.uc 14007} 14008 14009// Values returns the slice of values for the current page or nil if there are no values. 14010func (page UsageCollectionPage) Values() []Usage { 14011 if page.uc.IsEmpty() { 14012 return nil 14013 } 14014 return *page.uc.Value 14015} 14016 14017// Creates a new instance of the UsageCollectionPage type. 14018func NewUsageCollectionPage(cur UsageCollection, getNextPage func(context.Context, UsageCollection) (UsageCollection, error)) UsageCollectionPage { 14019 return UsageCollectionPage{ 14020 fn: getNextPage, 14021 uc: cur, 14022 } 14023} 14024 14025// UsageProperties ... 14026type UsageProperties struct { 14027 // DisplayName - Friendly name shown in the UI 14028 DisplayName *string `json:"displayName,omitempty"` 14029 // Name - Name of the quota 14030 Name *string `json:"name,omitempty"` 14031 // ResourceName - Name of the quota resource 14032 ResourceName *string `json:"resourceName,omitempty"` 14033 // Unit - Units of measurement for the quota resource 14034 Unit *string `json:"unit,omitempty"` 14035 // CurrentValue - The current value of the resource counter 14036 CurrentValue *int64 `json:"currentValue,omitempty"` 14037 // Limit - The resource limit 14038 Limit *int64 `json:"limit,omitempty"` 14039 // NextResetTime - Next reset time for the resource counter 14040 NextResetTime *date.Time `json:"nextResetTime,omitempty"` 14041 // ComputeMode - ComputeMode used for this usage. Possible values include: 'Shared', 'Dedicated', 'Dynamic' 14042 ComputeMode ComputeModeOptions `json:"computeMode,omitempty"` 14043 // SiteMode - SiteMode used for this usage 14044 SiteMode *string `json:"siteMode,omitempty"` 14045} 14046 14047// User represents user credentials used for publishing activity 14048type User struct { 14049 autorest.Response `json:"-"` 14050 *UserProperties `json:"properties,omitempty"` 14051 // ID - Resource Id 14052 ID *string `json:"id,omitempty"` 14053 // Name - Resource Name 14054 Name *string `json:"name,omitempty"` 14055 // Kind - Kind of resource 14056 Kind *string `json:"kind,omitempty"` 14057 // Location - Resource Location 14058 Location *string `json:"location,omitempty"` 14059 // Type - Resource type 14060 Type *string `json:"type,omitempty"` 14061 // Tags - Resource tags 14062 Tags map[string]*string `json:"tags"` 14063} 14064 14065// MarshalJSON is the custom marshaler for User. 14066func (u User) MarshalJSON() ([]byte, error) { 14067 objectMap := make(map[string]interface{}) 14068 if u.UserProperties != nil { 14069 objectMap["properties"] = u.UserProperties 14070 } 14071 if u.ID != nil { 14072 objectMap["id"] = u.ID 14073 } 14074 if u.Name != nil { 14075 objectMap["name"] = u.Name 14076 } 14077 if u.Kind != nil { 14078 objectMap["kind"] = u.Kind 14079 } 14080 if u.Location != nil { 14081 objectMap["location"] = u.Location 14082 } 14083 if u.Type != nil { 14084 objectMap["type"] = u.Type 14085 } 14086 if u.Tags != nil { 14087 objectMap["tags"] = u.Tags 14088 } 14089 return json.Marshal(objectMap) 14090} 14091 14092// UnmarshalJSON is the custom unmarshaler for User struct. 14093func (u *User) UnmarshalJSON(body []byte) error { 14094 var m map[string]*json.RawMessage 14095 err := json.Unmarshal(body, &m) 14096 if err != nil { 14097 return err 14098 } 14099 for k, v := range m { 14100 switch k { 14101 case "properties": 14102 if v != nil { 14103 var userProperties UserProperties 14104 err = json.Unmarshal(*v, &userProperties) 14105 if err != nil { 14106 return err 14107 } 14108 u.UserProperties = &userProperties 14109 } 14110 case "id": 14111 if v != nil { 14112 var ID string 14113 err = json.Unmarshal(*v, &ID) 14114 if err != nil { 14115 return err 14116 } 14117 u.ID = &ID 14118 } 14119 case "name": 14120 if v != nil { 14121 var name string 14122 err = json.Unmarshal(*v, &name) 14123 if err != nil { 14124 return err 14125 } 14126 u.Name = &name 14127 } 14128 case "kind": 14129 if v != nil { 14130 var kind string 14131 err = json.Unmarshal(*v, &kind) 14132 if err != nil { 14133 return err 14134 } 14135 u.Kind = &kind 14136 } 14137 case "location": 14138 if v != nil { 14139 var location string 14140 err = json.Unmarshal(*v, &location) 14141 if err != nil { 14142 return err 14143 } 14144 u.Location = &location 14145 } 14146 case "type": 14147 if v != nil { 14148 var typeVar string 14149 err = json.Unmarshal(*v, &typeVar) 14150 if err != nil { 14151 return err 14152 } 14153 u.Type = &typeVar 14154 } 14155 case "tags": 14156 if v != nil { 14157 var tags map[string]*string 14158 err = json.Unmarshal(*v, &tags) 14159 if err != nil { 14160 return err 14161 } 14162 u.Tags = tags 14163 } 14164 } 14165 } 14166 14167 return nil 14168} 14169 14170// UserProperties ... 14171type UserProperties struct { 14172 // Name - Username (internal) 14173 Name *string `json:"name,omitempty"` 14174 // PublishingUserName - Username used for publishing 14175 PublishingUserName *string `json:"publishingUserName,omitempty"` 14176 // PublishingPassword - Password used for publishing 14177 PublishingPassword *string `json:"publishingPassword,omitempty"` 14178 // ScmURI - Service Control Manager URI, including username and password 14179 ScmURI *string `json:"scmUri,omitempty"` 14180} 14181 14182// VirtualApplication ... 14183type VirtualApplication struct { 14184 VirtualPath *string `json:"virtualPath,omitempty"` 14185 PhysicalPath *string `json:"physicalPath,omitempty"` 14186 PreloadEnabled *bool `json:"preloadEnabled,omitempty"` 14187 VirtualDirectories *[]VirtualDirectory `json:"virtualDirectories,omitempty"` 14188} 14189 14190// VirtualDirectory ... 14191type VirtualDirectory struct { 14192 VirtualPath *string `json:"virtualPath,omitempty"` 14193 PhysicalPath *string `json:"physicalPath,omitempty"` 14194} 14195 14196// VirtualIPMapping class that represents a VIP mapping 14197type VirtualIPMapping struct { 14198 // VirtualIP - Virtual IP address 14199 VirtualIP *string `json:"virtualIP,omitempty"` 14200 // InternalHTTPPort - Internal HTTP port 14201 InternalHTTPPort *int32 `json:"internalHttpPort,omitempty"` 14202 // InternalHTTPSPort - Internal HTTPS port 14203 InternalHTTPSPort *int32 `json:"internalHttpsPort,omitempty"` 14204 // InUse - Is VIP mapping in use 14205 InUse *bool `json:"inUse,omitempty"` 14206} 14207 14208// VirtualNetworkProfile specification for using a virtual network 14209type VirtualNetworkProfile struct { 14210 // ID - Resource id of the virtual network 14211 ID *string `json:"id,omitempty"` 14212 // Name - Name of the virtual network (read-only) 14213 Name *string `json:"name,omitempty"` 14214 // Type - Resource type of the virtual network (read-only) 14215 Type *string `json:"type,omitempty"` 14216 // Subnet - Subnet within the virtual network 14217 Subnet *string `json:"subnet,omitempty"` 14218} 14219 14220// VnetGateway the VnetGateway contract. This is used to give the vnet gateway access to the VPN package. 14221type VnetGateway struct { 14222 autorest.Response `json:"-"` 14223 *VnetGatewayProperties `json:"properties,omitempty"` 14224 // ID - Resource Id 14225 ID *string `json:"id,omitempty"` 14226 // Name - Resource Name 14227 Name *string `json:"name,omitempty"` 14228 // Kind - Kind of resource 14229 Kind *string `json:"kind,omitempty"` 14230 // Location - Resource Location 14231 Location *string `json:"location,omitempty"` 14232 // Type - Resource type 14233 Type *string `json:"type,omitempty"` 14234 // Tags - Resource tags 14235 Tags map[string]*string `json:"tags"` 14236} 14237 14238// MarshalJSON is the custom marshaler for VnetGateway. 14239func (vg VnetGateway) MarshalJSON() ([]byte, error) { 14240 objectMap := make(map[string]interface{}) 14241 if vg.VnetGatewayProperties != nil { 14242 objectMap["properties"] = vg.VnetGatewayProperties 14243 } 14244 if vg.ID != nil { 14245 objectMap["id"] = vg.ID 14246 } 14247 if vg.Name != nil { 14248 objectMap["name"] = vg.Name 14249 } 14250 if vg.Kind != nil { 14251 objectMap["kind"] = vg.Kind 14252 } 14253 if vg.Location != nil { 14254 objectMap["location"] = vg.Location 14255 } 14256 if vg.Type != nil { 14257 objectMap["type"] = vg.Type 14258 } 14259 if vg.Tags != nil { 14260 objectMap["tags"] = vg.Tags 14261 } 14262 return json.Marshal(objectMap) 14263} 14264 14265// UnmarshalJSON is the custom unmarshaler for VnetGateway struct. 14266func (vg *VnetGateway) UnmarshalJSON(body []byte) error { 14267 var m map[string]*json.RawMessage 14268 err := json.Unmarshal(body, &m) 14269 if err != nil { 14270 return err 14271 } 14272 for k, v := range m { 14273 switch k { 14274 case "properties": 14275 if v != nil { 14276 var vnetGatewayProperties VnetGatewayProperties 14277 err = json.Unmarshal(*v, &vnetGatewayProperties) 14278 if err != nil { 14279 return err 14280 } 14281 vg.VnetGatewayProperties = &vnetGatewayProperties 14282 } 14283 case "id": 14284 if v != nil { 14285 var ID string 14286 err = json.Unmarshal(*v, &ID) 14287 if err != nil { 14288 return err 14289 } 14290 vg.ID = &ID 14291 } 14292 case "name": 14293 if v != nil { 14294 var name string 14295 err = json.Unmarshal(*v, &name) 14296 if err != nil { 14297 return err 14298 } 14299 vg.Name = &name 14300 } 14301 case "kind": 14302 if v != nil { 14303 var kind string 14304 err = json.Unmarshal(*v, &kind) 14305 if err != nil { 14306 return err 14307 } 14308 vg.Kind = &kind 14309 } 14310 case "location": 14311 if v != nil { 14312 var location string 14313 err = json.Unmarshal(*v, &location) 14314 if err != nil { 14315 return err 14316 } 14317 vg.Location = &location 14318 } 14319 case "type": 14320 if v != nil { 14321 var typeVar string 14322 err = json.Unmarshal(*v, &typeVar) 14323 if err != nil { 14324 return err 14325 } 14326 vg.Type = &typeVar 14327 } 14328 case "tags": 14329 if v != nil { 14330 var tags map[string]*string 14331 err = json.Unmarshal(*v, &tags) 14332 if err != nil { 14333 return err 14334 } 14335 vg.Tags = tags 14336 } 14337 } 14338 } 14339 14340 return nil 14341} 14342 14343// VnetGatewayProperties ... 14344type VnetGatewayProperties struct { 14345 // VnetName - The VNET name. 14346 VnetName *string `json:"vnetName,omitempty"` 14347 // VpnPackageURI - The URI where the Vpn package can be downloaded 14348 VpnPackageURI *string `json:"vpnPackageUri,omitempty"` 14349} 14350 14351// VnetInfo vNETInfo contract. This contract is public and is a stripped down version of VNETInfoInternal 14352type VnetInfo struct { 14353 autorest.Response `json:"-"` 14354 *VnetInfoProperties `json:"properties,omitempty"` 14355 // ID - Resource Id 14356 ID *string `json:"id,omitempty"` 14357 // Name - Resource Name 14358 Name *string `json:"name,omitempty"` 14359 // Kind - Kind of resource 14360 Kind *string `json:"kind,omitempty"` 14361 // Location - Resource Location 14362 Location *string `json:"location,omitempty"` 14363 // Type - Resource type 14364 Type *string `json:"type,omitempty"` 14365 // Tags - Resource tags 14366 Tags map[string]*string `json:"tags"` 14367} 14368 14369// MarshalJSON is the custom marshaler for VnetInfo. 14370func (vi VnetInfo) MarshalJSON() ([]byte, error) { 14371 objectMap := make(map[string]interface{}) 14372 if vi.VnetInfoProperties != nil { 14373 objectMap["properties"] = vi.VnetInfoProperties 14374 } 14375 if vi.ID != nil { 14376 objectMap["id"] = vi.ID 14377 } 14378 if vi.Name != nil { 14379 objectMap["name"] = vi.Name 14380 } 14381 if vi.Kind != nil { 14382 objectMap["kind"] = vi.Kind 14383 } 14384 if vi.Location != nil { 14385 objectMap["location"] = vi.Location 14386 } 14387 if vi.Type != nil { 14388 objectMap["type"] = vi.Type 14389 } 14390 if vi.Tags != nil { 14391 objectMap["tags"] = vi.Tags 14392 } 14393 return json.Marshal(objectMap) 14394} 14395 14396// UnmarshalJSON is the custom unmarshaler for VnetInfo struct. 14397func (vi *VnetInfo) UnmarshalJSON(body []byte) error { 14398 var m map[string]*json.RawMessage 14399 err := json.Unmarshal(body, &m) 14400 if err != nil { 14401 return err 14402 } 14403 for k, v := range m { 14404 switch k { 14405 case "properties": 14406 if v != nil { 14407 var vnetInfoProperties VnetInfoProperties 14408 err = json.Unmarshal(*v, &vnetInfoProperties) 14409 if err != nil { 14410 return err 14411 } 14412 vi.VnetInfoProperties = &vnetInfoProperties 14413 } 14414 case "id": 14415 if v != nil { 14416 var ID string 14417 err = json.Unmarshal(*v, &ID) 14418 if err != nil { 14419 return err 14420 } 14421 vi.ID = &ID 14422 } 14423 case "name": 14424 if v != nil { 14425 var name string 14426 err = json.Unmarshal(*v, &name) 14427 if err != nil { 14428 return err 14429 } 14430 vi.Name = &name 14431 } 14432 case "kind": 14433 if v != nil { 14434 var kind string 14435 err = json.Unmarshal(*v, &kind) 14436 if err != nil { 14437 return err 14438 } 14439 vi.Kind = &kind 14440 } 14441 case "location": 14442 if v != nil { 14443 var location string 14444 err = json.Unmarshal(*v, &location) 14445 if err != nil { 14446 return err 14447 } 14448 vi.Location = &location 14449 } 14450 case "type": 14451 if v != nil { 14452 var typeVar string 14453 err = json.Unmarshal(*v, &typeVar) 14454 if err != nil { 14455 return err 14456 } 14457 vi.Type = &typeVar 14458 } 14459 case "tags": 14460 if v != nil { 14461 var tags map[string]*string 14462 err = json.Unmarshal(*v, &tags) 14463 if err != nil { 14464 return err 14465 } 14466 vi.Tags = tags 14467 } 14468 } 14469 } 14470 14471 return nil 14472} 14473 14474// VnetInfoProperties ... 14475type VnetInfoProperties struct { 14476 // VnetResourceID - The vnet resource id 14477 VnetResourceID *string `json:"vnetResourceId,omitempty"` 14478 // CertThumbprint - The client certificate thumbprint 14479 CertThumbprint *string `json:"certThumbprint,omitempty"` 14480 // CertBlob - A certificate file (.cer) blob containing the public key of the private key used to authenticate a 14481 // Point-To-Site VPN connection. 14482 CertBlob *string `json:"certBlob,omitempty"` 14483 // Routes - The routes that this virtual network connection uses. 14484 Routes *[]VnetRoute `json:"routes,omitempty"` 14485 // ResyncRequired - Flag to determine if a resync is required 14486 ResyncRequired *bool `json:"resyncRequired,omitempty"` 14487 // DNSServers - Dns servers to be used by this VNET. This should be a comma-separated list of IP addresses. 14488 DNSServers *string `json:"dnsServers,omitempty"` 14489} 14490 14491// VnetRoute vnetRoute contract used to pass routing information for a vnet. 14492type VnetRoute struct { 14493 autorest.Response `json:"-"` 14494 *VnetRouteProperties `json:"properties,omitempty"` 14495 // ID - Resource Id 14496 ID *string `json:"id,omitempty"` 14497 // Name - Resource Name 14498 Name *string `json:"name,omitempty"` 14499 // Kind - Kind of resource 14500 Kind *string `json:"kind,omitempty"` 14501 // Location - Resource Location 14502 Location *string `json:"location,omitempty"` 14503 // Type - Resource type 14504 Type *string `json:"type,omitempty"` 14505 // Tags - Resource tags 14506 Tags map[string]*string `json:"tags"` 14507} 14508 14509// MarshalJSON is the custom marshaler for VnetRoute. 14510func (vr VnetRoute) MarshalJSON() ([]byte, error) { 14511 objectMap := make(map[string]interface{}) 14512 if vr.VnetRouteProperties != nil { 14513 objectMap["properties"] = vr.VnetRouteProperties 14514 } 14515 if vr.ID != nil { 14516 objectMap["id"] = vr.ID 14517 } 14518 if vr.Name != nil { 14519 objectMap["name"] = vr.Name 14520 } 14521 if vr.Kind != nil { 14522 objectMap["kind"] = vr.Kind 14523 } 14524 if vr.Location != nil { 14525 objectMap["location"] = vr.Location 14526 } 14527 if vr.Type != nil { 14528 objectMap["type"] = vr.Type 14529 } 14530 if vr.Tags != nil { 14531 objectMap["tags"] = vr.Tags 14532 } 14533 return json.Marshal(objectMap) 14534} 14535 14536// UnmarshalJSON is the custom unmarshaler for VnetRoute struct. 14537func (vr *VnetRoute) UnmarshalJSON(body []byte) error { 14538 var m map[string]*json.RawMessage 14539 err := json.Unmarshal(body, &m) 14540 if err != nil { 14541 return err 14542 } 14543 for k, v := range m { 14544 switch k { 14545 case "properties": 14546 if v != nil { 14547 var vnetRouteProperties VnetRouteProperties 14548 err = json.Unmarshal(*v, &vnetRouteProperties) 14549 if err != nil { 14550 return err 14551 } 14552 vr.VnetRouteProperties = &vnetRouteProperties 14553 } 14554 case "id": 14555 if v != nil { 14556 var ID string 14557 err = json.Unmarshal(*v, &ID) 14558 if err != nil { 14559 return err 14560 } 14561 vr.ID = &ID 14562 } 14563 case "name": 14564 if v != nil { 14565 var name string 14566 err = json.Unmarshal(*v, &name) 14567 if err != nil { 14568 return err 14569 } 14570 vr.Name = &name 14571 } 14572 case "kind": 14573 if v != nil { 14574 var kind string 14575 err = json.Unmarshal(*v, &kind) 14576 if err != nil { 14577 return err 14578 } 14579 vr.Kind = &kind 14580 } 14581 case "location": 14582 if v != nil { 14583 var location string 14584 err = json.Unmarshal(*v, &location) 14585 if err != nil { 14586 return err 14587 } 14588 vr.Location = &location 14589 } 14590 case "type": 14591 if v != nil { 14592 var typeVar string 14593 err = json.Unmarshal(*v, &typeVar) 14594 if err != nil { 14595 return err 14596 } 14597 vr.Type = &typeVar 14598 } 14599 case "tags": 14600 if v != nil { 14601 var tags map[string]*string 14602 err = json.Unmarshal(*v, &tags) 14603 if err != nil { 14604 return err 14605 } 14606 vr.Tags = tags 14607 } 14608 } 14609 } 14610 14611 return nil 14612} 14613 14614// VnetRouteProperties ... 14615type VnetRouteProperties struct { 14616 // Name - The name of this route. This is only returned by the server and does not need to be set by the client. 14617 Name *string `json:"name,omitempty"` 14618 // StartAddress - The starting address for this route. This may also include a CIDR notation, in which case the end address must not be specified. 14619 StartAddress *string `json:"startAddress,omitempty"` 14620 // EndAddress - The ending address for this route. If the start address is specified in CIDR notation, this must be omitted. 14621 EndAddress *string `json:"endAddress,omitempty"` 14622 // RouteType - The type of route this is: 14623 // DEFAULT - By default, every web app has routes to the local address ranges specified by RFC1918 14624 // INHERITED - Routes inherited from the real Virtual Network routes 14625 // STATIC - Static route set on the web app only 14626 // 14627 // These values will be used for syncing a Web App's routes with those from a Virtual Network. This operation will clear all DEFAULT and INHERITED routes and replace them 14628 // with new INHERITED routes. 14629 RouteType *string `json:"routeType,omitempty"` 14630} 14631 14632// WorkerPool worker pool of a hostingEnvironment (App Service Environment) 14633type WorkerPool struct { 14634 autorest.Response `json:"-"` 14635 *WorkerPoolProperties `json:"properties,omitempty"` 14636 Sku *SkuDescription `json:"sku,omitempty"` 14637 // ID - Resource Id 14638 ID *string `json:"id,omitempty"` 14639 // Name - Resource Name 14640 Name *string `json:"name,omitempty"` 14641 // Kind - Kind of resource 14642 Kind *string `json:"kind,omitempty"` 14643 // Location - Resource Location 14644 Location *string `json:"location,omitempty"` 14645 // Type - Resource type 14646 Type *string `json:"type,omitempty"` 14647 // Tags - Resource tags 14648 Tags map[string]*string `json:"tags"` 14649} 14650 14651// MarshalJSON is the custom marshaler for WorkerPool. 14652func (wp WorkerPool) MarshalJSON() ([]byte, error) { 14653 objectMap := make(map[string]interface{}) 14654 if wp.WorkerPoolProperties != nil { 14655 objectMap["properties"] = wp.WorkerPoolProperties 14656 } 14657 if wp.Sku != nil { 14658 objectMap["sku"] = wp.Sku 14659 } 14660 if wp.ID != nil { 14661 objectMap["id"] = wp.ID 14662 } 14663 if wp.Name != nil { 14664 objectMap["name"] = wp.Name 14665 } 14666 if wp.Kind != nil { 14667 objectMap["kind"] = wp.Kind 14668 } 14669 if wp.Location != nil { 14670 objectMap["location"] = wp.Location 14671 } 14672 if wp.Type != nil { 14673 objectMap["type"] = wp.Type 14674 } 14675 if wp.Tags != nil { 14676 objectMap["tags"] = wp.Tags 14677 } 14678 return json.Marshal(objectMap) 14679} 14680 14681// UnmarshalJSON is the custom unmarshaler for WorkerPool struct. 14682func (wp *WorkerPool) UnmarshalJSON(body []byte) error { 14683 var m map[string]*json.RawMessage 14684 err := json.Unmarshal(body, &m) 14685 if err != nil { 14686 return err 14687 } 14688 for k, v := range m { 14689 switch k { 14690 case "properties": 14691 if v != nil { 14692 var workerPoolProperties WorkerPoolProperties 14693 err = json.Unmarshal(*v, &workerPoolProperties) 14694 if err != nil { 14695 return err 14696 } 14697 wp.WorkerPoolProperties = &workerPoolProperties 14698 } 14699 case "sku": 14700 if v != nil { 14701 var sku SkuDescription 14702 err = json.Unmarshal(*v, &sku) 14703 if err != nil { 14704 return err 14705 } 14706 wp.Sku = &sku 14707 } 14708 case "id": 14709 if v != nil { 14710 var ID string 14711 err = json.Unmarshal(*v, &ID) 14712 if err != nil { 14713 return err 14714 } 14715 wp.ID = &ID 14716 } 14717 case "name": 14718 if v != nil { 14719 var name string 14720 err = json.Unmarshal(*v, &name) 14721 if err != nil { 14722 return err 14723 } 14724 wp.Name = &name 14725 } 14726 case "kind": 14727 if v != nil { 14728 var kind string 14729 err = json.Unmarshal(*v, &kind) 14730 if err != nil { 14731 return err 14732 } 14733 wp.Kind = &kind 14734 } 14735 case "location": 14736 if v != nil { 14737 var location string 14738 err = json.Unmarshal(*v, &location) 14739 if err != nil { 14740 return err 14741 } 14742 wp.Location = &location 14743 } 14744 case "type": 14745 if v != nil { 14746 var typeVar string 14747 err = json.Unmarshal(*v, &typeVar) 14748 if err != nil { 14749 return err 14750 } 14751 wp.Type = &typeVar 14752 } 14753 case "tags": 14754 if v != nil { 14755 var tags map[string]*string 14756 err = json.Unmarshal(*v, &tags) 14757 if err != nil { 14758 return err 14759 } 14760 wp.Tags = tags 14761 } 14762 } 14763 } 14764 14765 return nil 14766} 14767 14768// WorkerPoolCollection collection of worker pools 14769type WorkerPoolCollection struct { 14770 autorest.Response `json:"-"` 14771 // Value - Collection of resources 14772 Value *[]WorkerPool `json:"value,omitempty"` 14773 // NextLink - Link to next page of resources 14774 NextLink *string `json:"nextLink,omitempty"` 14775} 14776 14777// WorkerPoolCollectionIterator provides access to a complete listing of WorkerPool values. 14778type WorkerPoolCollectionIterator struct { 14779 i int 14780 page WorkerPoolCollectionPage 14781} 14782 14783// NextWithContext advances to the next value. If there was an error making 14784// the request the iterator does not advance and the error is returned. 14785func (iter *WorkerPoolCollectionIterator) NextWithContext(ctx context.Context) (err error) { 14786 if tracing.IsEnabled() { 14787 ctx = tracing.StartSpan(ctx, fqdn+"/WorkerPoolCollectionIterator.NextWithContext") 14788 defer func() { 14789 sc := -1 14790 if iter.Response().Response.Response != nil { 14791 sc = iter.Response().Response.Response.StatusCode 14792 } 14793 tracing.EndSpan(ctx, sc, err) 14794 }() 14795 } 14796 iter.i++ 14797 if iter.i < len(iter.page.Values()) { 14798 return nil 14799 } 14800 err = iter.page.NextWithContext(ctx) 14801 if err != nil { 14802 iter.i-- 14803 return err 14804 } 14805 iter.i = 0 14806 return nil 14807} 14808 14809// Next advances to the next value. If there was an error making 14810// the request the iterator does not advance and the error is returned. 14811// Deprecated: Use NextWithContext() instead. 14812func (iter *WorkerPoolCollectionIterator) Next() error { 14813 return iter.NextWithContext(context.Background()) 14814} 14815 14816// NotDone returns true if the enumeration should be started or is not yet complete. 14817func (iter WorkerPoolCollectionIterator) NotDone() bool { 14818 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 14819} 14820 14821// Response returns the raw server response from the last page request. 14822func (iter WorkerPoolCollectionIterator) Response() WorkerPoolCollection { 14823 return iter.page.Response() 14824} 14825 14826// Value returns the current value or a zero-initialized value if the 14827// iterator has advanced beyond the end of the collection. 14828func (iter WorkerPoolCollectionIterator) Value() WorkerPool { 14829 if !iter.page.NotDone() { 14830 return WorkerPool{} 14831 } 14832 return iter.page.Values()[iter.i] 14833} 14834 14835// Creates a new instance of the WorkerPoolCollectionIterator type. 14836func NewWorkerPoolCollectionIterator(page WorkerPoolCollectionPage) WorkerPoolCollectionIterator { 14837 return WorkerPoolCollectionIterator{page: page} 14838} 14839 14840// IsEmpty returns true if the ListResult contains no values. 14841func (wpc WorkerPoolCollection) IsEmpty() bool { 14842 return wpc.Value == nil || len(*wpc.Value) == 0 14843} 14844 14845// hasNextLink returns true if the NextLink is not empty. 14846func (wpc WorkerPoolCollection) hasNextLink() bool { 14847 return wpc.NextLink != nil && len(*wpc.NextLink) != 0 14848} 14849 14850// workerPoolCollectionPreparer prepares a request to retrieve the next set of results. 14851// It returns nil if no more results exist. 14852func (wpc WorkerPoolCollection) workerPoolCollectionPreparer(ctx context.Context) (*http.Request, error) { 14853 if !wpc.hasNextLink() { 14854 return nil, nil 14855 } 14856 return autorest.Prepare((&http.Request{}).WithContext(ctx), 14857 autorest.AsJSON(), 14858 autorest.AsGet(), 14859 autorest.WithBaseURL(to.String(wpc.NextLink))) 14860} 14861 14862// WorkerPoolCollectionPage contains a page of WorkerPool values. 14863type WorkerPoolCollectionPage struct { 14864 fn func(context.Context, WorkerPoolCollection) (WorkerPoolCollection, error) 14865 wpc WorkerPoolCollection 14866} 14867 14868// NextWithContext advances to the next page of values. If there was an error making 14869// the request the page does not advance and the error is returned. 14870func (page *WorkerPoolCollectionPage) NextWithContext(ctx context.Context) (err error) { 14871 if tracing.IsEnabled() { 14872 ctx = tracing.StartSpan(ctx, fqdn+"/WorkerPoolCollectionPage.NextWithContext") 14873 defer func() { 14874 sc := -1 14875 if page.Response().Response.Response != nil { 14876 sc = page.Response().Response.Response.StatusCode 14877 } 14878 tracing.EndSpan(ctx, sc, err) 14879 }() 14880 } 14881 for { 14882 next, err := page.fn(ctx, page.wpc) 14883 if err != nil { 14884 return err 14885 } 14886 page.wpc = next 14887 if !next.hasNextLink() || !next.IsEmpty() { 14888 break 14889 } 14890 } 14891 return nil 14892} 14893 14894// Next advances to the next page of values. If there was an error making 14895// the request the page does not advance and the error is returned. 14896// Deprecated: Use NextWithContext() instead. 14897func (page *WorkerPoolCollectionPage) Next() error { 14898 return page.NextWithContext(context.Background()) 14899} 14900 14901// NotDone returns true if the page enumeration should be started or is not yet complete. 14902func (page WorkerPoolCollectionPage) NotDone() bool { 14903 return !page.wpc.IsEmpty() 14904} 14905 14906// Response returns the raw server response from the last page request. 14907func (page WorkerPoolCollectionPage) Response() WorkerPoolCollection { 14908 return page.wpc 14909} 14910 14911// Values returns the slice of values for the current page or nil if there are no values. 14912func (page WorkerPoolCollectionPage) Values() []WorkerPool { 14913 if page.wpc.IsEmpty() { 14914 return nil 14915 } 14916 return *page.wpc.Value 14917} 14918 14919// Creates a new instance of the WorkerPoolCollectionPage type. 14920func NewWorkerPoolCollectionPage(cur WorkerPoolCollection, getNextPage func(context.Context, WorkerPoolCollection) (WorkerPoolCollection, error)) WorkerPoolCollectionPage { 14921 return WorkerPoolCollectionPage{ 14922 fn: getNextPage, 14923 wpc: cur, 14924 } 14925} 14926 14927// WorkerPoolProperties ... 14928type WorkerPoolProperties struct { 14929 // WorkerSizeID - Worker size id for referencing this worker pool 14930 WorkerSizeID *int32 `json:"workerSizeId,omitempty"` 14931 // ComputeMode - Shared or dedicated web app hosting. Possible values include: 'Shared', 'Dedicated', 'Dynamic' 14932 ComputeMode ComputeModeOptions `json:"computeMode,omitempty"` 14933 // WorkerSize - VM size of the worker pool instances 14934 WorkerSize *string `json:"workerSize,omitempty"` 14935 // WorkerCount - Number of instances in the worker pool 14936 WorkerCount *int32 `json:"workerCount,omitempty"` 14937 // InstanceNames - Names of all instances in the worker pool (read only) 14938 InstanceNames *[]string `json:"instanceNames,omitempty"` 14939} 14940